LibreOffice Module svx (master)  1
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ImpSdrPdfImport Class Referencefinal

#include <svdpdf.hxx>

Collaboration diagram for ImpSdrPdfImport:
[legend]

Public Member Functions

 ImpSdrPdfImport (SdrModel &rModel, SdrLayerID nLay, const tools::Rectangle &rRect, Graphic const &rGraphic)
 
 ~ImpSdrPdfImport ()
 
int GetPageCount () const
 
size_t DoImport (SdrObjList &rDestList, size_t nInsPos, int nPageNumber, SvdProgressInfo *pProgrInfo=nullptr)
 

Private Member Functions

double correctVertOrigin (double offsetPts) const
 Correct the vertical coordinate to start at the top. More...
 
tools::Rectangle PointsToLogic (double left, double right, double top, double bottom) const
 Convert PDF points to logic (twips). More...
 
Point PointsToLogic (double x, double y) const
 
void checkClip ()
 
bool isClip () const
 
void ImportPdfObject (std::unique_ptr< vcl::pdf::PDFiumPageObject > const &pPageObject, std::unique_ptr< vcl::pdf::PDFiumTextPage > const &pTextPage, int nPageObjectIndex)
 
void ImportForm (std::unique_ptr< vcl::pdf::PDFiumPageObject > const &pPageObject, std::unique_ptr< vcl::pdf::PDFiumTextPage > const &pTextPage, int nPageObjectIndex)
 
void ImportImage (std::unique_ptr< vcl::pdf::PDFiumPageObject > const &pPageObject, int nPageObjectIndex)
 
void ImportPath (std::unique_ptr< vcl::pdf::PDFiumPageObject > const &pPageObject, int nPageObjectIndex)
 
void ImportText (std::unique_ptr< vcl::pdf::PDFiumPageObject > const &pPageObject, std::unique_ptr< vcl::pdf::PDFiumTextPage > const &pTextPage, int nPageObjectIndex)
 
void InsertTextObject (const Point &rPos, const Size &rSize, const OUString &rStr)
 
void SetupPageScale (const double dPageWidth, const double dPageHeight)
 
void SetAttributes (SdrObject *pObj, bool bForceTextAttr=false)
 
void InsertObj (SdrObject *pObj, bool bScale=true)
 
void MapScaling ()
 
bool CheckLastPolyLineAndFillMerge (const basegfx::B2DPolyPolygon &rPolyPolygon)
 
void DoObjects (SvdProgressInfo *pProgrInfo, sal_uInt32 *pActionsToReport, int nPageIndex)
 
 ImpSdrPdfImport (const ImpSdrPdfImport &)=delete
 
ImpSdrPdfImportoperator= (const ImpSdrPdfImport &)=delete
 

Private Attributes

std::vector< SdrObject * > maTmpList
 
ScopedVclPtr< VirtualDevicempVD
 
tools::Rectangle maScaleRect
 
size_t mnMapScalingOfs
 
std::unique_ptr< SfxItemSetmpLineAttr
 
std::unique_ptr< SfxItemSetmpFillAttr
 
std::unique_ptr< SfxItemSetmpTextAttr
 
SdrModelmpModel
 
SdrLayerID mnLayer
 
Color maOldLineColor
 
sal_Int32 mnLineWidth
 
XDash maDash
 
bool mbMov
 
bool mbSize
 
Point maOfs
 
double mfScaleX
 
double mfScaleY
 
Fraction maScaleX
 
Fraction maScaleY
 
bool mbFntDirty
 
bool mbLastObjWasPolyWithoutLine
 
bool mbNoLine
 
bool mbNoFill
 
basegfx::B2DPolyPolygon maClip
 
std::unique_ptr< vcl::pdf::PDFiumDocumentmpPdfDocument
 
int mnPageCount
 
double mdPageHeightPts
 
basegfx::B2DHomMatrix maCurrentMatrix
 The current transformation matrix, typically used with Form objects. More...
 
std::shared_ptr< vcl::pdf::PDFiummpPDFium
 

Static Private Attributes

static constexpr css::drawing::LineCap gaLineCap = css::drawing::LineCap_BUTT
 

Detailed Description

Definition at line 47 of file svdpdf.hxx.

Constructor & Destructor Documentation

ImpSdrPdfImport::ImpSdrPdfImport ( const ImpSdrPdfImport )
privatedelete
ImpSdrPdfImport::ImpSdrPdfImport ( SdrModel rModel,
SdrLayerID  nLay,
const tools::Rectangle rRect,
Graphic const &  rGraphic 
)
ImpSdrPdfImport::~ImpSdrPdfImport ( )
default

Member Function Documentation

void ImpSdrPdfImport::checkClip ( )
private
bool ImpSdrPdfImport::CheckLastPolyLineAndFillMerge ( const basegfx::B2DPolyPolygon rPolyPolygon)
private
double ImpSdrPdfImport::correctVertOrigin ( double  offsetPts) const
inlineprivate

