diff options
author | Robinson Tryon <qubit@runcibility.com> | 2015-11-25 06:03:10 -0500 |
---|---|---|
committer | Robinson Tryon <qubit@runcibility.com> | 2015-11-25 06:07:38 -0500 |
commit | 49c2b9808df8a6b197dec666dfc0cda6321a4306 (patch) | |
tree | 045ef4b9b8dfdb06bfbe18cdf773d59f57d5552d /sw/source/uibase | |
parent | 5470a365f25e5052b4dd74f76aa2196f0d70934b (diff) |
bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-point
This commit renames the most annoying abbreviations in Writer (and
partially in the shared code too).
Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
Diffstat (limited to 'sw/source/uibase')
114 files changed, 2180 insertions, 2180 deletions
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index cb1436177854..c66094cd0b30 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -284,12 +284,12 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Delete frame of the first page if ( pSh->GotoFly(sSendMark) ) { - pSh->EnterSelFrmMode(); + pSh->EnterSelFrameMode(); pSh->DelRight(); } if ( pSh->GotoFly(sAddrMark) ) { - pSh->EnterSelFrmMode(); + pSh->EnterSelFrameMode(); pSh->DelRight(); } pSh->SttEndDoc(true); @@ -299,7 +299,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc()); // Insert page break - if ( pSh->IsCrsrInTable() ) + if ( pSh->IsCursorInTable() ) { pSh->SplitNode(); pSh->Right( CRSR_SKIP_CHARS, false, 1, false ); @@ -390,7 +390,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pDesc->SetUseOn(nsUseOnPage::PD_ALL); // Page size - rFormat.SetFormatAttr(SwFormatFrmSize(ATT_FIX_SIZE, + rFormat.SetFormatAttr(SwFormatFrameSize(ATT_FIX_SIZE, nPageW + lLeft, nPageH + lUpper)); // Set type of page numbering @@ -417,7 +417,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pSh->ChgCurPageDesc(*pDesc); // Insert Frame - SwFlyFrmAttrMgr aMgr(false, pSh, FRMMGR_TYPE_ENVELP); + SwFlyFrameAttrMgr aMgr(false, pSh, FRMMGR_TYPE_ENVELP); SwFieldMgr aFieldMgr; aMgr.SetHeightSizeType(ATT_VAR_SIZE); @@ -430,14 +430,14 @@ void SwModule::InsertEnv( SfxRequest& rReq ) if (rItem.bSend) { pSh->SttEndDoc(true); - aMgr.InsertFlyFrm(FLY_AT_PAGE, + aMgr.InsertFlyFrame(FLY_AT_PAGE, Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper), Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0)); - pSh->EnterSelFrmMode(); + pSh->EnterSelFrameMode(); pSh->SetFlyName(sSendMark); - pSh->UnSelectFrm(); - pSh->LeaveSelFrmMode(); + pSh->UnSelectFrame(); + pSh->LeaveSelFrameMode(); pSh->SetTextFormatColl( pSend ); InsertLabEnvText( *pSh, aFieldMgr, rItem.aSendText ); aMgr.UpdateAttrMgr(); @@ -446,13 +446,13 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Addressee pSh->SttEndDoc(true); - aMgr.InsertFlyFrm(FLY_AT_PAGE, + aMgr.InsertFlyFrame(FLY_AT_PAGE, Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper), Size (nPageW - rItem.lAddrFromLeft - 566, 0)); - pSh->EnterSelFrmMode(); + pSh->EnterSelFrameMode(); pSh->SetFlyName(sAddrMark); - pSh->UnSelectFrm(); - pSh->LeaveSelFrmMode(); + pSh->UnSelectFrame(); + pSh->LeaveSelFrameMode(); pSh->SetTextFormatColl( pAddr ); InsertLabEnvText(*pSh, aFieldMgr, rItem.aAddrText); diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 567a65c1bb43..39ed27367a19 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -252,8 +252,8 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL) const SfxFrameItem* pItem = static_cast<const SfxFrameItem*>( pView->GetViewFrame()->GetDispatcher()->Execute(SID_NEWDOCDIRECT, SfxCallMode::SYNCHRON, &aFactory, 0L)); - SfxFrame* pFrm = pItem ? pItem->GetFrame() : nullptr; - SfxViewFrame* pViewFrame = pFrm ? pFrm->GetCurrentViewFrame() : nullptr; + SfxFrame* pFrame = pItem ? pItem->GetFrame() : nullptr; + SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : nullptr; pNewView = pViewFrame ? dynamic_cast<SwView*>( pViewFrame->GetViewShell() ) : nullptr; } diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 2ed4f30e23e8..d49a4e428d7a 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -96,10 +96,10 @@ static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); aSet.Put( SwFormatVertOrient( rItem.m_lUpper + static_cast<SwTwips>(nRow) * rItem.m_lVDist, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); - const SwFrameFormat *pFormat = rSh.NewFlyFrm(aSet, true, &rFormat ); // Insert Fly + const SwFrameFormat *pFormat = rSh.NewFlyFrame(aSet, true, &rFormat ); // Insert Fly OSL_ENSURE( pFormat, "Fly not inserted" ); - rSh.UnSelectFrm(); //Frame was selected automatically + rSh.UnSelectFrame(); //Frame was selected automatically rSh.SetTextFormatColl( rSh.GetTextCollFromPool( RES_POOLCOLL_STANDARD ) ); @@ -133,10 +133,10 @@ static const SwFrameFormat *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); aSet.Put( SwFormatVertOrient( rItem.m_lUpper + static_cast<SwTwips>(nRow) * rItem.m_lVDist, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); - const SwFrameFormat *pFormat = rSh.NewFlyFrm(aSet, true, &rFormat ); // Insert Fly + const SwFrameFormat *pFormat = rSh.NewFlyFrame(aSet, true, &rFormat ); // Insert Fly OSL_ENSURE( pFormat, "Fly not inserted" ); - rSh.UnSelectFrm(); //Frame was selected automatically + rSh.UnSelectFrame(); //Frame was selected automatically rSh.SetTextFormatColl( rSh.GetTextCollFromPool( RES_POOLCOLL_STANDARD ) ); @@ -262,7 +262,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) long lPgWidth, lPgHeight; lPgWidth = (rItem.m_lPWidth > MINLAY ? rItem.m_lPWidth : MINLAY); lPgHeight = (rItem.m_lPHeight > MINLAY ? rItem.m_lPHeight : MINLAY); - rFormat.SetFormatAttr( SwFormatFrmSize( ATT_FIX_SIZE, lPgWidth, lPgHeight )); + rFormat.SetFormatAttr( SwFormatFrameSize( ATT_FIX_SIZE, lPgWidth, lPgHeight )); // Numbering type SvxNumberType aType; aType.SetNumberingType(SVX_NUM_NUMBER_NONE); @@ -292,21 +292,21 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) sal_Int32 iResultHeight = rItem.m_lUpper + (rItem.m_nRows - 1) * rItem.m_lVDist + rItem.m_lHeight - rItem.m_lPHeight; sal_Int32 iWidth = (iResultWidth > 0 ? rItem.m_lWidth - (iResultWidth / rItem.m_nCols) - 1 : rItem.m_lWidth); sal_Int32 iHeight = (iResultHeight > 0 ? rItem.m_lHeight - (iResultHeight / rItem.m_nRows) - 1 : rItem.m_lHeight); - SwFormatFrmSize aFrmSize( ATT_FIX_SIZE, iWidth, iHeight ); - pFormat->SetFormatAttr( aFrmSize ); + SwFormatFrameSize aFrameSize( ATT_FIX_SIZE, iWidth, iHeight ); + pFormat->SetFormatAttr( aFrameSize ); //frame represents label itself, no border space - SvxULSpaceItem aFrmNoULSpace( 0, 0, RES_UL_SPACE ); - SvxLRSpaceItem aFrmNoLRSpace( 0, 0, 0, 0, RES_LR_SPACE ); - pFormat->SetFormatAttr( aFrmNoULSpace ); - pFormat->SetFormatAttr( aFrmNoLRSpace ); + SvxULSpaceItem aFrameNoULSpace( 0, 0, RES_UL_SPACE ); + SvxLRSpaceItem aFrameNoLRSpace( 0, 0, 0, 0, RES_LR_SPACE ); + pFormat->SetFormatAttr( aFrameNoULSpace ); + pFormat->SetFormatAttr( aFrameNoLRSpace ); const SwFrameFormat *pFirstFlyFormat = nullptr; if ( rItem.m_bPage ) { - SwFormatVertOrient aFrmVertOrient( pFormat->GetVertOrient() ); - aFrmVertOrient.SetVertOrient( text::VertOrientation::TOP ); - pFormat->SetFormatAttr(aFrmVertOrient); + SwFormatVertOrient aFrameVertOrient( pFormat->GetVertOrient() ); + aFrameVertOrient.SetVertOrient( text::VertOrientation::TOP ); + pFormat->SetFormatAttr(aFrameVertOrient); for ( sal_Int32 i = 0; i < rItem.m_nRows; ++i ) { diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 4f3d186d473b..72533e5f6f1b 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -160,7 +160,7 @@ bool SwDocShell::InsertGeneratedStream(SfxMedium & rMedium, // Prepare loading Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, - SwCrsrShell *pCrsrShell, + SwCursorShell *pCursorShell, SwPaM* pPaM ) { bool bAPICall = false; @@ -189,8 +189,8 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, : SW_STREAM_READER & pRead->GetReaderType() ) { *ppRdr = pPaM ? new SwReader( rMedium, aFileName, *pPaM ) : - pCrsrShell ? - new SwReader( rMedium, aFileName, *pCrsrShell->GetCrsr() ) + pCursorShell ? + new SwReader( rMedium, aFileName, *pCursorShell->GetCursor() ) : new SwReader( rMedium, aFileName, m_pDoc ); } else @@ -368,11 +368,11 @@ bool SwDocShell::Save() } SetError( nErr ? nErr : nVBWarning, OSL_LOG_PREFIX ); - SfxViewFrame *const pFrm = + SfxViewFrame *const pFrame = (m_pWrtShell) ? m_pWrtShell->GetView().GetViewFrame() : nullptr; - if( pFrm ) + if( pFrame ) { - pFrm->GetBindings().SetState(SfxBoolItem(SID_DOC_MODIFIED, false)); + pFrame->GetBindings().SetState(SfxBoolItem(SID_DOC_MODIFIED, false)); } return !IsError( nErr ); } @@ -516,7 +516,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium ) // Increase RSID m_pDoc->setRsid( m_pDoc->getRsid() ); - m_pDoc->cleanupUnoCrsrTable(); + m_pDoc->cleanupUnoCursorTable(); } SetError( nErr ? nErr : nVBWarning, OSL_LOG_PREFIX ); @@ -876,7 +876,7 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const SwNodeIndex aIdx( m_pDoc->GetNodes().GetEndOfExtras(), 1 ); SwContentNode* pNd = m_pDoc->GetNodes().GoNext( &aIdx ); - const SwRect aPageRect = pNd->FindPageFrmRect(); + const SwRect aPageRect = pNd->FindPageFrameRect(); Rectangle aRect(aPageRect.SVRect()); // tdf#81219 sanitize - nobody is interested in a thumbnail where's @@ -963,16 +963,16 @@ void SwDocShell::GetState(SfxItemSet& rSet) // Disable "multiple layout" if ( !bDisable ) { - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this); - while (pTmpFrm) // Look for Preview + SfxViewFrame *pTmpFrame = SfxViewFrame::GetFirst(this); + while (pTmpFrame) // Look for Preview { - if ( dynamic_cast<SwView*>( pTmpFrm->GetViewShell() ) && - static_cast<SwView*>(pTmpFrm->GetViewShell())->GetWrtShell().GetViewOptions()->getBrowseMode() ) + if ( dynamic_cast<SwView*>( pTmpFrame->GetViewShell() ) && + static_cast<SwView*>(pTmpFrame->GetViewShell())->GetWrtShell().GetViewOptions()->getBrowseMode() ) { bDisable = true; break; } - pTmpFrm = SfxViewFrame::GetNext(*pTmpFrm, this); + pTmpFrame = SfxViewFrame::GetNext(*pTmpFrame, this); } } // End of disabled "multiple layout" @@ -1179,7 +1179,7 @@ void SwDocShell::RemoveOLEObjects() // When a document is loaded, SwDoc::PrtOLENotify is called to update // the sizes of math objects. However, for objects that do not have a -// SwFrm at this time, only a flag is set (bIsOLESizeInvalid) and the +// SwFrame at this time, only a flag is set (bIsOLESizeInvalid) and the // size change takes place later, while calculating the layout in the // idle handler. If this document is saved now, it is saved with invalid // sizes. For this reason, the layout has to be calculated before a document is diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 5b2d95aa3b3e..6897ac4a7f71 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -170,16 +170,16 @@ void SwDocShell::ToggleLayoutMode(SwView* pView) if( !GetDoc()->getIDocumentDeviceAccess().getPrinter( false ) ) pView->SetPrinter( GetDoc()->getIDocumentDeviceAccess().getPrinter( false ), SfxPrinterChangeFlags::PRINTER | SfxPrinterChangeFlags::JOBSETUP ); GetDoc()->CheckDefaultPageFormat(); - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, false); - while (pTmpFrm) + SfxViewFrame *pTmpFrame = SfxViewFrame::GetFirst(this, false); + while (pTmpFrame) { - if( pTmpFrm != pView->GetViewFrame() ) + if( pTmpFrame != pView->GetViewFrame() ) { - pTmpFrm->DoClose(); - pTmpFrm = SfxViewFrame::GetFirst(this, false); + pTmpFrame->DoClose(); + pTmpFrame = SfxViewFrame::GetFirst(this, false); } else - pTmpFrm = SfxViewFrame::GetNext(*pTmpFrm, this, false); + pTmpFrame = SfxViewFrame::GetNext(*pTmpFrame, this, false); } pView->GetWrtShell().InvalidateLayout(true); @@ -410,23 +410,23 @@ void SwDocShell::Execute(SfxRequest& rReq) { bool bSet = false; bool bFound = false, bOnly = true; - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this); + SfxViewFrame *pTmpFrame = SfxViewFrame::GetFirst(this); SfxViewShell* pViewShell = SfxViewShell::Current(); SwView* pCurrView = dynamic_cast< SwView *> ( pViewShell ); bool bCurrent = typeid(SwPagePreview) == typeid( pViewShell ); - while( pTmpFrm ) // search Preview + while( pTmpFrame ) // search Preview { - if( typeid(SwView) == typeid( pTmpFrm->GetViewShell()) ) + if( typeid(SwView) == typeid( pTmpFrame->GetViewShell()) ) bOnly = false; - else if( typeid(SwPagePreview) == typeid( pTmpFrm->GetViewShell())) + else if( typeid(SwPagePreview) == typeid( pTmpFrame->GetViewShell())) { - pTmpFrm->GetFrame().Appear(); + pTmpFrame->GetFrame().Appear(); bFound = true; } if( bFound && !bOnly ) break; - pTmpFrm = SfxViewFrame::GetNext(*pTmpFrm, this); + pTmpFrame = SfxViewFrame::GetNext(*pTmpFrame, this); } if( pArgs && SfxItemState::SET == @@ -449,12 +449,12 @@ void SwDocShell::Execute(SfxRequest& rReq) nSlotId = SID_VIEWSHELL2; if( pCurrView && pCurrView->GetDocShell() == this ) - pTmpFrm = pCurrView->GetViewFrame(); + pTmpFrame = pCurrView->GetViewFrame(); else - pTmpFrm = SfxViewFrame::GetFirst( this ); + pTmpFrame = SfxViewFrame::GetFirst( this ); - if (pTmpFrm) - pTmpFrm->GetDispatcher()->Execute( nSlotId, SfxCallMode::ASYNCHRON ); + if (pTmpFrame) + pTmpFrame->GetDispatcher()->Execute( nSlotId, SfxCallMode::ASYNCHRON ); } rReq.SetReturnValue(SfxBoolItem(SID_PRINTPREVIEW, bSet )); @@ -584,7 +584,7 @@ void SwDocShell::Execute(SfxRequest& rReq) SfxViewShell* pViewShell = GetView() ? static_cast<SfxViewShell*>(GetView()) : SfxViewShell::Current(); - SfxViewFrame* pViewFrm = pViewShell->GetViewFrame(); + SfxViewFrame* pViewFrame = pViewShell->GetViewFrame(); SwSrcView* pSrcView = dynamic_cast< SwSrcView *>( pViewShell ); if(!pSrcView) { @@ -603,7 +603,7 @@ void SwDocShell::Execute(SfxRequest& rReq) const SfxFilter* pFlt = GetMedium()->GetFilter(); if(!pFlt || pFlt->GetUserData() != pHtmlFlt->GetUserData()) { - ScopedVclPtrInstance<MessageDialog> aQuery(&pViewFrm->GetWindow(), + ScopedVclPtrInstance<MessageDialog> aQuery(&pViewFrame->GetWindow(), "SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui"); if(RET_YES == aQuery->Execute()) @@ -625,7 +625,7 @@ void SwDocShell::Execute(SfxRequest& rReq) SfxStringItem aName(SID_FILE_NAME, sPath); SfxStringItem aFilter(SID_FILTER_NAME, pHtmlFlt->GetName()); const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>( - pViewFrm->GetDispatcher()->Execute( + pViewFrame->GetDispatcher()->Execute( SID_SAVEASDOC, SfxCallMode::SYNCHRON, &aName, &aFilter, 0L )); if(!pBool || !pBool->GetValue()) break; @@ -665,7 +665,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } } if(nSlot) - pViewFrm->GetDispatcher()->Execute(nSlot, SfxCallMode::SYNCHRON); + pViewFrame->GetDispatcher()->Execute(nSlot, SfxCallMode::SYNCHRON); if(bSetModified) GetDoc()->getIDocumentState().SetModified(); if(pSavePrinter) @@ -673,10 +673,10 @@ void SwDocShell::Execute(SfxRequest& rReq) GetDoc()->getIDocumentDeviceAccess().setPrinter( pSavePrinter, true, true); //pSavePrinter must not be deleted again } - pViewFrm->GetBindings().SetState(SfxBoolItem(SID_SOURCEVIEW, nSlot == SID_VIEWSHELL2)); - pViewFrm->GetBindings().Invalidate( SID_NEWWINDOW ); - pViewFrm->GetBindings().Invalidate( SID_BROWSER_MODE ); - pViewFrm->GetBindings().Invalidate( FN_PRINT_LAYOUT ); + pViewFrame->GetBindings().SetState(SfxBoolItem(SID_SOURCEVIEW, nSlot == SID_VIEWSHELL2)); + pViewFrame->GetBindings().Invalidate( SID_NEWWINDOW ); + pViewFrame->GetBindings().Invalidate( SID_BROWSER_MODE ); + pViewFrame->GetBindings().Invalidate( FN_PRINT_LAYOUT ); } break; case SID_GET_COLORLIST: @@ -1336,8 +1336,8 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie SfxViewShell* pViewShell = GetView() ? static_cast<SfxViewShell*>(GetView()) : SfxViewShell::Current(); - SfxViewFrame* pViewFrm = pViewShell->GetViewFrame(); - pViewFrm->GetDispatcher()->Execute( SID_VIEWSHELL0, SfxCallMode::SYNCHRON ); + SfxViewFrame* pViewFrame = pViewShell->GetViewFrame(); + pViewFrame->GetDispatcher()->Execute( SID_VIEWSHELL0, SfxCallMode::SYNCHRON ); SubInitNew(); @@ -1432,7 +1432,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL, } else { - pReader.reset(new SwReader( aMed, rURL, *m_pWrtShell->GetCrsr() )); + pReader.reset(new SwReader( aMed, rURL, *m_pWrtShell->GetCursor() )); } pRead->GetReaderOpt().SetTextFormats( rOpt.IsTextFormats() ); diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 2dcb6f944397..e29f91098dce 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -127,7 +127,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) case SID_STYLE_APPLY: {// here the template and its family are passed to the StyleBox // so that this family is being showed - if(pShell->IsFrmSelected()) + if(pShell->IsFrameSelected()) { SwFrameFormat* pFormat = pShell->GetSelectedFrameFormat(); if( pFormat ) @@ -143,7 +143,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) } break; case SID_STYLE_FAMILY1: - if( !pShell->IsFrmSelected() ) + if( !pShell->IsFrameSelected() ) { SwCharFormat* pFormat = pShell->GetCurCharFormat(); if(pFormat) @@ -156,7 +156,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) break; case SID_STYLE_FAMILY2: - if(!pShell->IsFrmSelected()) + if(!pShell->IsFrameSelected()) { SwTextFormatColl* pColl = pShell->GetCurTextFormatColl(); if(pColl) @@ -169,15 +169,15 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) nMask = SWSTYLEBIT_HTML; else { - const FrmTypeFlags nSelection = pShell->GetFrmType(nullptr,true); + const FrameTypeFlags nSelection = pShell->GetFrameType(nullptr,true); if(pShell->GetCurTOX()) nMask = SWSTYLEBIT_IDX ; - else if(nSelection & FrmTypeFlags::HEADER || - nSelection & FrmTypeFlags::FOOTER || - nSelection & FrmTypeFlags::TABLE || - nSelection & FrmTypeFlags::FLY_ANY || - nSelection & FrmTypeFlags::FOOTNOTE || - nSelection & FrmTypeFlags::FTNPAGE) + else if(nSelection & FrameTypeFlags::HEADER || + nSelection & FrameTypeFlags::FOOTER || + nSelection & FrameTypeFlags::TABLE || + nSelection & FrameTypeFlags::FLY_ANY || + nSelection & FrameTypeFlags::FOOTNOTE || + nSelection & FrameTypeFlags::FTNPAGE) nMask = SWSTYLEBIT_EXTRA; else nMask = SWSTYLEBIT_TEXT; @@ -196,7 +196,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) else { SwFrameFormat* pFormat = pShell->GetSelectedFrameFormat(); - if(pFormat && pShell->IsFrmSelected()) + if(pFormat && pShell->IsFrameSelected()) { aName = pFormat->GetName(); rSet.Put(SfxTemplateItem(nWhich, aName)); @@ -221,7 +221,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) break; case SID_STYLE_FAMILY5: { - const SwNumRule* pRule = pShell->GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pRule = pShell->GetNumRuleAtCurrCursorPos(); if( pRule ) aName = pRule->GetName(); @@ -237,21 +237,21 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) } break; case SID_STYLE_UPDATE_BY_EXAMPLE: - if( pShell->IsFrmSelected() + if( pShell->IsFrameSelected() ? SFX_STYLE_FAMILY_FRAME != nActualFamily : ( SFX_STYLE_FAMILY_FRAME == nActualFamily || SFX_STYLE_FAMILY_PAGE == nActualFamily || - (SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCrsrPos())) ) + (SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCursorPos())) ) { rSet.DisableItem( nWhich ); } break; case SID_STYLE_NEW_BY_EXAMPLE: - if( (pShell->IsFrmSelected() + if( (pShell->IsFrameSelected() ? SFX_STYLE_FAMILY_FRAME != nActualFamily : SFX_STYLE_FAMILY_FRAME == nActualFamily) || - (SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCrsrPos()) ) + (SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCursorPos()) ) { rSet.DisableItem( nWhich ); } @@ -429,9 +429,9 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) break; case SFX_STYLE_FAMILY_FRAME: { - SwFrameFormat* pFrm = m_pWrtShell->GetSelectedFrameFormat(); - if( pFrm ) - aParam = pFrm->GetName(); + SwFrameFormat* pFrame = m_pWrtShell->GetSelectedFrameFormat(); + if( pFrame ) + aParam = pFrame->GetName(); } break; case SFX_STYLE_FAMILY_CHAR: @@ -936,7 +936,7 @@ sal_uInt16 SwDocShell::ApplyStyles(const OUString &rName, sal_uInt16 nFamily, } case SFX_STYLE_FAMILY_FRAME: { - if ( pSh->IsFrmSelected() ) + if ( pSh->IsFrameSelected() ) pSh->SetFrameFormat( pStyle->GetFrameFormat() ); break; } @@ -1051,21 +1051,21 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw } case SFX_STYLE_FAMILY_FRAME: { - SwFrameFormat* pFrm = pStyle->GetFrameFormat(); - if( pCurrWrtShell->IsFrmSelected() && pFrm && !pFrm->IsDefault() ) + SwFrameFormat* pFrame = pStyle->GetFrameFormat(); + if( pCurrWrtShell->IsFrameSelected() && pFrame && !pFrame->IsDefault() ) { SfxItemSet aSet( GetPool(), aFrameFormatSetRange ); pCurrWrtShell->StartAllAction(); - pCurrWrtShell->GetFlyFrmAttr( aSet ); + pCurrWrtShell->GetFlyFrameAttr( aSet ); // #i105535# // no update of anchor attribute aSet.ClearItem( RES_ANCHOR ); - pFrm->SetFormatAttr( aSet ); + pFrame->SetFormatAttr( aSet ); // also apply template to remove hard set attributes - pCurrWrtShell->SetFrameFormat( pFrm, true ); + pCurrWrtShell->SetFrameFormat( pFrame, true ); pCurrWrtShell->EndAllAction(); } } @@ -1087,7 +1087,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw { const SwNumRule* pCurRule; if( pStyle->GetNumRule() && - nullptr != ( pCurRule = pCurrWrtShell->GetNumRuleAtCurrCrsrPos() )) + nullptr != ( pCurRule = pCurrWrtShell->GetNumRuleAtCurrCursorPos() )) { SwNumRule aRule( *pCurRule ); // #i91400# @@ -1165,20 +1165,20 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily, break; case SFX_STYLE_FAMILY_FRAME: { - SwFrameFormat* pFrm = pStyle->GetFrameFormat(); - if(pCurrWrtShell->IsFrmSelected() && pFrm && !pFrm->IsDefault()) + SwFrameFormat* pFrame = pStyle->GetFrameFormat(); + if(pCurrWrtShell->IsFrameSelected() && pFrame && !pFrame->IsDefault()) { pCurrWrtShell->StartAllAction(); SfxItemSet aSet(GetPool(), aFrameFormatSetRange ); - pCurrWrtShell->GetFlyFrmAttr( aSet ); + pCurrWrtShell->GetFlyFrameAttr( aSet ); SwFrameFormat* pFFormat = pCurrWrtShell->GetSelectedFrameFormat(); - pFrm->SetDerivedFrom( pFFormat ); + pFrame->SetDerivedFrom( pFFormat ); - pFrm->SetFormatAttr( aSet ); + pFrame->SetFormatAttr( aSet ); // also apply template to remove hard set attributes - pCurrWrtShell->SetFrameFormat( pFrm ); + pCurrWrtShell->SetFrameFormat( pFrame ); pCurrWrtShell->EndAllAction(); } } @@ -1225,7 +1225,7 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily, case SFX_STYLE_FAMILY_PSEUDO: { - const SwNumRule* pCurRule = pCurrWrtShell->GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pCurRule = pCurrWrtShell->GetNumRuleAtCurrCursorPos(); if (pCurRule) { diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index b80a68f422e1..5852a6d694ca 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -251,7 +251,7 @@ SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy ) SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), - eMode( rVOpt.GetShdwCrsrFillMode() ) + eMode( rVOpt.GetShdwCursorFillMode() ) ,bOn( rVOpt.IsShadowCursor() ) { @@ -277,7 +277,7 @@ void SwShadowCursorItem::operator=( const SwShadowCursorItem& rCpy ) void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const { rVOpt.SetShadowCursor( bOn ); - rVOpt.SetShdwCrsrFillMode( eMode ); + rVOpt.SetShdwCursorFillMode( eMode ); } #ifdef DBG_UTIL diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index e5d6df837447..cf3970ab9bbb 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -498,7 +498,7 @@ void SwCursorConfig::ImplCommit() switch(nProp) { case 0: pValues[nProp] <<= rParent.IsShadowCursor(); break;// "DirectCursor/UseDirectCursor", - case 1: pValues[nProp] <<= (sal_Int32)rParent.GetShdwCrsrFillMode(); break;// "DirectCursor/Insert", + case 1: pValues[nProp] <<= (sal_Int32)rParent.GetShdwCursorFillMode(); break;// "DirectCursor/Insert", case 2: pValues[nProp] <<= rParent.IsCursorInProtectedArea(); break;// "Option/ProtectedArea" case 3: pValues[nProp] <<= rParent.IsIgnoreProtectedArea(); break; // "Option/IgnoreProtectedArea" } @@ -528,7 +528,7 @@ void SwCursorConfig::Load() switch(nProp) { case 0: rParent.SetShadowCursor(bSet); break;// "DirectCursor/UseDirectCursor", - case 1: rParent.SetShdwCrsrFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert", + case 1: rParent.SetShdwCursorFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert", case 2: rParent.SetCursorInProtectedArea(bSet); break;// "Option/ProtectedArea" case 3: rParent.SetIgnoreProtectedArea(bSet); break; // "Option/IgnoreProtectedArea" } diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 6c8908195441..b40e0fc17c0b 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -158,7 +158,7 @@ SwViewOption::SwViewOption() : mnViewLayoutColumns( 0 ), m_nPagePreviewRow( 1 ), m_nPagePreviewCol( 2 ), - m_nShadowCrsrFillMode( FILL_TAB ), + m_nShadowCursorFillMode( FILL_TAB ), m_bReadonly(false), m_bStarOneSetting(false), m_bIsPagePreview(false), @@ -235,7 +235,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt) m_nCore2Options = rVOpt.m_nCore2Options ; m_aRetouchColor = rVOpt.GetRetoucheColor(); m_sSymbolFont = rVOpt.m_sSymbolFont; - m_nShadowCrsrFillMode = rVOpt.m_nShadowCrsrFillMode; + m_nShadowCursorFillMode = rVOpt.m_nShadowCursorFillMode; m_bStarOneSetting = rVOpt.m_bStarOneSetting; mbBookView = rVOpt.mbBookView; mbBrowseMode = rVOpt.mbBrowseMode; @@ -276,7 +276,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt ) m_nCore2Options = rVOpt.m_nCore2Options; m_aRetouchColor = rVOpt.GetRetoucheColor(); m_sSymbolFont = rVOpt.m_sSymbolFont; - m_nShadowCrsrFillMode = rVOpt.m_nShadowCrsrFillMode; + m_nShadowCursorFillMode = rVOpt.m_nShadowCursorFillMode; m_bStarOneSetting = rVOpt.m_bStarOneSetting; mbBookView = rVOpt.mbBookView; mbBrowseMode = rVOpt.mbBrowseMode; diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index f98896acbfcd..0c0a7c7aaf2d 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1076,11 +1076,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, SfxProgress aProgress(pSourceDocSh, ::aEmptyOUStr, 1); // lock all dispatchers - SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourceDocSh); - while (pViewFrm) + SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst(pSourceDocSh); + while (pViewFrame) { - pViewFrm->GetDispatcher()->Lock(true); - pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourceDocSh); + pViewFrame->GetDispatcher()->Lock(true); + pViewFrame = SfxViewFrame::GetNext(*pViewFrame, pSourceDocSh); } sal_Int32 nDocNo = 1; @@ -1565,11 +1565,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, SWUnoHelper::UCB_DeleteFile( *aFileIter ); // unlock all dispatchers - pViewFrm = SfxViewFrame::GetFirst(pSourceDocSh); - while (pViewFrm) + pViewFrame = SfxViewFrame::GetFirst(pSourceDocSh); + while (pViewFrame) { - pViewFrm->GetDispatcher()->Lock(false); - pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourceDocSh); + pViewFrame->GetDispatcher()->Lock(false); + pViewFrame = SfxViewFrame::GetNext(*pViewFrame, pSourceDocSh); } SW_MOD()->SetView(&pSourceShell->GetView()); diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index 9093b6a5cc24..d78167a6d169 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -226,24 +226,24 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck) m_pSpellState->m_bStartedInSelection = true; } // determine if the selection is outside of the body text - bOtherText = !(pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY); + bOtherText = !(pWrtShell->GetFrameType(nullptr,true) & FrameTypeFlags::BODY); m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY; if(bOtherText) { - m_pSpellState->pOtherCursor = new SwPaM(*pWrtShell->GetCrsr()->GetPoint()); + m_pSpellState->pOtherCursor = new SwPaM(*pWrtShell->GetCursor()->GetPoint()); m_pSpellState->m_bStartedInOther = true; pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR ); } else { - SwPaM* pCrsr = pWrtShell->GetCrsr(); + SwPaM* pCursor = pWrtShell->GetCursor(); // mark the start position only if not at start of doc if(!pWrtShell->IsStartOfDoc()) { m_pSpellState->m_xStartRange = SwXTextRange::CreateXTextRange( *pWrtShell->GetDoc(), - *pCrsr->Start(), pCrsr->End()); + *pCursor->Start(), pCursor->End()); } pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR ); } @@ -323,7 +323,7 @@ The code below would only be part of the solution. if (!m_pSpellState->m_bStartedInSelection) { // find out which text has been spelled body or other - bOtherText = !(pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY); + bOtherText = !(pWrtShell->GetFrameType(nullptr,true) & FrameTypeFlags::BODY); if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor) { m_pSpellState->m_bStartedInOther = false; @@ -541,7 +541,7 @@ void SwSpellDialogChildWindow::GetFocus() case SHELL_MODE_TABLE_TEXT: case SHELL_MODE_TABLE_LIST_TEXT: { - SwPaM* pCursor = pWrtShell->GetCrsr(); + SwPaM* pCursor = pWrtShell->GetCursor(); if(m_pSpellState->m_pPointNode != &pCursor->GetNode() || m_pSpellState->m_pMarkNode != &pCursor->GetNode(false)|| m_pSpellState->m_nPointPos != pCursor->GetPoint()->nContent.GetIndex()|| @@ -598,7 +598,7 @@ void SwSpellDialogChildWindow::LoseFocus() case SHELL_MODE_TABLE_LIST_TEXT: { // store a node pointer and a pam-position to be able to check on next GetFocus(); - SwPaM* pCursor = pWrtShell->GetCrsr(); + SwPaM* pCursor = pWrtShell->GetCursor(); m_pSpellState->m_pPointNode = &pCursor->GetNode(); m_pSpellState->m_pMarkNode = &pCursor->GetNode(false); m_pSpellState->m_nPointPos = pCursor->GetPoint()->nContent.GetIndex(); @@ -670,8 +670,8 @@ bool SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM case SHELL_MODE_FRAME: { - rShell.UnSelectFrm(); - rShell.LeaveSelFrmMode(); + rShell.UnSelectFrame(); + rShell.LeaveSelFrameMode(); rView.AttrChangedNotify(&rShell); } break; diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index 4d632cf70564..207fb5192169 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -77,7 +77,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); - aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); // height=width for more consistent preview (analog to edit region) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); @@ -189,7 +189,7 @@ IMPL_LINK_TYPED( SwWrtShell, InsertRegionDialog, void*, p, void ) SwRect aRect; CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); - aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); // height=width for more consistent preview (analog to edit region) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index da8e5ce86944..075a3c047576 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -370,7 +370,7 @@ bool SwGlossaryHdl::ExpandGlossary() OUString aShortName; // use this at text selection - if(pWrtShell->SwCrsrShell::HasSelection() && !pWrtShell->IsBlockMode()) + if(pWrtShell->SwCursorShell::HasSelection() && !pWrtShell->IsBlockMode()) { aShortName = pWrtShell->GetSelText(); } @@ -620,10 +620,10 @@ void SwGlossaryHdl::GetMacros( const OUString &rShortName, } // ctor, dtor -SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrm, SwWrtShell *pSh) +SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrame, SwWrtShell *pSh) : rStatGlossaries( *::GetGlossaries() ), aCurGrp( SwGlossaries::GetDefName() ), - pViewFrame( pVwFrm ), + pViewFrame( pVwFrame ), pWrtShell( pSh ), pCurGrp( nullptr ) { diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index bff00a0c9519..12d04664d4d4 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -130,7 +130,7 @@ #include <memory> -extern bool g_bFrmDrag; +extern bool g_bFrameDrag; extern bool g_bDDINetAttr; extern bool g_bExecuteDrag; @@ -472,10 +472,10 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo m_pWrtShell->SelectTextAttr( RES_TXTATR_INETFMT ); } } - if( m_pWrtShell->IsFrmSelected() ) + if( m_pWrtShell->IsFrameSelected() ) { SfxItemSet aSet( m_pWrtShell->GetAttrPool(), RES_URL, RES_URL ); - m_pWrtShell->GetFlyFrmAttr( aSet ); + m_pWrtShell->GetFlyFrameAttr( aSet ); const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); if( rURL.GetMap() ) m_pImageMap = new ImageMap( *rURL.GetMap() ); @@ -859,7 +859,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) m_eBufferType = TRNSFR_OLE; } // Is there anything to provide anyway? - else if ( m_pWrtShell->IsSelection() || m_pWrtShell->IsFrmSelected() || + else if ( m_pWrtShell->IsSelection() || m_pWrtShell->IsFrameSelected() || m_pWrtShell->IsObjSelected() ) { std::unique_ptr<SwWait> pWait; @@ -872,8 +872,8 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) // and mouse selection is possible. // In AddMode with keyboard selection, the new cursor is not created // before the cursor is moved after end of selection. - if( m_pWrtShell->IsAddMode() && m_pWrtShell->SwCrsrShell::HasSelection() ) - m_pWrtShell->CreateCrsr(); + if( m_pWrtShell->IsAddMode() && m_pWrtShell->SwCursorShell::HasSelection() ) + m_pWrtShell->CreateCursor(); SwDoc *const pTmpDoc = lcl_GetDoc(*m_pClpDocFac); @@ -989,10 +989,10 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) else nRet = 0; - if( m_pWrtShell->IsFrmSelected() ) + if( m_pWrtShell->IsFrameSelected() ) { SfxItemSet aSet( m_pWrtShell->GetAttrPool(), RES_URL, RES_URL ); - m_pWrtShell->GetFlyFrmAttr( aSet ); + m_pWrtShell->GetFlyFrameAttr( aSet ); const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); if( rURL.GetMap() ) { @@ -1542,9 +1542,9 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, } } - if( !bPasteSelection && rSh.IsFrmSelected() ) + if( !bPasteSelection && rSh.IsFrameSelected() ) { - rSh.EnterSelFrmMode(); + rSh.EnterSelFrameMode(); //force ::SelectShell rSh.GetView().StopShellTimer(); } @@ -1693,11 +1693,11 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, if( pStream && pRead ) { - Link<SwCrsrShell*,void> aOldLink( rSh.GetChgLnk() ); - rSh.SetChgLnk( Link<SwCrsrShell*,void>() ); + Link<SwCursorShell*,void> aOldLink( rSh.GetChgLnk() ); + rSh.SetChgLnk( Link<SwCursorShell*,void>() ); - const SwPosition& rInsPos = *rSh.GetCrsr()->Start(); - SwReader aReader( *pStream, aEmptyOUStr, OUString(), *rSh.GetCrsr() ); + const SwPosition& rInsPos = *rSh.GetCursor()->Start(); + SwReader aReader( *pStream, aEmptyOUStr, OUString(), *rSh.GetCursor() ); rSh.SaveTableBoxContent( &rInsPos ); if( IsError( aReader.Read( *pRead )) ) nResId = STR_ERROR_CLPBRD_READ; @@ -1788,7 +1788,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, if( pRead ) { - SwPaM &rPAM = *rSh.GetCrsr(); + SwPaM &rPAM = *rSh.GetCursor(); SwReader aReader( xStore, aEmptyOUStr, rPAM ); if( !IsError( aReader.Read( *pRead )) ) bRet = true; @@ -1982,7 +1982,7 @@ bool SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, if( rSh.IsObjSelected() ) { rSh.ReplaceSdrObj( sURL, aEmptyOUStr, &aGraphic ); - Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() ); + Point aPt( pPt ? *pPt : rSh.GetCursorDocPos() ); SwTransferable::SetSelInShell( rSh, true, &aPt ); } else @@ -2012,7 +2012,7 @@ bool SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, if( bRet ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); if( aURL.GetURL() != aINetImg.GetTargetURL() || @@ -2021,16 +2021,16 @@ bool SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, aURL.SetURL( aINetImg.GetTargetURL(), false ); aURL.SetTargetFrameName( aINetImg.GetTargetFrame() ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } } return bRet; } -void SwTransferable::SetSelInShell( SwWrtShell& rSh, bool bSelectFrm, +void SwTransferable::SetSelInShell( SwWrtShell& rSh, bool bSelectFrame, const Point* pPt ) { - if( bSelectFrm ) + if( bSelectFrame ) { // select frames/objects if( pPt && !rSh.GetView().GetViewFrame()->GetDispatcher()->IsLocked() ) @@ -2038,27 +2038,27 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, bool bSelectFrm, rSh.GetView().NoRotate(); if( rSh.SelectObj( *pPt )) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode( pPt ); - g_bFrmDrag = true; + rSh.HideCursor(); + rSh.EnterSelFrameMode( pPt ); + g_bFrameDrag = true; } } } else { - if( rSh.IsFrmSelected() || rSh.IsObjSelected() ) + if( rSh.IsFrameSelected() || rSh.IsObjSelected() ) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); - rSh.GetView().GetEditWin().StopInsFrm(); - g_bFrmDrag = false; + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); + rSh.GetView().GetEditWin().StopInsFrame(); + g_bFrameDrag = false; } else if( rSh.GetView().GetDrawFuncPtr() ) - rSh.GetView().GetEditWin().StopInsFrm(); + rSh.GetView().GetEditWin().StopInsFrame(); rSh.EnterStdMode(); if( pPt ) - rSh.SwCrsrShell::SetCrsr( *pPt, true ); + rSh.SwCursorShell::SetCursor( *pPt, true ); } } @@ -2331,7 +2331,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, if( !bRet && SwPasteSdr::SetAttr == nAction && SotClipboardFormatId::SIMPLE_FILE == nFormat && // only at frame selection - rSh.IsFrmSelected() ) + rSh.IsFrameSelected() ) { // then set as hyperlink after the graphic nFormat = SotClipboardFormatId::NETSCAPE_BOOKMARK; @@ -2381,7 +2381,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, rSh.Paste( aGraphic, sURL ); // rSh.ReplaceSdrObj( sURL, aEmptyOUStr, &aGraphic ); - // Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() ); + // Point aPt( pPt ? *pPt : rSh.GetCursorDocPos() ); // SwTransferable::SetSelInShell( rSh, true, &aPt ); } else @@ -2397,14 +2397,14 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, { if( SotClipboardFormatId::NETSCAPE_BOOKMARK == nFormat ) { - if( rSh.IsFrmSelected() ) + if( rSh.IsFrameSelected() ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetURL( aBkmk.GetURL(), false ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } } else if( rSh.IsObjSelected() ) @@ -2458,11 +2458,11 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, aMap.GetIMapObjectCount() ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetMap( &aMap ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); bRet = true; } } @@ -2477,7 +2477,7 @@ bool SwTransferable::_PasteImageMap( TransferableDataHelper& rData, if( rData.HasFormat( SotClipboardFormatId::SVIM )) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); const ImageMap* pOld = aURL.GetMap(); @@ -2488,7 +2488,7 @@ bool SwTransferable::_PasteImageMap( TransferableDataHelper& rData, { aURL.SetMap( &aImageMap ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } bRet = true; } @@ -2518,13 +2518,13 @@ bool SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, case OBJCNT_OLE: { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL2.SetURL( sFile, false ); if( aURL2.GetName().isEmpty() ) aURL2.SetName( sFile ); aSet.Put( aURL2 ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } break; @@ -2612,13 +2612,13 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, case OBJCNT_OLE: { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL2.SetURL( sFile, false ); if( aURL2.GetName().isEmpty() ) aURL2.SetName( sFile ); aSet.Put( aURL2 ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } break; @@ -3047,7 +3047,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) m_eBufferType = TRNSFR_OLE; } //Is there anything to provide anyway? - else if ( m_pWrtShell->IsSelection() || m_pWrtShell->IsFrmSelected() || + else if ( m_pWrtShell->IsSelection() || m_pWrtShell->IsFrameSelected() || m_pWrtShell->IsObjSelected() ) { if( m_pWrtShell->IsObjSelected() ) @@ -3136,10 +3136,10 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) } } - if( m_pWrtShell->IsFrmSelected() ) + if( m_pWrtShell->IsFrameSelected() ) { SfxItemSet aSet( m_pWrtShell->GetAttrPool(), RES_URL, RES_URL ); - m_pWrtShell->GetFlyFrmAttr( aSet ); + m_pWrtShell->GetFlyFrameAttr( aSet ); const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); if( rURL.GetMap() ) { @@ -3165,8 +3165,8 @@ void SwTransferable::StartDrag( vcl::Window* pWin, const Point& rPos ) m_pWrtShell->GetViewOptions()->SetIdle( false ); - if( m_pWrtShell->IsSelFrmMode() ) - m_pWrtShell->ShowCrsr(); + if( m_pWrtShell->IsSelFrameMode() ) + m_pWrtShell->ShowCursor(); SW_MOD()->m_pDragDrop = this; @@ -3196,7 +3196,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction ) m_pWrtShell->DeleteTableSel(); else { - if ( !(m_pWrtShell->IsSelFrmMode() || m_pWrtShell->IsObjSelected()) ) + if ( !(m_pWrtShell->IsSelFrameMode() || m_pWrtShell->IsObjSelected()) ) //SmartCut, take one of the blanks along m_pWrtShell->IntelligentCut( m_pWrtShell->GetSelectionType() ); m_pWrtShell->DelRight(); @@ -3210,16 +3210,16 @@ void SwTransferable::DragFinished( sal_Int8 nAction ) if( ( nsSelectionType::SEL_FRM | nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE | nsSelectionType::SEL_DRW ) & nSelection ) { - m_pWrtShell->EnterSelFrmMode(); + m_pWrtShell->EnterSelFrameMode(); } } } m_pWrtShell->GetView().GetEditWin().DragFinished(); - if( m_pWrtShell->IsSelFrmMode() ) - m_pWrtShell->HideCrsr(); + if( m_pWrtShell->IsSelFrameMode() ) + m_pWrtShell->HideCursor(); else - m_pWrtShell->ShowCrsr(); + m_pWrtShell->ShowCursor(); m_pWrtShell->GetViewOptions()->SetIdle( m_bOldIdle ); } @@ -3254,7 +3254,7 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell ) { // position the cursor again Point aPt( rShell.GetCharRect().Pos() ); - rShell.SwCrsrShell::SetCrsr( aPt, true ); + rShell.SwCursorShell::SetCursor( aPt, true ); } rShell.SetRetainSelection( false ); } @@ -3302,11 +3302,11 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, bool bSttWrd = false; bool bSttPara = false; bool bTableSel = false; - bool bFrmSel = false; + bool bFrameSel = false; SwWrtShell& rSrcSh = *GetShell(); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); if( TRNSFR_INETFLD == m_eBufferType ) { @@ -3319,9 +3319,9 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, // select target graphic if( rSh.SelectObj( rDragPt ) ) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode( &rDragPt ); - g_bFrmDrag = true; + rSh.HideCursor(); + rSh.EnterSelFrameMode( &rDragPt ); + g_bFrameDrag = true; } const int nSelection = rSh.GetSelectionType(); @@ -3330,20 +3330,20 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if( nsSelectionType::SEL_GRF & nSelection ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetURL( aTmp.GetURL(), false ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); return true; } if( nsSelectionType::SEL_DRW & nSelection ) { - rSh.LeaveSelFrmMode(); - rSh.UnSelectFrm(); - rSh.ShowCrsr(); - g_bFrmDrag = false; + rSh.LeaveSelFrameMode(); + rSh.UnSelectFrame(); + rSh.ShowCursor(); + g_bFrameDrag = false; } } } @@ -3361,18 +3361,18 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, //not in selections or selected frames if( rSh.ChgCurrPam( rDragPt ) || - ( rSh.IsSelFrmMode() && rSh.IsInsideSelectedObj( rDragPt )) ) + ( rSh.IsSelFrameMode() && rSh.IsInsideSelectedObj( rDragPt )) ) return false; if( rSrcSh.IsTableMode() ) bTableSel = true; - else if( rSrcSh.IsSelFrmMode() || rSrcSh.IsObjSelected() ) + else if( rSrcSh.IsSelFrameMode() || rSrcSh.IsObjSelected() ) { // don't move position-protected objects! if( bMove && rSrcSh.IsSelObjProtected( FlyProtectFlags::Pos ) != FlyProtectFlags::NONE ) return false; - bFrmSel = true; + bFrameSel = true; } const int nSel = rSrcSh.GetSelectionType(); @@ -3393,10 +3393,10 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if( &rSrcSh != &rSh ) { rSh.EnterStdMode(); - rSh.SwCrsrShell::SetCrsr( rDragPt, true ); + rSh.SwCursorShell::SetCursor( rDragPt, true ); cWord = rSrcSh.IntelligentCut( nSel, false ); } - else if( !bTableSel && !bFrmSel ) + else if( !bTableSel && !bFrameSel ) { if( !rSh.IsAddMode() ) { @@ -3404,15 +3404,15 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if ( rSh.IsBlockMode() ) { // preserve order of cursors for block mode - rSh.GoPrevCrsr(); + rSh.GoPrevCursor(); } - rSh.SwCrsrShell::CreateCrsr(); + rSh.SwCursorShell::CreateCursor(); } - rSh.SwCrsrShell::SetCrsr( rDragPt, true, false ); - rSh.GoPrevCrsr(); + rSh.SwCursorShell::SetCursor( rDragPt, true, false ); + rSh.GoPrevCursor(); cWord = rSh.IntelligentCut( rSh.GetSelectionType(), false ); - rSh.GoNextCrsr(); + rSh.GoNextCursor(); } bInWrd = rSh.IsInWord(); @@ -3427,23 +3427,23 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, { if( &rSrcSh == &rSh ) { - rSh.GoPrevCrsr(); - rSh.SwCrsrShell::SetCrsr( aSttPt, true ); + rSh.GoPrevCursor(); + rSh.SwCursorShell::SetCursor( aSttPt, true ); rSh.SelectTextAttr( RES_TXTATR_INETFMT ); if( rSh.ChgCurrPam( rDragPt ) ) { // don't copy/move inside of yourself - rSh.DestroyCrsr(); + rSh.DestroyCursor(); rSh.EndUndo(); rSh.EndAction(); rSh.EndAction(); return false; } - rSh.GoNextCrsr(); + rSh.GoNextCursor(); } else { - rSrcSh.SwCrsrShell::SetCrsr( aSttPt, true ); + rSrcSh.SwCursorShell::SetCursor( aSttPt, true ); rSrcSh.SelectTextAttr( RES_TXTATR_INETFMT ); } @@ -3453,7 +3453,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, g_bDDINetAttr = true; } - if ( rSrcSh.IsSelFrmMode() ) + if ( rSrcSh.IsSelFrameMode() ) { //Hack: fool the special treatment aSttPt -= aSttPt - rSrcSh.GetObjRect().Pos(); @@ -3465,7 +3465,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if( !bIsXSelection ) { rSrcSh.Push(); - if ( bRet && bMove && !bFrmSel ) + if ( bRet && bMove && !bFrameSel ) { if ( bTableSel ) { @@ -3475,7 +3475,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, else { //SmartCut, take one of the blanks along. - rSh.SwCrsrShell::DestroyCrsr(); + rSh.SwCursorShell::DestroyCursor(); if ( cWord == SwWrtShell::WORD_SPACE_BEFORE ) rSh.ExtendSelection( false ); else if ( cWord == SwWrtShell::WORD_SPACE_AFTER ) @@ -3490,12 +3490,12 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, set cursor to the drop position. */ if( &rSh == &rSrcSh && ( bTableSel || rSh.IsBlockMode() ) ) { - rSrcSh.SwCrsrShell::SetCrsr(rDragPt); - rSrcSh.GetSwCrsr()->SetMark(); + rSrcSh.SwCursorShell::SetCursor(rDragPt); + rSrcSh.GetSwCursor()->SetMark(); } } - if( bRet && !bTableSel && !bFrmSel ) + if( bRet && !bTableSel && !bFrameSel ) { if( (bInWrd || bEndWrd) && (cWord == SwWrtShell::WORD_SPACE_AFTER || @@ -3516,19 +3516,19 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, { if( &rSrcSh == &rSh && !rSh.IsAddMode() ) { - rSh.SwCrsrShell::DestroyCrsr(); - rSh.GoPrevCrsr(); + rSh.SwCursorShell::DestroyCursor(); + rSh.GoPrevCursor(); } else { rSh.SwapPam(); - rSh.SwCrsrShell::ClearMark(); + rSh.SwCursorShell::ClearMark(); } } else { if( rSh.IsAddMode() ) - rSh.SwCrsrShell::CreateCrsr(); + rSh.SwCursorShell::CreateCursor(); else { // turn on selection mode @@ -3538,16 +3538,16 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, } } - if( bRet && bMove && bFrmSel ) - rSrcSh.LeaveSelFrmMode(); + if( bRet && bMove && bFrameSel ) + rSrcSh.LeaveSelFrameMode(); if( rSrcSh.GetDoc() != rSh.GetDoc() ) rSrcSh.EndUndo(); rSh.EndUndo(); // put the shell in the right state - if( &rSrcSh != &rSh && ( rSh.IsFrmSelected() || rSh.IsObjSelected() )) - rSh.EnterSelFrmMode(); + if( &rSrcSh != &rSh && ( rSh.IsFrameSelected() || rSh.IsObjSelected() )) + rSh.EnterSelFrameMode(); rSrcSh.EndAction(); rSh.EndAction(); diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx index 3735ef9217eb..f63b96a9ad77 100644 --- a/sw/source/uibase/docvw/FrameControlsManager.cxx +++ b/sw/source/uibase/docvw/FrameControlsManager.cxx @@ -46,11 +46,11 @@ const SwFrameControlsManager& SwFrameControlsManager::operator=( const SwFrameCo return *this; } -SwFrameControlPtr SwFrameControlsManager::GetControl( FrameControlType eType, const SwFrm* pFrm ) +SwFrameControlPtr SwFrameControlsManager::GetControl( FrameControlType eType, const SwFrame* pFrame ) { SwFrameControlPtrMap& rControls = m_aControls[eType]; - SwFrameControlPtrMap::iterator aIt = rControls.find(pFrm); + SwFrameControlPtrMap::iterator aIt = rControls.find(pFrame); if (aIt != rControls.end()) return aIt->second; @@ -58,22 +58,22 @@ SwFrameControlPtr SwFrameControlsManager::GetControl( FrameControlType eType, co return SwFrameControlPtr(); } -void SwFrameControlsManager::RemoveControls( const SwFrm* pFrm ) +void SwFrameControlsManager::RemoveControls( const SwFrame* pFrame ) { map< FrameControlType, SwFrameControlPtrMap >::iterator pIt = m_aControls.begin(); while ( pIt != m_aControls.end() ) { SwFrameControlPtrMap& rMap = pIt->second; - rMap.erase(pFrm); + rMap.erase(pFrame); ++pIt; } } -void SwFrameControlsManager::RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm ) +void SwFrameControlsManager::RemoveControlsByType( FrameControlType eType, const SwFrame* pFrame ) { SwFrameControlPtrMap& rMap = m_aControls[eType]; - rMap.erase(pFrm); + rMap.erase(pFrame); } void SwFrameControlsManager::HideControls( FrameControlType eType ) @@ -102,7 +102,7 @@ void SwFrameControlsManager::SetReadonlyControls( bool bReadonly ) } } -void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm, FrameControlType eType, Point aOffset ) +void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrame* pPageFrame, FrameControlType eType, Point aOffset ) { OSL_ASSERT( eType == Header || eType == Footer ); @@ -112,21 +112,21 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm, SwFrameControlPtrMap& rControls = m_aControls[eType]; - SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrm); - if (lb != rControls.end() && !(rControls.key_comp()(pPageFrm, lb->first))) + SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrame); + if (lb != rControls.end() && !(rControls.key_comp()(pPageFrame, lb->first))) pControl = lb->second; else { SwFrameControlPtr pNewControl( new SwFrameControl( VclPtr<SwHeaderFooterWin>::Create( - m_pEditWin, pPageFrm, bHeader ).get() ) ); + m_pEditWin, pPageFrame, bHeader ).get() ) ); const SwViewOption* pViewOpt = m_pEditWin->GetView().GetWrtShell().GetViewOptions(); pNewControl->SetReadonly( pViewOpt->IsReadonly() ); - rControls.insert(lb, make_pair(pPageFrm, pNewControl)); + rControls.insert(lb, make_pair(pPageFrame, pNewControl)); pControl.swap( pNewControl ); } - Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrm->Frm().SVRect() ); + Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrame->Frame().SVRect() ); SwHeaderFooterWin* pWin = dynamic_cast<SwHeaderFooterWin *>(pControl->GetWindow()); assert( pWin != nullptr) ; @@ -137,24 +137,24 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm, pControl->ShowAll( true ); } -void SwFrameControlsManager::SetPageBreakControl( const SwPageFrm* pPageFrm ) +void SwFrameControlsManager::SetPageBreakControl( const SwPageFrame* pPageFrame ) { // Check if we already have the control SwFrameControlPtr pControl; SwFrameControlPtrMap& rControls = m_aControls[PageBreak]; - SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrm); - if (lb != rControls.end() && !(rControls.key_comp()(pPageFrm, lb->first))) + SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrame); + if (lb != rControls.end() && !(rControls.key_comp()(pPageFrame, lb->first))) pControl = lb->second; else { SwFrameControlPtr pNewControl( new SwFrameControl( - VclPtr<SwPageBreakWin>::Create( m_pEditWin, pPageFrm ).get() ) ); + VclPtr<SwPageBreakWin>::Create( m_pEditWin, pPageFrame ).get() ) ); const SwViewOption* pViewOpt = m_pEditWin->GetView().GetWrtShell().GetViewOptions(); pNewControl->SetReadonly( pViewOpt->IsReadonly() ); - rControls.insert(lb, make_pair(pPageFrm, pNewControl)); + rControls.insert(lb, make_pair(pPageFrame, pNewControl)); pControl.swap( pNewControl ); } @@ -166,22 +166,22 @@ void SwFrameControlsManager::SetPageBreakControl( const SwPageFrm* pPageFrm ) pControl->ShowAll( true ); } -SwFrameMenuButtonBase::SwFrameMenuButtonBase( SwEditWin* pEditWin, const SwFrm* pFrm ) : +SwFrameMenuButtonBase::SwFrameMenuButtonBase( SwEditWin* pEditWin, const SwFrame* pFrame ) : MenuButton( pEditWin, WB_DIALOGCONTROL ), m_pEditWin( pEditWin ), - m_pFrm( pFrm ) + m_pFrame( pFrame ) { } -const SwPageFrm* SwFrameMenuButtonBase::GetPageFrame() +const SwPageFrame* SwFrameMenuButtonBase::GetPageFrame() { - return static_cast< const SwPageFrm * >( m_pFrm ); + return static_cast< const SwPageFrame * >( m_pFrame ); } void SwFrameMenuButtonBase::dispose() { m_pEditWin.clear(); - m_pFrm = nullptr; + m_pFrame = nullptr; MenuButton::dispose(); } diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 2531c5d8ae5b..18b746b25977 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -124,8 +124,8 @@ namespace } } -SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrm *pFrm, bool bHeader ) : - SwFrameMenuButtonBase( pEditWin, pFrm ), +SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrame *pFrame, bool bHeader ) : + SwFrameMenuButtonBase( pEditWin, pFrame ), m_bIsHeader( bHeader ), m_pPopupMenu( nullptr ), m_pLine( nullptr ), diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 7533bce6aa8a..7a74b1cfa914 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -91,8 +91,8 @@ namespace } } -SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwFrm *pFrm ) : - SwFrameMenuButtonBase( pEditWin, pFrm ), +SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame ) : + SwFrameMenuButtonBase( pEditWin, pFrame ), m_pPopupMenu( nullptr ), m_pLine( nullptr ), m_bIsAppearing( false ), @@ -223,24 +223,24 @@ void SwPageBreakWin::Select( ) { case FN_PAGEBREAK_EDIT: { - const SwLayoutFrm* pBodyFrm = static_cast< const SwLayoutFrm* >( GetPageFrame()->Lower() ); - while ( pBodyFrm && !pBodyFrm->IsBodyFrm() ) - pBodyFrm = static_cast< const SwLayoutFrm* >( pBodyFrm->GetNext() ); + const SwLayoutFrame* pBodyFrame = static_cast< const SwLayoutFrame* >( GetPageFrame()->Lower() ); + while ( pBodyFrame && !pBodyFrame->IsBodyFrame() ) + pBodyFrame = static_cast< const SwLayoutFrame* >( pBodyFrame->GetNext() ); SwEditWin* pEditWin = GetEditWin(); - if ( pBodyFrm ) + if ( pBodyFrame ) { SwWrtShell& rSh = pEditWin->GetView().GetWrtShell(); bool bOldLock = rSh.IsViewLocked(); rSh.LockView( true ); - if ( pBodyFrm->Lower()->IsTabFrm() ) + if ( pBodyFrame->Lower()->IsTabFrame() ) { rSh.Push( ); rSh.ClearMark(); - SwContentFrm *pCnt = const_cast< SwContentFrm* >( pBodyFrm->ContainsContent() ); + SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() ); SwContentNode* pNd = pCnt->GetNode(); rSh.SetSelection( *pNd ); @@ -252,7 +252,7 @@ void SwPageBreakWin::Select( ) } else { - SwContentFrm *pCnt = const_cast< SwContentFrm* >( pBodyFrm->ContainsContent() ); + SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() ); SwContentNode* pNd = pCnt->GetNode(); SwPaM aPaM( *pNd ); @@ -268,13 +268,13 @@ void SwPageBreakWin::Select( ) break; case FN_PAGEBREAK_DELETE: { - const SwLayoutFrm* pBodyFrm = static_cast< const SwLayoutFrm* >( GetPageFrame()->Lower() ); - while ( pBodyFrm && !pBodyFrm->IsBodyFrm() ) - pBodyFrm = static_cast< const SwLayoutFrm* >( pBodyFrm->GetNext() ); + const SwLayoutFrame* pBodyFrame = static_cast< const SwLayoutFrame* >( GetPageFrame()->Lower() ); + while ( pBodyFrame && !pBodyFrame->IsBodyFrame() ) + pBodyFrame = static_cast< const SwLayoutFrame* >( pBodyFrame->GetNext() ); - if ( pBodyFrm ) + if ( pBodyFrame ) { - SwContentFrm *pCnt = const_cast< SwContentFrm* >( pBodyFrm->ContainsContent() ); + SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() ); SwContentNode* pNd = pCnt->GetNode(); pNd->GetDoc()->GetIDocumentUndoRedo( ).StartUndo( UNDO_UI_DELETE_PAGE_BREAK, nullptr ); @@ -330,37 +330,37 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) m_pMousePt = pEvtPt; } - const SwPageFrm* pPageFrm = GetPageFrame(); - const SwFrm* pPrevPage = pPageFrm; + const SwPageFrame* pPageFrame = GetPageFrame(); + const SwFrame* pPrevPage = pPageFrame; do { pPrevPage = pPrevPage->GetPrev(); } - while ( pPrevPage && ( ( pPrevPage->Frm().Top( ) == pPageFrm->Frm().Top( ) ) - || static_cast< const SwPageFrm* >( pPrevPage )->IsEmptyPage( ) ) ); + while ( pPrevPage && ( ( pPrevPage->Frame().Top( ) == pPageFrame->Frame().Top( ) ) + || static_cast< const SwPageFrame* >( pPrevPage )->IsEmptyPage( ) ) ); - Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrm->GetBoundRect(GetEditWin()).SVRect() ); - Rectangle aFrmRect = GetEditWin()->LogicToPixel( pPageFrm->Frm().SVRect() ); + Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrame->GetBoundRect(GetEditWin()).SVRect() ); + Rectangle aFrameRect = GetEditWin()->LogicToPixel( pPageFrame->Frame().SVRect() ); - long nYLineOffset = ( aBoundRect.Top() + aFrmRect.Top() ) / 2; + long nYLineOffset = ( aBoundRect.Top() + aFrameRect.Top() ) / 2; if ( pPrevPage ) { - Rectangle aPrevFrmRect = GetEditWin()->LogicToPixel( pPrevPage->Frm().SVRect() ); - nYLineOffset = ( aPrevFrmRect.Bottom() + aFrmRect.Top() ) / 2; + Rectangle aPrevFrameRect = GetEditWin()->LogicToPixel( pPrevPage->Frame().SVRect() ); + nYLineOffset = ( aPrevFrameRect.Bottom() + aFrameRect.Top() ) / 2; } // Get the page + sidebar coords - long nPgLeft = aFrmRect.Left(); - long nPgRight = aFrmRect.Right(); + long nPgLeft = aFrameRect.Left(); + long nPgRight = aFrameRect.Right(); unsigned long nSidebarWidth = 0; const SwPostItMgr* pPostItMngr = GetEditWin()->GetView().GetWrtShell().GetPostItMgr(); if ( pPostItMngr && pPostItMngr->HasNotes() && pPostItMngr->ShowNotes() ) nSidebarWidth = pPostItMngr->GetSidebarBorderWidth( true ) + pPostItMngr->GetSidebarWidth( true ); - if ( pPageFrm->SidebarPosition( ) == sw::sidebarwindows::SidebarPosition::LEFT ) + if ( pPageFrame->SidebarPosition( ) == sw::sidebarwindows::SidebarPosition::LEFT ) nPgLeft -= nSidebarWidth; - else if ( pPageFrm->SidebarPosition( ) == sw::sidebarwindows::SidebarPosition::RIGHT ) + else if ( pPageFrame->SidebarPosition( ) == sw::sidebarwindows::SidebarPosition::RIGHT ) nPgRight += nSidebarWidth; Size aBtnSize( BUTTON_WIDTH + ARROW_WIDTH, BUTTON_HEIGHT ); diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index e994b3dbac76..d9859402ac1a 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -140,7 +140,7 @@ SwPostItMgr::SwPostItMgr(SwView* pView) , mbDeleteNote(true) , mpAnswer(nullptr) , mbIsShowAnchor( false ) - , mpFrmSidebarWinContainer( nullptr ) + , mpFrameSidebarWinContainer( nullptr ) { if(!mpView->GetDrawView() ) mpView->GetWrtShell().MakeDrawView(); @@ -178,8 +178,8 @@ SwPostItMgr::~SwPostItMgr() delete (*i); mPages.clear(); - delete mpFrmSidebarWinContainer; - mpFrmSidebarWinContainer = nullptr; + delete mpFrameSidebarWinContainer; + mpFrameSidebarWinContainer = nullptr; } void SwPostItMgr::CheckForRemovedPostIts() @@ -1675,7 +1675,7 @@ void SwPostItMgr::PrepareView(bool bIgnoreCount) if (!HasNotes() || bIgnoreCount) { mpWrtShell->StartAllAction(); - SwRootFrm* pLayout = mpWrtShell->GetLayout(); + SwRootFrame* pLayout = mpWrtShell->GetLayout(); if ( pLayout ) SwPostItHelper::setSidebarChanged( pLayout, mpWrtShell->getIDocumentSettingAccess().get( DocumentSettingId::BROWSE_MODE ) ); @@ -1696,16 +1696,16 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel) if (HasNotes() && ShowNotes()) { const Point aPoint = mpEditWin->PixelToLogic(aPointPixel); - const SwRootFrm* pLayout = mpWrtShell->GetLayout(); - SwRect aPageFrm; - const unsigned long nPageNum = SwPostItHelper::getPageInfo( aPageFrm, pLayout, aPoint ); + const SwRootFrame* pLayout = mpWrtShell->GetLayout(); + SwRect aPageFrame; + const unsigned long nPageNum = SwPostItHelper::getPageInfo( aPageFrame, pLayout, aPoint ); if( nPageNum ) { Rectangle aRect; OSL_ENSURE(mPages.size()>nPageNum-1,"SwPostitMgr:: page container size wrong"); aRect = mPages[nPageNum-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT - ? Rectangle(Point(aPageFrm.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrm.Top()),Size(GetSidebarWidth(),aPageFrm.Height())) - : Rectangle( Point(aPageFrm.Right()+GetSidebarBorderWidth(),aPageFrm.Top()) , Size(GetSidebarWidth(),aPageFrm.Height())); + ? Rectangle(Point(aPageFrame.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrame.Top()),Size(GetSidebarWidth(),aPageFrame.Height())) + : Rectangle( Point(aPageFrame.Right()+GetSidebarBorderWidth(),aPageFrame.Top()) , Size(GetSidebarWidth(),aPageFrame.Height())); if (aRect.IsInside(aPoint)) { // we hit the note's sidebar @@ -1770,7 +1770,7 @@ Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const return Rectangle(aPointTop,aSize); } -//IMPORTANT: if you change the rects here, also change SwPageFrm::PaintNotesSidebar() +//IMPORTANT: if you change the rects here, also change SwPageFrame::PaintNotesSidebar() bool SwPostItMgr::ScrollbarHit(const unsigned long aPage,const Point &aPoint) { SwRect aPageRect = mPages[aPage-1]->mPageRect; @@ -2109,10 +2109,10 @@ void SwPostItMgr::AssureStdModeAtShell() mpWrtShell->LockView( bLockView ); } - if( mpWrtShell->IsSelFrmMode() || mpWrtShell->IsObjSelected()) + if( mpWrtShell->IsSelFrameMode() || mpWrtShell->IsObjSelected()) { - mpWrtShell->UnSelectFrm(); - mpWrtShell->LeaveSelFrmMode(); + mpWrtShell->UnSelectFrame(); + mpWrtShell->LeaveSelFrameMode(); mpWrtShell->GetView().LeaveDrawCreate(); mpWrtShell->EnterStdMode(); @@ -2172,16 +2172,16 @@ void SwPostItMgr::ToggleInsModeOnActiveSidebarWin() } } -void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm, +void SwPostItMgr::ConnectSidebarWinToFrame( const SwFrame& rFrame, const SwFormatField& rFormatField, SwSidebarWin& rSidebarWin ) { - if ( mpFrmSidebarWinContainer == nullptr ) + if ( mpFrameSidebarWinContainer == nullptr ) { - mpFrmSidebarWinContainer = new SwFrmSidebarWinContainer(); + mpFrameSidebarWinContainer = new SwFrameSidebarWinContainer(); } - const bool bInserted = mpFrmSidebarWinContainer->insert( rFrm, rFormatField, rSidebarWin ); + const bool bInserted = mpFrameSidebarWinContainer->insert( rFrame, rFormatField, rSidebarWin ); if ( bInserted && mpWrtShell->GetAccessibleMap() ) { @@ -2189,12 +2189,12 @@ void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm, } } -void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm, +void SwPostItMgr::DisconnectSidebarWinFromFrame( const SwFrame& rFrame, SwSidebarWin& rSidebarWin ) { - if ( mpFrmSidebarWinContainer != nullptr ) + if ( mpFrameSidebarWinContainer != nullptr ) { - const bool bRemoved = mpFrmSidebarWinContainer->remove( rFrm, rSidebarWin ); + const bool bRemoved = mpFrameSidebarWinContainer->remove( rFrame, rSidebarWin ); if ( bRemoved && mpWrtShell->GetAccessibleMap() ) { @@ -2203,37 +2203,37 @@ void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm, } } -bool SwPostItMgr::HasFrmConnectedSidebarWins( const SwFrm& rFrm ) +bool SwPostItMgr::HasFrameConnectedSidebarWins( const SwFrame& rFrame ) { bool bRet( false ); - if ( mpFrmSidebarWinContainer != nullptr ) + if ( mpFrameSidebarWinContainer != nullptr ) { - bRet = !mpFrmSidebarWinContainer->empty( rFrm ); + bRet = !mpFrameSidebarWinContainer->empty( rFrame ); } return bRet; } -vcl::Window* SwPostItMgr::GetSidebarWinForFrmByIndex( const SwFrm& rFrm, +vcl::Window* SwPostItMgr::GetSidebarWinForFrameByIndex( const SwFrame& rFrame, const sal_Int32 nIndex ) { vcl::Window* pSidebarWin( nullptr ); - if ( mpFrmSidebarWinContainer != nullptr ) + if ( mpFrameSidebarWinContainer != nullptr ) { - pSidebarWin = mpFrmSidebarWinContainer->get( rFrm, nIndex ); + pSidebarWin = mpFrameSidebarWinContainer->get( rFrame, nIndex ); } return pSidebarWin; } -void SwPostItMgr::GetAllSidebarWinForFrm( const SwFrm& rFrm, +void SwPostItMgr::GetAllSidebarWinForFrame( const SwFrame& rFrame, std::vector< vcl::Window* >* pChildren ) { - if ( mpFrmSidebarWinContainer != nullptr ) + if ( mpFrameSidebarWinContainer != nullptr ) { - mpFrmSidebarWinContainer->getAll( rFrm, pChildren ); + mpFrameSidebarWinContainer->getAll( rFrame, pChildren ); } } diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index fc4c79091848..c0ec62d1acd5 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -187,7 +187,7 @@ SwSidebarWin::SwSidebarWin(SwEditWin& rEditWin, , mbReadonly(false) , mbIsFollow(false) , mrSidebarItem(rSidebarItem) - , mpAnchorFrm(rSidebarItem.maLayoutInfo.mpAnchorFrm) + , mpAnchorFrame(rSidebarItem.maLayoutInfo.mpAnchorFrame) { mpShadow = ShadowOverlayObject::CreateShadowOverlayObject( mrView ); if ( mpShadow ) @@ -195,7 +195,7 @@ SwSidebarWin::SwSidebarWin(SwEditWin& rEditWin, mpShadow->setVisible(false); } - mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + mrMgr.ConnectSidebarWinToFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), mrSidebarItem.GetFormatField(), *this ); } @@ -210,7 +210,7 @@ void SwSidebarWin::dispose() if (IsDisposed()) return; - mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + mrMgr.DisconnectSidebarWinFromFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), *this ); Disable(); @@ -898,29 +898,29 @@ void SwSidebarWin::SetPosAndSize() SwNodes& rNds = pTextNode->GetDoc()->GetNodes(); SwContentNode* const pContentNd = rNds[mrSidebarItem.maLayoutInfo.mnStartNodeIdx]->GetContentNode(); SwPosition aStartPos( *pContentNd, mrSidebarItem.maLayoutInfo.mnStartContent ); - SwShellCrsr* pTmpCrsr = nullptr; - const bool bTableCrsrNeeded = pTextNode->FindTableBoxStartNode() != pContentNd->FindTableBoxStartNode(); - if ( bTableCrsrNeeded ) + SwShellCursor* pTmpCursor = nullptr; + const bool bTableCursorNeeded = pTextNode->FindTableBoxStartNode() != pContentNd->FindTableBoxStartNode(); + if ( bTableCursorNeeded ) { - SwShellTableCrsr* pTableCrsr = new SwShellTableCrsr( DocView().GetWrtShell(), aStartPos ); - pTableCrsr->SetMark(); - pTableCrsr->GetMark()->nNode = *pTextNode; - pTableCrsr->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); - pTableCrsr->NewTableSelection(); - pTmpCrsr = pTableCrsr; + SwShellTableCursor* pTableCursor = new SwShellTableCursor( DocView().GetWrtShell(), aStartPos ); + pTableCursor->SetMark(); + pTableCursor->GetMark()->nNode = *pTextNode; + pTableCursor->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); + pTableCursor->NewTableSelection(); + pTmpCursor = pTableCursor; } else { - SwShellCrsr* pCrsr = new SwShellCrsr( DocView().GetWrtShell(), aStartPos ); - pCrsr->SetMark(); - pCrsr->GetMark()->nNode = *pTextNode; - pCrsr->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); - pTmpCrsr = pCrsr; + SwShellCursor* pCursor = new SwShellCursor( DocView().GetWrtShell(), aStartPos ); + pCursor->SetMark(); + pCursor->GetMark()->nNode = *pTextNode; + pCursor->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); + pTmpCursor = pCursor; } - std::unique_ptr<SwShellCrsr> pTmpCrsrForAnnotationTextRange( pTmpCrsr ); + std::unique_ptr<SwShellCursor> pTmpCursorForAnnotationTextRange( pTmpCursor ); - pTmpCrsrForAnnotationTextRange->FillRects(); - SwRects* pRects(pTmpCrsrForAnnotationTextRange.get()); + pTmpCursorForAnnotationTextRange->FillRects(); + SwRects* pRects(pTmpCursorForAnnotationTextRange.get()); for( size_t a(0); a < pRects->size(); ++a ) { const SwRect aNextRect((*pRects)[a]); @@ -1583,7 +1583,7 @@ void SwSidebarWin::SwitchToFieldPos() GotoPos(); sal_uInt32 aCount = MoveCaret(); if (aCount) - mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0); + mrView.GetDocShell()->GetWrtShell()->SwCursorShell::Right(aCount, 0); GrabFocusToDocument(); } @@ -1616,14 +1616,14 @@ bool SwSidebarWin::IsScrollbarVisible() const void SwSidebarWin::ChangeSidebarItem( SwSidebarItem& rSidebarItem ) { - const bool bAnchorChanged = mpAnchorFrm != rSidebarItem.maLayoutInfo.mpAnchorFrm; + const bool bAnchorChanged = mpAnchorFrame != rSidebarItem.maLayoutInfo.mpAnchorFrame; if ( bAnchorChanged ) { - mrMgr.DisconnectSidebarWinFromFrm( *(mpAnchorFrm), *this ); + mrMgr.DisconnectSidebarWinFromFrame( *(mpAnchorFrame), *this ); } mrSidebarItem = rSidebarItem; - mpAnchorFrm = mrSidebarItem.maLayoutInfo.mpAnchorFrm; + mpAnchorFrame = mrSidebarItem.maLayoutInfo.mpAnchorFrame; if ( GetWindowPeer() ) { @@ -1636,7 +1636,7 @@ void SwSidebarWin::ChangeSidebarItem( SwSidebarItem& rSidebarItem ) if ( bAnchorChanged ) { - mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + mrMgr.ConnectSidebarWinToFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), mrSidebarItem.GetFormatField(), *this ); } diff --git a/sw/source/uibase/docvw/SidebarWinAcc.cxx b/sw/source/uibase/docvw/SidebarWinAcc.cxx index 842489ede79f..2fefb0754f98 100644 --- a/sw/source/uibase/docvw/SidebarWinAcc.cxx +++ b/sw/source/uibase/docvw/SidebarWinAcc.cxx @@ -34,10 +34,10 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent public: explicit SidebarWinAccessibleContext( SwSidebarWin& rSidebarWin, SwViewShell& rViewShell, - const SwFrm* pAnchorFrm ) + const SwFrame* pAnchorFrame ) : VCLXAccessibleComponent( rSidebarWin.GetWindowPeer() ) , mrViewShell( rViewShell ) - , mpAnchorFrm( pAnchorFrm ) + , mpAnchorFrame( pAnchorFrame ) , maMutex() { rSidebarWin.SetAccessibleRole( css::accessibility::AccessibleRole::COMMENT ); @@ -46,11 +46,11 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent virtual ~SidebarWinAccessibleContext() {} - void ChangeAnchor( const SwFrm* pAnchorFrm ) + void ChangeAnchor( const SwFrame* pAnchorFrame ) { osl::MutexGuard aGuard(maMutex); - mpAnchorFrm = pAnchorFrm; + mpAnchorFrame = pAnchorFrame; } virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL @@ -60,10 +60,10 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent css::uno::Reference< css::accessibility::XAccessible > xAccParent; - if ( mpAnchorFrm && + if ( mpAnchorFrame && mrViewShell.GetAccessibleMap() ) { - xAccParent = mrViewShell.GetAccessibleMap()->GetContext( mpAnchorFrm, false ); + xAccParent = mrViewShell.GetAccessibleMap()->GetContext( mpAnchorFrame, false ); } return xAccParent; @@ -75,10 +75,10 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent sal_Int32 nIndex( -1 ); - if ( mpAnchorFrm && GetWindow() && + if ( mpAnchorFrame && GetWindow() && mrViewShell.GetAccessibleMap() ) { - nIndex = mrViewShell.GetAccessibleMap()->GetChildIndex( *mpAnchorFrm, + nIndex = mrViewShell.GetAccessibleMap()->GetChildIndex( *mpAnchorFrame, *GetWindow() ); } @@ -87,7 +87,7 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent private: SwViewShell& mrViewShell; - const SwFrm* mpAnchorFrm; + const SwFrame* mpAnchorFrame; ::osl::Mutex maMutex; }; @@ -99,7 +99,7 @@ SidebarWinAccessible::SidebarWinAccessible( SwSidebarWin& rSidebarWin, : VCLXWindow() , mrSidebarWin( rSidebarWin ) , mrViewShell( rViewShell ) - , mpAnchorFrm( rSidebarItem.maLayoutInfo.mpAnchorFrm ) + , mpAnchorFrame( rSidebarItem.maLayoutInfo.mpAnchorFrame ) , bAccContextCreated( false ) { SetWindow( &mrSidebarWin ); @@ -121,7 +121,7 @@ void SidebarWinAccessible::ChangeSidebarItem( const SwSidebarItem& rSidebarItem dynamic_cast<SidebarWinAccessibleContext*>(xAcc.get()); if ( pAccContext ) { - pAccContext->ChangeAnchor( rSidebarItem.maLayoutInfo.mpAnchorFrm ); + pAccContext->ChangeAnchor( rSidebarItem.maLayoutInfo.mpAnchorFrame ); } } } @@ -132,7 +132,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SidebarWinAccessib SidebarWinAccessibleContext* pAccContext = new SidebarWinAccessibleContext( mrSidebarWin, mrViewShell, - mpAnchorFrm ); + mpAnchorFrame ); css::uno::Reference< css::accessibility::XAccessibleContext > xAcc( pAccContext ); bAccContextCreated = true; return xAcc; diff --git a/sw/source/uibase/docvw/SidebarWinAcc.hxx b/sw/source/uibase/docvw/SidebarWinAcc.hxx index ed0a55402fff..7f1ae0fb9fbb 100644 --- a/sw/source/uibase/docvw/SidebarWinAcc.hxx +++ b/sw/source/uibase/docvw/SidebarWinAcc.hxx @@ -24,7 +24,7 @@ class SwViewShell; class SwSidebarItem; -class SwFrm; +class SwFrame; namespace sw { namespace sidebarwindows { @@ -46,7 +46,7 @@ class SidebarWinAccessible : public VCLXWindow private: SwSidebarWin& mrSidebarWin; SwViewShell& mrViewShell; - const SwFrm* mpAnchorFrm; + const SwFrame* mpAnchorFrame; bool bAccContextCreated; }; diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 1a44f865795a..d95c4c81cf2f 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star; // no include "dbgoutsw.hxx" here!!!!!! extern bool g_bNoInterrupt; -extern bool g_bFrmDrag; +extern bool g_bFrameDrag; extern bool g_bDDTimerStarted; bool g_bExecuteDrag = false; @@ -61,7 +61,7 @@ void SwEditWin::StopDDTimer(SwWrtShell *pSh, const Point &rPt) { m_aTimer.Stop(); g_bDDTimerStarted = false; - if(!pSh->IsSelFrmMode()) + if(!pSh->IsSelFrameMode()) pSh->CallSetCursor(&rPt, false); m_aTimer.SetTimeoutHdl(LINK(this,SwEditWin, TimerHandler)); } @@ -87,7 +87,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, true, true)) //We are not selecting and aren't at a selection bStart = true; - else if ( !g_bFrmDrag && rSh.IsSelFrmMode() && + else if ( !g_bFrameDrag && rSh.IsSelFrameMode() && rSh.IsInsideSelectedObj( aDocPos ) ) { //We are not dragging internally and are not at an @@ -95,7 +95,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) bStart = true; } - else if( !g_bFrmDrag && m_rView.GetDocShell()->IsReadOnly() && + else if( !g_bFrameDrag && m_rView.GetDocShell()->IsReadOnly() && OBJCNT_NONE != rSh.GetObjCntType( aDocPos, pObj )) { rSh.LockPaint(); @@ -115,7 +115,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) { m_bMBPressed = false; ReleaseMouse(); - g_bFrmDrag = false; + g_bFrameDrag = false; g_bExecuteDrag = true; SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); @@ -123,7 +123,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) StartExecuteDrag(); if( bDelSelect ) { - rSh.UnSelectFrm(); + rSh.UnSelectFrame(); rSh.UnlockPaint(); } } @@ -165,7 +165,7 @@ void SwEditWin::DropCleanup() if ( m_pUserMarker ) CleanupDropUserMarker(); else - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); } @@ -395,9 +395,9 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) //Drawing objects in Headers/Footers are not allowed SwWrtShell *pSrcSh = pMod->m_pDragDrop->GetShell(); - if( (pSrcSh->GetSelFrmType() == FrmTypeFlags::DRAWOBJ) && + if( (pSrcSh->GetSelFrameType() == FrameTypeFlags::DRAWOBJ) && pSrcSh->IsSelContainsControl() && - (rSh.GetFrmType( &aDocPt, false ) & (FrmTypeFlags::HEADER|FrmTypeFlags::FOOTER)) ) + (rSh.GetFrameType( &aDocPt, false ) & (FrameTypeFlags::HEADER|FrameTypeFlags::FOOTER)) ) { bCleanup = true; } @@ -418,7 +418,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) if ( bCleanup ) { CleanupDropUserMarker(); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); return DND_ACTION_NONE; } } @@ -449,11 +449,11 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) CleanupDropUserMarker(); SwContentAtPos aCont( SwContentAtPos::SW_CONTENT_CHECK ); if(rSh.GetContentAtPos(aDocPt, aCont)) - rSh.SwCrsrShell::SetVisCrsr( aDocPt ); + rSh.SwCursorShell::SetVisibleCursor( aDocPt ); } else { - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); if ( m_pUserMarkerObj != pObj ) { @@ -470,7 +470,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) } CleanupDropUserMarker(); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); return DND_ACTION_NONE; } @@ -481,7 +481,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, DDHandler, Timer *, void) m_aTimer.SetTimeout(240); m_bMBPressed = false; ReleaseMouse(); - g_bFrmDrag = false; + g_bFrameDrag = false; if ( m_rView.GetViewFrame() ) { diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index f3b0fe3554a8..277934b50b28 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -172,8 +172,8 @@ extern bool g_bNoInterrupt; // in mainwn.cxx // To resolve this g_bHoldSelection is set in Down at evaluated in Up. static bool g_bHoldSelection = false; -bool g_bFrmDrag = false; -bool g_bValidCrsrPos = false; +bool g_bFrameDrag = false; +bool g_bValidCursorPos = false; bool g_bModePushed = false; bool g_bDDTimerStarted = false; bool g_bFlushCharBuffer = false; @@ -374,7 +374,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) m_pUserMarker = nullptr; } - rSh.SwCrsrShell::SetVisCrsr( rLPt ); + rSh.SwCursorShell::SetVisibleCursor( rLPt ); } SetPointer( eStyle ); return; @@ -427,7 +427,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) bool bHitHandle = false; bool bCntAtPos = false; bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); m_aActHitType = SDRHIT_NONE; PointerStyle eStyle = PointerStyle::Text; if ( !pSdrView ) @@ -491,7 +491,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) // (i.e., position is not protected). bool bMovable = (!bNotInSelObj) && - (rSh.IsObjSelected() || rSh.IsFrmSelected()) && + (rSh.IsObjSelected() || rSh.IsFrameSelected()) && (rSh.IsSelObjProtected(FlyProtectFlags::Pos) == FlyProtectFlags::NONE); SdrObject* pSelectableObj = rSh.GetObjAt(rLPt); @@ -504,7 +504,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) } else { - if ( rSh.IsFrmSelected() && !bNotInSelObj ) + if ( rSh.IsFrameSelected() && !bNotInSelObj ) { // dvo: this branch appears to be dead and should be // removed in a future version. Reason: The condition @@ -567,8 +567,8 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) if ( aSwContentAtPos.pFndTextAttr != nullptr && aSwContentAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD) { - const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : nullptr; - if (!(pCrsrField && pCrsrField == aSwContentAtPos.pFndTextAttr->GetFormatField().GetField())) + const SwField *pCursorField = rSh.CursorInsideInputField() ? rSh.GetCurField( true ) : nullptr; + if (!(pCursorField && pCursorField == aSwContentAtPos.pFndTextAttr->GetFormatField().GetField())) eStyle = PointerStyle::RefHand; } } @@ -619,7 +619,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, TimerHandler, Timer *, void) m_rView.Scroll( Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll); bDone = true; } - else if ( g_bFrmDrag ) + else if ( g_bFrameDrag ) { rSh.Drag(&aModPt, false); bDone = true; @@ -627,7 +627,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, TimerHandler, Timer *, void) if ( !bDone ) aModPt = rSh.GetContentPos( aModPt,aModPt.Y() > rSh.VisArea().Bottom() ); } - if ( !bDone && !(g_bFrmDrag || m_bInsDraw) ) + if ( !bDone && !(g_bFrameDrag || m_bInsDraw) ) { if ( m_pRowColumnSelectionStart ) { @@ -676,7 +676,7 @@ void SwEditWin::LeaveArea(const Point &rPos) JustifyAreaTimer(); if( !m_aTimer.IsActive() ) m_aTimer.Start(); - delete m_pShadCrsr, m_pShadCrsr = nullptr; + delete m_pShadCursor, m_pShadCursor = nullptr; } inline void SwEditWin::EnterArea() @@ -687,11 +687,11 @@ inline void SwEditWin::EnterArea() /** * Insert mode for frames */ -void SwEditWin::InsFrm(sal_uInt16 nCols) +void SwEditWin::InsFrame(sal_uInt16 nCols) { StdDrawMode( OBJ_NONE, false ); - m_bInsFrm = true; - m_nInsFrmColCount = nCols; + m_bInsFrame = true; + m_nInsFrameColCount = nCols; } void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, bool bObjSelect ) @@ -709,11 +709,11 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, bool bObjSelect ) m_rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT ); else m_rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< sal_uInt16 >(eSdrObjectKind) ); - m_bInsFrm = false; - m_nInsFrmColCount = 1; + m_bInsFrame = false; + m_nInsFrameColCount = 1; } -void SwEditWin::StopInsFrm() +void SwEditWin::StopInsFrame() { if (m_rView.GetDrawFuncPtr()) { @@ -721,18 +721,18 @@ void SwEditWin::StopInsFrm() m_rView.SetDrawFuncPtr(nullptr); } m_rView.LeaveDrawCreate(); // leave construction mode - m_bInsFrm = false; - m_nInsFrmColCount = 1; + m_bInsFrame = false; + m_nInsFrameColCount = 1; } -bool SwEditWin::IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCrsr ) +bool SwEditWin::IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCursor ) { const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions(); if ( !rCTLOptions.IsCTLFontEnabled() || !rCTLOptions.IsCTLSequenceChecking() ) return false; - if ( 0 == rCrsr.Start()->nContent.GetIndex() ) /* first char needs not to be checked */ + if ( 0 == rCursor.Start()->nContent.GetIndex() ) /* first char needs not to be checked */ return false; SwBreakIt *pBreakIter = SwBreakIt::Get(); @@ -856,7 +856,7 @@ void SwEditWin::FlushInBuffer() pCheckIt = new SwCheckIt; uno::Reference < i18n::XExtendedInputSequenceChecker > xISC = pCheckIt->xCheck; - if ( xISC.is() && IsInputSequenceCheckingRequired( m_aInBuffer, *rSh.GetCrsr() ) ) + if ( xISC.is() && IsInputSequenceCheckingRequired( m_aInBuffer, *rSh.GetCursor() ) ) { // apply (Thai) input sequence checking/correction @@ -866,11 +866,11 @@ void SwEditWin::FlushInBuffer() // get text from the beginning (i.e left side) of current selection // to the start of the paragraph rSh.NormalizePam(); // make point be the first (left) one - if (!rSh.GetCrsr()->HasMark()) - rSh.GetCrsr()->SetMark(); - rSh.GetCrsr()->GetMark()->nContent = 0; + if (!rSh.GetCursor()->HasMark()) + rSh.GetCursor()->SetMark(); + rSh.GetCursor()->GetMark()->nContent = 0; - const OUString aOldText( rSh.GetCrsr()->GetText() ); + const OUString aOldText( rSh.GetCursor()->GetText() ); const sal_Int32 nOldLen = aOldText.getLength(); SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions(); @@ -938,14 +938,14 @@ void SwEditWin::FlushInBuffer() // if text prior to the original selection needs to be changed // as well, we now expand the selection accordingly. - SwPaM &rCrsr = *rSh.GetCrsr(); - const sal_Int32 nCrsrStartPos = rCrsr.Start()->nContent.GetIndex(); - OSL_ENSURE( nCrsrStartPos >= nExpandSelection, "cannot expand selection as specified!!" ); - if (nExpandSelection && nCrsrStartPos >= nExpandSelection) + SwPaM &rCursor = *rSh.GetCursor(); + const sal_Int32 nCursorStartPos = rCursor.Start()->nContent.GetIndex(); + OSL_ENSURE( nCursorStartPos >= nExpandSelection, "cannot expand selection as specified!!" ); + if (nExpandSelection && nCursorStartPos >= nExpandSelection) { - if (!rCrsr.HasMark()) - rCrsr.SetMark(); - rCrsr.Start()->nContent -= nExpandSelection; + if (!rCursor.HasMark()) + rCursor.SetMark(); + rCursor.Start()->nContent -= nExpandSelection; } } @@ -1006,7 +1006,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) RES_COL, RES_COL, RES_PROTECT, RES_PROTECT, RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW, 0); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); Size aSnap; bool bHuge(MOVE_LEFT_HUGE == nDir || @@ -1160,7 +1160,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) } rSh.StartAllAction(); if( bSet ) - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); bool bSetPos = (FLY_AS_CHAR != eAnchorId); if(bSetPos && bWeb) { @@ -1262,7 +1262,7 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir ) { // Check if object is anchored as character and move direction bool bDummy1, bDummy2; - const bool bVertAnchor = rSh.IsFrmVertical( true, bDummy1, bDummy2 ); + const bool bVertAnchor = rSh.IsFrameVertical( true, bDummy1, bDummy2 ); bool bHoriMove = !bVertAnchor == !( nDir % 2 ); bool bMoveAllowed = !bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR); @@ -1352,7 +1352,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) else if ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE && rSh.IsHeaderFooterEdit( ) ) { - bool bHeader = bool(FrmTypeFlags::HEADER & rSh.GetFrmType(nullptr,false)); + bool bHeader = bool(FrameTypeFlags::HEADER & rSh.GetFrameType(nullptr,false)); if ( bHeader ) rSh.SttPg(); else @@ -1366,11 +1366,11 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) // running on a document, no order is being taken return; - delete m_pShadCrsr, m_pShadCrsr = nullptr; + delete m_pShadCursor, m_pShadCursor = nullptr; m_aKeyInputFlushTimer.Stop(); bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); //if the language changes the buffer must be flushed LanguageType eNewLanguage = GetInputLanguage(); @@ -1395,9 +1395,9 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) return; // Event evaluated by SdrView } - if ( m_rView.GetDrawFuncPtr() && m_bInsFrm ) + if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) { - StopInsFrm(); + StopInsFrame(); rSh.Edit(); } @@ -1415,7 +1415,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) } else { - SwRootFrm* pLayout = GetView().GetDocShell()->GetWrtShell()->GetLayout(); + SwRootFrame* pLayout = GetView().GetDocShell()->GetWrtShell()->GetLayout(); pLayout->dumpAsXml( ); return; } @@ -1423,7 +1423,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) KeyEvent aKeyEvent( rKEvt ); // look for vertical mappings - if( !bIsDocReadOnly && !rSh.IsSelFrmMode() && !rSh.IsObjSelected() ) + if( !bIsDocReadOnly && !rSh.IsSelFrameMode() && !rSh.IsObjSelected() ) { // must changed from switch to if, because the Linux // compiler has problem with the code. Has to remove if the new general @@ -1440,10 +1440,10 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) // 2. Exception: For a table cursor in a vertical table, the // directions should always be mapped. const bool bVertText = rSh.IsInVerticalText(); - const bool bTableCrsr = rSh.GetTableCrsr(); + const bool bTableCursor = rSh.GetTableCursor(); const bool bVertTable = rSh.IsTableVertical(); - if( ( bVertText && ( !bTableCrsr || bVertTable ) ) || - ( bTableCrsr && bVertTable ) ) + if( ( bVertText && ( !bTableCursor || bVertTable ) ) || + ( bTableCursor && bVertTable ) ) { // Attempt to integrate cursor travelling for mongolian layout does not work. // Thus, back to previous mapping of cursor keys to direction keys. @@ -1841,7 +1841,7 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KEY_DELETE: - if ( !rSh.HasReadonlySel() || rSh.CrsrInsideInputField()) + if ( !rSh.HasReadonlySel() || rSh.CursorInsideInputField()) { if (rSh.IsInFrontOfLabel() && rSh.NumOrNoNum()) eKeyState = KS_NumOrNoNum; @@ -1878,7 +1878,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KEY_RETURN: { if ( !rSh.HasReadonlySel() - && !rSh.CrsrInsideInputField() ) + && !rSh.CursorInsideInputField() ) { const int nSelectionType = rSh.GetSelectionType(); if(nSelectionType & nsSelectionType::SEL_OLE) @@ -1895,8 +1895,8 @@ KEYINPUT_CHECKTABLE_INSDEL: //RETURN and empty paragraph in numbering -> end numbering else if( m_aInBuffer.isEmpty() && - rSh.GetNumRuleAtCurrCrsrPos() && - !rSh.GetNumRuleAtCurrCrsrPos()->IsOutlineRule() && + rSh.GetNumRuleAtCurrCursorPos() && + !rSh.GetNumRuleAtCurrCursorPos()->IsOutlineRule() && !rSh.HasSelection() && rSh.IsSttPara() && rSh.IsEndPara() ) eKeyState = KS_NumOff, eNextKeyState = KS_OutlineLvOff; @@ -1917,8 +1917,8 @@ KEYINPUT_CHECKTABLE_INSDEL: { if ( !rSh.HasReadonlySel() && !rSh.IsSttPara() - && rSh.GetNumRuleAtCurrCrsrPos() - && !rSh.CrsrInsideInputField() ) + && rSh.GetNumRuleAtCurrCursorPos() + && !rSh.CursorInsideInputField() ) { eKeyState = KS_NoNum; } @@ -1928,7 +1928,7 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KEY_BACKSPACE: case KEY_BACKSPACE | KEY_SHIFT: - if ( !rSh.HasReadonlySel() || rSh.CrsrInsideInputField()) + if ( !rSh.HasReadonlySel() || rSh.CursorInsideInputField()) { bool bDone = false; // try to add comment for code snip: @@ -1941,7 +1941,7 @@ KEYINPUT_CHECKTABLE_INSDEL: const bool bOnlyBackspaceKey( KEY_BACKSPACE == rKeyCode.GetFullCode() ); if ( rSh.IsSttPara() && !rSh.HasSelection() - && ( rSh.GetNumRuleAtCurrCrsrPos() == nullptr + && ( rSh.GetNumRuleAtCurrCursorPos() == nullptr || ( rSh.IsNoNum() && bOnlyBackspaceKey ) ) ) { bDone = rSh.TryRemoveIndent(); @@ -1995,7 +1995,7 @@ KEYINPUT_CHECKTABLE_INSDEL: && rSh.IsEndPara() && !rSh.HasSelection() ) { - const SwNumRule* pCurrNumRule( rSh.GetNumRuleAtCurrCrsrPos() ); + const SwNumRule* pCurrNumRule( rSh.GetNumRuleAtCurrCursorPos() ); if ( pCurrNumRule != nullptr && pCurrNumRule != rSh.GetOutlineNumRule() ) { @@ -2033,17 +2033,17 @@ KEYINPUT_CHECKTABLE_INSDEL: { eKeyState=KS_GotoNextFieldMark; } - else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputField() ) + else if ( !rSh.IsMultiSelection() && rSh.CursorInsideInputField() ) { GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD ); eKeyState = KS_End; } - else if( rSh.GetNumRuleAtCurrCrsrPos() + else if( rSh.GetNumRuleAtCurrCursorPos() && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { if ( !rSh.IsMultiSelection() - && rSh.IsFirstOfNumRuleAtCrsrPos() + && rSh.IsFirstOfNumRuleAtCursorPos() && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) eKeyState = KS_NumIndentInc; else @@ -2085,17 +2085,17 @@ KEYINPUT_CHECKTABLE_INSDEL: { eKeyState=KS_GotoPrevFieldMark; } - else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputField() ) + else if ( !rSh.IsMultiSelection() && rSh.CursorInsideInputField() ) { GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD ); eKeyState = KS_End; } - else if( rSh.GetNumRuleAtCurrCrsrPos() + else if( rSh.GetNumRuleAtCurrCursorPos() && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { if ( !rSh.IsMultiSelection() - && rSh.IsFirstOfNumRuleAtCrsrPos() + && rSh.IsFirstOfNumRuleAtCursorPos() && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) eKeyState = KS_NumIndentDec; else @@ -2206,7 +2206,7 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = rKeyCode.GetModifier() & KEY_SHIFT ? KS_PrevObject : KS_NextObject; } - else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputField() ) + else if ( !rSh.IsMultiSelection() && rSh.CursorInsideInputField() ) { GetView().GetViewFrame()->GetDispatcher()->Execute( KEY_SHIFT != rKeyCode.GetModifier() ? FN_GOTO_NEXT_INPUTFLD : FN_GOTO_PREV_INPUTFLD ); @@ -2303,8 +2303,8 @@ KEYINPUT_CHECKTABLE_INSDEL: } else if(nSelectionType & nsSelectionType::SEL_FRM) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); rSh.MoveSection( fnSectionCurr, fnSectionEnd ); } @@ -2326,8 +2326,8 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KS_GoIntoFly: { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); rSh.MoveSection( fnSectionCurr, fnSectionEnd ); eKeyState = KS_End; @@ -2385,7 +2385,7 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = KS_End; } else if ( !rSh.HasReadonlySel() - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { const bool bIsNormalChar = GetAppCharClass().isLetterNumeric( OUString( aCh ), 0 ); @@ -2538,7 +2538,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_PrevObject: if(rSh.GotoObj( KS_NextObject == eKeyState, GotoObjFlags::Any)) { - if( rSh.IsFrmSelected() && + if( rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr() ) { m_rView.GetDrawFuncPtr()->Deactivate(); @@ -2546,8 +2546,8 @@ KEYINPUT_CHECKTABLE_INSDEL: m_rView.LeaveDrawCreate(); m_rView.AttrChangedNotify( &rSh ); } - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); } break; case KS_GlossaryExpand: @@ -2727,7 +2727,7 @@ void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos, const bool bTmpNoInterrupt = g_bNoInterrupt; g_bNoInterrupt = false; - int nTmpSetCrsr = 0; + int nTmpSetCursor = 0; if( !rSh.IsViewLocked() && bLockView ) rSh.LockView( true ); @@ -2738,12 +2738,12 @@ void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos, // only temporary generate move context because otherwise // the query to the content form doesn't work!!! SwMvContext aMvContext( &rSh ); - nTmpSetCrsr = rSh.CallSetCursor(&rDocPos, bOnlyText); - g_bValidCrsrPos = !(CRSR_POSCHG & nTmpSetCrsr); + nTmpSetCursor = rSh.CallSetCursor(&rDocPos, bOnlyText); + g_bValidCursorPos = !(CRSR_POSCHG & nTmpSetCursor); } // notify the edit window that from now on we do not use the input language - if ( !(CRSR_POSOLD & nTmpSetCrsr) ) + if ( !(CRSR_POSOLD & nTmpSetCursor) ) SetUseInputLanguage( false ); if( bLockView ) @@ -2755,7 +2755,7 @@ void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos, void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { SwWrtShell &rSh = m_rView.GetWrtShell(); - const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : nullptr; + const SwField *pCursorField = rSh.CursorInsideInputField() ? rSh.GetCurField( true ) : nullptr; // We have to check if a context menu is shown and we have an UI // active inplace client. In that case we have to ignore the mouse @@ -2796,8 +2796,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) _rMEvt.GetMode(), _rMEvt.GetButtons() ); } - m_bWasShdwCrsr = nullptr != m_pShadCrsr; - delete m_pShadCrsr, m_pShadCrsr = nullptr; + m_bWasShdwCursor = nullptr != m_pShadCursor; + delete m_pShadCursor, m_pShadCursor = nullptr; const Point aDocPos( PixelToLogic( rMEvt.GetPosPixel() ) ); @@ -2825,14 +2825,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // Are we clicking on a blank header/footer area? if ( IsInHeaderFooter( aDocPos, eControl ) || bOverHeaderFooterFly ) { - const SwPageFrm* pPageFrm = rSh.GetLayout()->GetPageAtPos( aDocPos ); + const SwPageFrame* pPageFrame = rSh.GetLayout()->GetPageAtPos( aDocPos ); // Is it active? bool bActive = true; - const SwPageDesc* pDesc = pPageFrm->GetPageDesc(); + const SwPageDesc* pDesc = pPageFrame->GetPageDesc(); const SwFrameFormat* pFormat = pDesc->GetLeftFormat(); - if ( pPageFrm->OnRightPage() ) + if ( pPageFrame->OnRightPage() ) pFormat = pDesc->GetRightFormat(); if ( pFormat ) @@ -3074,16 +3074,16 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) g_bNoInterrupt = false; return; } - else if ( m_rView.GetDrawFuncPtr() && m_bInsFrm ) + else if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) { - StopInsFrm(); + StopInsFrame(); rSh.Edit(); } // Without SHIFT because otherwise Toggle doesn't work at selection if (rMEvt.GetClicks() == 1) { - if ( rSh.IsSelFrmMode()) + if ( rSh.IsSelFrameMode()) { SdrHdl* pHdl = rSh.GetDrawView()->PickHandle(aDocPos); bool bHitHandle = pHdl && pHdl->GetKind() != HDL_ANCHOR && @@ -3092,7 +3092,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ((rSh.IsInsideSelectedObj(aDocPos) || bHitHandle) && !(rMEvt.GetModifier() == KEY_SHIFT && !bHitHandle)) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); if ( !m_pApplyTempl ) { // only if no position to size was hit. @@ -3102,7 +3102,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); } - g_bFrmDrag = true; + g_bFrameDrag = true; } g_bNoInterrupt = false; return; @@ -3160,7 +3160,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bHandledFlyClick = true; // only try to select frame, if pointer already was // switched accordingly - if ( m_aActHitType != SDRHIT_NONE && !rSh.IsSelFrmMode() && + if ( m_aActHitType != SDRHIT_NONE && !rSh.IsSelFrameMode() && !GetView().GetViewFrame()->GetDispatcher()->IsLocked() && !bExecDrawTextLink) { @@ -3170,7 +3170,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if(bShould) { m_rView.NoRotate(); - rSh.HideCrsr(); + rSh.HideCursor(); bool bUnLockView = !rSh.IsViewLocked(); rSh.LockView( true ); @@ -3183,11 +3183,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { // if the frame was deselected in the macro // the cursor just has to be displayed again - if( FrmTypeFlags::NONE == rSh.GetSelFrmType() ) - rSh.ShowCrsr(); + if( FrameTypeFlags::NONE == rSh.GetSelFrameType() ) + rSh.ShowCursor(); else { - if (rSh.IsFrmSelected() && m_rView.GetDrawFuncPtr()) + if (rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr()) { m_rView.GetDrawFuncPtr()->Deactivate(); m_rView.SetDrawFuncPtr(nullptr); @@ -3195,8 +3195,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) m_rView.AttrChangedNotify( &rSh ); } - rSh.EnterSelFrmMode( &aDocPos ); - g_bFrmDrag = true; + rSh.EnterSelFrameMode( &aDocPos ); + g_bFrameDrag = true; UpdatePointer( aDocPos, rMEvt.GetModifier() ); } return; @@ -3205,12 +3205,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bOnlyText = rSh.IsObjSelectable( aDocPos ); if (!m_rView.GetDrawFuncPtr()) - rSh.ShowCrsr(); + rSh.ShowCursor(); } else bOnlyText = KEY_MOD1 != rMEvt.GetModifier(); } - else if ( rSh.IsSelFrmMode() && + else if ( rSh.IsSelFrameMode() && (m_aActHitType == SDRHIT_NONE || !rSh.IsInsideSelectedObj( aDocPos ))) { @@ -3233,10 +3233,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if( rMEvt.IsMod1() ) nFlag = nFlag | SW_ENTER_GROUP; - if ( rSh.IsSelFrmMode() ) + if ( rSh.IsSelFrameMode() ) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); } @@ -3247,20 +3247,20 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if( !bSelObj ) { // move cursor here so that it is not drawn in the - // frame first; ShowCrsr() happens in LeaveSelFrmMode() - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); - rSh.LeaveSelFrmMode(); + // frame first; ShowCursor() happens in LeaveSelFrameMode() + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify( &rSh ); bCallBase = false; } else { - rSh.HideCrsr(); - rSh.EnterSelFrmMode( &aDocPos ); - rSh.SelFlyGrabCrsr(); + rSh.HideCursor(); + rSh.EnterSelFrameMode( &aDocPos ); + rSh.SelFlyGrabCursor(); rSh.MakeSelVisible(); - g_bFrmDrag = true; - if( rSh.IsFrmSelected() && + g_bFrameDrag = true; + if( rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr() ) { m_rView.GetDrawFuncPtr()->Deactivate(); @@ -3281,7 +3281,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) break; case 2: { - g_bFrmDrag = false; + g_bFrameDrag = false; if ( !bHandledFlyClick && !bIsDocReadOnly && rSh.IsInsideSelectedObj(aDocPos) && FlyProtectFlags::NONE == rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) ) { @@ -3331,7 +3331,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // if the cursor position was corrected or if a Fly // was selected in ReadOnlyMode, no word selection, except when tiled rendering. - if ((!g_bValidCrsrPos || rSh.IsFrmSelected()) && !rSh.isTiledRendering()) + if ((!g_bValidCursorPos || rSh.IsFrameSelected()) && !rSh.isTiledRendering()) return; SwField *pField; @@ -3395,7 +3395,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) case 3: case 4: { - g_bFrmDrag = false; + g_bFrameDrag = false; // in extended mode double and triple // click has no effect. if ( rSh.IsExtMode() ) @@ -3403,7 +3403,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // if the cursor position was corrected or if a Fly // was selected in ReadOnlyMode, no word selection. - if ( !g_bValidCrsrPos || rSh.IsFrmSelected() ) + if ( !g_bValidCursorPos || rSh.IsFrameSelected() ) return; // select line, AdditionalMode if applicable @@ -3434,7 +3434,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) case MOUSE_LEFT + KEY_SHIFT: case MOUSE_LEFT + KEY_SHIFT + KEY_MOD1: { - bool bLockView = m_bWasShdwCrsr; + bool bLockView = m_bWasShdwCursor; switch ( rMEvt.GetModifier() ) { @@ -3443,24 +3443,24 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !m_bInsDraw && IsDrawObjSelectable( rSh, aDocPos ) ) { m_rView.NoRotate(); - rSh.HideCrsr(); - if ( rSh.IsSelFrmMode() ) + rSh.HideCursor(); + if ( rSh.IsSelFrameMode() ) rSh.SelectObj(aDocPos, SW_ADD_SELECT | SW_ENTER_GROUP); else { if ( rSh.SelectObj( aDocPos, SW_ADD_SELECT | SW_ENTER_GROUP ) ) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; return; } } } - else if( rSh.IsSelFrmMode() && + else if( rSh.IsSelFrameMode() && rSh.GetDrawView()->PickHandle( aDocPos )) { - g_bFrmDrag = true; + g_bFrameDrag = true; g_bNoInterrupt = false; return; } @@ -3472,24 +3472,24 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !m_bInsDraw && IsDrawObjSelectable( rSh, aDocPos ) && !lcl_urlOverBackground( rSh, aDocPos ) ) { m_rView.NoRotate(); - rSh.HideCrsr(); - if ( rSh.IsSelFrmMode() ) + rSh.HideCursor(); + if ( rSh.IsSelFrameMode() ) rSh.SelectObj(aDocPos, SW_ENTER_GROUP); else { if ( rSh.SelectObj( aDocPos, SW_ENTER_GROUP ) ) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; return; } } } - else if( rSh.IsSelFrmMode() && + else if( rSh.IsSelFrameMode() && rSh.GetDrawView()->PickHandle( aDocPos )) { - g_bFrmDrag = true; + g_bFrameDrag = true; g_bNoInterrupt = false; return; } @@ -3530,47 +3530,47 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !m_bInsDraw && IsDrawObjSelectable( rSh, aDocPos ) ) { m_rView.NoRotate(); - rSh.HideCrsr(); - if ( rSh.IsSelFrmMode() ) + rSh.HideCursor(); + if ( rSh.IsSelFrameMode() ) { rSh.SelectObj(aDocPos, SW_ADD_SELECT); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); if (rMarkList.GetMark(0) == nullptr) { - rSh.LeaveSelFrmMode(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); - g_bFrmDrag = false; + g_bFrameDrag = false; } } else { if ( rSh.SelectObj( aDocPos ) ) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; return; } } } else { - if ( rSh.IsSelFrmMode() && + if ( rSh.IsSelFrameMode() && rSh.IsInsideSelectedObj( aDocPos ) ) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; return; } - if ( rSh.IsSelFrmMode() ) + if ( rSh.IsSelFrameMode() ) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); - g_bFrmDrag = false; + g_bFrameDrag = false; } if ( !rSh.IsExtMode() ) { @@ -3679,12 +3679,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.IsObjSelectable( aDocPos ) ) && !lcl_urlOverBackground( rSh, aDocPos ) ) { SwMvContext aMvContext( &rSh ); - rSh.EnterSelFrmMode(); + rSh.EnterSelFrameMode(); bCallBase = false; } } - if ( !bOverSelect && bEditableFieldClicked && (!pCrsrField || - pCrsrField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) + if ( !bOverSelect && bEditableFieldClicked && (!pCursorField || + pCursorField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) { // select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART // and CH_TXT_ATR_INPUTFIELDEND @@ -3706,14 +3706,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SwContentAtPos aFieldAtPos(SwContentAtPos::SW_FIELD); // Are we clicking on a field? - if (g_bValidCrsrPos + if (g_bValidCursorPos && rSh.GetContentAtPos(aDocPos, aFieldAtPos) && aFieldAtPos.pFndTextAttr != nullptr && aFieldAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD - && (!pCrsrField || pCrsrField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) + && (!pCursorField || pCursorField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) { // Move the cursor - MoveCursor( rSh, aDocPos, rSh.IsObjSelectable( aDocPos ), m_bWasShdwCrsr ); + MoveCursor( rSh, aDocPos, rSh.IsObjSelectable( aDocPos ), m_bWasShdwCursor ); bCallBase = false; // select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART @@ -3756,8 +3756,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( rSh.ActionPend() ) return ; - if( m_pShadCrsr && 0 != (rMEvt.GetModifier() + rMEvt.GetButtons() ) ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; + if( m_pShadCursor && 0 != (rMEvt.GetModifier() + rMEvt.GetButtons() ) ) + delete m_pShadCursor, m_pShadCursor = nullptr; bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly(); @@ -3788,8 +3788,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) const Point aOldPt( rSh.VisArea().Pos() ); const bool bInsWin = rSh.VisArea().IsInside( aDocPt ) || rSh.isTiledRendering(); - if( m_pShadCrsr && !bInsWin ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; + if( m_pShadCursor && !bInsWin ) + delete m_pShadCursor, m_pShadCursor = nullptr; if( bInsWin && m_pRowColumnSelectionStart ) { @@ -3825,7 +3825,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) EnterArea(); return; } - else if(!rSh.IsFrmSelected() && !rSh.IsObjSelected()) + else if(!rSh.IsFrameSelected() && !rSh.IsObjSelected()) { SfxBindings &rBnd = rSh.GetView().GetViewFrame()->GetBindings(); Point aRelPos = rSh.GetRelativePagePosition(aDocPt); @@ -3912,7 +3912,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } } - bool bDelShadCrsr = true; + bool bDelShadCursor = true; switch ( rMEvt.GetModifier() + rMEvt.GetButtons() ) { @@ -3981,7 +3981,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if ( !m_bMBPressed ) break; case MOUSE_LEFT + KEY_MOD1: - if ( g_bFrmDrag && rSh.IsSelFrmMode() ) + if ( g_bFrameDrag && rSh.IsSelFrameMode() ) { if( !m_bMBPressed ) break; @@ -4093,7 +4093,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) EnterArea(); return; } - if ( !rSh.IsSelFrmMode() && !g_bDDINetAttr && + if ( !rSh.IsSelFrameMode() && !g_bDDINetAttr && (IsMinMove( m_aStartPos,aPixPt ) || m_bIsInMove) && (rSh.IsInSelect() || !rSh.ChgCurrPam( aDocPt )) ) { @@ -4119,7 +4119,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { rSh.Drag( &aDocPt, false ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPt, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPt, false)); EnterArea(); } } @@ -4156,7 +4156,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) case KEY_MOD1: if ( !m_bInsDraw ) { - bool bTstShdwCrsr = true; + bool bTstShdwCursor = true; UpdatePointer( aDocPt, rMEvt.GetModifier() ); @@ -4171,7 +4171,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( pINet || nullptr != ( pTmp = pFormat = rSh.GetFormatFromAnyObj( aDocPt ))) { - bTstShdwCrsr = false; + bTstShdwCursor = false; if( pTmp == pINet ) m_aSaveCallEvent.Set( pINet ); else @@ -4203,8 +4203,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) aLastCallEvent, true ); } - if( bTstShdwCrsr && bInsWin && !bIsDocReadOnly && - !m_bInsFrm && + if( bTstShdwCursor && bInsWin && !bIsDocReadOnly && + !m_bInsFrame && !rSh.GetViewOptions()->getBrowseMode() && rSh.GetViewOptions()->IsShadowCursor() && !(rMEvt.GetModifier() + rMEvt.GetButtons()) && @@ -4212,16 +4212,16 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { SwRect aRect; sal_Int16 eOrient; - SwFillMode eMode = (SwFillMode)rSh.GetViewOptions()->GetShdwCrsrFillMode(); - if( rSh.GetShadowCrsrPos( aDocPt, eMode, aRect, eOrient )) + SwFillMode eMode = (SwFillMode)rSh.GetViewOptions()->GetShdwCursorFillMode(); + if( rSh.GetShadowCursorPos( aDocPt, eMode, aRect, eOrient )) { - if( !m_pShadCrsr ) - m_pShadCrsr = new SwShadowCursor( *this, + if( !m_pShadCursor ) + m_pShadCursor = new SwShadowCursor( *this, SwViewOption::GetDirectCursorColor() ); if( text::HoriOrientation::RIGHT != eOrient && text::HoriOrientation::CENTER != eOrient ) eOrient = text::HoriOrientation::LEFT; - m_pShadCrsr->SetPos( aRect.Pos(), aRect.Height(), static_cast< sal_uInt16 >(eOrient) ); - bDelShadCrsr = false; + m_pShadCursor->SetPos( aRect.Pos(), aRect.Height(), static_cast< sal_uInt16 >(eOrient) ); + bDelShadCursor = false; } } } @@ -4230,15 +4230,15 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( rSh.IsBlockMode() && !rMEvt.IsSynthetic() ) { rSh.Drag( &aDocPt, false ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPt, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPt, false)); EnterArea(); } break; } - if( bDelShadCrsr && m_pShadCrsr ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; - m_bWasShdwCrsr = false; + if( bDelShadCursor && m_pShadCursor ) + delete m_pShadCursor, m_pShadCursor = nullptr; + m_bWasShdwCursor = false; } /** @@ -4257,10 +4257,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) bool bCallBase = true; - bool bCallShadowCrsr = m_bWasShdwCrsr; - m_bWasShdwCrsr = false; - if( m_pShadCrsr ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; + bool bCallShadowCursor = m_bWasShdwCursor; + m_bWasShdwCursor = false; + if( m_pShadCursor ) + delete m_pShadCursor, m_pShadCursor = nullptr; if( m_pRowColumnSelectionStart ) DELETEZ( m_pRowColumnSelectionStart ); @@ -4303,10 +4303,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { StopDDTimer( &rSh, aDocPt ); m_bMBPressed = false; - if ( rSh.IsSelFrmMode() ) + if ( rSh.IsSelFrameMode() ) { rSh.EndDrag( &aDocPt, false ); - g_bFrmDrag = false; + g_bFrameDrag = false; } g_bNoInterrupt = false; const Point aDocPos( PixelToLogic( rMEvt.GetPosPixel() ) ); @@ -4369,19 +4369,19 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( rSh.IsObjSelected() ) { - rSh.EnterSelFrmMode(); + rSh.EnterSelFrameMode(); if (!m_rView.GetDrawFuncPtr()) StdDrawMode( OBJ_NONE, true ); } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { - rSh.EnterSelFrmMode(); - StopInsFrm(); + rSh.EnterSelFrameMode(); + StopInsFrame(); } else { const Point aDocPos( PixelToLogic( m_aStartPos ) ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); rSh.Edit(); } @@ -4405,9 +4405,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) m_rView.GetDrawFuncPtr()->Deactivate(); m_rView.AttrChangedNotify( &rSh ); if ( rSh.IsObjSelected() ) - rSh.EnterSelFrmMode(); - if ( m_rView.GetDrawFuncPtr() && m_bInsFrm ) - StopInsFrm(); + rSh.EnterSelFrameMode(); + if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) + StopInsFrame(); } bCallBase = false; break; @@ -4415,7 +4415,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) case MOUSE_LEFT + KEY_MOD1: case MOUSE_LEFT + KEY_MOD2: case MOUSE_LEFT + KEY_SHIFT + KEY_MOD1: - if ( g_bFrmDrag && rSh.IsSelFrmMode() ) + if ( g_bFrameDrag && rSh.IsSelFrameMode() ) { if ( rMEvt.IsMod1() ) // copy and don't move. { @@ -4426,7 +4426,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { rSh.BreakDrag(); Point aEndPt, aSttPt; - if ( rSh.GetSelFrmType() & FrmTypeFlags::FLY_ATCNT ) + if ( rSh.GetSelFrameType() & FrameTypeFlags::FLY_ATCNT ) { aEndPt = aRect.TopLeft(); aSttPt = rSh.GetDrawView()->GetAllMarkedRect().TopLeft(); @@ -4496,18 +4496,18 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } rSh.EndDrag( &aDocPt, false ); } - g_bFrmDrag = false; + g_bFrameDrag = false; bCallBase = false; break; } bPopMode = true; // no break case MOUSE_LEFT + KEY_SHIFT: - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { rSh.EndDrag( &aDocPt, false ); - g_bFrmDrag = false; + g_bFrameDrag = false; bCallBase = false; break; } @@ -4529,7 +4529,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) // the query to the content form doesn't work!!! SwMvContext aMvContext( &rSh ); const Point aDocPos( PixelToLogic( m_aStartPos ) ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); } g_bNoInterrupt = bTmpNoInterrupt; @@ -4598,11 +4598,11 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) // the query to the content form doesn't work!!! SwMvContext aMvContext( &rSh ); const Point aDocPos( PixelToLogic( m_aStartPos ) ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); } else { - g_bValidCrsrPos = true; + g_bValidCursorPos = true; } } else @@ -4611,7 +4611,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) // a bit of a mystery what this is good for? // in this case we assume it's valid since we // just selected a field - g_bValidCrsrPos = true; + g_bValidCursorPos = true; } if (bAddMode) { @@ -4652,7 +4652,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } rSh.LockView( bViewLocked ); - bCallShadowCrsr = false; + bCallShadowCursor = false; } else { @@ -4674,19 +4674,19 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) OUString sTarget(pField->GetTargetFrame()); ::LoadURL(rSh, sURL, nFilter, sTarget); } - bCallShadowCrsr = false; + bCallShadowCursor = false; } else { // hit graphic ReleaseMouse(); if( rSh.ClickToINetGrf( aDocPt, nFilter )) - bCallShadowCrsr = false; + bCallShadowCursor = false; } } } - if( bCallShadowCrsr && + if( bCallShadowCursor && rSh.GetViewOptions()->IsShadowCursor() && MOUSE_LEFT == (rMEvt.GetModifier() + rMEvt.GetButtons()) && !rSh.HasSelection() && @@ -4701,8 +4701,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.Undo(); } } - SwFillMode eMode = (SwFillMode)rSh.GetViewOptions()->GetShdwCrsrFillMode(); - rSh.SetShadowCrsrPos( aDocPt, eMode ); + SwFillMode eMode = (SwFillMode)rSh.GetViewOptions()->GetShdwCursorFillMode(); + rSh.SetShadowCursorPos( aDocPt, eMode ); } } } @@ -4778,9 +4778,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.SetAttrItem( SvxBrushItem( SwEditWin::m_aWaterCanTextBackColor, nId ) ); else rSh.SetAttrItem( SvxColorItem( SwEditWin::m_aWaterCanTextColor, nId ) ); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); rSh.EnterStdMode(); - rSh.SetVisCrsr(aDocPt); + rSh.SetVisibleCursor(aDocPt); bCallBase = false; m_aTemplateIdle.Stop(); } @@ -4813,9 +4813,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) & eSelection ) && !rSh.HasReadonlySel() ) { rSh.SetAttrItem( SwFormatCharFormat(m_pApplyTempl->aColl.pCharFormat) ); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); rSh.EnterStdMode(); - rSh.SetVisCrsr(aDocPt); + rSh.SetVisibleCursor(aDocPt); m_pApplyTempl->nUndo = std::min(m_pApplyTempl->nUndo, rSh.GetDoc()->GetIDocumentUndoRedo().GetUndoActionCount()); bCallBase = false; @@ -4947,10 +4947,10 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) else { SetPointer( PointerStyle::Text ); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); rSh.GetViewOptions()->SetIdle( bIdle ); - if ( !rSh.IsSelFrmMode() ) + if ( !rSh.IsSelFrameMode() ) rSh.Edit(); } @@ -4977,7 +4977,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): m_pAnchorMarker( nullptr ), m_pUserMarker( nullptr ), m_pUserMarkerObj( nullptr ), - m_pShadCrsr( nullptr ), + m_pShadCursor( nullptr ), m_pRowColumnSelectionStart( nullptr ), m_rView( rMyView ), @@ -4988,12 +4988,12 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): m_nDropDestination( SotExchangeDest::NONE ), m_eBezierMode(SID_BEZIER_INSERT), - m_nInsFrmColCount( 1 ), + m_nInsFrameColCount( 1 ), m_eDrawMode(OBJ_NONE), m_bMBPressed(false), m_bInsDraw(false), - m_bInsFrm(false), + m_bInsFrame(false), m_bIsInMove(false), m_bIsInDrag(false), m_bOldIdle(false), @@ -5001,7 +5001,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): m_bTableInsDelMode(false), m_bTableIsInsMode(false), m_bChainMode(false), - m_bWasShdwCrsr(false), + m_bWasShdwCursor(false), m_bLockInput(false), m_bIsRowDrag(false), m_bUseInputLanguage(false), @@ -5014,8 +5014,8 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): EnableChildTransparentMode(); SetDialogControlFlags( DialogControlFlags::Return | DialogControlFlags::WantFocus ); - m_bMBPressed = m_bInsDraw = m_bInsFrm = - m_bIsInDrag = m_bOldIdle = m_bOldIdleSet = m_bChainMode = m_bWasShdwCrsr = false; + m_bMBPressed = m_bInsDraw = m_bInsFrame = + m_bIsInDrag = m_bOldIdle = m_bOldIdleSet = m_bChainMode = m_bWasShdwCursor = false; // initially use the input language m_bUseInputLanguage = true; @@ -5055,8 +5055,8 @@ void SwEditWin::dispose() { m_aKeyInputTimer.Stop(); - delete m_pShadCrsr; - m_pShadCrsr = nullptr; + delete m_pShadCursor; + m_pShadCursor = nullptr; delete m_pRowColumnSelectionStart; m_pRowColumnSelectionStart = nullptr; @@ -5125,13 +5125,13 @@ bool SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) rSh.EndTextEdit(); // clicked aside, end Edit rSh.SelectObj( aDocPos ); - if ( !rSh.IsObjSelected() && !rSh.IsFrmSelected() ) - rSh.LeaveSelFrmMode(); + if ( !rSh.IsObjSelected() && !rSh.IsFrameSelected() ) + rSh.LeaveSelFrameMode(); else { SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; } if( bUnLockView ) rSh.LockView( false ); @@ -5279,8 +5279,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::Wheel: case CommandEventId::StartAutoScroll: case CommandEventId::AutoScroll: - if( m_pShadCrsr ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; + if( m_pShadCursor ) + delete m_pShadCursor, m_pShadCursor = nullptr; bCallBase = !m_rView.HandleWheelCommands( rCEvt ); break; @@ -5291,7 +5291,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::StartExtTextInput: { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); if(!bIsDocReadOnly) { if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() ) @@ -5314,7 +5314,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::EndExtTextInput: { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); if(!bIsDocReadOnly) { if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() ) @@ -5365,7 +5365,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::ExtTextInput: { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); if(!bIsDocReadOnly) { if( m_pQuickHlpData->m_bIsDisplayed ) @@ -5467,77 +5467,77 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::SelectionChange: { const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData(); - rSh.SttCrsrMove(); + rSh.SttCursorMove(); rSh.GoStartSentence(); - rSh.GetCrsr()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetStart()); + rSh.GetCursor()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetStart()); rSh.SetMark(); - rSh.GetCrsr()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetEnd() - pData->GetStart()); - rSh.EndCrsrMove( true ); + rSh.GetCursor()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetEnd() - pData->GetStart()); + rSh.EndCursorMove( true ); } break; case CommandEventId::PrepareReconversion: if( rSh.HasSelection() ) { - SwPaM *pCrsr = rSh.GetCrsr(); + SwPaM *pCursor = rSh.GetCursor(); if( rSh.IsMultiSelection() ) { - if (pCrsr && !pCrsr->HasMark() && - pCrsr->GetPoint() == pCrsr->GetMark()) + if (pCursor && !pCursor->HasMark() && + pCursor->GetPoint() == pCursor->GetMark()) { - rSh.GoPrevCrsr(); - pCrsr = rSh.GetCrsr(); + rSh.GoPrevCursor(); + pCursor = rSh.GetCursor(); } // Cancel all selections other than the last selected one. - while( rSh.GetCrsr()->GetNext() != rSh.GetCrsr() ) - delete rSh.GetCrsr()->GetNext(); + while( rSh.GetCursor()->GetNext() != rSh.GetCursor() ) + delete rSh.GetCursor()->GetNext(); } - if( pCrsr ) + if( pCursor ) { - sal_uLong nPosNodeIdx = pCrsr->GetPoint()->nNode.GetIndex(); - const sal_Int32 nPosIdx = pCrsr->GetPoint()->nContent.GetIndex(); - sal_uLong nMarkNodeIdx = pCrsr->GetMark()->nNode.GetIndex(); - const sal_Int32 nMarkIdx = pCrsr->GetMark()->nContent.GetIndex(); + sal_uLong nPosNodeIdx = pCursor->GetPoint()->nNode.GetIndex(); + const sal_Int32 nPosIdx = pCursor->GetPoint()->nContent.GetIndex(); + sal_uLong nMarkNodeIdx = pCursor->GetMark()->nNode.GetIndex(); + const sal_Int32 nMarkIdx = pCursor->GetMark()->nContent.GetIndex(); - if( !rSh.GetCrsr()->HasMark() ) - rSh.GetCrsr()->SetMark(); + if( !rSh.GetCursor()->HasMark() ) + rSh.GetCursor()->SetMark(); - rSh.SttCrsrMove(); + rSh.SttCursorMove(); if( nPosNodeIdx < nMarkNodeIdx ) { - rSh.GetCrsr()->GetPoint()->nNode = nPosNodeIdx; - rSh.GetCrsr()->GetPoint()->nContent = nPosIdx; - rSh.GetCrsr()->GetMark()->nNode = nPosNodeIdx; - rSh.GetCrsr()->GetMark()->nContent = - rSh.GetCrsr()->GetContentNode()->Len(); + rSh.GetCursor()->GetPoint()->nNode = nPosNodeIdx; + rSh.GetCursor()->GetPoint()->nContent = nPosIdx; + rSh.GetCursor()->GetMark()->nNode = nPosNodeIdx; + rSh.GetCursor()->GetMark()->nContent = + rSh.GetCursor()->GetContentNode()->Len(); } else if( nPosNodeIdx == nMarkNodeIdx ) { - rSh.GetCrsr()->GetPoint()->nNode = nPosNodeIdx; - rSh.GetCrsr()->GetPoint()->nContent = nPosIdx; - rSh.GetCrsr()->GetMark()->nNode = nMarkNodeIdx; - rSh.GetCrsr()->GetMark()->nContent = nMarkIdx; + rSh.GetCursor()->GetPoint()->nNode = nPosNodeIdx; + rSh.GetCursor()->GetPoint()->nContent = nPosIdx; + rSh.GetCursor()->GetMark()->nNode = nMarkNodeIdx; + rSh.GetCursor()->GetMark()->nContent = nMarkIdx; } else { - rSh.GetCrsr()->GetMark()->nNode = nMarkNodeIdx; - rSh.GetCrsr()->GetMark()->nContent = nMarkIdx; - rSh.GetCrsr()->GetPoint()->nNode = nMarkNodeIdx; - rSh.GetCrsr()->GetPoint()->nContent = - rSh.GetCrsr()->GetContentNode( false )->Len(); + rSh.GetCursor()->GetMark()->nNode = nMarkNodeIdx; + rSh.GetCursor()->GetMark()->nContent = nMarkIdx; + rSh.GetCursor()->GetPoint()->nNode = nMarkNodeIdx; + rSh.GetCursor()->GetPoint()->nContent = + rSh.GetCursor()->GetContentNode( false )->Len(); } - rSh.EndCrsrMove( true ); + rSh.EndCursorMove( true ); } } break; case CommandEventId::QueryCharPosition: { bool bVertical = rSh.IsInVerticalText(); - const SwPosition& rPos = *rSh.GetCrsr()->GetPoint(); + const SwPosition& rPos = *rSh.GetCursor()->GetPoint(); SwDocShell* pDocSh = m_rView.GetDocShell(); SwDoc *pDoc = pDocSh->GetDoc(); SwExtTextInput* pInput = pDoc->GetExtTextInput( rPos.nNode.GetNode(), rPos.nContent.GetIndex() ); @@ -5661,15 +5661,15 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) { return true; } - if ( m_rView.GetDrawFuncPtr() && m_bInsFrm ) + if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) { - StopInsFrm(); + StopInsFrame(); rSh.Edit(); } UpdatePointer( aDocPos ); - if( !rSh.IsSelFrmMode() && + if( !rSh.IsSelFrameMode() && !GetView().GetViewFrame()->GetDispatcher()->IsLocked() ) { // Test if there is a draw object at that position and if it should be selected. @@ -5678,7 +5678,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if(bShould) { m_rView.NoRotate(); - rSh.HideCrsr(); + rSh.HideCursor(); bool bUnLockView = !rSh.IsViewLocked(); rSh.LockView( true ); @@ -5691,11 +5691,11 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) bRet = true; // in case the frame was deselected in the macro // just the cursor has to be displayed again. - if( FrmTypeFlags::NONE == rSh.GetSelFrmType() ) - rSh.ShowCrsr(); + if( FrameTypeFlags::NONE == rSh.GetSelFrameType() ) + rSh.ShowCursor(); else { - if (rSh.IsFrmSelected() && m_rView.GetDrawFuncPtr()) + if (rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr()) { m_rView.GetDrawFuncPtr()->Deactivate(); m_rView.SetDrawFuncPtr(nullptr); @@ -5703,18 +5703,18 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) m_rView.AttrChangedNotify( &rSh ); } - rSh.EnterSelFrmMode( &aDocPos ); - g_bFrmDrag = true; + rSh.EnterSelFrameMode( &aDocPos ); + g_bFrameDrag = true; UpdatePointer( aDocPos ); return bRet; } } if (!m_rView.GetDrawFuncPtr()) - rSh.ShowCrsr(); + rSh.ShowCursor(); } } - else if ( rSh.IsSelFrmMode() && + else if ( rSh.IsSelFrameMode() && (m_aActHitType == SDRHIT_NONE || !bIsInsideSelectedObj)) { @@ -5723,10 +5723,10 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.LockView( true ); sal_uInt8 nFlag = 0; - if ( rSh.IsSelFrmMode() ) + if ( rSh.IsSelFrameMode() ) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); bRet = true; } @@ -5738,21 +5738,21 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if( !bSelObj ) { // move cursor here so that it is not drawn in the - // frame at first; ShowCrsr() happens in LeaveSelFrmMode() - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); - rSh.LeaveSelFrmMode(); + // frame at first; ShowCursor() happens in LeaveSelFrameMode() + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + rSh.LeaveSelFrameMode(); m_rView.LeaveDrawCreate(); m_rView.AttrChangedNotify( &rSh ); bRet = true; } else { - rSh.HideCrsr(); - rSh.EnterSelFrmMode( &aDocPos ); - rSh.SelFlyGrabCrsr(); + rSh.HideCursor(); + rSh.EnterSelFrameMode( &aDocPos ); + rSh.SelFlyGrabCursor(); rSh.MakeSelVisible(); - g_bFrmDrag = true; - if( rSh.IsFrmSelected() && + g_bFrameDrag = true; + if( rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr() ) { m_rView.GetDrawFuncPtr()->Deactivate(); @@ -5764,7 +5764,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) bRet = true; } } - else if ( rSh.IsSelFrmMode() && bIsInsideSelectedObj ) + else if ( rSh.IsSelFrameMode() && bIsInsideSelectedObj ) { // Object at the mouse cursor is already selected - do nothing return false; @@ -5796,9 +5796,9 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) nSelType == nsSelectionType::SEL_GRF ) { SwMvContext aMvContext( &rSh ); - if( !rSh.IsFrmSelected() ) + if( !rSh.IsFrameSelected() ) rSh.GotoNextFly(); - rSh.EnterSelFrmMode(); + rSh.EnterSelFrameMode(); bRet = true; } } @@ -5854,7 +5854,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, TemplateTimerHdl, Idle *, void) void SwEditWin::SetChainMode( bool bOn ) { if ( !m_bChainMode ) - StopInsFrm(); + StopInsFrame(); if ( m_pUserMarker ) { @@ -6145,9 +6145,9 @@ void SwEditWin::ShowAutoTextCorrectQuickHelp( bool SwEditWin::IsInHeaderFooter( const Point &rDocPt, FrameControlType &rControl ) const { SwWrtShell &rSh = m_rView.GetWrtShell(); - const SwPageFrm* pPageFrm = rSh.GetLayout()->GetPageAtPos( rDocPt ); + const SwPageFrame* pPageFrame = rSh.GetLayout()->GetPageAtPos( rDocPt ); - if ( pPageFrm && pPageFrm->IsOverHeaderFooterArea( rDocPt, rControl ) ) + if ( pPageFrame && pPageFrame->IsOverHeaderFooterArea( rDocPt, rControl ) ) return true; if ( rSh.IsShowHeaderFooterSeparator( Header ) || rSh.IsShowHeaderFooterSeparator( Footer ) ) @@ -6157,7 +6157,7 @@ bool SwEditWin::IsInHeaderFooter( const Point &rDocPt, FrameControlType &rContro if ( rSh.IsShowHeaderFooterSeparator( Header ) ) { - SwFrameControlPtr pControl = rMgr.GetControl( Header, pPageFrm ); + SwFrameControlPtr pControl = rMgr.GetControl( Header, pPageFrame ); if ( pControl.get() && pControl->Contains( aPoint ) ) { rControl = Header; @@ -6167,7 +6167,7 @@ bool SwEditWin::IsInHeaderFooter( const Point &rDocPt, FrameControlType &rContro if ( rSh.IsShowHeaderFooterSeparator( Footer ) ) { - SwFrameControlPtr pControl = rMgr.GetControl( Footer, pPageFrm ); + SwFrameControlPtr pControl = rMgr.GetControl( Footer, pPageFrame ); if ( pControl.get() && pControl->Contains( aPoint ) ) { rControl = Footer; @@ -6185,7 +6185,7 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r Point aPt( rDocPos ); SwWrtShell &rSh = m_rView.GetWrtShell(); SwPaM aPam( *rSh.GetCurrentShellCursor().GetPoint() ); - rSh.GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt, nullptr, true ); + rSh.GetLayout()->GetCursorOfst( aPam.GetPoint(), aPt, nullptr, true ); const SwStartNode* pStartFly = aPam.GetPoint()->nNode.GetNode().FindFlyStartNode(); if ( pStartFly ) @@ -6234,11 +6234,11 @@ OUString SwEditWin::GetSurroundingText() const rSh.GetSelectedText( sReturn, GETSELTXT_PARABRK_TO_ONLYCR ); else if( !rSh.HasSelection() ) { - SwPosition *pPos = rSh.GetCrsr()->GetPoint(); + SwPosition *pPos = rSh.GetCursor()->GetPoint(); const sal_Int32 nPos = pPos->nContent.GetIndex(); // get the sentence around the cursor - rSh.HideCrsr(); + rSh.HideCursor(); rSh.GoStartSentence(); rSh.SetMark(); rSh.GoEndSentence(); @@ -6246,7 +6246,7 @@ OUString SwEditWin::GetSurroundingText() const pPos->nContent = nPos; rSh.ClearMark(); - rSh.HideCrsr(); + rSh.HideCursor(); } return sReturn; @@ -6265,16 +6265,16 @@ Selection SwEditWin::GetSurroundingTextSelection() const { // Return the position of the visible cursor in the sentence // around the visible cursor. - SwPosition *pPos = rSh.GetCrsr()->GetPoint(); + SwPosition *pPos = rSh.GetCursor()->GetPoint(); const sal_Int32 nPos = pPos->nContent.GetIndex(); - rSh.HideCrsr(); + rSh.HideCursor(); rSh.GoStartSentence(); - const sal_Int32 nStartPos = rSh.GetCrsr()->GetPoint()->nContent.GetIndex(); + const sal_Int32 nStartPos = rSh.GetCursor()->GetPoint()->nContent.GetIndex(); pPos->nContent = nPos; rSh.ClearMark(); - rSh.ShowCrsr(); + rSh.ShowCursor(); return Selection( nPos - nStartPos, nPos - nStartPos ); } @@ -6359,7 +6359,7 @@ void SwEditWin::SetCursorTwipPosition(const Point& rPosition, bool bPoint, bool } } - // Not an SwWrtShell, as that would make SwCrsrShell::GetCrsr() inaccessible. + // Not an SwWrtShell, as that would make SwCursorShell::GetCursor() inaccessible. SwEditShell& rShell = m_rView.GetWrtShell(); bool bCreateSelection = false; @@ -6376,10 +6376,10 @@ void SwEditWin::SetCursorTwipPosition(const Point& rPosition, bool bPoint, bool // If the mark is to be updated, then exchange the point and mark before // and after, as we can't easily set the mark. if (!bPoint) - rShell.getShellCrsr(/*bBlock=*/false)->Exchange(); - rShell.SetCrsr(rPosition); + rShell.getShellCursor(/*bBlock=*/false)->Exchange(); + rShell.SetCursor(rPosition); if (!bPoint) - rShell.getShellCrsr(/*bBlock=*/false)->Exchange(); + rShell.getShellCursor(/*bBlock=*/false)->Exchange(); } if (bCreateSelection) diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index c7d7be51932c..ba05744a930f 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -445,20 +445,20 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect SwWrtShell* pWrtShell = GetView().GetWrtShellPtr(); if(!pWrtShell) return; - bool bPaintShadowCrsr = false; - if( m_pShadCrsr ) + bool bPaintShadowCursor = false; + if( m_pShadCursor ) { - Rectangle aRect( m_pShadCrsr->GetRect()); + Rectangle aRect( m_pShadCursor->GetRect()); // fully resides inside? if( rRect.IsInside( aRect ) ) // dann aufheben - delete m_pShadCrsr, m_pShadCrsr = nullptr; + delete m_pShadCursor, m_pShadCursor = nullptr; else if( rRect.IsOver( aRect )) { // resides somewhat above, then everything is clipped outside // and we have to make the "inner part" at the end of the // Paint visible again. Otherwise Paint errors occur! - bPaintShadowCrsr = true; + bPaintShadowCursor = true; } } @@ -472,8 +472,8 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect pWrtShell->setOutputToWindow(false); } - if( bPaintShadowCrsr ) - m_pShadCrsr->Paint(); + if( bPaintShadowCursor ) + m_pShadCursor->Paint(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/docvw/edtwin3.cxx b/sw/source/uibase/docvw/edtwin3.cxx index c69ebfcbd4eb..006cf7ff109d 100644 --- a/sw/source/uibase/docvw/edtwin3.cxx +++ b/sw/source/uibase/docvw/edtwin3.cxx @@ -78,8 +78,8 @@ void PageNumNotify( SwViewShell* pVwSh, sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, void FrameNotify( SwViewShell* pVwSh, FlyMode eMode ) { - if ( dynamic_cast< const SwCrsrShell *>( pVwSh ) != nullptr ) - SwBaseShell::SetFrmMode( eMode, static_cast<SwWrtShell*>(pVwSh) ); + if ( dynamic_cast< const SwCursorShell *>( pVwSh ) != nullptr ) + SwBaseShell::SetFrameMode( eMode, static_cast<SwWrtShell*>(pVwSh) ); } // Notify for page number update diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx index 43f1fd332841..dee11c51efc0 100644 --- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx +++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx @@ -50,56 +50,56 @@ namespace { typedef ::std::map < SidebarWinKey, VclPtr<sw::sidebarwindows::SwSidebarWin>, SidebarWinOrder > SidebarWinContainer; - struct FrmKey + struct FrameKey { - const SwFrm* mpFrm; + const SwFrame* mpFrame; - explicit FrmKey( const SwFrm* pFrm ) - : mpFrm( pFrm ) + explicit FrameKey( const SwFrame* pFrame ) + : mpFrame( pFrame ) {} - bool operator < ( const FrmKey& rFrmKey ) const + bool operator < ( const FrameKey& rFrameKey ) const { - return mpFrm < rFrmKey.mpFrm; + return mpFrame < rFrameKey.mpFrame; } }; - struct FrmOrder + struct FrameOrder { - bool operator()( const FrmKey& rFrmKeyA, - const FrmKey& rFrmKeyB ) const + bool operator()( const FrameKey& rFrameKeyA, + const FrameKey& rFrameKeyB ) const { - return rFrmKeyA < rFrmKeyB; + return rFrameKeyA < rFrameKeyB; } }; - typedef ::std::map < FrmKey, SidebarWinContainer, FrmOrder > _FrmSidebarWinContainer; + typedef ::std::map < FrameKey, SidebarWinContainer, FrameOrder > _FrameSidebarWinContainer; } namespace sw { namespace sidebarwindows { -class FrmSidebarWinContainer : public _FrmSidebarWinContainer +class FrameSidebarWinContainer : public _FrameSidebarWinContainer { }; -SwFrmSidebarWinContainer::SwFrmSidebarWinContainer() - : mpFrmSidebarWinContainer( new FrmSidebarWinContainer() ) +SwFrameSidebarWinContainer::SwFrameSidebarWinContainer() + : mpFrameSidebarWinContainer( new FrameSidebarWinContainer() ) {} -SwFrmSidebarWinContainer::~SwFrmSidebarWinContainer() +SwFrameSidebarWinContainer::~SwFrameSidebarWinContainer() { - mpFrmSidebarWinContainer->clear(); - delete mpFrmSidebarWinContainer; + mpFrameSidebarWinContainer->clear(); + delete mpFrameSidebarWinContainer; } -bool SwFrmSidebarWinContainer::insert( const SwFrm& rFrm, +bool SwFrameSidebarWinContainer::insert( const SwFrame& rFrame, const SwFormatField& rFormatField, SwSidebarWin& rSidebarWin ) { bool bInserted( false ); - FrmKey aFrmKey( &rFrm ); - SidebarWinContainer& rSidebarWinContainer = (*mpFrmSidebarWinContainer)[ aFrmKey ]; + FrameKey aFrameKey( &rFrame ); + SidebarWinContainer& rSidebarWinContainer = (*mpFrameSidebarWinContainer)[ aFrameKey ]; SidebarWinKey aSidebarWinKey( rFormatField.GetTextField()->GetStart() ); if ( rSidebarWinContainer.empty() || @@ -112,16 +112,16 @@ bool SwFrmSidebarWinContainer::insert( const SwFrm& rFrm, return bInserted; } -bool SwFrmSidebarWinContainer::remove( const SwFrm& rFrm, +bool SwFrameSidebarWinContainer::remove( const SwFrame& rFrame, const SwSidebarWin& rSidebarWin ) { bool bRemoved( false ); - FrmKey aFrmKey( &rFrm ); - FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); - if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + FrameKey aFrameKey( &rFrame ); + FrameSidebarWinContainer::iterator aFrameIter = mpFrameSidebarWinContainer->find( aFrameKey ); + if ( aFrameIter != mpFrameSidebarWinContainer->end() ) { - SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second; + SidebarWinContainer& rSidebarWinContainer = (*aFrameIter).second; for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin(); aIter != rSidebarWinContainer.end(); ++aIter ) @@ -138,30 +138,30 @@ bool SwFrmSidebarWinContainer::remove( const SwFrm& rFrm, return bRemoved; } -bool SwFrmSidebarWinContainer::empty( const SwFrm& rFrm ) +bool SwFrameSidebarWinContainer::empty( const SwFrame& rFrame ) { bool bEmpty( true ); - FrmKey aFrmKey( &rFrm ); - FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); - if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + FrameKey aFrameKey( &rFrame ); + FrameSidebarWinContainer::iterator aFrameIter = mpFrameSidebarWinContainer->find( aFrameKey ); + if ( aFrameIter != mpFrameSidebarWinContainer->end() ) { - bEmpty = (*aFrmIter).second.empty(); + bEmpty = (*aFrameIter).second.empty(); } return bEmpty; } -SwSidebarWin* SwFrmSidebarWinContainer::get( const SwFrm& rFrm, +SwSidebarWin* SwFrameSidebarWinContainer::get( const SwFrame& rFrame, const sal_Int32 nIndex ) { SwSidebarWin* pRet( nullptr ); - FrmKey aFrmKey( &rFrm ); - FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); - if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + FrameKey aFrameKey( &rFrame ); + FrameSidebarWinContainer::iterator aFrameIter = mpFrameSidebarWinContainer->find( aFrameKey ); + if ( aFrameIter != mpFrameSidebarWinContainer->end() ) { - SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second; + SidebarWinContainer& rSidebarWinContainer = (*aFrameIter).second; sal_Int32 nCounter( nIndex ); for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin(); nCounter >= 0 && aIter != rSidebarWinContainer.end(); @@ -180,16 +180,16 @@ SwSidebarWin* SwFrmSidebarWinContainer::get( const SwFrm& rFrm, return pRet; } -void SwFrmSidebarWinContainer::getAll( const SwFrm& rFrm, +void SwFrameSidebarWinContainer::getAll( const SwFrame& rFrame, std::vector< vcl::Window* >* pSidebarWins ) { pSidebarWins->clear(); - FrmKey aFrmKey( &rFrm ); - FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); - if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + FrameKey aFrameKey( &rFrame ); + FrameSidebarWinContainer::iterator aFrameIter = mpFrameSidebarWinContainer->find( aFrameKey ); + if ( aFrameIter != mpFrameSidebarWinContainer->end() ) { - SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second; + SidebarWinContainer& rSidebarWinContainer = (*aFrameIter).second; for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin(); aIter != rSidebarWinContainer.end(); ++aIter ) diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.hxx b/sw/source/uibase/docvw/frmsidebarwincontainer.hxx index 59aa0df6cebf..77594c969985 100644 --- a/sw/source/uibase/docvw/frmsidebarwincontainer.hxx +++ b/sw/source/uibase/docvw/frmsidebarwincontainer.hxx @@ -22,38 +22,38 @@ #include <sal/types.h> #include <vector> -class SwFrm; +class SwFrame; class SwFormatField; namespace vcl { class Window; } namespace sw { namespace sidebarwindows { class SwSidebarWin; -class FrmSidebarWinContainer; +class FrameSidebarWinContainer; -class SwFrmSidebarWinContainer +class SwFrameSidebarWinContainer { public: - SwFrmSidebarWinContainer(); - ~SwFrmSidebarWinContainer(); + SwFrameSidebarWinContainer(); + ~SwFrameSidebarWinContainer(); - bool insert( const SwFrm& rFrm, + bool insert( const SwFrame& rFrame, const SwFormatField& rFormatField, SwSidebarWin& rSidebarWin ); - bool remove( const SwFrm& rFrm, + bool remove( const SwFrame& rFrame, const SwSidebarWin& rSidebarWin ); - bool empty( const SwFrm& rFrm ); + bool empty( const SwFrame& rFrame ); - SwSidebarWin* get( const SwFrm& rFrm, + SwSidebarWin* get( const SwFrame& rFrame, const sal_Int32 nIndex ); - void getAll( const SwFrm& rFrm, + void getAll( const SwFrame& rFrame, std::vector< vcl::Window* >* pSidebarWins ); private: - FrmSidebarWinContainer* mpFrmSidebarWinContainer; + FrameSidebarWinContainer* mpFrameSidebarWinContainer; }; } } // eof of namespace sw::sidebarwindows:: diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 673cac073f11..1386ba25ef19 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -237,10 +237,10 @@ bool SwFieldMgr::CanInsertRefMark( const OUString& rStr ) OSL_ENSURE(pSh, "no SwWrtShell found"); if(pSh) { - sal_uInt16 nCnt = pSh->GetCrsrCnt(); + sal_uInt16 nCnt = pSh->GetCursorCnt(); - // the last Crsr doesn't have to be a spanned selection - if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() ) + // the last Cursor doesn't have to be a spanned selection + if( 1 < nCnt && !pSh->SwCursorShell::HasSelection() ) --nCnt; bRet = 2 > nCnt && nullptr == pSh->GetRefMark( rStr ); @@ -1254,7 +1254,7 @@ bool SwFieldMgr::InsertField( case TYP_FORMELFLD: { - if(pCurShell->GetFrmType(nullptr,false) & FrmTypeFlags::TABLE) + if(pCurShell->GetFrameType(nullptr,false) & FrameTypeFlags::TABLE) { pCurShell->StartAllAction(); diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index 3efc0ca2e1ce..0da911b0ae84 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -357,7 +357,7 @@ VCL_BUILDER_FACTORY(SwColExample) SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent) : Window(pParent) - , m_aFrmSize(1,1) + , m_aFrameSize(1,1) { SetMapMode( MapMode( MAP_TWIP ) ); m_aWinSize = GetOptimalSize(); @@ -368,10 +368,10 @@ SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent) SetBorderStyle( WindowBorderStyle::MONO ); - m_aFrmSize = SvxPaperInfo::GetPaperSize(PAPER_A4);// DIN A4 - ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrmSize.Width()); + m_aFrameSize = SvxPaperInfo::GetPaperSize(PAPER_A4);// DIN A4 + ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrameSize.Width()); - long nHeight = m_aFrmSize.Height(); + long nHeight = m_aFrameSize.Height(); Fraction aScale( m_aWinSize.Height(), nHeight ); MapMode aMapMode( GetMapMode() ); aMapMode.SetScaleX( aScale ); @@ -398,9 +398,9 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectan rRenderContext.DrawRect(aCompleteRect); rRenderContext.SetLineColor(rFieldTextColor); - Point aTL((aLogSize.Width() - m_aFrmSize.Width()) / 2, - (aLogSize.Height() - m_aFrmSize.Height()) / 2); - Rectangle aRect(aTL, m_aFrmSize); + Point aTL((aLogSize.Width() - m_aFrameSize.Width()) / 2, + (aLogSize.Height() - m_aFrameSize.Height()) / 2); + Rectangle aRect(aTL, m_aFrameSize); //draw a shadow rectangle rRenderContext.SetFillColor(Color(COL_GRAY)); @@ -446,15 +446,15 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectan { rRenderContext.DrawRect(aRect); rRenderContext.SetFillColor(rFieldColor); - Rectangle aFrmRect(aTL, m_aFrmSize); + Rectangle aFrameRect(aTL, m_aFrameSize); long nSum = aTL.X(); for (sal_uInt16 i = 0; i < nColCount; i++) { const SwColumn* pCol = &rCols[i]; - aFrmRect.Left() = nSum + pCol->GetLeft(); //nSum + pCol->GetLeft() + aTL.X(); + aFrameRect.Left() = nSum + pCol->GetLeft(); //nSum + pCol->GetLeft() + aTL.X(); nSum += pCol->GetWishWidth(); - aFrmRect.Right() = nSum - pCol->GetRight(); - rRenderContext.DrawRect(aFrmRect); + aFrameRect.Right() = nSum - pCol->GetRight(); + rRenderContext.DrawRect(aFrameRect); } if (bLines) { @@ -474,7 +474,7 @@ void SwColumnOnlyExample::SetColumns(const SwFormatCol& rCol) { m_aCols = rCol; sal_uInt16 nWishSum = m_aCols.GetWishWidth(); - long nFrmWidth = m_aFrmSize.Width(); + long nFrameWidth = m_aFrameSize.Width(); SwColumns& rCols = m_aCols.GetColumns(); sal_uInt16 nColCount = rCols.size(); @@ -482,15 +482,15 @@ void SwColumnOnlyExample::SetColumns(const SwFormatCol& rCol) { SwColumn* pCol = &rCols[i]; long nWish = pCol->GetWishWidth(); - nWish *= nFrmWidth; + nWish *= nFrameWidth; nWish /= nWishSum; pCol->SetWishWidth((sal_uInt16)nWish); long nLeft = pCol->GetLeft(); - nLeft *= nFrmWidth; + nLeft *= nFrameWidth; nLeft /= nWishSum; pCol->SetLeft((sal_uInt16)nLeft); long nRight = pCol->GetRight(); - nRight *= nFrmWidth; + nRight *= nFrameWidth; nRight /= nWishSum; pCol->SetRight((sal_uInt16)nRight); } diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx index 12773f181ce6..bc47c06e1bef 100644 --- a/sw/source/uibase/frmdlg/colmgr.cxx +++ b/sw/source/uibase/frmdlg/colmgr.cxx @@ -115,7 +115,7 @@ SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) : { if(nWidth == USHRT_MAX) { - nWidth = (sal_uInt16)static_cast<const SwFormatFrmSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth(); + nWidth = (sal_uInt16)static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth(); if (nWidth < MINLAY) nWidth = USHRT_MAX; const SvxLRSpaceItem &rLR = static_cast<const SvxLRSpaceItem&>(rSet.Get(RES_LR_SPACE)); diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index 8e6cbdd805d2..b6d8ed4f12cb 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -45,7 +45,7 @@ using namespace ::com::sun::star; -static sal_uInt16 aFrmMgrRange[] = { +static sal_uInt16 aFrameMgrRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, //UUUU FillAttribute support @@ -56,15 +56,15 @@ static sal_uInt16 aFrmMgrRange[] = { 0}; // determine frame attributes via Shell -SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) : - m_aSet( static_cast<SwAttrPool&>(pSh->GetAttrPool()), aFrmMgrRange ), +SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) : + m_aSet( static_cast<SwAttrPool&>(pSh->GetAttrPool()), aFrameMgrRange ), m_pOwnSh( pSh ), m_bAbsPos( false ), - m_bNewFrm( bNew ), + m_bNewFrame( bNew ), m_bIsInVertical( false ), m_bIsInVerticalL2R( false ) { - if ( m_bNewFrm ) + if ( m_bNewFrame ) { // set defaults: sal_uInt16 nId = 0; @@ -75,43 +75,43 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) case FRMMGR_TYPE_GRF: nId = RES_POOLFRM_GRAPHIC; break; } m_aSet.SetParent( &m_pOwnSh->GetFormatFromPool( nId )->GetAttrSet()); - m_aSet.Put( SwFormatFrmSize( ATT_MIN_SIZE, DFLT_WIDTH, DFLT_HEIGHT )); + m_aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, DFLT_WIDTH, DFLT_HEIGHT )); if ( 0 != ::GetHtmlMode(pSh->GetView().GetDocShell()) ) m_aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::PRINT_AREA ) ); } else if ( nType == FRMMGR_TYPE_NONE ) { - m_pOwnSh->GetFlyFrmAttr( m_aSet ); + m_pOwnSh->GetFlyFrameAttr( m_aSet ); bool bRightToLeft; - m_bIsInVertical = m_pOwnSh->IsFrmVertical(true, bRightToLeft, m_bIsInVerticalL2R); + m_bIsInVertical = m_pOwnSh->IsFrameVertical(true, bRightToLeft, m_bIsInVerticalL2R); } ::PrepareBoxInfo( m_aSet, *m_pOwnSh ); } -SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) : +SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) : m_aSet( rSet ), m_pOwnSh( pSh ), m_bAbsPos( false ), - m_bNewFrm( bNew ), + m_bNewFrame( bNew ), m_bIsInVertical(false), m_bIsInVerticalL2R(false) { if(!bNew) { bool bRightToLeft; - m_bIsInVertical = pSh->IsFrmVertical(true, bRightToLeft, m_bIsInVerticalL2R); + m_bIsInVertical = pSh->IsFrameVertical(true, bRightToLeft, m_bIsInVerticalL2R); } } // Initialise -void SwFlyFrmAttrMgr::UpdateAttrMgr() +void SwFlyFrameAttrMgr::UpdateAttrMgr() { - if ( !m_bNewFrm && m_pOwnSh->IsFrmSelected() ) - m_pOwnSh->GetFlyFrmAttr( m_aSet ); + if ( !m_bNewFrame && m_pOwnSh->IsFrameSelected() ) + m_pOwnSh->GetFlyFrameAttr( m_aSet ); ::PrepareBoxInfo( m_aSet, *m_pOwnSh ); } -void SwFlyFrmAttrMgr::_UpdateFlyFrm() +void SwFlyFrameAttrMgr::_UpdateFlyFrame() { const SfxPoolItem* pItem = nullptr; @@ -128,19 +128,19 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm() } // change existing Fly-Frame -void SwFlyFrmAttrMgr::UpdateFlyFrm() +void SwFlyFrameAttrMgr::UpdateFlyFrame() { - OSL_ENSURE( m_pOwnSh->IsFrmSelected(), + OSL_ENSURE( m_pOwnSh->IsFrameSelected(), "no frame selected or no shell, update not possible"); - if( m_pOwnSh->IsFrmSelected() ) + if( m_pOwnSh->IsFrameSelected() ) { //JP 6.8.2001: set never an invalid anchor into the core. const SfxPoolItem *pGItem, *pItem; if( SfxItemState::SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem )) { SfxItemSet aGetSet( *m_aSet.GetPool(), RES_ANCHOR, RES_ANCHOR ); - if( m_pOwnSh->GetFlyFrmAttr( aGetSet ) && 1 == aGetSet.Count() && + if( m_pOwnSh->GetFlyFrameAttr( aGetSet ) && 1 == aGetSet.Count() && SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem ) && static_cast<const SwFormatAnchor*>(pGItem)->GetAnchorId() == static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId() ) @@ -151,25 +151,25 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm() if( m_aSet.Count() ) { m_pOwnSh->StartAllAction(); - m_pOwnSh->SetFlyFrmAttr( m_aSet ); - _UpdateFlyFrm(); + m_pOwnSh->SetFlyFrameAttr( m_aSet ); + _UpdateFlyFrame(); m_pOwnSh->EndAllAction(); } } } // insert frame -bool SwFlyFrmAttrMgr::InsertFlyFrm() +bool SwFlyFrameAttrMgr::InsertFlyFrame() { m_pOwnSh->StartAllAction(); - bool bRet = nullptr != m_pOwnSh->NewFlyFrm( m_aSet ); + bool bRet = nullptr != m_pOwnSh->NewFlyFrame( m_aSet ); // turn on the right mode at the shell, frame got selected automatically. if ( bRet ) { - _UpdateFlyFrm(); - m_pOwnSh->EnterSelFrmMode(); + _UpdateFlyFrame(); + m_pOwnSh->EnterSelFrameMode(); FrameNotify(m_pOwnSh, FLY_DRAG_START); } m_pOwnSh->EndAllAction(); @@ -178,7 +178,7 @@ bool SwFlyFrmAttrMgr::InsertFlyFrm() // Insert frames of type eAnchorType. Position and size are being set explicitly. // Not-allowed values of the enumeration type get corrected. -void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType, +void SwFlyFrameAttrMgr::InsertFlyFrame(RndStdIds eAnchorType, const Point &rPos, const Size &rSize, bool bAbs ) @@ -196,11 +196,11 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType, SetSize( rSize ); SetAnchor( eAnchorType ); - InsertFlyFrm(); + InsertFlyFrame(); } // set anchor -void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId ) +void SwFlyFrameAttrMgr::SetAnchor( RndStdIds eId ) { sal_uInt16 nPhyPageNum, nVirtPageNum; m_pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum ); @@ -219,13 +219,13 @@ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId ) } // set the attribute for columns -void SwFlyFrmAttrMgr::SetCol( const SwFormatCol &rCol ) +void SwFlyFrameAttrMgr::SetCol( const SwFormatCol &rCol ) { m_aSet.Put( rCol ); } // set absolute position -void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint ) +void SwFlyFrameAttrMgr::SetAbsPos( const Point& rPoint ) { m_bAbsPos = true; m_aAbsPos = rPoint; @@ -238,7 +238,7 @@ void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint ) } // check metrics for correctness -void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, +void SwFlyFrameAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, const SwPosition* pToCharContentPos, bool bOnlyPercentRefValue ) { @@ -253,7 +253,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, // OD 18.09.2003 #i18732# - adjustment for allowing vertical position // aligned to page for fly frame anchored to paragraph or to character. const RndStdIds eAnchorType = static_cast<RndStdIds >(rVal.nAnchorType); - const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(m_aSet.Get(RES_FRM_SIZE)); + const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE)); m_pOwnSh->CalcBoundRect( aBoundRect, eAnchorType, rVal.nHRelOrient, rVal.nVRelOrient, @@ -479,28 +479,28 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, } // correction for border -SwTwips SwFlyFrmAttrMgr::CalcTopSpace() +SwTwips SwFlyFrameAttrMgr::CalcTopSpace() { const SvxShadowItem& rShadow = GetShadow(); const SvxBoxItem& rBox = GetBox(); return rShadow.CalcShadowSpace(SvxShadowItemSide::TOP ) + rBox.CalcLineSpace(SvxBoxItemLine::TOP); } -SwTwips SwFlyFrmAttrMgr::CalcBottomSpace() +SwTwips SwFlyFrameAttrMgr::CalcBottomSpace() { const SvxShadowItem& rShadow = GetShadow(); const SvxBoxItem& rBox = GetBox(); return rShadow.CalcShadowSpace(SvxShadowItemSide::BOTTOM) + rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM); } -SwTwips SwFlyFrmAttrMgr::CalcLeftSpace() +SwTwips SwFlyFrameAttrMgr::CalcLeftSpace() { const SvxShadowItem& rShadow = GetShadow(); const SvxBoxItem& rBox = GetBox(); return rShadow.CalcShadowSpace(SvxShadowItemSide::LEFT) + rBox.CalcLineSpace(SvxBoxItemLine::LEFT); } -SwTwips SwFlyFrmAttrMgr::CalcRightSpace() +SwTwips SwFlyFrameAttrMgr::CalcRightSpace() { const SvxShadowItem& rShadow = GetShadow(); const SvxBoxItem& rBox = GetBox(); @@ -508,12 +508,12 @@ SwTwips SwFlyFrmAttrMgr::CalcRightSpace() } // erase attribute from the set -void SwFlyFrmAttrMgr::DelAttr( sal_uInt16 nId ) +void SwFlyFrameAttrMgr::DelAttr( sal_uInt16 nId ) { m_aSet.ClearItem( nId ); } -void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight ) +void SwFlyFrameAttrMgr::SetLRSpace( long nLeft, long nRight ) { OSL_ENSURE( LONG_MAX != nLeft && LONG_MAX != nRight, "Welchen Raend setzen?" ); @@ -525,7 +525,7 @@ void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight ) m_aSet.Put( aTmp ); } -void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom ) +void SwFlyFrameAttrMgr::SetULSpace( long nTop, long nBottom ) { OSL_ENSURE(LONG_MAX != nTop && LONG_MAX != nBottom, "Welchen Raend setzen?" ); @@ -537,7 +537,7 @@ void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom ) m_aSet.Put( aTmp ); } -void SwFlyFrmAttrMgr::SetPos( const Point& rPoint ) +void SwFlyFrameAttrMgr::SetPos( const Point& rPoint ) { SwFormatVertOrient aVertOrient( GetVertOrient() ); SwFormatHoriOrient aHoriOrient( GetHoriOrient() ); @@ -552,35 +552,35 @@ void SwFlyFrmAttrMgr::SetPos( const Point& rPoint ) m_aSet.Put( aHoriOrient ); } -void SwFlyFrmAttrMgr::SetHorzOrientation( sal_Int16 eOrient ) +void SwFlyFrameAttrMgr::SetHorzOrientation( sal_Int16 eOrient ) { SwFormatHoriOrient aHoriOrient( GetHoriOrient() ); aHoriOrient.SetHoriOrient( eOrient ); m_aSet.Put( aHoriOrient ); } -void SwFlyFrmAttrMgr::SetVertOrientation( sal_Int16 eOrient ) +void SwFlyFrameAttrMgr::SetVertOrientation( sal_Int16 eOrient ) { SwFormatVertOrient aVertOrient( GetVertOrient() ); aVertOrient.SetVertOrient( eOrient ); m_aSet.Put( aVertOrient ); } -void SwFlyFrmAttrMgr::SetHeightSizeType( SwFrmSize eType ) +void SwFlyFrameAttrMgr::SetHeightSizeType( SwFrameSize eType ) { - SwFormatFrmSize aSize( GetFrmSize() ); + SwFormatFrameSize aSize( GetFrameSize() ); aSize.SetHeightSizeType( eType ); m_aSet.Put( aSize ); } -void SwFlyFrmAttrMgr::SetSize( const Size& rSize ) +void SwFlyFrameAttrMgr::SetSize( const Size& rSize ) { - SwFormatFrmSize aSize( GetFrmSize() ); + SwFormatFrameSize aSize( GetFrameSize() ); aSize.SetSize(Size(std::max(rSize.Width(), long(MINFLY)), std::max(rSize.Height(), long(MINFLY)))); m_aSet.Put( aSize ); } -void SwFlyFrmAttrMgr::SetAttrSet(const SfxItemSet& rSet) +void SwFlyFrameAttrMgr::SetAttrSet(const SfxItemSet& rSet) { m_aSet.ClearItem(); m_aSet.Put( rSet ); diff --git a/sw/source/uibase/inc/FrameControl.hxx b/sw/source/uibase/inc/FrameControl.hxx index 789345253c14..0f47498307b6 100644 --- a/sw/source/uibase/inc/FrameControl.hxx +++ b/sw/source/uibase/inc/FrameControl.hxx @@ -10,8 +10,8 @@ #define INCLUDED_SW_SOURCE_UIBASE_INC_FRAMECONTROL_HXX class SwEditWin; -class SwPageFrm; -class SwFrm; +class SwPageFrame; +class SwFrame; class Point; /// Abstract interface to be implemented by writer FrameControls @@ -25,7 +25,7 @@ public: /// Returns true if the point is inside the control. virtual bool Contains( const Point &rDocPt ) const = 0; - virtual const SwFrm* GetFrame() = 0; + virtual const SwFrame* GetFrame() = 0; virtual SwEditWin* GetEditWin() = 0; }; @@ -51,18 +51,18 @@ public: class SwFrameMenuButtonBase : public MenuButton, public ISwFrameControl { VclPtr<SwEditWin> m_pEditWin; - const SwFrm* m_pFrm; + const SwFrame* m_pFrame; protected: virtual ~SwFrameMenuButtonBase() { disposeOnce(); } virtual void dispose() override; public: - SwFrameMenuButtonBase( SwEditWin* pEditWin, const SwFrm* pFrm ); + SwFrameMenuButtonBase( SwEditWin* pEditWin, const SwFrame* pFrame ); - virtual const SwFrm* GetFrame() override { return m_pFrm; } + virtual const SwFrame* GetFrame() override { return m_pFrame; } virtual SwEditWin* GetEditWin() override { return m_pEditWin; } - const SwPageFrm* GetPageFrame(); + const SwPageFrame* GetPageFrame(); }; #endif diff --git a/sw/source/uibase/inc/FrameControlsManager.hxx b/sw/source/uibase/inc/FrameControlsManager.hxx index 0d9c726955c8..6f0c45f70bab 100644 --- a/sw/source/uibase/inc/FrameControlsManager.hxx +++ b/sw/source/uibase/inc/FrameControlsManager.hxx @@ -18,12 +18,12 @@ #include <memory> #include <vector> -class SwPageFrm; +class SwPageFrame; class SwEditWin; typedef std::shared_ptr< SwFrameControl > SwFrameControlPtr; -typedef std::map<const SwFrm*, SwFrameControlPtr> SwFrameControlPtrMap; +typedef std::map<const SwFrame*, SwFrameControlPtr> SwFrameControlPtrMap; /** A container for the Header/Footer, or PageBreak controls. */ @@ -41,15 +41,15 @@ class SwFrameControlsManager SwFrameControlsManager( const SwFrameControlsManager& rCopy ); const SwFrameControlsManager& operator=( const SwFrameControlsManager& rCopy ); - SwFrameControlPtr GetControl( FrameControlType eType, const SwFrm* pFrm ); - void RemoveControls( const SwFrm* pFrm ); - void RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm ); + SwFrameControlPtr GetControl( FrameControlType eType, const SwFrame* pFrame ); + void RemoveControls( const SwFrame* pFrame ); + void RemoveControlsByType( FrameControlType eType, const SwFrame* pFrame ); void HideControls( FrameControlType eType ); void SetReadonlyControls( bool bReadonly ); // Helper methods - void SetHeaderFooterControl( const SwPageFrm* pPageFrm, FrameControlType eType, Point aOffset ); - void SetPageBreakControl( const SwPageFrm* pPageFrm ); + void SetHeaderFooterControl( const SwPageFrame* pPageFrame, FrameControlType eType, Point aOffset ); + void SetPageBreakControl( const SwPageFrame* pPageFrame ); }; #endif diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx index b110421a6d38..ec0980bfaeb0 100644 --- a/sw/source/uibase/inc/HeaderFooterWin.hxx +++ b/sw/source/uibase/inc/HeaderFooterWin.hxx @@ -29,7 +29,7 @@ class SwHeaderFooterWin : public SwFrameMenuButtonBase Timer m_aFadeTimer; public: - SwHeaderFooterWin( SwEditWin *pEditWin, const SwFrm *pFrm, bool bHeader ); + SwHeaderFooterWin( SwEditWin *pEditWin, const SwFrame *pFrame, bool bHeader ); virtual ~SwHeaderFooterWin( ); virtual void dispose() override; diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx index 2302966cb991..6ee987f3e333 100644 --- a/sw/source/uibase/inc/PageBreakWin.hxx +++ b/sw/source/uibase/inc/PageBreakWin.hxx @@ -13,7 +13,7 @@ #include <vcl/menubtn.hxx> -class SwPageFrm; +class SwPageFrame; /** Class for the page break control window. @@ -33,7 +33,7 @@ class SwPageBreakWin : public SwFrameMenuButtonBase const Point* m_pMousePt; public: - SwPageBreakWin( SwEditWin* pEditWin, const SwFrm *pFrm ); + SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame ); virtual ~SwPageBreakWin(); virtual void dispose() override; diff --git a/sw/source/uibase/inc/basesh.hxx b/sw/source/uibase/inc/basesh.hxx index b730c04e45bf..d24a57b5568d 100644 --- a/sw/source/uibase/inc/basesh.hxx +++ b/sw/source/uibase/inc/basesh.hxx @@ -33,7 +33,7 @@ class SwWrtShell; class SwView; class SfxItemSet; -class SwCrsrShell; +class SwCursorShell; struct DBTextStruct_Impl; class SwBaseShell: public SfxShell @@ -50,7 +50,7 @@ class SwBaseShell: public SfxShell // Update-Timer for graphic std::set<sal_uInt16> aGrfUpdateSlots; - DECL_LINK_TYPED( GraphicArrivedHdl, SwCrsrShell&, void ); + DECL_LINK_TYPED( GraphicArrivedHdl, SwCursorShell&, void ); protected: SwWrtShell& GetShell(); @@ -109,9 +109,9 @@ public: void ExecField(SfxRequest& rReq); - static void SetFrmMode( FlyMode eMode, SwWrtShell *pShell ); // with update! - static void _SetFrmMode( FlyMode eMode ) { eFrameMode = eMode; } - static FlyMode GetFrmMode() { return eFrameMode; } + static void SetFrameMode( FlyMode eMode, SwWrtShell *pShell ); // with update! + static void _SetFrameMode( FlyMode eMode ) { eFrameMode = eMode; } + static FlyMode GetFrameMode() { return eFrameMode; } }; #endif diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index 2677f98bf355..41be1655e2d0 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -35,13 +35,13 @@ class SfxPrinter; class SwViewShell; class SwViewOption; class SwContentOptPage; -class SwShdwCrsrOptionsTabPage; +class SwShdwCursorOptionsTabPage; // OS 12.01.95 // Item for settings dialog - document view class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem { - friend class SwShdwCrsrOptionsTabPage; + friend class SwShdwCursorOptionsTabPage; friend class SwModule; bool bParagraphEnd :1; diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx index cc6199355338..dbe87433b4f2 100644 --- a/sw/source/uibase/inc/chrdlg.hxx +++ b/sw/source/uibase/inc/chrdlg.hxx @@ -63,7 +63,7 @@ class SwCharURLPage : public SfxTabPage VclPtr<FixedText> m_pTextFT; VclPtr<Edit> m_pTextED; VclPtr<Edit> m_pNameED; - VclPtr<ComboBox> m_pTargetFrmLB; + VclPtr<ComboBox> m_pTargetFrameLB; VclPtr<PushButton> m_pURLPB; VclPtr<PushButton> m_pEventPB; VclPtr<ListBox> m_pVisitedLB; diff --git a/sw/source/uibase/inc/colex.hxx b/sw/source/uibase/inc/colex.hxx index 76c5ee383af5..529c682add4f 100644 --- a/sw/source/uibase/inc/colex.hxx +++ b/sw/source/uibase/inc/colex.hxx @@ -95,7 +95,7 @@ class SW_DLLPUBLIC SwColumnOnlyExample : public vcl::Window private: Size m_aWinSize; - Size m_aFrmSize; + Size m_aFrameSize; SwFormatCol m_aCols; protected: diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx index d956356ba852..79e5939cbaa8 100644 --- a/sw/source/uibase/inc/column.hxx +++ b/sw/source/uibase/inc/column.hxx @@ -120,7 +120,7 @@ class SwColumnPage : public SfxTabPage // Example VclPtr<SwColExample> m_pPgeExampleWN; - VclPtr<SwColumnOnlyExample> m_pFrmExampleWN; + VclPtr<SwColumnOnlyExample> m_pFrameExampleWN; SwColMgr* pColMgr; @@ -134,7 +134,7 @@ class SwColumnPage : public SfxTabPage std::map<VclPtr<MetricField>, PercentField*> m_aPercentFieldsMap; bool bFormat; - bool bFrm; + bool bFrame; bool bHtmlMode; bool bLockUpdate; @@ -181,7 +181,7 @@ public: virtual bool FillItemSet(SfxItemSet *rSet) override; virtual void Reset(const SfxItemSet *rSet) override; - void SetFrmMode(bool bMod); + void SetFrameMode(bool bMod); void SetPageWidth(long nPageWidth); void SetFormatUsed(bool bFormatUsed) diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 56cc43888832..41db7bff8f97 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -102,7 +102,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, SdrDropMarkerOverlay *m_pUserMarker; SdrObject *m_pUserMarkerObj; - SwShadowCursor *m_pShadCrsr; + SwShadowCursor *m_pShadCursor; Point *m_pRowColumnSelectionStart; // save position where table row/column selection has been started SwView &m_rView; @@ -114,11 +114,11 @@ friend void PageNumNotify( SwViewShell* pVwSh, SotExchangeDest m_nDropDestination; // destination from the last QueryDrop sal_uInt16 m_eBezierMode; - sal_uInt16 m_nInsFrmColCount; // column number for interactive frame + sal_uInt16 m_nInsFrameColCount; // column number for interactive frame SdrObjKind m_eDrawMode; bool m_bMBPressed : 1, m_bInsDraw : 1, - m_bInsFrm : 1, + m_bInsFrame : 1, m_bIsInMove : 1, m_bIsInDrag : 1, // don't execute StartExecuteDrag twice m_bOldIdle : 1, // to stop to idle @@ -126,7 +126,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, m_bTableInsDelMode : 1, m_bTableIsInsMode : 1, m_bChainMode : 1, // connect frames - m_bWasShdwCrsr : 1, // ShadowCrsr was on in MouseButtonDown + m_bWasShdwCursor : 1, // ShadowCursor was on in MouseButtonDown m_bLockInput : 1, // lock while calc panel is active m_bIsRowDrag : 1, //selection of rows is used, in combination with m_pRowColumnSelectionStart /** #i42732# display status of font size/name depending on either the input language or the @@ -230,19 +230,19 @@ public: inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { m_eDrawMode = eSdrObjectKind; SetObjectSelect( false ); } void StdDrawMode( SdrObjKind eSdrObjectKind, bool bObjSelect ); - bool IsFrmAction() const { return m_bInsFrm; } + bool IsFrameAction() const { return m_bInsFrame; } sal_uInt16 GetBezierMode() const { return m_eBezierMode; } void SetBezierMode(sal_uInt16 eBezMode) { m_eBezierMode = eBezMode; } void EnterDrawTextMode(const Point& aDocPos); // turn on DrawTextEditMode - void InsFrm(sal_uInt16 nCols); - void StopInsFrm(); - sal_uInt16 GetFrmColCount() const {return m_nInsFrmColCount;} // column number for interactive frame + void InsFrame(sal_uInt16 nCols); + void StopInsFrame(); + sal_uInt16 GetFrameColCount() const {return m_nInsFrameColCount;} // column number for interactive frame void SetChainMode( bool bOn ); bool IsChainMode() const { return m_bChainMode; } void FlushInBuffer(); - static bool IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCrsr ); + static bool IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCursor ); void SetApplyTemplate(const SwApplyTemplate &); SwApplyTemplate* GetApplyTemplate() const { return m_pApplyTempl; } diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx index 387ba8853498..418bdcdcc4a9 100644 --- a/sw/source/uibase/inc/frmdlg.hxx +++ b/sw/source/uibase/inc/frmdlg.hxx @@ -25,7 +25,7 @@ class SwWrtShell; // frame dialog -class SwFrmDlg : public SfxTabDialog +class SwFrameDlg : public SfxTabDialog { bool m_bFormat; bool m_bNew; @@ -50,15 +50,15 @@ class SwFrmDlg : public SfxTabDialog virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; public: - SwFrmDlg( SfxViewFrame *pFrame, vcl::Window *pParent, + SwFrameDlg( SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, - bool bNewFrm = false, + bool bNewFrame = false, const OUString& sResType = OUString("FrameDialog"), bool bFormat = false, const OString& sDefPage = OString(), const OUString* pFormatStr = nullptr); - virtual ~SwFrmDlg(); + virtual ~SwFrameDlg(); SwWrtShell* GetWrtShell() { return m_pWrtShell; } }; diff --git a/sw/source/uibase/inc/frmmgr.hxx b/sw/source/uibase/inc/frmmgr.hxx index 6ee012fd3727..4093edc8bdd1 100644 --- a/sw/source/uibase/inc/frmmgr.hxx +++ b/sw/source/uibase/inc/frmmgr.hxx @@ -45,14 +45,14 @@ const SwTwips DFLT_HEIGHT = MM50; #define FRMMGR_TYPE_OLE 0x04 #define FRMMGR_TYPE_ENVELP 0x10 -class SW_DLLPUBLIC SwFlyFrmAttrMgr +class SW_DLLPUBLIC SwFlyFrameAttrMgr { SfxItemSet m_aSet; Point m_aAbsPos; SwWrtShell* m_pOwnSh; bool m_bAbsPos, - m_bNewFrm; + m_bNewFrame; bool m_bIsInVertical; // --> OD 2009-09-01 #mongolianlayout# bool m_bIsInVerticalL2R; @@ -63,13 +63,13 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr SAL_DLLPRIVATE SwTwips CalcLeftSpace(); SAL_DLLPRIVATE SwTwips CalcRightSpace(); - SAL_DLLPRIVATE void _UpdateFlyFrm(); // post-treatment after insert or update + SAL_DLLPRIVATE void _UpdateFlyFrame(); // post-treatment after insert or update public: - SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ); + SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ); //CopyCtor for dialogs to check the metrics - SwFlyFrmAttrMgr( bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet ); + SwFlyFrameAttrMgr( bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet ); void SetAnchor(RndStdIds eId); inline RndStdIds GetAnchor() const; @@ -88,7 +88,7 @@ public: void SetSize(const Size& rLSize); inline const Size& GetSize() const; - void SetHeightSizeType(SwFrmSize eType); + void SetHeightSizeType(SwFrameSize eType); // space to content void SetLRSpace( long nLeft = LONG_MAX, @@ -100,11 +100,11 @@ public: // change and query attributes void UpdateAttrMgr(); - void UpdateFlyFrm(); + void UpdateFlyFrame(); // create new frame - bool InsertFlyFrm(); - void InsertFlyFrm(RndStdIds eAnchorType, + bool InsertFlyFrame(); + void InsertFlyFrame(RndStdIds eAnchorType, const Point &rPos, const Size &rSize, bool bAbsPos = false); @@ -125,42 +125,42 @@ public: inline const SwFormatHoriOrient &GetHoriOrient() const; inline const SvxShadowItem &GetShadow() const; inline const SvxBoxItem &GetBox() const; - inline const SwFormatFrmSize &GetFrmSize() const; + inline const SwFormatFrameSize &GetFrameSize() const; long CalcWidthBorder() { return CalcLeftSpace()+CalcRightSpace(); } long CalcHeightBorder() { return CalcTopSpace()+CalcBottomSpace(); } }; -inline const Size& SwFlyFrmAttrMgr::GetSize() const +inline const Size& SwFlyFrameAttrMgr::GetSize() const { - return static_cast<const SwFormatFrmSize&>(m_aSet.Get(RES_FRM_SIZE)).GetSize(); + return static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE)).GetSize(); } -inline const SwFormatVertOrient &SwFlyFrmAttrMgr::GetVertOrient() const +inline const SwFormatVertOrient &SwFlyFrameAttrMgr::GetVertOrient() const { return static_cast<const SwFormatVertOrient&>(m_aSet.Get(RES_VERT_ORIENT)); } -inline const SwFormatHoriOrient &SwFlyFrmAttrMgr::GetHoriOrient() const +inline const SwFormatHoriOrient &SwFlyFrameAttrMgr::GetHoriOrient() const { return static_cast<const SwFormatHoriOrient &>(m_aSet.Get(RES_HORI_ORIENT)); } -inline const SwFormatFrmSize& SwFlyFrmAttrMgr::GetFrmSize() const +inline const SwFormatFrameSize& SwFlyFrameAttrMgr::GetFrameSize() const { - return static_cast<const SwFormatFrmSize&>(m_aSet.Get(RES_FRM_SIZE)); + return static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE)); } -inline const SvxShadowItem &SwFlyFrmAttrMgr::GetShadow() const +inline const SvxShadowItem &SwFlyFrameAttrMgr::GetShadow() const { return static_cast<const SvxShadowItem&>(m_aSet.Get(RES_SHADOW)); } -inline const SvxBoxItem &SwFlyFrmAttrMgr::GetBox() const +inline const SvxBoxItem &SwFlyFrameAttrMgr::GetBox() const { return static_cast<const SvxBoxItem&>(m_aSet.Get(RES_BOX)); } -inline Point SwFlyFrmAttrMgr::GetPos() const +inline Point SwFlyFrameAttrMgr::GetPos() const { return Point( GetHoriOrient().GetPos(), GetVertOrient().GetPos() ); } -inline RndStdIds SwFlyFrmAttrMgr::GetAnchor() const +inline RndStdIds SwFlyFrameAttrMgr::GetAnchor() const { return static_cast<const SwFormatAnchor&>(m_aSet.Get(RES_ANCHOR)).GetAnchorId(); } diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 27ab4f4d5744..1a0594d8abc3 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -34,12 +34,12 @@ namespace sfx2{class FileDialogHelper;} class SwWrtShell; -struct FrmMap; +struct FrameMap; // OD 12.11.2003 #i22341# struct SwPosition; // frame dialog -class SwFrmPage: public SfxTabPage +class SwFramePage: public SfxTabPage { // size VclPtr<FixedText> m_pWidthFT; @@ -120,8 +120,8 @@ class SwFrmPage: public SfxTabPage sal_Int16 m_nOldV; sal_Int16 m_nOldVRel; - FrmMap* m_pVMap; - FrmMap* m_pHMap; + FrameMap* m_pVMap; + FrameMap* m_pHMap; bool m_bAllowVertPositioning; bool m_bIsMathOLE; @@ -154,29 +154,29 @@ class SwFrmPage: public SfxTabPage void Init(const SfxItemSet& rSet, bool bReset = false); // OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in the alignment. - sal_Int32 FillPosLB( const FrmMap* _pMap, + sal_Int32 FillPosLB( const FrameMap* _pMap, const sal_Int16 _nAlign, const sal_Int16 _nRel, ListBox& _rLB ); // OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in their string entries. - sal_uLong FillRelLB( const FrmMap* _pMap, + sal_uLong FillRelLB( const FrameMap* _pMap, const sal_uInt16 _nLBSelPos, const sal_Int16 _nAlign, const sal_Int16 _nRel, ListBox& _rLB, FixedText& _rFT ); - sal_Int32 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ); - static sal_Int16 GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); - static sal_Int16 GetRelation(FrmMap *pMap, ListBox &rRelationLB); + sal_Int32 GetMapPos( const FrameMap *pMap, ListBox &rAlignLB ); + static sal_Int16 GetAlignment(FrameMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); + static sal_Int16 GetRelation(FrameMap *pMap, ListBox &rRelationLB); RndStdIds GetAnchor(); - void setOptimalFrmWidth(); + void setOptimalFrameWidth(); void setOptimalRelWidth(); void EnableGraficMode(); // hides auto check boxes and re-org controls for "Real Size" button - SwWrtShell *getFrmDlgParentShell(); + SwWrtShell *getFrameDlgParentShell(); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; @@ -184,8 +184,8 @@ class SwFrmPage: public SfxTabPage static const sal_uInt16 aPageRg[]; public: - SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet); - virtual ~SwFrmPage(); + SwFramePage(vcl::Window *pParent, const SfxItemSet &rSet); + virtual ~SwFramePage(); virtual void dispose() override; static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet); @@ -196,7 +196,7 @@ public: void SetNewFrame(bool bNewFrame) { m_bNew = bNewFrame; } void SetFormatUsed(bool bFormat); - void SetFrmType(const OUString &rType) { m_sDlgType = rType; } + void SetFrameType(const OUString &rType) { m_sDlgType = rType; } inline bool IsInGraficMode() { return m_sDlgType == "PictureDialog" || m_sDlgType == "ObjectDialog"; } void EnableVerticalPositioning( bool bEnable ); }; @@ -243,7 +243,7 @@ public: virtual sfxpg DeactivatePage(SfxItemSet *pSet) override; }; -class SwFrmURLPage : public SfxTabPage +class SwFrameURLPage : public SfxTabPage { // hyperlink VclPtr<Edit> pURLED; @@ -261,8 +261,8 @@ class SwFrmURLPage : public SfxTabPage using SfxTabPage::DeactivatePage; public: - SwFrmURLPage(vcl::Window *pParent, const SfxItemSet &rSet); - virtual ~SwFrmURLPage(); + SwFrameURLPage(vcl::Window *pParent, const SfxItemSet &rSet); + virtual ~SwFrameURLPage(); virtual void dispose() override; static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet); @@ -271,7 +271,7 @@ public: virtual void Reset(const SfxItemSet *rSet) override; }; -class SwFrmAddPage : public SfxTabPage +class SwFrameAddPage : public SfxTabPage { VclPtr<VclContainer> m_pNameFrame; VclPtr<FixedText> m_pNameFT; @@ -310,8 +310,8 @@ class SwFrmAddPage : public SfxTabPage static const sal_uInt16 aAddPgRg[]; public: - SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet); - virtual ~SwFrmAddPage(); + SwFrameAddPage(vcl::Window *pParent, const SfxItemSet &rSet); + virtual ~SwFrameAddPage(); virtual void dispose() override; static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet); @@ -321,7 +321,7 @@ public: virtual void Reset(const SfxItemSet *rSet) override; void SetFormatUsed(bool bFormat); - void SetFrmType(const OUString &rType) { m_sDlgType = rType; } + void SetFrameType(const OUString &rType) { m_sDlgType = rType; } void SetNewFrame(bool bNewFrame) { m_bNew = bNewFrame; } void SetShell(SwWrtShell* pSh) { m_pWrtSh = pSh; } diff --git a/sw/source/uibase/inc/initui.hxx b/sw/source/uibase/inc/initui.hxx index 1cf7a3e75454..b98220511877 100644 --- a/sw/source/uibase/inc/initui.hxx +++ b/sw/source/uibase/inc/initui.hxx @@ -39,8 +39,8 @@ SW_DLLPUBLIC OUString GetOldGrfCat(); SW_DLLPUBLIC void SetOldGrfCat(const OUString& sStr); SW_DLLPUBLIC OUString GetOldTabCat(); SW_DLLPUBLIC void SetOldTabCat(const OUString& sStr); -SW_DLLPUBLIC OUString GetOldFrmCat(); -SW_DLLPUBLIC void SetOldFrmCat(const OUString& sStr); +SW_DLLPUBLIC OUString GetOldFrameCat(); +SW_DLLPUBLIC void SetOldFrameCat(const OUString& sStr); SW_DLLPUBLIC OUString GetOldDrwCat(); SW_DLLPUBLIC void SetOldDrwCat(const OUString& sStr); diff --git a/sw/source/uibase/inc/navmgr.hxx b/sw/source/uibase/inc/navmgr.hxx index d462cf0a7736..96288ba467db 100644 --- a/sw/source/uibase/inc/navmgr.hxx +++ b/sw/source/uibase/inc/navmgr.hxx @@ -19,14 +19,14 @@ class SwWrtShell; struct SwPosition; -class SwUnoCrsr; +class SwUnoCursor; class SwNavigationMgr { private: /* * List of entries in the navigation history - * Entries are SwUnoCrsr because these gets corrected automatically + * Entries are SwUnoCursor because these gets corrected automatically * when nodes are deleted. * * The navigation history behaves as a stack, to which items are added when we jump to a new position diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index cb125f858d46..03d65cdfff5d 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -236,8 +236,8 @@ public: }; -// TabPage for ShadowCrsr -class SwShdwCrsrOptionsTabPage : public SfxTabPage +// TabPage for ShadowCursor +class SwShdwCursorOptionsTabPage : public SfxTabPage { //nonprinting characters VclPtr<CheckBox> m_pParaCB; @@ -259,7 +259,7 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage VclPtr<RadioButton> m_pFillSpaceRB; VclPtr<VclFrame> m_pCursorProtFrame; - VclPtr<CheckBox> m_pCrsrInProtCB; + VclPtr<CheckBox> m_pCursorInProtCB; VclPtr<CheckBox> m_pIgnoreProtCB; VclPtr<CheckBox> m_pMathBaselineAlignmentCB; @@ -267,8 +267,8 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage SwWrtShell * m_pWrtShell; public: - SwShdwCrsrOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~SwShdwCrsrOptionsTabPage(); + SwShdwCursorOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); + virtual ~SwShdwCursorOptionsTabPage(); virtual void dispose() override; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index 0c97e69b2d31..35cb5ef488fe 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -166,7 +166,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell //viewdata of the previous SwView and the new crsrposition OUString sSwViewData; //and the new cursor position if the user double click in the PagePreview - OUString sNewCrsrPos; + OUString sNewCursorPos; // to support keyboard the number of the page to go to can be set too sal_uInt16 nNewPage; // visible range @@ -256,8 +256,8 @@ public: bool HandleWheelCommands( const CommandEvent& ); OUString GetPrevSwViewData() const { return sSwViewData; } - void SetNewCrsrPos( const OUString& rStr ) { sNewCrsrPos = rStr; } - const OUString& GetNewCrsrPos() const { return sNewCrsrPos; } + void SetNewCursorPos( const OUString& rStr ) { sNewCursorPos = rStr; } + const OUString& GetNewCursorPos() const { return sNewCursorPos; } sal_uInt16 GetNewPage() const {return nNewPage;} void SetNewPage(sal_uInt16 nSet) {nNewPage = nSet;} diff --git a/sw/source/uibase/inc/shdwcrsr.hxx b/sw/source/uibase/inc/shdwcrsr.hxx index 96002be9516d..46dae2953a6f 100644 --- a/sw/source/uibase/inc/shdwcrsr.hxx +++ b/sw/source/uibase/inc/shdwcrsr.hxx @@ -34,7 +34,7 @@ class SwShadowCursor sal_uInt16 nOldMode; void DrawTri( const Point& rPt, long nHeight, bool bLeft ); - void DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode ); + void DrawCursor( const Point& rPt, long nHeight, sal_uInt16 nMode ); public: SwShadowCursor( vcl::Window& rWin, const Color& rCol ) diff --git a/sw/source/uibase/inc/tabsh.hxx b/sw/source/uibase/inc/tabsh.hxx index 1ae2653d4964..607a65b0de99 100644 --- a/sw/source/uibase/inc/tabsh.hxx +++ b/sw/source/uibase/inc/tabsh.hxx @@ -41,7 +41,7 @@ private: public: void Execute(SfxRequest &); void GetState(SfxItemSet &); - void GetFrmBorderState(SfxItemSet &rSet); + void GetFrameBorderState(SfxItemSet &rSet); void GetLineStyleState(SfxItemSet &rSet); void ExecTableStyle(SfxRequest& rReq); diff --git a/sw/source/uibase/inc/textsh.hxx b/sw/source/uibase/inc/textsh.hxx index e28067d44830..366a7ae2fed7 100644 --- a/sw/source/uibase/inc/textsh.hxx +++ b/sw/source/uibase/inc/textsh.hxx @@ -25,7 +25,7 @@ class AbstractSvxPostItDialog; class SwFieldMgr; -class SwFlyFrmAttrMgr; +class SwFlyFrameAttrMgr; class SvxHyperlinkItem; class SW_DLLPUBLIC SwTextShell: public SwBaseShell @@ -80,7 +80,7 @@ public: SwTextShell(SwView &rView); virtual ~SwTextShell(); /// Create item set for the insert frame dialog. - SfxItemSet CreateInsertFrameItemSet(SwFlyFrmAttrMgr& rMgr); + SfxItemSet CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr); }; void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq ); diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx index 3ae07ead1bd2..7713246fc059 100644 --- a/sw/source/uibase/inc/uivwimp.hxx +++ b/sw/source/uibase/inc/uivwimp.hxx @@ -151,15 +151,15 @@ public: #endif //#i33307# restore editing position - void SetRestorePosition(const Point& rCrsrPos, bool bSelectObj) + void SetRestorePosition(const Point& rCursorPos, bool bSelectObj) { - m_aEditingPosition = rCrsrPos; + m_aEditingPosition = rCursorPos; m_bSelectObject = bSelectObj; m_bEditingPositionSet = true; } - bool GetRestorePosition(Point& rCrsrPos, bool& rbSelectObj) + bool GetRestorePosition(Point& rCursorPos, bool& rbSelectObj) { - rCrsrPos = m_aEditingPosition; + rCursorPos = m_aEditingPosition; rbSelectObj = m_bSelectObject; return m_bEditingPositionSet; } diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx index 4164dd6dfe6d..f551e8f2efaa 100644 --- a/sw/source/uibase/inc/unotools.hxx +++ b/sw/source/uibase/inc/unotools.hxx @@ -36,11 +36,11 @@ class SwOneExampleFrame; -class SwFrmCtrlWindow : public VclEventBox +class SwFrameCtrlWindow : public VclEventBox { SwOneExampleFrame* pExampleFrame; public: - SwFrmCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame); + SwFrameCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame); virtual void Command( const CommandEvent& rCEvt ) override; virtual Size GetOptimalSize() const override; @@ -73,7 +73,7 @@ class SW_DLLPUBLIC SwOneExampleFrame css::uno::Reference< css::frame::XController > _xController; css::uno::Reference< css::text::XTextCursor > _xCursor; - VclPtr<SwFrmCtrlWindow> aTopWindow; + VclPtr<SwFrameCtrlWindow> aTopWindow; Idle aLoadedIdle; Link<SwOneExampleFrame&,void> aInitializedLink; diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx index 17c2cb714c1c..940941870536 100644 --- a/sw/source/uibase/inc/wrap.hxx +++ b/sw/source/uibase/inc/wrap.hxx @@ -68,7 +68,7 @@ class SwWrapTabPage: public SfxTabPage RndStdIds m_nAnchorId; sal_uInt16 m_nHtmlMode; - Size m_aFrmSize; + Size m_aFrameSize; SwWrtShell* m_pWrtSh; bool m_bFormat; diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 8ab49ef721d0..d5fd8817bb34 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -32,7 +32,7 @@ namespace vcl { class Window; } class SbxArray; class SwDoc; class SwViewOption; -class SwFlyFrmAttrMgr; +class SwFlyFrameAttrMgr; class SwField; class SwTOXBase; class SwView; @@ -80,22 +80,22 @@ string, and take care of undo etc. class SW_DLLPUBLIC SwWrtShell: public SwFEShell { private: - using SwCrsrShell::Left; - using SwCrsrShell::Right; - using SwCrsrShell::Up; - using SwCrsrShell::Down; - using SwCrsrShell::LeftMargin; - using SwCrsrShell::RightMargin; - using SwCrsrShell::SelectTextAttr; - using SwCrsrShell::GotoPage; + using SwCursorShell::Left; + using SwCursorShell::Right; + using SwCursorShell::Up; + using SwCursorShell::Down; + using SwCursorShell::LeftMargin; + using SwCursorShell::RightMargin; + using SwCursorShell::SelectTextAttr; + using SwCursorShell::GotoPage; using SwFEShell::InsertObject; using SwEditShell::AutoCorrect; - using SwCrsrShell::GotoMark; + using SwCursorShell::GotoMark; typedef long (SwWrtShell::*SELECTFUNC)(const Point *, bool bProp ); SELECTFUNC m_fnDrag; - SELECTFUNC m_fnSetCrsr; + SELECTFUNC m_fnSetCursor; SELECTFUNC m_fnEndDrag; SELECTFUNC m_fnKillSel; @@ -103,7 +103,7 @@ public: using SwEditShell::Insert; - long CallSetCursor(const Point* pPt, bool bProp) { return (this->*m_fnSetCrsr)(pPt, bProp); } + long CallSetCursor(const Point* pPt, bool bProp) { return (this->*m_fnSetCursor)(pPt, bProp); } long Drag (const Point* pPt, bool bProp) { return (this->*m_fnDrag)(pPt, bProp); } long EndDrag (const Point* pPt, bool bProp) { return (this->*m_fnEndDrag)(pPt, bProp); } long KillSelection(const Point* pPt, bool bProp) { return (this->*m_fnKillSel)(pPt, bProp); } @@ -124,9 +124,9 @@ public: bool IsInSelect() const { return m_bInSelect; } void SetInSelect(bool bSel = true) { m_bInSelect = bSel; } // is there a text- or frameselection? - bool HasSelection() const { return SwCrsrShell::HasSelection() || - IsMultiSelection() || IsSelFrmMode() || IsObjSelected(); } - bool Pop( bool bOldCrsr = true ); + bool HasSelection() const { return SwCursorShell::HasSelection() || + IsMultiSelection() || IsSelFrameMode() || IsObjSelected(); } + bool Pop( bool bOldCursor = true ); void EnterStdMode(); bool IsStdMode() const { return !m_bExtMode && !m_bAddMode && !m_bBlockMode; } @@ -151,11 +151,11 @@ public: bool IsInsMode() const { return m_bIns; } void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode ); - void EnterSelFrmMode(const Point *pStartDrag = nullptr); - void LeaveSelFrmMode(); - bool IsSelFrmMode() const { return m_bLayoutMode; } + void EnterSelFrameMode(const Point *pStartDrag = nullptr); + void LeaveSelFrameMode(); + bool IsSelFrameMode() const { return m_bLayoutMode; } // reset selection of frames - void UnSelectFrm(); + void UnSelectFrame(); void Invalidate(); @@ -244,12 +244,12 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // setting the cursor; remember the old position for turning back DECL_LINK_TYPED( ExecFlyMac, const SwFlyFrameFormat*, void ); - bool PageCrsr(SwTwips lOffset, bool bSelect); + bool PageCursor(SwTwips lOffset, bool bSelect); // update fields void UpdateInputFields( SwInputFieldList* pLst = nullptr ); - void NoEdit(bool bHideCrsr = true); + void NoEdit(bool bHideCursor = true); void Edit(); bool IsRetainSelection() const { return m_bRetainSelection; } @@ -264,7 +264,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); long DelLine(); long DelLeft(); - // also deletes the frame or sets the cursor in the frame when bDelFrm == false + // also deletes the frame or sets the cursor in the frame when bDelFrame == false long DelRight(); long DelToEndOfPara(); long DelToStartOfPara(); @@ -290,7 +290,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void Insert(const OUString &); // graphic void Insert( const OUString &rPath, const OUString &rFilter, - const Graphic &, SwFlyFrmAttrMgr * = nullptr, + const Graphic &, SwFlyFrameAttrMgr * = nullptr, bool bRule = false ); void InsertByWord( const OUString & ); @@ -329,10 +329,10 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset ) override; virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj, const SwRect *pFlyPrtRect = nullptr, - const SwRect *pFlyFrmRect = nullptr, - const bool bNoTextFrmPrtAreaChanged = false ) override; + const SwRect *pFlyFrameRect = nullptr, + const bool bNoTextFramePrtAreaChanged = false ) override; virtual void ConnectObj( svt::EmbeddedObjectRef& xIPObj, const SwRect &rPrt, - const SwRect &rFrm ) override; + const SwRect &rFrame ) override; // styles and formats @@ -349,7 +349,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void SetPageStyle(const OUString &rCollName); - OUString GetCurPageStyle( const bool bCalcFrm = true ) const; + OUString GetCurPageStyle( const bool bCalcFrame = true ) const; // change current style using the attributes in effect void QuickUpdateStyle(); @@ -384,7 +384,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // action ahead of cursor movement // resets selection if applicable, triggers timer and GCAttr() - void MoveCrsr( bool bWithSelect = false ); + void MoveCursor( bool bWithSelect = false ); // update input fields bool StartInputFieldDlg(SwField*, bool bNextButton, vcl::Window* pParentWin = nullptr, OString* pWindowState = nullptr); @@ -500,35 +500,35 @@ private: MV_PAGE_DOWN } m_ePageMove; - struct CrsrStack + struct CursorStack { Point aDocPos; - CrsrStack *pNext; + CursorStack *pNext; bool bValidCurPos : 1; - bool bIsFrmSel : 1; + bool bIsFrameSel : 1; SwTwips lOffset; - CrsrStack( bool bValid, bool bFrmSel, const Point &rDocPos, - SwTwips lOff, CrsrStack *pN ) + CursorStack( bool bValid, bool bFrameSel, const Point &rDocPos, + SwTwips lOff, CursorStack *pN ) : aDocPos(rDocPos), pNext(pN), bValidCurPos( bValid ), - bIsFrmSel( bFrmSel ), + bIsFrameSel( bFrameSel ), lOffset(lOff) { } - } *m_pCrsrStack; + } *m_pCursorStack; SwView &m_rView; SwNavigationMgr m_aNavigationMgr; Point m_aDest; bool m_bDestOnStack; - bool HasCrsrStack() const { return nullptr != m_pCrsrStack; } - SAL_DLLPRIVATE bool PushCrsr(SwTwips lOffset, bool bSelect); - SAL_DLLPRIVATE bool PopCrsr(bool bUpdate, bool bSelect = false); + bool HasCursorStack() const { return nullptr != m_pCursorStack; } + SAL_DLLPRIVATE bool PushCursor(SwTwips lOffset, bool bSelect); + SAL_DLLPRIVATE bool PopCursor(bool bUpdate, bool bSelect = false); // take END cursor along when PageUp / -Down SAL_DLLPRIVATE bool _SttWrd(); @@ -563,10 +563,10 @@ private: // resets the cursor stack after movement by PageUp/-Down SAL_DLLPRIVATE void _ResetCursorStack(); - using SwCrsrShell::SetCrsr; - SAL_DLLPRIVATE long SetCrsr(const Point *, bool bProp=false ); + using SwCursorShell::SetCursor; + SAL_DLLPRIVATE long SetCursor(const Point *, bool bProp=false ); - SAL_DLLPRIVATE long SetCrsrKillSel(const Point *, bool bProp=false ); + SAL_DLLPRIVATE long SetCursorKillSel(const Point *, bool bProp=false ); SAL_DLLPRIVATE long BeginDrag(const Point *, bool bProp=false ); SAL_DLLPRIVATE long DefaultDrag(const Point *, bool bProp=false ); @@ -575,10 +575,10 @@ private: SAL_DLLPRIVATE long ExtSelWrd(const Point *, bool bProp=false ); SAL_DLLPRIVATE long ExtSelLn(const Point *, bool bProp=false ); - SAL_DLLPRIVATE long BeginFrmDrag(const Point *, bool bProp=false ); + SAL_DLLPRIVATE long BeginFrameDrag(const Point *, bool bProp=false ); // after SSize/Move of a frame update; Point is destination. - SAL_DLLPRIVATE long UpdateLayoutFrm(const Point *, bool bProp=false ); + SAL_DLLPRIVATE long UpdateLayoutFrame(const Point *, bool bProp=false ); SAL_DLLPRIVATE long SttLeaveSelect(const Point *, bool bProp=false ); SAL_DLLPRIVATE long AddLeaveSelect(const Point *, bool bProp=false ); @@ -603,7 +603,7 @@ private: inline void SwWrtShell::ResetCursorStack() { - if ( HasCrsrStack() ) + if ( HasCursorStack() ) _ResetCursorStack(); } diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index 79cf3464c38b..95d2ece08aff 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -59,7 +59,7 @@ using namespace ::com::sun::star::i18n; static void lcl_ActivateTextShell( SwWrtShell & rWrtSh ) { - if( rWrtSh.IsSelFrmMode() || rWrtSh.IsObjSelected() ) + if( rWrtSh.IsSelFrameMode() || rWrtSh.IsObjSelected() ) rWrtSh.EnterStdMode(); } @@ -174,19 +174,19 @@ void SwHHCWrapper::GetNextPortion( m_nUnitOffset = 0; // build last pos from currently selected text - SwPaM* pCrsr = m_rWrtShell.GetCrsr(); - m_nLastPos = pCrsr->Start()->nContent.GetIndex(); + SwPaM* pCursor = m_rWrtShell.GetCursor(); + m_nLastPos = pCursor->Start()->nContent.GetIndex(); } void SwHHCWrapper::SelectNewUnit_impl( sal_Int32 nUnitStart, sal_Int32 nUnitEnd ) { - SwPaM *pCrsr = m_rWrtShell.GetCrsr(); - pCrsr->GetPoint()->nContent = m_nLastPos; - pCrsr->DeleteMark(); + SwPaM *pCursor = m_rWrtShell.GetCursor(); + pCursor->GetPoint()->nContent = m_nLastPos; + pCursor->DeleteMark(); m_rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ false, (sal_uInt16) (m_nUnitOffset + nUnitStart), true ); - pCrsr->SetMark(); + pCursor->SetMark(); m_rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ true, (sal_uInt16) (nUnitEnd - nUnitStart), true ); // end selection now. Otherwise SHIFT+HOME (extending the selection) @@ -215,7 +215,7 @@ void SwHHCWrapper::HandleNewUnit( void SwHHCWrapper::ChangeText( const OUString &rNewText, const OUString& rOrigText, const uno::Sequence< sal_Int32 > *pOffsets, - SwPaM *pCrsr ) + SwPaM *pCursor ) { //!! please see also TextConvWrapper::ChangeText with is a modified //!! copy of this code @@ -224,10 +224,10 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText, if (rNewText.isEmpty()) return; - if (pOffsets && pCrsr) // try to keep as much attributation as possible ? + if (pOffsets && pCursor) // try to keep as much attributation as possible ? { // remember cursor start position for later setting of the cursor - const SwPosition *pStart = pCrsr->Start(); + const SwPosition *pStart = pCursor->Start(); const sal_Int32 nStartIndex = pStart->nContent.GetIndex(); const SwNodeIndex aStartNodeIndex = pStart->nNode; SwTextNode *pStartTextNode = aStartNodeIndex.GetNode().GetTextNode(); @@ -274,9 +274,9 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText, // set selection to sub string to be replaced in original text sal_Int32 nChgInNodeStartIndex = nStartIndex + nCorrectionOffset + nChgPos; - OSL_ENSURE( m_rWrtShell.GetCrsr()->HasMark(), "cursor misplaced (nothing selected)" ); - m_rWrtShell.GetCrsr()->GetMark()->nContent.Assign( pStartTextNode, nChgInNodeStartIndex ); - m_rWrtShell.GetCrsr()->GetPoint()->nContent.Assign( pStartTextNode, nChgInNodeStartIndex + nChgLen ); + OSL_ENSURE( m_rWrtShell.GetCursor()->HasMark(), "cursor misplaced (nothing selected)" ); + m_rWrtShell.GetCursor()->GetMark()->nContent.Assign( pStartTextNode, nChgInNodeStartIndex ); + m_rWrtShell.GetCursor()->GetPoint()->nContent.Assign( pStartTextNode, nChgInNodeStartIndex + nChgLen ); // replace selected sub string with the corresponding // sub string from the new text while keeping as @@ -307,7 +307,7 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText, // (as it would happen after ChangeText_impl (Delete and Insert) // of the whole text in the 'else' branch below) m_rWrtShell.ClearMark(); - m_rWrtShell.GetCrsr()->Start()->nContent.Assign( pStartTextNode, nStartIndex + nConvTextLen ); + m_rWrtShell.GetCursor()->Start()->nContent.Assign( pStartTextNode, nStartIndex + nConvTextLen ); } else { @@ -332,9 +332,9 @@ void SwHHCWrapper::ChangeText_impl( const OUString &rNewText, bool bKeepAttribut m_rWrtShell.Insert( rNewText ); // select new inserted text (currently the Point is right after the new text) - if (!m_rWrtShell.GetCrsr()->HasMark()) - m_rWrtShell.GetCrsr()->SetMark(); - SwPosition *pMark = m_rWrtShell.GetCrsr()->GetMark(); + if (!m_rWrtShell.GetCursor()->HasMark()) + m_rWrtShell.GetCursor()->SetMark(); + SwPosition *pMark = m_rWrtShell.GetCursor()->GetMark(); pMark->nContent = pMark->nContent.GetIndex() - rNewText.getLength(); // since 'SetAttr' below functions like merging with the attributes @@ -447,7 +447,7 @@ void SwHHCWrapper::ReplaceUnit( pRuby->SetAdjustment( RubyAdjust_CENTER ); #if OSL_DEBUG_LEVEL > 1 - SwPaM *pPaM = m_rWrtShell.GetCrsr(); + SwPaM *pPaM = m_rWrtShell.GetCursor(); (void)pPaM; #endif m_rWrtShell.SetAttrItem(*pRuby); @@ -463,7 +463,7 @@ void SwHHCWrapper::ReplaceUnit( // Thus we do this only for Chinese translation... const bool bIsChineseConversion = IsChinese( GetSourceLanguage() ); if (bIsChineseConversion) - ChangeText( aNewText, rOrigText, &rOffsets, m_rWrtShell.GetCrsr() ); + ChangeText( aNewText, rOrigText, &rOffsets, m_rWrtShell.GetCursor() ); else ChangeText( aNewText, rOrigText, nullptr, nullptr ); @@ -471,7 +471,7 @@ void SwHHCWrapper::ReplaceUnit( if (bIsChineseConversion) { m_rWrtShell.SetMark(); - m_rWrtShell.GetCrsr()->GetMark()->nContent -= aNewText.getLength(); + m_rWrtShell.GetCursor()->GetMark()->nContent -= aNewText.getLength(); OSL_ENSURE( GetTargetLanguage() == LANGUAGE_CHINESE_SIMPLIFIED || GetTargetLanguage() == LANGUAGE_CHINESE_TRADITIONAL, "SwHHCWrapper::ReplaceUnit : unexpected target language" ); @@ -520,9 +520,9 @@ void SwHHCWrapper::Convert() { OSL_ENSURE( m_pConvArgs == nullptr, "NULL pointer expected" ); { - SwPaM *pCrsr = m_pView->GetWrtShell().GetCrsr(); - SwPosition* pSttPos = pCrsr->Start(); - SwPosition* pEndPos = pCrsr->End(); + SwPaM *pCursor = m_pView->GetWrtShell().GetCursor(); + SwPosition* pSttPos = pCursor->Start(); + SwPosition* pEndPos = pCursor->End(); if (pSttPos->nNode.GetNode().IsTextNode() && pEndPos->nNode.GetNode().IsTextNode()) @@ -568,7 +568,7 @@ void SwHHCWrapper::Convert() // convertible unit in order for the text conversion to give // the correct result for that. Since it is easier to obtain // the start of the word we use that though. - if (!pCrsr->HasMark()) // is not a selection? + if (!pCursor->HasMark()) // is not a selection? { // since #118246 / #117803 still occurs if the cursor is placed // between the two chinese characters to be converted (because both diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 3202dcee2250..66cf66f94b18 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -671,7 +671,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, m_pSh->GetCrsrDescr()); + aRewriter.AddRule(UndoArg1, m_pSh->GetCursorDescr()); aRewriter.AddRule(UndoArg2, OUString(SW_RES(STR_YIELDS))); OUString aTmpStr( SW_RES(STR_START_QUOTE) ); @@ -728,7 +728,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } else if (nId == MN_IGNORE_SELECTION) { - SwPaM *pPaM = m_pSh->GetCrsr(); + SwPaM *pPaM = m_pSh->GetCursor(); if (pPaM) SwEditShell::IgnoreGrammarErrorAt( *pPaM ); } @@ -742,7 +742,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) m_xGrammarResult.aErrors[ m_nGrammarError ].aRuleIdentifier, m_xGrammarResult.aLocale ); // refresh the layout of the actual paragraph (faster) - SwPaM *pPaM = m_pSh->GetCrsr(); + SwPaM *pPaM = m_pSh->GetCursor(); if (pPaM) SwEditShell::IgnoreGrammarErrorAt( *pPaM ); // refresh the layout of all paragraphs (workaround to launch a dictionary event) diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index c1aaf362f383..556be6dcff23 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -740,10 +740,10 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd) pCurrRedline = pSh->GetCurrRedline(); if( !pCurrRedline ) { - pSh->SwCrsrShell::Push(); + pSh->SwCursorShell::Push(); if( nullptr == (pCurrRedline = pSh->SelNextRedline())) pCurrRedline = pSh->SelPrevRedline(); - pSh->SwCrsrShell::Pop( false ); + pSh->SwCursorShell::Pop( false ); } } else @@ -1035,7 +1035,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void) // disable commenting for protected areas if (nPos != USHRT_MAX && (pRed = pSh->GotoRedline(nPos, true)) != nullptr) { - if( pSh->IsCrsrPtAtEnd() ) + if( pSh->IsCursorPtAtEnd() ) pSh->SwapPam(); pSh->SetInSelect(); } diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index 684a5d9360a5..adb095a7fb16 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -198,8 +198,8 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) pSdrView->UnmarkAllPoints(); } } - if (!m_pSh->IsSelFrmMode()) - m_pSh->EnterSelFrmMode(); + if (!m_pSh->IsSelFrameMode()) + m_pSh->EnterSelFrameMode(); if( (bReturn = m_pSh->BeginMark(m_aStartPos)) ) m_pWin->SetDrawAction(true); @@ -280,18 +280,18 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) aReq.Done(); } bAutoCap = true; - if(m_pWin->GetFrmColCount() > 1) + if(m_pWin->GetFrameColCount() > 1) { SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL); SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL))); - aCol.Init(m_pWin->GetFrmColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth()); + aCol.Init(m_pWin->GetFrameColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth()); aSet.Put(aCol); // Template AutoUpdate SwFrameFormat* pFormat = m_pSh->GetSelectedFrameFormat(); if(pFormat && pFormat->IsAutoUpdateFormat()) m_pSh->AutoUpdateFrame(pFormat, aSet); else - m_pSh->SetFlyFrmAttr( aSet ); + m_pSh->SetFlyFrameAttr( aSet ); } } if (m_pWin->GetSdrDrawMode() == OBJ_NONE) @@ -321,7 +321,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt)) { m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() && - m_pSh->IsSelFrmMode()) ? SW_ADD_SELECT : 0); + m_pSh->IsSelFrameMode()) ? SW_ADD_SELECT : 0); if (!m_pSh->IsObjSelected()) { @@ -329,8 +329,8 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); } m_pView->NoRotate(); @@ -340,12 +340,12 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { if (m_pSh->IsObjSelectable(aPnt)) m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() && - m_pSh->IsSelFrmMode() ) ? SW_ADD_SELECT : 0 ); + m_pSh->IsSelFrameMode() ) ? SW_ADD_SELECT : 0 ); else { m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); } m_pView->NoRotate(); @@ -378,7 +378,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) if (!rMEvt.IsShift()) pSdrView->UnmarkAllPoints(); m_pSh->SelectObj(aPnt, (rMEvt.IsShift() && - m_pSh->IsSelFrmMode()) ? SW_ADD_SELECT :0); + m_pSh->IsSelFrameMode()) ? SW_ADD_SELECT :0); } if (!m_pSh->IsObjSelected()) @@ -387,8 +387,8 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); } m_pView->NoRotate(); @@ -401,8 +401,8 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) { m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); m_pView->NoRotate(); bReturn = true; @@ -583,8 +583,8 @@ void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt) else { m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); } m_pView->NoRotate(); } diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index c27b2e32d4a6..178be93a7648 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -206,7 +206,7 @@ void SwInputWindow::ShowWin() OSL_ENSURE(pWrtShell, "no WrtShell!"); // Cursor in table - bIsTable = pWrtShell->IsCrsrInTable(); + bIsTable = pWrtShell->IsCursorInTable(); if( bFirst ) pWrtShell->SelTableCells( LINK( this, SwInputWindow, @@ -249,13 +249,13 @@ void SwInputWindow::ShowWin() pWrtShell->DoUndo(); } - if( !pWrtShell->SwCrsrShell::HasSelection() ) + if( !pWrtShell->SwCursorShell::HasSelection() ) { pWrtShell->MoveSection( fnSectionCurr, fnSectionStart ); pWrtShell->SetMark(); pWrtShell->MoveSection( fnSectionCurr, fnSectionEnd ); } - if( pWrtShell->SwCrsrShell::HasSelection() ) + if( pWrtShell->SwCursorShell::HasSelection() ) { pWrtShell->StartUndo( UNDO_DELETE ); pWrtShell->Delete(); @@ -442,7 +442,7 @@ IMPL_LINK_TYPED( SwInputWindow, SelTableCellsNotify, SwWrtShell&, rCaller, void // positioned "in the forest" and the live update does not work! pWrtShell->StartAllAction(); - SwPaM aPam( *pWrtShell->GetStkCrsr()->GetPoint() ); + SwPaM aPam( *pWrtShell->GetStackCursor()->GetPoint() ); aPam.Move( fnMoveBackward, fnGoSection ); aPam.SetMark(); aPam.Move( fnMoveForward, fnGoSection ); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 1fcfc3a68c4f..2c609e186b11 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -172,7 +172,7 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh ) rSh.GetView().GetViewFrame()->GetTopFrame().GetTargetList(*pList); SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); const SwFormatURL &rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); SvxIMapDlgChildWindow::UpdateIMapDlg( aGrf, rURL.GetMap(), pList.get(), pEditObj ); @@ -213,7 +213,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq) if( rSh.IsNoNum() ) { - rSh.SttCrsrMove(); + rSh.SttCursorMove(); bool bLeft = rSh.Left( CRSR_SKIP_CHARS, true, 1, false ); if( bLeft ) { @@ -225,7 +225,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq) // of a doc, frame, table or an area. rSh.DelNumRules(); - rSh.EndCrsrMove(); + rSh.EndCursorMove(); break; } @@ -285,8 +285,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) // destroyed after the paste. SwView* pView = &rView; SwTransferable::Paste( rSh, aDataHelper ); - if( rSh.IsFrmSelected() || rSh.IsObjSelected() ) - rSh.EnterSelFrmMode(); + if( rSh.IsFrameSelected() || rSh.IsObjSelected() ) + rSh.EnterSelFrameMode(); pView->AttrChangedNotify( &rSh ); } else @@ -316,8 +316,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) //Done() has to be called before the shell has been removed rReq.Done(); bIgnore = true; - if( rSh.IsFrmSelected() || rSh.IsObjSelected()) - rSh.EnterSelFrmMode(); + if( rSh.IsFrameSelected() || rSh.IsObjSelected()) + rSh.EnterSelFrameMode(); pView->AttrChangedNotify( &rSh ); } } @@ -348,8 +348,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) } } - if (rSh.IsFrmSelected() || rSh.IsObjSelected()) - rSh.EnterSelFrmMode(); + if (rSh.IsFrameSelected() || rSh.IsObjSelected()) + rSh.EnterSelFrameMode(); pView->AttrChangedNotify( &rSh ); } else @@ -363,7 +363,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin()) ); if( aDataHelper.GetXTransferable().is() && SwTransferable::IsPaste( rSh, aDataHelper ) - && !rSh.CrsrInsideInputField() ) + && !rSh.CursorInsideInputField() ) { // Temporary variables, because the shell could already be // destroyed after the paste. @@ -383,8 +383,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) } } - if (rSh.IsFrmSelected() || rSh.IsObjSelected()) - rSh.EnterSelFrmMode(); + if (rSh.IsFrameSelected() || rSh.IsObjSelected()) + rSh.EnterSelFrameMode(); pView->AttrChangedNotify( &rSh ); } else @@ -435,7 +435,7 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet) case SID_PASTE_SPECIAL: if( !GetView().IsPasteSpecialAllowed() - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -539,7 +539,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet) case SID_REPEAT: { // Repeat is only possible if no REDO is possible - UI-Restriction if ((!rSh.GetFirstRedoInfo(nullptr)) && - !rSh.IsSelFrmMode() && + !rSh.IsSelFrameMode() && (UNDO_EMPTY != rSh.GetRepeatInfo(nullptr))) { rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString())); @@ -602,7 +602,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.EndAllTableBoxEdit(); rSh.SwViewShell::UpdateFields(true); - if( rSh.IsCrsrInTable() ) + if( rSh.IsCursorInTable() ) { if( !rSh.IsTableComplexForChart() ) SwTableFUNC( &rSh, false).UpdateChart(); @@ -655,16 +655,16 @@ void SwBaseShell::Execute(SfxRequest &rReq) if (pFieldType) { - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } if (rSh.HasMark()) { SwMvContext aMvContext(&rSh); - if (rSh.IsCrsrPtAtEnd()) + if (rSh.IsCursorPtAtEnd()) rSh.SwapPam(); rSh.ClearMark(); rSh.EndSelect(); @@ -681,10 +681,10 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_START_DOC_DIRECT: case FN_END_DOC_DIRECT: { - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.EnterStdMode(); nSlot == FN_START_DOC_DIRECT ? @@ -697,10 +697,10 @@ void SwBaseShell::Execute(SfxRequest &rReq) { bool bSuccess = rSh.GotoObj( nSlot == FN_GOTO_NEXT_OBJ ); rReq.SetReturnValue(SfxBoolItem(nSlot, bSuccess)); - if (bSuccess && !rSh.IsSelFrmMode()) + if (bSuccess && !rSh.IsSelFrameMode()) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); GetView().AttrChangedNotify( &rSh ); } } @@ -714,7 +714,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) const int nSelType = rSh.GetSelectionType(); sal_Int8 nGalleryItemType( pGalleryItem->GetType() ); - if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) && + if ( (!rSh.IsSelFrameMode() || nSelType & nsSelectionType::SEL_GRF) && nGalleryItemType == css::gallery::GalleryItemType::GRAPHIC ) { SwWait aWait( *rView.GetDocShell(), true ); @@ -729,7 +729,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) GetView().GetEditWin().GrabFocus(); } - else if(!rSh.IsSelFrmMode() && + else if(!rSh.IsSelFrameMode() && nGalleryItemType == css::gallery::GalleryItemType::MEDIA ) { const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() ); @@ -915,7 +915,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) pVFrame->ToggleChildWindow( nId ); pVFrame->GetBindings().Invalidate( SID_IMAP ); - if ( pVFrame->HasChildWindow( nId ) && rSh.IsFrmSelected() ) + if ( pVFrame->HasChildWindow( nId ) && rSh.IsFrameSelected() ) lcl_UpdateIMapDlg( rSh ); } break; @@ -924,15 +924,15 @@ void SwBaseShell::Execute(SfxRequest &rReq) SvxIMapDlg* pDlg = GetIMapDlg(GetView()); // Check, if the allocation is useful or allowed at all. - if ( rSh.IsFrmSelected() && + if ( rSh.IsFrameSelected() && pDlg->GetEditingObject() == rSh.GetIMapInventor() ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetMap( &pDlg->GetImageMap() ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } } break; @@ -963,7 +963,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) { rSh.StartAction(); SfxItemSet aSet( rSh.GetAttrPool(), RES_SURROUND, RES_SURROUND); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatSurround aSur( static_cast<const SwFormatSurround&>(aSet.Get( RES_SURROUND )) ); if ( !aSur.IsContour() ) { @@ -971,7 +971,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) if ( aSur.GetSurround() == SURROUND_NONE ) aSur.SetSurround( SURROUND_PARALLEL ); aSet.Put( aSur ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } const tools::PolyPolygon aPoly( pDlg->GetPolyPolygon() ); rSh.SetGraphicPolygon( &aPoly ); @@ -1009,11 +1009,11 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.StartUndo(); if (rSh.IsObjSelected()) rSh.ChgAnchor(eSet); - else if (rSh.IsFrmSelected()) + else if (rSh.IsFrameSelected()) { SwFormatAnchor aAnc(eSet, rSh.GetPhyPageNum()); SfxItemSet aSet(SwFEShell::makeItemSetFromFormatAnchor(GetPool(), aAnc)); - rSh.SetFlyFrmAttr(aSet); + rSh.SetFlyFrameAttr(aSet); } // if new anchor is 'as char' and it is a Math object and the usual // pre-conditions are met then align the formula to the baseline of the text @@ -1027,7 +1027,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) if( nHtmlMode ) { SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT); - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)); const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(aSet.Get(RES_VERT_ORIENT)); @@ -1080,7 +1080,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) } if( aSet.Count() ) - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } rSh.EndUndo(); @@ -1161,12 +1161,12 @@ void SwBaseShell::Execute(SfxRequest &rReq) SwFrameFormat *pFormat = rSh.GetTableFormat(); pFormat->SetFormatAttr( *pItem ); } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { // Set border attributes via Frame-Manager. - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); aMgr.SetAttrSet( *pArgs ); - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); } else { @@ -1193,12 +1193,12 @@ void SwBaseShell::Execute(SfxRequest &rReq) // Set border attributes Get/SetTabBorders() rSh.SetTabBorders(*pArgs); } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { // Set border attributes via Frame-Manager. - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); aMgr.SetAttrSet(*pArgs); - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); } else { @@ -1217,7 +1217,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) // Here the state fpr SID_IMAP / SID_CONTOUR will be handled // until the swapping of the graphic is finished. -IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void) +IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void) { sal_uInt16 nGrfType; SwWrtShell &rSh = GetShell(); @@ -1275,7 +1275,7 @@ IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void) if( !bProtect ) { SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND); - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); const SwFormatSurround& rWrap = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)); bSetState = true; bState = rWrap.IsContour(); @@ -1324,7 +1324,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) { case SID_GALLERY_FORMATS: if ( rSh.IsObjSelected() || - (rSh.IsSelFrmMode() && + (rSh.IsSelFrameMode() && !(rSh.GetSelectionType() & nsSelectionType::SEL_GRF)) ) rSet.DisableItem( nWhich ); break; @@ -1338,8 +1338,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case FN_INSERT_REGION: - if( rSh.CrsrInsideInputField() - || rSh.IsSelFrmMode() + if( rSh.CursorInsideInputField() + || rSh.IsSelFrameMode() || !rSh.IsInsRegionAvailable() ) { rSet.DisableItem( nWhich ); @@ -1348,24 +1348,24 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) case FN_CONVERT_TABLE_TO_TEXT: { - FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true); - if( (eFrmType & FrmTypeFlags::FOOTNOTE) || + FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true); + if( (eFrameType & FrameTypeFlags::FOOTNOTE) || !rSh.GetTableFormat() ) rSet.DisableItem( nWhich ); } break; case FN_CONVERT_TEXT_TO_TABLE: { - FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true); - if( (eFrmType & FrmTypeFlags::FOOTNOTE) || + FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true); + if( (eFrameType & FrameTypeFlags::FOOTNOTE) || !rSh.IsTextToTableAvailable() ) rSet.DisableItem( nWhich ); } break; case FN_CONVERT_TEXT_TABLE: { - FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true); - if( (eFrmType & FrmTypeFlags::FOOTNOTE) || + FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true); + if( (eFrameType & FrameTypeFlags::FOOTNOTE) || (!rSh.GetTableFormat() && !rSh.IsTextToTableAvailable() ) ) rSet.DisableItem( nWhich ); } @@ -1381,9 +1381,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) SwFrameFormat *pFormat = rSh.GetTableFormat(); aSet.Put(pFormat->GetFormatAttr( nWhich )); } - else if( rSh.IsFrmSelected() ) + else if( rSh.IsFrameSelected() ) { - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); aSet.Put( aMgr.GetAttrSet() ); } else @@ -1407,7 +1407,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) { const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); const bool bHas = pVFrame->HasChildWindow( nId ); - const bool bFrmSel = rSh.IsFrmSelected(); + const bool bFrameSel = rSh.IsFrameSelected(); const bool bIsGraphicSelection = rSh.GetSelectionType() == nsSelectionType::SEL_GRF; @@ -1425,7 +1425,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) else { if ( !bHas && - ( !bFrmSel || + ( !bFrameSel || ( bIsGraphicSelection && rSh.GetGraphicType() == GRAPHIC_NONE ) ) ) { @@ -1434,7 +1434,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) else { SfxBoolItem aBool(nWhich, bHas); - if ( bHas && bFrmSel ) + if ( bHas && bFrameSel ) lcl_UpdateIMapDlg( rSh ); rSet.Put(aBool); } @@ -1445,7 +1445,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) case SID_IMAP_EXEC: { bool bDisable = false; - if( !rSh.IsFrmSelected()) + if( !rSh.IsFrameSelected()) bDisable = true; sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); if(!bDisable && pVFrame->HasChildWindow( nId )) @@ -1469,7 +1469,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) case FN_BACKSPACE: case SID_DELETE: - if ( ( rSh.HasReadonlySel() && !rSh.CrsrInsideInputField() ) + if ( ( rSh.HasReadonlySel() && !rSh.CursorInsideInputField() ) || rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) != FlyProtectFlags::NONE ) { rSet.DisableItem( nWhich ); @@ -1553,13 +1553,13 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) bool bObj = 0 != rSh.IsObjSelected(); bool bParentCntProt = rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) != FlyProtectFlags::NONE; - if( !bParentCntProt && (bObj || rSh.IsFrmSelected())) + if( !bParentCntProt && (bObj || rSh.IsFrameSelected())) { SfxItemSet aSet(GetPool(), RES_ANCHOR, RES_ANCHOR); if(bObj) rSh.GetObjAttr(aSet); else - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); RndStdIds eSet = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); const bool bSet = ((nWhich == FN_TOOL_ANCHOR_PAGE) && @@ -1623,7 +1623,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) bool bObj = 0 != rSh.IsObjSelected(); bool bParentCntProt = rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) != FlyProtectFlags::NONE; - if( !bParentCntProt && (bObj || rSh.IsFrmSelected())) + if( !bParentCntProt && (bObj || rSh.IsFrameSelected())) { SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_ANCHOR); int nAnchorType; @@ -1634,7 +1634,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) } else { - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); nAnchorType = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); } const SwFormatSurround& rWrap = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)); @@ -1697,7 +1697,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) if( AddGrfUpdateSlot( nWhich )) rSh.GetGraphic(false); // start the loading } - else if( rSh.IsFrmSelected() ) + else if( rSh.IsFrameSelected() ) { // #i102253# applied patch from OD (see task) bDisable = @@ -1799,13 +1799,13 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot ) { SwWrtShell &rSh = GetShell(); bool bObj = 0 != rSh.IsObjSelected(); - if( bObj || rSh.IsFrmSelected()) + if( bObj || rSh.IsFrameSelected()) { SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND); if(bObj) rSh.GetObjAttr(aSet); else - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); SwFormatSurround aWrap( static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)) ); SwSurround nOldSurround(aWrap.GetSurround()); SwSurround nSurround = SURROUND_PARALLEL; @@ -1876,18 +1876,18 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot ) rSh.SelectionToHell(); } else - rSh.SetFlyFrmAttr(aSet); + rSh.SetFlyFrameAttr(aSet); } } //Force update of the status line -void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh ) +void SwBaseShell::SetFrameMode(FlyMode eMode, SwWrtShell *pSh ) { eFrameMode = eMode; SfxBindings &rBnd = pSh->GetView().GetViewFrame()->GetBindings(); - if( eMode == FLY_DRAG || pSh->IsFrmSelected() || pSh->IsObjSelected() ) + if( eMode == FLY_DRAG || pSh->IsFrameSelected() || pSh->IsObjSelected() ) { const SfxPointItem aTmp1( SID_ATTR_POSITION, pSh->GetAnchorObjDiff()); const SvxSizeItem aTmp2( SID_ATTR_SIZE, pSh->GetObjSize()); @@ -1921,9 +1921,9 @@ SwBaseShell::~SwBaseShell() if( rView.GetCurShell() == this ) rView.ResetSubShell(); - Link<SwCrsrShell&,void> aTmp( LINK( this, SwBaseShell, GraphicArrivedHdl)); + Link<SwCursorShell&,void> aTmp( LINK( this, SwBaseShell, GraphicArrivedHdl)); if( aTmp == rView.GetWrtShell().GetGrfArrivedLnk() ) - rView.GetWrtShell().SetGrfArrivedLnk( Link<SwCrsrShell&,void>() ); + rView.GetWrtShell().SetGrfArrivedLnk( Link<SwCursorShell&,void>() ); } void SwBaseShell::ExecTextCtrl( SfxRequest& rReq ) @@ -2158,7 +2158,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet) if(nSelType & nsSelectionType::SEL_GRF || nsSelectionType::SEL_FRM & nSelType) { - rSh.GetFlyFrmAttr(aCoreSet); + rSh.GetFlyFrameAttr(aCoreSet); } else { @@ -2217,7 +2217,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) if((nsSelectionType::SEL_FRM & nSelType) || (nsSelectionType::SEL_GRF & nSelType)) { - rSh.GetFlyFrmAttr(aCoreSet); + rSh.GetFlyFrameAttr(aCoreSet); } else { @@ -2286,7 +2286,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) } else { - rSh.SetFlyFrmAttr(aCoreSet); + rSh.SetFlyFrameAttr(aCoreSet); } } else @@ -2323,9 +2323,9 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet) rSh.GetTabBorders( aCoreSet ); rSet.Put( aCoreSet ); } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); rSet.Put( aMgr.GetAttrSet() ); bPrepare = false; } @@ -2415,10 +2415,10 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) pOutSet = pDlg->GetOutputItemSet(); } } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { // Set border attributes via Frame-Manager - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); aSet.Put( aMgr.GetAttrSet() ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); @@ -2429,7 +2429,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) if ( pDlg->Execute() == RET_OK ) { aMgr.SetAttrSet( *pDlg->GetOutputItemSet() ); - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); pOutSet = pDlg->GetOutputItemSet(); } } @@ -2485,10 +2485,10 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) pOutSet = pDlg->GetOutputItemSet(); } } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); pDlg.reset(pFact->CreateSfxDialog( pMDI, aSet, rView.GetViewFrame()->GetFrame().GetFrameInterface(), @@ -2496,7 +2496,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { - rSh.SetFlyFrmAttr((SfxItemSet &) *pDlg->GetOutputItemSet() ); + rSh.SetFlyFrameAttr((SfxItemSet &) *pDlg->GetOutputItemSet() ); pOutSet = pDlg->GetOutputItemSet(); } } @@ -2543,7 +2543,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) const SfxItemSet* pArgs = _rRequest.GetArgs(); SwWrtShell& rSh = GetShell(); - if ( !( rSh.GetFrmType( nullptr, true ) & FrmTypeFlags::FOOTNOTE ) ) + if ( !( rSh.GetFrameType( nullptr, true ) & FrameTypeFlags::FOOTNOTE ) ) { SwView &rTempView = GetView(); // Because GetView() does not work after the shell exchange bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON); @@ -2733,13 +2733,13 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet ) rLst.push_back( SW_RESSTR( STR_SWBG_OLE ) ); nOlePos = nPos++; } - const FrmTypeFlags nType = rSh.GetFrmType(nullptr,true); - if ( nType & FrmTypeFlags::HEADER ) + const FrameTypeFlags nType = rSh.GetFrameType(nullptr,true); + if ( nType & FrameTypeFlags::HEADER ) { rLst.push_back( SW_RESSTR( STR_SWBG_HEADER ) ); nHeaderPos = nPos++; } - if ( nType & FrmTypeFlags::FOOTER ) + if ( nType & FrameTypeFlags::FOOTER ) { rLst.push_back( SW_RESSTR( STR_SWBG_FOOTER ) ); nFooterPos = nPos; @@ -2793,7 +2793,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq) { SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); aCoreSet.Put( aBrush ); - rSh.SetFlyFrmAttr( aCoreSet ); + rSh.SetFlyFrameAttr( aCoreSet ); } else if ( nPos == nPagePos || nPos == nHeaderPos || nPos == nFooterPos ) { diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx index fbe4f54d956a..2595441bcecb 100644 --- a/sw/source/uibase/shells/beziersh.cxx +++ b/sw/source/uibase/shells/beziersh.cxx @@ -89,9 +89,9 @@ void SwBezierShell::Execute(SfxRequest &rReq) else { pSh->DelSelectedObj(); - if (pSh->IsSelFrmMode()) + if (pSh->IsSelFrameMode()) { - pSh->LeaveSelFrmMode(); + pSh->LeaveSelFrameMode(); pSh->NoEdit(); } GetView().AttrChangedNotify(pSh); // Shell change if applicable... diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index a5fcf6b350b7..6e76baf97afe 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -227,7 +227,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); bool bRTL; bool bVertL2R; - aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(true, bRTL, bVertL2R))); + aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrameVertical(true, bRTL, bVertL2R))); aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL)); SwFrameFormat* pFrameFormat = FindFrameFormat( pObj ); @@ -268,7 +268,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) SfxItemState::SET != pOutSet->GetItemState( SID_ATTR_TRANSFORM_POS_Y, false ); - SfxItemSet aFrmAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1); + SfxItemSet aFrameAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1); bool bSingleSelection = rMarkList.GetMarkCount() == 1; @@ -283,7 +283,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) { SwFormatAnchor aAnchor(pFrameFormat->GetAnchor()); aAnchor.SetType((RndStdIds)static_cast<const SfxInt16Item*>(pAnchorItem)->GetValue()); - aFrmAttrSet.Put( aAnchor ); + aFrameAttrSet.Put( aAnchor ); } } const SfxPoolItem* pHoriOrient = nullptr; @@ -306,7 +306,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) aHOrient.SetPos( static_cast<const SfxInt32Item*>(pHoriPosition)->GetValue()); if(pHoriMirror) aHOrient.SetPosToggle( static_cast<const SfxBoolItem*>(pHoriMirror)->GetValue()); - aFrmAttrSet.Put(aHOrient); + aFrameAttrSet.Put(aHOrient); } const SfxPoolItem* pVertOrient = nullptr; @@ -325,15 +325,15 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) static_cast<const SfxInt16Item*>(pVertRelation)->GetValue()); if(pVertPosition) aVOrient.SetPos( static_cast<const SfxInt32Item*>(pVertPosition)->GetValue()); - aFrmAttrSet.Put( aVOrient ); + aFrameAttrSet.Put( aVOrient ); } const SfxPoolItem* pFollowItem = nullptr; pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, false, &pFollowItem); if(pFollowItem) - aFrmAttrSet.Put(*pFollowItem); + aFrameAttrSet.Put(*pFollowItem); - if(aFrmAttrSet.Count()) - pSh->SetDrawingAttr(aFrmAttrSet); + if(aFrameAttrSet.Count()) + pSh->SetDrawingAttr(aFrameAttrSet); rBind.InvalidateAll(false); @@ -380,9 +380,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) GetView().LeaveDrawCreate(); // Switch to selection mode } - if (pSh->IsSelFrmMode()) + if (pSh->IsSelFrameMode()) { - pSh->LeaveSelFrmMode(); + pSh->LeaveSelFrameMode(); // #105852# FME } } @@ -779,7 +779,7 @@ IMPL_LINK_TYPED(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValid { bool bRTL; bool bVertL2R; - bIsInVertical = pSh->IsFrmVertical(true, bRTL, bVertL2R); + bIsInVertical = pSh->IsFrameVertical(true, bRTL, bVertL2R); } if(bIsInVertical) { diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 3473a2ffa4ab..adc98c129b39 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -88,7 +88,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; // Prototypes -static void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine); +static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine); static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell& rSh, const OUString& rName) { const size_t nCount = rSh.GetFlyCount(FLYCNTTYPE_FRM); @@ -116,7 +116,7 @@ void SwFrameShell::InitInterface_Impl() void SwFrameShell::Execute(SfxRequest &rReq) { - //First those who do not need FrmMgr. + //First those who do not need FrameMgr. SwWrtShell &rSh = GetShell(); bool bMore = false; const SfxItemSet* pArgs = rReq.GetArgs(); @@ -126,7 +126,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) switch ( nSlot ) { case FN_FRAME_TO_ANCHOR: - if ( rSh.IsFrmSelected() ) + if ( rSh.IsFrameSelected() ) { rSh.GotoFlyAnchor(); rSh.EnterStdMode(); @@ -166,7 +166,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) nCols = static_cast<const SfxUInt16Item *>(pItem)->GetValue(); SfxItemSet aSet(GetPool(),RES_COL,RES_COL); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL))); // GutterWidth will not always passed, hence get firstly // (see view2: Execute on this slot) @@ -184,7 +184,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) else { rSh.StartAllAction(); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); rSh.SetModified(); rSh.EndAllAction(); } @@ -201,7 +201,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) const OUString& rTarget = rHLinkItem.GetTargetFrame(); SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); OUString sOldName(rHLinkItem.GetName().toAsciiUpperCase()); @@ -222,7 +222,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) aURL.SetTargetFrameName(rTarget); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } } break; @@ -264,7 +264,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) return; } - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); bool bUpdateMgr = true; bool bCopyToFormat = false; switch ( nSlot ) @@ -429,12 +429,12 @@ void SwFrameShell::Execute(SfxRequest &rReq) } const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE); - SwFormatFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); - aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); - aSet.Put(aFrmSize); + SwFormatFrameSize aFrameSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); + aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); + aSet.Put(aFrameSize); const SwRect &rPr = rSh.GetAnyCurRect(RECT_PAGE_PRT); - SwFormatFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); + SwFormatFrameSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA)); aSet.Put(aPrtSize); @@ -442,10 +442,10 @@ void SwFrameShell::Execute(SfxRequest &rReq) aSet.SetParent( aMgr.GetAttrSet().GetParent() ); // On % values initialize size - SwFormatFrmSize& rSize = const_cast<SwFormatFrmSize&>(static_cast<const SwFormatFrmSize&>(aSet.Get(RES_FRM_SIZE))); - if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrmSize::SYNCED) + SwFormatFrameSize& rSize = const_cast<SwFormatFrameSize&>(static_cast<const SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE))); + if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrameSize::SYNCED) rSize.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()); - if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != SwFormatFrmSize::SYNCED) + if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != SwFormatFrameSize::SYNCED) rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated @@ -463,7 +463,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) )); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrmTabDialog( + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog( nSel & nsSelectionType::SEL_GRF ? OUString("PictureDialog") : nSel & nsSelectionType::SEL_OLE ? OUString("ObjectDialog"): OUString("FrameDialog"), @@ -651,7 +651,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) } else { - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); } } @@ -661,7 +661,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) { SwWrtShell &rSh = GetShell(); bool bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell()); - if (rSh.IsFrmSelected()) + if (rSh.IsFrameSelected()) { SfxItemSet aSet( rSh.GetAttrPool(), RES_LR_SPACE, RES_UL_SPACE, @@ -669,15 +669,15 @@ void SwFrameShell::GetState(SfxItemSet& rSet) RES_OPAQUE, RES_OPAQUE, RES_PRINT, RES_OPAQUE, 0 ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); bool bProtect = rSh.IsSelObjProtected(FlyProtectFlags::Pos) != FlyProtectFlags::NONE; bool bParentCntProt = rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) != FlyProtectFlags::NONE; bProtect |= bParentCntProt; - const FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true); - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + const FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); SfxWhichIter aIter( rSet ); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -687,7 +687,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) { case RES_FRM_SIZE: { - SwFormatFrmSize aSz(aMgr.GetFrmSize()); + SwFormatFrameSize aSz(aMgr.GetFrameSize()); rSet.Put(aSz); } break; @@ -711,7 +711,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_HORZ_CENTER: case FN_FRAME_ALIGN_HORZ_RIGHT: case FN_FRAME_ALIGN_HORZ_LEFT: - if ( (eFrmType & FrmTypeFlags::FLY_INCNT) || + if ( (eFrameType & FrameTypeFlags::FLY_INCNT) || bProtect || ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER) && bHtmlMode )) @@ -723,7 +723,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_CHAR_TOP: case FN_FRAME_ALIGN_VERT_CHAR_CENTER: case FN_FRAME_ALIGN_VERT_CHAR_BOTTOM: - if ( !(eFrmType & FrmTypeFlags::FLY_INCNT) || bProtect + if ( !(eFrameType & FrameTypeFlags::FLY_INCNT) || bProtect || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) ) rSet.DisableItem( nWhich ); break; @@ -735,12 +735,12 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_TOP: case FN_FRAME_ALIGN_VERT_CENTER: case FN_FRAME_ALIGN_VERT_BOTTOM: - if ( bProtect || (bHtmlMode && eFrmType & FrmTypeFlags::FLY_ATCNT)) + if ( bProtect || (bHtmlMode && eFrameType & FrameTypeFlags::FLY_ATCNT)) rSet.DisableItem( nWhich ); else { sal_uInt16 nId = 0; - if (eFrmType & FrmTypeFlags::FLY_INCNT) + if (eFrameType & FrameTypeFlags::FLY_INCNT) { switch (nWhich) { @@ -769,8 +769,8 @@ void SwFrameShell::GetState(SfxItemSet& rSet) const SwFrameFormat* pFormat = rSh.IsFlyInFly(); if (pFormat) { - const SwFormatFrmSize& rFrmSz = pFormat->GetFrmSize(); - if (rFrmSz.GetHeightSizeType() != ATT_FIX_SIZE) + const SwFormatFrameSize& rFrameSz = pFormat->GetFrameSize(); + if (rFrameSz.GetHeightSizeType() != ATT_FIX_SIZE) { rSet.DisableItem( nWhich ); break; @@ -801,7 +801,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) const SfxPoolItem* pItem; SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL); - rSh.GetFlyFrmAttr( aURLSet ); + rSh.GetFlyFrameAttr( aURLSet ); if(SfxItemState::SET == aURLSet.GetItemState(RES_URL, true, &pItem)) { @@ -948,7 +948,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) { SwWrtShell &rSh = GetShell(); bool bDefault = false; - if (!rSh.IsFrmSelected()) + if (!rSh.IsFrameSelected()) return; // At first pick the default BoxItem out of the pool. // If unequal to regular box item, then it has already @@ -958,7 +958,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) const SfxItemSet *pArgs = rReq.GetArgs(); SfxItemSet aFrameSet(rSh.GetAttrPool(), RES_BOX, RES_BOX); - rSh.GetFlyFrmAttr( aFrameSet ); + rSh.GetFlyFrameAttr( aFrameSet ); const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aFrameSet.Get(RES_BOX)); if (pPoolBoxItem == &rBoxItem) @@ -981,13 +981,13 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) const SvxBorderLine* pBorderLine; if ((pBorderLine = aBoxItem.GetTop()) != nullptr) - lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine); if ((pBorderLine = aBoxItem.GetBottom()) != nullptr) - lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine); if ((pBorderLine = aBoxItem.GetLeft()) != nullptr) - lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine); if ((pBorderLine = aBoxItem.GetRight()) != nullptr) - lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine); if(aBorderLine.GetOutWidth() == 0) { @@ -1117,11 +1117,11 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) rSh.AutoUpdateFrame(pFormat, aFrameSet); } else - rSh.SetFlyFrmAttr( aFrameSet ); + rSh.SetFlyFrameAttr( aFrameSet ); } -static void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine) +static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine) { if(pBorderLine->GetWidth() > rBorderLine.GetWidth()) rBorderLine.SetWidth(pBorderLine->GetWidth()); @@ -1137,7 +1137,7 @@ void SwFrameShell::GetLineStyleState(SfxItemSet &rSet) if (bParentCntProt) { - if (rSh.IsFrmSelected()) + if (rSh.IsFrameSelected()) rSet.DisableItem( SID_FRAME_LINECOLOR ); rSet.DisableItem( SID_ATTR_BORDER ); @@ -1145,11 +1145,11 @@ void SwFrameShell::GetLineStyleState(SfxItemSet &rSet) } else { - if (rSh.IsFrmSelected()) + if (rSh.IsFrameSelected()) { SfxItemSet aFrameSet( rSh.GetAttrPool(), RES_BOX, RES_BOX ); - rSh.GetFlyFrmAttr(aFrameSet); + rSh.GetFlyFrameAttr(aFrameSet); const SvxBorderLine* pLine = static_cast<const SvxBoxItem&>(aFrameSet.Get(RES_BOX)).GetTop(); rSet.Put(SvxColorItem(pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR)); @@ -1165,7 +1165,7 @@ void SwFrameShell::StateInsert(SfxItemSet &rSet) { rSet.DisableItem(FN_INSERT_FRAME); } - else if ( GetShell().CrsrInsideInputField() ) + else if ( GetShell().CursorInsideInputField() ) { rSet.DisableItem(FN_INSERT_FRAME); } @@ -1176,9 +1176,9 @@ void SwFrameShell::GetDrawAttrStateTextFrame(SfxItemSet &rSet) { SwWrtShell &rSh = GetShell(); - if(rSh.IsFrmSelected()) + if(rSh.IsFrameSelected()) { - rSh.GetFlyFrmAttr(rSet); + rSh.GetFlyFrameAttr(rSet); } else { @@ -1199,9 +1199,9 @@ void SwFrameShell::ExecDrawAttrArgsTextFrame(SfxRequest& rReq) if(pArgs) { - if(rSh.IsFrmSelected()) + if(rSh.IsFrameSelected()) { - rSh.SetFlyFrmAttr(const_cast< SfxItemSet& >(*pArgs)); + rSh.SetFlyFrameAttr(const_cast< SfxItemSet& >(*pArgs)); } else { @@ -1243,14 +1243,14 @@ void SwFrameShell::ExecDrawDlgTextFrame(SfxRequest& rReq) { SwWrtShell& rSh = GetShell(); - if(rSh.IsFrmSelected()) + if(rSh.IsFrameSelected()) { SdrView* pView = rSh.GetDrawView(); SdrModel* pDoc = pView->GetModel(); SfxItemSet aNewAttr(pDoc->GetItemPool()); // get attributes from FlyFrame - rSh.GetFlyFrmAttr(aNewAttr); + rSh.GetFlyFrameAttr(aNewAttr); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); assert(pFact); @@ -1264,7 +1264,7 @@ void SwFrameShell::ExecDrawDlgTextFrame(SfxRequest& rReq) if(RET_OK == pDlg->Execute()) { // set attributes at FlyFrame - rSh.SetFlyFrmAttr(const_cast< SfxItemSet& >(*pDlg->GetOutputItemSet())); + rSh.SetFlyFrameAttr(const_cast< SfxItemSet& >(*pDlg->GetOutputItemSet())); static sal_uInt16 aInval[] = { @@ -1304,7 +1304,7 @@ void SwFrameShell::DisableStateTextFrame(SfxItemSet &rSet) { SwWrtShell& rSh = GetShell(); - if(!rSh.IsFrmSelected()) + if(!rSh.IsFrameSelected()) { rSet.DisableItem(nWhich); } diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 749474d7c80f..901d9c4cfee0 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -85,13 +85,13 @@ class SwGrfShell::SwExternalToolEdit { private: SwWrtShell *const m_pShell; - ::std::shared_ptr<SwUnoCrsr> const m_pCursor; + ::std::shared_ptr<SwUnoCursor> const m_pCursor; public: explicit SwExternalToolEdit(SwWrtShell *const pShell) : m_pShell(pShell) , m_pCursor( // need only Point, must point to SwGrfNode - pShell->GetDoc()->CreateUnoCrsr( + pShell->GetDoc()->CreateUnoCursor( *pShell->GetCurrentShellCursor().GetPoint())) { } @@ -211,7 +211,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) case FN_FORMAT_GRAFIC_DLG: case FN_DRAW_WRAP_DLG: { - SwFlyFrmAttrMgr aMgr( false, &rSh, rSh.IsFrmSelected() ? + SwFlyFrameAttrMgr aMgr( false, &rSh, rSh.IsFrameSelected() ? FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF); const SwViewOption* pVOpt = rSh.GetViewOptions(); SwViewOption aUsrPref( *pVOpt ); @@ -259,9 +259,9 @@ void SwGrfShell::Execute(SfxRequest &rReq) SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE); - SwFormatFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height()); - aFrmSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) ); - aSet.Put( aFrmSize ); + SwFormatFrameSize aFrameSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height()); + aFrameSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) ); + aSet.Put( aFrameSize ); aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); if ( nSlot == FN_FORMAT_GRAFIC_DLG ) @@ -271,19 +271,19 @@ void SwGrfShell::Execute(SfxRequest &rReq) } pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT); - aFrmSize.SetWidth( pRect->Width() ); - aFrmSize.SetHeight( pRect->Height() ); - aFrmSize.SetWhich( GetPool().GetWhich(FN_GET_PRINT_AREA) ); - aSet.Put( aFrmSize ); + aFrameSize.SetWidth( pRect->Width() ); + aFrameSize.SetHeight( pRect->Height() ); + aFrameSize.SetWhich( GetPool().GetWhich(FN_GET_PRINT_AREA) ); + aSet.Put( aFrameSize ); aSet.Put( aMgr.GetAttrSet() ); aSet.SetParent( aMgr.GetAttrSet().GetParent() ); // At percentage values initialize size - SwFormatFrmSize aSizeCopy = static_cast<const SwFormatFrmSize&>(aSet.Get(RES_FRM_SIZE)); - if (aSizeCopy.GetWidthPercent() && aSizeCopy.GetWidthPercent() != SwFormatFrmSize::SYNCED) + SwFormatFrameSize aSizeCopy = static_cast<const SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE)); + if (aSizeCopy.GetWidthPercent() && aSizeCopy.GetWidthPercent() != SwFormatFrameSize::SYNCED) aSizeCopy.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()); - if (aSizeCopy.GetHeightPercent() && aSizeCopy.GetHeightPercent() != SwFormatFrmSize::SYNCED) + if (aSizeCopy.GetHeightPercent() && aSizeCopy.GetHeightPercent() != SwFormatFrameSize::SYNCED) aSizeCopy.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); // and now set the size for "external" tabpages { @@ -291,8 +291,8 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.Put( aSzItm ); Size aSz( aSizeCopy.GetWidthPercent(), aSizeCopy.GetHeightPercent() ); - if( SwFormatFrmSize::SYNCED == aSz.Width() ) aSz.Width() = 0; - if( SwFormatFrmSize::SYNCED == aSz.Height() ) aSz.Height() = 0; + if( SwFormatFrameSize::SYNCED == aSz.Width() ) aSz.Width() = 0; + if( SwFormatFrameSize::SYNCED == aSz.Height() ) aSz.Height() = 0; aSzItm.SetSize( aSz ); aSzItm.SetWhich( SID_ATTR_GRAF_FRMSIZE_PERCENT ); @@ -344,7 +344,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "no dialog factory!"); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrmTabDialog("PictureDialog", + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog("PictureDialog", GetView().GetViewFrame(), GetView().GetWindow(), aSet, false)); @@ -360,11 +360,11 @@ void SwGrfShell::Execute(SfxRequest &rReq) const SfxPoolItem* pItem; SfxItemSet* pSet = const_cast<SfxItemSet*>(pDlg->GetOutputItemSet()); rReq.Done(*pSet); - // change the 2 frmsize SizeItems to the correct SwFrmSizeItem + // change the 2 frmsize SizeItems to the correct SwFrameSizeItem if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_FRMSIZE, false, &pItem )) { - SwFormatFrmSize aSize; + SwFormatFrameSize aSize; const Size& rSz = static_cast<const SvxSizeItem*>(pItem)->GetSize(); aSize.SetWidth( rSz.Width() ); aSize.SetHeight( rSz.Height() ); @@ -396,7 +396,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) { aMgr.SetAttrSet(*pSet); } - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); bool bApplyUsrPref = false; if (SfxItemState::SET == pSet->GetItemState( @@ -665,7 +665,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) if( bParentCntProt || !bIsGrfContent ) bDisable = true; else if ( nWhich == SID_INSERT_GRAPHIC - && rSh.CrsrInsideInputField() ) + && rSh.CursorInsideInputField() ) { bDisable = true; } @@ -857,12 +857,12 @@ void SwGrfShell::ExecuteRotation(SfxRequest &rReq) aTransform.rotate(aRotation); rShell.ReRead(OUString(), OUString(), const_cast<const Graphic*>(&aGraphic)); - SwFlyFrmAttrMgr aManager(false, &rShell, rShell.IsFrmSelected() ? FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF); + SwFlyFrameAttrMgr aManager(false, &rShell, rShell.IsFrameSelected() ? FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF); const long nRotatedWidth = aManager.GetSize().Height(); const long nRotatedHeight = aManager.GetSize().Width(); Size aSize(nRotatedWidth, nRotatedHeight); aManager.SetSize(aSize); - aManager.UpdateFlyFrm(); + aManager.UpdateFlyFrame(); SfxItemSet aSet( rShell.GetAttrPool(), RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF ); rShell.GetCurAttr( aSet ); diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 1ded2e66fbc1..8ac54052c7c1 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -538,14 +538,14 @@ namespace SwLangHelper { // string for guessing language OUString aText; - SwPaM *pCrsr = rSh.GetCrsr(); - SwTextNode *pNode = pCrsr->GetNode().GetTextNode(); + SwPaM *pCursor = rSh.GetCursor(); + SwTextNode *pNode = pCursor->GetNode().GetTextNode(); if (pNode) { aText = pNode->GetText(); if (!aText.isEmpty()) { - sal_Int32 nEnd = pCrsr->GetPoint()->nContent.GetIndex(); + sal_Int32 nEnd = pCursor->GetPoint()->nContent.GetIndex(); // at most 100 chars to the left... const sal_Int32 nStt = nEnd > 100 ? nEnd - 100 : 0; // ... and 100 to the right of the cursor position diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx index 91d0c7355d6d..38d26fb7f9bd 100644 --- a/sw/source/uibase/shells/listsh.cxx +++ b/sw/source/uibase/shells/listsh.cxx @@ -136,7 +136,7 @@ void SwListShell::Execute(SfxRequest &rReq) SwWrtShell& rSh = GetShell(); // #i35572# - const SwNumRule* pCurRule = rSh.GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pCurRule = rSh.GetNumRuleAtCurrCursorPos(); OSL_ENSURE( pCurRule, "SwListShell::Execute without NumRule" ); bool bOutline = pCurRule && pCurRule->IsOutlineRule(); @@ -260,7 +260,7 @@ void SwListShell::GetState(SfxItemSet &rSet) break; case FN_NUM_BULLET_NONUM: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx index b39ade8b7b2e..34473e44c0cf 100644 --- a/sw/source/uibase/shells/mediash.cxx +++ b/sw/source/uibase/shells/mediash.cxx @@ -99,8 +99,8 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq) pSh->SetModified(); pSh->DelSelectedObj(); - if( pSh->IsSelFrmMode() ) - pSh->LeaveSelFrmMode(); + if( pSh->IsSelFrameMode() ) + pSh->LeaveSelFrameMode(); GetView().AttrChangedNotify( pSh ); } diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 55162768b06d..c9ea88a49c18 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -151,7 +151,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) rSet.Put( SfxUInt16Item( FN_PARAM_TABLE_HEADLINE, rSh.GetRowsToRepeat() ) ); rSet.Put( pFormat->GetShadow() ); rSet.Put(SfxUInt16Item(FN_TABLE_SET_VERT_ALIGN, rSh.GetBoxAlign())); - rSet.Put( pFormat->GetFrmDir() ); + rSet.Put( pFormat->GetFrameDir() ); SvxULSpaceItem aULSpace( pFormat->GetULSpace() ); rSet.Put( aULSpace ); @@ -182,8 +182,8 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); // Table variant: If multiple table cells are selected. - rSh.GetCrsr(); //Thus GetCrsrCnt() returns the right thing - aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) || + rSh.GetCursor(); //Thus GetCursorCnt() returns the right thing + aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCursorCnt() > 1) || !bTableSel); // Always show distance field. aBoxInfo.SetDist (true); @@ -368,7 +368,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, } else { - SwFormatFrmSize aSz( ATT_VAR_SIZE, nWidth ); + SwFormatFrameSize aSz( ATT_VAR_SIZE, nWidth ); if(pRep->GetWidthPercent()) { aSz.SetWidthPercent( (sal_uInt8)pRep->GetWidthPercent() ); @@ -451,7 +451,7 @@ void SwTableShell::Execute(SfxRequest &rReq) const SfxItemSet* pArgs = rReq.GetArgs(); SwWrtShell &rSh = GetShell(); - // At first the slots which doesn't need a FrmMgr. + // At first the slots which doesn't need a FrameMgr. bool bMore = false; const SfxPoolItem* pItem = nullptr; sal_uInt16 nSlot = rReq.GetSlot(); @@ -689,7 +689,7 @@ void SwTableShell::Execute(SfxRequest &rReq) break; case FN_TABLE_OPTIMAL_HEIGHT: { - const SwFormatFrmSize aSz; + const SwFormatFrameSize aSz; rSh.SetRowHeight( aSz ); bCallDone = true; break; @@ -1240,7 +1240,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) break; case FN_INSERT_TABLE: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem( nSlot ); } @@ -1249,7 +1249,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_OPTIMAL_HEIGHT: { // Disable if auto height already is enabled. - SwFormatFrmSize *pSz; + SwFormatFrameSize *pSz; rSh.GetRowHeight( pSz ); if ( pSz ) { @@ -1381,7 +1381,7 @@ SwTableShell::SwTableShell(SwView &_rView) : SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Table)); } -void SwTableShell::GetFrmBorderState(SfxItemSet &rSet) +void SwTableShell::GetFrameBorderState(SfxItemSet &rSet) { SfxItemSet aCoreSet( GetPool(), RES_BOX, RES_BOX, @@ -1444,7 +1444,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq) const SfxItemSet* pArgs = rReq.GetArgs(); SwWrtShell &rSh = GetShell(); - // At first the slots, which doesn't need a FrmMgr. + // At first the slots, which doesn't need a FrameMgr. const SfxPoolItem* pItem = nullptr; const sal_uInt16 nSlot = rReq.GetSlot(); if(pArgs) diff --git a/sw/source/uibase/shells/textdrw.cxx b/sw/source/uibase/shells/textdrw.cxx index 6d3115710e58..b0b4269cd15d 100644 --- a/sw/source/uibase/shells/textdrw.cxx +++ b/sw/source/uibase/shells/textdrw.cxx @@ -120,7 +120,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget, if (rSh.IsObjSelected()) { - rSh.UnSelectFrm(); + rSh.UnSelectFrame(); } } rSh.EndUndo( UNDO_UI_INSERT_URLBTN ); diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 869d845de3cc..652f607d731e 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -195,8 +195,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) { rSh.SttSelect(); rSh.SelectText( - SwCrsrShell::StartOfInputFieldAtPos( *(rSh.GetCrsr()->Start()) ) + 1, - SwCrsrShell::EndOfInputFieldAtPos( *(rSh.GetCrsr()->Start()) ) - 1 ); + SwCursorShell::StartOfInputFieldAtPos( *(rSh.GetCursor()->Start()) ) + 1, + SwCursorShell::EndOfInputFieldAtPos( *(rSh.GetCursor()->Start()) ) - 1 ); } else { @@ -406,7 +406,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) aFieldMgr.InsertField( aData ); rSh.Push(); - rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS); + rSh.SwCursorShell::Left(1, CRSR_SKIP_CHARS); pPostIt = static_cast<SwPostItField*>(aFieldMgr.GetCurField()); rSh.Pop(false); // Restore cursor position } @@ -490,7 +490,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) bool bNext = pActRed != nullptr; rSh.Pop(false); // Restore cursor position - if( rSh.IsCrsrPtAtEnd() ) + if( rSh.IsCursorPtAtEnd() ) rSh.SwapPam(); rSh.EndAction(); @@ -707,7 +707,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) case FN_INSERT_FIELD: { - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -728,7 +728,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { SfxViewFrame* pVFrame = GetView().GetViewFrame(); if ( !pVFrame->KnowsChildWindow(FN_INSERT_FIELD) - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { rSet.DisableItem(FN_INSERT_REF_FIELD); } @@ -736,7 +736,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) break; case FN_INSERT_FIELD_CTRL: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -765,7 +765,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { rSet.DisableItem(nWhich); } - else if ( rSh.CrsrInsideInputField() ) + else if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -781,7 +781,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) case FN_INSERT_FLD_TITLE: case FN_INSERT_FLD_TOPIC: case FN_INSERT_DBFIELD: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -813,7 +813,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) { // Select links - rSh.SwCrsrShell::SelectTextAttr(RES_TXTATR_INETFMT, false); + rSh.SwCursorShell::SelectTextAttr(RES_TXTATR_INETFMT, false); } switch (nType) { @@ -864,7 +864,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog&, rDlg, vo if (pRedline) { // Traveling only if more than one field. - if( !pSh->IsCrsrPtAtEnd() ) + if( !pSh->IsCursorPtAtEnd() ) pSh->SwapPam(); // Move the cursor behind the Redline. pSh->Push(); @@ -884,7 +884,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog&, rDlg, vo rDlg.EnableTravel(bEnable, true); - if( pSh->IsCrsrPtAtEnd() ) + if( pSh->IsCursorPtAtEnd() ) pSh->SwapPam(); pRedline = pSh->GetCurrRedline(); diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx index 7eacd872d994..851227bc3c88 100644 --- a/sw/source/uibase/shells/textidx.cxx +++ b/sw/source/uibase/shells/textidx.cxx @@ -118,7 +118,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq) rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); - aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); // Height = width for a more consistent preview (analogous to edit range) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); const SwTOXBase* pCurTOX = nullptr; @@ -195,7 +195,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, true)); } - else if ( rSh.CrsrInsideInputField() ) + else if ( rSh.CursorInsideInputField() ) { rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG ); rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG ); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 2ea08ce09815..4834685bc6f1 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -138,7 +138,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) { SwWrtShell &rSh = GetShell(); - OSL_ENSURE( !rSh.IsObjSelected() && !rSh.IsFrmSelected(), + OSL_ENSURE( !rSh.IsObjSelected() && !rSh.IsFrameSelected(), "wrong shell on dispatcher" ); const SfxItemSet *pArgs = rReq.GetArgs(); @@ -155,8 +155,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) break; case FN_INSERT_SOFT_HYPHEN: - if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar() && - CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( true, -1 )) + if( CHAR_SOFTHYPHEN != rSh.SwCursorShell::GetChar() && + CHAR_SOFTHYPHEN != rSh.SwCursorShell::GetChar( true, -1 )) rSh.Insert( OUString( CHAR_SOFTHYPHEN ) ); break; @@ -199,7 +199,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) case FN_INSERT_BREAK: { - if( !rSh.CrsrInsideInputField() ) + if( !rSh.CursorInsideInputField() ) { rSh.SplitNode(); } @@ -504,20 +504,20 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) Size aSize(16 * MM50, 8 * MM50); GetShell().LockPaint(); GetShell().StartAllAction(); - SwFlyFrmAttrMgr aMgr( true, GetShellPtr(), FRMMGR_TYPE_TEXT ); + SwFlyFrameAttrMgr aMgr( true, GetShellPtr(), FRMMGR_TYPE_TEXT ); if(nCols > 1) { SwFormatCol aCol; aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() ); aMgr.SetCol( aCol ); } - aMgr.InsertFlyFrm(FLY_AT_PARA, aStartPos, aSize); + aMgr.InsertFlyFrame(FLY_AT_PARA, aStartPos, aSize); GetShell().EndAllAction(); GetShell().UnlockPaint(); } else { - GetView().InsFrmMode(nCols); + GetView().InsFrameMode(nCols); } rReq.Ignore(); } @@ -535,7 +535,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) } // Create new border - SwFlyFrmAttrMgr aMgr( true, GetShellPtr(), FRMMGR_TYPE_TEXT ); + SwFlyFrameAttrMgr aMgr( true, GetShellPtr(), FRMMGR_TYPE_TEXT ); if(pArgs) { Size aSize(aMgr.GetSize()); @@ -563,7 +563,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) GetShell().LockPaint(); GetShell().StartAllAction(); - aMgr.InsertFlyFrm(eAnchor, aPos, aSize); + aMgr.InsertFlyFrame(eAnchor, aPos, aSize); GetShell().EndAllAction(); GetShell().UnlockPaint(); @@ -576,7 +576,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrmTabDialog("FrameDialog", + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog("FrameDialog", GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet)); @@ -596,7 +596,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if( rShell.IsInClickToEdit() ) rShell.DelRight(); - aMgr.InsertFlyFrm(); + aMgr.InsertFlyFrame(); uno::Reference< frame::XDispatchRecorder > xRecorder = GetView().GetViewFrame()->GetBindings().GetRecorder(); @@ -659,11 +659,11 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) SfxObjectCreateMode eCreateMode = GetView().GetDocShell()->GetCreateMode(); - bool bCrsrInHidden = false; + bool bCursorInHidden = false; if( !rSh.HasMark() ) { rSh.Push(); - bCrsrInHidden = rSh.SelectHiddenRange(); + bCursorInHidden = rSh.SelectHiddenRange(); rSh.Pop(); } @@ -674,10 +674,10 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_AVMEDIA: case SID_INSERT_SOUND: case SID_INSERT_VIDEO: - if ( GetShell().IsSelFrmMode() - || GetShell().CrsrInsideInputField() + if ( GetShell().IsSelFrameMode() + || GetShell().CursorInsideInputField() || SfxObjectCreateMode::EMBEDDED == eCreateMode - || bCrsrInHidden ) + || bCursorInHidden ) { rSet.DisableItem( nWhich ); } @@ -685,9 +685,9 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_DIAGRAM: if( !aMOpt.IsChart() - || GetShell().CrsrInsideInputField() + || GetShell().CursorInsideInputField() || eCreateMode == SfxObjectCreateMode::EMBEDDED - || bCrsrInHidden ) + || bCursorInHidden ) { rSet.DisableItem( nWhich ); } @@ -696,8 +696,8 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case FN_INSERT_SMA: if( !aMOpt.IsMath() || eCreateMode == SfxObjectCreateMode::EMBEDDED - || bCrsrInHidden - || rSh.CrsrInsideInputField() ) + || bCursorInHidden + || rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -707,12 +707,12 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_OBJECT: case SID_INSERT_PLUGIN: { - if( eCreateMode == SfxObjectCreateMode::EMBEDDED || bCrsrInHidden ) + if( eCreateMode == SfxObjectCreateMode::EMBEDDED || bCursorInHidden ) { rSet.DisableItem( nWhich ); } - else if( GetShell().IsSelFrmMode() - || GetShell().CrsrInsideInputField() ) + else if( GetShell().IsSelFrameMode() + || GetShell().CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -729,10 +729,10 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case FN_INSERT_FRAME_INTERACT_NOCOL : case FN_INSERT_FRAME_INTERACT: { - if( GetShell().IsSelFrmMode() + if( GetShell().IsSelFrameMode() || rSh.IsTableMode() - || GetShell().CrsrInsideInputField() - || bCrsrInHidden ) + || GetShell().CursorInsideInputField() + || bCursorInHidden ) rSet.DisableItem(nWhich); } break; @@ -764,12 +764,12 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) // Get the text of the Link. rSh.StartAction(); - rSh.CreateCrsr(); - rSh.SwCrsrShell::SelectTextAttr(RES_TXTATR_INETFMT,true); + rSh.CreateCursor(); + rSh.SwCursorShell::SelectTextAttr(RES_TXTATR_INETFMT,true); OUString sLinkName = rSh.GetSelText(); aHLinkItem.SetName(sLinkName); aHLinkItem.SetInsertMode(HLINK_FIELD); - rSh.DestroyCrsr(); + rSh.DestroyCursor(); rSh.EndAction(); } else @@ -789,13 +789,13 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) break; case FN_INSERT_FRAME: - if (rSh.IsSelFrmMode() ) + if (rSh.IsSelFrameMode() ) { const int nSel = rSh.GetSelectionType(); - if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCrsrInHidden ) + if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCursorInHidden ) rSet.DisableItem(nWhich); } - else if ( rSh.CrsrInsideInputField() ) + else if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -936,9 +936,9 @@ SwTextShell::~SwTextShell() { } -SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrmAttrMgr& rMgr) +SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr) { - static const sal_uInt16 aFrmAttrRange[] = + static const sal_uInt16 aFrameAttrRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, @@ -950,19 +950,19 @@ SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrmAttrMgr& rMgr) 0 }; - SfxItemSet aSet(GetPool(), aFrmAttrRange ); + SfxItemSet aSet(GetPool(), aFrameAttrRange ); aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); // For the Area tab page. GetShell().GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->PutAreaListItems(aSet); const SwRect &rPg = GetShell().GetAnyCurRect(RECT_PAGE); - SwFormatFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); - aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); - aSet.Put(aFrmSize); + SwFormatFrameSize aFrameSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); + aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); + aSet.Put(aFrameSize); const SwRect &rPr = GetShell().GetAnyCurRect(RECT_PAGE_PRT); - SwFormatFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); + SwFormatFrameSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA)); aSet.Put(aPrtSize); @@ -1122,7 +1122,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) rSh.SetMark(); rSh.ExtendSelection( false, aChars.getLength() ); rSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND | SetAttrMode::NOFORMATATTR ); - if( !rSh.IsCrsrPtAtEnd() ) + if( !rSh.IsCursorPtAtEnd() ) rSh.SwapPam(); rSh.ClearMark(); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 18656e218b45..1961204eff06 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -309,7 +309,7 @@ void SwTextShell::Execute(SfxRequest &rReq) aRewriter.AddRule( UndoArg2, SW_RES(STR_YIELDS) ); aRewriter.AddRule( UndoArg3, sReplacement ); rWrtSh.StartUndo(UNDO_REPLACE, &aRewriter); - rWrtSh.GetCrsr()->Normalize(false); + rWrtSh.GetCursor()->Normalize(false); rWrtSh.ClearMark(); for( sal_uInt32 i=aToggle.CharsToDelete(); i > 0; --i ) rWrtSh.DelLeft(); @@ -753,7 +753,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if(pField && pField->GetTypeId() == TYP_GETREFFLD) { rWrtSh.StartAllAction(); - rWrtSh.SwCrsrShell::GotoRefMark( static_cast<SwGetRefField*>(pField)->GetSetRefName(), + rWrtSh.SwCursorShell::GotoRefMark( static_cast<SwGetRefField*>(pField)->GetSetRefName(), static_cast<SwGetRefField*>(pField)->GetSubType(), static_cast<SwGetRefField*>(pField)->GetSeqNo() ); rWrtSh.EndAllAction(); @@ -792,7 +792,7 @@ void SwTextShell::Execute(SfxRequest &rReq) aFieldMgr.UpdateCurField( aFieldMgr.GetCurField()->GetFormat(), OUString(), sFormula ); else if( !sFormula.isEmpty() ) { - if( rWrtSh.IsCrsrInTable() ) + if( rWrtSh.IsCursorInTable() ) { SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); aSet.Put( SwTableBoxFormula( sFormula )); @@ -911,7 +911,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } if ( !pPaM ) - pPaM = rWrtSh.GetCrsr(); + pPaM = rWrtSh.GetCursor(); FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &GetView()) != nullptr ); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); @@ -987,7 +987,7 @@ void SwTextShell::Execute(SfxRequest &rReq) ::SwToSfxPageDescAttr( aCoreSet ); // Properties of numbering - if (rWrtSh.GetNumRuleAtCurrCrsrPos()) + if (rWrtSh.GetNumRuleAtCurrCursorPos()) { SfxBoolItem aStart( FN_NUMBER_NEWSTART, rWrtSh.IsNumRuleStart( pPaM ) ); aCoreSet.Put(aStart); @@ -1160,7 +1160,7 @@ void SwTextShell::Execute(SfxRequest &rReq) //Above code demonstrates that when the cursor is at the start of a paragraph which has bullet, //press TAB will increase the bullet level. //So I copied from that ^^ - if ( rWrtSh.GetNumRuleAtCurrCrsrPos() && !rWrtSh.HasReadonlySel() ) + if ( rWrtSh.GetNumRuleAtCurrCursorPos() && !rWrtSh.HasReadonlySel() ) { rWrtSh.NumUpDown( SID_INC_INDENT == nSlot ); } @@ -1346,7 +1346,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { rWrtSh.SetReadonlySelectionOption( !rWrtSh.GetViewOptions()->IsSelectionInReadonly()); - rWrtSh.ShowCrsr(); + rWrtSh.ShowCursor(); } break; case FN_SELECTION_MODE_DEFAULT: @@ -1495,7 +1495,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) break; case FN_NUMBER_NEWSTART : - if(!rSh.GetNumRuleAtCurrCrsrPos()) + if(!rSh.GetNumRuleAtCurrCursorPos()) rSet.DisableItem(nWhich); else rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, @@ -1513,7 +1513,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSet.DisableItem(nWhich); } else if ( nWhich == FN_EDIT_FORMULA - && rSh.CrsrInsideInputField() ) + && rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1524,12 +1524,12 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_FOOTNOTE: case FN_INSERT_FOOTNOTE_DLG: { - const FrmTypeFlags nNoType = - FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE; - if ( rSh.GetFrmType(nullptr,true) & nNoType ) + const FrameTypeFlags nNoType = + FrameTypeFlags::FLY_ANY | FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE; + if ( rSh.GetFrameType(nullptr,true) & nNoType ) rSet.DisableItem(nWhich); - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1540,16 +1540,16 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case SID_INSERTDOC: case FN_INSERT_GLOSSARY: case FN_EXPAND_GLOSSARY: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } break; case FN_INSERT_TABLE: - if ( rSh.CrsrInsideInputField() + if ( rSh.CursorInsideInputField() || rSh.GetTableFormat() - || (rSh.GetFrmType(nullptr,true) & FrmTypeFlags::FOOTNOTE) ) + || (rSh.GetFrameType(nullptr,true) & FrameTypeFlags::FOOTNOTE) ) { rSet.DisableItem( nWhich ); } @@ -1578,7 +1578,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) //if the paragrah has bullet we'll do the following things: //1: if the bullet level is the first level, disable the decrease-indent button //2: if the bullet level is the last level, disable the increase-indent button - if ( rSh.GetNumRuleAtCurrCrsrPos() && !rSh.HasReadonlySel() ) + if ( rSh.GetNumRuleAtCurrCursorPos() && !rSh.HasReadonlySel() ) { const sal_uInt8 nLevel = rSh.GetNumLevel(); if ( ( nLevel == ( MAXLEVEL - 1 ) && nWhich == SID_INC_INDENT ) @@ -1648,7 +1648,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_BOOKMARK: if( rSh.IsTableMode() - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1656,7 +1656,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_BREAK: if ( rSh.HasReadonlySel() - && !rSh.CrsrInsideInputField() ) + && !rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1665,7 +1665,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_BREAK_DLG: case FN_INSERT_COLUMN_BREAK: case FN_INSERT_PAGEBREAK: - if( rSh.CrsrInsideInputField() ) + if( rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1688,7 +1688,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) { SvtCJKOptions aCJKOptions; if( !aCJKOptions.IsRubyEnabled() - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, false ); rSet.DisableItem(nWhich); @@ -1702,7 +1702,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) if( GetView().GetDocShell()->IsReadOnly() || ( !GetView().GetViewFrame()->HasChildWindow(nWhich) && rSh.HasReadonlySel() ) - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -1830,7 +1830,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_NUM_NUM_RULE_INDEX: case FN_OUTLINE_RULE_INDEX: { - SwNumRule* pCurRule = const_cast<SwNumRule*>(GetShell().GetNumRuleAtCurrCrsrPos()); + SwNumRule* pCurRule = const_cast<SwNumRule*>(GetShell().GetNumRuleAtCurrCursorPos()); sal_uInt16 nActNumLvl = USHRT_MAX; if( pCurRule ) { diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index 55aae8590a50..3d004231fa01 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -230,7 +230,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) if ( pSize ) // selected text has one size { // must create new one, otherwise document is without pam - SwPaM* pPaM = rWrtSh.GetCrsr(); + SwPaM* pPaM = rWrtSh.GetCursor(); vItems.push_back( std::make_pair( pSize, std::unique_ptr<SwPaM>(new SwPaM( *(pPaM->GetMark()), *(pPaM->GetPoint()))) ) ); } else @@ -361,10 +361,10 @@ SET_LINESPACE: else bChgAdjust = true; - SvxFrameDirection eFrmDirection = + SvxFrameDirection eFrameDirection = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ? FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP; - aSet.Put( SvxFrameDirectionItem( eFrmDirection, RES_FRAMEDIR ) ); + aSet.Put( SvxFrameDirectionItem( eFrameDirection, RES_FRAMEDIR ) ); if (bChgAdjust) { @@ -375,7 +375,7 @@ SET_LINESPACE: aAdjust.SetWhich(SID_ATTR_PARA_ADJUST); GetView().GetViewFrame()->GetBindings().SetState( aAdjust ); // Toggle numbering alignment - const SwNumRule* pCurRule = GetShell().GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pCurRule = GetShell().GetNumRuleAtCurrCursorPos(); if( pCurRule ) { SvxNumRule aRule = pCurRule->MakeSvxNumRule(); @@ -705,17 +705,17 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) if((!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES))) && aCoreSet.GetItemState( RES_FRAMEDIR, false ) >= SfxItemState::DEFAULT) { - SvxFrameDirection eFrmDir = (SvxFrameDirection) + SvxFrameDirection eFrameDir = (SvxFrameDirection) static_cast<const SvxFrameDirectionItem& >(aCoreSet.Get(RES_FRAMEDIR)).GetValue(); - if (FRMDIR_ENVIRONMENT == eFrmDir) + if (FRMDIR_ENVIRONMENT == eFrameDir) { - eFrmDir = rSh.IsInRightToLeftText() ? + eFrameDir = rSh.IsInRightToLeftText() ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP; } bFlag = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot && - FRMDIR_HORI_LEFT_TOP == eFrmDir) || + FRMDIR_HORI_LEFT_TOP == eFrameDir) || (SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot && - FRMDIR_HORI_RIGHT_TOP == eFrmDir); + FRMDIR_HORI_RIGHT_TOP == eFrameDir); } else { diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx index 1d85bfbd188b..7b5ad39ae64d 100644 --- a/sw/source/uibase/shells/txtcrsr.cxx +++ b/sw/source/uibase/shells/txtcrsr.cxx @@ -349,21 +349,21 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) bRet = rSh.GotoObj(true, GotoObjFlags::Any); if(bRet) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); } break; case FN_NEXT_FOOTNOTE: - rSh.MoveCrsr(); + rSh.MoveCursor(); bRet = rSh.GotoNextFootnoteAnchor(); break; case FN_PREV_FOOTNOTE: - rSh.MoveCrsr(); + rSh.MoveCursor(); bRet = rSh.GotoPrevFootnoteAnchor(); break; case FN_TO_HEADER: - rSh.MoveCrsr(); - if ( FrmTypeFlags::HEADER & rSh.GetFrmType(nullptr,false) ) + rSh.MoveCursor(); + if ( FrameTypeFlags::HEADER & rSh.GetFrameType(nullptr,false) ) rSh.SttPg(); else { @@ -374,8 +374,8 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) bSetRetVal = false; break; case FN_TO_FOOTER: - rSh.MoveCrsr(); - if ( FrmTypeFlags::FOOTER & rSh.GetFrmType(nullptr,false) ) + rSh.MoveCursor(); + if ( FrameTypeFlags::FOOTER & rSh.GetFrameType(nullptr,false) ) rSh.EndPg(); else { @@ -386,8 +386,8 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) bSetRetVal = false; break; case FN_FOOTNOTE_TO_ANCHOR: - rSh.MoveCrsr(); - if ( FrmTypeFlags::FOOTNOTE & rSh.GetFrmType(nullptr,false) ) + rSh.MoveCursor(); + if ( FrameTypeFlags::FOOTNOTE & rSh.GetFrameType(nullptr,false) ) rSh.GotoFootnoteAnchor(); else rSh.GotoFootnoteText(); diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index eb2931965c71..e1d39e7661c1 100644 --- a/sw/source/uibase/table/chartins.cxx +++ b/sw/source/uibase/table/chartins.cxx @@ -144,7 +144,7 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings ) uno::Reference< frame::XModel > xChartModel; OUString aRangeString; - if( rWrtShell.IsCrsrInTable()) + if( rWrtShell.IsCursorInTable()) { if (!rWrtShell.IsTableMode()) { diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx index 96d1090138a3..b1518e1f01b9 100644 --- a/sw/source/uibase/table/tablemgr.cxx +++ b/sw/source/uibase/table/tablemgr.cxx @@ -205,13 +205,13 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( pSh->StartAllAction(); OUString aName; - if (pSh->IsCrsrInTable()) + if (pSh->IsCursorInTable()) { aName = pSh->GetTableFormat()->GetName(); // insert node before table pSh->MoveTable( fnTableCurr, fnTableStart ); pSh->Up( false ); - if ( pSh->IsCrsrInTable() ) + if ( pSh->IsCursorInTable() ) { if ( aName != pSh->GetTableFormat()->GetName() ) pSh->Down( false ); // two adjacent tables diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx index fb16147de311..8f4117809a2b 100644 --- a/sw/source/uibase/uiview/formatclipboard.cxx +++ b/sw/source/uibase/uiview/formatclipboard.cxx @@ -118,7 +118,7 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh ) rSet.Put( pFrameFormat->GetPageDesc() ); rSet.Put( pFrameFormat->GetLayoutSplit() ); rSet.Put( pFrameFormat->GetKeep() ); - rSet.Put( pFrameFormat->GetFrmDir() ); + rSet.Put( pFrameFormat->GetFrameDir() ); } SwFormatRowSplit* pSplit = nullptr; @@ -288,12 +288,12 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP // get the current PaM, the cursor // if there several selection it currently point // on the last (sort by there creation time) selection - SwPaM* pCrsr = rWrtShell.GetCrsr(); + SwPaM* pCursor = rWrtShell.GetCursor(); - bool bHasSelection = pCrsr->HasMark(); + bool bHasSelection = pCursor->HasMark(); bool bForwardSelection = false; - if(!bHasSelection && pCrsr->IsMultiSelection()) + if(!bHasSelection && pCursor->IsMultiSelection()) { // if cursor has multiple selections @@ -301,18 +301,18 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP rWrtShell.KillPams(); // reset the cursor to the remaining selection - pCrsr = rWrtShell.GetCrsr(); + pCursor = rWrtShell.GetCursor(); bHasSelection = true; } bool dontMove = false; if (bHasSelection) { - bForwardSelection = (*pCrsr->GetPoint()) > (*pCrsr->GetMark()); + bForwardSelection = (*pCursor->GetPoint()) > (*pCursor->GetMark()); // clear the selection leaving just the cursor - pCrsr->DeleteMark(); - pCrsr->SetMark(); + pCursor->DeleteMark(); + pCursor->SetMark(); } else { @@ -325,7 +325,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP // revert left and right if ( rightToLeft ) { - if (pCrsr->GetPoint()->nContent == 0) + if (pCursor->GetPoint()->nContent == 0) dontMove = true; else bForwardSelection = !bForwardSelection; @@ -334,13 +334,13 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP // move the cursor in order to select one character if (!dontMove) - pCrsr->Move( bForwardSelection ? fnMoveBackward : fnMoveForward ); + pCursor->Move( bForwardSelection ? fnMoveBackward : fnMoveForward ); } if(pItemSet_TextAttr) { if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) ) - rWrtShell.GetFlyFrmAttr(*pItemSet_TextAttr); + rWrtShell.GetFlyFrameAttr(*pItemSet_TextAttr); else { // get the text attributes from named and automatic formatting @@ -556,7 +556,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo // apply the character automatic attributes if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) ) - rWrtShell.SetFlyFrmAttr(*pTemplateItemSet); + rWrtShell.SetFlyFrameAttr(*pTemplateItemSet); else if ( !bNoCharacterFormats ) rWrtShell.SetAttrSet(*pTemplateItemSet); } diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index dc727de22312..a3703054ff52 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -505,12 +505,12 @@ void SwPagePreviewWin::MouseButtonDown( const MouseEvent& rMEvt ) { // close page preview, set new cursor position and switch to // normal view. - OUString sNewCrsrPos = OUString::number( aDocPos.X() ) + ";" + + OUString sNewCursorPos = OUString::number( aDocPos.X() ) + ";" + OUString::number( aDocPos.Y() ) + ";"; - mrView.SetNewCrsrPos( sNewCrsrPos ); + mrView.SetNewCursorPos( sNewCursorPos ); - SfxViewFrame *pTmpFrm = mrView.GetViewFrame(); - pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0, + SfxViewFrame *pTmpFrame = mrView.GetViewFrame(); + pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0, SfxCallMode::ASYNCHRON ); } else if ( bIsDocPos || bPosInEmptyPage ) @@ -957,8 +957,8 @@ MOVEPAGE: if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage )) nSelPage +=2; SetNewPage( nSelPage ); - SfxViewFrame *pTmpFrm = GetViewFrame(); - pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0, + SfxViewFrame *pTmpFrame = GetViewFrame(); + pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0, SfxCallMode::ASYNCHRON ); } break; @@ -1226,7 +1226,7 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): { // Set the current page as the first. sal_uInt16 nPhysPg, nVirtPg; - static_cast<SwCrsrShell*>(pVS)->GetPageNum( nPhysPg, nVirtPg, true, false ); + static_cast<SwCursorShell*>(pVS)->GetPageNum( nPhysPg, nVirtPg, true, false ); if( 1 != pViewWin->GetCol() && 1 == nPhysPg ) --nPhysPg; pViewWin->SetSttPage( nPhysPg ); diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx index c67b46899498..93c6cfeb4394 100644 --- a/sw/source/uibase/uiview/swcli.cxx +++ b/sw/source/uibase/uiview/swcli.cxx @@ -47,7 +47,7 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect ) // are set to the desired value. This value will be passed on to the // InPlaceClient. // The core accepts or formats the adjusted values not necessarily. - // If the Ole-Frm is formatted, then the CalcAndSetScale() of the WrtShell + // If the Ole-Frame is formatted, then the CalcAndSetScale() of the WrtShell // will be called. There the scaling of the SwOleClient is set if necessary. SwWrtShell &rSh = static_cast<SwView*>(GetViewShell())->GetWrtShell(); @@ -78,18 +78,18 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect ) rSh.EndAllAction(); - SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )), + SwRect aFrame( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )), aPrt( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, GetObject() )); - aLogRect.SetPos( aPrt.Pos() + aFrm.Pos() ); + aLogRect.SetPos( aPrt.Pos() + aFrame.Pos() ); aLogRect.SetSize( aPrt.SSize() ); } void SwOleClient::ObjectAreaChanged() { SwWrtShell &rSh = static_cast<SwView*>(GetViewShell())->GetWrtShell(); - SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )); - if ( !aFrm.IsOver( rSh.VisArea() ) ) - rSh.MakeVisible( aFrm ); + SwRect aFrame( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )); + if ( !aFrame.IsOver( rSh.VisArea() ) ) + rSh.MakeVisible( aFrame ); } void SwOleClient::ViewChanged() diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 1c2de7cb6c98..0cd0cc34ee14 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -463,7 +463,7 @@ extern "C" } } -IMPL_LINK_NOARG_TYPED(SwView, AttrChangedNotify, SwCrsrShell*, void) +IMPL_LINK_NOARG_TYPED(SwView, AttrChangedNotify, SwCursorShell*, void) { if ( GetEditWin().IsChainMode() ) GetEditWin().SetChainMode( false ); @@ -546,7 +546,7 @@ void SwView::_CheckReadonlyState() eStateProtAll = rDis.QueryState( FN_EDIT_REGION, pItem ); bool bChgd = false; - if ( !m_pWrtShell->IsCrsrReadonly() ) + if ( !m_pWrtShell->IsCursorReadonly() ) { static sal_uInt16 aROIds[] = { @@ -725,7 +725,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) // If the view is switch from one to another, the 'old' view is given by // parameter <pOldSh>. - m_bCenterCrsr = m_bTopCrsr = m_bAlwaysShowSel = m_bTabColFromDoc = m_bTabRowFromDoc = + m_bCenterCursor = m_bTopCursor = m_bAlwaysShowSel = m_bTabColFromDoc = m_bTabRowFromDoc = m_bSetTabColFromDoc = m_bSetTabRowFromDoc = m_bAttrChgNotified = m_bAttrChgNotifiedWithRegistrations = m_bVerbsActive = m_bDrawRotate = m_bInOuterResizePixel = m_bInInnerResizePixel = m_bPasteState = m_bPasteSpecialState = m_bMakeSelectionVisible = false; @@ -773,10 +773,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) if( dynamic_cast<const SwPagePreview *>(pExistingSh) != nullptr ) { m_sSwViewData = static_cast<SwPagePreview*>(pExistingSh)->GetPrevSwViewData(); - m_sNewCrsrPos = static_cast<SwPagePreview*>(pExistingSh)->GetNewCrsrPos(); + m_sNewCursorPos = static_cast<SwPagePreview*>(pExistingSh)->GetNewCursorPos(); m_nNewPage = static_cast<SwPagePreview*>(pExistingSh)->GetNewPage(); m_bOldShellWasPagePreview = true; - m_bIsPreviewDoubleClick = !m_sNewCrsrPos.isEmpty() || m_nNewPage != USHRT_MAX; + m_bIsPreviewDoubleClick = !m_sNewCursorPos.isEmpty() || m_nNewPage != USHRT_MAX; } else if( dynamic_cast<const SwSrcView *>(pExistingSh) != nullptr ) bOldShellWasSrcView = true; @@ -1096,7 +1096,7 @@ void SwView::WriteUserData( OUString &rUserData, bool bBrowse ) rUserData += OUString::number( (sal_uInt16)m_pWrtShell->GetViewOptions()->GetZoomType());//eZoom; rUserData += ";"; - rUserData += FrmTypeFlags::NONE == m_pWrtShell->GetSelFrmType() ? OUString("0") : OUString("1"); + rUserData += FrameTypeFlags::NONE == m_pWrtShell->GetSelFrameType() ? OUString("0") : OUString("1"); } // Set CursorPos @@ -1132,7 +1132,7 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) // because which parameter is evaluated first? long nX = rUserData.getToken( 0, ';', nPos ).toInt32(), nY = rUserData.getToken( 0, ';', nPos ).toInt32(); - Point aCrsrPos( nX, nY ); + Point aCursorPos( nX, nY ); sal_uInt16 nZoomFactor = static_cast< sal_uInt16 >( rUserData.getToken(0, ';', nPos ).toInt32() ); @@ -1160,10 +1160,10 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) } bool bSelectObj = (0 != rUserData.getToken( nOff, ';', nPos ).toInt32()) - && m_pWrtShell->IsObjSelectable( aCrsrPos ); + && m_pWrtShell->IsObjSelectable( aCursorPos ); // restore editing position - m_pViewImpl->SetRestorePosition(aCrsrPos, bSelectObj); + m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj); // set flag value to avoid macro execution. bool bSavedFlagValue = m_pWrtShell->IsMacroExecAllowed(); m_pWrtShell->SetMacroExecAllowed( false ); @@ -1171,11 +1171,11 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) // go to the last editing position when opening own files if(m_bOldShellWasPagePreview || bIsOwnDocument) { - m_pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos, !bSelectObj ); + m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj ); if( bSelectObj ) { - m_pWrtShell->SelectObj( aCrsrPos ); - m_pWrtShell->EnterSelFrmMode( &aCrsrPos ); + m_pWrtShell->SelectObj( aCursorPos ); + m_pWrtShell->EnterSelFrameMode( &aCursorPos ); } } @@ -1196,21 +1196,21 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) } //apply information from print preview - if available - if( !m_sNewCrsrPos.isEmpty() ) + if( !m_sNewCursorPos.isEmpty() ) { - long nXTmp = m_sNewCrsrPos.getToken( 0, ';' ).toInt32(), - nYTmp = m_sNewCrsrPos.getToken( 1, ';' ).toInt32(); - Point aCrsrPos2( nXTmp, nYTmp ); - bSelectObj = m_pWrtShell->IsObjSelectable( aCrsrPos2 ); + long nXTmp = m_sNewCursorPos.getToken( 0, ';' ).toInt32(), + nYTmp = m_sNewCursorPos.getToken( 1, ';' ).toInt32(); + Point aCursorPos2( nXTmp, nYTmp ); + bSelectObj = m_pWrtShell->IsObjSelectable( aCursorPos2 ); - m_pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2 ); + m_pWrtShell->SwCursorShell::SetCursor( aCursorPos2 ); if( bSelectObj ) { - m_pWrtShell->SelectObj( aCrsrPos2 ); - m_pWrtShell->EnterSelFrmMode( &aCrsrPos2 ); + m_pWrtShell->SelectObj( aCursorPos2 ); + m_pWrtShell->EnterSelFrameMode( &aCursorPos2 ); } m_pWrtShell->MakeSelVisible(); - m_sNewCrsrPos.clear(); + m_sNewCursorPos.clear(); } else if(USHRT_MAX != m_nNewPage) { @@ -1254,7 +1254,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > bool bViewLayoutBookMode = pVOpt->IsViewLayoutBookMode(); sal_Int16 nViewLayoutColumns = pVOpt->GetViewLayoutColumns(); - bool bSelectedFrame = ( m_pWrtShell->GetSelFrmType() != FrmTypeFlags::NONE ), + bool bSelectedFrame = ( m_pWrtShell->GetSelFrameType() != FrameTypeFlags::NONE ), bGotVisibleLeft = false, bGotVisibleTop = false, bGotVisibleRight = false, bGotVisibleBottom = false, bGotZoomType = false, @@ -1326,7 +1326,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > } if (bGotVisibleBottom) { - Point aCrsrPos( nX, nY ); + Point aCursorPos( nX, nY ); const long nAdd = m_pWrtShell->GetViewOptions()->getBrowseMode() ? DOCUMENTBORDER : DOCUMENTBORDER*2; if (nBottom <= (m_pWrtShell->GetDocSize().Height()+nAdd) ) { @@ -1342,17 +1342,17 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > } if (bGotIsSelectedFrame) { - bool bSelectObj = bSelectedFrame && m_pWrtShell->IsObjSelectable( aCrsrPos ); + bool bSelectObj = bSelectedFrame && m_pWrtShell->IsObjSelectable( aCursorPos ); // set flag value to avoid macro execution. bool bSavedFlagValue = m_pWrtShell->IsMacroExecAllowed(); m_pWrtShell->SetMacroExecAllowed( false ); // os: changed: The user data has to be read if the view is switched back from page preview // go to the last editing position when opening own files - m_pViewImpl->SetRestorePosition(aCrsrPos, bSelectObj); + m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj); if(m_bOldShellWasPagePreview|| bIsOwnDocument) { - m_pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos, !bSelectObj ); + m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj ); // Update the shell to toggle Header/Footer edit if needed bool bInHeader = true; @@ -1377,8 +1377,8 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > if( bSelectObj ) { - m_pWrtShell->SelectObj( aCrsrPos ); - m_pWrtShell->EnterSelFrmMode( &aCrsrPos ); + m_pWrtShell->SelectObj( aCursorPos ); + m_pWrtShell->EnterSelFrameMode( &aCursorPos ); } } @@ -1509,7 +1509,7 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe pValue++;nIndex++; pValue->Name = "IsSelectedFrame"; - pValue->Value <<= FrmTypeFlags::NONE != m_pWrtShell->GetSelFrmType(); + pValue->Value <<= FrameTypeFlags::NONE != m_pWrtShell->GetSelFrameType(); nIndex++; assert(nIndex == NUM_VIEW_SETTINGS); @@ -1524,9 +1524,9 @@ void SwView::ShowCursor( bool bOn ) m_pWrtShell->LockView( true ); //lock visible section if( !bOn ) - m_pWrtShell->HideCrsr(); - else if( !m_pWrtShell->IsFrmSelected() && !m_pWrtShell->IsObjSelected() ) - m_pWrtShell->ShowCrsr(); + m_pWrtShell->HideCursor(); + else if( !m_pWrtShell->IsFrameSelected() && !m_pWrtShell->IsObjSelected() ) + m_pWrtShell->ShowCursor(); if( bUnlockView ) m_pWrtShell->LockView( false ); @@ -1548,7 +1548,7 @@ ErrCode SwView::DoVerb( long nVerb ) bool SwView::HasSelection( bool bText ) const { - return bText ? GetWrtShell().SwCrsrShell::HasSelection() + return bText ? GetWrtShell().SwCursorShell::HasSelection() : GetWrtShell().HasSelection(); } diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index aaa4703a9fa5..1218818e8109 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -133,7 +133,7 @@ void SwView::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOpt m_pWrtShell->ApplyAccessiblityOptions(rAccessibilityOptions); //to enable the right state of the selection cursor in readonly documents if(GetDocShell()->IsReadOnly()) - m_pWrtShell->ShowCrsr(); + m_pWrtShell->ShowCursor(); } diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 853120e3a8ef..a8c83ce524ce 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -249,7 +249,7 @@ int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter, } } - SwFlyFrmAttrMgr aFrameManager( true, GetWrtShellPtr(), FRMMGR_TYPE_GRF ); + SwFlyFrameAttrMgr aFrameManager( true, GetWrtShellPtr(), FRMMGR_TYPE_GRF ); SwWrtShell& rShell = GetWrtShell(); // #i123922# determine if we really want to insert or replace the graphic at a selected object @@ -324,11 +324,11 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) // pool formats - const ::std::vector<OUString>& rFrmPoolArr( + const ::std::vector<OUString>& rFramePoolArr( SwStyleNameMapper::GetFrameFormatUINameArray()); - for( size_t i = 0; i < rFrmPoolArr.size(); ++i ) + for( size_t i = 0; i < rFramePoolArr.size(); ++i ) { - aFormats.push_back(rFrmPoolArr[i]); + aFormats.push_back(rFramePoolArr[i]); } std::sort(aFormats.begin(), aFormats.end()); @@ -465,7 +465,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) // #i123922# no new FrameFormat for replace mode, only when new object was created, // else this would reset the current setting for the frame holding the graphic - if ( !bReplaceMode && rSh.IsFrmSelected() ) + if ( !bReplaceMode && rSh.IsFrameSelected() ) { SwFrameFormat* pFormat = pDoc->FindFrameFormatByName( sGraphicFormat ); if(!pFormat) @@ -558,9 +558,9 @@ void SwView::Execute(SfxRequest &rReq) Rectangle aVis( GetVisArea() ); SwEditWin& rTmpWin = GetEditWin(); if ( FN_PAGEUP == nSlot || FN_PAGEUP_SEL == nSlot ) - PageUpCrsr(FN_PAGEUP_SEL == nSlot); + PageUpCursor(FN_PAGEUP_SEL == nSlot); else - PageDownCrsr(FN_PAGEDOWN_SEL == nSlot); + PageDownCursor(FN_PAGEDOWN_SEL == nSlot); rReq.SetReturnValue(SfxBoolItem(nSlot, aVis != GetVisArea())); @@ -672,7 +672,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_REJECT_DIRECT: { SwDoc *pDoc = m_pWrtShell->GetDoc(); - SwPaM *pCursor = m_pWrtShell->GetCrsr(); + SwPaM *pCursor = m_pWrtShell->GetCursor(); if( pCursor->HasMark()) { if (FN_REDLINE_ACCEPT_DIRECT == nSlot) @@ -723,7 +723,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_PREV_CHANGE: { - const SwPaM *pCursor = m_pWrtShell->GetCrsr(); + const SwPaM *pCursor = m_pWrtShell->GetCursor(); const SwPosition initialCursorStart = *pCursor->Start(); const SwRangeRedline *pPrev = m_pWrtShell->SelPrevRedline(); @@ -807,7 +807,7 @@ void SwView::Execute(SfxRequest &rReq) if ( m_pWrtShell->HasDrawView() && m_pWrtShell->GetDrawView()->IsDragObj() ) { m_pWrtShell->BreakDrag(); - m_pWrtShell->EnterSelFrmMode(); + m_pWrtShell->EnterSelFrameMode(); } else if ( m_pWrtShell->IsDrawCreate() ) { @@ -854,8 +854,8 @@ void SwView::Execute(SfxRequest &rReq) const SwFrameFormat* pFormat = m_pWrtShell->GetFlyFrameFormat(); if(m_pWrtShell->GotoFly( pFormat->GetName(), FLYCNTTYPE_FRM )) { - m_pWrtShell->HideCrsr(); - m_pWrtShell->EnterSelFrmMode(); + m_pWrtShell->HideCursor(); + m_pWrtShell->EnterSelFrameMode(); } } else @@ -929,7 +929,7 @@ void SwView::Execute(SfxRequest &rReq) { m_pWrtShell->StartAction(); m_pWrtShell->EnterStdMode(); - bool bOldCrsrInReadOnly = m_pWrtShell->IsReadOnlyAvailable(); + bool bOldCursorInReadOnly = m_pWrtShell->IsReadOnlyAvailable(); m_pWrtShell->SetReadOnlyAvailable( true ); for( int i = 0; i < 2; ++i ) @@ -965,7 +965,7 @@ void SwView::Execute(SfxRequest &rReq) pBase = nullptr; } } - m_pWrtShell->SetReadOnlyAvailable( bOldCrsrInReadOnly ); + m_pWrtShell->SetReadOnlyAvailable( bOldCursorInReadOnly ); m_pWrtShell->EndAction(); } break; @@ -1226,15 +1226,15 @@ void SwView::Execute(SfxRequest &rReq) case SID_RESTORE_EDITING_VIEW: { //#i33307# restore editing position - Point aCrsrPos; + Point aCursorPos; bool bSelectObj; - if(m_pViewImpl->GetRestorePosition(aCrsrPos, bSelectObj)) + if(m_pViewImpl->GetRestorePosition(aCursorPos, bSelectObj)) { - m_pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos, !bSelectObj ); + m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj ); if( bSelectObj ) { - m_pWrtShell->SelectObj( aCrsrPos ); - m_pWrtShell->EnterSelFrmMode( &aCrsrPos ); + m_pWrtShell->SelectObj( aCursorPos ); + m_pWrtShell->EnterSelFrameMode( &aCursorPos ); } } } @@ -1298,19 +1298,19 @@ void SwView::StateStatusLine(SfxItemSet &rSet) OUString sCurrentSectionName = CurrSect->GetSectionName(); if(sCurrentSectionName != m_sOldSectionName) { - SwCrsrShell::FireSectionChangeEvent(2, 1); + SwCursorShell::FireSectionChangeEvent(2, 1); } m_sOldSectionName = sCurrentSectionName; } else if (!m_sOldSectionName.isEmpty()) { - SwCrsrShell::FireSectionChangeEvent(2, 1); + SwCursorShell::FireSectionChangeEvent(2, 1); m_sOldSectionName= OUString(); } //get column change event if(rShell.bColumnChange()) { - SwCrsrShell::FireColumnChangeEvent(2, 1); + SwCursorShell::FireColumnChangeEvent(2, 1); } while( nWhich ) @@ -1321,14 +1321,14 @@ void SwView::StateStatusLine(SfxItemSet &rSet) // number of pages, log. page number sal_uInt16 nPage, nLogPage; OUString sDisplay; - rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay ); + rShell.GetPageNumber( -1, rShell.IsCursorVisible(), nPage, nLogPage, sDisplay ); rSet.Put( SfxStringItem( FN_STAT_PAGE, GetPageStr( nPage, nLogPage, sDisplay) )); //if existing page number is not equal to old page number, send out this event. if (m_nOldPageNum != nLogPage ) { if (m_nOldPageNum != 0) - SwCrsrShell::FirePageChangeEvent(m_nOldPageNum, nLogPage); + SwCursorShell::FirePageChangeEvent(m_nOldPageNum, nLogPage); m_nOldPageNum = nLogPage; } const sal_uInt16 nCnt = GetWrtShell().GetPageCnt(); @@ -1466,11 +1466,11 @@ void SwView::StateStatusLine(SfxItemSet &rSet) case SID_ATTR_POSITION: case SID_ATTR_SIZE: { - if( !rShell.IsFrmSelected() && !rShell.IsObjSelected() ) - SwBaseShell::_SetFrmMode( FLY_DRAG_END ); + if( !rShell.IsFrameSelected() && !rShell.IsObjSelected() ) + SwBaseShell::_SetFrameMode( FLY_DRAG_END ); else { - FlyMode eFrameMode = SwBaseShell::GetFrmMode(); + FlyMode eFrameMode = SwBaseShell::GetFrameMode(); if ( eFrameMode == FLY_DRAG_START || eFrameMode == FLY_DRAG ) { if ( nWhich == SID_ATTR_POSITION ) @@ -1485,7 +1485,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) break; case SID_TABLE_CELL: - if( rShell.IsFrmSelected() || rShell.IsObjSelected() ) + if( rShell.IsFrameSelected() || rShell.IsObjSelected() ) { // #i39171# Don't put a SvxSizeItem into a slot which is defined as SfxStringItem. // SvxPosSizeStatusBarControl no longer resets to empty display if only one slot @@ -1495,7 +1495,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) else { OUString sStr; - if( rShell.IsCrsrInTable() ) + if( rShell.IsCursorInTable() ) { // table name + cell coordinate sStr = rShell.GetTableFormat()->GetName(); @@ -1530,7 +1530,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) } } - const SwNumRule* pNumRule = rShell.GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pNumRule = rShell.GetNumRuleAtCurrCursorPos(); const bool bOutlineNum = pNumRule && pNumRule->IsOutlineRule(); if (pNumRule && !bOutlineNum ) // cursor in numbering @@ -1776,7 +1776,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) case SID_ATTR_SIZE: { sal_uInt16 nId = 0; - if( rSh.IsCrsrInTable() ) + if( rSh.IsCursorInTable() ) nId = FN_FORMAT_TABLE_DLG; else if( rSh.GetCurTOX() ) nId = FN_INSERT_MULTI_TOX; @@ -1784,7 +1784,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) nId = FN_EDIT_REGION; else { - const SwNumRule* pNumRule = rSh.GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pNumRule = rSh.GetNumRuleAtCurrCursorPos(); if( pNumRule ) // cursor in numbering { if( pNumRule->IsAutoRule() ) @@ -1795,7 +1795,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) nId = 0; } } - else if( rSh.IsFrmSelected() ) + else if( rSh.IsFrameSelected() ) nId = FN_FORMAT_FRAME_DLG; else if( rSh.IsObjSelected() ) nId = SID_ATTR_TRANSFORM; @@ -1877,15 +1877,15 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) } } -void SwView::InsFrmMode(sal_uInt16 nCols) +void SwView::InsFrameMode(sal_uInt16 nCols) { if ( m_pWrtShell->HasWholeTabSelection() ) { - SwFlyFrmAttrMgr aMgr( true, m_pWrtShell, FRMMGR_TYPE_TEXT ); + SwFlyFrameAttrMgr aMgr( true, m_pWrtShell, FRMMGR_TYPE_TEXT ); const SwFrameFormat &rPageFormat = m_pWrtShell->GetPageDesc(m_pWrtShell->GetCurPageDesc()).GetMaster(); - SwTwips lWidth = rPageFormat.GetFrmSize().GetWidth(); + SwTwips lWidth = rPageFormat.GetFrameSize().GetWidth(); const SvxLRSpaceItem &rLR = rPageFormat.GetLRSpace(); lWidth -= rLR.GetLeft() + rLR.GetRight(); aMgr.SetSize(Size(lWidth, aMgr.GetSize().Height())); @@ -1895,10 +1895,10 @@ void SwView::InsFrmMode(sal_uInt16 nCols) aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() ); aMgr.SetCol( aCol ); } - aMgr.InsertFlyFrm(); + aMgr.InsertFlyFrame(); } else - GetEditWin().InsFrm(nCols); + GetEditWin().InsFrame(nCols); } /// show "edit link" dialog @@ -1919,9 +1919,9 @@ bool SwView::JumpToSwMark( const OUString& rMark ) if( !rMark.isEmpty() ) { // place bookmark at top-center - bool bSaveCC = IsCrsrAtCenter(); - bool bSaveCT = IsCrsrAtTop(); - SetCrsrAtTop( true ); + bool bSaveCC = IsCursorAtCenter(); + bool bSaveCT = IsCursorAtTop(); + SetCursorAtTop( true ); // For scrolling the FrameSet, the corresponding shell needs to have the focus. bool bHasShFocus = m_pWrtShell->HasShFcs(); @@ -2015,13 +2015,13 @@ bool SwView::JumpToSwMark( const OUString& rMark ) if( FLYCNTTYPE_FRM == eFlyType ) { // TextFrames: set Cursor in the frame - m_pWrtShell->UnSelectFrm(); - m_pWrtShell->LeaveSelFrmMode(); + m_pWrtShell->UnSelectFrame(); + m_pWrtShell->LeaveSelFrameMode(); } else { - m_pWrtShell->HideCrsr(); - m_pWrtShell->EnterSelFrmMode(); + m_pWrtShell->HideCursor(); + m_pWrtShell->EnterSelFrameMode(); } } } @@ -2035,7 +2035,7 @@ bool SwView::JumpToSwMark( const OUString& rMark ) m_bMakeSelectionVisible = true; // reset ViewStatus - SetCrsrAtTop( bSaveCT, bSaveCC ); + SetCursorAtTop( bSaveCT, bSaveCC ); if( !bHasShFocus ) m_pWrtShell->ShLooseFcs(); @@ -2200,7 +2200,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo()); uno::Reference<text::XTextRange> const xInsertPosition( SwXTextRange::CreateXTextRange(*pDoc, - *m_pWrtShell->GetCrsr()->GetPoint(), nullptr)); + *m_pWrtShell->GetCursor()->GetPoint(), nullptr)); nErrno = pDocSh->ImportFrom(*pMedium, xInsertPosition) ? 0 : ERR_SWG_READ_ERROR; } diff --git a/sw/source/uibase/uiview/viewdlg.cxx b/sw/source/uibase/uiview/viewdlg.cxx index a14eeee8037c..ef2e8345a143 100644 --- a/sw/source/uibase/uiview/viewdlg.cxx +++ b/sw/source/uibase/uiview/viewdlg.cxx @@ -53,7 +53,7 @@ void SwView::ExecDlg(SfxRequest &rReq) sal_uInt16 nOldValue = m_pWrtShell->GetPageOffset(); sal_uInt16 nPage, nLogPage; m_pWrtShell->GetPageNum( nPage, nLogPage, - m_pWrtShell->IsCrsrVisible(), false); + m_pWrtShell->IsCursorVisible(), false); if(nValue != nOldValue || nValue != nLogPage) { diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index d5ab1c5ef626..4a0273185357 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -179,10 +179,10 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) rSh.EndAllAction(); - if ( rSh.IsFrmSelected() ) + if ( rSh.IsFrameSelected() ) { - GetEditWin().StopInsFrm(); - rSh.EnterSelFrmMode(); + GetEditWin().StopInsFrame(); + rSh.EnterSelFrameMode(); } // remember category @@ -191,9 +191,9 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) else if( eType & nsSelectionType::SEL_TBL) SetOldTabCat(rName); else if( eType & nsSelectionType::SEL_FRM) - SetOldFrmCat(rName); + SetOldFrameCat(rName); else if( eType == nsSelectionType::SEL_TXT) - SetOldFrmCat(rName); + SetOldFrameCat(rName); else if( eType & nsSelectionType::SEL_DRW) SetOldDrwCat(rName); } diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index a8b4cc4768fd..bdda3e628d55 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -240,8 +240,8 @@ void SwView::ExecDraw(SfxRequest& rReq) SetDrawFuncPtr(nullptr); } - if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrmMode()) - m_pWrtShell->EnterSelFrmMode(); + if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrameMode()) + m_pWrtShell->EnterSelFrameMode(); LeaveDrawCreate(); GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); @@ -252,7 +252,7 @@ void SwView::ExecDraw(SfxRequest& rReq) LeaveDrawCreate(); - if (m_pWrtShell->IsFrmSelected()) + if (m_pWrtShell->IsFrameSelected()) m_pWrtShell->EnterStdMode(); // because bug #45639 SwDrawBase* pFuncPtr = nullptr; @@ -383,8 +383,8 @@ void SwView::ExecDraw(SfxRequest& rReq) } else { - if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrmMode()) - m_pWrtShell->EnterSelFrmMode(); + if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrameMode()) + m_pWrtShell->EnterSelFrameMode(); } if(bEndTextEdit && pSdrView && pSdrView->IsTextEdit()) @@ -411,7 +411,7 @@ void SwView::ExitDraw() } while( pTest && pTest != this && pTest != m_pShell); if(pTest == m_pShell && - // don't call LeaveSelFrmMode() etc. for the below, + // don't call LeaveSelFrameMode() etc. for the below, // because objects may still be selected: dynamic_cast< const SwDrawBaseShell *>( m_pShell ) == nullptr && dynamic_cast< const SwBezierShell *>( m_pShell ) == nullptr && @@ -429,8 +429,8 @@ void SwView::ExitDraw() if (GetDrawFuncPtr()) { - if (m_pWrtShell->IsSelFrmMode()) - m_pWrtShell->LeaveSelFrmMode(); + if (m_pWrtShell->IsSelFrameMode()) + m_pWrtShell->LeaveSelFrameMode(); GetDrawFuncPtr()->Deactivate(); SetDrawFuncPtr(nullptr); @@ -656,7 +656,7 @@ void SwView::SetSelDrawSlot() bool SwView::AreOnlyFormsSelected() const { - if ( GetWrtShell().IsFrmSelected() ) + if ( GetWrtShell().IsFrameSelected() ) return false; bool bForm = true; diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index b9e2ef4589a4..4b4c2a230a3d 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -174,7 +174,7 @@ void SwView::ExecLingu(SfxRequest &rReq) m_pWrtShell->StartAction(); // remember cursor position data for later restoration of the cursor - const SwPosition *pPoint = m_pWrtShell->GetCrsr()->GetPoint(); + const SwPosition *pPoint = m_pWrtShell->GetCursor()->GetPoint(); bool bRestoreCursor = pPoint->nNode.GetNode().IsTextNode(); const SwNodeIndex aPointNodeIndex( pPoint->nNode ); sal_Int32 nPointIndex = pPoint->nContent.GetIndex(); @@ -196,7 +196,7 @@ void SwView::ExecLingu(SfxRequest &rReq) if (!pTextNode || pTextNode->GetText().getLength() < nPointIndex) nPointIndex = 0; // restore cursor to its original position - m_pWrtShell->GetCrsr()->GetPoint()->nContent.Assign( pTextNode, nPointIndex ); + m_pWrtShell->GetCursor()->GetPoint()->nContent.Assign( pTextNode, nPointIndex ); } // enable all, restore view and cursor position @@ -243,11 +243,11 @@ void SwView::StartTextConversion( bool bOldIns = m_pWrtShell->IsInsMode(); m_pWrtShell->SetInsMode(); - const bool bSelection = static_cast<SwCrsrShell*>(m_pWrtShell)->HasSelection() || - m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext(); + const bool bSelection = static_cast<SwCursorShell*>(m_pWrtShell)->HasSelection() || + m_pWrtShell->GetCursor() != m_pWrtShell->GetCursor()->GetNext(); const bool bStart = bSelection || m_pWrtShell->IsStartOfDoc(); - const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY); + const bool bOther = !bSelection && !(m_pWrtShell->GetFrameType(nullptr,true) & FrameTypeFlags::BODY); { const uno::Reference< uno::XComponentContext > xContext( @@ -451,12 +451,12 @@ void SwView::HyphenateDocument() m_pWrtShell->StartUndo(UNDO_INSATTR); // valid later bool bHyphSpecial = xProp.is() && xProp->getIsHyphSpecial(); - bool bSelection = static_cast<SwCrsrShell*>(m_pWrtShell)->HasSelection() || - m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext(); + bool bSelection = static_cast<SwCursorShell*>(m_pWrtShell)->HasSelection() || + m_pWrtShell->GetCursor() != m_pWrtShell->GetCursor()->GetNext(); bool bOther = m_pWrtShell->HasOtherCnt() && bHyphSpecial && !bSelection; bool bStart = bSelection || ( !bOther && m_pWrtShell->IsStartOfDoc() ); bool bStop = false; - if( !bOther && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY) && !bSelection ) + if( !bOther && !(m_pWrtShell->GetFrameType(nullptr,true) & FrameTypeFlags::BODY) && !bSelection ) // turned on no special area { // I want also in special areas hyphenation @@ -488,8 +488,8 @@ bool SwView::IsValidSelectionForThesaurus() const // must not be a multi-selection, and if it is a selection it needs // to be within a single paragraph - const bool bMultiSel = m_pWrtShell->GetCrsr()->IsMultiSelection(); - const bool bSelection = static_cast<SwCrsrShell*>(m_pWrtShell)->HasSelection(); + const bool bMultiSel = m_pWrtShell->GetCursor()->IsMultiSelection(); + const bool bSelection = static_cast<SwCursorShell*>(m_pWrtShell)->HasSelection(); return !bMultiSel && (!bSelection || m_pWrtShell->IsSelOnePara() ); } @@ -527,9 +527,9 @@ void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString ++nRight; // adjust existing selection - SwPaM *pCrsr = m_pWrtShell->GetCrsr(); - pCrsr->GetPoint()->nContent -= nRight; - pCrsr->GetMark()->nContent += nLeft; + SwPaM *pCursor = m_pWrtShell->GetCursor(); + pCursor->GetPoint()->nContent -= nRight; + pCursor->GetMark()->nContent += nLeft; } m_pWrtShell->Insert( rSynonmText ); @@ -566,7 +566,7 @@ void SwView::StartThesaurus() pVOpt->SetIdle( false ); // get initial LookUp text - const bool bSelection = static_cast<SwCrsrShell*>(m_pWrtShell)->HasSelection(); + const bool bSelection = static_cast<SwCursorShell*>(m_pWrtShell)->HasSelection(); OUString aTmp = GetThesaurusLookUpText( bSelection ); Reference< XThesaurus > xThes( ::GetThesaurus() ); @@ -635,31 +635,31 @@ bool SwView::ExecSpellPopup(const Point& rPt) { if (m_pWrtShell->GetSelectionType() & nsSelectionType::SEL_DRW_TXT) bRet = ExecDrwTextSpellPopup(rPt); - else if (!m_pWrtShell->IsSelFrmMode()) + else if (!m_pWrtShell->IsSelFrameMode()) { const bool bOldViewLock = m_pWrtShell->IsViewLocked(); m_pWrtShell->LockView( true ); m_pWrtShell->Push(); SwRect aToFill; - SwCrsrShell *pCrsrShell = static_cast<SwCrsrShell*>(m_pWrtShell); - SwPaM *pCrsr = pCrsrShell->GetCrsr(); - SwPosition aPoint(*pCrsr->GetPoint()); + SwCursorShell *pCursorShell = static_cast<SwCursorShell*>(m_pWrtShell); + SwPaM *pCursor = pCursorShell->GetCursor(); + SwPosition aPoint(*pCursor->GetPoint()); const SwTextNode *pNode = aPoint.nNode.GetNode().GetTextNode(); // Spell-check in case the idle jobs haven't had a chance to kick in. // This makes it possible to suggest spelling corrections for // wrong words independent of the spell-checking idle job. if (pNode && pNode->IsWrongDirty() && - !pCrsrShell->IsTableMode() && - !pCrsr->HasMark() && !pCrsr->IsMultiSelection()) + !pCursorShell->IsTableMode() && + !pCursor->HasMark() && !pCursor->IsMultiSelection()) { - SwContentFrm *pContentFrame = pCrsr->GetContentNode()->getLayoutFrm( - pCrsrShell->GetLayout(), + SwContentFrame *pContentFrame = pCursor->GetContentNode()->getLayoutFrame( + pCursorShell->GetLayout(), &rPt, &aPoint, false); if (pContentFrame) { - SwRect aRepaint(static_cast<SwTextFrm*>(pContentFrame)->_AutoSpell(nullptr, 0)); + SwRect aRepaint(static_cast<SwTextFrame*>(pContentFrame)->_AutoSpell(nullptr, 0)); if (aRepaint.HasArea()) m_pWrtShell->InvalidateWindows(aRepaint); } diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index 12e6596b2c3b..600ab97a8c56 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -61,11 +61,11 @@ using namespace ::com::sun::star::frame; void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, bool bViewOnly ) { - bool const bCrsrIsVisible(m_pWrtShell->IsCrsrVisible()); + bool const bCursorIsVisible(m_pWrtShell->IsCursorVisible()); _SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly ); // fdo#40465 force the cursor to stay in view whilst zooming - if (bCrsrIsVisible) - m_pWrtShell->ShowCrsr(); + if (bCursorIsVisible) + m_pWrtShell->ShowCursor(); } void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, @@ -329,7 +329,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) case NID_GRF: case NID_OLE: { - GotoObjFlags eType = GotoObjFlags::FlyFrm; + GotoObjFlags eType = GotoObjFlags::FlyFrame; if(m_nMoveType == NID_GRF) eType = GotoObjFlags::FlyGrf; else if(m_nMoveType == NID_OLE) @@ -339,8 +339,8 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) rSh.GotoPrevFly(eType); if(bSuccess) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); } } break; @@ -370,7 +370,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) bNext ? rSh.GotoNextOutline() : rSh.GotoPrevOutline(); break; case NID_SEL : - bNext ? rSh.GoNextCrsr() : rSh.GoPrevCrsr(); + bNext ? rSh.GoNextCursor() : rSh.GoPrevCursor(); break; case NID_FTN: rSh.EnterStdMode(); @@ -381,7 +381,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) case NID_MARK: { // unselect - rSh.MoveCrsr(); + rSh.MoveCursor(); rSh.EnterStdMode(); // collect navigator reminders @@ -434,7 +434,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) if(m_pSrchItem) { bool bBackward = m_pSrchItem->GetBackward(); - if (rSh.HasSelection() && bNext != rSh.IsCrsrPtAtEnd()) + if (rSh.HasSelection() && bNext != rSh.IsCursorPtAtEnd()) rSh.SwapPam(); m_pSrchItem->SetBackward(!bNext); SfxRequest aReq(FN_REPEAT_SEARCH, SfxCallMode::SLOT, GetPool()); diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index bbf790402cee..41140112db6b 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -400,7 +400,7 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect, bool SwView::IsScroll( const Rectangle &rRect ) const { - return m_bCenterCrsr || m_bTopCrsr || !m_aVisArea.IsInside(rRect); + return m_bCenterCursor || m_bTopCursor || !m_aVisArea.IsInside(rRect); } void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY ) @@ -422,7 +422,7 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan { // If we are not supposed to be centered, lying in the VisArea // and are not covered by the dialogue ... - if ( !m_bCenterCrsr && aOldVisArea.IsInside( rRect ) + if ( !m_bCenterCursor && aOldVisArea.IsInside( rRect ) && ( rRect.Left() > aDlgRect.Right() || rRect.Right() < aDlgRect.Left() || rRect.Top() > aDlgRect.Bottom() @@ -449,7 +449,7 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan } //s.o. !IsScroll() - if( !(m_bCenterCrsr || m_bTopCrsr) && m_aVisArea.IsInside( rRect ) ) + if( !(m_bCenterCursor || m_bTopCursor) && m_aVisArea.IsInside( rRect ) ) { m_aVisArea = aOldVisArea; return; @@ -470,7 +470,7 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan static_cast< sal_uInt16 >((aVisSize.Width() - aSize.Width()) / 2), static_cast< sal_uInt16 >((aVisSize.Height()- aSize.Height())/ 2) ); - if( m_bTopCrsr ) + if( m_bTopCursor ) { const long nBorder = IsDocumentBorder() ? DOCUMENTBORDER : 0; aPt.Y() = std::min( std::max( nBorder, rRect.Top() ), @@ -482,12 +482,12 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan SetVisArea( aPt ); return; } - if( !m_bCenterCrsr ) + if( !m_bCenterCursor ) { Point aPt( m_aVisArea.TopLeft() ); CalcPt( &aPt, rRect, nRangeX, nRangeY ); - if( m_bTopCrsr ) + if( m_bTopCursor ) { const long nBorder = IsDocumentBorder() ? DOCUMENTBORDER : 0; aPt.Y() = std::min( std::max( nBorder, rRect.Top() ), @@ -619,14 +619,14 @@ long SwView::PhyPageDown() return 1; } -bool SwView::PageUpCrsr( bool bSelect ) +bool SwView::PageUpCursor( bool bSelect ) { if ( !bSelect ) { - const FrmTypeFlags eType = m_pWrtShell->GetFrmType(nullptr,true); - if ( eType & FrmTypeFlags::FOOTNOTE ) + const FrameTypeFlags eType = m_pWrtShell->GetFrameType(nullptr,true); + if ( eType & FrameTypeFlags::FOOTNOTE ) { - m_pWrtShell->MoveCrsr(); + m_pWrtShell->MoveCursor(); m_pWrtShell->GotoFootnoteAnchor(); m_pWrtShell->Right(CRSR_SKIP_CHARS, false, 1, false ); return true; @@ -635,8 +635,8 @@ bool SwView::PageUpCrsr( bool bSelect ) SwTwips lOff = 0; if ( GetPageScrollUpOffset( lOff ) && - (m_pWrtShell->IsCrsrReadonly() || - !m_pWrtShell->PageCrsr( lOff, bSelect )) && + (m_pWrtShell->IsCursorReadonly() || + !m_pWrtShell->PageCursor( lOff, bSelect )) && PageUp() ) { m_pWrtShell->ResetCursorStack(); @@ -645,12 +645,12 @@ bool SwView::PageUpCrsr( bool bSelect ) return false; } -bool SwView::PageDownCrsr(bool bSelect) +bool SwView::PageDownCursor(bool bSelect) { SwTwips lOff = 0; if ( GetPageScrollDownOffset( lOff ) && - (m_pWrtShell->IsCrsrReadonly() || - !m_pWrtShell->PageCrsr( lOff, bSelect )) && + (m_pWrtShell->IsCursorReadonly() || + !m_pWrtShell->PageCursor( lOff, bSelect )) && PageDown() ) { m_pWrtShell->ResetCursorStack(); diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index 308d0b89e671..dee0f3ccd5e7 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -218,7 +218,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) } else if( rReq.GetSlot() == SID_PRINTDOCDIRECT && ! bSilent ) { - if( ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) ) + if( ( pSh->IsSelection() || pSh->IsFrameSelected() || pSh->IsObjSelected() ) ) { short nBtn = ScopedVclPtr<SvxPrtQryBox>::Create(&GetEditWin())->Execute(); if( RET_CANCEL == nBtn ) diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 154b08c68747..815fbba15430 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -108,15 +108,15 @@ static void lcl_addContainerToJson(boost::property_tree::ptree& rTree, const OSt static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell* pWrtShell) { // Emit a callback also about the selection rectangles, grouped by matches. - if (SwPaM* pPaM = pWrtShell->GetCrsr()) + if (SwPaM* pPaM = pWrtShell->GetCursor()) { std::vector<OString> aMatches; for (SwPaM& rPaM : pPaM->GetRingContainer()) { - if (SwShellCrsr* pShellCrsr = dynamic_cast<SwShellCrsr*>(&rPaM)) + if (SwShellCursor* pShellCursor = dynamic_cast<SwShellCursor*>(&rPaM)) { std::vector<OString> aSelectionRectangles; - pShellCrsr->SwSelPaintRects::Show(&aSelectionRectangles); + pShellCursor->SwSelPaintRects::Show(&aSelectionRectangles); std::vector<OString> aRect; for (size_t i = 0; i < aSelectionRectangles.size(); ++i) { @@ -313,7 +313,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) m_pWrtShell->Push(); OUString aReplace( m_pSrchItem->GetReplaceString() ); SearchOptions aTmp( m_pSrchItem->GetSearchOptions() ); - OUString *pBackRef = ReplaceBackReferences( aTmp, m_pWrtShell->GetCrsr() ); + OUString *pBackRef = ReplaceBackReferences( aTmp, m_pWrtShell->GetCursor() ); if( pBackRef ) m_pSrchItem->SetReplaceString( *pBackRef ); Replace(); @@ -382,7 +382,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) if (!m_pSrchItem->GetSelection()) { // create it just to overwrite it with stack cursor - m_pWrtShell->CreateCrsr(); + m_pWrtShell->CreateCursor(); // i#8288 restore the original cursor position m_pWrtShell->Pop(false); } @@ -526,7 +526,7 @@ bool SwView::SearchAndWrap(bool bApi) // selection closest to the end being searched to as to exclude the selected // region from the search. (This doesn't work in the case of multiple // selected regions as the cursor doesn't mark the selection in that case.) - m_pWrtShell->GetCrsr()->Normalize( m_pSrchItem->GetBackward() ); + m_pWrtShell->GetCursor()->Normalize( m_pSrchItem->GetBackward() ); if (!m_pWrtShell->HasSelection() && (m_pSrchItem->HasStartPoint())) { @@ -535,7 +535,7 @@ bool SwView::SearchAndWrap(bool bApi) // cursor position. SwEditShell& rShell = GetWrtShell(); Point aPosition(m_pSrchItem->GetStartPointX(), m_pSrchItem->GetStartPointY()); - rShell.SetCrsr(aPosition); + rShell.SetCursor(aPosition); } // If you want to search in selected areas, they must not be unselected. @@ -546,10 +546,10 @@ bool SwView::SearchAndWrap(bool bApi) if( FUNC_Search( aOpts ) ) { m_bFound = true; - if(m_pWrtShell->IsSelFrmMode()) + if(m_pWrtShell->IsSelFrameMode()) { - m_pWrtShell->UnSelectFrm(); - m_pWrtShell->LeaveSelFrmMode(); + m_pWrtShell->UnSelectFrame(); + m_pWrtShell->LeaveSelFrameMode(); } m_pWrtShell->Pop(); m_pWrtShell->EndAllAction(); @@ -703,8 +703,8 @@ void SwView::Replace() { /* check that the selection match the search string*/ //save state - SwPosition aStartPos = (* m_pWrtShell->GetSwCrsr()->Start()); - SwPosition aEndPos = (* m_pWrtShell->GetSwCrsr()->End()); + SwPosition aStartPos = (* m_pWrtShell->GetSwCursor()->Start()); + SwPosition aEndPos = (* m_pWrtShell->GetSwCursor()->End()); bool bHasSelection = m_pSrchItem->GetSelection(); SvxSearchCmd nOldCmd = m_pSrchItem->GetCommand(); @@ -722,13 +722,13 @@ void SwView::Replace() if(! m_pSrchItem->GetBackward() ) { - (* m_pWrtShell->GetSwCrsr()->Start()) = aStartPos; - (* m_pWrtShell->GetSwCrsr()->End()) = aEndPos; + (* m_pWrtShell->GetSwCursor()->Start()) = aStartPos; + (* m_pWrtShell->GetSwCursor()->End()) = aEndPos; } else { - (* m_pWrtShell->GetSwCrsr()->Start()) = aEndPos; - (* m_pWrtShell->GetSwCrsr()->End()) = aStartPos; + (* m_pWrtShell->GetSwCursor()->Start()) = aEndPos; + (* m_pWrtShell->GetSwCursor()->End()) = aStartPos; } bReqReplace = false; } @@ -910,8 +910,8 @@ void SwView::StateSearch(SfxItemSet &rSet) if( m_bJustOpened && m_pWrtShell->IsSelection() ) { OUString aText; - if( 1 == m_pWrtShell->GetCrsrCnt() && - !( aText = m_pWrtShell->SwCrsrShell::GetSelText() ).isEmpty() ) + if( 1 == m_pWrtShell->GetCursorCnt() && + !( aText = m_pWrtShell->SwCursorShell::GetSelText() ).isEmpty() ) { m_pSrchItem->SetSearchString( aText ); m_pSrchItem->SetSelection( false ); diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 8da54f5a9399..c37b8d77eac2 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -68,8 +68,8 @@ void SwView::GetState(SfxItemSet &rSet) { SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); - FrmTypeFlags eFrmType = FrmTypeFlags::NONE; - bool bGetFrmType = false; + FrameTypeFlags eFrameType = FrameTypeFlags::NONE; + bool bGetFrameType = false; bool bWeb = dynamic_cast<SwWebView*>( this ) != nullptr; while(nWhich) @@ -79,7 +79,7 @@ void SwView::GetState(SfxItemSet &rSet) case FN_EDIT_LINK_DLG: if( m_pWrtShell->GetLinkManager().GetLinks().empty() ) rSet.DisableItem(nWhich); - else if( m_pWrtShell->IsSelFrmMode() && + else if( m_pWrtShell->IsSelFrameMode() && m_pWrtShell->IsSelObjProtected(FlyProtectFlags::Content) != FlyProtectFlags::NONE) { rSet.DisableItem(nWhich); @@ -87,7 +87,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case SID_INSERT_GRAPHIC: - if( m_pWrtShell->CrsrInsideInputField() ) + if( m_pWrtShell->CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -96,25 +96,25 @@ void SwView::GetState(SfxItemSet &rSet) case FN_INSERT_CAPTION: { // There are captions for graphics, OLE objects, frames and tables - if( !bGetFrmType ) + if( !bGetFrameType ) { - eFrmType = m_pWrtShell->GetFrmType(nullptr, true); - bGetFrmType = true; + eFrameType = m_pWrtShell->GetFrameType(nullptr, true); + bGetFrameType = true; } - if (! ( ((eFrmType & FrmTypeFlags::FLY_ANY) && m_nSelectionType != nsSelectionType::SEL_DRW_TXT)|| + if (! ( ((eFrameType & FrameTypeFlags::FLY_ANY) && m_nSelectionType != nsSelectionType::SEL_DRW_TXT)|| m_nSelectionType & nsSelectionType::SEL_TBL || m_nSelectionType & nsSelectionType::SEL_DRW) ) { rSet.DisableItem(nWhich); } - else if((m_pWrtShell->IsObjSelected() || m_pWrtShell->IsFrmSelected()) && + else if((m_pWrtShell->IsObjSelected() || m_pWrtShell->IsFrameSelected()) && (m_pWrtShell->IsSelObjProtected( FlyProtectFlags::Parent) != FlyProtectFlags::NONE || m_pWrtShell->IsSelObjProtected( FlyProtectFlags::Content ) != FlyProtectFlags::NONE)) { rSet.DisableItem(nWhich); } else if( m_pWrtShell->IsTableMode() - || m_pWrtShell->CrsrInsideInputField() ) + || m_pWrtShell->CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -130,9 +130,9 @@ void SwView::GetState(SfxItemSet &rSet) case FN_CHANGE_PAGENUM: { - FrmTypeFlags nType = m_pWrtShell->GetFrmType(nullptr,true); - if( ( FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | - FrmTypeFlags::FOOTNOTE | FrmTypeFlags::DRAWOBJ ) & nType ) + FrameTypeFlags nType = m_pWrtShell->GetFrameType(nullptr,true); + if( ( FrameTypeFlags::FLY_ANY | FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | + FrameTypeFlags::FOOTNOTE | FrameTypeFlags::DRAWOBJ ) & nType ) rSet.DisableItem(nWhich); else rSet.Put(SfxUInt16Item(nWhich, m_pWrtShell->GetPageOffset())); @@ -193,7 +193,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case FN_INSERT_OBJ_CTRL: if( bWeb - || m_pWrtShell->CrsrInsideInputField() ) + || m_pWrtShell->CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -272,7 +272,7 @@ void SwView::GetState(SfxItemSet &rSet) case FN_REDLINE_REJECT_DIRECT: { SwDoc *pDoc = m_pWrtShell->GetDoc(); - SwPaM *pCursor = m_pWrtShell->GetCrsr(); + SwPaM *pCursor = m_pWrtShell->GetCursor(); if (GetDocShell()->HasChangeRecordProtection()) rSet.DisableItem(nWhich); else if (pCursor->HasMark()) @@ -323,7 +323,7 @@ void SwView::GetState(SfxItemSet &rSet) case SID_THESAURUS: { SwWrtShell &rSh = GetWrtShell(); - if (2 <= rSh.GetCrsrCnt()) // multi selection? + if (2 <= rSh.GetCursorCnt()) // multi selection? rSet.DisableItem(nWhich); else { diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 3f53c38bc6e7..281a2b586a8b 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -223,10 +223,10 @@ void ResizeFrameCols(SwFormatCol& rCol, void SwView::ExecTabWin( SfxRequest& rReq ) { SwWrtShell &rSh = GetWrtShell(); - const FrmTypeFlags nFrmType = rSh.IsObjSelected() ? - FrmTypeFlags::DRAWOBJ : - rSh.GetFrmType(nullptr,true); - const bool bFrmSelection = rSh.IsFrmSelected(); + const FrameTypeFlags nFrameType = rSh.IsObjSelected() ? + FrameTypeFlags::DRAWOBJ : + rSh.GetFrameType(nullptr,true); + const bool bFrameSelection = rSh.IsFrameSelected(); const bool bBrowse = rSh.GetViewOptions()->getBrowseMode(); const sal_uInt16 nSlot = rReq.GetSlot(); @@ -241,15 +241,15 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const SwFormatFooter& rFooterFormat = rDesc.GetMaster().GetFooter(); SwFrameFormat *pFooterFormat = const_cast<SwFrameFormat*>(rFooterFormat.GetFooterFormat()); - const SwFormatFrmSize &rFrmSize = rDesc.GetMaster().GetFrmSize(); + const SwFormatFrameSize &rFrameSize = rDesc.GetMaster().GetFrameSize(); const SwRect& rPageRect = rSh.GetAnyCurRect(RECT_PAGE); - const long nPageWidth = bBrowse ? rPageRect.Width() : rFrmSize.GetWidth(); - const long nPageHeight = bBrowse ? rPageRect.Height() : rFrmSize.GetHeight(); + const long nPageWidth = bBrowse ? rPageRect.Width() : rFrameSize.GetWidth(); + const long nPageHeight = bBrowse ? rPageRect.Height() : rFrameSize.GetHeight(); bool bUnlockView = false; rSh.StartAllAction(); - bool bSect = bool(nFrmType & FrmTypeFlags::COLSECT); + bool bSect = bool(nFrameType & FrameTypeFlags::COLSECT); switch (nSlot) { @@ -259,7 +259,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxLongLRSpaceItem aLongLR( static_cast<const SvxLongLRSpaceItem&>(pReqArgs-> Get( SID_ATTR_LONG_LRSPACE )) ); SvxLRSpaceItem aLR(RES_LR_SPACE); - if ( !bSect && (bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY) ) + if ( !bSect && (bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY) ) { SwFrameFormat* pFormat = static_cast<SwFrameFormat*>(rSh.GetFlyFrameFormat()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); @@ -268,9 +268,9 @@ void SwView::ExecTabWin( SfxRequest& rReq ) { bool bRTL; bool bVertL2R; - bVerticalFrame = ( bFrmSelection && - rSh.IsFrmVertical(true, bRTL, bVertL2R) ) || - ( !bFrmSelection && bVerticalWriting); + bVerticalFrame = ( bFrameSelection && + rSh.IsFrameVertical(true, bRTL, bVertL2R) ) || + ( !bFrameSelection && bVerticalWriting); } long nDeltaX = bVerticalFrame ? rRect.Right() - rPageRect.Right() + aLongLR.GetRight() : @@ -295,7 +295,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aSet.Put( aHoriOrient ); } - SwFormatFrmSize aSize( pFormat->GetFrmSize() ); + SwFormatFrameSize aSize( pFormat->GetFrameSize() ); long nOldWidth = (long) aSize.GetWidth(); if(aSize.GetWidthPercent()) @@ -309,7 +309,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aSize.SetWidth( nPageWidth - (aLongLR.GetLeft() + aLongLR.GetRight())); - if( nFrmType & FrmTypeFlags::COLUMN ) + if( nFrameType & FrameTypeFlags::COLUMN ) { SwFormatCol aCol(pFormat->GetCol()); @@ -321,17 +321,17 @@ void SwView::ExecTabWin( SfxRequest& rReq ) rSh.StartAction(); rSh.Push(); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); // Cancel the frame selection - if(!bFrmSelection && rSh.IsFrmSelected()) + if(!bFrameSelection && rSh.IsFrameSelected()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.Pop(); rSh.EndAction(); } - else if ( nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER )) + else if ( nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER )) { // Subtract out page margins long nOld = rDesc.GetMaster().GetLRSpace().GetLeft(); @@ -342,12 +342,12 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aLR.SetLeft(aLongLR.GetLeft()); aLR.SetRight(aLongLR.GetRight()); - if ( nFrmType & FrmTypeFlags::HEADER && pHeaderFormat ) + if ( nFrameType & FrameTypeFlags::HEADER && pHeaderFormat ) pHeaderFormat->SetFormatAttr( aLR ); - else if( nFrmType & FrmTypeFlags::FOOTER && pFooterFormat ) + else if( nFrameType & FrameTypeFlags::FOOTER && pFooterFormat ) pFooterFormat->SetFormatAttr( aLR ); } - else if( nFrmType == FrmTypeFlags::DRAWOBJ) + else if( nFrameType == FrameTypeFlags::DRAWOBJ) { SwRect aRect( rSh.GetObjRect() ); aRect.Left( aLongLR.GetLeft() + rPageRect.Left() ); @@ -418,7 +418,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxLongULSpaceItem aLongULSpace( static_cast<const SvxLongULSpaceItem&>(pReqArgs-> Get( SID_ATTR_LONG_ULSPACE ))); - if( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) + if( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY ) { SwFrameFormat* pFormat = static_cast<SwFrameFormat*>(rSh.GetFlyFrameFormat()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); @@ -430,9 +430,9 @@ void SwView::ExecTabWin( SfxRequest& rReq ) //which of the orientation attributes is to be put depends on the frame's environment bool bRTL; bool bVertL2R; - if ( ( bFrmSelection && - rSh.IsFrmVertical(true, bRTL, bVertL2R ) ) || - ( !bFrmSelection && bVerticalWriting ) ) + if ( ( bFrameSelection && + rSh.IsFrameVertical(true, bRTL, bVertL2R ) ) || + ( !bFrameSelection && bVerticalWriting ) ) { SwFormatHoriOrient aHoriOrient(pFormat->GetHoriOrient()); aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE); @@ -446,7 +446,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aVertOrient.SetPos(aVertOrient.GetPos() + nDeltaY ); aSet.Put( aVertOrient ); } - SwFormatFrmSize aSize(pFormat->GetFrmSize()); + SwFormatFrameSize aSize(pFormat->GetFrameSize()); if(aSize.GetHeightPercent()) { SwRect aRect; @@ -458,9 +458,9 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aSize.SetHeight(nHeight ); aSet.Put( aSize ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } - else if( nFrmType == FrmTypeFlags::DRAWOBJ ) + else if( nFrameType == FrameTypeFlags::DRAWOBJ ) { SwRect aRect( rSh.GetObjRect() ); aRect.Top( aLongULSpace.GetUpper() + rPageRect.Top() ); @@ -498,10 +498,10 @@ void SwView::ExecTabWin( SfxRequest& rReq ) else { SwPageDesc aDesc( rDesc ); - if ( nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER )) + if ( nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER )) { - const bool bHead = bool(nFrmType & FrmTypeFlags::HEADER); + const bool bHead = bool(nFrameType & FrameTypeFlags::HEADER); SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() ); if ( bHead ) aUL.SetUpper( (sal_uInt16)aLongULSpace.GetUpper() ); @@ -511,8 +511,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if( (bHead && pHeaderFormat) || (!bHead && pFooterFormat) ) { - SwFormatFrmSize aSz( bHead ? pHeaderFormat->GetFrmSize() : - pFooterFormat->GetFrmSize() ); + SwFormatFrameSize aSz( bHead ? pHeaderFormat->GetFrameSize() : + pFooterFormat->GetFrameSize() ); aSz.SetHeightSizeType( ATT_FIX_SIZE ); aSz.SetHeight(nPageHeight - aLongULSpace.GetLower() - aLongULSpace.GetUpper() ); @@ -856,7 +856,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { - if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY || bSect) + if ( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY || bSect) { SwSectionFormat *pSectFormat = nullptr; SfxItemSet aSet( GetPool(), RES_COL, RES_COL ); @@ -868,7 +868,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); } SwFormatCol aCols( bSect ? @@ -884,12 +884,12 @@ void SwView::ExecTabWin( SfxRequest& rReq ) { rSh.StartAction(); rSh.Push(); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); // Cancel the frame selection again - if(!bFrmSelection && rSh.IsFrmSelected()) + if(!bFrameSelection && rSh.IsFrameSelected()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.Pop(); rSh.EndAction(); @@ -996,11 +996,11 @@ void SwView::StateTabWin(SfxItemSet& rSet) SwWrtShell &rSh = GetWrtShell(); const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &m_aTabColFromDocPos : nullptr; - const FrmTypeFlags nFrmType = rSh.IsObjSelected() - ? FrmTypeFlags::DRAWOBJ - : rSh.GetFrmType( pPt, true ); + const FrameTypeFlags nFrameType = rSh.IsObjSelected() + ? FrameTypeFlags::DRAWOBJ + : rSh.GetFrameType( pPt, true ); - const bool bFrmSelection = rSh.IsFrmSelected(); + const bool bFrameSelection = rSh.IsFrameSelected(); const bool bBrowse = rSh.GetViewOptions()->getBrowseMode(); // PageOffset/limiter const SwRect& rPageRect = rSh.GetAnyCurRect( RECT_PAGE, pPt ); @@ -1012,7 +1012,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) IsTabColFromDoc() || m_bTabRowFromDoc ? rSh.GetMousePageDesc(m_aTabColFromDocPos) : rSh.GetCurPageDesc() ); - const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrmDir(); + const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrameDir(); const bool bVerticalWriting = rSh.IsInVerticalText(); //enable tab stop display on the rulers depending on the writing direction @@ -1092,10 +1092,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) aLongLR.SetLeft(rPagePrtRect.Left()); aLongLR.SetRight(nPageWidth - rPagePrtRect.Right()); } - if ( ( nFrmType & FrmTypeFlags::HEADER || nFrmType & FrmTypeFlags::FOOTER ) && - !(nFrmType & FrmTypeFlags::COLSECT) ) + if ( ( nFrameType & FrameTypeFlags::HEADER || nFrameType & FrameTypeFlags::FOOTER ) && + !(nFrameType & FrameTypeFlags::COLSECT) ) { - SwFrameFormat *pFormat = const_cast<SwFrameFormat*>(nFrmType & FrmTypeFlags::HEADER ? + SwFrameFormat *pFormat = const_cast<SwFrameFormat*>(nFrameType & FrameTypeFlags::HEADER ? rDesc.GetMaster().GetHeader().GetHeaderFormat() : rDesc.GetMaster().GetFooter().GetFooterFormat()); if( pFormat )// #i80890# if rDesc is not the one belonging to the current page is might crash @@ -1111,16 +1111,16 @@ void SwView::StateTabWin(SfxItemSet& rSet) else { SwRect aRect; - if( !bFrmSelection && ((nFrmType & FrmTypeFlags::COLSECT) || rSh.IsDirectlyInSection()) ) + if( !bFrameSelection && ((nFrameType & FrameTypeFlags::COLSECT) || rSh.IsDirectlyInSection()) ) { aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt); const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt); aRect.Pos() += aTmpRect.Pos(); } - else if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) + else if ( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY ) aRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); - else if( nFrmType & FrmTypeFlags::DRAWOBJ) + else if( nFrameType & FrameTypeFlags::DRAWOBJ) aRect = rSh.GetObjRect(); if( aRect.Width() ) @@ -1163,21 +1163,21 @@ void SwView::StateTabWin(SfxItemSet& rSet) (long)aUL.GetLower(), SID_ATTR_LONG_ULSPACE); - if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) + if ( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY ) { // Convert document coordinates into page coordinates. const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); aLongUL.SetUpper(rRect.Top() - rPageRect.Top()); aLongUL.SetLower(rPageRect.Bottom() - rRect.Bottom()); } - else if ( nFrmType & FrmTypeFlags::HEADER || nFrmType & FrmTypeFlags::FOOTER ) + else if ( nFrameType & FrameTypeFlags::HEADER || nFrameType & FrameTypeFlags::FOOTER ) { SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt)); aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos(); aLongUL.SetUpper( aRect.Top() ); aLongUL.SetLower( nPageHeight - aRect.Bottom() ); } - else if( nFrmType & FrmTypeFlags::DRAWOBJ) + else if( nFrameType & FrameTypeFlags::DRAWOBJ) { const SwRect &rRect = rSh.GetObjRect(); aLongUL.SetUpper((rRect.Top() - rPageRect.Top())); @@ -1251,7 +1251,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( nSelType & nsSelectionType::SEL_GRF || nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || - nFrmType == FrmTypeFlags::DRAWOBJ || + nFrameType == FrameTypeFlags::DRAWOBJ || (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)) || ( bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich)) ) @@ -1319,12 +1319,12 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( nSelType & nsSelectionType::SEL_GRF || nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || - nFrmType == FrmTypeFlags::DRAWOBJ ) + nFrameType == FrameTypeFlags::DRAWOBJ ) rSet.DisableItem(SID_RULER_BORDER_DISTANCE); else { SvxLRSpaceItem aDistLR(SID_RULER_BORDER_DISTANCE); - if(nFrmType & FrmTypeFlags::FLY_ANY) + if(nFrameType & FrameTypeFlags::FLY_ANY) { if( IsTabColFromDoc() ) { @@ -1339,7 +1339,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 ); SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); aCoreSet.Put( aBoxInfo ); - rSh.GetFlyFrmAttr( aCoreSet ); + rSh.GetFlyFrameAttr( aCoreSet ); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aCoreSet.Get(RES_BOX)); aDistLR.SetLeft(rBox.GetDistance(SvxBoxItemLine::LEFT)); aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT)); @@ -1358,8 +1358,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) m_nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight()); } else if ( IsTabColFromDoc() || - ( rSh.GetTableFormat() && !bFrmSelection && - !(nFrmType & FrmTypeFlags::COLSECT ) ) ) + ( rSh.GetTableFormat() && !bFrameSelection && + !(nFrameType & FrameTypeFlags::COLSECT ) ) ) { SfxItemSet aCoreSet2( GetPool(), RES_BOX, RES_BOX, @@ -1392,7 +1392,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT)); const SvxBoxItem* pBox = nullptr; - if(nFrmType & FrmTypeFlags::HEADER) + if(nFrameType & FrameTypeFlags::HEADER) { rMaster.GetHeader(); const SwFormatHeader& rHeaderFormat = rMaster.GetHeader(); @@ -1400,7 +1400,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if( pHeaderFormat )// #i80890# if rDesc is not the one belonging to the current page is might crash pBox = & (const SvxBoxItem&)pHeaderFormat->GetBox(); } - else if(nFrmType & FrmTypeFlags::FOOTER ) + else if(nFrameType & FrameTypeFlags::FOOTER ) { const SwFormatFooter& rFooterFormat = rMaster.GetFooter(); SwFrameFormat *pFooterFormat = const_cast<SwFrameFormat*>(rFooterFormat.GetFooterFormat()); @@ -1434,7 +1434,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( nSelType & nsSelectionType::SEL_GRF || nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || - nFrmType == FrmTypeFlags::DRAWOBJ) + nFrameType == FrameTypeFlags::DRAWOBJ) rSet.DisableItem(nWhich); else { @@ -1451,22 +1451,22 @@ void SwView::StateTabWin(SfxItemSet& rSet) { bool bFrameRTL; bool bFrameVertL2R; - bFrameHasVerticalColumns = rSh.IsFrmVertical(false, bFrameRTL, bFrameVertL2R) && - bFrmSelection; + bFrameHasVerticalColumns = rSh.IsFrameVertical(false, bFrameRTL, bFrameVertL2R) && + bFrameSelection; } bool bHasTable = ( IsTabColFromDoc() || - ( rSh.GetTableFormat() && !bFrmSelection && - !(nFrmType & FrmTypeFlags::COLSECT ) ) ); + ( rSh.GetTableFormat() && !bFrameSelection && + !(nFrameType & FrameTypeFlags::COLSECT ) ) ); bool bTableVertical = bHasTable && rSh.IsTableVertical(); if(((SID_RULER_BORDERS_VERTICAL == nWhich) && ((bHasTable && !bTableVertical) || - (!bVerticalWriting && !bFrmSelection && !bHasTable ) || - ( bFrmSelection && !bFrameHasVerticalColumns))) || + (!bVerticalWriting && !bFrameSelection && !bHasTable ) || + ( bFrameSelection && !bFrameHasVerticalColumns))) || ((SID_RULER_BORDERS == nWhich) && ((bHasTable && bTableVertical) || - (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns))) + (bVerticalWriting && !bFrameSelection&& !bHasTable) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); else if ( bHasTable ) { @@ -1538,11 +1538,11 @@ void SwView::StateTabWin(SfxItemSet& rSet) } rSet.Put(aColItem, nWhich); } - else if ( bFrmSelection || nFrmType & ( FrmTypeFlags::COLUMN | FrmTypeFlags::COLSECT ) ) + else if ( bFrameSelection || nFrameType & ( FrameTypeFlags::COLUMN | FrameTypeFlags::COLSECT ) ) { // Out of frame or page? sal_uInt16 nNum = 0; - if(bFrmSelection) + if(bFrameSelection) { const SwFrameFormat* pFormat = rSh.GetFlyFrameFormat(); if(pFormat) @@ -1552,10 +1552,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) nNum = rSh.GetCurColNum(); if( - // For that matter FrmTypeFlags::COLSECT should not be included + // For that matter FrameTypeFlags::COLSECT should not be included // if the border is selected! - !bFrmSelection && - nFrmType & FrmTypeFlags::COLSECT ) + !bFrameSelection && + nFrameType & FrameTypeFlags::COLSECT ) { const SwSection *pSect = rSh.GetAnySection(false, pPt); OSL_ENSURE( pSect, "Which section?"); @@ -1593,7 +1593,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) rSet.Put(aColItem, nWhich); } } - else if( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) + else if( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY ) { // Columns in frame if ( nNum ) @@ -1608,14 +1608,14 @@ void SwView::StateTabWin(SfxItemSet& rSet) SvxColumnItem aColItem(nNum); const SwRect &rSizeRect = rSh.GetAnyCurRect(RECT_FLY_PRT_EMBEDDED, pPt); - bool bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting); + bool bUseVertical = bFrameHasVerticalColumns || (!bFrameSelection && bVerticalWriting); const long lWidth = bUseVertical ? rSizeRect.Height() : rSizeRect.Width(); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); long nDist2 = ((bUseVertical ? rRect.Height() : rRect.Width()) - lWidth) /2; ::lcl_FillSvxColumn(rCol, lWidth, aColItem, nDist2); SfxItemSet aFrameSet(GetPool(), RES_LR_SPACE, RES_LR_SPACE); - rSh.GetFlyFrmAttr( aFrameSet ); + rSh.GetFlyFrameAttr( aFrameSet ); if(bUseVertical) { @@ -1698,18 +1698,18 @@ void SwView::StateTabWin(SfxItemSet& rSet) { bool bFrameRTL; bool bFrameVertL2R; - bFrameHasVerticalColumns = rSh.IsFrmVertical(false, bFrameRTL, bFrameVertL2R) && - bFrmSelection; + bFrameHasVerticalColumns = rSh.IsFrameVertical(false, bFrameRTL, bFrameVertL2R) && + bFrameSelection; } if(((SID_RULER_ROWS == nWhich) && - ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns))) || + ((!bVerticalWriting && !bFrameSelection) || (bFrameSelection && !bFrameHasVerticalColumns))) || ((SID_RULER_ROWS_VERTICAL == nWhich) && - ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns))) + ((bVerticalWriting && !bFrameSelection) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); else if ( IsTabRowFromDoc() || - ( rSh.GetTableFormat() && !bFrmSelection && - !(nFrmType & FrmTypeFlags::COLSECT ) ) ) + ( rSh.GetTableFormat() && !bFrameSelection && + !(nFrameType & FrameTypeFlags::COLSECT ) ) ) { SwTabCols aTabCols; if ( ( m_bSetTabRowFromDoc = IsTabRowFromDoc() ) ) @@ -1790,10 +1790,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_LR_MIN_MAX: { Rectangle aRectangle; - if( ( nFrmType & FrmTypeFlags::COLSECT ) && !IsTabColFromDoc() && - ( nFrmType & ( FrmTypeFlags::TABLE|FrmTypeFlags::COLUMN ) ) ) + if( ( nFrameType & FrameTypeFlags::COLSECT ) && !IsTabColFromDoc() && + ( nFrameType & ( FrameTypeFlags::TABLE|FrameTypeFlags::COLUMN ) ) ) { - if( nFrmType & FrmTypeFlags::TABLE ) + if( nFrameType & FrameTypeFlags::TABLE ) { const size_t nNum = rSh.GetCurTabColNum(); SwTabCols aTabCols; @@ -1878,18 +1878,18 @@ void SwView::StateTabWin(SfxItemSet& rSet) } } - else if ( ((nFrmType & FrmTypeFlags::TABLE) || IsTabColFromDoc()) && - !bFrmSelection ) + else if ( ((nFrameType & FrameTypeFlags::TABLE) || IsTabColFromDoc()) && + !bFrameSelection ) { bool bColumn; if ( IsTabColFromDoc() ) bColumn = rSh.GetCurMouseColNum( m_aTabColFromDocPos ) != 0; else - bColumn = bool(nFrmType & (FrmTypeFlags::COLUMN|FrmTypeFlags::FLY_ANY|FrmTypeFlags::COLSECTOUTTAB)); + bColumn = bool(nFrameType & (FrameTypeFlags::COLUMN|FrameTypeFlags::FLY_ANY|FrameTypeFlags::COLSECTOUTTAB)); if ( !bColumn ) { - if( nFrmType & FrmTypeFlags::FLY_ANY && IsTabColFromDoc() ) + if( nFrameType & FrameTypeFlags::FLY_ANY && IsTabColFromDoc() ) { SwRect aRect( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, pPt ) ); @@ -1912,11 +1912,11 @@ void SwView::StateTabWin(SfxItemSet& rSet) } else { // Here only for table in multi-column pages and borders. - bool bSectOutTable = bool(nFrmType & FrmTypeFlags::TABLE); - bool bFrame = bool(nFrmType & FrmTypeFlags::FLY_ANY); - bool bColSct = bool(nFrmType & ( bSectOutTable - ? FrmTypeFlags::COLSECTOUTTAB - : FrmTypeFlags::COLSECT ) + bool bSectOutTable = bool(nFrameType & FrameTypeFlags::TABLE); + bool bFrame = bool(nFrameType & FrameTypeFlags::FLY_ANY); + bool bColSct = bool(nFrameType & ( bSectOutTable + ? FrameTypeFlags::COLSECTOUTTAB + : FrameTypeFlags::COLSECT ) ); //So you can also drag with the mouse, without being in the table. CurRectType eRecType = RECT_PAGE_PRT; @@ -1994,7 +1994,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) } } } - else if ( nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER )) + else if ( nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER )) { aRectangle.Left() = aPageLRSpace.GetLeft(); aRectangle.Right() = aPageLRSpace.GetRight(); @@ -2009,7 +2009,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_PROTECT: { - if(bFrmSelection) + if(bFrameSelection) { FlyProtectFlags nProtect = m_pWrtShell->IsSelObjProtected( FlyProtectFlags::Size|FlyProtectFlags::Pos|FlyProtectFlags::Content ); @@ -2022,7 +2022,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) else { SvxProtectItem aProtect(SID_RULER_PROTECT); - if(bBrowse && !(nFrmType & (FrmTypeFlags::DRAWOBJ|FrmTypeFlags::COLUMN)) && !rSh.GetTableFormat()) + if(bBrowse && !(nFrameType & (FrameTypeFlags::DRAWOBJ|FrameTypeFlags::COLUMN)) && !rSh.GetTableFormat()) { aProtect.SetSizeProtect(true); aProtect.SetPosProtect(true); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index a8ddf713f4cd..c0e865aafe7a 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -192,8 +192,8 @@ static SwPrintUIOptions * lcl_GetPrintUIOptions( SwWrtShell* pSh = pDocShell->GetWrtShell(); if (pSh) { - SwPaM* pShellCrsr = pSh->GetCrsr(); - nCurrentPage = pShellCrsr->GetPageNum(); + SwPaM* pShellCursor = pSh->GetCursor(); + nCurrentPage = pShellCursor->GetPageNum(); } else if (!bSwSrcView) { @@ -707,17 +707,17 @@ Reference< util::XReplaceDescriptor > SwXTextDocument::createReplaceDescriptor( return xRet; } -SwUnoCrsr* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xCrsr) +SwUnoCursor* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xCursor) { getText(); XText *const pText = xBodyText.get(); SwXBodyText* pBText = static_cast<SwXBodyText*>(pText); SwXTextCursor *const pXTextCursor = pBText->CreateTextCursor(true); - xCrsr.set( static_cast<text::XWordCursor*>(pXTextCursor) ); + xCursor.set( static_cast<text::XWordCursor*>(pXTextCursor) ); - auto& rUnoCrsr(pXTextCursor->GetCursor()); - rUnoCrsr.SetRemainInSection(false); - return &rUnoCrsr; + auto& rUnoCursor(pXTextCursor->GetCursor()); + rUnoCursor.SetRemainInSection(false); + return &rUnoCursor; } sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > & xDesc) @@ -728,8 +728,8 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > if(!IsValid() || !xDescTunnel.is() || !xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())) throw RuntimeException(); - Reference< XTextCursor > xCrsr; - auto pUnoCrsr(CreateCursorForSearch(xCrsr)); + Reference< XTextCursor > xCursor; + auto pUnoCursor(CreateCursorForSearch(xCursor)); const SwXTextSearch* pSearch = reinterpret_cast<const SwXTextSearch*>( xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())); @@ -743,7 +743,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > SwDocPositions eEnd = pSearch->bBack ? DOCPOS_START : DOCPOS_END; // Search should take place anywhere - pUnoCrsr->SetRemainInSection(false); + pUnoCursor->SetRemainInSection(false); sal_uInt32 nResult; UnoActionContext aContext(pDocShell->GetDoc()); //try attribute search first @@ -762,7 +762,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > pSearch->FillSearchItemSet(aSearch); pSearch->FillReplaceItemSet(aReplace); bool bCancel; - nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles, + nResult = (sal_Int32)pUnoCursor->Find( aSearch, !pSearch->bStyles, eStart, eEnd, bCancel, (FindRanges)eRanges, !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr, @@ -770,11 +770,11 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > } else if(pSearch->bStyles) { - SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); - SwTextFormatColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCrsr->GetDoc()); + SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCursor->GetDoc()); + SwTextFormatColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCursor->GetDoc()); bool bCancel; - nResult = pUnoCrsr->Find( *pSearchColl, + nResult = pUnoCursor->Find( *pSearchColl, eStart, eEnd, bCancel, (FindRanges)eRanges, pReplaceColl ); @@ -784,7 +784,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > //todo/mba: assuming that notes should be omitted bool bSearchInNotes = false; bool bCancel; - nResult = pUnoCrsr->Find( aSearchOpt, bSearchInNotes, + nResult = pUnoCursor->Find( aSearchOpt, bSearchInNotes, eStart, eEnd, bCancel, (FindRanges)eRanges, true ); @@ -804,8 +804,8 @@ Reference< util::XSearchDescriptor > SwXTextDocument::createSearchDescriptor() // Used for findAll/First/Next -SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & xDesc, - Reference< XTextCursor > & xCrsr, +SwUnoCursor* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & xDesc, + Reference< XTextCursor > & xCursor, bool bAll, sal_Int32& nResult, Reference< XInterface > xLastResult) @@ -814,7 +814,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & if(!IsValid() || !xDescTunnel.is() || !xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())) return nullptr; - auto pUnoCrsr(CreateCursorForSearch(xCrsr)); + auto pUnoCursor(CreateCursorForSearch(xCursor)); const SwXTextSearch* pSearch = reinterpret_cast<const SwXTextSearch*>( xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())); @@ -822,17 +822,17 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & if(xLastResult.is()) { Reference<XUnoTunnel> xCursorTunnel( xLastResult, UNO_QUERY); - OTextCursorHelper* pPosCrsr = nullptr; + OTextCursorHelper* pPosCursor = nullptr; if(xCursorTunnel.is()) { - pPosCrsr = reinterpret_cast<OTextCursorHelper*>(xCursorTunnel->getSomething( + pPosCursor = reinterpret_cast<OTextCursorHelper*>(xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId())); } - SwPaM* pCrsr = pPosCrsr ? pPosCrsr->GetPaM() : nullptr; - if(pCrsr) + SwPaM* pCursor = pPosCursor ? pPosCursor->GetPaM() : nullptr; + if(pCursor) { - *pUnoCrsr->GetPoint() = *pCrsr->End(); - pUnoCrsr->DeleteMark(); + *pUnoCursor->GetPoint() = *pCursor->End(); + pUnoCursor->DeleteMark(); } else { @@ -844,15 +844,15 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & } if(!pRange) return nullptr; - pRange->GetPositions(*pUnoCrsr); - if(pUnoCrsr->HasMark()) + pRange->GetPositions(*pUnoCursor); + if(pUnoCursor->HasMark()) { - if(*pUnoCrsr->GetPoint() < *pUnoCrsr->GetMark()) - pUnoCrsr->Exchange(); - pUnoCrsr->DeleteMark(); + if(*pUnoCursor->GetPoint() < *pUnoCursor->GetMark()) + pUnoCursor->Exchange(); + pUnoCursor->DeleteMark(); } } - const SwNode& rRangeNode = pUnoCrsr->GetNode(); + const SwNode& rRangeNode = pUnoCursor->GetNode(); bParentInExtra = rRangeNode.FindFlyStartNode() || rRangeNode.FindFootnoteStartNode() || rRangeNode.FindHeaderStartNode() || @@ -892,18 +892,18 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & 0); pSearch->FillSearchItemSet(aSearch); bool bCancel; - nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles, + nResult = (sal_Int32)pUnoCursor->Find( aSearch, !pSearch->bStyles, eStart, eEnd, bCancel, (FindRanges)eRanges, !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr ); } else if(pSearch->bStyles) { - SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); + SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCursor->GetDoc()); //pSearch->sReplaceText SwTextFormatColl *pReplaceColl = nullptr; bool bCancel; - nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl, + nResult = (sal_Int32)pUnoCursor->Find( *pSearchColl, eStart, eEnd, bCancel, (FindRanges)eRanges, pReplaceColl ); } @@ -912,7 +912,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & //todo/mba: assuming that notes should be omitted bool bSearchInNotes = false; bool bCancel; - nResult = (sal_Int32)pUnoCrsr->Find( aSearchOpt, bSearchInNotes, + nResult = (sal_Int32)pUnoCursor->Find( aSearchOpt, bSearchInNotes, eStart, eEnd, bCancel, (FindRanges)eRanges ); } @@ -921,7 +921,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & //second step - find in other eRanges = FND_IN_OTHER; } - return pUnoCrsr; + return pUnoCursor; } Reference< XIndexAccess > @@ -931,12 +931,12 @@ Reference< XIndexAccess > SolarMutexGuard aGuard; Reference< XInterface > xTmp; sal_Int32 nResult = 0; - Reference< XTextCursor > xCrsr; - auto pResultCrsr(FindAny(xDesc, xCrsr, true, nResult, xTmp)); - if(!pResultCrsr) + Reference< XTextCursor > xCursor; + auto pResultCursor(FindAny(xDesc, xCursor, true, nResult, xTmp)); + if(!pResultCursor) throw RuntimeException(); Reference< XIndexAccess > xRet; - xRet = SwXTextRanges::Create( (nResult) ? &(*pResultCrsr) : nullptr ); + xRet = SwXTextRanges::Create( (nResult) ? &(*pResultCursor) : nullptr ); return xRet; } @@ -946,17 +946,17 @@ Reference< XInterface > SwXTextDocument::findFirst(const Reference< util::XSear SolarMutexGuard aGuard; Reference< XInterface > xTmp; sal_Int32 nResult = 0; - Reference< XTextCursor > xCrsr; - auto pResultCrsr(FindAny(xDesc, xCrsr, false, nResult, xTmp)); - if(!pResultCrsr) + Reference< XTextCursor > xCursor; + auto pResultCursor(FindAny(xDesc, xCursor, false, nResult, xTmp)); + if(!pResultCursor) throw RuntimeException(); Reference< XInterface > xRet; if(nResult) { const uno::Reference< text::XText > xParent = ::sw::CreateParentXText(*pDocShell->GetDoc(), - *pResultCrsr->GetPoint()); - xRet = *new SwXTextCursor(xParent, *pResultCrsr); + *pResultCursor->GetPoint()); + xRet = *new SwXTextCursor(xParent, *pResultCursor); } return xRet; } @@ -968,20 +968,20 @@ Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface > SolarMutexGuard aGuard; Reference< XInterface > xTmp; sal_Int32 nResult = 0; - Reference< XTextCursor > xCrsr; + Reference< XTextCursor > xCursor; if(!xStartAt.is()) throw RuntimeException(); - auto pResultCrsr(FindAny(xDesc, xCrsr, false, nResult, xStartAt)); - if(!pResultCrsr) + auto pResultCursor(FindAny(xDesc, xCursor, false, nResult, xStartAt)); + if(!pResultCursor) throw RuntimeException(); Reference< XInterface > xRet; if(nResult) { const uno::Reference< text::XText > xParent = ::sw::CreateParentXText(*pDocShell->GetDoc(), - *pResultCrsr->GetPoint()); + *pResultCursor->GetPoint()); - xRet = *new SwXTextCursor(xParent, *pResultCrsr); + xRet = *new SwXTextCursor(xParent, *pResultCursor); } return xRet; } @@ -1413,15 +1413,15 @@ void SwXTextDocument::InitNewDoc() if(mxXTextFrames.is()) { - XNameAccess* pFrms = mxXTextFrames.get(); - static_cast<SwXTextFrames*>(pFrms)->Invalidate(); + XNameAccess* pFrames = mxXTextFrames.get(); + static_cast<SwXTextFrames*>(pFrames)->Invalidate(); mxXTextFrames.clear(); } if(mxXGraphicObjects.is()) { - XNameAccess* pFrms = mxXGraphicObjects.get(); - static_cast<SwXTextGraphicObjects*>(pFrms)->Invalidate(); + XNameAccess* pFrames = mxXGraphicObjects.get(); + static_cast<SwXTextGraphicObjects*>(pFrames)->Invalidate(); mxXGraphicObjects.clear(); } @@ -3188,7 +3188,7 @@ int SwXTextDocument::getPart() sal_uInt16 nPage, nLogPage; OUString sDisplay; - pWrtShell->GetPageNumber(-1, pWrtShell->IsCrsrVisible(), nPage, nLogPage, sDisplay); + pWrtShell->GetPageNumber(-1, pWrtShell->IsCursorVisible(), nPage, nLogPage, sDisplay); return nPage - 1; } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index dd4c778914f2..1c61342daacc 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -113,8 +113,8 @@ void SwXTextView::Invalidate() } if(mxTextViewCursor.is()) { - text::XTextViewCursor* pCrsr = mxTextViewCursor.get(); - static_cast<SwXTextViewCursor*>(pCrsr)->Invalidate(); + text::XTextViewCursor* pCursor = mxTextViewCursor.get(); + static_cast<SwXTextViewCursor*>(pCursor)->Invalidate(); mxTextViewCursor.clear(); } @@ -251,7 +251,7 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) SwPaM * pPaM(nullptr); std::pair<OUString, FlyCntType> frame; OUString tableName; - SwUnoTableCrsr const* pTableCursor(nullptr); + SwUnoTableCursor const* pTableCursor(nullptr); ::sw::mark::IMark const* pMark(nullptr); SwUnoCursorHelper::GetSelectableFromAny(xInterface, *pDoc, pPaM, frame, tableName, pTableCursor, pMark, sdrObjects); @@ -270,8 +270,8 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) bool const bSuccess(rSh.GotoFly(frame.first, frame.second)); if (bSuccess) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); } return sal_True; } @@ -336,12 +336,12 @@ uno::Any SwXTextView::getSelection() { case SHELL_MODE_TABLE_TEXT : { - if(rSh.GetTableCrsr()) + if(rSh.GetTableCursor()) { OSL_ENSURE(rSh.GetTableFormat(), "not a table format?"); - uno::Reference< text::XTextTableCursor > xCrsr = new SwXTextTableCursor(*rSh.GetTableFormat(), - rSh.GetTableCrsr()); - aRef.set(xCrsr, uno::UNO_QUERY); + uno::Reference< text::XTextTableCursor > xCursor = new SwXTextTableCursor(*rSh.GetTableFormat(), + rSh.GetTableCursor()); + aRef.set(xCursor, uno::UNO_QUERY); break; } @@ -352,7 +352,7 @@ uno::Any SwXTextView::getSelection() case SHELL_MODE_TABLE_LIST_TEXT: case SHELL_MODE_TEXT : { - uno::Reference< container::XIndexAccess > xPos = SwXTextRanges::Create(rSh.GetCrsr()); + uno::Reference< container::XIndexAccess > xPos = SwXTextRanges::Create(rSh.GetCursor()); aRef.set(xPos, uno::UNO_QUERY); } break; @@ -539,7 +539,7 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto SwRubyList aList; - const sal_uInt16 nCount = SwDoc::FillRubyList( *rSh.GetCrsr(), aList, 0 ); + const sal_uInt16 nCount = SwDoc::FillRubyList( *rSh.GetCursor(), aList, 0 ); Sequence< Sequence< PropertyValue > > aRet(nCount); Sequence< PropertyValue >* pRet = aRet.getArray(); OUString aString; @@ -634,7 +634,7 @@ void SAL_CALL SwXTextView::setRubyList( aList.insert(aList.begin() + nPos, std::move(pEntry)); } SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 ); + pDoc->SetRubyList( *rSh.GetCursor(), aList, 0 ); } SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc() @@ -941,12 +941,12 @@ void SwXTextViewCursor::collapseToStart() SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) { - SwPaM* pShellCrsr = rSh.GetCrsr(); - if(*pShellCrsr->GetPoint() > *pShellCrsr->GetMark()) - pShellCrsr->Exchange(); - pShellCrsr->DeleteMark(); + SwPaM* pShellCursor = rSh.GetCursor(); + if(*pShellCursor->GetPoint() > *pShellCursor->GetMark()) + pShellCursor->Exchange(); + pShellCursor->DeleteMark(); rSh.EnterStdMode(); - rSh.SetSelection(*pShellCrsr); + rSh.SetSelection(*pShellCursor); } } else @@ -965,12 +965,12 @@ void SwXTextViewCursor::collapseToEnd() SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) { - SwPaM* pShellCrsr = rSh.GetCrsr(); - if(*pShellCrsr->GetPoint() < *pShellCrsr->GetMark()) - pShellCrsr->Exchange(); - pShellCrsr->DeleteMark(); + SwPaM* pShellCursor = rSh.GetCursor(); + if(*pShellCursor->GetPoint() < *pShellCursor->GetMark()) + pShellCursor->Exchange(); + pShellCursor->DeleteMark(); rSh.EnterStdMode(); - rSh.SetSelection(*pShellCrsr); + rSh.SetSelection(*pShellCursor); } } else @@ -1059,12 +1059,12 @@ void SwXTextViewCursor::gotoRange( eSelMode != SHELL_MODE_TABLE_LIST_TEXT && eSelMode != SHELL_MODE_TEXT )) rSh.EnterStdMode(); - SwPaM* pShellCrsr = rSh.GetCrsr(); - SwPaM aOwnPaM(*pShellCrsr->GetPoint()); - if(pShellCrsr->HasMark()) + SwPaM* pShellCursor = rSh.GetCursor(); + SwPaM aOwnPaM(*pShellCursor->GetPoint()); + if(pShellCursor->HasMark()) { aOwnPaM.SetMark(); - *aOwnPaM.GetMark() = *pShellCrsr->GetMark(); + *aOwnPaM.GetMark() = *pShellCursor->GetMark(); } uno::Reference<lang::XUnoTunnel> xRangeTunnel( xRange, uno::UNO_QUERY); @@ -1081,18 +1081,18 @@ void SwXTextViewCursor::gotoRange( SwXParagraph::getUnoTunnelId())); } - const FrmTypeFlags nFrmType = rSh.GetFrmType(nullptr,true); + const FrameTypeFlags nFrameType = rSh.GetFrameType(nullptr,true); SwStartNodeType eSearchNodeType = SwNormalStartNode; - if(nFrmType & FrmTypeFlags::FLY_ANY) + if(nFrameType & FrameTypeFlags::FLY_ANY) eSearchNodeType = SwFlyStartNode; - else if(nFrmType &FrmTypeFlags::HEADER) + else if(nFrameType &FrameTypeFlags::HEADER) eSearchNodeType = SwHeaderStartNode; - else if(nFrmType & FrmTypeFlags::FOOTER) + else if(nFrameType & FrameTypeFlags::FOOTER) eSearchNodeType = SwFooterStartNode; - else if(nFrmType & FrmTypeFlags::TABLE) + else if(nFrameType & FrameTypeFlags::TABLE) eSearchNodeType = SwTableBoxStartNode; - else if(nFrmType & FrmTypeFlags::FOOTNOTE) + else if(nFrameType & FrameTypeFlags::FOOTNOTE) eSearchNodeType = SwFootnoteStartNode; const SwStartNode* pOwnStartNode = aOwnPaM.GetNode(). @@ -1213,10 +1213,10 @@ sal_Bool SwXTextViewCursor::jumpToFirstPage() if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.EnterStdMode(); bRet = rSh.SttEndDoc(true); @@ -1234,10 +1234,10 @@ sal_Bool SwXTextViewCursor::jumpToLastPage() if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.EnterStdMode(); bRet = rSh.SttEndDoc(false); @@ -1311,8 +1311,8 @@ sal_Int16 SwXTextViewCursor::getPage() if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); - nRet = static_cast<sal_Int16>(pShellCrsr->GetPageNum()); + SwPaM* pShellCursor = rSh.GetCursor(); + nRet = static_cast<sal_Int16>(pShellCursor->GetPageNum()); } else throw uno::RuntimeException(); @@ -1364,9 +1364,9 @@ uno::Reference< text::XText > SwXTextViewCursor::getText() throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - xRet = ::sw::CreateParentXText(*pDoc, *pShellCrsr->Start()); + xRet = ::sw::CreateParentXText(*pDoc, *pShellCursor->Start()); } else throw uno::RuntimeException(); @@ -1384,9 +1384,9 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart() throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), nullptr); + xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCursor->Start(), nullptr); } else throw uno::RuntimeException(); @@ -1404,9 +1404,9 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd() throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), nullptr); + xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCursor->End(), nullptr); } else throw uno::RuntimeException(); @@ -1436,8 +1436,8 @@ OUString SwXTextViewCursor::getString() case SHELL_MODE_TEXT : { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); - SwUnoCursorHelper::GetTextFromPam(*pShellCrsr, uRet); + SwPaM* pShellCursor = rSh.GetCursor(); + SwUnoCursorHelper::GetTextFromPam(*pShellCursor, uRet); } default:;//prevent warning } @@ -1467,8 +1467,8 @@ void SwXTextViewCursor::setString(const OUString& aString) case SHELL_MODE_TEXT : { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwCursor* pShellCrsr = rSh.GetSwCrsr(); - SwUnoCursorHelper::SetString(*pShellCrsr, aString); + SwCursor* pShellCursor = rSh.GetSwCursor(); + SwUnoCursorHelper::SetString(*pShellCursor, aString); } default:;//prevent warning } @@ -1490,12 +1490,12 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); - SwNode& rNode = pShellCrsr->GetNode(); + SwPaM* pShellCursor = rSh.GetCursor(); + SwNode& rNode = pShellCursor->GetNode(); if (rNode.IsTextNode()) { SwUnoCursorHelper::SetPropertyValue( - *pShellCrsr, *m_pPropSet, rPropertyName, aValue ); + *pShellCursor, *m_pPropSet, rPropertyName, aValue ); } else throw RuntimeException(); @@ -1513,9 +1513,9 @@ Any SwXTextViewCursor::getPropertyValue( const OUString& rPropertyName ) if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); aRet = SwUnoCursorHelper::GetPropertyValue( - *pShellCrsr, *m_pPropSet, rPropertyName); + *pShellCursor, *m_pPropSet, rPropertyName); } else throw RuntimeException(); @@ -1554,9 +1554,9 @@ PropertyState SwXTextViewCursor::getPropertyState( const OUString& rPropertyNam if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); eState = SwUnoCursorHelper::GetPropertyState( - *pShellCrsr, *m_pPropSet, rPropertyName); + *pShellCursor, *m_pPropSet, rPropertyName); } else throw RuntimeException(); @@ -1573,9 +1573,9 @@ Sequence< PropertyState > SwXTextViewCursor::getPropertyStates( if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); aRet = SwUnoCursorHelper::GetPropertyStates( - *pShellCrsr, *m_pPropSet, rPropertyNames); + *pShellCursor, *m_pPropSet, rPropertyNames); } return aRet; } @@ -1588,9 +1588,9 @@ void SwXTextViewCursor::setPropertyToDefault( const OUString& rPropertyName ) if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); SwUnoCursorHelper::SetPropertyToDefault( - *pShellCrsr, *m_pPropSet, rPropertyName); + *pShellCursor, *m_pPropSet, rPropertyName); } } @@ -1603,9 +1603,9 @@ Any SwXTextViewCursor::getPropertyDefault( const OUString& rPropertyName ) if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); aRet = SwUnoCursorHelper::GetPropertyDefault( - *pShellCrsr, *m_pPropSet, rPropertyName); + *pShellCursor, *m_pPropSet, rPropertyName); } return aRet; } @@ -1762,25 +1762,25 @@ IMPLEMENT_FORWARD_XINTERFACE2(SwXTextViewCursor,SwXTextViewCursor_Base,OTextCurs const SwDoc* SwXTextViewCursor::GetDoc() const { SwWrtShell& rSh = m_pView->GetWrtShell(); - return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr; + return rSh.GetCursor() ? rSh.GetCursor()->GetDoc() : nullptr; } SwDoc* SwXTextViewCursor::GetDoc() { SwWrtShell& rSh = m_pView->GetWrtShell(); - return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr; + return rSh.GetCursor() ? rSh.GetCursor()->GetDoc() : nullptr; } const SwPaM* SwXTextViewCursor::GetPaM() const { SwWrtShell& rSh = m_pView->GetWrtShell(); - return rSh.GetCrsr(); + return rSh.GetCursor(); } SwPaM* SwXTextViewCursor::GetPaM() { SwWrtShell& rSh = m_pView->GetWrtShell(); - return rSh.GetCrsr(); + return rSh.GetCursor(); } uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransferable() @@ -1827,8 +1827,8 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe if ( SwTransferable::IsPaste( rSh, aDataHelper ) ) { SwTransferable::Paste( rSh, aDataHelper ); - if( rSh.IsFrmSelected() || rSh.IsObjSelected() ) - rSh.EnterSelFrmMode(); + if( rSh.IsFrameSelected() || rSh.IsObjSelected() ) + rSh.EnterSelFrameMode(); GetView()->AttrChangedNotify( &rSh ); } } diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index 11653aa705c0..6b2e3649f903 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -222,7 +222,7 @@ bool SwParaConnectBorderItem::GetPresentation // Frame attribute -bool SwFormatFrmSize::GetPresentation +bool SwFormatFrameSize::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit eCoreUnit, @@ -244,7 +244,7 @@ bool SwFormatFrmSize::GetPresentation } if ( ATT_VAR_SIZE != GetHeightSizeType() ) { - const sal_uInt16 nId = ATT_FIX_SIZE == m_eFrmHeightType ? + const sal_uInt16 nId = ATT_FIX_SIZE == m_eFrameHeightType ? STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT; rText = rText + ", " + SW_RESSTR( nId ) + " "; if ( GetHeightPercent() ) @@ -337,7 +337,7 @@ bool SwFormatSurround::GetPresentation return true; } -//VertOrientation, how and by what orientate the FlyFrm in the vertical? +//VertOrientation, how and by what orientate the FlyFrame in the vertical? bool SwFormatVertOrient::GetPresentation ( @@ -383,7 +383,7 @@ bool SwFormatVertOrient::GetPresentation return true; } -//HoriOrientation, how and by what orientate the FlyFrm in the horizontal? +//HoriOrientation, how and by what orientate the FlyFrame in the horizontal? bool SwFormatHoriOrient::GetPresentation ( diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index e0026eb3163b..8536c4c62987 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -570,21 +570,21 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) for(size_t i = 0; i < nMemberCount; ++i) { const SwFrameFormat* pFrameFormat = pWrtShell->GetFlyNum(i,eType,/*bIgnoreTextBoxes=*/true); - const OUString sFrmName = pFrameFormat->GetName(); + const OUString sFrameName = pFrameFormat->GetName(); SwContent* pCnt; if(ContentTypeId::GRAPHIC == nContentType) { OUString sLink; pWrtShell->GetGrfNms( &sLink, nullptr, static_cast<const SwFlyFrameFormat*>( pFrameFormat)); - pCnt = new SwGraphicContent(this, sFrmName, + pCnt = new SwGraphicContent(this, sFrameName, INetURLObject::decode( sLink, INetURLObject::DECODE_UNAMBIGUOUS ), pFrameFormat->FindLayoutRect(false, &aNullPt).Top()); } else { - pCnt = new SwContent(this, sFrmName, + pCnt = new SwContent(this, sFrameName, pFrameFormat->FindLayoutRect(false, &aNullPt).Top() ); } if( !pFrameFormat->GetInfo( aAskItem ) && @@ -3130,8 +3130,8 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode) uno::Reference< frame::XModel > xModel = m_pActiveShell->GetView().GetDocShell()->GetBaseModel(); uno::Reference< text::XTextGraphicObjectsSupplier > xGraphics(xModel, uno::UNO_QUERY); xNameAccess = xGraphics->getGraphicObjects(); - uno::Reference< text::XTextFramesSupplier > xFrms(xModel, uno::UNO_QUERY); - xSecond = xFrms->getTextFrames(); + uno::Reference< text::XTextFramesSupplier > xFrames(xModel, uno::UNO_QUERY); + xSecond = xFrames->getTextFrames(); uno::Reference< text::XTextEmbeddedObjectsSupplier > xObjs(xModel, uno::UNO_QUERY); xThird = xObjs->getEmbeddedObjects(); } @@ -3148,17 +3148,17 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode) else if(nMode == EditEntryMode::RENAME) { uno::Reference< frame::XModel > xModel = m_pActiveShell->GetView().GetDocShell()->GetBaseModel(); - uno::Reference< text::XTextFramesSupplier > xFrms(xModel, uno::UNO_QUERY); + uno::Reference< text::XTextFramesSupplier > xFrames(xModel, uno::UNO_QUERY); uno::Reference< text::XTextEmbeddedObjectsSupplier > xObjs(xModel, uno::UNO_QUERY); if(ContentTypeId::FRAME == nType) { - xNameAccess = xFrms->getTextFrames(); + xNameAccess = xFrames->getTextFrames(); xSecond = xObjs->getEmbeddedObjects(); } else { xNameAccess = xObjs->getEmbeddedObjects(); - xSecond = xFrms->getTextFrames(); + xSecond = xFrames->getTextFrames(); } uno::Reference< text::XTextGraphicObjectsSupplier > xGraphics(xModel, uno::UNO_QUERY); xThird = xGraphics->getGraphicObjects(); @@ -3340,7 +3340,7 @@ void SwContentTree::GotoContent(SwContent* pCnt) *static_cast<SwURLFieldContent*>(pCnt)->GetINetAttr() )) { m_pActiveShell->Right( CRSR_SKIP_CHARS, true, 1, false); - m_pActiveShell->SwCrsrShell::SelectTextAttr( RES_TXTATR_INETFMT, true ); + m_pActiveShell->SwCursorShell::SelectTextAttr( RES_TXTATR_INETFMT, true ); } } @@ -3368,7 +3368,7 @@ void SwContentTree::GotoContent(SwContent* pCnt) break; case ContentTypeId::DRAWOBJECT: { - SwPosition aPos = *m_pActiveShell->GetCrsr()->GetPoint(); + SwPosition aPos = *m_pActiveShell->GetCursor()->GetPoint(); SdrView* pDrawView = m_pActiveShell->GetDrawView(); if (pDrawView) { @@ -3398,8 +3398,8 @@ void SwContentTree::GotoContent(SwContent* pCnt) } if(bSel) { - m_pActiveShell->HideCrsr(); - m_pActiveShell->EnterSelFrmMode(); + m_pActiveShell->HideCursor(); + m_pActiveShell->EnterSelFrameMode(); } SwView& rView = m_pActiveShell->GetView(); rView.StopShellTimer(); diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 0b114186c310..6459620a76b8 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -923,8 +923,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry break; case CTX_INSERT_NEW_FILE: { - SfxViewFrame* pGlobFrm = pActiveShell->GetView().GetViewFrame(); - SwGlobalFrameListener_Impl aFrmListener(*pGlobFrm); + SfxViewFrame* pGlobFrame = pActiveShell->GetView().GetViewFrame(); + SwGlobalFrameListener_Impl aFrameListener(*pGlobFrame); sal_uLong nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (sal_uLong)-1; // Creating a new doc @@ -936,8 +936,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry SfxCallMode::SYNCHRON, &aFactory, 0L)); // save at - SfxFrame* pFrm = pItem ? pItem->GetFrame() : nullptr; - SfxViewFrame* pViewFrame = pFrm ? pFrm->GetCurrentViewFrame() : nullptr; + SfxFrame* pFrame = pItem ? pItem->GetFrame() : nullptr; + SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : nullptr; if (pViewFrame) { const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>( @@ -948,9 +948,9 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry OUString sNewFile(pMedium->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI)); // Insert the area with the Doc-Name // Bring the own Doc in the foreground - if(aFrmListener.IsValid() && !sNewFile.isEmpty()) + if(aFrameListener.IsValid() && !sNewFile.isEmpty()) { - pGlobFrm->ToTop(); + pGlobFrame->ToTop(); // Due to the update the entries are invalid if(nEntryPos != (sal_uLong)-1) { diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx index cf64f93fefa4..8f23fee615fc 100644 --- a/sw/source/uibase/utlui/initui.cxx +++ b/sw/source/uibase/utlui/initui.cxx @@ -51,7 +51,7 @@ enum CachedStringID { OldGrfCat, OldTabCat, - OldFrmCat, + OldFrameCat, OldDrwCat, CurrGlosGroup, CachedStrings @@ -106,14 +106,14 @@ void SetOldTabCat(const OUString& sStr) SetCachedString(OldTabCat, sStr); } -OUString GetOldFrmCat() +OUString GetOldFrameCat() { - return GetCachedString(OldFrmCat); + return GetCachedString(OldFrameCat); } -void SetOldFrmCat(const OUString& sStr) +void SetOldFrameCat(const OUString& sStr) { - SetCachedString(OldFrmCat, sStr); + SetCachedString(OldFrameCat, sStr); } OUString GetOldDrwCat() diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 149d047a3cb7..9439081f772d 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -98,7 +98,7 @@ void SwNavigationPI::MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, if(bWithChildren && nMove > 1 && nLastOutlinePos < nTarget) { - if(!rSh.IsCrsrPtAtEnd()) + if(!rSh.IsCursorPtAtEnd()) rSh.SwapPam(); nMove -= nLastOutlinePos - nSource; } @@ -113,12 +113,12 @@ void SwNavigationPI::MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, // After goto cancel the status frame selection -static void lcl_UnSelectFrm(SwWrtShell *pSh) +static void lcl_UnSelectFrame(SwWrtShell *pSh) { - if (pSh->IsFrmSelected()) + if (pSh->IsFrameSelected()) { - pSh->UnSelectFrm(); - pSh->LeaveSelFrmMode(); + pSh->UnSelectFrame(); + pSh->LeaveSelFrameMode(); } } @@ -243,9 +243,9 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) case FN_SELECT_FOOTER: { - rSh.MoveCrsr(); - const FrmTypeFlags eType = rSh.GetFrmType(nullptr,false); - if (eType & FrmTypeFlags::FOOTER) + rSh.MoveCursor(); + const FrameTypeFlags eType = rSh.GetFrameType(nullptr,false); + if (eType & FrameTypeFlags::FOOTER) { if (rSh.EndPg()) nFuncId = FN_END_OF_PAGE; @@ -257,9 +257,9 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) break; case FN_SELECT_HEADER: { - rSh.MoveCrsr(); - const FrmTypeFlags eType = rSh.GetFrmType(nullptr,false); - if (eType & FrmTypeFlags::HEADER) + rSh.MoveCursor(); + const FrameTypeFlags eType = rSh.GetFrameType(nullptr,false); + if (eType & FrameTypeFlags::HEADER) { if (rSh.SttPg()) nFuncId = FN_START_OF_PAGE; @@ -271,10 +271,10 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) break; case FN_SELECT_FOOTNOTE: { - rSh.MoveCrsr(); - const FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,false); + rSh.MoveCursor(); + const FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,false); // Jump from the footnote to the anchor. - if (eFrmType & FrmTypeFlags::FOOTNOTE) + if (eFrameType & FrameTypeFlags::FOOTNOTE) { if (rSh.GotoFootnoteAnchor()) nFuncId = FN_FOOTNOTE_TO_ANCHOR; @@ -326,7 +326,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) } if (nFuncId) { - lcl_UnSelectFrm(&rSh); + lcl_UnSelectFrame(&rSh); } if(bFocusToDoc) pView->GetEditWin().GrabFocus(); diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx index 6e30e2ff21f5..a67eaa8e037f 100644 --- a/sw/source/uibase/utlui/shdwcrsr.cxx +++ b/sw/source/uibase/utlui/shdwcrsr.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star; SwShadowCursor::~SwShadowCursor() { if( USHRT_MAX != nOldMode ) - DrawCrsr( aOldPt, nOldHeight, nOldMode ); + DrawCursor( aOldPt, nOldHeight, nOldMode ); } void SwShadowCursor::SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode ) @@ -38,9 +38,9 @@ void SwShadowCursor::SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode ) if( aOldPt != aPt || nOldHeight != nHeight || nOldMode != nMode ) { if( USHRT_MAX != nOldMode ) - DrawCrsr( aOldPt, nOldHeight, nOldMode ); + DrawCursor( aOldPt, nOldHeight, nOldMode ); - DrawCrsr( aPt, nHeight, nMode ); + DrawCursor( aPt, nHeight, nMode ); nOldMode = nMode; nOldHeight = nHeight; aOldPt = aPt; @@ -66,7 +66,7 @@ void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, bool bLeft ) } } -void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode ) +void SwShadowCursor::DrawCursor( const Point& rPt, long nHeight, sal_uInt16 nMode ) { nHeight = (((nHeight / 4)+1) * 4) + 1; @@ -93,7 +93,7 @@ void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode void SwShadowCursor::Paint() { if( USHRT_MAX != nOldMode ) - DrawCrsr( aOldPt, nOldHeight, nOldMode ); + DrawCursor( aOldPt, nOldHeight, nOldMode ); } Rectangle SwShadowCursor::GetRect() const diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index 6cb0b5cdce78..d518c663ab74 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -98,8 +98,8 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) SwView* pView = ::GetActiveView(); SwWrtShell* pWrtShell; if( pView && nullptr != (pWrtShell = pView->GetWrtShellPtr()) && - !pWrtShell->SwCrsrShell::HasSelection()&& - !pWrtShell->IsSelFrmMode() && + !pWrtShell->SwCursorShell::HasSelection()&& + !pWrtShell->IsSelFrameMode() && !pWrtShell->IsObjSelected()) { SfxStyleSheetBasePool* pPool = pView->GetDocShell()-> diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 34411a54b85c..476cef8be0b2 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -107,8 +107,8 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh) aBoxInfo = *static_cast<const SvxBoxInfoItem*>(pBoxInfo); // Table variant: If more than one table cells are selected - rSh.GetCrsr(); //So that GetCrsrCnt() returns the right thing - aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1); + rSh.GetCursor(); //So that GetCursorCnt() returns the right thing + aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCursorCnt() > 1); // Always show the distance field aBoxInfo.SetDist (true); // Set minimal size in tables and paragraphs @@ -224,10 +224,10 @@ void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet) const SfxBoolItem& rDynamic = static_cast<const SfxBoolItem&>(rSet.Get(SID_ATTR_PAGE_DYNAMIC)); // Convert size - SwFormatFrmSize aFrmSize(rDynamic.GetValue() ? ATT_MIN_SIZE : ATT_FIX_SIZE, + SwFormatFrameSize aFrameSize(rDynamic.GetValue() ? ATT_MIN_SIZE : ATT_FIX_SIZE, rSize.GetSize().Width(), rSize.GetSize().Height()); - aSet.Put(aFrmSize); + aSet.Put(aFrameSize); pFormat->SetFormatAttr(aSet); } @@ -288,7 +288,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SfxItemState::SET) { const SvxSizeItem& rSizeItem = static_cast<const SvxSizeItem&>(rSet.Get(SID_ATTR_PAGE_SIZE)); - SwFormatFrmSize aSize(ATT_FIX_SIZE); + SwFormatFrameSize aSize(ATT_FIX_SIZE); aSize.SetSize(rSizeItem.GetSize()); rMaster.SetFormatAttr(aSize); } @@ -425,7 +425,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) rSet.Put(aPageItem); // Size - SvxSizeItem aSizeItem(SID_ATTR_PAGE_SIZE, rMaster.GetFrmSize().GetSize()); + SvxSizeItem aSizeItem(SID_ATTR_PAGE_SIZE, rMaster.GetFrameSize().GetSize()); rSet.Put(aSizeItem); // Maximum size @@ -484,8 +484,8 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) SfxBoolItem aOn(SID_ATTR_PAGE_ON, true); aHeaderSet.Put(aOn); - const SwFormatFrmSize &rFrmSize = pHeaderFormat->GetFrmSize(); - const SwFrmSize eSizeType = rFrmSize.GetHeightSizeType(); + const SwFormatFrameSize &rFrameSize = pHeaderFormat->GetFrameSize(); + const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType(); SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != ATT_FIX_SIZE); aHeaderSet.Put(aDynamic); @@ -496,7 +496,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) aHeaderSet.Put(aFirstShared); // Size - SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrmSize.GetSize())); + SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrameSize.GetSize())); aHeaderSet.Put(aSize); // Shifting frame attributes @@ -535,8 +535,8 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) SfxBoolItem aOn(SID_ATTR_PAGE_ON, true); aFooterSet.Put(aOn); - const SwFormatFrmSize &rFrmSize = pFooterFormat->GetFrmSize(); - const SwFrmSize eSizeType = rFrmSize.GetHeightSizeType(); + const SwFormatFrameSize &rFrameSize = pFooterFormat->GetFrameSize(); + const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType(); SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != ATT_FIX_SIZE); aFooterSet.Put(aDynamic); @@ -547,7 +547,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) aFooterSet.Put(aFirstShared); // Size - SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrmSize.GetSize())); + SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrameSize.GetSize())); aFooterSet.Put(aSize); // Shifting Frame attributes @@ -756,7 +756,7 @@ SwTwips GetTableWidth( SwFrameFormat* pFormat, SwTabCols& rCols, sal_uInt16 *pPe case text::HoriOrientation::LEFT: case text::HoriOrientation::RIGHT: case text::HoriOrientation::CENTER: - nWidth = pFormat->GetFrmSize().GetWidth(); + nWidth = pFormat->GetFrameSize().GetWidth(); break; default: { @@ -780,7 +780,7 @@ SwTwips GetTableWidth( SwFrameFormat* pFormat, SwTabCols& rCols, sal_uInt16 *pPe } } if (pPercent) - *pPercent = pFormat->GetFrmSize().GetWidthPercent(); + *pPercent = pFormat->GetFrameSize().GetWidthPercent(); return nWidth; } diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index e246665e4dc8..1a2c22e66ca2 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -66,7 +66,7 @@ SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin, sal_uInt32 nFlags, const Link<SwOneExampleFrame&,void>* pInitializedLink, const OUString* pURL ) : - aTopWindow(VclPtr<SwFrmCtrlWindow>::Create(&rWin, this)), + aTopWindow(VclPtr<SwFrameCtrlWindow>::Create(&rWin, this)), aMenuRes(SW_RES(RES_FRMEX_MENU)), pModuleView(SW_MOD()->GetView()), nStyleFlags(nFlags), @@ -200,10 +200,10 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) // now get the model uno::Reference< beans::XPropertySet > xPrSet(_xControl, uno::UNO_QUERY); uno::Any aFrame = xPrSet->getPropertyValue("Frame"); - uno::Reference< frame::XFrame > xFrm; - aFrame >>= xFrm; + uno::Reference< frame::XFrame > xFrame; + aFrame >>= xFrame; - uno::Reference< beans::XPropertySet > xPropSet( xFrm, uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY ); if ( xPropSet.is() ) { try @@ -219,7 +219,7 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) } } - _xController = xFrm->getController(); + _xController = xFrame->getController(); if(_xController.is()) { _xModel = _xController->getModel(); @@ -284,11 +284,11 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY); if( xTunnel.is() ) { - OTextCursorHelper* pCrsr = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething( + OTextCursorHelper* pCursor = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )); - if( pCrsr ) + if( pCursor ) { - SwEditShell* pSh = pCrsr->GetDoc()->GetEditShell(); + SwEditShell* pSh = pCursor->GetDoc()->GetEditShell(); do { @@ -331,8 +331,8 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) } } - uno::Reference< beans::XPropertySet > xCrsrProp(_xCursor, uno::UNO_QUERY); - uno::Any aPageStyle = xCrsrProp->getPropertyValue(UNO_NAME_PAGE_STYLE_NAME); + uno::Reference< beans::XPropertySet > xCursorProp(_xCursor, uno::UNO_QUERY); + uno::Any aPageStyle = xCursorProp->getPropertyValue(UNO_NAME_PAGE_STYLE_NAME); OUString sPageStyle; aPageStyle >>= sPageStyle; @@ -370,21 +370,21 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) aInitializedLink.Call(*this); - uno::Reference< text::XTextViewCursorSupplier > xCrsrSupp(_xController, uno::UNO_QUERY); - uno::Reference< view::XScreenCursor > xScrCrsr(xCrsrSupp->getViewCursor(), uno::UNO_QUERY); - if(xScrCrsr.is()) - xScrCrsr->screenUp(); + uno::Reference< text::XTextViewCursorSupplier > xCursorSupp(_xController, uno::UNO_QUERY); + uno::Reference< view::XScreenCursor > xScrCursor(xCursorSupp->getViewCursor(), uno::UNO_QUERY); + if(xScrCursor.is()) + xScrCursor->screenUp(); xWin->setVisible( sal_True ); aTopWindow->Show(); if( xTunnel.is() ) { - OTextCursorHelper* pCrsr = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething( + OTextCursorHelper* pCursor = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )); - if( pCrsr ) + if( pCursor ) { - SwEditShell* pSh = pCrsr->GetDoc()->GetEditShell(); + SwEditShell* pSh = pCursor->GetDoc()->GetEditShell(); if( pSh->ActionCount() ) { pSh->EndAllAction(); @@ -404,18 +404,18 @@ void SwOneExampleFrame::ClearDocument( bool bStartUpdateTimer ) uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY); if( xTunnel.is() ) { - OTextCursorHelper* pCrsr = reinterpret_cast<OTextCursorHelper*>(xTunnel->getSomething( + OTextCursorHelper* pCursor = reinterpret_cast<OTextCursorHelper*>(xTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) ); - if( pCrsr ) + if( pCursor ) { - SwDoc* pDoc = pCrsr->GetDoc(); + SwDoc* pDoc = pCursor->GetDoc(); SwEditShell* pSh = pDoc->GetEditShell(); pSh->LockPaint(); pSh->StartAllAction(); pSh->KillPams(); pSh->ClearMark(); pDoc->ClearDoc(); - pSh->ClearUpCrsrs(); + pSh->ClearUpCursors(); if( aLoadedIdle.IsActive() || !bStartUpdateTimer ) { @@ -503,17 +503,17 @@ IMPL_LINK_TYPED(SwOneExampleFrame, PopupHdl, Menu*, pMenu, bool ) } else if(ITEM_UP == nId || ITEM_DOWN == nId) { - uno::Reference< text::XTextViewCursorSupplier > xCrsrSupp(_xController, uno::UNO_QUERY); - uno::Reference< view::XScreenCursor > xScrCrsr(xCrsrSupp->getViewCursor(), uno::UNO_QUERY); + uno::Reference< text::XTextViewCursorSupplier > xCursorSupp(_xController, uno::UNO_QUERY); + uno::Reference< view::XScreenCursor > xScrCursor(xCursorSupp->getViewCursor(), uno::UNO_QUERY); if(ITEM_UP == nId) - xScrCrsr->screenUp(); + xScrCursor->screenUp(); else - xScrCrsr->screenDown(); + xScrCursor->screenDown(); } return false; }; -SwFrmCtrlWindow::SwFrmCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame) +SwFrameCtrlWindow::SwFrameCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame) : VclEventBox(pParent) , pExampleFrame(pFrame) { @@ -521,7 +521,7 @@ SwFrmCtrlWindow::SwFrmCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame set_fill(true); } -void SwFrmCtrlWindow::Command( const CommandEvent& rCEvt ) +void SwFrameCtrlWindow::Command( const CommandEvent& rCEvt ) { switch ( rCEvt.GetCommand() ) { @@ -540,12 +540,12 @@ void SwFrmCtrlWindow::Command( const CommandEvent& rCEvt ) } } -Size SwFrmCtrlWindow::GetOptimalSize() const +Size SwFrameCtrlWindow::GetOptimalSize() const { return LogicToPixel(Size(82, 124), MapMode(MAP_APPFONT)); } -void SwFrmCtrlWindow::Resize() +void SwFrameCtrlWindow::Resize() { VclEventBox::Resize(); pExampleFrame->ClearDocument(true); diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index dc3ee757940f..725d64271180 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -90,9 +90,9 @@ long SwWrtShell::DelLine() // remember the old cursor Push(); ClearMark(); - SwCrsrShell::LeftMargin(); + SwCursorShell::LeftMargin(); SetMark(); - SwCrsrShell::RightMargin(); + SwCursorShell::RightMargin(); long nRet = Delete(); Pop(false); @@ -104,7 +104,7 @@ long SwWrtShell::DelLine() long SwWrtShell::DelToStartOfLine() { OpenMark(); - SwCrsrShell::LeftMargin(); + SwCursorShell::LeftMargin(); long nRet = Delete(); CloseMark( 0 != nRet ); return nRet; @@ -113,7 +113,7 @@ long SwWrtShell::DelToStartOfLine() long SwWrtShell::DelToEndOfLine() { OpenMark(); - SwCrsrShell::RightMargin(); + SwCursorShell::RightMargin(); long nRet = Delete(); CloseMark( 0 != nRet ); return 1; @@ -132,15 +132,15 @@ long SwWrtShell::DelLeft() DelSelectedObj(); // #108205# Set cursor to remembered position. - SetCrsr(&aTmpPt); + SetCursor(&aTmpPt); - LeaveSelFrmMode(); - UnSelectFrm(); + LeaveSelFrameMode(); + UnSelectFrame(); nSelType = GetSelectionType(); if ( nCmp & nSelType ) { - EnterSelFrmMode(); + EnterSelFrameMode(); GotoNextFly(); } @@ -176,29 +176,29 @@ long SwWrtShell::DelLeft() // JP 29.06.95: never erase a table standing in front of it. bool bSwap = false; - const SwTableNode * pWasInTableNd = SwCrsrShell::IsCrsrInTable(); + const SwTableNode * pWasInTableNd = SwCursorShell::IsCursorInTable(); - if( SwCrsrShell::IsSttPara()) + if( SwCursorShell::IsSttPara()) { // #i4032# Don't actually call a 'delete' if we // changed the table cell, compare DelRight(). const SwStartNode * pSNdOld = pWasInTableNd ? - GetSwCrsr()->GetNode().FindTableBoxStartNode() : + GetSwCursor()->GetNode().FindTableBoxStartNode() : nullptr; // If the cursor is at the beginning of a paragraph, try to step // backwards. On failure we are done. - if( !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) ) + if( !SwCursorShell::Left(1,CRSR_SKIP_CHARS) ) return 0; // If the cursor entered or left a table (or both) we are done. No step // back. - const SwTableNode* pIsInTableNd = SwCrsrShell::IsCrsrInTable(); + const SwTableNode* pIsInTableNd = SwCursorShell::IsCursorInTable(); if( pIsInTableNd != pWasInTableNd ) return 0; const SwStartNode* pSNdNew = pIsInTableNd ? - GetSwCrsr()->GetNode().FindTableBoxStartNode() : + GetSwCursor()->GetNode().FindTableBoxStartNode() : nullptr; // #i4032# Don't actually call a 'delete' if we @@ -207,18 +207,18 @@ long SwWrtShell::DelLeft() return 0; OpenMark(); - SwCrsrShell::Right(1,CRSR_SKIP_CHARS); - SwCrsrShell::SwapPam(); + SwCursorShell::Right(1,CRSR_SKIP_CHARS); + SwCursorShell::SwapPam(); bSwap = true; } else { OpenMark(); - SwCrsrShell::Left(1,CRSR_SKIP_CHARS); + SwCursorShell::Left(1,CRSR_SKIP_CHARS); } long nRet = Delete(); if( !nRet && bSwap ) - SwCrsrShell::SwapPam(); + SwCursorShell::SwapPam(); CloseMark( 0 != nRet ); return nRet; } @@ -270,23 +270,23 @@ long SwWrtShell::DelRight() EnterStdMode(); } - pWasInTableNd = IsCrsrInTable(); + pWasInTableNd = IsCursorInTable(); - if( nsSelectionType::SEL_TXT & nSelection && SwCrsrShell::IsSttPara() && - SwCrsrShell::IsEndPara() ) + if( nsSelectionType::SEL_TXT & nSelection && SwCursorShell::IsSttPara() && + SwCursorShell::IsEndPara() ) { // save cursor - SwCrsrShell::Push(); + SwCursorShell::Push(); bool bDelFull = false; - if ( SwCrsrShell::Right(1,CRSR_SKIP_CHARS) ) + if ( SwCursorShell::Right(1,CRSR_SKIP_CHARS) ) { - const SwTableNode * pCurrTableNd = IsCrsrInTable(); + const SwTableNode * pCurrTableNd = IsCursorInTable(); bDelFull = pCurrTableNd && pCurrTableNd != pWasInTableNd; } // restore cursor - SwCrsrShell::Pop( false ); + SwCursorShell::Pop( false ); if( bDelFull ) { @@ -299,44 +299,44 @@ long SwWrtShell::DelRight() { // #108049# Save the startnode of the current cell const SwStartNode * pSNdOld; - pSNdOld = GetSwCrsr()->GetNode().FindTableBoxStartNode(); + pSNdOld = GetSwCursor()->GetNode().FindTableBoxStartNode(); - if ( SwCrsrShell::IsEndPara() ) + if ( SwCursorShell::IsEndPara() ) { // #i41424# Introduced a couple of // Push()-Pop() pairs here. The reason for this is that a // Right()-Left() combination does not make sure, that // the cursor will be in its initial state, because there // may be a numbering in front of the next paragraph. - SwCrsrShell::Push(); + SwCursorShell::Push(); - if ( SwCrsrShell::Right(1, CRSR_SKIP_CHARS) ) + if ( SwCursorShell::Right(1, CRSR_SKIP_CHARS) ) { - if (IsCrsrInTable() || (pWasInTableNd != IsCrsrInTable())) + if (IsCursorInTable() || (pWasInTableNd != IsCursorInTable())) { /** #108049# Save the startnode of the current cell. May be different to pSNdOld as we have moved. */ - const SwStartNode * pSNdNew = GetSwCrsr() + const SwStartNode * pSNdNew = GetSwCursor() ->GetNode().FindTableBoxStartNode(); /** #108049# Only move instead of deleting if we have moved to a different cell */ if (pSNdOld != pSNdNew) { - SwCrsrShell::Pop(); + SwCursorShell::Pop(); break; } } } // restore cursor - SwCrsrShell::Pop( false ); + SwCursorShell::Pop( false ); } } OpenMark(); - SwCrsrShell::Right(1,CRSR_SKIP_CELLS); + SwCursorShell::Right(1,CRSR_SKIP_CELLS); nRet = Delete(); CloseMark( 0 != nRet ); break; @@ -354,12 +354,12 @@ long SwWrtShell::DelRight() DelSelectedObj(); // #108205# Set cursor to remembered position. - SetCrsr(&aTmpPt); + SetCursor(&aTmpPt); - LeaveSelFrmMode(); - UnSelectFrm(); - OSL_ENSURE( !IsFrmSelected(), - "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrm()> should unmark all objects" ); + LeaveSelFrameMode(); + UnSelectFrame(); + OSL_ENSURE( !IsFrameSelected(), + "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrame()> should unmark all objects" ); // leave draw mode, if necessary. { if (GetView().GetDrawFuncPtr()) @@ -374,7 +374,7 @@ long SwWrtShell::DelRight() } } - // <IsFrmSelected()> can't be true - see above. + // <IsFrameSelected()> can't be true - see above. { nSelection = GetSelectionType(); if ( nsSelectionType::SEL_FRM & nSelection || @@ -382,7 +382,7 @@ long SwWrtShell::DelRight() nsSelectionType::SEL_OLE & nSelection || nsSelectionType::SEL_DRW & nSelection ) { - EnterSelFrmMode(); + EnterSelFrameMode(); GotoNextFly(); } } @@ -454,12 +454,12 @@ long SwWrtShell::DelToEndOfSentence() { Push(); ClearMark(); - if (SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) + if (SwCursorShell::Right(1,CRSR_SKIP_CHARS)) { SetMark(); if (!IsEndPara()) // can only be at the end if it's empty { // for an empty paragraph this would actually select the _next_ - SwCrsrShell::MovePara(fnParaCurr, fnParaEnd); + SwCursorShell::MovePara(fnParaCurr, fnParaEnd); } if (!IsEndOfDoc()) // do not delete last paragraph in body text { diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index 0ab3213a2f99..904c76697f20 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -38,18 +38,18 @@ const long nReadOnlyScrollOfst = 10; -class ShellMoveCrsr +class ShellMoveCursor { SwWrtShell* pSh; bool bAct; public: - inline ShellMoveCrsr( SwWrtShell* pWrtSh, bool bSel ) + inline ShellMoveCursor( SwWrtShell* pWrtSh, bool bSel ) { - bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(nullptr,false) & FrmTypeFlags::FLY_ANY); - ( pSh = pWrtSh )->MoveCrsr( bSel ); + bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrameType(nullptr,false) & FrameTypeFlags::FLY_ANY); + ( pSh = pWrtSh )->MoveCursor( bSel ); pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK); } - inline ~ShellMoveCrsr() + inline ~ShellMoveCursor() { if( bAct ) { @@ -61,7 +61,7 @@ public: } }; -void SwWrtShell::MoveCrsr( bool bWithSelect ) +void SwWrtShell::MoveCursor( bool bWithSelect ) { ResetCursorStack(); if ( IsGCAttr() ) @@ -83,20 +83,20 @@ bool SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, bool bSelect ) bool bRet; if( bSelect ) { - SttCrsrMove(); - MoveCrsr( true ); + SttCursorMove(); + MoveCursor( true ); bRet = (this->*FnSimpleMove)(); - EndCrsrMove(); + EndCursorMove(); } else if( ( bRet = (this->*FnSimpleMove)() ) ) - MoveCrsr(); + MoveCursor(); return bRet; } bool SwWrtShell::Left( sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly()) + if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly()) { Point aTmp( VisArea().Pos() ); aTmp.X() -= VisArea().Width() * nReadOnlyScrollOfst / 100; @@ -105,15 +105,15 @@ bool SwWrtShell::Left( sal_uInt16 nMode, bool bSelect, } else { - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::Left( nCount, nMode, bVisual ); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::Left( nCount, nMode, bVisual ); } } bool SwWrtShell::Right( sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly() ) + if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly() ) { Point aTmp( VisArea().Pos() ); aTmp.X() += VisArea().Width() * nReadOnlyScrollOfst / 100; @@ -123,14 +123,14 @@ bool SwWrtShell::Right( sal_uInt16 nMode, bool bSelect, } else { - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::Right( nCount, nMode, bVisual ); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::Right( nCount, nMode, bVisual ); } } bool SwWrtShell::Up( bool bSelect, sal_uInt16 nCount, bool bBasicCall ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly()) + if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly()) { Point aTmp( VisArea().Pos() ); aTmp.Y() -= VisArea().Height() * nReadOnlyScrollOfst / 100; @@ -138,13 +138,13 @@ bool SwWrtShell::Up( bool bSelect, sal_uInt16 nCount, bool bBasicCall ) return true; } - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::Up( nCount ); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::Up( nCount ); } bool SwWrtShell::Down( bool bSelect, sal_uInt16 nCount, bool bBasicCall ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly()) + if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly()) { Point aTmp( VisArea().Pos() ); aTmp.Y() += VisArea().Height() * nReadOnlyScrollOfst / 100; @@ -153,13 +153,13 @@ bool SwWrtShell::Down( bool bSelect, sal_uInt16 nCount, bool bBasicCall ) return true; } - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::Down( nCount ); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::Down( nCount ); } bool SwWrtShell::LeftMargin( bool bSelect, bool bBasicCall ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() ) + if ( !bSelect && !bBasicCall && IsCursorReadonly() ) { Point aTmp( VisArea().Pos() ); aTmp.X() = DOCUMENTBORDER; @@ -168,14 +168,14 @@ bool SwWrtShell::LeftMargin( bool bSelect, bool bBasicCall ) } else { - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::LeftMargin(); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::LeftMargin(); } } bool SwWrtShell::RightMargin( bool bSelect, bool bBasicCall ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() ) + if ( !bSelect && !bBasicCall && IsCursorReadonly() ) { Point aTmp( VisArea().Pos() ); aTmp.X() = GetDocSize().Width() - VisArea().Width() + DOCUMENTBORDER; @@ -186,15 +186,15 @@ bool SwWrtShell::RightMargin( bool bSelect, bool bBasicCall ) } else { - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::RightMargin(bBasicCall); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::RightMargin(bBasicCall); } } bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable, bool bSelect, bool bDontMoveRegion ) { - if ( IsCrsrInTable() ) + if ( IsCursorInTable() ) { const bool bBoxSelection = HasBoxSelection(); if( !m_bBlockMode ) @@ -237,15 +237,15 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable, else SttSelect(); } - const FrmTypeFlags nFrmType = GetFrmType(nullptr,false); - if ( FrmTypeFlags::FLY_ANY & nFrmType ) + const FrameTypeFlags nFrameType = GetFrameType(nullptr,false); + if ( FrameTypeFlags::FLY_ANY & nFrameType ) { if( MoveSection( fnSectionCurr, fnSectionStart ) ) return true; - else if ( FrmTypeFlags::FLY_FREE & nFrmType || bDontMoveRegion ) + else if ( FrameTypeFlags::FLY_FREE & nFrameType || bDontMoveRegion ) return false; } - if(( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE ) & nFrmType ) + if(( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE ) & nFrameType ) { if ( MoveSection( fnSectionCurr, fnSectionStart ) ) return true; @@ -253,8 +253,8 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable, return true; } // Regions ??? - return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionStart ) || - SwCrsrShell::SttEndDoc(true); + return SwCursorShell::MoveRegion( fnRegionCurrAndSkip, fnRegionStart ) || + SwCursorShell::SttEndDoc(true); } bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) @@ -262,7 +262,7 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) if ( pMoveTable && *pMoveTable ) return MoveTable( fnTableCurr, fnTableEnd ); - if ( IsCrsrInTable() ) + if ( IsCursorInTable() ) { if ( MoveSection( fnSectionCurr, fnSectionEnd ) || MoveTable( fnTableCurr, fnTableEnd ) ) @@ -270,15 +270,15 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) } else { - const FrmTypeFlags nFrmType = GetFrmType(nullptr,false); - if ( FrmTypeFlags::FLY_ANY & nFrmType ) + const FrameTypeFlags nFrameType = GetFrameType(nullptr,false); + if ( FrameTypeFlags::FLY_ANY & nFrameType ) { if ( MoveSection( fnSectionCurr, fnSectionEnd ) ) return true; - else if ( FrmTypeFlags::FLY_FREE & nFrmType ) + else if ( FrameTypeFlags::FLY_FREE & nFrameType ) return false; } - if(( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE ) & nFrmType ) + if(( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE ) & nFrameType ) { if ( MoveSection( fnSectionCurr, fnSectionEnd) ) return true; @@ -287,67 +287,67 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) } } // Regions ??? - return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionEnd ) || - SwCrsrShell::SttEndDoc(false); + return SwCursorShell::MoveRegion( fnRegionCurrAndSkip, fnRegionEnd ) || + SwCursorShell::SttEndDoc(false); } bool SwWrtShell::SttDoc( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return GoStart(false, nullptr, bSelect ); } bool SwWrtShell::EndDoc( bool bSelect) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return GoEnd(); } bool SwWrtShell::SttNxtPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPageNext, fnPageStart ); } bool SwWrtShell::SttPrvPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPagePrev, fnPageStart ); } bool SwWrtShell::EndNxtPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPageNext, fnPageEnd ); } bool SwWrtShell::EndPrvPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPagePrev, fnPageEnd ); } bool SwWrtShell::SttPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPageCurr, fnPageStart ); } bool SwWrtShell::EndPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPageCurr, fnPageEnd ); } bool SwWrtShell::SttPara( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePara( fnParaCurr, fnParaStart ); } bool SwWrtShell::EndPara( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePara(fnParaCurr,fnParaEnd); } @@ -357,41 +357,41 @@ bool SwWrtShell::EndPara( bool bSelect ) bool SwWrtShell::StartOfColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnCurr, fnColumnStart); } bool SwWrtShell::EndOfColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnCurr, fnColumnEnd); } bool SwWrtShell::StartOfNextColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn( fnColumnNext, fnColumnStart); } bool SwWrtShell::EndOfNextColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnNext, fnColumnEnd); } bool SwWrtShell::StartOfPrevColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnPrev, fnColumnStart); } bool SwWrtShell::EndOfPrevColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnPrev, fnColumnEnd); } -bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) +bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect) { bool bDiff = false; SwRect aOldRect( GetCharRect() ), aTmpArea( VisArea() ); @@ -402,8 +402,8 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) { Point aPt( aOldRect.Center() ); - if( !IsCrsrVisible() ) - // set CrsrPos to top-/bottom left pos. So the pagescroll is not + if( !IsCursorVisible() ) + // set CursorPos to top-/bottom left pos. So the pagescroll is not // be dependent on the current cursor, but on the visarea. aPt.Y() = aTmpArea.Top() + aTmpArea.Height() / 2; @@ -413,9 +413,9 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) m_bDestOnStack = true; } - // If we had a frame selection, it must be removed after the m_fnSetCrsr + // If we had a frame selection, it must be removed after the m_fnSetCursor // and we have to remember the position on the stack to return to it later. - bool bIsFrmSel = false; + bool bIsFrameSel = false; //Target position is now within the viewable region --> //Place the cursor at the target position; remember that no target @@ -429,14 +429,14 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) else EndSelect(); - bIsFrmSel = IsFrmSelected(); + bIsFrameSel = IsFrameSelected(); bool bIsObjSel = 0 != IsObjSelected(); // unselect frame - if( bIsFrmSel || bIsObjSel ) + if( bIsFrameSel || bIsObjSel ) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); if ( bIsObjSel ) { GetView().SetDrawFuncPtr( nullptr ); @@ -446,11 +446,11 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) CallChgLnk(); } - (this->*m_fnSetCrsr)( &m_aDest, true ); + (this->*m_fnSetCursor)( &m_aDest, true ); bDiff = aOldRect != GetCharRect(); - if( bIsFrmSel ) + if( bIsFrameSel ) { // In frames take only the upper corner // so that it can be re-selected. @@ -463,36 +463,36 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) // Position into the stack; bDiff indicates if there is a // difference between the old and the new cursor position. - m_pCrsrStack = new CrsrStack( bDiff, bIsFrmSel, aOldRect.Center(), - lOffset, m_pCrsrStack ); + m_pCursorStack = new CursorStack( bDiff, bIsFrameSel, aOldRect.Center(), + lOffset, m_pCursorStack ); return !m_bDestOnStack && bDiff; } -bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect) +bool SwWrtShell::PopCursor(bool bUpdate, bool bSelect) { - if( nullptr == m_pCrsrStack) + if( nullptr == m_pCursorStack) return false; - const bool bValidPos = m_pCrsrStack->bValidCurPos; + const bool bValidPos = m_pCursorStack->bValidCurPos; if( bUpdate && bValidPos ) { // If a predecessor is on the stack, // use the flag for a valid position. SwRect aTmpArea(VisArea()); - aTmpArea.Pos().Y() -= m_pCrsrStack->lOffset; - if( aTmpArea.IsInside( m_pCrsrStack->aDocPos ) ) + aTmpArea.Pos().Y() -= m_pCursorStack->lOffset; + if( aTmpArea.IsInside( m_pCursorStack->aDocPos ) ) { if( bSelect ) SttSelect(); else EndSelect(); - (this->*m_fnSetCrsr)(&m_pCrsrStack->aDocPos, !m_pCrsrStack->bIsFrmSel); - if( m_pCrsrStack->bIsFrmSel && IsObjSelectable(m_pCrsrStack->aDocPos)) + (this->*m_fnSetCursor)(&m_pCursorStack->aDocPos, !m_pCursorStack->bIsFrameSel); + if( m_pCursorStack->bIsFrameSel && IsObjSelectable(m_pCursorStack->aDocPos)) { - HideCrsr(); - SelectObj( m_pCrsrStack->aDocPos ); - EnterSelFrmMode( &m_pCrsrStack->aDocPos ); + HideCursor(); + SelectObj( m_pCursorStack->aDocPos ); + EnterSelFrameMode( &m_pCursorStack->aDocPos ); } } // If a discrepancy between the visible range and the @@ -504,10 +504,10 @@ bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect) return false; } } - CrsrStack *pTmp = m_pCrsrStack; - m_pCrsrStack = m_pCrsrStack->pNext; + CursorStack *pTmp = m_pCursorStack; + m_pCursorStack = m_pCursorStack->pNext; delete pTmp; - if( nullptr == m_pCrsrStack ) + if( nullptr == m_pCursorStack ) { m_ePageMove = MV_NO; m_bDestOnStack = false; @@ -520,11 +520,11 @@ bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect) void SwWrtShell::_ResetCursorStack() { - while(m_pCrsrStack) + while(m_pCursorStack) { - CrsrStack* const pTmp = m_pCrsrStack->pNext; - delete m_pCrsrStack; - m_pCrsrStack = pTmp; + CursorStack* const pTmp = m_pCursorStack->pNext; + delete m_pCursorStack; + m_pCursorStack = pTmp; } m_ePageMove = MV_NO; m_bDestOnStack = false; @@ -538,7 +538,7 @@ void SwWrtShell::_ResetCursorStack() transpose cursor */ -bool SwWrtShell::PageCrsr(SwTwips lOffset, bool bSelect) +bool SwWrtShell::PageCursor(SwTwips lOffset, bool bSelect) { // Do nothing if an offset of 0 was indicated if(!lOffset) return false; @@ -548,29 +548,29 @@ bool SwWrtShell::PageCrsr(SwTwips lOffset, bool bSelect) // Start-/EndActionParentheses. // Because only SwViewShell::EndAction() is called at the end, // no updating of the display of the cursor position takes place. - // The CrsrShell-Actionparentheses cannot be used, because it + // The CursorShell-Actionparentheses cannot be used, because it // always leads to displaying the cursor, thus also, // if after the scroll scrolled in a region without a valid postition. // SwViewShell::StartAction(); PageMove eDir = lOffset > 0? MV_PAGE_DOWN: MV_PAGE_UP; // Change of direction and stack present - if( eDir != m_ePageMove && m_ePageMove != MV_NO && PopCrsr( true, bSelect )) + if( eDir != m_ePageMove && m_ePageMove != MV_NO && PopCursor( true, bSelect )) return true; - const bool bRet = PushCrsr(lOffset, bSelect); + const bool bRet = PushCursor(lOffset, bSelect); m_ePageMove = eDir; return bRet; } bool SwWrtShell::GotoPage(sal_uInt16 nPage, bool bRecord) { - ShellMoveCrsr aTmp( this, false); - if( SwCrsrShell::GotoPage(nPage) && bRecord) + ShellMoveCursor aTmp( this, false); + if( SwCursorShell::GotoPage(nPage) && bRecord) { - if(IsSelFrmMode()) + if(IsSelFrameMode()) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } return true; } @@ -579,9 +579,9 @@ bool SwWrtShell::GotoPage(sal_uInt16 nPage, bool bRecord) bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, bool bSelect, bool bStart ) { - ShellMoveCrsr aTmp( this, bSelect ); - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoMark( pMark, bStart ); + ShellMoveCursor aTmp( this, bSelect ); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoMark( pMark, bStart ); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -589,7 +589,7 @@ bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, bool bSelect, b bool SwWrtShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrame ) { - SwPosition aPos = *GetCrsr()->GetPoint(); + SwPosition aPos = *GetCursor()->GetPoint(); bool bRet = SwFEShell::GotoFly(rName, eType, bSelFrame); if (bRet) m_aNavigationMgr.addEntry(aPos); @@ -598,8 +598,8 @@ bool SwWrtShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFram bool SwWrtShell::GotoINetAttr( const SwTextINetFormat& rAttr ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoINetAttr(rAttr); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoINetAttr(rAttr); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -608,13 +608,13 @@ bool SwWrtShell::GotoINetAttr( const SwTextINetFormat& rAttr ) void SwWrtShell::GotoOutline( sal_uInt16 nIdx ) { addCurrentPosition(); - SwCrsrShell::GotoOutline (nIdx); + SwCursorShell::GotoOutline (nIdx); } bool SwWrtShell::GotoOutline( const OUString& rName ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoOutline (rName); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoOutline (rName); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -622,8 +622,8 @@ bool SwWrtShell::GotoOutline( const OUString& rName ) bool SwWrtShell::GotoRegion( const OUString& rName ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoRegion (rName); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoRegion (rName); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -632,8 +632,8 @@ bool SwWrtShell::GotoRegion( const OUString& rName ) bool SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoRefMark(rRefMark, nSubType, nSeqNo); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoRefMark(rRefMark, nSubType, nSeqNo); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -641,8 +641,8 @@ bool SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, bool SwWrtShell::GotoNextTOXBase( const OUString* pName ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoNextTOXBase(pName); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoNextTOXBase(pName); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -650,24 +650,24 @@ bool SwWrtShell::GotoNextTOXBase( const OUString* pName ) bool SwWrtShell::GotoTable( const OUString& rName ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoTable(rName); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoTable(rName); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; } bool SwWrtShell::GotoFormatField( const SwFormatField& rField ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoFormatField(rField); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoFormatField(rField); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; } const SwRangeRedline* SwWrtShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - const SwRangeRedline *pRedline = SwCrsrShell::GotoRedline(nArrPos, bSelect); + SwPosition aPos = *GetCursor()->GetPoint(); + const SwRangeRedline *pRedline = SwCursorShell::GotoRedline(nArrPos, bSelect); if (pRedline) m_aNavigationMgr.addEntry(aPos); return pRedline; @@ -679,7 +679,7 @@ bool SwWrtShell::SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr ) { SwMvContext aMvContext(this); SttSelect(); - bRet = SwCrsrShell::SelectTextAttr( nWhich, false, pAttr ); + bRet = SwCursorShell::SelectTextAttr( nWhich, false, pAttr ); } EndSelect(); return bRet; diff --git a/sw/source/uibase/wrtsh/navmgr.cxx b/sw/source/uibase/wrtsh/navmgr.cxx index 1811532e2d50..13888fc5bcab 100644 --- a/sw/source/uibase/wrtsh/navmgr.cxx +++ b/sw/source/uibase/wrtsh/navmgr.cxx @@ -28,7 +28,7 @@ void SwNavigationMgr::GotoSwPosition(const SwPosition &rPos) { // cursor consists of two SwPositions: Point and Mark. // Such a pair is called a PaM. SwPaM is derived from SwRing. // The Ring contains the single regions of a multi-selection. - SwPaM* pPaM = m_rMyShell.GetCrsr(); + SwPaM* pPaM = m_rMyShell.GetCursor(); if(pPaM->HasMark()) pPaM->DeleteMark(); // If there was a selection, get rid of it @@ -77,7 +77,7 @@ void SwNavigationMgr::goBack() { if (backEnabled()) { /* Trying to get the current cursor */ - SwPaM* pPaM = m_rMyShell.GetCrsr(); + SwPaM* pPaM = m_rMyShell.GetCursor(); if (!pPaM) { return; } @@ -162,14 +162,14 @@ bool SwNavigationMgr::addEntry(const SwPosition& rPos) { if (*m_entries.back()->GetPoint() != rPos) { - sw::UnoCursorPointer pCursor(m_rMyShell.GetDoc()->CreateUnoCrsr(rPos)); + sw::UnoCursorPointer pCursor(m_rMyShell.GetDoc()->CreateUnoCursor(rPos)); m_entries.push_back(pCursor); } bRet = true; } else { if ( (!m_entries.empty() && *m_entries.back()->GetPoint() != rPos) || m_entries.empty() ) { - sw::UnoCursorPointer pCursor(m_rMyShell.GetDoc()->CreateUnoCrsr(rPos)); + sw::UnoCursorPointer pCursor(m_rMyShell.GetDoc()->CreateUnoCursor(rPos)); m_entries.push_back(pCursor); bRet = true; } diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index d617c02ed977..805b075a05d4 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -76,7 +76,7 @@ bool SwWrtShell::SelWrd(const Point *pPt, bool ) { SwMvContext aMvContext(this); SttSelect(); - bRet = SwCrsrShell::SelectWord( pPt ); + bRet = SwCursorShell::SelectWord( pPt ); } EndSelect(); if( bRet ) @@ -93,9 +93,9 @@ void SwWrtShell::SelSentence(const Point *pPt, bool ) { SwMvContext aMvContext(this); ClearMark(); - SwCrsrShell::GoStartSentence(); + SwCursorShell::GoStartSentence(); SttSelect(); - SwCrsrShell::GoEndSentence(); + SwCursorShell::GoEndSentence(); } EndSelect(); if(pPt) @@ -109,9 +109,9 @@ void SwWrtShell::SelPara(const Point *pPt, bool ) { SwMvContext aMvContext(this); ClearMark(); - SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); + SwCursorShell::MovePara( fnParaCurr, fnParaStart ); SttSelect(); - SwCrsrShell::MovePara( fnParaCurr, fnParaEnd ); + SwCursorShell::MovePara( fnParaCurr, fnParaEnd ); } EndSelect(); if(pPt) @@ -131,21 +131,21 @@ long SwWrtShell::SelAll() bool bMoveTable = false; std::unique_ptr<SwPosition> pStartPos; std::unique_ptr<SwPosition> pEndPos; - SwShellCrsr* pTmpCrsr = nullptr; + SwShellCursor* pTmpCursor = nullptr; // Query these early, before we move the cursor. bool bHasWholeTabSelection = HasWholeTabSelection(); - bool bIsCursorInTable = IsCrsrInTable(); + bool bIsCursorInTable = IsCursorInTable(); if (!bHasWholeTabSelection) { - if ( IsSelection() && IsCrsrPtAtEnd() ) + if ( IsSelection() && IsCursorPtAtEnd() ) SwapPam(); - pTmpCrsr = getShellCrsr( false ); - if( pTmpCrsr ) + pTmpCursor = getShellCursor( false ); + if( pTmpCursor ) { - pStartPos.reset(new SwPosition( *pTmpCrsr->GetPoint() )); - pEndPos.reset(new SwPosition( *pTmpCrsr->GetMark() )); + pStartPos.reset(new SwPosition( *pTmpCursor->GetPoint() )); + pEndPos.reset(new SwPosition( *pTmpCursor->GetMark() )); } Push(); bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart); @@ -173,10 +173,10 @@ long SwWrtShell::SelAll() if (bNeedsExtendedSelectAll) { - // Disable table cursor to make sure getShellCrsr() returns m_pCurCrsr, not m_pTableCrsr. + // Disable table cursor to make sure getShellCursor() returns m_pCurrentCursor, not m_pTableCursor. if (IsTableMode()) - TableCrsrToCursor(); - // Do the extended select all on m_pCurCrsr. + TableCursorToCursor(); + // Do the extended select all on m_pCurrentCursor. ExtendedSelectAll(/*bFootnotes =*/ false); } @@ -188,18 +188,18 @@ long SwWrtShell::SelAll() if( pStartPos ) { - pTmpCrsr = getShellCrsr( false ); - if( pTmpCrsr ) + pTmpCursor = getShellCursor( false ); + if( pTmpCursor ) { // Some special handling for sections (e.g. TOC) at the beginning of the document body // to avoid the selection of the first section // if the last selection was behind the first section or // if the last selection was already the first section // In this both cases we select to the end of document - if( ( *pTmpCrsr->GetPoint() < *pEndPos || - ( *pStartPos == *pTmpCrsr->GetMark() && - *pEndPos == *pTmpCrsr->GetPoint() ) ) && !bNeedsExtendedSelectAll) - SwCrsrShell::SttEndDoc(false); + if( ( *pTmpCursor->GetPoint() < *pEndPos || + ( *pStartPos == *pTmpCursor->GetMark() && + *pEndPos == *pTmpCursor->GetPoint() ) ) && !bNeedsExtendedSelectAll) + SwCursorShell::SttEndDoc(false); } } } @@ -304,7 +304,7 @@ void SwWrtShell::PopMode() // eponymous methodes in the CursorShell, the second removes // all selections at first. -long SwWrtShell::SetCrsr(const Point *pPt, bool bTextOnly) +long SwWrtShell::SetCursor(const Point *pPt, bool bTextOnly) { // Remove a possibly present selection at the position // of the mouseclick @@ -313,17 +313,17 @@ long SwWrtShell::SetCrsr(const Point *pPt, bool bTextOnly) ClearMark(); } - return SwCrsrShell::SetCrsr(*pPt, bTextOnly); + return SwCursorShell::SetCursor(*pPt, bTextOnly); } -long SwWrtShell::SetCrsrKillSel(const Point *pPt, bool bTextOnly ) +long SwWrtShell::SetCursorKillSel(const Point *pPt, bool bTextOnly ) { SwActContext aActContext(this); ResetSelect(pPt,false); - return SwCrsrShell::SetCrsr(*pPt, bTextOnly); + return SwCursorShell::SetCursor(*pPt, bTextOnly); } -void SwWrtShell::UnSelectFrm() +void SwWrtShell::UnSelectFrame() { // Remove Frame selection with guaranteed invalid position Point aPt(LONG_MIN, LONG_MIN); @@ -335,10 +335,10 @@ void SwWrtShell::UnSelectFrm() long SwWrtShell::ResetSelect(const Point *,bool) { - if(IsSelFrmMode()) + if(IsSelFrameMode()) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } else { @@ -352,7 +352,7 @@ long SwWrtShell::ResetSelect(const Point *,bool) KillPams(); ClearMark(); m_fnKillSel = &SwWrtShell::Ignore; - m_fnSetCrsr = &SwWrtShell::SetCrsr; + m_fnSetCursor = &SwWrtShell::SetCursor; } // After canceling of all selections an update of Attr-Controls @@ -380,12 +380,12 @@ void SwWrtShell::SttSelect() SetMark(); if( m_bBlockMode ) { - SwShellCrsr* pTmp = getShellCrsr( true ); + SwShellCursor* pTmp = getShellCursor( true ); if( !pTmp->HasMark() ) pTmp->SetMark(); } m_fnKillSel = &SwWrtShell::Ignore; - m_fnSetCrsr = &SwWrtShell::SetCrsr; + m_fnSetCursor = &SwWrtShell::SetCursor; m_bInSelect = true; Invalidate(); SwTransferable::CreateSelection( *this ); @@ -405,7 +405,7 @@ void SwWrtShell::EndSelect() else { SttLeaveSelect(nullptr); - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; } } @@ -422,41 +422,41 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool ) // Bug 66823: actual crsr has in additional mode no selection? // Then destroy the actual an go to prev, this will be expand - if( !HasMark() && GoPrevCrsr() ) + if( !HasMark() && GoPrevCursor() ) { bool bHasMark = HasMark(); // thats wrong! - GoNextCrsr(); + GoNextCursor(); if( bHasMark ) { - DestroyCrsr(); - GoPrevCrsr(); + DestroyCursor(); + GoPrevCursor(); } } // check the direction of the selection with the new point - bool bRet = false, bMoveCrsr = true, bToTop = false; - SwCrsrShell::SelectWord( &m_aStart ); // select the startword - SwCrsrShell::Push(); // save the cursor - SwCrsrShell::SetCrsr( *pPt ); // and check the direction + bool bRet = false, bMoveCursor = true, bToTop = false; + SwCursorShell::SelectWord( &m_aStart ); // select the startword + SwCursorShell::Push(); // save the cursor + SwCursorShell::SetCursor( *pPt ); // and check the direction - switch( SwCrsrShell::CompareCursor( StackMkCurrPt )) + switch( SwCursorShell::CompareCursor( StackMkCurrPt )) { case -1: bToTop = false; break; case 1: bToTop = true; break; - default: bMoveCrsr = false; break; + default: bMoveCursor = false; break; } - SwCrsrShell::Pop( false ); // restore the saved cursor + SwCursorShell::Pop( false ); // restore the saved cursor - if( bMoveCrsr ) + if( bMoveCursor ) { // select to Top but cursor select to Bottom? or // select to Bottom but cursor select to Top? --> swap the cursor if( bToTop ) SwapPam(); - SwCrsrShell::Push(); // save cur cursor - if( SwCrsrShell::SelectWord( pPt )) // select the current word + SwCursorShell::Push(); // save cur cursor + if( SwCursorShell::SelectWord( pPt )) // select the current word { if( bToTop ) SwapPam(); @@ -465,7 +465,7 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool ) } else { - SwCrsrShell::Pop( false ); + SwCursorShell::Pop( false ); if( bToTop ) SwapPam(); } @@ -478,25 +478,25 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool ) long SwWrtShell::ExtSelLn(const Point *pPt, bool ) { SwMvContext aMvContext(this); - SwCrsrShell::SetCrsr(*pPt); + SwCursorShell::SetCursor(*pPt); if( IsTableMode() ) return 1; // Bug 66823: actual crsr has in additional mode no selection? // Then destroy the actual an go to prev, this will be expand - if( !HasMark() && GoPrevCrsr() ) + if( !HasMark() && GoPrevCursor() ) { bool bHasMark = HasMark(); // thats wrong! - GoNextCrsr(); + GoNextCursor(); if( bHasMark ) { - DestroyCrsr(); - GoPrevCrsr(); + DestroyCursor(); + GoPrevCursor(); } } // if applicable fit the selection to the "Mark" - bool bToTop = !IsCrsrPtAtEnd(); + bool bToTop = !IsCursorPtAtEnd(); SwapPam(); // The "Mark" has to be at the end or the beginning of the line. @@ -505,15 +505,15 @@ long SwWrtShell::ExtSelLn(const Point *pPt, bool ) if( bToTop ) { if( !IsEndPara() ) - SwCrsrShell::Right(1,CRSR_SKIP_CHARS); - SwCrsrShell::GoEndSentence(); + SwCursorShell::Right(1,CRSR_SKIP_CHARS); + SwCursorShell::GoEndSentence(); } else - SwCrsrShell::GoStartSentence(); + SwCursorShell::GoStartSentence(); } SwapPam(); - return (bToTop ? SwCrsrShell::GoStartSentence() : SwCrsrShell::GoEndSentence()) ? 1 : 0; + return (bToTop ? SwCursorShell::GoStartSentence() : SwCursorShell::GoEndSentence()) ? 1 : 0; } // Back into the standard mode: no mode, no selections. @@ -527,10 +527,10 @@ void SwWrtShell::EnterStdMode() m_bBlockMode = false; m_bExtMode = false; m_bInSelect = false; - if(IsSelFrmMode()) + if(IsSelFrameMode()) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } else { @@ -543,7 +543,7 @@ void SwWrtShell::EnterStdMode() if( !IsRetainSelection() ) KillPams(); ClearMark(); - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; } } @@ -578,7 +578,7 @@ void SwWrtShell::LeaveExtMode() long SwWrtShell::SttLeaveSelect(const Point *, bool ) { - if(SwCrsrShell::HasSelection() && !IsSelTableCells() && m_bClearMark) { + if(SwCursorShell::HasSelection() && !IsSelTableCells() && m_bClearMark) { return 0; } ClearMark(); @@ -590,8 +590,8 @@ long SwWrtShell::SttLeaveSelect(const Point *, bool ) long SwWrtShell::AddLeaveSelect(const Point *, bool ) { if(IsTableMode()) LeaveAddMode(); - else if(SwCrsrShell::HasSelection()) - CreateCrsr(); + else if(SwCursorShell::HasSelection()) + CreateCursor(); return 1; } @@ -603,19 +603,19 @@ void SwWrtShell::EnterAddMode() if(m_bBlockMode) LeaveBlockMode(); m_fnKillSel = &SwWrtShell::Ignore; - m_fnSetCrsr = &SwWrtShell::SetCrsr; + m_fnSetCursor = &SwWrtShell::SetCursor; m_bAddMode = true; m_bBlockMode = false; m_bExtMode = false; - if(SwCrsrShell::HasSelection()) - CreateCrsr(); + if(SwCursorShell::HasSelection()) + CreateCursor(); Invalidate(); } void SwWrtShell::LeaveAddMode() { m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_bAddMode = false; Invalidate(); } @@ -627,14 +627,14 @@ void SwWrtShell::EnterBlockMode() m_bBlockMode = false; EnterStdMode(); m_bBlockMode = true; - CrsrToBlockCrsr(); + CursorToBlockCursor(); Invalidate(); } void SwWrtShell::LeaveBlockMode() { m_bBlockMode = false; - BlockCrsrToCrsr(); + BlockCursorToCursor(); EndSelect(); Invalidate(); } @@ -644,7 +644,7 @@ void SwWrtShell::LeaveBlockMode() void SwWrtShell::SetInsMode( bool bOn ) { m_bIns = bOn; - SwCrsrShell::SetOverwriteCrsr( !m_bIns ); + SwCursorShell::SetOverwriteCursor( !m_bIns ); const SfxBoolItem aTmp( SID_ATTR_INSERT, m_bIns ); GetView().GetViewFrame()->GetBindings().SetState( aTmp ); StartAction(); @@ -661,7 +661,7 @@ void SwWrtShell::SetRedlineModeAndCheckInsMode( sal_uInt16 eMode ) // Edit frame -long SwWrtShell::BeginFrmDrag(const Point *pPt, bool bIsShift) +long SwWrtShell::BeginFrameDrag(const Point *pPt, bool bIsShift) { m_fnDrag = &SwFEShell::Drag; if(bStartDrag) @@ -674,7 +674,7 @@ long SwWrtShell::BeginFrmDrag(const Point *pPt, bool bIsShift) return 1; } -void SwWrtShell::EnterSelFrmMode(const Point *pPos) +void SwWrtShell::EnterSelFrameMode(const Point *pPos) { if(pPos) { @@ -683,23 +683,23 @@ void SwWrtShell::EnterSelFrmMode(const Point *pPos) bStartDrag = true; } m_bLayoutMode = true; - HideCrsr(); + HideCursor(); // equal call of BeginDrag in the SwFEShell - m_fnDrag = &SwWrtShell::BeginFrmDrag; - m_fnEndDrag = &SwWrtShell::UpdateLayoutFrm; - SwBaseShell::SetFrmMode( FLY_DRAG_START, this ); + m_fnDrag = &SwWrtShell::BeginFrameDrag; + m_fnEndDrag = &SwWrtShell::UpdateLayoutFrame; + SwBaseShell::SetFrameMode( FLY_DRAG_START, this ); Invalidate(); } -void SwWrtShell::LeaveSelFrmMode() +void SwWrtShell::LeaveSelFrameMode() { m_fnDrag = &SwWrtShell::BeginDrag; m_fnEndDrag = &SwWrtShell::DefaultEndDrag; m_bLayoutMode = false; bStartDrag = false; Edit(); - SwBaseShell::SetFrmMode( FLY_DRAG_END, this ); + SwBaseShell::SetFrameMode( FLY_DRAG_END, this ); Invalidate(); } @@ -714,18 +714,18 @@ IMPL_LINK_TYPED( SwWrtShell, ExecFlyMac, const SwFlyFrameFormat*, pFlyFormat, vo if(rFormatMac.HasMacro(SW_EVENT_OBJECT_SELECT)) { const SvxMacro &rMac = rFormatMac.GetMacro(SW_EVENT_OBJECT_SELECT); - if( IsFrmSelected() ) + if( IsFrameSelected() ) m_bLayoutMode = true; CallChgLnk(); ExecMacro( rMac ); } } -long SwWrtShell::UpdateLayoutFrm(const Point *pPt, bool ) +long SwWrtShell::UpdateLayoutFrame(const Point *pPt, bool ) { // still a dummy SwFEShell::EndDrag( pPt, false ); - m_fnDrag = &SwWrtShell::BeginFrmDrag; + m_fnDrag = &SwWrtShell::BeginFrameDrag; return 1; } @@ -759,17 +759,17 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, bool ) if(m_bSelWrd) { m_bInSelect = true; - if( !IsCrsrPtAtEnd() ) + if( !IsCursorPtAtEnd() ) SwapPam(); m_fnDrag = &SwWrtShell::ExtSelWrd; - m_fnSetCrsr = &SwWrtShell::Ignore; + m_fnSetCursor = &SwWrtShell::Ignore; } else if(m_bSelLn) { m_bInSelect = true; m_fnDrag = &SwWrtShell::ExtSelLn; - m_fnSetCrsr = &SwWrtShell::Ignore; + m_fnSetCursor = &SwWrtShell::Ignore; } else { @@ -807,7 +807,7 @@ bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR SttSelect(); if(SelTableRowCol( rPt, pEnd, bRowDrag )) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; return true; } @@ -820,7 +820,7 @@ bool SwWrtShell::SelectTableRow() { if ( SelTableRow() ) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; return true; } @@ -831,7 +831,7 @@ bool SwWrtShell::SelectTableCol() { if ( SelTableCol() ) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; return true; } @@ -842,7 +842,7 @@ bool SwWrtShell::SelectTableCell() { if ( SelTableBox() ) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; return true; } @@ -893,11 +893,11 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) if(bCut) { Push(); - if(IsCrsrPtAtEnd()) + if(IsCursorPtAtEnd()) SwapPam(); ClearMark(); SetMark(); - SwCrsrShell::Left(1,CRSR_SKIP_CHARS); + SwCursorShell::Left(1,CRSR_SKIP_CHARS); SwFEShell::Delete(); Pop( false ); } @@ -908,10 +908,10 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) // delete the space behind if(bCut) { Push(); - if(!IsCrsrPtAtEnd()) SwapPam(); + if(!IsCursorPtAtEnd()) SwapPam(); ClearMark(); SetMark(); - SwCrsrShell::Right(1,CRSR_SKIP_CHARS); + SwCursorShell::Right(1,CRSR_SKIP_CHARS); SwFEShell::Delete(); Pop( false ); } @@ -924,7 +924,7 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) bool SwWrtShell::SelectNextPrevHyperlink( bool bNext ) { StartAction(); - bool bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext ); + bool bRet = SwCursorShell::SelectNxtPrvHyperlink( bNext ); if( !bRet ) { // will we have this feature? @@ -933,32 +933,32 @@ bool SwWrtShell::SelectNextPrevHyperlink( bool bNext ) SttEndDoc(true); else SttEndDoc(false); - bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext ); + bRet = SwCursorShell::SelectNxtPrvHyperlink( bNext ); } EndAction(); bool bCreateXSelection = false; - const bool bFrmSelected = IsFrmSelected() || IsObjSelected(); + const bool bFrameSelected = IsFrameSelected() || IsObjSelected(); if( IsSelection() ) { - if ( bFrmSelected ) - UnSelectFrm(); + if ( bFrameSelected ) + UnSelectFrame(); // Set the function pointer for the canceling of the selection // set at cursor m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; bCreateXSelection = true; } - else if( bFrmSelected ) + else if( bFrameSelected ) { - EnterSelFrmMode(); + EnterSelFrameMode(); bCreateXSelection = true; } else if( (CNT_GRF | CNT_OLE ) & GetCntType() ) { SelectObj( GetCharRect().Pos() ); - EnterSelFrmMode(); + EnterSelFrameMode(); bCreateXSelection = true; } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 5bab7f7ae218..b98305fe2894 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -112,12 +112,12 @@ using namespace com::sun::star; #define COMMON_INI_LIST \ m_fnDrag(&SwWrtShell::BeginDrag),\ - m_fnSetCrsr(&SwWrtShell::SetCrsr),\ + m_fnSetCursor(&SwWrtShell::SetCursor),\ m_fnEndDrag(&SwWrtShell::DefaultEndDrag),\ m_fnKillSel(&SwWrtShell::Ignore),\ m_pModeStack(nullptr), \ m_ePageMove(MV_NO),\ - m_pCrsrStack(nullptr), \ + m_pCursorStack(nullptr), \ m_rView(rShell),\ m_aNavigationMgr(*this), \ m_bDestOnStack(false) @@ -146,17 +146,17 @@ static SvxAutoCorrect* lcl_IsAutoCorr() return pACorr; } -void SwWrtShell::NoEdit(bool bHideCrsr) +void SwWrtShell::NoEdit(bool bHideCursor) { - if(bHideCrsr) - HideCrsr(); + if(bHideCursor) + HideCursor(); } void SwWrtShell::Edit() { if (CanInsert()) { - ShowCrsr(); + ShowCursor(); } } @@ -209,7 +209,7 @@ void SwWrtShell::Insert( const OUString &rStr ) SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, GetCrsrDescr()); + aRewriter.AddRule(UndoArg1, GetCursorDescr()); aRewriter.AddRule(UndoArg2, OUString(SW_RES(STR_YIELDS))); { OUString aTmpStr; @@ -239,7 +239,7 @@ void SwWrtShell::Insert( const OUString &rStr ) // of the current frame can not be obtained. void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, - const Graphic &rGrf, SwFlyFrmAttrMgr *pFrmMgr, + const Graphic &rGrf, SwFlyFrameAttrMgr *pFrameMgr, bool bRule ) { ResetCursorStack(); @@ -259,41 +259,41 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, // if at the end of a non-empty paragraph. //For i120928,avoid to split node - EnterSelFrmMode(); + EnterSelFrameMode(); bool bSetGrfSize = true; bool bOwnMgr = false; - if ( !pFrmMgr ) + if ( !pFrameMgr ) { bOwnMgr = true; - pFrmMgr = new SwFlyFrmAttrMgr( true, this, FRMMGR_TYPE_GRF ); + pFrameMgr = new SwFlyFrameAttrMgr( true, this, FRMMGR_TYPE_GRF ); // CAUTION // GetAttrSet makes an adjustment - // While pasting is a SwFrmSize present + // While pasting is a SwFrameSize present // because of the DEF-Framesize // These must be removed explicitly for the optimal size. - pFrmMgr->DelAttr(RES_FRM_SIZE); + pFrameMgr->DelAttr(RES_FRM_SIZE); } else { - Size aSz( pFrmMgr->GetSize() ); + Size aSz( pFrameMgr->GetSize() ); if ( !aSz.Width() || !aSz.Height() ) { aSz.Width() = aSz.Height() = 567; - pFrmMgr->SetSize( aSz ); + pFrameMgr->SetSize( aSz ); } else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT ) bSetGrfSize = false; - pFrmMgr->SetHeightSizeType(ATT_FIX_SIZE); + pFrameMgr->SetHeightSizeType(ATT_FIX_SIZE); } // Insert the graphic - SwFEShell::Insert(rPath, rFilter, &rGrf, &pFrmMgr->GetAttrSet()); + SwFEShell::Insert(rPath, rFilter, &rGrf, &pFrameMgr->GetAttrSet()); if ( bOwnMgr ) - pFrmMgr->UpdateAttrMgr(); + pFrameMgr->UpdateAttrMgr(); if( bSetGrfSize && !bRule ) { @@ -302,8 +302,8 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, // Add the margin attributes to GrfSize, // because these counts at the margin additionally - aGrfSize.Width() += pFrmMgr->CalcWidthBorder(); - aGrfSize.Height()+= pFrmMgr->CalcHeightBorder(); + aGrfSize.Width() += pFrameMgr->CalcWidthBorder(); + aGrfSize.Height()+= pFrameMgr->CalcHeightBorder(); const BigInt aTempWidth( aGrfSize.Width() ); const BigInt aTempHeight( aGrfSize.Height()); @@ -320,11 +320,11 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, aGrfSize.Height() = aBound.Height(); aGrfSize.Width() = BigInt(aBound.Height()) * aTempWidth / aTempHeight; } - pFrmMgr->SetSize( aGrfSize ); - pFrmMgr->UpdateFlyFrm(); + pFrameMgr->SetSize( aGrfSize ); + pFrameMgr->UpdateFlyFrame(); } if ( bOwnMgr ) - delete pFrmMgr; + delete pFrameMgr; EndUndo(); EndAllAction(); @@ -492,13 +492,13 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame if ( !bStarMath ) SwFEShell::SplitNode( false, false ); - EnterSelFrmMode(); + EnterSelFrameMode(); - SwFlyFrmAttrMgr aFrmMgr( true, this, FRMMGR_TYPE_OLE ); - aFrmMgr.SetHeightSizeType(ATT_FIX_SIZE); + SwFlyFrameAttrMgr aFrameMgr( true, this, FRMMGR_TYPE_OLE ); + aFrameMgr.SetHeightSizeType(ATT_FIX_SIZE); SwRect aBound; - CalcBoundRect( aBound, aFrmMgr.GetAnchor() ); + CalcBoundRect( aBound, aFrameMgr.GetAnchor() ); //The Size should be suggested by the OLE server MapMode aMapMode( MAP_TWIP ); @@ -511,8 +511,8 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame aSz.Height() = aSz.Height() * aBound.Width() / aSz.Width(); aSz.Width() = aBound.Width(); } - aFrmMgr.SetSize( aSz ); - SwFlyFrameFormat *pFormat = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() ); + aFrameMgr.SetSize( aSz ); + SwFlyFrameFormat *pFormat = SwFEShell::InsertObject( xRef, &aFrameMgr.GetAttrSet() ); // --> #i972# if ( bStarMath && mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT ) ) @@ -614,8 +614,8 @@ void SwWrtShell::MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, const SwRect *pFlyPrtRect, - const SwRect *pFlyFrmRect, - const bool bNoTextFrmPrtAreaChanged ) + const SwRect *pFlyFrameRect, + const bool bNoTextFramePrtAreaChanged ) { // Setting the scale of the client. This arises from the difference // between the VisArea of the object and the ObjArea. @@ -713,7 +713,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, //|| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->GetMiscStatus() // --> OD #i117189# - refine condition for non-resizable objects // non-resizable objects need to be set the size back by this method - || ( bNoTextFrmPrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) ) + || ( bNoTextFramePrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) ) { pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); } @@ -789,7 +789,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( pFlyPrtRect ) { aArea = *pFlyPrtRect; - aArea += pFlyFrmRect->Pos(); + aArea += pFlyFrameRect->Pos(); } else { @@ -804,7 +804,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, OSL_ENSURE( pFlyFrameFormat, "Could not find fly frame." ); if ( pFlyFrameFormat ) { - const Point &rPoint = pFlyFrameFormat->GetLastFlyFrmPrtRectPos(); + const Point &rPoint = pFlyFrameFormat->GetLastFlyFramePrtRectPos(); SwRect aRect( pFlyPrtRect ? *pFlyPrtRect : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() )); aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct. @@ -823,12 +823,12 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, } void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt, - const SwRect &rFrm ) + const SwRect &rFrame ) { SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin()); if ( !pCli ) new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); - CalcAndSetScale( xObj, &rPrt, &rFrm ); + CalcAndSetScale( xObj, &rPrt, &rFrame ); } // Insert hard page break; @@ -841,13 +841,13 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio SwActContext aActContext(this); StartUndo(UNDO_UI_INSERT_PAGE_BREAK); - if ( !IsCrsrInTable() ) + if ( !IsCursorInTable() ) { if(HasSelection()) DelRight(); SwFEShell::SplitNode(); // delete the numbered attribute of the last line if the last line is empty - GetDoc()->ClearLineNumAttrs( *GetCrsr()->GetPoint() ); + GetDoc()->ClearLineNumAttrs( *GetCursor()->GetPoint() ); } const SwPageDesc *pDesc = pPageDesc @@ -895,7 +895,7 @@ void SwWrtShell::InsertColumnBreak() { StartUndo(UNDO_UI_INSERT_COLUMN_BREAK); - if ( !IsCrsrInTable() ) + if ( !IsCursorInTable() ) { if(HasSelection()) DelRight(); @@ -918,11 +918,11 @@ void SwWrtShell::InsertFootnote(const OUString &rStr, bool bEndNote, bool bEdit if(HasSelection()) { //collapse cursor to the end - if(!IsCrsrPtAtEnd()) + if(!IsCursorPtAtEnd()) SwapPam(); ClearMark(); } - SwPosition aPos = *GetCrsr()->GetPoint(); + SwPosition aPos = *GetCursor()->GetPoint(); SwFormatFootnote aFootNote( bEndNote ); if(!rStr.isEmpty()) aFootNote.SetNumStr( rStr ); @@ -981,7 +981,7 @@ void SwWrtShell::SplitNode( bool bAutoFormat, bool bCheckTableStart ) void SwWrtShell::NumOrBulletOn(bool bNum) { // determine numbering rule found at current cursor position in the document. - const SwNumRule* pCurRule = GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pCurRule = GetNumRuleAtCurrCursorPos(); StartUndo(UNDO_NUMORNONUM); @@ -1029,7 +1029,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // If not, let it been counted. Then it has to be checked, // of the outline numbering has to be activated or continued. SwTextNode* pTextNode = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if ( pTextNode && !pTextNode->IsCountedInList() ) { // check, if numbering of the outline level of the paragraph @@ -1122,7 +1122,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) OUString sContinuedListId; if ( !pNumRule ) { - pNumRule = GetDoc()->SearchNumRule( *GetCrsr()->GetPoint(), + pNumRule = GetDoc()->SearchNumRule( *GetCursor()->GetPoint(), false, bNum, false, 0, sContinuedListId ); bContinueFoundNumRule = pNumRule != nullptr; @@ -1135,7 +1135,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // do not change found numbering/bullet rule, if it should only be continued. if ( !bContinueFoundNumRule ) { - SwTextNode * pTextNode = GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode * pTextNode = GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if (pTextNode) { @@ -1199,11 +1199,11 @@ void SwWrtShell::NumOrBulletOn(bool bNum) pChrFormat = GetCharFormatFromPool( RES_POOLCHR_BUL_LEVEL ); } - const SwTextNode* pTextNode = GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + const SwTextNode* pTextNode = GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); const SwTwips nWidthOfTabs = pTextNode ? pTextNode->GetWidthOfLeadingTabs() : 0; - GetDoc()->getIDocumentContentOperations().RemoveLeadingWhiteSpace( *GetCrsr()->GetPoint() ); + GetDoc()->getIDocumentContentOperations().RemoveLeadingWhiteSpace( *GetCursor()->GetPoint() ); const bool bHtml = dynamic_cast<SwWebDocShell*>( pDocSh ) != nullptr; const bool bRightToLeft = IsInRightToLeftText(); @@ -1299,7 +1299,7 @@ void SwWrtShell::NumOn() void SwWrtShell::NumOrBulletOff() { - const SwNumRule * pCurNumRule = GetNumRuleAtCurrCrsrPos(); + const SwNumRule * pCurNumRule = GetNumRuleAtCurrCursorPos(); if (pCurNumRule) { @@ -1308,7 +1308,7 @@ void SwWrtShell::NumOrBulletOff() SwNumRule aNumRule(*pCurNumRule); SwTextNode * pTextNode = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if (pTextNode) { @@ -1356,7 +1356,7 @@ SelectionType SwWrtShell::GetSelectionType() const // The value does not matter, it may be updated in endaction anyway. if ( BasicActionPend() ) - return IsSelFrmMode() ? nsSelectionType::SEL_FRM : nsSelectionType::SEL_TXT; + return IsSelFrameMode() ? nsSelectionType::SEL_FRM : nsSelectionType::SEL_TXT; SwView &_rView = const_cast<SwView&>(GetView()); if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() ) @@ -1364,8 +1364,8 @@ SelectionType SwWrtShell::GetSelectionType() const // Inserting a frame is not a DrawMode int nCnt; - if ( !_rView.GetEditWin().IsFrmAction() && - (IsObjSelected() || (_rView.IsDrawMode() && !IsFrmSelected()) )) + if ( !_rView.GetEditWin().IsFrameAction() && + (IsObjSelected() || (_rView.IsDrawMode() && !IsFrameSelected()) )) { if (GetDrawView()->IsTextEdit()) nCnt = nsSelectionType::SEL_DRW_TXT; @@ -1400,7 +1400,7 @@ SelectionType SwWrtShell::GetSelectionType() const nCnt = GetCntType(); - if ( IsFrmSelected() ) + if ( IsFrameSelected() ) { if (_rView.IsDrawMode()) _rView.LeaveDrawCreate(); // clean up (Bug #45639) @@ -1408,18 +1408,18 @@ SelectionType SwWrtShell::GetSelectionType() const return nsSelectionType::SEL_FRM; } - if ( IsCrsrInTable() ) + if ( IsCursorInTable() ) nCnt |= nsSelectionType::SEL_TBL; if ( IsTableMode() ) nCnt |= (nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS); // Do not pop up numbering toolbar, if the text node has a numbering of type SVX_NUM_NUMBER_NONE. - const SwNumRule* pNumRule = GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pNumRule = GetNumRuleAtCurrCursorPos(); if ( pNumRule ) { const SwTextNode* pTextNd = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if ( pTextNd && pTextNd->IsInList() ) { @@ -1492,7 +1492,7 @@ SwFrameFormat *SwWrtShell::GetTableStyle(const OUString &rFormatName) } void SwWrtShell::addCurrentPosition() { - SwPaM* pPaM = GetCrsr(); + SwPaM* pPaM = GetCursor(); m_aNavigationMgr.addEntry(*pPaM->GetPoint()); } @@ -1500,7 +1500,7 @@ void SwWrtShell::addCurrentPosition() { void SwWrtShell::SetPageStyle(const OUString &rCollName) { - if( !SwCrsrShell::HasSelection() && !IsSelFrmMode() && !IsObjSelected() ) + if( !SwCursorShell::HasSelection() && !IsSelFrameMode() && !IsObjSelected() ) { SwPageDesc* pDesc = FindPageDescByName( rCollName, true ); if( pDesc ) @@ -1510,9 +1510,9 @@ void SwWrtShell::SetPageStyle(const OUString &rCollName) // Access templates -OUString SwWrtShell::GetCurPageStyle( const bool bCalcFrm ) const +OUString SwWrtShell::GetCurPageStyle( const bool bCalcFrame ) const { - return GetPageDesc(GetCurPageDesc( bCalcFrm )).GetName(); + return GetPageDesc(GetCurPageDesc( bCalcFrame )).GetName(); } // Change the current template referring to the existing change. @@ -1532,7 +1532,7 @@ void SwWrtShell::QuickUpdateStyle() void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM ) { - SwPaM* pCrsr = pPaM ? pPaM : GetCrsr( ); + SwPaM* pCursor = pPaM ? pPaM : GetCursor( ); SfxItemSet aCoreSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END - 1, RES_PARATR_BEGIN, RES_PARATR_END - 1, @@ -1544,7 +1544,7 @@ void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyl SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP, SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM, 0 ); - GetPaMAttr( pCrsr, aCoreSet ); + GetPaMAttr( pCursor, aCoreSet ); bool bReset = false; SfxItemIter aParaIter( aCoreSet ); const SfxPoolItem* pParaItem = aParaIter.FirstItem(); @@ -1565,8 +1565,8 @@ void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyl StartAction(); if(bReset) { - ResetAttr( std::set<sal_uInt16>(), pCrsr ); - SetAttrSet(aCoreSet, SetAttrMode::DEFAULT, pCrsr); + ResetAttr( std::set<sal_uInt16>(), pCursor ); + SetAttrSet(aCoreSet, SetAttrMode::DEFAULT, pCursor); } mpDoc->ChgFormat(*pColl, rStyleSet ); EndAction(); @@ -1576,7 +1576,7 @@ void SwWrtShell::AutoUpdateFrame( SwFrameFormat* pFormat, const SfxItemSet& rSty { StartAction(); - ResetFlyFrmAttr( 0, &rStyleSet ); + ResetFlyFrameAttr( 0, &rStyleSet ); pFormat->SetFormatAttr( rStyleSet ); EndAction(); @@ -1663,17 +1663,17 @@ SwWrtShell::~SwWrtShell() SET_CURR_SHELL( this ); while(IsModePushed()) PopMode(); - while(PopCrsr(false)) + while(PopCursor(false)) ; SwTransferable::ClearSelection( *this ); } -bool SwWrtShell::Pop( bool bOldCrsr ) +bool SwWrtShell::Pop( bool bOldCursor ) { - bool bRet = SwCrsrShell::Pop( bOldCrsr ); + bool bRet = SwCursorShell::Pop( bOldCursor ); if( bRet && IsSelection() ) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; } return bRet; @@ -1681,7 +1681,7 @@ bool SwWrtShell::Pop( bool bOldCrsr ) bool SwWrtShell::CanInsert() { - if(IsSelFrmMode()) + if(IsSelFrameMode()) { return false; } @@ -1737,7 +1737,7 @@ OUString SwWrtShell::GetSelDescr() const break; default: if (nullptr != mpDoc) - aResult = GetCrsrDescr(); + aResult = GetCursorDescr(); } return aResult; @@ -1766,7 +1766,7 @@ void SwWrtShell::ChangeHeaderOrFooter( StartAllAction(); StartUndo( UNDO_HEADER_FOOTER ); // #i7983# bool bExecute = true; - bool bCrsrSet = false; + bool bCursorSet = false; for( size_t nFrom = 0, nTo = GetPageDescCnt(); nFrom < nTo; ++nFrom ) { @@ -1816,11 +1816,11 @@ void SwWrtShell::ChangeHeaderOrFooter( { ChgPageDesc( nFrom, aDesc ); - if( !bCrsrSet && bOn ) + if( !bCursorSet && bOn ) { if ( !IsHeaderFooterEdit() ) ToggleHeaderFooterEdit(); - bCrsrSet = SetCrsrInHdFt( + bCursorSet = SetCursorInHdFt( rStyleName.isEmpty() ? SIZE_MAX : nFrom, bHeader ); } diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index bb5242b99e0b..1f88e467c616 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -143,7 +143,7 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst ) const size_t nCnt = pTmp->Count(); if(nCnt) { - pTmp->PushCrsr(); + pTmp->PushCursor(); bool bCancel = false; OString aDlgPos; @@ -162,7 +162,7 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst ) pTmp->GetField( i )->GetTyp()->UpdateFields(); } } - pTmp->PopCrsr(); + pTmp->PopCursor(); } if( !pLst ) @@ -379,7 +379,7 @@ void SwWrtShell::ClickToField( const SwField& rField ) case RES_GETREFFLD: StartAllAction(); - SwCrsrShell::GotoRefMark( static_cast<const SwGetRefField&>(rField).GetSetRefName(), + SwCursorShell::GotoRefMark( static_cast<const SwGetRefField&>(rField).GetSetRefName(), static_cast<const SwGetRefField&>(rField).GetSubType(), static_cast<const SwGetRefField&>(rField).GetSeqNo() ); EndAllAction(); @@ -468,7 +468,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, return ; // The shell could be 0 also!!!!! - if ( dynamic_cast<const SwCrsrShell*>( &rVSh) == nullptr ) + if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr ) return; // We are doing tiledRendering, let the client handles the URL loading. @@ -478,7 +478,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, return; } - //A CrsrShell is always a WrtShell + //A CursorShell is always a WrtShell SwWrtShell &rSh = static_cast<SwWrtShell&>(rVSh); SwDocShell* pDShell = rSh.GetView().GetDocShell(); @@ -497,8 +497,8 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, OUString sReferer; if( pDShell && pDShell->GetMedium() ) sReferer = pDShell->GetMedium()->GetName(); - SfxViewFrame* pViewFrm = rSh.GetView().GetViewFrame(); - SfxFrameItem aView( SID_DOCFRAME, pViewFrm ); + SfxViewFrame* pViewFrame = rSh.GetView().GetViewFrame(); + SfxFrameItem aView( SID_DOCFRAME, pViewFrame ); SfxStringItem aName( SID_FILE_NAME, rURL ); SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame ); SfxStringItem aReferer( SID_REFERER, sReferer ); @@ -519,7 +519,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, nullptr }; - pViewFrm->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, 0, + pViewFrame->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, 0, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD ); } diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx index 12665242cbc1..49eb3c51c377 100644 --- a/sw/source/uibase/wrtsh/wrtsh3.cxx +++ b/sw/source/uibase/wrtsh/wrtsh3.cxx @@ -48,21 +48,21 @@ bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* co bool bRet = true; switch(eFuncId) { - case BOOKMARK_INDEX:bRet = SwCrsrShell::GotoMark( pMark );break; - case BOOKMARK_NEXT: bRet = SwCrsrShell::GoNextBookmark();break; - case BOOKMARK_PREV: bRet = SwCrsrShell::GoPrevBookmark();break; + case BOOKMARK_INDEX:bRet = SwCursorShell::GotoMark( pMark );break; + case BOOKMARK_NEXT: bRet = SwCursorShell::GoNextBookmark();break; + case BOOKMARK_PREV: bRet = SwCursorShell::GoPrevBookmark();break; default:;//prevent warning } - if( bRet && IsSelFrmMode() ) + if( bRet && IsSelFrameMode() ) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } if( IsSelection() ) { m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; } return bRet; } @@ -71,17 +71,17 @@ bool SwWrtShell::GotoField( const SwFormatField& rField ) { (this->*m_fnKillSel)( nullptr, false ); - bool bRet = SwCrsrShell::GotoFormatField( rField ); - if( bRet && IsSelFrmMode() ) + bool bRet = SwCursorShell::GotoFormatField( rField ); + if( bRet && IsSelFrameMode() ) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } if( IsSelection() ) { m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; } return bRet; @@ -90,16 +90,16 @@ bool SwWrtShell::GotoField( const SwFormatField& rField ) bool SwWrtShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark) { (this->*m_fnKillSel)( nullptr, false ); - bool bRet = SwCrsrShell::GotoFieldmark(pMark); - if( bRet && IsSelFrmMode() ) + bool bRet = SwCursorShell::GotoFieldmark(pMark); + if( bRet && IsSelFrameMode() ) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } if( IsSelection() ) { m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; } return bRet; } diff --git a/sw/source/uibase/wrtsh/wrtsh4.cxx b/sw/source/uibase/wrtsh/wrtsh4.cxx index 8d6849dd553c..49e7353f6aa3 100644 --- a/sw/source/uibase/wrtsh/wrtsh4.cxx +++ b/sw/source/uibase/wrtsh/wrtsh4.cxx @@ -37,7 +37,7 @@ bool SwWrtShell::_SttWrd() ClearMark(); if( !GoStartWord() ) // not found --> go to the beginning of the paragraph. - SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); + SwCursorShell::MovePara( fnParaCurr, fnParaStart ); ClearMark(); // If Mark was previously set, summarize. Combine(); @@ -58,7 +58,7 @@ bool SwWrtShell::_EndWrd() ClearMark(); if( !GoEndWord() ) // not found --> go to the end of the paragraph. - SwCrsrShell::MovePara(fnParaCurr, fnParaEnd); + SwCursorShell::MovePara(fnParaCurr, fnParaEnd); ClearMark(); // If Mark was previously set, summarize. Combine(); @@ -70,7 +70,7 @@ bool SwWrtShell::_NxtWrd() bool bRet = false; while( IsEndPara() ) // If already at the end, then the next??? { - if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) // Document - end ?? + if(!SwCursorShell::Right(1,CRSR_SKIP_CHARS)) // Document - end ?? { Pop( false ); return bRet; @@ -83,8 +83,8 @@ bool SwWrtShell::_NxtWrd() { if( !GoNextWord() ) { - if( (!IsEndPara() && !SwCrsrShell::MovePara( fnParaCurr, fnParaEnd ) ) - || !SwCrsrShell::Right(1,CRSR_SKIP_CHARS) ) + if( (!IsEndPara() && !SwCursorShell::MovePara( fnParaCurr, fnParaEnd ) ) + || !SwCursorShell::Right(1,CRSR_SKIP_CHARS) ) break; bRet = IsStartWord(); } @@ -101,7 +101,7 @@ bool SwWrtShell::_PrvWrd() bool bRet = false; while( IsSttPara() ) { // if already at the beginning, then the next??? - if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS)) + if(!SwCursorShell::Left(1,CRSR_SKIP_CHARS)) { // Document - beginning ?? Pop( false ); return bRet; @@ -114,8 +114,8 @@ bool SwWrtShell::_PrvWrd() { if( !GoPrevWord() ) { - if( (!IsSttPara() && !SwCrsrShell::MovePara( fnParaCurr, fnParaStart ) ) - || !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) ) + if( (!IsSttPara() && !SwCursorShell::MovePara( fnParaCurr, fnParaStart ) ) + || !SwCursorShell::Left(1,CRSR_SKIP_CHARS) ) break; bRet = IsStartWord(); } @@ -133,7 +133,7 @@ bool SwWrtShell::_NxtWrdForDelete() { if ( IsEndPara() ) { - if ( !SwCrsrShell::Right(1,CRSR_SKIP_CHARS) ) + if ( !SwCursorShell::Right(1,CRSR_SKIP_CHARS) ) { Pop( false ); return false; @@ -144,7 +144,7 @@ bool SwWrtShell::_NxtWrdForDelete() ClearMark(); if ( !GoNextWord() ) { - SwCrsrShell::MovePara( fnParaCurr, fnParaEnd ); + SwCursorShell::MovePara( fnParaCurr, fnParaEnd ); } ClearMark(); Combine(); @@ -156,7 +156,7 @@ bool SwWrtShell::_PrvWrdForDelete() { if ( IsSttPara() ) { - if ( !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) ) + if ( !SwCursorShell::Left(1,CRSR_SKIP_CHARS) ) { Pop( false ); return false; @@ -167,7 +167,7 @@ bool SwWrtShell::_PrvWrdForDelete() ClearMark(); if( !GoPrevWord() ) { - SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); + SwCursorShell::MovePara( fnParaCurr, fnParaStart ); } ClearMark(); Combine(); @@ -178,13 +178,13 @@ bool SwWrtShell::_FwdSentence() { Push(); ClearMark(); - if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) + if(!SwCursorShell::Right(1,CRSR_SKIP_CHARS)) { Pop(false); return false; } if( !GoNextSentence() && !IsEndPara() ) - SwCrsrShell::MovePara(fnParaCurr, fnParaEnd); + SwCursorShell::MovePara(fnParaCurr, fnParaEnd); ClearMark(); Combine(); @@ -195,14 +195,14 @@ bool SwWrtShell::_BwdSentence() { Push(); ClearMark(); - if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS)) + if(!SwCursorShell::Left(1,CRSR_SKIP_CHARS)) { Pop(false); return false; } if( !GoStartSentence() && !IsSttPara() ) // not found --> go to the beginning of the paragraph - SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); + SwCursorShell::MovePara( fnParaCurr, fnParaStart ); ClearMark(); Combine(); return true; @@ -212,7 +212,7 @@ bool SwWrtShell::_FwdPara() { Push(); ClearMark(); - bool bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart); + bool bRet = SwCursorShell::MovePara(fnParaNext, fnParaStart); ClearMark(); Combine(); @@ -224,7 +224,7 @@ bool SwWrtShell::_BwdPara() Push(); ClearMark(); - bool bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart); + bool bRet = SwCursorShell::MovePara(fnParaPrev, fnParaStart); if ( !bRet && !IsSttOfPara() ) { SttPara(); diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx index 1756fdd53b22..d8e7ed8498a0 100644 --- a/sw/source/uibase/wrtsh/wrtundo.cxx +++ b/sw/source/uibase/wrtsh/wrtundo.cxx @@ -62,27 +62,27 @@ void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt ) DoUndo(bSaveDoesUndo); bool bCreateXSelection = false; - const bool bFrmSelected = IsFrmSelected() || IsObjSelected(); + const bool bFrameSelected = IsFrameSelected() || IsObjSelected(); if ( IsSelection() ) { - if ( bFrmSelected ) - UnSelectFrm(); + if ( bFrameSelected ) + UnSelectFrame(); // Set the function pointer for canceling the selection at the // cursor position. m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; bCreateXSelection = true; } - else if ( bFrmSelected ) + else if ( bFrameSelected ) { - EnterSelFrmMode(); + EnterSelFrameMode(); bCreateXSelection = true; } else if( (CNT_GRF | CNT_OLE ) & GetCntType() ) { SelectObj( GetCharRect().Pos() ); - EnterSelFrmMode(); + EnterSelFrameMode(); bCreateXSelection = true; } |