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