29#include <svx/svxids.hrc>
47 :
FuPoor(pViewShell, pWindow, pView, pDoc, rReq)
54 xFunc->DoExecute(rReq);
60 const sal_uInt16 nSId = rReq.
GetSlot();
61 if ( nSId == FN_SVX_SET_BULLET || nSId == FN_SVX_SET_NUMBER )
68 const SfxStringItem* pPageItem = SfxItemSet::GetItem<SfxStringItem>(pArgs, FN_PARAM_1,
false);
70 if ( pArgs && !pPageItem )
83 aNewAttr.
Put( aEditAttr,
false );
90 sal_uInt16 nResult = pDlg->Execute();
96 std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
107 const SfxItemSet pOutputSet( *pDlg->GetOutputItemSet( &aNewAttr ) );
108 pView->SetAttributes(pOutputSet,
false, pDlg->IsSlideScope(), pDlg->IsApplyToMaster());
119 const sal_uInt16 nSId = rReq.
GetSlot();
120 if ( nSId != FN_SVX_SET_BULLET && nSId != FN_SVX_SET_NUMBER )
137 aNewAttr.
Put( aEditAttr,
false );
149 if( nLevel != 0xFFFF )
155 aNewAttr.
MergeRange( SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL );
156 aNewAttr.
Put( aStoreSet );
163 sal_uInt16 nIdx = pItem->
GetValue();
164 bool bToggle =
false;
165 if( nIdx == sal_uInt16(0xFFFF) )
175 std::unique_ptr<SvxNumRule> pNumRule;
182 NBOutlineTypeMgrFact::CreateInstance(
183 nSId == FN_SVX_SET_BULLET ? NBOType::Bullets : NBOType::Numbering );
186 sal_uInt16 nActNumLvl = sal_uInt16(0xFFFF);
188 nActNumLvl = pNumLevelItem->GetValue();
192 if ( nSId == FN_SVX_SET_BULLET && bToggle && nIdx==0 )
195 pNumRuleMgr->
ApplyNumRule( aTmpRule, nIdx, nActNumLvl,
true );
199 pNumRuleMgr->
ApplyNumRule( aTmpRule, nIdx, nActNumLvl );
202 sal_uInt16 nMask = 1;
203 for(sal_uInt16
i = 0;
i < pNumRule->GetLevelCount();
i++)
205 if(nActNumLvl & nMask)
208 pNumRule->SetLevel(
i, aFmt);
216 std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
224 const bool bOutlinerUndoEnabled =
pOwner && !
pOwner->IsInUndo() &&
pOwner->IsUndoEnabled();
226 const bool bModelUndoEnabled = pSdrModel && pSdrModel->
IsUndoEnabled();
228 if ( bOutlinerUndoEnabled )
232 else if ( bModelUndoEnabled )
239 pOLV->
ToggleBulletsNumbering( bToggle, nSId == FN_SVX_SET_BULLET, bInMasterView ?
nullptr : pNumRule.get() );
246 if (bInMasterView && pNumRule)
253 if( bOutlinerUndoEnabled )
257 else if ( bModelUndoEnabled )
278 bool bOutliner =
false;
286 for(
size_t nNum = 0; nNum <
nCount; ++nNum)
293 case SdrObjKind::TitleText:
296 case SdrObjKind::OutlineText:
311 if( pFirstStyleSheet )
315 if( pItem ==
nullptr )
330 aNewAttr.
Put(aNewItem);
sal_uInt16 GetValue() const
void ToggleBulletsNumbering(const bool bToggle, const bool bHandleBullets, const SvxNumRule *pNumRule)
void EnsureNumberingIsOn()
virtual VclPtr< AbstractSvxBulletAndPositionDlg > CreateSvxBulletAndPositionDlg(weld::Window *pParent, const SfxItemSet *pAttr, ::sd::View *pView)=0
static SD_DLLPUBLIC SdAbstractDialogFactory * Create()
SAL_DLLPRIVATE SfxItemPool & GetPool()
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
SdrObject * GetMarkedSdrObj() const
bool IsUndoEnabled() const
sal_uInt16 GetSelectionLevel() const
SdrTextObj * GetTextEditObject() const
const OutlinerView * GetTextEditOutlinerView() const
const SdrOutliner * GetTextEditOutliner() const
virtual SdrInventor GetObjInventor() const
virtual SdrObjKind GetObjIdentifier() const
SdrModel & GetModel() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
SfxItemPool * GetSecondaryPool() const
const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) 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 * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxItemSet & GetItemSet()
const SvxNumRule & GetNumRule() const
const SvxNumberFormat & GetLevel(sal_uInt16 nLevel) const
void SetFeatureFlag(SvxNumRuleFlags nFlag, bool bSet=true)
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
EditMode GetEditMode() const
void SetCurrentBulletsNumbering(SfxRequest &rReq)
virtual void DoExecute(SfxRequest &rReq) override
const SvxNumBulletItem * GetNumBulletItem(SfxItemSet &aNewAttr, TypedWhichId< SvxNumBulletItem > &nNumItemId)
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
FuBulletAndPosition(ViewShell *pViewShell, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Base class for all functions.
Derivative of sd::View for the outline mode |* .
Base class of the stacked shell hierarchy.
::sd::Window * GetActiveWindow() const
The active window is usually the mpContentWindow.
SD_DLLPUBLIC weld::Window * GetFrameWeld() const
DrawDocShell * GetDocSh() const
virtual bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false, bool bSlide=false, bool bMaster=false)
virtual void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
void ChangeMarkedObjectsBulletsNumbering(const bool bToggle, const bool bHandleBullets, const SvxNumRule *pNumRule)
change the bullets/numbering of the marked objects
An SdWindow contains the actual working area of ViewShell.
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
constexpr OUStringLiteral STR_LAYOUT_OUTLINE