LibreOffice Module reportdesign (master)  1
xmlAutoStyle.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #include "xmlAutoStyle.hxx"
20 #include "xmlHelper.hxx"
21 #include "xmlExport.hxx"
22 #include <xmloff/families.hxx>
23 
24 namespace rptxml
25 {
26  using namespace ::com::sun::star::uno;
27  using namespace ::com::sun::star::xml::sax;
28 
30  SvXMLAttributeList& rAttrList,
31  XmlStyleFamily nFamily,
32  const ::std::vector< XMLPropertyState >& rProperties,
33  const SvXMLExportPropertyMapper& rPropExp
34  , const SvXMLUnitConverter& rUnitConverter,
35  const SvXMLNamespaceMap& rNamespaceMap
36  ) const
37 {
38  SvXMLAutoStylePoolP::exportStyleAttributes( rAttrList, nFamily, rProperties, rPropExp, rUnitConverter, rNamespaceMap );
39  if ( nFamily != XmlStyleFamily::TABLE_CELL )
40  return;
41 
43  for (const auto& rProp : rProperties)
44  {
45  sal_Int16 nContextID = aPropMapper->GetEntryContextId(rProp.mnIndex);
46  switch (nContextID)
47  {
49  {
50  OUString sAttrValue;
51  if ( rProp.maValue >>= sAttrValue )
52  {
53  if ( !sAttrValue.isEmpty() )
54  {
56  aPropMapper->GetEntryNameSpace(rProp.mnIndex),
57  aPropMapper->GetEntryXMLName(rProp.mnIndex),
58  sAttrValue );
59  }
60  }
61  break;
62  }
63  default:
64  break;
65  }
66  }
67 }
68 
70  SvXMLAutoStylePoolP(rTempORptExport),
71  rORptExport(rTempORptExport)
72 {
73 }
74 
76 {
77 }
78 
79 
80 } // namespace rptxml
81 
82 
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void exportStyleAttributes(SvXMLAttributeList &rAttrList, XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState > &rProperties, const SvXMLExportPropertyMapper &rPropExp, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const
XmlStyleFamily
void AddAttribute(sal_uInt16 nPrefix, const char *pName, const OUString &rValue)
virtual void exportStyleAttributes(SvXMLAttributeList &rAttrList, XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState > &rProperties, const SvXMLExportPropertyMapper &rPropExp, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const override
virtual ~OXMLAutoStylePoolP() override
const rtl::Reference< XMLPropertySetMapper > & GetCellStylePropertyMapper() const
Definition: xmlExport.hxx:153
OXMLAutoStylePoolP(const OXMLAutoStylePoolP &)=delete
#define CTF_RPT_NUMBERFORMAT
Definition: xmlHelper.hxx:29