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