From 4c68cf2636573c97e69ae73cb9a0b65019efd26a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 18 Oct 2018 09:48:38 +0200 Subject: convert SdrLayer::nType to bool since it is being used as a bool. Also rename it to something more readable Change-Id: I89acc47251770c94fa321b742b0fb9327024055f Reviewed-on: https://gerrit.libreoffice.org/61909 Reviewed-by: Regina Henschel Tested-by: Jenkins --- include/svx/svdlayer.hxx | 2 +- svx/source/svdraw/svdlayer.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx index c3103b263467..e8433a660cf2 100644 --- a/include/svx/svdlayer.hxx +++ b/include/svx/svdlayer.hxx @@ -67,7 +67,7 @@ class SVX_DLLPUBLIC SdrLayer bool mbPrintableODF; // corresponds to ODF draw:display bool mbLockedODF; // corresponds to ODF draw:protected SdrModel* pModel; // For broadcasting - sal_uInt16 nType; // 0= userdefined, 1= default layer + bool mbUserDefinedLayer; SdrLayerID const nID; SdrLayer(SdrLayerID nNewID, const OUString& rNewName); diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index fef4c22927b3..b941c72cdc8b 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -68,7 +68,7 @@ void SdrLayerIDSet::PutValue( const css::uno::Any & rAny ) } SdrLayer::SdrLayer(SdrLayerID nNewID, const OUString& rNewName) : - maName(rNewName), pModel(nullptr), nType(0), nID(nNewID) + maName(rNewName), pModel(nullptr), mbUserDefinedLayer(true), nID(nNewID) { // ODF default values mbVisibleODF = true; @@ -78,7 +78,7 @@ SdrLayer::SdrLayer(SdrLayerID nNewID, const OUString& rNewName) : void SdrLayer::SetStandardLayer() { - nType=sal_uInt16(true); + mbUserDefinedLayer=false; maName = SvxResId(STR_StandardLayerName); if (pModel!=nullptr) { SdrHint aHint(SdrHintKind::LayerChange); @@ -93,7 +93,7 @@ void SdrLayer::SetName(const OUString& rNewName) return; maName = rNewName; - nType = 0; // user defined + mbUserDefinedLayer = true; if (pModel) { @@ -106,7 +106,7 @@ void SdrLayer::SetName(const OUString& rNewName) bool SdrLayer::operator==(const SdrLayer& rCmpLayer) const { return (nID == rCmpLayer.nID - && nType == rCmpLayer.nType + && mbUserDefinedLayer == rCmpLayer.mbUserDefinedLayer && maName == rCmpLayer.maName); } -- cgit