LibreOffice Module sfx2 (master) 1
Enumerations | Functions
fileobj.cxx File Reference
#include <tools/urlobj.hxx>
#include <tools/stream.hxx>
#include <sot/formats.hxx>
#include <sal/log.hxx>
#include <sfx2/lnkbase.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sot/exchange.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <sfx2/docfac.hxx>
#include <com/sun/star/document/XTypeDetection.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <unotools/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/opengrf.hxx>
#include <sfx2/sfxresid.hxx>
#include <sfx2/objsh.hxx>
#include "fileobj.hxx"
#include <sfx2/strings.hrc>
#include <vcl/svapp.hxx>
Include dependency graph for fileobj.cxx:

Go to the source code of this file.

Enumerations

enum class  SvFileObjectType {
  Text = 1 ,
  Graphic = 2 ,
  Object = 3
}
 

Functions

static OUString impl_getFilter (const OUString &_rURL)
 detect the filter of the given file More...
 
 IMPL_LINK_NOARG (SvFileObject, LoadGrfReady_Impl, void *, void)
 
 IMPL_LINK_NOARG (SvFileObject, DelMedium_Impl, void *, void)
 
 IMPL_LINK (SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, void)
 

Enumeration Type Documentation

◆ SvFileObjectType

enum class SvFileObjectType
strong
Enumerator
Text 
Graphic 
Object 

Definition at line 43 of file fileobj.cxx.

Function Documentation

◆ impl_getFilter()

static OUString impl_getFilter ( const OUString &  _rURL)
static

detect the filter of the given file

Parameters
_rURLspecifies the URL of the file which filter is to detected.
If the URL doesn't denote a valid (existent and accessible) file, the request is silently dropped.

Definition at line 201 of file fileobj.cxx.

References createInstance(), comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), utl::MediaDescriptor::PROP_URL, and sType.

Referenced by IMPL_LINK().

◆ IMPL_LINK()

IMPL_LINK ( SvFileObject  ,
DialogClosedHdl  ,
sfx2::FileDialogHelper ,
_pFileDlg  ,
void   
)

Definition at line 358 of file fileobj.cxx.

References sfx2::cTokenSeparator, ERRCODE_NONE, impl_getFilter(), nType, Object, SAL_WARN, and Text.

◆ IMPL_LINK_NOARG() [1/2]

IMPL_LINK_NOARG ( SvFileObject  ,
DelMedium_Impl  ,
void *  ,
void   
)

Definition at line 352 of file fileobj.cxx.

◆ IMPL_LINK_NOARG() [2/2]

IMPL_LINK_NOARG ( SvFileObject  ,
LoadGrfReady_Impl  ,
void *  ,
void   
)

Definition at line 322 of file fileobj.cxx.

References LINK, Application::PostUserEvent(), and sfx2::LinkManager::STATE_LOAD_OK.