summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-24 20:36:58 +0100
committerDavid Tardon <dtardon@redhat.com>2015-08-25 07:48:10 +0000
commit436ccb0df15c1c654e5b3eebfd3ba94ddd2341c5 (patch)
treec8188c6bae9a1c7757e0af4c02127638e1f03d17 /sw
parent1f3162c473c43a87b261fce83a69e44085394f45 (diff)
consider validity of m_nDrawCpO
(cherry picked from commit 8329eb5e4a368f29501cfdf060f96e52df912dd2) Change-Id: Ifbd131440bad6d840d369c99628cb8904697ad96 Reviewed-on: https://gerrit.libreoffice.org/17971 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx3
-rw-r--r--sw/source/filter/ww8/ww8par.hxx3
3 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index d3156f3e4a86..77e971299158 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 1a33e2b76f8e..583d87682a29 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 e53eb76f3a3b..9808af9bf365 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)