LibreOffice Module sc (master)  1
fuins1.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #include <config_features.h>
21 
22 #include <officecfg/Office/Common.hxx>
23 #include <editeng/sizeitem.hxx>
24 #include <sal/log.hxx>
25 #include <sfx2/opengrf.hxx>
26 #include <sfx2/viewfrm.hxx>
27 #include <svx/svdograf.hxx>
28 #include <svx/svdomedia.hxx>
29 #include <svx/svdpage.hxx>
30 #include <svx/svdpagv.hxx>
31 #include <svx/svdview.hxx>
32 #include <svx/linkwarn.hxx>
33 #include <svx/svxids.hrc>
34 #include <vcl/graphicfilter.hxx>
35 #include <svl/stritem.hxx>
36 #include <avmedia/mediawindow.hxx>
37 #include <vcl/svapp.hxx>
38 #include <vcl/weld.hxx>
41 #include <fuinsert.hxx>
42 #include <tabvwsh.hxx>
43 #include <drwlayer.hxx>
44 #include <drawview.hxx>
45 #include <document.hxx>
46 #include <scresid.hxx>
47 #include <strings.hrc>
48 #include <globstr.hrc>
49 #include <comphelper/lok.hxx>
50 
51 #include <com/sun/star/frame/XDispatchProvider.hpp>
52 #include <com/sun/star/media/XPlayer.hpp>
53 #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
54 #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
55 #include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
56 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
57 #include <com/sun/star/uno/Sequence.hxx>
58 
59 using namespace css;
60 using namespace css::uno;
61 
62 void ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage )
63 {
64  if ( !rPage.Width() || !rPage.Height() )
65  return;
66 
67  Size aPageSize = rPage;
68  bool bNegative = aPageSize.Width() < 0;
69  if ( bNegative )
70  {
71  // make everything positive temporarily
72  aPageSize.setWidth( -aPageSize.Width() );
73  rPos.setX( -rPos.X() - rSize.Width() );
74  }
75 
76  if ( rSize.Width() > aPageSize.Width() || rSize.Height() > aPageSize.Height() )
77  {
78  double fX = aPageSize.Width() / static_cast<double>(rSize.Width());
79  double fY = aPageSize.Height() / static_cast<double>(rSize.Height());
80 
81  if ( fX < fY )
82  {
83  rSize.setWidth( aPageSize.Width() );
84  rSize.setHeight( static_cast<tools::Long>( rSize.Height() * fX ) );
85  }
86  else
87  {
88  rSize.setHeight( aPageSize.Height() );
89  rSize.setWidth( static_cast<tools::Long>( rSize.Width() * fY ) );
90  }
91 
92  if (!rSize.Width())
93  rSize.setWidth( 1 );
94  if (!rSize.Height())
95  rSize.setHeight( 1 );
96  }
97 
98  if ( rPos.X() + rSize.Width() > aPageSize.Width() )
99  rPos.setX( aPageSize.Width() - rSize.Width() );
100  if ( rPos.Y() + rSize.Height() > aPageSize.Height() )
101  rPos.setY( aPageSize.Height() - rSize.Height() );
102 
103  if ( bNegative )
104  rPos.setX( -rPos.X() - rSize.Width() ); // back to real position
105 }
106 
107 static void lcl_InsertGraphic( const Graphic& rGraphic,
108  const OUString& rFileName, bool bAsLink, bool bApi,
109  ScTabViewShell& rViewSh, const vcl::Window* pWindow, SdrView* pView,
110  ScAnchorType aAnchorType = SCA_CELL )
111 {
112  Graphic& rGraphic1 = const_cast<Graphic &>(rGraphic);
113  GraphicNativeMetadata aMetadata;
114  if ( aMetadata.read(rGraphic1) )
115  {
116  const Degree10 aRotation = aMetadata.getRotation();
117  if (aRotation)
118  {
119  GraphicNativeTransform aTransform( rGraphic1 );
120  aTransform.rotate( aRotation );
121  }
122  }
123  ScDrawView* pDrawView = rViewSh.GetScDrawView();
124 
125  // #i123922# check if an existing object is selected; if yes, evtl. replace
126  // the graphic for a SdrGraphObj (including link state updates) or adapt the fill
127  // style for other objects
128  if(pDrawView && 1 == pDrawView->GetMarkedObjectCount())
129  {
130  SdrObject* pPickObj = pDrawView->GetMarkedObjectByIndex(0);
131 
132  if(pPickObj)
133  {
134  //sal_Int8 nAction(DND_ACTION_MOVE);
135  //Point aPos;
136  const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
137 
138  SdrObject* pResult = pDrawView->ApplyGraphicToObject(
139  *pPickObj,
140  rGraphic1,
141  aBeginUndo,
142  bAsLink ? rFileName : OUString());
143 
144  if(pResult)
145  {
146  // we are done; mark the modified/new object
147  pDrawView->MarkObj(pResult, pDrawView->GetSdrPageView());
148  return;
149  }
150  }
151  }
152 
153  // set the size so the graphic has its original pixel size
154  // at 100% view scale (as in SetMarkedOriginalSize),
155  // instead of respecting the current view scale
156  MapMode aSourceMap = rGraphic.GetPrefMapMode();
157  MapMode aDestMap( MapUnit::Map100thMM );
158  if ( aSourceMap.GetMapUnit() == MapUnit::MapPixel && pDrawView )
159  {
160  Fraction aScaleX, aScaleY;
161  pDrawView->CalcNormScale( aScaleX, aScaleY );
162  aDestMap.SetScaleX(aScaleX);
163  aDestMap.SetScaleY(aScaleY);
164  }
165  Size aLogicSize = pWindow->LogicToLogic(
166  rGraphic.GetPrefSize(), &aSourceMap, &aDestMap );
167 
168  // Limit size
169 
170  SdrPageView* pPV = pView->GetSdrPageView();
171  SdrPage* pPage = pPV->GetPage();
172  Point aInsertPos = rViewSh.GetInsertPos();
173 
174  ScViewData& rData = rViewSh.GetViewData();
175  if ( rData.GetDocument().IsNegativePage( rData.GetTabNo() ) )
176  aInsertPos.AdjustX( -(aLogicSize.Width()) ); // move position to left edge
177 
178  ScLimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
179 
180  tools::Rectangle aRect ( aInsertPos, aLogicSize );
181 
182  SdrGrafObj* pObj = new SdrGrafObj(
183  pView->getSdrModelFromSdrView(), // TTTT pView should be reference
184  rGraphic1,
185  aRect);
186 
187  // calling SetGraphicLink here doesn't work
188  // Yes, due to the SdrObject had no SdrModel
189  // Path is no longer used as name for the graphics object
190 
191  ScDrawLayer* pLayer = static_cast<ScDrawLayer*>(pView->GetModel());
192  OUString aName = pLayer->GetNewGraphicName(); // "Graphics"
193  pObj->SetName(aName);
194 
195  if (aAnchorType == SCA_CELL || aAnchorType == SCA_CELL_RESIZE)
197  aAnchorType == SCA_CELL_RESIZE);
198 
199  // don't select if from (dispatch) API, to allow subsequent cell operations
200  SdrInsertFlags nInsOptions = (bApi && !comphelper::LibreOfficeKit::isActive()) ? SdrInsertFlags::DONTMARK : SdrInsertFlags::NONE;
201  bool bSuccess = pView->InsertObjectAtView( pObj, *pPV, nInsOptions );
202 
203  // SetGraphicLink has to be used after inserting the object,
204  // otherwise an empty graphic is swapped in and the contact stuff crashes.
205  // See #i37444#.
206  if (bSuccess && bAsLink)
207  pObj->SetGraphicLink( rFileName );
208 }
209 
210 static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi,
211  ScTabViewShell* pViewSh, const vcl::Window* pWindow, SdrView* pView,
212  const Size& rPrefSize, bool const bLink )
213 {
214  SdrPageView* pPV = pView->GetSdrPageView();
215  SdrPage* pPage = pPV->GetPage();
216  ScViewData& rData = pViewSh->GetViewData();
217  Point aInsertPos( pViewSh->GetInsertPos() );
218  Size aSize;
219 
220  if( rPrefSize.Width() && rPrefSize.Height() )
221  {
222  if( pWindow )
223  aSize = pWindow->PixelToLogic(rPrefSize, MapMode(MapUnit::Map100thMM));
224  else
225  aSize = Application::GetDefaultDevice()->PixelToLogic(rPrefSize, MapMode(MapUnit::Map100thMM));
226  }
227  else
228  aSize = Size( 5000, 5000 );
229 
230  ScLimitSizeOnDrawPage( aSize, aInsertPos, pPage->GetSize() );
231 
232  if( rData.GetDocument().IsNegativePage( rData.GetTabNo() ) )
233  aInsertPos.AdjustX( -(aSize.Width()) );
234 
235  OUString realURL;
236  if (bLink)
237  {
238  realURL = rMediaURL;
239  }
240  else
241  {
242  uno::Reference<frame::XModel> const xModel(
243  rData.GetDocument().GetDocumentShell()->GetModel());
244 #if HAVE_FEATURE_AVMEDIA
245  bool const bRet = ::avmedia::EmbedMedia(xModel, rMediaURL, realURL);
246  if (!bRet) { return; }
247 #else
248  return;
249 #endif
250  }
251 
252  SdrMediaObj* pObj = new SdrMediaObj(
253  *rData.GetDocument().GetDrawLayer(),
254  tools::Rectangle(aInsertPos, aSize));
255 
256  pObj->setURL( realURL, ""/*TODO?*/ );
257  pView->InsertObjectAtView( pObj, *pPV, bApi ? SdrInsertFlags::DONTMARK : SdrInsertFlags::NONE );
258 }
259 
261  vcl::Window* pWin,
262  ScDrawView* pViewP,
263  SdrModel* pDoc,
264  SfxRequest& rReq )
265  : FuPoor(rViewSh, pWin, pViewP, pDoc, rReq)
266 {
267  const SfxItemSet* pReqArgs = rReq.GetArgs();
268  const SfxStringItem* pGraphicItem;
269  if ( pReqArgs &&
270  (pGraphicItem = pReqArgs->GetItemIfSet( SID_INSERT_GRAPHIC, true )) )
271  {
272  OUString aFileName = pGraphicItem->GetValue();
273 
274  OUString aFilterName;
275  if ( const SfxStringItem* pFilterItem = pReqArgs->GetItemIfSet( FN_PARAM_FILTER ) )
276  aFilterName = pFilterItem->GetValue();
277 
278  bool bAsLink = false;
279  const SfxPoolItem* pItem;
280  if ( pReqArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SfxItemState::SET )
281  bAsLink = static_cast<const SfxBoolItem*>(pItem)->GetValue();
282 
283  Graphic aGraphic;
284  ErrCode nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, &GraphicFilter::GetGraphicFilter() );
285  if ( nError == ERRCODE_NONE )
286  {
287  lcl_InsertGraphic( aGraphic, aFileName, bAsLink, true, rViewSh, pWindow, pView );
288  }
289  }
290  else
291  {
292  SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin ? pWin->GetFrameWeld() : nullptr,
293  ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR);
294 
295  Reference<ui::dialogs::XFilePickerControlAccess> xCtrlAcc = aDlg.GetFilePickerControlAccess();
296  sal_Int16 nSelect = 0;
297  Sequence<OUString> aListBoxEntries {
298  ScResId(STR_ANCHOR_TO_CELL),
299  ScResId(STR_ANCHOR_TO_CELL_RESIZE),
300  ScResId(STR_ANCHOR_TO_PAGE)
301  };
302  try
303  {
304  Any aTemplates(&aListBoxEntries, cppu::UnoType<decltype(aListBoxEntries)>::get());
305 
306  xCtrlAcc->setValue(ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_IMAGE_ANCHOR,
307  ui::dialogs::ListboxControlActions::ADD_ITEMS, aTemplates);
308 
309  Any aSelectPos(&nSelect, cppu::UnoType<decltype(nSelect)>::get());
310  xCtrlAcc->setValue(ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_IMAGE_ANCHOR,
311  ui::dialogs::ListboxControlActions::SET_SELECT_ITEM, aSelectPos);
312  }
313  catch (const Exception&)
314  {
315  SAL_WARN("sc", "control access failed");
316  }
317 
318  if( aDlg.Execute() == ERRCODE_NONE )
319  {
320  Graphic aGraphic;
321  ErrCode nError = aDlg.GetGraphic(aGraphic);
322  if( nError == ERRCODE_NONE )
323  {
324  OUString aFileName = aDlg.GetPath();
325  const OUString& aFilterName = aDlg.GetDetectedFilter();
326  bool bAsLink = aDlg.IsAsLink();
327 
328  // really store as link only?
329  if( bAsLink && officecfg::Office::Common::Misc::ShowLinkWarningDialog::get() )
330  {
331  SvxLinkWarningDialog aWarnDlg(pWin ? pWin->GetFrameWeld() : nullptr, aFileName);
332  if (aWarnDlg.run() != RET_OK)
333  bAsLink = false; // don't store as link
334  }
335 
336  // Anchor to cell or to page?
337  Any aAnchorValue = xCtrlAcc->getValue(
338  ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_IMAGE_ANCHOR,
339  ui::dialogs::ListboxControlActions::GET_SELECTED_ITEM );
340  OUString sAnchor;
341  aAnchorValue >>= sAnchor;
342 
343  ScAnchorType aAnchorType;
344  if (sAnchor == ScResId(STR_ANCHOR_TO_CELL))
345  aAnchorType = SCA_CELL;
346  else if (sAnchor == ScResId(STR_ANCHOR_TO_CELL_RESIZE))
347  aAnchorType = SCA_CELL_RESIZE;
348  else if (sAnchor == ScResId(STR_ANCHOR_TO_PAGE))
349  aAnchorType = SCA_PAGE;
350  else
351  aAnchorType = SCA_DONTKNOW;
352 
353  lcl_InsertGraphic( aGraphic, aFileName, bAsLink, false, rViewSh, pWindow, pView, aAnchorType );
354 
355  // append items for recording
356  rReq.AppendItem( SfxStringItem( SID_INSERT_GRAPHIC, aFileName ) );
357  rReq.AppendItem( SfxStringItem( FN_PARAM_FILTER, aFilterName ) );
358  rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) );
359  rReq.Done();
360  }
361  else
362  {
363  // error is handled in SvxOpenGraphicDialog::GetGraphic
364  }
365  }
366  }
367 }
368 
370 {
371 }
372 
374  vcl::Window* pWin,
375  ScDrawView* pViewP,
376  SdrModel* pDoc,
377  const SfxRequest& rReq ) :
378  FuPoor(rViewSh, pWin, pViewP, pDoc, rReq)
379 {
380 #if HAVE_FEATURE_AVMEDIA
381  OUString aURL;
382  const SfxItemSet* pReqArgs = rReq.GetArgs();
383  bool bAPI = false;
384 
385  const SvxSizeItem* pSizeItem = rReq.GetArg<SvxSizeItem>(FN_PARAM_1);
386  const SfxBoolItem* pLinkItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_2);
387  const bool bSizeUnknown = !pSizeItem;
388  Size aPrefSize;
389 
390  if( pReqArgs )
391  {
392  const SfxStringItem* pStringItem = dynamic_cast<const SfxStringItem*>( &pReqArgs->Get( rReq.GetSlot() ) );
393 
394  if( pStringItem )
395  {
396  aURL = pStringItem->GetValue();
397  bAPI = aURL.getLength();
398  }
399  }
400 
401  bool bLink(pLinkItem ? pLinkItem->GetValue() : true);
402  bool bInsertMedia = bAPI;
403  if (!bInsertMedia)
404  bInsertMedia = ::avmedia::MediaWindow::executeMediaURLDialog(pWin ? pWin->GetFrameWeld() : nullptr, aURL, &bLink);
405  if (!bInsertMedia)
406  return;
407 
408  if (!bSizeUnknown)
409  {
410  aPrefSize = pSizeItem->GetSize();
411  }
412  else
413  {
414  if( pWin )
415  pWin->EnterWait();
416 
417  css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(rViewShell.GetViewFrame()->GetFrame().GetFrameInterface(), css::uno::UNO_QUERY);
418 
420  [xDispatchProvider, aURL, bLink](const css::uno::Reference<css::media::XPlayer>& rPlayer){
421  css::awt::Size aSize = rPlayer->getPreferredPlayerWindowSize();
422  avmedia::MediaWindow::dispatchInsertAVMedia(xDispatchProvider, aSize, aURL, bLink);
423  }));
424 
425  const bool bIsMediaURL = ::avmedia::MediaWindow::isMediaURL(aURL, ""/*TODO?*/, true, xPlayerListener);
426 
427  if( pWin )
428  pWin->LeaveWait();
429 
430  if (!bIsMediaURL && !bAPI)
432 
433  return;
434  }
435 
436  if (pWin)
437  pWin->EnterWait();
438 
439  lcl_InsertMedia(aURL, bAPI, &rViewSh, pWindow, pView, aPrefSize, bLink);
440 
441  if (pWin)
442  pWin->LeaveWait();
443 #endif
444 }
445 
447 {
448 }
449 
450 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
URL aURL
static void executeFormatErrorBox(weld::Window *pParent)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:997
void setWidth(tools::Long nWidth)
void SetName(const OUString &rStr, const bool bSetChanged=true)
virtual ~FuInsertGraphic() override
Definition: fuins1.cxx:369
void CalcNormScale(Fraction &rFractX, Fraction &rFractY) const
Definition: drawvie4.cxx:410
void EnterWait()
css::uno::Reference< css::frame::XModel3 > GetModel() const
const ContentProperties & rData
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
void Done(bool bRemove=false)
ScDocument & GetDocument() const
Definition: viewdata.hxx:380
const SfxItemSet * GetArgs() const
css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > const & GetFilePickerControlAccess() const
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
static bool isMediaURL(std::u16string_view rURL, const OUString &rReferer, bool bDeep=false, rtl::Reference< PlayerListener > xPreferredPixelSizeListener=nullptr)
Degree10 getRotation() const
static OutputDevice * GetDefaultDevice()
constexpr tools::Long Width() const
weld::Window * GetFrameWeld() const
static void lcl_InsertMedia(const OUString &rMediaURL, bool bApi, ScTabViewShell *pViewSh, const vcl::Window *pWindow, SdrView *pView, const Size &rPrefSize, bool const bLink)
Definition: fuins1.cxx:210
SfxFrame & GetFrame() const
ScTabViewShell & rViewShell
Definition: fupoor.hxx:43
ScViewData & GetViewData()
Definition: tabview.hxx:333
static bool executeMediaURLDialog(weld::Window *pParent, OUString &rURL, bool *const o_pbLink)
static ErrCode LoadGraphic(const OUString &rPath, const OUString &rFilter, Graphic &rGraphic, GraphicFilter *pFilter=nullptr, sal_uInt16 *pDeterminedFormat=nullptr)
ScAnchorType
Definition: global.hxx:371
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1081
void SetScaleX(const Fraction &rScaleX)
void setURL(const OUString &rURL, const OUString &rReferer, const OUString &rMimeType=OUString())
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
size_t GetMarkedObjectCount() const
static void SetCellAnchoredFromPosition(SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab, bool bResizeWithCell)
Definition: drwlayer.cxx:2297
Size GetSize() const
void ScLimitSizeOnDrawPage(Size &rSize, Point &rPos, const Size &rPage)
Definition: fuins1.cxx:62
const OUString & GetValue() const
const T * GetArg(sal_uInt16 nSlotId) const
void SetScaleY(const Fraction &rScaleY)
MapUnit GetMapUnit() const
Point PixelToLogic(const Point &rDevicePt) const
Base class for all functions.
Definition: fupoor.hxx:39
SdrInsertFlags
Size LogicToLogic(const Size &rSzSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
void SetGraphicLink(const OUString &rFileName)
FuInsertGraphic(ScTabViewShell &rViewSh, vcl::Window *pWin, ScDrawView *pView, SdrModel *pDoc, SfxRequest &rReq)
Definition: fuins1.cxx:260
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Size GetPrefSize() const
sal_uInt16 GetSlot() const
ScDrawView * GetScDrawView()
Definition: tabview.hxx:341
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define ERRCODE_NONE
MapMode GetPrefMapMode() const
constexpr tools::Long Height() const
SdrPage * GetPage() const
static void lcl_InsertGraphic(const Graphic &rGraphic, const OUString &rFileName, bool bAsLink, bool bApi, ScTabViewShell &rViewSh, const vcl::Window *pWindow, SdrView *pView, ScAnchorType aAnchorType=SCA_CELL)
Definition: fuins1.cxx:107
OUString aName
RET_OK
ScDrawView * pView
Definition: fupoor.hxx:42
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
SdrPageView * GetSdrPageView() const
SdrObject * ApplyGraphicToObject(SdrObject &rHitObject, const Graphic &rGraphic, const OUString &rBeginUndoText, const OUString &rFile)
Definition: drawview.cxx:1126
FuInsertMedia(ScTabViewShell &rViewSh, vcl::Window *pWin, ScDrawView *pView, SdrModel *pDoc, const SfxRequest &rReq)
Definition: fuins1.cxx:373
bool read(Graphic const &rGraphic)
void setHeight(tools::Long nHeight)
static GraphicFilter & GetGraphicFilter()
SfxObjectShell * GetDocumentShell() const
Definition: document.hxx:1080
void AppendItem(const SfxPoolItem &)
#define SAL_WARN(area, stream)
Point GetInsertPos() const
Definition: tabview.cxx:1669
void rotate(Degree10 aRotation)
SdrModel & getSdrModelFromSdrView() const
Reference< XModel > xModel
virtual ~FuInsertMedia() override
Definition: fuins1.cxx:446
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
void LeaveWait()
static void dispatchInsertAVMedia(const css::uno::Reference< css::frame::XDispatchProvider > &, const css::awt::Size &rSize, const OUString &rURL, bool bLink)
SdrModel * GetModel() const
VclPtr< vcl::Window > pWindow
Definition: fupoor.hxx:44
const Size & GetSize() const