diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-05-20 13:05:49 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-05-20 13:05:49 +0200 |
commit | ab465b90f6c6da5595393a0ba73f33a1e71a2b65 (patch) | |
tree | 36b77192de2799a11b4bf0b269cb3f74d0a0bb1f /sw/source/uibase | |
parent | 0db96caf0fcce09b87621c11b584a6d81cc7df86 (diff) |
bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-point
renames the most annoying abbreviations in Writer (and partially
in the shared code too).
Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
Diffstat (limited to 'sw/source/uibase')
164 files changed, 3655 insertions, 3655 deletions
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index e56ea2684059..1820d88a46e0 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -75,7 +75,7 @@ #define ENV_INSERT RET_USER // Function used for labels and envelopes in applab.cxx and appenv.cxx -OUString InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const OUString& rText ) +OUString InsertLabEnvText( SwWrtShell& rSh, SwFieldMgr& rFieldMgr, const OUString& rText ) { OUString sRet; OUString aText(comphelper::string::remove(rText, '\r')); @@ -115,8 +115,8 @@ OUString InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const OUString& r if (nCnt >= 3) { sDBName = ::ReplacePoint(sDBName, true); - SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyOUStr, 0, &rSh ); - rFldMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_DBFLD, 0, sDBName, aEmptyOUStr, 0, &rSh ); + rFieldMgr.InsertField( aData ); sRet = sDBName; bField = true; } @@ -134,12 +134,12 @@ OUString InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const OUString& r static void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId) { - sal_uInt16 nCollCnt = pOldSh->GetTxtFmtCollCount(); + sal_uInt16 nCollCnt = pOldSh->GetTextFormatCollCount(); for( sal_uInt16 nCnt = 0; nCnt < nCollCnt; ++nCnt ) { - SwTxtFmtColl* pColl = &pOldSh->GetTxtFmtColl(nCnt); - if(nCollId == pColl->GetPoolFmtId()) - pNewSh->GetTxtCollFromPool(nCollId)->SetFmtAttr(pColl->GetAttrSet()); + SwTextFormatColl* pColl = &pOldSh->GetTextFormatColl(nCnt); + if(nCollId == pColl->GetPoolFormatId()) + pNewSh->GetTextCollFromPool(nCollId)->SetFormatAttr(pColl->GetAttrSet()); } } @@ -245,13 +245,13 @@ void SwModule::InsertEnv( SfxRequest& rReq ) OSL_ENSURE(pOldSh, "No document - wasn't 'Insert' disabled???"); SvxPaperBinItem aItem( RES_PAPER_BIN ); aItem.SetValue((sal_uInt8)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin()); - pOldSh->GetPageDescFromPool(RES_POOLPAGE_JAKET)->GetMaster().SetFmtAttr(aItem); + pOldSh->GetPageDescFromPool(RES_POOLPAGE_JAKET)->GetMaster().SetFormatAttr(aItem); } SwWrtShell *pTmp = nMode == ENV_INSERT ? pOldSh : pSh; const SwPageDesc* pFollow = 0; - SwTxtFmtColl *pSend = pTmp->GetTxtCollFromPool( RES_POOLCOLL_SENDADRESS ), - *pAddr = pTmp->GetTxtCollFromPool( RES_POOLCOLL_JAKETADRESS); + SwTextFormatColl *pSend = pTmp->GetTextCollFromPool( RES_POOLCOLL_SENDADRESS ), + *pAddr = pTmp->GetTextCollFromPool( RES_POOLCOLL_JAKETADRESS); const OUString sSendMark = pSend->GetName(); const OUString sAddrMark = pAddr->GetName(); @@ -298,13 +298,13 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc()); // Insert page break - if ( pSh->IsCrsrInTbl() ) + if ( pSh->IsCrsrInTable() ) { pSh->SplitNode(); pSh->Right( CRSR_SKIP_CHARS, false, 1, false ); SfxItemSet aBreakSet( pSh->GetAttrPool(), RES_BREAK, RES_BREAK, 0 ); - aBreakSet.Put( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) ); - pSh->SetTblAttr( aBreakSet ); + aBreakSet.Put( SvxFormatBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) ); + pSh->SetTableAttr( aBreakSet ); } else pSh->InsertPageBreak(0, boost::none); @@ -330,13 +330,13 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pSh->SetNewDoc(); // Avoid performance problems // Remember Flys of this site - std::vector<SwFrmFmt*> aFlyArr; + std::vector<SwFrameFormat*> aFlyArr; if( ENV_NEWDOC != nMode && !bEnvChange ) pSh->GetPageObjs( aFlyArr ); // Get page description SwPageDesc* pDesc = pSh->GetPageDescFromPool(RES_POOLPAGE_JAKET); - SwFrmFmt& rFmt = pDesc->GetMaster(); + SwFrameFormat& rFormat = pDesc->GetMaster(); Printer *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( true ); @@ -373,20 +373,20 @@ void SwModule::InsertEnv( SfxRequest& rReq ) aULMargin.SetUpper((sal_uInt16) lUpper); aLRMargin.SetRight(0); aULMargin.SetLower(0); - rFmt.SetFmtAttr(aLRMargin); - rFmt.SetFmtAttr(aULMargin); + rFormat.SetFormatAttr(aLRMargin); + rFormat.SetFormatAttr(aULMargin); // Header and footer - rFmt.SetFmtAttr(SwFmtHeader(false)); + rFormat.SetFormatAttr(SwFormatHeader(false)); pDesc->ChgHeaderShare(false); - rFmt.SetFmtAttr(SwFmtFooter(false)); + rFormat.SetFormatAttr(SwFormatFooter(false)); pDesc->ChgFooterShare(false); // Page numbering pDesc->SetUseOn(nsUseOnPage::PD_ALL); // Page size - rFmt.SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, + rFormat.SetFormatAttr(SwFormatFrmSize(ATT_FIX_SIZE, nPageW + lLeft, nPageH + lUpper)); // Set type of page numbering @@ -414,7 +414,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Insert Frame SwFlyFrmAttrMgr aMgr(false, pSh, FRMMGR_TYPE_ENVELP); - SwFldMgr aFldMgr; + SwFieldMgr aFieldMgr; aMgr.SetHeightSizeType(ATT_VAR_SIZE); // Overwrite defaults! @@ -434,8 +434,8 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pSh->SetFlyName(sSendMark); pSh->UnSelectFrm(); pSh->LeaveSelFrmMode(); - pSh->SetTxtFmtColl( pSend ); - InsertLabEnvText( *pSh, aFldMgr, rItem.aSendText ); + pSh->SetTextFormatColl( pSend ); + InsertLabEnvText( *pSh, aFieldMgr, rItem.aSendText ); aMgr.UpdateAttrMgr(); } @@ -449,8 +449,8 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pSh->SetFlyName(sAddrMark); pSh->UnSelectFrm(); pSh->LeaveSelFrmMode(); - pSh->SetTxtFmtColl( pAddr ); - InsertLabEnvText(*pSh, aFldMgr, rItem.aAddrText); + pSh->SetTextFormatColl( pAddr ); + InsertLabEnvText(*pSh, aFieldMgr, rItem.aAddrText); // Move Flys to the "old" pages if (!aFlyArr.empty()) diff --git a/sw/source/uibase/app/appenv.hxx b/sw/source/uibase/app/appenv.hxx index f319178132f2..1e58efccfc8a 100644 --- a/sw/source/uibase/app/appenv.hxx +++ b/sw/source/uibase/app/appenv.hxx @@ -10,7 +10,7 @@ #ifndef INCLUDED_SW_SOURCE_UIBASE_APP_APPENV_HXX #define INCLUDED_SW_SOURCE_UIBASE_APP_APPENV_HXX -OUString InsertLabEnvText( SwWrtShell& , SwFldMgr& , const OUString& ); +OUString InsertLabEnvText( SwWrtShell& , SwFieldMgr& , const OUString& ); #endif diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 9b32ae77e7d0..e3dd39a8e1bc 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -198,7 +198,7 @@ void SwModule::StateOther(SfxItemSet &rSet) break; case FN_SET_MODOPT_TBLNUMFMT: rSet.Put( SfxBoolItem( nWhich, pModuleConfig-> - IsInsTblFormatNum( bWebView ))); + IsInsTableFormatNum( bWebView ))); break; default: OSL_FAIL("::StateOther: default"); @@ -679,9 +679,9 @@ void SwModule::ExecOther(SfxRequest& rReq) nWhich, false, &pItem )) bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue(); else - bSet = !pModuleConfig->IsInsTblFormatNum( bWebView ); + bSet = !pModuleConfig->IsInsTableFormatNum( bWebView ); - pModuleConfig->SetInsTblFormatNum( bWebView, bSet ); + pModuleConfig->SetInsTableFormatNum( bWebView, bSet ); } break; #if HAVE_FEATURE_DBCONNECTIVITY @@ -734,7 +734,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) bUpdateFields = false; if(bUpdateFields) { - pWrtSh->UpdateInputFlds(); + pWrtSh->UpdateInputFields(); // Are database fields contained? // Get all used databases for the first time diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 3a30ca4db42c..f324eb0b08ce 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -81,8 +81,8 @@ using namespace ::com::sun::star; const char MASTER_LABEL[] = "MasterLabel"; -static const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem, - SwFrmFmt &rFmt, +static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem, + SwFrameFormat &rFormat, sal_uInt16 nCol, sal_uInt16 nRow ) { SfxItemSet aSet(rSh.GetAttrPool(), RES_ANCHOR, RES_ANCHOR, @@ -91,17 +91,17 @@ static const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem rSh.GetPageNum( nPhyPageNum, nVirtPageNum ); //anchor frame to page - aSet.Put( SwFmtAnchor( FLY_AT_PAGE, nPhyPageNum ) ); - aSet.Put( SwFmtHoriOrient( rItem.lLeft + static_cast<SwTwips>(nCol) * rItem.lHDist, + aSet.Put( SwFormatAnchor( FLY_AT_PAGE, nPhyPageNum ) ); + aSet.Put( SwFormatHoriOrient( rItem.lLeft + static_cast<SwTwips>(nCol) * rItem.lHDist, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); - aSet.Put( SwFmtVertOrient( rItem.lUpper + static_cast<SwTwips>(nRow) * rItem.lVDist, + aSet.Put( SwFormatVertOrient( rItem.lUpper + static_cast<SwTwips>(nRow) * rItem.lVDist, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); - const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, true, &rFmt ); // Insert Fly - OSL_ENSURE( pFmt, "Fly not inserted" ); + const SwFrameFormat *pFormat = rSh.NewFlyFrm(aSet, true, &rFormat ); // Insert Fly + OSL_ENSURE( pFormat, "Fly not inserted" ); rSh.UnSelectFrm(); //Frame was selected automatically - rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) ); + rSh.SetTextFormatColl( rSh.GetTextCollFromPool( RES_POOLCOLL_STANDARD ) ); if(!rItem.bSynchron || !(nCol|nRow)) { @@ -115,11 +115,11 @@ static const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem pGlosHdl->InsertGlossary( rItem.sGlossaryBlockName ); } - return pFmt; + return pFormat; } -static const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem, - SwFrmFmt &rFmt, SwFldMgr& rFldMgr, +static const SwFrameFormat *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem, + SwFrameFormat &rFormat, SwFieldMgr& rFieldMgr, sal_uInt16 nCol, sal_uInt16 nRow, bool bLast ) { SfxItemSet aSet(rSh.GetAttrPool(), RES_ANCHOR, RES_ANCHOR, @@ -128,28 +128,28 @@ static const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rIte rSh.GetPageNum( nPhyPageNum, nVirtPageNum ); //anchor frame to page - aSet.Put( SwFmtAnchor( FLY_AT_PAGE, nPhyPageNum ) ); - aSet.Put( SwFmtHoriOrient( rItem.lLeft + static_cast<SwTwips>(nCol) * rItem.lHDist, + aSet.Put( SwFormatAnchor( FLY_AT_PAGE, nPhyPageNum ) ); + aSet.Put( SwFormatHoriOrient( rItem.lLeft + static_cast<SwTwips>(nCol) * rItem.lHDist, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); - aSet.Put( SwFmtVertOrient( rItem.lUpper + static_cast<SwTwips>(nRow) * rItem.lVDist, + aSet.Put( SwFormatVertOrient( rItem.lUpper + static_cast<SwTwips>(nRow) * rItem.lVDist, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); - const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, true, &rFmt ); // Insert Fly - OSL_ENSURE( pFmt, "Fly not inserted" ); + const SwFrameFormat *pFormat = rSh.NewFlyFrm(aSet, true, &rFormat ); // Insert Fly + OSL_ENSURE( pFormat, "Fly not inserted" ); rSh.UnSelectFrm(); //Frame was selected automatically - rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) ); + rSh.SetTextFormatColl( rSh.GetTextCollFromPool( RES_POOLCOLL_STANDARD ) ); // If applicable "next dataset" OUString sDBName; - if( (!rItem.bSynchron || !(nCol|nRow)) && !(sDBName = InsertLabEnvText( rSh, rFldMgr, rItem.aWriting )).isEmpty() && !bLast ) + if( (!rItem.bSynchron || !(nCol|nRow)) && !(sDBName = InsertLabEnvText( rSh, rFieldMgr, rItem.aWriting )).isEmpty() && !bLast ) { sDBName = comphelper::string::setToken(sDBName, 3, DB_DELIM, "True"); - SwInsertFld_Data aData(TYP_DBNEXTSETFLD, 0, sDBName, aEmptyOUStr, 0, &rSh ); - rFldMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_DBNEXTSETFLD, 0, sDBName, aEmptyOUStr, 0, &rSh ); + rFieldMgr.InsertField( aData ); } - return pFmt; + return pFormat; } void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) @@ -238,7 +238,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) pSh->SetNewDoc(); // Avoid performance problems SwPageDesc aDesc = pSh->GetPageDesc( 0 ); - SwFrmFmt& rFmt = aDesc.GetMaster(); + SwFrameFormat& rFormat = aDesc.GetMaster(); // Borders SvxLRSpaceItem aLRMargin( RES_LR_SPACE ); @@ -247,13 +247,13 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) aULMargin.SetUpper((sal_uInt16) rItem.lUpper); aLRMargin.SetRight( 0 ); aULMargin.SetLower( 0 ); - rFmt.SetFmtAttr(aLRMargin); - rFmt.SetFmtAttr(aULMargin); + rFormat.SetFormatAttr(aLRMargin); + rFormat.SetFormatAttr(aULMargin); // Header and footer - rFmt.SetFmtAttr(SwFmtHeader(false)); + rFormat.SetFormatAttr(SwFormatHeader(false)); aDesc.ChgHeaderShare(false); - rFmt.SetFmtAttr(SwFmtFooter(false)); + rFormat.SetFormatAttr(SwFormatFooter(false)); aDesc.ChgFooterShare(false); aDesc.SetUseOn(nsUseOnPage::PD_ALL); // Site numbering @@ -262,7 +262,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) long lPgWidth, lPgHeight; lPgWidth = (rItem.lPWidth > MINLAY ? rItem.lPWidth : MINLAY); lPgHeight = (rItem.lPHeight > MINLAY ? rItem.lPHeight : MINLAY); - rFmt.SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE, lPgWidth, lPgHeight )); + rFormat.SetFormatAttr( SwFormatFrmSize( ATT_FIX_SIZE, lPgWidth, lPgHeight )); // Numbering type SvxNumberType aType; aType.SetNumberingType(SVX_NUM_NUMBER_NONE); @@ -275,7 +275,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( true ); SvxPaperBinItem aItem( RES_PAPER_BIN ); aItem.SetValue((sal_Int8)pPrt->GetPaperBin()); - rFmt.SetFmtAttr(aItem); + rFormat.SetFormatAttr(aItem); // Determine orientation of the resulting page aDesc.SetLandscape(rItem.lPWidth > rItem.lPHeight); @@ -283,43 +283,43 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) pSh->ChgPageDesc( 0, aDesc ); // Insert frame - boost::scoped_ptr<SwFldMgr> pFldMgr(new SwFldMgr); - pFldMgr->SetEvalExpFlds(false); + boost::scoped_ptr<SwFieldMgr> pFieldMgr(new SwFieldMgr); + pFieldMgr->SetEvalExpFields(false); // Prepare border template - SwFrmFmt* pFmt = pSh->GetFrmFmtFromPool( RES_POOLFRM_LABEL ); + SwFrameFormat* pFormat = pSh->GetFrameFormatFromPool( RES_POOLFRM_LABEL ); sal_Int32 iResultWidth = rItem.lLeft + (rItem.nCols - 1) * rItem.lHDist + rItem.lWidth - rItem.lPWidth; sal_Int32 iResultHeight = rItem.lUpper + (rItem.nRows - 1) * rItem.lVDist + rItem.lHeight - rItem.lPHeight; sal_Int32 iWidth = (iResultWidth > 0 ? rItem.lWidth - (iResultWidth / rItem.nCols) - 1 : rItem.lWidth); sal_Int32 iHeight = (iResultHeight > 0 ? rItem.lHeight - (iResultHeight / rItem.nRows) - 1 : rItem.lHeight); - SwFmtFrmSize aFrmSize( ATT_FIX_SIZE, iWidth, iHeight ); - pFmt->SetFmtAttr( aFrmSize ); + SwFormatFrmSize aFrmSize( ATT_FIX_SIZE, iWidth, iHeight ); + pFormat->SetFormatAttr( aFrmSize ); //frame represents label itself, no border space SvxULSpaceItem aFrmNoULSpace( 0, 0, RES_UL_SPACE ); SvxLRSpaceItem aFrmNoLRSpace( 0, 0, 0, 0, RES_LR_SPACE ); - pFmt->SetFmtAttr( aFrmNoULSpace ); - pFmt->SetFmtAttr( aFrmNoLRSpace ); + pFormat->SetFormatAttr( aFrmNoULSpace ); + pFormat->SetFormatAttr( aFrmNoLRSpace ); - const SwFrmFmt *pFirstFlyFmt = 0; + const SwFrameFormat *pFirstFlyFormat = 0; if ( rItem.bPage ) { - SwFmtVertOrient aFrmVertOrient( pFmt->GetVertOrient() ); + SwFormatVertOrient aFrmVertOrient( pFormat->GetVertOrient() ); aFrmVertOrient.SetVertOrient( text::VertOrientation::TOP ); - pFmt->SetFmtAttr(aFrmVertOrient); + pFormat->SetFormatAttr(aFrmVertOrient); for ( sal_uInt16 i = 0; i < rItem.nRows; ++i ) { for ( sal_uInt16 j = 0; j < rItem.nCols; ++j ) { pSh->Push(); - const SwFrmFmt *pTmp = ( bLabel ? - lcl_InsertLabText( *pSh, rItem, *pFmt, *pFldMgr, j, i, + const SwFrameFormat *pTmp = ( bLabel ? + lcl_InsertLabText( *pSh, rItem, *pFormat, *pFieldMgr, j, i, i == rItem.nRows - 1 && j == rItem.nCols - 1 ) : - lcl_InsertBCText( *pSh, rItem, *pFmt, j, i ) ); + lcl_InsertBCText( *pSh, rItem, *pFormat, j, i ) ); if (!(i|j)) { - pFirstFlyFmt = pTmp; + pFirstFlyFormat = pTmp; if (rItem.bSynchron) { @@ -362,11 +362,11 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) } else { - pFirstFlyFmt = bLabel ? - lcl_InsertLabText( *pSh, rItem, *pFmt, *pFldMgr, + pFirstFlyFormat = bLabel ? + lcl_InsertLabText( *pSh, rItem, *pFormat, *pFieldMgr, static_cast< sal_uInt16 >(rItem.nCol - 1), static_cast< sal_uInt16 >(rItem.nRow - 1), true ) : - lcl_InsertBCText(*pSh, rItem, *pFmt, + lcl_InsertBCText(*pSh, rItem, *pFormat, static_cast< sal_uInt16 >(rItem.nCol - 1), static_cast< sal_uInt16 >(rItem.nRow - 1)); } @@ -380,13 +380,13 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) SwLabDlgUpdateFieldInformation(xModel, rItem); } - pFldMgr->SetEvalExpFlds(true); - pFldMgr->EvalExpFlds(pSh); + pFieldMgr->SetEvalExpFields(true); + pFieldMgr->EvalExpFields(pSh); - pFldMgr.reset(); + pFieldMgr.reset(); - if (pFirstFlyFmt) - pSh->GotoFly(pFirstFlyFmt->GetName(), FLYCNTTYPE_ALL, false); + if (pFirstFlyFormat) + pSh->GotoFly(pFirstFlyFormat->GetName(), FLYCNTTYPE_ALL, false); pSh->EndAllAction(); pSh->DoUndo( true ); diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx index 4d4af5cf1b2a..00b93f30e036 100644 --- a/sw/source/uibase/app/appopt.cxx +++ b/sw/source/uibase/app/appopt.cxx @@ -208,11 +208,11 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId ) aGridItem.SetGridVisible( aViewOpt.IsGridVisible()); const Size& rSnapSize = aViewOpt.GetSnapSize(); - aGridItem.SetFldDrawX( (sal_uInt16) (rSnapSize.Width() )); - aGridItem.SetFldDrawY( (sal_uInt16) (rSnapSize.Height())); + aGridItem.SetFieldDrawX( (sal_uInt16) (rSnapSize.Width() )); + aGridItem.SetFieldDrawY( (sal_uInt16) (rSnapSize.Height())); - aGridItem.SetFldDivisionX( aViewOpt.GetDivisionX()); - aGridItem.SetFldDivisionY( aViewOpt.GetDivisionY()); + aGridItem.SetFieldDivisionX( aViewOpt.GetDivisionX()); + aGridItem.SetFieldDivisionY( aViewOpt.GetDivisionY()); pRet->Put(aGridItem); @@ -355,14 +355,14 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) aViewOpt.SetSynchronize(pGridItem->GetSynchronize()); if( aViewOpt.IsGridVisible() != pGridItem->GetGridVisible() ) aViewOpt.SetGridVisible( pGridItem->GetGridVisible()); - Size aSize = Size( pGridItem->GetFldDrawX() , - pGridItem->GetFldDrawY() ); + Size aSize = Size( pGridItem->GetFieldDrawX() , + pGridItem->GetFieldDrawY() ); if( aViewOpt.GetSnapSize() != aSize ) aViewOpt.SetSnapSize( aSize ); - short nDiv = (short)pGridItem->GetFldDivisionX() ; + short nDiv = (short)pGridItem->GetFieldDivisionX() ; if( aViewOpt.GetDivisionX() != nDiv ) aViewOpt.SetDivisionX( nDiv ); - nDiv = (short)pGridItem->GetFldDivisionY(); + nDiv = (short)pGridItem->GetFieldDivisionY(); if( aViewOpt.GetDivisionY() != nDiv ) aViewOpt.SetDivisionY( nDiv ); diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index f674064d54d1..a614c854a7af 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -250,7 +250,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium ) pRdr->GetDoc()->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, ISA(SwWebDocShell)); // Restore the pool default if reading a saved document. - m_pDoc->RemoveAllFmtLanguageDependencies(); + m_pDoc->RemoveAllFormatLanguageDependencies(); sal_uLong nErr = pRdr->Read( *pRead ); @@ -342,7 +342,7 @@ bool SwDocShell::Save() // End TableBox Edit! if (m_pWrtShell) - m_pWrtShell->EndAllTblBoxEdit(); + m_pWrtShell->EndAllTableBoxEdit(); WriterRef xWrt; ::GetXMLWriter( aEmptyOUStr, GetMedium()->GetBaseURL( true ), xWrt ); @@ -454,7 +454,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium ) // End TableBox Edit! if (m_pWrtShell) - m_pWrtShell->EndAllTblBoxEdit(); + m_pWrtShell->EndAllTableBoxEdit(); // Remember and preserve Modified-Flag without calling the Link // (for OLE; after Statement from MM) @@ -558,7 +558,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) // End TableBox Edit! if (m_pWrtShell) - m_pWrtShell->EndAllTblBoxEdit(); + m_pWrtShell->EndAllTableBoxEdit(); if( pFlt->GetUserData() == "HTML" ) { @@ -851,7 +851,7 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const { // Preview: set VisArea to the first page. SwNodeIndex aIdx( m_pDoc->GetNodes().GetEndOfExtras(), 1 ); - SwCntntNode* pNd = m_pDoc->GetNodes().GoNext( &aIdx ); + SwContentNode* pNd = m_pDoc->GetNodes().GoNext( &aIdx ); const SwRect aPageRect = pNd->FindPageFrmRect( false, 0, false ); return aPageRect.SVRect(); @@ -890,7 +890,7 @@ HiddenInformation SwDocShell::GetHiddenInformationState( HiddenInformation nStat if ( nStates & HiddenInformation::RECORDEDCHANGES ) { - if ( !GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl().empty() ) + if ( !GetDoc()->getIDocumentRedlineAccess().GetRedlineTable().empty() ) nState |= HiddenInformation::RECORDEDCHANGES; } if ( nStates & HiddenInformation::NOTES ) @@ -898,12 +898,12 @@ HiddenInformation SwDocShell::GetHiddenInformationState( HiddenInformation nStat OSL_ENSURE( GetWrtShell(), "No SwWrtShell, no information" ); if ( GetWrtShell() ) { - SwFieldType* pType = GetWrtShell()->GetFldType( RES_POSTITFLD, aEmptyOUStr ); - SwIterator<SwFmtFld,SwFieldType> aIter( *pType ); - SwFmtFld* pFirst = aIter.First(); + SwFieldType* pType = GetWrtShell()->GetFieldType( RES_POSTITFLD, aEmptyOUStr ); + SwIterator<SwFormatField,SwFieldType> aIter( *pType ); + SwFormatField* pFirst = aIter.First(); while( pFirst ) { - if( pFirst->GetTxtFld() && pFirst->IsFldInDoc() ) + if( pFirst->GetTextField() && pFirst->IsFieldInDoc() ) { nState |= HiddenInformation::NOTES; break; @@ -1009,10 +1009,10 @@ void SwDocShell::GetState(SfxItemSet& rSet) case SID_ATTR_YEAR2000: { - const SvNumberFormatter* pFmtr = m_pDoc->GetNumberFormatter(false); + const SvNumberFormatter* pFormatr = m_pDoc->GetNumberFormatter(false); rSet.Put( SfxUInt16Item( nWhich, static_cast< sal_uInt16 >( - pFmtr ? pFmtr->GetYear2000() + pFormatr ? pFormatr->GetYear2000() : ::utl::MiscCfg().GetYear2000() ))); } break; @@ -1024,7 +1024,7 @@ void SwDocShell::GetState(SfxItemSet& rSet) case SID_MAIL_PREPAREEXPORT: { //check if linked content or possibly hidden content is available - //m_pDoc->UpdateFlds( NULL, false ); + //m_pDoc->UpdateFields( NULL, false ); sfx2::LinkManager& rLnkMgr = m_pDoc->getIDocumentLinksAdministration().GetLinkManager(); const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); bool bRet = false; @@ -1134,8 +1134,8 @@ SwFEShell* SwDocShell::GetFEShell() void SwDocShell::RemoveOLEObjects() { - SwIterator<SwCntntNode,SwFmtColl> aIter( *m_pDoc->GetDfltGrfFmtColl() ); - for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) + SwIterator<SwContentNode,SwFormatColl> aIter( *m_pDoc->GetDfltGrfFormatColl() ); + for( SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) { SwOLENode* pOLENd = pNd->GetOLENode(); if( pOLENd && ( pOLENd->IsOLEObjectDeleted() || @@ -1162,8 +1162,8 @@ void SwDocShell::CalcLayoutForOLEObjects() if (!m_pWrtShell) return; - SwIterator<SwCntntNode,SwFmtColl> aIter( *m_pDoc->GetDfltGrfFmtColl() ); - for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) + SwIterator<SwContentNode,SwFormatColl> aIter( *m_pDoc->GetDfltGrfFormatColl() ); + for( SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) { SwOLENode* pOLENd = pNd->GetOLENode(); if( pOLENd && pOLENd->IsOLESizeInvalid() ) @@ -1181,9 +1181,9 @@ void SwDocShell::UpdateLinks() { GetDoc()->getIDocumentLinksAdministration().UpdateLinks(true); // #i50703# Update footnote numbers - SwTxtFtn::SetUniqueSeqRefNo( *GetDoc() ); + SwTextFootnote::SetUniqueSeqRefNo( *GetDoc() ); SwNodeIndex aTmp( GetDoc()->GetNodes() ); - GetDoc()->GetFtnIdxs().UpdateFtn( aTmp ); + GetDoc()->GetFootnoteIdxs().UpdateFootnote( aTmp ); } uno::Reference< frame::XController > diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 9b0f6cf242c7..60b8c0e3c769 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -167,7 +167,7 @@ void SwDocShell::ToggleBrowserMode(bool bSet, SwView* _pView ) pTempView->GetViewFrame()->GetBindings().Invalidate(FN_SHADOWCURSOR); if( !GetDoc()->getIDocumentDeviceAccess().getPrinter( false ) ) pTempView->SetPrinter( GetDoc()->getIDocumentDeviceAccess().getPrinter( false ), SfxPrinterChangeFlags::PRINTER | SfxPrinterChangeFlags::JOBSETUP ); - GetDoc()->CheckDefaultPageFmt(); + GetDoc()->CheckDefaultPageFormat(); SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, false); while (pTmpFrm) { @@ -282,7 +282,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) switch( nAction ) { case 2: - m_pDoc->getIDocumentFieldsAccess().GetSysFldType( RES_FILENAMEFLD )->UpdateFlds(); + m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_FILENAMEFLD )->UpdateFields(); break; // #i38126# - own action for event LOADFINISHED // in order to avoid a modified document. @@ -349,7 +349,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { case SID_AUTO_CORRECT_DLG: { - SvxSwAutoFmtFlags* pAFlags = &SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); + SvxSwAutoFormatFlags* pAFlags = &SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); SwAutoCompleteWord& rACW = SwDoc::GetAutoCompleteWords(); bool bOldLocked = rACW.IsLockWordLstLocked(), @@ -381,7 +381,7 @@ void SwDocShell::Execute(SfxRequest& rReq) rACW.SetLockWordLstLocked( bOldLocked ); - SwEditShell::SetAutoFmtFlags( pAFlags ); + SwEditShell::SetAutoFormatFlags( pAFlags ); rACW.SetMinWordLen( pAFlags->nAutoCmpltWordLen ); rACW.SetMaxCount( pAFlags->nAutoCmpltListLen ); if (pAFlags->m_pAutoCompleteList) // any changes? @@ -570,8 +570,8 @@ void SwDocShell::Execute(SfxRequest& rReq) if( !aFileName.isEmpty() ) { SwgReaderOption aOpt; - aOpt.SetTxtFmts( bText = bool(nFlags & SfxTemplateFlags::LOAD_TEXT_STYLES )); - aOpt.SetFrmFmts( bFrame = bool(nFlags & SfxTemplateFlags::LOAD_FRAME_STYLES)); + aOpt.SetTextFormats( bText = bool(nFlags & SfxTemplateFlags::LOAD_TEXT_STYLES )); + aOpt.SetFrameFormats( bFrame = bool(nFlags & SfxTemplateFlags::LOAD_FRAME_STYLES)); aOpt.SetPageDescs( bPage = bool(nFlags & SfxTemplateFlags::LOAD_PAGE_STYLES )); aOpt.SetNumRules( bNum = bool(nFlags & SfxTemplateFlags::LOAD_NUM_STYLES )); //different meaning between SFX_MERGE_STYLES and aOpt.SetMerge! @@ -839,7 +839,7 @@ void SwDocShell::Execute(SfxRequest& rReq) //pWrtShell is not set in page preview if (m_pWrtShell) m_pWrtShell->StartAllAction(); - m_pDoc->getIDocumentFieldsAccess().UpdateFlds( NULL, false ); + m_pDoc->getIDocumentFieldsAccess().UpdateFields( NULL, false ); m_pDoc->getIDocumentLinksAdministration().EmbedAllLinks(); m_IsRemovedInvisibleContent = officecfg::Office::Security::HiddenContent::RemoveHiddenContent::get(); @@ -966,7 +966,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { for(sal_uInt16 n = 0; n < rOutlNds.size(); ++n ) { - const int nLevel = rOutlNds[n]->GetTxtNode()->GetAttrOutlineLevel(); + const int nLevel = rOutlNds[n]->GetTextNode()->GetAttrOutlineLevel(); if( nLevel > 0 && ! bOutline[nLevel-1] ) { bOutline[nLevel-1] = true; @@ -974,7 +974,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } } - const sal_uInt16 nStyleCount = m_pDoc->GetTxtFmtColls()->size(); + const sal_uInt16 nStyleCount = m_pDoc->GetTextFormatColls()->size(); Sequence<OUString> aListBoxEntries( MAXLEVEL + nStyleCount); OUString* pEntries = aListBoxEntries.getArray(); sal_Int32 nIdx = 0 ; @@ -989,10 +989,10 @@ void SwDocShell::Execute(SfxRequest& rReq) OUString sStyle( SW_RESSTR(STR_FDLG_STYLE) ); for(sal_uInt16 i = 0; i < nStyleCount; ++i) { - SwTxtFmtColl &rTxtColl = *(*m_pDoc->GetTxtFmtColls())[ i ]; - if( !rTxtColl.IsDefault() && rTxtColl.IsAtDocNodeSet() ) + SwTextFormatColl &rTextColl = *(*m_pDoc->GetTextFormatColls())[ i ]; + if( !rTextColl.IsDefault() && rTextColl.IsAtDocNodeSet() ) { - pEntries[nIdx++] = sStyle + rTxtColl.GetName(); + pEntries[nIdx++] = sStyle + rTextColl.GetName(); } } @@ -1064,9 +1064,9 @@ void SwDocShell::Execute(SfxRequest& rReq) } else { - const SwTxtFmtColl* pSplitColl = 0; + const SwTextFormatColl* pSplitColl = 0; if ( !aTemplateName.isEmpty() ) - pSplitColl = m_pDoc->FindTxtFmtCollByName(aTemplateName); + pSplitColl = m_pDoc->FindTextFormatCollByName(aTemplateName); bDone = bCreateHtml ? m_pDoc->GenerateHTMLDoc( aFileName, pSplitColl ) : m_pDoc->GenerateGlobalDoc( aFileName, pSplitColl ); @@ -1241,12 +1241,12 @@ void SwDocShell::SetModified( bool bSet ) void SwDocShell::UpdateChildWindows() { - // if necessary newly initialize Flddlg (i.e. for TYP_SETVAR) + // if necessary newly initialize Fielddlg (i.e. for TYP_SETVAR) if(!GetView()) return; SfxViewFrame* pVFrame = GetView()->GetViewFrame(); - SwFldDlgWrapper *pWrp = static_cast<SwFldDlgWrapper*>(pVFrame-> - GetChildWindow( SwFldDlgWrapper::GetChildWindowId() )); + SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(pVFrame-> + GetChildWindow( SwFieldDlgWrapper::GetChildWindowId() )); if( pWrp ) pWrp->ReInitDlg( this ); @@ -1440,8 +1440,8 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL, pReader.reset(new SwReader( aMed, rURL, *m_pWrtShell->GetCrsr() )); } - pRead->GetReaderOpt().SetTxtFmts( rOpt.IsTxtFmts() ); - pRead->GetReaderOpt().SetFrmFmts( rOpt.IsFrmFmts() ); + pRead->GetReaderOpt().SetTextFormats( rOpt.IsTextFormats() ); + pRead->GetReaderOpt().SetFrameFormats( rOpt.IsFrameFormats() ); pRead->GetReaderOpt().SetPageDescs( rOpt.IsPageDescs() ); pRead->GetReaderOpt().SetNumRules( rOpt.IsNumRules() ); pRead->GetReaderOpt().SetMerge( rOpt.IsMerge() ); @@ -1480,9 +1480,9 @@ SfxInPlaceClient* SwDocShell::GetIPClient( const ::svt::EmbeddedObjectRef& xObjR static bool lcl_MergePortions(SwNode *const& pNode, void *) { - if (pNode->IsTxtNode()) + if (pNode->IsTextNode()) { - pNode->GetTxtNode()->FileLoadedInitHints(); + pNode->GetTextNode()->FileLoadedInitHints(); } return true; } diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index dcd203d423c3..fca4e2e44657 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -213,8 +213,8 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) m_pDoc->SetDefault(*pFontItem); if( !bHTMLTemplSet ) { - SwTxtFmtColl *pColl = m_pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD); - pColl->ResetFmtAttr(nFontWhich); + SwTextFormatColl *pColl = m_pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD); + pColl->ResetFormatAttr(nFontWhich); } pFontItem.reset(); sal_Int32 nFontHeight = pStdFont->GetFontHeight( FONT_STANDARD, i, eLanguage ); @@ -223,8 +223,8 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) m_pDoc->SetDefault(SvxFontHeightItem( nFontHeight, 100, aFontHeightWhich[i] )); if( !bHTMLTemplSet ) { - SwTxtFmtColl *pColl = m_pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD); - pColl->ResetFmtAttr(aFontHeightWhich[i]); + SwTextFormatColl *pColl = m_pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD); + pColl->ResetFormatAttr(aFontHeightWhich[i]); } } @@ -261,7 +261,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) nFontHeightWhich = RES_CHRATR_CTL_FONTSIZE; eLanguage = static_cast<const SvxLanguageItem&>(m_pDoc->GetDefault( RES_CHRATR_CTL_LANGUAGE )).GetLanguage(); } - SwTxtFmtColl *pColl = 0; + SwTextFormatColl *pColl = 0; if(!pStdFont->IsFontDefault(aFontIdPoolId[nIdx])) { sEntry = pStdFont->GetFontFor(aFontIdPoolId[nIdx]); @@ -270,12 +270,12 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) if( pPrt ) aFont = pPrt->GetFontMetric( aFont ); - pColl = m_pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]); + pColl = m_pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(aFontIdPoolId[nIdx + 1]); if( !bHTMLTemplSet || SfxItemState::SET != pColl->GetAttrSet().GetItemState( nFontWhich, false ) ) { - pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } } @@ -283,12 +283,12 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) if(nFontHeight <= 0) nFontHeight = SwStdFontConfig::GetDefaultHeightFor( aFontIdPoolId[nIdx], eLanguage ); if(!pColl) - pColl = m_pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]); - SvxFontHeightItem aFontHeight( static_cast<const SvxFontHeightItem&>(pColl->GetFmtAttr( nFontHeightWhich, true ))); + pColl = m_pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(aFontIdPoolId[nIdx + 1]); + SvxFontHeightItem aFontHeight( static_cast<const SvxFontHeightItem&>(pColl->GetFormatAttr( nFontHeightWhich, true ))); if(aFontHeight.GetHeight() != sal::static_int_cast<sal_uInt32, sal_Int32>(nFontHeight)) { aFontHeight.SetHeight(nFontHeight); - pColl->SetFmtAttr( aFontHeight ); + pColl->SetFormatAttr( aFontHeight ); } } diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index f58e99e504d0..77e79afc13a8 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -129,13 +129,13 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) // so that this family is being showed if(pShell->IsFrmSelected()) { - SwFrmFmt* pFmt = pShell->GetCurFrmFmt(); - if( pFmt ) - aName = pFmt->GetName(); + SwFrameFormat* pFormat = pShell->GetCurFrameFormat(); + if( pFormat ) + aName = pFormat->GetName(); } else { - SwTxtFmtColl* pColl = pShell->GetCurTxtFmtColl(); + SwTextFormatColl* pColl = pShell->GetCurTextFormatColl(); if(pColl) aName = pColl->GetName(); } @@ -145,9 +145,9 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) case SID_STYLE_FAMILY1: if( !pShell->IsFrmSelected() ) { - SwCharFmt* pFmt = pShell->GetCurCharFmt(); - if(pFmt) - aName = pFmt->GetName(); + SwCharFormat* pFormat = pShell->GetCurCharFormat(); + if(pFormat) + aName = pFormat->GetName(); else aName = SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD - RES_POOLCOLL_TEXT_BEGIN ]; @@ -158,7 +158,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) case SID_STYLE_FAMILY2: if(!pShell->IsFrmSelected()) { - SwTxtFmtColl* pColl = pShell->GetCurTxtFmtColl(); + SwTextFormatColl* pColl = pShell->GetCurTextFormatColl(); if(pColl) aName = pColl->GetName(); @@ -195,10 +195,10 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) rSet.DisableItem( nWhich ); else { - SwFrmFmt* pFmt = pShell->GetCurFrmFmt(); - if(pFmt && pShell->IsFrmSelected()) + SwFrameFormat* pFormat = pShell->GetCurFrameFormat(); + if(pFormat && pShell->IsFrmSelected()) { - aName = pFmt->GetName(); + aName = pFormat->GetName(); rSet.Put(SfxTemplateItem(nWhich, aName)); } } @@ -368,7 +368,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) case SID_STYLE_UPDATE_BY_EXAMPLE: case SID_STYLE_EDIT: { - SwTxtFmtColl* pColl = GetWrtShell()->GetCurTxtFmtColl(); + SwTextFormatColl* pColl = GetWrtShell()->GetCurTextFormatColl(); if(pColl) { aParam = pColl->GetName(); @@ -422,21 +422,21 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) { case SFX_STYLE_FAMILY_PARA: { - SwTxtFmtColl* pColl = pShell->GetCurTxtFmtColl(); + SwTextFormatColl* pColl = pShell->GetCurTextFormatColl(); if(pColl) aParam = pColl->GetName(); } break; case SFX_STYLE_FAMILY_FRAME: { - SwFrmFmt* pFrm = m_pWrtShell->GetCurFrmFmt(); + SwFrameFormat* pFrm = m_pWrtShell->GetCurFrameFormat(); if( pFrm ) aParam = pFrm->GetName(); } break; case SFX_STYLE_FAMILY_CHAR: { - SwCharFmt* pChar = m_pWrtShell->GetCurCharFmt(); + SwCharFormat* pChar = m_pWrtShell->GetCurCharFormat(); if( pChar ) aParam = pChar->GetName(); } @@ -657,12 +657,12 @@ sal_uInt16 SwDocShell::Edit( { if(!rParent.isEmpty()) { - SwTxtFmtColl* pColl = m_pWrtShell->FindTxtFmtCollByName( rParent ); + SwTextFormatColl* pColl = m_pWrtShell->FindTextFormatCollByName( rParent ); if(!pColl) { sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if(USHRT_MAX != nId) - pColl = m_pWrtShell->GetTxtCollFromPool( nId ); + pColl = m_pWrtShell->GetTextCollFromPool( nId ); } pDStyle->GetCollection()->SetDerivedFrom( pColl ); pDStyle->PresetParent( rParent ); @@ -674,13 +674,13 @@ sal_uInt16 SwDocShell::Edit( if (pColl && pColl->IsAssignedToListLevelOfOutlineStyle()) { SwNumRuleItem aItem(aEmptyOUStr); - pDStyle->GetCollection()->SetFmtAttr( aItem ); + pDStyle->GetCollection()->SetFormatAttr( aItem ); pDStyle->GetCollection()->SetAttrOutlineLevel( 0 ); } } else { - SwTxtFmtColl* pColl = m_pWrtShell->GetCurTxtFmtColl(); + SwTextFormatColl* pColl = m_pWrtShell->GetCurTextFormatColl(); pDStyle->GetCollection()->SetDerivedFrom( pColl ); if( pColl ) pDStyle->PresetParent( pColl->GetName() ); @@ -691,23 +691,23 @@ sal_uInt16 SwDocShell::Edit( { if(!rParent.isEmpty()) { - SwCharFmt* pCFmt = m_pWrtShell->FindCharFmtByName(rParent); - if(!pCFmt) + SwCharFormat* pCFormat = m_pWrtShell->FindCharFormatByName(rParent); + if(!pCFormat) { sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); if(USHRT_MAX != nId) - pCFmt = m_pWrtShell->GetCharFmtFromPool( nId ); + pCFormat = m_pWrtShell->GetCharFormatFromPool( nId ); } - pDStyle->GetCharFmt()->SetDerivedFrom( pCFmt ); + pDStyle->GetCharFormat()->SetDerivedFrom( pCFormat ); pDStyle->PresetParent( rParent ); } else { - SwCharFmt* pCFmt = m_pWrtShell->GetCurCharFmt(); - pDStyle->GetCharFmt()->SetDerivedFrom( pCFmt ); - if( pCFmt ) - pDStyle->PresetParent( pCFmt->GetName() ); + SwCharFormat* pCFormat = m_pWrtShell->GetCurCharFormat(); + pDStyle->GetCharFormat()->SetDerivedFrom( pCFormat ); + if( pCFormat ) + pDStyle->PresetParent( pCFormat->GetName() ); } } break; @@ -715,14 +715,14 @@ sal_uInt16 SwDocShell::Edit( { if(!rParent.isEmpty()) { - SwFrmFmt* pFFmt = m_pWrtShell->GetDoc()->FindFrmFmtByName( rParent ); - if(!pFFmt) + SwFrameFormat* pFFormat = m_pWrtShell->GetDoc()->FindFrameFormatByName( rParent ); + if(!pFFormat) { sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); if(USHRT_MAX != nId) - pFFmt = m_pWrtShell->GetFrmFmtFromPool( nId ); + pFFormat = m_pWrtShell->GetFrameFormatFromPool( nId ); } - pDStyle->GetFrmFmt()->SetDerivedFrom( pFFmt ); + pDStyle->GetFrameFormat()->SetDerivedFrom( pFFormat ); pDStyle->PresetParent( rParent ); } } @@ -925,8 +925,8 @@ sal_uInt16 SwDocShell::ApplyStyles(const OUString &rName, sal_uInt16 nFamily, { case SFX_STYLE_FAMILY_CHAR: { - SwFmtCharFmt aFmt(pStyle->GetCharFmt()); - pSh->SetAttrItem( aFmt, (nMode & KEY_SHIFT) ? + SwFormatCharFormat aFormat(pStyle->GetCharFormat()); + pSh->SetAttrItem( aFormat, (nMode & KEY_SHIFT) ? SetAttrMode::DONTREPLACE : SetAttrMode::DEFAULT ); break; } @@ -935,13 +935,13 @@ sal_uInt16 SwDocShell::ApplyStyles(const OUString &rName, sal_uInt16 nFamily, // #i62675# // clear also list attributes at affected text nodes, if paragraph // style has the list style attribute set. - pSh->SetTxtFmtColl( pStyle->GetCollection(), true ); + pSh->SetTextFormatColl( pStyle->GetCollection(), true ); break; } case SFX_STYLE_FAMILY_FRAME: { if ( pSh->IsFrmSelected() ) - pSh->SetFrmFmt( pStyle->GetFrmFmt() ); + pSh->SetFrameFormat( pStyle->GetFrameFormat() ); break; } case SFX_STYLE_FAMILY_PAGE: @@ -993,13 +993,13 @@ sal_uInt16 SwDocShell::DoWaterCan(const OUString &rName, sal_uInt16 nFamily) switch(nFamily) { case SFX_STYLE_FAMILY_CHAR: - aTemplate.aColl.pCharFmt = pStyle->GetCharFmt(); + aTemplate.aColl.pCharFormat = pStyle->GetCharFormat(); break; case SFX_STYLE_FAMILY_PARA: - aTemplate.aColl.pTxtColl = pStyle->GetCollection(); + aTemplate.aColl.pTextColl = pStyle->GetCollection(); break; case SFX_STYLE_FAMILY_FRAME: - aTemplate.aColl.pFrmFmt = pStyle->GetFrmFmt(); + aTemplate.aColl.pFrameFormat = pStyle->GetFrameFormat(); break; case SFX_STYLE_FAMILY_PAGE: aTemplate.aColl.pPageDesc = const_cast<SwPageDesc*>(pStyle->GetPageDesc()); @@ -1036,7 +1036,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw { case SFX_STYLE_FAMILY_PARA: { - SwTxtFmtColl* pColl = pStyle->GetCollection(); + SwTextFormatColl* pColl = pStyle->GetCollection(); if(pColl && !pColl->IsDefault()) { GetWrtShell()->StartAllAction(); @@ -1047,7 +1047,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw GetWrtShell()->StartUndo(UNDO_INSFMTATTR, &aRewriter); GetWrtShell()->FillByEx(pColl); // also apply template to remove hard set attributes - GetWrtShell()->SetTxtFmtColl( pColl ); + GetWrtShell()->SetTextFormatColl( pColl ); GetWrtShell()->EndUndo(); GetWrtShell()->EndAllAction(); } @@ -1055,10 +1055,10 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw } case SFX_STYLE_FAMILY_FRAME: { - SwFrmFmt* pFrm = pStyle->GetFrmFmt(); + SwFrameFormat* pFrm = pStyle->GetFrameFormat(); if( pCurrWrtShell->IsFrmSelected() && pFrm && !pFrm->IsDefault() ) { - SfxItemSet aSet( GetPool(), aFrmFmtSetRange ); + SfxItemSet aSet( GetPool(), aFrameFormatSetRange ); pCurrWrtShell->StartAllAction(); pCurrWrtShell->GetFlyFrmAttr( aSet ); @@ -1066,17 +1066,17 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw // no update of anchor attribute aSet.ClearItem( RES_ANCHOR ); - pFrm->SetFmtAttr( aSet ); + pFrm->SetFormatAttr( aSet ); // also apply template to remove hard set attributes - pCurrWrtShell->SetFrmFmt( pFrm, true ); + pCurrWrtShell->SetFrameFormat( pFrm, true ); pCurrWrtShell->EndAllAction(); } } break; case SFX_STYLE_FAMILY_CHAR: { - SwCharFmt* pChar = pStyle->GetCharFmt(); + SwCharFormat* pChar = pStyle->GetCharFormat(); if( pChar && !pChar->IsDefault() ) { pCurrWrtShell->StartAllAction(); @@ -1097,7 +1097,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw // #i91400# aRule.SetName( pStyle->GetNumRule()->GetName(), pCurrWrtShell->GetDoc()->getIDocumentListsAccess() ); - pCurrWrtShell->ChgNumRuleFmts( aRule ); + pCurrWrtShell->ChgNumRuleFormats( aRule ); } } break; @@ -1129,16 +1129,16 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily, { case SFX_STYLE_FAMILY_PARA: { - SwTxtFmtColl* pColl = pStyle->GetCollection(); + SwTextFormatColl* pColl = pStyle->GetCollection(); if(pColl && !pColl->IsDefault()) { pCurrWrtShell->StartAllAction(); pCurrWrtShell->FillByEx(pColl); // also apply template to remove hard set attributes - pColl->SetDerivedFrom(pCurrWrtShell->GetCurTxtFmtColl()); + pColl->SetDerivedFrom(pCurrWrtShell->GetCurTextFormatColl()); // set the mask at the Collection: - sal_uInt16 nId = pColl->GetPoolFmtId() & 0x87ff; + sal_uInt16 nId = pColl->GetPoolFormatId() & 0x87ff; switch( nMask & 0x0fff ) { case SWSTYLEBIT_TEXT: @@ -1160,43 +1160,43 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily, nId |= COLL_HTML_BITS; break; } - pColl->SetPoolFmtId(nId); + pColl->SetPoolFormatId(nId); - pCurrWrtShell->SetTxtFmtColl(pColl); + pCurrWrtShell->SetTextFormatColl(pColl); pCurrWrtShell->EndAllAction(); } } break; case SFX_STYLE_FAMILY_FRAME: { - SwFrmFmt* pFrm = pStyle->GetFrmFmt(); + SwFrameFormat* pFrm = pStyle->GetFrameFormat(); if(pCurrWrtShell->IsFrmSelected() && pFrm && !pFrm->IsDefault()) { pCurrWrtShell->StartAllAction(); - SfxItemSet aSet(GetPool(), aFrmFmtSetRange ); + SfxItemSet aSet(GetPool(), aFrameFormatSetRange ); pCurrWrtShell->GetFlyFrmAttr( aSet ); - SwFrmFmt* pFFmt = pCurrWrtShell->GetCurFrmFmt(); - pFrm->SetDerivedFrom( pFFmt ); + SwFrameFormat* pFFormat = pCurrWrtShell->GetCurFrameFormat(); + pFrm->SetDerivedFrom( pFFormat ); - pFrm->SetFmtAttr( aSet ); + pFrm->SetFormatAttr( aSet ); // also apply template to remove hard set attributes - pCurrWrtShell->SetFrmFmt( pFrm ); + pCurrWrtShell->SetFrameFormat( pFrm ); pCurrWrtShell->EndAllAction(); } } break; case SFX_STYLE_FAMILY_CHAR: { - SwCharFmt* pChar = pStyle->GetCharFmt(); + SwCharFormat* pChar = pStyle->GetCharFormat(); if(pChar && !pChar->IsDefault()) { pCurrWrtShell->StartAllAction(); pCurrWrtShell->FillByEx( pChar ); - pChar->SetDerivedFrom( pCurrWrtShell->GetCurCharFmt() ); - SwFmtCharFmt aFmt( pChar ); - pCurrWrtShell->SetAttrItem( aFmt ); + pChar->SetDerivedFrom( pCurrWrtShell->GetCurCharFormat() ); + SwFormatCharFormat aFormat( pChar ); + pCurrWrtShell->SetAttrItem( aFormat ); pCurrWrtShell->EndAllAction(); } } @@ -1209,14 +1209,14 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily, SwPageDesc& rSrc = (SwPageDesc&)pCurrWrtShell->GetPageDesc( nPgDsc ); SwPageDesc& rDest = *const_cast<SwPageDesc*>(pStyle->GetPageDesc()); - sal_uInt16 nPoolId = rDest.GetPoolFmtId(); + sal_uInt16 nPoolId = rDest.GetPoolFormatId(); sal_uInt16 nHId = rDest.GetPoolHelpId(); sal_uInt8 nHFId = rDest.GetPoolHlpFileId(); pCurrWrtShell->GetDoc()->CopyPageDesc( rSrc, rDest ); // PoolId must NEVER be copied! - rDest.SetPoolFmtId( nPoolId ); + rDest.SetPoolFormatId( nPoolId ); rDest.SetPoolHelpId( nHId ); rDest.SetPoolHlpFileId( nHFId ); @@ -1240,7 +1240,7 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily, // #i91400# aRule.SetName( pStyle->GetNumRule()->GetName(), pCurrWrtShell->GetDoc()->getIDocumentListsAccess() ); - pCurrWrtShell->ChgNumRuleFmts( aRule ); + pCurrWrtShell->ChgNumRuleFormats( aRule ); pCurrWrtShell->ReplaceNumRule( sOrigRule, aRule.GetName() ); diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 8260a1c46c49..bb0f62f0b6a7 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -115,35 +115,35 @@ SwImplShellAction::~SwImplShellAction() // find/create SwCharFormate // possibly fill Style -static SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, +static SwCharFormat* lcl_FindCharFormat( SwDoc& rDoc, const OUString& rName, SwDocStyleSheet* pStyle = 0, bool bCreate = true ) { - SwCharFmt* pFmt = 0; + SwCharFormat* pFormat = 0; if (!rName.isEmpty()) { - pFmt = rDoc.FindCharFmtByName( rName ); - if( !pFmt && rName == SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD - + pFormat = rDoc.FindCharFormatByName( rName ); + if( !pFormat && rName == SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD - RES_POOLCOLL_TEXT_BEGIN ] ) { // Standard-Character template - pFmt = rDoc.GetDfltCharFmt(); + pFormat = rDoc.GetDfltCharFormat(); } - if( !pFmt && bCreate ) + if( !pFormat && bCreate ) { // explore Pool const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); if(nId != USHRT_MAX) - pFmt = rDoc.getIDocumentStylePoolAccess().GetCharFmtFromPool(nId); + pFormat = rDoc.getIDocumentStylePoolAccess().GetCharFormatFromPool(nId); } } if(pStyle) { - if(pFmt) + if(pFormat) { pStyle->SetPhysical(true); - SwFmt* p = pFmt->DerivedFrom(); + SwFormat* p = pFormat->DerivedFrom(); if( p && !p->IsDefault() ) pStyle->PresetParent( p->GetName() ); else @@ -152,26 +152,26 @@ static SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, else pStyle->SetPhysical(false); } - return pFmt; + return pFormat; } // find/create ParaFormats // fill Style -static SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, +static SwTextFormatColl* lcl_FindParaFormat( SwDoc& rDoc, const OUString& rName, SwDocStyleSheet* pStyle = 0, bool bCreate = true ) { - SwTxtFmtColl* pColl = 0; + SwTextFormatColl* pColl = 0; if (!rName.isEmpty()) { - pColl = rDoc.FindTxtFmtCollByName( rName ); + pColl = rDoc.FindTextFormatCollByName( rName ); if( !pColl && bCreate ) { // explore Pool const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if(nId != USHRT_MAX) - pColl = rDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool(nId); + pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(nId); } } @@ -185,7 +185,7 @@ static SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, else pStyle->PresetParent( OUString() ); - SwTxtFmtColl& rNext = pColl->GetNextTxtFmtColl(); + SwTextFormatColl& rNext = pColl->GetNextTextFormatColl(); pStyle->PresetFollow(rNext.GetName()); } else @@ -195,37 +195,37 @@ static SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, } // Border formats -static SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc, +static SwFrameFormat* lcl_FindFrameFormat( SwDoc& rDoc, const OUString& rName, SwDocStyleSheet* pStyle = 0, bool bCreate = true ) { - SwFrmFmt* pFmt = 0; + SwFrameFormat* pFormat = 0; if( !rName.isEmpty() ) { - pFmt = rDoc.FindFrmFmtByName( rName ); - if( !pFmt && bCreate ) + pFormat = rDoc.FindFrameFormatByName( rName ); + if( !pFormat && bCreate ) { // explore Pool const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); if(nId != USHRT_MAX) - pFmt = rDoc.getIDocumentStylePoolAccess().GetFrmFmtFromPool(nId); + pFormat = rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool(nId); } } if(pStyle) { - if(pFmt) + if(pFormat) { pStyle->SetPhysical(true); - if( pFmt->DerivedFrom() && !pFmt->DerivedFrom()->IsDefault() ) - pStyle->PresetParent( pFmt->DerivedFrom()->GetName() ); + if( pFormat->DerivedFrom() && !pFormat->DerivedFrom()->IsDefault() ) + pStyle->PresetParent( pFormat->DerivedFrom()->GetName() ); else pStyle->PresetParent( OUString() ); } else pStyle->SetPhysical(false); } - return pFmt; + return pFormat; } // Page descriptors @@ -294,7 +294,7 @@ static const SwNumRule* lcl_FindNumRule( SwDoc& rDoc, return pRule; } -sal_uInt32 SwStyleSheetIterator::SwPoolFmtList::FindName(SfxStyleFamily eFam, +sal_uInt32 SwStyleSheetIterator::SwPoolFormatList::FindName(SfxStyleFamily eFam, const OUString &rName) { if(!maImpl.empty()) @@ -335,7 +335,7 @@ sal_uInt32 SwStyleSheetIterator::SwPoolFmtList::FindName(SfxStyleFamily eFam, return SAL_MAX_UINT32; } -void SwStyleSheetIterator::SwPoolFmtList::rehash() +void SwStyleSheetIterator::SwPoolFormatList::rehash() { maUnique.clear(); for (size_t i = 0; i < maImpl.size(); i++) @@ -343,7 +343,7 @@ void SwStyleSheetIterator::SwPoolFmtList::rehash() assert (maImpl.size() == maUnique.size()); } -void SwStyleSheetIterator::SwPoolFmtList::RemoveName(SfxStyleFamily eFam, +void SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam, const OUString &rName) { sal_uInt32 nTmpPos = FindName( eFam, rName ); @@ -356,7 +356,7 @@ void SwStyleSheetIterator::SwPoolFmtList::RemoveName(SfxStyleFamily eFam, } // Add Strings to the list of templates -void SwStyleSheetIterator::SwPoolFmtList::Append( char cChar, const OUString& rStr ) +void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString& rStr ) { const OUString aStr = OUString(cChar) + rStr; @@ -377,9 +377,9 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, sal_uInt16 _nMask) : SfxStyleSheetBase( rName, _rPool, eFam, _nMask ), - pCharFmt(0), + pCharFormat(0), pColl(0), - pFrmFmt(0), + pFrameFormat(0), pDesc(0), pNumRule(0), @@ -420,9 +420,9 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, SwDocStyleSheet::SwDocStyleSheet( const SwDocStyleSheet& rOrg) : SfxStyleSheetBase(rOrg), - pCharFmt(rOrg.pCharFmt), + pCharFormat(rOrg.pCharFormat), pColl(rOrg.pColl), - pFrmFmt(rOrg.pFrmFmt), + pFrameFormat(rOrg.pFrameFormat), pDesc(rOrg.pDesc), pNumRule(rOrg.pNumRule), rDoc(rOrg.rDoc), @@ -449,22 +449,22 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal) if (!bPhysical) FillStyleSheet(FillPhysical); - SwFmt* pFmt = 0; + SwFormat* pFormat = 0; switch (nFamily) { case SFX_STYLE_FAMILY_CHAR: - pFmt = rDoc.FindCharFmtByName(aName); - if (pFmt) + pFormat = rDoc.FindCharFormatByName(aName); + if (pFormat) { - pFmt->SetGrabBagItem(rVal); + pFormat->SetGrabBagItem(rVal); bChg = true; } break; case SFX_STYLE_FAMILY_PARA: - pFmt = rDoc.FindTxtFmtCollByName(aName); - if (pFmt) + pFormat = rDoc.FindTextFormatCollByName(aName); + if (pFormat) { - pFmt->SetGrabBagItem(rVal); + pFormat->SetGrabBagItem(rVal); bChg = true; } break; @@ -494,18 +494,18 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal) void SwDocStyleSheet::GetGrabBagItem(uno::Any& rVal) const { - SwFmt* pFmt = 0; + SwFormat* pFormat = 0; switch (nFamily) { case SFX_STYLE_FAMILY_CHAR: - pFmt = rDoc.FindCharFmtByName(aName); - if (pFmt) - pFmt->GetGrabBagItem(rVal); + pFormat = rDoc.FindCharFormatByName(aName); + if (pFormat) + pFormat->GetGrabBagItem(rVal); break; case SFX_STYLE_FAMILY_PARA: - pFmt = rDoc.FindTxtFmtCollByName(aName); - if (pFmt) - pFmt->GetGrabBagItem(rVal); + pFormat = rDoc.FindTextFormatCollByName(aName); + if (pFormat) + pFormat->GetGrabBagItem(rVal); break; case SFX_STYLE_FAMILY_PSEUDO: { @@ -525,32 +525,32 @@ void SwDocStyleSheet::SetHidden( bool bValue ) if(!bPhysical) FillStyleSheet( FillPhysical ); - SwFmt* pFmt = 0; + SwFormat* pFormat = 0; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR: - pFmt = rDoc.FindCharFmtByName( aName ); - if ( pFmt ) + pFormat = rDoc.FindCharFormatByName( aName ); + if ( pFormat ) { - pFmt->SetHidden( bValue ); + pFormat->SetHidden( bValue ); bChg = true; } break; case SFX_STYLE_FAMILY_PARA: - pFmt = rDoc.FindTxtFmtCollByName( aName ); - if ( pFmt ) + pFormat = rDoc.FindTextFormatCollByName( aName ); + if ( pFormat ) { - pFmt->SetHidden( bValue ); + pFormat->SetHidden( bValue ); bChg = true; } break; case SFX_STYLE_FAMILY_FRAME: - pFmt = rDoc.FindFrmFmtByName( aName ); - if ( pFmt ) + pFormat = rDoc.FindFrameFormatByName( aName ); + if ( pFormat ) { - pFmt->SetHidden( bValue ); + pFormat->SetHidden( bValue ); bChg = true; } break; @@ -593,22 +593,22 @@ bool SwDocStyleSheet::IsHidden( ) const { bool bRet = false; - SwFmt* pFmt = 0; + SwFormat* pFormat = 0; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR: - pFmt = rDoc.FindCharFmtByName( aName ); - bRet = pFmt && pFmt->IsHidden( ); + pFormat = rDoc.FindCharFormatByName( aName ); + bRet = pFormat && pFormat->IsHidden( ); break; case SFX_STYLE_FAMILY_PARA: - pFmt = rDoc.FindTxtFmtCollByName( aName ); - bRet = pFmt && pFmt->IsHidden( ); + pFormat = rDoc.FindTextFormatCollByName( aName ); + bRet = pFormat && pFormat->IsHidden( ); break; case SFX_STYLE_FAMILY_FRAME: - pFmt = rDoc.FindFrmFmtByName( aName ); - bRet = pFmt && pFmt->IsHidden( ); + pFormat = rDoc.FindFrameFormatByName( aName ); + bRet = pFormat && pFormat->IsHidden( ); break; case SFX_STYLE_FAMILY_PAGE: @@ -633,22 +633,22 @@ const OUString& SwDocStyleSheet::GetParent() const if( !bPhysical ) { // check if it's already in document - SwFmt* pFmt = 0; + SwFormat* pFormat = 0; SwGetPoolIdFromName eGetType; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR: - pFmt = rDoc.FindCharFmtByName( aName ); + pFormat = rDoc.FindCharFormatByName( aName ); eGetType = nsSwGetPoolIdFromName::GET_POOLID_CHRFMT; break; case SFX_STYLE_FAMILY_PARA: - pFmt = rDoc.FindTxtFmtCollByName( aName ); + pFormat = rDoc.FindTextFormatCollByName( aName ); eGetType = nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL; break; case SFX_STYLE_FAMILY_FRAME: - pFmt = rDoc.FindFrmFmtByName( aName ); + pFormat = rDoc.FindFrameFormatByName( aName ); eGetType = nsSwGetPoolIdFromName::GET_POOLID_FRMFMT; break; @@ -659,7 +659,7 @@ const OUString& SwDocStyleSheet::GetParent() const } OUString sTmp; - if( !pFmt ) // not yet there, so default Parent + if( !pFormat ) // not yet there, so default Parent { sal_uInt16 i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType ); i = ::GetPoolParent( i ); @@ -668,7 +668,7 @@ const OUString& SwDocStyleSheet::GetParent() const } else { - SwFmt* p = pFmt->DerivedFrom(); + SwFormat* p = pFormat->DerivedFrom(); if( p && !p->IsDefault() ) sTmp = p->GetName(); } @@ -960,13 +960,13 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow) { case SFX_STYLE_FAMILY_CHAR : { - OSL_ENSURE(pCharFmt, "SwCharFormat missing!"); - if( pCharFmt && pCharFmt->GetName() != rStr ) + OSL_ENSURE(pCharFormat, "SwCharFormat missing!"); + if( pCharFormat && pCharFormat->GetName() != rStr ) { - if (!pCharFmt->GetName().isEmpty()) - rDoc.RenameFmt(*pCharFmt, rStr); + if (!pCharFormat->GetName().isEmpty()) + rDoc.RenameFormat(*pCharFormat, rStr); else - pCharFmt->SetName(rStr); + pCharFormat->SetName(rStr); bChg = true; } @@ -978,7 +978,7 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow) if( pColl && pColl->GetName() != rStr ) { if (!pColl->GetName().isEmpty()) - rDoc.RenameFmt(*pColl, rStr); + rDoc.RenameFormat(*pColl, rStr); else pColl->SetName(rStr); @@ -988,13 +988,13 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow) } case SFX_STYLE_FAMILY_FRAME: { - OSL_ENSURE(pFrmFmt, "FrmFmt missing!"); - if( pFrmFmt && pFrmFmt->GetName() != rStr ) + OSL_ENSURE(pFrameFormat, "FrameFormat missing!"); + if( pFrameFormat && pFrameFormat->GetName() != rStr ) { - if (!pFrmFmt->GetName().isEmpty()) - rDoc.RenameFmt(*pFrmFmt, rStr); + if (!pFrameFormat->GetName().isEmpty()) + rDoc.RenameFormat(*pFrameFormat, rStr); else - pFrmFmt->SetName( rStr ); + pFrameFormat->SetName( rStr ); bChg = true; } @@ -1069,25 +1069,25 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow) // hierarchy of deduction bool SwDocStyleSheet::SetParent( const OUString& rStr) { - SwFmt* pFmt = 0, *pParent = 0; + SwFormat* pFormat = 0, *pParent = 0; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR : - OSL_ENSURE( pCharFmt, "SwCharFormat missing!" ); - if( 0 != ( pFmt = pCharFmt ) && !rStr.isEmpty() ) - pParent = lcl_FindCharFmt(rDoc, rStr); + OSL_ENSURE( pCharFormat, "SwCharFormat missing!" ); + if( 0 != ( pFormat = pCharFormat ) && !rStr.isEmpty() ) + pParent = lcl_FindCharFormat(rDoc, rStr); break; case SFX_STYLE_FAMILY_PARA : OSL_ENSURE( pColl, "Collektion missing!"); - if( 0 != ( pFmt = pColl ) && !rStr.isEmpty() ) - pParent = lcl_FindParaFmt( rDoc, rStr ); + if( 0 != ( pFormat = pColl ) && !rStr.isEmpty() ) + pParent = lcl_FindParaFormat( rDoc, rStr ); break; case SFX_STYLE_FAMILY_FRAME: - OSL_ENSURE(pFrmFmt, "FrameFormat missing!"); - if( 0 != ( pFmt = pFrmFmt ) && !rStr.isEmpty() ) - pParent = lcl_FindFrmFmt( rDoc, rStr ); + OSL_ENSURE(pFrameFormat, "FrameFormat missing!"); + if( 0 != ( pFormat = pFrameFormat ) && !rStr.isEmpty() ) + pParent = lcl_FindFrameFormat( rDoc, rStr ); break; case SFX_STYLE_FAMILY_PAGE: @@ -1098,12 +1098,12 @@ bool SwDocStyleSheet::SetParent( const OUString& rStr) } bool bRet = false; - if( pFmt && pFmt->DerivedFrom() && - pFmt->DerivedFrom()->GetName() != rStr ) + if( pFormat && pFormat->DerivedFrom() && + pFormat->DerivedFrom()->GetName() != rStr ) { { SwImplShellAction aTmp( rDoc ); - bRet = pFmt->SetDerivedFrom( pParent ); + bRet = pFormat->SetDerivedFrom( pParent ); } if( bRet ) @@ -1131,11 +1131,11 @@ bool SwDocStyleSheet::SetFollow( const OUString& rStr) OSL_ENSURE(pColl, "Collection missing!"); if( pColl ) { - SwTxtFmtColl* pFollow = pColl; - if( !rStr.isEmpty() && 0 == (pFollow = lcl_FindParaFmt(rDoc, rStr) )) + SwTextFormatColl* pFollow = pColl; + if( !rStr.isEmpty() && 0 == (pFollow = lcl_FindParaFormat(rDoc, rStr) )) pFollow = pColl; - pColl->SetNextTxtFmtColl(*pFollow); + pColl->SetNextTextFormatColl(*pFollow); } break; } @@ -1192,32 +1192,32 @@ SfxItemSet& SwDocStyleSheet::GetItemSet() if( nFamily == SFX_STYLE_FAMILY_CHAR ) { - SAL_WARN_IF(!pCharFmt, "sw.ui", "Where's SwCharFmt"); - aCoreSet.Put(pCharFmt->GetAttrSet()); + SAL_WARN_IF(!pCharFormat, "sw.ui", "Where's SwCharFormat"); + aCoreSet.Put(pCharFormat->GetAttrSet()); aCoreSet.Put( aBoxInfo ); - if(pCharFmt->DerivedFrom()) - aCoreSet.SetParent(&pCharFmt->DerivedFrom()->GetAttrSet()); + if(pCharFormat->DerivedFrom()) + aCoreSet.SetParent(&pCharFormat->DerivedFrom()->GetAttrSet()); } else if ( nFamily == SFX_STYLE_FAMILY_PARA ) { OSL_ENSURE(pColl, "Where's Collection"); aCoreSet.Put(pColl->GetAttrSet()); aCoreSet.Put( aBoxInfo ); - aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, pColl->IsAutoUpdateFmt())); + aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, pColl->IsAutoUpdateFormat())); if(pColl->DerivedFrom()) aCoreSet.SetParent(&pColl->DerivedFrom()->GetAttrSet()); } else { - OSL_ENSURE(pFrmFmt, "Where's FrmFmt"); - aCoreSet.Put(pFrmFmt->GetAttrSet()); + OSL_ENSURE(pFrameFormat, "Where's FrameFormat"); + aCoreSet.Put(pFrameFormat->GetAttrSet()); aCoreSet.Put( aBoxInfo ); - aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, pFrmFmt->IsAutoUpdateFmt())); + aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, pFrameFormat->IsAutoUpdateFormat())); - if(pFrmFmt->DerivedFrom()) - aCoreSet.SetParent(&pFrmFmt->DerivedFrom()->GetAttrSet()); + if(pFrameFormat->DerivedFrom()) + aCoreSet.SetParent(&pFrameFormat->DerivedFrom()->GetAttrSet()); //UUUU create needed items for XPropertyList entries from the DrawModel so that // the Area TabPage can access them @@ -1236,7 +1236,7 @@ SfxItemSet& SwDocStyleSheet::GetItemSet() //UUUU set correct parent to get the drawing::FillStyle_NONE FillStyle as needed if(!aCoreSet.GetParent()) { - aCoreSet.SetParent(&rDoc.GetDfltFrmFmt()->GetAttrSet()); + aCoreSet.SetParent(&rDoc.GetDfltFrameFormat()->GetAttrSet()); } OSL_ENSURE(pDesc, "No PageDescriptor"); @@ -1279,12 +1279,12 @@ void SwDocStyleSheet::MergeIndentAttrsOfListStyle( SfxItemSet& rSet ) const SwNumRule* pRule = rDoc.FindNumRulePtr( sNumRule ); if( pRule ) { - const SwNumFmt& rFmt = pRule->Get( 0 ); - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + const SwNumFormat& rFormat = pRule->Get( 0 ); + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { SvxLRSpaceItem aLR( RES_LR_SPACE ); - aLR.SetTxtLeft( rFmt.GetIndentAt() ); - aLR.SetTxtFirstLineOfst( static_cast<short>(rFmt.GetFirstLineIndent()) ); + aLR.SetTextLeft( rFormat.GetIndentAt() ); + aLR.SetTextFirstLineOfst( static_cast<short>(rFormat.GetFirstLineIndent()) ); rSet.Put( aLR ); } } @@ -1311,7 +1311,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_INSFMTATTR, &aRewriter ); } - SwFmt* pFmt = 0; + SwFormat* pFormat = 0; SwPageDesc* pNewDsc = 0; size_t nPgDscPos = 0; @@ -1319,8 +1319,8 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { case SFX_STYLE_FAMILY_CHAR : { - OSL_ENSURE(pCharFmt, "Where's CharFormat"); - pFmt = pCharFmt; + OSL_ENSURE(pCharFormat, "Where's CharFormat"); + pFormat = pCharFormat; } break; @@ -1330,7 +1330,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, const SfxPoolItem* pAutoUpdate; if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) { - pColl->SetAutoUpdateFmt(static_cast<const SfxBoolItem*>(pAutoUpdate)->GetValue()); + pColl->SetAutoUpdateFormat(static_cast<const SfxBoolItem*>(pAutoUpdate)->GetValue()); } const SwCondCollItem* pCondItem; @@ -1344,15 +1344,15 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++) { SwCollCondition aCond( 0, pCmds[ i ].nCnd, pCmds[ i ].nSubCond ); - static_cast<SwConditionTxtFmtColl*>(pColl)->RemoveCondition( aCond ); + static_cast<SwConditionTextFormatColl*>(pColl)->RemoveCondition( aCond ); const OUString sStyle = pCondItem->GetStyle( i ); if (sStyle.isEmpty()) continue; - SwFmt *const pFindFmt = lcl_FindParaFmt( rDoc, sStyle, 0, true ); - if (pFindFmt) + SwFormat *const pFindFormat = lcl_FindParaFormat( rDoc, sStyle, 0, true ); + if (pFindFormat) { - aCond.RegisterToFormat( *pFindFmt ); - static_cast<SwConditionTxtFmtColl*>(pColl)->InsertCondition( aCond ); + aCond.RegisterToFormat( *pFindFormat ); + static_cast<SwConditionTextFormatColl*>(pColl)->InsertCondition( aCond ); } } @@ -1364,10 +1364,10 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { // no conditional template, then first create and adopt // all important values - SwConditionTxtFmtColl* pCColl = rDoc.MakeCondTxtFmtColl( - pColl->GetName(), static_cast<SwTxtFmtColl*>(pColl->DerivedFrom()) ); - if( pColl != &pColl->GetNextTxtFmtColl() ) - pCColl->SetNextTxtFmtColl( pColl->GetNextTxtFmtColl() ); + SwConditionTextFormatColl* pCColl = rDoc.MakeCondTextFormatColl( + pColl->GetName(), static_cast<SwTextFormatColl*>(pColl->DerivedFrom()) ); + if( pColl != &pColl->GetNextTextFormatColl() ) + pCColl->SetNextTextFormatColl( pColl->GetNextTextFormatColl() ); if( pColl->IsAssignedToListLevelOfOutlineStyle()) pCColl->AssignToListLevelOfOutlineStyle(pColl->GetAssignedOutlineStyleLevel()); @@ -1380,15 +1380,15 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, const OUString sStyle = pCondItem->GetStyle( i ); if (sStyle.isEmpty()) continue; - SwTxtFmtColl *const pFindFmt = lcl_FindParaFmt( rDoc, sStyle, 0, true ); - if (pFindFmt) + SwTextFormatColl *const pFindFormat = lcl_FindParaFormat( rDoc, sStyle, 0, true ); + if (pFindFormat) { - pCColl->InsertCondition( SwCollCondition( pFindFmt, + pCColl->InsertCondition( SwCollCondition( pFindFormat, pCmds[ i ].nCnd, pCmds[ i ].nSubCond ) ); } } - rDoc.DelTxtFmtColl( pColl ); + rDoc.DelTextFormatColl( pColl ); pColl = pCColl; } if ( bResetIndentAttrsAtParagraphStyle && @@ -1421,9 +1421,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, } } - pFmt = pColl; + pFormat = pColl; - sal_uInt16 nId = pColl->GetPoolFmtId() & + sal_uInt16 nId = pColl->GetPoolFormatId() & ~ ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID ); switch( GetMask() & ( 0x0fff & ~SWSTYLEBIT_CONDCOLL ) ) { @@ -1446,18 +1446,18 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, nId |= COLL_HTML_BITS; break; } - pColl->SetPoolFmtId( nId ); + pColl->SetPoolFormatId( nId ); break; } case SFX_STYLE_FAMILY_FRAME: { - OSL_ENSURE(pFrmFmt, "Where's FrmFmt"); + OSL_ENSURE(pFrameFormat, "Where's FrameFormat"); const SfxPoolItem* pAutoUpdate; if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) { - pFrmFmt->SetAutoUpdateFmt(static_cast<const SfxBoolItem*>(pAutoUpdate)->GetValue()); + pFrameFormat->SetAutoUpdateFormat(static_cast<const SfxBoolItem*>(pAutoUpdate)->GetValue()); } - pFmt = pFrmFmt; + pFormat = pFrameFormat; } break; @@ -1473,7 +1473,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, ::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo()); rDoc.CopyPageDesc(*pDesc, *pNewDsc); // #i7983# - pFmt = &pNewDsc->GetMaster(); + pFormat = &pNewDsc->GetMaster(); } } break; @@ -1494,7 +1494,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, pSetRule->UnLinkGraphics(); SwNumRule aSetRule(*pNumRule); aSetRule.SetSvxRule(*pSetRule, &rDoc); - rDoc.ChgNumRuleFmts( aSetRule ); + rDoc.ChgNumRuleFormats( aSetRule ); } break; case SfxItemState::DONTCARE: @@ -1504,7 +1504,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, SwNumRule aRule( pNumRule->GetName(), // #i89178# numfunc::GetDefaultPositionAndSpaceMode() ); - rDoc.ChgNumRuleFmts( aRule ); + rDoc.ChgNumRuleFormats( aRule ); } break; default: break; @@ -1516,7 +1516,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, OSL_ENSURE(false, "unknown style family"); } - if( pFmt && rSet.Count()) + if( pFormat && rSet.Count()) { SfxItemIter aIter( rSet ); const SfxPoolItem* pItem = aIter.GetCurItem(); @@ -1527,7 +1527,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, // use method <SwDoc::ResetAttrAtFormat(..)> in order to // create an Undo object for the attribute reset. rDoc.ResetAttrAtFormat( rSet.GetWhichByPos(aIter.GetCurPos()), - *pFmt ); + *pFormat ); } if( aIter.IsAtEnd() ) @@ -1556,7 +1556,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, delete pNewDsc; } else - rDoc.ChgFmt(*pFmt, aSet); // put all that is set + rDoc.ChgFormat(*pFormat, aSet); // put all that is set } else { @@ -1580,28 +1580,28 @@ static void lcl_SaveStyles( sal_uInt16 nFamily, std::vector<void*>& rArr, SwDoc& { case SFX_STYLE_FAMILY_CHAR: { - const SwCharFmts& rTbl = *rDoc.GetCharFmts(); - for( size_t n = 0, nCnt = rTbl.size(); n < nCnt; ++n ) + const SwCharFormats& rTable = *rDoc.GetCharFormats(); + for( size_t n = 0, nCnt = rTable.size(); n < nCnt; ++n ) { - rArr.push_back( rTbl[ n ] ); + rArr.push_back( rTable[ n ] ); } } break; case SFX_STYLE_FAMILY_PARA: { - const SwTxtFmtColls& rTbl = *rDoc.GetTxtFmtColls(); - for( size_t n = 0, nCnt = rTbl.size(); n < nCnt; ++n ) + const SwTextFormatColls& rTable = *rDoc.GetTextFormatColls(); + for( size_t n = 0, nCnt = rTable.size(); n < nCnt; ++n ) { - rArr.push_back( rTbl[ n ] ); + rArr.push_back( rTable[ n ] ); } } break; case SFX_STYLE_FAMILY_FRAME: { - const SwFrmFmts& rTbl = *rDoc.GetFrmFmts(); - for( size_t n = 0, nCnt = rTbl.size(); n < nCnt; ++n ) + const SwFrameFormats& rTable = *rDoc.GetFrameFormats(); + for( size_t n = 0, nCnt = rTable.size(); n < nCnt; ++n ) { - rArr.push_back( rTbl[ n ] ); + rArr.push_back( rTable[ n ] ); } } break; @@ -1617,10 +1617,10 @@ static void lcl_SaveStyles( sal_uInt16 nFamily, std::vector<void*>& rArr, SwDoc& case SFX_STYLE_FAMILY_PSEUDO: { - const SwNumRuleTbl& rTbl = rDoc.GetNumRuleTbl(); - for( size_t n = 0, nCnt = rTbl.size(); n < nCnt; ++n ) + const SwNumRuleTable& rTable = rDoc.GetNumRuleTable(); + for( size_t n = 0, nCnt = rTable.size(); n < nCnt; ++n ) { - rArr.push_back( rTbl[ n ] ); + rArr.push_back( rTable[ n ] ); } } break; @@ -1640,42 +1640,42 @@ static void lcl_DeleteInfoStyles( sal_uInt16 nFamily, std::vector<void*>& rArr, case SFX_STYLE_FAMILY_CHAR: { std::deque<sal_uInt16> aDelArr; - const SwCharFmts& rTbl = *rDoc.GetCharFmts(); - for( n = 0, nCnt = rTbl.size(); n < nCnt; ++n ) + const SwCharFormats& rTable = *rDoc.GetCharFormats(); + for( n = 0, nCnt = rTable.size(); n < nCnt; ++n ) { - if( !lcl_Contains( rArr, rTbl[ n ] )) + if( !lcl_Contains( rArr, rTable[ n ] )) aDelArr.push_front( n ); } for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n ) - rDoc.DelCharFmt( aDelArr[ n ] ); + rDoc.DelCharFormat( aDelArr[ n ] ); } break; case SFX_STYLE_FAMILY_PARA : { std::deque<sal_uInt16> aDelArr; - const SwTxtFmtColls& rTbl = *rDoc.GetTxtFmtColls(); - for( n = 0, nCnt = rTbl.size(); n < nCnt; ++n ) + const SwTextFormatColls& rTable = *rDoc.GetTextFormatColls(); + for( n = 0, nCnt = rTable.size(); n < nCnt; ++n ) { - if( !lcl_Contains( rArr, rTbl[ n ] )) + if( !lcl_Contains( rArr, rTable[ n ] )) aDelArr.push_front( n ); } for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n ) - rDoc.DelTxtFmtColl( aDelArr[ n ] ); + rDoc.DelTextFormatColl( aDelArr[ n ] ); } break; case SFX_STYLE_FAMILY_FRAME: { - std::deque<SwFrmFmt*> aDelArr; - const SwFrmFmts& rTbl = *rDoc.GetFrmFmts(); - for( n = 0, nCnt = rTbl.size(); n < nCnt; ++n ) + std::deque<SwFrameFormat*> aDelArr; + const SwFrameFormats& rTable = *rDoc.GetFrameFormats(); + for( n = 0, nCnt = rTable.size(); n < nCnt; ++n ) { - if( !lcl_Contains( rArr, rTbl[ n ] )) - aDelArr.push_front( rTbl[ n ] ); + if( !lcl_Contains( rArr, rTable[ n ] )) + aDelArr.push_front( rTable[ n ] ); } for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n ) - rDoc.DelFrmFmt( aDelArr[ n ] ); + rDoc.DelFrameFormat( aDelArr[ n ] ); } break; @@ -1695,11 +1695,11 @@ static void lcl_DeleteInfoStyles( sal_uInt16 nFamily, std::vector<void*>& rArr, case SFX_STYLE_FAMILY_PSEUDO: { std::deque<SwNumRule*> aDelArr; - const SwNumRuleTbl& rTbl = rDoc.GetNumRuleTbl(); - for( n = 0, nCnt = rTbl.size(); n < nCnt; ++n ) + const SwNumRuleTable& rTable = rDoc.GetNumRuleTable(); + for( n = 0, nCnt = rTable.size(); n < nCnt; ++n ) { - if( !lcl_Contains( rArr, rTbl[ n ] )) - aDelArr.push_front( rTbl[ n ] ); + if( !lcl_Contains( rArr, rTable[ n ] )) + aDelArr.push_front( rTable[ n ] ); } for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n ) rDoc.DelNumRule( aDelArr[ n ]->GetName() ); @@ -1713,7 +1713,7 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) { bool bRet = false; sal_uInt16 nPoolId = USHRT_MAX; - SwFmt* pFmt = 0; + SwFormat* pFormat = 0; bool bCreate = FillPhysical == eFType; bool bDeleteInfo = false; @@ -1723,17 +1723,17 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) switch(nFamily) { case SFX_STYLE_FAMILY_CHAR: - pCharFmt = lcl_FindCharFmt(rDoc, aName, this, bCreate ); - bPhysical = 0 != pCharFmt; + pCharFormat = lcl_FindCharFormat(rDoc, aName, this, bCreate ); + bPhysical = 0 != pCharFormat; if( bFillOnlyInfo && !bPhysical ) { bDeleteInfo = true; ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); - pCharFmt = lcl_FindCharFmt(rDoc, aName, this, true ); + pCharFormat = lcl_FindCharFormat(rDoc, aName, this, true ); } - pFmt = pCharFmt; - if( !bCreate && !pFmt ) + pFormat = pCharFormat; + if( !bCreate && !pFormat ) { if( aName == SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD - RES_POOLCOLL_TEXT_BEGIN ] ) @@ -1742,26 +1742,26 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); } - bRet = 0 != pCharFmt || USHRT_MAX != nPoolId; + bRet = 0 != pCharFormat || USHRT_MAX != nPoolId; if( bDeleteInfo ) - pCharFmt = 0; + pCharFormat = 0; break; case SFX_STYLE_FAMILY_PARA: { - pColl = lcl_FindParaFmt(rDoc, aName, this, bCreate); + pColl = lcl_FindParaFormat(rDoc, aName, this, bCreate); bPhysical = 0 != pColl; if( bFillOnlyInfo && !bPhysical ) { bDeleteInfo = true; ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); - pColl = lcl_FindParaFmt(rDoc, aName, this, true ); + pColl = lcl_FindParaFormat(rDoc, aName, this, true ); } - pFmt = pColl; + pFormat = pColl; if( pColl ) - PresetFollow( pColl->GetNextTxtFmtColl().GetName() ); + PresetFollow( pColl->GetNextTextFormatColl().GetName() ); else if( !bCreate ) nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); @@ -1773,22 +1773,22 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) break; case SFX_STYLE_FAMILY_FRAME: - pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, bCreate); - bPhysical = 0 != pFrmFmt; + pFrameFormat = lcl_FindFrameFormat(rDoc, aName, this, bCreate); + bPhysical = 0 != pFrameFormat; if( bFillOnlyInfo && bPhysical ) { bDeleteInfo = true; ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); - pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, true ); + pFrameFormat = lcl_FindFrameFormat(rDoc, aName, this, true ); } - pFmt = pFrmFmt; - if( !bCreate && !pFmt ) + pFormat = pFrameFormat; + if( !bCreate && !pFormat ) nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ); - bRet = 0 != pFrmFmt || USHRT_MAX != nPoolId; + bRet = 0 != pFrameFormat || USHRT_MAX != nPoolId; if( bDeleteInfo ) - pFrmFmt = 0; + pFrameFormat = 0; break; case SFX_STYLE_FAMILY_PAGE: @@ -1803,7 +1803,7 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) if( pDesc ) { - nPoolId = pDesc->GetPoolFmtId(); + nPoolId = pDesc->GetPoolFormatId(); nHelpId = pDesc->GetPoolHelpId(); if( pDesc->GetPoolHlpFileId() != UCHAR_MAX ) aHelpFile = *rDoc.GetDocPattern( pDesc->GetPoolHlpFileId() ); @@ -1831,7 +1831,7 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) if( pNumRule ) { - nPoolId = pNumRule->GetPoolFmtId(); + nPoolId = pNumRule->GetPoolFormatId(); nHelpId = pNumRule->GetPoolHelpId(); if( pNumRule->GetPoolHlpFileId() != UCHAR_MAX ) aHelpFile = *rDoc.GetDocPattern( pNumRule->GetPoolHlpFileId() ); @@ -1854,11 +1854,11 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) SFX_STYLE_FAMILY_PARA == nFamily || SFX_STYLE_FAMILY_FRAME == nFamily ) { - if( pFmt ) - nPoolId = pFmt->GetPoolFmtId(); + if( pFormat ) + nPoolId = pFormat->GetPoolFormatId(); sal_uInt16 _nMask = 0; - if( pFmt == rDoc.GetDfltCharFmt() ) + if( pFormat == rDoc.GetDfltCharFormat() ) _nMask |= SFXSTYLEBIT_READONLY; else if( USER_FMT & nPoolId ) _nMask |= SFXSTYLEBIT_USERDEF; @@ -1873,17 +1873,17 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) case COLL_HTML_BITS: _nMask |= SWSTYLEBIT_HTML; break; } - if( pFmt ) + if( pFormat ) { OSL_ENSURE( bPhysical, "Format not found" ); - nHelpId = pFmt->GetPoolHelpId(); - if( pFmt->GetPoolHlpFileId() != UCHAR_MAX ) - aHelpFile = *rDoc.GetDocPattern( pFmt->GetPoolHlpFileId() ); + nHelpId = pFormat->GetPoolHelpId(); + if( pFormat->GetPoolHlpFileId() != UCHAR_MAX ) + aHelpFile = *rDoc.GetDocPattern( pFormat->GetPoolHlpFileId() ); else aHelpFile.clear(); - if( RES_CONDTXTFMTCOLL == pFmt->Which() ) + if( RES_CONDTXTFMTCOLL == pFormat->Which() ) _nMask |= SWSTYLEBIT_CONDCOLL; } @@ -1900,29 +1900,29 @@ void SwDocStyleSheet::Create() switch(nFamily) { case SFX_STYLE_FAMILY_CHAR : - pCharFmt = lcl_FindCharFmt( rDoc, aName ); - if( !pCharFmt ) - pCharFmt = rDoc.MakeCharFmt(aName, - rDoc.GetDfltCharFmt()); - pCharFmt->SetAuto( false ); + pCharFormat = lcl_FindCharFormat( rDoc, aName ); + if( !pCharFormat ) + pCharFormat = rDoc.MakeCharFormat(aName, + rDoc.GetDfltCharFormat()); + pCharFormat->SetAuto( false ); break; case SFX_STYLE_FAMILY_PARA : - pColl = lcl_FindParaFmt( rDoc, aName ); + pColl = lcl_FindParaFormat( rDoc, aName ); if( !pColl ) { - SwTxtFmtColl *pPar = (*rDoc.GetTxtFmtColls())[0]; + SwTextFormatColl *pPar = (*rDoc.GetTextFormatColls())[0]; if( nMask & SWSTYLEBIT_CONDCOLL ) - pColl = rDoc.MakeCondTxtFmtColl( aName, pPar ); + pColl = rDoc.MakeCondTextFormatColl( aName, pPar ); else - pColl = rDoc.MakeTxtFmtColl( aName, pPar ); + pColl = rDoc.MakeTextFormatColl( aName, pPar ); } break; case SFX_STYLE_FAMILY_FRAME: - pFrmFmt = lcl_FindFrmFmt( rDoc, aName ); - if( !pFrmFmt ) - pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), false, false); + pFrameFormat = lcl_FindFrameFormat( rDoc, aName ); + if( !pFrameFormat ) + pFrameFormat = rDoc.MakeFrameFormat(aName, rDoc.GetDfltFrameFormat(), false, false); break; @@ -1939,7 +1939,7 @@ void SwDocStyleSheet::Create() if( !pNumRule ) { const OUString sTmpNm( aName.isEmpty() ? rDoc.GetUniqueNumRuleName() : aName ); - SwNumRule* pRule = rDoc.GetNumRuleTbl()[ + SwNumRule* pRule = rDoc.GetNumRuleTable()[ rDoc.MakeNumRule( sTmpNm, 0, false, // #i89178# numfunc::GetDefaultPositionAndSpaceMode() ) ]; @@ -1958,14 +1958,14 @@ void SwDocStyleSheet::Create() aCoreSet.ClearItem(); } -SwCharFmt* SwDocStyleSheet::GetCharFmt() +SwCharFormat* SwDocStyleSheet::GetCharFormat() { if(!bPhysical) FillStyleSheet( FillPhysical ); - return pCharFmt; + return pCharFormat; } -SwTxtFmtColl* SwDocStyleSheet::GetCollection() +SwTextFormatColl* SwDocStyleSheet::GetCollection() { if(!bPhysical) FillStyleSheet( FillPhysical ); @@ -1989,7 +1989,7 @@ const SwNumRule * SwDocStyleSheet::GetNumRule() void SwDocStyleSheet::SetNumRule(const SwNumRule& rRule) { OSL_ENSURE(pNumRule, "Wo ist die NumRule"); - rDoc.ChgNumRuleFmts( rRule ); + rDoc.ChgNumRuleFormats( rRule ); } // re-generate Name AND Family from String @@ -2015,18 +2015,18 @@ void SwDocStyleSheet::SetPhysical(bool bPhys) if(!bPhys) { - pCharFmt = 0; + pCharFormat = 0; pColl = 0; - pFrmFmt = 0; + pFrameFormat = 0; pDesc = 0; } } -SwFrmFmt* SwDocStyleSheet::GetFrmFmt() +SwFrameFormat* SwDocStyleSheet::GetFrameFormat() { if(!bPhysical) FillStyleSheet( FillPhysical ); - return pFrmFmt; + return pFrameFormat; } bool SwDocStyleSheet::IsUsed() const @@ -2043,9 +2043,9 @@ bool SwDocStyleSheet::IsUsed() const const SwModify* pMod; switch( nFamily ) { - case SFX_STYLE_FAMILY_CHAR : pMod = pCharFmt; break; + case SFX_STYLE_FAMILY_CHAR : pMod = pCharFormat; break; case SFX_STYLE_FAMILY_PARA : pMod = pColl; break; - case SFX_STYLE_FAMILY_FRAME: pMod = pFrmFmt; break; + case SFX_STYLE_FAMILY_FRAME: pMod = pFrameFormat; break; case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break; case SFX_STYLE_FAMILY_PSEUDO: @@ -2066,37 +2066,37 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) rFile = "swrhlppi.hlp"; - const SwFmt* pTmpFmt = 0; + const SwFormat* pTmpFormat = 0; switch( nFamily ) { case SFX_STYLE_FAMILY_CHAR : - if( !pCharFmt && - 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, false )) ) + if( !pCharFormat && + 0 == (pCharFormat = lcl_FindCharFormat( rDoc, aName, 0, false )) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); return USHRT_MAX == nId ? 0 : nId; } - pTmpFmt = pCharFmt; + pTmpFormat = pCharFormat; break; case SFX_STYLE_FAMILY_PARA: if( !pColl && - 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, false )) ) + 0 == ( pColl = lcl_FindParaFormat( rDoc, aName, 0, false )) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); return USHRT_MAX == nId ? 0 : nId; } - pTmpFmt = pColl; + pTmpFormat = pColl; break; case SFX_STYLE_FAMILY_FRAME: - if( !pFrmFmt && - 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, false ) ) ) + if( !pFrameFormat && + 0 == ( pFrameFormat = lcl_FindFrameFormat( rDoc, aName, 0, false ) ) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ); return USHRT_MAX == nId ? 0 : nId; } - pTmpFmt = pFrmFmt; + pTmpFormat = pFrameFormat; break; case SFX_STYLE_FAMILY_PAGE: @@ -2109,7 +2109,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) nId = pDesc->GetPoolHelpId(); nFileId = pDesc->GetPoolHlpFileId(); - nPoolId = pDesc->GetPoolFmtId(); + nPoolId = pDesc->GetPoolFormatId(); break; case SFX_STYLE_FAMILY_PSEUDO: @@ -2122,7 +2122,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) nId = pNumRule->GetPoolHelpId(); nFileId = pNumRule->GetPoolHlpFileId(); - nPoolId = pNumRule->GetPoolFmtId(); + nPoolId = pNumRule->GetPoolFormatId(); break; default: @@ -2130,11 +2130,11 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) return 0; } - if( pTmpFmt ) + if( pTmpFormat ) { - nId = pTmpFmt->GetPoolHelpId(); - nFileId = pTmpFmt->GetPoolHlpFileId(); - nPoolId = pTmpFmt->GetPoolFmtId(); + nId = pTmpFormat->GetPoolHelpId(); + nFileId = pTmpFormat->GetPoolHlpFileId(); + nPoolId = pTmpFormat->GetPoolFormatId(); } if( UCHAR_MAX != nFileId ) @@ -2145,7 +2145,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) rFile = *pTemplate; } } - else if( !IsPoolUserFmt( nPoolId ) ) + else if( !IsPoolUserFormat( nPoolId ) ) { nId = nPoolId; } @@ -2162,12 +2162,12 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId ) sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r )); sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX changed over to ULONG arbitrarily! - SwFmt* pTmpFmt = 0; + SwFormat* pTmpFormat = 0; switch( nFamily ) { - case SFX_STYLE_FAMILY_CHAR : pTmpFmt = pCharFmt; break; - case SFX_STYLE_FAMILY_PARA : pTmpFmt = pColl; break; - case SFX_STYLE_FAMILY_FRAME: pTmpFmt = pFrmFmt; break; + case SFX_STYLE_FAMILY_CHAR : pTmpFormat = pCharFormat; break; + case SFX_STYLE_FAMILY_PARA : pTmpFormat = pColl; break; + case SFX_STYLE_FAMILY_FRAME: pTmpFormat = pFrameFormat; break; case SFX_STYLE_FAMILY_PAGE : const_cast<SwPageDesc*>(pDesc)->SetPoolHelpId( nHId ); const_cast<SwPageDesc*>(pDesc)->SetPoolHlpFileId( nFileId ); @@ -2182,10 +2182,10 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId ) OSL_ENSURE(false, "unknown style family"); return ; } - if( pTmpFmt ) + if( pTmpFormat ) { - pTmpFmt->SetPoolHelpId( nHId ); - pTmpFmt->SetPoolHlpFileId( nFileId ); + pTmpFormat->SetPoolHelpId( nHId ); + pTmpFormat->SetPoolHlpFileId( nFileId ); } } @@ -2279,25 +2279,25 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, } else { - const SwFmt *pSourceFmt = 0; - SwFmt *pTargetFmt = 0; + const SwFormat *pSourceFormat = 0; + SwFormat *pTargetFormat = 0; size_t nPgDscPos = SIZE_MAX; switch( eFamily ) { case SFX_STYLE_FAMILY_CHAR : if( bSwSrcPool ) - pSourceFmt = static_cast<SwDocStyleSheet&>(rSource).GetCharFmt(); - pTargetFmt = static_cast<SwDocStyleSheet&>(rTarget).GetCharFmt(); + pSourceFormat = static_cast<SwDocStyleSheet&>(rSource).GetCharFormat(); + pTargetFormat = static_cast<SwDocStyleSheet&>(rTarget).GetCharFormat(); break; case SFX_STYLE_FAMILY_PARA : if( bSwSrcPool ) - pSourceFmt = static_cast<SwDocStyleSheet&>(rSource).GetCollection(); - pTargetFmt = static_cast<SwDocStyleSheet&>(rTarget).GetCollection(); + pSourceFormat = static_cast<SwDocStyleSheet&>(rSource).GetCollection(); + pTargetFormat = static_cast<SwDocStyleSheet&>(rTarget).GetCollection(); break; case SFX_STYLE_FAMILY_FRAME: if( bSwSrcPool ) - pSourceFmt = static_cast<SwDocStyleSheet&>(rSource).GetFrmFmt(); - pTargetFmt = static_cast<SwDocStyleSheet&>(rTarget).GetFrmFmt(); + pSourceFormat = static_cast<SwDocStyleSheet&>(rSource).GetFrameFormat(); + pTargetFormat = static_cast<SwDocStyleSheet&>(rTarget).GetFrameFormat(); break; case SFX_STYLE_FAMILY_PAGE: { @@ -2306,7 +2306,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, &nPgDscPos ); if( pDesc ) - pTargetFmt = &pDesc->GetMaster(); + pTargetFormat = &pDesc->GetMaster(); } break; case SFX_STYLE_FAMILY_PSEUDO: @@ -2315,16 +2315,16 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, break; default:; //prevent warning } - if( pTargetFmt ) + if( pTargetFormat ) { - if( pSourceFmt ) - pTargetFmt->DelDiffs( *pSourceFmt ); + if( pSourceFormat ) + pTargetFormat->DelDiffs( *pSourceFormat ); else if( SIZE_MAX != nPgDscPos ) - pTargetFmt->ResetFmtAttr( RES_PAGEDESC, RES_FRMATR_END-1 ); + pTargetFormat->ResetFormatAttr( RES_PAGEDESC, RES_FRMATR_END-1 ); else { // #i73790# - method renamed - pTargetFmt->ResetAllFmtAttr(); + pTargetFormat->ResetAllFormatAttr(); } if( SIZE_MAX != nPgDscPos ) rDoc.ChgPageDesc( nPgDscPos, @@ -2356,23 +2356,23 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) { case SFX_STYLE_FAMILY_CHAR: { - SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, sName, 0, false ); - if(pFmt) - rDoc.DelCharFmt(pFmt); + SwCharFormat* pFormat = lcl_FindCharFormat(rDoc, sName, 0, false ); + if(pFormat) + rDoc.DelCharFormat(pFormat); } break; case SFX_STYLE_FAMILY_PARA: { - SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, sName, 0, false ); + SwTextFormatColl* pColl = lcl_FindParaFormat(rDoc, sName, 0, false ); if(pColl) - rDoc.DelTxtFmtColl(pColl); + rDoc.DelTextFormatColl(pColl); } break; case SFX_STYLE_FAMILY_FRAME: { - SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, sName, 0, false ); - if(pFmt) - rDoc.DelFrmFmt(pFmt); + SwFrameFormat* pFormat = lcl_FindFrameFormat(rDoc, sName, 0, false ); + if(pFormat) + rDoc.DelFrameFormat(pFormat); } break; case SFX_STYLE_FAMILY_PAGE : @@ -2401,22 +2401,22 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, const OUString &rStyle, const OUString &rParent ) { - SwFmt* pFmt = 0, *pParent = 0; + SwFormat* pFormat = 0, *pParent = 0; switch( eFam ) { case SFX_STYLE_FAMILY_CHAR : - if( 0 != ( pFmt = lcl_FindCharFmt( rDoc, rStyle ) ) && !rParent.isEmpty() ) - pParent = lcl_FindCharFmt(rDoc, rParent ); + if( 0 != ( pFormat = lcl_FindCharFormat( rDoc, rStyle ) ) && !rParent.isEmpty() ) + pParent = lcl_FindCharFormat(rDoc, rParent ); break; case SFX_STYLE_FAMILY_PARA : - if( 0 != ( pFmt = lcl_FindParaFmt( rDoc, rStyle ) ) && !rParent.isEmpty() ) - pParent = lcl_FindParaFmt( rDoc, rParent ); + if( 0 != ( pFormat = lcl_FindParaFormat( rDoc, rStyle ) ) && !rParent.isEmpty() ) + pParent = lcl_FindParaFormat( rDoc, rParent ); break; case SFX_STYLE_FAMILY_FRAME: - if( 0 != ( pFmt = lcl_FindFrmFmt( rDoc, rStyle ) ) && !rParent.isEmpty() ) - pParent = lcl_FindFrmFmt( rDoc, rParent ); + if( 0 != ( pFormat = lcl_FindFrameFormat( rDoc, rStyle ) ) && !rParent.isEmpty() ) + pParent = lcl_FindFrameFormat( rDoc, rParent ); break; case SFX_STYLE_FAMILY_PAGE: @@ -2428,12 +2428,12 @@ bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, } bool bRet = false; - if( pFmt && pFmt->DerivedFrom() && - pFmt->DerivedFrom()->GetName() != rParent ) + if( pFormat && pFormat->DerivedFrom() && + pFormat->DerivedFrom()->GetName() != rParent ) { { SwImplShellAction aTmpSh( rDoc ); - bRet = pFmt->SetDerivedFrom( pParent ); + bRet = pFormat->SetDerivedFrom( pParent ); } if( bRet ) @@ -2442,8 +2442,8 @@ bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, mxStyleSheet->PresetName( rStyle ); mxStyleSheet->PresetParent( rParent ); if( SFX_STYLE_FAMILY_PARA == eFam ) - mxStyleSheet->PresetFollow( static_cast<SwTxtFmtColl*>(pFmt)-> - GetNextTxtFmtColl().GetName() ); + mxStyleSheet->PresetFollow( static_cast<SwTextFormatColl*>(pFormat)-> + GetNextTextFormatColl().GetName() ); else mxStyleSheet->PresetFollow( OUString() ); @@ -2484,7 +2484,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName, switch( eFam ) { case SFX_STYLE_FAMILY_CHAR: - pMod = mxStyleSheet->GetCharFmt(); + pMod = mxStyleSheet->GetCharFormat(); break; case SFX_STYLE_FAMILY_PARA: @@ -2492,7 +2492,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName, break; case SFX_STYLE_FAMILY_FRAME: - pMod = mxStyleSheet->GetFrmFmt(); + pMod = mxStyleSheet->GetFrameFormat(); break; case SFX_STYLE_FAMILY_PAGE: @@ -2505,7 +2505,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName, if( pRule && !bSearchUsed && (( nSMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF - ? !(pRule->GetPoolFmtId() & USER_FMT) + ? !(pRule->GetPoolFormatId() & USER_FMT) // searched for used and found none : bSearchUsed )) bFnd = false; @@ -2521,8 +2521,8 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName, if( pMod && !bSearchUsed ) { const sal_uInt16 nId = SFX_STYLE_FAMILY_PAGE == eFam - ? static_cast<const SwPageDesc*>(pMod)->GetPoolFmtId() - : static_cast<const SwFmt*>(pMod)->GetPoolFmtId(); + ? static_cast<const SwPageDesc*>(pMod)->GetPoolFormatId() + : static_cast<const SwFormat*>(pMod)->GetPoolFormatId(); if( ( nSMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF ? !(nId & USER_FMT) @@ -2592,24 +2592,24 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( nSearchFamily == SFX_STYLE_FAMILY_CHAR || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - const size_t nArrLen = rDoc.GetCharFmts()->size(); + const size_t nArrLen = rDoc.GetCharFormats()->size(); for( size_t i = 0; i < nArrLen; i++ ) { - SwCharFmt* pFmt = (*rDoc.GetCharFmts())[ i ]; + SwCharFormat* pFormat = (*rDoc.GetCharFormats())[ i ]; - const bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt)); - if( ( !bSearchHidden && pFmt->IsHidden() && !bUsed ) || ( pFmt->IsDefault() && pFmt != rDoc.GetDfltCharFmt() ) ) + const bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFormat)); + if( ( !bSearchHidden && pFormat->IsHidden() && !bUsed ) || ( pFormat->IsDefault() && pFormat != rDoc.GetDfltCharFormat() ) ) continue; - if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !pFmt->IsHidden( ) ) + if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !pFormat->IsHidden( ) ) continue; if( !bUsed ) { // Standard is no User template - const sal_uInt16 nId = rDoc.GetDfltCharFmt() == pFmt ? + const sal_uInt16 nId = rDoc.GetDfltCharFormat() == pFormat ? sal_uInt16( RES_POOLCHR_INET_NORMAL ): - pFmt->GetPoolFmtId(); + pFormat->GetPoolFormatId(); if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF ? !(nId & USER_FMT) // searched for used and found none @@ -2628,31 +2628,31 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() continue; } - aLst.Append( cCHAR, pFmt == rDoc.GetDfltCharFmt() + aLst.Append( cCHAR, pFormat == rDoc.GetDfltCharFormat() ? SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD - RES_POOLCOLL_TEXT_BEGIN ] - : pFmt->GetName() ); + : pFormat->GetName() ); } // PoolFormate if( bAll ) { if( ! rDoc.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) ) - AppendStyleList(SwStyleNameMapper::GetChrFmtUINameArray(), + AppendStyleList(SwStyleNameMapper::GetChrFormatUINameArray(), bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, cCHAR); else { - aLst.Append( cCHAR, SwStyleNameMapper::GetChrFmtUINameArray()[ + aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[ RES_POOLCHR_INET_NORMAL - RES_POOLCHR_BEGIN ] ); - aLst.Append( cCHAR, SwStyleNameMapper::GetChrFmtUINameArray()[ + aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[ RES_POOLCHR_INET_VISIT - RES_POOLCHR_BEGIN ] ); - aLst.Append( cCHAR, SwStyleNameMapper::GetChrFmtUINameArray()[ + aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[ RES_POOLCHR_ENDNOTE - RES_POOLCHR_BEGIN ] ); - aLst.Append( cCHAR, SwStyleNameMapper::GetChrFmtUINameArray()[ + aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[ RES_POOLCHR_FOOTNOTE - RES_POOLCHR_BEGIN ] ); } - AppendStyleList(SwStyleNameMapper::GetHTMLChrFmtUINameArray(), + AppendStyleList(SwStyleNameMapper::GetHTMLChrFormatUINameArray(), bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, cCHAR); } @@ -2675,10 +2675,10 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() nSMask = SWSTYLEBIT_HTML; } - const size_t nArrLen = rDoc.GetTxtFmtColls()->size(); + const size_t nArrLen = rDoc.GetTextFormatColls()->size(); for( size_t i = 0; i < nArrLen; i++ ) { - SwTxtFmtColl* pColl = (*rDoc.GetTxtFmtColls())[ i ]; + SwTextFormatColl* pColl = (*rDoc.GetTextFormatColls())[ i ]; const bool bUsed = bOrganizer || rDoc.IsUsed(*pColl); if ( ( !bSearchHidden && pColl->IsHidden( ) && !bUsed ) || pColl->IsDefault() ) @@ -2689,11 +2689,11 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( !(bIsSearchUsed && bUsed )) { - const sal_uInt16 nId = pColl->GetPoolFmtId(); + const sal_uInt16 nId = pColl->GetPoolFormatId(); switch ( (nSMask & ~SFXSTYLEBIT_USED) ) { case SFXSTYLEBIT_USERDEF: - if(!IsPoolUserFmt(nId)) continue; + if(!IsPoolUserFormat(nId)) continue; break; case SWSTYLEBIT_TEXT: if((nId & COLL_GET_RANGE_BITS) != COLL_TEXT_BITS) continue; @@ -2711,7 +2711,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if((nId & COLL_GET_RANGE_BITS) != COLL_EXTRA_BITS) continue; break; case SWSTYLEBIT_HTML | SFXSTYLEBIT_USERDEF: - if(IsPoolUserFmt(nId)) + if(IsPoolUserFormat(nId)) break; // otherwise move on case SWSTYLEBIT_HTML: @@ -2773,7 +2773,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_CONDCOLL ) { if( !bIsSearchUsed || - rDoc.getIDocumentStylePoolAccess().IsPoolTxtCollUsed( RES_POOLCOLL_TEXT )) + rDoc.getIDocumentStylePoolAccess().IsPoolTextCollUsed( RES_POOLCOLL_TEXT )) aLst.Append( cPARA, SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_TEXT - RES_POOLCOLL_TEXT_BEGIN ] ); } @@ -2809,7 +2809,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() OUString s; while( *pPoolIds ) { - if( !bIsSearchUsed || rDoc.getIDocumentStylePoolAccess().IsPoolTxtCollUsed( *pPoolIds ) ) + if( !bIsSearchUsed || rDoc.getIDocumentStylePoolAccess().IsPoolTextCollUsed( *pPoolIds ) ) aLst.Append( cPARA, s = SwStyleNameMapper::GetUIName( *pPoolIds, s )); ++pPoolIds; @@ -2821,19 +2821,19 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( nSearchFamily == SFX_STYLE_FAMILY_FRAME || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - const size_t nArrLen = rDoc.GetFrmFmts()->size(); + const size_t nArrLen = rDoc.GetFrameFormats()->size(); for( size_t i = 0; i < nArrLen; i++ ) { - const SwFrmFmt* pFmt = (*rDoc.GetFrmFmts())[ i ]; + const SwFrameFormat* pFormat = (*rDoc.GetFrameFormats())[ i ]; - bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt)); - if( ( !bSearchHidden && pFmt->IsHidden( ) && !bUsed ) || pFmt->IsDefault() || pFmt->IsAuto() ) + bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFormat)); + if( ( !bSearchHidden && pFormat->IsHidden( ) && !bUsed ) || pFormat->IsDefault() || pFormat->IsAuto() ) continue; - if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !pFmt->IsHidden( ) ) + if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !pFormat->IsHidden( ) ) continue; - const sal_uInt16 nId = pFmt->GetPoolFmtId(); + const sal_uInt16 nId = pFormat->GetPoolFormatId(); if( !bUsed ) { if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF @@ -2845,12 +2845,12 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() } } - aLst.Append( cFRAME, pFmt->GetName() ); + aLst.Append( cFRAME, pFormat->GetName() ); } // PoolFormate if ( bAll ) - AppendStyleList(SwStyleNameMapper::GetFrmFmtUINameArray(), + AppendStyleList(SwStyleNameMapper::GetFrameFormatUINameArray(), bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, cFRAME); } @@ -2861,7 +2861,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() for(size_t i = 0; i < nCount; ++i) { const SwPageDesc& rDesc = rDoc.GetPageDesc(i); - const sal_uInt16 nId = rDesc.GetPoolFmtId(); + const sal_uInt16 nId = rDesc.GetPoolFormatId(); bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc)); if( !bUsed ) { @@ -2886,10 +2886,10 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( nSearchFamily == SFX_STYLE_FAMILY_PSEUDO || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - const SwNumRuleTbl& rNumTbl = rDoc.GetNumRuleTbl(); - for(sal_uInt16 i = 0; i < rNumTbl.size(); ++i) + const SwNumRuleTable& rNumTable = rDoc.GetNumRuleTable(); + for(sal_uInt16 i = 0; i < rNumTable.size(); ++i) { - const SwNumRule& rRule = *rNumTbl[ i ]; + const SwNumRule& rRule = *rNumTable[ i ]; if( !rRule.IsAutoRule() ) { if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !rRule.IsHidden( ) ) @@ -2900,7 +2900,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() { if( ( !bSearchHidden && rRule.IsHidden() ) || ( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF - ? !(rRule.GetPoolFmtId() & USER_FMT) + ? !(rRule.GetPoolFormatId() & USER_FMT) // searched for used and found none : bIsSearchUsed ) ) continue; @@ -2976,23 +2976,23 @@ void SwStyleSheetIterator::AppendStyleList(const ::std::vector<OUString>& rList, { case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL: { - bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolTxtCollUsed( nId ); - SwFmt* pFmt = rDoc.FindTxtFmtCollByName( rList[i] ); - bHidden = pFmt && pFmt->IsHidden( ); + bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolTextCollUsed( nId ); + SwFormat* pFormat = rDoc.FindTextFormatCollByName( rList[i] ); + bHidden = pFormat && pFormat->IsHidden( ); } break; case nsSwGetPoolIdFromName::GET_POOLID_CHRFMT: { - bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolFmtUsed( nId ); - SwFmt* pFmt = rDoc.FindCharFmtByName( rList[i] ); - bHidden = pFmt && pFmt->IsHidden( ); + bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolFormatUsed( nId ); + SwFormat* pFormat = rDoc.FindCharFormatByName( rList[i] ); + bHidden = pFormat && pFormat->IsHidden( ); } break; case nsSwGetPoolIdFromName::GET_POOLID_FRMFMT: { - bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolFmtUsed( nId ); - SwFmt* pFmt = rDoc.FindFrmFmtByName( rList[i] ); - bHidden = pFmt && pFmt->IsHidden( ); + bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolFormatUsed( nId ); + SwFormat* pFormat = rDoc.FindFrameFormatByName( rList[i] ); + bHidden = pFormat && pFormat->IsHidden( ); } break; case nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC: @@ -3010,7 +3010,7 @@ void SwStyleSheetIterator::AppendStyleList(const ::std::vector<OUString>& rList, } break; default: - OSL_ENSURE( false, "unknown PoolFmt-Id" ); + OSL_ENSURE( false, "unknown PoolFormat-Id" ); } bool bMatchHidden = ( bTestHidden && ( bHidden || !bOnlyHidden ) ) || ( !bTestHidden && ( !bHidden || bUsed ) ); diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index a0763d3894a8..1dc1d29285c3 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -527,19 +527,19 @@ sal_uInt16 SwModule::GetRedlineMarkPos() return pModuleConfig->GetMarkAlignMode(); } -bool SwModule::IsInsTblFormatNum(bool bHTML) const +bool SwModule::IsInsTableFormatNum(bool bHTML) const { - return pModuleConfig->IsInsTblFormatNum(bHTML); + return pModuleConfig->IsInsTableFormatNum(bHTML); } -bool SwModule::IsInsTblChangeNumFormat(bool bHTML) const +bool SwModule::IsInsTableChangeNumFormat(bool bHTML) const { - return pModuleConfig->IsInsTblChangeNumFormat(bHTML); + return pModuleConfig->IsInsTableChangeNumFormat(bHTML); } -bool SwModule::IsInsTblAlignNum(bool bHTML) const +bool SwModule::IsInsTableAlignNum(bool bHTML) const { - return pModuleConfig->IsInsTblAlignNum(bHTML); + return pModuleConfig->IsInsTableAlignNum(bHTML); } const Color &SwModule::GetRedlineMarkColor() @@ -584,18 +584,18 @@ sal_uInt16 SwModule::GetLinkUpdMode( bool ) const return (sal_uInt16)pUsrPref->GetUpdateLinkMode(); } -SwFldUpdateFlags SwModule::GetFldUpdateFlags( bool ) const +SwFieldUpdateFlags SwModule::GetFieldUpdateFlags( bool ) const { if(!pUsrPref) GetUsrPref(false); - return pUsrPref->GetFldUpdateFlags(); + return pUsrPref->GetFieldUpdateFlags(); } -void SwModule::ApplyFldUpdateFlags(SwFldUpdateFlags eFldFlags) +void SwModule::ApplyFieldUpdateFlags(SwFieldUpdateFlags eFieldFlags) { if(!pUsrPref) GetUsrPref(false); - pUsrPref->SetFldUpdateFlags(eFldFlags); + pUsrPref->SetFieldUpdateFlags(eFieldFlags); } void SwModule::ApplyLinkMode(sal_Int32 nNewLinkMode) diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index a9af46e8696e..f945531e79c0 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -358,8 +358,8 @@ void SwDLL::RegisterControls() SvxSearchDialogWrapper::RegisterChildWindow( false, pMod ); SvxHlinkDlgWrapper::RegisterChildWindow( false, pMod ); SvxFontWorkChildWindow::RegisterChildWindow( false, pMod ); - SwFldDlgWrapper::RegisterChildWindow( false, pMod ); - SwFldDataOnlyDlgWrapper::RegisterChildWindow( false, pMod ); + SwFieldDlgWrapper::RegisterChildWindow( false, pMod ); + SwFieldDataOnlyDlgWrapper::RegisterChildWindow( false, pMod ); SvxContourDlgChildWindow::RegisterChildWindow( false, pMod ); SwNavigationChild::RegisterChildWindowContext( pMod ); SwInputChild::RegisterChildWindow( false, pMod, SfxChildWindowFlags::FORCEDOCK ); diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx index df5388cd4966..4fb902dd6503 100644 --- a/sw/source/uibase/config/StoredChapterNumbering.cxx +++ b/sw/source/uibase/config/StoredChapterNumbering.cxx @@ -124,18 +124,18 @@ public: { return uno::Any(); } - SwNumFmt const* pNumFmt(0); + SwNumFormat const* pNumFormat(0); OUString const* pCharStyleName(0); - pRules->GetNumFmt(nIndex, pNumFmt, pCharStyleName); - if (!pNumFmt) + pRules->GetNumFormat(nIndex, pNumFormat, pCharStyleName); + if (!pNumFormat) { // the dialog only fills in those levels that are non-default return uno::Any(); // the export will ignore this level, yay } assert(pCharStyleName); OUString dummy; // pass in empty HeadingStyleName - can't import anyway uno::Sequence<beans::PropertyValue> const ret( - SwXNumberingRules::GetPropertiesForNumFmt( - *pNumFmt, *pCharStyleName, &dummy)); + SwXNumberingRules::GetPropertiesForNumFormat( + *pNumFormat, *pCharStyleName, &dummy)); return uno::makeAny(ret); } @@ -154,15 +154,15 @@ public: static_cast< ::cppu::OWeakObject*>(this), 1); SolarMutexGuard g; - SwNumFmt aNumberFormat; + SwNumFormat aNumberFormat; OUString charStyleName; - SwXNumberingRules::SetPropertiesToNumFmt( + SwXNumberingRules::SetPropertiesToNumFormat( aNumberFormat, charStyleName, 0, 0, 0, 0, 0, props); SwNumRulesWithName *const pRules(GetOrCreateRules()); - pRules->SetNumFmt(nIndex, aNumberFormat, charStyleName); + pRules->SetNumFormat(nIndex, aNumberFormat, charStyleName); } }; @@ -438,9 +438,9 @@ void ExportStoredChapterNumberingRules(SwChapterNumRules & rRules, { for (size_t j = 0; j < MAXLEVEL; ++j) { - SwNumFmt const* pDummy(0); + SwNumFormat const* pDummy(0); OUString const* pCharStyleName(0); - pRule->GetNumFmt(j, pDummy, pCharStyleName); + pRule->GetNumFormat(j, pDummy, pCharStyleName); if (pCharStyleName && !pCharStyleName->isEmpty()) { charStyles.insert(*pCharStyleName); diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index 44eddb23a983..c0cd60f49886 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -43,7 +43,7 @@ SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) : bSpace = bNonbreakingSpace = bSoftHyphen = - bFldHiddenText = + bFieldHiddenText = bCharHiddenText = bManualBreak = bShowHiddenPara = false; @@ -66,7 +66,7 @@ SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich bNonbreakingSpace = rVOpt.IsHardBlank(); bSoftHyphen = rVOpt.IsSoftHyph(); bCharHiddenText = rVOpt.IsShowHiddenChar(true); - bFldHiddenText = rVOpt.IsShowHiddenField(); + bFieldHiddenText = rVOpt.IsShowHiddenField(); bManualBreak = rVOpt.IsLineBreak(true); bShowHiddenPara = rVOpt.IsShowHiddenPara(); } @@ -88,7 +88,7 @@ bool SwDocDisplayItem::operator==( const SfxPoolItem& rAttr ) const bNonbreakingSpace == rItem.bNonbreakingSpace && bSoftHyphen == rItem.bSoftHyphen && bCharHiddenText == rItem.bCharHiddenText && - bFldHiddenText == rItem.bFldHiddenText && + bFieldHiddenText == rItem.bFieldHiddenText && bManualBreak == rItem.bManualBreak && bShowHiddenPara == rItem.bShowHiddenPara ); } @@ -101,7 +101,7 @@ void SwDocDisplayItem::operator=( const SwDocDisplayItem& rDocDisplayItem) bNonbreakingSpace = rDocDisplayItem.bNonbreakingSpace ; bSoftHyphen = rDocDisplayItem.bSoftHyphen ; bCharHiddenText = rDocDisplayItem.bCharHiddenText ; - bFldHiddenText = rDocDisplayItem.bFldHiddenText ; + bFieldHiddenText = rDocDisplayItem.bFieldHiddenText ; bManualBreak = rDocDisplayItem.bManualBreak ; bShowHiddenPara = rDocDisplayItem.bShowHiddenPara ; } @@ -114,7 +114,7 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetHardBlank (bNonbreakingSpace ); rVOpt.SetSoftHyph (bSoftHyphen ); rVOpt.SetShowHiddenChar(bCharHiddenText ); - rVOpt.SetShowHiddenField(bFldHiddenText ); + rVOpt.SetShowHiddenField(bFieldHiddenText ); rVOpt.SetLineBreak (bManualBreak ); rVOpt.SetShowHiddenPara(bShowHiddenPara ); } @@ -157,7 +157,7 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) : bTable = rVOpt.IsTable(); bGraphic = rVOpt.IsGraphic(); bDrawing = rVOpt.IsDraw() && rVOpt.IsControl(); - bFieldName = rVOpt.IsFldName(); + bFieldName = rVOpt.IsFieldName(); bNotes = rVOpt.IsPostIts(); } @@ -219,7 +219,7 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetGraphic (bGraphic ); rVOpt.SetDraw (bDrawing ); rVOpt.SetControl (bDrawing ); - rVOpt.SetFldName (bFieldName ); + rVOpt.SetFieldName (bFieldName ); rVOpt.SetPostIts (bNotes ); } diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx index e695c3247530..fcefb8ff4a76 100644 --- a/sw/source/uibase/config/modcfg.cxx +++ b/sw/source/uibase/config/modcfg.cxx @@ -591,7 +591,7 @@ SwInsertConfig::SwInsertConfig(bool bWeb) : pOLEMiscOpt(0), bInsWithCaption( false ), bCaptionOrderNumberingFirst( false ), - aInsTblOpts(0,0), + aInsTableOpts(0,0), bIsWeb(bWeb) { aGlobalNames[GLOB_NAME_CALC ] = SvGlobalName(SO3_SC_CLASSID); @@ -660,16 +660,16 @@ void SwInsertConfig::ImplCommit() switch(nProp) { case INS_PROP_TABLE_HEADER: - pValues[nProp] <<= 0 != (aInsTblOpts.mnInsMode & tabopts::HEADLINE); + pValues[nProp] <<= 0 != (aInsTableOpts.mnInsMode & tabopts::HEADLINE); break;//"Table/Header", case INS_PROP_TABLE_REPEATHEADER: - pValues[nProp] <<= aInsTblOpts.mnRowsToRepeat > 0; + pValues[nProp] <<= aInsTableOpts.mnRowsToRepeat > 0; break;//"Table/RepeatHeader", case INS_PROP_TABLE_BORDER: - pValues[nProp] <<= 0 != (aInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER ); + pValues[nProp] <<= 0 != (aInsTableOpts.mnInsMode & tabopts::DEFAULT_BORDER ); break;//"Table/Border", case INS_PROP_TABLE_SPLIT: - pValues[nProp] <<= 0 != (aInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT); + pValues[nProp] <<= 0 != (aInsTableOpts.mnInsMode & tabopts::SPLIT_LAYOUT); break;//"Table/Split", case INS_PROP_CAP_AUTOMATIC: pValues[nProp] <<= bInsWithCaption; @@ -894,7 +894,7 @@ void SwInsertConfig::Load() else if (!bIsWeb) return; - sal_uInt16 nInsTblFlags = 0; + sal_uInt16 nInsTableFlags = 0; for (sal_Int32 nProp = 0; nProp < aNames.getLength(); ++nProp) { if (pValues[nProp].hasValue()) @@ -905,25 +905,25 @@ void SwInsertConfig::Load() case INS_PROP_TABLE_HEADER: { if(bBool) - nInsTblFlags|= tabopts::HEADLINE; + nInsTableFlags|= tabopts::HEADLINE; } break;//"Table/Header", case INS_PROP_TABLE_REPEATHEADER: { - aInsTblOpts.mnRowsToRepeat = bBool? 1 : 0; + aInsTableOpts.mnRowsToRepeat = bBool? 1 : 0; } break;//"Table/RepeatHeader", case INS_PROP_TABLE_BORDER: { if(bBool) - nInsTblFlags|= tabopts::DEFAULT_BORDER; + nInsTableFlags|= tabopts::DEFAULT_BORDER; } break;//"Table/Border", case INS_PROP_TABLE_SPLIT: { if(bBool) - nInsTblFlags|= tabopts::SPLIT_LAYOUT; + nInsTableFlags|= tabopts::SPLIT_LAYOUT; } break;//"Table/Split", case INS_PROP_CAP_AUTOMATIC: @@ -1091,7 +1091,7 @@ void SwInsertConfig::Load() } } - aInsTblOpts.mnInsMode = nInsTblFlags; + aInsTableOpts.mnInsMode = nInsTableFlags; } const Sequence<OUString>& SwTableConfig::GetPropertyNames() @@ -1138,14 +1138,14 @@ void SwTableConfig::ImplCommit() { switch(nProp) { - case 0 : pValues[nProp] <<= (sal_Int32)convertTwipToMm100(nTblHMove); break; //"Shift/Row", - case 1 : pValues[nProp] <<= (sal_Int32)convertTwipToMm100(nTblVMove); break; //"Shift/Column", - case 2 : pValues[nProp] <<= (sal_Int32)convertTwipToMm100(nTblHInsert); break; //"Insert/Row", - case 3 : pValues[nProp] <<= (sal_Int32)convertTwipToMm100(nTblVInsert); break; //"Insert/Column", - case 4 : pValues[nProp] <<= (sal_Int32)eTblChgMode; break; //"Change/Effect", - case 5 : pValues[nProp] <<= bInsTblFormatNum; break; //"Input/NumberRecognition", - case 6 : pValues[nProp] <<= bInsTblChangeNumFormat; break; //"Input/NumberFormatRecognition", - case 7 : pValues[nProp] <<= bInsTblAlignNum; break; //"Input/Alignment" + case 0 : pValues[nProp] <<= (sal_Int32)convertTwipToMm100(nTableHMove); break; //"Shift/Row", + case 1 : pValues[nProp] <<= (sal_Int32)convertTwipToMm100(nTableVMove); break; //"Shift/Column", + case 2 : pValues[nProp] <<= (sal_Int32)convertTwipToMm100(nTableHInsert); break; //"Insert/Row", + case 3 : pValues[nProp] <<= (sal_Int32)convertTwipToMm100(nTableVInsert); break; //"Insert/Column", + case 4 : pValues[nProp] <<= (sal_Int32)eTableChgMode; break; //"Change/Effect", + case 5 : pValues[nProp] <<= bInsTableFormatNum; break; //"Input/NumberRecognition", + case 6 : pValues[nProp] <<= bInsTableChangeNumFormat; break; //"Input/NumberFormatRecognition", + case 7 : pValues[nProp] <<= bInsTableAlignNum; break; //"Input/Alignment" } } PutProperties(aNames, aValues); @@ -1164,14 +1164,14 @@ void SwTableConfig::Load() sal_Int32 nTemp = 0; switch (nProp) { - case 0 : pValues[nProp] >>= nTemp; nTblHMove = (sal_uInt16)convertMm100ToTwip(nTemp); break; //"Shift/Row", - case 1 : pValues[nProp] >>= nTemp; nTblVMove = (sal_uInt16)convertMm100ToTwip(nTemp); break; //"Shift/Column", - case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (sal_uInt16)convertMm100ToTwip(nTemp); break; //"Insert/Row", - case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (sal_uInt16)convertMm100ToTwip(nTemp); break; //"Insert/Column", - case 4 : pValues[nProp] >>= nTemp; eTblChgMode = (TblChgMode)nTemp; break; //"Change/Effect", - case 5 : bInsTblFormatNum = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; //"Input/NumberRecognition", - case 6 : bInsTblChangeNumFormat = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; //"Input/NumberFormatRecognition", - case 7 : bInsTblAlignNum = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; //"Input/Alignment" + case 0 : pValues[nProp] >>= nTemp; nTableHMove = (sal_uInt16)convertMm100ToTwip(nTemp); break; //"Shift/Row", + case 1 : pValues[nProp] >>= nTemp; nTableVMove = (sal_uInt16)convertMm100ToTwip(nTemp); break; //"Shift/Column", + case 2 : pValues[nProp] >>= nTemp; nTableHInsert = (sal_uInt16)convertMm100ToTwip(nTemp); break; //"Insert/Row", + case 3 : pValues[nProp] >>= nTemp; nTableVInsert = (sal_uInt16)convertMm100ToTwip(nTemp); break; //"Insert/Column", + case 4 : pValues[nProp] >>= nTemp; eTableChgMode = (TableChgMode)nTemp; break; //"Change/Effect", + case 5 : bInsTableFormatNum = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; //"Input/NumberRecognition", + case 6 : bInsTableChangeNumFormat = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; //"Input/NumberFormatRecognition", + case 7 : bInsTableAlignNum = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; //"Input/Alignment" } } } @@ -1187,7 +1187,7 @@ SwMiscConfig::SwMiscConfig() : bSinglePrintJob(false), bIsNameFromColumn(true), bAskForMailMergeInPrint(true), - nMailingFormats(MailTxtFormats::NONE) + nMailingFormats(MailTextFormats::NONE) { Load(); } @@ -1278,7 +1278,7 @@ void SwMiscConfig::Load() case 3 : bGrfToGalleryAsLnk = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; case 4 : bNumAlignSize = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; case 5 : bSinglePrintJob = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; - case 6 : nMailingFormats = static_cast<MailTxtFormats>(*static_cast<sal_uInt8 const *>(pValues[nProp].getValue())); break; + case 6 : nMailingFormats = static_cast<MailTextFormats>(*static_cast<sal_uInt8 const *>(pValues[nProp].getValue())); break; case 7 : pValues[nProp] >>= sTmp; sNameFromColumn = sTmp; break; case 8 : pValues[nProp] >>= sTmp; sMailingPath = sTmp; break; case 9 : pValues[nProp] >>= sTmp; sMailName = sTmp; break; diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index 1f00241779c7..7ac29152690f 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -115,29 +115,29 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy, { for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) { - const SwNumFmt* pFmt = rCopy.GetNumFmt( n ); - if( pFmt ) - aFmts[ n ] = new _SwNumFmtGlobal( *pFmt ); + const SwNumFormat* pFormat = rCopy.GetNumFormat( n ); + if( pFormat ) + aFormats[ n ] = new _SwNumFormatGlobal( *pFormat ); else - aFmts[ n ] = 0; + aFormats[ n ] = 0; } } SwNumRulesWithName::SwNumRulesWithName() { - memset(aFmts, 0, sizeof(aFmts)); + memset(aFormats, 0, sizeof(aFormats)); } SwNumRulesWithName::SwNumRulesWithName( const SwNumRulesWithName& rCopy ) { - memset( aFmts, 0, sizeof( aFmts )); + memset( aFormats, 0, sizeof( aFormats )); *this = rCopy; } SwNumRulesWithName::~SwNumRulesWithName() { for( int n = 0; n < MAXLEVEL; ++n ) - delete aFmts[ n ]; + delete aFormats[ n ]; } const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName &rCopy) @@ -147,13 +147,13 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName maName = rCopy.maName; for( int n = 0; n < MAXLEVEL; ++n ) { - delete aFmts[ n ]; + delete aFormats[ n ]; - _SwNumFmtGlobal* pFmt = rCopy.aFmts[ n ]; - if( pFmt ) - aFmts[ n ] = new _SwNumFmtGlobal( *pFmt ); + _SwNumFormatGlobal* pFormat = rCopy.aFormats[ n ]; + if( pFormat ) + aFormats[ n ] = new _SwNumFormatGlobal( *pFormat ); else - aFmts[ n ] = 0; + aFormats[ n ] = 0; } } return *this; @@ -166,46 +166,46 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const rChg.SetAutoRule( false ); for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) { - _SwNumFmtGlobal* pFmt = aFmts[ n ]; - if( 0 != pFmt) + _SwNumFormatGlobal* pFormat = aFormats[ n ]; + if( 0 != pFormat) { - SwNumFmt aNew; - pFmt->ChgNumFmt( rSh, aNew ); + SwNumFormat aNew; + pFormat->ChgNumFormat( rSh, aNew ); rChg.Set( n, aNew ); } } } -void SwNumRulesWithName::GetNumFmt( - size_t const nIndex, SwNumFmt const*& rpNumFmt, OUString const*& rpName) const +void SwNumRulesWithName::GetNumFormat( + size_t const nIndex, SwNumFormat const*& rpNumFormat, OUString const*& rpName) const { - rpNumFmt = (aFmts[nIndex]) ? &aFmts[nIndex]->aFmt : 0; - rpName = (aFmts[nIndex]) ? &aFmts[nIndex]->sCharFmtName : 0; + rpNumFormat = (aFormats[nIndex]) ? &aFormats[nIndex]->aFormat : 0; + rpName = (aFormats[nIndex]) ? &aFormats[nIndex]->sCharFormatName : 0; } -void SwNumRulesWithName::SetNumFmt( - size_t const nIndex, SwNumFmt const& rNumFmt, OUString const& rName) +void SwNumRulesWithName::SetNumFormat( + size_t const nIndex, SwNumFormat const& rNumFormat, OUString const& rName) { - delete aFmts[nIndex]; - aFmts[nIndex] = new _SwNumFmtGlobal(rNumFmt); - aFmts[nIndex]->sCharFmtName = rName; - aFmts[nIndex]->nCharPoolId = USHRT_MAX; - aFmts[nIndex]->aItems.clear(); + delete aFormats[nIndex]; + aFormats[nIndex] = new _SwNumFormatGlobal(rNumFormat); + aFormats[nIndex]->sCharFormatName = rName; + aFormats[nIndex]->nCharPoolId = USHRT_MAX; + aFormats[nIndex]->aItems.clear(); } -SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt ) - : aFmt( rFmt ), nCharPoolId( USHRT_MAX ) +SwNumRulesWithName::_SwNumFormatGlobal::_SwNumFormatGlobal( const SwNumFormat& rFormat ) + : aFormat( rFormat ), nCharPoolId( USHRT_MAX ) { // relative gaps????? - SwCharFmt* pFmt = rFmt.GetCharFmt(); - if( pFmt ) + SwCharFormat* pFormat = rFormat.GetCharFormat(); + if( pFormat ) { - sCharFmtName = pFmt->GetName(); - nCharPoolId = pFmt->GetPoolFmtId(); - if( pFmt->GetAttrSet().Count() ) + sCharFormatName = pFormat->GetName(); + nCharPoolId = pFormat->GetPoolFormatId(); + if( pFormat->GetAttrSet().Count() ) { - SfxItemIter aIter( pFmt->GetAttrSet() ); + SfxItemIter aIter( pFormat->GetAttrSet() ); const SfxPoolItem *pCurr = aIter.GetCurItem(); while( true ) { @@ -216,60 +216,60 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt ) } } - aFmt.SetCharFmt( 0 ); + aFormat.SetCharFormat( 0 ); } } -SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFmt ) +SwNumRulesWithName::_SwNumFormatGlobal::_SwNumFormatGlobal( const _SwNumFormatGlobal& rFormat ) : - aFmt( rFmt.aFmt ), - sCharFmtName( rFmt.sCharFmtName ), - nCharPoolId( rFmt.nCharPoolId ) + aFormat( rFormat.aFormat ), + sCharFormatName( rFormat.sCharFormatName ), + nCharPoolId( rFormat.nCharPoolId ) { - for( sal_uInt16 n = rFmt.aItems.size(); n; ) - aItems.push_back( rFmt.aItems[ --n ].Clone() ); + for( sal_uInt16 n = rFormat.aItems.size(); n; ) + aItems.push_back( rFormat.aItems[ --n ].Clone() ); } -SwNumRulesWithName::_SwNumFmtGlobal::~_SwNumFmtGlobal() +SwNumRulesWithName::_SwNumFormatGlobal::~_SwNumFormatGlobal() { } -void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh, - SwNumFmt& rNew ) const +void SwNumRulesWithName::_SwNumFormatGlobal::ChgNumFormat( SwWrtShell& rSh, + SwNumFormat& rNew ) const { - SwCharFmt* pFmt = 0; - if( !sCharFmtName.isEmpty() ) + SwCharFormat* pFormat = 0; + if( !sCharFormatName.isEmpty() ) { // at first, look for the name - sal_uInt16 nArrLen = rSh.GetCharFmtCount(); + sal_uInt16 nArrLen = rSh.GetCharFormatCount(); for( sal_uInt16 i = 1; i < nArrLen; ++i ) { - pFmt = &rSh.GetCharFmt( i ); - if (pFmt->GetName()==sCharFmtName) + pFormat = &rSh.GetCharFormat( i ); + if (pFormat->GetName()==sCharFormatName) // exists, so leave attributes as they are! break; - pFmt = 0; + pFormat = 0; } - if( !pFmt ) + if( !pFormat ) { - if( IsPoolUserFmt( nCharPoolId ) ) + if( IsPoolUserFormat( nCharPoolId ) ) { - pFmt = rSh.MakeCharFmt( sCharFmtName ); - pFmt->SetAuto( false ); + pFormat = rSh.MakeCharFormat( sCharFormatName ); + pFormat->SetAuto( false ); } else - pFmt = rSh.GetCharFmtFromPool( nCharPoolId ); + pFormat = rSh.GetCharFormatFromPool( nCharPoolId ); - if( !pFmt->HasWriterListeners() ) // set attributes + if( !pFormat->HasWriterListeners() ) // set attributes for( sal_uInt16 n = aItems.size(); n; ) - pFmt->SetFmtAttr( aItems[ --n ] ); + pFormat->SetFormatAttr( aItems[ --n ] ); } } - const_cast<SwNumFmt&>(aFmt).SetCharFmt( pFmt ); - rNew = aFmt; - if( pFmt ) - const_cast<SwNumFmt&>(aFmt).SetCharFmt( 0 ); + const_cast<SwNumFormat&>(aFormat).SetCharFormat( pFormat ); + rNew = aFormat; + if( pFormat ) + const_cast<SwNumFormat&>(aFormat).SetCharFormat( 0 ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index 4acbe987b471..7aec700cd7be 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -43,7 +43,7 @@ void SwMasterUsrPref::SetUsrPref(const SwViewOption &rCopy) } SwMasterUsrPref::SwMasterUsrPref(bool bWeb) : - eFldUpdateFlags(AUTOUPD_OFF), + eFieldUpdateFlags(AUTOUPD_OFF), nLinkUpdateMode(0), bIsHScrollMetricSet(false), bIsVScrollMetricSet(false), @@ -142,7 +142,7 @@ void SwContentViewConfig::ImplCommit() case 0: bVal = rParent.IsGraphic(); break;// "Display/GraphicObject", case 1: bVal = rParent.IsTable(); break;// "Display/Table", case 2: bVal = rParent.IsDraw(); break;// "Display/DrawingControl", - case 3: bVal = rParent.IsFldName(); break;// "Display/FieldCode", + case 3: bVal = rParent.IsFieldName(); break;// "Display/FieldCode", case 4: bVal = rParent.IsPostIts(); break;// "Display/Note", case 5: bVal = rParent.IsShowContentTips(); break; // "Display/ShowContentTips" case 6: bVal = rParent.IsViewMetaChars(); break; //"NonprintingCharacter/MetaCharacters" @@ -183,7 +183,7 @@ void SwContentViewConfig::Load() case 0: rParent.SetGraphic(bSet); break;// "Display/GraphicObject", case 1: rParent.SetTable(bSet); break;// "Display/Table", case 2: rParent.SetDraw(bSet); break;// "Display/DrawingControl", - case 3: rParent.SetFldName(bSet); break;// "Display/FieldCode", + case 3: rParent.SetFieldName(bSet); break;// "Display/FieldCode", case 4: rParent.SetPostIts(bSet); break;// "Display/Note", case 5: rParent.SetShowContentTips(bSet); break;// "Display/ShowContentTips", case 6: rParent.SetViewMetaChars(bSet); break; //"NonprintingCharacter/MetaCharacters" diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 1418abee8cb2..190a6e3b5d72 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -167,7 +167,7 @@ SwViewOption::SwViewOption() : bShowPlaceHolderFields( true ), nZoom( 100 ), eZoom( SvxZoomType::PERCENT ), - nTblDest(TBL_DEST_CELL) + nTableDest(TBL_DEST_CELL) { // Initialisation is a little simpler now // all Bits to 0 @@ -223,7 +223,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt) nPagePrevCol = rVOpt.nPagePrevCol; bIsPagePreview = rVOpt.bIsPagePreview; eZoom = rVOpt.eZoom ; - nTblDest = rVOpt.nTblDest ; + nTableDest = rVOpt.nTableDest ; nUIOptions = rVOpt.nUIOptions ; nCoreOptions = rVOpt.nCoreOptions ; nCore2Options = rVOpt.nCore2Options ; @@ -263,7 +263,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt ) nPagePrevCol = rVOpt.nPagePrevCol; bIsPagePreview = rVOpt.bIsPagePreview; eZoom = rVOpt.eZoom ; - nTblDest = rVOpt.nTblDest ; + nTableDest = rVOpt.nTableDest ; nUIOptions = rVOpt.nUIOptions ; nCoreOptions = rVOpt.nCoreOptions; nCore2Options = rVOpt.nCore2Options; @@ -305,7 +305,7 @@ void SwViewOption::Init( vcl::Window *pWin ) bool SwViewOption::IsAutoCompleteWords() { - const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); + const SvxSwAutoFormatFlags& rFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); return rFlags.bAutoCmpltCollectWords; } diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 9b8ae4231d45..a3ab6d9716c3 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -466,7 +466,7 @@ bool SwDBManager::Merge(SwWrtShell* pSh) { pSh->StartAllAction(); - pSh->SwViewShell::UpdateFlds(true); + pSh->SwViewShell::UpdateFields(true); pSh->SetModified(); pSh->EndAllAction(); @@ -545,8 +545,8 @@ void SwDBManager::ImportDBEntry(SwWrtShell* pSh) uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY ); uno::Reference<XNameAccess> xCols = xColsSupp->getColumns(); OUString sFormatStr; - sal_uInt16 nFmtLen = sFormatStr.getLength(); - if( nFmtLen ) + sal_uInt16 nFormatLen = sFormatStr.getLength(); + if( nFormatLen ) { const char cSpace = ' '; const char cTab = '\t'; @@ -628,12 +628,12 @@ bool SwDBManager::GetTableNames(ListBox* pListBox, const OUString& rDBName) uno::Reference<XTablesSupplier> xTSupplier = uno::Reference<XTablesSupplier>(xConnection, UNO_QUERY); if(xTSupplier.is()) { - uno::Reference<XNameAccess> xTbls = xTSupplier->getTables(); - Sequence<OUString> aTbls = xTbls->getElementNames(); - const OUString* pTbls = aTbls.getConstArray(); - for(long i = 0; i < aTbls.getLength(); i++) + uno::Reference<XNameAccess> xTables = xTSupplier->getTables(); + Sequence<OUString> aTables = xTables->getElementNames(); + const OUString* pTables = aTables.getConstArray(); + for(long i = 0; i < aTables.getLength(); i++) { - sal_uInt16 nEntry = pListBox->InsertEntry(pTbls[i]); + sal_uInt16 nEntry = pListBox->InsertEntry(pTables[i]); pListBox->SetEntryData(nEntry, (void*)0); } } @@ -781,10 +781,10 @@ static void lcl_CopyFollowPageDesc( static void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell ) { //reset all links of the sections of synchronized labels - size_t nSections = rWorkShell.GetSectionFmtCount(); + size_t nSections = rWorkShell.GetSectionFormatCount(); for (size_t nSection = 0; nSection < nSections; ++nSection) { - SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() ); + SwSectionData aSectionData( *rWorkShell.GetSectionFormat( nSection ).GetSection() ); if( aSectionData.GetType() == FILE_LINK_SECTION ) { aSectionData.SetType( CONTENT_SECTION ); @@ -820,7 +820,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, vcl::Window* pParent) { //check if the doc is synchronized and contains at least one linked section - bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1; + bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFormatCount() > 1; bool bNoError = true; const bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_EMAIL; const bool bMergeShell = rMergeDescriptor.nMergeType == DBMGR_MERGE_SHELL; @@ -878,15 +878,15 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, uno::Reference< XPropertySet > xColumnProp; { - bool bColumnName = !sEMailAddrFld.isEmpty(); + bool bColumnName = !sEMailAddrField.isEmpty(); if (bColumnName) { uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY ); uno::Reference<XNameAccess> xCols = xColsSupp->getColumns(); - if(!xCols->hasByName(sEMailAddrFld)) + if(!xCols->hasByName(sEMailAddrField)) return false; - Any aCol = xCols->getByName(sEMailAddrFld); + Any aCol = xCols->getByName(sEMailAddrField); aCol >>= xColumnProp; } @@ -997,7 +997,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, // #i72517# const SwPageDesc* pSourcePageDesc = pSourceShell->FindPageDescByName( sStartingPageDesc ); - const SwFrmFmt& rMaster = pSourcePageDesc->GetMaster(); + const SwFrameFormat& rMaster = pSourcePageDesc->GetMaster(); bPageStylesWithHeaderFooter = rMaster.GetHeader().IsActive() || rMaster.GetFooter().IsActive(); @@ -1134,14 +1134,14 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, pWorkDoc->getIDocumentLinksAdministration().EmbedAllLinks(); // #i69458# lock fields to prevent access to the result set while calculating layout - rWorkShell.LockExpFlds(); + rWorkShell.LockExpFields(); rWorkShell.CalcLayout(); - rWorkShell.UnlockExpFlds(); + rWorkShell.UnlockExpFields(); } SwWrtShell& rWorkShell = pWorkView->GetWrtShell(); SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE), xWorkDocSh)); - rWorkShell.SwViewShell::UpdateFlds(); + rWorkShell.SwViewShell::UpdateFields(); SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE_FINISHED), xWorkDocSh)); // launch MailMergeEvent if required @@ -1392,7 +1392,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, if (bCreateSingleFile) { - // sw::DocumentLayoutManager::CopyLayoutFmt() did not generate + // sw::DocumentLayoutManager::CopyLayoutFormat() did not generate // unique fly names, do it here once. pTargetDoc->SetInMailMerge(false); pTargetDoc->SetAllUniqueFlyNames(); @@ -1522,14 +1522,14 @@ IMPL_LINK( SwDBManager, PrtCancelHdl, Button *, pButton ) // determine the column's Numberformat and transfer to the forwarded Formatter, // if applicable. -sal_uLong SwDBManager::GetColumnFmt( const OUString& rDBName, +sal_uLong SwDBManager::GetColumnFormat( const OUString& rDBName, const OUString& rTableName, const OUString& rColNm, - SvNumberFormatter* pNFmtr, + SvNumberFormatter* pNFormatr, long nLanguage ) { sal_uLong nRet = 0; - if(pNFmtr) + if(pNFormatr) { uno::Reference< XDataSource> xSource; uno::Reference< XConnection> xConnection; @@ -1586,7 +1586,7 @@ sal_uLong SwDBManager::GetColumnFmt( const OUString& rDBName, Any aCol = xCols->getByName(rColNm); uno::Reference< XPropertySet > xColumn; aCol >>= xColumn; - nRet = GetColumnFmt(xSource, xConnection, xColumn, pNFmtr, nLanguage); + nRet = GetColumnFormat(xSource, xConnection, xColumn, pNFormatr, nLanguage); if(bDispose) { ::comphelper::disposeComponent( xColsSupp ); @@ -1597,15 +1597,15 @@ sal_uLong SwDBManager::GetColumnFmt( const OUString& rDBName, } } else - nRet = pNFmtr->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM ); + nRet = pNFormatr->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM ); } return nRet; } -sal_uLong SwDBManager::GetColumnFmt( uno::Reference< XDataSource> xSource, +sal_uLong SwDBManager::GetColumnFormat( uno::Reference< XDataSource> xSource, uno::Reference< XConnection> xConnection, uno::Reference< XPropertySet> xColumn, - SvNumberFormatter* pNFmtr, + SvNumberFormatter* pNFormatr, long nLanguage ) { // set the NumberFormat in the doc if applicable @@ -1617,11 +1617,11 @@ sal_uLong SwDBManager::GetColumnFmt( uno::Reference< XDataSource> xSource, if ( xChild.is() ) xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY); } - if(xSource.is() && xConnection.is() && xColumn.is() && pNFmtr) + if(xSource.is() && xConnection.is() && xColumn.is() && pNFormatr) { - SvNumberFormatsSupplierObj* pNumFmt = new SvNumberFormatsSupplierObj( pNFmtr ); - uno::Reference< util::XNumberFormatsSupplier > xDocNumFmtsSupplier = pNumFmt; - uno::Reference< XNumberFormats > xDocNumberFormats = xDocNumFmtsSupplier->getNumberFormats(); + SvNumberFormatsSupplierObj* pNumFormat = new SvNumberFormatsSupplierObj( pNFormatr ); + uno::Reference< util::XNumberFormatsSupplier > xDocNumFormatsSupplier = pNumFormat; + uno::Reference< XNumberFormats > xDocNumberFormats = xDocNumFormatsSupplier->getNumberFormats(); uno::Reference< XNumberFormatTypes > xDocNumberFormatTypes(xDocNumberFormats, UNO_QUERY); com::sun::star::lang::Locale aLocale( LanguageTag( (LanguageType)nLanguage ).getLocale()); @@ -1648,23 +1648,23 @@ sal_uLong SwDBManager::GetColumnFmt( uno::Reference< XDataSource> xSource, Any aFormatKey = xColumn->getPropertyValue("FormatKey"); if(aFormatKey.hasValue()) { - sal_Int32 nFmt = 0; - aFormatKey >>= nFmt; + sal_Int32 nFormat = 0; + aFormatKey >>= nFormat; if(xNumberFormats.is()) { try { - uno::Reference<XPropertySet> xNumProps = xNumberFormats->getByKey( nFmt ); + uno::Reference<XPropertySet> xNumProps = xNumberFormats->getByKey( nFormat ); Any aFormatString = xNumProps->getPropertyValue("FormatString"); Any aLocaleVal = xNumProps->getPropertyValue("Locale"); OUString sFormat; aFormatString >>= sFormat; lang::Locale aLoc; aLocaleVal >>= aLoc; - nFmt = xDocNumberFormats->queryKey( sFormat, aLoc, sal_False ); - if(NUMBERFORMAT_ENTRY_NOT_FOUND == sal::static_int_cast< sal_uInt32, sal_Int32>(nFmt)) - nFmt = xDocNumberFormats->addNew( sFormat, aLoc ); - nRet = nFmt; + nFormat = xDocNumberFormats->queryKey( sFormat, aLoc, sal_False ); + if(NUMBERFORMAT_ENTRY_NOT_FOUND == sal::static_int_cast< sal_uInt32, sal_Int32>(nFormat)) + nFormat = xDocNumberFormats->addNew( sFormat, aLoc ); + nRet = nFormat; bUseDefault = false; } catch (const Exception& e) @@ -1764,8 +1764,8 @@ uno::Reference< sdbcx::XColumnsSupplier> SwDBManager::GetColumnSupplier(uno::Ref Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY); if(xTSupplier.is()) { - Reference<XNameAccess> xTbls = xTSupplier->getTables(); - eTableOrQuery = xTbls->hasByName(rTableOrQuery) ? + Reference<XNameAccess> xTables = xTSupplier->getTables(); + eTableOrQuery = xTables->hasByName(rTableOrQuery) ? SW_DB_SELECT_TABLE : SW_DB_SELECT_QUERY; } } @@ -2019,12 +2019,12 @@ bool SwDBManager::FillCalcWithMergeData( SvNumberFormatter *pDocFormatter, lcl_GetColumnCnt( pImpl->pMergeData, xColumnProps, nLanguage, aString, &aNumber ); - sal_uInt32 nFmt = GetColumnFmt( pImpl->pMergeData->sDataSource, + sal_uInt32 nFormat = GetColumnFormat( pImpl->pMergeData->sDataSource, pImpl->pMergeData->sCommand, pColNames[nCol], pDocFormatter, nLanguage ); // aNumber is overwritten by SwDBField::FormatValue, so store initial status bool colIsNumber = aNumber != DBL_MAX; - bool bValidValue = SwDBField::FormatValue( pDocFormatter, aString, nFmt, + bool bValidValue = SwDBField::FormatValue( pDocFormatter, aString, nFormat, aNumber, nColumnType, NULL ); if( colIsNumber ) { diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 72e0e1da7f59..18c8388985f4 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -301,11 +301,11 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent) Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY); if(xTSupplier.is()) { - Reference<XNameAccess> xTbls = xTSupplier->getTables(); - OSL_ENSURE(xTbls->hasByName(sTableName), "table not available anymore?"); + Reference<XNameAccess> xTables = xTSupplier->getTables(); + OSL_ENSURE(xTables->hasByName(sTableName), "table not available anymore?"); try { - Any aTable = xTbls->getByName(sTableName); + Any aTable = xTables->getByName(sTableName); Reference<XPropertySet> xPropSet; aTable >>= xPropSet; xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY); @@ -365,15 +365,15 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent) Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY); if(xTSupplier.is()) { - Reference<XNameAccess> xTbls = xTSupplier->getTables(); - Sequence< OUString> aTblNames = xTbls->getElementNames(); + Reference<XNameAccess> xTables = xTSupplier->getTables(); + Sequence< OUString> aTableNames = xTables->getElementNames(); OUString sTableName; - long nCount = aTblNames.getLength(); - const OUString* pTblNames = aTblNames.getConstArray(); + long nCount = aTableNames.getLength(); + const OUString* pTableNames = aTableNames.getConstArray(); Image aImg = aImageList.GetImage(IMG_DBTABLE); for (long i = 0; i < nCount; i++) { - sTableName = pTblNames[i]; + sTableName = pTableNames[i]; SvTreeListEntry* pTableEntry = InsertEntry(sTableName, aImg, aImg, pParent, bShowColumns); //to discriminate between queries and tables the user data of table entries is set pTableEntry->SetUserData((void*)0); diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index c829ad5107cf..3716b92f774c 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -748,7 +748,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh) { m_pSpellState->m_bTextObjectsCollected = true; std::list<SdrTextObj*> aTextObjs; - SwDrawContact::GetTextObjectsFromFmt( aTextObjs, pDoc ); + SwDrawContact::GetTextObjectsFromFormat( aTextObjs, pDoc ); if(pCurrentTextObj) { m_pSpellState->m_aTextObjects.remove(pCurrentTextObj); diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index 958bc4ae9f18..b4f6046974bc 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(SwFmtFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); // height=width for more consistent preview (analog to edit region) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); @@ -109,7 +109,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) if(SfxItemState::SET == pSet->GetItemState(SID_ATTR_COLUMNS, false, &pItem)|| SfxItemState::SET == pSet->GetItemState(FN_INSERT_REGION, false, &pItem)) { - SwFmtCol aCol; + SwFormatCol aCol; SwRect aRect; rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); @@ -188,7 +188,7 @@ IMPL_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect ) SwRect aRect; CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); - aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrmSize(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 be9179a6fc34..fbd4f6d92332 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -312,19 +312,19 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, const OUString& rShortNam if(!pTmp) return false; - OUString sOnlyTxt; - OUString* pOnlyTxt = 0; + OUString sOnlyText; + OUString* pOnlyText = 0; if( bNoAttr ) { - if( !pWrtShell->GetSelectedText( sOnlyTxt, GETSELTXT_PARABRK_TO_ONLYCR )) + if( !pWrtShell->GetSelectedText( sOnlyText, GETSELTXT_PARABRK_TO_ONLYCR )) return false; - pOnlyTxt = &sOnlyTxt; + pOnlyText = &sOnlyText; } const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get(); const sal_uInt16 nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName, - rCfg.IsSaveRelFile(), pOnlyTxt ); + rCfg.IsSaveRelFile(), pOnlyText ); if(nSuccess == (sal_uInt16) -1 ) { MessageDialog(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VCL_MESSAGE_INFO).Execute(); @@ -370,7 +370,7 @@ bool SwGlossaryHdl::ExpandGlossary() // use this at text selection if(pWrtShell->SwCrsrShell::HasSelection() && !pWrtShell->IsBlockMode()) { - aShortName = pWrtShell->GetSelTxt(); + aShortName = pWrtShell->GetSelText(); } else { @@ -384,7 +384,7 @@ bool SwGlossaryHdl::ExpandGlossary() pWrtShell->SelNearestWrd(); // ask for word if(pWrtShell->IsSelection()) - aShortName = pWrtShell->GetSelTxt(); + aShortName = pWrtShell->GetSelText(); } return pGlossary && Expand( aShortName, &rStatGlossaries, pGlossary ); } @@ -509,7 +509,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, pWrtShell->StartAllAction(); // cache all InputFields - SwInputFieldList aFldLst( pWrtShell, true ); + SwInputFieldList aFieldLst( pWrtShell, true ); pWrtShell->InsertGlossary(*pGlossary, aShortName); pWrtShell->EndAllAction(); @@ -520,8 +520,8 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, pWrtShell->EndUndo(UNDO_INSGLOSSARY); // demand input for all new InputFields - if( aFldLst.BuildSortLst() ) - pWrtShell->UpdateInputFlds( &aFldLst ); + if( aFieldLst.BuildSortLst() ) + pWrtShell->UpdateInputFields( &aFieldLst ); } delete pGlossary; return true; @@ -553,7 +553,7 @@ bool SwGlossaryHdl::InsertGlossary(const OUString &rName) pWrtShell->StartAllAction(); // cache all InputFields - SwInputFieldList aFldLst( pWrtShell, true ); + SwInputFieldList aFieldLst( pWrtShell, true ); pWrtShell->InsertGlossary(*pGlos, rName); pWrtShell->EndAllAction(); @@ -563,8 +563,8 @@ bool SwGlossaryHdl::InsertGlossary(const OUString &rName) } // demand input for all new InputFields - if( aFldLst.BuildSortLst() ) - pWrtShell->UpdateInputFlds( &aFldLst ); + if( aFieldLst.BuildSortLst() ) + pWrtShell->UpdateInputFields( &aFieldLst ); if(!pCurGrp) delete pGlos; @@ -580,13 +580,13 @@ void SwGlossaryHdl::SetMacros(const OUString& rShortName, SwTextBlocks *pGlos = pGlossary ? pGlossary : pCurGrp ? pCurGrp : rStatGlossaries.GetGroupDoc( aCurGrp ); - SvxMacroTableDtor aMacroTbl; + SvxMacroTableDtor aMacroTable; if( pStart ) - aMacroTbl.Insert( SW_EVENT_START_INS_GLOSSARY, *pStart); + aMacroTable.Insert( SW_EVENT_START_INS_GLOSSARY, *pStart); if( pEnd ) - aMacroTbl.Insert( SW_EVENT_END_INS_GLOSSARY, *pEnd); + aMacroTable.Insert( SW_EVENT_END_INS_GLOSSARY, *pEnd); sal_uInt16 nIdx = pGlos->GetIndex( rShortName ); - if( !pGlos->SetMacroTable( nIdx, aMacroTbl ) && pGlos->GetError() ) + if( !pGlos->SetMacroTable( nIdx, aMacroTable ) && pGlos->GetError() ) ErrorHandler::HandleError( pGlos->GetError() ); if(!pCurGrp && !pGlossary) @@ -604,14 +604,14 @@ void SwGlossaryHdl::GetMacros( const OUString &rShortName, sal_uInt16 nIndex = pGlos->GetIndex( rShortName ); if( nIndex != USHRT_MAX ) { - SvxMacroTableDtor aMacroTbl; - if( pGlos->GetMacroTable( nIndex, aMacroTbl ) ) + SvxMacroTableDtor aMacroTable; + if( pGlos->GetMacroTable( nIndex, aMacroTable ) ) { - SvxMacro *pMacro = aMacroTbl.Get( SW_EVENT_START_INS_GLOSSARY ); + SvxMacro *pMacro = aMacroTable.Get( SW_EVENT_START_INS_GLOSSARY ); if( pMacro ) rStart = *pMacro; - pMacro = aMacroTbl.Get( SW_EVENT_END_INS_GLOSSARY ); + pMacro = aMacroTable.Get( SW_EVENT_END_INS_GLOSSARY ); if( pMacro ) rEnd = *pMacro; } diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index d8fd971d5b76..884e383f8460 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -326,8 +326,8 @@ uno::Reference < embed::XEmbeddedObject > SwTransferable::FindOLEObj( sal_Int64& uno::Reference < embed::XEmbeddedObject > xObj; if( pClpDocFac ) { - SwIterator<SwCntntNode,SwFmtColl> aIter( *pClpDocFac->GetDoc()->GetDfltGrfFmtColl() ); - for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) + SwIterator<SwContentNode,SwFormatColl> aIter( *pClpDocFac->GetDoc()->GetDfltGrfFormatColl() ); + for( SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) if( ND_OLENODE == pNd->GetNodeType() ) { xObj = static_cast<SwOLENode*>(pNd)->GetOLEObj().GetOleRef(); @@ -342,8 +342,8 @@ const Graphic* SwTransferable::FindOLEReplacementGraphic() const { if( pClpDocFac ) { - SwIterator<SwCntntNode,SwFmtColl> aIter( *pClpDocFac->GetDoc()->GetDfltGrfFmtColl() ); - for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) + SwIterator<SwContentNode,SwFormatColl> aIter( *pClpDocFac->GetDoc()->GetDfltGrfFormatColl() ); + for( SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) if( ND_OLENODE == pNd->GetNodeType() ) { return static_cast<SwOLENode*>(pNd)->GetGraphic(); @@ -444,7 +444,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo pClpDocFac = new SwDocFac; SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); - pTmpDoc->getIDocumentFieldsAccess().LockExpFlds(); // never update fields - leave text as it is + pTmpDoc->getIDocumentFieldsAccess().LockExpFields(); // never update fields - leave text as it is lclOverWriteDoc(*pWrtShell, *pTmpDoc); // in CORE a new one was created (OLE-Objekte copied!) @@ -455,28 +455,28 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo if( nSelectionType & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() ) { - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR ); + SwContentAtPos aContentAtPos( SwContentAtPos::SW_INETATTR ); Point aPos( SwEditWin::GetDDStartPosX(), SwEditWin::GetDDStartPosY()); bool bSelect = g_bExecuteDrag && pWrtShell->GetView().GetDocShell() && !pWrtShell->GetView().GetDocShell()->IsReadOnly(); - if( pWrtShell->GetContentAtPos( aPos, aCntntAtPos, bSelect ) ) + if( pWrtShell->GetContentAtPos( aPos, aContentAtPos, bSelect ) ) { pBkmk = new INetBookmark( - static_cast<const SwFmtINetFmt*>(aCntntAtPos.aFnd.pAttr)->GetValue(), - aCntntAtPos.sStr ); + static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr)->GetValue(), + aContentAtPos.sStr ); eBufferType = TRNSFR_INETFLD; if( bSelect ) - pWrtShell->SelectTxtAttr( RES_TXTATR_INETFMT ); + pWrtShell->SelectTextAttr( RES_TXTATR_INETFMT ); } } if( pWrtShell->IsFrmSelected() ) { SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_URL, RES_URL ); pWrtShell->GetFlyFrmAttr( aSet ); - const SwFmtURL& rURL = static_cast<const SwFmtURL&>(aSet.Get( RES_URL )); + const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); if( rURL.GetMap() ) pImageMap = new ImageMap( *rURL.GetMap() ); else if( !rURL.GetURL().isEmpty() ) @@ -878,7 +878,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); - pTmpDoc->getIDocumentFieldsAccess().LockExpFlds(); // Never update fields - leave text as is + pTmpDoc->getIDocumentFieldsAccess().LockExpFields(); // Never update fields - leave text as is lclOverWriteDoc(*pWrtShell, *pTmpDoc); { @@ -994,7 +994,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) { SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_URL, RES_URL ); pWrtShell->GetFlyFrmAttr( aSet ); - const SwFmtURL& rURL = static_cast<const SwFmtURL&>(aSet.Get( RES_URL )); + const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); if( rURL.GetMap() ) { pImageMap = new ImageMap( *rURL.GetMap() ); @@ -1053,10 +1053,10 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, SwNodes& rNds = pCDoc->GetNodes(); SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() ); - SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to 1st ContentNode + SwContentNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to 1st ContentNode SwPaM aPam( *pCNd ); - pCDoc->getIDocumentFieldsAccess().LockExpFlds(); // never update fields - leave text as it is + pCDoc->getIDocumentFieldsAccess().LockExpFields(); // never update fields - leave text as it is pCDoc->InsertGlossary( rGlossary, rStr, aPam, 0 ); @@ -1181,7 +1181,7 @@ bool SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData ) bool SwTransferable::PasteData( TransferableDataHelper& rData, SwWrtShell& rSh, sal_uInt16 nAction, SotClipboardFormatId nFormat, - SotExchangeDest nDestination, bool bIsPasteFmt, + SotExchangeDest nDestination, bool bIsPasteFormat, bool bIsDefault, const Point* pPt, sal_Int8 nDropAction, bool bPasteSelection ) @@ -1218,7 +1218,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, } } } - else if( ( !GetSwTransferable( rData ) || bIsPasteFmt ) && + else if( ( !GetSwTransferable( rData ) || bIsPasteFormat ) && !rSh.IsTableMode() && rSh.HasSelection() ) { // then delete the selections @@ -1263,9 +1263,9 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, { // check if dragged over a useful target. If yes, use as content exchange // drop as if from external - const SwFrmFmt* pSwFrmFmt = rSh.GetFmtFromObj(*pPt); + const SwFrameFormat* pSwFrameFormat = rSh.GetFormatFromObj(*pPt); - if(pSwFrmFmt && 0 != dynamic_cast< const SwDrawFrmFmt* >(pSwFrmFmt)) + if(pSwFrameFormat && 0 != dynamic_cast< const SwDrawFrameFormat* >(pSwFrameFormat)) { bPrivateDrop = false; bNeedToSelectBeforePaste = true; @@ -1339,8 +1339,8 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, INetBookmark aBkmk; if( rData.GetINetBookmark( nFormat, aBkmk ) ) { - SwFmtINetFmt aFmt( aBkmk.GetURL(), OUString() ); - rSh.InsertURL( aFmt, aBkmk.GetDescription() ); + SwFormatINetFormat aFormat( aBkmk.GetURL(), OUString() ); + rSh.InsertURL( aFormat, aBkmk.GetDescription() ); nRet = true; } } @@ -1473,8 +1473,8 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, if( nRet ) { - SwFmtINetFmt aFmt( sURL, OUString() ); - rSh.InsertURL( aFmt, sDesc ); + SwFormatINetFormat aFormat( sURL, OUString() ); + rSh.InsertURL( aFormat, sDesc ); } } break; @@ -1578,13 +1578,13 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh, bool bIMap, bLink; if( pPt ) { - bIMap = 0 != rSh.GetFmtFromObj( *pPt )->GetURL().GetMap(); + bIMap = 0 != rSh.GetFormatFromObj( *pPt )->GetURL().GetMap(); OUString aDummy; rSh.GetGrfAtPos( *pPt, aDummy, bLink ); } else { - bIMap = 0 != rSh.GetFlyFrmFmt()->GetURL().GetMap(); + bIMap = 0 != rSh.GetFlyFrameFormat()->GetURL().GetMap(); OUString aDummy; rSh.GetGrfNms( &aDummy, 0 ); bLink = !aDummy.isEmpty(); @@ -1628,7 +1628,7 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh, } bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, - SwWrtShell& rSh, SotClipboardFormatId nFmt, bool bMsg ) + SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bMsg ) { sal_uInt16 nResId = STR_CLPBRD_FORMAT_ERROR; bool nRet = false; @@ -1639,12 +1639,12 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, SvStream* pStream = 0; SwRead pRead = 0; OUString sData; - switch( nFmt ) + switch( nFormat ) { case SotClipboardFormatId::STRING: { pRead = ReadAscii; - if( rData.GetString( nFmt, sData ) ) + if( rData.GetString( nFormat, sData ) ) { pStream = new SvMemoryStream( (void*)sData.getStr(), sData.getLength() * sizeof( sal_Unicode ), @@ -1664,23 +1664,23 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, // no break - because then test if we get a stream default: - if( rData.GetSotStorageStream( nFmt, xStrm ) ) + if( rData.GetSotStorageStream( nFormat, xStrm ) ) { - if( ( SotClipboardFormatId::HTML_SIMPLE == nFmt ) || - ( SotClipboardFormatId::HTML_NO_COMMENT == nFmt ) ) + if( ( SotClipboardFormatId::HTML_SIMPLE == nFormat ) || + ( SotClipboardFormatId::HTML_NO_COMMENT == nFormat ) ) { pStream = aMSE40ClpObj.IsValid( *xStrm ); pRead = ReadHTML; pRead->SetReadUTF8( true ); bool bNoComments = - ( nFmt == SotClipboardFormatId::HTML_NO_COMMENT ); + ( nFormat == SotClipboardFormatId::HTML_NO_COMMENT ); pRead->SetIgnoreHTMLComments( bNoComments ); } else { pStream = &xStrm; - if( SotClipboardFormatId::RTF == nFmt ) + if( SotClipboardFormatId::RTF == nFormat ) pRead = SwReaderWriter::GetReader( READER_WRITER_RTF ); else if( !pRead ) { @@ -1699,7 +1699,7 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, const SwPosition& rInsPos = *rSh.GetCrsr()->Start(); SwReader aReader( *pStream, aEmptyOUStr, OUString(), *rSh.GetCrsr() ); - rSh.SaveTblBoxCntnt( &rInsPos ); + rSh.SaveTableBoxContent( &rInsPos ); if( IsError( aReader.Read( *pRead )) ) nResId = STR_ERROR_CLPBRD_READ; else @@ -1724,7 +1724,7 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, } bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, - SotClipboardFormatId nFmt, sal_uInt8 nActionFlags, bool bMsg ) + SotClipboardFormatId nFormat, sal_uInt8 nActionFlags, bool bMsg ) { bool nRet = false; TransferableObjectDescriptor aObjDesc; @@ -1784,7 +1784,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, // it wasn't a storage, but maybe it's a useful stream } - nFmt = nId; + nFormat = nId; } if( pRead ) @@ -1813,7 +1813,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, } else { - if( rData.HasFormat( nFmt = SotClipboardFormatId::OBJECTDESCRIPTOR_OLE ) && rData.GetTransferableObjectDescriptor( nFmt, aObjDesc ) ) + if( rData.HasFormat( nFormat = SotClipboardFormatId::OBJECTDESCRIPTOR_OLE ) && rData.GetTransferableObjectDescriptor( nFormat, aObjDesc ) ) { xStrm = rData.GetInputStream(SotClipboardFormatId::EMBED_SOURCE_OLE, OUString()); if (!xStrm.is()) @@ -2014,7 +2014,7 @@ bool SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - SwFmtURL aURL( static_cast<const SwFmtURL&>(aSet.Get( RES_URL )) ); + SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); if( aURL.GetURL() != aINetImg.GetTargetURL() || aURL.GetTargetFrameName() != aINetImg.GetTargetFrame() ) @@ -2112,7 +2112,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData, sal_uInt16 i = 1,j; OUString aName; bool bAlreadyThere = false, bDoublePaste = false; - sal_uInt16 nSize = rWrtShell.GetFldTypeCount(); + sal_uInt16 nSize = rWrtShell.GetFieldTypeCount(); const ::utl::TransliterationWrapper& rColl = ::GetAppCmpStrIgnore(); do { @@ -2120,7 +2120,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData, aName += OUString::number( i ); for( j = INIT_FLDTYPES; j < nSize; j++ ) { - pTyp = rWrtShell.GetFldType( j ); + pTyp = rWrtShell.GetFieldType( j ); if( RES_DDEFLD == pTyp->Which() ) { OUString sTmp( static_cast<SwDDEFieldType*>(pTyp)->GetCmd() ); @@ -2148,7 +2148,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData, if( !bDoublePaste ) { SwDDEFieldType aType( aName, aCmd, SfxLinkUpdateMode::ALWAYS ); - pTyp = rWrtShell.InsertFldType( aType ); + pTyp = rWrtShell.InsertFieldType( aType ); } SwDDEFieldType* pDDETyp = static_cast<SwDDEFieldType*>(pTyp); @@ -2214,9 +2214,9 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData, { // remove FieldType again - error occurred! for( j = nSize; j >= INIT_FLDTYPES; --j ) - if( pTyp == rWrtShell.GetFldType( j ) ) + if( pTyp == rWrtShell.GetFieldType( j ) ) { - rWrtShell.RemoveFldType( j ); + rWrtShell.RemoveFieldType( j ); break; } } @@ -2252,7 +2252,7 @@ bool SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData, } bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, - SotClipboardFormatId nFmt, sal_uInt16 nAction, const Point* pPt, + SotClipboardFormatId nFormat, sal_uInt16 nAction, const Point* pPt, sal_uInt8 nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste) { bool nRet = false; @@ -2261,12 +2261,12 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, INetBookmark aBkmk; bool bCheckForGrf = false, bCheckForImageMap = false; - switch( nFmt ) + switch( nFormat ) { case SotClipboardFormatId::BITMAP: case SotClipboardFormatId::PNG: case SotClipboardFormatId::GDIMETAFILE: - nRet = rData.GetGraphic( nFmt, aGraphic ); + nRet = rData.GetGraphic( nFormat, aGraphic ); break; case SotClipboardFormatId::SVXB: @@ -2285,10 +2285,10 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, case SotClipboardFormatId::NETSCAPE_BOOKMARK: case SotClipboardFormatId::FILEGRPDESCRIPTOR: case SotClipboardFormatId::UNIFORMRESOURCELOCATOR: - if( ( nRet = rData.GetINetBookmark( nFmt, aBkmk ) )) + if( ( nRet = rData.GetINetBookmark( nFormat, aBkmk ) )) { if( SW_PASTESDR_SETATTR == nAction ) - nFmt = SotClipboardFormatId::NETSCAPE_BOOKMARK; + nFormat = SotClipboardFormatId::NETSCAPE_BOOKMARK; else bCheckForGrf = true; } @@ -2296,14 +2296,14 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, case SotClipboardFormatId::SIMPLE_FILE: { - OUString sTxt; - if( ( nRet = rData.GetString( nFmt, sTxt ) ) ) + OUString sText; + if( ( nRet = rData.GetString( nFormat, sText ) ) ) { OUString sDesc; - SwTransferable::_CheckForURLOrLNKFile( rData, sTxt, &sDesc ); + SwTransferable::_CheckForURLOrLNKFile( rData, sText, &sDesc ); aBkmk = INetBookmark( - URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link<OUString *, bool>(), false ), + URIHelper::SmartRel2Abs(INetURLObject(), sText, Link<OUString *, bool>(), false ), sDesc ); bCheckForGrf = true; bCheckForImageMap = SW_PASTESDR_REPLACE == nAction; @@ -2312,7 +2312,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, break; default: - nRet = rData.GetGraphic( nFmt, aGraphic ); + nRet = rData.GetGraphic( nFormat, aGraphic ); break; } @@ -2324,12 +2324,12 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, aGraphic, &rFlt ); if( !nRet && SW_PASTESDR_SETATTR == nAction && - SotClipboardFormatId::SIMPLE_FILE == nFmt && + SotClipboardFormatId::SIMPLE_FILE == nFormat && // only at frame selection rSh.IsFrmSelected() ) { // then set as hyperlink after the graphic - nFmt = SotClipboardFormatId::NETSCAPE_BOOKMARK; + nFormat = SotClipboardFormatId::NETSCAPE_BOOKMARK; nRet = true; } } @@ -2390,13 +2390,13 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, case SW_PASTESDR_SETATTR: { - if( SotClipboardFormatId::NETSCAPE_BOOKMARK == nFmt ) + if( SotClipboardFormatId::NETSCAPE_BOOKMARK == nFormat ) { if( rSh.IsFrmSelected() ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - SwFmtURL aURL( static_cast<const SwFmtURL&>(aSet.Get( RES_URL )) ); + SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetURL( aBkmk.GetURL(), false ); aSet.Put( aURL ); rSh.SetFlyFrmAttr( aSet ); @@ -2454,7 +2454,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - SwFmtURL aURL( static_cast<const SwFmtURL&>(aSet.Get( RES_URL )) ); + SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetMap( &aMap ); aSet.Put( aURL ); rSh.SetFlyFrmAttr( aSet ); @@ -2473,7 +2473,7 @@ bool SwTransferable::_PasteImageMap( TransferableDataHelper& rData, { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - SwFmtURL aURL( static_cast<const SwFmtURL&>(aSet.Get( RES_URL )) ); + SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); const ImageMap* pOld = aURL.GetMap(); // set or replace, that is the question @@ -2491,11 +2491,11 @@ bool SwTransferable::_PasteImageMap( TransferableDataHelper& rData, } bool SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, - SwWrtShell& rSh, SotClipboardFormatId nFmt ) + SwWrtShell& rSh, SotClipboardFormatId nFormat ) { bool nRet = false; OUString sFile; - if( rData.GetString( nFmt, sFile ) && !sFile.isEmpty() ) + if( rData.GetString( nFormat, sFile ) && !sFile.isEmpty() ) { OUString sDesc; SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc ); @@ -2514,7 +2514,7 @@ bool SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - SwFmtURL aURL2( static_cast<const SwFmtURL&>(aSet.Get( RES_URL )) ); + SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL2.SetURL( sFile, false ); if( aURL2.GetName().isEmpty() ) aURL2.SetName( sFile ); @@ -2525,7 +2525,7 @@ bool SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, default: { - rSh.InsertURL( SwFmtINetFmt( sFile, OUString() ), + rSh.InsertURL( SwFormatINetFormat( sFile, OUString() ), sDesc.isEmpty() ? sFile : sDesc); } } @@ -2535,12 +2535,12 @@ bool SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, } bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, - SwWrtShell& rSh, SotClipboardFormatId nFmt, + SwWrtShell& rSh, SotClipboardFormatId nFormat, sal_uInt16 nAction, const Point* pPt, sal_uInt8 nActionFlags, bool /* bMsg */, bool * graphicInserted) { - bool nRet = SwTransferable::_PasteGrf( rData, rSh, nFmt, nAction, + bool nRet = SwTransferable::_PasteGrf( rData, rSh, nFormat, nAction, pPt, nActionFlags, 0, false); if (graphicInserted != 0) { *graphicInserted = nRet; @@ -2548,7 +2548,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, if( !nRet ) { OUString sFile, sDesc; - if( rData.GetString( nFmt, sFile ) && !sFile.isEmpty() ) + if( rData.GetString( nFormat, sFile ) && !sFile.isEmpty() ) { #if HAVE_FEATURE_AVMEDIA INetURLObject aMediaURL; @@ -2608,7 +2608,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - SwFmtURL aURL2( static_cast<const SwFmtURL&>(aSet.Get( RES_URL )) ); + SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL2.SetURL( sFile, false ); if( aURL2.GetName().isEmpty() ) aURL2.SetName( sFile ); @@ -2619,7 +2619,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, default: { - rSh.InsertURL( SwFmtINetFmt( sFile, OUString() ), + rSh.InsertURL( SwFormatINetFormat( sFile, OUString() ), sDesc.isEmpty() ? sFile : sDesc ); } } @@ -2632,16 +2632,16 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, } bool SwTransferable::_PasteDBData( TransferableDataHelper& rData, - SwWrtShell& rSh, SotClipboardFormatId nFmt, bool bLink, + SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bLink, const Point* pDragPt, bool bMsg ) { bool nRet = false; - OUString sTxt; - if( rData.GetString( nFmt, sTxt ) && !sTxt.isEmpty() ) + OUString sText; + if( rData.GetString( nFormat, sText ) && !sText.isEmpty() ) { - sal_uInt16 nWh = SotClipboardFormatId::SBA_CTRLDATAEXCHANGE == nFmt + sal_uInt16 nWh = SotClipboardFormatId::SBA_CTRLDATAEXCHANGE == nFormat ? 0 - : SotClipboardFormatId::SBA_DATAEXCHANGE == nFmt + : SotClipboardFormatId::SBA_DATAEXCHANGE == nFormat ? (bLink ? FN_QRY_MERGE_FIELD : FN_QRY_INSERT) @@ -2650,7 +2650,7 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData, : FN_QRY_INSERT_FIELD ); DataFlavorExVector& rVector = rData.GetDataFlavorExVector(); bool bHaveColumnDescriptor = OColumnTransferable::canExtractColumnDescriptor(rVector, ColumnTransferFormatFlags::COLUMN_DESCRIPTOR | ColumnTransferFormatFlags::CONTROL_EXCHANGE); - if ( SotClipboardFormatId::XFORMS == nFmt ) + if ( SotClipboardFormatId::XFORMS == nFormat ) { rSh.MakeDrawView(); FmFormView* pFmView = PTR_CAST( FmFormView, rSh.GetDrawView() ); @@ -2699,7 +2699,7 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData, //force ::SelectShell rView.StopShellTimer(); - SfxStringItem aDataDesc( nWh, sTxt ); + SfxStringItem aDataDesc( nWh, sText ); rView.GetViewFrame()->GetDispatcher()->Execute( nWh, SfxCallMode::ASYNCHRON, &aDataDesc, pConnectionItem.get(), pColumnItem.get(), @@ -2796,9 +2796,9 @@ bool SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell, const TransferableDataHelper& rData ) { // we can paste-special if there's an entry in the paste-special-format list - SvxClipboardFmtItem aClipboardFmtItem(0); - FillClipFmtItem( rWrtShell, rData, aClipboardFmtItem); - return aClipboardFmtItem.Count() > 0; + SvxClipboardFormatItem aClipboardFormatItem(0); + FillClipFormatItem( rWrtShell, rData, aClipboardFormatItem); + return aClipboardFormatItem.Count() > 0; } bool SwTransferable::PasteFormat( SwWrtShell& rSh, @@ -2808,13 +2808,13 @@ bool SwTransferable::PasteFormat( SwWrtShell& rSh, SwWait aWait( *rSh.GetView().GetDocShell(), false ); bool nRet = false; - SotClipboardFormatId nPrivateFmt = SotClipboardFormatId::PRIVATE; + SotClipboardFormatId nPrivateFormat = SotClipboardFormatId::PRIVATE; SwTransferable *pClipboard = GetSwTransferable( rData ); if( pClipboard && ((TRNSFR_DOCUMENT|TRNSFR_GRAPHIC|TRNSFR_OLE) & pClipboard->eBufferType )) - nPrivateFmt = SotClipboardFormatId::EMBED_SOURCE; + nPrivateFormat = SotClipboardFormatId::EMBED_SOURCE; - if( pClipboard && nPrivateFmt == nFormat ) + if( pClipboard && nPrivateFormat == nFormat ) nRet = pClipboard->PrivatePaste( rSh ); else if( rData.HasFormat( nFormat ) ) { @@ -2959,9 +2959,9 @@ bool SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rDat return nRet; } -void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh, +void SwTransferable::FillClipFormatItem( const SwWrtShell& rSh, const TransferableDataHelper& rData, - SvxClipboardFmtItem & rToFill ) + SvxClipboardFormatItem & rToFill ) { SotExchangeDest nDest = SwTransferable::GetSotDestination( rSh ); @@ -3116,10 +3116,10 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) else if( nSelection & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() ) { // is only one field - selected? - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR ); + SwContentAtPos aContentAtPos( SwContentAtPos::SW_INETATTR ); Point aPos( SwEditWin::GetDDStartPosX(), SwEditWin::GetDDStartPosY()); - if( pWrtShell->GetContentAtPos( aPos, aCntntAtPos ) ) + if( pWrtShell->GetContentAtPos( aPos, aContentAtPos ) ) { AddFormat( SotClipboardFormatId::STRING ); AddFormat( SotClipboardFormatId::SOLK ); @@ -3135,7 +3135,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) { SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_URL, RES_URL ); pWrtShell->GetFlyFrmAttr( aSet ); - const SwFmtURL& rURL = static_cast<const SwFmtURL&>(aSet.Get( RES_URL )); + const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); if( rURL.GetMap() ) { pImageMap = new ImageMap( *rURL.GetMap() ); @@ -3188,7 +3188,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction ) pWrtShell->StartAllAction(); pWrtShell->StartUndo( UNDO_UI_DRAG_AND_MOVE ); if ( pWrtShell->IsTableMode() ) - pWrtShell->DeleteTblSel(); + pWrtShell->DeleteTableSel(); else { if ( !(pWrtShell->IsSelFrmMode() || pWrtShell->IsObjSelected()) ) @@ -3296,7 +3296,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, bool bEndWrd = false; bool bSttWrd = false; bool bSttPara = false; - bool bTblSel = false; + bool bTableSel = false; bool bFrmSel = false; SwWrtShell& rSrcSh = *GetShell(); @@ -3305,7 +3305,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if( TRNSFR_INETFLD == eBufferType ) { - if( rSh.GetFmtFromObj( rDragPt ) ) + if( rSh.GetFormatFromObj( rDragPt ) ) { INetBookmark aTmp; if( (TRNSFR_INETFLD & eBufferType) && pBkmk ) @@ -3326,7 +3326,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - SwFmtURL aURL( static_cast<const SwFmtURL&>(aSet.Get( RES_URL )) ); + SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetURL( aTmp.GetURL(), false ); aSet.Put( aURL ); rSh.SetFlyFrmAttr( aSet ); @@ -3360,7 +3360,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, return false; if( rSrcSh.IsTableMode() ) - bTblSel = true; + bTableSel = true; else if( rSrcSh.IsSelFrmMode() || rSrcSh.IsObjSelected() ) { // don't move position-protected objects! @@ -3391,7 +3391,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, rSh.SwCrsrShell::SetCrsr( rDragPt, true ); cWord = rSrcSh.IntelligentCut( nSel, false ); } - else if( !bTblSel && !bFrmSel ) + else if( !bTableSel && !bFrmSel ) { if( !rSh.IsAddMode() ) { @@ -3424,7 +3424,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, { rSh.GoPrevCrsr(); rSh.SwCrsrShell::SetCrsr( aSttPt, true ); - rSh.SelectTxtAttr( RES_TXTATR_INETFMT ); + rSh.SelectTextAttr( RES_TXTATR_INETFMT ); if( rSh.ChgCurrPam( rDragPt ) ) { // don't copy/move inside of yourself @@ -3439,7 +3439,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, else { rSrcSh.SwCrsrShell::SetCrsr( aSttPt, true ); - rSrcSh.SelectTxtAttr( RES_TXTATR_INETFMT ); + rSrcSh.SelectTextAttr( RES_TXTATR_INETFMT ); } // is there an URL attribute at the insert point? Then replace that, @@ -3462,7 +3462,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, rSrcSh.Push(); if ( bRet && bMove && !bFrmSel ) { - if ( bTblSel ) + if ( bTableSel ) { /* delete table contents not cells */ rSrcSh.Delete(); @@ -3483,14 +3483,14 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, /* after dragging a table selection inside one shell set cursor to the drop position. */ - if( &rSh == &rSrcSh && ( bTblSel || rSh.IsBlockMode() ) ) + if( &rSh == &rSrcSh && ( bTableSel || rSh.IsBlockMode() ) ) { rSrcSh.SwCrsrShell::SetCrsr(rDragPt); rSrcSh.GetSwCrsr()->SetMark(); } } - if( bRet && !bTblSel && !bFrmSel ) + if( bRet && !bTableSel && !bFrmSel ) { if( (bInWrd || bEndWrd) && (cWord == SwWrtShell::WORD_SPACE_AFTER || @@ -3624,9 +3624,9 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) // we only end up here with table- or text selection if( nsSelectionType::SEL_TBL_CELLS & rSh.GetSelectionType() ) { - SwFrmFmt* pFmt = rSh.GetTableFmt(); - if( pFmt ) - sName = pFmt->GetName(); + SwFrameFormat* pFormat = rSh.GetTableFormat(); + if( pFormat ) + sName = pFormat->GetName(); } else { diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index a2df960c99a0..6c5a5cdea0b9 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -60,10 +60,10 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, SwPostItMgr& aMgr, SwPostItBits aBits, SwSidebarItem& rSidebarItem, - SwFmtFld* aField ) + SwFormatField* aField ) : SwSidebarWin( rEditWin, nBits, aMgr, aBits, rSidebarItem ) - , mpFmtFld(aField) - , mpFld( static_cast<SwPostItField*>(aField->GetField())) + , mpFormatField(aField) + , mpField( static_cast<SwPostItField*>(aField->GetField())) , mpButtonPopup(0) { } @@ -88,16 +88,16 @@ void SwAnnotationWin::SetPostItText() //If the new text is the same as the old text, keep the same insertion //point .e.g. fdo#33599 - mpFld = static_cast<SwPostItField*>(mpFmtFld->GetField()); - OUString sNewText = mpFld->GetPar2(); + mpField = static_cast<SwPostItField*>(mpFormatField->GetField()); + OUString sNewText = mpField->GetPar2(); bool bTextUnchanged = sNewText.equals(Engine()->GetEditEngine().GetText()); ESelection aOrigSelection(GetOutlinerView()->GetEditView().GetSelection()); // get text from SwPostItField and insert into our textview Engine()->SetModifyHdl( Link<>() ); Engine()->EnableUndo( false ); - if( mpFld->GetTextObject() ) - Engine()->SetText( *mpFld->GetTextObject() ); + if( mpField->GetTextObject() ) + Engine()->SetText( *mpField->GetTextObject() ); else { Engine()->Clear(); @@ -125,22 +125,22 @@ void SwAnnotationWin::UpdateData() boost::scoped_ptr<SwField> pOldField; if (rUndoRedo.DoesUndo()) { - pOldField.reset(mpFld->Copy()); + pOldField.reset(mpField->Copy()); } - mpFld->SetPar2(Engine()->GetEditEngine().GetText()); - mpFld->SetTextObject(Engine()->CreateParaObject()); + mpField->SetPar2(Engine()->GetEditEngine().GetText()); + mpField->SetTextObject(Engine()->CreateParaObject()); if (rUndoRedo.DoesUndo()) { - SwTxtFld *const pTxtFld = mpFmtFld->GetTxtFld(); - SwPosition aPosition( pTxtFld->GetTxtNode() ); - aPosition.nContent = pTxtFld->GetStart(); + SwTextField *const pTextField = mpFormatField->GetTextField(); + SwPosition aPosition( pTextField->GetTextNode() ); + aPosition.nContent = pTextField->GetStart(); rUndoRedo.AppendUndo( - new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); + new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, 0, true)); } // so we get a new layout of notes (anchor position is still the same and we would otherwise not get one) Mgr().SetLayout(); // #i98686# if we have several views, all notes should update their text - mpFmtFld->Broadcast(SwFmtFldHint( 0, SwFmtFldHintWhich::CHANGED)); + mpFormatField->Broadcast(SwFormatFieldHint( 0, SwFormatFieldHintWhich::CHANGED)); DocView().GetDocShell()->SetModified(); } Engine()->ClearModifyFlag(); @@ -149,7 +149,7 @@ void SwAnnotationWin::UpdateData() void SwAnnotationWin::Delete() { - if (DocView().GetWrtShellPtr()->GotoField(*mpFmtFld)) + if (DocView().GetWrtShellPtr()->GotoField(*mpFormatField)) { SwSidebarWin::Delete(); // we delete the field directly, the Mgr cleans up the PostIt by listening @@ -160,7 +160,7 @@ void SwAnnotationWin::Delete() void SwAnnotationWin::GotoPos() { - DocView().GetDocShell()->GetWrtShell()->GotoField(*mpFmtFld); + DocView().GetDocShell()->GetWrtShell()->GotoField(*mpFormatField); } sal_uInt32 SwAnnotationWin::MoveCaret() @@ -175,39 +175,39 @@ sal_uInt32 SwAnnotationWin::MoveCaret() //returns true, if there is another note right before this note bool SwAnnotationWin::CalcFollow() { - SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); - SwPosition aPosition( pTxtFld->GetTxtNode() ); - aPosition.nContent = pTxtFld->GetStart(); - SwTxtAttr * const pTxtAttr = - pTxtFld->GetTxtNode().GetTxtAttrForCharAt( + SwTextField* pTextField = mpFormatField->GetTextField(); + SwPosition aPosition( pTextField->GetTextNode() ); + aPosition.nContent = pTextField->GetStart(); + SwTextAttr * const pTextAttr = + pTextField->GetTextNode().GetTextAttrForCharAt( aPosition.nContent.GetIndex() - 1, RES_TXTATR_ANNOTATION ); - const SwField* pFld = pTxtAttr ? pTxtAttr->GetFmtFld().GetField() : 0; - return pFld && (pFld->Which()== RES_POSTITFLD); + const SwField* pField = pTextAttr ? pTextAttr->GetFormatField().GetField() : 0; + return pField && (pField->Which()== RES_POSTITFLD); } // counts how many SwPostItField we have right after the current one sal_uInt32 SwAnnotationWin::CountFollowing() { sal_uInt32 aCount = 1; // we start with 1, so we have to subtract one at the end again - SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); - SwPosition aPosition( pTxtFld->GetTxtNode() ); - aPosition.nContent = pTxtFld->GetStart(); + SwTextField* pTextField = mpFormatField->GetTextField(); + SwPosition aPosition( pTextField->GetTextNode() ); + aPosition.nContent = pTextField->GetStart(); - SwTxtAttr * pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt( + SwTextAttr * pTextAttr = pTextField->GetTextNode().GetTextAttrForCharAt( aPosition.nContent.GetIndex() + 1, RES_TXTATR_ANNOTATION ); - SwField* pFld = pTxtAttr - ? const_cast<SwField*>(pTxtAttr->GetFmtFld().GetField()) + SwField* pField = pTextAttr + ? const_cast<SwField*>(pTextAttr->GetFormatField().GetField()) : 0; - while ( pFld && ( pFld->Which()== RES_POSTITFLD ) ) + while ( pField && ( pField->Which()== RES_POSTITFLD ) ) { aCount++; - pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt( + pTextAttr = pTextField->GetTextNode().GetTextAttrForCharAt( aPosition.nContent.GetIndex() + aCount, RES_TXTATR_ANNOTATION ); - pFld = pTxtAttr - ? const_cast<SwField*>(pTxtAttr->GetFmtFld().GetField()) + pField = pTextAttr + ? const_cast<SwField*>(pTextAttr->GetFormatField().GetField()) : 0; } return aCount - 1; @@ -267,17 +267,17 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) boost::scoped_ptr<SwField> pOldField; if (rUndoRedo.DoesUndo()) { - pOldField.reset(mpFld->Copy()); + pOldField.reset(mpField->Copy()); } - mpFld->SetPar2(Engine()->GetEditEngine().GetText()); - mpFld->SetTextObject(Engine()->CreateParaObject()); + mpField->SetPar2(Engine()->GetEditEngine().GetText()); + mpField->SetTextObject(Engine()->CreateParaObject()); if (rUndoRedo.DoesUndo()) { - SwTxtFld *const pTxtFld = mpFmtFld->GetTxtFld(); - SwPosition aPosition( pTxtFld->GetTxtNode() ); - aPosition.nContent = pTxtFld->GetStart(); + SwTextField *const pTextField = mpFormatField->GetTextField(); + SwPosition aPosition( pTextField->GetTextNode() ); + aPosition.nContent = pTextField->GetStart(); rUndoRedo.AppendUndo( - new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); + new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, 0, true)); } Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) ); Engine()->ClearModifyFlag(); @@ -287,7 +287,7 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) SvxLanguageItem SwAnnotationWin::GetLanguage() { // set initial language for outliner - SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() ); + SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpField->GetLanguage() ); sal_uInt16 nLangWhichId = 0; switch (nScriptType) { @@ -296,29 +296,29 @@ SvxLanguageItem SwAnnotationWin::GetLanguage() case SvtScriptType::COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break; default: OSL_FAIL("GetLanguage: wrong script type"); } - return SvxLanguageItem(mpFld->GetLanguage(),nLangWhichId); + return SvxLanguageItem(mpField->GetLanguage(),nLangWhichId); } bool SwAnnotationWin::IsProtected() { return SwSidebarWin::IsProtected() || GetLayoutStatus() == SwPostItHelper::DELETED || - ( mpFmtFld && mpFmtFld->IsProtect() ); + ( mpFormatField && mpFormatField->IsProtect() ); } OUString SwAnnotationWin::GetAuthor() { - return mpFld->GetPar1(); + return mpField->GetPar1(); } Date SwAnnotationWin::GetDate() { - return mpFld->GetDate(); + return mpField->GetDate(); } tools::Time SwAnnotationWin::GetTime() { - return mpFld->GetTime(); + return mpField->GetTime(); } } } // end of namespace sw::annotation diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 3b7f4046d8dd..548ae8849bba 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -394,16 +394,16 @@ bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) const SwPageDesc* pDesc = GetPageFrame()->GetPageDesc(); bool const bFirst(GetPageFrame()->OnFirstPage()); - const SwFrmFmt *const pFmt = (GetPageFrame()->OnRightPage()) - ? pDesc->GetRightFmt(bFirst) - : pDesc->GetLeftFmt(bFirst); + const SwFrameFormat *const pFormat = (GetPageFrame()->OnRightPage()) + ? pDesc->GetRightFormat(bFirst) + : pDesc->GetLeftFormat(bFirst); - if ( pFmt ) + if ( pFormat ) { if ( m_bIsHeader ) - bResult = !pFmt->GetHeader().IsActive(); + bResult = !pFormat->GetHeader().IsActive(); else - bResult = !pFmt->GetFooter().IsActive(); + bResult = !pFormat->GetFooter().IsActive(); } return bResult; @@ -426,24 +426,24 @@ void SwHeaderFooterWin::ExecuteCommand( sal_uInt16 nSlot ) case FN_HEADERFOOTER_BORDERBACK: { const SwPageDesc* pDesc = GetPageFrame()->GetPageDesc(); - const SwFrmFmt& rMaster = pDesc->GetMaster(); - SwFrmFmt* pHFFmt = const_cast< SwFrmFmt* >( rMaster.GetFooter().GetFooterFmt() ); + const SwFrameFormat& rMaster = pDesc->GetMaster(); + SwFrameFormat* pHFFormat = const_cast< SwFrameFormat* >( rMaster.GetFooter().GetFooterFormat() ); if ( m_bIsHeader ) - pHFFmt = const_cast< SwFrmFmt* >( rMaster.GetHeader().GetHeaderFmt() ); + pHFFormat = const_cast< SwFrameFormat* >( rMaster.GetHeader().GetHeaderFormat() ); - SfxItemPool* pPool = pHFFmt->GetAttrSet().GetPool(); + SfxItemPool* pPool = pHFFormat->GetAttrSet().GetPool(); SfxItemSet aSet( *pPool, RES_BACKGROUND, RES_BACKGROUND, RES_BOX, RES_BOX, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, RES_SHADOW, RES_SHADOW, 0 ); - aSet.Put( pHFFmt->GetAttrSet() ); + aSet.Put( pHFFormat->GetAttrSet() ); // Create a box info item... needed by the dialog SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); const SfxPoolItem *pBoxInfo; - if ( SfxItemState::SET == pHFFmt->GetAttrSet().GetItemState( SID_ATTR_BORDER_INNER, + if ( SfxItemState::SET == pHFFormat->GetAttrSet().GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo) ) aBoxInfo = *static_cast<const SvxBoxInfoItem*>(pBoxInfo); @@ -458,17 +458,17 @@ void SwHeaderFooterWin::ExecuteCommand( sal_uInt16 nSlot ) { const SfxPoolItem* pItem; if ( SfxItemState::SET == aSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { - pHFFmt->SetFmtAttr( *pItem ); + pHFFormat->SetFormatAttr( *pItem ); rView.GetDocShell()->SetModified(true); } if ( SfxItemState::SET == aSet.GetItemState( RES_BOX, false, &pItem ) ) { - pHFFmt->SetFmtAttr( *pItem ); + pHFFormat->SetFormatAttr( *pItem ); rView.GetDocShell()->SetModified(true); } if ( SfxItemState::SET == aSet.GetItemState( RES_SHADOW, false, &pItem ) ) { - pHFFmt->SetFmtAttr( *pItem ); + pHFFormat->SetFormatAttr( *pItem ); rView.GetDocShell()->SetModified(true); } } diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 680887173a69..879ebd42c122 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -242,8 +242,8 @@ void SwPageBreakWin::Select( ) rSh.Push( ); rSh.ClearMark(); - SwCntntFrm *pCnt = const_cast< SwCntntFrm* >( pBodyFrm->ContainsCntnt() ); - SwCntntNode* pNd = pCnt->GetNode(); + SwContentFrm *pCnt = const_cast< SwContentFrm* >( pBodyFrm->ContainsContent() ); + SwContentNode* pNd = pCnt->GetNode(); rSh.SetSelection( *pNd ); SfxStringItem aItem(pEditWin->GetView().GetPool().GetWhich(FN_FORMAT_TABLE_DLG), "textflow"); @@ -254,8 +254,8 @@ void SwPageBreakWin::Select( ) } else { - SwCntntFrm *pCnt = const_cast< SwCntntFrm* >( pBodyFrm->ContainsCntnt() ); - SwCntntNode* pNd = pCnt->GetNode(); + SwContentFrm *pCnt = const_cast< SwContentFrm* >( pBodyFrm->ContainsContent() ); + SwContentNode* pNd = pCnt->GetNode(); SwPaM aPaM( *pNd ); SwPaMItem aPaMItem( pEditWin->GetView().GetPool( ).GetWhich( FN_PARAM_PAM ), &aPaM ); @@ -276,8 +276,8 @@ void SwPageBreakWin::Select( ) if ( pBodyFrm ) { - SwCntntFrm *pCnt = const_cast< SwCntntFrm* >( pBodyFrm->ContainsCntnt() ); - SwCntntNode* pNd = pCnt->GetNode(); + SwContentFrm *pCnt = const_cast< SwContentFrm* >( pBodyFrm->ContainsContent() ); + SwContentNode* pNd = pCnt->GetNode(); pNd->GetDoc()->GetIDocumentUndoRedo( ).StartUndo( UNDO_UI_DELETE_PAGE_BREAK, NULL ); @@ -285,8 +285,8 @@ void SwPageBreakWin::Select( ) RES_PAGEDESC, RES_PAGEDESC, RES_BREAK, RES_BREAK, NULL ); - aSet.Put( SvxFmtBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); - aSet.Put( SwFmtPageDesc( NULL ) ); + aSet.Put( SvxFormatBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); + aSet.Put( SwFormatPageDesc( NULL ) ); SwPaM aPaM( *pNd ); pNd->GetDoc()->getIDocumentContentOperations().InsertItemSet( aPaM, aSet, SetAttrMode::DEFAULT ); diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 90f02e258868..98a98964dbd9 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -158,7 +158,7 @@ SwPostItMgr::SwPostItMgr(SwView* pView) */ // we want to receive stuff like SFX_HINT_DOCCHANGED StartListening(*mpView->GetDocShell()); - if (!mvPostItFlds.empty()) + if (!mvPostItFields.empty()) { mbWaitingForCalcRects = true; mnEventId = Application::PostUserEvent( LINK( this, SwPostItMgr, CalcHdl), 0 ); @@ -184,13 +184,13 @@ SwPostItMgr::~SwPostItMgr() void SwPostItMgr::CheckForRemovedPostIts() { bool bRemoved = false; - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end(); ) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end(); ) { std::list<SwSidebarItem*>::iterator it = i++; if ( !(*it)->UseElement() ) { SwSidebarItem* p = (*it); - mvPostItFlds.remove(*it); + mvPostItFields.remove(*it); if (GetActiveSidebarWin() == p->pPostIt) SetActiveSidebarWin(0); p->pPostIt.disposeAndClear(); @@ -203,7 +203,7 @@ void SwPostItMgr::CheckForRemovedPostIts() { // make sure that no deleted items remain in page lists // todo: only remove deleted ones?! - if ( mvPostItFlds.empty() ) + if ( mvPostItFields.empty() ) { PreparePageContainer(); PrepareView(); @@ -219,23 +219,23 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b { if (bCheckExistance) { - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { if ( (*i)->GetBroadCaster() == pItem ) return; } } mbLayout = bFocus; - if (pItem->ISA(SwFmtFld)) - mvPostItFlds.push_back(new SwAnnotationItem(static_cast<SwFmtFld&>(*pItem), true, bFocus) ); - OSL_ENSURE(pItem->ISA(SwFmtFld),"Mgr::InsertItem: seems like new stuff was added"); + if (pItem->ISA(SwFormatField)) + mvPostItFields.push_back(new SwAnnotationItem(static_cast<SwFormatField&>(*pItem), true, bFocus) ); + OSL_ENSURE(pItem->ISA(SwFormatField),"Mgr::InsertItem: seems like new stuff was added"); StartListening(*pItem); } void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast ) { EndListening(*pBroadcast); - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { if ( (*i)->GetBroadCaster() == pBroadcast ) { @@ -243,7 +243,7 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast ) if (GetActiveSidebarWin() == p->pPostIt) SetActiveSidebarWin(0); p->pPostIt.disposeAndClear(); - mvPostItFlds.erase(i); + mvPostItFields.erase(i); delete p; break; } @@ -259,7 +259,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) sal_uInt32 nId = static_cast<const SfxEventHint&>(rHint).GetEventId(); if ( nId == SW_EVENT_LAYOUT_FINISHED ) { - if ( !mbWaitingForCalcRects && !mvPostItFlds.empty()) + if ( !mbWaitingForCalcRects && !mvPostItFields.empty()) { mbWaitingForCalcRects = true; mnEventId = Application::PostUserEvent( LINK( this, SwPostItMgr, CalcHdl), 0 ); @@ -285,7 +285,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { if ( mpView->GetDocShell() == &rBC ) { - if ( !mbWaitingForCalcRects && !mvPostItFlds.empty()) + if ( !mbWaitingForCalcRects && !mvPostItFields.empty()) { mbWaitingForCalcRects = true; mnEventId = Application::PostUserEvent( LINK( this, SwPostItMgr, CalcHdl), 0 ); @@ -304,32 +304,32 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if ( mpView->GetDocShell() != &rBC ) { // field to be removed is the broadcaster - OSL_FAIL("Notification for removed SwFmtFld was not sent!"); + OSL_FAIL("Notification for removed SwFormatField was not sent!"); RemoveItem(&rBC); } break; } } } - else if ( dynamic_cast<const SwFmtFldHint*>(&rHint) ) + else if ( dynamic_cast<const SwFormatFieldHint*>(&rHint) ) { - const SwFmtFldHint& rFmtHint = static_cast<const SwFmtFldHint&>(rHint); - SwFmtFld* pFld = const_cast <SwFmtFld*>( rFmtHint.GetField() ); - switch ( rFmtHint.Which() ) + const SwFormatFieldHint& rFormatHint = static_cast<const SwFormatFieldHint&>(rHint); + SwFormatField* pField = const_cast <SwFormatField*>( rFormatHint.GetField() ); + switch ( rFormatHint.Which() ) { - case SwFmtFldHintWhich::INSERTED : + case SwFormatFieldHintWhich::INSERTED : { - if (!pFld) + if (!pField) { AddPostIts(true); break; } // get field to be inserted from hint - if ( pFld->IsFldInDoc() ) + if ( pField->IsFieldInDoc() ) { bool bEmpty = !HasNotes(); - InsertItem( pFld, true, false ); - if (bEmpty && !mvPostItFlds.empty()) + InsertItem( pField, true, false ); + if (bEmpty && !mvPostItFields.empty()) PrepareView(true); } else @@ -338,31 +338,31 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } break; } - case SwFmtFldHintWhich::REMOVED: + case SwFormatFieldHintWhich::REMOVED: { if (mbDeleteNote) { - if (!pFld) + if (!pField) { CheckForRemovedPostIts(); break; } - RemoveItem(pFld); + RemoveItem(pField); } break; } - case SwFmtFldHintWhich::FOCUS: + case SwFormatFieldHintWhich::FOCUS: { - if (rFmtHint.GetView()== mpView) + if (rFormatHint.GetView()== mpView) Focus(rBC); break; } - case SwFmtFldHintWhich::CHANGED: + case SwFormatFieldHintWhich::CHANGED: { - SwFmtFld* pFmtFld = dynamic_cast<SwFmtFld*>(&rBC); - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + SwFormatField* pFormatField = dynamic_cast<SwFormatField*>(&rBC); + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { - if ( pFmtFld == (*i)->GetBroadCaster() ) + if ( pFormatField == (*i)->GetBroadCaster() ) { if ((*i)->pPostIt) { @@ -375,16 +375,16 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) break; } - case SwFmtFldHintWhich::LANGUAGE: + case SwFormatFieldHintWhich::LANGUAGE: { - SwFmtFld* pFmtFld = dynamic_cast<SwFmtFld*>(&rBC); - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + SwFormatField* pFormatField = dynamic_cast<SwFormatField*>(&rBC); + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { - if ( pFmtFld == (*i)->GetBroadCaster() ) + if ( pFormatField == (*i)->GetBroadCaster() ) { if ((*i)->pPostIt) { - const SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld().GetField()->GetLanguage() ); + const SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFormatField().GetField()->GetLanguage() ); sal_uInt16 nLangWhichId = 0; switch (nScriptType) { @@ -395,7 +395,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } (*i)->pPostIt->SetLanguage( SvxLanguageItem( - (*i)->GetFmtFld().GetField()->GetLanguage(), + (*i)->GetFormatField().GetField()->GetLanguage(), nLangWhichId) ); } break; @@ -415,7 +415,7 @@ void SwPostItMgr::Focus(SfxBroadcaster& rBC) mpView->ExecViewOptions(aRequest); } - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { // field to get the focus is the broadcaster if ( &rBC == (*i)->GetBroadCaster() ) @@ -447,9 +447,9 @@ bool SwPostItMgr::CalcRects() bool bChange = false; bool bRepair = false; PreparePageContainer(); - if ( !mvPostItFlds.empty() ) + if ( !mvPostItFields.empty() ) { - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { SwSidebarItem* pItem = (*i); if ( !pItem->UseElement() ) @@ -465,10 +465,10 @@ bool SwPostItMgr::CalcRects() const sal_Int32 nOldStartContent( pItem->maLayoutInfo.mnStartContent ); { // update layout information - const SwTxtAnnotationFld* pTxtAnnotationFld = - dynamic_cast< const SwTxtAnnotationFld* >( pItem->GetFmtFld().GetTxtFld() ); + const SwTextAnnotationField* pTextAnnotationField = + dynamic_cast< const SwTextAnnotationField* >( pItem->GetFormatField().GetTextField() ); const ::sw::mark::IMark* pAnnotationMark = - pTxtAnnotationFld != NULL ? pTxtAnnotationFld->GetAnnotationMark() : NULL; + pTextAnnotationField != NULL ? pTextAnnotationField->GetAnnotationMark() : NULL; if ( pAnnotationMark != NULL ) { pItem->mLayoutStatus = @@ -495,7 +495,7 @@ bool SwPostItMgr::CalcRects() Sort(); // sort the items into the right page vector, so layout can be done by page - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { SwSidebarItem* pItem = (*i); if( SwPostItHelper::INVISIBLE == pItem->mLayoutStatus ) @@ -553,7 +553,7 @@ bool SwPostItMgr::CalcRects() bool SwPostItMgr::HasScrollbars() const { - for(std::list<SwSidebarItem*>::const_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::const_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { if ((*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->HasScrollbar()) return true; @@ -584,7 +584,7 @@ void SwPostItMgr::PreparePageContainer() for(std::vector<SwPostItPageItem*>::iterator i = mPages.begin(); i != mPages.end() ; ++i) { (*i)->mList->clear(); - if (mvPostItFlds.empty()) + if (mvPostItFields.empty()) (*i)->bScrollbar = false; } @@ -592,7 +592,7 @@ void SwPostItMgr::PreparePageContainer() void SwPostItMgr::LayoutPostIts() { - if ( !mvPostItFlds.empty() && !mbWaitingForCalcRects ) + if ( !mvPostItFields.empty() && !mbWaitingForCalcRects ) { mbLayouting = true; @@ -776,7 +776,7 @@ void SwPostItMgr::LayoutPostIts() if (!ShowNotes()) { // we do not want to see the notes anymore -> Options-Writer-View-Notes bool bRepair = false; - for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { SwSidebarItem* pItem = (*i); if ( !pItem->UseElement() ) @@ -1151,55 +1151,55 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList, con void SwPostItMgr::AddPostIts(bool bCheckExistance, bool bFocus) { - bool bEmpty = mvPostItFlds.empty(); - SwFieldType* pType = mpView->GetDocShell()->GetDoc()->getIDocumentFieldsAccess().GetFldType(RES_POSTITFLD, OUString(),false); - SwIterator<SwFmtFld,SwFieldType> aIter( *pType ); - SwFmtFld* pSwFmtFld = aIter.First(); - while(pSwFmtFld) + bool bEmpty = mvPostItFields.empty(); + SwFieldType* pType = mpView->GetDocShell()->GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_POSTITFLD, OUString(),false); + SwIterator<SwFormatField,SwFieldType> aIter( *pType ); + SwFormatField* pSwFormatField = aIter.First(); + while(pSwFormatField) { - if ( pSwFmtFld->GetTxtFld()) + if ( pSwFormatField->GetTextField()) { - if ( pSwFmtFld->IsFldInDoc() ) - InsertItem(pSwFmtFld,bCheckExistance,bFocus); + if ( pSwFormatField->IsFieldInDoc() ) + InsertItem(pSwFormatField,bCheckExistance,bFocus); } - pSwFmtFld = aIter.Next(); + pSwFormatField = aIter.Next(); } // if we just added the first one we have to update the view for centering - if (bEmpty && !mvPostItFlds.empty()) + if (bEmpty && !mvPostItFields.empty()) PrepareView(true); } void SwPostItMgr::RemoveSidebarWin() { - if (!mvPostItFlds.empty()) + if (!mvPostItFields.empty()) { - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { EndListening( *(const_cast<SfxBroadcaster*>((*i)->GetBroadCaster())) ); (*i)->pPostIt.disposeAndClear(); delete (*i); } - mvPostItFlds.clear(); + mvPostItFields.clear(); } // all postits removed, no items should be left in pages PreparePageContainer(); } -class FilterFunctor : public std::unary_function<const SwFmtFld*, bool> +class FilterFunctor : public std::unary_function<const SwFormatField*, bool> { public: - virtual bool operator()(const SwFmtFld* pFld) const = 0; + virtual bool operator()(const SwFormatField* pField) const = 0; virtual ~FilterFunctor() {} }; class IsPostitField : public FilterFunctor { public: - bool operator()(const SwFmtFld* pFld) const SAL_OVERRIDE + bool operator()(const SwFormatField* pField) const SAL_OVERRIDE { - return pFld->GetField()->GetTyp()->Which() == RES_POSTITFLD; + return pField->GetField()->GetTyp()->Which() == RES_POSTITFLD; } }; @@ -1211,11 +1211,11 @@ public: : m_sAuthor(rAuthor) { } - bool operator()(const SwFmtFld* pFld) const SAL_OVERRIDE + bool operator()(const SwFormatField* pField) const SAL_OVERRIDE { - if (pFld->GetField()->GetTyp()->Which() != RES_POSTITFLD) + if (pField->GetField()->GetTyp()->Which() != RES_POSTITFLD) return false; - return static_cast<const SwPostItField*>(pFld->GetField())->GetPar1() == m_sAuthor; + return static_cast<const SwPostItField*>(pField->GetField())->GetPar1() == m_sAuthor; } }; @@ -1224,40 +1224,40 @@ public: //and automatically adding entries if they appear in the document and match the //functor. // -//This will completely refill in the case of a "anonymous" NULL pFld stating +//This will completely refill in the case of a "anonymous" NULL pField stating //rather unhelpfully that "something changed" so you may process the same //Fields more than once. class FieldDocWatchingStack : public SfxListener { std::list<SwSidebarItem*>& l; - std::vector<const SwFmtFld*> v; + std::vector<const SwFormatField*> v; SwDocShell& m_rDocShell; FilterFunctor& m_rFilter; virtual void Notify(SfxBroadcaster&, const SfxHint& rHint) SAL_OVERRIDE { - const SwFmtFldHint* pHint = dynamic_cast<const SwFmtFldHint*>(&rHint); + const SwFormatFieldHint* pHint = dynamic_cast<const SwFormatFieldHint*>(&rHint); if (pHint) { bool bAllInvalidated = false; - if (pHint->Which() == SwFmtFldHintWhich::REMOVED) + if (pHint->Which() == SwFormatFieldHintWhich::REMOVED) { - const SwFmtFld* pFld = pHint->GetField(); - bAllInvalidated = pFld == NULL; - if (!bAllInvalidated && m_rFilter(pFld)) + const SwFormatField* pField = pHint->GetField(); + bAllInvalidated = pField == NULL; + if (!bAllInvalidated && m_rFilter(pField)) { - EndListening(const_cast<SwFmtFld&>(*pFld)); - v.erase(std::remove(v.begin(), v.end(), pFld), v.end()); + EndListening(const_cast<SwFormatField&>(*pField)); + v.erase(std::remove(v.begin(), v.end(), pField), v.end()); } } - else if (pHint->Which() == SwFmtFldHintWhich::INSERTED) + else if (pHint->Which() == SwFormatFieldHintWhich::INSERTED) { - const SwFmtFld* pFld = pHint->GetField(); - bAllInvalidated = pFld == NULL; - if (!bAllInvalidated && m_rFilter(pFld)) + const SwFormatField* pField = pHint->GetField(); + bAllInvalidated = pField == NULL; + if (!bAllInvalidated && m_rFilter(pField)) { - StartListening(const_cast<SwFmtFld&>(*pFld)); - v.push_back(pFld); + StartListening(const_cast<SwFormatField&>(*pField)); + v.push_back(pField); } } @@ -1285,19 +1285,19 @@ public: for(std::list<SwSidebarItem*>::iterator aI = l.begin(); aI != l.end(); ++aI) { SwSidebarItem* p = *aI; - const SwFmtFld& rFld = p->GetFmtFld(); - if (!m_rFilter(&rFld)) + const SwFormatField& rField = p->GetFormatField(); + if (!m_rFilter(&rField)) continue; - StartListening(const_cast<SwFmtFld&>(rFld)); - v.push_back(&rFld); + StartListening(const_cast<SwFormatField&>(rField)); + v.push_back(&rField); } } void EndListeningToAllFields() { - for(std::vector<const SwFmtFld*>::iterator aI = v.begin(); aI != v.end(); ++aI) + for(std::vector<const SwFormatField*>::iterator aI = v.begin(); aI != v.end(); ++aI) { - const SwFmtFld* pFld = *aI; - EndListening(const_cast<SwFmtFld&>(*pFld)); + const SwFormatField* pField = *aI; + EndListening(const_cast<SwFormatField&>(*pField)); } } virtual ~FieldDocWatchingStack() @@ -1305,18 +1305,18 @@ public: EndListeningToAllFields(); EndListening(m_rDocShell); } - const SwFmtFld* pop() + const SwFormatField* pop() { if (v.empty()) return NULL; - const SwFmtFld* p = v.back(); - EndListening(const_cast<SwFmtFld&>(*p)); + const SwFormatField* p = v.back(); + EndListening(const_cast<SwFormatField&>(*p)); v.pop_back(); return p; } }; -// copy to new vector, otherwise RemoveItem would operate and delete stuff on mvPostItFlds as well +// copy to new vector, otherwise RemoveItem would operate and delete stuff on mvPostItFields as well // RemoveItem will clean up the core field and visible postit if necessary // we cannot just delete everything as before, as postits could move into change tracking void SwPostItMgr::Delete(const OUString& rAuthor) @@ -1331,10 +1331,10 @@ void SwPostItMgr::Delete(const OUString& rAuthor) mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter ); IsPostitFieldWithAuthorOf aFilter(rAuthor); - FieldDocWatchingStack aStack(mvPostItFlds, *mpView->GetDocShell(), aFilter); - while (const SwFmtFld* pFld = aStack.pop()) + FieldDocWatchingStack aStack(mvPostItFields, *mpView->GetDocShell(), aFilter); + while (const SwFormatField* pField = aStack.pop()) { - if (mpWrtShell->GotoField(*pFld)) + if (mpWrtShell->GotoField(*pField)) mpWrtShell->DelRight(); } mpWrtShell->EndUndo(); @@ -1354,11 +1354,11 @@ void SwPostItMgr::Delete() mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter ); IsPostitField aFilter; - FieldDocWatchingStack aStack(mvPostItFlds, *mpView->GetDocShell(), + FieldDocWatchingStack aStack(mvPostItFields, *mpView->GetDocShell(), aFilter); - while (const SwFmtFld* pFld = aStack.pop()) + while (const SwFormatField* pField = aStack.pop()) { - if (mpWrtShell->GotoField(*pFld)) + if (mpWrtShell->GotoField(*pField)) mpWrtShell->DelRight(); } @@ -1372,13 +1372,13 @@ void SwPostItMgr::Delete() void SwPostItMgr::ExecuteFormatAllDialog(SwView& rView) { - if (mvPostItFlds.empty()) + if (mvPostItFields.empty()) return; sw::sidebarwindows::SwSidebarWin *pOrigActiveWin = GetActiveSidebarWin(); sw::sidebarwindows::SwSidebarWin *pWin = pOrigActiveWin; if (!pWin) { - for (SwSidebarItem_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end(); ++i) + for (SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end(); ++i) { pWin = (*i)->pPostIt; if (pWin) @@ -1412,7 +1412,7 @@ void SwPostItMgr::FormatAll(const SfxItemSet &rNewAttr) aRewriter.AddRule(UndoArg1, SW_RES(STR_FORMAT_ALL_NOTES) ); mpWrtShell->StartUndo( UNDO_INSATTR, &aRewriter ); - for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { if (!(*i)->pPostIt) continue; @@ -1443,7 +1443,7 @@ void SwPostItMgr::FormatAll(const SfxItemSet &rNewAttr) void SwPostItMgr::Hide( const OUString& rAuthor ) { - for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { if ( (*i)->pPostIt && ((*i)->pPostIt->GetAuthor() == rAuthor) ) { @@ -1457,7 +1457,7 @@ void SwPostItMgr::Hide( const OUString& rAuthor ) void SwPostItMgr::Hide() { - for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { (*i)->bShow = false; (*i)->pPostIt->HideNote(); @@ -1466,7 +1466,7 @@ void SwPostItMgr::Hide() void SwPostItMgr::Show() { - for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { (*i)->bShow = true; } @@ -1475,15 +1475,15 @@ void SwPostItMgr::Show() void SwPostItMgr::Sort() { - if (mvPostItFlds.size()>1 ) + if (mvPostItFields.size()>1 ) { - mvPostItFlds.sort(comp_pos); + mvPostItFields.sort(comp_pos); } } SwSidebarWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster) const { - for(const_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(const_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { if ( (*i)->GetBroadCaster() == pBroadcaster) return (*i)->pPostIt; @@ -1491,11 +1491,11 @@ SwSidebarWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster) co return NULL; } -sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItField* pFld) const +sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItField* pField) const { - for(const_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(const_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { - if ( (*i)->GetFmtFld().GetField() == pFld ) + if ( (*i)->GetFormatField().GetField() == pField ) return dynamic_cast<sw::annotation::SwAnnotationWin*>((*i)->pPostIt.get()); } return NULL; @@ -1504,16 +1504,16 @@ sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItFie SwSidebarWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection, SwSidebarWin* aPostIt ) { - if (mvPostItFlds.size()>1) + if (mvPostItFields.size()>1) { - for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { if ( (*i)->pPostIt == aPostIt) { SwSidebarItem_iterator iNextPostIt = i; if (aDirection == KEY_PAGEUP) { - if ( iNextPostIt == mvPostItFlds.begin() ) + if ( iNextPostIt == mvPostItFields.begin() ) { return NULL; } @@ -1522,7 +1522,7 @@ SwSidebarWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection, else { ++iNextPostIt; - if ( iNextPostIt == mvPostItFlds.end() ) + if ( iNextPostIt == mvPostItFields.end() ) { return NULL; } @@ -1570,28 +1570,28 @@ long SwPostItMgr::GetNextBorder() return -1; } -void SwPostItMgr::SetShadowState(const SwPostItField* pFld,bool bCursor) +void SwPostItMgr::SetShadowState(const SwPostItField* pField,bool bCursor) { - if (pFld) + if (pField) { - if (pFld !=mShadowState.mpShadowFld) + if (pField !=mShadowState.mpShadowField) { - if (mShadowState.mpShadowFld) + if (mShadowState.mpShadowField) { // reset old one if still alive // TODO: does not work properly if mouse and cursor was set sw::annotation::SwAnnotationWin* pOldPostIt = - GetAnnotationWin(mShadowState.mpShadowFld); + GetAnnotationWin(mShadowState.mpShadowField); if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT)) pOldPostIt->SetViewState(ViewState::NORMAL); } //set new one, if it is not currently edited - sw::annotation::SwAnnotationWin* pNewPostIt = GetAnnotationWin(pFld); + sw::annotation::SwAnnotationWin* pNewPostIt = GetAnnotationWin(pField); if (pNewPostIt && pNewPostIt->Shadow() && (pNewPostIt->Shadow()->GetShadowState() != SS_EDIT)) { pNewPostIt->SetViewState(ViewState::VIEW); //remember our new field - mShadowState.mpShadowFld = pFld; + mShadowState.mpShadowField = pField; mShadowState.bCursor = false; mShadowState.bMouse = false; } @@ -1603,7 +1603,7 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pFld,bool bCursor) } else { - if (mShadowState.mpShadowFld) + if (mShadowState.mpShadowField) { if (bCursor) mShadowState.bCursor = false; @@ -1612,11 +1612,11 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pFld,bool bCursor) if (!mShadowState.bCursor && !mShadowState.bMouse) { // reset old one if still alive - sw::annotation::SwAnnotationWin* pOldPostIt = GetAnnotationWin(mShadowState.mpShadowFld); + sw::annotation::SwAnnotationWin* pOldPostIt = GetAnnotationWin(mShadowState.mpShadowField); if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT)) { pOldPostIt->SetViewState(ViewState::NORMAL); - mShadowState.mpShadowFld = 0; + mShadowState.mpShadowField = 0; } } } @@ -1728,12 +1728,12 @@ bool SwPostItMgr::ScrollbarHit(const unsigned long aPage,const Point &aPoint) void SwPostItMgr::CorrectPositions() { - if ( mbWaitingForCalcRects || mbLayouting || mvPostItFlds.empty() ) + if ( mbWaitingForCalcRects || mbLayouting || mvPostItFields.empty() ) return; // find first valid note SwSidebarWin *pFirstPostIt = 0; - for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) { pFirstPostIt = (*i)->pPostIt; if (pFirstPostIt) @@ -1782,7 +1782,7 @@ bool SwPostItMgr::ShowNotes() const bool SwPostItMgr::HasNotes() const { - return !mvPostItFlds.empty(); + return !mvPostItFields.empty(); } unsigned long SwPostItMgr::GetSidebarWidth(bool bPx) const @@ -1864,7 +1864,7 @@ void SwPostItMgr::SetActiveSidebarWin( SwSidebarWin* p) if (pActive) { pActive->DeactivatePostIt(); - mShadowState.mpShadowFld = 0; + mShadowState.mpShadowField = 0; } if (mpActivePostIt) { @@ -1898,7 +1898,7 @@ IMPL_LINK_NOARG( SwPostItMgr, CalcHdl ) void SwPostItMgr::Rescale() { - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) if ( (*i)->pPostIt ) (*i)->pPostIt->Rescale(); } @@ -1935,21 +1935,21 @@ sal_Int32 SwPostItMgr::GetSidebarScrollerHeight() const void SwPostItMgr::SetSpellChecking() { - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) if ( (*i)->pPostIt ) (*i)->pPostIt->SetSpellChecking(); } void SwPostItMgr::SetReadOnlyState() { - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) if ( (*i)->pPostIt ) (*i)->pPostIt->SetReadonly( mbReadOnly ); } void SwPostItMgr::CheckMetaText() { - for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) + for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) if ( (*i)->pPostIt ) (*i)->pPostIt->CheckMetaText(); @@ -1976,10 +1976,10 @@ sal_uInt16 SwPostItMgr::FinishSearchReplace(const ::com::sun::star::util::Search return aResult; } -sal_uInt16 SwPostItMgr::SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bSrchForward) +sal_uInt16 SwPostItMgr::SearchReplace(const SwFormatField &pField, const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bSrchForward) { sal_uInt16 aResult = 0; - SwSidebarWin* pWin = GetSidebarWin(&pFld); + SwSidebarWin* pWin = GetSidebarWin(&pField); if (pWin) { ESelection aOldSelection = pWin->GetOutlinerView()->GetSelection(); @@ -2079,7 +2079,7 @@ void SwPostItMgr::ToggleInsModeOnActiveSidebarWin() } void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm, - const SwFmtFld& rFmtFld, + const SwFormatField& rFormatField, SwSidebarWin& rSidebarWin ) { if ( mpFrmSidebarWinContainer == 0 ) @@ -2087,7 +2087,7 @@ void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm, mpFrmSidebarWinContainer = new SwFrmSidebarWinContainer(); } - const bool bInserted = mpFrmSidebarWinContainer->insert( rFrm, rFmtFld, rSidebarWin ); + const bool bInserted = mpFrmSidebarWinContainer->insert( rFrm, rFormatField, rSidebarWin ); if ( bInserted && mpWrtShell->GetAccessibleMap() ) { diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 4181df6259c6..6524ad61ed24 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -56,7 +56,7 @@ namespace sw { namespace sidebarwindows { -SidebarTxtControl::SidebarTxtControl( SwSidebarWin& rSidebarWin, +SidebarTextControl::SidebarTextControl( SwSidebarWin& rSidebarWin, WinBits nBits, SwView& rDocView, SwPostItMgr& rPostItMgr ) @@ -68,23 +68,23 @@ SidebarTxtControl::SidebarTxtControl( SwSidebarWin& rSidebarWin, AddEventListener( LINK( &mrSidebarWin, SwSidebarWin, WindowEventListener ) ); } -SidebarTxtControl::~SidebarTxtControl() +SidebarTextControl::~SidebarTextControl() { disposeOnce(); } -void SidebarTxtControl::dispose() +void SidebarTextControl::dispose() { RemoveEventListener( LINK( &mrSidebarWin, SwSidebarWin, WindowEventListener ) ); Control::dispose(); } -OutlinerView* SidebarTxtControl::GetTextView() const +OutlinerView* SidebarTextControl::GetTextView() const { return mrSidebarWin.GetOutlinerView(); } -void SidebarTxtControl::GetFocus() +void SidebarTextControl::GetFocus() { Window::GetFocus(); if ( !mrSidebarWin.IsMouseOver() ) @@ -93,7 +93,7 @@ void SidebarTxtControl::GetFocus() } } -void SidebarTxtControl::LoseFocus() +void SidebarTextControl::LoseFocus() { // write the visible text back into the SwField mrSidebarWin.UpdateData(); @@ -105,7 +105,7 @@ void SidebarTxtControl::LoseFocus() } } -void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt) +void SidebarTextControl::RequestHelp(const HelpEvent &rEvt) { sal_uInt16 nResId = 0; switch( mrSidebarWin.GetLayoutStatus() ) @@ -115,18 +115,18 @@ void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt) default: nResId = 0; } - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_REDLINE ); + SwContentAtPos aContentAtPos( SwContentAtPos::SW_REDLINE ); if ( nResId && - mrDocView.GetWrtShell().GetContentAtPos( mrSidebarWin.GetAnchorPos(), aCntntAtPos ) ) + mrDocView.GetWrtShell().GetContentAtPos( mrSidebarWin.GetAnchorPos(), aContentAtPos ) ) { - OUString sTxt = SW_RESSTR( nResId ) + ": " + - aCntntAtPos.aFnd.pRedl->GetAuthorString() + " - " + - GetAppLangDateTimeString( aCntntAtPos.aFnd.pRedl->GetTimeStamp() ); - Help::ShowQuickHelp( this,PixelToLogic(Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sTxt); + OUString sText = SW_RESSTR( nResId ) + ": " + + aContentAtPos.aFnd.pRedl->GetAuthorString() + " - " + + GetAppLangDateTimeString( aContentAtPos.aFnd.pRedl->GetTimeStamp() ); + Help::ShowQuickHelp( this,PixelToLogic(Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sText); } } -void SidebarTxtControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong) +void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong) { //Take the control's height, but overwrite the scrollbar area if there was one Size aSize(PixelToLogic(GetSizePixel())); @@ -151,7 +151,7 @@ void SidebarTxtControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& r } } -void SidebarTxtControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) { if (!rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode()) { @@ -185,7 +185,7 @@ void SidebarTxtControl::Paint(vcl::RenderContext& rRenderContext, const Rectangl } } -void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt ) +void SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt ) { const vcl::KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); sal_uInt16 nKey = rKeyCode.GetCode(); @@ -247,7 +247,7 @@ void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt ) mrDocView.GetViewFrame()->GetBindings().InvalidateAll(false); } -void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt ) +void SidebarTextControl::MouseMove( const MouseEvent& rMEvt ) { if ( GetTextView() ) { @@ -261,8 +261,8 @@ void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt ) const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer(); if ( pItem ) { - const SvxFieldData* pFld = pItem->GetField(); - const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld ); + const SvxFieldData* pField = pItem->GetField(); + const SvxURLField* pURL = PTR_CAST( SvxURLField, pField ); if ( pURL ) { OUString sURL( pURL->GetURL() ); @@ -277,7 +277,7 @@ void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt ) } } -void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt ) +void SidebarTextControl::MouseButtonDown( const MouseEvent& rMEvt ) { if ( GetTextView() ) { @@ -290,8 +290,8 @@ void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt ) const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer(); if ( pItem ) { - const SvxFieldData* pFld = pItem->GetField(); - const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld ); + const SvxFieldData* pField = pItem->GetField(); + const SvxURLField* pURL = PTR_CAST( SvxURLField, pField ); if ( pURL ) { GetTextView()->MouseButtonDown( rMEvt ); @@ -313,13 +313,13 @@ void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt ) mrDocView.GetViewFrame()->GetBindings().InvalidateAll(false); } -void SidebarTxtControl::MouseButtonUp( const MouseEvent& rMEvt ) +void SidebarTextControl::MouseButtonUp( const MouseEvent& rMEvt ) { if ( GetTextView() ) GetTextView()->MouseButtonUp( rMEvt ); } -IMPL_LINK( SidebarTxtControl, OnlineSpellCallback, SpellCallbackInfo*, pInfo ) +IMPL_LINK( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo*, pInfo ) { if ( pInfo->nCommand == SpellCallbackCommand::STARTSPELLDLG ) { @@ -328,13 +328,13 @@ IMPL_LINK( SidebarTxtControl, OnlineSpellCallback, SpellCallbackInfo*, pInfo ) return 0; } -IMPL_LINK( SidebarTxtControl, Select, Menu*, pSelMenu ) +IMPL_LINK( SidebarTextControl, Select, Menu*, pSelMenu ) { mrSidebarWin.ExecuteCommand( pSelMenu->GetCurItemId() ); return 0; } -void SidebarTxtControl::Command( const CommandEvent& rCEvt ) +void SidebarTextControl::Command( const CommandEvent& rCEvt ) { if ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) { @@ -342,13 +342,13 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt ) GetTextView() && GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(), true )) { - Link<> aLink = LINK(this, SidebarTxtControl, OnlineSpellCallback); + Link<> aLink = LINK(this, SidebarTextControl, OnlineSpellCallback); GetTextView()->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink); } else { boost::scoped_ptr<SfxPopupMenuManager> pMgr(SfxDispatcher::Popup(0, this,&rCEvt.GetMousePosPixel())); - static_cast<PopupMenu*>(pMgr->GetSVMenu())->SetSelectHdl( LINK(this, SidebarTxtControl, Select) ); + static_cast<PopupMenu*>(pMgr->GetSVMenu())->SetSelectHdl( LINK(this, SidebarTextControl, Select) ); { OUString aText = static_cast<PopupMenu*>(pMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR ); @@ -402,14 +402,14 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt ) } } -OUString SidebarTxtControl::GetSurroundingText() const +OUString SidebarTextControl::GetSurroundingText() const { if (GetTextView()) return GetTextView()->GetSurroundingText(); return OUString(); } -Selection SidebarTxtControl::GetSurroundingTextSelection() const +Selection SidebarTextControl::GetSurroundingTextSelection() const { if( GetTextView() ) return GetTextView()->GetSurroundingTextSelection(); @@ -417,10 +417,10 @@ Selection SidebarTxtControl::GetSurroundingTextSelection() const return Selection( 0, 0 ); } -css::uno::Reference< css::accessibility::XAccessible > SidebarTxtControl::CreateAccessible() +css::uno::Reference< css::accessibility::XAccessible > SidebarTextControl::CreateAccessible() { - SidebarTxtControlAccessible* pAcc( new SidebarTxtControlAccessible( *this ) ); + SidebarTextControlAccessible* pAcc( new SidebarTextControlAccessible( *this ) ); css::uno::Reference< css::awt::XWindowPeer > xWinPeer( pAcc ); SetWindowPeer( xWinPeer, pAcc ); diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx index a8e873e2736b..1a6d6677cd43 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.hxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx @@ -31,7 +31,7 @@ namespace sw { namespace sidebarwindows { class SwSidebarWin; -class SidebarTxtControl : public Control +class SidebarTextControl : public Control { private: SwSidebarWin& mrSidebarWin; @@ -53,11 +53,11 @@ class SidebarTxtControl : public Control DECL_LINK( Select, Menu* ); public: - SidebarTxtControl( SwSidebarWin& rSidebarWin, + SidebarTextControl( SwSidebarWin& rSidebarWin, WinBits nBits, SwView& rDocView, SwPostItMgr& rPostItMgr ); - virtual ~SidebarTxtControl(); + virtual ~SidebarTextControl(); virtual void dispose() SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; diff --git a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx index 75f6097e9c59..cbe437ec7b92 100644 --- a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx @@ -43,7 +43,7 @@ class SidebarTextEditSource : public SvxEditSource, public SfxBroadcaster { public: - SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl ); + SidebarTextEditSource( SidebarTextControl& rSidebarTextControl ); virtual ~SidebarTextEditSource(); virtual SvxEditSource* Clone() const SAL_OVERRIDE; @@ -58,34 +58,34 @@ class SidebarTextEditSource : public SvxEditSource, DECL_LINK( NotifyHdl, EENotify* ); private: - SidebarTxtControl& mrSidebarTxtControl; + SidebarTextControl& mrSidebarTextControl; SvxOutlinerForwarder mTextForwarder; SvxDrawOutlinerViewForwarder mViewForwarder; }; -SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl ) +SidebarTextEditSource::SidebarTextEditSource( SidebarTextControl& rSidebarTextControl ) : SvxEditSource() - , mrSidebarTxtControl( rSidebarTxtControl ) - , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), false ) - , mViewForwarder( *(rSidebarTxtControl.GetTextView()) ) + , mrSidebarTextControl( rSidebarTextControl ) + , mTextForwarder( *(rSidebarTextControl.GetTextView()->GetOutliner()), false ) + , mViewForwarder( *(rSidebarTextControl.GetTextView()) ) { - if ( mrSidebarTxtControl.GetTextView() ) + if ( mrSidebarTextControl.GetTextView() ) { - mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( LINK(this, SidebarTextEditSource, NotifyHdl) ); + mrSidebarTextControl.GetTextView()->GetOutliner()->SetNotifyHdl( LINK(this, SidebarTextEditSource, NotifyHdl) ); } } SidebarTextEditSource::~SidebarTextEditSource() { - if ( mrSidebarTxtControl.GetTextView() ) + if ( mrSidebarTextControl.GetTextView() ) { - mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( Link<>() ); + mrSidebarTextControl.GetTextView()->GetOutliner()->SetNotifyHdl( Link<>() ); } } SvxEditSource* SidebarTextEditSource::Clone() const { - return new SidebarTextEditSource( mrSidebarTxtControl ); + return new SidebarTextEditSource( mrSidebarTextControl ); } SvxTextForwarder* SidebarTextEditSource::GetTextForwarder() @@ -128,12 +128,12 @@ IMPL_LINK(SidebarTextEditSource, NotifyHdl, EENotify*, pNotify) return 0; } -// declaration and implementation of accessible context for <SidebarTxtControl> instance -class SidebarTxtControlAccessibleContext : public VCLXAccessibleComponent +// declaration and implementation of accessible context for <SidebarTextControl> instance +class SidebarTextControlAccessibleContext : public VCLXAccessibleComponent { public: - explicit SidebarTxtControlAccessibleContext( SidebarTxtControl& rSidebarTxtControl ); - virtual ~SidebarTxtControlAccessibleContext(); + explicit SidebarTextControlAccessibleContext( SidebarTextControl& rSidebarTextControl ); + virtual ~SidebarTextControlAccessibleContext(); virtual sal_Int32 SAL_CALL getAccessibleChildCount() @@ -157,7 +157,7 @@ class SidebarTxtControlAccessibleContext : public VCLXAccessibleComponent virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) SAL_OVERRIDE; private: - SidebarTxtControl& mrSidebarTxtControl; + SidebarTextControl& mrSidebarTextControl; ::accessibility::AccessibleTextHelper* mpAccessibleTextHelper; ::osl::Mutex maMutex; @@ -165,30 +165,30 @@ class SidebarTxtControlAccessibleContext : public VCLXAccessibleComponent void defunc(); }; -SidebarTxtControlAccessibleContext::SidebarTxtControlAccessibleContext( SidebarTxtControl& rSidebarTxtControl ) - : VCLXAccessibleComponent( rSidebarTxtControl.GetWindowPeer() ) - , mrSidebarTxtControl( rSidebarTxtControl ) +SidebarTextControlAccessibleContext::SidebarTextControlAccessibleContext( SidebarTextControl& rSidebarTextControl ) + : VCLXAccessibleComponent( rSidebarTextControl.GetWindowPeer() ) + , mrSidebarTextControl( rSidebarTextControl ) , mpAccessibleTextHelper( 0 ) , maMutex() { ::std::unique_ptr<SvxEditSource> pEditSource( - new SidebarTextEditSource( mrSidebarTxtControl ) ); + new SidebarTextEditSource( mrSidebarTextControl ) ); mpAccessibleTextHelper = new ::accessibility::AccessibleTextHelper( std::move(pEditSource) ); - mpAccessibleTextHelper->SetEventSource( mrSidebarTxtControl.GetWindowPeer() ); + mpAccessibleTextHelper->SetEventSource( mrSidebarTextControl.GetWindowPeer() ); } -SidebarTxtControlAccessibleContext::~SidebarTxtControlAccessibleContext() +SidebarTextControlAccessibleContext::~SidebarTextControlAccessibleContext() { defunc(); } -void SidebarTxtControlAccessibleContext::defunc() +void SidebarTextControlAccessibleContext::defunc() { delete mpAccessibleTextHelper; mpAccessibleTextHelper = 0; } -sal_Int32 SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChildCount() +sal_Int32 SAL_CALL SidebarTextControlAccessibleContext::getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException, std::exception) { osl::MutexGuard aGuard( maMutex ); @@ -203,7 +203,7 @@ sal_Int32 SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChildCount() return nChildCount; } -css::uno::Reference< css::accessibility::XAccessible > SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChild( sal_Int32 i ) +css::uno::Reference< css::accessibility::XAccessible > SAL_CALL SidebarTextControlAccessibleContext::getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception ) { osl::MutexGuard aGuard( maMutex ); @@ -218,7 +218,7 @@ css::uno::Reference< css::accessibility::XAccessible > SAL_CALL SidebarTxtContro return xChild; } -void SAL_CALL SidebarTxtControlAccessibleContext::addAccessibleEventListener ( +void SAL_CALL SidebarTextControlAccessibleContext::addAccessibleEventListener ( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener) throw (css::uno::RuntimeException, std::exception) { @@ -230,7 +230,7 @@ void SAL_CALL SidebarTxtControlAccessibleContext::addAccessibleEventListener ( } } -void SAL_CALL SidebarTxtControlAccessibleContext::removeAccessibleEventListener ( +void SAL_CALL SidebarTextControlAccessibleContext::removeAccessibleEventListener ( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener) throw (css::uno::RuntimeException, std::exception) { @@ -242,7 +242,7 @@ void SAL_CALL SidebarTxtControlAccessibleContext::removeAccessibleEventListener } } -void SidebarTxtControlAccessibleContext::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) +void SidebarTextControlAccessibleContext::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { if ( mpAccessibleTextHelper ) { @@ -271,22 +271,22 @@ void SidebarTxtControlAccessibleContext::ProcessWindowEvent( const VclWindowEven VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); } -// implementaion of accessible for <SidebarTxtControl> instance -SidebarTxtControlAccessible::SidebarTxtControlAccessible( SidebarTxtControl& rSidebarTxtControl ) +// implementaion of accessible for <SidebarTextControl> instance +SidebarTextControlAccessible::SidebarTextControlAccessible( SidebarTextControl& rSidebarTextControl ) : VCLXWindow() - , mrSidebarTxtControl( rSidebarTxtControl ) + , mrSidebarTextControl( rSidebarTextControl ) { - SetWindow( &mrSidebarTxtControl ); + SetWindow( &mrSidebarTextControl ); } -SidebarTxtControlAccessible::~SidebarTxtControlAccessible() +SidebarTextControlAccessible::~SidebarTextControlAccessible() { } -css::uno::Reference< css::accessibility::XAccessibleContext > SidebarTxtControlAccessible::CreateAccessibleContext() +css::uno::Reference< css::accessibility::XAccessibleContext > SidebarTextControlAccessible::CreateAccessibleContext() { - SidebarTxtControlAccessibleContext* pAccContext( - new SidebarTxtControlAccessibleContext( mrSidebarTxtControl ) ); + SidebarTextControlAccessibleContext* pAccContext( + new SidebarTextControlAccessibleContext( mrSidebarTextControl ) ); css::uno::Reference< css::accessibility::XAccessibleContext > xAcc( pAccContext ); return xAcc; } diff --git a/sw/source/uibase/docvw/SidebarTxtControlAcc.hxx b/sw/source/uibase/docvw/SidebarTxtControlAcc.hxx index 38064ff247cf..f123aae842d3 100644 --- a/sw/source/uibase/docvw/SidebarTxtControlAcc.hxx +++ b/sw/source/uibase/docvw/SidebarTxtControlAcc.hxx @@ -24,19 +24,19 @@ namespace sw { namespace sidebarwindows { -class SidebarTxtControl; +class SidebarTextControl; -class SidebarTxtControlAccessible : public VCLXWindow +class SidebarTextControlAccessible : public VCLXWindow { public: - explicit SidebarTxtControlAccessible( SidebarTxtControl& rSidebarTxtControl ); - virtual ~SidebarTxtControlAccessible(); + explicit SidebarTextControlAccessible( SidebarTextControl& rSidebarTextControl ); + virtual ~SidebarTextControlAccessible(); virtual com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext() SAL_OVERRIDE; private: - SidebarTxtControl& mrSidebarTxtControl; + SidebarTextControl& mrSidebarTextControl; }; } } // end of namespace sw::sidebarwindows diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index e48896e34c7d..c8fa94544303 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -101,7 +101,7 @@ SwSidebarWin::SwSidebarWin(SwEditWin& rEditWin, , mnEventId(0) , mpOutlinerView(0) , mpOutliner(0) - , mpSidebarTxtControl(0) + , mpSidebarTextControl(0) , mpVScrollbar(0) , mpMetadataAuthor(0) , mpMetadataDate(0) @@ -131,7 +131,7 @@ SwSidebarWin::SwSidebarWin(SwEditWin& rEditWin, } mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), - mrSidebarItem.GetFmtFld(), + mrSidebarItem.GetFormatField(), *this ); } @@ -150,14 +150,14 @@ void SwSidebarWin::dispose() Disable(); - if ( mpSidebarTxtControl ) + if ( mpSidebarTextControl ) { if ( mpOutlinerView ) { mpOutlinerView->SetWindow( 0 ); } } - mpSidebarTxtControl.disposeAndClear(); + mpSidebarTextControl.disposeAndClear(); if ( mpOutlinerView ) { @@ -267,7 +267,7 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s mpMetadataDate->SetControlFont( aOrigFont ); } - mpSidebarTxtControl->Draw(pDev, rPt, rSz, nInFlags); + mpSidebarTextControl->Draw(pDev, rPt, rSz, nInFlags); const drawinglayer::geometry::ViewInformation2D aNewViewInfos; boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor( @@ -352,10 +352,10 @@ void SwSidebarWin::InitControls() AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); // actual window which holds the user text - mpSidebarTxtControl = VclPtr<SidebarTxtControl>::Create( *this, + mpSidebarTextControl = VclPtr<SidebarTextControl>::Create( *this, WB_NODIALOGCONTROL, mrView, mrMgr ); - mpSidebarTxtControl->SetPointer(Pointer(POINTER_TEXT)); + mpSidebarTextControl->SetPointer(Pointer(POINTER_TEXT)); // window controls for author and date mpMetadataAuthor = VclPtr<Edit>::Create( this, 0 ); @@ -402,8 +402,8 @@ void SwSidebarWin::InitControls() mpOutliner->SetUpdateMode( true ); Rescale(); - mpSidebarTxtControl->EnableRTL( false ); - mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTxtControl ); + mpSidebarTextControl->EnableRTL( false ); + mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTextControl ); mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT); mpOutliner->InsertView(mpOutlinerView ); mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) ); @@ -446,7 +446,7 @@ void SwSidebarWin::InitControls() SetPostItText(); Engine()->CompleteOnlineSpelling(); - mpSidebarTxtControl->Show(); + mpSidebarTextControl->Show(); mpMetadataAuthor->Show(); mpMetadataDate->Show(); mpVScrollbar->Show(); @@ -504,7 +504,7 @@ void SwSidebarWin::Rescale() aMode.SetOrigin( Point() ); mpOutliner->SetRefMapMode( aMode ); SetMapMode( aMode ); - mpSidebarTxtControl->SetMapMode( aMode ); + mpSidebarTextControl->SetMapMode( aMode ); if ( mpMetadataAuthor ) { vcl::Font aFont( mpMetadataAuthor->GetSettings().GetStyleSettings().GetFieldFont() ); @@ -647,23 +647,23 @@ void SwSidebarWin::SetPosAndSize() { std::vector< basegfx::B2DRange > aAnnotationTextRanges; { - const SwTxtAnnotationFld* pTxtAnnotationFld = - dynamic_cast< const SwTxtAnnotationFld* >( mrSidebarItem.GetFmtFld().GetTxtFld() ); - if ( pTxtAnnotationFld != NULL - && pTxtAnnotationFld->GetpTxtNode() != NULL ) + const SwTextAnnotationField* pTextAnnotationField = + dynamic_cast< const SwTextAnnotationField* >( mrSidebarItem.GetFormatField().GetTextField() ); + if ( pTextAnnotationField != NULL + && pTextAnnotationField->GetpTextNode() != NULL ) { - SwTxtNode* pTxtNode = pTxtAnnotationFld->GetpTxtNode(); - SwNodes& rNds = pTxtNode->GetDoc()->GetNodes(); - SwCntntNode* const pCntntNd = rNds[mrSidebarItem.maLayoutInfo.mnStartNodeIdx]->GetCntntNode(); - SwPosition aStartPos( *pCntntNd, mrSidebarItem.maLayoutInfo.mnStartContent ); + SwTextNode* pTextNode = pTextAnnotationField->GetpTextNode(); + SwNodes& rNds = pTextNode->GetDoc()->GetNodes(); + SwContentNode* const pContentNd = rNds[mrSidebarItem.maLayoutInfo.mnStartNodeIdx]->GetContentNode(); + SwPosition aStartPos( *pContentNd, mrSidebarItem.maLayoutInfo.mnStartContent ); SwShellCrsr* pTmpCrsr = NULL; - const bool bTableCrsrNeeded = pTxtNode->FindTableBoxStartNode() != pCntntNd->FindTableBoxStartNode(); + const bool bTableCrsrNeeded = pTextNode->FindTableBoxStartNode() != pContentNd->FindTableBoxStartNode(); if ( bTableCrsrNeeded ) { SwShellTableCrsr* pTableCrsr = new SwShellTableCrsr( DocView().GetWrtShell(), aStartPos ); pTableCrsr->SetMark(); - pTableCrsr->GetMark()->nNode = *pTxtNode; - pTableCrsr->GetMark()->nContent.Assign( pTxtNode, pTxtAnnotationFld->GetStart()+1 ); + pTableCrsr->GetMark()->nNode = *pTextNode; + pTableCrsr->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); pTableCrsr->NewTableSelection(); pTmpCrsr = pTableCrsr; } @@ -671,8 +671,8 @@ void SwSidebarWin::SetPosAndSize() { SwShellCrsr* pCrsr = new SwShellCrsr( DocView().GetWrtShell(), aStartPos ); pCrsr->SetMark(); - pCrsr->GetMark()->nNode = *pTxtNode; - pCrsr->GetMark()->nContent.Assign( pTxtNode, pTxtAnnotationFld->GetStart()+1 ); + pCrsr->GetMark()->nNode = *pTextNode; + pCrsr->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); pTmpCrsr = pCrsr; } ::boost::scoped_ptr<SwShellCrsr> pTmpCrsrForAnnotationTextRange( pTmpCrsr ); @@ -729,7 +729,7 @@ void SwSidebarWin::DoResize() aHeight -= GetMetaHeight(); mpMetadataAuthor->Show(); mpMetadataDate->Show(); - mpSidebarTxtControl->SetQuickHelpText(OUString()); + mpSidebarTextControl->SetQuickHelpText(OUString()); if ((aTextHeight > aHeight) && !IsPreview()) { // we need vertical scrollbars and have to reduce the width @@ -763,12 +763,12 @@ void SwSidebarWin::DoResize() if (!AllSettings::GetLayoutRTL()) { - mpSidebarTxtControl->setPosSizePixel(0, 0, aWidth, aHeight); + mpSidebarTextControl->setPosSizePixel(0, 0, aWidth, aHeight); mpVScrollbar->setPosSizePixel( aWidth, 0, GetScrollbarWidth(), aHeight); } else { - mpSidebarTxtControl->setPosSizePixel( ( (aTextHeight > aHeight) && !IsPreview() + mpSidebarTextControl->setPosSizePixel( ( (aTextHeight > aHeight) && !IsPreview() ? GetScrollbarWidth() : 0 ) , 0, aWidth, aHeight); mpVScrollbar->setPosSizePixel( 0, 0, GetScrollbarWidth(), aHeight); @@ -954,8 +954,8 @@ void SwSidebarWin::DataChanged( const DataChangedEvent& aEvent) void SwSidebarWin::GetFocus() { - if (mpSidebarTxtControl) - mpSidebarTxtControl->GrabFocus(); + if (mpSidebarTextControl) + mpSidebarTextControl->GrabFocus(); } void SwSidebarWin::LoseFocus() @@ -1144,7 +1144,7 @@ IMPL_LINK( SwSidebarWin, WindowEventListener, VclSimpleEvent*, pEvent ) } } else if ( pWinEvent->GetId() == VCLEVENT_WINDOW_ACTIVATE && - pWinEvent->GetWindow() == mpSidebarTxtControl ) + pWinEvent->GetWindow() == mpSidebarTextControl ) { const bool bLockView = mrView.GetWrtShell().IsViewLocked(); mrView.GetWrtShell().LockView( true ); @@ -1402,7 +1402,7 @@ void SwSidebarWin::ChangeSidebarItem( SwSidebarItem& rSidebarItem ) if ( bAnchorChanged ) { mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), - mrSidebarItem.GetFmtFld(), + mrSidebarItem.GetFormatField(), *this ); } } diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index e0dd4aa90448..044d201ff4fe 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -248,7 +248,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject * const Point aDocPt( PixelToLogic( rPixPnt ) ); if( rSh.ChgCurrPam( aDocPt ) || rSh.IsOverReadOnlyPos( aDocPt ) - || rSh.DocPtInsideInputFld( aDocPt ) ) + || rSh.DocPtInsideInputField( aDocPt ) ) return SotExchangeDest::NONE; SdrObject *pObj = NULL; @@ -279,7 +279,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject * case OBJCNT_GRF: { bool bLink, - bIMap = 0 != rSh.GetFmtFromObj( aDocPt )->GetURL().GetMap(); + bIMap = 0 != rSh.GetFormatFromObj( aDocPt )->GetURL().GetMap(); OUString aDummy; rSh.GetGrfAtPos( aDocPt, aDummy, bLink ); if ( bLink && bIMap ) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index c88a0f858f3e..b6a7f4079634 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -263,14 +263,14 @@ struct QuickHelpData /// Help string is currently displayed. bool m_bIsDisplayed; - QuickHelpData() { ClearCntnt(); } + QuickHelpData() { ClearContent(); } void Move( QuickHelpData& rCpy ); - void ClearCntnt(); + void ClearContent(); void Start( SwWrtShell& rSh, sal_uInt16 nWrdLen ); void Stop( SwWrtShell& rSh ); - bool HasCntnt() const { return !m_aHelpStrings.empty() && 0 != nLen; } + bool HasContent() const { return !m_aHelpStrings.empty() && 0 != nLen; } /// Next help string. void Next( bool bEndLess ) @@ -345,7 +345,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) { SwRect aRect; SwRect* pRect = &aRect; - const SwFrmFmt* pFmt = 0; + const SwFrameFormat* pFormat = 0; bool bFrameIsValidTarget = false; if( m_pApplyTempl->m_pFormatClipboard ) @@ -354,8 +354,8 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) bFrameIsValidTarget = ( m_pApplyTempl->eType == SFX_STYLE_FAMILY_FRAME ); if( bFrameIsValidTarget && - 0 !=(pFmt = rSh.GetFmtFromObj( rLPt, &pRect )) && - PTR_CAST(SwFlyFrmFmt, pFmt)) + 0 !=(pFormat = rSh.GetFormatFromObj( rLPt, &pRect )) && + PTR_CAST(SwFlyFrameFormat, pFormat)) { //turn on highlight for frame Rectangle aTmp( pRect->SVRect() ); @@ -385,7 +385,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) if ( IsChainMode() ) { SwRect aRect; - SwChainRet nChainable = rSh.Chainable( aRect, *rSh.GetFlyFrmFmt(), rLPt ); + SwChainRet nChainable = rSh.Chainable( aRect, *rSh.GetFlyFrameFormat(), rLPt ); PointerStyle eStyle = nChainable != SwChainRet::OK ? POINTER_CHAIN_NOTALLOWED : POINTER_CHAIN; if ( nChainable == SwChainRet::OK ) @@ -559,23 +559,23 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) if( rSh.GetContentAtPos( rLPt, aSwContentAtPos) ) { // Is edit inline input field - if (SwContentAtPos::SW_FIELD == aSwContentAtPos.eCntntAtPos) + if (SwContentAtPos::SW_FIELD == aSwContentAtPos.eContentAtPos) { - if ( aSwContentAtPos.pFndTxtAttr != NULL - && aSwContentAtPos.pFndTxtAttr->Which() == RES_TXTATR_INPUTFIELD) + if ( aSwContentAtPos.pFndTextAttr != NULL + && aSwContentAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD) { - const SwField *pCrsrField = rSh.CrsrInsideInputFld() ? rSh.GetCurFld( true ) : NULL; - if (!(pCrsrField && pCrsrField == aSwContentAtPos.pFndTxtAttr->GetFmtFld().GetField())) + const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : NULL; + if (!(pCrsrField && pCrsrField == aSwContentAtPos.pFndTextAttr->GetFormatField().GetField())) eStyle = POINTER_REFHAND; } } else { - const bool bClickToFollow = SwContentAtPos::SW_INETATTR == aSwContentAtPos.eCntntAtPos || - SwContentAtPos::SW_SMARTTAG == aSwContentAtPos.eCntntAtPos; + const bool bClickToFollow = SwContentAtPos::SW_INETATTR == aSwContentAtPos.eContentAtPos || + SwContentAtPos::SW_SMARTTAG == aSwContentAtPos.eContentAtPos; if( !bClickToFollow || - (SwContentAtPos::SW_INETATTR == aSwContentAtPos.eCntntAtPos && bExecHyperlinks) || - (SwContentAtPos::SW_SMARTTAG == aSwContentAtPos.eCntntAtPos && bExecSmarttags) ) + (SwContentAtPos::SW_INETATTR == aSwContentAtPos.eContentAtPos && bExecHyperlinks) || + (SwContentAtPos::SW_SMARTTAG == aSwContentAtPos.eContentAtPos && bExecSmarttags) ) eStyle = POINTER_REFHAND; } } @@ -614,7 +614,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, TimerHandler, Timer *, void) bDone = true; } if ( !bDone ) - aModPt = rSh.GetCntntPos( aModPt,aModPt.Y() > rSh.VisArea().Bottom() ); + aModPt = rSh.GetContentPos( aModPt,aModPt.Y() > rSh.VisArea().Bottom() ); } if ( !bDone && !(g_bFrmDrag || m_bInsDraw) ) { @@ -859,7 +859,7 @@ void SwEditWin::FlushInBuffer() rSh.GetCrsr()->SetMark(); rSh.GetCrsr()->GetMark()->nContent = 0; - const OUString aOldText( rSh.GetCrsr()->GetTxt() ); + const OUString aOldText( rSh.GetCrsr()->GetText() ); const sal_Int32 nOldLen = aOldText.getLength(); SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions(); @@ -886,11 +886,11 @@ void SwEditWin::FlushInBuffer() // find position of first character that has changed sal_Int32 nNewLen = aNewText.getLength(); - const sal_Unicode *pOldTxt = aOldText.getStr(); - const sal_Unicode *pNewTxt = aNewText.getStr(); + const sal_Unicode *pOldText = aOldText.getStr(); + const sal_Unicode *pNewText = aNewText.getStr(); sal_Int32 nChgPos = 0; while ( nChgPos < nOldLen && nChgPos < nNewLen && - pOldTxt[nChgPos] == pNewTxt[nChgPos] ) + pOldText[nChgPos] == pNewText[nChgPos] ) ++nChgPos; const sal_Int32 nChgLen = nNewLen - nChgPos; @@ -996,7 +996,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) RES_PROTECT, RES_PROTECT, RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW, 0); rSh.GetFlyFrmAttr( aSet ); - RndStdIds eAnchorId = static_cast<const SwFmtAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); + RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); Size aSnap; bool bHuge(MOVE_LEFT_HUGE == nDir || MOVE_UP_HUGE == nDir || @@ -1032,13 +1032,13 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) // adjustment for allowing vertical position // aligned to page for fly frame anchored to paragraph or to character. { - SwFmtVertOrient aVert( static_cast<const SwFmtVertOrient&>(aSet.Get(RES_VERT_ORIENT)) ); + SwFormatVertOrient aVert( static_cast<const SwFormatVertOrient&>(aSet.Get(RES_VERT_ORIENT)) ); const bool bFollowTextFlow = - static_cast<const SwFmtFollowTextFlow&>(aSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue(); - const SwPosition* pToCharCntntPos = static_cast<const SwFmtAnchor&>(aSet.Get(RES_ANCHOR)).GetCntntAnchor(); + static_cast<const SwFormatFollowTextFlow&>(aSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue(); + const SwPosition* pToCharContentPos = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetContentAnchor(); rSh.CalcBoundRect( aBoundRect, eAnchorId, text::RelOrientation::FRAME, aVert.GetRelationOrient(), - pToCharCntntPos, bFollowTextFlow, + pToCharContentPos, bFollowTextFlow, false, &aRefPoint ); } long nLeft = std::min( aTmp.Left() - aBoundRect.Left(), aSnap.Width() ); @@ -1084,7 +1084,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) aDiff = 0; else if ( aDiff < -aTmp.Height() ) aDiff = -aTmp.Height(); - SwFmtVertOrient aVert( static_cast<const SwFmtVertOrient&>(aSet.Get(RES_VERT_ORIENT)) ); + SwFormatVertOrient aVert( static_cast<const SwFormatVertOrient&>(aSet.Get(RES_VERT_ORIENT)) ); sal_Int16 eNew; if( bWeb ) { @@ -1125,7 +1125,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) if (bWeb && (FLY_AT_PARA == eAnchorId) && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG )) { - SwFmtHoriOrient aHori( static_cast<const SwFmtHoriOrient&>(aSet.Get(RES_HORI_ORIENT)) ); + SwFormatHoriOrient aHori( static_cast<const SwFormatHoriOrient&>(aSet.Get(RES_HORI_ORIENT)) ); sal_Int16 eNew; eNew = aHori.GetHoriOrient(); switch( eNew ) @@ -1420,10 +1420,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 bTblCrsr = rSh.GetTableCrsr(); + const bool bTableCrsr = rSh.GetTableCrsr(); const bool bVertTable = rSh.IsTableVertical(); - if( ( bVertText && ( !bTblCrsr || bVertTable ) ) || - ( bTblCrsr && bVertTable ) ) + if( ( bVertText && ( !bTableCrsr || bVertTable ) ) || + ( bTableCrsr && bVertTable ) ) { // Attempt to integrate cursor travelling for mongolian layout does not work. // Thus, back to previous mapping of cursor keys to direction keys. @@ -1453,13 +1453,13 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((rKeyCode.GetCode() == KEY_PAGEUP) || (rKeyCode.GetCode() == KEY_PAGEDOWN))) { const bool bNext = rKeyCode.GetCode()==KEY_PAGEDOWN; - const SwFieldType* pFldType = rSh.GetFldType( 0, RES_POSTITFLD ); - rSh.MoveFldType( pFldType, bNext ); + const SwFieldType* pFieldType = rSh.GetFieldType( 0, RES_POSTITFLD ); + rSh.MoveFieldType( pFieldType, bNext ); return; } - const SwFrmFmt* pFlyFmt = rSh.GetFlyFrmFmt(); - if( pFlyFmt ) + const SwFrameFormat* pFlyFormat = rSh.GetFlyFrameFormat(); + if( pFlyFormat ) { sal_uInt16 nEvent; @@ -1469,12 +1469,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) else nEvent = SW_EVENT_FRM_KEYINPUT_NOALPHA; - const SvxMacro* pMacro = pFlyFmt->GetMacro().GetMacroTable().Get( nEvent ); + const SvxMacro* pMacro = pFlyFormat->GetMacro().GetMacroTable().Get( nEvent ); if( pMacro ) { SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; - xVar->PutString( pFlyFmt->GetName() ); + xVar->PutString( pFlyFormat->GetName() ); xArgs->Put( &xVar, 1 ); xVar = new SbxVariable; @@ -1521,10 +1521,10 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - TblChgWidthHeightType eTblChgMode = nsTblChgWidthHeightType::WH_COL_LEFT; // initialization just for warning-free code - sal_uInt16 nTblChgSize = 0; + TableChgWidthHeightType eTableChgMode = nsTableChgWidthHeightType::WH_COL_LEFT; // initialization just for warning-free code + sal_uInt16 nTableChgSize = 0; bool bStopKeyInputTimer = true; - OUString sFmlEntry; + OUString sFormulaEntry; enum SW_KeyState { KS_Start, KS_CheckKey, KS_InsChar, KS_InsTab, @@ -1534,7 +1534,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) KS_OutlineLvOff, KS_NextCell, KS_PrevCell, KS_OutlineUp, KS_OutlineDown, KS_GlossaryExpand, KS_NextPrevGlossary, - KS_AutoFmtByInput, + KS_AutoFormatByInput, KS_NextObject, KS_PrevObject, KS_KeyToView, KS_LaunchOLEObject, KS_GoIntoFly, KS_GoIntoDrawing, @@ -1558,7 +1558,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) KS_InsDel_CellLeftSmall, KS_InsDel_CellRightSmall, KS_InsDel_CellTopBig, KS_InsDel_CellBottomBig, KS_InsDel_CellTopSmall, KS_InsDel_CellBottomSmall, - KS_TblColCellInsDel, + KS_TableColCellInsDel, KS_Fly_Change, KS_Draw_Change, KS_SpecialInsert, @@ -1596,7 +1596,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) #endif if( !rKeyCode.IsMod2() && '=' == aCh && - !rSh.IsTableMode() && rSh.GetTableFmt() && + !rSh.IsTableMode() && rSh.GetTableFormat() && rSh.IsSttPara() && !rSh.HasReadonlySel() ) { @@ -1615,14 +1615,14 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) rSh.MoveSection( fnSectionCurr, fnSectionEnd ); rSh.Pop( true ); rSh.EndSelect(); - sFmlEntry = "="; + sFormulaEntry = "="; } else rSh.Pop( false ); } else { - if( pACorr && aTmpQHD.HasCntnt() && !rSh.HasSelection() && + if( pACorr && aTmpQHD.HasContent() && !rSh.HasSelection() && !rSh.HasReadonlySel() && !aTmpQHD.m_bIsAutoText && pACorr->GetSwFlags().nAutoCmpltExpandKey == (rKeyCode.GetModifier() | rKeyCode.GetCode()) ) @@ -1698,17 +1698,17 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) goto KEYINPUT_CHECKTABLE; KEYINPUT_CHECKTABLE: - if( rSh.IsTableMode() || !rSh.GetTableFmt() ) + if( rSh.IsTableMode() || !rSh.GetTableFormat() ) { if(KS_KeyToView != eFlyState) { - if(!pFlyFmt && KS_KeyToView != eFlyState && + if(!pFlyFormat && KS_KeyToView != eFlyState && (rSh.GetSelectionType() & (nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM)) && rSh.GetDrawView()->AreObjectsMarked()) eKeyState = KS_Draw_Change; } - if( pFlyFmt ) + if( pFlyFormat ) eKeyState = eFlyState; else if( KS_Draw_Change != eKeyState) eKeyState = KS_EnterCharCell; @@ -1722,12 +1722,12 @@ KEYINPUT_CHECKTABLE: case KEY_DOWN | KEY_SHIFT: { const int nSelectionType = rSh.GetSelectionType(); - if ( ( pFlyFmt + if ( ( pFlyFormat && ( nSelectionType & (nsSelectionType::SEL_FRM|nsSelectionType::SEL_OLE|nsSelectionType::SEL_GRF) ) ) || ( ( nSelectionType & (nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM) ) && rSh.GetDrawView()->AreObjectsMarked() ) ) { - eKeyState = pFlyFmt ? KS_Fly_Change : KS_Draw_Change; + eKeyState = pFlyFormat ? KS_Fly_Change : KS_Draw_Change; switch ( rKeyCode.GetCode() ) { case KEY_RIGHT: nDir = MOVE_RIGHT_HUGE; break; @@ -1748,17 +1748,17 @@ KEYINPUT_CHECKTABLE: eFlyState = KS_Fly_Change; nDir = MOVE_LEFT_BIG; } - eTblChgMode = nsTblChgWidthHeightType::WH_FLAG_INSDEL | + eTableChgMode = nsTableChgWidthHeightType::WH_FLAG_INSDEL | ( bMod1 - ? nsTblChgWidthHeightType::WH_CELL_LEFT - : nsTblChgWidthHeightType::WH_COL_LEFT ); - nTblChgSize = pModOpt->GetTblVInsert(); + ? nsTableChgWidthHeightType::WH_CELL_LEFT + : nsTableChgWidthHeightType::WH_COL_LEFT ); + nTableChgSize = pModOpt->GetTableVInsert(); } goto KEYINPUT_CHECKTABLE_INSDEL; case KEY_RIGHT | KEY_MOD1: { - eTblChgMode = nsTblChgWidthHeightType::WH_FLAG_INSDEL | nsTblChgWidthHeightType::WH_CELL_RIGHT; - nTblChgSize = pModOpt->GetTblVInsert(); + eTableChgMode = nsTableChgWidthHeightType::WH_FLAG_INSDEL | nsTableChgWidthHeightType::WH_CELL_RIGHT; + nTableChgSize = pModOpt->GetTableVInsert(); } goto KEYINPUT_CHECKTABLE_INSDEL; case KEY_UP: @@ -1770,11 +1770,11 @@ KEYINPUT_CHECKTABLE: eFlyState = KS_Fly_Change; nDir = MOVE_UP_BIG; } - eTblChgMode = nsTblChgWidthHeightType::WH_FLAG_INSDEL | + eTableChgMode = nsTableChgWidthHeightType::WH_FLAG_INSDEL | ( bMod1 - ? nsTblChgWidthHeightType::WH_CELL_TOP - : nsTblChgWidthHeightType::WH_ROW_TOP ); - nTblChgSize = pModOpt->GetTblHInsert(); + ? nsTableChgWidthHeightType::WH_CELL_TOP + : nsTableChgWidthHeightType::WH_ROW_TOP ); + nTableChgSize = pModOpt->GetTableHInsert(); } goto KEYINPUT_CHECKTABLE_INSDEL; case KEY_DOWN: @@ -1786,17 +1786,17 @@ KEYINPUT_CHECKTABLE: eFlyState = KS_Fly_Change; nDir = MOVE_DOWN_BIG; } - eTblChgMode = nsTblChgWidthHeightType::WH_FLAG_INSDEL | + eTableChgMode = nsTableChgWidthHeightType::WH_FLAG_INSDEL | ( bMod1 - ? nsTblChgWidthHeightType::WH_CELL_BOTTOM - : nsTblChgWidthHeightType::WH_ROW_BOTTOM ); - nTblChgSize = pModOpt->GetTblHInsert(); + ? nsTableChgWidthHeightType::WH_CELL_BOTTOM + : nsTableChgWidthHeightType::WH_ROW_BOTTOM ); + nTableChgSize = pModOpt->GetTableHInsert(); } goto KEYINPUT_CHECKTABLE_INSDEL; KEYINPUT_CHECKTABLE_INSDEL: - if( rSh.IsTableMode() || !rSh.GetTableFmt() || - !m_bTblInsDelMode || + if( rSh.IsTableMode() || !rSh.GetTableFormat() || + !m_bTableInsDelMode || false /* table protected */ ) { @@ -1814,9 +1814,9 @@ KEYINPUT_CHECKTABLE_INSDEL: } else { - if( !m_bTblIsInsMode ) - eTblChgMode = eTblChgMode | nsTblChgWidthHeightType::WH_FLAG_BIGGER; - eKeyState = KS_TblColCellInsDel; + if( !m_bTableIsInsMode ) + eTableChgMode = eTableChgMode | nsTableChgWidthHeightType::WH_FLAG_BIGGER; + eKeyState = KS_TableColCellInsDel; } break; @@ -1835,21 +1835,21 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KEY_DELETE | KEY_MOD2: - if( !rSh.IsTableMode() && rSh.GetTableFmt() ) + if( !rSh.IsTableMode() && rSh.GetTableFormat() ) { eKeyState = KS_End; - m_bTblInsDelMode = true; - m_bTblIsInsMode = false; + m_bTableInsDelMode = true; + m_bTableIsInsMode = false; m_aKeyInputTimer.Start(); bStopKeyInputTimer = false; } break; case KEY_INSERT | KEY_MOD2: - if( !rSh.IsTableMode() && rSh.GetTableFmt() ) + if( !rSh.IsTableMode() && rSh.GetTableFormat() ) { eKeyState = KS_End; - m_bTblInsDelMode = true; - m_bTblIsInsMode = true; + m_bTableInsDelMode = true; + m_bTableIsInsMode = true; m_aKeyInputTimer.Start(); bStopKeyInputTimer = false; } @@ -1858,7 +1858,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KEY_RETURN: { if ( !rSh.HasReadonlySel() - && !rSh.CrsrInsideInputFld() ) + && !rSh.CrsrInsideInputField() ) { const int nSelectionType = rSh.GetSelectionType(); if(nSelectionType & nsSelectionType::SEL_OLE) @@ -1869,7 +1869,7 @@ KEYINPUT_CHECKTABLE_INSDEL: 0 == (nSelectionType & nsSelectionType::SEL_DRW_TXT) && rSh.GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1) eKeyState = KS_GoIntoDrawing; - else if( aTmpQHD.HasCntnt() && !rSh.HasSelection() && + else if( aTmpQHD.HasContent() && !rSh.HasSelection() && aTmpQHD.m_bIsAutoText ) eKeyState = KS_GlossaryExpand; @@ -1882,12 +1882,12 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = KS_NumOff, eNextKeyState = KS_OutlineLvOff; //RETURN for new paragraph with AutoFormating - else if( pACfg && pACfg->IsAutoFmtByInput() && + else if( pACfg && pACfg->IsAutoFormatByInput() && !(nSelectionType & (nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE | nsSelectionType::SEL_FRM | nsSelectionType::SEL_TBL_CELLS | nsSelectionType::SEL_DRW | nsSelectionType::SEL_DRW_TXT)) ) - eKeyState = KS_CheckAutoCorrect, eNextKeyState = KS_AutoFmtByInput; + eKeyState = KS_CheckAutoCorrect, eNextKeyState = KS_AutoFormatByInput; else eNextKeyState = eKeyState, eKeyState = KS_CheckAutoCorrect; } @@ -1898,7 +1898,7 @@ KEYINPUT_CHECKTABLE_INSDEL: if ( !rSh.HasReadonlySel() && !rSh.IsSttPara() && rSh.GetNumRuleAtCurrCrsrPos() - && !rSh.CrsrInsideInputFld() ) + && !rSh.CrsrInsideInputField() ) { eKeyState = KS_NoNum; } @@ -2002,8 +2002,8 @@ KEYINPUT_CHECKTABLE_INSDEL: { eFlyState = KS_Fly_Change; nDir = MOVE_RIGHT_BIG; - eTblChgMode = nsTblChgWidthHeightType::WH_FLAG_INSDEL | nsTblChgWidthHeightType::WH_COL_RIGHT; - nTblChgSize = pModOpt->GetTblVInsert(); + eTableChgMode = nsTableChgWidthHeightType::WH_FLAG_INSDEL | nsTableChgWidthHeightType::WH_COL_RIGHT; + nTableChgSize = pModOpt->GetTableVInsert(); goto KEYINPUT_CHECKTABLE_INSDEL; } case KEY_TAB: @@ -2013,7 +2013,7 @@ KEYINPUT_CHECKTABLE_INSDEL: { eKeyState=KS_GotoNextFieldMark; } - else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() ) + else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputField() ) { GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD ); eKeyState = KS_End; @@ -2029,7 +2029,7 @@ KEYINPUT_CHECKTABLE_INSDEL: else eKeyState = KS_NumDown; } - else if ( rSh.GetTableFmt() ) + else if ( rSh.GetTableFormat() ) { if( rSh.HasSelection() || rSh.HasReadonlySel() ) eKeyState = KS_NextCell; @@ -2049,7 +2049,7 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = KS_InsTab; if( rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { - SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); + SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); if( pColl && pColl->IsAssignedToListLevelOfOutlineStyle() @@ -2065,7 +2065,7 @@ KEYINPUT_CHECKTABLE_INSDEL: { eKeyState=KS_GotoPrevFieldMark; } - else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() ) + else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputField() ) { GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD ); eKeyState = KS_End; @@ -2081,7 +2081,7 @@ KEYINPUT_CHECKTABLE_INSDEL: else eKeyState = KS_NumUp; } - else if ( rSh.GetTableFmt() ) + else if ( rSh.GetTableFormat() ) { if( rSh.HasSelection() || rSh.HasReadonlySel() ) eKeyState = KS_PrevCell; @@ -2101,7 +2101,7 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = KS_End; if( rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { - SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); + SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); if( pColl && pColl->IsAssignedToListLevelOfOutlineStyle() && 0 < pColl->GetAssignedOutlineStyleLevel()) @@ -2114,14 +2114,14 @@ KEYINPUT_CHECKTABLE_INSDEL: case KEY_TAB | KEY_MOD2: if( !rSh.HasReadonlySel() ) { - if( aTmpQHD.HasCntnt() && !rSh.HasSelection() ) + if( aTmpQHD.HasContent() && !rSh.HasSelection() ) { // Next auto-complete suggestion aTmpQHD.Next( pACorr && pACorr->GetSwFlags().bAutoCmpltEndless ); eKeyState = KS_NextPrevGlossary; } - else if( rSh.GetTableFmt() ) + else if( rSh.GetTableFormat() ) eKeyState = KS_InsTab; else if((rSh.GetSelectionType() & (nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM| @@ -2137,7 +2137,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KEY_TAB | KEY_MOD1 | KEY_SHIFT: { - if( aTmpQHD.HasCntnt() && !rSh.HasSelection() && + if( aTmpQHD.HasContent() && !rSh.HasSelection() && !rSh.HasReadonlySel() ) { // Previous auto-complete suggestion. @@ -2186,7 +2186,7 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = rKeyCode.GetModifier() & KEY_SHIFT ? KS_PrevObject : KS_NextObject; } - else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() ) + else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputField() ) { GetView().GetViewFrame()->GetDispatcher()->Execute( KEY_SHIFT != rKeyCode.GetModifier() ? FN_GOTO_NEXT_INPUTFLD : FN_GOTO_PREV_INPUTFLD ); @@ -2210,7 +2210,7 @@ KEYINPUT_CHECKTABLE_INSDEL: const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, true); bNormalChar = false; eKeyState = KS_End; - rSh.ClickToINetAttr(static_cast<const SwFmtINetFmt&>(rItem), URLLOAD_NOFILTER); + rSh.ClickToINetAttr(static_cast<const SwFormatINetFormat&>(rItem), URLLOAD_NOFILTER); } } } @@ -2365,7 +2365,7 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = KS_End; } else if ( !rSh.HasReadonlySel() - || rSh.CrsrInsideInputFld() ) + || rSh.CrsrInsideInputField() ) { const bool bIsNormalChar = GetAppCharClass().isLetterNumeric( OUString( aCh ), 0 ); @@ -2380,7 +2380,7 @@ KEYINPUT_CHECKTABLE_INSDEL: const bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh ); const bool bRunNext = pACorr != NULL && pACorr->HasRunNext(); if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && - pACfg->IsAutoFmtByInput() && + pACfg->IsAutoFormatByInput() && (( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) && ( '*' == aCh || '_' == aCh ) ) || ( pACorr->IsAutoCorrFlag( ChgQuotes ) && ('\"' == aCh ))|| @@ -2392,7 +2392,7 @@ KEYINPUT_CHECKTABLE_INSDEL: rSh.UpdateAttr(); } else if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && - pACfg->IsAutoFmtByInput() && + pACfg->IsAutoFormatByInput() && pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | ChgOrdinalNumber | AddNonBrkSpace | ChgToEnEmDash | SetINetAttr | @@ -2426,7 +2426,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_CheckAutoCorrect: { - if( pACorr && pACfg->IsAutoFmtByInput() && + if( pACorr && pACfg->IsAutoFormatByInput() && pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | @@ -2510,7 +2510,7 @@ KEYINPUT_CHECKTABLE_INSDEL: rSh.GoPrevCell(); nSlotId = FN_GOTO_PREV_CELL; break; - case KS_AutoFmtByInput: + case KS_AutoFormatByInput: rSh.SplitNode( true ); break; @@ -2576,44 +2576,44 @@ KEYINPUT_CHECKTABLE_INSDEL: SwInputChild* pChildWin = static_cast<SwInputChild*>(pVFrame-> GetChildWindow( nId )); if( pChildWin ) - pChildWin->SetFormula( sFmlEntry ); + pChildWin->SetFormula( sFormulaEntry ); } break; - case KS_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHMove() ); break; - case KS_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHMove() ); break; - case KS_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; - case KS_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVMove() ); break; - case KS_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHMove() ); break; - case KS_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHMove() ); break; - case KS_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; - case KS_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; - case KS_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVMove() ); break; - case KS_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVMove() ); break; - - case KS_InsDel_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVInsert() ); break; - - case KS_TblColCellInsDel: - rSh.SetColRowWidthHeight( eTblChgMode, nTblChgSize ); + case KS_ColLeftBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_COL_LEFT|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableHMove() ); break; + case KS_ColRightBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_COL_RIGHT|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableHMove() ); break; + case KS_ColLeftSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTableHMove() ); break; + case KS_ColRightSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTableHMove() ); break; + case KS_ColBottomBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_ROW_BOTTOM|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableVMove() ); break; + case KS_ColBottomSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTableVMove() ); break; + case KS_CellLeftBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_CELL_LEFT|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableHMove() ); break; + case KS_CellRightBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_CELL_RIGHT|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableHMove() ); break; + case KS_CellLeftSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTableHMove() ); break; + case KS_CellRightSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTableHMove() ); break; + case KS_CellTopBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_CELL_TOP|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableVMove() ); break; + case KS_CellBottomBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_CELL_BOTTOM|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableVMove() ); break; + case KS_CellTopSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTableVMove() ); break; + case KS_CellBottomSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTableVMove() ); break; + + case KS_InsDel_ColLeftBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_COL_LEFT|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableHInsert() ); break; + case KS_InsDel_ColRightBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_COL_RIGHT|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableHInsert() ); break; + case KS_InsDel_ColLeftSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTableHInsert() ); break; + case KS_InsDel_ColRightSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTableHInsert() ); break; + case KS_InsDel_ColTopBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_ROW_TOP|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableVInsert() ); break; + case KS_InsDel_ColBottomBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_ROW_BOTTOM|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableVInsert() ); break; + case KS_InsDel_ColTopSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTableVInsert() ); break; + case KS_InsDel_ColBottomSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTableVInsert() ); break; + case KS_InsDel_CellLeftBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_CELL_LEFT|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableHInsert() ); break; + case KS_InsDel_CellRightBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_CELL_RIGHT|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableHInsert() ); break; + case KS_InsDel_CellLeftSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTableHInsert() ); break; + case KS_InsDel_CellRightSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTableHInsert() ); break; + case KS_InsDel_CellTopBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_CELL_TOP|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableVInsert() ); break; + case KS_InsDel_CellBottomBig: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_CELL_BOTTOM|nsTableChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTableVInsert() ); break; + case KS_InsDel_CellTopSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTableVInsert() ); break; + case KS_InsDel_CellBottomSmall: rSh.SetColRowWidthHeight( nsTableChgWidthHeightType::WH_FLAG_INSDEL|nsTableChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTableVInsert() ); break; + + case KS_TableColCellInsDel: + rSh.SetColRowWidthHeight( eTableChgMode, nTableChgSize ); break; case KS_Fly_Change: { @@ -2644,7 +2644,7 @@ KEYINPUT_CHECKTABLE_INSDEL: if( bStopKeyInputTimer ) { m_aKeyInputTimer.Stop(); - m_bTblInsDelMode = false; + m_bTableInsDelMode = false; } // in case the buffered characters are inserted @@ -2735,7 +2735,7 @@ void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos, void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { SwWrtShell &rSh = m_rView.GetWrtShell(); - const SwField *pCrsrFld = rSh.CrsrInsideInputFld() ? rSh.GetCurFld( true ) : NULL; + const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : NULL; // 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 @@ -2779,7 +2779,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bool bOverHeaderFooterFly = IsOverHeaderFooterFly( aDocPos, eControl, bOverFly, bPageAnchored ); bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly(); - if (bOverHeaderFooterFly && (!bIsDocReadOnly && rSh.GetCurFld())) + if (bOverHeaderFooterFly && (!bIsDocReadOnly && rSh.GetCurField())) // We have a field here, that should have priority over header/footer fly. bOverHeaderFooterFly = false; @@ -2802,16 +2802,16 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bool bActive = true; const SwPageDesc* pDesc = pPageFrm->GetPageDesc(); - const SwFrmFmt* pFmt = pDesc->GetLeftFmt(); + const SwFrameFormat* pFormat = pDesc->GetLeftFormat(); if ( pPageFrm->OnRightPage() ) - pFmt = pDesc->GetRightFmt(); + pFormat = pDesc->GetRightFormat(); - if ( pFmt ) + if ( pFormat ) { if ( eControl == Header ) - bActive = pFmt->GetHeader().IsActive(); + bActive = pFormat->GetHeader().IsActive(); else - bActive = pFmt->GetFooter().IsActive(); + bActive = pFormat->GetFooter().IsActive(); } if ( !bActive ) @@ -2869,9 +2869,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { SetChainMode( false ); SwRect aDummy; - SwFlyFrmFmt *pFmt = static_cast<SwFlyFrmFmt*>(rSh.GetFlyFrmFmt()); - if ( rSh.Chainable( aDummy, *pFmt, aDocPos ) == SwChainRet::OK ) - rSh.Chain( *pFmt, aDocPos ); + SwFlyFrameFormat *pFormat = static_cast<SwFlyFrameFormat*>(rSh.GetFlyFrameFormat()); + if ( rSh.Chainable( aDummy, *pFormat, aDocPos ) == SwChainRet::OK ) + rSh.Chain( *pFormat, aDocPos ); UpdatePointer( aDocPos, rMEvt.GetModifier() ); return; } @@ -2959,7 +2959,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) else if (bTmp && rSh.IsNumLabel(aDocPos)) { - SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPos ); + SwTextNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPos ); m_rView.SetNumRuleNodeFromDoc( pNodeAtPos ); m_rView.InvalidateRulerPos(); SfxBindings& rBind = m_rView.GetViewFrame()->GetBindings(); @@ -3286,19 +3286,19 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ((!g_bValidCrsrPos || rSh.IsFrmSelected()) && !rSh.isTiledRendering()) return; - SwField *pFld; - bool bFtn = false; + SwField *pField; + bool bFootnote = false; if( !bIsDocReadOnly && - ( 0 != ( pFld = rSh.GetCurFld() ) || - ( bFtn = rSh.GetCurFtn() ) ) ) + ( 0 != ( pField = rSh.GetCurField() ) || + ( bFootnote = rSh.GetCurFootnote() ) ) ) { RstMBDownFlags(); - if( bFtn ) + if( bFootnote ) GetView().GetViewFrame()->GetBindings().Execute( FN_EDIT_FOOTNOTE ); else { - sal_uInt16 nTypeId = pFld->GetTypeId(); + sal_uInt16 nTypeId = pField->GetTypeId(); SfxViewFrame* pVFrame = GetView().GetViewFrame(); switch( nTypeId ) { @@ -3339,7 +3339,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // Double click did not select any word: try to // select the current cell in case we are in a // table. - rSh.SelTblBox(); + rSh.SelTableBox(); } g_bHoldSelection = true; return; @@ -3536,15 +3536,15 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bSttSelect = true; if( bExecHyperlinks ) { - SwContentAtPos aCntntAtPos( + SwContentAtPos aContentAtPos( SwContentAtPos::SW_FTN | SwContentAtPos::SW_INETATTR ); - if( rSh.GetContentAtPos( aDocPos, aCntntAtPos ) ) + if( rSh.GetContentAtPos( aDocPos, aContentAtPos ) ) { if( !rSh.IsViewLocked() && !rSh.IsReadOnlyAvailable() && - aCntntAtPos.IsInProtectSect() ) + aContentAtPos.IsInProtectSect() ) bLockView = true; bSttSelect = false; @@ -3564,11 +3564,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) default: if( !rSh.IsViewLocked() ) { - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD | + SwContentAtPos aContentAtPos( SwContentAtPos::SW_CLICKFIELD | SwContentAtPos::SW_INETATTR ); - if( rSh.GetContentAtPos( aDocPos, aCntntAtPos, false ) && + if( rSh.GetContentAtPos( aDocPos, aContentAtPos, false ) && !rSh.IsReadOnlyAvailable() && - aCntntAtPos.IsInProtectSect() ) + aContentAtPos.IsInProtectSect() ) bLockView = true; } } @@ -3585,8 +3585,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // Are we clicking on a field? if (rSh.GetContentAtPos(aDocPos, aFieldAtPos)) { - bool bEditableField = (aFieldAtPos.pFndTxtAttr != NULL - && aFieldAtPos.pFndTxtAttr->Which() == RES_TXTATR_INPUTFIELD); + bool bEditableField = (aFieldAtPos.pFndTextAttr != NULL + && aFieldAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD); if (!bEditableField) { @@ -3594,12 +3594,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // Unfortunately the cursor may be on field // position or on position after field depending on which // half of the field was clicked on. - SwTxtAttr const*const pTxtFld(aFieldAtPos.pFndTxtAttr); + SwTextAttr const*const pTextField(aFieldAtPos.pFndTextAttr); if (rSh.GetCurrentShellCursor().GetPoint()->nContent - .GetIndex() != pTxtFld->GetStart()) + .GetIndex() != pTextField->GetStart()) { assert(rSh.GetCurrentShellCursor().GetPoint()->nContent - .GetIndex() == (pTxtFld->GetStart() + 1)); + .GetIndex() == (pTextField->GetStart() + 1)); rSh.Left( CRSR_SKIP_CHARS, false, 1, false ); } // don't go into the !bOverSelect block below - it moves @@ -3635,14 +3635,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bCallBase = false; } } - if ( !bOverSelect && bEditableFieldClicked && (!pCrsrFld || - pCrsrFld != aFieldAtPos.pFndTxtAttr->GetFmtFld().GetField())) + if ( !bOverSelect && bEditableFieldClicked && (!pCrsrField || + pCrsrField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) { // select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART // and CH_TXT_ATR_INPUTFIELDEND rSh.SttSelect(); - rSh.SelectTxt( aFieldAtPos.pFndTxtAttr->GetStart() + 1, - *(aFieldAtPos.pFndTxtAttr->End()) - 1 ); + rSh.SelectText( aFieldAtPos.pFndTextAttr->GetStart() + 1, + *(aFieldAtPos.pFndTextAttr->End()) - 1 ); } // don't reset here any longer so that, in case through MouseMove // with pressed Ctrl key a multiple-selection should happen, @@ -3660,9 +3660,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // Are we clicking on a field? if (g_bValidCrsrPos && rSh.GetContentAtPos(aDocPos, aFieldAtPos) - && aFieldAtPos.pFndTxtAttr != NULL - && aFieldAtPos.pFndTxtAttr->Which() == RES_TXTATR_INPUTFIELD - && (!pCrsrFld || pCrsrFld != aFieldAtPos.pFndTxtAttr->GetFmtFld().GetField())) + && aFieldAtPos.pFndTextAttr != NULL + && aFieldAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD + && (!pCrsrField || pCrsrField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) { // Move the cursor MoveCursor( rSh, aDocPos, rSh.IsObjSelectable( aDocPos ), m_bWasShdwCrsr ); @@ -3671,8 +3671,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART // and CH_TXT_ATR_INPUTFIELDEND rSh.SttSelect(); - rSh.SelectTxt( aFieldAtPos.pFndTxtAttr->GetStart() + 1, - *(aFieldAtPos.pFndTxtAttr->End()) - 1 ); + rSh.SelectText( aFieldAtPos.pFndTextAttr->GetStart() + 1, + *(aFieldAtPos.pFndTextAttr->End()) - 1 ); } } @@ -3796,19 +3796,19 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) !rSh.IsObjSelectable( aDocPt ) ) { sal_uInt16 nPointer = USHRT_MAX; - bool bChkTblSel = false; + bool bChkTableSel = false; switch ( nMouseTabCol ) { case SwTab::COL_VERT : case SwTab::ROW_HORI : nPointer = POINTER_VSIZEBAR; - bChkTblSel = true; + bChkTableSel = true; break; case SwTab::ROW_VERT : case SwTab::COL_HORI : nPointer = POINTER_HSIZEBAR; - bChkTblSel = true; + bChkTableSel = true; break; // Enhanced table selection case SwTab::SEL_HORI : @@ -3834,7 +3834,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if ( USHRT_MAX != nPointer && // i#35543 - Enhanced table selection is explicitly allowed in table mode - ( !bChkTblSel || !rSh.IsTableMode() ) ) + ( !bChkTableSel || !rSh.IsTableMode() ) ) { SetPointer( nPointer ); } @@ -3844,7 +3844,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) else if (rSh.IsNumLabel(aDocPt, RULER_MOUSE_MARGINWIDTH)) { // i#42921 - consider vertical mode - SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt ); + SwTextNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt ); const sal_uInt16 nPointer = SwFEShell::IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt ) ? POINTER_VSIZEBAR @@ -3934,7 +3934,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // event processing for resizing if (pSdrView && pSdrView->AreObjectsMarked()) { - const SwFrmFmt* pFlyFmt; + const SwFrameFormat* pFlyFormat; const SvxMacro* pMacro; const Point aSttPt( PixelToLogic( m_aStartPos ) ); @@ -3950,8 +3950,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) ? SW_EVENT_FRM_MOVE : SW_EVENT_FRM_RESIZE; - if( 0 != ( pFlyFmt = rSh.GetFlyFrmFmt() ) && - 0 != ( pMacro = pFlyFmt->GetMacro().GetMacroTable(). + if( 0 != ( pFlyFormat = rSh.GetFlyFrameFormat() ) && + 0 != ( pMacro = pFlyFormat->GetMacro().GetMacroTable(). Get( nEvent )) && // or notify only e.g. every 20 Twip? m_aRszMvHdlPt != aDocPt ) @@ -3960,7 +3960,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) sal_uInt16 nPos = 0; SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; - xVar->PutString( pFlyFmt->GetName() ); + xVar->PutString( pFlyFormat->GetName() ); xArgs->Put( &xVar, ++nPos ); if( SW_EVENT_FRM_RESIZE == nEvent ) @@ -4078,14 +4078,14 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } // change ui if mouse is over SwPostItField // TODO: do the same thing for redlines SW_REDLINE - SwRect aFldRect; - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD); - if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, false, &aFldRect ) ) + SwRect aFieldRect; + SwContentAtPos aContentAtPos( SwContentAtPos::SW_FIELD); + if( rSh.GetContentAtPos( aDocPt, aContentAtPos, false, &aFieldRect ) ) { - const SwField* pFld = aCntntAtPos.aFnd.pFld; - if (pFld->Which()== RES_POSTITFLD) + const SwField* pField = aContentAtPos.aFnd.pField; + if (pField->Which()== RES_POSTITFLD) { - m_rView.GetPostItMgr()->SetShadowState(reinterpret_cast<const SwPostItField*>(pFld),false); + m_rView.GetPostItMgr()->SetShadowState(reinterpret_cast<const SwPostItField*>(pField),false); } else m_rView.GetPostItMgr()->SetShadowState(0,false); @@ -4103,27 +4103,27 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) UpdatePointer( aDocPt, rMEvt.GetModifier() ); - const SwFrmFmt* pFmt = 0; - const SwFmtINetFmt* pINet = 0; - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR ); - if( rSh.GetContentAtPos( aDocPt, aCntntAtPos ) ) - pINet = static_cast<const SwFmtINetFmt*>(aCntntAtPos.aFnd.pAttr); + const SwFrameFormat* pFormat = 0; + const SwFormatINetFormat* pINet = 0; + SwContentAtPos aContentAtPos( SwContentAtPos::SW_INETATTR ); + if( rSh.GetContentAtPos( aDocPt, aContentAtPos ) ) + pINet = static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr); const void* pTmp = pINet; if( pINet || - 0 != ( pTmp = pFmt = rSh.GetFmtFromAnyObj( aDocPt ))) + 0 != ( pTmp = pFormat = rSh.GetFormatFromAnyObj( aDocPt ))) { bTstShdwCrsr = false; if( pTmp == pINet ) m_aSaveCallEvent.Set( pINet ); else { - IMapObject* pIMapObj = pFmt->GetIMapObject( aDocPt ); + IMapObject* pIMapObj = pFormat->GetIMapObject( aDocPt ); if( pIMapObj ) - m_aSaveCallEvent.Set( pFmt, pIMapObj ); + m_aSaveCallEvent.Set( pFormat, pIMapObj ); else - m_aSaveCallEvent.Set( EVENT_OBJECT_URLITEM, pFmt ); + m_aSaveCallEvent.Set( EVENT_OBJECT_URLITEM, pFormat ); } // should be over a InternetField with an @@ -4250,10 +4250,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) SdrPageView* pPV; if (pSdrView && pSdrView->PickObj(aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER )) { - std::map<SwFrmFmt*, SwFrmFmt*> aTextBoxShapes = SwTextBoxHelper::findShapes(rSh.GetDoc()); + std::map<SwFrameFormat*, SwFrameFormat*> aTextBoxShapes = SwTextBoxHelper::findShapes(rSh.GetDoc()); SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(GetUserCall(pObj)); - SwFrmFmt* pFmt = pDrawContact->GetFmt(); - if (aTextBoxShapes.find(pFmt) == aTextBoxShapes.end()) + SwFrameFormat* pFormat = pDrawContact->GetFormat(); + if (aTextBoxShapes.find(pFormat) == aTextBoxShapes.end()) { pSdrView->UnmarkAllObj(); pSdrView->MarkObj(pObj,pPV,false,false); @@ -4261,7 +4261,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) else { // If the fly frame is a textbox of a shape, then select the shape instead. - SdrObject* pShape = aTextBoxShapes[pFmt]->FindSdrObject(); + SdrObject* pShape = aTextBoxShapes[pFormat]->FindSdrObject(); pSdrView->UnmarkAllObj(); pSdrView->MarkObj(pShape, pPV, false, false); } @@ -4384,15 +4384,15 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) else { { - const SwFrmFmt* pFlyFmt; + const SwFrameFormat* pFlyFormat; const SvxMacro* pMacro; sal_uInt16 nEvent = HDL_MOVE == eOldSdrMoveHdl ? SW_EVENT_FRM_MOVE : SW_EVENT_FRM_RESIZE; - if( 0 != ( pFlyFmt = rSh.GetFlyFrmFmt() ) && - 0 != ( pMacro = pFlyFmt->GetMacro().GetMacroTable(). + if( 0 != ( pFlyFormat = rSh.GetFlyFrameFormat() ) && + 0 != ( pMacro = pFlyFormat->GetMacro().GetMacroTable(). Get( nEvent )) ) { const Point aSttPt( PixelToLogic( m_aStartPos ) ); @@ -4400,7 +4400,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) sal_uInt16 nPos = 0; SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; - xVar->PutString( pFlyFmt->GetName() ); + xVar->PutString( pFlyFormat->GetName() ); xArgs->Put( &xVar, ++nPos ); if( SW_EVENT_FRM_RESIZE == nEvent ) @@ -4495,25 +4495,25 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if(m_pApplyTempl) bExecHyperlinks = false; - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD | + SwContentAtPos aContentAtPos( SwContentAtPos::SW_FIELD | SwContentAtPos::SW_INETATTR | SwContentAtPos::SW_SMARTTAG | SwContentAtPos::SW_FORMCTRL); - if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, false ) ) + if( rSh.GetContentAtPos( aDocPt, aContentAtPos, false ) ) { // Do it again if we're not on a field/hyperlink to update the cursor accordingly - if ( SwContentAtPos::SW_FIELD != aCntntAtPos.eCntntAtPos - && SwContentAtPos::SW_INETATTR != aCntntAtPos.eCntntAtPos ) - rSh.GetContentAtPos( aDocPt, aCntntAtPos, true ); + if ( SwContentAtPos::SW_FIELD != aContentAtPos.eContentAtPos + && SwContentAtPos::SW_INETATTR != aContentAtPos.eContentAtPos ) + rSh.GetContentAtPos( aDocPt, aContentAtPos, true ); bool bViewLocked = rSh.IsViewLocked(); if( !bViewLocked && !rSh.IsReadOnlyAvailable() && - aCntntAtPos.IsInProtectSect() ) + aContentAtPos.IsInProtectSect() ) rSh.LockView( true ); ReleaseMouse(); - if( SwContentAtPos::SW_FIELD == aCntntAtPos.eCntntAtPos ) + if( SwContentAtPos::SW_FIELD == aContentAtPos.eContentAtPos ) { bool bAddMode(false); // AdditionalMode if applicable @@ -4523,8 +4523,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) bAddMode = true; rSh.EnterAddMode(); } - if ( aCntntAtPos.pFndTxtAttr != NULL - && aCntntAtPos.pFndTxtAttr->Which() == RES_TXTATR_INPUTFIELD ) + if ( aContentAtPos.pFndTextAttr != NULL + && aContentAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD ) { if (!rSh.IsInSelect()) { @@ -4541,7 +4541,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } else { - rSh.ClickToField( *aCntntAtPos.aFnd.pFld ); + rSh.ClickToField( *aContentAtPos.aFnd.pField ); // a bit of a mystery what this is good for? // in this case we assume it's valid since we // just selected a field @@ -4552,18 +4552,18 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.LeaveAddMode(); } } - else if ( SwContentAtPos::SW_SMARTTAG == aCntntAtPos.eCntntAtPos ) + else if ( SwContentAtPos::SW_SMARTTAG == aContentAtPos.eContentAtPos ) { // execute smarttag menu if ( bExecSmarttags && SwSmartTagMgr::Get().IsSmartTagsEnabled() ) m_rView.ExecSmartTagPopup( aDocPt ); } - else if ( SwContentAtPos::SW_FORMCTRL == aCntntAtPos.eCntntAtPos ) + else if ( SwContentAtPos::SW_FORMCTRL == aContentAtPos.eContentAtPos ) { - OSL_ENSURE( aCntntAtPos.aFnd.pFldmark != NULL, "where is my field ptr???"); - if ( aCntntAtPos.aFnd.pFldmark != NULL) + OSL_ENSURE( aContentAtPos.aFnd.pFieldmark != NULL, "where is my field ptr???"); + if ( aContentAtPos.aFnd.pFieldmark != NULL) { - IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark ); + IFieldmark *fieldBM = const_cast< IFieldmark* > ( aContentAtPos.aFnd.pFieldmark ); if ( fieldBM->GetFieldname( ) == ODF_FORMCHECKBOX ) { ICheckboxFieldmark& rCheckboxFm = dynamic_cast<ICheckboxFieldmark&>(*fieldBM); @@ -4579,10 +4579,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } } } - else if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos ) + else if ( SwContentAtPos::SW_INETATTR == aContentAtPos.eContentAtPos ) { - if ( bExecHyperlinks && aCntntAtPos.aFnd.pAttr ) - rSh.ClickToINetAttr( *static_cast<const SwFmtINetFmt*>(aCntntAtPos.aFnd.pAttr), nFilter ); + if ( bExecHyperlinks && aContentAtPos.aFnd.pAttr ) + rSh.ClickToINetAttr( *static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr), nFilter ); } rSh.LockView( bViewLocked ); @@ -4590,8 +4590,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } else { - aCntntAtPos = SwContentAtPos( SwContentAtPos::SW_FTN ); - if( !rSh.GetContentAtPos( aDocPt, aCntntAtPos, true ) && bExecHyperlinks ) + aContentAtPos = SwContentAtPos( SwContentAtPos::SW_FTN ); + if( !rSh.GetContentAtPos( aDocPt, aContentAtPos, true ) && bExecHyperlinks ) { SdrViewEvent aVEvt; @@ -4734,37 +4734,37 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if( (( nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL ) & eSelection ) && !rSh.HasReadonlySel() ) { - rSh.SetTxtFmtColl( m_pApplyTempl->aColl.pTxtColl ); + rSh.SetTextFormatColl( m_pApplyTempl->aColl.pTextColl ); m_pApplyTempl->bUndo = true; bCallBase = false; - if ( m_pApplyTempl->aColl.pTxtColl ) - aStyleName = m_pApplyTempl->aColl.pTxtColl->GetName(); + if ( m_pApplyTempl->aColl.pTextColl ) + aStyleName = m_pApplyTempl->aColl.pTextColl->GetName(); } break; case SFX_STYLE_FAMILY_CHAR: if( (( nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL ) & eSelection ) && !rSh.HasReadonlySel() ) { - rSh.SetAttrItem( SwFmtCharFmt(m_pApplyTempl->aColl.pCharFmt) ); + rSh.SetAttrItem( SwFormatCharFormat(m_pApplyTempl->aColl.pCharFormat) ); rSh.UnSetVisCrsr(); rSh.EnterStdMode(); rSh.SetVisCrsr(aDocPt); m_pApplyTempl->bUndo = true; bCallBase = false; - if ( m_pApplyTempl->aColl.pCharFmt ) - aStyleName = m_pApplyTempl->aColl.pCharFmt->GetName(); + if ( m_pApplyTempl->aColl.pCharFormat ) + aStyleName = m_pApplyTempl->aColl.pCharFormat->GetName(); } break; case SFX_STYLE_FAMILY_FRAME : { - const SwFrmFmt* pFmt = rSh.GetFmtFromObj( aDocPt ); - if(PTR_CAST(SwFlyFrmFmt, pFmt)) + const SwFrameFormat* pFormat = rSh.GetFormatFromObj( aDocPt ); + if(PTR_CAST(SwFlyFrameFormat, pFormat)) { - rSh.SetFrmFmt( m_pApplyTempl->aColl.pFrmFmt, false, &aDocPt ); + rSh.SetFrameFormat( m_pApplyTempl->aColl.pFrameFormat, false, &aDocPt ); m_pApplyTempl->bUndo = true; bCallBase = false; - if( m_pApplyTempl->aColl.pFrmFmt ) - aStyleName = m_pApplyTempl->aColl.pFrmFmt->GetName(); + if( m_pApplyTempl->aColl.pFrameFormat ) + aStyleName = m_pApplyTempl->aColl.pFrameFormat->GetName(); } break; } @@ -4923,8 +4923,8 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): m_bIsInDrag(false), m_bOldIdle(false), m_bOldIdleSet(false), - m_bTblInsDelMode(false), - m_bTblIsInsMode(false), + m_bTableInsDelMode(false), + m_bTableIsInsMode(false), m_bChainMode(false), m_bWasShdwCrsr(false), m_bLockInput(false), @@ -4949,7 +4949,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): SetPointer( POINTER_TEXT ); m_aTimer.SetTimeoutHdl(LINK(this, SwEditWin, TimerHandler)); - m_bTblInsDelMode = false; + m_bTableInsDelMode = false; m_aKeyInputTimer.SetTimeout( 3000 ); m_aKeyInputTimer.SetTimeoutHdl(LINK(this, SwEditWin, KeyInputTimerHandler)); @@ -5428,7 +5428,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) rSh.GetCrsr()->GetPoint()->nContent = nPosIdx; rSh.GetCrsr()->GetMark()->nNode = nPosNodeIdx; rSh.GetCrsr()->GetMark()->nContent = - rSh.GetCrsr()->GetCntntNode( true )->Len(); + rSh.GetCrsr()->GetContentNode( true )->Len(); } else if( nPosNodeIdx == nMarkNodeIdx ) { @@ -5443,7 +5443,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) rSh.GetCrsr()->GetMark()->nContent = nMarkIdx; rSh.GetCrsr()->GetPoint()->nNode = nMarkNodeIdx; rSh.GetCrsr()->GetPoint()->nContent = - rSh.GetCrsr()->GetCntntNode( false )->Len(); + rSh.GetCrsr()->GetContentNode( false )->Len(); } rSh.EndCrsrMove( true ); @@ -5742,7 +5742,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, KeyInputFlushHandler, Timer *, void) IMPL_LINK_NOARG_TYPED(SwEditWin, KeyInputTimerHandler, Timer *, void) { - m_bTblInsDelMode = false; + m_bTableInsDelMode = false; } void SwEditWin::_InitStaticData() @@ -5813,7 +5813,7 @@ void QuickHelpData::Move( QuickHelpData& rCpy ) m_bIsAutoText = rCpy.m_bIsAutoText; } -void QuickHelpData::ClearCntnt() +void QuickHelpData::ClearContent() { nLen = nCurArrPos = 0; m_bIsDisplayed = m_bAppendSpace = false; @@ -5874,7 +5874,7 @@ void QuickHelpData::Stop( SwWrtShell& rSh ) rSh.DeleteExtTextInput( 0, false ); else if( nTipId ) Help::HideTip( nTipId ); - ClearCntnt(); + ClearContent(); } void QuickHelpData::FillStrArr( SwWrtShell& rSh, const OUString& rWord ) @@ -6032,7 +6032,7 @@ void SwEditWin::ShowAutoTextCorrectQuickHelp( bool bFromIME ) { SwWrtShell& rSh = m_rView.GetWrtShell(); - m_pQuickHlpData->ClearCntnt(); + m_pQuickHlpData->ClearContent(); if( pACfg->IsAutoTextTip() ) { SwGlossaryList* pList = ::GetGlossaryList(); @@ -6107,10 +6107,10 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r if ( pStartFly ) { bOverFly = true; - SwFrmFmt* pFlyFmt = pStartFly->GetFlyFmt( ); - if ( pFlyFmt ) + SwFrameFormat* pFlyFormat = pStartFly->GetFlyFormat( ); + if ( pFlyFormat ) { - const SwPosition* pAnchor = pFlyFmt->GetAnchor( ).GetCntntAnchor( ); + const SwPosition* pAnchor = pFlyFormat->GetAnchor( ).GetContentAnchor( ); if ( pAnchor ) { bool bInHeader = pAnchor->nNode.GetNode( ).FindHeaderStartNode( ) != NULL; @@ -6123,7 +6123,7 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r rControl = Footer; } else - bPageAnchored = pFlyFmt->GetAnchor( ).GetAnchorId( ) == FLY_AT_PAGE; + bPageAnchored = pFlyFormat->GetAnchor( ).GetAnchorId( ) == FLY_AT_PAGE; } } else diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 28f5929a83df..47ef3ef52195 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -91,15 +91,15 @@ static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon ) return sBuf.makeStringAndClear(); } -OUString SwEditWin::ClipLongToolTip(const OUString& rTxt) +OUString SwEditWin::ClipLongToolTip(const OUString& rText) { - OUString sDisplayTxt(rTxt); - long nTextWidth = GetTextWidth(sDisplayTxt); + OUString sDisplayText(rText); + long nTextWidth = GetTextWidth(sDisplayText); long nMaxWidth = GetDesktopRectPixel().GetWidth() * 2 / 3; nMaxWidth = PixelToLogic(Size(nMaxWidth, 0)).Width(); if (nTextWidth > nMaxWidth) - sDisplayTxt = GetEllipsisString(sDisplayTxt, nMaxWidth, DrawTextFlags::CenterEllipsis); - return sDisplayTxt; + sDisplayText = GetEllipsisString(sDisplayText, nMaxWidth, DrawTextFlags::CenterEllipsis); + return sDisplayText; } void SwEditWin::RequestHelp(const HelpEvent &rEvt) @@ -110,7 +110,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) return; bool bContinue = true; SET_CURR_SHELL(&rSh); - OUString sTxt; + OUString sText; Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) )); bool bBalloon = bool(rEvt.GetMode() & HelpEventMode::BALLOON); @@ -128,8 +128,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) if( bContinue && bQuickBalloon) { - SwRect aFldRect; - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD | + SwRect aFieldRect; + SwContentAtPos aContentAtPos( SwContentAtPos::SW_FIELD | SwContentAtPos::SW_INETATTR | SwContentAtPos::SW_FTN | SwContentAtPos::SW_REDLINE | @@ -142,39 +142,39 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) #endif SwContentAtPos::SW_TABLEBOXFML ); - if( rSh.GetContentAtPos( aPos, aCntntAtPos, false, &aFldRect ) ) + if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) ) { QuickHelpFlags nStyle = QuickHelpFlags::NONE; // style of quick help - switch( aCntntAtPos.eCntntAtPos ) + switch( aContentAtPos.eContentAtPos ) { case SwContentAtPos::SW_TABLEBOXFML: - sTxt = "= "; - sTxt += static_cast<const SwTblBoxFormula*>(aCntntAtPos.aFnd.pAttr)->GetFormula(); + sText = "= "; + sText += static_cast<const SwTableBoxFormula*>(aContentAtPos.aFnd.pAttr)->GetFormula(); break; #ifdef DBG_UTIL case SwContentAtPos::SW_TABLEBOXVALUE: { - sTxt = OStringToOUString(OString::number( - static_cast<const SwTblBoxValue*>(aCntntAtPos.aFnd.pAttr)->GetValue()), + sText = OStringToOUString(OString::number( + static_cast<const SwTableBoxValue*>(aContentAtPos.aFnd.pAttr)->GetValue()), osl_getThreadTextEncoding()); } break; case SwContentAtPos::SW_CURR_ATTRS: - sTxt = aCntntAtPos.sStr; + sText = aContentAtPos.sStr; break; #endif case SwContentAtPos::SW_INETATTR: { - sTxt = static_cast<const SfxStringItem*>(aCntntAtPos.aFnd.pAttr)->GetValue(); - sTxt = URIHelper::removePassword( sTxt, + sText = static_cast<const SfxStringItem*>(aContentAtPos.aFnd.pAttr)->GetValue(); + sText = URIHelper::removePassword( sText, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS); //#i63832# remove the link target type - sal_Int32 nFound = sTxt.indexOf(cMarkSeparator); - if( nFound != -1 && (++nFound) < sTxt.getLength() ) + sal_Int32 nFound = sText.indexOf(cMarkSeparator); + if( nFound != -1 && (++nFound) < sText.getLength() ) { - OUString sSuffix( sTxt.copy(nFound) ); + OUString sSuffix( sText.copy(nFound) ); if( sSuffix == "table" || sSuffix == "frame" || sSuffix == "region" || @@ -182,12 +182,12 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) sSuffix == "text" || sSuffix == "graphic" || sSuffix == "ole" ) - sTxt = sTxt.copy( 0, nFound - 1); + sText = sText.copy( 0, nFound - 1); } // #i104300# // special handling if target is a cross-reference bookmark { - OUString sTmpSearchStr = sTxt.copy( 1 ); + OUString sTmpSearchStr = sText.copy( 1 ); IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); IDocumentMarkAccess::const_iterator_t ppBkmk = @@ -196,14 +196,14 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) IDocumentMarkAccess::GetType( *(ppBkmk->get()) ) == IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK ) { - SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode(); - if ( pTxtNode ) + SwTextNode* pTextNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTextNode(); + if ( pTextNode ) { - sTxt = pTxtNode->GetExpandTxt( 0, pTxtNode->Len(), true, true ); + sText = pTextNode->GetExpandText( 0, pTextNode->Len(), true, true ); - if( !sTxt.isEmpty() ) + if( !sText.isEmpty() ) { - OUStringBuffer sTmp(comphelper::string::remove(sTxt, 0xad)); + OUStringBuffer sTmp(comphelper::string::remove(sText, 0xad)); for (sal_Int32 i = 0; i < sTmp.getLength(); ++i) { if (sTmp[i] < 0x20) @@ -211,7 +211,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) else if (sTmp[i] == 0x2011) sTmp[i] = '-'; } - sTxt = sTmp.makeStringAndClear(); + sText = sTmp.makeStringAndClear(); } } } @@ -223,11 +223,11 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) SvtSecurityOptions aSecOpts; bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK ); - sTxt = ": " + sTxt; + sText = ": " + sText; if ( !bExecHyperlinks ) - sTxt = SwViewShell::GetShellRes()->aLinkCtrlClick + sTxt; + sText = SwViewShell::GetShellRes()->aLinkCtrlClick + sText; else - sTxt = SwViewShell::GetShellRes()->aLinkClick + sTxt; + sText = SwViewShell::GetShellRes()->aLinkClick + sText; } break; } @@ -238,47 +238,47 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) OUString aModStr( aModifiedCode.GetName() ); aModStr = aModStr.replaceFirst(aCode.GetName(), OUString()); aModStr = aModStr.replaceAll("+", OUString()); - sTxt = SW_RESSTR(STR_SMARTTAG_CLICK).replaceAll("%s", aModStr); + sText = SW_RESSTR(STR_SMARTTAG_CLICK).replaceAll("%s", aModStr); } break; case SwContentAtPos::SW_FTN: - if( aCntntAtPos.pFndTxtAttr && aCntntAtPos.aFnd.pAttr ) + if( aContentAtPos.pFndTextAttr && aContentAtPos.aFnd.pAttr ) { - const SwFmtFtn* pFtn = static_cast<const SwFmtFtn*>(aCntntAtPos.aFnd.pAttr); + const SwFormatFootnote* pFootnote = static_cast<const SwFormatFootnote*>(aContentAtPos.aFnd.pAttr); OUString sTmp; - pFtn->GetFtnText( sTmp ); - sTxt = SW_RESSTR( pFtn->IsEndNote() + pFootnote->GetFootnoteText( sTmp ); + sText = SW_RESSTR( pFootnote->IsEndNote() ? STR_ENDNOTE : STR_FTNNOTE ) + sTmp; bBalloon = true; - if( aCntntAtPos.IsInRTLText() ) + if( aContentAtPos.IsInRTLText() ) nStyle |= QuickHelpFlags::BiDiRtl; } break; case SwContentAtPos::SW_REDLINE: - sTxt = lcl_GetRedlineHelp(*aCntntAtPos.aFnd.pRedl, bBalloon); + sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon); break; case SwContentAtPos::SW_TOXMARK: - sTxt = aCntntAtPos.sStr; - if( !sTxt.isEmpty() && aCntntAtPos.pFndTxtAttr ) + sText = aContentAtPos.sStr; + if( !sText.isEmpty() && aContentAtPos.pFndTextAttr ) { - const SwTOXType* pTType = aCntntAtPos.pFndTxtAttr-> + const SwTOXType* pTType = aContentAtPos.pFndTextAttr-> GetTOXMark().GetTOXType(); if( pTType && !pTType->GetTypeName().isEmpty() ) { - sTxt = ": " + sTxt; - sTxt = pTType->GetTypeName() + sTxt; + sText = ": " + sText; + sText = pTType->GetTypeName() + sText; } } break; case SwContentAtPos::SW_REFMARK: - if(aCntntAtPos.aFnd.pAttr) + if(aContentAtPos.aFnd.pAttr) { - sTxt = SW_RESSTR(STR_CONTENT_TYPE_SINGLE_REFERENCE); - sTxt += ": "; - sTxt += static_cast<const SwFmtRefMark*>(aCntntAtPos.aFnd.pAttr)->GetRefName(); + sText = SW_RESSTR(STR_CONTENT_TYPE_SINGLE_REFERENCE); + sText += ": "; + sText += static_cast<const SwFormatRefMark*>(aContentAtPos.aFnd.pAttr)->GetRefName(); } break; @@ -287,17 +287,17 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); if(!pModOpt->IsHideFieldTips()) { - const SwField* pFld = aCntntAtPos.aFnd.pFld; - switch( pFld->Which() ) + const SwField* pField = aContentAtPos.aFnd.pField; + switch( pField->Which() ) { case RES_SETEXPFLD: case RES_TABLEFLD: case RES_GETEXPFLD: { - sal_uInt16 nOldSubType = pFld->GetSubType(); - const_cast<SwField*>(pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD); - sTxt = pFld->ExpandField(true); - const_cast<SwField*>(pFld)->SetSubType(nOldSubType); + sal_uInt16 nOldSubType = pField->GetSubType(); + const_cast<SwField*>(pField)->SetSubType(nsSwExtendedSubType::SUB_CMD); + sText = pField->ExpandField(true); + const_cast<SwField*>(pField)->SetSubType(nOldSubType); } break; @@ -309,45 +309,45 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) bBalloon = true; /* no break */ case RES_JUMPEDITFLD: - sTxt = pFld->GetPar2(); + sText = pField->GetPar2(); break; case RES_DBFLD: - sTxt = pFld->GetFieldName(); + sText = pField->GetFieldName(); break; case RES_USERFLD: case RES_HIDDENTXTFLD: - sTxt = pFld->GetPar1(); + sText = pField->GetPar1(); break; case RES_DOCSTATFLD: break; case RES_MACROFLD: - sTxt = static_cast<const SwMacroField*>(pFld)->GetMacro(); + sText = static_cast<const SwMacroField*>(pField)->GetMacro(); break; case RES_GETREFFLD: { // #i85090# - const SwGetRefField* pRefFld( dynamic_cast<const SwGetRefField*>(pFld) ); - OSL_ENSURE( pRefFld, - "<SwEditWin::RequestHelp(..)> - unexpected type of <pFld>" ); - if ( pRefFld ) + const SwGetRefField* pRefField( dynamic_cast<const SwGetRefField*>(pField) ); + OSL_ENSURE( pRefField, + "<SwEditWin::RequestHelp(..)> - unexpected type of <pField>" ); + if ( pRefField ) { - if ( pRefFld->IsRefToHeadingCrossRefBookmark() || - pRefFld->IsRefToNumItemCrossRefBookmark() ) + if ( pRefField->IsRefToHeadingCrossRefBookmark() || + pRefField->IsRefToNumItemCrossRefBookmark() ) { - sTxt = pRefFld->GetExpandedTxtOfReferencedTxtNode(); - if ( sTxt.getLength() > 80 ) + sText = pRefField->GetExpandedTextOfReferencedTextNode(); + if ( sText.getLength() > 80 ) { - sTxt = sTxt.copy(0, 80) + "..."; + sText = sText.copy(0, 80) + "..."; } } else { - sTxt = static_cast<const SwGetRefField*>(pFld)->GetSetRefName(); + sText = static_cast<const SwGetRefField*>(pField)->GetSetRefName(); } } } @@ -355,30 +355,30 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } } - if( sTxt.isEmpty() ) + if( sText.isEmpty() ) { - aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE; - if( rSh.GetContentAtPos( aPos, aCntntAtPos, false, &aFldRect ) ) - sTxt = lcl_GetRedlineHelp(*aCntntAtPos.aFnd.pRedl, bBalloon); + aContentAtPos.eContentAtPos = SwContentAtPos::SW_REDLINE; + if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) ) + sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon); } } } - if (!sTxt.isEmpty()) + if (!sText.isEmpty()) { if( bBalloon ) - Help::ShowBalloon( this, rEvt.GetMousePosPixel(), sTxt ); + Help::ShowBalloon( this, rEvt.GetMousePosPixel(), sText ); else { // the show the help - Rectangle aRect( aFldRect.SVRect() ); + Rectangle aRect( aFieldRect.SVRect() ); Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() ))); aRect.Left() = aPt.X(); aRect.Top() = aPt.Y(); aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() )); aRect.Right() = aPt.X(); aRect.Bottom() = aPt.Y(); - OUString sDisplayTxt(ClipLongToolTip(sTxt)); - Help::ShowQuickHelp(this, aRect, sDisplayTxt, nStyle); + OUString sDisplayText(ClipLongToolTip(sText)); + Help::ShowQuickHelp(this, aRect, sDisplayText, nStyle); } } @@ -417,11 +417,11 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } if(nTabRes) { - sTxt = SW_RESSTR(nTabRes); - Size aTxtSize( GetTextWidth(sTxt), GetTextHeight()); - Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize); - OUString sDisplayTxt(ClipLongToolTip(sTxt)); - Help::ShowQuickHelp(this, aRect, sDisplayTxt); + sText = SW_RESSTR(nTabRes); + Size aTextSize( GetTextWidth(sText), GetTextHeight()); + Rectangle aRect(rEvt.GetMousePosPixel(), aTextSize); + OUString sDisplayText(ClipLongToolTip(sText)); + Help::ShowQuickHelp(this, aRect, sDisplayText); } bContinue = false; } diff --git a/sw/source/uibase/docvw/edtwin3.cxx b/sw/source/uibase/docvw/edtwin3.cxx index 0f7fc2a24ba9..2d7502a51ba8 100644 --- a/sw/source/uibase/docvw/edtwin3.cxx +++ b/sw/source/uibase/docvw/edtwin3.cxx @@ -101,10 +101,10 @@ bool SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt, return !rRuler.StartDocDrag( rMEvt, RULER_TYPE_INDENT); } -TblChgMode GetTblChgDefaultMode() +TableChgMode GetTableChgDefaultMode() { SwModuleOptions* pOpt = SW_MOD()->GetModuleConfig(); - return pOpt ? pOpt->GetTblMode() : TBLVAR_CHGABS; + return pOpt ? pOpt->GetTableMode() : TBLVAR_CHGABS; } void RepaintPagePreview( SwViewShell* pVwSh, const SwRect& rRect ) diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx index 2c037ffaf4bb..dd4193bec003 100644 --- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx +++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx @@ -93,7 +93,7 @@ SwFrmSidebarWinContainer::~SwFrmSidebarWinContainer() } bool SwFrmSidebarWinContainer::insert( const SwFrm& rFrm, - const SwFmtFld& rFmtFld, + const SwFormatField& rFormatField, SwSidebarWin& rSidebarWin ) { bool bInserted( false ); @@ -101,7 +101,7 @@ bool SwFrmSidebarWinContainer::insert( const SwFrm& rFrm, FrmKey aFrmKey( &rFrm ); SidebarWinContainer& rSidebarWinContainer = (*mpFrmSidebarWinContainer)[ aFrmKey ]; - SidebarWinKey aSidebarWinKey( rFmtFld.GetTxtFld()->GetStart() ); + SidebarWinKey aSidebarWinKey( rFormatField.GetTextField()->GetStart() ); if ( rSidebarWinContainer.empty() || rSidebarWinContainer.find( aSidebarWinKey) == rSidebarWinContainer.end() ) { diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.hxx b/sw/source/uibase/docvw/frmsidebarwincontainer.hxx index fc7834c7e932..59aa0df6cebf 100644 --- a/sw/source/uibase/docvw/frmsidebarwincontainer.hxx +++ b/sw/source/uibase/docvw/frmsidebarwincontainer.hxx @@ -23,7 +23,7 @@ #include <vector> class SwFrm; -class SwFmtFld; +class SwFormatField; namespace vcl { class Window; } namespace sw { namespace sidebarwindows { @@ -38,7 +38,7 @@ class SwFrmSidebarWinContainer ~SwFrmSidebarWinContainer(); bool insert( const SwFrm& rFrm, - const SwFmtFld& rFmtFld, + const SwFormatField& rFormatField, SwSidebarWin& rSidebarWin ); bool remove( const SwFrm& rFrm, diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index a4d51ae14ceb..77c0adc07063 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -93,13 +93,13 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : rSh.IsURLGrfAtPos( rDocPos, &sURL, &sTargetFrameName, &sDescription ); if ( sURL.isEmpty() ) { - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR ); - if( rSh.GetContentAtPos( rDocPos, aCntntAtPos, false)) + SwContentAtPos aContentAtPos( SwContentAtPos::SW_INETATTR ); + if( rSh.GetContentAtPos( rDocPos, aContentAtPos, false)) { - const SwFmtINetFmt &rIItem = *static_cast<const SwFmtINetFmt*>(aCntntAtPos.aFnd.pAttr); + const SwFormatINetFormat &rIItem = *static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr); sURL = rIItem.GetValue(); sTargetFrameName = rIItem.GetTargetFrame(); - sDescription = aCntntAtPos.sStr; + sDescription = aContentAtPos.sStr; } } @@ -113,12 +113,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : else { aGraphic = *pGrf; - const SwFrmFmt* pGrfFmt = rSh.GetFmtFromObj( rDocPos ); + const SwFrameFormat* pGrfFormat = rSh.GetFormatFromObj( rDocPos ); const SfxPoolItem* pURLItem; - if( pGrfFmt && SfxItemState::SET == pGrfFmt->GetItemState( + if( pGrfFormat && SfxItemState::SET == pGrfFormat->GetItemState( RES_URL, true, &pURLItem )) { - const SwFmtURL& rURL = *static_cast<const SwFmtURL*>(pURLItem); + const SwFormatURL& rURL = *static_cast<const SwFormatURL*>(pURLItem); if( rURL.GetMap() ) pImageMap = new ImageMap( *rURL.GetMap() ); else if( !rURL.GetURL().isEmpty() ) diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 80308ff785b5..a205c1515e9a 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -138,19 +138,19 @@ static const sal_uInt16 VF_USR_COUNT = 2; // { 0, nsSwExtendedSubType::SUB_CMD } static const sal_uInt16 VF_DB_COUNT = 1; // { nsSwExtendedSubType::SUB_OWN_FMT } // field types and subtypes -struct SwFldPack +struct SwFieldPack { sal_uInt16 nTypeId; sal_uInt16 nSubTypeStart; sal_uInt16 nSubTypeEnd; - sal_uLong nFmtBegin; - sal_uLong nFmtEnd; + sal_uLong nFormatBegin; + sal_uLong nFormatEnd; }; // strings and formats -static const SwFldPack aSwFlds[] = +static const SwFieldPack aSwFields[] = { // Document { TYP_EXTUSERFLD, FLD_EU_BEGIN, FLD_EU_END, 0, 0 }, @@ -213,25 +213,25 @@ static SwWrtShell* lcl_GetShell() return 0; } -inline sal_uInt16 GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); } +inline sal_uInt16 GetPackCount() { return sizeof(aSwFields) / sizeof(SwFieldPack); } // FieldManager controls inserting and updating of fields -SwFldMgr::SwFldMgr(SwWrtShell* pSh ) : +SwFieldMgr::SwFieldMgr(SwWrtShell* pSh ) : pModule(0), pMacroItem(0), pWrtShell(pSh), bEvalExp(true) { // determine current field if existing - GetCurFld(); + GetCurField(); } -SwFldMgr::~SwFldMgr() +SwFieldMgr::~SwFieldMgr() { } // organise RefMark by names -bool SwFldMgr::CanInsertRefMark( const OUString& rStr ) +bool SwFieldMgr::CanInsertRefMark( const OUString& rStr ) { bool bRet = false; SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell(); @@ -250,60 +250,60 @@ bool SwFldMgr::CanInsertRefMark( const OUString& rStr ) } // access over ResIds -void SwFldMgr::RemoveFldType(sal_uInt16 nResId, const OUString& rName ) +void SwFieldMgr::RemoveFieldType(sal_uInt16 nResId, const OUString& rName ) { SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); if( pSh ) - pSh->RemoveFldType(nResId, rName); + pSh->RemoveFieldType(nResId, rName); } -sal_uInt16 SwFldMgr::GetFldTypeCount(sal_uInt16 nResId) const +sal_uInt16 SwFieldMgr::GetFieldTypeCount(sal_uInt16 nResId) const { SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); - return pSh ? pSh->GetFldTypeCount(nResId) : 0; + return pSh ? pSh->GetFieldTypeCount(nResId) : 0; } -SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, sal_uInt16 nId) const +SwFieldType* SwFieldMgr::GetFieldType(sal_uInt16 nResId, sal_uInt16 nId) const { SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); - return pSh ? pSh->GetFldType(nId, nResId) : 0; + return pSh ? pSh->GetFieldType(nId, nResId) : 0; } -SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, const OUString& rName) const +SwFieldType* SwFieldMgr::GetFieldType(sal_uInt16 nResId, const OUString& rName) const { SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); - return pSh ? pSh->GetFldType(nResId, rName) : 0; + return pSh ? pSh->GetFieldType(nResId, rName) : 0; } // determine current field -SwField* SwFldMgr::GetCurFld() +SwField* SwFieldMgr::GetCurField() { SwWrtShell *pSh = pWrtShell ? pWrtShell : ::lcl_GetShell(); if ( pSh ) - pCurFld = pSh->GetCurFld( true ); + pCurField = pSh->GetCurField( true ); else - pCurFld = NULL; + pCurField = NULL; // initialise strings and format aCurPar1.clear(); aCurPar2.clear(); sCurFrame.clear(); - nCurFmt = 0; + nCurFormat = 0; - if(!pCurFld) + if(!pCurField) return 0; // preprocess current values; determine parameter 1 and parameter 2 // as well as the format - const sal_uInt16 nTypeId = pCurFld->GetTypeId(); + const sal_uInt16 nTypeId = pCurField->GetTypeId(); - nCurFmt = pCurFld->GetFormat(); - aCurPar1 = pCurFld->GetPar1(); - aCurPar2 = pCurFld->GetPar2(); + nCurFormat = pCurField->GetFormat(); + aCurPar1 = pCurField->GetPar1(); + aCurPar2 = pCurField->GetPar2(); switch( nTypeId ) { @@ -311,17 +311,17 @@ SwField* SwFldMgr::GetCurFld() case TYP_NEXTPAGEFLD: case TYP_PREVPAGEFLD: case TYP_GETREFPAGEFLD: - if( nCurFmt == SVX_NUM_PAGEDESC ) - nCurFmt -= 2; + if( nCurFormat == SVX_NUM_PAGEDESC ) + nCurFormat -= 2; break; } - return pCurFld; + return pCurField; } // provide group range -const SwFldGroupRgn& SwFldMgr::GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId) +const SwFieldGroupRgn& SwFieldMgr::GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId) { -static SwFldGroupRgn const aRanges[] = +static SwFieldGroupRgn const aRanges[] = { { /* Document */ GRP_DOC_BEGIN, GRP_DOC_END }, { /* Functions */ GRP_FKT_BEGIN, GRP_FKT_END }, @@ -330,7 +330,7 @@ static SwFldGroupRgn const aRanges[] = { /* Database */ GRP_DB_BEGIN, GRP_DB_END }, { /* User */ GRP_VAR_BEGIN, GRP_VAR_END } }; -static SwFldGroupRgn const aWebRanges[] = +static SwFieldGroupRgn const aWebRanges[] = { { /* Document */ GRP_WEB_DOC_BEGIN, GRP_WEB_DOC_END }, { /* Functions */ GRP_WEB_FKT_BEGIN, GRP_WEB_FKT_END }, @@ -347,7 +347,7 @@ static SwFldGroupRgn const aWebRanges[] = } // determine GroupId -sal_uInt16 SwFldMgr::GetGroup(bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType) +sal_uInt16 SwFieldMgr::GetGroup(bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType) { if (nTypeId == TYP_SETINPFLD) nTypeId = TYP_SETFLD; @@ -363,10 +363,10 @@ sal_uInt16 SwFldMgr::GetGroup(bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSu for (sal_uInt16 i = GRP_DOC; i <= GRP_VAR; i++) { - const SwFldGroupRgn& rRange = GetGroupRange(bHtmlMode, i); + const SwFieldGroupRgn& rRange = GetGroupRange(bHtmlMode, i); for (sal_uInt16 nPos = rRange.nStart; nPos < rRange.nEnd; nPos++) { - if (aSwFlds[nPos].nTypeId == nTypeId) + if (aSwFields[nPos].nTypeId == nTypeId) return i; } } @@ -375,35 +375,35 @@ sal_uInt16 SwFldMgr::GetGroup(bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSu // determine names to TypeId // ACCESS over TYP_.... -sal_uInt16 SwFldMgr::GetTypeId(sal_uInt16 nPos) +sal_uInt16 SwFieldMgr::GetTypeId(sal_uInt16 nPos) { OSL_ENSURE(nPos < ::GetPackCount(), "forbidden Pos"); - return aSwFlds[ nPos ].nTypeId; + return aSwFields[ nPos ].nTypeId; } -OUString SwFldMgr::GetTypeStr(sal_uInt16 nPos) +OUString SwFieldMgr::GetTypeStr(sal_uInt16 nPos) { OSL_ENSURE(nPos < ::GetPackCount(), "forbidden TypeId"); - sal_uInt16 nFldWh = aSwFlds[ nPos ].nTypeId; + sal_uInt16 nFieldWh = aSwFields[ nPos ].nTypeId; // special treatment for date/time fields (without var/fix) - if( TYP_DATEFLD == nFldWh ) + if( TYP_DATEFLD == nFieldWh ) { static OUString g_aDate( SW_RES( STR_DATEFLD ) ); return g_aDate; } - if( TYP_TIMEFLD == nFldWh ) + if( TYP_TIMEFLD == nFieldWh ) { static OUString g_aTime( SW_RES( STR_TIMEFLD ) ); return g_aTime; } - return SwFieldType::GetTypeStr( nFldWh ); + return SwFieldType::GetTypeStr( nFieldWh ); } // determine Pos in the list -sal_uInt16 SwFldMgr::GetPos(sal_uInt16 nTypeId) +sal_uInt16 SwFieldMgr::GetPos(sal_uInt16 nTypeId) { switch( nTypeId ) { @@ -414,14 +414,14 @@ sal_uInt16 SwFldMgr::GetPos(sal_uInt16 nTypeId) } for(sal_uInt16 i = 0; i < GetPackCount(); i++) - if(aSwFlds[i].nTypeId == nTypeId) + if(aSwFields[i].nTypeId == nTypeId) return i; return USHRT_MAX; } // localise subtypes of a field -bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) +bool SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) { bool bRet = false; SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell(); @@ -445,7 +445,7 @@ bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) } case TYP_INPUTFLD: { - rToFill.push_back(SW_RES(aSwFlds[nPos].nSubTypeStart)); + rToFill.push_back(SW_RES(aSwFields[nPos].nSubTypeStart)); // move on at generic types } case TYP_DDEFLD: @@ -456,31 +456,31 @@ bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) case TYP_USERFLD: { - const sal_uInt16 nCount = pSh->GetFldTypeCount(); + const sal_uInt16 nCount = pSh->GetFieldTypeCount(); for(sal_uInt16 i = 0; i < nCount; ++i) { - SwFieldType* pFldType = pSh->GetFldType( i ); - const sal_uInt16 nWhich = pFldType->Which(); + SwFieldType* pFieldType = pSh->GetFieldType( i ); + const sal_uInt16 nWhich = pFieldType->Which(); - if((nTypeId == TYP_DDEFLD && pFldType->Which() == RES_DDEFLD) || + if((nTypeId == TYP_DDEFLD && pFieldType->Which() == RES_DDEFLD) || (nTypeId == TYP_USERFLD && nWhich == RES_USERFLD) || (nTypeId == TYP_GETFLD && nWhich == RES_SETEXPFLD && - !(static_cast<SwSetExpFieldType*>(pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || + !(static_cast<SwSetExpFieldType*>(pFieldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || (nTypeId == TYP_SETFLD && nWhich == RES_SETEXPFLD && - !(static_cast<SwSetExpFieldType*>(pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || + !(static_cast<SwSetExpFieldType*>(pFieldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || (nTypeId == TYP_SEQFLD && nWhich == RES_SETEXPFLD && - (static_cast<SwSetExpFieldType*>(pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || + (static_cast<SwSetExpFieldType*>(pFieldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) && (nWhich == RES_USERFLD || (nWhich == RES_SETEXPFLD && - !(static_cast<SwSetExpFieldType*>(pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ))) ) ) + !(static_cast<SwSetExpFieldType*>(pFieldType)->GetType() & nsSwGetSetExpType::GSE_SEQ))) ) ) { - rToFill.push_back(pFldType->GetName()); + rToFill.push_back(pFieldType->GetName()); } } break; @@ -500,7 +500,7 @@ bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) if (nTypeId == TYP_DOCINFOFLD) nCount = DI_SUBTYPE_END - DI_SUBTYPE_BEGIN; else - nCount = aSwFlds[nPos].nSubTypeEnd - aSwFlds[nPos].nSubTypeStart; + nCount = aSwFields[nPos].nSubTypeEnd - aSwFields[nPos].nSubTypeStart; for(sal_uInt16 i = 0; i < nCount; ++i) { @@ -513,7 +513,7 @@ bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) sNew = SwViewShell::GetShellRes()->aDocInfoLst[i]; } else - sNew = SW_RES(aSwFlds[nPos].nSubTypeStart + i); + sNew = SW_RES(aSwFields[nPos].nSubTypeStart + i); rToFill.push_back(sNew); } @@ -527,7 +527,7 @@ bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) // determine format // ACCESS over TYP_.... -sal_uInt16 SwFldMgr::GetFormatCount(sal_uInt16 nTypeId, bool bIsText, bool bHtmlMode) const +sal_uInt16 SwFieldMgr::GetFormatCount(sal_uInt16 nTypeId, bool bIsText, bool bHtmlMode) const { OSL_ENSURE(nTypeId < TYP_END, "forbidden TypeId"); { @@ -536,8 +536,8 @@ sal_uInt16 SwFldMgr::GetFormatCount(sal_uInt16 nTypeId, bool bIsText, bool bHtml if(nPos == USHRT_MAX || (bHtmlMode && nTypeId == TYP_SETFLD)) return 0; - sal_uLong nStart = aSwFlds[nPos].nFmtBegin; - sal_uLong nEnd = aSwFlds[nPos].nFmtEnd; + sal_uLong nStart = aSwFields[nPos].nFormatBegin; + sal_uLong nEnd = aSwFields[nPos].nFormatEnd; if (bIsText && nEnd - nStart >= 2) return 2; @@ -579,7 +579,7 @@ sal_uInt16 SwFldMgr::GetFormatCount(sal_uInt16 nTypeId, bool bIsText, bool bHtml } // determine FormatString to a type -OUString SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const +OUString SwFieldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const { OSL_ENSURE(nTypeId < TYP_END, "forbidden TypeId"); const sal_uInt16 nPos = GetPos(nTypeId); @@ -589,12 +589,12 @@ OUString SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const sal_uLong nStart; - nStart = aSwFlds[nPos].nFmtBegin; + nStart = aSwFields[nPos].nFormatBegin; if (TYP_AUTHORFLD == nTypeId|| TYP_FILENAMEFLD == nTypeId) nFormatId &= ~FF_FIXED; // mask out Fixed-Flag - if((nStart + nFormatId) < aSwFlds[nPos].nFmtEnd) + if((nStart + nFormatId) < aSwFields[nPos].nFormatEnd) return SW_RES((sal_uInt16)(nStart + nFormatId)); OUString aRet; @@ -607,7 +607,7 @@ OUString SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const Sequence<sal_Int16> aTypes = xNumberingInfo->getSupportedNumberingTypes(); const sal_Int16* pTypes = aTypes.getConstArray(); - sal_Int32 nOffset = aSwFlds[nPos].nFmtEnd - nStart; + sal_Int32 nOffset = aSwFields[nPos].nFormatEnd - nStart; sal_Int32 nValidEntry = 0; for(sal_Int32 nType = 0; nType < aTypes.getLength(); nType++) { @@ -637,13 +637,13 @@ OUString SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const } // determine FormatId from Pseudo-ID -sal_uInt16 SwFldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const +sal_uInt16 SwFieldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const { sal_uInt16 nId = (sal_uInt16)nFormatId; switch( nTypeId ) { case TYP_DOCINFOFLD: - switch( aSwFlds[ GetPos( nTypeId ) ].nFmtBegin + nFormatId ) + switch( aSwFields[ GetPos( nTypeId ) ].nFormatBegin + nFormatId ) { case FMT_REG_AUTHOR: nId = DI_SUB_AUTHOR; break; case FMT_REG_TIME: nId = DI_SUB_TIME; break; @@ -660,8 +660,8 @@ sal_uInt16 SwFldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const case TYP_GETREFPAGEFLD: { sal_uInt16 nPos = GetPos( nTypeId ); - sal_uLong nBegin = aSwFlds[ nPos ].nFmtBegin; - sal_uLong nEnd = aSwFlds[nPos].nFmtEnd; + sal_uLong nBegin = aSwFields[ nPos ].nFormatBegin; + sal_uLong nEnd = aSwFields[nPos].nFormatEnd; if((nBegin + nFormatId) < nEnd) { switch( nBegin + nFormatId ) @@ -700,7 +700,7 @@ sal_uInt16 SwFldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const } break; case TYP_DDEFLD: - switch ( aSwFlds[ GetPos( nTypeId ) ].nFmtBegin + nFormatId ) + switch ( aSwFields[ GetPos( nTypeId ) ].nFormatBegin + nFormatId ) { case FMT_DDE_NORMAL: nId = static_cast<sal_uInt16>(SfxLinkUpdateMode::ONCALL); break; case FMT_DDE_HOT: nId = static_cast<sal_uInt16>(SfxLinkUpdateMode::ALWAYS); break; @@ -713,52 +713,52 @@ sal_uInt16 SwFldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const } // Traveling -bool SwFldMgr::GoNextPrev( bool bNext, SwFieldType* pTyp ) +bool SwFieldMgr::GoNextPrev( bool bNext, SwFieldType* pTyp ) { SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell(); if(!pSh) return false; - if( !pTyp && pCurFld ) + if( !pTyp && pCurField ) { - const sal_uInt16 nTypeId = pCurFld->GetTypeId(); + const sal_uInt16 nTypeId = pCurField->GetTypeId(); if( TYP_SETINPFLD == nTypeId || TYP_USRINPFLD == nTypeId ) - pTyp = pSh->GetFldType( 0, RES_INPUTFLD ); + pTyp = pSh->GetFieldType( 0, RES_INPUTFLD ); else - pTyp = pCurFld->GetTyp(); + pTyp = pCurField->GetTyp(); } if (pTyp && pTyp->Which() == RES_DBFLD) { // for fieldcommand-edit (hop to all DB fields) - return pSh->MoveFldType( 0, bNext, RES_DBFLD ); + return pSh->MoveFieldType( 0, bNext, RES_DBFLD ); } - return pTyp && pSh && pSh->MoveFldType( pTyp, bNext ); + return pTyp && pSh && pSh->MoveFieldType( pTyp, bNext ); } // insert field types -void SwFldMgr::InsertFldType(SwFieldType& rType) +void SwFieldMgr::InsertFieldType(SwFieldType& rType) { SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); if(pSh) - pSh->InsertFldType(rType); + pSh->InsertFieldType(rType); } // determine current TypeId -sal_uInt16 SwFldMgr::GetCurTypeId() const +sal_uInt16 SwFieldMgr::GetCurTypeId() const { - return pCurFld ? pCurFld->GetTypeId() : USHRT_MAX; + return pCurField ? pCurField->GetTypeId() : USHRT_MAX; } // Over string insert field or update -bool SwFldMgr::InsertFld( - const SwInsertFld_Data& rData) +bool SwFieldMgr::InsertField( + const SwInsertField_Data& rData) { - SwField* pFld = 0; + SwField* pField = 0; bool bExp = false; - bool bTbl = false; + bool bTable = false; bool bPageVar = false; sal_uLong nFormatId = rData.m_nFormatId; sal_uInt16 nSubType = rData.m_nSubType; @@ -775,7 +775,7 @@ bool SwFldMgr::InsertFld( case TYP_POSTITFLD: { SvtUserOptions aUserOpt; - SwPostItFieldType* pType = static_cast<SwPostItFieldType*>(pCurShell->GetFldType(0, RES_POSTITFLD)); + SwPostItFieldType* pType = static_cast<SwPostItFieldType*>(pCurShell->GetFieldType(0, RES_POSTITFLD)); SwPostItField* pPostItField = new SwPostItField( pType, @@ -784,36 +784,36 @@ bool SwFldMgr::InsertFld( aUserOpt.GetID(), // author's initials OUString(), // name DateTime(DateTime::SYSTEM) ); - pFld = pPostItField; + pField = pPostItField; } break; case TYP_SCRIPTFLD: { SwScriptFieldType* pType = - static_cast<SwScriptFieldType*>(pCurShell->GetFldType(0, RES_SCRIPTFLD)); - pFld = new SwScriptField(pType, rData.m_sPar1, rData.m_sPar2, (bool)nFormatId); + static_cast<SwScriptFieldType*>(pCurShell->GetFieldType(0, RES_SCRIPTFLD)); + pField = new SwScriptField(pType, rData.m_sPar1, rData.m_sPar2, (bool)nFormatId); break; } case TYP_COMBINED_CHARS: { SwCombinedCharFieldType* pType = static_cast<SwCombinedCharFieldType*>( - pCurShell->GetFldType( 0, RES_COMBINED_CHARS )); - pFld = new SwCombinedCharField( pType, rData.m_sPar1 ); + pCurShell->GetFieldType( 0, RES_COMBINED_CHARS )); + pField = new SwCombinedCharField( pType, rData.m_sPar1 ); } break; case TYP_AUTHORITY: { SwAuthorityFieldType* pType = - static_cast<SwAuthorityFieldType*>(pCurShell->GetFldType(0, RES_AUTHORITY)); + static_cast<SwAuthorityFieldType*>(pCurShell->GetFieldType(0, RES_AUTHORITY)); if (!pType) { SwAuthorityFieldType const type(pCurShell->GetDoc()); pType = static_cast<SwAuthorityFieldType*>( - pCurShell->InsertFldType(type)); + pCurShell->InsertFieldType(type)); } - pFld = new SwAuthorityField(pType, rData.m_sPar1); + pField = new SwAuthorityField(pType, rData.m_sPar1); } break; @@ -824,25 +824,25 @@ bool SwFldMgr::InsertFld( nSub |= nSubType == DATE_VAR ? 0 : FIXEDFLD; SwDateTimeFieldType* pTyp = - static_cast<SwDateTimeFieldType*>( pCurShell->GetFldType(0, RES_DATETIMEFLD) ); - pFld = new SwDateTimeField(pTyp, nSub, nFormatId); - pFld->SetPar2(rData.m_sPar2); + static_cast<SwDateTimeFieldType*>( pCurShell->GetFieldType(0, RES_DATETIMEFLD) ); + pField = new SwDateTimeField(pTyp, nSub, nFormatId); + pField->SetPar2(rData.m_sPar2); break; } case TYP_FILENAMEFLD: { SwFileNameFieldType* pTyp = - static_cast<SwFileNameFieldType*>( pCurShell->GetFldType(0, RES_FILENAMEFLD) ); - pFld = new SwFileNameField(pTyp, nFormatId); + static_cast<SwFileNameFieldType*>( pCurShell->GetFieldType(0, RES_FILENAMEFLD) ); + pField = new SwFileNameField(pTyp, nFormatId); break; } case TYP_TEMPLNAMEFLD: { SwTemplNameFieldType* pTyp = - static_cast<SwTemplNameFieldType*>( pCurShell->GetFldType(0, RES_TEMPLNAMEFLD) ); - pFld = new SwTemplNameField(pTyp, nFormatId); + static_cast<SwTemplNameFieldType*>( pCurShell->GetFieldType(0, RES_TEMPLNAMEFLD) ); + pField = new SwTemplNameField(pTyp, nFormatId); break; } @@ -850,12 +850,12 @@ bool SwFldMgr::InsertFld( { sal_uInt16 nByte = (sal_uInt16)rData.m_sPar2.toInt32(); SwChapterFieldType* pTyp = - static_cast<SwChapterFieldType*>( pCurShell->GetFldType(0, RES_CHAPTERFLD) ); - pFld = new SwChapterField(pTyp, nFormatId); + static_cast<SwChapterFieldType*>( pCurShell->GetFieldType(0, RES_CHAPTERFLD) ); + pField = new SwChapterField(pTyp, nFormatId); nByte = std::max(sal_uInt16(1), nByte); nByte = std::min(nByte, sal_uInt16(MAXLEVEL)); nByte -= 1; - static_cast<SwChapterField*>(pFld)->SetLevel((sal_uInt8)nByte); + static_cast<SwChapterField*>(pField)->SetLevel((sal_uInt8)nByte); break; } @@ -885,37 +885,37 @@ bool SwFldMgr::InsertFld( nSubType = PG_RANDOM; SwPageNumberFieldType* pTyp = - static_cast<SwPageNumberFieldType*>( pCurShell->GetFldType(0, RES_PAGENUMBERFLD) ); - pFld = new SwPageNumberField(pTyp, nSubType, nFormatId, nOff); + static_cast<SwPageNumberFieldType*>( pCurShell->GetFieldType(0, RES_PAGENUMBERFLD) ); + pField = new SwPageNumberField(pTyp, nSubType, nFormatId, nOff); if( SVX_NUM_CHAR_SPECIAL == nFormatId && ( PG_PREV == nSubType || PG_NEXT == nSubType ) ) - static_cast<SwPageNumberField*>(pFld)->SetUserString( rData.m_sPar2 ); + static_cast<SwPageNumberField*>(pField)->SetUserString( rData.m_sPar2 ); break; } case TYP_DOCSTATFLD: { SwDocStatFieldType* pTyp = - static_cast<SwDocStatFieldType*>( pCurShell->GetFldType(0, RES_DOCSTATFLD) ); - pFld = new SwDocStatField(pTyp, nSubType, nFormatId); + static_cast<SwDocStatFieldType*>( pCurShell->GetFieldType(0, RES_DOCSTATFLD) ); + pField = new SwDocStatField(pTyp, nSubType, nFormatId); break; } case TYP_AUTHORFLD: { SwAuthorFieldType* pTyp = - static_cast<SwAuthorFieldType*>( pCurShell->GetFldType(0, RES_AUTHORFLD) ); - pFld = new SwAuthorField(pTyp, nFormatId); + static_cast<SwAuthorFieldType*>( pCurShell->GetFieldType(0, RES_AUTHORFLD) ); + pField = new SwAuthorField(pTyp, nFormatId); break; } case TYP_CONDTXTFLD: case TYP_HIDDENTXTFLD: { - SwHiddenTxtFieldType* pTyp = - static_cast<SwHiddenTxtFieldType*>( pCurShell->GetFldType(0, RES_HIDDENTXTFLD) ); - pFld = new SwHiddenTxtField(pTyp, true, rData.m_sPar1, rData.m_sPar2, false, rData.m_nTypeId); + SwHiddenTextFieldType* pTyp = + static_cast<SwHiddenTextFieldType*>( pCurShell->GetFieldType(0, RES_HIDDENTXTFLD) ); + pField = new SwHiddenTextField(pTyp, true, rData.m_sPar1, rData.m_sPar2, false, rData.m_nTypeId); bExp = true; break; } @@ -923,8 +923,8 @@ bool SwFldMgr::InsertFld( case TYP_HIDDENPARAFLD: { SwHiddenParaFieldType* pTyp = - static_cast<SwHiddenParaFieldType*>( pCurShell->GetFldType(0, RES_HIDDENPARAFLD) ); - pFld = new SwHiddenParaField(pTyp, rData.m_sPar1); + static_cast<SwHiddenParaFieldType*>( pCurShell->GetFieldType(0, RES_HIDDENPARAFLD) ); + pField = new SwHiddenParaField(pTyp, rData.m_sPar1); bExp = true; break; } @@ -933,7 +933,7 @@ bool SwFldMgr::InsertFld( { if( !rData.m_sPar1.isEmpty() && CanInsertRefMark( rData.m_sPar1 ) ) { - pCurShell->SetAttrItem( SwFmtRefMark( rData.m_sPar1 ) ); + pCurShell->SetAttrItem( SwFormatRefMark( rData.m_sPar1 ) ); return true; } return false; @@ -942,9 +942,9 @@ bool SwFldMgr::InsertFld( case TYP_GETREFFLD: { SwGetRefFieldType* pTyp = - static_cast<SwGetRefFieldType*>( pCurShell->GetFldType(0, RES_GETREFFLD) ); + static_cast<SwGetRefFieldType*>( pCurShell->GetFieldType(0, RES_GETREFFLD) ); sal_uInt16 nSeqNo = (sal_uInt16)rData.m_sPar2.toInt32(); - pFld = new SwGetRefField(pTyp, rData.m_sPar1, nSubType, nSeqNo, nFormatId); + pField = new SwGetRefField(pTyp, rData.m_sPar1, nSubType, nSeqNo, nFormatId); bExp = true; break; } @@ -961,51 +961,51 @@ bool SwFldMgr::InsertFld( } SwDDEFieldType aType( rData.m_sPar1, sCmd, static_cast<SfxLinkUpdateMode>(nFormatId) ); - SwDDEFieldType* pTyp = static_cast<SwDDEFieldType*>( pCurShell->InsertFldType( aType ) ); - pFld = new SwDDEField( pTyp ); + SwDDEFieldType* pTyp = static_cast<SwDDEFieldType*>( pCurShell->InsertFieldType( aType ) ); + pField = new SwDDEField( pTyp ); break; } case TYP_MACROFLD: { SwMacroFieldType* pTyp = - static_cast<SwMacroFieldType*>(pCurShell->GetFldType(0, RES_MACROFLD)); + static_cast<SwMacroFieldType*>(pCurShell->GetFieldType(0, RES_MACROFLD)); - pFld = new SwMacroField(pTyp, rData.m_sPar1, rData.m_sPar2); + pField = new SwMacroField(pTyp, rData.m_sPar1, rData.m_sPar2); break; } case TYP_INTERNETFLD: { - SwFmtINetFmt aFmt( rData.m_sPar1, sCurFrame ); + SwFormatINetFormat aFormat( rData.m_sPar1, sCurFrame ); if( pMacroItem ) - aFmt.SetMacroTbl( &pMacroItem->GetMacroTable() ); - return pCurShell->InsertURL( aFmt, rData.m_sPar2 ); + aFormat.SetMacroTable( &pMacroItem->GetMacroTable() ); + return pCurShell->InsertURL( aFormat, rData.m_sPar2 ); } case TYP_JUMPEDITFLD: { SwJumpEditFieldType* pTyp = - static_cast<SwJumpEditFieldType*>(pCurShell->GetFldType(0, RES_JUMPEDITFLD)); + static_cast<SwJumpEditFieldType*>(pCurShell->GetFieldType(0, RES_JUMPEDITFLD)); - pFld = new SwJumpEditField(pTyp, nFormatId, rData.m_sPar1, rData.m_sPar2); + pField = new SwJumpEditField(pTyp, nFormatId, rData.m_sPar1, rData.m_sPar2); break; } case TYP_DOCINFOFLD: { - SwDocInfoFieldType* pTyp = static_cast<SwDocInfoFieldType*>( pCurShell->GetFldType( + SwDocInfoFieldType* pTyp = static_cast<SwDocInfoFieldType*>( pCurShell->GetFieldType( 0, RES_DOCINFOFLD ) ); - pFld = new SwDocInfoField(pTyp, nSubType, rData.m_sPar1, nFormatId); + pField = new SwDocInfoField(pTyp, nSubType, rData.m_sPar1, nFormatId); break; } case TYP_EXTUSERFLD: { - SwExtUserFieldType* pTyp = static_cast<SwExtUserFieldType*>( pCurShell->GetFldType( + SwExtUserFieldType* pTyp = static_cast<SwExtUserFieldType*>( pCurShell->GetFieldType( 0, RES_EXTUSERFLD) ); - pFld = new SwExtUserField(pTyp, nSubType, nFormatId); + pField = new SwExtUserField(pTyp, nSubType, nFormatId); break; } @@ -1031,10 +1031,10 @@ bool SwFldMgr::InsertFld( if(!aDBData.sDataSource.isEmpty() && pCurShell->GetDBData() != aDBData) pCurShell->ChgDBData(aDBData); - SwDBFieldType* pTyp = static_cast<SwDBFieldType*>(pCurShell->InsertFldType( + SwDBFieldType* pTyp = static_cast<SwDBFieldType*>(pCurShell->InsertFieldType( SwDBFieldType(pCurShell->GetDoc(), sPar1, aDBData) ) ); - pFld = new SwDBField(pTyp); - pFld->SetSubType(nSubType); + pField = new SwDBField(pTyp); + pField->SetSubType(nSubType); if( !(nSubType & nsSwExtendedSubType::SUB_OWN_FMT) ) // determinee database format { @@ -1046,15 +1046,15 @@ bool SwFldMgr::InsertFld( rData.m_aDBColumn >>= xColumn; if(xColumn.is()) { - nFormatId = SwDBManager::GetColumnFmt(xSource, xConnection, xColumn, + nFormatId = SwDBManager::GetColumnFormat(xSource, xConnection, xColumn, pCurShell->GetNumberFormatter(), GetCurrLanguage() ); } else - nFormatId = pCurShell->GetDBManager()->GetColumnFmt( + nFormatId = pCurShell->GetDBManager()->GetColumnFormat( aDBData.sDataSource, aDBData.sCommand, sPar1, pCurShell->GetNumberFormatter(), GetCurrLanguage() ); } - pFld->ChangeFormat( nFormatId ); + pField->ChangeFormat( nFormatId ); bExp = true; #endif @@ -1105,32 +1105,32 @@ bool SwFldMgr::InsertFld( case TYP_DBNAMEFLD: { SwDBNameFieldType* pTyp = - static_cast<SwDBNameFieldType*>(pCurShell->GetFldType(0, RES_DBNAMEFLD)); - pFld = new SwDBNameField(pTyp, aDBData); + static_cast<SwDBNameFieldType*>(pCurShell->GetFieldType(0, RES_DBNAMEFLD)); + pField = new SwDBNameField(pTyp, aDBData); break; } case TYP_DBNEXTSETFLD: { - SwDBNextSetFieldType* pTyp = static_cast<SwDBNextSetFieldType*>(pCurShell->GetFldType( + SwDBNextSetFieldType* pTyp = static_cast<SwDBNextSetFieldType*>(pCurShell->GetFieldType( 0, RES_DBNEXTSETFLD) ); - pFld = new SwDBNextSetField(pTyp, sPar1, rData.m_sPar2, aDBData); + pField = new SwDBNextSetField(pTyp, sPar1, rData.m_sPar2, aDBData); bExp = true; break; } case TYP_DBNUMSETFLD: { - SwDBNumSetFieldType* pTyp = static_cast<SwDBNumSetFieldType*>( pCurShell->GetFldType( + SwDBNumSetFieldType* pTyp = static_cast<SwDBNumSetFieldType*>( pCurShell->GetFieldType( 0, RES_DBNUMSETFLD) ); - pFld = new SwDBNumSetField( pTyp, sPar1, rData.m_sPar2, aDBData); + pField = new SwDBNumSetField( pTyp, sPar1, rData.m_sPar2, aDBData); bExp = true; break; } case TYP_DBSETNUMBERFLD: { SwDBSetNumberFieldType* pTyp = static_cast<SwDBSetNumberFieldType*>( - pCurShell->GetFldType(0, RES_DBSETNUMBERFLD) ); - pFld = new SwDBSetNumberField( pTyp, aDBData, nFormatId); + pCurShell->GetFieldType(0, RES_DBSETNUMBERFLD) ); + pField = new SwDBSetNumberField( pTyp, aDBData, nFormatId); bExp = true; break; } @@ -1142,20 +1142,20 @@ bool SwFldMgr::InsertFld( case TYP_USERFLD: { SwUserFieldType* pTyp = - static_cast<SwUserFieldType*>( pCurShell->GetFldType(RES_USERFLD, rData.m_sPar1) ); + static_cast<SwUserFieldType*>( pCurShell->GetFieldType(RES_USERFLD, rData.m_sPar1) ); // only if existing if(!pTyp) { - pTyp = static_cast<SwUserFieldType*>( pCurShell->InsertFldType( + pTyp = static_cast<SwUserFieldType*>( pCurShell->InsertFieldType( SwUserFieldType(pCurShell->GetDoc(), rData.m_sPar1)) ); } if (pTyp->GetContent(nFormatId) != rData.m_sPar2) pTyp->SetContent(rData.m_sPar2, nFormatId); - pFld = new SwUserField(pTyp, 0, nFormatId); - if (pFld->GetSubType() != nSubType) - pFld->SetSubType(nSubType); - bTbl = true; + pField = new SwUserField(pTyp, 0, nFormatId); + if (pField->GetSubType() != nSubType) + pField->SetSubType(nSubType); + bTable = true; break; } @@ -1164,22 +1164,22 @@ bool SwFldMgr::InsertFld( if ((nSubType & 0x00ff) == INP_VAR) { SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>( - pCurShell->GetFldType(RES_SETEXPFLD, rData.m_sPar1) ); + pCurShell->GetFieldType(RES_SETEXPFLD, rData.m_sPar1) ); // no Experssion Type with this name existing -> create if(pTyp) { - SwSetExpField* pExpFld = + SwSetExpField* pExpField = new SwSetExpField(pTyp, OUString(), nFormatId); // Don't change type of SwSetExpFieldType: - sal_uInt16 nOldSubType = pExpFld->GetSubType(); - pExpFld->SetSubType(nOldSubType | (nSubType & 0xff00)); + sal_uInt16 nOldSubType = pExpField->GetSubType(); + pExpField->SetSubType(nOldSubType | (nSubType & 0xff00)); - pExpFld->SetPromptText(rData.m_sPar2); - pExpFld->SetInputFlag(true) ; + pExpField->SetPromptText(rData.m_sPar2); + pExpField->SetInputFlag(true) ; bExp = true; - pFld = pExpFld; + pField = pExpField; } else return false; @@ -1187,15 +1187,15 @@ bool SwFldMgr::InsertFld( else { SwInputFieldType* pTyp = - static_cast<SwInputFieldType*>( pCurShell->GetFldType(0, RES_INPUTFLD) ); + static_cast<SwInputFieldType*>( pCurShell->GetFieldType(0, RES_INPUTFLD) ); - SwInputField* pInpFld = + SwInputField* pInpField = new SwInputField( pTyp, rData.m_sPar1, rData.m_sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId); - pFld = pInpFld; + pField = pInpField; } // start dialog - pCurShell->StartInputFldDlg(pFld, false, rData.m_pParent); + pCurShell->StartInputFieldDlg(pField, false, rData.m_pParent); break; } @@ -1204,20 +1204,20 @@ bool SwFldMgr::InsertFld( if (rData.m_sPar2.isEmpty()) // empty variables are not allowed return false; - SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>( pCurShell->InsertFldType( + SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>( pCurShell->InsertFieldType( SwSetExpFieldType(pCurShell->GetDoc(), rData.m_sPar1) ) ); - SwSetExpField* pExpFld = new SwSetExpField( pTyp, rData.m_sPar2, nFormatId); - pExpFld->SetSubType(nSubType); - pExpFld->SetPar2(rData.m_sPar2); + SwSetExpField* pExpField = new SwSetExpField( pTyp, rData.m_sPar2, nFormatId); + pExpField->SetSubType(nSubType); + pExpField->SetPar2(rData.m_sPar2); bExp = true; - pFld = pExpFld; + pField = pExpField; break; } case TYP_SEQFLD: { - SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>( pCurShell->InsertFldType( + SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>( pCurShell->InsertFieldType( SwSetExpFieldType(pCurShell->GetDoc(), rData.m_sPar1, nsSwGetSetExpType::GSE_SEQ))); sal_uInt8 nLevel = static_cast< sal_uInt8 >(nSubType & 0xff); @@ -1227,9 +1227,9 @@ bool SwFldMgr::InsertFld( cSeparator = '.'; pTyp->SetDelimiter(OUString(cSeparator)); - SwSetExpField* pExpFld = new SwSetExpField(pTyp, rData.m_sPar2, nFormatId); + SwSetExpField* pExpField = new SwSetExpField(pTyp, rData.m_sPar2, nFormatId); bExp = true; - pFld = pExpFld; + pField = pExpField; nSubType = nsSwGetSetExpType::GSE_SEQ; break; } @@ -1238,14 +1238,14 @@ bool SwFldMgr::InsertFld( { // is there a corresponding SetField SwSetExpFieldType* pSetTyp = static_cast<SwSetExpFieldType*>( - pCurShell->GetFldType(RES_SETEXPFLD, rData.m_sPar1)); + pCurShell->GetFieldType(RES_SETEXPFLD, rData.m_sPar1)); if(pSetTyp) { - SwGetExpFieldType* pTyp = static_cast<SwGetExpFieldType*>( pCurShell->GetFldType( + SwGetExpFieldType* pTyp = static_cast<SwGetExpFieldType*>( pCurShell->GetFieldType( 0, RES_GETEXPFLD) ); - pFld = new SwGetExpField(pTyp, rData.m_sPar1, pSetTyp->GetType(), nFormatId); - pFld->SetSubType(nSubType | pSetTyp->GetType()); + pField = new SwGetExpField(pTyp, rData.m_sPar1, pSetTyp->GetType(), nFormatId); + pField->SetSubType(nSubType | pSetTyp->GetType()); bExp = true; } else @@ -1272,14 +1272,14 @@ bool SwFldMgr::InsertFld( SfxItemSet aBoxSet( pCurShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); - OUString sFml(comphelper::string::stripStart(rData.m_sPar2, ' ')); - if ( sFml.startsWith("=") ) + OUString sFormula(comphelper::string::stripStart(rData.m_sPar2, ' ')); + if ( sFormula.startsWith("=") ) { - sFml = sFml.copy(1); + sFormula = sFormula.copy(1); } - aBoxSet.Put( SwTblBoxFormula( sFml )); - pCurShell->SetTblBoxFormulaAttrs( aBoxSet ); + aBoxSet.Put( SwTableBoxFormula( sFormula )); + pCurShell->SetTableBoxFormulaAttrs( aBoxSet ); pCurShell->UpdateTable(); pCurShell->EndAllAction(); @@ -1289,35 +1289,35 @@ bool SwFldMgr::InsertFld( else { SwGetExpFieldType* pTyp = static_cast<SwGetExpFieldType*>( - pCurShell->GetFldType(0, RES_GETEXPFLD) ); - pFld = new SwGetExpField(pTyp, rData.m_sPar2, nsSwGetSetExpType::GSE_FORMULA, nFormatId); - pFld->SetSubType(nSubType); + pCurShell->GetFieldType(0, RES_GETEXPFLD) ); + pField = new SwGetExpField(pTyp, rData.m_sPar2, nsSwGetSetExpType::GSE_FORMULA, nFormatId); + pField->SetSubType(nSubType); bExp = true; } break; } case TYP_SETREFPAGEFLD: - pFld = new SwRefPageSetField( static_cast<SwRefPageSetFieldType*>( - pCurShell->GetFldType( 0, RES_REFPAGESETFLD ) ), + pField = new SwRefPageSetField( static_cast<SwRefPageSetFieldType*>( + pCurShell->GetFieldType( 0, RES_REFPAGESETFLD ) ), (short)rData.m_sPar2.toInt32(), 0 != nSubType ); bPageVar = true; break; case TYP_GETREFPAGEFLD: - pFld = new SwRefPageGetField( static_cast<SwRefPageGetFieldType*>( - pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ) ), nFormatId ); + pField = new SwRefPageGetField( static_cast<SwRefPageGetFieldType*>( + pCurShell->GetFieldType( 0, RES_REFPAGEGETFLD ) ), nFormatId ); bPageVar = true; break; case TYP_DROPDOWN : { - pFld = new SwDropDownField(pCurShell->GetFldType( 0, RES_DROPDOWN )); + pField = new SwDropDownField(pCurShell->GetFieldType( 0, RES_DROPDOWN )); const sal_Int32 nTokenCount = comphelper::string::getTokenCount(rData.m_sPar2, DB_DELIM); Sequence<OUString> aEntries(nTokenCount); OUString* pArray = aEntries.getArray(); for(sal_Int32 nToken = 0; nToken < nTokenCount; nToken++) pArray[nToken] = rData.m_sPar2.getToken(nToken, DB_DELIM); - static_cast<SwDropDownField*>(pFld)->SetItems(aEntries); - static_cast<SwDropDownField*>(pFld)->SetName(rData.m_sPar1); + static_cast<SwDropDownField*>(pField)->SetItems(aEntries); + static_cast<SwDropDownField*>(pField)->SetName(rData.m_sPar1); } break; default: @@ -1325,62 +1325,62 @@ bool SwFldMgr::InsertFld( return false; } } - OSL_ENSURE(pFld, "field not available"); + OSL_ENSURE(pField, "field not available"); //the auto language flag has to be set prior to the language! - pFld->SetAutomaticLanguage(rData.m_bIsAutomaticLanguage); + pField->SetAutomaticLanguage(rData.m_bIsAutomaticLanguage); sal_uInt16 nLang = GetCurrLanguage(); - pFld->SetLanguage(nLang); + pField->SetLanguage(nLang); // insert pCurShell->StartAllAction(); - pCurShell->Insert( *pFld ); + pCurShell->Insert( *pField ); if(bExp && bEvalExp) - pCurShell->UpdateExpFlds(true); + pCurShell->UpdateExpFields(true); - if(bTbl) + if(bTable) { pCurShell->Left(CRSR_SKIP_CHARS, false, 1, false ); - pCurShell->UpdateFlds(*pFld); + pCurShell->UpdateFields(*pField); pCurShell->Right(CRSR_SKIP_CHARS, false, 1, false ); } else if( bPageVar ) - static_cast<SwRefPageGetFieldType*>(pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ))->UpdateFlds(); + static_cast<SwRefPageGetFieldType*>(pCurShell->GetFieldType( 0, RES_REFPAGEGETFLD ))->UpdateFields(); else if( TYP_GETREFFLD == rData.m_nTypeId ) - pFld->GetTyp()->ModifyNotification( 0, 0 ); + pField->GetTyp()->ModifyNotification( 0, 0 ); // delete temporary field - delete pFld; + delete pField; pCurShell->EndAllAction(); return true; } // fields update -void SwFldMgr::UpdateCurFld(sal_uLong nFormat, +void SwFieldMgr::UpdateCurField(sal_uLong nFormat, const OUString& rPar1, const OUString& rPar2, - SwField * _pTmpFld) // #111840# + SwField * _pTmpField) // #111840# { // change format - OSL_ENSURE(pCurFld, "no field at CursorPos"); + OSL_ENSURE(pCurField, "no field at CursorPos"); bool bDelete = false; - SwField *pTmpFld; // mb: fixed memory leak - if (NULL != _pTmpFld) + SwField *pTmpField; // mb: fixed memory leak + if (NULL != _pTmpField) { - pTmpFld = _pTmpFld; + pTmpField = _pTmpField; } else { - pTmpFld = pCurFld->CopyField(); + pTmpField = pCurField->CopyField(); bDelete = true; } - SwFieldType* pType = pTmpFld->GetTyp(); - const sal_uInt16 nTypeId = pTmpFld->GetTypeId(); + SwFieldType* pType = pTmpField->GetTyp(); + const sal_uInt16 nTypeId = pTmpField->GetTypeId(); SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); @@ -1415,19 +1415,19 @@ void SwFldMgr::UpdateCurFld(sal_uLong nFormat, nByte = std::max(sal_uInt16(1), nByte); nByte = std::min(nByte, sal_uInt16(MAXLEVEL)); nByte -= 1; - static_cast<SwChapterField*>(pTmpFld)->SetLevel((sal_uInt8)nByte); + static_cast<SwChapterField*>(pTmpField)->SetLevel((sal_uInt8)nByte); bSetPar2 = false; break; } case TYP_SCRIPTFLD: - static_cast<SwScriptField*>(pTmpFld)->SetCodeURL((bool)nFormat); + static_cast<SwScriptField*>(pTmpField)->SetCodeURL((bool)nFormat); break; case TYP_NEXTPAGEFLD: if( SVX_NUM_CHAR_SPECIAL == nFormat ) { - static_cast<SwPageNumberField*>(pCurFld)->SetUserString( sPar2 ); + static_cast<SwPageNumberField*>(pCurField)->SetUserString( sPar2 ); sPar2 = "1"; } else @@ -1443,7 +1443,7 @@ void SwFldMgr::UpdateCurFld(sal_uLong nFormat, case TYP_PREVPAGEFLD: if( SVX_NUM_CHAR_SPECIAL == nFormat ) { - static_cast<SwPageNumberField*>(pCurFld)->SetUserString( sPar2 ); + static_cast<SwPageNumberField*>(pCurField)->SetUserString( sPar2 ); sPar2 = "-1"; } else @@ -1465,10 +1465,10 @@ void SwFldMgr::UpdateCurFld(sal_uLong nFormat, case TYP_GETREFFLD: { bSetPar2 = false; - static_cast<SwGetRefField*>(pTmpFld)->SetSubType( (sal_uInt16)rPar2.toInt32() ); + static_cast<SwGetRefField*>(pTmpField)->SetSubType( (sal_uInt16)rPar2.toInt32() ); const sal_Int32 nPos = rPar2.indexOf( '|' ); if( nPos>=0 ) - static_cast<SwGetRefField*>(pTmpFld)->SetSeqNo( (sal_uInt16)rPar2.copy( nPos + 1 ).toInt32()); + static_cast<SwGetRefField*>(pTmpField)->SetSeqNo( (sal_uInt16)rPar2.copy( nPos + 1 ).toInt32()); } break; case TYP_DROPDOWN: @@ -1478,15 +1478,15 @@ void SwFldMgr::UpdateCurFld(sal_uLong nFormat, OUString* pArray = aEntries.getArray(); for(sal_Int32 nToken = 0; nToken < nTokenCount; nToken++) pArray[nToken] = sPar2.getToken(nToken, DB_DELIM); - static_cast<SwDropDownField*>(pTmpFld)->SetItems(aEntries); - static_cast<SwDropDownField*>(pTmpFld)->SetName(sPar1); + static_cast<SwDropDownField*>(pTmpField)->SetItems(aEntries); + static_cast<SwDropDownField*>(pTmpField)->SetName(sPar1); bSetPar1 = bSetPar2 = false; } break; case TYP_AUTHORITY : { //#i99069# changes to a bibliography field should change the field type - SwAuthorityField* pAuthorityField = static_cast<SwAuthorityField*>(pTmpFld); + SwAuthorityField* pAuthorityField = static_cast<SwAuthorityField*>(pTmpField); SwAuthorityFieldType* pAuthorityType = static_cast<SwAuthorityFieldType*>(pType); SwAuthEntry aTempEntry; for( sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i ) @@ -1494,7 +1494,7 @@ void SwFldMgr::UpdateCurFld(sal_uLong nFormat, rPar1.getToken( i, TOX_STYLE_DELIMITER )); if( pAuthorityType->ChangeEntryContent( &aTempEntry ) ) { - pType->UpdateFlds(); + pType->UpdateFields(); pSh->SetModified(); } @@ -1508,35 +1508,35 @@ void SwFldMgr::UpdateCurFld(sal_uLong nFormat, // set format // setup format before SetPar2 because of NumberFormatter! - pTmpFld->ChangeFormat(nFormat); + pTmpField->ChangeFormat(nFormat); if(bSetPar1) - pTmpFld->SetPar1( sPar1 ); + pTmpField->SetPar1( sPar1 ); if( bSetPar2 ) - pTmpFld->SetPar2( sPar2 ); + pTmpField->SetPar2( sPar2 ); // kick off update if(nTypeId == TYP_DDEFLD || nTypeId == TYP_USERFLD || nTypeId == TYP_USRINPFLD) { - pType->UpdateFlds(); + pType->UpdateFields(); pSh->SetModified(); } else { // mb: #32157 - pSh->SwEditShell::UpdateFlds(*pTmpFld); - GetCurFld(); + pSh->SwEditShell::UpdateFields(*pTmpField); + GetCurField(); } if (bDelete) - delete pTmpFld; + delete pTmpField; pSh->EndAllAction(); } // explicitly evaluate ExpressionFields -void SwFldMgr::EvalExpFlds(SwWrtShell* pSh) +void SwFieldMgr::EvalExpFields(SwWrtShell* pSh) { if (pSh == NULL) pSh = pWrtShell ? pWrtShell : ::lcl_GetShell(); @@ -1544,11 +1544,11 @@ void SwFldMgr::EvalExpFlds(SwWrtShell* pSh) if(pSh) { pSh->StartAllAction(); - pSh->UpdateExpFlds(true); + pSh->UpdateExpFields(true); pSh->EndAllAction(); } } -sal_uInt16 SwFldMgr::GetCurrLanguage() const +sal_uInt16 SwFieldMgr::GetCurrLanguage() const { SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell(); if( pSh ) @@ -1556,9 +1556,9 @@ sal_uInt16 SwFldMgr::GetCurrLanguage() const return SvtSysLocale().GetLanguageTag().getLanguageType(); } -void SwFieldType::_GetFldName() +void SwFieldType::_GetFieldName() { - static const sal_uInt16 coFldNms[] = { + static const sal_uInt16 coFieldNms[] = { FLD_DATE_STD, FLD_TIME_STD, STR_FILENAMEFLD, @@ -1606,16 +1606,16 @@ void SwFieldType::_GetFldName() }; // insert infos for fields - SwFieldType::s_pFldNames = new std::vector<OUString>; - SwFieldType::s_pFldNames->reserve(SAL_N_ELEMENTS(coFldNms)); - for( sal_uInt16 nIdx = 0; nIdx < SAL_N_ELEMENTS(coFldNms); ++nIdx ) + SwFieldType::s_pFieldNames = new std::vector<OUString>; + SwFieldType::s_pFieldNames->reserve(SAL_N_ELEMENTS(coFieldNms)); + for( sal_uInt16 nIdx = 0; nIdx < SAL_N_ELEMENTS(coFieldNms); ++nIdx ) { - const OUString aTmp(SW_RES( coFldNms[ nIdx ] )); - SwFieldType::s_pFldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp )); + const OUString aTmp(SW_RES( coFieldNms[ nIdx ] )); + SwFieldType::s_pFieldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp )); } } -bool SwFldMgr::ChooseMacro(const OUString&) +bool SwFieldMgr::ChooseMacro(const OUString&) { bool bRet = false; @@ -1632,7 +1632,7 @@ bool SwFldMgr::ChooseMacro(const OUString&) return bRet; } -void SwFldMgr::SetMacroPath(const OUString& rPath) +void SwFieldMgr::SetMacroPath(const OUString& rPath) { sMacroPath = rPath; sMacroName = rPath; @@ -1655,7 +1655,7 @@ void SwFldMgr::SetMacroPath(const OUString& rPath) } } -sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberFormatter* pFormatter, double* pVal) +sal_uLong SwFieldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberFormatter* pFormatter, double* pVal) { double fValue; short nDefFormat; @@ -1672,10 +1672,10 @@ sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberF tools::Time aTime( tools::Time::SYSTEM ); - sal_uLong nNumFmtTime = (sal_uLong)aTime.GetSec() + (sal_uLong)aTime.GetMin() * 60L + + sal_uLong nNumFormatTime = (sal_uLong)aTime.GetSec() + (sal_uLong)aTime.GetMin() * 60L + (sal_uLong)aTime.GetHour() * 3600L; - fValue += (double)nNumFmtTime / 86400.0; + fValue += (double)nNumFormatTime / 86400.0; nDefFormat = (nTypeId == TYP_DATEFLD) ? css::util::NumberFormat::DATE : css::util::NumberFormat::TIME; } @@ -1701,13 +1701,13 @@ sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberF return pFormatter->GetStandardFormat(nDefFormat, GetCurrLanguage()); } -Reference<XNumberingTypeInfo> SwFldMgr::GetNumberingInfo() const +Reference<XNumberingTypeInfo> SwFieldMgr::GetNumberingInfo() const { if(!xNumberingInfo.is()) { Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); Reference<XDefaultNumberingProvider> xDefNum = text::DefaultNumberingProvider::create(xContext); - const_cast<SwFldMgr*>(this)->xNumberingInfo = Reference<XNumberingTypeInfo>(xDefNum, UNO_QUERY); + const_cast<SwFieldMgr*>(this)->xNumberingInfo = Reference<XNumberingTypeInfo>(xDefNum, UNO_QUERY); } return xNumberingInfo; } diff --git a/sw/source/uibase/fldui/fldwrap.cxx b/sw/source/uibase/fldui/fldwrap.cxx index a027814fa755..3573174dfc01 100644 --- a/sw/source/uibase/fldui/fldwrap.cxx +++ b/sw/source/uibase/fldui/fldwrap.cxx @@ -35,7 +35,7 @@ #include <globals.hrc> #include "swabstdlg.hxx" -SFX_IMPL_CHILDWINDOW_WITHID(SwFldDlgWrapper, FN_INSERT_FIELD) +SFX_IMPL_CHILDWINDOW_WITHID(SwFieldDlgWrapper, FN_INSERT_FIELD) SwChildWinWrapper::SwChildWinWrapper(vcl::Window *pParentWindow, sal_uInt16 nId) : SfxChildWindow(pParentWindow, nId), @@ -67,21 +67,21 @@ bool SwChildWinWrapper::ReInitDlg(SwDocShell *) return bRet; } -SfxChildWinInfo SwFldDlgWrapper::GetInfo() const +SfxChildWinInfo SwFieldDlgWrapper::GetInfo() const { SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); aInfo.aPos = GetWindow()->OutputToAbsoluteScreenPixel(aInfo.aPos); return aInfo; } -SwFldDlgWrapper::SwFldDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, +SwFieldDlgWrapper::SwFieldDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* pB, SfxChildWinInfo* ) : SwChildWinWrapper( _pParent, nId ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact && "SwAbstractDialogFactory fail!"); - AbstractSwFldDlg* pDlg = pFact->CreateSwFldDlg(pB, this, _pParent); + AbstractSwFieldDlg* pDlg = pFact->CreateSwFieldDlg(pB, this, _pParent); assert(pDlg && "Dialog creation failed!"); pDlgInterface = pDlg; pWindow = pDlg->GetWindow(); @@ -90,7 +90,7 @@ SwFldDlgWrapper::SwFldDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, } // newly initialise dialog after Doc switch -bool SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh) +bool SwFieldDlgWrapper::ReInitDlg(SwDocShell *pDocSh) { bool bRet; @@ -102,14 +102,14 @@ bool SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh) return bRet; } -void SwFldDlgWrapper::ShowReferencePage() +void SwFieldDlgWrapper::ShowReferencePage() { pDlgInterface->ShowReferencePage(); } -SFX_IMPL_CHILDWINDOW(SwFldDataOnlyDlgWrapper, FN_INSERT_FIELD_DATA_ONLY) +SFX_IMPL_CHILDWINDOW(SwFieldDataOnlyDlgWrapper, FN_INSERT_FIELD_DATA_ONLY) -SfxChildWinInfo SwFldDataOnlyDlgWrapper::GetInfo() const +SfxChildWinInfo SwFieldDataOnlyDlgWrapper::GetInfo() const { SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); // prevent instatiation of dialog other than by calling @@ -118,7 +118,7 @@ SfxChildWinInfo SwFldDataOnlyDlgWrapper::GetInfo() const return aInfo; } -SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, +SwFieldDataOnlyDlgWrapper::SwFieldDataOnlyDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* pB, SfxChildWinInfo* pInfo ) : SwChildWinWrapper( _pParent, nId ) @@ -126,7 +126,7 @@ SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( vcl::Window* _pParent, sal_uIn SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwFldDlg* pDlg = pFact->CreateSwFldDlg(pB, this, _pParent); + AbstractSwFieldDlg* pDlg = pFact->CreateSwFieldDlg(pB, this, _pParent); OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlgInterface = pDlg; @@ -138,7 +138,7 @@ SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( vcl::Window* _pParent, sal_uIn } // re-init after doc activation -bool SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh) +bool SwFieldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh) { bool bRet; if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh))) // update immediately, Doc switch diff --git a/sw/source/uibase/fldui/xfldui.cxx b/sw/source/uibase/fldui/xfldui.cxx index adc4f9cb91b0..5bf5b738ac9f 100644 --- a/sw/source/uibase/fldui/xfldui.cxx +++ b/sw/source/uibase/fldui/xfldui.cxx @@ -47,8 +47,8 @@ using namespace ::com::sun::star::beans; // Is the database field numeric? // remark: in case of error true is returned -bool SwFldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTblQryName, - bool bIsTable, const OUString& rFldName) +bool SwFieldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTableQryName, + bool bIsTable, const OUString& rFieldName) { bool bNumeric = true; @@ -68,11 +68,11 @@ bool SwFldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTblQryName Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY); if(xTSupplier.is()) { - Reference<XNameAccess> xTbls = xTSupplier->getTables(); - OSL_ENSURE(xTbls->hasByName(rTblQryName), "table not available anymore?"); + Reference<XNameAccess> xTables = xTSupplier->getTables(); + OSL_ENSURE(xTables->hasByName(rTableQryName), "table not available anymore?"); try { - Any aTable = xTbls->getByName(rTblQryName); + Any aTable = xTables->getByName(rTableQryName); Reference<XPropertySet> xPropSet; aTable >>= xPropSet; xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY); @@ -88,10 +88,10 @@ bool SwFldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTblQryName if(xQSupplier.is()) { Reference<XNameAccess> xQueries = xQSupplier->getQueries(); - OSL_ENSURE(xQueries->hasByName(rTblQryName), "table not available anymore?"); + OSL_ENSURE(xQueries->hasByName(rTableQryName), "table not available anymore?"); try { - Any aQuery = xQueries->getByName(rTblQryName); + Any aQuery = xQueries->getByName(rTableQryName); Reference<XPropertySet> xPropSet; aQuery >>= xPropSet; xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY); @@ -113,9 +113,9 @@ bool SwFldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTblQryName { OSL_FAIL("Exception in getColumns()"); } - if(xCols.is() && xCols->hasByName(rFldName)) + if(xCols.is() && xCols->hasByName(rFieldName)) { - Any aCol = xCols->getByName(rFldName); + Any aCol = xCols->getByName(rFieldName); Reference <XPropertySet> xCol; aCol >>= xCol; Any aType = xCol->getPropertyValue("Type"); diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index 397d5fb55dfe..de12203c955b 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -425,7 +425,7 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectan } } -void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol) +void SwColumnOnlyExample::SetColumns(const SwFormatCol& rCol) { m_aCols = rCol; sal_uInt16 nWishSum = m_aCols.GetWishWidth(); diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx index 3f040b844358..12773f181ce6 100644 --- a/sw/source/uibase/frmdlg/colmgr.cxx +++ b/sw/source/uibase/frmdlg/colmgr.cxx @@ -27,7 +27,7 @@ // private methods // set column width to current width -void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth) +void FitToActualSize(SwFormatCol& rCol, sal_uInt16 nWidth) { const sal_uInt16 nCount = rCol.GetColumns().size(); for(sal_uInt16 i = 0; i < nCount; ++i) @@ -43,20 +43,20 @@ void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth) // set column quantity and Gutterwidth void SwColMgr::SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth) { - aFmtCol.Init(nCount, nGutterWidth, nWidth); - aFmtCol.SetWishWidth(nWidth); - aFmtCol.SetGutterWidth(nGutterWidth, nWidth); + aFormatCol.Init(nCount, nGutterWidth, nWidth); + aFormatCol.SetWishWidth(nWidth); + aFormatCol.SetGutterWidth(nGutterWidth, nWidth); } sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const { sal_uInt16 nRet; if(nPos == USHRT_MAX ) - nRet = GetCount() > 1 ? aFmtCol.GetGutterWidth() : DEF_GUTTER_WIDTH; + nRet = GetCount() > 1 ? aFormatCol.GetGutterWidth() : DEF_GUTTER_WIDTH; else { OSL_ENSURE(nPos < GetCount() - 1, "Spalte ueberindiziert" ); - const SwColumns& rCols = aFmtCol.GetColumns(); + const SwColumns& rCols = aFormatCol.GetColumns(); nRet = rCols[nPos].GetRight() + rCols[nPos + 1].GetLeft(); } return nRet; @@ -65,11 +65,11 @@ sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos ) { if(nPos == USHRT_MAX) - aFmtCol.SetGutterWidth(nGutterWidth, nWidth); + aFormatCol.SetGutterWidth(nGutterWidth, nWidth); else { OSL_ENSURE(nPos < GetCount() - 1, "Spalte ueberindiziert" ); - SwColumns& rCols = aFmtCol.GetColumns(); + SwColumns& rCols = aFormatCol.GetColumns(); sal_uInt16 nGutterWidth2 = nGutterWidth / 2; rCols[nPos].SetRight(nGutterWidth2); rCols[nPos + 1].SetLeft(nGutterWidth2); @@ -79,25 +79,25 @@ void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos ) // height separation line short SwColMgr::GetLineHeightPercent() const { - return (short)aFmtCol.GetLineHeight(); + return (short)aFormatCol.GetLineHeight(); } void SwColMgr::SetLineHeightPercent(short nPercent) { OSL_ENSURE(nPercent <= 100, "line height may be at most 100%"); - aFmtCol.SetLineHeight((sal_uInt8)nPercent); + aFormatCol.SetLineHeight((sal_uInt8)nPercent); } // column width sal_uInt16 SwColMgr::GetColWidth(sal_uInt16 nIdx) const { OSL_ENSURE(nIdx < GetCount(), "Spaltenarray ueberindiziert."); - return aFmtCol.CalcPrtColWidth(nIdx, nWidth); + return aFormatCol.CalcPrtColWidth(nIdx, nWidth); } void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd) { OSL_ENSURE(nIdx < GetCount(), "Spaltenarray ueberindiziert."); - aFmtCol.GetColumns()[nIdx].SetWishWidth(nWd); + aFormatCol.GetColumns()[nIdx].SetWishWidth(nWd); } @@ -105,24 +105,24 @@ void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd) void SwColMgr::SetActualWidth(sal_uInt16 nW) { nWidth = nW; - ::FitToActualSize(aFmtCol, nW); + ::FitToActualSize(aFormatCol, nW); } // ctor SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) : - aFmtCol(static_cast<const SwFmtCol&>(rSet.Get(RES_COL))), + aFormatCol(static_cast<const SwFormatCol&>(rSet.Get(RES_COL))), nWidth(nActWidth) { if(nWidth == USHRT_MAX) { - nWidth = (sal_uInt16)static_cast<const SwFmtFrmSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth(); + nWidth = (sal_uInt16)static_cast<const SwFormatFrmSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth(); if (nWidth < MINLAY) nWidth = USHRT_MAX; const SvxLRSpaceItem &rLR = static_cast<const SvxLRSpaceItem&>(rSet.Get(RES_LR_SPACE)); nWidth = nWidth - (sal_uInt16)rLR.GetLeft(); nWidth = nWidth - (sal_uInt16)rLR.GetRight(); } - ::FitToActualSize(aFmtCol, nWidth); + ::FitToActualSize(aFormatCol, nWidth); } SwColMgr::~SwColMgr() @@ -131,9 +131,9 @@ SwColMgr::~SwColMgr() void SwColMgr::SetLineWidthAndColor(::editeng::SvxBorderStyle eStyle, sal_uLong nLWidth, const Color& rCol) { - aFmtCol.SetLineStyle(eStyle); - aFmtCol.SetLineWidth(nLWidth); - aFmtCol.SetLineColor(rCol); + aFormatCol.SetLineStyle(eStyle); + aFormatCol.SetLineWidth(nLWidth); + aFormatCol.SetLineColor(rCol); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index 925bd67b5b83..bd3c326429f0 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -74,10 +74,10 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) case FRMMGR_TYPE_OLE: nId = RES_POOLFRM_OLE; break; case FRMMGR_TYPE_GRF: nId = RES_POOLFRM_GRAPHIC; break; } - m_aSet.SetParent( &m_pOwnSh->GetFmtFromPool( nId )->GetAttrSet()); - m_aSet.Put( SwFmtFrmSize( ATT_MIN_SIZE, DFLT_WIDTH, DFLT_HEIGHT )); + m_aSet.SetParent( &m_pOwnSh->GetFormatFromPool( nId )->GetAttrSet()); + m_aSet.Put( SwFormatFrmSize( ATT_MIN_SIZE, DFLT_WIDTH, DFLT_HEIGHT )); if ( 0 != ::GetHtmlMode(pSh->GetView().GetDocShell()) ) - m_aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::PRINT_AREA ) ); + m_aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::PRINT_AREA ) ); } else if ( nType == FRMMGR_TYPE_NONE ) { @@ -142,8 +142,8 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm() SfxItemSet aGetSet( *m_aSet.GetPool(), RES_ANCHOR, RES_ANCHOR ); if( m_pOwnSh->GetFlyFrmAttr( aGetSet ) && 1 == aGetSet.Count() && SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem ) - && static_cast<const SwFmtAnchor*>(pGItem)->GetAnchorId() == - static_cast<const SwFmtAnchor*>(pItem)->GetAnchorId() ) + && static_cast<const SwFormatAnchor*>(pGItem)->GetAnchorId() == + static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId() ) m_aSet.ClearItem( RES_ANCHOR ); } @@ -205,12 +205,12 @@ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId ) sal_uInt16 nPhyPageNum, nVirtPageNum; m_pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum ); - m_aSet.Put( SwFmtAnchor( eId, nPhyPageNum ) ); + m_aSet.Put( SwFormatAnchor( eId, nPhyPageNum ) ); if ((FLY_AT_PAGE == eId) || (FLY_AT_PARA == eId) || (FLY_AT_CHAR == eId) || (FLY_AT_FLY == eId)) { - SwFmtVertOrient aVertOrient( GetVertOrient() ); - SwFmtHoriOrient aHoriOrient( GetHoriOrient() ); + SwFormatVertOrient aVertOrient( GetVertOrient() ); + SwFormatHoriOrient aHoriOrient( GetHoriOrient() ); aHoriOrient.SetRelationOrient( text::RelOrientation::FRAME ); aVertOrient.SetRelationOrient( text::RelOrientation::FRAME ); m_aSet.Put( aVertOrient ); @@ -219,7 +219,7 @@ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId ) } // set the attribute for columns -void SwFlyFrmAttrMgr::SetCol( const SwFmtCol &rCol ) +void SwFlyFrmAttrMgr::SetCol( const SwFormatCol &rCol ) { m_aSet.Put( rCol ); } @@ -229,8 +229,8 @@ void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint ) { m_bAbsPos = true; m_aAbsPos = rPoint; - SwFmtVertOrient aVertOrient( GetVertOrient() ); - SwFmtHoriOrient aHoriOrient( GetHoriOrient() ); + SwFormatVertOrient aVertOrient( GetVertOrient() ); + SwFormatHoriOrient aHoriOrient( GetHoriOrient() ); aHoriOrient.SetHoriOrient( text::HoriOrientation::NONE ); aVertOrient.SetVertOrient( text::VertOrientation::NONE ); m_aSet.Put( aVertOrient ); @@ -239,7 +239,7 @@ void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint ) // check metrics for correctness void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, - const SwPosition* pToCharCntntPos, + const SwPosition* pToCharContentPos, bool bOnlyPercentRefValue ) { if (!bOnlyPercentRefValue) @@ -253,11 +253,11 @@ 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 SwFmtFrmSize& rSize = static_cast<const SwFmtFrmSize&>(m_aSet.Get(RES_FRM_SIZE)); + const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(m_aSet.Get(RES_FRM_SIZE)); m_pOwnSh->CalcBoundRect( aBoundRect, eAnchorType, rVal.nHRelOrient, rVal.nVRelOrient, - pToCharCntntPos, + pToCharContentPos, rVal.bFollowTextFlow, rVal.bMirror, NULL, &rVal.aPercentSize, &rSize); @@ -539,8 +539,8 @@ void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom ) void SwFlyFrmAttrMgr::SetPos( const Point& rPoint ) { - SwFmtVertOrient aVertOrient( GetVertOrient() ); - SwFmtHoriOrient aHoriOrient( GetHoriOrient() ); + SwFormatVertOrient aVertOrient( GetVertOrient() ); + SwFormatHoriOrient aHoriOrient( GetHoriOrient() ); aHoriOrient.SetPos ( rPoint.X() ); aHoriOrient.SetHoriOrient( text::HoriOrientation::NONE ); @@ -554,28 +554,28 @@ void SwFlyFrmAttrMgr::SetPos( const Point& rPoint ) void SwFlyFrmAttrMgr::SetHorzOrientation( sal_Int16 eOrient ) { - SwFmtHoriOrient aHoriOrient( GetHoriOrient() ); + SwFormatHoriOrient aHoriOrient( GetHoriOrient() ); aHoriOrient.SetHoriOrient( eOrient ); m_aSet.Put( aHoriOrient ); } void SwFlyFrmAttrMgr::SetVertOrientation( sal_Int16 eOrient ) { - SwFmtVertOrient aVertOrient( GetVertOrient() ); + SwFormatVertOrient aVertOrient( GetVertOrient() ); aVertOrient.SetVertOrient( eOrient ); m_aSet.Put( aVertOrient ); } void SwFlyFrmAttrMgr::SetHeightSizeType( SwFrmSize eType ) { - SwFmtFrmSize aSize( GetFrmSize() ); + SwFormatFrmSize aSize( GetFrmSize() ); aSize.SetHeightSizeType( eType ); m_aSet.Put( aSize ); } void SwFlyFrmAttrMgr::SetSize( const Size& rSize ) { - SwFmtFrmSize aSize( GetFrmSize() ); + SwFormatFrmSize aSize( GetFrmSize() ); aSize.SetSize(Size(std::max(rSize.Width(), long(MINFLY)), std::max(rSize.Height(), long(MINFLY)))); m_aSet.Put( aSize ); } diff --git a/sw/source/uibase/inc/basesh.hxx b/sw/source/uibase/inc/basesh.hxx index cca31c0ed9bf..280f3607e269 100644 --- a/sw/source/uibase/inc/basesh.hxx +++ b/sw/source/uibase/inc/basesh.hxx @@ -61,7 +61,7 @@ protected: DECL_LINK( InsertDBTextHdl, DBTextStruct_Impl* ); - void InsertURLButton( const OUString& rURL, const OUString& rTarget, const OUString& rTxt ); + void InsertURLButton( const OUString& rURL, const OUString& rTarget, const OUString& rText ); void InsertTable( SfxRequest& _rRequest ); public: @@ -94,9 +94,9 @@ public: void ExecDlg(SfxRequest &); void StateStatusLine(SfxItemSet &rSet); - void ExecTxtCtrl(SfxRequest& rReq); - void GetTxtFontCtrlState(SfxItemSet& rSet); - void GetTxtCtrlState(SfxItemSet& rSet); + void ExecTextCtrl(SfxRequest& rReq); + void GetTextFontCtrlState(SfxItemSet& rSet); + void GetTextCtrlState(SfxItemSet& rSet); void GetBorderState(SfxItemSet &rSet); void GetBckColState(SfxItemSet &rSet); diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index 8bedf3f7e8ac..4eb1966ffc8d 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -53,7 +53,7 @@ class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem bool bNonbreakingSpace :1; bool bSoftHyphen :1; bool bCharHiddenText :1; - bool bFldHiddenText :1; + bool bFieldHiddenText :1; bool bManualBreak :1; bool bShowHiddenPara :1; diff --git a/sw/source/uibase/inc/changedb.hxx b/sw/source/uibase/inc/changedb.hxx index c10948bab9c2..8a3f95a3003c 100644 --- a/sw/source/uibase/inc/changedb.hxx +++ b/sw/source/uibase/inc/changedb.hxx @@ -27,7 +27,7 @@ #include <svx/stddlg.hxx> #include "dbtree.hxx" -class SwFldMgr; +class SwFieldMgr; class SwView; class SwWrtShell; struct SwDBData; @@ -44,14 +44,14 @@ class SwChangeDBDlg: public SvxStandardDialog ImageList aImageList; SwWrtShell *pSh; - SwFldMgr *pMgr; + SwFieldMgr *pMgr; DECL_LINK(TreeSelectHdl, void * = 0); DECL_LINK(ButtonHdl, void *); DECL_LINK(AddDBHdl, void *); virtual void Apply() SAL_OVERRIDE; - void UpdateFlds(); + void UpdateFields(); void FillDBPopup(); SvTreeListEntry* Insert(const OUString& rDBName); void ShowDBName(const SwDBData& rDBData); diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx index ff6f91b3a516..58366f7c3baa 100644 --- a/sw/source/uibase/inc/chrdlg.hxx +++ b/sw/source/uibase/inc/chrdlg.hxx @@ -50,7 +50,7 @@ class SwCharDlg: public SfxTabDialog public: SwCharDlg(vcl::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, - sal_uInt8 nDialogMode, const OUString* pFmtStr = 0); + sal_uInt8 nDialogMode, const OUString* pFormatStr = 0); virtual ~SwCharDlg(); diff --git a/sw/source/uibase/inc/colex.hxx b/sw/source/uibase/inc/colex.hxx index 35a2809b7af8..506b41601969 100644 --- a/sw/source/uibase/inc/colex.hxx +++ b/sw/source/uibase/inc/colex.hxx @@ -95,7 +95,7 @@ private: Size m_aWinSize; Size m_aFrmSize; - SwFmtCol m_aCols; + SwFormatCol m_aCols; protected: virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE; @@ -103,7 +103,7 @@ protected: public: SwColumnOnlyExample(vcl::Window*); - void SetColumns(const SwFmtCol& rCol); + void SetColumns(const SwFormatCol& rCol); virtual Size GetOptimalSize() const SAL_OVERRIDE; }; diff --git a/sw/source/uibase/inc/colmgr.hxx b/sw/source/uibase/inc/colmgr.hxx index e63b3f0aba53..fc52425801f7 100644 --- a/sw/source/uibase/inc/colmgr.hxx +++ b/sw/source/uibase/inc/colmgr.hxx @@ -22,7 +22,7 @@ #include "swdllapi.h" #include <fmtclds.hxx> -SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth); +SW_DLLPUBLIC void FitToActualSize(SwFormatCol& rCol, sal_uInt16 nWidth); class SW_DLLPUBLIC SwColMgr { @@ -59,57 +59,57 @@ public: inline void NoCols(); void Update(); - const SwFmtCol& GetColumns() const { return aFmtCol; } + const SwFormatCol& GetColumns() const { return aFormatCol; } void SetActualWidth(sal_uInt16 nW); sal_uInt16 GetActualSize() const { return nWidth; } private: - SwFmtCol aFmtCol; + SwFormatCol aFormatCol; sal_uInt16 nWidth; }; inline sal_uInt16 SwColMgr::GetCount() const { - return aFmtCol.GetNumCols(); + return aFormatCol.GetNumCols(); } inline ::editeng::SvxBorderStyle SwColMgr::GetLineStyle() const { - return aFmtCol.GetLineStyle(); + return aFormatCol.GetLineStyle(); } inline sal_uLong SwColMgr::GetLineWidth() const { - return aFmtCol.GetLineWidth(); + return aFormatCol.GetLineWidth(); } inline const Color& SwColMgr::GetLineColor() const { - return aFmtCol.GetLineColor(); + return aFormatCol.GetLineColor(); } inline SwColLineAdj SwColMgr::GetAdjust() const { - return aFmtCol.GetLineAdj(); + return aFormatCol.GetLineAdj(); } inline void SwColMgr::SetAdjust(SwColLineAdj eAdj) { - aFmtCol.SetLineAdj(eAdj); + aFormatCol.SetLineAdj(eAdj); } inline bool SwColMgr::IsAutoWidth() const { - return aFmtCol.IsOrtho(); + return aFormatCol.IsOrtho(); } inline void SwColMgr::SetAutoWidth(bool bOn, sal_uInt16 nGutterWidth) { - aFmtCol.SetOrtho(bOn, nGutterWidth, nWidth); + aFormatCol.SetOrtho(bOn, nGutterWidth, nWidth); } inline void SwColMgr::NoCols() { - aFmtCol.GetColumns().clear(); + aFormatCol.GetColumns().clear(); } inline bool SwColMgr::HasLine() const { diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx index d065065ee66d..0d1a804b9d86 100644 --- a/sw/source/uibase/inc/content.hxx +++ b/sw/source/uibase/inc/content.hxx @@ -26,8 +26,8 @@ class SwWrtShell; class SwContentArr; class SwContentType; -class SwFmtFld; -class SwTxtINetFmt; +class SwFormatField; +class SwTextINetFormat; class SwTOXBase; class SwRangeRedline; @@ -71,34 +71,34 @@ class SwRegionContent : public SwContent class SwURLFieldContent : public SwContent { OUString sURL; - const SwTxtINetFmt* pINetAttr; + const SwTextINetFormat* pINetAttr; public: SwURLFieldContent( const SwContentType* pCnt, const OUString& rName, const OUString& rURL, - const SwTxtINetFmt* pAttr, + const SwTextINetFormat* pAttr, long nYPos ) : SwContent( pCnt, rName, nYPos ), sURL( rURL ), pINetAttr( pAttr ) {} virtual bool IsProtect() const SAL_OVERRIDE; const OUString& GetURL() const { return sURL; } - const SwTxtINetFmt* GetINetAttr() { return pINetAttr; } + const SwTextINetFormat* GetINetAttr() { return pINetAttr; } }; class SwPostItContent : public SwContent { - const SwFmtFld* pFld; + const SwFormatField* pField; SwRangeRedline* pRedline; bool mbPostIt; public: SwPostItContent( const SwContentType* pCnt, const OUString& rName, - const SwFmtFld* pFormatField, + const SwFormatField* pFormatField, long nYPos ) : SwContent(pCnt, rName, nYPos) - , pFld(pFormatField) + , pField(pFormatField) , pRedline(NULL) , mbPostIt(true) {} @@ -107,12 +107,12 @@ public: SwRangeRedline* pRed, long nYPos ) : SwContent(pCnt, rName, nYPos) - , pFld(NULL) + , pField(NULL) , pRedline(pRed) , mbPostIt(false) {} - const SwFmtFld* GetPostIt() const { return pFld; } + const SwFormatField* GetPostIt() const { return pField; } SwRangeRedline* GetRedline() { return pRedline; } virtual bool IsProtect() const SAL_OVERRIDE; bool IsPostIt() const {return mbPostIt; } diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 9421f16c1926..48bf91fd1f3d 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -57,7 +57,7 @@ class SwContentTree OUString aContextStrings[CONTEXT_COUNT + 1]; OUString sRemoveIdx; OUString sUpdateIdx; - OUString sUnprotTbl; + OUString sUnprotTable; OUString sRename; OUString sReadonlyIdx; OUString sInvisible; diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx index 1a52d8ba2c99..c1ff57ab4434 100644 --- a/sw/source/uibase/inc/convert.hxx +++ b/sw/source/uibase/inc/convert.hxx @@ -24,7 +24,7 @@ #include <vcl/edit.hxx> #include <sfx2/basedlgs.hxx> -class SwTableAutoFmt; +class SwTableAutoFormat; class SwView; class SwWrtShell; class NumericField; @@ -49,13 +49,13 @@ class SwConvertTableDlg: public SfxModalDialog VclPtr<CheckBox> mpDontSplitCB; VclPtr<CheckBox> mpBorderCB; - VclPtr<PushButton> mpAutoFmtBtn; + VclPtr<PushButton> mpAutoFormatBtn; OUString sConvertTextTable; - SwTableAutoFmt* pTAutoFmt; + SwTableAutoFormat* pTAutoFormat; SwWrtShell* pShell; - DECL_LINK( AutoFmtHdl, PushButton* ); + DECL_LINK( AutoFormatHdl, PushButton* ); DECL_LINK( BtnHdl, Button* ); DECL_LINK(CheckBoxHdl, void * = 0); DECL_LINK( ReapeatHeaderCheckBoxHdl, void* p = 0 ); @@ -66,8 +66,8 @@ public: virtual void dispose() SAL_OVERRIDE; void GetValues( sal_Unicode& rDelim, - SwInsertTableOptions& rInsTblOpts, - SwTableAutoFmt const*& prTAFmt ); + SwInsertTableOptions& rInsTableOpts, + SwTableAutoFormat const*& prTAFormat ); }; #endif diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx index 5f99c2025360..e152912e40e7 100644 --- a/sw/source/uibase/inc/cption.hxx +++ b/sw/source/uibase/inc/cption.hxx @@ -41,7 +41,7 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/container/XNamed.hpp> -class SwFldMgr; +class SwFieldMgr; class SwView; #include <wrtsh.hxx> @@ -83,7 +83,7 @@ class SwCaptionDialog : public SvxStandardDialog VclPtr<SwCaptionPreview> m_pPreview; SwView &rView; // search per active, avoid View - SwFldMgr *pMgr; // pointer to save the include + SwFieldMgr *pMgr; // pointer to save the include SelectionType eType; OUString sCharacterStyle; diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index 837c2f7019ab..789b197684a8 100644 --- a/sw/source/uibase/inc/dbinsdlg.hxx +++ b/sw/source/uibase/inc/dbinsdlg.hxx @@ -47,7 +47,7 @@ namespace com{namespace sun{namespace star{ } }}} -class SwTableAutoFmt; +class SwTableAutoFormat; class SwView; class SfxItemSet; class SwTableRep; @@ -56,22 +56,22 @@ typedef boost::ptr_vector<_DB_Column> _DB_Columns; struct SwInsDBColumn { - OUString sColumn, sUsrNumFmt; - sal_Int32 nDBNumFmt; - sal_uInt32 nUsrNumFmt; - LanguageType eUsrNumFmtLng; + OUString sColumn, sUsrNumFormat; + sal_Int32 nDBNumFormat; + sal_uInt32 nUsrNumFormat; + LanguageType eUsrNumFormatLng; sal_uInt16 nCol; - bool bHasFmt : 1; - bool bIsDBFmt : 1; + bool bHasFormat : 1; + bool bIsDBFormat : 1; SwInsDBColumn( const OUString& rStr, sal_uInt16 nColumn ) : sColumn( rStr ), - nDBNumFmt( 0 ), - nUsrNumFmt( 0 ), - eUsrNumFmtLng( LANGUAGE_SYSTEM ), + nDBNumFormat( 0 ), + nUsrNumFormat( 0 ), + eUsrNumFormatLng( LANGUAGE_SYSTEM ), nCol( nColumn ), - bHasFmt(false), - bIsDBFmt(true) + bHasFormat(false), + bIsDBFormat(true) {} bool operator==( const SwInsDBColumn& rCmp ) const @@ -93,13 +93,13 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem VclPtr<VclFrame> m_pHeadFrame; - VclPtr<ListBox> m_pLbTblDbColumn; - VclPtr<ListBox> m_pLbTxtDbColumn; + VclPtr<ListBox> m_pLbTableDbColumn; + VclPtr<ListBox> m_pLbTextDbColumn; VclPtr<VclFrame> m_pFormatFrame; - VclPtr<RadioButton> m_pRbDbFmtFromDb; - VclPtr<RadioButton> m_pRbDbFmtFromUsr; - VclPtr<NumFormatListBox> m_pLbDbFmtFromUsr; + VclPtr<RadioButton> m_pRbDbFormatFromDb; + VclPtr<RadioButton> m_pRbDbFormatFromUsr; + VclPtr<NumFormatListBox> m_pLbDbFormatFromUsr; // Page Text/Field VclPtr<PushButton> m_pIbDbcolToEdit; @@ -117,32 +117,32 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem VclPtr<CheckBox> m_pCbTableHeadon; VclPtr<RadioButton> m_pRbHeadlColnms; VclPtr<RadioButton> m_pRbHeadlEmpty; - VclPtr<PushButton> m_pPbTblFormat; - VclPtr<PushButton> m_pPbTblAutofmt; + VclPtr<PushButton> m_pPbTableFormat; + VclPtr<PushButton> m_pPbTableAutofmt; SwInsDBColumns aDBColumns; const SwDBData aDBData; - Link<> aOldNumFmtLnk; + Link<> aOldNumFormatLnk; OUString sNoTmpl; SwView* pView; - SwTableAutoFmt* pTAutoFmt; + SwTableAutoFormat* pTAutoFormat; - SfxItemSet* pTblSet; + SfxItemSet* pTableSet; SwTableRep* pRep; - sal_Int32 nGBFmtLen; + sal_Int32 nGBFormatLen; DECL_LINK( PageHdl, Button* ); - DECL_LINK( AutoFmtHdl, PushButton* ); - DECL_LINK( TblFmtHdl, PushButton* ); + DECL_LINK( AutoFormatHdl, PushButton* ); + DECL_LINK( TableFormatHdl, PushButton* ); DECL_LINK( DBFormatHdl, Button* ); - DECL_LINK( TblToFromHdl, Button* ); + DECL_LINK( TableToFromHdl, Button* ); DECL_LINK( SelectHdl, ListBox* ); DECL_LINK( DblClickHdl, ListBox* ); DECL_LINK( HeaderHdl, Button* ); - bool SplitTextToColArr( const OUString& rTxt, _DB_Columns& rColArr, bool bInsField ); + bool SplitTextToColArr( const OUString& rText, _DB_Columns& rColArr, bool bInsField ); using SfxModalDialog::Notify; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/drwtxtsh.hxx b/sw/source/uibase/inc/drwtxtsh.hxx index b8656bdec8c4..a74868be1aba 100644 --- a/sw/source/uibase/inc/drwtxtsh.hxx +++ b/sw/source/uibase/inc/drwtxtsh.hxx @@ -62,7 +62,7 @@ public: void ExecDraw(SfxRequest &); void GetStatePropPanelAttr(SfxItemSet &); void GetState(SfxItemSet &); - void GetDrawTxtCtrlState(SfxItemSet&); + void GetDrawTextCtrlState(SfxItemSet&); void ExecFontWork(SfxRequest& rReq); void StateFontWork(SfxItemSet& rSet); diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 2c5062f20794..ed65f1e9d1d6 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -123,8 +123,8 @@ friend void PageNumNotify( SwViewShell* pVwSh, m_bIsInDrag : 1, // don't execute StartExecuteDrag twice m_bOldIdle : 1, // to stop to idle m_bOldIdleSet : 1, // during QeueryDrop - m_bTblInsDelMode : 1, - m_bTblIsInsMode : 1, + m_bTableInsDelMode : 1, + m_bTableIsInsMode : 1, m_bChainMode : 1, // connect frames m_bWasShdwCrsr : 1, // ShadowCrsr was on in MouseButtonDown m_bLockInput : 1, // lock while calc panel is active @@ -289,7 +289,7 @@ public: /** fdo#55546 cut very long tooltips to 2/3 of the width of the screen via center ellipsis */ - OUString ClipLongToolTip(const OUString& rTxt); + OUString ClipLongToolTip(const OUString& rText); SwFrameControlsManager& GetFrameControlsManager() { return m_aFrameControlsManager; } diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx index fd4691a66453..44595cb91444 100644 --- a/sw/source/uibase/inc/envlop.hxx +++ b/sw/source/uibase/inc/envlop.hxx @@ -32,11 +32,11 @@ #include "envimg.hxx" -#define GetFldVal(rField) (rField).Denormalize((rField).GetValue(FUNIT_TWIP)) -#define SetFldVal(rField, lValue) (rField).SetValue((rField).Normalize(lValue), FUNIT_TWIP) +#define GetFieldVal(rField) (rField).Denormalize((rField).GetValue(FUNIT_TWIP)) +#define SetFieldVal(rField, lValue) (rField).SetValue((rField).Normalize(lValue), FUNIT_TWIP) class SwEnvPage; -class SwEnvFmtPage; +class SwEnvFormatPage; class SwWrtShell; class Printer; @@ -56,7 +56,7 @@ protected: class SwEnvDlg : public SfxTabDialog { friend class SwEnvPage; -friend class SwEnvFmtPage; +friend class SwEnvFormatPage; friend class SwEnvPrtPage; friend class SwEnvPreview; diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx index 626dc917c8fa..21334df3c20a 100644 --- a/sw/source/uibase/inc/fldedt.hxx +++ b/sw/source/uibase/inc/fldedt.hxx @@ -23,9 +23,9 @@ class SwView; class SwWrtShell; -class SwFldMgr; +class SwFieldMgr; -class SwFldEditDlg : public SfxSingleTabDialog +class SwFieldEditDlg : public SfxSingleTabDialog { SwWrtShell* pSh; VclPtr<PushButton> m_pPrevBT; @@ -38,11 +38,11 @@ class SwFldEditDlg : public SfxSingleTabDialog void Init(); VclPtr<SfxTabPage> CreatePage(sal_uInt16 nGroup); - void EnsureSelection(SwField *pCurFld, SwFldMgr &rMgr); + void EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr); public: - SwFldEditDlg(SwView& rVw); - virtual ~SwFldEditDlg(); + SwFieldEditDlg(SwView& rVw); + virtual ~SwFieldEditDlg(); virtual void dispose() SAL_OVERRIDE; DECL_LINK(OKHdl, void *); diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx index 3fc3a3c85975..39ff1783c7e8 100644 --- a/sw/source/uibase/inc/fldmgr.hxx +++ b/sw/source/uibase/inc/fldmgr.hxx @@ -45,7 +45,7 @@ class SvNumberFormatter; namespace vcl { class Window; } // the groups of fields -enum SwFldGroups +enum SwFieldGroups { GRP_DOC, GRP_FKT, @@ -55,7 +55,7 @@ enum SwFldGroups GRP_VAR }; -struct SwFldGroupRgn +struct SwFieldGroupRgn { sal_uInt16 nStart; sal_uInt16 nEnd; @@ -63,7 +63,7 @@ struct SwFldGroupRgn // the field manager handles the insertation of fields // with command strings -struct SwInsertFld_Data +struct SwInsertField_Data { sal_uInt16 m_nTypeId; sal_uInt16 m_nSubType; @@ -76,30 +76,30 @@ struct SwInsertFld_Data ::com::sun::star::uno::Any m_aDBDataSource; ::com::sun::star::uno::Any m_aDBConnection; ::com::sun::star::uno::Any m_aDBColumn; - VclPtr<vcl::Window> m_pParent; // parent dialog used for SwWrtShell::StartInputFldDlg() + VclPtr<vcl::Window> m_pParent; // parent dialog used for SwWrtShell::StartInputFieldDlg() - SwInsertFld_Data(sal_uInt16 nType, sal_uInt16 nSub, const OUString& rPar1, const OUString& rPar2, - sal_uLong nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', bool bIsAutoLanguage = true) : + SwInsertField_Data(sal_uInt16 nType, sal_uInt16 nSub, const OUString& rPar1, const OUString& rPar2, + sal_uLong nFormatId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', bool bIsAutoLanguage = true) : m_nTypeId(nType), m_nSubType(nSub), m_sPar1(rPar1), m_sPar2(rPar2), - m_nFormatId(nFmtId), + m_nFormatId(nFormatId), m_pSh(pShell), m_cSeparator(cSep), m_bIsAutomaticLanguage(bIsAutoLanguage), m_pParent(0) {} - SwInsertFld_Data() : + SwInsertField_Data() : m_pSh(0), m_cSeparator(' '), m_bIsAutomaticLanguage(true){} }; -class SW_DLLPUBLIC SwFldMgr +class SW_DLLPUBLIC SwFieldMgr { private: - SwField* pCurFld; + SwField* pCurField; SbModule* pModule; const SvxMacroItem* pMacroItem; SwWrtShell* pWrtShell; // can be ZERO too! @@ -110,7 +110,7 @@ private: OUString sMacroPath; OUString sMacroName; - sal_uLong nCurFmt; + sal_uLong nCurFormat; bool bEvalExp; SAL_DLLPRIVATE sal_uInt16 GetCurrLanguage() const; @@ -120,29 +120,29 @@ private: SAL_DLLPRIVATE com::sun::star::uno::Reference<com::sun::star::text::XNumberingTypeInfo> GetNumberingInfo()const; public: - SwFldMgr(SwWrtShell* pSh = 0); - ~SwFldMgr(); + SwFieldMgr(SwWrtShell* pSh = 0); + ~SwFieldMgr(); void SetWrtShell( SwWrtShell* pShell ) { pWrtShell = pShell; } // insert field using TypeID (TYP_ ...) - bool InsertFld( const SwInsertFld_Data& rData ); + bool InsertField( const SwInsertField_Data& rData ); // change the current field directly - void UpdateCurFld(sal_uLong nFormat, + void UpdateCurField(sal_uLong nFormat, const OUString& rPar1, const OUString& rPar2, SwField * _pField = 0); // #111840# - OUString GetCurFldPar1() const { return aCurPar1; } - OUString GetCurFldPar2() const { return aCurPar2; } - inline sal_uLong GetCurFldFmt() const; + OUString GetCurFieldPar1() const { return aCurPar1; } + OUString GetCurFieldPar2() const { return aCurPar2; } + inline sal_uLong GetCurFieldFormat() const; // determine a field - SwField* GetCurFld(); + SwField* GetCurField(); - void InsertFldType(SwFieldType& rType); + void InsertFieldType(SwFieldType& rType); bool ChooseMacro(const OUString &rSelMacro = OUString()); void SetMacroPath(const OUString& rPath); @@ -157,22 +157,22 @@ public: // query values from database fields (BASIC ) // String GetDataBaseFieldValue(const String &rDBName, const String &rFieldName, SwWrtShell* pSh); - bool IsDBNumeric(const OUString& rDBName, const OUString& rTblQryName, - bool bIsTable, const OUString& rFldName); + bool IsDBNumeric(const OUString& rDBName, const OUString& rTableQryName, + bool bIsTable, const OUString& rFieldName); // organise RefMark with names bool CanInsertRefMark( const OUString& rStr ); // access to field types via ResId - sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX) const; - SwFieldType* GetFldType(sal_uInt16 nResId, sal_uInt16 nId = 0) const; - SwFieldType* GetFldType(sal_uInt16 nResId, const OUString& rName) const; + sal_uInt16 GetFieldTypeCount(sal_uInt16 nResId = USHRT_MAX) const; + SwFieldType* GetFieldType(sal_uInt16 nResId, sal_uInt16 nId = 0) const; + SwFieldType* GetFieldType(sal_uInt16 nResId, const OUString& rName) const; - void RemoveFldType(sal_uInt16 nResId, const OUString& rName); + void RemoveFieldType(sal_uInt16 nResId, const OUString& rName); // access via TypeId from the dialog // Ids for a range of fields - static const SwFldGroupRgn& GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId); + static const SwFieldGroupRgn& GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId); static sal_uInt16 GetGroup(bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType = 0); // the current field's TypeId @@ -198,15 +198,15 @@ public: // turn off evaluation of expression fields for insertation // of many expressino fields (see labels) - inline void SetEvalExpFlds(bool bEval); - void EvalExpFlds(SwWrtShell* pSh = NULL); + inline void SetEvalExpFields(bool bEval); + void EvalExpFields(SwWrtShell* pSh = NULL); }; -inline void SwFldMgr::SetEvalExpFlds(bool bEval) +inline void SwFieldMgr::SetEvalExpFields(bool bEval) { bEvalExp = bEval; } -inline sal_uLong SwFldMgr::GetCurFldFmt() const - { return nCurFmt; } +inline sal_uLong SwFieldMgr::GetCurFieldFormat() const + { return nCurFormat; } #endif diff --git a/sw/source/uibase/inc/fldtdlg.hxx b/sw/source/uibase/inc/fldtdlg.hxx index 71883a0f7119..cab774e12dd0 100644 --- a/sw/source/uibase/inc/fldtdlg.hxx +++ b/sw/source/uibase/inc/fldtdlg.hxx @@ -25,7 +25,7 @@ class SfxTabPage; class SwChildWinWrapper; struct SfxChildWinInfo; -class SwFldDlg: public SfxTabDialog +class SwFieldDlg: public SfxTabDialog { SwChildWinWrapper* m_pChildWin; SfxBindings* m_pBindings; @@ -47,8 +47,8 @@ class SwFldDlg: public SfxTabDialog bool bOnlyActivate = false ); public: - SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent); - virtual ~SwFldDlg(); + SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent); + virtual ~SwFieldDlg(); DECL_LINK(OKHdl, void *); DECL_LINK(CancelHdl, void *); diff --git a/sw/source/uibase/inc/fldwrap.hxx b/sw/source/uibase/inc/fldwrap.hxx index db4cdee3a440..89b70f36c54d 100644 --- a/sw/source/uibase/inc/fldwrap.hxx +++ b/sw/source/uibase/inc/fldwrap.hxx @@ -20,30 +20,30 @@ #define INCLUDED_SW_SOURCE_UIBASE_INC_FLDWRAP_HXX #include "chldwrap.hxx" -class AbstractSwFldDlg; +class AbstractSwFieldDlg; -class SwFldDlgWrapper : public SwChildWinWrapper +class SwFieldDlgWrapper : public SwChildWinWrapper { public: - AbstractSwFldDlg * pDlgInterface; - SwFldDlgWrapper( vcl::Window* pParent, sal_uInt16 nId, + AbstractSwFieldDlg * pDlgInterface; + SwFieldDlgWrapper( vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); - SFX_DECL_CHILDWINDOW_WITHID(SwFldDlgWrapper); + SFX_DECL_CHILDWINDOW_WITHID(SwFieldDlgWrapper); virtual bool ReInitDlg(SwDocShell *pDocSh) SAL_OVERRIDE; void ShowReferencePage(); }; // field dialog only showing database page to support mail merge -class SwFldDataOnlyDlgWrapper : public SwChildWinWrapper +class SwFieldDataOnlyDlgWrapper : public SwChildWinWrapper { public: - AbstractSwFldDlg * pDlgInterface; - SwFldDataOnlyDlgWrapper( vcl::Window* pParent, sal_uInt16 nId, + AbstractSwFieldDlg * pDlgInterface; + SwFieldDataOnlyDlgWrapper( vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); - SFX_DECL_CHILDWINDOW(SwFldDataOnlyDlgWrapper); + SFX_DECL_CHILDWINDOW(SwFieldDataOnlyDlgWrapper); virtual bool ReInitDlg(SwDocShell *pDocSh) SAL_OVERRIDE; }; diff --git a/sw/source/uibase/inc/formatclipboard.hxx b/sw/source/uibase/inc/formatclipboard.hxx index 9e1d6b589e6a..a229e4519bca 100644 --- a/sw/source/uibase/inc/formatclipboard.hxx +++ b/sw/source/uibase/inc/formatclipboard.hxx @@ -69,7 +69,7 @@ private: int m_nSelectionType; /** automatic/named character attribute set */ - SfxItemSet* m_pItemSet_TxtAttr; + SfxItemSet* m_pItemSet_TextAttr; /** automatic/named paragraph attribute set * (it can be caractere attribute applyied to the paragraph) */ SfxItemSet* m_pItemSet_ParAttr; diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx index 1e5a0c42d617..ab5977b9a869 100644 --- a/sw/source/uibase/inc/frmdlg.hxx +++ b/sw/source/uibase/inc/frmdlg.hxx @@ -54,9 +54,9 @@ public: const SfxItemSet& rCoreSet, bool bNewFrm = false, const OUString& sResType = OUString("FrameDialog"), - bool bFmt = false, + bool bFormat = false, const OString& sDefPage = OString(), - const OUString* pFmtStr = 0); + const OUString* pFormatStr = 0); virtual ~SwFrmDlg(); diff --git a/sw/source/uibase/inc/frmmgr.hxx b/sw/source/uibase/inc/frmmgr.hxx index 0cb84faeed57..f4b9ac13c659 100644 --- a/sw/source/uibase/inc/frmmgr.hxx +++ b/sw/source/uibase/inc/frmmgr.hxx @@ -33,7 +33,7 @@ class SwWrtShell; struct SvxSwFrameValidation; struct SwPosition; -class SwFmtCol; +class SwFormatCol; const SwTwips DFLT_WIDTH = MM50 * 4; const SwTwips DFLT_HEIGHT = MM50; @@ -100,7 +100,7 @@ public: void SetULSpace( long nTop = LONG_MAX, long nBottom= LONG_MAX ); - void SetCol( const SwFmtCol &rCol); + void SetCol( const SwFormatCol &rCol); // change and query attributes void UpdateAttrMgr(); @@ -115,7 +115,7 @@ public: // check and change metrics void ValidateMetrics(SvxSwFrameValidation& rVal, - const SwPosition* pToCharCntntPos, + const SwPosition* pToCharContentPos, bool bOnlyPercentRefValue = false); void DelAttr(sal_uInt16 nId); @@ -125,12 +125,12 @@ public: inline SfxItemSet &GetAttrSet() { return m_aSet; } void SetAttrSet(const SfxItemSet& rSet); - inline const SwFmtVertOrient &GetVertOrient() const; - inline const SwFmtHoriOrient &GetHoriOrient() const; + inline const SwFormatVertOrient &GetVertOrient() const; + inline const SwFormatHoriOrient &GetHoriOrient() const; inline const SvxShadowItem &GetShadow() const; inline const SvxBoxItem &GetBox() const; - inline const SwFmtSurround &GetSurround() const; - inline const SwFmtFrmSize &GetFrmSize() const; + inline const SwFormatSurround &GetSurround() const; + inline const SwFormatFrmSize &GetFrmSize() const; long CalcWidthBorder() { return CalcLeftSpace()+CalcRightSpace(); } long CalcHeightBorder() { return CalcTopSpace()+CalcBottomSpace(); } @@ -138,20 +138,20 @@ public: inline const Size& SwFlyFrmAttrMgr::GetSize() const { - return static_cast<const SwFmtFrmSize&>(m_aSet.Get(RES_FRM_SIZE)).GetSize(); + return static_cast<const SwFormatFrmSize&>(m_aSet.Get(RES_FRM_SIZE)).GetSize(); } -inline const SwFmtVertOrient &SwFlyFrmAttrMgr::GetVertOrient() const +inline const SwFormatVertOrient &SwFlyFrmAttrMgr::GetVertOrient() const { - return static_cast<const SwFmtVertOrient&>(m_aSet.Get(RES_VERT_ORIENT)); + return static_cast<const SwFormatVertOrient&>(m_aSet.Get(RES_VERT_ORIENT)); } -inline const SwFmtHoriOrient &SwFlyFrmAttrMgr::GetHoriOrient() const +inline const SwFormatHoriOrient &SwFlyFrmAttrMgr::GetHoriOrient() const { - return static_cast<const SwFmtHoriOrient &>(m_aSet.Get(RES_HORI_ORIENT)); + return static_cast<const SwFormatHoriOrient &>(m_aSet.Get(RES_HORI_ORIENT)); } -inline const SwFmtFrmSize& SwFlyFrmAttrMgr::GetFrmSize() const +inline const SwFormatFrmSize& SwFlyFrmAttrMgr::GetFrmSize() const { - return static_cast<const SwFmtFrmSize&>(m_aSet.Get(RES_FRM_SIZE)); + return static_cast<const SwFormatFrmSize&>(m_aSet.Get(RES_FRM_SIZE)); } inline const SvxShadowItem &SwFlyFrmAttrMgr::GetShadow() const { @@ -161,9 +161,9 @@ inline const SvxBoxItem &SwFlyFrmAttrMgr::GetBox() const { return static_cast<const SvxBoxItem&>(m_aSet.Get(RES_BOX)); } -inline const SwFmtSurround &SwFlyFrmAttrMgr::GetSurround() const +inline const SwFormatSurround &SwFlyFrmAttrMgr::GetSurround() const { - return static_cast<const SwFmtSurround&>(m_aSet.Get(RES_SURROUND)); + return static_cast<const SwFormatSurround&>(m_aSet.Get(RES_SURROUND)); } inline Point SwFlyFrmAttrMgr::GetPos() const @@ -173,7 +173,7 @@ inline Point SwFlyFrmAttrMgr::GetPos() const inline RndStdIds SwFlyFrmAttrMgr::GetAnchor() const { - return static_cast<const SwFmtAnchor&>(m_aSet.Get(RES_ANCHOR)).GetAnchorId(); + return static_cast<const SwFormatAnchor&>(m_aSet.Get(RES_ANCHOR)).GetAnchorId(); } inline sal_uInt16 SwFlyFrmAttrMgr::GetHeightPercent() const diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 095966548883..b603d5b70430 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -112,7 +112,7 @@ class SwFrmPage: public SfxTabPage // OD 12.11.2003 #i22341# - keep content position of character for // to character anchored objects. - const SwPosition* mpToCharCntntPos; + const SwPosition* mpToCharContentPos; // old alignment sal_Int16 nOldH; @@ -193,7 +193,7 @@ public: virtual void Reset(const SfxItemSet *rSet) SAL_OVERRIDE; void SetNewFrame(bool bNewFrame) { bNew = bNewFrame; } - void SetFormatUsed(bool bFmt); + void SetFormatUsed(bool bFormat); void SetFrmType(const OUString &rType) { sDlgType = rType; } inline bool IsInGraficMode() { return sDlgType == "PictureDialog" || sDlgType == "ObjectDialog"; } void EnableVerticalPositioning( bool bEnable ); @@ -318,7 +318,7 @@ public: virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE; virtual void Reset(const SfxItemSet *rSet) SAL_OVERRIDE; - void SetFormatUsed(bool bFmt); + void SetFormatUsed(bool bFormat); void SetFrmType(const OUString &rType) { sDlgType = rType; } void SetNewFrame(bool bNewFrame) { bNew = bNewFrame; } void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; } diff --git a/sw/source/uibase/inc/inpdlg.hxx b/sw/source/uibase/inc/inpdlg.hxx index 260423a01ba4..2be62a3e1a8e 100644 --- a/sw/source/uibase/inc/inpdlg.hxx +++ b/sw/source/uibase/inc/inpdlg.hxx @@ -32,14 +32,14 @@ class SwField; class SwWrtShell; // insert fields -class SwFldInputDlg: public SvxStandardDialog +class SwFieldInputDlg: public SvxStandardDialog { virtual void Apply() SAL_OVERRIDE; virtual void StateChanged( StateChangedType ) SAL_OVERRIDE; SwWrtShell& rSh; - SwInputField* pInpFld; - SwSetExpField* pSetFld; + SwInputField* pInpField; + SwSetExpField* pSetField; SwUserFieldType* pUsrType; VclPtr<Edit> m_pLabelED; @@ -51,9 +51,9 @@ class SwFldInputDlg: public SvxStandardDialog DECL_LINK(NextHdl, void *); public: - SwFldInputDlg( vcl::Window *pParent, SwWrtShell &rSh, + SwFieldInputDlg( vcl::Window *pParent, SwWrtShell &rSh, SwField* pField, bool bNextButton = false ); - virtual ~SwFldInputDlg(); + virtual ~SwFieldInputDlg(); virtual void dispose() SAL_OVERRIDE; }; diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx index 6a1edfc684c4..3d5dba6ed3e1 100644 --- a/sw/source/uibase/inc/inputwin.hxx +++ b/sw/source/uibase/inc/inputwin.hxx @@ -25,7 +25,7 @@ #include <sfx2/childwin.hxx> -class SwFldMgr; +class SwFieldMgr; class SwWrtShell; class SwView; class SfxDispatcher; @@ -37,7 +37,7 @@ public: Edit(pParent , nStyle){} void UpdateRange(const OUString& aSel, - const OUString& aTblName ); + const OUString& aTableName ); protected: virtual void KeyInput( const KeyEvent& ) SAL_OVERRIDE; @@ -50,11 +50,11 @@ friend class InputEdit; VclPtr<Edit> aPos; VclPtr<InputEdit> aEdit; PopupMenu aPopMenu; - SwFldMgr* pMgr; + SwFieldMgr* pMgr; SwWrtShell* pWrtShell; SwView* pView; SfxBindings* pBindings; - OUString aAktTableName, sOldFml; + OUString aAktTableName, sOldFormula; bool bFirst : 1; // initialisations at first call bool bActive : 1; // for hide/show when switching documents @@ -66,7 +66,7 @@ friend class InputEdit; void CleanupUglyHackWithUndo(); - void DelBoxCntnt(); + void DelBoxContent(); DECL_LINK( ModifyHdl, void* ); using Window::IsActive; @@ -92,7 +92,7 @@ public: bool IsActive(){ return bActive; }; - DECL_LINK( SelTblCellsNotify, SwWrtShell * ); + DECL_LINK( SelTableCellsNotify, SwWrtShell * ); void SetFormula( const OUString& rFormula, bool bDelSel = true ); const SwView* GetView() const{return pView;} diff --git a/sw/source/uibase/inc/insfnote.hxx b/sw/source/uibase/inc/insfnote.hxx index 8fee498f4022..b49a2477319d 100644 --- a/sw/source/uibase/inc/insfnote.hxx +++ b/sw/source/uibase/inc/insfnote.hxx @@ -47,7 +47,7 @@ class SwInsFootNoteDlg: public SvxStandardDialog VclPtr<PushButton> m_pNumberExtChar; // everything for the selection footnote/endnote - VclPtr<RadioButton> m_pFtnBtn; + VclPtr<RadioButton> m_pFootnoteBtn; VclPtr<RadioButton> m_pEndNoteBtn; VclPtr<PushButton> m_pOkBtn; diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx index 1e1178306d4c..c52db239c9c7 100644 --- a/sw/source/uibase/inc/instable.hxx +++ b/sw/source/uibase/inc/instable.hxx @@ -28,7 +28,7 @@ #include <actctrl.hxx> class SwWrtShell; -class SwTableAutoFmt; +class SwTableAutoFormat; class SwView; struct SwInsertTableOptions; @@ -49,15 +49,15 @@ class SwInsTableDlg : public SfxModalDialog VclPtr<CheckBox> m_pBorderCB; VclPtr<PushButton> m_pInsertBtn; - VclPtr<PushButton> m_pAutoFmtBtn; + VclPtr<PushButton> m_pAutoFormatBtn; SwWrtShell* pShell; - SwTableAutoFmt* pTAutoFmt; + SwTableAutoFormat* pTAutoFormat; sal_Int64 nEnteredValRepeatHeaderNF; DECL_LINK( ModifyName, Edit * ); DECL_LINK( ModifyRowCol, NumericField * ); - DECL_LINK( AutoFmtHdl, PushButton* ); + DECL_LINK( AutoFormatHdl, PushButton* ); DECL_LINK(OKHdl, void*); DECL_LINK(CheckBoxHdl, void * = 0); DECL_LINK( ReapeatHeaderCheckBoxHdl, void* p = 0 ); @@ -69,8 +69,8 @@ public: virtual void dispose() SAL_OVERRIDE; void GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol, - SwInsertTableOptions& rInsTblOpts, OUString& rTableAutoFmtName, - SwTableAutoFmt *& prTAFmt ); + SwInsertTableOptions& rInsTableOpts, OUString& rTableAutoFormatName, + SwTableAutoFormat *& prTAFormat ); }; #endif diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx index 13b5295dc973..071faaf87f5a 100644 --- a/sw/source/uibase/inc/javaedit.hxx +++ b/sw/source/uibase/inc/javaedit.hxx @@ -25,7 +25,7 @@ #include <vcl/button.hxx> class SwWrtShell; -class SwFldMgr; +class SwFieldMgr; class SwScriptField; namespace sfx2 { class FileDialogHelper; } @@ -50,8 +50,8 @@ private: bool bNew; bool bIsUrl; - SwScriptField* pFld; - SwFldMgr* pMgr; + SwScriptField* pField; + SwFieldMgr* pMgr; SwWrtShell* pSh; sfx2::FileDialogHelper* pFileDlg; VclPtr<vcl::Window> pOldDefDlgParent; @@ -66,7 +66,7 @@ private: virtual void Apply() SAL_OVERRIDE; void CheckTravel(); - void SetFld(); + void SetField(); public: SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh); diff --git a/sw/source/uibase/inc/macassgn.hxx b/sw/source/uibase/inc/macassgn.hxx index df51ea5a046c..1bb1800c295d 100644 --- a/sw/source/uibase/inc/macassgn.hxx +++ b/sw/source/uibase/inc/macassgn.hxx @@ -38,7 +38,7 @@ class SwMacroAssignDlg { public: static SfxEventNamesItem AddEvents( DlgEventType eType ); - static bool INetFmtDlg( vcl::Window* pParent, SwWrtShell& rSh, + static bool INetFormatDlg( vcl::Window* pParent, SwWrtShell& rSh, SvxMacroItem*& rpINetItem ); }; diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx index 1ae4b78829de..1ff9116abbb6 100644 --- a/sw/source/uibase/inc/mailmrge.hxx +++ b/sw/source/uibase/inc/mailmrge.hxx @@ -79,7 +79,7 @@ class SwMailMergeDlg : public SvxStandardDialog VclPtr<FixedText> m_pFilterFT; VclPtr<ListBox> m_pFilterLB; - VclPtr<ListBox> m_pAddressFldLB; + VclPtr<ListBox> m_pAddressFieldLB; VclPtr<FixedText> m_pSubjectFT; VclPtr<Edit> m_pSubjectED; VclPtr<FixedText> m_pFormatFT; @@ -117,7 +117,7 @@ class SwMailMergeDlg : public SvxStandardDialog public: SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rSh, const OUString& rSourceName, - const OUString& rTblName, + const OUString& rTableName, sal_Int32 nCommandType, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& xConnection, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0); diff --git a/sw/source/uibase/inc/mergetbl.hxx b/sw/source/uibase/inc/mergetbl.hxx index 5bd7548ca358..94fe4bfa94de 100644 --- a/sw/source/uibase/inc/mergetbl.hxx +++ b/sw/source/uibase/inc/mergetbl.hxx @@ -24,7 +24,7 @@ #include <vcl/fixed.hxx> #include <svx/stddlg.hxx> -class SwMergeTblDlg : public SvxStandardDialog +class SwMergeTableDlg : public SvxStandardDialog { VclPtr<RadioButton> m_pMergePrevRB; @@ -33,8 +33,8 @@ protected: virtual void Apply() SAL_OVERRIDE; public: - SwMergeTblDlg( vcl::Window *pParent, bool& rWithPrev ); - virtual ~SwMergeTblDlg(); + SwMergeTableDlg( vcl::Window *pParent, bool& rWithPrev ); + virtual ~SwMergeTableDlg(); virtual void dispose() SAL_OVERRIDE; }; diff --git a/sw/source/uibase/inc/numfmtlb.hxx b/sw/source/uibase/inc/numfmtlb.hxx index 8d285bea9a86..6a59a57cfefc 100644 --- a/sw/source/uibase/inc/numfmtlb.hxx +++ b/sw/source/uibase/inc/numfmtlb.hxx @@ -41,7 +41,7 @@ class SW_DLLPUBLIC NumFormatListBox : public ListBox DECL_DLLPRIVATE_LINK( SelectHdl, ListBox * ); SAL_DLLPRIVATE double GetDefValue(const short nFormatType) const; - SAL_DLLPRIVATE void Init(short nFormatType, bool bUsrFmts); + SAL_DLLPRIVATE void Init(short nFormatType, bool bUsrFormats); SAL_DLLPRIVATE SwView* GetView(); public: @@ -56,7 +56,7 @@ public: void SetFormatType(const short nFormatType); inline short GetFormatType() const { return nCurrFormatType; } - void SetDefFormat(const sal_uLong nDefFmt); + void SetDefFormat(const sal_uLong nDefFormat); sal_uLong GetFormat() const; inline LanguageType GetCurLanguage() const { return eCurLanguage;} diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index 6a0f8987b07f..5ac39f582816 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -32,7 +32,7 @@ #include <swlbox.hxx> #include <caption.hxx> -class SwFldMgr; +class SwFieldMgr; class SvTreeListEntry; class SwWrtShell; @@ -150,7 +150,7 @@ private: OUString m_sNone; - SwFldMgr* pMgr; + SwFieldMgr* pMgr; bool bHTMLMode; DECL_LINK(SelectHdl, void *); diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 8797615dd99d..eb8278469e8d 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -54,9 +54,9 @@ class SwContentOptPage : public SfxTabPage VclPtr<CheckBox> m_pSmoothCBox; VclPtr<CheckBox> m_pGrfCB; - VclPtr<CheckBox> m_pTblCB; + VclPtr<CheckBox> m_pTableCB; VclPtr<CheckBox> m_pDrwCB; - VclPtr<CheckBox> m_pFldNameCB; + VclPtr<CheckBox> m_pFieldNameCB; VclPtr<CheckBox> m_pPostItCB; VclPtr<VclFrame> m_pSettingsFrame; @@ -82,7 +82,7 @@ public: class SwAddPrinterTabPage : public SfxTabPage { VclPtr<CheckBox> m_pGrfCB; - VclPtr<CheckBox> m_pCtrlFldCB; + VclPtr<CheckBox> m_pCtrlFieldCB; VclPtr<CheckBox> m_pBackgroundCB; VclPtr<CheckBox> m_pBlackFontCB; VclPtr<CheckBox> m_pPrintHiddenTextCB; @@ -209,7 +209,7 @@ class SwTableOptionsTabPage : public SfxTabPage VclPtr<CheckBox> pBorderCB; VclPtr<CheckBox> pNumFormattingCB; - VclPtr<CheckBox> pNumFmtFormattingCB; + VclPtr<CheckBox> pNumFormatFormattingCB; VclPtr<CheckBox> pNumAlignmentCB; VclPtr<MetricField> pRowMoveMF; @@ -253,8 +253,8 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage VclPtr<CheckBox> m_pTabCB; VclPtr<CheckBox> m_pBreakCB; VclPtr<CheckBox> m_pCharHiddenCB; - VclPtr<CheckBox> m_pFldHiddenCB; - VclPtr<CheckBox> m_pFldHiddenParaCB; + VclPtr<CheckBox> m_pFieldHiddenCB; + VclPtr<CheckBox> m_pFieldHiddenParaCB; VclPtr<VclFrame> m_pDirectCursorFrame; VclPtr<CheckBox> m_pOnOffCB; @@ -299,7 +299,7 @@ class SwMarkPreview : public vcl::Window Color m_aMarkCol; // marks Color m_aLineCol; // general lines Color m_aShadowCol; // shadow - Color m_aTxtCol; // text + Color m_aTextCol; // text Color m_aPrintAreaCol; // frame for print area Rectangle aPage; diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx index d4ae3c69821e..78f96c8c0dbb 100644 --- a/sw/source/uibase/inc/outline.hxx +++ b/sw/source/uibase/inc/outline.hxx @@ -74,7 +74,7 @@ public: virtual void dispose() SAL_OVERRIDE; SwNumRule* GetNumRule() {return pNumRule;} - sal_uInt16 GetLevel(const OUString &rFmtName) const; + sal_uInt16 GetLevel(const OUString &rFormatName) const; OUString* GetCollNames() {return aCollNames;} static sal_uInt16 GetActNumLevel() {return nNumLevel;} @@ -87,7 +87,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage VclPtr<ListBox> m_pCollBox; VclPtr<SwNumberingTypeListBox> m_pNumberBox; - VclPtr<ListBox> m_pCharFmtLB; + VclPtr<ListBox> m_pCharFormatLB; VclPtr<FixedText> m_pAllLevelFT; VclPtr<NumericField> m_pAllLevelNF; VclPtr<Edit> m_pPrefixED; @@ -95,7 +95,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage VclPtr<NumericField> m_pStartEdit; VclPtr<NumberingPreview> m_pPreviewWIN; - OUString aNoFmtName; + OUString aNoFormatName; OUString aSaveCollNames[MAXLEVEL]; SwWrtShell* pSh; SwNumRule* pNumRule; @@ -109,7 +109,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage DECL_LINK( NumberSelect, SwNumberingTypeListBox * ); DECL_LINK(DelimModify, void *); DECL_LINK( StartModified, NumericField * ); - DECL_LINK(CharFmtHdl, void *); + DECL_LINK(CharFormatHdl, void *); void Update(); diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx index 68fa0fd99ba4..a0932306237a 100644 --- a/sw/source/uibase/inc/redlndlg.hxx +++ b/sw/source/uibase/inc/redlndlg.hxx @@ -79,7 +79,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg OUString sDeleted; OUString sFormated; OUString sTableChgd; - OUString sFmtCollSet; + OUString sFormatCollSet; OUString sFilterAction; OUString sAutoFormat; VclPtr<SvxTPView> pTPView; @@ -88,7 +88,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg Link<> aOldDeselectHdl; bool bOnlyFormatedRedlines; bool bHasReadonlySel; - bool bRedlnAutoFmt; + bool bRedlnAutoFormat; // prevent update dialog data during longer operations (cf #102657#) bool bInhibitActivate; @@ -105,7 +105,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg DECL_DLLPRIVATE_LINK( CommandHdl, void* ); SAL_DLLPRIVATE sal_uInt16 CalcDiff(sal_uInt16 nStart, bool bChild); - SAL_DLLPRIVATE void InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFmt); + SAL_DLLPRIVATE void InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFormat); SAL_DLLPRIVATE void InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd = USHRT_MAX); SAL_DLLPRIVATE void RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd); SAL_DLLPRIVATE void InitAuthors(); @@ -116,13 +116,13 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg SAL_DLLPRIVATE sal_uInt16 GetRedlinePos( const SvTreeListEntry& rEntry) const; public: - SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer *pBuilder, vcl::Window *pContentArea, bool bAutoFmt = false); + SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer *pBuilder, vcl::Window *pContentArea, bool bAutoFormat = false); virtual ~SwRedlineAcceptDlg(); DECL_LINK( FilterChangedHdl, void *pDummy = 0 ); inline SvxAcceptChgCtr& GetChgCtrl() { return *aTabPagesCTRL.get(); } - inline bool HasRedlineAutoFmt() const { return bRedlnAutoFmt; } + inline bool HasRedlineAutoFormat() const { return bRedlnAutoFormat; } void Init(sal_uInt16 nStart = 0); void CallAcceptReject( bool bSelect, bool bAccept ); diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx index b0ea63315807..08fc1c6e9c8f 100644 --- a/sw/source/uibase/inc/regionsw.hxx +++ b/sw/source/uibase/inc/regionsw.hxx @@ -102,8 +102,8 @@ class SwEditRegionDlg : public SfxModalDialog Image BuildBitmap(bool bProtect, bool bHidden); - void RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pEntry); - size_t FindArrPos(const SwSectionFmt* pFmt); + void RecurseList( const SwSectionFormat* pFormat, SvTreeListEntry* pEntry); + size_t FindArrPos(const SwSectionFormat* pFormat); DECL_LINK( GetFirstEntryHdl, SvTreeListBox * ); DECL_LINK( DeselectHdl, SvTreeListBox * ); @@ -196,28 +196,28 @@ public: const SfxItemSet* rAttrSet); }; -class SwSectionFtnEndTabPage : public SfxTabPage +class SwSectionFootnoteEndTabPage : public SfxTabPage { - VclPtr<CheckBox> pFtnNtAtTextEndCB; + VclPtr<CheckBox> pFootnoteNtAtTextEndCB; - VclPtr<CheckBox> pFtnNtNumCB; - VclPtr<FixedText> pFtnOffsetLbl; - VclPtr<NumericField> pFtnOffsetFld; + VclPtr<CheckBox> pFootnoteNtNumCB; + VclPtr<FixedText> pFootnoteOffsetLbl; + VclPtr<NumericField> pFootnoteOffsetField; - VclPtr<CheckBox> pFtnNtNumFmtCB; - VclPtr<FixedText> pFtnPrefixFT; - VclPtr<Edit> pFtnPrefixED; - VclPtr<SwNumberingTypeListBox> pFtnNumViewBox; - VclPtr<FixedText> pFtnSuffixFT; - VclPtr<Edit> pFtnSuffixED; + VclPtr<CheckBox> pFootnoteNtNumFormatCB; + VclPtr<FixedText> pFootnotePrefixFT; + VclPtr<Edit> pFootnotePrefixED; + VclPtr<SwNumberingTypeListBox> pFootnoteNumViewBox; + VclPtr<FixedText> pFootnoteSuffixFT; + VclPtr<Edit> pFootnoteSuffixED; VclPtr<CheckBox> pEndNtAtTextEndCB; VclPtr<CheckBox> pEndNtNumCB; VclPtr<FixedText> pEndOffsetLbl; - VclPtr<NumericField> pEndOffsetFld; + VclPtr<NumericField> pEndOffsetField; - VclPtr<CheckBox> pEndNtNumFmtCB; + VclPtr<CheckBox> pEndNtNumFormatCB; VclPtr<FixedText> pEndPrefixFT; VclPtr<Edit> pEndPrefixED; VclPtr<SwNumberingTypeListBox> pEndNumViewBox; @@ -225,11 +225,11 @@ class SwSectionFtnEndTabPage : public SfxTabPage VclPtr<Edit> pEndSuffixED; DECL_LINK( FootEndHdl, CheckBox * ); - void ResetState( bool bFtn, const SwFmtFtnEndAtTxtEnd& ); + void ResetState( bool bFootnote, const SwFormatFootnoteEndAtTextEnd& ); public: - SwSectionFtnEndTabPage( vcl::Window *pParent, const SfxItemSet &rAttrSet ); - virtual ~SwSectionFtnEndTabPage(); + SwSectionFootnoteEndTabPage( vcl::Window *pParent, const SfxItemSet &rAttrSet ); + virtual ~SwSectionFootnoteEndTabPage(); virtual void dispose() SAL_OVERRIDE; virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/splittbl.hxx b/sw/source/uibase/inc/splittbl.hxx index cc6a96d2c5f7..456108504aac 100644 --- a/sw/source/uibase/inc/splittbl.hxx +++ b/sw/source/uibase/inc/splittbl.hxx @@ -25,9 +25,9 @@ class SwWrtShell; -class SwSplitTblDlg : public SvxStandardDialog +class SwSplitTableDlg : public SvxStandardDialog { - VclPtr<RadioButton> mpCntntCopyRB; + VclPtr<RadioButton> mpContentCopyRB; VclPtr<RadioButton> mpBoxAttrCopyWithParaRB ; VclPtr<RadioButton> mpBoxAttrCopyNoParaRB ; VclPtr<RadioButton> mpBorderCopyRB; @@ -39,8 +39,8 @@ protected: virtual void Apply() SAL_OVERRIDE; public: - SwSplitTblDlg( vcl::Window *pParent, SwWrtShell &rSh ); - virtual ~SwSplitTblDlg(); + SwSplitTableDlg( vcl::Window *pParent, SwWrtShell &rSh ); + virtual ~SwSplitTableDlg(); virtual void dispose() SAL_OVERRIDE; sal_uInt16 GetSplitMode() const { return m_nSplit; } diff --git a/sw/source/uibase/inc/srtdlg.hxx b/sw/source/uibase/inc/srtdlg.hxx index 7facf548a45d..44d912562767 100644 --- a/sw/source/uibase/inc/srtdlg.hxx +++ b/sw/source/uibase/inc/srtdlg.hxx @@ -64,9 +64,9 @@ class SwSortDlg : public SvxStandardDialog VclPtr<CheckBox> m_pCaseCB; - OUString aColTxt; - OUString aRowTxt; - OUString aNumericTxt; + OUString aColText; + OUString aRowText; + OUString aNumericText; SwWrtShell &rSh; CollatorResource* pColRes; diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx index 29b3df2dee15..039875b801d1 100644 --- a/sw/source/uibase/inc/swdtflvr.hxx +++ b/sw/source/uibase/inc/swdtflvr.hxx @@ -34,7 +34,7 @@ class SwDoc; class SwDocFac; class SwTextBlocks; class SwWrtShell; -class SvxClipboardFmtItem; +class SvxClipboardFormatItem; class SwFrameShell; class SwView_Impl; @@ -89,9 +89,9 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper SotClipboardFormatId nFormat, SotExchangeDest nDestination ); static bool _PasteFileContent( TransferableDataHelper&, - SwWrtShell& rSh, SotClipboardFormatId nFmt, bool bMsg ); + SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bMsg ); static bool _PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, - SotClipboardFormatId nFmt, sal_uInt8 nActionFlags, bool bMsg ); + SotClipboardFormatId nFormat, sal_uInt8 nActionFlags, bool bMsg ); static bool _PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& rSh, sal_uInt16 nAction, const Point* pPt, bool bInsertGRF ); @@ -103,21 +103,21 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper const Point* pPt, sal_uInt8 nActionFlags, bool bNeedToSelectBeforePaste); static bool _PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, - SotClipboardFormatId nFmt, sal_uInt16 nAction, const Point* pPt, + SotClipboardFormatId nFormat, sal_uInt16 nAction, const Point* pPt, sal_uInt8 nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste); static bool _PasteImageMap( TransferableDataHelper& rData, SwWrtShell& rSh ); static bool _PasteAsHyperlink( TransferableDataHelper& rData, - SwWrtShell& rSh, SotClipboardFormatId nFmt ); + SwWrtShell& rSh, SotClipboardFormatId nFormat ); static bool _PasteFileName( TransferableDataHelper& rData, - SwWrtShell& rSh, SotClipboardFormatId nFmt, sal_uInt16 nAction, + SwWrtShell& rSh, SotClipboardFormatId nFormat, sal_uInt16 nAction, const Point* pPt, sal_uInt8 nActionFlags, bool bMsg, bool * graphicInserted ); static bool _PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh, - SotClipboardFormatId nFmt, bool bLink, const Point* pDragPt, + SotClipboardFormatId nFormat, bool bLink, const Point* pDragPt, bool bMsg ); static bool _PasteFileList( TransferableDataHelper& rData, @@ -170,7 +170,7 @@ public: static bool Paste( SwWrtShell&, TransferableDataHelper& ); static bool PasteData( TransferableDataHelper& rData, SwWrtShell& rSh, sal_uInt16 nAction, SotClipboardFormatId nFormat, - SotExchangeDest nDestination, bool bIsPasteFmt, + SotExchangeDest nDestination, bool bIsPasteFormat, bool bIsDefault, const Point* pDDPos = 0, sal_Int8 nDropAction = 0, bool bPasteSelection = false ); @@ -182,9 +182,9 @@ public: static bool PasteFormat( SwWrtShell& rSh, TransferableDataHelper& rData, SotClipboardFormatId nFormat ); - static void FillClipFmtItem( const SwWrtShell& rSh, + static void FillClipFormatItem( const SwWrtShell& rSh, const TransferableDataHelper& rData, - SvxClipboardFmtItem & rToFill ); + SvxClipboardFormatItem & rToFill ); // Interfaces for Drag & Drop void StartDrag( vcl::Window* pWin, const Point& rPos ); diff --git a/sw/source/uibase/inc/swtablerep.hxx b/sw/source/uibase/inc/swtablerep.hxx index be8d2216dc05..b98e84037816 100644 --- a/sw/source/uibase/inc/swtablerep.hxx +++ b/sw/source/uibase/inc/swtablerep.hxx @@ -29,7 +29,7 @@ class SW_DLLPUBLIC SwTableRep { TColumn* pTColumns; - SwTwips nTblWidth; + SwTwips nTableWidth; SwTwips nSpace; SwTwips nLeftSpace; SwTwips nRightSpace; @@ -53,8 +53,8 @@ public: SwTwips GetRightSpace() const {return nRightSpace;} void SetRightSpace(SwTwips nSet) {nRightSpace = nSet;} - SwTwips GetWidth() const {return nTblWidth;} - void SetWidth(SwTwips nSet) {nTblWidth = nSet;} + SwTwips GetWidth() const {return nTableWidth;} + void SetWidth(SwTwips nSet) {nTableWidth = nSet;} sal_uInt16 GetWidthPercent() const {return nWidthPercent;} void SetWidthPercent(sal_uInt16 nSet) {nWidthPercent = nSet;} diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx index fadb5655c59c..6934ec058952 100644 --- a/sw/source/uibase/inc/swuiccoll.hxx +++ b/sw/source/uibase/inc/swuiccoll.hxx @@ -22,7 +22,7 @@ #include <tools/resary.hxx> class SwWrtShell; -class SwFmt; +class SwFormat; class SwCondCollPage : public SfxTabPage { @@ -43,7 +43,7 @@ class SwCondCollPage : public SfxTabPage SwWrtShell &m_rSh; const CommandStruct*m_pCmds; - SwFmt* m_pFmt; + SwFormat* m_pFormat; bool m_bNewTemplate; @@ -70,7 +70,7 @@ public: virtual bool FillItemSet( SfxItemSet *rSet) SAL_OVERRIDE; virtual void Reset (const SfxItemSet *rSet) SAL_OVERRIDE; - void SetCollection( SwFmt* pFormat, bool bNew ); + void SetCollection( SwFormat* pFormat, bool bNew ); }; #endif diff --git a/sw/source/uibase/inc/tablemgr.hxx b/sw/source/uibase/inc/tablemgr.hxx index 2276631dc818..6be1fbe54d29 100644 --- a/sw/source/uibase/inc/tablemgr.hxx +++ b/sw/source/uibase/inc/tablemgr.hxx @@ -23,10 +23,10 @@ #include "swtypes.hxx" #include "tabcol.hxx" -class SwFrmFmt; +class SwFrameFormat; class SwWrtShell; namespace vcl { class Window; } -class SwFlyFrmFmt; +class SwFlyFrameFormat; namespace com { namespace sun { namespace star { namespace frame { @@ -41,7 +41,7 @@ const char cParaDelim = 0x0a; class SW_DLLPUBLIC SwTableFUNC { - SwFrmFmt *pFmt; + SwFrameFormat *pFormat; SwWrtShell *pSh; bool bCopy; SwTabCols aCols; @@ -50,8 +50,8 @@ private: SAL_DLLPRIVATE int GetRightSeparator(int nNum) const; public: - inline SwTableFUNC(SwFrmFmt &); - SwTableFUNC(SwWrtShell *pShell, bool bCopyFmt = false); + inline SwTableFUNC(SwFrameFormat &); + SwTableFUNC(SwWrtShell *pShell, bool bCopyFormat = false); ~SwTableFUNC(); void InitTabCols(); @@ -62,9 +62,9 @@ public: sal_uInt16 GetColCount() const; sal_uInt16 GetCurColNum() const; - bool IsTableSelected() const { return pFmt != 0; } + bool IsTableSelected() const { return pFormat != 0; } - const SwFrmFmt *GetTableFmt() const { return pFmt; } + const SwFrameFormat *GetTableFormat() const { return pFormat; } SwWrtShell* GetShell() const { return pSh; } @@ -73,11 +73,11 @@ public: /// @return the XModel of the newly inserted chart if successful ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > - InsertChart( ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > &rxDataProvider, bool bFillWithData, const OUString &rCellRange, SwFlyFrmFmt** ppFlyFrmFmt = 0 ); + InsertChart( ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > &rxDataProvider, bool bFillWithData, const OUString &rCellRange, SwFlyFrameFormat** ppFlyFrameFormat = 0 ); }; -inline SwTableFUNC::SwTableFUNC(SwFrmFmt &rFmt) : - pFmt(&rFmt), +inline SwTableFUNC::SwTableFUNC(SwFrameFormat &rFormat) : + pFormat(&rFormat), pSh(0), bCopy(false) { diff --git a/sw/source/uibase/inc/tautofmt.hxx b/sw/source/uibase/inc/tautofmt.hxx index fac2b1224840..72e62c2fe631 100644 --- a/sw/source/uibase/inc/tautofmt.hxx +++ b/sw/source/uibase/inc/tautofmt.hxx @@ -30,12 +30,12 @@ #include <vcl/virdev.hxx> -class SwTableAutoFmt; -class AutoFmtPreview; -class SwTableAutoFmtTbl; +class SwTableAutoFormat; +class AutoFormatPreview; +class SwTableAutoFormatTable; class SwWrtShell; -enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE }; +enum AutoFormatLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE }; class SwAutoFormatDlg : public SfxModalDialog { @@ -57,34 +57,34 @@ class SwAutoFormatDlg : public SfxModalDialog OUString aStrDelTitle; OUString aStrDelMsg; OUString aStrRenameTitle; - OUString aStrInvalidFmt; - VclPtr<AutoFmtPreview> m_pWndPreview; + OUString aStrInvalidFormat; + VclPtr<AutoFormatPreview> m_pWndPreview; SwWrtShell* pShell; - SwTableAutoFmtTbl* pTableTbl; + SwTableAutoFormatTable* pTableTable; sal_uInt8 nIndex; sal_uInt8 nDfltStylePos; bool bCoreDataChanged : 1; - bool bSetAutoFmt : 1; + bool bSetAutoFormat : 1; - void Init( const SwTableAutoFmt* pSelFmt ); - void UpdateChecks( const SwTableAutoFmt&, bool bEnableBtn ); + void Init( const SwTableAutoFormat* pSelFormat ); + void UpdateChecks( const SwTableAutoFormat&, bool bEnableBtn ); DECL_LINK( CheckHdl, Button * ); DECL_LINK(OkHdl, void *); DECL_LINK( AddHdl, void * ); DECL_LINK( RemoveHdl, void * ); DECL_LINK( RenameHdl, void * ); - DECL_LINK( SelFmtHdl, void * ); + DECL_LINK( SelFormatHdl, void * ); public: SwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell, - bool bSetAutoFmt = true, - const SwTableAutoFmt* pSelFmt = 0 ); + bool bSetAutoFormat = true, + const SwTableAutoFormat* pSelFormat = 0 ); virtual ~SwAutoFormatDlg(); virtual void dispose() SAL_OVERRIDE; - void FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const; + void FillAutoFormatOfIndex( SwTableAutoFormat*& rToFill ) const; }; #endif // SW_AUTOFMT_HXX diff --git a/sw/source/uibase/inc/tblnumfm.hxx b/sw/source/uibase/inc/tblnumfm.hxx index 713084bea011..e7c1411acca4 100644 --- a/sw/source/uibase/inc/tblnumfm.hxx +++ b/sw/source/uibase/inc/tblnumfm.hxx @@ -24,10 +24,10 @@ namespace vcl { class Window; } class SfxItemSet; -class SwNumFmtDlg : public SfxSingleTabDialog +class SwNumFormatDlg : public SfxSingleTabDialog { public: - SwNumFmtDlg(vcl::Window* pParent, const SfxItemSet& rSet); + SwNumFormatDlg(vcl::Window* pParent, const SfxItemSet& rSet); }; #endif diff --git a/sw/source/uibase/inc/textsh.hxx b/sw/source/uibase/inc/textsh.hxx index 8ac0722f5201..7c192aadb049 100644 --- a/sw/source/uibase/inc/textsh.hxx +++ b/sw/source/uibase/inc/textsh.hxx @@ -24,12 +24,12 @@ #include <unotools/caserotate.hxx> class AbstractSvxPostItDialog; -class SwFldMgr; +class SwFieldMgr; class SvxHyperlinkItem; class SwTextShell: public SwBaseShell { - SwFldMgr* pPostItFldMgr; + SwFieldMgr* pPostItFieldMgr; RotateTransliteration m_aRotateCase; void InsertSymbol( SfxRequest& ); diff --git a/sw/source/uibase/inc/titlepage.hxx b/sw/source/uibase/inc/titlepage.hxx index a881cc41ff6c..40789e8ca2c3 100644 --- a/sw/source/uibase/inc/titlepage.hxx +++ b/sw/source/uibase/inc/titlepage.hxx @@ -43,7 +43,7 @@ private: SwWrtShell *mpSh; - const SwFmtPageDesc *mpPageFmtDesc; + const SwFormatPageDesc *mpPageFormatDesc; SwPageDesc *mpTitleDesc; const SwPageDesc *mpIndexDesc; diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx index 827c02e2fa4e..4bf83b29e1af 100644 --- a/sw/source/uibase/inc/uiitems.hxx +++ b/sw/source/uibase/inc/uiitems.hxx @@ -29,15 +29,15 @@ class IntlWrapper; class SwPaM; // container for FootNote -class SW_DLLPUBLIC SwPageFtnInfoItem : public SfxPoolItem +class SW_DLLPUBLIC SwPageFootnoteInfoItem : public SfxPoolItem { - SwPageFtnInfo aFtnInfo; + SwPageFootnoteInfo aFootnoteInfo; public: - SwPageFtnInfoItem(const sal_uInt16 nId, SwPageFtnInfo& rInfo); - SwPageFtnInfoItem(const SwPageFtnInfoItem& rItem ); - virtual ~SwPageFtnInfoItem(); + SwPageFootnoteInfoItem(const sal_uInt16 nId, SwPageFootnoteInfo& rInfo); + SwPageFootnoteInfoItem(const SwPageFootnoteInfoItem& rItem ); + virtual ~SwPageFootnoteInfoItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE; virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE; @@ -50,9 +50,9 @@ public: virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE; virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE; - SwPageFtnInfo& GetPageFtnInfo() { return aFtnInfo; } - const SwPageFtnInfo& GetPageFtnInfo() const { return aFtnInfo; } - void SetPageFtnInfo(SwPageFtnInfo& rInf) { aFtnInfo = rInf; } + SwPageFootnoteInfo& GetPageFootnoteInfo() { return aFootnoteInfo; } + const SwPageFootnoteInfo& GetPageFootnoteInfo() const { return aFootnoteInfo; } + void SetPageFootnoteInfo(SwPageFootnoteInfo& rInf) { aFootnoteInfo = rInf; } }; class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem diff --git a/sw/source/uibase/inc/uinums.hxx b/sw/source/uibase/inc/uinums.hxx index ae2f14446a56..65823dd0231e 100644 --- a/sw/source/uibase/inc/uinums.hxx +++ b/sw/source/uibase/inc/uinums.hxx @@ -31,38 +31,38 @@ namespace sw { class StoredChapterNumberingRules; } #define MAX_NUM_RULES 9 -typedef boost::ptr_vector<SfxPoolItem> _SwNumFmtsAttrs; +typedef boost::ptr_vector<SfxPoolItem> _SwNumFormatsAttrs; class SW_DLLPUBLIC SwNumRulesWithName { OUString maName; // the NumRule's formats _have_ to be independent of a document // (They should always be there!) - class SAL_DLLPRIVATE _SwNumFmtGlobal + class SAL_DLLPRIVATE _SwNumFormatGlobal { friend class SwNumRulesWithName; - SwNumFmt aFmt; - OUString sCharFmtName; + SwNumFormat aFormat; + OUString sCharFormatName; sal_uInt16 nCharPoolId; - _SwNumFmtsAttrs aItems; + _SwNumFormatsAttrs aItems; - _SwNumFmtGlobal& operator=( const _SwNumFmtGlobal& ) SAL_DELETED_FUNCTION; + _SwNumFormatGlobal& operator=( const _SwNumFormatGlobal& ) SAL_DELETED_FUNCTION; public: - _SwNumFmtGlobal( const SwNumFmt& rFmt ); - _SwNumFmtGlobal( const _SwNumFmtGlobal& ); - ~_SwNumFmtGlobal(); + _SwNumFormatGlobal( const SwNumFormat& rFormat ); + _SwNumFormatGlobal( const _SwNumFormatGlobal& ); + ~_SwNumFormatGlobal(); - void ChgNumFmt( SwWrtShell& rSh, SwNumFmt& rChg ) const; + void ChgNumFormat( SwWrtShell& rSh, SwNumFormat& rChg ) const; }; - _SwNumFmtGlobal* aFmts[ MAXLEVEL ]; + _SwNumFormatGlobal* aFormats[ MAXLEVEL ]; protected: friend class sw::StoredChapterNumberingRules; friend class SwChapterNumRules; void SetName(const OUString& rSet) {maName = rSet;} - void SetNumFmt(size_t, SwNumFmt const&, OUString const&); + void SetNumFormat(size_t, SwNumFormat const&, OUString const&); SwNumRulesWithName(); public: @@ -76,7 +76,7 @@ public: void MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const; - void GetNumFmt(size_t, SwNumFmt const*&, OUString const*&) const; + void GetNumFormat(size_t, SwNumFormat const*&, OUString const*&) const; }; class SW_DLLPUBLIC SwChapterNumRules diff --git a/sw/source/uibase/inc/uitool.hxx b/sw/source/uibase/inc/uitool.hxx index fe7aebc9b6f4..fc4620d377e4 100644 --- a/sw/source/uibase/inc/uitool.hxx +++ b/sw/source/uibase/inc/uitool.hxx @@ -31,7 +31,7 @@ class SvxTabStopItem; class SwWrtShell; class ListBox; class SwDocShell; -class SwFrmFmt; +class SwFrameFormat; class SwTabCols; class DateTime; class SfxViewFrame; @@ -96,7 +96,7 @@ SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, boo SW_DLLPUBLIC sal_Int32 InsertStringSorted(const OUString& rEntry, ListBox& rToFill, sal_Int32 nOffset); // Get table width and alignement -SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, +SwTwips GetTableWidth( SwFrameFormat* pFormat, SwTabCols& rCols, sal_uInt16 *pPercent, SwWrtShell* pSh ); OUString GetAppLangDateTimeString( const DateTime& ); diff --git a/sw/source/uibase/inc/usrpref.hxx b/sw/source/uibase/inc/usrpref.hxx index e3baf4647561..ee90ed801585 100644 --- a/sw/source/uibase/inc/usrpref.hxx +++ b/sw/source/uibase/inc/usrpref.hxx @@ -127,7 +127,7 @@ class SwMasterUsrPref : public SwViewOption friend class SwCursorConfig; friend class SwWebColorConfig; - SwFldUpdateFlags eFldUpdateFlags; //update of fields and charts + SwFieldUpdateFlags eFieldUpdateFlags; //update of fields and charts sal_Int32 nLinkUpdateMode; FieldUnit eUserMetric; FieldUnit eHScrollMetric; @@ -182,25 +182,25 @@ public: void SetUpdateFields(bool bSet, bool bNoModify = false) { - if(bSet && eFldUpdateFlags == AUTOUPD_OFF) + if(bSet && eFieldUpdateFlags == AUTOUPD_OFF) { - eFldUpdateFlags = AUTOUPD_FIELD_ONLY; + eFieldUpdateFlags = AUTOUPD_FIELD_ONLY; if(!bNoModify) aContentConfig.SetModified(); } else if(!bSet) { - eFldUpdateFlags = AUTOUPD_OFF; + eFieldUpdateFlags = AUTOUPD_OFF; if(!bNoModify) aContentConfig.SetModified(); } }; - bool IsUpdateFields()const {return eFldUpdateFlags != AUTOUPD_OFF; } + bool IsUpdateFields()const {return eFieldUpdateFlags != AUTOUPD_OFF; } - SwFldUpdateFlags GetFldUpdateFlags()const {return eFldUpdateFlags;} - void SetFldUpdateFlags(SwFldUpdateFlags eSet, bool bNoModify = false) + SwFieldUpdateFlags GetFieldUpdateFlags()const {return eFieldUpdateFlags;} + void SetFieldUpdateFlags(SwFieldUpdateFlags eSet, bool bNoModify = false) { - eFldUpdateFlags = eSet; + eFieldUpdateFlags = eSet; if(!bNoModify) aContentConfig.SetModified(); } @@ -209,18 +209,18 @@ public: { if(bSet) { - eFldUpdateFlags = AUTOUPD_FIELD_AND_CHARTS; + eFieldUpdateFlags = AUTOUPD_FIELD_AND_CHARTS; if(!bNoModify) aContentConfig.SetModified(); } - else if(eFldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS) + else if(eFieldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS) { - eFldUpdateFlags = AUTOUPD_FIELD_ONLY; + eFieldUpdateFlags = AUTOUPD_FIELD_ONLY; if(!bNoModify) aContentConfig.SetModified(); } }; - bool IsUpdateCharts()const {return eFldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS; } + bool IsUpdateCharts()const {return eFieldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS; } FieldUnit GetMetric() const { return eUserMetric;} void SetMetric(FieldUnit eSet, bool bNoModify = false) diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx index 9d6a9b21e23c..a46879986888 100644 --- a/sw/source/uibase/inc/view.hxx +++ b/sw/source/uibase/inc/view.hxx @@ -39,10 +39,10 @@ class Button; class ImageButton; -class SwTxtFmtColl; +class SwTextFormatColl; class SwPageDesc; -class SwFrmFmt; -class SwCharFmt; +class SwFrameFormat; +class SwCharFormat; class SwNumRule; class SwGlossaryHdl; class SwDrawBase; @@ -71,7 +71,7 @@ class SvGlobalName; class SvtAccessibilityOptions; class SwTransferable; class SwMailMergeConfigItem; -class SwTxtNode; // #i23726# +class SwTextNode; // #i23726# class SwFormatClipboard; struct SwConversionArgs; class Graphic; @@ -122,10 +122,10 @@ struct SwApplyTemplate { union { - SwTxtFmtColl* pTxtColl; + SwTextFormatColl* pTextColl; SwPageDesc* pPageDesc; - SwFrmFmt* pFrmFmt; - SwCharFmt* pCharFmt; + SwFrameFormat* pFrameFormat; + SwCharFormat* pCharFormat; SwNumRule* pNumRule; } aColl; @@ -140,7 +140,7 @@ struct SwApplyTemplate m_pFormatClipboard(0), bUndo(false) { - aColl.pTxtColl = 0; + aColl.pTextColl = 0; } }; @@ -182,7 +182,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell OUString m_sOldSectionName; Point m_aTabColFromDocPos; // moving table colmns out of the document - SwTxtNode * m_pNumRuleNodeFromDoc; // Moving indent of numrule #i23726# + SwTextNode * m_pNumRuleNodeFromDoc; // Moving indent of numrule #i23726# Size m_aDocSz; // current document size Rectangle m_aVisArea; // visible region @@ -214,7 +214,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SwGlossaryHdl *m_pGlosHdl; // handle text block SwDrawBase *m_pDrawActual; - const SwFrmFmt *m_pLastTableFormat; + const SwFrameFormat *m_pLastTableFormat; SwFormatClipboard *m_pFormatClipboard; //holds data for format paintbrush @@ -328,7 +328,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SAL_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = 0 ); SAL_DLLPRIVATE void HyphStart( SvxSpellArea eSpell ); - SAL_DLLPRIVATE bool CheckSpecialCntnt(); + SAL_DLLPRIVATE bool CheckSpecialContent(); SAL_DLLPRIVATE void SpellKontext(bool bOn = true) { m_bCenterCrsr = bOn; m_bAlwaysShowSel = bOn; } @@ -377,8 +377,8 @@ protected: void SetImageButtonColor(Color& rColor); - const SwFrmFmt* GetLastTblFrmFmt() const {return m_pLastTableFormat;} - void SetLastTblFrmFmt(const SwFrmFmt* pSet) {m_pLastTableFormat = pSet;} + const SwFrameFormat* GetLastTableFrameFormat() const {return m_pLastTableFormat;} + void SetLastTableFrameFormat(const SwFrameFormat* pSet) {m_pLastTableFormat = pSet;} // form letter execution void GenerateFormLetter(bool bUseCurrentDocument); @@ -454,7 +454,7 @@ public: bool ExecSmartTagPopup( const Point& rPt ); DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*); - bool ExecDrwTxtSpellPopup(const Point& rPt); + bool ExecDrwTextSpellPopup(const Point& rPt); void SetTabColFromDocPos( const Point &rPt ) { m_aTabColFromDocPos = rPt; } void SetTabColFromDoc( bool b ) { m_bTabColFromDoc = b; } @@ -463,7 +463,7 @@ public: bool IsTabRowFromDoc() const { return m_bTabRowFromDoc; } // -> #i23726# - void SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode ) + void SetNumRuleNodeFromDoc( SwTextNode * pNumRuleNode ) { m_pNumRuleNodeFromDoc = pNumRuleNode; } void SetNumIndentFromDoc(bool b) { m_bNumIndentFromDoc = b; } bool IsNumIndentFromDoc() const { return NULL != m_pNumRuleNodeFromDoc; } diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 6d66771875ff..cf8b019860b3 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -41,7 +41,7 @@ class SwInputFieldList; class SwSectionData; class Timer; class SvxMacro; -class SwFmtINetFmt; +class SwFormatINetFormat; class SvxAutoCorrect; class NaviContentBookmark; struct SwCallMouseEvent; @@ -86,7 +86,7 @@ private: using SwCrsrShell::Down; using SwCrsrShell::LeftMargin; using SwCrsrShell::RightMargin; - using SwCrsrShell::SelectTxtAttr; + using SwCrsrShell::SelectTextAttr; using SwCrsrShell::GotoPage; using SwFEShell::InsertObject; using SwEditShell::AutoCorrect; @@ -160,8 +160,8 @@ public: void Invalidate(); // select table cells for editing of formulas in the ribbonbar - inline void SelTblCells( const Link<> &rLink, bool bMark = true ); - inline void EndSelTblCells(); + inline void SelTableCells( const Link<> &rLink, bool bMark = true ); + inline void EndSelTableCells(); // leave per word or per line selection mode. Is usually called in MB-Up. bool IsExtSel() const { return m_bSelWrd || m_bSelLn; } @@ -227,7 +227,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); bool SelectTableCol(); bool SelectTableCell(); - bool SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr = 0 ); + bool SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr = 0 ); // per column jumps bool StartOfColumn ( bool bSelect = false ); @@ -249,7 +249,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); bool PageCrsr(SwTwips lOffset, bool bSelect); // update fields - void UpdateInputFlds( SwInputFieldList* pLst = 0 ); + void UpdateInputFields( SwInputFieldList* pLst = 0 ); void NoEdit(bool bHideCrsr = true); void Edit(); @@ -326,13 +326,13 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); bool bActivate = true, sal_uInt16 nSlotId = 0); // SlotId for dialog - bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 ); + bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrameFormat **pFlyFrameFormat = 0 ); void LaunchOLEObj( long nVerb = 0 ); // start server virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset ) SAL_OVERRIDE; virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj, const SwRect *pFlyPrtRect = 0, const SwRect *pFlyFrmRect = 0, - const bool bNoTxtFrmPrtAreaChanged = false ) SAL_OVERRIDE; + const bool bNoTextFrmPrtAreaChanged = false ) SAL_OVERRIDE; virtual void ConnectObj( svt::EmbeddedObjectRef& xIPObj, const SwRect &rPrt, const SwRect &rFrm ) SAL_OVERRIDE; @@ -343,11 +343,11 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); GETSTYLE_CREATESOME, // if on PoolId create mapt GETSTYLE_CREATEANY }; // return standard if applicable - SwTxtFmtColl* GetParaStyle(const OUString &rCollName, + SwTextFormatColl* GetParaStyle(const OUString &rCollName, GetStyle eCreate = GETSTYLE_NOCREATE); - SwCharFmt* GetCharStyle(const OUString &rFmtName, + SwCharFormat* GetCharStyle(const OUString &rFormatName, GetStyle eCreate = GETSTYLE_NOCREATE); - SwFrmFmt* GetTblStyle(const OUString &rFmtName); + SwFrameFormat* GetTableStyle(const OUString &rFormatName); void SetPageStyle(const OUString &rCollName); @@ -389,9 +389,9 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void MoveCrsr( bool bWithSelect = false ); // update input fields - bool StartInputFldDlg(SwField*, bool bNextButton, vcl::Window* pParentWin = 0, OString* pWindowState = 0); + bool StartInputFieldDlg(SwField*, bool bNextButton, vcl::Window* pParentWin = 0, OString* pWindowState = 0); // update DropDown fields - bool StartDropDownFldDlg(SwField*, bool bNextButton, OString* pWindowState = 0); + bool StartDropDownFieldDlg(SwField*, bool bNextButton, OString* pWindowState = 0); //"Handler" for changes at DrawView - for controls. virtual void DrawSelChanged( ) SAL_OVERRIDE; @@ -405,7 +405,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); bool GotoFieldmark(::sw::mark::IFieldmark const * const pMark); - bool GotoField( const SwFmtFld& rFld ); + bool GotoField( const SwFormatField& rField ); // jump to the next / previous hyperlink - inside text and also // on graphics @@ -424,8 +424,8 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // a click at the given field. the cursor is on it. // execute the predefined actions. - void ClickToField( const SwField& rFld ); - void ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter = URLLOAD_NOFILTER ); + void ClickToField( const SwField& rField ); + void ClickToINetAttr( const SwFormatINetFormat& rItem, sal_uInt16 nFilter = URLLOAD_NOFILTER ); bool ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter = URLLOAD_NOFILTER ); inline bool IsInClickToEdit() const ; @@ -439,8 +439,8 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); virtual void SetReadonlyOption( bool bSet ) SAL_OVERRIDE; // automatic update of styles - void AutoUpdateFrame(SwFrmFmt* pFmt, const SfxItemSet& rStyleSet); - void AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM = NULL ); + void AutoUpdateFrame(SwFrameFormat* pFormat, const SfxItemSet& rStyleSet); + void AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM = NULL ); // link for inserting ranges via Drag&Drop/Clipboard DECL_LINK( InsertRegionDialog, SwSectionData* ); @@ -460,7 +460,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void addCurrentPosition(); bool GotoFly( const OUString& rName, FlyCntType eType = FLYCNTTYPE_ALL, bool bSelFrame = true ); - bool GotoINetAttr( const SwTxtINetFmt& rAttr ); + bool GotoINetAttr( const SwTextINetFormat& rAttr ); void GotoOutline( sal_uInt16 nIdx ); bool GotoOutline( const OUString& rName ); bool GotoRegion( const OUString& rName ); @@ -468,7 +468,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); sal_uInt16 nSeqNo = 0 ); bool GotoNextTOXBase( const OUString* pName = 0); bool GotoTable( const OUString& rName ); - bool GotoFld( const SwFmtFld& rFld ); + bool GotoFormatField( const SwFormatField& rField ); const SwRangeRedline* GotoRedline( sal_uInt16 nArrPos, bool bSelect = false); void ChangeHeaderOrFooter(const OUString& rStyleName, bool bHeader, bool bOn, bool bShowWarning); @@ -561,7 +561,7 @@ private: bool m_bRetainSelection :1; // Do not remove selections Point m_aStart; - Link<> m_aSelTblLink; + Link<> m_aSelTableLink; // resets the cursor stack after movement by PageUp/-Down SAL_DLLPRIVATE void _ResetCursorStack(); @@ -616,15 +616,15 @@ inline void SwWrtShell::ResetCursorStack() _ResetCursorStack(); } -inline void SwWrtShell::SelTblCells(const Link<> &rLink, bool bMark ) +inline void SwWrtShell::SelTableCells(const Link<> &rLink, bool bMark ) { - SetSelTblCells( true ); + SetSelTableCells( true ); m_bClearMark = bMark; - m_aSelTblLink = rLink; + m_aSelTableLink = rLink; } -inline void SwWrtShell::EndSelTblCells() +inline void SwWrtShell::EndSelTableCells() { - SetSelTblCells( false ); + SetSelTableCells( false ); m_bClearMark = true; } diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx index 76ea0dced9dd..9bde8b126487 100644 --- a/sw/source/uibase/index/toxmgr.cxx +++ b/sw/source/uibase/index/toxmgr.cxx @@ -360,12 +360,12 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, if(TOX_AUTHORITIES == eCurTOXType) { SwAuthorityFieldType* pFType = static_cast<SwAuthorityFieldType*>( - pSh->GetFldType(RES_AUTHORITY, aEmptyOUStr)); + pSh->GetFieldType(RES_AUTHORITY, aEmptyOUStr)); if (!pFType) { SwAuthorityFieldType const type(pSh->GetDoc()); pFType = static_cast<SwAuthorityFieldType*>( - pSh->InsertFldType(type)); + pSh->InsertFieldType(type)); } pFType->SetPreSuffix(rDesc.GetAuthBrackets()[0], rDesc.GetAuthBrackets()[1]); @@ -379,7 +379,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, pFType->SetLanguage(rDesc.GetLanguage()); pFType->SetSortAlgorithm(rDesc.GetSortAlgorithm()); - pFType->UpdateFlds(); + pFType->UpdateFields(); } // TODO: consider properties of the current TOXType if(!pCurTOX || (ppBase && !(*ppBase))) diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index 1ff242c640c5..d4c2479c564b 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -104,7 +104,7 @@ SwHHCWrapper::SwHHCWrapper( , m_nPageCount( 0 ) , m_nPageStart( 0 ) , m_bIsDrawObj( false ) - , m_bIsOtherCntnt( bOther ) + , m_bIsOtherContent( bOther ) , m_bStartChk( bOther ) , m_bIsSelection( bSelection ) , m_bStartDone( bOther || bStart ) @@ -230,7 +230,7 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText, const SwPosition *pStart = pCrsr->Start(); const sal_Int32 nStartIndex = pStart->nContent.GetIndex(); const SwNodeIndex aStartNodeIndex = pStart->nNode; - SwTxtNode *pStartTxtNode = aStartNodeIndex.GetNode().GetTxtNode(); + SwTextNode *pStartTextNode = aStartNodeIndex.GetNode().GetTextNode(); const sal_Int32 nIndices = pOffsets->getLength(); const sal_Int32 *pIndices = pOffsets->getConstArray(); @@ -275,8 +275,8 @@ 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( pStartTxtNode, nChgInNodeStartIndex ); - m_rWrtShell.GetCrsr()->GetPoint()->nContent.Assign( pStartTxtNode, nChgInNodeStartIndex + nChgLen ); + m_rWrtShell.GetCrsr()->GetMark()->nContent.Assign( pStartTextNode, nChgInNodeStartIndex ); + m_rWrtShell.GetCrsr()->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( pStartTxtNode, nStartIndex + nConvTextLen ); + m_rWrtShell.GetCrsr()->Start()->nContent.Assign( pStartTextNode, nStartIndex + nConvTextLen ); } else { @@ -373,10 +373,10 @@ void SwHHCWrapper::ReplaceUnit( // select current unit SelectNewUnit_impl( nUnitStart, nUnitEnd ); - OUString aOrigTxt( m_rWrtShell.GetSelTxt() ); - OUString aNewTxt( rReplaceWith ); - OSL_ENSURE( aOrigTxt == rOrigText, "!! text mismatch !!" ); - SwFmtRuby *pRuby = 0; + OUString aOrigText( m_rWrtShell.GetSelText() ); + OUString aNewText( rReplaceWith ); + OSL_ENSURE( aOrigText == rOrigText, "!! text mismatch !!" ); + SwFormatRuby *pRuby = 0; bool bRubyBelow = false; OUString aNewOrigText; switch (eAction) @@ -385,34 +385,34 @@ void SwHHCWrapper::ReplaceUnit( break; case eReplacementBracketed : { - aNewTxt = aOrigTxt + "(" + rReplaceWith + ")"; + aNewText = aOrigText + "(" + rReplaceWith + ")"; } break; case eOriginalBracketed : { - aNewTxt = rReplaceWith + "(" + aOrigTxt + ")"; + aNewText = rReplaceWith + "(" + aOrigText + ")"; } break; case eReplacementAbove : { - pRuby = new SwFmtRuby( rReplaceWith ); + pRuby = new SwFormatRuby( rReplaceWith ); } break; case eOriginalAbove : { - pRuby = new SwFmtRuby( aOrigTxt ); + pRuby = new SwFormatRuby( aOrigText ); aNewOrigText = rReplaceWith; } break; case eReplacementBelow : { - pRuby = new SwFmtRuby( rReplaceWith ); + pRuby = new SwFormatRuby( rReplaceWith ); bRubyBelow = true; } break; case eOriginalBelow : { - pRuby = new SwFmtRuby( aOrigTxt ); + pRuby = new SwFormatRuby( aOrigText ); aNewOrigText = rReplaceWith; bRubyBelow = true; } @@ -420,7 +420,7 @@ void SwHHCWrapper::ReplaceUnit( default: OSL_FAIL("unexpected case" ); } - m_nUnitOffset += nUnitStart + aNewTxt.getLength(); + m_nUnitOffset += nUnitStart + aNewText.getLength(); if (pRuby) { @@ -463,15 +463,15 @@ void SwHHCWrapper::ReplaceUnit( // Thus we do this only for Chinese translation... const bool bIsChineseConversion = IsChinese( GetSourceLanguage() ); if (bIsChineseConversion) - ChangeText( aNewTxt, rOrigText, &rOffsets, m_rWrtShell.GetCrsr() ); + ChangeText( aNewText, rOrigText, &rOffsets, m_rWrtShell.GetCrsr() ); else - ChangeText( aNewTxt, rOrigText, NULL, NULL ); + ChangeText( aNewText, rOrigText, NULL, NULL ); // change language and font if necessary if (bIsChineseConversion) { m_rWrtShell.SetMark(); - m_rWrtShell.GetCrsr()->GetMark()->nContent -= aNewTxt.getLength(); + m_rWrtShell.GetCrsr()->GetMark()->nContent -= aNewText.getLength(); OSL_ENSURE( GetTargetLanguage() == LANGUAGE_CHINESE_SIMPLIFIED || GetTargetLanguage() == LANGUAGE_CHINESE_TRADITIONAL, "SwHHCWrapper::ReplaceUnit : unexpected target language" ); @@ -524,12 +524,12 @@ void SwHHCWrapper::Convert() SwPosition* pSttPos = pCrsr->Start(); SwPosition* pEndPos = pCrsr->End(); - if (pSttPos->nNode.GetNode().IsTxtNode() && - pEndPos->nNode.GetNode().IsTxtNode()) + if (pSttPos->nNode.GetNode().IsTextNode() && + pEndPos->nNode.GetNode().IsTextNode()) { m_pConvArgs = new SwConversionArgs( GetSourceLanguage(), - pSttPos->nNode.GetNode().GetTxtNode(), pSttPos->nContent, - pEndPos->nNode.GetNode().GetTxtNode(), pEndPos->nContent ); + pSttPos->nNode.GetNode().GetTextNode(), pSttPos->nContent, + pEndPos->nNode.GetNode().GetTextNode(), pEndPos->nContent ); } else // we are not in the text (maybe a graphic or OLE object is selected) let's start from the top { @@ -539,17 +539,17 @@ void SwHHCWrapper::Convert() aPam.Move( fnMoveBackward, fnGoDoc ); // move to start of document pSttPos = aPam.GetPoint(); //! using a PaM here makes sure we will get only text nodes - SwTxtNode *pTxtNode = pSttPos->nNode.GetNode().GetTxtNode(); + SwTextNode *pTextNode = pSttPos->nNode.GetNode().GetTextNode(); // just in case we check anyway... - if (!pTxtNode || !pTxtNode->IsTxtNode()) + if (!pTextNode || !pTextNode->IsTextNode()) return; m_pConvArgs = new SwConversionArgs( GetSourceLanguage(), - pTxtNode, pSttPos->nContent, - pTxtNode, pSttPos->nContent ); + pTextNode, pSttPos->nContent, + pTextNode, pSttPos->nContent ); } - OSL_ENSURE( m_pConvArgs->pStartNode && m_pConvArgs->pStartNode->IsTxtNode(), + OSL_ENSURE( m_pConvArgs->pStartNode && m_pConvArgs->pStartNode->IsTextNode(), "failed to get proper start text node" ); - OSL_ENSURE( m_pConvArgs->pEndNode && m_pConvArgs->pEndNode->IsTxtNode(), + OSL_ENSURE( m_pConvArgs->pEndNode && m_pConvArgs->pEndNode->IsTextNode(), "failed to get proper end text node" ); // chinese conversion specific settings @@ -581,7 +581,7 @@ void SwHHCWrapper::Convert() nStartIdx = 0; else { - OUString aText( m_pConvArgs->pStartNode->GetTxt() ); + OUString aText( m_pConvArgs->pStartNode->GetText() ); const sal_Int32 nPos = m_pConvArgs->pStartIdx->GetIndex(); Boundary aBoundary( g_pBreakIt->GetBreakIter()-> getWordBoundary( aText, nPos, g_pBreakIt->GetLocale( m_pConvArgs->nConvSrcLang ), @@ -600,7 +600,7 @@ void SwHHCWrapper::Convert() } } - if ( m_bIsOtherCntnt ) + if ( m_bIsOtherContent ) ConvStart_impl( m_pConvArgs, SVX_SPELL_OTHER ); else { @@ -623,14 +623,14 @@ bool SwHHCWrapper::ConvNext_impl( ) else m_bEndDone = true; - if( m_bIsOtherCntnt && m_bStartDone && m_bEndDone ) // document completely checked? + if( m_bIsOtherContent && m_bStartDone && m_bEndDone ) // document completely checked? { return false; } bool bGoOn = false; - if ( m_bIsOtherCntnt ) + if ( m_bIsOtherContent ) { m_bStartChk = false; ConvStart_impl( m_pConvArgs, SVX_SPELL_BODY ); @@ -642,7 +642,7 @@ bool SwHHCWrapper::ConvNext_impl( ) if( HasOtherCnt_impl() ) { ConvStart_impl( m_pConvArgs, SVX_SPELL_OTHER ); - m_bIsOtherCntnt = bGoOn = true; + m_bIsOtherContent = bGoOn = true; } } else diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 70ef25cffe4a..b74693bb501a 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -196,20 +196,20 @@ void SwSpellPopup::fillLangPopupMenu( std::set< OUString >::const_iterator it; for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { - OUString aEntryTxt( *it ); - if (aEntryTxt != OUString( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ) )&& - aEntryTxt != "*" && // multiple languages in current selection - !aEntryTxt.isEmpty()) // 'no language found' from language guessing + OUString aEntryText( *it ); + if (aEntryText != OUString( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ) )&& + aEntryText != "*" && // multiple languages in current selection + !aEntryText.isEmpty()) // 'no language found' from language guessing { OSL_ENSURE( nLangItemIdStart <= nItemId && nItemId <= nLangItemIdStart + MN_MAX_NUM_LANG, "nItemId outside of expected range!" ); - pPopupMenu->InsertItem( nItemId, aEntryTxt, MenuItemBits::RADIOCHECK ); - if (aEntryTxt == aCurLang) + pPopupMenu->InsertItem( nItemId, aEntryText, MenuItemBits::RADIOCHECK ); + if (aEntryText == aCurLang) { //make a check mark for the current language pPopupMenu->CheckItem( nItemId, true ); } - rLangTable[ nItemId ] = aEntryTxt; + rLangTable[ nItemId ] = aEntryText; ++nItemId; } } @@ -824,13 +824,13 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE, 0 ); - OUString aNewLangTxt; + OUString aNewLangText; if (MN_SET_LANGUAGE_SELECTION_START <= nId && nId <= MN_SET_LANGUAGE_SELECTION_END) { //Set language for current selection - aNewLangTxt = m_aLangTable_Text[nId]; - SwLangHelper::SetLanguage( *m_pSh, aNewLangTxt, true, aCoreSet ); + aNewLangText = m_aLangTable_Text[nId]; + SwLangHelper::SetLanguage( *m_pSh, aNewLangText, true, aCoreSet ); } else if (nId == MN_SET_SELECTION_NONE) { @@ -850,10 +850,10 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END) { //Set language for current paragraph - aNewLangTxt = m_aLangTable_Paragraph[nId]; + aNewLangText = m_aLangTable_Paragraph[nId]; m_pSh->Push(); // save cursor SwLangHelper::SelectCurrentPara( *m_pSh ); - SwLangHelper::SetLanguage( *m_pSh, aNewLangTxt, true, aCoreSet ); + SwLangHelper::SetLanguage( *m_pSh, aNewLangText, true, aCoreSet ); m_pSh->Pop( false ); // restore cursor } else if (nId == MN_SET_PARA_NONE) diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx index 249efb3986d6..e899234b948d 100644 --- a/sw/source/uibase/lingu/sdrhhcwrap.cxx +++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx @@ -125,7 +125,7 @@ bool SdrHHCWrapper::ConvertNextDocument() sal_uInt16 n = nDocIndex; std::list<SdrTextObj*> aTextObjs; - SwDrawContact::GetTextObjectsFromFmt( aTextObjs, pView->GetDocShell()->GetDoc() ); + SwDrawContact::GetTextObjectsFromFormat( aTextObjs, pView->GetDocShell()->GetDoc() ); for ( std::list<SdrTextObj*>::iterator aIt = aTextObjs.begin(); aIt != aTextObjs.end(); ++aIt ) { pTextObj = (*aIt); diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index fcefbb95523a..73acb6a265bd 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -147,7 +147,7 @@ void SwModelessRedlineAcceptDlg::dispose() } SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer *pBuilder, - vcl::Window *pContentArea, bool bAutoFmt) : + vcl::Window *pContentArea, bool bAutoFormat) : pParentDlg (pParent), aTabPagesCTRL (VclPtr<SvxAcceptChgCtr>::Create(pContentArea, pBuilder)), aPopup (SW_RES(MN_REDLINE_POPUP)), @@ -155,11 +155,11 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer sDeleted (SW_RES(STR_REDLINE_DELETED)), sFormated (SW_RES(STR_REDLINE_FORMATED)), sTableChgd (SW_RES(STR_REDLINE_TABLECHG)), - sFmtCollSet (SW_RES(STR_REDLINE_FMTCOLLSET)), + sFormatCollSet (SW_RES(STR_REDLINE_FMTCOLLSET)), sAutoFormat (SW_RES(STR_REDLINE_AUTOFMT)), bOnlyFormatedRedlines( false ), bHasReadonlySel ( false ), - bRedlnAutoFmt (bAutoFmt), + bRedlnAutoFormat (bAutoFormat), bInhibitActivate( false ) { aTabPagesCTRL->SetHelpId(HID_REDLINE_CTRL); @@ -187,9 +187,9 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer pActLB->InsertEntry(sFormated); pActLB->InsertEntry(sTableChgd); - if (HasRedlineAutoFmt()) + if (HasRedlineAutoFormat()) { - pActLB->InsertEntry(sFmtCollSet); + pActLB->InsertEntry(sFormatCollSet); pActLB->InsertEntry(sAutoFormat); pTPView->ShowUndo(true); pTPView->DisableUndo(); // no UNDO events yet @@ -342,7 +342,7 @@ Image SwRedlineAcceptDlg::GetActionImage(const SwRangeRedline& rRedln, sal_uInt1 const static Image aDeleted(SW_RES(IMG_REDLINE_DELETED)); const static Image aFormated(SW_RES(IMG_REDLINE_FORMATED)); const static Image aTableChgd(SW_RES(IMG_REDLINE_TABLECHG)); - const static Image aFmtCollSet(SW_RES(IMG_REDLINE_FMTCOLLSET)); + const static Image aFormatCollSet(SW_RES(IMG_REDLINE_FMTCOLLSET)); const static Image aAutoFormat(SW_RES(IMG_REDLINE_AUTOFMT)); switch (rRedln.GetType(nStack)) @@ -352,7 +352,7 @@ Image SwRedlineAcceptDlg::GetActionImage(const SwRangeRedline& rRedln, sal_uInt1 case nsRedlineType_t::REDLINE_FORMAT: return aFormated; case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: return aFormated; case nsRedlineType_t::REDLINE_TABLE: return aTableChgd; - case nsRedlineType_t::REDLINE_FMTCOLL: return aFmtCollSet; + case nsRedlineType_t::REDLINE_FMTCOLL: return aFormatCollSet; } return Image(); @@ -367,7 +367,7 @@ OUString SwRedlineAcceptDlg::GetActionText(const SwRangeRedline& rRedln, sal_uIn case nsRedlineType_t::REDLINE_FORMAT: return sFormated; case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: return sFormated; case nsRedlineType_t::REDLINE_TABLE: return sTableChgd; - case nsRedlineType_t::REDLINE_FMTCOLL: return sFmtCollSet; + case nsRedlineType_t::REDLINE_FMTCOLL: return sFormatCollSet; default:;//prevent warning } @@ -489,7 +489,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, bool bChild) pTable->SetUpdateMode(false); SwView *pView = ::GetActiveView(); SwWrtShell* pSh = pView->GetWrtShellPtr(); - sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; + sal_uInt16 nAutoFormat = HasRedlineAutoFormat() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; SwRedlineDataParent *pParent = &aRedlineParents[nStart]; const SwRangeRedline& rRedln = pSh->GetRedline(nStart); @@ -517,7 +517,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, bool bChild) pParent->pNext = 0; // insert new children - InsertChildren(pParent, rRedln, nAutoFmt); + InsertChildren(pParent, rRedln, nAutoFormat); pTable->SetUpdateMode(true); return nStart; @@ -557,17 +557,17 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, bool bChild) return USHRT_MAX; } -void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFmt) +void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFormat) { OUString sChild; SwRedlineDataChild *pLastRedlineChild = 0; const SwRedlineData *pRedlineData = &rRedln.GetRedlineData(); - bool bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0; + bool bAutoFormat = (rRedln.GetRealType() & nAutoFormat) != 0; OUString sAction = GetActionText(rRedln); bool bValidParent = sFilterAction.isEmpty() || sFilterAction == sAction; bValidParent = bValidParent && pTable->IsValidEntry(rRedln.GetAuthorString(), rRedln.GetTimeStamp(), rRedln.GetComment()); - if (nAutoFmt) + if (nAutoFormat) { if (pParent->pData->GetSeqNo()) @@ -586,7 +586,7 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa return; } } - bValidParent = bValidParent && bAutoFmt; + bValidParent = bValidParent && bAutoFormat; } bool bValidTree = bValidParent; @@ -606,8 +606,8 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa sAction = GetActionText(rRedln, nStack); bool bValidChild = sFilterAction.isEmpty() || sFilterAction == sAction; bValidChild = bValidChild && pTable->IsValidEntry(rRedln.GetAuthorString(nStack), rRedln.GetTimeStamp(nStack), rRedln.GetComment()); - if (nAutoFmt) - bValidChild = bValidChild && bAutoFmt; + if (nAutoFormat) + bValidChild = bValidChild && bAutoFormat; bValidTree |= bValidChild; if (bValidChild) @@ -637,7 +637,7 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa { pTable->RemoveEntry(pParent->pTLBParent); pParent->pTLBParent = 0; - if (nAutoFmt) + if (nAutoFormat) aUsedSeqNo.erase(pParent); } } @@ -720,7 +720,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd) { SwView *pView = ::GetActiveView(); SwWrtShell* pSh = pView->GetWrtShellPtr(); - sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; + sal_uInt16 nAutoFormat = HasRedlineAutoFormat() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; OUString sParent; sal_uInt16 nCount = pSh->GetRedlineCount(); @@ -773,7 +773,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd) pRedlineParent->pTLBParent = pParent; - InsertChildren(pRedlineParent, rRedln, nAutoFmt); + InsertChildren(pRedlineParent, rRedln, nAutoFormat); } } diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index 77e34ac668fd..0cbea139e619 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -283,13 +283,13 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) if(m_pWin->GetFrmColCount() > 1) { SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL); - SwFmtCol aCol(static_cast<const SwFmtCol&>(aSet.Get(RES_COL))); + SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL))); aCol.Init(m_pWin->GetFrmColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth()); aSet.Put(aCol); // Template AutoUpdate - SwFrmFmt* pFmt = m_pSh->GetCurFrmFmt(); - if(pFmt && pFmt->IsAutoUpdateFmt()) - m_pSh->AutoUpdateFrame(pFmt, aSet); + SwFrameFormat* pFormat = m_pSh->GetCurFrameFormat(); + if(pFormat && pFormat->IsAutoUpdateFormat()) + m_pSh->AutoUpdateFrame(pFormat, aSet); else m_pSh->SetFlyFrmAttr( aSet ); } diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 6456d6ecdc9d..2eed3b425667 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -142,7 +142,7 @@ void SwInputWindow::dispose() } delete pMgr; if(pWrtShell) - pWrtShell->EndSelTblCells(); + pWrtShell->EndSelTableCells(); CleanupUglyHackWithUndo(); @@ -157,7 +157,7 @@ void SwInputWindow::CleanupUglyHackWithUndo() { if (pWrtShell) { - DelBoxCntnt(); + DelBoxContent(); pWrtShell->DoUndo(m_bDoesUndo); if (m_bCallUndo) { @@ -207,11 +207,11 @@ void SwInputWindow::ShowWin() OSL_ENSURE(pWrtShell, "no WrtShell!"); // Cursor in table - bIsTable = pWrtShell->IsCrsrInTbl(); + bIsTable = pWrtShell->IsCrsrInTable(); if( bFirst ) - pWrtShell->SelTblCells( LINK( this, SwInputWindow, - SelTblCellsNotify) ); + pWrtShell->SelTableCells( LINK( this, SwInputWindow, + SelTableCellsNotify) ); if( bIsTable ) { const OUString& rPos = pWrtShell->GetBoxNms(); @@ -220,20 +220,20 @@ void SwInputWindow::ShowWin() while( (nPos = rPos.indexOf( ':',nPos + 1 ) ) != -1 ) nSrch = (short) nPos; aPos->SetText( rPos.copy( ++nSrch ) ); - aAktTableName = pWrtShell->GetTableFmt()->GetName(); + aAktTableName = pWrtShell->GetTableFormat()->GetName(); } else aPos->SetText(SW_RESSTR(STR_TBL_FORMULA)); // Edit current field OSL_ENSURE(pMgr == 0, "FieldManager not deleted"); - pMgr = new SwFldMgr; + pMgr = new SwFieldMgr; // Formular should always begin with "=" , so set here OUString sEdit('='); - if( pMgr->GetCurFld() && TYP_FORMELFLD == pMgr->GetCurTypeId() ) + if( pMgr->GetCurField() && TYP_FORMELFLD == pMgr->GetCurTypeId() ) { - sEdit += pMgr->GetCurFldPar2(); + sEdit += pMgr->GetCurFieldPar2(); } else if( bFirst ) { @@ -268,8 +268,8 @@ void SwInputWindow::ShowWin() pWrtShell->DoUndo(false); SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); - if( pWrtShell->GetTblBoxFormulaAttrs( aSet )) - sEdit += static_cast<const SwTblBoxFormula&>(aSet.Get( RES_BOXATR_FORMULA )).GetFormula(); + if( pWrtShell->GetTableBoxFormulaAttrs( aSet )) + sEdit += static_cast<const SwTableBoxFormula&>(aSet.Get( RES_BOXATR_FORMULA )).GetFormula(); } } @@ -286,7 +286,7 @@ void SwInputWindow::ShowWin() aEdit->SetText( sEdit ); aEdit->SetSelection( Selection( sEdit.getLength(), sEdit.getLength() ) ); - sOldFml = sEdit; + sOldFormula = sEdit; aEdit->Invalidate(); aEdit->Update(); @@ -388,7 +388,7 @@ void SwInputWindow::ApplyFormula() sEdit = sEdit.copy( 1 ); SfxStringItem aParam(FN_EDIT_FORMULA, sEdit); - pWrtShell->EndSelTblCells(); + pWrtShell->EndSelTableCells(); pView->GetEditWin().GrabFocus(); const SfxPoolItem* aArgs[2]; aArgs[0] = &aParam; @@ -408,7 +408,7 @@ void SwInputWindow::CancelFormula() if( bDelSel ) pWrtShell->EnterStdMode(); - pWrtShell->EndSelTblCells(); + pWrtShell->EndSelTableCells(); pView->GetEditWin().GrabFocus(); @@ -419,24 +419,24 @@ void SwInputWindow::CancelFormula() const sal_Unicode CH_LRE = 0x202a; const sal_Unicode CH_PDF = 0x202c; -IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller ) +IMPL_LINK( SwInputWindow, SelTableCellsNotify, SwWrtShell *, pCaller ) { if(bIsTable) { - SwFrmFmt* pTblFmt = pCaller->GetTableFmt(); + SwFrameFormat* pTableFormat = pCaller->GetTableFormat(); OUString sBoxNms( pCaller->GetBoxNms() ); - OUString sTblNm; - if( pTblFmt && aAktTableName != pTblFmt->GetName() ) - sTblNm = pTblFmt->GetName(); + OUString sTableNm; + if( pTableFormat && aAktTableName != pTableFormat->GetName() ) + sTableNm = pTableFormat->GetName(); - aEdit->UpdateRange( sBoxNms, sTblNm ); + aEdit->UpdateRange( sBoxNms, sTableNm ); OUString sNew; sNew += OUString(CH_LRE); sNew += aEdit->GetText(); sNew += OUString(CH_PDF); - if( sNew != sOldFml ) + if( sNew != sOldFormula ) { // The WrtShell is in the table selection, // then cancel the table selection otherwise, the cursor is @@ -452,7 +452,7 @@ IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller ) pIDCO->DeleteRange( aPam ); pIDCO->InsertString( aPam, sNew ); pWrtShell->EndAllAction(); - sOldFml = sNew; + sOldFormula = sNew; } } else @@ -481,19 +481,19 @@ IMPL_LINK_NOARG(SwInputWindow, ModifyHdl) if (bIsTable && m_bResetUndo) { pWrtShell->StartAllAction(); - DelBoxCntnt(); + DelBoxContent(); OUString sNew; sNew += OUString(CH_LRE); sNew += aEdit->GetText(); sNew += OUString(CH_PDF); pWrtShell->SwEditShell::Insert2( sNew ); pWrtShell->EndAllAction(); - sOldFml = sNew; + sOldFormula = sNew; } return 0; } -void SwInputWindow::DelBoxCntnt() +void SwInputWindow::DelBoxContent() { if( bIsTable ) { diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 3b6c4e6401ad..ba0a7f642c94 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -379,8 +379,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) if(pItem) { const SvxHyperlinkItem& rHLinkItem = *static_cast<const SvxHyperlinkItem *>(pItem); - SvxURLField aFld(rHLinkItem.GetURL(), rHLinkItem.GetName(), SVXURLFORMAT_APPDEFAULT); - aFld.SetTargetFrame(rHLinkItem.GetTargetFrame()); + SvxURLField aField(rHLinkItem.GetURL(), rHLinkItem.GetName(), SVXURLFORMAT_APPDEFAULT); + aField.SetTargetFrame(rHLinkItem.GetTargetFrame()); const SvxFieldItem* pFieldItem = pOLV->GetFieldAtSelection(); @@ -392,7 +392,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) pOLV->SetSelection(aSel); } if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED) - pOLV->InsertField(SvxFieldItem(aFld, EE_FEATURE_FIELD)); + pOLV->InsertField(SvxFieldItem(aField, EE_FEATURE_FIELD)); } break; } @@ -524,8 +524,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) aDlgAttr.Put(aEditAttr); aDlgAttr.Put( SvxHyphenZoneItem( false, RES_PARATR_HYPHENZONE) ); - aDlgAttr.Put( SvxFmtBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); - aDlgAttr.Put( SvxFmtSplitItem( true, RES_PARATR_SPLIT ) ); + aDlgAttr.Put( SvxFormatBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); + aDlgAttr.Put( SvxFormatSplitItem( true, RES_PARATR_SPLIT ) ); aDlgAttr.Put( SvxWidowsItem( 0, RES_PARATR_WIDOWS ) ); aDlgAttr.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) ); @@ -983,7 +983,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet) { if ( bPastePossible ) { - SvxClipboardFmtItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS ); + SvxClipboardFormatItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS ); if ( aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ) aFormats.AddClipbrdFormat( SotClipboardFormatId::RTF ); aFormats.AddClipbrdFormat( SotClipboardFormatId::STRING ); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 0edb99813184..0a9c64f1f2b3 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -174,7 +174,7 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh ) SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - const SwFmtURL &rURL = static_cast<const SwFmtURL&>(aSet.Get( RES_URL )); + const SwFormatURL &rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); SvxIMapDlgChildWindow::UpdateIMapDlg( aGrf, rURL.GetMap(), pList.get(), pEditObj ); } @@ -298,8 +298,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) case SID_CLIPBOARD_FORMAT_ITEMS: { const SfxItemSet* pArgs = rReq.GetArgs(); - const SfxPoolItem* pFmt; - if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pFmt ) ) + const SfxPoolItem* pFormat; + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pFormat ) ) { TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( @@ -312,7 +312,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) SwView* pView = &rView; SwTransferable::PasteFormat( rSh, aDataHelper, - static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pFmt)->GetValue()) ); + static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pFormat)->GetValue()) ); //Done() has to be called before the shell has been removed rReq.Done(); @@ -364,7 +364,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin()) ); if( aDataHelper.GetXTransferable().is() && SwTransferable::IsPaste( rSh, aDataHelper ) - && !rSh.CrsrInsideInputFld() ) + && !rSh.CrsrInsideInputField() ) { // Temporary variables, because the shell could already be // destroyed after the paste. @@ -436,7 +436,7 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet) case SID_PASTE_SPECIAL: if( !GetView().IsPasteSpecialAllowed() - || rSh.CrsrInsideInputFld() ) + || rSh.CrsrInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -455,9 +455,9 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet) TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin()) ); - SvxClipboardFmtItem aFmtItem( nWhich ); - SwTransferable::FillClipFmtItem( rSh, aDataHelper, aFmtItem ); - rSet.Put( aFmtItem ); + SvxClipboardFormatItem aFormatItem( nWhich ); + SwTransferable::FillClipFormatItem( rSh, aDataHelper, aFormatItem ); + rSet.Put( aFormatItem ); } break; } @@ -600,15 +600,15 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_UPDATE_FIELDS: { rSh.UpdateDocStat(); - rSh.EndAllTblBoxEdit(); - rSh.SwViewShell::UpdateFlds(true); + rSh.EndAllTableBoxEdit(); + rSh.SwViewShell::UpdateFields(true); - if( rSh.IsCrsrInTbl() ) + if( rSh.IsCrsrInTable() ) { - if( !rSh.IsTblComplexForChart() ) + if( !rSh.IsTableComplexForChart() ) SwTableFUNC( &rSh, false).UpdateChart(); - rSh.ClearTblBoxCntnt(); - rSh.SaveTblBoxCntnt(); + rSh.ClearTableBoxContent(); + rSh.SaveTableBoxContent(); } } break; @@ -638,7 +638,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) break; case FN_UPDATE_INPUTFIELDS: - rSh.UpdateInputFlds(); + rSh.UpdateInputFields(); break; case FN_PREV_BOOKMARK: @@ -651,10 +651,10 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_GOTO_NEXT_MARK: case FN_GOTO_PREV_MARK: { - SwFldMgr aFldMgr; - SwFieldType* pFldType = aFldMgr.GetFldType(RES_JUMPEDITFLD); + SwFieldMgr aFieldMgr; + SwFieldType* pFieldType = aFieldMgr.GetFieldType(RES_JUMPEDITFLD); - if (pFldType) + if (pFieldType) { if (rSh.IsSelFrmMode()) { @@ -670,8 +670,8 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.ClearMark(); rSh.EndSelect(); } - bool bRet = rSh.MoveFldType( pFldType, nSlot == FN_GOTO_NEXT_MARK ); - SwField* pCurField = bRet ? rSh.GetCurFld() : 0; + bool bRet = rSh.MoveFieldType( pFieldType, nSlot == FN_GOTO_NEXT_MARK ); + SwField* pCurField = bRet ? rSh.GetCurField() : 0; if (pCurField) rSh.ClickToField(*pCurField); rReq.SetReturnValue(SfxBoolItem( nSlot, bRet)); @@ -746,9 +746,9 @@ void SwBaseShell::Execute(SfxRequest &rReq) const size_t nCurIdx = rSh.GetCurPageDesc(); SwPageDesc aPageDesc(rSh.GetPageDesc(nCurIdx)); - SwFrmFmt &rFmt = aPageDesc.GetMaster(); + SwFrameFormat &rFormat = aPageDesc.GetMaster(); - SwFmtCol aFmtCol = rFmt.GetCol(); + SwFormatCol aFormatCol = rFormat.GetCol(); sal_uInt16 nCount; if(SfxItemState::SET == pArgs->GetItemState(nSlot)) @@ -757,11 +757,11 @@ void SwBaseShell::Execute(SfxRequest &rReq) nCount = static_cast<const SfxUInt16Item &>(pArgs->Get(SID_ATTR_COLUMNS)).GetValue(); sal_uInt16 nGutterWidth = DEF_GUTTER_WIDTH; - aFmtCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX); - aFmtCol.SetWishWidth(USHRT_MAX); - aFmtCol.SetGutterWidth(nGutterWidth, USHRT_MAX); + aFormatCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX); + aFormatCol.SetWishWidth(USHRT_MAX); + aFormatCol.SetGutterWidth(nGutterWidth, USHRT_MAX); - rFmt.SetFmtAttr(aFmtCol); + rFormat.SetFormatAttr(aFormatCol); rSh.ChgPageDesc(nCurIdx, aPageDesc); } @@ -776,15 +776,15 @@ void SwBaseShell::Execute(SfxRequest &rReq) sal_Unicode cDelim = 0; bool bToTable = false; if( nSlot == FN_CONVERT_TEXT_TO_TABLE || - ( nSlot == FN_CONVERT_TEXT_TABLE && 0 == rSh.GetTableFmt() )) + ( nSlot == FN_CONVERT_TEXT_TABLE && 0 == rSh.GetTableFormat() )) bToTable = true; - SwInsertTableOptions aInsTblOpts( tabopts::ALL_TBL_INS_ATTR, 1 ); - SwTableAutoFmt const* pTAFmt = 0; - boost::scoped_ptr<SwTableAutoFmtTbl> pAutoFmtTbl; + SwInsertTableOptions aInsTableOpts( tabopts::ALL_TBL_INS_ATTR, 1 ); + SwTableAutoFormat const* pTAFormat = 0; + boost::scoped_ptr<SwTableAutoFormatTable> pAutoFormatTable; bool bDeleteFormat = true; if(pArgs && SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, true, &pItem)) { - aInsTblOpts.mnInsMode = 0; + aInsTableOpts.mnInsMode = 0; // Delimiter OUString sDelim = static_cast< const SfxStringItem* >(pItem)->GetValue(); if(!sDelim.isEmpty()) @@ -792,17 +792,17 @@ void SwBaseShell::Execute(SfxRequest &rReq) // AutoFormat if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_2, true, &pItem)) { - OUString sAutoFmt = static_cast< const SfxStringItem* >(pItem)->GetValue(); + OUString sAutoFormat = static_cast< const SfxStringItem* >(pItem)->GetValue(); - pAutoFmtTbl.reset(new SwTableAutoFmtTbl); - pAutoFmtTbl->Load(); + pAutoFormatTable.reset(new SwTableAutoFormatTable); + pAutoFormatTable->Load(); - for( sal_uInt16 i = 0, nCount = pAutoFmtTbl->size(); i < nCount; i++ ) + for( sal_uInt16 i = 0, nCount = pAutoFormatTable->size(); i < nCount; i++ ) { - SwTableAutoFmt const*const pFmt = &(*pAutoFmtTbl)[ i ]; - if( pFmt->GetName() == sAutoFmt ) + SwTableAutoFormat const*const pFormat = &(*pAutoFormatTable)[ i ]; + if( pFormat->GetName() == sAutoFormat ) { - pTAFmt = pFmt; + pTAFormat = pFormat; bDeleteFormat = false; break; } @@ -811,19 +811,19 @@ void SwBaseShell::Execute(SfxRequest &rReq) //WithHeader if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, true, &pItem) && static_cast< const SfxBoolItem* >(pItem)->GetValue()) - aInsTblOpts.mnInsMode |= tabopts::HEADLINE; + aInsTableOpts.mnInsMode |= tabopts::HEADLINE; // RepeatHeaderLines if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_4, true, &pItem)) - aInsTblOpts.mnRowsToRepeat = + aInsTableOpts.mnRowsToRepeat = (sal_uInt16)static_cast< const SfxInt16Item* >(pItem)->GetValue(); //WithBorder if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_5, true, &pItem) && static_cast< const SfxBoolItem* >(pItem)->GetValue()) - aInsTblOpts.mnInsMode |= tabopts::DEFAULT_BORDER; + aInsTableOpts.mnInsMode |= tabopts::DEFAULT_BORDER; //DontSplitTable if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_6, true, &pItem) && !static_cast< const SfxBoolItem* >(pItem)->GetValue() ) - aInsTblOpts.mnInsMode |= tabopts::SPLIT_LAYOUT; + aInsTableOpts.mnInsMode |= tabopts::SPLIT_LAYOUT; } else { @@ -834,7 +834,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute() ) { - pDlg->GetValues( cDelim, aInsTblOpts, pTAFmt ); + pDlg->GetValues( cDelim, aInsTableOpts, pTAFormat ); } } @@ -852,12 +852,12 @@ void SwBaseShell::Execute(SfxRequest &rReq) aReq.AppendItem( SfxStringItem( FN_PARAM_1, OUString(cDelim) )); if(bToTable) { - if(pTAFmt) - aReq.AppendItem( SfxStringItem( FN_PARAM_2, pTAFmt->GetName())); - aReq.AppendItem( SfxBoolItem ( FN_PARAM_3, 0 != (aInsTblOpts.mnInsMode & tabopts::HEADLINE))); - aReq.AppendItem( SfxInt16Item( FN_PARAM_4, (short)aInsTblOpts.mnRowsToRepeat )); - aReq.AppendItem( SfxBoolItem ( FN_PARAM_5, 0 != (aInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER) )); - aReq.AppendItem( SfxBoolItem ( FN_PARAM_6, !(aInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT))); + if(pTAFormat) + aReq.AppendItem( SfxStringItem( FN_PARAM_2, pTAFormat->GetName())); + aReq.AppendItem( SfxBoolItem ( FN_PARAM_3, 0 != (aInsTableOpts.mnInsMode & tabopts::HEADLINE))); + aReq.AppendItem( SfxInt16Item( FN_PARAM_4, (short)aInsTableOpts.mnRowsToRepeat )); + aReq.AppendItem( SfxBoolItem ( FN_PARAM_5, 0 != (aInsTableOpts.mnInsMode & tabopts::DEFAULT_BORDER) )); + aReq.AppendItem( SfxBoolItem ( FN_PARAM_6, !(aInsTableOpts.mnInsMode & tabopts::SPLIT_LAYOUT))); } aReq.Done(); } @@ -866,7 +866,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.TableToText( cDelim ); else { - bInserted = rSh.TextToTable( aInsTblOpts, cDelim, text::HoriOrientation::FULL, pTAFmt ); + bInserted = rSh.TextToTable( aInsTableOpts, cDelim, text::HoriOrientation::FULL, pTAFormat ); } rSh.EnterStdMode(); @@ -874,7 +874,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSaveView.AutoCaption( TABLE_CAP ); } if(bDeleteFormat) - delete pTAFmt; + delete pTAFormat; } break; case SID_STYLE_WATERCAN: @@ -930,7 +930,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - SwFmtURL aURL( static_cast<const SwFmtURL&>(aSet.Get( RES_URL )) ); + SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetMap( &pDlg->GetImageMap() ); aSet.Put( aURL ); rSh.SetFlyFrmAttr( aSet ); @@ -965,7 +965,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.StartAction(); SfxItemSet aSet( rSh.GetAttrPool(), RES_SURROUND, RES_SURROUND); rSh.GetFlyFrmAttr( aSet ); - SwFmtSurround aSur( static_cast<const SwFmtSurround&>(aSet.Get( RES_SURROUND )) ); + SwFormatSurround aSur( static_cast<const SwFormatSurround&>(aSet.Get( RES_SURROUND )) ); if ( !aSur.IsContour() ) { aSur.SetContour( true ); @@ -1016,7 +1016,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) // shall be changed in FEShell::SetFlyFrmAttr/SetFlyFrmAnchor, // possibly as a result of the anchor change. SfxItemSet aSet( GetPool(), RES_VERT_ORIENT, RES_ANCHOR ); - SwFmtAnchor aAnc( eSet, rSh.GetPhyPageNum() ); + SwFormatAnchor aAnc( eSet, rSh.GetPhyPageNum() ); aSet.Put( aAnc ); rSh.SetFlyFrmAttr(aSet); } @@ -1034,9 +1034,9 @@ void SwBaseShell::Execute(SfxRequest &rReq) SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT); rSh.GetFlyFrmAttr(aSet); - const SwFmtSurround& rSurround = static_cast<const SwFmtSurround&>(aSet.Get(RES_SURROUND)); - const SwFmtVertOrient& rVert = static_cast<const SwFmtVertOrient&>(aSet.Get(RES_VERT_ORIENT)); - const SwFmtHoriOrient& rHori = static_cast<const SwFmtHoriOrient&>(aSet.Get(RES_HORI_ORIENT)); + const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)); + const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(aSet.Get(RES_VERT_ORIENT)); + const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(aSet.Get(RES_HORI_ORIENT)); sal_Int16 eVOrient = rVert.GetVertOrient(); sal_Int16 eHOrient = rHori.GetHoriOrient(); SwSurround eSurround = rSurround.GetSurround(); @@ -1047,37 +1047,37 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FLY_AT_PAGE: //Wrap through, left or from left, top, from top if(eSurround != SURROUND_THROUGHT) - aSet.Put(SwFmtSurround(SURROUND_THROUGHT)); + aSet.Put(SwFormatSurround(SURROUND_THROUGHT)); if( eVOrient != text::VertOrientation::TOP && eVOrient != text::VertOrientation::NONE) - aSet.Put(SwFmtVertOrient(0, text::VertOrientation::TOP)); + aSet.Put(SwFormatVertOrient(0, text::VertOrientation::TOP)); if (eHOrient != text::HoriOrientation::NONE && eHOrient != text::HoriOrientation::LEFT) - aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); + aSet.Put(SwFormatHoriOrient(0, text::HoriOrientation::LEFT)); break; case FLY_AT_PARA: // left, from left, right, top, no wrap, wrap left and right if(eSurround != SURROUND_LEFT || eSurround != SURROUND_RIGHT) - aSet.Put(SwFmtSurround(SURROUND_LEFT)); + aSet.Put(SwFormatSurround(SURROUND_LEFT)); if( eVOrient != text::VertOrientation::TOP) - aSet.Put(SwFmtVertOrient(0, text::VertOrientation::TOP)); + aSet.Put(SwFormatVertOrient(0, text::VertOrientation::TOP)); if (eHOrient != text::HoriOrientation::NONE && eHOrient != text::HoriOrientation::LEFT && eHOrient != text::HoriOrientation::RIGHT) - aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); + aSet.Put(SwFormatHoriOrient(0, text::HoriOrientation::LEFT)); break; case FLY_AT_CHAR: // left, from left, right, top, wrap through if(eSurround != SURROUND_THROUGHT) - aSet.Put(SwFmtSurround(SURROUND_THROUGHT)); + aSet.Put(SwFormatSurround(SURROUND_THROUGHT)); if( eVOrient != text::VertOrientation::TOP) - aSet.Put(SwFmtVertOrient(0, text::VertOrientation::TOP)); + aSet.Put(SwFormatVertOrient(0, text::VertOrientation::TOP)); if (eHOrient != text::HoriOrientation::NONE && eHOrient != text::HoriOrientation::LEFT && eHOrient != text::HoriOrientation::RIGHT) - aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); + aSet.Put(SwFormatHoriOrient(0, text::HoriOrientation::LEFT)); break; default: @@ -1163,8 +1163,8 @@ void SwBaseShell::Execute(SfxRequest &rReq) // Tabele cell(s) selected? if ( rSh.IsTableMode() ) { - SwFrmFmt *pFmt = rSh.GetTableFmt(); - pFmt->SetFmtAttr( *pItem ); + SwFrameFormat *pFormat = rSh.GetTableFormat(); + pFormat->SetFormatAttr( *pItem ); } else if ( rSh.IsFrmSelected() ) { @@ -1281,7 +1281,7 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl) { SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND); rSh.GetFlyFrmAttr(aSet); - const SwFmtSurround& rWrap = static_cast<const SwFmtSurround&>(aSet.Get(RES_SURROUND)); + const SwFormatSurround& rWrap = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)); bSetState = true; bState = rWrap.IsContour(); } @@ -1344,7 +1344,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case FN_INSERT_REGION: - if( rSh.CrsrInsideInputFld() + if( rSh.CrsrInsideInputField() || rSh.IsSelFrmMode() || !rSh.IsInsRegionAvailable() ) { @@ -1356,7 +1356,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) { FrmTypeFlags eFrmType = rSh.GetFrmType(0,true); if( (eFrmType & FrmTypeFlags::FOOTNOTE) || - !rSh.GetTableFmt() ) + !rSh.GetTableFormat() ) rSet.DisableItem( nWhich ); } break; @@ -1372,7 +1372,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) { FrmTypeFlags eFrmType = rSh.GetFrmType(0,true); if( (eFrmType & FrmTypeFlags::FOOTNOTE) || - (!rSh.GetTableFmt() && !rSh.IsTextToTableAvailable() ) ) + (!rSh.GetTableFormat() && !rSh.IsTextToTableAvailable() ) ) rSet.DisableItem( nWhich ); } break; @@ -1384,8 +1384,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) // Table cell(s) selected? if ( rSh.IsTableMode() ) { - SwFrmFmt *pFmt = rSh.GetTableFmt(); - aSet.Put(pFmt->GetFmtAttr( nWhich, true )); + SwFrameFormat *pFormat = rSh.GetTableFormat(); + aSet.Put(pFormat->GetFormatAttr( nWhich, true )); } else if( rSh.IsFrmSelected() ) { @@ -1475,7 +1475,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) case FN_BACKSPACE: case SID_DELETE: - if ( ( rSh.HasReadonlySel() && !rSh.CrsrInsideInputFld() ) + if ( ( rSh.HasReadonlySel() && !rSh.CrsrInsideInputField() ) || rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0 ) { rSet.DisableItem( nWhich ); @@ -1566,7 +1566,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) rSh.GetObjAttr(aSet); else rSh.GetFlyFrmAttr(aSet); - RndStdIds eSet = static_cast<const SwFmtAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); + RndStdIds eSet = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); const bool bSet = ((nWhich == FN_TOOL_ANCHOR_PAGE) && (eSet == FLY_AT_PAGE)) @@ -1641,9 +1641,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) else { rSh.GetFlyFrmAttr(aSet); - nAnchorType = static_cast<const SwFmtAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); + nAnchorType = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); } - const SwFmtSurround& rWrap = static_cast<const SwFmtSurround&>(aSet.Get(RES_SURROUND)); + const SwFormatSurround& rWrap = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)); const SvxOpaqueItem& rOpaque = static_cast<const SvxOpaqueItem&>(aSet.Get(RES_OPAQUE)); bool bOpaque = rOpaque.GetValue(); @@ -1812,7 +1812,7 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot ) rSh.GetObjAttr(aSet); else rSh.GetFlyFrmAttr(aSet); - SwFmtSurround aWrap( static_cast<const SwFmtSurround&>(aSet.Get(RES_SURROUND)) ); + SwFormatSurround aWrap( static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)) ); SwSurround nOldSurround(aWrap.GetSurround()); SwSurround nSurround = SURROUND_PARALLEL; @@ -1932,7 +1932,7 @@ SwBaseShell::~SwBaseShell() rView.GetWrtShell().SetGrfArrivedLnk( Link<>() ); } -void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq ) +void SwBaseShell::ExecTextCtrl( SfxRequest& rReq ) { const SfxItemSet *pArgs = rReq.GetArgs(); @@ -2039,8 +2039,8 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq ) if ( !isCHRATR(nWhich) || ( rSh.HasSelection() && rSh.IsSelFullPara() ) ) { - SwTxtFmtColl * pColl = rSh.GetCurTxtFmtColl(); - if ( pColl && pColl->IsAutoUpdateFmt() ) + SwTextFormatColl * pColl = rSh.GetCurTextFormatColl(); + if ( pColl && pColl->IsAutoUpdateFormat() ) { rSh.AutoUpdatePara( pColl, *pArgs ); bAuto = true; @@ -2058,13 +2058,13 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq ) rReq.Done(); } -void SwBaseShell::GetTxtCtrlState( SfxItemSet& rSet ) +void SwBaseShell::GetTextCtrlState( SfxItemSet& rSet ) { SwWrtShell &rSh = GetShell(); rSh.GetCurAttr( rSet ); } -void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet ) +void SwBaseShell::GetTextFontCtrlState( SfxItemSet& rSet ) { SwWrtShell &rSh = GetShell(); bool bFirst = true; @@ -2160,7 +2160,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet) //UUUU Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); - aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrmFmt()->GetAttrSet()); + aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet()); if(nSelType & nsSelectionType::SEL_GRF || nsSelectionType::SEL_FRM & nSelType) { @@ -2219,7 +2219,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) //UUUU Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); - aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrmFmt()->GetAttrSet()); + aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet()); if((nsSelectionType::SEL_FRM & nSelType) || (nsSelectionType::SEL_GRF & nSelType)) { @@ -2278,17 +2278,17 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) //UUUU Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); - aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrmFmt()->GetAttrSet()); + aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet()); setSvxBrushItemAsFillAttributesToTargetSet(aBrushItem, aCoreSet); if((nsSelectionType::SEL_FRM & nSelType) || (nsSelectionType::SEL_GRF & nSelType)) { // Template autoupdate - SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); + SwFrameFormat* pFormat = rSh.GetCurFrameFormat(); - if(pFmt && pFmt->IsAutoUpdateFmt()) + if(pFormat && pFormat->IsAutoUpdateFormat()) { - rSh.AutoUpdateFrame(pFmt, aCoreSet); + rSh.AutoUpdateFrame(pFormat, aCoreSet); } else { @@ -2297,9 +2297,9 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) } else { - SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); + SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); - if(pColl && pColl->IsAutoUpdateFmt()) + if(pColl && pColl->IsAutoUpdateFormat()) { rSh.AutoUpdatePara(pColl, aCoreSet); } @@ -2559,12 +2559,12 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) !rSh.IsTableMode() ) { const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - SwInsertTableOptions aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode); + SwInsertTableOptions aInsTableOpts = pModOpt->GetInsTableFlags(bHTMLMode); rSh.StartUndo(UNDO_INSTABLE); bCallEndUndo = true; - bool bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL ); + bool bInserted = rSh.TextToTable( aInsTableOpts, '\t', text::HoriOrientation::FULL ); rSh.EnterStdMode(); if (bInserted) rTempView.AutoCaption(TABLE_CAP); @@ -2574,10 +2574,10 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) { sal_uInt16 nCols = 0; sal_uInt16 nRows = 0; - SwInsertTableOptions aInsTblOpts( tabopts::ALL_TBL_INS_ATTR, 1 ); + SwInsertTableOptions aInsTableOpts( tabopts::ALL_TBL_INS_ATTR, 1 ); OUString aTableName; OUString aAutoName; - SwTableAutoFmt* pTAFmt = 0; + SwTableAutoFormat* pTAFormat = 0; if( pArgs && pArgs->Count() >= 2 ) { @@ -2598,13 +2598,13 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) aAutoName = pAuto->GetValue(); if ( !aAutoName.isEmpty() ) { - SwTableAutoFmtTbl aTableTbl; - aTableTbl.Load(); - for ( sal_uInt16 n=0; n<aTableTbl.size(); n++ ) + SwTableAutoFormatTable aTableTable; + aTableTable.Load(); + for ( sal_uInt16 n=0; n<aTableTable.size(); n++ ) { - if ( aTableTbl[n].GetName() == aAutoName ) + if ( aTableTable[n].GetName() == aAutoName ) { - pTAFmt = new SwTableAutoFmt( aTableTbl[n] ); + pTAFormat = new SwTableAutoFormat( aTableTable[n] ); break; } } @@ -2612,11 +2612,11 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) } if ( pFlags ) - aInsTblOpts.mnInsMode = (sal_uInt16) pFlags->GetValue(); + aInsTableOpts.mnInsMode = (sal_uInt16) pFlags->GetValue(); else { const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode); + aInsTableOpts = pModOpt->GetInsTableFlags(bHTMLMode); } } @@ -2628,7 +2628,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute() ) { - pDlg->GetValues( aTableName, nRows, nCols, aInsTblOpts, aAutoName, pTAFmt ); + pDlg->GetValues( aTableName, nRows, nCols, aInsTableOpts, aAutoName, pTAFormat ); } else _rRequest.Ignore(); @@ -2642,7 +2642,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) _rRequest.AppendItem( SfxStringItem( FN_PARAM_2, aAutoName ) ); _rRequest.AppendItem( SfxUInt16Item( SID_ATTR_TABLE_COLUMN, nCols ) ); _rRequest.AppendItem( SfxUInt16Item( SID_ATTR_TABLE_ROW, nRows ) ); - _rRequest.AppendItem( SfxInt32Item( FN_PARAM_1, (sal_Int32) aInsTblOpts.mnInsMode ) ); + _rRequest.AppendItem( SfxInt32Item( FN_PARAM_1, (sal_Int32) aInsTableOpts.mnInsMode ) ); _rRequest.Done(); rSh.StartUndo(UNDO_INSTABLE); @@ -2652,26 +2652,26 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) if( rSh.HasSelection() ) rSh.DelRight(); - rSh.InsertTable( aInsTblOpts, nRows, nCols, text::HoriOrientation::FULL, pTAFmt ); + rSh.InsertTable( aInsTableOpts, nRows, nCols, text::HoriOrientation::FULL, pTAFormat ); rSh.MoveTable( fnTablePrev, fnTableStart ); - if( !aTableName.isEmpty() && !rSh.GetTblStyle( aTableName ) ) - rSh.GetTableFmt()->SetName( aTableName ); + if( !aTableName.isEmpty() && !rSh.GetTableStyle( aTableName ) ) + rSh.GetTableFormat()->SetName( aTableName ); rSh.EndAllAction(); rTempView.AutoCaption(TABLE_CAP); } - delete pTAFmt; + delete pTAFormat; } if( bCallEndUndo ) { SwRewriter aRewriter; - if (rSh.GetTableFmt()) + if (rSh.GetTableFormat()) { aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_START_QUOTE)); - aRewriter.AddRule(UndoArg2, rSh.GetTableFmt()->GetName()); + aRewriter.AddRule(UndoArg2, rSh.GetTableFormat()->GetName()); aRewriter.AddRule(UndoArg3, SW_RESSTR(STR_END_QUOTE)); } @@ -2806,18 +2806,18 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq) sal_uInt16 nDesc = rSh.GetCurPageDesc(); SwPageDesc aDesc( rSh.GetPageDesc( nDesc ) ); if ( nPos == nPagePos ) - aDesc.GetMaster().SetFmtAttr( aBrush ); + aDesc.GetMaster().SetFormatAttr( aBrush ); else if ( nPos == nHeaderPos ) { - SwFmtHeader aHead( aDesc.GetMaster().GetHeader() ); - aHead.GetHeaderFmt()->SetFmtAttr( aBrush ); - aDesc.GetMaster().SetFmtAttr( aHead ); + SwFormatHeader aHead( aDesc.GetMaster().GetHeader() ); + aHead.GetHeaderFormat()->SetFormatAttr( aBrush ); + aDesc.GetMaster().SetFormatAttr( aHead ); } else if ( nPos == nFooterPos ) { - SwFmtFooter aFoot( aDesc.GetMaster().GetFooter() ); - aFoot.GetFooterFmt()->SetFmtAttr( aBrush ); - aDesc.GetMaster().SetFmtAttr( aFoot ); + SwFormatFooter aFoot( aDesc.GetMaster().GetFooter() ); + aFoot.GetFooterFormat()->SetFormatAttr( aBrush ); + aDesc.GetMaster().SetFormatAttr( aFoot ); } rSh.ChgPageDesc( nDesc, aDesc ); } diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index 80cb4c4b1c49..28c8d9691452 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -369,9 +369,9 @@ void SwDrawShell::Execute(SfxRequest &rReq) { if (SdrObject* pObj = IsSingleFillableNonOLESelected()) { - SwFrmFmt* pFrmFmt = ::FindFrmFmt(pObj); - if (pFrmFmt) - SwTextBoxHelper::create(pFrmFmt); + SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj); + if (pFrameFormat) + SwTextBoxHelper::create(pFrameFormat); } break; } @@ -379,9 +379,9 @@ void SwDrawShell::Execute(SfxRequest &rReq) { if (SdrObject* pObj = IsSingleFillableNonOLESelected()) { - SwFrmFmt* pFrmFmt = ::FindFrmFmt(pObj); - if (pFrmFmt) - SwTextBoxHelper::destroy(pFrmFmt); + SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj); + if (pFrameFormat) + SwTextBoxHelper::destroy(pFrameFormat); } break; } @@ -495,9 +495,9 @@ void SwDrawShell::GetState(SfxItemSet& rSet) bool bDisable = true; if (SdrObject* pObj = IsSingleFillableNonOLESelected()) { - SwFrmFmt* pFrmFmt = ::FindFrmFmt(pObj); + SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj); // Allow creating a TextBox only in case this is a draw format without a TextBox so far. - if (pFrmFmt && pFrmFmt->Which() == RES_DRAWFRMFMT && !SwTextBoxHelper::findTextBox(pFrmFmt)) + if (pFrameFormat && pFrameFormat->Which() == RES_DRAWFRMFMT && !SwTextBoxHelper::findTextBox(pFrameFormat)) { if (SdrObjCustomShape* pCustomShape = PTR_CAST(SdrObjCustomShape, pObj)) { @@ -518,9 +518,9 @@ void SwDrawShell::GetState(SfxItemSet& rSet) bool bDisable = true; if (SdrObject* pObj = IsSingleFillableNonOLESelected()) { - SwFrmFmt* pFrmFmt = ::FindFrmFmt(pObj); + SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj); // Allow removing a TextBox only in case it has one. - if (pFrmFmt && SwTextBoxHelper::findTextBox(pFrmFmt)) + if (pFrameFormat && SwTextBoxHelper::findTextBox(pFrameFormat)) bDisable = false; } diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 348fff2b8c79..bf405b084e98 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -233,16 +233,16 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(true, bRTL, bVertL2R))); aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL)); - SwFrmFmt* pFrmFmt = FindFrmFmt( pObj ); + SwFrameFormat* pFrameFormat = FindFrameFormat( pObj ); - aSet.Put( pFrmFmt->GetFmtAttr(RES_FOLLOW_TEXT_FLOW) ); + aSet.Put( pFrameFormat->GetFormatAttr(RES_FOLLOW_TEXT_FLOW) ); - SwFmtVertOrient aVOrient(static_cast<const SwFmtVertOrient&>(pFrmFmt->GetFmtAttr(RES_VERT_ORIENT))); + SwFormatVertOrient aVOrient(static_cast<const SwFormatVertOrient&>(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT))); aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_VERT_ORIENT, aVOrient.GetVertOrient())); aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_VERT_RELATION, aVOrient.GetRelationOrient() )); aSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_VERT_POSITION, aVOrient.GetPos())); - SwFmtHoriOrient aHOrient(static_cast<const SwFmtHoriOrient&>(pFrmFmt->GetFmtAttr(RES_HORI_ORIENT))); + SwFormatHoriOrient aHOrient(static_cast<const SwFormatHoriOrient&>(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT))); aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_ORIENT, aHOrient.GetHoriOrient())); aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_RELATION, aHOrient.GetRelationOrient() )); aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_HORI_MIRROR, aHOrient.IsPosToggle())); @@ -284,7 +284,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) ->GetValue(), false, bPosCorr ); else { - SwFmtAnchor aAnchor(pFrmFmt->GetAnchor()); + SwFormatAnchor aAnchor(pFrameFormat->GetAnchor()); aAnchor.SetType((RndStdIds)static_cast<const SfxInt16Item*>(pAnchorItem)->GetValue()); aFrmAttrSet.Put( aAnchor ); } @@ -459,10 +459,10 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) { pSh->StartAction(); SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - SwFrmFmt* pFrmFmt = FindFrmFmt( pObj ); - SwFmtVertOrient aVOrient(static_cast<const SwFmtVertOrient&>(pFrmFmt->GetFmtAttr(RES_VERT_ORIENT))); + SwFrameFormat* pFrameFormat = FindFrameFormat( pObj ); + SwFormatVertOrient aVOrient(static_cast<const SwFormatVertOrient&>(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT))); aVOrient.SetVertOrient( nVertOrient ); - pFrmFmt->SetFmtAttr(aVOrient); + pFrameFormat->SetFormatAttr(aVOrient); pSh->EndAction(); } break; @@ -761,20 +761,20 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation // 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 >(pValidation->nAnchorType); - const SwPosition* pCntntPos = 0; + const SwPosition* pContentPos = 0; SdrView* pSdrView = pSh->GetDrawView(); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); if( rMarkList.GetMarkCount() == 1 ) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - SwFrmFmt* pFrmFmt = FindFrmFmt( pObj ); - pCntntPos = pFrmFmt->GetAnchor().GetCntntAnchor(); + SwFrameFormat* pFrameFormat = FindFrameFormat( pObj ); + pContentPos = pFrameFormat->GetAnchor().GetContentAnchor(); } pSh->CalcBoundRect( aBoundRect, eAnchorType, pValidation->nHRelOrient, pValidation->nVRelOrient, - pCntntPos, + pContentPos, pValidation->bFollowTextFlow, pValidation->bMirror, NULL, &pValidation->aPercentSize); diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 8ebc76a8651c..57a8b3cb7438 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -415,8 +415,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) aDlgAttr.Put(aEditAttr); aDlgAttr.Put( SvxHyphenZoneItem( false, RES_PARATR_HYPHENZONE) ); - aDlgAttr.Put( SvxFmtBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); - aDlgAttr.Put( SvxFmtSplitItem( true, RES_PARATR_SPLIT ) ); + aDlgAttr.Put( SvxFormatBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); + aDlgAttr.Put( SvxFormatSplitItem( true, RES_PARATR_SPLIT ) ); aDlgAttr.Put( SvxWidowsItem( 0, RES_PARATR_WIDOWS ) ); aDlgAttr.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) ); @@ -465,8 +465,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) if(pItem) { const SvxHyperlinkItem& rHLinkItem = *static_cast<const SvxHyperlinkItem *>(pItem); - SvxURLField aFld(rHLinkItem.GetURL(), rHLinkItem.GetName(), SVXURLFORMAT_APPDEFAULT); - aFld.SetTargetFrame(rHLinkItem.GetTargetFrame()); + SvxURLField aField(rHLinkItem.GetURL(), rHLinkItem.GetName(), SVXURLFORMAT_APPDEFAULT); + aField.SetTargetFrame(rHLinkItem.GetTargetFrame()); const SvxFieldItem* pFieldItem = pOLV->GetFieldAtSelection(); @@ -477,7 +477,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) aSel.nEndPos++; pOLV->SetSelection(aSel); } - pOLV->InsertField(SvxFieldItem(aFld, EE_FEATURE_FIELD)); + pOLV->InsertField(SvxFieldItem(aField, EE_FEATURE_FIELD)); } } break; @@ -878,7 +878,7 @@ ASK_ESCAPE: } } -void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet) +void SwDrawTextShell::GetDrawTextCtrlState(SfxItemSet& rSet) { if (!IsTextEdit()) // Otherwise crash! return; diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index e78ef356e430..d42f0e98a2c8 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -89,14 +89,14 @@ using namespace ::com::sun::star::uno; // Prototypes static void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine); -static const SwFrmFmt* lcl_GetFrmFmtByName(SwWrtShell& rSh, const OUString& rName) +static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell& rSh, const OUString& rName) { const size_t nCount = rSh.GetFlyCount(FLYCNTTYPE_FRM); for( size_t i = 0; i < nCount; ++i ) { - const SwFrmFmt* pFmt = rSh.GetFlyNum(i, FLYCNTTYPE_FRM); - if(pFmt->GetName() == rName) - return pFmt; + const SwFrameFormat* pFormat = rSh.GetFlyNum(i, FLYCNTTYPE_FRM); + if(pFormat->GetName() == rName) + return pFormat; } return 0; } @@ -167,7 +167,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) SfxItemSet aSet(GetPool(),RES_COL,RES_COL); rSh.GetFlyFrmAttr( aSet ); - SwFmtCol aCol(static_cast<const SwFmtCol&>(aSet.Get(RES_COL))); + SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL))); // GutterWidth will not always passed, hence get firstly // (see view2: Execute on this slot) sal_uInt16 nGutterWidth = aCol.GetGutterWidth(); @@ -176,10 +176,10 @@ void SwFrameShell::Execute(SfxRequest &rReq) aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth()); aSet.Put(aCol); // Template AutoUpdate - SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); - if(pFmt && pFmt->IsAutoUpdateFmt()) + SwFrameFormat* pFormat = rSh.GetCurFrameFormat(); + if(pFormat && pFormat->IsAutoUpdateFormat()) { - rSh.AutoUpdateFrame(pFmt, aSet); + rSh.AutoUpdateFrame(pFormat, aSet); } else { @@ -202,7 +202,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); - SwFmtURL aURL( static_cast<const SwFmtURL&>(aSet.Get( RES_URL )) ); + SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); OUString sOldName(rHLinkItem.GetName().toAsciiUpperCase()); OUString sFlyName(rSh.GetFlyName().toAsciiUpperCase()); @@ -232,7 +232,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) break; case FN_FRAME_UNCHAIN: - rSh.Unchain( (SwFrmFmt&)*rSh.GetFlyFrmFmt() ); + rSh.Unchain( (SwFrameFormat&)*rSh.GetFlyFrameFormat() ); GetView().GetViewFrame()->GetBindings().Invalidate(FN_FRAME_CHAIN); break; case FN_FORMAT_FOOTNOTE_DLG: @@ -266,7 +266,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); bool bUpdateMgr = true; - bool bCopyToFmt = false; + bool bCopyToFormat = false; switch ( nSlot ) { case SID_OBJECT_ALIGN_MIDDLE: @@ -329,7 +329,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if(pArgs) { aMgr.SetAttrSet( *pArgs ); - bCopyToFmt = true; + bCopyToFormat = true; } } break; @@ -339,7 +339,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if(pArgs && SfxItemState::SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem)) { aMgr.SetAttrSet( *pArgs ); - bCopyToFmt = true; + bCopyToFormat = true; } } break; @@ -433,12 +433,12 @@ void SwFrameShell::Execute(SfxRequest &rReq) } const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE); - SwFmtFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); + SwFormatFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); aSet.Put(aFrmSize); const SwRect &rPr = rSh.GetAnyCurRect(RECT_PAGE_PRT); - SwFmtFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); + SwFormatFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA)); aSet.Put(aPrtSize); @@ -446,7 +446,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) aSet.SetParent( aMgr.GetAttrSet().GetParent() ); // On % values initialize size - SwFmtFrmSize& rSize = const_cast<SwFmtFrmSize&>(static_cast<const SwFmtFrmSize&>(aSet.Get(RES_FRM_SIZE))); + SwFormatFrmSize& rSize = const_cast<SwFormatFrmSize&>(static_cast<const SwFormatFrmSize&>(aSet.Get(RES_FRM_SIZE))); if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) rSize.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()); if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff) @@ -502,10 +502,10 @@ void SwFrameShell::Execute(SfxRequest &rReq) rSh.SetObjTitle(static_cast<const SfxStringItem*>(pItem)->GetValue()); } // Template AutoUpdate - SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); - if(pFmt && pFmt->IsAutoUpdateFmt()) + SwFrameFormat* pFormat = rSh.GetCurFrameFormat(); + if(pFormat && pFormat->IsAutoUpdateFormat()) { - rSh.AutoUpdateFrame(pFmt, *pOutSet); + rSh.AutoUpdateFrame(pFormat, *pOutSet); // Anything which is not supported by the format must be set hard. if(SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) rSh.SetFlyName(static_cast<const SfxStringItem*>(pItem)->GetValue()); @@ -522,7 +522,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) else aMgr.SetAttrSet( *pOutSet ); - const SwFrmFmt* pCurrFlyFmt = rSh.GetFlyFrmFmt(); + const SwFrameFormat* pCurrFlyFormat = rSh.GetFlyFrameFormat(); if(SfxItemState::SET == pOutSet->GetItemState(FN_PARAM_CHAIN_PREVIOUS, false, &pItem)) @@ -531,15 +531,15 @@ void SwFrameShell::Execute(SfxRequest &rReq) OUString sPrevName = static_cast<const SfxStringItem*>(pItem)->GetValue(); - const SwFmtChain &rChain = pCurrFlyFmt->GetChain(); + const SwFormatChain &rChain = pCurrFlyFormat->GetChain(); //needs cast - no non-const method available - SwFlyFrmFmt* pFlyFmt = + SwFlyFrameFormat* pFlyFormat = rChain.GetPrev(); - if(pFlyFmt) + if(pFlyFormat) { - if (pFlyFmt->GetName() != sPrevName) + if (pFlyFormat->GetName() != sPrevName) { - rSh.Unchain(*pFlyFmt); + rSh.Unchain(*pFlyFormat); } else sPrevName.clear(); @@ -548,12 +548,12 @@ void SwFrameShell::Execute(SfxRequest &rReq) if (!sPrevName.isEmpty()) { //needs cast - no non-const method available - SwFrmFmt* pPrevFmt = const_cast<SwFrmFmt*>( - lcl_GetFrmFmtByName(rSh, sPrevName)); - SAL_WARN_IF(!pPrevFmt, "sw.ui", "No frame found!"); - if(pPrevFmt) + SwFrameFormat* pPrevFormat = const_cast<SwFrameFormat*>( + lcl_GetFrameFormatByName(rSh, sPrevName)); + SAL_WARN_IF(!pPrevFormat, "sw.ui", "No frame found!"); + if(pPrevFormat) { - rSh.Chain(*pPrevFmt, *pCurrFlyFmt); + rSh.Chain(*pPrevFormat, *pCurrFlyFormat); } } rSh.SetChainMarker(); @@ -565,15 +565,15 @@ void SwFrameShell::Execute(SfxRequest &rReq) rSh.HideChainMarker(); OUString sNextName = static_cast<const SfxStringItem*>(pItem)->GetValue(); - const SwFmtChain &rChain = pCurrFlyFmt->GetChain(); + const SwFormatChain &rChain = pCurrFlyFormat->GetChain(); //needs cast - no non-const method available - SwFlyFrmFmt* pFlyFmt = + SwFlyFrameFormat* pFlyFormat = rChain.GetNext(); - if(pFlyFmt) + if(pFlyFormat) { - if (pFlyFmt->GetName() != sNextName) + if (pFlyFormat->GetName() != sNextName) { - rSh.Unchain(*const_cast<SwFlyFrmFmt*>(static_cast<const SwFlyFrmFmt*>( pCurrFlyFmt))); + rSh.Unchain(*const_cast<SwFlyFrameFormat*>(static_cast<const SwFlyFrameFormat*>( pCurrFlyFormat))); } else sNextName.clear(); @@ -582,13 +582,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) if (!sNextName.isEmpty()) { //needs cast - no non-const method available - SwFrmFmt* pNextFmt = const_cast<SwFrmFmt*>( - lcl_GetFrmFmtByName(rSh, sNextName)); - SAL_WARN_IF(!pNextFmt, "sw.ui", "No frame found!"); - if(pNextFmt) + SwFrameFormat* pNextFormat = const_cast<SwFrameFormat*>( + lcl_GetFrameFormatByName(rSh, sNextName)); + SAL_WARN_IF(!pNextFormat, "sw.ui", "No frame found!"); + if(pNextFormat) { - rSh.Chain(*const_cast<SwFrmFmt*>( - pCurrFlyFmt), *pNextFmt); + rSh.Chain(*const_cast<SwFrameFormat*>( + pCurrFlyFormat), *pNextFormat); } } rSh.SetChainMarker(); @@ -602,13 +602,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) break; case FN_FRAME_MIRROR_ON_EVEN_PAGES: { - SwFmtHoriOrient aHori(aMgr.GetHoriOrient()); + SwFormatHoriOrient aHori(aMgr.GetHoriOrient()); bool bMirror = !aHori.IsPosToggle(); aHori.SetPosToggle(bMirror); SfxItemSet aSet(GetPool(), RES_HORI_ORIENT, RES_HORI_ORIENT); aSet.Put(aHori); aMgr.SetAttrSet(aSet); - bCopyToFmt = true; + bCopyToFormat = true; rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror)); } break; @@ -648,10 +648,10 @@ void SwFrameShell::Execute(SfxRequest &rReq) } if ( bUpdateMgr ) { - SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); - if ( bCopyToFmt && pFmt && pFmt->IsAutoUpdateFmt() ) + SwFrameFormat* pFormat = rSh.GetCurFrameFormat(); + if ( bCopyToFormat && pFormat && pFormat->IsAutoUpdateFormat() ) { - rSh.AutoUpdateFrame(pFmt, aMgr.GetAttrSet()); + rSh.AutoUpdateFrame(pFormat, aMgr.GetAttrSet()); } else { @@ -691,7 +691,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) { case RES_FRM_SIZE: { - SwFmtFrmSize aSz(aMgr.GetFrmSize()); + SwFormatFrmSize aSz(aMgr.GetFrmSize()); rSet.Put(aSz); } break; @@ -770,10 +770,10 @@ void SwFrameShell::GetState(SfxItemSet& rSet) { if (aMgr.GetAnchor() == FLY_AT_FLY) { - const SwFrmFmt* pFmt = rSh.IsFlyInFly(); - if (pFmt) + const SwFrameFormat* pFormat = rSh.IsFlyInFly(); + if (pFormat) { - const SwFmtFrmSize& rFrmSz = pFmt->GetFrmSize(); + const SwFormatFrmSize& rFrmSz = pFormat->GetFrmSize(); if (rFrmSz.GetHeightSizeType() != ATT_FIX_SIZE) { rSet.DisableItem( nWhich ); @@ -809,9 +809,9 @@ void SwFrameShell::GetState(SfxItemSet& rSet) if(SfxItemState::SET == aURLSet.GetItemState(RES_URL, true, &pItem)) { - const SwFmtURL* pFmtURL = static_cast<const SwFmtURL*>(pItem); - aHLinkItem.SetURL(pFmtURL->GetURL()); - aHLinkItem.SetTargetFrame(pFmtURL->GetTargetFrameName()); + const SwFormatURL* pFormatURL = static_cast<const SwFormatURL*>(pItem); + aHLinkItem.SetURL(pFormatURL->GetURL()); + aHLinkItem.SetTargetFrame(pFormatURL->GetTargetFrameName()); aHLinkItem.SetName(rSh.GetFlyName()); } @@ -829,9 +829,9 @@ void SwFrameShell::GetState(SfxItemSet& rSet) rSet.DisableItem( FN_FRAME_CHAIN ); else { - const SwFrmFmt *pFmt = rSh.GetFlyFrmFmt(); + const SwFrameFormat *pFormat = rSh.GetFlyFrameFormat(); if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() || - !pFmt || pFmt->GetChain().GetNext() ) + !pFormat || pFormat->GetChain().GetNext() ) { rSet.DisableItem( FN_FRAME_CHAIN ); } @@ -850,9 +850,9 @@ void SwFrameShell::GetState(SfxItemSet& rSet) rSet.DisableItem( FN_FRAME_UNCHAIN ); else { - const SwFrmFmt *pFmt = rSh.GetFlyFrmFmt(); + const SwFrameFormat *pFormat = rSh.GetFlyFrameFormat(); if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() || - !pFmt || !pFmt->GetChain().GetNext() ) + !pFormat || !pFormat->GetChain().GetNext() ) { rSet.DisableItem( FN_FRAME_UNCHAIN ); } @@ -1115,10 +1115,10 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) } aFrameSet.Put( aBoxItem ); // Template AutoUpdate - SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); - if(pFmt && pFmt->IsAutoUpdateFmt()) + SwFrameFormat* pFormat = rSh.GetCurFrameFormat(); + if(pFormat && pFormat->IsAutoUpdateFormat()) { - rSh.AutoUpdateFrame(pFmt, aFrameSet); + rSh.AutoUpdateFrame(pFormat, aFrameSet); } else rSh.SetFlyFrmAttr( aFrameSet ); @@ -1169,7 +1169,7 @@ void SwFrameShell::StateInsert(SfxItemSet &rSet) { rSet.DisableItem(FN_INSERT_FRAME); } - else if ( GetShell().CrsrInsideInputFld() ) + else if ( GetShell().CrsrInsideInputField() ) { rSet.DisableItem(FN_INSERT_FRAME); } diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 86f76c2385a6..39e18fd1ee08 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -259,7 +259,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE); - SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height()); + SwFormatFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height()); aFrmSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) ); aSet.Put( aFrmSize ); @@ -280,7 +280,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.SetParent( aMgr.GetAttrSet().GetParent() ); // At percentage values initialize size - SwFmtFrmSize aSizeCopy = static_cast<const SwFmtFrmSize&>(aSet.Get(RES_FRM_SIZE)); + SwFormatFrmSize aSizeCopy = static_cast<const SwFormatFrmSize&>(aSet.Get(RES_FRM_SIZE)); if (aSizeCopy.GetWidthPercent() && aSizeCopy.GetWidthPercent() != 0xff) aSizeCopy.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()); if (aSizeCopy.GetHeightPercent() && aSizeCopy.GetHeightPercent() != 0xff) @@ -365,7 +365,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_FRMSIZE, false, &pItem )) { - SwFmtFrmSize aSize; + SwFormatFrmSize aSize; const Size& rSz = static_cast<const SvxSizeItem*>(pItem)->GetSize(); aSize.SetWidth( rSz.Width() ); aSize.SetHeight( rSz.Height() ); @@ -381,10 +381,10 @@ void SwGrfShell::Execute(SfxRequest &rReq) } // Templates AutoUpdate - SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); - if(pFmt && pFmt->IsAutoUpdateFmt()) + SwFrameFormat* pFormat = rSh.GetCurFrameFormat(); + if(pFormat && pFormat->IsAutoUpdateFormat()) { - pFmt->SetFmtAttr(*pSet); + pFormat->SetFormatAttr(*pSet); SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE, RES_SURROUND, RES_SURROUND, RES_ANCHOR, RES_ANCHOR, @@ -646,10 +646,10 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) void SwGrfShell::GetAttrState(SfxItemSet &rSet) { SwWrtShell &rSh = GetShell(); - SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange ); + SfxItemSet aCoreSet( GetPool(), aNoTextNodeSetRange ); rSh.GetCurAttr( aCoreSet ); bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ); - bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType(); + bool bIsGrfContent = CNT_GRF == GetShell().GetCntType(); SetGetStateSet( &rSet ); @@ -663,10 +663,10 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) case SID_INSERT_GRAPHIC: case FN_FORMAT_GRAFIC_DLG: case SID_TWAIN_TRANSFER: - if( bParentCntProt || !bIsGrfCntnt ) + if( bParentCntProt || !bIsGrfContent ) bDisable = true; else if ( nWhich == SID_INSERT_GRAPHIC - && rSh.CrsrInsideInputFld() ) + && rSh.CrsrInsideInputField() ) { bDisable = true; } @@ -680,7 +680,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) case SID_COLOR_SETTINGS: { - if ( bParentCntProt || !bIsGrfCntnt ) + if ( bParentCntProt || !bIsGrfContent ) bDisable = true; else { @@ -790,7 +790,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) case SID_GRFFILTER_SEPIA: case SID_GRFFILTER_SOLARIZE: { - if( bParentCntProt || !bIsGrfCntnt ) + if( bParentCntProt || !bIsGrfContent ) bDisable = true; // #i59688# load graphic only if type is unknown else diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 2b386bd07d0c..8c45ea30f451 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -109,18 +109,18 @@ namespace SwLangHelper EditEngine * pEditEngine = rEditView.GetEditEngine(); // get the language - OUString aNewLangTxt; + OUString aNewLangText; SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, SID_LANGUAGE_STATUS , false ); if (pItem) - aNewLangTxt = pItem->GetValue(); + aNewLangText = pItem->GetValue(); //!! Remember the view frame right now... //!! (call to GetView().GetViewFrame() will break if the //!! SwTextShell got destroyed meanwhile.) SfxViewFrame *pViewFrame = rView.GetViewFrame(); - if (aNewLangTxt == "*" ) + if (aNewLangText == "*" ) { // open the dialog "Tools/Options/Language Settings - Language" SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -133,7 +133,7 @@ namespace SwLangHelper else { // setting the new language... - if (!aNewLangTxt.isEmpty()) + if (!aNewLangText.isEmpty()) { const OUString aSelectionLangPrefix("Current_"); const OUString aParagraphLangPrefix("Paragraph_"); @@ -144,23 +144,23 @@ namespace SwLangHelper sal_Int32 nPos = 0; bool bForSelection = true; bool bForParagraph = false; - if (-1 != (nPos = aNewLangTxt.indexOf( aSelectionLangPrefix, 0 ))) + if (-1 != (nPos = aNewLangText.indexOf( aSelectionLangPrefix, 0 ))) { // ... for the current selection - aNewLangTxt = aNewLangTxt.replaceAt(nPos, aSelectionLangPrefix.getLength(), ""); + aNewLangText = aNewLangText.replaceAt(nPos, aSelectionLangPrefix.getLength(), ""); bForSelection = true; } - else if (-1 != (nPos = aNewLangTxt.indexOf( aParagraphLangPrefix , 0 ))) + else if (-1 != (nPos = aNewLangText.indexOf( aParagraphLangPrefix , 0 ))) { // ... for the current paragraph language - aNewLangTxt = aNewLangTxt.replaceAt(nPos, aParagraphLangPrefix.getLength(), ""); + aNewLangText = aNewLangText.replaceAt(nPos, aParagraphLangPrefix.getLength(), ""); bForSelection = true; bForParagraph = true; } - else if (-1 != (nPos = aNewLangTxt.indexOf( aDocumentLangPrefix , 0 ))) + else if (-1 != (nPos = aNewLangText.indexOf( aDocumentLangPrefix , 0 ))) { // ... as default document language - aNewLangTxt = aNewLangTxt.replaceAt(nPos, aDocumentLangPrefix.getLength(), ""); + aNewLangText = aNewLangText.replaceAt(nPos, aDocumentLangPrefix.getLength(), ""); bForSelection = false; } @@ -181,12 +181,12 @@ namespace SwLangHelper rSh.ExtendedSelectAll(); } - if (aNewLangTxt == aStrNone) + if (aNewLangText == aStrNone) SwLangHelper::SetLanguage_None( rSh, pOLV, aSelection, bForSelection, aEditAttr ); - else if (aNewLangTxt == aStrResetLangs) + else if (aNewLangText == aStrResetLangs) SwLangHelper::ResetLanguages( rSh, pOLV, aSelection, bForSelection ); else - SwLangHelper::SetLanguage( rSh, pOLV, aSelection, aNewLangTxt, bForSelection, aEditAttr ); + SwLangHelper::SetLanguage( rSh, pOLV, aSelection, aNewLangText, bForSelection, aEditAttr ); // ugly hack, as it seems that EditView/EditEngine does not update their spellchecking marks // when setting a new language attribute @@ -285,19 +285,19 @@ namespace SwLangHelper //Resolves: fdo#35282 Clear the language from all Text Styles, and //fallback to default document language - const SwTxtFmtColls *pColls = rWrtSh.GetDoc()->GetTxtFmtColls(); + const SwTextFormatColls *pColls = rWrtSh.GetDoc()->GetTextFormatColls(); for(size_t i = 0, nCount = pColls->size(); i < nCount; ++i) { - SwTxtFmtColl &rTxtColl = *(*pColls)[ i ]; - rTxtColl.ResetFmtAttr(nLangWhichId); + SwTextFormatColl &rTextColl = *(*pColls)[ i ]; + rTextColl.ResetFormatAttr(nLangWhichId); } //Resolves: fdo#35282 Clear the language from all Character Styles, //and fallback to default document language - const SwCharFmts *pCharFmts = rWrtSh.GetDoc()->GetCharFmts(); - for(size_t i = 0, nCount = pCharFmts->size(); i < nCount; ++i) + const SwCharFormats *pCharFormats = rWrtSh.GetDoc()->GetCharFormats(); + for(size_t i = 0, nCount = pCharFormats->size(); i < nCount; ++i) { - SwCharFmt &rCharFmt = *(*pCharFmts)[ i ]; - rCharFmt.ResetFmtAttr(nLangWhichId); + SwCharFormat &rCharFormat = *(*pCharFormats)[ i ]; + rCharFormat.ResetFormatAttr(nLangWhichId); } // #i102191: hard set respective language attribute in text document @@ -541,10 +541,10 @@ namespace SwLangHelper // string for guessing language OUString aText; SwPaM *pCrsr = rSh.GetCrsr(); - SwTxtNode *pNode = pCrsr->GetNode().GetTxtNode(); + SwTextNode *pNode = pCrsr->GetNode().GetTextNode(); if (pNode) { - aText = pNode->GetTxt(); + aText = pNode->GetText(); if (!aText.isEmpty()) { sal_Int32 nEnd = pCrsr->GetPoint()->nContent.GetIndex(); @@ -596,9 +596,9 @@ namespace SwLangHelper if (!rWrtSh.IsEndPara()) rWrtSh.MovePara( fnParaCurr, fnParaEnd ); #if OSL_DEBUG_LEVEL > 1 - OUString aSelTxt; - rWrtSh.GetSelectedText( aSelTxt ); - (void) aSelTxt; + OUString aSelText; + rWrtSh.GetSelectedText( aSelText ); + (void) aSelText; #endif } } diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx index a92c5e850170..4d02524c75ce 100644 --- a/sw/source/uibase/shells/listsh.cxx +++ b/sw/source/uibase/shells/listsh.cxx @@ -261,7 +261,7 @@ void SwListShell::GetState(SfxItemSet &rSet) break; case FN_NUM_BULLET_NONUM: - if ( rSh.CrsrInsideInputFld() ) + if ( rSh.CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 7f0028122917..55abe1001d4f 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -138,26 +138,26 @@ static void lcl_SetAttr( SwWrtShell &rSh, const SfxPoolItem &rItem ) { SfxItemSet aSet( rSh.GetView().GetPool(), rItem.Which(), rItem.Which(), 0); aSet.Put( rItem ); - rSh.SetTblAttr( aSet ); + rSh.SetTableAttr( aSet ); } static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) { - SwFrmFmt *pFmt = rSh.GetTableFmt(); + SwFrameFormat *pFormat = rSh.GetTableFormat(); SwTabCols aCols; rSh.GetTabCols( aCols ); //At first get the simple attributes. - rSet.Put( SfxStringItem( FN_PARAM_TABLE_NAME, pFmt->GetName())); + rSet.Put( SfxStringItem( FN_PARAM_TABLE_NAME, pFormat->GetName())); rSet.Put( SfxUInt16Item( FN_PARAM_TABLE_HEADLINE, rSh.GetRowsToRepeat() ) ); - rSet.Put( pFmt->GetShadow() ); + rSet.Put( pFormat->GetShadow() ); rSet.Put(SfxUInt16Item(FN_TABLE_SET_VERT_ALIGN, rSh.GetBoxAlign())); - rSet.Put( pFmt->GetFrmDir() ); + rSet.Put( pFormat->GetFrmDir() ); - SvxULSpaceItem aULSpace( pFmt->GetULSpace() ); + SvxULSpaceItem aULSpace( pFormat->GetULSpace() ); rSet.Put( aULSpace ); - const sal_uInt16 nBackgroundDestination = rSh.GetViewOptions()->GetTblDest(); + const sal_uInt16 nBackgroundDestination = rSh.GetViewOptions()->GetTableDest(); rSet.Put(SwBackgroundDestinationItem(SID_BACKGRND_DESTINATION, nBackgroundDestination )); SvxBrushItem aBrush( RES_BACKGROUND ); if(rSh.GetRowBackground(aBrush)) @@ -201,7 +201,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) rSh.GetTabBorders( rSet ); //row split - SwFmtRowSplit* pSplit = 0; + SwFormatRowSplit* pSplit = 0; rSh.GetRowSplit(pSplit); if(pSplit) { @@ -225,13 +225,13 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) pRep->SetSpace(aCols.GetRightMax()); sal_uInt16 nPercent = 0; - long nWidth = ::GetTableWidth(pFmt, aCols, &nPercent, &rSh ); + long nWidth = ::GetTableWidth(pFormat, aCols, &nPercent, &rSh ); // The table width is wrong for relative values. if(nPercent) nWidth = pRep->GetSpace() * nPercent / 100; - const sal_uInt16 nAlign = pFmt->GetHoriOrient().GetHoriOrient(); + const sal_uInt16 nAlign = pFormat->GetHoriOrient().GetHoriOrient(); pRep->SetAlign(nAlign); - SvxLRSpaceItem aLRSpace( pFmt->GetLRSpace() ); + SvxLRSpaceItem aLRSpace( pFormat->GetLRSpace() ); SwTwips nLeft = aLRSpace.GetLeft(); SwTwips nRight = aLRSpace.GetRight(); SwTwips nDiff = pRep->GetSpace() - nRight - nLeft - nWidth; @@ -279,7 +279,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, if(SfxItemState::SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, false, &pItem)) { SwViewOption aUsrPref( *rSh.GetViewOptions() ); - aUsrPref.SetTblDest((sal_uInt8)static_cast<const SfxUInt16Item*>(pItem)->GetValue()); + aUsrPref.SetTableDest((sal_uInt8)static_cast<const SfxUInt16Item*>(pItem)->GetValue()); SW_MOD()->ApplyUsrPref(aUsrPref, &rSh.GetView()); } bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) || @@ -338,7 +338,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, if(bRowSplit) { - rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pSplit)); + rSh.SetRowSplit(*static_cast<const SwFormatRowSplit*>(pSplit)); } if(!bTableSel) @@ -354,7 +354,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, SwTabCols aTabCols; bool bTabCols = false; SwTableRep* pRep = 0; - SwFrmFmt *pFmt = rSh.GetTableFmt(); + SwFrameFormat *pFormat = rSh.GetTableFormat(); SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) { @@ -363,13 +363,13 @@ void ItemSetToTableParam( const SfxItemSet& rSet, const SwTwips nWidth = pRep->GetWidth(); if ( text::HoriOrientation::FULL == pRep->GetAlign() ) { - SwFmtHoriOrient aAttr( pFmt->GetHoriOrient() ); + SwFormatHoriOrient aAttr( pFormat->GetHoriOrient() ); aAttr.SetHoriOrient( text::HoriOrientation::FULL ); aSet.Put( aAttr ); } else { - SwFmtFrmSize aSz( ATT_VAR_SIZE, nWidth ); + SwFormatFrmSize aSz( ATT_VAR_SIZE, nWidth ); if(pRep->GetWidthPercent()) { aSz.SetWidthPercent( (sal_uInt8)pRep->GetWidthPercent() ); @@ -383,7 +383,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, aSet.Put( aLRSpace ); sal_Int16 eOrient = pRep->GetAlign(); - SwFmtHoriOrient aAttr( 0, eOrient ); + SwFormatHoriOrient aAttr( 0, eOrient ); aSet.Put( aAttr ); // The item must only be recorded while manual alignment, so that the // alignment is not overwritten by the distances while recording. @@ -403,7 +403,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>((pItem))->GetValue()); if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem )) - rSh.SetTableName( *pFmt, static_cast<const SfxStringItem*>(pItem)->GetValue() ); + rSh.SetTableName( *pFormat, static_cast<const SfxStringItem*>(pItem)->GetValue() ); // Copy the chosen attributes in the ItemSet. static const sal_uInt16 aIds[] = @@ -425,7 +425,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, aSet.Put( *pItem ); if( aSet.Count() ) - rSh.SetTblAttr( aSet ); + rSh.SetTableAttr( aSet ); if(bTabCols) { @@ -561,11 +561,11 @@ void SwTableShell::Execute(SfxRequest &rReq) FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView())); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); - boost::scoped_ptr<SwTableRep> pTblRep(::lcl_TableParamToItemSet( aCoreSet, rSh )); + boost::scoped_ptr<SwTableRep> pTableRep(::lcl_TableParamToItemSet( aCoreSet, rSh )); aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); - rSh.GetTblAttr(aCoreSet); - // GetTblAttr overwrites the background! + rSh.GetTableAttr(aCoreSet); + // GetTableAttr overwrites the background! SvxBrushItem aBrush( RES_BACKGROUND ); if(rSh.GetBoxBackground(aBrush)) aCoreSet.Put( aBrush ); @@ -598,7 +598,7 @@ void SwTableShell::Execute(SfxRequest &rReq) } pDlg.reset(); - pTblRep.reset(); + pTableRep.reset(); rBindings.Update(SID_RULER_BORDERS); rBindings.Update(SID_ATTR_TABSTOP); rBindings.Update(SID_RULER_BORDERS_VERTICAL); @@ -628,7 +628,7 @@ void SwTableShell::Execute(SfxRequest &rReq) RES_BOXATR_FORMAT, RES_BOXATR_FORMAT, RES_BOXATR_VALUE, RES_BOXATR_VALUE, 0 ); - rSh.GetTblBoxFormulaAttrs( aBoxSet ); + rSh.GetTableBoxFormulaAttrs( aBoxSet ); SfxItemState eState = aBoxSet.GetItemState(RES_BOXATR_FORMAT); if(eState == SfxItemState::DEFAULT) @@ -638,12 +638,12 @@ void SwTableShell::Execute(SfxRequest &rReq) } else aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, - static_cast<const SwTblBoxNumFormat&>(aBoxSet.Get( + static_cast<const SwTableBoxNumFormat&>(aBoxSet.Get( RES_BOXATR_FORMAT )).GetValue() )); OUString sCurText( rSh.GetTableBoxText() ); aCoreSet.Put( SvxNumberInfoItem( pFormatter, - static_cast<const SwTblBoxValue&>(aBoxSet.Get( + static_cast<const SwTableBoxValue&>(aBoxSet.Get( RES_BOXATR_VALUE)).GetValue(), sCurText, SID_ATTR_NUMBERFORMAT_INFO )); @@ -675,9 +675,9 @@ void SwTableShell::Execute(SfxRequest &rReq) { SfxItemSet aBoxFormatSet( *aCoreSet.GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT ); - aBoxFormatSet.Put( SwTblBoxNumFormat( + aBoxFormatSet.Put( SwTableBoxNumFormat( static_cast<const SfxUInt32Item*>(pNumberFormatItem)->GetValue() )); - rSh.SetTblBoxFormulaAttrs( aBoxFormatSet ); + rSh.SetTableBoxFormulaAttrs( aBoxFormatSet ); } } @@ -690,7 +690,7 @@ void SwTableShell::Execute(SfxRequest &rReq) break; case FN_TABLE_OPTIMAL_HEIGHT: { - const SwFmtFrmSize aSz; + const SwFormatFrmSize aSz; rSh.SetRowHeight( aSz ); bCallDone = true; break; @@ -838,7 +838,7 @@ void SwTableShell::Execute(SfxRequest &rReq) else if( !rReq.IsAPI() ) { SwSelBoxes aBoxes; - ::GetTblSel( rSh, aBoxes ); + ::GetTableSel( rSh, aBoxes ); if ( !aBoxes.empty() ) { long maxX = 0; @@ -995,7 +995,7 @@ void SwTableShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - boost::scoped_ptr<AbstractSplitTableDialog> pDlg(pFact->CreateSplitTblDialog( GetView().GetWindow(), rSh )); + boost::scoped_ptr<AbstractSplitTableDialog> pDlg(pFact->CreateSplitTableDialog( GetView().GetWindow(), rSh )); OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->Execute(); rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, pDlg->GetSplitMode() ) ); @@ -1013,7 +1013,7 @@ void SwTableShell::Execute(SfxRequest &rReq) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateTblMergeDialog(GetView().GetWindow(), bPrev)); + boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateTableMergeDialog(GetView().GetWindow(), bPrev)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK != pDlg->Execute()) bPrev = bNext = false; @@ -1028,7 +1028,7 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_MODE_FIX_PROP : case FN_TABLE_MODE_VARIABLE : { - rSh.SetTblChgMode( ( FN_TABLE_MODE_FIX == nSlot ? TBLFIX_CHGABS + rSh.SetTableChgMode( ( FN_TABLE_MODE_FIX == nSlot ? TBLFIX_CHGABS : FN_TABLE_MODE_FIX_PROP == nSlot ? TBLFIX_CHGPROP : TBLVAR_CHGABS ) ); @@ -1089,8 +1089,8 @@ void SwTableShell::Execute(SfxRequest &rReq) return; } - // Now the slots which are working directly on the TableFmt. - SwFrmFmt *pFmt = rSh.GetTableFmt(); + // Now the slots which are working directly on the TableFormat. + SwFrameFormat *pFormat = rSh.GetTableFormat(); switch ( nSlot ) { case SID_ATTR_ULSPACE: @@ -1110,10 +1110,10 @@ void SwTableShell::Execute(SfxRequest &rReq) SvxLRSpaceItem aLRSpace( *static_cast<const SvxLRSpaceItem*>(pItem) ); aLRSpace.SetWhich( RES_LR_SPACE ); aSet.Put( aLRSpace ); - SwFmtHoriOrient aHori( pFmt->GetHoriOrient() ); + SwFormatHoriOrient aHori( pFormat->GetHoriOrient() ); aHori.SetHoriOrient( text::HoriOrientation::NONE ); aSet.Put( aLRSpace ); - rSh.SetTblAttr( aSet ); + rSh.SetTableAttr( aSet ); } break; // The last case branch which needs a table manager!! @@ -1139,38 +1139,38 @@ void SwTableShell::Execute(SfxRequest &rReq) case SID_ATTR_PARA_SPLIT: if ( pItem ) { - SwFmtLayoutSplit aSplit( static_cast<const SvxFmtSplitItem*>(pItem)->GetValue()); + SwFormatLayoutSplit aSplit( static_cast<const SvxFormatSplitItem*>(pItem)->GetValue()); SfxItemSet aSet(GetPool(), RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT, 0 ); aSet.Put(aSplit); - rSh.SetTblAttr(aSet); + rSh.SetTableAttr(aSet); } break; case SID_ATTR_PARA_KEEP: if ( pItem ) { - SvxFmtKeepItem aKeep( *static_cast<const SvxFmtKeepItem*>(pItem) ); + SvxFormatKeepItem aKeep( *static_cast<const SvxFormatKeepItem*>(pItem) ); aKeep.SetWhich( RES_KEEP ); SfxItemSet aSet(GetPool(), RES_KEEP, RES_KEEP, 0 ); aSet.Put(aKeep); - rSh.SetTblAttr(aSet); + rSh.SetTableAttr(aSet); } break; case FN_TABLE_ROW_SPLIT : { const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>(pItem); - SwFmtRowSplit* pSplit = 0; + SwFormatRowSplit* pSplit = 0; if(!pBool) { rSh.GetRowSplit(pSplit); if(pSplit) pSplit->SetValue(!pSplit->GetValue()); else - pSplit = new SwFmtRowSplit(true); + pSplit = new SwFormatRowSplit(true); } else { - pSplit = new SwFmtRowSplit(pBool->GetValue()); + pSplit = new SwFormatRowSplit(pBool->GetValue()); } rSh.SetRowSplit( *pSplit ); delete pSplit; @@ -1189,9 +1189,9 @@ void SwTableShell::GetState(SfxItemSet &rSet) { SfxWhichIter aIter( rSet ); SwWrtShell &rSh = GetShell(); - SwFrmFmt *pFmt = rSh.GetTableFmt(); + SwFrameFormat *pFormat = rSh.GetTableFormat(); // os #124829# crash report: in case of an invalid shell selection return immediately - if(!pFmt) + if(!pFormat) return; sal_uInt16 nSlot = aIter.FirstWhich(); while ( nSlot ) @@ -1226,13 +1226,13 @@ void SwTableShell::GetState(SfxItemSet &rSet) case SID_INSERT_DIAGRAM: { SvtModuleOptions aMOpt; - if ( !aMOpt.IsMath() || rSh.IsTblComplexForChart() ) + if ( !aMOpt.IsMath() || rSh.IsTableComplexForChart() ) rSet.DisableItem(nSlot); } break; case FN_INSERT_TABLE: - if ( rSh.CrsrInsideInputFld() ) + if ( rSh.CrsrInsideInputField() ) { rSet.DisableItem( nSlot ); } @@ -1241,7 +1241,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_OPTIMAL_HEIGHT: { // Disable if auto height already is enabled. - SwFmtFrmSize *pSz; + SwFormatFrmSize *pSz; rSh.GetRowHeight( pSz ); if ( pSz ) { @@ -1257,10 +1257,10 @@ void SwTableShell::GetState(SfxItemSet &rSet) rSet.DisableItem( nSlot ); break; case RES_LR_SPACE: - rSet.Put(pFmt->GetLRSpace()); + rSet.Put(pFormat->GetLRSpace()); break; case RES_UL_SPACE: - rSet.Put(pFmt->GetULSpace()); + rSet.Put(pFormat->GetULSpace()); break; case SID_TABLE_VERT_NONE: @@ -1279,7 +1279,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_MODE_FIX_PROP : case FN_TABLE_MODE_VARIABLE : { - TblChgMode nMode = rSh.GetTblChgMode(); + TableChgMode nMode = rSh.GetTableChgMode(); bool bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) || (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) || (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS); @@ -1288,11 +1288,11 @@ void SwTableShell::GetState(SfxItemSet &rSet) break; case SID_ATTR_PARA_SPLIT: - rSet.Put( pFmt->GetKeep() ); + rSet.Put( pFormat->GetKeep() ); break; case SID_ATTR_PARA_KEEP: - rSet.Put( pFmt->GetLayoutSplit() ); + rSet.Put( pFormat->GetLayoutSplit() ); break; case FN_TABLE_SPLIT_TABLE: if ( rSh.IsInHeadline() ) @@ -1309,7 +1309,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_DELETE_ROW: { SwSelBoxes aBoxes; - ::GetTblSel( rSh, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW ); + ::GetTableSel( rSh, aBoxes, nsSwTableSearchType::TBLSEARCH_ROW ); if( ::HasProtectedCells( aBoxes )) rSet.DisableItem( nSlot ); } @@ -1317,7 +1317,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_DELETE_COL: { SwSelBoxes aBoxes; - ::GetTblSel( rSh, aBoxes, nsSwTblSearchType::TBLSEARCH_COL ); + ::GetTableSel( rSh, aBoxes, nsSwTableSearchType::TBLSEARCH_COL ); if( ::HasProtectedCells( aBoxes )) rSet.DisableItem( nSlot ); } @@ -1330,14 +1330,14 @@ void SwTableShell::GetState(SfxItemSet &rSet) break; case RES_ROW_SPLIT: { - const SwFmtLayoutSplit& rTabSplit = pFmt->GetLayoutSplit(); + const SwFormatLayoutSplit& rTabSplit = pFormat->GetLayoutSplit(); if ( !rTabSplit.GetValue() ) { rSet.DisableItem( nSlot ); } else { - SwFmtRowSplit* pSplit = 0; + SwFormatRowSplit* pSplit = 0; rSh.GetRowSplit(pSplit); if(pSplit) rSet.Put(*pSplit); @@ -1445,7 +1445,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq) LanguageType eLang = rSh.GetCurLang(); SvNumberFormatter* pFormatter = rSh.GetNumberFormatter(); sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND; - sal_uInt16 nFmtType = 0, nOffset = 0; + sal_uInt16 nFormatType = 0, nOffset = 0; switch ( nSlot ) { @@ -1466,15 +1466,15 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq) } } break; - case FN_NUMBER_STANDARD: nFmtType = css::util::NumberFormat::NUMBER; break; - case FN_NUMBER_SCIENTIFIC: nFmtType = css::util::NumberFormat::SCIENTIFIC; break; - case FN_NUMBER_DATE: nFmtType = css::util::NumberFormat::DATE; break; - case FN_NUMBER_TIME: nFmtType = css::util::NumberFormat::TIME; break; - case FN_NUMBER_CURRENCY: nFmtType = css::util::NumberFormat::CURRENCY; break; - case FN_NUMBER_PERCENT: nFmtType = css::util::NumberFormat::PERCENT; break; + case FN_NUMBER_STANDARD: nFormatType = css::util::NumberFormat::NUMBER; break; + case FN_NUMBER_SCIENTIFIC: nFormatType = css::util::NumberFormat::SCIENTIFIC; break; + case FN_NUMBER_DATE: nFormatType = css::util::NumberFormat::DATE; break; + case FN_NUMBER_TIME: nFormatType = css::util::NumberFormat::TIME; break; + case FN_NUMBER_CURRENCY: nFormatType = css::util::NumberFormat::CURRENCY; break; + case FN_NUMBER_PERCENT: nFormatType = css::util::NumberFormat::PERCENT; break; case FN_NUMBER_TWODEC: // #.##0,00 - nFmtType = css::util::NumberFormat::NUMBER; + nFormatType = css::util::NumberFormat::NUMBER; nOffset = NF_NUMBER_1000DEC2; break; @@ -1483,14 +1483,14 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq) return; } - if( nFmtType ) - nNumberFormat = pFormatter->GetStandardFormat( nFmtType, eLang ) + nOffset; + if( nFormatType ) + nNumberFormat = pFormatter->GetStandardFormat( nFormatType, eLang ) + nOffset; if( NUMBERFORMAT_ENTRY_NOT_FOUND != nNumberFormat ) { SfxItemSet aBoxSet( GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT ); - aBoxSet.Put( SwTblBoxNumFormat( nNumberFormat )); - rSh.SetTblBoxFormulaAttrs( aBoxSet ); + aBoxSet.Put( SwTableBoxNumFormat( nNumberFormat )); + rSh.SetTableBoxFormulaAttrs( aBoxSet ); } } diff --git a/sw/source/uibase/shells/textdrw.cxx b/sw/source/uibase/shells/textdrw.cxx index 11ade2b2fc91..cef4a08ec2f3 100644 --- a/sw/source/uibase/shells/textdrw.cxx +++ b/sw/source/uibase/shells/textdrw.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star; -void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget, const OUString& rTxt) +void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget, const OUString& rText) { SwWrtShell& rSh = GetShell(); @@ -87,7 +87,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget, uno::Any aTmp; - aTmp <<= OUString(rTxt); + aTmp <<= OUString(rText); xPropSet->setPropertyValue( "Label", aTmp ); SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium(); diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 835191450907..076e5a5f7902 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -127,14 +127,14 @@ void SwTextShell::ExecField(SfxRequest &rReq) { case FN_EDIT_FIELD: { - SwField* pFld = rSh.GetCurFld(); - if( pFld ) + SwField* pField = rSh.GetCurField(); + if( pField ) { - switch ( pFld->GetTypeId() ) + switch ( pField->GetTypeId() ) { case TYP_DDEFLD: { - ::sfx2::SvBaseLink& rLink = static_cast<SwDDEFieldType*>(pFld->GetTyp())-> + ::sfx2::SvBaseLink& rLink = static_cast<SwDDEFieldType*>(pField->GetTyp())-> GetBaseLink(); if(rLink.IsVisible()) { @@ -152,7 +152,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact && "SwAbstractDialogFactory fail!"); - boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSwFldEditDlg( GetView(),RC_DLG_SWFLDEDITDLG )); + boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSwFieldEditDlg( GetView(),RC_DLG_SWFLDEDITDLG )); assert(pDlg && "Dialog creation failed!"); pDlg->Execute(); } @@ -162,11 +162,11 @@ void SwTextShell::ExecField(SfxRequest &rReq) } case FN_EXECUTE_MACROFIELD: { - SwField* pFld = rSh.GetCurFld(); - if(pFld && pFld->GetTyp()->Which() == RES_MACROFLD) + SwField* pField = rSh.GetCurField(); + if(pField && pField->GetTyp()->Which() == RES_MACROFLD) { - const OUString& rMacro = static_cast<SwMacroField*>(pFld)->GetMacro(); + const OUString& rMacro = static_cast<SwMacroField*>(pField)->GetMacro(); sal_Int32 nPos = rMacro.indexOf('.'); if(nPos != -1) { @@ -181,26 +181,26 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_GOTO_PREV_INPUTFLD: { bool bRet = false; - SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD ); - const bool bAddSetExpressionFlds = !( rSh.GetViewOptions()->IsReadonly() ); - if ( pFld != NULL - && rSh.MoveFldType( - pFld, + SwFieldType* pField = rSh.GetFieldType( 0, RES_INPUTFLD ); + const bool bAddSetExpressionFields = !( rSh.GetViewOptions()->IsReadonly() ); + if ( pField != NULL + && rSh.MoveFieldType( + pField, FN_GOTO_NEXT_INPUTFLD == nSlot, USHRT_MAX, - bAddSetExpressionFlds ) ) + bAddSetExpressionFields ) ) { rSh.ClearMark(); - if ( dynamic_cast<SwInputField*>(rSh.GetCurFld( true )) != NULL ) + if ( dynamic_cast<SwInputField*>(rSh.GetCurField( true )) != NULL ) { rSh.SttSelect(); - rSh.SelectTxt( - SwCrsrShell::StartOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) + 1, - SwCrsrShell::EndOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) - 1 ); + rSh.SelectText( + SwCrsrShell::StartOfInputFieldAtPos( *(rSh.GetCrsr()->Start()) ) + 1, + SwCrsrShell::EndOfInputFieldAtPos( *(rSh.GetCrsr()->Start()) ) - 1 ); } else { - rSh.StartInputFldDlg( rSh.GetCurFld( true ), false ); + rSh.StartInputFieldDlg( rSh.GetCurField( true ), false ); } bRet = true; } @@ -214,8 +214,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) } if(bMore) { - // Here come the slots with FldMgr. - SwFldMgr aFldMgr(GetShellPtr()); + // Here come the slots with FieldMgr. + SwFieldMgr aFieldMgr(GetShellPtr()); switch(nSlot) { case FN_INSERT_DBFIELD: @@ -257,8 +257,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) nFormat = static_cast<const SfxUInt32Item *>(pItem)->GetValue(); OSL_FAIL("Command is not yet used"); sal_Unicode cSeparator = ' '; - SwInsertFld_Data aData(nType, 0, aPar1, aPar2, nFormat, GetShellPtr(), cSeparator ); - bRes = aFldMgr.InsertFld(aData); + SwInsertField_Data aData(nType, 0, aPar1, aPar2, nFormat, GetShellPtr(), cSeparator ); + bRes = aFieldMgr.InsertField(aData); } rReq.SetReturnValue(SfxBoolItem( nSlot, bRes )); } @@ -295,8 +295,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) if(!sTmp.isEmpty()) cSeparator = sTmp[0]; } - SwInsertFld_Data aData(nType, nSubType, aPar1, aPar2, nFormat, GetShellPtr(), cSeparator ); - bRes = aFldMgr.InsertFld( aData ); + SwInsertField_Data aData(nType, nSubType, aPar1, aPar2, nFormat, GetShellPtr(), cSeparator ); + bRes = aFieldMgr.InsertField( aData ); } else //#i5788# prevent closing of the field dialog while a modal dialog ( Input field dialog ) is active @@ -319,9 +319,9 @@ void SwTextShell::ExecField(SfxRequest &rReq) if (!pVFrame->HasChildWindow(FN_INSERT_FIELD)) pVFrame->ToggleChildWindow(FN_INSERT_FIELD); // Show dialog - // Switch Flddlg at a new TabPage - sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId(); - SwFldDlgWrapper *pWrp = static_cast<SwFldDlgWrapper*>(pVFrame->GetChildWindow(nId)); + // Switch Fielddlg at a new TabPage + sal_uInt16 nId = SwFieldDlgWrapper::GetChildWindowId(); + SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(pVFrame->GetChildWindow(nId)); if (pWrp) pWrp->ShowReferencePage(); rReq.Ignore(); @@ -372,7 +372,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) break; case FN_POSTIT: { - SwPostItField* pPostIt = dynamic_cast<SwPostItField*>(aFldMgr.GetCurFld()); + SwPostItField* pPostIt = dynamic_cast<SwPostItField*>(aFieldMgr.GetCurField()); bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD); if (bNew || GetView().GetPostItMgr()->IsAnswer()) { @@ -402,28 +402,28 @@ void SwTextShell::ExecField(SfxRequest &rReq) // --> suggestion has to be removed before GetView().GetEditWin().StopQuickHelp(); - SwInsertFld_Data aData(TYP_POSTITFLD, 0, sAuthor, sText, 0); - aFldMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_POSTITFLD, 0, sAuthor, sText, 0); + aFieldMgr.InsertField( aData ); rSh.Push(); rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, false); - pPostIt = static_cast<SwPostItField*>(aFldMgr.GetCurFld()); + pPostIt = static_cast<SwPostItField*>(aFieldMgr.GetCurField()); rSh.Pop(false); // Restore cursor position } if (pPostIt) { - SwFieldType* pType = rSh.GetDoc()->getIDocumentFieldsAccess().GetFldType(RES_POSTITFLD, OUString(), false); - SwIterator<SwFmtFld,SwFieldType> aIter( *pType ); - SwFmtFld* pSwFmtFld = aIter.First(); - while( pSwFmtFld ) + SwFieldType* pType = rSh.GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_POSTITFLD, OUString(), false); + SwIterator<SwFormatField,SwFieldType> aIter( *pType ); + SwFormatField* pSwFormatField = aIter.First(); + while( pSwFormatField ) { - if ( pSwFmtFld->GetField() == pPostIt ) + if ( pSwFormatField->GetField() == pPostIt ) { - pSwFmtFld->Broadcast( SwFmtFldHint( 0, SwFmtFldHintWhich::FOCUS, &GetView() ) ); + pSwFormatField->Broadcast( SwFormatFieldHint( 0, SwFormatFieldHintWhich::FOCUS, &GetView() ) ); break; } - pSwFmtFld = aIter.Next(); + pSwFormatField = aIter.Next(); } } } @@ -539,7 +539,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) bool bIsUrl=false; bool bNew=false; bool bUpdate = false; - SwFldMgr aMgr; + SwFieldMgr aMgr; if ( pItem ) { aText = static_cast<const SfxStringItem*>(pItem)->GetValue(); @@ -550,9 +550,9 @@ void SwTextShell::ExecField(SfxRequest &rReq) if ( pIsUrl ) bIsUrl = pIsUrl->GetValue(); - SwScriptField* pFld = static_cast<SwScriptField*>(aMgr.GetCurFld()); - bNew = !pFld || !(pFld->GetTyp()->Which() == RES_SCRIPTFLD); - bUpdate = pFld && ( bIsUrl != (bool)pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText ); + SwScriptField* pField = static_cast<SwScriptField*>(aMgr.GetCurField()); + bNew = !pField || !(pField->GetTyp()->Which() == RES_SCRIPTFLD); + bUpdate = pField && ( bIsUrl != (bool)pField->GetFormat() || pField->GetPar2() != aType || pField->GetPar1() != aText ); } else { @@ -575,13 +575,13 @@ void SwTextShell::ExecField(SfxRequest &rReq) if( bNew ) { - SwInsertFld_Data aData(TYP_SCRIPTFLD, 0, aType, aText, bIsUrl ? 1 : 0); - aMgr.InsertFld(aData); + SwInsertField_Data aData(TYP_SCRIPTFLD, 0, aType, aText, bIsUrl ? 1 : 0); + aMgr.InsertField(aData); rReq.Done(); } else if( bUpdate ) { - aMgr.UpdateCurFld( bIsUrl ? 1 : 0, aType, aText ); + aMgr.UpdateCurField( bIsUrl ? 1 : 0, aType, aText ); rSh.SetUndoNoResetModified(); rReq.Done(); } @@ -625,10 +625,10 @@ FIELD_INSERT: { //format conversion should only be done for number formatter formats if(!nInsertFormat) - nInsertFormat = aFldMgr.GetDefaultFormat(nInsertType, bIsText, rSh.GetNumberFormatter()); - SwInsertFld_Data aData(nInsertType, nInsertSubType, + nInsertFormat = aFieldMgr.GetDefaultFormat(nInsertType, bIsText, rSh.GetNumberFormatter()); + SwInsertField_Data aData(nInsertType, nInsertSubType, OUString(), OUString(), nInsertFormat); - aFldMgr.InsertFld(aData); + aFieldMgr.InsertField(aData); rReq.Done(); } break; @@ -674,7 +674,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { if( !bGetField ) { - pField = rSh.GetCurFld(); + pField = rSh.GetCurField(); bGetField = true; } @@ -697,7 +697,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { if(!bGetField) { - pField = rSh.GetCurFld(); + pField = rSh.GetCurField(); bGetField = true; } if(!pField || pField->GetTyp()->Which() != RES_MACROFLD) @@ -707,7 +707,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) case FN_INSERT_FIELD: { - if ( rSh.CrsrInsideInputFld() ) + if ( rSh.CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -728,7 +728,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { SfxViewFrame* pVFrame = GetView().GetViewFrame(); if ( !pVFrame->KnowsChildWindow(FN_INSERT_FIELD) - || rSh.CrsrInsideInputFld() ) + || rSh.CrsrInsideInputField() ) { rSet.DisableItem(FN_INSERT_REF_FIELD); } @@ -736,7 +736,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) break; case FN_INSERT_FIELD_CTRL: - if ( rSh.CrsrInsideInputFld() ) + if ( rSh.CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -755,7 +755,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) case FN_JAVAEDIT : { bool bCurField = false; - pField = rSh.GetCurFld(); + pField = rSh.GetCurField(); if(nWhich == FN_POSTIT) bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD; else @@ -765,7 +765,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { rSet.DisableItem(nWhich); } - else if ( rSh.CrsrInsideInputFld() ) + else if ( rSh.CrsrInsideInputField() ) { 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.CrsrInsideInputFld() ) + if ( rSh.CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -799,7 +799,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) const OUString& rTarget = rHlnkItem.GetTargetFrame(); sal_uInt16 nType = (sal_uInt16)rHlnkItem.GetInsertMode(); nType &= ~HLINK_HTMLMODE; - const SvxMacroTableDtor* pMacroTbl = rHlnkItem.GetMacroTbl(); + const SvxMacroTableDtor* pMacroTable = rHlnkItem.GetMacroTable(); SwWrtShell& rSh = GetShell(); @@ -813,29 +813,29 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) { // Select links - rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, false); + rSh.SwCrsrShell::SelectTextAttr(RES_TXTATR_INETFMT, false); } switch (nType) { case HLINK_DEFAULT: case HLINK_FIELD: { - SwFmtINetFmt aINetFmt( rURL, rTarget ); - aINetFmt.SetName(rHlnkItem.GetIntName()); - if(pMacroTbl) + SwFormatINetFormat aINetFormat( rURL, rTarget ); + aINetFormat.SetName(rHlnkItem.GetIntName()); + if(pMacroTable) { - const SvxMacro *pMacro = pMacroTbl->Get( SFX_EVENT_MOUSEOVER_OBJECT ); + const SvxMacro *pMacro = pMacroTable->Get( SFX_EVENT_MOUSEOVER_OBJECT ); if( pMacro ) - aINetFmt.SetMacro(SFX_EVENT_MOUSEOVER_OBJECT, *pMacro); - pMacro = pMacroTbl->Get( SFX_EVENT_MOUSECLICK_OBJECT ); + aINetFormat.SetMacro(SFX_EVENT_MOUSEOVER_OBJECT, *pMacro); + pMacro = pMacroTable->Get( SFX_EVENT_MOUSECLICK_OBJECT ); if( pMacro ) - aINetFmt.SetMacro(SFX_EVENT_MOUSECLICK_OBJECT, *pMacro); - pMacro = pMacroTbl->Get( SFX_EVENT_MOUSEOUT_OBJECT ); + aINetFormat.SetMacro(SFX_EVENT_MOUSECLICK_OBJECT, *pMacro); + pMacro = pMacroTable->Get( SFX_EVENT_MOUSEOUT_OBJECT ); if( pMacro ) - aINetFmt.SetMacro(SFX_EVENT_MOUSEOUT_OBJECT, *pMacro); + aINetFormat.SetMacro(SFX_EVENT_MOUSEOUT_OBJECT, *pMacro); } rSh.SttSelect(); - rSh.InsertURL( aINetFmt, rName, true ); + rSh.InsertURL( aINetFormat, rName, true ); rSh.EndSelect(); } break; diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx index f4647448d94f..f1c99467d276 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(SwFmtFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrmSize(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 = 0; @@ -195,7 +195,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, true)); } - else if ( rSh.CrsrInsideInputFld() ) + else if ( rSh.CrsrInsideInputField() ) { rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG ); rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG ); @@ -231,7 +231,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, 0 != pIdxMrk)); - SwField* pField = rSh.GetCurFld(); + SwField* pField = rSh.GetCurField(); if(bInReadonly) rSet.DisableItem(FN_INSERT_AUTH_ENTRY_DLG); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 57bfb92d3673..2cf10fea72b8 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -167,7 +167,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get(); SvxAutoCorrect* pACorr = rACfg.GetAutoCorrect(); - if( pACorr && rACfg.IsAutoFmtByInput() + if( pACorr && rACfg.IsAutoFormatByInput() && pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | AddNonBrkSpace | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) ) { @@ -199,7 +199,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) case FN_INSERT_BREAK: { - if( !rSh.CrsrInsideInputFld() ) + if( !rSh.CrsrInsideInputField() ) { rSh.SplitNode(); } @@ -432,10 +432,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) uno::Reference< chart2::data::XDataProvider > xDataProvider; bool bFillWithData = true; OUString aRangeString; - if (!GetShell().IsTblComplexForChart()) + if (!GetShell().IsTableComplexForChart()) { - SwFrmFmt* pTblFmt = GetShell().GetTableFmt(); - aRangeString = pTblFmt->GetName(); + SwFrameFormat* pTableFormat = GetShell().GetTableFormat(); + aRangeString = pTableFormat->GetName(); aRangeString += OUString( '.' ); aRangeString += GetShell().GetBoxNms(); @@ -508,7 +508,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SwFlyFrmAttrMgr aMgr( true, GetShellPtr(), FRMMGR_TYPE_TEXT ); if(nCols > 1) { - SwFmtCol aCol; + SwFormatCol aCol; aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() ); aMgr.SetCol( aCol ); } @@ -554,10 +554,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) const sal_uInt16 nCols = static_cast<const SfxUInt16Item *>(pItem)->GetValue(); if( !bSingleCol && 1 < nCols ) { - SwFmtCol aFmtCol; - aFmtCol.Init( nCols , (rReq.IsAPI() ? 0 + SwFormatCol aFormatCol; + aFormatCol.Init( nCols , (rReq.IsAPI() ? 0 : DEF_GUTTER_WIDTH), USHRT_MAX ); - aMgr.SetCol(aFmtCol); + aMgr.SetCol(aFormatCol); } } @@ -585,12 +585,12 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SfxItemSet aSet(GetPool(), aFrmAttrRange ); aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); const SwRect &rPg = GetShell().GetAnyCurRect(RECT_PAGE); - SwFmtFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); + SwFormatFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); aSet.Put(aFrmSize); const SwRect &rPr = GetShell().GetAnyCurRect(RECT_PAGE_PRT); - SwFmtFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); + SwFormatFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA)); aSet.Put(aPrtSize); @@ -703,7 +703,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_SOUND: case SID_INSERT_VIDEO: if ( GetShell().IsSelFrmMode() - || GetShell().CrsrInsideInputFld() + || GetShell().CrsrInsideInputField() || SfxObjectCreateMode::EMBEDDED == eCreateMode || bCrsrInHidden ) { @@ -713,7 +713,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_DIAGRAM: if( !aMOpt.IsChart() - || GetShell().CrsrInsideInputFld() + || GetShell().CrsrInsideInputField() || eCreateMode == SfxObjectCreateMode::EMBEDDED || bCrsrInHidden ) { @@ -725,7 +725,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) if( !aMOpt.IsMath() || eCreateMode == SfxObjectCreateMode::EMBEDDED || bCrsrInHidden - || rSh.CrsrInsideInputFld() ) + || rSh.CrsrInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -740,7 +740,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) rSet.DisableItem( nWhich ); } else if( GetShell().IsSelFrmMode() - || GetShell().CrsrInsideInputFld() ) + || GetShell().CrsrInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -758,7 +758,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case FN_INSERT_FRAME_INTERACT: { if( GetShell().IsSelFrmMode() - || GetShell().CrsrInsideInputFld() + || GetShell().CrsrInsideInputField() || bCrsrInHidden ) rSet.DisableItem(nWhich); } @@ -773,27 +773,27 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) const SfxPoolItem* pItem; if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) { - const SwFmtINetFmt* pINetFmt = static_cast<const SwFmtINetFmt*>(pItem); - aHLinkItem.SetURL(pINetFmt->GetValue()); - aHLinkItem.SetTargetFrame(pINetFmt->GetTargetFrame()); - aHLinkItem.SetIntName(pINetFmt->GetName()); - const SvxMacro *pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSEOVER_OBJECT ); + const SwFormatINetFormat* pINetFormat = static_cast<const SwFormatINetFormat*>(pItem); + aHLinkItem.SetURL(pINetFormat->GetValue()); + aHLinkItem.SetTargetFrame(pINetFormat->GetTargetFrame()); + aHLinkItem.SetIntName(pINetFormat->GetName()); + const SvxMacro *pMacro = pINetFormat->GetMacro( SFX_EVENT_MOUSEOVER_OBJECT ); if( pMacro ) aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSEOVER_OBJECT, *pMacro); - pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSECLICK_OBJECT ); + pMacro = pINetFormat->GetMacro( SFX_EVENT_MOUSECLICK_OBJECT ); if( pMacro ) aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSECLICK_OBJECT, *pMacro); - pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSEOUT_OBJECT ); + pMacro = pINetFormat->GetMacro( SFX_EVENT_MOUSEOUT_OBJECT ); if( pMacro ) aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSEOUT_OBJECT, *pMacro); // Get the text of the Link. rSh.StartAction(); rSh.CreateCrsr(); - rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,true); - OUString sLinkName = rSh.GetSelTxt(); + rSh.SwCrsrShell::SelectTextAttr(RES_TXTATR_INETFMT,true); + OUString sLinkName = rSh.GetSelText(); aHLinkItem.SetName(sLinkName); aHLinkItem.SetInsertMode(HLINK_FIELD); rSh.DestroyCrsr(); @@ -801,7 +801,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) } else { - OUString sReturn = rSh.GetSelTxt(); + OUString sReturn = rSh.GetSelText(); sReturn = sReturn.copy(0, std::min<sal_Int32>(255, sReturn.getLength())); aHLinkItem.SetName(comphelper::string::stripEnd(sReturn, ' ')); } @@ -822,7 +822,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCrsrInHidden ) rSet.DisableItem(nWhich); } - else if ( rSh.CrsrInsideInputFld() ) + else if ( rSh.CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -832,7 +832,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) { //#i80458# column dialog cannot work if the selection contains different page styles and different sections bool bDisable = true; - if( rSh.GetFlyFrmFmt() || rSh.GetSelectedPageDescs() ) + if( rSh.GetFlyFrameFormat() || rSh.GetSelectedPageDescs() ) bDisable = false; if( bDisable ) { @@ -952,7 +952,7 @@ void SwTextShell::ExecRotateTransliteration( SfxRequest & rReq ) } SwTextShell::SwTextShell(SwView &_rView) : - SwBaseShell(_rView), pPostItFldMgr( 0 ) + SwBaseShell(_rView), pPostItFieldMgr( 0 ) { SetName(OUString("Text")); SetHelpId(SW_TEXTSHELL); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 6651087ad0cf..36bb996a55ee 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -146,10 +146,10 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const { rWrtSh.StartAction(); rWrtSh.Push(); - if(!rWrtSh.SelectTxtAttr( RES_TXTATR_INETFMT )) + if(!rWrtSh.SelectTextAttr( RES_TXTATR_INETFMT )) rWrtSh.SelWrd(); } - aCoreSet.Put(SfxStringItem(FN_PARAM_SELECTION, rWrtSh.GetSelTxt())); + aCoreSet.Put(SfxStringItem(FN_PARAM_SELECTION, rWrtSh.GetSelText())); bSelectionPut = true; if(!bSel) { @@ -232,8 +232,8 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const } aTmpSet.ClearItem(FN_PARAM_SELECTION); - SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl(); - if(bSel && rWrtSh.IsSelFullPara() && pColl && pColl->IsAutoUpdateFmt()) + SwTextFormatColl* pColl = rWrtSh.GetCurTextFormatColl(); + if(bSel && rWrtSh.IsSelFullPara() && pColl && pColl->IsAutoUpdateFormat()) { rWrtSh.AutoUpdatePara(pColl, aTmpSet); } @@ -249,7 +249,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const aReq1.Done(); rWrtSh.SwapPam(); rWrtSh.ClearMark(); - rWrtSh.DontExpandFmt(); + rWrtSh.DontExpandFormat(); rWrtSh.EndAction(); } } @@ -290,17 +290,17 @@ void SwTextShell::Execute(SfxRequest &rReq) case SID_LANGUAGE_STATUS: { // get the language - OUString aNewLangTxt; + OUString aNewLangText; SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_LANGUAGE_STATUS , false ); if (pItem2) - aNewLangTxt = pItem2->GetValue(); + aNewLangText = pItem2->GetValue(); //!! Remember the view frame right now... //!! (call to GetView().GetViewFrame() will break if the //!! SwTextShell got destroyed meanwhile.) SfxViewFrame *pViewFrame = GetView().GetViewFrame(); - if (aNewLangTxt == "*") + if (aNewLangText == "*") { // open the dialog "Tools/Options/Language Settings - Language" // to set the documents default language @@ -321,7 +321,7 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.LockView( true ); // setting the new language... - if (!aNewLangTxt.isEmpty()) + if (!aNewLangText.isEmpty()) { const OUString aSelectionLangPrefix("Current_"); const OUString aParagraphLangPrefix("Paragraph_"); @@ -338,23 +338,23 @@ void SwTextShell::Execute(SfxRequest &rReq) sal_Int32 nPos = 0; bool bForSelection = true; bool bForParagraph = false; - if (-1 != (nPos = aNewLangTxt.indexOf( aSelectionLangPrefix, 0 ))) + if (-1 != (nPos = aNewLangText.indexOf( aSelectionLangPrefix, 0 ))) { // ... for the current selection - aNewLangTxt = aNewLangTxt.replaceAt(nPos, aSelectionLangPrefix.getLength(), ""); + aNewLangText = aNewLangText.replaceAt(nPos, aSelectionLangPrefix.getLength(), ""); bForSelection = true; } - else if (-1 != (nPos = aNewLangTxt.indexOf(aParagraphLangPrefix, 0))) + else if (-1 != (nPos = aNewLangText.indexOf(aParagraphLangPrefix, 0))) { // ... for the current paragraph language - aNewLangTxt = aNewLangTxt.replaceAt(nPos, aParagraphLangPrefix.getLength(), ""); + aNewLangText = aNewLangText.replaceAt(nPos, aParagraphLangPrefix.getLength(), ""); bForSelection = true; bForParagraph = true; } - else if (-1 != (nPos = aNewLangTxt.indexOf(aDocumentLangPrefix, 0))) + else if (-1 != (nPos = aNewLangText.indexOf(aDocumentLangPrefix, 0))) { // ... as default document language - aNewLangTxt = aNewLangTxt.replaceAt(nPos, aDocumentLangPrefix.getLength(), ""); + aNewLangText = aNewLangText.replaceAt(nPos, aDocumentLangPrefix.getLength(), ""); bForSelection = false; } @@ -374,12 +374,12 @@ void SwTextShell::Execute(SfxRequest &rReq) } rWrtSh.StartUndo( ( !bForParagraph && !bForSelection ) ? UNDO_SETDEFTATTR : UNDO_EMPTY ); - if (aNewLangTxt == aStrNone) + if (aNewLangText == aStrNone) SwLangHelper::SetLanguage_None( rWrtSh, bForSelection, aCoreSet ); - else if (aNewLangTxt == aStrResetLangs) + else if (aNewLangText == aStrResetLangs) SwLangHelper::ResetLanguages( rWrtSh, bForSelection ); else - SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet ); + SwLangHelper::SetLanguage( rWrtSh, aNewLangText, bForSelection, aCoreSet ); rWrtSh.EndUndo(); if (bForParagraph || !bForSelection) @@ -443,7 +443,7 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND ); rWrtSh.ResetSelect(0, false); rWrtSh.EndSelect(); - rWrtSh.GotoFtnTxt(); + rWrtSh.GotoFootnoteText(); } rWrtSh.EndUndo( UNDO_UI_INSERT_FOOTNOTE ); rReq.Done(); @@ -609,9 +609,9 @@ void SwTextShell::Execute(SfxRequest &rReq) } case FN_AUTOFORMAT_REDLINE_APPLY: { - SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags()); + SvxSwAutoFormatFlags aFlags(SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags()); // This must always be false for the postprocessing. - aFlags.bAFmtByInput = false; + aFlags.bAFormatByInput = false; aFlags.bWithRedlining = true; rWrtSh.AutoFormat( &aFlags ); aFlags.bWithRedlining = false; @@ -652,9 +652,9 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_AUTOFORMAT_APPLY: { - SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags()); + SvxSwAutoFormatFlags aFlags(SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags()); // This must always be false for the postprocessing. - aFlags.bAFmtByInput = false; + aFlags.bAFormatByInput = false; rWrtSh.AutoFormat( &aFlags ); rReq.Done(); } @@ -662,10 +662,10 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_AUTOFORMAT_AUTO: { SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get(); - bool bSet = pItem ? static_cast<const SfxBoolItem*>(pItem)->GetValue() : !rACfg.IsAutoFmtByInput(); - if( bSet != rACfg.IsAutoFmtByInput() ) + bool bSet = pItem ? static_cast<const SfxBoolItem*>(pItem)->GetValue() : !rACfg.IsAutoFormatByInput(); + if( bSet != rACfg.IsAutoFormatByInput() ) { - rACfg.SetAutoFmtByInput( bSet ); + rACfg.SetAutoFormatByInput( bSet ); GetView().GetViewFrame()->GetBindings().Invalidate( nSlot ); if ( !pItem ) rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), bSet ) ); @@ -712,13 +712,13 @@ void SwTextShell::Execute(SfxRequest &rReq) break; case FN_GOTO_REFERENCE: { - SwField *pFld = rWrtSh.GetCurFld(); - if(pFld && pFld->GetTypeId() == TYP_GETREFFLD) + SwField *pField = rWrtSh.GetCurField(); + if(pField && pField->GetTypeId() == TYP_GETREFFLD) { rWrtSh.StartAllAction(); - rWrtSh.SwCrsrShell::GotoRefMark( static_cast<SwGetRefField*>(pFld)->GetSetRefName(), - static_cast<SwGetRefField*>(pFld)->GetSubType(), - static_cast<SwGetRefField*>(pFld)->GetSeqNo() ); + rWrtSh.SwCrsrShell::GotoRefMark( static_cast<SwGetRefField*>(pField)->GetSetRefName(), + static_cast<SwGetRefField*>(pField)->GetSubType(), + static_cast<SwGetRefField*>(pField)->GetSeqNo() ); rWrtSh.EndAllAction(); rReq.Done(); } @@ -738,7 +738,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } OUString sFormula(static_cast<const SfxStringItem*>(pItem)->GetValue()); - SwFldMgr aFldMgr; + SwFieldMgr aFieldMgr; rWrtSh.StartAllAction(); bool bDelSel; if( (bDelSel = rWrtSh.HasSelection()) ) @@ -751,23 +751,23 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.EnterStdMode(); } - if( !bDelSel && aFldMgr.GetCurFld() && TYP_FORMELFLD == aFldMgr.GetCurTypeId() ) - aFldMgr.UpdateCurFld( aFldMgr.GetCurFld()->GetFormat(), OUString(), sFormula ); + if( !bDelSel && aFieldMgr.GetCurField() && TYP_FORMELFLD == aFieldMgr.GetCurTypeId() ) + aFieldMgr.UpdateCurField( aFieldMgr.GetCurField()->GetFormat(), OUString(), sFormula ); else if( !sFormula.isEmpty() ) { - if( rWrtSh.IsCrsrInTbl() ) + if( rWrtSh.IsCrsrInTable() ) { SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); - aSet.Put( SwTblBoxFormula( sFormula )); - rWrtSh.SetTblBoxFormulaAttrs( aSet ); + aSet.Put( SwTableBoxFormula( sFormula )); + rWrtSh.SetTableBoxFormulaAttrs( aSet ); rWrtSh.UpdateTable(); } else { SvNumberFormatter* pFormatter = rWrtSh.GetNumberFormatter(); - sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM); - SwInsertFld_Data aData(TYP_FORMELFLD, nsSwGetSetExpType::GSE_FORMULA, OUString(), sFormula, nSysNumFmt); - aFldMgr.InsertFld(aData); + sal_uLong nSysNumFormat = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM); + SwInsertField_Data aData(TYP_FORMELFLD, nsSwGetSetExpType::GSE_FORMULA, OUString(), sFormula, nSysNumFormat); + aFieldMgr.InsertField(aData); } } @@ -778,7 +778,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } else { - rWrtSh.EndAllTblBoxEdit(); + rWrtSh.EndAllTableBoxEdit(); pVFrame->ToggleChildWindow( nId ); if( !pVFrame->HasChildWindow( nId ) ) pVFrame->GetBindings().InvalidateAll( true ); @@ -789,7 +789,7 @@ void SwTextShell::Execute(SfxRequest &rReq) break; case FN_TABLE_UNSET_READ_ONLY: { - rWrtSh.UnProtectTbls(); + rWrtSh.UnProtectTables(); } break; case FN_EDIT_HYPERLINK: @@ -802,7 +802,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { rWrtSh.StartAction(); rWrtSh.Push(); - if(!rWrtSh.SelectTxtAttr( RES_TXTATR_INETFMT )) + if(!rWrtSh.SelectTextAttr( RES_TXTATR_INETFMT )) rWrtSh.SelWrd(); } //now remove the attribute @@ -939,7 +939,7 @@ void SwTextShell::Execute(SfxRequest &rReq) // Left border as offset //#i24363# tab stops relative to indent const long nOff = rWrtSh.getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT) ? - static_cast<const SvxLRSpaceItem&>(aCoreSet.Get( RES_LR_SPACE )).GetTxtLeft() : 0; + static_cast<const SvxLRSpaceItem&>(aCoreSet.Get( RES_LR_SPACE )).GetTextLeft() : 0; SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff ); aCoreSet.Put( aOff ); @@ -1009,8 +1009,8 @@ void SwTextShell::Execute(SfxRequest &rReq) if( SfxItemState::SET == pSet->GetItemState( RES_PARATR_DROP, false, &pItem )) { OUString sCharStyleName; - if(static_cast<const SwFmtDrop*>(pItem)->GetCharFmt()) - sCharStyleName = static_cast<const SwFmtDrop*>(pItem)->GetCharFmt()->GetName(); + if(static_cast<const SwFormatDrop*>(pItem)->GetCharFormat()) + sCharStyleName = static_cast<const SwFormatDrop*>(pItem)->GetCharFormat()->GetName(); pSet->Put(SfxStringItem(FN_DROP_CHAR_STYLE_NAME, sCharStyleName)); } } @@ -1035,12 +1035,12 @@ void SwTextShell::Execute(SfxRequest &rReq) if ( SfxItemState::SET == pSet->GetItemState(FN_DROP_TEXT, false, &pItem) ) { if ( !static_cast<const SfxStringItem*>(pItem)->GetValue().isEmpty() ) - rWrtSh.ReplaceDropTxt(static_cast<const SfxStringItem*>(pItem)->GetValue(), pPaM); + rWrtSh.ReplaceDropText(static_cast<const SfxStringItem*>(pItem)->GetValue(), pPaM); } rWrtSh.SetAttrSet( *pSet, SetAttrMode::DEFAULT, pPaM ); rWrtSh.EndAction(); - SwTxtFmtColl* pColl = rWrtSh.GetPaMTxtFmtColl( pPaM ); - if(pColl && pColl->IsAutoUpdateFmt()) + SwTextFormatColl* pColl = rWrtSh.GetPaMTextFormatColl( pPaM ); + if(pColl && pColl->IsAutoUpdateFormat()) { rWrtSh.AutoUpdatePara(pColl, *pSet, pPaM); } @@ -1336,16 +1336,16 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.GetCurAttr(aSet); if(SfxItemState::SET <= aSet.GetItemState( RES_TXTATR_INETFMT, true )) { - const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, true) ); + const SwFormatINetFormat& rINetFormat = dynamic_cast<const SwFormatINetFormat&>( aSet.Get(RES_TXTATR_INETFMT, true) ); if( nSlot == FN_COPY_HYPERLINK_LOCATION ) { ::uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetView().GetEditWin().GetClipboard(); vcl::unohelper::TextDataObject::CopyStringTo( - rINetFmt.GetValue(), + rINetFormat.GetValue(), xClipboard ); } else - rWrtSh.ClickToINetAttr(rINetFmt, URLLOAD_NOFILTER); + rWrtSh.ClickToINetAttr(rINetFormat, URLLOAD_NOFILTER); } } break; @@ -1437,7 +1437,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) const sal_Int16 nWordType = ::i18n::WordType::DICTIONARY_WORD; bool bWord = rSh.IsInWord( nWordType ) || rSh.IsStartWord( nWordType ) || rSh.IsEndWord( nWordType ); if (bValid && bWord) - aText = rSh.HasSelection()? OUString(rSh.GetSelTxt()) : rSh.GetCurWord(); + aText = rSh.HasSelection()? OUString(rSh.GetSelText()) : rSh.GetCurWord(); LanguageType nLang = rSh.GetCurLang(); LanguageTag aLanguageTag( nLang); @@ -1476,7 +1476,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSet.DisableItem(nWhich); } else if ( nWhich == FN_EDIT_FORMULA - && rSh.CrsrInsideInputFld() ) + && rSh.CrsrInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1492,7 +1492,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) if ( rSh.GetFrmType(0,true) & nNoType ) rSet.DisableItem(nWhich); - if ( rSh.CrsrInsideInputFld() ) + if ( rSh.CrsrInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1503,15 +1503,15 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case SID_INSERTDOC: case FN_INSERT_GLOSSARY: case FN_EXPAND_GLOSSARY: - if ( rSh.CrsrInsideInputFld() ) + if ( rSh.CrsrInsideInputField() ) { rSet.DisableItem( nWhich ); } break; case FN_INSERT_TABLE: - if ( rSh.CrsrInsideInputFld() - || rSh.GetTableFmt() + if ( rSh.CrsrInsideInputField() + || rSh.GetTableFormat() || (rSh.GetFrmType(0,true) & FrmTypeFlags::FOOTNOTE) ) { rSet.DisableItem( nWhich ); @@ -1524,14 +1524,14 @@ void SwTextShell::GetState( SfxItemSet &rSet ) break; case FN_GOTO_REFERENCE: { - SwField *pFld = rSh.GetCurFld(); - if ( !pFld || (pFld && pFld->GetTypeId() != TYP_GETREFFLD) ) + SwField *pField = rSh.GetCurField(); + if ( !pField || (pField && pField->GetTypeId() != TYP_GETREFFLD) ) rSet.DisableItem(nWhich); } break; case FN_AUTOFORMAT_AUTO: { - rSet.Put( SfxBoolItem( nWhich, SvxAutoCorrCfg::Get().IsAutoFmtByInput() )); + rSet.Put( SfxBoolItem( nWhich, SvxAutoCorrCfg::Get().IsAutoFormatByInput() )); } break; @@ -1611,7 +1611,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_BOOKMARK: if( rSh.IsTableMode() - || rSh.CrsrInsideInputFld() ) + || rSh.CrsrInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1619,7 +1619,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_BREAK: if ( rSh.HasReadonlySel() - && !rSh.CrsrInsideInputFld() ) + && !rSh.CrsrInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1628,7 +1628,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_BREAK_DLG: case FN_INSERT_COLUMN_BREAK: case FN_INSERT_PAGEBREAK: - if( rSh.CrsrInsideInputFld() ) + if( rSh.CrsrInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1643,7 +1643,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_TABLE_SORT_DIALOG: case FN_SORTING_DLG: if(!rSh.HasSelection() || - (FN_TABLE_SORT_DIALOG == nWhich && !rSh.GetTableFmt())) + (FN_TABLE_SORT_DIALOG == nWhich && !rSh.GetTableFormat())) rSet.DisableItem( nWhich ); break; @@ -1651,7 +1651,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) { SvtCJKOptions aCJKOptions; if( !aCJKOptions.IsRubyEnabled() - || rSh.CrsrInsideInputFld() ) + || rSh.CrsrInsideInputField() ) { GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, false ); rSet.DisableItem(nWhich); @@ -1665,7 +1665,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) if( GetView().GetDocShell()->IsReadOnly() || ( !GetView().GetViewFrame()->HasChildWindow(nWhich) && rSh.HasReadonlySel() ) - || rSh.CrsrInsideInputFld() ) + || rSh.CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx index a36f8f39ebe3..0622645c4215 100644 --- a/sw/source/uibase/shells/textsh2.cxx +++ b/sw/source/uibase/shells/textsh2.cxx @@ -205,13 +205,13 @@ void SwTextShell::ExecDB(SfxRequest &rReq) sDBName += OUString(DB_DELIM); sDBName += sColumnName; - SwFldMgr aFldMgr(GetShellPtr()); - SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, OUString(), 0); + SwFieldMgr aFieldMgr(GetShellPtr()); + SwInsertField_Data aData(TYP_DBFLD, 0, sDBName, OUString(), 0); if(pConnectionItem) aData.m_aDBConnection = static_cast<const SfxUsrAnyItem*>(pConnectionItem)->GetValue(); if(pColumnItem) aData.m_aDBColumn = static_cast<const SfxUsrAnyItem*>(pColumnItem)->GetValue(); - aFldMgr.InsertFld(aData); + aFieldMgr.InsertField(aData); SfxViewFrame* pViewFrame = GetView().GetViewFrame(); uno::Reference< XDispatchRecorder > xRecorder = pViewFrame->GetBindings().GetRecorder(); diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index cd61fd1b1ec9..5e5162aa6bcc 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -159,7 +159,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) break; case FN_REMOVE_DIRECT_CHAR_FORMATS: if( !rSh.HasReadonlySel() && rSh.IsEndPara()) - rSh.DontExpandFmt(); + rSh.DontExpandFormat(); break; default: OSL_FAIL("wrong dispatcher"); @@ -173,13 +173,13 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) const SfxItemSet* pArgs = rReq.GetArgs(); bool bArgs = pArgs != 0 && pArgs->Count() > 0; SwWrtShell& rWrtSh = GetShell(); - SwTxtFmtColl* pColl = 0; + SwTextFormatColl* pColl = 0; - // Is only set if the whole paragraph is selected and AutoUpdateFmt is set. + // Is only set if the whole paragraph is selected and AutoUpdateFormat is set. if (rWrtSh.HasSelection() && rWrtSh.IsSelFullPara()) { - pColl = rWrtSh.GetCurTxtFmtColl(); - if ( pColl && !pColl->IsAutoUpdateFmt() ) + pColl = rWrtSh.GetCurTextFormatColl(); + if ( pColl && !pColl->IsAutoUpdateFormat() ) pColl = 0; } SfxItemPool& rPool = GetPool(); @@ -187,31 +187,31 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) switch (nSlot) { case FN_TXTATR_INET: - // Special treatment of the PoolId of the SwFmtInetFmt + // Special treatment of the PoolId of the SwFormatInetFormat if(bArgs) { const SfxPoolItem& rItem = pArgs->Get( nWhich ); - SwFmtINetFmt aINetFmt( static_cast<const SwFmtINetFmt&>(rItem) ); - if ( USHRT_MAX == aINetFmt.GetVisitedFmtId() ) + SwFormatINetFormat aINetFormat( static_cast<const SwFormatINetFormat&>(rItem) ); + if ( USHRT_MAX == aINetFormat.GetVisitedFormatId() ) { OSL_ENSURE( false, "<SwTextShell::ExecCharAttrArgs(..)> - unexpected visited character format ID at hyperlink attribute" ); - aINetFmt.SetVisitedFmtAndId( - aINetFmt.GetVisitedFmt(), - SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetVisitedFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) ); + aINetFormat.SetVisitedFormatAndId( + aINetFormat.GetVisitedFormat(), + SwStyleNameMapper::GetPoolIdFromUIName( aINetFormat.GetVisitedFormat(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) ); } - if ( USHRT_MAX == aINetFmt.GetINetFmtId() ) + if ( USHRT_MAX == aINetFormat.GetINetFormatId() ) { OSL_ENSURE( false, "<SwTextShell::ExecCharAttrArgs(..)> - unexpected unvisited character format ID at hyperlink attribute" ); - aINetFmt.SetINetFmtAndId( - aINetFmt.GetINetFmt(), - SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetINetFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) ); + aINetFormat.SetINetFormatAndId( + aINetFormat.GetINetFormat(), + SwStyleNameMapper::GetPoolIdFromUIName( aINetFormat.GetINetFormat(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) ); } if ( pColl ) - pColl->SetFmtAttr( aINetFmt ); + pColl->SetFormatAttr( aINetFormat ); else - rWrtSh.SetAttrItem( aINetFmt ); + rWrtSh.SetAttrItem( aINetFormat ); rReq.Done(); } break; @@ -260,7 +260,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) aSetItem.PutItemForScriptType( nScriptTypes, aSize ); aAttrSet.Put( aSetItem.GetItemSet() ); if( pColl ) - pColl->SetFmtAttr( aAttrSet ); + pColl->SetFormatAttr( aAttrSet ); else rWrtSh.SetAttrSet( aAttrSet, SetAttrMode::DEFAULT, pPaM.get() ); } @@ -382,14 +382,14 @@ SET_LINESPACE: for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++) { - SvxNumberFormat aFmt(aRule.GetLevel(i)); - if(SVX_ADJUST_LEFT == aFmt.GetNumAdjust()) - aFmt.SetNumAdjust( SVX_ADJUST_RIGHT ); + SvxNumberFormat aFormat(aRule.GetLevel(i)); + if(SVX_ADJUST_LEFT == aFormat.GetNumAdjust()) + aFormat.SetNumAdjust( SVX_ADJUST_RIGHT ); - else if(SVX_ADJUST_RIGHT == aFmt.GetNumAdjust()) - aFmt.SetNumAdjust( SVX_ADJUST_LEFT ); + else if(SVX_ADJUST_RIGHT == aFormat.GetNumAdjust()) + aFormat.SetNumAdjust( SVX_ADJUST_LEFT ); - aRule.SetLevel(i, aFmt, aRule.Get(i) != 0); + aRule.SetLevel(i, aFormat, aRule.Get(i) != 0); } SwNumRule aSetRule( pCurRule->GetName(), pCurRule->Get( 0 ).GetPositionAndSpaceMode() ); @@ -407,8 +407,8 @@ SET_LINESPACE: return; } SwWrtShell& rWrtSh = GetShell(); - SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl(); - if(pColl && pColl->IsAutoUpdateFmt()) + SwTextFormatColl* pColl = rWrtSh.GetCurTextFormatColl(); + if(pColl && pColl->IsAutoUpdateFormat()) { rWrtSh.AutoUpdatePara(pColl, aSet); } @@ -434,11 +434,11 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) OUString sCharStyleName = static_cast<const SfxStringItem*>(pItem)->GetValue(); SfxItemSet aSet(GetPool(), RES_PARATR_DROP, RES_PARATR_DROP, 0L); rSh.GetCurAttr(aSet); - SwFmtDrop aDropItem(static_cast<const SwFmtDrop&>(aSet.Get(RES_PARATR_DROP))); - SwCharFmt* pFmt = 0; + SwFormatDrop aDropItem(static_cast<const SwFormatDrop&>(aSet.Get(RES_PARATR_DROP))); + SwCharFormat* pFormat = 0; if(!sCharStyleName.isEmpty()) - pFmt = rSh.FindCharFmtByName( sCharStyleName ); - aDropItem.SetCharFmt( pFmt ); + pFormat = rSh.FindCharFormatByName( sCharStyleName ); + aDropItem.SetCharFormat( pFormat ); aSet.Put(aDropItem); rSh.SetAttrSet(aSet); } @@ -468,7 +468,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) if ( SfxItemState::SET == aSet.GetItemState(HINT_END,false,&pItem) ) { if ( !static_cast<const SfxStringItem*>(pItem)->GetValue().isEmpty() ) - rSh.ReplaceDropTxt(static_cast<const SfxStringItem*>(pItem)->GetValue()); + rSh.ReplaceDropText(static_cast<const SfxStringItem*>(pItem)->GetValue()); } rSh.SetAttrSet(*pDlg->GetOutputItemSet()); rSh.StartUndo( UNDO_END ); @@ -510,7 +510,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) { SwWrtShell &rSh = GetShell(); SfxItemPool& rPool = GetPool(); - SfxItemSet aCoreSet(rPool, aTxtFmtCollSetRange); + SfxItemSet aCoreSet(rPool, aTextFormatCollSetRange); // Request *all* text attributes from the core. // fdo#78737: this is called from SvxRuler, which requires the list indents! rSh.GetCurAttr(aCoreSet, /* bMergeIndentValuesOfNumRule = */ true); diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx index 0ea4d346762b..61a45da1d28f 100644 --- a/sw/source/uibase/shells/txtcrsr.cxx +++ b/sw/source/uibase/shells/txtcrsr.cxx @@ -355,11 +355,11 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) break; case FN_NEXT_FOOTNOTE: rSh.MoveCrsr(); - bRet = rSh.GotoNextFtnAnchor(); + bRet = rSh.GotoNextFootnoteAnchor(); break; case FN_PREV_FOOTNOTE: rSh.MoveCrsr(); - bRet = rSh.GotoPrevFtnAnchor(); + bRet = rSh.GotoPrevFootnoteAnchor(); break; case FN_TO_HEADER: rSh.MoveCrsr(); @@ -367,7 +367,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) rSh.SttPg(); else { - bool bMoved = rSh.GotoHeaderTxt(); + bool bMoved = rSh.GotoHeaderText(); if ( !bMoved ) rSh.SttPg(); } @@ -379,7 +379,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) rSh.EndPg(); else { - bool bMoved = rSh.GotoFooterTxt(); + bool bMoved = rSh.GotoFooterText(); if ( !bMoved ) rSh.EndPg(); } @@ -388,13 +388,13 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) case FN_FOOTNOTE_TO_ANCHOR: rSh.MoveCrsr(); if ( FrmTypeFlags::FOOTNOTE & rSh.GetFrmType(0,false) ) - rSh.GotoFtnAnchor(); + rSh.GotoFootnoteAnchor(); else - rSh.GotoFtnTxt(); + rSh.GotoFootnoteText(); bSetRetVal = false; break; case FN_TO_FOOTNOTE_AREA : - rSh.GotoFtnTxt(); + rSh.GotoFootnoteText(); break; case FN_PREV_TABLE: bRet = rSh.MoveTable( fnTablePrev, fnTableStart); @@ -415,16 +415,16 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) bRet = rSh.GotoNxtPrvTOXMark( false ); break; case FN_NEXT_TBLFML: - bRet = rSh.GotoNxtPrvTblFormula( true, false ); + bRet = rSh.GotoNxtPrvTableFormula( true, false ); break; case FN_PREV_TBLFML: - bRet = rSh.GotoNxtPrvTblFormula( false, false ); + bRet = rSh.GotoNxtPrvTableFormula( false, false ); break; case FN_NEXT_TBLFML_ERR: - bRet = rSh.GotoNxtPrvTblFormula( true, true ); + bRet = rSh.GotoNxtPrvTableFormula( true, true ); break; case FN_PREV_TBLFML_ERR: - bRet = rSh.GotoNxtPrvTblFormula( false, true ); + bRet = rSh.GotoNxtPrvTableFormula( false, true ); break; default: OSL_FAIL("wrong dispatcher"); diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx index 9886a8a048df..30bf893c550f 100644 --- a/sw/source/uibase/shells/txtnum.cxx +++ b/sw/source/uibase/shells/txtnum.cxx @@ -123,13 +123,13 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) //convert type of linked bitmaps from SVX_NUM_BITMAP to (SVX_NUM_BITMAP|LINK_TOKEN) for ( sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++ ) { - SvxNumberFormat aFmt( aRule.GetLevel( i ) ); - if ( SVX_NUM_BITMAP == aFmt.GetNumberingType() ) + SvxNumberFormat aFormat( aRule.GetLevel( i ) ); + if ( SVX_NUM_BITMAP == aFormat.GetNumberingType() ) { - const SvxBrushItem* pBrush = aFmt.GetBrush(); + const SvxBrushItem* pBrush = aFormat.GetBrush(); if(pBrush && !pBrush->GetGraphicLink().isEmpty()) - aFmt.SetNumberingType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN)); - aRule.SetLevel(i, aFmt, aRule.Get(i) != 0); + aFormat.SetNumberingType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN)); + aRule.SetLevel(i, aFormat, aRule.Get(i) != 0); } } if(bHtml) @@ -157,19 +157,19 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) { for ( sal_uInt8 n = 0; n < MAXLEVEL; ++n ) { - SvxNumberFormat aFmt( aSvxRule.GetLevel( n ) ); + SvxNumberFormat aFormat( aSvxRule.GetLevel( n ) ); if ( n && bHtml ) { // 1/2" for HTML - aFmt.SetAbsLSpace(n * 720); + aFormat.SetAbsLSpace(n * 720); } // #i38904# Default alignment for // numbering/bullet should be rtl in rtl paragraph: if ( bRightToLeft ) { - aFmt.SetNumAdjust( SVX_ADJUST_RIGHT ); + aFormat.SetNumAdjust( SVX_ADJUST_RIGHT ); } - aSvxRule.SetLevel( n, aFmt, false ); + aSvxRule.SetLevel( n, aFormat, false ); } aSvxRule.SetFeatureFlag(SvxNumRuleFlags::ENABLE_EMBEDDED_BMP, false); } diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx index c180c383446f..a0c491fe0a84 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx @@ -110,7 +110,7 @@ IMPL_LINK_NOARG(StylePresetsPanel, DoubleClickHdl) if (pDocSh) { SwgReaderOption aOption; - aOption.SetTxtFmts(true); + aOption.SetTextFormats(true); aOption.SetNumRules(true); pDocSh->LoadStylesFromFile(pEntry->maURL, aOption, false); } diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index a246a24ad57a..9bedd354bf49 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -224,7 +224,7 @@ StyleSet setupThemes() return aSet; } -void changeFont(SwFmt* pFormat, SwDocStyleSheet* pStyle, FontSet& rFontSet) +void changeFont(SwFormat* pFormat, SwDocStyleSheet* pStyle, FontSet& rFontSet) { bool bChanged = false; @@ -258,11 +258,11 @@ void changeFont(SwFmt* pFormat, SwDocStyleSheet* pStyle, FontSet& rFontSet) if (bChanged) { - pFormat->SetFmtAttr(aFontItem); + pFormat->SetFormatAttr(aFontItem); } } -/*void changeBorder(SwTxtFmtColl* pCollection, SwDocStyleSheet* pStyle, StyleSet& rStyleSet) +/*void changeBorder(SwTextFormatColl* pCollection, SwDocStyleSheet* pStyle, StyleSet& rStyleSet) { if (pStyle->GetName() == "Heading") { @@ -272,17 +272,17 @@ void changeFont(SwFmt* pFormat, SwDocStyleSheet* pStyle, FontSet& rFontSet) aBorderLine.SetColor(rColorSet.mBaseColors[0]); aBoxItem.SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM); - pCollection->SetFmtAttr(aBoxItem); + pCollection->SetFormatAttr(aBoxItem); } }*/ -void changeColor(SwTxtFmtColl* pCollection, ColorSet& rColorSet, StyleRedefinition* pRedefinition) +void changeColor(SwTextFormatColl* pCollection, ColorSet& rColorSet, StyleRedefinition* pRedefinition) { Color aColor = pRedefinition->getColor(rColorSet); SvxColorItem aColorItem(pCollection->GetColor()); aColorItem.SetValue(aColor); - pCollection->SetFmtAttr(aColorItem); + pCollection->SetFormatAttr(aColorItem); } std::vector<FontSet> initFontSets() @@ -435,7 +435,7 @@ void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, cons while (pStyle) { - SwTxtFmtColl* pCollection = pStyle->GetCollection(); + SwTextFormatColl* pCollection = pStyle->GetCollection(); changeFont(pCollection, pStyle, aFontSet); @@ -454,9 +454,9 @@ void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, cons while (pStyle) { - SwCharFmt* pCharFormat = pStyle->GetCharFmt(); + SwCharFormat* pCharFormat = pStyle->GetCharFormat(); - changeFont(static_cast<SwFmt*>(pCharFormat), pStyle, aFontSet); + changeFont(static_cast<SwFormat*>(pCharFormat), pStyle, aFontSet); pStyle = static_cast<SwDocStyleSheet*>(pPool->Next()); } diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index 68d521d789cd..3b7a3e2fb389 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.IsCrsrInTbl()) + if( rWrtShell.IsCrsrInTable()) { if (!rWrtShell.IsTableMode()) { @@ -152,18 +152,18 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings ) rWrtShell.GetView().GetViewFrame()->GetDispatcher()-> Execute(FN_TABLE_SELECT_ALL, SfxCallMode::SYNCHRON); } - if( ! rWrtShell.IsTblComplexForChart()) + if( ! rWrtShell.IsTableComplexForChart()) { - SwFrmFmt* pTblFmt = rWrtShell.GetTableFmt(); - aRangeString = pTblFmt->GetName() + "." + rWrtShell.GetBoxNms(); + SwFrameFormat* pTableFormat = rWrtShell.GetTableFormat(); + aRangeString = pTableFormat->GetName() + "." + rWrtShell.GetBoxNms(); // get table data provider xDataProvider.set( pView->GetDocShell()->getIDocumentChartDataProviderAccess()->GetChartDataProvider( true ) ); } } - SwFlyFrmFmt *pFlyFrmFmt = 0; - xChartModel.set( SwTableFUNC( &rWrtShell, false ).InsertChart( xDataProvider, xDataProvider.is(), aRangeString, &pFlyFrmFmt )); + SwFlyFrameFormat *pFlyFrameFormat = 0; + xChartModel.set( SwTableFUNC( &rWrtShell, false ).InsertChart( xDataProvider, xDataProvider.is(), aRangeString, &pFlyFrameFormat )); //open wizard //@todo get context from writer if that has one @@ -211,8 +211,8 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings ) { //calculate and set new position SwRect aSwRect; - if (pFlyFrmFmt) - aSwRect = pFlyFrmFmt->GetAnchoredObj()->GetObjRectWithSpaces(); + if (pFlyFrameFormat) + aSwRect = pFlyFrameFormat->GetAnchoredObj()->GetObjRectWithSpaces(); Rectangle aRect( aSwRect.SVRect() ); Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect ); xDialogProps->setPropertyValue("Position", diff --git a/sw/source/uibase/table/swtablerep.cxx b/sw/source/uibase/table/swtablerep.cxx index 49fe7168c219..07cbad16a25c 100644 --- a/sw/source/uibase/table/swtablerep.cxx +++ b/sw/source/uibase/table/swtablerep.cxx @@ -55,7 +55,7 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol ) : - nTblWidth(0), + nTableWidth(0), nSpace(0), nLeftSpace(0), nRightSpace(0), @@ -152,7 +152,7 @@ bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const rTabCols[i] = nPos + nLeft; rTabCols.SetHidden( i, bOld ); } - rTabCols.SetRight(nLeft + nTblWidth); + rTabCols.SetRight(nLeft + nTableWidth); } else { diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx index 3f48722aeac5..a21b1687de17 100644 --- a/sw/source/uibase/table/tablemgr.cxx +++ b/sw/source/uibase/table/tablemgr.cxx @@ -161,35 +161,35 @@ void SwTableFUNC::InitTabCols() { OSL_ENSURE(pSh, "no Shell"); - if( pFmt && pSh) + if( pFormat && pSh) pSh->GetTabCols( aCols ); } -SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, bool bCopyFmt) - : pFmt(pShell->GetTableFmt()), +SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, bool bCopyFormat) + : pFormat(pShell->GetTableFormat()), pSh(pShell), - bCopy(bCopyFmt) + bCopy(bCopyFormat) { // if applicable copy the format for edit - if( pFmt && bCopy ) - pFmt = new SwFrmFmt( *pFmt ); + if( pFormat && bCopy ) + pFormat = new SwFrameFormat( *pFormat ); } SwTableFUNC::~SwTableFUNC() { if(bCopy) - delete pFmt; + delete pFormat; } void SwTableFUNC::UpdateChart() { //Update of the fields triggered by the user, all Charts of //the table will be brought up to date - SwFrmFmt *pFmt2 = pSh->GetTableFmt(); - if ( pFmt2 && pSh->HasOLEObj( pFmt2->GetName() ) ) + SwFrameFormat *pFormat2 = pSh->GetTableFormat(); + if ( pFormat2 && pSh->HasOLEObj( pFormat2->GetName() ) ) { pSh->StartAllAction(); - pSh->UpdateCharts( pFmt2->GetName() ); + pSh->UpdateCharts( pFormat2->GetName() ); pSh->EndAllAction(); } } @@ -198,22 +198,22 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( uno::Reference< chart2::data::XDataProvider > &rxDataProvider, bool bFillWithData, const OUString &rCellRange, - SwFlyFrmFmt** ppFlyFrmFmt ) + SwFlyFrameFormat** ppFlyFrameFormat ) { uno::Reference< frame::XModel > xChartModel; pSh->StartUndo( UNDO_UI_INSERT_CHART ); pSh->StartAllAction(); OUString aName; - if (pSh->IsCrsrInTbl()) + if (pSh->IsCrsrInTable()) { - aName = pSh->GetTableFmt()->GetName(); + aName = pSh->GetTableFormat()->GetName(); // insert node before table pSh->MoveTable( fnTableCurr, fnTableStart ); pSh->Up( false, 1, false ); - if ( pSh->IsCrsrInTbl() ) + if ( pSh->IsCrsrInTable() ) { - if ( aName != pSh->GetTableFmt()->GetName() ) + if ( aName != pSh->GetTableFormat()->GetName() ) pSh->Down( false, 1, false ); // two adjacent tables } pSh->SplitNode(); @@ -229,10 +229,10 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( if ( xObj.is() ) { - SwFlyFrmFmt* pTmp = 0; + SwFlyFrameFormat* pTmp = 0; pSh->InsertOleObject( aEmbObjRef, &pTmp ); - if (ppFlyFrmFmt) - *ppFlyFrmFmt = pTmp; + if (ppFlyFrameFormat) + *ppFlyFrameFormat = pTmp; uno::Reference< embed::XComponentSupplier > xCompSupp( xObj, uno::UNO_QUERY ); if( xCompSupp.is()) diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx index 6d8a7670fcde..2a01c57a714b 100644 --- a/sw/source/uibase/table/tablepg.hxx +++ b/sw/source/uibase/table/tablepg.hxx @@ -61,7 +61,7 @@ class SwFormatTablePage : public SfxTabPage VclPtr<ListBox> m_pTextDirectionLB; - SwTableRep* pTblData; + SwTableRep* pTableData; SwTwips nSaveWidth; SwTwips nMinTableWidth; bool bModified; @@ -103,7 +103,7 @@ class SwTableColumnPage : public SfxTabPage VclPtr<PushButton> m_pUpBtn; VclPtr<PushButton> m_pDownBtn; - SwTableRep* pTblData; + SwTableRep* pTableData; PercentField m_aFieldArr[MET_FIELDS]; VclPtr<FixedText> m_pTextArr[MET_FIELDS]; SwTwips nTableWidth; @@ -111,9 +111,9 @@ class SwTableColumnPage : public SfxTabPage sal_uInt16 nNoOfCols; sal_uInt16 nNoOfVisibleCols; // Remember the width, when switching to autoalign - sal_uInt16 aValueTbl[MET_FIELDS];// primary assignment of the MetricFields + sal_uInt16 aValueTable[MET_FIELDS];// primary assignment of the MetricFields bool bModified:1; - bool bModifyTbl:1; + bool bModifyTable:1; bool bPercentMode:1; void Init(bool bWeb); diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx index 2aaa3346dc1c..695d62a77517 100644 --- a/sw/source/uibase/uiview/formatclipboard.cxx +++ b/sw/source/uibase/uiview/formatclipboard.cxx @@ -111,18 +111,18 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh ) rSet.Put( SfxUInt16Item( FN_PARAM_TABLE_HEADLINE, rSh.GetRowsToRepeat() ) ); - SwFrmFmt *pFrmFmt = rSh.GetTableFmt(); - if(pFrmFmt) + SwFrameFormat *pFrameFormat = rSh.GetTableFormat(); + if(pFrameFormat) { - rSet.Put( pFrmFmt->GetShadow() ); - rSet.Put( pFrmFmt->GetBreak() ); - rSet.Put( pFrmFmt->GetPageDesc() ); - rSet.Put( pFrmFmt->GetLayoutSplit() ); - rSet.Put( pFrmFmt->GetKeep() ); - rSet.Put( pFrmFmt->GetFrmDir() ); + rSet.Put( pFrameFormat->GetShadow() ); + rSet.Put( pFrameFormat->GetBreak() ); + rSet.Put( pFrameFormat->GetPageDesc() ); + rSet.Put( pFrameFormat->GetLayoutSplit() ); + rSet.Put( pFrameFormat->GetKeep() ); + rSet.Put( pFrameFormat->GetFrmDir() ); } - SwFmtRowSplit* pSplit = 0; + SwFormatRowSplit* pSplit = 0; rSh.GetRowSplit(pSplit); if(pSplit) rSet.Put(*pSplit); @@ -161,44 +161,44 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem) ) rSh.SetRowsToRepeat( static_cast<const SfxUInt16Item*>(pItem)->GetValue() ); - SwFrmFmt* pFrmFmt = rSh.GetTableFmt(); - if(pFrmFmt) + SwFrameFormat* pFrameFormat = rSh.GetTableFormat(); + if(pFrameFormat) { //RES_SHADOW pItem=0; rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), false, &pItem); if(pItem) - pFrmFmt->SetFmtAttr( *pItem ); + pFrameFormat->SetFormatAttr( *pItem ); //RES_BREAK pItem=0; rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), false, &pItem); if(pItem) - pFrmFmt->SetFmtAttr( *pItem ); + pFrameFormat->SetFormatAttr( *pItem ); //RES_PAGEDESC pItem=0; rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), false, &pItem); if(pItem) - pFrmFmt->SetFmtAttr( *pItem ); + pFrameFormat->SetFormatAttr( *pItem ); //RES_LAYOUT_SPLIT pItem=0; rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), false, &pItem); if(pItem) - pFrmFmt->SetFmtAttr( *pItem ); + pFrameFormat->SetFormatAttr( *pItem ); //RES_KEEP pItem=0; rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), false, &pItem); if(pItem) - pFrmFmt->SetFmtAttr( *pItem ); + pFrameFormat->SetFormatAttr( *pItem ); //RES_FRAMEDIR pItem=0; rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), false, &pItem); if(pItem) - pFrmFmt->SetFmtAttr( *pItem ); + pFrameFormat->SetFormatAttr( *pItem ); } if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pItem) ) @@ -212,13 +212,13 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>((pItem))->GetValue()); if( SfxItemState::SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pItem) ) - rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem)); + rSh.SetRowSplit(*static_cast<const SwFormatRowSplit*>(pItem)); } }//end anonymous namespace SwFormatClipboard::SwFormatClipboard() : m_nSelectionType(0) - , m_pItemSet_TxtAttr(0) + , m_pItemSet_TextAttr(0) , m_pItemSet_ParAttr(0) , m_pTableItemSet(0) , m_bPersistentCopy(false) @@ -226,14 +226,14 @@ SwFormatClipboard::SwFormatClipboard() } SwFormatClipboard::~SwFormatClipboard() { - delete m_pItemSet_TxtAttr; + delete m_pItemSet_TextAttr; delete m_pItemSet_ParAttr; delete m_pTableItemSet; } bool SwFormatClipboard::HasContent() const { - return m_pItemSet_TxtAttr!=0 + return m_pItemSet_TextAttr!=0 || m_pItemSet_ParAttr!=0 || m_pTableItemSet != 0 || !m_aCharStyle.isEmpty() @@ -275,7 +275,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP m_bPersistentCopy = bPersistentCopy; int nSelectionType = rWrtShell.GetSelectionType(); - SfxItemSet* pItemSet_TxtAttr = lcl_CreateEmptyItemSet( nSelectionType, rPool, true ); + SfxItemSet* pItemSet_TextAttr = lcl_CreateEmptyItemSet( nSelectionType, rPool, true ); SfxItemSet* pItemSet_ParAttr = lcl_CreateEmptyItemSet( nSelectionType, rPool, false ); rWrtShell.StartAction(); @@ -338,14 +338,14 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP pCrsr->Move( bForwardSelection ? fnMoveBackward : fnMoveForward ); } - if(pItemSet_TxtAttr) + if(pItemSet_TextAttr) { if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) ) - rWrtShell.GetFlyFrmAttr(*pItemSet_TxtAttr); + rWrtShell.GetFlyFrmAttr(*pItemSet_TextAttr); else { // get the text attributes from named and automatic formatting - rWrtShell.GetCurAttr(*pItemSet_TxtAttr); + rWrtShell.GetCurAttr(*pItemSet_TextAttr); if( nSelectionType & nsSelectionType::SEL_TXT ) { @@ -363,12 +363,12 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP if( pDrawView->AreObjectsMarked() ) { bool bOnlyHardAttr = true; - pItemSet_TxtAttr = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) ); + pItemSet_TextAttr = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) ); //remove attributes defining the type/data of custom shapes - pItemSet_TxtAttr->ClearItem(SDRATTR_CUSTOMSHAPE_ENGINE); - pItemSet_TxtAttr->ClearItem(SDRATTR_CUSTOMSHAPE_DATA); - pItemSet_TxtAttr->ClearItem(SDRATTR_CUSTOMSHAPE_GEOMETRY); - pItemSet_TxtAttr->ClearItem(SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL); + pItemSet_TextAttr->ClearItem(SDRATTR_CUSTOMSHAPE_ENGINE); + pItemSet_TextAttr->ClearItem(SDRATTR_CUSTOMSHAPE_DATA); + pItemSet_TextAttr->ClearItem(SDRATTR_CUSTOMSHAPE_GEOMETRY); + pItemSet_TextAttr->ClearItem(SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL); } } } @@ -393,20 +393,20 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP } m_nSelectionType = nSelectionType; - m_pItemSet_TxtAttr = pItemSet_TxtAttr; + m_pItemSet_TextAttr = pItemSet_TextAttr; m_pItemSet_ParAttr = pItemSet_ParAttr; if( nSelectionType & nsSelectionType::SEL_TXT ) { // if text is selected save the named character format - SwFmt* pFmt = rWrtShell.GetCurCharFmt(); - if( pFmt ) - m_aCharStyle = pFmt->GetName(); + SwFormat* pFormat = rWrtShell.GetCurCharFormat(); + if( pFormat ) + m_aCharStyle = pFormat->GetName(); // and the named paragraph format - pFmt = rWrtShell.GetCurTxtFmtColl(); - if( pFmt ) - m_aParaStyle = pFmt->GetName(); + pFormat = rWrtShell.GetCurTextFormatColl(); + if( pFormat ) + m_aParaStyle = pFormat->GetName(); } rWrtShell.Pop(false); @@ -479,13 +479,13 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo // if the style is found if( pStyle ) { - SwFmtCharFmt aFmt(pStyle->GetCharFmt()); + SwFormatCharFormat aFormat(pStyle->GetCharFormat()); // store the attributes from this style in aItemVector in order // not to apply them as automatic formatting attributes later in the code - lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet()); + lcl_AppendSetItems( aItemVector, aFormat.GetCharFormat()->GetAttrSet()); // apply the named format - rWrtShell.SetAttrItem( aFmt ); + rWrtShell.SetAttrItem( aFormat ); } } @@ -501,7 +501,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo lcl_AppendSetItems( aItemVector, pStyle->GetCollection()->GetAttrSet()); // apply the named format - rWrtShell.SetTxtFmtColl( pStyle->GetCollection() ); + rWrtShell.SetTextFormatColl( pStyle->GetCollection() ); } } } @@ -529,7 +529,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo } } - if(m_pItemSet_TxtAttr) + if(m_pItemSet_TextAttr) { if( nSelectionType & nsSelectionType::SEL_DRW ) { @@ -537,19 +537,19 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo if(pDrawView) { bool bReplaceAll = true; - pDrawView->SetAttrToMarked(*m_pItemSet_TxtAttr, bReplaceAll); + pDrawView->SetAttrToMarked(*m_pItemSet_TextAttr, bReplaceAll); } } else { // temporary SfxItemSet boost::scoped_ptr<SfxItemSet> pTemplateItemSet(lcl_CreateEmptyItemSet( - nSelectionType, *m_pItemSet_TxtAttr->GetPool(), true )); + nSelectionType, *m_pItemSet_TextAttr->GetPool(), true )); if(pTemplateItemSet) { // copy the stored automatic text attributes in a temporary SfxItemSet - pTemplateItemSet->Put( *m_pItemSet_TxtAttr ); + pTemplateItemSet->Put( *m_pItemSet_TextAttr ); // only attributes that were not apply by named style attributes and automatic // paragraph attributes should be applied @@ -578,8 +578,8 @@ void SwFormatClipboard::Erase() { m_nSelectionType = 0; - delete m_pItemSet_TxtAttr; - m_pItemSet_TxtAttr = 0; + delete m_pItemSet_TextAttr; + m_pItemSet_TextAttr = 0; delete m_pItemSet_ParAttr; m_pItemSet_ParAttr = 0; diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 4ac28e81647e..144030b20242 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1131,7 +1131,7 @@ void SwPagePreview::Init(const SwViewOption * pPrefs) aOpt.SetPageBreak( false ); aOpt.SetColumnBreak( false ); aOpt.SetSoftHyph( false ); - aOpt.SetFldName( false ); + aOpt.SetFieldName( false ); aOpt.SetPostIts( false ); aOpt.SetShowHiddenChar( false ); aOpt.SetShowHiddenField( false ); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index eb369258ce26..590774a9eb02 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -233,12 +233,12 @@ void SwView::SelectShell() // Decision if the UpdateTable has to be called bool bUpdateTable = false; - const SwFrmFmt* pCurTableFmt = m_pWrtShell->GetTableFmt(); - if(pCurTableFmt && pCurTableFmt != m_pLastTableFormat) + const SwFrameFormat* pCurTableFormat = m_pWrtShell->GetTableFormat(); + if(pCurTableFormat && pCurTableFormat != m_pLastTableFormat) { bUpdateTable = true; // can only be executed later } - m_pLastTableFormat = pCurTableFmt; + m_pLastTableFormat = pCurTableFormat; //SEL_TBL and SEL_TBL_CELLS can be ORed! int nNewSelectionType = (m_pWrtShell->GetSelectionType() @@ -829,7 +829,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_pWrtShell->MoveTo(&rPreviewViewShell); // to update the field command et.al. if necessary const SwViewOption* pPreviewOpt = rPreviewViewShell.GetViewOptions(); - if( pPreviewOpt->IsFldName() != aUsrPref.IsFldName() || + if( pPreviewOpt->IsFieldName() != aUsrPref.IsFieldName() || pPreviewOpt->IsShowHiddenField() != aUsrPref.IsShowHiddenField() || pPreviewOpt->IsShowHiddenPara() != aUsrPref.IsShowHiddenPara() || pPreviewOpt->IsShowHiddenChar() != aUsrPref.IsShowHiddenChar() ) @@ -940,17 +940,17 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() ); m_pWrtShell->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions()); - if( m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpFld() ) + if( m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpField() ) { if (m_pWrtShell->GetDoc()->GetDocumentFieldsManager().containsUpdatableFields()) { SET_CURR_SHELL( m_pWrtShell ); m_pWrtShell->StartAction(); m_pWrtShell->CalcLayout(); - m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFlds(NULL, false); + m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(NULL, false); m_pWrtShell->EndAction(); } - m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFldStat( false ); + m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFieldStat( false ); } // Update all tables if necessary: diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 46f4e5aa6d1c..a77ae11b771c 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -282,7 +282,7 @@ void SwView::StateViewOptions(SfxItemSet &rSet) case FN_VIEW_FIELDS: aBool.SetValue( SwViewOption::IsFieldShadings() ); break; case FN_VIEW_FIELDNAME: - aBool.SetValue( pOpt->IsFldName() ); break; + aBool.SetValue( pOpt->IsFieldName() ); break; case FN_VIEW_MARKS: aBool.SetValue( lcl_IsViewMarks(*pOpt) ); break; case FN_VIEW_META_CHARS: @@ -485,9 +485,9 @@ void SwView::ExecViewOptions(SfxRequest &rReq) case FN_VIEW_FIELDNAME: if( STATE_TOGGLE == eState ) - bFlag = !pOpt->IsFldName() ; + bFlag = !pOpt->IsFieldName() ; - pOpt->SetFldName( bFlag ); + pOpt->SetFieldName( bFlag ); break; case FN_VIEW_MARKS: diff --git a/sw/source/uibase/uiview/view1.cxx b/sw/source/uibase/uiview/view1.cxx index 4081d58d0df4..5abd3b1e544a 100644 --- a/sw/source/uibase/uiview/view1.cxx +++ b/sw/source/uibase/uiview/view1.cxx @@ -81,10 +81,10 @@ void SwView::Activate(bool bMDIActivate) AttrChangedNotify(m_pWrtShell); - // Initialize Flddlg newly if necessary (e.g. for TYP_SETVAR) - sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId(); + // Initialize Fielddlg newly if necessary (e.g. for TYP_SETVAR) + sal_uInt16 nId = SwFieldDlgWrapper::GetChildWindowId(); SfxViewFrame* pVFrame = GetViewFrame(); - SwFldDlgWrapper *pWrp = static_cast<SwFldDlgWrapper*>(pVFrame->GetChildWindow(nId)); + SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(pVFrame->GetChildWindow(nId)); if (pWrp) pWrp->ReInitDlg(GetDocShell()); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 96012b98a3b5..b6f947ddfb5f 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -313,19 +313,19 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) std::vector<OUString> aFormats; SwDoc* pDoc = pDocShell->GetDoc(); - const size_t nArrLen = pDoc->GetFrmFmts()->size(); + const size_t nArrLen = pDoc->GetFrameFormats()->size(); for( size_t i = 0; i < nArrLen; ++i ) { - const SwFrmFmt* pFmt = (*pDoc->GetFrmFmts())[ i ]; - if(pFmt->IsDefault() || pFmt->IsAuto()) + const SwFrameFormat* pFormat = (*pDoc->GetFrameFormats())[ i ]; + if(pFormat->IsDefault() || pFormat->IsAuto()) continue; - aFormats.push_back(pFmt->GetName()); + aFormats.push_back(pFormat->GetName()); } // pool formats const ::std::vector<OUString>& rFrmPoolArr( - SwStyleNameMapper::GetFrmFmtUINameArray()); + SwStyleNameMapper::GetFrameFormatUINameArray()); for( size_t i = 0; i < rFrmPoolArr.size(); ++i ) { aFormats.push_back(rFrmPoolArr[i]); @@ -467,12 +467,12 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) // else this would reset the current setting for the frame holding the graphic if ( !bReplaceMode && rSh.IsFrmSelected() ) { - SwFrmFmt* pFmt = pDoc->FindFrmFmtByName( sGraphicFormat ); - if(!pFmt) - pFmt = pDoc->MakeFrmFmt(sGraphicFormat, - pDocShell->GetDoc()->GetDfltFrmFmt(), + SwFrameFormat* pFormat = pDoc->FindFrameFormatByName( sGraphicFormat ); + if(!pFormat) + pFormat = pDoc->MakeFrameFormat(sGraphicFormat, + pDocShell->GetDoc()->GetDfltFrameFormat(), true, false); - rSh.SetFrmFmt( pFmt ); + rSh.SetFrameFormat( pFormat ); } RESOURCE_TYPE nResId = 0; @@ -849,10 +849,10 @@ void SwView::Execute(SfxRequest &rReq) { GetEditWin().SetChainMode( false ); } - else if( m_pWrtShell->GetFlyFrmFmt() ) + else if( m_pWrtShell->GetFlyFrameFormat() ) { - const SwFrmFmt* pFmt = m_pWrtShell->GetFlyFrmFmt(); - if(m_pWrtShell->GotoFly( pFmt->GetName(), FLYCNTTYPE_FRM )) + const SwFrameFormat* pFormat = m_pWrtShell->GetFlyFrameFormat(); + if(m_pWrtShell->GotoFly( pFormat->GetName(), FLYCNTTYPE_FRM )) { m_pWrtShell->HideCrsr(); m_pWrtShell->EnterSelFrmMode(); @@ -975,8 +975,8 @@ void SwView::Execute(SfxRequest &rReq) { const size_t nCurIdx = m_pWrtShell->GetCurPageDesc(); SwPageDesc aDesc( m_pWrtShell->GetPageDesc( nCurIdx )); - SwFrmFmt& rMaster = aDesc.GetMaster(); - rMaster.SetFmtAttr(*pItem); + SwFrameFormat& rMaster = aDesc.GetMaster(); + rMaster.SetFormatAttr(*pItem); m_pWrtShell->ChgPageDesc( nCurIdx, aDesc); } } @@ -1499,10 +1499,10 @@ void SwView::StateStatusLine(SfxItemSet &rSet) else { OUString sStr; - if( rShell.IsCrsrInTbl() ) + if( rShell.IsCrsrInTable() ) { // table name + cell coordinate - sStr = rShell.GetTableFmt()->GetName(); + sStr = rShell.GetTableFormat()->GetName(); sStr += ":"; sStr += rShell.GetBoxNms(); } @@ -1854,15 +1854,15 @@ void SwView::InsFrmMode(sal_uInt16 nCols) { SwFlyFrmAttrMgr aMgr( true, m_pWrtShell, FRMMGR_TYPE_TEXT ); - const SwFrmFmt &rPageFmt = + const SwFrameFormat &rPageFormat = m_pWrtShell->GetPageDesc(m_pWrtShell->GetCurPageDesc()).GetMaster(); - SwTwips lWidth = rPageFmt.GetFrmSize().GetWidth(); - const SvxLRSpaceItem &rLR = rPageFmt.GetLRSpace(); + SwTwips lWidth = rPageFormat.GetFrmSize().GetWidth(); + const SvxLRSpaceItem &rLR = rPageFormat.GetLRSpace(); lWidth -= rLR.GetLeft() + rLR.GetRight(); aMgr.SetSize(Size(lWidth, aMgr.GetSize().Height())); if(nCols > 1) { - SwFmtCol aCol; + SwFormatCol aCol; aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() ); aMgr.SetCol( aCol ); } @@ -1899,7 +1899,7 @@ bool SwView::JumpToSwMark( const OUString& rMark ) if( !bHasShFocus ) m_pWrtShell->ShGetFcs( false ); - const SwFmtINetFmt* pINet; + const SwFormatINetFormat* pINet; OUString sCmp; OUString sMark( INetURLObject::decode( rMark, INetURLObject::DECODE_WITH_CHARSET, @@ -1977,7 +1977,7 @@ bool SwView::JumpToSwMark( const OUString& rMark ) m_pWrtShell->GotoMark( ppMark->get(), false, true ), bRet = true; else if( 0 != ( pINet = m_pWrtShell->FindINetAttr( sMark ) )) { m_pWrtShell->addCurrentPosition(); - bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() ); + bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTextINetFormat() ); } // for all types of Flys @@ -2000,7 +2000,7 @@ bool SwView::JumpToSwMark( const OUString& rMark ) else if( pMarkAccess->getAllMarksEnd() != (ppMark = pMarkAccess->findMark(sMark))) m_pWrtShell->GotoMark( ppMark->get(), false, true ), bRet = true; else if( 0 != ( pINet = m_pWrtShell->FindINetAttr( sMark ) )) - bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() ); + bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTextINetFormat() ); // make selection visible later if ( m_aVisArea.IsEmpty() ) @@ -2026,12 +2026,12 @@ static size_t lcl_PageDescWithHeader( const SwDoc& rDoc ) for( size_t i = 0; i < nCnt; ++i ) { const SwPageDesc& rPageDesc = rDoc.GetPageDesc( i ); - const SwFrmFmt& rMaster = rPageDesc.GetMaster(); + const SwFrameFormat& rMaster = rPageDesc.GetMaster(); const SfxPoolItem* pItem; if( ( SfxItemState::SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, false, &pItem ) && - static_cast<const SwFmtHeader*>(pItem)->IsActive() ) || + static_cast<const SwFormatHeader*>(pItem)->IsActive() ) || ( SfxItemState::SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, false, &pItem ) && - static_cast<const SwFmtFooter*>(pItem)->IsActive()) ) + static_cast<const SwFormatFooter*>(pItem)->IsActive()) ) ++nRet; } return nRet; // number of page styles with active header/footer diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index c16e48274d8c..f9e614001086 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -104,13 +104,13 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) { sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if( USHRT_MAX != nPoolId ) - rSh.GetTxtCollFromPool(nPoolId); + rSh.GetTextCollFromPool(nPoolId); // Pool template does not exist: Does it exist on the document? else if( !rSh.GetParaStyle(rName) ) { // It also does not exist in the document: generate - SwTxtFmtColl* pDerivedFrom = rSh.GetTxtCollFromPool(RES_POOLCOLL_LABEL); - rSh.MakeTxtFmtColl(rName, pDerivedFrom); + SwTextFormatColl* pDerivedFrom = rSh.GetTextCollFromPool(RES_POOLCOLL_LABEL); + rSh.MakeTextFormatColl(rName, pDerivedFrom); } } @@ -124,34 +124,34 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) eType & nsSelectionType::SEL_DRW ? LTYPE_DRAW : LTYPE_OBJECT; - SwFldMgr aMgr(&rSh); - SwSetExpFieldType* pFldType = - static_cast<SwSetExpFieldType*>(aMgr.GetFldType(RES_SETEXPFLD, rName)); - if (!pFldType && !rName.isEmpty() ) + SwFieldMgr aMgr(&rSh); + SwSetExpFieldType* pFieldType = + static_cast<SwSetExpFieldType*>(aMgr.GetFieldType(RES_SETEXPFLD, rName)); + if (!pFieldType && !rName.isEmpty() ) { // Create new field types SwSetExpFieldType aSwSetExpFieldType(rSh.GetDoc(), rName, nsSwGetSetExpType::GSE_SEQ); - aMgr.InsertFldType(aSwSetExpFieldType); - pFldType = static_cast<SwSetExpFieldType*>(aMgr.GetFldType(RES_SETEXPFLD, rName)); + aMgr.InsertFieldType(aSwSetExpFieldType); + pFieldType = static_cast<SwSetExpFieldType*>(aMgr.GetFieldType(RES_SETEXPFLD, rName)); } if (!pOpt->IgnoreSeqOpts()) { - if (pFldType) + if (pFieldType) { - pFldType->SetDelimiter(pOpt->GetSeparator()); - pFldType->SetOutlineLvl( static_cast< sal_uInt8 >(pOpt->GetLevel()) ); + pFieldType->SetDelimiter(pOpt->GetSeparator()); + pFieldType->SetOutlineLvl( static_cast< sal_uInt8 >(pOpt->GetLevel()) ); } } sal_uInt16 nID = USHRT_MAX; SwFieldType* pType = 0; - const sal_uInt16 nCount = aMgr.GetFldTypeCount(); + const sal_uInt16 nCount = aMgr.GetFieldTypeCount(); if( !rName.isEmpty() ) { for (sal_uInt16 i = 0; i < nCount; ++i) { - pType = aMgr.GetFldType(USHRT_MAX, i); + pType = aMgr.GetFieldType(USHRT_MAX, i); OUString aTmpName( pType->GetName() ); if (aTmpName == rName && pType->Which() == RES_SETEXPFLD) { @@ -174,7 +174,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) if(pType) static_cast<SwSetExpFieldType*>(pType)->SetSeqFormat(pOpt->GetNumType()); - rSh.UpdateExpFlds( true ); + rSh.UpdateExpFields( true ); rSh.EndAllAction(); diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 38c405f6d083..0b2d78a89a95 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -464,8 +464,8 @@ static bool lcl_isTextBox(SdrObject* pObject) { if (SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(pObject->GetUserCall())) { - if (SwFrmFmt* pFmt = pDrawContact->GetFmt()) - return SwTextBoxHelper::findTextBox(pFmt); + if (SwFrameFormat* pFormat = pDrawContact->GetFormat()) + return SwTextBoxHelper::findTextBox(pFormat); } return false; } @@ -733,7 +733,7 @@ IMPL_LINK(SwView, OnlineSpellCallback, SpellCallbackInfo*, pInfo) return 0; } -bool SwView::ExecDrwTxtSpellPopup(const Point& rPt) +bool SwView::ExecDrwTextSpellPopup(const Point& rPt) { bool bRet = false; SdrView *pSdrView = m_pWrtShell->GetDrawView(); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 4ae22cd95243..a6aae3ec7510 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -174,7 +174,7 @@ void SwView::ExecLingu(SfxRequest &rReq) // remember cursor position data for later restoration of the cursor const SwPosition *pPoint = m_pWrtShell->GetCrsr()->GetPoint(); - bool bRestoreCursor = pPoint->nNode.GetNode().IsTxtNode(); + bool bRestoreCursor = pPoint->nNode.GetNode().IsTextNode(); const SwNodeIndex aPointNodeIndex( pPoint->nNode ); sal_Int32 nPointIndex = pPoint->nContent.GetIndex(); @@ -188,14 +188,14 @@ void SwView::ExecLingu(SfxRequest &rReq) if (bRestoreCursor) { - SwTxtNode *pTxtNode = aPointNodeIndex.GetNode().GetTxtNode(); + SwTextNode *pTextNode = aPointNodeIndex.GetNode().GetTextNode(); // check for unexpected error case - OSL_ENSURE(pTxtNode && pTxtNode->GetTxt().getLength() >= nPointIndex, + OSL_ENSURE(pTextNode && pTextNode->GetText().getLength() >= nPointIndex, "text missing: corrupted node?" ); - if (!pTxtNode || pTxtNode->GetTxt().getLength() < nPointIndex) + if (!pTextNode || pTextNode->GetText().getLength() < nPointIndex) nPointIndex = 0; // restore cursor to its original position - m_pWrtShell->GetCrsr()->GetPoint()->nContent.Assign( pTxtNode, nPointIndex ); + m_pWrtShell->GetCrsr()->GetPoint()->nContent.Assign( pTextNode, nPointIndex ); } // enable all, restore view and cursor position @@ -494,7 +494,7 @@ bool SwView::IsValidSelectionForThesaurus() const OUString SwView::GetThesaurusLookUpText( bool bSelection ) const { - return bSelection ? OUString(m_pWrtShell->GetSelTxt()) : m_pWrtShell->GetCurWord(); + return bSelection ? OUString(m_pWrtShell->GetSelText()) : m_pWrtShell->GetCurWord(); } void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString &rLookUpText, bool bSelection ) @@ -633,7 +633,7 @@ bool SwView::ExecSpellPopup(const Point& rPt) !m_pWrtShell->IsSelection()) { if (m_pWrtShell->GetSelectionType() & nsSelectionType::SEL_DRW_TXT) - bRet = ExecDrwTxtSpellPopup(rPt); + bRet = ExecDrwTextSpellPopup(rPt); else if (!m_pWrtShell->IsSelFrmMode()) { const bool bOldViewLock = m_pWrtShell->IsViewLocked(); @@ -670,10 +670,10 @@ bool SwView::ExecSpellPopup(const Point& rPt) // get paragraph text OUString aParaText; SwPosition aPoint( *m_pWrtShell->GetCrsr()->GetPoint() ); - const SwTxtNode *pNode = dynamic_cast< const SwTxtNode * >( + const SwTextNode *pNode = dynamic_cast< const SwTextNode * >( &aPoint.nNode.GetNode() ); if (pNode) - aParaText = pNode->GetTxt(); // this may include hidden text but that should be Ok + aParaText = pNode->GetText(); // this may include hidden text but that should be Ok else { OSL_FAIL("text node expected but not found" ); diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index de87748eec31..e875d560739b 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -381,8 +381,8 @@ IMPL_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) case NID_FTN: rSh.EnterStdMode(); bNext ? - rSh.GotoNextFtnAnchor() : - rSh.GotoPrevFtnAnchor(); + rSh.GotoNextFootnoteAnchor() : + rSh.GotoPrevFootnoteAnchor(); break; case NID_MARK: { @@ -426,8 +426,8 @@ IMPL_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) sw::sidebarwindows::SwSidebarWin* pPostIt = GetPostItMgr()->GetActiveSidebarWin(); if (pPostIt) GetPostItMgr()->SetActiveSidebarWin(0); - SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD); - if ( rSh.MoveFldType( pFldType, bNext ) ) + SwFieldType* pFieldType = rSh.GetFieldType(0, RES_POSTITFLD); + if ( rSh.MoveFieldType( pFieldType, bNext ) ) GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT); else //first/last item @@ -452,11 +452,11 @@ IMPL_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) break; case NID_TABLE_FORMULA: - rSh.GotoNxtPrvTblFormula( bNext ); + rSh.GotoNxtPrvTableFormula( bNext ); break; case NID_TABLE_FORMULA_ERROR: - rSh.GotoNxtPrvTblFormula( bNext, true ); + rSh.GotoNxtPrvTableFormula( bNext, true ); break; } m_pEditWin->GrabFocus(); diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 1dbd4eab9e1f..e7dad98ac39b 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -627,7 +627,7 @@ bool SwView::PageUpCrsr( bool bSelect ) if ( eType & FrmTypeFlags::FOOTNOTE ) { m_pWrtShell->MoveCrsr(); - m_pWrtShell->GotoFtnAnchor(); + m_pWrtShell->GotoFootnoteAnchor(); m_pWrtShell->Right(CRSR_SKIP_CHARS, false, 1, false ); return true; } diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index a7c7c88d1bfb..3d3dff11cb2f 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -613,7 +613,7 @@ void SwView::Replace() m_pWrtShell->StartUndo(UNDO_UI_REPLACE_STYLE, &aRewriter); - m_pWrtShell->SetTxtFmtColl( m_pWrtShell->GetParaStyle( + m_pWrtShell->SetTextFormatColl( m_pWrtShell->GetParaStyle( m_pSrchItem->GetReplaceString(), SwWrtShell::GETSTYLE_CREATESOME )); @@ -679,7 +679,7 @@ void SwView::Replace() if( bReplaced && m_pReplList && m_pReplList->Count() && m_pWrtShell->HasSelection() ) { SfxItemSet aReplSet( m_pWrtShell->GetAttrPool(), - aTxtFmtCollSetRange ); + aTextFormatCollSetRange ); if( m_pReplList->Get( aReplSet ).Count() ) { ::SfxToSwPageDescAttr( *m_pWrtShell, aReplSet ); @@ -831,16 +831,16 @@ void SwView::StateSearch(SfxItemSet &rSet) { m_pSrchItem = new SvxSearchItem( SID_SEARCH_ITEM ); m_pSrchItem->SetFamily(SFX_STYLE_FAMILY_PARA); - m_pSrchItem->SetSearchString( m_pWrtShell->GetSelTxt() ); + m_pSrchItem->SetSearchString( m_pWrtShell->GetSelText() ); } if( m_bJustOpened && m_pWrtShell->IsSelection() ) { - OUString aTxt; + OUString aText; if( 1 == m_pWrtShell->GetCrsrCnt() && - !( aTxt = m_pWrtShell->SwCrsrShell::GetSelTxt() ).isEmpty() ) + !( aText = m_pWrtShell->SwCrsrShell::GetSelText() ).isEmpty() ) { - m_pSrchItem->SetSearchString( aTxt ); + m_pSrchItem->SetSearchString( aText ); m_pSrchItem->SetSelection( false ); } else diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 29a6f207d188..2d9b0354d094 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -87,7 +87,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case SID_INSERT_GRAPHIC: - if( m_pWrtShell->CrsrInsideInputFld() ) + if( m_pWrtShell->CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -114,7 +114,7 @@ void SwView::GetState(SfxItemSet &rSet) rSet.DisableItem(nWhich); } else if( m_pWrtShell->IsTableMode() - || m_pWrtShell->CrsrInsideInputFld() ) + || m_pWrtShell->CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -123,7 +123,7 @@ void SwView::GetState(SfxItemSet &rSet) case FN_EDIT_FOOTNOTE: { - if( !m_pWrtShell->GetCurFtn() ) + if( !m_pWrtShell->GetCurFootnote() ) rSet.DisableItem(nWhich); } break; @@ -154,9 +154,9 @@ void SwView::GetState(SfxItemSet &rSet) //UUUU set correct parent to get the XFILL_NONE FillStyle as needed if(!rSet.GetParent()) { - const SwFrmFmt& rMaster = rDesc.GetMaster(); + const SwFrameFormat& rMaster = rDesc.GetMaster(); - rSet.SetParent(&rMaster.GetDoc()->GetDfltFrmFmt()->GetAttrSet()); + rSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet()); } ::PageDescToItemSet( rDesc, rSet); @@ -167,9 +167,9 @@ void SwView::GetState(SfxItemSet &rSet) { const size_t nCurIdx = m_pWrtShell->GetCurPageDesc(); const SwPageDesc& rDesc = m_pWrtShell->GetPageDesc( nCurIdx ); - const SwFrmFmt& rMaster = rDesc.GetMaster(); + const SwFrameFormat& rMaster = rDesc.GetMaster(); const SvxBrushItem& rBrush = static_cast<const SvxBrushItem&>( - rMaster.GetFmtAttr(RES_BACKGROUND, true)); + rMaster.GetFormatAttr(RES_BACKGROUND, true)); rSet.Put(rBrush); } break; @@ -209,7 +209,7 @@ void SwView::GetState(SfxItemSet &rSet) case FN_INSERT_OBJ_CTRL: if( bWeb - || m_pWrtShell->CrsrInsideInputFld() ) + || m_pWrtShell->CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -308,7 +308,7 @@ void SwView::GetState(SfxItemSet &rSet) else if (pCursor->HasMark()) { // If the selection does not contain redlines, disable accepting/rejecting changes. sal_uInt16 index = 0; - const SwRedlineTbl& table = pDoc->getIDocumentRedlineAccess().GetRedlineTbl(); + const SwRedlineTable& table = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); const SwRangeRedline* redline = table.FindAtPosition( *pCursor->Start(), index ); if( redline != NULL && *redline->Start() == *pCursor->End()) redline = NULL; diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index ae04fafdc26e..7dac67eb7e16 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -59,7 +59,7 @@ using namespace ::com::sun::star; // Pack columns -static void lcl_FillSvxColumn(const SwFmtCol& rCol, +static void lcl_FillSvxColumn(const SwFormatCol& rCol, long nTotalWidth, SvxColumnItem& rColItem, long nDistance) @@ -101,7 +101,7 @@ static void lcl_FillSvxColumn(const SwFmtCol& rCol, // Transfer ColumnItem in ColumnInfo static void lcl_ConvertToCols(const SvxColumnItem& rColItem, long nTotalWidth, - SwFmtCol& rCols) + SwFormatCol& rCols) { OSL_ENSURE( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" ); // ruler executes that change the columns shortly after the selection has changed @@ -179,7 +179,7 @@ static void lcl_Scale(long& nVal, long nScale) nVal >>= 8; } -void ResizeFrameCols(SwFmtCol& rCol, +void ResizeFrameCols(SwFormatCol& rCol, long nOldWidth, long nNewWidth, long nLeftDelta ) @@ -235,13 +235,13 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const SwPageDesc& rDesc = rSh.GetPageDesc( nDescId ); const bool bVerticalWriting = rSh.IsInVerticalText(); - const SwFmtHeader& rHeaderFmt = rDesc.GetMaster().GetHeader(); - SwFrmFmt *pHeaderFmt = const_cast<SwFrmFmt*>(rHeaderFmt.GetHeaderFmt()); + const SwFormatHeader& rHeaderFormat = rDesc.GetMaster().GetHeader(); + SwFrameFormat *pHeaderFormat = const_cast<SwFrameFormat*>(rHeaderFormat.GetHeaderFormat()); - const SwFmtFooter& rFooterFmt = rDesc.GetMaster().GetFooter(); - SwFrmFmt *pFooterFmt = const_cast<SwFrmFmt*>(rFooterFmt.GetFooterFmt()); + const SwFormatFooter& rFooterFormat = rDesc.GetMaster().GetFooter(); + SwFrameFormat *pFooterFormat = const_cast<SwFrameFormat*>(rFooterFormat.GetFooterFormat()); - const SwFmtFrmSize &rFrmSize = rDesc.GetMaster().GetFrmSize(); + const SwFormatFrmSize &rFrmSize = rDesc.GetMaster().GetFrmSize(); const SwRect& rPageRect = rSh.GetAnyCurRect(RECT_PAGE); const long nPageWidth = bBrowse ? rPageRect.Width() : rFrmSize.GetWidth(); @@ -261,7 +261,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxLRSpaceItem aLR(RES_LR_SPACE); if ( !bSect && (bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY) ) { - SwFrmFmt* pFmt = static_cast<SwFrmFmt*>(rSh.GetFlyFrmFmt()); + SwFrameFormat* pFormat = static_cast<SwFrameFormat*>(rSh.GetFlyFrameFormat()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); bool bVerticalFrame(false); @@ -282,20 +282,20 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if(bVerticalFrame) { - SwFmtVertOrient aVertOrient(pFmt->GetVertOrient()); + SwFormatVertOrient aVertOrient(pFormat->GetVertOrient()); aVertOrient.SetVertOrient(text::VertOrientation::NONE); aVertOrient.SetPos(aVertOrient.GetPos() + nDeltaX ); aSet.Put( aVertOrient ); } else { - SwFmtHoriOrient aHoriOrient( pFmt->GetHoriOrient() ); + SwFormatHoriOrient aHoriOrient( pFormat->GetHoriOrient() ); aHoriOrient.SetHoriOrient( text::HoriOrientation::NONE ); aHoriOrient.SetPos( aHoriOrient.GetPos() + nDeltaX ); aSet.Put( aHoriOrient ); } - SwFmtFrmSize aSize( pFmt->GetFrmSize() ); + SwFormatFrmSize aSize( pFormat->GetFrmSize() ); long nOldWidth = (long) aSize.GetWidth(); if(aSize.GetWidthPercent()) @@ -311,7 +311,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if( nFrmType & FrmTypeFlags::COLUMN ) { - SwFmtCol aCol(pFmt->GetCol()); + SwFormatCol aCol(pFormat->GetCol()); ::ResizeFrameCols(aCol, nOldWidth, (long)aSize.GetWidth(), nDeltaX ); aSet.Put(aCol); @@ -342,10 +342,10 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aLR.SetLeft(aLongLR.GetLeft()); aLR.SetRight(aLongLR.GetRight()); - if ( nFrmType & FrmTypeFlags::HEADER && pHeaderFmt ) - pHeaderFmt->SetFmtAttr( aLR ); - else if( nFrmType & FrmTypeFlags::FOOTER && pFooterFmt ) - pFooterFmt->SetFmtAttr( aLR ); + if ( nFrmType & FrmTypeFlags::HEADER && pHeaderFormat ) + pHeaderFormat->SetFormatAttr( aLR ); + else if( nFrmType & FrmTypeFlags::FOOTER && pFooterFormat ) + pFooterFormat->SetFormatAttr( aLR ); } else if( nFrmType == FrmTypeFlags::DRAWOBJ) { @@ -365,8 +365,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) long nRightDiff = aLongLR.GetRight() - (long)( rPageRect.Right() - aSectRect.Right()); //change the LRSpaceItem of the section accordingly const SwSection* pCurrSect = rSh.GetCurrSection(); - const SwSectionFmt* pSectFmt = pCurrSect->GetFmt(); - SvxLRSpaceItem aLRTmp = pSectFmt->GetLRSpace(); + const SwSectionFormat* pSectFormat = pCurrSect->GetFormat(); + SvxLRSpaceItem aLRTmp = pSectFormat->GetLRSpace(); aLRTmp.SetLeft(aLRTmp.GetLeft() + nLeftDiff); aLRTmp.SetRight(aLRTmp.GetRight() + nRightDiff); SfxItemSet aSet(rSh.GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE, RES_COL, RES_COL, 0L); @@ -374,13 +374,13 @@ void SwView::ExecTabWin( SfxRequest& rReq ) //change the first/last column if(bSect) { - SwFmtCol aCols( pSectFmt->GetCol() ); + SwFormatCol aCols( pSectFormat->GetCol() ); long nDiffWidth = nLeftDiff + nRightDiff; ::ResizeFrameCols(aCols, aSectRect.Width(), aSectRect.Width() - nDiffWidth, nLeftDiff ); aSet.Put( aCols ); } SwSectionData aData(*pCurrSect); - rSh.UpdateSection(rSh.GetSectionFmtPos(*pSectFmt), aData, &aSet); + rSh.UpdateSection(rSh.GetSectionFormatPos(*pSectFormat), aData, &aSet); } else { // Adjust page margins @@ -388,7 +388,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aLR.SetRight(aLongLR.GetRight()); SwapPageMargin( rDesc, aLR ); SwPageDesc aDesc( rDesc ); - aDesc.GetMaster().SetFmtAttr( aLR ); + aDesc.GetMaster().SetFormatAttr( aLR ); rSh.ChgPageDesc( nDescId, aDesc ); } } @@ -406,7 +406,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aLR.SetLeft(aLongLR.GetLeft()); aLR.SetRight(aLongLR.GetRight()); SwapPageMargin( rDesc, aLR ); - aDesc.GetMaster().SetFmtAttr( aLR ); + aDesc.GetMaster().SetFormatAttr( aLR ); } rSh.ChgPageDesc( nDescId, aDesc ); } @@ -420,7 +420,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) { - SwFrmFmt* pFmt = static_cast<SwFrmFmt*>(rSh.GetFlyFrmFmt()); + SwFrameFormat* pFormat = static_cast<SwFrameFormat*>(rSh.GetFlyFrameFormat()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); const long nDeltaY = rPageRect.Top() + aLongULSpace.GetUpper() - rRect.Top(); const long nHeight = nPageHeight - (aLongULSpace.GetUpper() + aLongULSpace.GetLower()); @@ -434,19 +434,19 @@ void SwView::ExecTabWin( SfxRequest& rReq ) rSh.IsFrmVertical(true, bRTL, bVertL2R ) ) || ( !bFrmSelection && bVerticalWriting ) ) { - SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient()); + SwFormatHoriOrient aHoriOrient(pFormat->GetHoriOrient()); aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE); aHoriOrient.SetPos(aHoriOrient.GetPos() + nDeltaY ); aSet.Put( aHoriOrient ); } else { - SwFmtVertOrient aVertOrient(pFmt->GetVertOrient()); + SwFormatVertOrient aVertOrient(pFormat->GetVertOrient()); aVertOrient.SetVertOrient(text::VertOrientation::NONE); aVertOrient.SetPos(aVertOrient.GetPos() + nDeltaY ); aSet.Put( aVertOrient ); } - SwFmtFrmSize aSize(pFmt->GetFrmSize()); + SwFormatFrmSize aSize(pFormat->GetFrmSize()); if(aSize.GetHeightPercent()) { SwRect aRect; @@ -478,8 +478,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const long nRightDiff = aLongULSpace.GetLower() - (long)(nPageHeight - aSectRect.Bottom() + rPageRect.Top()); //change the LRSpaceItem of the section accordingly const SwSection* pCurrSect = rSh.GetCurrSection(); - const SwSectionFmt* pSectFmt = pCurrSect->GetFmt(); - SvxLRSpaceItem aLR = pSectFmt->GetLRSpace(); + const SwSectionFormat* pSectFormat = pCurrSect->GetFormat(); + SvxLRSpaceItem aLR = pSectFormat->GetLRSpace(); aLR.SetLeft(aLR.GetLeft() + nLeftDiff); aLR.SetRight(aLR.GetRight() + nRightDiff); SfxItemSet aSet(rSh.GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE, RES_COL, RES_COL, 0L); @@ -487,13 +487,13 @@ void SwView::ExecTabWin( SfxRequest& rReq ) //change the first/last column if(bSect) { - SwFmtCol aCols( pSectFmt->GetCol() ); + SwFormatCol aCols( pSectFormat->GetCol() ); long nDiffWidth = nLeftDiff + nRightDiff; ::ResizeFrameCols(aCols, aSectRect.Height(), aSectRect.Height() - nDiffWidth, nLeftDiff ); aSet.Put( aCols ); } SwSectionData aData(*pCurrSect); - rSh.UpdateSection(rSh.GetSectionFmtPos(*pSectFmt), aData, &aSet); + rSh.UpdateSection(rSh.GetSectionFormatPos(*pSectFormat), aData, &aSet); } else { SwPageDesc aDesc( rDesc ); @@ -507,19 +507,19 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aUL.SetUpper( (sal_uInt16)aLongULSpace.GetUpper() ); else aUL.SetLower( (sal_uInt16)aLongULSpace.GetLower() ); - aDesc.GetMaster().SetFmtAttr( aUL ); + aDesc.GetMaster().SetFormatAttr( aUL ); - if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) ) + if( (bHead && pHeaderFormat) || (!bHead && pFooterFormat) ) { - SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() : - pFooterFmt->GetFrmSize() ); + SwFormatFrmSize aSz( bHead ? pHeaderFormat->GetFrmSize() : + pFooterFormat->GetFrmSize() ); aSz.SetHeightSizeType( ATT_FIX_SIZE ); aSz.SetHeight(nPageHeight - aLongULSpace.GetLower() - aLongULSpace.GetUpper() ); if ( bHead ) - pHeaderFmt->SetFmtAttr( aSz ); + pHeaderFormat->SetFormatAttr( aSz ); else - pFooterFmt->SetFmtAttr( aSz ); + pFooterFormat->SetFormatAttr( aSz ); } } else @@ -527,7 +527,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxULSpaceItem aUL(RES_UL_SPACE); aUL.SetUpper((sal_uInt16)aLongULSpace.GetUpper()); aUL.SetLower((sal_uInt16)aLongULSpace.GetLower()); - aDesc.GetMaster().SetFmtAttr(aUL); + aDesc.GetMaster().SetFormatAttr(aUL); } rSh.ChgPageDesc( nDescId, aDesc ); @@ -547,7 +547,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxULSpaceItem aUL(RES_UL_SPACE); aUL.SetUpper((sal_uInt16)aLongULSpace.GetUpper()); aUL.SetLower((sal_uInt16)aLongULSpace.GetLower()); - aDesc.GetMaster().SetFmtAttr(aUL); + aDesc.GetMaster().SetFormatAttr(aUL); } rSh.ChgPageDesc( nDescId, aDesc ); } @@ -583,7 +583,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const long nRight = aLR.GetRight(); const long nWidth = nPageWidth - nLeft - nRight; - SwFmtCol aCols( rDesc.GetMaster().GetCol() ); + SwFormatCol aCols( rDesc.GetMaster().GetCol() ); aCols.Init( nCount, nGutterWidth, nWidth ); aCols.SetWishWidth( nWidth ); aCols.SetGutterWidth( nGutterWidth, nWidth ); @@ -607,7 +607,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } SwPageDesc aDesc( rDesc ); - aDesc.GetMaster().SetFmtAttr( aCols ); + aDesc.GetMaster().SetFormatAttr( aCols ); rSh.ChgPageDesc( rSh.GetCurPageDesc(), aDesc ); } break; @@ -628,7 +628,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) rSh.GetCurAttr( aSet ); const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(aSet.Get(RES_LR_SPACE)); - if ( rLR.GetTxtFirstLineOfst() < 0 ) + if ( rLR.GetTextFirstLineOfst() < 0 ) { SvxTabStop aSwTabStop( 0, SVX_TAB_ADJUST_DEFAULT ); aTabStops.Insert( aSwTabStop ); @@ -637,8 +637,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) // Populate with default tabs. ::MakeDefTabs( ::GetTabDist( rDefTabs ), aTabStops ); - SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); - if( pColl && pColl->IsAutoUpdateFmt() ) + SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); + if( pColl && pColl->IsAutoUpdateFormat() ) { SfxItemSet aTmp(GetPool(), RES_PARATR_TABSTOP, RES_PARATR_TABSTOP); aTmp.Put(aTabStops); @@ -656,10 +656,10 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxLRSpaceItem aParaMargin(static_cast<const SvxLRSpaceItem&>(pReqArgs->Get(nSlot))); aParaMargin.SetRight( aParaMargin.GetRight() - m_nRightBorderDistance ); - aParaMargin.SetTxtLeft(aParaMargin.GetTxtLeft() - m_nLeftBorderDistance ); + aParaMargin.SetTextLeft(aParaMargin.GetTextLeft() - m_nLeftBorderDistance ); aParaMargin.SetWhich( RES_LR_SPACE ); - SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); + SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); // #i23726# if (m_pNumRuleNodeFromDoc) @@ -673,12 +673,12 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SwPosition aPos(*m_pNumRuleNodeFromDoc); // #i90078# - rSh.SetIndent( static_cast< short >(aParaMargin.GetTxtLeft() - rLR.GetTxtLeft()), aPos); + rSh.SetIndent( static_cast< short >(aParaMargin.GetTextLeft() - rLR.GetTextLeft()), aPos); // #i42921# invalidate state of indent in order to get a ruler update. aParaMargin.SetWhich( nSlot ); GetViewFrame()->GetBindings().SetState( aParaMargin ); } - else if( pColl && pColl->IsAutoUpdateFmt() ) + else if( pColl && pColl->IsAutoUpdateFormat() ) { SfxItemSet aSet(GetPool(), RES_LR_SPACE, RES_LR_SPACE); aSet.Put(aParaMargin); @@ -687,7 +687,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) else rSh.SetAttrItem( aParaMargin ); - if ( aParaMargin.GetTxtFirstLineOfst() < 0 ) + if ( aParaMargin.GetTextFirstLineOfst() < 0 ) { SfxItemSet aSet( GetPool(), RES_PARATR_TABSTOP, RES_PARATR_TABSTOP ); @@ -716,7 +716,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) static_cast<const SvxTabStopItem&>(rSh.GetDefault(RES_PARATR_TABSTOP)); ::MakeDefTabs( ::GetTabDist(rDefTabs), aTabStops ); - if( pColl && pColl->IsAutoUpdateFmt()) + if( pColl && pColl->IsAutoUpdateFormat()) { SfxItemSet aSetTmp(GetPool(), RES_PARATR_TABSTOP, RES_PARATR_TABSTOP); aSetTmp.Put(aTabStops); @@ -740,8 +740,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aParaMargin.SetLower(aParaMargin.GetLower() - nLDist); aParaMargin.SetWhich( RES_UL_SPACE ); - SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); - if( pColl && pColl->IsAutoUpdateFmt() ) + SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); + if( pColl && pColl->IsAutoUpdateFormat() ) { SfxItemSet aSet(GetPool(), RES_UL_SPACE, RES_UL_SPACE); aSet.Put(aParaMargin); @@ -775,8 +775,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aULSpace.SetUpper( nUpper ); aULSpace.SetLower( nLower ); - SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); - if( pColl && pColl->IsAutoUpdateFmt() ) + SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); + if( pColl && pColl->IsAutoUpdateFormat() ) { aULSpaceSet.Put( aULSpace ); rSh.AutoUpdatePara( pColl, aULSpaceSet ); @@ -791,7 +791,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) { SvxColumnItem aColItem(static_cast<const SvxColumnItem&>(pReqArgs->Get(nSlot))); - if( m_bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) + if( m_bSetTabColFromDoc || (!bSect && rSh.GetTableFormat()) ) { OSL_ENSURE(aColItem.Count(), "ColDesc is empty!!"); @@ -858,28 +858,28 @@ void SwView::ExecTabWin( SfxRequest& rReq ) { if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY || bSect) { - SwSectionFmt *pSectFmt = 0; + SwSectionFormat *pSectFormat = 0; SfxItemSet aSet( GetPool(), RES_COL, RES_COL ); if(bSect) { SwSection *pSect = rSh.GetAnySection(); OSL_ENSURE( pSect, "Which section?"); - pSectFmt = pSect->GetFmt(); + pSectFormat = pSect->GetFormat(); } else { rSh.GetFlyFrmAttr( aSet ); } - SwFmtCol aCols( + SwFormatCol aCols( bSect ? - pSectFmt->GetCol() : - static_cast<const SwFmtCol&>(aSet.Get( RES_COL, false ))); + pSectFormat->GetCol() : + static_cast<const SwFormatCol&>(aSet.Get( RES_COL, false ))); SwRect aCurRect = rSh.GetAnyCurRect(bSect ? RECT_SECTION_PRT : RECT_FLY_PRT_EMBEDDED); const long lWidth = bVerticalWriting ? aCurRect.Height() : aCurRect.Width(); ::lcl_ConvertToCols( aColItem, lWidth, aCols ); aSet.Put( aCols ); if(bSect) - rSh.SetSectionAttr( aSet, pSectFmt ); + rSh.SetSectionAttr( aSet, pSectFormat ); else { rSh.StartAction(); @@ -897,13 +897,13 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { - SwFmtCol aCols( rDesc.GetMaster().GetCol() ); + SwFormatCol aCols( rDesc.GetMaster().GetCol() ); const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT); ::lcl_ConvertToCols( aColItem, bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width(), aCols ); SwPageDesc aDesc( rDesc ); - aDesc.GetMaster().SetFmtAttr( aCols ); + aDesc.GetMaster().SetFormatAttr( aCols ); rSh.ChgPageDesc( rSh.GetCurPageDesc(), aDesc ); } } @@ -916,7 +916,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) { SvxColumnItem aColItem(static_cast<const SvxColumnItem&>(pReqArgs->Get(nSlot))); - if( m_bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) + if( m_bSetTabColFromDoc || (!bSect && rSh.GetTableFormat()) ) { OSL_ENSURE(aColItem.Count(), "ColDesc is empty!!"); @@ -1048,8 +1048,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) { sal_uInt16 nColumnType = 0; - const SwFrmFmt& rMaster = rDesc.GetMaster(); - SwFmtCol aCol(rMaster.GetCol()); + const SwFrameFormat& rMaster = rDesc.GetMaster(); + SwFormatCol aCol(rMaster.GetCol()); const sal_uInt16 nCols = aCol.GetNumCols(); if ( nCols == 0 ) { @@ -1095,14 +1095,14 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( ( nFrmType & FrmTypeFlags::HEADER || nFrmType & FrmTypeFlags::FOOTER ) && !(nFrmType & FrmTypeFlags::COLSECT) ) { - SwFrmFmt *pFmt = const_cast<SwFrmFmt*>(nFrmType & FrmTypeFlags::HEADER ? - rDesc.GetMaster().GetHeader().GetHeaderFmt() : - rDesc.GetMaster().GetFooter().GetFooterFmt()); - if( pFmt )// #i80890# if rDesc is not the one belonging to the current page is might crash + SwFrameFormat *pFormat = const_cast<SwFrameFormat*>(nFrmType & FrmTypeFlags::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 { SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt)); aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos(); - const SvxLRSpaceItem& aLR = pFmt->GetLRSpace(); + const SvxLRSpaceItem& aLR = pFormat->GetLRSpace(); aLongLR.SetLeft ( (long)aLR.GetLeft() + (long)aRect.Left() ); aLongLR.SetRight( (nPageWidth - (long)aRect.Right() + (long)aLR.GetRight())); @@ -1268,7 +1268,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) // #i23726# if (m_pNumRuleNodeFromDoc) { - short nOffset = static_cast< short >(aLR.GetTxtLeft() + + short nOffset = static_cast< short >(aLR.GetTextLeft() + // #i42922# Mouse move of numbering label // has to consider the left indent of the paragraph m_pNumRuleNodeFromDoc->GetLeftMarginWithNum( true ) ); @@ -1358,7 +1358,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) m_nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight()); } else if ( IsTabColFromDoc() || - ( rSh.GetTableFmt() && !bFrmSelection && + ( rSh.GetTableFormat() && !bFrmSelection && !(nFrmType & FrmTypeFlags::COLSECT ) ) ) { SfxItemSet aCoreSet2( GetPool(), @@ -1386,7 +1386,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) else if ( !rSh.IsDirectlyInSection() ) { //get the page/header/footer border distance - const SwFrmFmt& rMaster = rDesc.GetMaster(); + const SwFrameFormat& rMaster = rDesc.GetMaster(); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rMaster.GetAttrSet().Get(RES_BOX)); aDistLR.SetLeft(rBox.GetDistance(SvxBoxItemLine::LEFT)); aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT)); @@ -1395,17 +1395,17 @@ void SwView::StateTabWin(SfxItemSet& rSet) if(nFrmType & FrmTypeFlags::HEADER) { rMaster.GetHeader(); - const SwFmtHeader& rHeaderFmt = rMaster.GetHeader(); - SwFrmFmt *pHeaderFmt = const_cast<SwFrmFmt*>(rHeaderFmt.GetHeaderFmt()); - if( pHeaderFmt )// #i80890# if rDesc is not the one belonging to the current page is might crash - pBox = & (const SvxBoxItem&)pHeaderFmt->GetBox(); + const SwFormatHeader& rHeaderFormat = rMaster.GetHeader(); + SwFrameFormat *pHeaderFormat = const_cast<SwFrameFormat*>(rHeaderFormat.GetHeaderFormat()); + 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 ) { - const SwFmtFooter& rFooterFmt = rMaster.GetFooter(); - SwFrmFmt *pFooterFmt = const_cast<SwFrmFmt*>(rFooterFmt.GetFooterFmt()); - if( pFooterFmt )// #i80890# if rDesc is not the one belonging to the current page is might crash - pBox = & (const SvxBoxItem&)pFooterFmt->GetBox(); + const SwFormatFooter& rFooterFormat = rMaster.GetFooter(); + SwFrameFormat *pFooterFormat = const_cast<SwFrameFormat*>(rFooterFormat.GetFooterFormat()); + if( pFooterFormat )// #i80890# if rDesc is not the one belonging to the current page is might crash + pBox = & (const SvxBoxItem&)pFooterFormat->GetBox(); } if(pBox) { @@ -1455,7 +1455,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) bFrmSelection; } bool bHasTable = ( IsTabColFromDoc() || - ( rSh.GetTableFmt() && !bFrmSelection && + ( rSh.GetTableFormat() && !bFrmSelection && !(nFrmType & FrmTypeFlags::COLSECT ) ) ); bool bTableVertical = bHasTable && rSh.IsTableVertical(); @@ -1544,9 +1544,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) sal_uInt16 nNum = 0; if(bFrmSelection) { - const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt(); - if(pFmt) - nNum = pFmt->GetCol().GetNumCols(); + const SwFrameFormat* pFormat = rSh.GetFlyFrameFormat(); + if(pFormat) + nNum = pFormat->GetCol().GetNumCols(); } else nNum = rSh.GetCurColNum(); @@ -1561,8 +1561,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) OSL_ENSURE( pSect, "Which section?"); if( pSect ) { - SwSectionFmt const *pFmt = pSect->GetFmt(); - const SwFmtCol& rCol = pFmt->GetCol(); + SwSectionFormat const *pFormat = pSect->GetFormat(); + const SwFormatCol& rCol = pFormat->GetCol(); if(rSh.IsInRightToLeftText()) nNum = rCol.GetColumns().size() - nNum; else @@ -1598,9 +1598,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) // Columns in frame if ( nNum ) { - const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt() ; + const SwFrameFormat* pFormat = rSh.GetFlyFrameFormat() ; - const SwFmtCol& rCol = pFmt->GetCol(); + const SwFormatCol& rCol = pFormat->GetCol(); if(rSh.IsInRightToLeftText()) nNum = rCol.GetColumns().size() - nNum; else @@ -1637,8 +1637,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) } else { // Columns on the page - const SwFrmFmt& rMaster = rDesc.GetMaster(); - SwFmtCol aCol(rMaster.GetCol()); + const SwFrameFormat& rMaster = rDesc.GetMaster(); + SwFormatCol aCol(rMaster.GetCol()); if(rFrameDir.GetValue() == FRMDIR_HORI_RIGHT_TOP) nNum = aCol.GetColumns().size() - nNum; else @@ -1646,7 +1646,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) SvxColumnItem aColItem(nNum); const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT, pPt); - const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rMaster.GetFmtAttr(RES_BOX)); + const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rMaster.GetFormatAttr(RES_BOX)); long nDist = rBox.GetDistance(); lcl_FillSvxColumn( @@ -1708,7 +1708,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); else if ( IsTabRowFromDoc() || - ( rSh.GetTableFmt() && !bFrmSelection && + ( rSh.GetTableFormat() && !bFrmSelection && !(nFrmType & FrmTypeFlags::COLSECT ) ) ) { SwTabCols aTabCols; @@ -1820,16 +1820,16 @@ void SwView::StateTabWin(SfxItemSet& rSet) } else { - const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt(); - const SwFmtCol* pCols = pFmt ? &pFmt->GetCol(): + const SwFrameFormat* pFormat = rSh.GetFlyFrameFormat(); + const SwFormatCol* pCols = pFormat ? &pFormat->GetCol(): &rDesc.GetMaster().GetCol(); const SwColumns& rCols = pCols->GetColumns(); sal_uInt16 nNum = rSh.GetCurOutColNum(); const sal_uInt16 nCount = std::min(sal_uInt16(nNum + 1), sal_uInt16(rCols.size())); - const SwRect aRect( rSh.GetAnyCurRect( pFmt + const SwRect aRect( rSh.GetAnyCurRect( pFormat ? RECT_FLY_PRT_EMBEDDED : RECT_PAGE_PRT, pPt )); - const SwRect aAbsRect( rSh.GetAnyCurRect( pFmt + const SwRect aAbsRect( rSh.GetAnyCurRect( pFormat ? RECT_FLY_EMBEDDED : RECT_PAGE, pPt )); @@ -1857,7 +1857,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) aRectangle.Left() += MINLAY; aRectangle.Left() += aRect.Left(); } - if(pFmt) // Range in frame - here you may up to the edge + if(pFormat) // Range in frame - here you may up to the edge aRectangle.Left() = aRectangle.Right() = 0; else { @@ -1912,9 +1912,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) } else { // Here only for table in multi-column pages and borders. - bool bSectOutTbl = bool(nFrmType & FrmTypeFlags::TABLE); + bool bSectOutTable = bool(nFrmType & FrmTypeFlags::TABLE); bool bFrame = bool(nFrmType & FrmTypeFlags::FLY_ANY); - bool bColSct = bool(nFrmType & ( bSectOutTbl + bool bColSct = bool(nFrmType & ( bSectOutTable ? FrmTypeFlags::COLSECTOUTTAB : FrmTypeFlags::COLSECT ) ); @@ -1923,25 +1923,25 @@ void SwView::StateTabWin(SfxItemSet& rSet) size_t nNum = IsTabColFromDoc() ? rSh.GetCurMouseColNum( m_aTabColFromDocPos ): rSh.GetCurOutColNum(); - const SwFrmFmt* pFmt = NULL; + const SwFrameFormat* pFormat = NULL; if( bColSct ) { - eRecType = bSectOutTbl ? RECT_OUTTABSECTION + eRecType = bSectOutTable ? RECT_OUTTABSECTION : RECT_SECTION; - const SwSection *pSect = rSh.GetAnySection( bSectOutTbl, pPt ); + const SwSection *pSect = rSh.GetAnySection( bSectOutTable, pPt ); OSL_ENSURE( pSect, "Which section?"); - pFmt = pSect->GetFmt(); + pFormat = pSect->GetFormat(); } else if( bFrame ) { - pFmt = rSh.GetFlyFrmFmt(); + pFormat = rSh.GetFlyFrameFormat(); eRecType = RECT_FLY_PRT_EMBEDDED; } - const SwFmtCol* pCols = pFmt ? &pFmt->GetCol(): + const SwFormatCol* pCols = pFormat ? &pFormat->GetCol(): &rDesc.GetMaster().GetCol(); const SwColumns& rCols = pCols->GetColumns(); - const sal_uInt16 nBorder = pFmt ? pFmt->GetBox().GetDistance() : + const sal_uInt16 nBorder = pFormat ? pFormat->GetBox().GetDistance() : rDesc.GetMaster().GetBox().GetDistance(); // RECT_FLY_PRT_EMBEDDED returns the relative position to RECT_FLY_EMBEDDED @@ -1960,7 +1960,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if( nNum > rCols.size() ) { - OSL_ENSURE( false, "wrong FmtCol is being edited!" ); + OSL_ENSURE( false, "wrong FormatCol is being edited!" ); nNum = rCols.size(); } @@ -2014,7 +2014,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) sal_uInt8 nProtect = m_pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT ); SvxProtectItem aProt(SID_RULER_PROTECT); - aProt.SetCntntProtect((nProtect & FLYPROTECT_CONTENT) != 0); + aProt.SetContentProtect((nProtect & FLYPROTECT_CONTENT) != 0); aProt.SetSizeProtect ((nProtect & FLYPROTECT_SIZE) != 0); aProt.SetPosProtect ((nProtect & FLYPROTECT_POS) != 0); rSet.Put(aProt); @@ -2022,7 +2022,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) else { SvxProtectItem aProtect(SID_RULER_PROTECT); - if(bBrowse && !(nFrmType & (FrmTypeFlags::DRAWOBJ|FrmTypeFlags::COLUMN)) && !rSh.GetTableFmt()) + if(bBrowse && !(nFrmType & (FrmTypeFlags::DRAWOBJ|FrmTypeFlags::COLUMN)) && !rSh.GetTableFormat()) { aProtect.SetSizeProtect(true); aProtect.SetPosProtect(true); @@ -2037,7 +2037,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if(bPutContentProtection) { SvxProtectItem aProtect(SID_RULER_PROTECT); - aProtect.SetCntntProtect(true); + aProtect.SetContentProtect(true); rSet.Put(aProtect); } } diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx index f57cf50171c7..7d513d4767f5 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.cxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx @@ -342,7 +342,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf case HANDLE_FIELD_AUTO_UPDATE: { bool bUpdateField = *static_cast<sal_Bool const *>(rValue.getValue()); - SwFldUpdateFlags nFlag = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true); + SwFieldUpdateFlags nFlag = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true); mpDoc->getIDocumentSettingAccess().setFieldUpdateFlags( bUpdateField ? nFlag == AUTOUPD_FIELD_AND_CHARTS ? AUTOUPD_FIELD_AND_CHARTS : @@ -353,7 +353,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf case HANDLE_CHART_AUTO_UPDATE: { bool bUpdateChart = *static_cast<sal_Bool const *>(rValue.getValue()); - SwFldUpdateFlags nFlag = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true); + SwFieldUpdateFlags nFlag = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true); mpDoc->getIDocumentSettingAccess().setFieldUpdateFlags( (nFlag == AUTOUPD_FIELD_ONLY || nFlag == AUTOUPD_FIELD_AND_CHARTS ) ? bUpdateChart ? AUTOUPD_FIELD_AND_CHARTS : @@ -896,13 +896,13 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf break; case HANDLE_FIELD_AUTO_UPDATE: { - SwFldUpdateFlags nFlags = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true); + SwFieldUpdateFlags nFlags = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true); rValue <<= nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS; } break; case HANDLE_CHART_AUTO_UPDATE: { - SwFldUpdateFlags nFlags = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true); + SwFieldUpdateFlags nFlags = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true); rValue <<= nFlags == AUTOUPD_FIELD_AND_CHARTS; } break; diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index c0490a2a39cf..35e1042485b5 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -307,11 +307,11 @@ static bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTe SwNodes& rNds = pInsDoc->GetNodes(); SwNodeIndex aIdx( rNds.GetEndOfContent(), -1 ); - SwCntntNode * pNd = aIdx.GetNode().GetCntntNode(); + SwContentNode * pNd = aIdx.GetNode().GetContentNode(); SwPosition aPos(aIdx, SwIndex(pNd, (pNd) ? pNd->Len() : 0)); bool bRet = false; - pInsDoc->getIDocumentFieldsAccess().LockExpFlds(); + pInsDoc->getIDocumentFieldsAccess().LockExpFields(); { SwDoc *const pDoc((pxCursor) ? pxCursor->GetDoc() : pxRange->GetDoc()); SwPaM aPam(pDoc->GetNodes()); @@ -331,9 +331,9 @@ static bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTe bRet = pDoc->getIDocumentContentOperations().CopyRange( *pPam, aPos, /*bCopyAll=*/false, /*bCheckPos=*/true ) || bRet; } - pInsDoc->getIDocumentFieldsAccess().UnlockExpFlds(); - if( !pInsDoc->getIDocumentFieldsAccess().IsExpFldsLocked() ) - pInsDoc->getIDocumentFieldsAccess().UpdateExpFlds(NULL, true); + pInsDoc->getIDocumentFieldsAccess().UnlockExpFields(); + if( !pInsDoc->getIDocumentFieldsAccess().IsExpFieldsLocked() ) + pInsDoc->getIDocumentFieldsAccess().UpdateExpFields(NULL, true); return bRet; } @@ -364,13 +364,13 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const OTextCursorHelper::getUnoTunnelId())); } - OUString sOnlyTxt; - OUString* pOnlyTxt = 0; + OUString sOnlyText; + OUString* pOnlyText = 0; bool bNoAttr = !pxCursor && !pxRange; if(bNoAttr) { - sOnlyTxt = OUString(xTextRange->getString()); - pOnlyTxt = &sOnlyTxt; + sOnlyText = OUString(xTextRange->getString()); + pOnlyText = &sOnlyText; } const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get(); @@ -387,8 +387,8 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const pGlosGroup->SetBaseURL( OUString() ); sal_uInt16 nRet = USHRT_MAX; - if( pOnlyTxt ) - nRet = pGlosGroup->PutText( sShortName, sLongName, *pOnlyTxt ); + if( pOnlyText ) + nRet = pGlosGroup->PutText( sShortName, sLongName, *pOnlyText ); else { pGlosGroup->ClearDoc(); diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index 5812d728102e..483c2a40e5f5 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -604,7 +604,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c case HANDLE_VIEWSET_GRAPHICS : mpViewOption->SetGraphic(bVal);break; case HANDLE_VIEWSET_TABLES : mpViewOption->SetTable(bVal); break; case HANDLE_VIEWSET_DRAWINGS : mpViewOption->SetDraw(bVal); break; - case HANDLE_VIEWSET_FIELD_COMMANDS : mpViewOption->SetFldName(bVal); break; + case HANDLE_VIEWSET_FIELD_COMMANDS : mpViewOption->SetFieldName(bVal); break; case HANDLE_VIEWSET_ANNOTATIONS : mpViewOption->SetPostIts(bVal); break; case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, true); break; case HANDLE_VIEWSET_NONPRINTING_CHARACTERS: mpViewOption->SetViewMetaChars( bVal ); break; @@ -834,7 +834,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u case HANDLE_VIEWSET_GRAPHICS : bBoolVal = mpConstViewOption->IsGraphic();break; case HANDLE_VIEWSET_TABLES : bBoolVal = mpConstViewOption->IsTable(); break; case HANDLE_VIEWSET_DRAWINGS : bBoolVal = mpConstViewOption->IsDraw(); break; - case HANDLE_VIEWSET_FIELD_COMMANDS : bBoolVal = mpConstViewOption->IsFldName(); break; + case HANDLE_VIEWSET_FIELD_COMMANDS : bBoolVal = mpConstViewOption->IsFieldName(); break; case HANDLE_VIEWSET_ANNOTATIONS : bBoolVal = mpConstViewOption->IsPostIts(); break; case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : bBoolVal = SwViewOption::IsFieldShadings(); break; case HANDLE_VIEWSET_NONPRINTING_CHARACTERS: bBoolVal = mpConstViewOption->IsViewMetaChars(); break; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index a3ea47da95aa..8a61199b9688 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -200,15 +200,15 @@ static SwPrintUIOptions * lcl_GetPrintUIOptions( return new SwPrintUIOptions( nCurrentPage, bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, rPrintData ); } -static SwTxtFmtColl *lcl_GetParaStyle(const OUString& rCollName, SwDoc* pDoc) +static SwTextFormatColl *lcl_GetParaStyle(const OUString& rCollName, SwDoc* pDoc) { - SwTxtFmtColl* pColl = pDoc->FindTxtFmtCollByName( rCollName ); + SwTextFormatColl* pColl = pDoc->FindTextFormatCollByName( rCollName ); if( !pColl ) { const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCollName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); if( USHRT_MAX != nId ) - pColl = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool( nId ); + pColl = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( nId ); } return pColl; } @@ -271,9 +271,9 @@ sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rI return nRet; GetNumberFormatter(); - if (!xNumFmtAgg.is()) // may happen if not valid or no SwDoc + if (!xNumFormatAgg.is()) // may happen if not valid or no SwDoc return 0; - Any aNumTunnel = xNumFmtAgg->queryAggregation(cppu::UnoType<XUnoTunnel>::get()); + Any aNumTunnel = xNumFormatAgg->queryAggregation(cppu::UnoType<XUnoTunnel>::get()); Reference<XUnoTunnel> xNumTunnel; aNumTunnel >>= xNumTunnel; return (xNumTunnel.is()) ? xNumTunnel->getSomething(rId) : 0; @@ -306,8 +306,8 @@ Any SAL_CALL SwXTextDocument::queryInterface( const uno::Type& rType ) throw(Run && rType != cppu::UnoType<com::sun::star::awt::XWindow>::get()) { GetNumberFormatter(); - if(xNumFmtAgg.is()) - aRet = xNumFmtAgg->queryAggregation(rType); + if(xNumFormatAgg.is()) + aRet = xNumFormatAgg->queryAggregation(rType); } return aRet; } @@ -334,10 +334,10 @@ Sequence< uno::Type > SAL_CALL SwXTextDocument::getTypes() throw(RuntimeExceptio Sequence< uno::Type > aNumTypes; GetNumberFormatter(); - if(xNumFmtAgg.is()) + if(xNumFormatAgg.is()) { const uno::Type& rProvType = cppu::UnoType<XTypeProvider>::get(); - Any aNumProv = xNumFmtAgg->queryAggregation(rProvType); + Any aNumProv = xNumFormatAgg->queryAggregation(rProvType); Reference<XTypeProvider> xNumProv; if(aNumProv >>= xNumProv) { @@ -411,11 +411,11 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell) SwXTextDocument::~SwXTextDocument() { InitNewDoc(); - if(xNumFmtAgg.is()) + if(xNumFormatAgg.is()) { Reference< XInterface > x0; - xNumFmtAgg->setDelegator(x0); - xNumFmtAgg = 0; + xNumFormatAgg->setDelegator(x0); + xNumFormatAgg = 0; } delete m_pPrintUIOptions; if (m_pRenderData && m_pRenderData->IsViewOptionAdjust()) @@ -442,33 +442,33 @@ void SwXTextDocument::GetNumberFormatter() { if(IsValid()) { - if(!xNumFmtAgg.is()) + if(!xNumFormatAgg.is()) { if ( pDocShell->GetDoc() ) { - SvNumberFormatsSupplierObj* pNumFmt = new SvNumberFormatsSupplierObj( + SvNumberFormatsSupplierObj* pNumFormat = new SvNumberFormatsSupplierObj( pDocShell->GetDoc()->GetNumberFormatter( true )); - Reference< util::XNumberFormatsSupplier > xTmp = pNumFmt; - xNumFmtAgg = Reference< XAggregation >(xTmp, UNO_QUERY); + Reference< util::XNumberFormatsSupplier > xTmp = pNumFormat; + xNumFormatAgg = Reference< XAggregation >(xTmp, UNO_QUERY); } - if(xNumFmtAgg.is()) - xNumFmtAgg->setDelegator((cppu::OWeakObject*)(SwXTextDocumentBaseClass*)this); + if(xNumFormatAgg.is()) + xNumFormatAgg->setDelegator((cppu::OWeakObject*)(SwXTextDocumentBaseClass*)this); } else { const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get(); - Any aNumTunnel = xNumFmtAgg->queryAggregation(rTunnelType); - SvNumberFormatsSupplierObj* pNumFmt = 0; + Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType); + SvNumberFormatsSupplierObj* pNumFormat = 0; Reference< XUnoTunnel > xNumTunnel; if(aNumTunnel >>= xNumTunnel) { - pNumFmt = reinterpret_cast<SvNumberFormatsSupplierObj*>( + pNumFormat = reinterpret_cast<SvNumberFormatsSupplierObj*>( xNumTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId())); } - OSL_ENSURE(pNumFmt, "No number formatter available"); - if (pNumFmt && !pNumFmt->GetNumberFormatter()) - pNumFmt->SetNumberFormatter(pDocShell->GetDoc()->GetNumberFormatter( true )); + OSL_ENSURE(pNumFormat, "No number formatter available"); + if (pNumFormat && !pNumFormat->GetNumberFormatter()) + pNumFormat->SetNumberFormatter(pDocShell->GetDoc()->GetNumberFormatter( true )); } } } @@ -774,8 +774,8 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > } else if(pSearch->bStyles) { - SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); - SwTxtFmtColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCrsr->GetDoc()); + SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); + SwTextFormatColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCrsr->GetDoc()); bool bCancel; nResult = pUnoCrsr->Find( *pSearchColl, @@ -904,9 +904,9 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > } else if(pSearch->bStyles) { - SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); + SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); //pSearch->sReplaceText - SwTxtFmtColl *pReplaceColl = 0; + SwTextFormatColl *pReplaceColl = 0; bool bCancel; nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl, eStart, eEnd, bCancel, @@ -1054,11 +1054,11 @@ static OUString lcl_CreateOutlineString( size_t nIndex, const SwOutlineNodes& rOutlineNodes, const SwNumRule* pOutlRule) { OUString sEntry; - const SwTxtNode * pTxtNd = rOutlineNodes[ nIndex ]->GetTxtNode(); - SwNumberTree::tNumberVector aNumVector = pTxtNd->GetNumberVector(); - if( pOutlRule && pTxtNd->GetNumRule()) + const SwTextNode * pTextNd = rOutlineNodes[ nIndex ]->GetTextNode(); + SwNumberTree::tNumberVector aNumVector = pTextNd->GetNumberVector(); + if( pOutlRule && pTextNd->GetNumRule()) for( sal_Int8 nLevel = 0; - nLevel <= pTxtNd->GetActualListLevel(); + nLevel <= pTextNd->GetActualListLevel(); nLevel++ ) { long nVal = aNumVector[nLevel]; @@ -1068,7 +1068,7 @@ static OUString lcl_CreateOutlineString( size_t nIndex, sEntry += "."; } sEntry += rOutlineNodes[ nIndex ]-> - GetTxtNode()->GetExpandTxt( 0, -1, false ); + GetTextNode()->GetExpandText( 0, -1, false ); return sEntry; } @@ -1392,19 +1392,19 @@ Reference< drawing::XDrawPage > SwXTextDocument::getDrawPage() throw( RuntimeEx void SwXTextDocument::Invalidate() { bObjectValid = false; - if(xNumFmtAgg.is()) + if(xNumFormatAgg.is()) { const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get(); - Any aNumTunnel = xNumFmtAgg->queryAggregation(rTunnelType); - SvNumberFormatsSupplierObj* pNumFmt = 0; + Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType); + SvNumberFormatsSupplierObj* pNumFormat = 0; Reference< XUnoTunnel > xNumTunnel; if(aNumTunnel >>= xNumTunnel) { - pNumFmt = reinterpret_cast<SvNumberFormatsSupplierObj*>( + pNumFormat = reinterpret_cast<SvNumberFormatsSupplierObj*>( xNumTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId())); - pNumFmt->SetNumberFormatter(0); + pNumFormat->SetNumberFormatter(0); } - OSL_ENSURE(pNumFmt, "No number formatter available"); + OSL_ENSURE(pNumFormat, "No number formatter available"); } InitNewDoc(); pDocShell = 0; @@ -1425,8 +1425,8 @@ void SwXTextDocument::InitNewDoc() // first invalidate all collections, then delete references and Set to zero if(pxXTextTables) { - XNameAccess* pTbls = pxXTextTables->get(); - static_cast<SwXTextTables*>(pTbls)->Invalidate(); + XNameAccess* pTables = pxXTextTables->get(); + static_cast<SwXTextTables*>(pTables)->Invalidate(); delete pxXTextTables; pxXTextTables = 0; } @@ -1461,21 +1461,21 @@ void SwXTextDocument::InitNewDoc() pBodyText = 0; } - if(xNumFmtAgg.is()) + if(xNumFormatAgg.is()) { const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get(); - Any aNumTunnel = xNumFmtAgg->queryAggregation(rTunnelType); - SvNumberFormatsSupplierObj* pNumFmt = 0; + Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType); + SvNumberFormatsSupplierObj* pNumFormat = 0; Reference< XUnoTunnel > xNumTunnel; if(aNumTunnel >>= xNumTunnel) { - pNumFmt = reinterpret_cast<SvNumberFormatsSupplierObj*>( + pNumFormat = reinterpret_cast<SvNumberFormatsSupplierObj*>( xNumTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId())); } - OSL_ENSURE(pNumFmt, "No number formatter available"); - if (pNumFmt) - pNumFmt->SetNumberFormatter(0); + OSL_ENSURE(pNumFormat, "No number formatter available"); + if (pNumFormat) + pNumFormat->SetNumberFormatter(0); } if(pxXTextFieldTypes) @@ -1523,16 +1523,16 @@ void SwXTextDocument::InitNewDoc() if(pxXFootnotes) { - XIndexAccess* pFtn = pxXFootnotes->get(); - static_cast<SwXFootnotes*>(pFtn)->Invalidate(); + XIndexAccess* pFootnote = pxXFootnotes->get(); + static_cast<SwXFootnotes*>(pFootnote)->Invalidate(); delete pxXFootnotes; pxXFootnotes = 0; } if(pxXEndnotes) { - XIndexAccess* pFtn = pxXEndnotes->get(); - static_cast<SwXFootnotes*>(pFtn)->Invalidate(); + XIndexAccess* pFootnote = pxXEndnotes->get(); + static_cast<SwXFootnotes*>(pFootnote)->Invalidate(); delete pxXEndnotes; pxXEndnotes = 0; } @@ -2602,7 +2602,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( } // #122919# Force field update before PDF export - pViewShell->SwViewShell::UpdateFlds(true); + pViewShell->SwViewShell::UpdateFields(true); if( bStateChanged ) pRenderDocShell->EnableSetModified( true ); @@ -3342,10 +3342,10 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( //USER STYLES - const SwCharFmts *pFmts = pDoc->GetCharFmts(); - for(size_t i = 0; i < pFmts->size(); ++i) + const SwCharFormats *pFormats = pDoc->GetCharFormats(); + for(size_t i = 0; i < pFormats->size(); ++i) { - const SwAttrSet &rAttrSet = (*pFmts)[i]->GetAttrSet(); + const SwAttrSet &rAttrSet = (*pFormats)[i]->GetAttrSet(); LanguageType nLang = LANGUAGE_DONTKNOW; if (bLatin) { @@ -3367,7 +3367,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( } } - const SwTxtFmtColls *pColls = pDoc->GetTxtFmtColls(); + const SwTextFormatColls *pColls = pDoc->GetTextFormatColls(); for (size_t i = 0; i < pColls->size(); ++i) { const SwAttrSet &rAttrSet = (*pColls)[i]->GetAttrSet(); @@ -3533,49 +3533,49 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName) { sSuffix += "table"; - Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( + Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper( pxDoc->getTextTables(), sToCompare, sSuffix ); - Reference< XPropertySet > xRet(xTbls, UNO_QUERY); + Reference< XPropertySet > xRet(xTables, UNO_QUERY); aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get()); } else if(sToCompare == sFrames) { sSuffix += "frame"; - Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( + Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper( pxDoc->getTextFrames(), sToCompare, sSuffix ); - Reference< XPropertySet > xRet(xTbls, UNO_QUERY); + Reference< XPropertySet > xRet(xTables, UNO_QUERY); aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get()); } else if(sToCompare == sSections) { sSuffix += "region"; - Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( + Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper( pxDoc->getTextSections(), sToCompare, sSuffix ); - Reference< XPropertySet > xRet(xTbls, UNO_QUERY); + Reference< XPropertySet > xRet(xTables, UNO_QUERY); aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get()); } else if(sToCompare == sGraphics) { sSuffix += "graphic"; - Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( + Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper( pxDoc->getGraphicObjects(), sToCompare, sSuffix ); - Reference< XPropertySet > xRet(xTbls, UNO_QUERY); + Reference< XPropertySet > xRet(xTables, UNO_QUERY); aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get()); } else if(sToCompare == sOLEs) { sSuffix += "ole"; - Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( + Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper( pxDoc->getEmbeddedObjects(), sToCompare, sSuffix ); - Reference< XPropertySet > xRet(xTbls, UNO_QUERY); + Reference< XPropertySet > xRet(xTables, UNO_QUERY); aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get()); } else if(sToCompare == sOutlines) { sSuffix += "outline"; - Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( + Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper( *pxDoc, sToCompare, sSuffix ); - Reference< XPropertySet > xRet(xTbls, UNO_QUERY); + Reference< XPropertySet > xRet(xTables, UNO_QUERY); aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get()); } else if(sToCompare == sBookmarks) @@ -4119,12 +4119,12 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions) // to avoid unnecessary reformatting the view options related to the content // below should only change if necessary, that is if respective content is present const bool bContainsHiddenChars = m_pShell->GetDoc()->ContainsHiddenChars(); - const SwFieldType* pFldType = m_pShell->GetDoc()->getIDocumentFieldsAccess().GetSysFldType( RES_HIDDENTXTFLD ); - const bool bContainsHiddenFields = pFldType && pFldType->HasWriterListeners(); - pFldType = m_pShell->GetDoc()->getIDocumentFieldsAccess().GetSysFldType( RES_HIDDENPARAFLD ); - const bool bContainsHiddenParagraphs = pFldType && pFldType->HasWriterListeners(); - pFldType = m_pShell->GetDoc()->getIDocumentFieldsAccess().GetSysFldType( RES_JUMPEDITFLD ); - const bool bContainsPlaceHolders = pFldType && pFldType->HasWriterListeners(); + const SwFieldType* pFieldType = m_pShell->GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( RES_HIDDENTXTFLD ); + const bool bContainsHiddenFields = pFieldType && pFieldType->HasWriterListeners(); + pFieldType = m_pShell->GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( RES_HIDDENPARAFLD ); + const bool bContainsHiddenParagraphs = pFieldType && pFieldType->HasWriterListeners(); + pFieldType = m_pShell->GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( RES_JUMPEDITFLD ); + const bool bContainsPlaceHolders = pFieldType && pFieldType->HasWriterListeners(); const bool bContainsFields = m_pShell->IsAnyFieldInDoc(); SwViewOption aRenderViewOptions( m_aOldViewOptions ); @@ -4156,7 +4156,7 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions) } if (bContainsFields) - aRenderViewOptions.SetFldName( false ); + aRenderViewOptions.SetFieldName( false ); // we need to set this flag in order to get to see the visible effect of // some of the above settings (needed for correct rendering) diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 3a2820f18d1c..b81fd2ecc647 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -338,8 +338,8 @@ uno::Any SwXTextView::getSelection() { if(rSh.GetTableCrsr()) { - OSL_ENSURE(rSh.GetTableFmt(), "not a table format?"); - uno::Reference< text::XTextTableCursor > xCrsr = new SwXTextTableCursor(*rSh.GetTableFmt(), + OSL_ENSURE(rSh.GetTableFormat(), "not a table format?"); + uno::Reference< text::XTextTableCursor > xCrsr = new SwXTextTableCursor(*rSh.GetTableFormat(), rSh.GetTableCrsr()); aRef = uno::Reference< uno::XInterface > (xCrsr, uno::UNO_QUERY); break; @@ -358,31 +358,31 @@ uno::Any SwXTextView::getSelection() break; case SHELL_MODE_FRAME : { - SwFrmFmt *const pFmt = rSh.GetFlyFrmFmt(); - if (pFmt) + SwFrameFormat *const pFormat = rSh.GetFlyFrameFormat(); + if (pFormat) { aRef = SwXTextFrame::CreateXTextFrame( - *pFmt->GetDoc(), pFmt); + *pFormat->GetDoc(), pFormat); } } break; case SHELL_MODE_GRAPHIC : { - SwFrmFmt *const pFmt = rSh.GetFlyFrmFmt(); - if (pFmt) + SwFrameFormat *const pFormat = rSh.GetFlyFrameFormat(); + if (pFormat) { aRef = SwXTextGraphicObject::CreateXTextGraphicObject( - *pFmt->GetDoc(), pFmt); + *pFormat->GetDoc(), pFormat); } } break; case SHELL_MODE_OBJECT : { - SwFrmFmt *const pFmt = rSh.GetFlyFrmFmt(); - if (pFmt) + SwFrameFormat *const pFormat = rSh.GetFlyFrameFormat(); + if (pFormat) { aRef = SwXTextEmbeddedObject::CreateXTextEmbeddedObject( - *pFmt->GetDoc(), pFmt); + *pFormat->GetDoc(), pFormat); } } break; @@ -550,7 +550,7 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto const SwRubyListEntry* pEntry = &aList[n]; const OUString& rEntryText = pEntry->GetText(); - const SwFmtRuby& rAttr = pEntry->GetRubyAttr(); + const SwFormatRuby& rAttr = pEntry->GetRubyAttr(); pRet[n].realloc(5); PropertyValue* pValues = pRet[n].getArray(); @@ -559,7 +559,7 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto pValues[1].Name = UNO_NAME_RUBY_TEXT; pValues[1].Value <<= rAttr.GetText(); pValues[2].Name = UNO_NAME_RUBY_CHAR_STYLE_NAME; - SwStyleNameMapper::FillProgName(rAttr.GetCharFmtName(), aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillProgName(rAttr.GetCharFormatName(), aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); pValues[2].Value <<= aString; pValues[3].Name = UNO_NAME_RUBY_ADJUST; pValues[3].Value <<= (sal_Int16)rAttr.GetAdjustment(); @@ -616,8 +616,8 @@ void SAL_CALL SwXTextView::setRubyList( : SwStyleNameMapper::GetPoolIdFromUIName(sName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); - pEntry->GetRubyAttr().SetCharFmtName( sName ); - pEntry->GetRubyAttr().SetCharFmtId( nPoolId ); + pEntry->GetRubyAttr().SetCharFormatName( sName ); + pEntry->GetRubyAttr().SetCharFormatId( nPoolId ); } } else if(pProperties[nProp].Name == UNO_NAME_RUBY_ADJUST) @@ -916,7 +916,7 @@ awt::Point SwXTextViewCursor::getPosition() throw( uno::RuntimeException, std::e const SwWrtShell& rSh = m_pView->GetWrtShell(); const SwRect aCharRect(rSh.GetCharRect()); - const SwFrmFmt& rMaster = rSh.GetPageDesc( rSh.GetCurPageDesc() ).GetMaster(); + const SwFrameFormat& rMaster = rSh.GetPageDesc( rSh.GetCurPageDesc() ).GetMaster(); const SvxULSpaceItem& rUL = rMaster.GetULSpace(); const long nY = aCharRect.Top() - (rUL.GetUpper() + DOCUMENTBORDER); @@ -1113,9 +1113,9 @@ void SwXTextViewCursor::gotoRange( pSrcNode = &aPam.GetNode(); } } - else if (pPara && pPara->GetTxtNode()) + else if (pPara && pPara->GetTextNode()) { - pSrcNode = pPara->GetTxtNode(); + pSrcNode = pPara->GetTextNode(); } const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : 0; @@ -1494,7 +1494,7 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); SwNode& rNode = pShellCrsr->GetNode(); - if (rNode.IsTxtNode()) + if (rNode.IsTextNode()) { SwUnoCursorHelper::SetPropertyValue( *pShellCrsr, *m_pPropSet, rPropertyName, aValue ); diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index 67479ebb562c..513a98a8b8db 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -59,7 +59,7 @@ using namespace com::sun::star; -TYPEINIT2(SwFmtCharFmt,SfxPoolItem,SwClient); +TYPEINIT2(SwFormatCharFormat,SfxPoolItem,SwClient); // query the attribute descriptions void SwAttrSet::GetPresentation( @@ -92,7 +92,7 @@ void SwAttrSet::GetPresentation( } } -bool SwFmtCharFmt::GetPresentation +bool SwFormatCharFormat::GetPresentation ( SfxItemPresentation ePres, SfxMapUnit eCoreUnit, @@ -101,12 +101,12 @@ bool SwFmtCharFmt::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - const SwCharFmt *pCharFmt = GetCharFmt(); - if ( pCharFmt ) + const SwCharFormat *pCharFormat = GetCharFormat(); + if ( pCharFormat ) { OUString aStr; rText = OUString( SW_RESSTR( STR_CHARFMT ) ); - pCharFmt->GetPresentation( ePres, eCoreUnit, ePresUnit, aStr ); + pCharFormat->GetPresentation( ePres, eCoreUnit, ePresUnit, aStr ); rText = rText + "(" + aStr + ")"; } else @@ -114,7 +114,7 @@ bool SwFmtCharFmt::GetPresentation return true; } -bool SwFmtAutoFmt::GetPresentation +bool SwFormatAutoFormat::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -127,7 +127,7 @@ bool SwFmtAutoFmt::GetPresentation return true; } -bool SwFmtINetFmt::GetPresentation +bool SwFormatINetFormat::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -140,7 +140,7 @@ bool SwFmtINetFmt::GetPresentation return true; } -bool SwFmtRuby::GetPresentation( SfxItemPresentation /*ePres*/, +bool SwFormatRuby::GetPresentation( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString &rText, const IntlWrapper* /*pIntl*/ ) const { @@ -148,7 +148,7 @@ bool SwFmtRuby::GetPresentation( SfxItemPresentation /*ePres*/, return true; } -bool SwFmtDrop::GetPresentation +bool SwFormatDrop::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -223,7 +223,7 @@ bool SwParaConnectBorderItem::GetPresentation // Frame attribute -bool SwFmtFrmSize::GetPresentation +bool SwFormatFrmSize::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit eCoreUnit, @@ -263,9 +263,9 @@ bool SwFmtFrmSize::GetPresentation } //Header for page formats. -//Client of FrmFmt which describes the header. +//Client of FrameFormat which describes the header. -bool SwFmtHeader::GetPresentation +bool SwFormatHeader::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -274,15 +274,15 @@ bool SwFmtHeader::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - const sal_uInt16 nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER; + const sal_uInt16 nId = GetHeaderFormat() ? STR_HEADER : STR_NO_HEADER; rText = SW_RESSTR( nId ); return true; } //Footer for page formats. -//Client of FrmFmt which describes the footer. +//Client of FrameFormat which describes the footer. -bool SwFmtFooter::GetPresentation +bool SwFormatFooter::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -291,12 +291,12 @@ bool SwFmtFooter::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - const sal_uInt16 nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER; + const sal_uInt16 nId = GetFooterFormat() ? STR_FOOTER : STR_NO_FOOTER; rText = SW_RESSTR( nId ); return true; } -bool SwFmtSurround::GetPresentation +bool SwFormatSurround::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -340,7 +340,7 @@ bool SwFmtSurround::GetPresentation //VertOrientation, how and by what orientate the FlyFrm in the vertical? -bool SwFmtVertOrient::GetPresentation +bool SwFormatVertOrient::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit eCoreUnit, @@ -386,7 +386,7 @@ bool SwFmtVertOrient::GetPresentation //HoriOrientation, how and by what orientate the FlyFrm in the horizontal? -bool SwFmtHoriOrient::GetPresentation +bool SwFormatHoriOrient::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit eCoreUnit, @@ -432,7 +432,7 @@ bool SwFmtHoriOrient::GetPresentation // FlyAnchor, Anchor of the free-flying frame -bool SwFmtAnchor::GetPresentation +bool SwFormatAnchor::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -460,7 +460,7 @@ bool SwFmtAnchor::GetPresentation return true; } -bool SwFmtPageDesc::GetPresentation +bool SwFormatPageDesc::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -479,7 +479,7 @@ bool SwFmtPageDesc::GetPresentation //The ColumnDescriptor -bool SwFmtCol::GetPresentation +bool SwFormatCol::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit eCoreUnit, @@ -507,7 +507,7 @@ bool SwFmtCol::GetPresentation //URL's and maps -bool SwFmtURL::GetPresentation +bool SwFormatURL::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -534,7 +534,7 @@ bool SwFmtURL::GetPresentation return true; } -bool SwFmtEditInReadonly::GetPresentation +bool SwFormatEditInReadonly::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -549,15 +549,15 @@ bool SwFmtEditInReadonly::GetPresentation return true; } -void SwFmtEditInReadonly::dumpAsXml(xmlTextWriterPtr pWriter) const +void SwFormatEditInReadonly::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtEditInReadonly")); + xmlTextWriterStartElement(pWriter, BAD_CAST("swFormatEditInReadonly")); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr())); xmlTextWriterEndElement(pWriter); } -bool SwFmtLayoutSplit::GetPresentation +bool SwFormatLayoutSplit::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -571,7 +571,7 @@ bool SwFmtLayoutSplit::GetPresentation return true; } -bool SwFmtRowSplit::GetPresentation +bool SwFormatRowSplit::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -583,7 +583,7 @@ bool SwFmtRowSplit::GetPresentation return false; } -bool SwFmtFtnEndAtTxtEnd::GetPresentation +bool SwFormatFootnoteEndAtTextEnd::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -595,7 +595,7 @@ bool SwFmtFtnEndAtTxtEnd::GetPresentation return true; } -bool SwFmtChain::GetPresentation +bool SwFormatChain::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -619,7 +619,7 @@ bool SwFmtChain::GetPresentation return true; } -bool SwFmtLineNumber::GetPresentation +bool SwFormatLineNumber::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -828,7 +828,7 @@ bool SwDrawModeGrf::GetPresentation( return true; } -bool SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation ePres, +bool SwFormatFollowTextFlow::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString &rText, @@ -843,9 +843,9 @@ bool SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation ePres, return true; } -void SwFmtFollowTextFlow::dumpAsXml(xmlTextWriterPtr pWriter) const +void SwFormatFollowTextFlow::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtFollowTextFlow")); + xmlTextWriterStartElement(pWriter, BAD_CAST("swFormatFollowTextFlow")); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr())); xmlTextWriterEndElement(pWriter); diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 85bd0b19ceda..f79b378abc98 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -163,7 +163,7 @@ namespace pCntType, p->sText, INetURLObject::decode( - p->rINetAttr.GetINetFmt().GetValue(), + p->rINetAttr.GetINetFormat().GetValue(), INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ), &p->rINetAttr, @@ -198,7 +198,7 @@ bool SwContent::IsProtect() const bool SwPostItContent::IsProtect() const { if (mbPostIt) - return pFld->IsProtect(); + return pField->IsProtect(); else return false; } @@ -261,7 +261,7 @@ void SwContentType::Init(bool* pbInvalidateWindow) case CONTENT_TYPE_TABLE : sTypeToken = "table"; - nMemberCount = static_cast<sal_uInt16>(pWrtShell->GetTblFrmFmtCount(true)); + nMemberCount = static_cast<sal_uInt16>(pWrtShell->GetTableFrameFormatCount(true)); bEdit = true; break; @@ -310,31 +310,31 @@ void SwContentType::Init(bool* pbInvalidateWindow) pMember = new SwContentArr; } const Point aNullPt; - nMemberCount = pWrtShell->GetSectionFmtCount(); + nMemberCount = pWrtShell->GetSectionFormatCount(); for(sal_uInt16 i = 0; i < nMemberCount; i++) { - const SwSectionFmt* pFmt; + const SwSectionFormat* pFormat; SectionType eTmpType; - if( (pFmt = &pWrtShell->GetSectionFmt(i))->IsInNodesArr() && - (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION + if( (pFormat = &pWrtShell->GetSectionFormat(i))->IsInNodesArr() && + (eTmpType = pFormat->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { const OUString& rSectionName = - pFmt->GetSection()->GetSectionName(); + pFormat->GetSection()->GetSectionName(); sal_uInt8 nLevel = 0; - SwSectionFmt* pParentFmt = pFmt->GetParent(); - while(pParentFmt) + SwSectionFormat* pParentFormat = pFormat->GetParent(); + while(pParentFormat) { nLevel++; - pParentFmt = pParentFmt->GetParent(); + pParentFormat = pParentFormat->GetParent(); } SwContent* pCnt = new SwRegionContent(this, rSectionName, nLevel, - pFmt->FindLayoutRect( false, &aNullPt ).Top()); + pFormat->FindLayoutRect( false, &aNullPt ).Top()); SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, 0 ); - if( !pFmt->GetInfo( aAskItem ) && + if( !pFormat->GetInfo( aAskItem ) && !aAskItem.pObject ) // not visible pCnt->SetInvisible(); pMember->insert(pCnt); @@ -400,18 +400,18 @@ void SwContentType::Init(bool* pbInvalidateWindow) { for(SwPostItMgr::const_iterator i = aMgr->begin(); i != aMgr->end(); ++i) { - if ( (*i)->GetBroadCaster()->ISA(SwFmtFld)) // SwPostit + if ( (*i)->GetBroadCaster()->ISA(SwFormatField)) // SwPostit { - const SwFmtFld* aFmtFld = static_cast<const SwFmtFld*>((*i)->GetBroadCaster()); - if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() && + const SwFormatField* aFormatField = static_cast<const SwFormatField*>((*i)->GetBroadCaster()); + if (aFormatField->GetTextField() && aFormatField->IsFieldInDoc() && (*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE ) { - OUString sEntry = aFmtFld->GetField()->GetPar2(); + OUString sEntry = aFormatField->GetField()->GetPar2(); sEntry = RemoveNewline(sEntry); SwPostItContent* pCnt = new SwPostItContent( this, sEntry, - aFmtFld, + aFormatField, nMemberCount); pMember->insert(pCnt); nMemberCount++; @@ -531,18 +531,18 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) case CONTENT_TYPE_TABLE : { - OSL_ENSURE(nMemberCount == static_cast<sal_uInt16>(pWrtShell->GetTblFrmFmtCount(true)), + OSL_ENSURE(nMemberCount == static_cast<sal_uInt16>(pWrtShell->GetTableFrameFormatCount(true)), "MemberCount differs"); Point aNullPt; - nMemberCount = static_cast<sal_uInt16>(pWrtShell->GetTblFrmFmtCount(true)); + nMemberCount = static_cast<sal_uInt16>(pWrtShell->GetTableFrameFormatCount(true)); for(sal_uInt16 i = 0; i < nMemberCount; i++) { - const SwFrmFmt& rTblFmt = pWrtShell->GetTblFrmFmt(i, true); - const OUString sTblName( rTblFmt.GetName() ); + const SwFrameFormat& rTableFormat = pWrtShell->GetTableFrameFormat(i, true); + const OUString sTableName( rTableFormat.GetName() ); - SwContent* pCnt = new SwContent(this, sTblName, - rTblFmt.FindLayoutRect(false, &aNullPt).Top() ); - if( !rTblFmt.GetInfo( aAskItem ) && + SwContent* pCnt = new SwContent(this, sTableName, + rTableFormat.FindLayoutRect(false, &aNullPt).Top() ); + if( !rTableFormat.GetInfo( aAskItem ) && !aAskItem.pObject ) // not visible pCnt->SetInvisible(); @@ -569,26 +569,26 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) nMemberCount = pWrtShell->GetFlyCount(eType, /*bIgnoreTextBoxes=*/true); for(size_t i = 0; i < nMemberCount; ++i) { - const SwFrmFmt* pFrmFmt = pWrtShell->GetFlyNum(i,eType,/*bIgnoreTextBoxes=*/true); - const OUString sFrmName = pFrmFmt->GetName(); + const SwFrameFormat* pFrameFormat = pWrtShell->GetFlyNum(i,eType,/*bIgnoreTextBoxes=*/true); + const OUString sFrmName = pFrameFormat->GetName(); SwContent* pCnt; if(CONTENT_TYPE_GRAPHIC == nContentType) { OUString sLink; - pWrtShell->GetGrfNms( &sLink, 0, static_cast<const SwFlyFrmFmt*>( pFrmFmt)); + pWrtShell->GetGrfNms( &sLink, 0, static_cast<const SwFlyFrameFormat*>( pFrameFormat)); pCnt = new SwGraphicContent(this, sFrmName, INetURLObject::decode( sLink, INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ), - pFrmFmt->FindLayoutRect(false, &aNullPt).Top()); + pFrameFormat->FindLayoutRect(false, &aNullPt).Top()); } else { pCnt = new SwContent(this, sFrmName, - pFrmFmt->FindLayoutRect(false, &aNullPt).Top() ); + pFrameFormat->FindLayoutRect(false, &aNullPt).Top() ); } - if( !pFrmFmt->GetInfo( aAskItem ) && + if( !pFrameFormat->GetInfo( aAskItem ) && !aAskItem.pObject ) // not visible pCnt->SetInvisible(); pMember->insert(pCnt); @@ -618,29 +618,29 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) case CONTENT_TYPE_REGION : { const Point aNullPt; - nMemberCount = pWrtShell->GetSectionFmtCount(); + nMemberCount = pWrtShell->GetSectionFormatCount(); for(sal_uInt16 i = 0; i < nMemberCount; i++) { - const SwSectionFmt* pFmt; + const SwSectionFormat* pFormat; SectionType eTmpType; - if( (pFmt = &pWrtShell->GetSectionFmt(i))->IsInNodesArr() && - (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION + if( (pFormat = &pWrtShell->GetSectionFormat(i))->IsInNodesArr() && + (eTmpType = pFormat->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { - OUString sSectionName = pFmt->GetSection()->GetSectionName(); + OUString sSectionName = pFormat->GetSection()->GetSectionName(); sal_uInt8 nLevel = 0; - SwSectionFmt* pParentFmt = pFmt->GetParent(); - while(pParentFmt) + SwSectionFormat* pParentFormat = pFormat->GetParent(); + while(pParentFormat) { nLevel++; - pParentFmt = pParentFmt->GetParent(); + pParentFormat = pParentFormat->GetParent(); } SwContent* pCnt = new SwRegionContent(this, sSectionName, nLevel, - pFmt->FindLayoutRect( false, &aNullPt ).Top()); - if( !pFmt->GetInfo( aAskItem ) && + pFormat->FindLayoutRect( false, &aNullPt ).Top()); + if( !pFormat->GetInfo( aAskItem ) && !aAskItem.pObject ) // not visible pCnt->SetInvisible(); pMember->insert(pCnt); @@ -708,18 +708,18 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) { for(SwPostItMgr::const_iterator i = aMgr->begin(); i != aMgr->end(); ++i) { - if ( (*i)->GetBroadCaster()->ISA(SwFmtFld)) // SwPostit + if ( (*i)->GetBroadCaster()->ISA(SwFormatField)) // SwPostit { - const SwFmtFld* aFmtFld = static_cast<const SwFmtFld*>((*i)->GetBroadCaster()); - if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() && + const SwFormatField* aFormatField = static_cast<const SwFormatField*>((*i)->GetBroadCaster()); + if (aFormatField->GetTextField() && aFormatField->IsFieldInDoc() && (*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE ) { - OUString sEntry = aFmtFld->GetField()->GetPar2(); + OUString sEntry = aFormatField->GetField()->GetPar2(); sEntry = RemoveNewline(sEntry); SwPostItContent* pCnt = new SwPostItContent( this, sEntry, - aFmtFld, + aFormatField, nMemberCount); pMember->insert(pCnt); nMemberCount++; @@ -752,8 +752,8 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) SwContact* pContact = static_cast<SwContact*>(pTemp->GetUserCall()); long nYPos = 0; const Point aNullPt; - if(pContact && pContact->GetFmt()) - nYPos = pContact->GetFmt()->FindLayoutRect(false, &aNullPt).Top(); + if(pContact && pContact->GetFormat()) + nYPos = pContact->GetFormat()->FindLayoutRect(false, &aNullPt).Top(); SwContent* pCnt = new SwContent( this, pTemp->GetName(), @@ -784,7 +784,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, const ResId& rResId) , sSpace(OUString(" ")) , sRemoveIdx(SW_RES(ST_REMOVE_INDEX)) , sUpdateIdx(SW_RES(ST_UPDATE)) - , sUnprotTbl(SW_RES(ST_REMOVE_TBL_PROTECTION)) + , sUnprotTable(SW_RES(ST_REMOVE_TBL_PROTECTION)) , sRename(SW_RES(ST_RENAME)) , sReadonlyIdx(SW_RES(ST_READONLY_IDX)) , sInvisible(SW_RES(ST_INVISIBLE)) @@ -916,14 +916,14 @@ OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const { if( pActiveShell && pActiveShell->GetDoc() ) { - const SwFlyFrmFmt* pFrmFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0); - if( pFrmFmt ) + const SwFlyFrameFormat* pFrameFormat = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0); + if( pFrameFormat ) { -// SwNodeIndex aIdx( *(pFrmFmt->GetCntnt().GetCntntIdx()), 1 ); +// SwNodeIndex aIdx( *(pFrameFormat->GetContent().GetContentIdx()), 1 ); // const SwGrfNode* pGrfNd = aIdx.GetNode().GetGrfNode(); // if( pGrfNd ) // return pGrfNd->GetAlternateText(); - return pFrmFmt->GetObjTitle(); + return pFrameFormat->GetObjTitle(); } } } @@ -932,9 +932,9 @@ OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const case CONTENT_TYPE_FRAME : { //Can't find the GetAlternateText function. Need to verify again. - const SwFlyFrmFmt* pFlyFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0); - if( pFlyFmt ) - return pFlyFmt->/*GetAlternateText*/GetName(); + const SwFlyFrameFormat* pFlyFormat = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0); + if( pFlyFormat ) + return pFlyFormat->/*GetAlternateText*/GetName(); } break; } @@ -1009,9 +1009,9 @@ OUString SwContentTree::GetEntryLongDescription( SvTreeListEntry* pEntry ) const case CONTENT_TYPE_FRAME : { //Can't find the function "GetLongDescription". Need to verify again. - const SwFlyFrmFmt* pFlyFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0); - if( pFlyFmt ) - return pFlyFmt->GetDescription(); + const SwFlyFrameFormat* pFlyFormat = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0); + if( pFlyFormat ) + return pFlyFormat->GetDescription(); } break; } @@ -1214,10 +1214,10 @@ PopupMenu* SwContentTree::CreateContextMenu() { bSubPop4 = true; pSubPop4->InsertItem(403, aContextStrings[ST_EDIT_ENTRY - ST_CONTEXT_FIRST]); - pSubPop4->InsertItem(404, sUnprotTbl); + pSubPop4->InsertItem(404, sUnprotTable); bool bFull = false; - OUString sTblName = static_cast<SwContent*>(pEntry->GetUserData())->GetName(); - bool bProt = pActiveShell->HasTblAnyProtection( &sTblName, &bFull ); + OUString sTableName = static_cast<SwContent*>(pEntry->GetUserData())->GetName(); + bool bProt = pActiveShell->HasTableAnyProtection( &sTableName, &bFull ); pSubPop4->EnableItem(403, !bFull ); pSubPop4->EnableItem(404, bProt ); pSubPop4->InsertItem(501, aContextStrings[ST_DELETE_ENTRY - ST_CONTEXT_FIRST]); @@ -1791,14 +1791,14 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer, if( pWrtShell->IsOutlineCopyable( nPos ) ) { const SwNumRule* pOutlRule = pWrtShell->GetOutlineNumRule(); - const SwTxtNode* pTxtNd = + const SwTextNode* pTextNd = pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNode(nPos); - if( pTxtNd && pOutlRule && pTxtNd->IsNumbered()) + if( pTextNd && pOutlRule && pTextNd->IsNumbered()) { SwNumberTree::tNumberVector aNumVector = - pTxtNd->GetNumberVector(); + pTextNd->GetNumberVector(); for( sal_Int8 nLevel = 0; - nLevel <= pTxtNd->GetActualListLevel(); + nLevel <= pTextNd->GetActualListLevel(); nLevel++ ) { const SwNumberTree::tSwNumTreeNumber nVal = aNumVector[nLevel] + 1; @@ -3346,7 +3346,7 @@ void SwContentTree::GotoContent(SwContent* pCnt) *static_cast<SwURLFieldContent*>(pCnt)->GetINetAttr() )) { pActiveShell->Right( CRSR_SKIP_CHARS, true, 1, false); - pActiveShell->SwCrsrShell::SelectTxtAttr( RES_TXTATR_INETFMT, true ); + pActiveShell->SwCrsrShell::SelectTextAttr( RES_TXTATR_INETFMT, true ); } } @@ -3366,7 +3366,7 @@ void SwContentTree::GotoContent(SwContent* pCnt) case CONTENT_TYPE_POSTIT: pActiveShell->GetView().GetPostItMgr()->AssureStdModeAtShell(); if (static_cast<SwPostItContent*>(pCnt)->IsPostIt()) - pActiveShell->GotoFld(*static_cast<SwPostItContent*>(pCnt)->GetPostIt()); + pActiveShell->GotoFormatField(*static_cast<SwPostItContent*>(pCnt)->GetPostIt()); else pActiveShell->GetView().GetDocShell()->GetWrtShell()->GotoRedline( pActiveShell->GetView().GetDocShell()->GetWrtShell()->FindRedlineOfData(static_cast<SwPostItContent*>(pCnt)->GetRedline()->GetRedlineData())); diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index eba6232f3bba..e068da231e33 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1317,16 +1317,16 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen aFileUrl.SetSmartURL( sFileName ); OUString sSectionName(aFileUrl.GetLastName( INetURLObject::DECODE_UNAMBIGUOUS).getToken(0, sfx2::cTokenSeparator)); - sal_uInt16 nSectCount = rSh.GetSectionFmtCount(); + sal_uInt16 nSectCount = rSh.GetSectionFormatCount(); OUString sTempSectionName(sSectionName); sal_uInt16 nAddNumber = 0; sal_uInt16 nCount = 0; // if applicable: add index if the range name is already in use. while ( nCount < nSectCount ) { - const SwSectionFmt& rFmt = rSh.GetSectionFmt(nCount); - if ((rFmt.GetSection()->GetSectionName() == sTempSectionName) - && rFmt.IsInNodesArr()) + const SwSectionFormat& rFormat = rSh.GetSectionFormat(nCount); + if ((rFormat.GetSection()->GetSectionName() == sTempSectionName) + && rFormat.IsInNodesArr()) { nCount = 0; nAddNumber++; diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx index 18744550338d..cfadf1b74209 100644 --- a/sw/source/uibase/utlui/initui.cxx +++ b/sw/source/uibase/utlui/initui.cxx @@ -155,7 +155,7 @@ void _FinitUI() DELETEZ(pGlossaries); - delete SwFieldType::s_pFldNames; + delete SwFieldType::s_pFieldNames; ClearStringCache(); delete pGlossaryList; @@ -189,10 +189,10 @@ ShellResource::ShellResource() aCalc_Default( SW_RES( STR_CALC_DEFAULT ) ), aCalc_Error( SW_RES( STR_CALC_ERROR ) ), - aGetRefFld_Up( SW_RES( STR_GETREFFLD_UP ) ), - aGetRefFld_Down( SW_RES( STR_GETREFFLD_DOWN ) ), + aGetRefField_Up( SW_RES( STR_GETREFFLD_UP ) ), + aGetRefField_Down( SW_RES( STR_GETREFFLD_DOWN ) ), // #i81002# - aGetRefFld_RefItemNotFound( SW_RES( STR_GETREFFLD_REFITEMNOTFOUND ) ), + aGetRefField_RefItemNotFound( SW_RES( STR_GETREFFLD_REFITEMNOTFOUND ) ), aStrAllPageHeadFoot( SW_RES( STR_ALLPAGE_HEADFOOT ) ), aStrNone( SW_RES( STR_TEMPLATE_NONE )), aFixedStr( SW_RES( STR_FIELD_FIXED )), @@ -208,7 +208,7 @@ ShellResource::ShellResource() aTOXCitationName( SW_RES(STR_TOX_CITATION)), aLinkCtrlClick(SW_RESSTR(STR_LINK_CTRL_CLICK)), aLinkClick(SW_RESSTR(STR_LINK_CLICK)), - pAutoFmtNameLst(0), + pAutoFormatNameLst(0), sPageDescFirstName( SW_RES(STR_PAGEDESC_FIRSTNAME)), sPageDescFollowName( SW_RES(STR_PAGEDESC_FOLLOWNAME)), sPageDescName( SW_RES(STR_PAGEDESC_NAME)) @@ -230,7 +230,7 @@ ShellResource::ShellResource() ShellResource::~ShellResource() { - delete pAutoFmtNameLst; + delete pAutoFormatNameLst; } OUString ShellResource::GetPageDescName(sal_uInt16 nNo, PageNameMode eMode) @@ -273,20 +273,20 @@ SwGlossaryList* GetGlossaryList() return pGlossaryList; } -struct ImpAutoFmtNameListLoader : public Resource +struct ImpAutoFormatNameListLoader : public Resource { - ImpAutoFmtNameListLoader( std::vector<OUString>& rLst ); + ImpAutoFormatNameListLoader( std::vector<OUString>& rLst ); }; -void ShellResource::_GetAutoFmtNameLst() const +void ShellResource::_GetAutoFormatNameLst() const { - assert(!pAutoFmtNameLst); - pAutoFmtNameLst = new std::vector<OUString>; - pAutoFmtNameLst->reserve(STR_AUTOFMTREDL_END); - ImpAutoFmtNameListLoader aTmp(*pAutoFmtNameLst); + assert(!pAutoFormatNameLst); + pAutoFormatNameLst = new std::vector<OUString>; + pAutoFormatNameLst->reserve(STR_AUTOFMTREDL_END); + ImpAutoFormatNameListLoader aTmp(*pAutoFormatNameLst); } -ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( std::vector<OUString>& rLst ) +ImpAutoFormatNameListLoader::ImpAutoFormatNameListLoader( std::vector<OUString>& rLst ) : Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) ) { for( sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n ) diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 85c9c835d1d8..25e7277c8844 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -250,7 +250,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) if (rSh.EndPg()) nFuncId = FN_END_OF_PAGE; } - else if (rSh.GotoFooterTxt()) + else if (rSh.GotoFooterText()) nFuncId = FN_TO_FOOTER; bFocusToDoc = true; } @@ -264,7 +264,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) if (rSh.SttPg()) nFuncId = FN_START_OF_PAGE; } - else if (rSh.GotoHeaderTxt()) + else if (rSh.GotoHeaderText()) nFuncId = FN_TO_HEADER; bFocusToDoc = true; } @@ -276,7 +276,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) // Jump from the footnote to the anchor. if (eFrmType & FrmTypeFlags::FOOTNOTE) { - if (rSh.GotoFtnAnchor()) + if (rSh.GotoFootnoteAnchor()) nFuncId = FN_FOOTNOTE_TO_ANCHOR; } // Otherwise, jump to the first footnote text; @@ -284,11 +284,11 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) // if this is also not possible got to the footnote before. else { - if (rSh.GotoFtnTxt()) + if (rSh.GotoFootnoteText()) nFuncId = FN_FOOTNOTE_TO_ANCHOR; - else if (rSh.GotoNextFtnAnchor()) + else if (rSh.GotoNextFootnoteAnchor()) nFuncId = FN_NEXT_FOOTNOTE; - else if (rSh.GotoPrevFtnAnchor()) + else if (rSh.GotoPrevFootnoteAnchor()) nFuncId = FN_PREV_FOOTNOTE; } bFocusToDoc = true; @@ -1103,27 +1103,27 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem) OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) { OUString sFileName; - SotClipboardFormatId nFmt; - if( rData.HasFormat( nFmt = SotClipboardFormatId::FILE_LIST )) + SotClipboardFormatId nFormat; + if( rData.HasFormat( nFormat = SotClipboardFormatId::FILE_LIST )) { FileList aFileList; - rData.GetFileList( nFmt, aFileList ); + rData.GetFileList( nFormat, aFileList ); sFileName = aFileList.GetFile( 0 ); } - else if( rData.HasFormat( nFmt = SotClipboardFormatId::STRING ) || - rData.HasFormat( nFmt = SotClipboardFormatId::SIMPLE_FILE ) || - rData.HasFormat( nFmt = SotClipboardFormatId::FILENAME )) + else if( rData.HasFormat( nFormat = SotClipboardFormatId::STRING ) || + rData.HasFormat( nFormat = SotClipboardFormatId::SIMPLE_FILE ) || + rData.HasFormat( nFormat = SotClipboardFormatId::FILENAME )) { - (void)rData.GetString(nFmt, sFileName); + (void)rData.GetString(nFormat, sFileName); } - else if( rData.HasFormat( nFmt = SotClipboardFormatId::SOLK ) || - rData.HasFormat( nFmt = SotClipboardFormatId::NETSCAPE_BOOKMARK )|| - rData.HasFormat( nFmt = SotClipboardFormatId::FILECONTENT ) || - rData.HasFormat( nFmt = SotClipboardFormatId::FILEGRPDESCRIPTOR ) || - rData.HasFormat( nFmt = SotClipboardFormatId::UNIFORMRESOURCELOCATOR )) + else if( rData.HasFormat( nFormat = SotClipboardFormatId::SOLK ) || + rData.HasFormat( nFormat = SotClipboardFormatId::NETSCAPE_BOOKMARK )|| + rData.HasFormat( nFormat = SotClipboardFormatId::FILECONTENT ) || + rData.HasFormat( nFormat = SotClipboardFormatId::FILEGRPDESCRIPTOR ) || + rData.HasFormat( nFormat = SotClipboardFormatId::UNIFORMRESOURCELOCATOR )) { INetBookmark aBkmk( aEmptyOUStr, aEmptyOUStr ); - if (rData.GetINetBookmark(nFmt, aBkmk)) + if (rData.GetINetBookmark(nFormat, aBkmk)) sFileName = aBkmk.GetURL(); } if( !sFileName.isEmpty() ) diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index a12a7ceb6e77..c5d3b8baa2c7 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -88,7 +88,7 @@ VCL_BUILDER_DECL_FACTORY(NumFormatListBox) rRet = pListBox; } -void NumFormatListBox::Init(short nFormatType, bool bUsrFmts) +void NumFormatListBox::Init(short nFormatType, bool bUsrFormats) { SwView *pView = GetView(); @@ -97,7 +97,7 @@ void NumFormatListBox::Init(short nFormatType, bool bUsrFmts) else eCurLanguage = SvtSysLocale().GetLanguageTag().getLanguageType(); - if (!bUsrFmts) + if (!bUsrFormats) { pOwnFormatter = new SvNumberFormatter(comphelper::getProcessComponentContext(), eCurLanguage); } @@ -212,41 +212,41 @@ void NumFormatListBox::SetFormatType(const short nFormatType) break; } - const SvNumberformat* pFmt; + const SvNumberformat* pFormat; sal_Int32 i = 0; sal_uLong nFormat; Color* pCol; double fVal = GetDefValue( nFormatType ); OUString sValue; - sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( + sal_uLong nSysNumFormat = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage ); - sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( + sal_uLong nSysShortDateFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage ); - sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( + sal_uLong nSysLongDateFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage ); for( long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex ) { nFormat = pFormatter->GetFormatIndex( (NfIndexTableOffset)nIndex, eCurLanguage ); - pFmt = pFormatter->GetEntry( nFormat ); + pFormat = pFormatter->GetEntry( nFormat ); if( nFormat == pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, eCurLanguage ) - || const_cast<SvNumberformat*>(pFmt)->GetOutputString( fVal, sValue, &pCol ) + || const_cast<SvNumberformat*>(pFormat)->GetOutputString( fVal, sValue, &pCol ) || nFormatType == css::util::NumberFormat::UNDEFINED ) { - sValue = pFmt->GetFormatstring(); + sValue = pFormat->GetFormatstring(); } else if( nFormatType == css::util::NumberFormat::TEXT ) { pFormatter->GetOutputString( "\"ABC\"", nFormat, sValue, &pCol); } - if (nFormat != nSysNumFmt && - nFormat != nSysShortDateFmt && - nFormat != nSysLongDateFmt) + if (nFormat != nSysNumFormat && + nFormat != nSysShortDateFormat && + nFormat != nSysLongDateFormat) { const sal_Int32 nPos = InsertEntry( sValue ); SetEntryData( nPos, reinterpret_cast<void*>(nFormat) ); @@ -326,20 +326,20 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefaultFormat) while (reinterpret_cast<sal_uLong>(GetEntryData(nPos)) == ULONG_MAX) nPos++; - sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage); - sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage); - sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage); + sal_uLong nSysNumFormat = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage); + sal_uLong nSysShortDateFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage); + sal_uLong nSysLongDateFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage); bool bSysLang = false; if( eCurLanguage == GetAppLanguage() ) bSysLang = true; - sal_uLong nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM ); - sal_uLong nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM ); - sal_uLong nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM ); + sal_uLong nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFormat, LANGUAGE_SYSTEM ); + sal_uLong nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFormat, LANGUAGE_SYSTEM ); + sal_uLong nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFormat, LANGUAGE_SYSTEM ); if ( - nDefaultFormat == nSysNumFmt || - nDefaultFormat == nSysShortDateFmt || - nDefaultFormat == nSysLongDateFmt || + nDefaultFormat == nSysNumFormat || + nDefaultFormat == nSysShortDateFormat || + nDefaultFormat == nSysLongDateFormat || ( bSysLang && ( @@ -427,9 +427,9 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) { sal_uInt32 nNumberFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue(); // oj #105473# change order of calls - const SvNumberformat* pFmt = pFormatter->GetEntry(nNumberFormat); - if( pFmt ) - eCurLanguage = pFmt->GetLanguage(); + const SvNumberformat* pFormat = pFormatter->GetEntry(nNumberFormat); + if( pFormat ) + eCurLanguage = pFormat->GetLanguage(); // SetDefFormat uses eCurLanguage to look for if this format already in the list SetDefFormat(nNumberFormat); } diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx index 087dd8a13b85..16823c94e688 100644 --- a/sw/source/uibase/utlui/uiitems.cxx +++ b/sw/source/uibase/utlui/uiitems.cxx @@ -32,34 +32,34 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -SwPageFtnInfoItem::SwPageFtnInfoItem( const sal_uInt16 nId, SwPageFtnInfo& rInfo) : +SwPageFootnoteInfoItem::SwPageFootnoteInfoItem( const sal_uInt16 nId, SwPageFootnoteInfo& rInfo) : SfxPoolItem( nId ), - aFtnInfo(rInfo) + aFootnoteInfo(rInfo) { } -SwPageFtnInfoItem::SwPageFtnInfoItem( const SwPageFtnInfoItem& rItem ) : +SwPageFootnoteInfoItem::SwPageFootnoteInfoItem( const SwPageFootnoteInfoItem& rItem ) : SfxPoolItem( rItem ), - aFtnInfo(rItem.GetPageFtnInfo()) + aFootnoteInfo(rItem.GetPageFootnoteInfo()) { } - SwPageFtnInfoItem::~SwPageFtnInfoItem() + SwPageFootnoteInfoItem::~SwPageFootnoteInfoItem() { } -SfxPoolItem* SwPageFtnInfoItem::Clone( SfxItemPool * /*pPool*/ ) const +SfxPoolItem* SwPageFootnoteInfoItem::Clone( SfxItemPool * /*pPool*/ ) const { - return new SwPageFtnInfoItem( *this ); + return new SwPageFootnoteInfoItem( *this ); } -bool SwPageFtnInfoItem::operator==( const SfxPoolItem& rAttr ) const +bool SwPageFootnoteInfoItem::operator==( const SfxPoolItem& rAttr ) const { OSL_ENSURE( Which() == rAttr.Which(), "no equal attributes" ); - return ( aFtnInfo == static_cast<const SwPageFtnInfoItem&>(rAttr).GetPageFtnInfo()); + return ( aFootnoteInfo == static_cast<const SwPageFootnoteInfoItem&>(rAttr).GetPageFootnoteInfo()); } -bool SwPageFtnInfoItem::GetPresentation +bool SwPageFootnoteInfoItem::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit eCoreUnit, @@ -68,7 +68,7 @@ bool SwPageFtnInfoItem::GetPresentation const IntlWrapper* pIntl ) const { - const SwTwips nHght = GetPageFtnInfo().GetHeight(); + const SwTwips nHght = GetPageFootnoteInfo().GetHeight(); if ( nHght ) { rText = SW_RESSTR( STR_MAX_FTN_HEIGHT ) + " " + @@ -78,27 +78,27 @@ bool SwPageFtnInfoItem::GetPresentation return true; } -bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const +bool SwPageFootnoteInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const { bool bRet = true; switch(nMemberId & ~CONVERT_TWIPS) { - case MID_FTN_HEIGHT : rVal <<= (sal_Int32)convertTwipToMm100(aFtnInfo.GetHeight());break; - case MID_LINE_WEIGHT : rVal <<= (sal_Int16)convertTwipToMm100(aFtnInfo.GetLineWidth());break; - case MID_LINE_COLOR : rVal <<= (sal_Int32)aFtnInfo.GetLineColor().GetColor();break; + case MID_FTN_HEIGHT : rVal <<= (sal_Int32)convertTwipToMm100(aFootnoteInfo.GetHeight());break; + case MID_LINE_WEIGHT : rVal <<= (sal_Int16)convertTwipToMm100(aFootnoteInfo.GetLineWidth());break; + case MID_LINE_COLOR : rVal <<= (sal_Int32)aFootnoteInfo.GetLineColor().GetColor();break; case MID_LINE_RELWIDTH : { Fraction aTmp( 100, 1 ); - aTmp *= aFtnInfo.GetWidth(); + aTmp *= aFootnoteInfo.GetWidth(); rVal <<= (sal_Int8)(long)aTmp; } break; - case MID_LINE_ADJUST : rVal <<= (sal_Int16)aFtnInfo.GetAdj();break;//text::HorizontalAdjust - case MID_LINE_TEXT_DIST : rVal <<= (sal_Int32)convertTwipToMm100(aFtnInfo.GetTopDist());break; - case MID_LINE_FOOTNOTE_DIST: rVal <<= (sal_Int32)convertTwipToMm100(aFtnInfo.GetBottomDist());break; + case MID_LINE_ADJUST : rVal <<= (sal_Int16)aFootnoteInfo.GetAdj();break;//text::HorizontalAdjust + case MID_LINE_TEXT_DIST : rVal <<= (sal_Int32)convertTwipToMm100(aFootnoteInfo.GetTopDist());break; + case MID_LINE_FOOTNOTE_DIST: rVal <<= (sal_Int32)convertTwipToMm100(aFootnoteInfo.GetBottomDist());break; case MID_FTN_LINE_STYLE : { - switch ( aFtnInfo.GetLineStyle( ) ) + switch ( aFootnoteInfo.GetLineStyle( ) ) { default: case table::BorderLineStyle::NONE : rVal <<= sal_Int8(0); break; @@ -114,7 +114,7 @@ bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const return bRet; } -bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) +bool SwPageFootnoteInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) { sal_Int32 nSet32 = 0; bool bRet = true; @@ -122,7 +122,7 @@ bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) { case MID_LINE_COLOR : rVal >>= nSet32; - aFtnInfo.SetLineColor(nSet32); + aFootnoteInfo.SetLineColor(nSet32); break; case MID_FTN_HEIGHT: case MID_LINE_TEXT_DIST : @@ -135,9 +135,9 @@ bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) nSet32 = convertMm100ToTwip(nSet32); switch(nMemberId & ~CONVERT_TWIPS) { - case MID_FTN_HEIGHT: aFtnInfo.SetHeight(nSet32); break; - case MID_LINE_TEXT_DIST: aFtnInfo.SetTopDist(nSet32);break; - case MID_LINE_FOOTNOTE_DIST: aFtnInfo.SetBottomDist(nSet32);break; + case MID_FTN_HEIGHT: aFootnoteInfo.SetHeight(nSet32); break; + case MID_LINE_TEXT_DIST: aFootnoteInfo.SetTopDist(nSet32);break; + case MID_LINE_FOOTNOTE_DIST: aFootnoteInfo.SetBottomDist(nSet32);break; } } break; @@ -146,7 +146,7 @@ bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) sal_Int16 nSet = 0; rVal >>= nSet; if(nSet >= 0) - aFtnInfo.SetLineWidth(convertMm100ToTwip(nSet)); + aFootnoteInfo.SetLineWidth(convertMm100ToTwip(nSet)); else bRet = false; } @@ -158,7 +158,7 @@ bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) if(nSet < 0) bRet = false; else - aFtnInfo.SetWidth(Fraction(nSet, 100)); + aFootnoteInfo.SetWidth(Fraction(nSet, 100)); } break; case MID_LINE_ADJUST : @@ -166,7 +166,7 @@ bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) sal_Int16 nSet = 0; rVal >>= nSet; if(nSet >= 0 && nSet < 3) //text::HorizontalAdjust - aFtnInfo.SetAdj((SwFtnAdj)nSet); + aFootnoteInfo.SetAdj((SwFootnoteAdj)nSet); else bRet = false; } @@ -183,7 +183,7 @@ bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) case 3: eStyle = table::BorderLineStyle::DASHED; break; default: break; } - aFtnInfo.SetLineStyle( eStyle ); + aFootnoteInfo.SetLineStyle( eStyle ); } break; default: diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index d7b30ac76096..d793a99775cf 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -232,20 +232,20 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet, const sa // Fill header footer -void FillHdFt(SwFrmFmt* pFmt, const SfxItemSet& rSet) +void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet) { - SwAttrSet aSet(pFmt->GetAttrSet()); + SwAttrSet aSet(pFormat->GetAttrSet()); aSet.Put(rSet); const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(rSet.Get(SID_ATTR_PAGE_SIZE)); const SfxBoolItem& rDynamic = static_cast<const SfxBoolItem&>(rSet.Get(SID_ATTR_PAGE_DYNAMIC)); // Convert size - SwFmtFrmSize aFrmSize(rDynamic.GetValue() ? ATT_MIN_SIZE : ATT_FIX_SIZE, + SwFormatFrmSize aFrmSize(rDynamic.GetValue() ? ATT_MIN_SIZE : ATT_FIX_SIZE, rSize.GetSize().Width(), rSize.GetSize().Height()); aSet.Put(aFrmSize); - pFmt->SetFmtAttr(aSet); + pFormat->SetFormatAttr(aSet); } /// Convert from UseOnPage to SvxPageUsage. @@ -282,11 +282,11 @@ UseOnPage lcl_convertUseFromSvx(UseOnPage nUse) void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { - SwFrmFmt& rMaster = rPageDesc.GetMaster(); + SwFrameFormat& rMaster = rPageDesc.GetMaster(); int nFirstShare = -1; // Transfer all general frame attributes - rMaster.SetFmtAttr(rSet); + rMaster.SetFormatAttr(rSet); // PageData if(rSet.GetItemState(SID_ATTR_PAGE) == SfxItemState::SET) @@ -305,9 +305,9 @@ 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)); - SwFmtFrmSize aSize(ATT_FIX_SIZE); + SwFormatFrmSize aSize(ATT_FIX_SIZE); aSize.SetSize(rSizeItem.GetSize()); - rMaster.SetFmtAttr(aSize); + rMaster.SetFormatAttr(aSize); } // Evaluate header attributes const SfxPoolItem* pItem; @@ -321,14 +321,14 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { // Take over values if(!rMaster.GetHeader().IsActive()) - rMaster.SetFmtAttr(SwFmtHeader(true)); + rMaster.SetFormatAttr(SwFormatHeader(true)); // Pick out everything and adapt the header format - SwFmtHeader aHeaderFmt(rMaster.GetHeader()); - SwFrmFmt *pHeaderFmt = aHeaderFmt.GetHeaderFmt(); - OSL_ENSURE(pHeaderFmt != 0, "no header format"); + SwFormatHeader aHeaderFormat(rMaster.GetHeader()); + SwFrameFormat *pHeaderFormat = aHeaderFormat.GetHeaderFormat(); + OSL_ENSURE(pHeaderFormat != 0, "no header format"); - ::FillHdFt(pHeaderFmt, rHeaderSet); + ::FillHdFt(pHeaderFormat, rHeaderSet); rPageDesc.ChgHeaderShare(static_cast<const SfxBoolItem&>( rHeaderSet.Get(SID_ATTR_PAGE_SHARED)).GetValue()); @@ -344,7 +344,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Disable header if(rMaster.GetHeader().IsActive()) { - rMaster.SetFmtAttr(SwFmtHeader(false)); + rMaster.SetFormatAttr(SwFormatHeader(false)); rPageDesc.ChgHeaderShare(false); } } @@ -361,14 +361,14 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { // Take over values if(!rMaster.GetFooter().IsActive()) - rMaster.SetFmtAttr(SwFmtFooter(true)); + rMaster.SetFormatAttr(SwFormatFooter(true)); // Pick out everything and adapt the footer format - SwFmtFooter aFooterFmt(rMaster.GetFooter()); - SwFrmFmt *pFooterFmt = aFooterFmt.GetFooterFmt(); - OSL_ENSURE(pFooterFmt != 0, "no footer format"); + SwFormatFooter aFooterFormat(rMaster.GetFooter()); + SwFrameFormat *pFooterFormat = aFooterFormat.GetFooterFormat(); + OSL_ENSURE(pFooterFormat != 0, "no footer format"); - ::FillHdFt(pFooterFmt, rFooterSet); + ::FillHdFt(pFooterFormat, rFooterSet); rPageDesc.ChgFooterShare(static_cast<const SfxBoolItem&>( rFooterSet.Get(SID_ATTR_PAGE_SHARED)).GetValue()); @@ -384,7 +384,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Disable footer if(rMaster.GetFooter().IsActive()) { - rMaster.SetFmtAttr(SwFmtFooter(false)); + rMaster.SetFormatAttr(SwFormatFooter(false)); rPageDesc.ChgFooterShare(false); } } @@ -394,7 +394,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_FTN_INFO, false, &pItem ) ) - rPageDesc.SetFtnInfo( static_cast<const SwPageFtnInfoItem*>(pItem)->GetPageFtnInfo() ); + rPageDesc.SetFootnoteInfo( static_cast<const SwPageFootnoteInfoItem*>(pItem)->GetPageFootnoteInfo() ); // Columns @@ -405,33 +405,33 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { bool bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue(); if(!bSet) - rPageDesc.SetRegisterFmtColl(0); + rPageDesc.SetRegisterFormatColl(0); else if(SfxItemState::SET == rSet.GetItemState( SID_SWREGISTER_COLLECTION, false, &pItem)) { const OUString& rColl = static_cast<const SfxStringItem*>(pItem)->GetValue(); SwDoc& rDoc = *rMaster.GetDoc(); - SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( rColl ); + SwTextFormatColl* pColl = rDoc.FindTextFormatCollByName( rColl ); if( !pColl ) { const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); if( USHRT_MAX != nId ) - pColl = rDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool( nId ); + pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( nId ); else - pColl = rDoc.MakeTxtFmtColl( rColl, - rDoc.GetDfltTxtFmtColl() ); + pColl = rDoc.MakeTextFormatColl( rColl, + rDoc.GetDfltTextFormatColl() ); } if( pColl ) - pColl->SetFmtAttr( SwRegisterItem ( true )); - rPageDesc.SetRegisterFmtColl( pColl ); + pColl->SetFormatAttr( SwRegisterItem ( true )); + rPageDesc.SetRegisterFormatColl( pColl ); } } } void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) { - const SwFrmFmt& rMaster = rPageDesc.GetMaster(); + const SwFrameFormat& rMaster = rPageDesc.GetMaster(); // Page data SvxPageItem aPageItem(SID_ATTR_PAGE); @@ -477,9 +477,9 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) // Header if(rMaster.GetHeader().IsActive()) { - const SwFmtHeader &rHeaderFmt = rMaster.GetHeader(); - const SwFrmFmt *pHeaderFmt = rHeaderFmt.GetHeaderFmt(); - OSL_ENSURE(pHeaderFmt != 0, "no header format"); + const SwFormatHeader &rHeaderFormat = rMaster.GetHeader(); + const SwFrameFormat *pHeaderFormat = rHeaderFormat.GetHeaderFormat(); + OSL_ENSURE(pHeaderFormat != 0, "no header format"); // HeaderInfo, margins, background, border SfxItemSet aHeaderSet(*rSet.GetPool(), @@ -495,13 +495,13 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) 0, 0); //UUUU set correct parent to get the XFILL_NONE FillStyle as needed - aHeaderSet.SetParent(&rMaster.GetDoc()->GetDfltFrmFmt()->GetAttrSet()); + aHeaderSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet()); // Dynamic or fixed height SfxBoolItem aOn(SID_ATTR_PAGE_ON, true); aHeaderSet.Put(aOn); - const SwFmtFrmSize &rFrmSize = pHeaderFmt->GetFrmSize(); + const SwFormatFrmSize &rFrmSize = pHeaderFormat->GetFrmSize(); const SwFrmSize eSizeType = rFrmSize.GetHeightSizeType(); SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != ATT_FIX_SIZE); aHeaderSet.Put(aDynamic); @@ -517,7 +517,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) aHeaderSet.Put(aSize); // Shifting frame attributes - aHeaderSet.Put(pHeaderFmt->GetAttrSet()); + aHeaderSet.Put(pHeaderFormat->GetAttrSet()); aHeaderSet.Put( aBoxInfo ); // Create SetItem @@ -528,9 +528,9 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) // Footer if(rMaster.GetFooter().IsActive()) { - const SwFmtFooter &rFooterFmt = rMaster.GetFooter(); - const SwFrmFmt *pFooterFmt = rFooterFmt.GetFooterFmt(); - OSL_ENSURE(pFooterFmt != 0, "no footer format"); + const SwFormatFooter &rFooterFormat = rMaster.GetFooter(); + const SwFrameFormat *pFooterFormat = rFooterFormat.GetFooterFormat(); + OSL_ENSURE(pFooterFormat != 0, "no footer format"); // FooterInfo, margins, background, border SfxItemSet aFooterSet(*rSet.GetPool(), @@ -546,13 +546,13 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) 0, 0); //UUUU set correct parent to get the XFILL_NONE FillStyle as needed - aFooterSet.SetParent(&rMaster.GetDoc()->GetDfltFrmFmt()->GetAttrSet()); + aFooterSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet()); // Dynamic or fixed height SfxBoolItem aOn(SID_ATTR_PAGE_ON, true); aFooterSet.Put(aOn); - const SwFmtFrmSize &rFrmSize = pFooterFmt->GetFrmSize(); + const SwFormatFrmSize &rFrmSize = pFooterFormat->GetFrmSize(); const SwFrmSize eSizeType = rFrmSize.GetHeightSizeType(); SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != ATT_FIX_SIZE); aFooterSet.Put(aDynamic); @@ -568,7 +568,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) aFooterSet.Put(aSize); // Shifting Frame attributes - aFooterSet.Put(pFooterFmt->GetAttrSet()); + aFooterSet.Put(pFooterFormat->GetAttrSet()); aFooterSet.Put( aBoxInfo ); // Create SetItem @@ -577,12 +577,12 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) } // Integrate footnotes - SwPageFtnInfo& rInfo = (SwPageFtnInfo&)rPageDesc.GetFtnInfo(); - SwPageFtnInfoItem aFtnItem(FN_PARAM_FTN_INFO, rInfo); - rSet.Put(aFtnItem); + SwPageFootnoteInfo& rInfo = (SwPageFootnoteInfo&)rPageDesc.GetFootnoteInfo(); + SwPageFootnoteInfoItem aFootnoteItem(FN_PARAM_FTN_INFO, rInfo); + rSet.Put(aFootnoteItem); // Register compliant - const SwTxtFmtColl* pCol = rPageDesc.GetRegisterFmtColl(); + const SwTextFormatColl* pCol = rPageDesc.GetRegisterFormatColl(); SwRegisterItem aReg(pCol != 0); aReg.SetWhich(SID_SWREGISTER_MODE); rSet.Put(aReg); @@ -614,7 +614,7 @@ SwTwips GetTabDist(const SvxTabStopItem& rTabs) void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ) { const SfxPoolItem* pItem; - SwFmtPageDesc aPgDesc; + SwFormatPageDesc aPgDesc; bool bChanged = false; // Page number @@ -644,9 +644,9 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ) rShell.GetCurAttr( aCoreSet ); if(SfxItemState::SET == aCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) { - if( static_cast<const SwFmtPageDesc*>(pItem)->GetPageDesc() ) + if( static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc() ) { - aPgDesc.RegisterToPageDesc( *const_cast<SwFmtPageDesc*>(static_cast<const SwFmtPageDesc*>(pItem))->GetPageDesc() ); + aPgDesc.RegisterToPageDesc( *const_cast<SwFormatPageDesc*>(static_cast<const SwFormatPageDesc*>(pItem))->GetPageDesc() ); } } } @@ -666,10 +666,10 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) { case SfxItemState::SET: { - if( static_cast<const SwFmtPageDesc*>(pItem)->GetPageDesc() ) + if( static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc() ) { - aName = static_cast<const SwFmtPageDesc*>(pItem)->GetPageDesc()->GetName(); - oNumOffset = static_cast<const SwFmtPageDesc*>(pItem)->GetNumOffset(); + aName = static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc()->GetName(); + oNumOffset = static_cast<const SwFormatPageDesc*>(pItem)->GetNumOffset(); } rCoreSet.ClearItem( RES_PAGEDESC ); // Page number @@ -742,13 +742,13 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bo pBase = pPool->Next(); } // non-pool styles - const SwCharFmts* pFmts = pDoc->GetCharFmts(); - for(size_t i = 0; i < pFmts->size(); ++i) + const SwCharFormats* pFormats = pDoc->GetCharFormats(); + for(size_t i = 0; i < pFormats->size(); ++i) { - const SwCharFmt* pFmt = (*pFmts)[i]; - if(pFmt->IsDefault()) + const SwCharFormat* pFormat = (*pFormats)[i]; + if(pFormat->IsDefault()) continue; - const OUString& rName = pFmt->GetName(); + const OUString& rName = pFormat->GetName(); if(rToFill.GetEntryPos(rName) == LISTBOX_ENTRY_NOTFOUND) { const sal_Int32 nPos = bSorted @@ -760,12 +760,12 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bo } }; -SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, +SwTwips GetTableWidth( SwFrameFormat* pFormat, SwTabCols& rCols, sal_uInt16 *pPercent, SwWrtShell* pSh ) { // To get the width is slightly more complicated. SwTwips nWidth = 0; - const sal_Int16 eOri = pFmt->GetHoriOrient().GetHoriOrient(); + const sal_Int16 eOri = pFormat->GetHoriOrient().GetHoriOrient(); switch(eOri) { case text::HoriOrientation::FULL: nWidth = rCols.GetRight(); break; @@ -773,13 +773,13 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, case text::HoriOrientation::LEFT: case text::HoriOrientation::RIGHT: case text::HoriOrientation::CENTER: - nWidth = pFmt->GetFrmSize().GetWidth(); + nWidth = pFormat->GetFrmSize().GetWidth(); break; default: { if(pSh) { - if ( 0 == pSh->GetFlyFrmFmt() ) + if ( 0 == pSh->GetFlyFrameFormat() ) { nWidth = pSh->GetAnyCurRect(RECT_PAGE_PRT).Width(); } @@ -792,12 +792,12 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, { OSL_FAIL("where to get the actual width from?"); } - const SvxLRSpaceItem& rLRSpace = pFmt->GetLRSpace(); + const SvxLRSpaceItem& rLRSpace = pFormat->GetLRSpace(); nWidth -= (rLRSpace.GetRight() + rLRSpace.GetLeft()); } } if (pPercent) - *pPercent = pFmt->GetFrmSize().GetWidthPercent(); + *pPercent = pFormat->GetFrmSize().GetWidthPercent(); return nWidth; } diff --git a/sw/source/uibase/web/wview.cxx b/sw/source/uibase/web/wview.cxx index 1a4e702ec1a8..66736a832595 100644 --- a/sw/source/uibase/web/wview.cxx +++ b/sw/source/uibase/web/wview.cxx @@ -102,12 +102,12 @@ void SwWebView::SelectShell() #if HAVE_FEATURE_DESKTOP // Decision whether UpdateTable must be called bool bUpdateTable = false; - const SwFrmFmt* pCurTableFmt = GetWrtShell().GetTableFmt(); - if(pCurTableFmt && pCurTableFmt != GetLastTblFrmFmt()) + const SwFrameFormat* pCurTableFormat = GetWrtShell().GetTableFormat(); + if(pCurTableFormat && pCurTableFormat != GetLastTableFrameFormat()) { bUpdateTable = true; // can only be executed later } - SetLastTblFrmFmt(pCurTableFmt); + SetLastTableFrameFormat(pCurTableFormat); //SEL_TBL and SEL_TBL_CELLS can be ored! int nNewSelectionType = (GetWrtShell().GetSelectionType() & ~nsSelectionType::SEL_TBL_CELLS); diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index 68f2eaba05a4..c25a372b1efb 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -53,16 +53,16 @@ bool SwWrtShell::TryRemoveIndent() GetCurAttr(aAttrSet); SvxLRSpaceItem aItem = static_cast<const SvxLRSpaceItem &>(aAttrSet.Get(RES_LR_SPACE)); - short aOldFirstLineOfst = aItem.GetTxtFirstLineOfst(); + short aOldFirstLineOfst = aItem.GetTextFirstLineOfst(); if (aOldFirstLineOfst > 0) { - aItem.SetTxtFirstLineOfst(0); + aItem.SetTextFirstLineOfst(0); bResult = true; } else if (aOldFirstLineOfst < 0) { - aItem.SetTxtFirstLineOfst(0); + aItem.SetTextFirstLineOfst(0); aItem.SetLeft(aItem.GetLeft() + aOldFirstLineOfst); bResult = true; @@ -177,13 +177,13 @@ long SwWrtShell::DelLeft() // JP 29.06.95: never erase a table standing in front of it. bool bSwap = false; - const SwTableNode * pWasInTblNd = SwCrsrShell::IsCrsrInTbl(); + const SwTableNode * pWasInTableNd = SwCrsrShell::IsCrsrInTable(); if( SwCrsrShell::IsSttPara()) { // #i4032# Don't actually call a 'delete' if we // changed the table cell, compare DelRight(). - const SwStartNode * pSNdOld = pWasInTblNd ? + const SwStartNode * pSNdOld = pWasInTableNd ? GetSwCrsr()->GetNode().FindTableBoxStartNode() : 0; @@ -194,11 +194,11 @@ long SwWrtShell::DelLeft() // If the cursor entered or left a table (or both) we are done. No step // back. - const SwTableNode* pIsInTblNd = SwCrsrShell::IsCrsrInTbl(); - if( pIsInTblNd != pWasInTblNd ) + const SwTableNode* pIsInTableNd = SwCrsrShell::IsCrsrInTable(); + if( pIsInTableNd != pWasInTableNd ) return 0; - const SwStartNode* pSNdNew = pIsInTblNd ? + const SwStartNode* pSNdNew = pIsInTableNd ? GetSwCrsr()->GetNode().FindTableBoxStartNode() : 0; @@ -235,7 +235,7 @@ long SwWrtShell::DelRight() if(nSelection & nsSelectionType::SEL_TXT) nSelection = nsSelectionType::SEL_TXT; - const SwTableNode * pWasInTblNd = NULL; + const SwTableNode * pWasInTableNd = NULL; switch( nSelection & ~(nsSelectionType::SEL_BEZ) ) { @@ -271,7 +271,7 @@ long SwWrtShell::DelRight() EnterStdMode(); } - pWasInTblNd = IsCrsrInTbl(); + pWasInTableNd = IsCrsrInTable(); if( nsSelectionType::SEL_TXT & nSelection && SwCrsrShell::IsSttPara() && SwCrsrShell::IsEndPara() ) @@ -282,8 +282,8 @@ long SwWrtShell::DelRight() bool bDelFull = false; if ( SwCrsrShell::Right(1,CRSR_SKIP_CHARS) ) { - const SwTableNode * pCurrTblNd = IsCrsrInTbl(); - bDelFull = pCurrTblNd && pCurrTblNd != pWasInTblNd; + const SwTableNode * pCurrTableNd = IsCrsrInTable(); + bDelFull = pCurrTableNd && pCurrTableNd != pWasInTableNd; } // restore cursor @@ -313,7 +313,7 @@ long SwWrtShell::DelRight() if ( SwCrsrShell::Right(1, CRSR_SKIP_CHARS) ) { - if (IsCrsrInTbl() || (pWasInTblNd != IsCrsrInTbl())) + if (IsCrsrInTable() || (pWasInTableNd != IsCrsrInTable())) { /** #108049# Save the startnode of the current cell. May be different to pSNdOld as we have diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index a407b33d8325..23a1a28e5b84 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -194,7 +194,7 @@ bool SwWrtShell::RightMargin( bool bSelect, bool bBasicCall ) bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable, bool bSelect, bool bDontMoveRegion ) { - if ( IsCrsrInTbl() ) + if ( IsCrsrInTable() ) { const bool bBoxSelection = HasBoxSelection(); if( !m_bBlockMode ) @@ -262,7 +262,7 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) if ( pMoveTable && *pMoveTable ) return MoveTable( fnTableCurr, fnTableEnd ); - if ( IsCrsrInTbl() ) + if ( IsCrsrInTable() ) { if ( MoveSection( fnSectionCurr, fnSectionEnd ) || MoveTable( fnTableCurr, fnTableEnd ) ) @@ -408,7 +408,7 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) aPt.Y() = aTmpArea.Top() + aTmpArea.Height() / 2; aPt.Y() += lOffset; - m_aDest = GetCntntPos(aPt,lOffset > 0); + m_aDest = GetContentPos(aPt,lOffset > 0); m_aDest.X() = aPt.X(); m_bDestOnStack = true; } @@ -596,7 +596,7 @@ bool SwWrtShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFram return bRet; } -bool SwWrtShell::GotoINetAttr( const SwTxtINetFmt& rAttr ) +bool SwWrtShell::GotoINetAttr( const SwTextINetFormat& rAttr ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoINetAttr(rAttr); @@ -657,9 +657,9 @@ bool SwWrtShell::GotoTable( const OUString& rName ) return bRet; } -bool SwWrtShell::GotoFld( const SwFmtFld& rFld ) { +bool SwWrtShell::GotoFormatField( const SwFormatField& rField ) { SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoFld(rFld); + bool bRet = SwCrsrShell::GotoFormatField(rField); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -673,13 +673,13 @@ const SwRangeRedline* SwWrtShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect return pRedline; } -bool SwWrtShell::SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr ) +bool SwWrtShell::SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr ) { bool bRet; { SwMvContext aMvContext(this); SttSelect(); - bRet = SwCrsrShell::SelectTxtAttr( nWhich, false, pAttr ); + bRet = SwCrsrShell::SelectTextAttr( nWhich, false, pAttr ); } EndSelect(); return bRet; diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index afe4d925c8c2..f075de555502 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -135,7 +135,7 @@ long SwWrtShell::SelAll() // Query these early, before we move the cursor. bool bHasWholeTabSelection = HasWholeTabSelection(); - bool bIsCursorInTable = IsCrsrInTbl(); + bool bIsCursorInTable = IsCrsrInTable(); if (!bHasWholeTabSelection) { @@ -173,9 +173,9 @@ long SwWrtShell::SelAll() if (bNeedsExtendedSelectAll) { - // Disable table cursor to make sure getShellCrsr() returns m_pCurCrsr, not m_pTblCrsr. + // Disable table cursor to make sure getShellCrsr() returns m_pCurCrsr, not m_pTableCrsr. if (IsTableMode()) - TblCrsrToCursor(); + TableCrsrToCursor(); // Do the extended select all on m_pCurCrsr. ExtendedSelectAll(/*bFootnotes =*/ false); } @@ -236,13 +236,13 @@ sal_uLong SwWrtShell::SearchTempl( const OUString &rTempl, // no enhancement of existing selections if(!(eFlags & FND_IN_SEL)) ClearMark(); - SwTxtFmtColl *pColl = GetParaStyle(rTempl, SwWrtShell::GETSTYLE_CREATESOME); - SwTxtFmtColl *pReplaceColl = 0; + SwTextFormatColl *pColl = GetParaStyle(rTempl, SwWrtShell::GETSTYLE_CREATESOME); + SwTextFormatColl *pReplaceColl = 0; if( pReplTempl ) pReplaceColl = GetParaStyle(*pReplTempl, SwWrtShell::GETSTYLE_CREATESOME ); bool bCancel = false; - sal_uLong nRet = Find(pColl? *pColl: GetDfltTxtFmtColl(), + sal_uLong nRet = Find(pColl? *pColl: GetDfltTextFormatColl(), eStt,eEnd, bCancel, eFlags, pReplaceColl); if(bCancel) { @@ -578,7 +578,7 @@ void SwWrtShell::LeaveExtMode() long SwWrtShell::SttLeaveSelect(const Point *, bool ) { - if(SwCrsrShell::HasSelection() && !IsSelTblCells() && m_bClearMark) { + if(SwCrsrShell::HasSelection() && !IsSelTableCells() && m_bClearMark) { return 0; } ClearMark(); @@ -705,15 +705,15 @@ void SwWrtShell::LeaveSelFrmMode() // Description: execute framebound macro -IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt ) +IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFormat ) { - const SwFrmFmt *pFmt = pFlyFmt ? static_cast<SwFrmFmt*>(pFlyFmt) : GetFlyFrmFmt(); - OSL_ENSURE(pFmt, "no frame format"); - const SvxMacroItem &rFmtMac = pFmt->GetMacro(); + const SwFrameFormat *pFormat = pFlyFormat ? static_cast<SwFrameFormat*>(pFlyFormat) : GetFlyFrameFormat(); + OSL_ENSURE(pFormat, "no frame format"); + const SvxMacroItem &rFormatMac = pFormat->GetMacro(); - if(rFmtMac.HasMacro(SW_EVENT_OBJECT_SELECT)) + if(rFormatMac.HasMacro(SW_EVENT_OBJECT_SELECT)) { - const SvxMacro &rMac = rFmtMac.GetMacro(SW_EVENT_OBJECT_SELECT); + const SvxMacro &rMac = rFormatMac.GetMacro(SW_EVENT_OBJECT_SELECT); if( IsFrmSelected() ) m_bLayoutMode = true; CallChgLnk(); @@ -783,8 +783,8 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, bool ) long SwWrtShell::DefaultDrag(const Point *, bool ) { - if( IsSelTblCells() ) - m_aSelTblLink.Call(this); + if( IsSelTableCells() ) + m_aSelTableLink.Call(this); return 1; } @@ -795,8 +795,8 @@ long SwWrtShell::DefaultEndDrag(const Point * /*pPt*/, bool ) if( IsExtSel() ) LeaveExtSel(); - if( IsSelTblCells() ) - m_aSelTblLink.Call(this); + if( IsSelTableCells() ) + m_aSelTableLink.Call(this); EndSelect(); return 1; } @@ -806,7 +806,7 @@ bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR { SwMvContext aMvContext(this); SttSelect(); - if(SelTblRowCol( rPt, pEnd, bRowDrag )) + if(SelTableRowCol( rPt, pEnd, bRowDrag )) { m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; @@ -819,7 +819,7 @@ bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR bool SwWrtShell::SelectTableRow() { - if ( SelTblRow() ) + if ( SelTableRow() ) { m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; @@ -830,7 +830,7 @@ bool SwWrtShell::SelectTableRow() bool SwWrtShell::SelectTableCol() { - if ( SelTblCol() ) + if ( SelTableCol() ) { m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; @@ -841,7 +841,7 @@ bool SwWrtShell::SelectTableCol() bool SwWrtShell::SelectTableCell() { - if ( SelTblBox() ) + if ( SelTableBox() ) { m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; @@ -863,7 +863,7 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) if( IsAddMode() || !(nSelection & nsSelectionType::SEL_TXT) ) return NO_WORD; - OUString sTxt; + OUString sText; CharClass& rCC = GetAppCharClass(); // If the first character is no word character, @@ -871,8 +871,8 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) sal_Unicode cPrev = GetChar(false); sal_Unicode cNext = GetChar(true, -1); if( !cPrev || !cNext || - !rCC.isLetterNumeric( ( sTxt = OUString(cPrev) ), 0 ) || - !rCC.isLetterNumeric( ( sTxt = OUString(cNext) ), 0 ) ) + !rCC.isLetterNumeric( ( sText = OUString(cPrev) ), 0 ) || + !rCC.isLetterNumeric( ( sText = OUString(cNext) ), 0 ) ) return NO_WORD; cPrev = GetChar(false, -1); @@ -883,8 +883,8 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) if(!cWord && cPrev && cNext && CH_TXTATR_BREAKWORD != cPrev && CH_TXTATR_INWORD != cPrev && CH_TXTATR_BREAKWORD != cNext && CH_TXTATR_INWORD != cNext && - !rCC.isLetterNumeric( ( sTxt = OUString(cPrev) ), 0 ) && - !rCC.isLetterNumeric( ( sTxt = OUString(cNext) ), 0 ) ) + !rCC.isLetterNumeric( ( sText = OUString(cPrev) ), 0 ) && + !rCC.isLetterNumeric( ( sText = OUString(cNext) ), 0 ) ) cWord = WORD_NO_SPACE; if(cWord == WORD_NO_SPACE && ' ' == cPrev ) diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 669b23632179..08422c796ab2 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -438,7 +438,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName // Insert object into the Core. // From ClipBoard or Insert -bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFmt **pFlyFrmFmt ) +bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrameFormat **pFlyFrameFormat ) { ResetCursorStack(); StartAllAction(); @@ -512,14 +512,14 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm aSz.Width() = aBound.Width(); } aFrmMgr.SetSize( aSz ); - SwFlyFrmFmt *pFmt = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() ); + SwFlyFrameFormat *pFormat = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() ); // --> #i972# if ( bStarMath && mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT ) ) AlignFormulaToBaseline( xRef.GetObject() ); - if (pFlyFrmFmt) - *pFlyFrmFmt = pFmt; + if (pFlyFrameFormat) + *pFlyFrameFormat = pFormat; if ( SotExchange::IsChart( aCLSID ) ) { @@ -615,7 +615,7 @@ void SwWrtShell::MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, const SwRect *pFlyPrtRect, const SwRect *pFlyFrmRect, - const bool bNoTxtFrmPrtAreaChanged ) + const bool bNoTextFrmPrtAreaChanged ) { // 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 - || ( bNoTxtFrmPrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) ) + || ( bNoTextFrmPrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) ) { pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); } @@ -800,11 +800,11 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( bUseObjectSize ) { // --> this moves non-resizable object so that when adding borders the baseline remains the same - const SwFlyFrmFmt *pFlyFrmFmt = dynamic_cast< const SwFlyFrmFmt * >( GetFlyFrmFmt() ); - OSL_ENSURE( pFlyFrmFmt, "Could not find fly frame." ); - if ( pFlyFrmFmt ) + const SwFlyFrameFormat *pFlyFrameFormat = dynamic_cast< const SwFlyFrameFormat * >( GetFlyFrameFormat() ); + OSL_ENSURE( pFlyFrameFormat, "Could not find fly frame." ); + if ( pFlyFrameFormat ) { - const Point &rPoint = pFlyFrmFmt->GetLastFlyFrmPrtRectPos(); + const Point &rPoint = pFlyFrameFormat->GetLastFlyFrmPrtRectPos(); SwRect aRect( pFlyPrtRect ? *pFlyPrtRect : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() )); aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct. @@ -841,7 +841,7 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio SwActContext aActContext(this); StartUndo(UNDO_UI_INSERT_PAGE_BREAK); - if ( !IsCrsrInTbl() ) + if ( !IsCrsrInTable() ) { if(HasSelection()) DelRight(); @@ -854,12 +854,12 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio ? FindPageDescByName( *pPageDesc, true ) : 0; if( pDesc ) { - SwFmtPageDesc aDesc( pDesc ); + SwFormatPageDesc aDesc( pDesc ); aDesc.SetNumOffset( oPgNum ); SetAttrItem( aDesc ); } else - SetAttrItem( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) ); + SetAttrItem( SvxFormatBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) ); EndUndo(UNDO_UI_INSERT_PAGE_BREAK); } } @@ -895,13 +895,13 @@ void SwWrtShell::InsertColumnBreak() { StartUndo(UNDO_UI_INSERT_COLUMN_BREAK); - if ( !IsCrsrInTbl() ) + if ( !IsCrsrInTable() ) { if(HasSelection()) DelRight(); SwFEShell::SplitNode( false, false ); } - SetAttrItem(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); + SetAttrItem(SvxFormatBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); EndUndo(UNDO_UI_INSERT_COLUMN_BREAK); } @@ -923,7 +923,7 @@ void SwWrtShell::InsertFootnote(const OUString &rStr, bool bEndNote, bool bEdit ClearMark(); } SwPosition aPos = *GetCrsr()->GetPoint(); - SwFmtFtn aFootNote( bEndNote ); + SwFormatFootnote aFootNote( bEndNote ); if(!rStr.isEmpty()) aFootNote.SetNumStr( rStr ); @@ -933,7 +933,7 @@ void SwWrtShell::InsertFootnote(const OUString &rStr, bool bEndNote, bool bEdit { // For editing the footnote text. Left(CRSR_SKIP_CHARS, false, 1, false ); - GotoFtnTxt(); + GotoFootnoteText(); } m_aNavigationMgr.addEntry(aPos); } @@ -943,7 +943,7 @@ void SwWrtShell::InsertFootnote(const OUString &rStr, bool bEndNote, bool bEdit // - of deleting selected content; // - of reset of the Cursorstack if necessary. -void SwWrtShell::SplitNode( bool bAutoFmt, bool bCheckTableStart ) +void SwWrtShell::SplitNode( bool bAutoFormat, bool bCheckTableStart ) { ResetCursorStack(); if( CanInsert() ) @@ -958,7 +958,7 @@ void SwWrtShell::SplitNode( bool bAutoFmt, bool bCheckTableStart ) DelRight(); } - SwFEShell::SplitNode( bAutoFmt, bCheckTableStart ); + SwFEShell::SplitNode( bAutoFormat, bCheckTableStart ); if( bHasSel ) EndUndo( UNDO_INSERT ); } @@ -970,7 +970,7 @@ void SwWrtShell::SplitNode( bool bAutoFmt, bool bCheckTableStart ) // into a number and less than nMaxRules. // To test the CharFormats at the numbering -// external void SetNumChrFmt( SwWrtShell*, SwNumRules& ); +// external void SetNumChrFormat( SwWrtShell*, SwNumRules& ); // -> #i40041# // Preconditions (as far as OD has figured out): @@ -994,7 +994,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) bool bContinueFoundNumRule( false ); bool bActivateOutlineRule( false ); int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == true - SwTxtFmtColl * pColl = GetCurTxtFmtColl(); + SwTextFormatColl * pColl = GetCurTextFormatColl(); if ( pColl ) { // retrieve numbering rule at paragraph @@ -1028,9 +1028,9 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // check, if text node at current cursor positioned is counted. // If not, let it been counted. Then it has to be checked, // of the outline numbering has to be activated or continued. - SwTxtNode* pTxtNode = - GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode(); - if ( pTxtNode && !pTxtNode->IsCountedInList() ) + SwTextNode* pTextNode = + GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + if ( pTextNode && !pTextNode->IsCountedInList() ) { // check, if numbering of the outline level of the paragraph // style is active. If not, activate this outline level. @@ -1135,14 +1135,14 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // do not change found numbering/bullet rule, if it should only be continued. if ( !bContinueFoundNumRule ) { - SwTxtNode * pTxtNode = GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode(); + SwTextNode * pTextNode = GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); - if (pTxtNode) + if (pTextNode) { // use above retrieve outline level, if outline numbering has to be activated. int nLevel = bActivateOutlineRule ? nActivateOutlineLvl - : pTxtNode->GetActualListLevel(); + : pTextNode->GetActualListLevel(); if (nLevel < 0) nLevel = 0; @@ -1150,25 +1150,25 @@ void SwWrtShell::NumOrBulletOn(bool bNum) if (nLevel >= MAXLEVEL) nLevel = MAXLEVEL - 1; - SwNumFmt aFmt(aNumRule.Get(static_cast<sal_uInt16>(nLevel))); + SwNumFormat aFormat(aNumRule.Get(static_cast<sal_uInt16>(nLevel))); if (bNum) - aFmt.SetNumberingType(SVX_NUM_ARABIC); + aFormat.SetNumberingType(SVX_NUM_ARABIC); else { // #i63395# Only apply user defined default bullet font if ( numfunc::IsDefBulletFontUserDefined() ) { const vcl::Font* pFnt = &numfunc::GetDefBulletFont(); - aFmt.SetBulletFont( pFnt ); + aFormat.SetBulletFont( pFnt ); } - aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel))); - aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); + aFormat.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel))); + aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL); // #i93908# clear suffix for bullet lists - aFmt.SetPrefix(OUString()); - aFmt.SetSuffix(OUString()); + aFormat.SetPrefix(OUString()); + aFormat.SetSuffix(OUString()); } - aNumRule.Set(static_cast<sal_uInt16>(nLevel), aFmt); + aNumRule.Set(static_cast<sal_uInt16>(nLevel), aFormat); } } @@ -1182,7 +1182,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) numfunc::GetDefaultPositionAndSpaceMode() ); SwNumRule aNumRule( GetUniqueNumRuleName(), ePosAndSpaceMode ); // Append the character template at the numbering. - SwCharFmt* pChrFmt; + SwCharFormat* pChrFormat; SwDocShell* pDocSh = GetView().GetDocShell(); // #i63395# // Only apply user defined default bullet font @@ -1192,16 +1192,16 @@ void SwWrtShell::NumOrBulletOn(bool bNum) if (bNum) { - pChrFmt = GetCharFmtFromPool( RES_POOLCHR_NUM_LEVEL ); + pChrFormat = GetCharFormatFromPool( RES_POOLCHR_NUM_LEVEL ); } else { - pChrFmt = GetCharFmtFromPool( RES_POOLCHR_BUL_LEVEL ); + pChrFormat = GetCharFormatFromPool( RES_POOLCHR_BUL_LEVEL ); } - const SwTxtNode* pTxtNode = GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode(); - const SwTwips nWidthOfTabs = pTxtNode - ? pTxtNode->GetWidthOfLeadingTabs() + const SwTextNode* pTextNode = GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + const SwTwips nWidthOfTabs = pTextNode + ? pTextNode->GetWidthOfLeadingTabs() : 0; GetDoc()->getIDocumentContentOperations().RemoveLeadingWhiteSpace( *GetCrsr()->GetPoint() ); @@ -1209,8 +1209,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum) const bool bRightToLeft = IsInRightToLeftText(); for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl ) { - SwNumFmt aFmt( aNumRule.Get( nLvl ) ); - aFmt.SetCharFmt( pChrFmt ); + SwNumFormat aFormat( aNumRule.Get( nLvl ) ); + aFormat.SetCharFormat( pChrFormat ); if (! bNum) { @@ -1218,13 +1218,13 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // Only apply user defined default bullet font if ( pFnt ) { - aFmt.SetBulletFont( pFnt ); + aFormat.SetBulletFont( pFnt ); } - aFmt.SetBulletChar( numfunc::GetBulletChar(nLvl) ); - aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); + aFormat.SetBulletChar( numfunc::GetBulletChar(nLvl) ); + aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL); // #i93908# clear suffix for bullet lists - aFmt.SetPrefix(OUString()); - aFmt.SetSuffix(OUString()); + aFormat.SetPrefix(OUString()); + aFormat.SetSuffix(OUString()); } // #i95907# @@ -1233,11 +1233,11 @@ void SwWrtShell::NumOrBulletOn(bool bNum) if(bHtml && nLvl) { // 1/2" for HTML - aFmt.SetAbsLSpace(nLvl * 720); + aFormat.SetAbsLSpace(nLvl * 720); } else if ( nWidthOfTabs > 0 ) { - aFmt.SetAbsLSpace(nWidthOfTabs + nLvl * 720); + aFormat.SetAbsLSpace(nWidthOfTabs + nLvl * 720); } } @@ -1245,28 +1245,28 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // numbering/bullet should be rtl in rtl paragraph: if ( bRightToLeft ) { - aFmt.SetNumAdjust( SVX_ADJUST_RIGHT ); + aFormat.SetNumAdjust( SVX_ADJUST_RIGHT ); } - aNumRule.Set( nLvl, aFmt ); + aNumRule.Set( nLvl, aFormat ); } // #i95907# - if ( pTxtNode && + if ( pTextNode && ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT ) { - const SwTwips nTxtNodeIndent = pTxtNode->GetAdditionalIndentForStartingNewList(); - if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 ) + const SwTwips nTextNodeIndent = pTextNode->GetAdditionalIndentForStartingNewList(); + if ( ( nTextNodeIndent + nWidthOfTabs ) != 0 ) { // #i111172#/fdo#85666 // If text node is already inside a list, assure that the indents // are the same. Thus, adjust the indent change value by subtracting // indents of to be applied list style. - SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs; - if ( pTxtNode->GetNumRule() ) + SwTwips nIndentChange = nTextNodeIndent + nWidthOfTabs; + if ( pTextNode->GetNumRule() ) { - int nLevel = pTxtNode->GetActualListLevel(); + int nLevel = pTextNode->GetActualListLevel(); if (nLevel < 0) nLevel = 0; @@ -1274,10 +1274,10 @@ void SwWrtShell::NumOrBulletOn(bool bNum) if (nLevel >= MAXLEVEL) nLevel = MAXLEVEL - 1; - const SwNumFmt aFmt( aNumRule.Get( nLevel ) ); - if ( aFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + const SwNumFormat aFormat( aNumRule.Get( nLevel ) ); + if ( aFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent(); + nIndentChange -= aFormat.GetIndentAt() + aFormat.GetFirstLineIndent(); } } aNumRule.ChangeIndent( nIndentChange ); @@ -1307,12 +1307,12 @@ void SwWrtShell::NumOrBulletOff() { SwNumRule aNumRule(*pCurNumRule); - SwTxtNode * pTxtNode = - GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode(); + SwTextNode * pTextNode = + GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); - if (pTxtNode) + if (pTextNode) { - int nLevel = pTxtNode->GetActualListLevel(); + int nLevel = pTextNode->GetActualListLevel(); if (nLevel < 0) nLevel = 0; @@ -1320,10 +1320,10 @@ void SwWrtShell::NumOrBulletOff() if (nLevel >= MAXLEVEL) nLevel = MAXLEVEL - 1; - SwNumFmt aFmt(aNumRule.Get(static_cast<sal_uInt16>(nLevel))); + SwNumFormat aFormat(aNumRule.Get(static_cast<sal_uInt16>(nLevel))); - aFmt.SetNumberingType(SVX_NUM_NUMBER_NONE); - aNumRule.Set(nLevel, aFmt); + aFormat.SetNumberingType(SVX_NUM_NUMBER_NONE); + aNumRule.Set(nLevel, aFormat); // no start or continuation of a list - the outline style is only changed. SetCurNumRule( aNumRule, false ); @@ -1408,7 +1408,7 @@ SelectionType SwWrtShell::GetSelectionType() const return nsSelectionType::SEL_FRM; } - if ( IsCrsrInTbl() ) + if ( IsCrsrInTable() ) nCnt |= nsSelectionType::SEL_TBL; if ( IsTableMode() ) @@ -1418,12 +1418,12 @@ SelectionType SwWrtShell::GetSelectionType() const const SwNumRule* pNumRule = GetNumRuleAtCurrCrsrPos(); if ( pNumRule ) { - const SwTxtNode* pTxtNd = - GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode(); + const SwTextNode* pTextNd = + GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); - if ( pTxtNd && pTxtNd->IsInList() ) + if ( pTextNd && pTextNd->IsInList() ) { - int nLevel = pTxtNd->GetActualListLevel(); + int nLevel = pTextNd->GetActualListLevel(); if (nLevel < 0) nLevel = 0; @@ -1431,8 +1431,8 @@ SelectionType SwWrtShell::GetSelectionType() const if (nLevel >= MAXLEVEL) nLevel = MAXLEVEL - 1; - const SwNumFmt& rFmt = pNumRule->Get(nLevel); - if ( SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() ) + const SwNumFormat& rFormat = pNumRule->Get(nLevel); + if ( SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType() ) nCnt |= nsSelectionType::SEL_NUM; } } @@ -1445,14 +1445,14 @@ SelectionType SwWrtShell::GetSelectionType() const // text collection with this name exists, or // this is a default template. -SwTxtFmtColl *SwWrtShell::GetParaStyle(const OUString &rCollName, GetStyle eCreate ) +SwTextFormatColl *SwWrtShell::GetParaStyle(const OUString &rCollName, GetStyle eCreate ) { - SwTxtFmtColl* pColl = FindTxtFmtCollByName( rCollName ); + SwTextFormatColl* pColl = FindTextFormatCollByName( rCollName ); if( !pColl && GETSTYLE_NOCREATE != eCreate ) { sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCollName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate ) - pColl = GetTxtCollFromPool( nId ); + pColl = GetTextCollFromPool( nId ); } return pColl; } @@ -1462,31 +1462,31 @@ SwTxtFmtColl *SwWrtShell::GetParaStyle(const OUString &rCollName, GetStyle eCrea // character template with this name exists, or // this is a default template or template is automatic. -SwCharFmt *SwWrtShell::GetCharStyle(const OUString &rFmtName, GetStyle eCreate ) +SwCharFormat *SwWrtShell::GetCharStyle(const OUString &rFormatName, GetStyle eCreate ) { - SwCharFmt* pFmt = FindCharFmtByName( rFmtName ); - if( !pFmt && GETSTYLE_NOCREATE != eCreate ) + SwCharFormat* pFormat = FindCharFormatByName( rFormatName ); + if( !pFormat && GETSTYLE_NOCREATE != eCreate ) { - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rFormatName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate ) - pFmt = static_cast<SwCharFmt*>(GetFmtFromPool( nId )); + pFormat = static_cast<SwCharFormat*>(GetFormatFromPool( nId )); } - return pFmt; + return pFormat; } -// Find the table format with the name rFmtname +// Find the table format with the name rFormatname // Returns: Pointer at the collection or 0, if no // frame format with this name exists or // this is a default format or the format is automatic. -SwFrmFmt *SwWrtShell::GetTblStyle(const OUString &rFmtName) +SwFrameFormat *SwWrtShell::GetTableStyle(const OUString &rFormatName) { - for( size_t i = GetTblFrmFmtCount(); i; ) + for( size_t i = GetTableFrameFormatCount(); i; ) { - SwFrmFmt *pFmt = &GetTblFrmFmt( --i ); - if( !pFmt->IsDefault() && - pFmt->GetName() == rFmtName && IsUsed( *pFmt ) ) - return pFmt; + SwFrameFormat *pFormat = &GetTableFrameFormat( --i ); + if( !pFormat->IsDefault() && + pFormat->GetName() == rFormatName && IsUsed( *pFormat ) ) + return pFormat; } return 0; } @@ -1519,18 +1519,18 @@ OUString SwWrtShell::GetCurPageStyle( const bool bCalcFrm ) const void SwWrtShell::QuickUpdateStyle() { - SwTxtFmtColl *pColl = GetCurTxtFmtColl(); + SwTextFormatColl *pColl = GetCurTextFormatColl(); // Default cannot be changed if(pColl && !pColl->IsDefault()) { FillByEx(pColl); // Also apply the template to remove hard attribute assignment. - SetTxtFmtColl(pColl); + SetTextFormatColl(pColl); } } -void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM ) +void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM ) { SwPaM* pCrsr = pPaM ? pPaM : GetCrsr( ); SfxItemSet aCoreSet( GetAttrPool(), @@ -1568,16 +1568,16 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet ResetAttr( std::set<sal_uInt16>(), pCrsr ); SetAttrSet(aCoreSet, SetAttrMode::DEFAULT, pCrsr); } - mpDoc->ChgFmt(*pColl, rStyleSet ); + mpDoc->ChgFormat(*pColl, rStyleSet ); EndAction(); } -void SwWrtShell::AutoUpdateFrame( SwFrmFmt* pFmt, const SfxItemSet& rStyleSet ) +void SwWrtShell::AutoUpdateFrame( SwFrameFormat* pFormat, const SfxItemSet& rStyleSet ) { StartAction(); ResetFlyFrmAttr( 0, &rStyleSet ); - pFmt->SetFmtAttr( rStyleSet ); + pFormat->SetFormatAttr( rStyleSet ); EndAction(); } @@ -1709,10 +1709,10 @@ OUString SwWrtShell::GetSelDescr() const break; case nsSelectionType::SEL_FRM: { - const SwFrmFmt * pFrmFmt = GetCurFrmFmt(); + const SwFrameFormat * pFrameFormat = GetCurFrameFormat(); - if (pFrmFmt) - aResult = pFrmFmt->GetDescription(); + if (pFrameFormat) + aResult = pFrameFormat->GetDescription(); } break; case nsSelectionType::SEL_DRW: @@ -1782,18 +1782,18 @@ void SwWrtShell::ChangeHeaderOrFooter( if( bExecute ) { bChgd = true; - SwFrmFmt &rMaster = aDesc.GetMaster(); + SwFrameFormat &rMaster = aDesc.GetMaster(); if(bHeader) - rMaster.SetFmtAttr( SwFmtHeader( bOn )); + rMaster.SetFormatAttr( SwFormatHeader( bOn )); else - rMaster.SetFmtAttr( SwFmtFooter( bOn )); + rMaster.SetFormatAttr( SwFormatFooter( bOn )); if( bOn ) { SvxULSpaceItem aUL(bHeader ? 0 : MM50, bHeader ? MM50 : 0, RES_UL_SPACE ); - SwFrmFmt* pFmt = bHeader ? - const_cast<SwFrmFmt*>(rMaster.GetHeader().GetHeaderFmt()) : - const_cast<SwFrmFmt*>(rMaster.GetFooter().GetFooterFmt()); - pFmt->SetFmtAttr( aUL ); + SwFrameFormat* pFormat = bHeader ? + const_cast<SwFrameFormat*>(rMaster.GetHeader().GetHeaderFormat()) : + const_cast<SwFrameFormat*>(rMaster.GetFooter().GetFooterFormat()); + pFormat->SetFormatAttr( aUL ); } } if( bChgd ) diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index b9cf0f6957f9..685fa8f04bbb 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -68,7 +68,7 @@ #include <LibreOfficeKit/LibreOfficeKitEnums.h> -void SwWrtShell::Insert(SwField &rFld) +void SwWrtShell::Insert(SwField &rField) { ResetCursorStack(); if(!CanInsert()) @@ -76,7 +76,7 @@ void SwWrtShell::Insert(SwField &rFld) StartAllAction(); SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, rFld.GetDescription()); + aRewriter.AddRule(UndoArg1, rField.GetDescription()); StartUndo(UNDO_INSERT, &aRewriter); @@ -84,15 +84,15 @@ void SwWrtShell::Insert(SwField &rFld) boost::scoped_ptr<SwPaM> pAnnotationTextRange; if ( HasSelection() ) { - if ( rFld.GetTyp()->Which() == RES_POSTITFLD ) + if ( rField.GetTyp()->Which() == RES_POSTITFLD ) { // for annotation fields: // - keep the current selection in order to create a corresponding annotation mark // - collapse cursor to its end if ( IsTableMode() ) { - GetTblCrs()->Normalize( false ); - const SwPosition rStartPos( *(GetTblCrs()->GetMark()->nNode.GetNode().GetCntntNode()), 0 ); + GetTableCrs()->Normalize( false ); + const SwPosition rStartPos( *(GetTableCrs()->GetMark()->nNode.GetNode().GetContentNode()), 0 ); KillPams(); if ( !IsEndOfPara() ) { @@ -115,7 +115,7 @@ void SwWrtShell::Insert(SwField &rFld) } } - SwEditShell::Insert2(rFld, bDeleted); + SwEditShell::Insert2(rField, bDeleted); if ( pAnnotationTextRange ) { @@ -133,7 +133,7 @@ void SwWrtShell::Insert(SwField &rFld) // Start the field update -void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst ) +void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst ) { // Go through the list of fields and updating SwInputFieldList* pTmp = pLst; @@ -152,14 +152,14 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst ) pTmp->GotoFieldPos( i ); SwField* pField = pTmp->GetField( i ); if(pField->GetTyp()->Which() == RES_DROPDOWN) - bCancel = StartDropDownFldDlg( pField, true, &aDlgPos ); + bCancel = StartDropDownFieldDlg( pField, true, &aDlgPos ); else - bCancel = StartInputFldDlg( pField, true, 0, &aDlgPos); + bCancel = StartInputFieldDlg( pField, true, 0, &aDlgPos); if (!bCancel) { // Otherwise update error at multi-selection: - pTmp->GetField( i )->GetTyp()->UpdateFlds(); + pTmp->GetField( i )->GetTyp()->UpdateFields(); } } pTmp->PopCrsr(); @@ -171,39 +171,39 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst ) // Listener class: will close InputField dialog if input field(s) // is(are) deleted (for instance, by an extension) after the dialog shows up. -// Otherwise, the for loop in SwWrtShell::UpdateInputFlds will crash when doing: -// 'pTmp->GetField( i )->GetTyp()->UpdateFlds();' +// Otherwise, the for loop in SwWrtShell::UpdateInputFields will crash when doing: +// 'pTmp->GetField( i )->GetTyp()->UpdateFields();' // on a deleted field. class FieldDeletionModify : public SwModify { public: - FieldDeletionModify(AbstractFldInputDlg* pInputFieldDlg, SwField* pFld) + FieldDeletionModify(AbstractFieldInputDlg* pInputFieldDlg, SwField* pField) : mpInputFieldDlg(pInputFieldDlg) - , mpFmtFld(NULL) + , mpFormatField(NULL) { - SwInputField *const pInputField(dynamic_cast<SwInputField*>(pFld)); - SwSetExpField *const pSetExpFld(dynamic_cast<SwSetExpField*>(pFld)); + SwInputField *const pInputField(dynamic_cast<SwInputField*>(pField)); + SwSetExpField *const pSetExpField(dynamic_cast<SwSetExpField*>(pField)); - if (pInputField && pInputField->GetFmtFld()) + if (pInputField && pInputField->GetFormatField()) { - mpFmtFld = pInputField->GetFmtFld(); + mpFormatField = pInputField->GetFormatField(); } - else if (pSetExpFld && pSetExpFld->GetFmtFld()) + else if (pSetExpField && pSetExpField->GetFormatField()) { - mpFmtFld = pSetExpFld->GetFmtFld(); + mpFormatField = pSetExpField->GetFormatField(); } // Register for possible field deletion while dialog is open - if (mpFmtFld) - mpFmtFld->Add(this); + if (mpFormatField) + mpFormatField->Add(this); } virtual ~FieldDeletionModify() { - if (mpFmtFld) + if (mpFormatField) { // Dialog closed, remove modification listener - mpFmtFld->Remove(this); + mpFormatField->Remove(this); } } @@ -216,25 +216,25 @@ class FieldDeletionModify : public SwModify { case RES_REMOVE_UNO_OBJECT: case RES_OBJECTDYING: - mpFmtFld = NULL; + mpFormatField = NULL; mpInputFieldDlg->EndDialog(RET_CANCEL); break; } } } private: - AbstractFldInputDlg* mpInputFieldDlg; - SwFmtFld* mpFmtFld; + AbstractFieldInputDlg* mpInputFieldDlg; + SwFormatField* mpFormatField; }; // Start input dialog for a specific field -bool SwWrtShell::StartInputFldDlg( SwField* pFld, bool bNextButton, +bool SwWrtShell::StartInputFieldDlg( SwField* pField, bool bNextButton, vcl::Window* pParentWin, OString* pWindowState ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - boost::scoped_ptr<AbstractFldInputDlg> pDlg(pFact->CreateFldInputDlg(pParentWin, *this, pFld, bNextButton)); + boost::scoped_ptr<AbstractFieldInputDlg> pDlg(pFact->CreateFieldInputDlg(pParentWin, *this, pField, bNextButton)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if(pWindowState && !pWindowState->isEmpty()) pDlg->SetWindowState(*pWindowState); @@ -242,7 +242,7 @@ bool SwWrtShell::StartInputFldDlg( SwField* pFld, bool bNextButton, bool bRet; { - FieldDeletionModify aModify(pDlg.get(), pFld); + FieldDeletionModify aModify(pDlg.get(), pField); bRet = RET_CANCEL == pDlg->Execute(); } @@ -254,12 +254,12 @@ bool SwWrtShell::StartInputFldDlg( SwField* pFld, bool bNextButton, return bRet; } -bool SwWrtShell::StartDropDownFldDlg(SwField* pFld, bool bNextButton, OString* pWindowState) +bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bNextButton, OString* pWindowState) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - boost::scoped_ptr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(NULL, *this, pFld, bNextButton)); + boost::scoped_ptr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(NULL, *this, pField, bNextButton)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if(pWindowState && !pWindowState->isEmpty()) pDlg->SetWindowState(*pWindowState); @@ -315,10 +315,10 @@ bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) // handler for click on the field given as parameter. // the cursor is positioned on the field. -void SwWrtShell::ClickToField( const SwField& rFld ) +void SwWrtShell::ClickToField( const SwField& rField ) { // cross reference field must not be selected because it moves the cursor - if (RES_GETREFFLD != rFld.GetTyp()->Which()) + if (RES_GETREFFLD != rField.GetTyp()->Which()) { StartAllAction(); Right( CRSR_SKIP_CHARS, true, 1, false ); // Select the field. @@ -327,12 +327,12 @@ void SwWrtShell::ClickToField( const SwField& rFld ) } m_bIsInClickToEdit = true; - switch( rFld.GetTyp()->Which() ) + switch( rField.GetTyp()->Which() ) { case RES_JUMPEDITFLD: { sal_uInt16 nSlotId = 0; - switch( rFld.GetFormat() ) + switch( rField.GetFormat() ) { case JE_FMT_TABLE: nSlotId = FN_INSERT_TABLE; @@ -361,17 +361,17 @@ void SwWrtShell::ClickToField( const SwField& rFld ) case RES_MACROFLD: { - const SwMacroField *pFld = static_cast<const SwMacroField*>(&rFld); - const OUString sText( rFld.GetPar2() ); + const SwMacroField *pField = static_cast<const SwMacroField*>(&rField); + const OUString sText( rField.GetPar2() ); OUString sRet( sText ); - ExecMacro( pFld->GetSvxMacro(), &sRet ); + ExecMacro( pField->GetSvxMacro(), &sRet ); // return value changed? if( sRet != sText ) { StartAllAction(); - const_cast<SwField&>(rFld).SetPar2( sRet ); - rFld.GetTyp()->UpdateFlds(); + const_cast<SwField&>(rField).SetPar2( sRet ); + rField.GetTyp()->UpdateFields(); EndAllAction(); } } @@ -379,37 +379,37 @@ void SwWrtShell::ClickToField( const SwField& rFld ) case RES_GETREFFLD: StartAllAction(); - SwCrsrShell::GotoRefMark( static_cast<const SwGetRefField&>(rFld).GetSetRefName(), - static_cast<const SwGetRefField&>(rFld).GetSubType(), - static_cast<const SwGetRefField&>(rFld).GetSeqNo() ); + SwCrsrShell::GotoRefMark( static_cast<const SwGetRefField&>(rField).GetSetRefName(), + static_cast<const SwGetRefField&>(rField).GetSubType(), + static_cast<const SwGetRefField&>(rField).GetSeqNo() ); EndAllAction(); break; case RES_INPUTFLD: { - const SwInputField* pInputField = dynamic_cast<const SwInputField*>(&rFld); + const SwInputField* pInputField = dynamic_cast<const SwInputField*>(&rField); if ( pInputField == NULL ) { - StartInputFldDlg( const_cast<SwField*>(&rFld), false ); + StartInputFieldDlg( const_cast<SwField*>(&rField), false ); } } break; case RES_SETEXPFLD: - if( static_cast<const SwSetExpField&>(rFld).GetInputFlag() ) - StartInputFldDlg( const_cast<SwField*>(&rFld), false ); + if( static_cast<const SwSetExpField&>(rField).GetInputFlag() ) + StartInputFieldDlg( const_cast<SwField*>(&rField), false ); break; case RES_DROPDOWN : - StartDropDownFldDlg( const_cast<SwField*>(&rFld), false ); + StartDropDownFieldDlg( const_cast<SwField*>(&rField), false ); break; default: - SAL_WARN_IF(rFld.IsClickable(), "sw", "unhandled clickable field!"); + SAL_WARN_IF(rField.IsClickable(), "sw", "unhandled clickable field!"); } m_bIsInClickToEdit = false; } -void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter ) +void SwWrtShell::ClickToINetAttr( const SwFormatINetFormat& rItem, sal_uInt16 nFilter ) { if( rItem.GetValue().isEmpty() ) return ; @@ -427,11 +427,11 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter // So that the implementation of templates is displayed immediately ::LoadURL( *this, rItem.GetValue(), nFilter, rItem.GetTargetFrame() ); - const SwTxtINetFmt* pTxtAttr = rItem.GetTxtINetFmt(); - if( pTxtAttr ) + const SwTextINetFormat* pTextAttr = rItem.GetTextINetFormat(); + if( pTextAttr ) { - const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisited( true ); - const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( true ); + const_cast<SwTextINetFormat*>(pTextAttr)->SetVisited( true ); + const_cast<SwTextINetFormat*>(pTextAttr)->SetVisitedValid( true ); } m_bIsInClickToEdit = false; @@ -442,7 +442,7 @@ bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter ) bool bRet = false; OUString sURL; OUString sTargetFrameName; - const SwFrmFmt* pFnd = IsURLGrfAtPos( rDocPt, &sURL, &sTargetFrameName ); + const SwFrameFormat* pFnd = IsURLGrfAtPos( rDocPt, &sURL, &sTargetFrameName ); if( pFnd && !sURL.isEmpty() ) { bRet = true; @@ -548,8 +548,8 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, } } } - SwFmtINetFmt aFmt( sURL, OUString() ); - InsertURL( aFmt, rBkmk.GetDescription() ); + SwFormatINetFormat aFormat( sURL, OUString() ); + InsertURL( aFormat, rBkmk.GetDescription() ); } else { @@ -580,7 +580,7 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, DoUndo(false); } } - UpdateSection( GetSectionFmtPos( *pIns->GetFmt() ), aSection ); + UpdateSection( GetSectionFormatPos( *pIns->GetFormat() ), aSection ); DoUndo( bDoesUndo ); } } diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx index 0f97fbce9e52..a3ef19ea5a5f 100644 --- a/sw/source/uibase/wrtsh/wrtsh3.cxx +++ b/sw/source/uibase/wrtsh/wrtsh3.cxx @@ -67,11 +67,11 @@ bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* co return bRet; } -bool SwWrtShell::GotoField( const SwFmtFld& rFld ) +bool SwWrtShell::GotoField( const SwFormatField& rField ) { (this->*m_fnKillSel)( 0, false ); - bool bRet = SwCrsrShell::GotoFld( rFld ); + bool bRet = SwCrsrShell::GotoFormatField( rField ); if( bRet && IsSelFrmMode() ) { UnSelectFrm(); |