DomainMapperTableManager::m_bOOXML was always true

Change-Id: Icfbd0d779fac949484b37ee861e083a449b225c2
This commit is contained in:
Miklos Vajna
2014-12-02 09:01:51 +01:00
parent 5dcaefdae5
commit 021089d8ee
3 changed files with 6 additions and 9 deletions

View File

@@ -43,7 +43,7 @@ using namespace ::com::sun::star;
using namespace ::std; using namespace ::std;
DomainMapperTableManager::DomainMapperTableManager(bool bOOXML) : DomainMapperTableManager::DomainMapperTableManager() :
m_nRow(0), m_nRow(0),
m_nCell(), m_nCell(),
m_nGridSpan(1), m_nGridSpan(1),
@@ -52,7 +52,6 @@ DomainMapperTableManager::DomainMapperTableManager(bool bOOXML) :
m_nCellBorderIndex(0), m_nCellBorderIndex(0),
m_nHeaderRepeat(0), m_nHeaderRepeat(0),
m_nTableWidth(0), m_nTableWidth(0),
m_bOOXML( bOOXML ),
m_bIsInShape(false), m_bIsInShape(false),
m_aTmpPosition(), m_aTmpPosition(),
m_aTmpTableProperties(), m_aTmpTableProperties(),
@@ -62,7 +61,7 @@ DomainMapperTableManager::DomainMapperTableManager(bool bOOXML) :
m_bTableSizeTypeInserted(false), m_bTableSizeTypeInserted(false),
m_nLayoutType(0), m_nLayoutType(0),
m_nMaxFixedWidth(0), m_nMaxFixedWidth(0),
m_pTablePropsHandler( new TablePropertiesHandler( bOOXML ) ) m_pTablePropsHandler( new TablePropertiesHandler( true ) )
{ {
m_pTablePropsHandler->SetTableManager( this ); m_pTablePropsHandler->SetTableManager( this );
@@ -246,7 +245,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps(); writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get()) if( pProperties.get())
{ {
TDefTableHandlerPtr pTDefTableHandler( new TDefTableHandler(m_bOOXML) ); TDefTableHandlerPtr pTDefTableHandler( new TDefTableHandler(true) );
pProperties->resolve( *pTDefTableHandler ); pProperties->resolve( *pTDefTableHandler );
TablePropertyMapPtr pRowPropMap( new TablePropertyMap ); TablePropertyMapPtr pRowPropMap( new TablePropertyMap );
@@ -276,7 +275,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps(); writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get()) if( pProperties.get())
{ {
BorderHandlerPtr pBorderHandler( new BorderHandler(m_bOOXML) ); BorderHandlerPtr pBorderHandler(new BorderHandler(true));
pProperties->resolve(*pBorderHandler); pProperties->resolve(*pBorderHandler);
TablePropertyMapPtr pCellPropMap( new TablePropertyMap() ); TablePropertyMapPtr pCellPropMap( new TablePropertyMap() );
pCellPropMap->InsertProps(pBorderHandler->getProperties()); pCellPropMap->InsertProps(pBorderHandler->getProperties());

View File

@@ -46,7 +46,6 @@ class DomainMapperTableManager : public TableManager
sal_uInt32 m_nCellBorderIndex; //borders are provided for all cells and need counting sal_uInt32 m_nCellBorderIndex; //borders are provided for all cells and need counting
sal_Int32 m_nHeaderRepeat; //counter of repeated headers - if == -1 then the repeating stops sal_Int32 m_nHeaderRepeat; //counter of repeated headers - if == -1 then the repeating stops
sal_Int32 m_nTableWidth; //might be set directly or has to be calculated from the column positions sal_Int32 m_nTableWidth; //might be set directly or has to be calculated from the column positions
bool m_bOOXML;
/// Are we in a shape (text append stack is not empty) or in the body document? /// Are we in a shape (text append stack is not empty) or in the body document?
bool m_bIsInShape; bool m_bIsInShape;
OUString m_sTableStyleName; OUString m_sTableStyleName;
@@ -80,7 +79,7 @@ class DomainMapperTableManager : public TableManager
public: public:
DomainMapperTableManager(bool bOOXML); DomainMapperTableManager();
virtual ~DomainMapperTableManager(); virtual ~DomainMapperTableManager();
// use this method to avoid adding the properties for the table // use this method to avoid adding the properties for the table

View File

@@ -683,8 +683,7 @@ public:
void appendTableManager( ) void appendTableManager( )
{ {
boost::shared_ptr< DomainMapperTableManager > pMngr( boost::shared_ptr<DomainMapperTableManager> pMngr(new DomainMapperTableManager());
new DomainMapperTableManager( m_eDocumentType == DOCUMENT_OOXML || m_eDocumentType == DOCUMENT_RTF ));
m_aTableManagers.push( pMngr ); m_aTableManagers.push( pMngr );
} }