summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-01-28 14:57:53 +0100
committerMichael Stahl <mstahl@redhat.com>2014-01-28 15:13:02 +0100
commitcd527aae72a0b2030d00151e2137b37165c65b96 (patch)
treef3f298d147ca4d9e9ace306943f5fab38a2380a9 /sw
parent801eabf43635fd125038b2de40a1bafe16c70bd9 (diff)
sw: remove __WW8_NEEDS_COPY over-optimization
Since commit 166a79df88853847528d558ea98656ad358f4645 effectively increased SAL_TYPES_ALIGNMENT4 it caused __WW8_NEEDS_COPY to be defined for MSVC too so the !__WW8_NEEDS_COPY case is dead code now. Change-Id: Ia5c20588a2efdd341f1406e091fecf16a12c3f2f
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx10
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx4
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx9
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx4
4 files changed, 0 insertions, 27 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index c565c6bae2a1..43b5fbeda1f0 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -149,13 +149,8 @@ public:
void SetNewEnd( WW8_FC nEnd )
{ ((sal_Int32*)pFkp)[nIMax] = nEnd; }
-#ifdef __WW8_NEEDS_COPY
WW8_FC GetStartFc() const;
WW8_FC GetEndFc() const;
-#else
- WW8_FC GetStartFc() const { return ((sal_Int32*)pFkp)[0]; };
- WW8_FC GetEndFc() const { return ((sal_Int32*)pFkp)[nIMax]; };
-#endif // defined __WW8_NEEDS_COPY
sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen, bool bVer8);
};
@@ -1217,8 +1212,6 @@ void WW8_WrFkp::MergeToNew( short& rVarLen, sal_uInt8 *& rpNewSprms )
}
}
-#ifdef __WW8_NEEDS_COPY
-
WW8_FC WW8_WrFkp::GetStartFc() const
{
// wenn bCombined, dann ist das Array ab pFkp schon Bytemaessig auf LittleEndian
@@ -1236,9 +1229,6 @@ WW8_FC WW8_WrFkp::GetEndFc() const
return ((sal_Int32*)pFkp)[nIMax];
}
-#endif // defined __WW8_NEEDS_COPY
-
-
// Method for managing the piece table
WW8_WrPct::WW8_WrPct(WW8_FC nfcMin, bool bSaveUniCode)
: nOldFc(nfcMin), bIsUni(bSaveUniCode)
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 10b7e6c9cf95..81a2ec02f12e 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2419,13 +2419,9 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
WW8_FSPA_SHADOW* pFS = (WW8_FSPA_SHADOW*)pF0;
WW8_FSPA* pF;
-#ifdef __WW8_NEEDS_COPY
WW8_FSPA aFSFA;
pF = &aFSFA;
WW8FSPAShadowToReal( pFS, pF );
-#else
- pF = (WW8_FSPA*)pFS;
-#endif // defined __WW8_NEEDS_COPY
if( !pF->nSpId )
{
OSL_ENSURE( !this, "+Wo ist die Grafik (3) ?" );
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 18c290b372ff..d9f9b9758af8 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -236,9 +236,7 @@ bool wwZOrderer::InsertObject(SdrObject* pObject, sal_uLong nPos)
return false;
}
-#ifdef __WW8_NEEDS_COPY
extern void WW8PicShadowToReal( WW8_PIC_SHADOW* pPicS, WW8_PIC* pPic );
-#endif // defined __WW8_NEEDS_COPY
bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc)
{
@@ -447,13 +445,9 @@ void SwWW8ImplReader::PicRead(SvStream *pDataStream, WW8_PIC *pPic,
bool bVer67)
{
//Only the first 0x2e bytes are the same between version 6/7 and 8+
-#ifdef __WW8_NEEDS_COPY
WW8_PIC_SHADOW aPicS;
pDataStream->Read( &aPicS, sizeof( aPicS ) );
WW8PicShadowToReal( &aPicS, pPic );
-#else
- pDataStream->Read( pPic, 0x2E);
-#endif // defined __WW8_NEEDS_COPY
for (int i=0;i<4;i++)
pDataStream->Read( &pPic->rgbrc[i], bVer67 ? 2 : 4);
*pDataStream >> pPic->dxaOrigin;
@@ -726,8 +720,6 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
return AddAutoAnchor(pRet);
}
-#ifdef __WW8_NEEDS_COPY
-
void WW8PicShadowToReal( WW8_PIC_SHADOW * pPicS, WW8_PIC * pPic )
{
pPic->lcb = SVBT32ToUInt32( pPicS->lcb );
@@ -774,6 +766,5 @@ void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
pFSPA->bAnchorLock = 0 != ( nBits & 0x8000 );
pFSPA->nTxbx = SVBT32ToUInt32( pFSPAS->nTxbx );
}
-#endif // defined __WW8_NEEDS_COPY
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 2e9f18beb8d8..9935da40820b 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -27,10 +27,6 @@
#include <editeng/borderline.hxx>
#include <filter/msfilter/util.hxx>
-#if defined OSL_BIGENDIAN || SAL_TYPES_ALIGNMENT4 > 2 || defined UNX
-# define __WW8_NEEDS_COPY
-#endif
-
#ifdef SAL_W32
# pragma pack(push, 2)
#endif