summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/applab.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app/applab.cxx')
-rw-r--r--sw/source/uibase/app/applab.cxx100
1 files changed, 50 insertions, 50 deletions
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 );