diff options
author | Petr Vorel <petr.vorel@gmail.com> | 2012-03-20 12:43:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-20 12:57:34 +0000 |
commit | c2dc50c34b2b0797c4a1b468cc723d2f6b63572b (patch) | |
tree | 853644e25eaf1320d472f04aaf9adc8610e89e4b /oox/source/export | |
parent | 55a40209072bac2526e74d5be7dd7be5ccd2c175 (diff) |
removed unused code
Diffstat (limited to 'oox/source/export')
-rw-r--r-- | oox/source/export/ColorPropertySet.cxx | 10 | ||||
-rw-r--r-- | oox/source/export/ColorPropertySet.hxx | 3 | ||||
-rw-r--r-- | oox/source/export/chartexport.cxx | 187 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 35 |
4 files changed, 0 insertions, 235 deletions
diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx index 5c88ed805cc9..eb10b35f4756 100644 --- a/oox/source/export/ColorPropertySet.cxx +++ b/oox/source/export/ColorPropertySet.cxx @@ -111,16 +111,6 @@ ColorPropertySet::ColorPropertySet( sal_Int32 nColor, bool bFillColor /* = true ColorPropertySet::~ColorPropertySet() {} -void ColorPropertySet::setColor( sal_Int32 nColor ) -{ - m_nColor = nColor; -} - -sal_Int32 ColorPropertySet::getColor() -{ - return m_nColor; -} - // ____ XPropertySet ____ Reference< XPropertySetInfo > SAL_CALL ColorPropertySet::getPropertySetInfo() diff --git a/oox/source/export/ColorPropertySet.hxx b/oox/source/export/ColorPropertySet.hxx index 0da33fc51369..3b3c20dfe989 100644 --- a/oox/source/export/ColorPropertySet.hxx +++ b/oox/source/export/ColorPropertySet.hxx @@ -47,9 +47,6 @@ public: explicit ColorPropertySet( sal_Int32 nColor, bool bFillColor = true ); virtual ~ColorPropertySet(); - void setColor( sal_Int32 nColor ); - sal_Int32 getColor(); - protected: // ____ XPropertySet ____ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index bdf5219765fe..879509a6b76c 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -357,20 +357,6 @@ OUString lcl_ConvertRange( const ::rtl::OUString & rRange, const Reference< char typedef ::std::pair< OUString, OUString > tLabelAndValueRange; -sal_Int32 lcl_getSequenceLengthByRole( - const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aSeqCnt, - const OUString & rRole ) -{ - Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( - lcl_getDataSequenceByRole( aSeqCnt, rRole )); - if( xLabeledSeq.is()) - { - Reference< chart2::data::XDataSequence > xSeq( xLabeledSeq->getValues()); - return xSeq->getData().getLength(); - } - return 0; -} - OUString lcl_flattenStringSequence( const Sequence< OUString > & rSequence ) { OUStringBuffer aResult; @@ -432,26 +418,6 @@ void lcl_fillCategoriesIntoStringVector( } } -double lcl_getValueFromSequence( const Reference< chart2::data::XDataSequence > & xSeq, sal_Int32 nIndex ) -{ - double fResult = 0.0; - ::rtl::math::setNan( &fResult ); - Reference< chart2::data::XNumericalDataSequence > xNumSeq( xSeq, uno::UNO_QUERY ); - if( xNumSeq.is()) - { - Sequence< double > aValues( xNumSeq->getNumericalData()); - if( nIndex < aValues.getLength() ) - fResult = aValues[nIndex]; - } - else - { - Sequence< uno::Any > aAnies( xSeq->getData()); - if( nIndex < aAnies.getLength() ) - aAnies[nIndex] >>= fResult; - } - return fResult; -} - ::std::vector< double > lcl_getAllValuesFromSequence( const Reference< chart2::data::XDataSequence > & xSeq ) { double fNan = 0.0; @@ -475,31 +441,6 @@ double lcl_getValueFromSequence( const Reference< chart2::data::XDataSequence > return aResult; } -bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSequence >& xDataSequence ) -{ - if( !xDataSequence.is() ) - return false; - uno::Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY ); - if( xProp.is() ) - { - uno::Sequence< sal_Int32 > aHiddenValues; - try - { - xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "HiddenValues" ) ) ) >>= aHiddenValues; - if( !aHiddenValues.getLength() ) - return true; - } - catch( uno::Exception& ) - { - return true; - } - } - if( xDataSequence->getData().getLength() ) - return true; - return false; -} - - sal_Int32 lcl_getChartType( const OUString& sChartType ) { chart::TypeId eChartTypeId = chart::TYPEID_UNKNOWN; @@ -1770,27 +1711,6 @@ void ChartExport::exportCandleStickSeries( -void ChartExport::exportDataSeq( const Reference< chart2::data::XDataSequence > & xValueSeq, sal_Int32 elementTokenId ) -{ - FSHelperPtr pFS = GetFS(); - Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY ); - pFS->startElement( FSNS( XML_c, elementTokenId ), - FSEND ); - - sal_Int32 eTokenId1 = elementTokenId == XML_val ? XML_numRef:XML_strRef; - OUString aCellRange = lcl_ConvertRange( xValueSeq->getSourceRangeRepresentation(), xNewDoc ); - pFS->startElement( FSNS( XML_c, eTokenId1 ), - FSEND ); - - pFS->startElement( FSNS( XML_c, XML_f ), - FSEND ); - pFS->writeEscaped( aCellRange ); - pFS->endElement( FSNS( XML_c, XML_f ) ); - - pFS->endElement( FSNS( XML_c, eTokenId1 ) ); - pFS->endElement( FSNS( XML_c, elementTokenId ) ); -} - void ChartExport::exportSeriesText( const Reference< chart2::data::XDataSequence > & xValueSeq ) { FSHelperPtr pFS = GetFS(); @@ -2126,113 +2046,6 @@ void ChartExport::exportAxis( AxisIdPair aAxisIdPair ) _exportAxis( xAxisProp, xAxisTitle, xMajorGrid, xMinorGrid, nAxisType, sAxPos, aAxisIdPair ); } -void ChartExport::exportXAxis( AxisIdPair aAxisIdPair ) -{ - // get some properties from document first - sal_Bool bHasXAxisTitle = sal_False, - bHasSecondaryXAxisTitle = sal_False; - sal_Bool bHasXAxisMajorGrid = sal_False, - bHasXAxisMinorGrid = sal_False; - - Reference< XPropertySet > xDiagramProperties (mxDiagram, uno::UNO_QUERY); - - xDiagramProperties->getPropertyValue( - OUString (RTL_CONSTASCII_USTRINGPARAM ("HasXAxisTitle"))) >>= bHasXAxisTitle; - xDiagramProperties->getPropertyValue( - OUString (RTL_CONSTASCII_USTRINGPARAM ("HasSecondaryXAxisTitle"))) >>= bHasSecondaryXAxisTitle; - - xDiagramProperties->getPropertyValue( - OUString (RTL_CONSTASCII_USTRINGPARAM ("HasXAxisGrid"))) >>= bHasXAxisMajorGrid; - - xDiagramProperties->getPropertyValue( - OUString (RTL_CONSTASCII_USTRINGPARAM ("HasXAxisHelpGrid"))) >>= bHasXAxisMinorGrid; - - // catAx - Reference< ::com::sun::star::chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY ); - if( !xAxisXSupp.is()) - return; - - Reference< XPropertySet > xAxisProp = xAxisXSupp->getXAxis(); - if( !xAxisProp.is() ) - return; - - sal_Int32 nAxisType = XML_catAx; - sal_Int32 eChartType = getChartType( ); - if( (eChartType == chart::TYPEID_SCATTER) - || (eChartType == chart::TYPEID_BUBBLE) ) - nAxisType = XML_valAx; - else if( eChartType == chart::TYPEID_STOCK ) - nAxisType = XML_dateAx; - - Reference< drawing::XShape > xAxisTitle; - if( bHasXAxisTitle ) - xAxisTitle.set( xAxisXSupp->getXAxisTitle(), uno::UNO_QUERY ); - - // FIXME: axPos, need to check axis direction - const char* sAxPos = "b"; - // major grid line - Reference< beans::XPropertySet > xMajorGrid; - if( bHasXAxisMajorGrid ) - xMajorGrid.set( xAxisXSupp->getXMainGrid(), uno::UNO_QUERY ); - - // minor grid line - Reference< beans::XPropertySet > xMinorGrid; - if( bHasXAxisMinorGrid ) - xMinorGrid.set( xAxisXSupp->getXHelpGrid(), uno::UNO_QUERY ); - - _exportAxis( xAxisProp, xAxisTitle, xMajorGrid, xMinorGrid, nAxisType, sAxPos, aAxisIdPair ); -} - -void ChartExport::exportYAxis( AxisIdPair aAxisIdPair ) -{ - // get some properties from document first - sal_Bool bHasYAxisTitle = sal_False, - bHasSecondaryYAxisTitle = sal_False; - sal_Bool bHasYAxisMajorGrid = sal_False, - bHasYAxisMinorGrid = sal_False; - - Reference< XPropertySet > xDiagramProperties (mxDiagram, uno::UNO_QUERY); - - xDiagramProperties->getPropertyValue( - OUString (RTL_CONSTASCII_USTRINGPARAM ("HasYAxisTitle"))) >>= bHasYAxisTitle; - xDiagramProperties->getPropertyValue( - OUString (RTL_CONSTASCII_USTRINGPARAM ("HasSecondaryYAxisTitle"))) >>= bHasSecondaryYAxisTitle; - - xDiagramProperties->getPropertyValue( - OUString (RTL_CONSTASCII_USTRINGPARAM ("HasYAxisGrid"))) >>= bHasYAxisMajorGrid; - xDiagramProperties->getPropertyValue( - OUString (RTL_CONSTASCII_USTRINGPARAM ("HasYAxisHelpGrid"))) >>= bHasYAxisMinorGrid; - - Reference< ::com::sun::star::chart::XAxisYSupplier > xAxisYSupp( mxDiagram, uno::UNO_QUERY ); - if( !xAxisYSupp.is()) - return; - - Reference< XPropertySet > xAxisProp = xAxisYSupp->getYAxis(); - if( !xAxisProp.is() ) - return; - - sal_Int32 nAxisType = XML_valAx; - - Reference< drawing::XShape > xAxisTitle; - if( bHasYAxisTitle ) - xAxisTitle.set( xAxisYSupp->getYAxisTitle(), uno::UNO_QUERY ); - - // FIXME: axPos - const char* sAxPos = "l"; - - // major grid line - Reference< beans::XPropertySet > xMajorGrid; - if( bHasYAxisMajorGrid ) - xMajorGrid.set( xAxisYSupp->getYMainGrid(), uno::UNO_QUERY ); - - // minor grid line - Reference< beans::XPropertySet > xMinorGrid; - if( bHasYAxisMinorGrid ) - xMinorGrid.set( xAxisYSupp->getYHelpGrid(), uno::UNO_QUERY ); - - _exportAxis( xAxisProp, xAxisTitle, xMajorGrid, xMinorGrid, nAxisType, sAxPos, aAxisIdPair ); -} - void ChartExport::_exportAxis( const Reference< XPropertySet >& xAxisProp, const Reference< drawing::XShape >& xAxisTitle, diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index b77318c9028b..01e4c015f3b3 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -117,41 +117,6 @@ namespace drawingml { #define GET(variable, propName) \ if ( GETA(propName) ) \ mAny >>= variable; -DBG( -void lcl_dump_pset(Reference< XPropertySet > rXPropSet) -{ - Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo (); - Sequence< beans::Property > props = info->getProperties (); - - for (int i=0; i < props.getLength (); i++) { - OString name = OUStringToOString( props [i].Name, RTL_TEXTENCODING_UTF8); - fprintf (stderr,"%30s = ", name.getStr() ); - - try { - Any value = rXPropSet->getPropertyValue( props [i].Name ); - - OUString strValue; - sal_Int32 intValue; - bool boolValue; - LineSpacing spacing; - - if( value >>= strValue ) - fprintf (stderr,"\"%s\"\n", USS( strValue ) ); - else if( value >>= intValue ) - fprintf (stderr,"%" SAL_PRIdINT32 " (hex: %" SAL_PRIxUINT32 ")\n", intValue, intValue); - else if( value >>= boolValue ) - fprintf (stderr,"%d (bool)\n", boolValue); - else if( value >>= spacing ) { - fprintf (stderr, "mode: %d value: %d\n", spacing.Mode, spacing.Height); - } - else - fprintf (stderr,"??? <unhandled type>\n"); - } catch(const Exception &) { - fprintf (stderr,"unable to get '%s' value\n", USS(props [i].Name)); - } - } -} -); // not thread safe int DrawingML::mnImageCounter = 1; |