lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / writerfilter / source / dmapper / LatentStyleHandler.cxx
blobdb42aab7e76b49e7d4b9d7077345ebb330eff22c
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/.
8 */
9 #include "LatentStyleHandler.hxx"
10 #include <ooxml/resourceids.hxx>
12 namespace writerfilter
14 namespace dmapper
17 using namespace ::com::sun::star;
19 LatentStyleHandler::LatentStyleHandler() :
20 LoggedProperties("LatentStyleHandler")
24 LatentStyleHandler::~LatentStyleHandler() = default;
26 void LatentStyleHandler::lcl_attribute(Id nId, Value& rVal)
28 beans::PropertyValue aValue;
29 bool bFound = true;
30 switch (nId)
32 case NS_ooxml::LN_CT_LsdException_name:
33 aValue.Name = "name";
34 break;
35 case NS_ooxml::LN_CT_LsdException_locked:
36 aValue.Name = "locked";
37 break;
38 case NS_ooxml::LN_CT_LsdException_uiPriority:
39 aValue.Name = "uiPriority";
40 break;
41 case NS_ooxml::LN_CT_LsdException_semiHidden:
42 aValue.Name = "semiHidden";
43 break;
44 case NS_ooxml::LN_CT_LsdException_unhideWhenUsed:
45 aValue.Name = "unhideWhenUsed";
46 break;
47 case NS_ooxml::LN_CT_LsdException_qFormat:
48 aValue.Name = "qFormat";
49 break;
50 default:
51 bFound = false;
52 #ifdef DEBUG_WRITERFILTER
53 TagLogger::getInstance().element("unhandled");
54 #endif
55 break;
57 if (bFound)
59 aValue.Value <<= rVal.getString();
60 m_aAttributes.push_back(aValue);
65 void LatentStyleHandler::lcl_sprm(Sprm& /*rSprm*/)
69 const std::vector<beans::PropertyValue>& LatentStyleHandler::getAttributes() const
71 return m_aAttributes;
74 } // namespace dmapper
75 } // namespace writerfilter
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */