[Libreoffice] BUG 36594

Eike Rathke ooo at erack.de
Tue Aug 30 11:38:17 PDT 2011


Hi Jenei,

On Tuesday, 2011-08-30 18:33:55 +0200, Jenei Gábor wrote:

> I made your recommended changes, but the querycomposer class seems
> to be modified since I last worked on this issu, as unfortunatelly
> it deletes all the linefeeds in the query string, so I cannot make
> it work.

Are you sure that wasn't my change that skipped the LFs? I may have
misremembered the original delComment, I thought that inserted LFs for
each comment.

> Now I could store in a second vector whether one line is
> just empty(it only contains a comment)

Instead, I'd use

struct QueryComment
{
    sal_Int32       nPos;
    rtl::OUString   aComment;
};

typedef ::std::vector< QueryComment > QueryCommentVector;

and use nPos as an index into the original query where the comment
started. That way it can be reconstructed easily.

> , or it contains query string,
> so then I iterate on this vector, and try to reconstruct my query
> with comments. Actually I've already checked that my delComment
> function works ok, it leaves the linefeeds on their place, so
> something else must go wrong.

Then that's my change, it skipped the LFs, just change the place where
append() is called and add 1 to the length to be appended.

  Eike

-- 
 PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication.
 Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110830/34ab5721/attachment.pgp>


More information about the LibreOffice mailing list