DomainMapperTableManager.hxx (b8a377c6) | DomainMapperTableManager.hxx (14ac695d) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 16 unchanged lines hidden (view full) --- 25 26#include "TablePropertiesHandler.hxx" 27 28#include <resourcemodel/TableManager.hxx> 29#include <PropertyMap.hxx> 30#include <StyleSheetTable.hxx> 31#include <com/sun/star/text/XTextRange.hpp> 32#include <vector> | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 16 unchanged lines hidden (view full) --- 25 26#include "TablePropertiesHandler.hxx" 27 28#include <resourcemodel/TableManager.hxx> 29#include <PropertyMap.hxx> 30#include <StyleSheetTable.hxx> 31#include <com/sun/star/text/XTextRange.hpp> 32#include <vector> |
33#include <stack> |
|
33 34namespace writerfilter { 35namespace dmapper { 36 37class DomainMapperTableManager : public DomainMapperTableManager_Base_t 38{ 39 typedef boost::shared_ptr< std::vector<sal_Int32> > IntVectorPtr; 40 | 34 35namespace writerfilter { 36namespace dmapper { 37 38class DomainMapperTableManager : public DomainMapperTableManager_Base_t 39{ 40 typedef boost::shared_ptr< std::vector<sal_Int32> > IntVectorPtr; 41 |
41 sal_uInt32 m_nRow; 42 sal_uInt32 m_nCell; 43 sal_uInt32 m_nGridSpan; 44 sal_uInt32 m_nCellBorderIndex; //borders are provided for all cells and need counting 45 sal_Int32 m_nHeaderRepeat; //counter of repeated headers - if == -1 then the repeating stops 46 sal_Int32 m_nTableWidth; //might be set directly or has to be calculated from the column positions | 42 ::std::stack< sal_uInt32 > m_nCellCounterForCurrentRow; 43 sal_uInt32 m_nGridSpanOfCurrentCell; 44 ::std::stack< sal_uInt32 > m_nCurrentCellBorderIndex; //borders are provided for all cells and need counting 45 ::std::stack< sal_Int32 > m_nCurrentHeaderRepeatCount; //counter of repeated headers - if == -1 then the repeating stops 46 ::std::stack< sal_Int32 > m_nTableWidthOfCurrentTable; //might be set directly or has to be calculated from the column positions |
47 bool m_bOOXML; | 47 bool m_bOOXML; |
48 ::rtl::OUString m_sTableStyleName; 49 PropertyMapPtr m_pTableStyleTextProperies; | |
50 | 48 |
51 ::std::vector< IntVectorPtr > m_aTableGrid; 52 ::std::vector< IntVectorPtr > m_aGridSpans; | 49 ::std::stack< IntVectorPtr > m_aTableGrid; 50 ::std::stack< IntVectorPtr > m_aGridSpans; |
53 54 TablePropertiesHandler *m_pTablePropsHandler; 55 PropertyMapPtr m_pStyleProps; 56 | 51 52 TablePropertiesHandler *m_pTablePropsHandler; 53 PropertyMapPtr m_pStyleProps; 54 |
57 virtual void clearData(); 58 | |
59public: 60 61 DomainMapperTableManager(bool bOOXML); 62 virtual ~DomainMapperTableManager(); 63 64 // use this method to avoid adding the properties for the table 65 // but in the provided properties map. 66 inline void SetStyleProperties( PropertyMapPtr pProperties ) { m_pStyleProps = pProperties; }; 67 68 virtual bool sprm(Sprm & rSprm); 69 | 55public: 56 57 DomainMapperTableManager(bool bOOXML); 58 virtual ~DomainMapperTableManager(); 59 60 // use this method to avoid adding the properties for the table 61 // but in the provided properties map. 62 inline void SetStyleProperties( PropertyMapPtr pProperties ) { m_pStyleProps = pProperties; }; 63 64 virtual bool sprm(Sprm & rSprm); 65 |
70 virtual void startLevel( ); 71 virtual void endLevel( ); | 66 virtual void startLevel(); 67 virtual void endLevel(); |
72 73 virtual void endOfCellAction(); 74 virtual void endOfRowAction(); 75 | 68 69 virtual void endOfCellAction(); 70 virtual void endOfRowAction(); 71 |
76 IntVectorPtr getCurrentGrid( ); | 72 IntVectorPtr getCurrentGrid(); |
77 IntVectorPtr getCurrentSpans( ); 78 | 73 IntVectorPtr getCurrentSpans( ); 74 |
79 const ::rtl::OUString& getTableStyleName() const { return m_sTableStyleName; } 80 /// copy the text properties of the table style and its parent into pContext 81 void CopyTextProperties(PropertyMapPtr pContext, StyleSheetTablePtr pStyleSheetTable); 82 | |
83 inline virtual void cellProps(TablePropertyMapPtr pProps) 84 { 85 if ( m_pStyleProps.get( ) ) 86 m_pStyleProps->insert( pProps, true ); 87 else 88 DomainMapperTableManager_Base_t::cellProps( pProps ); 89 }; 90 --- 29 unchanged lines hidden --- | 75 inline virtual void cellProps(TablePropertyMapPtr pProps) 76 { 77 if ( m_pStyleProps.get( ) ) 78 m_pStyleProps->insert( pProps, true ); 79 else 80 DomainMapperTableManager_Base_t::cellProps( pProps ); 81 }; 82 --- 29 unchanged lines hidden --- |