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
87637364
Kaydet (Commit)
87637364
authored
Tem 07, 2014
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i125211 corrected beaking metafiles with gradient actions
üst
a3d348af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
13 deletions
+25
-13
svdfmtf.cxx
svx/source/svdraw/svdfmtf.cxx
+21
-12
svdfmtf.hxx
svx/source/svdraw/svdfmtf.hxx
+4
-1
No files found.
svx/source/svdraw/svdfmtf.cxx
Dosyayı görüntüle @
87637364
...
...
@@ -180,7 +180,10 @@ void ImpSdrGDIMetaFileImport::DoLoopActions(GDIMetaFile& rMtf, SvdProgressInfo*
case
META_PUSH_ACTION
:
DoAction
((
MetaPushAction
&
)
*
pAct
);
break
;
case
META_POP_ACTION
:
DoAction
((
MetaPopAction
&
)
*
pAct
);
break
;
case
META_HATCH_ACTION
:
DoAction
((
MetaHatchAction
&
)
*
pAct
);
break
;
case
META_COMMENT_ACTION
:
DoAction
((
MetaCommentAction
&
)
*
pAct
,
&
rMtf
);
break
;
// #i125211# MetaCommentAction may change index, thus hand it over
case
META_COMMENT_ACTION
:
DoAction
((
MetaCommentAction
&
)
*
pAct
,
rMtf
,
a
);
break
;
// missing actions added
case
META_TEXTRECT_ACTION
:
DoAction
((
MetaTextRectAction
&
)
*
pAct
);
break
;
...
...
@@ -1159,7 +1162,8 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaHatchAction& rAct )
{
const
Hatch
&
rHatch
=
rAct
.
GetHatch
();
SdrPathObj
*
pPath
=
new
SdrPathObj
(
OBJ_POLY
,
aSource
);
SfxItemSet
aHatchAttr
(
mpModel
->
GetItemPool
(),
XATTR_FILLSTYLE
,
XATTR_FILLSTYLE
,
XATTR_FILLHATCH
,
XATTR_FILLHATCH
,
0
,
0
);
// #i125211# Use the ranges from the SdrObject to create a new empty SfxItemSet
SfxItemSet
aHatchAttr
(
mpModel
->
GetItemPool
(),
pPath
->
GetMergedItemSet
().
GetRanges
());
XHatchStyle
eStyle
;
switch
(
rHatch
.
GetStyle
())
...
...
@@ -1231,13 +1235,14 @@ void ImpSdrGDIMetaFileImport::MapScaling()
////////////////////////////////////////////////////////////////////////////////////////////////////
void
ImpSdrGDIMetaFileImport
::
DoAction
(
MetaCommentAction
&
rAct
,
GDIMetaFile
*
pMtf
)
void
ImpSdrGDIMetaFileImport
::
DoAction
(
MetaCommentAction
&
rAct
,
GDIMetaFile
&
rMtf
,
sal_uLong
&
a
)
// GDIMetaFile
* pMtf )
{
ByteString
aSkipComment
;
if
(
rAct
.
GetComment
().
CompareIgnoreCaseToAscii
(
"XGRAD_SEQ_BEGIN"
)
==
COMPARE_EQUAL
)
if
(
a
<
rMtf
.
GetActionCount
()
&&
rAct
.
GetComment
().
CompareIgnoreCaseToAscii
(
"XGRAD_SEQ_BEGIN"
)
==
COMPARE_EQUAL
)
{
MetaGradientExAction
*
pAct
=
(
MetaGradientExAction
*
)
pMtf
->
NextAction
();
// #i125211# Check if next action is a MetaGradientExAction
MetaGradientExAction
*
pAct
=
dynamic_cast
<
MetaGradientExAction
*
>
(
rMtf
.
GetAction
(
a
+
1
));
if
(
pAct
&&
pAct
->
GetType
()
==
META_GRADIENTEX_ACTION
)
{
...
...
@@ -1250,7 +1255,8 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM
{
const
Gradient
&
rGrad
=
pAct
->
GetGradient
();
SdrPathObj
*
pPath
=
new
SdrPathObj
(
OBJ_POLY
,
aSource
);
SfxItemSet
aGradAttr
(
mpModel
->
GetItemPool
(),
XATTR_FILLSTYLE
,
XATTR_FILLSTYLE
,
XATTR_FILLGRADIENT
,
XATTR_FILLGRADIENT
,
0
,
0
);
// #i125211# Use the ranges from the SdrObject to create a new empty SfxItemSet
SfxItemSet
aGradAttr
(
mpModel
->
GetItemPool
(),
pPath
->
GetMergedItemSet
().
GetRanges
());
XGradient
aXGradient
;
aXGradient
.
SetGradientStyle
((
XGradientStyle
)
rGrad
.
GetStyle
());
...
...
@@ -1288,13 +1294,14 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM
if
(
aSkipComment
.
Len
())
{
MetaAction
*
pSkipAct
=
pMtf
->
NextAction
();
// #i125211# forward until closing MetaCommentAction
MetaAction
*
pSkipAct
=
rMtf
.
GetAction
(
++
a
);
while
(
pSkipAct
&&
((
pSkipAct
->
GetType
()
!=
META_COMMENT_ACTION
)
||
(((
MetaCommentAction
*
)
pSkipAct
)
->
GetComment
().
CompareIgnoreCaseToAscii
(
aSkipComment
.
GetBuffer
())
!=
COMPARE_EQUAL
)))
{
pSkipAct
=
pMtf
->
NextAction
(
);
pSkipAct
=
rMtf
.
GetAction
(
++
a
);
}
}
}
...
...
@@ -1422,7 +1429,8 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientAction& rAct)
floor
(
aRange
.
getMinY
()),
ceil
(
aRange
.
getMaxX
()),
ceil
(
aRange
.
getMaxY
())));
SfxItemSet
aGradientAttr
(
mpModel
->
GetItemPool
(),
XATTR_FILLSTYLE
,
XATTR_FILLSTYLE
,
XATTR_FILLGRADIENT
,
XATTR_FILLGRADIENT
,
0
,
0
);
// #i125211# Use the ranges from the SdrObject to create a new empty SfxItemSet
SfxItemSet
aGradientAttr
(
mpModel
->
GetItemPool
(),
pRect
->
GetMergedItemSet
().
GetRanges
());
const
XGradientStyle
aXGradientStyle
(
getXGradientStyleFromGradientStyle
(
rGradient
.
GetStyle
()));
const
XFillGradientItem
aXFillGradientItem
(
&
mpModel
->
GetItemPool
(),
...
...
@@ -1439,7 +1447,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientAction& rAct)
rGradient
.
GetSteps
()));
SetAttributes
(
pRect
);
aGradientAttr
.
Put
(
XFillStyleItem
(
XFILL_
HATCH
));
aGradientAttr
.
Put
(
XFillStyleItem
(
XFILL_
GRADIENT
));
// #i125211#
aGradientAttr
.
Put
(
aXFillGradientItem
);
pRect
->
SetMergedItemSet
(
aGradientAttr
);
...
...
@@ -1492,7 +1500,8 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientExAction& rAct)
{
const
Gradient
&
rGradient
=
rAct
.
GetGradient
();
SdrPathObj
*
pPath
=
new
SdrPathObj
(
OBJ_POLY
,
aSource
);
SfxItemSet
aGradientAttr
(
mpModel
->
GetItemPool
(),
XATTR_FILLSTYLE
,
XATTR_FILLSTYLE
,
XATTR_FILLGRADIENT
,
XATTR_FILLGRADIENT
,
0
,
0
);
// #i125211# Use the ranges from the SdrObject to create a new empty SfxItemSet
SfxItemSet
aGradientAttr
(
mpModel
->
GetItemPool
(),
pPath
->
GetMergedItemSet
().
GetRanges
());
const
XGradientStyle
aXGradientStyle
(
getXGradientStyleFromGradientStyle
(
rGradient
.
GetStyle
()));
const
XFillGradientItem
aXFillGradientItem
(
&
mpModel
->
GetItemPool
(),
...
...
@@ -1509,7 +1518,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientExAction& rAct)
rGradient
.
GetSteps
()));
SetAttributes
(
pPath
);
aGradientAttr
.
Put
(
XFillStyleItem
(
XFILL_
HATCH
));
aGradientAttr
.
Put
(
XFillStyleItem
(
XFILL_
GRADIENT
));
// #i125211#
aGradientAttr
.
Put
(
aXFillGradientItem
);
pPath
->
SetMergedItemSet
(
aGradientAttr
);
...
...
svx/source/svdraw/svdfmtf.hxx
Dosyayı görüntüle @
87637364
...
...
@@ -122,7 +122,10 @@ protected:
void
DoAction
(
MetaMoveClipRegionAction
&
rAct
)
{
rAct
.
Execute
(
&
maVD
);
checkClip
();
}
void
DoAction
(
MetaISectRectClipRegionAction
&
rAct
)
{
rAct
.
Execute
(
&
maVD
);
checkClip
();
}
void
DoAction
(
MetaISectRegionClipRegionAction
&
rAct
)
{
rAct
.
Execute
(
&
maVD
);
checkClip
();
}
void
DoAction
(
MetaCommentAction
&
rAct
,
GDIMetaFile
*
pMtf
);
// #i125211# The MetaCommentAction needs to advance (if used), thus
// give current metafile and index which may be changed
void
DoAction
(
MetaCommentAction
&
rAct
,
GDIMetaFile
&
rMtf
,
sal_uLong
&
a
);
// missing actions added
void
DoAction
(
MetaTextRectAction
&
rAct
);
...
...
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