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