summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/viewsh.cxx')
-rw-r--r--sfx2/source/view/viewsh.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index e1d0210c70e5..e33d59c168d4 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -33,6 +33,8 @@
#include <com/sun/star/container/XContainerQuery.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
+#include <com/sun/star/ui/UICommandDescription.hpp>
+#include <comphelper/componentcontext.hxx>
#include <cppuhelper/implbase1.hxx>
#include <osl/file.hxx>
@@ -247,8 +249,7 @@ static ::rtl::OUString RetrieveLabelFromCommand(
if ( !xNameAccess.is() )
{
xNameAccess = css::uno::Reference< css::container::XNameAccess >(
- xSMGR->createInstance(
- ::rtl::OUString( "com.sun.star.frame.UICommandDescription" )),
+ css::ui::UICommandDescription::create(comphelper::ComponentContext(xSMGR).getUNOContext()),
css::uno::UNO_QUERY_THROW );
s_xNameAccess = xNameAccess;
}