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
5ac575ee
Kaydet (Commit)
5ac575ee
authored
Agu 16, 2012
tarafından
Muthu Subramanian
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
n#773048: PPTX shape margins need to be rotated as well.
üst
919ec40f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
19 deletions
+34
-19
textbodyproperties.hxx
oox/inc/oox/drawingml/textbodyproperties.hxx
+3
-0
shape.cxx
oox/source/drawingml/shape.cxx
+3
-0
textbodyproperties.cxx
oox/source/drawingml/textbodyproperties.cxx
+22
-0
textbodypropertiescontext.cxx
oox/source/drawingml/textbodypropertiescontext.cxx
+6
-19
No files found.
oox/inc/oox/drawingml/textbodyproperties.hxx
Dosyayı görüntüle @
5ac575ee
...
...
@@ -23,6 +23,7 @@
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include "oox/helper/helper.hxx"
#include "oox/helper/propertymap.hxx"
#include <boost/optional.hpp>
namespace
oox
{
namespace
drawingml
{
...
...
@@ -34,10 +35,12 @@ struct TextBodyProperties
PropertyMap
maPropertyMap
;
OptValue
<
sal_Int32
>
moRotation
;
OptValue
<
sal_Int32
>
moVert
;
boost
::
optional
<
sal_Int32
>
moInsets
[
4
];
::
com
::
sun
::
star
::
drawing
::
TextVerticalAdjust
meVA
;
explicit
TextBodyProperties
();
void
pushRotationAdjustments
(
sal_Int32
nRotation
);
void
pushVertSimulation
();
};
...
...
oox/source/drawingml/shape.cxx
Dosyayı görüntüle @
5ac575ee
...
...
@@ -516,7 +516,10 @@ Reference< XShape > Shape::createAndInsert(
// add properties from textbody to shape properties
if
(
mpTextBody
.
get
()
)
{
mpTextBody
->
getTextProperties
().
pushRotationAdjustments
(
mnRotation
);
aShapeProps
.
assignUsed
(
mpTextBody
->
getTextProperties
().
maPropertyMap
);
}
// applying properties
aShapeProps
.
assignUsed
(
getShapeProperties
()
);
...
...
oox/source/drawingml/textbodyproperties.cxx
Dosyayı görüntüle @
5ac575ee
...
...
@@ -58,6 +58,28 @@ void TextBodyProperties::pushVertSimulation()
}
}
/* Push adjusted values, taking into consideration Shape Rotation */
void
TextBodyProperties
::
pushRotationAdjustments
(
sal_Int32
nRotation
)
{
sal_Int32
nOff
=
0
;
sal_Int32
aProps
[]
=
{
PROP_TextLeftDistance
,
PROP_TextUpperDistance
,
PROP_TextRightDistance
,
PROP_TextLowerDistance
};
sal_Int32
n
=
(
sal_Int32
)(
sizeof
(
aProps
)
/
sizeof
(
sal_Int32
)
);
switch
(
nRotation
)
// TODO: What happens for part rotations ?
{
case
(
90
*
1
*
60000
):
nOff
=
1
;
break
;
case
(
90
*
2
*
60000
):
nOff
=
2
;
break
;
case
(
90
*
3
*
60000
):
nOff
=
3
;
break
;
default
:
break
;
}
for
(
sal_Int32
i
=
0
;
i
<
n
;
i
++
)
{
if
(
moInsets
[
i
]
)
maPropertyMap
[
aProps
[
(
nOff
++
)
%
n
]
]
<<=
static_cast
<
sal_Int32
>
(
*
moInsets
[
i
]
);
}
}
// ============================================================================
}
// namespace drawingml
...
...
oox/source/drawingml/textbodypropertiescontext.cxx
Dosyayı görüntüle @
5ac575ee
...
...
@@ -53,25 +53,12 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent,
// ST_Coordinate
OUString
sValue
;
sValue
=
xAttributes
->
getOptionalValue
(
XML_lIns
);
if
(
!
sValue
.
isEmpty
()
)
{
sal_Int32
nLeftInset
=
(
!
sValue
.
isEmpty
()
?
GetCoordinate
(
sValue
)
:
91440
/
360
);
mrTextBodyProp
.
maPropertyMap
[
PROP_TextLeftDistance
]
<<=
static_cast
<
sal_Int32
>
(
nLeftInset
);
}
sValue
=
xAttributes
->
getOptionalValue
(
XML_tIns
);
if
(
!
sValue
.
isEmpty
()
)
{
sal_Int32
nTopInset
=
(
!
sValue
.
isEmpty
()
?
GetCoordinate
(
sValue
)
:
91440
/
360
);
mrTextBodyProp
.
maPropertyMap
[
PROP_TextUpperDistance
]
<<=
static_cast
<
sal_Int32
>
(
nTopInset
);
}
sValue
=
xAttributes
->
getOptionalValue
(
XML_rIns
);
if
(
!
sValue
.
isEmpty
()
)
{
sal_Int32
nRightInset
=
(
!
sValue
.
isEmpty
()
?
GetCoordinate
(
sValue
)
:
91440
/
360
);
mrTextBodyProp
.
maPropertyMap
[
PROP_TextRightDistance
]
<<=
static_cast
<
sal_Int32
>
(
nRightInset
);
}
sValue
=
xAttributes
->
getOptionalValue
(
XML_bIns
);
if
(
!
sValue
.
isEmpty
()
)
{
sal_Int32
nBottonInset
=
(
!
sValue
.
isEmpty
()
?
GetCoordinate
(
sValue
)
:
45720
/
360
);
mrTextBodyProp
.
maPropertyMap
[
PROP_TextLowerDistance
]
<<=
static_cast
<
sal_Int32
>
(
nBottonInset
);
sal_Int32
aIns
[]
=
{
XML_lIns
,
XML_tIns
,
XML_rIns
,
XML_bIns
};
for
(
sal_Int32
i
=
0
;
i
<
(
sal_Int32
)(
sizeof
(
aIns
)
/
sizeof
(
sal_Int32
)
);
i
++
)
{
sValue
=
xAttributes
->
getOptionalValue
(
aIns
[
i
]
);
if
(
!
sValue
.
isEmpty
()
)
mrTextBodyProp
.
moInsets
[
i
]
=
GetCoordinate
(
sValue
);
}
bool
bAnchorCenter
=
aAttribs
.
getBool
(
XML_anchorCtr
,
false
);
...
...
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