SfxProgress::SfxProgress
(
SfxObjectShell* pObjSh, /* The action is performed on the SfxObjectShellwhichcanbeNULL. Whenitisthentheapplicationwillbe
used */
const OUString& rText, /* Text, which appears before the Statusmonitor
in the status line */
sal_uInt32 nRange, /* Max value for range */
bool bWait /* Activate the wait-Pointer initially (TRUE) */
)
// new Range? if ( nNewRange && nNewRange != pImpl->nMax )
{
SAL_INFO( "sfx.bastyp", "SfxProgress: range changed from " << pImpl->nMax << " to "
<< nNewRange);
pImpl->nMax = nNewRange;
}
if ( !pImpl->xStatusInd.is() )
{ // get the active ViewFrame of the document this progress is working on // if it doesn't work on a document, take the current ViewFrame
SfxObjectShell* pObjSh = pImpl->xObjSh.get();
pImpl->pView = SfxViewFrame::Current();
DBG_ASSERT( pImpl->pView || pObjSh, "Can't make progress bar!"); if ( pObjSh && ( !pImpl->pView || pObjSh != pImpl->pView->GetObjectShell() ) )
{ // current document does not belong to current ViewFrame; take it's first visible ViewFrame
SfxViewFrame* pDocView = SfxViewFrame::GetFirst( pObjSh ); if ( pDocView )
pImpl->pView = pDocView; else
{ // don't show status indicator for hidden documents (only valid while loading)
SfxMedium* pMedium = pObjSh->GetMedium(); const SfxBoolItem* pHiddenItem = pMedium->GetItemSet().GetItem(SID_HIDDEN, false); if ( !pHiddenItem || !pHiddenItem->GetValue() )
{ const SfxUnoAnyItem* pIndicatorItem = pMedium->GetItemSet().GetItem(SID_PROGRESS_STATUSBAR_CONTROL, false);
Reference< XStatusIndicator > xInd; if ( pIndicatorItem && (pIndicatorItem->GetValue()>>=xInd) )
pImpl->xStatusInd = std::move(xInd);
}
}
} elseif ( pImpl->pView )
{
pImpl->pWorkWin = SfxGetpApp()->GetWorkWindow_Impl( pImpl->pView ); if ( pImpl->pWorkWin )
pImpl->xStatusInd = pImpl->pWorkWin->GetStatusIndicator();
}
if ( pImpl->xStatusInd.is() )
{
pImpl->xStatusInd->reset();
}
if ( pImpl->xObjSh.is() )
{ for ( SfxViewFrame *pFrame =
SfxViewFrame::GetFirst(pImpl->xObjSh.get());
pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame, pImpl->xObjSh.get() ) )
pFrame->GetWindow().LeaveWait();
} if ( pImpl->xObjSh.is() )
{
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pImpl->xObjSh.get() ); if ( pFrame )
pFrame->GetBindings().LEAVEREGISTRATIONS();
}
}
void SfxProgress::Reschedule()
/* [Description]
Reschedule,callablefromtheoutside
*/
{
SFX_STACK(SfxProgress::Reschedule);
}
SfxProgress* SfxProgress::GetActiveProgress
(
SfxObjectShell const * pDocSh /* the <SfxObjectShell>, which should be queriedafteracurrent<SfxProgress>, or0ifacurrentSfxProgressforthe entireapplicationshouldbeobtained. Thepointeronlyneedsatthetimeof thecalltobevalid.
*/
)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.