64 sal_uInt16 nWhich = rReq.
GetSlot();
90 SvxEscapement::Superscript:
91 SvxEscapement::Subscript;
94 eEscape = SvxEscapement::Off;
108 SvxEscapement::Superscript:
109 SvxEscapement::Subscript;
112 eEscape = SvxEscapement::Off;
116 if(eEscape == SvxEscapement::Superscript)
118 else if(eEscape == SvxEscapement::Subscript)
134 if (eTmpCaseMap == SvxCaseMap::SmallCaps)
135 eCaseMap = SvxCaseMap::NotMapped;
142 eCaseMap = SvxCaseMap::NotMapped;
157 case SID_ULINE_VAL_NONE:
166 case SID_ULINE_VAL_SINGLE:
167 case SID_ULINE_VAL_DOUBLE:
168 case SID_ULINE_VAL_DOTTED:
175 case SID_ULINE_VAL_SINGLE:
178 case SID_ULINE_VAL_DOUBLE:
181 case SID_ULINE_VAL_DOTTED:
197 OSL_FAIL(
"wrong dispatcher");
204 sal_uInt16 nSlot = rReq.
GetSlot();
206 bool bArgs = pArgs !=
nullptr && pArgs->
Count() > 0;
218 sal_uInt16 nWhich = rPool.
GetWhich( nSlot );
230 OSL_ENSURE(
false,
"<SwTextShell::ExecCharAttrArgs(..)> - unexpected visited character format ID at hyperlink attribute" );
237 OSL_ENSURE(
false,
"<SwTextShell::ExecCharAttrArgs(..)> - unexpected unvisited character format ID at hyperlink attribute" );
256 SfxItemSet aAttrSet( rPool, aSetItem.GetItemSet().GetRanges() );
261 std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> vItems;
268 vItems.emplace_back( pSize, std::make_unique<SwPaM>( *(pPaM->
GetMark()), *(pPaM->
GetPoint())) );
274 for( std::pair<
const SfxPoolItem*, std::unique_ptr<SwPaM> >& iPair : vItems )
276 std::unique_ptr<SwPaM> pPaM = std::move(iPair.second);
278 aSetItem.GetItemSet().ClearItem();
279 rWrtSh.
GetPaMAttr( pPaM.get(), aSetItem.GetItemSet() );
280 aAttrSet.SetRanges( aSetItem.GetItemSet().GetRanges() );
296 aAttrSet.Put( aSetItem.GetItemSet() );
309 OSL_FAIL(
"wrong dispatcher");
325 sal_uInt16 nSlot = rReq.
GetSlot();
328 case SID_ATTR_PARA_ADJUST:
334 if ( rAdj.
GetAdjust() == SvxAdjust::Block )
344 case SID_ATTR_PARA_ADJUST_LEFT: eAdjst = SvxAdjust::Left;
goto SET_ADJUST;
345 case SID_ATTR_PARA_ADJUST_RIGHT: eAdjst = SvxAdjust::Right;
goto SET_ADJUST;
346 case SID_ATTR_PARA_ADJUST_CENTER: eAdjst = SvxAdjust::Center;
goto SET_ADJUST;
347 case SID_ATTR_PARA_ADJUST_BLOCK: eAdjst = SvxAdjust::Block;
goto SET_ADJUST;
355 case SID_ATTR_PARA_LINESPACE:
360 aSet.Put( aLineSpace );
363 case SID_ATTR_PARA_LINESPACE_10: ePropL = 100;
goto SET_LINESPACE;
364 case SID_ATTR_PARA_LINESPACE_15: ePropL = 150;
goto SET_LINESPACE;
365 case SID_ATTR_PARA_LINESPACE_20: ePropL = 200;
goto SET_LINESPACE;
376 aSet.Put( aLineSpacing );
380 case SID_ATTR_PARA_LEFT_TO_RIGHT :
381 case SID_ATTR_PARA_RIGHT_TO_LEFT :
386 bool bChgAdjust =
false;
388 if(eAdjustState >= SfxItemState::DEFAULT)
392 bChgAdjust = (SvxAdjust::Left == eAdjust && SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot) ||
393 (SvxAdjust::Right == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
399 (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
400 SvxFrameDirection::Horizontal_LR_TB : SvxFrameDirection::Horizontal_RL_TB;
405 SvxAdjust eAdjust = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
406 SvxAdjust::Left : SvxAdjust::Right;
409 aAdjust.SetWhich(SID_ATTR_PARA_ADJUST);
420 if(SvxAdjust::Left == aFormat.GetNumAdjust())
423 else if(SvxAdjust::Right == aFormat.GetNumAdjust())
424 aFormat.SetNumAdjust( SvxAdjust::Left );
431 aSetRule.SetAutoRule(
true );
440 OSL_FAIL(
"wrong dispatcher");
460 sal_uInt16 nSlot = rReq.
GetSlot();
473 if(!sCharStyleName.isEmpty())
475 aDropItem.SetCharFormat( pFormat );
494 if (pDlg->Execute() ==
RET_OK)
498 if ( SfxItemState::SET == aSet.GetItemState(
HINT_END,
false,&pItem) )
500 if ( !static_cast<const SfxStringItem*>(pItem)->GetValue().isEmpty() )
501 rSh.
ReplaceDropText(static_cast<const SfxStringItem*>(pItem)->GetValue());
506 rReq.
Done(*pDlg->GetOutputItemSet());
511 case SID_ATTR_PARA_PAGEBREAK:
518 case SID_ATTR_PARA_MODEL:
524 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL>{});
525 aCoreSet.Put(*pItem);
534 OSL_FAIL(
"wrong dispatcher");
554 bool bAdjustGood =
false;
557 if( SfxItemState::DEFAULT == eState )
559 if( SfxItemState::DEFAULT <= eState )
561 eAdjust =
static_cast<const SvxAdjustItem*
>( pItem)->GetAdjust();
567 if( SfxItemState::DEFAULT == eState )
569 if( eState >= SfxItemState::DEFAULT )
572 sal_uInt16 nLineSpace = 0;
574 if( SfxItemState::DEFAULT == eState )
576 if( SfxItemState::DEFAULT <= eState &&
577 static_cast<const SvxLineSpacingItem* >(pItem)->GetLineSpaceRule() == SvxLineSpaceRule::Auto )
579 if(SvxInterLineSpaceRule::Off ==
580 static_cast<const SvxLineSpacingItem* >(pItem)->GetInterLineSpaceRule())
588 if (eState == SfxItemState::DEFAULT)
590 if (eState >= SfxItemState::DEFAULT)
604 bFlag = eCaseMap == SvxCaseMap::SmallCaps;
606 case SID_ATTR_PARA_ADJUST_LEFT:
613 bFlag = SvxAdjust::Left == eAdjust;
615 case SID_ATTR_PARA_ADJUST_RIGHT:
622 bFlag = SvxAdjust::Right == eAdjust;
624 case SID_ATTR_PARA_ADJUST_CENTER:
631 bFlag = SvxAdjust::Center == eAdjust;
633 case SID_ATTR_PARA_ADJUST_BLOCK:
642 bFlag = SvxAdjust::Block == eAdjust;
652 case SID_ATTR_PARA_LINESPACE_10:
653 bFlag = nLineSpace == 100;
655 case SID_ATTR_PARA_LINESPACE_15:
656 bFlag = nLineSpace == 150;
658 case SID_ATTR_PARA_LINESPACE_20:
659 bFlag = nLineSpace == 200;
666 aSetItem.GetItemSet().Put( aCoreSet,
false );
680 std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >>
682 for (
const std::pair<
const SfxPoolItem*, std::unique_ptr<SwPaM>>& aIt : vFontHeight )
701 case SID_ULINE_VAL_NONE:
702 case SID_ULINE_VAL_SINGLE:
703 case SID_ULINE_VAL_DOUBLE:
704 case SID_ULINE_VAL_DOTTED:
707 if( eState >= SfxItemState::DEFAULT )
713 case SID_ULINE_VAL_NONE:
716 case SID_ULINE_VAL_SINGLE:
719 case SID_ULINE_VAL_DOUBLE:
722 case SID_ULINE_VAL_DOTTED:
732 case SID_ATTR_PARA_ADJUST:
739 case SID_ATTR_PARA_LRSPACE:
740 case SID_ATTR_PARA_LEFTSPACE:
741 case SID_ATTR_PARA_RIGHTSPACE:
742 case SID_ATTR_PARA_FIRSTLINESPACE:
745 if( eState >= SfxItemState::DEFAULT )
757 case SID_ATTR_PARA_LEFT_TO_RIGHT :
758 case SID_ATTR_PARA_RIGHT_TO_LEFT :
760 if ( !
SW_MOD()->GetCTLOptions().IsCTLFontEnabled() )
774 if (SvxFrameDirection::Environment == eFrameDir)
777 SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
779 bFlag = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot &&
780 SvxFrameDirection::Horizontal_LR_TB == eFrameDir) ||
781 (SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot &&
782 SvxFrameDirection::Horizontal_RL_TB == eFrameDir);
793 case SID_ATTR_CHAR_LANGUAGE:
794 case SID_ATTR_CHAR_KERNING:
797 #if OSL_DEBUG_LEVEL > 1
806 case SID_ATTR_PARA_MODEL:
810 SID_ATTR_PARA_MODEL,SID_ATTR_PARA_MODEL>{});
813 rSet.
Put(aTemp.Get(SID_ATTR_PARA_MODEL));
837 rSet.
Put( aFlagItem );
842 rSet.
Put(aCoreSet,
false);
SfxViewFrame * GetViewFrame() const
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
constexpr sal_uInt16 HINT_END(RES_TBX_DUMMY)
Represents the style of a paragraph.
void PutItemForScriptType(SvtScriptType nScriptType, const SfxPoolItem &rItem)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
SwPaM * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
SvxAdjust GetAdjust() const
#define FN_SET_SUPER_SCRIPT
void SetState(const SfxItemSet &rSet)
void ExecParaAttrArgs(SfxRequest &)
const SwNumRule * GetNumRuleAtCurrCursorPos() const
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
const SwPosition * GetMark() const
void SetAttrSet(const SfxItemSet &, SetAttrMode nFlags=SetAttrMode::DEFAULT, SwPaM *pCursor=nullptr, const bool bParagraphSetting=false)
const SvxNumberFormat * Get(sal_uInt16 nLevel) const
void SetHeight(sal_uInt32 nNewHeight, const sal_uInt16 nNewProp=100, MapUnit eUnit=MapUnit::MapRelative)
void InvalidateItem(sal_uInt16 nWhich)
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
const OUString & GetName() const
bool IsSelFullPara() const
void Done(bool bRemove=false)
void ExecParaAttr(SfxRequest &)
#define DFLT_ESC_AUTO_SUB
void GetAttrState(SfxItemSet &)
void AutoUpdatePara(SwTextFormatColl *pColl, const SfxItemSet &rStyleSet, SwPaM *pPaM=nullptr)
const SfxItemSet * GetArgs() const
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the and register/unregister the paragragh style at t...
void SetLineSpaceRule(SvxLineSpaceRule e)
#define FN_UPDATE_STYLE_BY_EXAMPLE
sal_uInt16 const aTextFormatCollSetRange[]
SvxAdjust GetOneWord() const
void SetLastBlock(const SvxAdjust eType)
void SetCurNumRule(const SwNumRule &, const bool bCreateNewList, const OUString &sContinuedListId=OUString(), const bool bResetIndentAttrs=false)
Optional parameter (default value false).
Used by the UI to modify the document model.
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
const SwView & GetView() const
void SetPropLineSpace(const sal_uInt16 nProp)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
#define DFLT_ESC_AUTO_SUPER
#define FN_SHRINK_FONT_SIZE
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
SfxItemPool & GetPool() const
SvxNumRule MakeSvxNumRule() const
virtual VclPtr< SfxAbstractDialog > CreateSwDropCapsDialog(weld::Window *pParent, const SfxItemSet &rSet)=0
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
PaM is Point and Mark: a selection of the document model.
void ExecCharAttr(SfxRequest &)
const sal_uInt32 nFontInc
#define FN_SET_SUB_SCRIPT
bool IsInRightToLeftText() const
const sal_uInt32 nFontMaxSz
SvtScriptType GetScriptType() const
returns the script type of the selection
bool HasSelection() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SwPosition * GetPoint() const
void EndAction(const bool bIdleEnd=false, const bool DoSetPosX=false)
void ExecCharAttrArgs(SfxRequest &)
SfxBindings & GetBindings()
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
bool DontExpandFormat()
If Cursor is at the end of a character style in which the DontExpand-flag is not yet set...
SvxAdjust GetLastBlock() const
const SvxNumberFormat & GetLevel(sal_uInt16 nLevel) const
sal_uInt16 GetLevelCount() const
constexpr TypedWhichId< SvxLineSpacingItem > RES_PARATR_LINESPACING(RES_PARATR_BEGIN)
static SwAbstractDialogFactory * Create()
bool HasReadonlySel() const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
SfxItemPool * GetPool() const
void SetValue(bool const bTheValue)
SwDocShell * GetDocShell()
std::vector< std::pair< const SfxPoolItem *, std::unique_ptr< SwPaM > > > GetItemWithPaM(sal_uInt16 nWhich)
Get RES_CHRATR_* items of one type in the current selection.
bool GetPaMAttr(SwPaM *pPaM, SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Apply / remove attributes.
#define FN_SET_SMALL_CAPS
#define FN_DROP_CHAR_STYLE_NAME
const SwNumFormat & Get(sal_uInt16 i) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
void SetInterLineSpaceRule(SvxInterLineSpaceRule e)
sal_uInt32 GetHeight() const
void DisableItem(sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
void SetWhich(sal_uInt16 nId)
void SetSvxRule(const SvxNumRule &, SwDoc *pDoc)
SwCharFormat * FindCharFormatByName(std::u16string_view rName) const
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
#define FN_GROW_FONT_SIZE
void AppendItem(const SfxPoolItem &)
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
void ReplaceDropText(const OUString &rStr, SwPaM *pPaM=nullptr)
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat &rFmt, bool bIsValid=true)
const SfxPoolItem * GetItemOfScript(SvtScriptType nScript) const
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
sal_Int16 GetCaseMap(sal_Int32 nToken)
#define FN_REMOVE_DIRECT_CHAR_FORMATS
#define FN_FORMAT_DROPCAPS