LibreOffice Module svx (master) 1
svdomedia.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 <memory>
23#include <svx/svdorect.hxx>
24#include <avmedia/mediaitem.hxx>
25#include <svx/svxdllapi.h>
26
27class Graphic;
28
29namespace sdr::contact { class ViewContactOfSdrMediaObj; }
30namespace com::sun::star::graphic { class XGraphic; }
31
32
34{
36
37private:
38 // protected destructor - due to final, make private
39 virtual ~SdrMediaObj() override;
40
41public:
42 SdrMediaObj(SdrModel& rSdrModel);
43 // Copy constructor
44 SdrMediaObj(SdrModel& rSdrModel, SdrMediaObj const & rSource);
46 SdrModel& rSdrModel,
47 const tools::Rectangle& rRect);
48
49 virtual bool HasTextEdit() const override;
50
51 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
52 virtual SdrObjKind GetObjIdentifier() const override;
53
54 virtual OUString TakeObjNameSingul() const override;
55 virtual OUString TakeObjNamePlural() const override;
56
57 virtual rtl::Reference<SdrObject> CloneSdrObject(SdrModel& rTargetModel) const override;
58
59 virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override;
60
61 void setURL( const OUString& rURL, const OUString& rReferer, const OUString& rMimeType = OUString() );
62 const OUString& getURL() const;
63
64 void setMediaProperties( const ::avmedia::MediaItem& rState );
65 const ::avmedia::MediaItem& getMediaProperties() const;
66
67 css::uno::Reference< css::graphic::XGraphic > const &
68 getSnapshot() const;
69 css::uno::Reference< css::io::XInputStream>
70 GetInputStream() const;
71 void SetInputStream(css::uno::Reference<css::io::XInputStream> const&);
72
73 virtual bool shouldKeepAspectRatio() const override { return true; }
74
75private:
76 void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState );
77 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
78
79 struct Impl;
80 std::unique_ptr<Impl> m_xImpl;
81};
82
83/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool shouldKeepAspectRatio() const override
Whether the aspect ratio should be kept by default when resizing.
Definition: svdomedia.hxx:73
std::unique_ptr< Impl > m_xImpl
Definition: svdomedia.hxx:79
Provides information about various ZObject properties.
Definition: svdobj.hxx:193
virtual void AdjustToMaxRect(const tools::Rectangle &rMaxRect, bool bShrinkOnly=false)
Definition: svdobj.cxx:1680
Rectangle objects (rectangle, circle, ...)
Definition: svdorect.hxx:39
virtual SdrObjKind GetObjIdentifier() const override
Definition: svdorect.cxx:171
virtual OUString TakeObjNamePlural() const override
Definition: svdorect.cxx:226
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
Definition: svdorect.cxx:247
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
Definition: svdorect.cxx:145
virtual OUString TakeObjNameSingul() const override
Definition: svdorect.cxx:200
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
Definition: svdorect.cxx:47
virtual bool HasTextEdit() const override
Definition: svdotxed.cxx:34
void mediaPropertiesChanged(const ::avmedia::MediaItem &rNewState)
SdrObjKind
Definition: svdobjkind.hxx:25
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35