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
d8425458
Kaydet (Commit)
d8425458
authored
Kas 16, 2000
tarafından
Sven Jacobi
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
also importing an mso_sptArc when just default adjustment values were used
üst
0907acfc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
35 deletions
+52
-35
msashape.cxx
svx/source/msfilter/msashape.cxx
+52
-35
No files found.
svx/source/msfilter/msashape.cxx
Dosyayı görüntüle @
d8425458
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: msashape.cxx,v $
*
* $Revision: 1.
6
$
* $Revision: 1.
7
$
*
* last change: $Author: sj $ $Date: 2000-11-1
4 15:36:47
$
* last change: $Author: sj $ $Date: 2000-11-1
6 13:06:29
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -184,6 +184,21 @@ static const sal_Int32 mso_sptDefault10800[] =
1
,
10800
};
static
const
sal_Int32
mso_sptArcDefault
[]
=
{
2
,
270
<<
16
,
0
};
static
const
mso_AutoShape
msoArc
=
{
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
(
sal_Int32
*
)
mso_sptArcDefault
,
NULL
,
NULL
,
0x80000000
,
0x80000000
};
static
const
mso_AutoShape
msoRectangle
=
{
NULL
,
0
,
...
...
@@ -3412,6 +3427,7 @@ SvxMSDffAutoShape::SvxMSDffAutoShape( const DffPropertyReader& rPropReader, SvSt
switch
(
eSpType
)
{
case
mso_sptArc
:
pDefAutoShape
=
&
msoArc
;
break
;
case
mso_sptRectangle
:
pDefAutoShape
=
&
msoRectangle
;
break
;
case
mso_sptParallelogram
:
pDefAutoShape
=
&
msoParallelogram
;
break
;
case
mso_sptTrapezoid
:
pDefAutoShape
=
&
msoTrapezoid
;
break
;
...
...
@@ -3570,6 +3586,7 @@ SvxMSDffAutoShape::SvxMSDffAutoShape( const DffPropertyReader& rPropReader, SvSt
}
if
(
pDefAutoShape
)
{
bIsEmpty
=
FALSE
;
nNumElemVert
=
pDefAutoShape
->
nVertices
;
pVertData
=
pDefAutoShape
->
pVertices
;
nNumElemSeg
=
pDefAutoShape
->
nElements
;
...
...
@@ -3588,6 +3605,7 @@ SvxMSDffAutoShape::SvxMSDffAutoShape( const DffPropertyReader& rPropReader, SvSt
rSt
>>
nTmp16
>>
nNumElemMemVert
>>
nElemSizeVert
;
if
(
nTmp16
)
{
bIsEmpty
=
FALSE
;
nNumElemVert
=
nTmp16
;
sal_uInt32
i
=
nNumElemVert
<<
1
;
bVertAlloc
=
TRUE
;
...
...
@@ -3611,9 +3629,8 @@ SvxMSDffAutoShape::SvxMSDffAutoShape( const DffPropertyReader& rPropReader, SvSt
}
}
}
if
(
pVertData
||
pDefAutoShape
)
if
(
!
bIsEmpty
)
// we can import an autoshape if either pVertData or pDefAutoShape is set
{
bIsEmpty
=
FALSE
;
if
(
rPropReader
.
SeekToContent
(
DFF_Prop_pSegmentInfo
,
rSt
)
)
{
sal_uInt16
nTmp16
,
nNumElemMemSeg
,
nElemSizeSeg
;
...
...
@@ -4074,39 +4091,30 @@ SdrObject* SvxMSDffAutoShape::GetObject( SdrModel* pSdrModel, SfxItemSet& rSet,
}
else
if
(
eSpType
==
mso_sptEllipse
)
pRet
=
new
SdrCircObj
(
OBJ_CIRC
,
aSnapRect
);
if
(
pRet
)
{
pRet
->
SetModel
(
pSdrModel
);
pRet
->
SetItemSet
(
rSet
);
}
else
else
if
(
eSpType
==
mso_sptArc
)
{
// the arc is something special, because sometimes the snaprect does not match
Rectangle
aPolyBoundRect
;
if
(
nNumElemVert
)
{
// Header auswerten
XPolygon
aXP
(
(
sal_uInt16
)
nNumElemVert
);
const
sal_Int32
*
pTmp
=
pVertData
;
sal_uInt32
nVal32
,
nPtNum
,
nPtCount
=
nNumElemVert
<<
1
;
sal_Bool
bScale
=
(
eSpType
!=
mso_sptArc
);
for
(
nPtNum
=
0
;
nPtNum
<
nPtCount
;
nPtNum
++
)
{
nVal32
=
GetValue
(
*
pTmp
++
,
bScale
,
(
nPtNum
&
1
)
!=
1
);
nVal32
=
GetValue
(
*
pTmp
++
,
FALSE
,
(
nPtNum
&
1
)
!=
1
);
if
(
nPtNum
&
1
)
aXP
[
(
sal_uInt16
)(
nPtNum
>>
1
)
].
Y
()
=
nVal32
;
else
aXP
[
(
sal_uInt16
)(
nPtNum
>>
1
)
].
X
()
=
nVal32
;
}
Rectangle
aPolyBoundRect
(
aXP
.
GetBoundRect
()
);
// the arc is something special, because sometimes the snaprect does not match
if
(
eSpType
==
mso_sptArc
)
{
// Groesse des Polygons mit allen Punkten korrigieren
aPolyBoundRect
=
Rectangle
(
aXP
.
GetBoundRect
()
);
}
else
aPolyBoundRect
=
aSnapRect
;
sal_Int32
nEndAngle
=
Fix16ToAngle
(
GetAdjustValue
(
0
,
270
<<
16
)
);
sal_Int32
nStartAngle
=
Fix16ToAngle
(
GetAdjustValue
(
1
,
0
)
);
sal_Int32
nEndAngle
=
Fix16ToAngle
(
GetAdjustValue
(
0
)
);
sal_Int32
nStartAngle
=
Fix16ToAngle
(
GetAdjustValue
(
1
)
);
if
(
nStartAngle
==
nEndAngle
)
return
NULL
;
...
...
@@ -4172,14 +4180,32 @@ SdrObject* SvxMSDffAutoShape::GetObject( SdrModel* pSdrModel, SfxItemSet& rSet,
}
pRet
=
new
SdrCircObj
(
OBJ_CARC
,
aPolyBoundRect
,
nStartAngle
,
nEndAngle
);
}
pRet
->
NbcSetSnapRect
(
aSnapRect
);
}
if
(
pRet
)
{
pRet
->
SetModel
(
pSdrModel
);
pRet
->
SetItemSet
(
rSet
);
}
if
(
!
pRet
)
else
if
(
nNumElemVert
)
{
// Header auswerten
XPolygon
aXP
(
(
sal_uInt16
)
nNumElemVert
);
const
sal_Int32
*
pTmp
=
pVertData
;
sal_uInt32
nVal32
,
nPtNum
,
nPtCount
=
nNumElemVert
<<
1
;
for
(
nPtNum
=
0
;
nPtNum
<
nPtCount
;
nPtNum
++
)
{
nVal32
=
GetValue
(
*
pTmp
++
,
TRUE
,
(
nPtNum
&
1
)
!=
1
);
if
(
nPtNum
&
1
)
aXP
[
(
sal_uInt16
)(
nPtNum
>>
1
)
].
Y
()
=
nVal32
;
else
aXP
[
(
sal_uInt16
)(
nPtNum
>>
1
)
].
X
()
=
nVal32
;
}
Rectangle
aPolyBoundRect
(
aXP
.
GetBoundRect
()
);
if
(
aPolyBoundRect
.
GetSize
()
!=
aSnapRect
.
GetSize
()
)
{
double
fXScale
=
(
double
)
aSnapRect
.
GetWidth
()
/
(
double
)
aPolyBoundRect
.
GetWidth
();
...
...
@@ -4321,14 +4347,6 @@ SdrObject* SvxMSDffAutoShape::GetObject( SdrModel* pSdrModel, SfxItemSet& rSet,
case
5
:
{
sal_uInt16
nDstPt
=
aPoly
.
GetPointCount
();
// if ( nDstPt > 1 )
// {
// if ( bClosed )
// aPoly[ aPoly.GetPointCount() ] = aPoly[ 0 ];
// aPolyPoly.Insert( aPoly );
// aPoly = aEmptyPoly;
// nDstPt = 0;
// }
if
(
nPntCount
==
2
)
{
// create a circle
Rectangle
aRect
(
aXP
[
nSrcPt
],
aXP
[
nSrcPt
+
1
]
);
...
...
@@ -4533,7 +4551,6 @@ SdrObject* SvxMSDffAutoShape::GetObject( SdrModel* pSdrModel, SfxItemSet& rSet,
}
}
}
}
if
(
pRet
)
{
if
(
nFix16Angle
)
...
...
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