diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-06-19 12:09:17 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-06-23 10:47:35 +0200 |
commit | e787a84c69b1e557f32de348d2efd5879c7ca222 (patch) | |
tree | f01ea1b72a54e079807024fe708c24a2c7394d73 /oox/inc | |
parent | 15f54549418cbc58d732b9d731c95102896449a0 (diff) |
Move oox/drawingml/table/ internal headers to oox/inc.
Change-Id: I9de33fdcd8b1ef73d57884033f502ac4a03f63d3
Diffstat (limited to 'oox/inc')
-rw-r--r-- | oox/inc/drawingml/table/tablebackgroundstylecontext.hxx | 47 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablecell.hxx | 115 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablecellcontext.hxx | 47 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablecontext.hxx | 48 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablepartstylecontext.hxx | 46 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tableproperties.hxx | 80 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablerow.hxx | 49 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablerowcontext.hxx | 48 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablestyle.hxx | 85 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablestylecellstylecontext.hxx | 46 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablestylecontext.hxx | 47 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablestylelist.hxx | 54 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx | 56 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablestylepart.hxx | 73 | ||||
-rw-r--r-- | oox/inc/drawingml/table/tablestyletextstylecontext.hxx | 47 |
15 files changed, 888 insertions, 0 deletions
diff --git a/oox/inc/drawingml/table/tablebackgroundstylecontext.hxx b/oox/inc/drawingml/table/tablebackgroundstylecontext.hxx new file mode 100644 index 000000000000..ae7872eef787 --- /dev/null +++ b/oox/inc/drawingml/table/tablebackgroundstylecontext.hxx @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEBACKGROUNDSTYLECONTEXT_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEBACKGROUNDSTYLECONTEXT_HXX + +#include <oox/core/contexthandler2.hxx> +#include <drawingml/table/tablestyle.hxx> + +namespace oox { namespace drawingml { namespace table { + +class TableBackgroundStyleContext : public ::oox::core::ContextHandler2 +{ +public: + TableBackgroundStyleContext( ::oox::core::ContextHandler2Helper& rParent, TableStyle& rTableStyle ); + virtual ~TableBackgroundStyleContext(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + + TableStyle& mrTableStyle; +}; + +} } } + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablecell.hxx b/oox/inc/drawingml/table/tablecell.hxx new file mode 100644 index 000000000000..c484ed20ba02 --- /dev/null +++ b/oox/inc/drawingml/table/tablecell.hxx @@ -0,0 +1,115 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX + +#include <oox/helper/propertymap.hxx> +#include <oox/drawingml/color.hxx> +#include <oox/drawingml/drawingmltypes.hxx> +#include <oox/drawingml/lineproperties.hxx> +#include <oox/drawingml/fillproperties.hxx> +#include <oox/drawingml/textliststyle.hxx> +#include <com/sun/star/table/XCell.hpp> + +#include <boost/shared_ptr.hpp> +#include <boost/optional.hpp> +#include <vector> +#include <map> + +namespace oox { namespace drawingml { namespace table { + +class TableCellContext; +class TableProperties; +class TableStyle; + +class TableCell +{ + friend class TableCellContext; + +public: + + TableCell(); + ~TableCell(); + + sal_Int32 getRowSpan() const { return mnRowSpan; }; + void setRowSpan( sal_Int32 nRowSpan ){ mnRowSpan = nRowSpan; }; + sal_Int32 getGridSpan() const { return mnGridSpan; }; + void setGridSpan( sal_Int32 nGridSpan ){ mnGridSpan = nGridSpan; }; + bool gethMerge() const { return mbhMerge; }; + void sethMerge( bool bhMerge ){ mbhMerge = bhMerge; }; + bool getvMerge() const { return mbvMerge; }; + void setvMerge( bool bvMerge ){ mbvMerge = bvMerge; }; + sal_Int32 getLeftMargin() const { return mnMarL; }; + void setLeftMargin( sal_Int32 nMargin ){ mnMarL = nMargin; }; + sal_Int32 getRightMargin() const { return mnMarR; }; + void setRightMargin( sal_Int32 nMargin ){ mnMarR = nMargin; }; + sal_Int32 getTopMargin() const { return mnMarT; }; + void setTopMargin( sal_Int32 nMargin ){ mnMarT = nMargin; }; + sal_Int32 getBottomMargin() const { return mnMarB; }; + void setBottomMargin( sal_Int32 nMargin ){ mnMarB = nMargin; }; + sal_Int32 getVertToken() const { return mnVertToken; }; + void setVertToken( sal_Int32 nToken ){ mnVertToken = nToken; }; + sal_Int32 getAnchorToken() const { return mnAnchorToken; }; + void setAnchorToken( sal_Int32 nToken ){ mnAnchorToken = nToken; }; + bool getAnchorCtr() const { return mbAnchorCtr; }; + void setAnchorCtr( bool bAnchorCtr ){ mbAnchorCtr = bAnchorCtr; }; + sal_Int32 getHorzOverflowToken() const { return mnHorzOverflowToken; }; + void setHorzOverflowToken( sal_Int32 nToken ){ mnHorzOverflowToken = nToken; }; + + void setTextBody( const oox::drawingml::TextBodyPtr& pTextBody ){ mpTextBody = pTextBody; }; + oox::drawingml::TextBodyPtr getTextBody(){ return mpTextBody; }; + + void pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oox::drawingml::TextListStylePtr pMasterTextListStyle, + const ::com::sun::star::uno::Reference < ::com::sun::star::table::XCell >& rxCell, const TableProperties& rTableProperties, + const TableStyle& rTable, sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow ); + +private: + + oox::drawingml::TextBodyPtr mpTextBody; + + oox::drawingml::LineProperties maLinePropertiesLeft; + oox::drawingml::LineProperties maLinePropertiesRight; + oox::drawingml::LineProperties maLinePropertiesTop; + oox::drawingml::LineProperties maLinePropertiesBottom; + oox::drawingml::LineProperties maLinePropertiesTopLeftToBottomRight; + oox::drawingml::LineProperties maLinePropertiesBottomLeftToTopRight; + + oox::drawingml::FillProperties maFillProperties; + + sal_Int32 mnRowSpan; + sal_Int32 mnGridSpan; + bool mbhMerge; + bool mbvMerge; + + sal_Int32 mnMarL; + sal_Int32 mnMarR; + sal_Int32 mnMarT; + sal_Int32 mnMarB; + sal_Int32 mnVertToken; + sal_Int32 mnAnchorToken; + bool mbAnchorCtr; + sal_Int32 mnHorzOverflowToken; +}; + +} } } + +#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablecellcontext.hxx b/oox/inc/drawingml/table/tablecellcontext.hxx new file mode 100644 index 000000000000..0ad58d3ca419 --- /dev/null +++ b/oox/inc/drawingml/table/tablecellcontext.hxx @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLECELLCONTEXT_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLECELLCONTEXT_HXX + +#include <oox/drawingml/shapecontext.hxx> +#include <drawingml/table/tablecell.hxx> + +namespace oox { namespace drawingml { namespace table { + +class TableCellContext : public ::oox::core::ContextHandler2 +{ +public: + TableCellContext( ::oox::core::ContextHandler2Helper& rParent, + const ::oox::AttributeList& rAttribs, TableCell& rTableCell ); + virtual ~TableCellContext(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + + TableCell& mrTableCell; +}; + +} } } + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablecontext.hxx b/oox/inc/drawingml/table/tablecontext.hxx new file mode 100644 index 000000000000..dfd8de061272 --- /dev/null +++ b/oox/inc/drawingml/table/tablecontext.hxx @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLECONTEXT_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLECONTEXT_HXX + +#include <oox/drawingml/shapecontext.hxx> + +namespace oox { namespace drawingml { namespace table { + +class TableProperties; + +class TableContext : public ShapeContext +{ +public: + TableContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pShapePtr ); + virtual ~TableContext(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + + TableProperties& mrTableProperties; +}; + +} } } + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablepartstylecontext.hxx b/oox/inc/drawingml/table/tablepartstylecontext.hxx new file mode 100644 index 000000000000..3b9fab2cc427 --- /dev/null +++ b/oox/inc/drawingml/table/tablepartstylecontext.hxx @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEPARTSTYLECONTEXT_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEPARTSTYLECONTEXT_HXX + +#include <oox/core/contexthandler2.hxx> +#include <drawingml/table/tablestylepart.hxx> + +namespace oox { namespace drawingml { namespace table { + +class TablePartStyleContext : public ::oox::core::ContextHandler2 +{ +public: + TablePartStyleContext( ::oox::core::ContextHandler2Helper& rParent, TableStylePart& rTableStylePart ); + virtual ~TablePartStyleContext(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + + TableStylePart& mrTableStylePart; +}; + +} } } + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tableproperties.hxx b/oox/inc/drawingml/table/tableproperties.hxx new file mode 100644 index 000000000000..ea03f7509adb --- /dev/null +++ b/oox/inc/drawingml/table/tableproperties.hxx @@ -0,0 +1,80 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX + +#include <drawingml/table/tablerow.hxx> +#include <drawingml/table/tablestyle.hxx> +#include <oox/helper/propertymap.hxx> +#include <oox/drawingml/color.hxx> + +#include <boost/shared_ptr.hpp> +#include <boost/optional.hpp> +#include <vector> +#include <map> + +namespace oox { namespace drawingml { namespace table { + +class TableProperties +{ +public: + + TableProperties(); + ~TableProperties(); + + std::vector< sal_Int32 >& getTableGrid() { return mvTableGrid; }; + std::vector< TableRow >& getTableRows() { return mvTableRows; }; + + OUString& getStyleId(){ return maStyleId; }; + boost::shared_ptr< TableStyle >& getTableStyle(){ return mpTableStyle; }; + bool& isRtl(){ return mbRtl; }; + bool& isFirstRow(){ return mbFirstRow; }; + bool& isFirstCol(){ return mbFirstCol; }; + bool& isLastRow(){ return mbLastRow; }; + bool& isLastCol(){ return mbLastCol; }; + bool& isBandRow(){ return mbBandRow; }; + bool& isBandCol(){ return mbBandCol; }; + + void pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBase, + const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet, ::oox::drawingml::TextListStylePtr pMasterTextListStyle ); + +private: + + const TableStyle& getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase, bool &isCreateTabStyle); + + OUString maStyleId; // either StyleId is available + boost::shared_ptr< TableStyle > mpTableStyle; // or the complete TableStyle + std::vector< sal_Int32 > mvTableGrid; + std::vector< TableRow > mvTableRows; + + bool mbRtl; + bool mbFirstRow; + bool mbFirstCol; + bool mbLastRow; + bool mbLastCol; + bool mbBandRow; + bool mbBandCol; +}; + +} } } + +#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablerow.hxx b/oox/inc/drawingml/table/tablerow.hxx new file mode 100644 index 000000000000..29bc2d1457c5 --- /dev/null +++ b/oox/inc/drawingml/table/tablerow.hxx @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEROW_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEROW_HXX + +#include <drawingml/table/tablecell.hxx> +#include <vector> + +namespace oox { namespace drawingml { namespace table { + +class TableRow +{ +public: + + TableRow(); + ~TableRow(); + + void setHeight( sal_Int32 nHeight ){ mnHeight = nHeight; }; + sal_Int32 getHeight() const { return mnHeight; }; + std::vector< TableCell >& getTableCells() { return mvTableCells; }; + +private: + + sal_Int32 mnHeight; + std::vector< TableCell > mvTableCells; +}; + +} } } + +#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLEROW_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablerowcontext.hxx b/oox/inc/drawingml/table/tablerowcontext.hxx new file mode 100644 index 000000000000..5482706a8caa --- /dev/null +++ b/oox/inc/drawingml/table/tablerowcontext.hxx @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEROWCONTEXT_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEROWCONTEXT_HXX + +#include <oox/core/contexthandler2.hxx> + +namespace oox { namespace drawingml { namespace table { + +class TableRow; + +class TableRowContext : public ::oox::core::ContextHandler2 +{ +public: + TableRowContext( ::oox::core::ContextHandler2Helper& rParent, + const ::oox::AttributeList& rAttribs, TableRow& rTableRow ); + virtual ~TableRowContext(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + + TableRow& mrTableRow; +}; + +} } } + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablestyle.hxx b/oox/inc/drawingml/table/tablestyle.hxx new file mode 100644 index 000000000000..a0d1044a0e19 --- /dev/null +++ b/oox/inc/drawingml/table/tablestyle.hxx @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLE_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLE_HXX + +#include <drawingml/table/tablestylepart.hxx> +#include <oox/drawingml/drawingmltypes.hxx> +#include <oox/drawingml/shape.hxx> + +namespace oox { namespace drawingml { namespace table { + +class TableStyle +{ +public: + + TableStyle(); + ~TableStyle(); + + OUString& getStyleId(){ return maStyleId; } + OUString& getStyleName() { return maStyleName; } + + ::oox::drawingml::ShapeStyleRef& getBackgroundFillStyleRef(){ return maFillStyleRef; } + + ::oox::drawingml::FillPropertiesPtr& getBackgroundFillProperties(){ return mpFillProperties; } + + TableStylePart& getWholeTbl() { return maWholeTbl; } + TableStylePart& getBand1H() { return maBand1H; } + TableStylePart& getBand2H() { return maBand2H; } + TableStylePart& getBand1V() { return maBand1V; } + TableStylePart& getBand2V() { return maBand2V; } + TableStylePart& getLastCol() { return maLastCol; } + TableStylePart& getFirstCol() { return maFirstCol; } + TableStylePart& getLastRow() { return maLastRow; } + TableStylePart& getSeCell() { return maSeCell; } + TableStylePart& getSwCell() { return maSwCell; } + TableStylePart& getFirstRow() { return maFirstRow; } + TableStylePart& getNeCell() { return maNeCell; } + TableStylePart& getNwCell() { return maNwCell; } + +private: + + OUString maStyleId; + OUString maStyleName; + + ::oox::drawingml::ShapeStyleRef maFillStyleRef; + + ::oox::drawingml::FillPropertiesPtr mpFillProperties; + + TableStylePart maWholeTbl; + TableStylePart maBand1H; + TableStylePart maBand2H; + TableStylePart maBand1V; + TableStylePart maBand2V; + TableStylePart maLastCol; + TableStylePart maFirstCol; + TableStylePart maLastRow; + TableStylePart maSeCell; + TableStylePart maSwCell; + TableStylePart maFirstRow; + TableStylePart maNeCell; + TableStylePart maNwCell; +}; + +} } } + +#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablestylecellstylecontext.hxx b/oox/inc/drawingml/table/tablestylecellstylecontext.hxx new file mode 100644 index 000000000000..4d4844a978e7 --- /dev/null +++ b/oox/inc/drawingml/table/tablestylecellstylecontext.hxx @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECELLSTYLECONTEXT_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECELLSTYLECONTEXT_HXX + +#include <oox/core/contexthandler2.hxx> +#include <drawingml/table/tablestylepart.hxx> + +namespace oox { namespace drawingml { namespace table { + +class TableStyleCellStyleContext : public ::oox::core::ContextHandler2 +{ +public: + TableStyleCellStyleContext( ::oox::core::ContextHandler2Helper& rParent, TableStylePart& rTableStylePart ); + virtual ~TableStyleCellStyleContext(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + TableStylePart& mrTableStylePart; + sal_Int32 mnLineType; +}; + +} } } + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablestylecontext.hxx b/oox/inc/drawingml/table/tablestylecontext.hxx new file mode 100644 index 000000000000..cf98c0e961ee --- /dev/null +++ b/oox/inc/drawingml/table/tablestylecontext.hxx @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECONTEXT_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECONTEXT_HXX + +#include <oox/core/contexthandler2.hxx> +#include <drawingml/table/tablestyle.hxx> + +namespace oox { namespace drawingml { namespace table { + +class TableStyleContext : public ::oox::core::ContextHandler2 +{ +public: + TableStyleContext( ::oox::core::ContextHandler2Helper& rParent, + const ::oox::AttributeList& rAttribs, + TableStyle& rTableStyle ); + virtual ~TableStyleContext(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + TableStyle& mrTableStyle; +}; + +} } } + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablestylelist.hxx b/oox/inc/drawingml/table/tablestylelist.hxx new file mode 100644 index 000000000000..624a453ded19 --- /dev/null +++ b/oox/inc/drawingml/table/tablestylelist.hxx @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELIST_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELIST_HXX + +#include <rtl/ustring.hxx> +#include <boost/shared_ptr.hpp> +#include <vector> + +namespace oox { namespace drawingml { namespace table { + +class TableStyle; + +class TableStyleList +{ +public: + + TableStyleList(); + ~TableStyleList(); + + OUString& getDefaultStyleId() { return maDefaultStyleId; }; + std::vector< TableStyle >& getTableStyles(){ return maTableStyles; }; + +private: + + OUString maDefaultStyleId; + std::vector< TableStyle > maTableStyles; + +}; + +typedef boost::shared_ptr< TableStyleList > TableStyleListPtr; + +} } } + +#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELIST_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx b/oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx new file mode 100644 index 000000000000..0e7521ae4496 --- /dev/null +++ b/oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELISTFRAGMENTHANDLER_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELISTFRAGMENTHANDLER_HXX + +#include <drawingml/table/tablestylelist.hxx> +#include <oox/core/fragmenthandler2.hxx> + +namespace oox { +namespace drawingml { +namespace table { + + + +class TableStyleListFragmentHandler : public ::oox::core::FragmentHandler2 +{ +public: + explicit TableStyleListFragmentHandler( + ::oox::core::XmlFilterBase& rFilter, + const OUString& rFragmentPath, + TableStyleList& rTableStyleList ); + virtual ~TableStyleListFragmentHandler(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + + TableStyleList& mrTableStyleList; +}; + + + +} // namespace table +} // namespace drawingml +} // namespace oox + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablestylepart.hxx b/oox/inc/drawingml/table/tablestylepart.hxx new file mode 100644 index 000000000000..7177deb5b982 --- /dev/null +++ b/oox/inc/drawingml/table/tablestylepart.hxx @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX + +#include <rtl/ustring.hxx> +#include <boost/optional.hpp> +#include <oox/drawingml/color.hxx> +#include <oox/drawingml/textfont.hxx> +#include <oox/drawingml/fillproperties.hxx> +#include <oox/drawingml/lineproperties.hxx> +#include <oox/drawingml/shape.hxx> +#include <map> + +namespace oox { namespace drawingml { namespace table { + +class TableStylePart +{ +public: + + TableStylePart(); + ~TableStylePart(); + + ::oox::drawingml::Color& getTextColor(){ return maTextColor; } + ::boost::optional< bool >& getTextBoldStyle(){ return maTextBoldStyle; } + ::boost::optional< bool >& getTextItalicStyle(){ return maTextItalicStyle; } + ::oox::drawingml::TextFont& getAsianFont(){ return maAsianFont; } + ::oox::drawingml::TextFont& getComplexFont(){ return maComplexFont; } + ::oox::drawingml::TextFont& getSymbolFont(){ return maSymbolFont; } + ::oox::drawingml::TextFont& getLatinFont(){ return maLatinFont; } + + ::oox::drawingml::FillPropertiesPtr& getFillProperties(){ return mpFillProperties; } + std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >& getLineBorders(){ return maLineBorders; } + + ::oox::drawingml::ShapeStyleRefMap& getStyleRefs(){ return maStyleRefs; } + +private: + + ::oox::drawingml::Color maTextColor; + ::boost::optional< bool > maTextBoldStyle; + ::boost::optional< bool > maTextItalicStyle; + ::oox::drawingml::TextFont maAsianFont; + ::oox::drawingml::TextFont maComplexFont; + ::oox::drawingml::TextFont maSymbolFont; + ::oox::drawingml::TextFont maLatinFont; + + ::oox::drawingml::FillPropertiesPtr mpFillProperties; + std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr > maLineBorders; + ::oox::drawingml::ShapeStyleRefMap maStyleRefs; +}; + +} } } + +#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/drawingml/table/tablestyletextstylecontext.hxx b/oox/inc/drawingml/table/tablestyletextstylecontext.hxx new file mode 100644 index 000000000000..567afd57b5bb --- /dev/null +++ b/oox/inc/drawingml/table/tablestyletextstylecontext.hxx @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLETEXTSTYLECONTEXT_HXX +#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLETEXTSTYLECONTEXT_HXX + +#include <oox/core/contexthandler.hxx> +#include <drawingml/table/tablestylepart.hxx> + +namespace oox { namespace drawingml { namespace table { + +class TableStyleTextStyleContext : public ::oox::core::ContextHandler2 +{ +public: + TableStyleTextStyleContext( ::oox::core::ContextHandler2Helper& rParent, + const ::oox::AttributeList& rAttribs, + TableStylePart& rTableStylePart ); + virtual ~TableStyleTextStyleContext(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + TableStylePart& mrTableStylePart; +}; + +} } } + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |