summaryrefslogtreecommitdiff
path: root/sw/source/core/graphic/ndgrf.cxx
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2014-05-19 11:37:11 +0000
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-27 02:28:00 -0500
commit5a48cf8d01454ea6539d6bdc3c8ad7588c50701c (patch)
treefebc5780da95749c5e0efe5ea62cb7de574e20b8 /sw/source/core/graphic/ndgrf.cxx
parent9d981abc3f310adf9af3454dd515ea356b31d3c1 (diff)
various situations where graphic go missing on save
Resolves: #i114361# provide and accept changed URL... of embedded graphic file during save (ODF export) (cherry picked from commit a90c007908eb3f66e28a9ea525729065db652b6f) Conflicts: sw/inc/ndgrf.hxx sw/source/core/graphic/ndgrf.cxx sw/source/core/unocore/unoframe.cxx sw/source/filter/xml/xmltexte.cxx xmloff/source/draw/shapeexport2.cxx (cherry picked from commit 192abfb36b8a4859879fcb49326d59ed62083c8d) Conflicts: sw/inc/ndgrf.hxx Change-Id: I9d4a02af2561467fe1a66f036b55d6dcf2429986 Resolves: #i124946# only apply new embedded stream name... for a graphic, if is already has one. - needed correction for the fix made for issue #i114361# (cherry picked from commit 23a4bd91ceb89e5e0a2413f80fc987db106a0bc9) Conflicts: sw/inc/ndgrf.hxx sw/source/core/graphic/ndgrf.cxx sw/source/filter/xml/xmltexte.cxx (cherry picked from commit 05e07167e422caf58d23ff883edda30acc3ba88d) Conflicts: sw/inc/ndgrf.hxx sw/source/core/graphic/ndgrf.cxx Change-Id: Ia9771932ae5b380ccae9b0a3cbb79d41f5d9bdb8 Resolves: #i124966# keep picture format information - <GfxLink> instance - also for the reading of preview picture data in order to avoid trouble on save in case that the preview data equals the picture data (cherry picked from commit d6af1b601bb8fe2569d17e01505f67e1becc9366) Conflicts: svx/source/svdraw/svdograf.cxx (cherry picked from commit 597ae8dd9c28ee370874b219d594fa1c105f2c72) Conflicts: svx/source/svdraw/svdograf.cxx Change-Id: Ifecb07b4d5d33d593502fccd6f21644893027d2d Reviewed-on: https://gerrit.libreoffice.org/9456 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/core/graphic/ndgrf.cxx')
-rw-r--r--sw/source/core/graphic/ndgrf.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 725296ffd57b..c6d3c54504bf 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -233,7 +233,7 @@ sal_Bool SwGrfNode::ReRead(
else if( pGraphic && rGrfName.isEmpty() )
{
// Old stream must be deleted before the new one is set.
- if( HasStreamName() )
+ if( HasEmbeddedStreamName() )
DelStreamName();
maGrfObj.SetGraphic( *pGraphic );
@@ -243,7 +243,7 @@ sal_Bool SwGrfNode::ReRead(
else if( pGrfObj && rGrfName.isEmpty() )
{
// Old stream must be deleted before the new one is set.
- if( HasStreamName() )
+ if( HasEmbeddedStreamName() )
DelStreamName();
maGrfObj = *pGrfObj;
@@ -257,7 +257,7 @@ sal_Bool SwGrfNode::ReRead(
return sal_True;
else
{
- if( HasStreamName() )
+ if( HasEmbeddedStreamName() )
DelStreamName();
// create new link for the graphic object
@@ -561,7 +561,7 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
else if( maGrfObj.IsSwappedOut() )
{
// graphic is in storage or in a temp file
- if( !HasStreamName() )
+ if( !HasEmbeddedStreamName() )
nRet = (short)maGrfObj.SwapIn();
else
{
@@ -614,7 +614,7 @@ short SwGrfNode::SwapOut()
// Swapping is only needed for embedded pictures.
// The graphic will be written into a temp file if it is new, i.e.
// if there is no stream name in the storage yet
- if( !HasStreamName() )
+ if( !HasEmbeddedStreamName() )
if( !maGrfObj.SwapOut() )
return 0;
}
@@ -666,7 +666,7 @@ sal_Bool SwGrfNode::SavePersistentData()
}
// swap in first if already in storage
- if( HasStreamName() && !SwapIn() )
+ if( HasEmbeddedStreamName() && !SwapIn() )
return sal_False;
// #i44367#
@@ -820,7 +820,7 @@ void SwGrfNode::ScaleImageMap()
void SwGrfNode::DelStreamName()
{
- if( HasStreamName() )
+ if( HasEmbeddedStreamName() )
{
// then remove graphic from storage
uno::Reference < embed::XStorage > xDocStg = GetDoc()->GetDocStorage();
@@ -929,7 +929,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
Graphic aTmpGrf;
SwBaseLink* pLink = (SwBaseLink*)(::sfx2::SvBaseLink*) refLink;
- if( !pLink && HasStreamName() )
+ if( !pLink && HasEmbeddedStreamName() )
{
try
{
@@ -1008,7 +1008,7 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
{
pRet = GRFMGR_AUTOSWAPSTREAM_TEMP;
- if( HasStreamName() )
+ if( HasEmbeddedStreamName() )
{
try
{