[PUSHED] fdo#46808, convert sdb::QueryDesigner to new style
Lionel Elie Mamane
lionel at mamane.lu
Thu Apr 4 07:58:16 PDT 2013
On Wed, Apr 03, 2013 at 11:38:40AM +0200, Stephan Bergmann wrote:
> On 04/02/2013 12:54 PM, Fridrich Strba (via Code Review) wrote:
>> Thank you for your patch! It has been merged to LibreOffice.
>> If you are interested in details, please visit
>> https://gerrit.libreoffice.org/3031
> Lionel, can you have a look whether the new-style service
> com.sun.star.sdb.QueryDefinition and accompanying interface
> com.sun.star.sdb.XQueryDefinition make sense?
This patch seems to introduce a new published interface, which did not
exist (not even unpublished) before. I don't understand why.
As to the Java snippet, I'm not sure
>> Seeing that the only use of that service
>> (dbaccess/source/core/api/querycontainer.cxx uses XPropertySet
>> generically (and does not explicitly access any of the listed
>> properties), but also expects XContent and assumes(?) XComponent,
>> it might make more sense to drop the attributes from
>> XQueryDefinition and instead let it inherit from those additional
>> interfaces.
I don't understand the consequences of "drop the attributes from
XQueryDefinition and instead let it inherit from those additional
interfaces".
I notice that the created service is added to some internal structure:
// first clone this object's CommandDefinition part
Reference< XPropertySet > xCommandDefinitionPart(
m_aContext.createComponent(
(::rtl::OUString)SERVICE_SDB_QUERYDEFINITION ), UNO_QUERY_THROW );
(...)
m_xCommandDefinitions->insertByName(sNewObjectName, makeAny(xCommandDefinitionPart));
*and* other stuff accesses the listed properties, and I assume that's
somehow the created service see e.g.
git grep PROPERTY_UPDATE_TABLENAME
But I don't understand what consequences this has for the service
definition.
>> I'm also not sure what to make of
>>> Object oQuery = xSSFQueryDefs.createInstance(); //"com.sun.star.sdb.QueryDefinition"
>> in wizards/com/sun/star/wizards/db/DBMetaData.java. You could push this patch for review on gerrit and ping Lionel.
I don't quite understand that Java code either. To my eyes, it seems
to access the "Command" property explicitly?
--
Lionel
More information about the LibreOffice
mailing list