Kaydet (Commit) 2986e544 authored tarafından Guillaume Smaha's avatar Guillaume Smaha Kaydeden (comit) Stephan Bergmann

Fix tdf#99506: Insert OLE object with icon failed

Change-Id: I7fe5814b268e4c70977699edaa89926ca3fda92e
Reviewed-on: https://gerrit.libreoffice.org/25080Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 3650eacc
......@@ -24,6 +24,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/XEmbeddedOleObject.hpp>
#include <com/sun/star/embed/XInplaceObject.hpp>
#include <com/sun/star/embed/XVisualObject.hpp>
#include <com/sun/star/embed/XEmbedPersist.hpp>
......@@ -104,6 +105,7 @@ class OleComponent;
class OwnView_Impl;
class OleEmbeddedObject : public ::cppu::WeakImplHelper
< css::embed::XEmbeddedObject
, css::embed::XEmbeddedOleObject
, css::embed::XEmbedPersist
, css::embed::XLinkageSupport
, css::embed::XInplaceObject
......
......@@ -2437,6 +2437,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/embed,\
XEmbedPersist2 \
XEmbeddedClient \
XEmbeddedObject \
XEmbeddedOleObject \
XEncryptionProtectedSource \
XEncryptionProtectedSource2 \
XEncryptionProtectedStorage \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_embed_XEmbeddedOleObject_idl__
#define __com_sun_star_embed_XEmbeddedOleObject_idl__
module com { module sun { module star { module embed {
/** Represents a marker for embedded OLE objects.
*
* @since LibreOffice 5.2
*/
interface XEmbeddedOleObject
{
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -26,6 +26,7 @@
#include <com/sun/star/embed/XWindowSupplier.hpp>
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <com/sun/star/embed/EmbedVerbs.hpp>
#include <com/sun/star/embed/XEmbeddedOleObject.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
......@@ -911,7 +912,13 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
{
if ( m_pImp->m_nAspect == embed::Aspects::MSOLE_ICON )
{
if ( nVerb == embed::EmbedVerbs::MS_OLEVERB_PRIMARY || nVerb == embed::EmbedVerbs::MS_OLEVERB_SHOW )
// the common persistence is supported by objects and links
uno::Reference< embed::XEmbeddedOleObject > xEmbeddedOleObject( m_pImp->m_xObject, uno::UNO_QUERY );
if ( xEmbeddedOleObject.is() && (nVerb == embed::EmbedVerbs::MS_OLEVERB_PRIMARY || nVerb == embed::EmbedVerbs::MS_OLEVERB_OPEN || nVerb == embed::EmbedVerbs::MS_OLEVERB_SHOW ))
nVerb = embed::EmbedVerbs::MS_OLEVERB_SHOW;
else if ( nVerb == embed::EmbedVerbs::MS_OLEVERB_PRIMARY || nVerb == embed::EmbedVerbs::MS_OLEVERB_SHOW )
nVerb = embed::EmbedVerbs::MS_OLEVERB_OPEN; // outplace activation
else if ( nVerb == embed::EmbedVerbs::MS_OLEVERB_UIACTIVATE
|| nVerb == embed::EmbedVerbs::MS_OLEVERB_IPACTIVATE )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment