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 [8/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/svtools/source/misc/langtab.src
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svtools/source/misc/langtab.src?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svtools/source/misc/langtab.src (original)
+++ incubator/ooo/branches/writer001/main/svtools/source/misc/langtab.src Mon Sep 17 08:06:09 2012
@@ -101,7 +101,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
         < "Estonian" ; LANGUAGE_ESTONIAN ; > ;
         < "Finnish" ; LANGUAGE_FINNISH ; > ;
         < "Faroese" ; LANGUAGE_FAEROESE ; > ;
-        < "Farsi" ; LANGUAGE_FARSI ; > ;
+        < "Persian" ; LANGUAGE_FARSI ; > ;
         < "French (France)" ; LANGUAGE_FRENCH ; > ;
         < "French (Belgium)" ; LANGUAGE_FRENCH_BELGIAN ; > ;
         < "French (Canada)" ; LANGUAGE_FRENCH_CANADIAN ; > ;

Modified: incubator/ooo/branches/writer001/main/svx/inc/svx/msdffdef.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/inc/svx/msdffdef.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/inc/svx/msdffdef.hxx (original)
+++ incubator/ooo/branches/writer001/main/svx/inc/svx/msdffdef.hxx Mon Sep 17 08:06:09 2012
@@ -788,6 +788,8 @@ typedef enum
    mso_sptActionButtonMovie = 200,
    mso_sptHostControl = 201,
    mso_sptTextBox = 202,
+   //for pptx shape which not exist in ppt
+   mso_sptTearDrop = 203,                   
    mso_sptMax = 0x0FFF,
    mso_sptNil = mso_sptMax
  } MSO_SPT;

Modified: incubator/ooo/branches/writer001/main/svx/inc/svx/svdmodel.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/inc/svx/svdmodel.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/inc/svx/svdmodel.hxx (original)
+++ incubator/ooo/branches/writer001/main/svx/inc/svx/svdmodel.hxx Mon Sep 17 08:06:09 2012
@@ -658,17 +658,17 @@ public:
 	const Link& GetIOProgressHdl() const                     { return aIOProgressLink; }
 
 	// Zugriffsmethoden fuer Paletten, Listen und Tabellen
-	void            SetColorTable(XColorTable* pTable)       { pColorTable=pTable; }
+	void            SetColorTable(XColorTable* pTable)       ;
 	XColorTable*    GetColorTable() const                    { return pColorTable; }
-	void            SetDashList(XDashList* pList)            { pDashList=pList; }
+	void            SetDashList(XDashList* pList)            ;
 	XDashList*      GetDashList() const                      { return pDashList; }
-	void            SetLineEndList(XLineEndList* pList)      { pLineEndList=pList; }
+	void            SetLineEndList(XLineEndList* pList)      ;
 	XLineEndList*   GetLineEndList() const                   { return pLineEndList; }
-	void            SetHatchList(XHatchList* pList)          { pHatchList=pList; }
+	void            SetHatchList(XHatchList* pList)          ;
 	XHatchList*     GetHatchList() const                     { return pHatchList; }
-	void            SetGradientList(XGradientList* pList)    { pGradientList=pList; }
+	void            SetGradientList(XGradientList* pList)    ;
 	XGradientList*  GetGradientList() const                  { return pGradientList; }
-	void            SetBitmapList(XBitmapList* pList)        { pBitmapList=pList; }
+	void            SetBitmapList(XBitmapList* pList)        ;
 	XBitmapList*    GetBitmapList() const                    { return pBitmapList; }
 
 	// Der StyleSheetPool wird der DrawingEngine nur bekanntgemacht.

Modified: incubator/ooo/branches/writer001/main/svx/source/core/coreservices.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/source/core/coreservices.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/source/core/coreservices.cxx (original)
+++ incubator/ooo/branches/writer001/main/svx/source/core/coreservices.cxx Mon Sep 17 08:06:09 2012
@@ -55,13 +55,13 @@ extern OUString SAL_CALL ExtrusionSurfac
 extern Reference< XInterface > SAL_CALL ExtrusionSurfaceControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
 extern Sequence< OUString > SAL_CALL ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException );
 
-extern OUString SAL_CALL FontWorkAlignmentControl_getImplementationName();
-extern Reference< XInterface > SAL_CALL FontWorkAlignmentControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
-extern Sequence< OUString > SAL_CALL FontWorkAlignmentControl_getSupportedServiceNames() throw( RuntimeException );
-
-extern OUString SAL_CALL FontWorkCharacterSpacingControl_getImplementationName();
-extern Reference< XInterface > SAL_CALL FontWorkCharacterSpacingControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
-extern Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException );
+extern OUString SAL_CALL FontworkAlignmentControl_getImplementationName();
+extern Reference< XInterface > SAL_CALL FontworkAlignmentControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
+extern Sequence< OUString > SAL_CALL FontworkAlignmentControl_getSupportedServiceNames() throw( RuntimeException );
+
+extern OUString SAL_CALL FontworkCharacterSpacingControl_getImplementationName();
+extern Reference< XInterface > SAL_CALL FontworkCharacterSpacingControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
+extern Sequence< OUString > SAL_CALL FontworkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException );
 }
 
 extern "C"
@@ -113,21 +113,21 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL com
 				::svx::ExtrusionSurfaceControl_createInstance,
 				::svx::ExtrusionSurfaceControl_getSupportedServiceNames() );
 		}
-		else if( ::svx::FontWorkAlignmentControl_getImplementationName().equalsAscii( pImplName ) )
+		else if( ::svx::FontworkAlignmentControl_getImplementationName().equalsAscii( pImplName ) )
 		{
 			xFactory = ::cppu::createSingleFactory(
 				reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
-				::svx::FontWorkAlignmentControl_getImplementationName(),
-				::svx::FontWorkAlignmentControl_createInstance,
-				::svx::FontWorkAlignmentControl_getSupportedServiceNames() );
+				::svx::FontworkAlignmentControl_getImplementationName(),
+				::svx::FontworkAlignmentControl_createInstance,
+				::svx::FontworkAlignmentControl_getSupportedServiceNames() );
 		}
-		else if( ::svx::FontWorkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName ) )
+		else if( ::svx::FontworkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName ) )
 		{
 			xFactory = ::cppu::createSingleFactory(
 				reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
-				::svx::FontWorkCharacterSpacingControl_getImplementationName(),
-				::svx::FontWorkCharacterSpacingControl_createInstance,
-				::svx::FontWorkCharacterSpacingControl_getSupportedServiceNames() );
+				::svx::FontworkCharacterSpacingControl_getImplementationName(),
+				::svx::FontworkCharacterSpacingControl_createInstance,
+				::svx::FontworkCharacterSpacingControl_getSupportedServiceNames() );
 		}		if( xFactory.is())
 		{
 			xFactory->acquire();

Modified: incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShape3d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShape3d.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShape3d.cxx (original)
+++ incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShape3d.cxx Mon Sep 17 08:06:09 2012
@@ -393,7 +393,9 @@ SdrObject* EnhancedCustomShape3d::Create
 		}
 
 		Rectangle aBoundRect2d;
-		SdrObjListIter aIter( *pShape2d, IM_DEEPWITHGROUPS );
+		SdrObjListIter aIter( *pShape2d, IM_DEEPNOGROUPS );
+        const bool bMultipleSubObjects(aIter.Count() > 1);
+
 		while( aIter.IsMore() )
 		{
 			const SdrObject* pNext = aIter.Next();
@@ -405,20 +407,35 @@ SdrObject* EnhancedCustomShape3d::Create
 
 			if ( pNext->ISA( SdrPathObj ) )
 			{
-            	const SfxItemSet& rSet = pNext->GetMergedItemSet();
-			    const drawinglayer::attribute::SdrLineAttribute aLine(
-                    drawinglayer::primitive2d::createNewSdrLineAttribute(rSet));
-                bool bNeedToConvertToContour(0.0 <= aLine.getWidth() || 0.0 != aLine.getFullDotDashLen());
+                const SfxItemSet& rSet = pNext->GetMergedItemSet();
+                bool bNeedToConvertToContour(false);
 
-                if(!bNeedToConvertToContour && !aLine.isDefault())
+                // do conversion only for single line objects; for all others a fill and a
+                // line object get created. When we have fill, we want no line. That line has
+                // always been there, but since it was never converted to contour, it kept
+                // invisible (all this 'hidden' logic should be migrated to primitives).
+                if(!bMultipleSubObjects) 
                 {
-    			    const drawinglayer::attribute::SdrLineStartEndAttribute aLineStartEnd(
-                        drawinglayer::primitive2d::createNewSdrLineStartEndAttribute(rSet, aLine.getWidth()));
+                    const XFillStyle eStyle(((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue());
 
-                    if((aLineStartEnd.getStartWidth() && aLineStartEnd.isStartActive()) 
-                        || (aLineStartEnd.getEndWidth() && aLineStartEnd.isEndActive()))
+                    if(XFILL_NONE == eStyle)
                     {
-                        bNeedToConvertToContour = true;
+                        const drawinglayer::attribute::SdrLineAttribute aLine(
+                            drawinglayer::primitive2d::createNewSdrLineAttribute(rSet));
+
+                        bNeedToConvertToContour = (0.0 < aLine.getWidth() || 0.0 != aLine.getFullDotDashLen());
+
+                        if(!bNeedToConvertToContour && !aLine.isDefault())
+                        {
+                            const drawinglayer::attribute::SdrLineStartEndAttribute aLineStartEnd(
+                                drawinglayer::primitive2d::createNewSdrLineStartEndAttribute(rSet, aLine.getWidth()));
+
+                            if((aLineStartEnd.getStartWidth() && aLineStartEnd.isStartActive()) 
+                                || (aLineStartEnd.getEndWidth() && aLineStartEnd.isEndActive()))
+                            {
+                                bNeedToConvertToContour = true;
+                            }
+                        }
                     }
                 }
 
@@ -434,12 +451,23 @@ SdrObject* EnhancedCustomShape3d::Create
                         if(aPolyPoly.isClosed())
                         {
                             // correct item properties from line to fill style
-				            aLocalSet.Put(XLineWidthItem(0));
-				            aLocalSet.Put(XLineStyleItem(XLINE_NONE));
-				            aLocalSet.Put(XFillColorItem(XubString(), ((const XLineColorItem&)(aLocalSet.Get(XATTR_LINECOLOR))).GetColorValue()));
-				            aLocalSet.Put(XFillStyleItem(XFILL_SOLID));
-				            aLocalSet.Put(XFillTransparenceItem(((const XLineTransparenceItem&)(aLocalSet.Get(XATTR_LINETRANSPARENCE))).GetValue()));
-                            aLocalFillStyle = XFILL_SOLID;
+                            if(eShadeMode == drawing::ShadeMode_DRAFT)
+                            {
+                                // for draft, create wireframe with fixed line width
+                                aLocalSet.Put(XLineStyleItem(XLINE_SOLID));
+                                aLocalSet.Put(XLineWidthItem(40));
+                                aLocalFillStyle = XFILL_NONE;
+                            }
+                            else
+                            {
+                                // switch from line to fill, copy line attr to fill attr (color, transparence)
+				                aLocalSet.Put(XLineWidthItem(0));
+				                aLocalSet.Put(XLineStyleItem(XLINE_NONE));
+				                aLocalSet.Put(XFillColorItem(XubString(), ((const XLineColorItem&)(aLocalSet.Get(XATTR_LINECOLOR))).GetColorValue()));
+				                aLocalSet.Put(XFillStyleItem(XFILL_SOLID));
+				                aLocalSet.Put(XFillTransparenceItem(((const XLineTransparenceItem&)(aLocalSet.Get(XATTR_LINETRANSPARENCE))).GetValue()));
+                                aLocalFillStyle = XFILL_SOLID;
+                            }
                         }
                         else
                         {

Modified: incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx (original)
+++ incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx Mon Sep 17 08:06:09 2012
@@ -1560,11 +1560,12 @@ static const SvxMSDffCalculationData mso
 	{ 0x8000, { 21600, 0, DFF_Prop_adjust2Value } },
 	{ 0x8000, { 21600, 0, DFF_Prop_adjustValue } },
 	{ 0x8000, { 10800, 0, DFF_Prop_adjust2Value } },
-	{ 0x6001, { 0x403, 0x404, 10800 } }
+	{ 0x6001, { 0x403, 0x404, 10800 } },
+    { 0x8000, { 21600, 0, 0x405 }}
 };
 static const SvxMSDffTextRectangles mso_sptNotchedRightArrowTextRect[] =	// todo
 {
-	{ { 0, 0 }, { 21600, 21600 } }
+	{ { 5 MSO_I, 1 MSO_I }, { 6 MSO_I, 2 MSO_I } }
 };
 static const SvxMSDffHandle mso_sptNotchedRightArrowHandle[] =
 {
@@ -8289,6 +8290,68 @@ static const mso_CustomShape msoCurvedCo
 	(SvxMSDffHandle*)mso_sptCurvedConnector5Handle, sizeof( mso_sptCurvedConnector5Handle ) / sizeof( SvxMSDffHandle )
 };
 
+/////////////////////////////teardrop////////////////////////////////////////////
+static const SvxMSDffVertPair mso_sptTearDropVert[] =
+{
+	{ 10800, 0 }, 
+	{ 0, 10800 },												    // X
+	{ 10800, 21600 },                                               // Y
+	{ 21600, 10800 },                                               // X
+	{ 21600, 10800 }, { 21600, 3 MSO_I }, { 0 MSO_I, 1 MSO_I },  			// C
+	{ 0 MSO_I, 1 MSO_I }, { 4 MSO_I, 0 }, { 10800, 0 }
+};
+
+//	the last number (0x***n)  :  0 = sum, 1 = prod, 2 = mid, 3 = abs, 4 = min, 5 = max, 6 = if, 13 = sqrt, 15 = eclipse ...
+//    the first number(0xn***)  :  2/4/8 the first/second/third value is not directly value
+static const SvxMSDffCalculationData mso_sptTearDropCalc[] =
+{
+	{ 0x2000 , { DFF_Prop_adjustValue , 0 , 0 } },  // 0  adjust value #0 
+	{ 0x8000 , { 21600 , 0 , 0x0400 } }, 			// 1  21600 - @0                     y0       
+	{ 0x8000 , { 32400 , 0 , 0x0400 } },            // 2   (32400 - @0)    
+	{ 0x2001 , { 0x0402 , 1 , 2 } },                // 3   (32400 - @0)/2               y1
+	{ 0x2002 , { 0x0400 , 10800 , 0 } }, 			// 4  (@0+10800)/2                  x2    
+}; 
+
+//m, qx, qy, qx,C,C
+//the last number(0x***n) : repeat number of this current Segm
+static const sal_uInt16 mso_sptTearDropSegm[] =
+{
+	0x4000, 0xa701, 0xa801, 0xa701, 0x2002, 0x6000, 0x8000
+};
+
+static const SvxMSDffTextRectangles mso_sptTearDropTextRect[] =
+{
+	{ { 2863, 2863 }, { 18737, 18737 } }
+};
+
+//the range of adjust values
+static const SvxMSDffHandle mso_sptTearDropHandle[] =
+{
+	//position="$0,0" xrange="10800,32400"
+	{   MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL| MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL,
+		0x100, 0, 10800, 10800, 10800, 32400, 0x80000000, 0x7fffffff }
+};
+
+//the number of adjust values, the default values
+static const sal_Int32 mso_sptTearDropDefault[] =
+{
+	1, 21600
+};
+
+static const mso_CustomShape msoTearDrop =
+{
+	(SvxMSDffVertPair*)mso_sptTearDropVert, sizeof( mso_sptTearDropVert ) / sizeof( SvxMSDffVertPair ),
+	(sal_uInt16*)mso_sptTearDropSegm, sizeof( mso_sptTearDropSegm ) >> 1,
+	(SvxMSDffCalculationData*)mso_sptTearDropCalc, sizeof(mso_sptTearDropCalc)/sizeof(SvxMSDffCalculationData),
+	(sal_Int32*)mso_sptTearDropDefault,
+	(SvxMSDffTextRectangles*)mso_sptTearDropTextRect, sizeof( mso_sptTearDropTextRect ) / sizeof( SvxMSDffTextRectangles ),
+	21600, 21600,
+	0x80000000, 0x80000000,
+	NULL, 0,
+	(SvxMSDffHandle*)mso_sptTearDropHandle, sizeof(mso_sptTearDropHandle)/sizeof(SvxMSDffHandle)		// handles
+};
+
+
 const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType )
 {
 	const mso_CustomShape* pCustomShape = NULL;
@@ -8499,6 +8562,7 @@ const mso_CustomShape* GetCustomShapeCon
 		case mso_sptTextWave2 :					pCustomShape = &msoTextWave2; break;
 		case mso_sptTextWave3 :					pCustomShape = &msoTextWave3; break;
 		case mso_sptTextWave4 :					pCustomShape = &msoTextWave4; break;
+		case mso_sptTearDrop :                  pCustomShape = &msoTearDrop; break;    
 		default :
 		break;
 	}

Modified: incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx (original)
+++ incubator/ooo/branches/writer001/main/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx Mon Sep 17 08:06:09 2012
@@ -251,7 +251,8 @@ static const NameTypeTable pNameTypeTabl
 	{ "mso-spt199", mso_sptActionButtonSound },
 	{ "mso-spt200", mso_sptActionButtonMovie },
 	{ "mso-spt201", mso_sptHostControl },
-	{ "mso-spt202", mso_sptTextBox }
+	{ "mso-spt202", mso_sptTextBox },
+	{ "teardrop",   mso_sptTearDrop }                 
 };
 
 	// gallery: quadrat		

Modified: incubator/ooo/branches/writer001/main/svx/source/form/fmundo.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/source/form/fmundo.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/source/form/fmundo.cxx (original)
+++ incubator/ooo/branches/writer001/main/svx/source/form/fmundo.cxx Mon Sep 17 08:06:09 2012
@@ -201,6 +201,9 @@ FmXUndoEnvironment::FmXUndoEnvironment(F
 FmXUndoEnvironment::~FmXUndoEnvironment()
 {
 	DBG_DTOR(FmXUndoEnvironment,NULL);
+	if ( !m_bDisposed )   // i120746, call FormScriptingEnvironment::dispose to avoid memory leak
+		m_pScriptingEnv->dispose(); 
+
 	if (m_pPropertySetCache)
 		delete static_cast<PropertySetInfoCache*>(m_pPropertySetCache);
 }

Modified: incubator/ooo/branches/writer001/main/svx/source/svdraw/svdmodel.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/source/svdraw/svdmodel.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/source/svdraw/svdmodel.cxx (original)
+++ incubator/ooo/branches/writer001/main/svx/source/svdraw/svdmodel.cxx Mon Sep 17 08:06:09 2012
@@ -2182,6 +2182,16 @@ void SdrModel::SetDrawingLayerPoolDefaul
 	pItemPool->SetPoolDefaultItem( XLineColorItem(aNullStr,aNullLineCol) );
 }
 
+//
+// i120668, move from the header files, add delete action
+//
+void            SdrModel::SetColorTable(XColorTable* pTable)       { delete pColorTable; pColorTable=pTable; }
+void            SdrModel::SetDashList(XDashList* pList)            { delete pDashList; pDashList=pList; }
+void            SdrModel::SetLineEndList(XLineEndList* pList)      { delete pLineEndList; pLineEndList=pList; }
+void            SdrModel::SetHatchList(XHatchList* pList)          { delete pHatchList; pHatchList=pList; }
+void            SdrModel::SetGradientList(XGradientList* pList)    { delete pGradientList; pGradientList=pList; }
+void            SdrModel::SetBitmapList(XBitmapList* pList)        { delete pBitmapList; pBitmapList=pList; }
+
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
 TYPEINIT1(SdrHint,SfxHint);

Modified: incubator/ooo/branches/writer001/main/svx/source/svdraw/svdoedge.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/source/svdraw/svdoedge.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/source/svdraw/svdoedge.cxx (original)
+++ incubator/ooo/branches/writer001/main/svx/source/svdraw/svdoedge.cxx Mon Sep 17 08:06:09 2012
@@ -1915,7 +1915,7 @@ bool SdrEdgeObj::applySpecialDrag(SdrDra
 	// save EdgeInfos and mark object as user modified
 	ImpSetEdgeInfoToAttr();
 	bEdgeTrackUserDefined = false;
-	//SetRectsDirty();
+	SetRectsDirty();
 	//SetChanged();
 
     if(bOriginalEdgeModified && rDragStat.GetView()) 

Modified: incubator/ooo/branches/writer001/main/svx/source/tbxctrls/fontworkgallery.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/source/tbxctrls/fontworkgallery.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/source/tbxctrls/fontworkgallery.cxx (original)
+++ incubator/ooo/branches/writer001/main/svx/source/tbxctrls/fontworkgallery.cxx Mon Sep 17 08:06:09 2012
@@ -340,13 +340,13 @@ void FontWorkShapeTypeControl::Select( s
 }
 
 // ========================================================================
-// FontWorkAlignmentWindow
+// FontworkAlignmentWindow
 // ========================================================================
 
-class FontWorkAlignmentWindow : public ToolbarMenu
+class FontworkAlignmentWindow : public ToolbarMenu
 {
 public:
-	FontWorkAlignmentWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow );
+	FontworkAlignmentWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow );
 
 	virtual void SAL_CALL statusChanged( const frame::FeatureStateEvent& Event ) throw ( RuntimeException );
 	virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -372,7 +372,7 @@ private:
 	void	implSetAlignment( int nAlignmentMode, bool bEnabled );
 };
 
-FontWorkAlignmentWindow::FontWorkAlignmentWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow )
+FontworkAlignmentWindow::FontworkAlignmentWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow )
 : ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_FONTWORK_ALIGNMENT ))
 , mrController( rController )
 , maImgAlgin1( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 ) )
@@ -390,7 +390,7 @@ FontWorkAlignmentWindow::FontWorkAlignme
 	bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
 
 	SetHelpId( HID_POPUP_FONTWORK_ALIGN );
-	SetSelectHdl( LINK( this, FontWorkAlignmentWindow, SelectHdl ) );
+	SetSelectHdl( LINK( this, FontworkAlignmentWindow, SelectHdl ) );
 
 	appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 );
 	appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 );
@@ -407,7 +407,7 @@ FontWorkAlignmentWindow::FontWorkAlignme
 
 // -----------------------------------------------------------------------
 
-void FontWorkAlignmentWindow::implSetAlignment( int nSurface, bool bEnabled )
+void FontworkAlignmentWindow::implSetAlignment( int nSurface, bool bEnabled )
 {
 	int i;
 	for( i = 0; i < 5; i++ )
@@ -419,7 +419,7 @@ void FontWorkAlignmentWindow::implSetAli
 
 // -----------------------------------------------------------------------
 
-void SAL_CALL FontWorkAlignmentWindow::statusChanged( const frame::FeatureStateEvent& Event ) throw ( RuntimeException )
+void SAL_CALL FontworkAlignmentWindow::statusChanged( const frame::FeatureStateEvent& Event ) throw ( RuntimeException )
 {
 	if( Event.FeatureURL.Main.equals( msFontworkAlignment ) )
 	{
@@ -438,7 +438,7 @@ void SAL_CALL FontWorkAlignmentWindow::s
 
 // -----------------------------------------------------------------------
 
-void FontWorkAlignmentWindow::DataChanged( const DataChangedEvent& rDCEvt )
+void FontworkAlignmentWindow::DataChanged( const DataChangedEvent& rDCEvt )
 {
 	ToolbarMenu::DataChanged( rDCEvt );
 
@@ -456,7 +456,7 @@ void FontWorkAlignmentWindow::DataChange
 
 // -----------------------------------------------------------------------
 
-IMPL_LINK( FontWorkAlignmentWindow, SelectHdl, void *, EMPTYARG )
+IMPL_LINK( FontworkAlignmentWindow, SelectHdl, void *, EMPTYARG )
 {
 	if ( IsInPopupMode() )
 		EndPopupMode();
@@ -477,13 +477,13 @@ IMPL_LINK( FontWorkAlignmentWindow, Sele
 }
 
 // ========================================================================
-// FontWorkAlignmentControl
+// FontworkAlignmentControl
 // ========================================================================
 
-class FontWorkAlignmentControl : public svt::PopupWindowController
+class FontworkAlignmentControl : public svt::PopupWindowController
 {
 public:
-	FontWorkAlignmentControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+	FontworkAlignmentControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
 
 	virtual ::Window* createPopupWindow( ::Window* pParent );
 
@@ -497,30 +497,30 @@ public:
 
 // -----------------------------------------------------------------------
 
-FontWorkAlignmentControl::FontWorkAlignmentControl( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+FontworkAlignmentControl::FontworkAlignmentControl( const Reference< lang::XMultiServiceFactory >& rServiceManager )
 : svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkAlignment" ) ) )
 {
 }
 
 // -----------------------------------------------------------------------
 
-::Window* FontWorkAlignmentControl::createPopupWindow( ::Window* pParent )
+::Window* FontworkAlignmentControl::createPopupWindow( ::Window* pParent )
 {
-    return new FontWorkAlignmentWindow( *this, m_xFrame, pParent );
+    return new FontworkAlignmentWindow( *this, m_xFrame, pParent );
 }
 
 // -----------------------------------------------------------------------
 // XServiceInfo
 // -----------------------------------------------------------------------
 
-OUString SAL_CALL FontWorkAlignmentControl_getImplementationName()
+OUString SAL_CALL FontworkAlignmentControl_getImplementationName()
 {
-	return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FontWorkAlignmentController" ));
+	return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FontworkAlignmentController" ));
 }
 
 // --------------------------------------------------------------------
 
-Sequence< OUString > SAL_CALL FontWorkAlignmentControl_getSupportedServiceNames() throw( RuntimeException )
+Sequence< OUString > SAL_CALL FontworkAlignmentControl_getSupportedServiceNames() throw( RuntimeException )
 {
     Sequence< OUString > aSNS( 1 );
     aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
@@ -529,32 +529,32 @@ Sequence< OUString > SAL_CALL FontWorkAl
 
 // --------------------------------------------------------------------
 
-Reference< XInterface > SAL_CALL SAL_CALL FontWorkAlignmentControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
+Reference< XInterface > SAL_CALL SAL_CALL FontworkAlignmentControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
 {
-	return *new FontWorkAlignmentControl( rSMgr );
+	return *new FontworkAlignmentControl( rSMgr );
 }
 
 // --------------------------------------------------------------------
 
-OUString SAL_CALL FontWorkAlignmentControl::getImplementationName(  ) throw (RuntimeException)
+OUString SAL_CALL FontworkAlignmentControl::getImplementationName(  ) throw (RuntimeException)
 {
-	return FontWorkAlignmentControl_getImplementationName();
+	return FontworkAlignmentControl_getImplementationName();
 }
 
 // --------------------------------------------------------------------
 
-Sequence< OUString > SAL_CALL FontWorkAlignmentControl::getSupportedServiceNames(  ) throw (RuntimeException)
+Sequence< OUString > SAL_CALL FontworkAlignmentControl::getSupportedServiceNames(  ) throw (RuntimeException)
 {
-	return FontWorkAlignmentControl_getSupportedServiceNames();
+	return FontworkAlignmentControl_getSupportedServiceNames();
 }
 
 
 // ####################################################################
 
-class FontWorkCharacterSpacingWindow : public ToolbarMenu
+class FontworkCharacterSpacingWindow : public ToolbarMenu
 {
 public:
-	FontWorkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow );
+	FontworkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow );
 
 	virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
 private:
@@ -572,14 +572,14 @@ private:
 
 // -----------------------------------------------------------------------
 
-FontWorkCharacterSpacingWindow::FontWorkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow )
+FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow )
 : ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING ))
 , mrController( rController )
 , msFontworkCharacterSpacing( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacing" ) )
 , msFontworkKernCharacterPairs( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkKernCharacterPairs" ) )
 {
 	SetHelpId( HID_POPUP_FONTWORK_CHARSPACE );
-	SetSelectHdl( LINK( this, FontWorkCharacterSpacingWindow, SelectHdl ) );
+	SetSelectHdl( LINK( this, FontworkCharacterSpacingWindow, SelectHdl ) );
 
 	appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_RADIOCHECK );
 	appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_RADIOCHECK );
@@ -600,7 +600,7 @@ FontWorkCharacterSpacingWindow::FontWork
 
 // -----------------------------------------------------------------------
 
-void FontWorkCharacterSpacingWindow::implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled )
+void FontworkCharacterSpacingWindow::implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled )
 {
 	sal_Int32 i;
 	for ( i = 0; i < 6; i++ )
@@ -626,7 +626,7 @@ void FontWorkCharacterSpacingWindow::imp
 
 // -----------------------------------------------------------------------
 
-void FontWorkCharacterSpacingWindow::implSetKernCharacterPairs( sal_Bool, bool bEnabled )
+void FontworkCharacterSpacingWindow::implSetKernCharacterPairs( sal_Bool, bool bEnabled )
 {
 	enableEntry( 6, bEnabled );
 	checkEntry( 6, bEnabled );
@@ -634,7 +634,7 @@ void FontWorkCharacterSpacingWindow::imp
 
 // -----------------------------------------------------------------------
 
-void SAL_CALL FontWorkCharacterSpacingWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException )
+void SAL_CALL FontworkCharacterSpacingWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException )
 {
 	if( Event.FeatureURL.Main.equals( msFontworkCharacterSpacing ) )
 	{
@@ -666,7 +666,7 @@ void SAL_CALL FontWorkCharacterSpacingWi
 
 // -----------------------------------------------------------------------
 
-IMPL_LINK( FontWorkCharacterSpacingWindow, SelectHdl, void *, EMPTYARG )
+IMPL_LINK( FontworkCharacterSpacingWindow, SelectHdl, void *, EMPTYARG )
 {
 	if ( IsInPopupMode() )
 		EndPopupMode();
@@ -717,13 +717,13 @@ IMPL_LINK( FontWorkCharacterSpacingWindo
 }
 
 // ========================================================================
-// FontWorkCharacterSpacingControl
+// FontworkCharacterSpacingControl
 // ========================================================================
 
-class FontWorkCharacterSpacingControl : public svt::PopupWindowController
+class FontworkCharacterSpacingControl : public svt::PopupWindowController
 {
 public:
-	FontWorkCharacterSpacingControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+	FontworkCharacterSpacingControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
 
 	virtual ::Window* createPopupWindow( ::Window* pParent );
 
@@ -735,30 +735,30 @@ public:
 };
 
 
-FontWorkCharacterSpacingControl::FontWorkCharacterSpacingControl( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+FontworkCharacterSpacingControl::FontworkCharacterSpacingControl( const Reference< lang::XMultiServiceFactory >& rServiceManager )
 : svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacingFloater" ) ) )
 {
 }
 
 // -----------------------------------------------------------------------
 
-::Window* FontWorkCharacterSpacingControl::createPopupWindow( ::Window* pParent )
+::Window* FontworkCharacterSpacingControl::createPopupWindow( ::Window* pParent )
 {
-    return new FontWorkCharacterSpacingWindow( *this, m_xFrame, pParent );
+    return new FontworkCharacterSpacingWindow( *this, m_xFrame, pParent );
 }
 
 // -----------------------------------------------------------------------
 // XServiceInfo
 // -----------------------------------------------------------------------
 
-OUString SAL_CALL FontWorkCharacterSpacingControl_getImplementationName()
+OUString SAL_CALL FontworkCharacterSpacingControl_getImplementationName()
 {
-	return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FontWorkCharacterSpacingController" ));
+	return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FontworkCharacterSpacingController" ));
 }
 
 // --------------------------------------------------------------------
 
-Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException )
+Sequence< OUString > SAL_CALL FontworkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException )
 {
     Sequence< OUString > aSNS( 1 );
     aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
@@ -767,23 +767,23 @@ Sequence< OUString > SAL_CALL FontWorkCh
 
 // --------------------------------------------------------------------
 
-Reference< XInterface > SAL_CALL SAL_CALL FontWorkCharacterSpacingControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
+Reference< XInterface > SAL_CALL SAL_CALL FontworkCharacterSpacingControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
 {
-	return *new FontWorkCharacterSpacingControl( rSMgr );
+	return *new FontworkCharacterSpacingControl( rSMgr );
 }
 
 // --------------------------------------------------------------------
 
-OUString SAL_CALL FontWorkCharacterSpacingControl::getImplementationName(  ) throw (RuntimeException)
+OUString SAL_CALL FontworkCharacterSpacingControl::getImplementationName(  ) throw (RuntimeException)
 {
-	return FontWorkCharacterSpacingControl_getImplementationName();
+	return FontworkCharacterSpacingControl_getImplementationName();
 }
 
 // --------------------------------------------------------------------
 
-Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl::getSupportedServiceNames(  ) throw (RuntimeException)
+Sequence< OUString > SAL_CALL FontworkCharacterSpacingControl::getSupportedServiceNames(  ) throw (RuntimeException)
 {
-	return FontWorkCharacterSpacingControl_getSupportedServiceNames();
+	return FontworkCharacterSpacingControl_getSupportedServiceNames();
 }
 
 // ========================================================================

Modified: incubator/ooo/branches/writer001/main/svx/util/svxcore.component
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/svx/util/svxcore.component?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/svx/util/svxcore.component (original)
+++ incubator/ooo/branches/writer001/main/svx/util/svxcore.component Mon Sep 17 08:06:09 2012
@@ -36,10 +36,10 @@
   <implementation name="com.sun.star.comp.svx.ExtrusionSurfaceController">
     <service name="com.sun.star.frame.ToolbarController"/>
   </implementation>
-  <implementation name="com.sun.star.comp.svx.FontWorkAlignmentController">
+  <implementation name="com.sun.star.comp.svx.FontworkAlignmentController">
     <service name="com.sun.star.frame.ToolbarController"/>
   </implementation>
-  <implementation name="com.sun.star.comp.svx.FontWorkCharacterSpacingController">
+  <implementation name="com.sun.star.comp.svx.FontworkCharacterSpacingController">
     <service name="com.sun.star.frame.ToolbarController"/>
   </implementation>
 </component>

Modified: incubator/ooo/branches/writer001/main/sw/inc/IDocumentContentOperations.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/inc/IDocumentContentOperations.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/inc/IDocumentContentOperations.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/inc/IDocumentContentOperations.hxx Mon Sep 17 08:06:09 2012
@@ -179,8 +179,11 @@
         hinzugefuegt.  Wenn das Attribut nicht eingefuegt werden
         konnte, liefert die Methode sal_False.
 	*/
+	//Modify here for #119405, by chengjh, 2012-08-16
+	//Add a para for the char attribute exp...
     virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
-                                const sal_uInt16 nFlags) = 0;
+                                const sal_uInt16 nFlags,bool bExpandCharToPara=false) = 0;
+	//End
 
     /**
     */

Modified: incubator/ooo/branches/writer001/main/sw/inc/doc.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/inc/doc.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/inc/doc.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/inc/doc.hxx Mon Sep 17 08:06:09 2012
@@ -712,6 +712,13 @@ private:
      bool ReplaceRangeImpl(SwPaM&, String const&, const bool);
 
 public:
+	enum DocumentType {
+		DOCTYPE_NATIVE,
+		DOCTYPE_MSWORD				//This doc medul is come from Ms Word
+		};
+	DocumentType	meDocType;
+	DocumentType	GetDocumentType(){ return meDocType; }
+	void			SetDocumentType( DocumentType eDocType ) { meDocType = eDocType; }
 
     /** Life cycle
     */
@@ -881,8 +888,11 @@ public:
     virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*);
     virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
 						const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
+	//Modify here for #119405, by chengjh, 2012-08-16
+	//Add a para for the char attribute exp...
     virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
-                                const SetAttrMode nFlags);
+                                const SetAttrMode nFlags,bool bExpandCharToPara=false);
+	//End
     virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
                                 const SetAttrMode nFlags);
 	virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj);
