1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #include <LatentStyleHandler.hxx>
10 #include <ooxml/resourceids.hxx>
11 #include "dmapperLoggers.hxx"
13 namespace writerfilter
18 using namespace ::com::sun::star
;
20 LatentStyleHandler::LatentStyleHandler() :
21 LoggedProperties(dmapper_logger
, "LatentStyleHandler")
25 LatentStyleHandler::~LatentStyleHandler()
29 void LatentStyleHandler::lcl_attribute(Id rName
, Value
& rVal
)
31 beans::PropertyValue aValue
;
35 case NS_ooxml::LN_CT_LsdException_name
:
38 case NS_ooxml::LN_CT_LsdException_locked
:
39 aValue
.Name
= "locked";
41 case NS_ooxml::LN_CT_LsdException_uiPriority
:
42 aValue
.Name
= "uiPriority";
44 case NS_ooxml::LN_CT_LsdException_semiHidden
:
45 aValue
.Name
= "semiHidden";
47 case NS_ooxml::LN_CT_LsdException_unhideWhenUsed
:
48 aValue
.Name
= "unhideWhenUsed";
50 case NS_ooxml::LN_CT_LsdException_qFormat
:
51 aValue
.Name
= "qFormat";
55 #ifdef DEBUG_DOMAINMAPPER
56 dmapper_logger
->element("unhandled");
62 aValue
.Value
= uno::makeAny(rVal
.getString());
63 m_aAttributes
.push_back(aValue
);
68 void LatentStyleHandler::lcl_sprm(Sprm
& /*rSprm*/)
72 uno::Sequence
<beans::PropertyValue
> LatentStyleHandler::getAttributes() const
74 uno::Sequence
<beans::PropertyValue
> aAttributes(m_aAttributes
.size());
75 beans::PropertyValue
* pAttributes
= aAttributes
.getArray();
76 for (std::vector
<beans::PropertyValue
>::const_iterator i
= m_aAttributes
.begin(); i
!= m_aAttributes
.end(); ++i
)
81 } // namespace dmapper
82 } // namespace writerfilter
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */