vcl/inc/PhysicalFontCollection.hxx | 2 ++ vcl/inc/magic.h | 27 --------------------------- vcl/inc/sallayout.hxx | 3 ++- vcl/source/font/PhysicalFontCollection.cxx | 5 ++--- 4 files changed, 6 insertions(+), 31 deletions(-)
New commits: commit e1055318376c6e2bfbbd8c2bfb7eb8c0f3c85775 Author: Chris Sherlock <chris.sherloc...@gmail.com> Date: Mon Jan 25 22:03:45 2016 +1100 vcl: remove vcl/inc/magic.h I must have a sensitive olfactory, but this is pretty smelly. One file that has a single define, which is a "MAX_FALLBACK", but is used in layout *and* glyph fallback code? Yeah, so probably not that bad, but still not very good. I'm not a fan of "magic" code. Change-Id: I8b7f8f060da1b211177af49be20faa8b574ac3f3 diff --git a/vcl/inc/PhysicalFontCollection.hxx b/vcl/inc/PhysicalFontCollection.hxx index 5b506a3..37c13d6 100644 --- a/vcl/inc/PhysicalFontCollection.hxx +++ b/vcl/inc/PhysicalFontCollection.hxx @@ -25,6 +25,8 @@ #include "fontinstance.hxx" #include "PhysicalFontFamily.hxx" +#define MAX_GLYPHFALLBACK 16 + class ImplGlyphFallbackFontSubstitution; class ImplPreMatchFontSubstitution; diff --git a/vcl/inc/magic.h b/vcl/inc/magic.h deleted file mode 100644 index 8f32567..0000000 --- a/vcl/inc/magic.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_VCL_INC_MAGIC_H -#define INCLUDED_VCL_INC_MAGIC_H - -#define MAX_FALLBACK 16 - -#endif // INCLUDED_VCL_INC_MAGIC_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index b78041f..d7ac946 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -36,9 +36,10 @@ typedef unsigned short LanguageType; #endif -#include "magic.h" #include "salglyphid.hxx" +#define MAX_FALLBACK 16 + class SalGraphics; class PhysicalFontFace; enum class SalLayoutFlags; diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 61a8a9f..bb168c0 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -30,7 +30,6 @@ #include "graphite_features.hxx" #endif -#include "magic.h" #include "outdev.h" #include "fontinstance.hxx" #include "fontattributes.hxx" @@ -156,7 +155,7 @@ void PhysicalFontCollection::ImplInitGenericGlyphFallback() const if( !**ppNames ) // #i46456# check for empty string, i.e., deref string itself not only ptr to it { if( nBestQuality > 0 ) - if( ++nMaxLevel >= MAX_FALLBACK ) + if( ++nMaxLevel >= MAX_GLYPHFALLBACK ) break; if( !ppNames[1] ) @@ -182,7 +181,7 @@ void PhysicalFontCollection::ImplInitGenericGlyphFallback() const nBestQuality = pFallbackFont->GetMinQuality(); // store available glyph fallback fonts if( !pFallbackList ) - pFallbackList = new PhysicalFontFamily*[ MAX_FALLBACK ]; + pFallbackList = new PhysicalFontFamily*[ MAX_GLYPHFALLBACK ]; pFallbackList[ nMaxLevel ] = pFallbackFont; if( !bHasEudc && !nMaxLevel ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits