summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
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];