[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2012-03-01 Thread Miklos Vajna
 sw/source/core/inc/frame.hxx |2 ++
 sw/source/core/inc/layfrm.hxx|4 +++-
 sw/source/core/inc/rootfrm.hxx   |2 +-
 sw/source/core/layout/newfrm.cxx |9 -
 sw/source/core/layout/ssfrm.cxx  |   21 +++--
 5 files changed, 33 insertions(+), 5 deletions(-)

New commits:
commit 011a970de6f65fe6543337c7da643d998a450750
Author: Michael Stahl mst...@redhat.com
Date:   Mon Feb 27 20:43:27 2012 +0100

SwRootFrm::~SwRootFrm: refactor:

Since CWS swlayoutrefactoring the SwRootFrms are destroyed with
SwDoc::IsInDtor not set.  This can cause at least reads of freed
SwRootFrm members when executing the dtors of SwRootFrm base class
SwLayoutFrm calling into SwRootFrm::GetPageAtPos.

Prevent this scenario by:
- moving the implementation of SwRootFrm base class dtors to new
  methods SwFrm::Destroy and SwLayoutFrm::Destroy
- calling SwFrm::Destroy and SwLayoutFrm::Destroy explicitly before
  SwRootFrm members are freed
(cherry picked from commit ebb74441790a9852b1a1532d6e025c324666f6fc)

Signed-off-by: Miklos Vajna vmik...@suse.cz

diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index ba148cc..f118233 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -442,6 +442,8 @@ protected:
 void ColLock() { bColLocked = sal_True; }
 void ColUnlock()   { bColLocked = sal_False; }
 
+void Destroy(); // for ~SwRootFrm
+
 // Only used by SwRootFrm Ctor to get 'this' into mpRoot...
 void setRootFrm( SwRootFrm* pRoot ){ mpRoot = pRoot; }
 
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index c6d17ba..14f4a3e 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -56,6 +56,8 @@ class SwLayoutFrm: public SwFrm
 
 void CopySubtree( const SwLayoutFrm *pDest );
 protected:
+void Destroy(); // for ~SwRootFrm
+
 virtual void Format( const SwBorderAttrs *pAttrs = 0 );
 virtual void MakeAll();
 
@@ -104,7 +106,7 @@ public:
const sal_Bool bDefaultExpand = sal_True ) 
const;
 
 SwLayoutFrm( SwFrmFmt*, SwFrm* );
-~SwLayoutFrm();
+virtual ~SwLayoutFrm();
 
 virtual void Paint( SwRect const,
 SwPrintData const*const pPrintData = NULL ) const;
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index a73b28b..e460486 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -178,7 +178,7 @@ public:
 static sal_Bool HasSameRect( const SwRect rRect );
 
 SwRootFrm( SwFrmFmt*, ViewShell* );
-~SwRootFrm();
+virtual ~SwRootFrm();
 void Init(SwFrmFmt*);
 
 ViewShell *GetCurrShell() const { return pCurrShell; }
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index f51aa6b..e96ebb8 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -630,8 +630,15 @@ SwRootFrm::~SwRootFrm()
 (*pCurrShells)[i]-pRoot = 0;
 
 delete pCurrShells;
+pCurrShells = 0;
 
-OSL_ENSURE( 0==nAccessibleShells, Some accessible shells are left );
+// Some accessible shells are left = problems on second SwFrm::Destroy 
call
+assert(0 == nAccessibleShells);
+
+// manually call base classes Destroy because it could call stuff
+// that accesses members of this
+SwLayoutFrm::Destroy();
+SwFrm::Destroy();
 }
 
 /*
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 6ac8bc7..a77b00b 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -365,7 +365,7 @@ Point SwFrm::GetFrmAnchorPos( sal_Bool 
bIgnoreFlysAnchoredAtThisFrame ) const
 |*
 |*/
 
