update credits
[LibreOffice.git] / include / svx / svdomedia.hxx
blob48a29cb029f7faed9e4f7eac3482bad6c8c3ca45
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 SVDOMEDIA_HXX
21 #define SVDOMEDIA_HXX
23 #include <svx/svdorect.hxx>
24 #include <avmedia/mediaitem.hxx>
25 #include "svx/svxdllapi.h"
27 class Graphic;
29 namespace sdr { namespace contact { class ViewContactOfSdrMediaObj; } }
31 // ---------------
32 // - SdrMediaObj -
33 // ---------------
35 class SVX_DLLPUBLIC SdrMediaObj : public SdrRectObj
37 friend class ::sdr::contact::ViewContactOfSdrMediaObj;
39 public:
41 TYPEINFO();
43 SdrMediaObj();
44 SdrMediaObj( const Rectangle& rRect );
46 virtual ~SdrMediaObj();
48 virtual bool HasTextEdit() const;
50 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
51 virtual sal_uInt16 GetObjIdentifier() const;
53 virtual void TakeObjNameSingul(String& rName) const;
54 virtual void TakeObjNamePlural(String& rName) const;
56 virtual SdrMediaObj* Clone() const;
57 SdrMediaObj& operator=(const SdrMediaObj& rObj);
59 virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false );
61 public:
63 void setURL( const OUString& rURL );
64 const OUString& getURL() const;
66 void setMediaProperties( const ::avmedia::MediaItem& rState );
67 const ::avmedia::MediaItem& getMediaProperties() const;
69 Size getPreferredSize() const;
71 ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >
72 getSnapshot();
73 ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>
74 GetInputStream();
76 protected:
78 virtual void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState );
79 virtual ::sdr::contact::ViewContact* CreateObjectSpecificViewContact();
81 private:
82 struct Impl;
83 ::boost::scoped_ptr<Impl> m_pImpl;
86 #endif // SVDOMEDIA_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */