From a80c3a5c14399802d7bbd6fb9a1b57621a594445 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Sun, 18 Oct 2015 20:32:00 +0200 Subject: fix StyleRef to Heading styles when doc is opened in localized MS Word We need to use { styleref 1 } instead of { styleref "Heading 1" } etc. to avoid the localization issues. Heading style names are localized in MS Word, and reference would point to a non-existent style. Change-Id: Ib74d67d265cf98962dfc6f328f08a236a95fae98 Reviewed-on: https://gerrit.libreoffice.org/19441 Tested-by: Jenkins Reviewed-by: Andras Timar --- sw/source/filter/ww8/ww8atr.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 54e35d096d0c..a7b7f9f57909 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2877,9 +2877,9 @@ void AttributeOutputBase::TextField( const SwFormatField& rField ) SwChapterField aCopy(*static_cast(pField)); aCopy.ChangeExpansion(*pTextNd, false); const OUString sStr = FieldString(ww::eSTYLEREF) - + " \"Heading " + + " " + OUString::number(aCopy.GetLevel() + 1) - + "\" \\* MERGEFORMAT "; + + " \\* MERGEFORMAT "; GetExport().OutputField(pField, ww::eSTYLEREF, sStr); bWriteExpand = false; } -- cgit