Please be careful with (OU)String changes - endless loop with report designer

David Ostrovsky d.ostrovsky at
Sun Jun 23 06:15:18 PDT 2013

just pushed a partially revert [1] for your commit
that introduced the endless loop:


-            String aText = m_aFtTitle.GetText();
+            OUStringBuffer aText( m_aFtTitle.GetText() );
- while( m_pTheParent->GetTextWidth( aText ) < m_nNameWidth )
-        aText.AppendAscii("...........");
while( m_pTheParent->GetTextWidth( aText.makeStringAndClear() ) <
m_nNameWidth )
+         aText.append("...........");


The problem here is, that the method aText.makeStringAndClear() destroys
the content of the OUStringBuffer and aText.append("...........") start
from the beginning and thus never ends.

Note: i didn't check the rest of that commit.


More information about the LibreOffice mailing list