summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno/unomailmerge.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uno/unomailmerge.cxx')
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index d5231fa826ce..8ea1a82934d6 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -151,13 +151,8 @@ static bool LoadFromURL_impl(
// try to get the DocShell
SwDocShell *pTmpDocShell = nullptr;
- Reference < XUnoTunnel > xTunnel( xTmpModel, UNO_QUERY );
- if (xTunnel.is())
- {
- SwXTextDocument* pTextDoc = reinterpret_cast<SwXTextDocument *>(
- xTunnel->getSomething( SwXTextDocument::getUnoTunnelId() ));
- pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : nullptr;
- }
+ if (auto pTextDoc = comphelper::getUnoTunnelImplementation<SwXTextDocument>(xTmpModel); pTextDoc)
+ pTmpDocShell = pTextDoc->GetDocShell();
bool bRes = false;
if (xTmpModel.is() && pTmpDocShell) // everything available?