Hi Jenei,
On Thursday, 2011-09-01 22:08:33 +0200, Jenei Gábor wrote:
LibreOffice Base if you turn on running SQL query in SQL edit view
it will pass the SQL query directly to HSQL without any type of
modification, or check, so if you push this button it should work
totally as a HSQL prompt.
Played a bit with those, while delComment() in parseTree() seems to
work, the getComment()/concatComment() in translateStatement() does not
because
sTranslatedStmt = m_xComposer->getComposedQuery();
never includes LFs in its normalized return, so the following
sTranslatedStmt = concatComment( sTranslatedStmt,
sComments);
doesnt do anything. This may be what you experienced earlier as well
when you wondered that something was eating the LFs. With the positional
approach not searching for LFs it may have worked accidentally if
original query and composed query were identical except one trailing
comment.
Without messing with the parser itself (and even then we wouldn't know
if following stages would handle the result) I don't see a clean way to
solve this, so I suggest to keep delComment() in parseTree() and discard
getComment()/concatComment(), unfortunately that will lose comments at
some (unimportant?) stage, but the query form seems to remember the
original query at least.
If no objection, I'll commit this evening.
Eike
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.