[Libreoffice-commits] core.git: compilerplugins/clang include/vcl include/xmloff include/xmlscript vcl/source xmloff/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Nov 23 07:18:15 UTC 2016


 compilerplugins/clang/unusedfields.cxx    |   13 +++-
 include/vcl/button.hxx                    |   72 ++++++++++++-----------
 include/vcl/dockwin.hxx                   |    1 
 include/vcl/field.hxx                     |   91 +++++++++++++++---------------
 include/vcl/graph.hxx                     |   16 ++---
 include/vcl/graphicfilter.hxx             |   32 ++++------
 include/vcl/idle.hxx                      |    1 
 include/vcl/longcurr.hxx                  |   32 +++++-----
 include/vcl/metric.hxx                    |    2 
 include/vcl/msgbox.hxx                    |    7 +-
 include/vcl/pdfwriter.hxx                 |    1 
 include/vcl/spinfld.hxx                   |   70 +++++++++++------------
 include/xmloff/XMLCharContext.hxx         |    2 
 include/xmloff/XMLEventsImportContext.hxx |    2 
 include/xmloff/XMLShapeStyleContext.hxx   |    4 -
 include/xmloff/controlpropertyhdl.hxx     |    1 
 include/xmloff/formlayerexport.hxx        |    1 
 include/xmloff/styleexp.hxx               |   10 ---
 include/xmloff/txtparae.hxx               |    5 -
 include/xmloff/xmlexp.hxx                 |    4 -
 include/xmlscript/xml_helper.hxx          |    6 -
 vcl/source/window/msgbox.cxx              |    4 -
 xmloff/source/text/txtparae.cxx           |    2 
 23 files changed, 189 insertions(+), 190 deletions(-)

New commits:
commit 29a9e97db65bcf5914aed9bf8cb8e8f38c3c5fc0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Nov 22 10:36:24 2016 +0200

    loplugin field-can-be-private in include/vcl..xmlscript
    
    Change-Id: Ia03f7cccb256d825daa4dc6f4c0598448e46e6cf
    Reviewed-on: https://gerrit.libreoffice.org/31069
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unusedfields.cxx b/compilerplugins/clang/unusedfields.cxx
index 1bf71cd..94a1cb6 100644
--- a/compilerplugins/clang/unusedfields.cxx
+++ b/compilerplugins/clang/unusedfields.cxx
@@ -106,7 +106,18 @@ private:
 MyFieldInfo UnusedFields::niceName(const FieldDecl* fieldDecl)
 {
     MyFieldInfo aInfo;
-    aInfo.parentClass = fieldDecl->getParent()->getQualifiedNameAsString();
+
+    const RecordDecl* recordDecl = fieldDecl->getParent();
+
+    if (const CXXRecordDecl* cxxRecordDecl = dyn_cast<CXXRecordDecl>(recordDecl))
+    {
+        if (cxxRecordDecl->getTemplateInstantiationPattern())
+            cxxRecordDecl = cxxRecordDecl->getTemplateInstantiationPattern();
+        aInfo.parentClass = cxxRecordDecl->getQualifiedNameAsString();
+    }
+    else
+        aInfo.parentClass = recordDecl->getQualifiedNameAsString();
+
     aInfo.fieldName = fieldDecl->getNameAsString();
     aInfo.fieldType = fieldDecl->getType().getAsString();
 
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 78df45e..d8588dc 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -114,47 +114,12 @@ enum class PushButtonDropdownStyle
 
 class VCL_DLLPUBLIC PushButton : public Button
 {
-protected:
-    SymbolType      meSymbol;
-    TriState        meState;
-    TriState        meSaveValue;
-    PushButtonDropdownStyle mnDDStyle;
-    bool            mbPressed;
-    bool            mbIsActive;
-
-    SAL_DLLPRIVATE void            ImplInitPushButtonData();
-    SAL_DLLPRIVATE static WinBits  ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
-    SAL_DLLPRIVATE void            ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
-    SAL_DLLPRIVATE void            ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags,
-                                                             const Rectangle& rRect, bool bMenuBtnSep);
-    SAL_DLLPRIVATE void            ImplDrawPushButton(vcl::RenderContext& rRenderContext);
-    using Button::ImplGetTextStyle;
-    SAL_DLLPRIVATE DrawTextFlags   ImplGetTextStyle( DrawFlags nDrawFlags ) const;
-    SAL_DLLPRIVATE bool            IsSymbol() const { return ( (meSymbol != SymbolType::DONTKNOW) && (meSymbol != SymbolType::IMAGE) ); }
-
-                                   PushButton( const PushButton & ) = delete;
-                                   PushButton& operator=( const PushButton & )
-                                       = delete;
-
-    SAL_DLLPRIVATE void            ImplInit( vcl::Window* pParent, WinBits nStyle );
-
-    using Control::ImplInitSettings;
-    using Window::ImplInit;
 public:
     SAL_DLLPRIVATE void            ImplSetDefButton( bool bSet );
     SAL_DLLPRIVATE void            ImplDrawPushButtonFrame(vcl::RenderContext& rRenderContext, Rectangle& rRect, DrawButtonFlags nStyle);
     SAL_DLLPRIVATE static bool     ImplHitTestPushButton(vcl::Window* pDev, const Point& rPos);
     SAL_DLLPRIVATE bool            ImplIsDefButton() const;
 
-protected:
-    explicit        PushButton( WindowType nType );
-
-    virtual void    FillLayoutData() const override;
-    virtual const vcl::Font&
-                    GetCanonicalFont( const StyleSettings& _rStyle ) const override;
-    virtual const Color&
-                    GetCanonicalTextColor( const StyleSettings& _rStyle ) const override;
-public:
     explicit        PushButton( vcl::Window* pParent, WinBits nStyle = 0 );
 
     virtual void    MouseButtonDown( const MouseEvent& rMEvt ) override;
@@ -198,6 +163,43 @@ public:
 
     virtual bool    set_property(const OString &rKey, const OString &rValue) override;
     virtual void    ShowFocus(const Rectangle& rRect) override;
+
+protected:
+    PushButtonDropdownStyle mnDDStyle;
+    bool            mbIsActive;
+
+    SAL_DLLPRIVATE void            ImplInitPushButtonData();
+    SAL_DLLPRIVATE static WinBits  ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
+    SAL_DLLPRIVATE void            ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+    SAL_DLLPRIVATE void            ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags,
+                                                             const Rectangle& rRect, bool bMenuBtnSep);
+    SAL_DLLPRIVATE void            ImplDrawPushButton(vcl::RenderContext& rRenderContext);
+    using Button::ImplGetTextStyle;
+    SAL_DLLPRIVATE DrawTextFlags   ImplGetTextStyle( DrawFlags nDrawFlags ) const;
+    SAL_DLLPRIVATE bool            IsSymbol() const { return ( (meSymbol != SymbolType::DONTKNOW) && (meSymbol != SymbolType::IMAGE) ); }
+
+                                   PushButton( const PushButton & ) = delete;
+                                   PushButton& operator=( const PushButton & )
+                                       = delete;
+
+    SAL_DLLPRIVATE void            ImplInit( vcl::Window* pParent, WinBits nStyle );
+
+    using Control::ImplInitSettings;
+    using Window::ImplInit;
+
+    explicit        PushButton( WindowType nType );
+
+    virtual void    FillLayoutData() const override;
+    virtual const vcl::Font&
+                    GetCanonicalFont( const StyleSettings& _rStyle ) const override;
+    virtual const Color&
+                    GetCanonicalTextColor( const StyleSettings& _rStyle ) const override;
+
+private:
+    SymbolType      meSymbol;
+    TriState        meState;
+    TriState        meSaveValue;
+    bool            mbPressed;
 };
 
 inline void PushButton::Check( bool bCheck )
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 689c0f1..1a6910e 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -166,7 +166,6 @@ public:
 
 class VCL_DLLPUBLIC DockingManager
 {
-protected:
     ::std::vector<ImplDockingWindowWrapper *> mDockingWindows;
 
 public:
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 68c90d9..bca7e4e 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -122,38 +122,6 @@ public:
 
 class VCL_DLLPUBLIC NumericFormatter : public FormatterBase
 {
-private:
-    SAL_DLLPRIVATE void     ImplInit();
-
-protected:
-    sal_Int64               mnFieldValue;
-    sal_Int64               mnLastValue;
-    sal_Int64               mnMin;
-    sal_Int64               mnMax;
-    sal_uInt16              mnType;
-    sal_uInt16              mnDecimalDigits;
-    bool                    mbThousandSep;
-    bool                    mbShowTrailingZeros;
-    bool                    mbWrapOnLimits;
-
-    // the members below are used in all derivatives of NumericFormatter
-    // not in NumericFormatter itself.
-    sal_Int64               mnSpinSize;
-    sal_Int64               mnFirst;
-    sal_Int64               mnLast;
-
-protected:
-                            NumericFormatter();
-
-    void                    FieldUp();
-    void                    FieldDown();
-    void                    FieldFirst();
-    void                    FieldLast();
-
-    SAL_DLLPRIVATE bool ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, OUString& rOutStr );
-    SAL_DLLPRIVATE void     ImplNewFieldValue( sal_Int64 nNewValue );
-    SAL_DLLPRIVATE void     ImplSetUserValue( sal_Int64 nNewValue, Selection* pNewSelection = nullptr );
-
 public:
     virtual                 ~NumericFormatter() override;
 
@@ -191,26 +159,44 @@ public:
 
     sal_Int64               Normalize( sal_Int64 nValue ) const;
     sal_Int64               Denormalize( sal_Int64 nValue ) const;
-};
 
+protected:
+    sal_Int64               mnFieldValue;
+    sal_Int64               mnLastValue;
+    sal_Int64               mnMin;
+    sal_Int64               mnMax;
+    sal_uInt16              mnType;
+    bool                    mbWrapOnLimits;
+
+    // the members below are used in all derivatives of NumericFormatter
+    // not in NumericFormatter itself.
+    sal_Int64               mnSpinSize;
+    sal_Int64               mnFirst;
+    sal_Int64               mnLast;
+
+                            NumericFormatter();
+
+    void                    FieldUp();
+    void                    FieldDown();
+    void                    FieldFirst();
+    void                    FieldLast();
+
+    SAL_DLLPRIVATE bool     ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, OUString& rOutStr );
+    SAL_DLLPRIVATE void     ImplNewFieldValue( sal_Int64 nNewValue );
+    SAL_DLLPRIVATE void     ImplSetUserValue( sal_Int64 nNewValue, Selection* pNewSelection = nullptr );
 
-class VCL_DLLPUBLIC MetricFormatter : public NumericFormatter
-{
 private:
-    SAL_DLLPRIVATE  void    ImplInit();
+    SAL_DLLPRIVATE void     ImplInit();
 
-protected:
-    OUString                maCustomUnitText;
-    OUString                maCurUnitText;
-    sal_Int64               mnBaseValue;
-    FieldUnit               meUnit;
-    Link<MetricFormatter&,void> maCustomConvertLink;
+    sal_uInt16              mnDecimalDigits;
+    bool                    mbThousandSep;
+    bool                    mbShowTrailingZeros;
 
-protected:
-                            MetricFormatter();
+};
 
-    SAL_DLLPRIVATE bool     ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr );
 