@@ -2072,6 +2082,8 @@ public:
     void initXForms( bool bCreateDefaultModel );
     // <-- #i31958# access methods for XForms model(s)
 
+    void disposeXForms( );  // #i113606#, for disposing XForms
+
     // --> OD 2006-03-21 #b6375613#
     inline bool ApplyWorkaroundForB6375613() const
     {

Modified: incubator/ooo/branches/writer001/main/sw/inc/fmtclds.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/inc/fmtclds.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/inc/fmtclds.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/inc/fmtclds.hxx Mon Sep 17 08:06:09 2012
@@ -83,6 +83,7 @@ class SW_DLLPUBLIC SwFmtCol : public Sfx
 
 	SwColumns	aColumns;	//Informationen fuer die einzelnen Spalten.
 	sal_uInt16		nWidth;		//Gesamtwunschbreite aller Spalten.
+	sal_Int16	aWidthAdjustValue;
 
 	sal_Bool bOrtho;			//Nur wenn dieses Flag gesetzt ist wird beim setzen
 							//der GutterWidth eine 'optische Verteilung'
@@ -99,6 +100,9 @@ public:
 	SwFmtCol();
 	SwFmtCol( const SwFmtCol& );
 	~SwFmtCol();
+	//i120133
+	const	sal_Int16 GetAdjustValue() const { return aWidthAdjustValue; }
+	void	SetAdjustValue( const sal_Int16& n ) { aWidthAdjustValue = n; }
 
 	SwFmtCol& operator=( const SwFmtCol& );
 

Modified: incubator/ooo/branches/writer001/main/sw/inc/hintids.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/inc/hintids.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/inc/hintids.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/inc/hintids.hxx Mon Sep 17 08:06:09 2012
@@ -93,6 +93,8 @@ RES_CHRATR_BEGIN = HINT_BEGIN,
 	RES_CHRATR_OVERLINE,					// 38
 	RES_CHRATR_DUMMY1,						// 39
 	RES_CHRATR_DUMMY2,						// 40
+	RES_CHRATR_BIDIRTL,						
+	RES_CHRATR_IDCTHINT,					
 RES_CHRATR_END
 };
 

Modified: incubator/ooo/branches/writer001/main/sw/inc/ndtxt.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/inc/ndtxt.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/inc/ndtxt.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/inc/ndtxt.hxx Mon Sep 17 08:06:09 2012
@@ -196,6 +196,9 @@ class SW_DLLPUBLIC SwTxtNode: public SwC
     SW_DLLPRIVATE void impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet);
 
 public:
+	//Bug 120881:Modify here for Directly Page Numbering
+	bool HasPageNumberField();
+	//Bug 120881(End)
     bool IsWordCountDirty() const;
     bool IsWrongDirty() const;
     bool IsGrammarCheckDirty() const;
@@ -216,6 +219,9 @@ public:
     // SMARTTAGS
     void SetSmartTags( SwWrongList* pNew, bool bDelete = true );
     SwWrongList* GetSmartTags();
+	//Modify here for #119405, by easyfan, 2012-05-24
+	bool TryCharSetExpandToNum(const SfxItemSet& pCharSet);
+	//End of modification, by easyfan
 
     //
     // End: Data collected during idle time
@@ -379,6 +385,10 @@ public:
      */
     SwTxtAttr *GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
                             enum GetTxtAttrMode const eMode = DEFAULT) const;
+	//Bug 120881:Modify here for Directly Page Numbering
+	SwTxtFld  *GetTxtFld( xub_StrLen const rIdx )
+				{ return (SwTxtFld *)GetTxtAttrAt( rIdx, RES_TXTATR_FIELD ); }
+	//Bug 120881(End)
 
     /** get the innermost text attributes covering position nIndex.
         @param nWhich   only attributes with this id are returned.

Modified: incubator/ooo/branches/writer001/main/sw/inc/unomap.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/inc/unomap.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/inc/unomap.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/inc/unomap.hxx Mon Sep 17 08:06:09 2012
@@ -247,6 +247,7 @@
 #define WID_DOC_HAS_VALID_SIGNATURES            1017
 #define WID_DOC_BUILDID							1024
 #define WID_DOC_ISTEMPLATEID						1025
+#define WID_DOC_DEFAULT_PAGE_MODE					1069
 // --> OD 2006-03-21 #b6375613#
 #define WID_APPLY_WORKAROUND_FOR_B6375613       1070
 // <--

Modified: incubator/ooo/branches/writer001/main/sw/inc/unoprnms.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/inc/unoprnms.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/inc/unoprnms.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/inc/unoprnms.hxx Mon Sep 17 08:06:09 2012
@@ -805,8 +805,9 @@ enum SwPropNameIds
 /* 0740 */  UNO_NAME_EMBEDDED_OBJECT,
 
 /* 0741 */	UNO_NAME_REPLACEMENT_GRAPHIC_URL,
+/* 0742 */	UNO_NAME_DEFAULT_PAGE_MODE,
 
-/* 0742 */  SW_PROPNAME_END
+/* 0743 */  SW_PROPNAME_END
 };
 
 

Modified: incubator/ooo/branches/writer001/main/sw/source/core/bastyp/init.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/bastyp/init.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/bastyp/init.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/bastyp/init.cxx Mon Sep 17 08:06:09 2012
@@ -303,6 +303,8 @@ SfxItemInfo __FAR_DATA aSlotTab[] =
 	{ SID_ATTR_CHAR_OVERLINE, SFX_ITEM_POOLABLE },  	// RES_CHRATR_OVERLINE
 	{ 0, SFX_ITEM_POOLABLE },							// RES_CHRATR_DUMMY1
 	{ 0, SFX_ITEM_POOLABLE },							// RES_CHRATR_DUMMY2
+	{ 0, SFX_ITEM_POOLABLE },							// RES_CHRATR_BIDIRTL
+	{ 0, SFX_ITEM_POOLABLE },							// RES_CHRATR_IDCTHINT
 
     { 0, 0 },                                           // RES_TXTATR_REFMARK
     { 0, 0 },                                           // RES_TXTATR_TOXMARK
@@ -543,6 +545,8 @@ void _InitCore()
 	aAttrTab[ RES_TXTATR_DUMMY2 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_TXTATR_DUMMY2 );
     aAttrTab[ RES_TXTATR_DUMMY5 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_TXTATR_DUMMY5 );
 // TextAttr - Dummies
+	aAttrTab[ RES_CHRATR_BIDIRTL - POOLATTR_BEGIN ] = new SfxInt16Item( RES_CHRATR_BIDIRTL, sal_Int16(-1) );
+	aAttrTab[ RES_CHRATR_IDCTHINT - POOLATTR_BEGIN ] = new SfxInt16Item( RES_CHRATR_IDCTHINT, sal_Int16(-1) );
 
     aAttrTab[ RES_PARATR_LINESPACING- POOLATTR_BEGIN ] = new SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
     aAttrTab[ RES_PARATR_ADJUST- POOLATTR_BEGIN ] = new SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST );

Modified: incubator/ooo/branches/writer001/main/sw/source/core/doc/docfmt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/doc/docfmt.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/doc/docfmt.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/doc/docfmt.cxx Mon Sep 17 08:06:09 2012
@@ -551,7 +551,9 @@ void SwDoc::ResetAttrs( const SwPaM &rRg
 
 static bool
 lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
-            const SetAttrMode nFlags, SwUndoAttr *const pUndo)
+//Modify here for #119405, by easyfan, 2012-05-24
+            const SetAttrMode nFlags, SwUndoAttr *const pUndo,bool bExpandCharToPara=false)
+//End of modification, by easyfan
 {
 	// teil die Sets auf (fuer Selektion in Nodes)
     const SfxItemSet* pCharSet = 0;
@@ -964,6 +966,26 @@ lcl_InsAttr(SwDoc *const pDoc, const SwP
 			// lediglich Selektion in einem Node.
 			if( pStt->nNode == pEnd->nNode )
             {
+			//Modify here for #119405, by easyfan, 2012-05-24
+			//The data parameter flag: bExpandCharToPara, comes from the data member of SwDoc,
+			//Which is set in SW MS word Binary filter WW8ImplRreader. With this flag on, means that 
+			//current setting attribute set is a character range properties set and comes from a MS word 
+			//binary file, And the setting range include a paragraph end position (0X0D);
+			//More specifications, as such property inside the character range properties set recorded in
+			//MS word binary file are dealed and inserted into data model (SwDoc) one by one, so we 
+			//only dealing the scenario that the char properties set with 1 item inside;
+			
+            		if (bExpandCharToPara && pCharSet && pCharSet->Count() ==1 )
+			{
+				SwTxtNode* pCurrentNd = pStt->nNode.GetNode().GetTxtNode();
+				
+				if (pCurrentNd)
+				{
+	 				pCurrentNd->TryCharSetExpandToNum(*pCharSet);
+						
+				}
+			}
+			//End of modification, by easyfan
                 DELETECHARSETS
                 return bRet;
             }
@@ -1067,13 +1089,45 @@ lcl_InsAttr(SwDoc *const pDoc, const SwP
 		++nNodes;
 	}
 
+	//Modify here for #119405, by easyfan, 2012-05-24
+	//The data parameter flag: bExpandCharToPara, comes from the data member of SwDoc,
+	//Which is set in SW MS word Binary filter WW8ImplRreader. With this flag on, means that 
+	//current setting attribute set is a character range properties set and comes from a MS word 
+	//binary file, And the setting range include a paragraph end position (0X0D);
+	//More specifications, as such property inside the character range properties set recorded in
+	//MS word binary file are dealed and inserted into data model (SwDoc) one by one, so we 
+	//only dealing the scenario that the char properties set with 1 item inside;
+	if (bExpandCharToPara && pCharSet && pCharSet->Count() ==1)
+	{
+		SwPosition aStartPos (*rRg.Start());
+		SwPosition aEndPos (*rRg.End());
+
+		if (aEndPos.nNode.GetNode().GetTxtNode() && aEndPos.nContent != aEndPos.nNode.GetNode().GetTxtNode()->Len())
+			aEndPos.nNode--;
+
+		for (;aStartPos<=aEndPos;aStartPos.nNode++)
+		{
+			SwTxtNode* pCurrentNd = aStartPos.nNode.GetNode().GetTxtNode();
+			
+			if (pCurrentNd)
+			{
+ 				pCurrentNd->TryCharSetExpandToNum(*pCharSet);
+					
+			}
+				
+		}
+	}
+	//End of modification, by easyfan
+
     DELETECHARSETS
     return (nNodes != 0) || bRet;
 }
 
-
+//Modify here for #119405, by chengjh, 2012-08-16
+//Add a para for the char attribute exp...
 bool SwDoc::InsertPoolItem( const SwPaM &rRg, const SfxPoolItem &rHt,
-                            const SetAttrMode nFlags )
+                            const SetAttrMode nFlags, bool bExpandCharToPara)
+//End
 {
 	SwDataChanged aTmp( rRg, 0 );
 	SwUndoAttr* pUndoAttr = 0;
@@ -1085,7 +1139,9 @@ bool SwDoc::InsertPoolItem( const SwPaM 
 
 	SfxItemSet aSet( GetAttrPool(), rHt.Which(), rHt.Which() );
 	aSet.Put( rHt );
-    bool bRet = lcl_InsAttr( this, rRg, aSet, nFlags, pUndoAttr );
+	//Modify here for #119405, by easyfan, 2012-05-24    	
+    	bool bRet = lcl_InsAttr( this, rRg, aSet, nFlags, pUndoAttr,bExpandCharToPara );
+    	//End of modification, by easyfan
 
     if (GetIDocumentUndoRedo().DoesUndo())
     {

Modified: incubator/ooo/branches/writer001/main/sw/source/core/doc/docnew.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/doc/docnew.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/doc/docnew.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/doc/docnew.cxx Mon Sep 17 08:06:09 2012
@@ -299,7 +299,8 @@ SwDoc::SwDoc()
     n32DummyCompatabilityOptions1(0),
     n32DummyCompatabilityOptions2(0),
     mbStartIdleTimer(sal_False),
-	mbSetDrawDefaults(false)
+    mbSetDrawDefaults(false),
+    meDocType( DOCTYPE_NATIVE )
 {
 	RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722",  "SwDoc::SwDoc" );
 
@@ -682,6 +683,8 @@ SwDoc::~SwDoc()
     maListStyleLists.clear();
     // <--
 
+	disposeXForms(); // #i113606#, dispose the XForms objects
+
 	delete pPrtData;
 	delete pNumberFormatter;
 	delete pFtnInfo;

Modified: incubator/ooo/branches/writer001/main/sw/source/core/doc/doctxm.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/doc/doctxm.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/doc/doctxm.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/doc/doctxm.cxx Mon Sep 17 08:06:09 2012
@@ -757,6 +757,7 @@ SwTOXBaseSection::SwTOXBaseSection(SwTOX
 
 SwTOXBaseSection::~SwTOXBaseSection()
 {
+    aSortArr.DeleteAndDestroy( 0, aSortArr.Count() );  // i120680
 }
 
 

Modified: incubator/ooo/branches/writer001/main/sw/source/core/doc/docxforms.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/doc/docxforms.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/doc/docxforms.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/doc/docxforms.cxx Mon Sep 17 08:06:09 2012
@@ -37,7 +37,7 @@
 #include <com/sun/star/xforms/XFormsUIHelper1.hpp>
 #include <unotools/processfactory.hxx>
 #include <tools/diagnose_ex.h>
-
+#include <com/sun/star/container/XIndexAccess.hpp>
 
 using namespace ::com::sun::star;
 
@@ -51,7 +51,7 @@ using xforms::XModel;
 using frame::XModule;
 using xforms::XFormsUIHelper1;
 using rtl::OUString;
-
+using com::sun::star::container::XIndexAccess;
 
 Reference<XNameContainer> SwDoc::getXForms() const
 {
@@ -117,3 +117,52 @@ void SwDoc::initXForms( bool bCreateDefa
     	DBG_UNHANDLED_EXCEPTION();
     }
 }
+
+//
+// #i113606#, to release the cyclic reference between XFormModel and bindings/submissions.
+//
+void SwDoc::disposeXForms( )
+{
+    // get XForms models
+    if( xXForms.is() )
+    {
+        // iterate over all models
+        uno::Sequence<OUString> aNames = xXForms->getElementNames();
+        const OUString* pNames = aNames.getConstArray();
+        sal_Int32 nNames = aNames.getLength();
+        for( sal_Int32 n = 0; (n < nNames); n++ )
+        {
+            Reference< xforms::XModel > xModel( 
+                xXForms->getByName( pNames[n] ), UNO_QUERY );
+
+            if( xModel.is() )
+            {
+                // ask model for bindings
+                Reference< XIndexAccess > xBindings(
+                         xModel->getBindings(), UNO_QUERY );
+
+                //
+                // Then release them one by one
+                //
+                int nCount = xBindings->getCount();
+                for( int i = nCount-1; i >= 0; i-- )
+                {
+                    xModel->getBindings()->remove(xBindings->getByIndex( i ));
+                }
+                    
+                // ask model for Submissions
+                Reference< XIndexAccess > xSubmissions(
+                         xModel->getSubmissions(), UNO_QUERY );
+                         
+                //
+                // Then release them one by one
+                //
+                nCount = xSubmissions->getCount();
+                for( int i = nCount-1; i >= 0; i-- )
+                {
+                    xModel->getSubmissions()->remove(xSubmissions->getByIndex( i ));
+                }
+            }
+        }
+    }
+}

Modified: incubator/ooo/branches/writer001/main/sw/source/core/docnode/ndsect.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/docnode/ndsect.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/docnode/ndsect.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/docnode/ndsect.cxx Mon Sep 17 08:06:09 2012
@@ -448,8 +448,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( 
 		}
 		else if( !pSectNd && pEndSectNd )
 		{
-			// versuche eine umschliessende Section zu erzeugen
-			// Aber, nur wenn das Ende am Section Ende liegt!
+			// try to create a section enclosing it if the end is at the section end
 			nRet = 0;
 			if( pEnd->nContent.GetIndex() == pCNd->Len() )
 			{
@@ -475,8 +474,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( 
 		}
 		else if( pSectNd && !pEndSectNd )
 		{
-			// versuche eine umschliessende Section zu erzeugen
-			// Aber, nur wenn der Start am Section Anfang liegt!
+			// try to create a section enclosing it if the start is at the section start
 			nRet = 0;
 			if( !pStt->nContent.GetIndex() )
 			{

Modified: incubator/ooo/branches/writer001/main/sw/source/core/draw/dcontact.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/draw/dcontact.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/draw/dcontact.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/draw/dcontact.cxx Mon Sep 17 08:06:09 2012
@@ -1505,12 +1505,15 @@ void SwDrawContact::_Changed( const SdrO
                     // of as-character anchored object
                     if ( bAnchoredAsChar )
                     {
-						//-->Modified for i119654,2012.6.8                        
-						SwFrm *pAnchorFrame = NULL;
-                        if ( pAnchoredDrawObj && ( pAnchorFrame = 
-								const_cast<SwAnchoredDrawObject*>( pAnchoredDrawObj )->AnchorFrm() ) )
-							pAnchorFrame->Prepare( PREP_FLY_ATTR_CHG, GetFmt() );
-						//<--
+                        //-->Modified for i119654,2012.6.8                        
+                        SwFrm* pAnchorFrame = pAnchoredDrawObj
+                                              ? const_cast<SwAnchoredDrawObject*>( pAnchoredDrawObj )->AnchorFrm()
+                                              : NULL;
+                        if ( pAnchorFrame )
+                        {
+                            pAnchorFrame->Prepare( PREP_FLY_ATTR_CHG, GetFmt() );
+                        }
+                        //<--
                     }
                     // <--
                 }

Modified: incubator/ooo/branches/writer001/main/sw/source/core/fields/chpfld.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/fields/chpfld.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/fields/chpfld.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/fields/chpfld.cxx Mon Sep 17 08:06:09 2012
@@ -138,6 +138,35 @@ void SwChapterField::ChangeExpansion(con
 
 void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
 {
+	//i120759,this function is for both the reference chapter field and normal chapter field
+	//bSrchNum can distinguish the two types,to the latter type,the outline num rule is must...
+	sNumber = aEmptyStr;
+	sTitle = aEmptyStr;
+	sPost = aEmptyStr;
+	sPre = aEmptyStr;
+	//The reference chapter field of normal num rule will be handled in this code segment
+	if (bSrchNum && !rTxtNd.IsOutline())
+	{
+		SwNumRule* pRule(rTxtNd.GetNumRule());
+		if (rTxtNd.IsCountedInList() && pRule)
+		{
+			sNumber = rTxtNd.GetNumString(false);
+			const SwNumFmt& rNFmt = pRule->Get(static_cast<unsigned short>(rTxtNd.GetActualListLevel()));
+			sPost = rNFmt.GetSuffix();
+			sPre = rNFmt.GetPrefix();
+		}
+		else
+		{			
+			sNumber = String("??", RTL_TEXTENCODING_ASCII_US);
+		}
+		sTitle = rTxtNd.GetExpandTxt();
+
+		for( xub_StrLen i = 0; i < sTitle.Len(); ++i )
+			if( ' ' > sTitle.GetChar( i ) )
+				sTitle.Erase( i--, 1 );	
+	}else
+	{
+	//End
 	SwDoc* pDoc = (SwDoc*)rTxtNd.GetDoc();
 	const SwTxtNode *pTxtNd = rTxtNd.FindOutlineNodeOfLevel( nLevel );
 	if( pTxtNd )
@@ -197,13 +226,9 @@ void SwChapterField::ChangeExpansion(con
                 sPost = rNFmt.GetSuffix();
                 sPre = rNFmt.GetPrefix();
             }
-            else
-                sPost = aEmptyStr, sPre = aEmptyStr;
         }
         else
         {
-            sPost = aEmptyStr;
-            sPre = aEmptyStr;
             sNumber = String("??", RTL_TEXTENCODING_ASCII_US);
         }
 
@@ -213,12 +238,6 @@ void SwChapterField::ChangeExpansion(con
 			if( ' ' > sTitle.GetChar( i ) )
 				sTitle.Erase( i--, 1 );
 	}
-	else
-	{
-		sNumber = aEmptyStr;
-		sTitle = aEmptyStr;
-		sPost = aEmptyStr;
-		sPre = aEmptyStr;
 	}
 }
 

Modified: incubator/ooo/branches/writer001/main/sw/source/core/fields/docufld.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/fields/docufld.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/fields/docufld.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/fields/docufld.cxx Mon Sep 17 08:06:09 2012
@@ -1793,6 +1793,8 @@ SwPostItField::~SwPostItField()
 		m_pTextObject->DisposeEditSource();
 		m_pTextObject->release();
 	}
+
+	delete mpText;
 }
 
 /* ---------------------------------------------------------------------------

Modified: incubator/ooo/branches/writer001/main/sw/source/core/inc/flyfrm.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/inc/flyfrm.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/inc/flyfrm.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/inc/flyfrm.hxx Mon Sep 17 08:06:09 2012
@@ -150,6 +150,9 @@ protected:
 	virtual	void Modify( const SfxPoolItem*, const SfxPoolItem* );
 
 public:
+//Bug 120881:Modify here for Directly Page Numbering
+	sal_Bool IsPageNumberingFrm();
+//Bug 120881(End)
     // OD 2004-03-23 #i26791#
     TYPEINFO();
 

Modified: incubator/ooo/branches/writer001/main/sw/source/core/inc/txtfrm.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/inc/txtfrm.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/inc/txtfrm.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/inc/txtfrm.hxx Mon Sep 17 08:06:09 2012
@@ -239,6 +239,10 @@ public:
     SwRect SmartTagScan( SwCntntNode* , sal_uInt16 );
     // Wird vom CollectAutoCmplWords gerufen
     void CollectAutoCmplWrds( SwCntntNode* , sal_uInt16 );
+	
+	//Bug 120881:Modify here for Directly Page Numbering
+	sal_Bool HasPageNumberField();
+	//Bug 120881(End)
 
     // Returns the screen position of rPos. The values are relative to the upper
     // left position of the page frame.

Modified: incubator/ooo/branches/writer001/main/sw/source/core/layout/atrfrm.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/layout/atrfrm.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/layout/atrfrm.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/layout/atrfrm.cxx Mon Sep 17 08:06:09 2012
@@ -823,6 +823,7 @@ SwFmtCol::SwFmtCol( const SwFmtCol& rCpy
 	eAdj( rCpy.GetLineAdj() ),
     aColumns( (sal_Int8)rCpy.GetNumCols(), 1 ),
     nWidth( rCpy.GetWishWidth() ),
+    aWidthAdjustValue( rCpy.aWidthAdjustValue ),
     bOrtho( rCpy.IsOrtho() )
 {
 	for ( sal_uInt16 i = 0; i < rCpy.GetNumCols(); ++i )
@@ -842,6 +843,7 @@ SwFmtCol& SwFmtCol::operator=( const SwF
 	eAdj		= rCpy.GetLineAdj();
 	nWidth		= rCpy.GetWishWidth();
 	bOrtho		= rCpy.IsOrtho();
+	aWidthAdjustValue = rCpy.aWidthAdjustValue;
 
 	if ( aColumns.Count() )
 		aColumns.DeleteAndDestroy( 0, aColumns.Count() );
@@ -859,7 +861,8 @@ SwFmtCol::SwFmtCol()
     nLineHeight( 100 ),
 	eAdj( COLADJ_NONE ),
 	nWidth( USHRT_MAX ),
-    bOrtho( sal_True )
+	aWidthAdjustValue( 0 ),
+	bOrtho( sal_True )
 {
 }
 
@@ -873,7 +876,9 @@ int SwFmtCol::operator==( const SfxPoolI
 		  eAdj		 		 == rCmp.GetLineAdj() &&
 		  nWidth  	 		 == rCmp.GetWishWidth() &&
 		  bOrtho  			 == rCmp.IsOrtho() &&
-		  aColumns.Count() == rCmp.GetNumCols()) )
+		  aColumns.Count() == rCmp.GetNumCols() && 
+		  aWidthAdjustValue == rCmp.GetAdjustValue()
+         ) )
 		return 0;
 
 	for ( sal_uInt16 i = 0; i < aColumns.Count(); ++i )

Modified: incubator/ooo/branches/writer001/main/sw/source/core/layout/fly.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/layout/fly.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/layout/fly.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/layout/fly.cxx Mon Sep 17 08:06:09 2012
@@ -1532,8 +1532,17 @@ void SwFlyFrm::Format( const SwBorderAtt
                         nNewSize = nAutoWidth;
                 }
             }
-            else
-                nNewSize -= nLR;
+            /*else
+                nNewSize -= nLR;*/
+			else
+			{//Bug 120881:For enlarging fixed size Pagenumber frame,kangjian
+				if(nNewSize <= 500 && IsPageNumberingFrm())
+					nNewSize = nNewSize - nLR + 150;
+			
+				else
+					nNewSize -= nLR;
+			//Bug 120881(End)
+			}
 
             if( nNewSize < MINFLY )
                 nNewSize = MINFLY;
@@ -2967,3 +2976,39 @@ SwFlyFrmFmt * SwFlyFrm::GetFmt()
     return static_cast< SwFlyFrmFmt * >( GetDep() );
 }
 
+//Bug 120881:Modify here for Directly Page Numbering
+sal_Bool SwFlyFrm::IsPageNumberingFrm()
+{
+	if (!GetAnchorFrm())//Invalidate frame...
+		return false;
+	if (bInCnt || bLayout)//Incorrect anchor type...
+		return false;
+	if (!(GetAnchorFrm()->IsTxtFrm() && GetAnchorFrm()->GetUpper() 
+		&& (GetAnchorFrm()->GetUpper()->FindFooterOrHeader())))//Not in header or footer frame
+		return false;
+
+	if (pNextLink || pPrevLink)//Linked...
+		return false;
+
+	SwFrmFmt* pFmt = NULL;
+	if ((pFmt = GetFmt()))
+	{
+		if (pLower && pLower->GetNext() && pFmt->GetCol().GetNumCols()>1)//Has more than 1 column...
+			return false;
+	}
+
+	if (!pLower)//Do not has even 1 child frame?
+		return false;
+
+	for (SwFrm* pIter = pLower;pIter!=NULL;pIter=pIter->GetNext())
+	{
+		if (pIter->IsTxtFrm() && ((SwTxtFrm*)pIter)->HasPageNumberField())
+		{
+			return true;
+		}
+	}
+	return false;
+}
+
+//Bug 120881(End)
+

Modified: incubator/ooo/branches/writer001/main/sw/source/core/text/atrstck.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/text/atrstck.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/text/atrstck.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/text/atrstck.cxx Mon Sep 17 08:06:09 2012
@@ -121,6 +121,8 @@ const sal_uInt8 StackPos[ static_cast<sa
     35, // RES_CHRATR_OVERLINE,                  // 38
      0, // RES_CHRATR_DUMMY1,                    // 39
      0, // RES_CHRATR_DUMMY2,                    // 40
+	 0, // RES_CHRATR_BIDIRTL
+	 0, // RES_CHRATR_IDCTHINT
     36, // RES_TXTATR_REFMARK,                   // 41
     37, // RES_TXTATR_TOXMARK,                   // 42
     38, // RES_TXTATR_META,                      // 43

Modified: incubator/ooo/branches/writer001/main/sw/source/core/text/itrform2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/text/itrform2.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/text/itrform2.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/text/itrform2.cxx Mon Sep 17 08:06:09 2012
@@ -1572,7 +1572,11 @@ xub_StrLen SwTxtFormatter::FormatLine( c
         pCurr->CalcLine( *this, GetInfo() );
 		CalcRealHeight( GetInfo().IsNewLine() );
 
-		if ( IsFlyInCntBase() && !IsQuick() )
+		//Bug 120864:For Special case that at the first caculation couldn't get correct height. And need to recaculate for the right height.
+		SwLinePortion* pPorTmp = pCurr->GetPortion();
+		if ( IsFlyInCntBase() && (!IsQuick() || (pPorTmp && pPorTmp->IsFlyCntPortion() && !pPorTmp->GetPortion() &&
+			pCurr->Height() > pPorTmp->Height())))
+		//Bug 120864(End)
 		{
 			KSHORT nTmpAscent, nTmpHeight;
 			CalcAscentAndHeight( nTmpAscent, nTmpHeight );

Modified: incubator/ooo/branches/writer001/main/sw/source/core/text/itrpaint.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/text/itrpaint.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/text/itrpaint.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/text/itrpaint.cxx Mon Sep 17 08:06:09 2012
@@ -521,11 +521,13 @@ void SwTxtPainter::CheckSpecialUnderline
 
     // If current underline matches the common underline font, we continue
     // to use the common underline font.
+	//Bug 120769:Color of underline display wrongly
+		Color aAutoCo(COL_AUTO);
     if ( GetInfo().GetUnderFnt() &&
-         GetInfo().GetUnderFnt()->GetFont().GetUnderline() ==
-         GetFnt()->GetUnderline() )
-         return;
-
+		GetInfo().GetUnderFnt()->GetFont().GetUnderline() == GetFnt()->GetUnderline() && 
+        GetInfo().GetFont() && GetInfo().GetFont()->GetUnderColor() != aAutoCo )
+		return;
+	//Bug 120769(End)
     // calculate the new common underline font
     SwFont* pUnderlineFnt = 0;
     Point aCommonBaseLine;

Modified: incubator/ooo/branches/writer001/main/sw/source/core/txtnode/ndtxt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/txtnode/ndtxt.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/txtnode/ndtxt.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/txtnode/ndtxt.cxx Mon Sep 17 08:06:09 2012
@@ -5077,4 +5077,21 @@ SwTxtNode::MakeUnoObject()
             SwXParagraph::CreateXParagraph(*GetDoc(), *this), uno::UNO_QUERY);
     return xMeta;
 }
+//Bug 120881:Modify here for Directly Page Numbering
+bool SwTxtNode::HasPageNumberField()
+{
+	xub_StrLen nEnd = Len();
+	for(xub_StrLen nStart=0;nStart<nEnd;nStart++)
+	{
+		SwTxtFld* pFld = GetTxtFld(nStart);
+		const SwField* pSwField = NULL;
+		const SwFieldType* pType = NULL;
+		if (pFld && (pSwField=pFld->GetFld().GetFld()) && 
+			(pType=pSwField->GetTyp()) && pType->Which()==RES_PAGENUMBERFLD)
+			return true;
+	}
+	return false;
+
+}
+//Bug 120881(End)
 

Modified: incubator/ooo/branches/writer001/main/sw/source/core/txtnode/thints.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/txtnode/thints.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/txtnode/thints.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/txtnode/thints.cxx Mon Sep 17 08:06:09 2012
@@ -1607,6 +1607,78 @@ void SwTxtNode::DelSoftHyph( const xub_S
 	}
 }
 
+//Modify here for #119405, by easyfan, 2012-05-24
+//In MS Word, the font underline setting of the paragraph end position wont affect the formatting of numbering, so we ignore it
+bool lcl_IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich)
+{
+	return (nWhich ==  RES_CHRATR_UNDERLINE);
+}
+
+//In MS Word, following properties of the paragraph end position wont affect the formatting of bullets, so we ignore them:
+//Font underline;
+//Font Italic of Western, CJK and CTL;
+//Font Bold of Wertern, CJK and CTL;
+bool lcl_IsIgnoredCharFmtForBullets(const sal_uInt16 nWhich)
+{
+	return (nWhich ==  RES_CHRATR_UNDERLINE || nWhich ==  RES_CHRATR_POSTURE || nWhich ==  RES_CHRATR_WEIGHT
+		|| nWhich == RES_CHRATR_CJK_POSTURE || nWhich == RES_CHRATR_CJK_WEIGHT 
+		|| nWhich == RES_CHRATR_CTL_POSTURE || nWhich == RES_CHRATR_CTL_WEIGHT);
+}
+
+//Condition for expanding char set to character style of specified number rule level:
+//The item inside the set should not conflict to any exist and non-default item inside paragraph properties set (SwCntntNode::SwPAttrSet);
+//The node should have applied a number rule;
+//The node should be counted in a list, if not, make it to be;
+//The item should not conflict to any exist and non-default item inside the character of specified number rule level;
+//The item should not be ignored depend on the exact number rule type;
+bool SwTxtNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet)
+{	
+	bool bRet = false;	
+	SfxItemIter aIter( aCharSet );
+        const SfxPoolItem* pItem = aIter.FirstItem();
+        const sal_uInt16 nWhich = pItem->Which();
+
+	const SfxPoolItem& rInnerItem = GetAttr(nWhich,false);
+
+	if (!IsDefaultItem(&rInnerItem) &&  !IsInvalidItem(&rInnerItem))
+		return bRet;
+
+	if ( !IsInList() && GetNumRule() && GetListId().Len() > 0 )
+	{
+		return bRet;
+	}
+
+	SwNumRule* pCurrNum = GetNumRule(false);
+
+	int nLevel = GetActualListLevel();
+
+	if (nLevel != -1 && pCurrNum)
+	{
+		const SwNumFmt* pCurrNumFmt = pCurrNum->GetNumFmt(static_cast<sal_uInt16>(nLevel));
+		if (pCurrNumFmt)
+		{
+			if (pCurrNumFmt->IsItemize() && lcl_IsIgnoredCharFmtForBullets(nWhich))
+				return bRet;
+			if (pCurrNumFmt->IsEnumeration() && lcl_IsIgnoredCharFmtForNumbering(nWhich))
+				return bRet;
+			SwCharFmt* pCurrCharFmt =pCurrNumFmt->GetCharFmt();
+
+			if (pCurrCharFmt && pCurrCharFmt->GetItemState(nWhich,false) != SFX_ITEM_SET)
+			{
+				pCurrCharFmt->SetFmtAttr(*pItem);
+				SwNumFmt aNewNumFmt(*pCurrNumFmt);
+				aNewNumFmt.SetCharFmt(pCurrCharFmt);
+				pCurrNum->Set(nLevel,aNewNumFmt);
+				bRet = true;
+			}
+		}
+	}
+
+	
+	return bRet;
+}
+//End of modification, by easyfan
+
 // setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
 // dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
 sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,

Modified: incubator/ooo/branches/writer001/main/sw/source/core/txtnode/txtedt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/txtnode/txtedt.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/txtnode/txtedt.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/txtnode/txtedt.cxx Mon Sep 17 08:06:09 2012
@@ -2211,3 +2211,11 @@ bool SwTxtNode::IsAutoCompleteWordDirty(
 //
 // Paragraph statistics end
 //
+
+//Bug 120881:Modify here for Directly Page Numbering
+sal_Bool SwTxtFrm::HasPageNumberField() 
+{
+	return GetRegisteredIn()?((SwTxtNode*)GetRegisteredIn())->HasPageNumberField():false;
+}
+//Bug 120881(End)
+

Modified: incubator/ooo/branches/writer001/main/sw/source/core/unocore/unoframe.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/unocore/unoframe.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/unocore/unoframe.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/unocore/unoframe.cxx Mon Sep 17 08:06:09 2012
@@ -652,27 +652,32 @@ sal_Bool 	SwGraphicProperties_Impl::AnyT
     GetProperty(RES_GRFATR_MIRRORGRF, MID_MIRROR_HORZ_ODD_PAGES, pHOddMirror);
     GetProperty(RES_GRFATR_MIRRORGRF, MID_MIRROR_VERT, pVMirror);
 
-	if ( pStyle )
-	{
-		rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet(*pStyle) );
+    if ( pStyle )
+    {
+        rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet(*pStyle) );
         const :: SfxItemSet *pItemSet = &xStyle->GetItemSet();
-		//Begin Bug 119922
-    		sal_Bool bOasis = sal_False;
-		SfxMedium* pMedium = NULL;
-		const SfxFilter * pFilter = NULL;		
-		if ( ( pMedium = pDoc->GetDocShell()->GetMedium() ) &&
-				( pFilter = pMedium->GetFilter() ) )
-			bOasis = pFilter->GetVersion() > SOFFICE_FILEFORMAT_60;	
-		bRet = FillBaseProperties( rFrmSet, *pItemSet, rSizeFound, bOasis );
-		//End Bug 119922
-		lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, pVMirror, bRet );
-	}
-	else
-	{
+        //Begin Bug 119922
+        sal_Bool bOasis = sal_False;
+        {
+            const SfxMedium* pMedium = pDoc->GetDocShell()->GetMedium();
+            const SfxFilter * pFilter = pMedium
+                ? pMedium->GetFilter()
+                : NULL;
+            if ( pMedium && pFilter )
+            {
+                bOasis = pFilter->GetVersion() > SOFFICE_FILEFORMAT_60;
+            }
+        }
+        bRet = FillBaseProperties( rFrmSet, *pItemSet, rSizeFound, bOasis );
+        //End Bug 119922
+        lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, pVMirror, bRet );
+    }
+    else
+    {
         const :: SfxItemSet *pItemSet = &pDoc->GetFrmFmtFromPool( RES_POOLFRM_GRAPHIC )->GetAttrSet();
-    	bRet = FillBaseProperties(rFrmSet, *pItemSet, rSizeFound);
-		lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, pVMirror, bRet );
-	}
+        bRet = FillBaseProperties(rFrmSet, *pItemSet, rSizeFound);
+        lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, pVMirror, bRet );
+    }
 
 
     static const :: sal_uInt16 nIDs[] =

Modified: incubator/ooo/branches/writer001/main/sw/source/core/unocore/unomap.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/unocore/unomap.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/unocore/unomap.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/unocore/unomap.cxx Mon Sep 17 08:06:09 2012
@@ -1597,6 +1597,7 @@ const SfxItemPropertyMapEntry* SwUnoProp
 					{ SW_PROP_NMID(UNO_NAME_BUILDID), WID_DOC_BUILDID, CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0},
                     // --> OD 2006-03-21 #b6375613#
                     { SW_PROP_NMID(UNO_NAME_APPLY_WORKAROUND_FOR_B6375613), WID_APPLY_WORKAROUND_FOR_B6375613, CPPU_E2T(CPPUTYPE_BOOLEAN), 0, 0},
+                     { SW_PROP_NMID(UNO_NAME_DEFAULT_PAGE_MODE),  WID_DOC_DEFAULT_PAGE_MODE,  CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE,  0},
                     // <--
                     {0,0,0,0,0,0}
 				};

Modified: incubator/ooo/branches/writer001/main/sw/source/core/unocore/unoprnms.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/unocore/unoprnms.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/unocore/unoprnms.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/unocore/unoprnms.cxx Mon Sep 17 08:06:09 2012
@@ -777,6 +777,7 @@ const SwPropNameTab aPropNameTab = {
 /* 0739 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")},
 /* 0740 UNO_NAME_EMBEDDED_OBJECT */ {MAP_CHAR_LEN("EmbeddedObject")},
 /* 0741 UNO_NAME_REPLACEMENT_GRAPHIC_URL */ {MAP_CHAR_LEN("ReplacementGraphicURL")},
+/* 0742 UNO_NAME_DEFAULT_PAGE_MODE */	 {MAP_CHAR_LEN("DefaultPageMode")}
 };
 
 const SwPropNameLen& SwGetPropName( sal_uInt16 nId )

