Kaydet (Commit) 922714c2 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

More adjustment of file load code in the unit test.

And remove the try catch block, which shouldn't really be necessary
there.

Change-Id: I91db12203332b31b208b107db810c33705a57f0b
üst 346905d4
...@@ -200,8 +200,10 @@ ScDocShellRef ScExportTest::saveAndReload(ScDocShell* pShell, const rtl::OUStrin ...@@ -200,8 +200,10 @@ ScDocShellRef ScExportTest::saveAndReload(ScDocShell* pShell, const rtl::OUStrin
pFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT); pFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT);
ScDocShellRef xDocShRef = new ScDocShell; ScDocShellRef xDocShRef = new ScDocShell;
xDocShRef->GetDocument()->EnableUserInteraction(false);
SfxMedium* pSrcMed = new SfxMedium(aTempFile.GetURL(), STREAM_STD_READ); SfxMedium* pSrcMed = new SfxMedium(aTempFile.GetURL(), STREAM_STD_READ);
pSrcMed->SetFilter(pFilter); pSrcMed->SetFilter(pFilter);
pSrcMed->UseInteractionHandler(false);
if (!xDocShRef->DoLoad(pSrcMed)) if (!xDocShRef->DoLoad(pSrcMed))
{ {
xDocShRef->DoClose(); xDocShRef->DoClose();
...@@ -240,8 +242,10 @@ ScDocShellRef ScExportTest::loadDocument(const rtl::OUString& rFileName, sal_Int ...@@ -240,8 +242,10 @@ ScDocShellRef ScExportTest::loadDocument(const rtl::OUString& rFileName, sal_Int
pFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT); pFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT);
ScDocShellRef xDocShRef = new ScDocShell; ScDocShellRef xDocShRef = new ScDocShell;
xDocShRef->GetDocument()->EnableUserInteraction(false);
SfxMedium* pSrcMed = new SfxMedium(aFileName, STREAM_STD_READ); SfxMedium* pSrcMed = new SfxMedium(aFileName, STREAM_STD_READ);
pSrcMed->SetFilter(pFilter); pSrcMed->SetFilter(pFilter);
pSrcMed->UseInteractionHandler(false);
if (!xDocShRef->DoLoad(pSrcMed)) if (!xDocShRef->DoLoad(pSrcMed))
{ {
xDocShRef->DoClose(); xDocShRef->DoClose();
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "oox/helper/propertyset.hxx" #include "oox/helper/propertyset.hxx"
#include "oox/ole/olestorage.hxx" #include "oox/ole/olestorage.hxx"
#include "vcl/msgbox.hxx" #include "vcl/msgbox.hxx"
#include <vcl/svapp.hxx>
#include "biffinputstream.hxx" #include "biffinputstream.hxx"
#include "chartsheetfragment.hxx" #include "chartsheetfragment.hxx"
...@@ -331,11 +330,7 @@ void WorkbookFragment::finalizeImport() ...@@ -331,11 +330,7 @@ void WorkbookFragment::finalizeImport()
pDocSh->GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), pDocSh->GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_XLS)); ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_XLS));
try bHardRecalc = aBox.Execute() == RET_YES;
{
bHardRecalc = aBox.Execute() == RET_YES;
}
catch (Application::DialogCancelledException const&) {/* ignore */}
} }
if (bHardRecalc) if (bHardRecalc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment