summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2000-11-15 13:10:54 +0000
committerjp <jp@openoffice.org>2000-11-15 13:10:54 +0000
commitff31874dfb0a6c4deb190c67b2fa1a5fc6515930 (patch)
tree105198f61783ef55803f7f9f8bb05d77eae72b56 /svx/source
parent2939c9b414d512f2e498e46d7554102fe8d981da (diff)
CreateSdrOLEFromStorage: test if CompObj or Ole stream exist
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/msfilter/msdffimp.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index 1c7f9afc467c..65bec3175a30 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: msdffimp.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: ka $ $Date: 2000-11-09 16:32:53 $
+ * last change: $Author: jp $ $Date: 2000-11-15 14:10:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -4987,12 +4987,21 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
STREAM_READWRITE| STREAM_SHARE_DENYALL );
if( xObjStg.Is() )
{
- BYTE aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
+ BYTE aTestA[10]; // exist the \1CompObj-Stream ?
SvStorageStreamRef xSrcTst = xObjStg->OpenStream(
- String( RTL_CONSTASCII_STRINGPARAM( "\1Ole" ),
+ String( RTL_CONSTASCII_STRINGPARAM( "\1CompObj" ),
RTL_TEXTENCODING_MS_1252 ));
bValidStorage = xSrcTst.Is() && sizeof( aTestA ) ==
xSrcTst->Read( aTestA, sizeof( aTestA ) );
+ if( !bValidStorage )
+ {
+ // or the \1Ole-Stream ?
+ xSrcTst = xObjStg->OpenStream(
+ String( RTL_CONSTASCII_STRINGPARAM( "\1Ole" ),
+ RTL_TEXTENCODING_MS_1252 ));
+ bValidStorage = xSrcTst.Is() && sizeof( aTestA ) ==
+ xSrcTst->Read( aTestA, sizeof( aTestA ) );
+ }
if( bValidStorage && nConvertFlags )
{
[fr-BF] locale data, fdo#71243Eike Rathke 2013-10-18added Ladin_Italy [lld-IT] locale data, fdo#70530Eike Rathke 2013-09-20rename 'sr*YU' to 'sr*CS'Eike Rathke 2013-09-10changed all 'sh' language to 'sr-Latn'Eike Rathke 2013-04-30Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks