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
d795dfdf
Kaydet (Commit)
d795dfdf
authored
Nis 11, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
RTF filter: import fShadow, shadowColor and shadowOffset shape properties
Change-Id: I862a6b59ea2c3fa00f12cb3e9dbfd672a6aa58e5
üst
bc3c05f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
vmlformatting.hxx
oox/inc/oox/vml/vmlformatting.hxx
+1
-1
rtfsdrimport.cxx
writerfilter/source/rtftok/rtfsdrimport.cxx
+23
-3
No files found.
oox/inc/oox/vml/vmlformatting.hxx
Dosyayı görüntüle @
d795dfdf
...
...
@@ -226,7 +226,7 @@ struct OOX_DLLPUBLIC FillModel
// ============================================================================
/** The shadow model structure contains all shape shadow properties. */
struct
ShadowModel
struct
OOX_DLLPUBLIC
ShadowModel
{
bool
mbHasShadow
;
///< Is a v:shadow element seen?
OptValue
<
bool
>
moShadowOn
;
///< Is the element turned on?
...
...
writerfilter/source/rtftok/rtfsdrimport.cxx
Dosyayı görüntüle @
d795dfdf
...
...
@@ -153,8 +153,10 @@ void RTFSdrImport::resolve(RTFShape& rShape)
// Default line width is 0.75 pt (26 mm100) in Word, 0 in Writer.
uno
::
Any
aLineWidth
=
uno
::
makeAny
(
sal_Int32
(
26
));
text
::
WritingMode
eWritingMode
=
text
::
WritingMode_LR_TB
;
// Used for gradients, let the VML import do the hard work.
oox
::
vml
::
FillModel
aFillModel
;
// Importing these are not trivial, let the VML import do the hard work.
oox
::
vml
::
FillModel
aFillModel
;
// Gradient.
oox
::
vml
::
ShadowModel
aShadowModel
;
// Shadow.
for
(
std
::
vector
<
std
::
pair
<
OUString
,
OUString
>
>::
iterator
i
=
rShape
.
aProperties
.
begin
();
i
!=
rShape
.
aProperties
.
end
();
++
i
)
...
...
@@ -399,6 +401,16 @@ void RTFSdrImport::resolve(RTFShape& rShape)
}
else
if
(
i
->
first
==
"fillFocus"
)
aFillModel
.
moFocus
.
set
(
i
->
second
.
toDouble
()
/
100
);
// percent
else
if
(
i
->
first
==
"fShadow"
&&
xPropertySet
.
is
())
{
if
(
i
->
second
.
toInt32
()
==
1
)
aShadowModel
.
mbHasShadow
=
true
;
}
else
if
(
i
->
first
==
"shadowColor"
)
aShadowModel
.
moColor
.
set
(
OUString
(
"#"
)
+
OStringToOUString
(
msfilter
::
util
::
ConvertColor
(
msfilter
::
util
::
BGRToRGB
(
i
->
second
.
toInt32
())),
RTL_TEXTENCODING_UTF8
));
else
if
(
i
->
first
==
"shadowOffsetX"
)
// EMUs to points
aShadowModel
.
moOffset
.
set
(
OUString
::
number
(
i
->
second
.
toDouble
()
/
12700
)
+
"pt"
);
else
SAL_INFO
(
"writerfilter"
,
"TODO handle shape property '"
<<
i
->
first
<<
"':'"
<<
i
->
second
<<
"'"
);
}
...
...
@@ -493,14 +505,22 @@ void RTFSdrImport::resolve(RTFShape& rShape)
xPropertySet
->
setPropertyValue
(
"VertOrientRelation"
,
uno
::
makeAny
(
rShape
.
nVertOrientRelation
));
if
(
rShape
.
nWrap
!=
-
1
)
xPropertySet
->
setPropertyValue
(
"Surround"
,
uno
::
makeAny
(
text
::
WrapTextMode
(
rShape
.
nWrap
)));
oox
::
ModelObjectHelper
aModelObjectHelper
(
m_rImport
.
getModelFactory
());
if
(
aFillModel
.
moType
.
has
())
{
oox
::
ModelObjectHelper
aModelObjectHelper
(
m_rImport
.
getModelFactory
());
oox
::
drawingml
::
ShapePropertyMap
aPropMap
(
aModelObjectHelper
);
aFillModel
.
pushToPropMap
(
aPropMap
,
m_rImport
.
getGraphicHelper
());
// Sets the FillStyle and FillGradient UNO properties.
oox
::
PropertySet
(
xShape
).
setProperties
(
aPropMap
);
}
if
(
aShadowModel
.
mbHasShadow
)
{
oox
::
drawingml
::
ShapePropertyMap
aPropMap
(
aModelObjectHelper
);
aShadowModel
.
pushToPropMap
(
aPropMap
,
m_rImport
.
getGraphicHelper
());
// Sets the ShadowFormat UNO property.
oox
::
PropertySet
(
xShape
).
setProperties
(
aPropMap
);
}
}
// Send it to dmapper
...
...
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