diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-01 11:40:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-08 08:03:03 +0200 |
commit | 1a6397030381a45f27ab7a2a02e6e6d0f9987c84 (patch) | |
tree | 6e342854037b3b845215af09f36407495550254d | |
parent | 781544497a0913037bba160a4cf6b643e5ca1d1a (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>
156 files changed, 526 insertions, 546 deletions
diff --git a/include/svx/AccessibleShapeInfo.hxx b/include/svx/AccessibleShapeInfo.hxx index d40251c41237..e997f872a8c5 100644 --- a/include/svx/AccessibleShapeInfo.hxx +++ b/include/svx/AccessibleShapeInfo.hxx @@ -63,7 +63,7 @@ public: parent/child relationships with the shape as initiator. Note that NULL is a valid value for this member. */ - IAccessibleParent* mpChildrenManager; + IAccessibleParent* const mpChildrenManager; /** Copy the given values into the members described above. */ diff --git a/include/svx/ClassificationDialog.hxx b/include/svx/ClassificationDialog.hxx index 14b1607cf7b7..ba2fbec1487d 100644 --- a/include/svx/ClassificationDialog.hxx +++ b/include/svx/ClassificationDialog.hxx @@ -60,7 +60,7 @@ private: const std::function<void()> m_aParagraphSignHandler; sal_Int32 m_nCurrentSelectedCategory; - sal_Int16 m_nInsertMarkings; + sal_Int16 const m_nInsertMarkings; DECL_LINK(ButtonClicked, Button*, void); DECL_LINK(SelectToolboxHdl, ToolBox*, void); diff --git a/include/svx/ClassificationField.hxx b/include/svx/ClassificationField.hxx index 79e30cff094a..84bf50754a79 100644 --- a/include/svx/ClassificationField.hxx +++ b/include/svx/ClassificationField.hxx @@ -62,10 +62,10 @@ public: class SVX_DLLPUBLIC ClassificationField : public SvxFieldData { public: - ClassificationType meType; - OUString msDescription; - OUString msFullClassName; - OUString msIdentifier; + ClassificationType const meType; + OUString const msDescription; + OUString const msFullClassName; + OUString const msIdentifier; ClassificationField(ClassificationType eType, OUString const & sDescription, OUString const & sFullClassName, OUString const & sIdentifier) : SvxFieldData() diff --git a/include/svx/CommonStylePreviewRenderer.hxx b/include/svx/CommonStylePreviewRenderer.hxx index 717ccb2cc785..7d298c1be445 100644 --- a/include/svx/CommonStylePreviewRenderer.hxx +++ b/include/svx/CommonStylePreviewRenderer.hxx @@ -32,7 +32,7 @@ class SVX_DLLPUBLIC CommonStylePreviewRenderer : public sfx2::StylePreviewRender Color maFontColor; Color maBackgroundColor; Size maPixelSize; - OUString maStyleName; + OUString const maStyleName; public: CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& rOutputDev, diff --git a/include/svx/EnhancedCustomShape2d.hxx b/include/svx/EnhancedCustomShape2d.hxx index 5f8567a19c38..b2864076469b 100644 --- a/include/svx/EnhancedCustomShape2d.hxx +++ b/include/svx/EnhancedCustomShape2d.hxx @@ -114,8 +114,8 @@ class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet css::uno::Sequence< css::beans::PropertyValues > seqHandles; css::uno::Sequence< css::awt::Size > seqSubViewSize; - bool bFilled : 1; - bool bStroked : 1; + bool const bFilled : 1; + bool const bStroked : 1; bool bFlipH; bool bFlipV; diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx b/include/svx/EnhancedCustomShapeGeometry.hxx index 3befba19fa57..23b22b3c3e17 100644 --- a/include/svx/EnhancedCustomShapeGeometry.hxx +++ b/include/svx/EnhancedCustomShapeGeometry.hxx @@ -26,18 +26,18 @@ struct SvxMSDffVertPair { - sal_Int32 nValA; - sal_Int32 nValB; + sal_Int32 const nValA; + sal_Int32 const nValB; }; struct SvxMSDffCalculationData { - sal_uInt16 nFlags; - sal_Int32 nVal[ 3 ]; + sal_uInt16 const nFlags; + sal_Int32 const nVal[ 3 ]; }; struct SvxMSDffTextRectangles { - SvxMSDffVertPair nPairA; - SvxMSDffVertPair nPairB; + SvxMSDffVertPair const nPairA; + SvxMSDffVertPair const nPairB; }; enum class SvxMSDffHandleFlags @@ -64,28 +64,28 @@ namespace o3tl struct SvxMSDffHandle { - SvxMSDffHandleFlags nFlags; + SvxMSDffHandleFlags const nFlags; sal_Int32 nPositionX, nPositionY, nCenterX, nCenterY, nRangeXMin, nRangeXMax, nRangeYMin, nRangeYMax; }; struct mso_CustomShape { - SvxMSDffVertPair* pVertices; - sal_uInt32 nVertices; - sal_uInt16* pElements; - sal_uInt32 nElements; - SvxMSDffCalculationData* pCalculation; - sal_uInt32 nCalculation; - sal_Int32* pDefData; - SvxMSDffTextRectangles* pTextRect; - sal_uInt32 nTextRect; - sal_Int32 nCoordWidth; - sal_Int32 nCoordHeight; - sal_Int32 nXRef; - sal_Int32 nYRef; - SvxMSDffVertPair* pGluePoints; - sal_uInt32 nGluePoints; - SvxMSDffHandle* pHandles; - sal_uInt32 nHandles; + SvxMSDffVertPair* const pVertices; + sal_uInt32 const nVertices; + sal_uInt16* const pElements; + sal_uInt32 const nElements; + SvxMSDffCalculationData* const pCalculation; + sal_uInt32 const nCalculation; + sal_Int32* const pDefData; + SvxMSDffTextRectangles* const pTextRect; + sal_uInt32 const nTextRect; + sal_Int32 const nCoordWidth; + sal_Int32 const nCoordHeight; + sal_Int32 const nXRef; + sal_Int32 const nYRef; + SvxMSDffVertPair* const pGluePoints; + sal_uInt32 const nGluePoints; + SvxMSDffHandle* const pHandles; + sal_uInt32 const nHandles; }; #define MSO_I | sal_Int32(0x80000000) diff --git a/include/svx/SmartTagMgr.hxx b/include/svx/SmartTagMgr.hxx index a614d97ebbd9..42dbf494cb3c 100644 --- a/include/svx/SmartTagMgr.hxx +++ b/include/svx/SmartTagMgr.hxx @@ -71,7 +71,7 @@ namespace com { namespace sun { namespace star { namespace frame { struct ActionReference { css::uno::Reference< css::smarttags::XSmartTagAction > mxSmartTagAction; - sal_Int32 mnSmartTagIndex; + sal_Int32 const mnSmartTagIndex; ActionReference( css::uno::Reference< css::smarttags::XSmartTagAction > const & xSmartTagAction, sal_Int32 nSmartTagIndex ) : mxSmartTagAction( xSmartTagAction), mnSmartTagIndex( nSmartTagIndex ) {} }; diff --git a/include/svx/SvxPresetListBox.hxx b/include/svx/SvxPresetListBox.hxx index 9a8a1fa4d118..e8809eca0f61 100644 --- a/include/svx/SvxPresetListBox.hxx +++ b/include/svx/SvxPresetListBox.hxx @@ -30,8 +30,8 @@ class SVX_DLLPUBLIC SvxPresetListBox : public SvtValueSet { private: - sal_uInt32 nColCount; - Size aIconSize; + static constexpr sal_uInt32 nColCount = 3; + Size const aIconSize; Link<SvxPresetListBox*,void> maRenameHdl; Link<SvxPresetListBox*,void> maDeleteHdl; @@ -45,7 +45,7 @@ public: virtual void Resize() override; virtual bool ContextMenu(const Point& rPos) override; - sal_uInt32 getColumnCount() const { return nColCount; } + static sal_uInt32 getColumnCount() { return nColCount; } Size const & GetIconSize() const { return aIconSize; } void SetRenameHdl( const Link<SvxPresetListBox*,void>& rLink ) diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx index ccfac3bf2c60..6b3847cbf2cf 100644 --- a/include/svx/colorbox.hxx +++ b/include/svx/colorbox.hxx @@ -95,10 +95,10 @@ private: friend class ListBoxColorWrapper; std::unique_ptr<ColorWindow> m_xColorWindow; std::unique_ptr<weld::MenuButton> m_xButton; - weld::Window* m_pTopLevel; + weld::Window* const m_pTopLevel; Link<ColorListBox&, void> m_aSelectedLink; ListBoxColorWrapper m_aColorWrapper; - Color m_aAutoDisplayColor; + Color const m_aAutoDisplayColor; Color m_aSaveColor; NamedColor m_aSelectedColor; sal_uInt16 m_nSlotId; diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx index 22682a967240..f5de49f7fd9a 100644 --- a/include/svx/colorwindow.hxx +++ b/include/svx/colorwindow.hxx @@ -61,15 +61,15 @@ private: VclPtr<PushButton> mpButtonNoneColor; VclPtr<PushButton> mpButtonPicker; VclPtr<FixedLine> mpAutomaticSeparator; - OUString maCommand; + OUString const maCommand; Link<const NamedColor&, void> maSelectedLink; VclPtr<vcl::Window> mxParentWindow; std::shared_ptr<PaletteManager> mxPaletteManager; BorderColorStatus& mrBorderColorStatus; - ColorSelectFunction maColorSelectFunction; - bool mbReuseParentForPicker; + ColorSelectFunction const maColorSelectFunction; + bool const mbReuseParentForPicker; DECL_LINK( SelectHdl, ValueSet*, void ); DECL_LINK( SelectPaletteHdl, ListBox&, void); @@ -115,11 +115,11 @@ private: std::unique_ptr<weld::Builder> m_xBuilder; const sal_uInt16 theSlotId; - weld::Window* mpParentWindow; + weld::Window* const mpParentWindow; weld::MenuButton* mpMenuButton; std::shared_ptr<PaletteManager> mxPaletteManager; BorderColorStatus& mrBorderColorStatus; - ColorSelectFunction maColorSelectFunction; + ColorSelectFunction const maColorSelectFunction; std::unique_ptr<ColorValueSet> mxColorSet; std::unique_ptr<ColorValueSet> mxRecentColorSet; diff --git a/include/svx/colrctrl.hxx b/include/svx/colrctrl.hxx index 3637ed81d2a2..624376a7a46b 100644 --- a/include/svx/colrctrl.hxx +++ b/include/svx/colrctrl.hxx @@ -83,8 +83,8 @@ friend class SvxColorChildWindow; private: XColorListRef pColorList; VclPtr<SvxColorValueSet_docking> aColorSet; - sal_uInt16 nLeftSlot; - sal_uInt16 nRightSlot; + sal_uInt16 const nLeftSlot; + sal_uInt16 const nRightSlot; sal_uInt16 nCols; sal_uInt16 nLines; long nCount; diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx index e9e64a15f443..c9d2b316e242 100644 --- a/include/svx/compressgraphicdialog.hxx +++ b/include/svx/compressgraphicdialog.hxx @@ -54,9 +54,9 @@ private: std::unique_ptr<weld::ComboBox> m_xInterpolationCombo; SdrGrafObj* m_xGraphicObj; - Graphic m_aGraphic; - Size m_aViewSize100mm; - tools::Rectangle m_aCropRectangle; + Graphic const m_aGraphic; + Size const m_aViewSize100mm; + tools::Rectangle m_aCropRectangle; SfxBindings& m_rBindings; double m_dResolution; diff --git a/include/svx/dbaexchange.hxx b/include/svx/dbaexchange.hxx index a8b0bedf1454..7d905d2d5841 100644 --- a/include/svx/dbaexchange.hxx +++ b/include/svx/dbaexchange.hxx @@ -164,7 +164,7 @@ namespace svx ODataAccessDescriptor m_aDescriptor; OUString m_sCompatibleFormat; - ColumnTransferFormatFlags m_nFormatFlags; + ColumnTransferFormatFlags const m_nFormatFlags; }; diff --git a/include/svx/e3dundo.hxx b/include/svx/e3dundo.hxx index 17335ea1e8e0..58457c4952fb 100644 --- a/include/svx/e3dundo.hxx +++ b/include/svx/e3dundo.hxx @@ -54,8 +54,8 @@ class SAL_WARN_UNUSED E3dUndoAction : public SdrUndoAction class SAL_WARN_UNUSED E3dRotateUndoAction : public E3dUndoAction { private: - basegfx::B3DHomMatrix maMyOldRotation; - basegfx::B3DHomMatrix maMyNewRotation; + basegfx::B3DHomMatrix const maMyOldRotation; + basegfx::B3DHomMatrix const maMyNewRotation; public: E3dRotateUndoAction( diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx index 7529fddec56a..16891e8b344f 100644 --- a/include/svx/float3d.hxx +++ b/include/svx/float3d.hxx @@ -164,8 +164,8 @@ private: VclPtr<PushButton> m_pBtnPerspective; // the rest ... - Image aImgLightOn; - Image aImgLightOff; + Image const aImgLightOn; + Image const aImgLightOff; bool bUpdate; ViewType3D eViewType; @@ -173,7 +173,7 @@ private: std::unique_ptr<FmFormModel> pModel; VclPtr<VirtualDevice> pVDev; - SfxBindings* pBindings; + SfxBindings* const pBindings; std::unique_ptr<Svx3DCtrlItem> pControllerItem; std::unique_ptr<SvxConvertTo3DItem> pConvertTo3DItem; diff --git a/include/svx/fmshell.hxx b/include/svx/fmshell.hxx index 3d7d606e77b4..4098bff2ebda 100644 --- a/include/svx/fmshell.hxx +++ b/include/svx/fmshell.hxx @@ -58,7 +58,7 @@ namespace svx class SAL_WARN_UNUSED SVX_DLLPUBLIC FmDesignModeChangedHint : public SfxHint { - bool m_bDesignMode; + bool const m_bDesignMode; public: FmDesignModeChangedHint( bool bDesMode ); diff --git a/include/svx/fmsrcimp.hxx b/include/svx/fmsrcimp.hxx index 112f4314abd8..4d246df20c99 100644 --- a/include/svx/fmsrcimp.hxx +++ b/include/svx/fmsrcimp.hxx @@ -159,7 +159,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC FmSearchEngine final // Since the iterator could have more columns, as managed here (in this field listbox), // a mapping of this css::form keys on the indices of the respective columns is kept in the iterator - CharClass m_aCharacterClassficator; + CharClass const m_aCharacterClassficator; CollatorWrapper m_aStringCompare; // the collection of all interesting fields (or their css::data::XDatabaseVariant interfaces and FormatKeys) diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx index 57bc02ded261..4f16f999edff 100644 --- a/include/svx/galctrl.hxx +++ b/include/svx/galctrl.hxx @@ -45,7 +45,7 @@ private: GraphicObject aGraphicObj; tools::Rectangle aPreviewRect; - GalleryTheme* mpTheme; + GalleryTheme* const mpTheme; SVX_DLLPRIVATE bool ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const; SVX_DLLPRIVATE void InitSettings(); diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index 989603e46deb..7738e265d278 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -42,7 +42,7 @@ private: INetURLObject aSdvURL; INetURLObject aStrURL; sal_uInt32 nId; - bool bReadOnly; + bool const bReadOnly; bool bModified; bool bThemeNameFromResource; diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index 6228aa173a46..6a2d05a95655 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -140,8 +140,8 @@ friend class GalleryTheme; using TransferableHelper::CopyToClipboard; GalleryTheme* mpTheme; - SgaObjKind meObjectKind; - sal_uInt32 mnObjectPos; + SgaObjKind const meObjectKind; + sal_uInt32 const mnObjectPos; tools::SvRef<SotStorageStream> mxModelStream; std::unique_ptr<GraphicObject> mpGraphicObject; std::unique_ptr<INetURLObject> mpURL; @@ -176,10 +176,10 @@ class GalleryHint : public SfxHint { private: - GalleryHintType mnType; - OUString maThemeName; - OUString maStringData; - void* mnData1; + GalleryHintType const mnType; + OUString const maThemeName; + OUString const maStringData; + void* const mnData1; public: diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx index 56ef1e7129d6..231ad1656efc 100644 --- a/include/svx/galtheme.hxx +++ b/include/svx/galtheme.hxx @@ -80,7 +80,7 @@ private: OUString m_aDestDir; bool m_bDestDirRelative; tools::SvRef<SotStorage> aSvDrawStorageRef; - Gallery* pParent; + Gallery* const pParent; GalleryThemeEntry* pThm; sal_uInt32 mnThemeLockCount; sal_uInt32 mnBroadcasterLockCount; diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx index 6803854983f3..4b61d407b7e2 100644 --- a/include/svx/graphctl.hxx +++ b/include/svx/graphctl.hxx @@ -55,7 +55,7 @@ class SVX_DLLPUBLIC GraphCtrl : public Control Link<GraphCtrl*,void> aMousePosLink; Link<GraphCtrl*,void> aGraphSizeLink; Link<GraphCtrl*,void> aUpdateLink; - MapMode aMap100; + MapMode const aMap100; Size aGraphSize; Point aMousePos; std::unique_ptr<GraphCtrlUserCall> pUserCall; @@ -127,7 +127,7 @@ public: class SVX_DLLPUBLIC SvxGraphCtrl : public weld::CustomWidgetController { - MapMode aMap100; + MapMode const aMap100; Graphic aGraphic; Size aGraphSize; diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx index e7c0e56269e2..2ea2a25757d1 100644 --- a/include/svx/hdft.hxx +++ b/include/svx/hdft.hxx @@ -63,7 +63,7 @@ protected: SvxHFPage(TabPageParent pParent, const SfxItemSet& rSet, sal_uInt16 nSetId); - sal_uInt16 nId; + sal_uInt16 const nId; std::unique_ptr<SfxItemSet> pBBSet; bool mbDisableQueryBox : 1; bool mbEnableDrawingLayerFillStyles : 1; diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx index 51988da2e3cb..a50126eb6440 100644 --- a/include/svx/itemwin.hxx +++ b/include/svx/itemwin.hxx @@ -32,7 +32,7 @@ class SvxLineBox : public LineLB { sal_uInt16 nCurPos; Timer aDelayTimer; - Size aLogicalSize; + Size const aLogicalSize; bool bRelease; SfxObjectShell* mpSh; css::uno::Reference< css::frame::XFrame > mxFrame; diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx index 5d4ae84297c0..3dbb96977e37 100644 --- a/include/svx/langbox.hxx +++ b/include/svx/langbox.hxx @@ -142,7 +142,7 @@ public: private: std::unique_ptr<weld::ComboBox> m_xControl; Link<weld::ComboBox&, void> m_aChangeHdl; - OUString m_aAllString; + OUString const m_aAllString; std::unique_ptr<css::uno::Sequence<sal_Int16>> m_xSpellUsedLang; LanguageType m_eSavedLanguage; EditedAndValid m_eEditedAndValid; diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx index 18485b2ed3a2..81b409b1065a 100644 --- a/include/svx/numfmtsh.hxx +++ b/include/svx/numfmtsh.hxx @@ -178,7 +178,7 @@ public: private: SvNumberFormatter* pFormatter; SvNumberFormatTable* pCurFmtTable; - SvxNumberValueType eValType; + SvxNumberValueType const eValType; OUString aValStr; double nValNum; bool bUndoAddList; diff --git a/include/svx/numinf.hxx b/include/svx/numinf.hxx index f49e48b2310d..0702fe2e8b6e 100644 --- a/include/svx/numinf.hxx +++ b/include/svx/numinf.hxx @@ -62,10 +62,10 @@ public: SvxNumberValueType GetValueType() const { return eValueType; } private: - SvNumberFormatter* pFormatter; - SvxNumberValueType eValueType; - OUString aStringVal; - double nDoubleVal; + SvNumberFormatter* const pFormatter; + SvxNumberValueType const eValueType; + OUString const aStringVal; + double const nDoubleVal; std::vector<sal_uInt32> mvDelFormats; }; diff --git a/include/svx/ofaitem.hxx b/include/svx/ofaitem.hxx index f63b3a98e289..7ee48b6908fa 100644 --- a/include/svx/ofaitem.hxx +++ b/include/svx/ofaitem.hxx @@ -26,7 +26,7 @@ class SVX_DLLPUBLIC OfaPtrItem : public SfxPoolItem { private: - void* pPtr; + void* const pPtr; public: OfaPtrItem( sal_uInt16 nWhich, void *pPtr ); diff --git a/include/svx/passwd.hxx b/include/svx/passwd.hxx index 7915453fb05d..bbc89cf80197 100644 --- a/include/svx/passwd.hxx +++ b/include/svx/passwd.hxx @@ -25,8 +25,8 @@ class SVX_DLLPUBLIC SvxPasswordDialog : public SfxDialogController { private: - OUString m_aOldPasswdErrStr; - OUString m_aRepeatPasswdErrStr; + OUString const m_aOldPasswdErrStr; + OUString const m_aRepeatPasswdErrStr; Link<SvxPasswordDialog*,bool> m_aCheckPasswordHdl; std::unique_ptr<weld::Label> m_xOldFL; diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx index 2a2594826890..4c914c689e9b 100644 --- a/include/svx/ruler.hxx +++ b/include/svx/ruler.hxx @@ -104,9 +104,8 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener bool bHorz :1; long lLogicNullOffset; // in logic coordinates long lAppNullOffset; // in logic coordinates - long lMinFrame; // minimal frame width in pixels long lInitialDragPos; - SvxRulerSupportFlags nFlags; + SvxRulerSupportFlags const nFlags; SvxRulerDragFlags nDragType; sal_uInt16 nDefTabType; sal_uInt16 nTabCount; diff --git a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx index e906b0126328..426b0900be22 100644 --- a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx +++ b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx @@ -31,21 +31,21 @@ namespace sdr class SVX_DLLPUBLIC OverlayAnimatedBitmapEx final : public OverlayObjectWithBasePosition { // the Bitmaps - BitmapEx maBitmapEx1; - BitmapEx maBitmapEx2; + BitmapEx const maBitmapEx1; + BitmapEx const maBitmapEx2; // position of the basePosition inside the Bitmaps, in pixels - sal_uInt16 mnCenterX1; - sal_uInt16 mnCenterY1; - sal_uInt16 mnCenterX2; - sal_uInt16 mnCenterY2; + sal_uInt16 const mnCenterX1; + sal_uInt16 const mnCenterY1; + sal_uInt16 const mnCenterX2; + sal_uInt16 const mnCenterY2; // #i53216# added CursorBlinkTime (in ms) - sal_uInt32 mnBlinkTime; + sal_uInt32 const mnBlinkTime; // optional shear and rotation - double mfShearX; - double mfRotation; + double const mfShearX; + double const mfRotation; // Flag to remember which state to draw. Inited with false (0) bool mbOverlayState : 1; diff --git a/include/svx/sdr/overlay/overlaybitmapex.hxx b/include/svx/sdr/overlay/overlaybitmapex.hxx index 41f2ce1c6c2d..8998237ed6b3 100644 --- a/include/svx/sdr/overlay/overlaybitmapex.hxx +++ b/include/svx/sdr/overlay/overlaybitmapex.hxx @@ -31,16 +31,16 @@ namespace sdr class SVX_DLLPUBLIC OverlayBitmapEx final : public OverlayObjectWithBasePosition { // the Bitmap itself - BitmapEx maBitmapEx; + BitmapEx const maBitmapEx; // position of the basePosition inside the Bitmap, in pixels - sal_uInt16 mnCenterX; - sal_uInt16 mnCenterY; + sal_uInt16 const mnCenterX; + sal_uInt16 const mnCenterY; // optional transparency, shear and rotation - double mfAlpha; - double mfShearX; - double mfRotation; + double const mfAlpha; + double const mfShearX; + double const mfRotation; virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; diff --git a/include/svx/sdr/overlay/overlaymanager.hxx b/include/svx/sdr/overlay/overlaymanager.hxx index 7028f46b4a69..58b6d620984e 100644 --- a/include/svx/sdr/overlay/overlaymanager.hxx +++ b/include/svx/sdr/overlay/overlaymanager.hxx @@ -70,7 +70,7 @@ namespace sdr sal_uInt32 mnStripeLengthPixel; // defaults to 4L // hold an incarnation of Drawinglayer configuration options - SvtOptionsDrawinglayer maDrawinglayerOpt; + SvtOptionsDrawinglayer const maDrawinglayerOpt; // hold buffered the logic length of discrete vector (1.0, 0.0) and the // view transformation belonging to it. Update happens in getDiscreteOne() diff --git a/include/svx/sdr/overlay/overlaypolypolygon.hxx b/include/svx/sdr/overlay/overlaypolypolygon.hxx index 599bd5298317..4ed9623658ce 100644 --- a/include/svx/sdr/overlay/overlaypolypolygon.hxx +++ b/include/svx/sdr/overlay/overlaypolypolygon.hxx @@ -32,7 +32,7 @@ namespace sdr class SVX_DLLPUBLIC OverlayPolyPolygonStripedAndFilled final : public OverlayObject { // geometry - basegfx::B2DPolyPolygon maLinePolyPolygon; + basegfx::B2DPolyPolygon const maLinePolyPolygon; // geometry creation for OverlayObject virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; diff --git a/include/svx/sdr/overlay/overlayselection.hxx b/include/svx/sdr/overlay/overlayselection.hxx index f849c1568af7..9c363752d5f1 100644 --- a/include/svx/sdr/overlay/overlayselection.hxx +++ b/include/svx/sdr/overlay/overlayselection.hxx @@ -39,7 +39,7 @@ namespace sdr class SVX_DLLPUBLIC OverlaySelection final : public OverlayObject { // type of overlay - OverlayType meOverlayType; + OverlayType const meOverlayType; // geometry of overlay std::vector< basegfx::B2DRange > maRanges; @@ -50,7 +50,7 @@ namespace sdr OverlayType maLastOverlayType; sal_uInt16 mnLastTransparence; - bool mbBorder : 1; + bool const mbBorder : 1; // geometry creation for OverlayObject, can use local *Last* values virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; diff --git a/include/svx/sdr/overlay/overlaytriangle.hxx b/include/svx/sdr/overlay/overlaytriangle.hxx index b5b68b8ce766..f13c507e6206 100644 --- a/include/svx/sdr/overlay/overlaytriangle.hxx +++ b/include/svx/sdr/overlay/overlaytriangle.hxx @@ -29,8 +29,8 @@ namespace sdr class SVX_DLLPUBLIC OverlayTriangle final : public OverlayObjectWithBasePosition { // second and third position in pixel - basegfx::B2DPoint maSecondPosition; - basegfx::B2DPoint maThirdPosition; + basegfx::B2DPoint const maSecondPosition; + basegfx::B2DPoint const maThirdPosition; // geometry creation for OverlayObject virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; diff --git a/include/svx/selctrl.hxx b/include/svx/selctrl.hxx index 706580319ba2..6322282805b7 100644 --- a/include/svx/selctrl.hxx +++ b/include/svx/selctrl.hxx @@ -38,7 +38,7 @@ public: private: sal_uInt16 mnState; - Image maImage; + Image const maImage; }; #endif diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx b/include/svx/sidebar/LinePropertyPanelBase.hxx index 3b54724f0bf1..6d10cca666a0 100644 --- a/include/svx/sidebar/LinePropertyPanelBase.hxx +++ b/include/svx/sidebar/LinePropertyPanelBase.hxx @@ -145,7 +145,7 @@ private: VclPtr<LineWidthPopup> mxLineWidthPopup; // images from resource - Image maIMGNone; + Image const maIMGNone; // multi-images std::unique_ptr<Image[]> mpIMGWidthIcon; diff --git a/include/svx/sidebar/LineWidthPopup.hxx b/include/svx/sidebar/LineWidthPopup.hxx index a6b5713ef6f7..e2e45ce102a1 100644 --- a/include/svx/sidebar/LineWidthPopup.hxx +++ b/include/svx/sidebar/LineWidthPopup.hxx @@ -45,7 +45,7 @@ public: private: LinePropertyPanelBase& m_rParent; std::array<OUString,9> maStrUnits; - OUString m_sPt; + OUString const m_sPt; MapUnit m_eMapUnit; bool m_bVSFocus; bool m_bCustom; @@ -53,8 +53,8 @@ private: VclPtr<MetricField> m_xMFWidth; VclPtr<VclContainer> m_xBox; VclPtr<LineWidthValueSet> m_xVSWidth; - Image m_aIMGCus; - Image m_aIMGCusGray; + Image const m_aIMGCus; + Image const m_aIMGCusGray; DECL_LINK(VSSelectHdl, ValueSet*, void); DECL_LINK(MFModifyHdl, Edit&, void); diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx index e4a501429c53..5bdd440e3409 100644 --- a/include/svx/svddrgmt.hxx +++ b/include/svx/svddrgmt.hxx @@ -51,7 +51,7 @@ public: class SVX_DLLPUBLIC SdrDragEntryPolyPolygon : public SdrDragEntry { private: - basegfx::B2DPolyPolygon maOriginalPolyPolygon; + basegfx::B2DPolyPolygon const maOriginalPolyPolygon; public: SdrDragEntryPolyPolygon(const basegfx::B2DPolyPolygon& rOriginalPolyPolygon); @@ -67,7 +67,7 @@ private: const SdrObject& maOriginal; SdrObject* mpClone; sdr::contact::ObjectContact& mrObjectContact; - bool mbModify; + bool const mbModify; public: SdrDragEntrySdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify); @@ -86,7 +86,7 @@ public: class SdrDragEntryPrimitive2DSequence : public SdrDragEntry { private: - drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence; + drawinglayer::primitive2d::Primitive2DContainer const maPrimitive2DSequence; public: SdrDragEntryPrimitive2DSequence( @@ -100,8 +100,8 @@ public: class SdrDragEntryPointGlueDrag : public SdrDragEntry { private: - std::vector< basegfx::B2DPoint > maPositions; - bool mbIsPointDrag; + std::vector< basegfx::B2DPoint > const maPositions; + bool const mbIsPointDrag; public: SdrDragEntryPointGlueDrag(const std::vector< basegfx::B2DPoint >& rPositions, bool bIsPointDrag); diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx index 075c7fe743e9..5760d642a3f7 100644 --- a/include/svx/svdhdl.hxx +++ b/include/svx/svdhdl.hxx @@ -249,7 +249,7 @@ class SVX_DLLPUBLIC SdrHdlColor : public SdrHdl Link<SdrHdlColor*,void> aColorChangeHdl; // use luminance values only - bool bUseLuminance : 1; + bool const bUseLuminance : 1; // create marker for this kind SVX_DLLPRIVATE virtual void CreateB2dIAObject() override; @@ -284,7 +284,7 @@ private: Point a2ndPos; // is this a gradient or a transparence - bool bGradient : 1; + bool const bGradient : 1; // select which handle to move bool bMoveSingleHandle : 1; @@ -414,7 +414,7 @@ class SVX_DLLPUBLIC SdrHdlList { protected: size_t mnFocusIndex; - SdrMarkView* pView; + SdrMarkView* const pView; std::deque<std::unique_ptr<SdrHdl>> maList; sal_uInt16 nHdlSize; @@ -487,20 +487,20 @@ private: // evtl. shear and rotation, equal to the object's one to allow adaption of // the visualization handles - double mfShearX; - double mfRotation; + double const mfShearX; + double const mfRotation; }; class SVX_DLLPUBLIC SdrCropViewHdl : public SdrHdl { private: - basegfx::B2DHomMatrix maObjectTransform; - Graphic maGraphic; - double mfCropLeft; - double mfCropTop; - double mfCropRight; - double mfCropBottom; + basegfx::B2DHomMatrix const maObjectTransform; + Graphic const maGraphic; + double const mfCropLeft; + double const mfCropTop; + double const mfCropRight; + double const mfCropBottom; public: SdrCropViewHdl( diff --git a/include/svx/svditer.hxx b/include/svx/svditer.hxx index e89efccf54c3..6dc84ef9f254 100644 --- a/include/svx/svditer.hxx +++ b/include/svx/svditer.hxx @@ -40,7 +40,7 @@ class SVX_DLLPUBLIC SdrObjListIter { std::vector< const SdrObject* > maObjList; size_t mnIndex; - bool mbReverse; + bool const mbReverse; bool mbUseZOrder; void ImpProcessObjectList(const SdrObjList& rSdrObjList, SdrIterMode eMode); diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx index cd8ad1384fb8..c3103b263467 100644 --- a/include/svx/svdlayer.hxx +++ b/include/svx/svdlayer.hxx @@ -68,7 +68,7 @@ class SVX_DLLPUBLIC SdrLayer bool mbLockedODF; // corresponds to ODF draw:protected SdrModel* pModel; // For broadcasting sal_uInt16 nType; // 0= userdefined, 1= default layer - SdrLayerID nID; + SdrLayerID const nID; SdrLayer(SdrLayerID nNewID, const OUString& rNewName); diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index a09682fa93a5..1cf73896c7b6 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -129,7 +129,7 @@ enum class SdrHintKind class SVX_DLLPUBLIC SdrHint: public SfxHint { private: - SdrHintKind meHint; + SdrHintKind const meHint; const SdrObject* mpObj; const SdrPage* mpPage; diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index fabf904b2da0..028ee80bb2b0 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -200,8 +200,8 @@ public: class SVX_DLLPUBLIC SdrObjUserData { protected: - SdrInventor nInventor; - sal_uInt16 nIdentifier; + SdrInventor const nInventor; + sal_uInt16 const nIdentifier; private: void operator=(const SdrObjUserData& rData) = delete; @@ -1045,8 +1045,8 @@ typedef std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr; struct SdrObjCreatorParams { - SdrInventor nInventor; - sal_uInt16 nObjIdentifier; + SdrInventor const nInventor; + sal_uInt16 const nObjIdentifier; SdrModel& rSdrModel; }; diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index 0d76d7e6dbab..815aa160b4b2 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -283,8 +283,8 @@ private: /// for the snap-to-grid in Writer class SdrPageGridFrame { - tools::Rectangle aPaper; - tools::Rectangle aUserArea; + tools::Rectangle const aPaper; + tools::Rectangle const aUserArea; public: SdrPageGridFrame(const tools::Rectangle& rPaper, const tools::Rectangle& rUser): aPaper(rPaper), aUserArea(rUser) {} const tools::Rectangle& GetPaperRect() const { return aPaper; } diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index f52276f27809..8af3d7710d04 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -167,7 +167,7 @@ protected: sal_uInt16 mnMinMovLog; // Hold an incarnation of Drawinglayer configuration options - SvtOptionsDrawinglayer maDrawinglayerOpt; + SvtOptionsDrawinglayer const maDrawinglayerOpt; bool mbPageVisible : 1; bool mbPageShadowVisible : 1; diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx index 7ddb2e18dbc5..644843347a32 100644 --- a/include/svx/svdtrans.hxx +++ b/include/svx/svdtrans.hxx @@ -278,8 +278,8 @@ class SVX_DLLPUBLIC SdrFormatter { long nDiv_; short nComma_; bool bDirty; - MapUnit eSrcMU; - MapUnit eDstMU; + MapUnit const eSrcMU; + MapUnit const eDstMU; private: SVX_DLLPRIVATE void Undirty(); public: diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx index 67d02218ef36..7a0d9b7f9041 100644 --- a/include/svx/svdundo.hxx +++ b/include/svx/svdundo.hxx @@ -184,7 +184,7 @@ public: class SVX_DLLPUBLIC SdrUndoMoveObj final : public SdrUndoObj { - Size aDistance; // Distance by which we move + Size const aDistance; // Distance by which we move public: SdrUndoMoveObj(SdrObject& rNewObj, const Size& rDist): SdrUndoObj(rNewObj),aDistance(rDist) {} @@ -369,8 +369,8 @@ public: class SdrUndoObjOrdNum final : public SdrUndoObj { - sal_uInt32 nOldOrdNum; - sal_uInt32 nNewOrdNum; + sal_uInt32 const nOldOrdNum; + sal_uInt32 const nNewOrdNum; public: SdrUndoObjOrdNum(SdrObject& rNewObj, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1); @@ -386,8 +386,8 @@ public: class SVX_DLLPUBLIC SdrUndoObjectLayerChange final : public SdrUndoObj { - SdrLayerID maOldLayer; - SdrLayerID maNewLayer; + SdrLayerID const maOldLayer; + SdrLayerID const maNewLayer; public: SdrUndoObjectLayerChange(SdrObject& rObj, SdrLayerID aOldLayer, SdrLayerID aNewLayer); @@ -405,7 +405,7 @@ protected: pNewText; bool bNewTextAvailable; bool bEmptyPresObj; - sal_Int32 mnText; + sal_Int32 const mnText; public: SdrUndoObjSetText(SdrObject& rNewObj, sal_Int32 nText ); @@ -467,9 +467,9 @@ private: class SdrUndoLayer : public SdrUndoAction { protected: - SdrLayer* pLayer; + SdrLayer* const pLayer; SdrLayerAdmin* pLayerAdmin; - sal_uInt16 nNum; + sal_uInt16 const nNum; bool bItsMine; protected: @@ -625,8 +625,8 @@ public: class SVX_DLLPUBLIC SdrUndoSetPageNum final : public SdrUndoPage { - sal_uInt16 nOldPageNum; - sal_uInt16 nNewPageNum; + sal_uInt16 const nOldPageNum; + sal_uInt16 const nNewPageNum; public: SdrUndoSetPageNum(SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1) @@ -651,8 +651,8 @@ public: class SdrUndoPageMasterPage : public SdrUndoPage { protected: - bool mbOldHadMasterPage; - SdrLayerIDSet maOldSet; + bool const mbOldHadMasterPage; + SdrLayerIDSet maOldSet; sal_uInt16 maOldMasterPageNumber; protected: diff --git a/include/svx/svxgrahicitem.hxx b/include/svx/svxgrahicitem.hxx index a4f5bcca2b1c..88b3bb1ea41a 100644 --- a/include/svx/svxgrahicitem.hxx +++ b/include/svx/svxgrahicitem.hxx @@ -27,7 +27,7 @@ class SVX_DLLPUBLIC SvxGraphicItem: public SfxPoolItem { - Graphic aGraphic; + Graphic const aGraphic; public: SvxGraphicItem( const Graphic& rGraphic); diff --git a/include/svx/tbxcolorupdate.hxx b/include/svx/tbxcolorupdate.hxx index 2de39549063f..2c3b61b8f386 100644 --- a/include/svx/tbxcolorupdate.hxx +++ b/include/svx/tbxcolorupdate.hxx @@ -53,8 +53,8 @@ namespace svx ToolboxButtonColorUpdater(ToolboxButtonColorUpdater &) = delete; void operator =(ToolboxButtonColorUpdater) = delete; - bool mbWideButton; - sal_uInt16 mnBtnId; + bool const mbWideButton; + sal_uInt16 const mnBtnId; VclPtr<ToolBox> mpTbx; Color maCurColor; tools::Rectangle maUpdRect; diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index 14f7f2b64cb7..60917bf7d893 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -850,7 +850,7 @@ protected: virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) override; private: - OUString referer_; + OUString const referer_; }; #endif diff --git a/include/svx/xmlexchg.hxx b/include/svx/xmlexchg.hxx index 6aade2cb58b1..371dd5a833e3 100644 --- a/include/svx/xmlexchg.hxx +++ b/include/svx/xmlexchg.hxx @@ -67,7 +67,7 @@ namespace svx virtual void AddSupportedFormats() override; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override; - OXFormsDescriptor m_aDescriptor; + OXFormsDescriptor const m_aDescriptor; public: diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx index 849e400e8889..8faf39def489 100644 --- a/include/svx/xtable.hxx +++ b/include/svx/xtable.hxx @@ -60,7 +60,7 @@ public: class SVX_DLLPUBLIC XLineEndEntry : public XPropertyEntry { private: - basegfx::B2DPolyPolygon aB2DPolyPolygon; + basegfx::B2DPolyPolygon const aB2DPolyPolygon; public: XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const OUString& rName); @@ -75,7 +75,7 @@ public: class SVX_DLLPUBLIC XDashEntry : public XPropertyEntry { private: - XDash aDash; + XDash const aDash; public: XDashEntry(const XDash& rDash, const OUString& rName); @@ -90,7 +90,7 @@ public: class SVX_DLLPUBLIC XHatchEntry : public XPropertyEntry { private: - XHatch aHatch; + XHatch const aHatch; public: XHatchEntry(const XHatch& rHatch, const OUString& rName); @@ -105,7 +105,7 @@ public: class SVX_DLLPUBLIC XGradientEntry : public XPropertyEntry { private: - XGradient aGradient; + XGradient const aGradient; public: XGradientEntry(const XGradient& rGradient, const OUString& rName); @@ -120,7 +120,7 @@ public: class SVX_DLLPUBLIC XBitmapEntry : public XPropertyEntry { private: - GraphicObject maGraphicObject; + GraphicObject const maGraphicObject; public: XBitmapEntry(const GraphicObject& rGraphicObject, const OUString& rName); @@ -157,10 +157,10 @@ class XGradientList ; typedef rtl::Reference< class XGradientList > XGradientLis class SVX_DLLPUBLIC XPropertyList : public cppu::OWeakObject { protected: - XPropertyListType meType; + XPropertyListType const meType; OUString maName; // not persistent OUString maPath; - OUString maReferer; + OUString const maReferer; std::vector< std::unique_ptr<XPropertyEntry> > maList; diff --git a/include/svx/zoomctrl.hxx b/include/svx/zoomctrl.hxx index 801add1951d6..afd3130e2c20 100644 --- a/include/svx/zoomctrl.hxx +++ b/include/svx/zoomctrl.hxx @@ -45,7 +45,7 @@ public: class SVX_DLLPUBLIC SvxZoomPageStatusBarControl : public SfxStatusBarControl { private: - Image maImage; + Image const maImage; public: virtual void Paint( const UserDrawEvent& rEvt ) override; virtual bool MouseButtonDown( const MouseEvent & rEvt ) override; diff --git a/svx/inc/dragmt3d.hxx b/svx/inc/dragmt3d.hxx index 2ac1274fbb96..01d9cd6d6469 100644 --- a/svx/inc/dragmt3d.hxx +++ b/svx/inc/dragmt3d.hxx @@ -57,7 +57,7 @@ class E3dDragMethod : public SdrDragMethod { protected: ::std::vector< E3dDragMethodUnit > maGrp; - E3dDragConstraint meConstraint; + E3dDragConstraint const meConstraint; Point maLastPos; tools::Rectangle maFullBound; bool mbMoveFull; diff --git a/svx/inc/palettes.hxx b/svx/inc/palettes.hxx index da0cdd24e9b2..028efad2b400 100644 --- a/svx/inc/palettes.hxx +++ b/svx/inc/palettes.hxx @@ -30,7 +30,7 @@ typedef std::vector< NamedColor > ColorList; class SVX_DLLPUBLIC PaletteASE : public Palette { bool mbValidPalette; - OUString maFPath; + OUString const maFPath; OUString maASEPaletteName; ColorList maColors; @@ -53,8 +53,8 @@ class SVX_DLLPUBLIC PaletteGPL : public Palette { bool mbLoadedPalette; bool mbValidPalette; - OUString maFName; - OUString maFPath; + OUString const maFName; + OUString const maFPath; OUString maGPLPaletteName; ColorList maColors; @@ -78,8 +78,8 @@ public: class SVX_DLLPUBLIC PaletteSOC : public Palette { bool mbLoadedPalette; - OUString maFPath; - OUString maSOCPaletteName; + OUString const maFPath; + OUString const maSOCPaletteName; XColorListRef mpColorList; public: PaletteSOC( const OUString &rFPath, const OUString &rFName ); diff --git a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx index 0021148bc56c..3fee4f3fce0a 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx @@ -131,7 +131,7 @@ public: class ViewContactOfGrid final : public ViewContactOfPageSubObject { - bool mbFront : 1; + bool const mbFront : 1; virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; @@ -145,7 +145,7 @@ public: class ViewContactOfHelplines final : public ViewContactOfPageSubObject { - bool mbFront : 1; + bool const mbFront : 1; virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; diff --git a/svx/inc/sdr/overlay/overlayhandle.hxx b/svx/inc/sdr/overlay/overlayhandle.hxx index ec7f89b47785..d6f50d8ae22f 100644 --- a/svx/inc/sdr/overlay/overlayhandle.hxx +++ b/svx/inc/sdr/overlay/overlayhandle.hxx @@ -19,8 +19,8 @@ namespace sdr { namespace overlay { class SVX_DLLPUBLIC OverlayHandle final : public OverlayObjectWithBasePosition { - basegfx::B2DSize maSize; - Color maStrokeColor; + basegfx::B2DSize const maSize; + Color const maStrokeColor; // geometry creation for OverlayObject virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; diff --git a/svx/inc/sdr/overlay/overlayhelpline.hxx b/svx/inc/sdr/overlay/overlayhelpline.hxx index 84077f10367d..b46712eae8cb 100644 --- a/svx/inc/sdr/overlay/overlayhelpline.hxx +++ b/svx/inc/sdr/overlay/overlayhelpline.hxx @@ -31,7 +31,7 @@ namespace sdr class OverlayHelplineStriped final : public OverlayObjectWithBasePosition { // remember HelpLineKind - SdrHelpLineKind meKind; + SdrHelpLineKind const meKind; // geometry creation for OverlayObject virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; diff --git a/svx/inc/sdr/overlay/overlayline.hxx b/svx/inc/sdr/overlay/overlayline.hxx index 33ec22c0e25d..c365f79d42eb 100644 --- a/svx/inc/sdr/overlay/overlayline.hxx +++ b/svx/inc/sdr/overlay/overlayline.hxx @@ -30,7 +30,7 @@ namespace sdr class OverlayLineStriped final : public OverlayObjectWithBasePosition { // second position in pixel - basegfx::B2DPoint maSecondPosition; + basegfx::B2DPoint const maSecondPosition; // geometry creation for OverlayObject virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; diff --git a/svx/inc/sdr/overlay/overlayrectangle.hxx b/svx/inc/sdr/overlay/overlayrectangle.hxx index f9de1178922e..0a169d456d99 100644 --- a/svx/inc/sdr/overlay/overlayrectangle.hxx +++ b/svx/inc/sdr/overlay/overlayrectangle.hxx @@ -31,14 +31,14 @@ namespace sdr class OverlayRectangle : public OverlayObjectWithBasePosition { // geometric definitions - basegfx::B2DPoint maSecondPosition; + basegfx::B2DPoint const maSecondPosition; const double mfTransparence; const double mfDiscreteGrow; const double mfDiscreteShrink; const double mfRotation; // #i53216# added CursorBlinkTime (in ms) - sal_uInt32 mnBlinkTime; + sal_uInt32 const mnBlinkTime; // Flag to remember which state to draw. Inited with false (0) bool mbOverlayState : 1; diff --git a/svx/inc/sdr/overlay/overlayrollingrectangle.hxx b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx index 7a18f1cb4b8f..d31ff48405c7 100644 --- a/svx/inc/sdr/overlay/overlayrollingrectangle.hxx +++ b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx @@ -33,10 +33,10 @@ namespace sdr basegfx::B2DPoint maSecondPosition; // Flag to switch on/off long lines to the OutputDevice bounds - bool mbExtendedLines : 1; + bool const mbExtendedLines : 1; // Flag to switch on/off the bounds itself - bool mbShowBounds : 1; + bool const mbShowBounds : 1; // geometry creation for OverlayObject virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; diff --git a/svx/inc/sdr/overlay/overlaytools.hxx b/svx/inc/sdr/overlay/overlaytools.hxx index ecc01bc72013..ed84a04b9dfc 100644 --- a/svx/inc/sdr/overlay/overlaytools.hxx +++ b/svx/inc/sdr/overlay/overlaytools.hxx @@ -29,16 +29,16 @@ namespace drawinglayer { namespace primitive2d { class OverlayStaticRectanglePrimitive : public DiscreteMetricDependentPrimitive2D { private: - basegfx::B2DPoint maPosition; - basegfx::B2DSize maSize; + basegfx::B2DPoint const maPosition; + basegfx::B2DSize const maSize; // the graphic definition - basegfx::BColor maStrokeColor; - basegfx::BColor maFillColor; - double mfTransparence; + basegfx::BColor const maStrokeColor; + basegfx::BColor const maFillColor; + double const mfTransparence; // the rotation of the primitive itself - double mfRotation; + double const mfRotation; protected: virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; @@ -72,19 +72,19 @@ namespace drawinglayer { private: // The BitmapEx to use, PixelSize is used - BitmapEx maBitmapEx; + BitmapEx const maBitmapEx; // The logic position - basegfx::B2DPoint maBasePosition; + basegfx::B2DPoint const maBasePosition; // The pixel inside the BitmapEx which is assocciated with // the target position (offset in the bitmap) - sal_uInt16 mnCenterX; - sal_uInt16 mnCenterY; + sal_uInt16 const mnCenterX; + sal_uInt16 const mnCenterY; // evtl. rotation and shear around center - double mfShearX; - double mfRotation; + double const mfShearX; + double const mfRotation; protected: virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; @@ -124,12 +124,12 @@ namespace drawinglayer { private: // The logic position - basegfx::B2DPoint maBasePosition; + basegfx::B2DPoint const maBasePosition; // The stripe colors and legth - basegfx::BColor maRGBColorA; - basegfx::BColor maRGBColorB; - double mfDiscreteDashLength; + basegfx::BColor const maRGBColorA; + basegfx::BColor const maRGBColorB; + double const mfDiscreteDashLength; protected: virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; @@ -166,18 +166,18 @@ namespace drawinglayer { private: // the logic rectangle definition - basegfx::B2DRange maObjectRange; + basegfx::B2DRange const maObjectRange; // the graphic definition - basegfx::BColor maColor; - double mfTransparence; + basegfx::BColor const maColor; + double const mfTransparence; // the discrete grow and shrink of the box - double mfDiscreteGrow; - double mfDiscreteShrink; + double const mfDiscreteGrow; + double const mfDiscreteShrink; // the rotation of the primitive itself - double mfRotation; + double const mfRotation; protected: virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; @@ -225,15 +225,15 @@ namespace drawinglayer { private: // The logic position - basegfx::B2DPoint maBasePosition; + basegfx::B2DPoint const maBasePosition; // the style - HelplineStyle meStyle; + HelplineStyle const meStyle; // The stripe colors and legth - basegfx::BColor maRGBColorA; - basegfx::BColor maRGBColorB; - double mfDiscreteDashLength; + basegfx::BColor const maRGBColorA; + basegfx::BColor const maRGBColorB; + double const mfDiscreteDashLength; protected: virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; @@ -273,12 +273,12 @@ namespace drawinglayer { private: // The logic range - basegfx::B2DRange maRollingRectangle; + basegfx::B2DRange const maRollingRectangle; // The stripe colors and legth - basegfx::BColor maRGBColorA; - basegfx::BColor maRGBColorB; - double mfDiscreteDashLength; + basegfx::BColor const maRGBColorA; + basegfx::BColor const maRGBColorB; + double const mfDiscreteDashLength; protected: virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; diff --git a/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx index a22cf0a5cc5d..fa9d2ae9f4c9 100644 --- a/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx @@ -36,11 +36,11 @@ namespace drawinglayer class SdrCaptionPrimitive2D : public BufferedDecompositionPrimitive2D { private: - ::basegfx::B2DHomMatrix maTransform; - attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; + ::basegfx::B2DHomMatrix const maTransform; + attribute::SdrLineFillShadowTextAttribute const maSdrLFSTAttribute; ::basegfx::B2DPolygon maTail; - double mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width - double mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height + double const mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width + double const mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height protected: // local decomposition. diff --git a/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx index 393520139ce9..dab0bce74560 100644 --- a/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx @@ -35,8 +35,8 @@ namespace drawinglayer class SdrConnectorPrimitive2D : public BufferedDecompositionPrimitive2D { private: - attribute::SdrLineShadowTextAttribute maSdrLSTAttribute; - ::basegfx::B2DPolygon maUnitPolygon; + attribute::SdrLineShadowTextAttribute const maSdrLSTAttribute; + ::basegfx::B2DPolygon const maUnitPolygon; protected: // local decomposition. diff --git a/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx index 1fe8b512bf4a..285185684f15 100644 --- a/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -35,17 +35,17 @@ namespace drawinglayer class SdrCustomShapePrimitive2D : public BufferedDecompositionPrimitive2D { private: - attribute::SdrShadowTextAttribute maSdrSTAttribute; - Primitive2DContainer maSubPrimitives; - basegfx::B2DHomMatrix maTextBox; + attribute::SdrShadowTextAttribute const maSdrSTAttribute; + Primitive2DContainer const maSubPrimitives; + basegfx::B2DHomMatrix const maTextBox; // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means // that the text needs to be block formatted - bool mbWordWrap : 1; + bool const mbWordWrap : 1; // defines that the object contains/is a 3D AutoShape. Needed for // making exceptions with shadow generation - bool mb3DShape : 1; + bool const mb3DShape : 1; protected: // local decomposition. diff --git a/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx index b1951b845fc9..837eda4361dd 100644 --- a/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx @@ -35,8 +35,8 @@ namespace drawinglayer class SdrEllipsePrimitive2D : public BufferedDecompositionPrimitive2D { private: - ::basegfx::B2DHomMatrix maTransform; - attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; + ::basegfx::B2DHomMatrix const maTransform; + attribute::SdrLineFillShadowTextAttribute const maSdrLFSTAttribute; protected: // local decomposition. @@ -68,11 +68,11 @@ namespace drawinglayer class SdrEllipseSegmentPrimitive2D : public SdrEllipsePrimitive2D { private: - double mfStartAngle; - double mfEndAngle; + double const mfStartAngle; + double const mfEndAngle; - bool mbCloseSegment : 1; - bool mbCloseUsingCenter : 1; + bool const mbCloseSegment : 1; + bool const mbCloseUsingCenter : 1; protected: // local decomposition. diff --git a/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx index 551089373e29..38d334604fba 100644 --- a/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx @@ -36,9 +36,9 @@ namespace drawinglayer class SdrGrafPrimitive2D : public BufferedDecompositionPrimitive2D { private: - ::basegfx::B2DHomMatrix maTransform; - attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; - GraphicObject maGraphicObject; + ::basegfx::B2DHomMatrix const maTransform; + attribute::SdrLineFillShadowTextAttribute const maSdrLFSTAttribute; + GraphicObject const maGraphicObject; GraphicAttr maGraphicAttr; protected: diff --git a/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx index f155f309cc7d..b28158895b2d 100644 --- a/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -48,20 +48,20 @@ namespace drawinglayer class SdrMeasurePrimitive2D : public BufferedDecompositionPrimitive2D { private: - attribute::SdrLineShadowTextAttribute maSdrLSTAttribute; - basegfx::B2DPoint maStart; - basegfx::B2DPoint maEnd; - MeasureTextPosition meHorizontal; - MeasureTextPosition meVertical; - double mfDistance; - double mfUpper; - double mfLower; - double mfLeftDelta; - double mfRightDelta; - - bool mbBelow : 1; - bool mbTextRotation : 1; - bool mbTextAutoAngle : 1; + attribute::SdrLineShadowTextAttribute const maSdrLSTAttribute; + basegfx::B2DPoint const maStart; + basegfx::B2DPoint const maEnd; + MeasureTextPosition const meHorizontal; + MeasureTextPosition const meVertical; + double const mfDistance; + double const mfUpper; + double const mfLower; + double const mfLeftDelta; + double const mfRightDelta; + + bool const mbBelow : 1; + bool const mbTextRotation : 1; + bool const mbTextAutoAngle : 1; // internal decomposition helper Primitive2DReference impCreatePart( diff --git a/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx b/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx index c6b22ffbbcf8..53eec99cb9e6 100644 --- a/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx @@ -35,9 +35,9 @@ namespace drawinglayer class SdrOle2Primitive2D : public BasePrimitive2D { private: - Primitive2DContainer maOLEContent; - basegfx::B2DHomMatrix maTransform; - attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; + Primitive2DContainer const maOLEContent; + basegfx::B2DHomMatrix const maTransform; + attribute::SdrLineFillShadowTextAttribute const maSdrLFSTAttribute; public: SdrOle2Primitive2D( diff --git a/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx index 98b74e69e6e3..b16a7fd1795f 100644 --- a/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx @@ -38,12 +38,12 @@ namespace drawinglayer { private: tools::WeakReference<SdrOle2Obj> mpSdrOle2Obj; - basegfx::B2DHomMatrix maObjectTransform; + basegfx::B2DHomMatrix const maObjectTransform; // #i104867# The GraphicVersion number to identify in operator== if // the graphic has changed, but without fetching it (which may // be expensive, e.g. triggering chart creation) - sal_uInt32 mnGraphicVersion; + sal_uInt32 const mnGraphicVersion; protected: // local decomposition. diff --git a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx index a9d86cb34481..732b5de30dec 100644 --- a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx @@ -36,9 +36,9 @@ namespace drawinglayer class SdrPathPrimitive2D : public BufferedDecompositionPrimitive2D { private: - basegfx::B2DHomMatrix maTransform; - attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; - basegfx::B2DPolyPolygon maUnitPolyPolygon; + basegfx::B2DHomMatrix const maTransform; + attribute::SdrLineFillShadowTextAttribute const maSdrLFSTAttribute; + basegfx::B2DPolyPolygon const maUnitPolyPolygon; // OperationSmiley: Added to be able to define a FillGeometry different from local // geometry. It is ignored when empty and/or equal to UnitPolyPolygon. @@ -49,7 +49,7 @@ namespace drawinglayer // 'same' is in quotes since it is a UnitPolygon, so being relative to the // unit polygon of the local geometry (UnitPolyPolygon). The definition is complete // when applying the also given transfomation (maTransform) - basegfx::B2DPolyPolygon maUnitDefinitionPolyPolygon; + basegfx::B2DPolyPolygon const maUnitDefinitionPolyPolygon; protected: // local decomposition. diff --git a/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx index 5b0896daae6d..ea8567acdf57 100644 --- a/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx @@ -35,13 +35,13 @@ namespace drawinglayer class SdrRectanglePrimitive2D : public BufferedDecompositionPrimitive2D { private: - basegfx::B2DHomMatrix maTransform; - attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; - double mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width - double mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height + basegfx::B2DHomMatrix const maTransform; + attribute::SdrLineFillShadowTextAttribute const maSdrLFSTAttribute; + double const mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width + double const mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height // flag which decides if the HitArea should be the filled geometry - bool mbForceFillForHitTest : 1; + bool const mbForceFillForHitTest : 1; protected: // local decomposition. diff --git a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx index 76327e5096ad..30f5ccb0f833 100644 --- a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -109,10 +109,10 @@ namespace drawinglayer { private: // unit contour polygon (scaled to [0.0 .. 1.0]) - basegfx::B2DPolyPolygon maUnitPolyPolygon; + basegfx::B2DPolyPolygon const maUnitPolyPolygon; // complete contour polygon transform (scale, rotate, shear, translate) - basegfx::B2DHomMatrix maObjectTransform; + basegfx::B2DHomMatrix const maObjectTransform; protected: // local decomposition. @@ -150,10 +150,10 @@ namespace drawinglayer { private: // the path to use. Each paragraph will use one Polygon. - basegfx::B2DPolyPolygon maPathPolyPolygon; + basegfx::B2DPolyPolygon const maPathPolyPolygon; // the Fontwork parameters - attribute::SdrFormTextAttribute maSdrFormTextAttribute; + attribute::SdrFormTextAttribute const maSdrFormTextAttribute; protected: // local decomposition. @@ -191,17 +191,17 @@ namespace drawinglayer { private: // text range transformation from unit range ([0.0 .. 1.0]) to text range - basegfx::B2DHomMatrix maTextRangeTransform; + basegfx::B2DHomMatrix const maTextRangeTransform; // text alignments - SdrTextHorzAdjust maSdrTextHorzAdjust; - SdrTextVertAdjust maSdrTextVertAdjust; + SdrTextHorzAdjust const maSdrTextHorzAdjust; + SdrTextVertAdjust const maSdrTextVertAdjust; - bool mbFixedCellHeight : 1; - bool mbUnlimitedPage : 1; // force layout with no text break - bool mbCellText : 1; // this is a cell text as block text - bool mbWordWrap : 1; // for CustomShapes text layout - bool mbClipOnBounds : 1; // for CustomShapes text layout + bool const mbFixedCellHeight : 1; + bool const mbUnlimitedPage : 1; // force layout with no text break + bool const mbCellText : 1; // this is a cell text as block text + bool const mbWordWrap : 1; // for CustomShapes text layout + bool const mbClipOnBounds : 1; // for CustomShapes text layout protected: // local decomposition. @@ -251,9 +251,9 @@ namespace drawinglayer { private: // text range transformation from unit range ([0.0 .. 1.0]) to text range - basegfx::B2DHomMatrix maTextRangeTransform; + basegfx::B2DHomMatrix const maTextRangeTransform; - bool mbFixedCellHeight : 1; + bool const mbFixedCellHeight : 1; protected: // local decomposition. @@ -290,9 +290,9 @@ namespace drawinglayer class SdrAutoFitTextPrimitive2D : public SdrTextPrimitive2D { private: - ::basegfx::B2DHomMatrix maTextRangeTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range + ::basegfx::B2DHomMatrix const maTextRangeTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range - bool mbWordWrap : 1; // for CustomShapes text layout + bool const mbWordWrap : 1; // for CustomShapes text layout protected: // local decomposition. @@ -330,7 +330,7 @@ namespace drawinglayer private: // XXX: might have position of overflowing text - ::basegfx::B2DHomMatrix maTextRangeTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range + ::basegfx::B2DHomMatrix const maTextRangeTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range protected: // local decomposition. virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx index 425d2a551058..49831dd45aaf 100644 --- a/svx/inc/xpolyimp.hxx +++ b/svx/inc/xpolyimp.hxx @@ -35,7 +35,7 @@ public: Point* pOldPointAry; bool bDeleteOldPoints; sal_uInt16 nSize; - sal_uInt16 nResize; + sal_uInt16 const nResize; sal_uInt16 nPoints; ImpXPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize=16 ); 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" }, |