77 MapMode aDisplayMap( aMapMode );
88 double fWinWH =
static_cast<double>(nWidth) / nHeight;
91 if ( fRectWH < fWinWH)
93 aNewSize.
setWidth( static_cast<tools::Long>( static_cast<double>(nHeight) * fRectWH ) );
99 aNewSize.
setHeight( static_cast<tools::Long>( static_cast<double>(nWidth) / fRectWH ) );
104 Fraction aMinFrac( aFrac1 <= aFrac2 ? aFrac1 : aFrac2 );
111 aNewPos.setX( ( nWidth - aNewSize.
Width() ) >> 1 );
112 aNewPos.setY( ( nHeight - aNewSize.
Height() ) >> 1 );
134 if( nMarkCount >= 1 )
138 for(
size_t i = 0;
i < nMarkCount && !bFound; ++
i )
220 "SvxXConnectionPreview::Paint: Corrupt ObjectList (!)");
221 aObjectVector.push_back(pObject);
231 rRenderContext.
Pop();
258 bool bCtrl = rMEvt.
IsMod1();
260 if( bZoomIn || bZoomOut )
265 std::unique_ptr<Fraction> pMultFrac;
270 pMultFrac.reset(
new Fraction( 3, 2 ));
272 pMultFrac.reset(
new Fraction( 11, 10 ));
277 pMultFrac.reset(
new Fraction( 2, 3 ));
279 pMultFrac.reset(
new Fraction( 10, 11 ));
282 aXFrac *= *pMultFrac;
283 aYFrac *= *pMultFrac;
284 if( static_cast<double>(aXFrac) > 0.001 && static_cast<double>(aXFrac) < 1000.0 &&
285 static_cast<double>(aYFrac) > 0.001 && static_cast<double>(aYFrac) < 1000.0 )
295 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 );
296 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 Fraction & GetScaleX() const
#define OUTPUT_DRAWMODE_CONTRAST
Utility class SdrObjConnection.
size_t GetMarkCount() const
virtual void Resize() override
void setWidth(tools::Long nWidth)
SVX_DLLPRIVATE const MapMode & GetMapMode() const
rtl::Reference< SdrPage > mxSdrPage
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
sal_uInt16 GetLineDeltaCount() const
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
const MapMode & GetMapMode() const
virtual ~SvxXConnectionPreview() override
SdrMark * GetMark(size_t nNum) const
#define OUTPUT_DRAWMODE_COLOR
virtual SdrObjKind GetObjIdentifier() const
EmbeddedObjectRef * pObject
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
constexpr TypedWhichId< SdrEdgeLineDeltaCountItem > SDRATTR_EDGELINEDELTACOUNT(SDRATTR_EDGE_FIRST+7)
void ConnectToNode(bool bTail1, SdrObject *pObj) override
void SetDrawMode(DrawModeFlags nDrawMode)
constexpr tools::Long Width() const
SVX_DLLPRIVATE void AdaptSize()
const Fraction & GetScaleY() const
bool GetHighContrastMode() const
SVX_DLLPRIVATE void SetMapMode(const MapMode &rNewMapMode)
OutputDevice * GetFirstOutputDevice() const
virtual OutputDevice & get_ref_device()=0
SdrObject * GetConnectedNode(bool bTail1) const override
virtual SdrEdgeObj * CloneSdrObject(SdrModel &rTargetModel) const override
void SetMapUnit(MapUnit eUnit)
SdrObject * GetMarkedSdrObj() const
void SetScaleX(const Fraction &rScaleX)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
const SdrMarkList & GetMarkedObjectList() const
void SetOrigin(const Point &rOrigin)
const Color & GetFieldColor() const
void SetAttributes(const SfxItemSet &rInAttrs)
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
void SetScaleY(const Fraction &rScaleY)
MapUnit GetMapUnit() const
SdrObjConnection & GetConnection(bool bTail1)
virtual SdrInventor GetObjInventor() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long Height() const
const SfxItemSet & GetMergedItemSet() const
virtual SdrObject * CloneSdrObject(SdrModel &rTargetModel) const
const Point & GetOrigin() const
void setHeight(tools::Long nHeight)
SdrModel & getSdrModelFromSdrView() const
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Utility class SdrEdgeObj.