-SwFrm::~SwFrm()
+void SwFrm::Destroy()
 {
 // accessible objects for fly and cell frames have been already disposed
 // by the destructors of the derived classes.
@@ -405,6 +405,7 @@ SwFrm::~SwFrm()
 }
 if ( pDrawObjs )
 delete pDrawObjs;
+pDrawObjs = 0;
 }
 
 #if OSL_DEBUG_LEVEL  1
@@ -413,6 +414,14 @@ SwFrm::~SwFrm()
 #endif
 }
 
+SwFrm::~SwFrm()
+{
+if (!IsRootFrm()) // ~SwRootFrm already calls Destroy!
+{
+Destroy();
+}
+}
+
 /*/
 
 const SwFrmFmt * SwLayoutFrm::GetFmt() const
@@ -560,7 +569,7 @@ void SwCntntFrm::DelFrms( const SwCntntNode rNode )
 |*/
 
 
-SwLayoutFrm::~SwLayoutFrm()
+void SwLayoutFrm::Destroy()
 {
 SwFrm *pFrm = pLower;
 
@@ -644,6 +653,14 @@ SwLayoutFrm::~SwLayoutFrm()
 }
 }
 
+SwLayoutFrm::~SwLayoutFrm()
+{
+if (!IsRootFrm()) // ~SwRootFrm already calls Destroy!
+{
+

[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2012-02-20 Thread Miklos Vajna
 sw/source/core/layout/ftnfrm.cxx |2 +-
 sw/source/core/layout/newfrm.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a6d98bb23f5ced5cf4f03666099f4bcb1f7ab185
Author: Michael Stahl mst...@redhat.com
Date:   Sat Feb 18 00:06:33 2012 +0100

fdo#39510: fix yet more layout crashes in ~SwRootFrm:

Call SwRootFrm::RemoveFtns with the proper boolean to also eliminate
EndNotes, and fix a faulty while loop in RemoveFtns that's been preventing
removal of footnotes in certain sections since the dawn of CVS history.
(regression from CWS swlayoutrefactoring, crashes on bugdoc from i#101776)
(cherry picked from commit 962d0500c4debaef43e5f146e47e08c66d851562)

Signed-off-by: Miklos Vajna vmik...@suse.cz

diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index a8e1b46..8f0d1aa 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -1004,7 +1004,7 @@ void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool 
bPageOnly, sal_Bool bEndNotes
 if( pBody  pBody-Lower() )
 {
 SwFrm* pLow = pBody-Lower();
-while( pLow-GetNext() )
+while (pLow)
 {
 if( pLow-IsSctFrm() ( !pLow-GetNext() ||
 ((SwSectionFrm*)pLow)-IsAnyNoteAtEnd() ) 
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 3943336..f51aa6b 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -616,7 +616,7 @@ SwRootFrm::~SwRootFrm()
 // also searches backwards to find the master of footnotes, they must be
 // considered to be owned by the SwRootFrm and also be destroyed here,
 // before tearing down the (now footnote free) rest of the layout.
-AllRemoveFtns();
+RemoveFtns(0, false, true);
 
 if(pBlink)
 pBlink-FrmDelete( this );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2012-02-14 Thread Fridrich Strba
 sw/source/core/text/itrform2.cxx |5 ++---
 sw/source/core/text/txttab.cxx   |4 
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 042e3727babc62913c753594412e7d7efbed43bf
Author: Cédric Bosdonnat cedric.bosdonnat@free.fr
Date:   Fri Feb 10 21:57:54 2012 +0100

fdo#45908: Cleaning up the tabs too early can cause loops

Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 78dd1f1..c7a6cbe 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1383,9 +1383,8 @@ SwLinePortion *SwTxtFormatter::NewPortion( 
SwTxtFormatInfo rInf )
 }
 }
 
-// Wenn eine Portion erzeugt wird, obwohl eine RestPortion ansteht,
-// dann haben wir es mit einem Feld zu tun, das sich aufgesplittet
-// hat, weil z.B. ein Tab enthalten ist.
+// if a portion is created despite there being a pending RestPortion,
+// then it is a field which has been split (e.g. because it contains a 
Tab)
 if( pPor  rInf.GetRest() )
 pPor-SetLen( 0 );
 
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 5b77142..d3f4e8c 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -85,10 +85,6 @@ sal_uInt16 SwLineInfo::NumberOfTabStops() const
 SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo rInf, bool bAuto 
) const
 {
 SwTabPortion *pTabPor = 0;
-SwTabPortion  *pLastTab = rInf.GetLastTab();
-if( pLastTab  ( pLastTab-IsTabCntPortion() || 
pLastTab-IsTabDecimalPortion() ) )
-if( pLastTab-PostFormat( rInf ) )
-return 0;
 
 xub_Unicode cFill = 0;
 xub_Unicode cDec = 0;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2012-02-07 Thread Eike Rathke
 sw/source/core/unocore/unotbl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e078868c290014ddc5eac4a982349ac75557739e
Author: Michael Stahl mst...@redhat.com
Date:   Fri Feb 3 18:49:56 2012 +0100

fdo#45115: SwXTextTable: fix setting borders

This plus e549f52f16c4a519ed3eddb9c66c19bacc247590 fixes the problem.

Signed-off-by: Eike Rathke er...@redhat.com

diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index 898adef..77cf0af 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -138,7 +138,7 @@ sal_Bool lcl_LineToSvxLine(const table::BorderLine rLine, 
SvxBorderLine rSvxLi
 {
 rSvxLine.SetColor(Color(rLine.Color));
 
-rSvxLine.GuessLinesWidths( 
editeng::SvxBorderStyle(table::BorderLineStyle::SOLID),
+rSvxLine.GuessLinesWidths( editeng::NO_STYLE,
 MM100_TO_TWIP( rLine.OuterLineWidth ),
 MM100_TO_TWIP( rLine.InnerLineWidth ),
 MM100_TO_TWIP( rLine.LineDistance ) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2012-01-16 Thread Michael Meeks
 sw/source/ui/index/cnttab.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 36f83debd1b8a200515fafdf66bdd7a4aec01ad5
Author: Cédric Bosdonnat cedric.bosdonnat@free.fr
Date:   Fri Jan 13 16:08:17 2012 +0100

fdo#38515: Fixed crasher in dialog destructor

Signed-off-by: Michael Meeks michael.me...@suse.com

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index ae7dfad..fcfb2f8 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -358,6 +358,9 @@ SwMultiTOXTabDialog::~SwMultiTOXTabDialog()
 {
 
SW_MOD()-GetModuleConfig()-SetShowIndexPreview(aShowExampleCB.IsChecked());
 
+// fdo#38515 Avoid setting focus on deleted controls in the destructors
+EnableInput( sal_False );
+
 for(sal_uInt16 i = 0; i  nTypeCount; i++)
 {
 delete pFormArr[i];
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2012-01-02 Thread Petr Mladek
 sw/source/ui/app/applab.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 502ef71db74c3cdb1433c3402a0d93971dc47f1b
Author: Winfried Donkers w.donk...@dci-electronics.nl
Date:   Fri Dec 9 17:44:20 2011 +0100

fdo#36874: Label PRINTING misplaced on paper sheet

Signed-off-by: Petr Mladek pmla...@suse.cz

diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 00809fe..f1f8536 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -266,10 +266,14 @@ void SwModule::InsertLab(SfxRequest rReq, sal_Bool 
bLabel)
 
 aDesc.SetUseOn(nsUseOnPage::PD_ALL);   
// Site numbering
 
+// fix (fdo36874) revised page size calculation
 // Set page size
-rFmt.SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE,
-rItem.lLeft  + rItem.nCols * 
rItem.lHDist + MINLAY,
-rItem.lUpper + rItem.nRows * 
rItem.lVDist + MINLAY));
+long lPgWidth, lPgHeight;
+lPgWidth = (((rItem.lLeft  + (rItem.nCols - 1) * rItem.lHDist + 
rItem.lWidth + rItem.lLeft)  MINLAY) ?
+(rItem.lLeft  + (rItem.nCols - 1) * rItem.lHDist + 
rItem.lWidth + rItem.lLeft) : MINLAY);
+lPgHeight = (((rItem.lUpper + (rItem.nRows - 1) * rItem.lVDist + 
rItem.lHeight + rItem.lUpper)  MINLAY) ?
+(rItem.lUpper + (rItem.nRows - 1) * rItem.lVDist + 
rItem.lHeight + rItem.lUpper) : MINLAY);
+rFmt.SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE, lPgWidth, lPgHeight 
));
 
 // Numbering type
 SvxNumberType aType;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2011-12-07 Thread Lubos Lunak
 sw/source/core/text/frmform.cxx |   11 ++-
 sw/source/core/text/inftxt.cxx  |3 ++-
 sw/source/core/text/txtfly.cxx  |6 --
 sw/source/core/text/txtfrm.cxx  |7 +--
 4 files changed, 17 insertions(+), 10 deletions(-)

New commits:
commit 4c7dc58e47796ff502bbdc5fb93c648c30fc4daf
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Dec 7 17:23:47 2011 +0100

backport of 3524727db0f3cfecf3a47046795c527808c10c3e
commit 3524727db0f3cfecf3a47046795c527808c10c3e
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Jun 23 15:14:00 2011 +0100

Related: #i58612# don't crash anyway

diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 80c8c76..c383c7e 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1445,10 +1445,11 @@ void SwTxtFrm::_Format( SwTxtFormatter rLine, 
SwTxtFormatInfo rInf,
 
 if( IsFollow()  IsFieldFollow()  rLine.GetStart() == GetOfst() )
 {
-const SwLineLayout* pLine;
+SwTxtFrm *pMaster = FindMaster();
+OSL_ENSURE( pMaster, SwTxtFrm::Format: homeless follow );
+const SwLineLayout* pLine=NULL;
+if (pMaster)
 {
-SwTxtFrm *pMaster = FindMaster();
-OSL_ENSURE( pMaster, SwTxtFrm::Format: homeless follow );
 if( !pMaster-HasPara() )
 pMaster-GetFormatted();
 SwTxtSizeInfo aInf( pMaster );
@@ -1456,8 +1457,8 @@ void SwTxtFrm::_Format( SwTxtFormatter rLine, 
SwTxtFormatInfo rInf,
 aMasterLine.Bottom();
 pLine = aMasterLine.GetCurr();
 }
-SwLinePortion* pRest =
-rLine.MakeRestPortion( pLine, GetOfst() );
+SwLinePortion* pRest = pLine ?
+rLine.MakeRestPortion(pLine, GetOfst()) : NULL;
 if( pRest )
 rInf.SetRest( pRest );
 else
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index ee9f9b9..87a81cd 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1469,7 +1469,8 @@ void SwTxtFormatInfo::Init()
 if ( GetTxtFrm()-IsFollow() )
 {
 const SwTxtFrm* pMaster = GetTxtFrm()-FindMaster();
-const SwLinePortion* pTmpPara = pMaster-GetPara();
+OSL_ENSURE(pMaster, pTxtFrm without Master);
+const SwLinePortion* pTmpPara = pMaster ? pMaster-GetPara() : NULL;
 
 // there is a master for this follow and the master does not have
 // any contents (especially it does not have a number portion)
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 78f7021..e2d734d 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -895,7 +895,7 @@ sal_Bool SwTxtFly::IsAnyObj( const SwRect rRect ) const
 const SwCntntFrm* SwTxtFly::_GetMaster()
 {
 pMaster = pCurrFrm;
-while( pMaster-IsFollow() )
+while( pMaster  pMaster-IsFollow() )
 pMaster = (SwCntntFrm*)pMaster-FindMaster();
 return pMaster;
 }
@@ -1614,7 +1614,9 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
 SwTwips SwTxtFly::CalcMinBottom() const
 {
 SwTwips nRet = 0;
-const SwSortedObjs *pDrawObj = GetMaster()-GetDrawObjs();
+const SwCntntFrm *pLclMaster = GetMaster();
+OSL_ENSURE(pLclMaster, SwTxtFly without master);
+const SwSortedObjs *pDrawObj = pLclMaster ? pLclMaster-GetDrawObjs() : 
NULL;
 const sal_uInt32 nCount = pDrawObj ? pDrawObj-Count() : 0;
 if( nCount )
 {
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index d90794b..77343ab 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -650,9 +650,12 @@ void SwTxtFrm::HideAndShowObjects()
 }
 }
 
-if ( IsFollow() )
+if (IsFollow())
 {
-FindMaster()-HideAndShowObjects();
+SwTxtFrm *pMaster = FindMaster();
+OSL_ENSURE(pMaster, SwTxtFrm without master);
+if (pMaster)
+pMaster-HideAndShowObjects();
 }
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2011-11-10 Thread Michael Meeks
 sw/source/filter/ww8/ww8graf.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e13ff3e8d415241a680c32e3993c5b23701ef2aa
Author: Noel Power noel.po...@novell.com
Date:   Tue Nov 8 13:47:59 2011 +

NO_STYLE default for borderlines mso import, fixes image size issue 
bnc#718971

Signed-off-by: Michael Meeks michael.me...@suse.com

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 3ee02ae..e26def2 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1479,7 +1479,7 @@ sal_Int32 
SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color rLineColor,
 if( !rLineThick )
 return nOutsideThick;
 
-::editeng::SvxBorderStyle nIdx = ::editeng::SOLID;
+::editeng::SvxBorderStyle nIdx = ::editeng::NO_STYLE;
 
 sal_Int32 nLineThick=rLineThick;
 nOutsideThick = SwMSDffManager::GetEscherLineMatch(eLineStyle,
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2011-10-26 Thread Thorsten Behrens
 sw/source/core/graphic/ndgrf.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1a6c6a66b72ca64641cb16b3c49c40aba06602f1
Author: Thorsten Behrens tbehr...@novell.com
Date:   Tue Oct 25 20:54:01 2011 +0200

Fix fdo#41995 fallout - recognize .svg in odt container

Seems the graphic load code is stupid and not using the path name /
file extension to guess file type, but only magic byte detection.
Giving filter framework the path now, so that .svg actually loads.

This parrots 050350f326629c6edffcdb2cf288893027f264e6, but for
Writer, which sadly sports its own Graphic implementation.

Signed-off-by: Noel Power nopo...@suse.com

diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
old mode 100644
new mode 100755
index 0a11a93..62a9a4b
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -394,12 +394,11 @@ Size SwGrfNode::GetTwipSize() const
 sal_Bool SwGrfNode::ImportGraphic( SvStream rStrm )
 {
 Graphic aGraphic;
-if( !GraphicFilter::GetGraphicFilter()-ImportGraphic( aGraphic, String(), 
rStrm ) )
+const String aGraphicURL( aGrfObj.GetUserData() );
+if( !GraphicFilter::GetGraphicFilter()-ImportGraphic( aGraphic, 
aGraphicURL, rStrm ) )
 {
-const String aUserData( aGrfObj.GetUserData() );
-
 aGrfObj.SetGraphic( aGraphic );
-aGrfObj.SetUserData( aUserData );
+aGrfObj.SetUserData( aGraphicURL );
 return sal_True;
 }
 
@@ -893,7 +892,8 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const 
SwNodeIndex rIdx ) const
 SvStream* pStrm = _GetStreamForEmbedGrf( refPics, aStrmName );
 if ( pStrm )
 {
-GraphicFilter::GetGraphicFilter()-ImportGraphic( aTmpGrf, 
String(), *pStrm );
+const String aGraphicURL( aGrfObj.GetUserData() );
+GraphicFilter::GetGraphicFilter()-ImportGraphic( aTmpGrf, 
aGraphicURL, *pStrm );
 delete pStrm;
 }
 // --
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits