LibreOffice Module sw (master)
1
sw
source
uibase
inc
formatclipboard.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
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/.
8
*
9
* This file incorporates work covered by the following license notice:
10
*
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 .
18
*/
19
20
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_FORMATCLIPBOARD_HXX
21
#define INCLUDED_SW_SOURCE_UIBASE_INC_FORMATCLIPBOARD_HXX
22
23
#include <
sal/config.h
>
24
25
#include <memory>
26
27
#include "
wrtsh.hxx
"
28
#include <
svl/itemset.hxx
>
29
#include <
svl/style.hxx
>
30
34
class
SwFormatClipboard
35
{
36
public
:
37
SwFormatClipboard
();
38
42
bool
HasContent
()
const
;
43
bool
HasContentForThisType
(
SelectionType
nSelectionType)
const
;
44
static
bool
CanCopyThisType
(
SelectionType
nSelectionType);
45
52
void
Copy
(
SwWrtShell
& rWrtShell,
SfxItemPool
& rPool,
bool
bPersistentCopy);
53
63
void
Paste
(
SwWrtShell
& rWrtShell,
SfxStyleSheetBasePool
* pPool,
bool
bNoCharacterFormats,
64
bool
bNoParagraphFormats);
65
69
void
Erase
();
70
71
private
:
72
SelectionType
m_nSelectionType
;
73
75
std::unique_ptr<SfxItemSet>
m_pItemSet_TextAttr
;
78
std::unique_ptr<SfxItemSet>
m_pItemSet_ParAttr
;
79
81
std::unique_ptr<SfxItemSet>
m_pTableItemSet
;
82
84
OUString
m_aCharStyle
;
86
OUString
m_aParaStyle
;
87
//no frame style because it contains position information
88
90
bool
m_bPersistentCopy
;
91
};
92
93
#endif
94
95
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxStyleSheetBasePool
SwFormatClipboard
This class acts as data container and execution class for the format paintbrush feature in writer.
Definition:
formatclipboard.hxx:35
SwFormatClipboard::m_nSelectionType
SelectionType m_nSelectionType
Definition:
formatclipboard.hxx:72
SwFormatClipboard::Copy
void Copy(SwWrtShell &rWrtShell, SfxItemPool &rPool, bool bPersistentCopy)
Store/Backup the text and paragraph attribute of the current selection.
Definition:
formatclipboard.cxx:264
SwFormatClipboard::Paste
void Paste(SwWrtShell &rWrtShell, SfxStyleSheetBasePool *pPool, bool bNoCharacterFormats, bool bNoParagraphFormats)
Paste the stored text and paragraph attributes on the current selection and current paragraph.
Definition:
formatclipboard.cxx:437
SwFormatClipboard::Erase
void Erase()
Clear the currently stored text and paragraph attributes.
Definition:
formatclipboard.cxx:569
SwFormatClipboard::m_bPersistentCopy
bool m_bPersistentCopy
specify if the Paste function have to clear the current object
Definition:
formatclipboard.hxx:90
SwFormatClipboard::m_aCharStyle
OUString m_aCharStyle
name of the character format (if it exist)
Definition:
formatclipboard.hxx:84
SwFormatClipboard::m_pItemSet_ParAttr
std::unique_ptr< SfxItemSet > m_pItemSet_ParAttr
automatic/named paragraph attribute set (it can be character attribute applied to the paragraph)
Definition:
formatclipboard.hxx:78
SwFormatClipboard::CanCopyThisType
static bool CanCopyThisType(SelectionType nSelectionType)
Definition:
formatclipboard.cxx:257
SwFormatClipboard::m_pItemSet_TextAttr
std::unique_ptr< SfxItemSet > m_pItemSet_TextAttr
automatic/named character attribute set
Definition:
formatclipboard.hxx:75
SwFormatClipboard::HasContentForThisType
bool HasContentForThisType(SelectionType nSelectionType) const
Definition:
formatclipboard.cxx:237
SwFormatClipboard::m_pTableItemSet
std::unique_ptr< SfxItemSet > m_pTableItemSet
table attribute set
Definition:
formatclipboard.hxx:81
SwFormatClipboard::m_aParaStyle
OUString m_aParaStyle
name of the paragraph format (if it exist)
Definition:
formatclipboard.hxx:86
SwFormatClipboard::HasContent
bool HasContent() const
Test if the object contains text or paragraph attribute.
Definition:
formatclipboard.cxx:228
SwFormatClipboard::SwFormatClipboard
SwFormatClipboard()
Definition:
formatclipboard.cxx:222
SwWrtShell
Used by the UI to modify the document model.
Definition:
wrtsh.hxx:97
config.h
SelectionType
SelectionType
itemset.hxx
SfxItemPool
style.hxx
wrtsh.hxx
Generated on Sun Jul 30 2023 04:29:55 for LibreOffice Module sw (master) by
1.9.3