20#include <config_features.h>
34#include <com/sun/star/frame/XDispatchProvider.hpp>
35#include <com/sun/star/media/XPlayer.hpp>
40using namespace ::
sfx2;
46#if !HAVE_FEATURE_AVMEDIA
56 const bool bSizeUnknown = !pSizeItem;
64 bAPI = !
aURL.isEmpty();
68 bool bLink(pLinkItem ? pLinkItem->GetValue() :
true);
75 aPrefSize = pSizeItem->
GetSize();
80 css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(
GetView().GetViewFrame().
GetFrame().GetFrameInterface(), css::uno::UNO_QUERY);
83 [xDispatchProvider,
aURL, bLink](
const css::uno::Reference<css::media::XPlayer>& rPlayer){
84 css::awt::Size aSize = rPlayer->getPreferredPlayerWindowSize();
124 aSize =
Size( 2835, 2835 );
133 uno::Reference<frame::XModel>
const xModel(
135 bRet = ::avmedia::EmbedMedia(
xModel,
aURL, realURL);
136 if (!bRet) {
return bRet; }
143 pObj->setURL( realURL,
"" );
145 rSh.SwFEShell::InsertDrawObj( *pObj, aPos );
const OUString & GetValue() const
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
void setX(tools::Long nX)
void setY(tools::Long nY)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
css::uno::Reference< css::frame::XModel3 > GetModel() const
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
SfxViewFrame * GetFrame() const
vcl::Window & GetWindow() const
SfxViewFrame & GetViewFrame() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Size & GetSize() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
SwDocShell * GetDocShell()
Of course Writer needs its own rectangles.
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
bool InsertMediaDlg(SfxRequest const &)
const SwRect & VisArea() const
Used by the UI to modify the document model.
Point PixelToLogic(const Point &rDevicePt) const
weld::Window * GetFrameWeld() const
Reference< XModel > xModel