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
5fe1a59c
Kaydet (Commit)
5fe1a59c
authored
Agu 12, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Scope reduction in GetBLIP() & remove non-ASCII character (degree symbol).
Change-Id: I306a22b087aceed5dbb6cb2e8b67e2501589ee61
üst
d87cf30f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
69 deletions
+74
-69
msdffimp.cxx
filter/source/msfilter/msdffimp.cxx
+74
-69
No files found.
filter/source/msfilter/msdffimp.cxx
Dosyayı görüntüle @
5fe1a59c
...
...
@@ -4288,8 +4288,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if
(
IsHardAttribute
(
DFF_Prop_gtextFBold
)
)
aSet
.
Put
(
SvxWeightItem
(
(
GetPropertyValue
(
DFF_Prop_gtextFStrikethrough
,
0
)
&
0x0020
)
!=
0
?
WEIGHT_BOLD
:
WEIGHT_NORMAL
,
EE_CHAR_WEIGHT
)
);
// SJ TODO: Vertical Writing is not correct, instead this should be
// replaced through "CharacterRotation" by 90°, therefore a new Item has to be
// SJ TODO: Vertical Writing is not correct, instead
// this should be replaced through "CharacterRotation"
// by 90 degrees, therefore a new Item has to be
// supported by svx core, api and xml file format
((
SdrObjCustomShape
*
)
pRet
)
->
SetVerticalWriting
(
(
GetPropertyValue
(
DFF_Prop_gtextFStrikethrough
,
0
)
&
0x2000
)
!=
0
);
...
...
@@ -6184,81 +6185,85 @@ bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape,
******************************************************************************/
bool
SvxMSDffManager
::
GetBLIP
(
sal_uLong
nIdx_
,
Graphic
&
rData
,
Rectangle
*
pVisArea
)
{
if
(
!
pStData
)
return
false
;
bool
bOk
=
false
;
// initialize result variable
if
(
pStData
)
// check if a graphic for this blipId is already imported
if
(
nIdx_
)
{
// check if a graphic for this blipId is already imported
if
(
nIdx_
)
{
std
::
map
<
sal_uInt32
,
OString
>::
iterator
iter
=
aEscherBlipCache
.
find
(
nIdx_
);
std
::
map
<
sal_uInt32
,
OString
>::
iterator
iter
=
aEscherBlipCache
.
find
(
nIdx_
);
if
(
iter
!=
aEscherBlipCache
.
end
())
{
/* if this entry is available, then it should be possible
to get the Graphic via GraphicObject */
GraphicObject
aGraphicObject
(
iter
->
second
);
rData
=
aGraphicObject
.
GetGraphic
();
if
(
rData
.
GetType
()
!=
GRAPHIC_NONE
)
bOk
=
true
;
else
aEscherBlipCache
.
erase
(
iter
);
}
if
(
iter
!=
aEscherBlipCache
.
end
())
{
/* if this entry is available, then it should be possible
to get the Graphic via GraphicObject */
GraphicObject
aGraphicObject
(
iter
->
second
);
rData
=
aGraphicObject
.
GetGraphic
();
if
(
rData
.
GetType
()
!=
GRAPHIC_NONE
)
bOk
=
true
;
else
aEscherBlipCache
.
erase
(
iter
);
}
if
(
!
bOk
)
{
sal_uInt16
nIdx
=
sal_uInt16
(
nIdx_
);
if
(
!
nIdx
||
(
pBLIPInfos
->
size
()
<
nIdx
)
)
return
false
;
// possibly delete old error flag(s)
if
(
rStCtrl
.
GetError
()
)
rStCtrl
.
ResetError
();
if
(
(
&
rStCtrl
!=
pStData
)
&&
pStData
->
GetError
()
)
pStData
->
ResetError
();
// remember FilePos of the stream(s)
sal_uLong
nOldPosCtrl
=
rStCtrl
.
Tell
();
sal_uLong
nOldPosData
=
pStData
?
pStData
->
Tell
()
:
nOldPosCtrl
;
// fetch matching info struct out of the pointer array
SvxMSDffBLIPInfo
&
rInfo
=
(
*
pBLIPInfos
)[
nIdx
-
1
];
// jump to the BLIP atom in the data stream
pStData
->
Seek
(
rInfo
.
nFilePos
);
// possibly reset error status
if
(
pStData
->
GetError
()
)
pStData
->
ResetError
();
}
if
(
!
bOk
)
{
sal_uInt16
nIdx
=
sal_uInt16
(
nIdx_
);
if
(
!
nIdx
||
(
pBLIPInfos
->
size
()
<
nIdx
)
)
return
false
;
// possibly delete old error flag(s)
if
(
rStCtrl
.
GetError
()
)
rStCtrl
.
ResetError
();
if
(
(
&
rStCtrl
!=
pStData
)
&&
pStData
->
GetError
()
)
pStData
->
ResetError
();
// remember FilePos of the stream(s)
sal_uLong
nOldPosCtrl
=
rStCtrl
.
Tell
();
sal_uLong
nOldPosData
=
pStData
?
pStData
->
Tell
()
:
nOldPosCtrl
;
// fetch matching info struct out of the pointer array
SvxMSDffBLIPInfo
&
rInfo
=
(
*
pBLIPInfos
)[
nIdx
-
1
];
// jump to the BLIP atom in the data stream
pStData
->
Seek
(
rInfo
.
nFilePos
);
// possibly reset error status
if
(
pStData
->
GetError
()
)
pStData
->
ResetError
();
else
bOk
=
GetBLIPDirect
(
*
pStData
,
rData
,
pVisArea
);
if
(
pStData2
&&
!
bOk
)
{
// Error, but the is a second chance: There is a second
// data stream in which the graphic could be stored!
if
(
pStData2
->
GetError
()
)
pStData2
->
ResetError
();
sal_uLong
nOldPosData2
=
pStData2
->
Tell
();
// jump to the BLIP atom in the second data stream
pStData2
->
Seek
(
rInfo
.
nFilePos
);
// reset error status if necessary
if
(
pStData2
->
GetError
()
)
pStData2
->
ResetError
();
else
bOk
=
GetBLIPDirect
(
*
pStData
,
rData
,
pVisArea
);
if
(
pStData2
&&
!
bOk
)
{
// Error, but the is a second chance: There is a second
// data stream in which the graphic could be stored!
if
(
pStData2
->
GetError
()
)
pStData2
->
ResetError
();
sal_uLong
nOldPosData2
=
pStData2
->
Tell
();
// jump to the BLIP atom in the second data stream
pStData2
->
Seek
(
rInfo
.
nFilePos
);
// reset error status if necessary
if
(
pStData2
->
GetError
()
)
pStData2
->
ResetError
();
else
bOk
=
GetBLIPDirect
(
*
pStData2
,
rData
,
pVisArea
);
// restore olf FilePos of the second data stream
pStData2
->
Seek
(
nOldPosData2
);
}
// restore old FilePos of the stream(s)
rStCtrl
.
Seek
(
nOldPosCtrl
);
if
(
&
rStCtrl
!=
pStData
)
pStData
->
Seek
(
nOldPosData
);
bOk
=
GetBLIPDirect
(
*
pStData2
,
rData
,
pVisArea
);
// restore olf FilePos of the second data stream
pStData2
->
Seek
(
nOldPosData2
);
}
// restore old FilePos of the stream(s)
rStCtrl
.
Seek
(
nOldPosCtrl
);
if
(
&
rStCtrl
!=
pStData
)
pStData
->
Seek
(
nOldPosData
);
if
(
bOk
)
{
// create new BlipCacheEntry for this graphic
GraphicObject
aGraphicObject
(
rData
);
aEscherBlipCache
.
insert
(
std
::
make_pair
(
nIdx_
,
aGraphicObject
.
GetUniqueID
()));
}
if
(
bOk
)
{
// create new BlipCacheEntry for this graphic
GraphicObject
aGraphicObject
(
rData
);
aEscherBlipCache
.
insert
(
std
::
make_pair
(
nIdx_
,
aGraphicObject
.
GetUniqueID
()));
}
}
return
bOk
;
}
...
...
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