diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-29 12:29:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-29 12:44:23 +0100 |
commit | 21ca0847952be3eabc7c11200a2b70e0801a8fc6 (patch) | |
tree | aeab1f2d0b33c9b8a07114a6dca46661c5b7788e | |
parent | 9ce98add53128716524ec06dd1f90548326adce0 (diff) |
callcatcher: update list
-rw-r--r-- | editeng/inc/editeng/unotext.hxx | 5 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 9 | ||||
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 18 | ||||
-rw-r--r-- | oox/inc/oox/core/filterbase.hxx | 3 | ||||
-rw-r--r-- | oox/inc/oox/dump/dumperbase.hxx | 1 | ||||
-rw-r--r-- | oox/source/core/filterbase.cxx | 8 | ||||
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 14 | ||||
-rw-r--r-- | sc/source/filter/ftools/fapihelper.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/inc/biffdetector.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/inc/fapihelper.hxx | 5 | ||||
-rw-r--r-- | sc/source/filter/inc/stylesbuffer.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/workbookfragment.hxx | 23 | ||||
-rw-r--r-- | sc/source/filter/oox/biffdetector.cxx | 48 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/oox/workbookfragment.cxx | 403 | ||||
-rwxr-xr-x | unusedcode.easy | 3 |
16 files changed, 5 insertions, 559 deletions
diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx index 127771b42bb4..ace08dddb5a0 100644 --- a/editeng/inc/editeng/unotext.hxx +++ b/editeng/inc/editeng/unotext.hxx @@ -485,7 +485,9 @@ public: virtual ~SvxUnoText() throw(); // Internal - UNO3_GETIMPLEMENTATION_DECL( SvxUnoText ) + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) + throw(::com::sun::star::uno::RuntimeException); }; // ==================================================================== @@ -536,7 +538,6 @@ protected: using SvxUnoTextRangeBase::getPropertyValue; public: - SvxUnoTextContent() throw(); SvxUnoTextContent( const SvxUnoTextBase& rText, sal_uInt16 nPara ) throw(); SvxUnoTextContent( const SvxUnoTextContent& rContent ) throw(); virtual ~SvxUnoTextContent() throw(); diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 469e2d70da4c..ab24176ee589 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -2162,15 +2162,6 @@ SvxUnoText::~SvxUnoText() throw() { } -SvxUnoText* SvxUnoText::getImplementation( const uno::Reference< uno::XInterface >& xInt ) -{ - uno::Reference< lang::XUnoTunnel > xUT( xInt, uno::UNO_QUERY ); - if( xUT.is() ) - return reinterpret_cast<SvxUnoText*>(sal::static_int_cast<sal_uIntPtr>(xUT->getSomething( SvxUnoText::getUnoTunnelId()))); - else - return NULL; -} - namespace { class theSvxUnoTextUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvxUnoTextUnoTunnelId > {}; diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 095763f69f36..e3fb8c93a9b4 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -102,24 +102,6 @@ uno::Any SvxUnoTextContentEnumeration::nextElement(void) throw( container::NoSuc // ==================================================================== // class SvxUnoTextContent // ==================================================================== -uno::Reference< text::XText > xDummyText; - -static SvxUnoText* getDummyText() throw() -{ - if(!xDummyText.is()) - xDummyText = new SvxUnoText(); - - return SvxUnoText::getImplementation( xDummyText ); -} - -SvxUnoTextContent::SvxUnoTextContent() throw() -: SvxUnoTextContent_Base(*getDummyText()) -, mnParagraph(0) -, mrParentText(*getDummyText()) -, maDisposeListeners(maDisposeContainerMutex) -, mbDisposing( false ) -{ -} SvxUnoTextContent::SvxUnoTextContent( const SvxUnoTextBase& rText, sal_uInt16 nPara ) throw() : SvxUnoTextContent_Base(rText) diff --git a/oox/inc/oox/core/filterbase.hxx b/oox/inc/oox/core/filterbase.hxx index 7c09707f940b..41f49f7669ce 100644 --- a/oox/inc/oox/core/filterbase.hxx +++ b/oox/inc/oox/core/filterbase.hxx @@ -121,9 +121,6 @@ public: // ------------------------------------------------------------------------ - /** Returns the specified argument passed through the XInitialization interface. */ - ::com::sun::star::uno::Any getArgument( const ::rtl::OUString& rArgName ) const; - /** Returns the component context passed in the filter constructor (always existing). */ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& getComponentContext() const; diff --git a/oox/inc/oox/dump/dumperbase.hxx b/oox/inc/oox/dump/dumperbase.hxx index 77d2710224bb..a8b16b008bb7 100644 --- a/oox/inc/oox/dump/dumperbase.hxx +++ b/oox/inc/oox/dump/dumperbase.hxx @@ -875,7 +875,6 @@ public: void eraseNameList( const ::rtl::OUString& rListName ); NameListRef getNameList( const ::rtl::OUString& rListName ) const; - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > requestEncryptionData( ::comphelper::IDocPasswordVerifier& rVerifier ); inline bool isPasswordCancelled() const { return mbPwCancelled; } protected: diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx index 40288ef1d640..2620272f6803 100644 --- a/oox/source/core/filterbase.cxx +++ b/oox/source/core/filterbase.cxx @@ -246,14 +246,6 @@ OoxmlVersion FilterBase::getVersion() const return mxImpl->meVersion; } -// ---------------------------------------------------------------------------- - -Any FilterBase::getArgument( const OUString& rArgName ) const -{ - SequenceAsHashMap::const_iterator aIt = mxImpl->maArguments.find( rArgName ); - return (aIt == mxImpl->maArguments.end()) ? Any() : aIt->second; -} - const Reference< XComponentContext >& FilterBase::getComponentContext() const { return mxImpl->mxComponentContext; diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index b2078edb760f..0a10907c27ae 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -1469,20 +1469,6 @@ NameListRef SharedConfigData::getNameList( const OUString& rListName ) const return xList; } -Sequence< NamedValue > SharedConfigData::requestEncryptionData( ::comphelper::IDocPasswordVerifier& rVerifier ) -{ - Sequence< NamedValue > aEncryptionData; - if( !mbPwCancelled ) - { - ::std::vector< OUString > aDefaultPasswords; - aDefaultPasswords.push_back( CREATE_OUSTRING( "VelvetSweatshop" ) ); - aEncryptionData = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword( - rVerifier, mrMediaDesc, ::comphelper::DocPasswordRequestType_MS, &aDefaultPasswords ); - mbPwCancelled = !aEncryptionData.hasElements(); - } - return aEncryptionData; -} - bool SharedConfigData::implIsValid() const { return mbLoaded && mxContext.is() && mxRootStrg.get() && !maSysFileName.isEmpty(); diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx index 70bca8e177e7..328fb1b8f5d3 100644 --- a/sc/source/filter/ftools/fapihelper.cxx +++ b/sc/source/filter/ftools/fapihelper.cxx @@ -129,12 +129,6 @@ Reference< XInterface > ScfApiHelper::CreateInstanceWithArgs( return xInt; } -Reference< XInterface > ScfApiHelper::CreateInstanceWithArgs( - const OUString& rServiceName, const Sequence< Any >& rArgs ) -{ - return CreateInstanceWithArgs( ::comphelper::getProcessServiceFactory(), rServiceName, rArgs ); -} - uno::Sequence< beans::NamedValue > ScfApiHelper::QueryEncryptionDataForMedium( SfxMedium& rMedium, ::comphelper::IDocPasswordVerifier& rVerifier, const ::std::vector< OUString >* pDefaultPasswords ) { diff --git a/sc/source/filter/inc/biffdetector.hxx b/sc/source/filter/inc/biffdetector.hxx index b75c91221281..10c026b2b51d 100644 --- a/sc/source/filter/inc/biffdetector.hxx +++ b/sc/source/filter/inc/biffdetector.hxx @@ -52,10 +52,6 @@ namespace BiffDetector { /** Detects the BIFF version of the passed stream. */ BiffType detectStreamBiffVersion( BinaryInputStream& rInStream ); - - /** Detects the BIFF version and workbook stream name of the passed storage. */ - BiffType detectStorageBiffVersion( ::rtl::OUString& orWorkbookStreamName, - const StorageRef& rxStorage ); }; // ============================================================================ diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index f8a338f959b3..7a5f4dce388c 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -97,11 +97,6 @@ public: const ::rtl::OUString& rServiceName, const UnoAnySequence& rArgs ); - /** Creates an instance from the passed service name, using the process service factory. */ - static XInterfaceRef CreateInstanceWithArgs( - const ::rtl::OUString& rServiceName, - const UnoAnySequence& rArgs ); - /** Opens a password dialog and returns the encryption data. @return The encryption data or an empty sequence on 'Cancel' or any error. */ static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > QueryEncryptionDataForMedium( SfxMedium& rMedium, diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx index 9906c610808f..76f90f7d29a7 100644 --- a/sc/source/filter/inc/stylesbuffer.hxx +++ b/sc/source/filter/inc/stylesbuffer.hxx @@ -150,8 +150,6 @@ public: void importPaletteColor( SequenceInputStream& rStrm ); /** Imports the PALETTE record from the passed stream. */ void importPalette( BiffInputStream& rStrm ); - /** Imports a color palette from a UNO sequence in the passed any. */ - void importPalette( const ::com::sun::star::uno::Any& rPalette ); /** Rturns the RGB value of the color with the passed index. */ sal_Int32 getColor( sal_Int32 nPaletteIdx ) const; diff --git a/sc/source/filter/inc/workbookfragment.hxx b/sc/source/filter/inc/workbookfragment.hxx index ab1aab6ee4a2..223a85994538 100644 --- a/sc/source/filter/inc/workbookfragment.hxx +++ b/sc/source/filter/inc/workbookfragment.hxx @@ -70,29 +70,6 @@ private: DefinedNameRef mxCurrName; }; -// ============================================================================ - -class BiffWorkbookFragment : public BiffWorkbookFragmentBase -{ -public: - explicit BiffWorkbookFragment( const WorkbookHelper& rHelper, const ::rtl::OUString& rStrmName ); - - /** Imports the entire workbook stream, including all contained worksheets. */ - virtual bool importFragment(); - -private: - /** Imports a complete BIFF4 workspace fragment (with embedded sheets). */ - bool importWorkspaceFragment(); - /** Imports the workbook globals fragment from current stream position. */ - bool importGlobalsFragment( ISegmentProgressBar& rProgressBar ); - /** Imports a sheet fragment with passed type from current stream position. */ - bool importSheetFragment( - ISegmentProgressBar& rProgressBar, - BiffFragmentType eFragment, sal_Int16 nCalcSheet ); -}; - -// ============================================================================ - } // namespace xls } // namespace oox diff --git a/sc/source/filter/oox/biffdetector.cxx b/sc/source/filter/oox/biffdetector.cxx index cf29f62ea568..14ebbcfc586b 100644 --- a/sc/source/filter/oox/biffdetector.cxx +++ b/sc/source/filter/oox/biffdetector.cxx @@ -103,54 +103,6 @@ BiffType detectStreamBiffVersion( BinaryInputStream& rInStream ) return eBiff; } -BiffType detectStorageBiffVersion( OUString& orWorkbookStreamName, const StorageRef& rxStorage ) -{ - - BiffType eBiff = BIFF_UNKNOWN; - if( rxStorage.get() ) - { - if( rxStorage->isStorage() ) - { - // try to open the "Book" stream - const OUString saBookName = CREATE_OUSTRING( "Book" ); - BinaryXInputStream aBookStrm5( rxStorage->openInputStream( saBookName ), true ); - BiffType eBookStrm5Biff = detectStreamBiffVersion( aBookStrm5 ); - - // try to open the "Workbook" stream - const OUString saWorkbookName = CREATE_OUSTRING( "Workbook" ); - BinaryXInputStream aBookStrm8( rxStorage->openInputStream( saWorkbookName ), true ); - BiffType eBookStrm8Biff = detectStreamBiffVersion( aBookStrm8 ); - - // decide which stream to use - if( (eBookStrm8Biff != BIFF_UNKNOWN) && ((eBookStrm5Biff == BIFF_UNKNOWN) || (eBookStrm8Biff > eBookStrm5Biff)) ) - { - /* Only "Workbook" stream exists; or both streams exist, and - "Workbook" has higher BIFF version than "Book" stream. */ - eBiff = eBookStrm8Biff; - orWorkbookStreamName = saWorkbookName; - } - else if( eBookStrm5Biff != BIFF_UNKNOWN ) - { - /* Only "Book" stream exists; or both streams exist, and - "Book" has higher BIFF version than "Workbook" stream. */ - eBiff = eBookStrm5Biff; - orWorkbookStreamName = saBookName; - } - } - else - { - // no storage, try plain input stream from medium (even for BIFF5+) - BinaryXInputStream aStrm( rxStorage->openInputStream( OUString() ), false ); - eBiff = detectStreamBiffVersion( aStrm ); - orWorkbookStreamName = OUString(); - } - } - - return eBiff; -} - -// ============================================================================ - } // BiffDetector } // namespace xls } // namespace oox diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index b9bcdd880a80..4f2935b6a5ea 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -565,18 +565,6 @@ void ColorPalette::importPalette( BiffInputStream& rStrm ) } } -void ColorPalette::importPalette( const Any& rPalette ) -{ - Sequence< sal_Int32 > rColorSeq; - if( (rPalette >>= rColorSeq) && rColorSeq.hasElements() ) - { - const sal_Int32* pnColor = rColorSeq.getConstArray(); - const sal_Int32* pnColorEnd = pnColor + rColorSeq.getLength(); - for( ; pnColor < pnColorEnd; ++pnColor ) - appendColor( *pnColor & 0xFFFFFF ); - } -} - sal_Int32 ColorPalette::getColor( sal_Int32 nPaletteIdx ) const { sal_Int32 nColor = API_RGB_TRANSPARENT; diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index 4d079e0cfce3..2ef185d0f921 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -368,409 +368,6 @@ void WorkbookFragment::importPivotCacheDefFragment( const OUString& rRelId, sal_ getPivotCaches().registerPivotCacheFragment( nCacheId, getFragmentPathFromRelId( rRelId ) ); } -// ============================================================================ - -BiffWorkbookFragment::BiffWorkbookFragment( const WorkbookHelper& rHelper, const OUString& rStrmName ) : - BiffWorkbookFragmentBase( rHelper, rStrmName ) -{ -} - -bool BiffWorkbookFragment::importFragment() -{ - bool bRet = false; - - BiffFragmentType eFragment = startFragment( getBiff() ); - switch( eFragment ) - { - case BIFF_FRAGMENT_GLOBALS: - { - BiffInputStream& rStrm = getInputStream(); - // import workbook globals fragment and create sheets in document - ISegmentProgressBarRef xGlobalsProgress = getProgressBar().createSegment( PROGRESS_LENGTH_GLOBALS ); - bRet = importGlobalsFragment( *xGlobalsProgress ); - // load sheet fragments (do not return false in bRet on missing/broken sheets) - WorksheetBuffer& rWorksheets = getWorksheets(); - bool bNextSheet = bRet; - for( sal_Int32 nWorksheet = 0, nWorksheetCount = rWorksheets.getWorksheetCount(); bNextSheet && (nWorksheet < nWorksheetCount); ++nWorksheet ) - { - // calculate progress size for the sheet - double fSegmentLength = getProgressBar().getFreeLength() / (nWorksheetCount - nWorksheet); - ISegmentProgressBarRef xSheetProgress = getProgressBar().createSegment( fSegmentLength ); - /* Try to start a new sheet fragment. The SHEET records point to the - first record of the sheet fragment which is usually a BOF record. */ - BiffFragmentType eSheetFragment = BIFF_FRAGMENT_UNKNOWN; - sal_Int64 nRecHandle = rWorksheets.getBiffRecordHandle( nWorksheet ); - if( rStrm.startRecordByHandle( nRecHandle ) ) - { - /* #i109800# Stream may point to any record of the sheet fragment. - Check the record identifier before calling startFragment(). */ - bool bIsBofRec = BiffHelper::isBofRecord( rStrm ); - /* Rewind the record. If it is the BOF record, it will be read in - startFragment(). In every case, stream will point before the - first available non-BOF record. */ - rStrm.rewindRecord(); - // if the BOF record is missing, a regular worksheet will be assumed - eSheetFragment = bIsBofRec ? startFragment( getBiff() ) : BIFF_FRAGMENT_WORKSHEET; - } - sal_Int16 nCalcSheet = rWorksheets.getCalcSheetIndex( nWorksheet ); - bNextSheet = importSheetFragment( *xSheetProgress, eSheetFragment, nCalcSheet ); - } - } - break; - - case BIFF_FRAGMENT_WORKSPACE: - { - bRet = importWorkspaceFragment(); - // sheets are embedded in workspace fragment, nothing to do here - } - break; - - case BIFF_FRAGMENT_WORKSHEET: - case BIFF_FRAGMENT_CHARTSHEET: - case BIFF_FRAGMENT_MACROSHEET: - { - /* Single sheet without globals - - #i62752# possible in all BIFF versions - - do not return false in bRet on missing/broken sheets. */ - getWorksheets().initializeSingleSheet(); - importSheetFragment( getProgressBar(), eFragment, 0 ); - // success, even if stream is broken - bRet = true; - } - break; - - default:; - } - - // final conversions, e.g. calculation settings and view settings - if( bRet ) - finalizeWorkbookImport(); - - return bRet; -} - -bool BiffWorkbookFragment::importWorkspaceFragment() -{ - // enable workbook mode, has not been set yet in BIFF4 workspace files - setIsWorkbookFile(); - - WorksheetBuffer& rWorksheets = getWorksheets(); - bool bRet = true; - - // import the workspace globals - ISegmentProgressBarRef xGlobalsProgress = getProgressBar().createSegment( PROGRESS_LENGTH_GLOBALS ); - bool bLoop = true; - BiffInputStream& rStrm = getInputStream(); - while( bRet && bLoop && rStrm.startNextRecord() && (rStrm.getRecId() != BIFF_ID_EOF) ) - { - switch( rStrm.getRecId() ) - { - case BIFF_ID_SHEET: rWorksheets.importSheet( rStrm ); break; - case BIFF_ID_CODEPAGE: setCodePage( rStrm.readuInt16() ); break; - case BIFF_ID_FILEPASS: bRet = getCodecHelper().importFilePass( rStrm ); break; - case BIFF_ID_SHEETHEADER: rStrm.rewindRecord(); bLoop = false; break; - } - } - xGlobalsProgress->setPosition( 1.0 ); - - // load sheet fragments (do not return false in bRet on missing/broken sheets) - bool bNextSheet = bRet; - for( sal_Int32 nWorksheet = 0, nWorksheetCount = rWorksheets.getWorksheetCount(); bNextSheet && (nWorksheet < nWorksheetCount); ++nWorksheet ) - { - // try to start a new sheet fragment (with leading SHEETHEADER record) - bNextSheet = rStrm.startNextRecord() && (rStrm.getRecId() == BIFF_ID_SHEETHEADER); - if( bNextSheet ) - { - double fSegmentLength = getProgressBar().getFreeLength() / (nWorksheetCount - nWorksheet); - ISegmentProgressBarRef xSheetProgress = getProgressBar().createSegment( fSegmentLength ); - /* Read current sheet name (sheet substreams may not be in the - same order as SHEET records are). */ - rStrm.skip( 4 ); - OUString aSheetName = rStrm.readByteStringUC( false, getTextEncoding() ); - sal_Int16 nCurrSheet = rWorksheets.getCalcSheetIndex( aSheetName ); - // load the sheet fragment records - BiffFragmentType eSheetFragment = startFragment( getBiff() ); - bNextSheet = importSheetFragment( *xSheetProgress, eSheetFragment, nCurrSheet ); - // do not return false in bRet on missing/broken sheets - } - } - - return bRet; -} - -bool BiffWorkbookFragment::importGlobalsFragment( ISegmentProgressBar& rProgressBar ) -{ - WorkbookSettings& rWorkbookSett = getWorkbookSettings(); - ViewSettings& rViewSett = getViewSettings(); - SharedStringsBuffer& rSharedStrings = getSharedStrings(); - StylesBuffer& rStyles = getStyles(); - WorksheetBuffer& rWorksheets = getWorksheets(); - PivotCacheBuffer& rPivotCaches = getPivotCaches(); - bool bHasVbaProject = false; - bool bEmptyVbaProject = false; - - // collect records that need to be loaded in a second pass - typedef ::std::vector< sal_Int64 > RecordHandleVec; - RecordHandleVec aExtLinkRecs; - - bool bRet = true; - bool bLoop = true; - BiffInputStream& rStrm = getInputStream(); - while( bRet && bLoop && rStrm.startNextRecord() ) - { - sal_uInt16 nRecId = rStrm.getRecId(); - bool bExtLinkRec = false; - - /* #i56376# BIFF5-BIFF8: If an EOF record for globals is missing, - simulate it. The issue is about a document where the sheet fragment - starts directly after the EXTSST record, without terminating the - globals fragment with an EOF record. */ - if( BiffHelper::isBofRecord( rStrm ) || (nRecId == BIFF_ID_EOF) ) - { - bLoop = false; - } - else switch( nRecId ) - { - // records in all BIFF versions - case BIFF_ID_CODEPAGE: setCodePage( rStrm.readuInt16() ); break; - case BIFF_ID_DATEMODE: rWorkbookSett.importDateMode( rStrm ); break; - case BIFF_ID_FILEPASS: bRet = getCodecHelper().importFilePass( rStrm ); break; - case BIFF_ID_PRECISION: rWorkbookSett.importPrecision( rStrm ); break; - case BIFF_ID_WINDOW1: rViewSett.importWindow1( rStrm ); break; - - // BIFF specific records - default: switch( getBiff() ) - { - case BIFF2: switch( nRecId ) - { - case BIFF2_ID_DEFINEDNAME: bExtLinkRec = true; break; - case BIFF2_ID_EXTERNALNAME: bExtLinkRec = true; break; - case BIFF_ID_EXTERNSHEET: bExtLinkRec = true; break; - case BIFF2_ID_FONT: rStyles.importFont( rStrm ); break; - case BIFF_ID_FONTCOLOR: rStyles.importFontColor( rStrm ); break; - case BIFF2_ID_FORMAT: rStyles.importFormat( rStrm ); break; - case BIFF2_ID_XF: rStyles.importXf( rStrm ); break; - } - break; - - case BIFF3: switch( nRecId ) - { - case BIFF_ID_CRN: bExtLinkRec = true; break; - case BIFF3_ID_DEFINEDNAME: bExtLinkRec = true; break; - case BIFF3_ID_EXTERNALNAME: bExtLinkRec = true; break; - case BIFF_ID_EXTERNSHEET: bExtLinkRec = true; break; - case BIFF_ID_FILESHARING: rWorkbookSett.importFileSharing( rStrm ); break; - case BIFF3_ID_FONT: rStyles.importFont( rStrm ); break; - case BIFF2_ID_FORMAT: rStyles.importFormat( rStrm ); break; - case BIFF_ID_HIDEOBJ: rWorkbookSett.importHideObj( rStrm ); break; - case BIFF_ID_PALETTE: rStyles.importPalette( rStrm ); break; - case BIFF_ID_STYLE: rStyles.importStyle( rStrm ); break; - case BIFF_ID_XCT: bExtLinkRec = true; break; - case BIFF3_ID_XF: rStyles.importXf( rStrm ); break; - } - break; - - case BIFF4: switch( nRecId ) - { - case BIFF_ID_CRN: bExtLinkRec = true; break; - case BIFF3_ID_DEFINEDNAME: bExtLinkRec = true; break; - case BIFF3_ID_EXTERNALNAME: bExtLinkRec = true; break; - case BIFF_ID_EXTERNSHEET: bExtLinkRec = true; break; - case BIFF_ID_FILESHARING: rWorkbookSett.importFileSharing( rStrm ); break; - case BIFF3_ID_FONT: rStyles.importFont( rStrm ); break; - case BIFF4_ID_FORMAT: rStyles.importFormat( rStrm ); break; - case BIFF_ID_HIDEOBJ: rWorkbookSett.importHideObj( rStrm ); break; - case BIFF_ID_PALETTE: rStyles.importPalette( rStrm ); break; - case BIFF_ID_STYLE: rStyles.importStyle( rStrm ); break; - case BIFF_ID_XCT: bExtLinkRec = true; break; - case BIFF4_ID_XF: rStyles.importXf( rStrm ); break; - } - break; - - case BIFF5: switch( nRecId ) - { - case BIFF_ID_BOOKBOOL: rWorkbookSett.importBookBool( rStrm ); break; - case BIFF_ID_CRN: bExtLinkRec = true; break; - case BIFF5_ID_DEFINEDNAME: bExtLinkRec = true; break; - case BIFF5_ID_EXTERNALNAME: bExtLinkRec = true; break; - case BIFF_ID_EXTERNSHEET: bExtLinkRec = true; break; - case BIFF_ID_FILESHARING: rWorkbookSett.importFileSharing( rStrm ); break; - case BIFF5_ID_FONT: rStyles.importFont( rStrm ); break; - case BIFF4_ID_FORMAT: rStyles.importFormat( rStrm ); break; - case BIFF_ID_HIDEOBJ: rWorkbookSett.importHideObj( rStrm ); break; - case BIFF_ID_OLESIZE: rViewSett.importOleSize( rStrm ); break; - case BIFF_ID_PALETTE: rStyles.importPalette( rStrm ); break; - case BIFF_ID_PIVOTCACHE: rPivotCaches.importPivotCacheRef( rStrm ); break; - case BIFF_ID_SHEET: rWorksheets.importSheet( rStrm ); break; - case BIFF_ID_STYLE: rStyles.importStyle( rStrm ); break; - case BIFF_ID_XCT: bExtLinkRec = true; break; - case BIFF5_ID_XF: rStyles.importXf( rStrm ); break; - } - break; - - case BIFF8: switch( nRecId ) - { - case BIFF_ID_BOOKBOOL: rWorkbookSett.importBookBool( rStrm ); break; - case BIFF_ID_CODENAME: rWorkbookSett.importCodeName( rStrm ); break; - case BIFF_ID_CRN: bExtLinkRec = true; break; - case BIFF5_ID_DEFINEDNAME: bExtLinkRec = true; break; - case BIFF_ID_EXTERNALBOOK: bExtLinkRec = true; break; - case BIFF5_ID_EXTERNALNAME: bExtLinkRec = true; break; - case BIFF_ID_EXTERNSHEET: bExtLinkRec = true; break; - case BIFF_ID_FILESHARING: rWorkbookSett.importFileSharing( rStrm ); break; - case BIFF5_ID_FONT: rStyles.importFont( rStrm ); break; - case BIFF4_ID_FORMAT: rStyles.importFormat( rStrm ); break; - case BIFF_ID_HIDEOBJ: rWorkbookSett.importHideObj( rStrm ); break; - case BIFF_ID_OLESIZE: rViewSett.importOleSize( rStrm ); break; - case BIFF_ID_PALETTE: rStyles.importPalette( rStrm ); break; - case BIFF_ID_PIVOTCACHE: rPivotCaches.importPivotCacheRef( rStrm ); break; - case BIFF_ID_SHEET: rWorksheets.importSheet( rStrm ); break; - case BIFF_ID_SST: rSharedStrings.importSst( rStrm ); break; - case BIFF_ID_STYLE: rStyles.importStyle( rStrm ); break; - case BIFF_ID_USESELFS: rWorkbookSett.importUsesElfs( rStrm ); break; - case BIFF_ID_VBAPROJECT: bHasVbaProject = true; break; - case BIFF_ID_VBAPROJECTEMPTY: bEmptyVbaProject = true; break; - case BIFF_ID_XCT: bExtLinkRec = true; break; - case BIFF5_ID_XF: rStyles.importXf( rStrm ); break; - } - break; - - case BIFF_UNKNOWN: break; - } - } - - if( bExtLinkRec ) - aExtLinkRecs.push_back( rStrm.getRecHandle() ); - } - - // finalize global buffers - rProgressBar.setPosition( 0.5 ); - if( bRet ) - { - rSharedStrings.finalizeImport(); - rStyles.finalizeImport(); - } - - /* Import external link data (EXTERNSHEET, EXTERNALNAME, DEFINEDNAME) - which need existing internal sheets (SHEET records). The SHEET records - may follow the external links records in some BIFF versions. */ - if( bRet && !aExtLinkRecs.empty() ) - { - // remember current stream position (the EOF record) - sal_Int64 nEofHandle = rStrm.getRecHandle(); - // context handler implementing import of external link records - BiffExternalSheetDataContext aSheetContext( *this, true ); - // import all records by using their cached record handle - for( RecordHandleVec::const_iterator aIt = aExtLinkRecs.begin(), aEnd = aExtLinkRecs.end(); (aIt != aEnd) && rStrm.startRecordByHandle( *aIt ); ++aIt ) - aSheetContext.importRecord( rStrm ); - // finalize global buffers - getDefinedNames().finalizeImport(); - // seek back to the EOF record of the workbook globals fragment - bRet = rStrm.startRecordByHandle( nEofHandle ); - } - - // open the VBA project storage - if( bHasVbaProject && !bEmptyVbaProject ) - setVbaProjectStorage( getBaseFilter().openSubStorage( CREATE_OUSTRING( "_VBA_PROJECT_CUR" ), false ) ); - - // #i56376# missing EOF - rewind before worksheet BOF record (see above) - if( bRet && BiffHelper::isBofRecord( rStrm ) ) - rStrm.rewindRecord(); - - rProgressBar.setPosition( 1.0 ); - return bRet; -} - -bool BiffWorkbookFragment::importSheetFragment( ISegmentProgressBar& rProgressBar, BiffFragmentType eFragment, sal_Int16 nCalcSheet ) -{ - // no Calc sheet - skip the fragment - if( nCalcSheet < 0 ) - return skipFragment(); - - // find the sheet type for this fragment - WorksheetType eSheetType = SHEETTYPE_EMPTYSHEET; - switch( eFragment ) - { - case BIFF_FRAGMENT_WORKSHEET: eSheetType = SHEETTYPE_WORKSHEET; break; - case BIFF_FRAGMENT_CHARTSHEET: eSheetType = SHEETTYPE_CHARTSHEET; break; - case BIFF_FRAGMENT_MACROSHEET: eSheetType = SHEETTYPE_MACROSHEET; break; - case BIFF_FRAGMENT_MODULESHEET: eSheetType = SHEETTYPE_MODULESHEET; break; - case BIFF_FRAGMENT_EMPTYSHEET: eSheetType = SHEETTYPE_EMPTYSHEET; break; - default: return false; - } - - /* #i11183# Clear buffers that are used per-sheet, e.g. external links in - BIFF4W and BIFF5 files, or defined names in BIFF4W files. */ - createBuffersPerSheet( nCalcSheet ); - - // preprocess some records - BiffInputStream& rStrm = getInputStream(); - switch( getBiff() ) - { - // load the workbook globals fragment records in BIFF2-BIFF4 - case BIFF2: - case BIFF3: - case BIFF4: - { - // remember current record to seek back below - sal_Int64 nRecHandle = rStrm.getRecHandle(); - // import the global records - ISegmentProgressBarRef xGlobalsProgress = rProgressBar.createSegment( PROGRESS_LENGTH_GLOBALS ); - importGlobalsFragment( *xGlobalsProgress ); - // rewind stream to fragment BOF record - rStrm.startRecordByHandle( nRecHandle ); - } - break; - - // load the external link records for this sheet in BIFF5 - case BIFF5: - { - // remember current record to seek back below - sal_Int64 nRecHandle = rStrm.getRecHandle(); - // fragment implementing import of external link records - BiffExternalLinkFragment( *this ).importFragment(); - // rewind stream to fragment BOF record - rStrm.startRecordByHandle( nRecHandle ); - } - break; - - case BIFF8: - break; - - case BIFF_UNKNOWN: - break; - } - - // create the WorksheetGlobals object - ISegmentProgressBarRef xSheetProgress = rProgressBar.createSegment( rProgressBar.getFreeLength() ); - WorksheetGlobalsRef xSheetGlob = WorksheetHelper::constructGlobals( *this, xSheetProgress, eSheetType, nCalcSheet ); - OSL_ENSURE( xSheetGlob.get(), "BiffWorkbookFragment::importSheetFragment - missing sheet in document" ); - if( !xSheetGlob.get() ) - return false; - - // create the worksheet fragment - ::boost::shared_ptr< BiffWorksheetFragmentBase > xFragment; - switch( eSheetType ) - { - case SHEETTYPE_WORKSHEET: - case SHEETTYPE_MACROSHEET: - case SHEETTYPE_DIALOGSHEET: - xFragment.reset( new BiffWorksheetFragment( *xSheetGlob, *this ) ); - break; - case SHEETTYPE_CHARTSHEET: - xFragment.reset( new BiffChartsheetFragment( *xSheetGlob, *this ) ); - break; - case SHEETTYPE_MODULESHEET: - case SHEETTYPE_EMPTYSHEET: - xFragment.reset( new BiffSkipWorksheetFragment( *xSheetGlob, *this ) ); - break; - } - // load the sheet fragment records - return xFragment.get() && xFragment->importFragment(); -} - -// ============================================================================ - } // namespace xls } // namespace oox diff --git a/unusedcode.easy b/unusedcode.easy index 61a08564bba8..ecbba19f3454 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1,4 +1,5 @@ CertificateExtension_XmlSecImpl::setCertExtn(com::sun::star::uno::Sequence<signed char>, com::sun::star::uno::Sequence<signed char>, unsigned char) +CharAttribList::Clear() CharPosArray::Insert(CharPosArray const*, unsigned short, unsigned short, unsigned short) CharPosArray::Replace(int const&, unsigned short) CharPosArray::Replace(int const*, unsigned short, unsigned short) @@ -186,7 +187,6 @@ SvxTabStopArr::Remove(SvxTabStop const&, unsigned short) SvxTabStopArr_SAR::Replace(SvxTabStop const&, unsigned short) SvxTabStopArr_SAR::Replace(SvxTabStop const*, unsigned short, unsigned short) SvxTabStopArr_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(SvxTabStop const&, void*), void*) -SvxUnoTextContent::SvxUnoTextContent() SwAttrIter::Dump(SvStream&) const SwBlinkList::Insert(SwBlinkList const*, unsigned short, unsigned short) SwBlinkList::Insert(SwBlinkPortion* const&, unsigned short&) @@ -825,6 +825,7 @@ nullcanvas::SpriteCanvasHelper::genericUpdate(basegfx::B2DConnectedRanges<canvas nullcanvas::SpriteCanvasHelper::opaqueUpdate(basegfx::B2DConnectedRanges<canvas::SpriteRedrawManager::SpriteInfo>::ConnectedComponents const&) nullcanvas::SpriteCanvasHelper::scrollUpdate(basegfx::B2DRange const&, basegfx::B2DRange const&, basegfx::B2DConnectedRanges<canvas::SpriteRedrawManager::SpriteInfo>::ConnectedComponents const&) ooo::vba::extractIntFromAny(com::sun::star::uno::Any const&) +oox::PropertySet::dump() oox::dump::DffStreamObject::construct(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&) oox::dump::InputObjectBase::dumpColorABGR(oox::dump::String const&) oox::dump::InputObjectBase::dumpRk(oox::dump::String const&) |