summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-13 12:32:04 +0100
committerEike Rathke <erack@redhat.com>2016-09-16 21:58:36 +0000
commit8c20df32c8278bc4a076cef285db7788627f4c07 (patch)
tree13e3684eb3ecf23391346b330873035389c5a988 /svx
parent13ba2592254c861dafa337121902168d83f610bd (diff)
disable generation of ole previews in ODF format until after load
so the user update links dialog can control their generation SdrEmbedObjectLink becomes exposed to calc so it can detect if the link dialog needs to be used to update ole links. Reviewed-on: https://gerrit.libreoffice.org/28879 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 74844277cc2194c9e43f5bd7a6f78a9603da32f3) Change-Id: Id1dd7ea17342140eab9307d546528747e3a98090 detangle gadzillion checks into something readable no logic change intended Change-Id: Ib6af93afc1f80b7fc36239c96d5e0a71fcbcb789 (cherry picked from commit fad9786b06d188ba6e354620f57176f3d94a6637) Unmodified default SdrOle2Obj size is 101x101 svx/source/unodraw/unoshape.cxx sets a css::awt::Size maSize to 100, 100 svx/source/unodraw/unopage.cxx increases that by 1, 1 awt::Size aSize = xShape->getSize(); aSize.Width += 1; aSize.Height += 1; to call SdrObjFactory::MakeNewObject with 101, 101 so default size is 101x101 (getWidth() vs GetWidth() confusion ?) Change-Id: I4d4375dff64d7b8e236d1a24322e749e04ee530f Reviewed-on: https://gerrit.libreoffice.org/28895 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7f0a219c9ad38ae33b51ff69d545f69659691c1e) Reviewed-on: https://gerrit.libreoffice.org/28926 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdoole2.cxx18
-rw-r--r--svx/source/unodraw/unoshap4.cxx4
2 files changed, 2 insertions, 20 deletions
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 0b8116e212e1..e06391d23078 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -58,7 +58,6 @@
#include <comphelper/classids.hxx>
#include <sot/formats.hxx>
-#include <sfx2/linkmgr.hxx>
#include <svtools/transfer.hxx>
#include <cppuhelper/implbase.hxx>
@@ -588,23 +587,6 @@ void SdrLightEmbeddedClient_Impl::setWindow(const uno::Reference< awt::XWindow >
m_xWindow = _xWindow;
}
-
-class SdrEmbedObjectLink : public sfx2::SvBaseLink
-{
- SdrOle2Obj* pObj;
-
-public:
- explicit SdrEmbedObjectLink(SdrOle2Obj* pObj);
- virtual ~SdrEmbedObjectLink();
-
- virtual void Closed() override;
- virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
- const OUString& rMimeType, const css::uno::Any & rValue ) override;
-
- bool Connect() { return GetRealObject() != nullptr; }
-};
-
-
SdrEmbedObjectLink::SdrEmbedObjectLink(SdrOle2Obj* pObject):
::sfx2::SvBaseLink( ::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB ),
pObj(pObject)
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 093d72fc5703..4fc1f5abcb23 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -416,7 +416,7 @@ bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
if( xObj.is() )
{
Rectangle aRect = pOle2Obj->GetLogicRect();
- if ( aRect.GetWidth() == 100 && aRect.GetHeight() == 100 )
+ if ( aRect.GetWidth() == 101 && aRect.GetHeight() == 101 )
{
// TODO/LATER: is it possible that this method is used to create an iconified object?
// default size
@@ -484,7 +484,7 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL )
if( xObj.is() )
{
Rectangle aRect = pOle2Obj->GetLogicRect();
- if ( aRect.GetWidth() == 100 && aRect.GetHeight() == 100 )
+ if ( aRect.GetWidth() == 101 && aRect.GetHeight() == 101 )
{
// default size
try