-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of Spreadsheet module (C++ version) by Eivind …
…Kvedalen. Various fixes for Windows by Peter Lama <peterldev94@gmail.com> Werner Mayer <wmayer@users.sourceforge.net>
- Loading branch information
Showing
80 changed files
with
27,082 additions
and
1,217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU Library General Public License as * | ||
* published by the Free Software Foundation; either version 2 of the * | ||
* License, or (at your option) any later version. * | ||
* for detail see the LICENCE text file. * | ||
* Jrgen Riegel 2002 * | ||
* Eivind Kvedalen 2015 * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "PreCompiled.h" | ||
#ifndef _PreComp_ | ||
# include <Python.h> | ||
#endif | ||
|
||
#include <Base/Console.h> | ||
#include "Sheet.h" | ||
#include "Expression.h" | ||
|
||
|
||
/* registration table */ | ||
static struct PyMethodDef Spreadsheet_methods[] = { | ||
{NULL, NULL} /* end of table marker */ | ||
}; | ||
|
||
/* Python entry */ | ||
extern "C" { | ||
void SpreadsheetExport initSpreadsheet() { | ||
(void) Py_InitModule("Spreadsheet", Spreadsheet_methods); /* mod name, table ptr */ | ||
Base::Console().Log("Loading Spreadsheet module... done\n"); | ||
|
||
Spreadsheet::PropertyColumnWidths::init(); | ||
Spreadsheet::PropertyRowHeights::init(); | ||
Spreadsheet::PropertySheet::init(); | ||
|
||
Spreadsheet::Sheet::init(); | ||
Spreadsheet::Expression::init(); | ||
Spreadsheet::UnitExpression::init(); | ||
Spreadsheet::NumberExpression::init(); | ||
Spreadsheet::ConstantExpression::init(); | ||
Spreadsheet::FunctionExpression::init(); | ||
Spreadsheet::OperatorExpression::init(); | ||
Spreadsheet::VariableExpression::init(); | ||
Spreadsheet::ConditionalExpression::init(); | ||
Spreadsheet::StringExpression::init(); | ||
|
||
return; | ||
} | ||
|
||
} // extern "C" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
if(WIN32) | ||
add_definitions(-DFCAppSpreadsheet) | ||
endif(WIN32) | ||
|
||
include_directories( | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
${PYTHON_INCLUDE_PATH} | ||
${Boost_INCLUDE_DIRS} | ||
${ZLIB_INCLUDE_DIR} | ||
${XERCESC_INCLUDE_DIR} | ||
${QT_INCLUDE_DIR} | ||
) | ||
|
||
set(Spreadsheet_LIBS | ||
FreeCADApp | ||
) | ||
|
||
set(Spreadsheet_SRCS | ||
Expression.cpp | ||
Expression.h | ||
Cell.cpp | ||
Cell.h | ||
DisplayUnit.h | ||
PropertySheet.cpp | ||
PropertySheet.h | ||
PropertySheetPy.xml | ||
PropertySheetPyImp.cpp | ||
PropertyColumnWidths.cpp | ||
PropertyColumnWidths.h | ||
PropertyColumnWidthsPy.xml | ||
PropertyColumnWidthsPyImp.cpp | ||
PropertyRowHeights.cpp | ||
PropertyRowHeights.h | ||
PropertyRowHeightsPy.xml | ||
PropertyRowHeightsPyImp.cpp | ||
PreCompiled.cpp | ||
PreCompiled.h | ||
Sheet.cpp | ||
Sheet.h | ||
SheetPy.xml | ||
SheetPyImp.cpp | ||
SheetObserver.cpp | ||
SheetObserver.h | ||
Utils.cpp | ||
Utils.h | ||
Range.h | ||
Range.cpp | ||
AppSpreadsheet.cpp | ||
) | ||
|
||
generate_from_xml(SheetPy) | ||
generate_from_xml(PropertySheetPy) | ||
generate_from_xml(PropertyColumnWidthsPy) | ||
generate_from_xml(PropertyRowHeightsPy) | ||
|
||
add_library(Spreadsheet SHARED ${Spreadsheet_SRCS}) | ||
target_link_libraries(Spreadsheet ${Spreadsheet_LIBS}) | ||
|
||
|
||
fc_target_copy_resource(Spreadsheet | ||
${CMAKE_SOURCE_DIR}/src/Mod/Spreadsheet | ||
${CMAKE_BINARY_DIR}/Mod/Spreadsheet | ||
Init.py) | ||
|
||
SET_BIN_DIR(Spreadsheet Spreadsheet /Mod/Spreadsheet) | ||
SET_PYTHON_PREFIX_SUFFIX(Spreadsheet) | ||
|
||
INSTALL(TARGETS Spreadsheet DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
Oops, something went wrong.