Fix DOMDocument redefinition error
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
#include "PreCompiled.h"
|
||||
#include "DocumentReader.h"
|
||||
#include "InputSource.h"
|
||||
#include "XMLTools.h"
|
||||
|
||||
@@ -30,12 +30,6 @@
|
||||
#include <vector>
|
||||
#include <FCGlobal.h>
|
||||
|
||||
//#ifndef _PreComp_
|
||||
//# include <xercesc/dom/DOM.hpp>
|
||||
//# include <xercesc/parsers/XercesDOMParser.hpp>
|
||||
//#endif
|
||||
|
||||
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
namespace zipios {
|
||||
@@ -45,8 +39,6 @@ class ZipInputStream;
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
class DOMNode;
|
||||
class DOMElement;
|
||||
// class DefaultHandler;
|
||||
// class SAX2XMLReader;
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
namespace Base
|
||||
{
|
||||
|
||||
@@ -53,18 +53,11 @@ using PyObject = struct _object;
|
||||
#include <vector>
|
||||
#include <boost_signals2.hpp>
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
#include <xercesc/sax/ErrorHandler.hpp>
|
||||
|
||||
#include "Handle.h"
|
||||
#include "Observer.h"
|
||||
|
||||
|
||||
|
||||
#ifndef _PreComp_
|
||||
//# include <xercesc/sax/SAXParseException.hpp>
|
||||
# include <xercesc/sax/ErrorHandler.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning( disable : 4251 )
|
||||
# pragma warning( disable : 4503 )
|
||||
|
||||
@@ -26,15 +26,15 @@
|
||||
#include "XMLTools.h"
|
||||
|
||||
using namespace Base;
|
||||
XERCES_CPP_NAMESPACE_USE
|
||||
|
||||
std::unique_ptr<XERCES_CPP_NAMESPACE::XMLTranscoder> XMLTools::transcoder;
|
||||
std::unique_ptr<XMLTranscoder> XMLTools::transcoder;
|
||||
|
||||
void XMLTools::initialize()
|
||||
{
|
||||
XERCES_CPP_NAMESPACE_USE;
|
||||
if (!transcoder.get()) {
|
||||
XMLTransService::Codes res{};
|
||||
transcoder.reset(XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgTransService->makeNewTranscoderFor(XERCES_CPP_NAMESPACE_QUALIFIER XMLRecognizer::UTF_8, res, 4096, XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager));
|
||||
transcoder.reset(XMLPlatformUtils::fgTransService->makeNewTranscoderFor(XMLRecognizer::UTF_8, res, 4096, XMLPlatformUtils::fgMemoryManager));
|
||||
if (res != XMLTransService::Ok)
|
||||
throw Base::UnicodeError("Can\'t create transcoder");
|
||||
}
|
||||
@@ -44,7 +44,6 @@ std::string XMLTools::toStdString(const XMLCh* const toTranscode)
|
||||
{
|
||||
std::string str;
|
||||
|
||||
XERCES_CPP_NAMESPACE_USE;
|
||||
initialize();
|
||||
|
||||
//char outBuff[128];
|
||||
@@ -74,8 +73,7 @@ std::basic_string<XMLCh> XMLTools::toXMLString(const char* const fromTranscode)
|
||||
std::basic_string<XMLCh> str;
|
||||
if (!fromTranscode)
|
||||
return str;
|
||||
|
||||
XERCES_CPP_NAMESPACE_USE;
|
||||
|
||||
initialize();
|
||||
|
||||
static XMLCh outBuff[128];
|
||||
|
||||
@@ -28,16 +28,10 @@
|
||||
#include <memory>
|
||||
#include <iostream>
|
||||
#include <xercesc/util/TransService.hpp>
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#include <Base/Exception.h>
|
||||
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
class DOMNode;
|
||||
class DOMElement;
|
||||
class DOMDocument;
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
XERCES_CPP_NAMESPACE_USE
|
||||
// Helper class
|
||||
class BaseExport XMLTools
|
||||
{
|
||||
@@ -48,7 +42,7 @@ public:
|
||||
static void terminate();
|
||||
|
||||
private:
|
||||
static std::unique_ptr<XERCES_CPP_NAMESPACE::XMLTranscoder> transcoder;
|
||||
static std::unique_ptr<XMLTranscoder> transcoder;
|
||||
};
|
||||
|
||||
//**************************************************************************
|
||||
@@ -79,12 +73,12 @@ inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
|
||||
inline StrX::StrX(const XMLCh* const toTranscode)
|
||||
{
|
||||
// Call the private transcoding method
|
||||
fLocalForm = XERCES_CPP_NAMESPACE_QUALIFIER XMLString::transcode(toTranscode);
|
||||
fLocalForm = XMLString::transcode(toTranscode);
|
||||
}
|
||||
|
||||
inline StrX::~StrX()
|
||||
{
|
||||
XERCES_CPP_NAMESPACE_QUALIFIER XMLString::release(&fLocalForm);
|
||||
XMLString::release(&fLocalForm);
|
||||
}
|
||||
|
||||
|
||||
@@ -158,12 +152,12 @@ private :
|
||||
|
||||
inline XStr::XStr(const char* const toTranscode)
|
||||
{
|
||||
fUnicodeForm = XERCES_CPP_NAMESPACE_QUALIFIER XMLString::transcode(toTranscode);
|
||||
fUnicodeForm = XMLString::transcode(toTranscode);
|
||||
}
|
||||
|
||||
inline XStr::~XStr()
|
||||
{
|
||||
XERCES_CPP_NAMESPACE_QUALIFIER XMLString::release(&fUnicodeForm);
|
||||
XMLString::release(&fUnicodeForm);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _PreComp_
|
||||
# undef _PreComp_
|
||||
#endif
|
||||
@@ -305,8 +311,6 @@ int main( int argc, char ** argv )
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
|
||||
typedef BOOL (__stdcall *tMDWD)(
|
||||
IN HANDLE hProcess,
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
# undef _PreComp_
|
||||
#endif
|
||||
|
||||
#if defined(FC_OS_WIN32)
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(FC_OS_LINUX) || defined(FC_OS_BSD)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
@@ -52,9 +56,7 @@
|
||||
#include <Base/Sequencer.h>
|
||||
#include <App/Application.h>
|
||||
|
||||
|
||||
#if defined(FC_OS_WIN32)
|
||||
# include <windows.h>
|
||||
|
||||
/** DllMain is called when DLL is loaded
|
||||
*/
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef _PreComp_
|
||||
# include <Inventor/events/SoButtonEvent.h>
|
||||
#endif
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <Gui/Application.h>
|
||||
@@ -31,8 +33,6 @@
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include <Mod/Inspection/App/InspectionFeature.h>
|
||||
|
||||
#include "VisualInspection.h"
|
||||
|
||||
@@ -46,13 +46,15 @@
|
||||
# include <Inventor/nodes/SoShapeHints.h>
|
||||
#endif
|
||||
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
|
||||
#include <App/GeoFeature.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/Flag.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/SoFCColorBar.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
|
||||
#include <Gui/Widgets.h>
|
||||
#include <Mod/Inspection/App/InspectionFeature.h>
|
||||
#include <Mod/Points/App/Properties.h>
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
# include <QInputDialog>
|
||||
# include <Inventor/events/SoMouseButtonEvent.h>
|
||||
#endif
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
@@ -39,8 +41,7 @@
|
||||
#include <Gui/FileDialog.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/Selection.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
|
||||
#include <Gui/ViewProviderDocumentObject.h>
|
||||
#include <Gui/WaitCursor.h>
|
||||
|
||||
|
||||
@@ -36,13 +36,14 @@
|
||||
# include <Inventor/nodes/SoNormal.h>
|
||||
# include <Inventor/nodes/SoPointSet.h>
|
||||
#endif
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <Base/Vector3D.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/SoFCSelection.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
|
||||
#include <Mod/Points/App/PointsFeature.h>
|
||||
#include <Mod/Points/App/Properties.h>
|
||||
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
// Importing of App classes
|
||||
#ifdef FC_OS_WIN32
|
||||
# define SandboxAppExport __declspec(dllimport)
|
||||
@@ -62,10 +66,6 @@
|
||||
// Xerces
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
// Qt Toolkit
|
||||
#include <qaction.h>
|
||||
#include <qapplication.h>
|
||||
|
||||
@@ -29,11 +29,12 @@
|
||||
# include <QString>
|
||||
#endif
|
||||
|
||||
#include <Gui/View3DInventor.h>
|
||||
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
|
||||
#include "ViewProviderSpreadsheet.h"
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
// Importing of App classes
|
||||
#ifdef FC_OS_WIN32
|
||||
#define _TEMPLATE_AppExport __declspec(dllimport)
|
||||
@@ -56,9 +60,7 @@
|
||||
// Xerces
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
// Qt Toolkit
|
||||
#ifndef __QtAll__
|
||||
|
||||
Reference in New Issue
Block a user