[Libreoffice-commits] core.git: hwpfilter/source

Stephan Bergmann sbergman at redhat.com
Mon Apr 14 04:02:55 PDT 2014


 hwpfilter/source/attributes.cxx |    1 -
 hwpfilter/source/cspline.cxx    |    3 +++
 hwpfilter/source/fontmap.cxx    |    2 ++
 hwpfilter/source/fontmap.hxx    |   29 +++++++++++++++++++++++++++++
 hwpfilter/source/formula.cxx    |    4 +---
 hwpfilter/source/grammar.cxx    |    6 ++----
 hwpfilter/source/grammar.hxx    |   31 +++++++++++++++++++++++++++++++
 hwpfilter/source/hutil.cxx      |    1 +
 hwpfilter/source/hwpreader.cxx  |    3 +--
 hwpfilter/source/lexer.cxx      |    2 ++
 hwpfilter/source/lexer.hxx      |   29 +++++++++++++++++++++++++++++
 11 files changed, 101 insertions(+), 10 deletions(-)

New commits:
commit 29a96480b09f63bfbffb799729cf09d3693c0054
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Apr 14 13:02:26 2014 +0200

    Clean up function declarations and some unused functions
    
    Change-Id: I7eba9260b33e0b92ed997bf624d866644a091f29

diff --git a/hwpfilter/source/attributes.cxx b/hwpfilter/source/attributes.cxx
index 57cf05b..ea1dc43 100644
--- a/hwpfilter/source/attributes.cxx
+++ b/hwpfilter/source/attributes.cxx
@@ -24,7 +24,6 @@
 
 struct TagAttribute
 {
-    TagAttribute(){}
     TagAttribute( const OUString &rName, const OUString &rType , const OUString &rValue )
     {
         sName     = rName;
diff --git a/hwpfilter/source/cspline.cxx b/hwpfilter/source/cspline.cxx
index cc238b3..06dde6c 100644
--- a/hwpfilter/source/cspline.cxx
+++ b/hwpfilter/source/cspline.cxx
@@ -47,6 +47,9 @@
 // matrix.  Therefore for very large N, you may have to worry about memory
 // usage.
 
+#include <sal/config.h>
+
+#include "cspline.h"
 #include "solver.h"
 
 void NaturalSpline (int N, double* x, double* a, double*& b, double*& c,
diff --git a/hwpfilter/source/fontmap.cxx b/hwpfilter/source/fontmap.cxx
index 9ac5f9c..52a0ed0 100644
--- a/hwpfilter/source/fontmap.cxx
+++ b/hwpfilter/source/fontmap.cxx
@@ -24,6 +24,8 @@
 #include <string.h>
 #endif
 
+#include <fontmap.hxx>
+
 // #i42367# prevent MS compiler from using system locale for parsing
 #ifdef _MSC_VER
 #pragma setlocale("C")
diff --git a/hwpfilter/source/fontmap.hxx b/hwpfilter/source/fontmap.hxx
new file mode 100644
index 0000000..f9002e4
--- /dev/null
+++ b/hwpfilter/source/fontmap.hxx
@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_HWPFILTER_SOURCE_FONTMAP_HXX
+#define INCLUDED_HWPFILTER_SOURCE_FONTMAP_HXX
+
+#include <sal/config.h>
+
+int getRepFamilyName(char const *, char *, double &);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx
index c6fa80f..52bf27a 100644
--- a/hwpfilter/source/formula.cxx
+++ b/hwpfilter/source/formula.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "formula.h"
+#include "grammar.hxx"
 
 #include "mzstring.h"
 #include "nodes.h"
@@ -46,9 +47,6 @@ static int indent = 0;
 #define indo indent--;
 #endif
 
-extern Node *mainParse(const char *);
-
-
 void Formula::makeMathML(Node *res)
 {
      Node *tmp = res;
diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx
index 4ff34a5..be4b591 100644
--- a/hwpfilter/source/grammar.cxx
+++ b/hwpfilter/source/grammar.cxx
@@ -32,15 +32,13 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "grammar.hxx"
+#include "lexer.hxx"
 #include "nodes.h"
 
 std::list<Node*> nodelist;
 
-Node *mainParse(const char *_code);
 void yyerror(const char *);
-int yylex();
-void initFlex( const char *s );
-void viewResult(Node *res);
 
 Node *top=0L;
 
diff --git a/hwpfilter/source/grammar.hxx b/hwpfilter/source/grammar.hxx
new file mode 100644
index 0000000..334f434
--- /dev/null
+++ b/hwpfilter/source/grammar.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_HWPFILTER_SOURCE_GRAMMAR_HXX
+#define INCLUDED_HWPFILTER_SOURCE_GRAMMAR_HXX
+
+#include <sal/config.h>
+
+class Node;
+
+Node * mainParse(char const * _code);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/hwpfilter/source/hutil.cxx b/hwpfilter/source/hutil.cxx
index 3f64701..87c7b6e 100644
--- a/hwpfilter/source/hutil.cxx
+++ b/hwpfilter/source/hutil.cxx
@@ -22,6 +22,7 @@
 #include <ctype.h>
 #include "hwpfile.h"
 #include "hbox.h"
+#include "hutil.h"
 
 static char *get_one_roman(int num, char one, char five, char ten, char *str)
 {
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 0134d5b..19c6369 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -26,11 +26,10 @@
 
 #include <comphelper/newarray.hxx>
 
+#include "fontmap.hxx"
 #include "formula.h"
 #include "cspline.h"
 
-extern int getRepFamilyName(const char* , char *, double &ratio);
-
 #include <iostream>
 #include <locale.h>
 #include <sal/types.h>
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index 95ebe7e..91daa4b 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -1043,6 +1043,8 @@ YY_MALLOC_DECL
 #endif
 #endif
 
+#include <lexer.hxx>
+
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
 #define YY_READ_BUF_SIZE 8192
diff --git a/hwpfilter/source/lexer.hxx b/hwpfilter/source/lexer.hxx
new file mode 100644
index 0000000..333b117
--- /dev/null
+++ b/hwpfilter/source/lexer.hxx
@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_HWPFILTER_SOURCE_LEXER_HXX
+#define INCLUDED_HWPFILTER_SOURCE_LEXER_HXX
+
+void initFlex(char const * s);
+
+int yylex();
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list