27#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
28#include <com/sun/star/container/XNameContainer.hpp>
33#include <osl/diagnose.h>
55 virtual bool handleSpecialItem(
57 ::std::vector< XMLPropertyState >& ,
90 if (
GetFamily() == XmlStyleFamily::TABLE_CELL )
101 FindStyleChildContext(XmlStyleFamily::DATA_STYLE,
m_sDataStyleName,
true)));
103 OSL_FAIL(
"not possible to get style");
125 OSL_ENSURE(
nIndex != -1,
"Property not found in Map");
131 const OUString& rValue )
147 const bool bTempAutoStyles ) :
150 m_nNumberFormatIndex(-1),
151 bAutoStyles(bTempAutoStyles)
166 GetImport().GetTextImport()->SetAutoStyles(
this );
168 GetImport().GetStyles()->CopyStylesToDoc(
true);
183 case XmlStyleFamily::TABLE_CELL:
195 case XmlStyleFamily::TABLE_COLUMN:
204 case XmlStyleFamily::TABLE_ROW:
211 case XmlStyleFamily::TABLE_TABLE:
231 const uno::Reference< xml::sax::XFastAttributeList > & )
235 case XmlStyleFamily::SD_GRAPHICS_ID:
245 const Reference< xml::sax::XFastAttributeList > & xAttrList )
253 case XmlStyleFamily::TABLE_TABLE:
254 case XmlStyleFamily::TABLE_COLUMN:
255 case XmlStyleFamily::TABLE_ROW:
256 case XmlStyleFamily::TABLE_CELL:
260 OSL_FAIL(
"OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. Please check.");
268Reference < XNameContainer >
277 case XmlStyleFamily::TABLE_TABLE:
282 sName =
"TableStyles";
285 case XmlStyleFamily::TABLE_CELL:
290 sName =
"CellStyles";
293 case XmlStyleFamily::TABLE_COLUMN:
298 sName =
"ColumnStyles";
301 case XmlStyleFamily::TABLE_ROW:
309 case XmlStyleFamily::SD_GRAPHICS_ID:
313 OSL_FAIL(
"OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. Please check.");
318 Reference< XStyleFamiliesSupplier > xFamiliesSupp(
320 if (xFamiliesSupp.is())
322 Reference< XNameAccess > xFamilies(xFamiliesSupp->getStyleFamilies());
324 xStyles.set(xFamilies->getByName(
sName ), uno::UNO_QUERY);
327 case XmlStyleFamily::TABLE_TABLE:
330 case XmlStyleFamily::TABLE_CELL:
333 case XmlStyleFamily::TABLE_COLUMN:
336 case XmlStyleFamily::TABLE_ROW:
357 case XmlStyleFamily::TABLE_TABLE:
360 case XmlStyleFamily::TABLE_COLUMN:
363 case XmlStyleFamily::TABLE_ROW:
366 case XmlStyleFamily::TABLE_CELL:
const SvXMLImport & m_rImport
constexpr OUStringLiteral sServiceName
SvXMLImport & GetImport()
friend friend class SvXMLImport
XmlStyleFamily GetFamily() const
bool IsDefaultStyle() const
const SvXMLStyleContext * FindStyleChildContext(XmlStyleFamily nFamily, const OUString &rName, bool bCreateIndex=false) const
virtual css::uno::Reference< css::container::XNameContainer > GetStylesContainer(XmlStyleFamily nFamily) const
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(XmlStyleFamily nFamily) const
virtual SvXMLStyleContext * CreateStyleStyleChildContext(XmlStyleFamily nFamily, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
virtual OUString GetServiceName(XmlStyleFamily nFamily) const
virtual void FillPropertySet(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
const ::std::vector< XMLPropertyState > & GetProperties() const
virtual void SetAttribute(sal_Int32 nElement, const OUString &rValue) override
static SvXMLImportPropertyMapper * CreateParaExtPropMapper(SvXMLImport &)
virtual void SetDefaults() override
OControlStyleContext(const OControlStyleContext &)=delete
virtual void FillPropertySet(const css::uno::Reference< css::beans::XPropertySet > &rPropSet) override
void AddProperty(sal_Int16 nContextID, const css::uno::Any &aValue)
OUString m_sDataStyleName
sal_Int32 m_nNumberFormat
virtual void SetAttribute(sal_Int32 nElement, const OUString &rValue) override
SvXMLStylesContext * pStyles
virtual ~OControlStyleContext() override
virtual OUString GetServiceName(XmlStyleFamily nFamily) const override
virtual css::uno::Reference< css::container::XNameContainer > GetStylesContainer(XmlStyleFamily nFamily) const override
rtl::Reference< SvXMLImportPropertyMapper > m_xColumnImpPropMapper
css::uno::Reference< css::container::XNameContainer > m_xTableStyles
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual SvXMLStyleContext * CreateStyleStyleChildContext(XmlStyleFamily nFamily, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual SvXMLStyleContext * CreateDefaultStyleStyleChildContext(XmlStyleFamily nFamily, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~OReportStylesContext() override
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(XmlStyleFamily nFamily) const override
ORptFilter & GetOwnImport() const
css::uno::Reference< css::container::XNameContainer > m_xCellStyles
rtl::Reference< SvXMLImportPropertyMapper > m_xTableImpPropMapper
sal_Int32 GetIndex(const sal_Int16 nContextID)
css::uno::Reference< css::container::XNameContainer > m_xRowStyles
rtl::Reference< SvXMLImportPropertyMapper > m_xCellImpPropMapper
OReportStylesContext(const OReportStylesContext &)=delete
rtl::Reference< SvXMLImportPropertyMapper > m_xRowImpPropMapper
sal_Int32 m_nNumberFormatIndex
css::uno::Reference< css::container::XNameContainer > m_xColumnStyles
const rtl::Reference< XMLPropertySetMapper > & GetColumnStylesPropertySetMapper() const
const rtl::Reference< XMLPropertySetMapper > & GetCellStylesPropertySetMapper() const
const rtl::Reference< XMLPropertySetMapper > & GetRowStylesPropertySetMapper() const
static const XMLPropertyMapEntry * GetTableStyleProps()
constexpr OUStringLiteral XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME
constexpr OUStringLiteral XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME
constexpr OUStringLiteral XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME
constexpr OUStringLiteral XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME
#define CTF_RPT_NUMBERFORMAT
constexpr sal_Int32 TOKEN_MASK