1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 <svx/svdorect.hxx>
24 #include <avmedia/mediaitem.hxx>
25 #include <svx/svxdllapi.h>
29 namespace sdr
{ namespace contact
{ class ViewContactOfSdrMediaObj
; } }
35 class SVX_DLLPUBLIC SdrMediaObj
: public SdrRectObj
37 friend class sdr::contact::ViewContactOfSdrMediaObj
;
44 SdrMediaObj( const Rectangle
& rRect
);
46 virtual ~SdrMediaObj();
48 virtual bool HasTextEdit() const SAL_OVERRIDE
;
50 virtual void TakeObjInfo(SdrObjTransformInfoRec
& rInfo
) const SAL_OVERRIDE
;
51 virtual sal_uInt16
GetObjIdentifier() const SAL_OVERRIDE
;
53 virtual OUString
TakeObjNameSingul() const SAL_OVERRIDE
;
54 virtual OUString
TakeObjNamePlural() const SAL_OVERRIDE
;
56 virtual SdrMediaObj
* Clone() const SAL_OVERRIDE
;
57 SdrMediaObj
& operator=(const SdrMediaObj
& rObj
);
59 virtual void AdjustToMaxRect( const Rectangle
& rMaxRect
, bool bShrinkOnly
= false ) SAL_OVERRIDE
;
63 void setURL( const OUString
& rURL
, const OUString
& rReferer
, const OUString
& rMimeType
= OUString() );
64 const OUString
& getURL() const;
66 void setMediaProperties( const ::avmedia::MediaItem
& rState
);
67 const ::avmedia::MediaItem
& getMediaProperties() const;
69 Size
getPreferredSize() const;
71 const ::com::sun::star::uno::Reference
< ::com::sun::star::graphic::XGraphic
>
73 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStream
>
75 void SetInputStream(css::uno::Reference
<css::io::XInputStream
> const&);
79 void mediaPropertiesChanged( const ::avmedia::MediaItem
& rNewState
);
80 virtual sdr::contact::ViewContact
* CreateObjectSpecificViewContact() SAL_OVERRIDE
;
84 std::unique_ptr
<Impl
> m_xImpl
;
87 #endif // INCLUDED_SVX_SVDOMEDIA_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */