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
2f1fb77e
Kaydet (Commit)
2f1fb77e
authored
Eyl 30, 2010
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i64671# transfer VCL's FontPitch through DrawingLayer to Canvas
üst
1a0dbb9f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
4 deletions
+25
-4
fontattribute.hxx
drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
+2
-0
fontattribute.cxx
drawinglayer/source/attribute/fontattribute.cxx
+16
-4
textlayoutdevice.cxx
drawinglayer/source/primitive2d/textlayoutdevice.cxx
+2
-0
canvasprocessor.cxx
drawinglayer/source/processor2d/canvasprocessor.cxx
+5
-0
No files found.
drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
Dosyayı görüntüle @
2f1fb77e
...
@@ -65,6 +65,7 @@ namespace drawinglayer
...
@@ -65,6 +65,7 @@ namespace drawinglayer
bool
bSymbol
=
false
,
bool
bSymbol
=
false
,
bool
bVertical
=
false
,
bool
bVertical
=
false
,
bool
bItalic
=
false
,
bool
bItalic
=
false
,
bool
bMonospaced
=
false
,
bool
bOutline
=
false
,
bool
bOutline
=
false
,
bool
bRTL
=
false
,
bool
bRTL
=
false
,
bool
bBiDiStrong
=
false
);
bool
bBiDiStrong
=
false
);
...
@@ -89,6 +90,7 @@ namespace drawinglayer
...
@@ -89,6 +90,7 @@ namespace drawinglayer
bool
getOutline
()
const
;
bool
getOutline
()
const
;
bool
getRTL
()
const
;
bool
getRTL
()
const
;
bool
getBiDiStrong
()
const
;
bool
getBiDiStrong
()
const
;
bool
getMonospaced
()
const
;
};
};
}
// end of namespace attribute
}
// end of namespace attribute
}
// end of namespace drawinglayer
}
// end of namespace drawinglayer
...
...
drawinglayer/source/attribute/fontattribute.cxx
Dosyayı görüntüle @
2f1fb77e
...
@@ -55,6 +55,7 @@ namespace drawinglayer
...
@@ -55,6 +55,7 @@ namespace drawinglayer
unsigned
mbOutline
:
1
;
// Outline Flag
unsigned
mbOutline
:
1
;
// Outline Flag
unsigned
mbRTL
:
1
;
// RTL Flag
unsigned
mbRTL
:
1
;
// RTL Flag
unsigned
mbBiDiStrong
:
1
;
// BiDi Flag
unsigned
mbBiDiStrong
:
1
;
// BiDi Flag
unsigned
mbMonospaced
:
1
;
ImpFontAttribute
(
ImpFontAttribute
(
const
String
&
rFamilyName
,
const
String
&
rFamilyName
,
...
@@ -63,6 +64,7 @@ namespace drawinglayer
...
@@ -63,6 +64,7 @@ namespace drawinglayer
bool
bSymbol
,
bool
bSymbol
,
bool
bVertical
,
bool
bVertical
,
bool
bItalic
,
bool
bItalic
,
bool
bMonospaced
,
bool
bOutline
,
bool
bOutline
,
bool
bRTL
,
bool
bRTL
,
bool
bBiDiStrong
)
bool
bBiDiStrong
)
...
@@ -75,7 +77,8 @@ namespace drawinglayer
...
@@ -75,7 +77,8 @@ namespace drawinglayer
mbItalic
(
bItalic
),
mbItalic
(
bItalic
),
mbOutline
(
bOutline
),
mbOutline
(
bOutline
),
mbRTL
(
bRTL
),
mbRTL
(
bRTL
),
mbBiDiStrong
(
bBiDiStrong
)
mbBiDiStrong
(
bBiDiStrong
),
mbMonospaced
(
bMonospaced
)
{
{
}
}
...
@@ -89,6 +92,7 @@ namespace drawinglayer
...
@@ -89,6 +92,7 @@ namespace drawinglayer
bool
getOutline
()
const
{
return
mbOutline
;
}
bool
getOutline
()
const
{
return
mbOutline
;
}
bool
getRTL
()
const
{
return
mbRTL
;
}
bool
getRTL
()
const
{
return
mbRTL
;
}
bool
getBiDiStrong
()
const
{
return
mbBiDiStrong
;
}
bool
getBiDiStrong
()
const
{
return
mbBiDiStrong
;
}
bool
getMonospaced
()
const
{
return
mbMonospaced
;
}
bool
operator
==
(
const
ImpFontAttribute
&
rCompare
)
const
bool
operator
==
(
const
ImpFontAttribute
&
rCompare
)
const
{
{
...
@@ -100,7 +104,8 @@ namespace drawinglayer
...
@@ -100,7 +104,8 @@ namespace drawinglayer
&&
getItalic
()
==
rCompare
.
getItalic
()
&&
getItalic
()
==
rCompare
.
getItalic
()
&&
getOutline
()
==
rCompare
.
getOutline
()
&&
getOutline
()
==
rCompare
.
getOutline
()
&&
getRTL
()
==
rCompare
.
getRTL
()
&&
getRTL
()
==
rCompare
.
getRTL
()
&&
getBiDiStrong
()
==
rCompare
.
getBiDiStrong
());
&&
getBiDiStrong
()
==
rCompare
.
getBiDiStrong
()
&&
getMonospaced
()
==
rCompare
.
getMonospaced
());
}
}
static
ImpFontAttribute
*
get_global_default
()
static
ImpFontAttribute
*
get_global_default
()
...
@@ -112,7 +117,7 @@ namespace drawinglayer
...
@@ -112,7 +117,7 @@ namespace drawinglayer
pDefault
=
new
ImpFontAttribute
(
pDefault
=
new
ImpFontAttribute
(
String
(),
String
(),
String
(),
String
(),
0
,
0
,
false
,
false
,
false
,
false
,
false
,
false
);
false
,
false
,
false
,
false
,
false
,
false
,
false
);
// never delete; start with RefCount 1, not 0
// never delete; start with RefCount 1, not 0
pDefault
->
mnRefCount
++
;
pDefault
->
mnRefCount
++
;
...
@@ -129,11 +134,12 @@ namespace drawinglayer
...
@@ -129,11 +134,12 @@ namespace drawinglayer
bool
bSymbol
,
bool
bSymbol
,
bool
bVertical
,
bool
bVertical
,
bool
bItalic
,
bool
bItalic
,
bool
bMonospaced
,
bool
bOutline
,
bool
bOutline
,
bool
bRTL
,
bool
bRTL
,
bool
bBiDiStrong
)
bool
bBiDiStrong
)
:
mpFontAttribute
(
new
ImpFontAttribute
(
:
mpFontAttribute
(
new
ImpFontAttribute
(
rFamilyName
,
rStyleName
,
nWeight
,
bSymbol
,
bVertical
,
bItalic
,
bOutline
,
bRTL
,
bBiDiStrong
))
rFamilyName
,
rStyleName
,
nWeight
,
bSymbol
,
bVertical
,
bItalic
,
b
Monospaced
,
b
Outline
,
bRTL
,
bBiDiStrong
))
{
{
}
}
...
@@ -246,6 +252,12 @@ namespace drawinglayer
...
@@ -246,6 +252,12 @@ namespace drawinglayer
return
mpFontAttribute
->
getBiDiStrong
();
return
mpFontAttribute
->
getBiDiStrong
();
}
}
bool
FontAttribute
::
getMonospaced
()
const
{
return
mpFontAttribute
->
getMonospaced
();
}
}
// end of namespace attribute
}
// end of namespace attribute
}
// end of namespace drawinglayer
}
// end of namespace drawinglayer
...
...
drawinglayer/source/primitive2d/textlayoutdevice.cxx
Dosyayı görüntüle @
2f1fb77e
...
@@ -406,6 +406,7 @@ namespace drawinglayer
...
@@ -406,6 +406,7 @@ namespace drawinglayer
aRetval
.
SetWeight
(
static_cast
<
FontWeight
>
(
rFontAttribute
.
getWeight
()));
aRetval
.
SetWeight
(
static_cast
<
FontWeight
>
(
rFontAttribute
.
getWeight
()));
aRetval
.
SetItalic
(
rFontAttribute
.
getItalic
()
?
ITALIC_NORMAL
:
ITALIC_NONE
);
aRetval
.
SetItalic
(
rFontAttribute
.
getItalic
()
?
ITALIC_NORMAL
:
ITALIC_NONE
);
aRetval
.
SetOutline
(
rFontAttribute
.
getOutline
());
aRetval
.
SetOutline
(
rFontAttribute
.
getOutline
());
aRetval
.
SetPitch
(
rFontAttribute
.
getMonospaced
()
?
PITCH_FIXED
:
PITCH_VARIABLE
);
aRetval
.
SetLanguage
(
MsLangId
::
convertLocaleToLanguage
(
rLocale
));
aRetval
.
SetLanguage
(
MsLangId
::
convertLocaleToLanguage
(
rLocale
));
#ifdef WIN32
#ifdef WIN32
...
@@ -445,6 +446,7 @@ namespace drawinglayer
...
@@ -445,6 +446,7 @@ namespace drawinglayer
RTL_TEXTENCODING_SYMBOL
==
rFont
.
GetCharSet
(),
RTL_TEXTENCODING_SYMBOL
==
rFont
.
GetCharSet
(),
rFont
.
IsVertical
(),
rFont
.
IsVertical
(),
ITALIC_NONE
!=
rFont
.
GetItalic
(),
ITALIC_NONE
!=
rFont
.
GetItalic
(),
PITCH_FIXED
==
rFont
.
GetPitch
(),
rFont
.
IsOutline
(),
rFont
.
IsOutline
(),
bRTL
,
bRTL
,
bBiDiStrong
);
bBiDiStrong
);
...
...
drawinglayer/source/processor2d/canvasprocessor.cxx
Dosyayı görüntüle @
2f1fb77e
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
#include <basegfx/tuple/b2i64tuple.hxx>
#include <basegfx/tuple/b2i64tuple.hxx>
#include <basegfx/range/b2irange.hxx>
#include <basegfx/range/b2irange.hxx>
#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
#include <com/sun/star/rendering/StrokeAttributes.hpp>
#include <com/sun/star/rendering/StrokeAttributes.hpp>
#include <com/sun/star/rendering/PathJoinType.hpp>
#include <com/sun/star/rendering/PathJoinType.hpp>
...
@@ -1517,6 +1518,10 @@ namespace drawinglayer
...
@@ -1517,6 +1518,10 @@ namespace drawinglayer
aFontRequest
.
FontDescription
.
IsVertical
=
rFontAttr
.
getVertical
()
?
util
::
TriState_YES
:
util
::
TriState_NO
;
aFontRequest
.
FontDescription
.
IsVertical
=
rFontAttr
.
getVertical
()
?
util
::
TriState_YES
:
util
::
TriState_NO
;
// TODO(F2): improve vclenum->panose conversion
// TODO(F2): improve vclenum->panose conversion
aFontRequest
.
FontDescription
.
FontDescription
.
Weight
=
static_cast
<
sal_uInt8
>
(
rFontAttr
.
getWeight
());
aFontRequest
.
FontDescription
.
FontDescription
.
Weight
=
static_cast
<
sal_uInt8
>
(
rFontAttr
.
getWeight
());
aFontRequest
.
FontDescription
.
FontDescription
.
Proportion
=
rFontAttr
.
getMonospaced
()
?
rendering
::
PanoseProportion
::
MONO_SPACED
:
rendering
::
PanoseProportion
::
ANYTHING
;
aFontRequest
.
FontDescription
.
FontDescription
.
Letterform
=
rFontAttr
.
getItalic
()
?
9
:
0
;
aFontRequest
.
FontDescription
.
FontDescription
.
Letterform
=
rFontAttr
.
getItalic
()
?
9
:
0
;
// init CellSize to 1.0, else a default font height will be used
// init CellSize to 1.0, else a default font height will be used
...
...
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