23#include <svx/svxids.hrc>
42 FuPoor(pViewSh, pWin, pView, pDoc, rReq)
49 xFunc->DoExecute(rReq);
56 sal_uInt16 nHelpLine = 0;
57 bool bCreateNew =
true;
61 if (pHelpLineIndex !=
nullptr)
63 nHelpLine =
static_cast<sal_uInt16
>(pHelpLineIndex->
GetValue());
73 bool bLineExist (
false);
76 if (pHelpLineIndex ==
nullptr)
83 if ( aLinePos.
X() >= 0 )
85 aLinePos =
mpWindow->PixelToLogic(aLinePos);
96 aLinePos =
Point(0,0);
100 assert(pPV!=
nullptr);
114 pDlg->HideRadioGroup();
118 if ( rHelpLine.
GetKind() == SdrHelpLineKind::Point )
120 pDlg->SetText(
SdResId(STR_SNAPDLG_SETPOINT));
121 pDlg->SetInputFields(
true,
true);
125 pDlg->SetText(
SdResId(STR_SNAPDLG_SETLINE));
127 if ( rHelpLine.
GetKind() == SdrHelpLineKind::Vertical )
128 pDlg->SetInputFields(
true,
false);
130 pDlg->SetInputFields(
false,
true);
135 pDlg->HideDeleteBtn();
137 sal_uInt16 nResult = pDlg->Execute();
139 pDlg->GetAttr(aNewAttr);
160 aHlpPos.
setX( pArgs->
Get(ATTR_SNAPLINE_X).GetValue() );
161 aHlpPos.
setY( pArgs->
Get(ATTR_SNAPLINE_Y).GetValue() );
170 switch (
static_cast<SnapKind>(pArgs->
Get(ATTR_SNAPLINE_KIND).GetValue()) )
174 default : eKind = SdrHelpLineKind::Point;
break;
sal_uInt32 GetValue() const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
virtual VclPtr< AbstractSdSnapLineDlg > CreateSdSnapLineDlg(weld::Window *pParent, const SfxItemSet &rInAttrs, ::sd::View *pView)=0
static SD_DLLPUBLIC SdAbstractDialogFactory * Create()
SdrHelpLineKind GetKind() const
void LogicToPagePos(Point &rPnt) const
void PagePosToLogic(Point &rPnt) const
const SdrHelpLineList & GetHelpLines() const
void DeleteHelpLine(sal_uInt16 nNum)
void SetHelpLine(sal_uInt16 nNum, const SdrHelpLine &rNewHelpLine)
void InsertHelpLine(const SdrHelpLine &rHL)
SdrPageView * GetSdrPageView() const
bool PickHelpLine(const Point &rPnt, short nTol, const OutputDevice &rOut, sal_uInt16 &rnHelpLineNum, SdrPageView *&rpPV) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
Base class for all functions.
VclPtr< ::sd::Window > mpWindow
virtual void DoExecute(SfxRequest &rReq) override
virtual void Deactivate() override
deactivates the function
virtual void Activate() override
activates the function
FuSnapLine(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Base class of the stacked shell hierarchy.
::sd::Window * GetActiveWindow() const
The active window is usually the mpContentWindow.
An SdWindow contains the actual working area of ViewShell.
weld::Window * GetFrameWeld() const
OUString SdResId(TranslateId aId)