35#include <svx/svxids.hrc>
37#include <osl/diagnose.h>
39#include <com/sun/star/frame/XModel.hpp>
40#include <com/sun/star/drawing/XShape.hpp>
44#include <officecfg/Office/Calc.hxx>
53 short lcl_getHitTolerance(
OutputDevice const * pOutDev )
56 short nHitTolerance = 50;
58 nHitTolerance =
static_cast<short>(pOutDev->
PixelToLogic(
Size(HITPIX,0)).Width());
64OutputDevice * lcl_GetParentRefDevice(
const uno::Reference< frame::XModel > & xModel )
78 ,m_pMarkHandleProvider(nullptr)
80 ,m_bRestoreMapMode( false )
87 SfxItemPool* pOutlinerPool = ( pOutliner ? pOutliner->GetEditTextObjectPool() : nullptr );
110 Size aOutputSize(100,100);
153 SdrSearchOptions::DEEP | SdrSearchOptions::TESTMARKABLE);
158 OUString aShapeName = pRet->
GetName();
161 if (aShapeName.startsWith(
"FieldButton"))
164 if( aShapeName.match(
"PlotAreaIncludingAxes") || aShapeName.match(
"PlotAreaExcludingAxes") )
177 if(
nullptr != pScene)
180 std::vector< const E3dCompoundObject* > aHitList;
184 if(!aHitList.empty())
197 bool bFrameDragSingles =
true;
244 OutputDevice * pParentRefDev( lcl_GetParentRefDevice( xChartModel ));
246 if( pParentRefDev && pOutliner )
248 pOutliner->SetRefDevice( pParentRefDev );
261 sal_uInt16 nAttrMetric;
262 if( eSys == MeasurementSystem::Metric )
263 nAttrMetric = officecfg::Office::Calc::Layout::Other::MeasureUnit::Metric::get();
265 nAttrMetric = officecfg::Office::Calc::Layout::Other::MeasureUnit::NonMetric::get();
271 SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
272 SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_AUTOHEIGHT,
273 SID_ATTR_METRIC, SID_ATTR_METRIC>);
275 aFullSet.
Put( aGeoSet );
309 const SdrHint* pSdrHint = ( rHint.
GetId() == SfxHintId::ThisIsAnSdrHint ?
static_cast<const SdrHint*
>(&rHint) :
nullptr );
313 if( pSdrHint && pSdrPageView )
321 if( pSdrHint ==
nullptr )
325 if( eKind == SdrHintKind::BeginEdit )
336 else if( eKind == SdrHintKind::EndEdit )
353 drawing::XShape >& xShape )
357 if(xTypeProvider.is())
virtual E3dScene * getRootE3dSceneFromE3dObject() const
MeasurementSystem getMeasurementSystemEnum() const
Size GetOutputSize() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
const MapMode & GetMapMode() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
void SetWorkArea(const tools::Rectangle &rRect)
void SetNoDragXorPolys(bool bOn)
virtual void SetMarkHandles(SfxViewShell *pOtherShell) override
SfxItemSet GetGeoAttrFromMarked() const
const SdrPage * GetPage() const
SdrHintKind GetKind() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
void SetFrameDragSingles(bool bOn=true)
const SdrMarkList & GetMarkedObjectList() const
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
void SetMarkHdlSizePixel(sal_uInt16 nSiz)
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
SdrObject * GetMarkedSdrObj() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
SdrPageView * ShowSdrPage(SdrPage *pPage) override
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
void SetMarkProtect(bool bProt)
virtual const tools::Rectangle & GetCurrentBoundRect() const
virtual const OUString & GetName() const
virtual bool HasTextEdit() const
SdrObjList * GetObjList() const
SdrPage * GetPage() const
virtual void CompleteRedraw(OutputDevice *pOut, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr)
OutputDevice * GetFirstOutputDevice() const
void SetApplicationBackgroundColor(Color aBackgroundColor)
void SetBufferedOverlayAllowed(bool bNew)
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
void SetBufferedOutputAllowed(bool bNew)
void SetPoolDefaultItem(const SfxPoolItem &)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual OutputDevice * GetDocumentRefDev()
static SfxObjectShell * GetParentShell(const css::uno::Reference< css::uno::XInterface > &xChild)
void GetOptions(SvtLinguOptions &rOptions) const
const LocaleDataWrapper & GetLocaleData() const
SdrObject * getNamedSdrObject(const OUString &rName)
MapMode m_aMapModeToRestore
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
SdrPageView * GetPageView() const
void attachParentReferenceDevice(const css::uno::Reference< css::frame::XModel > &xChartModel)
tries to get an OutputDevice from the XParent of the model to use as reference device
void setMarkHandleProvider(MarkHandleProvider *pMarkHandleProvider)
void MarkObject(SdrObject *pObj)
SdrObject * getTextEditObject() const
SdrObject * getHitObject(const Point &rPnt) const
void CompleteRedraw(OutputDevice *pOut, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr) override
virtual ~DrawViewWrapper() override
static SdrObject * getSdrObject(const css::uno::Reference< css::drawing::XShape > &xShape)
SdrOutliner * getOutliner() const
MarkHandleProvider * m_pMarkHandleProvider
SdrObject * getNamedSdrObject(const OUString &rName) const
static bool IsObjectHit(SdrObject const *pObj, const Point &rPnt)
virtual void SetMarkHandles(SfxViewShell *pOtherShell) override
SdrObject * getSelectedObject() const
SfxItemSet getPositionAndSizeItemSetFromMarkedObject() const
std::unique_ptr< SdrOutliner > m_apOutliner
DrawViewWrapper(SdrModel &rSdrModel, OutputDevice *pOut)
The DrawViewWrapper should help us to reduce effort if the underlying DrawingLayer changes.
virtual bool getFrameDragSingles()=0
virtual bool getMarkHandles(SdrHdlList &rHdlList)=0
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
SVXCORE_DLLPUBLIC void getAllHit3DObjectsSortedFrontToBack(const basegfx::B2DPoint &rPoint, const E3dScene &rScene, ::std::vector< const E3dCompoundObject * > &o_rResult)
static constexpr auto Items
LanguageType nDefaultLanguage
LanguageType nDefaultLanguage_CTL
LanguageType nDefaultLanguage_CJK
constexpr TypedWhichId< SdrMetricItem > SDRATTR_CORNER_RADIUS(SDRATTR_MISC_FIRST+0)
SVXCORE_DLLPUBLIC std::unique_ptr< SdrOutliner > SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel &rMod)
SVXCORE_DLLPUBLIC E3dObject * DynCastE3dObject(SdrObject *)