bool bShow; // The "ShowFilterDialog" flag is passed from SfxApplication::OpenDocExec_Impl if (!(css::uno::getCurrentContext()->getValueByName(u"ShowFilterDialog"_ustr) >>= bShow))
bShow = utl::isShowFilterOptionsDialog(aFilterString); constbool bOk = !bShow || pDlg->Execute() == RET_OK;
if (bOk)
{
ScAsciiOptions aOptions;
pDlg->GetOptions( aOptions );
pDlg->SaveParameters();
aFilterOptions = aOptions.WriteToString();
nRet = ui::dialogs::ExecutableDialogResults::OK;
}
} elseif ( aFilterString == ScDocShell::GetWebQueryFilterName() || aFilterString == ScDocShell::GetHtmlFilterName() )
{ if (bExport)
nRet = ui::dialogs::ExecutableDialogResults::OK; // export HTML without dialog else
{ // HTML import.
ScopedVclPtr<AbstractScTextImportOptionsDlg> pDlg(
pFact->CreateScTextImportOptionsDlg(Application::GetFrameWeld(xDialogParent)));
std::unique_ptr<SvStream> pInStream; if ( xInputStream.is() )
pInStream = utl::UcbStreamHelper::CreateStream( xInputStream ); switch(load_CharSet( eEncoding, bExport, pInStream.get()))
{ case charsetSource::charset_from_file:
skipDialog = true; break; case charsetSource::charset_from_user_setting: case charsetSource::charset_default: break;
}
bDBEnc = true; // pInStream goes out of scope, the stream is automatically closed
} elseif ( aFilterString == ScDocShell::GetDifFilterName() )
{ if ( bExport )
{ // DIF export
aTitle = ScResId( STR_EXPORT_DIF );
} else
{ // DIF import
aTitle = ScResId( STR_IMPORT_DIF );
} // common for DIF import/export
eEncoding = RTL_TEXTENCODING_MS_1252;
}
ScImportOptions aOptions( cAsciiDel, cStrDel, eEncoding);
aOptions.bIncludeBOM = bIncludeBOM; if(skipDialog)
{ // TODO: check we are not missing some of the stuff that ScImportOptionsDlg::GetImportOptions // (file sc/source/ui/dbgui/scuiimoptdlg.cxx) does // that is, if the dialog sets options that are not selected by the user (!) // then we are missing them here. // Then we may need to rip them out of the dialog. // Or we actually change the dialog to not display if skipDialog==true // in that case, add an argument skipDialog to CreateScImportOptionsDlg
nRet = ui::dialogs::ExecutableDialogResults::OK;
} else
{
ScopedVclPtr<AbstractScImportOptionsDlg> pDlg(pFact->CreateScImportOptionsDlg(Application::GetFrameWeld(xDialogParent),
bAscii, &aOptions, &aTitle,
bDBEnc, !bExport)); if ( pDlg->Execute() == RET_OK )
{
pDlg->SaveImportOptions();
pDlg->GetImportOptions( aOptions );
save_CharSet( aOptions.eCharSet, bExport );
nRet = ui::dialogs::ExecutableDialogResults::OK;
}
} if (nRet == ui::dialogs::ExecutableDialogResults::OK)
{ if ( bAscii )
aFilterOptions = aOptions.BuildString(); else
aFilterOptions = aOptions.aStrFont;
}
}
xInputStream.clear(); // don't hold the stream longer than necessary
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.16Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-02)
¤
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.