summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-01 11:40:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-08 08:03:03 +0200
commit1a6397030381a45f27ab7a2a02e6e6d0f9987c84 (patch)
tree6e342854037b3b845215af09f36407495550254d /svx/source
parent781544497a0913037bba160a4cf6b643e5ca1d1a (diff)
loplugin:constfields in svx
Change-Id: I643e8686e015ca85dd96221f1c93038f4fddf27b Reviewed-on: https://gerrit.libreoffice.org/61182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx3
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.hxx3
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeHandle.hxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx2
-rw-r--r--svx/source/dialog/framelinkarray.cxx4
-rw-r--r--svx/source/dialog/srchdlg.cxx2
-rw-r--r--svx/source/dialog/svxruler.cxx67
-rw-r--r--svx/source/fmcomp/gridctrl.cxx2
-rw-r--r--svx/source/form/dataaccessdescriptor.cxx2
-rw-r--r--svx/source/form/datanavi.cxx8
-rw-r--r--svx/source/form/filtnav.cxx4
-rw-r--r--svx/source/form/fmdocumentclassification.cxx2
-rw-r--r--svx/source/form/fmsrccfg.cxx2
-rw-r--r--svx/source/form/formcontrolling.cxx10
-rw-r--r--svx/source/form/tabwin.cxx2
-rw-r--r--svx/source/gallery2/GallerySplitter.hxx2
-rw-r--r--svx/source/gallery2/galbrws1.hxx4
-rw-r--r--svx/source/gallery2/galbrws2.cxx4
-rw-r--r--svx/source/inc/AccessibleFrameSelector.hxx2
-rw-r--r--svx/source/inc/charmapacc.hxx2
-rw-r--r--svx/source/inc/datanavi.hxx48
-rw-r--r--svx/source/inc/delayedevent.hxx2
-rw-r--r--svx/source/inc/docrecovery.hxx10
-rw-r--r--svx/source/inc/filtnav.hxx4
-rw-r--r--svx/source/inc/fmexpl.hxx12
-rw-r--r--svx/source/inc/fmshimp.hxx4
-rw-r--r--svx/source/inc/fmtextcontroldialogs.hxx2
-rw-r--r--svx/source/inc/fmtextcontrolfeature.hxx4
-rw-r--r--svx/source/inc/fmundo.hxx8
-rw-r--r--svx/source/inc/formcontrolling.hxx2
-rw-r--r--svx/source/inc/gridcell.hxx4
-rw-r--r--svx/source/inc/svxpixelctlaccessiblecontext.hxx4
-rw-r--r--svx/source/inc/svxrectctaccessiblecontext.hxx10
-rw-r--r--svx/source/mnuctrls/smarttagmenu.cxx2
-rw-r--r--svx/source/sdr/attribute/sdrformtextattribute.cxx22
-rw-r--r--svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx6
-rw-r--r--svx/source/sdr/attribute/sdrtextattribute.cxx36
-rw-r--r--svx/source/sdr/contact/viewobjectcontact.cxx4
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.hxx2
-rw-r--r--svx/source/sidebar/graphic/GraphicPropertyPanel.hxx2
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.hxx2
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.hxx2
-rw-r--r--svx/source/sidebar/shadow/ShadowPropertyPanel.hxx2
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingControl.hxx2
-rw-r--r--svx/source/stbctrls/pszctrl.cxx2
-rw-r--r--svx/source/svdraw/svddrgm1.hxx4
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdfmtf.hxx4
-rw-r--r--svx/source/svdraw/svdhdl.cxx2
-rw-r--r--svx/source/svdraw/svdmrkv.cxx2
-rw-r--r--svx/source/svdraw/svdopath.cxx4
-rw-r--r--svx/source/svdraw/svdpdf.cxx17
-rw-r--r--svx/source/svdraw/svdpdf.hxx9
-rw-r--r--svx/source/svdraw/svdsnpv.cxx6
-rw-r--r--svx/source/table/tablehandles.cxx4
-rw-r--r--svx/source/table/tablehandles.hxx6
-rw-r--r--svx/source/table/tablertfimporter.cxx2
-rw-r--r--svx/source/table/tableundo.hxx8
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx4
-rw-r--r--svx/source/tbxctrls/SvxPresetListBox.cxx1
-rw-r--r--svx/source/tbxctrls/bulletsnumbering.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.hxx10
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx2
-rw-r--r--svx/source/tbxctrls/layctrl.cxx47
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx2
-rw-r--r--svx/source/tbxctrls/linectrl.cxx8
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx12
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx2
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx2
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx6
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx2
-rw-r--r--svx/source/unodraw/UnoNameItemTable.hxx2
-rw-r--r--svx/source/unodraw/UnoNamespaceMap.cxx4
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx2
-rw-r--r--svx/source/unodraw/unoshap2.cxx8
-rw-r--r--svx/source/xml/xmlgrhlp.cxx2
-rw-r--r--svx/source/xml/xmlxtimp.cxx4
-rw-r--r--svx/source/xoutdev/xtable.cxx2
80 files changed, 254 insertions, 273 deletions
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index ffad961ec939..4f2ea66ce46f 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -58,7 +58,7 @@ namespace
{
const char* pResIdName;
const char* pResIdDescr;
- RectPoint ePoint;
+ RectPoint const ePoint;
};
}
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index 54aef0e0c845..de079b4012c1 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -182,7 +182,6 @@ EnhancedCustomShape3d::Transformation2D::Transformation2D(
, eProjectionMode( drawing::ProjectionMode_PARALLEL )
, fSkewAngle(0.0)
, fSkew(0.0)
- , fZScreen(0.0)
, fOriginX(0.0)
, fOriginY(0.0)
, pMap( pM )
@@ -238,7 +237,7 @@ Point EnhancedCustomShape3d::Transformation2D::Transform2D( const basegfx::B3DPo
{
double fX = rPoint3D.getX() - fOriginX;
double fY = rPoint3D.getY() - fOriginY;
- double f = ( fZScreen - fViewPoint.getZ() ) / ( rPoint3D.getZ() - fViewPoint.getZ() );
+ double f = ( - fViewPoint.getZ() ) / ( rPoint3D.getZ() - fViewPoint.getZ() );
aPoint2D.setX( static_cast<sal_Int32>(( fX - fViewPoint.getX() ) * f + fViewPoint.getX() + fOriginX ) );
aPoint2D.setY( static_cast<sal_Int32>(( fY - fViewPoint.getY() ) * f + fViewPoint.getY() + fOriginY ) );
}
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx
index ba7c8dd3a9cd..aaeebc8f9ed5 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.hxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx
@@ -34,7 +34,7 @@ class EnhancedCustomShape3d final
{
class Transformation2D
{
- Point aCenter;
+ Point const aCenter;
css::drawing::ProjectionMode eProjectionMode;
// parallel projection
@@ -42,7 +42,6 @@ class EnhancedCustomShape3d final
double fSkew; // in percent
// perspective projection
- double fZScreen;
basegfx::B3DPoint fViewPoint;
double fOriginX;
double fOriginY;
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index a1b0da90f426..728bf2cca437 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -94,7 +94,7 @@ namespace
class ConstantValueExpression : public ExpressionNode
{
- double maValue;
+ double const maValue;
public:
@@ -1099,7 +1099,7 @@ public:
}
private:
- ParserContextSharedPtr mpParserContext; // might get modified during parsing
+ ParserContextSharedPtr const mpParserContext; // might get modified during parsing
};
const ParserContextSharedPtr& getParserContext()
diff --git a/svx/source/customshapes/EnhancedCustomShapeHandle.hxx b/svx/source/customshapes/EnhancedCustomShapeHandle.hxx
index 65bebb15ff5e..0d7718b8b748 100644
--- a/svx/source/customshapes/EnhancedCustomShapeHandle.hxx
+++ b/svx/source/customshapes/EnhancedCustomShapeHandle.hxx
@@ -35,7 +35,7 @@ class EnhancedCustomShapeHandle : public cppu::WeakImplHelper
css::lang::XInitialization
>
{
- sal_uInt32 mnIndex;
+ sal_uInt32 const mnIndex;
css::uno::Reference< css::drawing::XShape > mxCustomShape;
public:
diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
index fa71af5acfb6..197acb8db4ce 100644
--- a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
@@ -34,7 +34,7 @@ static ::osl::Mutex& getHashMapMutex()
struct NameTypeTable
{
const char* pS;
- MSO_SPT pE;
+ MSO_SPT const pE;
};
static const NameTypeTable pNameTypeTableArray[] =
{
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx
index 4a1af71a7dca..e8fb13f9ae27 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -184,8 +184,8 @@ struct ArrayImpl
std::vector<long> maHeights;
mutable std::vector<long> maXCoords;
mutable std::vector<long> maYCoords;
- size_t mnWidth;
- size_t mnHeight;
+ size_t const mnWidth;
+ size_t const mnHeight;
size_t mnFirstClipCol;
size_t mnFirstClipRow;
size_t mnLastClipCol;
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 1d3c43ccc13a..c94056e3f0dd 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -784,7 +784,7 @@ public:
}
private:
SvxSearchDialog& mrDialog;
- bool mbValue;
+ bool const mbValue;
};
}
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index f2ed23425d8a..af433f2348e0 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -213,6 +213,8 @@ void SvxRuler_Impl::SetPercSize(sal_uInt16 nSize)
// expects: something like SwTabCols
// Ruler: SetBorders
+static constexpr long glMinFrame = 5; // minimal frame width in pixels
+
SvxRuler::SvxRuler(
vcl::Window* pParent, // StarView Parent
vcl::Window* pWin, // Output window: is used for conversion
@@ -227,7 +229,6 @@ SvxRuler::SvxRuler(
bAppSetNullOffset(false), // Is the 0-offset of the ruler set by the application?
lLogicNullOffset(0),
lAppNullOffset(LONG_MAX),
- lMinFrame(5),
lInitialDragPos(0),
nFlags(flags),
nDragType(SvxRulerDragFlags::NONE),
@@ -1766,13 +1767,13 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin))
if(nDragType & SvxRulerDragFlags::OBJECT_SIZE_LINEAR)
{
- long nRight = GetMargin2() - lMinFrame; // Right limiters
+ long nRight = GetMargin2() - glMinFrame; // Right limiters
for(int i = mpBorders.size() - 2; i >= nIndex; --i)
{
long l = mpBorders[i].nPos;
mpBorders[i].nPos += lDiff;
mpBorders[i].nPos = std::min(mpBorders[i].nPos, nRight - mpBorders[i].nWidth);
- nRight = mpBorders[i].nPos - lMinFrame;
+ nRight = mpBorders[i].nPos - glMinFrame;
// RR update the column
if(i == GetActRightColumn())
{
@@ -2588,13 +2589,13 @@ void SvxRuler::CalcMinMax()
{
nMaxRight = lNullPix - GetRightIndent() +
std::max(GetFirstLineIndent(), GetLeftIndent()) -
- lMinFrame;
+ glMinFrame;
}
else
{
nMaxRight = lNullPix + GetRightIndent() -
std::max(GetFirstLineIndent(), GetLeftIndent()) -
- lMinFrame;
+ glMinFrame;
}
}
else if(mxRulerImpl->bIsTableRows)
@@ -2606,9 +2607,9 @@ void SvxRuler::CalcMinMax()
nMaxLeft = mpBorders[0].nMinPos + lNullPix;
if(nDragType & SvxRulerDragFlags::OBJECT_SIZE_PROPORTIONAL)
nMaxRight = GetRightIndent() + lNullPix -
- (mxColumnItem->Count() - 1 ) * lMinFrame;
+ (mxColumnItem->Count() - 1 ) * glMinFrame;
else
- nMaxRight = mpBorders[0].nPos - lMinFrame + lNullPix;
+ nMaxRight = mpBorders[0].nPos - glMinFrame + lNullPix;
}
else
nMaxLeft = nMaxRight = lNullPix;
@@ -2629,7 +2630,7 @@ void SvxRuler::CalcMinMax()
}
else
{
- nMaxRight = lNullPix - lMinFrame;
+ nMaxRight = lNullPix - glMinFrame;
if (mxColumnItem->IsFirstAct())
{
if(bRTL)
@@ -2679,13 +2680,13 @@ void SvxRuler::CalcMinMax()
{
nMaxLeft = GetMargin2() + GetRightIndent() -
std::max(GetFirstLineIndent(),GetLeftIndent()) - GetMargin1()+
- lMinFrame + lNullPix;
+ glMinFrame + lNullPix;
}
else
{
nMaxLeft = GetMargin2() - GetRightIndent() +
std::max(GetFirstLineIndent(),GetLeftIndent()) - GetMargin1()+
- lMinFrame + lNullPix;
+ glMinFrame + lNullPix;
}
}
else if(mxRulerImpl->bIsTableRows)
@@ -2700,14 +2701,14 @@ void SvxRuler::CalcMinMax()
{
if(nDragType & SvxRulerDragFlags::OBJECT_SIZE_PROPORTIONAL)
{
- nMaxLeft = (mxColumnItem->Count()) * lMinFrame + lNullPix;
+ nMaxLeft = (mxColumnItem->Count()) * glMinFrame + lNullPix;
}
else
{
if(mxColumnItem->Count() > 1)
- nMaxLeft = mpBorders[mxColumnItem->Count() - 2].nPos + lMinFrame + lNullPix;
+ nMaxLeft = mpBorders[mxColumnItem->Count() - 2].nPos + glMinFrame + lNullPix;
else
- nMaxLeft = lMinFrame + lNullPix;
+ nMaxLeft = glMinFrame + lNullPix;
}
if(mxColumnItem->Count() > 1)
nMaxRight = mpBorders[mxColumnItem->Count() - 2].nMaxPos + lNullPix;
@@ -2717,18 +2718,18 @@ void SvxRuler::CalcMinMax()
}
else
{
- nMaxLeft = lMinFrame + lNullPix;
+ nMaxLeft = glMinFrame + lNullPix;
if(IsActLastColumn() || mxColumnItem->Count() < 2 ) //If last active column
{
if(bRTL)
{
- nMaxLeft = lMinFrame + lNullPix + GetMargin2() +
+ nMaxLeft = glMinFrame + lNullPix + GetMargin2() +
GetRightIndent() - std::max(GetFirstLineIndent(),
GetLeftIndent());
}
else
{
- nMaxLeft = lMinFrame + lNullPix + GetMargin2() -
+ nMaxLeft = glMinFrame + lNullPix + GetMargin2() -
GetRightIndent() + std::max(GetFirstLineIndent(),
GetLeftIndent());
}
@@ -2736,7 +2737,7 @@ void SvxRuler::CalcMinMax()
if( mxColumnItem->Count() >= 2 )
{
long nNewMaxLeft =
- lMinFrame + lNullPix +
+ glMinFrame + lNullPix +
mpBorders[mxColumnItem->Count() - 2].nPos +
mpBorders[mxColumnItem->Count() - 2].nWidth;
nMaxLeft = std::max(nMaxLeft, nNewMaxLeft);
@@ -2777,7 +2778,7 @@ void SvxRuler::CalcMinMax()
nMaxLeft -= mpBorders[nIdx-1].nPos +
mpBorders[nIdx-1].nWidth;
}
- nMaxLeft += lMinFrame;
+ nMaxLeft += glMinFrame;
nMaxLeft += nDragOffset;
break;
}
@@ -2817,7 +2818,7 @@ void SvxRuler::CalcMinMax()
else
{
if(SvxRulerDragFlags::OBJECT_SIZE_PROPORTIONAL & nDragType && !bHorz && mxRulerImpl->bIsTableRows)
- nMaxLeft = (nIdx + 1) * lMinFrame + lNullPix;
+ nMaxLeft = (nIdx + 1) * glMinFrame + lNullPix;
else
nMaxLeft = mpBorders[nIdx].nMinPos + lNullPix;
if((SvxRulerDragFlags::OBJECT_SIZE_PROPORTIONAL & nDragType) ||
@@ -2827,7 +2828,7 @@ void SvxRuler::CalcMinMax()
{
if(bHorz)
nMaxRight = GetRightIndent() + lNullPix -
- (mxColumnItem->Count() - nIdx - 1) * lMinFrame;
+ (mxColumnItem->Count() - nIdx - 1) * glMinFrame;
else
nMaxRight = mpBorders[nIdx].nMaxPos + lNullPix;
}
@@ -2837,8 +2838,8 @@ void SvxRuler::CalcMinMax()
else
nMaxRight = mpBorders[nIdx].nMaxPos + lNullPix;
}
- nMaxLeft += lMinFrame;
- nMaxRight -= lMinFrame;
+ nMaxLeft += glMinFrame;
+ nMaxRight -= glMinFrame;
}
else
@@ -2870,7 +2871,7 @@ void SvxRuler::CalcMinMax()
mpBorders[nActLeftCol].nWidth;
}
}
- nMaxLeft += lMinFrame;
+ nMaxLeft += glMinFrame;
nMaxLeft += nDragOffset;
// nMaxRight
@@ -2883,7 +2884,7 @@ void SvxRuler::CalcMinMax()
else if(SvxRulerDragFlags::OBJECT_SIZE_LINEAR & nDragType)
{
nMaxRight = lNullPix + GetMargin2() - GetMargin1() +
- (mpBorders.size() - nIdx - 1) * lMinFrame;
+ (mpBorders.size() - nIdx - 1) * glMinFrame;
}
else
{
@@ -2938,7 +2939,7 @@ void SvxRuler::CalcMinMax()
mpBorders[nIdx].nWidth;
}
}
- nMaxRight -= lMinFrame;
+ nMaxRight -= glMinFrame;
nMaxRight -= mpBorders[nIdx].nWidth;
}
}
@@ -2975,7 +2976,7 @@ void SvxRuler::CalcMinMax()
mpBorders[nIdx].nWidth;
}
}
- nMaxRight -= lMinFrame;
+ nMaxRight -= glMinFrame;
nMaxRight -= mpBorders[nIdx].nWidth;
break;
}
@@ -3016,7 +3017,7 @@ void SvxRuler::CalcMinMax()
if(mxColumnItem.get() && !mxColumnItem->IsFirstAct())
nMaxLeft += mpBorders[mxColumnItem->GetActColumn()-1].nPos +
mpBorders[mxColumnItem->GetActColumn()-1].nWidth;
- nMaxRight = lNullPix + GetRightIndent() - lMinFrame;
+ nMaxRight = lNullPix + GetRightIndent() - glMinFrame;
// Dragging along
if((INDENT_FIRST_LINE - INDENT_GAP) != nIdx &&
@@ -3035,7 +3036,7 @@ void SvxRuler::CalcMinMax()
if(bRTL)
{
nMaxLeft = lNullPix;
- nMaxRight = lNullPix + std::min(GetFirstLineIndent(), GetLeftIndent()) - lMinFrame;
+ nMaxRight = lNullPix + std::min(GetFirstLineIndent(), GetLeftIndent()) - glMinFrame;
if(mxColumnItem.get())
{
sal_uInt16 nRightCol=GetActRightColumn( true );
@@ -3048,7 +3049,7 @@ void SvxRuler::CalcMinMax()
{
nMaxLeft += GetMargin1();
}
- nMaxLeft += lMinFrame;
+ nMaxLeft += glMinFrame;
}
else
{
@@ -3065,7 +3066,7 @@ void SvxRuler::CalcMinMax()
}
else
nMaxRight += GetMargin2();
- nMaxLeft += lMinFrame;
+ nMaxLeft += glMinFrame;
}
}
break;
@@ -3574,7 +3575,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const
}
}
- _nMaxRight -= static_cast<long>(lFences + lMinFrame / static_cast<float>(lMinSpace) * lColumns);
+ _nMaxRight -= static_cast<long>(lFences + glMinFrame / static_cast<float>(lMinSpace) * lColumns);
return _nMaxRight;
}
else
@@ -3588,14 +3589,14 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const
nVisCols++;
i = GetActRightColumn(false, i);
}
- return GetMargin2() - GetMargin1() - (nVisCols + 1) * lMinFrame;
+ return GetMargin2() - GetMargin1() - (nVisCols + 1) * glMinFrame;
}
else
{
long lWidth = 0;
for(sal_uInt16 i = nCol; i < mpBorders.size() - 1; i++)
{
- lWidth += lMinFrame + mpBorders[i].nWidth;
+ lWidth += glMinFrame + mpBorders[i].nWidth;
}
return GetMargin2() - GetMargin1() - lWidth;
}
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index d82820a7d36e..06dfb8496c3c 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -130,7 +130,7 @@ class GridFieldValueListener : protected ::comphelper::OPropertyChangeListener
osl::Mutex m_aMutex;
DbGridControl& m_rParent;
rtl::Reference<::comphelper::OPropertyChangeMultiplexer> m_pRealListener;
- sal_uInt16 m_nId;
+ sal_uInt16 const m_nId;
sal_Int16 m_nSuspended;
bool m_bDisposed : 1;
diff --git a/svx/source/form/dataaccessdescriptor.cxx b/svx/source/form/dataaccessdescriptor.cxx
index 4ca6d80ce6c1..dcc0a3175a7c 100644
--- a/svx/source/form/dataaccessdescriptor.cxx
+++ b/svx/source/form/dataaccessdescriptor.cxx
@@ -35,7 +35,7 @@ namespace svx
struct PropertyMapEntry
{
OUString maName;
- DataAccessDescriptorProperty mnHandle;
+ DataAccessDescriptorProperty const mnHandle;
};
class ODADescriptorImpl
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index b47f62ce7a54..a5d3d79fba5c 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -80,6 +80,14 @@ using namespace ::svx;
namespace svxform
{
+#if !HAVE_CPP_INLINE_VARIABLES
+constexpr OUStringLiteral ReplaceString::m_sDoc_API;
+constexpr OUStringLiteral ReplaceString::m_sInstance_API;
+constexpr OUStringLiteral ReplaceString::m_sNone_API;
+constexpr OUStringLiteral MethodString::m_sPost_API;
+constexpr OUStringLiteral MethodString::m_sPut_API;
+constexpr OUStringLiteral MethodString::m_sGet_API;
+#endif
// properties of instance
#define PN_INSTANCE_MODEL "Instance"
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index a98aea59100a..e4ab2f039c78 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -179,7 +179,7 @@ Image FmFilterItem::GetImage() const
class FmFilterHint : public SfxHint
{
- FmFilterData* m_pData;
+ FmFilterData* const m_pData;
public:
explicit FmFilterHint(FmFilterData* pData):m_pData(pData){}
@@ -188,7 +188,7 @@ public:
class FmFilterInsertedHint : public FmFilterHint
{
- size_t m_nPos; // Position relative to the parent of the data
+ size_t const m_nPos; // Position relative to the parent of the data
public:
FmFilterInsertedHint(FmFilterData* pData, size_t nRelPos)
diff --git a/svx/source/form/fmdocumentclassification.cxx b/svx/source/form/fmdocumentclassification.cxx
index 6a6ea00de881..6bcb8a0b1bfc 100644
--- a/svx/source/form/fmdocumentclassification.cxx
+++ b/svx/source/form/fmdocumentclassification.cxx
@@ -80,7 +80,7 @@ namespace svxform
struct ModuleInfo
{
const sal_Char* pAsciiModuleOrServiceName;
- DocumentType eType;
+ DocumentType const eType;
};
diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx
index f48f2e537d62..94fc3269b291 100644
--- a/svx/source/form/fmsrccfg.cxx
+++ b/svx/source/form/fmsrccfg.cxx
@@ -77,7 +77,7 @@ namespace svxform
struct Ascii2Int16
{
const sal_Char* pAscii;
- sal_Int16 nValue;
+ sal_Int16 const nValue;
};
static const Ascii2Int16* lcl_getSearchForTypeValueMap()
diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx
index 43c14e8faf9d..1b2d703f96cd 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -67,9 +67,9 @@ namespace svx
{
struct FeatureDescription
{
- OUString sURL; // the URL
- sal_Int32 nSlotId; // the SFX-compatible slot ID
- sal_Int16 nFormFeature; // the css.form.runtime.FormFeature ID
+ OUString const sURL; // the URL
+ sal_Int32 const nSlotId; // the SFX-compatible slot ID
+ sal_Int16 const nFormFeature; // the css.form.runtime.FormFeature ID
};
typedef ::std::vector< FeatureDescription > FeatureDescriptions;
@@ -130,7 +130,7 @@ namespace svx
struct MatchFeatureDescriptionBySlotId
{
- sal_Int32 m_nSlotId;
+ sal_Int32 const m_nSlotId;
explicit MatchFeatureDescriptionBySlotId( sal_Int32 _nSlotId ) :m_nSlotId( _nSlotId ) { }
bool operator()( const FeatureDescription& _compare )
@@ -142,7 +142,7 @@ namespace svx
struct MatchFeatureDescriptionByFormFeature
{
- sal_Int32 m_nFormFeature;
+ sal_Int32 const m_nFormFeature;
explicit MatchFeatureDescriptionByFormFeature( sal_Int32 _nFormFeature ) :m_nFormFeature( _nFormFeature ) { }
bool operator()( const FeatureDescription& _compare )
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 2962f02d2c87..b28120fe1f55 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -76,7 +76,7 @@ namespace {
struct ColumnInfo
{
- OUString sColumnName;
+ OUString const sColumnName;
explicit ColumnInfo(const OUString& i_sColumnName)
: sColumnName(i_sColumnName)
{
diff --git a/svx/source/gallery2/GallerySplitter.hxx b/svx/source/gallery2/GallerySplitter.hxx
index 8834fbd3200a..8c6e05f15ab7 100644
--- a/svx/source/gallery2/GallerySplitter.hxx
+++ b/svx/source/gallery2/GallerySplitter.hxx
@@ -35,7 +35,7 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
private:
- ::std::function<void ()> maDataChangeFunctor;
+ ::std::function<void ()> const maDataChangeFunctor;
};
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index 24f6ada7aade..22b35ef6633d 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -85,8 +85,8 @@ private:
Image aImgDefault;
Image aImgReadOnly;
- ::std::function<sal_Bool (const KeyEvent&,Window*)> maKeyInputHandler;
- ::std::function<void ()> maThemeSlectionHandler;
+ ::std::function<sal_Bool (const KeyEvent&,Window*)> const maKeyInputHandler;
+ ::std::function<void ()> const maThemeSlectionHandler;
void ImplAdjustControls();
sal_uIntPtr ImplInsertThemeEntry( const GalleryThemeEntry* pEntry );
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 342d041d7643..3f045541d924 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -110,8 +110,8 @@ class GalleryThemePopup : public ::cppu::WeakImplHelper< css::frame::XStatusList
{
private:
const GalleryTheme* mpTheme;
- sal_uInt32 mnObjectPos;
- bool mbPreview;
+ sal_uInt32 const mnObjectPos;
+ bool const mbPreview;
VclBuilder maBuilder;
VclPtr<PopupMenu> mpPopupMenu;
VclPtr<PopupMenu> mpBackgroundPopup;
diff --git a/svx/source/inc/AccessibleFrameSelector.hxx b/svx/source/inc/AccessibleFrameSelector.hxx
index 177780f6afc4..8c1ce7e35c83 100644
--- a/svx/source/inc/AccessibleFrameSelector.hxx
+++ b/svx/source/inc/AccessibleFrameSelector.hxx
@@ -132,7 +132,7 @@ private:
FrameSelector* mpFrameSel;
- FrameBorderType meBorder;
+ FrameBorderType const meBorder;
};
diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx
index d594f390495e..5c0e5fd18735 100644
--- a/svx/source/inc/charmapacc.hxx
+++ b/svx/source/inc/charmapacc.hxx
@@ -44,7 +44,7 @@ namespace svx
struct SvxShowCharSetItem
{
SvxShowCharSet& mrParent;
- sal_uInt16 mnId;
+ sal_uInt16 const mnId;
OUString maText;
tools::Rectangle maRect;
rtl::Reference<SvxShowCharSetItemAcc> m_xItem;
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 786d4f767d81..c0f1ad4a2f69 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -129,17 +129,14 @@ namespace svxform
OUString m_sInstance_UI;
OUString m_sNone_UI;
- OUString m_sDoc_API;
- OUString m_sInstance_API;
- OUString m_sNone_API;
+ static constexpr OUStringLiteral const m_sDoc_API = "all";
+ static constexpr OUStringLiteral const m_sInstance_API = "instance";
+ static constexpr OUStringLiteral const m_sNone_API = "none";
ReplaceString( const ReplaceString& ) = delete;
public:
- ReplaceString() :
- m_sDoc_API( "all" ),
- m_sInstance_API( "instance" ),
- m_sNone_API( "none" )
+ ReplaceString()
{
m_sDoc_UI = SvxResId(RID_STR_REPLACE_DOC);
m_sInstance_UI = SvxResId(RID_STR_REPLACE_INST);
@@ -160,7 +157,7 @@ namespace svxform
/** convert submission replace string from UI to API.
Use 'none' as default. */
- OUString const & toAPI( const OUString& rStr ) const
+ OUString toAPI( const OUString& rStr ) const
{
if( rStr == m_sDoc_UI )
return m_sDoc_API;
@@ -177,18 +174,15 @@ namespace svxform
OUString m_sPut_UI;
OUString m_sGet_UI;
- OUString m_sPost_API;
- OUString m_sPut_API;
- OUString m_sGet_API;
+ static constexpr OUStringLiteral m_sPost_API = "post";
+ static constexpr OUStringLiteral m_sPut_API = "put";
+ static constexpr OUStringLiteral m_sGet_API = "get";
MethodString( const MethodString& ) = delete;
public:
- MethodString() :
- m_sPost_API( "post" ),
- m_sPut_API( "put" ),
- m_sGet_API( "get" )
+ MethodString()
{
m_sPost_UI = SvxResId(RID_STR_METHOD_POST);
m_sPut_UI = SvxResId(RID_STR_METHOD_PUT);
@@ -207,7 +201,7 @@ namespace svxform
}
/** convert from UI to API; put is default */
- OUString const & toAPI( const OUString& rStr ) const
+ OUString toAPI( const OUString& rStr ) const
{
if( rStr == m_sGet_UI )
return m_sGet_API;
@@ -221,8 +215,8 @@ namespace svxform
class XFormsPage : public TabPage
{
private:
- MethodString m_aMethodString;
- ReplaceString m_aReplaceString;
+ MethodString const m_aMethodString;
+ ReplaceString const m_aReplaceString;
VclPtr<ToolBox> m_pToolBox;
VclPtr<DataTreeListBox> m_pItemList;
@@ -237,7 +231,7 @@ namespace svxform
VclPtr<DataNavigatorWindow> m_pNaviWin;
bool m_bHasModel;
- DataGroupType m_eGroup;
+ DataGroupType const m_eGroup;
// these strings are not valid on the Submission and Binding Page
// mb: furthermore these are properties of an instance, thus
// it would be much better to get/set them through the UIHelper
@@ -427,10 +421,10 @@ namespace svxform
ItemNode* m_pItemNode;
DataItemType m_eItemType;
- OUString m_sFL_Element;
- OUString m_sFL_Attribute;
- OUString m_sFL_Binding;
- OUString m_sFT_BindingExp;
+ OUString const m_sFL_Element;
+ OUString const m_sFL_Attribute;
+ OUString const m_sFL_Binding;
+ OUString const m_sFT_BindingExp;
DECL_LINK( CheckHdl, Button*, void );
DECL_LINK( ConditionHdl, Button*, void );
@@ -460,7 +454,7 @@ namespace svxform
VclPtr<OKButton> m_pOKBtn;
Idle m_aResultIdle;
- OUString m_sPropertyName;
+ OUString const m_sPropertyName;
css::uno::Reference< css::xforms::XFormsUIHelper1 >
m_xUIHelper;
@@ -543,8 +537,8 @@ namespace svxform
class AddSubmissionDialog : public ModalDialog
{
private:
- MethodString m_aMethodString;
- ReplaceString m_aReplaceString;
+ MethodString const m_aMethodString;
+ ReplaceString const m_aReplaceString;
VclPtr<Edit> m_pNameED;
VclPtr<Edit> m_pActionED;
@@ -556,7 +550,7 @@ namespace svxform
VclPtr<OKButton> m_pOKBtn;
- ItemNode* m_pItemNode;
+ ItemNode* const m_pItemNode;
css::uno::Reference< css::xforms::XFormsUIHelper1 >
m_xUIHelper;
diff --git a/svx/source/inc/delayedevent.hxx b/svx/source/inc/delayedevent.hxx
index 4f7925c94b1d..4cda56f98947 100644
--- a/svx/source/inc/delayedevent.hxx
+++ b/svx/source/inc/delayedevent.hxx
@@ -61,7 +61,7 @@ namespace svxform
void CancelPendingCall();
private:
- Link<void*,void> m_aHandler;
+ Link<void*,void> const m_aHandler;
ImplSVEvent * m_nEventId;
private:
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 0d9b81b0a208..c0fc7eda5cb6 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -213,7 +213,7 @@ class RecoveryCore : public ::cppu::WeakImplHelper< css::frame::XStatusListener
on the core dispatch implementation, we must know,
which URL we have to use for deregistration!
*/
- bool m_bListenForSaving;
+ bool const m_bListenForSaving;
// native interface
@@ -485,9 +485,9 @@ class RecoveryDialog : public Dialog
VclPtr<RecovDocList> m_pFileListLB;
VclPtr<PushButton> m_pNextBtn;
VclPtr<PushButton> m_pCancelBtn;
- OUString m_aTitleRecoveryInProgress;
- OUString m_aRecoveryOnlyFinish;
- OUString m_aRecoveryOnlyFinishDescr;
+ OUString const m_aTitleRecoveryInProgress;
+ OUString const m_aRecoveryOnlyFinish;
+ OUString const m_aRecoveryOnlyFinishDescr;
RecoveryCore* m_pCore;
css::uno::Reference< css::task::XStatusIndicator > m_xProgress;
@@ -548,7 +548,7 @@ class BrokenRecoveryDialog : public ModalDialog
OUString m_sSavePath;
RecoveryCore* m_pCore;
- bool m_bBeforeRecovery;
+ bool const m_bBeforeRecovery;
bool m_bExecutionNeeded;
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 81693c2aeac9..1996960bc70e 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -55,7 +55,7 @@ class FmFilterAdapter;
class FmFilterData
{
- FmParentData* m_pParent;
+ FmParentData* const m_pParent;
OUString m_aText;
public:
@@ -127,7 +127,7 @@ public:
class FmFilterItem : public FmFilterData
{
- OUString m_aFieldName;
+ OUString const m_aFieldName;
const sal_Int32 m_nComponentIndex;
public:
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 6ea2cfb97155..b79465ed17a3 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -58,8 +58,8 @@ class SdrMarkList;
class FmEntryData;
class FmNavInsertedHint : public SfxHint
{
- FmEntryData* pEntryData;
- sal_uInt32 nPos;
+ FmEntryData* const pEntryData;
+ sal_uInt32 const nPos;
public:
FmNavInsertedHint( FmEntryData* pInsertedEntryData, sal_uInt32 nRelPos );
@@ -72,7 +72,7 @@ public:
class FmNavModelReplacedHint : public SfxHint
{
- FmEntryData* pEntryData; // the data of the entry that has got a new model
+ FmEntryData* const pEntryData; // the data of the entry that has got a new model
public:
FmNavModelReplacedHint( FmEntryData* pAffectedEntryData );
@@ -84,7 +84,7 @@ public:
class FmNavRemovedHint : public SfxHint
{
- FmEntryData* pEntryData;
+ FmEntryData* const pEntryData;
public:
FmNavRemovedHint( FmEntryData* pInsertedEntryData );
@@ -96,8 +96,8 @@ public:
class FmNavNameChangedHint : public SfxHint
{
- FmEntryData* pEntryData;
- OUString aNewName;
+ FmEntryData* const pEntryData;
+ OUString const aNewName;
public:
FmNavNameChangedHint( FmEntryData* pData, const OUString& rNewName );
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 5c02d45e8992..beedf5973d3a 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -168,8 +168,8 @@ class SVX_DLLPUBLIC FmXFormShell final : public FmXFormShell_BASE
FmFormArray m_aSearchForms;
struct SAL_DLLPRIVATE InvalidSlotInfo {
- sal_uInt16 id;
- sal_uInt8 flags;
+ sal_uInt16 const id;
+ sal_uInt8 const flags;
InvalidSlotInfo(sal_uInt16 slotId, sal_uInt8 flgs) : id(slotId), flags(flgs) {};
};
std::vector<InvalidSlotInfo> m_arrInvalidSlots;
diff --git a/svx/source/inc/fmtextcontroldialogs.hxx b/svx/source/inc/fmtextcontroldialogs.hxx
index d08a5d0cde13..8fa79400404d 100644
--- a/svx/source/inc/fmtextcontroldialogs.hxx
+++ b/svx/source/inc/fmtextcontroldialogs.hxx
@@ -30,7 +30,7 @@ namespace svx
class TextControlCharAttribDialog : public SfxTabDialogController
{
private:
- SvxFontListItem m_aFontList;
+ SvxFontListItem const m_aFontList;
public:
TextControlCharAttribDialog(weld::Window* pParent, const SfxItemSet& rCoreSet, const SvxFontListItem& rFontList);
diff --git a/svx/source/inc/fmtextcontrolfeature.hxx b/svx/source/inc/fmtextcontrolfeature.hxx
index 6511ff981a98..651307bfe372 100644
--- a/svx/source/inc/fmtextcontrolfeature.hxx
+++ b/svx/source/inc/fmtextcontrolfeature.hxx
@@ -40,9 +40,9 @@ namespace svx
private:
css::uno::Reference< css::frame::XDispatch >
m_xDispatcher;
- css::util::URL m_aFeatureURL;
+ css::util::URL const m_aFeatureURL;
css::uno::Any m_aFeatureState;
- SfxSlotId m_nSlotId;
+ SfxSlotId const m_nSlotId;
FmTextControlShell* m_pInvalidator;
bool m_bFeatureEnabled;
diff --git a/svx/source/inc/fmundo.hxx b/svx/source/inc/fmundo.hxx
index 8dd367b5a46e..3d950ff473fc 100644
--- a/svx/source/inc/fmundo.hxx
+++ b/svx/source/inc/fmundo.hxx
@@ -47,9 +47,9 @@ class SdrObject;
class FmUndoPropertyAction: public SdrUndoAction
{
css::uno::Reference< css::beans::XPropertySet> xObj;
- OUString aPropertyName;
- css::uno::Any aNewValue;
- css::uno::Any aOldValue;
+ OUString const aPropertyName;
+ css::uno::Any const aNewValue;
+ css::uno::Any const aOldValue;
public:
FmUndoPropertyAction(FmFormModel& rMod, const css::beans::PropertyChangeEvent& evt);
@@ -95,7 +95,7 @@ private:
sal_Int32 m_nIndex; // index of the object within it's container
css::uno::Sequence< css::script::ScriptEventDescriptor >
m_aEvents; // events of the object
- Action m_eAction;
+ Action const m_eAction;
};
class FmUndoModelReplaceAction : public SdrUndoAction
diff --git a/svx/source/inc/formcontrolling.hxx b/svx/source/inc/formcontrolling.hxx
index f2379758c0af..a24a04321c7d 100644
--- a/svx/source/inc/formcontrolling.hxx
+++ b/svx/source/inc/formcontrolling.hxx
@@ -71,7 +71,7 @@ namespace svx
*/
class ControllerFeatures final
{
- IControllerFeatureInvalidation* m_pInvalidationCallback; // necessary as long as m_pImpl is not yet constructed
+ IControllerFeatureInvalidation* const m_pInvalidationCallback; // necessary as long as m_pImpl is not yet constructed
rtl::Reference<FormControllerHelper> m_pImpl;
public:
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index f5e5f420a5c7..d01c4e658f8a 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -83,7 +83,7 @@ private:
sal_Int32 m_nFormatKey;
sal_Int16 m_nFieldType;
sal_Int16 m_nTypeId;
- sal_uInt16 m_nId;
+ sal_uInt16 const m_nId;
sal_Int16 m_nFieldPos;
sal_Int16 m_nAlign; // specified with TXT_ALIGN_LEFT ....
bool m_bReadOnly : 1;
@@ -532,7 +532,7 @@ private:
class DbSpinField : public DbCellControl
{
private:
- sal_Int16 m_nStandardAlign;
+ sal_Int16 const m_nStandardAlign;
public:
diff --git a/svx/source/inc/svxpixelctlaccessiblecontext.hxx b/svx/source/inc/svxpixelctlaccessiblecontext.hxx
index 2ce8ca776d5d..40b48d90aa8c 100644
--- a/svx/source/inc/svxpixelctlaccessiblecontext.hxx
+++ b/svx/source/inc/svxpixelctlaccessiblecontext.hxx
@@ -107,9 +107,9 @@ private:
SvxPixelCtl& mrParentWindow;
rtl::Reference<SvxPixelCtlAccessible> mxParent;
bool m_bPixelColorOrBG;//Pixel Color Or BackGround Color
- tools::Rectangle maBoundingBox;
+ tools::Rectangle const maBoundingBox;
/// index of child in parent
- long mnIndexInParent;
+ long const mnIndexInParent;
};
class SvxPixelCtlAccessible final : public ::comphelper::OAccessibleSelectionHelper,
diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx
index f40fc64c7762..36ce4e7f6d43 100644
--- a/svx/source/inc/svxrectctaccessiblecontext.hxx
+++ b/svx/source/inc/svxrectctaccessiblecontext.hxx
@@ -223,25 +223,25 @@ private:
be set from the outside. Furthermore, it changes according to the
draw page's display mode.
*/
- OUString msDescription;
+ OUString const msDescription;
/** Name of this object. It changes according the draw page's
display mode.
*/
- OUString msName;
+ OUString const msName;
/// Reference to the parent object.
css::uno::Reference< css::accessibility::XAccessible >
mxParent;
/// Bounding box
- tools::Rectangle maBoundingBox;
+ tools::Rectangle const maBoundingBox;
/// index of child in parent
- long mnIndexInParent;
+ long const mnIndexInParent;
/// Indicates, if object is checked
- bool mbIsChecked;
+ bool mbIsChecked;
};
diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx
index e4a9d171ce59..b104f110d38e 100644
--- a/svx/source/mnuctrls/smarttagmenu.cxx
+++ b/svx/source/mnuctrls/smarttagmenu.cxx
@@ -44,7 +44,7 @@ private:
{
css::uno::Reference< css::smarttags::XSmartTagAction > m_xAction;
css::uno::Reference< css::container::XStringKeyMap > m_xSmartTagProperties;
- sal_uInt32 m_nActionID;
+ sal_uInt32 const m_nActionID;
InvokeAction( css::uno::Reference< css::smarttags::XSmartTagAction > const & xAction,
css::uno::Reference< css::container::XStringKeyMap > const & xSmartTagProperties,
sal_uInt32 nActionID ) : m_xAction( xAction ), m_xSmartTagProperties( xSmartTagProperties ), m_nActionID( nActionID ) {}
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index bc0d690edca0..a82656723207 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -148,23 +148,23 @@ namespace drawinglayer
{
public:
// FormText (FontWork) Attributes
- sal_Int32 mnFormTextDistance; // distance from line in upright direction
- sal_Int32 mnFormTextStart; // shift from polygon start
- sal_Int32 mnFormTextShdwXVal; // shadow distance or 10th degrees
- sal_Int32 mnFormTextShdwYVal; // shadow distance or scaling
- sal_uInt16 mnFormTextShdwTransp; // shadow transparence
- XFormTextStyle meFormTextStyle; // on/off and char orientation
- XFormTextAdjust meFormTextAdjust; // adjustment (left/right/center) and scale
- XFormTextShadow meFormTextShadow; // shadow mode
- Color maFormTextShdwColor; // shadow color
+ sal_Int32 const mnFormTextDistance; // distance from line in upright direction
+ sal_Int32 const mnFormTextStart; // shift from polygon start
+ sal_Int32 const mnFormTextShdwXVal; // shadow distance or 10th degrees
+ sal_Int32 const mnFormTextShdwYVal; // shadow distance or scaling
+ sal_uInt16 const mnFormTextShdwTransp; // shadow transparence
+ XFormTextStyle const meFormTextStyle; // on/off and char orientation
+ XFormTextAdjust const meFormTextAdjust; // adjustment (left/right/center) and scale
+ XFormTextShadow const meFormTextShadow; // shadow mode
+ Color const maFormTextShdwColor; // shadow color
// outline attributes; used when getFormTextOutline() is true and (for
// shadow) when getFormTextShadow() != XFormTextShadow::NONE
SdrFormTextOutlineAttribute maOutline;
SdrFormTextOutlineAttribute maShadowOutline;
- bool mbFormTextMirror : 1; // change orientation
- bool mbFormTextOutline : 1; // show contour of objects
+ bool const mbFormTextMirror : 1; // change orientation
+ bool const mbFormTextOutline : 1; // show contour of objects
explicit ImpSdrFormTextAttribute(const SfxItemSet& rSet)
: mnFormTextDistance(rSet.Get(XATTR_FORMTXTDISTANCE).GetValue()),
diff --git a/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx b/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx
index 6e6211dce2f0..062a786dec10 100644
--- a/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx
@@ -32,9 +32,9 @@ namespace drawinglayer
{
public:
// one set of attributes for FormText (FontWork) outline visualisation
- LineAttribute maLineAttribute;
- StrokeAttribute maStrokeAttribute;
- sal_uInt8 mnTransparence;
+ LineAttribute const maLineAttribute;
+ StrokeAttribute const maStrokeAttribute;
+ sal_uInt8 const mnTransparence;
ImpSdrFormTextOutlineAttribute(
const LineAttribute& rLineAttribute,
diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx
index d7460cbda6d2..4222de542697 100644
--- a/svx/source/sdr/attribute/sdrtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrtextattribute.cxx
@@ -44,29 +44,29 @@ namespace drawinglayer
SdrFormTextAttribute maSdrFormTextAttribute;
// text distances
- sal_Int32 maTextLeftDistance;
- sal_Int32 maTextUpperDistance;
- sal_Int32 maTextRightDistance;
- sal_Int32 maTextLowerDistance;
+ sal_Int32 const maTextLeftDistance;
+ sal_Int32 const maTextUpperDistance;
+ sal_Int32 const maTextRightDistance;
+ sal_Int32 const maTextLowerDistance;
// #i101556# use versioning from text attributes to detect changes
sal_uInt32 maPropertiesVersion;
// text alignments
- SdrTextHorzAdjust maSdrTextHorzAdjust;
- SdrTextVertAdjust maSdrTextVertAdjust;
-
- bool mbContour : 1;
- bool mbFitToSize : 1;
- bool mbAutoFit : 1;
- bool mbHideContour : 1;
- bool mbBlink : 1;
- bool mbScroll : 1;
- bool mbInEditMode : 1;
- bool mbFixedCellHeight : 1;
- bool mbWrongSpell : 1;
-
- bool mbChainable : 1;
+ SdrTextHorzAdjust const maSdrTextHorzAdjust;
+ SdrTextVertAdjust const maSdrTextVertAdjust;
+
+ bool const mbContour : 1;
+ bool const mbFitToSize : 1;
+ bool const mbAutoFit : 1;
+ bool const mbHideContour : 1;
+ bool const mbBlink : 1;
+ bool const mbScroll : 1;
+ bool const mbInEditMode : 1;
+ bool const mbFixedCellHeight : 1;
+ bool const mbWrongSpell : 1;
+
+ bool const mbChainable : 1;
public:
diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx
index b35aa1a8e8c2..e300703bfd74 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -59,10 +59,10 @@ protected:
drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence;
// text animation allowed?
- bool mbTextAnimationAllowed : 1;
+ bool const mbTextAnimationAllowed : 1;
// graphic animation allowed?
- bool mbGraphicAnimationAllowed : 1;
+ bool const mbGraphicAnimationAllowed : 1;
// as tooling, the process() implementation takes over API handling and calls this
// virtual render method when the primitive implementation is BasePrimitive2D-based.
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index a01d03a3c733..b18fa593b382 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -88,7 +88,7 @@ private:
::sfx2::sidebar::ControllerItem maFillTransparenceController;
::sfx2::sidebar::ControllerItem maFillFloatTransparenceController;
- SfxBindings* mpBindings;
+ SfxBindings* const mpBindings;
};
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
index a83a0e007657..2031f389655f 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
@@ -83,7 +83,7 @@ private:
::sfx2::sidebar::ControllerItem maGammaControl;
::sfx2::sidebar::ControllerItem maModeControl;
- SfxBindings* mpBindings;
+ SfxBindings* const mpBindings;
DECL_LINK( ModifyBrightnessHdl, Edit&, void );
DECL_LINK( ModifyContrastHdl, Edit&, void );
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx
index 2827e6dcac67..b223f644fdbf 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -105,7 +105,7 @@ private:
sfx2::sidebar::ControllerItem maEdgeStyle;
sfx2::sidebar::ControllerItem maCapStyle;
- SfxBindings* mpBindings;
+ SfxBindings* const mpBindings;
vcl::EnumContext maContext;
};
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
index 915ec39f1d14..232f7c20bfa4 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
@@ -102,7 +102,7 @@ private:
::sfx2::sidebar::ControllerItem m_aMetricCtl;
vcl::EnumContext maContext;
- SfxBindings* mpBindings;
+ SfxBindings* const mpBindings;
css::uno::Reference<css::ui::XSidebar> mxSidebar;
DECL_LINK(ModifyIndentHdl_Impl, Edit&, void);
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
index 936e469a77e3..bd54b58831d3 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
@@ -77,7 +77,7 @@ private:
::sfx2::sidebar::ControllerItem maShadowXDistanceController;
::sfx2::sidebar::ControllerItem maShadowYDistanceController;
- SfxBindings* mpBindings;
+ SfxBindings* const mpBindings;
long nX,nY,nXY;
void InsertAngleValues();
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
index 1008441ada24..4e2287812f5e 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
@@ -50,7 +50,7 @@ private:
VclPtr<PushButton> maLoose;
VclPtr<PushButton> maLastCustom;
- sal_uInt16 mnId;
+ sal_uInt16 const mnId;
long mnCustomKern;
short mnLastCus;
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 1659a35c1f0e..018f353a6021 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -93,7 +93,7 @@ class FunctionPopup_Impl
{
VclBuilder m_aBuilder;
VclPtr<PopupMenu> m_xMenu;
- sal_uInt32 m_nSelected;
+ sal_uInt32 const m_nSelected;
static sal_uInt16 id_to_function(const OString& rIdent);
sal_uInt16 function_to_id(sal_uInt16 nFunc) const;
public:
diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx
index 94de57531ff0..7e7c2880351b 100644
--- a/svx/source/svdraw/svddrgm1.hxx
+++ b/svx/source/svdraw/svddrgm1.hxx
@@ -76,7 +76,7 @@ private:
bool bVertical; // contort vertically
bool bResize; // shear and resize
bool bUpSideDown; // mirror and shear/slant
- bool bSlant;
+ bool const bSlant;
public:
SdrDragShear(SdrDragView& rNewView,bool bSlant1);
@@ -121,7 +121,7 @@ private:
SdrHdlGradient* pIAOHandle;
// is this for gradient (or for transparency)?
- bool bIsGradient : 1;
+ bool const bIsGradient : 1;
public:
SdrDragGradient(SdrDragView& rNewView, bool bGrad = true);
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index bde1c7236b46..a10fe457c4a2 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -394,7 +394,7 @@ namespace
drawinglayer::primitive2d::Primitive2DContainer maLastTextPrimitives;
/// bitfield
- bool mbVisualizeSurroundingFrame : 1;
+ bool const mbVisualizeSurroundingFrame : 1;
// geometry creation for OverlayObject, can use local *Last* values
virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index a3bd9b16ef40..0f98e4c1927d 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -47,13 +47,13 @@ class ImpSdrGDIMetaFileImport final
{
::std::vector< SdrObject* > maTmpList;
ScopedVclPtr<VirtualDevice> mpVD;
- tools::Rectangle maScaleRect;
+ tools::Rectangle const maScaleRect;
size_t mnMapScalingOfs; // from here on, not edited with MapScaling
std::unique_ptr<SfxItemSet> mpLineAttr;
std::unique_ptr<SfxItemSet> mpFillAttr;
std::unique_ptr<SfxItemSet> mpTextAttr;
SdrModel* mpModel;
- SdrLayerID mnLayer;
+ SdrLayerID const mnLayer;
Color maOldLineColor;
sal_Int32 mnLineWidth;
basegfx::B2DLineJoin maLineJoin;
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 7cdf414996f2..69ecdbcf63d6 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -78,7 +78,7 @@
class SdrHdlBitmapSet
{
// the bitmap holding all information
- BitmapEx maMarkersBitmap;
+ BitmapEx const maMarkersBitmap;
// the cropped Bitmaps for reusage
::std::vector< BitmapEx > maRealMarkers;
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 16f21be65a76..affec3af91e0 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -70,7 +70,7 @@ class ImplMarkingOverlay
basegfx::B2DPoint maSecondPosition;
// A flag to remember if the action is for unmarking.
- bool mbUnmarking : 1;
+ bool const mbUnmarking : 1;
public:
ImplMarkingOverlay(const SdrPaintView& rView, const basegfx::B2DPoint& rStartPos, bool bUnmarking);
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 3bd275795bdb..ffd4c1ac84af 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -102,7 +102,7 @@ struct ImpSdrPathDragData : public SdrDragStatUserData
sal_uInt16 nNextNextPnt0;
bool bEliminate; // delete point? (is set by MovDrag)
- bool mbMultiPointDrag;
+ bool const mbMultiPointDrag;
const XPolyPolygon maOrig;
XPolyPolygon maMove;
std::vector<SdrHdl*> maHandles;
@@ -496,7 +496,7 @@ class ImpPathForDragAndCreate
{
SdrPathObj& mrSdrPathObject;
XPolyPolygon aPathPolygon;
- SdrObjKind meObjectKind;
+ SdrObjKind const meObjectKind;
std::unique_ptr<ImpSdrPathDragData>
mpSdrPathDragData;
bool mbCreating;
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 8f859672c336..1f55fb709d1f 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -125,7 +125,6 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools:
, mnLayer(nLay)
, maOldLineColor()
, mnLineWidth(0)
- , maLineJoin(basegfx::B2DLineJoin::NONE)
, maLineCap(css::drawing::LineCap_BUTT)
, maDash(css::drawing::DashStyle_RECT, 0, 0, 0, 0, 0)
, mbMov(false)
@@ -384,21 +383,7 @@ void ImpSdrPdfImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr)
mpLineAttr->Put(XLineStyleItem(drawing::LineStyle_NONE));
}
- switch (maLineJoin)
- {
- case basegfx::B2DLineJoin::NONE:
- mpLineAttr->Put(XLineJointItem(css::drawing::LineJoint_NONE));
- break;
- case basegfx::B2DLineJoin::Bevel:
- mpLineAttr->Put(XLineJointItem(css::drawing::LineJoint_BEVEL));
- break;
- case basegfx::B2DLineJoin::Miter:
- mpLineAttr->Put(XLineJointItem(css::drawing::LineJoint_MITER));
- break;
- case basegfx::B2DLineJoin::Round:
- mpLineAttr->Put(XLineJointItem(css::drawing::LineJoint_ROUND));
- break;
- }
+ mpLineAttr->Put(XLineJointItem(css::drawing::LineJoint_NONE));
// Add LineCap support
mpLineAttr->Put(XLineCapItem(maLineCap));
diff --git a/svx/source/svdraw/svdpdf.hxx b/svx/source/svdraw/svdpdf.hxx
index a17a739c4332..462b8f6451bb 100644
--- a/svx/source/svdraw/svdpdf.hxx
+++ b/svx/source/svdraw/svdpdf.hxx
@@ -160,19 +160,18 @@ class ImpSdrPdfImport final
::std::vector<SdrObject*> maTmpList;
ScopedVclPtr<VirtualDevice> mpVD;
- tools::Rectangle maScaleRect;
+ tools::Rectangle const maScaleRect;
const std::shared_ptr<css::uno::Sequence<sal_Int8>> mpPdfData;
size_t mnMapScalingOfs; // from here on, not edited with MapScaling
std::unique_ptr<SfxItemSet> mpLineAttr;
std::unique_ptr<SfxItemSet> mpFillAttr;
std::unique_ptr<SfxItemSet> mpTextAttr;
SdrModel* mpModel;
- SdrLayerID mnLayer;
+ SdrLayerID const mnLayer;
Color maOldLineColor;
sal_Int32 mnLineWidth;
- basegfx::B2DLineJoin maLineJoin;
- css::drawing::LineCap maLineCap;
- XDash maDash;
+ css::drawing::LineCap const maLineCap;
+ XDash const maDash;
bool mbMov;
bool mbSize;
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index 55664027168a..dd43290445c2 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -101,9 +101,9 @@ class ImplHelpLineOverlay
basegfx::B2DPoint maPosition;
// HelpLine specific stuff
- SdrPageView* mpPageView;
- sal_uInt16 mnHelpLineNumber;
- SdrHelpLineKind meHelpLineKind;
+ SdrPageView* const mpPageView;
+ sal_uInt16 const mnHelpLineNumber;
+ SdrHelpLineKind const meHelpLineKind;
public:
ImplHelpLineOverlay(const SdrPaintView& rView, const basegfx::B2DPoint& rStartPos,
diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx
index c3671dc0c92b..5e9e82ed64c6 100644
--- a/svx/source/table/tablehandles.cxx
+++ b/svx/source/table/tablehandles.cxx
@@ -44,8 +44,8 @@ namespace sdr { namespace table {
class OverlayTableEdge : public sdr::overlay::OverlayObject
{
protected:
- basegfx::B2DPolyPolygon maPolyPolygon;
- bool mbVisible;
+ basegfx::B2DPolyPolygon const maPolyPolygon;
+ bool const mbVisible;
// geometry creation for OverlayObject
virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
diff --git a/svx/source/table/tablehandles.hxx b/svx/source/table/tablehandles.hxx
index 3b34cfac640d..c09cc2253b29 100644
--- a/svx/source/table/tablehandles.hxx
+++ b/svx/source/table/tablehandles.hxx
@@ -61,7 +61,7 @@ protected:
virtual void CreateB2dIAObject() override;
private:
- bool mbHorizontal;
+ bool const mbHorizontal;
sal_Int32 mnMin, mnMax;
TableEdgeVector maEdges;
};
@@ -81,9 +81,9 @@ protected:
virtual void CreateB2dIAObject() override;
private:
- tools::Rectangle maRectangle;
+ tools::Rectangle const maRectangle;
- bool mbAnimate : 1;
+ bool const mbAnimate : 1;
};
} // end of namespace table
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index 62eb91b412d7..55c5fdfdc01d 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -63,7 +63,7 @@ typedef std::vector< std::shared_ptr< RTFCellDefault > > RTFCellDefaultVector;
struct RTFCellInfo
{
- SfxItemSet maItemSet;
+ SfxItemSet const maItemSet;
sal_Int32 mnStartPara;
sal_Int32 mnParaCount;
sal_Int32 mnCellX;
diff --git a/svx/source/table/tableundo.hxx b/svx/source/table/tableundo.hxx
index 60d661878a70..33231cdca451 100644
--- a/svx/source/table/tableundo.hxx
+++ b/svx/source/table/tableundo.hxx
@@ -99,7 +99,7 @@ public:
private:
TableModelRef mxTable;
- sal_Int32 mnIndex;
+ sal_Int32 const mnIndex;
RowVector maRows;
bool mbUndo;
};
@@ -116,7 +116,7 @@ public:
private:
TableModelRef mxTable;
- sal_Int32 mnIndex;
+ sal_Int32 const mnIndex;
RowVector maRows;
bool mbUndo;
};
@@ -133,7 +133,7 @@ public:
private:
TableModelRef mxTable;
- sal_Int32 mnIndex;
+ sal_Int32 const mnIndex;
ColumnVector maColumns;
CellVector maCells;
bool mbUndo;
@@ -151,7 +151,7 @@ public:
private:
TableModelRef mxTable;
- sal_Int32 mnIndex;
+ sal_Int32 const mnIndex;
ColumnVector maColumns;
CellVector maCells;
bool mbUndo;
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index 27100545cf02..05759f3e3364 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -56,8 +56,8 @@ namespace drawinglayer
class SdrCellPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- basegfx::B2DHomMatrix maTransform;
- attribute::SdrFillTextAttribute maSdrFTAttribute;
+ basegfx::B2DHomMatrix const maTransform;
+ attribute::SdrFillTextAttribute const maSdrFTAttribute;
protected:
// local decomposition.
diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx b/svx/source/tbxctrls/SvxPresetListBox.cxx
index 8230ccb17d88..fc3e18e8868d 100644
--- a/svx/source/tbxctrls/SvxPresetListBox.cxx
+++ b/svx/source/tbxctrls/SvxPresetListBox.cxx
@@ -28,7 +28,6 @@
SvxPresetListBox::SvxPresetListBox(std::unique_ptr<weld::ScrolledWindow> pWindow)
: SvtValueSet(std::move(pWindow))
- , nColCount(3)
, aIconSize(60, 64)
{
SetEdgeBlending(true);
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx
index d01abc43ee0b..620152e6e052 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -25,7 +25,7 @@ class NumberingToolBoxControl;
class NumberingPopup : public svtools::ToolbarMenu
{
- NumberingPageType mePageType;
+ NumberingPageType const mePageType;
NumberingToolBoxControl& mrController;
VclPtr<SvxNumValueSet> mpValueSet;
DECL_LINK( VSSelectToolbarMenuHdl, ToolbarMenu*, void );
diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx
index 1493f1256fd0..09f5268d097c 100644
--- a/svx/source/tbxctrls/extrusioncontrols.hxx
+++ b/svx/source/tbxctrls/extrusioncontrols.hxx
@@ -66,8 +66,8 @@ private:
VclPtr<ValueSet> mpDirectionSet;
Image maImgDirection[9];
- Image maImgPerspective;
- Image maImgParallel;
+ Image const maImgPerspective;
+ Image const maImgParallel;
DECL_LINK( SelectToolbarMenuHdl, ToolbarMenu*, void );
DECL_LINK( SelectValueSetHdl, ValueSet*, void );
@@ -142,9 +142,9 @@ private:
Image maImgLightingOn[9];
Image maImgLightingPreview[9];
- Image maImgBright;
- Image maImgNormal;
- Image maImgDim;
+ Image const maImgBright;
+ Image const maImgNormal;
+ Image const maImgDim;
int mnDirection;
bool mbDirectionEnabled;
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index ac0364c45d43..f30f4a06c9c2 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -71,7 +71,7 @@ class ImplGrafMetricField : public MetricField
private:
Idle maIdle;
- OUString maCommand;
+ OUString const maCommand;
Reference< XFrame > mxFrame;
DECL_LINK(ImplModifyHdl, Timer *, void);
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 872a63ac1315..8c69f9fb8198 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -53,7 +53,7 @@ private:
long nCol;
long nLine;
Reference< XFrame > mxFrame;
- OUString maCommand;
+ OUString const maCommand;
static const long TABLE_CELLS_HORIZ;
static const long TABLE_CELLS_VERT;
@@ -61,9 +61,6 @@ private:
long mnTableCellWidth;
long mnTableCellHeight;
- long mnTablePosX;
- long mnTablePosY;
-
long mnTableWidth;
long mnTableHeight;
@@ -99,6 +96,8 @@ IMPL_LINK_NOARG(TableWindow, SelectHdl, Button*, void)
CloseAndShowTableDialog();
}
+constexpr long nTablePosX = 2;
+constexpr long nTablePosY = 2;
TableWindow::TableWindow( sal_uInt16 nSlotId, vcl::Window* pParent, const OUString& rCmd,
const OUString& rText, const Reference< XFrame >& rFrame )
@@ -108,16 +107,14 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, vcl::Window* pParent, const OUStri
, nLine( 0 )
, mxFrame( rFrame )
, maCommand( rCmd )
- , mnTablePosX(2)
- , mnTablePosY(2)
{
float fScaleFactor = GetDPIScaleFactor();
mnTableCellWidth = 15 * fScaleFactor;
mnTableCellHeight = 15 * fScaleFactor;
- mnTableWidth = mnTablePosX + TABLE_CELLS_HORIZ*mnTableCellWidth;
- mnTableHeight = mnTablePosY + TABLE_CELLS_VERT*mnTableCellHeight;
+ mnTableWidth = nTablePosX + TABLE_CELLS_HORIZ*mnTableCellWidth;
+ mnTableHeight = nTablePosY + TABLE_CELLS_VERT*mnTableCellHeight;
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
svtools::ColorConfig aColorConfig;
@@ -136,8 +133,8 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, vcl::Window* pParent, const OUStri
SetText( rText );
- aTableButton->SetPosSizePixel( Point( mnTablePosX, mnTableHeight + 5 ),
- Size( mnTableWidth - mnTablePosX, 24 ) );
+ aTableButton->SetPosSizePixel( Point( nTablePosX, mnTableHeight + 5 ),
+ Size( mnTableWidth - nTablePosX, 24 ) );
aTableButton->SetText( SvxResId( RID_SVXSTR_MORE ) );
aTableButton->SetClickHdl( LINK( this, TableWindow, SelectHdl ) );
aTableButton->Show();
@@ -163,8 +160,8 @@ void TableWindow::MouseMove( const MouseEvent& rMEvt )
Point aPos = rMEvt.GetPosPixel();
Point aMousePos( aPos );
- long nNewCol = ( aMousePos.X() - mnTablePosX + mnTableCellWidth ) / mnTableCellWidth;
- long nNewLine = ( aMousePos.Y() - mnTablePosY + mnTableCellHeight ) / mnTableCellHeight;
+ long nNewCol = ( aMousePos.X() - nTablePosX + mnTableCellWidth ) / mnTableCellWidth;
+ long nNewLine = ( aMousePos.Y() - nTablePosY + mnTableCellHeight ) / mnTableCellHeight;
Update( nNewCol, nNewLine );
}
@@ -242,35 +239,35 @@ void TableWindow::MouseButtonUp( const MouseEvent& rMEvt )
void TableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
- const long nSelectionWidth = mnTablePosX + nCol * mnTableCellWidth;
- const long nSelectionHeight = mnTablePosY + nLine * mnTableCellHeight;
+ const long nSelectionWidth = nTablePosX + nCol * mnTableCellWidth;
+ const long nSelectionHeight = nTablePosY + nLine * mnTableCellHeight;
// the non-selected parts of the table
rRenderContext.SetLineColor(aLineColor);
rRenderContext.SetFillColor(aFillColor);
- rRenderContext.DrawRect(tools::Rectangle(nSelectionWidth, mnTablePosY, mnTableWidth, nSelectionHeight));
- rRenderContext.DrawRect(tools::Rectangle(mnTablePosX, nSelectionHeight, nSelectionWidth, mnTableHeight));
+ rRenderContext.DrawRect(tools::Rectangle(nSelectionWidth, nTablePosY, mnTableWidth, nSelectionHeight));
+ rRenderContext.DrawRect(tools::Rectangle(nTablePosX, nSelectionHeight, nSelectionWidth, mnTableHeight));
rRenderContext.DrawRect(tools::Rectangle(nSelectionWidth, nSelectionHeight, mnTableWidth, mnTableHeight));
// the selection
if (nCol > 0 && nLine > 0)
{
rRenderContext.SetFillColor(aHighlightFillColor);
- rRenderContext.DrawRect(tools::Rectangle(mnTablePosX, mnTablePosY, nSelectionWidth, nSelectionHeight));
+ rRenderContext.DrawRect(tools::Rectangle(nTablePosX, nTablePosY, nSelectionWidth, nSelectionHeight));
}
// lines inside of the table
rRenderContext.SetLineColor(aLineColor);
for (long i = 1; i < TABLE_CELLS_VERT; ++i)
{
- rRenderContext.DrawLine(Point(mnTablePosX, mnTablePosY + i*mnTableCellHeight),
- Point(mnTableWidth, mnTablePosY + i*mnTableCellHeight));
+ rRenderContext.DrawLine(Point(nTablePosX, nTablePosY + i*mnTableCellHeight),
+ Point(mnTableWidth, nTablePosY + i*mnTableCellHeight));
}
for (long i = 1; i < TABLE_CELLS_HORIZ; ++i)
{
- rRenderContext.DrawLine(Point( mnTablePosX + i*mnTableCellWidth, mnTablePosY),
- Point( mnTablePosX + i*mnTableCellWidth, mnTableHeight));
+ rRenderContext.DrawLine(Point( nTablePosX + i*mnTableCellWidth, nTablePosY),
+ Point( nTablePosX + i*mnTableCellWidth, mnTableHeight));
}
// the text near the mouse cursor telling the table dimensions
@@ -293,10 +290,10 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
long nTextY = nSelectionHeight + mnTableCellHeight;
const long nTipBorder = 2;
- if (aTextSize.Width() + mnTablePosX + mnTableCellWidth + 2 * nTipBorder < nSelectionWidth)
+ if (aTextSize.Width() + nTablePosX + mnTableCellWidth + 2 * nTipBorder < nSelectionWidth)
nTextX = nSelectionWidth - mnTableCellWidth - aTextSize.Width();
- if (aTextSize.Height() + mnTablePosY + mnTableCellHeight + 2 * nTipBorder < nSelectionHeight)
+ if (aTextSize.Height() + nTablePosY + mnTableCellHeight + 2 * nTipBorder < nSelectionHeight)
nTextY = nSelectionHeight - mnTableCellHeight - aTextSize.Height();
rRenderContext.SetLineColor(aLineColor);
@@ -343,7 +340,7 @@ void TableWindow::Update( long nNewCol, long nNewLine )
{
nCol = nNewCol;
nLine = nNewLine;
- Invalidate(tools::Rectangle(mnTablePosX, mnTablePosY, mnTableWidth, mnTableHeight));
+ Invalidate(tools::Rectangle(nTablePosX, nTablePosY, mnTableWidth, mnTableHeight));
}
}
@@ -389,7 +386,7 @@ private:
bool bInitialKeyInput;
bool m_bMod1;
Reference< XFrame > mxFrame;
- OUString maCommand;
+ OUString const maCommand;
void UpdateSize_Impl( long nNewCol );
public:
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 395f51eef891..3d709f52cb7a 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -53,7 +53,7 @@ class SvxPopupWindowListBox: public SfxPopupWindow
VclPtr<ListBox> m_pListBox;
ToolBox & rToolBox;
bool bUserSel;
- sal_uInt16 nTbxId;
+ sal_uInt16 const nTbxId;
public:
SvxPopupWindowListBox( sal_uInt16 nSlotId, const OUString& rCommandURL, sal_uInt16 nTbxId, ToolBox& rTbx );
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 8d1190cdc263..1f158dab2855 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -245,7 +245,6 @@ class SvxLineEndWindow : public svtools::ToolbarPopup
private:
XLineEndListRef mpLineEndList;
VclPtr<ValueSet> mpLineEndSet;
- sal_uInt16 mnCols;
sal_uInt16 mnLines;
Size maBmpSize;
svt::ToolboxController& mrController;
@@ -264,10 +263,11 @@ public:
virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
};
+static constexpr sal_uInt16 gnCols = 2;
+
SvxLineEndWindow::SvxLineEndWindow( svt::ToolboxController& rController, vcl::Window* pParentWindow )
: ToolbarPopup ( rController.getFrameInterface(), pParentWindow, WB_STDPOPUP | WB_MOVEABLE | WB_CLOSEABLE ),
mpLineEndSet ( VclPtr<ValueSet>::Create(this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) )),
- mnCols ( 2 ),
mnLines ( 12 ),
mrController ( rController )
{
@@ -285,7 +285,7 @@ SvxLineEndWindow::SvxLineEndWindow( svt::ToolboxController& rController, vcl::Wi
DBG_ASSERT( mpLineEndList.is(), "LineEndList not found" );
mpLineEndSet->SetSelectHdl( LINK( this, SvxLineEndWindow, SelectHdl ) );
- mpLineEndSet->SetColCount( mnCols );
+ mpLineEndSet->SetColCount( gnCols );
// ValueSet fill with entries of LineEndList
FillValueSet();
@@ -426,7 +426,7 @@ void SvxLineEndWindow::statusChanged( const css::frame::FeatureStateEvent& rEven
void SvxLineEndWindow::SetSize()
{
sal_uInt16 nItemCount = mpLineEndSet->GetItemCount();
- sal_uInt16 nMaxLines = nItemCount / mnCols;
+ sal_uInt16 nMaxLines = nItemCount / gnCols;
WinBits nBits = mpLineEndSet->GetStyle();
if ( mnLines == nMaxLines )
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index e1e1a73cb2c3..a9a78125cddd 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -157,16 +157,16 @@ private:
SfxStyleFamily eStyleFamily;
sal_Int32 nCurSel;
bool bRelease;
- Size aLogicalSize;
+ Size const aLogicalSize;
Link<SvxStyleBox_Impl&,void> aVisibilityListener;
bool bVisible;
Reference< XDispatchProvider > m_xDispatchProvider;
Reference< XFrame > m_xFrame;
- OUString m_aCommand;
- OUString aClearFormatKey;
- OUString aMoreKey;
+ OUString const m_aCommand;
+ OUString const aClearFormatKey;
+ OUString const aMoreKey;
OUString sDefaultStyle;
- bool bInSpecialMode;
+ bool const bInSpecialMode;
VclPtr<MenuButton> m_pButtons[MAX_STYLES_ENTRIES];
VclBuilder m_aBuilder;
VclPtr<PopupMenu> m_pMenu;
@@ -187,7 +187,7 @@ private:
const FontList* pFontList;
::std::unique_ptr<FontList> m_aOwnFontList;
vcl::Font aCurFont;
- Size aLogicalSize;
+ Size const aLogicalSize;
OUString aCurText;
sal_uInt16 nFtCount;
bool bRelease;
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index aa920871910a..18b22663e2c0 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -99,7 +99,7 @@ protected:
private:
FontHeightToolBoxControl* m_pCtrl;
OUString m_aCurText;
- Size m_aLogicalSize;
+ Size const m_aLogicalSize;
bool m_bRelease;
uno::Reference< frame::XFrame > m_xFrame;
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index aa4b03fb033a..969cd1852b7c 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -616,7 +616,7 @@ public:
virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
private:
- Type meType;
+ Type const meType;
};
UpDownSearchToolboxController::UpDownSearchToolboxController( const css::uno::Reference< css::uno::XComponentContext > & rxContext, Type eType )
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
index 6b4a9e864d53..8904626fc024 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
@@ -44,11 +44,11 @@ struct DictionaryEntry final
~DictionaryEntry();
- OUString m_aTerm;
- OUString m_aMapping;
+ OUString const m_aTerm;
+ OUString const m_aMapping;
sal_Int16 m_nConversionPropertyType; //linguistic2::ConversionPropertyType
- bool m_bNewEntry;
+ bool const m_bNewEntry;
};
class DictionaryList : public SvSimpleTable
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index b9107915f4c6..80ff5b14c23b 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -277,7 +277,7 @@ public:
const sdr::contact::DisplayInfo& rDisplayInfo) override;
private:
- SdrPage* mpCurrentPage;
+ SdrPage* const mpCurrentPage;
};
ImplExportCheckVisisbilityRedirector::ImplExportCheckVisisbilityRedirector( SdrPage* pCurrentPage )
diff --git a/svx/source/unodraw/UnoNameItemTable.hxx b/svx/source/unodraw/UnoNameItemTable.hxx
index f1f8e10dbb72..05faef9017f2 100644
--- a/svx/source/unodraw/UnoNameItemTable.hxx
+++ b/svx/source/unodraw/UnoNameItemTable.hxx
@@ -44,7 +44,7 @@ private:
SdrModel* mpModel;
SfxItemPool* mpModelPool;
sal_uInt16 mnWhich;
- sal_uInt8 mnMemberId;
+ sal_uInt8 const mnMemberId;
ItemPoolVector maItemSetVector;
diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx
index 33e90b738627..bc68a44329a1 100644
--- a/svx/source/unodraw/UnoNamespaceMap.cxx
+++ b/svx/source/unodraw/UnoNamespaceMap.cxx
@@ -47,8 +47,8 @@ namespace svx
class NamespaceMap : public WeakImplHelper< XNameAccess, XServiceInfo >
{
private:
- sal_uInt16* mpWhichIds;
- SfxItemPool* mpPool;
+ sal_uInt16* const mpWhichIds;
+ SfxItemPool* const mpPool;
public:
NamespaceMap( sal_uInt16* pWhichIds, SfxItemPool* pPool );
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index c26dc9b2d41a..3faaaed600b5 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -48,7 +48,7 @@ class SvxUnoXPropertyTable : public WeakImplHelper< container::XNameContainer, l
{
private:
XPropertyList* mpList;
- sal_Int16 mnWhich;
+ sal_Int16 const mnWhich;
long getCount() const { return mpList ? mpList->Count() : 0; }
const XPropertyEntry* get(long index) const;
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index c13b75661df2..959b8be84887 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -592,10 +592,10 @@ void SAL_CALL SvxShapeControl::setControl( const Reference< awt::XControlModel >
static struct
{
const sal_Char* mpAPIName;
- sal_uInt16 mnAPINameLen;
+ sal_uInt16 const mnAPINameLen;
const sal_Char* mpFormName;
- sal_uInt16 mnFormNameLen;
+ sal_uInt16 const mnFormNameLen;
}
const SvxShapeControlPropertyMapping[] =
{
@@ -652,8 +652,8 @@ namespace
struct EnumConversionMap
{
- style::ParagraphAdjust nAPIValue;
- sal_Int16 nFormValue;
+ style::ParagraphAdjust const nAPIValue;
+ sal_Int16 const nFormValue;
};
EnumConversionMap const aMapAdjustToAlign[] =
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 40c64f81fac4..cb6eb4d80e3a 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -1005,7 +1005,7 @@ protected:
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
private:
- SvXMLGraphicHelperMode m_eGraphicHelperMode;
+ SvXMLGraphicHelperMode const m_eGraphicHelperMode;
Reference< XGraphicObjectResolver > m_xGraphicObjectResolver;
Reference< XGraphicStorageHandler > m_xGraphicStorageHandler;
Reference< XBinaryStreamResolver > m_xBinaryStreamResolver;
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index a45f14bf0a78..bb24ae7d189a 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -87,8 +87,8 @@ protected:
private:
uno::Reference< XNameContainer > mxTable;
- SvxXMLTableImportContextEnum meContext;
- bool mbOOoFormat;
+ SvxXMLTableImportContextEnum const meContext;
+ bool const mbOOoFormat;
};
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 3b72a44156ba..8568212448c9 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -369,7 +369,7 @@ XPropertyList::CreatePropertyListFromURL( XPropertyListType t,
}
static struct {
- XPropertyListType t;
+ XPropertyListType const t;
const char *pExt;
} pExtnMap[] = {
{ XPropertyListType::Color, "soc" },