20#include <config_features.h>
34#include <svx/svxids.hrc>
65#include <drawview.hxx>
74#include <com/sun/star/drawing/framework/XControllerManager.hpp>
75#include <com/sun/star/drawing/framework/XConfigurationController.hpp>
76#include <com/sun/star/drawing/framework/XConfiguration.hpp>
77#include <com/sun/star/drawing/XShape.hpp>
78#include <com/sun/star/frame/XFrame.hpp>
83#include <oox/drawingml/diagram/diagram.hxx>
89using ::com::sun::star::frame::XFrame;
90using ::com::sun::star::frame::XController;
102 rReq.
GetSlot() != SID_SWITCHPAGE &&
103 rReq.
GetSlot() != SID_JUMPTOMARK)
109 sal_uInt16 nSlot = rReq.
GetSlot();
110 bool bAllowFocusChange =
true;
113 case SID_OUTPUT_QUALITY_COLOR:
114 case SID_OUTPUT_QUALITY_GRAYSCALE:
115 case SID_OUTPUT_QUALITY_BLACKWHITE:
116 case SID_OUTPUT_QUALITY_CONTRAST:
123 bAllowFocusChange = pAllowFocusChange->
GetValue();
124 if (!bAllowFocusChange)
149 sal_uInt16 nSelectedPage = 0;
151 if (! pArgs || pArgs->
Count () == 1)
155 else if (pArgs->
Count () == 2)
160 sal_Int32 nWhatPage =
static_cast<sal_Int32
>(pWhatPage->
GetValue ());
164#if HAVE_FEATURE_SCRIPTING
174#if HAVE_FEATURE_SCRIPTING
181 nSelectedPage =
static_cast<short>(nWhatPage);
187#if HAVE_FEATURE_SCRIPTING
194 if(
GetDocSh() && (
GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED))
209 case SID_SWITCHLAYER:
214 bool bCurPageValid(
false);
215 sal_uInt16 nCurPage(0);
220 bCurPageValid =
true;
223 if(pArgs && 1 == pArgs->
Count())
229 nCurPage =
static_cast<short>(pWhatLayer->
GetValue());
230 bCurPageValid =
true;
237 if (!aLayerName.isEmpty())
254 if (pArgs && pArgs->
Count () == 2)
282 if (pArgs && pArgs->
Count() == 2)
301 case SID_HEADER_AND_FOOTER:
302 case SID_INSERT_PAGE_NUMBER:
303 case SID_INSERT_DATE_TIME:
308 auto xRequest = std::make_shared<SfxRequest>(rReq);
310 pDlg->StartExecuteAsync([
this, pDlg, xRequest](sal_Int32 ){
322 case SID_MASTER_LAYOUTS:
337 case SID_OBJECTRESIZE:
375 sal_uInt16
nId = Svx3DChildWindow::GetChildWindowId();
383 Reference<XControllerManager> xControllerManager (
385 Reference<XConfigurationController> xConfigurationController (
386 xControllerManager->getConfigurationController(), UNO_SET_THROW );
387 Reference<XConfiguration> xConfiguration (
388 xConfigurationController->getRequestedConfiguration(), UNO_SET_THROW );
406 xControllerManager.set(
xController, UNO_QUERY_THROW );
407 xConfigurationController.set( xControllerManager->getConfigurationController() );
408 if ( ! xConfigurationController.is())
410 xConfigurationController->restoreConfiguration(xConfiguration);
432 if(xSlideshow.is() && xSlideshow->isRunning())
434 xSlideshow->jumpToBookmark(sBookmark);
446 case SID_OUTPUT_QUALITY_COLOR:
447 case SID_OUTPUT_QUALITY_GRAYSCALE:
448 case SID_OUTPUT_QUALITY_BLACKWHITE:
449 case SID_OUTPUT_QUALITY_CONTRAST:
455 case SID_MAIL_SCROLLBODY_PAGEDOWN:
461 case SID_ATTR_YEAR2000:
464 if (pFormShell !=
nullptr)
468 SID_ATTR_YEAR2000,
true, &pItem) == SfxItemState::SET)
477 case SID_OPT_LOCALE_CHANGED:
485 case SID_REGENERATE_DIAGRAM:
486 case SID_EDIT_DIAGRAM:
497 if(SID_REGENERATE_DIAGRAM == nSlot)
538 case SID_ATTR_LONG_LRSPACE:
542 pUndoGroup->SetComment(
SdResId(STR_UNDO_CHANGE_PAGEBORDER));
545 pArgs->
Get(SID_ATTR_LONG_LRSPACE);
569 for (
i = 0;
i < nPageCnt;
i++)
577 pUndoGroup->AddAction(pUndo);
583 for (
i = 0;
i < nPageCnt;
i++)
591 pUndoGroup->AddAction(pUndo);
600 AddUndoAction(std::move(pUndoGroup));
603 case SID_ATTR_LONG_ULSPACE:
607 pUndoGroup->SetComment(
SdResId(STR_UNDO_CHANGE_PAGEBORDER));
610 pArgs->
Get(SID_ATTR_LONG_ULSPACE);
635 for (
i = 0;
i < nPageCnt;
i++)
643 pUndoGroup->AddAction(pUndo);
649 for (
i = 0;
i < nPageCnt;
i++)
657 pUndoGroup->AddAction(pUndo);
666 AddUndoAction(std::move(pUndoGroup));
669 case SID_RULER_OBJECT:
696 case SID_ATTR_TABSTOP:
703 aEditAttr.
Put( rItem );
709 case SID_ATTR_PARA_LINESPACE:
718 aEditAttr.
Put( aParaLineSP );
724 case SID_ATTR_PARA_ADJUST_LEFT:
729 aEditAttr.
Put( aItem );
735 case SID_ATTR_PARA_ADJUST_CENTER:
740 aEditAttr.
Put( aItem );
746 case SID_ATTR_PARA_ADJUST_RIGHT:
751 aEditAttr.
Put( aItem );
757 case SID_ATTR_PARA_ADJUST_BLOCK:
762 aEditAttr.
Put( aItem );
768 case SID_ATTR_PARA_ULSPACE:
772 SID_ATTR_PARA_ULSPACE));
776 aEditAttr.
Put( aULSP );
782 case SID_ATTR_PARA_LRSPACE:
786 SID_ATTR_PARA_LRSPACE));
791 aEditAttr.
Put( aLRSpace );
797 case SID_ATTR_LRSPACE:
800 sal_uInt16
nId = SID_ATTR_PARA_LRSPACE;
818 if( nOutlineLevel != -1 &&
831 const ::tools::Long nLeftIndent=std::max(
::tools::Long(0),nTxtLeft - nAbsLSpace);
856 if( rFormat != aFormat )
860 aEditAttr.Put( rNumBulletItem );
861 aEditAttr.Put( aLRSpaceItem );
871 aEditAttrReduced.
Put( aLRSpaceItem );
872 mpDrawView->SetAttributes( aEditAttrReduced );
886 aOrigin =
mpDrawView->GetSdrPageView()->GetPageOrigin();
910 SID_ATTR_LONG_LRSPACE);
913 SID_ATTR_LONG_ULSPACE);
916 SfxPointItem aPointItem( SID_RULER_NULL_OFFSET, aPagePos + aOrigin );
946 if( nOutlineLevel != -1 &&
1010 rSet.
Put(
SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, rItem.GetValue() == SvxFrameDirection::Horizontal_RL_TB));
1025 aResizeRect.
Top(), aResizeRect.
Bottom());
1064 case SID_STATUS_LAYOUT:
1081 sal_uInt16 nHelpLine;
1088 if ( rHelpLine.
GetKind() == SdrHelpLineKind::Point )
1091 SdResId( STR_POPUP_EDIT_SNAPPOINT)) );
1093 SdResId( STR_POPUP_DELETE_SNAPPOINT)) );
1098 SdResId( STR_POPUP_EDIT_SNAPLINE)) );
1100 SdResId( STR_POPUP_DELETE_SNAPLINE)) );
#define CHECK_RANGE(nMin, nValue, nMax)
sal_uInt32 GetValue() const
const OUString & GetValue() const
static OUString decode(std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
constexpr tools::Long Y() const
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
virtual VclPtr< VclAbstractDialog > CreateMasterLayoutDialog(weld::Window *pParent, SdDrawDocument *pDoc, SdPage *)=0
static SD_DLLPUBLIC SdAbstractDialogFactory * Create()
virtual VclPtr< AbstractHeaderFooterDialog > CreateHeaderFooterDialog(sd::ViewShell *pViewShell, weld::Window *pParent, SdDrawDocument *pDoc, SdPage *pCurrentPage)=0
sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
SdPage * GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind)
css::text::WritingMode GetDefaultWritingMode() const
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
virtual void SetUpperBorder(sal_Int32 nBorder) override
virtual void SetRightBorder(sal_Int32 nBorder) override
virtual void SetLowerBorder(sal_Int32 nBorder) override
virtual void SetLeftBorder(sal_Int32 nBorder) override
SdrHelpLineKind GetKind() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
SdrObject * GetMarkedSdrObj() const
virtual const std::shared_ptr< svx::diagram::IDiagramHelper > & getDiagramHelper() const
virtual SdrInventor GetObjInventor() const
virtual void SetLogicRect(const tools::Rectangle &rRect)
virtual SdrObjKind GetObjIdentifier() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
const SdrHelpLineList & GetHelpLines() const
SdrPage & TRG_GetMasterPage() const
sal_Int32 GetUpperBorder() const
sal_Int32 GetRightBorder() const
sal_Int32 GetLeftBorder() const
sal_Int32 GetLowerBorder() const
vcl::Window * GetWindow() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
bool IsObjectInPlaceActive() 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 SetValue(const Point &rNewVal)
const tools::Rectangle & GetValue() const
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
virtual void Invalidate(sal_uInt16 nId=0)
const SfxPoolItem * ExecuteSlot(SfxRequest &rReq, const SfxInterface *pIF=nullptr)
virtual SfxUndoManager * GetUndoManager()
SfxViewShell * GetViewShell() const
SfxDispatcher * GetDispatcher()
SfxChildWindow * GetChildWindow(sal_uInt16)
SfxFrame & GetFrame() const
virtual SfxObjectShell * GetObjectShell() override
SfxInPlaceClient * GetIPClient() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static void FatalError(ErrCode)
short GetTextFirstLineOffset() const
tools::Long GetRight() const
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
tools::Long GetTextLeft() const
tools::Long GetLeft() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
tools::Long GetRight() const
void SetLeft(tools::Long lArgLeft)
tools::Long GetLeft() const
void SetRight(tools::Long lArgRight)
tools::Long GetLower() const
void SetLower(tools::Long lArgRight)
tools::Long GetUpper() const
void SetUpper(tools::Long lArgLeft)
const SvxNumRule & GetNumRule() const
sal_uInt16 GetLevelCount() const
const SvxNumberFormat & GetLevel(sal_uInt16 nLevel) const
tools::Long GetStartX() const
tools::Long GetEndY() const
tools::Long GetEndX() const
tools::Long GetStartY() const
void SetSizeProtect(bool bNew)
void SetPosProtect(bool bNew)
sal_uInt16 GetCurPageId() const
virtual VclPtr< AbstractDiagramDialog > CreateDiagramDialog(weld::Window *pParent, SdrObjGroup &rDiagram)=0
static VclAbstractDialogFactory * Create()
virtual void SetModified(bool=true) override
static void CheckLineTo(SfxRequest &rReq)
check if we have to draw a polyline
std::unique_ptr< DrawView > mpDrawView
void GotoBookmark(std::u16string_view rBookmark)
VclPtr< TabControl > maTabControl
virtual void ChangeEditMode(EditMode eMode, bool bIsLayerModeActive)
Set status (enabled/disabled) of menu SfxSlots.
void ExecCtrl(SfxRequest &rReq)
handle SfxRequests for controller
bool mbIsLayerModeActive
This flag controls whether the layer mode is active, i.e.
SD_DLLPUBLIC LayerTabBar * GetLayerTabControl()
Return a pointer to the tab control for layers.
virtual SdPage * GetActualPage() override
void ExecRuler(SfxRequest &rReq)
void ExecStatusBar(SfxRequest &rReq)
bool SwitchPage(sal_uInt16 nPage, bool bAllowChangeFocus=true)
Switch to desired page.
::tools::Rectangle maMarkRect
void GetSnapItemState(SfxItemSet &rSet)
set state of snap object entries in popup
void GetRulerState(SfxItemSet &rSet)
static bool IsRunning(ViewShellBase const &rBase)
returns true if there is a running presentation for the given ViewShellBase
static rtl::Reference< SlideShow > GetSlideShow(SdDrawDocument const *pDocument)
std::shared_ptr< FormShellManager > const & GetFormShellManager() const
virtual void UpdatePreview(SdPage *pPage)
This method is still used by the OutlineViewShell to update the model according to the content of the...
SD_DLLPUBLIC DrawDocShell * GetDocSh() const
Point const & GetViewOrigin() const
SdDrawDocument * GetDoc() const
void InvalidateWindows()
Invalidate all split windows below the ?provided rectangle.
::sd::Window * GetActiveWindow() const
The active window is usually the mpContentWindow.
SD_DLLPUBLIC weld::Window * GetFrameWeld() const
void ExecReq(SfxRequest &rReq)
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
bool HasCurrentFunction() const
const Point & GetWinViewPos() const
const Size & GetViewSize() const
void getActiveCellPos(sdr::table::CellPos &rPos) const
void getCellBounds(const sdr::table::CellPos &rPos, ::tools::Rectangle &rCellRect)
Point PixelToLogic(const Point &rDevicePt) const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
weld::Window * GetFrameWeld() const
#define DBG_UNHANDLED_EXCEPTION(...)
virtual std::shared_ptr< SfxDialogController > GetController() override
constexpr TypedWhichId< SvxTabStopItem > EE_PARA_TABS(EE_PARA_START+17)
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+16)
constexpr TypedWhichId< SvxULSpaceItem > EE_PARA_ULSPACE(EE_PARA_START+14)
constexpr TypedWhichId< SvxLRSpaceItem > EE_PARA_LRSPACE(EE_PARA_START+13)
constexpr TypedWhichId< SvxLineSpacingItem > EE_PARA_SBL(EE_PARA_START+15)
constexpr TypedWhichId< SfxInt16Item > EE_PARA_OUTLLEVEL(EE_PARA_START+11)
constexpr TypedWhichId< SvxFrameDirectionItem > EE_PARA_WRITINGDIR(EE_PARA_START+0)
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
#define ERRCODE_BASIC_BAD_PROP_VALUE
#define ERRCODE_BASIC_WRONG_ARGS
OUString SdResId(TranslateId aId)
Reference< XController > xController
Reference< XFrame > xFrame
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LEFTDIST(SDRATTR_MISC_FIRST+4)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_RIGHTDIST(SDRATTR_MISC_FIRST+5)
constexpr OUStringLiteral sUNO_LayerName_layout