summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-05-03 13:24:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-05-03 13:25:16 +0100
commit6577e56a9cfd946d7382c87995d35b8c47776698 (patch)
tree285130aa16b6f1f05fc60197c075d79933ae76bc /sot
parentdb649c52911fd5b030a7e4e0c941d7ee75b98785 (diff)
const up methods that don't change any state
Change-Id: I844cefad718e5b37dac5657674294a0873b8a8e5
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgstrms.cxx2
-rw-r--r--sot/source/sdstor/stgstrms.hxx18
2 files changed, 10 insertions, 10 deletions
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 24c442212a76..9f412ed17ed4 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -465,7 +465,7 @@ sal_Bool StgStrm::SetSize( sal_Int32 nBytes )
// Return the # of allocated pages
-sal_Int32 StgStrm::GetPages()
+sal_Int32 StgStrm::GetPages() const
{
return ( nSize + nPageSize - 1 ) / nPageSize;
}
diff --git a/sot/source/sdstor/stgstrms.hxx b/sot/source/sdstor/stgstrms.hxx
index a6a0ad108da9..7bcde47288c7 100644
--- a/sot/source/sdstor/stgstrms.hxx
+++ b/sot/source/sdstor/stgstrms.hxx
@@ -82,20 +82,20 @@ protected:
public:
virtual ~StgStrm();
StgIo& GetIo() { return rIo; }
- sal_Int32 GetPos() { return nPos; }
- sal_Int32 GetStart() { return nStart; }
- sal_Int32 GetSize() { return nSize; }
- sal_Int32 GetPage() { return nPage; }
- short GetPageSize() { return nPageSize; }
- sal_Int32 GetPages();
- short GetOffset() { return nOffset;}
+ sal_Int32 GetPos() const { return nPos; }
+ sal_Int32 GetStart() const { return nStart; }
+ sal_Int32 GetSize() const { return nSize; }
+ sal_Int32 GetPage() const { return nPage; }
+ short GetPageSize() const { return nPageSize; }
+ sal_Int32 GetPages() const;
+ short GetOffset() const { return nOffset;}
void SetEntry( StgDirEntry& );
virtual sal_Bool SetSize( sal_Int32 );
virtual sal_Bool Pos2Page( sal_Int32 nBytePos );
virtual sal_Int32 Read( void*, sal_Int32 ) { return 0; }
virtual sal_Int32 Write( const void*, sal_Int32 ) { return 0; }
virtual StgPage* GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce = sal_False );
- virtual sal_Bool IsSmallStrm() { return sal_False; }
+ virtual sal_Bool IsSmallStrm() const { return sal_False; }
};
// The FAT stream class provides physical access to the master FAT.
@@ -145,7 +145,7 @@ public:
StgSmallStrm( StgIo&, StgDirEntry* );
virtual sal_Int32 Read( void*, sal_Int32 );
virtual sal_Int32 Write( const void*, sal_Int32 );
- virtual sal_Bool IsSmallStrm() { return sal_True; }
+ virtual sal_Bool IsSmallStrm() const { return sal_True; }
};
class StgTmpStrm : public SvMemoryStream