summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-08 10:29:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-09 08:10:24 +0200
commit1de7e818a417a412678013c100b4bf73fd8858ac (patch)
treeab960efb3e261fbc0672df162bae1f1225fd4455
parent56940b766e5d52cb1c17b4250e4c7e2c375b7b65 (diff)
loplugin:constfields in smoketest..sot
Change-Id: I59ceda8ff85cc7b348882a6e1c62491b74297801 Reviewed-on: https://gerrit.libreoffice.org/61549 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--smoketest/smoketest.cxx4
-rw-r--r--soltools/cpp/_eval.c6
-rw-r--r--soltools/cpp/_lex.c2
-rw-r--r--soltools/cpp/_nlist.c6
-rw-r--r--sot/inc/sysformats.hxx8
-rw-r--r--sot/source/base/formats.cxx2
-rw-r--r--sot/source/sdstor/stgcache.hxx2
-rw-r--r--sot/source/sdstor/ucbstorage.cxx10
8 files changed, 20 insertions, 20 deletions
diff --git a/smoketest/smoketest.cxx b/smoketest/smoketest.cxx
index b463218ae9fb..69913b1fcde8 100644
--- a/smoketest/smoketest.cxx
+++ b/smoketest/smoketest.cxx
@@ -106,8 +106,8 @@ private:
{ dispatch_->dispatchWithNotification(url_, arguments_, listener_); }
css::uno::Reference< css::frame::XNotifyingDispatch > dispatch_;
- css::util::URL url_;
- css::uno::Sequence< css::beans::PropertyValue > arguments_;
+ css::util::URL const url_;
+ css::uno::Sequence< css::beans::PropertyValue > const arguments_;
css::uno::Reference< css::frame::XDispatchResultListener > listener_;
};
diff --git a/soltools/cpp/_eval.c b/soltools/cpp/_eval.c
index 48526b76e94b..aabf212a8c31 100644
--- a/soltools/cpp/_eval.c
+++ b/soltools/cpp/_eval.c
@@ -43,9 +43,9 @@ struct value
/* operator priority, arity, and conversion type, indexed by tokentype */
struct pri
{
- char pri;
- char arity;
- char ctype;
+ char const pri;
+ char const arity;
+ char const ctype;
};
static struct pri priority[] =
diff --git a/soltools/cpp/_lex.c b/soltools/cpp/_lex.c
index 70c808b87187..466a16078d9d 100644
--- a/soltools/cpp/_lex.c
+++ b/soltools/cpp/_lex.c
@@ -68,7 +68,7 @@ struct fsm
{
int state; /* if in this state */
uchar ch[4]; /* and see one of these characters */
- int nextstate; /* enter this state if +ve */
+ int const nextstate; /* enter this state if +ve */
};
static /*const*/ struct fsm fsm[] = {
diff --git a/soltools/cpp/_nlist.c b/soltools/cpp/_nlist.c
index 20118f363b83..b365cba5d7b3 100644
--- a/soltools/cpp/_nlist.c
+++ b/soltools/cpp/_nlist.c
@@ -38,9 +38,9 @@ static Nlist *nlist[NLSIZE];
struct kwtab
{
- char *kw;
- int val;
- int flag;
+ char * const kw;
+ int const val;
+ int const flag;
};
static struct kwtab kwtab[] =
diff --git a/sot/inc/sysformats.hxx b/sot/inc/sysformats.hxx
index c04f8bb8be95..38276e7e4f9c 100644
--- a/sot/inc/sysformats.hxx
+++ b/sot/inc/sysformats.hxx
@@ -28,10 +28,10 @@
struct SotAction_Impl
{
- SotClipboardFormatId nFormatId; // Clipboard Id
- sal_uInt16 nAction; // Action Id
- SotExchangeActionFlags nFlags; // Action Id
- sal_uInt8 nContextCheckId; // additional check of content in clipboard
+ SotClipboardFormatId const nFormatId; // Clipboard Id
+ sal_uInt16 const nAction; // Action Id
+ SotExchangeActionFlags const nFlags; // Action Id
+ sal_uInt8 const nContextCheckId; // additional check of content in clipboard
constexpr SotAction_Impl(SotClipboardFormatId _nFormatId, sal_uInt16 _nAction, SotExchangeActionFlags _nFlags, sal_uInt8 _nContextCheckId)
: nFormatId(_nFormatId), nAction(_nAction), nFlags(_nFlags), nContextCheckId(_nContextCheckId) {}
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index 243bc911ddaa..47fba4010095 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star::datatransfer;
struct SotDestinationEntry_Impl
{
- SotExchangeDest nDestination;
+ SotExchangeDest const nDestination;
const SotAction_Impl* aDefaultActions;
const SotAction_Impl* aMoveActions;
const SotAction_Impl* aCopyActions;
diff --git a/sot/source/sdstor/stgcache.hxx b/sot/source/sdstor/stgcache.hxx
index f0bd2e1d25a3..b7cd8e4d25f0 100644
--- a/sot/source/sdstor/stgcache.hxx
+++ b/sot/source/sdstor/stgcache.hxx
@@ -100,7 +100,7 @@ class StgPage : public salhelper::SimpleReferenceObject
const sal_Int32 mnPage; // page index
std::unique_ptr<sal_uInt8[]>
mpData; // nSize bytes
- short mnSize; // size of this page
+ short const mnSize; // size of this page
StgPage( short nData, sal_Int32 nPage );
virtual ~StgPage() override;
public:
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 23eeca1d531c..c5c8c13fb088 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -405,7 +405,7 @@ public:
OUString m_aURL; // the full path name to create the content
OUString m_aContentType;
OUString m_aOriginalContentType;
- OString m_aKey;
+ OString const m_aKey;
::ucbhelper::Content* m_pContent; // the content that provides the data
Reference<XInputStream> m_rSource; // the stream covering the original data of the content
std::unique_ptr<SvStream> m_pStream; // the stream worked on; for readonly streams it is the original stream of the content
@@ -416,7 +416,7 @@ public:
bool m_bSourceRead; // Source still contains useful information
bool m_bModified; // only modified streams will be sent to the original content
bool m_bCommited; // sending the streams is coordinated by the root storage of the package
- bool m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
+ bool const m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
// this means that the root storage does an autocommit when its external
// reference is destroyed
bool m_bIsOLEStorage;// an OLEStorage on a UCBStorageStream makes this an Autocommit-stream
@@ -466,7 +466,7 @@ public:
ErrCode m_nError;
StreamMode m_nMode; // open mode ( read/write/trunc/nocreate/sharing )
bool m_bCommited; // sending the streams is coordinated by the root storage of the package
- bool m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
+ bool const m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
// this means that the root storage does an autocommit when its external
// reference is destroyed
bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts
@@ -478,7 +478,7 @@ public:
UCBStorageElementList_Impl m_aChildrenList;
- bool m_bRepairPackage;
+ bool const m_bRepairPackage;
Reference< XProgressHandler > m_xProgressHandler;
UCBStorage_Impl( const ::ucbhelper::Content&, const OUString&, StreamMode, UCBStorage*, bool,
@@ -529,7 +529,7 @@ struct UCBStorageElement_Impl
{
OUString m_aName; // the actual URL relative to the root "folder"
OUString m_aOriginalName;// the original name in the content
- sal_uLong m_nSize;
+ sal_uLong const m_nSize;
bool m_bIsFolder; // Only true when it is a UCBStorage !
bool m_bIsStorage; // Also true when it is an OLEStorage !
bool m_bIsRemoved; // element will be removed on commit