summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-12 15:07:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-12 19:57:24 +0200
commitf7a86c5cdf4323c99d26512bf78de7f7c380667d (patch)
treef299cbf4ca27b5db0e81a90cc6551469fa280e63 /extensions/source
parentc5e5467f6a13aba68b4706a4d7feb130e824bcc6 (diff)
simplify the vcl<->toolkit connection
No need to store two different pointers and hide the underlying class behind an UNO interface Change-Id: I72c55e912caa9eae1cffa6c9d1b1d480e5668d40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/bibliography/bibload.cxx2
-rw-r--r--extensions/source/bibliography/framectr.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index cb1edd54fef4..4d170744b687 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -227,7 +227,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame,
pMyWindow->createBottomFrame(pView);
- Reference< awt::XWindow > xWin ( pMyWindow->GetComponentInterface(), UNO_QUERY );
+ auto xWin = pMyWindow->GetComponentInterfaceAs<awt::XWindow>();
Reference< XController > xCtrRef( new BibFrameController_Impl( xWin, m_xDatMan.get() ) );
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index e83580689435..8915012c4c71 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -661,7 +661,7 @@ void BibFrameController_Impl::addStatusListener(
m_xLastQueriedFocusWin = lcl_GetFocusChild( VCLUnoHelper::GetWindow( m_xWindow ) );
if (m_xLastQueriedFocusWin)
{
- Reference<css::awt::XTextComponent> xEdit(m_xLastQueriedFocusWin->GetComponentInterface(), css::uno::UNO_QUERY);
+ Reference<css::awt::XTextComponent> xEdit = m_xLastQueriedFocusWin->GetComponentInterfaceAs<css::awt::XTextComponent>();
aEvent.IsEnabled = xEdit && xEdit->isEditable() && !xEdit->getSelectedText().isEmpty();
}
}
@@ -670,7 +670,7 @@ void BibFrameController_Impl::addStatusListener(
m_xLastQueriedFocusWin = lcl_GetFocusChild( VCLUnoHelper::GetWindow( m_xWindow ) );
if (m_xLastQueriedFocusWin)
{
- Reference<css::awt::XTextComponent> xEdit(m_xLastQueriedFocusWin->GetComponentInterface(), css::uno::UNO_QUERY);
+ auto xEdit = m_xLastQueriedFocusWin->GetComponentInterfaceAs<css::awt::XTextComponent>();
aEvent.IsEnabled = xEdit && !xEdit->getSelectedText().isEmpty();
}
}
@@ -680,7 +680,7 @@ void BibFrameController_Impl::addStatusListener(
m_xLastQueriedFocusWin = lcl_GetFocusChild( VCLUnoHelper::GetWindow( m_xWindow ) );
if (m_xLastQueriedFocusWin)
{
- Reference<css::awt::XTextComponent> xEdit(m_xLastQueriedFocusWin->GetComponentInterface(), css::uno::UNO_QUERY);
+ auto xEdit = m_xLastQueriedFocusWin->GetComponentInterfaceAs<css::awt::XTextComponent>();
if (xEdit && !xEdit->isEditable())
{
uno::Reference< datatransfer::clipboard::XClipboard > xClip = m_xLastQueriedFocusWin->GetClipboard();