• Tomaž Vajngerl's avatar
    introduce graphic format detector (and basic metadata) · e1664176
    Tomaž Vajngerl yazdı
    Currently we detect a graphic format in a ImpPeekGraphicFormat
    method, which is called when reading a graphic from a stream.
    The code is quite convoluted and doesn't help with readability
    of graphicfilter.cxx
    Additionally there exists an detection code written for the UNO
    class GraphicDescriptor, which duplicates the detection, but can
    in addition also extract other metadata at the same time.
    This introduces the initial implementation of GraphicFormatDetector
    class. It will first replace the code in ImpPeekGraphicFormat
    to detect the graphic format and then later also be extended to
    do what the GraphicDescriptor is doing. But currently it only
    duplicates the implementation of ImpPeekGraphicFormat.
    The problem with both of the current solution is that there are
    not any tests written. For the GraphicFormatDetector however the
    approach is to add test cases to check the current implementation
    and only then refactor the code.
    Change-Id: Idb9d3859b4380e3f15237d97aff969ce81e631dd
    Reviewed-on: https://gerrit.libreoffice.org/72086
    Tested-by: Jenkins
    Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
Library_vcl.mk 20.4 KB