summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx16
-rw-r--r--sw/source/core/unocore/unochart.cxx382
-rw-r--r--sw/source/core/unocore/unocoll.cxx216
-rw-r--r--sw/source/core/unocore/unocrsr.cxx40
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx246
-rw-r--r--sw/source/core/unocore/unodraw.cxx352
-rw-r--r--sw/source/core/unocore/unoevent.cxx16
-rw-r--r--sw/source/core/unocore/unofield.cxx612
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx102
-rw-r--r--sw/source/core/unocore/unoframe.cxx646
-rw-r--r--sw/source/core/unocore/unoftn.cxx130
-rw-r--r--sw/source/core/unocore/unoidx.cxx198
-rw-r--r--sw/source/core/unocore/unomap.cxx12
-rw-r--r--sw/source/core/unocore/unoobj.cxx152
-rw-r--r--sw/source/core/unocore/unoobj2.cxx206
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx174
-rw-r--r--sw/source/core/unocore/unoport.cxx30
-rw-r--r--sw/source/core/unocore/unoportenum.cxx118
-rw-r--r--sw/source/core/unocore/unoredline.cxx30
-rw-r--r--sw/source/core/unocore/unoredlines.cxx22
-rw-r--r--sw/source/core/unocore/unorefmk.cxx214
-rw-r--r--sw/source/core/unocore/unosect.cxx234
-rw-r--r--sw/source/core/unocore/unosett.cxx414
-rw-r--r--sw/source/core/unocore/unosrch.cxx10
-rw-r--r--sw/source/core/unocore/unostyle.cxx248
-rw-r--r--sw/source/core/unocore/unotbl.cxx896
-rw-r--r--sw/source/core/unocore/unotext.cxx290
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx62
28 files changed, 3034 insertions, 3034 deletions
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index e3c479f0032d..9955b4417c59 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -89,28 +89,28 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName,
SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
SwDocStyleSheet* pStyle =
static_cast<SwDocStyleSheet*>(m_pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR));
- SwFmtDrop* pDrop = 0;
- SwFmtCharFmt *pCharFmt = 0;
+ SwFormatDrop* pDrop = 0;
+ SwFormatCharFormat *pCharFormat = 0;
if(pStyle)
{
rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *pStyle ) );
if (RES_PARATR_DROP == pMap->nWID)
{
- pDrop = static_cast<SwFmtDrop*>(rItem.Clone()); // because rItem is const...
- pDrop->SetCharFmt(xStyle->GetCharFmt());
+ pDrop = static_cast<SwFormatDrop*>(rItem.Clone()); // because rItem is const...
+ pDrop->SetCharFormat(xStyle->GetCharFormat());
m_pDoc->SetDefault(*pDrop);
}
else // RES_TXTATR_CHARFMT == pMap->nWID
{
- pCharFmt = static_cast<SwFmtCharFmt*>(rItem.Clone()); // because rItem is const...
- pCharFmt->SetCharFmt(xStyle->GetCharFmt());
- m_pDoc->SetDefault(*pCharFmt);
+ pCharFormat = static_cast<SwFormatCharFormat*>(rItem.Clone()); // because rItem is const...
+ pCharFormat->SetCharFormat(xStyle->GetCharFormat());
+ m_pDoc->SetDefault(*pCharFormat);
}
}
else
throw lang::IllegalArgumentException();
delete pDrop;
- delete pCharFmt;
+ delete pCharFormat;
}
else
throw lang::IllegalArgumentException();
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index ba53b5ecd7cb..82e1d3c3cec7 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -118,16 +118,16 @@ void SwChartLockController_Helper::LockUnlockAllCharts( bool bLock )
if (!pDoc)
return;
- const SwFrmFmts& rTblFmts = *pDoc->GetTblFrmFmts();
- for( size_t n = 0; n < rTblFmts.size(); ++n )
+ const SwFrameFormats& rTableFormats = *pDoc->GetTableFrameFormats();
+ for( size_t n = 0; n < rTableFormats.size(); ++n )
{
- SwTable* pTmpTbl;
- const SwTableNode* pTblNd;
- const SwFrmFmt* pFmt = rTblFmts[ n ];
+ SwTable* pTmpTable;
+ const SwTableNode* pTableNd;
+ const SwFrameFormat* pFormat = rTableFormats[ n ];
- if( 0 != ( pTmpTbl = SwTable::FindTable( pFmt ) ) &&
- 0 != ( pTblNd = pTmpTbl->GetTableNode() ) &&
- pTblNd->GetNodes().IsDocNodes() )
+ if( 0 != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
+ 0 != ( pTableNd = pTmpTable->GetTableNode() ) &&
+ pTableNd->GetNodes().IsDocNodes() )
{
uno::Reference< frame::XModel > xRes;
SwOLENode *pONd;
@@ -137,7 +137,7 @@ void SwChartLockController_Helper::LockUnlockAllCharts( bool bLock )
{
++aIdx;
if (0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
- !pONd->GetChartTblName().isEmpty() /* is chart object? */)
+ !pONd->GetChartTableName().isEmpty() /* is chart object? */)
{
uno::Reference < embed::XEmbeddedObject > xIP = pONd->GetOLEObj().GetOleRef();
if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
@@ -215,38 +215,38 @@ bool FillRangeDescriptor(
return true;
}
-static OUString GetCellRangeName( SwFrmFmt &rTblFmt, SwUnoCrsr &rTblCrsr )
+static OUString GetCellRangeName( SwFrameFormat &rTableFormat, SwUnoCrsr &rTableCrsr )
{
OUString aRes;
//!! see also SwXTextTableCursor::getRangeName
- SwUnoTableCrsr* pUnoTblCrsr = dynamic_cast<SwUnoTableCrsr*>(&rTblCrsr);
- if (!pUnoTblCrsr)
+ SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<SwUnoTableCrsr*>(&rTableCrsr);
+ if (!pUnoTableCrsr)
return OUString();
- pUnoTblCrsr->MakeBoxSels();
+ pUnoTableCrsr->MakeBoxSels();
const SwStartNode* pStart;
const SwTableBox* pStartBox = 0;
const SwTableBox* pEndBox = 0;
- pStart = pUnoTblCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
+ pStart = pUnoTableCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
if (pStart)
{
- const SwTable* pTable = SwTable::FindTable( &rTblFmt );
- pEndBox = pTable->GetTblBox( pStart->GetIndex());
+ const SwTable* pTable = SwTable::FindTable( &rTableFormat );
+ pEndBox = pTable->GetTableBox( pStart->GetIndex());
aRes = pEndBox->GetName();
- if(pUnoTblCrsr->HasMark())
+ if(pUnoTableCrsr->HasMark())
{
- pStart = pUnoTblCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode();
- pStartBox = pTable->GetTblBox( pStart->GetIndex());
+ pStart = pUnoTableCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode();
+ pStartBox = pTable->GetTableBox( pStart->GetIndex());
}
OSL_ENSURE( pStartBox, "start box not found" );
OSL_ENSURE( pEndBox, "end box not found" );
// need to switch start and end?
- if (*pUnoTblCrsr->GetPoint() < *pUnoTblCrsr->GetMark())
+ if (*pUnoTableCrsr->GetPoint() < *pUnoTableCrsr->GetMark())
{
const SwTableBox* pTmpBox = pStartBox;
pStartBox = pEndBox;
@@ -293,21 +293,21 @@ static OUString GetRangeRepFromTableAndCells( const OUString &rTableName,
static bool GetTableAndCellsFromRangeRep(
const OUString &rRangeRepresentation,
- OUString &rTblName,
+ OUString &rTableName,
OUString &rStartCell,
OUString &rEndCell,
bool bSortStartEndCells = true )
{
// parse range representation for table name and cell/range names
// accepted format sth like: "Table1.A2:C5" , "Table2.A2.1:B3.2"
- OUString aTblName; // table name
+ OUString aTableName; // table name
OUString aRange; // cell range
OUString aStartCell; // name of top left cell
OUString aEndCell; // name of bottom right cell
sal_Int32 nIdx = rRangeRepresentation.indexOf( '.' );
if (nIdx >= 0)
{
- aTblName = rRangeRepresentation.copy( 0, nIdx );
+ aTableName = rRangeRepresentation.copy( 0, nIdx );
aRange = rRangeRepresentation.copy( nIdx + 1 );
sal_Int32 nPos = aRange.indexOf( ':' );
if (nPos >= 0) // a cell-range like "Table1.A2:D4"
@@ -330,11 +330,11 @@ static bool GetTableAndCellsFromRangeRep(
}
}
- bool bSuccess = !aTblName.isEmpty() &&
+ bool bSuccess = !aTableName.isEmpty() &&
!aStartCell.isEmpty() && !aEndCell.isEmpty();
if (bSuccess)
{
- rTblName = aTblName;
+ rTableName = aTableName;
rStartCell = aStartCell;
rEndCell = aEndCell;
}
@@ -342,84 +342,84 @@ static bool GetTableAndCellsFromRangeRep(
}
static void GetTableByName( const SwDoc &rDoc, const OUString &rTableName,
- SwFrmFmt **ppTblFmt, SwTable **ppTable)
+ SwFrameFormat **ppTableFormat, SwTable **ppTable)
{
- SwFrmFmt *pTblFmt = NULL;
+ SwFrameFormat *pTableFormat = NULL;
// find frame format of table
//! see SwXTextTables::getByName
- const size_t nCount = rDoc.GetTblFrmFmtCount(true);
- for (size_t i = 0; i < nCount && !pTblFmt; ++i)
+ const size_t nCount = rDoc.GetTableFrameFormatCount(true);
+ for (size_t i = 0; i < nCount && !pTableFormat; ++i)
{
- SwFrmFmt& rTblFmt = rDoc.GetTblFrmFmt(i, true);
- if(rTableName == rTblFmt.GetName())
- pTblFmt = &rTblFmt;
+ SwFrameFormat& rTableFormat = rDoc.GetTableFrameFormat(i, true);
+ if(rTableName == rTableFormat.GetName())
+ pTableFormat = &rTableFormat;
}
- if (ppTblFmt)
- *ppTblFmt = pTblFmt;
+ if (ppTableFormat)
+ *ppTableFormat = pTableFormat;
if (ppTable)
- *ppTable = pTblFmt ? SwTable::FindTable( pTblFmt ) : 0;
+ *ppTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : 0;
}
static void GetFormatAndCreateCursorFromRangeRep(
const SwDoc *pDoc,
const OUString &rRangeRepresentation, // must be a single range (i.e. so called sub-range)
- SwFrmFmt **ppTblFmt, // will be set to the table format of the table used in the range representation
+ SwFrameFormat **ppTableFormat, // will be set to the table format of the table used in the range representation
SwUnoCrsr **ppUnoCrsr ) // will be set to cursor spanning the cell range (cursor will be created!)
{
- OUString aTblName; // table name
+ OUString aTableName; // table name
OUString aStartCell; // name of top left cell
OUString aEndCell; // name of bottom right cell
bool bNamesFound = GetTableAndCellsFromRangeRep( rRangeRepresentation,
- aTblName, aStartCell, aEndCell );
+ aTableName, aStartCell, aEndCell );
if (!bNamesFound)
{
- if (ppTblFmt)
- *ppTblFmt = NULL;
+ if (ppTableFormat)
+ *ppTableFormat = NULL;
if (ppUnoCrsr)
*ppUnoCrsr = NULL;
}
else
{
- SwFrmFmt *pTblFmt = NULL;
+ SwFrameFormat *pTableFormat = NULL;
// is the correct table format already provided?
- if (*ppTblFmt != NULL && (*ppTblFmt)->GetName() == aTblName)
- pTblFmt = *ppTblFmt;
+ if (*ppTableFormat != NULL && (*ppTableFormat)->GetName() == aTableName)
+ pTableFormat = *ppTableFormat;
else
- GetTableByName( *pDoc, aTblName, &pTblFmt, NULL );
+ GetTableByName( *pDoc, aTableName, &pTableFormat, NULL );
- *ppTblFmt = pTblFmt;
+ *ppTableFormat = pTableFormat;
if (ppUnoCrsr != NULL)
{
*ppUnoCrsr = NULL; // default result in case of failure
- SwTable *pTable = pTblFmt ? SwTable::FindTable( pTblFmt ) : 0;
+ SwTable *pTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : 0;
// create new SwUnoCrsr spanning the specified range
//! see also SwXTextTable::GetRangeByName
// #i80314#
- // perform validation check. Thus, pass <true> as 2nd parameter to <SwTable::GetTblBox(..)>
+ // perform validation check. Thus, pass <true> as 2nd parameter to <SwTable::GetTableBox(..)>
const SwTableBox* pTLBox =
- pTable ? pTable->GetTblBox( aStartCell, true ) : 0;
+ pTable ? pTable->GetTableBox( aStartCell, true ) : 0;
if(pTLBox)
{
// The Actions need to be removed here
- UnoActionRemoveContext aRemoveContext(pTblFmt->GetDoc());
+ UnoActionRemoveContext aRemoveContext(pTableFormat->GetDoc());
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// set cursor to top left box of range
- SwUnoCrsr* pUnoCrsr = pTblFmt->GetDoc()->CreateUnoCrsr(aPos, true);
+ SwUnoCrsr* pUnoCrsr = pTableFormat->GetDoc()->CreateUnoCrsr(aPos, true);
pUnoCrsr->Move( fnMoveForward, fnGoNode );
pUnoCrsr->SetRemainInSection( false );
// #i80314#
- // perform validation check. Thus, pass <true> as 2nd parameter to <SwTable::GetTblBox(..)>
- const SwTableBox* pBRBox = pTable->GetTblBox( aEndCell, true );
+ // perform validation check. Thus, pass <true> as 2nd parameter to <SwTable::GetTableBox(..)>
+ const SwTableBox* pBRBox = pTable->GetTableBox( aEndCell, true );
if(pBRBox)
{
pUnoCrsr->SetMark();
@@ -494,7 +494,7 @@ static void SortSubranges( uno::Sequence< OUString > &rSubRanges, bool bCmpByCol
sal_Int32 nLen = rSubRanges.getLength();
OUString *pSubRanges = rSubRanges.getArray();
- OUString aSmallestTblName;
+ OUString aSmallestTableName;
OUString aSmallestStartCell;
OUString aSmallestEndCell;
@@ -502,18 +502,18 @@ static void SortSubranges( uno::Sequence< OUString > &rSubRanges, bool bCmpByCol
{
sal_Int32 nIdxOfSmallest = i;
GetTableAndCellsFromRangeRep( pSubRanges[nIdxOfSmallest],
- aSmallestTblName, aSmallestStartCell, aSmallestEndCell );
+ aSmallestTableName, aSmallestStartCell, aSmallestEndCell );
if (aSmallestEndCell.isEmpty())
aSmallestEndCell = aSmallestStartCell;
for (sal_Int32 k = i+1; k < nLen; ++k)
{
// get cell names for sub range
- OUString aTblName;
+ OUString aTableName;
OUString aStartCell;
OUString aEndCell;
GetTableAndCellsFromRangeRep( pSubRanges[k],
- aTblName, aStartCell, aEndCell );
+ aTableName, aStartCell, aEndCell );
if (aEndCell.isEmpty())
aEndCell = aStartCell;
@@ -522,7 +522,7 @@ static void SortSubranges( uno::Sequence< OUString > &rSubRanges, bool bCmpByCol
aSmallestStartCell, aSmallestEndCell, bCmpByColumn ))
{
nIdxOfSmallest = k;
- aSmallestTblName = aTblName;
+ aSmallestTableName = aTableName;
aSmallestStartCell = aStartCell;
aSmallestEndCell = aEndCell;
}
@@ -631,7 +631,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
const SwOLEObj& rOObj = pOleNode->GetOLEObj();
if( aChartOleObjectName.equals( rOObj.GetCurrentPersistName() ) )
{
- aChartTableName = pOleNode->GetChartTblName();
+ aChartTableName = pOleNode->GetChartTableName();
break;
}
}
@@ -680,19 +680,19 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
#endif
// get table format for that single table from above
- SwFrmFmt *pTblFmt = 0; // pointer to table format
+ SwFrameFormat *pTableFormat = 0; // pointer to table format
SwUnoCrsr *pUnoCrsr = 0; // here required to check if the cells in the range do actually exist
if (aSubRanges.getLength() > 0)
- GetFormatAndCreateCursorFromRangeRep( pDoc, pSubRanges[0], &pTblFmt, &pUnoCrsr );
+ GetFormatAndCreateCursorFromRangeRep( pDoc, pSubRanges[0], &pTableFormat, &pUnoCrsr );
boost::scoped_ptr< SwUnoCrsr > pAuto( pUnoCrsr ); // to end lifetime of object pointed to by pUnoCrsr
- if (!pTblFmt || !pUnoCrsr)
+ if (!pTableFormat || !pUnoCrsr)
throw lang::IllegalArgumentException();
- if(pTblFmt)
+ if(pTableFormat)
{
- SwTable* pTable = SwTable::FindTable( pTblFmt );
- if(pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable( pTableFormat );
+ if(pTable->IsTableComplex())
return xRes; // we can't handle this thus returning an empty references
else
{
@@ -711,9 +711,9 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
sal_Int32 nSubRanges = aSubRanges.getLength();
for (sal_Int32 i = 0; i < nSubRanges; ++i)
{
- OUString aTblName, aStartCell, aEndCell;
+ OUString aTableName, aStartCell, aEndCell;
bool bOk2 = GetTableAndCellsFromRangeRep(
- pSubRanges[i], aTblName, aStartCell, aEndCell );
+ pSubRanges[i], aTableName, aStartCell, aEndCell );
(void) bOk2;
OSL_ENSURE( bOk2, "failed to get table and start/end cells" );
@@ -877,7 +877,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
aDataDesc.nBottom = oi;
aDataDesc.nRight = aDataDesc.nLeft + aDataLen[oi] - 1;
}
- const OUString aBaseName = pTblFmt->GetName() + ".";
+ const OUString aBaseName = pTableFormat->GetName() + ".";
OUString aLabelRange;
if (aLabelIdx[oi] != -1)
@@ -898,15 +898,15 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
// get cursors spanning the cell ranges for label and data
SwUnoCrsr *pLabelUnoCrsr = 0;
SwUnoCrsr *pDataUnoCrsr = 0;
- GetFormatAndCreateCursorFromRangeRep( pDoc, aLabelRange, &pTblFmt, &pLabelUnoCrsr);
- GetFormatAndCreateCursorFromRangeRep( pDoc, aDataRange, &pTblFmt, &pDataUnoCrsr);
+ GetFormatAndCreateCursorFromRangeRep( pDoc, aLabelRange, &pTableFormat, &pLabelUnoCrsr);
+ GetFormatAndCreateCursorFromRangeRep( pDoc, aDataRange, &pTableFormat, &pDataUnoCrsr);
// create XDataSequence's from cursors
if (pLabelUnoCrsr)
- pLabelSeqs[ nSeqsIdx ] = new SwChartDataSequence( *this, *pTblFmt, pLabelUnoCrsr );
+ pLabelSeqs[ nSeqsIdx ] = new SwChartDataSequence( *this, *pTableFormat, pLabelUnoCrsr );
OSL_ENSURE( pDataUnoCrsr, "pointer to data sequence missing" );
if (pDataUnoCrsr)
- pDataSeqs [ nSeqsIdx ] = new SwChartDataSequence( *this, *pTblFmt, pDataUnoCrsr );
+ pDataSeqs [ nSeqsIdx ] = new SwChartDataSequence( *this, *pTableFormat, pDataUnoCrsr );
if (pLabelUnoCrsr || pDataUnoCrsr)
++nSeqsIdx;
}
@@ -1008,9 +1008,9 @@ OUString SwChartDataProvider::GetBrokenCellRangeForExport(
if (-1 == rCellRangeRepresentation.indexOf( ';' ))
{
// get current cell and table names
- OUString aTblName, aStartCell, aEndCell;
+ OUString aTableName, aStartCell, aEndCell;
GetTableAndCellsFromRangeRep( rCellRangeRepresentation,
- aTblName, aStartCell, aEndCell, false );
+ aTableName, aStartCell, aEndCell, false );
sal_Int32 nStartCol = -1, nStartRow = -1, nEndCol = -1, nEndRow = -1;
sw_GetCellPosition( aStartCell, nStartCol, nStartRow );
sw_GetCellPosition( aEndCell, nEndCol, nEndRow );
@@ -1021,7 +1021,7 @@ OUString SwChartDataProvider::GetBrokenCellRangeForExport(
aStartCell = sw_GetCellName( nStartCol, nStartRow );
aEndCell = sw_GetCellName( nEndCol, nEndRow );
- return GetRangeRepFromTableAndCells( aTblName,
+ return GetRangeRepFromTableAndCells( aTableName,
aStartCell, aEndCell, false );
}
@@ -1050,7 +1050,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
return aResult;
}
- SwFrmFmt *pTableFmt = 0;
+ SwFrameFormat *pTableFormat = 0;
SwTable *pTable = 0;
OUString aTableName;
sal_Int32 nTableRows = 0;
@@ -1097,27 +1097,27 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
// get table and cell names for label and values data sequences
// (start and end cell will be sorted, i.e. start cell <= end cell)
- OUString aLabelTblName, aLabelStartCell, aLabelEndCell;
- OUString aValuesTblName, aValuesStartCell, aValuesEndCell;
+ OUString aLabelTableName, aLabelStartCell, aLabelEndCell;
+ OUString aValuesTableName, aValuesStartCell, aValuesEndCell;
OUString aLabelRange, aValuesRange;
if (xCurLabel.is())
aLabelRange = xCurLabel->getSourceRangeRepresentation();
if (xCurValues.is())
aValuesRange = xCurValues->getSourceRangeRepresentation();
if ((!aLabelRange.isEmpty() && !GetTableAndCellsFromRangeRep( aLabelRange,
- aLabelTblName, aLabelStartCell, aLabelEndCell )) ||
+ aLabelTableName, aLabelStartCell, aLabelEndCell )) ||
!GetTableAndCellsFromRangeRep( aValuesRange,
- aValuesTblName, aValuesStartCell, aValuesEndCell ))
+ aValuesTableName, aValuesStartCell, aValuesEndCell ))
{
return aResult; // failed -> return empty property sequence
}
// make sure all sequences use the same table
if (aTableName.isEmpty())
- aTableName = aValuesTblName; // get initial value to compare with
+ aTableName = aValuesTableName; // get initial value to compare with
if (aTableName.isEmpty() ||
- aTableName != aValuesTblName ||
- (!aLabelTblName.isEmpty() && aTableName != aLabelTblName))
+ aTableName != aValuesTableName ||
+ (!aLabelTableName.isEmpty() && aTableName != aLabelTableName))
{
return aResult; // failed -> return empty property sequence
}
@@ -1170,8 +1170,8 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
// build data used to determine 'CellRangeRepresentation' later on
- GetTableByName( *pDoc, aTableName, &pTableFmt, &pTable );
- if (!pTable || pTable->IsTblComplex())
+ GetTableByName( *pDoc, aTableName, &pTableFormat, &pTable );
+ if (!pTable || pTable->IsTableComplex())
return aResult; // failed -> return empty property sequence
nTableRows = pTable->GetTabLines().size();
nTableCols = pTable->GetTabLines().front()->GetTabBoxes().size();
@@ -1377,24 +1377,24 @@ uno::Reference< chart2::data::XDataSequence > SwChartDataProvider::Impl_createDa
if (bDisposed)
throw lang::DisposedException();
- SwFrmFmt *pTblFmt = 0; // pointer to table format
+ SwFrameFormat *pTableFormat = 0; // pointer to table format
SwUnoCrsr *pUnoCrsr = 0; // pointer to new created cursor spanning the cell range
GetFormatAndCreateCursorFromRangeRep( pDoc, rRangeRepresentation,
- &pTblFmt, &pUnoCrsr );
- if (!pTblFmt || !pUnoCrsr)
+ &pTableFormat, &pUnoCrsr );
+ if (!pTableFormat || !pUnoCrsr)
throw lang::IllegalArgumentException();
// check that cursors point and mark are in a single row or column.
- OUString aCellRange( GetCellRangeName( *pTblFmt, *pUnoCrsr ) );
+ OUString aCellRange( GetCellRangeName( *pTableFormat, *pUnoCrsr ) );
SwRangeDescriptor aDesc;
FillRangeDescriptor( aDesc, aCellRange );
if (aDesc.nTop != aDesc.nBottom && aDesc.nLeft != aDesc.nRight)
throw lang::IllegalArgumentException();
- OSL_ENSURE( pTblFmt && pUnoCrsr, "table format or cursor missing" );
+ OSL_ENSURE( pTableFormat && pUnoCrsr, "table format or cursor missing" );
uno::Reference< chart2::data::XDataSequence > xDataSeq;
if (!bTestOnly)
- xDataSeq = new SwChartDataSequence( *this, *pTblFmt, pUnoCrsr );
+ xDataSeq = new SwChartDataSequence( *this, *pTableFormat, pUnoCrsr );
return xDataSeq;
}
@@ -1530,7 +1530,7 @@ void SwChartDataProvider::InvalidateTable( const SwTable *pTable )
if (pTable)
{
if (!bDisposed)
- pTable->GetFrmFmt()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().StartOrContinueLocking();
+ pTable->GetFrameFormat()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().StartOrContinueLocking();
const Set_DataSequenceRef_t &rSet = aDataSequences[ pTable ];
Set_DataSequenceRef_t::const_iterator aIt( rSet.begin() );
@@ -1555,7 +1555,7 @@ bool SwChartDataProvider::DeleteBox( const SwTable *pTable, const SwTableBox &rB
if (pTable)
{
if (!bDisposed)
- pTable->GetFrmFmt()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().StartOrContinueLocking();
+ pTable->GetFrameFormat()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().StartOrContinueLocking();
Set_DataSequenceRef_t &rSet = aDataSequences[ pTable ];
@@ -1611,7 +1611,7 @@ void SwChartDataProvider::DisposeAllDataSequences( const SwTable *pTable )
if (pTable)
{
if (!bDisposed)
- pTable->GetFrmFmt()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().StartOrContinueLocking();
+ pTable->GetFrameFormat()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().StartOrContinueLocking();
//! make a copy of the STL container!
//! This is necessary since calling 'dispose' will implicitly remove an element
@@ -1660,7 +1660,7 @@ void SwChartDataProvider::AddRowCols(
const SwSelBoxes& rBoxes,
sal_uInt16 nLines, bool bBehind )
{
- if (rTable.IsTblComplex())
+ if (rTable.IsTableComplex())
return;
const size_t nBoxes = rBoxes.size();
@@ -1758,12 +1758,12 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange
for (sal_Int32 i = 0; i < nNumRanges; ++i)
{
const OUString aRange( rRangeRepresentation.getToken(0, ';', nPos) );
- SwFrmFmt *pTblFmt = 0; // pointer to table format
- GetFormatAndCreateCursorFromRangeRep( pDoc, aRange, &pTblFmt, NULL );
- if (!pTblFmt)
+ SwFrameFormat *pTableFormat = 0; // pointer to table format
+ GetFormatAndCreateCursorFromRangeRep( pDoc, aRange, &pTableFormat, NULL );
+ if (!pTableFormat)
throw lang::IllegalArgumentException();
- SwTable* pTable = SwTable::FindTable( pTblFmt );
- if (pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable( pTableFormat );
+ if (pTable->IsTableComplex())
throw uno::RuntimeException();
// check that there is only one table used in all ranges
@@ -1772,10 +1772,10 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange
if (pTable != pFirstFoundTable)
throw lang::IllegalArgumentException();
- OUString aTblName;
+ OUString aTableName;
OUString aStartCell;
OUString aEndCell;
- if (!GetTableAndCellsFromRangeRep( aRange, aTblName, aStartCell, aEndCell ))
+ if (!GetTableAndCellsFromRangeRep( aRange, aTableName, aStartCell, aEndCell ))
throw lang::IllegalArgumentException();
sal_Int32 nCol, nRow;
@@ -1786,7 +1786,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange
//!! following objects/functions are implemented in XMLRangeHelper.?xx
//!! which is a copy of the respective file from chart2 !!
XMLRangeHelper::CellRange aCellRange;
- aCellRange.aTableName = aTblName;
+ aCellRange.aTableName = aTableName;
aCellRange.aUpperLeft.nColumn = nCol;
aCellRange.aUpperLeft.nRow = nRow;
aCellRange.aUpperLeft.bIsEmpty = false;
@@ -1897,16 +1897,16 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSource::getSupportedServiceNames(
SwChartDataSequence::SwChartDataSequence(
SwChartDataProvider &rProvider,
- SwFrmFmt &rTblFmt,
+ SwFrameFormat &rTableFormat,
SwUnoCrsr *pTableCursor ) :
- SwClient( &rTblFmt ),
+ SwClient( &rTableFormat ),
aEvtListeners( GetChartMutex() ),
aModifyListeners( GetChartMutex() ),
aRowLabelText( SW_RES( STR_CHART2_ROW_LABEL_TEXT ) ),
aColLabelText( SW_RES( STR_CHART2_COL_LABEL_TEXT ) ),
xDataProvider( &rProvider ),
pDataProvider( &rProvider ),
- pTblCrsr( pTableCursor ),
+ pTableCrsr( pTableCursor ),
aCursorDepend( this, pTableCursor ),
_pPropSet( aSwMapProvider.GetPropertySet( PROPERTY_MAP_CHART2_DATA_SEQUENCE ) )
{
@@ -1915,7 +1915,7 @@ SwChartDataSequence::SwChartDataSequence(
acquire();
try
{
- const SwTable* pTable = SwTable::FindTable( &rTblFmt );
+ const SwTable* pTable = SwTable::FindTable( &rTableFormat );
if (pTable)
{
uno::Reference< chart2::data::XDataSequence > xRef( dynamic_cast< chart2::data::XDataSequence * >(this), uno::UNO_QUERY );
@@ -1938,15 +1938,15 @@ SwChartDataSequence::SwChartDataSequence(
#if OSL_DEBUG_LEVEL > 0
// check if it can properly convert into a SwUnoTableCrsr
// which is required for some functions
- SwUnoTableCrsr* pUnoTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pTblCrsr);
- OSL_ENSURE(pUnoTblCrsr, "SwChartDataSequence: cursor not SwUnoTableCrsr");
- (void) pUnoTblCrsr;
+ SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<SwUnoTableCrsr*>(pTableCrsr);
+ OSL_ENSURE(pUnoTableCrsr, "SwChartDataSequence: cursor not SwUnoTableCrsr");
+ (void) pUnoTableCrsr;
#endif
}
SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
SwChartDataSequenceBaseClass(),
- SwClient( rObj.GetFrmFmt() ),
+ SwClient( rObj.GetFrameFormat() ),
aEvtListeners( GetChartMutex() ),
aModifyListeners( GetChartMutex() ),
aRole( rObj.aRole ),
@@ -1954,8 +1954,8 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
aColLabelText( SW_RES(STR_CHART2_COL_LABEL_TEXT) ),
xDataProvider( rObj.pDataProvider ),
pDataProvider( rObj.pDataProvider ),
- pTblCrsr( rObj.pTblCrsr->Clone() ),
- aCursorDepend( this, pTblCrsr ),
+ pTableCrsr( rObj.pTableCrsr->Clone() ),
+ aCursorDepend( this, pTableCrsr ),
_pPropSet( rObj._pPropSet )
{
bDisposed = false;
@@ -1963,7 +1963,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
acquire();
try
{
- const SwTable* pTable = SwTable::FindTable( GetFrmFmt() );
+ const SwTable* pTable = SwTable::FindTable( GetFrameFormat() );
if (pTable)
{
uno::Reference< chart2::data::XDataSequence > xRef( dynamic_cast< chart2::data::XDataSequence * >(this), uno::UNO_QUERY );
@@ -1986,9 +1986,9 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
#if OSL_DEBUG_LEVEL > 0
// check if it can properly convert into a SwUnoTableCrsr
// which is required for some functions
- SwUnoTableCrsr* pUnoTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pTblCrsr);
- OSL_ENSURE(pUnoTblCrsr, "SwChartDataSequence: cursor not SwUnoTableCrsr");
- (void) pUnoTblCrsr;
+ SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<SwUnoTableCrsr*>(pTableCrsr);
+ OSL_ENSURE(pUnoTableCrsr, "SwChartDataSequence: cursor not SwUnoTableCrsr");
+ (void) pUnoTableCrsr;
#endif
}
@@ -1997,7 +1997,7 @@ SwChartDataSequence::~SwChartDataSequence()
// since the data-provider holds only weak references to the data-sequence
// there should be no need here to release them explicitly...
- delete pTblCrsr;
+ delete pTableCrsr;
}
namespace
@@ -2030,20 +2030,20 @@ uno::Sequence< uno::Any > SAL_CALL SwChartDataSequence::getData()
throw lang::DisposedException();
uno::Sequence< uno::Any > aRes;
- SwFrmFmt* pTblFmt = GetFrmFmt();
- if(pTblFmt)
+ SwFrameFormat* pTableFormat = GetFrameFormat();
+ if(pTableFormat)
{
- SwTable* pTable = SwTable::FindTable( pTblFmt );
- if(!pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable( pTableFormat );
+ if(!pTable->IsTableComplex())
{
SwRangeDescriptor aDesc;
- if (FillRangeDescriptor( aDesc, GetCellRangeName( *pTblFmt, *pTblCrsr ) ))
+ if (FillRangeDescriptor( aDesc, GetCellRangeName( *pTableFormat, *pTableCrsr ) ))
{
- //!! make copy of pTblCrsr (SwUnoCrsr )
+ //!! make copy of pTableCrsr (SwUnoCrsr )
// keep original cursor and make copy of it that gets handed
// over to the SwXCellRange object which takes ownership and
// thus will destroy the copy later.
- SwXCellRange aRange( pTblCrsr->Clone(), *pTblFmt, aDesc );
+ SwXCellRange aRange( pTableCrsr->Clone(), *pTableFormat, aDesc );
aRange.GetDataSequence( &aRes, 0, 0 );
}
}
@@ -2059,12 +2059,12 @@ OUString SAL_CALL SwChartDataSequence::getSourceRangeRepresentation( )
throw lang::DisposedException();
OUString aRes;
- SwFrmFmt* pTblFmt = GetFrmFmt();
- if (pTblFmt)
+ SwFrameFormat* pTableFormat = GetFrameFormat();
+ if (pTableFormat)
{
- const OUString aCellRange( GetCellRangeName( *pTblFmt, *pTblCrsr ) );
+ const OUString aCellRange( GetCellRangeName( *pTableFormat, *pTableCrsr ) );
OSL_ENSURE( !aCellRange.isEmpty(), "failed to get cell range" );
- aRes = pTblFmt->GetName() + "." + aCellRange;
+ aRes = pTableFormat->GetName() + "." + aCellRange;
}
return aRes;
}
@@ -2082,13 +2082,13 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
{
SwRangeDescriptor aDesc;
bool bOk = false;
- SwFrmFmt* pTblFmt = GetFrmFmt();
- SwTable* pTable = pTblFmt ? SwTable::FindTable( pTblFmt ) : 0;
- if (!pTblFmt || !pTable || pTable->IsTblComplex())
+ SwFrameFormat* pTableFormat = GetFrameFormat();
+ SwTable* pTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : 0;
+ if (!pTableFormat || !pTable || pTable->IsTableComplex())
throw uno::RuntimeException();
else
{
- const OUString aCellRange( GetCellRangeName( *pTblFmt, *pTblCrsr ) );
+ const OUString aCellRange( GetCellRangeName( *pTableFormat, *pTableCrsr ) );
OSL_ENSURE( !aCellRange.isEmpty(), "failed to get cell range" );
bOk = FillRangeDescriptor( aDesc, aCellRange );
OSL_ENSURE( bOk, "falied to get SwRangeDescriptor" );
@@ -2101,8 +2101,8 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
OSL_ENSURE( nColSpan == 1 || nRowSpan == 1,
"unexpected range of selected cells" );
- OUString aTxt; // label text to be returned
- bool bReturnEmptyTxt = false;
+ OUString aText; // label text to be returned
+ bool bReturnEmptyText = false;
bool bUseCol = true;
if (eLabelOrigin == chart2::data::LabelOrigin_COLUMN)
bUseCol = true;
@@ -2111,12 +2111,12 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
else if (eLabelOrigin == chart2::data::LabelOrigin_SHORT_SIDE)
{
bUseCol = nColSpan < nRowSpan;
- bReturnEmptyTxt = nColSpan == nRowSpan;
+ bReturnEmptyText = nColSpan == nRowSpan;
}
else if (eLabelOrigin == chart2::data::LabelOrigin_LONG_SIDE)
{
bUseCol = nColSpan > nRowSpan;
- bReturnEmptyTxt = nColSpan == nRowSpan;
+ bReturnEmptyText = nColSpan == nRowSpan;
}
else {
OSL_FAIL( "unexpected case" );
@@ -2129,9 +2129,9 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
OUString *pLabels = aLabels.getArray();
for (sal_Int32 i = 0; i < nSeqLen; ++i)
{
- if (!bReturnEmptyTxt)
+ if (!bReturnEmptyText)
{
- aTxt = bUseCol ? aColLabelText : aRowLabelText;
+ aText = bUseCol ? aColLabelText : aRowLabelText;
sal_Int32 nCol = aDesc.nLeft;
sal_Int32 nRow = aDesc.nTop;
if (bUseCol)
@@ -2162,11 +2162,11 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
aRplc = "%ROWNUMBER";
aNew = OUString(pBuf, (aCellName.getStr() + nLen) - pBuf);
}
- aTxt = aTxt.replaceFirst( aRplc, aNew );
+ aText = aText.replaceFirst( aRplc, aNew );
}
}
}
- pLabels[i] = aTxt;
+ pLabels[i] = aText;
}
}
}
@@ -2190,20 +2190,20 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::getTextualData()
throw lang::DisposedException();
uno::Sequence< OUString > aRes;
- SwFrmFmt* pTblFmt = GetFrmFmt();
- if(pTblFmt)
+ SwFrameFormat* pTableFormat = GetFrameFormat();
+ if(pTableFormat)
{
- SwTable* pTable = SwTable::FindTable( pTblFmt );
- if(!pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable( pTableFormat );
+ if(!pTable->IsTableComplex())
{
SwRangeDescriptor aDesc;
- if (FillRangeDescriptor( aDesc, GetCellRangeName( *pTblFmt, *pTblCrsr ) ))
+ if (FillRangeDescriptor( aDesc, GetCellRangeName( *pTableFormat, *pTableCrsr ) ))
{
- //!! make copy of pTblCrsr (SwUnoCrsr )
+ //!! make copy of pTableCrsr (SwUnoCrsr )
// keep original cursor and make copy of it that gets handed
// over to the SwXCellRange object which takes ownership and
// thus will destroy the copy later.
- SwXCellRange aRange( pTblCrsr->Clone(), *pTblFmt, aDesc );
+ SwXCellRange aRange( pTableCrsr->Clone(), *pTableFormat, aDesc );
aRange.GetDataSequence( 0, &aRes, 0 );
}
}
@@ -2219,20 +2219,20 @@ uno::Sequence< double > SAL_CALL SwChartDataSequence::getNumericalData()
throw lang::DisposedException();
uno::Sequence< double > aRes;
- SwFrmFmt* pTblFmt = GetFrmFmt();
- if(pTblFmt)
+ SwFrameFormat* pTableFormat = GetFrameFormat();
+ if(pTableFormat)
{
- SwTable* pTable = SwTable::FindTable( pTblFmt );
- if(!pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable( pTableFormat );
+ if(!pTable->IsTableComplex())
{
SwRangeDescriptor aDesc;
- if (FillRangeDescriptor( aDesc, GetCellRangeName( *pTblFmt, *pTblCrsr ) ))
+ if (FillRangeDescriptor( aDesc, GetCellRangeName( *pTableFormat, *pTableCrsr ) ))
{
- //!! make copy of pTblCrsr (SwUnoCrsr )
+ //!! make copy of pTableCrsr (SwUnoCrsr )
// keep original cursor and make copy of it that gets handed
// over to the SwXCellRange object which takes ownership and
// thus will destroy the copy later.
- SwXCellRange aRange( pTblCrsr->Clone(), *pTblFmt, aDesc );
+ SwXCellRange aRange( pTableCrsr->Clone(), *pTableFormat, aDesc );
// get numerical values and make an effort to return the
// numerical value for text formatted cells
@@ -2358,7 +2358,7 @@ void SwChartDataSequence::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pN
// table was deleted or cursor was deleted
if(!GetRegisteredIn() || !aCursorDepend.GetRegisteredIn())
{
- pTblCrsr = 0;
+ pTableCrsr = 0;
dispose();
}
else
@@ -2434,7 +2434,7 @@ void SAL_CALL SwChartDataSequence::dispose( )
bDisposed = true;
if (pDataProvider)
{
- const SwTable* pTable = SwTable::FindTable( GetFrmFmt() );
+ const SwTable* pTable = SwTable::FindTable( GetFrameFormat() );
if (pTable)
{
uno::Reference< chart2::data::XDataSequence > xRef( dynamic_cast< chart2::data::XDataSequence * >(this), uno::UNO_QUERY );
@@ -2464,7 +2464,7 @@ void SAL_CALL SwChartDataSequence::dispose( )
if (pLclRegisteredIn && pLclRegisteredIn->HasWriterListeners())
{
pLclRegisteredIn->Remove(this);
- pTblCrsr = NULL;
+ pTableCrsr = NULL;
}
}
@@ -2504,10 +2504,10 @@ bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox )
// if the implementation cursor gets affected (i.e. thew box where it is located
// in gets removed) we need to move it before that... (otherwise it does not need to change)
- const SwStartNode* pPointStartNode = pTblCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
- const SwStartNode* pMarkStartNode = pTblCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode();
+ const SwStartNode* pPointStartNode = pTableCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
+ const SwStartNode* pMarkStartNode = pTableCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode();
- if (!pTblCrsr->HasMark() || (pPointStartNode == rBox.GetSttNd() && pMarkStartNode == rBox.GetSttNd()))
+ if (!pTableCrsr->HasMark() || (pPointStartNode == rBox.GetSttNd() && pMarkStartNode == rBox.GetSttNd()))
{
bNowEmpty = true;
}
@@ -2515,9 +2515,9 @@ bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox )
{
sal_Int32 nPointRow = -1, nPointCol = -1;
sal_Int32 nMarkRow = -1, nMarkCol = -1;
- const SwTable* pTable = SwTable::FindTable( GetFrmFmt() );
- OUString aPointCellName( pTable->GetTblBox( pPointStartNode->GetIndex() )->GetName() );
- OUString aMarkCellName( pTable->GetTblBox( pMarkStartNode->GetIndex() )->GetName() );
+ const SwTable* pTable = SwTable::FindTable( GetFrameFormat() );
+ OUString aPointCellName( pTable->GetTableBox( pPointStartNode->GetIndex() )->GetName() );
+ OUString aMarkCellName( pTable->GetTableBox( pMarkStartNode->GetIndex() )->GetName() );
sw_GetCellPosition( aPointCellName, nPointCol, nPointRow );
sw_GetCellPosition( aMarkCellName, nMarkCol, nMarkRow );
@@ -2561,28 +2561,28 @@ bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox )
if (bMoveHorizontal)
nCol += bMoveLeft ? -1 : +1;
const OUString aNewCellName = sw_GetCellName( nCol, nRow );
- SwTableBox* pNewBox = const_cast<SwTableBox*>(pTable->GetTblBox( aNewCellName ));
+ SwTableBox* pNewBox = const_cast<SwTableBox*>(pTable->GetTableBox( aNewCellName ));
if (pNewBox) // set new position (cell range) to use
{
// This is how you get the first content node of a row:
// First get a SwNodeIndex pointing to the node after SwStartNode of the box...
SwNodeIndex aIdx( *pNewBox->GetSttNd(), +1 );
- // This can be a SwCntntNode, but might also be a table or section node,
+ // This can be a SwContentNode, but might also be a table or section node,
// therefore call GoNext
- SwCntntNode *pCNd = aIdx.GetNode().GetCntntNode();
+ SwContentNode *pCNd = aIdx.GetNode().GetContentNode();
if (!pCNd)
- pCNd = GetFrmFmt()->GetDoc()->GetNodes().GoNext( &aIdx );
+ pCNd = GetFrameFormat()->GetDoc()->GetNodes().GoNext( &aIdx );
// and then one can e.g. create a SwPosition:
SwPosition aNewPos( *pCNd ); // new position to be used with cursor
// if the mark is to be changed, make sure there is one
- if (pMarkStartNode == rBox.GetSttNd() && !pTblCrsr->HasMark())
- pTblCrsr->SetMark();
+ if (pMarkStartNode == rBox.GetSttNd() && !pTableCrsr->HasMark())
+ pTableCrsr->SetMark();
// set cursor to new position
SwPosition *pPos = (pPointStartNode == rBox.GetSttNd()) ?
- pTblCrsr->GetPoint() : pTblCrsr->GetMark();
+ pTableCrsr->GetPoint() : pTableCrsr->GetMark();
if (pPos)
{
pPos->nNode = aNewPos.nNode;
@@ -2602,13 +2602,13 @@ bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox )
void SwChartDataSequence::FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const
{
- SwFrmFmt* pTblFmt = GetFrmFmt();
- if(pTblFmt)
+ SwFrameFormat* pTableFormat = GetFrameFormat();
+ if(pTableFormat)
{
- SwTable* pTable = SwTable::FindTable( pTblFmt );
- if(!pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable( pTableFormat );
+ if(!pTable->IsTableComplex())
{
- FillRangeDescriptor( rRangeDesc, GetCellRangeName( *pTblFmt, *pTblCrsr ) );
+ FillRangeDescriptor( rRangeDesc, GetCellRangeName( *pTableFormat, *pTableCrsr ) );
}
}
}
@@ -2630,27 +2630,27 @@ void SwChartDataSequence::FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const
bool SwChartDataSequence::ExtendTo( bool bExtendCol,
sal_Int32 nFirstNew, sal_Int32 nCount )
{
- SwUnoTableCrsr* pUnoTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pTblCrsr);
- if (!pUnoTblCrsr)
+ SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<SwUnoTableCrsr*>(pTableCrsr);
+ if (!pUnoTableCrsr)
return false;
const SwStartNode *pStartNd = 0;
const SwTableBox *pStartBox = 0;
const SwTableBox *pEndBox = 0;
- const SwTable* pTable = SwTable::FindTable( GetFrmFmt() );
- OSL_ENSURE( !pTable->IsTblComplex(), "table too complex" );
- if (nCount < 1 || nFirstNew < 0 || pTable->IsTblComplex())
+ const SwTable* pTable = SwTable::FindTable( GetFrameFormat() );
+ OSL_ENSURE( !pTable->IsTableComplex(), "table too complex" );
+ if (nCount < 1 || nFirstNew < 0 || pTable->IsTableComplex())
return false;
// get range descriptor (cell range) for current data-sequence
- pStartNd = pUnoTblCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
- pEndBox = pTable->GetTblBox( pStartNd->GetIndex() );
+ pStartNd = pUnoTableCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
+ pEndBox = pTable->GetTableBox( pStartNd->GetIndex() );
const OUString aEndBox( pEndBox->GetName() );
- pStartNd = pUnoTblCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode();
- pStartBox = pTable->GetTblBox( pStartNd->GetIndex() );
+ pStartNd = pUnoTableCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode();
+ pStartBox = pTable->GetTableBox( pStartNd->GetIndex() );
const OUString aStartBox( pStartBox->GetName() );
SwRangeDescriptor aDesc;
@@ -2700,13 +2700,13 @@ bool SwChartDataSequence::ExtendTo( bool bExtendCol,
if (bChanged)
{
// move table cursor to new start and end of data-sequence
- const SwTableBox *pNewStartBox = pTable->GetTblBox( aNewStartCell );
- const SwTableBox *pNewEndBox = pTable->GetTblBox( aNewEndCell );
- pUnoTblCrsr->SetMark();
- pUnoTblCrsr->GetPoint()->nNode = *pNewEndBox->GetSttNd();
- pUnoTblCrsr->GetMark()->nNode = *pNewStartBox->GetSttNd();
- pUnoTblCrsr->Move( fnMoveForward, fnGoNode );
- pUnoTblCrsr->MakeBoxSels();
+ const SwTableBox *pNewStartBox = pTable->GetTableBox( aNewStartCell );
+ const SwTableBox *pNewEndBox = pTable->GetTableBox( aNewEndCell );
+ pUnoTableCrsr->SetMark();
+ pUnoTableCrsr->GetPoint()->nNode = *pNewEndBox->GetSttNd();
+ pUnoTableCrsr->GetMark()->nNode = *pNewStartBox->GetSttNd();
+ pUnoTableCrsr->Move( fnMoveForward, fnGoNode );
+ pUnoTableCrsr->MakeBoxSels();
}
return bChanged;
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 4357191c7fa5..10fdea5d6356 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -781,11 +781,11 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
break;
case SW_SERVICE_FIELDMASTER_BIBLIOGRAPHY:
{
- SwFieldType* pType = rDoc.getIDocumentFieldsAccess().GetFldType(RES_AUTHORITY, aEmptyOUStr, true);
+ SwFieldType* pType = rDoc.getIDocumentFieldsAccess().GetFieldType(RES_AUTHORITY, aEmptyOUStr, true);
if(!pType)
{
SwAuthorityFieldType aType(&rDoc);
- pType = rDoc.getIDocumentFieldsAccess().InsertFldType(aType);
+ pType = rDoc.getIDocumentFieldsAccess().InsertFieldType(aType);
}
xRet = SwXFieldMaster::CreateXFieldMaster(&rDoc, pType);
}
@@ -852,7 +852,7 @@ sal_Int32 SwXTextTables::getCount() throw( uno::RuntimeException, std::exception
SolarMutexGuard aGuard;
sal_Int32 nRet = 0;
if(IsValid())
- nRet = static_cast<sal_Int32>(GetDoc()->GetTblFrmFmtCount(true));
+ nRet = static_cast<sal_Int32>(GetDoc()->GetTableFrameFormatCount(true));
return nRet;
}
@@ -863,11 +863,11 @@ uno::Any SAL_CALL SwXTextTables::getByIndex(sal_Int32 nIndex)
uno::Any aRet;
if(IsValid())
{
- if(0 <= nIndex && GetDoc()->GetTblFrmFmtCount(true) > static_cast<size_t>(nIndex))
+ if(0 <= nIndex && GetDoc()->GetTableFrameFormatCount(true) > static_cast<size_t>(nIndex))
{
- SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt(nIndex, true);
- uno::Reference< XTextTable > xTbl = SwXTextTables::GetObject(rFmt);
- aRet.setValue( &xTbl,
+ SwFrameFormat& rFormat = GetDoc()->GetTableFrameFormat(nIndex, true);
+ uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(rFormat);
+ aRet.setValue( &xTable,
cppu::UnoType<XTextTable>::get());
}
else
@@ -885,20 +885,20 @@ uno::Any SwXTextTables::getByName(const OUString& rItemName)
uno::Any aRet;
if(IsValid())
{
- const size_t nCount = GetDoc()->GetTblFrmFmtCount(true);
- uno::Reference< XTextTable > xTbl;
+ const size_t nCount = GetDoc()->GetTableFrameFormatCount(true);
+ uno::Reference< XTextTable > xTable;
for( size_t i = 0; i < nCount; ++i)
{
- SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt(i, true);
- if (rItemName == rFmt.GetName())
+ SwFrameFormat& rFormat = GetDoc()->GetTableFrameFormat(i, true);
+ if (rItemName == rFormat.GetName())
{
- xTbl = SwXTextTables::GetObject(rFmt);
- aRet.setValue(&xTbl,
+ xTable = SwXTextTables::GetObject(rFormat);
+ aRet.setValue(&xTable,
cppu::UnoType<XTextTable>::get());
break;
}
}
- if(!xTbl.is())
+ if(!xTable.is())
throw NoSuchElementException();
}
else
@@ -912,16 +912,16 @@ uno::Sequence< OUString > SwXTextTables::getElementNames()
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- const size_t nCount = GetDoc()->GetTblFrmFmtCount(true);
+ const size_t nCount = GetDoc()->GetTableFrameFormatCount(true);
uno::Sequence<OUString> aSeq(static_cast<sal_Int32>(nCount));
if(nCount)
{
OUString* pArray = aSeq.getArray();
for( size_t i = 0; i < nCount; ++i)
{
- SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt(i, true);
+ SwFrameFormat& rFormat = GetDoc()->GetTableFrameFormat(i, true);
- pArray[i] = rFmt.GetName();
+ pArray[i] = rFormat.GetName();
}
}
return aSeq;
@@ -934,11 +934,11 @@ sal_Bool SwXTextTables::hasByName(const OUString& rName)
bool bRet= false;
if(IsValid())
{
- const size_t nCount = GetDoc()->GetTblFrmFmtCount(true);
+ const size_t nCount = GetDoc()->GetTableFrameFormatCount(true);
for( size_t i = 0; i < nCount; ++i)
{
- SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt(i, true);
- if (rName == rFmt.GetName())
+ SwFrameFormat& rFormat = GetDoc()->GetTableFrameFormat(i, true);
+ if (rName == rFormat.GetName())
{
bRet = true;
break;
@@ -962,7 +962,7 @@ sal_Bool SwXTextTables::hasElements() throw( uno::RuntimeException, std::excepti
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- return 0 != GetDoc()->GetTblFrmFmtCount(true);
+ return 0 != GetDoc()->GetTableFrameFormatCount(true);
}
OUString SwXTextTables::getImplementationName() throw( uno::RuntimeException, std::exception )
@@ -983,9 +983,9 @@ uno::Sequence< OUString > SwXTextTables::getSupportedServiceNames() throw( uno::
return aRet;
}
-uno::Reference<text::XTextTable> SwXTextTables::GetObject(SwFrmFmt& rFmt)
+uno::Reference<text::XTextTable> SwXTextTables::GetObject(SwFrameFormat& rFormat)
{
- return SwXTextTable::CreateXTextTable(& rFmt);
+ return SwXTextTable::CreateXTextTable(& rFormat);
}
namespace
@@ -997,13 +997,13 @@ namespace
{
typedef SwXTextFrame core_frame_t;
typedef XTextFrame uno_frame_t;
- static inline uno::Any wrapFrame(SwFrmFmt & rFrmFmt)
+ static inline uno::Any wrapFrame(SwFrameFormat & rFrameFormat)
{
uno::Reference<text::XTextFrame> const xRet(
- SwXTextFrame::CreateXTextFrame(*rFrmFmt.GetDoc(), &rFrmFmt));
+ SwXTextFrame::CreateXTextFrame(*rFrameFormat.GetDoc(), &rFrameFormat));
return uno::makeAny(xRet);
}
- static inline bool filter(const SwNode* const pNode) { return !pNode->IsNoTxtNode(); };
+ static inline bool filter(const SwNode* const pNode) { return !pNode->IsNoTextNode(); };
};
template<>
@@ -1011,10 +1011,10 @@ namespace
{
typedef SwXTextGraphicObject core_frame_t;
typedef XTextContent uno_frame_t;
- static inline uno::Any wrapFrame(SwFrmFmt & rFrmFmt)
+ static inline uno::Any wrapFrame(SwFrameFormat & rFrameFormat)
{
uno::Reference<text::XTextContent> const xRet(
- SwXTextGraphicObject::CreateXTextGraphicObject(*rFrmFmt.GetDoc(), &rFrmFmt));
+ SwXTextGraphicObject::CreateXTextGraphicObject(*rFrameFormat.GetDoc(), &rFrameFormat));
return uno::makeAny(xRet);
}
static inline bool filter(const SwNode* const pNode) { return pNode->IsGrfNode(); };
@@ -1025,32 +1025,32 @@ namespace
{
typedef SwXTextEmbeddedObject core_frame_t;
typedef XEmbeddedObjectSupplier uno_frame_t;
- static inline uno::Any wrapFrame(SwFrmFmt & rFrmFmt)
+ static inline uno::Any wrapFrame(SwFrameFormat & rFrameFormat)
{
uno::Reference<text::XTextContent> const xRet(
- SwXTextEmbeddedObject::CreateXTextEmbeddedObject(*rFrmFmt.GetDoc(), &rFrmFmt));
+ SwXTextEmbeddedObject::CreateXTextEmbeddedObject(*rFrameFormat.GetDoc(), &rFrameFormat));
return uno::makeAny(xRet);
}
static inline bool filter(const SwNode* const pNode) { return pNode->IsOLENode(); };
};
template<FlyCntType T>
- static uno::Any lcl_UnoWrapFrame(SwFrmFmt* pFmt)
+ static uno::Any lcl_UnoWrapFrame(SwFrameFormat* pFormat)
{
- return UnoFrameWrap_traits<T>::wrapFrame(*pFmt);
+ return UnoFrameWrap_traits<T>::wrapFrame(*pFormat);
}
// runtime adapter for lcl_UnoWrapFrame
- static uno::Any lcl_UnoWrapFrame(SwFrmFmt* pFmt, FlyCntType eType) throw(uno::RuntimeException)
+ static uno::Any lcl_UnoWrapFrame(SwFrameFormat* pFormat, FlyCntType eType) throw(uno::RuntimeException)
{
switch(eType)
{
case FLYCNTTYPE_FRM:
- return lcl_UnoWrapFrame<FLYCNTTYPE_FRM>(pFmt);
+ return lcl_UnoWrapFrame<FLYCNTTYPE_FRM>(pFormat);
case FLYCNTTYPE_GRF:
- return lcl_UnoWrapFrame<FLYCNTTYPE_GRF>(pFmt);
+ return lcl_UnoWrapFrame<FLYCNTTYPE_GRF>(pFormat);
case FLYCNTTYPE_OLE:
- return lcl_UnoWrapFrame<FLYCNTTYPE_OLE>(pFmt);
+ return lcl_UnoWrapFrame<FLYCNTTYPE_OLE>(pFormat);
default:
throw uno::RuntimeException();
}
@@ -1084,29 +1084,29 @@ SwXFrameEnumeration<T>::SwXFrameEnumeration(const SwDoc* const pDoc)
: m_aFrames()
{
SolarMutexGuard aGuard;
- const SwFrmFmts* const pFmts = pDoc->GetSpzFrmFmts();
- if(pFmts->empty())
+ const SwFrameFormats* const pFormats = pDoc->GetSpzFrameFormats();
+ if(pFormats->empty())
return;
// #i104937#
- const size_t nSize = pFmts->size();
+ const size_t nSize = pFormats->size();
::std::insert_iterator<frmcontainer_t> pInserter = ::std::insert_iterator<frmcontainer_t>(m_aFrames, m_aFrames.begin());
// #i104937#
- SwFrmFmt* pFmt( 0 );
+ SwFrameFormat* pFormat( 0 );
- std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
+ std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
for( size_t i = 0; i < nSize; ++i )
{
// #i104937#
- pFmt = (*pFmts)[i];
- if(pFmt->Which() != RES_FLYFRMFMT || aTextBoxes.find(pFmt) != aTextBoxes.end())
+ pFormat = (*pFormats)[i];
+ if(pFormat->Which() != RES_FLYFRMFMT || aTextBoxes.find(pFormat) != aTextBoxes.end())
continue;
- const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(!pIdx || !pIdx->GetNodes().IsDocNodes())
continue;
const SwNode* pNd = pDoc->GetNodes()[ pIdx->GetIndex() + 1 ];
if(UnoFrameWrap_traits<T>::filter(pNd))
- *pInserter++ = lcl_UnoWrapFrame<T>(pFmt);
+ *pInserter++ = lcl_UnoWrapFrame<T>(pFormat);
}
}
@@ -1208,10 +1208,10 @@ uno::Any SwXFrames::getByIndex(sal_Int32 nIndex)
if(nIndex < 0)
throw IndexOutOfBoundsException();
// Ignore TextBoxes for TextFrames.
- SwFrmFmt* pFmt = GetDoc()->GetFlyNum(static_cast<size_t>(nIndex), eType, /*bIgnoreTextBoxes=*/eType == FLYCNTTYPE_FRM);
- if(!pFmt)
+ SwFrameFormat* pFormat = GetDoc()->GetFlyNum(static_cast<size_t>(nIndex), eType, /*bIgnoreTextBoxes=*/eType == FLYCNTTYPE_FRM);
+ if(!pFormat)
throw IndexOutOfBoundsException();
- return lcl_UnoWrapFrame(pFmt, eType);
+ return lcl_UnoWrapFrame(pFormat, eType);
}
uno::Any SwXFrames::getByName(const OUString& rName)
@@ -1220,22 +1220,22 @@ uno::Any SwXFrames::getByName(const OUString& rName)
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- const SwFrmFmt* pFmt;
+ const SwFrameFormat* pFormat;
switch(eType)
{
case FLYCNTTYPE_GRF:
- pFmt = GetDoc()->FindFlyByName(rName, ND_GRFNODE);
+ pFormat = GetDoc()->FindFlyByName(rName, ND_GRFNODE);
break;
case FLYCNTTYPE_OLE:
- pFmt = GetDoc()->FindFlyByName(rName, ND_OLENODE);
+ pFormat = GetDoc()->FindFlyByName(rName, ND_OLENODE);
break;
default:
- pFmt = GetDoc()->FindFlyByName(rName, ND_TEXTNODE);
+ pFormat = GetDoc()->FindFlyByName(rName, ND_TEXTNODE);
break;
}
- if(!pFmt)
+ if(!pFormat)
throw NoSuchElementException();
- return lcl_UnoWrapFrame(const_cast<SwFrmFmt*>(pFmt), eType);
+ return lcl_UnoWrapFrame(const_cast<SwFrameFormat*>(pFormat), eType);
}
uno::Sequence<OUString> SwXFrames::getElementNames() throw( uno::RuntimeException, std::exception )
@@ -1409,11 +1409,11 @@ sal_Int32 SwXTextSections::getCount() throw( uno::RuntimeException, std::excepti
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- const SwSectionFmts& rSectFmts = GetDoc()->GetSections();
- size_t nCount = rSectFmts.size();
+ const SwSectionFormats& rSectFormats = GetDoc()->GetSections();
+ size_t nCount = rSectFormats.size();
for(size_t i = nCount; i; --i)
{
- if( !rSectFmts[i - 1]->IsInNodesArr())
+ if( !rSectFormats[i - 1]->IsInNodesArr())
nCount--;
}
return nCount;
@@ -1426,23 +1426,23 @@ uno::Any SwXTextSections::getByIndex(sal_Int32 nIndex)
uno::Reference< XTextSection > xRet;
if(IsValid())
{
- SwSectionFmts& rFmts = GetDoc()->GetSections();
+ SwSectionFormats& rFormats = GetDoc()->GetSections();
- const SwSectionFmts& rSectFmts = GetDoc()->GetSections();
- const size_t nCount = rSectFmts.size();
+ const SwSectionFormats& rSectFormats = GetDoc()->GetSections();
+ const size_t nCount = rSectFormats.size();
for(size_t i = 0; i < nCount; ++i)
{
- if( !rSectFmts[i]->IsInNodesArr())
+ if( !rSectFormats[i]->IsInNodesArr())
nIndex ++;
else if(static_cast<size_t>(nIndex) == i)
break;
if(static_cast<size_t>(nIndex) == i)
break;
}
- if(nIndex >= 0 && static_cast<size_t>(nIndex) < rFmts.size())
+ if(nIndex >= 0 && static_cast<size_t>(nIndex) < rFormats.size())
{
- SwSectionFmt* pFmt = rFmts[nIndex];
- xRet = GetObject(*pFmt);
+ SwSectionFormat* pFormat = rFormats[nIndex];
+ xRet = GetObject(*pFormat);
}
else
throw IndexOutOfBoundsException();
@@ -1459,15 +1459,15 @@ uno::Any SwXTextSections::getByName(const OUString& rName)
uno::Any aRet;
if(IsValid())
{
- SwSectionFmts& rFmts = GetDoc()->GetSections();
+ SwSectionFormats& rFormats = GetDoc()->GetSections();
uno::Reference< XTextSection > xSect;
- for(size_t i = 0; i < rFmts.size(); ++i)
+ for(size_t i = 0; i < rFormats.size(); ++i)
{
- SwSectionFmt* pFmt = rFmts[i];
- if (pFmt->IsInNodesArr()
- && (rName == pFmt->GetSection()->GetSectionName()))
+ SwSectionFormat* pFormat = rFormats[i];
+ if (pFormat->IsInNodesArr()
+ && (rName == pFormat->GetSection()->GetSectionName()))
{
- xSect = GetObject(*pFmt);
+ xSect = GetObject(*pFormat);
aRet.setValue(&xSect, cppu::UnoType<XTextSection>::get());
break;
}
@@ -1487,27 +1487,27 @@ uno::Sequence< OUString > SwXTextSections::getElementNames()
if(!IsValid())
throw uno::RuntimeException();
size_t nCount = GetDoc()->GetSections().size();
- SwSectionFmts& rSectFmts = GetDoc()->GetSections();
+ SwSectionFormats& rSectFormats = GetDoc()->GetSections();
for(size_t i = nCount; i; --i)
{
- if( !rSectFmts[i - 1]->IsInNodesArr())
+ if( !rSectFormats[i - 1]->IsInNodesArr())
nCount--;
}
uno::Sequence<OUString> aSeq(nCount);
if(nCount)
{
- SwSectionFmts& rFmts = GetDoc()->GetSections();
+ SwSectionFormats& rFormats = GetDoc()->GetSections();
OUString* pArray = aSeq.getArray();
size_t nIndex = 0;
for( size_t i = 0; i < nCount; ++i, ++nIndex)
{
- const SwSectionFmt* pFmt = rFmts[nIndex];
- while(!pFmt->IsInNodesArr())
+ const SwSectionFormat* pFormat = rFormats[nIndex];
+ while(!pFormat->IsInNodesArr())
{
- pFmt = rFmts[++nIndex];
+ pFormat = rFormats[++nIndex];
}
- pArray[i] = pFmt->GetSection()->GetSectionName();
+ pArray[i] = pFormat->GetSection()->GetSectionName();
}
}
return aSeq;
@@ -1520,11 +1520,11 @@ sal_Bool SwXTextSections::hasByName(const OUString& rName)
bool bRet = false;
if(IsValid())
{
- SwSectionFmts& rFmts = GetDoc()->GetSections();
- for(size_t i = 0; i < rFmts.size(); ++i)
+ SwSectionFormats& rFormats = GetDoc()->GetSections();
+ for(size_t i = 0; i < rFormats.size(); ++i)
{
- const SwSectionFmt* pFmt = rFmts[i];
- if (rName == pFmt->GetSection()->GetSectionName())
+ const SwSectionFormat* pFormat = rFormats[i];
+ if (rName == pFormat->GetSection()->GetSectionName())
{
bRet = true;
break;
@@ -1551,17 +1551,17 @@ sal_Bool SwXTextSections::hasElements() throw( uno::RuntimeException, std::excep
size_t nCount = 0;
if(IsValid())
{
- SwSectionFmts& rFmts = GetDoc()->GetSections();
- nCount = rFmts.size();
+ SwSectionFormats& rFormats = GetDoc()->GetSections();
+ nCount = rFormats.size();
}
else
throw uno::RuntimeException();
return nCount > 0;
}
-uno::Reference< XTextSection > SwXTextSections::GetObject( SwSectionFmt& rFmt )
+uno::Reference< XTextSection > SwXTextSections::GetObject( SwSectionFormat& rFormat )
{
- return SwXTextSection::CreateXTextSection(&rFmt);
+ return SwXTextSection::CreateXTextSection(&rFormat);
}
OUString SwXBookmarks::getImplementationName() throw( RuntimeException, std::exception )
@@ -1735,7 +1735,7 @@ sal_Int32 SwXNumberingRulesCollection::getCount() throw( uno::RuntimeException,
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- return GetDoc()->GetNumRuleTbl().size();
+ return GetDoc()->GetNumRuleTable().size();
}
uno::Any SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
@@ -1746,9 +1746,9 @@ uno::Any SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
if(IsValid())
{
uno::Reference< XIndexReplace > xRef;
- if ( static_cast<size_t>(nIndex) < GetDoc()->GetNumRuleTbl().size() )
+ if ( static_cast<size_t>(nIndex) < GetDoc()->GetNumRuleTable().size() )
{
- xRef = new SwXNumberingRules( *GetDoc()->GetNumRuleTbl()[ nIndex ], GetDoc());
+ xRef = new SwXNumberingRules( *GetDoc()->GetNumRuleTable()[ nIndex ], GetDoc());
aRet.setValue(&xRef, cppu::UnoType<XIndexReplace>::get());
}
@@ -1770,7 +1770,7 @@ sal_Bool SwXNumberingRulesCollection::hasElements() throw( uno::RuntimeException
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- return !GetDoc()->GetNumRuleTbl().empty();
+ return !GetDoc()->GetNumRuleTable().empty();
}
OUString SwXFootnotes::getImplementationName() throw( RuntimeException, std::exception )
@@ -1807,13 +1807,13 @@ sal_Int32 SwXFootnotes::getCount() throw( uno::RuntimeException, std::exception
if(!IsValid())
throw uno::RuntimeException();
sal_Int32 nCount = 0;
- const size_t nFtnCnt = GetDoc()->GetFtnIdxs().size();
- SwTxtFtn* pTxtFtn;
- for( size_t n = 0; n < nFtnCnt; ++n )
+ const size_t nFootnoteCnt = GetDoc()->GetFootnoteIdxs().size();
+ SwTextFootnote* pTextFootnote;
+ for( size_t n = 0; n < nFootnoteCnt; ++n )
{
- pTxtFtn = GetDoc()->GetFtnIdxs()[ n ];
- const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
- if ( rFtn.IsEndNote() != m_bEndnote )
+ pTextFootnote = GetDoc()->GetFootnoteIdxs()[ n ];
+ const SwFormatFootnote& rFootnote = pTextFootnote->GetFootnote();
+ if ( rFootnote.IsEndNote() != m_bEndnote )
continue;
nCount++;
}
@@ -1828,20 +1828,20 @@ uno::Any SwXFootnotes::getByIndex(sal_Int32 nIndex)
sal_Int32 nCount = 0;
if(IsValid())
{
- const size_t nFtnCnt = GetDoc()->GetFtnIdxs().size();
- SwTxtFtn* pTxtFtn;
+ const size_t nFootnoteCnt = GetDoc()->GetFootnoteIdxs().size();
+ SwTextFootnote* pTextFootnote;
uno::Reference< XFootnote > xRef;
- for( size_t n = 0; n < nFtnCnt; ++n )
+ for( size_t n = 0; n < nFootnoteCnt; ++n )
{
- pTxtFtn = GetDoc()->GetFtnIdxs()[ n ];
- const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
- if ( rFtn.IsEndNote() != m_bEndnote )
+ pTextFootnote = GetDoc()->GetFootnoteIdxs()[ n ];
+ const SwFormatFootnote& rFootnote = pTextFootnote->GetFootnote();
+ if ( rFootnote.IsEndNote() != m_bEndnote )
continue;
if(nCount == nIndex)
{
xRef = SwXFootnote::CreateXFootnote(*GetDoc(),
- &const_cast<SwFmtFtn&>(rFtn));
+ &const_cast<SwFormatFootnote&>(rFootnote));
aRet <<= xRef;
break;
}
@@ -1865,12 +1865,12 @@ sal_Bool SwXFootnotes::hasElements() throw( uno::RuntimeException, std::exceptio
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- return !GetDoc()->GetFtnIdxs().empty();
+ return !GetDoc()->GetFootnoteIdxs().empty();
}
-Reference<XFootnote> SwXFootnotes::GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt )
+Reference<XFootnote> SwXFootnotes::GetObject( SwDoc& rDoc, const SwFormatFootnote& rFormat )
{
- return SwXFootnote::CreateXFootnote(rDoc, &const_cast<SwFmtFtn&>(rFmt));
+ return SwXFootnote::CreateXFootnote(rDoc, &const_cast<SwFormatFootnote&>(rFormat));
}
OUString SwXReferenceMarks::getImplementationName() throw( RuntimeException, std::exception )
@@ -1918,7 +1918,7 @@ uno::Any SwXReferenceMarks::getByIndex(sal_Int32 nIndex)
uno::Reference< XTextContent > xRef;
if(0 <= nIndex && nIndex < USHRT_MAX)
{
- SwFmtRefMark *const pMark = const_cast<SwFmtRefMark*>(
+ SwFormatRefMark *const pMark = const_cast<SwFormatRefMark*>(
GetDoc()->GetRefMark(static_cast<sal_uInt16>(nIndex)));
if(pMark)
{
@@ -1938,8 +1938,8 @@ uno::Any SwXReferenceMarks::getByName(const OUString& rName)
uno::Any aRet;
if(IsValid())
{
- SwFmtRefMark *const pMark =
- const_cast<SwFmtRefMark*>(GetDoc()->GetRefMark(rName));
+ SwFormatRefMark *const pMark =
+ const_cast<SwFormatRefMark*>(GetDoc()->GetRefMark(rName));
if(pMark)
{
uno::Reference<XTextContent> const xRef =
diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx
index 36764284c518..1edb7826dcca 100644
--- a/sw/source/core/unocore/unocrsr.cxx
+++ b/sw/source/core/unocore/unocrsr.cxx
@@ -40,8 +40,8 @@ SwUnoCrsr::~SwUnoCrsr()
if( !pDoc->IsInDtor() )
{
// then remove cursor from array
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- if( !rTbl.erase( this ) )
+ SwUnoCrsrTable& rTable = (SwUnoCrsrTable&)pDoc->GetUnoCrsrTable();
+ if( !rTable.erase( this ) )
{
OSL_ENSURE( false, "UNO Cursor nicht mehr im Array" );
}
@@ -86,7 +86,7 @@ bool SwUnoCrsr::IsReadOnlyAvailable() const
return true;
}
-const SwCntntFrm*
+const SwContentFrm*
SwUnoCrsr::DoSetBidiLevelLeftRight( bool &, bool, bool )
{
return 0; // not for uno cursor
@@ -147,7 +147,7 @@ bool SwUnoCrsr::IsSelOvr( int eFlags )
{
rPtIdx.Assign( *pInvalidNode->EndOfSectionNode(), 1 );
- if( !rPtIdx.GetNode().IsCntntNode() &&
+ if( !rPtIdx.GetNode().IsContentNode() &&
( !pDoc->GetNodes().GoNextSection( &rPtIdx ) ||
rPtIdx > pOldSttNd->EndOfSectionIndex() ) )
break;
@@ -156,7 +156,7 @@ bool SwUnoCrsr::IsSelOvr( int eFlags )
{
rPtIdx.Assign( *pInvalidNode, -1 );
- if( !rPtIdx.GetNode().IsCntntNode() &&
+ if( !rPtIdx.GetNode().IsContentNode() &&
( !SwNodes::GoPrevSection( &rPtIdx ) ||
rPtIdx < *pOldSttNd ) )
break;
@@ -169,13 +169,13 @@ bool SwUnoCrsr::IsSelOvr( int eFlags )
if( bValidPos )
{
- SwCntntNode* pCNd = GetCntntNode();
+ SwContentNode* pCNd = GetContentNode();
GetPoint()->nContent.Assign( pCNd, (pCNd && !bMoveDown) ? pCNd->Len() : 0);
}
else
{
rPtIdx = GetSavePos()->nNode;
- GetPoint()->nContent.Assign( GetCntntNode(), GetSavePos()->nCntnt );
+ GetPoint()->nContent.Assign( GetContentNode(), GetSavePos()->nContent );
return true;
}
}
@@ -187,15 +187,15 @@ SwUnoTableCrsr::SwUnoTableCrsr(const SwPosition& rPos)
: SwCursor(rPos, 0, false)
, SwUnoCrsr(rPos)
, SwTableCursor(rPos)
- , m_aTblSel(rPos, 0, false)
+ , m_aTableSel(rPos, 0, false)
{
SetRemainInSection(false);
}
SwUnoTableCrsr::~SwUnoTableCrsr()
{
- while (m_aTblSel.GetNext() != &m_aTblSel)
- delete m_aTblSel.GetNext();
+ while (m_aTableSel.GetNext() != &m_aTableSel)
+ delete m_aTableSel.GetNext();
}
bool SwUnoTableCrsr::IsSelOvr( int eFlags )
@@ -213,14 +213,14 @@ bool SwUnoTableCrsr::IsSelOvr( int eFlags )
void SwUnoTableCrsr::MakeBoxSels()
{
- const SwCntntNode* pCNd;
- bool bMakeTblCrsrs = true;
+ const SwContentNode* pCNd;
+ bool bMakeTableCrsrs = true;
if( GetPoint()->nNode.GetIndex() && GetMark()->nNode.GetIndex() &&
- 0 != ( pCNd = GetCntntNode() ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) &&
- 0 != ( pCNd = GetCntntNode(false) ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) )
- bMakeTblCrsrs = GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTblCrsrs( *this );
+ 0 != ( pCNd = GetContentNode() ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) &&
+ 0 != ( pCNd = GetContentNode(false) ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) )
+ bMakeTableCrsrs = GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCrsrs( *this );
- if ( !bMakeTblCrsrs )
+ if ( !bMakeTableCrsrs )
{
SwSelBoxes const& rTmpBoxes = GetSelectedBoxes();
while (!rTmpBoxes.empty())
@@ -231,19 +231,19 @@ void SwUnoTableCrsr::MakeBoxSels()
if( IsChgd() )
{
- SwTableCursor::MakeBoxSels( &m_aTblSel );
+ SwTableCursor::MakeBoxSels( &m_aTableSel );
if (!GetSelectedBoxesCount())
{
const SwTableBox* pBox;
const SwNode* pBoxNd = GetPoint()->nNode.GetNode().FindTableBoxStartNode();
- const SwTableNode* pTblNd = pBoxNd ? pBoxNd->FindTableNode() : 0;
- if( pTblNd && 0 != ( pBox = pTblNd->GetTable().GetTblBox( pBoxNd->GetIndex() )) )
+ const SwTableNode* pTableNd = pBoxNd ? pBoxNd->FindTableNode() : 0;
+ if( pTableNd && 0 != ( pBox = pTableNd->GetTable().GetTableBox( pBoxNd->GetIndex() )) )
InsertBox( *pBox );
}
}
}
-SwUnoCrsrTbl::~SwUnoCrsrTbl()
+SwUnoCrsrTable::~SwUnoCrsrTable()
{
while (!empty())
{
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 5cb72e3549cd..e0e668b8c3a3 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -191,10 +191,10 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc,
::sw::UnoTunnelGetImplementation<SwXFrame>(xTunnel));
if (pFrame)
{
- const SwFrmFmt *const pFrmFmt(pFrame->GetFrmFmt());
- if (pFrmFmt && pFrmFmt->GetDoc() == &rTargetDoc)
+ const SwFrameFormat *const pFrameFormat(pFrame->GetFrameFormat());
+ if (pFrameFormat && pFrameFormat->GetDoc() == &rTargetDoc)
{
- o_rFrame = std::make_pair(pFrmFmt->GetName(), pFrame->GetFlyCntType());
+ o_rFrame = std::make_pair(pFrameFormat->GetName(), pFrame->GetFlyCntType());
}
return;
}
@@ -203,10 +203,10 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc,
::sw::UnoTunnelGetImplementation<SwXTextTable>(xTunnel));
if (pTextTable)
{
- SwFrmFmt *const pFrmFmt(pTextTable->GetFrmFmt());
- if (pFrmFmt && pFrmFmt->GetDoc() == &rTargetDoc)
+ SwFrameFormat *const pFrameFormat(pTextTable->GetFrameFormat());
+ if (pFrameFormat && pFrameFormat->GetDoc() == &rTargetDoc)
{
- o_rTableName = pFrmFmt->GetName();
+ o_rTableName = pFrameFormat->GetName();
}
return;
}
@@ -215,11 +215,11 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc,
::sw::UnoTunnelGetImplementation<SwXCell>(xTunnel));
if (pCell)
{
- SwFrmFmt *const pFrmFmt(pCell->GetFrmFmt());
- if (pFrmFmt && pFrmFmt->GetDoc() == &rTargetDoc)
+ SwFrameFormat *const pFrameFormat(pCell->GetFrameFormat());
+ if (pFrameFormat && pFrameFormat->GetDoc() == &rTargetDoc)
{
- SwTableBox * pBox = pCell->GetTblBox();
- SwTable *const pTable = SwTable::FindTable(pFrmFmt);
+ SwTableBox * pBox = pCell->GetTableBox();
+ SwTable *const pTable = SwTable::FindTable(pFrameFormat);
// ??? what's the benefit of setting pBox in this convoluted way?
pBox = pCell->FindBox(pTable, pBox);
if (pBox)
@@ -248,7 +248,7 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc,
::sw::UnoTunnelGetImplementation<SwXCellRange>(xTunnel));
if (pCellRange)
{
- SwUnoCrsr const*const pUnoCrsr(pCellRange->GetTblCrsr());
+ SwUnoCrsr const*const pUnoCrsr(pCellRange->GetTableCrsr());
if (pUnoCrsr && pUnoCrsr->GetDoc() == &rTargetDoc)
{
// probably can't copy it to o_rpPaM for this since it's
@@ -268,29 +268,29 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc,
}
uno::Reference<text::XTextContent>
-GetNestedTextContent(SwTxtNode & rTextNode, sal_Int32 const nIndex,
+GetNestedTextContent(SwTextNode & rTextNode, sal_Int32 const nIndex,
bool const bParent)
{
// these should be unambiguous because of the dummy character
- SwTxtNode::GetTxtAttrMode const eMode( (bParent)
- ? SwTxtNode::PARENT : SwTxtNode::EXPAND );
- SwTxtAttr *const pMetaTxtAttr =
- rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_META, eMode);
- SwTxtAttr *const pMetaFieldTxtAttr =
- rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_METAFIELD, eMode);
+ SwTextNode::GetTextAttrMode const eMode( (bParent)
+ ? SwTextNode::PARENT : SwTextNode::EXPAND );
+ SwTextAttr *const pMetaTextAttr =
+ rTextNode.GetTextAttrAt(nIndex, RES_TXTATR_META, eMode);
+ SwTextAttr *const pMetaFieldTextAttr =
+ rTextNode.GetTextAttrAt(nIndex, RES_TXTATR_METAFIELD, eMode);
// which is innermost?
- SwTxtAttr *const pTxtAttr = (pMetaTxtAttr)
- ? ((pMetaFieldTxtAttr)
- ? ((pMetaFieldTxtAttr->GetStart() >
- pMetaTxtAttr->GetStart())
- ? pMetaFieldTxtAttr : pMetaTxtAttr)
- : pMetaTxtAttr)
- : pMetaFieldTxtAttr;
+ SwTextAttr *const pTextAttr = (pMetaTextAttr)
+ ? ((pMetaFieldTextAttr)
+ ? ((pMetaFieldTextAttr->GetStart() >
+ pMetaTextAttr->GetStart())
+ ? pMetaFieldTextAttr : pMetaTextAttr)
+ : pMetaTextAttr)
+ : pMetaFieldTextAttr;
uno::Reference<XTextContent> xRet;
- if (pTxtAttr)
+ if (pTextAttr)
{
::sw::Meta *const pMeta(
- static_cast<SwFmtMeta &>(pTxtAttr->GetAttr()).GetMeta());
+ static_cast<SwFormatMeta &>(pTextAttr->GetAttr()).GetMeta());
OSL_ASSERT(pMeta);
xRet.set(pMeta->MakeUnoObject(), uno::UNO_QUERY);
}
@@ -302,7 +302,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
, SwPaM& rPam
, Any *pAny
, PropertyState& eState
- , const SwTxtNode* pNode )
+ , const SwTextNode* pNode )
{
PropertyState eNewState = PropertyState_DIRECT_VALUE;
bool bDone = true;
@@ -311,10 +311,10 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_PARA_CONT_PREV_SUBTREE:
if (pAny)
{
- const SwTxtNode * pTmpNode = pNode;
+ const SwTextNode * pTmpNode = pNode;
if (!pTmpNode)
- pTmpNode = rPam.GetNode().GetTxtNode();
+ pTmpNode = rPam.GetNode().GetTextNode();
bool bRet = false;
@@ -331,10 +331,10 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_PARA_NUM_STRING:
if (pAny)
{
- const SwTxtNode * pTmpNode = pNode;
+ const SwTextNode * pTmpNode = pNode;
if (!pTmpNode)
- pTmpNode = rPam.GetNode().GetTxtNode();
+ pTmpNode = rPam.GetNode().GetTextNode();
OUString sRet;
if ( pTmpNode && pTmpNode->GetNum() )
@@ -348,10 +348,10 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case RES_PARATR_OUTLINELEVEL:
if (pAny)
{
- const SwTxtNode * pTmpNode = pNode;
+ const SwTextNode * pTmpNode = pNode;
if (!pTmpNode)
- pTmpNode = rPam.GetNode().GetTxtNode();
+ pTmpNode = rPam.GetNode().GetTextNode();
sal_Int16 nRet = -1;
if ( pTmpNode )
@@ -363,21 +363,21 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_PARA_CONDITIONAL_STYLE_NAME:
case FN_UNO_PARA_STYLE :
{
- SwFmtColl* pFmt = 0;
+ SwFormatColl* pFormat = 0;
if(pNode)
- pFmt = FN_UNO_PARA_CONDITIONAL_STYLE_NAME == rEntry.nWID
- ? pNode->GetFmtColl() : &pNode->GetAnyFmtColl();
+ pFormat = FN_UNO_PARA_CONDITIONAL_STYLE_NAME == rEntry.nWID
+ ? pNode->GetFormatColl() : &pNode->GetAnyFormatColl();
else
{
- pFmt = SwUnoCursorHelper::GetCurTxtFmtColl(rPam,
+ pFormat = SwUnoCursorHelper::GetCurTextFormatColl(rPam,
FN_UNO_PARA_CONDITIONAL_STYLE_NAME == rEntry.nWID);
}
- if(pFmt)
+ if(pFormat)
{
if( pAny )
{
OUString sVal;
- SwStyleNameMapper::FillProgName(pFmt->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
+ SwStyleNameMapper::FillProgName(pFormat->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
*pAny <<= sVal;
}
}
@@ -409,25 +409,25 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_NUMBER_NEWSTART:
{
// a multi selection is not considered
- const SwTxtNode* pTxtNd = rPam.GetNode().GetTxtNode();
- if ( pTxtNd && pTxtNd->IsInList() )
+ const SwTextNode* pTextNd = rPam.GetNode().GetTextNode();
+ if ( pTextNd && pTextNd->IsInList() )
{
if( pAny )
{
if(rEntry.nWID == FN_UNO_NUM_LEVEL)
- *pAny <<= (sal_Int16)(pTxtNd->GetActualListLevel());
+ *pAny <<= (sal_Int16)(pTextNd->GetActualListLevel());
else if(rEntry.nWID == FN_UNO_IS_NUMBER)
{
- *pAny <<= pTxtNd->IsCountedInList();
+ *pAny <<= pTextNd->IsCountedInList();
}
// #i91601#
else if ( rEntry.nWID == FN_UNO_LIST_ID )
{
- *pAny <<= pTxtNd->GetListId();
+ *pAny <<= pTextNd->GetListId();
}
else
{
- *pAny <<= pTxtNd->IsListRestart();
+ *pAny <<= pTextNd->IsListRestart();
}
}
}
@@ -465,10 +465,10 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
break;
case FN_UNO_DOCUMENT_INDEX_MARK:
{
- ::std::vector<SwTxtAttr *> marks;
- if (rPam.GetNode().IsTxtNode())
+ ::std::vector<SwTextAttr *> marks;
+ if (rPam.GetNode().IsTextNode())
{
- marks = rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
+ marks = rPam.GetNode().GetTextNode()->GetTextAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK);
}
if (marks.size())
@@ -509,18 +509,18 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_TEXT_FIELD:
{
const SwPosition *pPos = rPam.Start();
- const SwTxtNode *pTxtNd =
- rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTxtNode();
- const SwTxtAttr* pTxtAttr = (pTxtNd)
- ? pTxtNd->GetFldTxtAttrAt( pPos->nContent.GetIndex(), true )
+ const SwTextNode *pTextNd =
+ rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTextNode();
+ const SwTextAttr* pTextAttr = (pTextNd)
+ ? pTextNd->GetFieldTextAttrAt( pPos->nContent.GetIndex(), true )
: 0;
- if ( pTxtAttr != NULL )
+ if ( pTextAttr != NULL )
{
if( pAny )
{
uno::Reference<text::XTextField> const xField(
SwXTextField::CreateXTextField(rPam.GetDoc(),
- &pTxtAttr->GetFmtFld()));
+ &pTextAttr->GetFormatField()));
*pAny <<= xField;
}
}
@@ -537,18 +537,18 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
{
if( pAny )
{
- const SwTableNode* pTblNode = pSttNode->FindTableNode();
- SwFrmFmt* pTableFmt = (SwFrmFmt*)pTblNode->GetTable().GetFrmFmt();
+ const SwTableNode* pTableNode = pSttNode->FindTableNode();
+ SwFrameFormat* pTableFormat = (SwFrameFormat*)pTableNode->GetTable().GetFrameFormat();
//SwTable& rTable = static_cast<SwTableNode*>(pSttNode)->GetTable();
if(FN_UNO_TEXT_TABLE == rEntry.nWID)
{
- uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(*pTableFmt);
+ uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(*pTableFormat);
pAny->setValue(&xTable, cppu::UnoType<XTextTable>::get());
}
else
{
- SwTableBox* pBox = pSttNode->GetTblBox();
- uno::Reference< XCell > xCell = SwXCell::CreateXCell(pTableFmt, pBox);
+ SwTableBox* pBox = pSttNode->GetTableBox();
+ uno::Reference< XCell > xCell = SwXCell::CreateXCell(pTableFormat, pBox);
pAny->setValue(&xCell, cppu::UnoType<XCell>::get());
}
}
@@ -562,13 +562,13 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
SwStartNode* pSttNode = rPam.GetNode().StartOfSectionNode();
SwStartNodeType eType = pSttNode->GetStartNodeType();
- SwFrmFmt* pFmt;
- if(eType == SwFlyStartNode && 0 != (pFmt = pSttNode->GetFlyFmt()))
+ SwFrameFormat* pFormat;
+ if(eType == SwFlyStartNode && 0 != (pFormat = pSttNode->GetFlyFormat()))
{
if( pAny )
{
uno::Reference<XTextFrame> const xFrame(
- SwXTextFrame::CreateXTextFrame(*pFmt->GetDoc(), pFmt));
+ SwXTextFrame::CreateXTextFrame(*pFormat->GetDoc(), pFormat));
(*pAny) <<= xFrame;
}
}
@@ -583,7 +583,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
{
if( pAny )
{
- uno::Reference< XTextSection > xSect = SwXTextSections::GetObject( *pSect->GetFmt() );
+ uno::Reference< XTextSection > xSect = SwXTextSections::GetObject( *pSect->GetFormat() );
pAny->setValue(&xSect, cppu::UnoType<XTextSection>::get());
}
}
@@ -594,19 +594,19 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_ENDNOTE:
case FN_UNO_FOOTNOTE:
{
- SwTxtAttr *const pTxtAttr = rPam.GetNode().IsTxtNode() ?
- rPam.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
+ SwTextAttr *const pTextAttr = rPam.GetNode().IsTextNode() ?
+ rPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN) : 0;
- if(pTxtAttr)
+ if(pTextAttr)
{
- const SwFmtFtn& rFtn = pTxtAttr->GetFtn();
- if(rFtn.IsEndNote() == (FN_UNO_ENDNOTE == rEntry.nWID))
+ const SwFormatFootnote& rFootnote = pTextAttr->GetFootnote();
+ if(rFootnote.IsEndNote() == (FN_UNO_ENDNOTE == rEntry.nWID))
{
if( pAny )
{
const uno::Reference< text::XFootnote > xFootnote =
SwXFootnote::CreateXFootnote(*rPam.GetDoc(),
- &const_cast<SwFmtFtn&>(rFtn));
+ &const_cast<SwFormatFootnote&>(rFootnote));
*pAny <<= xFootnote;
}
}
@@ -619,21 +619,21 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
break;
case FN_UNO_REFERENCE_MARK:
{
- ::std::vector<SwTxtAttr *> marks;
- if (rPam.GetNode().IsTxtNode())
+ ::std::vector<SwTextAttr *> marks;
+ if (rPam.GetNode().IsTextNode())
{
marks = (
- rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetNode().GetTextNode()->GetTextAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
}
if (marks.size())
{
if( pAny )
{ // hmm... can only return 1 here
- const SwFmtRefMark& rRef = (*marks.begin())->GetRefMark();
+ const SwFormatRefMark& rRef = (*marks.begin())->GetRefMark();
uno::Reference<XTextContent> const xRef =
SwXReferenceMark::CreateXReferenceMark(*rPam.GetDoc(),
- const_cast<SwFmtRefMark*>(&rRef));
+ const_cast<SwFormatRefMark*>(&rRef));
pAny->setValue(&xRef, cppu::UnoType<XTextContent>::get());
}
}
@@ -643,8 +643,8 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
break;
case FN_UNO_NESTED_TEXT_CONTENT:
{
- uno::Reference<XTextContent> const xRet(rPam.GetNode().IsTxtNode()
- ? GetNestedTextContent(*rPam.GetNode().GetTxtNode(),
+ uno::Reference<XTextContent> const xRet(rPam.GetNode().IsTextNode()
+ ? GetNestedTextContent(*rPam.GetNode().GetTextNode(),
rPam.GetPoint()->nContent.GetIndex(), false)
: 0);
if (xRet.is())
@@ -663,9 +663,9 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_CHARFMT_SEQUENCE:
{
- SwTxtNode *const pTxtNode = rPam.GetNode().GetTxtNode();
+ SwTextNode *const pTextNode = rPam.GetNode().GetTextNode();
if (&rPam.GetNode(true) == &rPam.GetNode(false)
- && pTxtNode && pTxtNode->GetpSwpHints())
+ && pTextNode && pTextNode->GetpSwpHints())
{
sal_Int32 nPaMStart = rPam.GetPoint()->nContent.GetIndex();
sal_Int32 nPaMEnd = rPam.GetMark() ? rPam.GetMark()->nContent.GetIndex() : nPaMStart;
@@ -674,10 +674,10 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
std::swap(nPaMStart, nPaMEnd);
}
Sequence< OUString> aCharStyles;
- SwpHints* pHints = pTxtNode->GetpSwpHints();
+ SwpHints* pHints = pTextNode->GetpSwpHints();
for( size_t nAttr = 0; nAttr < pHints->GetStartCount(); ++nAttr )
{
- SwTxtAttr* pAttr = pHints->GetStart( nAttr );
+ SwTextAttr* pAttr = pHints->GetStart( nAttr );
if(pAttr->Which() != RES_TXTATR_CHARFMT)
continue;
const sal_Int32 nAttrStart = pAttr->GetStart();
@@ -702,10 +702,10 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
"attribute overlaps or is outside");
//now the name of the style has to be added to the sequence
aCharStyles.realloc(aCharStyles.getLength() + 1);
- OSL_ENSURE(pAttr->GetCharFmt().GetCharFmt(), "no character format set");
+ OSL_ENSURE(pAttr->GetCharFormat().GetCharFormat(), "no character format set");
aCharStyles.getArray()[aCharStyles.getLength() - 1] =
SwStyleNameMapper::GetProgName(
- pAttr->GetCharFmt().GetCharFmt()->GetName(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ pAttr->GetCharFormat().GetCharFormat()->GetName(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
}
}
@@ -731,14 +731,14 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
sal_Int16 IsNodeNumStart(SwPaM& rPam, PropertyState& eState)
{
- const SwTxtNode* pTxtNd = rPam.GetNode().GetTxtNode();
+ const SwTextNode* pTextNd = rPam.GetNode().GetTextNode();
// correction: check, if restart value is set at the text node and use
- // new method <SwTxtNode::GetAttrListRestartValue()> to retrieve the value
- if ( pTxtNd && pTxtNd->GetNumRule() && pTxtNd->IsListRestart() &&
- pTxtNd->HasAttrListRestartValue() )
+ // new method <SwTextNode::GetAttrListRestartValue()> to retrieve the value
+ if ( pTextNd && pTextNd->GetNumRule() && pTextNd->IsListRestart() &&
+ pTextNd->HasAttrListRestartValue() )
{
eState = PropertyState_DIRECT_VALUE;
- sal_Int16 nTmp = sal::static_int_cast< sal_Int16 >(pTxtNd->GetAttrListRestartValue());
+ sal_Int16 nTmp = sal::static_int_cast< sal_Int16 >(pTextNd->GetAttrListRestartValue());
return nTmp;
}
eState = PropertyState_DEFAULT_VALUE;
@@ -769,35 +769,35 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
const OUString* pBulletFontNames = pSwNum->GetBulletFontNames();
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
- SwNumFmt aFmt(aRule.Get( i ));
+ SwNumFormat aFormat(aRule.Get( i ));
if (!pNewCharStyles[i].isEmpty() &&
!SwXNumberingRules::isInvalidStyle(pNewCharStyles[i]) &&
- (!aFmt.GetCharFmt() || pNewCharStyles[i] != aFmt.GetCharFmt()->GetName()))
+ (!aFormat.GetCharFormat() || pNewCharStyles[i] != aFormat.GetCharFormat()->GetName()))
{
if (pNewCharStyles[i].isEmpty())
{
// FIXME
// Is something missing/wrong here?
// if condition is always false due to outer check!
- aFmt.SetCharFmt(0);
+ aFormat.SetCharFormat(0);
}
else
{
// get CharStyle and set the rule
- const size_t nChCount = pDoc->GetCharFmts()->size();
- SwCharFmt* pCharFmt = 0;
- for(size_t nCharFmt = 0; nCharFmt < nChCount; ++nCharFmt)
+ const size_t nChCount = pDoc->GetCharFormats()->size();
+ SwCharFormat* pCharFormat = 0;
+ for(size_t nCharFormat = 0; nCharFormat < nChCount; ++nCharFormat)
{
- SwCharFmt& rChFmt = *((*(pDoc->GetCharFmts()))[nCharFmt]);
- if(rChFmt.GetName() == pNewCharStyles[i])
+ SwCharFormat& rChFormat = *((*(pDoc->GetCharFormats()))[nCharFormat]);
+ if(rChFormat.GetName() == pNewCharStyles[i])
{
- pCharFmt = &rChFmt;
+ pCharFormat = &rChFormat;
break;
}
}
- if(!pCharFmt)
+ if(!pCharFormat)
{
SfxStyleSheetBasePool* pPool = pDoc->GetDocShell()->GetStyleSheetPool();
SfxStyleSheetBase* pBase;
@@ -805,17 +805,17 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
// shall it really be created?
if(!pBase)
pBase = &pPool->Make(pNewCharStyles[i], SFX_STYLE_FAMILY_PAGE);
- pCharFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt();
+ pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
}
- if(pCharFmt)
- aFmt.SetCharFmt(pCharFmt);
+ if(pCharFormat)
+ aFormat.SetCharFormat(pCharFormat);
}
}
//Now again for fonts
if(
!pBulletFontNames[i].isEmpty() &&
!SwXNumberingRules::isInvalidStyle(pBulletFontNames[i]) &&
- (!aFmt.GetBulletFont() || aFmt.GetBulletFont()->GetName() != pBulletFontNames[i])
+ (!aFormat.GetBulletFont() || aFormat.GetBulletFont()->GetName() != pBulletFontNames[i])
)
{
const SvxFontListItem* pFontListItem =
@@ -826,9 +826,9 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
vcl::FontInfo aInfo = pList->Get(
pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE);
vcl::Font aFont(aInfo);
- aFmt.SetBulletFont(&aFont);
+ aFormat.SetBulletFont(&aFont);
}
- aRule.Set( i, aFmt );
+ aRule.Set( i, aFormat );
}
UnoActionContext aAction(pDoc);
@@ -894,9 +894,9 @@ void getNumberingProperty(SwPaM& rPam, PropertyState& eState, Any * pAny )
void GetCurPageStyle(SwPaM& rPaM, OUString &rString)
{
- if (!rPaM.GetCntntNode())
+ if (!rPaM.GetContentNode())
return; // TODO: is there an easy way to get it for tables/sections?
- SwCntntFrm* pFrame = rPaM.GetCntntNode()->getLayoutFrm(rPaM.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout());
+ SwContentFrm* pFrame = rPaM.GetContentNode()->getLayoutFrm(rPaM.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout());
if(pFrame)
{
const SwPageFrm* pPage = pFrame->FindPageFrm();
@@ -1072,7 +1072,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL,
pDoc->getIDocumentContentOperations().DeleteAndJoin(*pUnoCrsr);
SwNodeIndex aSave( pUnoCrsr->GetPoint()->nNode, -1 );
- sal_Int32 nCntnt = pUnoCrsr->GetPoint()->nContent.GetIndex();
+ sal_Int32 nContent = pUnoCrsr->GetPoint()->nContent.GetIndex();
sal_uInt32 nErrno = pRdr->Read( *pRead ); // and paste the document
@@ -1082,10 +1082,10 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL,
pUnoCrsr->SetMark();
pUnoCrsr->GetMark()->nNode = aSave;
- SwCntntNode* pCntNode = aSave.GetNode().GetCntntNode();
+ SwContentNode* pCntNode = aSave.GetNode().GetContentNode();
if( !pCntNode )
- nCntnt = 0;
- pUnoCrsr->GetMark()->nContent.Assign( pCntNode, nCntnt );
+ nContent = 0;
+ pUnoCrsr->GetMark()->nContent.Assign( pCntNode, nContent );
}
delete pRdr;
@@ -1112,16 +1112,16 @@ bool DocInsertStringSplitCR(
// grouping done in InsertString is intended for typing, not API calls
::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
- SwTxtNode* const pTxtNd =
- rNewCursor.GetPoint()->nNode.GetNode().GetTxtNode();
- if (!pTxtNd)
+ SwTextNode* const pTextNd =
+ rNewCursor.GetPoint()->nNode.GetNode().GetTextNode();
+ if (!pTextNd)
{
SAL_INFO("sw.uno", "DocInsertStringSplitCR: need a text node");
return false;
}
- OUString aTxt;
+ OUString aText;
sal_Int32 nStartIdx = 0;
- const sal_Int32 nMaxLength = COMPLETE_STRING - pTxtNd->GetTxt().getLength();
+ const sal_Int32 nMaxLength = COMPLETE_STRING - pTextNd->GetText().getLength();
sal_Int32 nIdx = rText.indexOf( '\r', nStartIdx );
if( ( nIdx == -1 && nMaxLength < rText.getLength() ) ||
@@ -1132,9 +1132,9 @@ bool DocInsertStringSplitCR(
while (nIdx != -1 )
{
OSL_ENSURE( nIdx - nStartIdx >= 0, "index negative!" );
- aTxt = rText.copy( nStartIdx, nIdx - nStartIdx );
- if (!aTxt.isEmpty() &&
- !rDoc.getIDocumentContentOperations().InsertString( rNewCursor, aTxt, nInsertFlags ))
+ aText = rText.copy( nStartIdx, nIdx - nStartIdx );
+ if (!aText.isEmpty() &&
+ !rDoc.getIDocumentContentOperations().InsertString( rNewCursor, aText, nInsertFlags ))
{
OSL_FAIL( "Doc->Insert(Str) failed." );
bOK = false;
@@ -1147,9 +1147,9 @@ bool DocInsertStringSplitCR(
nStartIdx = nIdx + 1;
nIdx = rText.indexOf( '\r', nStartIdx );
}
- aTxt = rText.copy( nStartIdx );
- if (!aTxt.isEmpty() &&
- !rDoc.getIDocumentContentOperations().InsertString( rNewCursor, aTxt, nInsertFlags ))
+ aText = rText.copy( nStartIdx );
+ if (!aText.isEmpty() &&
+ !rDoc.getIDocumentContentOperations().InsertString( rNewCursor, aText, nInsertFlags ))
{
OSL_FAIL( "Doc->Insert(Str) failed." );
bOK = false;
@@ -1290,7 +1290,7 @@ void makeTableRowRedline( SwTableLine& rTableLine,
const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- IDocumentRedlineAccess* pRedlineAccess = &rTableLine.GetFrmFmt()->GetDoc()->getIDocumentRedlineAccess();
+ IDocumentRedlineAccess* pRedlineAccess = &rTableLine.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess();
RedlineType_t eType;
if ( rRedlineType == "TableRowInsert" )
@@ -1347,7 +1347,7 @@ void makeTableCellRedline( SwTableBox& rTableBox,
const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- IDocumentRedlineAccess* pRedlineAccess = &rTableBox.GetFrmFmt()->GetDoc()->getIDocumentRedlineAccess();
+ IDocumentRedlineAccess* pRedlineAccess = &rTableBox.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess();
RedlineType_t eType;
if ( rRedlineType == "TableCellInsert" )
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 28e9d968b95e..7b0486537421 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -71,18 +71,18 @@ using namespace ::com::sun::star;
class SwShapeDescriptor_Impl
{
- SwFmtHoriOrient* pHOrient;
- SwFmtVertOrient* pVOrient;
- SwFmtAnchor* pAnchor;
- SwFmtSurround* pSurround;
+ SwFormatHoriOrient* pHOrient;
+ SwFormatVertOrient* pVOrient;
+ SwFormatAnchor* pAnchor;
+ SwFormatSurround* pSurround;
SvxULSpaceItem* pULSpace;
SvxLRSpaceItem* pLRSpace;
bool bOpaque;
uno::Reference< text::XTextRange > xTextRange;
// #i26791#
- SwFmtFollowTextFlow* mpFollowTextFlow;
+ SwFormatFollowTextFlow* mpFollowTextFlow;
// #i28701#
- SwFmtWrapInfluenceOnObjPos* pWrapInfluenceOnObjPos;
+ SwFormatWrapInfluenceOnObjPos* pWrapInfluenceOnObjPos;
// #i28749#
sal_Int16 mnPositionLayoutDir;
@@ -101,9 +101,9 @@ public:
pLRSpace(0),
bOpaque(false),
// #i26791#
- mpFollowTextFlow( new SwFmtFollowTextFlow( false ) ),
+ mpFollowTextFlow( new SwFormatFollowTextFlow( false ) ),
// #i28701# #i35017#
- pWrapInfluenceOnObjPos( new SwFmtWrapInfluenceOnObjPos(
+ pWrapInfluenceOnObjPos( new SwFormatWrapInfluenceOnObjPos(
text::WrapInfluenceOnPosition::ONCE_CONCURRENT ) ),
// #i28749#
mnPositionLayoutDir( text::PositionLayoutDir::PositionInLayoutDirOfAnchor ),
@@ -123,37 +123,37 @@ public:
// #i28701#
delete pWrapInfluenceOnObjPos;
}
- SwFmtAnchor* GetAnchor(bool bCreate = false)
+ SwFormatAnchor* GetAnchor(bool bCreate = false)
{
if(bCreate && !pAnchor)
{
- pAnchor = new SwFmtAnchor(FLY_AS_CHAR);
+ pAnchor = new SwFormatAnchor(FLY_AS_CHAR);
}
return pAnchor;
}
- SwFmtHoriOrient* GetHOrient(bool bCreate = false)
+ SwFormatHoriOrient* GetHOrient(bool bCreate = false)
{
if (bCreate && !pHOrient)
{
// #i26791#
- pHOrient = new SwFmtHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::FRAME );
+ pHOrient = new SwFormatHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::FRAME );
}
return pHOrient;
}
- SwFmtVertOrient* GetVOrient(bool bCreate = false)
+ SwFormatVertOrient* GetVOrient(bool bCreate = false)
{
if(bCreate && !pVOrient)
{
// #i26791#
- pVOrient = new SwFmtVertOrient( 0, text::VertOrientation::NONE, text::RelOrientation::FRAME );
+ pVOrient = new SwFormatVertOrient( 0, text::VertOrientation::NONE, text::RelOrientation::FRAME );
}
return pVOrient;
}
- SwFmtSurround* GetSurround(bool bCreate = false)
+ SwFormatSurround* GetSurround(bool bCreate = false)
{
if(bCreate && !pSurround)
- pSurround = new SwFmtSurround();
+ pSurround = new SwFormatSurround();
return pSurround;
}
SvxLRSpaceItem* GetLRSpace(bool bCreate = false)
@@ -189,10 +189,10 @@ public:
void SetOpaque(bool bSet){bOpaque = bSet;}
// #i26791#
- SwFmtFollowTextFlow* GetFollowTextFlow( bool _bCreate = false )
+ SwFormatFollowTextFlow* GetFollowTextFlow( bool _bCreate = false )
{
if ( _bCreate && !mpFollowTextFlow )
- mpFollowTextFlow = new SwFmtFollowTextFlow( false );
+ mpFollowTextFlow = new SwFormatFollowTextFlow( false );
return mpFollowTextFlow;
}
void RemoveFollowTextFlow()
@@ -223,12 +223,12 @@ public:
}
// #i28701#
- inline SwFmtWrapInfluenceOnObjPos* GetWrapInfluenceOnObjPos(
+ inline SwFormatWrapInfluenceOnObjPos* GetWrapInfluenceOnObjPos(
const bool _bCreate = false )
{
if ( _bCreate && !pWrapInfluenceOnObjPos )
{
- pWrapInfluenceOnObjPos = new SwFmtWrapInfluenceOnObjPos(
+ pWrapInfluenceOnObjPos = new SwFormatWrapInfluenceOnObjPos(
// #i35017#
text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
}
@@ -282,8 +282,8 @@ uno::Reference< uno::XInterface > SwFmDrawPage::GetInterface( SdrObject* pObj
uno::Reference< XInterface > xShape;
if( pObj )
{
- SwFrmFmt* pFmt = ::FindFrmFmt( pObj );
- SwXShape* pxShape = SwIterator<SwXShape,SwFmt>( *pFmt ).First();
+ SwFrameFormat* pFormat = ::FindFrameFormat( pObj );
+ SwXShape* pxShape = SwIterator<SwXShape,SwFormat>( *pFormat ).First();
if(pxShape)
{
xShape = *(cppu::OWeakObject*)pxShape;
@@ -310,29 +310,29 @@ uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj )
SwFlyDrawContact* pFlyContact = static_cast<SwFlyDrawContact*>(pObj->GetUserCall());
if(pFlyContact)
{
- SwFrmFmt* pFlyFmt = pFlyContact->GetFmt();
- SwDoc* pDoc = pFlyFmt->GetDoc();
+ SwFrameFormat* pFlyFormat = pFlyContact->GetFormat();
+ SwDoc* pDoc = pFlyFormat->GetDoc();
const SwNodeIndex* pIdx;
- if( RES_FLYFRMFMT == pFlyFmt->Which()
- && 0 != ( pIdx = pFlyFmt->GetCntnt().GetCntntIdx() )
+ if( RES_FLYFRMFMT == pFlyFormat->Which()
+ && 0 != ( pIdx = pFlyFormat->GetContent().GetContentIdx() )
&& pIdx->GetNodes().IsDocNodes()
)
{
const SwNode* pNd = pDoc->GetNodes()[ pIdx->GetIndex() + 1 ];
- if(!pNd->IsNoTxtNode())
+ if(!pNd->IsNoTextNode())
{
- xRet.set(SwXTextFrame::CreateXTextFrame(*pDoc, pFlyFmt),
+ xRet.set(SwXTextFrame::CreateXTextFrame(*pDoc, pFlyFormat),
uno::UNO_QUERY);
}
else if( pNd->IsGrfNode() )
{
xRet.set(SwXTextGraphicObject::CreateXTextGraphicObject(
- *pDoc, pFlyFmt), uno::UNO_QUERY);
+ *pDoc, pFlyFormat), uno::UNO_QUERY);
}
else if( pNd->IsOLENode() )
{
xRet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
- *pDoc, pFlyFmt), uno::UNO_QUERY);
+ *pDoc, pFlyFormat), uno::UNO_QUERY);
}
}
else
@@ -401,7 +401,7 @@ SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage)
SolarMutexGuard aGuard;
::std::insert_iterator<shapescontainer_t> pInserter = ::std::insert_iterator<shapescontainer_t>(m_aShapes, m_aShapes.begin());
sal_Int32 nCount = pDrawPage->getCount();
- std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDrawPage->GetDoc());
+ std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDrawPage->GetDoc());
for(sal_Int32 nIdx = 0; nIdx < nCount; nIdx++)
{
uno::Reference<drawing::XShape> xShape = uno::Reference<drawing::XShape>(pDrawPage->getByIndex(nIdx, &aTextBoxes), uno::UNO_QUERY);
@@ -530,7 +530,7 @@ sal_Int32 SwXDrawPage::getCount() throw( uno::RuntimeException, std::exception )
{
static_cast<SwXDrawPage*>(this)->GetSvxPage();
- std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
+ std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
if (aTextBoxes.empty())
return pDrawPage->getCount();
@@ -546,7 +546,7 @@ uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex)
return getByIndex(nIndex, 0);
}
-uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex, std::set<const SwFrmFmt*>* pTextBoxes)
+uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex, std::set<const SwFrameFormat*>* pTextBoxes)
throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
@@ -556,7 +556,7 @@ uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex, std::set<const SwFrmFmt*>* pT
throw lang::IndexOutOfBoundsException();
static_cast<SwXDrawPage*>(this)->GetSvxPage();
- std::set<const SwFrmFmt*> aTextBoxes;
+ std::set<const SwFrameFormat*> aTextBoxes;
if (!pTextBoxes)
{
// We got no set, so let's generate one.
@@ -632,7 +632,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
SfxItemSet aSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
RES_FRMATR_END-1 );
- SwFmtAnchor aAnchor( FLY_AS_CHAR );
+ SwFormatAnchor aAnchor( FLY_AS_CHAR );
bool bOpaque = false;
if( pDesc )
{
@@ -653,7 +653,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
// #i32349# - if no horizontal position exists, create one
if ( !pDesc->GetHOrient() )
{
- SwFmtHoriOrient* pHori = pDesc->GetHOrient( true );
+ SwFormatHoriOrient* pHori = pDesc->GetHOrient( true );
SwTwips nHoriPos = convertMm100ToTwip(aMM100Pos.X);
pHori->SetPos( nHoriPos );
}
@@ -665,7 +665,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
// #i32349# - if no vertical position exists, create one
if ( !pDesc->GetVOrient() )
{
- SwFmtVertOrient* pVert = pDesc->GetVOrient( true );
+ SwFormatVertOrient* pVert = pDesc->GetVOrient( true );
SwTwips nVertPos = convertMm100ToTwip(aMM100Pos.Y);
pVert->SetPos( nVertPos );
}
@@ -745,9 +745,9 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
pTemp = pPam;
UnoActionContext aAction(pDoc);
pDoc->getIDocumentContentOperations().InsertDrawObj( *pTemp, *pObj, aSet );
- SwFrmFmt* pFmt = ::FindFrmFmt( pObj );
- if(pFmt)
- pFmt->Add(pShape);
+ SwFrameFormat* pFormat = ::FindFrameFormat( pObj );
+ if(pFormat)
+ pFormat->Add(pShape);
pShape->m_bDescriptor = false;
delete pPam;
@@ -784,7 +784,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
for ( size_t i = 0; !bFlyInCnt && i < rMarkList.GetMarkCount(); ++i )
{
const SdrObject *pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
- if (FLY_AS_CHAR == ::FindFrmFmt(const_cast<SdrObject*>(
+ if (FLY_AS_CHAR == ::FindFrameFormat(const_cast<SdrObject*>(
pObj))->GetAnchor().GetAnchorId())
{
bFlyInCnt = true;
@@ -961,9 +961,9 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
SdrObject* pObj = pShape ? pShape->GetSdrObject() : 0;
if(pObj)
{
- SwFrmFmt* pFmt = ::FindFrmFmt( pObj );
- if(pFmt)
- pFmt->Add(this);
+ SwFrameFormat* pFormat = ::FindFrameFormat( pObj );
+ if(pFormat)
+ pFormat->Add(this);
lcl_addShapePropertyEventFactories( *pObj, *this );
pImpl->bInitializedPropertyNotifier = true;
@@ -971,13 +971,13 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
}
}
-void SwXShape::AddExistingShapeToFmt( SdrObject& _rObj )
+void SwXShape::AddExistingShapeToFormat( SdrObject& _rObj )
{
SdrObjListIter aIter( _rObj, IM_DEEPNOGROUPS );
while ( aIter.IsMore() )
{
SdrObject* pCurrent = aIter.Next();
- OSL_ENSURE( pCurrent, "SwXShape::AddExistingShapeToFmt: invalid object list element!" );
+ OSL_ENSURE( pCurrent, "SwXShape::AddExistingShapeToFormat: invalid object list element!" );
if ( !pCurrent )
continue;
@@ -990,9 +990,9 @@ void SwXShape::AddExistingShapeToFmt( SdrObject& _rObj )
{
if ( pSwShape->m_bDescriptor )
{
- SwFrmFmt* pFmt = ::FindFrmFmt( const_cast< SdrObject* >( pCurrent ) );
- if ( pFmt )
- pFmt->Add( pSwShape );
+ SwFrameFormat* pFormat = ::FindFrameFormat( const_cast< SdrObject* >( pCurrent ) );
+ if ( pFormat )
+ pFormat->Add( pSwShape );
pSwShape->m_bDescriptor = false;
}
@@ -1017,7 +1017,7 @@ SwXShape::~SwXShape()
uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeException, std::exception )
{
- uno::Any aRet = SwTextBoxHelper::queryInterface(GetFrmFmt(), aType);
+ uno::Any aRet = SwTextBoxHelper::queryInterface(GetFrameFormat(), aType);
if (aRet.hasValue())
return aRet;
@@ -1093,7 +1093,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if(xShapeAgg.is())
{
@@ -1102,10 +1102,10 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException ("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
// with the layout it is possible to move the anchor without changing the position
- if(pFmt)
+ if(pFormat)
{
- SwAttrSet aSet(pFmt->GetAttrSet());
- SwDoc* pDoc = pFmt->GetDoc();
+ SwAttrSet aSet(pFormat->GetAttrSet());
+ SwDoc* pDoc = pFormat->GetDoc();
if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORFRAME == pEntry->nMemberId)
{
bool bDone = false;
@@ -1117,19 +1117,19 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
reinterpret_cast< SwXFrame * >(
sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXFrame::getUnoTunnelId()) ))
: 0;
- if(pFrame && pFrame->GetFrmFmt() &&
- pFrame->GetFrmFmt()->GetDoc() == pDoc)
+ if(pFrame && pFrame->GetFrameFormat() &&
+ pFrame->GetFrameFormat()->GetDoc() == pDoc)
{
UnoActionContext aCtx(pDoc);
SfxItemSet aItemSet( pDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END - 1 );
- aItemSet.SetParent(&pFmt->GetAttrSet());
- SwFmtAnchor aAnchor = static_cast<const SwFmtAnchor&>(aItemSet.Get(pEntry->nWID));
- SwPosition aPos(*pFrame->GetFrmFmt()->GetCntnt().GetCntntIdx());
+ aItemSet.SetParent(&pFormat->GetAttrSet());
+ SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aItemSet.Get(pEntry->nWID));
+ SwPosition aPos(*pFrame->GetFrameFormat()->GetContent().GetContentIdx());
aAnchor.SetAnchor(&aPos);
aAnchor.SetType(FLY_AT_FLY);
aItemSet.Put(aAnchor);
- pFmt->SetFmtAttr(aItemSet);
+ pFormat->SetFormatAttr(aItemSet);
bDone = true;
}
}
@@ -1163,7 +1163,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
// #i26791# - special handling for property FN_TEXT_RANGE
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
- SwFmtAnchor aAnchor( static_cast<const SwFmtAnchor&>(aSet.Get( RES_ANCHOR )) );
+ SwFormatAnchor aAnchor( static_cast<const SwFormatAnchor&>(aSet.Get( RES_ANCHOR )) );
if (aAnchor.GetAnchorId() == FLY_AT_PAGE)
{
// set property <TextRange> not valid for to-page anchored shapes
@@ -1172,45 +1172,45 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
else
{
SwUnoInternalPaM* pInternalPam =
- new SwUnoInternalPaM( *(pFmt->GetDoc()) );
+ new SwUnoInternalPaM( *(pFormat->GetDoc()) );
uno::Reference< text::XTextRange > xRg;
aValue >>= xRg;
if (::sw::XTextRangeToSwPaM(*pInternalPam, xRg) )
{
if (aAnchor.GetAnchorId() == FLY_AS_CHAR)
{
- //delete old SwFmtFlyCnt
- //With AnchorAsCharacter the current TxtAttribute has to be deleted.
+ //delete old SwFormatFlyCnt
+ //With AnchorAsCharacter the current TextAttribute has to be deleted.
//Tbis removes the frame format too.
//To prevent this the connection between format and attribute has to be broken before.
- const SwPosition *pPos = aAnchor.GetCntntAnchor();
- SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- SAL_WARN_IF( !pTxtNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
+ const SwPosition *pPos = aAnchor.GetContentAnchor();
+ SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode();
+ SAL_WARN_IF( !pTextNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
const sal_Int32 nIdx = pPos->nContent.GetIndex();
- SwTxtAttr * const pHnt =
- pTxtNode->GetTxtAttrForCharAt(
+ SwTextAttr * const pHint =
+ pTextNode->GetTextAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
- SAL_WARN_IF( !pHnt || pHnt->Which() != RES_TXTATR_FLYCNT,
+ SAL_WARN_IF( !pHint || pHint->Which() != RES_TXTATR_FLYCNT,
"sw.uno", "Missing FlyInCnt-Hint." );
- SAL_WARN_IF( !pHnt || pHnt->GetFlyCnt().GetFrmFmt() != pFmt,
- "sw.uno", "Wrong TxtFlyCnt-Hint." );
- const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt())
- .SetFlyFmt();
+ SAL_WARN_IF( !pHint || pHint->GetFlyCnt().GetFrameFormat() != pFormat,
+ "sw.uno", "Wrong TextFlyCnt-Hint." );
+ const_cast<SwFormatFlyCnt&>(pHint->GetFlyCnt())
+ .SetFlyFormat();
//The connection is removed now the attribute can be deleted.
- pTxtNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx );
+ pTextNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx );
//create a new one
- SwTxtNode *pNd = pInternalPam->GetNode().GetTxtNode();
- SAL_WARN_IF( !pNd, "sw.uno", "Cursor not at TxtNode." );
- SwFmtFlyCnt aFmt( pFmt );
- pNd->InsertItem(aFmt, pInternalPam->GetPoint()
+ SwTextNode *pNd = pInternalPam->GetNode().GetTextNode();
+ SAL_WARN_IF( !pNd, "sw.uno", "Cursor not at TextNode." );
+ SwFormatFlyCnt aFormat( pFormat );
+ pNd->InsertItem(aFormat, pInternalPam->GetPoint()
->nContent.GetIndex(), 0 );
}
else
{
aAnchor.SetAnchor( pInternalPam->GetPoint() );
aSet.Put(aAnchor);
- pFmt->SetFmtAttr(aSet);
+ pFormat->SetFormatAttr(aSet);
}
}
else
@@ -1225,29 +1225,29 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
bool bValue(false);
aValue >>= bValue;
if (bValue)
- SwTextBoxHelper::create(pFmt);
+ SwTextBoxHelper::create(pFormat);
else
- SwTextBoxHelper::destroy(pFmt);
+ SwTextBoxHelper::destroy(pFormat);
}
else if (pEntry->nWID == RES_CHAIN)
{
if (pEntry->nMemberId == MID_CHAIN_NEXTNAME || pEntry->nMemberId == MID_CHAIN_PREVNAME)
- SwTextBoxHelper::syncProperty(pFmt, pEntry->nWID, pEntry->nMemberId, aValue);
+ SwTextBoxHelper::syncProperty(pFormat, pEntry->nWID, pEntry->nMemberId, aValue);
}
// #i28749#
else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID )
{
sal_Int16 nPositionLayoutDir = 0;
aValue >>= nPositionLayoutDir;
- pFmt->SetPositionLayoutDir( nPositionLayoutDir );
+ pFormat->SetPositionLayoutDir( nPositionLayoutDir );
}
else if( pDoc->getIDocumentLayoutAccess().GetCurrentLayout())
{
UnoActionContext aCtx(pDoc);
if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORTYPE == pEntry->nMemberId)
{
- SdrObject* pObj = pFmt->FindSdrObject();
+ SdrObject* pObj = pFormat->FindSdrObject();
SdrMarkList aList;
SdrMark aMark(pObj);
aList.InsertEntry(aMark);
@@ -1259,7 +1259,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
else
{
m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
- pFmt->SetFmtAttr(aSet);
+ pFormat->SetFormatAttr(aSet);
}
}
else if( RES_FRM_SIZE == pEntry->nWID &&
@@ -1301,38 +1301,38 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
sal_Int32 eNewAnchor = SWUnoHelper::GetEnumAsInt32( aValue );
//if old anchor was in_cntnt the related text attribute has to be removed
- const SwFmtAnchor& rOldAnchor = pFmt->GetAnchor();
+ const SwFormatAnchor& rOldAnchor = pFormat->GetAnchor();
RndStdIds eOldAnchorId = rOldAnchor.GetAnchorId();
- SdrObject* pObj = pFmt->FindSdrObject();
- SwFrmFmt *pFlyFmt = FindFrmFmt( pObj );
- pFlyFmt->DelFrms();
+ SdrObject* pObj = pFormat->FindSdrObject();
+ SwFrameFormat *pFlyFormat = FindFrameFormat( pObj );
+ pFlyFormat->DelFrms();
if( text::TextContentAnchorType_AS_CHARACTER != eNewAnchor &&
(FLY_AS_CHAR == eOldAnchorId))
{
- //With AnchorAsCharacter the current TxtAttribute has to be deleted.
+ //With AnchorAsCharacter the current TextAttribute has to be deleted.
//Tbis removes the frame format too.
//To prevent this the connection between format and attribute has to be broken before.
- const SwPosition *pPos = rOldAnchor.GetCntntAnchor();
- SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- SAL_WARN_IF( !pTxtNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
+ const SwPosition *pPos = rOldAnchor.GetContentAnchor();
+ SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode();
+ SAL_WARN_IF( !pTextNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
const sal_Int32 nIdx = pPos->nContent.GetIndex();
- SwTxtAttr * const pHnt =
- pTxtNode->GetTxtAttrForCharAt(
+ SwTextAttr * const pHint =
+ pTextNode->GetTextAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
- SAL_WARN_IF( !pHnt || pHnt->Which() != RES_TXTATR_FLYCNT,
+ SAL_WARN_IF( !pHint || pHint->Which() != RES_TXTATR_FLYCNT,
"sw.uno", "Missing FlyInCnt-Hint." );
- SAL_WARN_IF( !pHnt || pHnt->GetFlyCnt().GetFrmFmt() != pFlyFmt,
- "sw.uno", "Wrong TxtFlyCnt-Hint." );
- const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt())
- .SetFlyFmt();
+ SAL_WARN_IF( !pHint || pHint->GetFlyCnt().GetFrameFormat() != pFlyFormat,
+ "sw.uno", "Wrong TextFlyCnt-Hint." );
+ const_cast<SwFormatFlyCnt&>(pHint->GetFlyCnt())
+ .SetFlyFormat();
//The connection is removed now the attribute can be deleted.
- pTxtNode->DeleteAttributes(RES_TXTATR_FLYCNT, nIdx);
+ pTextNode->DeleteAttributes(RES_TXTATR_FLYCNT, nIdx);
}
else if( text::TextContentAnchorType_AT_PAGE != eNewAnchor &&
(FLY_AT_PAGE == eOldAnchorId))
{
- SwFmtAnchor aNewAnchor( dynamic_cast< const SwFmtAnchor& >( aSet.Get( RES_ANCHOR ) ) );
+ SwFormatAnchor aNewAnchor( dynamic_cast< const SwFormatAnchor& >( aSet.Get( RES_ANCHOR ) ) );
//if the fly has been anchored at page then it needs to be connected
//to the content position
SwPaM aPam(pDoc->GetNodes().GetEndOfContent());
@@ -1350,7 +1350,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
//anchor position has to be inserted after the text attribute has been inserted
aNewAnchor.SetAnchor( aPam.GetPoint() );
aSet.Put( aNewAnchor );
- pFmt->SetFmtAttr(aSet);
+ pFormat->SetFormatAttr(aSet);
bSetAttr = false;
}
if( text::TextContentAnchorType_AS_CHARACTER == eNewAnchor &&
@@ -1369,26 +1369,26 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
aPam.Move( fnMoveBackward, fnGoDoc );
}
//the RES_TXTATR_FLYCNT needs to be added now
- SwTxtNode *pNd = aPam.GetNode().GetTxtNode();
- SAL_WARN_IF( !pNd, "sw.uno", "Crsr is not in a TxtNode." );
- SwFmtFlyCnt aFmt( pFlyFmt );
- pNd->InsertItem(aFmt,
+ SwTextNode *pNd = aPam.GetNode().GetTextNode();
+ SAL_WARN_IF( !pNd, "sw.uno", "Crsr is not in a TextNode." );
+ SwFormatFlyCnt aFormat( pFlyFormat );
+ pNd->InsertItem(aFormat,
aPam.GetPoint()->nContent.GetIndex(), 0 );
--aPam.GetPoint()->nContent; // InsertItem moved it
- SwFmtAnchor aNewAnchor(
- dynamic_cast<const SwFmtAnchor&>(
+ SwFormatAnchor aNewAnchor(
+ dynamic_cast<const SwFormatAnchor&>(
aSet.Get(RES_ANCHOR)));
aNewAnchor.SetAnchor( aPam.GetPoint() );
aSet.Put( aNewAnchor );
}
if( bSetAttr )
- pFmt->SetFmtAttr(aSet);
+ pFormat->SetFormatAttr(aSet);
}
else
- pFmt->SetFmtAttr(aSet);
+ pFormat->SetFormatAttr(aSet);
}
- // We have a pFmt and a pEntry as well: try to sync TextBox property.
- SwTextBoxHelper::syncProperty(pFmt, pEntry->nWID, pEntry->nMemberId, aValue);
+ // We have a pFormat and a pEntry as well: try to sync TextBox property.
+ SwTextBoxHelper::syncProperty(pFormat, pEntry->nWID, pEntry->nMemberId, aValue);
}
else
{
@@ -1470,18 +1470,18 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
{
aKeepedPosition = getPosition();
}
- if( pFmt && pFmt->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() )
+ if( pFormat && pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() )
{
- UnoActionContext aCtx(pFmt->GetDoc());
+ UnoActionContext aCtx(pFormat->GetDoc());
xPrSet->setPropertyValue(rPropertyName, aValue);
}
else
xPrSet->setPropertyValue(rPropertyName, aValue);
- if (pFmt)
+ if (pFormat)
{
- // We have a pFmt (but no pEntry): try to sync TextBox property.
- SwTextBoxHelper::syncProperty(pFmt, rPropertyName, aValue);
+ // We have a pFormat (but no pEntry): try to sync TextBox property.
+ SwTextBoxHelper::syncProperty(pFormat, rPropertyName, aValue);
}
// #i31698# - restore object position, if caption point is set.
@@ -1499,13 +1499,13 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
{
SolarMutexGuard aGuard;
uno::Any aRet;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
if(xShapeAgg.is())
{
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if(pEntry)
{
- if(pFmt)
+ if(pFormat)
{
if(RES_OPAQUE == pEntry->nWID)
{
@@ -1516,8 +1516,8 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
SdrObject* pObj = pSvxShape->GetSdrObject();
// consider invisible layers
aRet <<=
- ( pObj->GetLayer() != pFmt->GetDoc()->getIDocumentDrawModelAccess().GetHellId() &&
- pObj->GetLayer() != pFmt->GetDoc()->getIDocumentDrawModelAccess().GetInvisibleHellId() );
+ ( pObj->GetLayer() != pFormat->GetDoc()->getIDocumentDrawModelAccess().GetHellId() &&
+ pObj->GetLayer() != pFormat->GetDoc()->getIDocumentDrawModelAccess().GetInvisibleHellId() );
}
}
else if(FN_ANCHOR_POSITION == pEntry->nWID)
@@ -1536,7 +1536,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
// #i26791# - special handling for FN_TEXT_RANGE
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
- const SwFmtAnchor aAnchor = pFmt->GetAnchor();
+ const SwFormatAnchor aAnchor = pFormat->GetAnchor();
if (aAnchor.GetAnchorId() == FLY_AT_PAGE)
{
// return nothing, because property <TextRange> isn't
@@ -1546,12 +1546,12 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
}
else
{
- if ( aAnchor.GetCntntAnchor() )
+ if ( aAnchor.GetContentAnchor() )
{
const uno::Reference< text::XTextRange > xTextRange
= SwXTextRange::CreateXTextRange(
- *pFmt->GetDoc(),
- *aAnchor.GetCntntAnchor(),
+ *pFormat->GetDoc(),
+ *aAnchor.GetContentAnchor(),
0L );
aRet.setValue(&xTextRange, cppu::UnoType<text::XTextRange>::get());
}
@@ -1565,7 +1565,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
}
else if (pEntry->nWID == FN_TEXT_BOX)
{
- bool bValue = SwTextBoxHelper::findTextBox(pFmt);
+ bool bValue = SwTextBoxHelper::findTextBox(pFormat);
aRet <<= bValue;
}
else if (pEntry->nWID == RES_CHAIN)
@@ -1575,7 +1575,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
case MID_CHAIN_PREVNAME:
case MID_CHAIN_NEXTNAME:
case MID_CHAIN_NAME:
- SwTextBoxHelper::getProperty(pFmt, pEntry->nWID, pEntry->nMemberId, aRet);
+ SwTextBoxHelper::getProperty(pFormat, pEntry->nWID, pEntry->nMemberId, aRet);
break;
}
}
@@ -1588,7 +1588,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
}
else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID )
{
- aRet <<= pFmt->GetPositionLayoutDir();
+ aRet <<= pFormat->GetPositionLayoutDir();
}
// #i36248#
else if ( FN_SHAPE_STARTPOSITION_IN_HORI_L2R == pEntry->nWID )
@@ -1637,7 +1637,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
}
else
{
- const SwAttrSet& rSet = pFmt->GetAttrSet();
+ const SwAttrSet& rSet = pFormat->GetAttrSet();
m_pPropSet->getPropertyValue(*pEntry, rSet, aRet);
}
}
@@ -1758,9 +1758,9 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
else if (rPropertyName == "ZOrder")
{
// Convert the real draw page position to the logical one that ignores textboxes.
- if (pFmt)
+ if (pFormat)
{
- const SdrObject* pObj = pFmt->FindRealSdrObject();
+ const SdrObject* pObj = pFormat->FindRealSdrObject();
if (pObj)
{
bool bConvert = true;
@@ -1771,7 +1771,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
bConvert = false;
if (bConvert)
{
- std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pFmt->GetDoc());
+ std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pFormat->GetDoc());
aRet <<= SwTextBoxHelper::getOrdNum(pObj, aTextBoxes);
}
}
@@ -1818,7 +1818,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
uno::Sequence< beans::PropertyState > aRet(aPropertyNames.getLength());
if(xShapeAgg.is())
{
@@ -1855,14 +1855,14 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
else if (pEntry->nWID == FN_TEXT_BOX)
{
// The TextBox property is set, if we can find a textbox for this shape.
- if (pFmt && SwTextBoxHelper::findTextBox(pFmt))
+ if (pFormat && SwTextBoxHelper::findTextBox(pFormat))
pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
else
pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
}
- else if(pFmt)
+ else if(pFormat)
{
- const SwAttrSet& rSet = pFmt->GetAttrSet();
+ const SwAttrSet& rSet = pFormat->GetAttrSet();
SfxItemState eItemState = rSet.GetItemState(pEntry->nWID, false);
if(SfxItemState::SET == eItemState)
@@ -1931,7 +1931,7 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
if(xShapeAgg.is())
{
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
@@ -1939,13 +1939,13 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName )
{
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw uno::RuntimeException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- if(pFmt)
+ if(pFormat)
{
- const SfxItemSet& rSet = pFmt->GetAttrSet();
- SfxItemSet aSet(pFmt->GetDoc()->GetAttrPool(), pEntry->nWID, pEntry->nWID);
+ const SfxItemSet& rSet = pFormat->GetAttrSet();
+ SfxItemSet aSet(pFormat->GetDoc()->GetAttrPool(), pEntry->nWID, pEntry->nWID);
aSet.SetParent(&rSet);
aSet.ClearItem(pEntry->nWID);
- pFmt->GetDoc()->SetAttr(aSet, *pFmt);
+ pFormat->GetDoc()->SetAttr(aSet, *pFormat);
}
else
{
@@ -1994,17 +1994,17 @@ uno::Any SwXShape::getPropertyDefault( const OUString& rPropertyName )
uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
uno::Any aRet;
if(xShapeAgg.is())
{
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if(pEntry)
{
- if(pEntry->nWID < RES_FRMATR_END && pFmt)
+ if(pEntry->nWID < RES_FRMATR_END && pFormat)
{
const SfxPoolItem& rDefItem =
- pFmt->GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
+ pFormat->GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
else
@@ -2116,9 +2116,9 @@ void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange)
{
pDoc = pPortion->GetCursor()->GetDoc();
}
- else if ( !pDoc && pParagraph && pParagraph->GetTxtNode( ) )
+ else if ( !pDoc && pParagraph && pParagraph->GetTextNode( ) )
{
- pDoc = const_cast<SwDoc*>(pParagraph->GetTxtNode()->GetDoc());
+ pDoc = const_cast<SwDoc*>(pParagraph->GetTextNode()->GetDoc());
}
}
@@ -2150,17 +2150,17 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor() throw( uno::RuntimeExc
{
SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > aRef;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
+ const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
// return an anchor for non-page bound frames
// and for page bound frames that have a page no == NULL and a content position
if ((rAnchor.GetAnchorId() != FLY_AT_PAGE) ||
- (rAnchor.GetCntntAnchor() && !rAnchor.GetPageNum()))
+ (rAnchor.GetContentAnchor() && !rAnchor.GetPageNum()))
{
- const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor());
- aRef = SwXTextRange::CreateXTextRange(*pFmt->GetDoc(), rPos, 0);
+ const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
+ aRef = SwXTextRange::CreateXTextRange(*pFormat->GetDoc(), rPos, 0);
}
}
else
@@ -2171,20 +2171,20 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor() throw( uno::RuntimeExc
void SwXShape::dispose() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
// determine correct <SdrObject>
SvxShape* pSvxShape = GetSvxShape();
SdrObject* pObj = pSvxShape ? pSvxShape->GetSdrObject() : NULL;
// safety assertion:
- // <pObj> must be the same as <pFmt->FindSdrObject()>, if <pObj> isn't
+ // <pObj> must be the same as <pFormat->FindSdrObject()>, if <pObj> isn't
// a 'virtual' drawing object.
// correct assertion and refine it for safety reason.
OSL_ENSURE( !pObj ||
pObj->ISA(SwDrawVirtObj) ||
pObj->GetUpGroup() ||
- pObj == pFmt->FindSdrObject(),
+ pObj == pFormat->FindSdrObject(),
"<SwXShape::dispose(..) - different 'master' drawing objects!!" );
// perform delete of draw frame format *not*
// for 'virtual' drawing objects.
@@ -2195,15 +2195,15 @@ void SwXShape::dispose() throw( uno::RuntimeException, std::exception )
!pObj->GetUpGroup() &&
pObj->IsInserted() )
{
- if (pFmt->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
+ if (pFormat->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
{
- const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor());
- SwTxtNode *pTxtNode = rPos.nNode.GetNode().GetTxtNode();
+ const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
+ SwTextNode *pTextNode = rPos.nNode.GetNode().GetTextNode();
const sal_Int32 nIdx = rPos.nContent.GetIndex();
- pTxtNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx );
+ pTextNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx );
}
else
- pFmt->GetDoc()->getIDocumentLayoutAccess().DelLayoutFmt( pFmt );
+ pFormat->GetDoc()->getIDocumentLayoutAccess().DelLayoutFormat( pFormat );
}
}
if(xShapeAgg.is())
@@ -2425,7 +2425,7 @@ void SAL_CALL SwXShape::setSize( const awt::Size& aSize )
{
mxShape->setSize( aSize );
}
- SwTextBoxHelper::syncProperty(GetFrmFmt(), RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::makeAny(aSize));
+ SwTextBoxHelper::syncProperty(GetFrameFormat(), RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::makeAny(aSize));
}
// #i31698#
// implementation of virtual methods from drawing::XShapeDescriptor
@@ -2513,23 +2513,23 @@ awt::Point SwXShape::_ConvertPositionToHoriL2R( const awt::Point& rObjPos,
{
awt::Point aObjPosInHoriL2R( rObjPos );
- SwFrmFmt* pFrmFmt = GetFrmFmt();
- if ( pFrmFmt )
+ SwFrameFormat* pFrameFormat = GetFrameFormat();
+ if ( pFrameFormat )
{
- SwFrmFmt::tLayoutDir eLayoutDir = pFrmFmt->GetLayoutDir();
+ SwFrameFormat::tLayoutDir eLayoutDir = pFrameFormat->GetLayoutDir();
switch ( eLayoutDir )
{
- case SwFrmFmt::HORI_L2R:
+ case SwFrameFormat::HORI_L2R:
{
// nothing to do
}
break;
- case SwFrmFmt::HORI_R2L:
+ case SwFrameFormat::HORI_R2L:
{
aObjPosInHoriL2R.X = -rObjPos.X - rObjSize.Width;
}
break;
- case SwFrmFmt::VERT_R2L:
+ case SwFrameFormat::VERT_R2L:
{
aObjPosInHoriL2R.X = -rObjPos.Y - rObjSize.Width;
aObjPosInHoriL2R.Y = rObjPos.X;
@@ -2819,8 +2819,8 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru
{
SolarMutexGuard aGuard;
SvxShape* pSvxShape = GetSvxShape();
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pSvxShape && pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pSvxShape && pFormat)
{
uno::Reference<XShapes> xShapes;
if( xShapeAgg.is() )
@@ -2848,7 +2848,7 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru
SdrObject* pObj = pAddShape->GetSdrObject();
if(pObj)
{
- SwDoc* pDoc = pFmt->GetDoc();
+ SwDoc* pDoc = pFormat->GetDoc();
// set layer of new drawing
// object to corresponding invisible layer.
if( FmFormInventor != pObj->GetObjInventor())
@@ -2865,9 +2865,9 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru
}
pSwShape->m_bDescriptor = false;
//add the group member to the format of the group
- SwFrmFmt* pShapeFmt = ::FindFrmFmt( pSvxShape->GetSdrObject() );
- if(pShapeFmt)
- pFmt->Add(pSwShape);
+ SwFrameFormat* pShapeFormat = ::FindFrameFormat( pSvxShape->GetSdrObject() );
+ if(pShapeFormat)
+ pFormat->Add(pSwShape);
}
}
else
diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx
index 6bb59ef44a5f..10845410a068 100644
--- a/sw/source/core/unocore/unoevent.cxx
+++ b/sw/source/core/unocore/unoevent.cxx
@@ -116,20 +116,20 @@ OUString SwHyperlinkEventDescriptor::getImplementationName()
return sImplName;
}
-void SwHyperlinkEventDescriptor::copyMacrosFromINetFmt(
- const SwFmtINetFmt& aFmt)
+void SwHyperlinkEventDescriptor::copyMacrosFromINetFormat(
+ const SwFormatINetFormat& aFormat)
{
for(sal_uInt16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; ++i)
{
const sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
- const SvxMacro* aMacro = aFmt.GetMacro(nEvent);
+ const SvxMacro* aMacro = aFormat.GetMacro(nEvent);
if (NULL != aMacro)
replaceByName(nEvent, *aMacro);
}
}
-void SwHyperlinkEventDescriptor::copyMacrosIntoINetFmt(
- SwFmtINetFmt& aFmt)
+void SwHyperlinkEventDescriptor::copyMacrosIntoINetFormat(
+ SwFormatINetFormat& aFormat)
{
for(sal_uInt16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; ++i)
{
@@ -138,7 +138,7 @@ void SwHyperlinkEventDescriptor::copyMacrosIntoINetFmt(
{
SvxMacro aMacro(sEmpty, sEmpty);
getByName(aMacro, nEvent);
- aFmt.SetMacro(nEvent, aMacro);
+ aFormat.SetMacro(nEvent, aMacro);
}
}
}
@@ -191,12 +191,12 @@ SwFrameEventDescriptor::~SwFrameEventDescriptor()
void SwFrameEventDescriptor::setMacroItem(const SvxMacroItem& rItem)
{
- rFrame.GetFrmFmt()->SetFmtAttr(rItem);
+ rFrame.GetFrameFormat()->SetFormatAttr(rItem);
}
const SvxMacroItem& SwFrameEventDescriptor::getMacroItem()
{
- return static_cast<const SvxMacroItem&>(rFrame.GetFrmFmt()->GetFmtAttr(RES_FRMMACRO));
+ return static_cast<const SvxMacroItem&>(rFrame.GetFrameFormat()->GetFormatAttr(RES_FRMMACRO));
}
sal_uInt16 SwFrameEventDescriptor::getMacroItemWhich() const
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 23760adf7b3a..c99b9e222e82 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -200,21 +200,21 @@ static sal_uInt16 lcl_ServiceIdToResId(sal_uInt16 nServiceId)
return pMap->nResId;
}
-static sal_uInt16 lcl_GetServiceForField( const SwField& rFld )
+static sal_uInt16 lcl_GetServiceForField( const SwField& rField )
{
- const sal_uInt16 nWhich = rFld.Which();
+ const sal_uInt16 nWhich = rField.Which();
sal_uInt16 nSrvId = USHRT_MAX;
//special handling for some fields
switch( nWhich )
{
case RES_INPUTFLD:
- if( INP_USR == (rFld.GetSubType() & 0x00ff) )
+ if( INP_USR == (rField.GetSubType() & 0x00ff) )
nSrvId = SW_SERVICE_FIELDTYPE_INPUT_USER;
break;
case RES_DOCINFOFLD:
{
- const sal_uInt16 nSubType = rFld.GetSubType();
+ const sal_uInt16 nSubType = rField.GetSubType();
switch( (nSubType & 0xff))
{
case DI_CHANGE:
@@ -244,14 +244,14 @@ static sal_uInt16 lcl_GetServiceForField( const SwField& rFld )
break;
case RES_HIDDENTXTFLD:
- nSrvId = TYP_CONDTXTFLD == rFld.GetSubType()
+ nSrvId = TYP_CONDTXTFLD == rField.GetSubType()
? SW_SERVICE_FIELDTYPE_CONDITIONED_TEXT
: SW_SERVICE_FIELDTYPE_HIDDEN_TEXT;
break;
case RES_DOCSTATFLD:
{
- switch( rFld.GetSubType() )
+ switch( rField.GetSubType() )
{
case DS_PAGE: nSrvId = SW_SERVICE_FIELDTYPE_PAGE_COUNT; break;
case DS_PARA: nSrvId = SW_SERVICE_FIELDTYPE_PARAGRAPH_COUNT; break;
@@ -583,7 +583,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFieldType* pType = GetFldType(true);
+ SwFieldType* pType = GetFieldType(true);
if(pType)
{
bool bSetValue = true;
@@ -623,7 +623,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
if ( pType->Which() == RES_USERFLD )
{
// trigger update of User field in order to get depending Input Fields updated.
- pType->UpdateFlds();
+ pType->UpdateFields();
}
}
else
@@ -638,7 +638,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
{
OUString sTypeName;
rValue >>= sTypeName;
- SwFieldType * pType2 = m_pImpl->m_pDoc->getIDocumentFieldsAccess().GetFldType(
+ SwFieldType * pType2 = m_pImpl->m_pDoc->getIDocumentFieldsAccess().GetFieldType(
m_pImpl->m_nResTypeId, sTypeName, false);
if(pType2 ||
@@ -656,7 +656,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
case RES_USERFLD :
{
SwUserFieldType aType(m_pImpl->m_pDoc, sTypeName);
- pType2 = m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFldType(aType);
+ pType2 = m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFieldType(aType);
static_cast<SwUserFieldType*>(pType2)->SetContent(m_pImpl->m_sParam1);
static_cast<SwUserFieldType*>(pType2)->SetValue(m_pImpl->m_fParam1);
static_cast<SwUserFieldType*>(pType2)->SetType(m_pImpl->m_bParam1
@@ -667,7 +667,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
{
SwDDEFieldType aType(sTypeName, m_pImpl->m_sParam1,
m_pImpl->m_bParam1 ? SfxLinkUpdateMode::ALWAYS : SfxLinkUpdateMode::ONCALL);
- pType2 = m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFldType(aType);
+ pType2 = m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFieldType(aType);
}
break;
case RES_SETEXPFLD :
@@ -677,13 +677,13 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
aType.SetDelimiter(OUString(m_pImpl->m_sParam1[0]));
if (m_pImpl->m_nParam1 > -1 && m_pImpl->m_nParam1 < MAXLEVEL)
aType.SetOutlineLvl(m_pImpl->m_nParam1);
- pType2 = m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFldType(aType);
+ pType2 = m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFieldType(aType);
}
break;
case RES_DBFLD :
{
rValue >>= m_pImpl->m_sParam3;
- pType2 = GetFldType();
+ pType2 = GetFieldType();
}
break;
}
@@ -732,7 +732,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
&& !m_pImpl->m_sParam2.isEmpty()
&& !m_pImpl->m_sParam3.isEmpty())
{
- GetFldType();
+ GetFieldType();
}
break;
case RES_SETEXPFLD:
@@ -782,7 +782,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
}
-SwFieldType* SwXFieldMaster::GetFldType(bool const bDontCreate) const
+SwFieldType* SwXFieldMaster::GetFieldType(bool const bDontCreate) const
{
#if !HAVE_FEATURE_DBCONNECTIVITY
(void) bDontCreate;
@@ -803,7 +803,7 @@ SwFieldType* SwXFieldMaster::GetFldType(bool const bDontCreate) const
aData.sCommand = m_pImpl->m_sParam2;
aData.nCommandType = m_pImpl->m_nParam2;
SwDBFieldType aType(m_pImpl->m_pDoc, m_pImpl->m_sParam3, aData);
- SwFieldType *const pType = m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFldType(aType);
+ SwFieldType *const pType = m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFieldType(aType);
pType->Add(m_pImpl.get());
const_cast<SwXFieldMaster*>(this)->m_pImpl->m_bIsDescriptor = false;
}
@@ -814,7 +814,7 @@ SwFieldType* SwXFieldMaster::GetFldType(bool const bDontCreate) const
return static_cast<SwFieldType*>(const_cast<SwModify*>(m_pImpl->GetRegisteredIn()));
}
-typedef std::vector<SwFmtFld*> SwDependentFields;
+typedef std::vector<SwFormatField*> SwDependentFields;
uno::Any SAL_CALL
SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
@@ -823,7 +823,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
SolarMutexGuard aGuard;
uno::Any aRet;
- SwFieldType* pType = GetFldType(true);
+ SwFieldType* pType = GetFieldType(true);
if( rPropertyName == UNO_NAME_INSTANCE_NAME )
{
OUString sName;
@@ -840,23 +840,23 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
else if(rPropertyName == UNO_NAME_DEPENDENT_TEXT_FIELDS)
{
//fill all text fields into a sequence
- SwDependentFields aFldArr;
- SwIterator<SwFmtFld,SwFieldType> aIter( *pType );
- SwFmtFld* pFld = aIter.First();
- while(pFld)
+ SwDependentFields aFieldArr;
+ SwIterator<SwFormatField,SwFieldType> aIter( *pType );
+ SwFormatField* pField = aIter.First();
+ while(pField)
{
- if(pFld->IsFldInDoc())
- aFldArr.push_back(pFld);
- pFld = aIter.Next();
+ if(pField->IsFieldInDoc())
+ aFieldArr.push_back(pField);
+ pField = aIter.Next();
}
- uno::Sequence<uno::Reference <text::XDependentTextField> > aRetSeq(aFldArr.size());
+ uno::Sequence<uno::Reference <text::XDependentTextField> > aRetSeq(aFieldArr.size());
uno::Reference<text::XDependentTextField>* pRetSeq = aRetSeq.getArray();
- for(size_t i = 0; i < aFldArr.size(); ++i)
+ for(size_t i = 0; i < aFieldArr.size(); ++i)
{
- pFld = aFldArr[i];
+ pField = aFieldArr[i];
uno::Reference<text::XTextField> const xField =
- SwXTextField::CreateXTextField(m_pImpl->m_pDoc, pFld);
+ SwXTextField::CreateXTextField(m_pImpl->m_pDoc, pField);
pRetSeq[i] = uno::Reference<text::XDependentTextField>(xField,
uno::UNO_QUERY);
@@ -983,31 +983,31 @@ void SAL_CALL SwXFieldMaster::dispose()
throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFieldType *const pFldType = GetFldType(true);
- if (!pFldType)
+ SwFieldType *const pFieldType = GetFieldType(true);
+ if (!pFieldType)
throw uno::RuntimeException();
sal_uInt16 nTypeIdx = USHRT_MAX;
- const SwFldTypes* pTypes = m_pImpl->m_pDoc->getIDocumentFieldsAccess().GetFldTypes();
+ const SwFieldTypes* pTypes = m_pImpl->m_pDoc->getIDocumentFieldsAccess().GetFieldTypes();
for( size_t i = 0; i < pTypes->size(); i++ )
{
- if((*pTypes)[i] == pFldType)
+ if((*pTypes)[i] == pFieldType)
nTypeIdx = i;
}
// first delete all fields
- SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
- SwFmtFld* pFld = aIter.First();
- while(pFld)
+ SwIterator<SwFormatField,SwFieldType> aIter( *pFieldType );
+ SwFormatField* pField = aIter.First();
+ while(pField)
{
- SwTxtFld *pTxtFld = pFld->GetTxtFld();
- if(pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
+ SwTextField *pTextField = pField->GetTextField();
+ if(pTextField && pTextField->GetTextNode().GetNodes().IsDocNodes() )
{
- SwTxtFld::DeleteTxtFld(*pTxtFld);
+ SwTextField::DeleteTextField(*pTextField);
}
- pFld = aIter.Next();
+ pField = aIter.Next();
}
// then delete FieldType
- m_pImpl->m_pDoc->getIDocumentFieldsAccess().RemoveFldType(nTypeIdx);
+ m_pImpl->m_pDoc->getIDocumentFieldsAccess().RemoveFieldType(nTypeIdx);
}
void SAL_CALL SwXFieldMaster::addEventListener(
@@ -1050,7 +1050,7 @@ OUString SwXFieldMaster::GetProgrammaticName(const SwFieldType& rType, SwDoc& rD
const OUString sName(rType.GetName());
if(RES_SETEXPFLD == rType.Which())
{
- const SwFldTypes* pTypes = rDoc.getIDocumentFieldsAccess().GetFldTypes();
+ const SwFieldTypes* pTypes = rDoc.getIDocumentFieldsAccess().GetFieldTypes();
for( size_t i = 0; i <= size_t(INIT_FLDTYPES); i++ )
{
if((*pTypes)[i] == &rType)
@@ -1063,11 +1063,11 @@ OUString SwXFieldMaster::GetProgrammaticName(const SwFieldType& rType, SwDoc& rD
}
OUString SwXFieldMaster::LocalizeFormula(
- const SwSetExpField& rFld,
+ const SwSetExpField& rField,
const OUString& rFormula,
bool bQuery)
{
- const OUString sTypeName(rFld.GetTyp()->GetName());
+ const OUString sTypeName(rField.GetTyp()->GetName());
const OUString sProgName(
SwStyleNameMapper::GetProgName(sTypeName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ));
if(sProgName != sTypeName)
@@ -1139,7 +1139,7 @@ public:
uno::WeakReference<uno::XInterface> m_wThis;
::cppu::OInterfaceContainerHelper m_EventListeners;
- SwFmtFld const* m_pFmtFld;
+ SwFormatField const* m_pFormatField;
SwDoc * m_pDoc;
SwTextAPIObject * m_pTextObject;
@@ -1151,19 +1151,19 @@ public:
OUString m_sTypeName;
boost::scoped_ptr<SwFieldProperties_Impl> m_pProps;
- Impl(SwDoc *const pDoc, SwFmtFld *const pFmt,
+ Impl(SwDoc *const pDoc, SwFormatField *const pFormat,
sal_uInt16 const nServiceId)
- : SwClient(pFmt)
+ : SwClient(pFormat)
, m_EventListeners(m_Mutex)
- , m_pFmtFld(pFmt)
+ , m_pFormatField(pFormat)
, m_pDoc(pDoc)
, m_pTextObject(0)
- , m_bIsDescriptor(pFmt == 0)
+ , m_bIsDescriptor(pFormat == 0)
, m_bCallUpdate(false)
- , m_nServiceId((pFmt)
- ? lcl_GetServiceForField(*pFmt->GetField())
+ , m_nServiceId((pFormat)
+ ? lcl_GetServiceForField(*pFormat->GetField())
: nServiceId)
- , m_pProps((pFmt) ? 0 : new SwFieldProperties_Impl)
+ , m_pProps((pFormat) ? 0 : new SwFieldProperties_Impl)
{ }
virtual ~Impl()
@@ -1224,8 +1224,8 @@ SwXTextField::SwXTextField(
}
}
-SwXTextField::SwXTextField(SwFmtFld& rFmt, SwDoc & rDoc)
- : m_pImpl(new Impl(&rDoc, &rFmt, USHRT_MAX))
+SwXTextField::SwXTextField(SwFormatField& rFormat, SwDoc & rDoc)
+ : m_pImpl(new Impl(&rDoc, &rFormat, USHRT_MAX))
{
}
@@ -1234,26 +1234,26 @@ SwXTextField::~SwXTextField()
}
uno::Reference<text::XTextField>
-SwXTextField::CreateXTextField(SwDoc *const pDoc, SwFmtFld const* pFmt,
+SwXTextField::CreateXTextField(SwDoc *const pDoc, SwFormatField const* pFormat,
sal_uInt16 const nServiceId)
{
- assert(!pFmt || pDoc);
- assert(pFmt || nServiceId != 0xFFFF);
+ assert(!pFormat || pDoc);
+ assert(pFormat || nServiceId != 0xFFFF);
// re-use existing SwXTextField
uno::Reference<text::XTextField> xField;
- if (pFmt)
+ if (pFormat)
{
- xField = pFmt->GetXTextField();
+ xField = pFormat->GetXTextField();
}
if (!xField.is())
{
- SwXTextField *const pField( (pFmt)
- ? new SwXTextField(const_cast<SwFmtFld&>(*pFmt), *pDoc)
+ SwXTextField *const pField( (pFormat)
+ ? new SwXTextField(const_cast<SwFormatField&>(*pFormat), *pDoc)
: new SwXTextField(nServiceId, pDoc));
xField.set(pField);
- if (pFmt)
+ if (pFormat)
{
- const_cast<SwFmtFld *>(pFmt)->SetXTextField(xField);
+ const_cast<SwFormatField *>(pFormat)->SetXTextField(xField);
}
// need a permanent Reference to initialize m_wThis
pField->m_pImpl->m_wThis = xField;
@@ -1280,7 +1280,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SwXFieldMaster* pMaster = reinterpret_cast< SwXFieldMaster * >(
sal::static_int_cast< sal_IntPtr >( xMasterTunnel->getSomething( SwXFieldMaster::getUnoTunnelId()) ));
- SwFieldType* pFieldType = pMaster ? pMaster->GetFldType() : 0;
+ SwFieldType* pFieldType = pMaster ? pMaster->GetFieldType() : 0;
if (!pFieldType ||
pFieldType->Which() != lcl_ServiceIdToResId(m_pImpl->m_nServiceId))
{
@@ -1304,7 +1304,7 @@ SwXTextField::getTextFieldMaster() throw (uno::RuntimeException, std::exception)
{
if (!m_pImpl->GetRegisteredIn())
throw uno::RuntimeException();
- pType = m_pImpl->m_pFmtFld->GetField()->GetTyp();
+ pType = m_pImpl->m_pFormatField->GetField()->GetTyp();
}
uno::Reference<beans::XPropertySet> const xRet(
@@ -1352,12 +1352,12 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SwUnoInternalPaM aPam(*pDoc);
// this now needs to return TRUE
::sw::XTextRangeToSwPaM(aPam, xTextRange);
- SwField* pFld = 0;
+ SwField* pField = 0;
switch (m_pImpl->m_nServiceId)
{
case SW_SERVICE_FIELDTYPE_ANNOTATION:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_POSTITFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_POSTITFLD);
DateTime aDateTime( DateTime::EMPTY );
if (m_pImpl->m_pProps->pDateTime)
@@ -1370,7 +1370,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
aDateTime.SetSec(m_pImpl->m_pProps->pDateTime->Seconds);
}
SwPostItField* pPostItField = new SwPostItField(
- static_cast<SwPostItFieldType*>(pFldType),
+ static_cast<SwPostItFieldType*>(pFieldType),
m_pImpl->m_pProps->sPar1, // author
m_pImpl->m_pProps->sPar2, // content
m_pImpl->m_pProps->sPar3, // author's initials
@@ -1381,13 +1381,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
pPostItField->SetTextObject( m_pImpl->m_pTextObject->CreateText() );
pPostItField->SetPar2(m_pImpl->m_pTextObject->GetText());
}
- pFld = pPostItField;
+ pField = pPostItField;
}
break;
case SW_SERVICE_FIELDTYPE_SCRIPT:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_SCRIPTFLD);
- pFld = new SwScriptField(static_cast<SwScriptFieldType*>(pFldType),
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_SCRIPTFLD);
+ pField = new SwScriptField(static_cast<SwScriptFieldType*>(pFieldType),
m_pImpl->m_pProps->sPar1, m_pImpl->m_pProps->sPar2,
m_pImpl->m_pProps->bBool1);
}
@@ -1401,11 +1401,11 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
nSub |= DATEFLD;
else
nSub |= TIMEFLD;
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_DATETIMEFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_DATETIMEFLD);
SwDateTimeField *const pDTField = new SwDateTimeField(
- static_cast<SwDateTimeFieldType*>(pFldType),
+ static_cast<SwDateTimeFieldType*>(pFieldType),
nSub, m_pImpl->m_pProps->nFormat);
- pFld = pDTField;
+ pField = pDTField;
if (m_pImpl->m_pProps->fDouble > 0.)
{
pDTField->SetValue(m_pImpl->m_pProps->fDouble);
@@ -1413,48 +1413,48 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
if (m_pImpl->m_pProps->pDateTime)
{
uno::Any aVal; aVal <<= *m_pImpl->m_pProps->pDateTime;
- pFld->PutValue( aVal, FIELD_PROP_DATE_TIME );
+ pField->PutValue( aVal, FIELD_PROP_DATE_TIME );
}
pDTField->SetOffset(m_pImpl->m_pProps->nSubType);
}
break;
case SW_SERVICE_FIELDTYPE_FILE_NAME:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_FILENAMEFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_FILENAMEFLD);
sal_Int32 nFormat = m_pImpl->m_pProps->nFormat;
if (m_pImpl->m_pProps->bBool2)
nFormat |= FF_FIXED;
SwFileNameField *const pFNField = new SwFileNameField(
- static_cast<SwFileNameFieldType*>(pFldType), nFormat);
- pFld = pFNField;
+ static_cast<SwFileNameFieldType*>(pFieldType), nFormat);
+ pField = pFNField;
if (!m_pImpl->m_pProps->sPar3.isEmpty())
pFNField->SetExpansion(m_pImpl->m_pProps->sPar3);
uno::Any aFormat;
aFormat <<= m_pImpl->m_pProps->nFormat;
- pFld->PutValue( aFormat, FIELD_PROP_FORMAT );
+ pField->PutValue( aFormat, FIELD_PROP_FORMAT );
}
break;
case SW_SERVICE_FIELDTYPE_TEMPLATE_NAME:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_TEMPLNAMEFLD);
- pFld = new SwTemplNameField(static_cast<SwTemplNameFieldType*>(pFldType),
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_TEMPLNAMEFLD);
+ pField = new SwTemplNameField(static_cast<SwTemplNameFieldType*>(pFieldType),
m_pImpl->m_pProps->nFormat);
uno::Any aFormat;
aFormat <<= m_pImpl->m_pProps->nFormat;
- pFld->PutValue(aFormat, FIELD_PROP_FORMAT);
+ pField->PutValue(aFormat, FIELD_PROP_FORMAT);
}
break;
case SW_SERVICE_FIELDTYPE_CHAPTER:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_CHAPTERFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_CHAPTERFLD);
SwChapterField *const pChapterField = new SwChapterField(
- static_cast<SwChapterFieldType*>(pFldType),
+ static_cast<SwChapterFieldType*>(pFieldType),
m_pImpl->m_pProps->nUSHORT1);
- pFld = pChapterField;
+ pField = pChapterField;
pChapterField->SetLevel(m_pImpl->m_pProps->nByte1);
uno::Any aVal;
aVal <<= static_cast<sal_Int16>(m_pImpl->m_pProps->nUSHORT1);
- pFld->PutValue(aVal, FIELD_PROP_USHORT1 );
+ pField->PutValue(aVal, FIELD_PROP_USHORT1 );
}
break;
case SW_SERVICE_FIELDTYPE_AUTHOR:
@@ -1463,63 +1463,63 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
if (m_pImpl->m_pProps->bBool2)
nFormat |= AF_FIXED;
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_AUTHORFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_AUTHORFLD);
SwAuthorField *const pAuthorField = new SwAuthorField(
- static_cast<SwAuthorFieldType*>(pFldType), nFormat);
- pFld = pAuthorField;
+ static_cast<SwAuthorFieldType*>(pFieldType), nFormat);
+ pField = pAuthorField;
pAuthorField->SetExpansion(m_pImpl->m_pProps->sPar1);
}
break;
case SW_SERVICE_FIELDTYPE_CONDITIONED_TEXT:
case SW_SERVICE_FIELDTYPE_HIDDEN_TEXT:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_HIDDENTXTFLD);
- SwHiddenTxtField *const pHTField = new SwHiddenTxtField(
- static_cast<SwHiddenTxtFieldType*>(pFldType),
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_HIDDENTXTFLD);
+ SwHiddenTextField *const pHTField = new SwHiddenTextField(
+ static_cast<SwHiddenTextFieldType*>(pFieldType),
m_pImpl->m_pProps->sPar1,
m_pImpl->m_pProps->sPar2, m_pImpl->m_pProps->sPar3,
static_cast<sal_uInt16>(SW_SERVICE_FIELDTYPE_HIDDEN_TEXT == m_pImpl->m_nServiceId ?
TYP_HIDDENTXTFLD : TYP_CONDTXTFLD));
- pFld = pHTField;
+ pField = pHTField;
pHTField->SetValue(m_pImpl->m_pProps->bBool1);
uno::Any aVal;
aVal <<= m_pImpl->m_pProps->sPar4;
- pFld->PutValue(aVal, FIELD_PROP_PAR4 );
+ pField->PutValue(aVal, FIELD_PROP_PAR4 );
}
break;
case SW_SERVICE_FIELDTYPE_HIDDEN_PARA:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_HIDDENPARAFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_HIDDENPARAFLD);
SwHiddenParaField *const pHPField = new SwHiddenParaField(
- static_cast<SwHiddenParaFieldType*>(pFldType),
+ static_cast<SwHiddenParaFieldType*>(pFieldType),
m_pImpl->m_pProps->sPar1);
- pFld = pHPField;
+ pField = pHPField;
pHPField->SetHidden(m_pImpl->m_pProps->bBool1);
}
break;
case SW_SERVICE_FIELDTYPE_GET_REFERENCE:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_GETREFFLD);
- pFld = new SwGetRefField(static_cast<SwGetRefFieldType*>(pFldType),
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_GETREFFLD);
+ pField = new SwGetRefField(static_cast<SwGetRefFieldType*>(pFieldType),
m_pImpl->m_pProps->sPar1,
0,
0,
0);
if (!m_pImpl->m_pProps->sPar3.isEmpty())
- static_cast<SwGetRefField*>(pFld)->SetExpand(m_pImpl->m_pProps->sPar3);
+ static_cast<SwGetRefField*>(pField)->SetExpand(m_pImpl->m_pProps->sPar3);
uno::Any aVal;
aVal <<= static_cast<sal_Int16>(m_pImpl->m_pProps->nUSHORT1);
- pFld->PutValue(aVal, FIELD_PROP_USHORT1 );
+ pField->PutValue(aVal, FIELD_PROP_USHORT1 );
aVal <<= static_cast<sal_Int16>(m_pImpl->m_pProps->nUSHORT2);
- pFld->PutValue(aVal, FIELD_PROP_USHORT2 );
+ pField->PutValue(aVal, FIELD_PROP_USHORT2 );
aVal <<= m_pImpl->m_pProps->nSHORT1;
- pFld->PutValue(aVal, FIELD_PROP_SHORT1 );
+ pField->PutValue(aVal, FIELD_PROP_SHORT1 );
}
break;
case SW_SERVICE_FIELDTYPE_JUMP_EDIT:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_JUMPEDITFLD);
- pFld = new SwJumpEditField(static_cast<SwJumpEditFieldType*>(pFldType),
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_JUMPEDITFLD);
+ pField = new SwJumpEditField(static_cast<SwJumpEditFieldType*>(pFieldType),
m_pImpl->m_pProps->nUSHORT1, m_pImpl->m_pProps->sPar2,
m_pImpl->m_pProps->sPar1);
}
@@ -1539,7 +1539,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
case SW_SERVICE_FIELDTYPE_DOCINFO_REVISION :
case SW_SERVICE_FIELDTYPE_DOC_INFO:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_DOCINFOFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_DOCINFOFLD);
sal_uInt16 nSubType = aDocInfoSubTypeFromService[
m_pImpl->m_nServiceId - SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_AUTHOR];
if (SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_DATE_TIME == m_pImpl->m_nServiceId ||
@@ -1560,11 +1560,11 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
if (m_pImpl->m_pProps->bBool1)
nSubType |= DI_SUB_FIXED;
- pFld = new SwDocInfoField(
- static_cast<SwDocInfoFieldType*>(pFldType), nSubType,
+ pField = new SwDocInfoField(
+ static_cast<SwDocInfoFieldType*>(pFieldType), nSubType,
m_pImpl->m_pProps->sPar4, m_pImpl->m_pProps->nFormat);
if (!m_pImpl->m_pProps->sPar3.isEmpty())
- static_cast<SwDocInfoField*>(pFld)->SetExpansion(m_pImpl->m_pProps->sPar3);
+ static_cast<SwDocInfoField*>(pField)->SetExpansion(m_pImpl->m_pProps->sPar3);
}
break;
case SW_SERVICE_FIELDTYPE_USER_EXT:
@@ -1573,90 +1573,90 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
if (m_pImpl->m_pProps->bBool1)
nFormat = AF_FIXED;
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_EXTUSERFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_EXTUSERFLD);
SwExtUserField *const pEUField = new SwExtUserField(
- static_cast<SwExtUserFieldType*>(pFldType),
+ static_cast<SwExtUserFieldType*>(pFieldType),
m_pImpl->m_pProps->nUSHORT1, nFormat);
- pFld = pEUField;
+ pField = pEUField;
pEUField->SetExpansion(m_pImpl->m_pProps->sPar1);
}
break;
case SW_SERVICE_FIELDTYPE_USER:
{
- SwFieldType* pFldType =
- pDoc->getIDocumentFieldsAccess().GetFldType(RES_USERFLD, m_pImpl->m_sTypeName, true);
- if (!pFldType)
+ SwFieldType* pFieldType =
+ pDoc->getIDocumentFieldsAccess().GetFieldType(RES_USERFLD, m_pImpl->m_sTypeName, true);
+ if (!pFieldType)
throw uno::RuntimeException();
sal_uInt16 nUserSubType = (m_pImpl->m_pProps->bBool1)
? nsSwExtendedSubType::SUB_INVISIBLE : 0;
if (m_pImpl->m_pProps->bBool2)
nUserSubType |= nsSwExtendedSubType::SUB_CMD;
if (m_pImpl->m_pProps->bFormatIsDefault &&
- nsSwGetSetExpType::GSE_STRING == static_cast<SwUserFieldType*>(pFldType)->GetType())
+ nsSwGetSetExpType::GSE_STRING == static_cast<SwUserFieldType*>(pFieldType)->GetType())
{
m_pImpl->m_pProps->nFormat = -1;
}
- pFld = new SwUserField(static_cast<SwUserFieldType*>(pFldType),
+ pField = new SwUserField(static_cast<SwUserFieldType*>(pFieldType),
nUserSubType,
m_pImpl->m_pProps->nFormat);
}
break;
case SW_SERVICE_FIELDTYPE_REF_PAGE_SET:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_REFPAGESETFLD);
- pFld = new SwRefPageSetField( static_cast<SwRefPageSetFieldType*>(pFldType),
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_REFPAGESETFLD);
+ pField = new SwRefPageSetField( static_cast<SwRefPageSetFieldType*>(pFieldType),
m_pImpl->m_pProps->nUSHORT1,
m_pImpl->m_pProps->bBool1 );
}
break;
case SW_SERVICE_FIELDTYPE_REF_PAGE_GET:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_REFPAGEGETFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_REFPAGEGETFLD);
SwRefPageGetField *const pRGField = new SwRefPageGetField(
- static_cast<SwRefPageGetFieldType*>(pFldType),
+ static_cast<SwRefPageGetFieldType*>(pFieldType),
m_pImpl->m_pProps->nUSHORT1 );
- pFld = pRGField;
+ pField = pRGField;
pRGField->SetText(m_pImpl->m_pProps->sPar1);
}
break;
case SW_SERVICE_FIELDTYPE_PAGE_NUM:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_PAGENUMBERFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_PAGENUMBERFLD);
SwPageNumberField *const pPNField = new SwPageNumberField(
- static_cast<SwPageNumberFieldType*>(pFldType), PG_RANDOM,
+ static_cast<SwPageNumberFieldType*>(pFieldType), PG_RANDOM,
m_pImpl->m_pProps->nFormat,
m_pImpl->m_pProps->nUSHORT1);
- pFld = pPNField;
+ pField = pPNField;
pPNField->SetUserString(m_pImpl->m_pProps->sPar1);
uno::Any aVal;
aVal <<= m_pImpl->m_pProps->nSubType;
- pFld->PutValue( aVal, FIELD_PROP_SUBTYPE );
+ pField->PutValue( aVal, FIELD_PROP_SUBTYPE );
}
break;
case SW_SERVICE_FIELDTYPE_DDE:
{
- SwFieldType* pFldType =
- pDoc->getIDocumentFieldsAccess().GetFldType(RES_DDEFLD, m_pImpl->m_sTypeName, true);
- if (!pFldType)
+ SwFieldType* pFieldType =
+ pDoc->getIDocumentFieldsAccess().GetFieldType(RES_DDEFLD, m_pImpl->m_sTypeName, true);
+ if (!pFieldType)
throw uno::RuntimeException();
- pFld = new SwDDEField( static_cast<SwDDEFieldType*>(pFldType) );
+ pField = new SwDDEField( static_cast<SwDDEFieldType*>(pFieldType) );
}
break;
case SW_SERVICE_FIELDTYPE_DATABASE_NAME:
#if HAVE_FEATURE_DBCONNECTIVITY
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_DBNAMEFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_DBNAMEFLD);
SwDBData aData;
aData.sDataSource = m_pImpl->m_pProps->sPar1;
aData.sCommand = m_pImpl->m_pProps->sPar2;
aData.nCommandType = m_pImpl->m_pProps->nSHORT1;
- pFld = new SwDBNameField(static_cast<SwDBNameFieldType*>(pFldType), aData);
- sal_uInt16 nSubType = pFld->GetSubType();
+ pField = new SwDBNameField(static_cast<SwDBNameFieldType*>(pFieldType), aData);
+ sal_uInt16 nSubType = pField->GetSubType();
if (m_pImpl->m_pProps->bBool2)
nSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
nSubType |= nsSwExtendedSubType::SUB_INVISIBLE;
- pFld->SetSubType(nSubType);
+ pField->SetSubType(nSubType);
}
#endif
break;
@@ -1667,8 +1667,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
aData.sDataSource = m_pImpl->m_pProps->sPar1;
aData.sCommand = m_pImpl->m_pProps->sPar2;
aData.nCommandType = m_pImpl->m_pProps->nSHORT1;
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_DBNEXTSETFLD);
- pFld = new SwDBNextSetField(static_cast<SwDBNextSetFieldType*>(pFldType),
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_DBNEXTSETFLD);
+ pField = new SwDBNextSetField(static_cast<SwDBNextSetFieldType*>(pFieldType),
m_pImpl->m_pProps->sPar3, OUString(), aData);
}
#endif
@@ -1680,8 +1680,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
aData.sDataSource = m_pImpl->m_pProps->sPar1;
aData.sCommand = m_pImpl->m_pProps->sPar2;
aData.nCommandType = m_pImpl->m_pProps->nSHORT1;
- pFld = new SwDBNumSetField( static_cast<SwDBNumSetFieldType*>(
- pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_DBNUMSETFLD)),
+ pField = new SwDBNumSetField( static_cast<SwDBNumSetFieldType*>(
+ pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_DBNUMSETFLD)),
m_pImpl->m_pProps->sPar3,
OUString::number(m_pImpl->m_pProps->nFormat),
aData );
@@ -1697,58 +1697,58 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
aData.nCommandType = m_pImpl->m_pProps->nSHORT1;
SwDBSetNumberField *const pDBSNField =
new SwDBSetNumberField(static_cast<SwDBSetNumberFieldType*>(
- pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_DBSETNUMBERFLD)), aData,
+ pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_DBSETNUMBERFLD)), aData,
m_pImpl->m_pProps->nUSHORT1);
- pFld = pDBSNField;
+ pField = pDBSNField;
pDBSNField->SetSetNumber(m_pImpl->m_pProps->nFormat);
- sal_uInt16 nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pField->GetSubType();
if (m_pImpl->m_pProps->bBool2)
nSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
nSubType |= nsSwExtendedSubType::SUB_INVISIBLE;
- pFld->SetSubType(nSubType);
+ pField->SetSubType(nSubType);
}
#endif
break;
case SW_SERVICE_FIELDTYPE_DATABASE:
#if HAVE_FEATURE_DBCONNECTIVITY
{
- SwFieldType* pFldType =
- pDoc->getIDocumentFieldsAccess().GetFldType(RES_DBFLD, m_pImpl->m_sTypeName, false);
- if (!pFldType)
+ SwFieldType* pFieldType =
+ pDoc->getIDocumentFieldsAccess().GetFieldType(RES_DBFLD, m_pImpl->m_sTypeName, false);
+ if (!pFieldType)
throw uno::RuntimeException();
- pFld = new SwDBField(static_cast<SwDBFieldType*>(pFldType),
+ pField = new SwDBField(static_cast<SwDBFieldType*>(pFieldType),
m_pImpl->m_pProps->nFormat);
- static_cast<SwDBField*>(pFld)->InitContent(m_pImpl->m_pProps->sPar1);
- sal_uInt16 nSubType = pFld->GetSubType();
+ static_cast<SwDBField*>(pField)->InitContent(m_pImpl->m_pProps->sPar1);
+ sal_uInt16 nSubType = pField->GetSubType();
if (m_pImpl->m_pProps->bBool2)
nSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
nSubType |= nsSwExtendedSubType::SUB_INVISIBLE;
- pFld->SetSubType(nSubType);
+ pField->SetSubType(nSubType);
}
#endif
break;
case SW_SERVICE_FIELDTYPE_SET_EXP:
{
- SwFieldType* pFldType =
- pDoc->getIDocumentFieldsAccess().GetFldType(RES_SETEXPFLD, m_pImpl->m_sTypeName, true);
- if (!pFldType)
+ SwFieldType* pFieldType =
+ pDoc->getIDocumentFieldsAccess().GetFieldType(RES_SETEXPFLD, m_pImpl->m_sTypeName, true);
+ if (!pFieldType)
throw uno::RuntimeException();
// detect the field type's sub type and set an appropriate number format
if (m_pImpl->m_pProps->bFormatIsDefault &&
- nsSwGetSetExpType::GSE_STRING == static_cast<SwSetExpFieldType*>(pFldType)->GetType())
+ nsSwGetSetExpType::GSE_STRING == static_cast<SwSetExpFieldType*>(pFieldType)->GetType())
{
m_pImpl->m_pProps->nFormat = -1;
}
SwSetExpField *const pSEField = new SwSetExpField(
- static_cast<SwSetExpFieldType*>(pFldType),
+ static_cast<SwSetExpFieldType*>(pFieldType),
m_pImpl->m_pProps->sPar2,
m_pImpl->m_pProps->nUSHORT2 != USHRT_MAX ? //#i79471# the field can have a number format or a number_ing_ format
m_pImpl->m_pProps->nUSHORT2 : m_pImpl->m_pProps->nFormat);
- pFld = pSEField;
+ pField = pSEField;
- sal_uInt16 nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pField->GetSubType();
if (m_pImpl->m_pProps->bBool2)
nSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
@@ -1757,7 +1757,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
nSubType |= nsSwExtendedSubType::SUB_CMD;
else
nSubType &= ~nsSwExtendedSubType::SUB_CMD;
- pFld->SetSubType(nSubType);
+ pField->SetSubType(nSubType);
pSEField->SetSeqNumber(m_pImpl->m_pProps->nUSHORT1);
pSEField->SetInputFlag(m_pImpl->m_pProps->bBool1);
pSEField->SetPromptText(m_pImpl->m_pProps->sPar3);
@@ -1780,13 +1780,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
nSubType = nsSwGetSetExpType::GSE_EXPR;
}
//make sure the SubType matches the field type
- SwFieldType* pSetExpFld = pDoc->getIDocumentFieldsAccess().GetFldType(
+ SwFieldType* pSetExpField = pDoc->getIDocumentFieldsAccess().GetFieldType(
RES_SETEXPFLD, m_pImpl->m_pProps->sPar1, false);
bool bSetGetExpFieldUninitialized = false;
- if (pSetExpFld)
+ if (pSetExpField)
{
if (nSubType != nsSwGetSetExpType::GSE_STRING &&
- static_cast< SwSetExpFieldType* >(pSetExpFld)->GetType() == nsSwGetSetExpType::GSE_STRING)
+ static_cast< SwSetExpFieldType* >(pSetExpField)->GetType() == nsSwGetSetExpType::GSE_STRING)
nSubType = nsSwGetSetExpType::GSE_STRING;
}
else
@@ -1798,10 +1798,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
nSubType &= ~nsSwExtendedSubType::SUB_CMD;
SwGetExpField *const pGEField = new SwGetExpField(
static_cast<SwGetExpFieldType*>(
- pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_GETEXPFLD)),
+ pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_GETEXPFLD)),
m_pImpl->m_pProps->sPar1, nSubType,
m_pImpl->m_pProps->nFormat);
- pFld = pGEField;
+ pField = pGEField;
//TODO: evaluate SubType!
if (!m_pImpl->m_pProps->sPar4.isEmpty())
pGEField->ChgExpStr(m_pImpl->m_pProps->sPar4);
@@ -1813,28 +1813,28 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
case SW_SERVICE_FIELDTYPE_INPUT_USER:
case SW_SERVICE_FIELDTYPE_INPUT:
{
- SwFieldType* pFldType =
- pDoc->getIDocumentFieldsAccess().GetFldType(RES_INPUTFLD, m_pImpl->m_sTypeName, true);
- if (!pFldType)
+ SwFieldType* pFieldType =
+ pDoc->getIDocumentFieldsAccess().GetFieldType(RES_INPUTFLD, m_pImpl->m_sTypeName, true);
+ if (!pFieldType)
throw uno::RuntimeException();
sal_uInt16 nInpSubType =
sal::static_int_cast<sal_uInt16>(
SW_SERVICE_FIELDTYPE_INPUT_USER == m_pImpl->m_nServiceId
? INP_USR : INP_TXT);
- SwInputField * pTxtField =
- new SwInputField(static_cast<SwInputFieldType*>(pFldType),
+ SwInputField * pTextField =
+ new SwInputField(static_cast<SwInputFieldType*>(pFieldType),
m_pImpl->m_pProps->sPar1,
m_pImpl->m_pProps->sPar2,
nInpSubType);
- pTxtField->SetHelp(m_pImpl->m_pProps->sPar3);
- pTxtField->SetToolTip(m_pImpl->m_pProps->sPar4);
+ pTextField->SetHelp(m_pImpl->m_pProps->sPar3);
+ pTextField->SetToolTip(m_pImpl->m_pProps->sPar4);
- pFld = pTxtField;
+ pField = pTextField;
}
break;
case SW_SERVICE_FIELDTYPE_MACRO:
{
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_MACROFLD);
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_MACROFLD);
OUString aName;
// support for Scripting Framework macros
@@ -1847,7 +1847,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SwMacroField::CreateMacroString(aName,
m_pImpl->m_pProps->sPar1, m_pImpl->m_pProps->sPar3);
}
- pFld = new SwMacroField(static_cast<SwMacroFieldType*>(pFldType), aName,
+ pField = new SwMacroField(static_cast<SwMacroFieldType*>(pFieldType), aName,
m_pImpl->m_pProps->sPar2);
}
break;
@@ -1869,38 +1869,38 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
case SW_SERVICE_FIELDTYPE_GRAPHIC_OBJECT_COUNT : nSubType = DS_GRF; break;
case SW_SERVICE_FIELDTYPE_EMBEDDED_OBJECT_COUNT : nSubType = DS_OLE; break;
}
- SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_DOCSTATFLD);
- pFld = new SwDocStatField(
- static_cast<SwDocStatFieldType*>(pFldType),
+ SwFieldType* pFieldType = pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_DOCSTATFLD);
+ pField = new SwDocStatField(
+ static_cast<SwDocStatFieldType*>(pFieldType),
nSubType, m_pImpl->m_pProps->nUSHORT2);
}
break;
case SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY:
{
SwAuthorityFieldType const type(pDoc);
- pFld = new SwAuthorityField(static_cast<SwAuthorityFieldType*>(
- pDoc->getIDocumentFieldsAccess().InsertFldType(type)),
+ pField = new SwAuthorityField(static_cast<SwAuthorityFieldType*>(
+ pDoc->getIDocumentFieldsAccess().InsertFieldType(type)),
OUString());
if (m_pImpl->m_pProps->aPropSeq.getLength())
{
uno::Any aVal;
aVal <<= m_pImpl->m_pProps->aPropSeq;
- pFld->PutValue( aVal, FIELD_PROP_PROP_SEQ );
+ pField->PutValue( aVal, FIELD_PROP_PROP_SEQ );
}
}
break;
case SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS:
// create field
- pFld = new SwCombinedCharField( static_cast<SwCombinedCharFieldType*>(
- pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_COMBINED_CHARS)),
+ pField = new SwCombinedCharField( static_cast<SwCombinedCharFieldType*>(
+ pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_COMBINED_CHARS)),
m_pImpl->m_pProps->sPar1);
break;
case SW_SERVICE_FIELDTYPE_DROPDOWN:
{
SwDropDownField *const pDDField = new SwDropDownField(
static_cast<SwDropDownFieldType *>(
- pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_DROPDOWN)));
- pFld = pDDField;
+ pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_DROPDOWN)));
+ pField = pDDField;
pDDField->SetItems(m_pImpl->m_pProps->aStrings);
pDDField->SetSelectedItem(m_pImpl->m_pProps->sPar1);
@@ -1920,22 +1920,22 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
if (m_pImpl->m_pProps->bFormatIsDefault)
m_pImpl->m_pProps->nFormat = -1;
}
- pFld = new SwTblField( static_cast<SwTblFieldType*>(
- pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_TABLEFLD)),
+ pField = new SwTableField( static_cast<SwTableFieldType*>(
+ pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_TABLEFLD)),
m_pImpl->m_pProps->sPar2,
nType,
m_pImpl->m_pProps->nFormat);
- static_cast<SwTblField*>(pFld)->ChgExpStr(m_pImpl->m_pProps->sPar1);
+ static_cast<SwTableField*>(pField)->ChgExpStr(m_pImpl->m_pProps->sPar1);
}
break;
default: OSL_FAIL("was ist das fuer ein Typ?");
}
- if (!pFld)
+ if (!pField)
throw uno::RuntimeException("no SwField created?");
- if (pFld)
+ if (pField)
{
- pFld->SetAutomaticLanguage(!m_pImpl->m_pProps->bBool4);
- SwFmtFld aFmt( *pFld );
+ pField->SetAutomaticLanguage(!m_pImpl->m_pProps->bBool4);
+ SwFormatField aFormat( *pField );
UnoActionContext aCont(pDoc);
if (aPam.HasMark() &&
@@ -1958,24 +1958,24 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
// Make sure we always insert the field at the end
SwPaM aEnd(*aPam.End(), *aPam.End());
- pDoc->getIDocumentContentOperations().InsertPoolItem(aEnd, aFmt, nInsertFlags);
+ pDoc->getIDocumentContentOperations().InsertPoolItem(aEnd, aFormat, nInsertFlags);
}
else
- pDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFmt, nInsertFlags);
+ pDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFormat, nInsertFlags);
- SwTxtAttr* pTxtAttr = aPam.GetNode().GetTxtNode()->GetFldTxtAttrAt( aPam.GetPoint()->nContent.GetIndex()-1, true );
+ SwTextAttr* pTextAttr = aPam.GetNode().GetTextNode()->GetFieldTextAttrAt( aPam.GetPoint()->nContent.GetIndex()-1, true );
// What about updating the fields? (see fldmgr.cxx)
- if (pTxtAttr)
+ if (pTextAttr)
{
- const SwFmtFld& rFld = pTxtAttr->GetFmtFld();
- m_pImpl->m_pFmtFld = &rFld;
+ const SwFormatField& rField = pTextAttr->GetFormatField();
+ m_pImpl->m_pFormatField = &rField;
- if ( pTxtAttr->Which() == RES_TXTATR_ANNOTATION
+ if ( pTextAttr->Which() == RES_TXTATR_ANNOTATION
&& *aPam.GetPoint() != *aPam.GetMark() )
{
// create annotation mark
- const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pTxtAttr->GetFmtFld().GetField());
+ const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pTextAttr->GetFormatField().GetField());
OSL_ENSURE( pPostItField != NULL, "<SwXTextField::attachToRange(..)> - annotation field missing!" );
if ( pPostItField != NULL )
{
@@ -1985,13 +1985,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
}
else // could theoretically happen, if paragraph is full
- throw uno::RuntimeException("no SwTxtAttr inserted?");
+ throw uno::RuntimeException("no SwTextAttr inserted?");
}
- delete pFld;
+ delete pField;
- assert(m_pImpl->m_pFmtFld);
+ assert(m_pImpl->m_pFormatField);
m_pImpl->m_pDoc = pDoc;
- const_cast<SwFmtFld *>(m_pImpl->m_pFmtFld)->Add(m_pImpl.get());
+ const_cast<SwFormatField *>(m_pImpl->m_pFormatField)->Add(m_pImpl.get());
m_pImpl->m_bIsDescriptor = false;
if (m_pImpl->m_FieldTypeClient.GetRegisteredIn())
{
@@ -2002,7 +2002,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
if (m_pImpl->m_bCallUpdate)
update();
}
- else if ( m_pImpl->m_pFmtFld != NULL
+ else if ( m_pImpl->m_pFormatField != NULL
&& m_pImpl->m_pDoc != NULL
&& m_pImpl->m_nServiceId == SW_SERVICE_FIELDTYPE_ANNOTATION )
{
@@ -2015,31 +2015,31 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
UnoActionContext aCont( m_pImpl->m_pDoc );
// insert copy of annotation at new text range
- SwPostItField* pPostItField = static_cast< SwPostItField* >(m_pImpl->m_pFmtFld->GetField()->CopyField());
- SwFmtFld aFmtFld( *pPostItField );
+ SwPostItField* pPostItField = static_cast< SwPostItField* >(m_pImpl->m_pFormatField->GetField()->CopyField());
+ SwFormatField aFormatField( *pPostItField );
delete pPostItField;
SwPaM aEnd( *aIntPam.End(), *aIntPam.End() );
- m_pImpl->m_pDoc->getIDocumentContentOperations().InsertPoolItem( aEnd, aFmtFld, SetAttrMode::DEFAULT );
+ m_pImpl->m_pDoc->getIDocumentContentOperations().InsertPoolItem( aEnd, aFormatField, SetAttrMode::DEFAULT );
// delete former annotation
{
- const SwTxtFld* pTxtFld = m_pImpl->m_pFmtFld->GetTxtFld();
- SwTxtNode& rTxtNode = (SwTxtNode&)*pTxtFld->GetpTxtNode();
- SwPaM aPam( rTxtNode, pTxtFld->GetStart() );
+ const SwTextField* pTextField = m_pImpl->m_pFormatField->GetTextField();
+ SwTextNode& rTextNode = (SwTextNode&)*pTextField->GetpTextNode();
+ SwPaM aPam( rTextNode, pTextField->GetStart() );
aPam.SetMark();
aPam.Move();
m_pImpl->m_pDoc->getIDocumentContentOperations().DeleteAndJoin(aPam);
}
// keep inserted annotation
{
- SwTxtFld* pTxtAttr = aEnd.GetNode().GetTxtNode()->GetFldTxtAttrAt( aEnd.End()->nContent.GetIndex()-1, true );
- if ( pTxtAttr != NULL )
+ SwTextField* pTextAttr = aEnd.GetNode().GetTextNode()->GetFieldTextAttrAt( aEnd.End()->nContent.GetIndex()-1, true );
+ if ( pTextAttr != NULL )
{
- m_pImpl->m_pFmtFld = &pTxtAttr->GetFmtFld();
+ m_pImpl->m_pFormatField = &pTextAttr->GetFormatField();
if ( *aIntPam.GetPoint() != *aIntPam.GetMark() )
{
// create annotation mark
- const SwPostItField* pField = dynamic_cast< const SwPostItField* >(pTxtAttr->GetFmtFld().GetField());
+ const SwPostItField* pField = dynamic_cast< const SwPostItField* >(pTextAttr->GetFormatField().GetField());
OSL_ENSURE( pField != NULL, "<SwXTextField::attach(..)> - annotation field missing!" );
if ( pField != NULL )
{
@@ -2067,13 +2067,13 @@ SwXTextField::getAnchor() throw (uno::RuntimeException, std::exception)
if (!pField)
return 0;
- const SwTxtFld* pTxtFld = m_pImpl->m_pFmtFld->GetTxtFld();
- if (!pTxtFld)
+ const SwTextField* pTextField = m_pImpl->m_pFormatField->GetTextField();
+ if (!pTextField)
throw uno::RuntimeException();
- boost::shared_ptr< SwPaM > pPamForTxtFld;
- SwTxtFld::GetPamForTxtFld(*pTxtFld, pPamForTxtFld);
- if (pPamForTxtFld.get() == NULL)
+ boost::shared_ptr< SwPaM > pPamForTextField;
+ SwTextField::GetPamForTextField(*pTextField, pPamForTextField);
+ if (pPamForTextField.get() == NULL)
return 0;
// If this is a postit field, then return the range of its annotation mark if it has one.
@@ -2085,14 +2085,14 @@ SwXTextField::getAnchor() throw (uno::RuntimeException, std::exception)
{
if (ppMark->get()->GetName() == pPostItField->GetName())
{
- pPamForTxtFld.reset(new SwPaM(ppMark->get()->GetMarkStart(), ppMark->get()->GetMarkEnd()));
+ pPamForTextField.reset(new SwPaM(ppMark->get()->GetMarkStart(), ppMark->get()->GetMarkEnd()));
break;
}
}
}
uno::Reference<text::XTextRange> xRange = SwXTextRange::CreateXTextRange(
- *m_pImpl->m_pDoc, *(pPamForTxtFld->GetPoint()), pPamForTxtFld->GetMark());
+ *m_pImpl->m_pDoc, *(pPamForTextField->GetPoint()), pPamForTextField->GetMark());
return xRange;
}
@@ -2104,8 +2104,8 @@ void SAL_CALL SwXTextField::dispose() throw (uno::RuntimeException, std::excepti
{
UnoActionContext aContext(m_pImpl->m_pDoc);
- assert(m_pImpl->m_pFmtFld->GetTxtFld() && "<SwXTextField::dispose()> - missing <SwTxtFld> --> crash");
- SwTxtFld::DeleteTxtFld(*(m_pImpl->m_pFmtFld->GetTxtFld()));
+ assert(m_pImpl->m_pFormatField->GetTextField() && "<SwXTextField::dispose()> - missing <SwTextField> --> crash");
+ SwTextField::DeleteTextField(*(m_pImpl->m_pFormatField->GetTextField()));
}
if (m_pImpl->m_pTextObject)
@@ -2190,25 +2190,25 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
{
SwDoc * pDoc = m_pImpl->m_pDoc;
assert(pDoc);
- const SwTxtFld* pTxtFld = m_pImpl->m_pFmtFld->GetTxtFld();
- if(!pTxtFld)
+ const SwTextField* pTextField = m_pImpl->m_pFormatField->GetTextField();
+ if(!pTextField)
throw uno::RuntimeException();
- SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = pTxtFld->GetStart();
+ SwPosition aPosition( pTextField->GetTextNode() );
+ aPosition.nContent = pTextField->GetStart();
pDoc->getIDocumentFieldsAccess().PutValueToField( aPosition, rValue, pEntry->nWID);
}
//#i100374# notify SwPostIt about new field content
- if (RES_POSTITFLD == nWhich && m_pImpl->m_pFmtFld)
+ if (RES_POSTITFLD == nWhich && m_pImpl->m_pFormatField)
{
- const_cast<SwFmtFld*>(m_pImpl->m_pFmtFld)->Broadcast(
- SwFmtFldHint( 0, SwFmtFldHintWhich::CHANGED ));
+ const_cast<SwFormatField*>(m_pImpl->m_pFormatField)->Broadcast(
+ SwFormatFieldHint( 0, SwFormatFieldHintWhich::CHANGED ));
}
- // fdo#42073 notify SwTxtFld about changes of the expanded string
- if (m_pImpl->m_pFmtFld->GetTxtFld())
+ // fdo#42073 notify SwTextField about changes of the expanded string
+ if (m_pImpl->m_pFormatField->GetTextField())
{
- m_pImpl->m_pFmtFld->GetTxtFld()->ExpandTxtFld();
+ m_pImpl->m_pFormatField->GetTextField()->ExpandTextField();
}
//#i100374# changing a document field should set the modify flag
@@ -2373,30 +2373,30 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
throw uno::RuntimeException();
// get text node for the text field
- const SwFmtFld *pFldFmt =
- (m_pImpl->GetField()) ? m_pImpl->m_pFmtFld : 0;
- const SwTxtFld* pTxtFld = (pFldFmt)
- ? m_pImpl->m_pFmtFld->GetTxtFld() : 0;
- if(!pTxtFld)
+ const SwFormatField *pFieldFormat =
+ (m_pImpl->GetField()) ? m_pImpl->m_pFormatField : 0;
+ const SwTextField* pTextField = (pFieldFormat)
+ ? m_pImpl->m_pFormatField->GetTextField() : 0;
+ if(!pTextField)
throw uno::RuntimeException();
- const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
+ const SwTextNode& rTextNode = pTextField->GetTextNode();
// skip fields that are currently not in the document
// e.g. fields in undo or redo array
- if (rTxtNode.GetNodes().IsDocNodes())
+ if (rTextNode.GetNodes().IsDocNodes())
{
- bool bFrame = 0 != rTxtNode.FindLayoutRect().Width(); // oder so
- bool bHidden = rTxtNode.IsHidden();
+ bool bFrame = 0 != rTextNode.FindLayoutRect().Width(); // oder so
+ bool bHidden = rTextNode.IsHidden();
if ( !bHidden )
{
sal_Int32 nHiddenStart;
sal_Int32 nHiddenEnd;
- SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = pTxtFld->GetStart();
+ SwPosition aPosition( pTextField->GetTextNode() );
+ aPosition.nContent = pTextField->GetStart();
- bHidden = SwScriptInfo::GetBoundsOfHiddenRange( pTxtFld->GetTxtNode(),
- pTxtFld->GetStart(),
+ bHidden = SwScriptInfo::GetBoundsOfHiddenRange( pTextField->GetTextNode(),
+ pTextField->GetStart(),
nHiddenStart, nHiddenEnd );
}
@@ -2524,53 +2524,53 @@ void SwXTextField::removeVetoableChangeListener(const OUString& /*PropertyName*/
void SAL_CALL SwXTextField::update() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwField * pFld = const_cast<SwField*>(m_pImpl->GetField());
- if (pFld)
+ SwField * pField = const_cast<SwField*>(m_pImpl->GetField());
+ if (pField)
{
- switch(pFld->Which())
+ switch(pField->Which())
{
case RES_DATETIMEFLD:
- static_cast<SwDateTimeField*>(pFld)->SetDateTime( ::DateTime( ::DateTime::SYSTEM ) );
+ static_cast<SwDateTimeField*>(pField)->SetDateTime( ::DateTime( ::DateTime::SYSTEM ) );
break;
case RES_EXTUSERFLD:
{
- SwExtUserField* pExtUserFld = static_cast<SwExtUserField*>(pFld);
- pExtUserFld->SetExpansion( SwExtUserFieldType::Expand(
- pExtUserFld->GetSubType(),
- pExtUserFld->GetFormat() ) );
+ SwExtUserField* pExtUserField = static_cast<SwExtUserField*>(pField);
+ pExtUserField->SetExpansion( SwExtUserFieldType::Expand(
+ pExtUserField->GetSubType(),
+ pExtUserField->GetFormat() ) );
}
break;
case RES_AUTHORFLD:
{
- SwAuthorField* pAuthorFld = static_cast<SwAuthorField*>(pFld);
- pAuthorFld->SetExpansion( SwAuthorFieldType::Expand(
- pAuthorFld->GetFormat() ) );
+ SwAuthorField* pAuthorField = static_cast<SwAuthorField*>(pField);
+ pAuthorField->SetExpansion( SwAuthorFieldType::Expand(
+ pAuthorField->GetFormat() ) );
}
break;
case RES_FILENAMEFLD:
{
- SwFileNameField* pFileNameFld = static_cast<SwFileNameField*>(pFld);
- pFileNameFld->SetExpansion( static_cast<SwFileNameFieldType*>(pFld->GetTyp())->Expand(
- pFileNameFld->GetFormat() ) );
+ SwFileNameField* pFileNameField = static_cast<SwFileNameField*>(pField);
+ pFileNameField->SetExpansion( static_cast<SwFileNameFieldType*>(pField->GetTyp())->Expand(
+ pFileNameField->GetFormat() ) );
}
break;
case RES_DOCINFOFLD:
{
- SwDocInfoField* pDocInfFld = static_cast<SwDocInfoField*>(pFld);
- pDocInfFld->SetExpansion( static_cast<SwDocInfoFieldType*>(pFld->GetTyp())->Expand(
- pDocInfFld->GetSubType(),
- pDocInfFld->GetFormat(),
- pDocInfFld->GetLanguage(),
- pDocInfFld->GetName() ) );
+ SwDocInfoField* pDocInfField = static_cast<SwDocInfoField*>(pField);
+ pDocInfField->SetExpansion( static_cast<SwDocInfoFieldType*>(pField->GetTyp())->Expand(
+ pDocInfField->GetSubType(),
+ pDocInfField->GetFormat(),
+ pDocInfField->GetLanguage(),
+ pDocInfField->GetName() ) );
}
break;
}
// Text formatting has to be triggered.
- const_cast<SwFmtFld*>(m_pImpl->m_pFmtFld)->ModifyNotification(0, 0);
+ const_cast<SwFormatField*>(m_pImpl->m_pFormatField)->ModifyNotification(0, 0);
}
else
m_pImpl->m_bCallUpdate = true;
@@ -2629,7 +2629,7 @@ void SwXTextField::Impl::Invalidate()
if (GetRegisteredIn())
{
GetRegisteredInNonConst()->Remove(this);
- m_pFmtFld = 0;
+ m_pFormatField = 0;
m_pDoc = 0;
uno::Reference<uno::XInterface> const xThis(m_wThis);
if (!xThis.is())
@@ -2654,8 +2654,8 @@ void SwXTextField::Impl::Modify(
case RES_FMT_CHG:
// Am I re-attached to a new one and will the old one be deleted?
- if( static_cast<const SwFmtChg*>(pNew)->pChangedFmt == GetRegisteredIn() &&
- static_cast<const SwFmtChg*>(pOld)->pChangedFmt->IsFmtInDTOR() )
+ if( static_cast<const SwFormatChg*>(pNew)->pChangedFormat == GetRegisteredIn() &&
+ static_cast<const SwFormatChg*>(pOld)->pChangedFormat->IsFormatInDTOR() )
Invalidate();
break;
}
@@ -2663,9 +2663,9 @@ void SwXTextField::Impl::Modify(
const SwField* SwXTextField::Impl::GetField() const
{
- if (GetRegisteredIn() && m_pFmtFld)
+ if (GetRegisteredIn() && m_pFormatField)
{
- return m_pFmtFld->GetField();
+ return m_pFormatField->GetField();
}
return 0;
}
@@ -2725,10 +2725,10 @@ static sal_uInt16 lcl_GetIdByName( OUString& rName, OUString& rTypeName )
{
nResId = RES_SETEXPFLD;
- const OUString sFldTypName( rName.getToken( 1, '.' ));
- const OUString sUIName( SwStyleNameMapper::GetSpecialExtraUIName( sFldTypName ) );
+ const OUString sFieldTypName( rName.getToken( 1, '.' ));
+ const OUString sUIName( SwStyleNameMapper::GetSpecialExtraUIName( sFieldTypName ) );
- if( sUIName != sFldTypName )
+ if( sUIName != sFieldTypName )
rName = comphelper::string::setToken(rName, 1, '.', sUIName);
}
else if (rTypeName.equalsIgnoreAsciiCase("DataBase"))
@@ -2762,7 +2762,7 @@ uno::Any SwXTextFieldMasters::getByName(const OUString& rName)
css::uno::Reference<css::uno::XInterface>());
sName = sName.copy(std::min(sTypeName.getLength()+1, sName.getLength()));
- SwFieldType* pType = GetDoc()->getIDocumentFieldsAccess().GetFldType(nResId, sName, true);
+ SwFieldType* pType = GetDoc()->getIDocumentFieldsAccess().GetFieldType(nResId, sName, true);
if(!pType)
throw container::NoSuchElementException(
"SwXTextFieldMasters::getByName(" + rName + ")",
@@ -2774,25 +2774,25 @@ uno::Any SwXTextFieldMasters::getByName(const OUString& rName)
}
bool SwXTextFieldMasters::getInstanceName(
- const SwFieldType& rFldType, OUString& rName)
+ const SwFieldType& rFieldType, OUString& rName)
{
OUString sField;
- switch( rFldType.Which() )
+ switch( rFieldType.Which() )
{
case RES_USERFLD:
- sField = "User." + rFldType.GetName();
+ sField = "User." + rFieldType.GetName();
break;
case RES_DDEFLD:
- sField = "DDE." + rFldType.GetName();
+ sField = "DDE." + rFieldType.GetName();
break;
case RES_SETEXPFLD:
- sField = "SetExpression." + SwStyleNameMapper::GetSpecialExtraProgName( rFldType.GetName() );
+ sField = "SetExpression." + SwStyleNameMapper::GetSpecialExtraProgName( rFieldType.GetName() );
break;
case RES_DBFLD:
- sField = "DataBase." + rFldType.GetName().replaceAll(OUString(DB_DELIM), ".");
+ sField = "DataBase." + rFieldType.GetName().replaceAll(OUString(DB_DELIM), ".");
break;
case RES_AUTHORITY:
@@ -2814,26 +2814,26 @@ uno::Sequence< OUString > SwXTextFieldMasters::getElementNames()
if(!GetDoc())
throw uno::RuntimeException();
- const SwFldTypes* pFldTypes = GetDoc()->getIDocumentFieldsAccess().GetFldTypes();
- const size_t nCount = pFldTypes->size();
+ const SwFieldTypes* pFieldTypes = GetDoc()->getIDocumentFieldsAccess().GetFieldTypes();
+ const size_t nCount = pFieldTypes->size();
- std::vector<OUString> aFldNames;
+ std::vector<OUString> aFieldNames;
for( size_t i = 0; i < nCount; ++i )
{
- SwFieldType& rFldType = *((*pFldTypes)[i]);
+ SwFieldType& rFieldType = *((*pFieldTypes)[i]);
- OUString sFldName;
- if (SwXTextFieldMasters::getInstanceName(rFldType, sFldName))
+ OUString sFieldName;
+ if (SwXTextFieldMasters::getInstanceName(rFieldType, sFieldName))
{
- aFldNames.push_back(sFldName);
+ aFieldNames.push_back(sFieldName);
}
}
- uno::Sequence< OUString > aSeq( static_cast<sal_Int32>(aFldNames.size()) );
+ uno::Sequence< OUString > aSeq( static_cast<sal_Int32>(aFieldNames.size()) );
OUString* pArray = aSeq.getArray();
- for (size_t i = 0; i<aFldNames.size(); ++i)
+ for (size_t i = 0; i<aFieldNames.size(); ++i)
{
- pArray[i] = aFldNames[i];
+ pArray[i] = aFieldNames[i];
}
return aSeq;
@@ -2851,7 +2851,7 @@ sal_Bool SwXTextFieldMasters::hasByName(const OUString& rName) throw( uno::Runti
if( USHRT_MAX != nResId )
{
sName = sName.copy(std::min(sTypeName.getLength()+1, sName.getLength()));
- bRet = USHRT_MAX != nResId && 0 != GetDoc()->getIDocumentFieldsAccess().GetFldType(nResId, sName, true);
+ bRet = USHRT_MAX != nResId && 0 != GetDoc()->getIDocumentFieldsAccess().GetFieldType(nResId, sName, true);
}
return bRet;
}
@@ -2946,7 +2946,7 @@ void SAL_CALL SwXTextFieldTypes::refresh() throw (uno::RuntimeException, std::ex
throw uno::RuntimeException();
UnoActionContext aContext(GetDoc());
GetDoc()->getIDocumentStatistics().UpdateDocStat( false, true );
- GetDoc()->getIDocumentFieldsAccess().UpdateFlds(0, false);
+ GetDoc()->getIDocumentFieldsAccess().UpdateFields(0, false);
}
// call refresh listeners (without SolarMutex locked)
lang::EventObject const event(static_cast< ::cppu::OWeakObject*>(this));
@@ -3021,24 +3021,24 @@ SwXFieldEnumeration::SwXFieldEnumeration(SwDoc & rDoc)
uno::Reference< text::XTextField > *pItems = m_pImpl->m_Items.getArray();
sal_Int32 nFillPos = 0;
- const SwFldTypes* pFldTypes = m_pImpl->m_pDoc->getIDocumentFieldsAccess().GetFldTypes();
- const size_t nCount = pFldTypes->size();
+ const SwFieldTypes* pFieldTypes = m_pImpl->m_pDoc->getIDocumentFieldsAccess().GetFieldTypes();
+ const size_t nCount = pFieldTypes->size();
for(size_t nType = 0; nType < nCount; ++nType)
{
- const SwFieldType *pCurType = (*pFldTypes)[nType];
- SwIterator<SwFmtFld,SwFieldType> aIter( *pCurType );
- const SwFmtFld* pCurFldFmt = aIter.First();
- while (pCurFldFmt)
+ const SwFieldType *pCurType = (*pFieldTypes)[nType];
+ SwIterator<SwFormatField,SwFieldType> aIter( *pCurType );
+ const SwFormatField* pCurFieldFormat = aIter.First();
+ while (pCurFieldFormat)
{
- const SwTxtFld *pTxtFld = pCurFldFmt->GetTxtFld();
+ const SwTextField *pTextField = pCurFieldFormat->GetTextField();
// skip fields that are currently not in the document
// e.g. fields in undo or redo array
- bool bSkip = !pTxtFld ||
- !pTxtFld->GetpTxtNode()->GetNodes().IsDocNodes();
+ bool bSkip = !pTextField ||
+ !pTextField->GetpTextNode()->GetNodes().IsDocNodes();
if (!bSkip)
pItems[ nFillPos++ ] = SwXTextField::CreateXTextField(
- m_pImpl->m_pDoc, pCurFldFmt);
- pCurFldFmt = aIter.Next();
+ m_pImpl->m_pDoc, pCurFieldFormat);
+ pCurFieldFormat = aIter.Next();
// enlarge sequence if necessary
if (m_pImpl->m_Items.getLength() == nFillPos)
@@ -3095,11 +3095,11 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
uno::Reference< text::XTextField > *pItems = m_pImpl->m_Items.getArray();
(void)pItems;
#endif
- uno::Reference< text::XTextField > &rxFld =
+ uno::Reference< text::XTextField > &rxField =
m_pImpl->m_Items.getArray()[ m_pImpl->m_nNextIndex++ ];
uno::Any aRet;
- aRet <<= rxFld;
- rxFld = 0; // free memory for item that is not longer used
+ aRet <<= rxField;
+ rxField = 0; // free memory for item that is not longer used
return aRet;
}
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 5537ed864dba..a7a99b6c07f2 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -64,8 +64,8 @@ CreateFlatParagraphIterator(SwDoc & rDoc, sal_Int32 const nTextMarkupType,
}
-SwXFlatParagraph::SwXFlatParagraph( SwTxtNode& rTxtNode, const OUString& aExpandText, const ModelToViewHelper& rMap )
- : SwXFlatParagraph_Base(& rTxtNode, rMap)
+SwXFlatParagraph::SwXFlatParagraph( SwTextNode& rTextNode, const OUString& aExpandText, const ModelToViewHelper& rMap )
+ : SwXFlatParagraph_Base(& rTextNode, rMap)
, maExpandText(aExpandText)
{
}
@@ -196,17 +196,17 @@ void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, sal_Bool bVal ) t
{
SolarMutexGuard aGuard;
- if (GetTxtNode())
+ if (GetTextNode())
{
if ( text::TextMarkupType::SPELLCHECK == nType )
- GetTxtNode()->SetWrongDirty( !bVal );
+ GetTextNode()->SetWrongDirty( !bVal );
else if ( text::TextMarkupType::SMARTTAG == nType )
- GetTxtNode()->SetSmartTagDirty( !bVal );
+ GetTextNode()->SetSmartTagDirty( !bVal );
else if( text::TextMarkupType::PROOFREADING == nType )
{
- GetTxtNode()->SetGrammarCheckDirty( !bVal );
+ GetTextNode()->SetGrammarCheckDirty( !bVal );
if( bVal )
- ::finishGrammarCheck( *GetTxtNode() );
+ ::finishGrammarCheck( *GetTextNode() );
}
}
}
@@ -215,14 +215,14 @@ void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, sal_Bool bVal ) t
sal_Bool SAL_CALL SwXFlatParagraph::isChecked( ::sal_Int32 nType ) throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- if (GetTxtNode())
+ if (GetTextNode())
{
if ( text::TextMarkupType::SPELLCHECK == nType )
- return GetTxtNode()->IsWrongDirty();
+ return GetTextNode()->IsWrongDirty();
else if ( text::TextMarkupType::PROOFREADING == nType )
- return GetTxtNode()->IsGrammarCheckDirty();
+ return GetTextNode()->IsGrammarCheckDirty();
else if ( text::TextMarkupType::SMARTTAG == nType )
- return GetTxtNode()->IsSmartTagDirty();
+ return GetTextNode()->IsSmartTagDirty();
}
return sal_False;
@@ -232,7 +232,7 @@ sal_Bool SAL_CALL SwXFlatParagraph::isChecked( ::sal_Int32 nType ) throw (uno::R
sal_Bool SAL_CALL SwXFlatParagraph::isModified() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return 0 == GetTxtNode();
+ return 0 == GetTextNode();
}
// text::XFlatParagraph:
@@ -240,10 +240,10 @@ lang::Locale SAL_CALL SwXFlatParagraph::getLanguageOfText(::sal_Int32 nPos, ::sa
throw (uno::RuntimeException, lang::IllegalArgumentException, std::exception)
{
SolarMutexGuard aGuard;
- if (!GetTxtNode())
+ if (!GetTextNode())
return LanguageTag::convertToLocale( LANGUAGE_NONE );
- const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetTxtNode()->GetLang(nPos, nLen) ) );
+ const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetTextNode()->GetLang(nPos, nLen) ) );
return aLocale;
}
@@ -253,10 +253,10 @@ lang::Locale SAL_CALL SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPo
{
SolarMutexGuard aGuard;
- if (!GetTxtNode())
+ if (!GetTextNode())
return LanguageTag::convertToLocale( LANGUAGE_NONE );
- const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetTxtNode()->GetLang(nPos, nLen) ) );
+ const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetTextNode()->GetLang(nPos, nLen) ) );
return aLocale;
}
@@ -265,18 +265,18 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c
{
SolarMutexGuard aGuard;
- if (!GetTxtNode())
+ if (!GetTextNode())
return;
- SwTxtNode *const pOldTxtNode = GetTxtNode();
+ SwTextNode *const pOldTextNode = GetTextNode();
- SwPaM aPaM( *GetTxtNode(), nPos, *GetTxtNode(), nPos+nLen );
+ SwPaM aPaM( *GetTextNode(), nPos, *GetTextNode(), nPos+nLen );
- UnoActionContext aAction( GetTxtNode()->GetDoc() );
+ UnoActionContext aAction( GetTextNode()->GetDoc() );
const uno::Reference< text::XTextRange > xRange =
SwXTextRange::CreateXTextRange(
- *GetTxtNode()->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() );
+ *GetTextNode()->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() );
uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY );
if ( xPropSet.is() )
{
@@ -284,10 +284,10 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c
xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value );
}
- IDocumentContentOperations* pIDCO = pOldTxtNode->getIDocumentContentOperations();
+ IDocumentContentOperations* pIDCO = pOldTextNode->getIDocumentContentOperations();
pIDCO->ReplaceRange( aPaM, aNewText, false );
- ClearTxtNode(); // TODO: is this really needed?
+ ClearTextNode(); // TODO: is this really needed?
}
// text::XFlatParagraph:
@@ -295,16 +295,16 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
{
SolarMutexGuard aGuard;
- if (!GetTxtNode())
+ if (!GetTextNode())
return;
- SwPaM aPaM( *GetTxtNode(), nPos, *GetTxtNode(), nPos+nLen );
+ SwPaM aPaM( *GetTextNode(), nPos, *GetTextNode(), nPos+nLen );
- UnoActionContext aAction( GetTxtNode()->GetDoc() );
+ UnoActionContext aAction( GetTextNode()->GetDoc() );
const uno::Reference< text::XTextRange > xRange =
SwXTextRange::CreateXTextRange(
- *GetTxtNode()->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() );
+ *GetTextNode()->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() );
uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY );
if ( xPropSet.is() )
{
@@ -312,7 +312,7 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value );
}
- ClearTxtNode(); // TODO: is this really needed?
+ ClearTextNode(); // TODO: is this really needed?
}
// text::XFlatParagraph:
@@ -386,7 +386,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
if (!mpDoc)
return xRet;
- SwTxtNode* pRet = 0;
+ SwTextNode* pRet = 0;
if ( mbAutomatic )
{
SwViewShell* pViewShell = mpDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
@@ -405,23 +405,23 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
return xRet;
// search for invalid content:
- SwCntntFrm* pCnt = pCurrentPage->ContainsCntnt();
+ SwContentFrm* pCnt = pCurrentPage->ContainsContent();
while( pCnt && pCurrentPage->IsAnLower( pCnt ) )
{
- SwTxtNode* pTxtNode = dynamic_cast<SwTxtNode*>( pCnt->GetNode()->GetTxtNode() );
+ SwTextNode* pTextNode = dynamic_cast<SwTextNode*>( pCnt->GetNode()->GetTextNode() );
- if ( pTxtNode &&
+ if ( pTextNode &&
((mnType == text::TextMarkupType::SPELLCHECK &&
- pTxtNode->IsWrongDirty()) ||
+ pTextNode->IsWrongDirty()) ||
(mnType == text::TextMarkupType::PROOFREADING &&
- pTxtNode->IsGrammarCheckDirty())) )
+ pTextNode->IsGrammarCheckDirty())) )
{
- pRet = pTxtNode;
+ pRet = pTextNode;
break;
}
- pCnt = pCnt->GetNextCntntFrm();
+ pCnt = pCnt->GetNextContentFrm();
}
}
@@ -453,7 +453,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
++mnCurrentNode;
- pRet = dynamic_cast<SwTxtNode*>(pNd);
+ pRet = dynamic_cast<SwTextNode*>(pNd);
if ( pRet )
break;
@@ -501,29 +501,29 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co
if ( !pFlatParagraph )
return xRet;
- SwTxtNode const*const pCurrentNode = pFlatParagraph->GetTxtNode();
+ SwTextNode const*const pCurrentNode = pFlatParagraph->GetTextNode();
if ( !pCurrentNode )
return xRet;
- SwTxtNode* pNextTxtNode = 0;
+ SwTextNode* pNextTextNode = 0;
const SwNodes& rNodes = pCurrentNode->GetDoc()->GetNodes();
for( sal_uLong nCurrentNode = pCurrentNode->GetIndex() + 1; nCurrentNode < rNodes.Count(); ++nCurrentNode )
{
SwNode* pNd = rNodes[ nCurrentNode ];
- pNextTxtNode = dynamic_cast<SwTxtNode*>(pNd);
- if ( pNextTxtNode )
+ pNextTextNode = dynamic_cast<SwTextNode*>(pNd);
+ if ( pNextTextNode )
break;
}
- if ( pNextTxtNode )
+ if ( pNextTextNode )
{
// Expand the string:
- const ModelToViewHelper aConversionMap(*pNextTxtNode);
+ const ModelToViewHelper aConversionMap(*pNextTextNode);
OUString aExpandText = aConversionMap.getViewText();
- xRet = new SwXFlatParagraph( *pNextTxtNode, aExpandText, aConversionMap );
+ xRet = new SwXFlatParagraph( *pNextTextNode, aExpandText, aConversionMap );
// keep hard references...
m_aFlatParaList.insert( xRet );
}
@@ -547,29 +547,29 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
if ( !pFlatParagraph )
return xRet;
- SwTxtNode const*const pCurrentNode = pFlatParagraph->GetTxtNode();
+ SwTextNode const*const pCurrentNode = pFlatParagraph->GetTextNode();
if ( !pCurrentNode )
return xRet;
- SwTxtNode* pPrevTxtNode = 0;
+ SwTextNode* pPrevTextNode = 0;
const SwNodes& rNodes = pCurrentNode->GetDoc()->GetNodes();
for( sal_uLong nCurrentNode = pCurrentNode->GetIndex() - 1; nCurrentNode > 0; --nCurrentNode )
{
SwNode* pNd = rNodes[ nCurrentNode ];
- pPrevTxtNode = dynamic_cast<SwTxtNode*>(pNd);
- if ( pPrevTxtNode )
+ pPrevTextNode = dynamic_cast<SwTextNode*>(pNd);
+ if ( pPrevTextNode )
break;
}
- if ( pPrevTxtNode )
+ if ( pPrevTextNode )
{
// Expand the string:
- const ModelToViewHelper aConversionMap(*pPrevTxtNode);
+ const ModelToViewHelper aConversionMap(*pPrevTextNode);
OUString aExpandText = aConversionMap.getViewText();
- xRet = new SwXFlatParagraph( *pPrevTxtNode, aExpandText, aConversionMap );
+ xRet = new SwXFlatParagraph( *pPrevTextNode, aExpandText, aConversionMap );
// keep hard references...
m_aFlatParaList.insert( xRet );
}
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 9c44c672d34c..897a9878be3a 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -178,7 +178,7 @@ bool BaseFrameProperties_Impl::GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId,
bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet& rFromSet, bool& rSizeFound)
{
- //UUUU assert when the target SfxItemSet has no parent. It *should* have the pDfltFrmFmt
+ //UUUU assert when the target SfxItemSet has no parent. It *should* have the pDfltFrameFormat
// from SwDoc set as parent (or similar) to have the necessary XFILL_NONE in the ItemSet
if(!rToSet.GetParent())
{
@@ -187,7 +187,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
bool bRet = true;
// always add an anchor to the set
- SwFmtAnchor aAnchor ( static_cast < const SwFmtAnchor & > ( rFromSet.Get ( RES_ANCHOR ) ) );
+ SwFormatAnchor aAnchor ( static_cast < const SwFormatAnchor & > ( rFromSet.Get ( RES_ANCHOR ) ) );
{
const ::uno::Any* pAnchorPgNo;
if(GetProperty(RES_ANCHOR, MID_ANCHOR_PAGENUM, pAnchorPgNo))
@@ -644,7 +644,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_HORI_ORIENT, MID_HORIORIENT_PAGETOGGLE, pPageT);
if(pHori||pHoriP||pHoriR||pPageT)
{
- SwFmtHoriOrient aOrient ( static_cast < const :: SwFmtHoriOrient & > ( rFromSet.Get ( RES_HORI_ORIENT ) ) );
+ SwFormatHoriOrient aOrient ( static_cast < const :: SwFormatHoriOrient & > ( rFromSet.Get ( RES_HORI_ORIENT ) ) );
if(pHori )
bRet &= ((SfxPoolItem&)aOrient).PutValue(*pHori, MID_HORIORIENT_ORIENT);
if(pHoriP)
@@ -666,7 +666,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_VERT_ORIENT, MID_VERTORIENT_RELATION, pVertR );
if(pVert||pVertP||pVertR)
{
- SwFmtVertOrient aOrient ( static_cast < const :: SwFmtVertOrient & > ( rFromSet.Get ( RES_VERT_ORIENT ) ) );
+ SwFormatVertOrient aOrient ( static_cast < const :: SwFormatVertOrient & > ( rFromSet.Get ( RES_VERT_ORIENT ) ) );
if(pVert )
bRet &= ((SfxPoolItem&)aOrient).PutValue(*pVert, MID_VERTORIENT_ORIENT);
if(pVertP)
@@ -687,7 +687,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_URL, MID_URL_SERVERMAP, pHySMp );
if(pURL||pTarget||pHyLNm||pHySMp)
{
- SwFmtURL aURL ( static_cast < const :: SwFmtURL & > ( rFromSet.Get ( RES_URL ) ) );
+ SwFormatURL aURL ( static_cast < const :: SwFormatURL & > ( rFromSet.Get ( RES_URL ) ) );
if(pURL)
bRet &= ((SfxPoolItem&)aURL).PutValue(*pURL, MID_URL_URL);
if(pTarget)
@@ -759,7 +759,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_SURROUND, MID_SURROUND_ANCHORONLY, pSurAnch);
if(pSur || pSurAnch)
{
- SwFmtSurround aSrnd ( static_cast < const :: SwFmtSurround & > ( rFromSet.Get ( RES_SURROUND ) ) );
+ SwFormatSurround aSrnd ( static_cast < const :: SwFormatSurround & > ( rFromSet.Get ( RES_SURROUND ) ) );
if(pSur)
bRet &= ((SfxPoolItem&)aSrnd).PutValue(*pSur, MID_SURROUND_SURROUNDTYPE );
if(pSurAnch)
@@ -844,7 +844,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
pWidthType ||pSyncWidth || pSyncHeight )
{
rSizeFound = true;
- SwFmtFrmSize aFrmSz ( static_cast < const :: SwFmtFrmSize& > ( rFromSet.Get ( RES_FRM_SIZE ) ) );
+ SwFormatFrmSize aFrmSz ( static_cast < const :: SwFormatFrmSize& > ( rFromSet.Get ( RES_FRM_SIZE ) ) );
if(pWidth)
bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pWidth, MID_FRMSIZE_WIDTH|CONVERT_TWIPS);
if(pHeight)
@@ -852,11 +852,11 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
if(pRelH )
bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pRelH, MID_FRMSIZE_REL_HEIGHT);
if (pRelHRelation)
- bRet &= const_cast<SwFmtFrmSize&>(aFrmSz).PutValue(*pRelHRelation, MID_FRMSIZE_REL_HEIGHT_RELATION);
+ bRet &= const_cast<SwFormatFrmSize&>(aFrmSz).PutValue(*pRelHRelation, MID_FRMSIZE_REL_HEIGHT_RELATION);
if(pRelW )
bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pRelW, MID_FRMSIZE_REL_WIDTH);
if (pRelWRelation)
- bRet &= const_cast<SwFmtFrmSize&>(aFrmSz).PutValue(*pRelWRelation, MID_FRMSIZE_REL_WIDTH_RELATION);
+ bRet &= const_cast<SwFormatFrmSize&>(aFrmSz).PutValue(*pRelWRelation, MID_FRMSIZE_REL_WIDTH_RELATION);
if(pSyncWidth)
bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pSyncWidth, MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT);
if(pSyncHeight)
@@ -876,7 +876,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
else
{
rSizeFound = false;
- SwFmtFrmSize aFrmSz;
+ SwFormatFrmSize aFrmSz;
awt::Size aSize;
aSize.Width = 2 * MM50;
aSize.Height = 2 * MM50;
@@ -908,9 +908,9 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_FOLLOW_TEXT_FLOW, 0, pFollowTextFlow);
if ( pFollowTextFlow )
{
- SwFmtFollowTextFlow aFmtFollowTextFlow;
- aFmtFollowTextFlow.PutValue(*pFollowTextFlow, 0);
- rToSet.Put(aFmtFollowTextFlow);
+ SwFormatFollowTextFlow aFormatFollowTextFlow;
+ aFormatFollowTextFlow.PutValue(*pFollowTextFlow, 0);
+ rToSet.Put(aFormatFollowTextFlow);
}
// #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS
@@ -918,9 +918,9 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_WRAP_INFLUENCE_ON_OBJPOS, MID_WRAP_INFLUENCE, pWrapInfluenceOnObjPos);
if ( pWrapInfluenceOnObjPos )
{
- SwFmtWrapInfluenceOnObjPos aFmtWrapInfluenceOnObjPos;
- aFmtWrapInfluenceOnObjPos.PutValue( *pWrapInfluenceOnObjPos, MID_WRAP_INFLUENCE );
- rToSet.Put(aFmtWrapInfluenceOnObjPos);
+ SwFormatWrapInfluenceOnObjPos aFormatWrapInfluenceOnObjPos;
+ aFormatWrapInfluenceOnObjPos.PutValue( *pWrapInfluenceOnObjPos, MID_WRAP_INFLUENCE );
+ rToSet.Put(aFormatWrapInfluenceOnObjPos);
}
{
@@ -955,7 +955,7 @@ static inline void lcl_FillCol ( SfxItemSet &rToSet, const :: SfxItemSet &rFromS
{
if ( pAny )
{
- SwFmtCol aCol ( static_cast < const :: SwFmtCol & > ( rFromSet.Get ( RES_COL ) ) );
+ SwFormatCol aCol ( static_cast < const :: SwFormatCol & > ( rFromSet.Get ( RES_COL ) ) );
((SfxPoolItem&)aCol).PutValue( *pAny, MID_COLUMNS);
rToSet.Put(aCol);
}
@@ -988,7 +988,7 @@ bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItem
}
else
{
- const :: SfxItemSet *pItemSet = &pDoc->getIDocumentStylePoolAccess().GetFrmFmtFromPool( RES_POOLFRM_FRAME )->GetAttrSet();
+ const :: SfxItemSet *pItemSet = &pDoc->getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_FRAME )->GetAttrSet();
bRet = FillBaseProperties( rSet, *pItemSet, rSizeFound );
lcl_FillCol ( rSet, *pItemSet, pColumns );
}
@@ -1067,7 +1067,7 @@ bool SwGraphicProperties_Impl::AnyToItemSet(
}
else
{
- const :: SfxItemSet *pItemSet = &pDoc->getIDocumentStylePoolAccess().GetFrmFmtFromPool( RES_POOLFRM_GRAPHIC )->GetAttrSet();
+ const :: SfxItemSet *pItemSet = &pDoc->getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_GRAPHIC )->GetAttrSet();
bRet = FillBaseProperties(rFrmSet, *pItemSet, rSizeFound);
lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, pVMirror, bRet );
}
@@ -1232,8 +1232,8 @@ SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pD
}
}
-SwXFrame::SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet, const :: SfxItemPropertySet* pSet)
- : SwClient( &rFrmFmt )
+SwXFrame::SwXFrame(SwFrameFormat& rFrameFormat, FlyCntType eSet, const :: SfxItemPropertySet* pSet)
+ : SwClient( &rFrameFormat )
, m_pImpl(new Impl)
,
m_pPropSet(pSet),
@@ -1254,23 +1254,23 @@ SwXFrame::~SwXFrame()
template<class Interface, class NameLookupIsHard>
uno::Reference<Interface>
-SwXFrame::CreateXFrame(SwDoc & rDoc, SwFrmFmt *const pFrmFmt)
+SwXFrame::CreateXFrame(SwDoc & rDoc, SwFrameFormat *const pFrameFormat)
{
- assert(!pFrmFmt || &rDoc == pFrmFmt->GetDoc());
+ assert(!pFrameFormat || &rDoc == pFrameFormat->GetDoc());
uno::Reference<Interface> xFrame;
- if (pFrmFmt)
+ if (pFrameFormat)
{
- xFrame.set(pFrmFmt->GetXObject(), uno::UNO_QUERY); // cached?
+ xFrame.set(pFrameFormat->GetXObject(), uno::UNO_QUERY); // cached?
}
if (!xFrame.is())
{
- NameLookupIsHard *const pNew((pFrmFmt)
- ? new NameLookupIsHard(*pFrmFmt)
+ NameLookupIsHard *const pNew((pFrameFormat)
+ ? new NameLookupIsHard(*pFrameFormat)
: new NameLookupIsHard(&rDoc));
xFrame.set(pNew);
- if (pFrmFmt)
+ if (pFrameFormat)
{
- pFrmFmt->SetXObject(xFrame);
+ pFrameFormat->SetXObject(xFrame);
}
// need a permanent Reference to initialize m_wThis
pNew->SwXFrame::m_pImpl->m_wThis = xFrame;
@@ -1281,9 +1281,9 @@ SwXFrame::CreateXFrame(SwDoc & rDoc, SwFrmFmt *const pFrmFmt)
OUString SwXFrame::getName() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
- return pFmt->GetName();
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
+ return pFormat->GetName();
if(!bIsDescriptor)
throw uno::RuntimeException();
return m_sName;
@@ -1292,11 +1292,11 @@ OUString SwXFrame::getName() throw( uno::RuntimeException, std::exception )
void SwXFrame::setName(const OUString& rName) throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- pFmt->GetDoc()->SetFlyName(static_cast<SwFlyFrmFmt&>(*pFmt), rName);
- if(pFmt->GetName() != rName)
+ pFormat->GetDoc()->SetFlyName(static_cast<SwFlyFrameFormat&>(*pFormat), rName);
+ if(pFormat->GetName() != rName)
{
throw uno::RuntimeException();
}
@@ -1344,22 +1344,22 @@ void SwXFrame::SetSelection(SwPaM& rCopySource)
*m_pCopySource->GetMark() = *rCopySource.End();
}
-SdrObject *SwXFrame::GetOrCreateSdrObject(SwFlyFrmFmt &rFmt)
+SdrObject *SwXFrame::GetOrCreateSdrObject(SwFlyFrameFormat &rFormat)
{
- SdrObject* pObject = rFmt.FindSdrObject();
+ SdrObject* pObject = rFormat.FindSdrObject();
if( !pObject )
{
- SwDoc *pDoc = rFmt.GetDoc();
+ SwDoc *pDoc = rFormat.GetDoc();
// #i52858# - method name changed
SwDrawModel* pDrawModel = pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
SwFlyDrawContact* pContactObject
- = new SwFlyDrawContact( &rFmt, pDrawModel );
+ = new SwFlyDrawContact( &rFormat, pDrawModel );
pObject = pContactObject->GetMaster();
- const :: SwFmtSurround& rSurround = rFmt.GetSurround();
+ const :: SwFormatSurround& rSurround = rFormat.GetSurround();
pObject->SetLayer(
( SURROUND_THROUGHT == rSurround.GetSurround() &&
- !rFmt.GetOpaque().GetValue() ) ? pDoc->getIDocumentDrawModelAccess().GetHellId()
+ !rFormat.GetOpaque().GetValue() ) ? pDoc->getIDocumentDrawModelAccess().GetHellId()
: pDoc->getIDocumentDrawModelAccess().GetHeavenId() );
pDrawModel->GetPage(0)->InsertObject( pObject );
}
@@ -1367,9 +1367,9 @@ SdrObject *SwXFrame::GetOrCreateSdrObject(SwFlyFrmFmt &rFmt)
return pObject;
}
-static SwFrmFmt *lcl_GetFrmFmt( const :: uno::Any& rValue, SwDoc *pDoc )
+static SwFrameFormat *lcl_GetFrameFormat( const :: uno::Any& rValue, SwDoc *pDoc )
{
- SwFrmFmt *pRet = 0;
+ SwFrameFormat *pRet = 0;
SwDocShell* pDocSh = pDoc->GetDocShell();
if(pDocSh)
{
@@ -1382,7 +1382,7 @@ static SwFrmFmt *lcl_GetFrmFmt( const :: uno::Any& rValue, SwDoc *pDoc )
static_cast<SwDocStyleSheet*>(pDocSh->GetStyleSheetPool()->Find(sStyle,
SFX_STYLE_FAMILY_FRAME));
if(pStyle)
- pRet = pStyle->GetFrmFmt();
+ pRet = pStyle->GetFrameFormat();
}
return pRet;
@@ -1392,7 +1392,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
const :: SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
@@ -1421,7 +1421,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if(bDoIt)
{
- const SwDoc* pDoc = (IsDescriptor() ? m_pDoc : GetFrmFmt()->GetDoc());
+ const SwDoc* pDoc = (IsDescriptor() ? m_pDoc : GetFrameFormat()->GetDoc());
const SfxItemPool& rPool = pDoc->GetAttrPool();
const SfxMapUnit eMapUnit(rPool.GetMetric(pEntry->nWID));
@@ -1432,28 +1432,28 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
}
}
- if(pFmt)
+ if(pFormat)
{
bool bNextFrame = false;
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- SwDoc* pDoc = pFmt->GetDoc();
+ SwDoc* pDoc = pFormat->GetDoc();
if ( ((eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID)) ||
(FN_PARAM_COUNTOUR_PP == pEntry->nWID) ||
(FN_UNO_IS_AUTOMATIC_CONTOUR == pEntry->nWID) ||
(FN_UNO_IS_PIXEL_CONTOUR == pEntry->nWID) )
{
- const :: SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const :: SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
- SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
+ SwNoTextNode* pNoText = aIdx.GetNode().GetNoTextNode();
if(pEntry->nWID == FN_PARAM_COUNTOUR_PP)
{
drawing::PointSequenceSequence aParam;
if(!aValue.hasValue())
- pNoTxt->SetContour(0);
+ pNoText->SetContour(0);
else if(aValue >>= aParam)
{
tools::PolyPolygon aPoly((sal_uInt16)aParam.getLength());
@@ -1472,14 +1472,14 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
aSet.Optimize( PolyOptimizeFlags::CLOSE );
aPoly.Insert( aSet );
}
- pNoTxt->SetContourAPI( &aPoly );
+ pNoText->SetContourAPI( &aPoly );
}
else
throw lang::IllegalArgumentException();
}
else if(pEntry->nWID == FN_UNO_IS_AUTOMATIC_CONTOUR )
{
- pNoTxt->SetAutomaticContour( *static_cast<sal_Bool const *>(aValue.getValue()) );
+ pNoText->SetAutomaticContour( *static_cast<sal_Bool const *>(aValue.getValue()) );
}
else if(pEntry->nWID == FN_UNO_IS_PIXEL_CONTOUR )
{
@@ -1487,75 +1487,75 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
// is no contour, or if the contour has been set by the
// API itself (or in other words, if the contour isn't
// used already).
- if( !pNoTxt->_HasContour() ||
- !pNoTxt->IsContourMapModeValid() )
- pNoTxt->SetPixelContour( *static_cast<sal_Bool const *>(aValue.getValue()) );
+ if( !pNoText->_HasContour() ||
+ !pNoText->IsContourMapModeValid() )
+ pNoText->SetPixelContour( *static_cast<sal_Bool const *>(aValue.getValue()) );
else
throw lang::IllegalArgumentException();
}
else
{
- SfxItemSet aSet(pNoTxt->GetSwAttrSet());
+ SfxItemSet aSet(pNoText->GetSwAttrSet());
m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
- pNoTxt->SetAttr(aSet);
+ pNoText->SetAttr(aSet);
}
}
}
// New attribute Title
else if( FN_UNO_TITLE == pEntry->nWID )
{
- SwFlyFrmFmt& rFlyFmt = dynamic_cast<SwFlyFrmFmt&>(*pFmt);
+ SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat);
OUString sTitle;
aValue >>= sTitle;
// assure that <SdrObject> instance exists.
- GetOrCreateSdrObject(rFlyFmt);
- rFlyFmt.GetDoc()->SetFlyFrmTitle(rFlyFmt, sTitle);
+ GetOrCreateSdrObject(rFlyFormat);
+ rFlyFormat.GetDoc()->SetFlyFrmTitle(rFlyFormat, sTitle);
}
// New attribute Description
else if( FN_UNO_DESCRIPTION == pEntry->nWID )
{
- SwFlyFrmFmt& rFlyFmt = dynamic_cast<SwFlyFrmFmt&>(*pFmt);
+ SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat);
OUString sDescription;
aValue >>= sDescription;
// assure that <SdrObject> instance exists.
- GetOrCreateSdrObject(rFlyFmt);
- rFlyFmt.GetDoc()->SetFlyFrmDescription(rFlyFmt, sDescription);
+ GetOrCreateSdrObject(rFlyFormat);
+ rFlyFormat.GetDoc()->SetFlyFrmDescription(rFlyFormat, sDescription);
}
else if(FN_UNO_FRAME_STYLE_NAME == pEntry->nWID)
{
- SwFrmFmt *pFrmFmt = lcl_GetFrmFmt( aValue, pFmt->GetDoc() );
- if( pFrmFmt )
+ SwFrameFormat *pFrameFormat = lcl_GetFrameFormat( aValue, pFormat->GetDoc() );
+ if( pFrameFormat )
{
- UnoActionContext aAction(pFmt->GetDoc());
+ UnoActionContext aAction(pFormat->GetDoc());
SfxItemSet* pSet = 0;
// #i31771#, #i25798# - No adjustment of
// anchor ( no call of method <sw_ChkAndSetNewAnchor(..)> ),
// if document is currently in reading mode.
- if ( !pFmt->GetDoc()->IsInReading() )
+ if ( !pFormat->GetDoc()->IsInReading() )
{
- // see SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, bool bKeepOrient, Point* pDocPos )
+ // see SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Point* pDocPos )
SwFlyFrm *pFly = 0;
{
- const SwFrmFmt* pFmtXX = pFmt;
- if (PTR_CAST(SwFlyFrmFmt, pFmtXX))
- pFly = static_cast<const SwFlyFrmFmt*>(pFmtXX)->GetFrm();
+ const SwFrameFormat* pFormatXX = pFormat;
+ if (PTR_CAST(SwFlyFrameFormat, pFormatXX))
+ pFly = static_cast<const SwFlyFrameFormat*>(pFormatXX)->GetFrm();
}
if ( pFly )
{
const :: SfxPoolItem* pItem;
- if( SfxItemState::SET == pFrmFmt->GetItemState( RES_ANCHOR, false, &pItem ))
+ if( SfxItemState::SET == pFrameFormat->GetItemState( RES_ANCHOR, false, &pItem ))
{
- pSet = new SfxItemSet( pDoc->GetAttrPool(), aFrmFmtSetRange );
+ pSet = new SfxItemSet( pDoc->GetAttrPool(), aFrameFormatSetRange );
pSet->Put( *pItem );
- if ( pFmt->GetDoc()->GetEditShell() != NULL
+ if ( pFormat->GetDoc()->GetEditShell() != NULL
&& !sw_ChkAndSetNewAnchor( *pFly, *pSet ) )
delete pSet, pSet = 0;
}
}
}
- pFmt->GetDoc()->SetFrmFmtToFly( *pFmt, *pFrmFmt, pSet, false );
+ pFormat->GetDoc()->SetFrameFormatToFly( *pFormat, *pFrameFormat, pSet, false );
delete pSet;
}
else
@@ -1567,10 +1567,10 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
OUString sGrfName;
OUString sFltName;
GraphicObject *pGrfObj = 0;
- SwDoc::GetGrfNms( *static_cast<SwFlyFrmFmt*>(pFmt), &sGrfName, &sFltName );
+ SwDoc::GetGrfNms( *static_cast<SwFlyFrameFormat*>(pFormat), &sGrfName, &sFltName );
OUString sTmp;
aValue >>= sTmp;
- UnoActionContext aAction(pFmt->GetDoc());
+ UnoActionContext aAction(pFormat->GetDoc());
if(FN_UNO_GRAPHIC_U_R_L == pEntry->nWID)
{
if( sTmp.startsWith(sPackageProtocol) )
@@ -1597,7 +1597,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
sFltName = sTmp;
}
- const :: SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const :: SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
@@ -1608,7 +1608,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
throw uno::RuntimeException();
}
SwPaM aGrfPaM(*pGrfNode);
- pFmt->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, sGrfName, sFltName, 0,
+ pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, sGrfName, sFltName, 0,
pGrfObj );
}
delete pGrfObj;
@@ -1619,7 +1619,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
aValue >>= xGraphic;
if(xGraphic.is())
{
- const :: SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const :: SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
@@ -1630,7 +1630,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
}
SwPaM aGrfPaM(*pGrfNode);
Graphic aGraphic( xGraphic );
- pFmt->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, OUString(), OUString(), &aGraphic, 0 );
+ pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, OUString(), OUString(), &aGraphic, 0 );
}
}
}
@@ -1671,10 +1671,10 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if ( bApply )
{
- const :: SwFmtCntnt* pCnt = &pFmt->GetCntnt();
- if ( pCnt->GetCntntIdx() && pDoc->GetNodes()[ pCnt->GetCntntIdx()->GetIndex() + 1 ] )
+ const :: SwFormatContent* pCnt = &pFormat->GetContent();
+ if ( pCnt->GetContentIdx() && pDoc->GetNodes()[ pCnt->GetContentIdx()->GetIndex() + 1 ] )
{
- SwOLENode* pOleNode = pDoc->GetNodes()[ pCnt->GetCntntIdx()->GetIndex() + 1 ]->GetOLENode();
+ SwOLENode* pOleNode = pDoc->GetNodes()[ pCnt->GetContentIdx()->GetIndex() + 1 ]->GetOLENode();
if ( pOleNode )
{
@@ -1694,11 +1694,11 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if (sChainName.isEmpty())
{
if(bNextFrame)
- pDoc->Unchain(*pFmt);
+ pDoc->Unchain(*pFormat);
else
{
- SwFmtChain aChain( pFmt->GetChain() );
- SwFrmFmt *pPrev = aChain.GetPrev();
+ SwFormatChain aChain( pFormat->GetChain() );
+ SwFrameFormat *pPrev = aChain.GetPrev();
if(pPrev)
pDoc->Unchain(*pPrev);
}
@@ -1707,20 +1707,20 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
{
const size_t nCount = pDoc->GetFlyCount(FLYCNTTYPE_FRM);
- SwFrmFmt* pChain = 0;
+ SwFrameFormat* pChain = 0;
for( size_t i = 0; i < nCount; ++i )
{
- SwFrmFmt* pFmt2 = pDoc->GetFlyNum(i, FLYCNTTYPE_FRM);
- if(sChainName == pFmt2->GetName() )
+ SwFrameFormat* pFormat2 = pDoc->GetFlyNum(i, FLYCNTTYPE_FRM);
+ if(sChainName == pFormat2->GetName() )
{
- pChain = pFmt2;
+ pChain = pFormat2;
break;
}
}
if(pChain)
{
- SwFrmFmt* pSource = bNextFrame ? pFmt : pChain;
- SwFrmFmt* pDest = bNextFrame ? pChain: pFmt;
+ SwFrameFormat* pSource = bNextFrame ? pFormat : pChain;
+ SwFrameFormat* pDest = bNextFrame ? pChain: pFormat;
pDoc->Chain(*pSource, *pDest);
}
}
@@ -1731,11 +1731,11 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
aValue >>= nZOrder;
// Don't set an explicit ZOrder on TextBoxes.
- std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
- if( nZOrder >= 0 && aTextBoxes.find(pFmt) == aTextBoxes.end())
+ std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
+ if( nZOrder >= 0 && aTextBoxes.find(pFormat) == aTextBoxes.end())
{
SdrObject* pObject =
- GetOrCreateSdrObject( static_cast<SwFlyFrmFmt&>(*pFmt) );
+ GetOrCreateSdrObject( static_cast<SwFlyFrameFormat&>(*pFormat) );
SwDrawModel *pDrawModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
pDrawModel->GetPage(0)->
SetObjectOrdNum(pObject->GetOrdNum(), nZOrder);
@@ -1751,18 +1751,18 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
SwXFrame* pFrame = xTunnel.is() ?
reinterpret_cast< SwXFrame * >( sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXFrame::getUnoTunnelId()) ))
: 0;
- if(pFrame && this != pFrame && pFrame->GetFrmFmt() && pFrame->GetFrmFmt()->GetDoc() == pDoc)
+ if(pFrame && this != pFrame && pFrame->GetFrameFormat() && pFrame->GetFrameFormat()->GetDoc() == pDoc)
{
SfxItemSet aSet( pDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END - 1 );
- aSet.SetParent(&pFmt->GetAttrSet());
- SwFmtAnchor aAnchor = static_cast<const SwFmtAnchor&>(aSet.Get(pEntry->nWID));
+ aSet.SetParent(&pFormat->GetAttrSet());
+ SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aSet.Get(pEntry->nWID));
- SwPosition aPos(*pFrame->GetFrmFmt()->GetCntnt().GetCntntIdx());
+ SwPosition aPos(*pFrame->GetFrameFormat()->GetContent().GetContentIdx());
aAnchor.SetAnchor(&aPos);
aAnchor.SetType(FLY_AT_FLY);
aSet.Put(aAnchor);
- pDoc->SetFlyFrmAttr( *pFmt, aSet );
+ pDoc->SetFlyFrmAttr( *pFormat, aSet );
bDone = true;
}
}
@@ -1783,11 +1783,11 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
0L);
bool bDone(false);
- aSet.SetParent(&pFmt->GetAttrSet());
+ aSet.SetParent(&pFormat->GetAttrSet());
if(RES_BACKGROUND == pEntry->nWID)
{
- const SwAttrSet& rSet = pFmt->GetAttrSet();
+ const SwAttrSet& rSet = pFormat->GetAttrSet();
const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND));
SvxBrushItem aChangedBrushItem(aOriginalBrushItem);
@@ -1796,7 +1796,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if(!(aChangedBrushItem == aOriginalBrushItem))
{
setSvxBrushItemAsFillAttributesToTargetSet(aChangedBrushItem, aSet);
- pFmt->GetDoc()->SetFlyFrmAttr( *pFmt, aSet );
+ pFormat->GetDoc()->SetFlyFrmAttr( *pFormat, aSet );
}
bDone = true;
@@ -1820,7 +1820,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
aSet.Put(XFillBmpStretchItem(drawing::BitmapMode_STRETCH == eMode));
aSet.Put(XFillBmpTileItem(drawing::BitmapMode_REPEAT == eMode));
- pFmt->GetDoc()->SetFlyFrmAttr( *pFmt, aSet );
+ pFormat->GetDoc()->SetFlyFrmAttr( *pFormat, aSet );
bDone = true;
}
@@ -1889,12 +1889,12 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORTYPE == nMemberId)
{
- SwFmtAnchor aAnchor = static_cast<const SwFmtAnchor&>(aSet.Get(pEntry->nWID));
+ SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aSet.Get(pEntry->nWID));
if(aAnchor.GetAnchorId() == FLY_AT_FLY)
{
- const :: SwPosition* pPosition = aAnchor.GetCntntAnchor();
- SwFrmFmt* pFlyFmt = pPosition ? pPosition->nNode.GetNode().GetFlyFmt() : 0;
- if(!pFlyFmt || pFlyFmt->Which() == RES_DRAWFRMFMT)
+ const :: SwPosition* pPosition = aAnchor.GetContentAnchor();
+ SwFrameFormat* pFlyFormat = pPosition ? pPosition->nNode.GetNode().GetFlyFormat() : 0;
+ if(!pFlyFormat || pFlyFormat->Which() == RES_DRAWFRMFMT)
{
lang::IllegalArgumentException aExcept;
aExcept.Message = "Anchor to frame: no frame found";
@@ -1903,13 +1903,13 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
else
{
SwPosition aPos = *pPosition;
- aPos.nNode = *pFlyFmt->GetCntnt().GetCntntIdx();
+ aPos.nNode = *pFlyFormat->GetContent().GetContentIdx();
aAnchor.SetAnchor(&aPos);
aSet.Put(aAnchor);
}
}
else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) &&
- !aAnchor.GetCntntAnchor())
+ !aAnchor.GetContentAnchor())
{
SwNode& rNode = pDoc->GetNodes().GetEndOfContent();
SwPaM aPam(rNode);
@@ -1921,19 +1921,19 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
// #i31771#, #i25798# - No adjustment of
// anchor ( no call of method <sw_ChkAndSetNewAnchor(..)> ),
// if document is currently in reading mode.
- if ( !pFmt->GetDoc()->IsInReading() )
+ if ( !pFormat->GetDoc()->IsInReading() )
{
// see SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet )
SwFlyFrm *pFly = 0;
- if (PTR_CAST(SwFlyFrmFmt, pFmt))
- pFly = static_cast<SwFlyFrmFmt*>(pFmt)->GetFrm();
+ if (PTR_CAST(SwFlyFrameFormat, pFormat))
+ pFly = static_cast<SwFlyFrameFormat*>(pFormat)->GetFrm();
if (pFly)
{
const :: SfxPoolItem* pItem;
if( SfxItemState::SET == aSet.GetItemState( RES_ANCHOR, false, &pItem ))
{
aSet.Put( *pItem );
- if ( pFmt->GetDoc()->GetEditShell() != NULL )
+ if ( pFormat->GetDoc()->GetEditShell() != NULL )
{
sw_ChkAndSetNewAnchor( *pFly, aSet );
}
@@ -1941,7 +1941,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
}
}
- pFmt->GetDoc()->SetFlyFrmAttr( *pFmt, aSet );
+ pFormat->GetDoc()->SetFlyFrmAttr( *pFormat, aSet );
}
else if(FN_UNO_CLSID == pEntry->nWID || FN_UNO_STREAM_NAME == pEntry->nWID || FN_EMBEDDED_OBJECT == pEntry->nWID)
{
@@ -1949,7 +1949,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
}
else
{
- pFmt->SetFmtAttr(aSet);
+ pFormat->SetFormatAttr(aSet);
}
}
}
@@ -1985,7 +1985,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
{
SolarMutexGuard aGuard;
uno::Any aAny;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -2004,7 +2004,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
pArray[4] = text::TextContentAnchorType_AT_CHARACTER;
aAny.setValue(&aTypes, cppu::UnoType<uno::Sequence<text::TextContentAnchorType>>::get());
}
- else if(pFmt)
+ else if(pFormat)
{
if( ((eType == FLYCNTTYPE_GRF) || (eType == FLYCNTTYPE_OLE)) &&
(isGRFATR(pEntry->nWID) ||
@@ -2012,15 +2012,15 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
pEntry->nWID == FN_UNO_IS_AUTOMATIC_CONTOUR ||
pEntry->nWID == FN_UNO_IS_PIXEL_CONTOUR ))
{
- const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
- SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
+ SwNoTextNode* pNoText = aIdx.GetNode().GetNoTextNode();
if(pEntry->nWID == FN_PARAM_COUNTOUR_PP)
{
tools::PolyPolygon aContour;
- if( pNoTxt->GetContourAPI( aContour ) )
+ if( pNoText->GetContourAPI( aContour ) )
{
drawing::PointSequenceSequence aPtSeq(aContour.Count());
drawing::PointSequence* pPSeq = aPtSeq.getArray();
@@ -2041,15 +2041,15 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
else if(pEntry->nWID == FN_UNO_IS_AUTOMATIC_CONTOUR )
{
- aAny <<= pNoTxt->HasAutomaticContour();
+ aAny <<= pNoText->HasAutomaticContour();
}
else if(pEntry->nWID == FN_UNO_IS_PIXEL_CONTOUR )
{
- aAny <<= pNoTxt->IsPixelContour();
+ aAny <<= pNoText->IsPixelContour();
}
else
{
- SfxItemSet aSet(pNoTxt->GetSwAttrSet());
+ SfxItemSet aSet(pNoText->GetSwAttrSet());
m_pPropSet->getPropertyValue(*pEntry, aSet, aAny);
}
}
@@ -2057,7 +2057,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
else if( FN_UNO_GRAPHIC_U_R_L == pEntry->nWID)
{
OUString sGrfName;
- const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
@@ -2066,7 +2066,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
throw uno::RuntimeException();
if( pGrfNode->IsGrfLink() )
{
- SwDoc::GetGrfNms( *static_cast<SwFlyFrmFmt*>(pFmt), &sGrfName, 0 );
+ SwDoc::GetGrfNms( *static_cast<SwFlyFrameFormat*>(pFormat), &sGrfName, 0 );
}
else
{
@@ -2081,7 +2081,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
else if( FN_UNO_REPLACEMENT_GRAPHIC_U_R_L == pEntry->nWID)
{
OUString sGrfName;
- const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
@@ -2104,12 +2104,12 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
else if( FN_UNO_GRAPHIC_FILTER == pEntry->nWID )
{
OUString sFltName;
- SwDoc::GetGrfNms( *static_cast<SwFlyFrmFmt*>(pFmt), 0, &sFltName );
+ SwDoc::GetGrfNms( *static_cast<SwFlyFrameFormat*>(pFormat), 0, &sFltName );
aAny <<= sFltName;
}
else if( FN_UNO_GRAPHIC == pEntry->nWID )
{
- const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
@@ -2121,32 +2121,32 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
else if(FN_UNO_FRAME_STYLE_NAME == pEntry->nWID)
{
- aAny <<= OUString(SwStyleNameMapper::GetProgName(pFmt->DerivedFrom()->GetName(), nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ) );
+ aAny <<= OUString(SwStyleNameMapper::GetProgName(pFormat->DerivedFrom()->GetName(), nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ) );
}
// #i73249#
else if( FN_UNO_TITLE == pEntry->nWID )
{
- SwFlyFrmFmt& rFlyFmt = dynamic_cast<SwFlyFrmFmt&>(*pFmt);
+ SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat);
// assure that <SdrObject> instance exists.
- GetOrCreateSdrObject(rFlyFmt);
- aAny <<= OUString(rFlyFmt.GetObjTitle());
+ GetOrCreateSdrObject(rFlyFormat);
+ aAny <<= OUString(rFlyFormat.GetObjTitle());
}
// New attribute Description
else if( FN_UNO_DESCRIPTION == pEntry->nWID )
{
- SwFlyFrmFmt& rFlyFmt = dynamic_cast<SwFlyFrmFmt&>(*pFmt);
+ SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat);
// assure that <SdrObject> instance exists.
- GetOrCreateSdrObject(rFlyFmt);
- aAny <<= OUString(rFlyFmt.GetObjDescription());
+ GetOrCreateSdrObject(rFlyFormat);
+ aAny <<= OUString(rFlyFormat.GetObjDescription());
}
else if(eType == FLYCNTTYPE_GRF &&
(rPropertyName == UNO_NAME_ACTUAL_SIZE))
{
- const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
- Size aActSize = aIdx.GetNode().GetNoTxtNode()->GetTwipSize();
+ Size aActSize = aIdx.GetNode().GetNoTextNode()->GetTwipSize();
awt::Size aTmp;
aTmp.Width = convertTwipToMm100(aActSize.Width());
aTmp.Height = convertTwipToMm100(aActSize.Height());
@@ -2155,13 +2155,13 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
else if(FN_PARAM_LINK_DISPLAY_NAME == pEntry->nWID)
{
- aAny <<= pFmt->GetName();
+ aAny <<= pFormat->GetName();
}
else if(FN_UNO_Z_ORDER == pEntry->nWID)
{
- const SdrObject* pObj = pFmt->FindRealSdrObject();
+ const SdrObject* pObj = pFormat->FindRealSdrObject();
if( pObj == NULL )
- pObj = pFmt->FindSdrObject();
+ pObj = pFormat->FindSdrObject();
if( pObj )
{
aAny <<= (sal_Int32)pObj->GetOrdNum();
@@ -2171,13 +2171,13 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
FN_UNO_COMPONENT == pEntry->nWID ||FN_UNO_STREAM_NAME == pEntry->nWID||
FN_EMBEDDED_OBJECT == pEntry->nWID)
{
- SwDoc* pDoc = pFmt->GetDoc();
- const SwFmtCntnt* pCnt = &pFmt->GetCntnt();
- OSL_ENSURE( pCnt->GetCntntIdx() &&
- pDoc->GetNodes()[ pCnt->GetCntntIdx()->
+ SwDoc* pDoc = pFormat->GetDoc();
+ const SwFormatContent* pCnt = &pFormat->GetContent();
+ OSL_ENSURE( pCnt->GetContentIdx() &&
+ pDoc->GetNodes()[ pCnt->GetContentIdx()->
GetIndex() + 1 ]->GetOLENode(), "kein OLE-Node?");
- SwOLENode* pOleNode = pDoc->GetNodes()[ pCnt->GetCntntIdx()
+ SwOLENode* pOleNode = pDoc->GetNodes()[ pCnt->GetContentIdx()
->GetIndex() + 1 ]->GetOLENode();
uno::Reference < embed::XEmbeddedObject > xIP = pOleNode->GetOLEObj().GetOleRef();
OUString aHexCLSID;
@@ -2220,9 +2220,9 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
else if(WID_LAYOUT_SIZE == pEntry->nWID)
{
// format document completely in order to get correct value
- pFmt->GetDoc()->GetEditShell()->CalcLayout();
+ pFormat->GetDoc()->GetEditShell()->CalcLayout();
- SwFrm* pTmpFrm = SwIterator<SwFrm,SwFmt>( *pFmt ).First();
+ SwFrm* pTmpFrm = SwIterator<SwFrm,SwFormat>( *pFormat ).First();
if ( pTmpFrm )
{
OSL_ENSURE( pTmpFrm->IsValid(), "frame not valid" );
@@ -2237,7 +2237,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
{ //UUUU
// standard UNO API read attributes
// adapt former attr from SvxBrushItem::PutValue to new items XATTR_FILL_FIRST, XATTR_FILL_LAST
- const SwAttrSet& rSet = pFmt->GetAttrSet();
+ const SwAttrSet& rSet = pFormat->GetAttrSet();
bool bDone(false);
if(RES_BACKGROUND == pEntry->nWID)
@@ -2324,7 +2324,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
if(bDoIt)
{
- const SwDoc* pDoc = (IsDescriptor() ? m_pDoc : GetFrmFmt()->GetDoc());
+ const SwDoc* pDoc = (IsDescriptor() ? m_pDoc : GetFrameFormat()->GetDoc());
const SfxItemPool& rPool = pDoc->GetAttrPool();
const SfxMapUnit eMapUnit(rPool.GetMetric(pEntry->nWID));
@@ -2384,11 +2384,11 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
SolarMutexGuard aGuard;
uno::Sequence< beans::PropertyState > aStates(aPropertyNames.getLength());
beans::PropertyState* pStates = aStates.getArray();
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
const OUString* pNames = aPropertyNames.getConstArray();
- const SwAttrSet& rFmtSet = pFmt->GetAttrSet();
+ const SwAttrSet& rFormatSet = pFormat->GetAttrSet();
for(int i = 0; i < aPropertyNames.getLength(); i++)
{
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(pNames[i]);
@@ -2408,8 +2408,8 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
else if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
{
//UUUU
- if(SfxItemState::SET == rFmtSet.GetItemState(XATTR_FILLBMP_STRETCH, false)
- || SfxItemState::SET == rFmtSet.GetItemState(XATTR_FILLBMP_TILE, false))
+ if(SfxItemState::SET == rFormatSet.GetItemState(XATTR_FILLBMP_STRETCH, false)
+ || SfxItemState::SET == rFormatSet.GetItemState(XATTR_FILLBMP_TILE, false))
{
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
@@ -2424,7 +2424,7 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
// fill attributes to the according SvxBrushItem entries
else if (RES_BACKGROUND == pEntry->nWID)
{
- if (SWUnoHelper::needToMapFillItemsToSvxBrushItemTypes(rFmtSet, pEntry->nMemberId))
+ if (SWUnoHelper::needToMapFillItemsToSvxBrushItemTypes(rFormatSet, pEntry->nMemberId))
pStates[i] = beans::PropertyState_DIRECT_VALUE;
else
pStates[i] = beans::PropertyState_DEFAULT_VALUE;
@@ -2433,12 +2433,12 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
{
if ((eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID))
{
- const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
- SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
- SfxItemSet aSet(pNoTxt->GetSwAttrSet());
+ SwNoTextNode* pNoText = aIdx.GetNode().GetNoTextNode();
+ SfxItemSet aSet(pNoText->GetSwAttrSet());
aSet.GetItemState(pEntry->nWID);
if(SfxItemState::SET == aSet.GetItemState( pEntry->nWID, false ))
pStates[i] = beans::PropertyState_DIRECT_VALUE;
@@ -2446,7 +2446,7 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
}
else
{
- if(SfxItemState::SET == rFmtSet.GetItemState( pEntry->nWID, false ))
+ if(SfxItemState::SET == rFormatSet.GetItemState( pEntry->nWID, false ))
pStates[i] = beans::PropertyState_DIRECT_VALUE;
else
pStates[i] = beans::PropertyState_DEFAULT_VALUE;
@@ -2468,8 +2468,8 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
@@ -2481,14 +2481,14 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
{
//UUUU
- SwDoc* pDoc = pFmt->GetDoc();
+ SwDoc* pDoc = pFormat->GetDoc();
SfxItemSet aSet(pDoc->GetAttrPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
- aSet.SetParent(&pFmt->GetAttrSet());
+ aSet.SetParent(&pFormat->GetAttrSet());
aSet.ClearItem(XATTR_FILLBMP_STRETCH);
aSet.ClearItem(XATTR_FILLBMP_TILE);
- pFmt->SetFmtAttr(aSet);
+ pFormat->SetFormatAttr(aSet);
}
else if( pEntry->nWID &&
pEntry->nWID != FN_UNO_ANCHOR_TYPES &&
@@ -2496,55 +2496,55 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
{
if ( (eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID) )
{
- const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
- SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
+ SwNoTextNode* pNoText = aIdx.GetNode().GetNoTextNode();
{
- SfxItemSet aSet(pNoTxt->GetSwAttrSet());
+ SfxItemSet aSet(pNoText->GetSwAttrSet());
aSet.ClearItem(pEntry->nWID);
- pNoTxt->SetAttr(aSet);
+ pNoText->SetAttr(aSet);
}
}
}
// #i73249#
else if( FN_UNO_TITLE == pEntry->nWID )
{
- SwFlyFrmFmt& rFlyFmt = dynamic_cast<SwFlyFrmFmt&>(*pFmt);
+ SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat);
// assure that <SdrObject> instance exists.
- GetOrCreateSdrObject(rFlyFmt);
- rFlyFmt.GetDoc()->SetFlyFrmTitle(rFlyFmt, aEmptyOUStr);
+ GetOrCreateSdrObject(rFlyFormat);
+ rFlyFormat.GetDoc()->SetFlyFrmTitle(rFlyFormat, aEmptyOUStr);
}
// New attribute Description
else if( FN_UNO_DESCRIPTION == pEntry->nWID )
{
- SwFlyFrmFmt& rFlyFmt = dynamic_cast<SwFlyFrmFmt&>(*pFmt);
+ SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat);
// assure that <SdrObject> instance exists.
- GetOrCreateSdrObject(rFlyFmt);
- rFlyFmt.GetDoc()->SetFlyFrmDescription(rFlyFmt, aEmptyOUStr);
+ GetOrCreateSdrObject(rFlyFormat);
+ rFlyFormat.GetDoc()->SetFlyFrmDescription(rFlyFormat, aEmptyOUStr);
}
else
{
- SwDoc* pDoc = pFmt->GetDoc();
+ SwDoc* pDoc = pFormat->GetDoc();
SfxItemSet aSet( pDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END - 1 );
- aSet.SetParent(&pFmt->GetAttrSet());
+ aSet.SetParent(&pFormat->GetAttrSet());
aSet.ClearItem(pEntry->nWID);
if(rPropertyName != UNO_NAME_ANCHOR_TYPE)
- pFmt->SetFmtAttr(aSet);
+ pFormat->SetFormatAttr(aSet);
}
}
else if((bNextFrame = (rPropertyName == UNO_NAME_CHAIN_NEXT_NAME))
|| rPropertyName == UNO_NAME_CHAIN_PREV_NAME)
{
- SwDoc* pDoc = pFmt->GetDoc();
+ SwDoc* pDoc = pFormat->GetDoc();
if(bNextFrame)
- pDoc->Unchain(*pFmt);
+ pDoc->Unchain(*pFormat);
else
{
- SwFmtChain aChain( pFmt->GetChain() );
- SwFrmFmt *pPrev = aChain.GetPrev();
+ SwFormatChain aChain( pFormat->GetChain() );
+ SwFrameFormat *pPrev = aChain.GetPrev();
if(pPrev)
pDoc->Unchain(*pPrev);
}
@@ -2560,8 +2560,8 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName )
{
SolarMutexGuard aGuard;
uno::Any aRet;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
if(pEntry)
@@ -2569,7 +2569,7 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName )
if ( pEntry->nWID < RES_FRMATR_END )
{
const SfxPoolItem& rDefItem =
- pFmt->GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
+ pFormat->GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
//UUUU
const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
@@ -2622,10 +2622,10 @@ void SwXFrame::Modify(const SfxPoolItem* pOld, const SfxPoolItem *pNew)
void SwXFrame::dispose() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
- if ( pFmt )
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if ( pFormat )
{
- SdrObject* pObj = pFmt->FindSdrObject();
+ SdrObject* pObj = pFormat->FindSdrObject();
// OD 11.09.2003 #112039# - add condition to perform delete of
// format/anchor sign, not only if the object is inserted, but also
// if a contact object is registered, which isn't in the destruction.
@@ -2634,15 +2634,15 @@ void SwXFrame::dispose() throw( uno::RuntimeException, std::exception )
( pObj->GetUserCall() &&
!static_cast<SwContact*>(pObj->GetUserCall())->IsInDTOR() ) ) )
{
- if (pFmt->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
+ if (pFormat->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
{
- const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor());
- SwTxtNode *pTxtNode = rPos.nNode.GetNode().GetTxtNode();
+ const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
+ SwTextNode *pTextNode = rPos.nNode.GetNode().GetTextNode();
const sal_Int32 nIdx = rPos.nContent.GetIndex();
- pTxtNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx, nIdx );
+ pTextNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx, nIdx );
}
else
- pFmt->GetDoc()->getIDocumentLayoutAccess().DelLayoutFmt(pFmt);
+ pFormat->GetDoc()->getIDocumentLayoutAccess().DelLayoutFormat(pFormat);
}
}
@@ -2652,17 +2652,17 @@ uno::Reference< text::XTextRange > SwXFrame::getAnchor() throw( uno::RuntimeExc
{
SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > aRef;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
+ const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
// return an anchor for non-page bound frames
// and for page bound frames that have a page no == NULL and a content position
if ((rAnchor.GetAnchorId() != FLY_AT_PAGE) ||
- (rAnchor.GetCntntAnchor() && !rAnchor.GetPageNum()))
+ (rAnchor.GetContentAnchor() && !rAnchor.GetPageNum()))
{
- const SwPosition &rPos = *(rAnchor.GetCntntAnchor());
- aRef = SwXTextRange::CreateXTextRange(*pFmt->GetDoc(), rPos, 0);
+ const SwPosition &rPos = *(rAnchor.GetContentAnchor());
+ aRef = SwXTextRange::CreateXTextRange(*pFormat->GetDoc(), rPos, 0);
}
}
else
@@ -2726,7 +2726,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
SfxItemSet aFrmSet(pDoc->GetAttrPool(), aFrmAttrRange );
//UUUU set correct parent to get the XFILL_NONE FillStyle as needed
- aFrmSet.SetParent(&pDoc->GetDfltFrmFmt()->GetAttrSet());
+ aFrmSet.SetParent(&pDoc->GetDfltFrameFormat()->GetAttrSet());
// no the related items need to be added to the set
bool bSizeFound;
@@ -2744,72 +2744,72 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
RndStdIds eAnchorId = FLY_AT_PARA;
if(SfxItemState::SET == aFrmSet.GetItemState(RES_ANCHOR, false, &pItem) )
{
- eAnchorId = static_cast<const SwFmtAnchor*>(pItem)->GetAnchorId();
+ eAnchorId = static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId();
if( FLY_AT_FLY == eAnchorId &&
!aPam.GetNode().FindFlyStartNode())
{
// framebound only where a frame exists
- SwFmtAnchor aAnchor(FLY_AT_PARA);
+ SwFormatAnchor aAnchor(FLY_AT_PARA);
aFrmSet.Put(aAnchor);
}
else if ((FLY_AT_PAGE == eAnchorId) &&
- 0 == static_cast<const SwFmtAnchor*>(pItem)->GetPageNum() )
+ 0 == static_cast<const SwFormatAnchor*>(pItem)->GetPageNum() )
{
- SwFmtAnchor aAnchor( *static_cast<const SwFmtAnchor*>(pItem) );
+ SwFormatAnchor aAnchor( *static_cast<const SwFormatAnchor*>(pItem) );
aAnchor.SetAnchor( aPam.GetPoint() );
aFrmSet.Put(aAnchor);
}
}
const ::uno::Any* pStyle;
- SwFrmFmt *pParentFrmFmt = 0;
+ SwFrameFormat *pParentFrameFormat = 0;
if(pProps->GetProperty(FN_UNO_FRAME_STYLE_NAME, 0, pStyle))
- pParentFrmFmt = lcl_GetFrmFmt( *pStyle, pDoc );
+ pParentFrameFormat = lcl_GetFrameFormat( *pStyle, pDoc );
- SwFlyFrmFmt* pFmt = 0;
+ SwFlyFrameFormat* pFormat = 0;
if( eType == FLYCNTTYPE_FRM)
{
UnoActionContext aCont(pDoc);
if(m_pCopySource)
{
- SwFmtAnchor* pAnchorItem = 0;
+ SwFormatAnchor* pAnchorItem = 0;
// the frame is inserted bound to page
// to prevent conflicts if the to-be-anchored position is part of the to-be-copied text
if (eAnchorId != FLY_AT_PAGE)
{
- pAnchorItem = static_cast<SwFmtAnchor*>(aFrmSet.Get(RES_ANCHOR).Clone());
- aFrmSet.Put( SwFmtAnchor( FLY_AT_PAGE, 1 ));
+ pAnchorItem = static_cast<SwFormatAnchor*>(aFrmSet.Get(RES_ANCHOR).Clone());
+ aFrmSet.Put( SwFormatAnchor( FLY_AT_PAGE, 1 ));
}
aPam.DeleteMark(); // mark position node will be deleted!
aIntPam.DeleteMark(); // mark position node will be deleted!
- pFmt = pDoc->MakeFlyAndMove( *m_pCopySource, aFrmSet,
+ pFormat = pDoc->MakeFlyAndMove( *m_pCopySource, aFrmSet,
0,
- pParentFrmFmt );
- if(pAnchorItem && pFmt)
+ pParentFrameFormat );
+ if(pAnchorItem && pFormat)
{
- pFmt->DelFrms();
+ pFormat->DelFrms();
pAnchorItem->SetAnchor( m_pCopySource->Start() );
SfxItemSet aAnchorSet( pDoc->GetAttrPool(), RES_ANCHOR, RES_ANCHOR );
aAnchorSet.Put( *pAnchorItem );
- pDoc->SetFlyFrmAttr( *pFmt, aAnchorSet );
+ pDoc->SetFlyFrmAttr( *pFormat, aAnchorSet );
delete pAnchorItem;
}
DELETEZ( m_pCopySource );
}
else
{
- pFmt = pDoc->MakeFlySection( FLY_AT_PARA, aPam.GetPoint(),
- &aFrmSet, pParentFrmFmt );
+ pFormat = pDoc->MakeFlySection( FLY_AT_PARA, aPam.GetPoint(),
+ &aFrmSet, pParentFrameFormat );
}
- if(pFmt)
+ if(pFormat)
{
- pFmt->Add(this);
+ pFormat->Add(this);
if(!m_sName.isEmpty())
- pDoc->SetFlyName((SwFlyFrmFmt&)*pFmt, m_sName);
+ pDoc->SetFlyName((SwFlyFrameFormat&)*pFormat, m_sName);
}
// wake up the SwXTextFrame
- static_cast<SwXTextFrame*>(this)->SetDoc( bIsDescriptor ? m_pDoc : GetFrmFmt()->GetDoc() );
+ static_cast<SwXTextFrame*>(this)->SetDoc( bIsDescriptor ? m_pDoc : GetFrameFormat()->GetDoc() );
}
else if( eType == FLYCNTTYPE_GRF)
{
@@ -2851,21 +2851,21 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
(*pFilter) >>= sFltName;
}
- pFmt =
+ pFormat =
pGrfObj ? pDoc->getIDocumentContentOperations().Insert( aPam, *pGrfObj, &aFrmSet, &aGrSet,
- pParentFrmFmt )
+ pParentFrameFormat )
: pDoc->getIDocumentContentOperations().Insert( aPam, sGraphicURL, sFltName, &aGraphic,
- &aFrmSet, &aGrSet, pParentFrmFmt );
+ &aFrmSet, &aGrSet, pParentFrameFormat );
delete pGrfObj;
- if(pFmt)
+ if(pFormat)
{
- SwGrfNode *pGrfNd = pDoc->GetNodes()[ pFmt->GetCntnt().GetCntntIdx()
+ SwGrfNode *pGrfNd = pDoc->GetNodes()[ pFormat->GetContent().GetContentIdx()
->GetIndex()+1 ]->GetGrfNode();
if (pGrfNd)
pGrfNd->SetChgTwipSize( !bSizeFound );
- pFmt->Add(this);
+ pFormat->Add(this);
if(!m_sName.isEmpty())
- pDoc->SetFlyName((SwFlyFrmFmt&)*pFmt, m_sName);
+ pDoc->SetFlyName((SwFlyFrameFormat&)*pFormat, m_sName);
}
const ::uno::Any* pSurroundContour;
@@ -2950,22 +2950,22 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
}
MapMode aMyMap( MAP_TWIP );
aSz = OutputDevice::LogicToLogic( aSz, aRefMap, aMyMap );
- SwFmtFrmSize aFrmSz;
+ SwFormatFrmSize aFrmSz;
aFrmSz.SetSize(aSz);
aFrmSet.Put(aFrmSz);
}
- SwFlyFrmFmt* pFmt2 = 0;
+ SwFlyFrameFormat* pFormat2 = 0;
// TODO/LATER: Is it the only possible aspect here?
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
::svt::EmbeddedObjectRef xObjRef( xIPObj, nAspect );
- pFmt2 = pDoc->getIDocumentContentOperations().Insert(aPam, xObjRef, &aFrmSet, NULL, NULL );
- assert(pFmt2 && "Doc->Insert(notxt) failed.");
+ pFormat2 = pDoc->getIDocumentContentOperations().Insert(aPam, xObjRef, &aFrmSet, NULL, NULL );
+ assert(pFormat2 && "Doc->Insert(notxt) failed.");
pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
- pFmt2->Add(this);
+ pFormat2->Add(this);
if(!m_sName.isEmpty())
- pDoc->SetFlyName((SwFlyFrmFmt&)*pFmt2, m_sName);
+ pDoc->SetFlyName((SwFlyFrameFormat&)*pFormat2, m_sName);
}
}
else if( pStreamName )
@@ -2974,12 +2974,12 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
(*pStreamName) >>= sStreamName;
pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
- SwFlyFrmFmt* pFrmFmt = 0;
- pFrmFmt = pDoc->getIDocumentContentOperations().InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrmSet, NULL, NULL );
+ SwFlyFrameFormat* pFrameFormat = 0;
+ pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrmSet, NULL, NULL );
pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
- pFrmFmt->Add(this);
+ pFrameFormat->Add(this);
if(!m_sName.isEmpty())
- pDoc->SetFlyName((SwFlyFrmFmt&)*pFrmFmt, m_sName);
+ pDoc->SetFlyName((SwFlyFrameFormat&)*pFrameFormat, m_sName);
}
else if( pEmbeddedObject || pStreamName )
{
@@ -3000,16 +3000,16 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
OUString rName;
mrPers.GetEmbeddedObjectContainer().InsertEmbeddedObject( obj, rName );
- SwFlyFrmFmt* pFrmFmt = 0;
- pFrmFmt = pDoc->getIDocumentContentOperations().Insert( aPam, xObj, &aFrmSet, NULL, NULL );
+ SwFlyFrameFormat* pFrameFormat = 0;
+ pFrameFormat = pDoc->getIDocumentContentOperations().Insert( aPam, xObj, &aFrmSet, NULL, NULL );
pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
- pFrmFmt->Add(this);
+ pFrameFormat->Add(this);
if(!m_sName.isEmpty())
- pDoc->SetFlyName((SwFlyFrmFmt&)*pFrmFmt, m_sName);
+ pDoc->SetFlyName((SwFlyFrameFormat&)*pFrameFormat, m_sName);
}
}
- if( pFmt && pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
- GetOrCreateSdrObject(*pFmt);
+ if( pFormat && pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
+ GetOrCreateSdrObject(*pFormat);
const ::uno::Any* pOrder;
if( pProps->GetProperty(FN_UNO_Z_ORDER, 0, pOrder) )
setPropertyValue(UNO_NAME_Z_ORDER, *pOrder);
@@ -3045,22 +3045,22 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
- SwFrmFmt* pFmt;
+ SwFrameFormat* pFormat;
if(IsDescriptor())
attachToRange(xTextRange);
- else if(0 != (pFmt = GetFrmFmt()))
+ else if(0 != (pFormat = GetFrameFormat()))
{
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwDoc* pDoc = pFmt->GetDoc();
+ SwDoc* pDoc = pFormat->GetDoc();
SwUnoInternalPaM aIntPam(*pDoc);
if (::sw::XTextRangeToSwPaM(aIntPam, xTextRange))
{
SfxItemSet aSet( pDoc->GetAttrPool(), RES_ANCHOR, RES_ANCHOR );
- aSet.SetParent(&pFmt->GetAttrSet());
- SwFmtAnchor aAnchor = static_cast<const SwFmtAnchor&>(aSet.Get(RES_ANCHOR));
+ aSet.SetParent(&pFormat->GetAttrSet());
+ SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR));
aAnchor.SetAnchor( aIntPam.Start() );
aSet.Put(aAnchor);
- pDoc->SetFlyFrmAttr( *pFmt, aSet );
+ pDoc->SetFlyFrmAttr( *pFormat, aSet );
}
else
throw lang::IllegalArgumentException();
@@ -3108,9 +3108,9 @@ SwXTextFrame::SwXTextFrame( SwDoc *_pDoc ) :
{
}
-SwXTextFrame::SwXTextFrame(SwFrmFmt& rFmt) :
- SwXText(rFmt.GetDoc(), CURSOR_FRAME),
- SwXFrame(rFmt, FLYCNTTYPE_FRM, aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_FRAME))
+SwXTextFrame::SwXTextFrame(SwFrameFormat& rFormat) :
+ SwXText(rFormat.GetDoc(), CURSOR_FRAME),
+ SwXFrame(rFormat, FLYCNTTYPE_FRM, aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_FRAME))
{
}
@@ -3120,9 +3120,9 @@ SwXTextFrame::~SwXTextFrame()
}
uno::Reference<text::XTextFrame>
-SwXTextFrame::CreateXTextFrame(SwDoc & rDoc, SwFrmFmt *const pFrmFmt)
+SwXTextFrame::CreateXTextFrame(SwDoc & rDoc, SwFrameFormat *const pFrameFormat)
{
- return CreateXFrame<text::XTextFrame, SwXTextFrame>(rDoc, pFrmFmt);
+ return CreateXFrame<text::XTextFrame, SwXTextFrame>(rDoc, pFrameFormat);
}
void SAL_CALL SwXTextFrame::acquire( )throw()
@@ -3185,12 +3185,12 @@ const SwStartNode *SwXTextFrame::GetStartNode() const
{
const SwStartNode *pSttNd = 0;
- const SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ const SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- const SwFmtCntnt& rFlyCntnt = pFmt->GetCntnt();
- if( rFlyCntnt.GetCntntIdx() )
- pSttNd = rFlyCntnt.GetCntntIdx()->GetNode().GetStartNode();
+ const SwFormatContent& rFlyContent = pFormat->GetContent();
+ if( rFlyContent.GetContentIdx() )
+ pSttNd = rFlyContent.GetContentIdx()->GetNode().GetStartNode();
}
return pSttNd;
@@ -3206,23 +3206,23 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor() throw( uno
{
SolarMutexGuard aGuard;
uno::Reference< text::XTextCursor > aRef;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
//save current start node to be able to check if there is content after the table -
//otherwise the cursor would be in the body text!
- const SwNode& rNode = pFmt->GetCntnt().GetCntntIdx()->GetNode();
+ const SwNode& rNode = pFormat->GetContent().GetContentIdx()->GetNode();
const SwStartNode* pOwnStartNode = rNode.FindSttNodeByType(SwFlyStartNode);
SwPaM aPam(rNode);
aPam.Move(fnMoveForward, fnGoNode);
- SwTableNode* pTblNode = aPam.GetNode().FindTableNode();
- SwCntntNode* pCont = 0;
- while( pTblNode )
+ SwTableNode* pTableNode = aPam.GetNode().FindTableNode();
+ SwContentNode* pCont = 0;
+ while( pTableNode )
{
- aPam.GetPoint()->nNode = *pTblNode->EndOfSectionNode();
+ aPam.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
pCont = GetDoc()->GetNodes().GoNext(&aPam.GetPoint()->nNode);
- pTblNode = pCont->FindTableNode();
+ pTableNode = pCont->FindTableNode();
}
if(pCont)
aPam.GetPoint()->nContent.Assign(pCont, 0);
@@ -3237,7 +3237,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor() throw( uno
}
SwXTextCursor *const pXCursor = new SwXTextCursor(
- *pFmt->GetDoc(), this, CURSOR_FRAME, *aPam.GetPoint());
+ *pFormat->GetDoc(), this, CURSOR_FRAME, *aPam.GetPoint());
aRef = static_cast<text::XWordCursor*>(pXCursor);
#if OSL_DEBUG_LEVEL > 1
SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor();
@@ -3253,15 +3253,15 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursorByRange(const
{
SolarMutexGuard aGuard;
uno::Reference< text::XTextCursor > aRef;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
SwUnoInternalPaM aPam(*GetDoc());
- if (pFmt && ::sw::XTextRangeToSwPaM(aPam, aTextPosition))
+ if (pFormat && ::sw::XTextRangeToSwPaM(aPam, aTextPosition))
{
- SwNode& rNode = pFmt->GetCntnt().GetCntntIdx()->GetNode();
+ SwNode& rNode = pFormat->GetContent().GetContentIdx()->GetNode();
if(aPam.GetNode().FindFlyStartNode() == rNode.FindFlyStartNode())
{
aRef = static_cast<text::XWordCursor*>(
- new SwXTextCursor(*pFmt->GetDoc(), this, CURSOR_FRAME,
+ new SwXTextCursor(*pFormat->GetDoc(), this, CURSOR_FRAME,
*aPam.GetPoint(), aPam.GetMark()));
}
}
@@ -3274,10 +3274,10 @@ uno::Reference< container::XEnumeration > SwXTextFrame::createEnumeration() thr
{
SolarMutexGuard aGuard;
uno::Reference< container::XEnumeration > aRef;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- SwPosition aPos(pFmt->GetCntnt().GetCntntIdx()->GetNode());
+ SwPosition aPos(pFormat->GetContent().GetContentIdx()->GetNode());
::std::unique_ptr<SwUnoCrsr> pUnoCursor(
GetDoc()->CreateUnoCrsr(aPos, false));
pUnoCursor->Move(fnMoveForward, fnGoNode);
@@ -3392,8 +3392,8 @@ SwXTextGraphicObject::SwXTextGraphicObject( SwDoc *pDoc ) :
{
}
-SwXTextGraphicObject::SwXTextGraphicObject(SwFrmFmt& rFmt) :
- SwXFrame(rFmt, FLYCNTTYPE_GRF, aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_GRAPHIC))
+SwXTextGraphicObject::SwXTextGraphicObject(SwFrameFormat& rFormat) :
+ SwXFrame(rFormat, FLYCNTTYPE_GRF, aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_GRAPHIC))
{
}
@@ -3404,9 +3404,9 @@ SwXTextGraphicObject::~SwXTextGraphicObject()
}
uno::Reference<text::XTextContent>
-SwXTextGraphicObject::CreateXTextGraphicObject(SwDoc & rDoc, SwFrmFmt *const pFrmFmt)
+SwXTextGraphicObject::CreateXTextGraphicObject(SwDoc & rDoc, SwFrameFormat *const pFrameFormat)
{
- return CreateXFrame<text::XTextContent, SwXTextGraphicObject>(rDoc, pFrmFmt);
+ return CreateXFrame<text::XTextContent, SwXTextGraphicObject>(rDoc, pFrameFormat);
}
void SAL_CALL SwXTextGraphicObject::acquire( )throw()
@@ -3524,8 +3524,8 @@ SwXTextEmbeddedObject::SwXTextEmbeddedObject( SwDoc *pDoc )
, m_xOLEListener(nullptr)
{ }
-SwXTextEmbeddedObject::SwXTextEmbeddedObject(SwFrmFmt& rFmt) :
- SwXFrame(rFmt, FLYCNTTYPE_OLE, aSwMapProvider.GetPropertySet(PROPERTY_MAP_EMBEDDED_OBJECT))
+SwXTextEmbeddedObject::SwXTextEmbeddedObject(SwFrameFormat& rFormat) :
+ SwXFrame(rFormat, FLYCNTTYPE_OLE, aSwMapProvider.GetPropertySet(PROPERTY_MAP_EMBEDDED_OBJECT))
{
}
@@ -3536,9 +3536,9 @@ SwXTextEmbeddedObject::~SwXTextEmbeddedObject()
}
uno::Reference<text::XTextContent>
-SwXTextEmbeddedObject::CreateXTextEmbeddedObject(SwDoc & rDoc, SwFrmFmt *const pFrmFmt)
+SwXTextEmbeddedObject::CreateXTextEmbeddedObject(SwDoc & rDoc, SwFrameFormat *const pFrameFormat)
{
- return CreateXFrame<text::XTextContent, SwXTextEmbeddedObject>(rDoc, pFrmFmt);
+ return CreateXFrame<text::XTextContent, SwXTextEmbeddedObject>(rDoc, pFrameFormat);
}
void SAL_CALL SwXTextEmbeddedObject::acquire()throw()
@@ -3622,16 +3622,16 @@ uno::Reference< embed::XEmbeddedObject > SAL_CALL SwXTextEmbeddedObject::getExte
throw( uno::RuntimeException, std::exception )
{
uno::Reference< embed::XEmbeddedObject > xResult;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- SwDoc* pDoc = pFmt->GetDoc();
- const SwFmtCntnt* pCnt = &pFmt->GetCntnt();
- OSL_ENSURE( pCnt->GetCntntIdx() &&
- pDoc->GetNodes()[ pCnt->GetCntntIdx()->
+ SwDoc* pDoc = pFormat->GetDoc();
+ const SwFormatContent* pCnt = &pFormat->GetContent();
+ OSL_ENSURE( pCnt->GetContentIdx() &&
+ pDoc->GetNodes()[ pCnt->GetContentIdx()->
GetIndex() + 1 ]->GetOLENode(), "kein OLE-Node?");
- SwOLENode* pOleNode = pDoc->GetNodes()[ pCnt->GetCntntIdx()
+ SwOLENode* pOleNode = pDoc->GetNodes()[ pCnt->GetContentIdx()
->GetIndex() + 1 ]->GetOLENode();
xResult = pOleNode->GetOLEObj().GetOleRef();
if ( svt::EmbeddedObjectRef::TryRunningState( xResult ) )
@@ -3645,7 +3645,7 @@ uno::Reference< embed::XEmbeddedObject > SAL_CALL SwXTextEmbeddedObject::getExte
uno::Reference< frame::XModel > xModel( xComp, uno::UNO_QUERY);
if(xBrdcst.is() && xModel.is() && !m_xOLEListener.is())
{
- m_xOLEListener = new SwXOLEListener(*pFmt, xModel);
+ m_xOLEListener = new SwXOLEListener(*pFormat, xModel);
xBrdcst->addModifyListener( m_xOLEListener );
}
}
@@ -3655,16 +3655,16 @@ uno::Reference< embed::XEmbeddedObject > SAL_CALL SwXTextEmbeddedObject::getExte
sal_Int64 SAL_CALL SwXTextEmbeddedObject::getAspect() throw (uno::RuntimeException, std::exception)
{
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- SwDoc* pDoc = pFmt->GetDoc();
- const SwFmtCntnt* pCnt = &pFmt->GetCntnt();
- OSL_ENSURE( pCnt->GetCntntIdx() &&
- pDoc->GetNodes()[ pCnt->GetCntntIdx()->
+ SwDoc* pDoc = pFormat->GetDoc();
+ const SwFormatContent* pCnt = &pFormat->GetContent();
+ OSL_ENSURE( pCnt->GetContentIdx() &&
+ pDoc->GetNodes()[ pCnt->GetContentIdx()->
GetIndex() + 1 ]->GetOLENode(), "kein OLE-Node?");
- return pDoc->GetNodes()[ pCnt->GetCntntIdx()->GetIndex() + 1 ]->GetOLENode()->GetAspect();
+ return pDoc->GetNodes()[ pCnt->GetContentIdx()->GetIndex() + 1 ]->GetOLENode()->GetAspect();
}
return embed::Aspects::MSOLE_CONTENT; // return the default value
@@ -3672,31 +3672,31 @@ sal_Int64 SAL_CALL SwXTextEmbeddedObject::getAspect() throw (uno::RuntimeExcepti
void SAL_CALL SwXTextEmbeddedObject::setAspect( sal_Int64 nAspect ) throw (uno::RuntimeException, std::exception)
{
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- SwDoc* pDoc = pFmt->GetDoc();
- const SwFmtCntnt* pCnt = &pFmt->GetCntnt();
- OSL_ENSURE( pCnt->GetCntntIdx() &&
- pDoc->GetNodes()[ pCnt->GetCntntIdx()->
+ SwDoc* pDoc = pFormat->GetDoc();
+ const SwFormatContent* pCnt = &pFormat->GetContent();
+ OSL_ENSURE( pCnt->GetContentIdx() &&
+ pDoc->GetNodes()[ pCnt->GetContentIdx()->
GetIndex() + 1 ]->GetOLENode(), "kein OLE-Node?");
- pDoc->GetNodes()[ pCnt->GetCntntIdx()->GetIndex() + 1 ]->GetOLENode()->SetAspect( nAspect );
+ pDoc->GetNodes()[ pCnt->GetContentIdx()->GetIndex() + 1 ]->GetOLENode()->SetAspect( nAspect );
}
}
uno::Reference< graphic::XGraphic > SAL_CALL SwXTextEmbeddedObject::getReplacementGraphic() throw (uno::RuntimeException, std::exception)
{
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- SwDoc* pDoc = pFmt->GetDoc();
- const SwFmtCntnt* pCnt = &pFmt->GetCntnt();
- OSL_ENSURE( pCnt->GetCntntIdx() &&
- pDoc->GetNodes()[ pCnt->GetCntntIdx()->
+ SwDoc* pDoc = pFormat->GetDoc();
+ const SwFormatContent* pCnt = &pFormat->GetContent();
+ OSL_ENSURE( pCnt->GetContentIdx() &&
+ pDoc->GetNodes()[ pCnt->GetContentIdx()->
GetIndex() + 1 ]->GetOLENode(), "kein OLE-Node?");
- const Graphic* pGraphic = pDoc->GetNodes()[ pCnt->GetCntntIdx()->GetIndex() + 1 ]->GetOLENode()->GetGraphic();
+ const Graphic* pGraphic = pDoc->GetNodes()[ pCnt->GetContentIdx()->GetIndex() + 1 ]->GetOLENode()->GetGraphic();
if ( pGraphic )
return pGraphic->GetXGraphic();
}
@@ -3743,8 +3743,8 @@ uno::Reference<container::XNameReplace> SAL_CALL
TYPEINIT1(SwXOLEListener, SwClient);
-SwXOLEListener::SwXOLEListener( SwFmt& rOLEFmt, uno::Reference< XModel > xOLE) :
- SwClient(&rOLEFmt),
+SwXOLEListener::SwXOLEListener( SwFormat& rOLEFormat, uno::Reference< XModel > xOLE) :
+ SwClient(&rOLEFormat),
xOLEModel(xOLE)
{
}
@@ -3758,14 +3758,14 @@ void SwXOLEListener::modified( const lang::EventObject& /*rEvent*/ )
SolarMutexGuard aGuard;
SwOLENode* pNd = 0;
- SwFmt* pFmt = GetFmt();
- if(pFmt)
- {const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+ SwFormat* pFormat = GetFormat();
+ if(pFormat)
+ {const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
- SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
- pNd = pNoTxt->GetOLENode();
+ SwNoTextNode* pNoText = aIdx.GetNode().GetNoTextNode();
+ pNd = pNoText->GetOLENode();
}
}
if(!pNd)
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index 2cd8b2440f57..535603b190e5 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -58,27 +58,27 @@ public:
const bool m_bIsEndnote;
::cppu::OInterfaceContainerHelper m_EventListeners;
bool m_bIsDescriptor;
- const SwFmtFtn * m_pFmtFtn;
+ const SwFormatFootnote * m_pFormatFootnote;
OUString m_sLabel;
Impl( SwXFootnote & rThis,
- SwFmtFtn *const pFootnote,
+ SwFormatFootnote *const pFootnote,
const bool bIsEndnote)
: SwClient(pFootnote)
, m_rThis(rThis)
, m_bIsEndnote(bIsEndnote)
, m_EventListeners(m_Mutex)
, m_bIsDescriptor(0 == pFootnote)
- , m_pFmtFtn(pFootnote)
+ , m_pFormatFootnote(pFootnote)
{
}
- const SwFmtFtn* GetFootnoteFormat() const {
- return m_rThis.GetDoc() ? m_pFmtFtn : 0;
+ const SwFormatFootnote* GetFootnoteFormat() const {
+ return m_rThis.GetDoc() ? m_pFormatFootnote : 0;
}
- SwFmtFtn const& GetFootnoteFormatOrThrow() {
- SwFmtFtn const*const pFootnote( GetFootnoteFormat() );
+ SwFormatFootnote const& GetFootnoteFormatOrThrow() {
+ SwFormatFootnote const*const pFootnote( GetFootnoteFormat() );
if (!pFootnote) {
throw uno::RuntimeException(OUString(
"SwXFootnote: disposed or invalid"), 0);
@@ -99,7 +99,7 @@ void SwXFootnote::Impl::Invalidate()
{
const_cast<SwModify*>(GetRegisteredIn())->Remove(this);
}
- m_pFmtFtn = 0;
+ m_pFormatFootnote = 0;
m_rThis.SetDoc(0);
uno::Reference<uno::XInterface> const xThis(m_wThis);
if (!xThis.is())
@@ -126,9 +126,9 @@ SwXFootnote::SwXFootnote(const bool bEndnote)
{
}
-SwXFootnote::SwXFootnote(SwDoc & rDoc, SwFmtFtn & rFmt)
+SwXFootnote::SwXFootnote(SwDoc & rDoc, SwFormatFootnote & rFormat)
: SwXText(& rDoc, CURSOR_FOOTNOTE)
- , m_pImpl( new SwXFootnote::Impl(*this, &rFmt, rFmt.IsEndNote()) )
+ , m_pImpl( new SwXFootnote::Impl(*this, &rFormat, rFormat.IsEndNote()) )
{
}
@@ -137,24 +137,24 @@ SwXFootnote::~SwXFootnote()
}
uno::Reference<text::XFootnote>
-SwXFootnote::CreateXFootnote(SwDoc & rDoc, SwFmtFtn *const pFootnoteFmt,
+SwXFootnote::CreateXFootnote(SwDoc & rDoc, SwFormatFootnote *const pFootnoteFormat,
bool const isEndnote)
{
// i#105557: do not iterate over the registered clients: race condition
uno::Reference<text::XFootnote> xNote;
- if (pFootnoteFmt)
+ if (pFootnoteFormat)
{
- xNote = pFootnoteFmt->GetXFootnote();
+ xNote = pFootnoteFormat->GetXFootnote();
}
if (!xNote.is())
{
- SwXFootnote *const pNote((pFootnoteFmt)
- ? new SwXFootnote(rDoc, *pFootnoteFmt)
+ SwXFootnote *const pNote((pFootnoteFormat)
+ ? new SwXFootnote(rDoc, *pFootnoteFormat)
: new SwXFootnote(isEndnote));
xNote.set(pNote);
- if (pFootnoteFmt)
+ if (pFootnoteFormat)
{
- pFootnoteFmt->SetXFootnote(xNote);
+ pFootnoteFormat->SetXFootnote(xNote);
}
// need a permanent Reference to initialize m_wThis
pNote->m_pImpl->m_wThis = xNote;
@@ -242,10 +242,10 @@ OUString SAL_CALL SwXFootnote::getLabel() throw (uno::RuntimeException, std::exc
SolarMutexGuard aGuard;
OUString sRet;
- SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
- if(pFmt)
+ SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
+ if(pFormat)
{
- sRet = pFmt->GetNumStr();
+ sRet = pFormat->GetNumStr();
}
else if (m_pImpl->m_bIsDescriptor)
{
@@ -263,15 +263,15 @@ SwXFootnote::setLabel(const OUString& aLabel) throw (uno::RuntimeException, std:
{
SolarMutexGuard aGuard;
- SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
- if(pFmt)
+ SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
+ if(pFormat)
{
- const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn();
- OSL_ENSURE(pTxtFtn, "kein TextNode?");
- SwTxtNode& rTxtNode = (SwTxtNode&)pTxtFtn->GetTxtNode();
+ const SwTextFootnote* pTextFootnote = pFormat->GetTextFootnote();
+ OSL_ENSURE(pTextFootnote, "kein TextNode?");
+ SwTextNode& rTextNode = (SwTextNode&)pTextFootnote->GetTextNode();
- SwPaM aPam(rTxtNode, pTxtFtn->GetStart());
- GetDoc()->SetCurFtn(aPam, aLabel, pFmt->GetNumber(), pFmt->IsEndNote());
+ SwPaM aPam(rTextNode, pTextFootnote->GetStart());
+ GetDoc()->SetCurFootnote(aPam, aLabel, pFormat->GetNumber(), pFormat->IsEndNote());
}
else if (m_pImpl->m_bIsDescriptor)
{
@@ -313,7 +313,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
UnoActionContext aCont(pNewDoc);
pNewDoc->getIDocumentContentOperations().DeleteAndJoin(aPam);
aPam.DeleteMark();
- SwFmtFtn aFootNote(m_pImpl->m_bIsEndnote);
+ SwFormatFootnote aFootNote(m_pImpl->m_bIsEndnote);
if (!m_pImpl->m_sLabel.isEmpty())
{
aFootNote.SetNumStr(m_pImpl->m_sLabel);
@@ -328,23 +328,23 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
pNewDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFootNote, nInsertFlags);
- SwTxtFtn *const pTxtAttr = static_cast<SwTxtFtn*>(
- aPam.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
+ SwTextFootnote *const pTextAttr = static_cast<SwTextFootnote*>(
+ aPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_FTN ));
- if (pTxtAttr)
+ if (pTextAttr)
{
- const SwFmtFtn& rFtn = pTxtAttr->GetFtn();
- m_pImpl->m_pFmtFtn = &rFtn;
- const_cast<SwFmtFtn*>(m_pImpl->m_pFmtFtn)->Add(m_pImpl.get());
+ const SwFormatFootnote& rFootnote = pTextAttr->GetFootnote();
+ m_pImpl->m_pFormatFootnote = &rFootnote;
+ const_cast<SwFormatFootnote*>(m_pImpl->m_pFormatFootnote)->Add(m_pImpl.get());
// force creation of sequence id - is used for references
if (pNewDoc->IsInReading())
{
- pTxtAttr->SetSeqNo(pNewDoc->GetFtnIdxs().size());
+ pTextAttr->SetSeqNo(pNewDoc->GetFootnoteIdxs().size());
}
else
{
- pTxtAttr->SetSeqRefNo();
+ pTextAttr->SetSeqRefNo();
}
}
m_pImpl->m_bIsDescriptor = false;
@@ -356,10 +356,10 @@ SwXFootnote::getAnchor() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
+ SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
- SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
- SwPaM aPam( pTxtFtn->GetTxtNode(), pTxtFtn->GetStart() );
+ SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
+ SwPaM aPam( pTextFootnote->GetTextNode(), pTextFootnote->GetStart() );
SwPosition aMark( *aPam.Start() );
aPam.SetMark();
++aPam.GetMark()->nContent;
@@ -372,13 +372,13 @@ void SAL_CALL SwXFootnote::dispose() throw (uno::RuntimeException, std::exceptio
{
SolarMutexGuard aGuard;
- SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
+ SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
- SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
- OSL_ENSURE(pTxtFtn, "no TextNode?");
- SwTxtNode& rTxtNode = const_cast<SwTxtNode&>(pTxtFtn->GetTxtNode());
- const sal_Int32 nPos = pTxtFtn->GetStart();
- SwPaM aPam(rTxtNode, nPos, rTxtNode, nPos+1);
+ SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
+ OSL_ENSURE(pTextFootnote, "no TextNode?");
+ SwTextNode& rTextNode = const_cast<SwTextNode&>(pTextFootnote->GetTextNode());
+ const sal_Int32 nPos = pTextFootnote->GetStart();
+ SwPaM aPam(rTextNode, nPos, rTextNode, nPos+1);
GetDoc()->getIDocumentContentOperations().DeleteAndJoin( aPam );
}
@@ -402,13 +402,13 @@ throw (uno::RuntimeException, std::exception)
const SwStartNode *SwXFootnote::GetStartNode() const
{
- SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
- if(pFmt)
+ SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
+ if(pFormat)
{
- const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn();
- if( pTxtFtn )
+ const SwTextFootnote* pTextFootnote = pFormat->GetTextFootnote();
+ if( pTextFootnote )
{
- return pTxtFtn->GetStartNode()->GetNode().GetStartNode();
+ return pTextFootnote->GetStartNode()->GetNode().GetStartNode();
}
}
return 0;
@@ -425,10 +425,10 @@ SwXFootnote::createTextCursor() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
+ SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
- SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
- SwPosition aPos( *pTxtFtn->GetStartNode() );
+ SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
+ SwPosition aPos( *pTextFootnote->GetStartNode() );
SwXTextCursor *const pXCursor =
new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE, aPos);
SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor();
@@ -445,7 +445,7 @@ throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
+ SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
SwUnoInternalPaM aPam(*GetDoc());
if (!::sw::XTextRangeToSwPaM(aPam, xTextPosition))
@@ -453,11 +453,11 @@ throw (uno::RuntimeException, std::exception)
throw uno::RuntimeException();
}
- SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
- SwNode const*const pFtnStartNode = &pTxtFtn->GetStartNode()->GetNode();
+ SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
+ SwNode const*const pFootnoteStartNode = &pTextFootnote->GetStartNode()->GetNode();
const SwNode* pStart = aPam.GetNode().FindFootnoteStartNode();
- if (pStart != pFtnStartNode)
+ if (pStart != pFootnoteStartNode)
{
throw uno::RuntimeException();
}
@@ -474,10 +474,10 @@ SwXFootnote::createEnumeration() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
+ SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
- SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
- SwPosition aPos( *pTxtFtn->GetStartNode() );
+ SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
+ SwPosition aPos( *pTextFootnote->GetStartNode() );
::std::unique_ptr<SwUnoCrsr> pUnoCursor(
GetDoc()->CreateUnoCrsr(aPos, false));
pUnoCursor->Move(fnMoveForward, fnGoNode);
@@ -538,12 +538,12 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
else if (rPropertyName == UNO_NAME_REFERENCE_ID)
{
- SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
- if (pFmt)
+ SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
+ if (pFormat)
{
- SwTxtFtn const*const pTxtFtn = pFmt->GetTxtFtn();
- OSL_ENSURE(pTxtFtn, "no TextNode?");
- aRet <<= static_cast<sal_Int16>(pTxtFtn->GetSeqRefNo());
+ SwTextFootnote const*const pTextFootnote = pFormat->GetTextFootnote();
+ OSL_ENSURE(pTextFootnote, "no TextNode?");
+ aRet <<= static_cast<sal_Int16>(pTextFootnote->GetSeqRefNo());
}
}
else
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index d5c96944789e..e50c423b1e7c 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -334,7 +334,7 @@ public:
Impl( SwDoc & rDoc,
const TOXTypes eType,
SwTOXBaseSection *const pBaseSection)
- : SwClient((pBaseSection) ? pBaseSection->GetFmt() : 0)
+ : SwClient((pBaseSection) ? pBaseSection->GetFormat() : 0)
, m_Listeners(m_Mutex)
, m_rPropSet(
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Index(eType)))
@@ -347,18 +347,18 @@ public:
{
}
- SwSectionFmt * GetSectionFmt() const {
- return static_cast<SwSectionFmt *>(
+ SwSectionFormat * GetSectionFormat() const {
+ return static_cast<SwSectionFormat *>(
const_cast<SwModify *>(GetRegisteredIn()));
}
SwTOXBase & GetTOXSectionOrThrow() const
{
- SwSectionFmt *const pSectionFmt(GetSectionFmt());
+ SwSectionFormat *const pSectionFormat(GetSectionFormat());
SwTOXBase *const pTOXSection( (m_bIsDescriptor)
? &m_pProps->GetTOXBase()
- : ((pSectionFmt)
- ? static_cast<SwTOXBaseSection*>(pSectionFmt->GetSection())
+ : ((pSectionFormat)
+ ? static_cast<SwTOXBaseSection*>(pSectionFormat->GetSection())
: 0));
if (!pTOXSection)
{
@@ -423,8 +423,8 @@ SwXDocumentIndex::CreateXDocumentIndex(
uno::Reference<text::XDocumentIndex> xIndex;
if (pSection)
{
- SwSectionFmt const *const pFmt = pSection->GetFmt();
- xIndex.set(pFmt->GetXObject(), uno::UNO_QUERY);
+ SwSectionFormat const *const pFormat = pSection->GetFormat();
+ xIndex.set(pFormat->GetXObject(), uno::UNO_QUERY);
}
if (!xIndex.is())
{
@@ -434,7 +434,7 @@ SwXDocumentIndex::CreateXDocumentIndex(
xIndex.set(pIndex);
if (pSection)
{
- pSection->GetFmt()->SetXObject(xIndex);
+ pSection->GetFormat()->SetXObject(xIndex);
}
// need a permanent Reference to initialize m_wThis
pIndex->m_pImpl->m_wThis = xIndex;
@@ -572,7 +572,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
static_cast<cppu::OWeakObject *>(this));
}
- SwSectionFmt *const pSectionFmt(m_pImpl->GetSectionFmt());
+ SwSectionFormat *const pSectionFormat(m_pImpl->GetSectionFormat());
SwTOXBase & rTOXBase( m_pImpl->GetTOXSectionOrThrow() );
sal_uInt16 nCreate = rTOXBase.GetCreateType();
@@ -614,11 +614,11 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lcl_ConvertTOUNameToUserName(sNewName);
OSL_ENSURE(TOX_USER == eTxBaseType,
"tox type name can only be changed for user indexes");
- if (pSectionFmt)
+ if (pSectionFormat)
{
if (rTOXBase.GetTOXType()->GetTypeName() != sNewName)
{
- lcl_ReAssignTOXType(pSectionFmt->GetDoc(),
+ lcl_ReAssignTOXType(pSectionFormat->GetDoc(),
rTOXBase, sNewName);
}
}
@@ -697,7 +697,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
{
bool bSet = lcl_AnyToBool(rValue);
rTOXBase.SetProtected(bSet);
- if (pSectionFmt)
+ if (pSectionFormat)
{
static_cast<SwTOXBaseSection &>(rTOXBase).SetProtect(bSet);
}
@@ -858,11 +858,11 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
m_pImpl->m_rPropSet.setPropertyValue(
rPropertyName, rValue, aAttrSet);
- const SwSectionFmts& rSects = m_pImpl->m_pDoc->GetSections();
+ const SwSectionFormats& rSects = m_pImpl->m_pDoc->GetSections();
for (size_t i = 0; i < rSects.size(); ++i)
{
- const SwSectionFmt* pTmpFmt = rSects[ i ];
- if (pTmpFmt == pSectionFmt)
+ const SwSectionFormat* pTmpFormat = rSects[ i ];
+ if (pTmpFormat == pSectionFormat)
{
SwSectionData tmpData(
static_cast<SwTOXBaseSection&>(rTOXBase));
@@ -901,11 +901,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
static_cast< cppu::OWeakObject * >(this));
}
- SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
+ SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
SwTOXBase* pTOXBase = 0;
- if (pSectionFmt)
+ if (pSectionFormat)
{
- pTOXBase = static_cast<SwTOXBaseSection*>(pSectionFmt->GetSection());
+ pTOXBase = static_cast<SwTOXBaseSection*>(pSectionFormat->GetSection());
}
else if (m_pImpl->m_bIsDescriptor)
{
@@ -927,13 +927,13 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
if(WID_IDX_CONTENT_SECTION == pEntry->nWID)
{
const uno::Reference <text::XTextSection> xContentSect =
- SwXTextSection::CreateXTextSection( pSectionFmt );
+ SwXTextSection::CreateXTextSection( pSectionFormat );
aRet <<= xContentSect;
}
- else if (pSectionFmt)
+ else if (pSectionFormat)
{
SwSections aSectArr;
- pSectionFmt->GetChildSections(aSectArr,
+ pSectionFormat->GetChildSections(aSectArr,
SORTSECT_NOT, false);
for(size_t i = 0; i < aSectArr.size(); ++i)
{
@@ -942,7 +942,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
const uno::Reference <text::XTextSection> xHeader =
SwXTextSection::CreateXTextSection(
- pSect->GetFmt() );
+ pSect->GetFormat() );
aRet <<= xHeader;
break;
}
@@ -1282,9 +1282,9 @@ void SAL_CALL SwXDocumentIndex::refresh() throw (uno::RuntimeException, std::exc
{
SolarMutexGuard g;
- SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
- SwTOXBaseSection *const pTOXBase = (pFmt) ?
- static_cast<SwTOXBaseSection*>(pFmt->GetSection()) : 0;
+ SwSectionFormat *const pFormat = m_pImpl->GetSectionFormat();
+ SwTOXBaseSection *const pTOXBase = (pFormat) ?
+ static_cast<SwTOXBaseSection*>(pFormat->GetSection()) : 0;
if (!pTOXBase)
{
throw uno::RuntimeException(
@@ -1381,8 +1381,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
pDoc->SetTOXBaseName(*pTOX, m_pImpl->m_pProps->GetTOXBase().GetTOXName());
// update page numbers
- pTOX->GetFmt()->Add(m_pImpl.get());
- pTOX->GetFmt()->SetXObject(static_cast< ::cppu::OWeakObject*>(this));
+ pTOX->GetFormat()->Add(m_pImpl.get());
+ pTOX->GetFormat()->SetXObject(static_cast< ::cppu::OWeakObject*>(this));
const_cast<SwTOXBaseSection*>(pTOX)->UpdatePageNum();
m_pImpl->m_pProps.reset();
@@ -1395,22 +1395,22 @@ SwXDocumentIndex::getAnchor() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
- if (!pSectionFmt)
+ SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
+ if (!pSectionFormat)
{
throw uno::RuntimeException();
}
uno::Reference< text::XTextRange > xRet;
- SwNodeIndex const*const pIdx( pSectionFmt->GetCntnt().GetCntntIdx() );
+ SwNodeIndex const*const pIdx( pSectionFormat->GetContent().GetContentIdx() );
if (pIdx && pIdx->GetNode().GetNodes().IsDocNodes())
{
SwPaM aPaM(*pIdx);
- aPaM.Move( fnMoveForward, fnGoCntnt );
+ aPaM.Move( fnMoveForward, fnGoContent );
aPaM.SetMark();
aPaM.GetPoint()->nNode = *pIdx->GetNode().EndOfSectionNode();
- aPaM.Move( fnMoveBackward, fnGoCntnt );
- xRet = SwXTextRange::CreateXTextRange(*pSectionFmt->GetDoc(),
+ aPaM.Move( fnMoveBackward, fnGoContent );
+ xRet = SwXTextRange::CreateXTextRange(*pSectionFormat->GetDoc(),
*aPaM.GetMark(), aPaM.GetPoint());
}
return xRet;
@@ -1420,11 +1420,11 @@ void SAL_CALL SwXDocumentIndex::dispose() throw (uno::RuntimeException, std::exc
{
SolarMutexGuard aGuard;
- SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
- if (pSectionFmt)
+ SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
+ if (pSectionFormat)
{
- pSectionFmt->GetDoc()->DeleteTOX(
- *static_cast<SwTOXBaseSection*>(pSectionFmt->GetSection()),
+ pSectionFormat->GetDoc()->DeleteTOX(
+ *static_cast<SwTOXBaseSection*>(pSectionFormat->GetSection()),
true);
}
}
@@ -1454,14 +1454,14 @@ OUString SAL_CALL SwXDocumentIndex::getName() throw (uno::RuntimeException, std:
SolarMutexGuard g;
OUString uRet;
- SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
+ SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
if (m_pImpl->m_bIsDescriptor)
{
uRet = m_pImpl->m_pProps->GetTOXBase().GetTOXName();
}
- else if(pSectionFmt)
+ else if(pSectionFormat)
{
- uRet = pSectionFmt->GetSection()->GetSectionName();
+ uRet = pSectionFormat->GetSection()->GetSectionName();
}
else
{
@@ -1480,15 +1480,15 @@ SwXDocumentIndex::setName(const OUString& rName) throw (uno::RuntimeException, s
throw uno::RuntimeException();
}
- SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
+ SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
if (m_pImpl->m_bIsDescriptor)
{
m_pImpl->m_pProps->GetTOXBase().SetTOXName(rName);
}
- else if (pSectionFmt)
+ else if (pSectionFormat)
{
- const bool bSuccess = pSectionFmt->GetDoc()->SetTOXBaseName(
- *static_cast<SwTOXBaseSection*>(pSectionFmt->GetSection()), rName);
+ const bool bSuccess = pSectionFormat->GetDoc()->SetTOXBaseName(
+ *static_cast<SwTOXBaseSection*>(pSectionFormat->GetSection()), rName);
if (!bSuccess)
{
throw uno::RuntimeException();
@@ -1503,16 +1503,16 @@ SwXDocumentIndex::setName(const OUString& rName) throw (uno::RuntimeException, s
// MetadatableMixin
::sfx2::Metadatable* SwXDocumentIndex::GetCoreObject()
{
- SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
- return pSectionFmt;
+ SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
+ return pSectionFormat;
}
uno::Reference<frame::XModel> SwXDocumentIndex::GetModel()
{
- SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
- if (pSectionFmt)
+ SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
+ if (pSectionFormat)
{
- SwDocShell const*const pShell( pSectionFmt->GetDoc()->GetDocShell() );
+ SwDocShell const*const pShell( pSectionFormat->GetDoc()->GetDocShell() );
return (pShell) ? pShell->GetModel() : 0;
}
return 0;
@@ -1798,13 +1798,13 @@ throw (uno::RuntimeException, std::exception)
{
SwTOXMark aMark(*m_pImpl->m_pTOXMark);
aMark.SetAlternativeText(rIndexEntry);
- SwTxtTOXMark const*const pTxtMark =
- m_pImpl->m_pTOXMark->GetTxtTOXMark();
- SwPaM aPam(pTxtMark->GetTxtNode(), pTxtMark->GetStart());
+ SwTextTOXMark const*const pTextMark =
+ m_pImpl->m_pTOXMark->GetTextTOXMark();
+ SwPaM aPam(pTextMark->GetTextNode(), pTextMark->GetStart());
aPam.SetMark();
- if(pTxtMark->End())
+ if(pTextMark->End())
{
- aPam.GetPoint()->nContent = *pTxtMark->End();
+ aPam.GetPoint()->nContent = *pTextMark->End();
}
else
++aPam.GetPoint()->nContent;
@@ -1986,10 +1986,10 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
| SetAttrMode::DONTEXPAND)
: SetAttrMode::DONTEXPAND;
- ::std::vector<SwTxtAttr *> oldMarks;
+ ::std::vector<SwTextAttr *> oldMarks;
if (bMark)
{
- oldMarks = rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
+ oldMarks = rPam.GetNode().GetTextNode()->GetTextAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK);
}
@@ -2000,30 +2000,30 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
}
// rMark was copied into the document pool; now retrieve real format...
- SwTxtAttr * pTxtAttr(0);
+ SwTextAttr * pTextAttr(0);
if (bMark)
{
// #i107672#
// ensure that we do not retrieve a different mark at the same position
- ::std::vector<SwTxtAttr *> const newMarks(
- rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
+ ::std::vector<SwTextAttr *> const newMarks(
+ rPam.GetNode().GetTextNode()->GetTextAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK));
- ::std::vector<SwTxtAttr *>::const_iterator const iter(
+ ::std::vector<SwTextAttr *>::const_iterator const iter(
::std::find_if(newMarks.begin(), newMarks.end(),
- NotContainedIn<SwTxtAttr *>(oldMarks)));
+ NotContainedIn<SwTextAttr *>(oldMarks)));
OSL_ASSERT(newMarks.end() != iter);
if (newMarks.end() != iter)
{
- pTxtAttr = *iter;
+ pTextAttr = *iter;
}
}
else
{
- pTxtAttr = rPam.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
+ pTextAttr = rPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
rPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_TOXMARK );
}
- if (!pTxtAttr)
+ if (!pTextAttr)
{
throw uno::RuntimeException(
"SwXDocumentIndexMark::InsertTOXMark(): cannot insert attribute",
@@ -2031,7 +2031,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
}
m_pDoc = pDoc;
- m_pTOXMark = & pTxtAttr->GetTOXMark();
+ m_pTOXMark = & pTextAttr->GetTOXMark();
const_cast<SwTOXMark*>(m_pTOXMark)->Add(this);
const_cast<SwTOXType &>(rTOXType).Add(& m_TypeDepend);
}
@@ -2046,16 +2046,16 @@ SwXDocumentIndexMark::getAnchor() throw (uno::RuntimeException, std::exception)
{
throw uno::RuntimeException();
}
- if (!m_pImpl->m_pTOXMark->GetTxtTOXMark())
+ if (!m_pImpl->m_pTOXMark->GetTextTOXMark())
{
throw uno::RuntimeException();
}
- const SwTxtTOXMark* pTxtMark = m_pImpl->m_pTOXMark->GetTxtTOXMark();
- SwPaM aPam(pTxtMark->GetTxtNode(), pTxtMark->GetStart());
+ const SwTextTOXMark* pTextMark = m_pImpl->m_pTOXMark->GetTextTOXMark();
+ SwPaM aPam(pTextMark->GetTextNode(), pTextMark->GetStart());
aPam.SetMark();
- if(pTxtMark->End())
+ if(pTextMark->End())
{
- aPam.GetPoint()->nContent = *pTxtMark->End();
+ aPam.GetPoint()->nContent = *pTextMark->End();
}
else
{
@@ -2191,13 +2191,13 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
aMark.SetSecondaryKeyReading(lcl_AnyToString(rValue));
break;
}
- SwTxtTOXMark const*const pTxtMark =
- m_pImpl->m_pTOXMark->GetTxtTOXMark();
- SwPaM aPam(pTxtMark->GetTxtNode(), pTxtMark->GetStart());
+ SwTextTOXMark const*const pTextMark =
+ m_pImpl->m_pTOXMark->GetTextTOXMark();
+ SwPaM aPam(pTextMark->GetTextNode(), pTextMark->GetStart());
aPam.SetMark();
- if(pTxtMark->End())
+ if(pTextMark->End())
{
- aPam.GetPoint()->nContent = *pTxtMark->End();
+ aPam.GetPoint()->nContent = *pTextMark->End();
}
else
{
@@ -2475,12 +2475,12 @@ SwXDocumentIndexes::getCount() throw (uno::RuntimeException, std::exception)
throw uno::RuntimeException();
sal_uInt32 nRet = 0;
- const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( size_t n = 0; n < rFmts.size(); ++n )
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
+ for( size_t n = 0; n < rFormats.size(); ++n )
{
- const SwSection* pSect = rFmts[ n ]->GetSection();
+ const SwSection* pSect = rFormats[ n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
- pSect->GetFmt()->GetSectionNode() )
+ pSect->GetFormat()->GetSectionNode() )
{
++nRet;
}
@@ -2500,12 +2500,12 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
sal_Int32 nIdx = 0;
- const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( size_t n = 0; n < rFmts.size(); ++n )
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
+ for( size_t n = 0; n < rFormats.size(); ++n )
{
- SwSection* pSect = rFmts[ n ]->GetSection();
+ SwSection* pSect = rFormats[ n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
- pSect->GetFmt()->GetSectionNode() &&
+ pSect->GetFormat()->GetSectionNode() &&
nIdx++ == nIndex )
{
const uno::Reference< text::XDocumentIndex > xTmp =
@@ -2530,12 +2530,12 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
if(!IsValid())
throw uno::RuntimeException();
- const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( size_t n = 0; n < rFmts.size(); ++n )
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
+ for( size_t n = 0; n < rFormats.size(); ++n )
{
- SwSection* pSect = rFmts[ n ]->GetSection();
+ SwSection* pSect = rFormats[ n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
- pSect->GetFmt()->GetSectionNode() &&
+ pSect->GetFormat()->GetSectionNode() &&
(static_cast<SwTOXBaseSection const*>(pSect)->GetTOXName()
== rName))
{
@@ -2558,13 +2558,13 @@ SwXDocumentIndexes::getElementNames() throw (uno::RuntimeException, std::excepti
if(!IsValid())
throw uno::RuntimeException();
- const SwSectionFmts& rFmts = GetDoc()->GetSections();
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
sal_Int32 nCount = 0;
- for( size_t n = 0; n < rFmts.size(); ++n )
+ for( size_t n = 0; n < rFormats.size(); ++n )
{
- SwSection const*const pSect = rFmts[ n ]->GetSection();
+ SwSection const*const pSect = rFormats[ n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
- pSect->GetFmt()->GetSectionNode() )
+ pSect->GetFormat()->GetSectionNode() )
{
++nCount;
}
@@ -2573,11 +2573,11 @@ SwXDocumentIndexes::getElementNames() throw (uno::RuntimeException, std::excepti
uno::Sequence< OUString > aRet(nCount);
OUString* pArray = aRet.getArray();
sal_Int32 nCnt = 0;
- for( size_t n = 0; n < rFmts.size(); ++n )
+ for( size_t n = 0; n < rFormats.size(); ++n )
{
- SwSection const*const pSect = rFmts[ n ]->GetSection();
+ SwSection const*const pSect = rFormats[ n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
- pSect->GetFmt()->GetSectionNode())
+ pSect->GetFormat()->GetSectionNode())
{
pArray[nCnt++] = static_cast<SwTOXBaseSection const*>(pSect)->GetTOXName();
}
@@ -2594,12 +2594,12 @@ throw (uno::RuntimeException, std::exception)
if(!IsValid())
throw uno::RuntimeException();
- const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( size_t n = 0; n < rFmts.size(); ++n )
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
+ for( size_t n = 0; n < rFormats.size(); ++n )
{
- SwSection const*const pSect = rFmts[ n ]->GetSection();
+ SwSection const*const pSect = rFormats[ n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
- pSect->GetFmt()->GetSectionNode())
+ pSect->GetFormat()->GetSectionNode())
{
if (static_cast<SwTOXBaseSection const*>(pSect)->GetTOXName()
== rName)
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 82d52b99a8b6..5d118c6d6ab4 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -1521,14 +1521,14 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
break;
case PROPERTY_MAP_CNTIDX_MARK:
{
- static SfxItemPropertyMapEntry const aCntntMarkMap_Impl[] =
+ static SfxItemPropertyMapEntry const aContentMarkMap_Impl[] =
{
{ OUString(UNO_NAME_ALTERNATIVE_TEXT), WID_ALT_TEXT, cppu::UnoType<OUString>::get() , PROPERTY_NONE, 0},
{ OUString(UNO_NAME_LEVEL), WID_LEVEL , cppu::UnoType<sal_Int16>::get() , PROPERTY_NONE, 0},
COMMON_TEXT_CONTENT_PROPERTIES
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
- aMapEntriesArr[nPropertyId] = aCntntMarkMap_Impl;
+ aMapEntriesArr[nPropertyId] = aContentMarkMap_Impl;
}
break;
case PROPERTY_MAP_USER_MARK:
@@ -2156,7 +2156,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
break;
case PROPERTY_MAP_FLDTYP_CONDITIONED_TEXT :
{
- static SfxItemPropertyMapEntry const aConditionedTxtFieldPropMap [] =
+ static SfxItemPropertyMapEntry const aConditionedTextFieldPropMap [] =
{
{OUString(UNO_NAME_CONDITION), FIELD_PROP_PAR1, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0},
{OUString(UNO_NAME_FALSE_CONTENT), FIELD_PROP_PAR3, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0},
@@ -2166,12 +2166,12 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
COMMON_FLDTYP_PROPERTIES
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
- aMapEntriesArr[nPropertyId] = aConditionedTxtFieldPropMap;
+ aMapEntriesArr[nPropertyId] = aConditionedTextFieldPropMap;
}
break;
case PROPERTY_MAP_FLDTYP_HIDDEN_TEXT :
{
- static SfxItemPropertyMapEntry const aHiddenTxtFieldPropMap [] =
+ static SfxItemPropertyMapEntry const aHiddenTextFieldPropMap [] =
{
{OUString(UNO_NAME_CONDITION), FIELD_PROP_PAR1, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0},
{OUString(UNO_NAME_CONTENT) , FIELD_PROP_PAR2, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0},
@@ -2180,7 +2180,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
COMMON_FLDTYP_PROPERTIES
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
- aMapEntriesArr[nPropertyId] = aHiddenTxtFieldPropMap;
+ aMapEntriesArr[nPropertyId] = aHiddenTextFieldPropMap;
}
break;
case PROPERTY_MAP_FLDTYP_ANNOTATION :
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index c1259a40ee89..6de0271b635b 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -227,8 +227,8 @@ throw (lang::IllegalArgumentException)
{
throw lang::IllegalArgumentException();
}
- const SwFmtCharFmt aFmt(pStyle->GetCharFmt());
- rSet.Put(aFmt);
+ const SwFormatCharFormat aFormat(pStyle->GetCharFormat());
+ rSet.Put(aFormat);
}
};
@@ -247,11 +247,11 @@ throw (lang::IllegalArgumentException)
rStyleAccess.getByName(uStyle, IStyleAccess::AUTO_STYLE_CHAR );
if(pStyle.get())
{
- SwFmtAutoFmt aFmt( (bPara)
+ SwFormatAutoFormat aFormat( (bPara)
? sal::static_int_cast< sal_uInt16 >(RES_AUTO_STYLE)
: sal::static_int_cast< sal_uInt16 >(RES_TXTATR_AUTOFMT) );
- aFmt.SetStyleHandle( pStyle );
- rSet.Put(aFmt);
+ aFormat.SetStyleHandle( pStyle );
+ rSet.Put(aFormat);
}
else
{
@@ -260,7 +260,7 @@ throw (lang::IllegalArgumentException)
};
void
-SwUnoCursorHelper::SetTxtFmtColl(const uno::Any & rAny, SwPaM & rPaM)
+SwUnoCursorHelper::SetTextFormatColl(const uno::Any & rAny, SwPaM & rPaM)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
SwDoc *const pDoc = rPaM.GetDoc();
@@ -279,12 +279,12 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
throw lang::IllegalArgumentException();
}
- SwTxtFmtColl *const pLocal = pStyle->GetCollection();
+ SwTextFormatColl *const pLocal = pStyle->GetCollection();
UnoActionContext aAction(pDoc);
pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPaM *pTmpCrsr = &rPaM;
do {
- pDoc->SetTxtFmtColl(*pTmpCrsr, pLocal);
+ pDoc->SetTextFormatColl(*pTmpCrsr, pLocal);
pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext());
} while ( pTmpCrsr != &rPaM );
pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
@@ -299,16 +299,16 @@ SwUnoCursorHelper::SetPageDesc(
{
return false;
}
- ::std::unique_ptr<SwFmtPageDesc> pNewDesc;
+ ::std::unique_ptr<SwFormatPageDesc> pNewDesc;
const SfxPoolItem* pItem;
if(SfxItemState::SET == rSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
{
- pNewDesc.reset(new SwFmtPageDesc(
- *static_cast<const SwFmtPageDesc*>(pItem)));
+ pNewDesc.reset(new SwFormatPageDesc(
+ *static_cast<const SwFormatPageDesc*>(pItem)));
}
if (!pNewDesc.get())
{
- pNewDesc.reset(new SwFmtPageDesc());
+ pNewDesc.reset(new SwFormatPageDesc());
}
OUString sDescName;
SwStyleNameMapper::FillUIName(uDescName, sDescName,
@@ -330,7 +330,7 @@ SwUnoCursorHelper::SetPageDesc(
if(!bPut)
{
rSet.ClearItem(RES_BREAK);
- rSet.Put(SwFmtPageDesc());
+ rSet.Put(SwFormatPageDesc());
}
else
{
@@ -370,7 +370,7 @@ lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue)
}
static bool
-lcl_setCharFmtSequence(SwPaM & rPam, uno::Any const& rValue)
+lcl_setCharFormatSequence(SwPaM & rPam, uno::Any const& rValue)
{
uno::Sequence<OUString> aCharStyles;
if (!(rValue >>= aCharStyles))
@@ -415,24 +415,24 @@ lcl_setDropcapCharStyle(SwPaM & rPam, SfxItemSet & rItemSet,
pDoc->GetDocShell()
->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR));
if (!pStyle ||
- (static_cast<SwDocStyleSheet*>(pStyle)->GetCharFmt() ==
- pDoc->GetDfltCharFmt()))
+ (static_cast<SwDocStyleSheet*>(pStyle)->GetCharFormat() ==
+ pDoc->GetDfltCharFormat()))
{
throw lang::IllegalArgumentException();
}
- ::std::unique_ptr<SwFmtDrop> pDrop;
+ ::std::unique_ptr<SwFormatDrop> pDrop;
SfxPoolItem const* pItem(0);
if (SfxItemState::SET ==
rItemSet.GetItemState(RES_PARATR_DROP, true, &pItem))
{
- pDrop.reset(new SwFmtDrop(*static_cast<const SwFmtDrop*>(pItem)));
+ pDrop.reset(new SwFormatDrop(*static_cast<const SwFormatDrop*>(pItem)));
}
if (!pDrop.get())
{
- pDrop.reset(new SwFmtDrop);
+ pDrop.reset(new SwFormatDrop);
}
const rtl::Reference<SwDocStyleSheet> xStyle(new SwDocStyleSheet(*pStyle));
- pDrop->SetCharFmt(xStyle->GetCharFmt());
+ pDrop->SetCharFormat(xStyle->GetCharFormat());
rItemSet.Put(*pDrop);
}
@@ -445,27 +445,27 @@ lcl_setRubyCharstyle(SfxItemSet & rItemSet, uno::Any const& rValue)
throw lang::IllegalArgumentException();
}
- ::std::unique_ptr<SwFmtRuby> pRuby;
+ ::std::unique_ptr<SwFormatRuby> pRuby;
const SfxPoolItem* pItem;
if (SfxItemState::SET ==
rItemSet.GetItemState(RES_TXTATR_CJK_RUBY, true, &pItem))
{
- pRuby.reset(new SwFmtRuby(*static_cast<const SwFmtRuby*>(pItem)));
+ pRuby.reset(new SwFormatRuby(*static_cast<const SwFormatRuby*>(pItem)));
}
if (!pRuby.get())
{
- pRuby.reset(new SwFmtRuby(OUString()));
+ pRuby.reset(new SwFormatRuby(OUString()));
}
OUString sStyle;
SwStyleNameMapper::FillUIName(sTmp, sStyle,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- pRuby->SetCharFmtName(sStyle);
- pRuby->SetCharFmtId(0);
+ pRuby->SetCharFormatName(sStyle);
+ pRuby->SetCharFormatId(0);
if (!sStyle.isEmpty())
{
const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(
sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
- pRuby->SetCharFmtId(nId);
+ pRuby->SetCharFormatId(nId);
}
rItemSet.Put(*pRuby);
}
@@ -492,10 +492,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, uno::DeploymentExc
rValue, rItemSet, false);
break;
case FN_UNO_CHARFMT_SEQUENCE:
- lcl_setCharFmtSequence(rPam, rValue);
+ lcl_setCharFormatSequence(rPam, rValue);
break;
case FN_UNO_PARA_STYLE :
- SwUnoCursorHelper::SetTxtFmtColl(rValue, rPam);
+ SwUnoCursorHelper::SetTextFormatColl(rValue, rPam);
break;
case RES_AUTO_STYLE:
lcl_setAutoStyle(rPam.GetDoc()->GetIStyleAccess(),
@@ -513,8 +513,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, uno::DeploymentExc
case FN_UNO_IS_NUMBER:
{
// multi selection is not considered
- SwTxtNode *const pTxtNd = rPam.GetNode().GetTxtNode();
- if (!pTxtNd)
+ SwTextNode *const pTextNd = rPam.GetNode().GetTextNode();
+ if (!pTextNd)
{
throw lang::IllegalArgumentException();
}
@@ -528,7 +528,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, uno::DeploymentExc
throw lang::IllegalArgumentException(
"invalid NumberingLevel", 0, 0);
}
- pTxtNd->SetAttrListLevel(nLevel);
+ pTextNd->SetAttrListLevel(nLevel);
}
}
// #i91601#
@@ -537,7 +537,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, uno::DeploymentExc
OUString sListId;
if (rValue >>= sListId)
{
- pTxtNd->SetListId( sListId );
+ pTextNd->SetListId( sListId );
}
}
else if (FN_UNO_IS_NUMBER == rEntry.nWID)
@@ -547,7 +547,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, uno::DeploymentExc
{
if (!bIsNumber)
{
- pTxtNd->SetCountedInList( false );
+ pTextNd->SetCountedInList( false );
}
}
}
@@ -610,11 +610,11 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, uno::DeploymentExc
return bRet;
}
-SwFmtColl *
-SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
+SwFormatColl *
+SwUnoCursorHelper::GetCurTextFormatColl(SwPaM & rPaM, const bool bConditional)
{
static const sal_uLong nMaxLookup = 1000;
- SwFmtColl *pFmt = 0;
+ SwFormatColl *pFormat = 0;
bool bError = false;
SwPaM *pTmpCrsr = &rPaM;
do
@@ -624,23 +624,23 @@ SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
if( nEndNd - nSttNd >= nMaxLookup )
{
- pFmt = 0;
+ pFormat = 0;
break;
}
const SwNodes& rNds = rPaM.GetDoc()->GetNodes();
for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
{
- SwTxtNode const*const pNd = rNds[ n ]->GetTxtNode();
+ SwTextNode const*const pNd = rNds[ n ]->GetTextNode();
if( pNd )
{
- SwFmtColl *const pNdFmt = (bConditional)
- ? pNd->GetFmtColl() : &pNd->GetAnyFmtColl();
- if( !pFmt )
+ SwFormatColl *const pNdFormat = (bConditional)
+ ? pNd->GetFormatColl() : &pNd->GetAnyFormatColl();
+ if( !pFormat )
{
- pFmt = pNdFmt;
+ pFormat = pNdFormat;
}
- else if( pFmt != pNdFmt )
+ else if( pFormat != pNdFormat )
{
bError = true;
break;
@@ -650,7 +650,7 @@ SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext());
} while ( pTmpCrsr != &rPaM );
- return (bError) ? 0 : pFmt;
+ return (bError) ? 0 : pFormat;
}
class SwXTextCursor::Impl
@@ -780,7 +780,7 @@ void SwXTextCursor::DeleteAndInsert(const OUString& rText,
// Start/EndAction
SwDoc* pDoc = pUnoCrsr->GetDoc();
UnoActionContext aAction(pDoc);
- const sal_Int32 nTxtLen = rText.getLength();
+ const sal_Int32 nTextLen = rText.getLength();
pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
SwCursor * pCurrent = pUnoCrsr;
do
@@ -789,7 +789,7 @@ void SwXTextCursor::DeleteAndInsert(const OUString& rText,
{
pDoc->getIDocumentContentOperations().DeleteAndJoin(*pCurrent);
}
- if(nTxtLen)
+ if(nTextLen)
{
const bool bSuccess(
SwUnoCursorHelper::DocInsertStringSplitCR(
@@ -819,16 +819,16 @@ lcl_ForceIntoMeta(SwPaM & rCursor,
OSL_ENSURE(pXMeta, "no parent?");
if (!pXMeta)
throw uno::RuntimeException();
- SwTxtNode * pTxtNode;
+ SwTextNode * pTextNode;
sal_Int32 nStart;
sal_Int32 nEnd;
- const bool bSuccess( pXMeta->SetContentRange(pTxtNode, nStart, nEnd) );
+ const bool bSuccess( pXMeta->SetContentRange(pTextNode, nStart, nEnd) );
OSL_ENSURE(bSuccess, "no pam?");
if (!bSuccess)
throw uno::RuntimeException();
// force the cursor back into the meta if it has moved outside
- SwPosition start(*pTxtNode, nStart);
- SwPosition end(*pTxtNode, nEnd);
+ SwPosition start(*pTextNode, nStart);
+ SwPosition end(*pTextNode, nEnd);
switch (eMode)
{
case META_INIT_START:
@@ -863,15 +863,15 @@ bool SwXTextCursor::IsAtEndOfMeta() const
OSL_ENSURE(pXMeta, "no meta?");
if (pCursor && pXMeta)
{
- SwTxtNode * pTxtNode;
+ SwTextNode * pTextNode;
sal_Int32 nStart;
sal_Int32 nEnd;
const bool bSuccess(
- pXMeta->SetContentRange(pTxtNode, nStart, nEnd) );
+ pXMeta->SetContentRange(pTextNode, nStart, nEnd) );
OSL_ENSURE(bSuccess, "no pam?");
if (bSuccess)
{
- const SwPosition end(*pTxtNode, nEnd);
+ const SwPosition end(*pTextNode, nEnd);
if ( (*pCursor->GetPoint() == end)
|| (*pCursor->GetMark() == end))
{
@@ -1029,13 +1029,13 @@ SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException, std::exc
{
rUnoCursor.Move( fnMoveBackward, fnGoDoc );
//check, that the cursor is not in a table
- SwTableNode * pTblNode = rUnoCursor.GetNode().FindTableNode();
- SwCntntNode * pCNode = 0;
- while (pTblNode)
+ SwTableNode * pTableNode = rUnoCursor.GetNode().FindTableNode();
+ SwContentNode * pCNode = 0;
+ while (pTableNode)
{
- rUnoCursor.GetPoint()->nNode = *pTblNode->EndOfSectionNode();
+ rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
pCNode = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode);
- pTblNode = (pCNode) ? pCNode->FindTableNode() : 0;
+ pTableNode = (pCNode) ? pCNode->FindTableNode() : 0;
}
if (pCNode)
{
@@ -1286,8 +1286,8 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand) throw (uno::RuntimeException, std::
SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
// end of paragraph
- if (rUnoCursor.GetCntntNode() &&
- (pPoint->nContent == rUnoCursor.GetCntntNode()->Len()))
+ if (rUnoCursor.GetContentNode() &&
+ (pPoint->nContent == rUnoCursor.GetContentNode()->Len()))
{
rUnoCursor.Right(1, CRSR_SKIP_CHARS, false, false);
}
@@ -1458,8 +1458,8 @@ SwXTextCursor::isEndOfSentence() throw (uno::RuntimeException, std::exception)
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
// end of paragraph?
- bool bRet = rUnoCursor.GetCntntNode() &&
- (rUnoCursor.GetPoint()->nContent == rUnoCursor.GetCntntNode()->Len());
+ bool bRet = rUnoCursor.GetContentNode() &&
+ (rUnoCursor.GetPoint()->nContent == rUnoCursor.GetContentNode()->Len());
// with mark->no sentence end
// (check if cursor is no selection, i.e. it does not have
// a mark or else point and mark are identical)
@@ -1758,9 +1758,9 @@ OUString SAL_CALL SwXTextCursor::getString() throw (uno::RuntimeException, std::
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
- OUString aTxt;
- SwUnoCursorHelper::GetTextFromPam(rUnoCursor, aTxt);
- return aTxt;
+ OUString aText;
+ SwUnoCursorHelper::GetTextFromPam(rUnoCursor, aText);
+ return aText;
}
void SAL_CALL
@@ -1829,7 +1829,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
// FN_UNO_PARA_STYLE is known to set attributes for nodes, inside
-// SwUnoCursorHelper::SetTxtFmtColl, instead of extending item set.
+// SwUnoCursorHelper::SetTextFormatColl, instead of extending item set.
// We need to get them from nodes in next call to GetCrsrAttr.
// The rest could cause similar problems in theory, so we just list them here.
inline bool propertyCausesSideEffectsInNodes(sal_uInt16 nWID)
@@ -2556,7 +2556,7 @@ throw (uno::RuntimeException, std::exception)
SwNode& node = rUnoCursor.GetNode();
- SwTxtNode* txtNode = node.GetTxtNode();
+ SwTextNode* txtNode = node.GetTextNode();
if (txtNode == 0) return;
@@ -2577,11 +2577,11 @@ throw (uno::RuntimeException, std::exception)
}
else return;
- SwFmtColl* fmtColl=txtNode->GetFmtColl();
+ SwFormatColl* fmtColl=txtNode->GetFormatColl();
if (fmtColl == 0) return;
- SwFmtChg aNew( fmtColl );
+ SwFormatChg aNew( fmtColl );
txtNode->NotifyClients( 0, &aNew );
}
@@ -2649,8 +2649,8 @@ SwUnoCursorHelper::CreateSortDescriptor(const bool bFromTable)
}
#if OSL_DEBUG_LEVEL > 1
- const OUString *pTxt = aSeq.getConstArray();
- (void)pTxt;
+ const OUString *pText = aSeq.getConstArray();
+ (void)pText;
#endif
pFields[0].Field = 1;
@@ -2795,10 +2795,10 @@ bool SwUnoCursorHelper::ConvertSortProperties(
bOldSortdescriptor = true;
sal_uInt16 nIndex = rPropName[17];
nIndex -= '0';
- OUString aTxt;
- if ((aValue >>= aTxt) && nIndex < 3)
+ OUString aText;
+ if ((aValue >>= aText) && nIndex < 3)
{
- aKeys[nIndex]->sSortType = aTxt;
+ aKeys[nIndex]->sSortType = aText;
}
else
{
@@ -2964,7 +2964,7 @@ SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor)
// update selection
rUnoCursor.DeleteMark();
rUnoCursor.GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
- SwCntntNode *const pCNd = rUnoCursor.GetCntntNode();
+ SwContentNode *const pCNd = rUnoCursor.GetContentNode();
sal_Int32 nLen = pCNd->Len();
if (nLen > nCntStt)
{
@@ -2974,7 +2974,7 @@ SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor)
rUnoCursor.SetMark();
rUnoCursor.GetPoint()->nNode += nOffset;
- SwCntntNode *const pCNd2 = rUnoCursor.GetCntntNode();
+ SwContentNode *const pCNd2 = rUnoCursor.GetContentNode();
rUnoCursor.GetPoint()->nContent.Assign( pCNd2, pCNd2->Len() );
}
}
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index bf5d910b615d..82d79d029bad 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -179,32 +179,32 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
const sal_uInt16 nChkType = static_cast< sal_uInt16 >((_bAtCharAnchoredObjs)
? FLY_AT_CHAR : FLY_AT_PARA);
- const SwCntntFrm* pCFrm;
- const SwCntntNode* pCNd;
+ const SwContentFrm* pCFrm;
+ const SwContentNode* pCNd;
if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() &&
- 0 != (pCNd = rIdx.GetNode().GetCntntNode()) &&
+ 0 != (pCNd = rIdx.GetNode().GetContentNode()) &&
0 != (pCFrm = pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout())) )
{
const SwSortedObjs *pObjs = pCFrm->GetDrawObjs();
if( pObjs )
{
- std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
+ std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
for( size_t i = 0; i < pObjs->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
- SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
+ SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat();
// Filter out textboxes, which are not interesting at an UNO level.
- if (aTextBoxes.find(&rFmt) != aTextBoxes.end())
+ if (aTextBoxes.find(&rFormat) != aTextBoxes.end())
continue;
- if ( rFmt.GetAnchor().GetAnchorId() == nChkType )
+ if ( rFormat.GetAnchor().GetAnchorId() == nChkType )
{
// create SwDepend and insert into array
- SwDepend* pNewDepend = new SwDepend( &rClnt, &rFmt );
+ SwDepend* pNewDepend = new SwDepend( &rClnt, &rFormat );
const sal_Int32 idx =
- rFmt.GetAnchor().GetCntntAnchor()->nContent.GetIndex();
- sal_uInt32 nOrder = rFmt.GetAnchor().GetOrder();
+ rFormat.GetAnchor().GetContentAnchor()->nContent.GetIndex();
+ sal_uInt32 nOrder = rFormat.GetAnchor().GetOrder();
// OD 2004-05-07 #i28701# - sorting no longer needed,
// because list <SwSortedObjs> is already sorted.
@@ -216,18 +216,18 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
}
else
{
- const SwFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
- const size_t nSize = rFmts.size();
+ const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+ const size_t nSize = rFormats.size();
for ( size_t i = 0; i < nSize; i++)
{
- const SwFrmFmt* pFmt = rFmts[ i ];
- const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
+ const SwFrameFormat* pFormat = rFormats[ i ];
+ const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
const SwPosition* pAnchorPos;
if( rAnchor.GetAnchorId() == nChkType &&
- 0 != (pAnchorPos = rAnchor.GetCntntAnchor()) &&
+ 0 != (pAnchorPos = rAnchor.GetContentAnchor()) &&
pAnchorPos->nNode == rIdx )
{
- SwDepend* pNewDepend = new SwDepend( &rClnt, const_cast<SwFrmFmt*>(pFmt));
+ SwDepend* pNewDepend = new SwDepend( &rClnt, const_cast<SwFrameFormat*>(pFormat));
// OD 2004-05-07 #i28701# - determine insert position for
// sorted <rFrameArr>
@@ -296,8 +296,8 @@ void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem
case RES_FMT_CHG:
// Is the move to the new one finished and will the old one be deleted?
- if( static_cast<const SwFmtChg*>(pNew)->pChangedFmt == pClient->GetRegisteredIn() &&
- static_cast<const SwFmtChg*>(pOld)->pChangedFmt->IsFmtInDTOR() )
+ if( static_cast<const SwFormatChg*>(pNew)->pChangedFormat == pClient->GetRegisteredIn() &&
+ static_cast<const SwFormatChg*>(pOld)->pChangedFormat->IsFormatInDTOR() )
static_cast<SwModify*>(pClient->GetRegisteredIn())->Remove(pClient);
break;
}
@@ -334,7 +334,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SfxItemState::DEFAULT )
{
- SwTxtNode * pTmpNode = rPam.GetNode().GetTxtNode();
+ SwTextNode * pTmpNode = rPam.GetNode().GetTextNode();
if ( pTmpNode )
{
rPam.GetDoc()->GetNodes().UpdateOutlineNode( *pTmpNode );
@@ -343,10 +343,10 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
}
// #i63870#
-// split third parameter <bCurrentAttrOnly> into new parameters <bOnlyTxtAttr>
-// and <bGetFromChrFmt> to get better control about resulting <SfxItemSet>
+// split third parameter <bCurrentAttrOnly> into new parameters <bOnlyTextAttr>
+// and <bGetFromChrFormat> to get better control about resulting <SfxItemSet>
void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam,
- SfxItemSet & rSet, const bool bOnlyTxtAttr, const bool bGetFromChrFmt)
+ SfxItemSet & rSet, const bool bOnlyTextAttr, const bool bGetFromChrFormat)
{
static const sal_uLong nMaxLookup = 1000;
SfxItemSet aSet( *rSet.GetPool(), rSet.GetRanges() );
@@ -378,14 +378,14 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam,
? rStart.nContent.GetIndex() : 0;
const sal_Int32 nEnd = (n == nEndNd)
? rEnd.nContent.GetIndex()
- : pNd->GetTxtNode()->GetTxt().getLength();
- pNd->GetTxtNode()->GetAttr(*pSet, nStart, nEnd, bOnlyTxtAttr, bGetFromChrFmt);
+ : pNd->GetTextNode()->GetText().getLength();
+ pNd->GetTextNode()->GetAttr(*pSet, nStart, nEnd, bOnlyTextAttr, bGetFromChrFormat);
}
break;
case ND_GRFNODE:
case ND_OLENODE:
- static_cast<SwCntntNode*>(pNd)->GetAttr( *pSet );
+ static_cast<SwContentNode*>(pNd)->GetAttr( *pSet );
break;
default:
@@ -539,11 +539,11 @@ SwXParagraphEnumeration::hasMoreElements() throw (uno::RuntimeException, std::ex
//!! compare to SwShellTableCrsr::FillRects() in viscrs.cxx
static SwTableNode *
lcl_FindTopLevelTable(
- SwTableNode *const pTblNode, SwTable const*const pOwnTable)
+ SwTableNode *const pTableNode, SwTable const*const pOwnTable)
{
// find top-most table in current context (section) level
- SwTableNode * pLast = pTblNode;
+ SwTableNode * pLast = pTableNode;
for (SwTableNode* pTmp = pLast;
pTmp != NULL && &pTmp->GetTable() != pOwnTable; /* we must not go up higher than the own table! */
pTmp = pTmp->StartOfSectionNode()->FindTableNode() )
@@ -598,11 +598,11 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
// os 2005-01-14: This part is only necessary to detect movements out
// of a selection; if there is no selection we don't have to care
- SwTableNode *const pTblNode = aNewCrsr->GetNode().FindTableNode();
+ SwTableNode *const pTableNode = aNewCrsr->GetNode().FindTableNode();
if (((CURSOR_TBLTEXT != m_eCursorType) &&
- (CURSOR_SELECTION_IN_TABLE != m_eCursorType)) && pTblNode)
+ (CURSOR_SELECTION_IN_TABLE != m_eCursorType)) && pTableNode)
{
- aNewCrsr->GetPoint()->nNode = pTblNode->EndOfSectionIndex();
+ aNewCrsr->GetPoint()->nNode = pTableNode->EndOfSectionIndex();
aNewCrsr->Move(fnMoveForward, fnGoNode);
}
else
@@ -620,12 +620,12 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
{
pUnoCrsr->SetRemainInSection( false );
// what to do if already in a table?
- SwTableNode * pTblNode = pUnoCrsr->GetNode().FindTableNode();
- pTblNode = lcl_FindTopLevelTable( pTblNode, m_pOwnTable );
- if (pTblNode && (&pTblNode->GetTable() != m_pOwnTable))
+ SwTableNode * pTableNode = pUnoCrsr->GetNode().FindTableNode();
+ pTableNode = lcl_FindTopLevelTable( pTableNode, m_pOwnTable );
+ if (pTableNode && (&pTableNode->GetTable() != m_pOwnTable))
{
// this is a foreign table: go to end
- pUnoCrsr->GetPoint()->nNode = pTblNode->EndOfSectionIndex();
+ pUnoCrsr->GetPoint()->nNode = pTableNode->EndOfSectionIndex();
if (!pUnoCrsr->Move(fnMoveForward, fnGoNode))
{
return 0;
@@ -649,21 +649,21 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
(m_nEndIndex == pStart->nNode.GetIndex()) ? m_nLastParaEnd : -1;
// position in a table, or in a simple paragraph?
- SwTableNode * pTblNode = pUnoCrsr->GetNode().FindTableNode();
- pTblNode = lcl_FindTopLevelTable( pTblNode, m_pOwnTable );
+ SwTableNode * pTableNode = pUnoCrsr->GetNode().FindTableNode();
+ pTableNode = lcl_FindTopLevelTable( pTableNode, m_pOwnTable );
if (/*CURSOR_TBLTEXT != eCursorType && CURSOR_SELECTION_IN_TABLE != eCursorType && */
- pTblNode && (&pTblNode->GetTable() != m_pOwnTable))
+ pTableNode && (&pTableNode->GetTable() != m_pOwnTable))
{
// this is a foreign table
- SwFrmFmt* pTableFmt =
- static_cast<SwFrmFmt*>(pTblNode->GetTable().GetFrmFmt());
- xRef = SwXTextTable::CreateXTextTable(pTableFmt);
+ SwFrameFormat* pTableFormat =
+ static_cast<SwFrameFormat*>(pTableNode->GetTable().GetFrameFormat());
+ xRef = SwXTextTable::CreateXTextTable(pTableFormat);
}
else
{
text::XText *const pText = m_xParentText.get();
xRef = SwXParagraph::CreateXParagraph(*pUnoCrsr->GetDoc(),
- pStart->nNode.GetNode().GetTxtNode(),
+ pStart->nNode.GetNode().GetTextNode(),
static_cast<SwXText*>(pText), nFirstContent, nLastContent);
}
}
@@ -706,14 +706,14 @@ public:
::sw::mark::IMark * m_pMark;
Impl( SwDoc & rDoc, const enum RangePosition eRange,
- SwFrmFmt *const pTblFmt = 0,
+ SwFrameFormat *const pTableFormat = 0,
const uno::Reference< text::XText > & xParent = 0)
: SwClient()
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR))
, m_eRangePosition(eRange)
, m_rDoc(rDoc)
, m_xParentText(xParent)
- , m_ObjectDepend(this, pTblFmt)
+ , m_ObjectDepend(this, pTableFormat)
, m_pMark(0)
{
}
@@ -775,13 +775,13 @@ SwXTextRange::SwXTextRange(SwPaM& rPam,
SetPositions(rPam);
}
-SwXTextRange::SwXTextRange(SwFrmFmt& rTblFmt)
+SwXTextRange::SwXTextRange(SwFrameFormat& rTableFormat)
: m_pImpl(
- new SwXTextRange::Impl(*rTblFmt.GetDoc(), RANGE_IS_TABLE, &rTblFmt) )
+ new SwXTextRange::Impl(*rTableFormat.GetDoc(), RANGE_IS_TABLE, &rTableFormat) )
{
- SwTable *const pTable = SwTable::FindTable( &rTblFmt );
- SwTableNode *const pTblNode = pTable->GetTableNode();
- SwPosition aPosition( *pTblNode );
+ SwTable *const pTable = SwTable::FindTable( &rTableFormat );
+ SwTableNode *const pTableNode = pTable->GetTableNode();
+ SwPosition aPosition( *pTableNode );
SwPaM aPam( aPosition );
SetPositions( aPam );
@@ -910,11 +910,11 @@ SwXTextRange::getText() throw (uno::RuntimeException, std::exception)
if (m_pImpl->m_eRangePosition == RANGE_IS_TABLE &&
m_pImpl->m_ObjectDepend.GetRegisteredIn())
{
- SwFrmFmt const*const pTblFmt = static_cast<SwFrmFmt const*>(
+ SwFrameFormat const*const pTableFormat = static_cast<SwFrameFormat const*>(
m_pImpl->m_ObjectDepend.GetRegisteredIn());
- SwTable const*const pTable = SwTable::FindTable( pTblFmt );
- SwTableNode const*const pTblNode = pTable->GetTableNode();
- const SwPosition aPosition( *pTblNode );
+ SwTable const*const pTable = SwTable::FindTable( pTableFormat );
+ SwTableNode const*const pTableNode = pTable->GetTableNode();
+ const SwPosition aPosition( *pTableNode );
m_pImpl->m_xParentText =
::sw::CreateParentXText(m_pImpl->m_rDoc, aPosition);
}
@@ -1096,28 +1096,28 @@ bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill,
static bool
lcl_IsStartNodeInFormat(const bool bHeader, SwStartNode *const pSttNode,
- SwFrmFmt const*const pFrmFmt, SwFrmFmt*& rpFormat)
+ SwFrameFormat const*const pFrameFormat, SwFrameFormat*& rpFormat)
{
bool bRet = false;
- const SfxItemSet& rSet = pFrmFmt->GetAttrSet();
+ const SfxItemSet& rSet = pFrameFormat->GetAttrSet();
const SfxPoolItem* pItem;
if (SfxItemState::SET == rSet.GetItemState(
static_cast<sal_uInt16>(bHeader ? RES_HEADER : RES_FOOTER),
true, &pItem))
{
SfxPoolItem *const pItemNonConst(const_cast<SfxPoolItem *>(pItem));
- SwFrmFmt *const pHeadFootFmt = (bHeader) ?
- static_cast<SwFmtHeader*>(pItemNonConst)->GetHeaderFmt() :
- static_cast<SwFmtFooter*>(pItemNonConst)->GetFooterFmt();
- if (pHeadFootFmt)
+ SwFrameFormat *const pHeadFootFormat = (bHeader) ?
+ static_cast<SwFormatHeader*>(pItemNonConst)->GetHeaderFormat() :
+ static_cast<SwFormatFooter*>(pItemNonConst)->GetFooterFormat();
+ if (pHeadFootFormat)
{
- const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt();
- const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode();
+ const SwFormatContent& rFlyContent = pHeadFootFormat->GetContent();
+ const SwNode& rNode = rFlyContent.GetContentIdx()->GetNode();
SwStartNode const*const pCurSttNode = rNode.FindSttNodeByType(
(bHeader) ? SwHeaderStartNode : SwFooterStartNode);
if (pCurSttNode && (pCurSttNode == pSttNode))
{
- rpFormat = pHeadFootFmt;
+ rpFormat = pHeadFootFormat;
bRet = true;
}
}
@@ -1163,22 +1163,22 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos)
{
case SwTableBoxStartNode:
{
- SwTableNode const*const pTblNode = pSttNode->FindTableNode();
- SwFrmFmt *const pTableFmt =
- static_cast<SwFrmFmt*>(pTblNode->GetTable().GetFrmFmt());
- SwTableBox *const pBox = pSttNode->GetTblBox();
+ SwTableNode const*const pTableNode = pSttNode->FindTableNode();
+ SwFrameFormat *const pTableFormat =
+ static_cast<SwFrameFormat*>(pTableNode->GetTable().GetFrameFormat());
+ SwTableBox *const pBox = pSttNode->GetTableBox();
xParentText = (pBox)
- ? SwXCell::CreateXCell( pTableFmt, pBox )
- : new SwXCell( pTableFmt, *pSttNode );
+ ? SwXCell::CreateXCell( pTableFormat, pBox )
+ : new SwXCell( pTableFormat, *pSttNode );
}
break;
case SwFlyStartNode:
{
- SwFrmFmt *const pFmt = pSttNode->GetFlyFmt();
- if (0 != pFmt)
+ SwFrameFormat *const pFormat = pSttNode->GetFlyFormat();
+ if (0 != pFormat)
{
- xParentText.set(SwXTextFrame::CreateXTextFrame(rDoc, pFmt),
+ xParentText.set(SwXTextFrame::CreateXTextFrame(rDoc, pFormat),
uno::UNO_QUERY);
}
}
@@ -1191,46 +1191,46 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos)
for(size_t i = 0; i < nPDescCount; i++)
{
const SwPageDesc& rDesc = rDoc.GetPageDesc( i );
- const SwFrmFmt* pFrmFmtMaster = &rDesc.GetMaster();
- const SwFrmFmt* pFrmFmtLeft = &rDesc.GetLeft();
+ const SwFrameFormat* pFrameFormatMaster = &rDesc.GetMaster();
+ const SwFrameFormat* pFrameFormatLeft = &rDesc.GetLeft();
- SwFrmFmt* pHeadFootFmt = 0;
- if (!lcl_IsStartNodeInFormat(bHeader, pSttNode, pFrmFmtMaster,
- pHeadFootFmt))
+ SwFrameFormat* pHeadFootFormat = 0;
+ if (!lcl_IsStartNodeInFormat(bHeader, pSttNode, pFrameFormatMaster,
+ pHeadFootFormat))
{
- lcl_IsStartNodeInFormat(bHeader, pSttNode, pFrmFmtLeft,
- pHeadFootFmt);
+ lcl_IsStartNodeInFormat(bHeader, pSttNode, pFrameFormatLeft,
+ pHeadFootFormat);
}
- if (pHeadFootFmt)
+ if (pHeadFootFormat)
{
xParentText = SwXHeadFootText::CreateXHeadFootText(
- *pHeadFootFmt, bHeader);
+ *pHeadFootFormat, bHeader);
}
}
}
break;
case SwFootnoteStartNode:
{
- const size_t nFtnCnt = rDoc.GetFtnIdxs().size();
+ const size_t nFootnoteCnt = rDoc.GetFootnoteIdxs().size();
uno::Reference< text::XFootnote > xRef;
- for (size_t n = 0; n < nFtnCnt; ++n )
+ for (size_t n = 0; n < nFootnoteCnt; ++n )
{
- const SwTxtFtn* pTxtFtn = rDoc.GetFtnIdxs()[ n ];
- const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
- pTxtFtn = rFtn.GetTxtFtn();
+ const SwTextFootnote* pTextFootnote = rDoc.GetFootnoteIdxs()[ n ];
+ const SwFormatFootnote& rFootnote = pTextFootnote->GetFootnote();
+ pTextFootnote = rFootnote.GetTextFootnote();
#if OSL_DEBUG_LEVEL > 1
const SwStartNode* pTmpSttNode =
- pTxtFtn->GetStartNode()->GetNode().
+ pTextFootnote->GetStartNode()->GetNode().
FindSttNodeByType(SwFootnoteStartNode);
(void)pTmpSttNode;
#endif
- if (pSttNode == pTxtFtn->GetStartNode()->GetNode().
+ if (pSttNode == pTextFootnote->GetStartNode()->GetNode().
FindSttNodeByType(SwFootnoteStartNode))
{
xParentText.set(SwXFootnote::CreateXFootnote(rDoc,
- &const_cast<SwFmtFtn&>(rFtn)), uno::UNO_QUERY);
+ &const_cast<SwFormatFootnote&>(rFootnote)), uno::UNO_QUERY);
break;
}
}
@@ -1736,13 +1736,13 @@ lcl_CreateNextObject(SwUnoCrsr& i_rUnoCrsr,
if (!i_rFrames.size())
return false;
- SwFrmFmt *const pFormat = static_cast<SwFrmFmt*>(const_cast<SwModify*>(
+ SwFrameFormat *const pFormat = static_cast<SwFrameFormat*>(const_cast<SwModify*>(
i_rFrames.front()->GetRegisteredIn()));
i_rFrames.pop_front();
// the format should be valid here, otherwise the client
// would have been removed in ::Modify
// check for a shape first
- SwDrawContact* const pContact = SwIterator<SwDrawContact,SwFmt>( *pFormat ).First();
+ SwDrawContact* const pContact = SwIterator<SwDrawContact,SwFormat>( *pFormat ).First();
if (pContact)
{
SdrObject * const pSdr = pContact->GetMaster();
@@ -1753,12 +1753,12 @@ lcl_CreateNextObject(SwUnoCrsr& i_rUnoCrsr,
}
else
{
- const SwNodeIndex* pIdx = pFormat->GetCntnt().GetCntntIdx();
+ const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
OSL_ENSURE(pIdx, "where is the index?");
SwNode const*const pNd =
i_rUnoCrsr.GetDoc()->GetNodes()[ pIdx->GetIndex() + 1 ];
- if (!pNd->IsNoTxtNode())
+ if (!pNd->IsNoTextNode())
{
o_rNextObject.set(SwXTextFrame::CreateXTextFrame(
*pFormat->GetDoc(), pFormat));
@@ -1786,22 +1786,22 @@ lcl_FillFrame(SwClient & rEnum, SwUnoCrsr& rUnoCrsr,
FrameDependList_t & rFrames)
{
// search for objects at the cursor - anchored at/as char
- SwTxtAttr const*const pTxtAttr = (rUnoCrsr.GetNode().IsTxtNode())
- ? rUnoCrsr.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
+ SwTextAttr const*const pTextAttr = (rUnoCrsr.GetNode().IsTextNode())
+ ? rUnoCrsr.GetNode().GetTextNode()->GetTextAttrForCharAt(
rUnoCrsr.GetPoint()->nContent.GetIndex(), RES_TXTATR_FLYCNT)
: 0;
- if (pTxtAttr)
+ if (pTextAttr)
{
- const SwFmtFlyCnt& rFlyCnt = pTxtAttr->GetFlyCnt();
- SwFrmFmt * const pFrmFmt = rFlyCnt.GetFrmFmt();
- SwDepend * const pNewDepend = new SwDepend(&rEnum, pFrmFmt);
+ const SwFormatFlyCnt& rFlyCnt = pTextAttr->GetFlyCnt();
+ SwFrameFormat * const pFrameFormat = rFlyCnt.GetFrameFormat();
+ SwDepend * const pNewDepend = new SwDepend(&rEnum, pFrameFormat);
rFrames.push_back( ::boost::shared_ptr<SwDepend>(pNewDepend) );
}
}
SwXParaFrameEnumeration::SwXParaFrameEnumeration(
const SwPaM& rPaM, const enum ParaFrameMode eParaFrameMode,
- SwFrmFmt *const pFmt)
+ SwFrameFormat *const pFormat)
: m_pImpl( new SwXParaFrameEnumeration::Impl(rPaM) )
{
if (PARAFRAME_PORTION_PARAGRAPH == eParaFrameMode)
@@ -1813,10 +1813,10 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(
::std::back_inserter(m_pImpl->m_Frames),
::boost::bind(&FrameDependSortListEntry::pFrameDepend, _1));
}
- else if (pFmt)
+ else if (pFormat)
{
// create SwDepend for frame and insert into array
- SwDepend *const pNewDepend = new SwDepend(m_pImpl.get(), pFmt);
+ SwDepend *const pNewDepend = new SwDepend(m_pImpl.get(), pFormat);
m_pImpl->m_Frames.push_back(::boost::shared_ptr<SwDepend>(pNewDepend));
}
else if ((PARAFRAME_PORTION_CHAR == eParaFrameMode) ||
@@ -1825,14 +1825,14 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(
if (PARAFRAME_PORTION_TEXTRANGE == eParaFrameMode)
{
//get all frames that are bound at paragraph or at character
- SwPosFlyFrms aFlyFrms(rPaM.GetDoc()->GetAllFlyFmts(m_pImpl->GetCursor(), false, true));
+ SwPosFlyFrms aFlyFrms(rPaM.GetDoc()->GetAllFlyFormats(m_pImpl->GetCursor(), false, true));
for(SwPosFlyFrms::const_iterator aIter(aFlyFrms.begin()); aIter != aFlyFrms.end(); ++aIter)
{
- SwFrmFmt *const pFrmFmt = const_cast<SwFrmFmt*>(&((*aIter)->GetFmt()));
+ SwFrameFormat *const pFrameFormat = const_cast<SwFrameFormat*>(&((*aIter)->GetFormat()));
// create SwDepend for frame and insert into array
- SwDepend *const pNewDepend = new SwDepend(m_pImpl.get(), pFrmFmt);
+ SwDepend *const pNewDepend = new SwDepend(m_pImpl.get(), pFrameFormat);
m_pImpl->m_Frames.push_back(::boost::shared_ptr<SwDepend>(pNewDepend));
}
}
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index bfc67557d4e3..3c188940d487 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -79,7 +79,7 @@ SwParaSelection::SwParaSelection(SwCursor & rCursor)
m_rCursor.MovePara(fnParaCurr, fnParaStart);
}
// or at the end already?
- if (m_rCursor.GetPoint()->nContent != m_rCursor.GetCntntNode()->Len())
+ if (m_rCursor.GetPoint()->nContent != m_rCursor.GetContentNode()->Len())
{
m_rCursor.SetMark();
m_rCursor.MovePara(fnParaCurr, fnParaEnd);
@@ -96,7 +96,7 @@ SwParaSelection::~SwParaSelection()
}
static beans::PropertyState lcl_SwXParagraph_getPropertyState(
- const SwTxtNode& rTxtNode,
+ const SwTextNode& rTextNode,
const SwAttrSet** ppSet,
const SfxItemPropertySimpleEntry& rEntry,
bool &rAttrSetFetched )
@@ -120,30 +120,30 @@ public:
uno::Reference<text::XText> m_xParentText;
Impl( SwXParagraph & rThis,
- SwTxtNode *const pTxtNode = 0,
+ SwTextNode *const pTextNode = 0,
uno::Reference< text::XText > const & xParent = 0,
const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = -1)
- : SwClient(pTxtNode)
+ : SwClient(pTextNode)
, m_rThis(rThis)
, m_EventListeners(m_Mutex)
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH))
- , m_bIsDescriptor(0 == pTxtNode)
+ , m_bIsDescriptor(0 == pTextNode)
, m_nSelectionStartPos(nSelStart)
, m_nSelectionEndPos(nSelEnd)
, m_xParentText(xParent)
{
}
- SwTxtNode* GetTxtNode() {
- return static_cast<SwTxtNode*>(GetRegisteredInNonConst());
+ SwTextNode* GetTextNode() {
+ return static_cast<SwTextNode*>(GetRegisteredInNonConst());
}
- SwTxtNode & GetTxtNodeOrThrow() {
- SwTxtNode *const pTxtNode( GetTxtNode() );
- if (!pTxtNode) {
+ SwTextNode & GetTextNodeOrThrow() {
+ SwTextNode *const pTextNode( GetTextNode() );
+ if (!pTextNode) {
throw uno::RuntimeException("SwXParagraph: disposed or invalid", 0);
}
- return *pTxtNode;
+ return *pTextNode;
}
bool IsDescriptor() const { return m_bIsDescriptor; }
@@ -203,10 +203,10 @@ SwXParagraph::SwXParagraph()
SwXParagraph::SwXParagraph(
uno::Reference< text::XText > const & xParent,
- SwTxtNode & rTxtNode,
+ SwTextNode & rTextNode,
const sal_Int32 nSelStart, const sal_Int32 nSelEnd)
: m_pImpl(
- new SwXParagraph::Impl(*this, &rTxtNode, xParent, nSelStart, nSelEnd))
+ new SwXParagraph::Impl(*this, &rTextNode, xParent, nSelStart, nSelEnd))
{
}
@@ -214,9 +214,9 @@ SwXParagraph::~SwXParagraph()
{
}
-const SwTxtNode * SwXParagraph::GetTxtNode() const
+const SwTextNode * SwXParagraph::GetTextNode() const
{
- return m_pImpl->GetTxtNode();
+ return m_pImpl->GetTextNode();
}
bool SwXParagraph::IsDescriptor() const
@@ -225,16 +225,16 @@ bool SwXParagraph::IsDescriptor() const
}
uno::Reference<text::XTextContent>
-SwXParagraph::CreateXParagraph(SwDoc & rDoc, SwTxtNode *const pTxtNode,
+SwXParagraph::CreateXParagraph(SwDoc & rDoc, SwTextNode *const pTextNode,
uno::Reference< text::XText> const& i_xParent,
const sal_Int32 nSelStart, const sal_Int32 nSelEnd)
{
// re-use existing SwXParagraph
// #i105557#: do not iterate over the registered clients: race condition
uno::Reference<text::XTextContent> xParagraph;
- if (pTxtNode && (-1 == nSelStart) && (-1 == nSelEnd))
+ if (pTextNode && (-1 == nSelStart) && (-1 == nSelEnd))
{ // only use cache if no selection!
- xParagraph.set(pTxtNode->GetXParagraph());
+ xParagraph.set(pTextNode->GetXParagraph());
}
if (xParagraph.is())
{
@@ -243,20 +243,20 @@ SwXParagraph::CreateXParagraph(SwDoc & rDoc, SwTxtNode *const pTxtNode,
// create new SwXParagraph
uno::Reference<text::XText> xParentText(i_xParent);
- if (!xParentText.is() && pTxtNode)
+ if (!xParentText.is() && pTextNode)
{
- SwPosition Pos(*pTxtNode);
+ SwPosition Pos(*pTextNode);
xParentText.set(::sw::CreateParentXText( rDoc, Pos ));
}
- SwXParagraph *const pXPara( (pTxtNode)
- ? new SwXParagraph(xParentText, *pTxtNode, nSelStart, nSelEnd)
+ SwXParagraph *const pXPara( (pTextNode)
+ ? new SwXParagraph(xParentText, *pTextNode, nSelStart, nSelEnd)
: new SwXParagraph);
// this is why the constructor is private: need to acquire pXPara here
xParagraph.set(pXPara);
// in order to initialize the weak pointer cache in the core object
- if (pTxtNode && (-1 == nSelStart) && (-1 == nSelEnd))
+ if (pTextNode && (-1 == nSelStart) && (-1 == nSelEnd))
{
- pTxtNode->SetXParagraph(xParagraph);
+ pTextNode->SetXParagraph(xParagraph);
}
// need a permanent Reference to initialize m_wThis
pXPara->m_pImpl->m_wThis = xParagraph;
@@ -265,17 +265,17 @@ SwXParagraph::CreateXParagraph(SwDoc & rDoc, SwTxtNode *const pTxtNode,
bool SwXParagraph::SelectPaM(SwPaM & rPaM)
{
- SwTxtNode const*const pTxtNode( GetTxtNode() );
+ SwTextNode const*const pTextNode( GetTextNode() );
- if (!pTxtNode)
+ if (!pTextNode)
{
return false;
}
- *rPaM.GetPoint() = SwPosition( *pTxtNode );
+ *rPaM.GetPoint() = SwPosition( *pTextNode );
// set selection to the whole paragraph
rPaM.SetMark();
- rPaM.GetMark()->nContent = pTxtNode->GetTxt().getLength();
+ rPaM.GetMark()->nContent = pTextNode->GetText().getLength();
return true;
}
@@ -332,14 +332,14 @@ SwXParagraph::getSupportedServiceNames() throw (uno::RuntimeException, std::exce
}
void
-SwXParagraph::attachToText(SwXText & rParent, SwTxtNode & rTxtNode)
+SwXParagraph::attachToText(SwXText & rParent, SwTextNode & rTextNode)
{
OSL_ENSURE(m_pImpl->m_bIsDescriptor, "Paragraph is not a descriptor");
if (m_pImpl->m_bIsDescriptor)
{
m_pImpl->m_bIsDescriptor = false;
- rTxtNode.Add(m_pImpl.get());
- rTxtNode.SetXParagraph(uno::Reference<text::XTextContent>(this));
+ rTextNode.Add(m_pImpl.get());
+ rTextNode.SetXParagraph(uno::Reference<text::XTextContent>(this));
m_pImpl->m_xParentText = &rParent;
if (!m_pImpl->m_sText.isEmpty())
{
@@ -396,9 +396,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- SwTxtNode & rTxtNode(GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(GetTextNodeOrThrow());
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwCursor aCursor( aPos, 0, false );
const OUString* pPropertyNames = rPropertyNames.getConstArray();
const uno::Any* pValues = rValues.getConstArray();
@@ -548,15 +548,15 @@ uno::Sequence< uno::Any > SwXParagraph::Impl::GetPropertyValues_Impl(
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- SwTxtNode & rTxtNode(GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(GetTextNodeOrThrow());
uno::Sequence< uno::Any > aValues(rPropertyNames.getLength());
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwPaM aPam( aPos );
uno::Any* pValues = aValues.getArray();
const OUString* pPropertyNames = rPropertyNames.getConstArray();
const SfxItemPropertyMap &rMap = m_rPropSet.getPropertyMap();
- const SwAttrSet& rAttrSet( rTxtNode.GetSwAttrSet() );
+ const SwAttrSet& rAttrSet( rTextNode.GetSwAttrSet() );
for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
{
SfxItemPropertySimpleEntry const*const pEntry =
@@ -572,7 +572,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
beans::PropertyState eTemp;
const bool bDone = SwUnoCursorHelper::getCrsrPropertyValue(
- *pEntry, aPam, &(pValues[nProp]), eTemp, &rTxtNode );
+ *pEntry, aPam, &(pValues[nProp]), eTemp, &rTextNode );
if (!bDone)
{
//UUUU
@@ -647,10 +647,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
throw lang::IllegalArgumentException();
}
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
- //SwNode& rTxtNode = pUnoCrsr->GetPoint()->nNode.GetNode();
- //const SwAttrSet& rAttrSet = static_cast<SwTxtNode&>(rTxtNode).GetSwAttrSet();
+ //SwNode& rTextNode = pUnoCrsr->GetPoint()->nNode.GetNode();
+ //const SwAttrSet& rAttrSet = static_cast<SwTextNode&>(rTextNode).GetSwAttrSet();
//sal_uInt16 nAttrCount = rAttrSet.Count();
const sal_Int32 nProps = rPropertyNames.getLength();
@@ -667,7 +667,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
const SfxItemPropertyMap &rPropMap =
m_pImpl->m_rPropSet.getPropertyMap();
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwCursor aCursor( aPos, 0, false );
SwParaSelection aParaSel( aCursor );
for (sal_Int32 i = 0; i < nProps; ++i)
@@ -768,13 +768,13 @@ throw (uno::RuntimeException)
{
SolarMutexGuard aGuard;
- SwTxtNode & rTxtNode(GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(GetTextNodeOrThrow());
// #i46786# Use SwAttrSet pointer for determining the state.
// Use the value SwAttrSet (from the paragraph OR the style)
// for determining the actual value(s).
- const SwAttrSet* pAttrSet = rTxtNode.GetpSwAttrSet();
- const SwAttrSet& rValueAttrSet = rTxtNode.GetSwAttrSet();
+ const SwAttrSet* pAttrSet = rTextNode.GetpSwAttrSet();
+ const SwAttrSet& rValueAttrSet = rTextNode.GetSwAttrSet();
sal_Int32 nProps = rPropertyNames.getLength();
const OUString *pProp = rPropertyNames.getConstArray();
@@ -808,7 +808,7 @@ throw (uno::RuntimeException)
// (compare to SwXParagraph::getPropertyState)
bool bAttrSetFetched = true;
beans::PropertyState eState = lcl_SwXParagraph_getPropertyState(
- rTxtNode, &pAttrSet, *pEntry, bAttrSetFetched );
+ rTextNode, &pAttrSet, *pEntry, bAttrSetFetched );
rResult.State = eState;
rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_FAILURE;
@@ -821,14 +821,14 @@ throw (uno::RuntimeException)
if (! ::sw::GetDefaultTextContentValue(
aValue, pProp[i], pEntry->nWID ) )
{
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwPaM aPam( aPos );
// handle properties that are not part of the attribute
// and thus only pretendend to be paragraph attributes
beans::PropertyState eTemp;
const bool bDone =
SwUnoCursorHelper::getCrsrPropertyValue(
- *pEntry, aPam, &aValue, eTemp, &rTxtNode );
+ *pEntry, aPam, &aValue, eTemp, &rTextNode );
// if not found try the real paragraph attributes...
if (!bDone)
@@ -948,7 +948,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
static beans::PropertyState lcl_SwXParagraph_getPropertyState(
- const SwTxtNode& rTxtNode,
+ const SwTextNode& rTextNode,
const SwAttrSet** ppSet,
const SfxItemPropertySimpleEntry& rEntry,
bool &rAttrSetFetched)
@@ -958,11 +958,11 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState(
if(!(*ppSet) && !rAttrSetFetched)
{
- (*ppSet) = rTxtNode.GetpSwAttrSet();
+ (*ppSet) = rTextNode.GetpSwAttrSet();
rAttrSetFetched = true;
}
- SwPosition aPos(rTxtNode);
+ SwPosition aPos(rTextNode);
SwPaM aPam(aPos);
bool bDone(false);
@@ -993,8 +993,8 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState(
case FN_UNO_PARA_STYLE:
case FN_UNO_PARA_CONDITIONAL_STYLE_NAME:
{
- SwFmtColl* pFmt = SwUnoCursorHelper::GetCurTxtFmtColl(aPam,rEntry.nWID == FN_UNO_PARA_CONDITIONAL_STYLE_NAME);
- eRet = pFmt ? beans::PropertyState_DIRECT_VALUE : beans::PropertyState_AMBIGUOUS_VALUE;
+ SwFormatColl* pFormat = SwUnoCursorHelper::GetCurTextFormatColl(aPam,rEntry.nWID == FN_UNO_PARA_CONDITIONAL_STYLE_NAME);
+ eRet = pFormat ? beans::PropertyState_DIRECT_VALUE : beans::PropertyState_AMBIGUOUS_VALUE;
bDone = true;
break;
}
@@ -1059,7 +1059,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
const SwAttrSet* pSet = 0;
SfxItemPropertySimpleEntry const*const pEntry =
@@ -1072,7 +1072,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
}
bool bDummy = false;
const beans::PropertyState eRet =
- lcl_SwXParagraph_getPropertyState(rTxtNode, &pSet, *pEntry, bDummy);
+ lcl_SwXParagraph_getPropertyState(rTextNode, &pSet, *pEntry, bDummy);
return eRet;
}
@@ -1083,7 +1083,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
const OUString* pNames = PropertyNames.getConstArray();
uno::Sequence< beans::PropertyState > aRet(PropertyNames.getLength());
@@ -1111,7 +1111,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
else
{
*pStates = lcl_SwXParagraph_getPropertyState(
- rTxtNode, &pSet, *pEntry, bAttrSetFetched );
+ rTextNode, &pSet, *pEntry, bAttrSetFetched );
}
}
@@ -1124,9 +1124,9 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwCursor aCursor( aPos, 0, false );
if (rPropertyName == UNO_NAME_ANCHOR_TYPE ||
rPropertyName == UNO_NAME_ANCHOR_TYPES ||
@@ -1215,7 +1215,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
SolarMutexGuard g;
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
uno::Any aRet;
if (::sw::GetDefaultTextContentValue(aRet, rPropertyName))
@@ -1237,7 +1237,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
if(bBelowFrmAtrEnd || bDrawingLayerRange)
{
- const SfxPoolItem& rDefItem = rTxtNode.GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
+ const SfxPoolItem& rDefItem = rTextNode.GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
@@ -1261,9 +1261,9 @@ SwXParagraph::getAnchor() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwCursor aCursor( aPos, 0, false );
// select paragraph
SwParaSelection aParaSel( aCursor );
@@ -1276,11 +1276,11 @@ void SAL_CALL SwXParagraph::dispose() throw (uno::RuntimeException, std::excepti
{
SolarMutexGuard aGuard;
- SwTxtNode *const pTxtNode( m_pImpl->GetTxtNode() );
- if (pTxtNode)
+ SwTextNode *const pTextNode( m_pImpl->GetTextNode() );
+ if (pTextNode)
{
- SwCursor aCursor( SwPosition( *pTxtNode ), 0, false );
- pTxtNode->GetDoc()->getIDocumentContentOperations().DelFullPara(aCursor);
+ SwCursor aCursor( SwPosition( *pTextNode ), 0, false );
+ pTextNode->GetDoc()->getIDocumentContentOperations().DelFullPara(aCursor);
lang::EventObject const ev(static_cast< ::cppu::OWeakObject&>(*this));
m_pImpl->m_EventListeners.disposeAndClear(ev);
}
@@ -1307,9 +1307,9 @@ SwXParagraph::createEnumeration() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwPaM aPam ( aPos );
const uno::Reference< container::XEnumeration > xRef =
new SwXTextPortionEnumeration(aPam, m_pImpl->m_xParentText,
@@ -1325,7 +1325,7 @@ uno::Type SAL_CALL SwXParagraph::getElementType() throw (uno::RuntimeException,
sal_Bool SAL_CALL SwXParagraph::hasElements() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return GetTxtNode() != nullptr;
+ return GetTextNode() != nullptr;
}
uno::Reference< text::XText > SAL_CALL
@@ -1341,9 +1341,9 @@ SwXParagraph::getStart() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwCursor aCursor( aPos, 0, false );
SwParaSelection aParaSel( aCursor );
SwPaM aPam( *aCursor.Start() );
@@ -1358,9 +1358,9 @@ SwXParagraph::getEnd() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwCursor aCursor( aPos, 0, false );
SwParaSelection aParaSel( aCursor );
SwPaM aPam( *aCursor.End() );
@@ -1374,10 +1374,10 @@ OUString SAL_CALL SwXParagraph::getString() throw (uno::RuntimeException, std::e
{
SolarMutexGuard aGuard;
OUString aRet;
- SwTxtNode const*const pTxtNode( GetTxtNode() );
- if (pTxtNode)
+ SwTextNode const*const pTextNode( GetTextNode() );
+ if (pTextNode)
{
- SwPosition aPos( *pTxtNode );
+ SwPosition aPos( *pTextNode );
SwCursor aCursor( aPos, 0, false );
SwParaSelection aParaSel( aCursor );
SwUnoCursorHelper::GetTextFromPam(aCursor, aRet);
@@ -1398,16 +1398,16 @@ throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwTxtNode const*const pTxtNode( GetTxtNode() );
- if (pTxtNode)
+ SwTextNode const*const pTextNode( GetTextNode() );
+ if (pTextNode)
{
- SwPosition aPos( *pTxtNode );
+ SwPosition aPos( *pTextNode );
SwCursor aCursor( aPos, 0, false );
if (!SwUnoCursorHelper::IsStartOfPara(aCursor)) {
aCursor.MovePara(fnParaCurr, fnParaStart);
}
SwUnoCursorHelper::SelectPam(aCursor, true);
- if (pTxtNode->GetTxt().getLength()) {
+ if (pTextNode->GetText().getLength()) {
aCursor.MovePara(fnParaCurr, fnParaEnd);
}
SwUnoCursorHelper::SetString(aCursor, aString);
@@ -1434,9 +1434,9 @@ throw (uno::RuntimeException, std::exception)
throw uno::RuntimeException();
}
- SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
+ SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
- SwPosition aPos( rTxtNode );
+ SwPosition aPos( rTextNode );
SwPaM aPam( aPos );
uno::Reference< container::XEnumeration > xRet =
new SwXParaFrameEnumeration(aPam, PARAFRAME_PORTION_PARAGRAPH);
@@ -1455,16 +1455,16 @@ SwXParagraph::getAvailableServiceNames() throw (uno::RuntimeException, std::exce
// MetadatableMixin
::sfx2::Metadatable* SwXParagraph::GetCoreObject()
{
- SwTxtNode *const pTxtNode( m_pImpl->GetTxtNode() );
- return pTxtNode;
+ SwTextNode *const pTextNode( m_pImpl->GetTextNode() );
+ return pTextNode;
}
uno::Reference<frame::XModel> SwXParagraph::GetModel()
{
- SwTxtNode *const pTxtNode( m_pImpl->GetTxtNode() );
- if (pTxtNode)
+ SwTextNode *const pTextNode( m_pImpl->GetTextNode() );
+ if (pTextNode)
{
- SwDocShell const*const pShell( pTxtNode->GetDoc()->GetDocShell() );
+ SwDocShell const*const pShell( pTextNode->GetDoc()->GetDocShell() );
return (pShell) ? pShell->GetModel() : 0;
}
return 0;
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 4381323cd660..54db6433298a 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -85,7 +85,7 @@ SwXTextPortion::SwXTextPortion(
: PROPERTY_MAP_TEXTPORTION_EXTENSIONS))
, m_xParentText(rParent)
, m_FrameDepend(this, 0)
- , m_pFrameFmt(0)
+ , m_pFrameFormat(0)
, m_ePortionType(eType)
, m_bIsCollapsed(false)
{
@@ -95,13 +95,13 @@ SwXTextPortion::SwXTextPortion(
SwXTextPortion::SwXTextPortion(
const SwUnoCrsr* pPortionCrsr,
uno::Reference< text::XText > const& rParent,
- SwFrmFmt& rFmt )
+ SwFrameFormat& rFormat )
: m_pImpl(new Impl)
, m_pPropSet(aSwMapProvider.GetPropertySet(
PROPERTY_MAP_TEXTPORTION_EXTENSIONS))
, m_xParentText(rParent)
- , m_FrameDepend(this, &rFmt)
- , m_pFrameFmt(&rFmt)
+ , m_FrameDepend(this, &rFormat)
+ , m_pFrameFormat(&rFormat)
, m_ePortionType(PORTION_FRAME)
, m_bIsCollapsed(false)
{
@@ -110,7 +110,7 @@ SwXTextPortion::SwXTextPortion(
SwXTextPortion::SwXTextPortion(
const SwUnoCrsr* pPortionCrsr,
- SwTxtRuby const& rAttr,
+ SwTextRuby const& rAttr,
uno::Reference< text::XText > const& xParent,
bool bIsEnd )
: m_pImpl(new Impl)
@@ -122,7 +122,7 @@ SwXTextPortion::SwXTextPortion(
, m_pRubyAdjust ( bIsEnd ? 0 : new uno::Any )
, m_pRubyIsAbove( bIsEnd ? 0 : new uno::Any )
, m_FrameDepend(this, 0)
- , m_pFrameFmt(0)
+ , m_pFrameFormat(0)
, m_ePortionType( bIsEnd ? PORTION_RUBY_END : PORTION_RUBY_START )
, m_bIsCollapsed(false)
{
@@ -185,20 +185,20 @@ OUString SwXTextPortion::getString()
throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- OUString aTxt;
+ OUString aText;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
throw uno::RuntimeException();
// TextPortions are always within a paragraph
- SwTxtNode* pTxtNd = pUnoCrsr->GetNode().GetTxtNode();
- if ( pTxtNd )
+ SwTextNode* pTextNd = pUnoCrsr->GetNode().GetTextNode();
+ if ( pTextNd )
{
const sal_Int32 nStt = pUnoCrsr->Start()->nContent.GetIndex();
- aTxt = pTxtNd->GetExpandTxt( nStt,
+ aText = pTextNd->GetExpandText( nStt,
pUnoCrsr->End()->nContent.GetIndex() - nStt );
}
- return aTxt;
+ return aText;
}
void SwXTextPortion::setString(const OUString& aString) throw( uno::RuntimeException, std::exception )
@@ -217,7 +217,7 @@ throw( uno::RuntimeException, std::exception )
SolarMutexGuard aGuard;
//! PropertySetInfo for text portion extensions
static uno::Reference< beans::XPropertySetInfo >
- xTxtPorExtRef = aSwMapProvider.GetPropertySet(
+ xTextPorExtRef = aSwMapProvider.GetPropertySet(
PROPERTY_MAP_TEXTPORTION_EXTENSIONS)->getPropertySetInfo();
//! PropertySetInfo for redline portions
static uno::Reference< beans::XPropertySetInfo >
@@ -225,7 +225,7 @@ throw( uno::RuntimeException, std::exception )
PROPERTY_MAP_REDLINE_PORTION)->getPropertySetInfo();
return (PORTION_REDLINE_START == m_ePortionType ||
- PORTION_REDLINE_END == m_ePortionType) ? xRedlPorRef : xTxtPorExtRef;
+ PORTION_REDLINE_END == m_ePortionType) ? xRedlPorRef : xTextPorExtRef;
}
void SwXTextPortion::setPropertyValue(const OUString& rPropertyName,
@@ -855,7 +855,7 @@ uno::Reference< container::XEnumeration > SwXTextPortion::createContentEnumerat
uno::Reference< container::XEnumeration > xRet =
new SwXParaFrameEnumeration(*pUnoCrsr, PARAFRAME_PORTION_CHAR,
- m_pFrameFmt);
+ m_pFrameFormat);
return xRet;
}
@@ -928,7 +928,7 @@ void SwXTextPortion::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
ClientModify(this, pOld, pNew);
if (!m_FrameDepend.GetRegisteredIn())
{
- m_pFrameFmt = 0;
+ m_pFrameFormat = 0;
}
}
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 7d899fd81d7d..932ca27f6015 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -73,7 +73,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
using namespace ::std;
-typedef ::std::pair< TextRangeList_t * const, SwTxtAttr const * const > PortionList_t;
+typedef ::std::pair< TextRangeList_t * const, SwTextAttr const * const > PortionList_t;
typedef ::std::stack< PortionList_t > PortionStack_t;
static void lcl_CreatePortions(
@@ -163,7 +163,7 @@ namespace
{
// Crossrefbookmarks only remember the start position but have to span the whole paragraph
pCrossRefEndPos = unique_ptr<SwPosition>(new SwPosition(rEndPos));
- pCrossRefEndPos->nContent = pCrossRefEndPos->nNode.GetNode().GetTxtNode()->Len();
+ pCrossRefEndPos->nContent = pCrossRefEndPos->nNode.GetNode().GetTextNode()->Len();
pEndPos = pCrossRefEndPos.get();
}
if(pEndPos)
@@ -183,12 +183,12 @@ namespace
return;
const SwNodeIndex nOwnNode = rUnoCrsr.GetPoint()->nNode;
- SwTxtNode* pTxtNode = nOwnNode.GetNode().GetTxtNode();
- if (!pTxtNode)
+ SwTextNode* pTextNode = nOwnNode.GetNode().GetTextNode();
+ if (!pTextNode)
{
// no need to consider marks starting after aEndOfPara
SwPosition aEndOfPara(*rUnoCrsr.GetPoint());
- aEndOfPara.nContent = aEndOfPara.nNode.GetNode().GetTxtNode()->Len();
+ aEndOfPara.nContent = aEndOfPara.nNode.GetNode().GetTextNode()->Len();
const IDocumentMarkAccess::const_iterator_t pCandidatesEnd = upper_bound(
pMarkAccess->getBookmarksBegin(),
pMarkAccess->getBookmarksEnd(),
@@ -208,7 +208,7 @@ namespace
{
// A text node already knows its marks via its SwIndexes.
std::set<sw::mark::IMark*> aSeenMarks;
- for (const SwIndex* pIndex = pTxtNode->GetFirstIndex(); pIndex; pIndex = pIndex->GetNext())
+ for (const SwIndex* pIndex = pTextNode->GetFirstIndex(); pIndex; pIndex = pIndex->GetNext())
{
// Need a non-cost mark here, as we'll create an UNO wrapper around it.
sw::mark::IMark* pBkmk = const_cast<sw::mark::IMark*>(pIndex->GetMark());
@@ -274,7 +274,7 @@ namespace
// no need to consider annotation marks starting after aEndOfPara
SwPosition aEndOfPara(*rUnoCrsr.GetPoint());
- aEndOfPara.nContent = aEndOfPara.nNode.GetNode().GetTxtNode()->Len();
+ aEndOfPara.nContent = aEndOfPara.nNode.GetNode().GetTextNode()->Len();
const IDocumentMarkAccess::const_iterator_t pCandidatesEnd = upper_bound(
pMarkAccess->getAnnotationMarksBegin(),
pMarkAccess->getAnnotationMarksEnd(),
@@ -298,15 +298,15 @@ namespace
const SwPosition& rStartPos = pAnnotationMark->GetMarkStart();
if ( rStartPos.nNode == nOwnNode )
{
- const SwFmtFld* pAnnotationFmtFld = pAnnotationMark->GetAnnotationFmtFld();
- OSL_ENSURE( pAnnotationFmtFld != NULL, "<lcl_FillAnnotationStartArray(..)> - annotation fmt fld instance missing!" );
- if ( pAnnotationFmtFld != NULL )
+ const SwFormatField* pAnnotationFormatField = pAnnotationMark->GetAnnotationFormatField();
+ OSL_ENSURE( pAnnotationFormatField != NULL, "<lcl_FillAnnotationStartArray(..)> - annotation fmt fld instance missing!" );
+ if ( pAnnotationFormatField != NULL )
{
rAnnotationStartArr.insert(
SwAnnotationStartPortion_ImplSharedPtr(
new SwAnnotationStartPortion_Impl(
SwXTextField::CreateXTextField(&rDoc,
- pAnnotationFmtFld),
+ pAnnotationFormatField),
rStartPos)));
}
}
@@ -368,7 +368,7 @@ SwXTextPortionEnumeration::SwXTextPortionEnumeration(
pUnoCrsr->Add(this);
OSL_ENSURE(nEnd == -1 || (nStart <= nEnd &&
- nEnd <= pUnoCrsr->Start()->nNode.GetNode().GetTxtNode()->GetTxt().getLength()),
+ nEnd <= pUnoCrsr->Start()->nNode.GetNode().GetTextNode()->GetText().getLength()),
"start or end value invalid!");
// find all frames, graphics and OLEs that are bound AT character in para
@@ -424,14 +424,14 @@ static void
lcl_FillFieldMarkArray(FieldMarks_t & rFieldMarks, SwUnoCrsr const & rUnoCrsr,
const sal_Int32 i_nStartPos)
{
- const SwTxtNode * const pTxtNode =
- rUnoCrsr.GetPoint()->nNode.GetNode().GetTxtNode();
- if (!pTxtNode) return;
+ const SwTextNode * const pTextNode =
+ rUnoCrsr.GetPoint()->nNode.GetNode().GetTextNode();
+ if (!pTextNode) return;
const sal_Unicode fld[] = {
CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FIELDEND, CH_TXT_ATR_FORMELEMENT, 0 };
sal_Int32 pos = ::std::max(static_cast<const sal_Int32>(0), i_nStartPos);
- while ((pos = ::comphelper::string::indexOfAny(pTxtNode->GetTxt(), fld, pos)) != -1)
+ while ((pos = ::comphelper::string::indexOfAny(pTextNode->GetText(), fld, pos)) != -1)
{
rFieldMarks.push_back(pos);
++pos;
@@ -442,7 +442,7 @@ static uno::Reference<text::XTextRange>
lcl_ExportFieldMark(
uno::Reference< text::XText > const & i_xParentText,
SwUnoCrsr * const pUnoCrsr,
- const SwTxtNode * const pTxtNode )
+ const SwTextNode * const pTextNode )
{
uno::Reference<text::XTextRange> xRef;
SwDoc* pDoc = pUnoCrsr->GetDoc();
@@ -458,7 +458,7 @@ lcl_ExportFieldMark(
return 0;
}
- const sal_Unicode Char = pTxtNode->GetTxt()[start];
+ const sal_Unicode Char = pTextNode->GetText()[start];
if (CH_TXT_ATR_FIELDSTART == Char)
{
::sw::mark::IFieldmark* pFieldmark = NULL;
@@ -520,11 +520,11 @@ static Reference<XTextRange>
lcl_CreateRefMarkPortion(
Reference<XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- const SwTxtAttr & rAttr, const bool bEnd)
+ const SwTextAttr & rAttr, const bool bEnd)
{
SwDoc* pDoc = pUnoCrsr->GetDoc();
- SwFmtRefMark& rRefMark = const_cast<SwFmtRefMark&>(
- static_cast<const SwFmtRefMark&>(rAttr.GetAttr()));
+ SwFormatRefMark& rRefMark = const_cast<SwFormatRefMark&>(
+ static_cast<const SwFormatRefMark&>(rAttr.GetAttr()));
Reference<XTextContent> xContent;
if (!xContent.is())
{
@@ -551,10 +551,10 @@ lcl_InsertRubyPortion(
TextRangeList_t & rPortions,
Reference<XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- const SwTxtAttr & rAttr, const bool bEnd)
+ const SwTextAttr & rAttr, const bool bEnd)
{
SwXTextPortion* pPortion = new SwXTextPortion(pUnoCrsr,
- static_txtattr_cast<const SwTxtRuby&>(rAttr), xParent, bEnd);
+ static_txtattr_cast<const SwTextRuby&>(rAttr), xParent, bEnd);
rPortions.push_back(pPortion);
pPortion->SetCollapsed(rAttr.End() == nullptr);
}
@@ -563,7 +563,7 @@ static Reference<XTextRange>
lcl_CreateTOXMarkPortion(
Reference<XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- SwTxtAttr & rAttr, const bool bEnd)
+ SwTextAttr & rAttr, const bool bEnd)
{
SwDoc* pDoc = pUnoCrsr->GetDoc();
SwTOXMark & rTOXMark = static_cast<SwTOXMark&>(rAttr.GetAttr());
@@ -591,10 +591,10 @@ static uno::Reference<text::XTextRange>
lcl_CreateMetaPortion(
uno::Reference<text::XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- SwTxtAttr & rAttr, ::std::unique_ptr<TextRangeList_t const> && pPortions)
+ SwTextAttr & rAttr, ::std::unique_ptr<TextRangeList_t const> && pPortions)
{
const uno::Reference<rdf::XMetadatable> xMeta( SwXMeta::CreateXMeta(
- *static_cast<SwFmtMeta &>(rAttr.GetAttr()).GetMeta(),
+ *static_cast<SwFormatMeta &>(rAttr.GetAttr()).GetMeta(),
xParent, std::move(pPortions)));
SwXTextPortion * pPortion(0);
if (RES_TXTATR_META == rAttr.Which())
@@ -728,7 +728,7 @@ lcl_ExportHints(
const bool bRightMoveForbidden,
bool & o_rbCursorMoved,
sal_Int32 & o_rNextAttrPosition,
- std::set<const SwFrmFmt*>& rTextBoxes)
+ std::set<const SwFrameFormat*>& rTextBoxes)
{
// if the attribute has a dummy character, then xRef is set (except META)
// otherwise, the portion for the attribute is inserted into rPortions!
@@ -743,7 +743,7 @@ lcl_ExportHints(
{
if(pHints->GetEnd(nEndIndex)->GetEnd())
{
- SwTxtAttr * const pAttr = pHints->GetEnd(nEndIndex);
+ SwTextAttr * const pAttr = pHints->GetEnd(nEndIndex);
if (nNextEnd == nCurrentIndex)
{
const sal_uInt16 nWhich( pAttr->Which() );
@@ -821,7 +821,7 @@ lcl_ExportHints(
while(nStartIndex < pHints->GetStartCount() &&
nCurrentIndex >= (nNextStart = pHints->GetStart(nStartIndex)->GetStart()))
{
- SwTxtAttr * const pAttr = pHints->GetStart(nStartIndex);
+ SwTextAttr * const pAttr = pHints->GetStart(nStartIndex);
sal_uInt16 nAttrWhich = pAttr->Which();
if (nNextStart == nCurrentIndex)
{
@@ -839,7 +839,7 @@ lcl_ExportHints(
pUnoCrsr, xParent, PORTION_FIELD);
Reference<XTextField> const xField =
SwXTextField::CreateXTextField(pDoc,
- &pAttr->GetFmtFld());
+ &pAttr->GetFormatField());
pPortion->SetTextField(xField);
}
break;
@@ -851,8 +851,8 @@ lcl_ExportHints(
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
break;
- const SwTxtAnnotationFld* pTxtAnnotationFld = dynamic_cast<const SwTxtAnnotationFld*>( pAttr );
- ::sw::mark::IMark* pAnnotationMark = pTxtAnnotationFld ? pTxtAnnotationFld->GetAnnotationMark() : NULL;
+ const SwTextAnnotationField* pTextAnnotationField = dynamic_cast<const SwTextAnnotationField*>( pAttr );
+ ::sw::mark::IMark* pAnnotationMark = pTextAnnotationField ? pTextAnnotationField->GetAnnotationMark() : NULL;
if ( pAnnotationMark != NULL )
{
SwXTextPortion* pPortion = new SwXTextPortion( pUnoCrsr, xParent, PORTION_ANNOTATION_END );
@@ -865,7 +865,7 @@ lcl_ExportHints(
SwXTextPortion* pPortion = new SwXTextPortion( pUnoCrsr, xParent, PORTION_ANNOTATION );
Reference<XTextField> xField =
SwXTextField::CreateXTextField(pDoc,
- &pAttr->GetFmtFld());
+ &pAttr->GetFormatField());
pPortion->SetTextField(xField);
xRef = pPortion;
}
@@ -877,7 +877,7 @@ lcl_ExportHints(
{
pUnoCrsr->Right(
- pAttr->GetFmtFld().GetField()->ExpandField( true ).getLength() + 2,
+ pAttr->GetFormatField().GetField()->ExpandField( true ).getLength() + 2,
CRSR_SKIP_CHARS,
false,
false );
@@ -888,7 +888,7 @@ lcl_ExportHints(
xRef = pPortion;
Reference<XTextField> xField =
SwXTextField::CreateXTextField(pDoc,
- &pAttr->GetFmtFld());
+ &pAttr->GetFormatField());
pPortion->SetTextField(xField);
}
break;
@@ -901,7 +901,7 @@ lcl_ExportHints(
break; // Robust #i81708 content in covered cells
// Do not expose inline anchored textboxes.
- if (rTextBoxes.find(pAttr->GetFlyCnt().GetFrmFmt()) != rTextBoxes.end())
+ if (rTextBoxes.find(pAttr->GetFlyCnt().GetFrameFormat()) != rTextBoxes.end())
break;
pUnoCrsr->Exchange();
@@ -920,7 +920,7 @@ lcl_ExportHints(
xRef = pPortion = new SwXTextPortion(
pUnoCrsr, xParent, PORTION_FOOTNOTE);
Reference<XFootnote> xContent =
- SwXFootnotes::GetObject(*pDoc, pAttr->GetFtn());
+ SwXFootnotes::GetObject(*pDoc, pAttr->GetFootnote());
pPortion->SetFootnote(xContent);
}
}
@@ -1033,7 +1033,7 @@ static void lcl_MoveCursor( SwUnoCrsr * const pUnoCrsr,
const sal_Int32 nNextMarkIndex,
const sal_Int32 nEndPos )
{
- sal_Int32 nMovePos = pUnoCrsr->GetCntntNode()->Len();
+ sal_Int32 nMovePos = pUnoCrsr->GetContentNode()->Len();
if ((nEndPos >= 0) && (nEndPos < nMovePos))
{
@@ -1071,17 +1071,17 @@ static void lcl_FillRedlineArray(
SwUnoCrsr const & rUnoCrsr,
SwXRedlinePortion_ImplList& rRedArr )
{
- const SwRedlineTbl& rRedTbl = rDoc.getIDocumentRedlineAccess().GetRedlineTbl();
- const size_t nRedTblCount = rRedTbl.size();
+ const SwRedlineTable& rRedTable = rDoc.getIDocumentRedlineAccess().GetRedlineTable();
+ const size_t nRedTableCount = rRedTable.size();
- if ( nRedTblCount > 0 )
+ if ( nRedTableCount > 0 )
{
const SwPosition* pStart = rUnoCrsr.GetPoint();
const SwNodeIndex nOwnNode = pStart->nNode;
- for(size_t nRed = 0; nRed < nRedTblCount; ++nRed)
+ for(size_t nRed = 0; nRed < nRedTableCount; ++nRed)
{
- const SwRangeRedline* pRedline = rRedTbl[nRed];
+ const SwRangeRedline* pRedline = rRedTable[nRed];
const SwPosition* pRedStart = pRedline->Start();
const SwNodeIndex nRedNode = pRedStart->nNode;
if ( nOwnNode == nRedNode )
@@ -1098,10 +1098,10 @@ static void lcl_FillSoftPageBreakArray(
SwUnoCrsr const & rUnoCrsr,
SwSoftPageBreakList& rBreakArr )
{
- const SwTxtNode *pTxtNode =
- rUnoCrsr.GetPoint()->nNode.GetNode().GetTxtNode();
- if( pTxtNode )
- pTxtNode->fillSoftPageBreakList( rBreakArr );
+ const SwTextNode *pTextNode =
+ rUnoCrsr.GetPoint()->nNode.GetNode().GetTextNode();
+ if( pTextNode )
+ pTextNode->fillSoftPageBreakList( rBreakArr );
}
static void lcl_ExportRedline(
@@ -1208,7 +1208,7 @@ static sal_Int32 lcl_ExportFrames(
if (pFrame) // Frame could be disposed
{
SwXTextPortion* pPortion = new SwXTextPortion(i_pUnoCrsr, i_xParent,
- *static_cast<SwFrmFmt*>( const_cast<SwModify*>( pFrame ) ) );
+ *static_cast<SwFrameFormat*>( const_cast<SwModify*>( pFrame ) ) );
rPortions.push_back(pPortion);
}
i_rFrames.pop_front();
@@ -1259,9 +1259,9 @@ static void lcl_CreatePortions(
(pUnoCrsr->Start()->nContent.GetIndex() != i_nStartPos))
{
pUnoCrsr->DeleteMark();
- OSL_ENSURE(pUnoCrsr->Start()->nNode.GetNode().GetTxtNode() &&
- (i_nStartPos <= pUnoCrsr->Start()->nNode.GetNode().GetTxtNode()->
- GetTxt().getLength()), "Incorrect start position" );
+ OSL_ENSURE(pUnoCrsr->Start()->nNode.GetNode().GetTextNode() &&
+ (i_nStartPos <= pUnoCrsr->Start()->nNode.GetNode().GetTextNode()->
+ GetText().getLength()), "Incorrect start position" );
// ??? should this be i_nStartPos - current position ?
pUnoCrsr->Right(static_cast<sal_Int32>(i_nStartPos),
CRSR_SKIP_CHARS, false, false);
@@ -1285,9 +1285,9 @@ static void lcl_CreatePortions(
lcl_FillAnnotationStartArray( *pDoc, *pUnoCrsr, AnnotationStarts );
PortionStack_t PortionStack;
- PortionStack.push( PortionList_t(&i_rPortions, (const SwTxtAttr *)0) );
+ PortionStack.push( PortionList_t(&i_rPortions, (const SwTextAttr *)0) );
- std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pUnoCrsr->GetNode());
+ std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pUnoCrsr->GetNode());
bool bAtEnd( false );
while (!bAtEnd) // every iteration consumes at least current character!
@@ -1298,14 +1298,14 @@ static void lcl_CreatePortions(
pUnoCrsr->DeleteMark();
}
- SwTxtNode * const pTxtNode = pUnoCrsr->GetNode().GetTxtNode();
- if (!pTxtNode)
+ SwTextNode * const pTextNode = pUnoCrsr->GetNode().GetTextNode();
+ if (!pTextNode)
{
OSL_FAIL("lcl_CreatePortions: no TextNode - what now ?");
return;
}
- SwpHints * const pHints = pTxtNode->GetpSwpHints();
+ SwpHints * const pHints = pTextNode->GetpSwpHints();
const sal_Int32 nCurrentIndex =
pUnoCrsr->GetPoint()->nContent.GetIndex();
// this contains the portion which consumes the character in the
@@ -1333,7 +1333,7 @@ static void lcl_CreatePortions(
// #111716# the cursor must not move right at the
// end position of a selection!
bAtEnd = ((i_nEndPos >= 0) && (nCurrentIndex >= i_nEndPos))
- || (nCurrentIndex >= pTxtNode->Len());
+ || (nCurrentIndex >= pTextNode->Len());
if (pHints)
{
// N.B.: side-effects nNextAttrIndex, bCursorMoved; may move cursor
@@ -1353,7 +1353,7 @@ static void lcl_CreatePortions(
FieldMarks.size() && (FieldMarks.front() == nCurrentIndex))
{
// moves cursor
- xRef = lcl_ExportFieldMark(i_xParentText, pUnoCrsr, pTxtNode);
+ xRef = lcl_ExportFieldMark(i_xParentText, pUnoCrsr, pTextNode);
FieldMarks.pop_front();
}
}
@@ -1388,7 +1388,7 @@ static void lcl_CreatePortions(
xRef = new SwXTextPortion(pUnoCrsr, i_xParentText, PORTION_TEXT);
}
- else if (bAtEnd && !xRef.is() && !pTxtNode->Len())
+ else if (bAtEnd && !xRef.is() && !pTextNode->Len())
{
// special case: for an empty paragraph, we better put out a
// text portion because there may be a hyperlink attribute
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index f4e088503d5e..a978f7487743 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -119,7 +119,7 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor()
// skip all tables at the beginning
SwTableNode* pTableNode = pUnoCursor->GetNode().FindTableNode();
- SwCntntNode* pContentNode = NULL;
+ SwContentNode* pContentNode = NULL;
bool bTable = pTableNode != NULL;
while( pTableNode != NULL )
{
@@ -266,10 +266,10 @@ void SwXRedlinePortion::Validate() throw( uno::RuntimeException )
throw uno::RuntimeException();
//search for the redline
SwDoc* pDoc = pUnoCrsr->GetDoc();
- const SwRedlineTbl& rRedTbl = pDoc->getIDocumentRedlineAccess().GetRedlineTbl();
+ const SwRedlineTable& rRedTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
bool bFound = false;
- for(size_t nRed = 0; nRed < rRedTbl.size() && !bFound; nRed++)
- bFound = &m_rRedline == rRedTbl[nRed];
+ for(size_t nRed = 0; nRed < rRedTable.size() && !bFound; nRed++)
+ bFound = &m_rRedline == rRedTable[nRed];
if(!bFound)
throw uno::RuntimeException();
}
@@ -443,16 +443,16 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
{
SwSectionNode* pSectNode = pNode->GetSectionNode();
OSL_ENSURE(pSectNode, "No section node!");
- xRet = SwXTextSections::GetObject( *pSectNode->GetSection().GetFmt() );
+ xRet = SwXTextSections::GetObject( *pSectNode->GetSection().GetFormat() );
}
break;
case ND_TABLENODE :
{
- SwTableNode* pTblNode = pNode->GetTableNode();
- OSL_ENSURE(pTblNode, "No table node!");
- SwTable& rTbl = pTblNode->GetTable();
- SwFrmFmt* pTblFmt = rTbl.GetFrmFmt();
- xRet = SwXTextTables::GetObject( *pTblFmt );
+ SwTableNode* pTableNode = pNode->GetTableNode();
+ OSL_ENSURE(pTableNode, "No table node!");
+ SwTable& rTable = pTableNode->GetTable();
+ SwFrameFormat* pTableFormat = rTable.GetFrameFormat();
+ xRet = SwXTextTables::GetObject( *pTableFormat );
}
break;
case ND_TEXTNODE :
@@ -575,13 +575,13 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor() throw( uno::
pUnoCrsr->Move(fnMoveForward, fnGoNode);
// is here a table?
- SwTableNode* pTblNode = pUnoCrsr->GetNode().FindTableNode();
- SwCntntNode* pCont = 0;
- while( pTblNode )
+ SwTableNode* pTableNode = pUnoCrsr->GetNode().FindTableNode();
+ SwContentNode* pCont = 0;
+ while( pTableNode )
{
- pUnoCrsr->GetPoint()->nNode = *pTblNode->EndOfSectionNode();
+ pUnoCrsr->GetPoint()->nNode = *pTableNode->EndOfSectionNode();
pCont = GetDoc()->GetNodes().GoNext(&pUnoCrsr->GetPoint()->nNode);
- pTblNode = pCont->FindTableNode();
+ pTableNode = pCont->FindTableNode();
}
if(pCont)
pUnoCrsr->GetPoint()->nContent.Assign(pCont, 0);
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index c536fd34e2a7..fab95a23cc27 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -50,8 +50,8 @@ sal_Int32 SwXRedlines::getCount( ) throw(uno::RuntimeException, std::exception)
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- const SwRedlineTbl& rRedTbl = GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl();
- return rRedTbl.size();
+ const SwRedlineTable& rRedTable = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
+ return rRedTable.size();
}
uno::Any SwXRedlines::getByIndex(sal_Int32 nIndex)
@@ -60,11 +60,11 @@ uno::Any SwXRedlines::getByIndex(sal_Int32 nIndex)
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- const SwRedlineTbl& rRedTbl = GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl();
+ const SwRedlineTable& rRedTable = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
uno::Any aRet;
- if ((rRedTbl.size() > static_cast<size_t>(nIndex)) && (nIndex >= 0))
+ if ((rRedTable.size() > static_cast<size_t>(nIndex)) && (nIndex >= 0))
{
- uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTbl[nIndex], *GetDoc() );
+ uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTable[nIndex], *GetDoc() );
aRet <<= xRet;
}
else
@@ -91,8 +91,8 @@ sal_Bool SwXRedlines::hasElements( ) throw(uno::RuntimeException, std::exceptio
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- const SwRedlineTbl& rRedTbl = GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl();
- return rRedTbl.size() > 0;
+ const SwRedlineTable& rRedTable = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
+ return rRedTable.size() > 0;
}
OUString SwXRedlines::getImplementationName() throw( uno::RuntimeException, std::exception )
@@ -144,7 +144,7 @@ sal_Bool SwXRedlineEnumeration::hasMoreElements() throw( uno::RuntimeException,
{
if(!pDoc)
throw uno::RuntimeException();
- return pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size() > nCurrentIndex;
+ return pDoc->getIDocumentRedlineAccess().GetRedlineTable().size() > nCurrentIndex;
}
uno::Any SwXRedlineEnumeration::nextElement()
@@ -152,10 +152,10 @@ uno::Any SwXRedlineEnumeration::nextElement()
{
if(!pDoc)
throw uno::RuntimeException();
- const SwRedlineTbl& rRedTbl = pDoc->getIDocumentRedlineAccess().GetRedlineTbl();
- if( rRedTbl.size() <= nCurrentIndex )
+ const SwRedlineTable& rRedTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
+ if( rRedTable.size() <= nCurrentIndex )
throw container::NoSuchElementException();
- uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTbl[nCurrentIndex++], *pDoc );
+ uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTable[nCurrentIndex++], *pDoc );
uno::Any aRet;
aRet <<= xRet;
return aRet;
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 442a65b584ec..d322d7e32ac1 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -53,15 +53,15 @@ public:
::cppu::OInterfaceContainerHelper m_EventListeners;
bool m_bIsDescriptor;
SwDoc * m_pDoc;
- const SwFmtRefMark * m_pMarkFmt;
+ const SwFormatRefMark * m_pMarkFormat;
OUString m_sMarkName;
- Impl( SwDoc *const pDoc, SwFmtRefMark *const pRefMark)
+ Impl( SwDoc *const pDoc, SwFormatRefMark *const pRefMark)
: SwClient(pRefMark)
, m_EventListeners(m_Mutex)
, m_bIsDescriptor(0 == pRefMark)
, m_pDoc(pDoc)
- , m_pMarkFmt(pRefMark)
+ , m_pMarkFormat(pRefMark)
{
if (pRefMark)
{
@@ -85,7 +85,7 @@ void SwXReferenceMark::Impl::Invalidate()
const_cast<SwModify*>(GetRegisteredIn())->Remove(this);
}
m_pDoc = 0;
- m_pMarkFmt = 0;
+ m_pMarkFormat = 0;
uno::Reference<uno::XInterface> const xThis(m_wThis);
if (!xThis.is())
{ // fdo#72695: if UNO object is already dead, don't revive it with event
@@ -106,7 +106,7 @@ void SwXReferenceMark::Impl::Modify( const SfxPoolItem* pOld, const SfxPoolItem
}
SwXReferenceMark::SwXReferenceMark(
- SwDoc *const pDoc, SwFmtRefMark *const pRefMark)
+ SwDoc *const pDoc, SwFormatRefMark *const pRefMark)
: m_pImpl( new SwXReferenceMark::Impl(pDoc, pRefMark) )
{
}
@@ -117,21 +117,21 @@ SwXReferenceMark::~SwXReferenceMark()
uno::Reference<text::XTextContent>
SwXReferenceMark::CreateXReferenceMark(
- SwDoc & rDoc, SwFmtRefMark *const pMarkFmt)
+ SwDoc & rDoc, SwFormatRefMark *const pMarkFormat)
{
// i#105557: do not iterate over the registered clients: race condition
uno::Reference<text::XTextContent> xMark;
- if (pMarkFmt)
+ if (pMarkFormat)
{
- xMark = pMarkFmt->GetXRefMark();
+ xMark = pMarkFormat->GetXRefMark();
}
if (!xMark.is())
{
- SwXReferenceMark *const pMark(new SwXReferenceMark(&rDoc, pMarkFmt));
+ SwXReferenceMark *const pMark(new SwXReferenceMark(&rDoc, pMarkFormat));
xMark.set(pMark);
- if (pMarkFmt)
+ if (pMarkFormat)
{
- pMarkFmt->SetXRefMark(xMark);
+ pMarkFormat->SetXRefMark(xMark);
}
// need a permanent Reference to initialize m_wThis
pMark->m_pImpl->m_wThis = xMark;
@@ -206,7 +206,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
SwDoc *pDoc2 = rPam.GetDoc();
UnoActionContext aCont(pDoc2);
- SwFmtRefMark aRefMark(m_sMarkName);
+ SwFormatRefMark aRefMark(m_sMarkName);
bool bMark = *rPam.GetPoint() != *rPam.GetMark();
const bool bForceExpandHints( !bMark && pCursor && pCursor->IsAtEndOfMeta() );
@@ -215,10 +215,10 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
| SetAttrMode::DONTEXPAND)
: SetAttrMode::DONTEXPAND;
- ::std::vector<SwTxtAttr *> oldMarks;
+ ::std::vector<SwTextAttr *> oldMarks;
if (bMark)
{
- oldMarks = rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
+ oldMarks = rPam.GetNode().GetTextNode()->GetTextAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK);
}
@@ -230,40 +230,40 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
}
// aRefMark was copied into the document pool; now retrieve real format...
- SwTxtAttr * pTxtAttr(0);
+ SwTextAttr * pTextAttr(0);
if (bMark)
{
// #i107672#
// ensure that we do not retrieve a different mark at the same position
- ::std::vector<SwTxtAttr *> const newMarks(
- rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
+ ::std::vector<SwTextAttr *> const newMarks(
+ rPam.GetNode().GetTextNode()->GetTextAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
- ::std::vector<SwTxtAttr *>::const_iterator const iter(
+ ::std::vector<SwTextAttr *>::const_iterator const iter(
::std::find_if(newMarks.begin(), newMarks.end(),
- NotContainedIn<SwTxtAttr *>(oldMarks)));
+ NotContainedIn<SwTextAttr *>(oldMarks)));
OSL_ASSERT(newMarks.end() != iter);
if (newMarks.end() != iter)
{
- pTxtAttr = *iter;
+ pTextAttr = *iter;
}
}
else
{
- SwTxtNode *pTxtNd = rPam.GetNode().GetTxtNode();
- OSL_ASSERT(pTxtNd);
- pTxtAttr = pTxtNd ? rPam.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
+ SwTextNode *pTextNd = rPam.GetNode().GetTextNode();
+ OSL_ASSERT(pTextNd);
+ pTextAttr = pTextNd ? rPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK) : NULL;
}
- if (!pTxtAttr)
+ if (!pTextAttr)
{
throw uno::RuntimeException(
"SwXReferenceMark::InsertRefMark(): cannot insert attribute", 0);
}
- m_pMarkFmt = &pTxtAttr->GetRefMark();
+ m_pMarkFormat = &pTextAttr->GetRefMark();
- const_cast<SwFmtRefMark*>(m_pMarkFmt)->Add(this);
+ const_cast<SwFormatRefMark*>(m_pMarkFormat)->Add(this);
}
void SAL_CALL
@@ -307,21 +307,21 @@ SwXReferenceMark::getAnchor() throw (uno::RuntimeException, std::exception)
if (m_pImpl->IsValid())
{
- SwFmtRefMark const*const pNewMark =
+ SwFormatRefMark const*const pNewMark =
m_pImpl->m_pDoc->GetRefMark(m_pImpl->m_sMarkName);
- if (pNewMark && (pNewMark == m_pImpl->m_pMarkFmt))
+ if (pNewMark && (pNewMark == m_pImpl->m_pMarkFormat))
{
- SwTxtRefMark const*const pTxtMark =
- m_pImpl->m_pMarkFmt->GetTxtRefMark();
- if (pTxtMark &&
- (&pTxtMark->GetTxtNode().GetNodes() ==
+ SwTextRefMark const*const pTextMark =
+ m_pImpl->m_pMarkFormat->GetTextRefMark();
+ if (pTextMark &&
+ (&pTextMark->GetTextNode().GetNodes() ==
&m_pImpl->m_pDoc->GetNodes()))
{
- SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- const ::std::unique_ptr<SwPaM> pPam( (pTxtMark->End())
- ? new SwPaM( rTxtNode, *pTxtMark->End(),
- rTxtNode, pTxtMark->GetStart())
- : new SwPaM( rTxtNode, pTxtMark->GetStart()) );
+ SwTextNode const& rTextNode = pTextMark->GetTextNode();
+ const ::std::unique_ptr<SwPaM> pPam( (pTextMark->End())
+ ? new SwPaM( rTextNode, *pTextMark->End(),
+ rTextNode, pTextMark->GetStart())
+ : new SwPaM( rTextNode, pTextMark->GetStart()) );
return SwXTextRange::CreateXTextRange(
*m_pImpl->m_pDoc, *pPam->Start(), pPam->End());
@@ -336,23 +336,23 @@ void SAL_CALL SwXReferenceMark::dispose() throw (uno::RuntimeException, std::exc
SolarMutexGuard aGuard;
if (m_pImpl->IsValid())
{
- SwFmtRefMark const*const pNewMark =
+ SwFormatRefMark const*const pNewMark =
m_pImpl->m_pDoc->GetRefMark(m_pImpl->m_sMarkName);
- if (pNewMark && (pNewMark == m_pImpl->m_pMarkFmt))
+ if (pNewMark && (pNewMark == m_pImpl->m_pMarkFormat))
{
- SwTxtRefMark const*const pTxtMark =
- m_pImpl->m_pMarkFmt->GetTxtRefMark();
- if (pTxtMark &&
- (&pTxtMark->GetTxtNode().GetNodes() ==
+ SwTextRefMark const*const pTextMark =
+ m_pImpl->m_pMarkFormat->GetTextRefMark();
+ if (pTextMark &&
+ (&pTextMark->GetTextNode().GetNodes() ==
&m_pImpl->m_pDoc->GetNodes()))
{
- SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- const sal_Int32 nStt = pTxtMark->GetStart();
- const sal_Int32 nEnd = pTxtMark->End()
- ? *pTxtMark->End()
+ SwTextNode const& rTextNode = pTextMark->GetTextNode();
+ const sal_Int32 nStt = pTextMark->GetStart();
+ const sal_Int32 nEnd = pTextMark->End()
+ ? *pTextMark->End()
: nStt + 1;
- SwPaM aPam( rTxtNode, nStt, rTxtNode, nEnd );
+ SwPaM aPam( rTextNode, nStt, rTextNode, nEnd );
m_pImpl->m_pDoc->getIDocumentContentOperations().DeleteAndJoin( aPam );
}
}
@@ -407,25 +407,25 @@ throw (uno::RuntimeException, std::exception)
{
throw uno::RuntimeException();
}
- SwFmtRefMark const*const pCurMark =
+ SwFormatRefMark const*const pCurMark =
m_pImpl->m_pDoc->GetRefMark(m_pImpl->m_sMarkName);
if ((rName != m_pImpl->m_sMarkName)
- && pCurMark && (pCurMark == m_pImpl->m_pMarkFmt))
+ && pCurMark && (pCurMark == m_pImpl->m_pMarkFormat))
{
const UnoActionContext aCont(m_pImpl->m_pDoc);
- SwTxtRefMark const*const pTxtMark =
- m_pImpl->m_pMarkFmt->GetTxtRefMark();
- if (pTxtMark &&
- (&pTxtMark->GetTxtNode().GetNodes() ==
+ SwTextRefMark const*const pTextMark =
+ m_pImpl->m_pMarkFormat->GetTextRefMark();
+ if (pTextMark &&
+ (&pTextMark->GetTextNode().GetNodes() ==
&m_pImpl->m_pDoc->GetNodes()))
{
- SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- const sal_Int32 nStt = pTxtMark->GetStart();
- const sal_Int32 nEnd = pTxtMark->End()
- ? *pTxtMark->End()
+ SwTextNode const& rTextNode = pTextMark->GetTextNode();
+ const sal_Int32 nStt = pTextMark->GetStart();
+ const sal_Int32 nEnd = pTextMark->End()
+ ? *pTextMark->End()
: nStt + 1;
- SwPaM aPam( rTxtNode, nStt, rTxtNode, nEnd );
+ SwPaM aPam( rTextNode, nStt, rTextNode, nEnd );
// deletes the m_pImpl->m_pDoc member in the SwXReferenceMark!
m_pImpl->m_pDoc->getIDocumentContentOperations().DeleteAndJoin( aPam );
// The aPam will keep the correct and functional doc though
@@ -594,14 +594,14 @@ throw (uno::RuntimeException)
uno::Reference< text::XTextCursor > xRet;
if (IsValid())
{
- SwTxtNode * pTxtNode;
+ SwTextNode * pTextNode;
sal_Int32 nMetaStart;
sal_Int32 nMetaEnd;
const bool bSuccess(
- m_rMeta.SetContentRange(pTxtNode, nMetaStart, nMetaEnd) );
+ m_rMeta.SetContentRange(pTextNode, nMetaStart, nMetaEnd) );
if (bSuccess)
{
- SwPosition aPos(*pTxtNode, nMetaStart);
+ SwPosition aPos(*pTextNode, nMetaStart);
xRet = static_cast<text::XWordCursor*>(
new SwXTextCursor(*GetDoc(), &m_rMeta, CURSOR_META, aPos));
}
@@ -634,7 +634,7 @@ SwXMetaText::createTextCursorByRange(
// the Meta has a cached list of text portions for its contents
// this list is created by SwXTextPortionEnumeration
-// the Meta listens at the SwTxtNode and throws away the cache when it changes
+// the Meta listens at the SwTextNode and throws away the cache when it changes
class SwXMeta::Impl
: public SwClient
{
@@ -682,7 +682,7 @@ inline const ::sw::Meta * SwXMeta::Impl::GetMeta() const
// SwModify
void SwXMeta::Impl::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
- m_pTextPortions.reset(); // throw away cache (SwTxtNode changed)
+ m_pTextPortions.reset(); // throw away cache (SwTextNode changed)
ClientModify(this, pOld, pNew);
@@ -766,23 +766,23 @@ SwXMeta::CreateXMeta(::sw::Meta & rMeta,
}
// create new SwXMeta
- SwTxtNode * const pTxtNode( rMeta.GetTxtNode() );
- SAL_WARN_IF(!pTxtNode, "sw.uno", "CreateXMeta: no text node?");
- if (!pTxtNode) { return 0; }
+ SwTextNode * const pTextNode( rMeta.GetTextNode() );
+ SAL_WARN_IF(!pTextNode, "sw.uno", "CreateXMeta: no text node?");
+ if (!pTextNode) { return 0; }
uno::Reference<text::XText> xParentText(i_xParent);
if (!xParentText.is())
{
- SwTxtMeta * const pTxtAttr( rMeta.GetTxtAttr() );
- SAL_WARN_IF(!pTxtAttr, "sw.uno", "CreateXMeta: no text attr?");
- if (!pTxtAttr) { return 0; }
- const SwPosition aPos(*pTxtNode, pTxtAttr->GetStart());
- xParentText.set( ::sw::CreateParentXText(*pTxtNode->GetDoc(), aPos) );
+ SwTextMeta * const pTextAttr( rMeta.GetTextAttr() );
+ SAL_WARN_IF(!pTextAttr, "sw.uno", "CreateXMeta: no text attr?");
+ if (!pTextAttr) { return 0; }
+ const SwPosition aPos(*pTextNode, pTextAttr->GetStart());
+ xParentText.set( ::sw::CreateParentXText(*pTextNode->GetDoc(), aPos) );
}
if (!xParentText.is()) { return 0; }
- SwXMeta *const pXMeta( (RES_TXTATR_META == rMeta.GetFmtMeta()->Which())
- ? new SwXMeta (pTxtNode->GetDoc(), &rMeta, xParentText,
+ SwXMeta *const pXMeta( (RES_TXTATR_META == rMeta.GetFormatMeta()->Which())
+ ? new SwXMeta (pTextNode->GetDoc(), &rMeta, xParentText,
pPortions.release()) // temporarily un-unique_ptr :-(
- : new SwXMetaField(pTxtNode->GetDoc(), &rMeta, xParentText,
+ : new SwXMetaField(pTextNode->GetDoc(), &rMeta, xParentText,
pPortions.release()));
// this is why the constructor is private: need to acquire pXMeta here
xMeta.set(pXMeta);
@@ -794,20 +794,20 @@ SwXMeta::CreateXMeta(::sw::Meta & rMeta,
}
bool SwXMeta::SetContentRange(
- SwTxtNode *& rpNode, sal_Int32 & rStart, sal_Int32 & rEnd ) const
+ SwTextNode *& rpNode, sal_Int32 & rStart, sal_Int32 & rEnd ) const
{
::sw::Meta const * const pMeta( m_pImpl->GetMeta() );
if (pMeta)
{
- SwTxtMeta const * const pTxtAttr( pMeta->GetTxtAttr() );
- if (pTxtAttr)
+ SwTextMeta const * const pTextAttr( pMeta->GetTextAttr() );
+ if (pTextAttr)
{
- rpNode = pMeta->GetTxtNode();
+ rpNode = pMeta->GetTextNode();
if (rpNode)
{
// rStart points at the first position _within_ the meta!
- rStart = pTxtAttr->GetStart() + 1;
- rEnd = *pTxtAttr->End();
+ rStart = pTextAttr->GetStart() + 1;
+ rEnd = *pTextAttr->End();
return true;
}
}
@@ -818,16 +818,16 @@ bool SwXMeta::SetContentRange(
bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- SwTxtNode * pTxtNode;
+ SwTextNode * pTextNode;
sal_Int32 nMetaStart;
sal_Int32 nMetaEnd;
- const bool bSuccess( SetContentRange(pTxtNode, nMetaStart, nMetaEnd) );
+ const bool bSuccess( SetContentRange(pTextNode, nMetaStart, nMetaEnd) );
OSL_ENSURE(bSuccess, "no pam?");
if (!bSuccess)
throw lang::DisposedException();
SwPosition const * const pStartPos( rPam.Start() );
- if (&pStartPos->nNode.GetNode() != pTxtNode)
+ if (&pStartPos->nNode.GetNode() != pTextNode)
{
throw lang::IllegalArgumentException(
"trying to insert into a nesting text content, but start "
@@ -852,7 +852,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
if (rPam.HasMark() && bAbsorb)
{
SwPosition const * const pEndPos( rPam.End() );
- if (&pEndPos->nNode.GetNode() != pTxtNode)
+ if (&pEndPos->nNode.GetNode() != pTextNode)
{
throw lang::IllegalArgumentException(
"trying to insert into a nesting text content, but end "
@@ -958,16 +958,16 @@ SwXMeta::dispose() throw (uno::RuntimeException, std::exception)
}
else if (!m_pImpl->m_bIsDisposed)
{
- SwTxtNode * pTxtNode;
+ SwTextNode * pTextNode;
sal_Int32 nMetaStart;
sal_Int32 nMetaEnd;
- const bool bSuccess(SetContentRange(pTxtNode, nMetaStart, nMetaEnd));
+ const bool bSuccess(SetContentRange(pTextNode, nMetaStart, nMetaEnd));
OSL_ENSURE(bSuccess, "no pam?");
if (bSuccess)
{
// -1 because of CH_TXTATR
- SwPaM aPam( *pTxtNode, nMetaStart - 1, *pTxtNode, nMetaEnd );
- SwDoc * const pDoc( pTxtNode->GetDoc() );
+ SwPaM aPam( *pTextNode, nMetaStart - 1, *pTextNode, nMetaEnd );
+ SwDoc * const pDoc( pTextNode->GetDoc() );
pDoc->getIDocumentContentOperations().DeleteAndJoin( aPam );
// removal should call Modify and do the dispose
@@ -1038,16 +1038,16 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
? ::boost::shared_ptr< ::sw::Meta>( new ::sw::Meta() )
: ::boost::shared_ptr< ::sw::Meta>(
pDoc->GetMetaFieldManager().makeMetaField()) );
- SwFmtMeta meta(pMeta, i_nWhich); // this is cloned by Insert!
+ SwFormatMeta meta(pMeta, i_nWhich); // this is cloned by Insert!
const bool bSuccess( pDoc->getIDocumentContentOperations().InsertPoolItem( aPam, meta, nInsertFlags ) );
- SwTxtAttr * const pTxtAttr( pMeta->GetTxtAttr() );
+ SwTextAttr * const pTextAttr( pMeta->GetTextAttr() );
if (!bSuccess)
{
throw lang::IllegalArgumentException(
"SwXMeta::attach(): cannot create meta: range invalid?",
static_cast< ::cppu::OWeakObject* >(this), 1);
}
- if (!pTxtAttr)
+ if (!pTextAttr)
{
OSL_FAIL("meta inserted, but has no text attribute?");
throw uno::RuntimeException(
@@ -1087,10 +1087,10 @@ SwXMeta::getAnchor() throw (uno::RuntimeException, std::exception)
static_cast< ::cppu::OWeakObject* >(this));
}
- SwTxtNode * pTxtNode;
+ SwTextNode * pTextNode;
sal_Int32 nMetaStart;
sal_Int32 nMetaEnd;
- const bool bSuccess(SetContentRange(pTxtNode, nMetaStart, nMetaEnd));
+ const bool bSuccess(SetContentRange(pTextNode, nMetaStart, nMetaEnd));
OSL_ENSURE(bSuccess, "no pam?");
if (!bSuccess)
{
@@ -1099,9 +1099,9 @@ SwXMeta::getAnchor() throw (uno::RuntimeException, std::exception)
static_cast< ::cppu::OWeakObject* >(this));
}
- const SwPosition start(*pTxtNode, nMetaStart - 1); // -1 due to CH_TXTATR
- const SwPosition end(*pTxtNode, nMetaEnd);
- return SwXTextRange::CreateXTextRange(*pTxtNode->GetDoc(), start, &end);
+ const SwPosition start(*pTextNode, nMetaStart - 1); // -1 due to CH_TXTATR
+ const SwPosition end(*pTextNode, nMetaEnd);
+ return SwXTextRange::CreateXTextRange(*pTextNode->GetDoc(), start, &end);
}
// XTextRange
@@ -1200,17 +1200,17 @@ uno::Reference< uno::XInterface > SAL_CALL
SwXMeta::getParent() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard g;
- SwTxtNode * pTxtNode;
+ SwTextNode * pTextNode;
sal_Int32 nMetaStart;
sal_Int32 nMetaEnd;
- bool const bSuccess( SetContentRange(pTxtNode, nMetaStart, nMetaEnd) );
+ bool const bSuccess( SetContentRange(pTextNode, nMetaStart, nMetaEnd) );
OSL_ENSURE(bSuccess, "no pam?");
if (!bSuccess) { throw lang::DisposedException(); }
// in order to prevent getting this meta, subtract 1 from nMetaStart;
// so we get the index of the dummy character, and we exclude it
- // by calling GetTxtAttrAt(_, _, PARENT) in GetNestedTextContent
+ // by calling GetTextAttrAt(_, _, PARENT) in GetNestedTextContent
uno::Reference<text::XTextContent> const xRet(
- SwUnoCursorHelper::GetNestedTextContent(*pTxtNode, nMetaStart - 1,
+ SwUnoCursorHelper::GetNestedTextContent(*pTextNode, nMetaStart - 1,
true) );
return xRet;
}
@@ -1254,15 +1254,15 @@ SwXMeta::createEnumeration() throw (uno::RuntimeException, std::exception)
static_cast< ::cppu::OWeakObject* >(this));
}
- SwTxtNode * pTxtNode;
+ SwTextNode * pTextNode;
sal_Int32 nMetaStart;
sal_Int32 nMetaEnd;
- const bool bSuccess(SetContentRange(pTxtNode, nMetaStart, nMetaEnd));
+ const bool bSuccess(SetContentRange(pTextNode, nMetaStart, nMetaEnd));
OSL_ENSURE(bSuccess, "no pam?");
if (!bSuccess)
throw lang::DisposedException();
- SwPaM aPam(*pTxtNode, nMetaStart);
+ SwPaM aPam(*pTextNode, nMetaStart);
if (!m_pImpl->m_pTextPortions.get())
{
@@ -1286,10 +1286,10 @@ uno::Reference<frame::XModel> SwXMeta::GetModel()
::sw::Meta const * const pMeta( m_pImpl->GetMeta() );
if (pMeta)
{
- SwTxtNode const * const pTxtNode( pMeta->GetTxtNode() );
- if (pTxtNode)
+ SwTextNode const * const pTextNode( pMeta->GetTextNode() );
+ if (pTextNode)
{
- SwDocShell const * const pShell(pTxtNode->GetDoc()->GetDocShell());
+ SwDocShell const * const pShell(pTextNode->GetDoc()->GetDocShell());
return (pShell) ? pShell->GetModel() : 0;
}
}
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 6942fa1f3a31..72c22f66a29f 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -70,12 +70,12 @@ struct SwTextSectionProperties_Impl
OUString m_sSectionFilter;
OUString m_sSectionRegion;
- ::std::unique_ptr<SwFmtCol> m_pColItem;
+ ::std::unique_ptr<SwFormatCol> m_pColItem;
::std::unique_ptr<SvxBrushItem> m_pBrushItem;
- ::std::unique_ptr<SwFmtFtnAtTxtEnd> m_pFtnItem;
- ::std::unique_ptr<SwFmtEndAtTxtEnd> m_pEndItem;
+ ::std::unique_ptr<SwFormatFootnoteAtTextEnd> m_pFootnoteItem;
+ ::std::unique_ptr<SwFormatEndAtTextEnd> m_pEndItem;
::std::unique_ptr<SvXMLAttrContainerItem> m_pXMLAttr;
- ::std::unique_ptr<SwFmtNoBalancedColumns> m_pNoBalanceItem;
+ ::std::unique_ptr<SwFormatNoBalancedColumns> m_pNoBalanceItem;
::std::unique_ptr<SvxFrameDirectionItem> m_pFrameDirItem;
::std::unique_ptr<SvxLRSpaceItem> m_pLRSpaceItem;
@@ -115,29 +115,29 @@ public:
::std::unique_ptr<SwTextSectionProperties_Impl> m_pProps;
Impl( SwXTextSection & rThis,
- SwSectionFmt *const pFmt, const bool bIndexHeader)
- : SwClient(pFmt)
+ SwSectionFormat *const pFormat, const bool bIndexHeader)
+ : SwClient(pFormat)
, m_rThis(rThis)
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_SECTION))
, m_EventListeners(m_Mutex)
, m_bIndexHeader(bIndexHeader)
- , m_bIsDescriptor(0 == pFmt)
- , m_pProps((pFmt) ? 0 : new SwTextSectionProperties_Impl())
+ , m_bIsDescriptor(0 == pFormat)
+ , m_pProps((pFormat) ? 0 : new SwTextSectionProperties_Impl())
{
}
- SwSectionFmt * GetSectionFmt() const
+ SwSectionFormat * GetSectionFormat() const
{
- return static_cast<SwSectionFmt*>(const_cast<SwModify*>(
+ return static_cast<SwSectionFormat*>(const_cast<SwModify*>(
GetRegisteredIn()));
}
- SwSectionFmt & GetSectionFmtOrThrow() const {
- SwSectionFmt *const pFmt( GetSectionFmt() );
- if (!pFmt) {
+ SwSectionFormat & GetSectionFormatOrThrow() const {
+ SwSectionFormat *const pFormat( GetSectionFormat() );
+ if (!pFormat) {
throw uno::RuntimeException("SwXTextSection: disposed or invalid", 0);
}
- return *pFmt;
+ return *pFormat;
}
void SAL_CALL SetPropertyValues_Impl(
@@ -174,29 +174,29 @@ void SwXTextSection::Impl::Modify( const SfxPoolItem *pOld, const SfxPoolItem *p
m_EventListeners.disposeAndClear(ev);
}
-SwSectionFmt * SwXTextSection::GetFmt() const
+SwSectionFormat * SwXTextSection::GetFormat() const
{
- return m_pImpl->GetSectionFmt();
+ return m_pImpl->GetSectionFormat();
}
uno::Reference< text::XTextSection >
SwXTextSection::CreateXTextSection(
- SwSectionFmt *const pFmt, const bool bIndexHeader)
+ SwSectionFormat *const pFormat, const bool bIndexHeader)
{
// re-use existing SwXTextSection
// #i105557#: do not iterate over the registered clients: race condition
uno::Reference< text::XTextSection > xSection;
- if (pFmt)
+ if (pFormat)
{
- xSection.set(pFmt->GetXTextSection());
+ xSection.set(pFormat->GetXTextSection());
}
if ( !xSection.is() )
{
- SwXTextSection *const pNew = new SwXTextSection(pFmt, bIndexHeader);
+ SwXTextSection *const pNew = new SwXTextSection(pFormat, bIndexHeader);
xSection.set(pNew);
- if (pFmt)
+ if (pFormat)
{
- pFmt->SetXTextSection(xSection);
+ pFormat->SetXTextSection(xSection);
}
// need a permanent Reference to initialize m_wThis
pNew->m_pImpl->m_wThis = xSection;
@@ -205,8 +205,8 @@ SwXTextSection::CreateXTextSection(
}
SwXTextSection::SwXTextSection(
- SwSectionFmt *const pFmt, const bool bIndexHeader)
- : m_pImpl( new SwXTextSection::Impl(*this, pFmt, bIndexHeader) )
+ SwSectionFormat *const pFormat, const bool bIndexHeader)
+ : m_pImpl( new SwXTextSection::Impl(*this, pFormat, bIndexHeader) )
{
}
@@ -236,11 +236,11 @@ SwXTextSection::getParentSection() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwSectionFmt & rSectionFmt( m_pImpl->GetSectionFmtOrThrow() );
+ SwSectionFormat & rSectionFormat( m_pImpl->GetSectionFormatOrThrow() );
- SwSectionFmt *const pParentFmt = rSectionFmt.GetParent();
+ SwSectionFormat *const pParentFormat = rSectionFormat.GetParent();
const uno::Reference< text::XTextSection > xRet =
- (pParentFmt) ? CreateXTextSection(pParentFmt) : 0;
+ (pParentFormat) ? CreateXTextSection(pParentFormat) : 0;
return xRet;
}
@@ -249,15 +249,15 @@ SwXTextSection::getChildSections() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwSectionFmt & rSectionFmt( m_pImpl->GetSectionFmtOrThrow() );
+ SwSectionFormat & rSectionFormat( m_pImpl->GetSectionFormatOrThrow() );
SwSections aChildren;
- rSectionFmt.GetChildSections(aChildren, SORTSECT_NOT, false);
+ rSectionFormat.GetChildSections(aChildren, SORTSECT_NOT, false);
uno::Sequence<uno::Reference<text::XTextSection> > aSeq(aChildren.size());
uno::Reference< text::XTextSection > * pArray = aSeq.getArray();
for (size_t i = 0; i < aChildren.size(); ++i)
{
- SwSectionFmt *const pChild = aChildren[i]->GetFmt();
+ SwSectionFormat *const pChild = aChildren[i]->GetFormat();
pArray[i] = CreateXTextSection(pChild);
}
return aSeq;
@@ -319,7 +319,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
// get all child sections
SwSections aSectionsArr;
- static_cast<const SwTOXBaseSection*>(pBase)->GetFmt()->
+ static_cast<const SwTOXBaseSection*>(pBase)->GetFormat()->
GetChildSections(aSectionsArr);
// and search for current header section
@@ -364,9 +364,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
aSet.Put(*m_pImpl->m_pProps->m_pColItem);
}
- if (m_pImpl->m_pProps->m_pFtnItem.get())
+ if (m_pImpl->m_pProps->m_pFootnoteItem.get())
{
- aSet.Put(*m_pImpl->m_pProps->m_pFtnItem);
+ aSet.Put(*m_pImpl->m_pProps->m_pFootnoteItem);
}
if (m_pImpl->m_pProps->m_pEndItem.get())
{
@@ -404,8 +404,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
"SwXTextSection::attach(): invalid TextRange",
static_cast< ::cppu::OWeakObject*>(this), 0);
}
- pRet->GetFmt()->Add(m_pImpl.get());
- pRet->GetFmt()->SetXObject(static_cast< ::cppu::OWeakObject*>(this));
+ pRet->GetFormat()->Add(m_pImpl.get());
+ pRet->GetFormat()->SetXObject(static_cast< ::cppu::OWeakObject*>(this));
// XML import must hide sections depending on their old
// condition status
@@ -437,21 +437,21 @@ SwXTextSection::getAnchor() throw (uno::RuntimeException, std::exception)
SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > xRet;
- SwSectionFmt *const pSectFmt = m_pImpl->GetSectionFmt();
- if(pSectFmt)
+ SwSectionFormat *const pSectFormat = m_pImpl->GetSectionFormat();
+ if(pSectFormat)
{
const SwNodeIndex* pIdx;
- if( 0 != ( pSectFmt->GetSection() ) &&
- 0 != ( pIdx = pSectFmt->GetCntnt().GetCntntIdx() ) &&
+ if( 0 != ( pSectFormat->GetSection() ) &&
+ 0 != ( pIdx = pSectFormat->GetContent().GetContentIdx() ) &&
pIdx->GetNode().GetNodes().IsDocNodes() )
{
SwPaM aPaM(*pIdx);
- aPaM.Move( fnMoveForward, fnGoCntnt );
+ aPaM.Move( fnMoveForward, fnGoContent );
const SwEndNode* pEndNode = pIdx->GetNode().EndOfSectionNode();
SwPaM aEnd(*pEndNode);
- aEnd.Move( fnMoveBackward, fnGoCntnt );
- xRet = SwXTextRange::CreateXTextRange(*pSectFmt->GetDoc(),
+ aEnd.Move( fnMoveBackward, fnGoContent );
+ xRet = SwXTextRange::CreateXTextRange(*pSectFormat->GetDoc(),
*aPaM.Start(), aEnd.Start());
}
}
@@ -462,10 +462,10 @@ void SAL_CALL SwXTextSection::dispose() throw (uno::RuntimeException, std::excep
{
SolarMutexGuard aGuard;
- SwSectionFmt *const pSectFmt = m_pImpl->GetSectionFmt();
- if (pSectFmt)
+ SwSectionFormat *const pSectFormat = m_pImpl->GetSectionFormat();
+ if (pSectFormat)
{
- pSectFmt->GetDoc()->DelSectionFmt( pSectFmt );
+ pSectFormat->GetDoc()->DelSectionFormat( pSectFormat );
}
}
@@ -511,20 +511,20 @@ lcl_UpdateLinkType(SwSection & rSection, bool const bLinkUpdateAlways = true)
}
static void
-lcl_UpdateSection(SwSectionFmt *const pFmt,
+lcl_UpdateSection(SwSectionFormat *const pFormat,
::std::unique_ptr<SwSectionData> const& pSectionData,
::std::unique_ptr<SfxItemSet> const& pItemSet,
bool const bLinkModeChanged, bool const bLinkUpdateAlways = true)
{
- if (pFmt)
+ if (pFormat)
{
- SwSection & rSection = *pFmt->GetSection();
- SwDoc *const pDoc = pFmt->GetDoc();
- SwSectionFmts const& rFmts = pDoc->GetSections();
+ SwSection & rSection = *pFormat->GetSection();
+ SwDoc *const pDoc = pFormat->GetDoc();
+ SwSectionFormats const& rFormats = pDoc->GetSections();
UnoActionContext aContext(pDoc);
- for (size_t i = 0; i < rFmts.size(); ++i)
+ for (size_t i = 0; i < rFormats.size(); ++i)
{
- if (rFmts[i]->GetSection()->GetSectionName()
+ if (rFormats[i]->GetSection()->GetSectionName()
== rSection.GetSectionName())
{
pDoc->UpdateSection(i, *pSectionData, pItemSet.get(),
@@ -556,14 +556,14 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
{
throw lang::IllegalArgumentException();
}
- SwSectionFmt *const pFmt = GetSectionFmt();
- if (!pFmt && !m_bIsDescriptor)
+ SwSectionFormat *const pFormat = GetSectionFormat();
+ if (!pFormat && !m_bIsDescriptor)
{
throw uno::RuntimeException();
}
::std::unique_ptr<SwSectionData> const pSectionData(
- (pFmt) ? new SwSectionData(*pFmt->GetSection()) : 0);
+ (pFormat) ? new SwSectionData(*pFormat->GetSection()) : 0);
OUString const*const pPropertyNames = rPropertyNames.getConstArray();
uno::Any const*const pValues = rValues.getConstArray();
@@ -677,7 +677,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
const OUString sTmp(!aLink.FileURL.isEmpty()
? URIHelper::SmartRel2Abs(
- pFmt->GetDoc()->GetDocShell()->GetMedium()->GetURLObject(),
+ pFormat->GetDoc()->GetDocShell()->GetMedium()->GetURLObject(),
aLink.FileURL, URIHelper::GetMaybeFileHdl())
: OUString());
const OUString sFileName(
@@ -810,9 +810,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
break;
default:
{
- if (pFmt)
+ if (pFormat)
{
- const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet();
+ const SfxItemSet& rOldAttrSet = pFormat->GetAttrSet();
pItemSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pEntry->nWID, pEntry->nWID));
pItemSet->Put(rOldAttrSet);
m_rPropSet.setPropertyValue(*pEntry,
@@ -825,7 +825,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
{
if (!m_pProps->m_pColItem.get())
{
- m_pProps->m_pColItem.reset(new SwFmtCol);
+ m_pProps->m_pColItem.reset(new SwFormatCol);
}
pPutItem = m_pProps->m_pColItem.get();
}
@@ -840,17 +840,17 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else if (RES_FTN_AT_TXTEND == pEntry->nWID)
{
- if (!m_pProps->m_pFtnItem.get())
+ if (!m_pProps->m_pFootnoteItem.get())
{
- m_pProps->m_pFtnItem.reset(new SwFmtFtnAtTxtEnd);
+ m_pProps->m_pFootnoteItem.reset(new SwFormatFootnoteAtTextEnd);
}
- pPutItem = m_pProps->m_pFtnItem.get();
+ pPutItem = m_pProps->m_pFootnoteItem.get();
}
else if (RES_END_AT_TXTEND == pEntry->nWID)
{
if (!m_pProps->m_pEndItem.get())
{
- m_pProps->m_pEndItem.reset(new SwFmtEndAtTxtEnd);
+ m_pProps->m_pEndItem.reset(new SwFormatEndAtTextEnd);
}
pPutItem = m_pProps->m_pEndItem.get();
}
@@ -869,7 +869,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
if (!m_pProps->m_pNoBalanceItem.get())
{
m_pProps->m_pNoBalanceItem.reset(
- new SwFmtNoBalancedColumns(true));
+ new SwFormatNoBalancedColumns(true));
}
pPutItem = m_pProps->m_pNoBalanceItem.get();
}
@@ -902,7 +902,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
}
- lcl_UpdateSection(pFmt, pSectionData, pItemSet, bLinkModeChanged,
+ lcl_UpdateSection(pFormat, pSectionData, pItemSet, bLinkModeChanged,
bLinkMode);
}
@@ -951,15 +951,15 @@ SwXTextSection::Impl::GetPropertyValues_Impl(
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- SwSectionFmt *const pFmt = GetSectionFmt();
- if (!pFmt && !m_bIsDescriptor)
+ SwSectionFormat *const pFormat = GetSectionFormat();
+ if (!pFormat && !m_bIsDescriptor)
{
throw uno::RuntimeException();
}
uno::Sequence< uno::Any > aRet(rPropertyNames.getLength());
uno::Any* pRet = aRet.getArray();
- SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0;
+ SwSection *const pSect = (pFormat) ? pFormat->GetSection() : 0;
const OUString* pPropertyNames = rPropertyNames.getConstArray();
for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength();
@@ -1082,9 +1082,9 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
break;
case FN_PARAM_LINK_DISPLAY_NAME:
{
- if (pFmt)
+ if (pFormat)
{
- pRet[nProperty] <<= pFmt->GetSection()->GetSectionName();
+ pRet[nProperty] <<= pFormat->GetSection()->GetSectionName();
}
}
break;
@@ -1104,7 +1104,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
// convert section to TOXBase and get SwXDocumentIndex
const uno::Reference<text::XDocumentIndex> xIndex =
SwXDocumentIndex::CreateXDocumentIndex(
- *pTOXBaseSect->GetFmt()->GetDoc(), pTOXBaseSect);
+ *pTOXBaseSect->GetFormat()->GetDoc(), pTOXBaseSect);
pRet[nProperty] <<= xIndex;
}
// else: no enclosing index found -> empty return value
@@ -1112,7 +1112,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
break;
case WID_SECT_IS_GLOBAL_DOC_SECTION:
{
- const bool bRet = pFmt && (NULL != pFmt->GetGlobalDocSection());
+ const bool bRet = pFormat && (NULL != pFormat->GetGlobalDocSection());
pRet[nProperty] <<= bRet;
}
break;
@@ -1125,18 +1125,18 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
case FN_UNO_REDLINE_NODE_START:
case FN_UNO_REDLINE_NODE_END:
{
- if (!pFmt)
+ if (!pFormat)
break; // #i73247#
- SwNode* pSectNode = pFmt->GetSectionNode();
+ SwNode* pSectNode = pFormat->GetSectionNode();
if (FN_UNO_REDLINE_NODE_END == pEntry->nWID)
{
pSectNode = pSectNode->EndOfSectionNode();
}
- const SwRedlineTbl& rRedTbl =
- pFmt->GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl();
- for (size_t nRed = 0; nRed < rRedTbl.size(); ++nRed)
+ const SwRedlineTable& rRedTable =
+ pFormat->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
+ for (size_t nRed = 0; nRed < rRedTable.size(); ++nRed)
{
- const SwRangeRedline* pRedline = rRedTbl[nRed];
+ const SwRangeRedline* pRedline = rRedTable[nRed];
const SwNode& rRedPointNode = pRedline->GetNode(true);
const SwNode& rRedMarkNode = pRedline->GetNode(false);
if ((&rRedPointNode == pSectNode) ||
@@ -1163,10 +1163,10 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
break;
default:
{
- if (pFmt)
+ if (pFormat)
{
m_rPropSet.getPropertyValue(*pEntry,
- pFmt->GetAttrSet(), pRet[nProperty]);
+ pFormat->GetAttrSet(), pRet[nProperty]);
}
else
{
@@ -1175,7 +1175,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
if (!m_pProps->m_pColItem.get())
{
- m_pProps->m_pColItem.reset(new SwFmtCol);
+ m_pProps->m_pColItem.reset(new SwFormatCol);
}
pQueryItem = m_pProps->m_pColItem.get();
}
@@ -1190,17 +1190,17 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
else if (RES_FTN_AT_TXTEND == pEntry->nWID)
{
- if (!m_pProps->m_pFtnItem.get())
+ if (!m_pProps->m_pFootnoteItem.get())
{
- m_pProps->m_pFtnItem.reset(new SwFmtFtnAtTxtEnd);
+ m_pProps->m_pFootnoteItem.reset(new SwFormatFootnoteAtTextEnd);
}
- pQueryItem = m_pProps->m_pFtnItem.get();
+ pQueryItem = m_pProps->m_pFootnoteItem.get();
}
else if (RES_END_AT_TXTEND == pEntry->nWID)
{
if (!m_pProps->m_pEndItem.get())
{
- m_pProps->m_pEndItem.reset(new SwFmtEndAtTxtEnd);
+ m_pProps->m_pEndItem.reset(new SwFormatEndAtTextEnd);
}
pQueryItem = m_pProps->m_pEndItem.get();
}
@@ -1218,7 +1218,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
if (!m_pProps->m_pNoBalanceItem.get())
{
m_pProps->m_pNoBalanceItem.reset(
- new SwFmtNoBalancedColumns);
+ new SwFormatNoBalancedColumns);
}
pQueryItem = m_pProps->m_pNoBalanceItem.get();
}
@@ -1373,8 +1373,8 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
- if (!pFmt && !m_pImpl->m_bIsDescriptor)
+ SwSectionFormat *const pFormat = m_pImpl->GetSectionFormat();
+ if (!pFormat && !m_pImpl->m_bIsDescriptor)
{
throw uno::RuntimeException();
}
@@ -1413,10 +1413,10 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
break;
default:
{
- if (pFmt)
+ if (pFormat)
{
pStates[i] = m_pImpl->m_rPropSet.getPropertyState(
- pNames[i], pFmt->GetAttrSet());
+ pNames[i], pFormat->GetAttrSet());
}
else
{
@@ -1455,8 +1455,8 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
- if (!pFmt && !m_pImpl->m_bIsDescriptor)
+ SwSectionFormat *const pFormat = m_pImpl->GetSectionFormat();
+ if (!pFormat && !m_pImpl->m_bIsDescriptor)
{
throw uno::RuntimeException();
}
@@ -1477,7 +1477,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
}
::std::unique_ptr<SwSectionData> const pSectionData(
- (pFmt) ? new SwSectionData(*pFmt->GetSection()) : 0);
+ (pFormat) ? new SwSectionData(*pFormat->GetSection()) : 0);
::std::unique_ptr<SfxItemSet> pNewAttrSet;
bool bLinkModeChanged = false;
@@ -1568,9 +1568,9 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
if (pEntry->nWID <= SFX_WHICH_MAX)
{
- if (pFmt)
+ if (pFormat)
{
- const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet();
+ const SfxItemSet& rOldAttrSet = pFormat->GetAttrSet();
pNewAttrSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pEntry->nWID, pEntry->nWID));
pNewAttrSet->ClearItem(pEntry->nWID);
}
@@ -1589,7 +1589,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
}
}
- lcl_UpdateSection(pFmt, pSectionData, pNewAttrSet, bLinkModeChanged);
+ lcl_UpdateSection(pFormat, pSectionData, pNewAttrSet, bLinkModeChanged);
}
uno::Any SAL_CALL
@@ -1600,7 +1600,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
SolarMutexGuard aGuard;
uno::Any aRet;
- SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
+ SwSectionFormat *const pFormat = m_pImpl->GetSectionFormat();
SfxItemPropertySimpleEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
@@ -1637,9 +1637,9 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
::sw::GetDefaultTextContentValue(aRet, OUString(), pEntry->nWID);
break;
default:
- if(pFmt && pEntry->nWID <= SFX_WHICH_MAX)
+ if(pFormat && pEntry->nWID <= SFX_WHICH_MAX)
{
- SwDoc *const pDoc = pFmt->GetDoc();
+ SwDoc *const pDoc = pFormat->GetDoc();
const SfxPoolItem& rDefItem =
pDoc->GetAttrPool().GetDefaultItem(pEntry->nWID);
rDefItem.QueryValue(aRet, pEntry->nMemberId);
@@ -1653,10 +1653,10 @@ OUString SAL_CALL SwXTextSection::getName() throw (uno::RuntimeException, std::e
SolarMutexGuard aGuard;
OUString sRet;
- SwSectionFmt const*const pFmt = m_pImpl->GetSectionFmt();
- if(pFmt)
+ SwSectionFormat const*const pFormat = m_pImpl->GetSectionFormat();
+ if(pFormat)
{
- sRet = pFmt->GetSection()->GetSectionName();
+ sRet = pFormat->GetSection()->GetSectionName();
}
else if (m_pImpl->m_bIsDescriptor)
{
@@ -1674,22 +1674,22 @@ throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
- if(pFmt)
+ SwSectionFormat *const pFormat = m_pImpl->GetSectionFormat();
+ if(pFormat)
{
- SwSection *const pSect = pFmt->GetSection();
+ SwSection *const pSect = pFormat->GetSection();
SwSectionData aSection(*pSect);
aSection.SetSectionName(rName);
- const SwSectionFmts& rFmts = pFmt->GetDoc()->GetSections();
+ const SwSectionFormats& rFormats = pFormat->GetDoc()->GetSections();
size_t nApplyPos = SIZE_MAX;
- for( size_t i = 0; i < rFmts.size(); ++i )
+ for( size_t i = 0; i < rFormats.size(); ++i )
{
- if(rFmts[i]->GetSection() == pSect)
+ if(rFormats[i]->GetSection() == pSect)
{
nApplyPos = i;
}
- else if (rName == rFmts[i]->GetSection()->GetSectionName())
+ else if (rName == rFormats[i]->GetSection()->GetSectionName())
{
throw uno::RuntimeException();
}
@@ -1697,12 +1697,12 @@ throw (uno::RuntimeException, std::exception)
if (nApplyPos != SIZE_MAX)
{
{
- UnoActionContext aContext(pFmt->GetDoc());
- pFmt->GetDoc()->UpdateSection(nApplyPos, aSection);
+ UnoActionContext aContext(pFormat->GetDoc());
+ pFormat->GetDoc()->UpdateSection(nApplyPos, aSection);
}
{
// temporarily remove actions to allow cursor update
- UnoActionRemoveContext aRemoveContext( pFmt->GetDoc() );
+ UnoActionRemoveContext aRemoveContext( pFormat->GetDoc() );
}
}
}
@@ -1746,16 +1746,16 @@ SwXTextSection::getSupportedServiceNames() throw (uno::RuntimeException, std::ex
// MetadatableMixin
::sfx2::Metadatable* SwXTextSection::GetCoreObject()
{
- SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
- return pSectionFmt;
+ SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
+ return pSectionFormat;
}
uno::Reference<frame::XModel> SwXTextSection::GetModel()
{
- SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
- if (pSectionFmt)
+ SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
+ if (pSectionFormat)
{
- SwDocShell const*const pShell( pSectionFmt->GetDoc()->GetDocShell() );
+ SwDocShell const*const pShell( pSectionFormat->GetDoc()->GetDocShell() );
return (pShell) ? pShell->GetModel() : 0;
}
return 0;
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 14bc695904df..87d0cb52785b 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -184,38 +184,38 @@ const SfxItemPropertySet* GetLineNumberingSet()
return &aLineNumberingSet_Impl;
}
-static SwCharFmt* lcl_getCharFmt(SwDoc* pDoc, const uno::Any& aValue)
+static SwCharFormat* lcl_getCharFormat(SwDoc* pDoc, const uno::Any& aValue)
{
- SwCharFmt* pRet = 0;
+ SwCharFormat* pRet = 0;
OUString uTmp;
aValue >>= uTmp;
- OUString sCharFmt;
- SwStyleNameMapper::FillUIName(uTmp, sCharFmt, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
- if (sCharFmt != SW_RESSTR(STR_POOLCOLL_STANDARD))
+ OUString sCharFormat;
+ SwStyleNameMapper::FillUIName(uTmp, sCharFormat, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
+ if (sCharFormat != SW_RESSTR(STR_POOLCOLL_STANDARD))
{
- pRet = pDoc->FindCharFmtByName( sCharFmt );
+ pRet = pDoc->FindCharFormatByName( sCharFormat );
}
if(!pRet)
{
- const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(sCharFmt, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(sCharFormat, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(USHRT_MAX != nId)
- pRet = pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( nId );
+ pRet = pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( nId );
}
return pRet;
}
-static SwTxtFmtColl* lcl_GetParaStyle(SwDoc* pDoc, const uno::Any& aValue)
+static SwTextFormatColl* lcl_GetParaStyle(SwDoc* pDoc, const uno::Any& aValue)
{
OUString uTmp;
aValue >>= uTmp;
OUString sParaStyle;
SwStyleNameMapper::FillUIName(uTmp, sParaStyle, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
- SwTxtFmtColl* pRet = pDoc->FindTxtFmtCollByName( sParaStyle );
+ SwTextFormatColl* pRet = pDoc->FindTextFormatCollByName( sParaStyle );
if( !pRet )
{
const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sParaStyle, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId )
- pRet = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool( nId );
+ pRet = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( nId );
}
return pRet;
}
@@ -304,21 +304,21 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
{
if ( pEntry->nFlags & PropertyAttribute::READONLY)
throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- SwFtnInfo aFtnInfo(pDoc->GetFtnInfo());
+ SwFootnoteInfo aFootnoteInfo(pDoc->GetFootnoteInfo());
switch(pEntry->nWID)
{
case WID_PREFIX:
{
OUString uTmp;
aValue >>= uTmp;
- aFtnInfo.SetPrefix(uTmp);
+ aFootnoteInfo.SetPrefix(uTmp);
}
break;
case WID_SUFFIX:
{
OUString uTmp;
aValue >>= uTmp;
- aFtnInfo.SetSuffix(uTmp);
+ aFootnoteInfo.SetSuffix(uTmp);
}
break;
case WID_NUMBERING_TYPE:
@@ -328,7 +328,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
if(nTmp >= 0 &&
(nTmp <= SVX_NUM_ARABIC ||
nTmp > SVX_NUM_BITMAP))
- aFtnInfo.aFmt.SetNumberingType(nTmp);
+ aFootnoteInfo.aFormat.SetNumberingType(nTmp);
else
throw lang::IllegalArgumentException();
}
@@ -337,7 +337,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
{
sal_Int16 nTmp = 0;
aValue >>= nTmp;
- aFtnInfo.nFtnOffset = nTmp;
+ aFootnoteInfo.nFootnoteOffset = nTmp;
}
break;
case WID_FOOTNOTE_COUNTING:
@@ -347,66 +347,66 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
switch(nTmp)
{
case FootnoteNumbering::PER_PAGE:
- aFtnInfo.eNum = FTNNUM_PAGE;
+ aFootnoteInfo.eNum = FTNNUM_PAGE;
break;
case FootnoteNumbering::PER_CHAPTER:
- aFtnInfo.eNum = FTNNUM_CHAPTER;
+ aFootnoteInfo.eNum = FTNNUM_CHAPTER;
break;
case FootnoteNumbering::PER_DOCUMENT:
- aFtnInfo.eNum = FTNNUM_DOC;
+ aFootnoteInfo.eNum = FTNNUM_DOC;
break;
}
}
break;
case WID_PARAGRAPH_STYLE:
{
- SwTxtFmtColl* pColl = lcl_GetParaStyle(pDoc, aValue);
+ SwTextFormatColl* pColl = lcl_GetParaStyle(pDoc, aValue);
if(pColl)
- aFtnInfo.SetFtnTxtColl(*pColl);
+ aFootnoteInfo.SetFootnoteTextColl(*pColl);
}
break;
case WID_PAGE_STYLE:
{
SwPageDesc* pDesc = lcl_GetPageDesc(pDoc, aValue);
if(pDesc)
- aFtnInfo.ChgPageDesc( pDesc );
+ aFootnoteInfo.ChgPageDesc( pDesc );
}
break;
case WID_ANCHOR_CHARACTER_STYLE:
case WID_CHARACTER_STYLE:
{
- SwCharFmt* pFmt = lcl_getCharFmt(pDoc, aValue);
- if(pFmt)
+ SwCharFormat* pFormat = lcl_getCharFormat(pDoc, aValue);
+ if(pFormat)
{
if(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE)
- aFtnInfo.SetAnchorCharFmt(pFmt);
+ aFootnoteInfo.SetAnchorCharFormat(pFormat);
else
- aFtnInfo.SetCharFmt(pFmt);
+ aFootnoteInfo.SetCharFormat(pFormat);
}
}
break;
case WID_POSITION_END_OF_DOC:
{
bool bVal = *static_cast<sal_Bool const *>(aValue.getValue());
- aFtnInfo.ePos = bVal ? FTNPOS_CHAPTER : FTNPOS_PAGE;
+ aFootnoteInfo.ePos = bVal ? FTNPOS_CHAPTER : FTNPOS_PAGE;
}
break;
case WID_END_NOTICE:
{
OUString uTmp;
aValue >>= uTmp;
- aFtnInfo.aQuoVadis = uTmp;
+ aFootnoteInfo.aQuoVadis = uTmp;
}
break;
case WID_BEGIN_NOTICE:
{
OUString uTmp;
aValue >>= uTmp;
- aFtnInfo.aErgoSum = uTmp;
+ aFootnoteInfo.aErgoSum = uTmp;
}
break;
}
- pDoc->SetFtnInfo(aFtnInfo);
+ pDoc->SetFootnoteInfo(aFootnoteInfo);
}
else
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -425,31 +425,31 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
if(pEntry)
{
- const SwFtnInfo& rFtnInfo = pDoc->GetFtnInfo();
+ const SwFootnoteInfo& rFootnoteInfo = pDoc->GetFootnoteInfo();
switch(pEntry->nWID)
{
case WID_PREFIX:
{
- aRet <<= rFtnInfo.GetPrefix();
+ aRet <<= rFootnoteInfo.GetPrefix();
}
break;
case WID_SUFFIX:
{
- aRet <<= rFtnInfo.GetSuffix();
+ aRet <<= rFootnoteInfo.GetSuffix();
}
break;
case WID_NUMBERING_TYPE :
{
- aRet <<= rFtnInfo.aFmt.GetNumberingType();
+ aRet <<= rFootnoteInfo.aFormat.GetNumberingType();
}
break;
case WID_START_AT:
- aRet <<= (sal_Int16)rFtnInfo.nFtnOffset;
+ aRet <<= (sal_Int16)rFootnoteInfo.nFootnoteOffset;
break;
case WID_FOOTNOTE_COUNTING :
{
sal_Int16 nRet = 0;
- switch(rFtnInfo.eNum)
+ switch(rFootnoteInfo.eNum)
{
case FTNNUM_PAGE:
nRet = FootnoteNumbering::PER_PAGE;
@@ -466,7 +466,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
break;
case WID_PARAGRAPH_STYLE :
{
- SwTxtFmtColl* pColl = rFtnInfo.GetFtnTxtColl();
+ SwTextFormatColl* pColl = rFootnoteInfo.GetFootnoteTextColl();
OUString aString;
if(pColl)
aString = pColl->GetName();
@@ -477,10 +477,10 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
case WID_PAGE_STYLE :
{
OUString aString;
- if( rFtnInfo.KnowsPageDesc() )
+ if( rFootnoteInfo.KnowsPageDesc() )
{
SwStyleNameMapper::FillProgName(
- rFtnInfo.GetPageDesc( *pDoc )->GetName(),
+ rFootnoteInfo.GetPageDesc( *pDoc )->GetName(),
aString,
nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC,
true);
@@ -492,21 +492,21 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
case WID_CHARACTER_STYLE:
{
OUString aString;
- const SwCharFmt* pCharFmt = 0;
+ const SwCharFormat* pCharFormat = 0;
if( pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE )
{
- if( rFtnInfo.GetAnchorCharFmtDep()->GetRegisteredIn() )
- pCharFmt = rFtnInfo.GetAnchorCharFmt(*pDoc);
+ if( rFootnoteInfo.GetAnchorCharFormatDep()->GetRegisteredIn() )
+ pCharFormat = rFootnoteInfo.GetAnchorCharFormat(*pDoc);
}
else
{
- if( rFtnInfo.GetCharFmtDep()->GetRegisteredIn() )
- pCharFmt = rFtnInfo.GetCharFmt(*pDoc);
+ if( rFootnoteInfo.GetCharFormatDep()->GetRegisteredIn() )
+ pCharFormat = rFootnoteInfo.GetCharFormat(*pDoc);
}
- if( pCharFmt )
+ if( pCharFormat )
{
SwStyleNameMapper::FillProgName(
- pCharFmt->GetName(),
+ pCharFormat->GetName(),
aString,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT,
true);
@@ -515,13 +515,13 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
}
break;
case WID_POSITION_END_OF_DOC:
- aRet <<= FTNPOS_CHAPTER == rFtnInfo.ePos;
+ aRet <<= FTNPOS_CHAPTER == rFootnoteInfo.ePos;
break;
case WID_END_NOTICE :
- aRet <<= rFtnInfo.aQuoVadis;
+ aRet <<= rFootnoteInfo.aQuoVadis;
break;
case WID_BEGIN_NOTICE :
- aRet <<= rFtnInfo.aErgoSum;
+ aRet <<= rFootnoteInfo.aErgoSum;
break;
}
}
@@ -628,21 +628,21 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const
{
sal_Int16 nTmp = 0;
aValue >>= nTmp;
- aEndInfo.aFmt.SetNumberingType(nTmp);
+ aEndInfo.aFormat.SetNumberingType(nTmp);
}
break;
case WID_START_AT:
{
sal_Int16 nTmp = 0;
aValue >>= nTmp;
- aEndInfo.nFtnOffset = nTmp;
+ aEndInfo.nFootnoteOffset = nTmp;
}
break;
case WID_PARAGRAPH_STYLE :
{
- SwTxtFmtColl* pColl = lcl_GetParaStyle(pDoc, aValue);
+ SwTextFormatColl* pColl = lcl_GetParaStyle(pDoc, aValue);
if(pColl)
- aEndInfo.SetFtnTxtColl(*pColl);
+ aEndInfo.SetFootnoteTextColl(*pColl);
}
break;
case WID_PAGE_STYLE :
@@ -655,13 +655,13 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const
case WID_ANCHOR_CHARACTER_STYLE:
case WID_CHARACTER_STYLE :
{
- SwCharFmt* pFmt = lcl_getCharFmt(pDoc, aValue);
- if(pFmt)
+ SwCharFormat* pFormat = lcl_getCharFormat(pDoc, aValue);
+ if(pFormat)
{
if(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE)
- aEndInfo.SetAnchorCharFmt(pFmt);
+ aEndInfo.SetAnchorCharFormat(pFormat);
else
- aEndInfo.SetCharFmt(pFmt);
+ aEndInfo.SetCharFormat(pFormat);
}
}
break;
@@ -693,14 +693,14 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
aRet <<= rEndInfo.GetSuffix();
break;
case WID_NUMBERING_TYPE :
- aRet <<= rEndInfo.aFmt.GetNumberingType();
+ aRet <<= rEndInfo.aFormat.GetNumberingType();
break;
case WID_START_AT:
- aRet <<= (sal_Int16)rEndInfo.nFtnOffset;
+ aRet <<= (sal_Int16)rEndInfo.nFootnoteOffset;
break;
case WID_PARAGRAPH_STYLE :
{
- SwTxtFmtColl* pColl = rEndInfo.GetFtnTxtColl();
+ SwTextFormatColl* pColl = rEndInfo.GetFootnoteTextColl();
OUString aString;
if(pColl)
aString = pColl->GetName();
@@ -731,21 +731,21 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
case WID_CHARACTER_STYLE:
{
OUString aString;
- const SwCharFmt* pCharFmt = 0;
+ const SwCharFormat* pCharFormat = 0;
if( pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE )
{
- if( rEndInfo.GetAnchorCharFmtDep()->GetRegisteredIn() )
- pCharFmt = rEndInfo.GetAnchorCharFmt(*pDoc);
+ if( rEndInfo.GetAnchorCharFormatDep()->GetRegisteredIn() )
+ pCharFormat = rEndInfo.GetAnchorCharFormat(*pDoc);
}
else
{
- if( rEndInfo.GetCharFmtDep()->GetRegisteredIn() )
- pCharFmt = rEndInfo.GetCharFmt(*pDoc);
+ if( rEndInfo.GetCharFormatDep()->GetRegisteredIn() )
+ pCharFormat = rEndInfo.GetCharFormat(*pDoc);
}
- if( pCharFmt )
+ if( pCharFormat )
{
SwStyleNameMapper::FillProgName(
- pCharFmt->GetName(),
+ pCharFormat->GetName(),
aString,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT,
true );
@@ -845,9 +845,9 @@ void SwXLineNumberingProperties::setPropertyValue(
break;
case WID_CHARACTER_STYLE :
{
- SwCharFmt* pFmt = lcl_getCharFmt(pDoc, aValue);
- if(pFmt)
- aInfo.SetCharFmt(pFmt);
+ SwCharFormat* pFormat = lcl_getCharFormat(pDoc, aValue);
+ if(pFormat)
+ aInfo.SetCharFormat(pFormat);
}
break;
case WID_NUMBERING_TYPE :
@@ -965,7 +965,7 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
if(rInfo.HasCharFormat())
{
SwStyleNameMapper::FillProgName(
- rInfo.GetCharFmt(pDoc->getIDocumentStylePoolAccess())->GetName(),
+ rInfo.GetCharFormat(pDoc->getIDocumentStylePoolAccess())->GetName(),
aString,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT,
true);
@@ -1112,11 +1112,11 @@ SwXNumberingRules::SwXNumberingRules(const SwNumRule& rRule, SwDoc* doc) :
// if no format is set, it should work as well
for( sal_uInt16 i = 0; i < MAXLEVEL; ++i)
{
- SwNumFmt rFmt(pNumRule->Get(i));
- SwCharFmt* pCharFmt = rFmt.GetCharFmt();
- if(pCharFmt)
+ SwNumFormat rFormat(pNumRule->Get(i));
+ SwCharFormat* pCharFormat = rFormat.GetCharFormat();
+ if(pCharFormat)
{
- pDoc = pCharFmt->GetDoc();
+ pDoc = pCharFormat->GetDoc();
break;
}
}
@@ -1191,37 +1191,37 @@ void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElemen
SwXNumberingRules::SetNumberingRuleByIndex( aNumRule,
rProperties, nIndex);
// set character format if needed
- const SwCharFmts* pFmts = pDocShell->GetDoc()->GetCharFmts();
- const size_t nChCount = pFmts->size();
+ const SwCharFormats* pFormats = pDocShell->GetDoc()->GetCharFormats();
+ const size_t nChCount = pFormats->size();
for(sal_uInt16 i = 0; i < MAXLEVEL;i++)
{
- SwNumFmt aFmt(aNumRule.Get( i ));
+ SwNumFormat aFormat(aNumRule.Get( i ));
if (!m_sNewCharStyleNames[i].isEmpty() &&
m_sNewCharStyleNames[i] != UNO_NAME_CHARACTER_FORMAT_NONE &&
- (!aFmt.GetCharFmt() || aFmt.GetCharFmt()->GetName()!= m_sNewCharStyleNames[i]))
+ (!aFormat.GetCharFormat() || aFormat.GetCharFormat()->GetName()!= m_sNewCharStyleNames[i]))
{
- SwCharFmt* pCharFmt = 0;
+ SwCharFormat* pCharFormat = 0;
for(size_t j = 0; j< nChCount; ++j)
{
- SwCharFmt* pTmp = (*pFmts)[j];
+ SwCharFormat* pTmp = (*pFormats)[j];
if(pTmp->GetName() == m_sNewCharStyleNames[i])
{
- pCharFmt = pTmp;
+ pCharFormat = pTmp;
break;
}
}
- if(!pCharFmt)
+ if(!pCharFormat)
{
SfxStyleSheetBase* pBase;
pBase = pDocShell->GetStyleSheetPool()->Find(m_sNewCharStyleNames[i],
SFX_STYLE_FAMILY_CHAR);
if(!pBase)
pBase = &pDocShell->GetStyleSheetPool()->Make(m_sNewCharStyleNames[i], SFX_STYLE_FAMILY_CHAR);
- pCharFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt();
+ pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
}
- aFmt.SetCharFmt( pCharFmt );
- aNumRule.Set( i, aFmt );
+ aFormat.SetCharFormat( pCharFormat );
+ aNumRule.Set( i, aFormat );
}
}
pDocShell->GetDoc()->SetOutlineNumRule( aNumRule );
@@ -1290,12 +1290,12 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
SolarMutexGuard aGuard;
OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
- const SwNumFmt& rFmt = rNumRule.Get( (sal_uInt16)nIndex );
+ const SwNumFormat& rFormat = rNumRule.Get( (sal_uInt16)nIndex );
- SwCharFmt* pCharFmt = rFmt.GetCharFmt();
+ SwCharFormat* pCharFormat = rFormat.GetCharFormat();
OUString CharStyleName;
- if (pCharFmt)
- CharStyleName = pCharFmt->GetName();
+ if (pCharFormat)
+ CharStyleName = pCharFormat->GetName();
// Whether or not a style is present: the array entry overwrites this string
if (!m_sNewCharStyleNames[nIndex].isEmpty() &&
@@ -1309,23 +1309,23 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
{
// template name
OUString sValue(SW_RES(STR_POOLCOLL_HEADLINE1 + nIndex));
- const SwTxtFmtColls* pColls = pDocShell->GetDoc()->GetTxtFmtColls();
+ const SwTextFormatColls* pColls = pDocShell->GetDoc()->GetTextFormatColls();
const size_t nCount = pColls->size();
for(size_t i = 0; i < nCount; ++i)
{
- SwTxtFmtColl &rTxtColl = *pColls->operator[](i);
- if(rTxtColl.IsDefault())
+ SwTextFormatColl &rTextColl = *pColls->operator[](i);
+ if(rTextColl.IsDefault())
continue;
- const sal_Int16 nOutLevel = rTxtColl.IsAssignedToListLevelOfOutlineStyle()
- ? static_cast<sal_Int16>(rTxtColl.GetAssignedOutlineStyleLevel())
+ const sal_Int16 nOutLevel = rTextColl.IsAssignedToListLevelOfOutlineStyle()
+ ? static_cast<sal_Int16>(rTextColl.GetAssignedOutlineStyleLevel())
: MAXLEVEL;
if ( nOutLevel == nIndex )
{
- sValue = rTxtColl.GetName();
+ sValue = rTextColl.GetName();
break; // the style for the level in question has been found
}
- else if( sValue==rTxtColl.GetName() )
+ else if( sValue==rTextColl.GetName() )
{
// if the default for the level is existing, but its
// level is different, then it cannot be the default.
@@ -1335,12 +1335,12 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
SwStyleNameMapper::FillProgName(sValue, aUString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
}
- return GetPropertiesForNumFmt(rFmt, CharStyleName, (pDocShell) ? & aUString : 0);
+ return GetPropertiesForNumFormat(rFormat, CharStyleName, (pDocShell) ? & aUString : 0);
}
-uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFmt(
- const SwNumFmt& rFmt, OUString const& rCharFormatName,
+uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat(
+ const SwNumFormat& rFormat, OUString const& rCharFormatName,
OUString const*const pHeadingStyleName)
{
bool bChapterNum = pHeadingStyleName != 0;
@@ -1350,20 +1350,20 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFmt(
//fill all properties into the array
//adjust
- SvxAdjust eAdj = rFmt.GetNumAdjust();
+ SvxAdjust eAdj = rFormat.GetNumAdjust();
sal_Int16 nINT16 = aSvxToUnoAdjust[eAdj];
aPropertyValues.push_back(comphelper::makePropertyValue("Adjust", nINT16));
//parentnumbering
- nINT16 = rFmt.GetIncludeUpperLevels();
+ nINT16 = rFormat.GetIncludeUpperLevels();
aPropertyValues.push_back(comphelper::makePropertyValue("ParentNumbering", nINT16));
//prefix
- OUString aUString = rFmt.GetPrefix();
+ OUString aUString = rFormat.GetPrefix();
aPropertyValues.push_back(comphelper::makePropertyValue("Prefix", aUString));
//suffix
- aUString = rFmt.GetSuffix();
+ aUString = rFormat.GetSuffix();
aPropertyValues.push_back(comphelper::makePropertyValue("Suffix", aUString));
//char style name
@@ -1374,75 +1374,75 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFmt(
aPropertyValues.push_back(comphelper::makePropertyValue("CharStyleName", aUString));
//startvalue
- nINT16 = rFmt.GetStart();
+ nINT16 = rFormat.GetStart();
aPropertyValues.push_back(comphelper::makePropertyValue("StartWith", nINT16));
- if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
+ if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
//leftmargin
- sal_Int32 nINT32 = convertTwipToMm100(rFmt.GetAbsLSpace());
+ sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetAbsLSpace());
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LEFT_MARGIN, nINT32));
//chartextoffset
- nINT32 = convertTwipToMm100(rFmt.GetCharTextDistance());
+ nINT32 = convertTwipToMm100(rFormat.GetCharTextDistance());
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_SYMBOL_TEXT_DISTANCE, nINT32));
//firstlineoffset
- nINT32 = convertTwipToMm100(rFmt.GetFirstLineOffset());
+ nINT32 = convertTwipToMm100(rFormat.GetFirstLineOffset());
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_FIRST_LINE_OFFSET, nINT32));
}
// PositionAndSpaceMode
nINT16 = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION;
- if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
+ if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
nINT16 = PositionAndSpaceMode::LABEL_ALIGNMENT;
}
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_POSITION_AND_SPACE_MODE, nINT16));
- if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
+ if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
// LabelFollowedBy
nINT16 = LabelFollow::LISTTAB;
- if ( rFmt.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
+ if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
nINT16 = LabelFollow::SPACE;
}
- else if ( rFmt.GetLabelFollowedBy() == SvxNumberFormat::NOTHING )
+ else if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::NOTHING )
{
nINT16 = LabelFollow::NOTHING;
}
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LABEL_FOLLOWED_BY, nINT16));
// ListtabStopPosition
- sal_Int32 nINT32 = convertTwipToMm100(rFmt.GetListtabPos());
+ sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetListtabPos());
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LISTTAB_STOP_POSITION, nINT32));
// FirstLineIndent
- nINT32 = convertTwipToMm100(rFmt.GetFirstLineIndent());
+ nINT32 = convertTwipToMm100(rFormat.GetFirstLineIndent());
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_FIRST_LINE_INDENT, nINT32));
// IndentAt
- nINT32 = convertTwipToMm100(rFmt.GetIndentAt());
+ nINT32 = convertTwipToMm100(rFormat.GetIndentAt());
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_INDENT_AT, nINT32));
}
//numberingtype
- nINT16 = rFmt.GetNumberingType();
+ nINT16 = rFormat.GetNumberingType();
aPropertyValues.push_back(comphelper::makePropertyValue("NumberingType", nINT16));
if(!bChapterNum)
{
- if(SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
+ if(SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
{
//BulletId
- nINT16 = rFmt.GetBulletChar();
+ nINT16 = rFormat.GetBulletChar();
aPropertyValues.push_back(comphelper::makePropertyValue("BulletId", nINT16));
- const vcl::Font* pFont = rFmt.GetBulletFont();
+ const vcl::Font* pFont = rFormat.GetBulletFont();
//BulletChar
- aUString = OUString(rFmt.GetBulletChar());
+ aUString = OUString(rFormat.GetBulletChar());
aPropertyValues.push_back(comphelper::makePropertyValue("BulletChar", aUString));
//BulletFontName
@@ -1457,10 +1457,10 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFmt(
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_BULLET_FONT, aDesc));
}
}
- if(SVX_NUM_BITMAP == rFmt.GetNumberingType())
+ if(SVX_NUM_BITMAP == rFormat.GetNumberingType())
{
//GraphicURL
- const SvxBrushItem* pBrush = rFmt.GetBrush();
+ const SvxBrushItem* pBrush = rFormat.GetBrush();
if(pBrush)
{
Any aAny;
@@ -1480,13 +1480,13 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFmt(
uno::Reference<awt::XBitmap> xBmp = VCLUnoHelper::CreateBitmap( pGraphic->GetBitmapEx() );
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_BITMAP, xBmp));
}
- Size aSize = rFmt.GetGraphicSize();
+ Size aSize = rFormat.GetGraphicSize();
// #i101131#
// adjust conversion due to type mismatch between <Size> and <awt::Size>
awt::Size aAwtSize(convertTwipToMm100(aSize.Width()), convertTwipToMm100(aSize.Height()));
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_SIZE, aAwtSize));
- const SwFmtVertOrient* pOrient = rFmt.GetGraphicOrientation();
+ const SwFormatVertOrient* pOrient = rFormat.GetGraphicOrientation();
if(pOrient)
{
uno::Any any;
@@ -1526,12 +1526,12 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
SolarMutexGuard aGuard;
OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
- SwNumFmt aFmt(rNumRule.Get( (sal_uInt16)nIndex ));
+ SwNumFormat aFormat(rNumRule.Get( (sal_uInt16)nIndex ));
OUString sHeadingStyleName;
OUString sParagraphStyleName;
- SetPropertiesToNumFmt(aFmt, m_sNewCharStyleNames[nIndex],
+ SetPropertiesToNumFormat(aFormat, m_sNewCharStyleNames[nIndex],
&m_sNewBulletFontNames[nIndex],
&sHeadingStyleName, &sParagraphStyleName,
pDoc, pDocShell, rProperties);
@@ -1539,44 +1539,44 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
if (pDoc && !sParagraphStyleName.isEmpty())
{
- const SwTxtFmtColls* pColls = pDoc->GetTxtFmtColls();
+ const SwTextFormatColls* pColls = pDoc->GetTextFormatColls();
const size_t nCount = pColls->size();
for (size_t k = 0; k < nCount; ++k)
{
- SwTxtFmtColl &rTxtColl = *((*pColls)[k]);
- if (rTxtColl.GetName() == sParagraphStyleName)
- rTxtColl.SetFmtAttr( SwNumRuleItem( rNumRule.GetName()));
+ SwTextFormatColl &rTextColl = *((*pColls)[k]);
+ if (rTextColl.GetName() == sParagraphStyleName)
+ rTextColl.SetFormatAttr( SwNumRuleItem( rNumRule.GetName()));
}
}
if (!sHeadingStyleName.isEmpty())
{
assert(pDocShell);
- const SwTxtFmtColls* pColls = pDocShell->GetDoc()->GetTxtFmtColls();
+ const SwTextFormatColls* pColls = pDocShell->GetDoc()->GetTextFormatColls();
const size_t nCount = pColls->size();
for (size_t k = 0; k < nCount; ++k)
{
- SwTxtFmtColl &rTxtColl = *((*pColls)[k]);
- if (rTxtColl.IsDefault())
+ SwTextFormatColl &rTextColl = *((*pColls)[k]);
+ if (rTextColl.IsDefault())
continue;
- if (rTxtColl.IsAssignedToListLevelOfOutlineStyle() &&
- rTxtColl.GetAssignedOutlineStyleLevel() == nIndex &&
- rTxtColl.GetName() != sHeadingStyleName)
+ if (rTextColl.IsAssignedToListLevelOfOutlineStyle() &&
+ rTextColl.GetAssignedOutlineStyleLevel() == nIndex &&
+ rTextColl.GetName() != sHeadingStyleName)
{
- rTxtColl.DeleteAssignmentToListLevelOfOutlineStyle();
+ rTextColl.DeleteAssignmentToListLevelOfOutlineStyle();
}
- else if (rTxtColl.GetName() == sHeadingStyleName)
+ else if (rTextColl.GetName() == sHeadingStyleName)
{
- rTxtColl.AssignToListLevelOfOutlineStyle( nIndex );
+ rTextColl.AssignToListLevelOfOutlineStyle( nIndex );
}
}
}
- rNumRule.Set(static_cast<sal_uInt16>(nIndex), aFmt);
+ rNumRule.Set(static_cast<sal_uInt16>(nIndex), aFormat);
}
-void SwXNumberingRules::SetPropertiesToNumFmt(
- SwNumFmt & aFmt,
+void SwXNumberingRules::SetPropertiesToNumFormat(
+ SwNumFormat & aFormat,
OUString & rCharStyleName, OUString *const pBulletFontName,
OUString *const pHeadingStyleName,
OUString *const pParagraphStyleName,
@@ -1657,7 +1657,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
{
SvxBrushItem* pSetBrush = 0;
Size* pSetSize = 0;
- SwFmtVertOrient* pSetVOrient = 0;
+ SwFormatVertOrient* pSetVOrient = 0;
bool bCharStyleNameSet = false;
for(size_t i = 0; i < SAL_N_ELEMENTS( aNumPropertyNames ) && !bExcept && !bWrongArg; ++i)
@@ -1676,7 +1676,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
nValue <= text::HoriOrientation::LEFT &&
USHRT_MAX != aUnoToSvxAdjust[nValue])
{
- aFmt.SetNumAdjust((SvxAdjust)aUnoToSvxAdjust[nValue]);
+ aFormat.SetNumAdjust((SvxAdjust)aUnoToSvxAdjust[nValue]);
}
else
bWrongArg = true;
@@ -1687,21 +1687,21 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
sal_Int16 nSet = 0;
pProp->Value >>= nSet;
if(nSet >= 0 && MAXLEVEL >= nSet)
- aFmt.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
+ aFormat.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
}
break;
case 2: //"Prefix",
{
OUString uTmp;
pProp->Value >>= uTmp;
- aFmt.SetPrefix(uTmp);
+ aFormat.SetPrefix(uTmp);
}
break;
case 3: //"Suffix",
{
OUString uTmp;
pProp->Value >>= uTmp;
- aFmt.SetSuffix(uTmp);
+ aFormat.SetSuffix(uTmp);
}
break;
case 4: //"CharStyleName",
@@ -1709,57 +1709,57 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
bCharStyleNameSet = true;
OUString uTmp;
pProp->Value >>= uTmp;
- OUString sCharFmtName;
- SwStyleNameMapper::FillUIName( uTmp, sCharFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- if (sCharFmtName == UNO_NAME_CHARACTER_FORMAT_NONE)
+ OUString sCharFormatName;
+ SwStyleNameMapper::FillUIName( uTmp, sCharFormatName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
+ if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE)
{
rCharStyleName = aInvalidStyle;
- aFmt.SetCharFmt(0);
+ aFormat.SetCharFormat(0);
}
else if(pDocShell || pDoc)
{
SwDoc* pLocalDoc = pDoc ? pDoc : pDocShell->GetDoc();
- const SwCharFmts* pFmts = pLocalDoc->GetCharFmts();
- const size_t nChCount = pFmts->size();
+ const SwCharFormats* pFormats = pLocalDoc->GetCharFormats();
+ const size_t nChCount = pFormats->size();
- SwCharFmt* pCharFmt = 0;
- if (!sCharFmtName.isEmpty())
+ SwCharFormat* pCharFormat = 0;
+ if (!sCharFormatName.isEmpty())
{
for(size_t j = 0; j< nChCount; ++j)
{
- SwCharFmt* pTmp = (*pFmts)[j];
- if(pTmp->GetName() == sCharFmtName)
+ SwCharFormat* pTmp = (*pFormats)[j];
+ if(pTmp->GetName() == sCharFormatName)
{
- pCharFmt = pTmp;
+ pCharFormat = pTmp;
break;
}
}
- if(!pCharFmt)
+ if(!pCharFormat)
{
SfxStyleSheetBase* pBase;
SfxStyleSheetBasePool* pPool = pLocalDoc->GetDocShell()->GetStyleSheetPool();
- pBase = static_cast<SfxStyleSheetBasePool*>(pPool)->Find(sCharFmtName, SFX_STYLE_FAMILY_CHAR);
+ pBase = static_cast<SfxStyleSheetBasePool*>(pPool)->Find(sCharFormatName, SFX_STYLE_FAMILY_CHAR);
if(!pBase)
- pBase = &pPool->Make(sCharFmtName, SFX_STYLE_FAMILY_CHAR);
- pCharFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt();
+ pBase = &pPool->Make(sCharFormatName, SFX_STYLE_FAMILY_CHAR);
+ pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
}
}
- aFmt.SetCharFmt( pCharFmt );
+ aFormat.SetCharFormat( pCharFormat );
// #i51842#
// If the character format has been found its name should not be in the
// char style names array
rCharStyleName.clear();
}
else
- rCharStyleName = sCharFmtName;
+ rCharStyleName = sCharFormatName;
}
break;
case 5: //"StartWith",
{
sal_Int16 nVal = 0;
pProp->Value >>= nVal;
- aFmt.SetStart(nVal);
+ aFormat.SetStart(nVal);
}
break;
case 6: //UNO_NAME_LEFT_MARGIN,
@@ -1767,7 +1767,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
sal_Int32 nValue = 0;
pProp->Value >>= nValue;
// #i23727# nValue can be negative
- aFmt.SetAbsLSpace((short) convertMm100ToTwip(nValue));
+ aFormat.SetAbsLSpace((short) convertMm100ToTwip(nValue));
}
break;
case 7: //UNO_NAME_SYMBOL_TEXT_DISTANCE,
@@ -1775,7 +1775,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
sal_Int32 nValue = 0;
pProp->Value >>= nValue;
if(nValue >= 0)
- aFmt.SetCharTextDistance((short) convertMm100ToTwip(nValue));
+ aFormat.SetCharTextDistance((short) convertMm100ToTwip(nValue));
else
bWrongArg = true;
}
@@ -1786,7 +1786,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
pProp->Value >>= nValue;
// #i23727# nValue can be positive
nValue = convertMm100ToTwip(nValue);
- aFmt.SetFirstLineOffset((short)nValue);
+ aFormat.SetFirstLineOffset((short)nValue);
}
break;
case 9: // UNO_NAME_POSITION_AND_SPACE_MODE
@@ -1795,11 +1795,11 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
pProp->Value >>= nValue;
if ( nValue == 0 )
{
- aFmt.SetPositionAndSpaceMode( SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
+ aFormat.SetPositionAndSpaceMode( SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
}
else if ( nValue == 1 )
{
- aFmt.SetPositionAndSpaceMode( SvxNumberFormat::LABEL_ALIGNMENT );
+ aFormat.SetPositionAndSpaceMode( SvxNumberFormat::LABEL_ALIGNMENT );
}
else
{
@@ -1813,15 +1813,15 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
pProp->Value >>= nValue;
if ( nValue == 0 )
{
- aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
+ aFormat.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
}
else if ( nValue == 1 )
{
- aFmt.SetLabelFollowedBy( SvxNumberFormat::SPACE );
+ aFormat.SetLabelFollowedBy( SvxNumberFormat::SPACE );
}
else if ( nValue == 2 )
{
- aFmt.SetLabelFollowedBy( SvxNumberFormat::NOTHING );
+ aFormat.SetLabelFollowedBy( SvxNumberFormat::NOTHING );
}
else
{
@@ -1836,7 +1836,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
nValue = convertMm100ToTwip(nValue);
if ( nValue >= 0 )
{
- aFmt.SetListtabPos( nValue );
+ aFormat.SetListtabPos( nValue );
}
else
{
@@ -1849,7 +1849,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
sal_Int32 nValue = 0;
pProp->Value >>= nValue;
nValue = convertMm100ToTwip(nValue);
- aFmt.SetFirstLineIndent( nValue );
+ aFormat.SetFirstLineIndent( nValue );
}
break;
case 13: // UNO_NAME_INDENT_AT
@@ -1857,7 +1857,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
sal_Int32 nValue = 0;
pProp->Value >>= nValue;
nValue = convertMm100ToTwip(nValue);
- aFmt.SetIndentAt( nValue );
+ aFormat.SetIndentAt( nValue );
}
break;
case 14: //"NumberingType"
@@ -1865,7 +1865,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
sal_Int16 nSet = 0;
pProp->Value >>= nSet;
if(nSet >= 0)
- aFmt.SetNumberingType(nSet);
+ aFormat.SetNumberingType(nSet);
else
bWrongArg = true;
}
@@ -1887,7 +1887,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
assert( !pDocShell );
sal_Int16 nSet = 0;
if( pProp->Value >>= nSet )
- aFmt.SetBulletChar(nSet);
+ aFormat.SetBulletChar(nSet);
else
bWrongArg = true;
}
@@ -1904,7 +1904,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
{
vcl::Font aFont;
SvxUnoFontDescriptor::ConvertToFont(desc, aFont);
- aFmt.SetBulletFont(&aFont);
+ aFormat.SetBulletFont(&aFont);
}
}
else
@@ -1926,7 +1926,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
vcl::FontInfo aInfo = pList->Get(
sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE);
vcl::Font aFont(aInfo);
- aFmt.SetBulletFont(&aFont);
+ aFormat.SetBulletFont(&aFont);
}
else if (pBulletFontName)
*pBulletFontName = sBulletFontName;
@@ -1939,12 +1939,12 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
pProp->Value >>= aChar;
if(aChar.getLength() == 1)
{
- aFmt.SetBulletChar(aChar.toChar());
+ aFormat.SetBulletChar(aChar.toChar());
}
else if(aChar.isEmpty())
{
// If w:lvlText's value is null - set bullet char to zero
- aFmt.SetBulletChar(sal_Unicode(0x0));
+ aFormat.SetBulletChar(sal_Unicode(0x0));
}
else
{
@@ -1959,7 +1959,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
pProp->Value >>= sBrushURL;
if(!pSetBrush)
{
- const SvxBrushItem* pOrigBrush = aFmt.GetBrush();
+ const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
if(pOrigBrush)
{
pSetBrush = new SvxBrushItem(*pOrigBrush);
@@ -1978,7 +1978,7 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
{
if(!pSetBrush)
{
- const SvxBrushItem* pOrigBrush = aFmt.GetBrush();
+ const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
if(pOrigBrush)
{
pSetBrush = new SvxBrushItem(*pOrigBrush);
@@ -2017,10 +2017,10 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
assert( !pDocShell );
if(!pSetVOrient)
{
- if(aFmt.GetGraphicOrientation())
- pSetVOrient = static_cast<SwFmtVertOrient*>(aFmt.GetGraphicOrientation()->Clone());
+ if(aFormat.GetGraphicOrientation())
+ pSetVOrient = static_cast<SwFormatVertOrient*>(aFormat.GetGraphicOrientation()->Clone());
else
- pSetVOrient = new SwFmtVertOrient;
+ pSetVOrient = new SwFormatVertOrient;
}
pSetVOrient->PutValue(pProp->Value, MID_VERTORIENT_ORIENT);
}
@@ -2045,17 +2045,17 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
}
if(!bExcept && !bWrongArg && (pSetBrush || pSetSize || pSetVOrient))
{
- if(!pSetBrush && aFmt.GetBrush())
- pSetBrush = new SvxBrushItem(*aFmt.GetBrush());
+ if(!pSetBrush && aFormat.GetBrush())
+ pSetBrush = new SvxBrushItem(*aFormat.GetBrush());
if(pSetBrush)
{
- if(!pSetVOrient && aFmt.GetGraphicOrientation())
- pSetVOrient = new SwFmtVertOrient(*aFmt.GetGraphicOrientation());
+ if(!pSetVOrient && aFormat.GetGraphicOrientation())
+ pSetVOrient = new SwFormatVertOrient(*aFormat.GetGraphicOrientation());
if(!pSetSize)
{
- pSetSize = new Size(aFmt.GetGraphicSize());
+ pSetSize = new Size(aFormat.GetGraphicSize());
if(!pSetSize->Width() || !pSetSize->Height())
{
const Graphic* pGraphic = pSetBrush->GetGraphic();
@@ -2065,12 +2065,12 @@ void SwXNumberingRules::SetPropertiesToNumFmt(
}
sal_Int16 eOrient = pSetVOrient ?
(sal_Int16)pSetVOrient->GetVertOrient() : text::VertOrientation::NONE;
- aFmt.SetGraphicBrush( pSetBrush, pSetSize, text::VertOrientation::NONE == eOrient ? 0 : &eOrient );
+ aFormat.SetGraphicBrush( pSetBrush, pSetSize, text::VertOrientation::NONE == eOrient ? 0 : &eOrient );
}
}
if ((!bCharStyleNameSet || rCharStyleName.isEmpty())
- && aFmt.GetNumberingType() == NumberingType::BITMAP
- && !aFmt.GetCharFmt()
+ && aFormat.GetNumberingType() == NumberingType::BITMAP
+ && !aFormat.GetCharFormat()
&& !SwXNumberingRules::isInvalidStyle(rCharStyleName))
{
OUString tmp;
@@ -2330,20 +2330,20 @@ SwXTextColumns::SwXTextColumns(sal_uInt16 nColCount) :
setColumnCount(nColCount);
}
-SwXTextColumns::SwXTextColumns(const SwFmtCol& rFmtCol) :
+SwXTextColumns::SwXTextColumns(const SwFormatCol& rFormatCol) :
nReference(0),
- aTextColumns(rFmtCol.GetNumCols()),
- bIsAutomaticWidth(rFmtCol.IsOrtho()),
+ aTextColumns(rFormatCol.GetNumCols()),
+ bIsAutomaticWidth(rFormatCol.IsOrtho()),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS))
{
- const sal_uInt16 nItemGutterWidth = rFmtCol.GetGutterWidth();
+ const sal_uInt16 nItemGutterWidth = rFormatCol.GetGutterWidth();
nAutoDistance = bIsAutomaticWidth ?
USHRT_MAX == nItemGutterWidth ? DEF_GUTTER_WIDTH : (sal_Int32)nItemGutterWidth
: 0;
nAutoDistance = convertTwipToMm100(nAutoDistance);
TextColumn* pColumns = aTextColumns.getArray();
- const SwColumns& rCols = rFmtCol.GetColumns();
+ const SwColumns& rCols = rFormatCol.GetColumns();
for(sal_Int32 i = 0; i < aTextColumns.getLength(); ++i)
{
const SwColumn* pCol = &rCols[i];
@@ -2356,12 +2356,12 @@ SwXTextColumns::SwXTextColumns(const SwFmtCol& rFmtCol) :
if(!aTextColumns.getLength())
nReference = USHRT_MAX;
- nSepLineWidth = rFmtCol.GetLineWidth();
- nSepLineColor = rFmtCol.GetLineColor().GetColor();
- nSepLineHeightRelative = rFmtCol.GetLineHeight();
- bSepLineIsOn = rFmtCol.GetLineAdj() != COLADJ_NONE;
+ nSepLineWidth = rFormatCol.GetLineWidth();
+ nSepLineColor = rFormatCol.GetLineColor().GetColor();
+ nSepLineHeightRelative = rFormatCol.GetLineHeight();
+ bSepLineIsOn = rFormatCol.GetLineAdj() != COLADJ_NONE;
sal_Int8 nStyle = API_COL_LINE_NONE;
- switch (rFmtCol.GetLineStyle())
+ switch (rFormatCol.GetLineStyle())
{
case table::BorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
case table::BorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
@@ -2369,7 +2369,7 @@ SwXTextColumns::SwXTextColumns(const SwFmtCol& rFmtCol) :
default: break;
}
nSepLineStyle = nStyle;
- switch(rFmtCol.GetLineAdj())
+ switch(rFormatCol.GetLineAdj())
{
case COLADJ_TOP: nSepLineVertAlign = style::VerticalAlignment_TOP; break;
case COLADJ_BOTTOM: nSepLineVertAlign = style::VerticalAlignment_BOTTOM; break;
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index 7f19bf2eddf0..adc767a484cb 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -143,7 +143,7 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, bool bIsValueSearch)
*pWeightItem = 0,
*pULineItem = 0,
*pOLineItem = 0,
- *pCharFmtItem = 0,
+ *pCharFormatItem = 0,
*pShadItem = 0,
*pPostItem = 0,
*pNHyphItem = 0,
@@ -269,9 +269,9 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, bool bIsValueSearch)
pTempItem = pShadItem;
break;
case RES_TXTATR_CHARFMT:
- if(!pCharFmtItem)
- pCharFmtItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
- pTempItem = pCharFmtItem;
+ if(!pCharFormatItem)
+ pCharFormatItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pCharFormatItem;
break;
case RES_CHRATR_UNDERLINE:
if(!pULineItem)
@@ -447,7 +447,7 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, bool bIsValueSearch)
delete pWeightItem;
delete pULineItem;
delete pOLineItem;
- delete pCharFmtItem ;
+ delete pCharFormatItem ;
delete pShadItem;
delete pPostItem;
delete pNHyphItem;
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 8080292470e3..5a25218b2ab8 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -360,8 +360,8 @@ void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL,
}
SwgReaderOption aOpt;
- aOpt.SetFrmFmts( bLoadStyleFrame );
- aOpt.SetTxtFmts( bLoadStyleText );
+ aOpt.SetFrameFormats( bLoadStyleFrame );
+ aOpt.SetTextFormats( bLoadStyleText );
aOpt.SetPageDescs( bLoadStylePage );
aOpt.SetNumRules( bLoadStyleNumbering );
aOpt.SetMerge( !bLoadStyleOverwrite );
@@ -449,22 +449,22 @@ static sal_Int32 lcl_GetCountOrName(const SwDoc &rDoc,
RES_POOLCHR_HTML_END - RES_POOLCHR_HTML_BEGIN +
RES_POOLCHR_NORMAL_END - RES_POOLCHR_NORMAL_BEGIN;
nIndex = nIndex - nBaseCount;
- 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 ];
- if( pFmt->IsDefault() && pFmt != rDoc.GetDfltCharFmt() )
+ SwCharFormat* pFormat = (*rDoc.GetCharFormats())[ i ];
+ if( pFormat->IsDefault() && pFormat != rDoc.GetDfltCharFormat() )
continue;
- if ( IsPoolUserFmt ( pFmt->GetPoolFmtId() ) )
+ if ( IsPoolUserFormat ( pFormat->GetPoolFormatId() ) )
{
if ( nIndex == nCount )
{
// the default character format needs to be set to "Default!"
- if(rDoc.GetDfltCharFmt() == pFmt)
+ if(rDoc.GetDfltCharFormat() == pFormat)
SwStyleNameMapper::FillUIName(
RES_POOLCOLL_STANDARD, *pString );
else
- *pString = pFmt->GetName();
+ *pString = pFormat->GetName();
break;
}
nCount++;
@@ -483,13 +483,13 @@ static sal_Int32 lcl_GetCountOrName(const SwDoc &rDoc,
RES_POOLCOLL_LISTS_END - RES_POOLCOLL_LISTS_BEGIN +
RES_POOLCOLL_TEXT_END - RES_POOLCOLL_TEXT_BEGIN;
nIndex = nIndex - nBaseCount;
- 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];
if ( pColl->IsDefault() )
continue;
- if ( IsPoolUserFmt ( pColl->GetPoolFmtId() ) )
+ if ( IsPoolUserFormat ( pColl->GetPoolFormatId() ) )
{
if ( nIndex == nCount )
{
@@ -506,17 +506,17 @@ static sal_Int32 lcl_GetCountOrName(const SwDoc &rDoc,
{
const sal_Int32 nBaseCount = RES_POOLFRM_END - RES_POOLFRM_BEGIN;
nIndex = nIndex - nBaseCount;
- 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 ];
- if(pFmt->IsDefault() || pFmt->IsAuto())
+ const SwFrameFormat* pFormat = (*rDoc.GetFrameFormats())[ i ];
+ if(pFormat->IsDefault() || pFormat->IsAuto())
continue;
- if ( IsPoolUserFmt ( pFmt->GetPoolFmtId() ) )
+ if ( IsPoolUserFormat ( pFormat->GetPoolFormatId() ) )
{
if ( nIndex == nCount )
{
- *pString = pFmt->GetName();
+ *pString = pFormat->GetName();
break;
}
nCount++;
@@ -534,7 +534,7 @@ static sal_Int32 lcl_GetCountOrName(const SwDoc &rDoc,
{
const SwPageDesc& rDesc = rDoc.GetPageDesc(i);
- if ( IsPoolUserFmt ( rDesc.GetPoolFmtId() ) )
+ if ( IsPoolUserFormat ( rDesc.GetPoolFormatId() ) )
{
if ( nIndex == nCount )
{
@@ -551,13 +551,13 @@ static sal_Int32 lcl_GetCountOrName(const SwDoc &rDoc,
{
const sal_Int32 nBaseCount = RES_POOLNUMRULE_END - RES_POOLNUMRULE_BEGIN;
nIndex = nIndex - nBaseCount;
- const SwNumRuleTbl& rNumTbl = rDoc.GetNumRuleTbl();
- for(size_t i = 0; i < rNumTbl.size(); ++i)
+ const SwNumRuleTable& rNumTable = rDoc.GetNumRuleTable();
+ for(size_t i = 0; i < rNumTable.size(); ++i)
{
- const SwNumRule& rRule = *rNumTbl[ i ];
+ const SwNumRule& rRule = *rNumTable[ i ];
if( rRule.IsAutoRule() )
continue;
- if ( IsPoolUserFmt ( rRule.GetPoolFmtId() ) )
+ if ( IsPoolUserFormat ( rRule.GetPoolFormatId() ) )
{
if ( nIndex == nCount )
{
@@ -1854,47 +1854,47 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
const OUString* pBulletFontNames = pSwXRules->GetBulletFontNames();
SwNumRule aSetRule(*pSwXRules->GetNumRule());
- const SwCharFmts* pFmts = pDoc->GetCharFmts();
- const size_t nChCount = pFmts->size();
+ const SwCharFormats* pFormats = pDoc->GetCharFormats();
+ const size_t nChCount = pFormats->size();
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
- const SwNumFmt* pFmt = aSetRule.GetNumFmt( i );
- if(pFmt)
+ const SwNumFormat* pFormat = aSetRule.GetNumFormat( i );
+ if(pFormat)
{
- SwNumFmt aFmt(*pFmt);
+ SwNumFormat aFormat(*pFormat);
if (!pCharStyleNames[i].isEmpty() &&
!SwXNumberingRules::isInvalidStyle(pCharStyleNames[i]) &&
- (!pFmt->GetCharFmt() || pFmt->GetCharFmt()->GetName() != pCharStyleNames[i]) )
+ (!pFormat->GetCharFormat() || pFormat->GetCharFormat()->GetName() != pCharStyleNames[i]) )
{
- SwCharFmt* pCharFmt = 0;
+ SwCharFormat* pCharFormat = 0;
for(size_t j = 0; j< nChCount; ++j)
{
- SwCharFmt* pTmp = (*pFmts)[j];
+ SwCharFormat* pTmp = (*pFormats)[j];
if(pTmp->GetName() == pCharStyleNames[i])
{
- pCharFmt = pTmp;
+ pCharFormat = pTmp;
break;
}
}
- if(!pCharFmt && pBasePool)
+ if(!pCharFormat && pBasePool)
{
SfxStyleSheetBase* pBase;
pBase = static_cast<SfxStyleSheetBasePool*>(pBasePool)->Find(pCharStyleNames[i], SFX_STYLE_FAMILY_CHAR);
if(!pBase)
pBase = &pBasePool->Make(pCharStyleNames[i], SFX_STYLE_FAMILY_CHAR);
- pCharFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt();
+ pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
}
- aFmt.SetCharFmt( pCharFmt );
+ aFormat.SetCharFormat( pCharFormat );
}
// same for fonts:
if (!pBulletFontNames[i].isEmpty() &&
!SwXNumberingRules::isInvalidStyle(pBulletFontNames[i]) &&
- (!pFmt->GetBulletFont() || pFmt->GetBulletFont()->GetName() != pBulletFontNames[i]) )
+ (!pFormat->GetBulletFont() || pFormat->GetBulletFont()->GetName() != pBulletFontNames[i]) )
{
const SvxFontListItem* pFontListItem =
static_cast<const SvxFontListItem*>(pDoc->GetDocShell()
@@ -1903,9 +1903,9 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
vcl::FontInfo aInfo = pList->Get(
pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE);
vcl::Font aFont(aInfo);
- aFmt.SetBulletFont(&aFont);
+ aFormat.SetBulletFont(&aFont);
}
- aSetRule.Set( i, &aFmt );
+ aSetRule.Set( i, &aFormat );
}
}
rBase.getNewBase()->SetNumRule(aSetRule);
@@ -1949,14 +1949,14 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
throw lang::IllegalArgumentException();
SfxItemSet& rStyleSet = rBase.GetItemSet();
- SwFmtPageDesc* pNewDesc = 0;
+ SwFormatPageDesc* pNewDesc = 0;
const SfxPoolItem* pItem;
if(SfxItemState::SET == rStyleSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
{
- pNewDesc = new SwFmtPageDesc(*static_cast<const SwFmtPageDesc*>(pItem));
+ pNewDesc = new SwFormatPageDesc(*static_cast<const SwFormatPageDesc*>(pItem));
}
if(!pNewDesc)
- pNewDesc = new SwFmtPageDesc();
+ pNewDesc = new SwFormatPageDesc();
OUString uDescName;
aValue >>= uDescName;
OUString sDescName;
@@ -1980,7 +1980,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if(!bPut)
{
rStyleSet.ClearItem(RES_BREAK);
- rStyleSet.Put(SwFmtPageDesc());
+ rStyleSet.Put(SwFormatPageDesc());
}
else
rStyleSet.Put(*pNewDesc);
@@ -1994,9 +1994,9 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
bool bAuto = *static_cast<sal_Bool const *>(aValue.getValue());
if(SFX_STYLE_FAMILY_PARA == eFamily)
- rBase.getNewBase()->GetCollection()->SetAutoUpdateFmt(bAuto);
+ rBase.getNewBase()->GetCollection()->SetAutoUpdateFormat(bAuto);
else if(SFX_STYLE_FAMILY_FRAME == eFamily)
- rBase.getNewBase()->GetFrmFmt()->SetAutoUpdateFmt(bAuto);
+ rBase.getNewBase()->GetFrameFormat()->SetAutoUpdateFormat(bAuto);
bDone = true;
break;
@@ -2115,20 +2115,20 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if(aValue >>= sTmp)
{
SfxItemSet& rStyleSet = rBase.GetItemSet();
- SwFmtRuby* pRuby = 0;
+ SwFormatRuby* pRuby = 0;
const SfxPoolItem* pItem;
if(SfxItemState::SET == rStyleSet.GetItemState( RES_TXTATR_CJK_RUBY, true, &pItem ) )
- pRuby = new SwFmtRuby(*static_cast<const SwFmtRuby*>(pItem));
+ pRuby = new SwFormatRuby(*static_cast<const SwFormatRuby*>(pItem));
if(!pRuby)
- pRuby = new SwFmtRuby(OUString());
+ pRuby = new SwFormatRuby(OUString());
OUString sStyle;
SwStyleNameMapper::FillUIName(sTmp, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- pRuby->SetCharFmtName( sTmp );
- pRuby->SetCharFmtId( 0 );
+ pRuby->SetCharFormatName( sTmp );
+ pRuby->SetCharFormatId( 0 );
if(!sTmp.isEmpty())
{
sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmp, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
- pRuby->SetCharFmtId(nId);
+ pRuby->SetCharFormatId(nId);
}
rStyleSet.Put(*pRuby);
delete pRuby;
@@ -2146,12 +2146,12 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
SfxItemSet& rStyleSet = rBase.GetItemSet();
- SwFmtDrop* pDrop = 0;
+ SwFormatDrop* pDrop = 0;
const SfxPoolItem* pItem;
if(SfxItemState::SET == rStyleSet.GetItemState( RES_PARATR_DROP, true, &pItem ) )
- pDrop = new SwFmtDrop(*static_cast<const SwFmtDrop*>(pItem));
+ pDrop = new SwFormatDrop(*static_cast<const SwFormatDrop*>(pItem));
if(!pDrop)
- pDrop = new SwFmtDrop();
+ pDrop = new SwFormatDrop();
OUString uStyle;
aValue >>= uStyle;
OUString sStyle;
@@ -2159,7 +2159,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwDocStyleSheet* pStyle =
static_cast<SwDocStyleSheet*>(pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR));
if(pStyle)
- pDrop->SetCharFmt(pStyle->GetCharFmt());
+ pDrop->SetCharFormat(pStyle->GetCharFormat());
else
throw lang::IllegalArgumentException();
rStyleSet.Put(*pDrop);
@@ -2237,7 +2237,7 @@ void SAL_CALL SwXStyle::SetPropertyValues_Impl(
const OUString* pNames = rPropertyNames.getConstArray();
const uno::Any* pValues = rValues.getConstArray();
- SwStyleBase_Impl aBaseImpl(*m_pDoc, m_sStyleName, &GetDoc()->GetDfltTxtFmtColl()->GetAttrSet()); //UUUU add pDfltTxtFmtColl as parent
+ SwStyleBase_Impl aBaseImpl(*m_pDoc, m_sStyleName, &GetDoc()->GetDfltTextFormatColl()->GetAttrSet()); //UUUU add pDfltTextFormatColl as parent
if(pBasePool)
{
const sal_uInt16 nSaveMask = pBasePool->GetSearchMask();
@@ -2323,8 +2323,8 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
bPhys = static_cast<SwDocStyleSheet*>(pBase)->IsPhysical();
// The standard character format is not existing physically
if( bPhys && SFX_STYLE_FAMILY_CHAR == eFamily &&
- static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt() &&
- static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt()->IsDefault() )
+ static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat() &&
+ static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat()->IsDefault() )
bPhys = false;
}
aRet <<= bPhys;
@@ -2418,7 +2418,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
const SfxPoolItem* pItem;
if (SfxItemState::SET == rBase.GetItemSet().GetItemState(RES_PAGEDESC, true, &pItem))
{
- const SwPageDesc* pDesc = static_cast<const SwFmtPageDesc*>(pItem)->GetPageDesc();
+ const SwPageDesc* pDesc = static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc();
if(pDesc)
{
OUString aString;
@@ -2434,9 +2434,9 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
bool bAuto = false;
if(SFX_STYLE_FAMILY_PARA == eFamily)
- bAuto = rBase.getNewBase()->GetCollection()->IsAutoUpdateFmt();
+ bAuto = rBase.getNewBase()->GetCollection()->IsAutoUpdateFormat();
else if(SFX_STYLE_FAMILY_FRAME == eFamily)
- bAuto = rBase.getNewBase()->GetFrmFmt()->IsAutoUpdateFmt();
+ bAuto = rBase.getNewBase()->GetFrameFormat()->IsAutoUpdateFormat();
aRet <<= bAuto;
bDone = true;
@@ -2456,20 +2456,20 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
uno::Sequence< beans::NamedValue > aSeq(COND_COMMAND_COUNT);
beans::NamedValue *pSeq = aSeq.getArray();
- SwFmt *pFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCollection();
+ SwFormat *pFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCollection();
const CommandStruct *pCmds = SwCondCollItem::GetCmds();
for (sal_uInt16 n = 0; n < COND_COMMAND_COUNT; ++n)
{
OUString aStyleName;
const SwCollCondition* pCond = 0;
- if( pFmt && RES_CONDTXTFMTCOLL == pFmt->Which() &&
- 0 != ( pCond = static_cast<SwConditionTxtFmtColl*>(pFmt)->
+ if( pFormat && RES_CONDTXTFMTCOLL == pFormat->Which() &&
+ 0 != ( pCond = static_cast<SwConditionTextFormatColl*>(pFormat)->
HasCondition( SwCollCondition( 0, pCmds[n].nCnd, pCmds[n].nSubCond ) ) )
- && pCond->GetTxtFmtColl() )
+ && pCond->GetTextFormatColl() )
{
// get programmatic style name from UI style name
- aStyleName = pCond->GetTxtFmtColl()->GetName();
+ aStyleName = pCond->GetTextFormatColl()->GetName();
SwStyleNameMapper::FillProgName(aStyleName, aStyleName, lcl_GetSwEnumFromSfxEnum ( eFamily ), true);
}
@@ -2483,7 +2483,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
}
case FN_UNO_CATEGORY:
{
- const sal_uInt16 nPoolId = rBase.getNewBase()->GetCollection()->GetPoolFmtId();
+ const sal_uInt16 nPoolId = rBase.getNewBase()->GetCollection()->GetPoolFormatId();
short nRet = -1;
switch ( COLL_GET_RANGE_BITS & nPoolId )
@@ -2515,10 +2515,10 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
case SID_SWREGISTER_COLLECTION:
{
const SwPageDesc *pPageDesc = rBase.getNewBase()->GetPageDesc();
- const SwTxtFmtColl* pCol = 0;
+ const SwTextFormatColl* pCol = 0;
OUString aString;
if( pPageDesc )
- pCol = pPageDesc->GetRegisterFmtColl();
+ pCol = pPageDesc->GetRegisterFormatColl();
if( pCol )
SwStyleNameMapper::FillProgName(
pCol->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
@@ -2645,7 +2645,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl(
const OUString* pNames = rPropertyNames.getConstArray();
uno::Sequence< uno::Any > aRet(rPropertyNames.getLength());
uno::Any* pRet = aRet.getArray();
- SwStyleBase_Impl aBase(*m_pDoc, m_sStyleName, &GetDoc()->GetDfltTxtFmtColl()->GetAttrSet()); //UUUU add pDfltTxtFmtColl as parent
+ SwStyleBase_Impl aBase(*m_pDoc, m_sStyleName, &GetDoc()->GetDfltTextFormatColl()->GetAttrSet()); //UUUU add pDfltTextFormatColl as parent
SfxStyleSheetBase* pBase = 0;
for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
@@ -2688,12 +2688,12 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl(
{
if (pEntry->nWID >= POOLATTR_BEGIN && pEntry->nWID < RES_UNKNOWNATR_END )
{
- SwFmt * pFmt;
+ SwFormat * pFormat;
if ( eFamily == SFX_STYLE_FAMILY_CHAR )
- pFmt = m_pDoc->GetDfltCharFmt();
+ pFormat = m_pDoc->GetDfltCharFormat();
else
- pFmt = m_pDoc->GetDfltFrmFmt();
- const SwAttrPool * pPool = pFmt->GetAttrSet().GetPool();
+ pFormat = m_pDoc->GetDfltFrameFormat();
+ const SwAttrPool * pPool = pFormat->GetAttrSet().GetPool();
const SfxPoolItem & rItem = pPool->GetDefaultItem ( pEntry->nWID );
rItem.QueryValue ( pRet[nProp], pEntry->nMemberId );
}
@@ -2983,7 +2983,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFmt *pTargetFmt = 0;
+ SwFormat *pTargetFormat = 0;
if(pBasePool)
{
@@ -2997,22 +2997,22 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
switch(eFamily)
{
case SFX_STYLE_FAMILY_CHAR:
- pTargetFmt = xStyle->GetCharFmt();
+ pTargetFormat = xStyle->GetCharFormat();
break;
case SFX_STYLE_FAMILY_PARA:
- pTargetFmt = xStyle->GetCollection();
+ pTargetFormat = xStyle->GetCollection();
break;
case SFX_STYLE_FAMILY_FRAME:
- pTargetFmt = xStyle->GetFrmFmt();
+ pTargetFormat = xStyle->GetFrameFormat();
break;
case SFX_STYLE_FAMILY_PAGE:
{
SwPageDesc *pDesc = m_pDoc->FindPageDesc(xStyle->GetPageDesc()->GetName());
if( pDesc )
- pTargetFmt = &pDesc->GetMaster();
+ pTargetFormat = &pDesc->GetMaster();
break;
}
case SFX_STYLE_FAMILY_PSEUDO:
@@ -3037,7 +3037,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
const SfxItemPropertyMap &rMap = pPropSet->getPropertyMap();
const OUString* pNames = aPropertyNames.getConstArray();
- if(pTargetFmt)
+ if(pTargetFormat)
{
for(sal_Int32 nProp = 0, nEnd = aPropertyNames.getLength(); nProp < nEnd; nProp++)
{
@@ -3060,24 +3060,24 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
if( pEntry->nWID == RES_PARATR_OUTLINELEVEL )
{
- static_cast<SwTxtFmtColl*>(pTargetFmt)->DeleteAssignmentToListLevelOfOutlineStyle();
+ static_cast<SwTextFormatColl*>(pTargetFormat)->DeleteAssignmentToListLevelOfOutlineStyle();
}
else
{
- pTargetFmt->ResetFmtAttr( pEntry->nWID );
+ pTargetFormat->ResetFormatAttr( pEntry->nWID );
}
if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
{
//UUUU
- SwDoc* pDoc = pTargetFmt->GetDoc();
+ SwDoc* pDoc = pTargetFormat->GetDoc();
SfxItemSet aSet(pDoc->GetAttrPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
- aSet.SetParent(&pTargetFmt->GetAttrSet());
+ aSet.SetParent(&pTargetFormat->GetAttrSet());
aSet.ClearItem(XATTR_FILLBMP_STRETCH);
aSet.ClearItem(XATTR_FILLBMP_TILE);
- pTargetFmt->SetFmtAttr(aSet);
+ pTargetFormat->SetFormatAttr(aSet);
}
}
}
@@ -3104,17 +3104,17 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
if(pBase)
{
rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *static_cast<SwDocStyleSheet*>(pBase) ) );
- SwFmt *pTargetFmt = 0;
+ SwFormat *pTargetFormat = 0;
size_t nPgDscPos = SIZE_MAX;
switch(eFamily)
{
case SFX_STYLE_FAMILY_CHAR:
- pTargetFmt = xStyle->GetCharFmt();
+ pTargetFormat = xStyle->GetCharFormat();
break;
case SFX_STYLE_FAMILY_PARA:
{
- pTargetFmt = xStyle->GetCollection();
+ pTargetFormat = xStyle->GetCollection();
if(xStyle->GetCollection())
{
xStyle->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
@@ -3123,7 +3123,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
}
case SFX_STYLE_FAMILY_FRAME:
- pTargetFmt = xStyle->GetFrmFmt();
+ pTargetFormat = xStyle->GetFrameFormat();
break;
case SFX_STYLE_FAMILY_PAGE:
@@ -3131,7 +3131,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
SwPageDesc *pDesc = m_pDoc->FindPageDesc(xStyle->GetPageDesc()->GetName(), &nPgDscPos);
if( pDesc )
{
- pTargetFmt = &pDesc->GetMaster();
+ pTargetFormat = &pDesc->GetMaster();
pDesc->SetUseOn(nsUseOnPage::PD_ALL);
}
break;
@@ -3143,7 +3143,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
default: ;
}
- if(pTargetFmt)
+ if(pTargetFormat)
{
if(SIZE_MAX != nPgDscPos)
{
@@ -3157,12 +3157,12 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
SvxULSpaceItem aUL(RES_UL_SPACE);
aUL.SetUpper(static_cast <sal_uInt16> (nSize));
aUL.SetLower(static_cast <sal_uInt16> (nSize));
- pTargetFmt->SetFmtAttr(aLR);
- pTargetFmt->SetFmtAttr(aUL);
+ pTargetFormat->SetFormatAttr(aLR);
+ pTargetFormat->SetFormatAttr(aUL);
SwPageDesc* pStdPgDsc = m_pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD);
- SwFmtFrmSize aFrmSz(ATT_FIX_SIZE);
+ SwFormatFrmSize aFrmSz(ATT_FIX_SIZE);
- if(RES_POOLPAGE_STANDARD == rPageDesc.GetPoolFmtId())
+ if(RES_POOLPAGE_STANDARD == rPageDesc.GetPoolFormatId())
{
if(m_pDoc->getIDocumentDeviceAccess().getPrinter(false))
{
@@ -3188,11 +3188,11 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
aFrmSz.SetWidth(nTmp);
}
- pTargetFmt->SetFmtAttr( aFrmSz );
+ pTargetFormat->SetFormatAttr( aFrmSz );
}
else
{
- pTargetFmt->ResetAllFmtAttr();
+ pTargetFormat->ResetAllFormatAttr();
}
if(SIZE_MAX != nPgDscPos)
@@ -3356,7 +3356,7 @@ static void lcl_putItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySe
SfxItemSet& rSetSet = pNewSetItem->GetItemSet();
// set parent to ItemSet to ensure XFILL_NONE as XFillStyleItem
- rSetSet.SetParent(&pDoc->GetDfltFrmFmt()->GetAttrSet());
+ rSetSet.SetParent(&pDoc->GetDfltFrameFormat()->GetAttrSet());
// replace the used SfxItemSet at the SwStyleBase_Impl temporarily and use the
// default method to set the property
@@ -3389,7 +3389,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
const uno::Any* pValues = rValues.getConstArray();
const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_PAGE_STYLE);
const SfxItemPropertyMap& rMap = pPropSet->getPropertyMap();
- SwStyleBase_Impl aBaseImpl(*GetDoc(), GetStyleName(), &GetDoc()->GetDfltFrmFmt()->GetAttrSet()); //UUUU add pDfltFrmFmt as parent
+ SwStyleBase_Impl aBaseImpl(*GetDoc(), GetStyleName(), &GetDoc()->GetDfltFrameFormat()->GetAttrSet()); //UUUU add pDfltFrameFormat as parent
if(GetBasePool())
{
const sal_uInt16 nSaveMask = GetBasePool()->GetSearchMask();
@@ -3483,7 +3483,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
0);
//UUUU set correct parent to get the XFILL_NONE FillStyle as needed
- aTempSet.SetParent(&GetDoc()->GetDfltFrmFmt()->GetAttrSet());
+ aTempSet.SetParent(&GetDoc()->GetDfltFrameFormat()->GetAttrSet());
aTempSet.Put(SfxBoolItem(SID_ATTR_PAGE_ON, true));
aTempSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(MM50, MM50)));
@@ -3559,7 +3559,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
SfxItemSet& rSetSet = pNewSetItem->GetItemSet();
// set parent to ItemSet to ensure XFILL_NONE as XFillStyleItem
- rSetSet.SetParent(&GetDoc()->GetDfltFrmFmt()->GetAttrSet());
+ rSetSet.SetParent(&GetDoc()->GetDfltFrameFormat()->GetAttrSet());
// replace the used SfxItemSet at the SwStyleBase_Impl temporarily and use the
// default method to set the property
@@ -3586,10 +3586,10 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
case FN_PARAM_FTN_INFO :
{
const SfxPoolItem& rItem = aBaseImpl.GetItemSet().Get(FN_PARAM_FTN_INFO);
- SfxPoolItem* pNewFtnItem = rItem.Clone();
- bool bPut = pNewFtnItem->PutValue(pValues[nProp], pEntry->nMemberId);
- aBaseImpl.GetItemSet().Put(*pNewFtnItem);
- delete pNewFtnItem;
+ SfxPoolItem* pNewFootnoteItem = rItem.Clone();
+ bool bPut = pNewFootnoteItem->PutValue(pValues[nProp], pEntry->nMemberId);
+ aBaseImpl.GetItemSet().Put(*pNewFootnoteItem);
+ delete pNewFootnoteItem;
if(!bPut)
throw lang::IllegalArgumentException();
break;
@@ -3662,22 +3662,22 @@ void SwXPageStyle::setPropertyValues(
static uno::Reference<text::XText>
lcl_makeHeaderFooter(
- const sal_uInt16 nRes, const bool bHeader, SwFrmFmt const*const pFrmFmt)
+ const sal_uInt16 nRes, const bool bHeader, SwFrameFormat const*const pFrameFormat)
{
- if (!pFrmFmt) { return 0; }
+ if (!pFrameFormat) { return 0; }
- const SfxItemSet& rSet = pFrmFmt->GetAttrSet();
+ const SfxItemSet& rSet = pFrameFormat->GetAttrSet();
const SfxPoolItem* pItem;
if (SfxItemState::SET == rSet.GetItemState(nRes, true, &pItem))
{
- SwFrmFmt *const pHeadFootFmt = (bHeader)
- ? static_cast<SwFmtHeader*>(const_cast<SfxPoolItem*>(pItem))->
- GetHeaderFmt()
- : static_cast<SwFmtFooter*>(const_cast<SfxPoolItem*>(pItem))->
- GetFooterFmt();
- if (pHeadFootFmt)
+ SwFrameFormat *const pHeadFootFormat = (bHeader)
+ ? static_cast<SwFormatHeader*>(const_cast<SfxPoolItem*>(pItem))->
+ GetHeaderFormat()
+ : static_cast<SwFormatFooter*>(const_cast<SfxPoolItem*>(pItem))->
+ GetFooterFormat();
+ if (pHeadFootFormat)
{
- return SwXHeadFootText::CreateXHeadFootText(*pHeadFootFmt, bHeader);
+ return SwXHeadFootText::CreateXHeadFootText(*pHeadFootFormat, bHeader);
}
}
return 0;
@@ -3697,7 +3697,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
uno::Any* pRet = aRet.getArray();
const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_PAGE_STYLE);
const SfxItemPropertyMap& rMap = pPropSet->getPropertyMap();
- SwStyleBase_Impl aBase(*GetDoc(), GetStyleName(), &GetDoc()->GetDfltFrmFmt()->GetAttrSet()); //UUUU add pDfltFrmFmt as parent
+ SwStyleBase_Impl aBase(*GetDoc(), GetStyleName(), &GetDoc()->GetDfltFrameFormat()->GetAttrSet()); //UUUU add pDfltFrameFormat as parent
SfxStyleSheetBase* pBase = 0;
for(sal_Int32 nProp = 0; nProp < nLength; nProp++)
@@ -3865,7 +3865,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
}
const SwPageDesc& rDesc = aBase.GetOldPageDesc();
- const SwFrmFmt* pFrmFmt = 0;
+ const SwFrameFormat* pFrameFormat = 0;
bool bShare = (bHeader && rDesc.IsHeaderShared()) || (!bHeader && rDesc.IsFooterShared());
bool bShareFirst = rDesc.IsFirstShared();
// TextLeft returns the left content if there is one,
@@ -3874,20 +3874,20 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
// comptability only.
if( bLeft && !bShare )
{
- pFrmFmt = &rDesc.GetLeft();
+ pFrameFormat = &rDesc.GetLeft();
}
else if (bFirst && !bShareFirst)
{
- pFrmFmt = &rDesc.GetFirstMaster();
+ pFrameFormat = &rDesc.GetFirstMaster();
// no need to make GetFirstLeft() accessible
// since it is always shared
}
else
{
- pFrmFmt = &rDesc.GetMaster();
+ pFrameFormat = &rDesc.GetMaster();
}
const uno::Reference< text::XText > xRet =
- lcl_makeHeaderFooter(nRes, bHeader, pFrmFmt);
+ lcl_makeHeaderFooter(nRes, bHeader, pFrameFormat);
if (xRet.is())
{
pRet[nProp] <<= xRet;
@@ -4152,19 +4152,19 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
{
case IStyleAccess::AUTO_STYLE_CHAR:
{
- pRange = aCharAutoFmtSetRange;
+ pRange = aCharAutoFormatSetRange;
pPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_CHAR_AUTO_STYLE);
break;
}
case IStyleAccess::AUTO_STYLE_RUBY:
{
- pRange = 0;//aTxtNodeSetRange;
+ pRange = 0;//aTextNodeSetRange;
pPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_RUBY_AUTO_STYLE);
break;
}
case IStyleAccess::AUTO_STYLE_PARA:
{
- pRange = aTxtNodeSetRange; //UUUU checked, already added support for [XATTR_FILL_FIRST, XATTR_FILL_LAST]
+ pRange = aTextNodeSetRange; //UUUU checked, already added support for [XATTR_FILL_FIRST, XATTR_FILL_LAST]
pPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARA_AUTO_STYLE);
break;
}
@@ -4202,7 +4202,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
//UUUU set parent to ItemSet to ensure XFILL_NONE as XFillStyleItem
// to make cases in RES_BACKGROUND work correct; target *is* a style
// where this is the case
- aSet.SetParent(&pDocShell->GetDoc()->GetDfltTxtFmtColl()->GetAttrSet());
+ aSet.SetParent(&pDocShell->GetDoc()->GetDfltTextFormatColl()->GetAttrSet());
//UUUU here the used DrawingLayer FillStyles are imported when family is
// equal to IStyleAccess::AUTO_STYLE_PARA, thus we will need to serve the
@@ -4400,8 +4400,8 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut
for ( sal_uInt32 nI = 0; nI < nCount; ++nI )
{
- const SwFmtRuby* pItem = static_cast<const SwFmtRuby*>(rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI ));
- if ( pItem && pItem->GetTxtRuby() )
+ const SwFormatRuby* pItem = static_cast<const SwFormatRuby*>(rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI ));
+ if ( pItem && pItem->GetTextRuby() )
{
std::pair< sal_uInt16, sal_uInt16 > aPair( pItem->GetPosition(), pItem->GetAdjustment() );
if ( aRubyMap.find( aPair ) == aRubyMap.end() )
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 522886f00e52..933743fd592f 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -117,15 +117,15 @@ namespace
const Tcoretype* const m_pCore;
mutable Tunotype* m_pResult;
};
- SwFrmFmt* lcl_EnsureCoreConnected(SwFrmFmt* pFmt, cppu::OWeakObject* pObject)
+ SwFrameFormat* lcl_EnsureCoreConnected(SwFrameFormat* pFormat, cppu::OWeakObject* pObject)
{
- if(!pFmt)
+ if(!pFormat)
throw uno::RuntimeException("Lost connection to core objects", pObject);
- return pFmt;
+ return pFormat;
}
SwTable* lcl_EnsureTableNotComplex(SwTable* pTable, cppu::OWeakObject* pObject)
{
- if(pTable->IsTblComplex())
+ if(pTable->IsTableComplex())
throw uno::RuntimeException("Table too complex", pObject);
return pTable;
}
@@ -173,7 +173,7 @@ static bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSv
return rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
}
-static void lcl_SetSpecialProperty(SwFrmFmt* pFmt,
+static void lcl_SetSpecialProperty(SwFrameFormat* pFormat,
const SfxItemPropertySimpleEntry* pEntry,
const uno::Any& aValue)
throw (lang::IllegalArgumentException,
@@ -186,18 +186,18 @@ static void lcl_SetSpecialProperty(SwFrmFmt* pFmt,
case FN_TABLE_HEADLINE_COUNT:
{
{
- SwTable* pTable = SwTable::FindTable( pFmt );
- UnoActionContext aAction(pFmt->GetDoc());
+ SwTable* pTable = SwTable::FindTable( pFormat );
+ UnoActionContext aAction(pFormat->GetDoc());
if( pEntry->nWID == FN_TABLE_HEADLINE_REPEAT)
{
- pFmt->GetDoc()->SetRowsToRepeat( *pTable, aValue.get<bool>() ? 1 : 0 );
+ pFormat->GetDoc()->SetRowsToRepeat( *pTable, aValue.get<bool>() ? 1 : 0 );
}
else
{
sal_Int32 nRepeat = 0;
aValue >>= nRepeat;
if( nRepeat >= 0 && nRepeat < USHRT_MAX )
- pFmt->GetDoc()->SetRowsToRepeat( *pTable, (sal_uInt16) nRepeat );
+ pFormat->GetDoc()->SetRowsToRepeat( *pTable, (sal_uInt16) nRepeat );
}
}
}
@@ -207,7 +207,7 @@ static void lcl_SetSpecialProperty(SwFrmFmt* pFmt,
case FN_TABLE_WIDTH:
case FN_TABLE_RELATIVE_WIDTH:
{
- SwFmtFrmSize aSz( pFmt->GetFrmSize() );
+ SwFormatFrmSize aSz( pFormat->GetFrmSize() );
if(FN_TABLE_WIDTH == pEntry->nWID)
{
sal_Int32 nWidth = 0;
@@ -233,7 +233,7 @@ static void lcl_SetSpecialProperty(SwFrmFmt* pFmt,
throw aExcept;
}
}
- pFmt->GetDoc()->SetAttr(aSz, *pFmt);
+ pFormat->GetDoc()->SetAttr(aSz, *pFormat);
}
break;
@@ -245,10 +245,10 @@ static void lcl_SetSpecialProperty(SwFrmFmt* pFmt,
if (!sPageStyle.isEmpty())
{
SwStyleNameMapper::FillUIName(sPageStyle, sPageStyle, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
- pDesc = SwPageDesc::GetByName(*pFmt->GetDoc(), sPageStyle);
+ pDesc = SwPageDesc::GetByName(*pFormat->GetDoc(), sPageStyle);
}
- SwFmtPageDesc aDesc( pDesc );
- pFmt->GetDoc()->SetAttr(aDesc, *pFmt);
+ SwFormatPageDesc aDesc( pDesc );
+ pFormat->GetDoc()->SetAttr(aDesc, *pFormat);
}
break;
@@ -257,14 +257,14 @@ static void lcl_SetSpecialProperty(SwFrmFmt* pFmt,
}
}
-static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry* pEntry )
+static uno::Any lcl_GetSpecialProperty(SwFrameFormat* pFormat, const SfxItemPropertySimpleEntry* pEntry )
{
switch(pEntry->nWID)
{
case FN_TABLE_HEADLINE_REPEAT:
case FN_TABLE_HEADLINE_COUNT:
{
- SwTable* pTable = SwTable::FindTable( pFmt );
+ SwTable* pTable = SwTable::FindTable( pFormat );
const sal_uInt16 nRepeat = pTable->GetRowsToRepeat();
if(pEntry->nWID == FN_TABLE_HEADLINE_REPEAT)
return uno::makeAny<bool>(nRepeat > 0);
@@ -276,7 +276,7 @@ static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimp
case FN_TABLE_RELATIVE_WIDTH:
{
uno::Any aRet;
- const SwFmtFrmSize& rSz = pFmt->GetFrmSize();
+ const SwFormatFrmSize& rSz = pFormat->GetFrmSize();
if(FN_TABLE_WIDTH == pEntry->nWID)
rSz.QueryValue(aRet, MID_FRMSIZE_WIDTH|CONVERT_TWIPS);
else if(FN_TABLE_RELATIVE_WIDTH == pEntry->nWID)
@@ -288,11 +288,11 @@ static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimp
case RES_PAGEDESC:
{
- const SfxItemSet& rSet = pFmt->GetAttrSet();
+ const SfxItemSet& rSet = pFormat->GetAttrSet();
const SfxPoolItem* pItem;
if(SfxItemState::SET == rSet.GetItemState(RES_PAGEDESC, false, &pItem))
{
- const SwPageDesc* pDsc = static_cast<const SwFmtPageDesc*>(pItem)->GetPageDesc();
+ const SwPageDesc* pDsc = static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc();
if(pDsc)
return uno::makeAny<OUString>(SwStyleNameMapper::GetProgName(pDsc->GetName(), nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ));
}
@@ -312,24 +312,24 @@ static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimp
return uno::makeAny(text::WrapTextMode_NONE);
case FN_PARAM_LINK_DISPLAY_NAME :
- return uno::makeAny(pFmt->GetName());
+ return uno::makeAny(pFormat->GetName());
case FN_UNO_REDLINE_NODE_START:
case FN_UNO_REDLINE_NODE_END:
{
- SwTable* pTable = SwTable::FindTable( pFmt );
- SwNode* pTblNode = pTable->GetTableNode();
+ SwTable* pTable = SwTable::FindTable( pFormat );
+ SwNode* pTableNode = pTable->GetTableNode();
if(FN_UNO_REDLINE_NODE_END == pEntry->nWID)
- pTblNode = pTblNode->EndOfSectionNode();
- for(const SwRangeRedline* pRedline : pFmt->GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl())
+ pTableNode = pTableNode->EndOfSectionNode();
+ for(const SwRangeRedline* pRedline : pFormat->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable())
{
const SwNode& rRedPointNode = pRedline->GetNode(true);
const SwNode& rRedMarkNode = pRedline->GetNode(false);
- if(&rRedPointNode == pTblNode || &rRedMarkNode == pTblNode)
+ if(&rRedPointNode == pTableNode || &rRedMarkNode == pTableNode)
{
const SwNode& rStartOfRedline = SwNodeIndex(rRedPointNode) <= SwNodeIndex(rRedMarkNode) ?
rRedPointNode : rRedMarkNode;
- bool bIsStart = &rStartOfRedline == pTblNode;
+ bool bIsStart = &rStartOfRedline == pTableNode;
return uno::makeAny(SwXRedlinePortion::CreateRedlineProperties(*pRedline, bIsStart));
}
}
@@ -345,7 +345,7 @@ static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimp
*
* Also since the implementations of tables does not really have columns using
* this function is appropriate only for tables that are not complex (i.e.
- * where IsTblComplex() returns false).
+ * where IsTableComplex() returns false).
*
* @param rCellName e.g. A1..Z1, a1..z1, AA1..AZ1, Aa1..Az1, BA1..BZ1, Ba1..Bz1, ...
* @param [IN,OUT] rColumn (0-based)
@@ -500,7 +500,7 @@ OUString sw_GetCellName( sal_Int32 nColumn, sal_Int32 nRow )
if (nColumn < 0 || nRow < 0)
return OUString();
OUString sCellName;
- sw_GetTblBoxColStr( static_cast< sal_uInt16 >(nColumn), sCellName );
+ sw_GetTableBoxColStr( static_cast< sal_uInt16 >(nColumn), sCellName );
return sCellName + OUString::number( nRow + 1 );
}
@@ -560,14 +560,14 @@ void SwRangeDescriptor::Normalize()
std::swap(nLeft, nRight);
}
-static SwXCell* lcl_CreateXCell(SwFrmFmt* pFmt, sal_Int32 nColumn, sal_Int32 nRow)
+static SwXCell* lcl_CreateXCell(SwFrameFormat* pFormat, sal_Int32 nColumn, sal_Int32 nRow)
{
const OUString sCellName = sw_GetCellName(nColumn, nRow);
- SwTable* pTable = SwTable::FindTable(pFmt);
- SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTblBox(sCellName));
+ SwTable* pTable = SwTable::FindTable(pFormat);
+ SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTableBox(sCellName));
if(!pBox)
return nullptr;
- return SwXCell::CreateXCell(pFmt, pBox, pTable);
+ return SwXCell::CreateXCell(pFormat, pBox, pTable);
}
static void lcl_InspectLines(SwTableLines& rLines, std::vector<OUString>& rAllNames)
@@ -585,10 +585,10 @@ static void lcl_InspectLines(SwTableLines& rLines, std::vector<OUString>& rAllNa
}
}
-static bool lcl_FormatTable(SwFrmFmt* pTblFmt)
+static bool lcl_FormatTable(SwFrameFormat* pTableFormat)
{
bool bHasFrames = false;
- SwIterator<SwFrm,SwFmt> aIter( *pTblFmt );
+ SwIterator<SwFrm,SwFormat> aIter( *pTableFormat );
for(SwFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next())
{
// mba: no TYPEINFO for SwTabFrm
@@ -615,7 +615,7 @@ static void lcl_CrsrSelect(SwPaM& rCrsr, bool bExpand)
rCrsr.DeleteMark();
}
-static void lcl_GetTblSeparators(uno::Any& rRet, SwTable* pTable, SwTableBox* pBox, bool bRow)
+static void lcl_GetTableSeparators(uno::Any& rRet, SwTable* pTable, SwTableBox* pBox, bool bRow)
{
SwTabCols aCols;
aCols.SetLeftMin ( 0 );
@@ -644,7 +644,7 @@ static void lcl_GetTblSeparators(uno::Any& rRet, SwTable* pTable, SwTableBox* pB
}
-static void lcl_SetTblSeparators(const uno::Any& rVal, SwTable* pTable, SwTableBox* pBox, bool bRow, SwDoc* pDoc)
+static void lcl_SetTableSeparators(const uno::Any& rVal, SwTable* pTable, SwTableBox* pBox, bool bRow, SwDoc* pDoc)
{
SwTabCols aOldCols;
@@ -666,7 +666,7 @@ static void lcl_SetTblSeparators(const uno::Any& rVal, SwTable* pTable, SwTableB
SwTabCols aCols(aOldCols);
const text::TableColumnSeparator* pArray = pSepSeq->getConstArray();
long nLastValue = 0;
- //sal_Int32 nTblWidth = aCols.GetRight() - aCols.GetLeft();
+ //sal_Int32 nTableWidth = aCols.GetRight() - aCols.GetLeft();
for(size_t i = 0; i < nOldCount; ++i)
{
aCols[i] = pArray[i].Position;
@@ -687,20 +687,20 @@ static inline OUString lcl_getString( SwXCell &rCell )
}
/* non UNO function call to set string in SwXCell */
-void sw_setString( SwXCell &rCell, const OUString &rTxt,
- bool bKeepNumberFmt = false )
+void sw_setString( SwXCell &rCell, const OUString &rText,
+ bool bKeepNumberFormat = false )
{
if(rCell.IsValid())
{
- SwFrmFmt* pBoxFmt = rCell.pBox->ClaimFrmFmt();
- pBoxFmt->LockModify();
- pBoxFmt->ResetFmtAttr( RES_BOXATR_FORMULA );
- pBoxFmt->ResetFmtAttr( RES_BOXATR_VALUE );
- if (!bKeepNumberFmt)
- pBoxFmt->SetFmtAttr( SwTblBoxNumFormat(css::util::NumberFormat::TEXT) );
- pBoxFmt->UnlockModify();
+ SwFrameFormat* pBoxFormat = rCell.pBox->ClaimFrameFormat();
+ pBoxFormat->LockModify();
+ pBoxFormat->ResetFormatAttr( RES_BOXATR_FORMULA );
+ pBoxFormat->ResetFormatAttr( RES_BOXATR_VALUE );
+ if (!bKeepNumberFormat)
+ pBoxFormat->SetFormatAttr( SwTableBoxNumFormat(css::util::NumberFormat::TEXT) );
+ pBoxFormat->UnlockModify();
}
- rCell.SwXText::setString(rTxt);
+ rCell.SwXText::setString(rText);
}
/* non UNO function call to get value from SwXCell */
@@ -708,7 +708,7 @@ double sw_getValue( SwXCell &rCell )
{
double fRet;
if(rCell.IsValid() && !rCell.getString().isEmpty())
- fRet = rCell.pBox->GetFrmFmt()->GetTblBoxValue().GetValue();
+ fRet = rCell.pBox->GetFrameFormat()->GetTableBoxValue().GetValue();
else
::rtl::math::setNan( &fRet );
return fRet;
@@ -720,12 +720,12 @@ void sw_setValue( SwXCell &rCell, double nVal )
if(!rCell.IsValid())
return;
// first this text (maybe) needs to be deleted
- sal_uLong nNdPos = rCell.pBox->IsValidNumTxtNd( true );
+ sal_uLong nNdPos = rCell.pBox->IsValidNumTextNd( true );
if(ULONG_MAX != nNdPos)
sw_setString( rCell, OUString(), true ); // true == keep number format
SwDoc* pDoc = rCell.GetDoc();
UnoActionContext aAction(pDoc);
- SwFrmFmt* pBoxFmt = rCell.pBox->ClaimFrmFmt();
+ SwFrameFormat* pBoxFormat = rCell.pBox->ClaimFrameFormat();
SfxItemSet aSet(pDoc->GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE);
const SfxPoolItem* pItem;
@@ -733,26 +733,26 @@ void sw_setValue( SwXCell &rCell, double nVal )
// - there is no current number format
// - the current number format is not a number format according to the number formatter, but rather a text format
// - the current number format is not even a valid number formatter number format, but rather Writer's own 'special' text number format
- if(SfxItemState::SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
- || pDoc->GetNumberFormatter()->IsTextFormat(static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue())
- || static_cast<sal_Int16>(static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue()) == css::util::NumberFormat::TEXT)
+ if(SfxItemState::SET != pBoxFormat->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
+ || pDoc->GetNumberFormatter()->IsTextFormat(static_cast<const SwTableBoxNumFormat*>(pItem)->GetValue())
+ || static_cast<sal_Int16>(static_cast<const SwTableBoxNumFormat*>(pItem)->GetValue()) == css::util::NumberFormat::TEXT)
{
- aSet.Put(SwTblBoxNumFormat(0));
+ aSet.Put(SwTableBoxNumFormat(0));
}
- SwTblBoxValue aVal(nVal);
+ SwTableBoxValue aVal(nVal);
aSet.Put(aVal);
- pDoc->SetTblBoxFormulaAttrs( *rCell.pBox, aSet );
+ pDoc->SetTableBoxFormulaAttrs( *rCell.pBox, aSet );
// update table
- SwTableFmlUpdate aTblUpdate( SwTable::FindTable( rCell.GetFrmFmt() ));
- pDoc->getIDocumentFieldsAccess().UpdateTblFlds( &aTblUpdate );
+ SwTableFormulaUpdate aTableUpdate( SwTable::FindTable( rCell.GetFrameFormat() ));
+ pDoc->getIDocumentFieldsAccess().UpdateTableFields( &aTableUpdate );
}
TYPEINIT1(SwXCell, SwClient);
-SwXCell::SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBx, size_t const nPos) :
- SwXText(pTblFmt->GetDoc(), CURSOR_TBLTEXT),
- SwClient(pTblFmt),
+SwXCell::SwXCell(SwFrameFormat* pTableFormat, SwTableBox* pBx, size_t const nPos) :
+ SwXText(pTableFormat->GetDoc(), CURSOR_TBLTEXT),
+ SwClient(pTableFormat),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TABLE_CELL)),
pBox(pBx),
pStartNode(nullptr),
@@ -760,9 +760,9 @@ SwXCell::SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBx, size_t const nPos) :
{
}
-SwXCell::SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode) :
- SwXText(pTblFmt->GetDoc(), CURSOR_TBLTEXT),
- SwClient(pTblFmt),
+SwXCell::SwXCell(SwFrameFormat* pTableFormat, const SwStartNode& rStartNode) :
+ SwXText(pTableFormat->GetDoc(), CURSOR_TBLTEXT),
+ SwClient(pTableFormat),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TABLE_CELL)),
pBox(nullptr),
pStartNode(&rStartNode),
@@ -855,14 +855,14 @@ bool SwXCell::IsValid() const
{
// FIXME: this is now a const method, to make SwXText::IsValid invisible
// but the const_cast here are still ridiculous. TODO: find a better way.
- SwFrmFmt* pTblFmt = pBox ? GetFrmFmt() : nullptr;
- if(!pTblFmt)
+ SwFrameFormat* pTableFormat = pBox ? GetFrameFormat() : nullptr;
+ if(!pTableFormat)
{
const_cast<SwXCell*>(this)->pBox = nullptr;
}
else
{
- SwTable* pTable = SwTable::FindTable( pTblFmt );
+ SwTable* pTable = SwTable::FindTable( pTableFormat );
SwTableBox const*const pFoundBox =
const_cast<SwXCell*>(this)->FindBox(pTable, pBox);
if (!pFoundBox)
@@ -878,8 +878,8 @@ OUString SwXCell::getFormula() throw( uno::RuntimeException, std::exception )
SolarMutexGuard aGuard;
if(!IsValid())
return OUString();
- SwTblBoxFormula aFormula( pBox->GetFrmFmt()->GetTblBoxFormula() );
- SwTable* pTable = SwTable::FindTable( GetFrmFmt() );
+ SwTableBoxFormula aFormula( pBox->GetFrameFormat()->GetTableBoxFormula() );
+ SwTable* pTable = SwTable::FindTable( GetFrameFormat() );
aFormula.PtrToBoxNm( pTable );
return aFormula.GetFormula();
}
@@ -891,28 +891,28 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException,
if(!IsValid())
return;
// first this text (maybe) needs to be deleted
- sal_uInt32 nNdPos = pBox->IsValidNumTxtNd( true );
+ sal_uInt32 nNdPos = pBox->IsValidNumTextNd( true );
if(USHRT_MAX == nNdPos)
sw_setString( *this, OUString(), true );
- OUString sFml(comphelper::string::stripStart(rFormula, ' '));
- if( !sFml.isEmpty() && '=' == sFml[0] )
- sFml = sFml.copy( 1 );
- SwTblBoxFormula aFml( sFml );
+ OUString sFormula(comphelper::string::stripStart(rFormula, ' '));
+ if( !sFormula.isEmpty() && '=' == sFormula[0] )
+ sFormula = sFormula.copy( 1 );
+ SwTableBoxFormula aFormula( sFormula );
SwDoc* pMyDoc = GetDoc();
UnoActionContext aAction(pMyDoc);
SfxItemSet aSet(pMyDoc->GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMULA);
const SfxPoolItem* pItem;
- SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- if(SfxItemState::SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
- || pMyDoc->GetNumberFormatter()->IsTextFormat(static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue()))
+ SwFrameFormat* pBoxFormat = pBox->GetFrameFormat();
+ if(SfxItemState::SET != pBoxFormat->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
+ || pMyDoc->GetNumberFormatter()->IsTextFormat(static_cast<const SwTableBoxNumFormat*>(pItem)->GetValue()))
{
- aSet.Put(SwTblBoxNumFormat(0));
+ aSet.Put(SwTableBoxNumFormat(0));
}
- aSet.Put(aFml);
- GetDoc()->SetTblBoxFormulaAttrs( *pBox, aSet );
+ aSet.Put(aFormula);
+ GetDoc()->SetTableBoxFormulaAttrs( *pBox, aSet );
// update table
- SwTableFmlUpdate aTblUpdate( SwTable::FindTable( GetFrmFmt() ));
- pMyDoc->getIDocumentFieldsAccess().UpdateTblFlds( &aTblUpdate );
+ SwTableFormulaUpdate aTableUpdate( SwTable::FindTable( GetFrameFormat() ));
+ pMyDoc->getIDocumentFieldsAccess().UpdateTableFields( &aTableUpdate );
}
double SwXCell::getValue() throw( uno::RuntimeException, std::exception )
@@ -1016,7 +1016,7 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
SAL_WARN("sw.uno", "unknown direction code, maybe it's a bitfield");
}
SvxFrameDirectionItem aItem(eDir, RES_FRAMEDIR);
- pBox->GetFrmFmt()->SetFmtAttr(aItem);
+ pBox->GetFrameFormat()->SetFormatAttr(aItem);
}
else if(rPropertyName == "TableRedlineParams")
{
@@ -1037,10 +1037,10 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
throw beans::UnknownPropertyException(rPropertyName, static_cast<cppu::OWeakObject*>(this));
if(pEntry->nWID != FN_UNO_CELL_ROW_SPAN)
{
- SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt();
- SwAttrSet aSet(pBoxFmt->GetAttrSet());
+ SwFrameFormat* pBoxFormat = pBox->ClaimFrameFormat();
+ SwAttrSet aSet(pBoxFormat->GetAttrSet());
m_pPropSet->setPropertyValue(rPropertyName, aValue, aSet);
- pBoxFmt->GetDoc()->SetAttr(aSet, *pBoxFmt);
+ pBoxFormat->GetDoc()->SetAttr(aSet, *pBoxFormat);
}
else if(aValue.isExtractableTo(cppu::UnoType<sal_Int32>::get()))
pBox->setRowSpan(aValue.get<sal_Int32>());
@@ -1063,14 +1063,14 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
break;
case FN_UNO_TEXT_SECTION:
{
- SwFrmFmt* pTblFmt = GetFrmFmt();
- SwTable* pTable = SwTable::FindTable(pTblFmt);
- SwTableNode* pTblNode = pTable->GetTableNode();
- SwSectionNode* pSectionNode = pTblNode->FindSectionNode();
+ SwFrameFormat* pTableFormat = GetFrameFormat();
+ SwTable* pTable = SwTable::FindTable(pTableFormat);
+ SwTableNode* pTableNode = pTable->GetTableNode();
+ SwSectionNode* pSectionNode = pTableNode->FindSectionNode();
if(!pSectionNode)
return uno::Any();
SwSection& rSect = pSectionNode->GetSection();
- return uno::makeAny(SwXTextSections::GetObject(*rSect.GetFmt()));
+ return uno::makeAny(SwXTextSections::GetObject(*rSect.GetFormat()));
}
break;
case FN_UNO_CELL_NAME:
@@ -1085,7 +1085,7 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
break;
default:
{
- const SwAttrSet& rSet = pBox->GetFrmFmt()->GetAttrSet();
+ const SwAttrSet& rSet = pBox->GetFrameFormat()->GetAttrSet();
uno::Any aResult;
m_pPropSet->getPropertyValue(rPropertyName, rSet, aResult);
return aResult;
@@ -1140,26 +1140,26 @@ void SwXCell::SwClientNotify(const SwModify& rModify, const SfxHint& rHint)
if(typeid(FindUnoInstanceHint<SwTableBox, SwXCell>) == typeid(rHint))
{
auto* pFindHint(static_cast<const FindUnoInstanceHint<SwTableBox, SwXCell>* >(&rHint));
- if(!pFindHint->m_pCore && pFindHint->m_pCore == GetTblBox())
+ if(!pFindHint->m_pCore && pFindHint->m_pCore == GetTableBox())
pFindHint->m_pResult = this;
}
else
SwClient::SwClientNotify(rModify, rHint);
}
-SwXCell* SwXCell::CreateXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, SwTable *pTable )
+SwXCell* SwXCell::CreateXCell(SwFrameFormat* pTableFormat, SwTableBox* pBox, SwTable *pTable )
{
- if(!pTblFmt || !pBox)
+ if(!pTableFormat || !pBox)
return nullptr;
if(!pTable)
- pTable = SwTable::FindTable(pTblFmt);
+ pTable = SwTable::FindTable(pTableFormat);
SwTableSortBoxes::const_iterator it = pTable->GetTabSortBoxes().find(pBox);
if(it == pTable->GetTabSortBoxes().end())
return nullptr;
size_t const nPos = it - pTable->GetTabSortBoxes().begin();
FindUnoInstanceHint<SwTableBox, SwXCell> aHint{pBox};
- pTblFmt->CallSwClientNotify(aHint);
- return aHint.m_pResult ? aHint.m_pResult : new SwXCell(pTblFmt, pBox, nPos);
+ pTableFormat->CallSwClientNotify(aHint);
+ return aHint.m_pResult ? aHint.m_pResult : new SwXCell(pTableFormat, pBox, nPos);
}
/** search if a box exists in a table
@@ -1208,8 +1208,8 @@ uno::Sequence< OUString > SwXTextTableRow::getSupportedServiceNames() throw( uno
TYPEINIT1(SwXTextTableRow, SwClient);
-SwXTextTableRow::SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLn) :
- SwClient(pFmt),
+SwXTextTableRow::SwXTextTableRow(SwFrameFormat* pFormat, SwTableLine* pLn) :
+ SwClient(pFormat),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE_ROW)),
pLine(pLn)
{ }
@@ -1232,8 +1232,8 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
- SwTable* pTable = SwTable::FindTable( pFmt );
+ SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
+ SwTable* pTable = SwTable::FindTable( pFormat );
SwTableLine* pLn = SwXTextTableRow::FindLine(pTable, pLine);
if(pLn)
{
@@ -1261,7 +1261,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
{
const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
- SwDoc* pDoc = pFmt->GetDoc();
+ SwDoc* pDoc = pFormat->GetDoc();
if (!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
@@ -1272,7 +1272,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
case FN_UNO_ROW_HEIGHT:
case FN_UNO_ROW_AUTO_HEIGHT:
{
- SwFmtFrmSize aFrmSize(pLn->GetFrmFmt()->GetFrmSize());
+ SwFormatFrmSize aFrmSize(pLn->GetFrameFormat()->GetFrmSize());
if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID)
{
bool bSet = *static_cast<sal_Bool const *>(aValue.getValue());
@@ -1286,24 +1286,24 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
aSz.Height() = convertMm100ToTwip(nHeight);
aFrmSize.SetSize(aSz);
}
- pDoc->SetAttr(aFrmSize, *pLn->ClaimFrmFmt());
+ pDoc->SetAttr(aFrmSize, *pLn->ClaimFrameFormat());
}
break;
case FN_UNO_TABLE_COLUMN_SEPARATORS:
{
UnoActionContext aContext(pDoc);
- SwTable* pTable2 = SwTable::FindTable( pFmt );
- lcl_SetTblSeparators(aValue, pTable2, pLine->GetTabBoxes()[0], true, pDoc);
+ SwTable* pTable2 = SwTable::FindTable( pFormat );
+ lcl_SetTableSeparators(aValue, pTable2, pLine->GetTabBoxes()[0], true, pDoc);
}
break;
default:
{
- SwFrmFmt* pLnFmt = pLn->ClaimFrmFmt();
- SwAttrSet aSet(pLnFmt->GetAttrSet());
+ SwFrameFormat* pLnFormat = pLn->ClaimFrameFormat();
+ SwAttrSet aSet(pLnFormat->GetAttrSet());
m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
- pDoc->SetAttr(aSet, *pLnFmt);
+ pDoc->SetAttr(aSet, *pLnFormat);
}
}
}
@@ -1314,8 +1314,8 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
{
SolarMutexGuard aGuard;
uno::Any aRet;
- SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
- SwTable* pTable = SwTable::FindTable( pFmt );
+ SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
+ SwTable* pTable = SwTable::FindTable( pFormat );
SwTableLine* pLn = SwXTextTableRow::FindLine(pTable, pLine);
if(pLn)
{
@@ -1329,7 +1329,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
case FN_UNO_ROW_HEIGHT:
case FN_UNO_ROW_AUTO_HEIGHT:
{
- const SwFmtFrmSize& rSize = pLn->GetFrmFmt()->GetFrmSize();
+ const SwFormatFrmSize& rSize = pLn->GetFrameFormat()->GetFrmSize();
if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID)
{
aRet <<= ATT_VAR_SIZE == rSize.GetHeightSizeType();
@@ -1341,13 +1341,13 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
case FN_UNO_TABLE_COLUMN_SEPARATORS:
{
- lcl_GetTblSeparators(aRet, pTable, pLine->GetTabBoxes()[0], true);
+ lcl_GetTableSeparators(aRet, pTable, pLine->GetTabBoxes()[0], true);
}
break;
default:
{
- const SwAttrSet& rSet = pLn->GetFrmFmt()->GetAttrSet();
+ const SwAttrSet& rSet = pLn->GetFrameFormat()->GetAttrSet();
m_pPropSet->getPropertyValue(*pEntry, rSet, aRet);
}
}
@@ -1375,7 +1375,7 @@ void SwXTextTableRow::SwClientNotify(const SwModify& rModify, const SfxHint& rHi
if(typeid(FindUnoInstanceHint<SwTableLine, SwXTextTableRow>) == typeid(rHint))
{
auto* pFindHint(static_cast<const FindUnoInstanceHint<SwTableLine,SwXTextTableRow>* >(&rHint));
- if(!pFindHint->m_pCore && pFindHint->m_pCore == GetTblRow())
+ if(!pFindHint->m_pCore && pFindHint->m_pCore == GetTableRow())
pFindHint->m_pResult = this;
}
else
@@ -1401,31 +1401,31 @@ sal_Bool SwXTextTableCursor::supportsService(const OUString& rServiceName) throw
IMPLEMENT_FORWARD_XINTERFACE2(SwXTextTableCursor,SwXTextTableCursor_Base,OTextCursorHelper)
const SwPaM* SwXTextTableCursor::GetPaM() const { return GetCrsr(); }
SwPaM* SwXTextTableCursor::GetPaM() { return GetCrsr(); }
-const SwDoc* SwXTextTableCursor::GetDoc() const { return GetFrmFmt()->GetDoc(); }
-SwDoc* SwXTextTableCursor::GetDoc() { return GetFrmFmt()->GetDoc(); }
+const SwDoc* SwXTextTableCursor::GetDoc() const { return GetFrameFormat()->GetDoc(); }
+SwDoc* SwXTextTableCursor::GetDoc() { return GetFrameFormat()->GetDoc(); }
const SwUnoCrsr* SwXTextTableCursor::GetCrsr() const { return static_cast<const SwUnoCrsr*>(aCrsrDepend.GetRegisteredIn()); }
SwUnoCrsr* SwXTextTableCursor::GetCrsr() { return static_cast<SwUnoCrsr*>(aCrsrDepend.GetRegisteredIn()); }
uno::Sequence<OUString> SwXTextTableCursor::getSupportedServiceNames() throw( uno::RuntimeException, std::exception )
{ return {"com.sun.star.text.TextTableCursor"}; }
-SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt* pFmt, SwTableBox* pBox) :
- SwClient(pFmt),
+SwXTextTableCursor::SwXTextTableCursor(SwFrameFormat* pFormat, SwTableBox* pBox) :
+ SwClient(pFormat),
aCrsrDepend(this, 0),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE_CURSOR))
{
- SwDoc* pDoc = pFmt->GetDoc();
+ SwDoc* pDoc = pFormat->GetDoc();
const SwStartNode* pSttNd = pBox->GetSttNd();
SwPosition aPos(*pSttNd);
SwUnoCrsr* pUnoCrsr = pDoc->CreateUnoCrsr(aPos, true);
pUnoCrsr->Move( fnMoveForward, fnGoNode );
pUnoCrsr->Add(&aCrsrDepend);
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- rTblCrsr.MakeBoxSels();
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ rTableCrsr.MakeBoxSels();
}
-SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt& rTableFmt, const SwTableCursor* pTableSelection) :
- SwClient(&rTableFmt),
+SwXTextTableCursor::SwXTextTableCursor(SwFrameFormat& rTableFormat, const SwTableCursor* pTableSelection) :
+ SwClient(&rTableFormat),
aCrsrDepend(this, 0),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE_CURSOR))
{
@@ -1456,22 +1456,22 @@ OUString SwXTextTableCursor::getRangeName()
{
SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCrsr();
- SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
+ SwUnoTableCrsr* pTableCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
//!! see also SwChartDataSequence::getSourceRangeRepresentation
- if(!pTblCrsr)
+ if(!pTableCrsr)
return OUString();
- pTblCrsr->MakeBoxSels();
- const SwStartNode* pNode = pTblCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
- const SwTable* pTable = SwTable::FindTable(GetFrmFmt());
- const SwTableBox* pEndBox = pTable->GetTblBox(pNode->GetIndex());
- if(pTblCrsr->HasMark())
+ pTableCrsr->MakeBoxSels();
+ const SwStartNode* pNode = pTableCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
+ const SwTable* pTable = SwTable::FindTable(GetFrameFormat());
+ const SwTableBox* pEndBox = pTable->GetTableBox(pNode->GetIndex());
+ if(pTableCrsr->HasMark())
{
- pNode = pTblCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode();
- const SwTableBox* pStartBox = pTable->GetTblBox(pNode->GetIndex());
+ pNode = pTableCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode();
+ const SwTableBox* pStartBox = pTable->GetTableBox(pNode->GetIndex());
if(pEndBox != pStartBox)
{
// need to switch start and end?
- if(*pTblCrsr->GetPoint() < *pTblCrsr->GetMark())
+ if(*pTableCrsr->GetPoint() < *pTableCrsr->GetMark())
std::swap(pStartBox, pEndBox);
return pStartBox->GetName() + ":" + pEndBox->GetName();
}
@@ -1486,9 +1486,9 @@ sal_Bool SwXTextTableCursor::gotoCellByName(const OUString& sCellName, sal_Bool
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(!pUnoCrsr)
return false;
- auto& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- lcl_CrsrSelect(rTblCrsr, bExpand);
- return rTblCrsr.GotoTblBox(sCellName);
+ auto& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ lcl_CrsrSelect(rTableCrsr, bExpand);
+ return rTableCrsr.GotoTableBox(sCellName);
}
sal_Bool SwXTextTableCursor::goLeft(sal_Int16 Count, sal_Bool bExpand) throw( uno::RuntimeException, std::exception )
@@ -1497,9 +1497,9 @@ sal_Bool SwXTextTableCursor::goLeft(sal_Int16 Count, sal_Bool bExpand) throw( un
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(!pUnoCrsr)
return false;
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- lcl_CrsrSelect(rTblCrsr, bExpand);
- return rTblCrsr.Left(Count, CRSR_SKIP_CHARS, false, false);
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ lcl_CrsrSelect(rTableCrsr, bExpand);
+ return rTableCrsr.Left(Count, CRSR_SKIP_CHARS, false, false);
}
sal_Bool SwXTextTableCursor::goRight(sal_Int16 Count, sal_Bool bExpand) throw( uno::RuntimeException, std::exception )
@@ -1508,9 +1508,9 @@ sal_Bool SwXTextTableCursor::goRight(sal_Int16 Count, sal_Bool bExpand) throw( u
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(!pUnoCrsr)
return false;
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- lcl_CrsrSelect(rTblCrsr, bExpand);
- return rTblCrsr.Right(Count, CRSR_SKIP_CHARS, false, false);
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ lcl_CrsrSelect(rTableCrsr, bExpand);
+ return rTableCrsr.Right(Count, CRSR_SKIP_CHARS, false, false);
}
sal_Bool SwXTextTableCursor::goUp(sal_Int16 Count, sal_Bool bExpand) throw( uno::RuntimeException, std::exception )
@@ -1519,9 +1519,9 @@ sal_Bool SwXTextTableCursor::goUp(sal_Int16 Count, sal_Bool bExpand) throw( uno:
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(!pUnoCrsr)
return false;
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- lcl_CrsrSelect(rTblCrsr, bExpand);
- return rTblCrsr.UpDown(true, Count, 0, 0);
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ lcl_CrsrSelect(rTableCrsr, bExpand);
+ return rTableCrsr.UpDown(true, Count, 0, 0);
}
sal_Bool SwXTextTableCursor::goDown(sal_Int16 Count, sal_Bool bExpand) throw( uno::RuntimeException, std::exception )
@@ -1530,9 +1530,9 @@ sal_Bool SwXTextTableCursor::goDown(sal_Int16 Count, sal_Bool bExpand) throw( un
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(!pUnoCrsr)
return false;
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- lcl_CrsrSelect(rTblCrsr, bExpand);
- return rTblCrsr.UpDown(false, Count, 0, 0);
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ lcl_CrsrSelect(rTableCrsr, bExpand);
+ return rTableCrsr.UpDown(false, Count, 0, 0);
}
void SwXTextTableCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException, std::exception )
@@ -1541,9 +1541,9 @@ void SwXTextTableCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeExceptio
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(!pUnoCrsr)
return;
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- lcl_CrsrSelect(rTblCrsr, bExpand);
- rTblCrsr.MoveTable(fnTableCurr, fnTableStart);
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ lcl_CrsrSelect(rTableCrsr, bExpand);
+ rTableCrsr.MoveTable(fnTableCurr, fnTableStart);
}
void SwXTextTableCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException, std::exception )
@@ -1552,9 +1552,9 @@ void SwXTextTableCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException,
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(!pUnoCrsr)
return;
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- lcl_CrsrSelect(rTblCrsr, bExpand);
- rTblCrsr.MoveTable(fnTableCurr, fnTableEnd);
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ lcl_CrsrSelect(rTableCrsr, bExpand);
+ rTableCrsr.MoveTable(fnTableCurr, fnTableEnd);
}
sal_Bool SwXTextTableCursor::mergeRange()
@@ -1568,20 +1568,20 @@ sal_Bool SwXTextTableCursor::mergeRange()
// The Actions need to be revoked here
UnoActionRemoveContext aRemoveContext(pUnoCrsr->GetDoc());
}
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- rTblCrsr.MakeBoxSels();
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ rTableCrsr.MakeBoxSels();
bool bResult;
{
UnoActionContext aContext(pUnoCrsr->GetDoc());
- bResult = TBLMERGE_OK == rTblCrsr.GetDoc()->MergeTbl(rTblCrsr);
+ bResult = TBLMERGE_OK == rTableCrsr.GetDoc()->MergeTable(rTableCrsr);
}
if(bResult)
{
- size_t nCount = rTblCrsr.GetSelectedBoxesCount();
+ size_t nCount = rTableCrsr.GetSelectedBoxesCount();
while (nCount--)
- rTblCrsr.DeleteBox(nCount);
+ rTableCrsr.DeleteBox(nCount);
}
- rTblCrsr.MakeBoxSels();
+ rTableCrsr.MakeBoxSels();
return bResult;
}
@@ -1598,14 +1598,14 @@ sal_Bool SwXTextTableCursor::splitRange(sal_Int16 Count, sal_Bool Horizontal)
// here, all actions need to be revoked
UnoActionRemoveContext aRemoveContext(pUnoCrsr->GetDoc());
}
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- rTblCrsr.MakeBoxSels();
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ rTableCrsr.MakeBoxSels();
bool bResult;
{
UnoActionContext aContext(pUnoCrsr->GetDoc());
- bResult = rTblCrsr.GetDoc()->SplitTbl(rTblCrsr.GetSelectedBoxes(), !Horizontal, Count);
+ bResult = rTableCrsr.GetDoc()->SplitTable(rTableCrsr.GetSelectedBoxes(), !Horizontal, Count);
}
- rTblCrsr.MakeBoxSels();
+ rTableCrsr.MakeBoxSels();
return bResult;
}
@@ -1634,11 +1634,11 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u
throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast<cppu::OWeakObject*>(this));
{
auto pSttNode = pUnoCrsr->GetNode().StartOfSectionNode();
- const SwTableNode* pTblNode = pSttNode->FindTableNode();
- lcl_FormatTable(pTblNode->GetTable().GetFrmFmt());
+ const SwTableNode* pTableNode = pSttNode->FindTableNode();
+ lcl_FormatTable(pTableNode->GetTable().GetFrameFormat());
}
- auto& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
- rTblCrsr.MakeBoxSels();
+ auto& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ rTableCrsr.MakeBoxSels();
SwDoc* pDoc = pUnoCrsr->GetDoc();
switch(pEntry->nWID)
{
@@ -1659,20 +1659,20 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u
}
break;
case FN_UNO_PARA_STYLE:
- SwUnoCursorHelper::SetTxtFmtColl(aValue, *pUnoCrsr);
+ SwUnoCursorHelper::SetTextFormatColl(aValue, *pUnoCrsr);
break;
default:
{
SfxItemSet aItemSet(pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID);
- SwUnoCursorHelper::GetCrsrAttr(rTblCrsr.GetSelRing(),
+ SwUnoCursorHelper::GetCrsrAttr(rTableCrsr.GetSelRing(),
aItemSet);
if (!SwUnoCursorHelper::SetCursorPropertyValue(
- *pEntry, aValue, rTblCrsr.GetSelRing(), aItemSet))
+ *pEntry, aValue, rTableCrsr.GetSelRing(), aItemSet))
{
m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet);
}
- SwUnoCursorHelper::SetCrsrAttr(rTblCrsr.GetSelRing(),
+ SwUnoCursorHelper::SetCrsrAttr(rTableCrsr.GetSelRing(),
aItemSet, SetAttrMode::DEFAULT, true);
}
}
@@ -1690,14 +1690,14 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
return uno::Any();
{
auto pSttNode = pUnoCrsr->GetNode().StartOfSectionNode();
- const SwTableNode* pTblNode = pSttNode->FindTableNode();
- lcl_FormatTable(pTblNode->GetTable().GetFrmFmt());
+ const SwTableNode* pTableNode = pSttNode->FindTableNode();
+ lcl_FormatTable(pTableNode->GetTable().GetFrameFormat());
}
- SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
auto pEntry(m_pPropSet->getPropertyMap().getByName(rPropertyName));
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast<cppu::OWeakObject*>(this));
- rTblCrsr.MakeBoxSels();
+ rTableCrsr.MakeBoxSels();
uno::Any aResult;
switch(pEntry->nWID)
{
@@ -1714,18 +1714,18 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
break;
case FN_UNO_PARA_STYLE:
{
- auto pFmt(SwUnoCursorHelper::GetCurTxtFmtColl(*pUnoCrsr, false));
- if(pFmt)
- aResult = uno::makeAny(pFmt->GetName());
+ auto pFormat(SwUnoCursorHelper::GetCurTextFormatColl(*pUnoCrsr, false));
+ if(pFormat)
+ aResult = uno::makeAny(pFormat->GetName());
}
break;
default:
{
- SfxItemSet aSet(rTblCrsr.GetDoc()->GetAttrPool(),
+ SfxItemSet aSet(rTableCrsr.GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
0L);
- SwUnoCursorHelper::GetCrsrAttr(rTblCrsr.GetSelRing(), aSet);
+ SwUnoCursorHelper::GetCrsrAttr(rTableCrsr.GetSelRing(), aSet);
m_pPropSet->getPropertyValue(*pEntry, aSet, aResult);
}
}
@@ -1784,7 +1784,7 @@ public:
template<typename Tpoolitem>
inline void AddItemToSet(SfxItemSet& rSet, std::function<Tpoolitem()> aItemFactory, sal_uInt16 nWhich, std::initializer_list<sal_uInt16> vMember, bool bAddTwips = false);
- void ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc);
+ void ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc);
};
SwTableProperties_Impl::SwTableProperties_Impl()
@@ -1818,7 +1818,7 @@ void SwTableProperties_Impl::AddItemToSet(SfxItemSet& rSet, std::function<Tpooli
rSet.Put(aItem);
}
}
-void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
+void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc)
{
SfxItemSet aSet(rDoc.GetAttrPool(),
RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT,
@@ -1832,14 +1832,14 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
0
);
const uno::Any* pRepHead;
- const SwFrmFmt &rFrmFmt = *rTbl.GetFrmFmt();
+ const SwFrameFormat &rFrameFormat = *rTable.GetFrameFormat();
if(GetProperty(FN_TABLE_HEADLINE_REPEAT, 0xff, pRepHead ))
{
bool bVal(pRepHead->get<bool>());
- const_cast<SwTable&>(rTbl).SetRowsToRepeat( bVal ? 1 : 0 ); // TODO: MULTIHEADER
+ const_cast<SwTable&>(rTable).SetRowsToRepeat( bVal ? 1 : 0 ); // TODO: MULTIHEADER
}
- AddItemToSet<SvxBrushItem>(aSet, [&rFrmFmt]() { return rFrmFmt.makeBackgroundBrushItem(); }, RES_BACKGROUND, {
+ AddItemToSet<SvxBrushItem>(aSet, [&rFrameFormat]() { return rFrameFormat.makeBackgroundBrushItem(); }, RES_BACKGROUND, {
MID_BACK_COLOR,
MID_GRAPHIC_TRANSPARENT,
MID_GRAPHIC_POSITION,
@@ -1857,7 +1857,7 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
const SwPageDesc* pDesc = SwPageDesc::GetByName(rDoc, sPageStyle);
if(pDesc)
{
- SwFmtPageDesc aDesc(pDesc);
+ SwFormatPageDesc aDesc(pDesc);
const uno::Any* pPgNo;
if(GetProperty(RES_PAGEDESC, MID_PAGEDESC_PAGENUMOFFSET, pPgNo))
{
@@ -1871,10 +1871,10 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
}
if(bPutBreak)
- AddItemToSet<SvxFmtBreakItem>(aSet, [&rFrmFmt]() { return rFrmFmt.GetBreak(); }, RES_BREAK, {0});
- AddItemToSet<SvxShadowItem>(aSet, [&rFrmFmt]() { return rFrmFmt.GetShadow(); }, RES_SHADOW, {0}, true);
- AddItemToSet<SvxFmtKeepItem>(aSet, [&rFrmFmt]() { return rFrmFmt.GetKeep(); }, RES_KEEP, {0});
- AddItemToSet<SwFmtHoriOrient>(aSet, [&rFrmFmt]() { return rFrmFmt.GetHoriOrient(); }, RES_HORI_ORIENT, {MID_HORIORIENT_ORIENT}, true);
+ AddItemToSet<SvxFormatBreakItem>(aSet, [&rFrameFormat]() { return rFrameFormat.GetBreak(); }, RES_BREAK, {0});
+ AddItemToSet<SvxShadowItem>(aSet, [&rFrameFormat]() { return rFrameFormat.GetShadow(); }, RES_SHADOW, {0}, true);
+ AddItemToSet<SvxFormatKeepItem>(aSet, [&rFrameFormat]() { return rFrameFormat.GetKeep(); }, RES_KEEP, {0});
+ AddItemToSet<SwFormatHoriOrient>(aSet, [&rFrameFormat]() { return rFrameFormat.GetHoriOrient(); }, RES_HORI_ORIENT, {MID_HORIORIENT_ORIENT}, true);
const uno::Any* pSzRel(nullptr);
GetProperty(FN_TABLE_IS_RELATIVE_WIDTH, 0xff, pSzRel);
@@ -1884,7 +1884,7 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
GetProperty(FN_TABLE_WIDTH, 0xff, pWidth);
bool bPutSize = pWidth != nullptr;
- SwFmtFrmSize aSz(ATT_VAR_SIZE);
+ SwFormatFrmSize aSz(ATT_VAR_SIZE);
if(pWidth)
{
aSz.PutValue(*pWidth, MID_FRMSIZE_WIDTH);
@@ -1901,21 +1901,21 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
aSz.SetWidth(MINLAY);
aSet.Put(aSz);
}
- AddItemToSet<SvxLRSpaceItem>(aSet, [&rFrmFmt]() { return rFrmFmt.GetLRSpace(); }, RES_LR_SPACE, {
+ AddItemToSet<SvxLRSpaceItem>(aSet, [&rFrameFormat]() { return rFrameFormat.GetLRSpace(); }, RES_LR_SPACE, {
MID_L_MARGIN|CONVERT_TWIPS,
MID_R_MARGIN|CONVERT_TWIPS });
- AddItemToSet<SvxULSpaceItem>(aSet, [&rFrmFmt]() { return rFrmFmt.GetULSpace(); }, RES_UL_SPACE, {
+ AddItemToSet<SvxULSpaceItem>(aSet, [&rFrameFormat]() { return rFrameFormat.GetULSpace(); }, RES_UL_SPACE, {
MID_UP_MARGIN|CONVERT_TWIPS,
MID_LO_MARGIN|CONVERT_TWIPS });
const::uno::Any* pSplit(nullptr);
if(GetProperty(RES_LAYOUT_SPLIT, 0, pSplit))
{
- SwFmtLayoutSplit aSp(pSplit->get<bool>());
+ SwFormatLayoutSplit aSp(pSplit->get<bool>());
aSet.Put(aSp);
}
if(aSet.Count())
{
- rDoc.SetAttr(aSet, *rTbl.GetFrmFmt());
+ rDoc.SetAttr(aSet, *rTable.GetFrameFormat());
}
}
@@ -1952,8 +1952,8 @@ SwXTextTable::SwXTextTable()
m_bFirstColumnAsLabel(false)
{ }
-SwXTextTable::SwXTextTable(SwFrmFmt& rFrmFmt)
- : SwClient( &rFrmFmt )
+SwXTextTable::SwXTextTable(SwFrameFormat& rFrameFormat)
+ : SwClient( &rFrameFormat )
, m_pImpl(new Impl)
,
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE)),
@@ -1968,17 +1968,17 @@ SwXTextTable::SwXTextTable(SwFrmFmt& rFrmFmt)
SwXTextTable::~SwXTextTable()
{ delete pTableProps; }
-uno::Reference<text::XTextTable> SwXTextTable::CreateXTextTable(SwFrmFmt* const pFrmFmt)
+uno::Reference<text::XTextTable> SwXTextTable::CreateXTextTable(SwFrameFormat* const pFrameFormat)
{
uno::Reference<text::XTextTable> xTable;
- if(pFrmFmt)
- xTable.set(pFrmFmt->GetXObject(), uno::UNO_QUERY); // cached?
+ if(pFrameFormat)
+ xTable.set(pFrameFormat->GetXObject(), uno::UNO_QUERY); // cached?
if(xTable.is())
return xTable;
- SwXTextTable* const pNew( (pFrmFmt) ? new SwXTextTable(*pFrmFmt) : new SwXTextTable());
+ SwXTextTable* const pNew( (pFrameFormat) ? new SwXTextTable(*pFrameFormat) : new SwXTextTable());
xTable.set(pNew);
- if(pFrmFmt)
- pFrmFmt->SetXObject(xTable);
+ if(pFrameFormat)
+ pFrameFormat->SetXObject(xTable);
// need a permanent Reference to initialize m_wThis
pNew->m_pImpl->m_wThis = xTable;
return xTable;
@@ -1998,8 +1998,8 @@ uno::Reference< table::XTableRows > SwXTextTable::getRows() throw( uno::Runtime
uno::Reference<table::XTableRows> xResult(m_xRows);
if(xResult.is())
return xResult;
- if(SwFrmFmt* pFmt = GetFrmFmt())
- m_xRows = xResult = new SwXTableRows(*pFmt);
+ if(SwFrameFormat* pFormat = GetFrameFormat())
+ m_xRows = xResult = new SwXTableRows(*pFormat);
if(!xResult.is())
throw uno::RuntimeException();
return xResult;
@@ -2011,8 +2011,8 @@ uno::Reference< table::XTableColumns > SwXTextTable::getColumns() throw( uno::R
uno::Reference<table::XTableColumns> xResult(m_xColumns);
if(xResult.is())
return xResult;
- if(SwFrmFmt* pFmt = GetFrmFmt())
- m_xColumns = xResult = new SwXTableColumns(*pFmt);
+ if(SwFrameFormat* pFormat = GetFrameFormat())
+ m_xColumns = xResult = new SwXTableColumns(*pFormat);
if(!xResult.is())
throw uno::RuntimeException();
return xResult;
@@ -2021,25 +2021,25 @@ uno::Reference< table::XTableColumns > SwXTextTable::getColumns() throw( uno::R
uno::Reference<table::XCell> SwXTextTable::getCellByName(const OUString& sCellName) throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
- SwTable* pTable = SwTable::FindTable(pFmt);
- SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTblBox(sCellName));
+ SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
+ SwTable* pTable = SwTable::FindTable(pFormat);
+ SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTableBox(sCellName));
if(!pBox)
return nullptr;
- return SwXCell::CreateXCell(pFmt, pBox);
+ return SwXCell::CreateXCell(pFormat, pBox);
}
uno::Sequence<OUString> SwXTextTable::getCellNames() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt(GetFrmFmt());
- if(!pFmt)
+ SwFrameFormat* pFormat(GetFrameFormat());
+ if(!pFormat)
return {};
- SwTable* pTable = SwTable::FindTable(pFmt);
+ SwTable* pTable = SwTable::FindTable(pFormat);
// exists at the table and at all boxes
- SwTableLines& rTblLines = pTable->GetTabLines();
+ SwTableLines& rTableLines = pTable->GetTabLines();
std::vector<OUString> aAllNames;
- lcl_InspectLines(rTblLines, aAllNames);
+ lcl_InspectLines(rTableLines, aAllNames);
return comphelper::containerToSequence<OUString>(aAllNames);
}
@@ -2047,13 +2047,13 @@ uno::Reference<text::XTextTableCursor> SwXTextTable::createCursorByCellName(cons
throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
+ SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
uno::Reference<text::XTextTableCursor> xRet;
- SwTable* pTable = SwTable::FindTable(pFmt);
- SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTblBox(sCellName));
+ SwTable* pTable = SwTable::FindTable(pFormat);
+ SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTableBox(sCellName));
if(!pBox || pBox->getRowSpan() == 0)
throw uno::RuntimeException();
- return new SwXTextTableCursor(pFmt, pBox);
+ return new SwXTextTableCursor(pFormat, pBox);
}
void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTextRange)
@@ -2102,20 +2102,20 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex
if(pTable)
{
// here, the properties of the descriptor need to be analyzed
- pTableProps->ApplyTblAttr(*pTable, *pDoc);
- SwFrmFmt* pTblFmt(pTable->GetFrmFmt());
- lcl_FormatTable(pTblFmt);
+ pTableProps->ApplyTableAttr(*pTable, *pDoc);
+ SwFrameFormat* pTableFormat(pTable->GetFrameFormat());
+ lcl_FormatTable(pTableFormat);
- pTblFmt->Add(this);
+ pTableFormat->Add(this);
if(!m_sTableName.isEmpty())
{
sal_uInt16 nIndex = 1;
OUString sTmpNameIndex(m_sTableName);
- while(pDoc->FindTblFmtByName(sTmpNameIndex, true) && nIndex < USHRT_MAX)
+ while(pDoc->FindTableFormatByName(sTmpNameIndex, true) && nIndex < USHRT_MAX)
{
sTmpNameIndex = m_sTableName + OUString::number(nIndex++);
}
- pDoc->SetTableName( *pTblFmt, sTmpNameIndex);
+ pDoc->SetTableName( *pTableFormat, sTmpNameIndex);
}
const::uno::Any* pName;
@@ -2139,19 +2139,19 @@ uno::Reference<text::XTextRange> SwXTextTable::getAnchor()
throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
- return new SwXTextRange(*pFmt);
+ SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
+ return new SwXTextRange(*pFormat);
}
void SwXTextTable::dispose() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
- SwTable* pTable = SwTable::FindTable(pFmt);
+ SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
+ SwTable* pTable = SwTable::FindTable(pFormat);
SwSelBoxes aSelBoxes;
for(auto& rBox : pTable->GetTabSortBoxes() )
aSelBoxes.insert(rBox);
- pFmt->GetDoc()->DeleteRowCol(aSelBoxes);
+ pFormat->GetDoc()->DeleteRowCol(aSelBoxes);
}
void SAL_CALL SwXTextTable::addEventListener(
@@ -2176,34 +2176,34 @@ uno::Reference<table::XCell> SwXTextTable::getCellByPosition(sal_Int32 nColumn,
throw( uno::RuntimeException, lang::IndexOutOfBoundsException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt(GetFrmFmt());
+ SwFrameFormat* pFormat(GetFrameFormat());
// sheet is unimportant
- if(nColumn >= 0 && nRow >= 0 && nColumn < USHRT_MAX && nRow < USHRT_MAX && pFmt)
+ if(nColumn >= 0 && nRow >= 0 && nColumn < USHRT_MAX && nRow < USHRT_MAX && pFormat)
{
- auto pXCell = lcl_CreateXCell(pFmt, nColumn, nRow);
+ auto pXCell = lcl_CreateXCell(pFormat, nColumn, nRow);
if(pXCell)
return pXCell;
}
throw lang::IndexOutOfBoundsException();
}
-uno::Reference<table::XCellRange> SwXTextTable::GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable,
+uno::Reference<table::XCellRange> SwXTextTable::GetRangeByName(SwFrameFormat* pFormat, SwTable* pTable,
const OUString& rTLName, const OUString& rBRName,
SwRangeDescriptor& rDesc)
{
SolarMutexGuard aGuard;
- const SwTableBox* pTLBox = pTable->GetTblBox(rTLName);
+ const SwTableBox* pTLBox = pTable->GetTableBox(rTLName);
if(!pTLBox)
return nullptr;
// invalidate all actions
- UnoActionRemoveContext aRemoveContext(pFmt->GetDoc());
+ UnoActionRemoveContext aRemoveContext(pFormat->GetDoc());
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// set cursor to the upper-left cell of the range
- SwUnoCrsr* pUnoCrsr = pFmt->GetDoc()->CreateUnoCrsr(aPos, true);
+ SwUnoCrsr* pUnoCrsr = pFormat->GetDoc()->CreateUnoCrsr(aPos, true);
pUnoCrsr->Move(fnMoveForward, fnGoNode);
pUnoCrsr->SetRemainInSection(false);
- const SwTableBox* pBRBox(pTable->GetTblBox(rBRName));
+ const SwTableBox* pBRBox(pTable->GetTableBox(rBRName));
if(!pBRBox)
{
delete pUnoCrsr;
@@ -2215,20 +2215,20 @@ uno::Reference<table::XCellRange> SwXTextTable::GetRangeByName(SwFrmFmt* pFmt,
SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
pCrsr->MakeBoxSels();
// pUnoCrsr will be provided and will not be deleted
- return new SwXCellRange(pUnoCrsr, *pFmt, rDesc);
+ return new SwXCellRange(pUnoCrsr, *pFormat, rDesc);
}
uno::Reference<table::XCellRange> SwXTextTable::getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom)
throw(uno::RuntimeException, lang::IndexOutOfBoundsException, std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt(GetFrmFmt());
- if(pFmt && nRight < USHRT_MAX && nBottom < USHRT_MAX &&
+ SwFrameFormat* pFormat(GetFrameFormat());
+ if(pFormat && nRight < USHRT_MAX && nBottom < USHRT_MAX &&
nLeft <= nRight && nTop <= nBottom &&
nLeft >= 0 && nRight >= 0 && nTop >= 0 && nBottom >= 0 )
{
- SwTable* pTable = SwTable::FindTable(pFmt);
- if(!pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable(pFormat);
+ if(!pTable->IsTableComplex())
{
SwRangeDescriptor aDesc;
aDesc.nTop = nTop;
@@ -2239,7 +2239,7 @@ uno::Reference<table::XCellRange> SwXTextTable::getCellRangeByPosition(sal_Int3
const OUString sBRName = sw_GetCellName(aDesc.nRight, aDesc.nBottom);
// please note that according to the 'if' statement at the begin
// sTLName:sBRName already denotes the normalized range string
- return GetRangeByName(pFmt, pTable, sTLName, sBRName, aDesc);
+ return GetRangeByName(pFormat, pTable, sTLName, sBRName, aDesc);
}
}
throw lang::IndexOutOfBoundsException();
@@ -2250,8 +2250,8 @@ uno::Reference<table::XCellRange> SwXTextTable::getCellRangeByName(const OUStrin
{
SolarMutexGuard aGuard;
uno::Reference< table::XCellRange > aRef;
- SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
- SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFmt), static_cast<cppu::OWeakObject*>(this));
+ SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
+ SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFormat), static_cast<cppu::OWeakObject*>(this));
sal_Int32 nPos = 0;
const OUString sTLName(sRange.getToken(0, ':', nPos));
const OUString sBRName(sRange.getToken(0, ':', nPos));
@@ -2267,7 +2267,7 @@ uno::Reference<table::XCellRange> SwXTextTable::getCellRangeByName(const OUStrin
// elsewhere when the cursor in the implementation does not
// point to the top-left and bottom-right cells
aDesc.Normalize();
- return GetRangeByName(pFmt, pTable, sTLName, sBRName, aDesc);
+ return GetRangeByName(pFormat, pTable, sTLName, sBRName, aDesc);
}
uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
@@ -2411,11 +2411,11 @@ void SwXTextTable::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor
{
SolarMutexGuard aGuard;
SwSortOptions aSortOpt;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt &&
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat &&
SwUnoCursorHelper::ConvertSortProperties(rDescriptor, aSortOpt))
{
- SwTable* pTable = SwTable::FindTable( pFmt );
+ SwTable* pTable = SwTable::FindTable( pFormat );
SwSelBoxes aBoxes;
const SwTableSortBoxes& rTBoxes = pTable->GetTabSortBoxes();
for (size_t n = 0; n < rTBoxes.size(); ++n)
@@ -2423,22 +2423,22 @@ void SwXTextTable::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor
SwTableBox* pBox = rTBoxes[ n ];
aBoxes.insert( pBox );
}
- UnoActionContext aContext( pFmt->GetDoc() );
- pFmt->GetDoc()->SortTbl(aBoxes, aSortOpt);
+ UnoActionContext aContext( pFormat->GetDoc() );
+ pFormat->GetDoc()->SortTable(aBoxes, aSortOpt);
}
}
-void SwXTextTable::autoFormat(const OUString& sAutoFmtName)
+void SwXTextTable::autoFormat(const OUString& sAutoFormatName)
throw (lang::IllegalArgumentException, uno::RuntimeException,
std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
- SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFmt), static_cast<cppu::OWeakObject*>(this));
- SwTableAutoFmtTbl aAutoFmtTbl;
- aAutoFmtTbl.Load();
- for (size_t i = aAutoFmtTbl.size(); i;)
- if( sAutoFmtName == aAutoFmtTbl[ --i ].GetName() )
+ SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
+ SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFormat), static_cast<cppu::OWeakObject*>(this));
+ SwTableAutoFormatTable aAutoFormatTable;
+ aAutoFormatTable.Load();
+ for (size_t i = aAutoFormatTable.size(); i;)
+ if( sAutoFormatName == aAutoFormatTable[ --i ].GetName() )
{
SwSelBoxes aBoxes;
const SwTableSortBoxes& rTBoxes = pTable->GetTabSortBoxes();
@@ -2447,8 +2447,8 @@ void SwXTextTable::autoFormat(const OUString& sAutoFmtName)
SwTableBox* pBox = rTBoxes[ n ];
aBoxes.insert( pBox );
}
- UnoActionContext aContext( pFmt->GetDoc() );
- pFmt->GetDoc()->SetTableAutoFmt( aBoxes, aAutoFmtTbl[i] );
+ UnoActionContext aContext( pFormat->GetDoc() );
+ pFormat->GetDoc()->SetTableAutoFormat( aBoxes, aAutoFormatTable[i] );
break;
}
}
@@ -2465,21 +2465,21 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
if(!aValue.hasValue())
throw lang::IllegalArgumentException();
const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
if( !pEntry )
throw lang::IllegalArgumentException();
- if(pFmt)
+ if(pFormat)
{
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
if(0xFF == pEntry->nMemberId)
{
- lcl_SetSpecialProperty(pFmt, pEntry, aValue);
+ lcl_SetSpecialProperty(pFormat, pEntry, aValue);
}
else
{
@@ -2568,10 +2568,10 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
{
break; // something else
}
- SwDoc* pDoc = pFmt->GetDoc();
- if(!lcl_FormatTable(pFmt))
+ SwDoc* pDoc = pFormat->GetDoc();
+ if(!lcl_FormatTable(pFormat))
break;
- SwTable* pTable = SwTable::FindTable( pFmt );
+ SwTable* pTable = SwTable::FindTable( pFormat );
SwTableLines &rLines = pTable->GetTabLines();
// invalidate all actions
@@ -2642,8 +2642,8 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
const sal_uInt16 nRightDistance = convertMm100ToTwip(aTableBorderDistances.RightDistance);
const sal_uInt16 nTopDistance = convertMm100ToTwip(aTableBorderDistances.TopDistance);
const sal_uInt16 nBottomDistance = convertMm100ToTwip(aTableBorderDistances.BottomDistance);
- SwDoc* pDoc = pFmt->GetDoc();
- SwTable* pTable = SwTable::FindTable( pFmt );
+ SwDoc* pDoc = pFormat->GetDoc();
+ SwTable* pTable = SwTable::FindTable( pFormat );
SwTableLines &rLines = pTable->GetTabLines();
pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START, NULL);
for(size_t i = 0; i < rLines.size(); ++i)
@@ -2653,8 +2653,8 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
for(size_t k = 0; k < rBoxes.size(); ++k)
{
SwTableBox* pBox = rBoxes[k];
- const SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- const SvxBoxItem& rBox = pBoxFmt->GetBox();
+ const SwFrameFormat* pBoxFormat = pBox->GetFrameFormat();
+ const SvxBoxItem& rBox = pBoxFormat->GetBox();
if(
(aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( SvxBoxItemLine::LEFT )) ||
(aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( SvxBoxItemLine::RIGHT )) ||
@@ -2662,7 +2662,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
(aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.GetDistance( SvxBoxItemLine::BOTTOM )))
{
SvxBoxItem aSetBox( rBox );
- SwFrmFmt* pSetBoxFmt = pBox->ClaimFrmFmt();
+ SwFrameFormat* pSetBoxFormat = pBox->ClaimFrameFormat();
if( aTableBorderDistances.IsLeftDistanceValid )
aSetBox.SetDistance( nLeftDistance, SvxBoxItemLine::LEFT );
if( aTableBorderDistances.IsRightDistanceValid )
@@ -2671,7 +2671,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
aSetBox.SetDistance( nTopDistance, SvxBoxItemLine::TOP );
if( aTableBorderDistances.IsBottomDistanceValid )
aSetBox.SetDistance( nBottomDistance, SvxBoxItemLine::BOTTOM );
- pDoc->SetAttr( aSetBox, *pSetBoxFmt );
+ pDoc->SetAttr( aSetBox, *pSetBoxFormat );
}
}
}
@@ -2681,9 +2681,9 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
case FN_UNO_TABLE_COLUMN_SEPARATORS:
{
- UnoActionContext aContext(pFmt->GetDoc());
- SwTable* pTable = SwTable::FindTable( pFmt );
- lcl_SetTblSeparators(aValue, pTable, pTable->GetTabLines()[0]->GetTabBoxes()[0], false, pFmt->GetDoc());
+ UnoActionContext aContext(pFormat->GetDoc());
+ SwTable* pTable = SwTable::FindTable( pFormat );
+ lcl_SetTableSeparators(aValue, pTable, pTable->GetTabLines()[0]->GetTabBoxes()[0], false, pFormat->GetDoc());
}
break;
@@ -2691,9 +2691,9 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
default:
{
- SwAttrSet aSet(pFmt->GetAttrSet());
+ SwAttrSet aSet(pFormat->GetAttrSet());
m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
- pFmt->GetDoc()->SetAttr(aSet, *pFmt);
+ pFormat->GetDoc()->SetAttr(aSet, *pFormat);
}
}
}
@@ -2714,18 +2714,18 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
{
SolarMutexGuard aGuard;
uno::Any aRet;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- if(pFmt)
+ if(pFormat)
{
if(0xFF == pEntry->nMemberId)
{
- aRet = lcl_GetSpecialProperty(pFmt, pEntry );
+ aRet = lcl_GetSpecialProperty(pFormat, pEntry );
}
else
{
@@ -2757,11 +2757,11 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
case FN_UNO_TABLE_BORDER:
case FN_UNO_TABLE_BORDER2:
{
- SwDoc* pDoc = pFmt->GetDoc();
+ SwDoc* pDoc = pFormat->GetDoc();
// tables without layout (invisible header/footer?)
- if(!lcl_FormatTable(pFmt))
+ if(!lcl_FormatTable(pFormat))
break;
- SwTable* pTable = SwTable::FindTable( pFmt );
+ SwTable* pTable = SwTable::FindTable( pFormat );
SwTableLines &rLines = pTable->GetTabLines();
// invalidate all actions
@@ -2838,7 +2838,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
case FN_UNO_TABLE_BORDER_DISTANCES :
{
table::TableBorderDistances aTableBorderDistances( 0, sal_True, 0, sal_True, 0, sal_True, 0, sal_True ) ;
- SwTable* pTable = SwTable::FindTable( pFmt );
+ SwTable* pTable = SwTable::FindTable( pFormat );
const SwTableLines &rLines = pTable->GetTabLines();
bool bFirst = true;
sal_uInt16 nLeftDistance = 0;
@@ -2853,8 +2853,8 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
for(size_t k = 0; k < rBoxes.size(); ++k)
{
const SwTableBox* pBox = rBoxes[k];
- SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- const SvxBoxItem& rBox = pBoxFmt->GetBox();
+ SwFrameFormat* pBoxFormat = pBox->GetFrameFormat();
+ const SvxBoxItem& rBox = pBoxFormat->GetBox();
if( bFirst )
{
nLeftDistance = convertTwipToMm100( rBox.GetDistance( SvxBoxItemLine::LEFT ));
@@ -2901,8 +2901,8 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
case FN_UNO_TABLE_COLUMN_SEPARATORS:
{
- SwTable* pTable = SwTable::FindTable( pFmt );
- lcl_GetTblSeparators(aRet, pTable, pTable->GetTabLines()[0]->GetTabBoxes()[0], false);
+ SwTable* pTable = SwTable::FindTable( pFormat );
+ lcl_GetTableSeparators(aRet, pTable, pTable->GetTabLines()[0]->GetTabBoxes()[0], false);
}
break;
@@ -2916,14 +2916,14 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
case FN_UNO_TEXT_SECTION:
{
- SwTable* pTable = SwTable::FindTable( pFmt );
- SwTableNode* pTblNode = pTable->GetTableNode();
- SwSectionNode* pSectionNode = pTblNode->FindSectionNode();
+ SwTable* pTable = SwTable::FindTable( pFormat );
+ SwTableNode* pTableNode = pTable->GetTableNode();
+ SwSectionNode* pSectionNode = pTableNode->FindSectionNode();
if(pSectionNode)
{
SwSection& rSect = pSectionNode->GetSection();
uno::Reference< text::XTextSection > xSect =
- SwXTextSections::GetObject( *rSect.GetFmt() );
+ SwXTextSections::GetObject( *rSect.GetFormat() );
aRet <<= xSect;
}
}
@@ -2931,7 +2931,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
default:
{
- const SwAttrSet& rSet = pFmt->GetAttrSet();
+ const SwAttrSet& rSet = pFormat->GetAttrSet();
m_pPropSet->getPropertyValue(*pEntry, rSet, aRet);
}
}
@@ -2965,12 +2965,12 @@ void SwXTextTable::removeVetoableChangeListener(const OUString& /*rPropertyName*
OUString SwXTextTable::getName() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(!pFmt && !bIsDescriptor)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(!pFormat && !bIsDescriptor)
throw uno::RuntimeException();
- if(pFmt)
+ if(pFormat)
{
- return pFmt->GetName();
+ return pFormat->GetName();
}
return m_sTableName;
}
@@ -2978,50 +2978,50 @@ OUString SwXTextTable::getName() throw( uno::RuntimeException, std::exception )
void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
- if((!pFmt && !bIsDescriptor) ||
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if((!pFormat && !bIsDescriptor) ||
rName.isEmpty() ||
rName.indexOf('.')>=0 ||
rName.indexOf(' ')>=0 )
throw uno::RuntimeException();
- if(pFmt)
+ if(pFormat)
{
- const OUString aOldName( pFmt->GetName() );
- const SwFrmFmts* pFrameFormats = pFmt->GetDoc()->GetTblFrmFmts();
+ const OUString aOldName( pFormat->GetName() );
+ const SwFrameFormats* pFrameFormats = pFormat->GetDoc()->GetTableFrameFormats();
for (size_t i = pFrameFormats->size(); i;)
{
- const SwFrmFmt* pTmpFmt = (*pFrameFormats)[--i];
- if( !pTmpFmt->IsDefault() &&
- pTmpFmt->GetName() == rName &&
- pFmt->GetDoc()->IsUsed( *pTmpFmt ))
+ const SwFrameFormat* pTmpFormat = (*pFrameFormats)[--i];
+ if( !pTmpFormat->IsDefault() &&
+ pTmpFormat->GetName() == rName &&
+ pFormat->GetDoc()->IsUsed( *pTmpFormat ))
{
throw uno::RuntimeException();
}
}
- pFmt->SetName( rName );
+ pFormat->SetName( rName );
SwStartNode *pStNd;
- SwNodeIndex aIdx( *pFmt->GetDoc()->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
+ SwNodeIndex aIdx( *pFormat->GetDoc()->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
SwNode *const pNd = & aIdx.GetNode();
if ( pNd->IsOLENode() &&
- aOldName == static_cast<const SwOLENode*>(pNd)->GetChartTblName() )
+ aOldName == static_cast<const SwOLENode*>(pNd)->GetChartTableName() )
{
- const_cast<SwOLENode*>(static_cast<const SwOLENode*>(pNd))->SetChartTblName( rName );
+ const_cast<SwOLENode*>(static_cast<const SwOLENode*>(pNd))->SetChartTableName( rName );
static_cast<SwOLENode*>(pNd)->GetOLEObj();
- SwTable* pTable = SwTable::FindTable( pFmt );
+ SwTable* pTable = SwTable::FindTable( pFormat );
//TL_CHART2: chart needs to be notfied about name changes
- pFmt->GetDoc()->UpdateCharts( pTable->GetFrmFmt()->GetName() );
+ pFormat->GetDoc()->UpdateCharts( pTable->GetFrameFormat()->GetName() );
}
aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
}
- pFmt->GetDoc()->getIDocumentState().SetModified();
+ pFormat->GetDoc()->getIDocumentState().SetModified();
}
else
m_sTableName = rName;
@@ -3031,11 +3031,11 @@ sal_uInt16 SwXTextTable::getRowCount()
{
SolarMutexGuard aGuard;
sal_uInt16 nRet = 0;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
- SwTable* pTable = SwTable::FindTable( pFmt );
- if(!pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable( pFormat );
+ if(!pTable->IsTableComplex())
{
nRet = pTable->GetTabLines().size();
}
@@ -3046,12 +3046,12 @@ sal_uInt16 SwXTextTable::getRowCount()
sal_uInt16 SwXTextTable::getColumnCount()
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrameFormat* pFormat = GetFrameFormat();
sal_uInt16 nRet = 0;
- if(pFmt)
+ if(pFormat)
{
- SwTable* pTable = SwTable::FindTable( pFmt );
- if(!pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable( pFormat );
+ if(!pTable->IsTableComplex())
{
SwTableLines& rLines = pTable->GetTabLines();
SwTableLine* pLine = rLines.front();
@@ -3141,15 +3141,15 @@ uno::Sequence<OUString> SwXCellRange::getSupportedServiceNames() throw( uno::Run
"com.sun.star.style.ParagraphPropertiesComplex" };
}
-SwXCellRange::SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt,
+SwXCellRange::SwXCellRange(SwUnoCrsr* pCrsr, SwFrameFormat& rFrameFormat,
SwRangeDescriptor& rDesc)
- : SwClient(&rFrmFmt)
+ : SwClient(&rFrameFormat)
, aCursorDepend(this, pCrsr)
, m_ChartListeners(m_Mutex)
,
aRgDesc(rDesc),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TABLE_RANGE)),
- pTblCrsr(pCrsr),
+ pTableCrsr(pCrsr),
m_bFirstRowAsLabel(false),
m_bFirstColumnAsLabel(false)
{
@@ -3158,21 +3158,21 @@ SwXCellRange::SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt,
std::vector< uno::Reference< table::XCell > > SwXCellRange::getCells()
{
- SwFrmFmt* const pFmt = GetFrmFmt();
+ SwFrameFormat* const pFormat = GetFrameFormat();
const sal_Int32 nRowCount(getRowCount());
const sal_Int32 nColCount(getColumnCount());
std::vector< uno::Reference< table::XCell > > vResult;
vResult.reserve(static_cast<size_t>(nRowCount)*static_cast<size_t>(nColCount));
for(sal_Int32 nRow = 0; nRow < nRowCount; ++nRow)
for(sal_Int32 nCol = 0; nCol < nColCount; ++nCol)
- vResult.push_back(uno::Reference< table::XCell >(lcl_CreateXCell(pFmt, aRgDesc.nLeft + nCol, aRgDesc.nTop + nRow)));
+ vResult.push_back(uno::Reference< table::XCell >(lcl_CreateXCell(pFormat, aRgDesc.nLeft + nCol, aRgDesc.nTop + nRow)));
return vResult;
}
SwXCellRange::~SwXCellRange()
{
SolarMutexGuard aGuard;
- delete pTblCrsr;
+ delete pTableCrsr;
}
uno::Reference< table::XCell > SwXCellRange::getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow)
@@ -3180,13 +3180,13 @@ uno::Reference< table::XCell > SwXCellRange::getCellByPosition(sal_Int32 nColum
{
SolarMutexGuard aGuard;
uno::Reference< table::XCell > aRet;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
if(nColumn >= 0 && nRow >= 0 &&
getColumnCount() > nColumn && getRowCount() > nRow )
{
- SwXCell* pXCell = lcl_CreateXCell(pFmt,
+ SwXCell* pXCell = lcl_CreateXCell(pFormat,
aRgDesc.nLeft + nColumn, aRgDesc.nTop + nRow);
if(pXCell)
aRet = pXCell;
@@ -3204,13 +3204,13 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByPosition(
{
SolarMutexGuard aGuard;
uno::Reference< table::XCellRange > aRet;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt && getColumnCount() > nRight && getRowCount() > nBottom &&
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat && getColumnCount() > nRight && getRowCount() > nBottom &&
nLeft <= nRight && nTop <= nBottom
&& nLeft >= 0 && nRight >= 0 && nTop >= 0 && nBottom >= 0 )
{
- SwTable* pTable = SwTable::FindTable( pFmt );
- if(!pTable->IsTblComplex())
+ SwTable* pTable = SwTable::FindTable( pFormat );
+ if(!pTable->IsTableComplex())
{
SwRangeDescriptor aNewDesc;
aNewDesc.nTop = nTop + aRgDesc.nTop;
@@ -3220,18 +3220,18 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByPosition(
aNewDesc.Normalize();
const OUString sTLName = sw_GetCellName(aNewDesc.nLeft, aNewDesc.nTop);
const OUString sBRName = sw_GetCellName(aNewDesc.nRight, aNewDesc.nBottom);
- const SwTableBox* pTLBox = pTable->GetTblBox( sTLName );
+ const SwTableBox* pTLBox = pTable->GetTableBox( sTLName );
if(pTLBox)
{
// invalidate all actions
- UnoActionRemoveContext aRemoveContext(pFmt->GetDoc());
+ UnoActionRemoveContext aRemoveContext(pFormat->GetDoc());
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// set cursor in the upper-left cell of the range
- SwUnoCrsr* pUnoCrsr = pFmt->GetDoc()->CreateUnoCrsr(aPos, true);
+ SwUnoCrsr* pUnoCrsr = pFormat->GetDoc()->CreateUnoCrsr(aPos, true);
pUnoCrsr->Move( fnMoveForward, fnGoNode );
pUnoCrsr->SetRemainInSection( false );
- const SwTableBox* pBRBox = pTable->GetTblBox( sBRName );
+ const SwTableBox* pBRBox = pTable->GetTableBox( sBRName );
if(pBRBox)
{
pUnoCrsr->SetMark();
@@ -3240,7 +3240,7 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByPosition(
SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
pCrsr->MakeBoxSels();
// pUnoCrsr will be provided and will not be deleted
- SwXCellRange* pCellRange = new SwXCellRange(pUnoCrsr, *pFmt, aNewDesc);
+ SwXCellRange* pCellRange = new SwXCellRange(pUnoCrsr, *pFormat, aNewDesc);
aRet = pCellRange;
}
else
@@ -3286,8 +3286,8 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An
std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
@@ -3296,21 +3296,21 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- SwDoc* pDoc = pTblCrsr->GetDoc();
+ SwDoc* pDoc = pTableCrsr->GetDoc();
{
// remove actions to enable box selection
UnoActionRemoveContext aRemoveContext(pDoc);
}
- SwUnoTableCrsr& rCrsr = dynamic_cast<SwUnoTableCrsr&>(*pTblCrsr);
+ SwUnoTableCrsr& rCrsr = dynamic_cast<SwUnoTableCrsr&>(*pTableCrsr);
rCrsr.MakeBoxSels();
switch(pEntry->nWID )
{
case FN_UNO_TABLE_CELL_BACKGROUND:
{
SvxBrushItem aBrush( RES_BACKGROUND );
- SwDoc::GetBoxAttr( *pTblCrsr, aBrush );
+ SwDoc::GetBoxAttr( *pTableCrsr, aBrush );
((SfxPoolItem&)aBrush).PutValue(aValue, pEntry->nMemberId);
- pDoc->SetBoxAttr( *pTblCrsr, aBrush );
+ pDoc->SetBoxAttr( *pTableCrsr, aBrush );
}
break;
@@ -3345,7 +3345,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An
SvxBoxItem aBoxItem(static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX)));
((SfxPoolItem&)aBoxItem).PutValue(aValue, pEntry->nMemberId);
aSet.Put(aBoxItem);
- pDoc->SetTabBorders( *pTblCrsr, aSet );
+ pDoc->SetTabBorders( *pTableCrsr, aSet );
}
break;
case RES_BOXATR_FORMAT:
@@ -3404,8 +3404,8 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName)
{
SolarMutexGuard aGuard;
uno::Any aRet;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
@@ -3416,20 +3416,20 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName)
case FN_UNO_TABLE_CELL_BACKGROUND:
{
SvxBrushItem aBrush( RES_BACKGROUND );
- if(SwDoc::GetBoxAttr( *pTblCrsr, aBrush ))
+ if(SwDoc::GetBoxAttr( *pTableCrsr, aBrush ))
aBrush.QueryValue(aRet, pEntry->nMemberId);
}
break;
case RES_BOX :
{
- SwDoc* pDoc = pTblCrsr->GetDoc();
+ SwDoc* pDoc = pTableCrsr->GetDoc();
SfxItemSet aSet(pDoc->GetAttrPool(),
RES_BOX, RES_BOX,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
0);
aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER ));
- SwDoc::GetTabBorders(*pTblCrsr, aSet);
+ SwDoc::GetTabBorders(*pTableCrsr, aSet);
const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX));
rBoxItem.QueryValue(aRet, pEntry->nMemberId);
}
@@ -3439,11 +3439,11 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName)
break;
case FN_UNO_PARA_STYLE:
{
- SwFmtColl *const pTmpFmt =
- SwUnoCursorHelper::GetCurTxtFmtColl(*pTblCrsr, false);
+ SwFormatColl *const pTmpFormat =
+ SwUnoCursorHelper::GetCurTextFormatColl(*pTableCrsr, false);
OUString sRet;
- if(pFmt)
- sRet = pTmpFmt->GetName();
+ if(pFormat)
+ sRet = pTmpFormat->GetName();
aRet <<= sRet;
}
break;
@@ -3455,13 +3455,13 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName)
break;
default:
{
- SfxItemSet aSet(pTblCrsr->GetDoc()->GetAttrPool(),
+ SfxItemSet aSet(pTableCrsr->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_FRMATR_END -1,
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
0L);
// first look at the attributes of the cursor
- SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pTblCrsr);
+ SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pTableCrsr);
SwUnoCursorHelper::GetCrsrAttr(pCrsr->GetSelRing(), aSet);
m_pPropSet->getPropertyValue(*pEntry, aSet, aRet);
}
@@ -3487,7 +3487,7 @@ void SwXCellRange::removeVetoableChangeListener(const OUString& /*PropertyName*/
void SwXCellRange::GetDataSequence(
uno::Sequence< uno::Any > *pAnySeq, //-> first pointer != 0 is used
- uno::Sequence< OUString > *pTxtSeq, //-> as output sequence
+ uno::Sequence< OUString > *pTextSeq, //-> as output sequence
uno::Sequence< double > *pDblSeq, //-> (previous data gets overwritten)
bool bForceNumberResults ) //-> when 'true' requires to make an
// extra effort to return a value different
@@ -3511,8 +3511,8 @@ void SwXCellRange::GetDataSequence(
const size_t nSize = static_cast<size_t>(nRowCount) * static_cast<size_t>(nColCount);
if (pAnySeq)
pAnySeq->realloc( nSize );
- else if (pTxtSeq)
- pTxtSeq->realloc( nSize );
+ else if (pTextSeq)
+ pTextSeq->realloc( nSize );
else if (pDblSeq)
pDblSeq->realloc( nSize );
else
@@ -3521,12 +3521,12 @@ void SwXCellRange::GetDataSequence(
return;
}
uno::Any *pAnyData = pAnySeq ? pAnySeq->getArray() : 0;
- OUString *pTxtData = pTxtSeq ? pTxtSeq->getArray() : 0;
+ OUString *pTextData = pTextSeq ? pTextSeq->getArray() : 0;
double *pDblData = pDblSeq ? pDblSeq->getArray() : 0;
size_t nDtaCnt = 0;
- SwFrmFmt* pFmt = GetFrmFmt();
- if(pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(pFormat)
{
double fNan;
::rtl::math::setNan( & fNan );
@@ -3536,13 +3536,13 @@ void SwXCellRange::GetDataSequence(
{
for(sal_Int32 nCol = 0; nCol < nColCount; ++nCol)
{
- SwXCell * pXCell = lcl_CreateXCell(pFmt,
+ SwXCell * pXCell = lcl_CreateXCell(pFormat,
aRgDesc.nLeft + nCol,
aRgDesc.nTop + nRow);
//! keep (additional) reference to object to prevent implicit destruction
//! in following UNO calls (when object will get referenced)
xCellRef = pXCell;
- SwTableBox * pBox = pXCell ? pXCell->GetTblBox() : 0;
+ SwTableBox * pBox = pXCell ? pXCell->GetTableBox() : 0;
if(!pBox)
{
throw uno::RuntimeException();
@@ -3552,14 +3552,14 @@ void SwXCellRange::GetDataSequence(
if (pAnyData)
{
// check if table box value item is set
- bool bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false ) == SfxItemState::SET;
+ bool bIsNum = pBox->GetFrameFormat()->GetItemState( RES_BOXATR_VALUE, false ) == SfxItemState::SET;
if (!bIsNum)
pAnyData[nDtaCnt++] <<= lcl_getString(*pXCell);
else
pAnyData[nDtaCnt++] <<= sw_getValue(*pXCell);
}
- else if (pTxtData)
- pTxtData[nDtaCnt++] = lcl_getString(*pXCell);
+ else if (pTextData)
+ pTextData[nDtaCnt++] = lcl_getString(*pXCell);
else if (pDblData)
{
double fVal = fNan;
@@ -3574,18 +3574,18 @@ void SwXCellRange::GetDataSequence(
// from the text in the cell...
sal_uInt32 nFIndex;
- SvNumberFormatter* pNumFormatter = pTblCrsr->GetDoc()->GetNumberFormatter();
+ SvNumberFormatter* pNumFormatter = pTableCrsr->GetDoc()->GetNumberFormatter();
- // look for SwTblBoxNumFormat value in parents as well
+ // look for SwTableBoxNumFormat value in parents as well
const SfxPoolItem* pItem;
- SwFrmFmt *pBoxFmt = pXCell->GetTblBox()->GetFrmFmt();
- SfxItemState eState = pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem);
+ SwFrameFormat *pBoxFormat = pXCell->GetTableBox()->GetFrameFormat();
+ SfxItemState eState = pBoxFormat->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem);
if (eState == SfxItemState::SET)
{
// please note that the language of the numberformat
// is implicitly coded into the below value as well
- nFIndex = static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue();
+ nFIndex = static_cast<const SwTableBoxNumFormat*>(pItem)->GetValue();
// since the current value indicates a text format but the call
// to 'IsNumberFormat' below won't work for text formats
@@ -3621,8 +3621,8 @@ void SwXCellRange::GetDataSequence(
OSL_ENSURE( nDtaCnt == nSize, "size mismatch. Invalid cell range?" );
if (pAnySeq)
pAnySeq->realloc( nDtaCnt );
- else if (pTxtSeq)
- pTxtSeq->realloc( nDtaCnt );
+ else if (pTextSeq)
+ pTextSeq->realloc( nDtaCnt );
else if (pDblSeq)
pDblSeq->realloc( nDtaCnt );
}
@@ -3637,7 +3637,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
const sal_Int32 nColCount = getColumnCount();
if(!nRowCount || !nColCount)
throw uno::RuntimeException("Table too complex", static_cast<cppu::OWeakObject*>(this));
- lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
+ lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
uno::Sequence< uno::Sequence< uno::Any > > aRowSeq(nRowCount);
auto vCells(getCells());
auto pCurrentCell(vCells.begin());
@@ -3647,12 +3647,12 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
for(auto& rCellAny : rRow)
{
auto pCell(static_cast<SwXCell*>(pCurrentCell->get()));
- SwTableBox* pBox = pCell ? pCell->GetTblBox() : nullptr;
+ SwTableBox* pBox = pCell ? pCell->GetTableBox() : nullptr;
if(!pBox)
throw uno::RuntimeException();
// check if table box value item is set
- SwFrmFmt* pBoxFmt(pBox->GetFrmFmt());
- const bool bIsNum = pBoxFmt->GetItemState(RES_BOXATR_VALUE, false) == SfxItemState::SET;
+ SwFrameFormat* pBoxFormat(pBox->GetFrameFormat());
+ const bool bIsNum = pBoxFormat->GetItemState(RES_BOXATR_VALUE, false) == SfxItemState::SET;
rCellAny = bIsNum ? uno::makeAny(sw_getValue(*pCell)) : uno::makeAny(lcl_getString(*pCell));
++pCurrentCell;
}
@@ -3668,8 +3668,8 @@ void SAL_CALL SwXCellRange::setDataArray(const uno::Sequence< uno::Sequence< uno
const sal_Int32 nColCount = getColumnCount();
if(!nRowCount || !nColCount)
throw uno::RuntimeException("Table too complex", static_cast<cppu::OWeakObject*>(this));
- SwFrmFmt* pFmt = GetFrmFmt();
- if(!pFmt)
+ SwFrameFormat* pFormat = GetFrameFormat();
+ if(!pFormat)
return;
if(rArray.getLength() != nRowCount)
throw uno::RuntimeException("Row count mismatch. expected: " + OUString::number(nRowCount) + " got: " + OUString::number(rArray.getLength()), static_cast<cppu::OWeakObject*>(this));
@@ -3682,7 +3682,7 @@ void SAL_CALL SwXCellRange::setDataArray(const uno::Sequence< uno::Sequence< uno
for(const auto& aValue : rColSeq)
{
auto pCell(static_cast<SwXCell*>(pCurrentCell->get()));
- if(!pCell || !pCell->GetTblBox())
+ if(!pCell || !pCell->GetTableBox())
throw uno::RuntimeException("Box for cell missing", static_cast<cppu::OWeakObject*>(this));
if(aValue.isExtractableTo(cppu::UnoType<OUString>::get()))
sw_setString(*pCell, aValue.get<OUString>());
@@ -3737,7 +3737,7 @@ void SwXCellRange::setData(const uno::Sequence< uno::Sequence< double > >& rData
nColCount-1, nRowCount-1), uno::UNO_QUERY);
return xDataRange->setData(rData);
}
- lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
+ lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
if(rData.getLength() != nRowCount)
throw uno::RuntimeException("Row count mismatch. expected: " + OUString::number(nRowCount) + " got: " + OUString::number(rData.getLength()), static_cast<cppu::OWeakObject*>(this));
auto vCells(getCells());
@@ -3778,7 +3778,7 @@ uno::Sequence<OUString> SwXCellRange::getLabelDescriptions(bool bRow)
std::tie(nLeft, nTop, nRight, nBottom) = getLabelCoordinates(bRow);
if(!nRight && !nBottom)
throw uno::RuntimeException("Table too complex", static_cast<cppu::OWeakObject*>(this));
- lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
+ lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
if(!(bRow ? m_bFirstColumnAsLabel : m_bFirstRowAsLabel))
return {}; // without labels we have no descriptions
auto xLabelRange(getCellRangeByPosition(nLeft, nTop, nRight, nBottom));
@@ -3800,7 +3800,7 @@ uno::Sequence<OUString> SwXCellRange::getColumnDescriptions()
void SwXCellRange::setLabelDescriptions(const uno::Sequence<OUString>& rDesc, bool bRow)
{
SolarMutexGuard aGuard;
- lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
+ lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
if(!(bRow ? m_bFirstColumnAsLabel : m_bFirstRowAsLabel))
return; // if there are no labels we cannot set descriptions
sal_uInt32 nLeft, nTop, nRight, nBottom;
@@ -3857,13 +3857,13 @@ void SAL_CALL SwXCellRange::sort(const uno::Sequence< beans::PropertyValue >& rD
{
SolarMutexGuard aGuard;
SwSortOptions aSortOpt;
- SwFrmFmt* pFmt(GetFrmFmt());
- if(pFmt && SwUnoCursorHelper::ConvertSortProperties(rDescriptor, aSortOpt))
+ SwFrameFormat* pFormat(GetFrameFormat());
+ if(pFormat && SwUnoCursorHelper::ConvertSortProperties(rDescriptor, aSortOpt))
{
- SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pTblCrsr);
+ SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*pTableCrsr);
rTableCrsr.MakeBoxSels();
- UnoActionContext aContext(pFmt->GetDoc());
- pFmt->GetDoc()->SortTbl(rTableCrsr.GetSelectedBoxes(), aSortOpt);
+ UnoActionContext aContext(pFormat->GetDoc());
+ pFormat->GetDoc()->SortTable(rTableCrsr.GetSelectedBoxes(), aSortOpt);
}
}
@@ -3873,10 +3873,10 @@ sal_uInt16 SwXCellRange::getColumnCount()
sal_uInt16 SwXCellRange::getRowCount()
{ return static_cast<sal_uInt16>(aRgDesc.nBottom - aRgDesc.nTop + 1); }
-const SwUnoCrsr* SwXCellRange::GetTblCrsr() const
+const SwUnoCrsr* SwXCellRange::GetTableCrsr() const
{
- SwFrmFmt* pFmt = GetFrmFmt();
- return pFmt ? pTblCrsr : nullptr;
+ SwFrameFormat* pFormat = GetFrameFormat();
+ return pFormat ? pTableCrsr : nullptr;
}
void SwXCellRange::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
@@ -3885,12 +3885,12 @@ void SwXCellRange::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
if(!GetRegisteredIn() || !aCursorDepend.GetRegisteredIn())
{
/*
- * Not sure if this will cause a memory leak - this pTblCrsr
+ * Not sure if this will cause a memory leak - this pTableCrsr
* is deleted in SwDoc and segfaults here when deleted again
* if(!aCursorDepend.GetRegisteredIn())
- delete pTblCrsr;
+ delete pTableCrsr;
*/
- pTblCrsr = 0;
+ pTableCrsr = 0;
lang::EventObject const ev(static_cast< ::cppu::OWeakObject&>(*this));
m_ChartListeners.disposeAndClear(ev);
}
@@ -3913,8 +3913,8 @@ uno::Sequence< OUString > SwXTableRows::getSupportedServiceNames() throw( uno::R
TYPEINIT1(SwXTableRows, SwClient);
-SwXTableRows::SwXTableRows(SwFrmFmt& rFrmFmt) :
- SwClient(&rFrmFmt)
+SwXTableRows::SwXTableRows(SwFrameFormat& rFrameFormat) :
+ SwClient(&rFrameFormat)
{ }
SwXTableRows::~SwXTableRows()
@@ -3923,10 +3923,10 @@ SwXTableRows::~SwXTableRows()
sal_Int32 SwXTableRows::getCount() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFrmFmt = GetFrmFmt();
- if(!pFrmFmt)
+ SwFrameFormat* pFrameFormat = GetFrameFormat();
+ if(!pFrameFormat)
throw uno::RuntimeException();
- SwTable* pTable = SwTable::FindTable(pFrmFmt);
+ SwTable* pTable = SwTable::FindTable(pFrameFormat);
return pTable->GetTabLines().size();
}
@@ -3935,17 +3935,17 @@ uno::Any SwXTableRows::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFrmFmt(lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this)));
+ SwFrameFormat* pFrameFormat(lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this)));
if(nIndex < 0)
throw lang::IndexOutOfBoundsException();
- SwTable* pTable = SwTable::FindTable( pFrmFmt );
+ SwTable* pTable = SwTable::FindTable( pFrameFormat );
if(static_cast<size_t>(nIndex) >= pTable->GetTabLines().size())
throw lang::IndexOutOfBoundsException();
SwTableLine* pLine = pTable->GetTabLines()[nIndex];
FindUnoInstanceHint<SwTableLine,SwXTextTableRow> aHint{pLine};
- pFrmFmt->CallSwClientNotify(aHint);
+ pFrameFormat->CallSwClientNotify(aHint);
if(!aHint.m_pResult)
- aHint.m_pResult = new SwXTextTableRow(pFrmFmt, pLine);
+ aHint.m_pResult = new SwXTextTableRow(pFrameFormat, pLine);
uno::Reference<beans::XPropertySet> xRet = (beans::XPropertySet*)aHint.m_pResult;
return uno::makeAny(xRet);
}
@@ -3958,8 +3958,8 @@ uno::Type SAL_CALL SwXTableRows::getElementType() throw( uno::RuntimeException,
sal_Bool SwXTableRows::hasElements() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFrmFmt = GetFrmFmt();
- if(!pFrmFmt)
+ SwFrameFormat* pFrameFormat = GetFrameFormat();
+ if(!pFrameFormat)
throw uno::RuntimeException();
// a table always has rows
return sal_True;
@@ -3971,13 +3971,13 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SolarMutexGuard aGuard;
if (nCount == 0)
return;
- SwFrmFmt* pFrmFmt(lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this)));
- SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFrmFmt), static_cast<cppu::OWeakObject*>(this));
+ SwFrameFormat* pFrameFormat(lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this)));
+ SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFrameFormat), static_cast<cppu::OWeakObject*>(this));
const size_t nRowCount = pTable->GetTabLines().size();
if (nCount <= 0 || !(0 <= nIndex && static_cast<size_t>(nIndex) <= nRowCount))
throw uno::RuntimeException("Illegal arguments", static_cast<cppu::OWeakObject*>(this));
const OUString sTLName = sw_GetCellName(0, nIndex);
- const SwTableBox* pTLBox = pTable->GetTblBox(sTLName);
+ const SwTableBox* pTLBox = pTable->GetTableBox(sTLName);
bool bAppend = false;
if(!pTLBox)
{
@@ -3993,14 +3993,14 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// set cursor to the upper-left cell of the range
- UnoActionContext aAction(pFrmFmt->GetDoc());
- SwUnoCrsr* pUnoCrsr = pFrmFmt->GetDoc()->CreateUnoCrsr(aPos, true);
+ UnoActionContext aAction(pFrameFormat->GetDoc());
+ SwUnoCrsr* pUnoCrsr = pFrameFormat->GetDoc()->CreateUnoCrsr(aPos, true);
pUnoCrsr->Move( fnMoveForward, fnGoNode );
{
// remove actions
UnoActionRemoveContext aRemoveContext(pUnoCrsr->GetDoc());
}
- pFrmFmt->GetDoc()->InsertRow(*pUnoCrsr, (sal_uInt16)nCount, bAppend);
+ pFrameFormat->GetDoc()->InsertRow(*pUnoCrsr, (sal_uInt16)nCount, bAppend);
delete pUnoCrsr;
}
@@ -4010,26 +4010,26 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SolarMutexGuard aGuard;
if (nCount == 0)
return;
- SwFrmFmt* pFrmFmt(lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this)));
+ SwFrameFormat* pFrameFormat(lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this)));
if(nIndex < 0 || nCount <=0 )
throw uno::RuntimeException();
- SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFrmFmt), static_cast<cppu::OWeakObject*>(this));
+ SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFrameFormat), static_cast<cppu::OWeakObject*>(this));
OUString sTLName = sw_GetCellName(0, nIndex);
- const SwTableBox* pTLBox = pTable->GetTblBox(sTLName);
+ const SwTableBox* pTLBox = pTable->GetTableBox(sTLName);
if(!pTLBox)
throw uno::RuntimeException("Illegal arguments", static_cast<cppu::OWeakObject*>(this));
{
// invalidate all actions
- UnoActionRemoveContext aRemoveContext(pFrmFmt->GetDoc());
+ UnoActionRemoveContext aRemoveContext(pFrameFormat->GetDoc());
}
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// set cursor to the upper-left cell of the range
- SwUnoCrsr* pUnoCrsr = pFrmFmt->GetDoc()->CreateUnoCrsr(aPos, true);
+ SwUnoCrsr* pUnoCrsr = pFrameFormat->GetDoc()->CreateUnoCrsr(aPos, true);
pUnoCrsr->Move(fnMoveForward, fnGoNode);
pUnoCrsr->SetRemainInSection( false );
const OUString sBLName = sw_GetCellName(0, nIndex + nCount - 1);
- const SwTableBox* pBLBox = pTable->GetTblBox( sBLName );
+ const SwTableBox* pBLBox = pTable->GetTableBox( sBLName );
if(!pBLBox)
throw uno::RuntimeException("Illegal arguments", static_cast<cppu::OWeakObject*>(this));
pUnoCrsr->SetMark();
@@ -4038,13 +4038,13 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
pCrsr->MakeBoxSels();
{ // these braces are important
- UnoActionContext aAction(pFrmFmt->GetDoc());
- pFrmFmt->GetDoc()->DeleteRow(*pUnoCrsr);
+ UnoActionContext aAction(pFrameFormat->GetDoc());
+ pFrameFormat->GetDoc()->DeleteRow(*pUnoCrsr);
delete pUnoCrsr;
}
{
// invalidate all actions
- UnoActionRemoveContext aRemoveContext(pFrmFmt->GetDoc());
+ UnoActionRemoveContext aRemoveContext(pFrameFormat->GetDoc());
}
}
@@ -4064,8 +4064,8 @@ uno::Sequence< OUString > SwXTableColumns::getSupportedServiceNames() throw( uno
TYPEINIT1(SwXTableColumns, SwClient);
-SwXTableColumns::SwXTableColumns(SwFrmFmt& rFrmFmt) :
- SwClient(&rFrmFmt)
+SwXTableColumns::SwXTableColumns(SwFrameFormat& rFrameFormat) :
+ SwClient(&rFrameFormat)
{ }
SwXTableColumns::~SwXTableColumns()
@@ -4074,9 +4074,9 @@ SwXTableColumns::~SwXTableColumns()
sal_Int32 SwXTableColumns::getCount() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SwFrmFmt* pFrmFmt(lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this)));
- SwTable* pTable = SwTable::FindTable( pFrmFmt );
-// if(!pTable->IsTblComplex())
+ SwFrameFormat* pFrameFormat(lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this)));
+ SwTable* pTable = SwTable::FindTable( pFrameFormat );
+// if(!pTable->IsTableComplex())
// throw uno::RuntimeException("Table too complex", static_cast<cppu::OWeakObject*>(this));
SwTableLines& rLines = pTable->GetTabLines();
SwTableLine* pLine = rLines.front();
@@ -4100,7 +4100,7 @@ uno::Type SAL_CALL SwXTableColumns::getElementType() throw( uno::RuntimeExceptio
sal_Bool SwXTableColumns::hasElements() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this));
+ lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this));
return sal_True;
}
@@ -4111,15 +4111,15 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SolarMutexGuard aGuard;
if (nCount == 0)
return;
- SwFrmFmt* pFrmFmt(lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this)));
- SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFrmFmt), static_cast<cppu::OWeakObject*>(this));
+ SwFrameFormat* pFrameFormat(lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this)));
+ SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFrameFormat), static_cast<cppu::OWeakObject*>(this));
SwTableLines& rLines = pTable->GetTabLines();
SwTableLine* pLine = rLines.front();
const size_t nColCount = pLine->GetTabBoxes().size();
if (nCount <= 0 || !(0 <= nIndex && static_cast<size_t>(nIndex) <= nColCount))
throw uno::RuntimeException("Illegal arguments", static_cast<cppu::OWeakObject*>(this));
const OUString sTLName = sw_GetCellName(nIndex, 0);
- const SwTableBox* pTLBox = pTable->GetTblBox( sTLName );
+ const SwTableBox* pTLBox = pTable->GetTableBox( sTLName );
bool bAppend = false;
if(!pTLBox)
{
@@ -4132,8 +4132,8 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
throw uno::RuntimeException("Illegal arguments", static_cast<cppu::OWeakObject*>(this));
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
- UnoActionContext aAction(pFrmFmt->GetDoc());
- SwUnoCrsr* pUnoCrsr = pFrmFmt->GetDoc()->CreateUnoCrsr(aPos, true);
+ UnoActionContext aAction(pFrameFormat->GetDoc());
+ SwUnoCrsr* pUnoCrsr = pFrameFormat->GetDoc()->CreateUnoCrsr(aPos, true);
pUnoCrsr->Move(fnMoveForward, fnGoNode);
{
@@ -4141,7 +4141,7 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
UnoActionRemoveContext aRemoveContext(pUnoCrsr->GetDoc());
}
- pFrmFmt->GetDoc()->InsertCol(*pUnoCrsr, (sal_uInt16)nCount, bAppend);
+ pFrameFormat->GetDoc()->InsertCol(*pUnoCrsr, (sal_uInt16)nCount, bAppend);
delete pUnoCrsr;
}
@@ -4152,26 +4152,26 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SolarMutexGuard aGuard;
if (nCount == 0)
return;
- SwFrmFmt* pFrmFmt(lcl_EnsureCoreConnected(GetFrmFmt(), static_cast<cppu::OWeakObject*>(this)));
+ SwFrameFormat* pFrameFormat(lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this)));
if(nIndex < 0 || nCount <=0 )
throw uno::RuntimeException();
- SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFrmFmt), static_cast<cppu::OWeakObject*>(this));
+ SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFrameFormat), static_cast<cppu::OWeakObject*>(this));
const OUString sTLName = sw_GetCellName(nIndex, 0);
- const SwTableBox* pTLBox = pTable->GetTblBox( sTLName );
+ const SwTableBox* pTLBox = pTable->GetTableBox( sTLName );
if(!pTLBox)
throw uno::RuntimeException("Cell not found", static_cast<cppu::OWeakObject*>(this));
{
// invalidate all actions
- UnoActionRemoveContext aRemoveContext(pFrmFmt->GetDoc());
+ UnoActionRemoveContext aRemoveContext(pFrameFormat->GetDoc());
}
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// set cursor to the upper-left cell of the range
- SwUnoCrsr* pUnoCrsr = pFrmFmt->GetDoc()->CreateUnoCrsr(aPos, true);
+ SwUnoCrsr* pUnoCrsr = pFrameFormat->GetDoc()->CreateUnoCrsr(aPos, true);
pUnoCrsr->Move(fnMoveForward, fnGoNode);
pUnoCrsr->SetRemainInSection(false);
const OUString sTRName = sw_GetCellName(nIndex + nCount - 1, 0);
- const SwTableBox* pTRBox = pTable->GetTblBox(sTRName);
+ const SwTableBox* pTRBox = pTable->GetTableBox(sTRName);
if(!pTRBox)
throw uno::RuntimeException("Cell not found", static_cast<cppu::OWeakObject*>(this));
pUnoCrsr->SetMark();
@@ -4180,13 +4180,13 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
pCrsr->MakeBoxSels();
{ // these braces are important
- UnoActionContext aAction(pFrmFmt->GetDoc());
- pFrmFmt->GetDoc()->DeleteCol(*pUnoCrsr);
+ UnoActionContext aAction(pFrameFormat->GetDoc());
+ pFrameFormat->GetDoc()->DeleteCol(*pUnoCrsr);
delete pUnoCrsr;
}
{
// invalidate all actions
- UnoActionRemoveContext aRemoveContext(pFrmFmt->GetDoc());
+ UnoActionRemoveContext aRemoveContext(pFrameFormat->GetDoc());
}
}
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 8af3174f30bf..bd677a25a5de 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -428,7 +428,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
case text::ControlCharacter::APPEND_PARAGRAPH:
{
m_pImpl->m_pDoc->ClearBoxNumAttrs(aPam.GetPoint()->nNode);
- m_pImpl->m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPam.GetPoint());
+ m_pImpl->m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPam.GetPoint());
const uno::Reference<lang::XUnoTunnel> xRangeTunnel(
xTextRange, uno::UNO_QUERY);
@@ -642,34 +642,34 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<SwXTextSection>(xSuccTunnel);
SwXTextTable *const pXTable =
::sw::UnoTunnelGetImplementation<SwXTextTable>(xSuccTunnel);
- SwFrmFmt *const pTableFmt = (pXTable) ? pXTable->GetFrmFmt() : 0;
- SwTxtNode * pTxtNode = 0;
- if(pTableFmt && pTableFmt->GetDoc() == GetDoc())
+ SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : 0;
+ SwTextNode * pTextNode = 0;
+ if(pTableFormat && pTableFormat->GetDoc() == GetDoc())
{
- SwTable *const pTable = SwTable::FindTable( pTableFmt );
- SwTableNode *const pTblNode = pTable->GetTableNode();
+ SwTable *const pTable = SwTable::FindTable( pTableFormat );
+ SwTableNode *const pTableNode = pTable->GetTableNode();
- const SwNodeIndex aTblIdx( *pTblNode, -1 );
- SwPosition aBefore(aTblIdx);
- bRet = GetDoc()->getIDocumentContentOperations().AppendTxtNode( aBefore );
- pTxtNode = aBefore.nNode.GetNode().GetTxtNode();
+ const SwNodeIndex aTableIdx( *pTableNode, -1 );
+ SwPosition aBefore(aTableIdx);
+ bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( aBefore );
+ pTextNode = aBefore.nNode.GetNode().GetTextNode();
}
- else if (pXSection && pXSection->GetFmt() &&
- pXSection->GetFmt()->GetDoc() == GetDoc())
+ else if (pXSection && pXSection->GetFormat() &&
+ pXSection->GetFormat()->GetDoc() == GetDoc())
{
- SwSectionFmt *const pSectFmt = pXSection->GetFmt();
- SwSectionNode *const pSectNode = pSectFmt->GetSectionNode();
+ SwSectionFormat *const pSectFormat = pXSection->GetFormat();
+ SwSectionNode *const pSectNode = pSectFormat->GetSectionNode();
const SwNodeIndex aSectIdx( *pSectNode, -1 );
SwPosition aBefore(aSectIdx);
- bRet = GetDoc()->getIDocumentContentOperations().AppendTxtNode( aBefore );
- pTxtNode = aBefore.nNode.GetNode().GetTxtNode();
+ bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( aBefore );
+ pTextNode = aBefore.nNode.GetNode().GetTextNode();
}
- if (!bRet || !pTxtNode)
+ if (!bRet || !pTextNode)
{
throw lang::IllegalArgumentException();
}
- pPara->attachToText(*this, *pTxtNode);
+ pPara->attachToText(*this, *pTextNode);
}
void SAL_CALL
@@ -700,34 +700,34 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<SwXTextSection>(xPredTunnel);
SwXTextTable *const pXTable =
::sw::UnoTunnelGetImplementation<SwXTextTable>(xPredTunnel);
- SwFrmFmt *const pTableFmt = (pXTable) ? pXTable->GetFrmFmt() : 0;
+ SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : 0;
bool bRet = false;
- SwTxtNode * pTxtNode = 0;
- if(pTableFmt && pTableFmt->GetDoc() == GetDoc())
+ SwTextNode * pTextNode = 0;
+ if(pTableFormat && pTableFormat->GetDoc() == GetDoc())
{
- SwTable *const pTable = SwTable::FindTable( pTableFmt );
- SwTableNode *const pTblNode = pTable->GetTableNode();
+ SwTable *const pTable = SwTable::FindTable( pTableFormat );
+ SwTableNode *const pTableNode = pTable->GetTableNode();
- SwEndNode *const pTableEnd = pTblNode->EndOfSectionNode();
+ SwEndNode *const pTableEnd = pTableNode->EndOfSectionNode();
SwPosition aTableEnd(*pTableEnd);
- bRet = GetDoc()->getIDocumentContentOperations().AppendTxtNode( aTableEnd );
- pTxtNode = aTableEnd.nNode.GetNode().GetTxtNode();
+ bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( aTableEnd );
+ pTextNode = aTableEnd.nNode.GetNode().GetTextNode();
}
- else if (pXSection && pXSection->GetFmt() &&
- pXSection->GetFmt()->GetDoc() == GetDoc())
+ else if (pXSection && pXSection->GetFormat() &&
+ pXSection->GetFormat()->GetDoc() == GetDoc())
{
- SwSectionFmt *const pSectFmt = pXSection->GetFmt();
- SwSectionNode *const pSectNode = pSectFmt->GetSectionNode();
+ SwSectionFormat *const pSectFormat = pXSection->GetFormat();
+ SwSectionNode *const pSectNode = pSectFormat->GetSectionNode();
SwEndNode *const pEnd = pSectNode->EndOfSectionNode();
SwPosition aEnd(*pEnd);
- bRet = GetDoc()->getIDocumentContentOperations().AppendTxtNode( aEnd );
- pTxtNode = aEnd.nNode.GetNode().GetTxtNode();
+ bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( aEnd );
+ pTextNode = aEnd.nNode.GetNode().GetTextNode();
}
- if (!bRet || !pTxtNode)
+ if (!bRet || !pTextNode)
{
throw lang::IllegalArgumentException();
}
- pPara->attachToText(*this, *pTxtNode);
+ pPara->attachToText(*this, *pTextNode);
}
void SAL_CALL
@@ -751,27 +751,27 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<SwXTextSection>(xSuccTunnel);
SwXTextTable *const pXTable =
::sw::UnoTunnelGetImplementation<SwXTextTable>(xSuccTunnel);
- SwFrmFmt *const pTableFmt = (pXTable) ? pXTable->GetFrmFmt() : 0;
- if(pTableFmt && pTableFmt->GetDoc() == GetDoc())
+ SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : 0;
+ if(pTableFormat && pTableFormat->GetDoc() == GetDoc())
{
- SwTable *const pTable = SwTable::FindTable( pTableFmt );
- SwTableNode *const pTblNode = pTable->GetTableNode();
+ SwTable *const pTable = SwTable::FindTable( pTableFormat );
+ SwTableNode *const pTableNode = pTable->GetTableNode();
- const SwNodeIndex aTblIdx( *pTblNode, -1 );
- if(aTblIdx.GetNode().IsTxtNode())
+ const SwNodeIndex aTableIdx( *pTableNode, -1 );
+ if(aTableIdx.GetNode().IsTextNode())
{
- SwPaM aBefore(aTblIdx);
+ SwPaM aBefore(aTableIdx);
bRet = GetDoc()->getIDocumentContentOperations().DelFullPara( aBefore );
}
}
- else if (pXSection && pXSection->GetFmt() &&
- pXSection->GetFmt()->GetDoc() == GetDoc())
+ else if (pXSection && pXSection->GetFormat() &&
+ pXSection->GetFormat()->GetDoc() == GetDoc())
{
- SwSectionFmt *const pSectFmt = pXSection->GetFmt();
- SwSectionNode *const pSectNode = pSectFmt->GetSectionNode();
+ SwSectionFormat *const pSectFormat = pXSection->GetFormat();
+ SwSectionNode *const pSectNode = pSectFormat->GetSectionNode();
const SwNodeIndex aSectIdx( *pSectNode, -1 );
- if(aSectIdx.GetNode().IsTxtNode())
+ if(aSectIdx.GetNode().IsTextNode())
{
SwPaM aBefore(aSectIdx);
bRet = GetDoc()->getIDocumentContentOperations().DelFullPara( aBefore );
@@ -804,28 +804,28 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<SwXTextSection>(xPredTunnel);
SwXTextTable *const pXTable =
::sw::UnoTunnelGetImplementation<SwXTextTable>(xPredTunnel);
- SwFrmFmt *const pTableFmt = (pXTable) ? pXTable->GetFrmFmt() : 0;
- if(pTableFmt && pTableFmt->GetDoc() == GetDoc())
+ SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : 0;
+ if(pTableFormat && pTableFormat->GetDoc() == GetDoc())
{
- SwTable *const pTable = SwTable::FindTable( pTableFmt );
- SwTableNode *const pTblNode = pTable->GetTableNode();
- SwEndNode *const pTableEnd = pTblNode->EndOfSectionNode();
+ SwTable *const pTable = SwTable::FindTable( pTableFormat );
+ SwTableNode *const pTableNode = pTable->GetTableNode();
+ SwEndNode *const pTableEnd = pTableNode->EndOfSectionNode();
- const SwNodeIndex aTblIdx( *pTableEnd, 1 );
- if(aTblIdx.GetNode().IsTxtNode())
+ const SwNodeIndex aTableIdx( *pTableEnd, 1 );
+ if(aTableIdx.GetNode().IsTextNode())
{
- SwPaM aPaM(aTblIdx);
+ SwPaM aPaM(aTableIdx);
bRet = GetDoc()->getIDocumentContentOperations().DelFullPara( aPaM );
}
}
- else if (pXSection && pXSection->GetFmt() &&
- pXSection->GetFmt()->GetDoc() == GetDoc())
+ else if (pXSection && pXSection->GetFormat() &&
+ pXSection->GetFormat()->GetDoc() == GetDoc())
{
- SwSectionFmt *const pSectFmt = pXSection->GetFmt();
- SwSectionNode *const pSectNode = pSectFmt->GetSectionNode();
+ SwSectionFormat *const pSectFormat = pXSection->GetFormat();
+ SwSectionNode *const pSectNode = pSectFormat->GetSectionNode();
SwEndNode *const pEnd = pSectNode->EndOfSectionNode();
const SwNodeIndex aSectIdx( *pEnd, 1 );
- if(aSectIdx.GetNode().IsTxtNode())
+ if(aSectIdx.GetNode().IsTextNode())
{
SwPaM aAfter(aSectIdx);
bRet = GetDoc()->getIDocumentContentOperations().DelFullPara( aAfter );
@@ -956,10 +956,10 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException, std::e
while(aStartIdx < aEndIdx);
if(bInsertNodes)
{
- GetDoc()->getIDocumentContentOperations().AppendTxtNode( aStartPos );
+ GetDoc()->getIDocumentContentOperations().AppendTextNode( aStartPos );
SwPosition aEndPos(aEndIdx.GetNode());
SwPaM aPam(aEndPos);
- GetDoc()->getIDocumentContentOperations().AppendTxtNode( *aPam.Start() );
+ GetDoc()->getIDocumentContentOperations().AppendTextNode( *aPam.Start() );
}
}
@@ -1150,15 +1150,15 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
// break;
case FN_UNO_REDLINE_NODE_END:
{
- const SwRedlineTbl& rRedTbl = GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl();
- const size_t nRedTblCount = rRedTbl.size();
- if (nRedTblCount > 0)
+ const SwRedlineTable& rRedTable = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
+ const size_t nRedTableCount = rRedTable.size();
+ if (nRedTableCount > 0)
{
SwStartNode const*const pStartNode = GetStartNode();
const sal_uLong nOwnIndex = pStartNode->EndOfSectionIndex();
- for (size_t nRed = 0; nRed < nRedTblCount; ++nRed)
+ for (size_t nRed = 0; nRed < nRedTableCount; ++nRed)
{
- SwRangeRedline const*const pRedline = rRedTbl[nRed];
+ SwRangeRedline const*const pRedline = rRedTable[nRed];
SwPosition const*const pRedStart = pRedline->Start();
const SwNodeIndex nRedNode = pRedStart->nNode;
if (nOwnIndex == nRedNode.GetIndex())
@@ -1291,7 +1291,7 @@ SwXText::Impl::finishOrAppendParagraph(
aPam = aStartPam;
aPam.SetMark();
}
- m_pDoc->getIDocumentContentOperations().AppendTxtNode( *aPam.GetPoint() );
+ m_pDoc->getIDocumentContentOperations().AppendTextNode( *aPam.GetPoint() );
// remove attributes from the previous paragraph
m_pDoc->ResetAttrs(aPam);
// in case of finishParagraph the PaM needs to be moved to the
@@ -1341,11 +1341,11 @@ SwXText::Impl::finishOrAppendParagraph(
throw aEx;
}
}
- SwTxtNode *const pTxtNode( aPam.Start()->nNode.GetNode().GetTxtNode() );
- OSL_ENSURE(pTxtNode, "no SwTxtNode?");
- if (pTxtNode)
+ SwTextNode *const pTextNode( aPam.Start()->nNode.GetNode().GetTextNode() );
+ OSL_ENSURE(pTextNode, "no SwTextNode?");
+ if (pTextNode)
{
- xRet.set(SwXParagraph::CreateXParagraph(*m_pDoc, pTxtNode, &m_rThis),
+ xRet.set(SwXParagraph::CreateXParagraph(*m_pDoc, pTextNode, &m_rThis),
uno::UNO_QUERY);
}
@@ -1383,7 +1383,7 @@ SwXText::insertTextPortion(
m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
SwUnoCrsr *const pCursor = pTextCursor->GetCursor();
- m_pImpl->m_pDoc->DontExpandFmt( *pCursor->Start() );
+ m_pImpl->m_pDoc->DontExpandFormat( *pCursor->Start() );
if (!rText.isEmpty())
{
@@ -1596,9 +1596,9 @@ SwXText::convertToTextFrame(
}
if (pStartTableNode)
{
- const SwNodeIndex aTblIdx( *pStartTableNode, -1 );
- SwPosition aBefore(aTblIdx);
- bParaBeforeInserted = GetDoc()->getIDocumentContentOperations().AppendTxtNode( aBefore );
+ const SwNodeIndex aTableIdx( *pStartTableNode, -1 );
+ SwPosition aBefore(aTableIdx);
+ bParaBeforeInserted = GetDoc()->getIDocumentContentOperations().AppendTextNode( aBefore );
aStartPam.DeleteMark();
*aStartPam.GetPoint() = aBefore;
pStartStartNode = aStartPam.GetNode().StartOfSectionNode();
@@ -1608,7 +1608,7 @@ SwXText::convertToTextFrame(
SwTableNode *const pEndTableNode = pEndStartNode->FindTableNode();
SwEndNode *const pTableEnd = pEndTableNode->EndOfSectionNode();
SwPosition aTableEnd(*pTableEnd);
- bParaAfterInserted = GetDoc()->getIDocumentContentOperations().AppendTxtNode( aTableEnd );
+ bParaAfterInserted = GetDoc()->getIDocumentContentOperations().AppendTextNode( aTableEnd );
pEndPam->DeleteMark();
*pEndPam->GetPoint() = aTableEnd;
pEndStartNode = pEndPam->GetNode().StartOfSectionNode();
@@ -1650,7 +1650,7 @@ SwXText::convertToTextFrame(
&& aStartPam.End()->nNode == pEndPam->End()->nNode )
{
SwPosition aEnd(*aStartPam.End());
- bParaAfterInserted = GetDoc()->getIDocumentContentOperations().AppendTxtNode( aEnd );
+ bParaAfterInserted = GetDoc()->getIDocumentContentOperations().AppendTextNode( aEnd );
pEndPam->DeleteMark();
*pEndPam->GetPoint() = aEnd;
}
@@ -1662,18 +1662,18 @@ SwXText::convertToTextFrame(
std::set<OUString> aAnchoredFrames;
// for shapes, we have to work with the SdrObjects, as unique name is not guaranteed in their frame format
std::set<const SdrObject*> aAnchoredShapes;
- for (size_t i = 0; i < m_pImpl->m_pDoc->GetSpzFrmFmts()->size(); ++i)
+ for (size_t i = 0; i < m_pImpl->m_pDoc->GetSpzFrameFormats()->size(); ++i)
{
- const SwFrmFmt* pFrmFmt = (*m_pImpl->m_pDoc->GetSpzFrmFmts())[i];
- const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
+ const SwFrameFormat* pFrameFormat = (*m_pImpl->m_pDoc->GetSpzFrameFormats())[i];
+ const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId() || FLY_AT_CHAR == rAnchor.GetAnchorId()) &&
- aStartPam.Start()->nNode.GetIndex() <= rAnchor.GetCntntAnchor()->nNode.GetIndex() &&
- aStartPam.End()->nNode.GetIndex() >= rAnchor.GetCntntAnchor()->nNode.GetIndex())
+ aStartPam.Start()->nNode.GetIndex() <= rAnchor.GetContentAnchor()->nNode.GetIndex() &&
+ aStartPam.End()->nNode.GetIndex() >= rAnchor.GetContentAnchor()->nNode.GetIndex())
{
- if (pFrmFmt->Which() == RES_DRAWFRMFMT)
- aAnchoredShapes.insert(pFrmFmt->FindSdrObject());
+ if (pFrameFormat->Which() == RES_DRAWFRMFMT)
+ aAnchoredShapes.insert(pFrameFormat->FindSdrObject());
else
- aAnchoredFrames.insert(pFrmFmt->GetName());
+ aAnchoredFrames.insert(pFrameFormat->GetName());
}
}
@@ -1699,31 +1699,31 @@ SwXText::convertToTextFrame(
rNewFrame.setName(m_pImpl->m_pDoc->GetUniqueFrameName());
}
- SwTxtNode *const pTxtNode(aStartPam.GetNode().GetTxtNode());
- OSL_ASSERT(pTxtNode);
- if (!pTxtNode || !pTxtNode->Len()) // don't remove if it contains text!
+ SwTextNode *const pTextNode(aStartPam.GetNode().GetTextNode());
+ OSL_ASSERT(pTextNode);
+ if (!pTextNode || !pTextNode->Len()) // don't remove if it contains text!
{
{ // has to be in a block to remove the SwIndexes before
// DelFullPara is called
SwPaM aMovePam( aStartPam.GetNode() );
- if (aMovePam.Move( fnMoveForward, fnGoCntnt ))
+ if (aMovePam.Move( fnMoveForward, fnGoContent ))
{
// move the anchor to the next paragraph
- SwFmtAnchor aNewAnchor(rNewFrame.GetFrmFmt()->GetAnchor());
+ SwFormatAnchor aNewAnchor(rNewFrame.GetFrameFormat()->GetAnchor());
aNewAnchor.SetAnchor( aMovePam.Start() );
m_pImpl->m_pDoc->SetAttr(
- aNewAnchor, *rNewFrame.GetFrmFmt() );
+ aNewAnchor, *rNewFrame.GetFrameFormat() );
// also move frames anchored to us
- for (size_t i = 0; i < m_pImpl->m_pDoc->GetSpzFrmFmts()->size(); ++i)
+ for (size_t i = 0; i < m_pImpl->m_pDoc->GetSpzFrameFormats()->size(); ++i)
{
- SwFrmFmt* pFrmFmt = (*m_pImpl->m_pDoc->GetSpzFrmFmts())[i];
- if (aAnchoredFrames.find(pFrmFmt->GetName()) != aAnchoredFrames.end() || aAnchoredShapes.find(pFrmFmt->FindSdrObject()) != aAnchoredShapes.end())
+ SwFrameFormat* pFrameFormat = (*m_pImpl->m_pDoc->GetSpzFrameFormats())[i];
+ if (aAnchoredFrames.find(pFrameFormat->GetName()) != aAnchoredFrames.end() || aAnchoredShapes.find(pFrameFormat->FindSdrObject()) != aAnchoredShapes.end())
{
// copy the anchor to the next paragraph
- SwFmtAnchor aAnchor(pFrmFmt->GetAnchor());
+ SwFormatAnchor aAnchor(pFrameFormat->GetAnchor());
aAnchor.SetAnchor(aMovePam.Start());
- m_pImpl->m_pDoc->SetAttr(aAnchor, *pFrmFmt);
+ m_pImpl->m_pDoc->SetAttr(aAnchor, *pFrameFormat);
}
}
}
@@ -1853,9 +1853,9 @@ void SwXText::Impl::ConvertCell(
aStartCellPam = aNewStartPaM;
sal_Int32 nEndLen = 0;
- SwTxtNode * pTxtNode = pCorrectedRange->aEnd.GetNode().GetTxtNode();
- if (pTxtNode != NULL)
- nEndLen = pTxtNode->Len();
+ SwTextNode * pTextNode = pCorrectedRange->aEnd.GetNode().GetTextNode();
+ if (pTextNode != NULL)
+ nEndLen = pTextNode->Len();
SwPaM aNewEndPaM(pCorrectedRange->aEnd, nEndLen);
aEndCellPam = aNewEndPaM;
@@ -1957,7 +1957,7 @@ void SwXText::Impl::ConvertCell(
}
// now check if there's a need to insert another paragraph break
if (aEndCellPam.End()->nContent.GetIndex() <
- aEndCellPam.End()->nNode.GetNode().GetTxtNode()->Len())
+ aEndCellPam.End()->nNode.GetNode().GetTextNode()->Len())
{
m_pDoc->getIDocumentContentOperations().SplitNode(*aEndCellPam.End(), false);
// take care that the new start/endcell is moved to the right position
@@ -1969,11 +1969,11 @@ void SwXText::Impl::ConvertCell(
aEndCellPam.DeleteMark();
aEndCellPam.Move(fnMoveBackward, fnGoNode);
aEndCellPam.GetPoint()->nContent =
- aEndCellPam.GetNode().GetTxtNode()->Len();
+ aEndCellPam.GetNode().GetTextNode()->Len();
}
assert(aStartCellPam.Start()->nContent.GetIndex() == 0);
- assert(aEndCellPam.End()->nContent.GetIndex() == aEndCellPam.End()->nNode.GetNode().GetTxtNode()->Len());
+ assert(aEndCellPam.End()->nContent.GetIndex() == aEndCellPam.End()->nNode.GetNode().GetTextNode()->Len());
SwNodeRange aCellRange(aStartCellPam.Start()->nNode,
aEndCellPam.End()->nNode);
rRowNodes.push_back(aCellRange); // note: invalidates pLastCell!
@@ -2269,7 +2269,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
return uno::Reference< text::XTextTable >();
uno::Reference<text::XTextTable> const xRet =
- SwXTextTable::CreateXTextTable(pTable->GetFrmFmt());
+ SwXTextTable::CreateXTextTable(pTable->GetFrameFormat());
uno::Reference<beans::XPropertySet> const xPrSet(xRet, uno::UNO_QUERY);
// set properties to the table
// catch lang::WrappedTargetException and lang::IndexOutOfBoundsException
@@ -2338,9 +2338,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
}
- assert(SwTable::FindTable(pTable->GetFrmFmt()) == pTable);
- assert(pTable->GetFrmFmt() ==
- dynamic_cast<SwXTextTable&>(*xRet.get()).GetFrmFmt());
+ assert(SwTable::FindTable(pTable->GetFrameFormat()) == pTable);
+ assert(pTable->GetFrameFormat() ==
+ dynamic_cast<SwXTextTable&>(*xRet.get()).GetFrameFormat());
return xRet;
}
@@ -2471,13 +2471,13 @@ SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables)
aPam.Move( fnMoveBackward, fnGoDoc );
if (!bIgnoreTables)
{
- SwTableNode * pTblNode = aPam.GetNode().FindTableNode();
- SwCntntNode * pCont = 0;
- while (pTblNode)
+ SwTableNode * pTableNode = aPam.GetNode().FindTableNode();
+ SwContentNode * pCont = 0;
+ while (pTableNode)
{
- aPam.GetPoint()->nNode = *pTblNode->EndOfSectionNode();
+ aPam.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
pCont = GetDoc()->GetNodes().GoNext(&aPam.GetPoint()->nNode);
- pTblNode = pCont->FindTableNode();
+ pTableNode = pCont->FindTableNode();
}
if (pCont)
{
@@ -2521,7 +2521,7 @@ throw (uno::RuntimeException, std::exception)
SwUnoInternalPaM aPam(*GetDoc());
if (::sw::XTextRangeToSwPaM(aPam, xTextPosition))
{
- if ( !aPam.GetNode().GetTxtNode() )
+ if ( !aPam.GetNode().GetTextNode() )
throw uno::RuntimeException("Invalid text range" );
SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent();
@@ -2602,23 +2602,23 @@ public:
bool m_bIsHeader;
Impl( SwXHeadFootText & /*rThis*/,
- SwFrmFmt & rHeadFootFmt, const bool bIsHeader)
- : SwClient(& rHeadFootFmt)
+ SwFrameFormat & rHeadFootFormat, const bool bIsHeader)
+ : SwClient(& rHeadFootFormat)
, m_bIsHeader(bIsHeader)
{
}
- SwFrmFmt * GetHeadFootFmt() const {
- return static_cast<SwFrmFmt*>(
+ SwFrameFormat * GetHeadFootFormat() const {
+ return static_cast<SwFrameFormat*>(
const_cast<SwModify*>(GetRegisteredIn()));
}
- SwFrmFmt & GetHeadFootFmtOrThrow() {
- SwFrmFmt *const pFmt( GetHeadFootFmt() );
- if (!pFmt) {
+ SwFrameFormat & GetHeadFootFormatOrThrow() {
+ SwFrameFormat *const pFormat( GetHeadFootFormat() );
+ if (!pFormat) {
throw uno::RuntimeException("SwXHeadFootText: disposed or invalid", 0);
}
- return *pFmt;
+ return *pFormat;
}
protected:
// SwClient
@@ -2638,26 +2638,26 @@ bool SwXHeadFootText::IsXHeadFootText(SwClient *const pClient)
uno::Reference< text::XText >
SwXHeadFootText::CreateXHeadFootText(
- SwFrmFmt & rHeadFootFmt, const bool bIsHeader)
+ SwFrameFormat & rHeadFootFormat, const bool bIsHeader)
{
// re-use existing SwXHeadFootText
// #i105557#: do not iterate over the registered clients: race condition
- uno::Reference< text::XText > xText(rHeadFootFmt.GetXObject(),
+ uno::Reference< text::XText > xText(rHeadFootFormat.GetXObject(),
uno::UNO_QUERY);
if (!xText.is())
{
SwXHeadFootText *const pXHFT(
- new SwXHeadFootText(rHeadFootFmt, bIsHeader));
+ new SwXHeadFootText(rHeadFootFormat, bIsHeader));
xText.set(pXHFT);
- rHeadFootFmt.SetXObject(xText);
+ rHeadFootFormat.SetXObject(xText);
}
return xText;
}
-SwXHeadFootText::SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader)
- : SwXText(rHeadFootFmt.GetDoc(),
+SwXHeadFootText::SwXHeadFootText(SwFrameFormat & rHeadFootFormat, const bool bIsHeader)
+ : SwXText(rHeadFootFormat.GetDoc(),
(bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER)
- , m_pImpl( new SwXHeadFootText::Impl(*this, rHeadFootFmt, bIsHeader) )
+ , m_pImpl( new SwXHeadFootText::Impl(*this, rHeadFootFormat, bIsHeader) )
{
}
@@ -2693,13 +2693,13 @@ SwXHeadFootText::getSupportedServiceNames() throw (uno::RuntimeException, std::e
const SwStartNode *SwXHeadFootText::GetStartNode() const
{
const SwStartNode *pSttNd = 0;
- SwFrmFmt *const pHeadFootFmt = m_pImpl->GetHeadFootFmt();
- if(pHeadFootFmt)
+ SwFrameFormat *const pHeadFootFormat = m_pImpl->GetHeadFootFormat();
+ if(pHeadFootFormat)
{
- const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt();
- if( rFlyCntnt.GetCntntIdx() )
+ const SwFormatContent& rFlyContent = pHeadFootFormat->GetContent();
+ if( rFlyContent.GetContentIdx() )
{
- pSttNd = rFlyCntnt.GetCntntIdx()->GetNode().GetStartNode();
+ pSttNd = rFlyContent.GetContentIdx()->GetNode().GetStartNode();
}
}
return pSttNd;
@@ -2740,11 +2740,11 @@ SwXHeadFootText::createTextCursor() throw (uno::RuntimeException, std::exception
{
SolarMutexGuard aGuard;
- SwFrmFmt & rHeadFootFmt( m_pImpl->GetHeadFootFmtOrThrow() );
+ SwFrameFormat & rHeadFootFormat( m_pImpl->GetHeadFootFormatOrThrow() );
uno::Reference< text::XTextCursor > xRet;
- const SwFmtCntnt& rFlyCntnt = rHeadFootFmt.GetCntnt();
- const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode();
+ const SwFormatContent& rFlyContent = rHeadFootFormat.GetContent();
+ const SwNode& rNode = rFlyContent.GetContentIdx()->GetNode();
SwPosition aPos(rNode);
SwXTextCursor *const pXCursor = new SwXTextCursor(*GetDoc(), this,
(m_pImpl->m_bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER, aPos);
@@ -2756,13 +2756,13 @@ SwXHeadFootText::createTextCursor() throw (uno::RuntimeException, std::exception
SwStartNode const*const pOwnStartNode = rNode.FindSttNodeByType(
(m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode);
// is there a table here?
- SwTableNode* pTblNode = pUnoCrsr->GetNode().FindTableNode();
- SwCntntNode* pCont = 0;
- while (pTblNode)
+ SwTableNode* pTableNode = pUnoCrsr->GetNode().FindTableNode();
+ SwContentNode* pCont = 0;
+ while (pTableNode)
{
- pUnoCrsr->GetPoint()->nNode = *pTblNode->EndOfSectionNode();
+ pUnoCrsr->GetPoint()->nNode = *pTableNode->EndOfSectionNode();
pCont = GetDoc()->GetNodes().GoNext(&pUnoCrsr->GetPoint()->nNode);
- pTblNode = pCont->FindTableNode();
+ pTableNode = pCont->FindTableNode();
}
if (pCont)
{
@@ -2788,7 +2788,7 @@ throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt & rHeadFootFmt( m_pImpl->GetHeadFootFmtOrThrow() );
+ SwFrameFormat & rHeadFootFormat( m_pImpl->GetHeadFootFormatOrThrow() );
SwUnoInternalPaM aPam(*GetDoc());
if (!::sw::XTextRangeToSwPaM(aPam, xTextPosition))
@@ -2799,7 +2799,7 @@ throw (uno::RuntimeException, std::exception)
}
uno::Reference< text::XTextCursor > xRet;
- SwNode& rNode = rHeadFootFmt.GetCntnt().GetCntntIdx()->GetNode();
+ SwNode& rNode = rHeadFootFormat.GetContent().GetContentIdx()->GetNode();
SwPosition aPos(rNode);
SwPaM aHFPam(aPos);
aHFPam.Move(fnMoveForward, fnGoNode);
@@ -2823,11 +2823,11 @@ throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFrmFmt & rHeadFootFmt( m_pImpl->GetHeadFootFmtOrThrow() );
+ SwFrameFormat & rHeadFootFormat( m_pImpl->GetHeadFootFormatOrThrow() );
uno::Reference< container::XEnumeration > aRef;
- const SwFmtCntnt& rFlyCntnt = rHeadFootFmt.GetCntnt();
- const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode();
+ const SwFormatContent& rFlyContent = rHeadFootFormat.GetContent();
+ const SwNode& rNode = rFlyContent.GetContentIdx()->GetNode();
SwPosition aPos(rNode);
::std::unique_ptr<SwUnoCrsr> pUnoCursor(
GetDoc()->CreateUnoCrsr(aPos, false));
diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx
index 1a7c162d4a14..0354e6ac199d 100644
--- a/sw/source/core/unocore/unotextmarkup.cxx
+++ b/sw/source/core/unocore/unotextmarkup.cxx
@@ -43,12 +43,12 @@ using namespace ::com::sun::star;
struct SwXTextMarkup::Impl
: public SwClient
{
- SwTxtNode* m_pTxtNode;
+ SwTextNode* m_pTextNode;
ModelToViewHelper const m_ConversionMap;
- Impl(SwTxtNode *const pTxtNode, const ModelToViewHelper& rMap)
- : SwClient(pTxtNode)
- , m_pTxtNode(pTxtNode)
+ Impl(SwTextNode *const pTextNode, const ModelToViewHelper& rMap)
+ : SwClient(pTextNode)
+ , m_pTextNode(pTextNode)
, m_ConversionMap(rMap)
{
}
@@ -58,8 +58,8 @@ struct SwXTextMarkup::Impl
};
SwXTextMarkup::SwXTextMarkup(
- SwTxtNode *const pTxtNode, const ModelToViewHelper& rMap)
- : m_pImpl(new Impl(pTxtNode, rMap))
+ SwTextNode *const pTextNode, const ModelToViewHelper& rMap)
+ : m_pImpl(new Impl(pTextNode, rMap))
{
}
@@ -67,14 +67,14 @@ SwXTextMarkup::~SwXTextMarkup()
{
}
-SwTxtNode* SwXTextMarkup::GetTxtNode()
+SwTextNode* SwXTextMarkup::GetTextNode()
{
- return m_pImpl->m_pTxtNode;
+ return m_pImpl->m_pTextNode;
}
-void SwXTextMarkup::ClearTxtNode()
+void SwXTextMarkup::ClearTextNode()
{
- m_pImpl->m_pTxtNode = nullptr;
+ m_pImpl->m_pTextNode = nullptr;
}
const ModelToViewHelper& SwXTextMarkup::GetConversionMap()
@@ -145,7 +145,7 @@ void SAL_CALL SwXTextMarkup::commitStringMarkup(
SolarMutexGuard aGuard;
// paragraph already dead or modified?
- if (!m_pImpl->m_pTxtNode || nLength <= 0)
+ if (!m_pImpl->m_pTextNode || nLength <= 0)
return;
if ( nType == text::TextMarkupType::SMARTTAG &&
@@ -157,41 +157,41 @@ void SAL_CALL SwXTextMarkup::commitStringMarkup(
bool bRepaint = false;
if ( nType == text::TextMarkupType::SPELLCHECK )
{
- pWList = m_pImpl->m_pTxtNode->GetWrong();
+ pWList = m_pImpl->m_pTextNode->GetWrong();
if ( !pWList )
{
pWList = new SwWrongList( WRONGLIST_SPELL );
- m_pImpl->m_pTxtNode->SetWrong( pWList );
+ m_pImpl->m_pTextNode->SetWrong( pWList );
}
}
else if ( nType == text::TextMarkupType::PROOFREADING || nType == text::TextMarkupType::SENTENCE )
{
- IGrammarContact *pGrammarContact = getGrammarContact(*m_pImpl->m_pTxtNode);
+ IGrammarContact *pGrammarContact = getGrammarContact(*m_pImpl->m_pTextNode);
if( pGrammarContact )
{
- pWList = pGrammarContact->getGrammarCheck(*m_pImpl->m_pTxtNode, true);
+ pWList = pGrammarContact->getGrammarCheck(*m_pImpl->m_pTextNode, true);
OSL_ENSURE( pWList, "GrammarContact _has_ to deliver a wrong list" );
}
else
{
- pWList = m_pImpl->m_pTxtNode->GetGrammarCheck();
+ pWList = m_pImpl->m_pTextNode->GetGrammarCheck();
if ( !pWList )
{
- m_pImpl->m_pTxtNode->SetGrammarCheck( new SwGrammarMarkUp() );
- pWList = m_pImpl->m_pTxtNode->GetGrammarCheck();
+ m_pImpl->m_pTextNode->SetGrammarCheck( new SwGrammarMarkUp() );
+ pWList = m_pImpl->m_pTextNode->GetGrammarCheck();
}
}
- bRepaint = pWList == m_pImpl->m_pTxtNode->GetGrammarCheck();
+ bRepaint = pWList == m_pImpl->m_pTextNode->GetGrammarCheck();
if( pWList->GetBeginInv() < COMPLETE_STRING )
static_cast<SwGrammarMarkUp*>(pWList)->ClearGrammarList();
}
else if ( nType == text::TextMarkupType::SMARTTAG )
{
- pWList = m_pImpl->m_pTxtNode->GetSmartTags();
+ pWList = m_pImpl->m_pTextNode->GetSmartTags();
if ( !pWList )
{
pWList = new SwWrongList( WRONGLIST_SMARTTAG );
- m_pImpl->m_pTxtNode->SetSmartTags( pWList );
+ m_pImpl->m_pTextNode->SetSmartTags( pWList );
}
}
else
@@ -290,7 +290,7 @@ void SAL_CALL SwXTextMarkup::commitStringMarkup(
}
if( bRepaint )
- finishGrammarCheck(*m_pImpl->m_pTxtNode);
+ finishGrammarCheck(*m_pImpl->m_pTextNode);
}
static void lcl_commitGrammarMarkUp(
@@ -393,7 +393,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SolarMutexGuard aGuard;
// paragraph already dead or modified?
- if (!m_pImpl->m_pTxtNode)
+ if (!m_pImpl->m_pTextNode)
return;
// check for equal length of all sequnces
@@ -427,23 +427,23 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
// get appropriate list to use...
SwGrammarMarkUp* pWList = 0;
bool bRepaint = false;
- IGrammarContact *pGrammarContact = getGrammarContact(*m_pImpl->m_pTxtNode);
+ IGrammarContact *pGrammarContact = getGrammarContact(*m_pImpl->m_pTextNode);
if( pGrammarContact )
{
- pWList = pGrammarContact->getGrammarCheck(*m_pImpl->m_pTxtNode, true);
+ pWList = pGrammarContact->getGrammarCheck(*m_pImpl->m_pTextNode, true);
OSL_ENSURE( pWList, "GrammarContact _has_ to deliver a wrong list" );
}
else
{
- pWList = m_pImpl->m_pTxtNode->GetGrammarCheck();
+ pWList = m_pImpl->m_pTextNode->GetGrammarCheck();
if ( !pWList )
{
- m_pImpl->m_pTxtNode->SetGrammarCheck( new SwGrammarMarkUp() );
- pWList = m_pImpl->m_pTxtNode->GetGrammarCheck();
+ m_pImpl->m_pTextNode->SetGrammarCheck( new SwGrammarMarkUp() );
+ pWList = m_pImpl->m_pTextNode->GetGrammarCheck();
pWList->SetInvalid( 0, COMPLETE_STRING );
}
}
- bRepaint = pWList == m_pImpl->m_pTxtNode->GetGrammarCheck();
+ bRepaint = pWList == m_pImpl->m_pTextNode->GetGrammarCheck();
bool bAcceptGrammarError = false;
if( pWList->GetBeginInv() < COMPLETE_STRING )
@@ -474,7 +474,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
if( bRepaint )
- finishGrammarCheck(*m_pImpl->m_pTxtNode);
+ finishGrammarCheck(*m_pImpl->m_pTextNode);
return;
}
@@ -486,7 +486,7 @@ void SwXTextMarkup::Impl::Modify( const SfxPoolItem* /*pOld*/, const SfxPoolItem
if ( GetRegisteredIn() )
GetRegisteredInNonConst()->Remove( this );
- m_pTxtNode = 0;
+ m_pTextNode = 0;
}
SwXStringKeyMap::SwXStringKeyMap()