lok: calc - send other views our selection in their co-ordinates.
[LibreOffice.git] / include / svx / svdomedia.hxx
blob8676d8d1c2b11b40c755f31710af1287975edc21
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_SVX_SVDOMEDIA_HXX
21 #define INCLUDED_SVX_SVDOMEDIA_HXX
23 #include <memory>
24 #include <svx/svdorect.hxx>
25 #include <avmedia/mediaitem.hxx>
26 #include <svx/svxdllapi.h>
28 class Graphic;
30 namespace sdr { namespace contact { class ViewContactOfSdrMediaObj; } }
31 namespace com::sun::star::graphic { class XGraphic; }
34 class SVX_DLLPUBLIC SdrMediaObj final : public SdrRectObj
36 friend class sdr::contact::ViewContactOfSdrMediaObj;
38 private:
39 // protected destructor - due to final, make private
40 virtual ~SdrMediaObj() override;
42 public:
43 SdrMediaObj(SdrModel& rSdrModel);
44 SdrMediaObj(
45 SdrModel& rSdrModel,
46 const tools::Rectangle& rRect);
48 virtual bool HasTextEdit() const override;
50 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
51 virtual sal_uInt16 GetObjIdentifier() const override;
53 virtual OUString TakeObjNameSingul() const override;
54 virtual OUString TakeObjNamePlural() const override;
56 virtual SdrMediaObj* CloneSdrObject(SdrModel& rTargetModel) const override;
57 SdrMediaObj& operator=(const SdrMediaObj& rObj);
59 virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override;
61 void setURL( const OUString& rURL, const OUString& rReferer, const OUString& rMimeType = OUString() );
62 const OUString& getURL() const;
64 void setMediaProperties( const ::avmedia::MediaItem& rState );
65 const ::avmedia::MediaItem& getMediaProperties() const;
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&);
73 virtual bool shouldKeepAspectRatio() const override { return true; }
75 private:
76 void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState );
77 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
79 struct Impl;
80 std::unique_ptr<Impl> m_xImpl;
83 #endif // INCLUDED_SVX_SVDOMEDIA_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */