LibreOffice Module xmloff (master) 1
xmlexppr.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
20#include <memory>
21#include <optional>
22#include <string_view>
23#include <com/sun/star/container/XNameContainer.hpp>
24#include <com/sun/star/xml/AttributeData.hpp>
25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/beans/XPropertyState.hpp>
27#include <com/sun/star/beans/XMultiPropertySet.hpp>
28#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
29#include <com/sun/star/beans/TolerantPropertySetResultType.hpp>
30#include <rtl/ustrbuf.hxx>
33#include <osl/diagnose.h>
34#include <list>
35#include <map>
37
38#include <utility>
39#include <xmloff/xmlexppr.hxx>
40#include <xmloff/xmltoken.hxx>
41#include <xmloff/attrlist.hxx>
44#include <xmloff/xmlexp.hxx>
45#include <xmloff/xmlprmap.hxx>
46#include <xmloff/maptype.hxx>
47#include <xmloff/xmltypes.hxx>
48#include <xmloff/xmlprhdl.hxx>
49
50using namespace ::std;
51using namespace ::com::sun::star;
52using namespace ::com::sun::star::beans;
53using namespace ::com::sun::star::uno;
54using namespace ::com::sun::star::lang;
55using namespace ::xmloff::token;
56
57#define GET_PROP_TYPE( f ) static_cast<sal_uInt16>((f & XML_TYPE_PROP_MASK) >> XML_TYPE_PROP_SHIFT)
58#define ENTRY(t) { GET_PROP_TYPE(XML_TYPE_PROP_##t), XML_##t##_PROPERTIES }
59
60namespace {
61
62struct XMLPropTokens_Impl
63{
64 sal_uInt16 nType;
66};
67
68const sal_uInt16 MAX_PROP_TYPES =
71
72XMLPropTokens_Impl const aPropTokens[MAX_PROP_TYPES] =
73{
74 ENTRY(CHART),
76 ENTRY(TABLE),
80 ENTRY(LIST_LEVEL),
82 ENTRY(TEXT),
84 ENTRY(PAGE_LAYOUT),
86 ENTRY(RUBY),
88};
89
90// public methods
91
92// Take all properties of the XPropertySet which are also found in the
93// XMLPropertyMapEntry-array and which are not set to their default-value,
94// if a state is available.
95// After that I call the method 'ContextFilter'.
96
97struct ComparePropertyState
98{
99 bool operator()(XMLPropertyState const& lhs, XMLPropertyState const& rhs)
100 {
101 return lhs.mnIndex < rhs.mnIndex;
102 }
103};
104class XMLPropertyStates_Impl
105{
107public:
108 XMLPropertyStates_Impl();
109 void AddPropertyState(const XMLPropertyState& rPropState);
110 void FillPropertyStateVector(std::vector<XMLPropertyState>& rVector);
111};
112
113XMLPropertyStates_Impl::XMLPropertyStates_Impl()
114{
115}
116
117void XMLPropertyStates_Impl::AddPropertyState(
118 const XMLPropertyState& rPropState)
119{
120 aPropStates.insert(rPropState);
121}
122
123void XMLPropertyStates_Impl::FillPropertyStateVector(
124 std::vector<XMLPropertyState>& rVector)
125{
126 rVector.insert( rVector.begin(), aPropStates.begin(), aPropStates.end() );
127}
128
129class FilterPropertyInfo_Impl
130{
131 OUString msApiName;
132 std::vector<sal_uInt32> maIndexes;
133
134public:
135
136 FilterPropertyInfo_Impl( OUString aApiName,
137 const sal_uInt32 nIndex);
138
139 const OUString& GetApiName() const { return msApiName; }
140 std::vector<sal_uInt32>& GetIndexes() { return maIndexes; }
141
142 // for sort
143 bool operator< ( const FilterPropertyInfo_Impl& rArg ) const
144 {
145 return (GetApiName() < rArg.GetApiName());
146 }
147};
148
149FilterPropertyInfo_Impl::FilterPropertyInfo_Impl(
150 OUString aApiName,
151 const sal_uInt32 nIndex ) :
152 msApiName(std::move( aApiName ))
153{
154 maIndexes.push_back(nIndex);
155}
156
157typedef std::list<FilterPropertyInfo_Impl> FilterPropertyInfoList_Impl;
158
159class FilterPropertiesInfo_Impl
160{
161 FilterPropertyInfoList_Impl aPropInfos;
162
163 std::optional<Sequence<OUString>> mxApiNames;
164
165public:
166 FilterPropertiesInfo_Impl();
167
168 void AddProperty(const OUString& rApiName, const sal_uInt32 nIndex);
169 const uno::Sequence<OUString>& GetApiNames();
170 void FillPropertyStateArray(
171 vector< XMLPropertyState >& rPropStates,
172 const Reference< XPropertySet >& xPropSet,
173 const rtl::Reference< XMLPropertySetMapper >& maPropMapper,
174 const bool bDefault);
175 sal_uInt32 GetPropertyCount() const { return aPropInfos.size(); }
176};
177
178FilterPropertiesInfo_Impl::FilterPropertiesInfo_Impl()
179{
180}
181
182void FilterPropertiesInfo_Impl::AddProperty(
183 const OUString& rApiName, const sal_uInt32 nIndex)
184{
185 aPropInfos.emplace_back(rApiName, nIndex);
186
187 OSL_ENSURE( !mxApiNames, "performance warning: API names already retrieved" );
188 mxApiNames.reset();
189}
190
191const uno::Sequence<OUString>& FilterPropertiesInfo_Impl::GetApiNames()
192{
193 if( !mxApiNames )
194 {
195 // we have to do three things:
196 // 1) sort API names,
197 // 2) merge duplicates,
198 // 3) construct sequence
199
200 // sort names
201 aPropInfos.sort();
202
203 // merge duplicates
204 if ( aPropInfos.size() > 1 )
205 {
206 FilterPropertyInfoList_Impl::iterator aOld = aPropInfos.begin();
207 FilterPropertyInfoList_Impl::iterator aEnd = aPropInfos.end();
208 FilterPropertyInfoList_Impl::iterator aCurrent = aOld;
209 ++aCurrent;
210
211 while ( aCurrent != aEnd )
212 {
213 // equal to next element?
214 if ( aOld->GetApiName() == aCurrent->GetApiName() )
215 {
216 // if equal: merge index lists
217 std::vector<sal_uInt32> aMerged;
218 std::merge(aOld->GetIndexes().begin(), aOld->GetIndexes().end(),
219 aCurrent->GetIndexes().begin(), aCurrent->GetIndexes().end(),
220 std::back_inserter(aMerged));
221 aOld->GetIndexes() = std::move(aMerged);
222 aCurrent->GetIndexes().clear();
223 // erase element, and continue with next
224 aCurrent = aPropInfos.erase( aCurrent );
225 }
226 else
227 {
228 // remember old element and continue with next
229 aOld = aCurrent;
230 ++aCurrent;
231 }
232 }
233 }
234
235 // construct sequence
236 mxApiNames.emplace( aPropInfos.size() );
237 OUString *pNames = mxApiNames->getArray();
238
239 for (auto const& propInfo : aPropInfos)
240 {
241 *pNames = propInfo.GetApiName();
242 ++pNames;
243 }
244 }
245
246 return *mxApiNames;
247}
248
249void FilterPropertiesInfo_Impl::FillPropertyStateArray(
250 vector< XMLPropertyState >& rPropStates,
251 const Reference< XPropertySet >& rPropSet,
253 const bool bDefault )
254{
255 XMLPropertyStates_Impl aPropStates;
256
257 const uno::Sequence<OUString>& rApiNames = GetApiNames();
258
259 Reference < XTolerantMultiPropertySet > xTolPropSet( rPropSet, UNO_QUERY );
260 if (xTolPropSet.is())
261 {
262 if (!bDefault)
263 {
264 Sequence < beans::GetDirectPropertyTolerantResult > aResults(xTolPropSet->getDirectPropertyValuesTolerant(rApiNames));
265 sal_Int32 nResultCount(aResults.getLength());
266 if (nResultCount > 0)
267 {
268 const beans::GetDirectPropertyTolerantResult *pResults = aResults.getConstArray();
269 FilterPropertyInfoList_Impl::iterator aPropIter(aPropInfos.begin());
270 XMLPropertyState aNewProperty( -1 );
271 while (nResultCount > 0 && aPropIter != aPropInfos.end())
272 {
273 if (pResults->Name == aPropIter->GetApiName())
274 {
275 aNewProperty.mnIndex = -1;
276 aNewProperty.maValue = pResults->Value;
277
278 for (auto const& index : aPropIter->GetIndexes())
279 {
280 aNewProperty.mnIndex = index;
281 aPropStates.AddPropertyState( aNewProperty );
282 }
283 ++pResults;
284 --nResultCount;
285 }
286 ++aPropIter;
287 }
288 }
289 }
290 else
291 {
292 const Sequence < beans::GetPropertyTolerantResult > aResults(xTolPropSet->getPropertyValuesTolerant(rApiNames));
293 OSL_ENSURE( rApiNames.getLength() == aResults.getLength(), "wrong implemented XTolerantMultiPropertySet" );
294 FilterPropertyInfoList_Impl::iterator aPropIter(aPropInfos.begin());
295 XMLPropertyState aNewProperty( -1 );
296 OSL_ENSURE( aPropInfos.size() == static_cast<sal_uInt32>(aResults.getLength()), "wrong implemented XTolerantMultiPropertySet??" );
297 for( const auto& rResult : aResults )
298 {
299 if ((rResult.Result == beans::TolerantPropertySetResultType::SUCCESS) &&
300 ((rResult.State == PropertyState_DIRECT_VALUE) || (rResult.State == PropertyState_DEFAULT_VALUE)))
301 {
302 aNewProperty.mnIndex = -1;
303 aNewProperty.maValue = rResult.Value;
304
305 for (auto const& index : aPropIter->GetIndexes())
306 {
307 aNewProperty.mnIndex = index;
308 aPropStates.AddPropertyState( aNewProperty );
309 }
310 }
311 ++aPropIter;
312 }
313 }
314 }
315 else
316 {
317 Sequence < PropertyState > aStates;
318 const PropertyState *pStates = nullptr;
319 Reference< XPropertyState > xPropState( rPropSet, UNO_QUERY );
320 if( xPropState.is() )
321 {
322 aStates = xPropState->getPropertyStates( rApiNames );
323 pStates = aStates.getConstArray();
324 }
325
326 Reference < XMultiPropertySet > xMultiPropSet( rPropSet, UNO_QUERY );
327 if( xMultiPropSet.is() && !bDefault )
328 {
329 Sequence < Any > aValues;
330 if( pStates )
331 {
332 // step 1: get value count
333 sal_uInt32 nValueCount = 0;
334
335 for (size_t i = 0; i < aPropInfos.size(); ++i, ++pStates)
336 {
337 if( *pStates == PropertyState_DIRECT_VALUE )
338 nValueCount++;
339 }
340
341 if( nValueCount )
342 {
343 // step 2: collect property names
344 Sequence < OUString > aAPINames( nValueCount );
345 OUString *pAPINames = aAPINames.getArray();
346
347 ::std::vector< FilterPropertyInfoList_Impl::iterator > aPropIters;
348 aPropIters.reserve( nValueCount );
349
350 FilterPropertyInfoList_Impl::iterator aItr = aPropInfos.begin();
351 OSL_ENSURE(aItr != aPropInfos.end(),"Invalid iterator!");
352
353 pStates = aStates.getConstArray();
354 sal_uInt32 i = 0;
355 while( i < nValueCount )
356 {
357 if( *pStates == PropertyState_DIRECT_VALUE )
358 {
359 *pAPINames++ = aItr->GetApiName();
360 aPropIters.push_back( aItr );
361 ++i;
362 }
363 ++aItr;
364 ++pStates;
365 }
366
367 aValues = xMultiPropSet->getPropertyValues( aAPINames );
368 const Any *pValues = aValues.getConstArray();
369
370 ::std::vector< FilterPropertyInfoList_Impl::iterator >::const_iterator
371 pPropIter = aPropIters.begin();
372
373 XMLPropertyState aNewProperty( -1 );
374 for( i = 0; i < nValueCount; ++i )
375 {
376 aNewProperty.mnIndex = -1;
377 aNewProperty.maValue = *pValues;
378
379 for (auto const& index : (*pPropIter)->GetIndexes())
380 {
381 aNewProperty.mnIndex = index;
382 aPropStates.AddPropertyState( aNewProperty );
383 }
384
385 ++pPropIter;
386 ++pValues;
387 }
388 }
389 }
390 else
391 {
392 aValues = xMultiPropSet->getPropertyValues( rApiNames );
393 const Any *pValues = aValues.getConstArray();
394
395 FilterPropertyInfoList_Impl::iterator aItr = aPropInfos.begin();
396 for (size_t i = 0; i < aPropInfos.size(); ++i)
397 {
398 // The value is stored in the PropertySet itself, add to list.
399 XMLPropertyState aNewProperty( -1 );
400 aNewProperty.maValue = *pValues;
401 ++pValues;
402 for (auto const& index : aItr->GetIndexes())
403 {
404 aNewProperty.mnIndex = index;
405 aPropStates.AddPropertyState( aNewProperty );
406 }
407 ++aItr;
408 }
409 }
410 }
411 else
412 {
413 FilterPropertyInfoList_Impl::iterator aItr = aPropInfos.begin();
414 for (size_t i = 0; i < aPropInfos.size(); ++i)
415 {
416 bool bDirectValue =
417 !pStates || *pStates == PropertyState_DIRECT_VALUE;
418 if( bDirectValue || bDefault )
419 {
420 // The value is stored in the PropertySet itself, add to list.
421 bool bGotValue = false;
422 XMLPropertyState aNewProperty( -1 );
423 for (auto const& index : aItr->GetIndexes())
424 {
425 if( bDirectValue ||
426 (rPropMapper->GetEntryFlags(index) &
428 {
429 try
430 {
431 if( !bGotValue )
432 {
433 aNewProperty.maValue =
434 rPropSet->getPropertyValue( aItr->GetApiName() );
435 bGotValue = true;
436 }
437 aNewProperty.mnIndex = index;
438 aPropStates.AddPropertyState( aNewProperty );
439 }
440 catch( UnknownPropertyException& )
441 {
442 // might be a problem of getImplementationId
443 OSL_ENSURE( false, "unknown property in getPropertyValue" );
444 }
445
446 }
447 }
448 }
449
450 ++aItr;
451 if( pStates )
452 ++pStates;
453 }
454 }
455 }
456 aPropStates.FillPropertyStateVector(rPropStates);
457}
458
459}
460
462{
463 typedef std::map<css::uno::Reference<css::beans::XPropertySetInfo>, std::unique_ptr<FilterPropertiesInfo_Impl>> CacheType;
465
468
469 OUString maStyleName;
470};
471
472// ctor/dtor , class SvXMLExportPropertyMapper
473
476 mpImpl(new Impl)
477{
478 mpImpl->mxPropMapper = rMapper;
479}
480
482{
483}
484
487{
488 // add map entries from rMapper to current map
489 mpImpl->mxPropMapper->AddMapperEntry( rMapper->getPropertySetMapper() );
490 // rMapper uses the same map as 'this'
491 rMapper->mpImpl->mxPropMapper = mpImpl->mxPropMapper;
492
493 // set rMapper as last mapper in current chain
495 if( xNext.is())
496 {
497 while (xNext->mpImpl->mxNextMapper.is())
498 xNext = xNext->mpImpl->mxNextMapper;
499 xNext->mpImpl->mxNextMapper = rMapper;
500 }
501 else
502 mpImpl->mxNextMapper = rMapper;
503
504 // if rMapper was already chained, correct
505 // map pointer of successors
506 xNext = rMapper;
507
508 while (xNext->mpImpl->mxNextMapper.is())
509 {
510 xNext = xNext->mpImpl->mxNextMapper;
511 xNext->mpImpl->mxPropMapper = mpImpl->mxPropMapper;
512 }
513}
514
515std::vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter(
516 SvXMLExport const& rExport,
517 const uno::Reference<beans::XPropertySet>& rPropSet, bool bEnableFoFontFamily ) const
518{
519 return Filter_(rExport, rPropSet, false, bEnableFoFontFamily);
520}
521
522std::vector<XMLPropertyState> SvXMLExportPropertyMapper::FilterDefaults(
523 SvXMLExport const& rExport,
524 const uno::Reference<beans::XPropertySet>& rPropSet ) const
525{
526 return Filter_(rExport, rPropSet, true, false/*bEnableFoFontFamily*/);
527}
528
529vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_(
530 SvXMLExport const& rExport,
531 const Reference<XPropertySet>& xPropSet, bool bDefault, bool bEnableFoFontFamily ) const
532{
533 vector< XMLPropertyState > aPropStateArray;
534
535 // Retrieve XPropertySetInfo and XPropertyState
536 Reference< XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo() );
537 if( !xInfo.is() )
538 return aPropStateArray;
539
540 sal_Int32 nProps = mpImpl->mxPropMapper->GetEntryCount();
541
542 FilterPropertiesInfo_Impl *pFilterInfo = nullptr;
543
544 Impl::CacheType::iterator aIter = mpImpl->maCache.find(xInfo);
545 if (aIter != mpImpl->maCache.end())
546 pFilterInfo = (*aIter).second.get();
547
548 bool bDelInfo = false;
549 if( !pFilterInfo )
550 {
552 const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(rExport.getSaneDefaultVersion());
553 pFilterInfo = new FilterPropertiesInfo_Impl;
554 for( sal_Int32 i=0; i < nProps; i++ )
555 {
556 // Are we allowed to ask for the property? (MID_FLAG_NO_PROP..)
557 // Does the PropertySet contain name of mpEntries-array ?
558 const OUString& rAPIName = mpImpl->mxPropMapper->GetEntryAPIName( i );
559 const sal_Int32 nFlags = mpImpl->mxPropMapper->GetEntryFlags( i );
560 if( (0 == (nFlags & MID_FLAG_NO_PROPERTY_EXPORT)) &&
561 ( (0 != (nFlags & MID_FLAG_MUST_EXIST)) ||
562 xInfo->hasPropertyByName( rAPIName ) ) )
563 {
564 const SvtSaveOptions::ODFSaneDefaultVersion nEarliestODFVersionForExport(
565 mpImpl->mxPropMapper->GetEarliestODFVersionForExport(i));
566 // note: only standard ODF versions are allowed here,
567 // only exception is the unknown future
568 assert((nEarliestODFVersionForExport & SvtSaveOptions::ODFSVER_EXTENDED) == 0
569 || nEarliestODFVersionForExport == SvtSaveOptions::ODFSVER_FUTURE_EXTENDED);
572 static sal_uInt16 s_OdfNs[] = {
598 };
599 static bool s_Assert(false);
600 if (!s_Assert)
601 {
602 assert(std::is_sorted(std::begin(s_OdfNs), std::end(s_OdfNs)));
603 s_Assert = true;
604 }
605 //static_assert(std::is_sorted(std::begin(s_OdfNs), std::end(s_OdfNs)));
606 auto const ns(mpImpl->mxPropMapper->GetEntryNameSpace(i));
607 auto const iter(std::lower_bound(std::begin(s_OdfNs), std::end(s_OdfNs),
608 ns));
609 bool const isExtension(iter == std::end(s_OdfNs) || *iter != ns
610 // FIXME: very special hack to suppress style:hyperlink
612 && mpImpl->mxPropMapper->GetEntryXMLName(i) == GetXMLToken(XML_HYPERLINK)));
613 if (isExtension
614 ? ((nCurrentVersion & SvtSaveOptions::ODFSVER_EXTENDED)
615 // if it's in standard ODF, don't export extension
616 && (nCurrentVersion < nEarliestODFVersionForExport))
617 : (nEarliestODFVersionForExport <= nCurrentVersion))
618 {
619 pFilterInfo->AddProperty(rAPIName, i);
620 }
621 }
622 }
623
624 // Check whether the property set info is destroyed if it is assigned to
625 // a weak reference only; If it is destroyed, then every instance of
626 // getPropertySetInfo returns a new object; such property set infos must
627 // not be cached:
628 WeakReference < XPropertySetInfo > xWeakInfo( xInfo );
629 xInfo.clear();
630 xInfo = xWeakInfo;
631 if( xInfo.is() )
632 {
633 mpImpl->maCache.emplace(xInfo, std::unique_ptr<FilterPropertiesInfo_Impl>(pFilterInfo));
634 }
635 else
636 bDelInfo = true;
637 }
638
639 if( pFilterInfo->GetPropertyCount() )
640 {
641 try
642 {
643 pFilterInfo->FillPropertyStateArray(
644 aPropStateArray, xPropSet, mpImpl->mxPropMapper, bDefault);
645 }
646 catch( UnknownPropertyException& )
647 {
648 // might be a problem of getImplementationId
649 OSL_ENSURE( false, "unknown property in getPropertyStates" );
650 }
651 }
652
653 // Call context-filter
654 if( !aPropStateArray.empty() )
655 ContextFilter(bEnableFoFontFamily, aPropStateArray, xPropSet);
656
657 // Have to do if we change from a vector to a list or something like that
658
659 if( bDelInfo )
660 delete pFilterInfo;
661
662 return aPropStateArray;
663}
664
666 bool bEnableFoFontFamily,
667 vector< XMLPropertyState >& rProperties,
668 const Reference< XPropertySet >& rPropSet ) const
669{
670 // Derived class could implement this.
671 if (mpImpl->mxNextMapper.is())
672 mpImpl->mxNextMapper->ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
673}
674
675// Compares two Sequences of XMLPropertyState:
676// 1.Number of elements equal ?
677// 2.Index of each element equal ? (So I know whether the propertynames are the same)
678// 3.Value of each element equal ?
680 const vector< XMLPropertyState >& aProperties1,
681 const vector< XMLPropertyState >& aProperties2 ) const
682{
683 if (aProperties1.size() < aProperties2.size())
684 return true;
685 if (aProperties1.size() > aProperties2.size())
686 return false;
687
688 sal_uInt32 nCount = aProperties1.size();
689
690 for (sal_uInt32 nIndex = 0; nIndex < nCount; ++nIndex)
691 {
692 const XMLPropertyState& rProp1 = aProperties1[ nIndex ];
693 const XMLPropertyState& rProp2 = aProperties2[ nIndex ];
694
695 // Compare index. If equal, compare value
696 if( rProp1.mnIndex < rProp2.mnIndex )
697 return true;
698 if( rProp1.mnIndex > rProp2.mnIndex )
699 return false;
700
701 if( rProp1.mnIndex != -1 )
702 {
703 // Now compare values
704 if ( (mpImpl->mxPropMapper->GetEntryType( rProp1.mnIndex ) &
705 XML_TYPE_BUILDIN_CMP ) != 0 )
706 {
707 // simple type ( binary compare )
708 if ( rProp1.maValue != rProp2.maValue)
709 return false;
710 }
711 else
712 {
713 // complex type ( ask for compare-function )
714 if (!mpImpl->mxPropMapper->GetPropertyHandler(
715 rProp1.mnIndex )->equals( rProp1.maValue,
716 rProp2.maValue ))
717 return false;
718 }
719 }
720 }
721
722 return true;
723}
724
725// Compares two Sequences of XMLPropertyState:
726// 1.Number of elements equal ?
727// 2.Index of each element equal ? (So I know whether the propertynames are the same)
728// 3.Value of each element equal ?
730 const vector< XMLPropertyState >& aProperties1,
731 const vector< XMLPropertyState >& aProperties2 ) const
732{
733 if (aProperties1.size() < aProperties2.size())
734 return true;
735 if (aProperties1.size() > aProperties2.size())
736 return false;
737
738 sal_uInt32 nCount = aProperties1.size();
739
740 for (sal_uInt32 nIndex = 0; nIndex < nCount; ++nIndex)
741 {
742 const XMLPropertyState& rProp1 = aProperties1[ nIndex ];
743 const XMLPropertyState& rProp2 = aProperties2[ nIndex ];
744
745 // Compare index. If equal, compare value
746 if( rProp1.mnIndex < rProp2.mnIndex )
747 return true;
748 if( rProp1.mnIndex > rProp2.mnIndex )
749 return false;
750
751 if( rProp1.mnIndex != -1 )
752 {
753 // Now compare values
754 if ( (mpImpl->mxPropMapper->GetEntryType( rProp1.mnIndex ) &
755 XML_TYPE_BUILDIN_CMP ) != 0 )
756 {
757 // simple type ( binary compare )
758 if ( comphelper::anyLess(rProp1.maValue, rProp2.maValue) )
759 return true;
760 if ( comphelper::anyLess(rProp2.maValue, rProp1.maValue ) )
761 return false;
762 }
763 }
764 }
765
766 return false;
767}
768
793 SvXMLExport& rExport,
794 const ::std::vector< XMLPropertyState >& rProperties,
795 SvXmlExportFlags nFlags,
796 bool bUseExtensionNamespaceForGraphicProperties) const
797{
798 exportXML(rExport, rProperties, -1, -1, nFlags, bUseExtensionNamespaceForGraphicProperties);
799}
800
801
803 SvXMLExport& rExport,
804 const ::std::vector< XMLPropertyState >& rProperties,
805 sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx,
806 SvXmlExportFlags nFlags, bool bUseExtensionNamespaceForGraphicProperties) const
807{
808 sal_uInt16 nPropTypeFlags = 0;
809 for( sal_uInt16 i=0; i<MAX_PROP_TYPES; ++i )
810 {
811 sal_uInt16 nPropType = aPropTokens[i].nType;
812 if( 0==i || (nPropTypeFlags & (1 << nPropType)) != 0 )
813 {
814 sal_uInt16 nNamespace = XML_NAMESPACE_STYLE;
815 if (bUseExtensionNamespaceForGraphicProperties &&
817 {
820 {
821 continue; // don't write for ODF <= 1.2
822 }
823 }
824
825 std::vector<sal_uInt16> aIndexArray;
826
827 _exportXML( nPropType, nPropTypeFlags,
828 rExport.GetAttrList(), rProperties,
829 rExport.GetMM100UnitConverter(),
830 rExport.GetNamespaceMap(),
831 &aIndexArray,
832 nPropMapStartIdx, nPropMapEndIdx );
833
834 if( rExport.GetAttrList().getLength() > 0 ||
835 !aIndexArray.empty() )
836 {
837 SvXMLElementExport aElem( rExport, nNamespace,
839 bool(nFlags & SvXmlExportFlags::IGN_WS),
840 false );
841
842 exportElementItems( rExport, rProperties, nFlags, aIndexArray );
843 }
844 }
845 }
846}
847
851 SvXMLAttributeList& rAttrList,
852 const XMLPropertyState& rProperty,
853 const SvXMLUnitConverter& rUnitConverter,
854 const SvXMLNamespaceMap& rNamespaceMap,
855 const ::std::vector< XMLPropertyState > *pProperties,
856 sal_uInt32 nIdx ) const
857{
858 OSL_ENSURE(mpImpl->mxNextMapper.is(), "special item not handled in xml export");
859 if (mpImpl->mxNextMapper.is())
860 mpImpl->mxNextMapper->handleSpecialItem(
861 rAttrList, rProperty, rUnitConverter, rNamespaceMap, pProperties, nIdx);
862}
863
867 SvXMLExport& rExport,
868 const XMLPropertyState& rProperty,
869 SvXmlExportFlags nFlags,
870 const ::std::vector< XMLPropertyState > *pProperties,
871 sal_uInt32 nIdx ) const
872{
873 OSL_ENSURE(mpImpl->mxNextMapper.is(), "element item not handled in xml export");
874 if (mpImpl->mxNextMapper.is())
875 mpImpl->mxNextMapper->handleElementItem(rExport, rProperty, nFlags, pProperties, nIdx);
876}
877
878// protected methods
879
882 sal_uInt16 nPropType, sal_uInt16& rPropTypeFlags,
883 SvXMLAttributeList& rAttrList,
884 const ::std::vector< XMLPropertyState >& rProperties,
885 const SvXMLUnitConverter& rUnitConverter,
886 const SvXMLNamespaceMap& rNamespaceMap,
887 std::vector<sal_uInt16>* pIndexArray,
888 sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx ) const
889{
890 const sal_uInt32 nCount = rProperties.size();
891 sal_uInt32 nIndex = 0;
892
893 if( -1 == nPropMapStartIdx )
894 nPropMapStartIdx = 0;
895 if( -1 == nPropMapEndIdx )
896 nPropMapEndIdx = mpImpl->mxPropMapper->GetEntryCount();
897
898 while( nIndex < nCount )
899 {
900 sal_Int32 nPropMapIdx = rProperties[nIndex].mnIndex;
901 if( nPropMapIdx >= nPropMapStartIdx &&
902 nPropMapIdx < nPropMapEndIdx )// valid entry?
903 {
904 sal_uInt32 nEFlags = mpImpl->mxPropMapper->GetEntryFlags(nPropMapIdx);
905 sal_uInt16 nEPType = GET_PROP_TYPE(nEFlags);
906 OSL_ENSURE(nEPType >= (XML_TYPE_PROP_START >> XML_TYPE_PROP_SHIFT),
907 "no prop type specified");
908 rPropTypeFlags |= (1 << nEPType);
909 if( nEPType == nPropType )
910 {
911 // we have a valid map entry here, so lets use it...
912 if( ( nEFlags & MID_FLAG_ELEMENT_ITEM_EXPORT ) != 0 )
913 {
914 // element items do not add any properties,
915 // we export it later
916 if( pIndexArray )
917 {
918 pIndexArray->push_back( static_cast<sal_uInt16>(nIndex) );
919 }
920 }
921 else
922 {
923 _exportXML( rAttrList, rProperties[nIndex], rUnitConverter,
924 rNamespaceMap, &rProperties, nIndex );
925 }
926 }
927 }
928
929 nIndex++;
930 }
931}
932
933namespace
934{
935// -1 = Attribute needs extended namespace, but current ODF version is strict.
936// 1 = Attribute needs extended namespace and current ODF version allows it.
937// 0 = Attribute does not need extended namespace
938sal_Int8 CheckExtendedNamespace(std::u16string_view sXMLAttributeName, std::u16string_view sValue,
940{
941 if (IsXMLToken(sXMLAttributeName, XML_WRITING_MODE)
942 && (IsXMLToken(sValue, XML_BT_LR) || IsXMLToken(sValue, XML_TB_RL90)))
943 return nODFVersion & SvtSaveOptions::ODFSVER_EXTENDED ? 1 : -1;
944 else if (IsXMLToken(sXMLAttributeName, XML_VERTICAL_REL)
946 || IsXMLToken(sValue, XML_PAGE_CONTENT_TOP)))
947 return nODFVersion & SvtSaveOptions::ODFSVER_EXTENDED ? 1 : -1;
948 return 0;
949}
950}
951
953 SvXMLAttributeList& rAttrList,
954 const XMLPropertyState& rProperty,
955 const SvXMLUnitConverter& rUnitConverter,
956 const SvXMLNamespaceMap& rNamespaceMap,
957 const ::std::vector< XMLPropertyState > *pProperties,
958 sal_uInt32 nIdx ) const
959{
960 if ((mpImpl->mxPropMapper->GetEntryFlags(rProperty.mnIndex) & MID_FLAG_SPECIAL_ITEM_EXPORT) != 0)
961 {
962 uno::Reference< container::XNameContainer > xAttrContainer;
963 if( (rProperty.maValue >>= xAttrContainer) && xAttrContainer.is() )
964 {
965 std::unique_ptr<SvXMLNamespaceMap> pNewNamespaceMap;
966 const SvXMLNamespaceMap *pNamespaceMap = &rNamespaceMap;
967
968 const uno::Sequence< OUString > aAttribNames( xAttrContainer->getElementNames() );
969
970 OUStringBuffer sNameBuffer;
971 xml::AttributeData aData;
972 for( const auto& rAttribName : aAttribNames )
973 {
974 xAttrContainer->getByName( rAttribName ) >>= aData;
975 OUString sAttribName( rAttribName );
976
977 // extract namespace prefix from attribute name if it exists
978 OUString sPrefix;
979 const sal_Int32 nColonPos =
980 rAttribName.indexOf( ':' );
981 if( nColonPos != -1 )
982 sPrefix = rAttribName.copy( 0, nColonPos );
983
984 if( !sPrefix.isEmpty() )
985 {
986 OUString sNamespace( aData.Namespace );
987
988 // if the prefix isn't defined yet or has another meaning,
989 // we have to redefine it now.
990 sal_uInt16 nKey = pNamespaceMap->GetKeyByPrefix( sPrefix );
991 if( USHRT_MAX == nKey || pNamespaceMap->GetNameByKey( nKey ) != sNamespace )
992 {
993 bool bAddNamespace = false;
994 if( USHRT_MAX == nKey )
995 {
996 // The prefix is unused, so it is sufficient
997 // to add it to the namespace map.
998 bAddNamespace = true;
999 }
1000 else
1001 {
1002 // check if there is a prefix registered for the
1003 // namespace URI
1004 nKey = pNamespaceMap->GetKeyByName( sNamespace );
1005 if( XML_NAMESPACE_UNKNOWN == nKey )
1006 {
1007 // There is no prefix for the namespace, so
1008 // we have to generate one and have to add it.
1009 sal_Int32 n=0;
1010 OUString sOrigPrefix( sPrefix );
1011 do
1012 {
1013 sNameBuffer.append( sOrigPrefix );
1014 sNameBuffer.append( ++n );
1015 sPrefix = sNameBuffer.makeStringAndClear();
1016 nKey = pNamespaceMap->GetKeyByPrefix( sPrefix );
1017 }
1018 while( nKey != USHRT_MAX );
1019
1020 bAddNamespace = true;
1021 }
1022 else
1023 {
1024 // If there is a prefix for the namespace,
1025 // we reuse that.
1026 sPrefix = pNamespaceMap->GetPrefixByKey( nKey );
1027 }
1028 // In any case, the attribute name has to be adapted.
1029 sNameBuffer.append(sPrefix + ":" + rAttribName.subView(nColonPos+1));
1030 sAttribName = sNameBuffer.makeStringAndClear();
1031 }
1032
1033 if( bAddNamespace )
1034 {
1035 if( !pNewNamespaceMap )
1036 {
1037 pNewNamespaceMap.reset(new SvXMLNamespaceMap( rNamespaceMap ));
1038 pNamespaceMap = pNewNamespaceMap.get();
1039 }
1040 pNewNamespaceMap->Add( sPrefix, sNamespace );
1041 OUString sAttr = GetXMLToken(XML_XMLNS) + ":" + sPrefix;
1042 rAttrList.AddAttribute( sAttr, sNamespace );
1043 }
1044 }
1045 }
1046 OUString sOldValue( rAttrList.getValueByName( sAttribName ) );
1047 OSL_ENSURE( sOldValue.isEmpty(), "alien attribute exists already" );
1048 OSL_ENSURE(aData.Type == GetXMLToken(XML_CDATA), "different type to our default type which should be written out");
1049 if( sOldValue.isEmpty() )
1050 rAttrList.AddAttribute( sAttribName, aData.Value );
1051 }
1052 }
1053 else
1054 {
1055 handleSpecialItem( rAttrList, rProperty, rUnitConverter,
1056 rNamespaceMap, pProperties, nIdx );
1057 }
1058 }
1059 else if ((mpImpl->mxPropMapper->GetEntryFlags(rProperty.mnIndex) & MID_FLAG_ELEMENT_ITEM_EXPORT ) == 0)
1060 {
1061 OUString aValue;
1062 OUString sName = rNamespaceMap.GetQNameByKey(
1063 mpImpl->mxPropMapper->GetEntryNameSpace(rProperty.mnIndex),
1064 mpImpl->mxPropMapper->GetEntryXMLName(rProperty.mnIndex));
1065
1066 bool bRemove = false;
1067 if ((mpImpl->mxPropMapper->GetEntryFlags( rProperty.mnIndex ) & MID_FLAG_MERGE_ATTRIBUTE) != 0)
1068 {
1069 aValue = rAttrList.getValueByName( sName );
1070 bRemove = true;
1071 }
1072
1073 if (mpImpl->mxPropMapper->exportXML(aValue, rProperty, rUnitConverter))
1074 {
1075 if( bRemove )
1076 rAttrList.RemoveAttribute( sName );
1077
1078 // We don't seem to have a generic mechanism to write an attribute in the extension
1079 // namespace in case of certain attribute values only, so do this manually.
1080 sal_Int8 nExtendedStatus
1081 = CheckExtendedNamespace(mpImpl->mxPropMapper->GetEntryXMLName(rProperty.mnIndex),
1082 aValue, rUnitConverter.getSaneDefaultVersion());
1083 if (nExtendedStatus == -1)
1084 return;
1085 if (nExtendedStatus == 1)
1086 sName = rNamespaceMap.GetQNameByKey(
1087 XML_NAMESPACE_LO_EXT, mpImpl->mxPropMapper->GetEntryXMLName(rProperty.mnIndex));
1088 rAttrList.AddAttribute( sName, aValue );
1089 }
1090 }
1091}
1092
1094 SvXMLExport& rExport,
1095 const ::std::vector< XMLPropertyState >& rProperties,
1096 SvXmlExportFlags nFlags,
1097 const std::vector<sal_uInt16>& rIndexArray ) const
1098{
1099 bool bItemsExported = false;
1100 for (const sal_uInt16 nElement : rIndexArray)
1101 {
1102 OSL_ENSURE( 0 != (mpImpl->mxPropMapper->GetEntryFlags(
1103 rProperties[nElement].mnIndex ) & MID_FLAG_ELEMENT_ITEM_EXPORT),
1104 "wrong mid flag!" );
1105
1106 rExport.IgnorableWhitespace();
1107 handleElementItem( rExport, rProperties[nElement],
1108 nFlags, &rProperties, nElement );
1109 bItemsExported = true;
1110 }
1111
1112 if( bItemsExported )
1113 rExport.IgnorableWhitespace();
1114}
1115
1117{
1118 return mpImpl->mxPropMapper;
1119}
1120
1121void SvXMLExportPropertyMapper::SetStyleName( const OUString& rStyleName )
1122{
1123 mpImpl->maStyleName = rStyleName;
1124}
1125
1127{
1128 return mpImpl->maStyleName;
1129}
1130
1131/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const PropertyValue * pValues
const XMLTokenEnum aPropTokens[XML_PROP_TYPE_END]
const sal_uInt16 MAX_PROP_TYPES
void AddAttribute(const OUString &sName, const OUString &sValue)
Definition: attrlist.cxx:110
void RemoveAttribute(const OUString &sName)
Definition: attrlist.cxx:123
virtual sal_Int16 SAL_CALL getLength() override
Definition: attrlist.cxx:34
virtual OUString SAL_CALL getValueByName(const OUString &aName) override
Definition: attrlist.cxx:80
const OUString & GetStyleName() const
Definition: xmlexppr.cxx:1126
std::vector< XMLPropertyState > Filter(SvXMLExport const &rExport, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool bEnableFoFontFamily=false) const
Filter all properties we don't want to export: Take all properties of the XPropertySet which are also...
Definition: xmlexppr.cxx:515
std::unique_ptr< Impl > mpImpl
Definition: xmlexppr.hxx:55
virtual void handleElementItem(SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const
this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
Definition: xmlexppr.cxx:866
void ChainExportMapper(const rtl::Reference< SvXMLExportPropertyMapper > &rMapper)
Definition: xmlexppr.cxx:485
bool Equals(const ::std::vector< XMLPropertyState > &aProperties1, const ::std::vector< XMLPropertyState > &aProperties2) const
Compare two arrays of XMLPropertyState.
Definition: xmlexppr.cxx:679
void SetStyleName(const OUString &rStyleName)
Definition: xmlexppr.cxx:1121
SvXMLExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmlexppr.cxx:474
std::vector< XMLPropertyState > FilterDefaults(SvXMLExport const &rExport, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const
Like Filter(), except that:
Definition: xmlexppr.cxx:522
virtual ~SvXMLExportPropertyMapper() override
Definition: xmlexppr.cxx:481
void exportXML(SvXMLExport &rExport, const ::std::vector< XMLPropertyState > &rProperties, SvXmlExportFlags nFlags, bool bUseExtensionNamespaceForGraphicProperties=false) const
fills the given attribute list with the items in the given set void SvXMLExportPropertyMapper::export...
Definition: xmlexppr.cxx:792
virtual void ContextFilter(bool bEnableFoFontFamily, ::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const
Application-specific filter.
Definition: xmlexppr.cxx:665
std::vector< XMLPropertyState > Filter_(SvXMLExport const &rExport, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool bDefault, bool bDisableFoFontFamily) const
Filter all properties we don't want to export: Take all properties of the XPropertySet which are also...
Definition: xmlexppr.cxx:529
const rtl::Reference< XMLPropertySetMapper > & getPropertySetMapper() const
Definition: xmlexppr.cxx:1116
virtual void handleSpecialItem(SvXMLAttributeList &rAttrList, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
Definition: xmlexppr.cxx:850
void _exportXML(sal_uInt16 nPropType, sal_uInt16 &rPropTypeFlags, SvXMLAttributeList &rAttrList, const ::std::vector< XMLPropertyState > &rProperties, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, std::vector< sal_uInt16 > *pIndexArray, sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx) const
fills the given attribute list with the items in the given set
Definition: xmlexppr.cxx:881
void exportElementItems(SvXMLExport &rExport, const ::std::vector< XMLPropertyState > &rProperties, SvXmlExportFlags nFlags, const std::vector< sal_uInt16 > &rIndexArray) const
Definition: xmlexppr.cxx:1093
bool LessPartial(const ::std::vector< XMLPropertyState > &aProperties1, const ::std::vector< XMLPropertyState > &aProperties2) const
Provides a partial ordering over two arrays of XMLPropertyState, Partial because implementing a full ...
Definition: xmlexppr.cxx:729
const SvXMLNamespaceMap & GetNamespaceMap() const
Definition: xmlexp.hxx:390
SvXMLAttributeList & GetAttrList()
Definition: xmlexp.hxx:379
SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion() const
returns the deterministic version for odf export
Definition: xmlexp.cxx:2271
void IgnorableWhitespace()
Definition: xmlexp.cxx:2194
const SvXMLUnitConverter & GetMM100UnitConverter() const
Definition: xmlexp.hxx:396
OUString GetQNameByKey(sal_uInt16 nKey, const OUString &rLocalName, bool bCache=true) const
const OUString & GetNameByKey(sal_uInt16 nKey) const
sal_uInt16 GetKeyByPrefix(const OUString &rPrefix) const
sal_uInt16 Add(const OUString &rPrefix, const OUString &rName, sal_uInt16 nKey=XML_NAMESPACE_UNKNOWN)
sal_uInt16 GetKeyByName(const OUString &rName) const
const OUString & GetPrefixByKey(sal_uInt16 nKey) const
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:83
SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion() const
ODF version, only when exporting.
Definition: xmluconv.cxx:124
int nCount
OUString sPrefix
sal_Int32 nIndex
sal_Int64 n
const char * sName
constexpr OUStringLiteral aData
DRAWING_PAGE
bool anyLess(css::uno::Any const &lhs, css::uno::Any const &rhs)
ns
int i
index
const sal_uInt16 XML_NAMESPACE_UNKNOWN
Handling of tokens in XML:
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:50
@ XML_PAGE_CONTENT_BOTTOM
Definition: xmltoken.hxx:3462
@ XML_GRAPHIC_PROPERTIES
Definition: xmltoken.hxx:2622
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3581
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
Definition: xmltoken.cxx:3525
QPRO_FUNC_TYPE nType
UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFDefaultVersion GetODFDefaultVersion()
OReadStatusBarDocumentHandler::StatusBar_XML_Namespace nNamespace
rtl::Reference< XMLPropertySetMapper > mxPropMapper
Definition: xmlexppr.cxx:467
std::map< css::uno::Reference< css::beans::XPropertySetInfo >, std::unique_ptr< FilterPropertiesInfo_Impl > > CacheType
Definition: xmlexppr.cxx:463
rtl::Reference< SvXMLExportPropertyMapper > mxNextMapper
Definition: xmlexppr.cxx:466
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:141
css::uno::Any maValue
Definition: maptype.hxx:143
sal_Int32 mnIndex
Definition: maptype.hxx:142
TEXT
bool operator<(const tSchXMLIndexWithPart &rFirst, const tSchXMLIndexWithPart &rSecond)
signed char sal_Int8
TABLE
#define GET_PROP_TYPE(f)
Definition: xmlexppr.cxx:57
#define ENTRY(t)
Definition: xmlexppr.cxx:58
SvXmlExportFlags
Definition: xmlexppr.hxx:39
constexpr sal_uInt16 XML_NAMESPACE_DRAW
constexpr sal_uInt16 XML_NAMESPACE_XHTML
constexpr sal_uInt16 XML_NAMESPACE_META
constexpr sal_uInt16 XML_NAMESPACE_SMIL
constexpr sal_uInt16 XML_NAMESPACE_DC
constexpr sal_uInt16 XML_NAMESPACE_DB
constexpr sal_uInt16 XML_NAMESPACE_XLINK
constexpr sal_uInt16 XML_NAMESPACE_ANIMATION
constexpr sal_uInt16 XML_NAMESPACE_SVG
constexpr sal_uInt16 XML_NAMESPACE_TEXT
constexpr sal_uInt16 XML_NAMESPACE_FORM
constexpr sal_uInt16 XML_NAMESPACE_XFORMS
constexpr sal_uInt16 XML_NAMESPACE_DR3D
constexpr sal_uInt16 XML_NAMESPACE_CHART
constexpr sal_uInt16 XML_NAMESPACE_XML
constexpr sal_uInt16 XML_NAMESPACE_TABLE
constexpr sal_uInt16 XML_NAMESPACE_LO_EXT
constexpr sal_uInt16 XML_NAMESPACE_OFFICE
constexpr sal_uInt16 XML_NAMESPACE_PRESENTATION
constexpr sal_uInt16 XML_NAMESPACE_CONFIG
constexpr sal_uInt16 XML_NAMESPACE_MATH
constexpr sal_uInt16 XML_NAMESPACE_GRDDL
constexpr sal_uInt16 XML_NAMESPACE_STYLE
constexpr sal_uInt16 XML_NAMESPACE_SCRIPT
constexpr sal_uInt16 XML_NAMESPACE_FO
constexpr sal_uInt16 XML_NAMESPACE_NUMBER
XMLTokenEnum eToken
Definition: xmltoken.cxx:40
#define XML_TYPE_PROP_SHIFT
Definition: xmltypes.hxx:90
#define MID_FLAG_ELEMENT_ITEM_EXPORT
Definition: xmltypes.hxx:67
#define MID_FLAG_DEFAULT_ITEM_EXPORT
Definition: xmltypes.hxx:48
#define MID_FLAG_SPECIAL_ITEM_EXPORT
Definition: xmltypes.hxx:86
#define XML_TYPE_BUILDIN_CMP
Definition: xmltypes.hxx:122
#define MID_FLAG_NO_PROPERTY_EXPORT
Definition: xmltypes.hxx:73
#define MID_FLAG_MUST_EXIST
Definition: xmltypes.hxx:52
#define XML_TYPE_PROP_END
Definition: xmltypes.hxx:108
#define MID_FLAG_MERGE_ATTRIBUTE
Definition: xmltypes.hxx:57
#define XML_TYPE_PROP_START
Definition: xmltypes.hxx:93