+class VCL_DLLPUBLIC MetricFormatter : public NumericFormatter
+{
 public:
     virtual                 ~MetricFormatter() override;
 
@@ -244,6 +230,21 @@ public:
     sal_Int64               GetCorrectedValue( FieldUnit eOutUnit ) const;
 
     void                    SetCustomConvertHdl( const Link<MetricFormatter&,void>& rLink ) { maCustomConvertLink = rLink; }
+
+protected:
+    sal_Int64               mnBaseValue;
+    FieldUnit               meUnit;
+    Link<MetricFormatter&,void> maCustomConvertLink;
+
+                            MetricFormatter();
+
+    SAL_DLLPRIVATE bool     ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr );
+
+private:
+    SAL_DLLPRIVATE  void    ImplInit();
+
+    OUString                maCustomUnitText;
+    OUString                maCurUnitText;
 };
 
 
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 31df428..f75b843 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -52,16 +52,7 @@ class ReaderData;
 
 class VCL_DLLPUBLIC GraphicReader
 {
-protected:
-
-    OUString        maUpperName;
-    ReaderData*     mpReaderData;
-
-                    GraphicReader() :
-                        mpReaderData( nullptr ) {}
-
 public:
-
     virtual         ~GraphicReader();
 
     const OUString& GetUpperFilterName() const { return maUpperName; }
@@ -71,6 +62,13 @@ public:
     void            DisablePreviewMode();
     void            SetPreviewSize( const Size& );
     Size            GetPreviewSize() const;
+
+protected:
+    OUString        maUpperName;
+
+                    GraphicReader() : mpReaderData( nullptr ) {}
+private:
+    ReaderData*     mpReaderData;
 };
 
 class VCL_DLLPUBLIC GraphicConversionParameters
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index f591e2e..c0bbb3d 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -226,24 +226,7 @@ struct FilterErrorEx
 /** Class to import and export graphic formats. */
 class VCL_DLLPUBLIC GraphicFilter
 {
-private:
-
-    void            ImplInit();
-    sal_uLong           ImplSetError( sal_uLong nError, const SvStream* pStm = nullptr );
-    sal_uInt16      ImpTestOrFindFormat( const OUString& rPath, SvStream& rStream, sal_uInt16& rFormat );
-
-                    DECL_LINK( FilterCallback, ConvertData&, bool );
-
-protected:
-
-    OUString       aFilterPath;
-    FilterConfigCache*  pConfig;
-    FilterErrorEx*      pErrorEx;
-    bool            bUseConfig;
-    long                nExpGraphHint;
-
 public:
-
                     GraphicFilter( bool bUseConfig = true );
                     ~GraphicFilter();
 
@@ -314,6 +297,21 @@ public:
                      sal_uInt16* pDeterminedFormat = nullptr );
 
     sal_uInt16 compressAsPNG(const Graphic& rGraphic, SvStream& rOutputStream);
+
+protected:
+    OUString        aFilterPath;
+    FilterConfigCache*  pConfig;
+
+private:
+    void            ImplInit();
+    sal_uLong       ImplSetError( sal_uLong nError, const SvStream* pStm = nullptr );
+    sal_uInt16      ImpTestOrFindFormat( const OUString& rPath, SvStream& rStream, sal_uInt16& rFormat );
+
+                    DECL_LINK( FilterCallback, ConvertData&, bool );
+
+    FilterErrorEx*      pErrorEx;
+    bool                bUseConfig;
+    long                nExpGraphHint;
 };
 
 #endif // INCLUDED_VCL_GRAPHICFILTER_HXX
diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index 5460d33..5585d99 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -25,7 +25,6 @@
 
 class VCL_DLLPUBLIC Idle : public Scheduler
 {
-protected:
     Link<Idle *, void> maIdleHdl;          // Callback Link
 
 public:
diff --git a/include/vcl/longcurr.hxx b/include/vcl/longcurr.hxx
index 8107abe..3bc36f3 100644
--- a/include/vcl/longcurr.hxx
+++ b/include/vcl/longcurr.hxx
@@ -29,21 +29,6 @@ class LocaleDataWrapper;
 
 class VCL_DLLPUBLIC LongCurrencyFormatter : public FormatterBase
 {
-private:
-    friend bool ImplLongCurrencyReformat( const OUString&, BigInt const &, BigInt const &, sal_uInt16, const LocaleDataWrapper&, OUString&, LongCurrencyFormatter& );
-    SAL_DLLPRIVATE void        ImpInit();
-
-protected:
-    BigInt                  mnFieldValue;
-    BigInt                  mnLastValue;
-    BigInt                  mnMin;
-    BigInt                  mnMax;
-    BigInt                  mnCorrectedValue;
-    OUString                maCurrencySymbol;
-    sal_uInt16              mnDecimalDigits;
-    bool                    mbThousandSep;
-
-                            LongCurrencyFormatter();
 public:
                             virtual ~LongCurrencyFormatter() override;
 
@@ -66,6 +51,23 @@ public:
     void                    SetValue(const BigInt& rNewValue);
     void                    SetUserValue( BigInt nNewValue );
     BigInt                  GetValue() const;
+
+protected:
+    BigInt                  mnLastValue;
+    BigInt                  mnMin;
+    BigInt                  mnMax;
+
+                            LongCurrencyFormatter();
+private:
+    friend bool ImplLongCurrencyReformat( const OUString&, BigInt const &, BigInt const &, sal_uInt16, const LocaleDataWrapper&, OUString&, LongCurrencyFormatter& );
+    SAL_DLLPRIVATE void        ImpInit();
+
+    BigInt                  mnFieldValue;
+    BigInt                  mnCorrectedValue;
+    OUString                maCurrencySymbol;
+    sal_uInt16              mnDecimalDigits;
+    bool                    mbThousandSep;
+
 };
 
 
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index 0c96e0b..22c2849 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -69,7 +69,7 @@ public:
     bool                operator==( const FontMetric& rMetric ) const;
     bool                operator!=( const FontMetric& rMetric ) const
                             { return !operator==( rMetric ); }
-protected:
+private:
     tools::SvRef<ImplFontMetric> mxImplMetric;    // Implementation
 };
 
