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>

Collaboration diagram for SwFormatClipboard:
[legend]

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 ( )

Definition at line 234 of file formatclipboard.cxx.

Member Function Documentation

bool SwFormatClipboard::CanCopyThisType ( SelectionType  nSelectionType)
static

Definition at line 269 of file formatclipboard.cxx.

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

Referenced by SwView::StateFormatPaintbrush().

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

Clear the currently stored text and paragraph attributes.

Definition at line 577 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().

bool SwFormatClipboard::HasContent ( ) const

Test if the object contains text or paragraph attribute.

Definition at line 240 of file formatclipboard.cxx.

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

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

bool SwFormatClipboard::HasContentForThisType ( SelectionType  nSelectionType) const

Definition at line 249 of file formatclipboard.cxx.

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

Referenced by Paste().

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

Member Data Documentation

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().

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().

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().

SelectionType SwFormatClipboard::m_nSelectionType
private

Definition at line 72 of file formatclipboard.hxx.

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

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().

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().

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: