diff options
Diffstat (limited to 'sw/source/filter/ww8/ww8graf.cxx')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 113016dc036b..3cb0aebf6bc8 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2402,7 +2402,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec& rRecord, WW8_FS if (m_nInTable && (eHoriRel == text::RelOrientation::FRAME || eHoriRel == text::RelOrientation::CHAR) && rFSPA.nwr == 3 && - !IsObjectLayoutInTableCell(rRecord.nLayoutInTableCell)) + !IsObjectLayoutInTableCell(rRecord.nGroupShapeBooleanProperties)) { eHoriRel = text::RelOrientation::PAGE_PRINT_AREA; } @@ -2452,7 +2452,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec& rRecord, WW8_FS } // #i84783# -bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const +bool SwWW8ImplReader::IsObjectLayoutInTableCell(const sal_uInt32 nGroupShapeBooleanProperties) const { bool bIsObjectLayoutInTableCell = false; @@ -2474,7 +2474,7 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTable case 0x0000: // version 8 aka Microsoft Word 97 { bIsObjectLayoutInTableCell = false; - OSL_ENSURE( nLayoutInTableCell == 0xFFFFFFFF, + OSL_ENSURE(nGroupShapeBooleanProperties == 0, "no explicit object attribute layout in table cell expected." ); } break; @@ -2485,23 +2485,11 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTable case 0xC000: // version 14 aka Microsoft Word 2010 case 0xE000: // version 15 aka Microsoft Word 2013 { - // #i98037# - // adjustment of conditions needed after deeper analysis of - // certain test cases. - if ( nLayoutInTableCell == 0xFFFFFFFF || // no explicit attribute value given - nLayoutInTableCell == 0x80008000 || - ( nLayoutInTableCell & 0x02000000 && - !(nLayoutInTableCell & 0x80000000 ) ) ) - { - bIsObjectLayoutInTableCell = true; - } - else - { - // Documented in [MS-ODRAW], 2.3.4.44 "Group Shape Boolean Properties". - bool fUsefLayoutInCell = (nLayoutInTableCell & 0x80000000) >> 31; - bool fLayoutInCell = (nLayoutInTableCell & 0x8000) >> 15; - bIsObjectLayoutInTableCell = fUsefLayoutInCell && fLayoutInCell; - } + // Documented in [MS-ODRAW], 2.3.4.44 "Group Shape Boolean Properties". + bool fUsefLayoutInCell = (nGroupShapeBooleanProperties & 0x80000000) >> 31; + bool fLayoutInCell = (nGroupShapeBooleanProperties & 0x8000) >> 15; + // If unspecified, defaults to true + bIsObjectLayoutInTableCell = !fUsefLayoutInCell || fLayoutInCell; } break; default: @@ -2696,7 +2684,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( tools::Long nGrafAnchorCp ) return nullptr; } const bool bLayoutInTableCell = - m_nInTable && IsObjectLayoutInTableCell( pRecord->nLayoutInTableCell ); + m_nInTable && IsObjectLayoutInTableCell(pRecord->nGroupShapeBooleanProperties); // #i18732# - Switch on 'follow text flow', if object is laid out // inside table cell |