summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorth <th@openoffice.org>2000-12-05 18:23:20 +0000
committerth <th@openoffice.org>2000-12-05 18:23:20 +0000
commit96b2ba6649a95ac7cf8693a67e2f2d3678feaefc (patch)
tree9cdbb16096f0e887181fe91350e1ff3890312db2 /tools
parent17c186fad22888997549fce6c7685580ba9331ea (diff)
#81383# - Set/GetReadStringHook()
Diffstat (limited to 'tools')
-rw-r--r--tools/source/rc/rc.cxx11
-rw-r--r--tools/source/rc/resmgr.cxx24
2 files changed, 31 insertions, 4 deletions
diff --git a/tools/source/rc/rc.cxx b/tools/source/rc/rc.cxx
index daa5ffdb71d9..31630530586e 100644
--- a/tools/source/rc/rc.cxx
+++ b/tools/source/rc/rc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: rc.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:03:06 $
+ * last change: $Author: th $ $Date: 2000-12-05 19:20:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -159,6 +159,9 @@ String::String( const ResId& rResId )
RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE |
RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |
RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT );
+ ResHookProc pImplResHookProc = ResMgr::GetReadStringHook();
+ if ( pImplResHookProc )
+ pImplResHookProc( aWString );
InitStringRes( aWString );
USHORT nSize = sizeof( RSHEADER_TYPE ) + nStringLen + 1;
@@ -191,6 +194,10 @@ UniString::UniString( const ResId& rResId )
nSize += nSize % 2;
pResMgr->Increment( nSize );
}
+
+ ResHookProc pImplResHookProc = ResMgr::GetReadStringHook();
+ if ( pImplResHookProc )
+ pImplResHookProc( *this );
}
// =======================================================================
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index b80c65336d8e..ec2fe0f8a109 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: resmgr.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: pl $ $Date: 2000-12-01 14:51:30 $
+ * last change: $Author: th $ $Date: 2000-12-05 19:23:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -171,6 +171,10 @@ static int __LOADONCALLAPI Search( const void * nTypeAndId, const void * pSecond
// =======================================================================
+static ResHookProc pImplResHookProc = 0;
+
+// =======================================================================
+
SvStream * InternalResMgr::GetBitmapStream( USHORT nId )
{
// Anfang der Strings suchen
@@ -1002,6 +1006,8 @@ USHORT ResMgr::GetString( UniString& rStr, const BYTE* pStr )
RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE |
RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |
RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT );
+ if ( pImplResHookProc )
+ pImplResHookProc( aString );
rStr = aString;
return GetStringSize( pStr );
}
@@ -1334,6 +1340,20 @@ UniString ResMgr::ReadString()
return aRet;
}
+// -----------------------------------------------------------------------
+
+void ResMgr::SetReadStringHook( ResHookProc pProc )
+{
+ pImplResHookProc = pProc;
+}
+
+// -----------------------------------------------------------------------
+
+ResHookProc ResMgr::GetReadStringHook()
+{
+ return pImplResHookProc;
+}
+
// =======================================================================
SimpleResMgr::SimpleResMgr( const sal_Char* pPrefixName,