xref: /aoo42x/main/sd/inc/cusshow.hxx (revision 67e470da)
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_CUSSHOW_HXX
25 #define _SD_CUSSHOW_HXX
26 
27 #include <tools/list.hxx>
28 #include <tools/stream.hxx>
29 #include <tools/string.hxx>
30 #include <cppuhelper/weakref.hxx>
31 #include "sddllapi.h"
32 
33 class SdDrawDocument;
34 class SdPage;
35 
36 /*************************************************************************
37 |*
38 |* CustomShow
39 |*
40 \************************************************************************/
41 class SD_DLLPUBLIC SdCustomShow : public List
42 {
43 private:
44 	String          aName;
45 	SdDrawDocument* pDoc;
46 
47 	// this is a weak reference to a possible living api wrapper for this custom show
48 	::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > mxUnoCustomShow;
49 
50 	// forbidden and not implemented
51 	SdCustomShow();
52 
53 public:
54 	// single argument ctors shall be explicit
55 	explicit SdCustomShow(SdDrawDocument* pDrawDoc);
56 	SdCustomShow(SdDrawDocument* pDrawDoc, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xShow );
57 
58 	virtual ~SdCustomShow();
59 
60 	// @@@ copy ctor, but no copy assignment? @@@
61 	SdCustomShow( const SdCustomShow& rShow );
62 
63 	void   SetName(const String& rName);
64 	String GetName() const;
65 
GetDoc() const66 	SdDrawDocument* GetDoc() const { return pDoc; }
67 
68 	void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage );
69 	void RemovePage( const SdPage* pPage );
70 
71 	::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoCustomShow();
72 };
73 
74 #endif      // _SD_CUSSHOW_HXX
75 
76