LibreOffice Module sw (master) 1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
SwFormatClipboard Class Reference

This class acts as data container and execution class for the format paintbrush feature in writer. More...

#include <formatclipboard.hxx>

Public Member Functions

 SwFormatClipboard ()
 
bool HasContent () const
 Test if the object contains text or paragraph attribute. More...
 
bool HasContentForThisType (SelectionType nSelectionType) const
 
void Copy (SwWrtShell &rWrtShell, SfxItemPool &rPool, bool bPersistentCopy)
 Store/Backup the text and paragraph attribute of the current selection. More...
 
void Paste (SwWrtShell &rWrtShell, SfxStyleSheetBasePool *pPool, bool bNoCharacterFormats, bool bNoParagraphFormats)
 Paste the stored text and paragraph attributes on the current selection and current paragraph. More...
 
void Erase ()
 Clear the currently stored text and paragraph attributes. More...
 

Static Public Member Functions

static bool CanCopyThisType (SelectionType nSelectionType)
 

Private Attributes

SelectionType m_nSelectionType
 
std::unique_ptr< SfxItemSetm_pItemSet_TextAttr
 automatic/named character attribute set More...
 
std::unique_ptr< SfxItemSetm_pItemSet_ParAttr
 automatic/named paragraph attribute set (it can be character attribute applied to the paragraph) More...
 
std::unique_ptr< SfxItemSetm_pTableItemSet
 table attribute set More...
 
OUString m_aCharStyle
 name of the character format (if it exist) More...
 
OUString m_aParaStyle
 name of the paragraph format (if it exist) More...
 
bool m_bPersistentCopy
 specify if the Paste function have to clear the current object More...
 

Detailed Description

This class acts as data container and execution class for the format paintbrush feature in writer.

Definition at line 34 of file formatclipboard.hxx.

Constructor & Destructor Documentation

◆ SwFormatClipboard()

SwFormatClipboard::SwFormatClipboard ( )

Definition at line 222 of file formatclipboard.cxx.

Member Function Documentation

◆ CanCopyThisType()

bool SwFormatClipboard::CanCopyThisType ( SelectionType  nSelectionType)
static

Definition at line 257 of file formatclipboard.cxx.

References DrawObject, Frame, Graphic, Ole, Table, TableCell, and Text.

Referenced by SwView::StateFormatPaintbrush().

◆ Copy()

void SwFormatClipboard::Copy ( SwWrtShell rWrtShell,
SfxItemPool rPool,
bool  bPersistentCopy 
)

◆ Erase()

void SwFormatClipboard::Erase ( )

Clear the currently stored text and paragraph attributes.

Definition at line 569 of file formatclipboard.cxx.

References m_aCharStyle, m_aParaStyle, m_bPersistentCopy, m_nSelectionType, m_pItemSet_ParAttr, m_pItemSet_TextAttr, m_pTableItemSet, and NONE.

Referenced by Copy(), and Paste().

◆ HasContent()

bool SwFormatClipboard::HasContent ( ) const

Test if the object contains text or paragraph attribute.

Definition at line 228 of file formatclipboard.cxx.

References m_aCharStyle, m_aParaStyle, m_pItemSet_ParAttr, m_pItemSet_TextAttr, and m_pTableItemSet.

Referenced by HasContentForThisType(), and SwEditWin::MouseButtonUp().

◆ HasContentForThisType()

bool SwFormatClipboard::HasContentForThisType ( SelectionType  nSelectionType) const

Definition at line 237 of file formatclipboard.cxx.

References Frame, Graphic, HasContent(), m_nSelectionType, Ole, and Text.

Referenced by Paste().

◆ Paste()

void SwFormatClipboard::Paste ( SwWrtShell rWrtShell,
SfxStyleSheetBasePool pPool,
bool  bNoCharacterFormats,
bool  bNoParagraphFormats 
)

Member Data Documentation

◆ m_aCharStyle

OUString SwFormatClipboard::m_aCharStyle
private

name of the character format (if it exist)

Definition at line 84 of file formatclipboard.hxx.

Referenced by Copy(), Erase(), HasContent(), and Paste().

◆ m_aParaStyle

OUString SwFormatClipboard::m_aParaStyle
private

name of the paragraph format (if it exist)

Definition at line 86 of file formatclipboard.hxx.

Referenced by Copy(), Erase(), HasContent(), and Paste().

◆ m_bPersistentCopy

bool SwFormatClipboard::m_bPersistentCopy
private

specify if the Paste function have to clear the current object

Definition at line 90 of file formatclipboard.hxx.

Referenced by Copy(), Erase(), and Paste().

◆ m_nSelectionType

SelectionType SwFormatClipboard::m_nSelectionType
private

Definition at line 72 of file formatclipboard.hxx.

Referenced by Copy(), Erase(), and HasContentForThisType().

◆ m_pItemSet_ParAttr

std::unique_ptr<SfxItemSet> SwFormatClipboard::m_pItemSet_ParAttr
private

automatic/named paragraph attribute set (it can be character attribute applied to the paragraph)

Definition at line 78 of file formatclipboard.hxx.

Referenced by Copy(), Erase(), HasContent(), and Paste().

◆ m_pItemSet_TextAttr

std::unique_ptr<SfxItemSet> SwFormatClipboard::m_pItemSet_TextAttr
private

automatic/named character attribute set

Definition at line 75 of file formatclipboard.hxx.

Referenced by Copy(), Erase(), HasContent(), and Paste().

◆ m_pTableItemSet

std::unique_ptr<SfxItemSet> SwFormatClipboard::m_pTableItemSet
private

table attribute set

Definition at line 81 of file formatclipboard.hxx.

Referenced by Copy(), Erase(), HasContent(), and Paste().


The documentation for this class was generated from the following files: