path: root/sw/source/filter
diff options
authorMiklos Vajna <>2014-03-04 14:47:13 +0100
committerCaolán McNamara <>2014-03-05 04:23:23 -0600
commitf57fa998035cb5f859b89451a563137fdaf1b465 (patch)
tree84789d97647d74f386d2ed098ffa7fb9c48a7adc /sw/source/filter
parentf856667ee6ae786575aa8e82f71ff2dabf16a659 (diff)
bnc#821208 DOC import: don't overwrite WW8Num* character styles
In general we're overwriting styles on import in case we're not pasting. But these WW8Num* character styles are in general not from the document, they are created because Writer needs a character style for each numbering level to handle what's in the DOC file. So, in case there is a character style with the same name as our "character style for numbering" styles, prefer the later ones, as that's intended most likely. (cherry picked from commit e88ee8aa307ecec1cc22cda56b97dcfd8b838ce8) Conflicts: sw/qa/extras/ww8import/ww8import.cxx Change-Id: I675f867722360aca765bb96b0b43ea47deab9847 Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
Diffstat (limited to 'sw/source/filter')
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 81841d556083..01baf330889e 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3763,6 +3763,11 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty
bool bImport = !bStyExist || pIo->mbNewDoc; // import content ?
+ // Do not override character styles the list import code created earlier.
+ if (bImport && bStyExist && rSI.GetOrgWWName().SearchAscii("WW8Num") == 0)
+ bImport = false;
bool bOldNoImp = pIo->bNoAttrImport;
rSI.bImportSkipped = !bImport;