LibreOffice Module framework (master) 1
|
implements general mechanism for loading documents. More...
#include <loadenv.hxx>
Public Types | |
enum | EContentType { E_UNSUPPORTED_CONTENT , E_CAN_BE_HANDLED , E_CAN_BE_LOADED , E_CAN_BE_SET } |
classify a content. More... | |
Public Member Functions | |
LoadEnv (css::uno::Reference< css::uno::XComponentContext > xContext) | |
initialize a new instance of this load environment. More... | |
~LoadEnv () | |
deinitialize an instance of this class in the right way. More... | |
void | startLoading (const OUString &sURL, const css::uno::Sequence< css::beans::PropertyValue > &lMediaDescriptor, const css::uno::Reference< css::frame::XFrame > &xBaseFrame, const OUString &sTarget, sal_Int32 nSearchFlags, LoadEnvFeatures eFeature=LoadEnvFeatures::NONE) |
start loading of a resource More... | |
bool | waitWhileLoading (sal_uInt32 nTimeout=0) |
wait for an already running load request (started by calling startLoading() before). More... | |
css::uno::Reference< css::lang::XComponent > | getTargetComponent () const |
TODO document me ... More... | |
void | impl_setResult (bool bResult) |
TODO document me ... More... | |
css::uno::Reference< css::uno::XInterface > | impl_searchLoader () |
TODO document me ... More... | |
void | impl_reactForLoadingState () |
it means; show the frame, bring it to front, might set the right icon etcpp. More... | |
Static Public Member Functions | |
static css::uno::Reference< css::lang::XComponent > | loadComponentFromURL (const css::uno::Reference< css::frame::XComponentLoader > &xLoader, const css::uno::Reference< css::uno::XComponentContext > &xContext, const OUString &sURL, const OUString &sTarget, sal_Int32 nFlags, const css::uno::Sequence< css::beans::PropertyValue > &lArgs) |
static EContentType | classifyContent (const OUString &sURL, const css::uno::Sequence< css::beans::PropertyValue > &lMediaDescriptor) |
checks if the specified content can be handled by a ContentHandler only and is not related to a target frame, or if it can be loaded by a FrameLoader into a target frame as "visible" component. More... | |
static void | initializeUIDefaults (const css::uno::Reference< css::uno::XComponentContext > &i_rxContext, utl::MediaDescriptor &io_lMediaDescriptor, const bool _bUIMode, rtl::Reference< QuietInteraction > *o_ppQuiteInteraction) |
TODO document me ... More... | |
Private Member Functions | |
void | start () |
void | impl_detectTypeAndFilter () |
tries to detect the type and the filter of the specified content. More... | |
bool | impl_handleContent () |
tries to use ContentHandler objects for loading. More... | |
bool | impl_loadContent () |
tries to use FrameLoader objects for loading. More... | |
css::uno::Reference< css::frame::XFrame > | impl_searchAlreadyLoaded () |
checks if the specified content is already loaded. More... | |
css::uno::Reference< css::frame::XFrame > | impl_searchRecycleTarget () |
search for any target frame, which seems to be usable for this load request. More... | |
void | impl_makeFrameWindowVisible (const css::uno::Reference< css::awt::XWindow > &xWindow, bool bForceToFront) |
because showing of a frame is needed more than once... it's implemented as a separate method . More... | |
bool | impl_isFrameAlreadyUsedForLoading (const css::uno::Reference< css::frame::XFrame > &xFrame) const |
checks whether a frame is already used for another load request or not. More... | |
void | impl_applyPersistentWindowState (const css::uno::Reference< css::awt::XWindow > &xWindow) |
try to determine the used application module of this load request and apply right position and size for this document window... hopefully before we show it . More... | |
bool | impl_furtherDocsAllowed () |
determine if it's allowed to open new document frames. More... | |
void | impl_jumpToMark (const css::uno::Reference< css::frame::XFrame > &xFrame, const css::util::URL &aURL) |
jumps to the requested bookmark inside a given document. More... | |
bool | impl_filterHasInteractiveDialog () const |
determine if this loader has an interactive dialog shown before loading the document. More... | |
bool | shouldFocusAndToFront () const |
checks if this should bring to front and get focus on load, according to user settings and to the load flags. More... | |
Private Attributes | |
osl::Mutex | m_mutex |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
reference to a uno service manager, which must be used to created on needed services on demand. More... | |
css::uno::Reference< css::frame::XFrame > | m_xBaseFrame |
points to the frame, which uses this LoadEnv object and must be used to start target search there. More... | |
css::uno::Reference< css::frame::XFrame > | m_xTargetFrame |
points to the frame, into which the new component was loaded. More... | |
OUString | m_sTarget |
contains the name of the target, in which the specified resource of this instance must be loaded. More... | |
sal_Int32 | m_nSearchFlags |
if m_sTarget is not a special one, this flags regulate searching of a suitable one. More... | |
utl::MediaDescriptor | m_lMediaDescriptor |
contains all needed information about the resource, which should be loaded. More... | |
css::util::URL | m_aURL |
because the mediadescriptor contains the complete URL ... but some functionality need the structured version, we hold it twice :-(. More... | |
LoadEnvFeatures | m_eFeature |
enable/disable special features of a load request. More... | |
EContentType | m_eContentType |
classify the content, which should be loaded by this instance. More... | |
bool | m_bCloseFrameOnError |
it indicates, that the member m_xTargetFrame was new created for this load request and must be closed in case loading (not handling!) operation failed. More... | |
bool | m_bReactivateControllerOnError |
it indicates, that the old document (which was located inside m_xBaseFrame in combination with the m_sTarget value "_self") was suspended. More... | |
css::uno::Reference< css::uno::XInterface > | m_xAsynchronousJob |
it holds one (!) asynchronous used contenthandler or frameloader alive, till the asynchronous operation will be finished. More... | |
bool | m_bLoaded |
holds the information about the finished load process. More... | |
bool | m_bFocusedAndToFront = false |
If we already brought it to front; do not do that again (the user could switch elsewhere after the first activation, and we shouldn't nag them again). More... | |
ActionLockGuard | m_aTargetLock |
holds an XActionLock on the internal used task member. More... | |
rtl::Reference< QuietInteraction > | m_pQuietInteraction |
implements general mechanism for loading documents.
@descr An instance of this class can be used inside the API calls XComponentLoader::loadComponentFromURL() and XDispatch::dispatch().
Definition at line 67 of file loadenv.hxx.
classify a content.
@descr The load environment must know, if a content is related to a target frame or not. Only "visible" components, which fulfill the requirements of the model-controller-view paradigm can be loaded into a frame. Such contents are classified as E_CAN_BE_LOADED.
But e.g. for the dispatch framework exists special ContentHandler objects, which can load a content in "non visible" mode ... and do not need a target frame for its operation. Such ContentHandler e.g. plays sounds. Such contents are classified as E_CAN_BE_HANDLED.
And last but not least a content can be "not valid" in general.
Definition at line 86 of file loadenv.hxx.
framework::LoadEnv::LoadEnv | ( | css::uno::Reference< css::uno::XComponentContext > | xContext | ) |
initialize a new instance of this load environment.
xContext | reference to a uno service manager, which can be used internally to create on needed services on demand. |
Currently | there is no reason to throw such exception! |
A | RuntimeException in case any internal process indicates, that the whole runtime can't be used any longer. |
Definition at line 134 of file loadenv.cxx.
References NONE.
framework::LoadEnv::~LoadEnv | ( | ) |
deinitialize an instance of this class in the right way.
Definition at line 145 of file loadenv.cxx.
|
static |
checks if the specified content can be handled by a ContentHandler only and is not related to a target frame, or if it can be loaded by a FrameLoader into a target frame as "visible" component.
@descr using: switch(classifyContent(...)) { case E_CAN_BE_HANDLED : handleIt(...); break;
case E_CAN_BE_LOADED : xFrame = locateTargetFrame(); loadIt(xFrame); break;
case E_NOT_A_CONTENT : default : throw ...; }
sURL | describe the content. |
lMediaDescriptor | describe the content more detailed! |
Definition at line 544 of file loadenv.cxx.
References E_CAN_BE_HANDLED, E_CAN_BE_LOADED, E_CAN_BE_SET, E_UNSUPPORTED_CONTENT, framework::ProtocolCheck::isProtocol(), framework::Macro, framework::MailTo, framework::News, framework::PrivateFactory, framework::PrivateObject, framework::PrivateStream, utl::MediaDescriptor::PROP_INPUTSTREAM, utl::MediaDescriptor::PROP_MODEL, PROP_TYPES, SAL_INFO, framework::Service, framework::Slot, sType, framework::Uno, xModel, and xStream.
Referenced by framework::DispatchProvider::implts_isLoadableContent(), and startLoading().
css::uno::Reference< css::lang::XComponent > framework::LoadEnv::getTargetComponent | ( | ) | const |
TODO document me ...
Definition at line 460 of file loadenv.cxx.
References m_mutex, m_xTargetFrame, xController, and xModel.
Referenced by framework::LoadDispatcher::impl_dispatch(), and loadComponentFromURL().
|
private |
try to determine the used application module of this load request and apply right position and size for this document window... hopefully before we show it .
-)
Definition at line 1720 of file loadenv.cxx.
References framework::FILTER_PROPNAME_ASCII_DOCUMENTSERVICE, VclPtr< class reference_type >::get(), comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), VCLUnoHelper::GetWindow(), comphelper::LibreOfficeKit::isActive(), WorkWindow::IsMinimized(), m_lMediaDescriptor, m_mutex, m_xContext, utl::MediaDescriptor::PROP_FILTERNAME, comphelper::ConfigurationHelper::readRelativeKey(), framework::SERVICENAME_FILTERFACTORY, and SystemWindow::SetWindowState().
Referenced by impl_loadContent().
|
private |
tries to detect the type and the filter of the specified content.
@descr This method update the available media descriptor of this instance, so it contains the right type, a corresponding filter, may a valid frame loader etc. In case detection failed, this descriptor is corrected first, before a suitable exception will be thrown. (Excepting a RuntimeException occurrence!)
A | LoadEnvException if detection failed. |
A | RuntimeException in case any internal process indicates, that the whole runtime can't be used any longer. |
Definition at line 737 of file loadenv.cxx.
References comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), framework::LoadEnvException::ID_UNSUPPORTED_CONTENT, m_lMediaDescriptor, m_mutex, m_xContext, utl::MediaDescriptor::PROP_ABORTED, utl::MediaDescriptor::PROP_ASTEMPLATE, utl::MediaDescriptor::PROP_DOCUMENTSERVICE, utl::MediaDescriptor::PROP_FILTERNAME, utl::MediaDescriptor::PROP_FILTERPROVIDER, utl::MediaDescriptor::PROP_TYPENAME, framework::SERVICENAME_FILTERFACTORY, and sType.
Referenced by start().
|
private |
determine if this loader has an interactive dialog shown before loading the document.
Definition at line 991 of file loadenv.cxx.
References comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), m_aURL, m_lMediaDescriptor, m_xContext, utl::MediaDescriptor::PROP_FILTERNAME, and framework::SERVICENAME_FILTERFACTORY.
Referenced by impl_loadContent().
|
private |
determine if it's allowed to open new document frames.
Definition at line 921 of file loadenv.cxx.
References BackingComponent, framework::InteractionRequest::CreateRequest(), ERRCODE_SFX_NOMOREDOCUMENTSALLOWED, Help, Hidden, m_lMediaDescriptor, m_mutex, m_xContext, utl::MediaDescriptor::PROP_INTERACTIONHANDLER, and x.
Referenced by impl_loadContent().
|
private |
tries to use ContentHandler objects for loading.
@descr It searches for a suitable content handler object, registered for the detected content type (must be done before by calling impl_detectTypeAndFilter()). Because such handler does not depend from a real target frame, location of such frame will be suppressed here. In case handle failed all new created resources will be removed before a suitable exception is thrown. (Excepting a RuntimeException occurrence!)
A | LoadEnvException if handling failed. |
A | RuntimeException in case any internal process indicates, that the whole runtime can't be used any longer. |
Definition at line 862 of file loadenv.cxx.
References aURL, comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), framework::LoadEnvException::ID_INVALID_MEDIADESCRIPTOR, m_aURL, m_lMediaDescriptor, m_mutex, m_xAsynchronousJob, m_xContext, PROP_NAME, utl::MediaDescriptor::PROP_TYPENAME, PROP_TYPES, and sType.
Referenced by start().
|
private |
checks whether a frame is already used for another load request or not.
@descr Such frames can't be used for our "recycle feature"!
xFrame | the frame, which should be checked. |
Definition at line 1436 of file loadenv.cxx.
References xFrame.
Referenced by impl_searchRecycleTarget().
|
private |
jumps to the requested bookmark inside a given document.
Definition at line 1251 of file loadenv.cxx.
References aURL, comphelper::SequenceAsHashMap::getAsConstPropertyValueList(), m_mutex, m_xContext, framework::SPECIALTARGET_SELF, and xFrame.
Referenced by impl_searchAlreadyLoaded().
|
private |
tries to use FrameLoader objects for loading.
@descr First the target frame will be located. If it could be found or new created a filter/frame loader will be instantiated and used to load the content into this frame. In case loading failed all new created resources will be removed before a suitable exception is thrown. (Excepting a RuntimeException occurrence!)
A | LoadEnvException if loading failed. |
A | RuntimeException in case any internal process indicates, that the whole runtime can't be used any longer. |
Definition at line 1023 of file loadenv.cxx.
References aArguments, framework::TargetHelper::Blank, framework::TaskCreator::createTask(), framework::TargetHelper::Default, framework::LoadEnvException::ID_NO_TARGET_FOUND, impl_applyPersistentWindowState(), impl_filterHasInteractiveDialog(), impl_furtherDocsAllowed(), impl_makeFrameWindowVisible(), impl_searchAlreadyLoaded(), impl_searchLoader(), impl_searchRecycleTarget(), impl_setResult(), comphelper::InitAnyPropertySequence(), m_aTargetLock, m_aURL, m_bCloseFrameOnError, m_bFocusedAndToFront, m_lMediaDescriptor, m_mutex, m_nSearchFlags, m_sTarget, m_xAsynchronousJob, m_xBaseFrame, m_xContext, m_xTargetFrame, framework::TargetHelper::matchSpecialTarget(), utl::MediaDescriptor::PROP_HIDDEN, utl::MediaDescriptor::PROP_INTERACTIONHANDLER, utl::MediaDescriptor::PROP_MINIMIZED, utl::MediaDescriptor::PROP_PREVIEW, utl::MediaDescriptor::PROP_STATUSINDICATOR, framework::ActionLockGuard::setResource(), shouldFocusAndToFront(), and framework::SPECIALTARGET_BLANK.
Referenced by start().
|
private |
because showing of a frame is needed more than once... it's implemented as a separate method .
-)
@descr Note: Showing of a frame is bound to a special feature... a) If we recycle any existing frame, we must bring it to front. Showing of such frame is not needed really... because we recycle visible frames only! b) If the document was already shown (e.g. by our progress implementation) we do nothing here. The reason behind: The document was already shown... and it was already make a top window... If the user activated another frame inbetween (because loading needed some time) it's not allowed to disturb the user again. Then the frame must resists in the background. c) If the frame was not shown before... but loading of a visible document into this frame was finished... we need both actions: setVisible() and toFront().
xWindow | points to the container window of a frame. |
bForceToFront | if it's set to sal_False... showing of the window is done more intelligent. setVisible() is called only if the window was not shown before. This mode is needed by b) and c) If it's set to sal_True... both actions has to be done: setVisible(), toFront()! This mode is needed by a) |
Definition at line 1706 of file loadenv.cxx.
References VCLUnoHelper::GetWindow().
Referenced by impl_loadContent(), and impl_reactForLoadingState().
void framework::LoadEnv::impl_reactForLoadingState | ( | ) |
it means; show the frame, bring it to front, might set the right icon etcpp.
in case loading was successfully or reactivate a might existing old document or close the frame if it was created before in case loading failed.
A | LoadEnvException only in cases, where an internal error indicates, that the complete load environment seems to be not usable in general. In such cases a RuntimeException would be to hard for the outside code :-) |
A | RuntimeException in case any internal process indicates, that the whole runtime can't be used any longer. |
Definition at line 1583 of file loadenv.cxx.
References framework::ActionLockGuard::freeResource(), VclPtr< class reference_type >::get(), VCLUnoHelper::GetWindow(), framework::LoadEnvException::ID_COULD_NOT_REACTIVATE_CONTROLLER, framework::LoadEnvException::ID_GENERAL_ERROR, impl_makeFrameWindowVisible(), framework::TargetHelper::isValidNameForFrame(), m_aTargetLock, m_bCloseFrameOnError, m_bFocusedAndToFront, m_bLoaded, m_bReactivateControllerOnError, m_lMediaDescriptor, m_mutex, m_pQuietInteraction, m_xTargetFrame, utl::MediaDescriptor::PROP_FRAMENAME, utl::MediaDescriptor::PROP_HIDDEN, utl::MediaDescriptor::PROP_MINIMIZED, sFrameName, and shouldFocusAndToFront().
Referenced by impl_setResult().
|
private |
checks if the specified content is already loaded.
@descr It depends from the set target information, if such search is allowed or not! So this method checks first, if the target is the special one "_default". If not it returns with an empty result immediately! In case search is allowed, an existing document with the same URL is searched. If it could be found, the corresponding view will get the focus and this method return the corresponding frame. Optional jumpmarks will be accepted here too. So the view of the document will be updated to show the position inside the document, which is related to the jumpmark.
A | LoadEnvException only in cases, where an internal error indicates, that the complete load environment seems to be not usable in general. In such cases a RuntimeException would be to hard for the outside code :-) |
A | RuntimeException in case any internal process indicates, that the whole runtime can't be used any longer. |
Definition at line 1282 of file loadenv.cxx.
References count, framework::TargetHelper::Default, i, impl_jumpToMark(), framework::ProtocolCheck::isProtocol(), m_aURL, m_lMediaDescriptor, m_mutex, m_sTarget, m_xContext, framework::TargetHelper::matchSpecialTarget(), framework::PrivateObject, framework::PrivateStream, utl::MediaDescriptor::PROP_ASTEMPLATE, utl::MediaDescriptor::PROP_HIDDEN, utl::MediaDescriptor::PROP_OPENNEWVIEW, utl::MediaDescriptor::PROP_VERSION, xController, and xModel.
Referenced by impl_loadContent().
css::uno::Reference< css::uno::XInterface > framework::LoadEnv::impl_searchLoader | ( | ) |
TODO document me ...
Definition at line 1191 of file loadenv.cxx.
References E_CAN_BE_SET, comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), framework::LoadEnvException::ID_INVALID_ENVIRONMENT, framework::LoadEnvException::ID_INVALID_MEDIADESCRIPTOR, m_eContentType, m_lMediaDescriptor, m_mutex, m_xContext, PROP_NAME, utl::MediaDescriptor::PROP_TYPENAME, PROP_TYPES, and sType.
Referenced by impl_loadContent().
|
private |
search for any target frame, which seems to be usable for this load request.
@descr Because this special feature is bound to the target specifier "_default" its checked inside first. If it's not set => this method return an empty reference. Otherwise any currently existing frame will be analyzed, if it can be used here. The following rules exists:
If a suitable target is located it will be locked. That's why the last rule exists! If this method returns a valid frame reference, it was locked to be usable for this load request only. (Don't forget to reset this state later!) Concurrent LoadEnv instances can synchronize her work be using such locks :-) HOPEFULLY
A | LoadEnvException only in cases, where an internal error indicates, that the complete load environment seems to be not usable in general. In such cases a RuntimeException would be to hard for the outside code :-) |
A | RuntimeException in case any internal process indicates, that the whole runtime can't be used any longer. |
Definition at line 1450 of file loadenv.cxx.
References BackingComponent, SvtModuleOptions::ClassifyFactoryByModel(), SvtModuleOptions::ClassifyFactoryByURL(), VCLUnoHelper::GetWindow(), impl_isFrameAlreadyUsedForLoading(), framework::ProtocolCheck::isProtocol(), m_aTargetLock, m_aURL, m_bReactivateControllerOnError, m_lMediaDescriptor, m_mutex, m_xContext, framework::PrivateFactory, framework::PrivateObject, framework::PrivateStream, utl::MediaDescriptor::PROP_ASTEMPLATE, utl::MediaDescriptor::PROP_HIDDEN, utl::MediaDescriptor::PROP_OPENNEWVIEW, utl::MediaDescriptor::PROP_REPLACEABLE, framework::ActionLockGuard::setResource(), xController, and xModel.
Referenced by impl_loadContent().
void framework::LoadEnv::impl_setResult | ( | bool | bResult | ) |
TODO document me ...
Definition at line 526 of file loadenv.cxx.
References impl_reactForLoadingState(), m_bLoaded, m_mutex, and m_xAsynchronousJob.
Referenced by impl_loadContent().
|
static |
TODO document me ...
Definition at line 311 of file loadenv.cxx.
References BackingComponent, utl::MediaDescriptor::PROP_AUTHENTICATIONHANDLER, utl::MediaDescriptor::PROP_INTERACTIONHANDLER, utl::MediaDescriptor::PROP_MACROEXECUTIONMODE, and utl::MediaDescriptor::PROP_UPDATEDOCMODE.
Referenced by startLoading().
|
static |
css::lang::IllegalArgumentException | |
css::io::IOException | |
css::uno::RuntimeException |
Definition at line 149 of file loadenv.cxx.
References ex, comphelper::NamedValueCollection::get(), getTargetComponent(), framework::LoadEnvException::ID_INVALID_MEDIADESCRIPTOR, framework::LoadEnvException::ID_UNSUPPORTED_CONTENT, Application::IsHeadlessModeEnabled(), NONE, SAL_WARN, startLoading(), u, waitWhileLoading(), and WorkWithUI.
Referenced by framework::Desktop::loadComponentFromURL().
|
private |
checks if this should bring to front and get focus on load, according to user settings and to the load flags.
Definition at line 1698 of file loadenv.cxx.
References m_lMediaDescriptor, and utl::MediaDescriptor::PROP_PREVIEW.
Referenced by impl_loadContent(), and impl_reactForLoadingState().
|
private |
Definition at line 371 of file loadenv.cxx.
References AllowContentHandler, E_CAN_BE_SET, E_UNSUPPORTED_CONTENT, framework::LoadEnvException::ID_GENERAL_ERROR, framework::LoadEnvException::ID_STILL_RUNNING, framework::LoadEnvException::ID_UNSUPPORTED_CONTENT, impl_detectTypeAndFilter(), impl_handleContent(), impl_loadContent(), m_eContentType, m_eFeature, m_mutex, and m_xAsynchronousJob.
Referenced by startLoading().
void framework::LoadEnv::startLoading | ( | const OUString & | sURL, |
const css::uno::Sequence< css::beans::PropertyValue > & | lMediaDescriptor, | ||
const css::uno::Reference< css::frame::XFrame > & | xBaseFrame, | ||
const OUString & | sTarget, | ||
sal_Int32 | nSearchFlags, | ||
LoadEnvFeatures | eFeature = LoadEnvFeatures::NONE |
||
) |
start loading of a resource
@descr The parameter for targeting, the content description, and some environment specifier (UI, dispatch functionality) can be set here. Of course a still running load request will be detected here and a suitable exception will be thrown. Such constellation can be detected outside by using provided synchronisation methods or callbacks.
There is no direct return value possible here. Because it depends from the usage of this instance! E.g. for loading a "visible component" a frame with a controller/model inside can be possible. For loading of a "non visible component" only an information about a successfully start can be provided. Further it can't be guaranteed, that the internal process runs synchronous. that's why we prefer using of specialized methods afterwards e.g. to:
sURL | points to the resource, which should be loaded. |
lMediaDescriptor | contains additional information for the following load request. |
xBaseFrame | points to the frame which must be used as start point for target search. |
sTarget | regulate searching/creating of frames, which should contain the new loaded component afterwards. |
nSearchFlags | regulate searching of targets, if sTarget is not a special one. |
eFeature | flag field, which enable/disable special features of this new instance for following load call. |
A | LoadEnvException e.g. if another load operation is till in progress or initialization of a new one fail by other reasons. The real reason, a suitable message and ID will be given here immediately. |
A | RuntimeException in case any internal process indicates, that the whole runtime can't be used any longer. |
Definition at line 231 of file loadenv.cxx.
References classifyContent(), E_UNSUPPORTED_CONTENT, framework::LoadEnvException::ID_STILL_RUNNING, framework::LoadEnvException::ID_UNSUPPORTED_CONTENT, initializeUIDefaults(), comphelper::LibreOfficeKit::isActive(), tools::IsMappedWebDAVPath(), m_aURL, m_bCloseFrameOnError, m_bLoaded, m_bReactivateControllerOnError, m_eContentType, m_eFeature, m_lMediaDescriptor, m_mutex, m_nSearchFlags, m_pQuietInteraction, m_sTarget, m_xAsynchronousJob, m_xBaseFrame, m_xContext, m_xTargetFrame, utl::MediaDescriptor::PROP_FILENAME, utl::MediaDescriptor::PROP_HIDDEN, utl::MediaDescriptor::PROP_INTERACTIONHANDLER, utl::MediaDescriptor::PROP_JUMPMARK, utl::MediaDescriptor::PROP_PREVIEW, utl::MediaDescriptor::PROP_SILENT, utl::MediaDescriptor::PROP_URL, start(), and WorkWithUI.
Referenced by framework::LoadDispatcher::impl_dispatch(), and loadComponentFromURL().
bool framework::LoadEnv::waitWhileLoading | ( | sal_uInt32 | nTimeout = 0 | ) |
wait for an already running load request (started by calling startLoading() before).
@descr The timeout parameter can be used to wait some times only or forever. The return value indicates if the load request was finished during the specified timeout period. But it indicates not, if the load request was successful or not!
nTimeout | specify a timeout in [ms]. A value 0 let it wait forever! |
... | currently not used :-) |
A | RuntimeException in case any internal process indicates, that the whole runtime can't be used any longer. |
Definition at line 426 of file loadenv.cxx.
References Application::IsQuit(), m_mutex, m_xAsynchronousJob, and Application::Yield().
Referenced by framework::LoadDispatcher::impl_dispatch(), and loadComponentFromURL().
|
private |
holds an XActionLock on the internal used task member.
@seealso m_xTargetFrame
Definition at line 192 of file loadenv.hxx.
Referenced by impl_loadContent(), impl_reactForLoadingState(), and impl_searchRecycleTarget().
|
private |
because the mediadescriptor contains the complete URL ... but some functionality need the structured version, we hold it twice :-(.
Definition at line 147 of file loadenv.hxx.
Referenced by impl_filterHasInteractiveDialog(), impl_handleContent(), impl_loadContent(), impl_searchAlreadyLoaded(), impl_searchRecycleTarget(), and startLoading().
|
private |
it indicates, that the member m_xTargetFrame was new created for this load request and must be closed in case loading (not handling!) operation failed.
The default value is sal_False!
Definition at line 159 of file loadenv.hxx.
Referenced by impl_loadContent(), impl_reactForLoadingState(), and startLoading().
|
private |
If we already brought it to front; do not do that again (the user could switch elsewhere after the first activation, and we shouldn't nag them again).
Definition at line 186 of file loadenv.hxx.
Referenced by impl_loadContent(), and impl_reactForLoadingState().
|
private |
holds the information about the finished load process.
@descr The content of m_xTargetFrame can't be used as valid indicator, (in case the existing old document was reactivated) we must hold the result of the load process explicitly.
Definition at line 180 of file loadenv.hxx.
Referenced by impl_reactForLoadingState(), impl_setResult(), and startLoading().
|
private |
it indicates, that the old document (which was located inside m_xBaseFrame in combination with the m_sTarget value "_self") was suspended.
Normally it will be replaced by the new loaded document. But in case loading (not handling!) failed, it must be reactivated. The default value is sal_False!
Definition at line 167 of file loadenv.hxx.
Referenced by impl_reactForLoadingState(), impl_searchRecycleTarget(), and startLoading().
|
private |
classify the content, which should be loaded by this instance.
Definition at line 153 of file loadenv.hxx.
Referenced by impl_searchLoader(), start(), and startLoading().
|
private |
enable/disable special features of a load request.
Definition at line 150 of file loadenv.hxx.
Referenced by start(), and startLoading().
|
private |
contains all needed information about the resource, which should be loaded.
@descr Inside this struct e.g. the URL, its type and filter name, the stream or a model directly are saved.
Definition at line 142 of file loadenv.hxx.
Referenced by impl_applyPersistentWindowState(), impl_detectTypeAndFilter(), impl_filterHasInteractiveDialog(), impl_furtherDocsAllowed(), impl_handleContent(), impl_loadContent(), impl_reactForLoadingState(), impl_searchAlreadyLoaded(), impl_searchLoader(), impl_searchRecycleTarget(), shouldFocusAndToFront(), and startLoading().
|
mutableprivate |
Definition at line 99 of file loadenv.hxx.
Referenced by getTargetComponent(), impl_applyPersistentWindowState(), impl_detectTypeAndFilter(), impl_furtherDocsAllowed(), impl_handleContent(), impl_jumpToMark(), impl_loadContent(), impl_reactForLoadingState(), impl_searchAlreadyLoaded(), impl_searchLoader(), impl_searchRecycleTarget(), impl_setResult(), start(), startLoading(), and waitWhileLoading().
|
private |
if m_sTarget is not a special one, this flags regulate searching of a suitable one.
Definition at line 134 of file loadenv.hxx.
Referenced by impl_loadContent(), and startLoading().
|
private |
Definition at line 194 of file loadenv.hxx.
Referenced by impl_reactForLoadingState(), and startLoading().
|
private |
contains the name of the target, in which the specified resource of this instance must be loaded.
Definition at line 129 of file loadenv.hxx.
Referenced by impl_loadContent(), impl_searchAlreadyLoaded(), and startLoading().
|
private |
it holds one (!) asynchronous used contenthandler or frameloader alive, till the asynchronous operation will be finished.
Definition at line 172 of file loadenv.hxx.
Referenced by impl_handleContent(), impl_loadContent(), impl_setResult(), start(), startLoading(), and waitWhileLoading().
|
private |
points to the frame, which uses this LoadEnv object and must be used to start target search there.
Definition at line 109 of file loadenv.hxx.
Referenced by impl_loadContent(), and startLoading().
|
private |
reference to a uno service manager, which must be used to created on needed services on demand.
Definition at line 104 of file loadenv.hxx.
Referenced by impl_applyPersistentWindowState(), impl_detectTypeAndFilter(), impl_filterHasInteractiveDialog(), impl_furtherDocsAllowed(), impl_handleContent(), impl_jumpToMark(), impl_loadContent(), impl_searchAlreadyLoaded(), impl_searchLoader(), impl_searchRecycleTarget(), and startLoading().
|
private |
points to the frame, into which the new component was loaded.
@descr Note: This reference will be empty if loading failed or a non visible content was loaded! It can be the same frame as m_xBaseFrame it describe, in case the target "_self", "" or the search flag "SELF" was used. Otherwise it's the new created or recycled frame, which was used for loading and contains further the new component.
Please use method getTarget() or getTargetComponent() to return the frame/controller or model to any interested user of the results of this load request.
Definition at line 124 of file loadenv.hxx.
Referenced by getTargetComponent(), impl_loadContent(), impl_reactForLoadingState(), and startLoading().