summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-16 11:26:51 +0200
committerMichael Stahl <mstahl@redhat.com>2016-02-16 10:37:55 +0000
commitce43d0ae9279edbf1ad108fe0d8325327a038d49 (patch)
treea0fbf7bbd608d1185005a0de36496c6f3656e798 /hwpfilter
parent049cf885c6e6c12ac9fa20bcb4ca1472de5b9115 (diff)
use consistent #define checks for the Windows platform
stage 1 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f Reviewed-on: https://gerrit.libreoffice.org/22390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/fontmap.cxx20
-rw-r--r--hwpfilter/source/hiodev.cxx2
-rw-r--r--hwpfilter/source/htags.cxx8
-rw-r--r--hwpfilter/source/htags.h2
-rw-r--r--hwpfilter/source/hwpeq.cxx4
-rw-r--r--hwpfilter/source/hwpreader.cxx2
-rw-r--r--hwpfilter/source/lexer.cxx6
-rw-r--r--hwpfilter/source/mzstring.cxx14
8 files changed, 24 insertions, 34 deletions
diff --git a/hwpfilter/source/fontmap.cxx b/hwpfilter/source/fontmap.cxx
index 259722ee791d..8de154283ba1 100644
--- a/hwpfilter/source/fontmap.cxx
+++ b/hwpfilter/source/fontmap.cxx
@@ -117,8 +117,15 @@ const struct FontEntry FontMapTab[] =
{"\xbd\xc5\xb8\xed \xb1\xc3\xbc\xad",3, 0.97}
};
-#ifndef WIN32
-#if defined(LINUX)
+#if defined(_WIN32)
+const char* RepFontTab[] =
+{
+ "\xb9\xd9\xc5\xc1", /* 0 */
+ "\xb5\xb8\xbf\xf2", /* 1 */
+ "\xb1\xbc\xb8\xb2", /* 2 */
+ "\xb1\xc3\xbc\xad" /* 3 */
+};
+#elif defined(LINUX)
const char* RepFontTab[] =
{
"\xb9\xe9\xb9\xac \xb9\xd9\xc5\xc1", /* 0 */
@@ -135,15 +142,6 @@ const char* RepFontTab[] =
"Gungso" /* 3 */
};
#endif
-#else
-const char* RepFontTab[] =
-{
- "\xb9\xd9\xc5\xc1", /* 0 */
- "\xb5\xb8\xbf\xf2", /* 1 */
- "\xb1\xbc\xb8\xb2", /* 2 */
- "\xb1\xc3\xbc\xad" /* 3 */
-};
-#endif
int getRepFamilyName(const char* orig, char *buf, double &ratio)
{
diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index b6195f0106e0..a5e035741dbb 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <errno.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <io.h>
#else
# include <unistd.h>
diff --git a/hwpfilter/source/htags.cxx b/hwpfilter/source/htags.cxx
index 3bc004a89d26..044f7d2a6a61 100644
--- a/hwpfilter/source/htags.cxx
+++ b/hwpfilter/source/htags.cxx
@@ -52,7 +52,7 @@ EmPicture::EmPicture(size_t tsize)
else
data = new uchar[size];
}
-#ifdef WIN32
+#ifdef _WIN32
#define unlink _unlink
#endif
EmPicture::~EmPicture()
@@ -83,14 +83,14 @@ OlePicture::OlePicture(int tsize)
size = tsize - 4;
if (size <= 0)
return;
-#ifndef WIN32
+#ifndef _WIN32
pis = new char[size];
#endif
};
OlePicture::~OlePicture()
{
-#ifdef WIN32
+#ifdef _WIN32
if( pis )
pis->Release();
#else
@@ -109,7 +109,7 @@ void OlePicture::Read(HWPFile & hwpf)
hwpf.Read4b(&signature, 1);
if (signature != FILESTG_SIGNATURE_NORMAL)
return;
-#ifdef WIN32
+#ifdef _WIN32
char *data = new char[size];
if (hwpf.ReadBlock(data,size) == 0)
{
diff --git a/hwpfilter/source/htags.h b/hwpfilter/source/htags.h
index 2e07978d23b5..292897b47bcd 100644
--- a/hwpfilter/source/htags.h
+++ b/hwpfilter/source/htags.h
@@ -55,7 +55,7 @@ struct OlePicture
{
int size;
uint signature;
-#ifdef WIN32
+#ifdef _WIN32
IStorage *pis;
#else
char *pis;
diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index dfd2d0a88a8e..dd461103a1a6 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -33,7 +33,7 @@ using namespace std;
#include <sal/macros.h>
/* @Man: change the hwp formula to LaTeX */
-#ifdef WIN32
+#ifdef _WIN32
# define ENDL "\r\n"
#else /* !WIN32 */
# define ENDL "\n"
@@ -48,7 +48,7 @@ using namespace std;
#define IS_WS(ch) (strchr(WS, ch))
#define IS_BINARY(ch) (strchr("+-<=>", ch))
-#ifdef WIN32
+#ifdef _WIN32
#define STRICMP stricmp
#else
#define STRICMP strcasecmp
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index dab0d658a923..e981ce0a9238 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -3921,7 +3921,7 @@ void HwpReader::makePicture(Picture * hbox)
}
else{
if( hwpfile.oledata ){
-#ifdef WIN32
+#ifdef _WIN32
LPSTORAGE srcsto;
LPUNKNOWN pObj;
wchar_t pathname[200];
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index e7518ab38c25..aa435d5fcdce 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -48,7 +48,7 @@
#ifdef __cplusplus
#include <stdlib.h>
-#ifndef WIN32
+#ifndef _WIN32
#include <unistd.h>
#else
#include <io.h>
@@ -960,7 +960,7 @@ char *yytext;
#include <string.h>
#include "nodes.h"
-#ifdef WIN32
+#ifdef _WIN32
#define strdup _strdup
#define fileno _fileno
#define isatty _isatty
@@ -975,7 +975,7 @@ int yywrap();
}
#endif
-#ifdef WIN32
+#ifdef _WIN32
extern YYSTYPE yylval;
#endif
#ifdef TOKEN_DEBUG
diff --git a/hwpfilter/source/mzstring.cxx b/hwpfilter/source/mzstring.cxx
index f5e7b9283a21..483809a5fbcb 100644
--- a/hwpfilter/source/mzstring.cxx
+++ b/hwpfilter/source/mzstring.cxx
@@ -23,22 +23,14 @@
#include "mzstring.h"
-#ifndef WIN32
-#else
-
- #if defined _MSC_VER
- #pragma warning(push, 1)
- #endif
+#ifdef _WIN32
# include <windows.h>
- #if defined _MSC_VER
- #pragma warning(pop)
- #endif
-#endif /* WIN32 */
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifndef WIN32
+#ifndef _WIN32
# define wsprintf sprintf
#endif