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
7785c201
Kaydet (Commit)
7785c201
authored
Ock 07, 2016
tarafından
Chris Sherlock
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: split more font classes from outfont.hxx
Change-Id: Ifa10c3b954dd245ff8357b790b59316b3fb111a9
üst
7aeb2e8c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
188 additions
and
111 deletions
+188
-111
PhysicalFontFace.hxx
vcl/inc/PhysicalFontFace.hxx
+1
-0
fontattributes.hxx
vcl/inc/fontattributes.hxx
+4
-4
fontselect.hxx
vcl/inc/fontselect.hxx
+88
-0
outfont.hxx
vcl/inc/outfont.hxx
+4
-107
textlineinfo.hxx
vcl/inc/textlineinfo.hxx
+88
-0
pdfwriter_impl.cxx
vcl/source/gdi/pdfwriter_impl.cxx
+1
-0
text.cxx
vcl/source/outdev/text.cxx
+2
-0
No files found.
vcl/inc/PhysicalFontFace.hxx
Dosyayı görüntüle @
7785c201
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "outfont.hxx"
#include "outfont.hxx"
#include "fontattributes.hxx"
#include "fontattributes.hxx"
#include "fontselect.hxx"
class
ImplFontEntry
;
class
ImplFontEntry
;
struct
FontMatchStatus
;
struct
FontMatchStatus
;
...
...
vcl/inc/fontattributes.hxx
Dosyayı görüntüle @
7785c201
...
@@ -17,15 +17,15 @@
...
@@ -17,15 +17,15 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#ifndef INCLUDED_VCL_INC_FONT
SELECT
_HXX
#ifndef INCLUDED_VCL_INC_FONT
ATTRIBUTES
_HXX
#define INCLUDED_VCL_INC_FONT
SELECT
_HXX
#define INCLUDED_VCL_INC_FONT
ATTRIBUTES
_HXX
#include <i18nlangtag/lang.h>
#include <i18nlangtag/lang.h>
#include <vcl/dllapi.h>
#include <vcl/dllapi.h>
#include <unotools/fontdefs.hxx>
#include <unotools/fontdefs.hxx>
#include <vcl/vclenum.hxx>
#include <vcl/vclenum.hxx>
#include "
outfon
t.hxx"
#include "
fontselec
t.hxx"
#include <unordered_map>
#include <unordered_map>
...
@@ -241,6 +241,6 @@ private:
...
@@ -241,6 +241,6 @@ private:
};
};
#endif // INCLUDED_VCL_INC_FONT
SELECT
_HXX
#endif // INCLUDED_VCL_INC_FONT
ATTRIBUTES
_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/inc/fontselect.hxx
0 → 100644
Dosyayı görüntüle @
7785c201
/* -*- 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_FONTSELECT_HXX
#define INCLUDED_VCL_INC_FONTSELECT_HXX
#include <vcl/dllapi.h>
#include "fontattributes.hxx"
#include <unordered_map>
class
PhysicalFontFace
;
class
ImplFontEntry
;
class
ImplFontCache
;
namespace
vcl
{
class
Font
;
}
class
ConvertChar
;
class
OutputDevice
;
class
Size
;
class
FontSelectPatternAttributes
:
public
ImplFontAttributes
{
public
:
FontSelectPatternAttributes
(
const
vcl
::
Font
&
,
const
OUString
&
rSearchName
,
const
Size
&
,
float
fExactHeight
);
#ifdef WNT
FontSelectPatternAttributes
(
const
PhysicalFontFace
&
,
const
Size
&
,
float
fExactHeight
,
int
nOrientation
,
bool
bVertical
);
#endif
size_t
hashCode
()
const
;
bool
operator
==
(
const
FontSelectPatternAttributes
&
rOther
)
const
;
bool
operator
!=
(
const
FontSelectPatternAttributes
&
rOther
)
const
{
return
!
(
*
this
==
rOther
);
}
public
:
OUString
maTargetName
;
// name of the font name token that is chosen
OUString
maSearchName
;
// name of the font that matches best
int
mnWidth
;
// width of font in pixel units
int
mnHeight
;
// height of font in pixel units
float
mfExactHeight
;
// requested height (in pixels with subpixel details)
int
mnOrientation
;
// text orientation in 3600 system
LanguageType
meLanguage
;
// text language
bool
mbVertical
;
// vertical mode of requested font
bool
mbNonAntialiased
;
// true if antialiasing is disabled
bool
mbEmbolden
;
// Force emboldening
ItalicMatrix
maItalicMatrix
;
// Force matrix for slant
};
class
FontSelectPattern
:
public
FontSelectPatternAttributes
{
public
:
FontSelectPattern
(
const
vcl
::
Font
&
,
const
OUString
&
rSearchName
,
const
Size
&
,
float
fExactHeight
);
#ifdef WNT
// ifdeffed to prevent it going into unusedcode.easy
FontSelectPattern
(
const
PhysicalFontFace
&
,
const
Size
&
,
float
fExactHeight
,
int
nOrientation
,
bool
bVertical
);
#endif
public
:
// TODO: change to private
const
PhysicalFontFace
*
mpFontData
;
// a matching PhysicalFontFace object
ImplFontEntry
*
mpFontEntry
;
// pointer to the resulting FontCache entry
void
copyAttributes
(
const
FontSelectPatternAttributes
&
rAttributes
);
};
#endif // INCLUDED_VCL_INC_FONTSELECT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/inc/outfont.hxx
Dosyayı görüntüle @
7785c201
...
@@ -20,70 +20,17 @@
...
@@ -20,70 +20,17 @@
#ifndef INCLUDED_VCL_INC_OUTFONT_HXX
#ifndef INCLUDED_VCL_INC_OUTFONT_HXX
#define INCLUDED_VCL_INC_OUTFONT_HXX
#define INCLUDED_VCL_INC_OUTFONT_HXX
#include <sal/types.h>
#include <vcl/dllapi.h>
#include <vcl/dllapi.h>
#include "fontselect.hxx"
#include "fontattributes.hxx"
#include "fontattributes.hxx"
#include <unordered_map>
#include <unordered_map>
class
PhysicalFontFace
;
class
ImplFontEntry
;
class
ImplFontCache
;
namespace
vcl
{
class
Font
;
}
namespace
vcl
{
class
Font
;
}
class
ImplFontCache
;
class
ConvertChar
;
class
ConvertChar
;
class
OutputDevice
;
class
Size
;
class
FontSelectPatternAttributes
:
public
ImplFontAttributes
{
public
:
FontSelectPatternAttributes
(
const
vcl
::
Font
&
,
const
OUString
&
rSearchName
,
const
Size
&
,
float
fExactHeight
);
#ifdef WNT
FontSelectPatternAttributes
(
const
PhysicalFontFace
&
,
const
Size
&
,
float
fExactHeight
,
int
nOrientation
,
bool
bVertical
);
#endif
size_t
hashCode
()
const
;
bool
operator
==
(
const
FontSelectPatternAttributes
&
rOther
)
const
;
bool
operator
!=
(
const
FontSelectPatternAttributes
&
rOther
)
const
{
return
!
(
*
this
==
rOther
);
}
public
:
OUString
maTargetName
;
// name of the font name token that is chosen
OUString
maSearchName
;
// name of the font that matches best
int
mnWidth
;
// width of font in pixel units
int
mnHeight
;
// height of font in pixel units
float
mfExactHeight
;
// requested height (in pixels with subpixel details)
int
mnOrientation
;
// text orientation in 3600 system
LanguageType
meLanguage
;
// text language
bool
mbVertical
;
// vertical mode of requested font
bool
mbNonAntialiased
;
// true if antialiasing is disabled
bool
mbEmbolden
;
// Force emboldening
ItalicMatrix
maItalicMatrix
;
// Force matrix for slant
};
class
FontSelectPattern
:
public
FontSelectPatternAttributes
{
public
:
FontSelectPattern
(
const
vcl
::
Font
&
,
const
OUString
&
rSearchName
,
const
Size
&
,
float
fExactHeight
);
#ifdef WNT
// ifdeffed to prevent it going into unusedcode.easy
FontSelectPattern
(
const
PhysicalFontFace
&
,
const
Size
&
,
float
fExactHeight
,
int
nOrientation
,
bool
bVertical
);
#endif
public
:
// TODO: change to private
const
PhysicalFontFace
*
mpFontData
;
// a matching PhysicalFontFace object
ImplFontEntry
*
mpFontEntry
;
// pointer to the resulting FontCache entry
void
copyAttributes
(
const
FontSelectPatternAttributes
&
rAttributes
);
};
// - ImplFontEntry -
// TODO: rename ImplFontEntry to LogicalFontInstance
// TODO: rename ImplFontEntry to LogicalFontInstance
// TODO: allow sharing of metrics for related fonts
// TODO: allow sharing of metrics for related fonts
...
@@ -121,56 +68,6 @@ private:
...
@@ -121,56 +68,6 @@ private:
UnicodeFallbackList
*
mpUnicodeFallbackList
;
UnicodeFallbackList
*
mpUnicodeFallbackList
;
};
};
class
ImplTextLineInfo
{
private
:
long
mnWidth
;
sal_Int32
mnIndex
;
sal_Int32
mnLen
;
public
:
ImplTextLineInfo
(
long
nWidth
,
sal_Int32
nIndex
,
sal_Int32
nLen
)
{
if
(
nIndex
==
-
1
||
nIndex
==
0x0FFFF
||
nLen
==
-
1
||
nLen
==
0x0FFFF
)
{
SAL_INFO
(
"sal.rtl.xub"
,
"ImplTextLine Info Suspicious arguments nIndex:"
<<
nIndex
<<
" nLen:"
<<
nLen
);
}
mnWidth
=
nWidth
;
mnIndex
=
nIndex
;
mnLen
=
nLen
;
}
long
GetWidth
()
const
{
return
mnWidth
;
}
sal_Int32
GetIndex
()
const
{
return
mnIndex
;
}
sal_Int32
GetLen
()
const
{
return
mnLen
;
}
};
#define MULTITEXTLINEINFO_RESIZE 16
class
ImplMultiTextLineInfo
{
public
:
ImplMultiTextLineInfo
();
~
ImplMultiTextLineInfo
();
void
AddLine
(
ImplTextLineInfo
*
pLine
);
void
Clear
();
ImplTextLineInfo
*
GetLine
(
sal_Int32
nLine
)
const
{
return
mpLines
[
nLine
];
}
sal_Int32
Count
()
const
{
return
mnLines
;
}
private
:
ImplMultiTextLineInfo
(
const
ImplMultiTextLineInfo
&
)
=
delete
;
ImplMultiTextLineInfo
&
operator
=
(
const
ImplMultiTextLineInfo
&
)
=
delete
;
ImplTextLineInfo
**
mpLines
;
sal_Int32
mnLines
;
sal_Int32
mnSize
;
};
#endif // INCLUDED_VCL_INC_OUTFONT_HXX
#endif // INCLUDED_VCL_INC_OUTFONT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/inc/textlineinfo.hxx
0 → 100644
Dosyayı görüntüle @
7785c201
/* -*- 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_TEXTLINEINFO_HXX
#define INCLUDED_VCL_INC_TEXTLINEINFO_HXX
#include <vcl/dllapi.h>
#include <sal/types.h>
#include <unordered_map>
class
PhysicalFontFace
;
class
ImplFontEntry
;
class
ImplFontCache
;
namespace
vcl
{
class
Font
;
}
class
ConvertChar
;
class
OutputDevice
;
class
Size
;
class
ImplTextLineInfo
{
private
:
long
mnWidth
;
sal_Int32
mnIndex
;
sal_Int32
mnLen
;
public
:
ImplTextLineInfo
(
long
nWidth
,
sal_Int32
nIndex
,
sal_Int32
nLen
)
{
if
(
nIndex
==
-
1
||
nIndex
==
0x0FFFF
||
nLen
==
-
1
||
nLen
==
0x0FFFF
)
{
SAL_INFO
(
"sal.rtl.xub"
,
"ImplTextLine Info Suspicious arguments nIndex:"
<<
nIndex
<<
" nLen:"
<<
nLen
);
}
mnWidth
=
nWidth
;
mnIndex
=
nIndex
;
mnLen
=
nLen
;
}
long
GetWidth
()
const
{
return
mnWidth
;
}
sal_Int32
GetIndex
()
const
{
return
mnIndex
;
}
sal_Int32
GetLen
()
const
{
return
mnLen
;
}
};
#define MULTITEXTLINEINFO_RESIZE 16
class
ImplMultiTextLineInfo
{
public
:
ImplMultiTextLineInfo
();
~
ImplMultiTextLineInfo
();
void
AddLine
(
ImplTextLineInfo
*
pLine
);
void
Clear
();
ImplTextLineInfo
*
GetLine
(
sal_Int32
nLine
)
const
{
return
mpLines
[
nLine
];
}
sal_Int32
Count
()
const
{
return
mnLines
;
}
private
:
ImplMultiTextLineInfo
(
const
ImplMultiTextLineInfo
&
)
=
delete
;
ImplMultiTextLineInfo
&
operator
=
(
const
ImplMultiTextLineInfo
&
)
=
delete
;
ImplTextLineInfo
**
mpLines
;
sal_Int32
mnLines
;
sal_Int32
mnSize
;
};
#endif // INCLUDED_VCL_INC_TEXTLINEINFO_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/source/gdi/pdfwriter_impl.cxx
Dosyayı görüntüle @
7785c201
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
#include "salgdi.hxx"
#include "salgdi.hxx"
#include "sallayout.hxx"
#include "sallayout.hxx"
#include "textlayout.hxx"
#include "textlayout.hxx"
#include "textlineinfo.hxx"
#include "pdfwriter_impl.hxx"
#include "pdfwriter_impl.hxx"
...
...
vcl/source/outdev/text.cxx
Dosyayı görüntüle @
7785c201
...
@@ -47,6 +47,8 @@
...
@@ -47,6 +47,8 @@
#include <svdata.hxx>
#include <svdata.hxx>
#include <textlayout.hxx>
#include <textlayout.hxx>
#include "textlineinfo.hxx"
#include <config_graphite.h>
#include <config_graphite.h>
#if ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
#include "graphite_features.hxx"
#include "graphite_features.hxx"
...
...
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