From bff284e216792b8d2a4e498beaba806eeddf844a Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 6 Oct 2009 07:38:24 +0200 Subject: #103496#: move VCL free ConfigItems to unotools --- xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmloff/source/chart') diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx index 273e9db4e364..cc67c4ac75fa 100644 --- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx +++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "XMLErrorBarStylePropertyHdl.hxx" -#include +#include #include #include -- cgit From 543fc8431a6273244e26d08cb7e74e7f9229dc4c Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 24 Nov 2009 11:19:08 +0100 Subject: chartmultiline: remove unsued concept 'UnusedData' --- xmloff/source/chart/SchXMLExport.cxx | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'xmloff/source/chart') diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f7cf82abe974..589e1b657d6f 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -212,24 +212,6 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } - /* - //unused ranges are very problematic as they bear the risk to damage the rectangular structure completly - if(!xResult.is()) - { - Sequence< Reference< chart2::data::XLabeledDataSequence > > aUnusedSequences( xDiagram->getUnusedData() ); - - lcl_MatchesRole aHasCategories( OUString::createFromAscii("categories" ) ); - for( sal_Int32 nN=0; nN Date: Tue, 1 Dec 2009 15:01:55 +0100 Subject: chartmultiline: #i97893# import categories from multiple lines (fixed), #i82971# display complex categories hierarchically (part1) --- xmloff/source/chart/SchXMLExport.cxx | 122 ++++++++++++++--------------------- 1 file changed, 48 insertions(+), 74 deletions(-) (limited to 'xmloff/source/chart') diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 589e1b657d6f..78cc6ef8e94d 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -169,6 +169,13 @@ template< typename T > ::std::back_inserter( rDestination )); } +template< typename T > + void lcl_SequenceToVector( const Sequence< T > & rSource, ::std::vector< T > & rDestination ) +{ + rDestination.clear(); + lcl_SequenceToVectorAppend( rSource, rDestination ); +} + Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Reference< chart2::XDiagram > & xDiagram ) { Reference< chart2::data::XLabeledDataSequence > xResult; @@ -472,30 +479,6 @@ sal_Int32 lcl_getMaxSequenceLength( return nResult; } -void lcl_fillCategoriesIntoStringVector( - const Reference< chart2::data::XDataSequence > & xCategories, - ::std::vector< OUString > & rOutCategories ) -{ - OSL_ASSERT( xCategories.is()); - if( !xCategories.is()) - return; - Reference< chart2::data::XTextualDataSequence > xTextualDataSequence( xCategories, uno::UNO_QUERY ); - if( xTextualDataSequence.is()) - { - rOutCategories.clear(); - Sequence< OUString > aTextData( xTextualDataSequence->getTextualData()); - ::std::copy( aTextData.getConstArray(), aTextData.getConstArray() + aTextData.getLength(), - ::std::back_inserter( rOutCategories )); - } - else - { - Sequence< uno::Any > aAnies( xCategories->getData()); - rOutCategories.resize( aAnies.getLength()); - for( sal_Int32 i=0; i>= rOutCategories[i]; - } -} - double lcl_getValueFromSequence( const Reference< chart2::data::XDataSequence > & xSeq, sal_Int32 nIndex ) { double fResult = 0.0; @@ -598,39 +581,29 @@ typedef ::std::map< sal_Int32, SchXMLExportHelper::tLabelValuesDataPair > struct lcl_SequenceToMapElement : public ::std::unary_function< lcl_DataSequenceMap::mapped_type, lcl_DataSequenceMap::value_type > { - lcl_SequenceToMapElement( sal_Int32 nOffset = 0 ) : - m_nOffset( nOffset ) + lcl_SequenceToMapElement() {} result_type operator() ( const argument_type & rContent ) { sal_Int32 nIndex = -1; - if( rContent.second.is()) + if( rContent.second.is()) //has values { OUString aRangeRep( rContent.second->getSourceRangeRepresentation()); - if( aRangeRep.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("categories"))) - { - OSL_ASSERT( m_nOffset > 0 ); - nIndex = 0; - } - else - nIndex = aRangeRep.toInt32() + m_nOffset; + nIndex = aRangeRep.toInt32(); } - else if( rContent.first.is()) - nIndex = rContent.first->getSourceRangeRepresentation().copy( sizeof("label ")).toInt32() + m_nOffset; + else if( rContent.first.is()) //has labels + nIndex = rContent.first->getSourceRangeRepresentation().copy( sizeof("label ")).toInt32(); return result_type( nIndex, rContent ); } -private: - sal_Int32 m_nOffset; }; -void lcl_PrepareInternalSequencesForTableExport( - SchXMLExportHelper::tDataSequenceCont & rInOutSequences, bool bHasCategories ) +void lcl_ReorderInternalSequencesAccordingToTheirRangeName( + SchXMLExportHelper::tDataSequenceCont & rInOutSequences ) { lcl_DataSequenceMap aIndexSequenceMap; - const sal_Int32 nOffset = bHasCategories ? 1 : 0; ::std::transform( rInOutSequences.begin(), rInOutSequences.end(), ::std::inserter( aIndexSequenceMap, aIndexSequenceMap.begin()), - lcl_SequenceToMapElement( nOffset )); + lcl_SequenceToMapElement()); rInOutSequences.clear(); sal_Int32 nIndex = 0; @@ -650,7 +623,9 @@ void lcl_PrepareInternalSequencesForTableExport( lcl_TableData lcl_getDataForLocalTable( - const SchXMLExportHelper::tDataSequenceCont & aPassedSequences, bool bHasCategoryLabels, + const SchXMLExportHelper::tDataSequenceCont & aPassedSequences, + const Sequence< OUString >& rInputCategories, + const OUString& rCategoriesRange, bool bSwap, bool bHasOwnData, const Reference< chart2::data::XRangeXMLConversion > & xRangeConversion ) @@ -659,21 +634,15 @@ lcl_TableData lcl_getDataForLocalTable( SchXMLExportHelper::tDataSequenceCont aSequencesToExport( aPassedSequences ); if( bHasOwnData ) - lcl_PrepareInternalSequencesForTableExport( aSequencesToExport, bHasCategoryLabels ); + lcl_ReorderInternalSequencesAccordingToTheirRangeName( aSequencesToExport ); SchXMLExportHelper::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size(); SchXMLExportHelper::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin()); SchXMLExportHelper::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end()); SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( aBegin ); - if( bHasCategoryLabels ) - { - if( nNumSequences>=1 ) //#i83537# - --nNumSequences; - else - bHasCategoryLabels=false; - } size_t nMaxSequenceLength( lcl_getMaxSequenceLength( aSequencesToExport )); + nMaxSequenceLength = std::max( nMaxSequenceLength, size_t( rInputCategories.getLength() ) ); size_t nNumColumns( bSwap ? nMaxSequenceLength : nNumSequences ); size_t nNumRows( bSwap ? nNumSequences : nMaxSequenceLength ); @@ -691,29 +660,17 @@ lcl_TableData lcl_getDataForLocalTable( lcl_TableData::tStringContainer & rLabels = (bSwap ? aResult.aFirstColumnStrings : aResult.aFirstRowStrings ); - if( aIt != aEnd ) + //categories + lcl_SequenceToVector( rInputCategories, rCategories ); + if(rCategoriesRange.getLength()) { - if( bHasCategoryLabels ) - { - lcl_fillCategoriesIntoStringVector( aIt->second, rCategories ); - if( aIt->second.is()) - { - OUString aRange( aIt->second->getSourceRangeRepresentation()); - if( xRangeConversion.is()) - aRange = xRangeConversion->convertRangeToXML( aRange ); - if( bSwap ) - aResult.aFirstRowRangeRepresentations.push_back( aRange ); - else - aResult.aFirstColumnRangeRepresentations.push_back( aRange ); - } - ++aIt; - } + OUString aRange(rCategoriesRange); + if( xRangeConversion.is()) + aRange = xRangeConversion->convertRangeToXML( aRange ); + if( bSwap ) + aResult.aFirstRowRangeRepresentations.push_back( aRange ); else - { - // autogenerated categories - rCategories.clear(); - lcl_SequenceToVectorAppend( aIt->second->generateLabel( chart2::data::LabelOrigin_LONG_SIDE ), rCategories ); - } + aResult.aFirstColumnRangeRepresentations.push_back( aRange ); } // iterate over all sequences @@ -1453,8 +1410,25 @@ void SchXMLExportHelper::exportTable() xRangeConversion.set( xNewDoc->getDataProvider(), uno::UNO_QUERY ); } + Sequence< OUString > aCategories; + if(mbHasCategoryLabels) + { + //ensure correct strings even for complex hierarchical categories + Reference< chart::XChartDocument > xChartDoc( mrExport.GetModel(), uno::UNO_QUERY ); + if( xChartDoc.is() ) + { + Reference< chart::XChartDataArray > xData( xChartDoc->getData(), uno::UNO_QUERY ); + if(xData.is()) + { + if( mbRowSourceColumns ) + aCategories = xData->getRowDescriptions(); + else + aCategories = xData->getColumnDescriptions(); + } + } + } lcl_TableData aData( lcl_getDataForLocalTable( - m_aDataSequencesToExport, mbHasCategoryLabels, !mbRowSourceColumns, bHasOwnData, xRangeConversion )); + m_aDataSequencesToExport, aCategories, maCategoriesRange, !mbRowSourceColumns, bHasOwnData, xRangeConversion )); lcl_TableData::tStringContainer::const_iterator aDataRangeIter( aData.aDataRangeRepresentations.begin()); const lcl_TableData::tStringContainer::const_iterator aDataRangeEndIter( aData.aDataRangeRepresentations.end()); @@ -2098,7 +2072,7 @@ void SchXMLExportHelper::exportAxes( { Reference< chart2::XChartDocument > xNewDoc( mrExport.GetModel(), uno::UNO_QUERY ); aCategoriesRange = lcl_ConvertRange( xValues->getSourceRangeRepresentation(), xNewDoc ); - m_aDataSequencesToExport.push_back( tLabelValuesDataPair( 0, xValues )); + maCategoriesRange = aCategoriesRange; } } } -- cgit From 738f329af2e92ca824cdc810799a2801a60bd23d Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 13 Jan 2010 17:06:34 +0100 Subject: chartmultiline: #i82971# complex categories (part3 - complex categories for internal data + load/save + copy/paste) + cleanup --- xmloff/source/chart/SchXMLChartContext.cxx | 17 +- xmloff/source/chart/SchXMLExport.cxx | 329 ++++++++++++++------------ xmloff/source/chart/SchXMLImport.cxx | 108 --------- xmloff/source/chart/SchXMLTableContext.cxx | 299 +++++++---------------- xmloff/source/chart/SchXMLTableContext.hxx | 17 +- xmloff/source/chart/SchXMLTextListContext.cxx | 139 +++++++++++ xmloff/source/chart/SchXMLTextListContext.hxx | 61 +++++ xmloff/source/chart/contexts.cxx | 7 - xmloff/source/chart/makefile.mk | 1 + xmloff/source/chart/transporttypes.hxx | 24 +- 10 files changed, 492 insertions(+), 510 deletions(-) create mode 100755 xmloff/source/chart/SchXMLTextListContext.cxx create mode 100755 xmloff/source/chart/SchXMLTextListContext.hxx (limited to 'xmloff/source/chart') diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 1f854469b4be..7b625679d383 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include @@ -877,6 +876,9 @@ void SchXMLChartContext::EndElement() { //own data or only rectangular range available + if( xNewDoc->hasInternalDataProvider() ) + SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc ); + bool bOlderThan2_3 = SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( Reference< frame::XModel >( xNewDoc, uno::UNO_QUERY )); bool bOldFileWithOwnDataFromRows = (bOlderThan2_3 && bHasOwnData && (meDataRowSource==chart::ChartDataRowSource_ROWS)); // in this case there are range addresses that are simply wrong. @@ -885,21 +887,12 @@ void SchXMLChartContext::EndElement() { //bHasOwnData is true in this case! //e.g. for normal files with own data or also in case of copy paste scenario (e.g. calc to impress) - if( xNewDoc->hasInternalDataProvider() ) - SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc ); bSwitchRangesFromOuterToInternalIfNecessary = true; } else { //apply data from rectangular range - // apply data read from the table sub-element to the chart - // if the data provider supports the XChartDataArray interface like - // the internal data provider - uno::Reference< chart::XChartDataArray > xChartData( xNewDoc->getDataProvider(), uno::UNO_QUERY ); - if( xChartData.is()) - SchXMLTableHelper::applyTableSimple( maTable, xChartData ); - // create datasource from data provider with rectangular range // parameters and change the diagram via template mechanism try @@ -922,9 +915,7 @@ void SchXMLChartContext::EndElement() if( !xNewDoc->hasInternalDataProvider() ) { xNewDoc->createInternalDataProvider( sal_False /* bCloneExistingData */ ); - xChartData = uno::Reference< chart::XChartDataArray >( xNewDoc->getDataProvider(), uno::UNO_QUERY ); - if( xChartData.is()) - SchXMLTableHelper::applyTableSimple( maTable, xChartData ); + SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc ); try { lcl_ApplyDataFromRectangularRangeToDiagram( xNewDoc, msChartAddress, meDataRowSource, mbRowHasLabels, mbColHasLabels, bHasOwnData, msColTrans, msRowTrans ); diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 78cc6ef8e94d..b62d3c6df56e 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -74,7 +74,7 @@ #include #include #include -#include +#include #include #include #include @@ -119,6 +119,7 @@ using ::rtl::OUStringToOString; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; +using ::std::vector; namespace { @@ -463,12 +464,6 @@ sal_Int32 lcl_getMaxSequenceLength( for( SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( rContainer.begin()); aIt != rContainer.end(); ++aIt ) { - if( aIt->first.is()) - { - sal_Int32 nSeqLength = aIt->first->getData().getLength(); - if( nSeqLength > nResult ) - nResult = nSeqLength; - } if( aIt->second.is()) { sal_Int32 nSeqLength = aIt->second->getData().getLength(); @@ -547,17 +542,23 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque return false; } +typedef vector< OUString > tStringVector; +typedef vector< vector< OUString > > t2DStringVector; +typedef vector< vector< double > > t2DNumberContainer; + struct lcl_TableData { - typedef ::std::vector< OUString > tStringContainer; - typedef ::std::vector< ::std::vector< double > > tTwoDimNumberContainer; + t2DNumberContainer aDataInRows; + tStringVector aDataRangeRepresentations; - tTwoDimNumberContainer aDataInRows; - tStringContainer aDataRangeRepresentations; - tStringContainer aFirstRowStrings; - tStringContainer aFirstRowRangeRepresentations; - tStringContainer aFirstColumnStrings; - tStringContainer aFirstColumnRangeRepresentations; + tStringVector aColumnDescriptions; + tStringVector aColumnDescriptions_Ranges; + + tStringVector aRowDescriptions; + tStringVector aRowDescriptions_Ranges; + + Sequence< Sequence< OUString > > aComplexColumnDescriptions;//outer index is columns - inner index is level + Sequence< Sequence< OUString > > aComplexRowDescriptions;//outer index is rows - inner index is level ::std::vector< sal_Int32 > aHiddenColumns; }; @@ -623,97 +624,113 @@ void lcl_ReorderInternalSequencesAccordingToTheirRangeName( lcl_TableData lcl_getDataForLocalTable( - const SchXMLExportHelper::tDataSequenceCont & aPassedSequences, - const Sequence< OUString >& rInputCategories, + const SchXMLExportHelper::tDataSequenceCont & aSequencesToExport, + const Reference< chart::XComplexDescriptionAccess >& xComplexDescriptionAccess, const OUString& rCategoriesRange, - bool bSwap, - bool bHasOwnData, + bool bSeriesFromColumns, const Reference< chart2::data::XRangeXMLConversion > & xRangeConversion ) { lcl_TableData aResult; - SchXMLExportHelper::tDataSequenceCont aSequencesToExport( aPassedSequences ); - if( bHasOwnData ) - lcl_ReorderInternalSequencesAccordingToTheirRangeName( aSequencesToExport ); + try + { + Sequence< OUString > aSimpleCategories; + if( xComplexDescriptionAccess.is() ) + { + if( bSeriesFromColumns ) + aSimpleCategories = xComplexDescriptionAccess->getRowDescriptions(); + else + aSimpleCategories = xComplexDescriptionAccess->getColumnDescriptions(); - SchXMLExportHelper::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size(); - SchXMLExportHelper::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin()); - SchXMLExportHelper::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end()); - SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( aBegin ); + aResult.aComplexColumnDescriptions = xComplexDescriptionAccess->getComplexColumnDescriptions(); + aResult.aComplexRowDescriptions = xComplexDescriptionAccess->getComplexRowDescriptions(); + } - size_t nMaxSequenceLength( lcl_getMaxSequenceLength( aSequencesToExport )); - nMaxSequenceLength = std::max( nMaxSequenceLength, size_t( rInputCategories.getLength() ) ); - size_t nNumColumns( bSwap ? nMaxSequenceLength : nNumSequences ); - size_t nNumRows( bSwap ? nNumSequences : nMaxSequenceLength ); + SchXMLExportHelper::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size(); + SchXMLExportHelper::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin()); + SchXMLExportHelper::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end()); + SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( aBegin ); - // resize data - aResult.aDataInRows.resize( nNumRows ); - double fNan = 0.0; - ::rtl::math::setNan( &fNan ); - ::std::for_each( aResult.aDataInRows.begin(), aResult.aDataInRows.end(), - lcl_resize< lcl_TableData::tTwoDimNumberContainer::value_type >( nNumColumns, fNan )); - aResult.aFirstRowStrings.resize( nNumColumns ); - aResult.aFirstColumnStrings.resize( nNumRows ); - - lcl_TableData::tStringContainer & rCategories = - (bSwap ? aResult.aFirstRowStrings : aResult.aFirstColumnStrings ); - lcl_TableData::tStringContainer & rLabels = - (bSwap ? aResult.aFirstColumnStrings : aResult.aFirstRowStrings ); - - //categories - lcl_SequenceToVector( rInputCategories, rCategories ); - if(rCategoriesRange.getLength()) - { - OUString aRange(rCategoriesRange); - if( xRangeConversion.is()) - aRange = xRangeConversion->convertRangeToXML( aRange ); - if( bSwap ) - aResult.aFirstRowRangeRepresentations.push_back( aRange ); - else - aResult.aFirstColumnRangeRepresentations.push_back( aRange ); - } + size_t nMaxSequenceLength( lcl_getMaxSequenceLength( aSequencesToExport )); + nMaxSequenceLength = std::max( nMaxSequenceLength, size_t( aSimpleCategories.getLength() ) ); + size_t nNumColumns( bSeriesFromColumns ? nNumSequences : nMaxSequenceLength ); + size_t nNumRows( bSeriesFromColumns ? nMaxSequenceLength : nNumSequences ); - // iterate over all sequences - size_t nSeqIdx = 0; - for( ; aIt != aEnd; ++aIt, ++nSeqIdx ) - { - OUString aRange; - if( aIt->first.is()) + // resize data + aResult.aDataInRows.resize( nNumRows ); + double fNan = 0.0; + ::rtl::math::setNan( &fNan ); + ::std::for_each( aResult.aDataInRows.begin(), aResult.aDataInRows.end(), + lcl_resize< t2DNumberContainer::value_type >( nNumColumns, fNan )); + aResult.aColumnDescriptions.resize( nNumColumns ); + aResult.aComplexColumnDescriptions.realloc( nNumColumns ); + aResult.aRowDescriptions.resize( nNumRows ); + aResult.aComplexRowDescriptions.realloc( nNumRows ); + + tStringVector& rCategories = bSeriesFromColumns ? aResult.aRowDescriptions : aResult.aColumnDescriptions; + tStringVector& rLabels = bSeriesFromColumns ? aResult.aColumnDescriptions : aResult.aRowDescriptions; + + //categories + lcl_SequenceToVector( aSimpleCategories, rCategories ); + if( rCategoriesRange.getLength() ) { - rLabels[nSeqIdx] = lcl_getLabelString( aIt->first ); - aRange = aIt->first->getSourceRangeRepresentation(); + OUString aRange(rCategoriesRange); if( xRangeConversion.is()) aRange = xRangeConversion->convertRangeToXML( aRange ); + if( bSeriesFromColumns ) + aResult.aRowDescriptions_Ranges.push_back( aRange ); + else + aResult.aColumnDescriptions_Ranges.push_back( aRange ); } - else if( aIt->second.is()) - rLabels[nSeqIdx] = lcl_flattenStringSequence( - aIt->second->generateLabel( chart2::data::LabelOrigin_SHORT_SIDE )); - if( bSwap ) - aResult.aFirstColumnRangeRepresentations.push_back( aRange ); - else - aResult.aFirstRowRangeRepresentations.push_back( aRange ); - ::std::vector< double > aNumbers( lcl_getAllValuesFromSequence( aIt->second )); - if( bSwap ) - aResult.aDataInRows[nSeqIdx] = aNumbers; - else + // iterate over all sequences + size_t nSeqIdx = 0; + for( ; aIt != aEnd; ++aIt, ++nSeqIdx ) { - const sal_Int32 nSize( static_cast< sal_Int32 >( aNumbers.size())); - for( sal_Int32 nIdx=0; nIdxfirst.is()) + { + rLabels[nSeqIdx] = lcl_getLabelString( aIt->first ); + aRange = aIt->first->getSourceRangeRepresentation(); + if( xRangeConversion.is()) + aRange = xRangeConversion->convertRangeToXML( aRange ); + } + else if( aIt->second.is()) + rLabels[nSeqIdx] = lcl_flattenStringSequence( + aIt->second->generateLabel( chart2::data::LabelOrigin_SHORT_SIDE )); + if( bSeriesFromColumns ) + aResult.aColumnDescriptions_Ranges.push_back( aRange ); + else + aResult.aRowDescriptions_Ranges.push_back( aRange ); - if( aIt->second.is()) - { - aRange = aIt->second->getSourceRangeRepresentation(); - if( xRangeConversion.is()) - aRange = xRangeConversion->convertRangeToXML( aRange ); - } - aResult.aDataRangeRepresentations.push_back( aRange ); + ::std::vector< double > aNumbers( lcl_getAllValuesFromSequence( aIt->second )); + if( bSeriesFromColumns ) + { + const sal_Int32 nSize( static_cast< sal_Int32 >( aNumbers.size())); + for( sal_Int32 nIdx=0; nIdxfirst) && !lcl_SequenceHasUnhiddenData(aIt->second) ) - aResult.aHiddenColumns.push_back(nSeqIdx); + if( aIt->second.is()) + { + aRange = aIt->second->getSourceRangeRepresentation(); + if( xRangeConversion.is()) + aRange = xRangeConversion->convertRangeToXML( aRange ); + } + aResult.aDataRangeRepresentations.push_back( aRange ); + + //is column hidden? + if( !lcl_SequenceHasUnhiddenData(aIt->first) && !lcl_SequenceHasUnhiddenData(aIt->second) ) + aResult.aHiddenColumns.push_back(nSeqIdx); + } + } + catch( uno::Exception & rEx ) + { + (void)rEx; // avoid warning for pro build + OSL_TRACE( OUStringToOString( OUString( RTL_CONSTASCII_USTRINGPARAM( + "something went wrong during table data collection: " )) + rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } return aResult; @@ -1394,6 +1411,19 @@ void SchXMLExportHelper::parseDocument( Reference< chart::XChartDocument >& rCha delete pElChart; } +void lcl_exportComplexLabel( const Sequence< OUString >& rComplexLabel, SvXMLExport& rExport ) +{ + sal_Int32 nLength = rComplexLabel.getLength(); + if( nLength<=1 ) + return; + SvXMLElementExport aTextList( rExport, XML_NAMESPACE_TEXT, XML_LIST, sal_True, sal_True ); + for(sal_Int32 nN=0; nNgetDataProvider(), uno::UNO_QUERY ); } - Sequence< OUString > aCategories; - if(mbHasCategoryLabels) + Reference< chart::XComplexDescriptionAccess > xComplexDescriptionAccess; { - //ensure correct strings even for complex hierarchical categories Reference< chart::XChartDocument > xChartDoc( mrExport.GetModel(), uno::UNO_QUERY ); if( xChartDoc.is() ) - { - Reference< chart::XChartDataArray > xData( xChartDoc->getData(), uno::UNO_QUERY ); - if(xData.is()) - { - if( mbRowSourceColumns ) - aCategories = xData->getRowDescriptions(); - else - aCategories = xData->getColumnDescriptions(); - } - } + xComplexDescriptionAccess = Reference< chart::XComplexDescriptionAccess >( xChartDoc->getData(), uno::UNO_QUERY ); } - lcl_TableData aData( lcl_getDataForLocalTable( - m_aDataSequencesToExport, aCategories, maCategoriesRange, !mbRowSourceColumns, bHasOwnData, xRangeConversion )); - lcl_TableData::tStringContainer::const_iterator aDataRangeIter( aData.aDataRangeRepresentations.begin()); - const lcl_TableData::tStringContainer::const_iterator aDataRangeEndIter( aData.aDataRangeRepresentations.end()); - lcl_TableData::tStringContainer::const_iterator aFirstColumnRangeIter( aData.aFirstColumnRangeRepresentations.begin()); - const lcl_TableData::tStringContainer::const_iterator aFirstColumnRangeEndIter( aData.aFirstColumnRangeRepresentations.end()); + if( bHasOwnData ) + lcl_ReorderInternalSequencesAccordingToTheirRangeName( m_aDataSequencesToExport ); + lcl_TableData aData( lcl_getDataForLocalTable( m_aDataSequencesToExport + , xComplexDescriptionAccess, maCategoriesRange + , mbRowSourceColumns, xRangeConversion )); + + tStringVector::const_iterator aDataRangeIter( aData.aDataRangeRepresentations.begin()); + const tStringVector::const_iterator aDataRangeEndIter( aData.aDataRangeRepresentations.end()); + + tStringVector::const_iterator aRowDescriptions_RangeIter( aData.aRowDescriptions_Ranges.begin()); + const tStringVector::const_iterator aRowDescriptions_RangeEnd( aData.aRowDescriptions_Ranges.end()); // declare columns { @@ -1461,7 +1485,7 @@ void SchXMLExportHelper::exportTable() nNextIndex = nHiddenIndex+1; } - sal_Int32 nEndIndex = aData.aFirstRowStrings.size()-1; + sal_Int32 nEndIndex = aData.aColumnDescriptions.size()-1; if( nEndIndex >= nNextIndex ) { sal_Int64 nRepeat = static_cast< sal_Int64 >( nEndIndex - nNextIndex + 1 ); @@ -1473,59 +1497,78 @@ void SchXMLExportHelper::exportTable() } // export rows with content + //export header row { SvXMLElementExport aHeaderRows( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_HEADER_ROWS, sal_True, sal_True ); SvXMLElementExport aRow( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROW, sal_True, sal_True ); + + //first one empty cell for the row descriptions { SvXMLElementExport aEmptyCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True ); SvXMLElementExport aEmptyParagraph( mrExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_True ); } - lcl_TableData::tStringContainer::const_iterator aFirstRowRangeIter( aData.aFirstRowRangeRepresentations.begin()); - const lcl_TableData::tStringContainer::const_iterator aFirstRowRangeEndIter( aData.aFirstRowRangeRepresentations.end()); - for( lcl_TableData::tStringContainer::const_iterator aIt( aData.aFirstRowStrings.begin()); - aIt != aData.aFirstRowStrings.end(); ++aIt ) + //export column descriptions + tStringVector::const_iterator aColumnDescriptions_RangeIter( aData.aColumnDescriptions_Ranges.begin()); + const tStringVector::const_iterator aColumnDescriptions_RangeEnd( aData.aColumnDescriptions_Ranges.end()); + const Sequence< Sequence< OUString > >& rComplexColumnDescriptions = aData.aComplexColumnDescriptions; + sal_Int32 nComplexCount = rComplexColumnDescriptions.getLength(); + sal_Int32 nC = 0; + for( tStringVector::const_iterator aIt( aData.aColumnDescriptions.begin()); + aIt != aData.aColumnDescriptions.end(); ++aIt ) { mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING ); SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True ); // write the original range name as id into the local table // to allow a correct re-association when copying via clipboard - if( !bHasOwnData && aFirstRowRangeIter != aFirstRowRangeEndIter ) + if( !bHasOwnData && aColumnDescriptions_RangeIter != aColumnDescriptions_RangeEnd ) { - if( (*aFirstRowRangeIter).getLength()) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aFirstRowRangeIter ); - ++aFirstRowRangeIter; + if( (*aColumnDescriptions_RangeIter).getLength()) + mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aColumnDescriptions_RangeIter ); + ++aColumnDescriptions_RangeIter; } exportText( *aIt ); + if( nC < nComplexCount ) + lcl_exportComplexLabel( rComplexColumnDescriptions[nC++], mrExport ); } - OSL_ASSERT( bHasOwnData || aFirstRowRangeIter == aFirstRowRangeEndIter ); + OSL_ASSERT( bHasOwnData || aColumnDescriptions_RangeIter == aColumnDescriptions_RangeEnd ); } // closing row and header-rows elements - // value rows + // export value rows { SvXMLElementExport aRows( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROWS, sal_True, sal_True ); - lcl_TableData::tStringContainer::const_iterator aFirstColIt( aData.aFirstColumnStrings.begin()); - for( lcl_TableData::tTwoDimNumberContainer::const_iterator aColIt( aData.aDataInRows.begin()); - aColIt != aData.aDataInRows.end(); ++aColIt ) + tStringVector::const_iterator aRowDescriptionsIter( aData.aRowDescriptions.begin()); + const Sequence< Sequence< OUString > >& rComplexRowDescriptions = aData.aComplexRowDescriptions; + sal_Int32 nComplexCount = rComplexRowDescriptions.getLength(); + sal_Int32 nC = 0; + + for( t2DNumberContainer::const_iterator aRowIt( aData.aDataInRows.begin()); + aRowIt != aData.aDataInRows.end(); ++aRowIt ) { SvXMLElementExport aRow( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROW, sal_True, sal_True ); + + //export row descriptions { mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING ); SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True ); - if( aFirstColIt != aData.aFirstColumnStrings.end()) + if( aRowDescriptionsIter != aData.aRowDescriptions.end()) { // write the original range name as id into the local table // to allow a correct re-association when copying via clipboard - if( !bHasOwnData && aFirstColumnRangeIter != aFirstColumnRangeEndIter ) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aFirstColumnRangeIter++ ); - exportText( *aFirstColIt ); - ++aFirstColIt; + if( !bHasOwnData && aRowDescriptions_RangeIter != aRowDescriptions_RangeEnd ) + mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aRowDescriptions_RangeIter++ ); + exportText( *aRowDescriptionsIter ); + ++aRowDescriptionsIter; + if( nC < nComplexCount ) + lcl_exportComplexLabel( rComplexRowDescriptions[nC++], mrExport ); } } - for( lcl_TableData::tTwoDimNumberContainer::value_type::const_iterator aInnerIt( aColIt->begin()); - aInnerIt != aColIt->end(); ++aInnerIt ) + + //export row values + for( t2DNumberContainer::value_type::const_iterator aColIt( aRowIt->begin()); + aColIt != aRowIt->end(); ++aColIt ) { - SvXMLUnitConverter::convertDouble( msStringBuffer, *aInnerIt ); + SvXMLUnitConverter::convertDouble( msStringBuffer, *aColIt ); msString = msStringBuffer.makeStringAndClear(); mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_FLOAT ); mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE, msString ); @@ -1533,7 +1576,7 @@ void SchXMLExportHelper::exportTable() // write the original range name as id into the local table to // allow a correct re-association when copying via clipboard if( ( !bHasOwnData && aDataRangeIter != aDataRangeEndIter ) && - ( mbRowSourceColumns || (aInnerIt == aColIt->begin())) ) + ( mbRowSourceColumns || (aColIt == aRowIt->begin())) ) { if( (*aDataRangeIter).getLength()) mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aDataRangeIter ); @@ -1546,7 +1589,7 @@ void SchXMLExportHelper::exportTable() // if range iterator was used it should have reached its end OSL_ASSERT( bHasOwnData || (aDataRangeIter == aDataRangeEndIter) ); - OSL_ASSERT( bHasOwnData || (aFirstColumnRangeIter == aFirstColumnRangeEndIter) ); + OSL_ASSERT( bHasOwnData || (aRowDescriptions_RangeIter == aRowDescriptions_RangeEnd) ); } void SchXMLExportHelper::exportPlotArea( @@ -2071,8 +2114,8 @@ void SchXMLExportHelper::exportAxes( if( xValues.is()) { Reference< chart2::XChartDocument > xNewDoc( mrExport.GetModel(), uno::UNO_QUERY ); - aCategoriesRange = lcl_ConvertRange( xValues->getSourceRangeRepresentation(), xNewDoc ); - maCategoriesRange = aCategoriesRange; + maCategoriesRange = xValues->getSourceRangeRepresentation(); + aCategoriesRange = lcl_ConvertRange( maCategoriesRange, xNewDoc ); } } } @@ -3381,24 +3424,6 @@ awt::Size SchXMLExportHelper::getPageSize( const Reference< chart2::XChartDocume return aSize; } -void SchXMLExportHelper::swapDataArray( Sequence< Sequence< double > >& rSequence ) -{ - sal_Int32 nOuterSize = rSequence.getLength(); - sal_Int32 nInnerSize = rSequence[0].getLength(); // assume that all subsequences have same length - sal_Int32 i, o; - - Sequence< Sequence< double > > aResult( nInnerSize ); - Sequence< double >* pArray = aResult.getArray(); - for( i = 0; i < nInnerSize; i++ ) - { - pArray[ i ].realloc( nOuterSize ); - for( o = 0 ; o < nOuterSize ; o++ ) - aResult[ i ][ o ] = rSequence[ o ][ i ]; - } - - rSequence = aResult; -} - void SchXMLExportHelper::CollectAutoStyle( const std::vector< XMLPropertyState >& aStates ) { if( !aStates.empty() ) diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index dd955e6d69d5..b60086c97633 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -510,113 +509,6 @@ const SvXMLTokenMap& SchXMLImportHelper::GetRegEquationAttrTokenMap() // ---------------------------------------- -sal_Int32 SchXMLImportHelper::GetNumberOfSeries() -{ - if( mxChartDoc.is()) - { - Reference< chart::XChartDataArray > xData( mxChartDoc->getData(), uno::UNO_QUERY ); - if( xData.is()) - { - Sequence< Sequence< double > > xArray = xData->getData(); - - if( xArray.getLength()) - return xArray[ 0 ].getLength(); - } - } - - return 0; -} - -sal_Int32 SchXMLImportHelper::GetLengthOfSeries() -{ - if( mxChartDoc.is()) - { - Reference< chart::XChartDataArray > xData( mxChartDoc->getData(), uno::UNO_QUERY ); - if( xData.is()) - { - Sequence< Sequence< double > > xArray = xData->getData(); - - return xArray.getLength(); - } - } - - return 0; -} - -// -1 means don't change -void SchXMLImportHelper::ResizeChartData( sal_Int32 nSeries, sal_Int32 nDataPoints ) -{ - if( mxChartDoc.is()) - { - sal_Bool bWasChanged = sal_False; - - sal_Bool bDataInColumns = sal_True; - Reference< beans::XPropertySet > xDiaProp( mxChartDoc->getDiagram(), uno::UNO_QUERY ); - if( xDiaProp.is()) - { - chart::ChartDataRowSource eRowSource; - xDiaProp->getPropertyValue( OUString::createFromAscii( "DataRowSource" )) >>= eRowSource; - bDataInColumns = ( eRowSource == chart::ChartDataRowSource_COLUMNS ); - - // the chart core treats donut chart with interchanged rows/columns - Reference< chart::XDiagram > xDiagram( xDiaProp, uno::UNO_QUERY ); - if( xDiagram.is()) - { - OUString sChartType = xDiagram->getDiagramType(); - if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.DonutDiagram" ))) - { - bDataInColumns = ! bDataInColumns; - } - } - } - sal_Int32 nColCount = bDataInColumns ? nSeries : nDataPoints; - sal_Int32 nRowCount = bDataInColumns ? nDataPoints : nSeries; - - Reference< chart::XChartDataArray > xData( mxChartDoc->getData(), uno::UNO_QUERY ); - if( xData.is()) - { - Sequence< Sequence< double > > xArray = xData->getData(); - - // increase number of rows - if( xArray.getLength() < nRowCount ) - { - sal_Int32 nOldLen = xArray.getLength(); - xArray.realloc( nRowCount ); - if( nColCount == -1 ) - { - sal_Int32 nSize = xArray[ 0 ].getLength(); - for( sal_Int32 i = nOldLen; i < nRowCount; i++ ) - xArray[ i ].realloc( nSize ); - } - bWasChanged = sal_True; - } - - if( nSeries == -1 && - nRowCount > 0 ) - nColCount = xArray[ 0 ].getLength(); - - // columns - if( nColCount > 0 && - xArray[ 0 ].getLength() < nColCount ) - { - if( nDataPoints == -1 ) - nRowCount = xArray.getLength(); - - for( sal_Int32 i = 0; i < nRowCount; i++ ) - xArray[ i ].realloc( nColCount ); - bWasChanged = sal_True; - } - - if( bWasChanged ) - { - xData->setData( xArray ); - mxChartDoc->attachData( - Reference< chart::XChartData >( xData, uno::UNO_QUERY )); - } - } - } -} - //static void SchXMLImportHelper::DeleteDataSeries( const Reference< chart2::XDataSeries > & xSeries, diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index a1c021171a92..ea24524ac25f 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -33,6 +33,7 @@ #include "SchXMLTableContext.hxx" #include "SchXMLParagraphContext.hxx" +#include "SchXMLTextListContext.hxx" #include "SchXMLImport.hxx" #include "SchXMLTools.hxx" #include "transporttypes.hxx" @@ -47,7 +48,7 @@ #include #include #include -#include +#include #include #include #include @@ -141,26 +142,10 @@ std::vector< Reference< chart2::XAxis > > lcl_getAxesHoldingCategoriesFromDiagra return aRet; } -void lcl_ApplyColumnLabels( - const ::std::vector< SchXMLCell > & rFirstRow, - Sequence< OUString > & rOutColumnLabels, - sal_Int32 nOffset ) -{ - const sal_Int32 nColumnLabelsSize = rOutColumnLabels.getLength(); - const sal_Int32 nMax = ::std::min< sal_Int32 >( nColumnLabelsSize, - static_cast< sal_Int32 >( rFirstRow.size()) - nOffset ); - OSL_ASSERT( nMax == nColumnLabelsSize ); - for( sal_Int32 i=0; i { - lcl_ApplyCellToData( Sequence< double > & rOutData, - Sequence< OUString > & rOutRowLabels ) : + lcl_ApplyCellToData( Sequence< double > & rOutData ) : m_rData( rOutData ), - m_rRowLabels( rOutRowLabels ), m_nIndex( 0 ), m_nSize( rOutData.getLength()) { @@ -181,49 +166,11 @@ struct lcl_ApplyCellToData : public ::std::unary_function< SchXMLCell, void > private: Sequence< double > & m_rData; - Sequence< OUString > & m_rRowLabels; sal_Int32 m_nIndex; sal_Int32 m_nSize; double m_fNaN; }; -struct lcl_ApplyRowsToData : public ::std::unary_function< ::std::vector< SchXMLCell >, void > -{ - lcl_ApplyRowsToData( Sequence< Sequence< double > > & rOutData, - Sequence< OUString > & rOutRowLabels, - sal_Int32 nOffset, - bool bHasHeader ) : - m_rData( rOutData ), - m_rRowLabels( rOutRowLabels ), - m_nIndex( 0 ), - m_nOuterSize( rOutData.getLength()), - m_nOffset( nOffset ), - m_bHasHeader( bHasHeader ) - {} - void operator() ( const ::std::vector< SchXMLCell > & rRow ) - { - if( ! rRow.empty()) - { - // label - if( m_bHasHeader && m_nIndex < m_rRowLabels.getLength() && rRow.front().eType == SCH_CELL_TYPE_STRING ) - m_rRowLabels[m_nIndex] = rRow.front().aString; - - // values - if( m_nIndex < m_nOuterSize ) - ::std::for_each( rRow.begin() + m_nOffset, rRow.end(), lcl_ApplyCellToData( m_rData[m_nIndex], m_rRowLabels )); - } - ++m_nIndex; - } - -private: - Sequence< Sequence< double > > & m_rData; - Sequence< OUString > & m_rRowLabels; - sal_Int32 m_nIndex; - sal_Int32 m_nOuterSize; - sal_Int32 m_nOffset; - bool m_bHasHeader; -}; - Sequence< Sequence< double > > lcl_getSwappedArray( const Sequence< Sequence< double > > & rData ) { sal_Int32 nOldOuterSize = rData.getLength(); @@ -240,47 +187,6 @@ Sequence< Sequence< double > > lcl_getSwappedArray( const Sequence< Sequence< do return aResult; } -void lcl_applyXMLTableToInternalDataprovider( - const SchXMLTable & rTable, - const Reference< chart::XChartDataArray > & xDataArray ) -{ - sal_Int32 nNumRows( static_cast< sal_Int32 >( rTable.aData.size())); - sal_Int32 nRowOffset = 0; - if( rTable.bHasHeaderRow ) - { - --nNumRows; - nRowOffset = 1; - } - sal_Int32 nNumColumns( rTable.nMaxColumnIndex + 1 ); - sal_Int32 nColOffset = 0; - if( rTable.bHasHeaderColumn ) - { - --nNumColumns; - nColOffset = 1; - } - - Sequence< Sequence< double > > aData( nNumRows ); - Sequence< OUString > aRowLabels( nNumRows ); - Sequence< OUString > aColumnLabels( nNumColumns ); - for( sal_Int32 i=0; isetData( aData ); - - if( rTable.bHasHeaderColumn ) - xDataArray->setRowDescriptions( aRowLabels ); - if( rTable.bHasHeaderRow ) - xDataArray->setColumnDescriptions( aColumnLabels ); -} - void lcl_fillRangeMapping( const SchXMLTable & rTable, lcl_tOriginalRangeToInternalRangeMap & rOutRangeMap, @@ -833,7 +739,7 @@ void SchXMLTableCellContext::StartElement( const uno::Reference< xml::sax::XAttr } } - mbReadPara = sal_True; + mbReadText = sal_True; SchXMLCell aCell; aCell.eType = eValueType; @@ -844,8 +750,8 @@ void SchXMLTableCellContext::StartElement( const uno::Reference< xml::sax::XAttr SvXMLUnitConverter::convertDouble( fData, aCellContent ); aCell.fValue = fData; - // dont read following element - mbReadPara = sal_False; + // dont read text from following or element + mbReadText = sal_False; } mrTable.aData[ mrTable.nRowIndex ].push_back( aCell ); @@ -861,9 +767,17 @@ SvXMLImportContext* SchXMLTableCellContext::CreateChildContext( { SvXMLImportContext* pContext = 0; - // element - if( nPrefix == XML_NAMESPACE_TEXT && - IsXMLToken( rLocalName, XML_P ) ) + // element + if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_LIST ) && mbReadText ) + { + SchXMLCell& rCell = mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ]; + rCell.pComplexString = new Sequence< OUString >(); + rCell.eType = SCH_CELL_TYPE_COMPLEX_STRING; + pContext = new SchXMLTextListContext( GetImport(), rLocalName, *rCell.pComplexString ); + mbReadText = sal_False;//don't apply text from + } + // element - read text and range-id + else if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_P ) ) { pContext = new SchXMLParagraphContext( GetImport(), rLocalName, maCellContent, &maRangeId ); } @@ -877,7 +791,7 @@ SvXMLImportContext* SchXMLTableCellContext::CreateChildContext( void SchXMLTableCellContext::EndElement() { - if( mbReadPara && maCellContent.getLength()) + if( mbReadText && maCellContent.getLength() ) //apply text from element mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ].aString = maCellContent; if( maRangeId.getLength()) mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ].aRangeId = maRangeId; @@ -885,133 +799,90 @@ void SchXMLTableCellContext::EndElement() // ======================================== -// just interpret the table in a linear way with no references used -// (this is just a workaround for clipboard handling in EA2) -void SchXMLTableHelper::applyTableSimple( - const SchXMLTable& rTable, - const uno::Reference< chart::XChartDataArray > & xData ) +void lcl_ApplyCellToComplexLabel( const SchXMLCell& rCell, Sequence< OUString >& rComplexLabel ) { - // interpret table like this: - // - // series ----+---+ - // | | - // categories | | - // | | | - // V V V - // A B C ... - // 1 x x <--- labels - // 2 x 0 0 - // 3 x 0 0 - // ... - - // Standard Role-interpretation: - - // Column 1 contains the Categories - - // Chart Type/Class | Col 2 Col 3 Col 4 Col 5 Col 6 | Series | Domain - // -----------------+-----------------------------------+--------+------- - // Category Charts | Y 1 Y 2 Y 3 Y 4 ... | Y | - - // XY Chart | X all Y 1 Y 2 Y 3 ... | Y | X - // Stock Chart 1 | Min Max Close - - | Close | - - // Stock Chart 2 | Open Min Max Close - | Close | - - // Stock Chart 3 | Volume Min Max Close - | Close | - - // Stock Chart 4 | Volume Open Min Max Close | Close | - - - if( xData.is()) + if( rCell.eType == SCH_CELL_TYPE_STRING ) { - // get NaN - double fSolarNaN; - ::rtl::math::setNan( &fSolarNaN ); - double fNaN = fSolarNaN; - sal_Bool bConvertNaN = sal_False; - - uno::Reference< chart::XChartData > xChartData( xData, uno::UNO_QUERY ); - if( xChartData.is()) - { - fNaN = xChartData->getNotANumber(); - bConvertNaN = ( ! ::rtl::math::isNan( fNaN )); - } + rComplexLabel.realloc(1); + rComplexLabel[0] = rCell.aString; + } + else if( rCell.pComplexString && rCell.eType == SCH_CELL_TYPE_COMPLEX_STRING ) + rComplexLabel = *rCell.pComplexString; +} - sal_Int32 nRowCount = rTable.aData.size(); - sal_Int32 nColumnCount = 0; - sal_Int32 nCol = 0, nRow = 0; - if( nRowCount ) - { - nColumnCount = rTable.aData[ 0 ].size(); - ::std::vector< ::std::vector< SchXMLCell > >::const_iterator iRow = rTable.aData.begin(); - while( iRow != rTable.aData.end() ) - { - nColumnCount = ::std::max( nColumnCount, static_cast(iRow->size()) ); - iRow++; - } - } +void SchXMLTableHelper::applyTableToInternalDataProvider( + const SchXMLTable& rTable, + uno::Reference< chart2::XChartDocument > xChartDoc ) +{ + // apply all data read from the local table to the internal data provider + if( !xChartDoc.is() || !xChartDoc->hasInternalDataProvider() ) + return; + Reference< chart2::data::XDataProvider > xDataProv( xChartDoc->getDataProvider() ); + if( !xDataProv.is() ) + return; - // #i27909# avoid illegal index access for empty tables - if( nColumnCount == 0 || nRowCount == 0 ) - return; + //prepare the read local table data + sal_Int32 nNumRows( static_cast< sal_Int32 >( rTable.aData.size())); + sal_Int32 nRowOffset = 0; + if( rTable.bHasHeaderRow ) + { + --nNumRows; + nRowOffset = 1; + } + sal_Int32 nNumColumns( rTable.nMaxColumnIndex + 1 ); + sal_Int32 nColOffset = 0; + if( rTable.bHasHeaderColumn ) + { + --nNumColumns; + nColOffset = 1; + } - uno::Sequence< ::rtl::OUString > aCategories( nRowCount - 1 ); - uno::Sequence< ::rtl::OUString > aLabels( nColumnCount - 1 ); - uno::Sequence< uno::Sequence< double > > aData( nRowCount - 1 ); - for( nRow = 0; nRow < nRowCount - 1; nRow++ ) - aData[ nRow ].realloc( nColumnCount - 1 ); + Sequence< Sequence< double > > aDataInRows( nNumRows ); + Sequence< Sequence< OUString > > aComplexRowDescriptions( nNumRows ); + Sequence< Sequence< OUString > > aComplexColumnDescriptions( nNumColumns ); + for( sal_Int32 i=0; i >::const_iterator iRow = rTable.aData.begin(); - sal_Int32 nColumnCountOnFirstRow = iRow->size(); - for( nCol = 1; nCol < nColumnCountOnFirstRow; nCol++ ) + if( rTable.aData.begin() != rTable.aData.end()) + { + //apply column labels + if( rTable.bHasHeaderRow ) { - aLabels[ nCol - 1 ] = (*iRow)[ nCol ].aString; + const ::std::vector< SchXMLCell >& rFirstRow = rTable.aData.front(); + const sal_Int32 nColumnLabelsSize = aComplexColumnDescriptions.getLength(); + const sal_Int32 nMax = ::std::min< sal_Int32 >( nColumnLabelsSize, static_cast< sal_Int32 >( rFirstRow.size()) - nColOffset ); + OSL_ASSERT( nMax == nColumnLabelsSize ); + for( sal_Int32 i=0; isetColumnDescriptions( aLabels ); - double fVal; - const sal_Bool bConstConvertNan = bConvertNaN; - for( ++iRow, nRow = 0; iRow != rTable.aData.end(); iRow++, nRow++ ) + std::vector< ::std::vector< SchXMLCell > >::const_iterator aRowIter( rTable.aData.begin() + nRowOffset ); + std::vector< ::std::vector< SchXMLCell > >::const_iterator aEnd( rTable.aData.end() ); + for( sal_Int32 nRow = 0; aRowIter != aEnd && nRow < nNumRows; ++aRowIter, ++nRow ) { - aCategories[ nRow ] = (*iRow)[ 0 ].aString; - sal_Int32 nTableColCount( static_cast< sal_Int32 >((*iRow).size())); - for( nCol = 1; nCol < nTableColCount; nCol++ ) + const ::std::vector< SchXMLCell >& rRow = *aRowIter; + if( !rRow.empty() ) { - fVal = (*iRow)[ nCol ].fValue; - if( bConstConvertNan && - ::rtl::math::isNan( fVal )) - aData[ nRow ][ nCol - 1 ] = fNaN; - else - aData[ nRow ][ nCol - 1 ] = fVal; + // row label + if( rTable.bHasHeaderColumn ) + lcl_ApplyCellToComplexLabel( rRow.front(), aComplexRowDescriptions[nRow] ); + + // values + ::std::for_each( rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( aDataInRows[nRow] )); } - // set remaining cells to NaN - for( ; nCol < nColumnCount; ++nCol ) - if( bConstConvertNan ) - aData[ nRow ][nCol - 1 ] = fNaN; - else - ::rtl::math::setNan( &(aData[ nRow ][nCol - 1 ])); } - xData->setRowDescriptions( aCategories ); - xData->setData( aData ); } -} -// ---------------------------------------- - -void SchXMLTableHelper::applyTableToInternalDataProvider( - const SchXMLTable& rTable, - uno::Reference< chart2::XChartDocument > xChartDoc ) -{ - if( ! (xChartDoc.is() && xChartDoc->hasInternalDataProvider())) - return; - Reference< chart2::data::XDataProvider > xDataProv( xChartDoc->getDataProvider()); - Reference< chart::XChartDataArray > xDataArray( xDataProv, uno::UNO_QUERY ); - if( ! xDataArray.is()) + //apply the collected data to the chart + Reference< chart::XComplexDescriptionAccess > xDataAccess( xDataProv, uno::UNO_QUERY ); + if( !xDataAccess.is() ) return; - OSL_ASSERT( xDataProv.is()); - // prerequisite for this method: all objects (data series, domains, etc.) - // need their own range string. - - // apply all data read in the table to the chart data-array of the internal - // data provider - lcl_applyXMLTableToInternalDataprovider( rTable, xDataArray ); + xDataAccess->setData( aDataInRows ); + if( rTable.bHasHeaderColumn ) + xDataAccess->setComplexRowDescriptions( aComplexRowDescriptions ); + if( rTable.bHasHeaderRow ) + xDataAccess->setComplexColumnDescriptions( aComplexColumnDescriptions ); } void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary( diff --git a/xmloff/source/chart/SchXMLTableContext.hxx b/xmloff/source/chart/SchXMLTableContext.hxx index 7cff3e7ecff7..0148e46e003e 100644 --- a/xmloff/source/chart/SchXMLTableContext.hxx +++ b/xmloff/source/chart/SchXMLTableContext.hxx @@ -48,7 +48,6 @@ namespace com { namespace sun { namespace star { }} namespace chart { class XChartDocument; - class XChartDataArray; struct ChartSeriesAddress; }}}} @@ -99,21 +98,11 @@ private: sal_Int32& nRows, sal_Int32& nColumns ); public: - /// The data for the ChartDocument is applied linearly - static void applyTableSimple( - const SchXMLTable& rTable, - const com::sun::star::uno::Reference< com::sun::star::chart::XChartDataArray > & xData ); - - /** The data for the ChartDocument is applied by reading the - table, the addresses of series, the addresses of labels, - the cell-range-address for the categories - */ static void applyTableToInternalDataProvider( const SchXMLTable& rTable, com::sun::star::uno::Reference< com::sun::star::chart2::XChartDocument > xChartDoc ); - /** Second part of applyTableToInternalDataProvider that has to be called after the data series - got their styles set. This function reorders local data to fit the - correct data structure. + /** This function reorders local data to fit the correct data structure. + Call it after the data series got their styles set. */ static void switchRangesFromOuterToInternalIfNecessary( const SchXMLTable& rTable, const tSchXMLLSequencesPerIndex & rLSequencesPerIndex, @@ -223,7 +212,7 @@ private: SchXMLTable& mrTable; rtl::OUString maCellContent; rtl::OUString maRangeId; - sal_Bool mbReadPara; + sal_Bool mbReadText; public: SchXMLTableCellContext( SchXMLImportHelper& rImpHelper, diff --git a/xmloff/source/chart/SchXMLTextListContext.cxx b/xmloff/source/chart/SchXMLTextListContext.cxx new file mode 100755 index 000000000000..075c4c5150a5 --- /dev/null +++ b/xmloff/source/chart/SchXMLTextListContext.cxx @@ -0,0 +1,139 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SchXMLTextListContext.cxx,v $ + * $Revision: 1.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_xmloff.hxx" + +#include "SchXMLImport.hxx" +#include "SchXMLTextListContext.hxx" +#include "SchXMLParagraphContext.hxx" + +#include "xmlnmspe.hxx" +#include +#include + +using ::rtl::OUString; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using namespace com::sun::star; +using namespace ::xmloff::token; + +//------------------------------------------------- +class SchXMLListItemContext : public SvXMLImportContext +{ +public: + SchXMLListItemContext( SvXMLImport& rImport, const OUString& rLocalName, OUString& rText ); + virtual ~SchXMLListItemContext(); + virtual void StartElement( const Reference< xml::sax::XAttributeList >& xAttrList ); + virtual void EndElement(); + + virtual SvXMLImportContext* CreateChildContext( + USHORT nPrefix, + const ::rtl::OUString& rLocalName, + const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ); + +private: + ::rtl::OUString& m_rText; +}; + +SchXMLListItemContext::SchXMLListItemContext( + SvXMLImport& rImport + , const OUString& rLocalName + , OUString& rText ) + : SvXMLImportContext( rImport, XML_NAMESPACE_TEXT, rLocalName ) + , m_rText( rText ) +{ +} + +SchXMLListItemContext::~SchXMLListItemContext() +{} + +void SchXMLListItemContext::StartElement( const Reference< xml::sax::XAttributeList >& xAttrList ) +{ +} + +void SchXMLListItemContext::EndElement() +{ +} + +SvXMLImportContext* SchXMLListItemContext::CreateChildContext( + USHORT nPrefix, const OUString& rLocalName, + const uno::Reference< xml::sax::XAttributeList >& ) +{ + SvXMLImportContext* pContext = 0; + if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_P ) ) + pContext = new SchXMLParagraphContext( GetImport(), rLocalName, m_rText ); + else + pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); + return pContext; +} + +//------------------------------------------------- + +SchXMLTextListContext::SchXMLTextListContext( + SvXMLImport& rImport + , const OUString& rLocalName + , Sequence< OUString>& rTextList ) + : SvXMLImportContext( rImport, XML_NAMESPACE_TEXT, rLocalName ) + , m_rTextList( rTextList ) + , m_aTextVector() +{ +} + +SchXMLTextListContext::~SchXMLTextListContext() +{ +} + +void SchXMLTextListContext::StartElement( const Reference< xml::sax::XAttributeList >& xAttrList ) +{ +} + +void SchXMLTextListContext::EndElement() +{ + sal_Int32 nCount = m_aTextVector.size(); + m_rTextList.realloc(nCount); + for( sal_Int32 nN=0; nN& ) +{ + SvXMLImportContext* pContext = 0; + if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_LIST_ITEM ) ) + { + m_aTextVector.push_back( OUString() ); + pContext = new SchXMLListItemContext( GetImport(), rLocalName, m_aTextVector.back() ); + } + else + pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); + return pContext; +} diff --git a/xmloff/source/chart/SchXMLTextListContext.hxx b/xmloff/source/chart/SchXMLTextListContext.hxx new file mode 100755 index 000000000000..85ffc701ed95 --- /dev/null +++ b/xmloff/source/chart/SchXMLTextListContext.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SchXMLTextListContext.hxx,v $ + * $Revision: 1.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SCH_XMLTEXTLISTCONTEXT_HXX_ +#define _SCH_XMLTEXTLISTCONTEXT_HXX_ + +#include +#include "rtl/ustring.hxx" +#include + +namespace com { namespace sun { namespace star { namespace xml { namespace sax { + class XAttributeList; +}}}}} + +class SchXMLTextListContext : public SvXMLImportContext +{ +public: + SchXMLTextListContext( SvXMLImport& rImport, + const ::rtl::OUString& rLocalName, + ::com::sun::star::uno::Sequence< ::rtl::OUString>& rTextList ); + virtual ~SchXMLTextListContext(); + virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); + virtual void EndElement(); + + virtual SvXMLImportContext* CreateChildContext( + USHORT nPrefix, + const ::rtl::OUString& rLocalName, + const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ); + +private: + ::com::sun::star::uno::Sequence< ::rtl::OUString>& m_rTextList; + std::vector< ::rtl::OUString> m_aTextVector; +}; + +#endif // _SCH_XMLTEXTLISTCONTEXT_HXX_ diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx index e3e3389e18d2..b396485f0d7b 100644 --- a/xmloff/source/chart/contexts.cxx +++ b/xmloff/source/chart/contexts.cxx @@ -38,13 +38,6 @@ #include "SchXMLImport.hxx" #include "SchXMLCalculationSettingsContext.hxx" -// #ifndef _XMLOFF_XMLCHARTSTYLECONTEXT_HXX_ -// #include "XMLChartStyleContext.hxx" -// #endif -#include -#include -#include - #include "contexts.hxx" #include "SchXMLChartContext.hxx" diff --git a/xmloff/source/chart/makefile.mk b/xmloff/source/chart/makefile.mk index 5b47b77702d5..53964ee0eb8a 100644 --- a/xmloff/source/chart/makefile.mk +++ b/xmloff/source/chart/makefile.mk @@ -51,6 +51,7 @@ SLOFILES = $(SLO)$/ColorPropertySet.obj \ $(SLO)$/SchXMLChartContext.obj \ $(SLO)$/SchXMLPlotAreaContext.obj \ $(SLO)$/SchXMLParagraphContext.obj \ + $(SLO)$/SchXMLTextListContext.obj \ $(SLO)$/SchXMLSeriesHelper.obj \ $(SLO)$/SchXMLSeries2Context.obj \ $(SLO)$/PropertyMaps.obj \ diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx index 6046ec4606fc..c9eaf415a663 100644 --- a/xmloff/source/chart/transporttypes.hxx +++ b/xmloff/source/chart/transporttypes.hxx @@ -40,17 +40,37 @@ enum SchXMLCellType { SCH_CELL_TYPE_UNKNOWN, SCH_CELL_TYPE_FLOAT, - SCH_CELL_TYPE_STRING + SCH_CELL_TYPE_STRING, + SCH_CELL_TYPE_COMPLEX_STRING }; struct SchXMLCell { rtl::OUString aString; + ::com::sun::star::uno::Sequence< rtl::OUString >* pComplexString; double fValue; SchXMLCellType eType; rtl::OUString aRangeId; - SchXMLCell() : fValue( 0.0 ), eType( SCH_CELL_TYPE_UNKNOWN ) {} + SchXMLCell() : pComplexString(0), fValue( 0.0 ), eType( SCH_CELL_TYPE_UNKNOWN ) + {} + + SchXMLCell( const SchXMLCell& rOther ) + : aString( rOther.aString ) + , pComplexString( rOther.pComplexString ? new ::com::sun::star::uno::Sequence< rtl::OUString >( *rOther.pComplexString ) : 0 ) + , fValue( rOther.fValue ) + , eType( rOther.eType ) + , aRangeId( rOther.aRangeId ) + {} + + ~SchXMLCell() + { + if(pComplexString) + { + delete pComplexString; + pComplexString=0; + } + } }; struct SchXMLTable -- cgit From 146a0be53fef68cec76b2312239aaf412e1a89ea Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 29 Jan 2010 17:23:04 +0100 Subject: chartmultiline: fixed compiler warnings --- xmloff/source/chart/SchXMLTextListContext.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmloff/source/chart') diff --git a/xmloff/source/chart/SchXMLTextListContext.cxx b/xmloff/source/chart/SchXMLTextListContext.cxx index 075c4c5150a5..fbb6815046fc 100755 --- a/xmloff/source/chart/SchXMLTextListContext.cxx +++ b/xmloff/source/chart/SchXMLTextListContext.cxx @@ -75,7 +75,7 @@ SchXMLListItemContext::SchXMLListItemContext( SchXMLListItemContext::~SchXMLListItemContext() {} -void SchXMLListItemContext::StartElement( const Reference< xml::sax::XAttributeList >& xAttrList ) +void SchXMLListItemContext::StartElement( const Reference< xml::sax::XAttributeList >& /*xAttrList*/ ) { } @@ -111,7 +111,7 @@ SchXMLTextListContext::~SchXMLTextListContext() { } -void SchXMLTextListContext::StartElement( const Reference< xml::sax::XAttributeList >& xAttrList ) +void SchXMLTextListContext::StartElement( const Reference< xml::sax::XAttributeList >& /*xAttrList*/ ) { } -- cgit From 82b1d381cd7000675522fb2a075dd34545a1bbb2 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Fri, 12 Feb 2010 15:01:35 +0100 Subject: changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) --- xmloff/source/chart/ColorPropertySet.cxx | 5 +---- xmloff/source/chart/ColorPropertySet.hxx | 5 +---- xmloff/source/chart/MultiPropertySetHandler.hxx | 5 +---- xmloff/source/chart/PropertyMap.hxx | 5 +---- xmloff/source/chart/PropertyMaps.cxx | 5 +---- xmloff/source/chart/SchXMLAutoStylePoolP.cxx | 5 +---- xmloff/source/chart/SchXMLAutoStylePoolP.hxx | 5 +---- xmloff/source/chart/SchXMLCalculationSettingsContext.cxx | 5 +---- xmloff/source/chart/SchXMLCalculationSettingsContext.hxx | 5 +---- xmloff/source/chart/SchXMLChartContext.cxx | 5 +---- xmloff/source/chart/SchXMLChartContext.hxx | 5 +---- xmloff/source/chart/SchXMLExport.cxx | 5 +---- xmloff/source/chart/SchXMLImport.cxx | 5 +---- xmloff/source/chart/SchXMLParagraphContext.cxx | 5 +---- xmloff/source/chart/SchXMLParagraphContext.hxx | 5 +---- xmloff/source/chart/SchXMLPlotAreaContext.cxx | 5 +---- xmloff/source/chart/SchXMLPlotAreaContext.hxx | 5 +---- xmloff/source/chart/SchXMLSeries2Context.cxx | 5 +---- xmloff/source/chart/SchXMLSeries2Context.hxx | 5 +---- xmloff/source/chart/SchXMLSeriesHelper.cxx | 5 +---- xmloff/source/chart/SchXMLSeriesHelper.hxx | 5 +---- xmloff/source/chart/SchXMLTableContext.cxx | 5 +---- xmloff/source/chart/SchXMLTableContext.hxx | 5 +---- xmloff/source/chart/SchXMLTools.cxx | 5 +---- xmloff/source/chart/SchXMLTools.hxx | 5 +---- xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx | 5 +---- xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx | 5 +---- xmloff/source/chart/XMLChartPropertyContext.cxx | 5 +---- xmloff/source/chart/XMLChartPropertyContext.hxx | 5 +---- xmloff/source/chart/XMLChartStyleContext.cxx | 5 +---- xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx | 5 +---- xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx | 5 +---- xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx | 5 +---- xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx | 5 +---- xmloff/source/chart/XMLLabelSeparatorContext.cxx | 5 +---- xmloff/source/chart/XMLLabelSeparatorContext.hxx | 5 +---- xmloff/source/chart/XMLSymbolImageContext.cxx | 5 +---- xmloff/source/chart/XMLSymbolImageContext.hxx | 5 +---- xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx | 5 +---- xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx | 5 +---- xmloff/source/chart/XMLTextOrientationHdl.cxx | 5 +---- xmloff/source/chart/XMLTextOrientationHdl.hxx | 5 +---- xmloff/source/chart/contexts.cxx | 5 +---- xmloff/source/chart/contexts.hxx | 5 +---- xmloff/source/chart/makefile.mk | 6 +----- xmloff/source/chart/transporttypes.cxx | 5 +---- xmloff/source/chart/transporttypes.hxx | 5 +---- 47 files changed, 47 insertions(+), 189 deletions(-) (limited to 'xmloff/source/chart') diff --git a/xmloff/source/chart/ColorPropertySet.cxx b/xmloff/source/chart/ColorPropertySet.cxx index 92df2c06eb60..e65f00ef135f 100644 --- a/xmloff/source/chart/ColorPropertySet.cxx +++ b/xmloff/source/chart/ColorPropertySet.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColorPropertySet.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/ColorPropertySet.hxx b/xmloff/source/chart/ColorPropertySet.hxx index e677cbf8b487..32d11182c3b2 100644 --- a/xmloff/source/chart/ColorPropertySet.hxx +++ b/xmloff/source/chart/ColorPropertySet.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColorPropertySet.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/MultiPropertySetHandler.hxx b/xmloff/source/chart/MultiPropertySetHandler.hxx index efac8d2fc659..a0ccf8a1c92b 100644 --- a/xmloff/source/chart/MultiPropertySetHandler.hxx +++ b/xmloff/source/chart/MultiPropertySetHandler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MultiPropertySetHandler.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 1fdc18fe1035..0616040148b5 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PropertyMap.hxx,v $ - * $Revision: 1.34.8.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index 14794da9d43f..d2be11a0013e 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PropertyMaps.cxx,v $ - * $Revision: 1.56.40.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx index dde247cab05d..fc70b5831d9b 100644 --- a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx +++ b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLAutoStylePoolP.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.hxx b/xmloff/source/chart/SchXMLAutoStylePoolP.hxx index 9d177861812e..d16973347c1d 100644 --- a/xmloff/source/chart/SchXMLAutoStylePoolP.hxx +++ b/xmloff/source/chart/SchXMLAutoStylePoolP.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLAutoStylePoolP.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx index 4c5cad798b78..f66fd3fd8561 100755 --- a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx +++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLCalculationSettingsContext.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx index 8effa5696ed8..9fe2db8a30a4 100755 --- a/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx +++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLCalculationSettingsContext.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 1f854469b4be..fa6481015e5c 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLChartContext.cxx,v $ - * $Revision: 1.43 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx index e14f09f965ca..0f1fb0b4ab83 100644 --- a/xmloff/source/chart/SchXMLChartContext.hxx +++ b/xmloff/source/chart/SchXMLChartContext.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLChartContext.hxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f7cf82abe974..3dea947dcb8c 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLExport.cxx,v $ - * $Revision: 1.101 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index dd955e6d69d5..4f32e90e861f 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLImport.cxx,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx index 1d8a4e16bb8c..646d82e4ab79 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.cxx +++ b/xmloff/source/chart/SchXMLParagraphContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLParagraphContext.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLParagraphContext.hxx b/xmloff/source/chart/SchXMLParagraphContext.hxx index 4e7d551e91ea..a40c305d5d2c 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.hxx +++ b/xmloff/source/chart/SchXMLParagraphContext.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLParagraphContext.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 8bb4712b4159..53a32b9193e5 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLPlotAreaContext.cxx,v $ - * $Revision: 1.47.38.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index ed01ad2fa8da..56aa3e78c814 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLPlotAreaContext.hxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 4633a149e4df..91c2bc1b9b4a 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLSeries2Context.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLSeries2Context.hxx b/xmloff/source/chart/SchXMLSeries2Context.hxx index f0c8996de539..faa42b2809ac 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.hxx +++ b/xmloff/source/chart/SchXMLSeries2Context.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLSeries2Context.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx index 3b3cc2cf0986..a7518a6cbade 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.cxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLSeriesHelper.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLSeriesHelper.hxx b/xmloff/source/chart/SchXMLSeriesHelper.hxx index 7e5851ed2994..3af1654ef55b 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.hxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLSeriesHelper.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index a1c021171a92..742d42cb5f15 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLTableContext.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLTableContext.hxx b/xmloff/source/chart/SchXMLTableContext.hxx index 7cff3e7ecff7..e6c8ef61ac28 100644 --- a/xmloff/source/chart/SchXMLTableContext.hxx +++ b/xmloff/source/chart/SchXMLTableContext.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLTableContext.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index ebc48c0d24c0..c56330c1388c 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLTools.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx index 89d17fc440d9..35ac3ff72f1b 100644 --- a/xmloff/source/chart/SchXMLTools.hxx +++ b/xmloff/source/chart/SchXMLTools.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SchXMLTools.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx b/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx index 45b62f0cea04..3b16ca293901 100644 --- a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx +++ b/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLAxisPositionPropertyHdl.cxx,v $ - * $Revision: 1.1.2.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx b/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx index 592973ddd3bd..0f7438698816 100644 --- a/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx +++ b/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLAxisPositionPropertyHdl.hxx,v $ - * $Revision: 1.1.2.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLChartPropertyContext.cxx b/xmloff/source/chart/XMLChartPropertyContext.cxx index 5cf592c34280..c61fd2c610ea 100644 --- a/xmloff/source/chart/XMLChartPropertyContext.cxx +++ b/xmloff/source/chart/XMLChartPropertyContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLChartPropertyContext.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLChartPropertyContext.hxx b/xmloff/source/chart/XMLChartPropertyContext.hxx index 536849315415..c6f629d29fc6 100644 --- a/xmloff/source/chart/XMLChartPropertyContext.hxx +++ b/xmloff/source/chart/XMLChartPropertyContext.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLChartPropertyContext.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx index bc6b4110a31e..87adea123ab4 100644 --- a/xmloff/source/chart/XMLChartStyleContext.cxx +++ b/xmloff/source/chart/XMLChartStyleContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLChartStyleContext.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx index cc67c4ac75fa..2520454f1176 100644 --- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx +++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLErrorBarStylePropertyHdl.cxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx index 4b665f3af98e..af9b34b3bff7 100644 --- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx +++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLErrorBarStylePropertyHdl.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx index 1dd3cc3834d2..6dbb39926c6c 100644 --- a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx +++ b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLErrorIndicatorPropertyHdl.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx index 60f4e52fbd6c..70304f196379 100644 --- a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx +++ b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLErrorIndicatorPropertyHdl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.cxx b/xmloff/source/chart/XMLLabelSeparatorContext.cxx index 35df7c9dc312..dfebf77050f1 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.cxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLLabelSeparatorContext.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.hxx b/xmloff/source/chart/XMLLabelSeparatorContext.hxx index 4047373ee725..2678ca0ca7aa 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.hxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLLabelSeparatorContext.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLSymbolImageContext.cxx b/xmloff/source/chart/XMLSymbolImageContext.cxx index 1ee0055019b8..99ce619be43f 100644 --- a/xmloff/source/chart/XMLSymbolImageContext.cxx +++ b/xmloff/source/chart/XMLSymbolImageContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLSymbolImageContext.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLSymbolImageContext.hxx b/xmloff/source/chart/XMLSymbolImageContext.hxx index 44277137581b..419d2b61ed6d 100644 --- a/xmloff/source/chart/XMLSymbolImageContext.hxx +++ b/xmloff/source/chart/XMLSymbolImageContext.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLSymbolImageContext.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx b/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx index 7ea95aab8b57..b476a094540a 100644 --- a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx +++ b/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLSymbolTypePropertyHdl.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx b/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx index d4a8eb1951c5..df6f7310c18a 100644 --- a/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx +++ b/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLSymbolTypePropertyHdl.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLTextOrientationHdl.cxx b/xmloff/source/chart/XMLTextOrientationHdl.cxx index e030dcd50954..706cf5044178 100644 --- a/xmloff/source/chart/XMLTextOrientationHdl.cxx +++ b/xmloff/source/chart/XMLTextOrientationHdl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLTextOrientationHdl.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/XMLTextOrientationHdl.hxx b/xmloff/source/chart/XMLTextOrientationHdl.hxx index 50efb45d2f7d..a7fa80cef5c6 100644 --- a/xmloff/source/chart/XMLTextOrientationHdl.hxx +++ b/xmloff/source/chart/XMLTextOrientationHdl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLTextOrientationHdl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx index e3e3389e18d2..14928b697a1b 100644 --- a/xmloff/source/chart/contexts.cxx +++ b/xmloff/source/chart/contexts.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: contexts.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/contexts.hxx b/xmloff/source/chart/contexts.hxx index f6733350387c..1fb23147a34b 100644 --- a/xmloff/source/chart/contexts.hxx +++ b/xmloff/source/chart/contexts.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: contexts.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/makefile.mk b/xmloff/source/chart/makefile.mk index 5b47b77702d5..33c217e51326 100644 --- a/xmloff/source/chart/makefile.mk +++ b/xmloff/source/chart/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.15 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/transporttypes.cxx b/xmloff/source/chart/transporttypes.cxx index 120ceb5242e0..c0a1e65e0eba 100644 --- a/xmloff/source/chart/transporttypes.cxx +++ b/xmloff/source/chart/transporttypes.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: transporttypes.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx index 6046ec4606fc..213f97590c9d 100644 --- a/xmloff/source/chart/transporttypes.hxx +++ b/xmloff/source/chart/transporttypes.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: transporttypes.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify -- cgit From db02ac8b89b8ec1e3d84f2676665667916582423 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Fri, 12 Feb 2010 16:56:44 +0100 Subject: changefileheader2: #i10000#: convert files with CR/LF characters to CR only --- xmloff/source/chart/SchXMLTools.cxx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'xmloff/source/chart') diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index c56330c1388c..f5059f979b63 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -742,14 +742,14 @@ bool isDocumentGeneratedWithOpenOfficeOlderThan2_3( const uno::Reference< frame: uno::Reference< container::XChild > xChild( xChartModel, uno::UNO_QUERY ); if( xChild.is() ) { - aGenerator = lcl_getGeneratorFromModel( uno::Reference< frame::XModel >( xChild->getParent(), uno::UNO_QUERY) ); + aGenerator = lcl_getGeneratorFromModel( uno::Reference< frame::XModel >( xChild->getParent(), uno::UNO_QUERY) ); if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project") ) ) != -1 ) { - //the chart application has not created files without a meta stream since OOo 2.3 (OOo 2.3 has written a metastream already) - //only the report builder extension has created some files with OOo 3.1 that do not have a meta stream - if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/31") ) ) != -1 ) - bResult = false;//#i100102# probably generated with OOo 3.1 by the report designer - else + //the chart application has not created files without a meta stream since OOo 2.3 (OOo 2.3 has written a metastream already) + //only the report builder extension has created some files with OOo 3.1 that do not have a meta stream + if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/31") ) ) != -1 ) + bResult = false;//#i100102# probably generated with OOo 3.1 by the report designer + else bResult= true; //in this case the OLE chart was created by an older version, as OLE objects are sometimes stream copied the version can differ from the parents version, so the parents version is not a reliable indicator } else if( isDocumentGeneratedWithOpenOfficeOlderThan2_0(xChartModel) ) @@ -759,18 +759,18 @@ bool isDocumentGeneratedWithOpenOfficeOlderThan2_3( const uno::Reference< frame: return bResult; } -bool isDocumentGeneratedWithOpenOfficeOlderThan2_0( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel) -{ - bool bResult = false; - ::rtl::OUString aGenerator( lcl_getGeneratorFromModelOrItsParent(xChartModel) ); - if( ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org 1") ) ) == 0 ) - || ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice 6") ) ) == 0 ) - || ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice 7") ) ) == 0 ) - || ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StarSuite 6") ) ) == 0 ) - || ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StarSuite 7") ) ) == 0 ) - ) - bResult= true; - return bResult; +bool isDocumentGeneratedWithOpenOfficeOlderThan2_0( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel) +{ + bool bResult = false; + ::rtl::OUString aGenerator( lcl_getGeneratorFromModelOrItsParent(xChartModel) ); + if( ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org 1") ) ) == 0 ) + || ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice 6") ) ) == 0 ) + || ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice 7") ) ) == 0 ) + || ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StarSuite 6") ) ) == 0 ) + || ( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StarSuite 7") ) ) == 0 ) + ) + bResult= true; + return bResult; } Reference< chart2::data::XDataProvider > getDataProviderFromParent( const Reference< chart2::XChartDocument >& xChartDoc ) -- cgit