LibreOffice Module filter (master) 1
GraphicExportFilter.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <com/sun/star/document/XFilter.hpp>
23#include <com/sun/star/document/XExporter.hpp>
24#include <com/sun/star/lang/XInitialization.hpp>
25#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/io/XOutputStream.hpp>
27#include <com/sun/star/uno/XComponentContext.hpp>
28
30
31namespace com::sun::star {
32 namespace drawing {
33 class XShapes;
34 class XShape;
35 }
36}
37
39 public cppu::WeakImplHelper < css::document::XFilter, css::document::XExporter, css::lang::XInitialization, css::lang::XServiceInfo >
40{
41 css::uno::Reference< css::uno::XComponentContext > mxContext;
42 css::uno::Reference< css::lang::XComponent > mxDocument;
43 css::uno::Reference< css::io::XOutputStream > mxOutputStream;
44
45 css::uno::Sequence< css::beans::PropertyValue > maFilterDataSequence;
46
48 sal_Int32 mnTargetWidth;
49 sal_Int32 mnTargetHeight;
51
52 void gatherProperties( const css::uno::Sequence< css::beans::PropertyValue > & rDescriptor );
53 bool filterRenderDocument() const;
55 const css::uno::Sequence< css::beans::PropertyValue > & rDescriptor,
56 const css::uno::Reference< css::drawing::XShapes > & rxShapes,
57 const css::uno::Reference< css::drawing::XShape > & rxShape ) const;
58
59public:
60 explicit GraphicExportFilter( css::uno::Reference< css::uno::XComponentContext > xContext );
61 virtual ~GraphicExportFilter() override;
62
63 // XServiceInfo
64 virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
65 virtual OUString SAL_CALL getImplementationName() override;
66 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
67
68 // XFilter
69 virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue > & rDescriptor ) override;
70 virtual void SAL_CALL cancel( ) override;
71
72 // XExporter
73 virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent > & xDocument ) override;
74
75 // XInitialization
76 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any > & rArguments ) override;
77};
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Sequence< css::beans::PropertyValue > maFilterDataSequence
virtual void SAL_CALL cancel() override
virtual ~GraphicExportFilter() override
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArguments) override
bool filterExportShape(const css::uno::Sequence< css::beans::PropertyValue > &rDescriptor, const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::uno::Reference< css::drawing::XShape > &rxShape) const
virtual sal_Bool SAL_CALL filter(const css::uno::Sequence< css::beans::PropertyValue > &rDescriptor) override
virtual OUString SAL_CALL getImplementationName() override
void gatherProperties(const css::uno::Sequence< css::beans::PropertyValue > &rDescriptor)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL setSourceDocument(const css::uno::Reference< css::lang::XComponent > &xDocument) override
css::uno::Reference< css::io::XOutputStream > mxOutputStream
css::uno::Reference< css::lang::XComponent > mxDocument
GraphicExportFilter(css::uno::Reference< css::uno::XComponentContext > xContext)
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Shape IDs per cluster in DGG atom.
unsigned char sal_Bool