basctl/source/basicide/basides1.cxx | 2 +- basctl/source/basicide/bastype2.cxx | 2 +- basctl/source/basicide/bastype3.cxx | 4 ++-- basctl/source/basicide/bastypes.cxx | 8 +++----- basctl/source/basicide/moduldl2.cxx | 6 +++--- basctl/source/basicide/moduldlg.cxx | 2 +- basctl/source/inc/bastypes.hxx | 2 +- sc/source/filter/oox/worksheethelper.cxx | 3 ++- 8 files changed, 14 insertions(+), 15 deletions(-)
New commits: commit fee408dd695b9ddca8333688879d1ba52faff8fb Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Oct 30 10:56:10 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Oct 31 20:12:08 2019 +0100 pass an explicit parent for the password dialogs Change-Id: Ic25d6b61750df9ccf5271df1b4d314ae9cb07550 Reviewed-on: https://gerrit.libreoffice.org/81758 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index a6f74b646595..a59fbcca7048 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -517,7 +517,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) ) { OUString aPassword; - bOK = QueryPassword( xModLibContainer, aLibName, aPassword ); + bOK = QueryPassword(rReq.GetFrameWeld(), xModLibContainer, aLibName, aPassword); } } diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index e450c04a0425..feb45f3d4206 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -601,7 +601,7 @@ bool TreeListBox::ExpandingHdl() if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) ) { OUString aPassword; - bOK = QueryPassword( xModLibContainer, aLibName, aPassword ); + bOK = QueryPassword(GetFrameWeld(), xModLibContainer, aLibName, aPassword); } } } diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 68d5fb1c47c3..8098925a6b67 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -68,7 +68,7 @@ void TreeListBox::RequestingChildren( SvTreeListEntry* pEntry ) if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) ) { OUString aPassword; - bOK = QueryPassword( xModLibContainer, aOULibName, aPassword ); + bOK = QueryPassword(GetFrameWeld(), xModLibContainer, aOULibName, aPassword); } } @@ -157,7 +157,7 @@ IMPL_LINK(SbTreeListBox, RequestingChildrenHdl, const weld::TreeIter&, rEntry, b if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) ) { OUString aPassword; - bOK = QueryPassword( xModLibContainer, aOULibName, aPassword ); + bOK = QueryPassword(m_pTopLevel, xModLibContainer, aOULibName, aPassword); } } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 5e642673cf8e..f38ba5d33e8c 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -743,7 +743,7 @@ bool QueryDelModule( const OUString& rName, weld::Widget* pParent ) return QueryDel( rName, IDEResId( RID_STR_QUERYDELMODULE ), pParent ); } -bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat, bool bNewTitle ) +bool QueryPassword(weld::Widget* pDialogParent, const Reference< script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat, bool bNewTitle) { bool bOK = false; sal_uInt16 nRet = 0; @@ -751,8 +751,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, do { // password dialog - vcl::Window* pWin = Application::GetDefDialogParent(); - SfxPasswordDialog aDlg(pWin ? pWin->GetFrameWeld() : nullptr); + SfxPasswordDialog aDlg(pDialogParent); aDlg.SetMinLen(1); // set new title @@ -779,8 +778,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, if ( !bOK ) { - vcl::Window* pParent = Application::GetDefDialogParent(); - std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pDialogParent, VclMessageType::Warning, VclButtonsType::Ok, IDEResId(RID_STR_WRONGPASSWORD))); xErrorBox->run(); } diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index c2633699b66a..34db6905702f 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -272,7 +272,7 @@ IMPL_LINK(LibPage, EditingEntryHdl, const weld::TreeIter&, rIter, bool) if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) ) { OUString aPassword; - bOK = QueryPassword( xModLibContainer, aLibName, aPassword ); + bOK = QueryPassword(m_pDialog->getDialog(), xModLibContainer, aLibName, aPassword); } if ( !bOK ) return false; @@ -740,7 +740,7 @@ void LibPage::InsertLib() Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) && !bReference ) { - bOK = QueryPassword( xModLibContImport, aLibName, aPassword, true, true ); + bOK = QueryPassword(m_pDialog->getDialog(), xModLibContImport, aLibName, aPassword, true, true); if ( !bOK ) { @@ -922,7 +922,7 @@ void LibPage::Export() if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) ) { OUString aPassword; - bOK = QueryPassword( xModLibContainer, aLibName, aPassword ); + bOK = QueryPassword(m_pDialog->getDialog(), xModLibContainer, aLibName, aPassword); } if ( !bOK ) return; diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 0812647911f0..02259ed4314b 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -729,7 +729,7 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, OUString& rLibName ) if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) ) { OUString aPassword; - bOK = QueryPassword( xModLibContainer, rLibName, aPassword ); + bOK = QueryPassword(m_pDialog->getDialog(), xModLibContainer, rLibName, aPassword); } // load library diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 50a9445696cf..3063c2bd6827 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -294,7 +294,7 @@ bool QueryDelMacro( const OUString& rName, weld::Widget* pParent ); bool QueryDelDialog( const OUString& rName, weld::Widget* pParent ); bool QueryDelModule( const OUString& rName, weld::Widget* pParent ); bool QueryDelLib( const OUString& rName, bool bRef, weld::Widget* pParent ); -bool QueryPassword( const css::uno::Reference< css::script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat = false, bool bNewTitle = false ); +bool QueryPassword(weld::Widget* pDialogParent, const css::uno::Reference< css::script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat = false, bool bNewTitle = false); class ModuleInfoHelper { commit 28ef7a8ce82e50066c911199ef1280669e732a95 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Oct 31 12:33:25 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Oct 31 20:11:49 2019 +0100 crashtesting: null deref on import of fdo51601-2.xlsx Change-Id: I2db907a9247b622b3977aec9686c09d56fe3ef38 Reviewed-on: https://gerrit.libreoffice.org/81846 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index b897fc13afc8..a567435fcc28 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -995,7 +995,8 @@ OUString WorksheetGlobals::getHyperlinkUrl( const HyperlinkModel& rHyperlink ) c if (nSepPos < aUrl.getLength() - 1) { ScRange aRange; - if ((aRange.ParseAny( aUrl.copy( nSepPos + 1 ), nullptr, + const ScDocumentImport& rDoc = getDocImport(); + if ((aRange.ParseAny( aUrl.copy( nSepPos + 1 ), &rDoc.getDoc(), formula::FormulaGrammar::CONV_XL_R1C1) & ScRefFlags::VALID) == ScRefFlags::ZERO) aUrl = aUrl.replaceAt( nSepPos, 1, OUString( '.' ) ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits