From 9629f7bb4625cc5b9487b14e46094e8c1b76c9aa Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Fri, 26 Jun 2015 23:47:46 +0300 Subject: [PATCH] Sum up lineStart/EndIndent values rather than overwrite them Perhaps the same thing should be done to vertical margins as well. --- .../zlibrary/text/src/style/ZLTextDecoratedStyle.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fbreader/fbreader/zlibrary/text/src/style/ZLTextDecoratedStyle.cpp b/fbreader/fbreader/zlibrary/text/src/style/ZLTextDecoratedStyle.cpp index 9c3c2f8..454876f 100644 --- a/fbreader/fbreader/zlibrary/text/src/style/ZLTextDecoratedStyle.cpp +++ b/fbreader/fbreader/zlibrary/text/src/style/ZLTextDecoratedStyle.cpp @@ -125,20 +125,20 @@ short ZLTextForcedStyle::lineStartIndent(const ZLTextStyleEntry::Metrics &metric ZLTextStyleEntry::Length lengthType = rtl ? ZLTextStyleEntry::LENGTH_RIGHT_INDENT : ZLTextStyleEntry::LENGTH_LEFT_INDENT; - return + return base()->lineStartIndent(metrics, rtl) + ( myEntry.lengthSupported(lengthType) ? myEntry.length(lengthType, metrics) : - base()->lineStartIndent(metrics, rtl); + 0); } short ZLTextForcedStyle::lineEndIndent(const ZLTextStyleEntry::Metrics &metrics, bool rtl) const { ZLTextStyleEntry::Length lengthType = rtl ? ZLTextStyleEntry::LENGTH_LEFT_INDENT : ZLTextStyleEntry::LENGTH_RIGHT_INDENT; - return + return base()->lineEndIndent(metrics, rtl) + ( myEntry.lengthSupported(lengthType) ? myEntry.length(lengthType, metrics) : - base()->lineEndIndent(metrics, rtl); + 0); } short ZLTextForcedStyle::spaceBefore(const ZLTextStyleEntry::Metrics &metrics) const {