diff --git a/include/vcl/msgbox.hxx b/include/vcl/msgbox.hxx
index 6ef4976..a76b88e 100644
--- a/include/vcl/msgbox.hxx
+++ b/include/vcl/msgbox.hxx
@@ -31,15 +31,16 @@ class CheckBox;
 
 class VCL_DLLPUBLIC MessBox : public ButtonDialog
 {
-protected:
     VclPtr<VclMultiLineEdit>   mpVCLMultiLineEdit;
     VclPtr<FixedImage>         mpFixedImage;
-    OUString                   maMessText;
     Image                      maImage;
     bool                       mbHelpBtn;
+    bool                       mbCheck;
+
+protected:
+    OUString                   maMessText;
     VclPtr<CheckBox>           mpCheckBox;
     OUString                   maCheckBoxText;
-    bool                       mbCheck;
 
     SAL_DLLPRIVATE void ImplInitButtons();
     SAL_DLLPRIVATE void ImplPosControls();
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 8db01f8..67eee15 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -226,7 +226,6 @@ public:
 
     struct VCL_DLLPUBLIC AnyWidget
     {
-    protected:
         WidgetType          Type;       // primitive RTTI
     public:
         OUString            Name;       // a distinct name to identify the control
diff --git a/include/vcl/spinfld.hxx b/include/vcl/spinfld.hxx
index 1630aa6..7d05f38 100644
--- a/include/vcl/spinfld.hxx
+++ b/include/vcl/spinfld.hxx
@@ -28,41 +28,6 @@
 
 class VCL_DLLPUBLIC SpinField : public Edit
 {
-protected:
-    VclPtr<Edit>    mpEdit;
-    AutoTimer       maRepeatTimer;
-    Rectangle       maUpperRect;
-    Rectangle       maLowerRect;
-    Rectangle       maDropDownRect; // noch nicht angebunden...
-    Link<SpinField&,void>  maUpHdlLink;
-    Link<SpinField&,void>  maDownHdlLink;
-    Link<SpinField&,void>  maFirstHdlLink;
-    Link<SpinField&,void>  maLastHdlLink;
-    bool            mbRepeat:1,
-                    mbSpin:1,
-                    mbInitialUp:1,
-                    mbInitialDown:1,
-                    mbNoSelect:1,
-                    mbUpperIn:1,
-                    mbLowerIn:1,
-                    mbInDropDown:1;
-
-    using Window::ImplInit;
-    SAL_DLLPRIVATE void   ImplInit( vcl::Window* pParent, WinBits nStyle );
-
-private:
-    DECL_DLLPRIVATE_LINK( ImplTimeout, Timer*, void );
-    SAL_DLLPRIVATE void   ImplInitSpinFieldData();
-    SAL_DLLPRIVATE void   ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rectangle& rDDArea, Rectangle& rSpinUpArea, Rectangle& rSpinDownArea );
-
-protected:
-    virtual bool    Notify( NotifyEvent& rNEvt ) override;
-
-    void            EndDropDown();
-
-    virtual void    FillLayoutData() const override;
-    Rectangle *     ImplFindPartRect( const Point& rPt );
-
 public:
     explicit        SpinField( vcl::Window* pParent, WinBits nWinStyle );
     virtual         ~SpinField() override;
@@ -97,6 +62,41 @@ public:
     virtual Size    CalcSize(sal_Int32 nChars) const override;
 
     virtual FactoryFunction GetUITestFactory() const override;
+
+protected:
+    Rectangle       maUpperRect;
+    Rectangle       maLowerRect;
+    Rectangle       maDropDownRect; // noch nicht angebunden...
+
+    using Window::ImplInit;
+    SAL_DLLPRIVATE void   ImplInit( vcl::Window* pParent, WinBits nStyle );
+
+    virtual bool    Notify( NotifyEvent& rNEvt ) override;
+
+    void            EndDropDown();
+
+    virtual void    FillLayoutData() const override;
+    Rectangle *     ImplFindPartRect( const Point& rPt );
+
+private:
+    DECL_DLLPRIVATE_LINK( ImplTimeout, Timer*, void );
+    SAL_DLLPRIVATE void   ImplInitSpinFieldData();
+    SAL_DLLPRIVATE void   ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rectangle& rDDArea, Rectangle& rSpinUpArea, Rectangle& rSpinDownArea );
+
+    VclPtr<Edit>    mpEdit;
+    AutoTimer       maRepeatTimer;
+    Link<SpinField&,void>  maUpHdlLink;
+    Link<SpinField&,void>  maDownHdlLink;
+    Link<SpinField&,void>  maFirstHdlLink;
+    Link<SpinField&,void>  maLastHdlLink;
+    bool            mbRepeat:1,
+                    mbSpin:1,
+                    mbInitialUp:1,
+                    mbInitialDown:1,
+                    mbNoSelect:1,
+                    mbUpperIn:1,
+                    mbLowerIn:1,
+                    mbInDropDown:1;
 };
 
 #endif // INCLUDED_VCL_SPINFLD_HXX
diff --git a/include/xmloff/XMLCharContext.hxx b/include/xmloff/XMLCharContext.hxx
index dd49c77..8735025 100644
--- a/include/xmloff/XMLCharContext.hxx
+++ b/include/xmloff/XMLCharContext.hxx
@@ -27,8 +27,8 @@ class XMLOFF_DLLPUBLIC XMLCharContext : public SvXMLImportContext
 {
     XMLCharContext(const XMLCharContext&) = delete;
     void operator =(const XMLCharContext&) = delete;
-protected:
     sal_Int16   m_nControl;
+protected:
     sal_uInt16  m_nCount;
     sal_Unicode m_c;
 public:
diff --git a/include/xmloff/XMLEventsImportContext.hxx b/include/xmloff/XMLEventsImportContext.hxx
index e2a3ec5..edbb27a 100644
--- a/include/xmloff/XMLEventsImportContext.hxx
+++ b/include/xmloff/XMLEventsImportContext.hxx
@@ -53,10 +53,10 @@ typedef ::std::vector< EventNameValuesPair > EventsVector;
  */
 class XMLOFF_DLLPUBLIC XMLEventsImportContext : public SvXMLImportContext
 {
-protected:
     // the event XNameReplace; may be empty
     css::uno::Reference<css::container::XNameReplace> xEvents;
 
+protected:
     // if no XNameReplace is given, use this vector to collect events
     EventsVector aCollectEvents;
 
diff --git a/include/xmloff/XMLShapeStyleContext.hxx b/include/xmloff/XMLShapeStyleContext.hxx
index 6907537..8163a9e 100644
--- a/include/xmloff/XMLShapeStyleContext.hxx
+++ b/include/xmloff/XMLShapeStyleContext.hxx
@@ -32,12 +32,12 @@ class SvXMLImport;
 
 class XMLOFF_DLLPUBLIC XMLShapeStyleContext: public XMLPropStyleContext
 {
-protected:
     OUString     m_sControlDataStyleName;
-    OUString     m_sListStyleName;
     bool         m_bIsNumRuleAlreadyConverted;
 
 protected:
+    OUString     m_sListStyleName;
+
     virtual void SetAttribute( sal_uInt16 nPrefixKey,
                                const OUString& rLocalName,
                                const OUString& rValue ) override;
diff --git a/include/xmloff/controlpropertyhdl.hxx b/include/xmloff/controlpropertyhdl.hxx
index e043b16..39d5f73 100644
--- a/include/xmloff/controlpropertyhdl.hxx
+++ b/include/xmloff/controlpropertyhdl.hxx
@@ -112,7 +112,6 @@ namespace xmloff
 
     class XMLOFF_DLLPUBLIC OControlPropertyHandlerFactory : public XMLPropertyHandlerFactory
     {
-    protected:
         mutable std::unique_ptr<XMLConstantsPropertyHandler>    m_pTextAlignHandler;
         mutable std::unique_ptr<OControlBorderHandler>          m_pControlBorderStyleHandler;
         mutable std::unique_ptr<OControlBorderHandler>          m_pControlBorderColorHandler;
diff --git a/include/xmloff/formlayerexport.hxx b/include/xmloff/formlayerexport.hxx
index cf03121..1b5e1cd 100644
--- a/include/xmloff/formlayerexport.hxx
+++ b/include/xmloff/formlayerexport.hxx
@@ -52,7 +52,6 @@ namespace xmloff
     class XMLOFF_DLLPUBLIC OFormLayerXMLExport
                 :public ::salhelper::SimpleReferenceObject
     {
-    protected:
         // impl class
         std::unique_ptr<OFormLayerXMLExport_Impl> m_pImpl;
 
diff --git a/include/xmloff/styleexp.hxx b/include/xmloff/styleexp.hxx
index f311175..5f21506 100644
--- a/include/xmloff/styleexp.hxx
+++ b/include/xmloff/styleexp.hxx
@@ -52,23 +52,17 @@ class SvXMLExport;
 class XMLOFF_DLLPUBLIC XMLStyleExport : public salhelper::SimpleReferenceObject
 {
     SvXMLExport& rExport;
-protected:
     const OUString sIsPhysical;
     const OUString sIsAutoUpdate;
     const OUString sFollowStyle;
     const OUString sNumberingStyleName;
     const OUString sOutlineLevel;
-
-    SvXMLExport& GetExport() { return rExport; }
-    const SvXMLExport& GetExport() const  { return rExport; }
-
-private:
-
     const OUString sPoolStyleName;
-
     SvXMLAutoStylePoolP *pAutoStylePool;
 
 protected:
+    SvXMLExport& GetExport() { return rExport; }
+    const SvXMLExport& GetExport() const  { return rExport; }
 
     bool exportStyle(
         const css::uno::Reference< css::style::XStyle > & rStyle,
diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 7855fde..070c392 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -121,7 +121,7 @@ public:
             bool& rPrevCharIsSpace,
             FieldmarkType& openFieldMark);
 
-protected:
+private:
 
     // Implement Title/Description Elements UI (#i73249#)
     const OUString sTitle;
@@ -141,7 +141,6 @@ protected:
     const OUString sFootnote;
     const OUString sFootnoteCounting;
     const OUString sFrame;
-    const OUString sFrameStyleName;
     const OUString sGraphicFilter;
     const OUString sGraphicRotation;
     const OUString sGraphicURL;
@@ -202,6 +201,8 @@ protected:
     const OUString sTextFieldEnd;
     const OUString sTextFieldStartEnd;
 
+protected:
+    const OUString sFrameStyleName;
     SinglePropertySetInfoCache aCharStyleNamesPropInfoCache;
 
     SvXMLAutoStylePoolP& GetAutoStylePool() { return rAutoStylePool; }
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index 1ee7ba6..29022f4 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -160,12 +160,8 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public ::cppu::WeakImplHelper6<
     SvXMLExportFlags  mnExportFlags;
     SvXMLErrorFlags   mnErrorFlags;
 
-public:
-
     const OUString               msWS;           // " "
 
-private:
-
     // Shapes in Writer cannot be named via context menu (#i51726#)
     SvtModuleOptions::EFactory meModelType;
     SAL_DLLPRIVATE void DetermineModelType_();
diff --git a/include/xmlscript/xml_helper.hxx b/include/xmlscript/xml_helper.hxx
index 22066af..59129f1 100644
--- a/include/xmlscript/xml_helper.hxx
+++ b/include/xmlscript/xml_helper.hxx
@@ -94,13 +94,13 @@ public:
         throw (css::uno::RuntimeException, std::exception) override;
 
 protected:
+    ::std::vector< css::uno::Reference<
+                      css::xml::sax::XAttributeList > > _subElems;
+private:
     OUString _name;
-
     ::std::vector< OUString > _attrNames;
     ::std::vector< OUString > _attrValues;
 
-    ::std::vector< css::uno::Reference<
-                      css::xml::sax::XAttributeList > > _subElems;
 };
 
 
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 2b0328f..ad1031d 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -131,9 +131,9 @@ void MessBox::ImplInitButtons()
 MessBox::MessBox( vcl::Window* pParent, WinBits nStyle,
                   const OUString& rTitle, const OUString& rMessage ) :
     ButtonDialog( WINDOW_MESSBOX ),
-    maMessText( rMessage ),
     mbHelpBtn( false ),
-    mbCheck( false )
+    mbCheck( false ),
+    maMessText( rMessage )
 {
     ImplInit( pParent, nStyle | WB_MOVEABLE | WB_HORZ | WB_CENTER );
     ImplInitButtons();
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index d25e527..8e515c4 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1188,7 +1188,6 @@ XMLTextParagraphExport::XMLTextParagraphExport(
     sFootnote("Footnote"),
     sFootnoteCounting("FootnoteCounting"),
     sFrame("Frame"),
-    sFrameStyleName("FrameStyleName"),
     sGraphicFilter("GraphicFilter"),
     sGraphicRotation("GraphicRotation"),
     sGraphicURL("GraphicURL"),
@@ -1248,6 +1247,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
     sTextFieldStart( "TextFieldStart"  ),
     sTextFieldEnd( "TextFieldEnd"  ),
     sTextFieldStartEnd( "TextFieldStartEnd"  ),
+    sFrameStyleName("FrameStyleName"),
     aCharStyleNamesPropInfoCache( sCharStyleNames )
 {
     rtl::Reference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TextPropMap::PARA, true ));


More information about the Libreoffice-commits mailing list