summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/uno/ColumnControl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/uno/ColumnControl.cxx')
-rw-r--r--dbaccess/source/ui/uno/ColumnControl.cxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx
index 51930de95119..78b0f2fee53c 100644
--- a/dbaccess/source/ui/uno/ColumnControl.cxx
+++ b/dbaccess/source/ui/uno/ColumnControl.cxx
@@ -19,7 +19,7 @@
#include "ColumnControl.hxx"
#include "ColumnPeer.hxx"
-#include <apitools.hxx>
+#include <strings.hxx>
#include <vcl/window.hxx>
#include <com/sun/star/awt/PosSize.hpp>
@@ -35,11 +35,10 @@ namespace dbaui
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::sdbc;
OColumnControl::OColumnControl(const Reference<XComponentContext>& rxContext)
- :UnoControl(), m_xContext(rxContext)
+ : m_xContext(rxContext)
{
}
@@ -47,13 +46,21 @@ OUString SAL_CALL OColumnControl::getImplementationName()
{
return SERVICE_CONTROLDEFAULT;
}
-IMPLEMENT_SERVICE_INFO_SUPPORTS(OColumnControl)
+sal_Bool SAL_CALL OColumnControl::supportsService(const OUString& _rServiceName)
+ {
+ const css::uno::Sequence< OUString > aSupported(getSupportedServiceNames());
+ for (const OUString& s : aSupported)
+ if (s == _rServiceName)
+ return true;
+
+ return false;
+ }
css::uno::Sequence< OUString > SAL_CALL OColumnControl::getSupportedServiceNames()
{
return { "com.sun.star.awt.UnoControl","com.sun.star.sdb.ColumnDescriptorControl" };
}
-OUString OColumnControl::GetComponentServiceName()
+OUString OColumnControl::GetComponentServiceName() const
{
return "com.sun.star.sdb.ColumnDescriptorControl";
}
@@ -69,7 +76,7 @@ void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit
vcl::Window* pParentWin = nullptr;
if (rParentPeer.is())
{
- VCLXWindow* pParent = comphelper::getUnoTunnelImplementation<VCLXWindow>(rParentPeer);
+ VCLXWindow* pParent = dynamic_cast<VCLXWindow*>(rParentPeer.get());
if (pParent)
pParentWin = pParent->GetWindow();
}