summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-31 12:26:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-31 15:43:05 +0200
commit2d4cf6a3405be27cd95942038f63015411fdcd97 (patch)
tree519ccce954e661450f0f18cdd122d81504074189 /sw/source
parent9b75c54aa5b619c704536df2912cdab7e2241443 (diff)
pWaveCol can just be a file local constant
Change-Id: Iff44dae790793701e00f5394d5fb786059bd7c7c Reviewed-on: https://gerrit.libreoffice.org/59862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/inc/fntcache.hxx1
-rw-r--r--sw/source/core/text/txtinit.cxx2
-rw-r--r--sw/source/core/txtnode/fntcache.cxx6
3 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index 6a1e82c5b8ee..9edfd6d0e17b 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -53,7 +53,6 @@ public:
extern SwFntCache *pFntCache;
extern SwFntObj *pLastFont;
extern sal_uInt8 *pMagicNo;
-extern Color *pWaveCol;
class SwFntObj : public SwCacheObj
{
diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx
index 784d6108703e..83e4cf8de3d0 100644
--- a/sw/source/core/text/txtinit.cxx
+++ b/sw/source/core/text/txtinit.cxx
@@ -57,7 +57,6 @@ void TextInit_()
#endif
);
SwTextFrame::SetTextCache( pTextCache );
- pWaveCol = new Color(COL_GRAY);
PROTOCOL_INIT
}
@@ -68,7 +67,6 @@ void TextFinit()
delete pSwFontCache;
delete pFntCache;
delete pBlink;
- delete pWaveCol;
delete pContourCache;
SwDropPortion::DeleteDropCapCache();
}
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 985ffab1c87b..49b1224501ed 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -69,7 +69,7 @@ SwFntObj *pLastFont = nullptr;
// "MagicNumber" used to identify Fonts
sal_uInt8* pMagicNo = nullptr;
-Color *pWaveCol = nullptr;
+static constexpr Color gWaveCol(COL_GRAY);
long SwFntObj::nPixWidth;
MapMode* SwFntObj::pPixMap = nullptr;
@@ -1682,9 +1682,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
rInf.GetOut().Push();
Color aCol( rInf.GetOut().GetLineColor() );
- bool bColSave = aCol != *pWaveCol;
+ bool bColSave = aCol != gWaveCol;
if ( bColSave )
- rInf.GetOut().SetLineColor( *pWaveCol );
+ rInf.GetOut().SetLineColor( gWaveCol );
Point aEnd;
long nKernVal = pKernArray[sal_Int32(rInf.GetLen()) - 1];