Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f0841c6c
Kaydet (Commit)
f0841c6c
authored
Ock 14, 2016
tarafından
Chris Sherlock
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: move metric.cxx to font/fontmetric.cxx
Change-Id: If8e4a479967a84f7c43c762c55a3a60b7083d6d9
üst
a05c5deb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
184 additions
and
242 deletions
+184
-242
Library_vcl.mk
vcl/Library_vcl.mk
+0
-1
fontmetric.cxx
vcl/source/font/fontmetric.cxx
+184
-34
metric.cxx
vcl/source/gdi/metric.cxx
+0
-207
No files found.
vcl/Library_vcl.mk
Dosyayı görüntüle @
f0841c6c
...
@@ -286,7 +286,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
...
@@ -286,7 +286,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/gdi/lineinfo \
vcl/source/gdi/lineinfo \
vcl/source/gdi/mapmod \
vcl/source/gdi/mapmod \
vcl/source/gdi/metaact \
vcl/source/gdi/metaact \
vcl/source/gdi/metric \
vcl/source/gdi/octree \
vcl/source/gdi/octree \
vcl/source/gdi/oldprintadaptor \
vcl/source/gdi/oldprintadaptor \
vcl/source/gdi/pdfextoutdevdata \
vcl/source/gdi/pdfextoutdevdata \
...
...
vcl/source/font/fontmetric.cxx
Dosyayı görüntüle @
f0841c6c
...
@@ -17,53 +17,203 @@
...
@@ -17,53 +17,203 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#include "i18nlangtag/mslangid.hxx"
#include <i18nlangtag/mslangid.hxx>
#include <unotools/configmgr.hxx>
#include <vcl/virdev.hxx>
#include <vcl/print.hxx>
#include <vcl/outdev.hxx>
#include <vcl/edit.hxx>
#include <vcl/settings.hxx>
#include <vcl/sysdata.hxx>
#include <vcl/fontcharmap.hxx>
#include <vcl/fontcharmap.hxx>
#include <vcl/metric.hxx>
#include "sallayout.hxx"
#include "impfontmetric.hxx"
#include "svdata.hxx"
#include "impfont.hxx"
#include "outdata.hxx"
#include "fontinstance.hxx"
#include "fontattributes.hxx"
#include "impfontmetricdata.hxx"
#include "impfontmetricdata.hxx"
#include "outdev.h"
#include "window.h"
#include "PhysicalFontCollection.hxx"
#include "PhysicalFontFace.hxx"
#include "PhysicalFontFace.hxx"
#include "PhysicalFontFamily.hxx"
#include "svids.hrc"
#include <vector>
#include <set>
#include <config_graphite.h>
#include <cstdio>
#if ENABLE_GRAPHITE
#include "graphite_features.hxx"
#endif
#include "../gdi/pdfwriter_impl.hxx"
#include <boost/functional/hash.hpp>
#include <boost/functional/hash.hpp>
#include <cmath>
#include <cstring>
#include <memory>
#include <algorithm>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
rtl
;
using
namespace
::
rtl
;
using
namespace
::
utl
;
using
namespace
::
utl
;
FontMetric
::
FontMetric
()
:
mpImplMetric
(
new
ImplFontMetric
()
)
{}
FontMetric
::
FontMetric
(
const
FontMetric
&
rFontMetric
)
:
Font
(
rFontMetric
)
,
mpImplMetric
(
rFontMetric
.
mpImplMetric
)
{}
FontMetric
::~
FontMetric
()
{
mpImplMetric
=
nullptr
;
}
FontMetric
&
FontMetric
::
operator
=
(
const
FontMetric
&
rFontMetric
)
{
Font
::
operator
=
(
rFontMetric
);
if
(
mpImplMetric
!=
rFontMetric
.
mpImplMetric
)
{
mpImplMetric
=
rFontMetric
.
mpImplMetric
;
}
return
*
this
;
}
bool
FontMetric
::
operator
==
(
const
FontMetric
&
rFontMetric
)
const
{
if
(
!
Font
::
operator
==
(
rFontMetric
)
)
return
false
;
if
(
mpImplMetric
==
rFontMetric
.
mpImplMetric
)
return
true
;
if
(
*
mpImplMetric
==
*
rFontMetric
.
mpImplMetric
)
return
true
;
return
false
;
}
FontType
FontMetric
::
GetType
()
const
{
return
(
mpImplMetric
->
IsScalable
()
?
TYPE_SCALABLE
:
TYPE_RASTER
);
}
long
FontMetric
::
GetAscent
()
const
{
return
mpImplMetric
->
GetAscent
();
}
void
FontMetric
::
SetAscent
(
long
nAscent
)
{
mpImplMetric
->
SetAscent
(
nAscent
);
}
long
FontMetric
::
GetDescent
()
const
{
return
mpImplMetric
->
GetDescent
();
}
void
FontMetric
::
SetDescent
(
long
nDescent
)
{
mpImplMetric
->
SetDescent
(
nDescent
);
}
long
FontMetric
::
GetInternalLeading
()
const
{
return
mpImplMetric
->
GetInternalLeading
();
}
void
FontMetric
::
SetInternalLeading
(
long
nLeading
)
{
mpImplMetric
->
SetInternalLeading
(
nLeading
);
}
long
FontMetric
::
GetExternalLeading
()
const
{
return
mpImplMetric
->
GetExternalLeading
();
}
void
FontMetric
::
SetExternalLeading
(
long
nLeading
)
{
mpImplMetric
->
SetExternalLeading
(
nLeading
);
}
long
FontMetric
::
GetLineHeight
()
const
{
return
mpImplMetric
->
GetLineHeight
();
}
void
FontMetric
::
SetLineHeight
(
long
nHeight
)
{
mpImplMetric
->
SetLineHeight
(
nHeight
);
}
long
FontMetric
::
GetSlant
()
const
{
return
mpImplMetric
->
GetSlant
();
}
void
FontMetric
::
SetSlant
(
long
nSlant
)
{
mpImplMetric
->
SetSlant
(
nSlant
);
}
long
FontMetric
::
GetBulletOffset
()
const
{
return
mpImplMetric
->
GetBulletOffset
();
}
void
FontMetric
::
SetBulletOffset
(
long
nOffset
)
{
mpImplMetric
->
SetBulletOffset
(
nOffset
);
}
bool
FontMetric
::
IsScalable
()
const
{
return
mpImplMetric
->
IsScalable
();
}
void
FontMetric
::
SetScalableFlag
(
bool
bScalable
)
{
mpImplMetric
->
SetScalableFlag
(
bScalable
);
}
bool
FontMetric
::
IsFullstopCentered
()
const
{
return
mpImplMetric
->
IsFullstopCentered
();
}
void
FontMetric
::
SetFullstopCenteredFlag
(
bool
bScalable
)
{
mpImplMetric
->
SetFullstopCenteredFlag
(
bScalable
);
}
bool
FontMetric
::
IsBuiltInFont
()
const
{
return
mpImplMetric
->
IsBuiltInFont
();
}
void
FontMetric
::
SetBuiltInFontFlag
(
bool
bIsBuiltInFont
)
{
mpImplMetric
->
SetBuiltInFontFlag
(
bIsBuiltInFont
);
}
ImplFontMetric
::
ImplFontMetric
()
:
mnAscent
(
0
),
mnDescent
(
0
),
mnIntLeading
(
0
),
mnExtLeading
(
0
),
mnLineHeight
(
0
),
mnSlant
(
0
),
mnBulletOffset
(
0
),
mnRefCount
(
0
),
mbScalableFont
(
false
),
mbFullstopCentered
(
false
),
mbDevice
(
false
)
{}
bool
ImplFontMetric
::
operator
==
(
const
ImplFontMetric
&
r
)
const
{
if
(
mbScalableFont
!=
r
.
mbScalableFont
||
mbFullstopCentered
!=
r
.
mbFullstopCentered
||
mbDevice
!=
r
.
mbDevice
)
// mbDevice == built-in font flag
return
false
;
if
(
mnAscent
!=
r
.
mnAscent
)
return
false
;
if
(
mnDescent
!=
r
.
mnDescent
)
return
false
;
if
(
mnIntLeading
!=
r
.
mnIntLeading
)
return
false
;
if
(
mnExtLeading
!=
r
.
mnExtLeading
)
return
false
;
if
(
mnSlant
!=
r
.
mnSlant
)
return
false
;
return
true
;
}
ImplFontMetricData
::
ImplFontMetricData
(
const
FontSelectPattern
&
rFontSelData
)
ImplFontMetricData
::
ImplFontMetricData
(
const
FontSelectPattern
&
rFontSelData
)
:
FontAttributes
(
rFontSelData
)
:
FontAttributes
(
rFontSelData
)
,
mnRefCount
(
0
)
,
mnRefCount
(
0
)
...
...
vcl/source/gdi/metric.cxx
deleted
100644 → 0
Dosyayı görüntüle @
a05c5deb
/* -*- 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 .
*/
#include <vcl/metric.hxx>
#include "impfontmetric.hxx"
#include <vector>
#include <set>
#include <cstdio>
FontMetric
::
FontMetric
()
:
mpImplMetric
(
new
ImplFontMetric
()
)
{}
FontMetric
::
FontMetric
(
const
FontMetric
&
rFontMetric
)
:
Font
(
rFontMetric
)
,
mpImplMetric
(
rFontMetric
.
mpImplMetric
)
{}
FontMetric
::~
FontMetric
()
{
mpImplMetric
=
nullptr
;
}
FontMetric
&
FontMetric
::
operator
=
(
const
FontMetric
&
rFontMetric
)
{
Font
::
operator
=
(
rFontMetric
);
if
(
mpImplMetric
!=
rFontMetric
.
mpImplMetric
)
{
mpImplMetric
=
rFontMetric
.
mpImplMetric
;
}
return
*
this
;
}
bool
FontMetric
::
operator
==
(
const
FontMetric
&
rFontMetric
)
const
{
if
(
!
Font
::
operator
==
(
rFontMetric
)
)
return
false
;
if
(
mpImplMetric
==
rFontMetric
.
mpImplMetric
)
return
true
;
if
(
*
mpImplMetric
==
*
rFontMetric
.
mpImplMetric
)
return
true
;
return
false
;
}
FontType
FontMetric
::
GetType
()
const
{
return
(
mpImplMetric
->
IsScalable
()
?
TYPE_SCALABLE
:
TYPE_RASTER
);
}
long
FontMetric
::
GetAscent
()
const
{
return
mpImplMetric
->
GetAscent
();
}
void
FontMetric
::
SetAscent
(
long
nAscent
)
{
mpImplMetric
->
SetAscent
(
nAscent
);
}
long
FontMetric
::
GetDescent
()
const
{
return
mpImplMetric
->
GetDescent
();
}
void
FontMetric
::
SetDescent
(
long
nDescent
)
{
mpImplMetric
->
SetDescent
(
nDescent
);
}
long
FontMetric
::
GetInternalLeading
()
const
{
return
mpImplMetric
->
GetInternalLeading
();
}
void
FontMetric
::
SetInternalLeading
(
long
nLeading
)
{
mpImplMetric
->
SetInternalLeading
(
nLeading
);
}
long
FontMetric
::
GetExternalLeading
()
const
{
return
mpImplMetric
->
GetExternalLeading
();
}
void
FontMetric
::
SetExternalLeading
(
long
nLeading
)
{
mpImplMetric
->
SetExternalLeading
(
nLeading
);
}
long
FontMetric
::
GetLineHeight
()
const
{
return
mpImplMetric
->
GetLineHeight
();
}
void
FontMetric
::
SetLineHeight
(
long
nHeight
)
{
mpImplMetric
->
SetLineHeight
(
nHeight
);
}
long
FontMetric
::
GetSlant
()
const
{
return
mpImplMetric
->
GetSlant
();
}
void
FontMetric
::
SetSlant
(
long
nSlant
)
{
mpImplMetric
->
SetSlant
(
nSlant
);
}
long
FontMetric
::
GetBulletOffset
()
const
{
return
mpImplMetric
->
GetBulletOffset
();
}
void
FontMetric
::
SetBulletOffset
(
long
nOffset
)
{
mpImplMetric
->
SetBulletOffset
(
nOffset
);
}
bool
FontMetric
::
IsScalable
()
const
{
return
mpImplMetric
->
IsScalable
();
}
void
FontMetric
::
SetScalableFlag
(
bool
bScalable
)
{
mpImplMetric
->
SetScalableFlag
(
bScalable
);
}
bool
FontMetric
::
IsFullstopCentered
()
const
{
return
mpImplMetric
->
IsFullstopCentered
();
}
void
FontMetric
::
SetFullstopCenteredFlag
(
bool
bScalable
)
{
mpImplMetric
->
SetFullstopCenteredFlag
(
bScalable
);
}
bool
FontMetric
::
IsBuiltInFont
()
const
{
return
mpImplMetric
->
IsBuiltInFont
();
}
void
FontMetric
::
SetBuiltInFontFlag
(
bool
bIsBuiltInFont
)
{
mpImplMetric
->
SetBuiltInFontFlag
(
bIsBuiltInFont
);
}
ImplFontMetric
::
ImplFontMetric
()
:
mnAscent
(
0
),
mnDescent
(
0
),
mnIntLeading
(
0
),
mnExtLeading
(
0
),
mnLineHeight
(
0
),
mnSlant
(
0
),
mnBulletOffset
(
0
),
mnRefCount
(
0
),
mbScalableFont
(
false
),
mbFullstopCentered
(
false
),
mbDevice
(
false
)
{}
bool
ImplFontMetric
::
operator
==
(
const
ImplFontMetric
&
r
)
const
{
if
(
mbScalableFont
!=
r
.
mbScalableFont
||
mbFullstopCentered
!=
r
.
mbFullstopCentered
||
mbDevice
!=
r
.
mbDevice
)
// mbDevice == built-in font flag
return
false
;
if
(
mnAscent
!=
r
.
mnAscent
)
return
false
;
if
(
mnDescent
!=
r
.
mnDescent
)
return
false
;
if
(
mnIntLeading
!=
r
.
mnIntLeading
)
return
false
;
if
(
mnExtLeading
!=
r
.
mnExtLeading
)
return
false
;
if
(
mnSlant
!=
r
.
mnSlant
)
return
false
;
return
true
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment