LibreOffice Module svx (master)  1
xoutbmp.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 #ifndef INCLUDED_SVX_XOUTBMP_HXX
21 #define INCLUDED_SVX_XOUTBMP_HXX
22 
23 #include <vcl/graph.hxx>
24 #include <vcl/errcode.hxx>
25 #include <com/sun/star/uno/Sequence.h>
26 #include <com/sun/star/beans/PropertyValue.hpp>
27 #include <svx/svxdllapi.h>
28 #include <o3tl/typed_flags_set.hxx>
29 #include <vcl/salctype.hxx>
30 
31 
32 enum class XOutFlags {
33  NONE = 0x00000000,
34  MirrorHorz = 0x00000001,
35  MirrorVert = 0x00000010,
36  DontAddExtension = 0x00000008,
37  DontExpandFilename = 0x00010000,
38  UseGifIfPossible = 0x00020000,
39  UseGifIfSensible = 0x00040000,
40  UseNativeIfPossible = 0x00080000,
41 };
42 namespace o3tl {
43  template<> struct typed_flags<XOutFlags> : is_typed_flags<XOutFlags, 0x000f0019> {};
44 }
45 
46 class GraphicFilter;
47 class VirtualDevice;
48 class INetURLObject;
49 namespace tools {
50  class Polygon;
51 }
52 
54 {
55 public:
56 
58 
59  static Graphic MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags nMirrorFlags );
60  static Animation MirrorAnimation( const Animation& rAnimation, bool bHMirr, bool bVMirr );
61  static ErrCode WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
62  const OUString& rFilterName, const XOutFlags nFlags,
63  const Size* pMtfSize_100TH_MM = nullptr,
64  const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr);
65  static bool GraphicToBase64(const Graphic& rGraphic, OUString& rOUString,
66  bool bAddPrefix = true,
67  ConvertDataFormat aTargetFormat = ConvertDataFormat::Unknown);
68 
69  static ErrCode ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL,
70  GraphicFilter& rFilter, const sal_uInt16 nFormat,
71  const css::uno::Sequence< css::beans::PropertyValue >* pFilterData );
72 };
73 
74 #endif // INCLUDED_SVX_XOUTBMP_HXX
75 
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ConvertDataFormat
void WriteGraphic(SvStream &rOStream, const Graphic &rGraphic)
BmpMirrorFlags
XOutFlags
Definition: xoutbmp.hxx:32
static GraphicFilter * pGrfFilter
Definition: xoutbmp.hxx:57
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35