fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / writerfilter / source / dmapper / PropertyMapHelper.cxx
blob5021922bd658f74055e7d61cb871fde397854938
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <com/sun/star/text/TableColumnSeparator.hpp>
21 #include <resourcemodel/TagLogger.hxx>
22 #include "PropertyMapHelper.hxx"
24 #if OSL_DEBUG_LEVEL > 1
25 namespace writerfilter
27 namespace dmapper
30 using namespace ::com::sun::star;
32 void lcl_DumpTableColumnSeparators(const TagLogger::Pointer_t pLogger, const uno::Any & rTableColumnSeparators)
34 uno::Sequence<text::TableColumnSeparator> aSeq;
35 rTableColumnSeparators >>= aSeq;
37 pLogger->startElement("property.TableColumnSeparators");
39 sal_uInt32 nLength = aSeq.getLength();
40 for (sal_uInt32 n = 0; n < nLength; ++n)
42 pLogger->startElement("separator");
44 pLogger->attribute("position", aSeq[n].Position);
45 pLogger->attribute("visible", aSeq[n].IsVisible);
47 pLogger->endElement();
50 pLogger->endElement();
53 void lcl_DumpPropertyValues(const TagLogger::Pointer_t pLogger, beans::PropertyValues & rValues)
55 pLogger->startElement("propertyValues");
57 beans::PropertyValue * pValues = rValues.getArray();
59 for (sal_Int32 n = 0; n < rValues.getLength(); ++n)
61 pLogger->startElement("propertyValue");
63 pLogger->attribute("name", pValues[n].Name);
65 try
67 sal_Int32 aInt = 0;
68 pValues[n].Value >>= aInt;
69 pLogger->attribute("value", aInt);
71 catch (...)
75 if ( pValues[n].Name == "TableColumnSeparators" )
77 lcl_DumpTableColumnSeparators(pLogger, pValues[n].Value);
80 pLogger->endElement();
82 pLogger->endElement();
85 void lcl_DumpPropertyValueSeq(const TagLogger::Pointer_t pLogger, PropertyValueSeq_t & rPropValSeq)
87 pLogger->startElement("PropertyValueSeq");
89 beans::PropertyValues * pValues = rPropValSeq.getArray();
91 for (sal_Int32 n = 0; n < rPropValSeq.getLength(); ++n)
93 lcl_DumpPropertyValues(pLogger, pValues[n]);
96 pLogger->endElement();
99 void lcl_DumpPropertyValueSeqSeq(const TagLogger::Pointer_t pLogger, PropertyValueSeqSeq_t rPropValSeqSeq)
101 pLogger->startElement("PropertyValueSeq");
103 PropertyValueSeq_t * pValues = rPropValSeqSeq.getArray();
105 for (sal_Int32 n = 0; n < rPropValSeqSeq.getLength(); ++n)
107 lcl_DumpPropertyValueSeq(pLogger, pValues[n]);
110 pLogger->endElement();
115 #endif // OSL_DEBUG_LEVEL > 1
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */