CodePorting.Native Cs2Cpp 18.11
Major Features
Following major improvements and fixes are applied in this regular monthly release:
- Tests translation approach is improved. Now, virtual function called from methods marked with TestFixtureSetUp, TestFixtureTearDown, SetUp and TearDown attributes are fully supported. Also, TestFixture objects are now created once before running tests from current fixture, and deleted afterwards. ‘cleanup_tests’ option is now ignored by porter
- Named mutex implementation is added
- Compilation of library code using Visual Studio 2015 is explicitly disabled
- Possible static initialization fiasco is now detected by porter and reported as warning
- PreserveWhitespace mode is enabled for XmlDocument class
- New ‘obfuscate_cpp_headers’ option is supported. It allows generating headers with some type and name information removed for non-public fields
- New ‘nunit_assert_class_aliases’ option is supported. It allows treating calls into methods of some ported classes same way calls into NUnit’s Assert class methods are treated
- Graphics::FillRegion() method is implemented
- Threading::Thread class’es behavior is improved to match .Net behavior better. Now the thread is detached after start, so dropping thread object reference doesn’t result in interthreading errors
- Several System::Diagnostics::Process methods are implemented for Linux platform
- A way to detect multiimage gifs is added
- Simple string raw pointer operations are supported inside ‘fixed’ statement
Minor fixes
- StringBuilder now calls proper version of ToString() method even if not marked with CppConstMethod attribute
- NS deduction mechanism is fixed in System::Xml::Node::SetAttribute() method
- Array::Sort() implementation is fixed for value types supporting CompareTo method
- Types of enumerators of collections from System::Collections namespace being treated as value types is fixed
- Porter crash when having ambiguity between two or more methods, one having ‘params’-typed argument block, is fixed
- Dot in subject string expression now properly matched against ‘any symbol’ dot by Regex class
- ‘aspose_cpp’ library suffixes for Visual Studio 2017 are switched from ‘vc150’ to ‘vc141’ which is more common
- System::String::Contains behavior is fixed for empty string used as argument
- XmlTextReader::get_AttributeCount() is fixed when situations when reader is currently pointed to attribute node
- Porter behavior is fixed for situations when method parameter name matches such of one of the class’es parameters
- Graphics::MeasureString() behavior is fixed for some corner cases
- Buffer::BlockCopy() method is fixed to work with rvalues when compiled with GCC
- GraphicsPath::AddBeziers() overloads are implemented
- PlatformNotSupportedException exception type is supported
- Environment::GetFolderPath() is supported on Linux for SpecialFolder::Personal folder type
- Visualizations of System::String and System::SmartPtr inside Visual Studio are fixed and improved
- Accuracy of Graphics::MeasureString() method is improved. Special treatment of leading spaces is added. Behavior when no glyphs are present in the font used is fixed
- ‘exclude’ parameter of ‘cut_namespaces’ option is fixed to work with delegates
- Some errors within FileStream class are fixed
- Header name resolving mechanism is fixed when porter-generated header name matches name of existing header file
- Few memory issues within the library are fixed
- Complex assignment operators on indexers are fixed. There is an expression duplication issue causing increment or other similar operations to be executed twice
- List and Array sorting order is fixed for NaN values to match C# behavior
- GraphicsPath::AddPolygon() behavior is fixed for some cases.
- Tiff format with CMYK color model is now supported
- XmlConvert::ToString() method now uses correct invariant culture with DateTime objects.
- Quality of hashes provided by Object::GetHashCode() method is improved.
- False positive ‘Failed to parse constructor initializer’ porter errors are downgraded to warnings. The aren’t removed totally to avoid loosing true alerts.
- String::Join() method is fixed for empty input array to return empty string instead of null string.
- Missing include when using cascaded CppConstexpr attribute is fixed.
Please consult respective sections of our wiki for more information.
Full List of Issues Covering all Changes in this Release
Key | Summary | Category |
---|---|---|
CSPORTCPP-1805 | Improve TestFixture translation approach | Enhancement |
WORDSCPP-651 | Port classes from namespace Aspose.TestFx.GoldComparers.FailedTestCollector | Task |
PDFCPP-767 | Fix CsToCppPorter - conversion to string | Bug |
CSPORTCPP-2187 | Add VS2015 disablement macro to public headers | Task |
BARCODECPP-374 | Implement SIOF detection | Task |
WORDSCPP-673 | System::ArraySystem::String::Sort does not work the same as in .NET | Bug |
CSPORTCPP-2127 | Fix member class porting as value type | Bug |
WORDSCPP-672 | bool vs String ambiguity detector doesn’t work with params arguments | Bug |
WORDSCPP-610 | XmlDocument.PreserveWhitespace throws NotImplementedException | Bug |
WORDSCPP-570 | /TestReplace.TestReplaceAcrossParagraph/ Dot is not recognized as “any character” by Regex. | Bug |
PDFCPP-793 | Fix issues with Text tests | Task |
PDFCPP-747 | Get tests passed | Investigation |
BARCODECPP-379 | Support Aspose.BarCode for C++ | Task |
SLIDESCPP-1371 | Fix Aspose.Slides for C++ build issues in Linux environment | Task |
SLIDESCPP-1377 | Analyze missing slide elements rendering issue | Task |
SLIDESCPP-1379 | Implement ‘Personal’ case of Environment::GetFolderPath for Linux environment | Task |
SLIDESCPP-1380 | Improve accuracy of the Graphics::MeasureString method | Task |
SLIDESCPP-1386 | Fix aborting execution when running RegressionTests_v18_8 tests | Task |
SLIDESCPP-1393 | Porter: Option cut_namespaces:exclude is not applied for delegates | Task |
SLIDESCPP-1395 | Implement StringFormatFlags.MeasureTrailingSpaces functionality for MeasureString | Task |
SLIDESCPP-1405 | Implement System::Diagnostics::Process::GetCurrentProcess() for Linux environment | Task |
SLIDESCPP-1411 | Fix text measuring when a font doesn’t have required glyphs | Task |
SLIDESCPP-1412 | The output pptx file is corrupted | Bug |
SLIDESCPP-1422 | Porter: Headers conflict resolving mechanism is broken | Task |
SLIDESCPP-1424 | Check Aspose C++ Library for memory access issues (v18.9) | Task |
SLIDESCPP-1429 | Fix translation of complex assignment operations to indexers | Task |
SLIDESCPP-1435 | Fix Array/List sorting when it contains NaN values | Task |
SLIDESCPP-1426 | Fix RegressionTests_v17_2.SLIDESNET_35542 test | Task |
SLIDESCPP-1444 | Modify Skia to support decoding of Tiff images with CMYK color model | Task |
SLIDESCPP-1459 | Fix NotImplementedException while running Miscelaneous.Test_SLIDESNET_33637 test | Task |
SLIDESCPP-1449 | Improve quality of hash values returned by Object::GetHashCode() | Task |
SLIDESCPP-1451 | Force porter to fail the build on file errors | Task |
SLIDESCPP-1463 | Fix RegressionTests_v16_4.SLIDESNET_36934 test | Task |
SLIDESCPP-1472 | Implement identification of multi-images GIF | Task |
SLIDESCPP-1473 | Porter: Missing include directive when CppConstexpr is applied | Task |
SLIDESCPP-1479 | Porter: Add support of simple raw pointer operations in the fixed statement | Task |
Public API and Backward Incompatible Changes
- The way tests were translated is changed. If you have tests in your solution, you must re-port full solution instead of individual project, as tests ported by previous porter versions won’t be compatible with tests ported by actual porter.
- In System::Threading::Mutex class, Mutex(bool, String) constructor and Remove(String) static method are added.
- System::Details::Skia namespace is moved to System::Drawing::Details::Skia. No clients' code should be impacted.
- IsMultiImage() method is added into Bitmap and Image classes.