summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-08 13:31:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-09 10:05:02 +0200
commit565746cf861c407ae222b2284d8525b4e9a62d94 (patch)
treec8fd35b347ecb407346e3862e8033bc013048d10 /sdext
parent283229f5bc27ce23456b9cbd9aff75ff44707105 (diff)
loplugin:constfields in sdext
Change-Id: Ief438d98b8117a7759282323e47c8b5283d6762a Reviewed-on: https://gerrit.libreoffice.org/61552 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/minimizer/graphiccollector.hxx8
-rw-r--r--sdext/source/minimizer/informationdialog.hxx6
-rw-r--r--sdext/source/minimizer/pppoptimizertoken.cxx2
-rw-r--r--sdext/source/pdfimport/inc/genericelements.hxx6
-rw-r--r--sdext/source/pdfimport/inc/pdfiprocessor.hxx6
-rw-r--r--sdext/source/pdfimport/inc/pdfparse.hxx18
-rw-r--r--sdext/source/pdfimport/misc/pwdinteract.cxx2
-rw-r--r--sdext/source/pdfimport/sax/saxattrlist.hxx4
-rw-r--r--sdext/source/pdfimport/services.cxx2
-rw-r--r--sdext/source/pdfimport/tree/style.hxx6
-rw-r--r--sdext/source/presenter/PresenterPaneBorderPainter.cxx2
-rw-r--r--sdext/source/presenter/PresenterProtocolHandler.cxx6
-rw-r--r--sdext/source/presenter/PresenterScrollBar.hxx2
-rw-r--r--sdext/source/presenter/PresenterSprite.cxx5
-rw-r--r--sdext/source/presenter/PresenterSprite.hxx1
-rw-r--r--sdext/source/presenter/PresenterTextView.hxx10
-rw-r--r--sdext/source/presenter/PresenterTheme.cxx2
-rw-r--r--sdext/source/presenter/PresenterTimer.cxx2
18 files changed, 44 insertions, 46 deletions
diff --git a/sdext/source/minimizer/graphiccollector.hxx b/sdext/source/minimizer/graphiccollector.hxx
index f989a95ad39c..a83e272fe291 100644
--- a/sdext/source/minimizer/graphiccollector.hxx
+++ b/sdext/source/minimizer/graphiccollector.hxx
@@ -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 )
diff --git a/sdext/source/minimizer/informationdialog.hxx b/sdext/source/minimizer/informationdialog.hxx
index 9d0405b36531..7569d9c36fd7 100644
--- a/sdext/source/minimizer/informationdialog.hxx
+++ b/sdext/source/minimizer/informationdialog.hxx
@@ -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;
};
diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx
index 0551ba294a25..08784c34460d 100644
--- a/sdext/source/minimizer/pppoptimizertoken.cxx
+++ b/sdext/source/minimizer/pppoptimizertoken.cxx
@@ -36,7 +36,7 @@ static ::osl::Mutex& getHashMapMutex()
struct TokenTable
{
const char* pS;
- PPPOptimizerTokenEnum pE;
+ PPPOptimizerTokenEnum const pE;
};
static const TokenTable pTokenTableArray[] =
diff --git a/sdext/source/pdfimport/inc/genericelements.hxx b/sdext/source/pdfimport/inc/genericelements.hxx
index 416c02b36cc7..4c75053d97d7 100644
--- a/sdext/source/pdfimport/inc/genericelements.hxx
+++ b/sdext/source/pdfimport/inc/genericelements.hxx
@@ -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;
diff --git a/sdext/source/pdfimport/inc/pdfiprocessor.hxx b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
index 952944e3dc74..96a5a349367a 100644
--- a/sdext/source/pdfimport/inc/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
@@ -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 ;
};
}
diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx
index 0636ad412e63..e5d9dcc9bef0 100644
--- a/sdext/source/pdfimport/inc/pdfparse.hxx
+++ b/sdext/source/pdfimport/inc/pdfparse.hxx
@@ -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 ) {}
diff --git a/sdext/source/pdfimport/misc/pwdinteract.cxx b/sdext/source/pdfimport/misc/pwdinteract.cxx
index e3db5f93eefa..33edc7a3705e 100644
--- a/sdext/source/pdfimport/misc/pwdinteract.cxx
+++ b/sdext/source/pdfimport/misc/pwdinteract.cxx
@@ -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;
diff --git a/sdext/source/pdfimport/sax/saxattrlist.hxx b/sdext/source/pdfimport/sax/saxattrlist.hxx
index e26afcbc5237..13d86440d234 100644
--- a/sdext/source/pdfimport/sax/saxattrlist.hxx
+++ b/sdext/source/pdfimport/sax/saxattrlist.hxx
@@ -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 ) {}
diff --git a/sdext/source/pdfimport/services.cxx b/sdext/source/pdfimport/services.cxx
index 0fb5b62b16a6..055241102765 100644
--- a/sdext/source/pdfimport/services.cxx
+++ b/sdext/source/pdfimport/services.cxx
@@ -80,7 +80,7 @@ namespace
{
const sal_Char* pAsciiServiceName;
const sal_Char* pAsciiImplementationName;
- ComponentFactory pFactory;
+ ComponentFactory const pFactory;
ComponentDescription()
:pAsciiServiceName( nullptr )
diff --git a/sdext/source/pdfimport/tree/style.hxx b/sdext/source/pdfimport/tree/style.hxx
index 9dd360ea9965..332fdfb65c80 100644
--- a/sdext/source/pdfimport/tree/style.hxx
+++ b/sdext/source/pdfimport/tree/style.hxx
@@ -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;
diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.cxx b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
index 30e303337478..5fbad6e5a6e2 100644
--- a/sdext/source/presenter/PresenterPaneBorderPainter.cxx
+++ b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
@@ -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;
diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx
index b0c0f640870d..953a7821adf2 100644
--- a/sdext/source/presenter/PresenterProtocolHandler.cxx
+++ b/sdext/source/presenter/PresenterProtocolHandler.cxx
@@ -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;
};
diff --git a/sdext/source/presenter/PresenterScrollBar.hxx b/sdext/source/presenter/PresenterScrollBar.hxx
index 3e3da77afe14..a181753ee2f7 100644
--- a/sdext/source/presenter/PresenterScrollBar.hxx
+++ b/sdext/source/presenter/PresenterScrollBar.hxx
@@ -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];
diff --git a/sdext/source/presenter/PresenterSprite.cxx b/sdext/source/presenter/PresenterSprite.cxx
index d38fd58a8351..adbce1f0faff 100644
--- a/sdext/source/presenter/PresenterSprite.cxx
+++ b/sdext/source/presenter/PresenterSprite.cxx
@@ -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();
diff --git a/sdext/source/presenter/PresenterSprite.hxx b/sdext/source/presenter/PresenterSprite.hxx
index a2383e0de9f8..48d5667e6b33 100644
--- a/sdext/source/presenter/PresenterSprite.hxx
+++ b/sdext/source/presenter/PresenterSprite.hxx
@@ -63,7 +63,6 @@ private:
css::geometry::RealSize2D maSize;
css::geometry::RealPoint2D maLocation;
bool mbIsVisible;
- double mnAlpha;
void ProvideSprite();
void DisposeSprite();
diff --git a/sdext/source/presenter/PresenterTextView.hxx b/sdext/source/presenter/PresenterTextView.hxx
index 5c990c64e89e..86bc04652f91 100644
--- a/sdext/source/presenter/PresenterTextView.hxx
+++ b/sdext/source/presenter/PresenterTextView.hxx
@@ -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;
diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx
index a1a06d617d12..4650a7213c70 100644
--- a/sdext/source/presenter/PresenterTheme.cxx
+++ b/sdext/source/presenter/PresenterTheme.cxx
@@ -224,7 +224,7 @@ public:
PresenterConfigurationAccess& rConfiguration,
ReadContext& rReadContext);
- OUString msConfigurationNodeName;
+ OUString const msConfigurationNodeName;
std::shared_ptr<Theme> mpParentTheme;
SharedBitmapDescriptor mpBackground;
PaneStyleContainer maPaneStyles;
diff --git a/sdext/source/presenter/PresenterTimer.cxx b/sdext/source/presenter/PresenterTimer.cxx
index 0d0216ee2338..99a0eba3219e 100644
--- a/sdext/source/presenter/PresenterTimer.cxx
+++ b/sdext/source/presenter/PresenterTimer.cxx
@@ -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;