45std::unique_ptr<SfxItemSet> lcl_CreateEmptyItemSet(
SelectionType nSelectionType,
SfxItemPool& rPool,
bool bNoParagraphFormats =
false )
47 std::unique_ptr<SfxItemSet> pItemSet;
71 if( bNoParagraphFormats )
96 std::unique_ptr<SvxBrushItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
101 aBrush->
SetWhich(SID_ATTR_BRUSH_ROW);
107 aBrush->SetWhich(SID_ATTR_BRUSH_TABLE);
114 std::unique_ptr<SvxFrameDirectionItem> aBoxDirection(std::make_unique<SvxFrameDirectionItem>(SvxFrameDirection::Environment,
RES_FRAMEDIR));
118 rSet.
Put(std::move(aBoxDirection));
136 std::unique_ptr<SwFormatRowSplit> pSplit = rSh.
GetRowSplit();
148 bool bBackground = pBackgroundItem || pRowItem || pTableItem;
156 std::unique_ptr<SvxBrushItem> aBrush(pRowItem->
Clone());
162 std::unique_ptr<SvxBrushItem> aBrush(pTableItem->
Clone());
210 aDirection.SetValue(pTextOriItem->GetValue());
224 , m_bPersistentCopy(false)
259 return bool(nSelectionType
271 auto pItemSet_TextAttr = lcl_CreateEmptyItemSet( nSelectionType, rPool,
true );
272 auto pItemSet_ParAttr = lcl_CreateEmptyItemSet( nSelectionType, rPool );
287 bool bHasSelection = pCursor->
HasMark();
288 bool bForwardSelection =
false;
299 bHasSelection =
true;
302 bool dontMove =
false;
316 if ( rWrtShell.
IsEndPara() && !rightToLeft )
325 bForwardSelection = !bForwardSelection;
334 if(pItemSet_TextAttr)
358 pItemSet_TextAttr = std::make_unique<SfxItemSet>( pDrawView->
GetAttrFromMarked(
true) );
376 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW,
378 SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE,
406typedef std::vector< std::unique_ptr< SfxPoolItem > >
ItemVector;
411 for(
const auto & rPair : pRanges)
413 for ( sal_uInt16 nWhich = rPair.first; nWhich <= rPair.second; ++nWhich )
416 if( SfxItemState::SET == rStyleAttrSet.
GetItemState( nWhich,
false, &pItem ) )
418 rItemVector.emplace_back( pItem->
Clone() );
426 for(
const auto& rItem : rItemVector )
429 if( SfxItemState::SET == rTemplateItemSet.
GetItemState( rItem->Which(),
true, &pItem ) &&
432 rTemplateItemSet.
ClearItem( rItem->Which() );
438 ,
bool bNoCharacterFormats,
bool bNoParagraphFormats )
498 std::unique_ptr<SfxItemSet> pTemplateItemSet(lcl_CreateEmptyItemSet(
530 std::unique_ptr<SfxItemSet> pTemplateItemSet(lcl_CreateEmptyItemSet(
551 else if ( !bNoCharacterFormats )
SfxItemSet GetAttrFromMarked(bool bOnlyHardAttr) const
void SetAttrToMarked(const SfxItemSet &rAttr, bool bReplaceAll)
bool AreObjectsMarked() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
const WhichRangesContainer & GetRanges() const
SfxItemPool * GetPool() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void InvalidateItem(sal_uInt16 nWhich)
void SetWhich(sal_uInt16 nId)
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SvxBrushItem * Clone(SfxItemPool *pPool=nullptr) const override
void Push()
store a copy of the current cursor on the cursor stack
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
void EndAction(const bool bIdleEnd=false)
bool IsInRightToLeftText() const
SwCharFormat * GetCharFormat()
SwTextFormatColl * GetCollection()
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
SwCharFormat * GetCurCharFormat() const
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
void SetAttrSet(const SfxItemSet &, SetAttrMode nFlags=SetAttrMode::DEFAULT, SwPaM *pCursor=nullptr, const bool bParagraphSetting=false)
SwFrameFormat * GetTableFormat()
void SetTextFormatColl(SwTextFormatColl *, const bool bResetListAttrs=false)
Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTextFormatColl(....
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
void ResetAttr(const o3tl::sorted_vector< sal_uInt16 > &attrs=o3tl::sorted_vector< sal_uInt16 >(), SwPaM *pCursor=nullptr)
void GetCurParAttr(SfxItemSet &rSet) const
Get the paragraph format attribute(s) of the current selection.
bool SetFlyFrameAttr(SfxItemSet &rSet)
bool GetRowBackground(std::unique_ptr< SvxBrushItem > &rToFill) const
FALSE ambiguous.
sal_uInt16 GetRowsToRepeat() const
void SetBoxAlign(sal_uInt16 nOrient)
void SetBoxBackground(const SvxBrushItem &rNew)
void SetRowSplit(const SwFormatRowSplit &rSz)
void SetRowBackground(const SvxBrushItem &rNew)
bool GetBoxBackground(std::unique_ptr< SvxBrushItem > &rToFill) const
FALSE ambiguous.
std::unique_ptr< SwFormatRowSplit > GetRowSplit() const
void SetRowsToRepeat(sal_uInt16 nNumOfRows)
void SetTabBorders(const SfxItemSet &rSet)
void SetTabBackground(const SvxBrushItem &rNew)
void GetTabBorders(SfxItemSet &rSet) const
bool GetFlyFrameAttr(SfxItemSet &rSet) const
sal_uInt16 GetBoxAlign() const
USHRT_MAX if ambiguous.
void GetTabBackground(std::unique_ptr< SvxBrushItem > &rToFill) const
bool GetBoxDirection(std::unique_ptr< SvxFrameDirectionItem > &rToFill) const
FALSE ambiguous.
void SetBoxDirection(const SvxFrameDirectionItem &rNew)
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
bool IsMultiSelection() const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * GetPoint() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Used by the UI to modify the document model.
SelectionType GetSelectionType() const
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
std::pair< const_iterator, bool > insert(Value &&x)
#define FN_PARAM_TABLE_HEADLINE
#define FN_TABLE_BOX_TEXTORIENTATION
#define FN_TABLE_SET_VERT_ALIGN
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr TypedWhichId< SvxFormatKeepItem > RES_KEEP(116)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr TypedWhichId< SwFormatRowSplit > RES_ROW_SPLIT(128)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr TypedWhichId< SwFormatCol > RES_COL(115)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(113)
constexpr TypedWhichId< SwFormatLayoutSplit > RES_LAYOUT_SPLIT(119)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SwFormatEditInReadonly > RES_EDIT_IN_READONLY(118)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SwFormatFillOrder > RES_FILL_ORDER(RES_FRMATR_BEGIN)
constexpr TypedWhichId< SwTextGridItem > RES_TEXTGRID(121)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(112)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(107)
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
sal_Int32 GetContentIndex() const
constexpr TypedWhichId< SfxStringItem > SDRATTR_CUSTOMSHAPE_ENGINE(SDRATTR_CUSTOMSHAPE_FIRST+0)
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
constexpr TypedWhichId< SfxStringItem > SDRATTR_CUSTOMSHAPE_DATA(SDRATTR_CUSTOMSHAPE_FIRST+1)
css::drawing::Direction3D aDirection