LibreOffice Module sfx2 (master) 1
|
#include <linkmgr.hxx>
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 () |
SfxObjectShell * | GetPersist () 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 SvBaseLinks & | GetLinks () const |
const SvLinkSources & | GetServers () 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 | |
LinkManager & | operator= (const LinkManager &)=delete |
Private Attributes | |
CompVector | maCachedComps |
SvBaseLinks | aLinkTbl |
SvLinkSources | aServerTbl |
SfxObjectShell * | pPersist |
Definition at line 54 of file linkmgr.hxx.
|
private |
Definition at line 57 of file linkmgr.hxx.
Enumerator | |
---|---|
STATE_LOAD_OK | |
STATE_LOAD_ERROR | |
STATE_LOAD_ABORT |
Definition at line 69 of file linkmgr.hxx.
sfx2::LinkManager::LinkManager | ( | SfxObjectShell * | pCacheCont | ) |
Definition at line 76 of file linkmgr2.cxx.
References p.
sfx2::LinkManager::~LinkManager | ( | ) |
Definition at line 81 of file linkmgr2.cxx.
References aLinkTbl.
|
privatedelete |
void sfx2::LinkManager::CancelTransfers | ( | ) |
Definition at line 477 of file linkmgr2.cxx.
References GetLinks(), sfx2::SvBaseLink::GetObj(), sfx2::SvBaseLink::GetObjType(), sfx2::isClientFileType(), and n.
void sfx2::LinkManager::CloseCachedComps | ( | ) |
Definition at line 98 of file linkmgr2.cxx.
References maCachedComps.
Referenced by UpdateAllLinks().
|
static |
Definition at line 348 of file linkmgr2.cxx.
References sfx2::ClientDde, sfx2::ClientFile, sfx2::ClientGraphic, sfx2::ClientOle, sfx2::Internal, and pLink.
Referenced by sfx2::SvBaseLink::Edit(), and sfx2::SvBaseLink::GetRealObject_().
|
static |
Definition at line 218 of file linkmgr2.cxx.
References sfx2::ClientDde, sfx2::ClientFile, sfx2::ClientGraphic, sfx2::ClientOle, sfx2::cTokenSeparator, nPos, pLink, and SfxResId().
Referenced by SvFileObject::Connect(), sfx2::SvDDEObject::Connect(), SvFileObject::Edit(), sfx2::SvBaseLink::ExecuteEdit(), sfx2::SvBaseLink::GetRealObject_(), and ReconnectDdeLink().
bool sfx2::LinkManager::GetGraphicFromAny | ( | std::u16string_view | rMimeType, |
const css::uno::Any & | rValue, | ||
Graphic & | rGrf, | ||
weld::Window * | pParentWin | ||
) |
Definition at line 509 of file linkmgr2.cxx.
References aSeq, SotExchange::GetFormatIdFromMimeType(), SfxObjectShell::GetMedium(), SfxMedium::GetName(), GetPersist(), SfxObjectShell::HasName(), Graphic::IsNone(), SvtSecurityOptions::isUntrustedReferer(), vcl::graphic::loadFromURL(), SvmReader::Read(), ReadDIB(), TypeSerializer::readGraphic(), Graphic::SetDefaultType(), and Graphic::setOriginURL().
|
inline |
Definition at line 137 of file linkmgr.hxx.
Referenced by CancelTransfers(), and ReconnectDdeLink().
|
inline |
Definition at line 89 of file linkmgr.hxx.
Referenced by GetGraphicFromAny().
|
inline |
Definition at line 142 of file linkmgr.hxx.
bool sfx2::LinkManager::Insert | ( | SvBaseLink * | pLink | ) |
Definition at line 158 of file linkmgr2.cxx.
References aLinkTbl, tools::SvRef< typename T >::get(), tools::SvRef< typename T >::is(), n, and pLink.
Referenced by InsertDDELink(), and InsertLink().
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.
xComp | component loaded during link update. |
Definition at line 93 of file linkmgr2.cxx.
References maCachedComps.
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.
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.
void sfx2::LinkManager::InsertFileLink | ( | sfx2::SvBaseLink & | rLink, |
SvBaseLinkObjectType | nFileType, | ||
std::u16string_view | rFileNm, | ||
const OUString * | pFilterNm = nullptr , |
||
const OUString * | pRange = nullptr |
||
) |
Definition at line 453 of file linkmgr2.cxx.
References aBuf, sfx2::cTokenSeparator, sfx2::SvBaseLink::GetObjType(), InsertLink(), sfx2::isClientType(), and ONCALL.
|
private |
Definition at line 176 of file linkmgr2.cxx.
References Insert(), pLink, and pName.
Referenced by InsertFileLink().
bool sfx2::LinkManager::InsertServer | ( | SvLinkSource * | rObj | ) |
Definition at line 365 of file linkmgr2.cxx.
References aServerTbl, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert().
|
static |
Reconnect the server document shell to a DDE link object.
rPath | path to the server document |
rServer | server document shell instance |
rLink | link 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().
|
privatedelete |
void sfx2::LinkManager::ReconnectDdeLink | ( | SfxObjectShell & | rServer | ) |
Definition at line 402 of file linkmgr2.cxx.
References aURL, GetDisplayNames(), GetLinks(), SfxObjectShell::GetMedium(), SfxMedium::GetName(), i, LinkServerShell(), n, and p.
|
static |
Definition at line 497 of file linkmgr2.cxx.
References SotExchange::RegisterFormatName().
Referenced by SvFileObject::SendStateChg_Impl().
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.
void sfx2::LinkManager::Remove | ( | SvBaseLink const * | pLink | ) |
Definition at line 111 of file linkmgr2.cxx.
References aLinkTbl, tools::SvRef< typename T >::clear(), tools::SvRef< typename T >::get(), tools::SvRef< typename T >::is(), n, and pLink.
Referenced by UpdateAllLinks().
void sfx2::LinkManager::RemoveServer | ( | SvLinkSource * | rObj | ) |
Definition at line 374 of file linkmgr2.cxx.
References aServerTbl, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::erase().
|
inline |
Definition at line 90 of file linkmgr.hxx.
References p.
void sfx2::LinkManager::UpdateAllLinks | ( | bool | bAskUpdate, |
bool | bUpdateGrfLinks, | ||
weld::Window * | pParentWin | ||
) |
Definition at line 279 of file linkmgr2.cxx.
References aLinkTbl, aURL, sfx2::ClientGraphic, CloseCachedComps(), Application::CreateMessageDialog(), tools::SvRef< typename T >::get(), SfxObjectShell::getDocumentBaseURL(), SfxObjectShell::getEmbeddedObjectContainer(), i, tools::SvRef< typename T >::is(), n, pLink, pPersist, Remove(), RET_YES, comphelper::EmbeddedObjectContainer::setUserAllowsLinkUpdate(), and SfxResId().
|
private |
Definition at line 60 of file linkmgr.hxx.
Referenced by Insert(), Remove(), UpdateAllLinks(), and ~LinkManager().
|
private |
Definition at line 61 of file linkmgr.hxx.
Referenced by InsertServer(), and RemoveServer().
|
private |
Definition at line 58 of file linkmgr.hxx.
Referenced by CloseCachedComps(), and InsertCachedComp().
|
private |
Definition at line 63 of file linkmgr.hxx.
Referenced by UpdateAllLinks().