61#include <osl/thread.h>
95 , m_pTransData(pTransData)
259 double fWidth =
static_cast<double>(nWidth)/
TWIPS_PER_CM;
273 double fOffsetX = 0.00, fOffsetY = 0.00;
274 double fScaleX = 1.00, fScaleY = 1.00;
302 if (!pOpenedObjStyle)
309 sal_uInt8 nLeftArrow = nArrowFlag & 0x0F;
312 sal_uInt8 nRightArrow = (nArrowFlag & 0xF0) >> 4;
315 double fArrowSize_inch = fWidth_inch + 0.08;
343 aArrowName =
"Symmetric arrow";
346 aArrowName =
"Arrow concave";
349 aArrowName =
"arrow100";
352 aArrowName =
"reverse arrow";
355 aArrowName =
"reverse concave arrow";
358 aArrowName =
"reverse line arrow";
361 aArrowName =
"Dimension lines";
364 aArrowName =
"Square";
367 aArrowName =
"Circle";
440 std::unique_ptr<XFDrawStyle> pStyle(
new XFDrawStyle() );
461 xLine->SetStyleName(rStyleName);
472 xLine->SetStyleName(rStyleName);
516 std::unique_ptr<XFDrawStyle> pStyle(
new XFDrawStyle());
541 xPolyline->SetStyleName(rStyleName);
555 xPolyline->SetStyleName(rStyleName);
596 std::unique_ptr<XFDrawStyle> pStyle(
new XFDrawStyle());
619 xPolygon->ClosePath();
621 xPolygon->SetStyleName(rStyleName);
635 xPolygon->SetStyleName(rStyleName);
667 for (
sal_uInt8 nC = 0; nC < nPointsCount; nC++)
676 std::unique_ptr<XFDrawStyle> pStyle(
new XFDrawStyle());
710 xRect->SetStyleName(rStyleName);
737 pRoundedRect->
CurveTo(aDest, aCtrl1, aCtrl2);
745 pRoundedRect->
LineTo(aDest);
768 double fStartX, fStartY, fWidth, fHeight;
769 double fRotAngle = 0.0;
772 Point aPt0, aPt1, aPt2, aPt3;
790 fStartX = aOriginalRect.
Left();
791 fStartY = aOriginalRect.
Top();
804 xRect->SetStyleName(rStyleName);
835 std::unique_ptr<XFDrawStyle> pStyle(
new XFDrawStyle());
866 xEllipse->CurveTo(aDest, aCtrl1, aCtrl2);
868 xEllipse->ClosePath();
871 xEllipse->SetStyleName(rStyleName);
914 std::unique_ptr<XFDrawStyle> pStyle(
new XFDrawStyle());
938 xArc->CurveTo(aDest, aCtl1, aCtl2);
942 xArc->SetStyleName(rStyleName);
974 pFont->SetColor(aXFColor);
1064 std::unique_ptr<XFParaStyle> pStyle(
new XFParaStyle());
1072 pFont->SetFontName(aFontName);
1076 pStyle->SetFont(pFont);
1087 rtl_TextEncoding aEncoding;
1090 aEncoding = osl_getThreadTextEncoding();
1105 xTextBox->Add(pXFPara);
1112 xTextBox->SetStyleName(
sName);
1172 pPath->
CurveTo(aDest, aCtrl1, aCtrl2);
1190 sal_uInt16 nPointNumber;
1193 size_t nPoints = nPointNumber*3+1;
1199 for (
size_t nPt = 0; nPt < nPoints; ++nPt)
1210 nPoints = nPointNumber*3+1;
1216 for (
size_t nPt = 0; nPt < nPoints; ++nPt)
1241 const sal_uInt16 nTextArtFixedLength = 105;
1262 std::unique_ptr<XFParaStyle> pStyle(
new XFParaStyle());
1270 pFont->SetFontName(aFontName);
1274 pStyle->SetFont(pFont);
1282 std::unique_ptr<XFDrawStyle> pStyle(
new XFDrawStyle());
1291 rtl_TextEncoding aEncoding;
1294 aEncoding = osl_getThreadTextEncoding();
1305 xRetObj->Add(pXFPara);
1375 sal_uInt64 nBmpLen =
1385 sal_uInt32 rgbTableSize;
1392 aInfoHeader2.
nWidth = nTmp;
1408 rgbTableSize = 3 * (1 <<
N);
1428 rgbTableSize = 4 * (1 <<
N);
1439 sal_uInt32 nOffBits = 14 + aInfoHeader2.
nHeaderLen + rgbTableSize;
1464 std::unique_ptr<XFImageStyle> pBmpStyle(
new XFImageStyle());
1478 xImage->SetStyleName(rStyleName);
virtual OUString GetStyleName()=0
@descr: return the style name.
static rtl_TextEncoding GetTextCharEncoding()
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual OUString RegisterStyle() override
@descr register styles of a draw object according to the saved records data.
virtual void Read() override
@descr reading function of class LwpDrawArc
LwpDrawArc(SvStream *pStream, DrawingOffsetAndScale *pTransData)
@descr Constructor of class LwpDrawArc
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual OUString RegisterStyle() override
@descr register styles of a draw object according to the saved records data.
virtual void Read() override
@descr reading function of class LwpDrawBitmap
LwpDrawBitmap(SvStream *pStream)
@descr Constructor of class LwpDrawBitmap
std::unique_ptr< sal_uInt8[]> m_pImageData
virtual ~LwpDrawBitmap() override
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual void Read() override
@descr reading function of class LwpDrawEllipse
virtual OUString RegisterStyle() override
@descr register styles of a draw object according to the saved records data.
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
LwpDrawEllipse(SvStream *pStream, DrawingOffsetAndScale *pTransData)
@descr Constructor of class LwpDrawEllipse
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual OUString RegisterStyle() override
@descr register styles of a draw object according to the saved records data.
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
LwpDrawLine(SvStream *pStream, DrawingOffsetAndScale *pTransData)
@descr Constructor of class LwpDrawLine
virtual void Read() override
@descr reading function of class LwpDrawLine
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual OUString RegisterStyle()=0
@descr register styles of a draw object according to the saved records data.
static void SetLineStyle(XFDrawStyle *pStyle, sal_uInt8 nWidth, sal_uInt8 nLineStyle, const SdwColor &rColor)
@descr set line/border style of drawing objects.
void SetFillStyle(XFDrawStyle *pStyle)
@descr set fill style of drawing objects
SdwDrawObjHeader m_aObjHeader
rtl::Reference< XFFrame > CreateXFDrawObject()
@descr create a completed XF-draw object(read data, register styles and create XF-draw object)
SdwClosedObjStyleRec m_aClosedObjStyleRec
virtual void Read()=0
@descr read out the record of a draw object.
static OUString GetArrowName(sal_uInt8 nArrowStyle)
@descr get arrow style name according to the flag.
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName)=0
@descr create XF-draw object and assign the style name to it.
void ReadClosedObjStyle()
@descr read the style of closed lwp-sdw-object like: rectangle, ellipse and so on.
static void SetArrowHead(XFDrawStyle *pOpenedObjStyle, sal_uInt8 nArrowFlag, sal_uInt8 nLineWidth)
@descr set arrowhead of a xf-drawing object.
void ReadObjHeaderRecord()
@descr read the header record data of lwp-sdw-object
void SetPosition(XFFrame *pObj)
@descr set position of a drawing object in the frame.
DrawingOffsetAndScale * m_pTransData
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName)=0
@descr create XF-draw object and assign the style name to it.
LwpDrawObj(SvStream *pStream, DrawingOffsetAndScale *pTransData=nullptr)
@descr Constructor of class LwpDrawObj
virtual ~LwpDrawPolyLine() override
SdwPolyLineRecord m_aPolyLineRec
virtual void Read() override
@descr reading function of class LwpDrawPolyLine
virtual OUString RegisterStyle() override
@descr register styles of a draw object according to the saved records data.
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
LwpDrawPolyLine(SvStream *pStream, DrawingOffsetAndScale *pTransData)
@descr Constructor of class LwpDrawPolyLine
std::unique_ptr< SdwPoint[]> m_pVector
virtual OUString RegisterStyle() override
@descr register styles of a draw object according to the saved records data.
virtual void Read() override
@descr reading function of class LwpDrawPolygon
virtual ~LwpDrawPolygon() override
LwpDrawPolygon(SvStream *pStream, DrawingOffsetAndScale *pTransData)
@descr Constructor of class LwpDrawPolygon
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
std::unique_ptr< SdwPoint[]> m_pVector
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual void Read() override
@descr reading function of class LwpDrawRectangle
LwpDrawRectangle(SvStream *pStream, DrawingOffsetAndScale *pTransData)
@descr Constructor of class LwpDrawRectangle
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
XFFrame * CreateRoundedRect(const OUString &rStyleName)
virtual OUString RegisterStyle() override
@descr register styles of a draw object according to the saved records data.
virtual ~LwpDrawTextArt() override
virtual void Read() override
@descr read out the record of a draw object.
LwpDrawTextArt(SvStream *pStream, DrawingOffsetAndScale *pTransData)
@descr Constructor of class LwpDrawTextBox
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
virtual OUString RegisterStyle() override
@descr register styles of a draw object according to the saved records data.
void CreateFWPath(XFDrawPath *pPath)
virtual ~LwpDrawTextBox() override
virtual rtl::Reference< XFFrame > CreateStandardDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
static void SetFontStyle(rtl::Reference< XFFont > const &pFont, SdwTextBoxRecord const *pRec)
virtual void Read() override
@descr reading function of class LwpDrawTextBox
virtual rtl::Reference< XFFrame > CreateDrawObj(const OUString &rStyleName) override
@descr create XF-draw object and assign the style name to it.
SdwTextBoxRecord m_aTextRec
LwpDrawTextBox(SvStream *pStream)
@descr Constructor of class LwpDrawTextBox
virtual OUString RegisterStyle() override
@descr register styles of a draw object according to the saved records data.
XFStyleManager * GetXFStyleManager()
static LwpGlobalMgr * GetInstance(LwpSvStream *pSvStream=nullptr)
void setX(tools::Long nX)
void setY(tools::Long nY)
SdwRectangle: Not like rectangle in SODC, rectangles in Word Pro are defined by 4 points.
double GetRotationAngle() const
bool IsRectRotated() const
tools::Rectangle GetOriginalRect() const
SvStream & ReadInt16(sal_Int16 &rInt16)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
sal_uInt64 Seek(sal_uInt64 nPos)
std::size_t ReadBytes(void *pData, std::size_t nSize)
sal_uInt64 SeekRel(sal_Int64 nPos)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
sal_uInt64 remainingSize()
SvStream & ReadUChar(unsigned char &rChar)
virtual void Add(XFContent *pContent)
@descr Add content.
virtual void SetStyleName(const OUString &style)
: All content except XFTextContent can have a style.
Line object of drawing layer.
void ClosePath()
@descr Close path command.
void LineTo(XFPoint pt)
@descr Line command.
void CurveTo(XFPoint dest, XFPoint ctrl1, XFPoint ctrl2)
@descr Curve command.
void MoveTo(XFPoint pt)
@descr Move command.
Style for all drawing object, which can includes line style, area style, wrap style.
void SetArrowStart(const OUString &start, double size)
@descr Set drawing object arrow start style,only lines can have arrows.
void SetArrowEnd(const OUString &end, double size)
@descr Set drawing object arrow end style,only lines can have arrows.
void SetLineDashStyle(enumXFLineStyle style, double len1, double len2, double space)
@descr Set drawing object dash border style.
void SetLineStyle(double width, XFColor color)
@descr Set drawing object border line.
void SetAreaColor(XFColor const &color)
@descr Set drawing object area fill color.
void SetAreaLineStyle(enumXFAreaLineStyle style, sal_Int32 angle, double space, XFColor lineColor)
@descr Set drawing object area grid style.
@descr The font struct of openoffice xml filter.
Base class for all frame object,include drawing,image,text-box.
void SetPosition(double x, double y, double width, double height)
@descr Set frame position.
Style object for aragraph.
Paragraph object for SODC.
Style manager for the filter.
IXFStyleRet AddStyle(std::unique_ptr< IXFStyle > pStyle)
Style for all frame objects.
const EnumerationType m_eType
GtkMediaStream * m_pStream
static bool IsValid(const BmpInfoHeader2 &rHeader)
The file declares the LwpDrawObjects and associated class like LwpDrawGroup, LwpDrawRectangle and so ...
For LWP filter architecture prototype Implementation file of SdwRectangle.
constexpr double rad2deg(double v)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
sal_uInt8 pFillPattern[8]
std::vector< SdwPoint > aPts
sal_uInt8 tmpTextFaceName[DRAW_FACESIZE]
sal_uInt16 nTextCharacterSet
sal_Int16 nTextExtraSpacing
@ enumXFFrameXPosFromLeft
@ enumXFTransformSmallCaps