summaryrefslogtreecommitdiff
path: root/svx/source/msfilter/msdffimp.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-01-23 06:38:11 +0000
committerOliver Bolte <obo@openoffice.org>2007-01-23 06:38:11 +0000
commit07d393fe4ccd5d5932389abce0e6b19b26a215ab (patch)
tree38a95173c06b8ebc1f9d4a87597292f9b5cca59a /svx/source/msfilter/msdffimp.cxx
parent74e27b51f544192f659e26dca36026507699f506 (diff)
INTEGRATION: CWS fwk59 (1.144.50); FILE MERGED
2007/01/10 14:33:28 mav 1.144.50.1: #i60121# detect iconified object from word
Diffstat (limited to 'svx/source/msfilter/msdffimp.cxx')
-rw-r--r--svx/source/msfilter/msdffimp.cxx26
1 files changed, 23 insertions, 3 deletions
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index d36cf3da60..6e5fd03418 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: msdffimp.cxx,v $
*
- * $Revision: 1.146 $
+ * $Revision: 1.147 $
*
- * last change: $Author: obo $ $Date: 2007-01-22 15:39:54 $
+ * last change: $Author: obo $ $Date: 2007-01-23 07:38:11 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -7695,8 +7695,9 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
SvStream* pDataStrm,
ErrCode& rError,
UINT32 nConvertFlags,
- sal_Int64 nAspect )
+ sal_Int64 nReccomendedAspect )
{
+ sal_Int64 nAspect = nReccomendedAspect;
SdrOle2Obj* pRet = 0;
if( rSrcStorage.Is() && xDestStorage.is() && rStorageName.Len() )
{
@@ -7735,6 +7736,25 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
if( bValidStorage )
{
+ if ( nAspect != embed::Aspects::MSOLE_ICON )
+ {
+ // check whether the object is iconified one
+ // usually this information is already known, the only exception
+ // is a kind of embedded objects in Word documents
+ // TODO/LATER: should the caller be notified if the aspect changes in future?
+
+ SvStorageStreamRef xObjInfoSrc = xObjStg->OpenSotStream(
+ String( RTL_CONSTASCII_STRINGPARAM( "\3ObjInfo" ) ),
+ STREAM_STD_READ | STREAM_NOCREATE );
+ if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
+ {
+ BYTE nByte = 0;
+ *xObjInfoSrc >> nByte;
+ if ( ( nByte >> 4 ) & embed::Aspects::MSOLE_ICON )
+ nAspect = embed::Aspects::MSOLE_ICON;
+ }
+ }
+
uno::Reference < embed::XEmbeddedObject > xObj( CheckForConvertToSOObj(
nConvertFlags, *xObjStg, xDestStorage, rGrf, rVisArea ));
if ( xObj.is() )