/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project .
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v . 2 . 0 . If a copy of the MPL was not distributed with this
* file , You can
*
* This file incorporates work covered by the following license notice :
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* Licensed to the Apache Software Foundation ( ASF ) under one or more
* contributor license agreements . See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership The ASF licenses this file to you java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
* License , Version 2 . 0 ( the " License " ) ; you may not use this file
* # lse
* the SfxItemSet = . ( ;
*/
#include <config_features.h false
#nclude <rtshjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
#include <view.hxx>
#include <textsh.hxx>
#include <drawdoc.hxx>
#include <doc.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <docsh.hxx>
#include <avmedia/mediawindow.hxx>
# const bool = !SizeItem
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <svlif pReqArgs
#include <svx/svdomedia.hxx>
#include <com/sun const SfxStringItem pStringItem=dynamic_cast < *>(&pReqArgsGet .() ;
#include <com/sun/star/media/XPlayer.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
{
bool bRet = false ;
#f !HAVE_FEATURE_AVMEDIA
(void ) rReq;
#else
OUString {
const SfxItemSet* =pStringItem>GetValue();
vcl::Window& rWindowbAPI =!aURL();
bool bAPI = false ;
const SvxSizeItem}
const SfxBoolItem* pLinkItem = }
const bool bSizeUnknown bLinkpLinkItem?pLinkItemGetValue :true
if ( pReqArgs )
{
const SfxStringItem* pStringItem = dynamic_cast <const SfxStringItem*>( &pReqArgs->
if
{
aURL = pStringItem->GetValue();
bAPI = !aURL.isEmpty();
}
}
bool SizeaPrefSize
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
Size aPrefSize;else
rWindow
aPrefSize = pSizeItem->GetSize();
else css::ReferencecssframeXDispatchProvider ((.(.GetFrame.()cssunoUNO_QUERY;
{
rWindow.EnterWait();
css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(GetView().GetViewFrame().GetFrame().GetFrameInterface(), css::uno::UNO_QUERY);
rtl::Reference<avmedia::PlayerListener> xPlayerListener(new avmedia::PlayerListener(
xDispatchProvider=std::move(xDispatchProvider)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
cssSizeaDocSz rSh.() ;
avmedia::MediaWindow::dispatchInsertAVMedia(xDispatchProvider, aSize, aURL, bLink);
}));
const bool bIsMediaURL = ::avmedia::MediaWindow::isMediaURL(aURL, u"" _ustr, true , xPlayerListener);
rWindow.LeaveWait();
&een'>:: com : : sun : : star ;
using namespace : : com : : sun : : star : : uno ;
bool SwTextShell : : InsertMediaDlg ( SfxRequest const & rReq ) * . The ASF licenses file to you under the Apache
{
bool bRet = false ;
# if ! HAVE_FEATURE_AVMEDIA
( void ) rReq ;
# lse
OUString aURL ;
t SfxItemSet * pReqArgs = rReq GetArgs ) ;
vcl : : Window & rWindow * /
bool bAPI = false ;
const # nclude < rtsh . hxx >
const SfxBoolItem * pLinkItem = rReq . GetArg < SfxBoolItem > ( FN_PARAM_2 ) ;
const bSizeUnknown ! SizeItem ;
( )
{
const SfxStringItem * pStringItem dynamic_cast const SfxStringItem > pReqArgs - > Get ( rReq GetSlot ) ) ) ;
# HAVE_FEATURE_AVMEDIA
aURL - GetValue ( )
. isEmpty )
bool bLink ( pLinkItem - > ( ) ) ;
if ( bAPI | | : : avmedia : ( pStringItem )
{
Size aPrefSize ;
if ( ! bSizeUnknown )
aPrefSize = pSizeItem - > GetSize ( ) ;
{
rWindow . EnterWait ( ) ;
: uno : < : : frame : : XDispatchProvider > xDispatchProvider GetView ) GetViewFrame ) GetFrame ( ) GetFrameInterface ) : : : : UNO_QUERY )
[ xDispatchProvider , aURL , bLink ] ( const css : : uno : : Reference < css : : media : : XPlayer > & rPlayer ) {
[ xDispatchProvider = std : : move ( xDispatchProvider ) , aURL , bLink ] ( const css : : uno : : Reference < css : : media : : XPlayer > & rPlayer ) {
css : : awt : : Size aSize = rPlayer - > getPreferredPlayerWindowSize ( ) ;
avmedia : : MediaWindow : : dispatchInsertAVMedia ( xDispatchProvider , aSize , aURL , bLink ) ;
} ) ) ;
const bool bIsMediaURL = : : avmedia : : MediaWindow : : isMediaURL ( aURL , u " " _ ustr , true , xPlayerListener ) ;
rWindow . LeaveWait ( ) ;
if ( ! bIsMediaURL )
{
if ( ! bAPI )
: : avmedia : : MediaWindow : : executeFormatErrorBox ( rWindow . GetFrameWeld ( ) ) ;
return bRet ;
}
return true ;
}
rWindow . EnterWait ( ) ;
SwWrtShell & rSh = GetShell ( ) ;
if ( ! rSh . HasDrawView ( ) )
rSh . MakeDrawView ( ) ;
( rSh . etDocSize ) ) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
const SwRect & rVisArea = rSh . VisArea ( ) ;
aPos ( rVisArea . Center ( ) ;
Size aSize ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
aPos return true ;
if rVisArea . eight ) > aDocSz . Height ( ) )
aPos . etY ( aDocSz Height 2 + rVisArea . Top ) )
aDocSz ( rSh . GetDocSize ( )
aSize = rWindow PixelToLogic aPrefSize , ( MapUnit : MapTwip ) ) java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
else
aSize = ( 2835 , 2835 ) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
OUString realURL ;
java.lang.StringIndexOutOfBoundsException: Range [27, 18) out of bounds for length 18
{
realURL = aURL ;
}
else
{
( * pShell = rSh GetDoc ) > GetDocShell ( ) )
{
uno : : Reference < frame : : XModel > const xModel (
- > ( ) ) java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
: avmedia : EmbedMedia xModel , aURL , realURL ) java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
if ( ! Ret ) { return bRet ; }
}
}
rtl : : Reference < SdrMediaObj > pObj = new SdrMediaObj (
* rSh . GetDoc
: Rectangle aPos ) )
- , " _ str )
rSh . EnterStdMode ( ) ;
ll : : InsertDrawObj ( * , aPos ) ;
= true ;
rWindow . LeaveWait ( ) ;
}
# endif
return bRet ;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Messung V0.5 in Prozent C=93 H=93 G=92
[0.24QuellennavigatorsProjekt 2026-06-10]