summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-10-31 11:02:28 +0000
committerNoel Power <noel.power@suse.com>2012-10-31 11:02:28 +0000
commit2ed931303b10386153a1337fa15b225aabd40cb4 (patch)
tree232bd9bbda4be099824fe7b0763d598e27f96756 /sw
parentced1151a1ad00fb2913a4c0f54e4544f4e566c05 (diff)
fix the strange ww8export tinderbox failure
Change-Id: Ie1804a3790aee23a8fdf86e27085de81f5e50c11
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx12
-rw-r--r--sw/source/filter/ww8/ww8par.hxx2
2 files changed, 11 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index ae461a3ed1ee..b4ab86aaa18d 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2775,10 +2775,15 @@ sal_uInt32 SwEscherEx::QueryTextID(
}
SwMSConvertControls::SwMSConvertControls( SfxObjectShell *pDSh,SwPaM *pP ) : oox
-::ole::MSConvertOCXControls( pDSh ? pDSh->GetModel() : NULL ), pPaM( pP )
+::ole::MSConvertOCXControls( pDSh ? pDSh->GetModel() : NULL ), pPaM( pP ), mnObjectId(0)
{
}
+sal_uInt32 SwMSConvertControls::GenerateObjectID()
+{
+ return ++mnObjectId;
+}
+
// in transitioning away old filter for ole/ocx controls, ReadOCXStream has been made pure virtual in
// filter/source/msocximex.cxx, so.. we need an implementation here
sal_Bool SwMSConvertControls::ReadOCXStream( SotStorageRef& rSrc1,
@@ -2821,7 +2826,8 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
//Create a destination storage for the microsoft control
rtl::OUStringBuffer sStorageName;
- sStorageName.append('_').append(reinterpret_cast<sal_Int64>(pObj));
+ sal_uInt32 nObjId = GenerateObjectID();
+ sStorageName.append('_').append( static_cast<sal_Int64>( nObjId ));
SvStorageRef xOleStg = xObjPool->OpenSotStorage(sStorageName.makeStringAndClear(),
STREAM_READWRITE|STREAM_SHARE_DENYALL);
@@ -2844,7 +2850,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
};
//Set the obj id into the sprmCPicLocation
sal_uInt8 *pData = aSpecOLE+2;
- Set_UInt32(pData,(sal_uInt32)(sal_uIntPtr)pObj);
+ Set_UInt32(pData,nObjId );
String sFld(FieldString(ww::eCONTROL));
sFld.APPEND_CONST_ASC("Forms.");
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 9215369e061f..44f6511369fb 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -656,7 +656,9 @@ public:
com::sun::star::drawing::XShape > *pShapeRef=0,
sal_Bool bFloatingCtrl=false );
private:
+ sal_uInt32 GenerateObjectID();
SwPaM *pPaM;
+ sal_uInt32 mnObjectId;
};
class SwMSDffManager : public SvxMSDffManager