LibreOffice Module sc (master) 1
|
#include <arealink.hxx>
Public Member Functions | |
ScAreaLink (SfxObjectShell *pShell, OUString aFile, OUString aFilter, OUString aOpt, OUString aArea, const ScRange &rDest, sal_Int32 nRefreshDelaySeconds) | |
virtual | ~ScAreaLink () override |
virtual void | Closed () override |
virtual ::sfx2::SvBaseLink::UpdateResult | DataChanged (const OUString &rMimeType, const css::uno::Any &rValue) override |
virtual void | Edit (weld::Window *, const Link< SvBaseLink &, void > &rEndEditHdl) override |
bool | Refresh (const OUString &rNewFile, const OUString &rNewFilter, const OUString &rNewArea, sal_Int32 nRefreshDelaySeconds) |
void | SetInCreate (bool bSet) |
void | SetDoInsert (bool bSet) |
void | SetDestArea (const ScRange &rNew) |
void | SetSource (const OUString &rDoc, const OUString &rFlt, const OUString &rOpt, const OUString &rArea) |
bool | IsEqual (std::u16string_view rFile, std::u16string_view rFilter, std::u16string_view rOpt, std::u16string_view rSource, const ScRange &rDest) const |
const OUString & | GetFile () const |
const OUString & | GetFilter () const |
const OUString & | GetOptions () const |
const OUString & | GetSource () const |
const ScRange & | GetDestArea () const |
DECL_DLLPRIVATE_LINK (RefreshHdl, Timer *, void) | |
Public Member Functions inherited from sfx2::SvBaseLink | |
virtual void | Closed () |
SvBaseLinkObjectType | GetObjType () const |
void | SetObj (SvLinkSource *pObj) |
SvLinkSource * | GetObj () const |
void | SetLinkSourceName (const OUString &rName) |
const OUString & | GetLinkSourceName () const |
virtual UpdateResult | DataChanged (const OUString &rMimeType, const css::uno::Any &rValue) |
void | SetUpdateMode (SfxLinkUpdateMode) |
SfxLinkUpdateMode | GetUpdateMode () const |
SotClipboardFormatId | GetContentType () const |
void | SetContentType (SotClipboardFormatId nType) |
LinkManager * | GetLinkManager () |
const LinkManager * | GetLinkManager () const |
void | SetLinkManager (LinkManager *_pMgr) |
bool | Update () |
void | Disconnect () |
virtual void | Edit (weld::Window *, const Link< SvBaseLink &, void > &rEndEditHdl) |
bool | IsVisible () const |
void | SetVisible (bool bFlag) |
bool | IsSynchron () const |
void | SetSynchron (bool bFlag) |
void | setStreamToLoadFrom (const css::uno::Reference< css::io::XInputStream > &xInputStream, bool bIsReadOnly) |
void | clearStreamToLoadFrom () |
bool | WasLastEditOK () const |
FileDialogHelper & | GetInsertFileDialog (const OUString &rFactory) |
Public Member Functions inherited from ScRefreshTimer | |
ScRefreshTimer () | |
ScRefreshTimer (sal_Int32 nSeconds) | |
ScRefreshTimer (const ScRefreshTimer &r) | |
virtual | ~ScRefreshTimer () override |
ScRefreshTimer & | operator= (const ScRefreshTimer &r) |
bool | operator== (const ScRefreshTimer &r) const |
bool | operator!= (const ScRefreshTimer &r) const |
void | SetRefreshControl (std::unique_ptr< ScRefreshTimerControl > const *pp) |
void | SetRefreshHandler (const Link< Timer *, void > &rLink) |
sal_Int32 | GetRefreshDelaySeconds () const |
void | StopRefreshTimer () |
void | SetRefreshDelay (sal_Int32 nSeconds) |
virtual SC_DLLPUBLIC void | Invoke () override |
Public Member Functions inherited from AutoTimer | |
AutoTimer (const char *pDebugName) | |
Public Member Functions inherited from Timer | |
Timer (const char *pDebugName) | |
Timer (const Timer &rTimer) | |
virtual | ~Timer () override |
Timer & | operator= (const Timer &rTimer) |
virtual void | Invoke () override |
void | Invoke (Timer *arg) |
void | SetInvokeHandler (const Link< Timer *, void > &rLink) |
void | ClearInvokeHandler () |
void | SetTimeout (sal_uInt64 nTimeoutMs) |
sal_uInt64 | GetTimeout () const |
virtual void | Start (bool bStartTimer=true) override |
Public Member Functions inherited from Task | |
Task (const char *pDebugName) | |
Task (const Task &rTask) | |
virtual | ~Task () COVERITY_NOEXCEPT_FALSE |
Task & | operator= (const Task &rTask) |
void | SetPriority (TaskPriority ePriority) |
TaskPriority | GetPriority () const |
const char * | GetDebugName () const |
virtual void | Invoke ()=0 |
virtual void | Start (bool bStartTimer=true) |
void | Stop () |
bool | IsActive () const |
void | SetStatic () |
bool | IsStatic () const |
Static Private Member Functions | |
static bool | FindExtRange (ScRange &rRange, const ScDocument &rSrcDoc, const OUString &rAreaName) |
Private Attributes | |
ScDocShell * | m_pDocSh |
OUString | aFileName |
OUString | aFilterName |
OUString | aOptions |
OUString | aSourceArea |
ScRange | aDestArea |
bool | bAddUndo |
bool | bInCreate |
bool | bDoInsert |
Additional Inherited Members | |
Public Types inherited from sfx2::SvBaseLink | |
enum | UpdateResult |
Public Attributes inherited from sfx2::SvBaseLink | |
SUCCESS | |
ERROR_GENERAL | |
Protected Member Functions inherited from sfx2::SvBaseLink | |
void | SetObjType (SvBaseLinkObjectType) |
void | SetName (const OUString &rLn) |
SvBaseLink () | |
SvBaseLink (SfxLinkUpdateMode nLinkType, SotClipboardFormatId nContentType) | |
virtual | ~SvBaseLink () override |
void | GetRealObject_ (bool bConnect=true) |
SvLinkSource * | GetRealObject () |
Protected Member Functions inherited from Timer | |
virtual void | SetDeletionFlags () override |
virtual sal_uInt64 | UpdateMinPeriod (sal_uInt64 nTimeNow) const override |
Timer (bool bAuto, const char *pDebugName) | |
Protected Member Functions inherited from Task | |
const ImplSchedulerData * | GetSchedulerData () const |
virtual void | SetDeletionFlags () |
virtual sal_uInt64 | UpdateMinPeriod (sal_uInt64 nTimeNow) const=0 |
Static Protected Member Functions inherited from Task | |
static void | StartTimer (sal_uInt64 nMS) |
Definition at line 30 of file arealink.hxx.
ScAreaLink::ScAreaLink | ( | SfxObjectShell * | pShell, |
OUString | aFile, | ||
OUString | aFilter, | ||
OUString | aOpt, | ||
OUString | aArea, | ||
const ScRange & | rDest, | ||
sal_Int32 | nRefreshDelaySeconds | ||
) |
Definition at line 50 of file arealink.cxx.
References ScDocShell::GetDocument(), ScDocument::GetRefreshTimerControlAddress(), LINK, m_pDocSh, ONCALL, ScRefreshTimer::SetRefreshControl(), ScRefreshTimer::SetRefreshHandler(), and SIMPLE_FILE.
|
overridevirtual |
Definition at line 71 of file arealink.cxx.
References ScRefreshTimer::StopRefreshTimer().
|
overridevirtual |
Reimplemented from sfx2::SvBaseLink.
Definition at line 135 of file arealink.cxx.
References SfxUndoManager::AddUndoAction(), aDestArea, aFileName, aFilterName, aOptions, aSourceArea, ScRange::aStart, bAddUndo, ScDocShell::GetDocument(), ScRefreshTimer::GetRefreshDelaySeconds(), ScDocShell::GetUndoManager(), ScDocument::IsUndoEnabled(), m_pDocSh, ScDocument::SetStreamValid(), and ScAddress::Tab().
|
overridevirtual |
Reimplemented from sfx2::SvBaseLink.
Definition at line 96 of file arealink.cxx.
References aSourceArea, bInCreate, sfx2::LinkManager::GetDisplayNames(), ScDocShell::GetDocument(), ScDocument::GetLinkManager(), ScRefreshTimer::GetRefreshDelaySeconds(), m_pDocSh, sfx2::MakeLnkName(), Refresh(), ScDocumentLoader::RemoveAppPrefix(), sfx2::SvBaseLink::SetName(), and sfx2::SvBaseLink::SUCCESS.
ScAreaLink::DECL_DLLPRIVATE_LINK | ( | RefreshHdl | , |
Timer * | , | ||
void | |||
) |
|
overridevirtual |
Definition at line 76 of file arealink.cxx.
References aFileName, aFilterName, aOptions, aSourceArea, ScAbstractDialogFactory::Create(), ScAbstractDialogFactory::CreateScLinkedAreaDlg(), ScRefreshTimer::GetRefreshDelaySeconds(), sfx2::MakeLnkName(), Refresh(), RET_OK, and sfx2::SvBaseLink::SetName().
|
staticprivate |
Definition at line 183 of file arealink.cxx.
References ScDBCollection::NamedDBs::findByUpperName(), ScRangeName::findByUpperName(), ScDocument::GetAddressConvention(), ScDBData::GetArea(), ScGlobal::getCharClass(), ScDocument::GetDBCollection(), ScDBCollection::getNamedDBs(), ScDocument::GetRangeName(), p, ScRange::ParseAny(), CharClass::uppercase(), and VALID.
Referenced by Refresh().
|
inline |
Definition at line 72 of file arealink.hxx.
Referenced by ScDocFunc::InsertAreaLink(), ScAreaLinkSaver::IsEqual(), and ScDocument::UpdateRefAreaLinks().
|
inline |
Definition at line 68 of file arealink.hxx.
Referenced by ScDocFunc::InsertAreaLink(), and ScAreaLinkSaver::IsEqualSource().
|
inline |
Definition at line 69 of file arealink.hxx.
Referenced by ScDocFunc::InsertAreaLink(), and ScAreaLinkSaver::IsEqualSource().
|
inline |
Definition at line 70 of file arealink.hxx.
Referenced by ScDocFunc::InsertAreaLink(), and ScAreaLinkSaver::IsEqualSource().
|
inline |
Definition at line 71 of file arealink.hxx.
Referenced by ScDocFunc::InsertAreaLink(), and ScAreaLinkSaver::IsEqualSource().
bool ScAreaLink::IsEqual | ( | std::u16string_view | rFile, |
std::u16string_view | rFilter, | ||
std::u16string_view | rOpt, | ||
std::u16string_view | rSource, | ||
const ScRange & | rDest | ||
) | const |
Definition at line 175 of file arealink.cxx.
References aDestArea, aFileName, aFilterName, aOptions, aSourceArea, and ScRange::aStart.
bool ScAreaLink::Refresh | ( | const OUString & | rNewFile, |
const OUString & | rNewFilter, | ||
const OUString & | rNewArea, | ||
sal_Int32 | nRefreshDelaySeconds | ||
) |
check CanFitBlock only if bDoInsert is set?
ResetAttrib at document !!!
cell protection ???
Link dialog must set default parent
also notify Uno objects if file name was changed!
Definition at line 222 of file arealink.cxx.
References SfxUndoManager::AddUndoAction(), aDestArea, ScDocShell::AdjustRowHeight(), ScRange::aEnd, aFileName, aFilterName, ALL, aOptions, ScDocument::ApplyPatternAreaTab(), aSourceArea, ScRange::aStart, bAddUndo, bDoInsert, ScDocument::BroadcastUno(), ScDocument::CanFitBlock(), ScAddress::Col(), ScDocument::CopyFromClip(), ScDocument::CopyToClip(), ScDocument::CopyToDocument(), ScDocumentLoader::CreateMedium(), Application::CreateMessageDialog(), ScDocument::DeleteAreaTab(), SfxObjectShell::DoClose(), SfxObjectShell::DoLoad(), FindExtRange(), ScDocument::FitBlock(), FORMULA, ScFormatFilter::Get(), ScGlobal::GetAbsDocName(), ScDocument::GetCellArea(), SfxObjectShell::GetDialogParent(), ScDocShell::GetDocument(), SfxObjectShell::GetEmbeddedObjectContainer(), SfxObjectShell::GetFactory(), SfxFilterContainer::GetFilter4FilterName(), SfxObjectFactory::GetFilterContainer(), Application::GetFrameWeld(), ScFormatFilterPlugin::GetHTMLRangeNameList(), ScPatternAttr::GetItemSet(), ScDocumentLoader::GetOptions(), ScDocument::GetPool(), ScRefreshTimer::GetRefreshDelaySeconds(), ScDocument::GetSheetLimits(), ScDocument::GetTableCount(), ScDocShell::GetUndoManager(), comphelper::EmbeddedObjectContainer::getUserAllowsLinkUpdate(), ScDocShell::GetWebQueryFilterName(), Grid, ScDocument::HasAttrib(), ScDocument::IsUndoEnabled(), m_pDocSh, ScDocument::MaxCol(), ScDocument::MaxRow(), MAXTAB, Merged, NOTE, Overlapped, ScDocShell::PostPaint(), ScRangeList::push_back(), SfxItemSet::Put(), ScAddress::Row(), SC_TEXT_CSV_FILTER_NAME, SCDOCMODE_CLIP, SCDOCMODE_UNDO, ScResId(), ScMarkData::SelectOneTable(), ScLinkRefreshedHint::SetAreaLink(), ScAddress::SetCol(), ScDocShellModificator::SetDocumentModified(), ScDocument::SetInLinkUpdate(), ScMarkData::SetMarkArea(), ScRefreshTimer::SetRefreshDelay(), ScAddress::SetRow(), ScDocument::SetString(), ScRangeList::size(), ScAddress::Tab(), and ScDocument::ValidColRow().
Referenced by DataChanged(), and Edit().
void ScAreaLink::SetDestArea | ( | const ScRange & | rNew | ) |
Definition at line 156 of file arealink.cxx.
References aDestArea.
Referenced by ScAreaLinkSaver::WriteToLink().
|
inline |
Definition at line 60 of file arealink.hxx.
|
inline |
Definition at line 59 of file arealink.hxx.
void ScAreaLink::SetSource | ( | const OUString & | rDoc, |
const OUString & | rFlt, | ||
const OUString & | rOpt, | ||
const OUString & | rArea | ||
) |
Definition at line 161 of file arealink.cxx.
References aFileName, aFilterName, aOptions, aSourceArea, sfx2::MakeLnkName(), and sfx2::SvBaseLink::SetName().
|
private |
Definition at line 38 of file arealink.hxx.
Referenced by Closed(), IsEqual(), Refresh(), and SetDestArea().
|
private |
Definition at line 34 of file arealink.hxx.
Referenced by Closed(), Edit(), IsEqual(), Refresh(), and SetSource().
|
private |
Definition at line 35 of file arealink.hxx.
Referenced by Closed(), Edit(), IsEqual(), Refresh(), and SetSource().
|
private |
Definition at line 36 of file arealink.hxx.
Referenced by Closed(), Edit(), IsEqual(), Refresh(), and SetSource().
|
private |
Definition at line 37 of file arealink.hxx.
Referenced by Closed(), DataChanged(), Edit(), IsEqual(), Refresh(), and SetSource().
|
private |
Definition at line 39 of file arealink.hxx.
|
private |
Definition at line 41 of file arealink.hxx.
Referenced by Refresh().
|
private |
Definition at line 40 of file arealink.hxx.
Referenced by DataChanged().
|
private |
Definition at line 33 of file arealink.hxx.
Referenced by Closed(), DataChanged(), Refresh(), and ScAreaLink().