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
a9325263
Kaydet (Commit)
a9325263
authored
Şub 10, 2014
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i15508 keep trhe original file and format AFAP when breaking links to graphic contents in Writer
üst
fe4ae473
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
2 deletions
+38
-2
ndgrf.cxx
sw/source/core/graphic/ndgrf.cxx
+38
-2
No files found.
sw/source/core/graphic/ndgrf.cxx
Dosyayı görüntüle @
a9325263
...
@@ -741,8 +741,11 @@ void SwGrfNode::ReleaseLink()
...
@@ -741,8 +741,11 @@ void SwGrfNode::ReleaseLink()
{
{
if
(
refLink
.
Is
()
)
if
(
refLink
.
Is
()
)
{
{
// erst die Grafik reinswappen!
// #15508# remember some stuff from the linked graphic
// if( aGraphic.IsSwapOut() || !refLink->IsSynchron() )
const
String
aFileName
(
maGrfObj
.
GetLink
());
const
Graphic
aLocalGraphic
(
maGrfObj
.
GetGraphic
());
const
bool
bHasOriginalData
(
aLocalGraphic
.
IsLink
());
{
{
bInSwapIn
=
sal_True
;
bInSwapIn
=
sal_True
;
SwBaseLink
*
pLink
=
(
SwBaseLink
*
)(
::
sfx2
::
SvBaseLink
*
)
refLink
;
SwBaseLink
*
pLink
=
(
SwBaseLink
*
)(
::
sfx2
::
SvBaseLink
*
)
refLink
;
...
@@ -750,9 +753,42 @@ void SwGrfNode::ReleaseLink()
...
@@ -750,9 +753,42 @@ void SwGrfNode::ReleaseLink()
pLink
->
SwapIn
(
sal_True
,
sal_True
);
pLink
->
SwapIn
(
sal_True
,
sal_True
);
bInSwapIn
=
sal_False
;
bInSwapIn
=
sal_False
;
}
}
getIDocumentLinksAdministration
()
->
GetLinkManager
().
Remove
(
refLink
);
getIDocumentLinksAdministration
()
->
GetLinkManager
().
Remove
(
refLink
);
refLink
.
Clear
();
refLink
.
Clear
();
maGrfObj
.
SetLink
();
maGrfObj
.
SetLink
();
// #15508# added extra processing after getting rid of the link. Use whatever is
// known from the formally linked graphic to get to a state as close to a directly
// unlinked insterted graphic as possible. Goal is to have a valid GfxLink at the
// ImplGraphic (see there) that holds temporary data to the original data and type
// information about the original data. Only when this is given will
// SvXMLGraphicHelper::ImplInsertGraphicURL which is used at export use that type
// and use the original graphic at export for the ODF, without evtl. recoding
// of trhe bitmap graphic data to something without loss (e.g. PNG) but bigger
if
(
bHasOriginalData
)
{
// #15508# if we have the original data at the Graphic, let it survive
// by using that Graphic again, this time at a GraphicObject without link.
// This happens e.g. when inserting a linked graphic and breaking the link
maGrfObj
.
SetGraphic
(
aLocalGraphic
);
}
else
if
(
aFileName
.
Len
())
{
// #15508# we have no original data, but a file name. This happens e.g.
// when inserting a linked graphic and save, reload document. Try to access
// that data from the original file; if this works, use it. Else use the
// data we have (but without knowing the original format)
int
nRes
=
GRFILTER_OK
;
GraphicFilter
*
pFlt
=
GraphicFilter
::
GetGraphicFilter
();
Graphic
aNew
;
nRes
=
GraphicFilter
::
LoadGraphic
(
aFileName
,
String
(),
aNew
,
pFlt
);
if
(
GRFILTER_OK
==
nRes
)
{
maGrfObj
.
SetGraphic
(
aNew
);
}
}
}
}
}
}
...
...
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