37#include <com/sun/star/chart2/XAnyDescriptionAccess.hpp>
38#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
39#include <com/sun/star/chart2/XChartDocument.hpp>
40#include <com/sun/star/chart2/XChartTypeContainer.hpp>
41#include <com/sun/star/chart2/XInternalDataProvider.hpp>
42#include <com/sun/star/beans/XPropertySet.hpp>
44#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
54using ::com::sun::star::uno::Sequence;
55using ::com::sun::star::uno::Reference;
60constexpr OUStringLiteral aCategoriesRange =
u"categories";
62typedef ::std::multimap< OUString, OUString >
63 lcl_tOriginalRangeToInternalRangeMap;
65struct lcl_ApplyCellToData
67 explicit lcl_ApplyCellToData( Sequence< double > & rOutData ) :
76 if( m_nIndex < m_nSize )
82 pData[m_nIndex] = std::numeric_limits<double>::quiet_NaN();
87 sal_Int32 getCurrentIndex()
const
98void lcl_fillRangeMapping(
100 lcl_tOriginalRangeToInternalRangeMap & rOutRangeMap,
101 chart::ChartDataRowSource eDataRowSource )
106 const OUString lcl_aCategoriesRange(aCategoriesRange);
107 static constexpr OUStringLiteral lcl_aLabelPrefix(u
"label ");
110 const size_t nTableRowCount( rTable.
aData.size());
111 for(
size_t nRow = 0; nRow < nTableRowCount; ++nRow )
113 const ::std::vector< SchXMLCell > & rRow( rTable.
aData[nRow] );
114 const size_t nTableColCount( rRow.size());
115 for(
size_t nCol = 0; nCol < nTableColCount; ++nCol )
117 const OUString aRangeId( rRow[nCol].aRangeId );
118 if( !aRangeId.isEmpty())
120 if( eDataRowSource == chart::ChartDataRowSource_COLUMNS )
124 SAL_WARN_IF(
static_cast< sal_Int32
>( nRow ) != nRowOffset,
"xmloff.chart",
"nRow != nRowOffset" );
125 rOutRangeMap.emplace(aRangeId, lcl_aCategoriesRange);
129 OUString aColNumStr = OUString::number( nCol - nColOffset);
131 rOutRangeMap.emplace( aRangeId, lcl_aLabelPrefix + aColNumStr );
133 rOutRangeMap.emplace( aRangeId, aColNumStr );
140 SAL_WARN_IF(
static_cast< sal_Int32
>( nCol ) != nColOffset,
"xmloff.chart",
"nCol != nColOffset" );
141 rOutRangeMap.emplace( aRangeId, lcl_aCategoriesRange );
145 OUString aRowNumStr = OUString::number( nRow - nRowOffset);
147 rOutRangeMap.emplace( aRangeId, lcl_aLabelPrefix + aRowNumStr );
149 rOutRangeMap.emplace( aRangeId, aRowNumStr );
157Reference< chart2::data::XDataSequence >
158 lcl_reassignDataSequence(
159 const Reference< chart2::data::XDataSequence > & xSequence,
160 const Reference< chart2::data::XDataProvider > & xDataProvider,
161 lcl_tOriginalRangeToInternalRangeMap & rRangeMap,
162 const OUString & rRange )
164 Reference< chart2::data::XDataSequence > xResult( xSequence );
165 lcl_tOriginalRangeToInternalRangeMap::iterator aIt( rRangeMap.find( rRange ));
166 if( aIt != rRangeMap.end())
169 xResult.set( xDataProvider->createDataSequenceByRangeRepresentation( aIt->second ));
171 rRangeMap.erase( aIt );
177bool lcl_mapContainsRange(
178 lcl_tOriginalRangeToInternalRangeMap & rRangeMap,
179 const OUString & rRange )
181 lcl_tOriginalRangeToInternalRangeMap::iterator aIt( rRangeMap.find( rRange ));
182 return ( aIt != rRangeMap.end());
185bool lcl_tableOfRangeMatches(
186 std::u16string_view rRange,
187 std::u16string_view rTableName )
190 return ( !rRange.empty() &&
191 !rTableName.empty() &&
192 (rRange.find( rTableName ) != std::u16string_view::npos ));
202 mbHasRowPermutation( false ),
203 mbHasColumnPermutation( false )
217 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
252 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
258 switch(aIter.getToken())
281 SAL_WARN_IF( !aPermutation.hasElements(),
"xmloff.chart",
"aPermutation is NULL");
282 if( !aPermutation.hasElements())
288 bool bModified =
false;
289 ::std::vector< SchXMLCell > aModifiedRow;
290 const size_t nPermSize = aPermutation.size();
291 SAL_WARN_IF(
static_cast< sal_Int32
>( nPermSize ) - 1 != *(::std::max_element( aPermutation.begin(), aPermutation.end())),
"xmloff.chart",
"nPermSize - 1 != *(::std::max_element( aPermutation.begin(), aPermutation.end())");
292 const size_t nRowSize = rRow.size();
293 const size_t nDestSize = ::std::min( nPermSize, nRowSize );
294 for(
size_t nDestinationIndex = 0; nDestinationIndex < nDestSize; ++nDestinationIndex )
296 const size_t nSourceIndex =
static_cast< size_t >( aPermutation[ nDestinationIndex ] );
297 if( nSourceIndex != nDestinationIndex &&
298 nSourceIndex < nRowSize )
303 SAL_WARN_IF( !aModifiedRow.empty(),
"xmloff.chart",
"aModifiedRow is NOT NULL");
304 aModifiedRow.insert( aModifiedRow.end(), rRow.begin(), rRow.end() );
305 SAL_WARN_IF( aModifiedRow.empty(),
"xmloff.chart",
"aModifiedRow is NULL");
307 SAL_WARN_IF( nDestinationIndex >= aModifiedRow.size(),
"xmloff.chart",
"nDestinationIndex >= aModifiedRow.size()");
308 aModifiedRow[ nDestinationIndex ] = rRow[ nSourceIndex ];
314 ::std::copy( aModifiedRow.begin(), aModifiedRow.end(), rRow.begin());
320 SAL_WARN_IF( !aPermutation.hasElements(),
"xmloff.chart",
"aPermutation is NULL");
321 if( !aPermutation.hasElements())
324 bool bModified =
false;
325 const size_t nPermSize = aPermutation.size();
326 SAL_WARN_IF(
static_cast< sal_Int32
>( nPermSize ) - 1 != *(::std::max_element( aPermutation.begin(), aPermutation.end())),
"xmloff.chart",
"nPermSize - 1 != *(::std::max_element( aPermutation.begin(), aPermutation.end())");
328 const size_t nDestSize = ::std::min( nPermSize, nTableRowCount );
329 ::std::vector< ::std::vector< SchXMLCell > > aDestination;
330 for(
size_t nDestinationIndex = 0; nDestinationIndex < nDestSize; ++nDestinationIndex )
332 const size_t nSourceIndex =
static_cast< size_t >( aPermutation[ nDestinationIndex ] );
333 if( nSourceIndex != nDestinationIndex &&
334 nSourceIndex < nTableRowCount )
339 SAL_WARN_IF( !aDestination.empty(),
"xmloff.chart",
"aDestination is NOT NULL");
341 SAL_WARN_IF( aDestination.empty(),
"xmloff.chart",
"aDestination is NULL");
343 SAL_WARN_IF( nDestinationIndex >= aDestination.size(),
"xmloff.chart",
"nDestinationIndex >= aDestination.size()");
344 aDestination[ nDestinationIndex ] =
mrTable.
aData[ nSourceIndex ];
351 ::std::copy( aDestination.begin(), aDestination.end(),
mrTable.
aData.begin());
383 SvXMLImport& rImport,
396 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
410 SvXMLImport& rImport,
418 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
421 sal_Int32 nRepeated = 1;
422 bool bHidden =
false;
426 switch(aIter.getToken())
430 if( !aIter.isEmpty())
431 nRepeated = aIter.toInt32();
436 OUString aVisibility = aIter.toString();
446 sal_Int32 nNewCount = nOldCount + nRepeated;
453 for( sal_Int32 nN = nOldCount; nN<nNewCount; nN++ )
455 sal_Int32 nHiddenColumnIndex = nN-nColOffset;
456 if( nHiddenColumnIndex>=0 )
469 SvXMLImport& rImport,
482 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
496 SvXMLImport& rImport,
504 std::vector< SchXMLCell > aNewRow;
516 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
544 OUString& mrRangeString;
545 OUStringBuffer maRangeStringBuffer;
548 SchXMLRangeSomewhereContext( SvXMLImport& rImport,
549 OUString& rRangeString );
553 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList )
override;
554 virtual void SAL_CALL
endFastElement(sal_Int32 nElement)
override;
562 SvXMLImport& rImport,
575 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
577 OUString aCellContent;
582 switch(aIter.getToken())
592 aCellContent = aIter.toString();
602 aCell.
eType = eValueType;
623 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
672 rComplexLabel.realloc(
nCount );
673 auto pComplexLabel = rComplexLabel.getArray();
674 for( sal_Int32 nN=0; nN<
nCount; nN++)
685 const uno::Reference< chart2::XChartDocument >& xChartDoc )
688 if( !xChartDoc.is() || !xChartDoc->hasInternalDataProvider() )
690 Reference< chart2::data::XDataProvider > xDataProv( xChartDoc->getDataProvider() );
691 if( !xDataProv.is() )
695 sal_Int32 nNumRows(
static_cast< sal_Int32
>( rTable.
aData.size()));
696 sal_Int32 nRowOffset = 0;
703 sal_Int32 nColOffset = 0;
710 Sequence< Sequence< double > > aDataInRows( nNumRows );
711 auto aDataInRowsRange = asNonConstRange(aDataInRows);
712 Sequence< Sequence< uno::Any > > aComplexRowDescriptions( nNumRows );
713 auto aComplexRowDescriptionsRange = asNonConstRange(aComplexRowDescriptions);
714 Sequence< Sequence< uno::Any > > aComplexColumnDescriptions( nNumColumns );
715 auto aComplexColumnDescriptionsRange = asNonConstRange(aComplexColumnDescriptions);
716 for( sal_Int32
i=0;
i<nNumRows; ++
i )
717 aDataInRowsRange[
i].realloc( nNumColumns );
719 if( !rTable.
aData.empty() )
724 const ::std::vector< SchXMLCell >& rFirstRow = rTable.
aData.front();
725 const sal_Int32 nColumnLabelsSize = aComplexColumnDescriptions.getLength();
726 const sal_Int32 nMax = ::std::min< sal_Int32 >( nColumnLabelsSize,
static_cast< sal_Int32
>( rFirstRow.size()) - nColOffset );
727 SAL_WARN_IF( nMax != nColumnLabelsSize,
"xmloff.chart",
"nMax != nColumnLabelsSize");
728 for( sal_Int32
i=0;
i<nMax; ++
i )
732 std::vector< ::std::vector< SchXMLCell > >::const_iterator aRowIter( rTable.
aData.begin() + nRowOffset );
733 std::vector< ::std::vector< SchXMLCell > >::const_iterator aEnd( rTable.
aData.end() );
734 for( sal_Int32 nRow = 0; aRowIter != aEnd && nRow < nNumRows; ++aRowIter, ++nRow )
736 const ::std::vector< SchXMLCell >& rRow = *aRowIter;
744 Sequence< double >& rTargetRow = aDataInRowsRange[nRow];
745 auto pTargetRow = rTargetRow.getArray();
746 lcl_ApplyCellToData aApplyCellToData = ::std::for_each( rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( rTargetRow ) );
747 for( sal_Int32 nCurrentIndex = aApplyCellToData.getCurrentIndex(); nCurrentIndex<nNumColumns; nCurrentIndex++ )
748 pTargetRow[nCurrentIndex] = std::numeric_limits<double>::quiet_NaN();
754 Reference< chart2::XAnyDescriptionAccess > xDataAccess( xDataProv, uno::UNO_QUERY );
755 if( !xDataAccess.is() )
758 xDataAccess->setData( aDataInRows );
760 xDataAccess->setAnyRowDescriptions( aComplexRowDescriptions );
762 xDataAccess->setAnyColumnDescriptions( aComplexColumnDescriptions );
768 Reference< beans::XPropertySet > xProps( xChartDoc, uno::UNO_QUERY_THROW );
769 xProps->setPropertyValue(
"DisableDataTableDialog",
uno::Any(
true ) );
770 xProps->setPropertyValue(
"DisableComplexChartTypes",
uno::Any(
true ) );
772 catch ( uno::Exception& )
781 const uno::Reference< chart2::XChartDocument >& xChartDoc,
782 chart::ChartDataRowSource eDataRowSource )
784 if( ! (xChartDoc.is() && xChartDoc->hasInternalDataProvider()))
794 Reference< chart2::data::XDataProvider > xDataProv( xChartDoc->getDataProvider());
797 lcl_tOriginalRangeToInternalRangeMap aRangeMap;
799 lcl_fillRangeMapping( rTable, aRangeMap, eDataRowSource );
801 const OUString lcl_aCategoriesRange(aCategoriesRange);
803 bool bCategoriesApplied =
false;
805 for(
const auto& rLSeq : rLSequencesPerIndex )
807 if( rLSeq.second.is())
813 Reference< chart2::data::XDataSequence > xSeq( rLSeq.second->getValues());
818 lcl_mapContainsRange( aRangeMap, aRange ))
820 Reference< chart2::data::XDataSequence > xNewSeq(
821 lcl_reassignDataSequence( xSeq, xDataProv, aRangeMap, aRange ));
822 if( xNewSeq != xSeq )
825 Reference< beans::XPropertySet >( xNewSeq, uno::UNO_QUERY ));
826 rLSeq.second->setValues( xNewSeq );
834 bCategoriesApplied =
true;
840 Reference< beans::XPropertySet > xOldSequenceProp( rLSeq.second->getValues(), uno::UNO_QUERY );
841 Reference< chart2::data::XDataSequence > xNewSequence(
842 xDataProv->createDataSequenceByRangeRepresentation(
"categories"));
844 xOldSequenceProp, Reference< beans::XPropertySet >( xNewSequence, uno::UNO_QUERY ));
845 rLSeq.second->setValues( xNewSequence );
846 bCategoriesApplied =
true;
850 Reference< beans::XPropertySet > xOldSequenceProp( rLSeq.second->getValues(), uno::UNO_QUERY );
851 OUString aRep( OUString::number( rLSeq.first.first ));
852 Reference< chart2::data::XDataSequence > xNewSequence(
853 xDataProv->createDataSequenceByRangeRepresentation( aRep ));
855 xOldSequenceProp, Reference< beans::XPropertySet >( xNewSequence, uno::UNO_QUERY ));
856 rLSeq.second->setValues( xNewSequence );
865 Reference< chart2::data::XDataSequence > xSeq( rLSeq.second->getLabel());
869 lcl_mapContainsRange( aRangeMap, aRange ))
871 Reference< chart2::data::XDataSequence > xNewSeq(
872 lcl_reassignDataSequence( xSeq, xDataProv, aRangeMap, aRange ));
873 if( xNewSeq != xSeq )
876 Reference< beans::XPropertySet >( xNewSeq, uno::UNO_QUERY ));
877 rLSeq.second->setLabel( xNewSeq );
882 OUString aRep =
"label " + OUString::number( rLSeq.first.first );
884 Reference< chart2::data::XDataSequence > xNewSeq(
885 xDataProv->createDataSequenceByRangeRepresentation( aRep ));
887 Reference< beans::XPropertySet >( xNewSeq, uno::UNO_QUERY ));
888 rLSeq.second->setLabel( xNewSeq );
897 if( ! bCategoriesApplied )
900 xDataProv, xChartDoc,
"categories",
906 Reference< chart2::XInternalDataProvider > xInternalDataProvider( xDataProv, uno::UNO_QUERY );
907 if( !xInternalDataProvider.is() || rTable.
aHiddenColumns.empty() )
912 Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xChartDoc->getFirstDiagram(), uno::UNO_QUERY_THROW );
913 const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems() );
914 for(
const auto& rCooSys : aCooSysSeq )
916 Reference< chart2::XChartTypeContainer > xCooSysContainer( rCooSys, uno::UNO_QUERY_THROW );
917 const Sequence< Reference< chart2::XChartType > > aChartTypeSeq( xCooSysContainer->getChartTypes());
918 for(
const auto& rChartType : aChartTypeSeq )
920 Reference< chart2::XDataSeriesContainer > xSeriesContainer( rChartType, uno::UNO_QUERY );
921 if(!xSeriesContainer.is())
923 const Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() );
924 std::vector< Reference< chart2::XDataSeries > > aRemainingSeries;
926 for(
const auto& rSeries : aSeriesSeq )
928 Reference< chart2::data::XDataSource > xDataSource( rSeries, uno::UNO_QUERY );
929 if( xDataSource.is() )
931 bool bHasUnhiddenColumns =
false;
933 const uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences( xDataSource->getDataSequences() );
934 for(
const auto& xLabeledSequence : aSequences )
936 if(!xLabeledSequence.is())
938 Reference< chart2::data::XDataSequence > xValues( xLabeledSequence->getValues() );
941 aRange = xValues->getSourceRangeRepresentation();
943 bHasUnhiddenColumns =
true;
945 if( !bHasUnhiddenColumns )
947 Reference< chart2::data::XDataSequence > xLabel( xLabeledSequence->getLabel() );
950 aRange = xLabel->getSourceRangeRepresentation();
953 bHasUnhiddenColumns =
true;
957 if( bHasUnhiddenColumns )
958 aRemainingSeries.push_back( rSeries );
968 Reference< chart2::data::XDataSource > xDataSource( xChartDoc, uno::UNO_QUERY );
969 if( xDataSource.is() )
972 std::map< sal_Int32, bool > aUsageMap;
974 const Sequence< Reference< chart2::data::XLabeledDataSequence > > aUsedSequences( xDataSource->getDataSequences() );
975 for(
const auto& xLabeledSequence : aUsedSequences )
977 if(!xLabeledSequence.is())
979 Reference< chart2::data::XDataSequence > xValues( xLabeledSequence->getValues() );
982 aRange = xValues->getSourceRangeRepresentation();
983 sal_Int32
nIndex = aRange.toInt32();
984 if(
nIndex!=0 || aRange != lcl_aCategoriesRange )
987 Reference< chart2::data::XDataSequence > xLabel( xLabeledSequence->getLabel() );
990 aRange = xLabel->getSourceRangeRepresentation();
991 std::u16string_view aSecondToken =
o3tl::getToken(aRange, 1,
' ');
992 if( !aSecondToken.empty() )
997 ::std::vector< sal_Int32 > aSequenceIndexesToDelete;
999 std::back_inserter(aSequenceIndexesToDelete),
1000 [&aUsageMap](sal_Int32 nSequenceIndex) { return aUsageMap.find(nSequenceIndex) == aUsageMap.end(); });
1005 ::std::sort( aSequenceIndexesToDelete.begin(), aSequenceIndexesToDelete.end());
1006 for( ::std::vector< sal_Int32 >::reverse_iterator aIt(
1007 aSequenceIndexesToDelete.rbegin()); aIt != aSequenceIndexesToDelete.rend(); ++aIt )
1010 xInternalDataProvider->deleteSequence( *aIt );
1017 catch(
const uno::Exception & )
1022SchXMLRangeSomewhereContext::SchXMLRangeSomewhereContext( SvXMLImport& rImport,
1023 OUString& rRangeString ) :
1025 mrRangeString( rRangeString )
1029css::uno::Reference< css::xml::sax::XFastContextHandler > SchXMLRangeSomewhereContext::createFastChildContext(
1031 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
1043void SchXMLRangeSomewhereContext::endFastElement(sal_Int32 )
1045 mrRangeString = maRangeStringBuffer.makeStringAndClear();
const Sequence< Sequence< double > > & m_rData
static void lcl_ApplyCellToComplexLabel(const SchXMLCell &rCell, Sequence< uno::Any > &rComplexLabel)
virtual ~SchXMLTableCellContext() override
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
SchXMLTableCellContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
SchXMLTableColumnContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~SchXMLTableColumnContext() override
With this context all column elements are parsed to determine the index of the column containing the ...
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
SchXMLTableColumnsContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual ~SchXMLTableColumnsContext() override
SchXMLTableContext(SvXMLImport &rImport, SchXMLTable &aTable)
bool mbHasColumnPermutation
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
css::uno::Sequence< sal_Int32 > maColumnPermutation
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
virtual ~SchXMLTableContext() override
void setRowPermutation(const css::uno::Sequence< sal_Int32 > &rPermutation)
void setColumnPermutation(const css::uno::Sequence< sal_Int32 > &rPermutation)
css::uno::Sequence< sal_Int32 > maRowPermutation
static void applyTableToInternalDataProvider(const SchXMLTable &rTable, const css::uno::Reference< css::chart2::XChartDocument > &xChartDoc)
static void switchRangesFromOuterToInternalIfNecessary(const SchXMLTable &rTable, const tSchXMLLSequencesPerIndex &rLSequencesPerIndex, const css::uno::Reference< css::chart2::XChartDocument > &xChartDoc, css::chart::ChartDataRowSource eDataRowSource)
This function reorders local data to fit the correct data structure.
SchXMLTableRowContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
virtual ~SchXMLTableRowContext() override
virtual ~SchXMLTableRowsContext() override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
SchXMLTableRowsContext(SvXMLImport &rImport, SchXMLTable &aTable)
This class deliberately does not support XWeak, to improve performance when loading large documents.
virtual void SAL_CALL endFastElement(sal_Int32 Element) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
SvXMLImport & GetImport()
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
Import all text into a string buffer.
static void convertDouble(OUStringBuffer &rBuffer, double fNumber, bool bWriteUnits, sal_Int16 nSourceUnit, sal_Int16 nTargetUnit)
#define SAL_WARN_IF(condition, area, stream)
std::unique_ptr< sal_Int32[]> pData
double getLength(const B2DPolygon &rCandidate)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
@ XML_TABLE_HEADER_COLUMNS
@ XML_NUMBER_COLUMNS_REPEATED
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
css::uno::Sequence< OUString > aComplexString
sal_Int32 nColumnIndex
reflects the index of the row currently parsed
sal_Int32 nMaxColumnIndex
reflects the index of the column currently parsed
sal_Int32 nNumberOfColsEstimate
the greatest number of columns detected
::std::vector< sal_Int32 > aHiddenColumns
the table name read at the table:table element
bool bHasHeaderRow
parsing column-elements may yield an estimate
sal_Int32 nRowIndex
an array of rows containing the table contents
std::vector< std::vector< SchXMLCell > > aData
OUString aTableNameOfFile
@ SCH_XML_PART_ERROR_BARS
::std::multimap< tSchXMLIndexWithPart, css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tSchXMLLSequencesPerIndex
@ SCH_CELL_TYPE_COMPLEX_STRING
#define SCH_XML_CATEGORIES_INDEX
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
#define XMLOFF_WARN_UNKNOWN(area, rIter)
#define XML_ELEMENT(prefix, name)