LO about EnableDataTableDialog/DisableDataTableDialog

Julien Nabet serval2412 at yahoo.fr
Sat Dec 7 14:59:37 UTC 2019


Hello Kohei,

Testing chart in a brand new report on an odb file, I noticed this log:

warn:chart2.tools:992851:992851:chart2/source/tools/WrappedPropertySet.cxx:138: 
found no inner property set to map to for DisableDataTableDialog

(I had to add the rPropertyName in the SAL_WARN)

Debugging it, it comes from:

SchXMLExportHelper_Impl::exportTable

 ???? 1532???????????????? Reference< beans::XPropertySet > xProps( 
mrExport.GetModel(), uno::UNO_QUERY_THROW );
 ???? 1533???????????????? if ( ( 
xProps->getPropertyValue("DisableDataTableDialog") >>= bProtected ) &&
 ???? 1534?????????????????????????? bProtected )
 ???? 1535???????????????? {
 ???? 1536???????????????????????? mrExport.AddAttribute( XML_NAMESPACE_TABLE, 
XML_PROTECTED, XML_TRUE );
 ???? 1537???????????????? }

Retrieving XPropertySetInfo, I noticed that instead of 
"DisableDataTableDialog", there was "EnableDataTableDialog".

After having compared the use of these 2 values, I noticed this commit:

commit 6292dbc3ef4067280290f2c7f95292e2791a15db
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:???? Thu Mar 20 17:41:16 2014 -0400

 ?????? Better to associate true for "enable" and false for "disable".

 ?????? The code reads better this way, and certainly is easier on human brain
 ?????? to process their logic.

I see 3 alternatives:

1) Replace the other uses of "DisableDataTableDialog" by 
"EnableDataTableDialog" (but would it have some impact on existing file?)

2) Revert the commit so we have only "DisableDataTableDialog" (idem)

3) Deal with both

Any thoughts?

Julien



More information about the LibreOffice mailing list