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
756d0b1d
Kaydet (Commit)
756d0b1d
authored
Şub 20, 2014
tarafından
Zolnai Tamás
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
drawingML import: run fonts inside group shape
Change-Id: Ib54fe868c11c0c22b85d8821fa7274c80918362c
üst
191f648f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
0 deletions
+33
-0
textfont.hxx
include/oox/drawingml/textfont.hxx
+3
-0
textcharacterpropertiescontext.cxx
oox/source/drawingml/textcharacterpropertiescontext.cxx
+12
-0
textfont.cxx
oox/source/drawingml/textfont.cxx
+8
-0
dml-groupshape-runfonts.docx
sw/qa/extras/ooxmlimport/data/dml-groupshape-runfonts.docx
+0
-0
ooxmlimport.cxx
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+10
-0
No files found.
include/oox/drawingml/textfont.hxx
Dosyayı görüntüle @
756d0b1d
...
@@ -39,6 +39,9 @@ public:
...
@@ -39,6 +39,9 @@ public:
/** Sets attributes from the passed attribute list. */
/** Sets attributes from the passed attribute list. */
void
setAttributes
(
const
AttributeList
&
rAttribs
);
void
setAttributes
(
const
AttributeList
&
rAttribs
);
/** Sets font name and init other attributes. */
void
setAttributes
(
const
OUString
&
rFontName
);
/** Overwrites this text font with the passed text font, if it is used. */
/** Overwrites this text font with the passed text font, if it is used. */
void
assignIfUsed
(
const
TextFont
&
rTextFont
);
void
assignIfUsed
(
const
TextFont
&
rTextFont
);
...
...
oox/source/drawingml/textcharacterpropertiescontext.cxx
Dosyayı görüntüle @
756d0b1d
...
@@ -132,6 +132,18 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
...
@@ -132,6 +132,18 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
case
A_TOKEN
(
hlinkMouseOver
):
// CT_Hyperlink
case
A_TOKEN
(
hlinkMouseOver
):
// CT_Hyperlink
return
new
HyperLinkContext
(
*
this
,
rAttribs
,
mrTextCharacterProperties
.
maHyperlinkPropertyMap
);
return
new
HyperLinkContext
(
*
this
,
rAttribs
,
mrTextCharacterProperties
.
maHyperlinkPropertyMap
);
case
OOX_TOKEN
(
doc
,
rFonts
)
:
case
OOX_TOKEN
(
doc
,
rFonts
)
:
if
(
rAttribs
.
hasAttribute
(
OOX_TOKEN
(
doc
,
ascii
))
)
{
mrTextCharacterProperties
.
maLatinFont
.
setAttributes
(
rAttribs
.
getString
(
OOX_TOKEN
(
doc
,
ascii
),
OUString
()));
}
if
(
rAttribs
.
hasAttribute
(
OOX_TOKEN
(
doc
,
cs
))
)
{
mrTextCharacterProperties
.
maComplexFont
.
setAttributes
(
rAttribs
.
getString
(
OOX_TOKEN
(
doc
,
cs
),
OUString
()));
}
if
(
rAttribs
.
hasAttribute
(
OOX_TOKEN
(
doc
,
eastAsia
))
)
{
mrTextCharacterProperties
.
maAsianFont
.
setAttributes
(
rAttribs
.
getString
(
OOX_TOKEN
(
doc
,
eastAsia
),
OUString
()));
}
break
;
break
;
case
OOX_TOKEN
(
doc
,
b
):
case
OOX_TOKEN
(
doc
,
b
):
mrTextCharacterProperties
.
moBold
=
rAttribs
.
getBool
(
OOX_TOKEN
(
doc
,
val
),
true
);
mrTextCharacterProperties
.
moBold
=
rAttribs
.
getBool
(
OOX_TOKEN
(
doc
,
val
),
true
);
...
...
oox/source/drawingml/textfont.cxx
Dosyayı görüntüle @
756d0b1d
...
@@ -65,6 +65,14 @@ void TextFont::setAttributes( const AttributeList& rAttribs )
...
@@ -65,6 +65,14 @@ void TextFont::setAttributes( const AttributeList& rAttribs )
mnCharset
=
rAttribs
.
getInteger
(
XML_charset
,
WINDOWS_CHARSET_DEFAULT
);
mnCharset
=
rAttribs
.
getInteger
(
XML_charset
,
WINDOWS_CHARSET_DEFAULT
);
}
}
void
TextFont
::
setAttributes
(
const
OUString
&
sFontName
)
{
maTypeface
=
sFontName
;
maPanose
=
OUString
();
mnPitch
=
0
;
mnCharset
=
WINDOWS_CHARSET_DEFAULT
;
}
void
TextFont
::
assignIfUsed
(
const
TextFont
&
rTextFont
)
void
TextFont
::
assignIfUsed
(
const
TextFont
&
rTextFont
)
{
{
if
(
!
rTextFont
.
maTypeface
.
isEmpty
()
)
if
(
!
rTextFont
.
maTypeface
.
isEmpty
()
)
...
...
sw/qa/extras/ooxmlimport/data/dml-groupshape-runfonts.docx
0 → 100644
Dosyayı görüntüle @
756d0b1d
File added
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Dosyayı görüntüle @
756d0b1d
...
@@ -1881,6 +1881,16 @@ DECLARE_OOXMLIMPORT_TEST(testAnnotationFormatting, "annotation-formatting.docx")
...
@@ -1881,6 +1881,16 @@ DECLARE_OOXMLIMPORT_TEST(testAnnotationFormatting, "annotation-formatting.docx")
CPPUNIT_ASSERT_EQUAL
(
awt
::
FontUnderline
::
SINGLE
,
getProperty
<
sal_Int16
>
(
getRun
(
xParagraph
,
1
),
"CharUnderline"
));
CPPUNIT_ASSERT_EQUAL
(
awt
::
FontUnderline
::
SINGLE
,
getProperty
<
sal_Int16
>
(
getRun
(
xParagraph
,
1
),
"CharUnderline"
));
}
}
DECLARE_OOXMLIMPORT_TEST
(
testDMLGroupShapeRunFonts
,
"dml-groupshape-runfonts.docx"
)
{
// Fonts defined by w:rFonts was not imported and so the font specified by a:fontRef was used.
uno
::
Reference
<
container
::
XIndexAccess
>
xGroup
(
getShape
(
1
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XText
>
xText
=
uno
::
Reference
<
text
::
XTextRange
>
(
xGroup
->
getByIndex
(
1
),
uno
::
UNO_QUERY
)
->
getText
();
uno
::
Reference
<
text
::
XTextRange
>
xRun
=
getRun
(
getParagraphOfText
(
1
,
xText
),
1
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Arial"
),
getProperty
<
OUString
>
(
xRun
,
"CharFontName"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Arial Unicode MS"
),
getProperty
<
OUString
>
(
xRun
,
"CharFontNameComplex"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"MS Mincho"
),
getProperty
<
OUString
>
(
xRun
,
"CharFontNameAsian"
));
}
#endif
#endif
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
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