Correct the vertical coordinate to start at the top.

PDF coordinate system has origin at the bottom right.

Definition at line 89 of file svdpdf.hxx.

Referenced by PointsToLogic().

size_t ImpSdrPdfImport::DoImport ( SdrObjList rDestList,
size_t  nInsPos,
int  nPageNumber,
SvdProgressInfo pProgrInfo = nullptr 
)
void ImpSdrPdfImport::DoObjects ( SvdProgressInfo pProgrInfo,
sal_uInt32 *  pActionsToReport,
int  nPageIndex 
)
private
int ImpSdrPdfImport::GetPageCount ( ) const
inline

Definition at line 135 of file svdpdf.hxx.

References mnPageCount.

void ImpSdrPdfImport::ImportForm ( std::unique_ptr< vcl::pdf::PDFiumPageObject > const &  pPageObject,
std::unique_ptr< vcl::pdf::PDFiumTextPage > const &  pTextPage,
int  nPageObjectIndex 
)
private

Definition at line 689 of file svdpdf.cxx.

References ImportPdfObject(), maCurrentMatrix, nCount, and nIndex.

Referenced by ImportPdfObject().

void ImpSdrPdfImport::ImportImage ( std::unique_ptr< vcl::pdf::PDFiumPageObject > const &  pPageObject,
int  nPageObjectIndex 
)
private
void ImpSdrPdfImport::ImportPath ( std::unique_ptr< vcl::pdf::PDFiumPageObject > const &  pPageObject,
int  nPageObjectIndex 
)
private
void ImpSdrPdfImport::ImportPdfObject ( std::unique_ptr< vcl::pdf::PDFiumPageObject > const &  pPageObject,
std::unique_ptr< vcl::pdf::PDFiumTextPage > const &  pTextPage,
int  nPageObjectIndex 
)
private
void ImpSdrPdfImport::ImportText ( std::unique_ptr< vcl::pdf::PDFiumPageObject > const &  pPageObject,
std::unique_ptr< vcl::pdf::PDFiumTextPage > const &  pTextPage,
int  nPageObjectIndex 
)
private
void ImpSdrPdfImport::InsertObj ( SdrObject pObj,
bool  bScale = true 
)
private
void ImpSdrPdfImport::InsertTextObject ( const Point rPos,
const Size rSize,
const OUString &  rStr 
)
private
bool ImpSdrPdfImport::isClip ( ) const
private

Definition at line 656 of file svdpdf.cxx.

References basegfx::B2DPolyPolygon::getB2DRange(), basegfx::B2DRange::isEmpty(), and maClip.

Referenced by checkClip(), and InsertObj().

void ImpSdrPdfImport::MapScaling ( )
private

Definition at line 843 of file svdpdf.cxx.

References i, maTmpList, mnMapScalingOfs, mpVD, SdrObject::NbcMove(), nCount, and Point.

Referenced by DoImport().

ImpSdrPdfImport& ImpSdrPdfImport::operator= ( const ImpSdrPdfImport )
privatedelete
tools::Rectangle ImpSdrPdfImport::PointsToLogic ( double  left,
double  right,
double  top,
double  bottom 
) const
private

Convert PDF points to logic (twips).

Definition at line 1044 of file svdpdf.cxx.

References convertPointToMm100(), correctVertOrigin(), and Point.

Referenced by ImportImage(), ImportPath(), and ImportText().

Point ImpSdrPdfImport::PointsToLogic ( double  x,
double  y 
) const
private

Definition at line 1036 of file svdpdf.cxx.

References convertPointToMm100(), correctVertOrigin(), and Point.

void ImpSdrPdfImport::SetAttributes ( SdrObject pObj,
bool  bForceTextAttr = false 
)
private
void ImpSdrPdfImport::SetupPageScale ( const double  dPageWidth,
const double  dPageHeight 
)
private

Member Data Documentation

constexpr css::drawing::LineCap ImpSdrPdfImport::gaLineCap = css::drawing::LineCap_BUTT
staticprivate

Definition at line 60 of file svdpdf.hxx.

Referenced by SetAttributes().

basegfx::B2DPolyPolygon ImpSdrPdfImport::maClip
private

Definition at line 79 of file svdpdf.hxx.

Referenced by checkClip(), InsertObj(), and isClip().

basegfx::B2DHomMatrix ImpSdrPdfImport::maCurrentMatrix
private

The current transformation matrix, typically used with Form objects.

Definition at line 85 of file svdpdf.hxx.

Referenced by ImportForm(), ImportPath(), and ImportText().

XDash ImpSdrPdfImport::maDash
private

Definition at line 61 of file svdpdf.hxx.

Referenced by SetAttributes().

Point ImpSdrPdfImport::maOfs
private

Definition at line 65 of file svdpdf.hxx.

Referenced by checkClip(), ImportPath(), InsertObj(), InsertTextObject(), and SetupPageScale().

Color ImpSdrPdfImport::maOldLineColor
private

Definition at line 58 of file svdpdf.hxx.

Referenced by ImpSdrPdfImport(), and SetAttributes().

tools::Rectangle ImpSdrPdfImport::maScaleRect
private

Definition at line 51 of file svdpdf.hxx.

Referenced by InsertObj(), and SetupPageScale().

Fraction ImpSdrPdfImport::maScaleX
private

Definition at line 68 of file svdpdf.hxx.

Referenced by InsertObj(), and SetupPageScale().

Fraction ImpSdrPdfImport::maScaleY
private

Definition at line 69 of file svdpdf.hxx.

Referenced by InsertObj(), and SetupPageScale().

std::vector<SdrObject*> ImpSdrPdfImport::maTmpList
private

Definition at line 49 of file svdpdf.hxx.

Referenced by CheckLastPolyLineAndFillMerge(), DoImport(), InsertObj(), and MapScaling().

bool ImpSdrPdfImport::mbFntDirty
private

Definition at line 71 of file svdpdf.hxx.

Referenced by ImportText(), and SetAttributes().

bool ImpSdrPdfImport::mbLastObjWasPolyWithoutLine
private

Definition at line 74 of file svdpdf.hxx.

Referenced by CheckLastPolyLineAndFillMerge(), ImportPath(), and InsertObj().

bool ImpSdrPdfImport::mbMov
private

Definition at line 63 of file svdpdf.hxx.

Referenced by InsertObj(), and SetupPageScale().

bool ImpSdrPdfImport::mbNoFill
private

Definition at line 76 of file svdpdf.hxx.

Referenced by CheckLastPolyLineAndFillMerge(), and SetAttributes().

bool ImpSdrPdfImport::mbNoLine
private

Definition at line 75 of file svdpdf.hxx.

Referenced by CheckLastPolyLineAndFillMerge(), InsertObj(), and SetAttributes().

bool ImpSdrPdfImport::mbSize
private

Definition at line 64 of file svdpdf.hxx.

Referenced by InsertObj(), and SetupPageScale().

double ImpSdrPdfImport::mdPageHeightPts
private

Definition at line 83 of file svdpdf.hxx.

Referenced by SetupPageScale().

double ImpSdrPdfImport::mfScaleX
private

Definition at line 66 of file svdpdf.hxx.

Referenced by checkClip(), ImportPath(), InsertTextObject(), and SetupPageScale().

double ImpSdrPdfImport::mfScaleY
private

Definition at line 67 of file svdpdf.hxx.

Referenced by checkClip(), ImportPath(), InsertTextObject(), SetAttributes(), and SetupPageScale().

SdrLayerID ImpSdrPdfImport::mnLayer
private

Definition at line 57 of file svdpdf.hxx.

Referenced by InsertTextObject(), and SetAttributes().

sal_Int32 ImpSdrPdfImport::mnLineWidth
private

Definition at line 59 of file svdpdf.hxx.

Referenced by ImportPath(), and SetAttributes().

size_t ImpSdrPdfImport::mnMapScalingOfs
private

Definition at line 52 of file svdpdf.hxx.

Referenced by MapScaling().

int ImpSdrPdfImport::mnPageCount
private

Definition at line 82 of file svdpdf.hxx.

Referenced by GetPageCount(), and ImpSdrPdfImport().

std::unique_ptr<SfxItemSet> ImpSdrPdfImport::mpFillAttr
private

Definition at line 54 of file svdpdf.hxx.

Referenced by ImpSdrPdfImport(), InsertTextObject(), and SetAttributes().

std::unique_ptr<SfxItemSet> ImpSdrPdfImport::mpLineAttr
private

Definition at line 53 of file svdpdf.hxx.

Referenced by CheckLastPolyLineAndFillMerge(), ImpSdrPdfImport(), and SetAttributes().

SdrModel* ImpSdrPdfImport::mpModel
private

Definition at line 56 of file svdpdf.hxx.

Referenced by ImportImage(), ImportPath(), InsertObj(), and InsertTextObject().

std::unique_ptr<vcl::pdf::PDFiumDocument> ImpSdrPdfImport::mpPdfDocument
private

Definition at line 81 of file svdpdf.hxx.

Referenced by DoObjects(), and ImpSdrPdfImport().

std::shared_ptr<vcl::pdf::PDFium> ImpSdrPdfImport::mpPDFium
private

Definition at line 94 of file svdpdf.hxx.

Referenced by ImpSdrPdfImport().

std::unique_ptr<SfxItemSet> ImpSdrPdfImport::mpTextAttr
private

Definition at line 55 of file svdpdf.hxx.

Referenced by ImpSdrPdfImport(), and SetAttributes().

ScopedVclPtr<VirtualDevice> ImpSdrPdfImport::mpVD
private

The documentation for this class was generated from the following files: