<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - libreoffice-5.2.2.2 AVG function produces SQL syntax error in query design view"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=103736#c31">Comment # 31</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - libreoffice-5.2.2.2 AVG function produces SQL syntax error in query design view"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=103736">bug 103736</a>
from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
<pre>I tried to play with m_bGraphicalDesign + impl_setViewMode to call
getContainer()->switchView just when needed* + revert back the state, I could
retrieve "AVG" instead of the localized name.
However, when trying trying sql, execute, design, execute, ... I don't remember
the order, it still failed at a point.
In brief, I can put an unbreakable space in Pootle but can't do more.
*
688 case ID_BROWSER_QUERY_EXECUTE:
689 grabFocusFromLimitBox(*this);
690 if ( getContainer()->checkStatement() )
691 {
from dbaccess/source/ui/querydesign/querycontroller.cxx (see
<a href="https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/querydesign/querycontroller.cxx#692">https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/querydesign/querycontroller.cxx#692</a>)
Here why I tried this:
68 OUString OQueryViewSwitch::getStatement()
69 {
70 if(m_pTextView->IsVisible())
71 return m_pTextView->getStatement();
72 return m_pDesignView->getStatement();
73 }
(gdb) p m_pTextView->IsVisible()
$11 = false
(gdb) p m_pTextView->getStatement()
$12 = "SELECT AVG( \"table-number\".\"number-field\" ) AS \"number-field\" FROM
\"table-number\" GROUP BY \"group\""
(gdb) p m_pDesignView->getStatement()
$13 = "SELECT Moyenne(\"number-field\") AS \"number-field\" FROM
\"table-number\" GROUP BY \"group\" "
from
(gdb) bt
#0 0x00007fffc8193a14 in dbaui::OQueryViewSwitch::getStatement()
(this=0x55555895b500) at
/home/julien/lo/libreoffice/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx:69
#1 0x00007fffc815c6d9 in dbaui::OQueryContainerWindow::getStatement()
(this=0x5555580bd0d0) at
/home/julien/lo/libreoffice/dbaccess/source/ui/inc/querycontainerwindow.hxx:82
#2 0x00007fffc8158b69 in dbaui::OQueryController::translateStatement(bool)
(this=0x555558e7d650, _bFireStatementChange=false)
at
/home/julien/lo/libreoffice/dbaccess/source/ui/querydesign/querycontroller.cxx:1686
#3 0x00007fffc81559ac in dbaui::OQueryController::executeQuery()
(this=0x555558e7d650) at
/home/julien/lo/libreoffice/dbaccess/source/ui/querydesign/querycontroller.cxx:1246
#4 0x00007fffc8152713 in dbaui::OQueryController::Execute(unsigned short,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
(this=0x555558e7d650, _nId=10721, aArgs=uno::Sequence of length 1 = {...}) at
/home/julien/lo/libreoffice/dbaccess/source/ui/querydesign/querycontroller.cxx:690
#5 0x00007fffc7ef54d2 in
dbaui::OGenericUnoController::executeChecked(com::sun::star::util::URL const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
(this=0x555558e7d650, _rCommand=..., aArgs=uno::Sequence of length 1 = {...})
at
/home/julien/lo/libreoffice/dbaccess/source/ui/browser/genericcontroller.cxx:1049
I searched about IsVisible and found Show function in
OQueryViewSwitch::impl_postViewSwitch itself called from
OQueryViewSwitch::switchView</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>