diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-30 20:27:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-31 09:14:39 +0100 |
commit | d526bd7dd5b94be6fe5a823372da1facca3d43fa (patch) | |
tree | 656b49726096326e7832cde5c177f85fd8c8c454 /sw/source/filter/ww8/wrtw8nds.cxx | |
parent | 7eeb484e7d1faf87fbb8774a8bda4328d047dde3 (diff) |
Fix StringAdd::isCompileTimeConstant
...to find StringLiteral on the RHS of +=. Which revealed that the
VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that
s += side_effect();
s += "literal";
s += side_effect();
only gets combined to
s += side_effect() + "literal";
s += side_effect();
and not all the way to
s += side_effect() + "literal" + side_effect();
Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4
Reviewed-on: https://gerrit.libreoffice.org/81804
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/filter/ww8/wrtw8nds.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 924ed9fbd5ee..bd73cc4ab542 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -832,26 +832,16 @@ const SfxPoolItem& SwWW8AttrIter::GetItem(sal_uInt16 nWhich) const void WW8AttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 /*nPos*/, const SwFormatRuby& rRuby ) { WW8Ruby aWW8Ruby(rNode, rRuby, GetExport()); - OUString aStr( FieldString( ww::eEQ ) ); - aStr += "\\* jc"; - aStr += OUString::number(aWW8Ruby.GetJC()); - - - aStr += " \\* \"Font:"; - aStr += aWW8Ruby.GetFontFamily(); - aStr += "\" \\* hps"; - aStr += OUString::number((aWW8Ruby.GetRubyHeight() + 5) / 10); - aStr += " \\o"; + OUString aStr( FieldString( ww::eEQ ) + "\\* jc" ); + aStr += OUString::number(aWW8Ruby.GetJC()) + " \\* \"Font:"; + aStr += aWW8Ruby.GetFontFamily() + "\" \\* hps"; + aStr += OUString::number((aWW8Ruby.GetRubyHeight() + 5) / 10) + " \\o"; if (aWW8Ruby.GetDirective()) { aStr += OUStringLiteral("\\a") + OUStringChar(aWW8Ruby.GetDirective()); } - aStr += "(\\s\\up "; - - aStr += OUString::number((aWW8Ruby.GetBaseHeight() + 10) / 20 - 1); - aStr += "("; - aStr += rRuby.GetText(); - aStr += ")"; + aStr += "(\\s\\up " + OUString::number((aWW8Ruby.GetBaseHeight() + 10) / 20 - 1) + "("; + aStr += rRuby.GetText() + ")"; // The parameter separator depends on the FIB.lid if ( m_rWW8Export.pFib->getNumDecimalSep() == '.' ) |