diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-05-06 12:08:04 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-05-06 12:14:25 +0300 |
commit | fa405087c6345053580fb9d8eca46c6ca71c18d9 (patch) | |
tree | de7bab1efbf9b486f1034b397bbb1763a27a042a | |
parent | 74778b12f4f662e45ca8915739ab52b4402fde49 (diff) |
Add comments about ImplFontAttrs
Change-Id: I32d8b8f4301188245721d31fd234bb1784a1ae8d
-rw-r--r-- | include/unotools/fontcfg.hxx | 9 | ||||
-rw-r--r-- | unotools/source/config/fontcfg.cxx | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/unotools/fontcfg.hxx b/include/unotools/fontcfg.hxx index 1d181a9b8b16..c13e4a5a4138 100644 --- a/include/unotools/fontcfg.hxx +++ b/include/unotools/fontcfg.hxx @@ -34,6 +34,15 @@ enum class DefaultFontType; +// If you think the below concept of classifying a font (typeface) as possibly being one or several +// of "Default", "Standard", and "Normal", etc, is madness, you are probably right. On the other +// hand we have in officecfg/registry/data/org/openoffice/VCL.xcu carefully (or not) assigned to +// each font mentioned in that file what its attributes are, so it is quite possible that touching +// this would cause a regression that nobody would notice until after many years. + +// Note that the bit flags must match the entries in the pAttribNames array in +// unotools/source/config/fontcfg.cxx. + enum class ImplFontAttrs : sal_uLong { None = 0x00000000, diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index d7933a9cfe28..967794e584fb 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -796,6 +796,8 @@ struct StrictStringSort : public ::std::binary_function< const FontNameAttr&, co { return rLeft.Name.compareTo( rRight.Name ) < 0; } }; +// The entries in this table must match the bits in the ImplFontAttrs enum. + static const char* const pAttribNames[] = { "default", |