summaryrefslogtreecommitdiff
path: root/embedserv/source/embed
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-10-04 19:01:01 +0000
committerKurt Zenker <kz@openoffice.org>2004-10-04 19:01:01 +0000
commit2960a18a238bb5ef79991366adfccb2b6fdc357a (patch)
tree59599fbb8df0e3d4736368e6fb048c3a7d8e83f3 /embedserv/source/embed
parent4e806872eb09bfecceed0ee9140a7b95a2d1fd7c (diff)
INTEGRATION: CWS mav09 (1.12.12); FILE MERGED
2004/06/18 16:43:01 mav 1.12.12.1: #i27773# get rid of WinExtent workaround
Diffstat (limited to 'embedserv/source/embed')
-rwxr-xr-xembedserv/source/embed/ed_ipersiststr.cxx44
1 files changed, 24 insertions, 20 deletions
diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx
index 721b97f6caa7..03b24b386edf 100755
--- a/embedserv/source/embed/ed_ipersiststr.cxx
+++ b/embedserv/source/embed/ed_ipersiststr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ed_ipersiststr.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: kz $ $Date: 2004-02-25 17:08:57 $
+ * last change: $Author: kz $ $Date: 2004-10-04 20:01:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -544,7 +544,8 @@ STDMETHODIMP EmbedDocument_Impl::Load( IStorage *pStg )
if ( !m_pExtStream ) hr = E_FAIL;
}
- RECTL aRectToSet;
+ // RECTL aRectToSet;
+ SIZEL aSizeToSet;
if ( SUCCEEDED( hr ) )
{
ULARGE_INTEGER nNewPos;
@@ -559,10 +560,12 @@ STDMETHODIMP EmbedDocument_Impl::Load( IStorage *pStg )
if ( SUCCEEDED( hr ) )
{
- aRectToSet.left = *((sal_Int32*)aInf);
- aRectToSet.top = *((sal_Int32*)&aInf[4]);
- aRectToSet.right = *((sal_Int32*)&aInf[8]);
- aRectToSet.bottom = *((sal_Int32*)&aInf[12]);
+ // aRectToSet.left = *((sal_Int32*)aInf);
+ // aRectToSet.top = *((sal_Int32*)&aInf[4]);
+ // aRectToSet.right = *((sal_Int32*)&aInf[8]);
+ // aRectToSet.bottom = *((sal_Int32*)&aInf[12]);
+ aSizeToSet.cx = *((sal_Int32*)&aInf[8]) - *((sal_Int32*)aInf);
+ aSizeToSet.cy = *((sal_Int32*)&aInf[12]) - *((sal_Int32*)&aInf[4]);
}
}
}
@@ -588,7 +591,8 @@ STDMETHODIMP EmbedDocument_Impl::Load( IStorage *pStg )
{
xLoadable->load( fillArgsForLoading_Impl( xTempIn, nStreamMode ) );
m_pMasterStorage = pStg;
- hr = m_pDocHolder->SetVisArea( &aRectToSet );
+ hr = m_pDocHolder->SetExtent( &aSizeToSet );
+ // hr = m_pDocHolder->SetVisArea( &aRectToSet );
}
catch( uno::Exception& )
{
@@ -679,17 +683,17 @@ STDMETHODIMP EmbedDocument_Impl::Save( IStorage *pStgSave, BOOL fSameAsLoad )
hr = pNewExtStream->Seek( aZero, STREAM_SEEK_SET, &nNewPos );
if ( SUCCEEDED( hr ) )
{
- RECTL aRect;
- hr = m_pDocHolder->GetVisArea( &aRect );
+ SIZEL aSize;
+ hr = m_pDocHolder->GetExtent( &aSize );
if ( SUCCEEDED( hr ) )
{
sal_uInt32 nWritten;
sal_Int8 aInf[EXT_STREAM_LENGTH];
- *((sal_Int32*)aInf) = aRect.left;
- *((sal_Int32*)&aInf[4]) = aRect.top;
- *((sal_Int32*)&aInf[8]) = aRect.right;
- *((sal_Int32*)&aInf[12]) = aRect.bottom;
+ *((sal_Int32*)aInf) = 0;
+ *((sal_Int32*)&aInf[4]) = 0;
+ *((sal_Int32*)&aInf[8]) = aSize.cx;
+ *((sal_Int32*)&aInf[12]) = aSize.cy;
hr = pNewExtStream->Write( (void*)aInf, EXT_STREAM_LENGTH, &nWritten );
if ( nWritten != EXT_STREAM_LENGTH ) hr = E_FAIL;
@@ -850,17 +854,17 @@ STDMETHODIMP EmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD dwMode )
hr = m_pExtStream->Seek( aZero, STREAM_SEEK_SET, &nNewPos );
if ( SUCCEEDED( hr ) )
{
- RECTL aRect;
- hr = m_pDocHolder->GetVisArea( &aRect );
+ SIZEL aSize;
+ hr = m_pDocHolder->GetExtent( &aSize );
if ( SUCCEEDED( hr ) )
{
sal_uInt32 nWritten;
sal_Int8 aInf[EXT_STREAM_LENGTH];
- *((sal_Int32*)aInf) = aRect.left;
- *((sal_Int32*)&aInf[4]) = aRect.top;
- *((sal_Int32*)&aInf[8]) = aRect.right;
- *((sal_Int32*)&aInf[12]) = aRect.bottom;
+ *((sal_Int32*)aInf) = 0;
+ *((sal_Int32*)&aInf[4]) = 0;
+ *((sal_Int32*)&aInf[8]) = aSize.cx;
+ *((sal_Int32*)&aInf[12]) = aSize.cy;
hr = m_pExtStream->Write( (void*)aInf, EXT_STREAM_LENGTH, &nWritten );
if ( nWritten != EXT_STREAM_LENGTH ) hr = E_FAIL;