Kaydet (Commit) 565746cf authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constfields in sdext

Change-Id: Ief438d98b8117a7759282323e47c8b5283d6762a
Reviewed-on: https://gerrit.libreoffice.org/61552
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 283229f5
...@@ -33,11 +33,11 @@ ...@@ -33,11 +33,11 @@
struct GraphicSettings struct GraphicSettings
{ {
bool mbJPEGCompression; bool const mbJPEGCompression;
sal_Int32 mnJPEGQuality; sal_Int32 const mnJPEGQuality;
bool mbRemoveCropArea; bool mbRemoveCropArea;
sal_Int32 mnImageResolution; sal_Int32 const mnImageResolution;
bool mbEmbedLinkedGraphics; bool const mbEmbedLinkedGraphics;
GraphicSettings( bool bJPEGCompression, sal_Int32 nJPEGQuality, bool bRemoveCropArea, GraphicSettings( bool bJPEGCompression, sal_Int32 nJPEGQuality, bool bRemoveCropArea,
sal_Int32 nImageResolution, bool bEmbedLinkedGraphics ) sal_Int32 nImageResolution, bool bEmbedLinkedGraphics )
......
...@@ -67,9 +67,9 @@ private: ...@@ -67,9 +67,9 @@ private:
void InitDialog(); void InitDialog();
sal_Int64 mnSourceSize; sal_Int64 const mnSourceSize;
sal_Int64 mnDestSize; sal_Int64 const mnDestSize;
sal_Int64 mnApproxSize; sal_Int64 const mnApproxSize;
bool& mrbOpenNewDocument; bool& mrbOpenNewDocument;
const OUString& maSaveAsURL; const OUString& maSaveAsURL;
}; };
......
...@@ -36,7 +36,7 @@ static ::osl::Mutex& getHashMapMutex() ...@@ -36,7 +36,7 @@ static ::osl::Mutex& getHashMapMutex()
struct TokenTable struct TokenTable
{ {
const char* pS; const char* pS;
PPPOptimizerTokenEnum pE; PPPOptimizerTokenEnum const pE;
}; };
static const TokenTable pTokenTableArray[] = static const TokenTable pTokenTableArray[] =
......
...@@ -123,7 +123,7 @@ namespace pdfi ...@@ -123,7 +123,7 @@ namespace pdfi
public: public:
virtual void visitedBy( ElementTreeVisitor&, const std::list< std::unique_ptr<Element> >::const_iterator& ) override; virtual void visitedBy( ElementTreeVisitor&, const std::list< std::unique_ptr<Element> >::const_iterator& ) override;
OUString URI; OUString const URI;
}; };
struct GraphicalElement : public Element struct GraphicalElement : public Element
...@@ -235,7 +235,7 @@ namespace pdfi ...@@ -235,7 +235,7 @@ namespace pdfi
public: public:
virtual void visitedBy( ElementTreeVisitor&, const std::list< std::unique_ptr<Element> >::const_iterator& ) override; virtual void visitedBy( ElementTreeVisitor&, const std::list< std::unique_ptr<Element> >::const_iterator& ) override;
ImageId Image; ImageId const Image;
}; };
struct PageElement : public Element struct PageElement : public Element
...@@ -258,7 +258,7 @@ namespace pdfi ...@@ -258,7 +258,7 @@ namespace pdfi
void resolveFontStyles( PDFIProcessor const & rProc ); void resolveFontStyles( PDFIProcessor const & rProc );
void resolveUnderlines( PDFIProcessor const & rProc ); void resolveUnderlines( PDFIProcessor const & rProc );
sal_Int32 PageNumber; sal_Int32 const PageNumber;
ListElement Hyperlinks; // contains not yet realized links on this page ListElement Hyperlinks; // contains not yet realized links on this page
double TopMargin; double TopMargin;
double BottomMargin; double BottomMargin;
......
...@@ -214,10 +214,10 @@ namespace pdfi ...@@ -214,10 +214,10 @@ namespace pdfi
Element* getCurElement(){ return m_pCurElement; } Element* getCurElement(){ return m_pCurElement; }
private: private:
Element* m_pCurElement ; Element* const m_pCurElement ;
GraphicsContext m_rCurrentContext ; GraphicsContext m_rCurrentContext ;
double m_Width ; double const m_Width ;
double m_PrevSpaceWidth ; double const m_PrevSpaceWidth ;
OUString m_rGlyphs ; OUString m_rGlyphs ;
}; };
} }
......
...@@ -69,7 +69,7 @@ protected: ...@@ -69,7 +69,7 @@ protected:
struct PDFComment : public PDFEntry struct PDFComment : public PDFEntry
{ {
OString m_aComment; OString const m_aComment;
explicit PDFComment( const OString& rComment ) explicit PDFComment( const OString& rComment )
: PDFEntry(), m_aComment( rComment ) {} : PDFEntry(), m_aComment( rComment ) {}
...@@ -100,7 +100,7 @@ struct PDFName : public PDFValue ...@@ -100,7 +100,7 @@ struct PDFName : public PDFValue
struct PDFString : public PDFValue struct PDFString : public PDFValue
{ {
OString m_aString; OString const m_aString;
explicit PDFString( const OString& rString ) explicit PDFString( const OString& rString )
: PDFValue(), m_aString( rString ) {} : PDFValue(), m_aString( rString ) {}
...@@ -113,7 +113,7 @@ struct PDFString : public PDFValue ...@@ -113,7 +113,7 @@ struct PDFString : public PDFValue
struct PDFNumber : public PDFValue struct PDFNumber : public PDFValue
{ {
double m_fValue; double const m_fValue;
explicit PDFNumber( double fVal ) explicit PDFNumber( double fVal )
: PDFValue(), m_fValue( fVal ) {} : PDFValue(), m_fValue( fVal ) {}
...@@ -124,7 +124,7 @@ struct PDFNumber : public PDFValue ...@@ -124,7 +124,7 @@ struct PDFNumber : public PDFValue
struct PDFBool : public PDFValue struct PDFBool : public PDFValue
{ {
bool m_bValue; bool const m_bValue;
explicit PDFBool( bool bVal ) explicit PDFBool( bool bVal )
: PDFValue(), m_bValue( bVal ) {} : PDFValue(), m_bValue( bVal ) {}
...@@ -135,8 +135,8 @@ struct PDFBool : public PDFValue ...@@ -135,8 +135,8 @@ struct PDFBool : public PDFValue
struct PDFObjectRef : public PDFValue struct PDFObjectRef : public PDFValue
{ {
unsigned int m_nNumber; unsigned int const m_nNumber;
unsigned int m_nGeneration; unsigned int const m_nGeneration;
PDFObjectRef( unsigned int nNr, unsigned int nGen ) PDFObjectRef( unsigned int nNr, unsigned int nGen )
: PDFValue(), m_nNumber( nNr ), m_nGeneration( nGen ) {} : PDFValue(), m_nNumber( nNr ), m_nGeneration( nGen ) {}
...@@ -201,8 +201,8 @@ struct PDFDict : public PDFContainer ...@@ -201,8 +201,8 @@ struct PDFDict : public PDFContainer
struct PDFStream : public PDFEntry struct PDFStream : public PDFEntry
{ {
unsigned int m_nBeginOffset; unsigned int const m_nBeginOffset;
unsigned int m_nEndOffset; // offset of the byte after the stream unsigned int const m_nEndOffset; // offset of the byte after the stream
PDFDict* m_pDict; PDFDict* m_pDict;
PDFStream( unsigned int nBegin, unsigned int nEnd, PDFDict* pStreamDict ) PDFStream( unsigned int nBegin, unsigned int nEnd, PDFDict* pStreamDict )
...@@ -259,7 +259,7 @@ struct PDFObject : public PDFContainer ...@@ -259,7 +259,7 @@ struct PDFObject : public PDFContainer
PDFEntry* m_pObject; PDFEntry* m_pObject;
PDFStream* m_pStream; PDFStream* m_pStream;
unsigned int m_nNumber; unsigned int m_nNumber;
unsigned int m_nGeneration; unsigned int const m_nGeneration;
PDFObject( unsigned int nNr, unsigned int nGen ) PDFObject( unsigned int nNr, unsigned int nGen )
: m_pObject( nullptr ), m_pStream( nullptr ), m_nNumber( nNr ), m_nGeneration( nGen ) {} : m_pObject( nullptr ), m_pStream( nullptr ), m_nNumber( nNr ), m_nGeneration( nGen ) {}
......
...@@ -46,7 +46,7 @@ class PDFPasswordRequest: ...@@ -46,7 +46,7 @@ class PDFPasswordRequest:
{ {
private: private:
mutable osl::Mutex m_aMutex; mutable osl::Mutex m_aMutex;
uno::Any m_aRequest; uno::Any const m_aRequest;
OUString m_aPassword; OUString m_aPassword;
bool m_bSelected; bool m_bSelected;
......
...@@ -37,8 +37,8 @@ namespace pdfi ...@@ -37,8 +37,8 @@ namespace pdfi
{ {
struct AttrEntry struct AttrEntry
{ {
OUString m_aName; OUString const m_aName;
OUString m_aValue; OUString const m_aValue;
AttrEntry( const OUString& i_rName, const OUString& i_rValue ) AttrEntry( const OUString& i_rName, const OUString& i_rValue )
: m_aName( i_rName ), m_aValue( i_rValue ) {} : m_aName( i_rName ), m_aValue( i_rValue ) {}
......
...@@ -80,7 +80,7 @@ namespace ...@@ -80,7 +80,7 @@ namespace
{ {
const sal_Char* pAsciiServiceName; const sal_Char* pAsciiServiceName;
const sal_Char* pAsciiImplementationName; const sal_Char* pAsciiImplementationName;
ComponentFactory pFactory; ComponentFactory const pFactory;
ComponentDescription() ComponentDescription()
:pAsciiServiceName( nullptr ) :pAsciiServiceName( nullptr )
......
...@@ -37,9 +37,9 @@ namespace pdfi ...@@ -37,9 +37,9 @@ namespace pdfi
public: public:
struct Style struct Style
{ {
OString Name; OString const Name;
PropertyMap Properties; PropertyMap const Properties;
OUString Contents; OUString const Contents;
Element* ContainedElement; Element* ContainedElement;
std::vector< Style* > SubStyles; std::vector< Style* > SubStyles;
......
...@@ -81,7 +81,7 @@ namespace { ...@@ -81,7 +81,7 @@ namespace {
SharedBitmapDescriptor mpBottom; SharedBitmapDescriptor mpBottom;
SharedBitmapDescriptor mpBottomRight; SharedBitmapDescriptor mpBottomRight;
SharedBitmapDescriptor mpBottomCallout; SharedBitmapDescriptor mpBottomCallout;
SharedBitmapDescriptor mpEmpty; SharedBitmapDescriptor const mpEmpty;
PresenterTheme::SharedFontDescriptor mpFont; PresenterTheme::SharedFontDescriptor mpFont;
sal_Int32 mnFontXOffset; sal_Int32 mnFontXOffset;
sal_Int32 mnFontYOffset; sal_Int32 mnFontYOffset;
......
...@@ -117,7 +117,7 @@ namespace { ...@@ -117,7 +117,7 @@ namespace {
virtual void Execute() override; virtual void Execute() override;
virtual Any GetState() const override; virtual Any GetState() const override;
private: private:
bool mbOn; bool const mbOn;
rtl::Reference<PresenterController> mpPresenterController; rtl::Reference<PresenterController> mpPresenterController;
}; };
...@@ -130,7 +130,7 @@ namespace { ...@@ -130,7 +130,7 @@ namespace {
virtual void Execute() override; virtual void Execute() override;
virtual Any GetState() const override; virtual Any GetState() const override;
private: private:
bool mbOn; bool const mbOn;
rtl::Reference<PresenterController> mpPresenterController; rtl::Reference<PresenterController> mpPresenterController;
}; };
...@@ -143,7 +143,7 @@ namespace { ...@@ -143,7 +143,7 @@ namespace {
virtual void Execute() override; virtual void Execute() override;
virtual Any GetState() const override; virtual Any GetState() const override;
private: private:
bool mbOn; bool const mbOn;
rtl::Reference<PresenterController> mpPresenterController; rtl::Reference<PresenterController> mpPresenterController;
}; };
......
...@@ -157,7 +157,7 @@ protected: ...@@ -157,7 +157,7 @@ protected:
double mnThumbSize; double mnThumbSize;
double mnLineHeight; double mnLineHeight;
css::geometry::RealPoint2D maDragAnchor; css::geometry::RealPoint2D maDragAnchor;
::std::function<void (double)> maThumbMotionListener; ::std::function<void (double)> const maThumbMotionListener;
Area meButtonDownArea; Area meButtonDownArea;
Area meMouseMoveArea; Area meMouseMoveArea;
css::geometry::RealRectangle2D maBox[AreaCount]; css::geometry::RealRectangle2D maBox[AreaCount];
......
...@@ -35,8 +35,7 @@ PresenterSprite::PresenterSprite() ...@@ -35,8 +35,7 @@ PresenterSprite::PresenterSprite()
mxSprite(), mxSprite(),
maSize(0,0), maSize(0,0),
maLocation(0,0), maLocation(0,0),
mbIsVisible(false), mbIsVisible(false)
mnAlpha(1.0)
{ {
} }
...@@ -141,7 +140,7 @@ void PresenterSprite::ProvideSprite() ...@@ -141,7 +140,7 @@ void PresenterSprite::ProvideSprite()
uno::Sequence<double>(4), uno::Sequence<double>(4),
rendering::CompositeOperation::SOURCE) rendering::CompositeOperation::SOURCE)
); );
mxSprite->setAlpha(mnAlpha); mxSprite->setAlpha(1.0);
mxSprite->setPriority(0); mxSprite->setPriority(0);
if (mbIsVisible) if (mbIsVisible)
mxSprite->show(); mxSprite->show();
......
...@@ -63,7 +63,6 @@ private: ...@@ -63,7 +63,6 @@ private:
css::geometry::RealSize2D maSize; css::geometry::RealSize2D maSize;
css::geometry::RealPoint2D maLocation; css::geometry::RealPoint2D maLocation;
bool mbIsVisible; bool mbIsVisible;
double mnAlpha;
void ProvideSprite(); void ProvideSprite();
void DisposeSprite(); void DisposeSprite();
......
...@@ -154,17 +154,17 @@ private: ...@@ -154,17 +154,17 @@ private:
{ {
public: public:
Cell (const sal_Int32 nCharacterIndex, const sal_Int32 nCharacterCount, const double nCellWidth); Cell (const sal_Int32 nCharacterIndex, const sal_Int32 nCharacterCount, const double nCellWidth);
sal_Int32 mnCharacterIndex; sal_Int32 const mnCharacterIndex;
sal_Int32 mnCharacterCount; sal_Int32 const mnCharacterCount;
double mnCellWidth; double const mnCellWidth;
}; };
class Line class Line
{ {
public: public:
Line (const sal_Int32 nLineStartCharacterIndex, const sal_Int32 nLineEndCharacterIndex); Line (const sal_Int32 nLineStartCharacterIndex, const sal_Int32 nLineEndCharacterIndex);
sal_Int32 mnLineStartCharacterIndex; sal_Int32 const mnLineStartCharacterIndex;
sal_Int32 mnLineEndCharacterIndex; sal_Int32 const mnLineEndCharacterIndex;
sal_Int32 mnLineStartCellIndex; sal_Int32 mnLineStartCellIndex;
sal_Int32 mnLineEndCellIndex; sal_Int32 mnLineEndCellIndex;
css::uno::Reference<css::rendering::XTextLayout> mxLayoutedLine; css::uno::Reference<css::rendering::XTextLayout> mxLayoutedLine;
......
...@@ -224,7 +224,7 @@ public: ...@@ -224,7 +224,7 @@ public:
PresenterConfigurationAccess& rConfiguration, PresenterConfigurationAccess& rConfiguration,
ReadContext& rReadContext); ReadContext& rReadContext);
OUString msConfigurationNodeName; OUString const msConfigurationNodeName;
std::shared_ptr<Theme> mpParentTheme; std::shared_ptr<Theme> mpParentTheme;
SharedBitmapDescriptor mpBackground; SharedBitmapDescriptor mpBackground;
PaneStyleContainer maPaneStyles; PaneStyleContainer maPaneStyles;
......
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
const sal_Int64 nRepeatInterval, const sal_Int64 nRepeatInterval,
const sal_Int32 nTaskId); const sal_Int32 nTaskId);
PresenterTimer::Task maTask; PresenterTimer::Task const maTask;
TimeValue maDueTime; TimeValue maDueTime;
const sal_Int64 mnRepeatInterval; const sal_Int64 mnRepeatInterval;
const sal_Int32 mnTaskId; const sal_Int32 mnTaskId;
......
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