Kaydet (Commit) f7688928 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Ashod Nakashian

loplugin field-can-be-private in include/vcl..xmlscript

Reviewed-on: https://gerrit.libreoffice.org/31069Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 29a9e97d)
(cherry picked from commit 330dc55f)

Change-Id: Ia03f7cccb256d825daa4dc6f4c0598448e46e6cf
üst 77ce4e6b
......@@ -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();
......
......@@ -114,46 +114,12 @@ enum class PushButtonDropdownStyle
class VCL_DLLPUBLIC PushButton : public Button
{
protected:
SymbolType meSymbol;
TriState meState;
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;
......@@ -189,11 +155,51 @@ public:
void EndSelection();
void SaveValue() { meSaveValue = GetState(); }
bool IsValueChangedFromSaved() const { return meSaveValue != GetState(); }
Size CalcMinimumSize() const;
virtual Size GetOptimalSize() const override;
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 )
......
......@@ -166,7 +166,6 @@ public:
class VCL_DLLPUBLIC DockingManager
{
protected:
::std::vector<ImplDockingWindowWrapper *> mDockingWindows;
public:
......
......@@ -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;
};
......
......@@ -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
......
......@@ -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
......
......@@ -25,7 +25,6 @@
class VCL_DLLPUBLIC Idle : public Scheduler
{
protected:
Link<Idle *, void> maIdleHdl; // Callback Link
public:
......
......@@ -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;
};
......
......@@ -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
};
......
......@@ -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();
......
......@@ -226,7 +226,6 @@ public:
struct VCL_DLLPUBLIC AnyWidget
{
protected:
WidgetType Type; // primitive RTTI
public:
OUString Name; // a distinct name to identify the control
......
......@@ -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
......
......@@ -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:
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -52,7 +52,6 @@ namespace xmloff
class XMLOFF_DLLPUBLIC OFormLayerXMLExport
:public ::salhelper::SimpleReferenceObject
{
protected:
// impl class
std::unique_ptr<OFormLayerXMLExport_Impl> m_pImpl;
......
......@@ -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,
......
......@@ -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; }
......
......@@ -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_();
......
......@@ -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;
};
......
......@@ -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();
......
......@@ -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 ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment