xref: /AOO41X/main/oox/inc/oox/ppt/presentationfragmenthandler.hxx (revision e35081216278e1848f1c12af2e117a766f306f4b)
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 OOX_PPT_PRESENTATION_FRAGMENTHANDLER
25 #define OOX_PPT_PRESENTATION_FRAGMENTHANDLER
26 
27 #include <com/sun/star/drawing/XDrawPage.hpp>
28 #include <com/sun/star/awt/Size.hpp>
29 #include "oox/drawingml/textliststyle.hxx"
30 #include "oox/ppt/slidepersist.hxx"
31 #include "oox/core/fragmenthandler.hxx"
32 #include "oox/core/relations.hxx"
33 #include "customshowlistcontext.hxx"
34 
35 #include <stack>
36 #include <vector>
37 
38 namespace oox { namespace ppt {
39 
40 class PresentationFragmentHandler : public ::oox::core::FragmentHandler
41 {
42 public:
43     PresentationFragmentHandler( ::oox::core::XmlFilterBase& rFilter, const ::rtl::OUString& rFragmentPath ) throw();
44     virtual ~PresentationFragmentHandler() throw();
45 
46     virtual void SAL_CALL startDocument(  ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
47     virtual void SAL_CALL endDocument(  ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
48     virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
49 
50 protected:
51     bool importSlide( const ::oox::core::FragmentHandlerRef& rxSlideFragmentHandler,
52                         const oox::ppt::SlidePersistPtr pPersist );
53 
54 private:
55     std::vector< rtl::OUString > maSlideMasterVector;
56     std::vector< rtl::OUString > maSlidesVector;
57     std::vector< rtl::OUString > maNotesMasterVector;
58     ::oox::drawingml::TextListStylePtr mpTextListStyle;
59 
60     ::com::sun::star::awt::Size maSlideSize;
61     ::com::sun::star::awt::Size maNotesSize;
62 
63     std::vector< CustomShow >   maCustomShowList;
64 };
65 
66 } }
67 
68 #endif // OOX_PPT_PRESENTATION_FRAGMENTHANDLER
69