76 MapMode aDisplayMap( aMapMode );
87 double fWinWH =
static_cast<double>(nWidth) / nHeight;
90 if ( fRectWH < fWinWH)
103 Fraction aMinFrac( aFrac1 <= aFrac2 ? aFrac1 : aFrac2 );
110 aNewPos.
setX( ( nWidth - aNewSize.
Width() ) >> 1 );
111 aNewPos.
setY( ( nHeight - aNewSize.
Height() ) >> 1 );
133 if( nMarkCount >= 1 )
137 for(
size_t i = 0;
i < nMarkCount && !bFound; ++
i )
171 pEdgeObj->ConnectToNode(
true, pObj1.get() );
178 pEdgeObj->ConnectToNode(
false, pObj2.get() );
219 "SvxXConnectionPreview::Paint: Corrupt ObjectList (!)");
220 aObjectVector.push_back(
pObject);
230 rRenderContext.
Pop();
235 pEdgeObj->SetMergedItemSetAndBroadcast(rInAttrs);
257 bool bCtrl = rMEvt.
IsMod1();
259 if( bZoomIn || bZoomOut )
264 std::unique_ptr<Fraction> pMultFrac;
269 pMultFrac.reset(
new Fraction( 3, 2 ));
271 pMultFrac.reset(
new Fraction( 11, 10 ));
276 pMultFrac.reset(
new Fraction( 2, 3 ));
278 pMultFrac.reset(
new Fraction( 10, 11 ));
281 aXFrac *= *pMultFrac;
282 aYFrac *= *pMultFrac;
283 if(
static_cast<double>(aXFrac) > 0.001 &&
static_cast<double>(aXFrac) < 1000.0 &&
284 static_cast<double>(aYFrac) > 0.001 &&
static_cast<double>(aYFrac) < 1000.0 )
294 tools::Long nX =
static_cast<tools::Long>( (
static_cast<double>(aOutSize.
Width()) - (
static_cast<double>(aOutSize.
Width()) *
static_cast<double>(*pMultFrac) ) ) / 2.0 + 0.5 );
295 tools::Long nY =
static_cast<tools::Long>( (
static_cast<double>(aOutSize.
Height()) - (
static_cast<double>(aOutSize.
Height()) *
static_cast<double>(*pMultFrac) ) ) / 2.0 + 0.5 );
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
void SetOrigin(const Point &rOrigin)
void SetScaleY(const Fraction &rScaleY)
const Fraction & GetScaleX() const
MapUnit GetMapUnit() const
void SetMapUnit(MapUnit eUnit)
const Point & GetOrigin() const
const Fraction & GetScaleY() const
void SetScaleX(const Fraction &rScaleX)
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const MapMode & GetMapMode() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
void SetDrawMode(DrawModeFlags nDrawMode)
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
Utility class SdrEdgeObj.
SdrObjConnection & GetConnection(bool bTail1)
SdrObject * GetConnectedNode(bool bTail1) const override
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
SdrObject * GetMarkedSdrObj() const
Utility class SdrObjConnection.
virtual SdrInventor GetObjInventor() const
static rtl::Reference< T > Clone(T const &rObj, SdrModel &rTargetModel)
virtual SdrObjKind GetObjIdentifier() const
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const =0
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
OutputDevice * GetFirstOutputDevice() const
SdrModel & getSdrModelFromSdrView() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
bool GetHighContrastMode() const
const Color & GetFieldColor() const
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
SVX_DLLPRIVATE void SetMapMode(const MapMode &rNewMapMode)
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
rtl::Reference< SdrPage > mxSdrPage
virtual ~SvxXConnectionPreview() override
SVX_DLLPRIVATE const MapMode & GetMapMode() const
sal_uInt16 GetLineDeltaCount() const
SVX_DLLPRIVATE void AdaptSize()
rtl::Reference< SdrEdgeObj > pEdgeObj
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void SetAttributes(const SfxItemSet &rInAttrs)
virtual void Resize() override
virtual OutputDevice & get_ref_device()=0
#define DBG_ASSERT(sCon, aError)
#define OUTPUT_DRAWMODE_CONTRAST
#define OUTPUT_DRAWMODE_COLOR
EmbeddedObjectRef * pObject
constexpr TypedWhichId< SdrEdgeLineDeltaCountItem > SDRATTR_EDGELINEDELTACOUNT(SDRATTR_EDGE_FIRST+7)