diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2011-12-22 10:54:03 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2011-12-22 15:33:49 +0100 |
commit | 9856dfd3cccc145130c7e5e7c4c1571a3d2068aa (patch) | |
tree | 24228967fea511bff48f4b57ada9cfd4ebff8f2f /oox | |
parent | 7c0c3362de894ddd4526f56e1849f116eb25cedd (diff) |
unusedcode: oox: remove some unused code
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/xls/drawingmanager.hxx | 30 | ||||
-rw-r--r-- | oox/inc/oox/xls/ooxformulaparser.hxx | 3 | ||||
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 59 | ||||
-rw-r--r-- | oox/source/xls/drawingfragment.cxx | 17 | ||||
-rw-r--r-- | oox/source/xls/drawingmanager.cxx | 53 | ||||
-rw-r--r-- | oox/source/xls/ooxformulaparser.cxx | 19 | ||||
-rw-r--r-- | oox/source/xls/stylesbuffer.cxx | 81 |
7 files changed, 0 insertions, 262 deletions
diff --git a/oox/inc/oox/xls/drawingmanager.hxx b/oox/inc/oox/xls/drawingmanager.hxx index dc0ae4025024..4ec80d741036 100644 --- a/oox/inc/oox/xls/drawingmanager.hxx +++ b/oox/inc/oox/xls/drawingmanager.hxx @@ -81,36 +81,6 @@ struct BiffObjFillModel }; // ============================================================================ - -/** This structure contains text formatting attributes from an OBJ record. */ -struct BiffObjTextModel -{ - sal_uInt16 mnTextLen; /// Length of the text (characters). - sal_uInt16 mnFormatSize; /// Size of the formatting array (bytes). - sal_uInt16 mnLinkSize; /// Size of the linked text formula (bytes). - sal_uInt16 mnDefFontId; /// Font index for default font formatting. - sal_uInt16 mnFlags; /// Additional flags. - sal_uInt16 mnOrientation; /// Text orientation. - sal_uInt16 mnButtonFlags; /// Additional flags for push buttons. - sal_uInt16 mnShortcut; /// Shortcut character. - sal_uInt16 mnShortcutEA; /// East-asian shortcut character. - - explicit BiffObjTextModel(); - - /** Reads text data from a BIFF3/BIFF4 OBJ record. */ - void readObj3( BiffInputStream& rStrm ); - /** Reads text data from a BIFF5 OBJ record. */ - void readObj5( BiffInputStream& rStrm ); - /** Reads text data from a BIFF8 TXO record. */ - void readTxo8( BiffInputStream& rStrm ); - - /** Returns the horizontal alignment of the text. */ - sal_uInt8 getHorAlign() const; - /** Returns the vertical alignment of the text. */ - sal_uInt8 getVerAlign() const; -}; - -// ============================================================================ // BIFF drawing objects // ============================================================================ diff --git a/oox/inc/oox/xls/ooxformulaparser.hxx b/oox/inc/oox/xls/ooxformulaparser.hxx index 52ee9b9c2cce..757aec615860 100644 --- a/oox/inc/oox/xls/ooxformulaparser.hxx +++ b/oox/inc/oox/xls/ooxformulaparser.hxx @@ -40,7 +40,6 @@ namespace oox { namespace xls { class OOXMLFormulaParserImpl; -class OOXMLFormulaPrinterImpl; // ============================================================================ @@ -96,12 +95,10 @@ public: private: typedef ::boost::shared_ptr< OOXMLFormulaParserImpl > ParserImplRef; - typedef ::boost::shared_ptr< OOXMLFormulaPrinterImpl > PrinterImplRef; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxComponent; ParserImplRef mxParserImpl; /// Implementation of import parser. - PrinterImplRef mxPrinterImpl; /// Implementation of export printer. }; // ============================================================================ diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index b9bd65301b2c..10bc407625e1 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -107,65 +107,6 @@ Rectangle lclGetAbsRect( const Rectangle& rRelRect, const Rectangle& rShapeRect, return aAbsRect; } -void lclInsertTextFrame( const XmlFilterBase& rFilter, const Reference< XShape >& rxShape ) -{ - OSL_ENSURE( rxShape.is(), "lclInsertTextFrame - missing XShape" ); - if ( rxShape.is( ) ) - { - try - { - Reference< XTextDocument > xDoc( rFilter.getModel( ), UNO_QUERY_THROW ); - Reference< XTextContent > xCtnt( rxShape, UNO_QUERY_THROW ); - xCtnt->attach( xDoc->getText( )->getStart( ) ); - } - catch( Exception& ) - { - } - } -} - -void lclSetXShapeRect( const Reference< XShape >& rxShape, const Rectangle& rShapeRect ) -{ - OSL_ENSURE( rxShape.is(), "lclSetXShapeRect - missing XShape" ); - if( rxShape.is() ) - { - Reference< XTextFrame > xTextFrame( rxShape, UNO_QUERY ); - if ( !xTextFrame.is( ) ) - { - rxShape->setPosition( Point( rShapeRect.X, rShapeRect.Y ) ); - rxShape->setSize( Size( rShapeRect.Width, rShapeRect.Height ) ); - } - else - { - Reference< XPropertySet > xProps( xTextFrame, UNO_QUERY_THROW ); - try - { - // The size - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("SizeType")), Any( SizeType::FIX ) ); - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutomaticHeight")), Any( sal_False ) ); - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Height")), Any( rShapeRect.Height ) ); - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Width")), Any( rShapeRect.Width ) ); - - // The position - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")), Any( rShapeRect.X ) ); - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientRelation")), - Any( RelOrientation::FRAME ) ); - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")), - Any( HoriOrientation::NONE ) ); - - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")), Any( rShapeRect.Y ) ); - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientRelation")), - Any( RelOrientation::FRAME ) ); - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")), - Any( VertOrientation::NONE ) ); - } - catch ( Exception& ) - { - } - } - } -} - } // namespace // ============================================================================ diff --git a/oox/source/xls/drawingfragment.cxx b/oox/source/xls/drawingfragment.cxx index 64f0164e49b1..98f5e28420ce 100644 --- a/oox/source/xls/drawingfragment.cxx +++ b/oox/source/xls/drawingfragment.cxx @@ -72,23 +72,6 @@ using ::rtl::OUStringToOString; // no using's for ::oox::vml, that may clash with ::oox::drawingml types // ============================================================================ -// DrawingML -// ============================================================================ - -namespace { - -/** Converts the passed 64-bit integer value from the passed unit to EMUs. */ -sal_Int64 lclCalcEmu( const UnitConverter& rUnitConv, sal_Int64 nValue, Unit eFromUnit ) -{ - return (eFromUnit == UNIT_EMU) ? nValue : - static_cast< sal_Int64 >( rUnitConv.scaleValue( static_cast< double >( nValue ), eFromUnit, UNIT_EMU ) + 0.5 ); -} - -} // namespace - -// ============================================================================ - -// ============================================================================ ShapeMacroAttacher::ShapeMacroAttacher( const OUString& rMacroName, const Reference< XShape >& rxShape ) : VbaMacroAttacherBase( rMacroName ), diff --git a/oox/source/xls/drawingmanager.cxx b/oox/source/xls/drawingmanager.cxx index a9826c1ccf49..93fc190b336a 100644 --- a/oox/source/xls/drawingmanager.cxx +++ b/oox/source/xls/drawingmanager.cxx @@ -228,59 +228,6 @@ BiffInputStream& operator>>( BiffInputStream& rStrm, BiffObjFillModel& rModel ) } // ============================================================================ - -BiffObjTextModel::BiffObjTextModel() : - mnTextLen( 0 ), - mnFormatSize( 0 ), - mnLinkSize( 0 ), - mnDefFontId( 0 ), - mnFlags( 0 ), - mnOrientation( BIFF_OBJ_ORIENT_NONE ), - mnButtonFlags( 0 ), - mnShortcut( 0 ), - mnShortcutEA( 0 ) -{ -} - -void BiffObjTextModel::readObj3( BiffInputStream& rStrm ) -{ - rStrm >> mnTextLen; - rStrm.skip( 2 ); - rStrm >> mnFormatSize >> mnDefFontId; - rStrm.skip( 2 ); - rStrm >> mnFlags >> mnOrientation; - rStrm.skip( 8 ); -} - -void BiffObjTextModel::readObj5( BiffInputStream& rStrm ) -{ - rStrm >> mnTextLen; - rStrm.skip( 2 ); - rStrm >> mnFormatSize >> mnDefFontId; - rStrm.skip( 2 ); - rStrm >> mnFlags >> mnOrientation; - rStrm.skip( 2 ); - rStrm >> mnLinkSize; - rStrm.skip( 2 ); - rStrm >> mnButtonFlags >> mnShortcut >> mnShortcutEA; -} - -void BiffObjTextModel::readTxo8( BiffInputStream& rStrm ) -{ - rStrm >> mnFlags >> mnOrientation >> mnButtonFlags >> mnShortcut >> mnShortcutEA >> mnTextLen >> mnFormatSize; -} - -sal_uInt8 BiffObjTextModel::getHorAlign() const -{ - return extractValue< sal_uInt8 >( mnFlags, 1, 3 ); -} - -sal_uInt8 BiffObjTextModel::getVerAlign() const -{ - return extractValue< sal_uInt8 >( mnFlags, 4, 3 ); -} - -// ============================================================================ // BIFF drawing objects // ============================================================================ diff --git a/oox/source/xls/ooxformulaparser.cxx b/oox/source/xls/ooxformulaparser.cxx index 3363a654c4d0..77197de38930 100644 --- a/oox/source/xls/ooxformulaparser.cxx +++ b/oox/source/xls/ooxformulaparser.cxx @@ -113,25 +113,6 @@ const FunctionInfo* OOXMLFormulaParserImpl::resolveBadFuncName( const OUString& // ============================================================================ -class OOXMLFormulaPrinterImpl : public OpCodeProvider -{ -public: - explicit OOXMLFormulaPrinterImpl( const Reference< XMultiServiceFactory >& rxModelFactory ); - -private: - ApiParserWrapper maApiParser; -}; - -// ---------------------------------------------------------------------------- - -OOXMLFormulaPrinterImpl::OOXMLFormulaPrinterImpl( const Reference< XMultiServiceFactory >& rxModelFactory ) : - OpCodeProvider( rxModelFactory, FILTER_OOXML, BIFF_UNKNOWN, false ), - maApiParser( rxModelFactory, *this ) -{ -} - -// ============================================================================ - Sequence< OUString > OOXMLFormulaParser_getSupportedServiceNames() { Sequence< OUString > aServiceNames( 1 ); diff --git a/oox/source/xls/stylesbuffer.cxx b/oox/source/xls/stylesbuffer.cxx index cc48ad578adb..28f7273aa589 100644 --- a/oox/source/xls/stylesbuffer.cxx +++ b/oox/source/xls/stylesbuffer.cxx @@ -1639,17 +1639,6 @@ inline sal_Int32 lclGetBorderLineWidth( const BorderLine& rBorderLine ) return rBorderLine.OuterLineWidth + rBorderLine.LineDistance + rBorderLine.InnerLineWidth; } -const BorderLine2* lclGetThickerLine( const BorderLine2& rBorderLine1, sal_Bool bValid1, const BorderLine2& rBorderLine2, sal_Bool bValid2 ) -{ - if( bValid1 && bValid2 ) - return (lclGetBorderLineWidth( rBorderLine1 ) < lclGetBorderLineWidth( rBorderLine2 )) ? &rBorderLine2 : &rBorderLine1; - if( bValid1 ) - return &rBorderLine1; - if( bValid2 ) - return &rBorderLine2; - return 0; -} - } // namespace // ---------------------------------------------------------------------------- @@ -2829,76 +2818,6 @@ OUString lclGetBuiltinStyleName( sal_Int32 nBuiltinId, const OUString& rName, sa return aStyleName.makeStringAndClear(); } -OUString lclGetBuiltInStyleName( const OUString& rName ) -{ - OUStringBuffer aStyleName; - aStyleName.appendAscii( spcStyleNamePrefix ).append( rName ); - return aStyleName.makeStringAndClear(); -} - -bool lclIsBuiltinStyleName( const OUString& rStyleName, sal_Int32* pnBuiltinId, sal_Int32* pnNextChar ) -{ - // try the other built-in styles - OUString aPrefix = OUString::createFromAscii( spcStyleNamePrefix ); - sal_Int32 nPrefixLen = aPrefix.getLength(); - sal_Int32 nFoundId = 0; - sal_Int32 nNextChar = 0; - if( rStyleName.matchIgnoreAsciiCase( aPrefix ) ) - { - OUString aShortName; - for( sal_Int32 nId = 0; nId < snStyleNamesCount; ++nId ) - { - aShortName = OUString::createFromAscii( sppcStyleNames[ nId ] ); - if( rStyleName.matchIgnoreAsciiCase( aShortName, nPrefixLen ) && - (nNextChar < nPrefixLen + aShortName.getLength()) ) - { - nFoundId = nId; - nNextChar = nPrefixLen + aShortName.getLength(); - } - } - } - - if( nNextChar > 0 ) - { - if( pnBuiltinId ) *pnBuiltinId = nFoundId; - if( pnNextChar ) *pnNextChar = nNextChar; - return true; - } - - if( pnBuiltinId ) *pnBuiltinId = -1; - if( pnNextChar ) *pnNextChar = 0; - return false; -} - -bool lclGetBuiltinStyleId( sal_Int32& rnBuiltinId, sal_Int32& rnLevel, const OUString& rStyleName ) -{ - sal_Int32 nBuiltinId; - sal_Int32 nNextChar; - if( lclIsBuiltinStyleName( rStyleName, &nBuiltinId, &nNextChar ) ) - { - if( (nBuiltinId == OOX_STYLE_ROWLEVEL) || (nBuiltinId == OOX_STYLE_COLLEVEL) ) - { - OUString aLevel = rStyleName.copy( nNextChar ); - sal_Int32 nLevel = aLevel.toInt32(); - if( (0 < nLevel) && (nLevel <= OOX_STYLE_LEVELCOUNT) ) - { - rnBuiltinId = nBuiltinId; - rnLevel = nLevel; - return true; - } - } - else if( rStyleName.getLength() == nNextChar ) - { - rnBuiltinId = nBuiltinId; - rnLevel = 0; - return true; - } - } - rnBuiltinId = -1; - rnLevel = 0; - return false; -} - } // namespace // ---------------------------------------------------------------------------- |