tdf#128428 RTF: switch off longer space at \dntblnsbdb
The Word 6.0 (Japanese) compatibility option
\dntblnsbdb switches off the balancing of SBCS/DBCS
characters, including the longer space sequences.
Note: using \dntblnsbdb, it will be possible to
set normal (short) space sequences in RTF export, too,
to avoid broken document layout during RTF round-trip.
Fix regression from commit 24b04db5a6
(tdf#123703 RTF import: fix length of space character sequence).
Change-Id: I5ade9e0a2db0bde204d1debe831058045fd8f586
Reviewed-on: https://gerrit.libreoffice.org/84397
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
parent
bfdee54f8c
commit
cd7241e3d2
3 changed files with 42 additions and 0 deletions
31
sw/qa/extras/rtfexport/data/tdf128428_dntblnsbdb.rtf
Normal file
31
sw/qa/extras/rtfexport/data/tdf128428_dntblnsbdb.rtf
Normal file
|
@ -0,0 +1,31 @@
|
|||
{\rtf1\mac\ansicpg10000\uc1 \deff0\deflang1033\deflangfe1033{\upr{\fonttbl{\f0\fnil\fcharset256\fprq2{\*\panose 00020206030504050203}Times New Roman;}{\f3\fnil\fcharset2\fprq2{\*\panose 00020005000000000000}Symbol;}^M{\f4\fnil\fcharset256\fprq2{\*\panose 00020005000000000000}Times;}}{\*\ud{\fonttbl{\f0\fnil\fcharset256\fprq2{\*\panose 00020206030504050203}Times New Roman;}{\f3\fnil\fcharset2\fprq2{\*\panose 00020005000000000000}Symbol;}{\f4\fnil\fcharset256\fprq2{\*\panose 00020005000000000000}Times;}}}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f4\lang1033\cgrid \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}}{\*\listtable{\list\listtemplateid984073\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1}}{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}{\info{\title Viikkoaikataulu S 2001 SibA / Musiikkiteknologian osasto 1}{\author CM&T}{\operator Kalev Tiits}{\creatim\yr2003\mo9\dy2\hr15\min6}{\revtim\yr2003\mo9\dy2\hr15\min6}{\printim\yr2003\mo8\dy7\hr15\min14}{\version2}{\edmins0}{\nofpages2}{\nofwords40}{\nofchars233}{\*\company Sibelius Academy}{\nofcharsws286}{\vern16553}}\paperw16838\paperh11899\margl1440\margr1440\margt1800\margb1800 \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984\dghshow0\dgvshow0\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\nolnhtadjtbl \fet0\sectd \lndscpsxn\linex0\headery709\footery709\colsx709\endnhere\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
word word2\par
|
||||
}
|
|
@ -294,6 +294,12 @@ DECLARE_RTFEXPORT_TEST(testTdf128428_compatible_monospaced, "tdf128428_compatibl
|
|||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
}
|
||||
|
||||
DECLARE_RTFEXPORT_TEST(testTdf128428_dntblnsbdb, "tdf128428_dntblnsbdb.rtf")
|
||||
{
|
||||
// still 1 here
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
}
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -1215,6 +1215,11 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
|
|||
m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Compat_doNotUseHTMLParagraphAutoSpacing,
|
||||
new RTFValue(0));
|
||||
break;
|
||||
case RTF_DNTBLNSBDB:
|
||||
// tdf#128428 switch off longer space sequence
|
||||
m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_longerSpaceSequence,
|
||||
new RTFValue(0));
|
||||
break;
|
||||
default:
|
||||
{
|
||||
SAL_INFO("writerfilter", "TODO handle flag '" << keywordToString(nKeyword) << "'");
|
||||
|
|
Loading…
Reference in a new issue