summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-21 19:13:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-23 08:16:18 +0200
commitd254f8a926d7d3ec4565d01f7a41ad3d9d7c9e87 (patch)
tree6f33b99f7344c3861972760428fb974073130d8d /sc
parent7c08c1af7116346f2dc0b669e231d82f4230a8c7 (diff)
loplugin:singlevalfields improve unaryoperator
when we see a unaryoperator, unless it's one of a small set, we can know (mostly) that the field will not be written. there is still a small risk of false+ with code taking references via conditional expressions. Change-Id: I96fa808067576a50e5eaf425338e225b4e0bdd4e Reviewed-on: https://gerrit.libreoffice.org/53263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/fontbuff.cxx3
-rw-r--r--sc/source/filter/inc/lotfntbf.hxx6
2 files changed, 1 insertions, 8 deletions
diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx
index 52461ffde7f6..05416a6b8a3a 100644
--- a/sc/source/filter/excel/fontbuff.cxx
+++ b/sc/source/filter/excel/fontbuff.cxx
@@ -50,9 +50,6 @@ void LotusFontBuffer::Fill( const sal_uInt8 nIndex, SfxItemSet& rItemSet )
if( pCurrent->pHeight )
rItemSet.Put( *pCurrent->pHeight );
- if( pCurrent->pColor )
- rItemSet.Put( *pCurrent->pColor );
-
if( nIndex & 0x08 )
{
SvxWeightItem aWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT );
diff --git a/sc/source/filter/inc/lotfntbf.hxx b/sc/source/filter/inc/lotfntbf.hxx
index 158612e9385f..cb42d5ed7e65 100644
--- a/sc/source/filter/inc/lotfntbf.hxx
+++ b/sc/source/filter/inc/lotfntbf.hxx
@@ -35,14 +35,12 @@ private:
OUString* pTmpName;
SvxFontItem* pFont;
SvxFontHeightItem* pHeight;
- SvxColorItem* pColor;
- sal_Int32 nType; // < 0 -> undefiniert
+ sal_Int32 nType; // < 0 -> undefined
ENTRY()
{
pTmpName = nullptr;
pFont = nullptr;
pHeight = nullptr;
- pColor = nullptr;
nType = -1;
}
~ENTRY()
@@ -53,8 +51,6 @@ private:
delete pFont;
if( pHeight )
delete pHeight;
- if( pColor )
- delete pColor;
}
void TmpName( const OUString &rNew )
{