fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / writerfilter / source / dmapper / TablePropertiesHandler.hxx
blob4c3056940834cf4d7eb0c427e0ac573a9c427a7a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_TABLEPROPERTIESHANDLER_HXX
21 #define INCLUDED_TABLEPROPERTIESHANDLER_HXX
23 #include <PropertyMap.hxx>
25 #include <resourcemodel/TableManager.hxx>
26 #include <WriterFilterDllApi.hxx>
27 #include <resourcemodel/WW8ResourceModel.hxx>
29 #include <boost/shared_ptr.hpp>
31 #include <vector>
33 namespace writerfilter {
34 namespace dmapper {
37 typedef ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > Handle_t;
38 typedef TableManager<Handle_t , TablePropertyMapPtr > DomainMapperTableManager_Base_t;
40 class TablePropertiesHandler
42 private:
43 vector< PropertyMapPtr > m_rPropertiesStack;
44 PropertyMapPtr m_pCurrentProperties;
45 DomainMapperTableManager_Base_t *m_pTableManager;
46 bool m_bOOXML;
48 public:
49 TablePropertiesHandler( bool bOOXML );
50 virtual ~TablePropertiesHandler( );
52 bool sprm(Sprm & sprm);
54 inline void SetTableManager( DomainMapperTableManager_Base_t *pTableManager )
56 m_pTableManager = pTableManager;
59 inline void SetProperties( PropertyMapPtr pProperties )
61 m_pCurrentProperties = pProperties;
64 private:
66 inline void cellProps( TablePropertyMapPtr pProps )
68 if ( m_pTableManager )
69 m_pTableManager->cellProps( pProps );
70 else
71 m_pCurrentProperties->InsertProps(pProps);
74 inline void cellPropsByCell( unsigned int i, TablePropertyMapPtr pProps )
76 if ( m_pTableManager )
77 m_pTableManager->cellPropsByCell( i, pProps );
78 else
79 m_pCurrentProperties->InsertProps(pProps);
82 inline void insertRowProps( TablePropertyMapPtr pProps )
84 if ( m_pTableManager )
85 m_pTableManager->insertRowProps( pProps );
86 else
87 m_pCurrentProperties->InsertProps(pProps);
90 inline void insertTableProps( TablePropertyMapPtr pProps )
92 if ( m_pTableManager )
93 m_pTableManager->insertTableProps( pProps );
94 else
95 m_pCurrentProperties->InsertProps(pProps);
98 typedef boost::shared_ptr<TablePropertiesHandler> TablePropertiesHandlerPtr;
102 #endif
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */