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
12a5ff41
Kaydet (Commit)
12a5ff41
authored
Eyl 24, 2012
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#119920# added handling of missing TextRotateAngle for CustomShape import for ooxml import
üst
19116761
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
0 deletions
+42
-0
customshapeproperties.hxx
oox/inc/oox/drawingml/customshapeproperties.hxx
+6
-0
customshapeproperties.cxx
oox/source/drawingml/customshapeproperties.cxx
+23
-0
shape.cxx
oox/source/drawingml/shape.cxx
+12
-0
properties.txt
oox/source/token/properties.txt
+1
-0
No files found.
oox/inc/oox/drawingml/customshapeproperties.hxx
Dosyayı görüntüle @
12a5ff41
...
@@ -130,6 +130,9 @@ public:
...
@@ -130,6 +130,9 @@ public:
void
setMirroredX
(
sal_Bool
bMirroredX
)
{
mbMirroredX
=
bMirroredX
;
};
void
setMirroredX
(
sal_Bool
bMirroredX
)
{
mbMirroredX
=
bMirroredX
;
};
void
setMirroredY
(
sal_Bool
bMirroredY
)
{
mbMirroredY
=
bMirroredY
;
};
void
setMirroredY
(
sal_Bool
bMirroredY
)
{
mbMirroredY
=
bMirroredY
;
};
// #119920# Add missing extra text rotation
void
setTextRotation
(
sal_Int32
nTextRotation
)
{
mnTextRotation
=
nTextRotation
;
}
double
getValue
(
const
std
::
vector
<
CustomShapeGuide
>&
,
sal_uInt32
nIndex
)
const
;
double
getValue
(
const
std
::
vector
<
CustomShapeGuide
>&
,
sal_uInt32
nIndex
)
const
;
static
sal_Int32
SetCustomShapeGuideValue
(
std
::
vector
<
CustomShapeGuide
>&
rGuideList
,
const
CustomShapeGuide
&
rGuide
);
static
sal_Int32
SetCustomShapeGuideValue
(
std
::
vector
<
CustomShapeGuide
>&
rGuideList
,
const
CustomShapeGuide
&
rGuide
);
static
sal_Int32
GetCustomShapeGuideValue
(
const
std
::
vector
<
CustomShapeGuide
>&
rGuideList
,
const
rtl
::
OUString
&
rFormulaName
);
static
sal_Int32
GetCustomShapeGuideValue
(
const
std
::
vector
<
CustomShapeGuide
>&
rGuideList
,
const
rtl
::
OUString
&
rFormulaName
);
...
@@ -148,6 +151,9 @@ private:
...
@@ -148,6 +151,9 @@ private:
maSegments
;
maSegments
;
sal_Bool
mbMirroredX
;
sal_Bool
mbMirroredX
;
sal_Bool
mbMirroredY
;
sal_Bool
mbMirroredY
;
// #119920# Add missing extra text rotation
sal_Int32
mnTextRotation
;
};
};
}
}
}
}
...
...
oox/source/drawingml/customshapeproperties.cxx
Dosyayı görüntüle @
12a5ff41
...
@@ -45,6 +45,7 @@ namespace oox { namespace drawingml {
...
@@ -45,6 +45,7 @@ namespace oox { namespace drawingml {
CustomShapeProperties
::
CustomShapeProperties
()
CustomShapeProperties
::
CustomShapeProperties
()
:
mbMirroredX
(
sal_False
)
:
mbMirroredX
(
sal_False
)
,
mbMirroredY
(
sal_False
)
,
mbMirroredY
(
sal_False
)
,
mnTextRotation
(
0
)
// #119920# Add missing extra text rotation
{
{
}
}
CustomShapeProperties
::~
CustomShapeProperties
()
CustomShapeProperties
::~
CustomShapeProperties
()
...
@@ -94,6 +95,22 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
...
@@ -94,6 +95,22 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
if
(
xDefaulter
.
is
()
)
if
(
xDefaulter
.
is
()
)
xDefaulter
->
createCustomShapeDefaults
(
maShapePresetType
);
xDefaulter
->
createCustomShapeDefaults
(
maShapePresetType
);
PropertyMap
aPropertyMap
;
aPropertyMap
[
PROP_MirroredX
]
<<=
Any
(
mbMirroredX
);
aPropertyMap
[
PROP_MirroredY
]
<<=
Any
(
mbMirroredY
);
if
(
mnTextRotation
)
{
// #119920# Handle missing text rotation
aPropertyMap
[
PROP_TextRotateAngle
]
<<=
Any
(
mnTextRotation
);
}
// converting the vector to a sequence
Sequence
<
PropertyValue
>
aSeq
=
aPropertyMap
.
makePropertyValueSequence
();
PropertySet
aPropSet
(
xPropSet
);
aPropSet
.
setProperty
(
PROP_CustomShapeGeometry
,
aSeq
);
if
(
maAdjustmentGuideList
.
size
()
)
if
(
maAdjustmentGuideList
.
size
()
)
{
{
const
OUString
sType
=
CREATE_OUSTRING
(
"Type"
);
const
OUString
sType
=
CREATE_OUSTRING
(
"Type"
);
...
@@ -146,6 +163,12 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
...
@@ -146,6 +163,12 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aPropertyMap
[
PROP_Type
]
<<=
CREATE_OUSTRING
(
"non-primitive"
);
aPropertyMap
[
PROP_Type
]
<<=
CREATE_OUSTRING
(
"non-primitive"
);
aPropertyMap
[
PROP_MirroredX
]
<<=
Any
(
mbMirroredX
);
aPropertyMap
[
PROP_MirroredX
]
<<=
Any
(
mbMirroredX
);
aPropertyMap
[
PROP_MirroredY
]
<<=
Any
(
mbMirroredY
);
aPropertyMap
[
PROP_MirroredY
]
<<=
Any
(
mbMirroredY
);
if
(
mnTextRotation
)
{
aPropertyMap
[
PROP_TextRotation
]
<<=
Any
(
mnTextRotation
);
}
awt
::
Size
aSize
(
xShape
->
getSize
()
);
awt
::
Size
aSize
(
xShape
->
getSize
()
);
awt
::
Rectangle
aViewBox
(
0
,
0
,
aSize
.
Width
*
360
,
aSize
.
Height
*
360
);
awt
::
Rectangle
aViewBox
(
0
,
0
,
aSize
.
Width
*
360
,
aSize
.
Height
*
360
);
if
(
maPath2DList
.
size
()
)
if
(
maPath2DList
.
size
()
)
...
...
oox/source/drawingml/shape.cxx
Dosyayı görüntüle @
12a5ff41
...
@@ -475,6 +475,18 @@ Reference< XShape > Shape::createAndInsert(
...
@@ -475,6 +475,18 @@ Reference< XShape > Shape::createAndInsert(
mpCustomShapePropertiesPtr
->
setMirroredX
(
sal_True
);
mpCustomShapePropertiesPtr
->
setMirroredX
(
sal_True
);
if
(
mbFlipV
)
if
(
mbFlipV
)
mpCustomShapePropertiesPtr
->
setMirroredY
(
sal_True
);
mpCustomShapePropertiesPtr
->
setMirroredY
(
sal_True
);
// #119920 Handle missing text rotation
if
(
getTextBody
())
{
const
sal_Int32
nTextRotation
(
getTextBody
()
->
getTextProperties
().
moRotation
.
get
(
0
));
if
(
nTextRotation
)
{
mpCustomShapePropertiesPtr
->
setTextRotation
((
nTextRotation
*
-
1
)
/
60000
);
}
}
mpCustomShapePropertiesPtr
->
pushToPropSet
(
rFilterBase
,
xSet
,
mxShape
);
mpCustomShapePropertiesPtr
->
pushToPropSet
(
rFilterBase
,
xSet
,
mxShape
);
}
}
...
...
oox/source/token/properties.txt
Dosyayı görüntüle @
12a5ff41
...
@@ -445,6 +445,7 @@ TextLeftDistance
...
@@ -445,6 +445,7 @@ TextLeftDistance
TextLowerDistance
TextLowerDistance
TextOverlap
TextOverlap
TextRightDistance
TextRightDistance
TextRotateAngle
TextRotation
TextRotation
TextUpperDistance
TextUpperDistance
TextVerticalAdjust
TextVerticalAdjust
...
...
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