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);
62 const OUString& getURL() const;
63
65 const OUString& getTempURL() const;
66
67 void setMediaProperties( const ::avmedia::MediaItem& rState );
68 const ::avmedia::MediaItem& getMediaProperties() const;
69
70 css::uno::Reference< css::graphic::XGraphic > const &
71 getSnapshot() const;
72 css::uno::Reference< css::io::XInputStream>
73 GetInputStream() const;
74 void SetInputStream(css::uno::Reference<css::io::XInputStream> const&);
75
76 virtual bool shouldKeepAspectRatio() const override { return true; }
77
78private:
79 void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState );
80 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
81
82 struct Impl;
83 std::unique_ptr<Impl> m_xImpl;
84};
85
86/* 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:76
std::unique_ptr< Impl > m_xImpl
Definition: svdomedia.hxx:82
Provides information about various ZObject properties.
Definition: svdobj.hxx:196
virtual void AdjustToMaxRect(const tools::Rectangle &rMaxRect, bool bShrinkOnly=false)
Definition: svdobj.cxx:1682
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