diff --git a/src/CalcViewModel/Common/CopyPasteManager.cpp b/src/CalcViewModel/Common/CopyPasteManager.cpp index c8f9c5f0..28507e1b 100644 --- a/src/CalcViewModel/Common/CopyPasteManager.cpp +++ b/src/CalcViewModel/Common/CopyPasteManager.cpp @@ -136,6 +136,13 @@ String^ CopyPasteManager::ValidatePasteExpression(String^ pastedText, ViewMode m wstring pasteExpression = pastedText->Data(); + // Reject strings with '.' when the local decimal separator is different + wchar_t decimalSeparator = LocalizationSettings::GetInstance().GetDecimalSeparator(); + if (decimalSeparator != '.' && pasteExpression.find('.') != std::string::npos) + { + return StringReference(PasteErrorString); + } + // Get english translated expression String^ englishString = LocalizationSettings::GetInstance().GetEnglishValueFromLocalizedDigits(pasteExpression);