LibreOffice Module sc (master) 1
|
#include <tablink.hxx>
Public Member Functions | |
ScDocumentLoader (const OUString &rFileName, OUString &rFilterName, OUString &rOptions, sal_uInt32 nRekCnt=0, weld::Window *pInteractionParent=nullptr, css::uno::Reference< css::io::XInputStream > xInputStream=css::uno::Reference< css::io::XInputStream >()) | |
~ScDocumentLoader () | |
ScDocument * | GetDocument () |
ScDocShell * | GetDocShell () |
bool | IsError () const |
OUString | GetTitle () const |
void | ReleaseDocRef () |
Static Public Member Functions | |
static SfxMedium * | CreateMedium (const OUString &rFileName, std::shared_ptr< const SfxFilter > const &pFilter, const OUString &rOptions, weld::Window *pInteractionParent=nullptr) |
Create SfxMedium for stream read with SfxFilter and filter options set at the medium's SfxItemSet. More... | |
static OUString | GetOptions (const SfxMedium &rMedium) |
static bool | GetFilterName (const OUString &rFileName, OUString &rFilter, OUString &rOptions, bool bWithContent, bool bWithInteraction) |
Returns the filter name and options from a file name. More... | |
static void | RemoveAppPrefix (OUString &rFilterName) |
Private Attributes | |
ScDocShell * | pDocShell |
SfxObjectShellRef | aRef |
SfxMedium * | pMedium |
Definition at line 76 of file tablink.hxx.
ScDocumentLoader::ScDocumentLoader | ( | const OUString & | rFileName, |
OUString & | rFilterName, | ||
OUString & | rOptions, | ||
sal_uInt32 | nRekCnt = 0 , |
||
weld::Window * | pInteractionParent = nullptr , |
||
css::uno::Reference< css::io::XInputStream > | xInputStream = css::uno::Reference<css::io::XInputStream>() |
||
) |
Definition at line 514 of file tablink.cxx.
References aRef, CreateMedium(), SfxObjectShell::DoLoad(), ERRCODE_NONE, ScExtDocOptions::GetDocSettings(), ScDocShell::GetDocument(), SfxMedium::GetError(), ScDocument::GetExtDocOptions(), GetFilterName(), GetOptions(), ScExtDocSettings::mnLinkCnt, pDocShell, pMedium, ScDocument::SetExtDocOptions(), and SfxMedium::setStreamToLoadFrom().
ScDocumentLoader::~ScDocumentLoader | ( | ) |
Definition at line 551 of file tablink.cxx.
References aRef, tools::SvRef< typename T >::is(), and pMedium.
|
static |
Create SfxMedium for stream read with SfxFilter and filter options set at the medium's SfxItemSet.
Definition at line 492 of file tablink.cxx.
References comphelper::getProcessComponentContext(), weld::Window::GetXWindow(), SfxGetpApp(), and SfxMedium::UseInteractionHandler().
Referenced by ScAreaLink::Refresh(), and ScDocumentLoader().
|
inline |
Definition at line 90 of file tablink.hxx.
Referenced by ScViewFunc::InsertTableLink(), ScLinkedAreaDlg::LoadDocument(), and ScStyleFamiliesObj::loadStylesFromURL().
ScDocument * ScDocumentLoader::GetDocument | ( | ) |
Definition at line 572 of file tablink.cxx.
References ScDocShell::GetDocument(), and pDocShell.
Referenced by ScDocument::LinkExternalTab(), and ScContentTree::LoadFile().
|
static |
Returns the filter name and options from a file name.
bWithContent | true = Tries to detect the filter by looking at the file contents. false = Detects filter by file name extension only (should be used in filter code only). |
Definition at line 431 of file tablink.cxx.
References ERRCODE_NONE, SfxMedium::GetError(), SfxMedium::GetFilter(), SfxObjectShell::GetFirst(), SfxObjectShell::GetMedium(), SfxMedium::GetName(), SfxObjectShell::GetNext(), GetOptions(), ScDocShell::GetOwnFilterName(), INetURLObject::GetProtocol(), SfxFilterMatcher::GuessFilter(), SfxFilterMatcher::GuessFilterIgnoringContent(), SfxObjectShell::HasName(), utl::ConfigManager::IsFuzzing(), pMedium, and SfxMedium::UseInteractionHandler().
Referenced by ScXMLTableSourceContext::endFastElement(), ScDocShell::Execute(), IMPL_LINK_NOARG(), ScDocFunc::InsertAreaLink(), ScTableSheetObj::link(), ScExternalRefManager::loadSrcDocument(), ScExternalRefManager::maybeLinkExternalFile(), and ScDocumentLoader().
|
static |
Definition at line 423 of file tablink.cxx.
References SfxItemSet::GetItemIfSet(), and SfxMedium::GetItemSet().
Referenced by GetFilterName(), ScLinkedAreaDlg::GetOptions(), IMPL_LINK(), ScViewFunc::ImportTables(), ScExternalRefManager::loadSrcDocument(), ScAreaLink::Refresh(), ScTableLink::Refresh(), and ScDocumentLoader().
OUString ScDocumentLoader::GetTitle | ( | ) | const |
Definition at line 585 of file tablink.cxx.
References SfxObjectShell::GetTitle(), and pDocShell.
Referenced by ScContentTree::LoadFile().
bool ScDocumentLoader::IsError | ( | ) | const |
Definition at line 577 of file tablink.cxx.
References ERRCODE_NONE, SfxMedium::GetError(), pDocShell, and pMedium.
Referenced by ScViewFunc::InsertTableLink(), ScDocument::LinkExternalTab(), and ScContentTree::LoadFile().
void ScDocumentLoader::ReleaseDocRef | ( | ) |
Definition at line 559 of file tablink.cxx.
References aRef, tools::SvRef< typename T >::clear(), tools::SvRef< typename T >::is(), pDocShell, and pMedium.
Referenced by ScLinkedAreaDlg::LoadDocument().
|
static |
Definition at line 485 of file tablink.cxx.
References STRING_SCAPP.
Referenced by ScAreaLink::DataChanged(), ScTableLink::DataChanged(), ScDocShell::Execute(), ScDocFunc::InsertAreaLink(), and ScTableSheetObj::link().
|
private |
Definition at line 80 of file tablink.hxx.
Referenced by ReleaseDocRef(), ScDocumentLoader(), and ~ScDocumentLoader().
|
private |
Definition at line 79 of file tablink.hxx.
Referenced by GetDocument(), GetTitle(), IsError(), ReleaseDocRef(), and ScDocumentLoader().
|
private |
Definition at line 81 of file tablink.hxx.
Referenced by GetFilterName(), IsError(), ReleaseDocRef(), ScDocumentLoader(), and ~ScDocumentLoader().