// This only shows up for metafiles with a lot of records, a good example can be seen at: // https://bz.apache.org/ooo/show_bug.cgi?id=119125 as "Firefox-logo.svg"
BreakDlg::BreakDlg(weld::Window* pWindow, DrawView* pDrView, DrawDocShell* pShell,
sal_uLong nSumActionCount, sal_uLong nObjCount)
: SfxDialogController(pWindow, u"modules/sdraw/ui/breakdialog.ui"_ustr, u"BreakDialog"_ustr)
, m_xFiObjInfo(m_xBuilder->weld_label(u"metafiles"_ustr))
, m_xFiActInfo(m_xBuilder->weld_label(u"metaobjects"_ustr))
, m_xFiInsInfo(m_xBuilder->weld_label(u"drawingobjects"_ustr))
, m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr))
, m_pDrView(pDrView)
, m_bCancel(false)
, m_aUpdateIdle( "sd::BreakDlg m_aUpdateIdle" )
{
m_aUpdateIdle.SetPriority( TaskPriority::REPAINT );
m_aUpdateIdle.SetInvokeHandler( LINK( this, BreakDlg, InitialUpdate ) );
m_xProgrInfo.reset(new SvdProgressInfo(LINK(this, BreakDlg, UpDate))); // every action is edited 3 times in DoImport()
m_xProgrInfo->Init( nObjCount );
}
// update status bar or show an error message? if(nInit == reinterpret_cast<void*>(1))
{
std::unique_ptr<weld::MessageDialog> xErrBox(Application::CreateMessageDialog(m_xDialog.get(),
VclMessageType::Warning, VclButtonsType::Ok,
SdResId(STR_BREAK_FAIL)));
xErrBox->run();
} else
{ if (m_xProgress)
m_xProgress->SetState(m_xProgrInfo->GetSumCurAction());
}
// which object is shown at the moment?
OUString info = OUString::number(m_xProgrInfo->GetCurObj())
+ "/"
+ OUString::number(m_xProgrInfo->GetObjCount());
m_xFiObjInfo->set_label(info);
// how many actions are started? if (m_xProgrInfo->GetActionCount() == 0)
{
m_xFiActInfo->set_label( OUString() );
} else
{
info = OUString::number(m_xProgrInfo->GetCurAction())
+ "/"
+ OUString::number(m_xProgrInfo->GetActionCount());
m_xFiActInfo->set_label(info);
}
// and inserted???? if (m_xProgrInfo->GetInsertCount() == 0)
{
m_xFiInsInfo->set_label( OUString() );
} else
{
info = OUString::number(m_xProgrInfo->GetCurInsert())
+ "/"
+ OUString::number(m_xProgrInfo->GetInsertCount());
m_xFiInsInfo->set_label(info);
}
// make sure dialog gets painted, it is intended to // show the progress to the user. Also necessary to // provide a clickable cancel button
Scheduler::ProcessEventsToIdle();
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.