1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SD_PPTIN_HXX 25 #define _SD_PPTIN_HXX 26 27 #include <filter/msfilter/svdfppt.hxx> 28 #include <svx/msdffdef.hxx> 29 #include <diadef.h> 30 #include <svx/svdtypes.hxx> 31 #include <filter/msfilter/msfiltertracer.hxx> 32 #include <com/sun/star/uno/Any.h> 33 #include <boost/shared_ptr.hpp> 34 35 class SdDrawDocument; 36 class SfxMedium; 37 38 /************************************************************************* 39 |* 40 |* lokaler Import 41 |* 42 \************************************************************************/ 43 44 class SdPage; 45 class SdAnimationInfo; 46 struct PptInteractiveInfoAtom; 47 class Ppt97Animation; 48 49 typedef boost::shared_ptr< Ppt97Animation > Ppt97AnimationPtr; 50 typedef ::std::map < SdrObject*, Ppt97AnimationPtr > tAnimationMap; 51 typedef std::vector< std::pair< SdrObject*, Ppt97AnimationPtr > > tAnimationVector; 52 53 class ImplSdPPTImport : public SdrPowerPointImport 54 { 55 SfxMedium& mrMed; 56 SvStorage& mrStorage; 57 // SvStream* mpPicStream; 58 DffRecordHeader maDocHd; 59 List maSlideNameList; 60 sal_Bool mbDocumentFound; 61 sal_uInt32 mnFilterOptions; 62 SdDrawDocument* mpDoc; 63 PresChange mePresChange; 64 SdrLayerID mnBackgroundLayerID; 65 SdrLayerID mnBackgroundObjectsLayerID; 66 67 tAnimationMap maAnimations; 68 69 void SetHeaderFooterPageSettings( SdPage* pPage, const PptSlidePersistEntry* pMasterPersist ); 70 void ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimationsUsed ); 71 72 void FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, String aMacroName ); 73 74 virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj ); 75 virtual SdrObject* ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pText, SdPage* pPage, 76 SfxStyleSheet*, SfxStyleSheet** ) const; 77 78 public: 79 80 String ReadSound( sal_uInt32 nSoundRef ) const; 81 String ReadMedia( sal_uInt32 nMediaRef ) const; 82 83 ImplSdPPTImport( SdDrawDocument* pDoc, SvStorage& rStorage, SfxMedium& rMed, PowerPointImportParam& ); 84 ~ImplSdPPTImport(); 85 86 sal_Bool Import(); 87 }; 88 89 class SdPPTImport 90 { 91 ImplSdPPTImport* pFilter; 92 93 public: 94 95 SdPPTImport( SdDrawDocument* pDoc, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMed, MSFilterTracer* pTracer = NULL ); 96 ~SdPPTImport(); 97 98 sal_Bool Import(); 99 }; 100 101 #endif // _SD_PPTIN_HXX 102