summaryrefslogtreecommitdiff
path: root/unotest
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-26 08:20:17 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-26 13:39:16 +0200
commitcfc0fcd729e8e1e4395523a2ef2409fffc071f0d (patch)
treedbd36ba8ac030a165c234cba8810671df42ff35a /unotest
parent5bebb6406a8ca0fa9de1051e8518bf84e070a3ef (diff)
cid#1619687 Not restoring ostream format
Change-Id: Id47cdffca6e597f3bf60ac9def5e92916443b117 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173967 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'unotest')
-rw-r--r--unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
index 5273699f57ab..804b8e7d12ca 100644
--- a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
+++ b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
@@ -82,11 +82,19 @@ void printUnoValue(
out << *o3tl::forceAccess<sal_uInt64>(value);
break;
case css::uno::TypeClass_FLOAT:
+ {
+ std::ios_base::fmtflags origfmt = out.flags();
out << std::uppercase << *o3tl::forceAccess<float>(value);
+ out.setf(origfmt);
break;
+ }
case css::uno::TypeClass_DOUBLE:
+ {
+ std::ios_base::fmtflags origfmt = out.flags();
out << std::uppercase << *o3tl::forceAccess<double>(value);
+ out.setf(origfmt);
break;
+ }
case css::uno::TypeClass_CHAR:
{
std::ios_base::fmtflags origfmt = out.flags();