summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-12-10 15:31:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-11 10:06:55 +0100
commit36c931eaebdeff85e579c2b233174f34455c4c07 (patch)
tree4eebb016323a0644b760e033db369f33b1f647f8 /sw
parent69a6057b04d3b008623bf172abdb21a9ece4a3ee (diff)
this union not necessary anymore
the nSize field is never used Change-Id: I5186999a48152606de721ee96f71ccfa9ed27df3 Reviewed-on: https://gerrit.libreoffice.org/84856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/tblrwcl.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 3c701ffc52cb..0ff6475968cc 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -75,19 +75,16 @@ namespace {
// up the current one in the array. If it's already there return the new one.
struct CpyTabFrame
{
- union {
- SwFrameFormat* pFrameFormat; // for CopyCol
- SwTwips nSize; // for DelCol
- } Value;
+ SwFrameFormat* pFrameFormat;
SwTableBoxFormat *pNewFrameFormat;
explicit CpyTabFrame(SwFrameFormat* pCurrentFrameFormat) : pNewFrameFormat( nullptr )
- { Value.pFrameFormat = pCurrentFrameFormat; }
+ { pFrameFormat = pCurrentFrameFormat; }
bool operator==( const CpyTabFrame& rCpyTabFrame ) const
- { return static_cast<sal_uLong>(Value.nSize) == static_cast<sal_uLong>(rCpyTabFrame.Value.nSize); }
+ { return pFrameFormat == rCpyTabFrame.pFrameFormat; }
bool operator<( const CpyTabFrame& rCpyTabFrame ) const
- { return static_cast<sal_uLong>(Value.nSize) < static_cast<sal_uLong>(rCpyTabFrame.Value.nSize); }
+ { return pFrameFormat < rCpyTabFrame.pFrameFormat; }
};
struct CR_SetBoxWidth
@@ -303,7 +300,7 @@ static void lcl_CopyCol( FndBox_ & rFndBox, CpyPara *const pCpyPara)
aFindFrame.pNewFrameFormat = pNewFormat;
pCpyPara->rTabFrameArr.insert( aFindFrame );
- aFindFrame.Value.pFrameFormat = pNewFormat;
+ aFindFrame.pFrameFormat = pNewFormat;
pCpyPara->rTabFrameArr.insert( aFindFrame );
}
}
@@ -351,7 +348,7 @@ static void lcl_CopyCol( FndBox_ & rFndBox, CpyPara *const pCpyPara)
? rBoxItem.GetTop()
: rBoxItem.GetRight() )
{
- aFindFrame.Value.pFrameFormat = pBox->GetFrameFormat();
+ aFindFrame.pFrameFormat = pBox->GetFrameFormat();
SvxBoxItem aNew( rBoxItem );
if( 8 > pCpyPara->nDelBorderFlag )
@@ -1241,7 +1238,7 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
const CpyTabFrame& rCTF = aFrameArr[ --i ];
if( rCTF.pNewFrameFormat == aFindFrame.pNewFrameFormat ||
- rCTF.Value.pFrameFormat == aFindFrame.pNewFrameFormat )
+ rCTF.pFrameFormat == aFindFrame.pNewFrameFormat )
{
aFrameArr.erase( aFrameArr.begin() + i );
aLastBoxArr.erase( aLastBoxArr.begin() + i );