X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetQuotes.cpp;h=2f70f87222709651f7ddaac33509d3e1fbe3565b;hb=2748e33be542862f94af4a131a17dde5ebc064b2;hp=515d24119d959a93526a64f6a43b6cacfb766181;hpb=aa1d9638febccb8d9ac20548f7097dd2be440d63;p=lyx.git diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp index 515d24119d..2f70f87222 100644 --- a/src/insets/InsetQuotes.cpp +++ b/src/insets/InsetQuotes.cpp @@ -111,10 +111,9 @@ InsetQuotesParams::QuoteStyle InsetQuotesParams::getQuoteStyle(string const & s, str = "eld"; } - int i; - // '.' wildcard means: keep current style if (!allow_wildcards || str[0] != '.') { + int i; for (i = 0; i < stylescount(); ++i) { if (str[0] == style_char[i]) { res = QuoteStyle(i); @@ -144,10 +143,9 @@ InsetQuotesParams::QuoteSide InsetQuotesParams::getQuoteSide(string const & s, str = "eld"; } - int i; - // '.' wildcard means: keep current side if (!allow_wildcards || str[1] != '.') { + int i; for (i = 0; i < 2; ++i) { if (str[1] == side_char[i]) { res = InsetQuotesParams::QuoteSide(i); @@ -177,10 +175,9 @@ InsetQuotesParams::QuoteLevel InsetQuotesParams::getQuoteLevel(string const & s, str = "eld"; } - int i; - // '.' wildcard means: keep current level if (!allow_wildcards || str[2] != '.') { + int i; for (i = 0; i < 2; ++i) { if (str[2] == level_char[i]) { res = InsetQuotesParams::QuoteLevel(i); @@ -588,9 +585,9 @@ docstring const InsetQuotesParams::getGuiLabel(QuoteStyle const & qs, bool langd } -docstring const InsetQuotesParams::getShortGuiLabel(docstring const string) +docstring const InsetQuotesParams::getShortGuiLabel(docstring const & str) { - std::string const s = to_ascii(string); + string const s = to_ascii(str); QuoteStyle const style = getQuoteStyle(s); QuoteSide const side = getQuoteSide(s); QuoteLevel const level = getQuoteLevel(s); @@ -883,6 +880,10 @@ void InsetQuotes::latex(otexstream & os, OutputParams const & runparams) const qstr = from_ascii("\\og"); else qstr = from_ascii("\\fg"); + } else if (runparams.use_hyperref && runparams.moving_arg) { + // Use internal commands in headings with hyperref + // (ligatures not featured in PDF strings) + qstr = quoteparams.getLaTeXQuote(quotechar, "int", rtl_); } else if (fontenc_ == "T1" && !runparams.local_font->language()->internalFontEncoding()) { // Quotation marks for T1 font encoding @@ -992,7 +993,7 @@ void InsetQuotes::forOutliner(docstring & os, size_t const, bool const) const } -void InsetQuotes::updateBuffer(ParIterator const & it, UpdateType /* utype*/) +void InsetQuotes::updateBuffer(ParIterator const & it, UpdateType /* utype*/, bool const /*deleted*/) { BufferParams const & bp = buffer().masterBuffer()->params(); Font const & font = it.paragraph().getFontSettings(bp, it.pos());