summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2015-10-18 20:32:00 +0200
committerAndras Timar <andras.timar@collabora.com>2015-10-18 19:29:15 +0000
commita80c3a5c14399802d7bbd6fb9a1b57621a594445 (patch)
treecf71efa72cd9698d56ef46c6027990482409f1a5 /sw
parentddc2de207a55b56a9f706ce3ddfc8ddb48bdf2e8 (diff)
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 <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
1 files changed, 2 insertions, 2 deletions
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<const SwChapterField*>(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;
}