25#include <com/sun/star/graphic/XPdfDecomposer.hpp>
26#include <com/sun/star/lang/XServiceInfo.hpp>
27#include <com/sun/star/uno/XComponentContext.hpp>
28#include <com/sun/star/util/XBinaryDataContainer.hpp>
39 explicit XPdfDecomposer(uno::Reference<uno::XComponentContext>
const& context);
40 XPdfDecomposer(
const XPdfDecomposer&) =
delete;
41 XPdfDecomposer&
operator=(
const XPdfDecomposer&) =
delete;
44 uno::Sequence<uno::Reference<graphic::XPrimitive2D>> SAL_CALL
45 getDecomposition(
const uno::Reference<util::XBinaryDataContainer>& xDataContainer,
46 const uno::Sequence<beans::PropertyValue>& xDecompositionParameters)
override;
54XPdfDecomposer::XPdfDecomposer(uno::Reference<uno::XComponentContext>
const&) {}
56uno::Sequence<uno::Reference<graphic::XPrimitive2D>> SAL_CALL
57XPdfDecomposer::getDecomposition(
const uno::Reference<util::XBinaryDataContainer>& xDataContainer,
58 const uno::Sequence<beans::PropertyValue>& xParameters)
60 sal_Int32 nPageIndex = -1;
62 for (
const beans::PropertyValue& rProperty : xParameters)
64 if (rProperty.Name ==
"PageIndex")
66 rProperty.Value >>= nPageIndex;
76 std::vector<BitmapEx> aBitmaps;
85 const Size aBitmapSize(aReplacement.GetSizePixel());
90 aMM100.getWidth(), aMM100.getHeight(), 0, 0));
99OUString SAL_CALL XPdfDecomposer::getImplementationName()
101 return "com.sun.star.comp.PDF.PDFDecomposer";
104sal_Bool SAL_CALL XPdfDecomposer::supportsService(
const OUString& rServiceName)
109uno::Sequence<OUString> SAL_CALL XPdfDecomposer::getSupportedServiceNames()
111 return {
"com.sun.star.graphic.PdfTools" };
115extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
117 css::uno::Sequence<css::uno::Any>
const&)
119 return cppu::acquire(
new XPdfDecomposer(context));
static OutputDevice * GetDefaultDevice()
const sal_uInt8 * getData() const
OWeakAggObject & operator=(const OWeakAggObject &rObj) SAL_DELETED_FUNCTION
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
size_t RenderPDFBitmaps(const void *pBuffer, int nSize, std::vector< BitmapEx > &rBitmaps, size_t nFirstPage=0, int nPages=1, const basegfx::B2DTuple *pSizeHint=nullptr)
BinaryDataContainer convertUnoBinaryDataContainer(const css::uno::Reference< css::util::XBinaryDataContainer > &rxBinaryDataContainer)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * filter_PdfDecomposer_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)