[Libreoffice-commits] core.git: include/unotools unotools/source

Tor Lillqvist tml at collabora.com
Wed May 6 02:17:23 PDT 2015


 include/unotools/fontcfg.hxx       |    9 +++++++++
 unotools/source/config/fontcfg.cxx |    2 ++
 2 files changed, 11 insertions(+)

New commits:
commit fa405087c6345053580fb9d8eca46c6ca71c18d9
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed May 6 12:08:04 2015 +0300

    Add comments about ImplFontAttrs
    
    Change-Id: I32d8b8f4301188245721d31fd234bb1784a1ae8d

diff --git a/include/unotools/fontcfg.hxx b/include/unotools/fontcfg.hxx
index 1d181a9..c13e4a5 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 d7933a9..967794e 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",


More information about the Libreoffice-commits mailing list