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 IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
25 #define IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
26 
27 #include <swtypes.hxx>
28 
29 class ViewShell;
30 class SwRootFrm;
31 class SwFrmFmt;
32 class SfxItemSet;
33 class SwLayouter;
34 class SwFmtAnchor;
35 
36 /** Provides access to the layout of a document.
37 */
38 class IDocumentLayoutAccess
39 {
40 public:
41 
42     /** Returns the layout set at the document.
43     */
44     virtual const ViewShell* GetCurrentViewShell() const = 0;
45     virtual       ViewShell* GetCurrentViewShell() = 0;	//swmod 071107//swmod 071225
46 	virtual const SwRootFrm* GetCurrentLayout() const = 0;
47 	virtual       SwRootFrm* GetCurrentLayout() = 0;	//swmod 080218
48     virtual bool HasLayout() const = 0;
49 
50     /** !!!The old layout must be deleted!!!
51     */
52     virtual void SetCurrentViewShell( ViewShell* pNew ) = 0;	//swmod 071107//swmod 071225
53 
54     /**
55     */
56     virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet ) = 0;
57 
58     /**
59     */
60     virtual SwLayouter* GetLayouter() = 0;
61     virtual const SwLayouter* GetLayouter() const = 0;
62     virtual void SetLayouter( SwLayouter* pNew ) = 0;
63 
64     /**
65     */
66     virtual void DelLayoutFmt( SwFrmFmt *pFmt ) = 0;
67 
68     /**
69     */
70     virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor,
71                                      bool bSetTxtFlyAtt, bool bMakeFrms ) = 0;
72 
73 protected:
74 
~IDocumentLayoutAccess()75     virtual ~IDocumentLayoutAccess() {};
76  };
77 
78  #endif // IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
79