sc/inc/scabstdlg.hxx | 3 +-- sc/qa/unit/screenshots/screenshots.cxx | 21 ++++++++++++--------- sc/source/ui/attrdlg/scdlgfact.cxx | 5 ++--- sc/source/ui/attrdlg/scdlgfact.hxx | 3 +-- sc/source/ui/inc/tabbgcolordlg.hxx | 3 +-- sc/source/ui/miscdlgs/tabbgcolordlg.cxx | 4 +--- sc/source/ui/view/tabvwshf.cxx | 3 +-- 7 files changed, 19 insertions(+), 23 deletions(-)
New commits: commit 1f8de058819c68842a6518aaac6617e9aae2354b Author: Katarina Behrens <[email protected]> Date: Tue Jun 28 22:29:52 2016 +0200 Don't crash on opening csv import dialog Change-Id: I1ff56d79f7ff31317187cf077380481f1ef44366 diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx index ee12727..68d2814 100644 --- a/sc/qa/unit/screenshots/screenshots.cxx +++ b/sc/qa/unit/screenshots/screenshots.cxx @@ -96,6 +96,8 @@ private: ScDocShellRef xDocSh; ScTabViewShell* pViewShell; ScAbstractDialogFactory* pFact; + + std::unique_ptr<ScImportStringStream> pStream; }; ScScreenshotTest::ScScreenshotTest() @@ -138,6 +140,9 @@ void ScScreenshotTest::initializeWithDoc(const char* pName) pFact = ScAbstractDialogFactory::Create(); CPPUNIT_ASSERT_MESSAGE("Failed to create dialog factory", pFact); + + const OUString aCsv("some, strings, here, separated, by, commas"); + pStream.reset( new ScImportStringStream( aCsv) ); } VclAbstractDialog* ScScreenshotTest::createDialogByID( sal_uInt32 nID ) @@ -240,13 +245,11 @@ VclAbstractDialog* ScScreenshotTest::createDialogByID( sal_uInt32 nID ) break; } - //case 12: - //{ - // const OUString aCsv("some, strings, here, separated, by, commas"); - // ScImportStringStream aStream( aCsv ); - // pReturnDialog = pFact->CreateScImportAsciiDlg( OUString(), &aStream, SC_PASTETEXT ); - // break; - //} + case 13: + { + pReturnDialog = pFact->CreateScImportAsciiDlg( OUString(), pStream.get(), SC_PASTETEXT ); + break; + } //ScopedVclPtrInstance<ScShareDocumentDlg> pDlg14( pViewShell->GetDialogParent(), &rViewData ); //ScopedVclPtrInstance<ScTableProtectionDlg> pDlg16(pViewShell->GetDialogParent()); default: @@ -290,7 +293,7 @@ void ScScreenshotTest::testOpeningModalDialogs() { initializeWithDoc("empty.ods"); - const sal_uInt32 nDialogs = 13; + const sal_uInt32 nDialogs = 14; for ( sal_uInt32 i = 0; i < nDialogs; i++ ) { commit b6796754edac29aff54a95706cc216652f77d7b1 Author: Katarina Behrens <[email protected]> Date: Tue Jun 28 22:03:02 2016 +0200 This dialog doesn't even have a help button so drop helpID argument from its ctor (not to mention the fact that a help text with ID .uno:TabBgColor doesn't exist either) Change-Id: I0624f0474334cc799d67f7f292e11194de5195fa diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 8c6c6c5..a7130ce 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -447,8 +447,7 @@ public: virtual AbstractScTabBgColorDlg * CreateScTabBgColorDlg ( vcl::Window* pParent, const OUString& rTitle, //Dialog Title const OUString& rTabBgColorNoColorText, //Label for no tab color - const Color& rDefaultColor, //Currently selected Color - const OString& ) = 0; + const Color& rDefaultColor ) = 0; //Currently selected Color virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( bool bAscii = true, const ScImportOptions* pOptions = nullptr, diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx index b17afc9..ee12727 100644 --- a/sc/qa/unit/screenshots/screenshots.cxx +++ b/sc/qa/unit/screenshots/screenshots.cxx @@ -216,7 +216,7 @@ VclAbstractDialog* ScScreenshotTest::createDialogByID( sal_uInt32 nID ) { pReturnDialog = pFact->CreateScTabBgColorDlg( pViewShell->GetDialogParent(), OUString(ScResId(SCSTR_SET_TAB_BG_COLOR)), - OUString(ScResId(SCSTR_NO_TAB_BG_COLOR)), Color(0xff00ff), ".uno:TabBgColor" ); + OUString(ScResId(SCSTR_NO_TAB_BG_COLOR)), Color(0xff00ff) ); break; } diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index af6b1cd..9e2e3bd 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -878,10 +878,9 @@ AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg( vcl::Window* pParent, const OUString& rTitle, const OUString& rTabBgColorNoColorText, - const Color& rDefaultColor, - const OString& sHelpId) + const Color& rDefaultColor) { - VclPtr<ScTabBgColorDlg> pDlg = VclPtr<ScTabBgColorDlg>::Create( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, sHelpId ); + VclPtr<ScTabBgColorDlg> pDlg = VclPtr<ScTabBgColorDlg>::Create( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor ); return new AbstractScTabBgColorDlg_Impl( pDlg ); } diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index a7a6460..159eafc 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -519,8 +519,7 @@ public: virtual AbstractScTabBgColorDlg * CreateScTabBgColorDlg ( vcl::Window* pParent, const OUString& rTitle, //Dialog Title const OUString& rTabBgColorNoColorText, //Label for no tab color - const Color& rDefaultColor, //Currently selected Color - const OString& sHelpId ) override; + const Color& rDefaultColor ) override; //Currently selected Color virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( bool bAscii = true, const ScImportOptions* pOptions = nullptr, diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx index ae83b58..68e9b6d 100644 --- a/sc/source/ui/inc/tabbgcolordlg.hxx +++ b/sc/source/ui/inc/tabbgcolordlg.hxx @@ -31,8 +31,7 @@ public: ScTabBgColorDlg( vcl::Window* pParent, const OUString& rTitle, const OUString& rTabBgColorNoColorText, - const Color& rDefaultColor, - const OString& nHelpId ); + const Color& rDefaultColor ); virtual ~ScTabBgColorDlg(); virtual void dispose() override; diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx index a8993d8..f88ca41 100644 --- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx +++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx @@ -36,8 +36,7 @@ #define HDL(hdl) LINK(this,ScTabBgColorDlg,hdl) ScTabBgColorDlg::ScTabBgColorDlg(vcl::Window* pParent, const OUString& rTitle, - const OUString& rTabBgColorNoColorText, const Color& rDefaultColor, - const OString& sHelpId) + const OUString& rTabBgColorNoColorText, const Color& rDefaultColor) : ModalDialog(pParent, "TabColorDialog", "modules/scalc/ui/tabcolordialog.ui") , m_aTabBgColor(rDefaultColor) , m_aTabBgColorNoColorText(rTabBgColorNoColorText) @@ -48,7 +47,6 @@ ScTabBgColorDlg::ScTabBgColorDlg(vcl::Window* pParent, const OUString& rTitle, m_pTabBgColorSet->SetColCount(SvxColorValueSet::getColumnCount()); get(m_pBtnOk, "ok"); - SetHelpId( sHelpId ); this->SetText( rTitle ); this->SetStyle(GetStyle() | WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL | WB_SYSTEMWINDOW | WB_STANDALONE | WB_HIDE); diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index fa9ee6e..5f8b52a 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -740,8 +740,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) GetDialogParent(), OUString(ScResId(SCSTR_SET_TAB_BG_COLOR)), OUString(ScResId(SCSTR_NO_TAB_BG_COLOR)), - aTabBgColor, - ".uno:TabBgColor")); + aTabBgColor)); while ( !bDone && nRet == RET_OK ) { nRet = pDlg->Execute(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
