summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-25 16:11:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-26 12:44:44 +0200
commitdb04585533cc0f5971f6238c18ae7cadcf31d930 (patch)
tree0bf7c00a3baa1dadf3c836d13a4cc6d3b315e4e7 /sot
parent018687837648dfe1832ddabbd4cda183708d7fdc (diff)
loplugin:constmethod in basegfx,sot
Change-Id: I05d2cdefb7faf489ec29ba28dc5e3c28d08b9780 Reviewed-on: https://gerrit.libreoffice.org/43863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgcache.cxx2
-rw-r--r--sot/source/sdstor/stgcache.hxx8
-rw-r--r--sot/source/sdstor/stgdir.cxx2
-rw-r--r--sot/source/sdstor/stgdir.hxx2
-rw-r--r--sot/source/sdstor/stgio.cxx14
-rw-r--r--sot/source/sdstor/stgio.hxx2
-rw-r--r--sot/source/sdstor/stgstrms.hxx2
-rw-r--r--sot/source/sdstor/ucbstorage.cxx14
8 files changed, 23 insertions, 23 deletions
diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx
index 7dd4a73d7bb5..8387f0290765 100644
--- a/sot/source/sdstor/stgcache.cxx
+++ b/sot/source/sdstor/stgcache.cxx
@@ -416,7 +416,7 @@ void StgCache::MoveError( StorageBase const & r )
// Utility functions
-sal_Int32 StgCache::Page2Pos( sal_Int32 nPage )
+sal_Int32 StgCache::Page2Pos( sal_Int32 nPage ) const
{
if( nPage < 0 ) nPage = 0;
return( nPage * m_nPageSize ) + m_nPageSize;
diff --git a/sot/source/sdstor/stgcache.hxx b/sot/source/sdstor/stgcache.hxx
index 8698efd66b05..8c9cdb7cf315 100644
--- a/sot/source/sdstor/stgcache.hxx
+++ b/sot/source/sdstor/stgcache.hxx
@@ -60,7 +60,7 @@ protected:
SvStream* m_pStrm; // physical stream
bool m_bMyStream; // true: delete stream in dtor
bool m_bFile; // true: file stream
- sal_Int32 Page2Pos( sal_Int32 ); // page address --> file position
+ sal_Int32 Page2Pos( sal_Int32 ) const; // page address --> file position
public:
StgCache();
~StgCache();
@@ -73,7 +73,7 @@ public:
void SetStrm( SvStream*, bool );
void SetStrm( UCBStorageStream* );
bool Good() const { return m_nError == ERRCODE_NONE; }
- ErrCode GetError() { return m_nError; }
+ ErrCode GetError() const { return m_nError; }
void MoveError( StorageBase const & );
void SetError( ErrCode );
void ResetError();
@@ -108,9 +108,9 @@ public:
StgPage& operator=(const StgPage&) = delete;
static rtl::Reference< StgPage > Create( short nData, sal_Int32 nPage );
- sal_Int32 GetPage() { return mnPage; }
+ sal_Int32 GetPage() const { return mnPage; }
void* GetData() { return mpData.get(); }
- short GetSize() { return mnSize; }
+ short GetSize() const { return mnSize; }
public:
static bool IsPageGreater( const StgPage *pA, const StgPage *pB );
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 8c2a6d6be846..4852108cfb0c 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -290,7 +290,7 @@ void StgDirEntry::Close()
// Get the current stream size
-sal_Int32 StgDirEntry::GetSize()
+sal_Int32 StgDirEntry::GetSize() const
{
sal_Int32 n;
if( m_pTmpStrm )
diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx
index b4f1a763bf8b..7559d6882110 100644
--- a/sot/source/sdstor/stgdir.hxx
+++ b/sot/source/sdstor/stgdir.hxx
@@ -77,7 +77,7 @@ public:
void OpenStream( StgIo& ); // set up an appropriate stream
void Close();
- sal_Int32 GetSize();
+ sal_Int32 GetSize() const;
bool SetSize( sal_Int32 );
sal_Int32 Seek( sal_Int32 );
sal_Int32 Read( void*, sal_Int32 );
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index f00595aeda7e..fc7c5a9def55 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -122,7 +122,7 @@ void StgIo::SetupStreams()
// get the logical data page size
-short StgIo::GetDataPageSize()
+short StgIo::GetDataPageSize() const
{
return 1 << m_aHdr.GetDataPageSize();
}
@@ -166,10 +166,10 @@ class EasyFat
public:
EasyFat( StgIo & rIo, StgStrm *pFatStream, sal_Int32 nPSize );
- sal_Int32 GetPageSize() { return nPageSize; }
+ sal_Int32 GetPageSize() const { return nPageSize; }
FatError Mark( sal_Int32 nPage, sal_Int32 nCount, sal_Int32 nExpect );
- bool HasUnrefChains();
+ bool HasUnrefChains() const;
};
EasyFat::EasyFat( StgIo& rIo, StgStrm* pFatStream, sal_Int32 nPSize )
@@ -196,7 +196,7 @@ EasyFat::EasyFat( StgIo& rIo, StgStrm* pFatStream, sal_Int32 nPSize )
}
}
-bool EasyFat::HasUnrefChains()
+bool EasyFat::HasUnrefChains() const
{
for( sal_Int32 nPage = 0; nPage < nPages; nPage++ )
{
@@ -247,12 +247,12 @@ class Validator
FatError ValidateMasterFATs();
FatError ValidateDirectoryEntries();
- FatError FindUnrefedChains();
+ FatError FindUnrefedChains() const;
FatError MarkAll( StgDirEntry *pEntry );
public:
explicit Validator( StgIo &rIo );
- bool IsError() { return nError != FatError::Ok; }
+ bool IsError() const { return nError != FatError::Ok; }
};
Validator::Validator( StgIo &rIoP )
@@ -344,7 +344,7 @@ FatError Validator::ValidateDirectoryEntries()
return nErr;
}
-FatError Validator::FindUnrefedChains()
+FatError Validator::FindUnrefedChains() const
{
if( aSmallFat.HasUnrefChains() ||
aFat.HasUnrefChains() )
diff --git a/sot/source/sdstor/stgio.hxx b/sot/source/sdstor/stgio.hxx
index 3511ad10be44..d73db29cfb01 100644
--- a/sot/source/sdstor/stgio.hxx
+++ b/sot/source/sdstor/stgio.hxx
@@ -57,7 +57,7 @@ public:
StgDirStrm* m_pTOC; // TOC stream
StgDataStrm* m_pDataFAT; // small data FAT stream
StgDataStrm* m_pDataStrm; // small data stream
- short GetDataPageSize(); // get the logical data page size
+ short GetDataPageSize() const; // get the logical data page size
bool Load(); // load a storage file
bool Init(); // set up an empty file
bool CommitAll(); // commit everything (root commit)
diff --git a/sot/source/sdstor/stgstrms.hxx b/sot/source/sdstor/stgstrms.hxx
index c8432e212e49..45c9a71aa8a6 100644
--- a/sot/source/sdstor/stgstrms.hxx
+++ b/sot/source/sdstor/stgstrms.hxx
@@ -53,7 +53,7 @@ public:
sal_Int32 GetNextPage( sal_Int32 nPg );
sal_Int32 AllocPages( sal_Int32 nStart, sal_Int32 nPages );
bool FreePages( sal_Int32 nStart, bool bAll );
- sal_Int32 GetMaxPage() { return m_nMaxPage; }
+ sal_Int32 GetMaxPage() const { return m_nMaxPage; }
void SetLimit( sal_Int32 n ) { m_nLimit = n; }
};
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index ee92acc43a5c..6568d5c20f56 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -558,11 +558,11 @@ struct UCBStorageElement_Impl
}
::ucbhelper::Content* GetContent();
- bool IsModified();
- OUString GetContentType();
+ bool IsModified() const;
+ OUString GetContentType() const;
void SetContentType( const OUString& );
- OUString GetOriginalContentType();
- bool IsLoaded()
+ OUString GetOriginalContentType() const;
+ bool IsLoaded() const
{ return m_xStream.is() || m_xStorage.is(); }
};
@@ -576,7 +576,7 @@ struct UCBStorageElement_Impl
return nullptr;
}
-OUString UCBStorageElement_Impl::GetContentType()
+OUString UCBStorageElement_Impl::GetContentType() const
{
if ( m_xStream.is() )
return m_xStream->m_aContentType;
@@ -602,7 +602,7 @@ void UCBStorageElement_Impl::SetContentType( const OUString& rType )
}
}
-OUString UCBStorageElement_Impl::GetOriginalContentType()
+OUString UCBStorageElement_Impl::GetOriginalContentType() const
{
if ( m_xStream.is() )
return m_xStream->m_aOriginalContentType;
@@ -612,7 +612,7 @@ OUString UCBStorageElement_Impl::GetOriginalContentType()
return OUString();
}
-bool UCBStorageElement_Impl::IsModified()
+bool UCBStorageElement_Impl::IsModified() const
{
bool bModified = m_bIsRemoved || m_bIsInserted || m_aName != m_aOriginalName;
if ( bModified )