summaryrefslogtreecommitdiff
path: root/rsc/inc
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2016-03-01 23:21:02 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2016-03-01 23:51:05 +0100
commitf00967cf38ed0c2c197284391fc521825bb3c2ac (patch)
treed1505cfff1707c51a74ece3091dcc25afbc5d778 /rsc/inc
parent4845155e0126571e4176819c5f27b76160146ce0 (diff)
sal_uIntPtr/sal_uLong to Index (aka sal_uInt32) in UniqueIndex
Change-Id: I212cb3bb9d920741629fc4564bbd28b393e8fe00
Diffstat (limited to 'rsc/inc')
-rw-r--r--rsc/inc/rscdb.hxx6
-rw-r--r--rsc/inc/rscdef.hxx27
2 files changed, 18 insertions, 15 deletions
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index c7c49583aef4..9aadf3d8766b 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -223,7 +223,7 @@ class RscTypCont
void InsWinBit( RscTop * pClass, const OString& rName,
Atom nVal );
- void WriteInc( FILE * fOutput, sal_uLong lKey );
+ void WriteInc( FILE * fOutput, RscFileTab::Index lKey );
public:
RscBool aBool;
@@ -274,13 +274,13 @@ public:
}
RscTop * SearchType( Atom nTypId );
// deletes all resource objects of this file
- void Delete( sal_uLong lFileKey );
+ void Delete( RscFileTab::Index lFileKey );
RscTop * GetRoot() { return pRoot; }
sal_uInt32 PutSysName( sal_uInt32 nRscTyp, char * pName, sal_uInt32 nConst,
sal_uInt32 nId, bool bFirst );
void ClearSysNames();
ERRTYPE WriteRc( WriteRcContext& rContext );
- void WriteSrc( FILE * fOutput, sal_uLong nFileIndex,
+ void WriteSrc( FILE * fOutput, RscFileTab::Index nFileIndex,
bool bName = true );
void PutTranslatorKey( sal_uInt64 nKey );
void IncFilePos( sal_uLong nOffset ){ nFilePos += nOffset; }
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index 41e22f659a4d..d2194f040e21 100644
--- a/rsc/inc/rscdef.hxx
+++ b/rsc/inc/rscdef.hxx
@@ -221,8 +221,6 @@ public:
bool IsIncFile(){ return bIncFile; };
};
-#define NOFILE_INDEX UNIQUEINDEX_ENTRY_NOTFOUND
-
class RscDefTree
{
RscDefine * pDefRoot;
@@ -238,8 +236,13 @@ public:
class RscFileTab : public UniqueIndex<RscFile>
{
+public:
+ using UniqueIndex<RscFile>::Index;
+ using UniqueIndex<RscFile>::IndexNotFound;
+
+private:
RscDefTree aDefTree;
- sal_uLong Find(const OString& rName);
+ Index Find(const OString& rName);
public:
RscFileTab();
~RscFileTab();
@@ -250,22 +253,22 @@ public:
return FindDef(rStr.getStr());
}
- bool Depend( sal_uLong lDepend, sal_uLong lFree );
- bool TestDef( sal_uLong lFileKey, size_t lPos,
+ bool Depend( Index lDepend, Index lFree );
+ bool TestDef( Index lFileKey, size_t lPos,
const RscDefine * pDefDec );
- bool TestDef( sal_uLong lFileKey, size_t lPos,
+ bool TestDef( Index lFileKey, size_t lPos,
const RscExpression * pExpDec );
- RscDefine * NewDef( sal_uLong lKey, const OString& rDefName,
+ RscDefine * NewDef( Index lKey, const OString& rDefName,
sal_Int32 lId, sal_uLong lPos );
- RscDefine * NewDef( sal_uLong lKey, const OString& rDefName,
+ RscDefine * NewDef( Index lKey, const OString& rDefName,
RscExpression *, sal_uLong lPos );
// deletes all defines defined in this file
- void DeleteFileContext( sal_uLong lKey );
- sal_uLong NewCodeFile(const OString& rName);
- sal_uLong NewIncFile(const OString& rName, const OString& rPath);
- RscFile * GetFile( sal_uLong lFileKey ){ return Get( lFileKey ); }
+ void DeleteFileContext( Index lKey );
+ Index NewCodeFile(const OString& rName);
+ Index NewIncFile(const OString& rName, const OString& rPath);
+ RscFile * GetFile( Index lFileKey ){ return Get( lFileKey ); }
};
#endif // INCLUDED_RSC_INC_RSCDEF_HXX