From 143ea9b4907e9e19d914e292228752704d85a7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 14 Jun 2010 12:13:36 +0000 Subject: [PATCH] * InsetListings.cpp: - do not switch the encoding with XeTeX (bug #6766) - some minor formatting git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34649 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetListings.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp index e2b84d1e25..bbd2b53aeb 100644 --- a/src/insets/InsetListings.cpp +++ b/src/insets/InsetListings.cpp @@ -73,7 +73,8 @@ Inset::DisplayType InsetListings::display() const void InsetListings::updateBuffer(ParIterator const & it, UpdateType utype) { - Counters & cnts = buffer().masterBuffer()->params().documentClass().counters(); + Counters & cnts = + buffer().masterBuffer()->params().documentClass().counters(); string const saveflt = cnts.current_float(); // Tell to captions what the current float is @@ -141,9 +142,11 @@ int InsetListings::latex(odocstream & os, OutputParams const & runparams) const bool encoding_switched = false; Encoding const * const save_enc = runparams.encoding; - if (!runparams.encoding->hasFixedWidth()) { - // We need to switch to a singlebyte encoding, since the listings - // package cannot deal with multiple-byte-encoded glyphs + if (runparams.flavor != OutputParams::XETEX + && !runparams.encoding->hasFixedWidth()) { + // We need to switch to a singlebyte encoding, since the + // listings package cannot deal with multi-byte-encoded + // glyphs (not needed with XeTeX). Language const * const outer_language = (runparams.local_font != 0) ? runparams.local_font->language()