LibreOffice Module sfx2 (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
sfx2::LinkManager Class Reference

#include <linkmgr.hxx>

Collaboration diagram for sfx2::LinkManager:
[legend]

Public Types

enum  LinkState {
  STATE_LOAD_OK ,
  STATE_LOAD_ERROR ,
  STATE_LOAD_ABORT
}
 

Public Member Functions

 LinkManager (SfxObjectShell *pCacheCont)
 
 ~LinkManager ()
 
void InsertCachedComp (const css::uno::Reference< css::lang::XComponent > &xComp)
 Insert a component loaded during link update, which needs to be closed when the update is complete. More...
 
void CloseCachedComps ()
 
SfxObjectShellGetPersist () const
 
void SetPersist (SfxObjectShell *p)
 
void Remove (SvBaseLink const *pLink)
 
void Remove (size_t nPos, size_t nCnt=1)
 
bool Insert (SvBaseLink *pLink)
 
void InsertDDELink (SvBaseLink *, const OUString &rServer, std::u16string_view rTopic, std::u16string_view rItem)
 
void InsertDDELink (SvBaseLink *)
 
void InsertFileLink (sfx2::SvBaseLink &, SvBaseLinkObjectType nFileType, std::u16string_view rFileNm, const OUString *pFilterNm=nullptr, const OUString *pRange=nullptr)
 
void ReconnectDdeLink (SfxObjectShell &rServer)
 
void UpdateAllLinks (bool bAskUpdate, bool bUpdateGrfLinks, weld::Window *pParentWin)
 
const SvBaseLinksGetLinks () const
 
const SvLinkSourcesGetServers () const
 
bool InsertServer (SvLinkSource *rObj)
 
void RemoveServer (SvLinkSource *rObj)
 
void CancelTransfers ()
 
bool GetGraphicFromAny (std::u16string_view rMimeType, const css::uno::Any &rValue, Graphic &rGrf, weld::Window *pParentWin)
 

Static Public Member Functions

static void LinkServerShell (const OUString &rPath, SfxObjectShell &rServer, ::sfx2::SvBaseLink &rLink)
 Reconnect the server document shell to a DDE link object. More...
 
static bool GetDisplayNames (const SvBaseLink *, OUString *pType, OUString *pFile=nullptr, OUString *pLink=nullptr, OUString *pFilter=nullptr)
 
static SvLinkSourceRef CreateObj (SvBaseLink const *)
 
static SotClipboardFormatId RegisterStatusInfoId ()
 

Private Types

typedef ::std::vector< css::uno::Reference< css::lang::XComponent > > CompVector
 

Private Member Functions

bool InsertLink (SvBaseLink *pLink, SvBaseLinkObjectType nObjType, SfxLinkUpdateMode nUpdateType, const OUString *pName)
 
 LinkManager (const LinkManager &)=delete
 
LinkManageroperator= (const LinkManager &)=delete
 

Private Attributes

CompVector maCachedComps
 
SvBaseLinks aLinkTbl
 
SvLinkSources aServerTbl
 
SfxObjectShellpPersist
 

Detailed Description

Definition at line 54 of file linkmgr.hxx.

Member Typedef Documentation

◆ CompVector

typedef ::std::vector< css::uno::Reference< css::lang::XComponent > > sfx2::LinkManager::CompVector
private

Definition at line 57 of file linkmgr.hxx.

Member Enumeration Documentation

◆ LinkState

Enumerator
STATE_LOAD_OK 
STATE_LOAD_ERROR 
STATE_LOAD_ABORT 

Definition at line 69 of file linkmgr.hxx.

Constructor & Destructor Documentation

◆ LinkManager() [1/2]

sfx2::LinkManager::LinkManager ( SfxObjectShell pCacheCont)

Definition at line 76 of file linkmgr2.cxx.

References p.

◆ ~LinkManager()

sfx2::LinkManager::~LinkManager ( )

Definition at line 81 of file linkmgr2.cxx.

References aLinkTbl.

◆ LinkManager() [2/2]

sfx2::LinkManager::LinkManager ( const LinkManager )
privatedelete

Member Function Documentation

◆ CancelTransfers()

void sfx2::LinkManager::CancelTransfers ( )

◆ CloseCachedComps()

void sfx2::LinkManager::CloseCachedComps ( )

Definition at line 98 of file linkmgr2.cxx.

References maCachedComps.

Referenced by UpdateAllLinks().

◆ CreateObj()

SvLinkSourceRef sfx2::LinkManager::CreateObj ( SvBaseLink const *  pLink)
static

◆ GetDisplayNames()

bool sfx2::LinkManager::GetDisplayNames ( const SvBaseLink pLink,
OUString *  pType,
OUString *  pFile = nullptr,
OUString *  pLink = nullptr,
OUString *  pFilter = nullptr 
)
static

◆ GetGraphicFromAny()

bool sfx2::LinkManager::GetGraphicFromAny ( std::u16string_view  rMimeType,
const css::uno::Any &  rValue,
Graphic rGrf,
weld::Window pParentWin 
)

◆ GetLinks()

const SvBaseLinks & sfx2::LinkManager::GetLinks ( ) const
inline

Definition at line 137 of file linkmgr.hxx.

Referenced by CancelTransfers(), and ReconnectDdeLink().

◆ GetPersist()

SfxObjectShell * sfx2::LinkManager::GetPersist ( ) const
inline

Definition at line 89 of file linkmgr.hxx.

Referenced by GetGraphicFromAny().

◆ GetServers()

const SvLinkSources & sfx2::LinkManager::GetServers ( ) const
inline

Definition at line 142 of file linkmgr.hxx.

◆ Insert()

bool sfx2::LinkManager::Insert ( SvBaseLink pLink)

◆ InsertCachedComp()

void sfx2::LinkManager::InsertCachedComp ( const css::uno::Reference< css::lang::XComponent > &  xComp)

Insert a component loaded during link update, which needs to be closed when the update is complete.

Parameters
xCompcomponent loaded during link update.

Definition at line 93 of file linkmgr2.cxx.

References maCachedComps.

◆ InsertDDELink() [1/2]

void sfx2::LinkManager::InsertDDELink ( SvBaseLink pLink)

Definition at line 205 of file linkmgr2.cxx.

References sfx2::ClientDde, sfx2::ClientSo, DBG_ASSERT, Insert(), sfx2::isClientType(), and pLink.

◆ InsertDDELink() [2/2]

void sfx2::LinkManager::InsertDDELink ( SvBaseLink pLink,
const OUString &  rServer,
std::u16string_view  rTopic,
std::u16string_view  rItem 
)

Definition at line 189 of file linkmgr2.cxx.

References sfx2::ClientDde, Insert(), sfx2::isClientType(), sfx2::MakeLnkName(), and pLink.

◆ InsertFileLink()

void sfx2::LinkManager::InsertFileLink ( sfx2::SvBaseLink rLink,
SvBaseLinkObjectType  nFileType,
std::u16string_view  rFileNm,
const OUString *  pFilterNm = nullptr,
const OUString *  pRange = nullptr 
)

◆ InsertLink()

bool sfx2::LinkManager::InsertLink ( SvBaseLink pLink,
SvBaseLinkObjectType  nObjType,
SfxLinkUpdateMode  nUpdateType,
const OUString *  pName 
)
private

Definition at line 176 of file linkmgr2.cxx.

References Insert(), pLink, and pName.

Referenced by InsertFileLink().

◆ InsertServer()

bool sfx2::LinkManager::InsertServer ( SvLinkSource rObj)

◆ LinkServerShell()

void sfx2::LinkManager::LinkServerShell ( const OUString &  rPath,
SfxObjectShell rServer,
::sfx2::SvBaseLink rLink 
)
static

Reconnect the server document shell to a DDE link object.

Parameters
rPathpath to the server document
rServerserver document shell instance
rLinklink object of the client document

Definition at line 439 of file linkmgr2.cxx.

References sfx2::SvLinkSource::AddDataAdvise(), ADVISEMODE_ONLYONCE, SfxObjectShell::DdeCreateLinkSource(), sfx2::SvBaseLink::GetContentType(), SotExchange::GetFormatDataFlavor(), sfx2::SvBaseLink::GetUpdateMode(), ONCALL, and sfx2::SvBaseLink::SetObj().

Referenced by ReconnectDdeLink().

◆ operator=()

LinkManager & sfx2::LinkManager::operator= ( const LinkManager )
privatedelete

◆ ReconnectDdeLink()

void sfx2::LinkManager::ReconnectDdeLink ( SfxObjectShell rServer)

◆ RegisterStatusInfoId()

SotClipboardFormatId sfx2::LinkManager::RegisterStatusInfoId ( )
static

Definition at line 497 of file linkmgr2.cxx.

References SotExchange::RegisterFormatName().

Referenced by SvFileObject::SendStateChg_Impl().

◆ Remove() [1/2]

void sfx2::LinkManager::Remove ( size_t  nPos,
size_t  nCnt = 1 
)

Definition at line 138 of file linkmgr2.cxx.

References aLinkTbl, tools::SvRef< typename T >::is(), n, and nPos.

◆ Remove() [2/2]

void sfx2::LinkManager::Remove ( SvBaseLink const *  pLink)

◆ RemoveServer()

void sfx2::LinkManager::RemoveServer ( SvLinkSource rObj)

◆ SetPersist()

void sfx2::LinkManager::SetPersist ( SfxObjectShell p)
inline

Definition at line 90 of file linkmgr.hxx.

References p.

◆ UpdateAllLinks()

void sfx2::LinkManager::UpdateAllLinks ( bool  bAskUpdate,
bool  bUpdateGrfLinks,
weld::Window pParentWin 
)

Member Data Documentation

◆ aLinkTbl

SvBaseLinks sfx2::LinkManager::aLinkTbl
private

Definition at line 60 of file linkmgr.hxx.

Referenced by Insert(), Remove(), UpdateAllLinks(), and ~LinkManager().

◆ aServerTbl

SvLinkSources sfx2::LinkManager::aServerTbl
private

Definition at line 61 of file linkmgr.hxx.

Referenced by InsertServer(), and RemoveServer().

◆ maCachedComps

CompVector sfx2::LinkManager::maCachedComps
private

Definition at line 58 of file linkmgr.hxx.

Referenced by CloseCachedComps(), and InsertCachedComp().

◆ pPersist

SfxObjectShell* sfx2::LinkManager::pPersist
private

Definition at line 63 of file linkmgr.hxx.

Referenced by UpdateAllLinks().


The documentation for this class was generated from the following files: