incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o..@apache.org
Subject svn commit: r1386501 [9/10] - in /incubator/ooo/branches/writer001: ./ ext_libraries/ratscan/ ext_sources/ main/ main/autodoc/source/display/html/ main/basegfx/inc/basegfx/numeric/ main/basegfx/source/numeric/ main/basegfx/source/tools/ main/basic/sour...
Date Mon, 17 Sep 2012 08:06:23 GMT
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww1/fltshell.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww1/fltshell.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww1/fltshell.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww1/fltshell.cxx Mon Sep 17 08:06:09 2012
@@ -89,7 +89,9 @@ static SwCntntNode* GetCntntNode(SwDoc* 
 // ------ Stack-Eintrag fuer die gesamten - Attribute vom Text -----------
 SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt ) :
 	nMkNode(rStartPos.nNode, -1),
-	nPtNode(nMkNode)
+	//Modify here for #119405, by easyfan, 2012-05-24
+	nPtNode(nMkNode),mnStartCP(-1),mnEndCP(-1),bIsParaEnd(false)
+	//End of modification, by easyfan
 {
 	// Anfang vom Bereich merken
 	nMkCntnt = rStartPos.nContent.GetIndex();
@@ -109,6 +111,11 @@ SwFltStackEntry::SwFltStackEntry(const S
 	bOld	= rEntry.bOld;
 	bLocked	= bCopied = sal_True; // when rEntry were NOT bLocked we would never have been called
 	bConsumedByField = rEntry.bConsumedByField;
+	//Modify here for #119405, by chengjh, 2012-08-16
+	mnStartCP= rEntry.mnStartCP;
+	mnEndCP = rEntry.mnEndCP;
+	bIsParaEnd = rEntry.bIsParaEnd;
+	//End
 }
 
 
@@ -130,21 +137,36 @@ void SwFltStackEntry::SetEndPos(const Sw
 	nPtNode = rEndPos.nNode.GetIndex()-1;
 	nPtCntnt = rEndPos.nContent.GetIndex();
 }
+//Modify here for #119405, by chengjh, 2012-08-16
+//The only position of 0x0D will not be able to make regin in the old logic
+//because it is beyond the length of para...need special consideration here.
+bool SwFltStackEntry::IsAbleMakeRegion()
+{
+	 SwCntntNode *const pCntntNode(
+        SwNodeIndex(nMkNode, +1).GetNode().GetCntntNode());
+    	if ((nMkNode.GetIndex() == nPtNode.GetIndex()) && (nMkCntnt == nPtCntnt)
+        && ((0 != nPtCntnt) || (pCntntNode && (0 != pCntntNode->Len())))
+        && ((RES_TXTATR_FIELD != pAttr->Which())
+        && !(bIsParaEnd && pCntntNode && pCntntNode->IsTxtNode() && 0 != pCntntNode->Len() )))
+	{
+		return false;
+	}
 
+	return true;
+}
+//End
 sal_Bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck )
 {
     // does this range actually contain something?
     // empty range is allowed if at start of empty paragraph
     // fields are special: never have range, so leave them
-    SwCntntNode *const pCntntNode(
-        SwNodeIndex(nMkNode, +1).GetNode().GetCntntNode());
-    if ((nMkNode.GetIndex() == nPtNode.GetIndex()) && (nMkCntnt == nPtCntnt)
-        && ((0 != nPtCntnt) || (pCntntNode && (0 != pCntntNode->Len())))
-        && (RES_TXTATR_FIELD != pAttr->Which()))
+	//Modify here for #119405, by chengjh, 2012-08-16
+	//Revised the code and move the code segment to defined function
+    	if ( !IsAbleMakeRegion() )
 	{
 		return sal_False;
 	}
-
+	//End
 	// !!! Die Content-Indizies beziehen sich immer auf den Node !!!
 	rRegion.GetPoint()->nNode = nMkNode.GetIndex() + 1;
 	SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_True);
@@ -169,7 +191,10 @@ sal_Bool SwFltStackEntry::MakeRegion(SwD
 }
 
 SwFltControlStack::SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl)
-	: nFieldFlags(nFieldFl), pDoc(pDo), bIsEndStack(false)
+  : nFieldFlags(nFieldFl), bHasSdOD(true)
+  ,bSdODChecked(false), pDoc(pDo), bIsEndStack(false)
+	//End
+
 {
 }
 
@@ -223,6 +248,9 @@ void SwFltControlStack::MarkAllAttrsOld(
 void SwFltControlStack::NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr )
 {
 	SwFltStackEntry *pTmp = new SwFltStackEntry(rPos, rAttr.Clone() );
+	//Modify here for #119405, by easyfan, 2012-05-24
+	pTmp->SetStartCP(GetCurrAttrCP());
+	//End of modification, by easyfan
 	sal_uInt16 nWhich = pTmp->pAttr->Which();
 	SetAttr(rPos, nWhich);// Ende von evtl. gleichen Attributen auf dem Stack
 								// Setzen, damit sich die Attribute nicht auf
@@ -239,6 +267,16 @@ void SwFltControlStack::DeleteAndDestroy
 	    delete *aElement;
 	    maEntries.erase(aElement);
 	}
+	//Modify for #119405 by chengjh, 2012-08-16
+	//Clear the para end position recorded in reader intermittently for the least impact on loading performance
+	//Because the attributes handled based on the unit of para
+	if ( Count() == 0 )
+	{
+		ClearParaEndPosition();
+		bHasSdOD = true;
+		bSdODChecked = false;
+	}
+	//End
 }
 
 // SwFltControlStack::StealAttr() loescht Attribute des angegebenen Typs vom Stack.
@@ -326,6 +364,9 @@ void SwFltControlStack::SetAttr(const Sw
 			if (bF) {
 				pEntry->bConsumedByField = consumedByField;
 				pEntry->SetEndPos(rPos);
+				//Modify here for #119405, by easyfan, 2012-05-24
+				pEntry->SetEndCP(GetCurrAttrCP());
+				//End of modification, by easyfan
 			}
 			continue;
 		}
@@ -409,7 +450,33 @@ static sal_Bool IterateNumrulePiece( con
 
 	return rTmpStart <= rTmpEnd;					// gueltig ?
 }
+//Modify for #119405 by chengjh, 2012-08-16
+//***This function will check whether there is existing individual attribute positon for 0x0D***/
+//The check will happen only once for a paragraph during loading
+bool SwFltControlStack::HasSdOD()
+{	
+	sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+
+	SwFltStackEntry* pEntry = 0;
+
+	bool bRet = false;
+
+	for (sal_uInt16 i=0; i < nCnt; i++)
+	{
+		pEntry = (*this)[ i ];
+		if ( pEntry && pEntry->mnStartCP == pEntry->mnEndCP )
+		{
+			if ( CheckSdOD(pEntry->mnStartCP,pEntry->mnEndCP) )
+			{
+				bRet = true;
+				break;
+			}
+		}
+	}
 
+	return bRet;
+}
+//End
 void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry* pEntry)
 {
 	SwPaM aRegion( rTmpPos );
@@ -593,10 +660,35 @@ void SwFltControlStack::SetAttrInDoc(con
 		}
 		break;
 	default:
-		if (pEntry->MakeRegion(pDoc, aRegion, sal_False))
-        {
-            pDoc->InsertPoolItem(aRegion, *pEntry->pAttr, 0);
-        }
+		{
+			//Modify here for #119405, by chengjh, 2012-08-16
+			//Revised for more complex situations should be considered
+			if ( !bSdODChecked )
+			{
+				bHasSdOD = HasSdOD();
+				bSdODChecked = true;
+			}
+				sal_Int32 nStart = pEntry->GetStartCP();
+				sal_Int32 nEnd = pEntry->GetEndCP();
+				if (nStart != -1 && nEnd != -1 && nEnd >= nStart )					
+				{
+					pEntry->SetIsParaEnd( IsParaEndInCPs(nStart,nEnd,bHasSdOD) );
+				}
+			//End
+			if (pEntry->MakeRegion(pDoc, aRegion, sal_False))
+	        {
+				//Modify here for #119405, by easyfan, 2012-05-24			
+				//Refined 2012-08-16
+				if (pEntry->IsParaEnd())
+				{
+					pDoc->InsertPoolItem(aRegion, *pEntry->pAttr, 0,true);
+				}else
+				{
+					pDoc->InsertPoolItem(aRegion, *pEntry->pAttr, 0);
+				}
+				//End
+	        }	
+		}
 		break;
 	}
 }

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/attributeoutputbase.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/attributeoutputbase.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/attributeoutputbase.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/attributeoutputbase.hxx Mon Sep 17 08:06:09 2012
@@ -407,6 +407,11 @@ protected:
     /// Sfx item RES_CHRATR_CTL_WEIGHT
     virtual void CharWeightCTL( const SvxWeightItem& ) = 0;
 
+	/// Sfx item RES_CHRATR_BidiRTL
+    virtual void CharBidiRTL( const SfxPoolItem& ) = 0;
+
+    /// Sfx item RES_CHRATR_IdctHint
+    virtual void CharIdctHint( const SfxPoolItem& ) = 0;
     /// Sfx item RES_CHRATR_ROTATE
     virtual void CharRotate( const SvxCharRotateItem& ) = 0;
 

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.cxx Mon Sep 17 08:06:09 2012
@@ -2130,6 +2130,13 @@ void RtfAttributeOutput::CharWeightCTL( 
     if ( rWeight.GetWeight() != WEIGHT_BOLD )
         m_aStyles.append((sal_Int32)0);
 }
+void RtfAttributeOutput:: CharBidiRTL( const SfxPoolItem& )
+{
+}
+
+void RtfAttributeOutput:: CharIdctHint( const SfxPoolItem&)
+{
+}
 
 void RtfAttributeOutput::CharRotate( const SvxCharRotateItem& rRotate)
 {

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.hxx Mon Sep 17 08:06:09 2012
@@ -308,6 +308,12 @@ protected:
     /// Sfx item RES_CHRATR_CTL_WEIGHT
     virtual void CharWeightCTL( const SvxWeightItem& rWeight );
 
+    /// Sfx item RES_CHRATR_BidiRTL
+    virtual void CharBidiRTL( const SfxPoolItem& );
+
+    /// Sfx item RES_CHRATR_IdctHint
+    virtual void CharIdctHint( const SfxPoolItem& );
+
     /// Sfx item RES_CHRATR_ROTATE
     virtual void CharRotate( const SvxCharRotateItem& rRotate );
 

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8sty.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8sty.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8sty.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8sty.cxx Mon Sep 17 08:06:09 2012
@@ -1550,7 +1550,6 @@ void MSWordExportBase::SectionProperties
 
             // am Nachkommen NUR  die Spaltigkeit gemaess Sect-Attr.
             // umsetzen
-            aSet.Put( rSepInfo.pSectionFmt->GetFmtAttr( RES_COL ) );
 
             const SvxLRSpaceItem &rSectionLR =
                 ItemGet<SvxLRSpaceItem>( *(rSepInfo.pSectionFmt), RES_LR_SPACE );
@@ -1560,6 +1559,17 @@ void MSWordExportBase::SectionProperties
             SvxLRSpaceItem aResultLR( rPageLR.GetLeft() +
                     rSectionLR.GetLeft(), rPageLR.GetRight() +
                     rSectionLR.GetRight(), 0, 0, RES_LR_SPACE );
+            //i120133: The Section width should consider section indent value.
+			if (rSectionLR.GetLeft()+rSectionLR.GetRight()!=0)
+			{
+				const SwFmtCol& rCol = dynamic_cast<const SwFmtCol&>(rSepInfo.pSectionFmt->GetFmtAttr(RES_COL));
+				SwFmtCol aCol(rCol);
+				aCol.SetAdjustValue(rSectionLR.GetLeft()+rSectionLR.GetRight());
+				aSet.Put(aCol);
+			}
+			else
+				aSet.Put(rSepInfo.pSectionFmt->GetFmtAttr(RES_COL));
+
 
             aSet.Put( aResultLR );
 

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8gr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8gr.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8gr.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8gr.cxx Mon Sep 17 08:06:09 2012
@@ -71,7 +71,10 @@
 #include "wrtww8.hxx"
 #include "ww8par.hxx"
 #include "escher.hxx"
-
+//Added for i120568
+#include "ww8attributeoutput.hxx"
+#include "fmturl.hxx"
+//End
 #include "docsh.hxx"
 #include <cstdio>
 
@@ -364,6 +367,17 @@ void WW8Export::OutputOLENode( const SwO
 
 void WW8Export::OutGrf(const sw::Frame &rFrame)
 {
+	//Added for i120568,the hyperlink info within a graphic whose anchor type is "As character"
+	//will be exported to ensure the fidelity
+    const SwFmtURL& rURL = rFrame.GetFrmFmt().GetAttrSet().GetURL();
+    bool bURLStarted = false;
+    if( rURL.GetURL().Len() && rFrame.GetWriterType() == sw::Frame::eGraphic)
+    {
+        bURLStarted = true;
+        m_pAttrOutput->StartURL( rURL.GetURL(), rURL.GetTargetFrameName() );         
+    }
+    //End
+
     // GrfNode fuer spaeteres rausschreiben der Grafik merken
     pGrf->Insert(rFrame);
 
@@ -485,6 +499,11 @@ void WW8Export::OutGrf(const sw::Frame &
         OutputField( 0, ww::eINCLUDEPICTURE, String(), WRITEFIELD_CLOSE );
     }
     // <--
+	//Added for i120568,the hyperlink info within a graphic whose anchor type is "As character"
+	//will be exported to ensure the fidelity
+    if( bURLStarted )
+        m_pAttrOutput->EndURL();
+        //End
 }
 
 GraphicDetails& GraphicDetails::operator=(const GraphicDetails &rOther)

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8atr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8atr.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8atr.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8atr.cxx Mon Sep 17 08:06:09 2012
@@ -257,6 +257,13 @@ void MSWordExportBase::ExportPoolItemsTo
         sal_uInt16 nWhich = pItem->Which();
         if ( ( isCHRATR( nWhich ) || isTXTATR( nWhich ) ) && CollapseScriptsforWordOk( nScript, nWhich ) )
         {
+			 //In the id definition, RES_TXTATR_INETFMT must precede RES_TXTATR_CHARFMT, so that link style can overwrite char style.
+			 //and in #i24291# it describes "All we want to do is ensure for now is that if a charfmt exist in the character 
+			 //properties that it rises to the top and is exported first."
+		     //In bug 119649, it is in such situation, so we need to ignore the link style when doing ms word filter exports and
+			 //add the second judgement for #i24291# definition. 
+			 if ( nWhich == RES_TXTATR_INETFMT && ( rItems.begin()->second->Which() == RES_TXTATR_CHARFMT ) )
+				 continue;
             AttrOutput().OutputItem( *pItem );
         }
     }
@@ -942,8 +949,11 @@ void WW8AttributeOutput::RTLAndCJKState(
 {
     if ( m_rWW8Export.bWrtWW8 && bIsRTL )
     {
-        m_rWW8Export.InsUInt16( NS_sprm::LN_CFBiDi );
-        m_rWW8Export.pO->Insert( (sal_uInt8)1, m_rWW8Export.pO->Count() );
+        if( m_rWW8Export.pDoc->GetDocumentType() != SwDoc::DOCTYPE_MSWORD )
+        {
+        	m_rWW8Export.InsUInt16( NS_sprm::LN_CFBiDi );
+        	m_rWW8Export.pO->Insert( (sal_uInt8)1, m_rWW8Export.pO->Count() );
+        }
     }
 
     // #i46087# patch from james_clark; complex texts needs the undocumented SPRM CComplexScript with param 0x81.
@@ -974,6 +984,9 @@ void WW8AttributeOutput::EndParagraph( w
             m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
                     m_rWW8Export.pO->GetData() );
             m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // delete
+	    //For Bug 119650, should break the properties of CHP PLC after a paragraph end.
+	    m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
+		    m_rWW8Export.pO->GetData() );
         }
     }
 }
@@ -1492,6 +1505,23 @@ void WW8AttributeOutput::CharRelief( con
     }
 }
 
