diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-02-24 12:08:34 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-02-24 12:11:48 +0200 |
commit | 569756aaf4606313297eace88b3ad5a6f57d8329 (patch) | |
tree | 6b01c2c7eeda4cb00f7b6485d84f85e6f08b27ea /sw/source/ui/dochdl | |
parent | a13622923af5024398eff324dadb048fd6fd7b04 (diff) |
Re-introduce code to try to get GDI metafile replacement image
The code was commented out in 2009 in CWS metropatch01_DEV300, with
any reasoning behind it lost in history, and then cleaned away in
2010. Re-introduce the bit that tries FORMAT_GDIMETAFILE. Seems to
work for data that produces a reasonably sized metafile. (For data
from an Excel "Select All" followed by "Copy", that puts a million
rows on the clipboard, good luck... Unfortunately when doing that in
Excel, sometimes you get a million rows, sometimes just the non-empty
relevant part of the worksheet.)
Change-Id: Ib5f1a989b65ad0a30194a1ed23f8b94dd3822cac
Diffstat (limited to 'sw/source/ui/dochdl')
-rw-r--r-- | sw/source/ui/dochdl/swdtflvr.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index d9fa3f343800..9a9e3c28380c 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -1820,6 +1820,9 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, Graphic aGraphic; sal_uLong nGrFormat = 0; + if( rData.GetGraphic( FORMAT_GDIMETAFILE, aGraphic ) ) + nGrFormat = SOT_FORMAT_GDIMETAFILE; + // insert replacement image ( if there is one ) into the object helper if ( nGrFormat ) { |