Hi everybody,
As some of you probably know, some of the type detection services aren't in 
very good shape. They share a lot of copy-pasted code (that deals with ZIP 
based formats), and also don't fit so well into the detection framework. Things 
like dealing with pre-selected filters, URL patterns, opening a stream, and 
selecting the best filter for a given type are already covered by the 
framework. Also such service doesn't necessarily need to check in each run 
against all supported types, just for one given type. Not to mention the 
Writer detection which is full of old hacks and hard to follow code.
I'm trying to improve that situation. So I introduced a new centralized 
service which is responsible for detecting ZIP storage-based formats, and 
removed all the duplicated code from the other services. Later I cleaned those 
services from some hacks, and simplified them.
I'm not feeling comfortable with doing such changes without a prior 
discussion, and I'd like first to receive a feedback on this. So I submitted 
what I have done so far to gerrit:
https://gerrit.libreoffice.org/9221
https://gerrit.libreoffice.org/9222
https://gerrit.libreoffice.org/9223
Any kind of feedback would be appreciated!
Maxim
Context
- Improving type detection · Maxim Monastirsky
 
   
 
  Privacy Policy |
  
Impressum (Legal Info) |
  
Copyright information: Unless otherwise specified, all text and images
  on this website are licensed under the
  
Creative Commons Attribution-Share Alike 3.0 License.
  This does not include the source code of LibreOffice, which is
  licensed under the Mozilla Public License (
MPLv2).
  "LibreOffice" and "The Document Foundation" are
  registered trademarks of their corresponding registered owners or are
  in actual use as trademarks in one or more countries. Their respective
  logos and icons are also subject to international copyright laws. Use
  thereof is explained in our 
trademark policy.