diff options
author | Alfonso Eusebio <alfonso_eusebio@yahoo.co.uk> | 2011-02-06 17:58:59 +0000 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-02-08 21:02:19 -0500 |
commit | 43ed55f6dcbdb8a7cf4cf573c6ca45971fae40d6 (patch) | |
tree | 450732e3e409cd4077746d156dc2a8b85f59f22d | |
parent | 9873a919b94d39ae58327c59078343a4944bd7b7 (diff) |
Removed unused functions and classes form calc 3last
Removed unused function and some entire classes from calc.
The functions removed are some of those identified by call-catcher.
23 files changed, 2 insertions, 534 deletions
diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx index 12a59406b..d45c0b297 100644 --- a/sc/inc/compressedarray.hxx +++ b/sc/inc/compressedarray.hxx @@ -349,51 +349,6 @@ void ScCompressedArrayIterator<A,D>::Resync( A nPos ) } -// === ScSummableCompressedArray ============================================= - -/** Data type D must be of a type that is convertable to unsigned long. The - advantage is that specialized methods exist to act on a region of values - for performance reasons. - */ - -template< typename A, typename D > class ScSummableCompressedArray : public ScCompressedArray<A,D> -{ -public: - ScSummableCompressedArray( A nMaxAccessP, - const D& rValue, - size_t nDeltaP = nScCompressedArrayDelta ) - : ScCompressedArray<A,D>( nMaxAccessP, - rValue, nDeltaP) - {} - ScSummableCompressedArray( A nMaxAccessP, - const D* pDataArray, size_t nDataCount ) - : ScCompressedArray<A,D>( nMaxAccessP, - pDataArray, nDataCount) - {} - - /** Returns the sum of all values for a region. If an overflow would occur, - ::std::numeric_limits<unsigned long>::max() is returned. */ - unsigned long SumValues( A nStart, A nEnd ) const; - - /** Returns the sum of all values for a region. If an overflow would occur, - ::std::numeric_limits<unsigned long>::max() is returned. - The caller has to assure that nIndex matches an entry belonging to - nStart, for example, by calling Search(nStart) first! */ - unsigned long SumValuesContinuation( A nStart, A nEnd, - size_t& nIndex ) const; - - /** Returns the sum of all scaled values for a region. If an overflow would - occur, ::std::numeric_limits<unsigned long>::max() is returned. - Summed values are treated as if for each row the expression - (sum += (unsigned long) (scale * value)) had been applied. - The caller has to assure that nIndex matches an entry belonging to - nStart, for example, by calling Search(nStart) first! */ - unsigned long SumScaledValuesContinuation( A nStart, A nEnd, - size_t& nIndex, double fScale ) const; - -}; - - // === ScBitMaskCompressedArray ============================================== /** The data type represents bits, managable by bitwise operations. diff --git a/sc/inc/tabbgcolor.hxx b/sc/inc/tabbgcolor.hxx index a9544d247..063c20596 100644 --- a/sc/inc/tabbgcolor.hxx +++ b/sc/inc/tabbgcolor.hxx @@ -40,9 +40,6 @@ struct ScUndoTabColorInfo Color maOldTabBgColor; Color maNewTabBgColor; - bool IsDefaultOldTabBgColor() const; - bool IsDefaultNewTabBgColor() const; - explicit ScUndoTabColorInfo(SCTAB nTab); ScUndoTabColorInfo(const ScUndoTabColorInfo& r); diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx index 40a7691d8..3e45ffab2 100644 --- a/sc/inc/validat.hxx +++ b/sc/inc/validat.hxx @@ -203,10 +203,6 @@ public: const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ); - /** Temporarily during save, returns RefManager's decision whether ALL - * references are marked now. */ - bool MarkUsedExternalReferences() const; - BOOL operator==( const ScValidationDataList& r ) const; // fuer Ref-Undo }; diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx index 22019972d..ea11c39c0 100644 --- a/sc/source/core/data/compressedarray.cxx +++ b/sc/source/core/data/compressedarray.cxx @@ -334,63 +334,6 @@ void ScCompressedArray<A,D>::Remove( A nStart, size_t nAccessCount ) pData[nCount-1].nEnd = nMaxAccess; } -// === ScSummableCompressedArray ============================================= - -template< typename A, typename D > -unsigned long ScSummableCompressedArray<A,D>::SumValues( A nStart, A nEnd ) const -{ - size_t nIndex = Search( nStart); - unsigned long nSum = SumValuesContinuation( nStart, nEnd, nIndex); - if (nEnd > this->nMaxAccess) - nSum += this->pData[this->nCount-1].aValue * (nEnd - this->nMaxAccess); - return nSum; -} - - -template< typename A, typename D > -unsigned long ScSummableCompressedArray<A,D>::SumValuesContinuation( - A nStart, A nEnd, size_t& nIndex ) const -{ - unsigned long nSum = 0; - A nS = nStart; - while (nIndex < this->nCount && nS <= nEnd) - { - A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); - // FIXME: test for overflow in a single region? - unsigned long nNew = (unsigned long) this->pData[nIndex].aValue * (nE - nS + 1); - nSum += nNew; - if (nSum < nNew) - return ::std::numeric_limits<unsigned long>::max(); - nS = nE + 1; - if (nS <= nEnd) - ++nIndex; - } - return nSum; -} - - -template< typename A, typename D > -unsigned long ScSummableCompressedArray<A,D>::SumScaledValuesContinuation( - A nStart, A nEnd, size_t& nIndex, double fScale ) const -{ - unsigned long nSum = 0; - A nS = nStart; - while (nIndex < this->nCount && nS <= nEnd) - { - A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); - unsigned long nScaledVal = (unsigned long) (this->pData[nIndex].aValue * fScale); - // FIXME: test for overflow in a single region? - unsigned long nNew = nScaledVal * (nE - nS + 1); - nSum += nNew; - if (nSum < nNew) - return ::std::numeric_limits<unsigned long>::max(); - nS = nE + 1; - if (nS <= nEnd) - ++nIndex; - } - return nSum; -} - // === ScBitMaskCompressedArray ============================================== @@ -544,7 +487,6 @@ void ScCompressedArrayIterator<A,D>::Follow( // === Force instantiation of specializations ================================ template class ScCompressedArray< SCROW, USHORT>; // heights, base class -template class ScSummableCompressedArray< SCROW, USHORT>; // heights template class ScCompressedArray< SCROW, BYTE>; // flags, base class template class ScBitMaskCompressedArray< SCROW, BYTE>; // flags template void ScCompressedArrayIterator< SCROW, USHORT>::Follow( diff --git a/sc/source/core/data/tabbgcolor.cxx b/sc/source/core/data/tabbgcolor.cxx index ed4873fd7..93c2be5ba 100644 --- a/sc/source/core/data/tabbgcolor.cxx +++ b/sc/source/core/data/tabbgcolor.cxx @@ -35,16 +35,6 @@ #include "tabbgcolor.hxx" -bool ScUndoTabColorInfo::IsDefaultOldTabBgColor() const -{ - return maOldTabBgColor == Color(COL_AUTO); -} - -bool ScUndoTabColorInfo::IsDefaultNewTabBgColor() const -{ - return maOldTabBgColor == Color(COL_AUTO); -} - ScUndoTabColorInfo::ScUndoTabColorInfo(SCTAB nTab) : mnTabId(nTab), maOldTabBgColor(COL_AUTO), diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index 051a349bc..4c435a864 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -961,15 +961,6 @@ void ScValidationDataList::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) (*this)[i]->UpdateMoveTab( nOldPos, nNewPos ); } -bool ScValidationDataList::MarkUsedExternalReferences() const -{ - bool bAllMarked = false; - USHORT nCount = Count(); - for (USHORT i=0; !bAllMarked && i<nCount; i++) - bAllMarked = (*this)[i]->MarkUsedExternalReferences(); - return bAllMarked; -} - BOOL ScValidationDataList::operator==( const ScValidationDataList& r ) const { // fuer Ref-Undo - interne Variablen werden nicht verglichen diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index 38776ad2a..83f215cbf 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -322,16 +322,6 @@ XclChRectangle XclExpChRoot::CalcChartRectFromHmm( const ::com::sun::star::awt:: return aRect; } -sal_Int32 XclExpChRoot::CalcChartXFromRelative( double fPosX ) const -{ - return CalcChartXFromHmm( static_cast< sal_Int32 >( fPosX * mxChData->maChartRect.GetWidth() + 0.5 ) ); -} - -sal_Int32 XclExpChRoot::CalcChartYFromRelative( double fPosY ) const -{ - return CalcChartYFromHmm( static_cast< sal_Int32 >( fPosY * mxChData->maChartRect.GetHeight() + 0.5 ) ); -} - void XclExpChRoot::ConvertLineFormat( XclChLineFormat& rLineFmt, const ScfPropertySet& rPropSet, XclChPropertyMode ePropMode ) const { diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index a95172e9c..f4b5b7364 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -380,7 +380,6 @@ private: void ProcessDouble( const XclExpScToken& rTokData ); void ProcessString( const XclExpScToken& rTokData ); - void ProcessError( const XclExpScToken& rTokData ); void ProcessMissing( const XclExpScToken& rTokData ); void ProcessBad( const XclExpScToken& rTokData ); void ProcessParentheses( const XclExpScToken& rTokData ); @@ -472,7 +471,6 @@ private: void AppendExt( sal_uInt8 nData ); void AppendExt( sal_uInt8 nData, size_t nCount ); void AppendExt( sal_uInt16 nData ); - void AppendExt( sal_uInt32 nData ); void AppendExt( double fData ); void AppendExt( const String& rString ); @@ -1216,11 +1214,6 @@ void XclExpFmlaCompImpl::ProcessString( const XclExpScToken& rTokData ) Append( rTokData.mpScToken->GetString() ); } -void XclExpFmlaCompImpl::ProcessError( const XclExpScToken& rTokData ) -{ - (void)rTokData; // compiler warning -} - void XclExpFmlaCompImpl::ProcessMissing( const XclExpScToken& rTokData ) { AppendMissingToken( rTokData.mnSpaces ); @@ -2507,11 +2500,6 @@ void XclExpFmlaCompImpl::AppendExt( sal_uInt16 nData ) lclAppend( mxData->maExtDataVec, nData ); } -void XclExpFmlaCompImpl::AppendExt( sal_uInt32 nData ) -{ - lclAppend( mxData->maExtDataVec, nData ); -} - void XclExpFmlaCompImpl::AppendExt( double fData ) { lclAppend( mxData->maExtDataVec, fData ); diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index e9c597e27..86c75ce34 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -120,11 +120,6 @@ public: /** Converts the passed rectangle from 1/100 mm to Excel chart units. */ XclChRectangle CalcChartRectFromHmm( const ::com::sun::star::awt::Rectangle& rRect ) const; - /** Converts the passed horizontal coordinate from a relative position to Excel chart units. */ - sal_Int32 CalcChartXFromRelative( double fPosX ) const; - /** Converts the passed vertical coordinate from a relative position to Excel chart units. */ - sal_Int32 CalcChartYFromRelative( double fPosY ) const; - /** Reads all line properties from the passed property set. */ void ConvertLineFormat( XclChLineFormat& rLineFmt, diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index f338c83a9..a68a93dc9 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -101,7 +101,7 @@ public: uno::Reference<XAccessible> GetAt(const awt::Point& rPoint) const; void DataChanged(const Rectangle& rVisRect); - void SetOffset(sal_Int32 nNewOffset); + private: ScPreviewShell* mpViewShell; ScAccessibleDocumentPagePreview* mpAccDoc; @@ -501,17 +501,6 @@ struct ScChangeOffset } }; -void ScNotesChilds::SetOffset(sal_Int32 nNewOffset) -{ - sal_Int32 nDiff(nNewOffset - mnOffset); - if (nDiff != 0) - { - std::for_each(maMarks.begin(), maMarks.end(), ScChangeOffset(nDiff)); - std::for_each(maNotes.begin(), maNotes.end(), ScChangeOffset(nDiff)); - mnOffset = nNewOffset; - } -} - inline ScDocument* ScNotesChilds::GetDocument() const { ScDocument* pDoc = NULL; diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index bd3893afb..39fac7018 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -271,8 +271,6 @@ public: ScDocument* GetDocument() const; - void SetViewShell( ScTabViewShell* pViewSh ); - BOOL IsActive() const { return bActive; } void Activate(BOOL bActivate) { bActive = bActivate; } diff --git a/sc/source/ui/vba/makefile.mk b/sc/source/ui/vba/makefile.mk index 3719e08e3..a937849d3 100644 --- a/sc/source/ui/vba/makefile.mk +++ b/sc/source/ui/vba/makefile.mk @@ -62,7 +62,6 @@ SLOFILES= \ $(SLO)$/vbachart.obj \ $(SLO)$/vbachartobject.obj \ $(SLO)$/vbachartobjects.obj \ - $(SLO)$/vbacharts.obj \ $(SLO)$/vbacharttitle.obj \ $(SLO)$/vbacomment.obj \ $(SLO)$/vbacomments.obj \ @@ -104,7 +103,6 @@ SLOFILES= \ $(SLO)$/vbapivottables.obj \ $(SLO)$/vbaquerytable.obj \ $(SLO)$/vbarange.obj \ - $(SLO)$/vbaseriescollection.obj \ $(SLO)$/vbasheetobject.obj \ $(SLO)$/vbasheetobjects.obj \ $(SLO)$/vbastyle.obj \ diff --git a/sc/source/ui/vba/vbacharts.cxx b/sc/source/ui/vba/vbacharts.cxx deleted file mode 100644 index d9a720dc3..000000000 --- a/sc/source/ui/vba/vbacharts.cxx +++ /dev/null @@ -1,122 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "vbacharts.hxx" -#include <basic/sberrors.hxx> -#include <com/sun/star/table/XTableChartsSupplier.hpp> - -using namespace ::com::sun::star; -using namespace ::ooo::vba; - - -ScVbaCharts::ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const uno::Reference< frame::XModel >& xModel ) : Charts_BASE(_xParent, _xContext, uno::Reference< container::XIndexAccess >()) -{ - xComponent.set( xModel, uno::UNO_QUERY_THROW ); - xSpreadsheetDocument.set( xComponent, uno::UNO_QUERY_THROW ); -} - -uno::Any SAL_CALL -ScVbaCharts::Add() throw (css::script::BasicErrorException, css::uno::RuntimeException) -{ - // Not implemented in the helperapi ( see ChartsImpl.java ) - if ( true ) - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_BAD_METHOD, rtl::OUString() ); - return aNULL(); -} - -uno::Reference< excel::XChart > SAL_CALL -ScVbaCharts::getActiveChart() throw (script::BasicErrorException, uno::RuntimeException) -{ - return xActiveChart; -} - -uno::Reference< container::XEnumeration > SAL_CALL -ScVbaCharts::createEnumeration() throw (uno::RuntimeException) -{ - // #FIXME not implemented - if ( true ) - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_BAD_METHOD, rtl::OUString() ); - return uno::Reference< container::XEnumeration >(); -} - -// #FIXME #TODO this method shouldn't appear in this class directly -// a XIndexAccess/XNameAccess wrapper should be passed to the base class instead -::sal_Int32 SAL_CALL -ScVbaCharts::getCount() throw (uno::RuntimeException) -{ - sal_Int32 ncount = 0; - try - { - uno::Reference< sheet::XSpreadsheets > xSpreadsheets( xSpreadsheetDocument->getSheets() ); - uno::Sequence< rtl::OUString > SheetNames = xSpreadsheets->getElementNames(); - sal_Int32 nLen = SheetNames.getLength(); - for (sal_Int32 i = 0; i < nLen; i++) - { - uno::Reference< table::XTableChartsSupplier > xTableChartsSupplier( xSpreadsheets->getByName(SheetNames[i]), uno::UNO_QUERY); - if ( xTableChartsSupplier.is() ) - { - uno::Reference< table::XTableCharts > xTableCharts = xTableChartsSupplier->getCharts(); - ncount =+ xTableCharts->getElementNames().getLength(); - } - } - } - catch (uno::Exception& ) - { - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); - } - return ncount; -} - -uno::Any -ScVbaCharts::createCollectionObject( const uno::Any& aSource ) -{ - if ( true ) - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_BAD_METHOD, rtl::OUString() ); - // #TODO implementation please - return aSource; -} - -rtl::OUString& -ScVbaCharts::getServiceImplName() -{ - static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCharts") ); - return sImplName; -} - -css::uno::Sequence<rtl::OUString> -ScVbaCharts::getServiceNames() -{ - static uno::Sequence< rtl::OUString > sNames; - if ( sNames.getLength() == 0 ) - { - sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Charts") ); - } - return sNames; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbacharts.hxx b/sc/source/ui/vba/vbacharts.hxx deleted file mode 100644 index b2101c6b3..000000000 --- a/sc/source/ui/vba/vbacharts.hxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef SC_VBA_CHARTS_HXX -#define SC_VBA_CHARTS_HXX -#include <ooo/vba/excel/XCharts.hpp> -#include <com/sun/star/sheet/XSpreadsheetDocument.hpp> -#include <vbahelper/vbacollectionimpl.hxx> -#include "excelvbahelper.hxx" -#include <boost/unordered_map.hpp> - -typedef CollTestImplHelper< ov::excel::XCharts > Charts_BASE; - -class ScVbaCharts : public Charts_BASE -{ - css::uno::Reference< ov::excel::XChart > xActiveChart; - css::uno::Reference< css::sheet::XSpreadsheetDocument > xSpreadsheetDocument; - css::uno::Reference< css::lang::XComponent > xComponent; -public: - ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::frame::XModel >& xModel ); - // XCharts - virtual css::uno::Any SAL_CALL Add() throw (css::script::BasicErrorException, css::uno::RuntimeException); - virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getActiveChart( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); - // XCollection - ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException); - // XEnumerationAccess - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); - // XElementAccess - virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) { return ov::excel::XChart::static_type(0); } - // ScVbaCollectionBaseImpl - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); - // Charts_BASE or HelperInterface - virtual rtl::OUString& getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 26dcaac89..483764ed9 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -46,18 +46,6 @@ static rtl::OUString FORMULA2( RTL_CONSTASCII_USTRINGPARAM("Formula2") ); static rtl::OUString STYLENAME( RTL_CONSTASCII_USTRINGPARAM("StyleName") ); static rtl::OUString sStyleNamePrefix( RTL_CONSTASCII_USTRINGPARAM("Excel_CondFormat") ); -ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& /*xModel*/ ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries ) -{ - mxRangeParent.set( xParent, uno::UNO_QUERY_THROW ); - uno::Reference< excel::XApplication> xApp( Application(), uno::UNO_QUERY_THROW ); - mxStyles.set( xApp->getThisWorkbook()->Styles( uno::Any() ), uno::UNO_QUERY_THROW ); - uno::Reference< sheet::XCellRangeAddressable > xCellRange( mxRangeParent->getCellRange(), uno::UNO_QUERY_THROW ); - mxParentRangePropertySet.set( xCellRange, uno::UNO_QUERY_THROW ); - - table::CellRangeAddress rangeAddress = xCellRange->getRangeAddress(); - maCellAddress = table::CellAddress( rangeAddress.Sheet, rangeAddress.StartColumn, rangeAddress.StartRow ); -} - void SAL_CALL ScVbaFormatConditions::Delete( ) throw (script::BasicErrorException, uno::RuntimeException) { diff --git a/sc/source/ui/vba/vbaformatconditions.hxx b/sc/source/ui/vba/vbaformatconditions.hxx index 41933323a..6fe5b9c93 100644 --- a/sc/source/ui/vba/vbaformatconditions.hxx +++ b/sc/source/ui/vba/vbaformatconditions.hxx @@ -44,7 +44,6 @@ class ScVbaFormatConditions: public ScVbaFormatConditions_BASE css::uno::Reference< ov::excel::XRange > mxRangeParent; css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet; public: - ScVbaFormatConditions( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntries >&, const css::uno::Reference< css::frame::XModel >& ); void notifyRange() throw ( css::script::BasicErrorException ); virtual css::uno::Reference< ov::excel::XFormatCondition > Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2, const css::uno::Reference< ov::excel::XStyle >& _xCalcStyle ) throw (css::script::BasicErrorException, css::uno::RuntimeException); rtl::OUString getA1Formula(const css::uno::Any& _aFormula) throw ( css::script::BasicErrorException ); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index f612e9f13..3373aa5ff 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -271,11 +271,6 @@ ScCellRangeObj* ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException ) return dynamic_cast< ScCellRangeObj* >( getCellRangesBase() ); } -ScCellRangesObj* ScVbaRange::getCellRangesObj() throw ( uno::RuntimeException ) -{ - return dynamic_cast< ScCellRangesObj* >( getCellRangesBase() ); -} - SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException ) { SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() ); diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx index 8a5bb0ac7..1b01329ac 100644 --- a/sc/source/ui/vba/vbarange.hxx +++ b/sc/source/ui/vba/vbarange.hxx @@ -117,7 +117,6 @@ class ScVbaRange : public ScVbaRange_BASE virtual void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException); css::uno::Reference< ov::excel::XRange > getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException ); ScCellRangeObj* getCellRangeObj( ) throw ( css::uno::RuntimeException ); - ScCellRangesObj* getCellRangesObj() throw ( css::uno::RuntimeException ); css::uno::Reference< ov::XCollection >& getBorders(); void groupUnGroup( bool bUnGroup = false ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); css::uno::Reference< ov::excel::XRange > PreviousNext( bool bIsPrevious ); diff --git a/sc/source/ui/vba/vbaseriescollection.cxx b/sc/source/ui/vba/vbaseriescollection.cxx deleted file mode 100644 index 794f91137..000000000 --- a/sc/source/ui/vba/vbaseriescollection.cxx +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "vbaseriescollection.hxx" -#include <ooo/vba/excel/XSeries.hpp> - -#include "vbaglobals.hxx" - -using namespace ::com::sun::star; -using namespace ::ooo::vba; - -ScVbaSeriesCollection::ScVbaSeriesCollection( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : SeriesCollection_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ) -{ -} - -// XEnumerationAccess - -uno::Reference< container::XEnumeration > -ScVbaSeriesCollection::createEnumeration() throw (uno::RuntimeException) -{ - uno::Reference< container::XEnumeration > xEnum; - return xEnum; -} - -// XElementAccess - -uno::Type -ScVbaSeriesCollection::getElementType() throw (uno::RuntimeException) -{ - return excel::XSeries::static_type(0); -} - -uno::Any -ScVbaSeriesCollection::createCollectionObject( const css::uno::Any& rSource ) -{ - return rSource; -} - -rtl::OUString& -ScVbaSeriesCollection::getServiceImplName() -{ - static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSeriesCollection") ); - return sImplName; -} - -css::uno::Sequence<rtl::OUString> -ScVbaSeriesCollection::getServiceNames() -{ - static uno::Sequence< rtl::OUString > sNames; - if ( sNames.getLength() == 0 ) - { - sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.SeriesCollection") ); - } - return sNames; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbaseriescollection.hxx b/sc/source/ui/vba/vbaseriescollection.hxx deleted file mode 100644 index ddffda7ac..000000000 --- a/sc/source/ui/vba/vbaseriescollection.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef SC_VBA_SERIESCOLLECTION_HXX -#define SC_VBA_SERIESCOLLECTION_HXX - -#include <ooo/vba/excel/XSeriesCollection.hpp> -#include <vbahelper/vbahelperinterface.hxx> -#include <vbahelper/vbacollectionimpl.hxx> -#include "excelvbahelper.hxx" - - -typedef CollTestImplHelper< ov::excel::XSeriesCollection > SeriesCollection_BASE; - -class ScVbaSeriesCollection : public SeriesCollection_BASE -{ - css::uno::Reference< css::uno::XComponentContext > m_xContext; - -public: - ScVbaSeriesCollection( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ); - // XEnumerationAccess - virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); - - // SeriesCollection_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); - virtual rtl::OUString& getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); -}; - -#endif //SC_VBA_WINDOW_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index ef6618563..87b6e7ae1 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -206,11 +206,6 @@ public: }; - -ScVbaWindows::ScVbaWindows( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess ): ScVbaWindows_BASE( xParent, xContext, xIndexAccess ) -{ -} - ScVbaWindows::ScVbaWindows( const uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : ScVbaWindows_BASE( xParent, xContext, uno::Reference< container::XIndexAccess > ( new WindowsAccessImpl( xContext ) ) ) { } diff --git a/sc/source/ui/vba/vbawindows.hxx b/sc/source/ui/vba/vbawindows.hxx index 71d5f7cd5..aef636faf 100644 --- a/sc/source/ui/vba/vbawindows.hxx +++ b/sc/source/ui/vba/vbawindows.hxx @@ -42,7 +42,7 @@ typedef CollTestImplHelper< ov::excel::XWindows > ScVbaWindows_BASE; class ScVbaWindows : public ScVbaWindows_BASE { public: - ScVbaWindows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ); + //]AE] ScVbaWindows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ); ScVbaWindows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext ); virtual ~ScVbaWindows() {} diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 97cd94fda..57ca05aca 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -540,19 +540,6 @@ void ScViewData::MoveTab( SCTAB nSrcTab, SCTAB nDestTab ) aMarkData.InsertTab( nInsTab ); // ggf. angepasst } -void ScViewData::SetViewShell( ScTabViewShell* pViewSh ) -{ - if (pViewSh) - { - pViewShell = pViewSh; - pView = pViewSh; - } - else - { - pViewShell = NULL; - pView = NULL; - } -} void ScViewData::CreateTabData( std::vector< SCTAB >& rvTabs ) { std::vector< SCTAB >::iterator it_end = rvTabs.end(); |