[Libreoffice-commits] .: sot/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu May 3 05:25:48 PDT 2012


 sot/source/sdstor/stgstrms.cxx |    2 +-
 sot/source/sdstor/stgstrms.hxx |   18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 6577e56a9cfd946d7382c87995d35b8c47776698
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu May 3 13:24:48 2012 +0100

    const up methods that don't change any state
    
    Change-Id: I844cefad718e5b37dac5657674294a0873b8a8e5

diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 24c4422..9f412ed 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 a6a0ad1..7bcde47 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


More information about the Libreoffice-commits mailing list