LibreOffice Module sw (master) 1
|
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< SfxItemSet > | m_pItemSet_TextAttr |
automatic/named character attribute set More... | |
std::unique_ptr< SfxItemSet > | m_pItemSet_ParAttr |
automatic/named paragraph attribute set (it can be character attribute applied to the paragraph) More... | |
std::unique_ptr< SfxItemSet > | m_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... | |
This class acts as data container and execution class for the format paintbrush feature in writer.
Definition at line 34 of file formatclipboard.hxx.
SwFormatClipboard::SwFormatClipboard | ( | ) |
Definition at line 222 of file formatclipboard.cxx.
|
static |
Definition at line 257 of file formatclipboard.cxx.
References DrawObject, Frame, Graphic, Ole, Table, TableCell, and Text.
Referenced by SwView::StateFormatPaintbrush().
void SwFormatClipboard::Copy | ( | SwWrtShell & | rWrtShell, |
SfxItemPool & | rPool, | ||
bool | bPersistentCopy | ||
) |
Store/Backup the text and paragraph attribute of the current selection.
bPersistentCopy | input parameter - specify if the Paste function will erase the current object. |
Definition at line 264 of file formatclipboard.cxx.
References SdrMarkView::AreObjectsMarked(), SwCursorShell::DeleteCurrent, SwPaM::DeleteMark(), DrawObject, SwCursorShell::EndAction(), Erase(), FN_PARAM_TABLE_HEADLINE, FN_TABLE_BOX_TEXTORIENTATION, FN_TABLE_SET_VERT_ALIGN, fnMoveBackward, fnMoveForward, Frame, SdrEditView::GetAttrFromMarked(), SwPosition::GetContentIndex(), SwEditShell::GetCurAttr(), SwEditShell::GetCurCharFormat(), SwEditShell::GetCurParAttr(), SwCursorShell::GetCursor(), SwEditShell::GetCurTextFormatColl(), SwViewShell::GetDrawView(), SwFEShell::GetFlyFrameAttr(), SwPaM::GetMark(), SwFormat::GetName(), SwPaM::GetPoint(), SwWrtShell::GetSelectionType(), Graphic, SwPaM::HasMark(), SwCursorShell::IsEndPara(), SwCursorShell::IsInRightToLeftText(), SwPaM::IsMultiSelection(), SwCursorShell::KillPams(), m_aCharStyle, m_aParaStyle, m_bPersistentCopy, m_nSelectionType, m_pItemSet_ParAttr, m_pItemSet_TextAttr, m_pTableItemSet, SwPaM::Move(), Ole, SwWrtShell::Pop(), SwCursorShell::Push(), RES_BACKGROUND(), RES_BREAK(), RES_FRAMEDIR(), RES_KEEP(), RES_LAYOUT_SPLIT(), RES_PAGEDESC(), RES_ROW_SPLIT(), RES_SHADOW(), SDRATTR_CUSTOMSHAPE_DATA(), SDRATTR_CUSTOMSHAPE_ENGINE(), SDRATTR_CUSTOMSHAPE_GEOMETRY(), SwPaM::SetMark(), SwCursorShell::StartAction(), TableCell, and Text.
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.
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().
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().
void SwFormatClipboard::Paste | ( | SwWrtShell & | rWrtShell, |
SfxStyleSheetBasePool * | pPool, | ||
bool | bNoCharacterFormats, | ||
bool | bNoParagraphFormats | ||
) |
Paste the stored text and paragraph attributes on the current selection and current paragraph.
bNoCharacterFormats | Do not paste the character formats. |
bNoParagraphFormats | Do not paste the paragraph formats. |
Definition at line 437 of file formatclipboard.cxx.
References DrawObject, SwCursorShell::EndAction(), SwEditShell::EndUndo(), Erase(), SfxStyleSheetBasePool::Find(), Frame, SwFormat::GetAttrSet(), SwDocStyleSheet::GetCharFormat(), SwFormatCharFormat::GetCharFormat(), SwDocStyleSheet::GetCollection(), SwViewShell::GetDrawView(), SwWrtShell::GetSelectionType(), Graphic, HasContentForThisType(), INSATTR, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), lcl_AppendSetItems(), lcl_RemoveEqualItems(), m_aCharStyle, m_aParaStyle, m_bPersistentCopy, m_pItemSet_ParAttr, m_pItemSet_TextAttr, m_pTableItemSet, Ole, RES_CHRATR_BEGIN(), RES_CHRATR_END(), SwEditShell::ResetAttr(), SwEditShell::SetAttrItem(), SwEditShell::SetAttrSet(), SdrEditView::SetAttrToMarked(), SwFEShell::SetFlyFrameAttr(), SwEditShell::SetTextFormatColl(), SwCursorShell::StartAction(), SwEditShell::StartUndo(), Table, TableCell, and Text.
Referenced by SwEditWin::MouseButtonUp().
|
private |
name of the character format (if it exist)
Definition at line 84 of file formatclipboard.hxx.
Referenced by Copy(), Erase(), HasContent(), and Paste().
|
private |
name of the paragraph format (if it exist)
Definition at line 86 of file formatclipboard.hxx.
Referenced by Copy(), Erase(), HasContent(), and Paste().
|
private |
specify if the Paste function have to clear the current object
Definition at line 90 of file formatclipboard.hxx.
|
private |
Definition at line 72 of file formatclipboard.hxx.
Referenced by Copy(), Erase(), and HasContentForThisType().
|
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().
|
private |
automatic/named character attribute set
Definition at line 75 of file formatclipboard.hxx.
Referenced by Copy(), Erase(), HasContent(), and Paste().
|
private |
table attribute set
Definition at line 81 of file formatclipboard.hxx.
Referenced by Copy(), Erase(), HasContent(), and Paste().