Bump version to 6.4-15
[LibreOffice.git] / filter / source / graphic / GraphicExportFilter.hxx
blob17c18af332f2a8c71a741d97829825dab62cd6ad
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/io/XOutputStream.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <cppuhelper/implbase.hxx>
31 namespace com { namespace sun { namespace star {
32 namespace drawing {
33 class XShapes;
34 class XShape;
36 }}}
38 class GraphicExportFilter :
39 public cppu::WeakImplHelper < css::document::XFilter, css::document::XExporter, css::lang::XInitialization >
41 css::uno::Reference< css::uno::XComponentContext > mxContext;
42 css::uno::Reference< css::lang::XComponent > mxDocument;
43 css::uno::Reference< css::io::XOutputStream > mxOutputStream;
45 css::uno::Sequence< css::beans::PropertyValue > maFilterDataSequence;
47 OUString maFilterExtension;
48 sal_Int32 mnTargetWidth;
49 sal_Int32 mnTargetHeight;
50 bool mbSelectionOnly;
52 void gatherProperties( const css::uno::Sequence< css::beans::PropertyValue > & rDescriptor );
53 bool filterRenderDocument() const;
54 bool filterExportShape(
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;
59 public:
60 explicit GraphicExportFilter( const css::uno::Reference< css::uno::XComponentContext > & rxContext );
61 virtual ~GraphicExportFilter() override;
63 // XFilter
64 virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue > & rDescriptor ) override;
65 virtual void SAL_CALL cancel( ) override;
67 // XExporter
68 virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent > & xDocument ) override;
70 // XInitialization
71 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any > & rArguments ) override;
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */