[Libreoffice] Fwd: Re: patch for scan-diialog
Stephan Bergmann
sbergman at redhat.com
Thu Oct 20 00:39:11 PDT 2011
On 10/19/2011 10:30 PM, Rob Snelders wrote:
> I tried to add the XScannerManager2. But when I try with this patch then
> the menu-items are disabled. I have tried to search where the problem
> was but I can´t find it. Can you help me?
Hi Rob,
The new file offapi/com/sun/star/scanner/XScannerManager2.idl is missing
from the patch (I guess you did not git add it before you created the
git diff).
Then, as Markus already pointed out, the ScannerManager class needs to
be adapted, to derive from XScannerManager2.
Further, I noted that when configureScannerAndScan in scanunx.cxx calls
the SaneDlg constructor, it should pass "listener.is()" instead of
"(listener != NULL)" for bScanEnabled. While the latter (happens to)
work as well, the former is much cleaner and the preferred idiom when
working with com::sun::star::uno::Reference.
And finally, the scanwin.cxx case does not support the new feature at
all, right? Then we should at least change the end of the changed line
in that file from "const uno::Reference< lang::XEventListener >&
rxListener )" to "const uno::Reference< lang::XEventListener >& )", to
avoid warnings about unused parameters. Better yet, the button should
be hidden. (Or even better yet, the new functionality should be
implemented...)
If you provide the missing XScannerManager2.idl, I can tweak the above
issues in the patch for you, if you like.
-Stephan
More information about the LibreOffice
mailing list