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
753dd9ee
Kaydet (Commit)
753dd9ee
authored
Agu 22, 2012
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#120569# Corrected 3D object creations
üst
fe59ae72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
16 deletions
+44
-16
EnhancedCustomShape3d.cxx
svx/source/customshapes/EnhancedCustomShape3d.cxx
+44
-16
No files found.
svx/source/customshapes/EnhancedCustomShape3d.cxx
Dosyayı görüntüle @
753dd9ee
...
@@ -393,7 +393,9 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
...
@@ -393,7 +393,9 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
}
}
Rectangle
aBoundRect2d
;
Rectangle
aBoundRect2d
;
SdrObjListIter
aIter
(
*
pShape2d
,
IM_DEEPWITHGROUPS
);
SdrObjListIter
aIter
(
*
pShape2d
,
IM_DEEPNOGROUPS
);
const
bool
bMultipleSubObjects
(
aIter
.
Count
()
>
1
);
while
(
aIter
.
IsMore
()
)
while
(
aIter
.
IsMore
()
)
{
{
const
SdrObject
*
pNext
=
aIter
.
Next
();
const
SdrObject
*
pNext
=
aIter
.
Next
();
...
@@ -406,19 +408,34 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
...
@@ -406,19 +408,34 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
if
(
pNext
->
ISA
(
SdrPathObj
)
)
if
(
pNext
->
ISA
(
SdrPathObj
)
)
{
{
const
SfxItemSet
&
rSet
=
pNext
->
GetMergedItemSet
();
const
SfxItemSet
&
rSet
=
pNext
->
GetMergedItemSet
();
const
drawinglayer
::
attribute
::
SdrLineAttribute
aLine
(
bool
bNeedToConvertToContour
(
false
);
drawinglayer
::
primitive2d
::
createNewSdrLineAttribute
(
rSet
));
bool
bNeedToConvertToContour
(
0.0
<=
aLine
.
getWidth
()
||
0.0
!=
aLine
.
getFullDotDashLen
());
if
(
!
bNeedToConvertToContour
&&
!
aLine
.
isDefault
())
// do conversion only for single line objects; for all others a fill and a
// line object get created. When we have fill, we want no line. That line has
// always been there, but since it was never converted to contour, it kept
// invisible (all this 'hidden' logic should be migrated to primitives).
if
(
!
bMultipleSubObjects
)
{
{
const
drawinglayer
::
attribute
::
SdrLineStartEndAttribute
aLineStartEnd
(
const
XFillStyle
eStyle
(((
XFillStyleItem
&
)(
rSet
.
Get
(
XATTR_FILLSTYLE
))).
GetValue
());
drawinglayer
::
primitive2d
::
createNewSdrLineStartEndAttribute
(
rSet
,
aLine
.
getWidth
()));
if
((
aLineStartEnd
.
getStartWidth
()
&&
aLineStartEnd
.
isStartActive
())
if
(
XFILL_NONE
==
eStyle
)
||
(
aLineStartEnd
.
getEndWidth
()
&&
aLineStartEnd
.
isEndActive
()))
{
{
bNeedToConvertToContour
=
true
;
const
drawinglayer
::
attribute
::
SdrLineAttribute
aLine
(
drawinglayer
::
primitive2d
::
createNewSdrLineAttribute
(
rSet
));
bNeedToConvertToContour
=
(
0.0
<
aLine
.
getWidth
()
||
0.0
!=
aLine
.
getFullDotDashLen
());
if
(
!
bNeedToConvertToContour
&&
!
aLine
.
isDefault
())
{
const
drawinglayer
::
attribute
::
SdrLineStartEndAttribute
aLineStartEnd
(
drawinglayer
::
primitive2d
::
createNewSdrLineStartEndAttribute
(
rSet
,
aLine
.
getWidth
()));
if
((
aLineStartEnd
.
getStartWidth
()
&&
aLineStartEnd
.
isStartActive
())
||
(
aLineStartEnd
.
getEndWidth
()
&&
aLineStartEnd
.
isEndActive
()))
{
bNeedToConvertToContour
=
true
;
}
}
}
}
}
}
...
@@ -434,12 +451,23 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
...
@@ -434,12 +451,23 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
if
(
aPolyPoly
.
isClosed
())
if
(
aPolyPoly
.
isClosed
())
{
{
// correct item properties from line to fill style
// correct item properties from line to fill style
aLocalSet
.
Put
(
XLineWidthItem
(
0
));
if
(
eShadeMode
==
drawing
::
ShadeMode_DRAFT
)
aLocalSet
.
Put
(
XLineStyleItem
(
XLINE_NONE
));
{
aLocalSet
.
Put
(
XFillColorItem
(
XubString
(),
((
const
XLineColorItem
&
)(
aLocalSet
.
Get
(
XATTR_LINECOLOR
))).
GetColorValue
()));
// for draft, create wireframe with fixed line width
aLocalSet
.
Put
(
XFillStyleItem
(
XFILL_SOLID
));
aLocalSet
.
Put
(
XLineStyleItem
(
XLINE_SOLID
));
aLocalSet
.
Put
(
XFillTransparenceItem
(((
const
XLineTransparenceItem
&
)(
aLocalSet
.
Get
(
XATTR_LINETRANSPARENCE
))).
GetValue
()));
aLocalSet
.
Put
(
XLineWidthItem
(
40
));
aLocalFillStyle
=
XFILL_SOLID
;
aLocalFillStyle
=
XFILL_NONE
;
}
else
{
// switch from line to fill, copy line attr to fill attr (color, transparence)
aLocalSet
.
Put
(
XLineWidthItem
(
0
));
aLocalSet
.
Put
(
XLineStyleItem
(
XLINE_NONE
));
aLocalSet
.
Put
(
XFillColorItem
(
XubString
(),
((
const
XLineColorItem
&
)(
aLocalSet
.
Get
(
XATTR_LINECOLOR
))).
GetColorValue
()));
aLocalSet
.
Put
(
XFillStyleItem
(
XFILL_SOLID
));
aLocalSet
.
Put
(
XFillTransparenceItem
(((
const
XLineTransparenceItem
&
)(
aLocalSet
.
Get
(
XATTR_LINETRANSPARENCE
))).
GetValue
()));
aLocalFillStyle
=
XFILL_SOLID
;
}
}
}
else
else
{
{
...
...
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