Kleine utility-duplicaten opruimen (byte-readers, path-helpers, _stripCr, _ext, _cm) #2079
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck#2079
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Probleem
Meerdere kleine utility-functies zijn exact gekopieerd across bestanden. Elke duplicaat is klein (3-10 regels), maar samen vormen ze ~40-50 regels kopiecode met onderhoudslast.
Gevonden duplicaten
1.
_stripCr(carriage-strip helper)lib/utils/source_patcher.dart:59-60lib/utils/document_front_matter.dart:512-5132. Little-endian byte readers (
_readUint16LE,_readUint32LE)lib/utils/zip_encryption.dart:263,265-266lib/utils/image_dimensions.dart:125,128-1293. Big-endian 32-bit reader (
_readUint32BE/_uint32)lib/utils/image_dimensions.dart:126-127lib/utils/image_resize.dart:210-2144.
_safeName/_safeRemoteNamelib/services/file/file_service_package.dart:477-478lib/widgets/shell/shell_actions.dart:488-489sanitizeFilename(title, fallback: 'presentatie').5.
_stemOf/stemOfFileNamelib/services/import/bulk_import_runner.dart:270-274(publiek)lib/services/import/presentation_import_service.dart:318-322(privaat)lib/widgets/shell/presentation_import_action.dart:329-332(privaat)6.
_ext(fallbackjpg)lib/services/import/importers/keynote/key_importer.dart:302-307lib/services/import/importers/keynote/iwa/media_reconstructor.dart:204-209lib/services/import/importers/keynote/iwa/drawable_reader.dart:613-6187.
_extFromPath(fallbackpng)lib/services/import/importers/pptx/pptx_media.dart:227-231lib/services/import/importers/odp/odp_slide.dart:441-4458.
_cm(string naar double, cm/mm/% strip)lib/services/import/importers/odp/odp_slide.dart:435-438lib/services/import/importers/odp/odp_context.dart:134-138Voorstel
lib/utils/byte_readers.dartmetreadUint16LE,readUint32LE,readUint32BE(#2, #3)lib/utils/path_helpers.dartmetstemOfFileName,extOfFileName(name, fallback),cmToDouble(#5, #6, #7, #8)_stripCrnaar een shared text-utility (#1)_safeName/_safeRemoteNamevervallen door directsanitizeFilenameaan te roepen (#4)Schatting
~40-50 regels verwijderbaar.
Labels
duplicate, enhancement