Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


I happened to notice that in
comphelper/inc/comphelper/documentconstants.hxx and
filter/source/config/cache/constant.hxx are a set of preprocessor
macros definiing flag bits apparently describing properties of
import/export filters. The SFX_FILTER_FOO values in the former match
the FLAGVAL_FOO values in the latter exactly, for each FOO.

Except for a couple of SFX_FILTER_FOO values that don't have any
corresponding FLAGVAL_FOO, and a few cases where the "FOO" part is
different (but still meaning the same, apparently). For instance the
mysterious SFX_FILTER_STARONEFILTER corresponds to the much less
obscure sounding FLAGVAL_3RDPARTYFILTER.

Clearly this is silly and bad practice. Just one set of symbolic names
for these flag bits should be enough, no? Or does the code *not*
assume they are the same? (I.e. would things work equally well if they
didn't match, and they happen to have matching values just out of
coincidence (ha ha)?)

BTW, what is "STARONEFILTER" / "3RDPARTYFILTER" flag is supposed to
mean? Also some of the filters included in LO codebase, presumably
present in the OOo codebase since approximately forever, have this
flag set (git grep 3RDPARTYFILTER filter/source/config), so in what
way are those "3rd-party"? Maybe a better name for this bit should be
invented that tells what it actually means... What does the mysterious
code in for instance sfx2/source/doc/objstor.cxx that checks the
SFX_FILTER_STARONEFILTER flag do? Sigh.

--tml

Context


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.