diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-22 17:09:35 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 08:08:00 +0100 |
commit | ad73967e99235a2ba9b5a2106c5d6d0f8efaa1ca (patch) | |
tree | 5b11b7812b84c2647c64d1002bad7ed8a1d1754d /forms | |
parent | a53577e6ff3629c4e9219616960d89eea9463593 (diff) |
Remove unnecessary extractInterface
Change-Id: I4848bf84615274ad5732223a354fb7a6b845d9a8
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 5 | ||||
-rw-r--r-- | forms/source/component/Grid.cxx | 9 | ||||
-rw-r--r-- | forms/source/component/ImageControl.cxx | 5 |
3 files changed, 11 insertions, 8 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 223adc8bc321..aed7bb88386c 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -58,7 +58,6 @@ #include <comphelper/basicio.hxx> #include <comphelper/container.hxx> #include <comphelper/enumhelper.hxx> -#include <comphelper/extract.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/seqstream.hxx> #include <comphelper/sequence.hxx> @@ -2471,8 +2470,8 @@ void SAL_CALL ODatabaseForm::setControlModels(const Sequence<Reference<XControlM // Find component in the list for (sal_Int32 j = 0; j < nCount; ++j) { - Reference<XFormComponent> xElement; - ::cppu::extractInterface(xElement, getByIndex(j)); + Reference<XFormComponent> xElement( + getByIndex(j), css::uno::UNO_QUERY); if (xComp == xElement) { Reference<XPropertySet> xSet(xComp, UNO_QUERY); diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 746583ba30f6..1be7b6d48ac0 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -28,7 +28,6 @@ #include <com/sun/star/text/WritingMode2.hpp> #include <comphelper/basicio.hxx> #include <comphelper/container.hxx> -#include <comphelper/extract.hxx> #include <comphelper/processfactory.hxx> #include <cppuhelper/queryinterface.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -266,9 +265,13 @@ sal_Bool SAL_CALL OGridControlModel::select(const Any& rElement) throw(IllegalAr { ::osl::ClearableMutexGuard aGuard( m_aMutex ); Reference<XPropertySet> xSel; - if (rElement.hasValue() && !::cppu::extractInterface(xSel, rElement)) + if (rElement.hasValue()) { - throw IllegalArgumentException(); + xSel.set(rElement, css::uno::UNO_QUERY); + if (!xSel.is()) + { + throw IllegalArgumentException(); + } } InterfaceRef xMe = static_cast<XWeak*>(this); if (xSel.is()) diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index c7519a8881c6..d2f1be6f86c2 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -50,7 +50,6 @@ #include <tools/diagnose_ex.h> #include <vcl/svapp.hxx> #include <unotools/streamhelper.hxx> -#include <comphelper/extract.hxx> #include <comphelper/guarding.hxx> #include <comphelper/processfactory.hxx> #include <unotools/ucbstreamhelper.hxx> @@ -959,7 +958,9 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent& // If the Control is not bound, do not display a dialog (because the to-be-sent URL would be invalid anyway) Reference<XPropertySet> xBoundField; if (hasProperty(PROPERTY_BOUNDFIELD, xSet)) - ::cppu::extractInterface(xBoundField, xSet->getPropertyValue(PROPERTY_BOUNDFIELD)); + xBoundField.set( + xSet->getPropertyValue(PROPERTY_BOUNDFIELD), + css::uno::UNO_QUERY); if (!xBoundField.is()) { // but only if our IMAGE_URL property is handled as if it is transient, which is equivalent to |