LibreOffice Module writerfilter (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
writerfilter::dmapper::DomainMapperTableManager Class Reference

#include <DomainMapperTableManager.hxx>

Inheritance diagram for writerfilter::dmapper::DomainMapperTableManager:
[legend]
Collaboration diagram for writerfilter::dmapper::DomainMapperTableManager:
[legend]

Public Member Functions

 DomainMapperTableManager ()
 
virtual ~DomainMapperTableManager () override
 
void SetStyleProperties (PropertyMapPtr pProperties)
 
virtual bool sprm (Sprm &rSprm) override
 Handle an SPRM at current handle. More...
 
bool attribute (Id nName, Value const &val)
 
virtual void startLevel () override
 Start a new table level. More...
 
virtual void endLevel () override
 End a table level. More...
 
virtual void endOfCellAction () override
 Action to be carried out at the end of the last paragraph of a cell. More...
 
virtual void endOfRowAction () override
 Action to be carried out at the end of the "table row" paragraph. More...
 
IntVectorPtr const & getCurrentGrid ()
 
IntVectorPtr const & getCurrentCellWidths ()
 
const TableParagraphVectorPtrgetCurrentParagraphs ()
 
void finishTableLook ()
 Turn the attributes collected so far in m_aTableLook into a property and clear the container. More...
 
css::uno::Sequence< css::beans::PropertyValue > getCurrentTablePosition ()
 
TablePositionHandlergetCurrentTableRealPosition ()
 
virtual void cellProps (const TablePropertyMapPtr &pProps) override
 Handle properties of the current cell. More...
 
virtual void insertRowProps (const TablePropertyMapPtr &pProps) override
 Handle properties of the current row. More...
 
virtual void insertTableProps (const TablePropertyMapPtr &pProps) override
 Handle properties of the current table. More...
 
void SetLayoutType (sal_uInt32 nLayoutType)
 
void setIsInShape (bool bIsInShape)
 
void setMoved (OUString sMoved)
 
OUString getMoved () const
 
bool isInCell () const
 
- Public Member Functions inherited from writerfilter::dmapper::TableManager
TablePropertyMapPtr const & getRowProps () const
 
TablePropertyMapPtr const & getTableExceptionProps () const
 
 TableManager ()
 
 ~TableManager ()
 
void setHandler (const tools::SvRef< DomainMapperTableHandler > &pTableDataHandler)
 Set handler for resolveCurrentTable. More...
 
void handle (const css::uno::Reference< css::text::XTextRange > &rHandle)
 Set the current handle. More...
 
virtual void startLevel ()
 Start a new table level. More...
 
virtual void endLevel ()
 End a table level. More...
 
void endTable ()
 Signal that the next paragraph definitely won't be part of any table. More...
 
bool isInTable ()
 Tells whether a table has been started or not. More...
 
void startParagraphGroup ()
 Handle the start of a paragraph group. More...
 
void endParagraphGroup ()
 Handle the end of a paragraph group. More...
 
virtual bool sprm (Sprm &rSprm)
 Handle an SPRM at current handle. More...
 
void handle0x7 ()
 Handle occurrence of character 0x7. More...
 
void text (const sal_uInt8 *data, size_t len)
 Handle 8 bit text at current handle. More...
 
void utext (const sal_uInt8 *data, size_t len)
 Handle 16 bit text at current handle. More...
 
virtual void cellProps (const TablePropertyMapPtr &pProps)
 Handle properties of the current cell. More...
 
virtual void insertRowProps (const TablePropertyMapPtr &pProps)
 Handle properties of the current row. More...
 
virtual void tableExceptionProps (const TablePropertyMapPtr &pProps)
 Handle table exception properties of the current row. More...
 
virtual void insertTableProps (const TablePropertyMapPtr &pProps)
 Handle properties of the current table. More...
 
bool isIgnore () const
 Return if table manager has detected paragraph to ignore. More...
 
sal_uInt32 getGridBefore (sal_uInt32 nRow)
 
sal_uInt32 getCurrentGridBefore ()
 
void setCurrentGridBefore (sal_uInt32 nSkipGrids)
 
sal_uInt32 getGridAfter (sal_uInt32 nRow)
 
void setCurrentGridAfter (sal_uInt32 nSkipGrids)
 
std::vector< sal_uInt32 > getCurrentGridSpans ()
 
void setCurrentGridSpan (sal_uInt32 nGridSpan, bool bFirstCell=false)
 
sal_uInt32 findColumn (const sal_uInt32 nRow, const sal_uInt32 nCell)
 Given a zero-based row/cell, return the zero-based grid it belongs to, or SAL_MAX_UINT16 for invalid. More...
 
sal_uInt32 findColumnCell (const sal_uInt32 nRow, const sal_uInt32 nCol)
 Given a zero-based row/col, return the zero-based cell describing that grid, or SAL_MAX_UINT16 for invalid. More...
 
void setTableStartsAtCellStart (bool bTableStartsAtCellStart)
 
void setCellLastParaAfterAutospacing (bool bIsAfterAutospacing)
 
bool isCellLastParaAfterAutospacing () const
 
- Public Member Functions inherited from SvRefBase
 SvRefBase ()
 
 SvRefBase (const SvRefBase &)
 
SvRefBaseoperator= (const SvRefBase &)
 
void RestoreNoDelete ()
 
void AddNextRef ()
 
void AddFirstRef ()
 
void ReleaseRef ()
 
unsigned int GetRefCount () const
 

Private Types

typedef std::shared_ptr< std::vector< sal_Int32 > > IntVectorPtr
 

Private Member Functions

bool shouldInsertRow (IntVectorPtr pCellWidths, IntVectorPtr pTableGrid, size_t nGrids, bool &rIsIncompleteGrid)
 
virtual void clearData () override
 let the derived class clear their table related data More...
 

Private Attributes

sal_uInt32 m_nRow
 
::std::vector< sal_uInt32 > m_nCell
 
sal_uInt32 m_nGridSpan
 
sal_Int32 m_nHeaderRepeat
 
sal_Int32 m_nTableWidth
 
bool m_bIsInShape
 Are we in a shape (text append stack is not empty) or in the body document? More...
 
std::vector< OUString > m_aTableStyleNames
 
std::vector< OUString > m_aMoved
 Moved table (in moveRangeFromStart...moveRangeFromEnd or moveRangeToStart...moveRangeToEnd) More...
 
comphelper::SequenceAsHashMap m_aTableLook
 Grab-bag of table look attributes for preserving. More...
 
std::vector< TablePositionHandlerPtrm_aTablePositions
 
std::vector< TablePositionHandlerPtrm_aTmpPosition
 Temporarily stores the position to compare it later. More...
 
std::vector< TablePropertyMapPtrm_aTmpTableProperties
 Temporarily stores the table properties until end of row. More...
 
::std::vector< IntVectorPtrm_aTableGrid
 
bool m_bPushCurrentWidth
 If this is true, then we pushed a width before the next level started, and that should be carried over when starting the next level. More...
 
::std::vector< IntVectorPtrm_aCellWidths
 Individual table cell width values, used only in case the number of cells doesn't match the table grid. More...
 
bool m_bTableSizeTypeInserted
 Remember if table width was already set, when we lack a w:tblW, it should be set manually at the end. More...
 
sal_uInt32 m_nLayoutType
 Table layout algorithm, IOW if we should consider fixed column width or not. More...
 
std::stack< TableParagraphVectorPtrm_aParagraphsToEndTable
 Collected table paragraphs for table style handling. More...
 
std::unique_ptr< TablePropertiesHandlerm_pTablePropsHandler
 
PropertyMapPtr m_pStyleProps
 

Additional Inherited Members

- Protected Member Functions inherited from writerfilter::dmapper::TableManager
TablePropertyMapPtr const & getCellProps () const
 
void setInCell (bool bInCell)
 
bool isInCell () const
 
void setCellEnd (bool bCellEnd)
 
void setRowEnd (bool bRowEnd)
 
bool isRowEnd () const
 
TablePropertyMapPtr getTableProps ()
 
const css::uno::Reference< css::text::XTextRange > & getHandle () const
 
void setHandle (const css::uno::Reference< css::text::XTextRange > &rHandle)
 
sal_Int32 getTableDepthDifference () const
 Return the current table difference, i.e. More...
 
sal_uInt32 getTableDepth () const
 
virtual void endOfCellAction ()
 Action to be carried out at the end of the last paragraph of a cell. More...
 
virtual void endOfRowAction ()
 Action to be carried out at the end of the "table row" paragraph. More...
 
virtual void clearData ()
 let the derived class clear their table related data More...
 
void setKeepUnfinishedRow (bool bKeep)
 Should we keep the unfinished row in endLevel to initialize the table data in the following startLevel. More...
 
- Protected Member Functions inherited from SvRefBase
virtual ~SvRefBase () COVERITY_NOEXCEPT_FALSE
 

Detailed Description

Definition at line 34 of file DomainMapperTableManager.hxx.

Member Typedef Documentation

◆ IntVectorPtr

typedef std::shared_ptr< std::vector<sal_Int32> > writerfilter::dmapper::DomainMapperTableManager::IntVectorPtr
private

Definition at line 36 of file DomainMapperTableManager.hxx.

Constructor & Destructor Documentation

◆ DomainMapperTableManager()

writerfilter::dmapper::DomainMapperTableManager::DomainMapperTableManager ( )

Definition at line 40 of file DomainMapperTableManager.cxx.

References m_pTablePropsHandler.

◆ ~DomainMapperTableManager()

writerfilter::dmapper::DomainMapperTableManager::~DomainMapperTableManager ( )
overridevirtual

Definition at line 55 of file DomainMapperTableManager.cxx.

Member Function Documentation

◆ attribute()

bool writerfilter::dmapper::DomainMapperTableManager::attribute ( Id  nName,
Value const &  val 
)

◆ cellProps()

virtual void writerfilter::dmapper::DomainMapperTableManager::cellProps ( const TablePropertyMapPtr pProps)
inlineoverridevirtual

Handle properties of the current cell.

Parameters
pPropsthe properties

Reimplemented from writerfilter::dmapper::TableManager.

Definition at line 100 of file DomainMapperTableManager.hxx.

References writerfilter::dmapper::TableManager::cellProps(), tools::SvRef< typename T >::get(), and m_pStyleProps.

Referenced by writerfilter::dmapper::DomainMapper_Impl::handleFieldFormula(), and sprm().

◆ clearData()

void writerfilter::dmapper::DomainMapperTableManager::clearData ( )
overrideprivatevirtual

let the derived class clear their table related data

Reimplemented from writerfilter::dmapper::TableManager.

Definition at line 851 of file DomainMapperTableManager.cxx.

References m_nHeaderRepeat, m_nLayoutType, m_nRow, and m_nTableWidth.

◆ endLevel()

void writerfilter::dmapper::DomainMapperTableManager::endLevel ( )
overridevirtual

◆ endOfCellAction()

void writerfilter::dmapper::DomainMapperTableManager::endOfCellAction ( )
overridevirtual

◆ endOfRowAction()

void writerfilter::dmapper::DomainMapperTableManager::endOfRowAction ( )
overridevirtual

◆ finishTableLook()

void writerfilter::dmapper::DomainMapperTableManager::finishTableLook ( )

Turn the attributes collected so far in m_aTableLook into a property and clear the container.

Definition at line 98 of file DomainMapperTableManager.cxx.

References comphelper::SequenceAsHashMap::clear(), comphelper::SequenceAsHashMap::getAsConstPropertyValueList(), insertTableProps(), m_aTableLook, and writerfilter::dmapper::META_PROP_TABLE_LOOK.

◆ getCurrentCellWidths()

DomainMapperTableManager::IntVectorPtr const & writerfilter::dmapper::DomainMapperTableManager::getCurrentCellWidths ( )

Definition at line 394 of file DomainMapperTableManager.cxx.

References m_aCellWidths.

Referenced by endOfRowAction(), and sprm().

◆ getCurrentGrid()

DomainMapperTableManager::IntVectorPtr const & writerfilter::dmapper::DomainMapperTableManager::getCurrentGrid ( )

Definition at line 387 of file DomainMapperTableManager.cxx.

References m_aTableGrid.

Referenced by endOfRowAction(), and sprm().

◆ getCurrentParagraphs()

const TableParagraphVectorPtr & writerfilter::dmapper::DomainMapperTableManager::getCurrentParagraphs ( )

◆ getCurrentTablePosition()

uno::Sequence< beans::PropertyValue > writerfilter::dmapper::DomainMapperTableManager::getCurrentTablePosition ( )

◆ getCurrentTableRealPosition()

TablePositionHandler * writerfilter::dmapper::DomainMapperTableManager::getCurrentTableRealPosition ( )

Definition at line 407 of file DomainMapperTableManager.cxx.

References m_aTablePositions.

◆ getMoved()

OUString writerfilter::dmapper::DomainMapperTableManager::getMoved ( ) const
inline

Definition at line 158 of file DomainMapperTableManager.hxx.

References m_aMoved.

Referenced by endOfRowAction().

◆ insertRowProps()

virtual void writerfilter::dmapper::DomainMapperTableManager::insertRowProps ( const TablePropertyMapPtr pProps)
inlineoverridevirtual

Handle properties of the current row.

Parameters
pPropsthe properties

Reimplemented from writerfilter::dmapper::TableManager.

Definition at line 108 of file DomainMapperTableManager.hxx.

References tools::SvRef< typename T >::get(), writerfilter::dmapper::TableManager::insertRowProps(), and m_pStyleProps.

Referenced by endOfRowAction(), and sprm().

◆ insertTableProps()

virtual void writerfilter::dmapper::DomainMapperTableManager::insertTableProps ( const TablePropertyMapPtr pProps)
inlineoverridevirtual

Handle properties of the current table.

Parameters
pPropsthe properties

Reimplemented from writerfilter::dmapper::TableManager.

Definition at line 116 of file DomainMapperTableManager.hxx.

References tools::SvRef< typename T >::get(), m_aTmpTableProperties, and m_pStyleProps.

Referenced by attribute(), endOfRowAction(), finishTableLook(), and sprm().

◆ isInCell()

bool writerfilter::dmapper::TableManager::isInCell ( ) const
inline

Definition at line 248 of file TableManager.hxx.

◆ setIsInShape()

void writerfilter::dmapper::DomainMapperTableManager::setIsInShape ( bool  bIsInShape)

◆ SetLayoutType()

void writerfilter::dmapper::DomainMapperTableManager::SetLayoutType ( sal_uInt32  nLayoutType)
inline

◆ setMoved()

void writerfilter::dmapper::DomainMapperTableManager::setMoved ( OUString  sMoved)
inline

Definition at line 144 of file DomainMapperTableManager.hxx.

References m_aMoved.

◆ SetStyleProperties()

void writerfilter::dmapper::DomainMapperTableManager::SetStyleProperties ( PropertyMapPtr  pProperties)
inline

Definition at line 80 of file DomainMapperTableManager.hxx.

References m_pStyleProps.

◆ shouldInsertRow()

bool writerfilter::dmapper::DomainMapperTableManager::shouldInsertRow ( IntVectorPtr  pCellWidths,
IntVectorPtr  pTableGrid,
size_t  nGrids,
bool &  rIsIncompleteGrid 
)
private

Definition at line 534 of file DomainMapperTableManager.cxx.

References m_nLayoutType.

Referenced by endOfRowAction().

◆ sprm()

bool writerfilter::dmapper::DomainMapperTableManager::sprm ( Sprm rSprm)
overridevirtual

Handle an SPRM at current handle.

Parameters
rSprmthe SPRM

Reimplemented from writerfilter::dmapper::TableManager.

Definition at line 106 of file DomainMapperTableManager.cxx.

References writerfilter::TagLogger::attribute(), cellProps(), writerfilter::TagLogger::chars(), writerfilter::TagLogger::element(), writerfilter::TagLogger::endElement(), getCurrentCellWidths(), getCurrentGrid(), writerfilter::Sprm::getId(), writerfilter::TagLogger::getInstance(), writerfilter::Sprm::getProps(), writerfilter::dmapper::TableManager::getTableDepth(), writerfilter::dmapper::TableManager::getTableDepthDifference(), writerfilter::Sprm::getValue(), HEADER_ROW_LIMIT_FOR_MSO_WORKAROUND, insertRowProps(), insertTableProps(), writerfilter::dmapper::TablePropertyMap::LEFT_MARGIN, m_aTmpPosition, m_bIsInShape, m_bPushCurrentWidth, m_bTableSizeTypeInserted, m_nGridSpan, m_nHeaderRepeat, m_nRow, m_nTableWidth, m_pTablePropsHandler, writerfilter::dmapper::META_PROP_TABLE_STYLE_NAME, writerfilter::dmapper::PROP_FRM_DIRECTION, writerfilter::dmapper::PROP_HEADER_ROW_COUNT, writerfilter::dmapper::PROP_HORIZONTAL_MERGE, writerfilter::dmapper::PROP_TBL_HEADER, writerfilter::dmapper::PROP_VERTICAL_MERGE, writerfilter::dmapper::PROP_WRITING_MODE, SAL_INFO, writerfilter::dmapper::TableManager::setCurrentGridAfter(), writerfilter::dmapper::TableManager::setCurrentGridBefore(), writerfilter::dmapper::TableManager::sprm(), writerfilter::TagLogger::startElement(), writerfilter::dmapper::TablePropertyMap::TABLE_WIDTH, writerfilter::dmapper::TablePropertyMap::TABLE_WIDTH_TYPE, and writerfilter::Sprm::toString().

◆ startLevel()

void writerfilter::dmapper::DomainMapperTableManager::startLevel ( )
overridevirtual

Member Data Documentation

◆ m_aCellWidths

::std::vector< IntVectorPtr > writerfilter::dmapper::DomainMapperTableManager::m_aCellWidths
private

Individual table cell width values, used only in case the number of cells doesn't match the table grid.

Definition at line 58 of file DomainMapperTableManager.hxx.

Referenced by endLevel(), endOfRowAction(), getCurrentCellWidths(), and startLevel().

◆ m_aMoved

std::vector< OUString > writerfilter::dmapper::DomainMapperTableManager::m_aMoved
private

Moved table (in moveRangeFromStart...moveRangeFromEnd or moveRangeToStart...moveRangeToEnd)

Definition at line 47 of file DomainMapperTableManager.hxx.

Referenced by endLevel(), getMoved(), setMoved(), and startLevel().

◆ m_aParagraphsToEndTable

std::stack< TableParagraphVectorPtr > writerfilter::dmapper::DomainMapperTableManager::m_aParagraphsToEndTable
private

Collected table paragraphs for table style handling.

Definition at line 64 of file DomainMapperTableManager.hxx.

Referenced by endLevel(), endOfRowAction(), getCurrentParagraphs(), and startLevel().

◆ m_aTableGrid

::std::vector< IntVectorPtr > writerfilter::dmapper::DomainMapperTableManager::m_aTableGrid
private

Definition at line 54 of file DomainMapperTableManager.hxx.

Referenced by endLevel(), endOfRowAction(), getCurrentGrid(), and startLevel().

◆ m_aTableLook

comphelper::SequenceAsHashMap writerfilter::dmapper::DomainMapperTableManager::m_aTableLook
private

Grab-bag of table look attributes for preserving.

Definition at line 49 of file DomainMapperTableManager.hxx.

Referenced by attribute(), and finishTableLook().

◆ m_aTablePositions

std::vector< TablePositionHandlerPtr > writerfilter::dmapper::DomainMapperTableManager::m_aTablePositions
private

◆ m_aTableStyleNames

std::vector< OUString > writerfilter::dmapper::DomainMapperTableManager::m_aTableStyleNames
private

Definition at line 45 of file DomainMapperTableManager.hxx.

Referenced by endLevel(), endOfRowAction(), and startLevel().

◆ m_aTmpPosition

std::vector< TablePositionHandlerPtr > writerfilter::dmapper::DomainMapperTableManager::m_aTmpPosition
private

Temporarily stores the position to compare it later.

Definition at line 51 of file DomainMapperTableManager.hxx.

Referenced by endLevel(), endOfRowAction(), sprm(), and startLevel().

◆ m_aTmpTableProperties

std::vector< TablePropertyMapPtr > writerfilter::dmapper::DomainMapperTableManager::m_aTmpTableProperties
private

Temporarily stores the table properties until end of row.

Definition at line 52 of file DomainMapperTableManager.hxx.

Referenced by endLevel(), endOfRowAction(), insertTableProps(), and startLevel().

◆ m_bIsInShape

bool writerfilter::dmapper::DomainMapperTableManager::m_bIsInShape
private

Are we in a shape (text append stack is not empty) or in the body document?

Definition at line 44 of file DomainMapperTableManager.hxx.

Referenced by setIsInShape(), and sprm().

◆ m_bPushCurrentWidth

bool writerfilter::dmapper::DomainMapperTableManager::m_bPushCurrentWidth
private

If this is true, then we pushed a width before the next level started, and that should be carried over when starting the next level.

Definition at line 56 of file DomainMapperTableManager.hxx.

Referenced by endLevel(), sprm(), and startLevel().

◆ m_bTableSizeTypeInserted

bool writerfilter::dmapper::DomainMapperTableManager::m_bTableSizeTypeInserted
private

Remember if table width was already set, when we lack a w:tblW, it should be set manually at the end.

Definition at line 60 of file DomainMapperTableManager.hxx.

Referenced by endOfRowAction(), and sprm().

◆ m_nCell

::std::vector< sal_uInt32 > writerfilter::dmapper::DomainMapperTableManager::m_nCell
private

Definition at line 39 of file DomainMapperTableManager.hxx.

Referenced by endLevel(), endOfCellAction(), endOfRowAction(), and startLevel().

◆ m_nGridSpan

sal_uInt32 writerfilter::dmapper::DomainMapperTableManager::m_nGridSpan
private

Definition at line 40 of file DomainMapperTableManager.hxx.

Referenced by endOfCellAction(), and sprm().

◆ m_nHeaderRepeat

sal_Int32 writerfilter::dmapper::DomainMapperTableManager::m_nHeaderRepeat
private

Definition at line 41 of file DomainMapperTableManager.hxx.

Referenced by clearData(), and sprm().

◆ m_nLayoutType

sal_uInt32 writerfilter::dmapper::DomainMapperTableManager::m_nLayoutType
private

Table layout algorithm, IOW if we should consider fixed column width or not.

Definition at line 62 of file DomainMapperTableManager.hxx.

Referenced by clearData(), endLevel(), SetLayoutType(), shouldInsertRow(), and startLevel().

◆ m_nRow

sal_uInt32 writerfilter::dmapper::DomainMapperTableManager::m_nRow
private

Definition at line 38 of file DomainMapperTableManager.hxx.

Referenced by clearData(), endOfRowAction(), and sprm().

◆ m_nTableWidth

sal_Int32 writerfilter::dmapper::DomainMapperTableManager::m_nTableWidth
private

Definition at line 42 of file DomainMapperTableManager.hxx.

Referenced by clearData(), endLevel(), endOfRowAction(), sprm(), and startLevel().

◆ m_pStyleProps

PropertyMapPtr writerfilter::dmapper::DomainMapperTableManager::m_pStyleProps
private

◆ m_pTablePropsHandler

std::unique_ptr<TablePropertiesHandler> writerfilter::dmapper::DomainMapperTableManager::m_pTablePropsHandler
private

Definition at line 66 of file DomainMapperTableManager.hxx.

Referenced by DomainMapperTableManager(), and sprm().


The documentation for this class was generated from the following files: