40#include <osl/diagnose.h>
66 sal_uInt16 nWhich = rReq.
GetSlot();
92 SvxEscapement::Superscript:
93 SvxEscapement::Subscript;
96 eEscape = SvxEscapement::Off;
110 SvxEscapement::Superscript:
111 SvxEscapement::Subscript;
114 eEscape = SvxEscapement::Off;
132 if (eTmpCaseMap == SvxCaseMap::SmallCaps)
133 eCaseMap = SvxCaseMap::NotMapped;
140 eCaseMap = SvxCaseMap::NotMapped;
155 case SID_ULINE_VAL_NONE:
164 case SID_ULINE_VAL_SINGLE:
165 case SID_ULINE_VAL_DOUBLE:
166 case SID_ULINE_VAL_DOTTED:
173 case SID_ULINE_VAL_SINGLE:
176 case SID_ULINE_VAL_DOUBLE:
179 case SID_ULINE_VAL_DOTTED:
195 OSL_FAIL(
"wrong dispatcher");
202 sal_uInt16 nSlot = rReq.
GetSlot();
204 bool bArgs = pArgs !=
nullptr && pArgs->
Count() > 0;
216 sal_uInt16 nWhich = rPool.
GetWhich( nSlot );
228 OSL_ENSURE(
false,
"<SwTextShell::ExecCharAttrArgs(..)> - unexpected visited character format ID at hyperlink attribute" );
235 OSL_ENSURE(
false,
"<SwTextShell::ExecCharAttrArgs(..)> - unexpected unvisited character format ID at hyperlink attribute" );
254 SfxItemSet aAttrSet( rPool, aSetItem.GetItemSet().GetRanges() );
259 std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> vItems;
266 vItems.emplace_back( pSize, std::make_unique<SwPaM>( *(pPaM->
GetMark()), *(pPaM->
GetPoint())) );
272 for( std::pair<
const SfxPoolItem*, std::unique_ptr<SwPaM> >& iPair : vItems )
274 std::unique_ptr<SwPaM> pPaM = std::move(iPair.second);
276 aSetItem.GetItemSet().ClearItem();
277 rWrtSh.
GetPaMAttr( pPaM.get(), aSetItem.GetItemSet() );
278 aAttrSet.
SetRanges( aSetItem.GetItemSet().GetRanges() );
294 aAttrSet.
Put( aSetItem.GetItemSet() );
307 OSL_FAIL(
"wrong dispatcher");
323 sal_uInt16 nSlot = rReq.
GetSlot();
326 case SID_ATTR_PARA_ADJUST:
332 if ( rAdj.
GetAdjust() == SvxAdjust::Block )
342 case SID_ATTR_PARA_ADJUST_LEFT: eAdjst = SvxAdjust::Left;
goto SET_ADJUST;
343 case SID_ATTR_PARA_ADJUST_RIGHT: eAdjst = SvxAdjust::Right;
goto SET_ADJUST;
344 case SID_ATTR_PARA_ADJUST_CENTER: eAdjst = SvxAdjust::Center;
goto SET_ADJUST;
345 case SID_ATTR_PARA_ADJUST_BLOCK: eAdjst = SvxAdjust::Block;
goto SET_ADJUST;
353 case SID_ATTR_PARA_LINESPACE:
358 aSet.Put( aLineSpace );
361 case SID_ATTR_PARA_LINESPACE_10: ePropL = 100;
goto SET_LINESPACE;
362 case SID_ATTR_PARA_LINESPACE_15: ePropL = 150;
goto SET_LINESPACE;
363 case SID_ATTR_PARA_LINESPACE_115: ePropL = 115;
goto SET_LINESPACE;
364 case SID_ATTR_PARA_LINESPACE_20: ePropL = 200;
goto SET_LINESPACE;
375 aSet.Put( aLineSpacing );
379 case SID_ATTR_PARA_LEFT_TO_RIGHT :
380 case SID_ATTR_PARA_RIGHT_TO_LEFT :
384 bool bChgAdjust =
false;
386 if(eAdjustState >= SfxItemState::DEFAULT)
390 bChgAdjust = (SvxAdjust::Left == eAdjust && SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot) ||
391 (SvxAdjust::Right == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
397 (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
398 SvxFrameDirection::Horizontal_LR_TB : SvxFrameDirection::Horizontal_RL_TB;
403 SvxAdjust eAdjust = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
404 SvxAdjust::Left : SvxAdjust::Right;
407 aAdjust.SetWhich(SID_ATTR_PARA_ADJUST);
438 OSL_FAIL(
"wrong dispatcher");
458 sal_uInt16 nSlot = rReq.
GetSlot();
492 if (pDlg->Execute() ==
RET_OK)
498 if ( !pHintItem->GetValue().isEmpty() )
504 rReq.
Done(*pDlg->GetOutputItemSet());
509 case SID_ATTR_PARA_PAGEBREAK:
516 case SID_ATTR_PARA_MODEL:
521 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL> aCoreSet(
GetPool() );
522 aCoreSet.Put(*pItem);
531 OSL_FAIL(
"wrong dispatcher");
551 bool bAdjustGood =
false;
554 if( SfxItemState::DEFAULT == eState )
556 if( SfxItemState::DEFAULT <= eState )
558 eAdjust =
static_cast<const SvxAdjustItem*
>( pItem)->GetAdjust();
564 if( SfxItemState::DEFAULT == eState )
566 if( eState >= SfxItemState::DEFAULT )
569 sal_uInt16 nLineSpace = 0;
571 if( SfxItemState::DEFAULT == eState )
573 if( SfxItemState::DEFAULT <= eState &&
576 if(SvxInterLineSpaceRule::Off ==
585 if (eState == SfxItemState::DEFAULT)
587 if (eState >= SfxItemState::DEFAULT)
601 bFlag = eCaseMap == SvxCaseMap::SmallCaps;
603 case SID_ATTR_PARA_ADJUST_LEFT:
610 bFlag = SvxAdjust::Left == eAdjust;
612 case SID_ATTR_PARA_ADJUST_RIGHT:
619 bFlag = SvxAdjust::Right == eAdjust;
621 case SID_ATTR_PARA_ADJUST_CENTER:
628 bFlag = SvxAdjust::Center == eAdjust;
630 case SID_ATTR_PARA_ADJUST_BLOCK:
639 bFlag = SvxAdjust::Block == eAdjust;
649 case SID_ATTR_PARA_LINESPACE_10:
650 bFlag = nLineSpace == 100;
652 case SID_ATTR_PARA_LINESPACE_115:
653 bFlag = nLineSpace == 115;
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:
747 if( eState >= SfxItemState::DEFAULT )
766 case SID_ATTR_PARA_LEFT_TO_RIGHT :
767 case SID_ATTR_PARA_RIGHT_TO_LEFT :
783 if (SvxFrameDirection::Environment == eFrameDir)
786 SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
788 bFlag = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot &&
789 SvxFrameDirection::Horizontal_LR_TB == eFrameDir) ||
790 (SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot &&
791 SvxFrameDirection::Horizontal_RL_TB == eFrameDir);
802 case SID_ATTR_CHAR_LANGUAGE:
803 case SID_ATTR_CHAR_KERNING:
810 case SID_ATTR_PARA_MODEL:
814 SID_ATTR_PARA_MODEL,SID_ATTR_PARA_MODEL> aTemp(
GetPool());
817 rSet.
Put(aTemp.Get(SID_ATTR_PARA_MODEL));
void SetState(const SfxItemSet &rSet)
void SetValue(bool const bTheValue)
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
SfxItemPool * GetPool() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
void SetRanges(const WhichRangesContainer &)
void InvalidateItem(sal_uInt16 nWhich)
void SetWhich(sal_uInt16 nId)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
void AppendItem(const SfxPoolItem &)
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
SfxBindings & GetBindings()
SfxViewFrame & GetViewFrame() const
static bool IsCTLFontEnabled()
SvxAdjust GetLastBlock() const
SvxAdjust GetAdjust() const
SvxAdjust GetOneWord() const
void SetOneWord(const SvxAdjust eType)
void SetLastBlock(const SvxAdjust eType)
sal_uInt16 GetPropTextFirstLineOffset() const
short GetTextFirstLineOffset() const
sal_uInt32 GetHeight() const
void SetHeight(sal_uInt32 nNewHeight, const sal_uInt16 nNewProp=100, MapUnit eUnit=MapUnit::MapRelative)
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
void SetAutoFirst(const bool bNew)
void SetPropLineSpace(const sal_uInt16 nProp)
void SetInterLineSpaceRule(SvxInterLineSpaceRule e)
SvxInterLineSpaceRule GetInterLineSpaceRule() const
SvxLineSpaceRule GetLineSpaceRule() const
void SetLineSpaceRule(SvxLineSpaceRule e)
sal_uInt16 GetLevelCount() const
const SvxNumberFormat * Get(sal_uInt16 nLevel) const
const SvxNumberFormat & GetLevel(sal_uInt16 nLevel) const
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat &rFmt, bool bIsValid=true)
tools::Long GetRight() const
sal_uInt16 GetPropRight() const
void PutItemForScriptType(SvtScriptType nScriptType, const SfxPoolItem &rItem)
const SfxPoolItem * GetItemOfScript(SvtScriptType nScript) const
sal_uInt16 GetPropLeft() const
tools::Long GetTextLeft() const
static SwAbstractDialogFactory * Create()
virtual VclPtr< SfxAbstractDialog > CreateSwDropCapsDialog(weld::Window *pParent, const SfxItemSet &rSet)=0
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
bool IsSelFullPara() const
void EndAction(const bool bIdleEnd=false)
bool IsInRightToLeftText() const
bool HasReadonlySel(bool isReplace=false) const
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
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.
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)
SwCharFormat * FindCharFormatByName(const OUString &rName) const
void SetCurNumRule(const SwNumRule &, const bool bCreateNewList, const OUString &sContinuedListId=OUString(), const bool bResetIndentAttrs=false)
Optional parameter <bResetIndentAttrs> (default value false).
bool DontExpandFormat()
If Cursor is at the end of a character style in which the DontExpand-flag is not yet set,...
SvtScriptType GetScriptType() const
returns the script type of the selection
bool GetPaMAttr(SwPaM *pPaM, SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Apply / remove attributes.
const SwNumRule * GetNumRuleAtCurrCursorPos() const
void ReplaceDropText(const OUString &rStr, SwPaM *pPaM=nullptr)
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 SetAutoRule(bool bFlag)
void SetSvxRule(const SvxNumRule &, SwDoc *pDoc)
const SwNumFormat & Get(sal_uInt16 i) const
const OUString & GetName() const
SvxNumRule MakeSvxNumRule() const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
const SwPosition * GetPoint() const
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
Represents the style of a paragraph.
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the <SwNumRuleItem> and register/unregister the paragragh style at t...
void ExecParaAttrArgs(SfxRequest &)
void ExecCharAttr(SfxRequest &)
void GetAttrState(SfxItemSet &)
void ExecParaAttr(SfxRequest &)
void ExecCharAttrArgs(SfxRequest &)
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
void AutoUpdatePara(SwTextFormatColl *pColl, const SfxItemSet &rStyleSet, SwPaM *pPaM=nullptr)
bool HasSelection() const
const SwView & GetView() const
#define FN_FORMAT_DROPCAPS
#define FN_UPDATE_STYLE_BY_EXAMPLE
#define FN_SET_SUPER_SCRIPT
#define FN_SET_SMALL_CAPS
#define FN_DROP_CHAR_STYLE_NAME
#define FN_GROW_FONT_SIZE
#define FN_SHRINK_FONT_SIZE
#define FN_REMOVE_DIRECT_CHAR_FORMATS
#define FN_SET_SUB_SCRIPT
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
constexpr TypedWhichId< SvxLineSpacingItem > RES_PARATR_LINESPACING(RES_PARATR_BEGIN)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SfxStringItem > HINT_END(RES_TBX_DUMMY)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr TypedWhichId< SvxRightMarginItem > RES_MARGIN_RIGHT(93)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
WhichRangesContainer const aTextFormatCollSetRange(svl::Items< RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, RES_PARATR_LIST_LEVEL, RES_PARATR_LIST_LEVEL, RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, XATTR_FILL_FIRST, XATTR_FILL_LAST >)
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
sal_Int16 GetCaseMap(sal_Int32 nToken)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
const sal_uInt32 nFontInc
const sal_uInt32 nFontMaxSz
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)