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;
118 if(eEscape == SvxEscapement::Superscript)
120 else if(eEscape == SvxEscapement::Subscript)
136 if (eTmpCaseMap == SvxCaseMap::SmallCaps)
137 eCaseMap = SvxCaseMap::NotMapped;
144 eCaseMap = SvxCaseMap::NotMapped;
159 case SID_ULINE_VAL_NONE:
168 case SID_ULINE_VAL_SINGLE:
169 case SID_ULINE_VAL_DOUBLE:
170 case SID_ULINE_VAL_DOTTED:
177 case SID_ULINE_VAL_SINGLE:
180 case SID_ULINE_VAL_DOUBLE:
183 case SID_ULINE_VAL_DOTTED:
199 OSL_FAIL(
"wrong dispatcher");
206 sal_uInt16 nSlot = rReq.
GetSlot();
208 bool bArgs = pArgs !=
nullptr && pArgs->
Count() > 0;
220 sal_uInt16 nWhich = rPool.
GetWhich( nSlot );
232 OSL_ENSURE(
false,
"<SwTextShell::ExecCharAttrArgs(..)> - unexpected visited character format ID at hyperlink attribute" );
239 OSL_ENSURE(
false,
"<SwTextShell::ExecCharAttrArgs(..)> - unexpected unvisited character format ID at hyperlink attribute" );
258 SfxItemSet aAttrSet( rPool, aSetItem.GetItemSet().GetRanges() );
263 std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> vItems;
270 vItems.emplace_back( pSize, std::make_unique<SwPaM>( *(pPaM->
GetMark()), *(pPaM->
GetPoint())) );
276 for( std::pair<
const SfxPoolItem*, std::unique_ptr<SwPaM> >& iPair : vItems )
278 std::unique_ptr<SwPaM> pPaM = std::move(iPair.second);
280 aSetItem.GetItemSet().ClearItem();
281 rWrtSh.
GetPaMAttr( pPaM.get(), aSetItem.GetItemSet() );
282 aAttrSet.
SetRanges( aSetItem.GetItemSet().GetRanges() );
298 aAttrSet.
Put( aSetItem.GetItemSet() );
311 OSL_FAIL(
"wrong dispatcher");
327 sal_uInt16 nSlot = rReq.
GetSlot();
330 case SID_ATTR_PARA_ADJUST:
336 if ( rAdj.
GetAdjust() == SvxAdjust::Block )
346 case SID_ATTR_PARA_ADJUST_LEFT: eAdjst = SvxAdjust::Left;
goto SET_ADJUST;
347 case SID_ATTR_PARA_ADJUST_RIGHT: eAdjst = SvxAdjust::Right;
goto SET_ADJUST;
348 case SID_ATTR_PARA_ADJUST_CENTER: eAdjst = SvxAdjust::Center;
goto SET_ADJUST;
349 case SID_ATTR_PARA_ADJUST_BLOCK: eAdjst = SvxAdjust::Block;
goto SET_ADJUST;
357 case SID_ATTR_PARA_LINESPACE:
362 aSet.Put( aLineSpace );
365 case SID_ATTR_PARA_LINESPACE_10: ePropL = 100;
goto SET_LINESPACE;
366 case SID_ATTR_PARA_LINESPACE_15: ePropL = 150;
goto SET_LINESPACE;
367 case SID_ATTR_PARA_LINESPACE_115: ePropL = 115;
goto SET_LINESPACE;
368 case SID_ATTR_PARA_LINESPACE_20: ePropL = 200;
goto SET_LINESPACE;
379 aSet.Put( aLineSpacing );
383 case SID_ATTR_PARA_LEFT_TO_RIGHT :
384 case SID_ATTR_PARA_RIGHT_TO_LEFT :
388 bool bChgAdjust =
false;
390 if(eAdjustState >= SfxItemState::DEFAULT)
394 bChgAdjust = (SvxAdjust::Left == eAdjust && SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot) ||
395 (SvxAdjust::Right == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
401 (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
402 SvxFrameDirection::Horizontal_LR_TB : SvxFrameDirection::Horizontal_RL_TB;
407 SvxAdjust eAdjust = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
408 SvxAdjust::Left : SvxAdjust::Right;
411 aAdjust.SetWhich(SID_ATTR_PARA_ADJUST);
442 OSL_FAIL(
"wrong dispatcher");
462 sal_uInt16 nSlot = rReq.
GetSlot();
496 if (pDlg->Execute() ==
RET_OK)
502 if ( !pHintItem->GetValue().isEmpty() )
508 rReq.
Done(*pDlg->GetOutputItemSet());
513 case SID_ATTR_PARA_PAGEBREAK:
520 case SID_ATTR_PARA_MODEL:
525 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL> aCoreSet(
GetPool() );
526 aCoreSet.Put(*pItem);
535 OSL_FAIL(
"wrong dispatcher");
555 bool bAdjustGood =
false;
558 if( SfxItemState::DEFAULT == eState )
560 if( SfxItemState::DEFAULT <= eState )
562 eAdjust =
static_cast<const SvxAdjustItem*
>( pItem)->GetAdjust();
568 if( SfxItemState::DEFAULT == eState )
570 if( eState >= SfxItemState::DEFAULT )
573 sal_uInt16 nLineSpace = 0;
575 if( SfxItemState::DEFAULT == eState )
577 if( SfxItemState::DEFAULT <= eState &&
580 if(SvxInterLineSpaceRule::Off ==
589 if (eState == SfxItemState::DEFAULT)
591 if (eState >= SfxItemState::DEFAULT)
605 bFlag = eCaseMap == SvxCaseMap::SmallCaps;
607 case SID_ATTR_PARA_ADJUST_LEFT:
614 bFlag = SvxAdjust::Left == eAdjust;
616 case SID_ATTR_PARA_ADJUST_RIGHT:
623 bFlag = SvxAdjust::Right == eAdjust;
625 case SID_ATTR_PARA_ADJUST_CENTER:
632 bFlag = SvxAdjust::Center == eAdjust;
634 case SID_ATTR_PARA_ADJUST_BLOCK:
643 bFlag = SvxAdjust::Block == eAdjust;
653 case SID_ATTR_PARA_LINESPACE_10:
654 bFlag = nLineSpace == 100;
656 case SID_ATTR_PARA_LINESPACE_115:
657 bFlag = nLineSpace == 115;
659 case SID_ATTR_PARA_LINESPACE_15:
660 bFlag = nLineSpace == 150;
662 case SID_ATTR_PARA_LINESPACE_20:
663 bFlag = nLineSpace == 200;
670 aSetItem.GetItemSet().Put( aCoreSet,
false );
684 std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >>
686 for (
const std::pair<
const SfxPoolItem*, std::unique_ptr<SwPaM>>& aIt : vFontHeight )
705 case SID_ULINE_VAL_NONE:
706 case SID_ULINE_VAL_SINGLE:
707 case SID_ULINE_VAL_DOUBLE:
708 case SID_ULINE_VAL_DOTTED:
711 if( eState >= SfxItemState::DEFAULT )
717 case SID_ULINE_VAL_NONE:
720 case SID_ULINE_VAL_SINGLE:
723 case SID_ULINE_VAL_DOUBLE:
726 case SID_ULINE_VAL_DOTTED:
736 case SID_ATTR_PARA_ADJUST:
743 case SID_ATTR_PARA_LRSPACE:
744 case SID_ATTR_PARA_LEFTSPACE:
745 case SID_ATTR_PARA_RIGHTSPACE:
746 case SID_ATTR_PARA_FIRSTLINESPACE:
751 if( eState >= SfxItemState::DEFAULT )
770 case SID_ATTR_PARA_LEFT_TO_RIGHT :
771 case SID_ATTR_PARA_RIGHT_TO_LEFT :
787 if (SvxFrameDirection::Environment == eFrameDir)
790 SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
792 bFlag = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot &&
793 SvxFrameDirection::Horizontal_LR_TB == eFrameDir) ||
794 (SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot &&
795 SvxFrameDirection::Horizontal_RL_TB == eFrameDir);
806 case SID_ATTR_CHAR_LANGUAGE:
807 case SID_ATTR_CHAR_KERNING:
814 case SID_ATTR_PARA_MODEL:
818 SID_ATTR_PARA_MODEL,SID_ATTR_PARA_MODEL> aTemp(
GetPool());
821 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)
#define DFLT_ESC_AUTO_SUB
#define DFLT_ESC_AUTO_SUPER
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)