1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SWFORMATCLIPBOARD_HXX
21 #define _SWFORMATCLIPBOARD_HXX
23 // header for class SwWrtShell
25 // header for class SfxItemSet
26 #include <svl/itemset.hxx>
27 // header for class SfxStyleSheetBasePool
28 #include <svl/style.hxx>
30 //-----------------------------------------------------------------------------
31 /** This class acts as data container and execution class for the format paintbrush feature in writer.
34 class SwFormatClipboard
41 * Test if the object contains text or paragraph attribute
43 bool HasContent() const;
44 bool HasContentForThisType( int nSelectionType
) const;
45 bool CanCopyThisType( int nSelectionType
) const;
48 * Store/Backup the text and paragraph attribute of the current selection.
50 * @param bPersistentCopy
51 * input parameter - specify if the Paste function will erase the current object.
53 void Copy( SwWrtShell
& rWrtShell
, SfxItemPool
& rPool
, bool bPersistentCopy
=false );
56 * Paste the stored text and paragraph attributes on the current selection and current paragraph.
58 * @param bNoCharacterFormats
59 * Do not paste the character formats.
61 * @param bNoParagraphFormats
62 * Do not paste the paragraph formats.
64 void Paste( SwWrtShell
& rWrtShell
, SfxStyleSheetBasePool
* pPool
65 , bool bNoCharacterFormats
=false, bool bNoParagraphFormats
=false );
68 * Clear the currently stored text and paragraph attributes.
75 /** automatic/named character attribute set */
76 SfxItemSet
* m_pItemSet_TxtAttr
;
77 /** automatic/named paragraph attribute set
78 * (it can be caractere attribute applyied to the paragraph) */
79 SfxItemSet
* m_pItemSet_ParAttr
;
81 /** table attribute set */
82 SfxItemSet
* m_pTableItemSet
;
84 /** name of the character format (if it exist) */
86 /** name of the paragraph format (if it exist) */
88 //no frame style because it contains position information
90 /** specify if the Paste function have to clear the current object */
91 bool m_bPersistentCopy
;
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */