20 #ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_PDFIHELPER_HXX
21 #define INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_PDFIHELPER_HXX
25 #include <rtl/ustring.hxx>
30 #include <com/sun/star/rendering/PathCapType.hpp>
31 #include <com/sun/star/rendering/PathJoinType.hpp>
33 #include <unordered_map>
35 #include <boost/functional/hash.hpp>
38 #define PDFI_OUTDEV_RESOLUTION 7200
69 return rtl_math_round(
convPx2mm( fPix ), 2, rtl_math_RoundingMode_Floor );
77 void FillDashStyleProps(PropertyMap& props,
const std::vector<double>& dashArray,
double scale);
84 boost::hash_combine(seed, rFont.
familyName.hashCode());
85 boost::hash_combine(seed, rFont.
isBold);
86 boost::hash_combine(seed, rFont.
isItalic);
88 boost::hash_combine(seed, rFont.
isOutline);
89 boost::hash_combine(seed, rFont.
size);
128 return LineColor.Red == rRight.
LineColor.Red &&
129 LineColor.Green == rRight.
LineColor.Green &&
130 LineColor.Blue == rRight.
LineColor.Blue &&
131 LineColor.Alpha == rRight.
LineColor.Alpha &&
133 FillColor.Green == rRight.
FillColor.Green &&
134 FillColor.Blue == rRight.
FillColor.Blue &&
135 FillColor.Alpha == rRight.
FillColor.Alpha &&
143 FontId == rRight.
FontId &&
154 case css::rendering::PathJoinType::MITER:
156 case css::rendering::PathJoinType::ROUND:
158 case css::rendering::PathJoinType::BEVEL:
168 case css::rendering::PathCapType::BUTT:
170 case css::rendering::PathCapType::ROUND:
172 case css::rendering::PathCapType::SQUARE:
178 {
return Transformation.
get( 0, 1 ) != 0.0 ||
179 Transformation.
get( 1, 0 ) != 0.0; }
186 std::size_t seed = 0;
187 boost::hash_combine(seed, rGC.
LineColor.Red);
188 boost::hash_combine(seed, rGC.
LineColor.Green);
189 boost::hash_combine(seed, rGC.
LineColor.Blue);
190 boost::hash_combine(seed, rGC.
LineColor.Alpha);
191 boost::hash_combine(seed, rGC.
FillColor.Red);
192 boost::hash_combine(seed, rGC.
FillColor.Green);
193 boost::hash_combine(seed, rGC.
FillColor.Blue);
194 boost::hash_combine(seed, rGC.
FillColor.Alpha);
195 boost::hash_combine(seed, rGC.
LineJoin);
196 boost::hash_combine(seed, rGC.
LineCap);
197 boost::hash_combine(seed, rGC.
BlendMode);
198 boost::hash_combine(seed, rGC.
LineWidth);
199 boost::hash_combine(seed, rGC.
Flatness);
201 boost::hash_combine(seed, rGC.
DashArray.size());
202 boost::hash_combine(seed, rGC.
FontId);
218 css::task::XInteractionHandler >& xHandler,
221 const OUString& rDocName
226 css::task::XInteractionHandler >
const & handler);
css::rendering::ARGBColor LineColor
std::unordered_map< OUString, OUString > PropertyMap
void reportUnsupportedEncryptionFormat(css::uno::Reference< css::task::XInteractionHandler > const &handler)
size_t operator()(const GraphicsContext &rGC) const
bool isRotatedOrSkewed() const
OUString unitMMString(double fMM)
OUString getPercentString(double value)
#define PDFI_OUTDEV_RESOLUTION
double convmm2Px(double fMM)
OUString convertPixelToUnitString(double fPix)
double get(sal_uInt16 nRow, sal_uInt16 nColumn) const
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
basegfx::B2DPolyPolygon Clip
css::rendering::ARGBColor FillColor
double convPx2mm(double fPix)
std::vector< double > DashArray
PolygonAction
What to do with a polygon. values can be ORed together.
OUString GetLineJoinString() const
double GetAverageTransformationScale(const basegfx::B2DHomMatrix &matrix)
basegfx::B2DHomMatrix Transformation
OUString getColorString(const css::rendering::ARGBColor &)
Convert color to "#FEFEFE" color notation.
size_t operator()(const FontAttributes &rFont) const
bool getPassword(const css::uno::Reference< css::task::XInteractionHandler > &xHandler, OUString &rOutPwd, bool bFirstTry, const OUString &rDocName)
retrieve password from user
void FillDashStyleProps(PropertyMap &props, const std::vector< double > &dashArray, double scale)
double convPx2mmPrec2(double fPix)
bool operator==(const GraphicsContext &rRight) const
OUString GetLineCapString() const