LibreOffice Module svx (master)  1
galmisc.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 <sal/config.h>
21 
22 #include <sot/storage.hxx>
23 #include <unotools/streamwrap.hxx>
25 #include <comphelper/string.hxx>
26 #include <ucbhelper/content.hxx>
27 #include <com/sun/star/ucb/ContentCreationException.hpp>
28 #include <tools/urlobj.hxx>
29 #include <vcl/graphicfilter.hxx>
30 #include <svl/itempool.hxx>
31 #include <sfx2/docfile.hxx>
32 #include <vcl/svapp.hxx>
33 #include <vcl/window.hxx>
34 #include <svx/svdpage.hxx>
35 #include <svx/dialmgr.hxx>
36 #include <svx/svdograf.hxx>
37 #include <svx/fmmodel.hxx>
38 #include <svx/unomodel.hxx>
39 #include "codec.hxx"
40 #include <svx/strings.hrc>
41 #include <svx/galtheme.hxx>
42 #include <svx/galmisc.hxx>
43 #include <osl/diagnose.h>
44 #include <com/sun/star/awt/XProgressMonitor.hpp>
45 #include <com/sun/star/ucb/TransferInfo.hpp>
46 #include <com/sun/star/ucb/NameClash.hpp>
47 #include <memory>
48 
49 using namespace ::com::sun::star;
50 
52  OUString& rFilterName )
53 {
55  SfxMedium aMedium( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
56 
57  aMedium.Download();
58 
59  SvStream* pIStm = aMedium.GetInStream();
60 
61  if( pIStm )
62  {
64  sal_uInt16 nFormat;
65 
66  if( !rGraphicFilter.ImportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), *pIStm, GRFILTER_FORMAT_DONTKNOW, &nFormat ) )
67  {
68  rFilterName = rGraphicFilter.GetImportFormatName( nFormat );
70  }
71  }
72 
73  return nRet;
74 }
75 
76 bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel )
77 {
78  sal_uInt32 nVersion;
79  bool bRet = false;
80 
81  if( GalleryCodec::IsCoded( rIStm, nVersion ) )
82  {
83  SvMemoryStream aMemStm( 65535, 65535 );
84  GalleryCodec aCodec( rIStm );
85 
86  aCodec.Read( aMemStm );
87  aMemStm.Seek( 0 );
88 
89  if( 1 == nVersion )
90  {
91  OSL_FAIL( "staroffice binary file formats are no longer supported inside the gallery!" );
92  bRet = false;
93  }
94  else if( 2 == nVersion )
95  {
96  // recall to read as XML
97  bRet = GallerySvDrawImport( aMemStm, rModel );
98  }
99  }
100  else
101  {
102  // read as XML
103  uno::Reference< io::XInputStream > xInputStream( new utl::OInputStreamWrapper( rIStm ) );
104 
105  rModel.GetItemPool().SetDefaultMetric( MapUnit::Map100thMM );
106  uno::Reference< lang::XComponent > xComponent;
107 
108  bRet = SvxDrawingLayerImport( &rModel, xInputStream, xComponent, "com.sun.star.comp.Draw.XMLOasisImporter" );
109  if( !bRet || (rModel.GetPageCount() == 0) )
110  {
111  rIStm.Seek(0);
112  bRet = SvxDrawingLayerImport( &rModel, xInputStream, xComponent, "com.sun.star.comp.Draw.XMLImporter" );
113  }
114 
115  }
116 
117  return bRet;
118 }
119 
120 bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap )
121 {
122  if (! rModel.GetPageCount() )
123  return false;
124 
125  const SdrPage* pPage = rModel.GetPage( 0 );
126  const SdrObject* pObj = pPage->GetObj( 0 );
127 
128  if ( pPage->GetObjCount() != 1 )
129  return false;
130  auto pGrafObj = dynamic_cast<const SdrGrafObj*>( pObj);
131  if (!pGrafObj)
132  return false;
133 
134  bool bRet = false;
135  const sal_uInt16 nCount = pObj->GetUserDataCount();
136 
137  // Exist in the user data an IMap information?
138  for ( sal_uInt16 i = 0; i < nCount; i++ )
139  {
140  const SdrObjUserData* pUserData = pObj->GetUserData( i );
141 
142  if ( ( pUserData->GetInventor() == SdrInventor::SgaImap ) && ( pUserData->GetId() == ID_IMAPINFO ) )
143  {
144  rGraphic = pGrafObj->GetGraphic();
145  rImageMap = static_cast<const SgaIMapInfo*>( pUserData )->GetImageMap();
146  bRet = true;
147  break;
148  }
149  }
150 
151  return bRet;
152 }
153 
154 OUString GetReducedString( const INetURLObject& rURL, sal_Int32 nMaxLen )
155 {
156  OUString aReduced( rURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) );
157 
158  aReduced = aReduced.copy(aReduced.lastIndexOf('/')+1);
159 
160  if( INetProtocol::PrivSoffice != rURL.GetProtocol() )
161  {
162  sal_Unicode aDelimiter;
163  const OUString aPath( rURL.getFSysPath( FSysStyle::Detect, &aDelimiter ) );
164  const OUString aName( aReduced );
165 
166  if( aPath.getLength() > nMaxLen )
167  {
168  sal_Int32 nPathPrefixLen = nMaxLen - aName.getLength() - 4;
169 
170  if (nPathPrefixLen >= 0)
171  {
172  aReduced = OUString::Concat(aPath.subView(0, nPathPrefixLen)) + "..."
173  + OUStringChar(aDelimiter) + aName;
174  }
175  else
176  {
177  aReduced += "..." + OUStringChar(aDelimiter) + "..."
178  + aName.subView( aName.getLength() - (nMaxLen - 7) );
179  }
180  }
181  else
182  aReduced = aPath;
183  }
184 
185  return aReduced;
186 }
187 
188 OUString GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL )
189 {
190  OUString aRet;
191 
192  if( rSvDrawObjURL.GetProtocol() == INetProtocol::PrivSoffice &&
194  {
195  aRet = rSvDrawObjURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getToken( 2, '/' );
196  }
197 
198  return aRet;
199 }
200 
201 bool FileExists( const INetURLObject& rURL )
202 {
203  bool bRet = false;
204 
205  if( rURL.GetProtocol() != INetProtocol::NotValid )
206  {
207  try
208  {
209  ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
210  OUString aTitle;
211 
212  aCnt.getPropertyValue("Title") >>= aTitle;
213  bRet = ( !aTitle.isEmpty() );
214  }
215  catch( const ucb::ContentCreationException& )
216  {
217  }
218  catch( const uno::RuntimeException& )
219  {
220  }
221  catch( const uno::Exception& )
222  {
223  }
224  }
225 
226  return bRet;
227 }
228 
229 bool CreateDir( const INetURLObject& rURL )
230 {
231  bool bRet = FileExists( rURL );
232 
233  if( !bRet )
234  {
235  try
236  {
237  uno::Reference< ucb::XCommandEnvironment > aCmdEnv;
238  INetURLObject aParentURL( rURL );
239  aParentURL.removeSegment();
241  uno::Sequence< OUString > aProps( 1 );
242  uno::Sequence< uno::Any > aValues( 1 );
243 
244  aProps[0] = "Title";
245  aValues[0] <<= rURL.GetLastName();
246 
248  bRet = aParent.insertNewContent( "application/vnd.sun.staroffice.fsys-folder", aProps, aValues, aContent );
249  }
250  catch( const ucb::ContentCreationException& )
251  {
252  }
253  catch( const uno::RuntimeException& )
254  {
255  }
256  catch( const uno::Exception& )
257  {
258  }
259  }
260 
261  return bRet;
262 }
263 
264 bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
265 {
266  bool bRet = false;
267 
268  try
269  {
270  ::ucbhelper::Content aDestPath( rDstURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
271 
272  aDestPath.executeCommand( "transfer",
273  uno::makeAny( ucb::TransferInfo( false, rSrcURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
274  rDstURL.GetLastName(), ucb::NameClash::OVERWRITE ) ) );
275  bRet = true;
276  }
277  catch( const ucb::ContentCreationException& )
278  {
279  }
280  catch( const uno::RuntimeException& )
281  {
282  }
283  catch( const uno::Exception& )
284  {
285  }
286 
287  return bRet;
288 }
289 
290 bool KillFile( const INetURLObject& rURL )
291 {
292  bool bRet = FileExists( rURL );
293 
294  if( bRet )
295  {
296  try
297  {
298  ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
299  aCnt.executeCommand( "delete", uno::makeAny( true ) );
300  }
301  catch( const ucb::ContentCreationException& )
302  {
303  bRet = false;
304  }
305  catch( const uno::RuntimeException& )
306  {
307  bRet = false;
308  }
309  catch( const uno::Exception& )
310  {
311  bRet = false;
312  }
313  }
314 
315  return bRet;
316 }
317 
318 
320 {
321 
322  uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
323 
324  uno::Reference< awt::XProgressMonitor > xMonitor( xMgr->createInstance( "com.sun.star.awt.XProgressMonitor" ),
325  uno::UNO_QUERY );
326 
327  if ( !xMonitor.is() )
328  return;
329 
330  mxProgressBar = xMonitor;
331 
332  OUString aProgressText;
333 
334  if( pFilter )
335  {
336  aProgressText = SvxResId(RID_SVXSTR_GALLERY_FILTER);
337 // pFilter->SetUpdatePercentHdl( LINK( this, GalleryProgress, Update ) ); // sj: progress wasn't working up from SO7 at all
338 // // so I am removing this. The gallery progress should
339 // // be changed to use the XStatusIndicator instead of XProgressMonitor
340  }
341  else
342  aProgressText = "Gallery";
343 
344  xMonitor->addText( "Gallery", aProgressText, false ) ;
345  mxProgressBar->setRange( 0, GALLERY_PROGRESS_RANGE );
346 }
347 
349 {
350 }
351 
352 void GalleryProgress::Update( sal_Int32 nVal, sal_Int32 nMaxVal )
353 {
354  if( mxProgressBar.is() && nMaxVal )
355  mxProgressBar->setValue( std::min<sal_Int32>( static_cast<double>(nVal) / nMaxVal * GALLERY_PROGRESS_RANGE,
356  GALLERY_PROGRESS_RANGE ) );
357 }
358 
359 
360 GalleryTransferable::GalleryTransferable( GalleryTheme* pTheme, sal_uInt32 nObjectPos, bool bLazy ) :
361  mpTheme( pTheme ),
362  meObjectKind( pTheme ? mpTheme->GetObjectKind(nObjectPos) : SgaObjKind::NONE),
363  mnObjectPos( nObjectPos )
364 {
365 
366  InitData( bLazy );
367 }
368 
369 void GalleryTransferable::SelectObject(sal_uInt32 nObjectPos)
370 {
371  if (nObjectPos == mnObjectPos)
372  return;
373  ClearFormats();
374  mnObjectPos = nObjectPos;
376  ObjectReleased();
377  InitData(true);
378 }
379 
381 {
382 }
383 
385 {
386  switch( meObjectKind )
387  {
388  case SgaObjKind::SvDraw:
389  {
390  if( !bLazy )
391  {
392  if( !mpGraphicObject )
393  {
394  Graphic aGraphic;
395 
396  if (mpTheme && mpTheme->GetGraphic(mnObjectPos, aGraphic))
397  mpGraphicObject.reset(new GraphicObject( aGraphic ));
398  }
399 
400  if( !mxModelStream.is() )
401  {
402  mxModelStream = new SotTempStream( "" );
403  mxModelStream->SetBufferSize( 16348 );
404 
407  else
408  mxModelStream->Seek( 0 );
409  }
410  }
411  }
412  break;
413 
415  case SgaObjKind::Bitmap:
416  case SgaObjKind::Inet:
417  case SgaObjKind::Sound:
418  {
419  if( !mpURL )
420  {
421  mpURL.reset(new INetURLObject);
422 
423  if (!mpTheme || !mpTheme->GetURL(mnObjectPos, *mpURL))
424  {
425  mpURL.reset();
426  }
427  }
428 
430  {
431  Graphic aGraphic;
432 
433  if (mpTheme && mpTheme->GetGraphic(mnObjectPos, aGraphic))
434  mpGraphicObject.reset(new GraphicObject( aGraphic ));
435  }
436  }
437  break;
438 
439  default:
440  OSL_FAIL( "GalleryTransferable::GalleryTransferable: invalid object type" );
441  break;
442  }
443 }
444 
446 {
448  {
449  AddFormat( SotClipboardFormatId::DRAWING );
450  AddFormat( SotClipboardFormatId::SVXB );
451  AddFormat( SotClipboardFormatId::GDIMETAFILE );
452  AddFormat( SotClipboardFormatId::BITMAP );
453  }
454  else
455  {
456  if( mpURL )
457  AddFormat( SotClipboardFormatId::SIMPLE_FILE );
458 
459  if( mpGraphicObject )
460  {
461  AddFormat( SotClipboardFormatId::SVXB );
462 
463  if( mpGraphicObject->GetType() == GraphicType::GdiMetafile )
464  {
465  AddFormat( SotClipboardFormatId::GDIMETAFILE );
466  AddFormat( SotClipboardFormatId::BITMAP );
467  }
468  else
469  {
470  AddFormat( SotClipboardFormatId::BITMAP );
471  AddFormat( SotClipboardFormatId::GDIMETAFILE );
472  }
473  }
474  }
475 }
476 
477 bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ )
478 {
479  SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor );
480  bool bRet = false;
481 
482  InitData( false );
483 
484  if( ( SotClipboardFormatId::DRAWING == nFormat ) && ( SgaObjKind::SvDraw == meObjectKind ) )
485  {
486  bRet = ( mxModelStream.is() && SetObject( mxModelStream.get(), 0, rFlavor ) );
487  }
488  else if( ( SotClipboardFormatId::SIMPLE_FILE == nFormat ) && mpURL )
489  {
490  bRet = SetString( mpURL->GetMainURL( INetURLObject::DecodeMechanism::NONE ), rFlavor );
491  }
492  else if( ( SotClipboardFormatId::SVXB == nFormat ) && mpGraphicObject )
493  {
494  bRet = SetGraphic( mpGraphicObject->GetGraphic() );
495  }
496  else if( ( SotClipboardFormatId::GDIMETAFILE == nFormat ) && mpGraphicObject )
497  {
498  bRet = SetGDIMetaFile( mpGraphicObject->GetGraphic().GetGDIMetaFile() );
499  }
500  else if( ( SotClipboardFormatId::BITMAP == nFormat ) && mpGraphicObject )
501  {
502  bRet = SetBitmapEx( mpGraphicObject->GetGraphic().GetBitmapEx(), rFlavor );
503  }
504 
505  return bRet;
506 }
507 
509  sal_uInt32, const datatransfer::DataFlavor& )
510 {
511  bool bRet = false;
512 
513  if( pUserObject )
514  {
515  rxOStm->WriteStream( *static_cast< SotStorageStream* >( pUserObject ) );
516  bRet = ( rxOStm->GetError() == ERRCODE_NONE );
517  }
518 
519  return bRet;
520 }
521 
523 {
524  if (mpTheme)
525  {
526  mpTheme->SetDragging( false );
527  mpTheme->SetDragPos( 0 );
528  }
529  if ( nDropAction )
530  {
531  vcl::Window *pFocusWindow = Application::GetFocusWindow();
532  if ( pFocusWindow )
533  pFocusWindow->GrabFocusToDocument();
534  }
535 }
536 
538 {
540  mpGraphicObject.reset();
541  mpURL.reset();
542 }
543 
545 {
547  if (mpTheme && mpTheme->GetURL(mnObjectPos, aURL) && aURL.GetProtocol() != INetProtocol::NotValid)
548  {
549  mpTheme->SetDragging( true );
551  return false;
552  }
553  return true;
554 }
555 
557 {
559 
560  if (pObject)
561  aURL = pObject->getURL();
562 
563  return aURL;
564 }
565 
566 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool is() const
User data of a drawing object, e.g.
Definition: svdobj.hxx:150
bool SvxDrawingLayerImport(SdrModel *pModel, const uno::Reference< io::XInputStream > &xInputStream, const Reference< lang::XComponent > &xComponent)
Definition: xmlexport.cxx:136
virtual bool WriteObject(tools::SvRef< SotTempStream > &rxOStm, void *pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor &rFlavor) override
Definition: galmisc.cxx:508
OUString GetReducedString(const INetURLObject &rURL, sal_Int32 nMaxLen)
Definition: galmisc.cxx:154
URL aURL
void Update(sal_Int32 nVal, sal_Int32 nMaxVal)
Definition: galmisc.cxx:352
ErrCode ImportGraphic(Graphic &rGraphic, const INetURLObject &rPath, sal_uInt16 nFormat=GRFILTER_FORMAT_DONTKNOW, sal_uInt16 *pDeterminedFormat=nullptr, GraphicFilterImportFlags nImportFlags=GraphicFilterImportFlags::NONE)
bool SetBitmapEx(const BitmapEx &rBitmap, const css::datatransfer::DataFlavor &rFlavor)
std::unique_ptr< INetURLObject > mpURL
Definition: galmisc.hxx:144
bool insertNewContent(const OUString &rContentType, const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Sequence< css::uno::Any > &rPropertyValues, Content &rNewContent)
bool CreateIMapGraphic(const FmFormModel &rModel, Graphic &rGraphic, ImageMap &rImageMap)
Definition: galmisc.cxx:120
signed char sal_Int8
css::uno::Any getPropertyValue(const OUString &rPropertyName)
OUString GetImportFormatName(sal_uInt16 nFormat)
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:770
size_t GetObjCount() const
Definition: svdpage.cxx:764
const INetURLObject & getURL() const
sal_uInt64 Seek(sal_uInt64 nPos)
virtual void ObjectReleased() override
Definition: galmisc.cxx:537
bool FileExists(const INetURLObject &rURL)
Definition: galmisc.cxx:201
OUString GetLastName(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
SAL_DLLPRIVATE SgaObjKind GetObjectKind(sal_uInt32 nPos) const
Definition: galtheme.hxx:121
void Read(SvStream &rStmToRead)
Definition: codec.cxx:84
sal_Int32 getTokenCount(const OString &rIn, char cTok)
bool SetObject(void *pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor &rFlavor)
NONE
bool CreateDir(const INetURLObject &rURL)
Definition: galmisc.cxx:229
void AddFormat(SotClipboardFormatId nFormat)
SAL_DLLPRIVATE void SetDragging(bool bSet)
Definition: galtheme.hxx:98
sal_uInt16 sal_Unicode
SAL_DLLPRIVATE bool GetURL(sal_uInt32 nPos, INetURLObject &rURL)
Definition: galtheme.cxx:481
OUString SvxResId(const char *pId)
Definition: dialmgr.cxx:25
SgaObjKind meObjectKind
Definition: galmisc.hxx:140
INetURLObject ImplGetURL(const GalleryObject *pObject)
Definition: galmisc.cxx:556
int nCount
SotClipboardFormatId
virtual void AddSupportedFormats() override
Definition: galmisc.cxx:445
bool SetGraphic(const Graphic &rGraphic)
SAL_DLLPRIVATE void SetDragPos(sal_uInt32 nPos)
Definition: galtheme.hxx:108
SgaObjKind
Definition: galmisc.hxx:55
T * get() const
OUString getFSysPath(FSysStyle eStyle, sal_Unicode *pDelimiter=nullptr) const
GalleryTransferable(GalleryTheme *pTheme, sal_uInt32 nObjectPos, bool bLazy)
Definition: galmisc.cxx:360
int i
GalleryGraphicImportRet GalleryGraphicImport(const INetURLObject &rURL, Graphic &rGraphic, OUString &rFilterName)
Definition: galmisc.cxx:51
const SdrPage * GetPage(sal_uInt16 nPgNum) const
Definition: svdmodel.cxx:1840
GalleryProgress(const GraphicFilter *pFilter=nullptr)
Definition: galmisc.cxx:319
GalleryTheme * mpTheme
Definition: galmisc.hxx:139
void GrabFocusToDocument()
#define GRFILTER_FORMAT_DONTKNOW
virtual bool GetData(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) override
Definition: galmisc.cxx:477
GalleryGraphicImportRet
Definition: galmisc.hxx:69
bool GetGraphic(sal_uInt32 nPos, Graphic &rGraphic)
Definition: galtheme.cxx:310
This class represents an embedded or linked bitmap graphic object.
Definition: svdograf.hxx:77
sal_Int16 nVersion
bool KillFile(const INetURLObject &rURL)
Definition: galmisc.cxx:290
Abstract DrawObject.
Definition: svdobj.hxx:258
bool GallerySvDrawImport(SvStream &rIStm, SdrModel &rModel)
Definition: galmisc.cxx:76
#define GALLERY_PROGRESS_RANGE
Definition: galmisc.hxx:74
std::unique_ptr< GraphicObject > mpGraphicObject
Definition: galmisc.hxx:143
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool CopyFile(const INetURLObject &rSrcURL, const INetURLObject &rDstURL)
Definition: galmisc.cxx:264
static SotClipboardFormatId GetFormat(const css::datatransfer::DataFlavor &rFlavor)
static vcl::Window * GetFocusWindow()
Reference< XMultiServiceFactory > getProcessServiceFactory()
void SetDefaultMetric(MapUnit eNewMetric)
css::uno::Reference< css::awt::XProgressBar > mxProgressBar
Definition: galmisc.hxx:121
#define ERRCODE_NONE
sal_uInt16 GetId() const
Definition: svdobj.hxx:166
SAL_DLLPRIVATE bool GetModelStream(sal_uInt32 nPos, tools::SvRef< SotTempStream > const &rModelStreamRef)
Definition: galtheme.cxx:457
OUString aName
INetProtocol GetProtocol() const
SdrObjUserData * GetUserData(sal_uInt16 nNum) const
Definition: svdobj.cxx:2678
Reference< XComponentContext > getProcessComponentContext()
sal_uInt16 GetUserDataCount() const
Definition: svdobj.cxx:2672
virtual ~GalleryTransferable() override
Definition: galmisc.cxx:380
void InitData(bool bLazy)
Definition: galmisc.cxx:384
static bool IsCoded(SvStream &rStm, sal_uInt32 &rVersion)
Definition: codec.cxx:36
static GraphicFilter & GetGraphicFilter()
css::uno::Any executeCommand(const OUString &rCommandName, const css::uno::Any &rCommandArgument)
OUString GetSvDrawStreamNameFromURL(const INetURLObject &rSvDrawObjURL)
Definition: galmisc.cxx:188
const SfxItemPool & GetItemPool() const
Definition: svdmodel.hxx:314
void Download(const Link< void *, void > &aLink=Link< void *, void >())
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:365
SdrInventor GetInventor() const
Definition: svdobj.hxx:165
bool SetString(const OUString &rString, const css::datatransfer::DataFlavor &rFlavor)
#define ID_IMAPINFO
Definition: galmisc.hxx:65
sal_uInt32 mnObjectPos
Definition: galmisc.hxx:141
sal_uInt16 GetPageCount() const
Definition: svdmodel.cxx:1852
bool SetGDIMetaFile(const GDIMetaFile &rMtf)
void SelectObject(sal_uInt32 nObjectPos)
Definition: galmisc.cxx:369
tools::SvRef< SotTempStream > mxModelStream
Definition: galmisc.hxx:142
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
virtual void DragFinished(sal_Int8 nDropAction) override
Definition: galmisc.cxx:522