diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-02-23 21:22:21 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-02-23 22:45:08 +0100 |
commit | 660cb78cd6900ffebe215ad4b3913bbe35ac9883 (patch) | |
tree | 7b267b359c1649c3c8bfe43b3e106c578e804c8c /oox | |
parent | cf2dede2132eef56bda324396ede7ee61d8f4a2b (diff) |
unusedcode: remove something from oox
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/helper/attributelist.hxx | 14 | ||||
-rw-r--r-- | oox/inc/oox/helper/propertymap.hxx | 5 | ||||
-rw-r--r-- | oox/inc/oox/xls/commentsbuffer.hxx | 2 | ||||
-rw-r--r-- | oox/inc/oox/xls/drawingbase.hxx | 2 | ||||
-rw-r--r-- | oox/inc/oox/xls/formulaparser.hxx | 6 | ||||
-rw-r--r-- | oox/inc/oox/xls/sheetdatabuffer.hxx | 14 | ||||
-rw-r--r-- | oox/inc/oox/xls/stylesbuffer.hxx | 4 | ||||
-rw-r--r-- | oox/source/helper/attributelist.cxx | 24 | ||||
-rw-r--r-- | oox/source/helper/propertymap.cxx | 35 | ||||
-rw-r--r-- | oox/source/xls/commentsbuffer.cxx | 44 | ||||
-rw-r--r-- | oox/source/xls/drawingbase.cxx | 9 | ||||
-rw-r--r-- | oox/source/xls/formulaparser.cxx | 27 | ||||
-rw-r--r-- | oox/source/xls/sheetdatabuffer.cxx | 41 | ||||
-rw-r--r-- | oox/source/xls/stylesbuffer.cxx | 12 |
14 files changed, 0 insertions, 239 deletions
diff --git a/oox/inc/oox/helper/attributelist.hxx b/oox/inc/oox/helper/attributelist.hxx index bf6524cadad0..d0a060015afa 100644 --- a/oox/inc/oox/helper/attributelist.hxx +++ b/oox/inc/oox/helper/attributelist.hxx @@ -122,12 +122,6 @@ public: /** Returns the 32-bit signed integer value of the specified attribute (hexadecimal). */ OptValue< sal_Int32 > getIntegerHex( sal_Int32 nAttrToken ) const; - /** Returns the 32-bit unsigned integer value of the specified attribute (hexadecimal). */ - OptValue< sal_uInt32 > getUnsignedHex( sal_Int32 nAttrToken ) const; - - /** Returns the 64-bit signed integer value of the specified attribute (hexadecimal). */ - OptValue< sal_Int64 > getHyperHex( sal_Int32 nAttrToken ) const; - /** Returns the boolean value of the specified attribute. */ OptValue< bool > getBool( sal_Int32 nAttrToken ) const; @@ -168,14 +162,6 @@ public: or the passed default value if the attribute is missing or not convertible. */ sal_Int32 getIntegerHex( sal_Int32 nAttrToken, sal_Int32 nDefault ) const; - /** Returns the 32-bit unsigned integer value of the specified attribute (hexadecimal), - or the passed default value if the attribute is missing or not convertible. */ - sal_uInt32 getUnsignedHex( sal_Int32 nAttrToken, sal_uInt32 nDefault ) const; - - /** Returns the 64-bit signed integer value of the specified attribute (hexadecimal), - or the passed default value if the attribute is missing or not convertible. */ - sal_Int64 getHyperHex( sal_Int32 nAttrToken, sal_Int64 nDefault ) const; - /** Returns the boolean value of the specified attribute, or the passed default value if the attribute is missing or not convertible to bool. */ bool getBool( sal_Int32 nAttrToken, bool bDefault ) const; diff --git a/oox/inc/oox/helper/propertymap.hxx b/oox/inc/oox/helper/propertymap.hxx index 37b723e75df8..0542de6bc11b 100644 --- a/oox/inc/oox/helper/propertymap.hxx +++ b/oox/inc/oox/helper/propertymap.hxx @@ -68,9 +68,6 @@ public: inline bool hasProperty( sal_Int32 nPropId ) const { return find( nPropId ) != end(); } - /** Returns the property value of the specified property, or 0 if not found. */ - const ::com::sun::star::uno::Any* getProperty( sal_Int32 nPropId ) const; - /** Sets the specified property to the passed value. Does nothing, if the identifier is invalid. */ inline bool setAnyProperty( sal_Int32 nPropId, const ::com::sun::star::uno::Any& rValue ) @@ -103,8 +100,6 @@ public: makePropertySet() const; #if OSL_DEBUG_LEVEL > 0 - static void dump( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet); - void dump(); static void dumpCode( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet); void dumpCode(); #endif diff --git a/oox/inc/oox/xls/commentsbuffer.hxx b/oox/inc/oox/xls/commentsbuffer.hxx index a0017ef70c0c..b8731932c0c0 100644 --- a/oox/inc/oox/xls/commentsbuffer.hxx +++ b/oox/inc/oox/xls/commentsbuffer.hxx @@ -71,8 +71,6 @@ public: void importComment( const AttributeList& rAttribs ); /** Imports a cell comment Properties from the passed attributes of the comment element. */ void importCommentPr( const AttributeList& rAttribs ); - /** Imports the anchor points in CommentPr */ - void importAnchor( bool bFrom, sal_Int32 nWhich, const ::rtl::OUString &rChars ); /** Imports a cell comment from the passed stream of a COMMENT record. */ void importComment( SequenceInputStream& rStrm ); /** Imports a cell comment from the passed stream of a NOTE record. */ diff --git a/oox/inc/oox/xls/drawingbase.hxx b/oox/inc/oox/xls/drawingbase.hxx index 95fae469b8ab..d7188b565647 100644 --- a/oox/inc/oox/xls/drawingbase.hxx +++ b/oox/inc/oox/xls/drawingbase.hxx @@ -111,8 +111,6 @@ public: /** Calculates the resulting shape anchor in 1/100 mm. */ ::com::sun::star::awt::Rectangle calcAnchorRectHmm( const ::com::sun::star::awt::Size& rPageSizeHmm ) const; - /** Returns the 'to' cell if it exists */ - ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > getToCell() const; /** Returns the 'from' cell if it exists */ ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > getFromCell() const; /** Applies Cell Anchor to an XShape if needed*/ diff --git a/oox/inc/oox/xls/formulaparser.hxx b/oox/inc/oox/xls/formulaparser.hxx index e85ff19e69c1..3c5595639aa3 100644 --- a/oox/inc/oox/xls/formulaparser.hxx +++ b/oox/inc/oox/xls/formulaparser.hxx @@ -143,18 +143,12 @@ public: /** Converts the passed token index of a defined name to a formula calling that name. */ ApiTokenSequence convertNameToFormula( sal_Int32 nTokenIndex ) const; - /** Converts the passed number into a HYPERLINK formula with the passed URL. */ - ApiTokenSequence convertNumberToHyperlink( const ::rtl::OUString& rUrl, double fValue ) const; - /** Converts the passed XML formula to an OLE link target. */ ::rtl::OUString importOleTargetLink( const ::rtl::OUString& rFormulaString ); /** Imports and converts an OLE link target from the passed stream. */ ::rtl::OUString importOleTargetLink( SequenceInputStream& rStrm ); - /** Imports and converts an OLE link target from the passed stream. */ - ::rtl::OUString importOleTargetLink( BiffInputStream& rStrm, const sal_uInt16* pnFmlaSize = 0 ) const; - /** Converts the passed formula to a macro name for a drawing shape. */ ::rtl::OUString importMacroName( const ::rtl::OUString& rFormulaString ); diff --git a/oox/inc/oox/xls/sheetdatabuffer.hxx b/oox/inc/oox/xls/sheetdatabuffer.hxx index 8e19f8ad1fd5..d715f07705e3 100644 --- a/oox/inc/oox/xls/sheetdatabuffer.hxx +++ b/oox/inc/oox/xls/sheetdatabuffer.hxx @@ -246,7 +246,6 @@ public: private: struct XfIdRowRange; - struct XfIdRange; /** Sets the passed formula token array into a cell. */ void setCellFormula( @@ -300,23 +299,10 @@ private: sal_Int32 mnXfId; /// XF identifier for the row range. explicit XfIdRowRange(); - bool intersects( const ::com::sun::star::table::CellRangeAddress& rRange ) const; void set( sal_Int32 nRow, sal_Int32 nXfId ); bool tryExpand( sal_Int32 nRow, sal_Int32 nXfId ); }; - /** Stores information about a range of cells with equal formatting. */ - struct XfIdRange - { - ::com::sun::star::table::CellRangeAddress - maRange; /// The formatted cell range. - sal_Int32 mnXfId; /// XF identifier for the range. - sal_Int32 mnNumFmtId; /// Number format overriding the XF. - - void set( const ::com::sun::star::table::CellAddress& rCellAddr, sal_Int32 nXfId, sal_Int32 nNumFmtId ); - bool tryExpand( const ::com::sun::star::table::CellAddress& rCellAddr, sal_Int32 nXfId, sal_Int32 nNumFmtId ); - bool tryMerge( const XfIdRange& rXfIdRange ); - }; typedef ::std::pair< sal_Int32, sal_Int32 > XfIdNumFmtKey; typedef ::std::map< XfIdNumFmtKey, ApiCellRangeList > XfIdRangeListMap; diff --git a/oox/inc/oox/xls/stylesbuffer.hxx b/oox/inc/oox/xls/stylesbuffer.hxx index 68d7431889ea..f2099743f60e 100644 --- a/oox/inc/oox/xls/stylesbuffer.hxx +++ b/oox/inc/oox/xls/stylesbuffer.hxx @@ -116,8 +116,6 @@ public: void importColor( SequenceInputStream& rStrm ); /** Imports a 32-bit palette color identifier from the passed BIFF12 stream. */ void importColorId( SequenceInputStream& rStrm ); - /** Imports a 32-bit RGBA color value from the passed BIFF12 stream. */ - void importColorRgb( SequenceInputStream& rStrm ); /** Imports an 8-bit or 16-bit palette color identifier from the passed BIFF stream. */ void importColorId( BiffInputStream& rStrm, bool b16Bit = true ); @@ -788,8 +786,6 @@ public: inline const Alignment& getAlignment() const { return maAlignment; } /** Returns the cell protection data of this style. */ inline const Protection& getProtection() const { return maProtection; } - /** Returns true, if any "attribute used" flags are ste in this XF. */ - bool hasAnyUsedFlags() const; /** Writes all formatting attributes to the passed property map. */ void writeToPropertyMap( PropertyMap& rPropMap ) const; diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx index 2d7445037c77..33f4ed554437 100644 --- a/oox/source/helper/attributelist.cxx +++ b/oox/source/helper/attributelist.cxx @@ -204,20 +204,6 @@ OptValue< sal_Int32 > AttributeList::getIntegerHex( sal_Int32 nAttrToken ) const return OptValue< sal_Int32 >( bValid, bValid ? AttributeConversion::decodeIntegerHex( aValue ) : 0 ); } -OptValue< sal_uInt32 > AttributeList::getUnsignedHex( sal_Int32 nAttrToken ) const -{ - OUString aValue = mxAttribs->getOptionalValue( nAttrToken ); - bool bValid = !aValue.isEmpty(); - return OptValue< sal_uInt32 >( bValid, bValid ? AttributeConversion::decodeUnsignedHex( aValue ) : 0 ); -} - -OptValue< sal_Int64 > AttributeList::getHyperHex( sal_Int32 nAttrToken ) const -{ - OUString aValue = mxAttribs->getOptionalValue( nAttrToken ); - bool bValid = !aValue.isEmpty(); - return OptValue< sal_Int64 >( bValid, bValid ? AttributeConversion::decodeHyperHex( aValue ) : 0 ); -} - OptValue< bool > AttributeList::getBool( sal_Int32 nAttrToken ) const { // boolean attributes may be "t", "f", "true", "false", "on", "off", "1", or "0" @@ -301,16 +287,6 @@ sal_Int32 AttributeList::getIntegerHex( sal_Int32 nAttrToken, sal_Int32 nDefault return getIntegerHex( nAttrToken ).get( nDefault ); } -sal_uInt32 AttributeList::getUnsignedHex( sal_Int32 nAttrToken, sal_uInt32 nDefault ) const -{ - return getUnsignedHex( nAttrToken ).get( nDefault ); -} - -sal_Int64 AttributeList::getHyperHex( sal_Int32 nAttrToken, sal_Int64 nDefault ) const -{ - return getHyperHex( nAttrToken ).get( nDefault ); -} - bool AttributeList::getBool( sal_Int32 nAttrToken, bool bDefault ) const { return getBool( nAttrToken ).get( bDefault ); diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index bf92f7a73d3f..955d867a3a3e 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -120,7 +120,6 @@ typedef ::cppu::WeakImplHelper2< XPropertySet, XPropertySetInfo > GenericPropert class GenericPropertySet : public GenericPropertySetBase, private ::osl::Mutex { public: - explicit GenericPropertySet(); explicit GenericPropertySet( const PropertyMap& rPropMap ); // XPropertySet @@ -144,10 +143,6 @@ private: // ---------------------------------------------------------------------------- -GenericPropertySet::GenericPropertySet() -{ -} - GenericPropertySet::GenericPropertySet( const PropertyMap& rPropMap ) { const PropertyNameVector& rPropNames = StaticPropertyNameVector::get(); @@ -228,12 +223,6 @@ PropertyMap::PropertyMap() : return StaticPropertyNameVector::get()[ nPropId ]; } -const Any* PropertyMap::getProperty( sal_Int32 nPropId ) const -{ - const_iterator aIt = find( nPropId ); - return (aIt == end()) ? 0 : &aIt->second; -} - void PropertyMap::assignAll( const PropertyMap& rPropMap ) { for( PropertyMap::const_iterator it=rPropMap.begin(); it != rPropMap.end(); ++it ) @@ -442,30 +431,6 @@ static void lclDumpAnyValue( Any value) fprintf (stderr,"??? <unhandled type %s>\n", USS(value.getValueTypeName())); } -void PropertyMap::dump( Reference< XPropertySet > rXPropSet ) -{ - Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo (); - Sequence< Property > props = info->getProperties (); - - OSL_TRACE("dump props, len: %d", props.getLength ()); - - for (int i=0; i < props.getLength (); i++) { - OString name = OUStringToOString( props [i].Name, RTL_TEXTENCODING_UTF8); - fprintf (stderr,"%30s = ", name.getStr() ); - - try { - lclDumpAnyValue (rXPropSet->getPropertyValue( props [i].Name )); - } catch (const Exception&) { - fprintf (stderr,"unable to get '%s' value\n", USS(props [i].Name)); - } - } -} - -void PropertyMap::dump() -{ - dump( Reference< XPropertySet >( makePropertySet(), UNO_QUERY ) ); -} - static void printLevel (int level) { for (int i=0; i<level; i++) diff --git a/oox/source/xls/commentsbuffer.cxx b/oox/source/xls/commentsbuffer.cxx index 55dd28b35283..f1c803380ba4 100644 --- a/oox/source/xls/commentsbuffer.cxx +++ b/oox/source/xls/commentsbuffer.cxx @@ -137,50 +137,6 @@ void Comment::importCommentPr( const AttributeList& rAttribs ) maModel.mnTVA = rAttribs.getToken( XML_textVAlign, XML_top ); } -void Comment::importAnchor( bool bFrom, sal_Int32 nWhich, const OUString &rChars ) -{ - sal_Int32 nRow, nCol; - Point aPoint; - UnitConverter& rUnitConv = getUnitConverter(); - if( bFrom ) - { - nCol = maModel.maAnchor.X; - nRow = maModel.maAnchor.Y; - } - else - { - nCol = maModel.maAnchor.Width + maModel.maAnchor.X ; - nRow = maModel.maAnchor.Height + maModel.maAnchor.Y; - } - switch( nWhich ) - { - case XDR_TOKEN( col ): - aPoint = getCellPosition( rChars.toInt32(), 1 ); - nCol = aPoint.X; - break; - case XDR_TOKEN( colOff ): - nCol += rUnitConv.scaleToMm100( static_cast< double >( rChars.toInt32() ), UNIT_SCREENX ); - break; - case XDR_TOKEN( row ): - aPoint = getCellPosition( 1, rChars.toInt32() ); - nRow = aPoint.Y; - break; - case XDR_TOKEN( rowOff ): - nRow += rUnitConv.scaleToMm100( static_cast< double >( rChars.toInt32() ), UNIT_SCREENY ); - break; - } - if( bFrom ) - { - maModel.maAnchor.X = nCol; - maModel.maAnchor.Y = nRow; - } - else - { - maModel.maAnchor.Width = nCol - maModel.maAnchor.X; - maModel.maAnchor.Height = nRow - maModel.maAnchor.Y; - } -} - void Comment::importComment( SequenceInputStream& rStrm ) { BinRange aBinRange; diff --git a/oox/source/xls/drawingbase.cxx b/oox/source/xls/drawingbase.cxx index cfc9f32f861a..cf2a931f5c23 100644 --- a/oox/source/xls/drawingbase.cxx +++ b/oox/source/xls/drawingbase.cxx @@ -283,15 +283,6 @@ Rectangle ShapeAnchor::calcAnchorRectHmm( const Size& rPageSizeHmm ) const } ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > -ShapeAnchor::getToCell() const -{ - CellAddress aAddress; - aAddress.Sheet = getSheetIndex(); - aAddress.Row = maTo.mnRow; - aAddress.Column = maTo.mnCol; - return getCell( aAddress ); -} -::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > ShapeAnchor::getFromCell() const { CellAddress aAddress; diff --git a/oox/source/xls/formulaparser.cxx b/oox/source/xls/formulaparser.cxx index abf89922de50..4643c6c798b5 100644 --- a/oox/source/xls/formulaparser.cxx +++ b/oox/source/xls/formulaparser.cxx @@ -2841,25 +2841,6 @@ ApiTokenSequence FormulaParser::convertNameToFormula( sal_Int32 nTokenIndex ) co return aTokens; } -ApiTokenSequence FormulaParser::convertNumberToHyperlink( const OUString& rUrl, double fValue ) const -{ - OSL_ENSURE( !rUrl.isEmpty(), "FormulaParser::convertNumberToHyperlink - missing URL" ); - if( const FunctionInfo* pFuncInfo = getFuncInfoFromBiffFuncId( BIFF_FUNC_HYPERLINK ) ) - { - ApiTokenSequence aTokens( 6 ); - aTokens[ 0 ].OpCode = pFuncInfo->mnApiOpCode; - aTokens[ 1 ].OpCode = OPCODE_OPEN; - aTokens[ 2 ].OpCode = OPCODE_PUSH; - aTokens[ 2 ].Data <<= rUrl; - aTokens[ 3 ].OpCode = OPCODE_SEP; - aTokens[ 4 ].OpCode = OPCODE_PUSH; - aTokens[ 4 ].Data <<= fValue; - aTokens[ 5 ].OpCode = OPCODE_CLOSE; - return aTokens; - } - return ApiTokenSequence(); -} - OUString FormulaParser::importOleTargetLink( const OUString& rFormulaString ) { sal_Int32 nRefId = -1; @@ -2888,14 +2869,6 @@ OUString FormulaParser::importOleTargetLink( SequenceInputStream& rStrm ) return aTargetLink; } -OUString FormulaParser::importOleTargetLink( BiffInputStream& rStrm, const sal_uInt16* pnFmlaSize ) const -{ - OUString aTargetLink; - sal_uInt16 nFmlaSize = lclReadFmlaSize( rStrm, getBiff(), pnFmlaSize ); - rStrm.skip( nFmlaSize ); - return aTargetLink; -} - OUString FormulaParser::importMacroName( const OUString& rFormulaString ) { /* Valid macros are either sheet macros or VBA macros. OOXML and all BIFF diff --git a/oox/source/xls/sheetdatabuffer.cxx b/oox/source/xls/sheetdatabuffer.cxx index 1514eb841a69..d382809cf381 100644 --- a/oox/source/xls/sheetdatabuffer.cxx +++ b/oox/source/xls/sheetdatabuffer.cxx @@ -572,11 +572,6 @@ SheetDataBuffer::XfIdRowRange::XfIdRowRange() : { } -bool SheetDataBuffer::XfIdRowRange::intersects( const CellRangeAddress& rRange ) const -{ - return (rRange.StartRow <= maRowRange.mnLast) && (maRowRange.mnFirst <= rRange.EndRow); -} - void SheetDataBuffer::XfIdRowRange::set( sal_Int32 nRow, sal_Int32 nXfId ) { maRowRange = ValueRange( nRow ); @@ -601,42 +596,6 @@ bool SheetDataBuffer::XfIdRowRange::tryExpand( sal_Int32 nRow, sal_Int32 nXfId ) return false; } -void SheetDataBuffer::XfIdRange::set( const CellAddress& rCellAddr, sal_Int32 nXfId, sal_Int32 nNumFmtId ) -{ - maRange.Sheet = rCellAddr.Sheet; - maRange.StartColumn = maRange.EndColumn = rCellAddr.Column; - maRange.StartRow = maRange.EndRow = rCellAddr.Row; - mnXfId = nXfId; - mnNumFmtId = nNumFmtId; -} - -bool SheetDataBuffer::XfIdRange::tryExpand( const CellAddress& rCellAddr, sal_Int32 nXfId, sal_Int32 nNumFmtId ) -{ - if( (mnXfId == nXfId) && (mnNumFmtId == nNumFmtId) && - (maRange.StartRow == rCellAddr.Row) && - (maRange.EndRow == rCellAddr.Row) && - (maRange.EndColumn + 1 == rCellAddr.Column) ) - { - ++maRange.EndColumn; - return true; - } - return false; -} - -bool SheetDataBuffer::XfIdRange::tryMerge( const XfIdRange& rXfIdRange ) -{ - if( (mnXfId == rXfIdRange.mnXfId) && - (mnNumFmtId == rXfIdRange.mnNumFmtId) && - (maRange.EndRow + 1 == rXfIdRange.maRange.StartRow) && - (maRange.StartColumn == rXfIdRange.maRange.StartColumn) && - (maRange.EndColumn == rXfIdRange.maRange.EndColumn) ) - { - maRange.EndRow = rXfIdRange.maRange.EndRow; - return true; - } - return false; -} - SheetDataBuffer::MergedRange::MergedRange( const CellRangeAddress& rRange ) : maRange( rRange ), diff --git a/oox/source/xls/stylesbuffer.cxx b/oox/source/xls/stylesbuffer.cxx index 91cd06535fd8..d336a5a75af4 100644 --- a/oox/source/xls/stylesbuffer.cxx +++ b/oox/source/xls/stylesbuffer.cxx @@ -413,11 +413,6 @@ void Color::importColorId( SequenceInputStream& rStrm ) setIndexed( rStrm.readInt32() ); } -void Color::importColorRgb( SequenceInputStream& rStrm ) -{ - setRgb( lclReadRgbColor( rStrm ) ); -} - void Color::importColorId( BiffInputStream& rStrm, bool b16Bit ) { setIndexed( b16Bit ? rStrm.readuInt16() : rStrm.readuInt8() ); @@ -2486,13 +2481,6 @@ FontRef Xf::getFont() const return getStyles().getFont( maModel.mnFontId ); } -bool Xf::hasAnyUsedFlags() const -{ - return - maModel.mbAlignUsed || maModel.mbProtUsed || maModel.mbFontUsed || - maModel.mbNumFmtUsed || maModel.mbBorderUsed || maModel.mbAreaUsed; -} - void Xf::writeToPropertyMap( PropertyMap& rPropMap ) const { StylesBuffer& rStyles = getStyles(); |