Modified: incubator/ooo/branches/writer001/main/sw/source/core/unocore/unosect.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/unocore/unosect.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/unocore/unosect.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/unocore/unosect.cxx Mon Sep 17 08:06:09 2012
@@ -430,29 +430,28 @@ throw (lang::IllegalArgumentException, u
 
     SwSection *const pRet =
         pDoc->InsertSwSection( aPam, aSect, 0, aSet.Count() ? &aSet : 0 );
-    pRet->GetFmt()->Add(m_pImpl.get());
-    pRet->GetFmt()->SetXObject(static_cast< ::cppu::OWeakObject*>(this));
-
-    // #97450# XML import must hide sections depending on their old
-    //         condition status
-    if (m_pImpl->m_pProps->m_sCondition.getLength() != 0)
+    if( pRet )
     {
-        pRet->SetCondHidden(m_pImpl->m_pProps->m_bCondHidden);
-    }
+        pRet->GetFmt()->Add(m_pImpl.get());
+        pRet->GetFmt()->SetXObject(static_cast< ::cppu::OWeakObject*>(this));
 
-    // set update type if DDE link (and connect, if necessary)
-    if (m_pImpl->m_pProps->m_bDDE)
-    {
-        if (! pRet->IsConnected())
+        // XML import must hide sections depending on their old condition status
+        if (m_pImpl->m_pProps->m_sCondition.getLength() != 0)
+            pRet->SetCondHidden(m_pImpl->m_pProps->m_bCondHidden);
+
+        // set update type if DDE link (and connect, if necessary)
+        if (m_pImpl->m_pProps->m_bDDE)
         {
-            pRet->CreateLink(CREATE_CONNECT);
+            if (! pRet->IsConnected())
+                pRet->CreateLink(CREATE_CONNECT);
+
+            pRet->SetUpdateType( static_cast< sal_uInt16 >(
+                (m_pImpl->m_pProps->m_bUpdateType) ?
+                    sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) );
         }
-        pRet->SetUpdateType( static_cast< sal_uInt16 >(
-            (m_pImpl->m_pProps->m_bUpdateType) ?
-                sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) );
     }
 
-    // Undo-Klammerung hier beenden
+    // end section undo here
     pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, NULL );
     m_pImpl->m_pProps.reset();
     m_pImpl->m_bIsDescriptor = false;

Modified: incubator/ooo/branches/writer001/main/sw/source/core/unocore/unotext.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/core/unocore/unotext.cxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/core/unocore/unotext.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/core/unocore/unotext.cxx Mon Sep 17 08:06:09 2012
@@ -2176,9 +2176,15 @@ lcl_ApplyCellProperties(
                     xCellText->createTextCursor();
                 xCellCurs->gotoStart( sal_False );
                 xCellCurs->gotoEnd( sal_True );
-                const uno::Reference< beans::XPropertySet > xCellTextProps(
-                        xCellCurs, uno::UNO_QUERY);
-                xCellTextProps->setPropertyValue(rName, rValue);
+                const uno::Reference< beans::XPropertyState > 
+                    xCellTextPropState(xCellCurs, uno::UNO_QUERY);
+                const beans::PropertyState state = xCellTextPropState->getPropertyState(rName);
+                if (state == beans::PropertyState_DEFAULT_VALUE)
+                {
+                    const uno::Reference< beans::XPropertySet > 
+                        xCellTextProps(xCellCurs, uno::UNO_QUERY);
+                    xCellTextProps->setPropertyValue(rName, rValue);
+                }
             }
         }
     }

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/inc/fltshell.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/inc/fltshell.hxx?rev=1386501&r1=1386500&r2=1386501&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/inc/fltshell.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/inc/fltshell.hxx Mon Sep 17 08:06:09 2012
@@ -72,7 +72,12 @@ public:
 	sal_Bool bLocked;
 	sal_Bool bCopied;
 	sal_Bool bConsumedByField;
-
+	//Modify here for #119405, by easyfan, 2012-05-24
+	sal_Int32 mnStartCP;
+	sal_Int32 mnEndCP; 
+	bool bIsParaEnd;
+	//End of modification, by easyfan
+ 
 	SW_DLLPUBLIC SwFltStackEntry(const SwPosition & rStartPos, SfxPoolItem* pHt );
 	SW_DLLPUBLIC SwFltStackEntry(const SwFltStackEntry& rEntry);
 	SW_DLLPUBLIC ~SwFltStackEntry();
@@ -80,6 +85,17 @@ public:
 	void SetStartPos(const SwPosition & rStartPos);
 	SW_DLLPUBLIC void SetEndPos(  const SwPosition & rEndPos);
 	SW_DLLPUBLIC sal_Bool MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck );    
+	//Modify here for #119405, by easyfan, 2012-05-24
+	void SetStartCP(sal_Int32 nCP) {mnStartCP = nCP;}
+	void SetEndCP(sal_Int32 nCP) {mnEndCP = nCP;}
+	sal_Int32 GetStartCP() const {return mnStartCP;}
+	sal_Int32 GetEndCP() const {return mnEndCP;}
+	//End of modification, by easyfan
+	//Modify here for #119405, by chengjh, 2012-08-16
+	bool IsAbleMakeRegion();
+	bool IsParaEnd(){ return bIsParaEnd;}
+	void SetIsParaEnd(bool bArg){ bIsParaEnd = bArg;}
+	//End
 };
 
 class SW_DLLPUBLIC SwFltControlStack
@@ -91,6 +107,11 @@ class SW_DLLPUBLIC SwFltControlStack
 
 	sal_uLong nFieldFlags;
 	KeyCode aEmptyKeyCode; // fuer Bookmarks
+//Modify for #119405 by chengjh, 2012-08-16
+private:
+	bool bHasSdOD;
+	bool bSdODChecked;	
+//End
 
 protected:
 	SwDoc* pDoc;
@@ -98,6 +119,16 @@ protected:
 
 	void MoveAttrs( const SwPosition&  rPos );
 	virtual void SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry* pEntry);
+	//Modify here for #119405, by easyfan, 2012-05-24
+	virtual sal_Int32 GetCurrAttrCP() const {return -1;}
+	virtual bool IsParaEndInCPs(sal_Int32 /* nStart */,sal_Int32 /* nEnd */,bool /* bSdOD=true */) const {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
+	virtual void ClearParaEndPosition(){};
+	virtual bool CheckSdOD(sal_Int32 /* nStart */,sal_Int32 /* nEnd */){return false;}
+	bool HasSdOD();
+	//End
 
 public:
 	enum Flags



Mime
View raw message