101 double fSclGrafWidth = fWidth;
102 double fSclGrafHeight
106 if (xLayout.is() && xLayout->IsFrame())
122 if (pMyScale && pFrameGeo)
129 double fDisFrameWidth = fFrameWidth - (fLeftMargin + fRightMargin);
130 double fDisFrameHeight = fFrameHeight - (fTopMargin + fBottomMargin);
141 double fScalePercentage
143 fSclGrafWidth = fScalePercentage * fWidth;
144 fSclGrafHeight = fScalePercentage * fHeight;
150 fSclGrafWidth = fWidth;
151 fSclGrafHeight = fHeight;
155 if (fHeight == 0.0 || fDisFrameHeight == 0.0)
157 if (fWidth / fHeight >= fDisFrameWidth / fDisFrameHeight)
159 fSclGrafWidth = fDisFrameWidth;
162 fSclGrafHeight = (fDisFrameWidth / fWidth) * fHeight;
166 fSclGrafHeight = fDisFrameHeight;
167 fSclGrafWidth = (fDisFrameHeight / fHeight) * fWidth;
172 fSclGrafWidth = fDisFrameWidth;
173 fSclGrafHeight = fDisFrameHeight;
178 fWidth = fSclGrafWidth;
179 fHeight = fSclGrafHeight;
189 , cPersistentFlags(0)
190 , m_SizeRect(0, 0, 5, 5)
Stream wrapper for sax writer.
Base class of all Lwp content objects.
void Read() override
@descr default read function
rtl::Reference< LwpVirtualLayout > GetLayout(LwpVirtualLayout const *pStartLayout)
@descr super class of LwpOleObject and LwpGraphicObject
LwpGraphicOleObject(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
@descr: construction function
virtual void GetGrafOrgSize(double &rWidth, double &rHeight)
void GetGrafScaledSize(double &fWidth, double &fHeight)
virtual void Read() override
@descr: Read GraphicOleObject part
sal_Int32 GetHeight() const
sal_Int32 GetWidth() const
sal_uInt32 GetScalePercentage() const
sal_uInt16 GetScaleMode() const
sal_Int32 GetScaleWidth() const
sal_Int32 GetScaleHeight() const
LwpLayoutScale * GetLayoutScale()
LwpLayoutGeometry * GetGeometry()
@descr: Get the geometry of current layout
void ReadIndexed(LwpSvStream *pStrm)
@descr Read object id with indexed format from stream if index>0, lowid is get from time table per th...
std::unique_ptr< LwpObjectStream > m_pObjStrm
tools::Rectangle m_SizeRect
sal_uInt16 cPersistentFlags
virtual void Parse(IXFStream *pOutputStream) override
@descr: Parse VO_OLEOBJECT and dump to XML stream only on WIN32 platform
LwpOleObject(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
@descr: construction function
virtual void XFConvert(XFContentContainer *pCont) override
@descr default XFConvert function pCont is the XFContentContainer for the object conversion
void GetGrafOrgSize(double &rWidth, double &rHeight) override
virtual void Read() override
@descr: Read VO_OLEOBJECT record
virtual void RegisterStyle() override
@descr default register style function
encapsulate XInputStream to provide SvStream like interfaces
bool IsFitGraphic()
@descr: Whether the size of layout is fit the graphic
double GetMarginsValue(sal_uInt8 nWhichSide)
const sal_uInt8 MARGIN_BOTTOM
const sal_uInt8 MARGIN_RIGHT
const sal_uInt8 MARGIN_TOP
const sal_uInt8 MARGIN_LEFT
For LWP filter architecture prototype - OLE object.