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
01d059c1
Kaydet (Commit)
01d059c1
authored
Ock 18, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
oox: import VML's v:shadow to Writer
Change-Id: I48ea2dcf81c91c0fe476ecff6cd074cb699af533
üst
16d50ae1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
0 deletions
+53
-0
helper.hxx
oox/inc/oox/helper/helper.hxx
+1
-0
vmlformatting.hxx
oox/inc/oox/vml/vmlformatting.hxx
+12
-0
vmlshape.hxx
oox/inc/oox/vml/vmlshape.hxx
+1
-0
properties.txt
oox/source/token/properties.txt
+1
-0
vmlformatting.cxx
oox/source/vml/vmlformatting.cxx
+28
-0
vmlshape.cxx
oox/source/vml/vmlshape.cxx
+2
-0
vmlshapecontext.cxx
oox/source/vml/vmlshapecontext.cxx
+8
-0
No files found.
oox/inc/oox/helper/helper.hxx
Dosyayı görüntüle @
01d059c1
...
@@ -82,6 +82,7 @@ const sal_uInt8 WINDOWS_CHARSET_OEM = 255;
...
@@ -82,6 +82,7 @@ const sal_uInt8 WINDOWS_CHARSET_OEM = 255;
const
sal_Int32
API_RGB_TRANSPARENT
=
-
1
;
///< Transparent color for API calls.
const
sal_Int32
API_RGB_TRANSPARENT
=
-
1
;
///< Transparent color for API calls.
const
sal_Int32
API_RGB_BLACK
=
0x000000
;
///< Black color for API calls.
const
sal_Int32
API_RGB_BLACK
=
0x000000
;
///< Black color for API calls.
const
sal_Int32
API_RGB_GRAY
=
0x808080
;
///< Gray color for API calls.
const
sal_Int32
API_RGB_WHITE
=
0xFFFFFF
;
///< White color for API calls.
const
sal_Int32
API_RGB_WHITE
=
0xFFFFFF
;
///< White color for API calls.
const
sal_Int16
API_LINE_SOLID
=
0
;
const
sal_Int16
API_LINE_SOLID
=
0
;
...
...
oox/inc/oox/vml/vmlformatting.hxx
Dosyayı görüntüle @
01d059c1
...
@@ -225,6 +225,18 @@ struct FillModel
...
@@ -225,6 +225,18 @@ struct FillModel
// ============================================================================
// ============================================================================
/** The shadow model structure contains all shape shadow properties. */
struct
ShadowModel
{
OptValue
<
bool
>
moHasShadow
;
///< Specifies whether to show a shadow.
OptValue
<
OUString
>
moColor
;
///< Specifies the color of the shadow.
OptValue
<
OUString
>
moOffset
;
///< Specifies the shadow's offset from the shape's location.
OptValue
<
double
>
moOpacity
;
///< Specifies the opacity of the shadow.
/** Writes the properties to the passed property map. */
void
pushToPropMap
(
oox
::
drawingml
::
ShapePropertyMap
&
rPropMap
,
const
GraphicHelper
&
rGraphicHelper
)
const
;
};
}
// namespace vml
}
// namespace vml
}
// namespace oox
}
// namespace oox
...
...
oox/inc/oox/vml/vmlshape.hxx
Dosyayı görüntüle @
01d059c1
...
@@ -87,6 +87,7 @@ struct OOX_DLLPUBLIC ShapeTypeModel
...
@@ -87,6 +87,7 @@ struct OOX_DLLPUBLIC ShapeTypeModel
StrokeModel
maStrokeModel
;
///< Border line formatting.
StrokeModel
maStrokeModel
;
///< Border line formatting.
FillModel
maFillModel
;
///< Shape fill formatting.
FillModel
maFillModel
;
///< Shape fill formatting.
ShadowModel
maShadowModel
;
///< Shape shadow formatting.
OptValue
<
::
rtl
::
OUString
>
moGraphicPath
;
///< Path to a graphic for this shape.
OptValue
<
::
rtl
::
OUString
>
moGraphicPath
;
///< Path to a graphic for this shape.
OptValue
<
::
rtl
::
OUString
>
moGraphicTitle
;
///< Title of the graphic.
OptValue
<
::
rtl
::
OUString
>
moGraphicTitle
;
///< Title of the graphic.
...
...
oox/source/token/properties.txt
Dosyayı görüntüle @
01d059c1
...
@@ -414,6 +414,7 @@ SelectedItems
...
@@ -414,6 +414,7 @@ SelectedItems
SelectedPage
SelectedPage
Shadow
Shadow
ShadowColor
ShadowColor
ShadowFormat
ShadowTransparence
ShadowTransparence
ShadowXDistance
ShadowXDistance
ShadowYDistance
ShadowYDistance
...
...
oox/source/vml/vmlformatting.cxx
Dosyayı görüntüle @
01d059c1
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
*/
*/
#include "oox/vml/vmlformatting.hxx"
#include "oox/vml/vmlformatting.hxx"
#include <com/sun/star/table/ShadowFormat.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/strbuf.hxx>
#include "oox/drawingml/color.hxx"
#include "oox/drawingml/color.hxx"
#include "oox/drawingml/drawingmltypes.hxx"
#include "oox/drawingml/drawingmltypes.hxx"
...
@@ -32,6 +33,7 @@ namespace vml {
...
@@ -32,6 +33,7 @@ namespace vml {
// ============================================================================
// ============================================================================
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
geometry
;
using
namespace
::
com
::
sun
::
star
::
geometry
;
using
::
oox
::
drawingml
::
Color
;
using
::
oox
::
drawingml
::
Color
;
...
@@ -712,6 +714,32 @@ void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper&
...
@@ -712,6 +714,32 @@ void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper&
// ============================================================================
// ============================================================================
void
ShadowModel
::
pushToPropMap
(
ShapePropertyMap
&
rPropMap
,
const
GraphicHelper
&
rGraphicHelper
)
const
{
if
(
moHasShadow
.
has
()
&&
!
moHasShadow
.
get
())
return
;
drawingml
::
Color
aColor
=
ConversionHelper
::
decodeColor
(
rGraphicHelper
,
moColor
,
moOpacity
,
API_RGB_GRAY
);
// nOffset* is in mm100, default value is 35 twips, see DffPropertyReader::ApplyAttributes() in msfilter.
sal_Int32
nOffsetX
=
62
,
nOffsetY
=
62
;
if
(
moOffset
.
has
())
{
OUString
aOffsetX
,
aOffsetY
;
ConversionHelper
::
separatePair
(
aOffsetX
,
aOffsetY
,
moOffset
.
get
(),
','
);
if
(
!
aOffsetX
.
isEmpty
())
nOffsetX
=
ConversionHelper
::
decodeMeasureToHmm
(
rGraphicHelper
,
aOffsetX
,
0
,
false
,
false
);
if
(
!
aOffsetY
.
isEmpty
())
nOffsetY
=
ConversionHelper
::
decodeMeasureToHmm
(
rGraphicHelper
,
aOffsetY
,
0
,
false
,
false
);
}
table
::
ShadowFormat
aFormat
;
aFormat
.
Color
=
aColor
.
getColor
(
rGraphicHelper
);
aFormat
.
Location
=
table
::
ShadowLocation_BOTTOM_RIGHT
;
// The width of the shadow is the average of the x and y values, see SwWW8ImplReader::MatchSdrItemsIntoFlySet().
aFormat
.
ShadowWidth
=
((
nOffsetX
+
nOffsetY
)
/
2
);
rPropMap
.
setProperty
(
PROP_ShadowFormat
,
uno
::
makeAny
(
aFormat
));
}
}
// namespace vml
}
// namespace vml
}
// namespace oox
}
// namespace oox
...
...
oox/source/vml/vmlshape.cxx
Dosyayı görüntüle @
01d059c1
...
@@ -365,6 +365,8 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
...
@@ -365,6 +365,8 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
uno
::
Reference
<
lang
::
XServiceInfo
>
xSInfo
(
rxShape
,
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
lang
::
XServiceInfo
>
xSInfo
(
rxShape
,
uno
::
UNO_QUERY_THROW
);
if
(
xSInfo
->
supportsService
(
"com.sun.star.text.TextFrame"
))
if
(
xSInfo
->
supportsService
(
"com.sun.star.text.TextFrame"
))
{
{
// Any other service supporting the ShadowFormat property?
maTypeModel
.
maShadowModel
.
pushToPropMap
(
aPropMap
,
rGraphicHelper
);
// TextFrames have BackColor, not FillColor
// TextFrames have BackColor, not FillColor
if
(
aPropMap
.
hasProperty
(
PROP_FillColor
))
if
(
aPropMap
.
hasProperty
(
PROP_FillColor
))
{
{
...
...
oox/source/vml/vmlshapecontext.cxx
Dosyayı görüntüle @
01d059c1
...
@@ -333,6 +333,14 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const A
...
@@ -333,6 +333,14 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const A
mrTypeModel
.
moWrapAnchorX
=
rAttribs
.
getString
(
XML_anchorx
);
mrTypeModel
.
moWrapAnchorX
=
rAttribs
.
getString
(
XML_anchorx
);
mrTypeModel
.
moWrapAnchorY
=
rAttribs
.
getString
(
XML_anchory
);
mrTypeModel
.
moWrapAnchorY
=
rAttribs
.
getString
(
XML_anchory
);
break
;
break
;
case
VML_TOKEN
(
shadow
):
{
mrTypeModel
.
maShadowModel
.
moHasShadow
.
assignIfUsed
(
lclDecodeBool
(
rAttribs
,
XML_on
));
mrTypeModel
.
maShadowModel
.
moColor
.
assignIfUsed
(
rAttribs
.
getString
(
XML_color
));
mrTypeModel
.
maShadowModel
.
moOffset
.
assignIfUsed
(
rAttribs
.
getString
(
XML_offset
));
mrTypeModel
.
maShadowModel
.
moOpacity
=
lclDecodePercent
(
rAttribs
,
XML_opacity
,
1.0
);
}
break
;
}
}
return
0
;
return
0
;
}
}
...
...
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