Import: Simplify handling of Resource_FormatType

The type Resource_FormatType already exists since 2015. So, its usage doesn't require pre-processor macros everywhere.
This commit is contained in:
wmayer
2024-06-18 15:54:56 +02:00
committed by Chris Hennes
parent 985579bced
commit 4d492c0b83
6 changed files with 53 additions and 71 deletions

View File

@@ -40,13 +40,13 @@ using namespace Import;
ReaderStep::ReaderStep(const Base::FileInfo& file) // NOLINT
: file {file}
{}
#if OCC_VERSION_HEX < 0x070800
void ReaderStep::read(Handle(TDocStd_Document) hDoc) // NOLINT
#else
void ReaderStep::read(Handle(TDocStd_Document) hDoc, Resource_FormatType codePage) // NOLINT
{
#if OCC_VERSION_HEX >= 0x070800
codePage = Resource_FormatType_UTF8;
#endif
}
void ReaderStep::read(Handle(TDocStd_Document) hDoc) // NOLINT
{
std::string utf8Name = file.filePath();
std::string name8bit = Part::encodeFilename(utf8Name);