summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/TblStylePrHandler.cxx
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-10-28 15:40:57 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-10-28 15:40:57 +0000
commit0211e8bc457a12570988f4aee7dea42c2fc6d56f (patch)
tree222a07982b8f2345681c26cd675b359ae4b47f41 /writerfilter/source/dmapper/TblStylePrHandler.cxx
parent39f317ff5b64c9a00484921c5dda290ef33b03d1 (diff)
CWS-TOOLING: integrate CWS writerfilter32bugfixes01
2009-10-16 10:25:35 +0200 os r276956 : warning fixed 2009-10-16 10:18:35 +0200 os r276954 : using namespace std removed from headers 2009-10-16 10:18:19 +0200 os r276953 : using namespace std removed from headers 2009-10-16 10:17:35 +0200 os r276952 : using namespace std removed from headers 2009-10-14 12:14:16 +0200 cedricbosdo r276890 : Fixed warnings 2009-10-09 08:36:35 +0200 cedricbosdo r276796 : Rebased to OOO320_m1 2009-10-05 11:32:53 +0200 cedricbosdo r276668 : * Fixed namespace_preprocess for windows build * Removed some unused variable * Set a default value for GetCurrentToken 2009-09-07 13:05:30 +0200 os r275892 : #i104155# support for empty URLs if called from writerfilter re-introduced 2009-09-04 14:36:14 +0200 cedricbosdo r275803 : CWS-TOOLING: rebase CWS writerfilter32bugfixes01 to trunk@275331 (milestone: DEV300:m56) 2009-05-15 17:36:28 +0200 cedricbosdo r271958 : Added file to test docx numbering import fixes 2009-05-15 17:28:27 +0200 cedricbosdo r271955 : * Implemented a VML import basis. * Fixed some docx numbering import bugs * Implemented docx outline style import 2009-03-16 11:42:06 +0100 hbrinkm r269515 : moved clog inside #ifdef 2009-03-13 18:30:14 +0100 cedricbosdo r269493 : Fixed a dummy paragraph ending problem 2009-03-13 13:57:58 +0100 cedricbosdo r269477 : Added the missing headers 2009-03-13 12:03:25 +0100 cedricbosdo r269466 : Fixed i#93786 and i#100176 2009-03-12 11:39:10 +0100 cedricbosdo r269377 : Fixed a crash in the redlines patch 2009-03-12 10:11:48 +0100 cedricbosdo r269362 : Fixes for the docx import 2009-03-12 10:10:37 +0100 cedricbosdo r269361 : docx import fixes for: + tables styles + pictures positionning + redlines Started to implement the docx settings.xml import
Diffstat (limited to 'writerfilter/source/dmapper/TblStylePrHandler.cxx')
-rw-r--r--writerfilter/source/dmapper/TblStylePrHandler.cxx69
1 files changed, 69 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx
new file mode 100644
index 000000000000..d6f790990e22
--- /dev/null
+++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx
@@ -0,0 +1,69 @@
+#include <TblStylePrHandler.hxx>
+#include <PropertyMap.hxx>
+#include <ooxml/resourceids.hxx>
+
+namespace writerfilter {
+namespace dmapper {
+
+TblStylePrHandler::TblStylePrHandler( DomainMapper & rDMapper ) :
+ m_rDMapper( rDMapper ),
+ m_pTablePropsHandler( new TablePropertiesHandler( true ) ),
+ m_nType( TBL_STYLE_UNKNOWN ),
+ m_pProperties( new PropertyMap )
+{
+}
+
+TblStylePrHandler::~TblStylePrHandler( )
+{
+ delete m_pTablePropsHandler, m_pTablePropsHandler = NULL;
+}
+
+void TblStylePrHandler::attribute(Id rName, Value & rVal)
+{
+ switch ( rName )
+ {
+ case NS_ooxml::LN_CT_TblStyleOverrideType:
+ {
+ // The tokenid should be the same in the model.xml than
+ // in the TblStyleType enum
+ m_nType = TblStyleType( rVal.getInt( ) );
+ }
+ break;
+ }
+}
+
+void TblStylePrHandler::sprm(Sprm & rSprm)
+{
+ Value::Pointer_t pValue = rSprm.getValue();
+ switch ( rSprm.getId( ) )
+ {
+ case NS_ooxml::LN_CT_PPrBase:
+ case NS_ooxml::LN_EG_RPrBase:
+ case NS_ooxml::LN_CT_TblPrBase:
+ case NS_ooxml::LN_CT_TrPrBase:
+ case NS_ooxml::LN_CT_TcPrBase:
+ resolveSprmProps( rSprm );
+ break;
+ default:
+ // Tables specific properties have to handled here
+ m_pTablePropsHandler->SetProperties( m_pProperties );
+ bool bRet = m_pTablePropsHandler->sprm( rSprm );
+
+ if ( !bRet )
+ {
+ // The DomainMapper can handle some of the properties
+ m_rDMapper.PushStyleSheetProperties( m_pProperties, true );
+ m_rDMapper.sprm( rSprm );
+ m_rDMapper.PopStyleSheetProperties( true );
+ }
+ }
+}
+
+void TblStylePrHandler::resolveSprmProps(Sprm & rSprm)
+{
+ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+ if( pProperties.get())
+ pProperties->resolve(*this);
+}
+
+}}