diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-07 16:28:27 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-27 08:20:43 +0000 |
commit | 644487a1152c7586a7f20c7f372572a71d8494d5 (patch) | |
tree | 683cdbd755ec1660e75f930e5be4cd6867e3e734 /sc | |
parent | 1b4dff2c371d31c99f34324c3f6f31888bdc34d7 (diff) |
loplugin:unusedmethods
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861
Reviewed-on: https://gerrit.libreoffice.org/19231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/bigrange.hxx | 14 | ||||
-rw-r--r-- | sc/inc/formulacell.hxx | 1 | ||||
-rw-r--r-- | sc/inc/formulagroup.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 11 | ||||
-rw-r--r-- | sc/source/core/inc/formulagroupcl.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/inc/xerecord.hxx | 3 | ||||
-rw-r--r-- | sc/source/filter/oox/formulaparser.cxx | 273 | ||||
-rw-r--r-- | sc/source/ui/inc/anyrefdg.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/inc/viewdata.hxx | 12 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/anyrefdg.cxx | 33 | ||||
-rw-r--r-- | sc/source/ui/vba/vbacondition.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/vba/vbacondition.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaformatcondition.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaformatcondition.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/vba/vbapagebreak.hxx | 8 | ||||
-rw-r--r-- | sc/source/ui/vba/vbatitle.hxx | 32 |
18 files changed, 19 insertions, 412 deletions
diff --git a/sc/inc/bigrange.hxx b/sc/inc/bigrange.hxx index 14b2aa92535c..2a3fbae1001d 100644 --- a/sc/inc/bigrange.hxx +++ b/sc/inc/bigrange.hxx @@ -219,20 +219,6 @@ inline bool ScBigRange::Intersects( const ScBigRange& r ) const ); } -inline SvStream& WriteScBigRange ( SvStream& rStream, const ScBigRange& rRange ) -{ - WriteScBigAddress( rStream, rRange.aStart ); - WriteScBigAddress( rStream, rRange.aEnd ); - return rStream; -} - -inline SvStream& ReadScBigRange( SvStream& rStream, ScBigRange& rRange ) -{ - ReadScBigAddress( rStream, rRange.aStart ); - ReadScBigAddress( rStream, rRange.aEnd ); - return rStream; -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 724b1e20f322..3171af631898 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -80,7 +80,6 @@ public: void setCode( ScTokenArray* pCode ); void compileCode( ScDocument& rDoc, const ScAddress& rPos, formula::FormulaGrammar::Grammar eGram ); - void compileOpenCLKernel(); sc::FormulaGroupAreaListener* getAreaListener( ScFormulaCell** ppTopCell, const ScRange& rRange, bool bStartFixed, bool bEndFixed ); diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx index 6a5c50948f02..384ea0a24d3b 100644 --- a/sc/inc/formulagroup.hxx +++ b/sc/inc/formulagroup.hxx @@ -141,7 +141,6 @@ public: static void getOpenCLDeviceInfo(sal_Int32& rDeviceId, sal_Int32& rPlatformId); #endif virtual ScMatrixRef inverseMatrix(const ScMatrix& rMat) = 0; - virtual CompiledFormula* createCompiledFormula( ScFormulaCellGroup& rGroup, ScTokenArray& rCode ) = 0; virtual bool interpret(ScDocument& rDoc, const ScAddress& rTopPos, ScFormulaCellGroupRef& xGroup, ScTokenArray& rCode) = 0; }; @@ -153,7 +152,6 @@ public: virtual ~FormulaGroupInterpreterSoftware() {} virtual ScMatrixRef inverseMatrix(const ScMatrix& rMat) override; - virtual CompiledFormula* createCompiledFormula( ScFormulaCellGroup& rGroup, ScTokenArray& rCode ) override; virtual bool interpret(ScDocument& rDoc, const ScAddress& rTopPos, ScFormulaCellGroupRef& xGroup, ScTokenArray& rCode) override; }; diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 07cd700e590c..48a6e7cb7bef 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -597,17 +597,6 @@ void ScFormulaCellGroup::compileCode( } } -void ScFormulaCellGroup::compileOpenCLKernel() -{ - if (meCalcState == sc::GroupCalcDisabled) - return; - - mpCompiledFormula = - sc::FormulaGroupInterpreter::getStatic()->createCompiledFormula(*this, *mpCode); - - meKernelState = sc::OpenCLKernelBinaryCreated; -} - sc::FormulaGroupAreaListener* ScFormulaCellGroup::getAreaListener( ScFormulaCell** ppTopCell, const ScRange& rRange, bool bStartFixed, bool bEndFixed ) { diff --git a/sc/source/core/inc/formulagroupcl.hxx b/sc/source/core/inc/formulagroupcl.hxx index b65ff3067548..51971227e746 100644 --- a/sc/source/core/inc/formulagroupcl.hxx +++ b/sc/source/core/inc/formulagroupcl.hxx @@ -21,8 +21,6 @@ public: virtual ~FormulaGroupInterpreterOpenCL(); virtual ScMatrixRef inverseMatrix( const ScMatrix& rMat ) override; - virtual CompiledFormula* createCompiledFormula( - ScFormulaCellGroup& rGroup, ScTokenArray& rCode ) override; virtual bool interpret( ScDocument& rDoc, const ScAddress& rTopPos, ScFormulaCellGroupRef& xGroup, ScTokenArray& rCode ) override; }; diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index ab4fa023c51f..7d69521dda9b 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -4096,12 +4096,6 @@ DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray& return pDynamicKernel; } -CompiledFormula* FormulaGroupInterpreterOpenCL::createCompiledFormula( - ScFormulaCellGroup& rGroup, ScTokenArray& rCode ) -{ - return DynamicKernel::create(maCalcConfig, rCode, rGroup.mnLength); -} - namespace { class CLInterpreterResult diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 64a1b04888a6..1e73276b65dc 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -300,12 +300,6 @@ ScMatrixRef FormulaGroupInterpreterSoftware::inverseMatrix(const ScMatrix& /*rMa return ScMatrixRef(); } -CompiledFormula* FormulaGroupInterpreterSoftware::createCompiledFormula( - ScFormulaCellGroup& /*rGroup*/, ScTokenArray& /*rCode*/ ) -{ - return NULL; -} - bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddress& rTopPos, ScFormulaCellGroupRef& xGroup, ScTokenArray& rCode) diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx index cca2c0aeaeac..692b6d0bbf43 100644 --- a/sc/source/filter/inc/xerecord.hxx +++ b/sc/source/filter/inc/xerecord.hxx @@ -326,9 +326,6 @@ public: inline void ReplaceRecord( RecordRefType xRec, size_t nPos ) { RemoveRecord( nPos ); InsertRecord( xRec, nPos ); } - /** Inserts a newly created record at the specified position into the list. */ - inline void InsertNewRecord( RecType* pRec, size_t nPos ) - { if( pRec ) InsertRecord( RecordRefType( pRec ), nPos ); } /** Appends a newly created record to the list. */ inline void AppendNewRecord( RecType* pRec ) { if( pRec ) AppendRecord( RecordRefType( pRec ) ); } diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx index e5e88722225b..888edd6e3af9 100644 --- a/sc/source/filter/oox/formulaparser.cxx +++ b/sc/source/filter/oox/formulaparser.cxx @@ -44,15 +44,6 @@ using namespace ::com::sun::star::sheet::ReferenceFlags; using namespace ::com::sun::star::table; using namespace ::com::sun::star::uno; -namespace { - -sal_uInt16 lclReadFmlaSize( BiffInputStream& rStrm, BiffType eBiff, const sal_uInt16* pnFmlaSize ) -{ - return pnFmlaSize ? *pnFmlaSize : ((eBiff == BIFF2) ? rStrm.readuInt8() : rStrm.readuInt16()); -} - -} // namespace - // formula finalizer ========================================================== FormulaFinalizer::FormulaFinalizer( const OpCodeProvider& rOpCodeProv ) : @@ -441,12 +432,6 @@ public: FormulaType eType, SequenceInputStream& rStrm ); - /** Imports and converts a BIFF2-BIFF8 token array from the passed stream. */ - virtual ApiTokenSequence importBiffFormula( - const CellAddress& rBaseAddress, - FormulaType eType, - BiffInputStream& rStrm, const sal_uInt16* pnFmlaSize ); - /** Tries to resolve the passed ref-id to an OLE target URL. */ OUString resolveOleTarget( sal_Int32 nRefId, bool bUseRefSheets ) const; @@ -600,12 +585,6 @@ ApiTokenSequence FormulaParserImpl::importBiff12Formula( const CellAddress&, For return ApiTokenSequence(); } -ApiTokenSequence FormulaParserImpl::importBiffFormula( const CellAddress&, FormulaType, BiffInputStream&, const sal_uInt16* ) -{ - OSL_FAIL( "FormulaParserImpl::importBiffFormula - not implemented" ); - return ApiTokenSequence(); -} - OUString FormulaParserImpl::resolveOleTarget( sal_Int32 nRefId, bool bUseRefSheets ) const { const ExternalLink* pExtLink = getExternalLinks().getExternalLink( nRefId, bUseRefSheets ).get(); @@ -1842,11 +1821,6 @@ class BiffFormulaParserImpl : public FormulaParserImpl public: explicit BiffFormulaParserImpl( const FormulaParser& rParent ); - virtual ApiTokenSequence importBiffFormula( - const CellAddress& rBaseAddr, - FormulaType eType, - BiffInputStream& rStrm, const sal_uInt16* pnFmlaSize ) override; - private: // import token contents and create API formula token --------------------- @@ -1854,7 +1828,6 @@ private: bool importRefTokenNotAvailable( BiffInputStream& rStrm, bool bDeleted, bool bRelativeAsOffset ); bool importStrToken2( BiffInputStream& rStrm ); bool importStrToken8( BiffInputStream& rStrm ); - bool importAttrToken( BiffInputStream& rStrm ); bool importSpaceToken3( BiffInputStream& rStrm ); bool importSpaceToken4( BiffInputStream& rStrm ); bool importSheetToken2( BiffInputStream& rStrm ); @@ -1862,7 +1835,6 @@ private: bool importEndSheetToken2( BiffInputStream& rStrm ); bool importEndSheetToken3( BiffInputStream& rStrm ); bool importNlrToken( BiffInputStream& rStrm ); - bool importArrayToken( BiffInputStream& rStrm ); bool importRefToken2( BiffInputStream& rStrm, bool bDeleted, bool bRelativeAsOffset ); bool importRefToken8( BiffInputStream& rStrm, bool bDeleted, bool bRelativeAsOffset ); bool importAreaToken2( BiffInputStream& rStrm, bool bDeleted, bool bRelativeAsOffset ); @@ -1871,17 +1843,12 @@ private: bool importRef3dToken8( BiffInputStream& rStrm, bool bDeleted, bool bRelativeAsOffset ); bool importArea3dToken5( BiffInputStream& rStrm, bool bDeleted, bool bRelativeAsOffset ); bool importArea3dToken8( BiffInputStream& rStrm, bool bDeleted, bool bRelativeAsOffset ); - bool importMemAreaToken( BiffInputStream& rStrm, bool bAddData ); - bool importMemFuncToken( BiffInputStream& rStrm ); - bool importNameToken( BiffInputStream& rStrm ); bool importNameXToken( BiffInputStream& rStrm ); bool importFuncToken2( BiffInputStream& rStrm ); bool importFuncToken4( BiffInputStream& rStrm ); bool importFuncVarToken2( BiffInputStream& rStrm ); bool importFuncVarToken4( BiffInputStream& rStrm ); bool importFuncCEToken( BiffInputStream& rStrm ); - bool importExpToken( BiffInputStream& rStrm ); - bool importTblToken( BiffInputStream& rStrm ); bool importNlrAddrToken( BiffInputStream& rStrm, bool bRow ); bool importNlrRangeToken( BiffInputStream& rStrm ); @@ -1895,7 +1862,6 @@ private: LinkSheetRange readSheetRange8( BiffInputStream& rStrm ); void swapStreamPosition( BiffInputStream& rStrm ); - void skipMemAreaAddData( BiffInputStream& rStrm ); bool readNlrSAddrAddData( BiffNlr& orNlr, BiffInputStream& rStrm, bool bRow ); bool readNlrSRangeAddData( BiffNlr& orNlr, bool& orbIsRow, BiffInputStream& rStrm ); @@ -2075,110 +2041,6 @@ BiffFormulaParserImpl::BiffFormulaParserImpl( const FormulaParser& rParent ) : } } -ApiTokenSequence BiffFormulaParserImpl::importBiffFormula( const CellAddress& rBaseAddr, - FormulaType eType, BiffInputStream& rStrm, const sal_uInt16* pnFmlaSize ) -{ - initializeImport( rBaseAddr, eType ); - mnCurrRefId = 0; - - sal_uInt16 nFmlaSize = lclReadFmlaSize( rStrm, getBiff(), pnFmlaSize ); - sal_Int64 nEndPos = mnAddDataPos = rStrm.tell() + nFmlaSize; - - bool bOk = true; - while( bOk && !rStrm.isEof() && (rStrm.tell() < nEndPos) ) - { - sal_uInt8 nTokenId; - rStrm >> nTokenId; - sal_uInt8 nTokenClass = nTokenId & BIFF_TOKCLASS_MASK; - sal_uInt8 nBaseId = nTokenId & BIFF_TOKID_MASK; - - bOk = !getFlag( nTokenId, BIFF_TOKFLAG_INVALID ); - if( bOk ) - { - if( nTokenClass == BIFF_TOKCLASS_NONE ) - { - // base tokens - switch( nBaseId ) - { - case BIFF_TOKID_EXP: bOk = importExpToken( rStrm ); break; - case BIFF_TOKID_TBL: bOk = importTblToken( rStrm ); break; - case BIFF_TOKID_ADD: bOk = pushBinaryOperator( OPCODE_ADD ); break; - case BIFF_TOKID_SUB: bOk = pushBinaryOperator( OPCODE_SUB ); break; - case BIFF_TOKID_MUL: bOk = pushBinaryOperator( OPCODE_MULT ); break; - case BIFF_TOKID_DIV: bOk = pushBinaryOperator( OPCODE_DIV ); break; - case BIFF_TOKID_POWER: bOk = pushBinaryOperator( OPCODE_POWER ); break; - case BIFF_TOKID_CONCAT: bOk = pushBinaryOperator( OPCODE_CONCAT ); break; - case BIFF_TOKID_LT: bOk = pushBinaryOperator( OPCODE_LESS ); break; - case BIFF_TOKID_LE: bOk = pushBinaryOperator( OPCODE_LESS_EQUAL ); break; - case BIFF_TOKID_EQ: bOk = pushBinaryOperator( OPCODE_EQUAL ); break; - case BIFF_TOKID_GE: bOk = pushBinaryOperator( OPCODE_GREATER_EQUAL ); break; - case BIFF_TOKID_GT: bOk = pushBinaryOperator( OPCODE_GREATER ); break; - case BIFF_TOKID_NE: bOk = pushBinaryOperator( OPCODE_NOT_EQUAL ); break; - case BIFF_TOKID_ISECT: bOk = pushBinaryOperator( OPCODE_INTERSECT ); break; - case BIFF_TOKID_LIST: bOk = pushBinaryOperator( OPCODE_LIST ); break; - case BIFF_TOKID_RANGE: bOk = pushBinaryOperator( OPCODE_RANGE ); break; - case BIFF_TOKID_UPLUS: bOk = pushUnaryPreOperator( OPCODE_PLUS_SIGN ); break; - case BIFF_TOKID_UMINUS: bOk = pushUnaryPreOperator( OPCODE_MINUS_SIGN ); break; - case BIFF_TOKID_PERCENT: bOk = pushUnaryPostOperator( OPCODE_PERCENT ); break; - case BIFF_TOKID_PAREN: bOk = pushParenthesesOperator(); break; - case BIFF_TOKID_MISSARG: bOk = pushOperand( OPCODE_MISSING ); break; - case BIFF_TOKID_STR: bOk = (this->*mpImportStrToken)( rStrm ); break; - case BIFF_TOKID_NLR: bOk = (this->*mpImportNlrToken)( rStrm ); break; - case BIFF_TOKID_ATTR: bOk = importAttrToken( rStrm ); break; - case BIFF_TOKID_SHEET: bOk = (this->*mpImportSheetToken)( rStrm ); break; - case BIFF_TOKID_ENDSHEET: bOk = (this->*mpImportEndSheetToken)( rStrm ); break; - case BIFF_TOKID_ERR: bOk = pushBiffErrorOperand( rStrm.readuInt8() ); break; - case BIFF_TOKID_BOOL: bOk = pushBiffBoolOperand( rStrm.readuInt8() ); break; - case BIFF_TOKID_INT: bOk = pushValueOperand< double >( rStrm.readuInt16() ); break; - case BIFF_TOKID_NUM: bOk = pushValueOperand( rStrm.readDouble() ); break; - default: bOk = false; - } - } - else - { - // classified tokens - switch( nBaseId ) - { - case BIFF_TOKID_ARRAY: bOk = importArrayToken( rStrm ); break; - case BIFF_TOKID_FUNC: bOk = (this->*mpImportFuncToken)( rStrm ); break; - case BIFF_TOKID_FUNCVAR: bOk = (this->*mpImportFuncVarToken)( rStrm ); break; - case BIFF_TOKID_NAME: bOk = importNameToken( rStrm ); break; - case BIFF_TOKID_REF: bOk = (this->*mpImportRefToken)( rStrm, false, false ); break; - case BIFF_TOKID_AREA: bOk = (this->*mpImportAreaToken)( rStrm, false, false ); break; - case BIFF_TOKID_MEMAREA: bOk = importMemAreaToken( rStrm, true ); break; - case BIFF_TOKID_MEMERR: bOk = importMemAreaToken( rStrm, false ); break; - case BIFF_TOKID_MEMNOMEM: bOk = importMemAreaToken( rStrm, false ); break; - case BIFF_TOKID_MEMFUNC: bOk = importMemFuncToken( rStrm ); break; - case BIFF_TOKID_REFERR: bOk = (this->*mpImportRefToken)( rStrm, true, false ); break; - case BIFF_TOKID_AREAERR: bOk = (this->*mpImportAreaToken)( rStrm, true, false ); break; - case BIFF_TOKID_REFN: bOk = (this->*mpImportRefToken)( rStrm, false, true ); break; - case BIFF_TOKID_AREAN: bOk = (this->*mpImportAreaToken)( rStrm, false, true ); break; - case BIFF_TOKID_MEMAREAN: bOk = importMemFuncToken( rStrm ); break; - case BIFF_TOKID_MEMNOMEMN: bOk = importMemFuncToken( rStrm ); break; - case BIFF_TOKID_FUNCCE: bOk = (this->*mpImportFuncCEToken)( rStrm ); break; - case BIFF_TOKID_NAMEX: bOk = (this->*mpImportNameXToken)( rStrm ); break; - case BIFF_TOKID_REF3D: bOk = (this->*mpImportRef3dToken)( rStrm, false, mbRelativeAsOffset ); break; - case BIFF_TOKID_AREA3D: bOk = (this->*mpImportArea3dToken)( rStrm, false, mbRelativeAsOffset ); break; - case BIFF_TOKID_REFERR3D: bOk = (this->*mpImportRef3dToken)( rStrm, true, mbRelativeAsOffset ); break; - case BIFF_TOKID_AREAERR3D: bOk = (this->*mpImportArea3dToken)( rStrm, true, mbRelativeAsOffset ); break; - default: bOk = false; - } - } - } - } - - // build and finalize the token sequence - ApiTokenSequence aFinalTokens; - if( bOk && (rStrm.tell() == nEndPos) ) - aFinalTokens = finalizeImport(); - - // seek behind additional token data of tArray, tMemArea, tNlr tokens - rStrm.seek( mnAddDataPos ); - - // return the final token sequence - return aFinalTokens; -} - // import token contents and create API formula token ------------------------- bool BiffFormulaParserImpl::importTokenNotAvailable( BiffInputStream& ) @@ -2204,37 +2066,6 @@ bool BiffFormulaParserImpl::importStrToken8( BiffInputStream& rStrm ) return pushValueOperand( rStrm.readUniStringBody( rStrm.readuInt8(), mbAllowNulChars ) ); } -bool BiffFormulaParserImpl::importAttrToken( BiffInputStream& rStrm ) -{ - bool bOk = true; - sal_uInt8 nType; - rStrm >> nType; - switch( nType ) - { - case 0: // sometimes, tAttrSkip tokens miss the type flag - case BIFF_TOK_ATTR_VOLATILE: - case BIFF_TOK_ATTR_IF: - case BIFF_TOK_ATTR_SKIP: - case BIFF_TOK_ATTR_ASSIGN: - rStrm.skip( mnAttrDataSize ); - break; - case BIFF_TOK_ATTR_CHOOSE: - rStrm.skip( mnAttrDataSize * (1 + ((getBiff() == BIFF2) ? rStrm.readuInt8() : rStrm.readuInt16())) ); - break; - case BIFF_TOK_ATTR_SUM: - rStrm.skip( mnAttrDataSize ); - bOk = pushBiffFunction( BIFF_FUNC_SUM, 1 ); - break; - case BIFF_TOK_ATTR_SPACE: - case BIFF_TOK_ATTR_SPACE_VOLATILE: - bOk = (this->*mpImportSpaceToken)( rStrm ); - break; - default: - bOk = false; - } - return bOk; -} - bool BiffFormulaParserImpl::importSpaceToken3( BiffInputStream& rStrm ) { rStrm.skip( 2 ); @@ -2322,68 +2153,6 @@ bool BiffFormulaParserImpl::importNlrToken( BiffInputStream& rStrm ) return bOk; } -bool BiffFormulaParserImpl::importArrayToken( BiffInputStream& rStrm ) -{ - rStrm.skip( mnArraySize ); - - // start token array with opening brace and leading spaces - pushOperand( OPCODE_ARRAY_OPEN ); - size_t nOpSize = popOperandSize(); - size_t nOldArraySize = getFormulaSize(); - bool bBiff8 = getBiff() == BIFF8; - - // read array size - swapStreamPosition( rStrm ); - sal_uInt16 nCols = rStrm.readuInt8(); - sal_uInt16 nRows = rStrm.readuInt16(); - if( bBiff8 ) { ++nCols; ++nRows; } else if( nCols == 0 ) nCols = 256; - OSL_ENSURE( (nCols > 0) && (nRows > 0), "BiffFormulaParserImpl::importArrayToken - empty array" ); - - // read array values and build token array - for( sal_uInt16 nRow = 0; !rStrm.isEof() && (nRow < nRows); ++nRow ) - { - if( nRow > 0 ) - appendRawToken( OPCODE_ARRAY_ROWSEP ); - for( sal_uInt16 nCol = 0; !rStrm.isEof() && (nCol < nCols); ++nCol ) - { - if( nCol > 0 ) - appendRawToken( OPCODE_ARRAY_COLSEP ); - switch( rStrm.readuInt8() ) - { - case BIFF_DATATYPE_EMPTY: - appendRawToken( OPCODE_PUSH ) <<= OUString(); - rStrm.skip( 8 ); - break; - case BIFF_DATATYPE_DOUBLE: - appendRawToken( OPCODE_PUSH ) <<= rStrm.readDouble(); - break; - case BIFF_DATATYPE_STRING: - appendRawToken( OPCODE_PUSH ) <<= bBiff8 ? - rStrm.readUniString( mbAllowNulChars ) : - rStrm.readByteStringUC( false, getTextEncoding(), mbAllowNulChars ); - break; - case BIFF_DATATYPE_BOOL: - appendRawToken( OPCODE_PUSH ) <<= (static_cast< double >( (rStrm.readuInt8() == BIFF_TOK_BOOL_FALSE) ? 0.0 : 1.0 )); - rStrm.skip( 7 ); - break; - case BIFF_DATATYPE_ERROR: - appendRawToken( OPCODE_PUSH ) <<= BiffHelper::calcDoubleFromError( rStrm.readuInt8() ); - rStrm.skip( 7 ); - break; - default: - OSL_FAIL( "BiffFormulaParserImpl::importArrayToken - unknown data type" ); - appendRawToken( OPCODE_PUSH ) <<= BiffHelper::calcDoubleFromError( BIFF_ERR_NA ); - } - } - } - swapStreamPosition( rStrm ); - - // close token array and set resulting operand size - appendRawToken( OPCODE_ARRAY_CLOSE ); - pushOperandSize( nOpSize + getFormulaSize() - nOldArraySize ); - return true; -} - bool BiffFormulaParserImpl::importRefToken2( BiffInputStream& rStrm, bool bDeleted, bool bRelativeAsOffset ) { BinSingleRef2d aRef; @@ -2444,26 +2213,6 @@ bool BiffFormulaParserImpl::importArea3dToken8( BiffInputStream& rStrm, bool bDe return pushReferenceOperand( aSheetRange, aRef, bDeleted, bRelativeAsOffset ); } -bool BiffFormulaParserImpl::importMemAreaToken( BiffInputStream& rStrm, bool bAddData ) -{ - rStrm.skip( mnMemAreaSize ); - if( bAddData ) - skipMemAreaAddData( rStrm ); - return true; -} - -bool BiffFormulaParserImpl::importMemFuncToken( BiffInputStream& rStrm ) -{ - rStrm.skip( mnMemFuncSize ); - return true; -} - -bool BiffFormulaParserImpl::importNameToken( BiffInputStream& rStrm ) -{ - sal_uInt16 nNameId = readNameId( rStrm ); - return (mnCurrRefId > 0) ? pushBiffExtName( mnCurrRefId, nNameId ) : pushBiffName( nNameId ); -} - bool BiffFormulaParserImpl::importNameXToken( BiffInputStream& rStrm ) { sal_Int32 nRefId = readRefId( rStrm ); @@ -2509,20 +2258,6 @@ bool BiffFormulaParserImpl::importFuncCEToken( BiffInputStream& rStrm ) return pushBiffFunction( nCmdId, nParamCount ); } -bool BiffFormulaParserImpl::importExpToken( BiffInputStream& rStrm ) -{ - BinAddress aBaseAddr; - aBaseAddr.read( rStrm ); - return pushSpecialTokenOperand( aBaseAddr, false ); -} - -bool BiffFormulaParserImpl::importTblToken( BiffInputStream& rStrm ) -{ - BinAddress aBaseAddr; - aBaseAddr.read( rStrm ); - return pushSpecialTokenOperand( aBaseAddr, true ); -} - bool BiffFormulaParserImpl::importNlrAddrToken( BiffInputStream& rStrm, bool bRow ) { BiffNlr aNlr; @@ -2599,14 +2334,6 @@ void BiffFormulaParserImpl::swapStreamPosition( BiffInputStream& rStrm ) mnAddDataPos = nRecPos; } -void BiffFormulaParserImpl::skipMemAreaAddData( BiffInputStream& rStrm ) -{ - swapStreamPosition( rStrm ); - sal_Int32 nCount = rStrm.readuInt16(); - rStrm.skip( ((getBiff() == BIFF8) ? 8 : 6) * nCount ); - swapStreamPosition( rStrm ); -} - bool BiffFormulaParserImpl::readNlrSAddrAddData( BiffNlr& orNlr, BiffInputStream& rStrm, bool bRow ) { bool bIsRow = false; diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 480499a27fce..7889664ca3f7 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -135,9 +135,6 @@ protected: bool ParseWithNames( ScRangeList& rRanges, const OUString& rStr, ScDocument* pDoc ); - void preNotify(const NotifyEvent& rEvent, const bool bBindRef); - void stateChanged(const StateChangedType nStateChange, const bool bBindRef); - public: ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef ); virtual ~ScRefHandler(); diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 78c534264614..630693cd79fe 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -525,18 +525,6 @@ inline ScVSplitPos WhichV( ScSplitPos ePos ) SC_SPLIT_TOP : SC_SPLIT_BOTTOM; } -inline ScSplitPos Which( ScHSplitPos eHPos ) -{ - return (eHPos==SC_SPLIT_LEFT) ? - SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT; -} - -inline ScSplitPos Which( ScVSplitPos eVPos ) -{ - return (eVPos==SC_SPLIT_TOP) ? - SC_SPLIT_TOPLEFT : SC_SPLIT_BOTTOMLEFT; -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 385537a20f26..dfce667e6912 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -941,39 +941,6 @@ void ScRefHandler::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* m_aHelper.ToggleCollapsed( pEdit, pButton ); } -void ScRefHandler::preNotify(const NotifyEvent& rNEvt, const bool bBindRef) -{ - if( bBindRef || m_bInRefMode ) - { - MouseNotifyEvent nSwitch=rNEvt.GetType(); - if(nSwitch==MouseNotifyEvent::GETFOCUS) - { - pActiveWin=rNEvt.GetWindow(); - } - } -} - -void ScRefHandler::stateChanged(const StateChangedType nStateChange, const bool bBindRef) -{ - if( !bBindRef && !m_bInRefMode ) return; - - if(nStateChange == StateChangedType::Visible) - { - if(m_rWindow->IsVisible()) - { - ScFormulaReferenceHelper::enableInput( false ); - ScFormulaReferenceHelper::EnableSpreadsheets(); - ScFormulaReferenceHelper::SetDispatcherLock( true ); - aIdle.Start(); - } - else - { - ScFormulaReferenceHelper::enableInput( true ); - ScFormulaReferenceHelper::SetDispatcherLock( false ); /*//! here and in DoClose ?*/ - } - } -} - IMPL_LINK_NOARG_TYPED(ScRefHandler, UpdateFocusHdl, Idle *, void) { if (pActiveWin) diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx index 32ebb1cea1e0..7d73d2702d04 100644 --- a/sc/source/ui/vba/vbacondition.cxx +++ b/sc/source/ui/vba/vbacondition.cxx @@ -105,17 +105,6 @@ ScVbaCondition< Ifc... >::setFormula1( const uno::Any& _aFormula1) throw ( scrip } template< typename... Ifc > -void -ScVbaCondition< Ifc... >::setFormula2( const uno::Any& _aFormula2) throw ( script::BasicErrorException ) -{ - OUString sFormula2; - // #TODO surely this can't be right? - // ( from helperapi/impl/.../calc/ConditionImpl.java - if ( (_aFormula2 >>= sFormula2 )) - mxSheetCondition->setFormula1(sFormula2); -} - -template< typename... Ifc > sal_Int32 ScVbaCondition< Ifc... >::Operator(bool _bIncludeFormulaValue) throw ( script::BasicErrorException ) { diff --git a/sc/source/ui/vba/vbacondition.hxx b/sc/source/ui/vba/vbacondition.hxx index 3c96a5d646af..2dcda6ce2df6 100644 --- a/sc/source/ui/vba/vbacondition.hxx +++ b/sc/source/ui/vba/vbacondition.hxx @@ -35,12 +35,11 @@ public: static css::sheet::ConditionOperator retrieveAPIOperator( const css::uno::Any& _aOperator) throw ( css::script::BasicErrorException ); - virtual OUString SAL_CALL Formula1( ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); - virtual OUString SAL_CALL Formula2( ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); + virtual OUString SAL_CALL Formula1( ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ) SAL_OVERRIDE; + virtual OUString SAL_CALL Formula2( ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ) SAL_OVERRIDE; virtual void setFormula1( const css::uno::Any& _aFormula1) throw ( css::script::BasicErrorException ); - virtual void setFormula2( const css::uno::Any& _aFormula2) throw ( css::script::BasicErrorException ); virtual sal_Int32 Operator(bool _bIncludeFormulaValue) throw ( css::script::BasicErrorException ); - virtual sal_Int32 SAL_CALL Operator() throw ( css::script::BasicErrorException, css::uno::RuntimeException ) = 0; + virtual sal_Int32 SAL_CALL Operator() throw ( css::script::BasicErrorException, css::uno::RuntimeException ) SAL_OVERRIDE = 0; }; #endif diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index c502226782fd..792818c97c66 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -115,12 +115,6 @@ ScVbaFormatCondition::setFormula1( const uno::Any& _aFormula1) throw ( script::B ScVbaFormatCondition_BASE::setFormula1( uno::makeAny( ScVbaFormatConditions::getA1Formula(_aFormula1) ) ); } -void -ScVbaFormatCondition::setFormula2( const uno::Any& _aFormula2) throw ( script::BasicErrorException ) -{ - ScVbaFormatCondition_BASE::setFormula1( uno::makeAny( ScVbaFormatConditions::getA1Formula(_aFormula2)) ); -} - ::sal_Int32 SAL_CALL ScVbaFormatCondition::Type( ) throw ( script::BasicErrorException, uno::RuntimeException, std::exception ) { diff --git a/sc/source/ui/vba/vbaformatcondition.hxx b/sc/source/ui/vba/vbaformatcondition.hxx index 70003e883379..4911656843ac 100644 --- a/sc/source/ui/vba/vbaformatcondition.hxx +++ b/sc/source/ui/vba/vbaformatcondition.hxx @@ -56,7 +56,6 @@ public: virtual ::sal_Int32 Operator( bool ) throw (css::script::BasicErrorException) override; virtual ::sal_Int32 SAL_CALL Operator( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) override; virtual void setFormula1( const css::uno::Any& _aFormula1) throw ( css::script::BasicErrorException ) override; - virtual void setFormula2( const css::uno::Any& _aFormula2) throw ( css::script::BasicErrorException ) override; virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior( ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) override; virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& Index ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) override; virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font( ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) override; diff --git a/sc/source/ui/vba/vbapagebreak.hxx b/sc/source/ui/vba/vbapagebreak.hxx index 611dc54c4903..01a12cbf9272 100644 --- a/sc/source/ui/vba/vbapagebreak.hxx +++ b/sc/source/ui/vba/vbapagebreak.hxx @@ -43,11 +43,11 @@ public: css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException); virtual ~ScVbaPageBreak(){} - virtual sal_Int32 SAL_CALL getType( ) throw (css::uno::RuntimeException); - virtual void SAL_CALL setType(sal_Int32 type) throw (css::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getType( ) throw (css::uno::RuntimeException) SAL_OVERRIDE; + virtual void SAL_CALL setType(sal_Int32 type) throw (css::uno::RuntimeException) SAL_OVERRIDE; - virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException, css::uno::RuntimeException); - virtual css::uno::Reference< ov::excel::XRange> SAL_CALL Location() throw ( css::script::BasicErrorException, css::uno::RuntimeException); + virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE; + virtual css::uno::Reference< ov::excel::XRange> SAL_CALL Location() throw ( css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE; }; typedef ScVbaPageBreak < ov::excel::XHPageBreak > ScVbaHPageBreak_BASE; diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx index 53d7db4494f9..fa85c2de0712 100644 --- a/sc/source/ui/vba/vbatitle.hxx +++ b/sc/source/ui/vba/vbatitle.hxx @@ -47,7 +47,7 @@ public: xShapePropertySet.set( xTitleShape, css::uno::UNO_QUERY_THROW ); oShapeHelper.reset( new ov::ShapeHelper(xTitleShape) ); } - css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { // #TODO find out what the proper parent should be // leaving as set by the helperapi for the moment @@ -55,14 +55,14 @@ public: // otherwise attempts to access the palette will fail return new ScVbaInterior( BaseClass::mxParent, BaseClass::mxContext, xShapePropertySet ); } - css::uno::Reference< ov::excel::XFont > SAL_CALL Font( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + css::uno::Reference< ov::excel::XFont > SAL_CALL Font( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { // #TODO find out what the proper parent should be // leaving as set by the helperapi for the moment return new ScVbaFont( BaseClass::mxParent, BaseClass::mxContext, m_Palette, xShapePropertySet ); } - void SAL_CALL setText( const OUString& Text ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + void SAL_CALL setText( const OUString& Text ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { try { @@ -73,7 +73,7 @@ public: throw css::script::BasicErrorException( OUString(), css::uno::Reference< css::uno::XInterface >(), ERRCODE_BASIC_METHOD_FAILED, OUString() ); } } - OUString SAL_CALL getText( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + OUString SAL_CALL getText( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { OUString sText; try @@ -87,31 +87,23 @@ public: return sText; } - css::uno::Reference< ov::excel::XCharacters > SAL_CALL Characters( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) - { - // #FIXME #TODO the helperapi Characters implementation doesn't - // seem to do very much, need to know how the existing Characters - // impl ( that we use for Range ) can be reused - return css::uno::Reference< ov::excel::XCharacters > (); - } - - void SAL_CALL setTop( double Top ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + void SAL_CALL setTop( double Top ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { oShapeHelper->setTop( Top ); } - double SAL_CALL getTop( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + double SAL_CALL getTop( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { return oShapeHelper->getTop(); } - void SAL_CALL setLeft( double Left ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + void SAL_CALL setLeft( double Left ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { oShapeHelper->setLeft( Left ); } - double SAL_CALL getLeft( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + double SAL_CALL getLeft( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { return oShapeHelper->getLeft(); } - void SAL_CALL setOrientation( ::sal_Int32 _nOrientation ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + void SAL_CALL setOrientation( ::sal_Int32 _nOrientation ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { try { @@ -122,7 +114,7 @@ public: throw css::script::BasicErrorException( OUString(), css::uno::Reference< css::uno::XInterface >(), ERRCODE_BASIC_METHOD_FAILED, OUString() ); } } - ::sal_Int32 SAL_CALL getOrientation( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) + ::sal_Int32 SAL_CALL getOrientation( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE { sal_Int32 nSOOrientation = 0; try @@ -136,11 +128,11 @@ public: return static_cast< sal_Int32 >(nSOOrientation / 100) ; } // XHelperInterface - OUString getServiceImplName() + OUString getServiceImplName() SAL_OVERRIDE { return OUString("TitleImpl"); } - css::uno::Sequence< OUString > getServiceNames() + css::uno::Sequence< OUString > getServiceNames() SAL_OVERRIDE { static css::uno::Sequence< OUString > aServiceNames; if ( aServiceNames.getLength() == 0 ) |