incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1172108 - in /incubator/ooo/trunk/main/sw/source/filter/ww8: wrtw8nds.cxx wrtww8.cxx wrtww8.hxx wrtww8gr.cxx ww8atr.cxx
Date Sat, 17 Sep 2011 22:38:19 GMT
Author: mst
Date: Sat Sep 17 22:38:19 2011
New Revision: 1172108

URL: http://svn.apache.org/viewvc?rev=1172108&view=rev
Log:
sw34bf06: #i104384#: Replace MSWordExportBase::bInTable by MSWordExportBase::IsInTable()

# HG changeset patch
# User Henning Brinkmann <hbrinkm@openoffice.org>
# Date 1301385565 -7200
# Node ID 713dcef8f169f411fe62b073dab24ca3dfc02a44
# Parent  75d6ff8443f1f268780d970c67855d963c781566

Modified:
    incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx
    incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx
    incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx
    incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx
    incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx?rev=1172108&r1=1172107&r2=1172108&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx Sat Sep 17 22:38:19 2011
@@ -1788,7 +1788,7 @@ void MSWordExportBase::OutputTextNode( c
 
     AttrOutput().StartParagraph( pTextNodeInfo );
 
-    bool bFlyInTable = mpParentFrame && bIsInTable;
+    bool bFlyInTable = mpParentFrame && IsInTable();
 
     if ( !bFlyInTable )
         nStyleBeforeFly = GetId( lcl_getFormatCollection( *this, &rNode ) );
@@ -2026,7 +2026,7 @@ void MSWordExportBase::OutputTextNode( c
     
     AttrOutput().ParagraphStyle( nStyle );
 
-    if ( mpParentFrame && !bIsInTable )    // Fly-Attrs
+    if ( mpParentFrame && IsInTable() )    // Fly-Attrs
         OutputFormat( mpParentFrame->GetFrmFmt(), false, false, true );
 
     if ( pTextNodeInfo.get() != NULL )
@@ -2527,7 +2527,7 @@ void MSWordExportBase::OutputSectionNode
 
     SwNodeIndex aIdx( rSectionNode, 1 );
     const SwNode& rNd = aIdx.GetNode();
-    if ( !rNd.IsSectionNode() && !bIsInTable ) //No sections in table
+    if ( !rNd.IsSectionNode() && !IsInTable() ) //No sections in table
     {
         // Bug 74245 - if the first Node inside the section has an own
         //              PageDesc or PageBreak attribut, then dont write
@@ -2678,7 +2678,7 @@ void WW8AttributeOutput::OutputFlyFrame_
         if( nStt >= nEnd )      // kein Bereich, also kein gueltiger Node
             return;
 
-        if ( !m_rWW8Export.bIsInTable && rFmt.IsInline() )
+        if ( !m_rWW8Export.IsInTable() && rFmt.IsInline() )
         {
             //Test to see if this textbox contains only a single graphic/ole
             SwTxtNode* pParTxtNode = rAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode();
@@ -2717,7 +2717,7 @@ void WW8AttributeOutput::OutputFlyFrame_
 
             m_rWW8Export.mpParentFrame = &rFmt;
             if (
-                 m_rWW8Export.bIsInTable &&
+                m_rWW8Export.IsInTable() &&
                  (FLY_AT_PAGE != rAnch.GetAnchorId()) &&
                  !m_rWW8Export.pDoc->GetNodes()[ nStt ]->IsNoTxtNode()
                )

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx?rev=1172108&r1=1172107&r2=1172108&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx Sat Sep 17 22:38:19 2011
@@ -1779,7 +1779,6 @@ void MSWordExportBase::SaveData( sal_uLo
     aData.eOldAnchorType = eNewAnchorType;
 
     aData.bOldOutTable = bOutTable;
-    aData.bOldIsInTable = bIsInTable;
     aData.bOldFlyFrmAttrs = bOutFlyFrmAttrs;
     aData.bOldStartTOX = bStartTOX;
     aData.bOldInWriteTOX = bInWriteTOX;
@@ -1815,7 +1814,6 @@ void MSWordExportBase::RestoreData()
     pOrigPam = rData.pOldEnd;
 
     bOutTable = rData.bOldOutTable;
-    bIsInTable = rData.bOldIsInTable;
     bOutFlyFrmAttrs = rData.bOldFlyFrmAttrs;
     bStartTOX = rData.bOldStartTOX;
     bInWriteTOX = rData.bOldInWriteTOX;
@@ -2459,7 +2457,7 @@ void WW8Export::SectionBreaksAndFrames( 
     OutputSectionBreaks( rNode.GetpSwAttrSet(), rNode );
 
     // all textframes anchored as character for the winword 7- format
-    if ( !bWrtWW8 && !bIsInTable )
+    if ( !bWrtWW8 && !IsInTable() )
         OutWW6FlyFrmsInCntnt( rNode );
 }
 
@@ -2541,7 +2539,7 @@ void MSWordExportBase::WriteText()
                 ;
             else if ( aIdx.GetNode().IsSectionNode() )
                 ;
-            else if ( !bIsInTable ) //No sections in table
+            else if ( !IsInTable() ) //No sections in table
             {
                 ReplaceCr( (char)0xc ); // Indikator fuer Page/Section-Break
 
@@ -2620,6 +2618,28 @@ void WW8Export::WriteMainText()
 #endif
 }
 
+bool MSWordExportBase::IsInTable() const
+{
+    bool bResult = false;
+
+    if (pCurPam != NULL)
+    {
+        SwNode * pNode = pCurPam->GetNode();
+        
+        if (pNode != NULL && mpTableInfo.get() != NULL)
+        {
+            ww8::WW8TableNodeInfo::Pointer_t pTableNodeInfo = mpTableInfo->getTableNodeInfo(pNode);
+
+            if (pTableNodeInfo.get() != NULL && pTableNodeInfo->getDepth() >
0)
+            {
+                bResult = true;
+            }
+        }
+    }
+
+    return bResult;
+}
+
 typedef ww8::WW8Sttb< ww8::WW8Struct >  WW8SttbAssoc;
 
 void WW8Export::WriteFkpPlcUsw()
@@ -2929,7 +2949,7 @@ void MSWordExportBase::ExportDocument( b
 
     bStyDef = bBreakBefore = bOutKF =
         bOutFlyFrmAttrs = bOutPageDescs = bOutTable = bOutFirstPage =
-        bIsInTable = bOutGrf = bInWriteEscher = bStartTOX =
+        bOutGrf = bInWriteEscher = bStartTOX =
         bInWriteTOX = false;
 
     bFtnAtTxtEnd = bEndAtTxtEnd = true;

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx?rev=1172108&r1=1172107&r2=1172108&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx Sat Sep 17 22:38:19 2011
@@ -541,8 +541,6 @@ public:
     sal_uInt8 bOutFirstPage : 1;     // write Attrset of FirstPageDesc
     sal_uInt8 bOutTable : 1;         // Tabelle wird ausgegeben
                                 //    ( wird zB bei Flys in Tabelle zurueckgesetzt )
-    sal_uInt8 bIsInTable : 1;        // wird sind innerhalb der Ausgabe einer Tabelle
-                                //    ( wird erst nach der Tabelle zurueckgesetzt )
     sal_uInt8 bOutGrf : 1;           // Grafik wird ausgegeben
     sal_uInt8 bInWriteEscher : 1;    // in write textboxes
     sal_uInt8 bStartTOX : 1;         // true: a TOX is startet
@@ -574,6 +572,9 @@ public:
     /// Iterate through the nodes and call the appropriate OutputNode() on them.
     void WriteText();
 
+    /// Return whether cuurently exported node is in table.
+    bool IsInTable() const;
+
     /// Set the pCurPam appropriately and call WriteText().
     ///
     /// Used to export paragraphs in footnotes/endnotes/etc.

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx?rev=1172108&r1=1172107&r2=1172108&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx Sat Sep 17 22:38:19 2011
@@ -465,7 +465,7 @@ void WW8Export::OutGrf(const sw::Frame &
     // Otherwise, an additional paragraph is exported for a graphic, which is
     // forced to be treated as inline, because it's anchored inside another frame.
     if ( !rFrame.IsInline() &&
-         ( ((eAn == FLY_AT_PARA) && ( bWrtWW8 || !bIsInTable )) ||
+         ( ((eAn == FLY_AT_PARA) && ( bWrtWW8 || !IsInTable() )) ||
            (eAn == FLY_AT_PAGE)) )
     // <--
     {

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx?rev=1172108&r1=1172107&r2=1172108&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx Sat Sep 17 22:38:19 2011
@@ -1484,7 +1484,7 @@ void WW8AttributeOutput::CharRotate( con
     if ( !rRotate.GetValue() )
         return;
 
-    if ( m_rWW8Export.bWrtWW8 && !m_rWW8Export.bIsInTable )
+    if ( m_rWW8Export.bWrtWW8 && !m_rWW8Export.IsInTable() )
     {
         // #i36867 In word the text in a table is rotated via the TC or NS_sprm::LN_TTextFlow
         // This means you can only rotate all or none of the text adding NS_sprm::LN_CEastAsianLayout



Mime
View raw message