nss: upgrade to release 3.73
[LibreOffice.git] / filter / source / graphic / GraphicExportFilter.hxx
blobd9d4c5a898ac3efdcc753879915f3959f13ff2b5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_FILTER_SOURCE_GRAPHIC_GRAPHICEXPORTFILTER_HXX
21 #define INCLUDED_FILTER_SOURCE_GRAPHIC_GRAPHICEXPORTFILTER_HXX
23 #include <com/sun/star/document/XFilter.hpp>
24 #include <com/sun/star/document/XExporter.hpp>
25 #include <com/sun/star/lang/XInitialization.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/io/XOutputStream.hpp>
28 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <cppuhelper/implbase.hxx>
32 namespace com::sun::star {
33 namespace drawing {
34 class XShapes;
35 class XShape;
39 class GraphicExportFilter :
40 public cppu::WeakImplHelper < css::document::XFilter, css::document::XExporter, css::lang::XInitialization, css::lang::XServiceInfo >
42 css::uno::Reference< css::uno::XComponentContext > mxContext;
43 css::uno::Reference< css::lang::XComponent > mxDocument;
44 css::uno::Reference< css::io::XOutputStream > mxOutputStream;
46 css::uno::Sequence< css::beans::PropertyValue > maFilterDataSequence;
48 OUString maFilterExtension;
49 sal_Int32 mnTargetWidth;
50 sal_Int32 mnTargetHeight;
51 bool mbSelectionOnly;
53 void gatherProperties( const css::uno::Sequence< css::beans::PropertyValue > & rDescriptor );
54 bool filterRenderDocument() const;
55 bool filterExportShape(
56 const css::uno::Sequence< css::beans::PropertyValue > & rDescriptor,
57 const css::uno::Reference< css::drawing::XShapes > & rxShapes,
58 const css::uno::Reference< css::drawing::XShape > & rxShape ) const;
60 public:
61 explicit GraphicExportFilter( const css::uno::Reference< css::uno::XComponentContext > & rxContext );
62 virtual ~GraphicExportFilter() override;
64 // XServiceInfo
65 virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
66 virtual OUString SAL_CALL getImplementationName() override;
67 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
69 // XFilter
70 virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue > & rDescriptor ) override;
71 virtual void SAL_CALL cancel( ) override;
73 // XExporter
74 virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent > & xDocument ) override;
76 // XInitialization
77 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any > & rArguments ) override;
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */