summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-18 15:05:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-19 09:40:22 +0100
commitd4cafd20506a60a148b55e716c690a74c943def7 (patch)
tree208ea984d2c9f33cffdf4f1f0729964a7ca7d78f /sw
parentddaaf6d1ae63320e15ce797ca2c0f11a2b539bee (diff)
use boost::optional in EditFieldInfo
it is inefficient to allocate a tiny object like Color separately on the heap Change-Id: I2f03538f987ff032857f3316ed2d8c2c8d731549 Reviewed-on: https://gerrit.libreoffice.org/67968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docdraw.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 9eb49b95a44b..2087fbbe58d8 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -541,8 +541,8 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
}
else if (dynamic_cast<const SdrMeasureField*>( pField))
{
- // Measure field
- pInfo->ClearFieldColor();
+ // Clear measure field
+ pInfo->SetFieldColor(boost::optional<Color>());
}
else if ( auto pTimeField = dynamic_cast<const SvxExtTimeField*>( pField) )
{