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 _SWFORMATCLIPBOARD_HXX
25 #define _SWFORMATCLIPBOARD_HXX
26 
27 // header for class SwWrtShell
28 #include <wrtsh.hxx>
29 // header for class SfxItemSet
30 #include <svl/itemset.hxx>
31 // header for class SfxStyleSheetBasePool
32 #include <svl/style.hxx>
33 
34 //-----------------------------------------------------------------------------
35 /** This class acts as data container and execution class for the format paintbrush feature in writer.
36 */
37 
38 class SwFormatClipboard
39 {
40 public:
41     SwFormatClipboard();
42     ~SwFormatClipboard();
43 
44     bool HasContent() const;
45     bool HasContentForThisType( int nSelectionType ) const;
46     bool CanCopyThisType( int nSelectionType ) const;
47 
48     void Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bPersistentCopy=false );
49     void Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPool
50         , bool bNoCharacterFormats=false, bool bNoParagraphFormats=false );
51     void Erase();
52 
53 private:
54     int         m_nSelectionType;
55     SfxItemSet* m_pItemSet;
56     SfxItemSet* m_pTableItemSet;
57 
58     String m_aCharStyle;
59     String m_aParaStyle;
60     //no frame style because it contains position information
61 
62     bool   m_bPersistentCopy;
63 };
64 
65 #endif
66