summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/attributes.cxx4
-rw-r--r--hwpfilter/source/fontmap.cxx5
-rw-r--r--hwpfilter/source/hcode.cxx5
-rw-r--r--hwpfilter/source/hstyle.cxx4
-rw-r--r--hwpfilter/source/hwpeq.cxx8
-rw-r--r--hwpfilter/source/hwpreader.cxx3
-rw-r--r--hwpfilter/source/lexer.cxx7
7 files changed, 36 insertions, 0 deletions
diff --git a/hwpfilter/source/attributes.cxx b/hwpfilter/source/attributes.cxx
index 533769d879ac..f9e33b1f40f7 100644
--- a/hwpfilter/source/attributes.cxx
+++ b/hwpfilter/source/attributes.cxx
@@ -22,6 +22,8 @@
#include <vector>
#include "attributes.hxx"
+namespace {
+
struct TagAttribute
{
TagAttribute( const OUString &rName, const OUString &rType , const OUString &rValue )
@@ -36,6 +38,8 @@ struct TagAttribute
OUString sValue;
};
+}
+
struct AttributeListImpl_impl
{
AttributeListImpl_impl()
diff --git a/hwpfilter/source/fontmap.cxx b/hwpfilter/source/fontmap.cxx
index 52fffd8f910a..fcd6c4822169 100644
--- a/hwpfilter/source/fontmap.cxx
+++ b/hwpfilter/source/fontmap.cxx
@@ -27,12 +27,17 @@
#include <sal/types.h>
#include "fontmap.hxx"
+namespace {
+
struct FontEntry
{
const char *familyname;
int key;
double ratio;
};
+
+}
+
/**
* ratio\xb4\xc2 \xc7\xd1\xb1\xdb 70%, \xbc\xfd\xc0\xda 10% \xbf\xb5\xb9\xae 20%\xc0\xc7 \xba\xf1\xc0\xb2\xb7\xce \xb1\xb8\xbc\xba\xb5\xc7\xbe\xfa\xb4\xd9\xb4\xc2 \xb0\xa1\xc1\xa4\xc7\xcf\xbf\xa1 \xc1\xa4\xc7\xd8\xc1\xf8\xb4\xd9.
*/
diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx
index fda36e0953ca..99885d00460b 100644
--- a/hwpfilter/source/hcode.cxx
+++ b/hwpfilter/source/hcode.cxx
@@ -653,12 +653,17 @@ static const hchar jamo_to_unicode[] =
0x11f6, 0x11f7, 0x11f8, 0x11f9
};
+namespace {
+
struct JamoComp{
int size;
hchar v1;
hchar v2;
hchar v3;
};
+
+}
+
/* 704 + 12 = 706 */
static const JamoComp jamocomp1_to_unicode[] =
{
diff --git a/hwpfilter/source/hstyle.cxx b/hwpfilter/source/hstyle.cxx
index e0573edf9cad..e80a9c1a8b0d 100644
--- a/hwpfilter/source/hstyle.cxx
+++ b/hwpfilter/source/hstyle.cxx
@@ -30,6 +30,8 @@ enum
#define DATA static_cast<StyleData *>(style)
+namespace {
+
struct StyleData
{
char name[MAXSTYLENAME + 1];
@@ -37,6 +39,8 @@ struct StyleData
ParaShape pshape;
};
+}
+
static char buffer[MAXSTYLENAME + 1];
HWPStyle::HWPStyle()
diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index d3bd46207469..00cf2182866c 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -68,6 +68,8 @@ enum { SCRIPT_NONE, SCRIPT_SUB, SCRIPT_SUP, SCRIPT_ALL};
static int eq_word(MzString& outs, istream *strm, int script = SCRIPT_NONE);
static bool eq_sentence(MzString& outs, istream *strm, const char *end = nullptr);
+namespace {
+
struct hwpeq {
const char *key; // hwp math keyword
const char *latex; // corresponding latex keyword
@@ -75,6 +77,8 @@ struct hwpeq {
unsigned char flag; // case sensitive?
};
+}
+
static const hwpeq eq_tbl[] = {
{ "!=", "\\equiv ", 0, 0 },
{ "#", "\\\\", 0, 0 },
@@ -452,6 +456,8 @@ static void make_keyword( char *keyword, const char *token)
}
}
+namespace {
+
// token reading function
struct eq_stack {
MzString white;
@@ -465,6 +471,8 @@ struct eq_stack {
}
};
+}
+
static eq_stack *stk = nullptr;
static void push_token(MzString const &white, MzString const &token, istream *strm)
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 4144d20e0bde..51f072fed4ad 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -927,6 +927,7 @@ void HwpReader::makeAutoStyles()
rendEl("office:automatic-styles");
}
+namespace {
struct PageSetting
{
@@ -951,6 +952,8 @@ struct PageSetting
bool bIsSet;
};
+}
+
void HwpReader::makeMasterStyles()
{
rstartEl("office:master-styles", mxList.get());
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index d70d81a92923..829431cfcc50 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -89,8 +89,12 @@
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
+namespace {
+
typedef struct yy_buffer_state *YY_BUFFER_STATE;
+}
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -103,6 +107,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
*/
typedef unsigned int yy_size_t;
+namespace {
struct yy_buffer_state
{
@@ -161,6 +166,8 @@ struct yy_buffer_state
#define YY_BUFFER_EOF_PENDING 2
};
+}
+
static YY_BUFFER_STATE yy_current_buffer = nullptr;
/* We provide macros for accessing buffer states in case in the