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 | |
parent | remove ToDouble/ToFloat (diff) | |
download | core-c2dc50c34b2b0797c4a1b468cc723d2f6b63572b.tar.gz core-c2dc50c34b2b0797c4a1b468cc723d2f6b63572b.zip |
removed unused code
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/drawingml/textbodyproperties.hxx | 1 | ||||
-rw-r--r-- | oox/inc/oox/drawingml/textliststyle.hxx | 4 | ||||
-rw-r--r-- | oox/inc/oox/export/chartexport.hxx | 5 | ||||
-rw-r--r-- | oox/source/drawingml/chart/objectformatter.cxx | 14 | ||||
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 5 | ||||
-rw-r--r-- | oox/source/drawingml/shape.cxx | 12 | ||||
-rw-r--r-- | oox/source/drawingml/textbodyproperties.cxx | 5 | ||||
-rw-r--r-- | oox/source/drawingml/textliststyle.cxx | 11 | ||||
-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 |
12 files changed, 0 insertions, 292 deletions
diff --git a/oox/inc/oox/drawingml/textbodyproperties.hxx b/oox/inc/oox/drawingml/textbodyproperties.hxx index e155d3082a6d..adb9c1fb84bc 100644 --- a/oox/inc/oox/drawingml/textbodyproperties.hxx +++ b/oox/inc/oox/drawingml/textbodyproperties.hxx @@ -47,7 +47,6 @@ struct TextBodyProperties explicit TextBodyProperties(); - void pushToPropMap( PropertyMap& rPropMap ) const; void pushVertSimulation(); }; diff --git a/oox/inc/oox/drawingml/textliststyle.hxx b/oox/inc/oox/drawingml/textliststyle.hxx index 5ce8ef7d2e05..29d8f29a48ce 100644 --- a/oox/inc/oox/drawingml/textliststyle.hxx +++ b/oox/inc/oox/drawingml/textliststyle.hxx @@ -51,10 +51,6 @@ public: inline const TextParagraphPropertiesVector& getAggregationListStyle() const { return maAggregationListStyle; }; inline TextParagraphPropertiesVector& getAggregationListStyle() { return maAggregationListStyle; }; -#if OSL_DEBUG_LEVEL > 0 - void dump() const; -#endif - protected: TextParagraphPropertiesVector maListStyle; diff --git a/oox/inc/oox/export/chartexport.hxx b/oox/inc/oox/export/chartexport.hxx index 5bca83f92048..e041c3812504 100644 --- a/oox/inc/oox/export/chartexport.hxx +++ b/oox/inc/oox/export/chartexport.hxx @@ -157,9 +157,6 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > > & aSeriesSeq, sal_Bool bJapaneseCandleSticks, sal_Int32& nAttachedAxis ); - void exportDataSeq( - const com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xValueSeq, - sal_Int32 elementTokenId ); void exportSeriesText( const com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xValueSeq ); void exportSeriesCategory( @@ -176,8 +173,6 @@ private: void exportFirstSliceAng(); void exportAxes( ); - void exportXAxis( AxisIdPair aAxisIdPair ); - void exportYAxis( AxisIdPair aAxisIdPair ); void exportAxis( AxisIdPair aAxisIdPair ); void _exportAxis( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xAxisProp, diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index ab9e4cce412f..2dfdaf984bbb 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -728,11 +728,6 @@ public: PropertySet& rPropSet, const TextCharacterProperties& rTextProps ); - /** Sets automatic line properties to the passed property set. */ - void convertAutomaticLine( - PropertySet& rPropSet, - sal_Int32 nSeriesIdx ); - /** Sets automatic fill properties to the passed property set. */ void convertAutomaticFill( PropertySet& rPropSet, @@ -1017,15 +1012,6 @@ void ObjectTypeFormatter::convertTextFormatting( PropertySet& rPropSet, const Te maTextFormatter.convertFormatting( rPropSet, &rTextProps ); } -void ObjectTypeFormatter::convertAutomaticLine( PropertySet& rPropSet, sal_Int32 nSeriesIdx ) -{ - ShapePropertyMap aPropMap( mrModelObjHelper, *mrEntry.mpPropInfo ); - ModelRef< Shape > xShapeProp; - maLineFormatter.convertFormatting( aPropMap, xShapeProp, nSeriesIdx ); - maEffectFormatter.convertFormatting( aPropMap, xShapeProp, nSeriesIdx ); - rPropSet.setProperties( aPropMap ); -} - void ObjectTypeFormatter::convertAutomaticFill( PropertySet& rPropSet, sal_Int32 nSeriesIdx ) { ShapePropertyMap aPropMap( mrModelObjHelper, *mrEntry.mpPropInfo ); diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 0a49985c732c..07df75d5e59b 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -376,11 +376,6 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, // ============================================================================ -void GraphicProperties::assignUsed( const GraphicProperties& rSourceProps ) -{ - maBlipProps.assignUsed( rSourceProps.maBlipProps ); -} - void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const { if( maBlipProps.mxGraphic.is() ) diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index a2e29c5ba159..d9f30f737879 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -584,18 +584,6 @@ Reference< XShape > Shape::createAndInsert( return mxShape; } -// the properties of rSource which are not part of rDest are being put into rDest -void addMissingProperties( const PropertyMap& rSource, PropertyMap& rDest ) -{ - PropertyMap::const_iterator aSourceIter( rSource.begin() ); - while( aSourceIter != rSource.end() ) - { - if ( rDest.find( (*aSourceIter ).first ) == rDest.end() ) - rDest[ (*aSourceIter).first ] <<= (*aSourceIter).second; - ++aSourceIter; - } -} - void Shape::setTextBody(const TextBodyPtr & pTextBody) { mpTextBody = pTextBody; diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx index b79883a2d12d..d00764770e12 100644 --- a/oox/source/drawingml/textbodyproperties.cxx +++ b/oox/source/drawingml/textbodyproperties.cxx @@ -45,11 +45,6 @@ TextBodyProperties::TextBodyProperties(): { } -void TextBodyProperties::pushToPropMap( PropertyMap& rPropMap ) const -{ - rPropMap.insert( maPropertyMap.begin(), maPropertyMap.end() ); -} - /* For Legacy purposes: TODO: Check if it is required at all! */ void TextBodyProperties::pushVertSimulation() { diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx index 663a5d5f9a5b..520c5d6b73d1 100644 --- a/oox/source/drawingml/textliststyle.cxx +++ b/oox/source/drawingml/textliststyle.cxx @@ -66,17 +66,6 @@ void TextListStyle::apply( const TextListStyle& rTextListStyle ) applyStyleList( rTextListStyle.getListStyle(), getListStyle() ); } -#ifdef DBG_UTIL -void TextListStyle::dump() const -{ - for ( int i = 0; i < 9; i++ ) - { - OSL_TRACE("text list style level: %d", i); - maListStyle[i]->dump(); - } -} -#endif - } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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; |