+void WW8AttributeOutput::CharBidiRTL( const SfxPoolItem& rHt )
+{
+	const SfxInt16Item& rAttr = (const SfxInt16Item&)rHt;
+	if( rAttr.GetValue() == 1 )
+	{
+		m_rWW8Export.InsUInt16(0x85a);
+		m_rWW8Export.pO->Insert((sal_uInt8)1, m_rWW8Export.pO->Count());			
+	}
+}
+
+void WW8AttributeOutput::CharIdctHint( const SfxPoolItem& rHt )
+{
+	const SfxInt16Item& rAttr = (const SfxInt16Item&)rHt;
+	m_rWW8Export.InsUInt16(0x286F);
+	m_rWW8Export.pO->Insert((sal_uInt8)(rAttr.GetValue()), m_rWW8Export.pO->Count());			
+}
+
 void WW8AttributeOutput::CharRotate( const SvxCharRotateItem& rRotate )
 {
     // #i28331# - check that a Value is set
@@ -4444,6 +4474,9 @@ void AttributeOutputBase::FormatColumns(
 			const SvxLRSpaceItem &rLR = pFmt->GetLRSpace();
 			nPageSize = pFmt->GetFrmSize().GetWidth();
 			nPageSize -= rLR.GetLeft() + rLR.GetRight();
+			//i120133: The Section width should consider page indent value.
+			nPageSize -= rCol.GetAdjustValue();
+			
 		}
 
         // Nachsehen, ob alle Spalten gleich sind
@@ -5123,7 +5156,12 @@ void AttributeOutputBase::OutputItem( co
         case RES_CHRATR_HIDDEN:
             CharHidden( static_cast< const SvxCharHiddenItem& >( rHt ) );
             break;
-
+        case RES_CHRATR_BIDIRTL:
+			CharBidiRTL( static_cast< const SfxPoolItem& >( rHt ) );
+			break;
+        case RES_CHRATR_IDCTHINT:
+			CharIdctHint( static_cast< const SfxPoolItem& >( rHt ) );
+			break;
         case RES_TXTATR_INETFMT:
             TextINetFormat( static_cast< const SwFmtINetFmt& >( rHt ) );
             break;

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8attributeoutput.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8attributeoutput.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8attributeoutput.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8attributeoutput.hxx Mon Sep 17 08:06:09 2012
@@ -292,6 +292,12 @@ protected:
     /// Sfx item RES_CHRATR_CTL_WEIGHT
     virtual void CharWeightCTL( const SvxWeightItem& );
 
+    /// Sfx item RES_CHRATR_BidiRTL
+    virtual void CharBidiRTL( const SfxPoolItem& rHt );
+
+    /// Sfx item RES_CHRATR_IdctHint
+    virtual void CharIdctHint( const SfxPoolItem& rHt );
+
     /// Sfx item RES_CHRATR_ROTATE
     virtual void CharRotate( const SvxCharRotateItem& );
 

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf.cxx Mon Sep 17 08:06:09 2012
@@ -2234,6 +2234,7 @@ RndStdIds SwWW8ImplReader::ProcessEscher
     ASSERT(pRecord || pFSPA, "give me something! to work with for anchoring");
     if (!pRecord && !pFSPA)
         return FLY_AT_PAGE;
+	sal_Bool bCurSectionVertical = maSectionManager.CurrentSectionIsVertical();
 
     SvxMSDffImportRec aRecordFromFSPA;
     if (!pRecord)
@@ -2269,7 +2270,7 @@ RndStdIds SwWW8ImplReader::ProcessEscher
         // is a hint that these values aren't set by the escher import - see
         // method <SwMSDffManager::ProcessObj(..)>. Then, check if for each
         // values, if it differs from the one in the FSPA.
-        if ( pRecord->nXRelTo == 2 && pRecord->nYRelTo == 2 )
+        if ( pRecord->nXRelTo == 2 && pRecord->nYRelTo == 2 && !bCurSectionVertical)
         {
             // if <nYRelTo> differs from <FSPA.nby> overwrite <nYRelTo>
             if ( pFSPA->nby != pRecord->nYRelTo )
@@ -2408,11 +2409,6 @@ RndStdIds SwWW8ImplReader::ProcessEscher
         }
         // <--
 
-        SwFmtHoriOrient aHoriOri(MakeSafePositioningValue(pFSPA->nXaLeft),
-            eHoriOri, eHoriRel);
-        if( 4 <= nXAlign )
-            aHoriOri.SetPosToggle(true);
-        rFlySet.Put( aHoriOri );
 
         //Writer honours this wrap distance when aligned as "left" or "right",
         //Word doesn't. Writer doesn't honour it when its "from left".
@@ -2424,6 +2420,8 @@ RndStdIds SwWW8ImplReader::ProcessEscher
         sal_Int16 eVertRel;
         // OD 14.10.2003 #i18732#
         eVertRel = aVertRelOriTab[  nYRelTo ];
+		if ( bCurSectionVertical && nYRelTo == 2 )
+			eVertRel = text::RelOrientation::PAGE_PRINT_AREA;
         // CMC, OD 24.11.2003 #i22673# - fill <eVertOri> in dependence of <eVertRel>
         sal_Int16 eVertOri;
         if ( eVertRel == text::RelOrientation::TEXT_LINE )
@@ -2442,8 +2440,16 @@ RndStdIds SwWW8ImplReader::ProcessEscher
         if ((eVertRel == text::RelOrientation::TEXT_LINE) && (eVertOri == text::VertOrientation::NONE))
             nYPos = -nYPos;
 
-        rFlySet.Put(SwFmtVertOrient(MakeSafePositioningValue(nYPos),
-            eVertOri, eVertRel));
+		SwFmtHoriOrient aHoriOri(MakeSafePositioningValue(	bCurSectionVertical ? nYPos : pFSPA->nXaLeft ),
+															bCurSectionVertical ? eVertOri : eHoriOri, 
+															bCurSectionVertical ? eVertRel : eHoriRel);
+		if( 4 <= nXAlign )
+		    aHoriOri.SetPosToggle(true);
+		rFlySet.Put( aHoriOri );
+
+        rFlySet.Put(SwFmtVertOrient(MakeSafePositioningValue( !bCurSectionVertical ? nYPos : -pFSPA->nXaRight ),
+																!bCurSectionVertical ? eVertOri : eHoriOri, 
+																!bCurSectionVertical ? eVertRel : eHoriRel ));
 
         if (
             (pFSPA->nYaTop < 0) && (eVertOri == text::VertOrientation::NONE) &&

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf2.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf2.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf2.cxx Mon Sep 17 08:06:09 2012
@@ -622,11 +622,14 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(Sd
 
                         aAttrSet.Put(aFlySet);
                     }
-
-                    Rectangle aInnerDist(   pRecord->nDxTextLeft,
+			//Modified for i120717,for graf importing from MS Word 2003 binary format, 
+			//there is no border distance.
+                    /*Rectangle aInnerDist(   pRecord->nDxTextLeft,
                         pRecord->nDyTextTop, pRecord->nDxTextRight,
-                        pRecord->nDyTextBottom  );
-
+                        pRecord->nDyTextBottom  );*/
+			
+			Rectangle aInnerDist(0,0,0,0); 
+			//End
                     MatchSdrItemsIntoFlySet( pObject, aAttrSet,
                         pRecord->eLineStyle, pRecord->eShapeType,
                         aInnerDist );

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.cxx Mon Sep 17 08:06:09 2012
@@ -902,6 +902,30 @@ const SwNumFmt* SwWW8FltControlStack::Ge
     return pRet;
 }
 
+//Modify here for #119405, by easyfan, 2012-05-24
+sal_Int32 SwWW8FltControlStack::GetCurrAttrCP() const 
+{
+	return rReader.GetCurrAttrCP();
+}
+bool SwWW8FltControlStack::IsParaEndInCPs(sal_Int32 nStart,sal_Int32 nEnd,bool bSdOD) const 
+{
+	return rReader.IsParaEndInCPs(nStart,nEnd,bSdOD);
+}
+//End of modification, by easyfan
+//Modify for #119405 by chengjh, 2012-08-16
+//Clear the para end position recorded in reader intermittently for the least impact on loading performance
+void SwWW8FltControlStack::ClearParaEndPosition()
+{
+	if ( Count() != 0 )
+		return;
+
+	rReader.ClearParaEndPosition();
+}
+bool SwWW8FltControlStack::CheckSdOD(sal_Int32 nStart,sal_Int32 nEnd)
+{
+	return rReader.IsParaEndInCPs(nStart,nEnd);
+}
+//End
 void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
     SwFltStackEntry* pEntry)
 {
@@ -3016,7 +3040,38 @@ long SwWW8ImplReader::ReadTextAttr(WW8_C
 
     return nNext;
 }
-
+//Modify here for #119405, by easyfan, 2012-05-24
+//Revised 2012.8.16 for the complex attribute presentation of 0x0D in MS
+bool SwWW8ImplReader::IsParaEndInCPs(sal_Int32 nStart, sal_Int32 nEnd,bool bSdOD) const
+{
+	//Modify for #119405 by chengjh, 2012-08-16
+	//Revised for performance consideration
+	if (nStart == -1 || nEnd == -1 || nEnd < nStart )
+		return false;
+	
+	for (cp_vector::const_reverse_iterator aItr = maEndParaPos.rbegin(); aItr!= maEndParaPos.rend(); aItr++)
+	//End
+	{
+		//Revised 2012.8.16,to the 0x0D,the attribute will have two situations
+		//*********within***********exact******//
+		//*********but also sample with only left and the position of 0x0d is the edge of the right side***********//
+		if ( bSdOD && ( (nStart < *aItr && nEnd > *aItr) || ( nStart == nEnd && *aItr == nStart)) )
+			return true;
+		else if ( !bSdOD &&  (nStart < *aItr && nEnd >= *aItr) ) 
+			return true;
+	}
+	
+	return false;
+}
+//End of modification, by easyfan
+//Modify for #119405 by chengjh, 2012-08-16
+//Clear the para end position recorded in reader intermittently for the least impact on loading performance
+void SwWW8ImplReader::ClearParaEndPosition()
+{
+	if ( maEndParaPos.size() > 0 )
+		maEndParaPos.clear();
+}
+//End
 void SwWW8ImplReader::ReadAttrs(WW8_CP& rNext, WW8_CP& rTxtPos, bool& rbStartLine)
 {
     if( rTxtPos >= rNext )
@@ -3024,6 +3079,9 @@ void SwWW8ImplReader::ReadAttrs(WW8_CP& 
 
         do
         {
+		//Modify here for #119405, by easyfan, 2012-05-24
+        	maCurrAttrCP = rTxtPos;
+		//End of modification, by easyfan
             rNext = ReadTextAttr( rTxtPos, rbStartLine );
         }
         while( rTxtPos >= rNext );
@@ -3129,7 +3187,12 @@ bool SwWW8ImplReader::ReadText(long nSta
                     bSplit = false;
             }
             if (bSplit)
+            {
+                // #119405# - We will record the CP of a paragraph end ('0x0D'), if current loading contents is from main stream;
+                if (mbOnLoadingMain)
+                    maEndParaPos.push_back(l-1);
                 AppendTxtNode(*pPaM->GetPoint());
+            }
         }
 
         if (pPreviousNode && bStartLine)
@@ -3298,6 +3361,10 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uIn
     , mbCareFirstParaEndInToc(false)
     , mbCareLastParaEndInToc(false)
     , maTOXEndCps()
+	//Modify here for #119405, by easyfan, 2012-05-24
+	,maCurrAttrCP(-1),
+	mbOnLoadingMain(false)
+	//End of modification, by easyfan
 {
     pStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
     nWantedVersion = nVersionPara;
@@ -3856,6 +3923,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8G
 {
     sal_uLong nErrRet = 0;
 
+	rDoc.SetDocumentType( SwDoc::DOCTYPE_MSWORD );
     if (mbNewDoc && pStg && !pGloss)
         ReadDocInfo();
 
@@ -4130,7 +4198,13 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8G
     }
     else //ordinary case
     {
+	//Modify here for #119405, by easyfan, 2012-05-24
+	mbOnLoadingMain = true;
+	//End of modification, by easyfan
         ReadText(0, pWwFib->ccpText, MAN_MAINTEXT);
+	//Modify here for #119405, by easyfan, 2012-05-24
+	mbOnLoadingMain = false;
+	//End of modification, by easyfan
     }
 
     ::SetProgressState(nProgress, mpDocShell);    // Update

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.hxx Mon Sep 17 08:06:09 2012
@@ -235,6 +235,15 @@ private:
 protected:
     virtual void SetAttrInDoc(const SwPosition& rTmpPos,
         SwFltStackEntry* pEntry);
+	//Modify here for #119405, by easyfan, 2012-05-24
+	virtual sal_Int32 GetCurrAttrCP() const;
+	virtual bool IsParaEndInCPs(sal_Int32 nStart,sal_Int32 nEnd,bool bSdOD=true) const;
+	//End of modification, by easyfan
+	//Modify for #119405 by chengjh, 2012-08-16
+	//Clear the para end position recorded in reader intermittently for the least impact on loading performance
+	virtual void ClearParaEndPosition();
+	virtual bool CheckSdOD(sal_Int32 nStart,sal_Int32 nEnd);
+	//End
 
 public:
     SwWW8FltControlStack(SwDoc* pDo, sal_uLong nFieldFl, SwWW8ImplReader& rReader_ )
@@ -791,6 +800,7 @@ struct WW8PostProcessAttrsInfo
 //-----------------------------------------
 typedef std::set<WW8_CP> cp_set;
 
+typedef std::vector<WW8_CP> cp_vector;
 
 class SwWW8ImplReader
 {
@@ -1103,6 +1113,10 @@ private:
     bool mbCareFirstParaEndInToc;
     bool mbCareLastParaEndInToc;
     cp_set maTOXEndCps;
+
+    cp_vector maEndParaPos;
+    WW8_CP maCurrAttrCP;
+    bool mbOnLoadingMain:1;
 //---------------------------------------------
 
     const SprmReadInfo& GetSprmReadInfo(sal_uInt16 nId) const;
@@ -1434,7 +1448,14 @@ public:     // eigentlich private, geht 
     sal_uInt16 GetToggleBiDiAttrFlags() const;
     void SetToggleAttrFlags(sal_uInt16 nFlags);
     void SetToggleBiDiAttrFlags(sal_uInt16 nFlags);
-
+	//Modify here for #119405, by easyfan, 2012-05-24
+	WW8_CP GetCurrAttrCP() const {return maCurrAttrCP;}
+	bool IsParaEndInCPs(sal_Int32 , sal_Int32,bool bSdOD=true) const;
+	//End of modification, by easyfan
+	//Modify for #119405 by chengjh, 2012-08-16
+	//Clear the para end position recorded in reader intermittently for the least impact on loading performance
+	void ClearParaEndPosition();
+	//End
 
     long Read_Ftn(WW8PLCFManResult* pRes);
     sal_uInt16 End_Ftn();

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par3.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par3.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par3.cxx Mon Sep 17 08:06:09 2012
@@ -1022,7 +1022,24 @@ void WW8ListManager::AdjustLVL( sal_uInt
         // Style an das NumFormat haengen
         //
         aNumFmt.SetCharFmt( pFmt );
-    }
+    }	
+	//Modify for #119405 by chengjh, 2012-08-16
+	//Ensure the default char fmt is initialized for any level of num ruler if no customized attr
+	else
+	{
+		SwCharFmt* pFmt = aNumFmt.GetCharFmt();
+		if ( !pFmt)
+		{
+			String aName( sPrefix.Len() ? sPrefix : rNumRule.GetName() );
+	            	(aName += 'z') += String::CreateFromInt32( nLevel );
+	            	
+	            	pFmt = rDoc.MakeCharFmt(aName, (SwCharFmt*)rDoc.GetDfltCharFmt());
+	            	bNewCharFmtCreated = true;
+			rCharFmt[ nLevel ] = pFmt;
+			aNumFmt.SetCharFmt( pFmt );
+		}
+	}
+	//End
     //
     // ggfs. Bullet Font an das NumFormat haengen
     //

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx Mon Sep 17 08:06:09 2012
@@ -999,9 +999,16 @@ long SwWW8ImplReader::Read_Field(WW8PLCF
         pStrm->Seek( nOldPos );
 
         //#124725# field codes which contain '/' or '.' are not displayed in WinWord
-        if (!aStr.EqualsAscii(" ADDIN", 0, 6) &&
-            (aStr.Search('.') != STRING_NOTFOUND ||
-             aStr.Search('/') != STRING_NOTFOUND))
+        // skip if it is formula field or found space before. see #i119446, #i119585.
+        const xub_StrLen nDotPos = aStr.Search('.');
+        const xub_StrLen nSlashPos = aStr.Search('/');
+        xub_StrLen nSpacePos = aStr.Search( ' ', 1 );
+        if ( nSpacePos == STRING_NOTFOUND )
+            nSpacePos = aStr.Len();
+
+        if ( !( aStr.EqualsAscii( "=", 1, 1 ) ) && 
+            ((( nDotPos != STRING_NOTFOUND ) && ( nDotPos < nSpacePos )) ||
+            (( nSlashPos != STRING_NOTFOUND ) && ( nSlashPos < nSpacePos ))))
             return aF.nLen;
         else
             return aF.nLen - aF.nLRes - 1;  // so viele ueberlesen, das Resultfeld
@@ -1499,6 +1506,12 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8
                         SwSetExpFieldType( &rDoc, aSequenceName, nsSwGetSetExpType::GSE_SEQ ) );
     SwSetExpField aFld( pFT, aEmptyStr, eNumFormat );
 
+	//Bug 120654: Add for /h flag(/h: Hiden the field result.)
+	if (bHidden)
+	aFld.SetSubType(aFld.GetSubType() | nsSwExtendedSubType::SUB_INVISIBLE);
+	//Bug 120654(End)
+
+
     if (sStart.Len())
         aFld.SetFormula( ( aSequenceName += '=' ) += sStart );
     else if (!bCountOn)

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par6.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par6.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par6.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par6.cxx Mon Sep 17 08:06:09 2012
@@ -1338,7 +1338,7 @@ void GetLineIndex(SvxBoxItem &rBox, shor
                 eCodeIdx = WW8_BordersSO::single0;//   1 Twip for us
             else if( nLineThickness < 20)
                 eCodeIdx = WW8_BordersSO::single5;//   10 Twips for us
-            else if (nLineThickness < 50)
+            else if (nLineThickness < 45) //Modified for i120716
                 eCodeIdx = WW8_BordersSO::single1;//  20 Twips
             else if (nLineThickness < 80)
                 eCodeIdx = WW8_BordersSO::single2;//  50
@@ -1577,7 +1577,9 @@ bool SwWW8ImplReader::SetShadow(SvxShado
     if (bRet)
     {
         rShadow.SetColor(Color(COL_BLACK));
-        short nVal = pSizeArray[WW8_RIGHT];
+	//i120718
+        short nVal = pbrc[WW8_RIGHT].DetermineBorderProperties(bVer67);
+	//End
         if (nVal < 0x10)
             nVal = 0x10;
         rShadow.SetWidth(nVal);
@@ -2989,12 +2991,19 @@ void SwWW8ImplReader::Read_BoldUsw( sal_
     SetToggleAttr( nI, bOn );
 }
 
-void SwWW8ImplReader::Read_Bidi(sal_uInt16, const sal_uInt8*, short nLen)
+void SwWW8ImplReader::Read_Bidi(sal_uInt16, const sal_uInt8* pData, short nLen)
 {
-	if (nLen > 0)
-		bBidi = true;
-	else
-		bBidi = false;
+	if( nLen < 0 )	//Property end
+	{
+		bBidi = sal_False;
+		pCtrlStck->SetAttr(*pPaM->GetPoint(),RES_CHRATR_BIDIRTL);
+	}
+	else	//Property start
+	{
+		bBidi = sal_True;
+		sal_uInt8 nBidi = SVBT8ToByte( pData );
+		NewAttr( SfxInt16Item( RES_CHRATR_BIDIRTL, (nBidi!=0)? 1 : 0 ) );	
+	}
 }
 
 // Read_BoldUsw for BiDi Italic, Bold
@@ -4004,6 +4013,18 @@ void SwWW8ImplReader::Read_NoLineNumb(sa
     NewAttr( aLN );
 }
 
+bool lcl_HasExplicitLeft(const WW8PLCFMan *pPlcxMan, bool bVer67)
+{
+	WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : 0;
+	if (pPap)
+	{
+		if (bVer67)
+			return pPap->HasSprm(17);
+		else
+			return (pPap->HasSprm(0x840F) || pPap->HasSprm(0x845E));
+	}
+	return false;
+}
 // Sprm 16, 17
 void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
 {
@@ -4097,6 +4118,27 @@ void SwWW8ImplReader::Read_LR( sal_uInt1
             }
 
             aLR.SetTxtFirstLineOfst(nPara);
+
+            if (!pAktColl)
+            {
+				if (const SwTxtNode* pNode = pPaM->GetNode()->GetTxtNode())
+				{
+					if ( const SwNumFmt *pNumFmt = GetNumFmtFromTxtNode(*pNode) )
+					{
+						if (!lcl_HasExplicitLeft(pPlcxMan, bVer67))
+						{
+							aLR.SetTxtLeft(pNumFmt->GetIndentAt());
+
+							// If have not explicit left, set number format list tab position is doc default tab
+							const SvxTabStopItem *pDefaultStopItem = (const SvxTabStopItem *)rDoc.GetAttrPool().GetPoolDefaultItem(RES_PARATR_TABSTOP);
+							if ( pDefaultStopItem &&  pDefaultStopItem->Count() > 0 )
+								((SwNumFmt*)(pNumFmt))->SetListtabPos( ((SvxTabStop&)(*pDefaultStopItem)[0]).GetTabPos() );
+						}
+					}
+				}
+		}
+            
+
             if (pAktColl)
             {        
                 pCollA[nAktColl].bListReleventIndentSet = true;
@@ -4327,10 +4369,20 @@ void SwWW8ImplReader::Read_UL( sal_uInt1
 
 void SwWW8ImplReader::Read_IdctHint( sal_uInt16, const sal_uInt8* pData, short nLen )
 {
-    if (nLen < 0)
-        nIdctHint = 0;
-    else
-        nIdctHint = *pData;
+    // sprmcidcthint (opcode 0x286f) specifies a script bias for the text in the run. 
+    // for unicode characters that are shared between far east and non-far east scripts, 
+    // this property determines what font and language the character will use. 
+    // when this value is 0, text properties bias towards non-far east properties. 
+    // when this value is 1, text properties bias towards far east properties. 
+	if( nLen < 0 )	//Property end 
+	{
+		pCtrlStck->SetAttr(*pPaM->GetPoint(),RES_CHRATR_IDCTHINT);
+	}
+	else	//Property start
+	{
+		sal_uInt8 nVal = SVBT8ToByte( pData );
+		NewAttr( SfxInt16Item( RES_CHRATR_IDCTHINT, (nVal!=0)? 1 : 0 ) );	
+	}
 }
 
 void SwWW8ImplReader::Read_Justify( sal_uInt16, const sal_uInt8* pData, short nLen )

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/xml/xmltbli.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/xml/xmltbli.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/xml/xmltbli.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/xml/xmltbli.cxx Mon Sep 17 08:06:09 2012
@@ -2862,6 +2862,9 @@ void SwXMLTableContext::MakeTable( SwTab
 	bRelWidth = GetParentTable()->bRelWidth;
 
 	_MakeTable( pBox );
+	
+	for( sal_uInt16 i=0; i<pRows->Count(); i++ ) // i113600, to break the cyclic reference to SwXMLTableContext object
+		(*pRows)[i]->Dispose();
 }
 
 const SwStartNode *SwXMLTableContext::InsertTableSection(

Modified: incubator/ooo/branches/writer001/main/sw/source/ui/uno/unotxdoc.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/uno/unotxdoc.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/uno/unotxdoc.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/uno/unotxdoc.cxx Mon Sep 17 08:06:09 2012
@@ -2144,6 +2144,13 @@ void SwXTextDocument::setPropertyValue(c
         }
         break;
         // <--
+        case WID_DOC_DEFAULT_PAGE_MODE:
+        {
+            bool bDefaultPageMode( false );
+            aValue >>= bDefaultPageMode;
+            pDocShell->GetDoc()->SetDefaultPageMode( bDefaultPageMode );
+        }
+        break;
 
         default:
 		{

Modified: incubator/ooo/branches/writer001/main/testgraphical/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/testgraphical/prj/build.lst?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/testgraphical/prj/build.lst (original)
+++ incubator/ooo/branches/writer001/main/testgraphical/prj/build.lst Mon Sep 17 08:06:09 2012
@@ -1,7 +1,3 @@
 gfxcmp    testgraphical     :       instsetoo_native qadevOOo NULL
 gfxcmp    testgraphical                             usr1     -  all    gfxcmp_mkout NULL
-#gfxcmp    testgraphical\prechecks                   nmake    -  all    gfxcmp_pre NULL
 gfxcmp    testgraphical\ui\java\ConvwatchGUIProject nmake    -  all    gfxcmp_java_ui NULL
-gfxcmp    testgraphical\ui\java                     nmake    -  all    gfxcmp_java gfxcmp_java_ui NULL
-# gfxcmp    testgraphical\source                    nmake    -  all    gfxcmp_src gfxcmp_java NULL
-#i112751 gfxcmp    testgraphical\qa\graphical                nmake    -  all    gfxcmp_qa gfxcmp_java NULL

Modified: incubator/ooo/branches/writer001/main/testgraphical/ui/java/ConvwatchGUIProject/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/testgraphical/ui/java/ConvwatchGUIProject/makefile.mk?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/testgraphical/ui/java/ConvwatchGUIProject/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/testgraphical/ui/java/ConvwatchGUIProject/makefile.mk Mon Sep 17 08:06:09 2012
@@ -44,16 +44,16 @@ nothing .PHONY:
 .ELSE
 
 
-ALLTAR: dist/ConvwatchGUIProject.jar
+ALLTAR: $(CLASSDIR)/ConvwatchGUIProject.jar
 
-dist/ConvwatchGUIProject.jar: src/ConvwatchGUI.java src/IniFile.java
+$(CLASSDIR)/ConvwatchGUIProject.jar: src/ConvwatchGUI.java src/IniFile.java
 # .if $(JDK_VERSION) < 160
 # 	echo "You need at least java 6"
 # 	error
 # .endif
 #
 .IF "$(GUI)"=="WNT"
-	$(ANT)
+	$(ANT) -DJAR_OUTPUT_DIRECTORY=$(CLASSDIR) jar
 .ELSE
 	ant
 .END

Modified: incubator/ooo/branches/writer001/main/testgraphical/ui/java/ConvwatchGUIProject/nbproject/project.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/testgraphical/ui/java/ConvwatchGUIProject/nbproject/project.properties?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/testgraphical/ui/java/ConvwatchGUIProject/nbproject/project.properties (original)
+++ incubator/ooo/branches/writer001/main/testgraphical/ui/java/ConvwatchGUIProject/nbproject/project.properties Mon Sep 17 08:06:09 2012
@@ -40,7 +40,7 @@ debug.classpath=\
 debug.test.classpath=\
     ${run.test.classpath}
 # This directory is removed when the project is cleaned:
-dist.dir=dist
+dist.dir=${JAR_OUTPUT_DIRECTORY}
 dist.jar=${dist.dir}/ConvwatchGUIProject.jar
 dist.javadoc.dir=${dist.dir}/javadoc
 endorsed.classpath=

Modified: incubator/ooo/branches/writer001/main/toolkit/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/toolkit/prj/build.lst?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/toolkit/prj/build.lst (original)
+++ incubator/ooo/branches/writer001/main/toolkit/prj/build.lst Mon Sep 17 08:06:09 2012
@@ -1,2 +1,2 @@
-ti toolkit : LIBXSLT:libxslt vcl qadevOOo test NULL
+ti toolkit : LIBXSLT:libxslt vcl qadevOOo NULL
 ti toolkit\prj					nmake - all ti_prj NULL

Modified: incubator/ooo/branches/writer001/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx (original)
+++ incubator/ooo/branches/writer001/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx Mon Sep 17 08:06:09 2012
@@ -191,11 +191,14 @@ void SAL_CALL Storage::acquire()
 void SAL_CALL Storage::release()
     throw ()
 {
-    if ( osl_decrementInterlockedCount( &m_refCount ) == 0 )
-    {
+    //#i120738, Storage::release overrides OWeakObject::release(), 
+    //need call OWeakObject::release() to release OWeakObject::m_pWeakConnectionPoint
+    
+    if ( m_refCount == 1 )
         m_xFactory->releaseElement( this );
-        delete this;
-    }
+
+    //delete this;
+    OWeakObject::release();
 }
 
 //=========================================================================

Modified: incubator/ooo/branches/writer001/main/vbahelper/inc/vbahelper/vbaapplicationbase.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vbahelper/inc/vbahelper/vbaapplicationbase.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vbahelper/inc/vbahelper/vbaapplicationbase.hxx (original)
+++ incubator/ooo/branches/writer001/main/vbahelper/inc/vbahelper/vbaapplicationbase.hxx Mon Sep 17 08:06:09 2012
@@ -57,7 +57,7 @@ public:
 	virtual ::rtl::OUString SAL_CALL getVersion() throw (css::uno::RuntimeException);
 	virtual css::uno::Any SAL_CALL getVBE() throw (css::uno::RuntimeException);
 
-    virtual void SAL_CALL Run( const ::rtl::OUString& MacroName, const css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& varg29, const css::uno::Any& varg30 ) throw (css::uno::RuntimeException);
+    virtual css::uno::Any SAL_CALL Run( const ::rtl::OUString& MacroName, const css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& varg29, const css::uno::Any& varg30 ) throw (css::uno::RuntimeException);
     virtual void SAL_CALL OnTime( const css::uno::Any& aEarliestTime, const ::rtl::OUString& aFunction, const css::uno::Any& aLatestTime, const css::uno::Any& aSchedule ) throw (css::uno::RuntimeException);
     virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException);
     virtual void SAL_CALL Undo() throw (css::uno::RuntimeException);

Modified: incubator/ooo/branches/writer001/main/vbahelper/source/vbahelper/vbaapplicationbase.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vbahelper/source/vbahelper/vbaapplicationbase.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vbahelper/source/vbahelper/vbaapplicationbase.cxx (original)
+++ incubator/ooo/branches/writer001/main/vbahelper/source/vbahelper/vbaapplicationbase.cxx Mon Sep 17 08:06:09 2012
@@ -286,7 +286,7 @@ VbaApplicationBase::getVersion() throw (
 	return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(OFFICEVERSION));
 }
 
-void SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 ) throw (uno::RuntimeException)
+uno::Any SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 ) throw (uno::RuntimeException)
 {
 	::rtl::OUString aMacroName = MacroName.trim();
 	if (0 == aMacroName.indexOf('!'))
@@ -332,6 +332,7 @@ void SAL_CALL VbaApplicationBase::Run( c
         uno::Any aRet;
         uno::Any aDummyCaller;
         executeMacro( aMacroInfo.mpDocContext, aMacroInfo.msResolvedMacro, aArgs, aRet, aDummyCaller );
+		return aRet;
     }
     else
     {

Modified: incubator/ooo/branches/writer001/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx Mon Sep 17 08:06:09 2012
@@ -568,17 +568,20 @@ NSString* DataFlavorMapper::openOfficeTo
 		    sysFlavor = flavorMap[i].SystemFlavor;
 		}
 	}
+
+        return sysFlavor;
+}
+        
+NSString* DataFlavorMapper::internalOpenOfficeToSystemFlavor(const DataFlavor& oOOFlavor) const
+{
+    NSString* sysFlavor = NULL;
+    OfficeOnlyTypes::const_iterator it = maOfficeOnlyTypes.find( oOOFlavor.MimeType );
+    if( it == maOfficeOnlyTypes.end() )
+        sysFlavor = maOfficeOnlyTypes[ oOOFlavor.MimeType ] = OUStringToNSString( oOOFlavor.MimeType );
+    else
+        sysFlavor = it->second;
 	
-	if( ! sysFlavor )
-	{
-		OfficeOnlyTypes::const_iterator it = maOfficeOnlyTypes.find( oOOFlavor.MimeType );
-		if( it == maOfficeOnlyTypes.end() )
-			sysFlavor = maOfficeOnlyTypes[ oOOFlavor.MimeType ] = OUStringToNSString( oOOFlavor.MimeType );
-		else
-			sysFlavor = it->second;
-	}
-	
-	return sysFlavor;
+    return sysFlavor;
 }
 
 NSString* DataFlavorMapper::openOfficeImageToSystemFlavor(NSPasteboard* pPasteboard) const
@@ -702,6 +705,8 @@ NSArray* DataFlavorMapper::flavorSequenc
   sal_uInt32 nFlavors = flavors.getLength();
   NSMutableArray* array = [[NSMutableArray alloc] initWithCapacity: 1];
 
+  bool bNeedDummyInternalFlavor (true);
+  
   for (sal_uInt32 i = 0; i < nFlavors; i++)
   {
       if( flavors[i].MimeType.compareToAscii( "image/bmp", 9 ) == 0 )
@@ -712,6 +717,10 @@ NSArray* DataFlavorMapper::flavorSequenc
       else
       {
           NSString* str = openOfficeToSystemFlavor(flavors[i]);
+          if (str == NULL)
+              str = internalOpenOfficeToSystemFlavor(flavors[i]);
+          else
+              bNeedDummyInternalFlavor = false;
           
           if (str != NULL)
           {
@@ -724,7 +733,7 @@ NSArray* DataFlavorMapper::flavorSequenc
    // #i89462# #i90747#
    // in case no system flavor was found to report
    // report at least one so D&D between OOo targets works 
-  if( [array count] == 0 )
+  if( [array count] == 0 || bNeedDummyInternalFlavor)
   {
       [array addObject: PBTYPE_DUMMY_INTERNAL];
   }

Modified: incubator/ooo/branches/writer001/main/vcl/aqua/source/dtrans/DataFlavorMapping.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/aqua/source/dtrans/DataFlavorMapping.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/aqua/source/dtrans/DataFlavorMapping.hxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/aqua/source/dtrans/DataFlavorMapping.hxx Mon Sep 17 08:06:09 2012
@@ -132,6 +132,8 @@ private:
    */
   bool isValidMimeContentType(const rtl::OUString& contentType) const;
 
+  NSString* internalOpenOfficeToSystemFlavor(const com::sun::star::datatransfer::DataFlavor& oooDataFlavor) const;
+
 private:
   ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XMimeContentTypeFactory> mrXMimeCntFactory;
   typedef std::hash_map< rtl::OUString, NSString*, rtl::OUStringHash > OfficeOnlyTypes;

Modified: incubator/ooo/branches/writer001/main/vcl/inc/svdata.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/inc/svdata.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/inc/svdata.hxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/inc/svdata.hxx Mon Sep 17 08:06:09 2012
@@ -155,24 +155,26 @@ struct ImplSVAppData
     ImplHotKey*             mpFirstHotKey;      // HotKey-Verwaltung
     ImplEventHook*          mpFirstEventHook;   // Event-Hooks
     VclEventListeners2*     mpPostYieldListeners;           // post yield listeners
-    sal_uLong                   mnLastInputTime;                // GetLastInputTime()
-    sal_uInt16                  mnDispatchLevel;                // DispatchLevel
-    sal_uInt16                  mnModalMode;                    // ModalMode Count
-    sal_uInt16                  mnModalDialog;                  // ModalDialog Count
-    sal_uInt16                  mnAccessCount;                  // AccessHdl Count
-    sal_uInt16                  mnSysWinMode;                   // Modus, wann SystemWindows erzeugt werden sollen
-    sal_uInt16                  mnLayout;                       // --- RTL-Flags --- currently not used, only for testing
+    sal_uLong               mnLastInputTime;                // GetLastInputTime()
+    sal_uInt16              mnDispatchLevel;                // DispatchLevel
+    sal_uInt16              mnModalMode;                    // ModalMode Count
+    sal_uInt16              mnModalDialog;                  // ModalDialog Count
+    sal_uInt16              mnAccessCount;                  // AccessHdl Count
+    sal_uInt16              mnSysWinMode;                   // Modus, wann SystemWindows erzeugt werden sollen
+    sal_uInt16              mnLayout;                       // --- RTL-Flags --- currently not used, only for testing
     short                   mnDialogScaleX;                 // Scale X-Positions and sizes in Dialogs
-    sal_Bool                    mbInAppMain;                    // is Application::Main() on stack
-    sal_Bool                    mbInAppExecute;                 // is Application::Execute() on stack
-    sal_Bool                    mbAppQuit;                      // is Application::Quit() called
-    sal_Bool                    mbSettingsInit;                 // sal_True: Settings are initialized
-    sal_Bool                    mbDialogCancel;                 // sal_True: Alle Dialog::Execute()-Aufrufe werden mit return sal_False sofort beendet
-    sal_Bool                    mbNoYield;                      // Application::Yield will not wait for events if the queue is empty
+    sal_Bool                mbInAppMain;                    // is Application::Main() on stack
+    sal_Bool                mbInAppExecute;                 // is Application::Execute() on stack
+    sal_Bool                mbAppQuit;                      // is Application::Quit() called
+    sal_Bool                mbSettingsInit;                 // sal_True: Settings are initialized
+    sal_Bool                mbDialogCancel;                 // sal_True: Alle Dialog::Execute()-Aufrufe werden mit return sal_False sofort beendet
+    sal_Bool                mbNoYield;                      // Application::Yield will not wait for events if the queue is empty
                                                             // essentially that makes it the same as Application::Reschedule
     long                    mnDefaultLayoutBorder;          // default value in pixel for layout distances used
                                                             // in window arrangers
 
+    bool                    mbConversionMode;               // true allows further optimizations during document conversion in different code areas.
+    
     /** Controls whether showing any IME status window is toggled on or off.
 
         Only meaningful if showing IME status windows can be toggled on and off

Modified: incubator/ooo/branches/writer001/main/vcl/inc/vcl/svapp.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/inc/vcl/svapp.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/inc/vcl/svapp.hxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/inc/vcl/svapp.hxx Mon Sep 17 08:06:09 2012
@@ -243,7 +243,7 @@ public:
 
     virtual void                Main() = 0;
 
-    virtual sal_Bool                QueryExit();
+    virtual sal_Bool            QueryExit();
 
     virtual void                UserEvent( sal_uLong nEvent, void* pEventData );
 
@@ -264,11 +264,11 @@ public:
 
     static void                 InitAppRes( const ResId& rResId );
 
-    static sal_uInt16               GetCommandLineParamCount();
+    static sal_uInt16           GetCommandLineParamCount();
     static XubString            GetCommandLineParam( sal_uInt16 nParam );
     static const XubString&     GetAppFileName();
 
-    virtual sal_uInt16              Exception( sal_uInt16 nError );
+    virtual sal_uInt16          Exception( sal_uInt16 nError );
     static void                 Abort( const XubString& rErrorText );
 
     static void                 Execute();
@@ -278,23 +278,23 @@ public:
     static void                 EndYield();
     static vos::IMutex&                     GetSolarMutex();
     static vos::OThread::TThreadIdentifier  GetMainThreadIdentifier();
-    static sal_uLong                ReleaseSolarMutex();
+    static sal_uLong            ReleaseSolarMutex();
     static void                 AcquireSolarMutex( sal_uLong nCount );
     static void                 EnableNoYieldMode( bool i_bNoYield );
     static void                 AddPostYieldListener( const Link& i_rListener );
     static void                 RemovePostYieldListener( const Link& i_rListener );
 
-    static sal_Bool                 IsInMain();
-    static sal_Bool                 IsInExecute();
-    static sal_Bool                 IsShutDown();
-    static sal_Bool                 IsInModalMode();
-    static sal_uInt16               GetModalModeCount();
-
-    static sal_uInt16               GetDispatchLevel();
-    static sal_Bool                 AnyInput( sal_uInt16 nType = INPUT_ANY );
-    static sal_uLong                GetLastInputInterval();
-    static sal_Bool                 IsUICaptured();
-    static sal_Bool                 IsUserActive( sal_uInt16 nTest = USERACTIVE_ALL );
+    static sal_Bool             IsInMain();
+    static sal_Bool             IsInExecute();
+    static sal_Bool             IsShutDown();
+    static sal_Bool             IsInModalMode();
+    static sal_uInt16           GetModalModeCount();
+
+    static sal_uInt16           GetDispatchLevel();
+    static sal_Bool             AnyInput( sal_uInt16 nType = INPUT_ANY );
+    static sal_uLong            GetLastInputInterval();
+    static sal_Bool             IsUICaptured();
+    static sal_Bool             IsUserActive( sal_uInt16 nTest = USERACTIVE_ALL );
 
     virtual void                SystemSettingsChanging( AllSettings& rSettings,
                                                         Window* pFrame );
@@ -323,20 +323,20 @@ public:
     static void                 RemoveKeyListener( const Link& rKeyListener );
     static void                 ImplCallEventListeners( sal_uLong nEvent, Window* pWin, void* pData );
     static void                 ImplCallEventListeners( VclSimpleEvent* pEvent );
-    static sal_Bool                 HandleKey( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent );
+    static sal_Bool             HandleKey( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent );
     
-	static sal_uLong                PostKeyEvent( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent );
-    static sal_uLong                PostMouseEvent( sal_uLong nEvent, Window *pWin, MouseEvent* pMouseEvent );
+	static sal_uLong            PostKeyEvent( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent );
+    static sal_uLong            PostMouseEvent( sal_uLong nEvent, Window *pWin, MouseEvent* pMouseEvent );
 	static void					RemoveMouseAndKeyEvents( Window *pWin );
-    static sal_Bool					IsProcessedMouseOrKeyEvent( sal_uLong nEventId );
+    static sal_Bool				IsProcessedMouseOrKeyEvent( sal_uLong nEventId );
 
-    static sal_uLong                PostUserEvent( sal_uLong nEvent, void* pEventData = NULL );
-    static sal_uLong                PostUserEvent( const Link& rLink, void* pCaller = NULL );
-    static sal_Bool                 PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData = NULL );
-    static sal_Bool                 PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL );
+    static sal_uLong            PostUserEvent( sal_uLong nEvent, void* pEventData = NULL );
+    static sal_uLong            PostUserEvent( const Link& rLink, void* pCaller = NULL );
+    static sal_Bool             PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData = NULL );
+    static sal_Bool             PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL );
     static void                 RemoveUserEvent( sal_uLong nUserEvent );
 
-    static sal_Bool                 InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority );
+    static sal_Bool             InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority );
     static void                 RemoveIdleHdl( const Link& rLink );
 
     virtual void                AppEvent( const ApplicationEvent& rAppEvent );
@@ -384,14 +384,14 @@ public:
 
 	static const LocaleDataWrapper& GetAppLocaleDataWrapper();
 
-    static sal_Bool                 InsertAccel( Accelerator* pAccel );
+    static sal_Bool             InsertAccel( Accelerator* pAccel );
     static void                 RemoveAccel( Accelerator* pAccel );
     static void                 FlushAccel();
-    static sal_Bool                 CallAccel( const KeyCode& rKeyCode, sal_uInt16 nRepeat = 0 );
+    static sal_Bool             CallAccel( const KeyCode& rKeyCode, sal_uInt16 nRepeat = 0 );
 
-    static sal_uLong                AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData = NULL );
+    static sal_uLong            AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData = NULL );
     static void                 RemoveHotKey( sal_uLong nId );
-    static sal_uLong                AddEventHook( VCLEventHookProc pProc, void* pData = NULL );
+    static sal_uLong            AddEventHook( VCLEventHookProc pProc, void* pData = NULL );
     static void                 RemoveEventHook( sal_uLong nId );
     static long                 CallEventHooks( NotifyEvent& rEvt );
     static long                 CallPreNotify( NotifyEvent& rEvt );
@@ -401,12 +401,12 @@ public:
     static Help*                GetHelp();
 
     static void                 EnableAutoHelpId( sal_Bool bEnabled = sal_True );
-    static sal_Bool                 IsAutoHelpIdEnabled();
+    static sal_Bool             IsAutoHelpIdEnabled();
 
     static void                 EnableAutoMnemonic( sal_Bool bEnabled = sal_True );
-    static sal_Bool                 IsAutoMnemonicEnabled();
+    static sal_Bool             IsAutoMnemonicEnabled();
 
-    static sal_uLong                GetReservedKeyCodeCount();
+    static sal_uLong            GetReservedKeyCodeCount();
     static const KeyCode*       GetReservedKeyCode( sal_uLong i );
     static String               GetReservedKeyCodeDescription( sal_uLong i );
 
@@ -414,10 +414,10 @@ public:
     static Window*              GetDefDialogParent();
 
     static void                 EnableDialogCancel( sal_Bool bDialogCancel = sal_True );
-    static sal_Bool                 IsDialogCancelEnabled();
+    static sal_Bool             IsDialogCancelEnabled();
 
     static void                 SetSystemWindowMode( sal_uInt16 nMode );
-    static sal_uInt16               GetSystemWindowMode();
+    static sal_uInt16           GetSystemWindowMode();
 
     static void                 SetDialogScaleX( short nScale );
     static short                GetDialogScaleX();
@@ -437,10 +437,14 @@ public:
     static void                 SetFilterHdl( const Link& rLink );
     static const Link&          GetFilterHdl();
     
-    static sal_Bool                 IsAccessibilityEnabled();
+    static sal_Bool             IsAccessibilityEnabled();
 
     static void                 EnableHeadlessMode( sal_Bool bEnable = sal_True );
-    static sal_Bool                 IsHeadlessModeEnabled();
+    static sal_Bool             IsHeadlessModeEnabled();
+
+    static void                 EnableConversionMode( bool bEnableConv = true );
+    static bool                 IsConversionModeEnabled();
+
     
     static void                 ShowNativeErrorBox(const String& sTitle  ,
                                                    const String& sMessage);

Modified: incubator/ooo/branches/writer001/main/vcl/source/app/svapp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/app/svapp.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/app/svapp.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/app/svapp.cxx Mon Sep 17 08:06:09 2012
@@ -1974,6 +1974,19 @@ sal_Bool Application::IsHeadlessModeEnab
     return IsDialogCancelEnabled();
 }
 
+
+void Application::EnableConversionMode( bool bEnableConv )
+{
+    ImplGetSVData()->maAppData.mbConversionMode = bEnableConv;
+}
+
+// -----------------------------------------------------------------------
+
+bool Application::IsConversionModeEnabled()
+{
+    return ImplGetSVData()->maAppData.mbConversionMode;
+}
+
 // -----------------------------------------------------------------------
 
 void Application::ShowNativeErrorBox(const String& sTitle  ,

Modified: incubator/ooo/branches/writer001/main/vcl/source/gdi/bitmapex.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/gdi/bitmapex.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/gdi/bitmapex.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/gdi/bitmapex.cxx Mon Sep 17 08:06:09 2012
@@ -131,14 +131,10 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, 
 		eTransparent	( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
 		bAlpha			( sal_False )
 {
-    if(!rMask)
-    {
-        OSL_ENSURE(false, "Empty mask given (!)");
-    }
-    else if(rBmp.GetSizePixel() != rMask.GetSizePixel())
+    if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel())
     {
         OSL_ENSURE(false, "Mask size differs from Bitmap size, corrected Mask (!)");
-        aMask.Scale(rBmp.GetSizePixel());
+        aMask.Scale(aBitmap.GetSizePixel());
     }
 
     // #105489# Ensure a mask is exactly one bit deep
@@ -158,11 +154,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, 
 		eTransparent	( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
 		bAlpha			( !rAlphaMask ? sal_False : sal_True )
 {
-    if(!rAlphaMask)
-    {
-        OSL_ENSURE(false, "Empty alpha given (!)");
-    }
-    else if(rBmp.GetSizePixel() != rAlphaMask.GetSizePixel())
+    if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel())
     {
         OSL_ENSURE(false, "Alpha size differs from Bitmap size, corrected Mask (!)");
         aMask.Scale(rBmp.GetSizePixel());

Modified: incubator/ooo/branches/writer001/main/vcl/source/gdi/pdfwriter_impl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/gdi/pdfwriter_impl.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/gdi/pdfwriter_impl.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/gdi/pdfwriter_impl.cxx Mon Sep 17 08:06:09 2012
@@ -7175,7 +7175,12 @@ void PDFWriterImpl::drawVerticalGlyphs(
         }
         aDeltaPos += (m_pReferenceDevice->PixelToLogic( Point( (int)((double)nXOffset/fXScale), 0 ) ) - m_pReferenceDevice->PixelToLogic( Point() ) );
         if( i < rGlyphs.size()-1 )
-            nXOffset += rGlyphs[i+1].m_aPos.Y() - rGlyphs[i].m_aPos.Y();
+		// [Bug 120627] the text on the Y axis is reversed when export ppt file to PDF format
+		{
+			long nOffsetX = rGlyphs[i+1].m_aPos.X() - rGlyphs[i].m_aPos.X();
+			long nOffsetY = rGlyphs[i+1].m_aPos.Y() - rGlyphs[i].m_aPos.Y();
+			nXOffset += (int)sqrt(double(nOffsetX*nOffsetX + nOffsetY*nOffsetY));
+		}
         if( ! rGlyphs[i].m_nGlyphId )
             continue;
 

Modified: incubator/ooo/branches/writer001/main/wizards/com/sun/star/wizards/letter/LocaleCodes.java
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/wizards/com/sun/star/wizards/letter/LocaleCodes.java?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/wizards/com/sun/star/wizards/letter/LocaleCodes.java (original)
+++ incubator/ooo/branches/writer001/main/wizards/com/sun/star/wizards/letter/LocaleCodes.java Mon Sep 17 08:06:09 2012
@@ -104,7 +104,7 @@ public class LocaleCodes extends Resourc
         Ids[45] = "English - United Kingdom;en-gb;2057";
         Ids[46] = "English - United States;en-us;1033";
         Ids[47] = "Estonian;et;1061";
-        Ids[48] = "Farsi;fa;1065";
+        Ids[48] = "Persian;fa;1065";
         Ids[49] = "Finnish;fi;1035";
         Ids[50] = "Faroese;fo;1080";
         Ids[51] = "French - France;fr-fr;1036";

Modified: incubator/ooo/branches/writer001/main/writerfilter/inc/resourcemodel/TableManager.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/inc/resourcemodel/TableManager.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/inc/resourcemodel/TableManager.hxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/inc/resourcemodel/TableManager.hxx Mon Sep 17 08:06:09 2012
@@ -218,7 +218,7 @@ class TableManager
         
         void resetRowProps()
         {
-            mpCellProps.reset();
+            mpRowProps.reset();
         }
         
         void setRowProps(PropertiesPointer pProps)

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/ConversionHelper.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/ConversionHelper.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/ConversionHelper.cxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/ConversionHelper.cxx Mon Sep 17 08:06:09 2012
@@ -645,8 +645,12 @@ sal_Int16 ConvertNumberingType(sal_Int32
         case NS_ooxml::LN_Value_ST_NumberFormat_japaneseCounting:
         case NS_ooxml::LN_Value_ST_NumberFormat_taiwaneseCounting:
         case NS_ooxml::LN_Value_ST_NumberFormat_ideographDigital:
+        case NS_ooxml::LN_Value_ST_NumberFormat_chineseCountingThousand:
             nRet = style::NumberingType::NUMBER_LOWER_ZH;
             break;
+        case NS_ooxml::LN_Value_ST_NumberFormat_chineseLegalSimplified:
+            nRet = style::NumberingType::NUMBER_UPPER_ZH;
+            break;
         default: nRet = style::NumberingType::ARABIC;
     }
 /*  TODO: Lots of additional values are available - some are supported in the I18 framework

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper.cxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper.cxx Mon Sep 17 08:06:09 2012
@@ -119,9 +119,9 @@ DomainMapper::DomainMapper( const uno::R
                             uno::Reference< io::XInputStream > xInputStream,
                             uno::Reference< lang::XComponent > xModel,
                             SourceDocumentType eDocumentType) :
-LoggedProperties(dmapper_logger, "DomainMapper"), 
-LoggedTable(dmapper_logger, "DomainMapper"),
-LoggedStream(dmapper_logger, "DomainMapper"),
+    LoggedProperties(dmapper_logger, "DomainMapper"), 
+    LoggedTable(dmapper_logger, "DomainMapper"),
+    LoggedStream(dmapper_logger, "DomainMapper"),
     m_pImpl( new DomainMapper_Impl( *this, xContext, xModel, eDocumentType )),
     mnBackgroundColor(0), mbIsHighlightSet(false)
 {
@@ -2288,10 +2288,19 @@ void DomainMapper::sprmWithProps( Sprm& 
                     rContext->Insert( PROP_NUMBERING_RULES, true, aRules );
                 }
             }
-            else if ( !m_pImpl->IsStyleSheetImport( ) )
+            else
             {
-                rtl::OUString sNone;
-                rContext->Insert( PROP_NUMBERING_STYLE_NAME, true, uno::makeAny( sNone ) );
+                if( m_pImpl->IsStyleSheetImport() )
+                {
+                    // set the number id for AbstractNum references
+                    StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
+                    pStyleSheetPropertyMap->SetNumId( nIntValue );
+                }
+                else
+                {
+                    rtl::OUString sNone;
+                    rContext->Insert( PROP_NUMBERING_STYLE_NAME, true, uno::makeAny( sNone ) );
+                }                
             }
         }
         break;
@@ -3025,11 +3034,18 @@ void DomainMapper::sprmWithProps( Sprm& 
     case 71 : //"sprmCDxaSpace"
     case 96 : //"sprmCDxaSpace"
     case NS_sprm::LN_CDxaSpace:  // sprmCDxaSpace
-        /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
-        //Kerning half point values
-        //TODO: there are two kerning values -
-        // in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning
-        rContext->Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny( sal_Int16(ConversionHelper::convertTwipToMM100(sal_Int16(nIntValue))) ) );
+        {
+            /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
+            //Kerning half point values
+            //TODO: there are two kerning values -
+            // in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning
+            sal_Int16 nResult = static_cast<sal_Int16>(ConversionHelper::convertTwipToMM100(nIntValue));
+            if (m_pImpl->IsInComments())
+            {
+                nResult = static_cast<sal_Int16>(nIntValue);
+            }
+            rContext->Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny(nResult));
+        }
         break;
     case NS_sprm::LN_CHpsKern:  // sprmCHpsKern    auto kerning is bound to a minimum font size in Word - but not in Writer :-(
         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
@@ -4349,12 +4365,6 @@ void DomainMapper::PopListProperties()
 void DomainMapper::lcl_startCharacterGroup()
 {
     m_pImpl->PushProperties(CONTEXT_CHARACTER);
-    DomainMapperTableManager& rTableManager = m_pImpl->getTableManager();
-    if( rTableManager.getTableStyleName().getLength() )
-    {
-        PropertyMapPtr pTopContext = m_pImpl->GetTopContext();
-        rTableManager.CopyTextProperties(pTopContext, m_pImpl->GetStyleSheetTable());
-    }
 }
 /*-- 09.06.2006 09:52:14---------------------------------------------------
 

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx Mon Sep 17 08:06:09 2012
@@ -120,33 +120,34 @@ void FIB::SetData( Id nName, sal_Int32 n
 
   -----------------------------------------------------------------------*/
 DomainMapper_Impl::DomainMapper_Impl(
-            DomainMapper& rDMapper,
-            uno::Reference < uno::XComponentContext >  xContext,
-            uno::Reference< lang::XComponent >  xModel,
-            SourceDocumentType eDocumentType) :
-        m_eDocumentType( eDocumentType ),
-        m_rDMapper( rDMapper ),
-        m_xTextDocument( xModel, uno::UNO_QUERY ),
-        m_xTextFactory( xModel, uno::UNO_QUERY ),
-        m_xComponentContext( xContext ),
-        m_bFieldMode( false ),
-        m_bSetUserFieldContent( false ),
-        m_bIsFirstSection( true ),
-        m_bIsColumnBreakDeferred( false ),
-        m_bIsPageBreakDeferred( false ),
-        m_bIsInShape( false ),
-        m_bShapeContextAdded( false ),
-        m_pLastSectionContext( ),
-        m_nCurrentTabStopIndex( 0 ),
-        m_sCurrentParaStyleId(),
-        m_bInStyleSheetImport( false ),
-        m_bInAnyTableImport( false ),
-        m_bLineNumberingSet( false ),
-        m_bIsInFootnoteProperties( true ),
-        m_bIsCustomFtnMark( false ),
-        m_bIsParaChange( false ),
-        m_bParaChanged( false ),
-        m_bIsLastParaInSection( false )
+    DomainMapper& rDMapper,
+    uno::Reference < uno::XComponentContext >  xContext,
+    uno::Reference< lang::XComponent >  xModel,
+    SourceDocumentType eDocumentType) :
+    m_eDocumentType( eDocumentType ),
+    m_rDMapper( rDMapper ),
+    m_xTextDocument( xModel, uno::UNO_QUERY ),
+    m_xTextFactory( xModel, uno::UNO_QUERY ),
+    m_xComponentContext( xContext ),
+    m_bFieldMode( false ),
+    m_bSetUserFieldContent( false ),
+    m_bIsFirstSection( true ),
+    m_bIsColumnBreakDeferred( false ),
+    m_bIsPageBreakDeferred( false ),
+    m_bIsInShape( false ),
+    m_bShapeContextAdded( false ),
+    m_pLastSectionContext( ),
+    m_nCurrentTabStopIndex( 0 ),
+    m_sCurrentParaStyleId(),
+    m_bInStyleSheetImport( false ),
+    m_bInAnyTableImport( false ),
+    m_bLineNumberingSet( false ),
+    m_bIsInFootnoteProperties( true ),
+    m_bIsCustomFtnMark( false ),
+    m_bIsParaChange( false ),
+    m_bParaChanged( false ),
+    m_bIsLastParaInSection( false ),
+    m_bIsInComments( false )
 {
     appendTableManager( );
     GetBodyText();
@@ -1248,6 +1249,7 @@ void DomainMapper_Impl::PushAnnotation()
     try
     {
         PropertyMapPtr pTopContext = GetTopContext();
+        m_bIsInComments = true;
         m_xAnnotationField = uno::Reference< beans::XPropertySet >( GetTextFactory()->createInstance(
                 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.Annotation") ) ),
             uno::UNO_QUERY_THROW );
@@ -1257,7 +1259,7 @@ void DomainMapper_Impl::PushAnnotation()
     }
     catch( uno::Exception& )
     {
-        OSL_ENSURE( false, "exception in PushFootOrEndnote" );
+        OSL_ENSURE( false, "exception in PushAnnotation" );
     }
 }
 /*-- 24.05.2007 14:22:29---------------------------------------------------
@@ -1272,6 +1274,7 @@ void DomainMapper_Impl::PopFootOrEndnote
   -----------------------------------------------------------------------*/
 void DomainMapper_Impl::PopAnnotation()
 {
+    m_bIsInComments = false;
     m_aTextAppendStack.pop();
     uno::Sequence< beans::PropertyValue > aEmptyProperties;
     appendTextContent( uno::Reference< text::XTextContent >( m_xAnnotationField, uno::UNO_QUERY_THROW ), aEmptyProperties );

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx Mon Sep 17 08:06:09 2012
@@ -342,6 +342,7 @@ private:
 
     bool                            m_bParaChanged;
     bool                            m_bIsLastParaInSection;
+    bool                            m_bIsInComments;
 
     //annotation import
     uno::Reference< beans::XPropertySet >                                      m_xAnnotationField;
@@ -572,6 +573,8 @@ public:
     void SetCustomFtnMark(bool bSet) { m_bIsCustomFtnMark = bSet; }
     bool IsCustomFtnMark() const { return m_bIsCustomFtnMark;  }
 
+    bool IsInComments() const { return m_bIsInComments; };
+
     void RegisterFrameConversion(
         ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameStartRange,
         ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameEndRange,

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/NumberingManager.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/NumberingManager.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/NumberingManager.cxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/NumberingManager.cxx Mon Sep 17 08:06:09 2012
@@ -947,6 +947,13 @@ void ListsManager::lcl_sprm( Sprm& rSprm
                 pLevel->SetParaStyle( pStyle );
             }
             break;
+            case NS_ooxml::LN_CT_AbstractNum_numStyleLink:
+            {
+                OUString sStyleName = rSprm.getValue( )->getString( );
+                AbstractListDef* pAbstractListDef = dynamic_cast< AbstractListDef* >( m_pCurrentDefinition.get( ) );
+                pAbstractListDef->SetNumStyleLink(sStyleName);
+            }
+            break;
             case NS_ooxml::LN_EG_RPrBase_rFonts: //contains font properties
             case NS_ooxml::LN_EG_RPrBase_color:
             case NS_ooxml::LN_EG_RPrBase_u:
@@ -1007,7 +1014,31 @@ AbstractListDef::Pointer ListsManager::G
     while ( !pAbstractList.get( ) && i < nLen )
     {
         if ( m_aAbstractLists[i]->GetId( ) == nId )
-            pAbstractList = m_aAbstractLists[i];
+        {
+            if ( m_aAbstractLists[i]->GetNumStyleLink().getLength() > 0 )
+            {
+                // If the abstract num has a style linked, check the linked style's number id.
+                StyleSheetTablePtr pStylesTable = m_rDMapper.GetStyleSheetTable( );
+                
+                const StyleSheetEntryPtr pStyleSheetEntry = 
+                    pStylesTable->FindStyleSheetByISTD( m_aAbstractLists[i]->GetNumStyleLink() );                                
+                
+                const StyleSheetPropertyMap* pStyleSheetProperties = 
+                    dynamic_cast<const StyleSheetPropertyMap*>(pStyleSheetEntry ? pStyleSheetEntry->pProperties.get() : 0);
+                
+                if( pStyleSheetProperties && pStyleSheetProperties->GetNumId() >= 0 )
+                {
+                    ListDef::Pointer pList = GetList( pStyleSheetProperties->GetNumId() );
+                    if ( pList!=NULL )
+                        return pList->GetAbstractDefinition();
+                }
+
+            } 
+            else
+            {
+                pAbstractList = m_aAbstractLists[i];
+            }
+        }
         i++;
     }
 

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/NumberingManager.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/NumberingManager.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/NumberingManager.hxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/NumberingManager.hxx Mon Sep 17 08:06:09 2012
@@ -127,6 +127,9 @@ private:
 
     // Only used during the numberings import
     ListLevel::Pointer                         m_pCurrentLevel;
+    
+    // The style name linked to.
+    ::rtl::OUString                      m_sNumStyleLink;
 
 public:
     typedef boost::shared_ptr< AbstractListDef > Pointer;
@@ -151,6 +154,9 @@ public:
     virtual com::sun::star::uno::Sequence< 
         com::sun::star::uno::Sequence< 
             com::sun::star::beans::PropertyValue > > GetPropertyValues( );
+
+    void                  SetNumStyleLink(rtl::OUString sValue) { m_sNumStyleLink = sValue; };
+    ::rtl::OUString       GetNumStyleLink() { return m_sNumStyleLink; };
 };
 
 class ListDef : public AbstractListDef

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/PropertyIds.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/PropertyIds.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/PropertyIds.cxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/PropertyIds.cxx Mon Sep 17 08:06:09 2012
@@ -237,6 +237,7 @@ const rtl::OUString& PropertyNameSupplie
             case PROP_GRID_LINES            :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GridLines")); break;
             case PROP_GRID_BASE_HEIGHT      :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GridBaseHeight")); break;
             case PROP_GRID_RUBY_HEIGHT      :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GridRubyHeight")); break;
+            case PROP_GRID_STANDARD_MODE     :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StandardPageMode")); break;
             case PROP_IS_ON                  :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsOn")); break;
             case PROP_RESTART_AT_EACH_PAGE   :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RestartAtEachPage")); break;
             case PROP_COUNT_EMPTY_LINES      :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CountEmptyLines")); break;

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/PropertyIds.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/PropertyIds.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/PropertyIds.hxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/PropertyIds.hxx Mon Sep 17 08:06:09 2012
@@ -276,6 +276,7 @@ enum PropertyIds
         ,PROP_USER_DATA_TYPE
         ,PROP_VERTICAL_MERGE
         ,PROP_VERT_MIRRORED
+/*254*/ ,PROP_GRID_STANDARD_MODE
         ,PROP_VERT_ORIENT
         ,PROP_VERT_ORIENT_POSITION
         ,PROP_VERT_ORIENT_RELATION



Mime
View raw message