sw/source/filter/ww8/ww8graf.cxx |    2 +-
 sw/source/filter/ww8/ww8par.cxx  |    3 ++-
 sw/source/filter/ww8/ww8par.hxx  |    3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 436ccb0df15c1c654e5b3eebfd3ba94ddd2341c5
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Aug 24 20:36:58 2015 +0100

    consider validity of m_nDrawCpO
    
    (cherry picked from commit 8329eb5e4a368f29501cfdf060f96e52df912dd2)
    
    Change-Id: Ifbd131440bad6d840d369c99628cb8904697ad96
    Reviewed-on: https://gerrit.libreoffice.org/17971
    Reviewed-by: David Tardon <dtar...@redhat.com>
    Tested-by: David Tardon <dtar...@redhat.com>

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index d3156f3..77e9712 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2392,7 +2392,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long 
nGrafAnchorCp )
     ::SetProgressState(m_nProgress, m_pDocShell);     // Update
 
     m_nDrawCpO = 0;
-    m_pWwFib->GetBaseCp(m_pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : 
MAN_TXBX, &m_nDrawCpO); //TODO: check return value
+    m_bDrawCpOValid = m_pWwFib->GetBaseCp(m_pPlcxMan->GetManType() == MAN_HDFT 
? MAN_TXBX_HDFT : MAN_TXBX, &m_nDrawCpO);
 
     GrafikCtor();
 
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 1a33e2b..583d876 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4183,6 +4183,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, 
SotStorage* pStorage,
     , m_nIniFlags1(0)
     , m_nFieldFlags(0)
     , m_bRegardHindiDigits( false )
+    , m_bDrawCpOValid( false )
     , m_nDrawCpO(0)
     , m_nPicLocFc(0)
     , m_nObjLocFc(0)
@@ -6182,7 +6183,7 @@ bool SwMSDffManager::GetOLEStorageName(long nOLEId, 
OUString& rStorageName,
             // Note: Ask MM for initialization of <nStartCp> and <nEndCp>.
             // Note: Ask MM about assertions in method 
<rReader.GetTxbxTextSttEndCp(..)>.
             WW8_CP nStartCp, nEndCp;
-            if ( rReader.GetTxbxTextSttEndCp(nStartCp, nEndCp,
+            if ( rReader.m_bDrawCpOValid && 
rReader.GetTxbxTextSttEndCp(nStartCp, nEndCp,
                             static_cast<sal_uInt16>((nOLEId >> 16) & 0xFFFF),
                             static_cast<sal_uInt16>(nOLEId & 0xFFFF)) )
             {
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index e53eb76..9808af9 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1267,7 +1267,8 @@ private:
     sal_uInt32 m_nFieldTagBad[3];      // dito fuers Taggen von nicht 
importierbaren F.
     bool m_bRegardHindiDigits;  // import digits in CTL scripts as Hindi 
numbers
 
-    WW8_CP m_nDrawCpO;            // Anfang der Txbx-SubDocs
+    bool m_bDrawCpOValid;
+    WW8_CP m_nDrawCpO;            // start of Txbx-SubDocs
 
     sal_uLong m_nPicLocFc;            // Picture Location in File (FC)
     sal_uLong m_nObjLocFc;            // Object Location in File (FC)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to