32#include <svx/strings.hrc>
37#include <drawview.hxx>
64: ::
sd::
View(*pDocSh->GetDoc(), pOutDev, pShell)
66 ,mpDrawViewShell(pShell)
111 bool bReplaceAll,
bool bSlide,
bool bMaster)
121 for (
size_t nObj = 0; nObj < nObjCount; ++nObj)
133 for (
size_t nObj = 0; nObj < nObjCount; ++nObj)
154 if (nInv == SdrInventor::Default)
172 std::make_unique<StyleSheetUndoAction>(&
mrDoc, pSheet, &aTempSet));
178 else if (eObjKind == SdrObjKind::OutlineText)
188 OUString aComment(
SdResId(STR_UNDO_CHANGE_PRES_OBJECT));
189 aComment = aComment.replaceFirst(
"$",
SdResId(STR_PSEUDOSHEET_OUTLINE));
192 std::vector<Paragraph*> aSelList;
195 std::vector<Paragraph*>::reverse_iterator iter = aSelList.rbegin();
196 Paragraph* pPara = iter != aSelList.rend() ? *iter :
nullptr;
200 sal_Int32 nParaPos = pOutliner->
GetAbsPos( pPara );
201 sal_Int16 nDepth = pOutliner->
GetDepth( nParaPos );
203 OUString::number((nDepth <= 0) ? 1 : nDepth + 1);
223 std::make_unique<StyleSheetUndoAction>(&
mrDoc, pSheet, &aTempSet));
230 for( nChild = nDepth + 1; nChild < 9; nChild++ )
233 OUString::number((nChild <= 0) ? 1 : nChild + 1);
242 pPara = iter != aSelList.rend() ? *iter :
nullptr;
244 bool bJumpToLevel1 =
false;
246 bJumpToLevel1 =
true;
250 iter = aSelList.rend();
276 for (
size_t nMark = 0; nMark < nMarkCount; ++nMark)
298 if (nInv != SdrInventor::Default)
303 if (bSlide && eObjKind == SdrObjKind::Text)
315 std::make_unique<StyleSheetUndoAction>(&
mrDoc, pSheet, &aTempSet));
336 std::make_unique<StyleSheetUndoAction>(&
mrDoc, pSheet, &aTempSet));
342 else if (eObjKind == SdrObjKind::OutlineText)
348 for (sal_uInt16 nLevel = 9; nLevel > 0; nLevel--)
351 OUString::number(nLevel);
353 Find(
aName, SfxStyleFamily::Page));
382 std::make_unique<StyleSheetUndoAction>(&
mrDoc, pSheet, &aTempSet));
394 pObject->ClearMergedItem( nWhich );
415 if (
mnPOCHSmph == 0 && eHintKind == SdrHintKind::PageOrderChange )
419 else if ( eHintKind == SdrHintKind::LayerChange || eHintKind == SdrHintKind::LayerOrderChange )
425 if(SdrHintKind::SwitchToPage == eHintKind)
438 sal_uInt16 nPageNum = (pPage->
GetPageNum() - 1) / 2;
478 VclMessageType::Info, VclButtonsType::Ok,
479 SdResId(STR_ACTION_NOTPOSSIBLE)));
505 if(xSlideshow.is() && xSlideshow->isRunning())
507 OutputDevice* pShowWindow = xSlideshow->getShowWindow();
510 if( pShowWindow == pOutDev &&
mpViewSh )
549 DBG_ASSERT( pUndoManager,
"sd::DrawView::DeleteMarked(), ui action without undo manager!?" );
553 OUString aUndo(
SvxResId(STR_EditDelete));
560 bool bResetLayout =
false;
566 for (
size_t nMark = 0; nMark < nMarkCount; ++nMark)
575 switch( ePresObjKind )
620 if( pPage && bResetLayout )
624 pUndoManager->LeaveListAction();
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
void CreateSelectionList(std::vector< Paragraph * > &aSelList)
Outliner * GetOutliner() const
Paragraph * GetParagraph(sal_Int32 nAbsPos) const
sal_Int16 GetDepth(sal_Int32 nPara) const
bool SetUpdateLayout(bool bUpdate)
sal_Int32 GetAbsPos(Paragraph const *pPara) const
sd::UndoManager * GetUndoManager() const
SAL_DLLPRIVATE DocumentType GetDocumentType() const
virtual SfxStyleSheet * GetTextStyleSheetForObject(SdrObject *pObj) const override
SfxStyleSheet * GetStyleSheetForPresObj(PresObjKind eObjKind) const
PresObjKind GetPresObjKind(SdrObject *pObj) const
void SetAutoLayout(AutoLayout eLayout, bool bInit=false, bool bCreate=false)
virtual OUString GetLayoutName() const override
SdrObject * InsertAutoLayoutShape(SdrObject *pObj, PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle &rRect, bool bInit)
reuses or creates a presentation shape for an auto layout that fits the given parameter
AutoLayout GetAutoLayout() const
void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default)
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
OUString const & GetDescriptionOfMarkedObjects() const
SdrObject * GetMarkedSdrObj() const
SfxStyleSheetBasePool * GetStyleSheetPool() const
SdrUndoFactory & GetSdrUndoFactory() const
SdrTextObj * GetTextEditObject() const
const OutlinerView * GetTextEditOutlinerView() const
virtual void ModelHasChanged() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual SdrObject * SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
SdrObjUserCall * GetUserCall() const
virtual SdrInventor GetObjInventor() const
sal_uInt32 GetOrdNum() const
bool IsEmptyPresObj() const
SdrPage * getSdrPageFromSdrObject() const
virtual const tools::Rectangle & GetLogicRect() const
SdrPage & TRG_GetMasterPage() const
sal_uInt16 GetPageNum() const
bool IsMasterPage() const
virtual SdrObjKind GetObjIdentifier() const override
virtual bool IsVerticalWriting() const
virtual std::unique_ptr< SdrUndoAction > CreateUndoObjectOrdNum(SdrObject &rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1)
virtual void DeleteMarked()
void Broadcast(const SfxHint &rHint)
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
bool Set(const SfxItemSet &, bool bDeep=true)
void SetWaitCursor(bool bSet) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxItemSet & GetItemSet()
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
ViewShellId GetViewShellId() const override
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
SfxItemState GetItemState(bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
virtual SfxUndoManager * GetUndoManager() override
SdDrawDocument * GetDoc()
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
virtual SdPage * getCurrentPage() const override
inherited from sd::ViewShell
EditMode GetEditMode() const
void MakeVisible(const ::tools::Rectangle &rRect, vcl::Window &rWin)
Make area visible (scroll part of picture) |* .
virtual SdPage * GetActualPage() override
bool SwitchPage(sal_uInt16 nPage, bool bAllowChangeFocus=true)
Switch to desired page.
void ResetActualPage()
Select new refreshed page, in case of a page order change (eg.
void SelectionHasChanged()
Called, if state of selection of view is changed.
void ResetActualLayer()
Select new refreshed page, in case of a page order change (eg.
sal_uInt16 mnPOCHSmph
for blocking PageOrderChangedHint
DrawView(DrawDocShell *pDocSh, OutputDevice *pOutDev, DrawViewShell *pShell)
Shows the first page of document at position 0,0.
virtual bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false, bool bSlide=false, bool bMaster=false) override
Redirect attributes onto title and outline text and background rectangle of a masterpage into templat...
virtual void HideSdrPage() override
Hide page.
DrawViewShell * mpDrawViewShell
void SetMasterAttributes(SdrObject *pObject, const SdPage &rPage, SfxItemSet rSet, SfxStyleSheetBasePool *pStShPool, bool &bOk, bool bMaster, bool bSlide)
DrawDocShell * mpDocShell
void BlockPageOrderChangedHint(bool bBlock)
Lock/Unlock PageOrderChangedHint.
virtual void DeleteMarked() override
virtual void ModelHasChanged() override
Virtual method from SdrView, called at model change.
bool SetStyleSheet(SfxStyleSheet *pStyleSheet, bool bDontRemoveHardAttr=false) override
If presentation objects are selected, intercept stylesheet-positioning at masterpage.
virtual void MakeVisible(const ::tools::Rectangle &rRect, vcl::Window &rWin) override
Make passed region visible (scrolling if necessary)
virtual ~DrawView() override
virtual void MarkListHasChanged() override
Virtual method from SdrView, called at selection change.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Notify for change of site arrangement.
void CompleteRedraw(OutputDevice *pOutDev, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr) override
Paint-method: Redirect event to the view.
static rtl::Reference< SlideShow > GetSlideShow(SdDrawDocument const *pDocument)
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false) override
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId) override
SD_DLLPUBLIC weld::Window * GetFrameWeld() const
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
bool IsPresObjSelected(bool bOnPage=true, bool bOnMasterPage=true, bool bCheckPresObjListOnly=false, bool bCheckLayoutOnly=false) const
Is a presentation object selected?
virtual bool SetStyleSheet(SfxStyleSheet *pStyleSheet, bool bDontRemoveHardAttr=false)
virtual bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false, bool bSlide=false, bool bMaster=false)
void CompleteRedraw(OutputDevice *pOutDev, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr) override
The event will be forwarded to the View.
virtual void MarkListHasChanged() override
#define DBG_ASSERT(sCon, aError)
SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId)
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
EmbeddedObjectRef * pObject
#define SAL_WARN_IF(condition, area, stream)
OUString SdResId(TranslateId aId)
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)