tdf#159595: Data validation without error check allows to enter wrong data

Change-Id: If5660f462a07ca571e05a44abcb0e378b6de613e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163064
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet
2024-02-07 08:30:06 +01:00
parent 467eeda66e
commit c869fb5ea2
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -381,6 +381,9 @@ bool ScValidationData::DoError(weld::Window* pParent, const OUString& rInput,
if ( eErrorStyle == SC_VALERR_MACRO )
return DoMacro(rPos, rInput, nullptr, pParent);
if (!bShowError)
return true;
// Output error message
OUString aTitle = aErrorTitle;
+2 -1
View File
@@ -3158,7 +3158,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInL
{
ScDocument& rDoc = pActiveViewSh->GetViewData().GetDocument();
const ScValidationData* pData = rDoc.GetValidationEntry( nValidation );
if (pData && pData->HasErrMsg())
if (pData)
{
// #i67990# don't use pLastPattern in EnterHandler
const ScPatternAttr* pPattern = rDoc.GetPattern( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab() );
@@ -3199,6 +3199,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInL
if (pData->DoError(pActiveViewSh->GetFrameWeld(), aString, aCursorPos))
bForget = true; // Do not take over input
}
}
}