summaryrefslogtreecommitdiff
path: root/hwpfilter/source/hwpfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'hwpfilter/source/hwpfile.h')
-rw-r--r--hwpfilter/source/hwpfile.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h
index 83bf28860f9b..470fa2bdfd41 100644
--- a/hwpfilter/source/hwpfile.h
+++ b/hwpfilter/source/hwpfile.h
@@ -275,6 +275,7 @@ class DLLEXPORT HWPFile
int error_code;
OlePicture *oledata;
unsigned char scratch[SAL_MAX_UINT16];
+ int readdepth;
private:
/* hwp 파일 이름 */
@@ -310,6 +311,26 @@ class DLLEXPORT HWPFile
friend HWPFile *SetCurrentDoc(HWPFile *);
};
+class DLLEXPORT DepthGuard
+{
+private:
+ HWPFile& m_rFile;
+public:
+ DepthGuard(HWPFile &rFile)
+ : m_rFile(rFile)
+ {
+ ++m_rFile.readdepth;
+ }
+ bool toodeep() const
+ {
+ return m_rFile.readdepth == 1024;
+ }
+ ~DepthGuard()
+ {
+ --m_rFile.readdepth;
+ }
+};
+
HWPFile *GetCurrentDoc(void);
HWPFile *SetCurrentDoc(HWPFile *hwpfp);
#endif // INCLUDED_HWPFILTER_SOURCE_HWPFILE_H