unusedcode: remove something from oox

This commit is contained in:
Matúš Kukan 2012-02-23 21:22:21 +01:00
parent cf2dede213
commit 660cb78cd6
15 changed files with 0 additions and 254 deletions

View file

@ -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;

View file

@ -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

View file

@ -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. */

View file

@ -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*/

View file

@ -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 );

View file

@ -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;

View file

@ -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;

View file

@ -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 );

View file

@ -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++)

View file

@ -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;

View file

@ -282,15 +282,6 @@ Rectangle ShapeAnchor::calcAnchorRectHmm( const Size& rPageSizeHmm ) const
return Rectangle( lclEmuToHmm( aAnchorRect.X ), lclEmuToHmm( aAnchorRect.Y ), lclEmuToHmm( aAnchorRect.Width ), lclEmuToHmm( aAnchorRect.Height ) );
}
::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
{

View file

@ -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

View file

@ -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 ),

View file

@ -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();

View file

@ -1085,15 +1085,10 @@ ooo::vba::excel::getViewFrame(com::sun::star::uno::Reference<com::sun::star::fra
ooo::vba::excel::isInPrintPreview(SfxViewFrame*)
ooo::vba::extractBoolFromAny(com::sun::star::uno::Any const&, bool)
ooo::vba::extractIntFromAny(com::sun::star::uno::Any const&, int)
oox::(anonymous namespace)::GenericPropertySet::GenericPropertySet()
oox::AttributeList::getHyperHex(int, long) const
oox::AttributeList::getUnsignedHex(int, unsigned int) const
oox::BinaryInputStream::readNulCharArray()
oox::ContainerHelper::insertByIndex(com::sun::star::uno::Reference<com::sun::star::container::XIndexContainer> const&, int, com::sun::star::uno::Any const&)
oox::GraphicHelper::convertScreenPixelToHmm(com::sun::star::awt::Point const&) const
oox::ObjectContainer::getObject(rtl::OUString const&) const
oox::PropertyMap::dump()
oox::PropertyMap::getProperty(int) const
oox::PropertySet::getProperties(com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, com::sun::star::uno::Sequence<rtl::OUString> const&) const
oox::core::PowerPointExport::WriteAnimationNodeCommonPropsEnd(boost::shared_ptr<sax_fastparser::FastSerializerHelper>)
oox::core::PowerPointExport::WriteTextStyles(boost::shared_ptr<sax_fastparser::FastSerializerHelper>)
@ -1161,16 +1156,6 @@ oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange
oox::xls::CellBlock::isBefore(oox::ValueRange const&) const
oox::xls::CellBlock::isExpandable(oox::ValueRange const&) const
oox::xls::CellBlock::startNextRow()
oox::xls::Color::importColorRgb(oox::SequenceInputStream&)
oox::xls::Comment::importAnchor(bool, int, rtl::OUString const&)
oox::xls::FormulaParser::convertNumberToHyperlink(rtl::OUString const&, double) const
oox::xls::FormulaParser::importOleTargetLink(oox::xls::BiffInputStream&, unsigned short const*) const
oox::xls::ShapeAnchor::getToCell() const
oox::xls::SheetDataBuffer::XfIdRange::set(com::sun::star::table::CellAddress const&, int, int)
oox::xls::SheetDataBuffer::XfIdRange::tryExpand(com::sun::star::table::CellAddress const&, int, int)
oox::xls::SheetDataBuffer::XfIdRange::tryMerge(oox::xls::SheetDataBuffer::XfIdRange const&)
oox::xls::SheetDataBuffer::XfIdRowRange::intersects(com::sun::star::table::CellRangeAddress const&) const
oox::xls::Xf::hasAnyUsedFlags() const
pdfi::createOdfEmitter(com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> const&)
psp::GetCommandLineTokenCount(rtl::OString const&)
psp::PrinterGfx::DrawBitmap(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterBmp const&)