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