diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-10-04 19:01:01 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-10-04 19:01:01 +0000 |
commit | 109e89dea096060ed90e477b45cbbcc7767658be (patch) | |
tree | e2ef2b5cf74f312aad03cea199dba42e2db44707 /embedserv | |
parent | 744178de688052f1d966551a3ac30fde738e9101 (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')
-rwxr-xr-x | embedserv/source/embed/ed_ipersiststr.cxx | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx index 458d9d368..15133f664 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; |