summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/view/output2.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index d8dfb064e605..8543f2f517c7 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1481,14 +1481,22 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
{
bool bOrigIsInLayoutStrings = mpDoc->IsInLayoutStrings();
mpDoc->SetLayoutStrings(true);
- comphelper::ScopeGuard g([this, bOrigIsInLayoutStrings] {
- mpDoc->SetLayoutStrings(bOrigIsInLayoutStrings);
- });
OSL_ENSURE( mpDev == mpRefDevice ||
mpDev->GetMapMode().GetMapUnit() == mpRefDevice->GetMapMode().GetMapUnit(),
"LayoutStrings: different MapUnits ?!?!" );
+ vcl::text::ComplexTextLayoutFlags eTextLayout = mpDev->GetLayoutMode();
+ comphelper::ScopeGuard g([this, bOrigIsInLayoutStrings, eTextLayout] {
+ mpDoc->SetLayoutStrings(bOrigIsInLayoutStrings);
+
+ if (mpDev->GetLayoutMode() != eTextLayout)
+ mpDev->SetLayoutMode(eTextLayout);
+ });
+
+ if (mpDev->GetLayoutMode() != vcl::text::ComplexTextLayoutFlags::Default)
+ mpDev->SetLayoutMode(vcl::text::ComplexTextLayoutFlags::Default);
+
sc::IdleSwitch aIdleSwitch(*mpDoc, false);
// Try to limit interpreting to only visible cells. Calling e.g. IsValue()