You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2014/03/19 11:15:07 UTC

svn commit: r1579184 [25/33] - in /openoffice/branches/alg_writerframes: ./ ext_sources/ extras/l10n/source/de/ extras/l10n/source/es/ extras/l10n/source/eu/ extras/l10n/source/hi/ extras/l10n/source/kk/ extras/l10n/source/lt/ extras/l10n/source/nb/ ex...

Modified: openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdograf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdograf.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdograf.cxx (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdograf.cxx Wed Mar 19 10:14:42 2014
@@ -70,6 +70,7 @@
 #include <drawinglayer/processor2d/objectinfoextractor2d.hxx>
 #include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx>
 #include <unotools/cacheoptions.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::io;
@@ -135,7 +136,6 @@ const Graphic ImpLoadLinkedGraphic( cons
 							? pGF->GetImportFormatNumber( aFilterName )
 							: GRFILTER_FORMAT_DONTKNOW;
 
-		String aEmptyStr;
 		com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aFilterData( 1 );
 
 		// Room for improvment:
@@ -144,7 +144,14 @@ const Graphic ImpLoadLinkedGraphic( cons
 		// there we should create a new service to provide this data if needed
 		aFilterData[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CreateNativeLink" ) );
 		aFilterData[ 0 ].Value = Any( sal_True );
-		pGF->ImportGraphic( aGraphic, aEmptyStr, *pInStrm, nFilter, NULL, 0, &aFilterData );
+
+        // #123042# for e.g SVG the path is needed, so hand it over here. I have no real idea
+        // what consequences this may have; maybe this is not handed over by purpose here. Not
+        // handing it over means that any GraphicFormat that internallv needs a path as base
+        // to interpret included links may fail.
+        // Alternatively the path may be set at the result after this call when it is known
+        // that it is a SVG graphic, but only because noone yet tried to interpret it.
+        pGF->ImportGraphic( aGraphic, aFileName, *pInStrm, nFilter, NULL, 0, &aFilterData );
 	}
 	return aGraphic;
 }
@@ -1670,4 +1677,116 @@ Reference< XInputStream > SdrGrafObj::ge
 	return xStream;
 }
 
+// moved crop handle creation here; this is the object type using them
+void SdrGrafObj::addCropHandles(SdrHdlList& rTarget) const
+{
+    basegfx::B2DHomMatrix aMatrix;
+    basegfx::B2DPolyPolygon aPolyPolygon;
+
+    // get object transformation
+    TRGetBaseGeometry(aMatrix, aPolyPolygon);
+
+    // part of object transformation correction, but used later, so defined outside next scope
+    double fShearX(0.0), fRotate(0.0);
+
+    {   // TTTT correct shear, it comes currently mirrored from TRGetBaseGeometry, can be removed with aw080
+        basegfx::B2DTuple aScale;
+        basegfx::B2DTuple aTranslate;
+
+        aMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
+
+        if(!basegfx::fTools::equalZero(fShearX))
+        {
+            // shearX is used, correct it
+            fShearX = -fShearX;
+        }
+
+        aMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
+            aScale,
+            fShearX,
+            fRotate,
+            aTranslate);
+    }
+
+    // get crop values
+    const SdrGrafCropItem& rCrop = static_cast< const SdrGrafCropItem& >(GetMergedItem(SDRATTR_GRAFCROP));
+
+    if(rCrop.GetLeft() || rCrop.GetTop() || rCrop.GetRight() ||rCrop.GetBottom())
+    {
+        // decompose object transformation to have current translate and scale
+        basegfx::B2DVector aScale, aTranslate;
+        double fRotate, fShearX;
+
+        aMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
+
+        if(!aScale.equalZero())
+        {
+            // get crop scale
+            const basegfx::B2DVector aCropScaleFactor(
+                GetGraphicObject().calculateCropScaling(
+                    aScale.getX(),
+                    aScale.getY(),
+                    rCrop.GetLeft(),
+                    rCrop.GetTop(),
+                    rCrop.GetRight(),
+                    rCrop.GetBottom()));
+
+            // apply crop scale
+            const double fCropLeft(rCrop.GetLeft() * aCropScaleFactor.getX());
+            const double fCropTop(rCrop.GetTop() * aCropScaleFactor.getY());
+            const double fCropRight(rCrop.GetRight() * aCropScaleFactor.getX());
+            const double fCropBottom(rCrop.GetBottom() * aCropScaleFactor.getY());
+            basegfx::B2DHomMatrix aMatrixForCropViewHdl(aMatrix);
+
+            if(IsMirrored())
+            {
+                // create corrected new matrix, TTTT can be removed with aw080
+                // the old mirror only can mirror horizontally; the vertical mirror
+                // is faked by using the horizontal and 180 degree rotation. Since
+                // the object can be rotated differently from 180 degree, this is
+                // not safe to detect. Just correct horizontal mirror (which is
+                // in IsMirrored()) and keep the rotation angle
+                // caution: Do not modify aMatrix, it is used below to calculate
+                // the exact handle positions
+                basegfx::B2DHomMatrix aPreMultiply;
+
+                // mirrored X, apply
+                aPreMultiply.translate(-0.5, 0.0);
+                aPreMultiply.scale(-1.0, 1.0);
+                aPreMultiply.translate(0.5, 0.0);
+
+                aMatrixForCropViewHdl = aMatrixForCropViewHdl * aPreMultiply;
+            }
+
+            rTarget.AddHdl(
+                new SdrCropViewHdl(
+                    aMatrixForCropViewHdl,
+                    GetGraphicObject().GetGraphic(),
+                    fCropLeft,
+                    fCropTop,
+                    fCropRight,
+                    fCropBottom));
+        }
+    }
+
+    basegfx::B2DPoint aPos;
+
+    aPos = aMatrix * basegfx::B2DPoint(0.0, 0.0); 
+    rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), HDL_UPLFT, fShearX, fRotate));
+    aPos = aMatrix * basegfx::B2DPoint(0.5, 0.0); 
+    rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), HDL_UPPER, fShearX, fRotate));
+    aPos = aMatrix * basegfx::B2DPoint(1.0, 0.0); 
+    rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), HDL_UPRGT, fShearX, fRotate));
+    aPos = aMatrix * basegfx::B2DPoint(0.0, 0.5); 
+    rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), HDL_LEFT , fShearX, fRotate));
+    aPos = aMatrix * basegfx::B2DPoint(1.0, 0.5); 
+    rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), HDL_RIGHT, fShearX, fRotate));
+    aPos = aMatrix * basegfx::B2DPoint(0.0, 1.0); 
+    rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), HDL_LWLFT, fShearX, fRotate));
+    aPos = aMatrix * basegfx::B2DPoint(0.5, 1.0); 
+    rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), HDL_LOWER, fShearX, fRotate));
+    aPos = aMatrix * basegfx::B2DPoint(1.0, 1.0); 
+    rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), HDL_LWRGT, fShearX, fRotate));
+}
+
 // eof

Modified: openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdomeas.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdomeas.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdomeas.cxx (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdomeas.cxx Wed Mar 19 10:14:42 2014
@@ -608,8 +608,9 @@ void SdrMeasureObj::UndirtyText() const
 		{
             rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_ROTA90BLANCS), EE_FEATURE_FIELD), ESelection(0,0));
             rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_VALUE), EE_FEATURE_FIELD),ESelection(0,1));
-            rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_UNIT), EE_FEATURE_FIELD),ESelection(0,2));
-            rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_ROTA90BLANCS), EE_FEATURE_FIELD),ESelection(0,3));
+            rOutliner.QuickInsertText(String(sal_Unicode(' ')), ESelection(0,2));
+            rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_UNIT), EE_FEATURE_FIELD),ESelection(0,3));
+            rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_ROTA90BLANCS), EE_FEATURE_FIELD),ESelection(0,4));
 
 			if(GetStyleSheet())
 				rOutliner.SetStyleSheet(0, GetStyleSheet());

Modified: openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdotext.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdotext.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdotext.cxx (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdotext.cxx Wed Mar 19 10:14:42 2014
@@ -655,7 +655,11 @@ void SdrTextObj::AdaptTextMinSize()
 
         if(bW || bH)
         {
-            SfxItemSet aSet(GetObjectItemSet());
+            SfxItemSet aSet(
+                *GetObjectItemSet().GetPool(),
+                SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
+                SDRATTR_TEXT_MINFRAMEWIDTH, SDRATTR_TEXT_AUTOGROWWIDTH, // contains SDRATTR_TEXT_MAXFRAMEWIDTH
+                0, 0);
 
             if(bW)
             {

Modified: openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdstr.src
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdstr.src?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdstr.src (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/svdraw/svdstr.src Wed Mar 19 10:14:42 2014
@@ -2337,7 +2337,7 @@ String SIP_SA_MEASUREDECIMALPLACES
 
 String SIP_SA_MEASURERESERVE05
 {
-	Text [ en-US ] = "Dimensioning reserved 5";
+	Text [ en-US ] = "Dimensioning reserved for 5";
 };
 
 String SIP_SA_MEASURERESERVE06

Modified: openoffice/branches/alg_writerframes/main/svx/source/table/cell.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/table/cell.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/table/cell.cxx (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/table/cell.cxx Wed Mar 19 10:14:42 2014
@@ -1439,7 +1439,7 @@ PropertyState SAL_CALL Cell::getProperty
 				case XATTR_FILLFLOATTRANSPARENCE:
 					{
 						NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((sal_uInt16)pMap->nWID);
-						if( ( pItem == NULL ) )
+						if( pItem == NULL )
 							eState = PropertyState_DEFAULT_VALUE;
 					}
 					break;

Modified: openoffice/branches/alg_writerframes/main/svx/source/tbxctrls/fontworkgallery.src
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/tbxctrls/fontworkgallery.src?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/tbxctrls/fontworkgallery.src (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/tbxctrls/fontworkgallery.src Wed Mar 19 10:14:42 2014
@@ -315,8 +315,7 @@ ModalDialog RID_SVX_MDLG_FONTWORK_CHARSP
 		Spin = TRUE ;
 		Maximum = 500 ;
 		StrictFormat = TRUE ;
-		Unit = FUNIT_CUSTOM ;
-        CustomUnitText = "%" ;
+		Unit = FUNIT_PERCENT ;
 		Last = 100 ;
 		SpinSize = 5 ;
 	};

Modified: openoffice/branches/alg_writerframes/main/svx/source/unodraw/unoshape.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/unodraw/unoshape.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/unodraw/unoshape.cxx (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/unodraw/unoshape.cxx Wed Mar 19 10:14:42 2014
@@ -1313,7 +1313,15 @@ void SAL_CALL SvxShape::setSize( const a
 
 	if( mpObj.is() && mpModel)
 	{
-		Rectangle aRect( svx_getLogicRectHack(mpObj.get()) );
+        // #123539# optimization for 3D chart object generation: do not use UNO
+        // API commmands to get the range, this is too expensive since for 3D
+        // scenes it may recalculate the whole scene since in AOO this depends
+        // on the contained geometry (layouted to show all content)
+        const bool b3DConstruction(dynamic_cast< E3dObject* >(mpObj.get()) && mpModel->isLocked());
+		Rectangle aRect( 
+            b3DConstruction ? 
+                Rectangle(maPosition.X, maPosition.Y, maSize.Width, maSize.Height) : 
+                svx_getLogicRectHack(mpObj.get()) );
 		Size aLocalSize( rSize.Width, rSize.Height );
 		ForceMetricToItemPoolMetric(aLocalSize);
 
@@ -2222,7 +2230,7 @@ beans::PropertyState SAL_CALL SvxShape::
 			case XATTR_FILLFLOATTRANSPARENCE:
 				{
 					NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((sal_uInt16)pMap->nWID);
-					if( ( pItem == NULL ) )
+					if( pItem == NULL )
 						eState = beans::PropertyState_DEFAULT_VALUE;
 				}
 				break;

Modified: openoffice/branches/alg_writerframes/main/svx/source/xml/xmlgrhlp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/xml/xmlgrhlp.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/xml/xmlgrhlp.cxx (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/xml/xmlgrhlp.cxx Wed Mar 19 10:14:42 2014
@@ -719,6 +719,10 @@ void SvXMLGraphicHelper::ImplInsertGraph
 					{
 						case( GFX_LINK_TYPE_EPS_BUFFER ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break;
 						case( GFX_LINK_TYPE_NATIVE_GIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break;
+
+                        // #15508# added BMP type for better exports (checked, works)
+                        case( GFX_LINK_TYPE_NATIVE_BMP ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".bmp" ) ); break;
+
 						case( GFX_LINK_TYPE_NATIVE_JPG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break;
 						case( GFX_LINK_TYPE_NATIVE_PNG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break;
 						case( GFX_LINK_TYPE_NATIVE_TIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break;

Modified: openoffice/branches/alg_writerframes/main/svx/source/xoutdev/_xoutbmp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/xoutdev/_xoutbmp.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/xoutdev/_xoutbmp.cxx (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/xoutdev/_xoutbmp.cxx Wed Mar 19 10:14:42 2014
@@ -203,6 +203,10 @@ sal_uInt16 XOutBitmap::WriteGraphic( con
 			    switch( aGfxLink.GetType() )
 			    {
 				    case( GFX_LINK_TYPE_NATIVE_GIF ): aExt = FORMAT_GIF; break;
+
+                    // #15508# added BMP type for better exports (no call/trigger found, prob used in HTML export)
+                    case( GFX_LINK_TYPE_NATIVE_BMP ): aExt = FORMAT_BMP; break;
+
 				    case( GFX_LINK_TYPE_NATIVE_JPG ): aExt = FORMAT_JPG; break;
 				    case( GFX_LINK_TYPE_NATIVE_PNG ): aExt = FORMAT_PNG; break;
 

Modified: openoffice/branches/alg_writerframes/main/svx/source/xoutdev/xattr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/source/xoutdev/xattr.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/svx/source/xoutdev/xattr.cxx (original)
+++ openoffice/branches/alg_writerframes/main/svx/source/xoutdev/xattr.cxx Wed Mar 19 10:14:42 2014
@@ -1478,6 +1478,7 @@ SfxItemPresentation XLineWidthItem::GetP
 		case SFX_ITEM_PRESENTATION_COMPLETE:
 			rText = GetMetricText( (long) GetValue(),
                                     eCoreUnit, ePresUnit, pIntl);
+			rText += sal_Unicode(' ');
 			rText += SVX_RESSTR( GetMetricId( ePresUnit) );
 			return ePres;
 		default:
@@ -2754,6 +2755,7 @@ SfxItemPresentation XLineStartWidthItem:
 		case SFX_ITEM_PRESENTATION_COMPLETE:
 			rText = GetMetricText( (long) GetValue(),
                                     eCoreUnit, ePresUnit, pIntl);
+			rText += sal_Unicode(' ');
 			rText += SVX_RESSTR( GetMetricId( ePresUnit) );
 			return ePres;
 		default:
@@ -2861,6 +2863,7 @@ SfxItemPresentation XLineEndWidthItem::G
 		case SFX_ITEM_PRESENTATION_COMPLETE:
 			rText = GetMetricText( (long) GetValue(),
                                     eCoreUnit, ePresUnit, pIntl);
+			rText += sal_Unicode(' ');
 			rText += SVX_RESSTR( GetMetricId( ePresUnit) );
 			return ePres;
 		default:

Modified: openoffice/branches/alg_writerframes/main/sw/inc/IDocumentContentOperations.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/IDocumentContentOperations.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/IDocumentContentOperations.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/IDocumentContentOperations.hxx Wed Mar 19 10:14:42 2014
@@ -138,7 +138,7 @@ public:
     /** Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel
     angemeldet sein.
     */
-    virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*) = 0;
+    virtual SwDrawFrmFmt* InsertDrawObj( const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet& rFlyAttrSet ) = 0;
 
     /** Einfuegen von OLE-Objecten.
     */

Modified: openoffice/branches/alg_writerframes/main/sw/inc/IDocumentMarkAccess.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/IDocumentMarkAccess.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/IDocumentMarkAccess.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/IDocumentMarkAccess.hxx Wed Mar 19 10:14:42 2014
@@ -193,6 +193,8 @@ class IDocumentMarkAccess
         */
         virtual void clearAllMarks() =0;
 
+        virtual void assureSortedMarkContainers() const = 0;
+
         /** returns a STL-like random access iterator to the begin of the sequence of marks.
         */
         virtual const_iterator_t getAllMarksBegin() const =0;
@@ -260,7 +262,7 @@ class IDocumentMarkAccess
         virtual const_iterator_t findAnnotationMark( const ::rtl::OUString& rName ) const = 0;
 
         // Returns the MarkType used to create the mark
-        static MarkType SAL_DLLPUBLIC_EXPORT GetType(const ::sw::mark::IMark& rMark);
+        static SAL_DLLPUBLIC_EXPORT MarkType GetType(const ::sw::mark::IMark& rMark);
 
         static SAL_DLLPUBLIC_EXPORT const ::rtl::OUString& GetCrossRefHeadingBookmarkNamePrefix();
         static SAL_DLLPUBLIC_EXPORT bool IsLegalPaMForCrossRefHeadingBookmark( const SwPaM& );

Modified: openoffice/branches/alg_writerframes/main/sw/inc/doc.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/doc.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/doc.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/doc.hxx Wed Mar 19 10:14:42 2014
@@ -891,7 +891,10 @@ public:
 						const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
 	virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj,	const SfxItemSet* pFlyAttrSet,
 						const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
-    virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*);
+    virtual SwDrawFrmFmt* InsertDrawObj(
+        const SwPaM &rRg,
+        SdrObject& rDrawObj,
+        const SfxItemSet& rFlyAttrSet );
     virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
 						const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
 
@@ -1498,18 +1501,32 @@ public:
 		// wie z.B. die ::com::sun::star::text::Bookmarks oder die Verzeichnisse.
 		// JP 22.06.95: ist bMoveCrsr gesetzt, verschiebe auch die Crsr
 
-		// Setzt alles in rOldNode auf rNewPos + Offset
-	void CorrAbs( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
-					const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
-		// Setzt alles im Bereich von [rStartNode, rEndNode] nach rNewPos
-	void CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode,
-					const SwPosition& rNewPos, sal_Bool bMoveCrsr = sal_False );
-		// Setzt alles im Bereich von rRange nach rNewPos
-	void CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos,
-					sal_Bool bMoveCrsr = sal_False );
-		// Setzt alles in rOldNode auf relative Pos
-	void CorrRel( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
-					const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
+    // Setzt alles in rOldNode auf rNewPos + Offset
+    void CorrAbs(
+        const SwNodeIndex& rOldNode,
+        const SwPosition& rNewPos,
+        const xub_StrLen nOffset = 0,
+        sal_Bool bMoveCrsr = sal_False );
+
+    // Setzt alles im Bereich von [rStartNode, rEndNode] nach rNewPos
+    void CorrAbs(
+        const SwNodeIndex& rStartNode,
+        const SwNodeIndex& rEndNode,
+        const SwPosition& rNewPos,
+        sal_Bool bMoveCrsr = sal_False );
+
+    // Setzt alles im Bereich von rRange nach rNewPos
+    void CorrAbs(
+        const SwPaM& rRange,
+        const SwPosition& rNewPos,
+        sal_Bool bMoveCrsr = sal_False );
+
+    // Setzt alles in rOldNode auf relative Pos
+    void CorrRel(
+        const SwNodeIndex& rOldNode,
+        const SwPosition& rNewPos,
+        const xub_StrLen nOffset = 0,
+        sal_Bool bMoveCrsr = sal_False );
 
 		// GliederungsRegeln erfragen / setzen
     // --> OD 2005-11-02 #i51089 - TUNING#
@@ -1529,44 +1546,29 @@ public:
 	sal_Bool GotoOutline( SwPosition& rPos, const String& rName ) const;
 	// die Aenderungen an den Gliederungsvorlagen in die OutlineRule uebernehmen
 
-		// setzt, wenn noch keine Numerierung, sonst wird geaendert
-		// arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
-    // --> OD 2005-02-18 #i42921# - re-use unused 3rd parameter
-    // --> OD 2008-02-08 #newlistlevelattrs#
-    // Add optional parameter <bResetIndentAttrs> - default value sal_False.
-    // If <bResetIndentAttrs> equals true, the indent attributes "before text"
-    // and "first line indent" are additionally reset at the provided PaM, if
-    // the list style makes use of the new list level attributes.
-    // --> OD 2008-03-17 #refactorlists#
-    // introduce parameters <bCreateNewList> and <sContinuedListId>
-    // <bCreateNewList> indicates, if a new list is created by applying the
-    // given list style.
+    // Optional parameter <bResetIndentAttrs> - default value false:
+    //  If <bResetIndentAttrs> equals true, the indent attributes "before text"
+    //  and "first line indent" are additionally reset at the provided PaM, if
+    //  the list style makes use of the new list level attributes.
+    // Parameters <bCreateNewList> and <sContinuedListId>:
+    //  <bCreateNewList> indicates, if a new list is created by applying the given list style.
+    //  If <bCreateNewList> equals false, <sContinuedListId> may contain the
+    //  list Id of a list, which has to be continued by applying the given list style
     void SetNumRule( const SwPaM&,
                      const SwNumRule&,
                      const bool bCreateNewList,
                      const String sContinuedListId = String(),
-                     sal_Bool bSetItem = sal_True,
+                     bool bSetItem = true,
                      const bool bResetIndentAttrs = false );
-    // <--
-    void SetCounted( const SwPaM&, bool bCounted);
 
-    // --> OD 2009-08-25 #i86492#
-    // no longer needed.
-    // SwDoc::SetNumRule( rPaM, rNumRule, false, <ListId>, sal_True, true ) have to be used instead.
-//    /**
-//       Replace numbering rules in a PaM by another numbering rule.
-
-//       \param rPaM         PaM to replace the numbering rules in
-//       \param rNumRule     numbering rule to replace the present numbering rules
-//     */
-//    void ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule);
+    void SetCounted( const SwPaM&, bool bCounted);
 
     void MakeUniqueNumRules(const SwPaM & rPaM);
 
 	void SetNumRuleStart( const SwPosition& rPos, sal_Bool bFlag = sal_True );
     void SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt );
 
-	SwNumRule* GetCurrNumRule( const SwPosition& rPos ) const;
+	SwNumRule* GetNumRuleAtPos( const SwPosition& rPos ) const;
 
     const SwNumRuleTbl& GetNumRuleTbl() const { return *pNumRuleTbl; }
 
@@ -2086,11 +2088,10 @@ public:
      */
     String GetPaMDescr(const SwPaM & rPaM) const;
 
-    // -> #i23726#
-    sal_Bool IsFirstOfNumRule(SwPosition & rPos);
-    // <- #i23726#
+    bool IsFirstOfNumRuleAtPos( const SwPosition & rPos );
 
-    // --> #i31958# access methods for XForms model(s)
+
+    // access methods for XForms model(s)
 
     /// access container for XForms model; will be NULL if !isXForms()
 	com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
@@ -2107,35 +2108,35 @@ public:
 
     void disposeXForms( );  // #i113606#, for disposing XForms
 
-    // --> OD 2006-03-21 #b6375613#
+
     inline bool ApplyWorkaroundForB6375613() const
     {
         return mbApplyWorkaroundForB6375613;
     }
     void SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 );
-    // <--
+
 
     //Update all the page masters
     void SetDefaultPageMode(bool bSquaredPageMode);
     sal_Bool IsSquaredPageMode() const;
 
-	// i#78591#
-	void Setn32DummyCompatabilityOptions1( sal_uInt32 CompatabilityOptions1 )
-	{
-		n32DummyCompatabilityOptions1 = CompatabilityOptions1;
-	}
-	sal_uInt32 Getn32DummyCompatabilityOptions1( )
-	{
-		return n32DummyCompatabilityOptions1;
-	}
-	void Setn32DummyCompatabilityOptions2( sal_uInt32 CompatabilityOptions2 )
-	{
-		n32DummyCompatabilityOptions2 = CompatabilityOptions2;
-	}
-	sal_uInt32 Getn32DummyCompatabilityOptions2( )
-	{
-		return n32DummyCompatabilityOptions2;
-	}
+
+    void Setn32DummyCompatabilityOptions1( const sal_uInt32 CompatabilityOptions1 )
+    {
+        n32DummyCompatabilityOptions1 = CompatabilityOptions1;
+    }
+    sal_uInt32 Getn32DummyCompatabilityOptions1()
+    {
+        return n32DummyCompatabilityOptions1;
+    }
+    void Setn32DummyCompatabilityOptions2( const sal_uInt32 CompatabilityOptions2 )
+    {
+        n32DummyCompatabilityOptions2 = CompatabilityOptions2;
+    }
+    sal_uInt32 Getn32DummyCompatabilityOptions2()
+    {
+        return n32DummyCompatabilityOptions2;
+    }
 #ifdef FUTURE_VBA
     com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > GetVbaEventProcessor();
 #endif

Modified: openoffice/branches/alg_writerframes/main/sw/inc/docsh.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/docsh.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/docsh.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/docsh.hxx Wed Mar 19 10:14:42 2014
@@ -120,8 +120,13 @@ class SW_DLLPUBLIC SwDocShell: public Sf
         const sal_Bool bBasic = sal_False );
 
 	SW_DLLPRIVATE sal_uInt16					Delete(const String &rName, sal_uInt16 nFamily);
-	SW_DLLPRIVATE sal_uInt16					ApplyStyles(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0,
-										sal_uInt16 nMode = 0 );
+
+    SW_DLLPRIVATE sal_uInt16 ApplyStyles(
+        const String &rName,
+        const sal_uInt16 nFamily,
+        SwWrtShell* pShell = 0,
+        const sal_uInt16 nMode = 0 );
+
 	SW_DLLPRIVATE sal_uInt16					DoWaterCan( const String &rName, sal_uInt16 nFamily);
 	SW_DLLPRIVATE sal_uInt16					UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0);
 	SW_DLLPRIVATE sal_uInt16					MakeByExample(const String &rName,
@@ -280,12 +285,6 @@ public:
 
     sal_Int16   GetUpdateDocMode() const {return nUpdateDocMode;}
 
-	//Activate wait cursor for all windows of this document
-	//Optionally all dispatcher could be Locked
-	//Usually locking should be done using the class: SwWaitObject!
-	void EnterWait( sal_Bool bLockDispatcher );
-	void LeaveWait( sal_Bool bLockDispatcher );
-
 	void ToggleBrowserMode(sal_Bool bOn, SwView* pView);
 
 	sal_uLong LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,

Modified: openoffice/branches/alg_writerframes/main/sw/inc/editsh.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/editsh.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/editsh.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/editsh.hxx Wed Mar 19 10:14:42 2014
@@ -430,59 +430,49 @@ public:
 	// Outlines and SubOutline are protected ?
 	sal_Bool IsProtectedOutlinePara() const;
 
-	// Numerierung Aufzaehlunglisten
-	// liefert Regelwerk der aktuellen Aufzaehlung (sal_False sonst)
-	const SwNumRule* GetCurNumRule() const;
-
-	// setzt, wenn noch keine Numerierung, sonst wird geaendert
-	// arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
-    // --> OD 2008-02-08 #newlistlevelattrs#
-    // Add optional parameter <bResetIndentAttrs> (default value sal_False).
-    // If <bResetIndentAttrs> equals true, the indent attributes "before text"
-    // and "first line indent" are additionally reset at the current selection,
-    // if the list style makes use of the new list level attributes.
-    // --> OD 2008-03-17 #refactorlists#
-    // introduce parameters <bCreateNewList> and <sContinuedListId>
-    // <bCreateNewList> indicates, if a new list is created by applying the
-    // given list style.
-    // If <bCreateNewList> equals sal_False, <sContinuedListId> may contain the
-    // list Id of a list, which has to be continued by applying the given list style
+
+    const SwNumRule* GetNumRuleAtCurrCrsrPos() const;
+
+    // Returns the numbering rule found at the paragraphs of the current selection,
+    // if all paragraphs of the current selection have the same or none numbering rule applied.
+    const SwNumRule* GetNumRuleAtCurrentSelection() const;
+
+    // Optional parameter <bResetIndentAttrs> (default value sal_False).
+    //  If <bResetIndentAttrs> equals true, the indent attributes "before text"
+    //  and "first line indent" are additionally reset at the current selection,
+    //  if the list style makes use of the new list level attributes.
+    // Parameters <bCreateNewList> and <sContinuedListId>
+    //  <bCreateNewList> indicates, if a new list is created by applying the given list style.
+    //  If <bCreateNewList> equals false, <sContinuedListId> may contain the
+    //  list Id of a list, which has to be continued by applying the given list style
     void SetCurNumRule( const SwNumRule&,
                         const bool bCreateNewList /*= false*/,
                         const String sContinuedListId = String(),
                         const bool bResetIndentAttrs = false );
-    // <--
-	// Absaetze ohne Numerierung, aber mit Einzuegen
-	sal_Bool NoNum();
-	// Loeschen, Splitten der Aufzaehlungsliste
+
+    // Absaetze ohne Numerierung, aber mit Einzuegen
+    sal_Bool NoNum();
+    // Loeschen, Splitten der Aufzaehlungsliste
     void DelNumRules();
-	// Hoch-/Runterstufen
-	sal_Bool NumUpDown( sal_Bool bDown = sal_True );
-	// Hoch-/Runtermoven sowohl innerhalb als auch ausserhalb von Numerierungen
-	sal_Bool MoveParagraph( long nOffset = 1);
-	sal_Bool MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft );
-	// No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
-	sal_Bool NumOrNoNum( sal_Bool bDelete = sal_False, sal_Bool bChkStart = sal_True);
+    // Hoch-/Runterstufen
+    sal_Bool NumUpDown( sal_Bool bDown = sal_True );
+    // Hoch-/Runtermoven sowohl innerhalb als auch ausserhalb von Numerierungen
+    sal_Bool MoveParagraph( long nOffset = 1 );
+    sal_Bool MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft );
+    // No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
+    sal_Bool NumOrNoNum( sal_Bool bDelete = sal_False, sal_Bool bChkStart = sal_True );
     // -> #i23726#
-    // --> OD 2008-06-09 #i90078#
-    // Remove unused default parameter <nLevel> and <bRelative>.
-    // Adjust method name and parameter name
-    void ChangeIndentOfAllListLevels( short nDiff );
-    // Adjust method name
+
+    void ChangeIndentOfAllListLevels( const short nDiff );
     void SetIndent(short nIndent, const SwPosition & rPos);
-    // <--
-    sal_Bool IsFirstOfNumRule() const;
-    sal_Bool IsFirstOfNumRule(const SwPaM & rPaM) const;
-    // <- #i23726#
+    bool IsFirstOfNumRuleAtCrsrPos() const;
 
     sal_Bool IsNoNum( sal_Bool bChkStart = sal_True ) const;
 	// returne den Num-Level des Nodes, in dem sich der Point vom
 	// Cursor befindet. Return kann sein :
 	// - NO_NUMBERING, 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
-    // --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
-//    sal_uInt8 GetNumLevel( sal_Bool* pHasChilds = 0 ) const;
     sal_uInt8 GetNumLevel() const;
-    // <--
+
     // detect highest and lowest level to check moving of outline levels
     void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
 

Modified: openoffice/branches/alg_writerframes/main/sw/inc/expfld.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/expfld.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/expfld.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/expfld.hxx Wed Mar 19 10:14:42 2014
@@ -327,6 +327,9 @@ class SW_DLLPUBLIC SwInputField : public
     // Accessing Input Field's content
     const String& getContent() const;
 
+    void LockNotifyContentChange();
+    void UnlockNotifyContentChange();
+
 public:
     // Direkte Eingabe ueber Dialog alten Wert loeschen
     SwInputField(

Modified: openoffice/branches/alg_writerframes/main/sw/inc/fesh.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/fesh.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/fesh.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/fesh.hxx Wed Mar 19 10:14:42 2014
@@ -536,7 +536,7 @@ public:
 	sal_Bool GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const;
 
 	void Paste( SvStream& rStm, sal_uInt16 nAction, const Point* pPt = 0 );
-	sal_Bool Paste( const Graphic &rGrf );
+	bool Paste( const Graphic &rGrf, const String& rURL );
 	sal_Bool Paste( SotDataObject& rObj, const Point& rPt );
 
 	sal_Bool IsAlignPossible() const;

Modified: openoffice/branches/alg_writerframes/main/sw/inc/fmtinfmt.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/fmtinfmt.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/fmtinfmt.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/fmtinfmt.hxx Wed Mar 19 10:14:42 2014
@@ -38,15 +38,15 @@ class SW_DLLPUBLIC SwFmtINetFmt: public 
 {
 	friend class SwTxtINetFmt;
 
-	String aURL;					// die URL
-	String aTargetFrame;			// in diesen Frame soll die URL
-	String aINetFmt;
-	String aVisitedFmt;
-	String aName;					// Name des Links
-	SvxMacroTableDtor* pMacroTbl;
-	SwTxtINetFmt* pTxtAttr;			// mein TextAttribut
-	sal_uInt16 nINetId;
-	sal_uInt16 nVisitedId;
+	String msURL;					// die URL
+	String msTargetFrame;			// in diesen Frame soll die URL
+	String msINetFmtName;
+	String msVisitedFmtName;
+	String msHyperlinkName;					// Name des Links
+	SvxMacroTableDtor* mpMacroTbl;
+	SwTxtINetFmt* mpTxtAttr;			// mein TextAttribut
+	sal_uInt16 mnINetFmtId;
+	sal_uInt16 mnVisitedFmtId;
 public:
 	SwFmtINetFmt( const String& rURL, const String& rTarget );
 	SwFmtINetFmt( const SwFmtINetFmt& rAttr );
@@ -70,34 +70,81 @@ public:
 										sal_uInt8 nMemberId = 0 );
 
 
-	const SwTxtINetFmt* GetTxtINetFmt() const	{ return pTxtAttr; }
-	SwTxtINetFmt* GetTxtINetFmt()				{ return pTxtAttr; }
-
-	const String& GetValue() const 			{ return aURL; }
-
-	const String& GetName() const 			{ return aName; }
-	void SetName( const String& rNm )		{ aName = rNm; }
-
-	const String& GetTargetFrame() const 	{ return aTargetFrame; }
-
-	const String& GetINetFmt() const		{ return aINetFmt; }
-	void SetINetFmt( const String& rNm )	{ aINetFmt = rNm; }
-
-	const String& GetVisitedFmt() const		{ return aVisitedFmt; }
-	void SetVisitedFmt( const String& rNm )	{ aVisitedFmt = rNm; }
-
-	sal_uInt16 GetINetFmtId() const				{ return nINetId; }
-	void SetINetFmtId( sal_uInt16 nNew )		{ nINetId = nNew; }
-
-	sal_uInt16 GetVisitedFmtId() const			{ return nVisitedId; }
-	void SetVisitedFmtId( sal_uInt16 nNew )		{ nVisitedId = nNew; }
+	const SwTxtINetFmt* GetTxtINetFmt() const
+	{
+	    return mpTxtAttr;
+	}
+	SwTxtINetFmt* GetTxtINetFmt()
+	{
+	    return mpTxtAttr;
+	}
+
+	const String& GetValue() const
+	{
+	    return msURL;
+	}
+
+	const String& GetName() const
+	{
+	    return msHyperlinkName;
+	}
+	void SetName( const String& rNm )
+	{
+	    msHyperlinkName = rNm;
+	}
+
+	const String& GetTargetFrame() const
+	{
+	    return msTargetFrame;
+	}
+
+    void SetINetFmtAndId(
+            const String& rNm,
+            const sal_uInt16 nId )
+    {
+        msINetFmtName = rNm;
+        mnINetFmtId = nId;
+    }
+
+    const String& GetINetFmt() const
+    {
+        return msINetFmtName;
+    }
+
+    sal_uInt16 GetINetFmtId() const
+    {
+        return mnINetFmtId;
+    }
+
+    void SetVisitedFmtAndId(
+            const String& rNm,
+            const sal_uInt16 nId )
+    {
+        msVisitedFmtName = rNm;
+        mnVisitedFmtId = nId;
+    }
+
+    const String& GetVisitedFmt() const
+    {
+        return msVisitedFmtName;
+    }
+
+    sal_uInt16 GetVisitedFmtId() const
+    {
+        return mnVisitedFmtId;
+    }
 
 	// setze eine neue oder loesche die akt. MakroTabelle
 	void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
-	const SvxMacroTableDtor* GetMacroTbl() const	{ return pMacroTbl; }
+	const SvxMacroTableDtor* GetMacroTbl() const
+	{
+	    return mpMacroTbl;
+	}
 
 	// setze / erfrage ein Makro
-	void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
+	void SetMacro(
+	        sal_uInt16 nEvent,
+	        const SvxMacro& rMacro );
 	const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
 };
 

Modified: openoffice/branches/alg_writerframes/main/sw/inc/ndtxt.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/ndtxt.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/ndtxt.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/ndtxt.hxx Wed Mar 19 10:14:42 2014
@@ -794,9 +794,7 @@ public:
     bool IsNotifiable() const;
 
     void SetListRestart( bool bRestart );
-    // --> OD 2005-11-02 #i51089 - TUNING#
     bool IsListRestart() const;
-    // <--
 
     void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
     bool HasAttrListRestartValue() const;

Modified: openoffice/branches/alg_writerframes/main/sw/inc/pam.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/pam.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/pam.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/pam.hxx Wed Mar 19 10:14:42 2014
@@ -253,7 +253,7 @@ public:
 
 	// steht in etwas geschuetztem oder in die Selektion umspannt
 	// etwas geschuetztes.
-    sal_Bool HasReadonlySel( bool bFormView ) const;
+    sal_Bool HasReadonlySel( const bool bFormView ) const;
 
     sal_Bool ContainsPosition(const SwPosition & rPos)
     { return *Start() <= rPos && rPos <= *End(); }

Modified: openoffice/branches/alg_writerframes/main/sw/inc/swwait.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/swwait.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/swwait.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/swwait.hxx Wed Mar 19 10:14:42 2014
@@ -26,15 +26,28 @@
 #include <tools/solar.h>
 #include "swdllapi.h"
 
+#include <hash_set>
+
 class SwDocShell;
+class SfxDispatcher;
 
 class SW_DLLPUBLIC SwWait
 {
-	SwDocShell &rDoc;
-	sal_Bool		bLock;
 public:
-	SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher );
+    // Activate wait cursor for all windows of given document <rDocShell>
+    // Optional all dispatcher could be Locked
+    SwWait(
+        SwDocShell &rDocShell,
+        const bool bLockUnlockDispatcher );
 	~SwWait();
+
+private:
+    void EnterWaitAndLockDispatcher();
+    void LeaveWaitAndUnlockDispatcher();
+
+    SwDocShell& mrDoc;
+    const bool mbLockUnlockDispatcher;
+    std::unordered_set< SfxDispatcher* > mpLockedDispatchers;
 };
 
 #endif

Modified: openoffice/branches/alg_writerframes/main/sw/inc/txtfld.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/inc/txtfld.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/inc/txtfld.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/inc/txtfld.hxx Wed Mar 19 10:14:42 2014
@@ -86,6 +86,8 @@ public:
 
     virtual xub_StrLen* GetEnd();
 
+    void LockNotifyContentChange();
+    void UnlockNotifyContentChange();
     virtual void NotifyContentChange( SwFmtFld& rFmtFld );
 
     void UpdateTextNodeContent( const String& rNewContent );
@@ -95,6 +97,8 @@ public:
 
 private:
     xub_StrLen m_nEnd;
+
+    bool m_bLockNotifyContentChange;
 };
 
 #endif

Modified: openoffice/branches/alg_writerframes/main/sw/sdi/_basesh.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/sdi/_basesh.sdi?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/sdi/_basesh.sdi (original)
+++ openoffice/branches/alg_writerframes/main/sw/sdi/_basesh.sdi Wed Mar 19 10:14:42 2014
@@ -37,7 +37,6 @@ interface BaseTextSelection
 		ExecMethod = ExecDelete ;
 		StateMethod = GetState ;
 		FastCall = FALSE ;
-		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
 	]
 
 	FN_BACKSPACE  // status(final|play)
@@ -45,7 +44,6 @@ interface BaseTextSelection
 		ExecMethod = ExecDelete ;
 		StateMethod = GetState ;
 		FastCall = FALSE ;
-		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
 	]
 
 	FN_SHIFT_BACKSPACE // status()

Modified: openoffice/branches/alg_writerframes/main/sw/sdi/_textsh.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/sdi/_textsh.sdi?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/sdi/_textsh.sdi (original)
+++ openoffice/branches/alg_writerframes/main/sw/sdi/_textsh.sdi Wed Mar 19 10:14:42 2014
@@ -240,12 +240,13 @@ interface BaseText
         StateMethod = GetState ;
         DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
     ]
+
     FN_INSERT_BREAK // status(final|play)
-	[
-		ExecMethod = ExecInsert ;
-		StateMethod = GetState ;
-		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
-	]
+    [
+        ExecMethod = ExecInsert ;
+        StateMethod = GetState ;
+    ]
+
 	FN_INSERT_PAGEBREAK // status(final|play)
 	[
 		ExecMethod = ExecInsert ;

Modified: openoffice/branches/alg_writerframes/main/sw/sdi/drawsh.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/sdi/drawsh.sdi?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/sdi/drawsh.sdi (original)
+++ openoffice/branches/alg_writerframes/main/sw/sdi/drawsh.sdi Wed Mar 19 10:14:42 2014
@@ -395,9 +395,11 @@ interface TextDraw : TextDrawBase
         StateMethod = GetState ;
     ]   
     SID_INSERT_GRAPHIC
-	[
-		StateMethod = StateDisableItems ;
-	]
+    [
+        // #123922# Add Exec and State methods for the case where Graphic DrawObjects are selected (SdrGrafObj)
+        ExecMethod = Execute ;
+        StateMethod = GetState ;
+    ]
 	SID_TWAIN_SELECT
 	[
 		StateMethod = StateDisableItems ;

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/access/accpara.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/access/accpara.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/access/accpara.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/access/accpara.cxx Wed Mar 19 10:14:42 2014
@@ -1902,11 +1902,11 @@ uno::Sequence<PropertyValue> SwAccessibl
 		{		
 			aValues.realloc( aValues.getLength() + 1 );
 			pValues = aValues.getArray();
-			rValue = pValues[aValues.getLength() - 1];
-			rValue.Name = OUString::createFromAscii("FieldType");
-			rValue.Value <<= rtl::OUString(strTypeName.ToLowerAscii());
-			rValue.Handle = -1;
-			rValue.State = PropertyState_DIRECT_VALUE;
+			PropertyValue& rValueFT = pValues[aValues.getLength() - 1];
+			rValueFT.Name = OUString::createFromAscii("FieldType");
+			rValueFT.Value <<= rtl::OUString(strTypeName.ToLowerAscii());
+			rValueFT.Handle = -1;
+			rValueFT.State = PropertyState_DIRECT_VALUE;
 		}
 
 		//sort property values
@@ -2372,9 +2372,6 @@ void SwAccessibleParagraph::_getSuppleme
 
 	tAccParaPropValMap aSupplementalAttrSeq;
     {
-//        const SfxItemPropertySet& rPropSet =
-//                    aSwMapProvider.GetPropertyMap( PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE );
-//        const SfxItemPropertyMap* pPropMap( rPropSet.getPropertyMap() );
         const SfxItemPropertyMapEntry* pPropMap( 
                 aSwMapProvider.GetPropertyMapEntries( PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE ) );
         while ( pPropMap->pName )
@@ -3419,14 +3416,6 @@ sal_Int32 SAL_CALL SwAccessibleParagraph
 			nCount++;
 	}
 
-	/* Can't fin the function "GetTOCFirstWordEndIndex" declaration in sym2.0 (Added by yanjun)
-	if( GetTOXSortTabBase()  )
-	{
-		SwTxtNode* pNode = const_cast<SwTxtNode*>(GetTxtNode());	
-		if(pNode && pNode->GetTOCFirstWordEndIndex() > 0)
-			nCount++; 
-	}
-	*/
 	return nCount;
 }
 
@@ -3455,8 +3444,6 @@ uno::Reference< XAccessibleHyperlink > S
 		pNode = const_cast<SwTxtNode*>(GetTxtNode());
 	}
 	nTOCEndIndex = -1;
-	//if(pNode)
-	//	nTOCEndIndex = pNode->GetTOCFirstWordEndIndex();
 	SwTxtAttr* pHt = (SwTxtAttr*)(aHIter.next());
 	while( (nLinkIndex < getHyperLinkCount()) && nTIndex < nLinkIndex)
 	{
@@ -3674,14 +3661,6 @@ sal_Int32 SAL_CALL SwAccessibleParagraph
 		if( pHt )
 			nRet = nPos;
 	}
-	/* Added by yanjun for acc miagration
-	if( nRet == -1 && GetTOXSortTabBase() )
-	{
-		SwTxtNode* pNode = const_cast<SwTxtNode*>(GetTxtNode());	
-		if( nCharIndex >= 0 && nCharIndex < pNode->GetTOCFirstWordEndIndex())
-			nRet = 0;
-	}
-	*/
 
 	if (nRet == -1)
 		throw lang::IndexOutOfBoundsException();
@@ -4254,45 +4233,6 @@ sal_Int16 SAL_CALL SwAccessibleParagraph
 	}
 }
 
-// End Add
-
-
-/* This funcion is already defined in accpara.cxx(Added by yanjun)
-sal_Int32 SAL_CALL SwAccessibleParagraph::getBackground() 
-		throw (::com::sun::star::uno::RuntimeException)
-{
-// Test Code
-//     Sequence<OUString> seNames(1);
-//     OUString* pStrings = seNames.getArray();
-// 	pStrings[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("ParaBackColor"));
-// 
-//     Sequence<Any> aAnys(1);
-// 	Reference<XMultiPropertySet> xPortion = CreateUnoPortion( 0, 0 );
-//     aAnys = xPortion->getPropertyValues( seNames );
-// 	const Any* pAnys = aAnys.getConstArray();
-// 
-// 	sal_uInt32 crColorT=0;
-// 	pAnys[0] >>= crColorT;
-// End Test Code
-
-	const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground();
-	sal_uInt32 crBack = rBack.GetColor().GetColor();
-	
-	if (COL_AUTO == crBack)
-	{
-		Reference<XAccessible> xAccDoc = getAccessibleParent();
-		if (xAccDoc.is())
-		{
-			Reference<XAccessibleComponent> xCompoentDoc(xAccDoc,UNO_QUERY);
-			if (xCompoentDoc.is())
-			{
-				crBack = (sal_uInt32)xCompoentDoc->getBackground();
-			}
-		}
-	}
-	return crBack;
-}
-*/
 
 //Get the real heading level, Heading1 ~ Heading10
 sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel()
@@ -4303,8 +4243,7 @@ sal_Int32 SwAccessibleParagraph::GetReal
     ::rtl::OUString sValue;
 	if (styleAny >>= sValue)
 	{
-		//Modified by yanjun for acc migration
-		sal_Int32 length = sValue.getLength/*GetCharCount*/();
+		sal_Int32 length = sValue.getLength();
 		if (length == 9 || length == 10)
 		{
             ::rtl::OUString headStr = sValue.copy(0, 7);

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/access/accpara.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/access/accpara.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/access/accpara.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/access/accpara.hxx Wed Mar 19 10:14:42 2014
@@ -55,7 +55,7 @@ namespace rtl { class OUString; }
 namespace com { namespace sun { namespace star {
     namespace i18n { struct Boundary; }
     namespace accessibility { class XAccessibleHyperlink; }
-    namespace style { class TabStop; }
+    namespace style { struct TabStop; }
 } } }
 
 typedef ::std::hash_map< ::rtl::OUString,

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/bastyp/index.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/bastyp/index.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/bastyp/index.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/bastyp/index.cxx Wed Mar 19 10:14:42 2014
@@ -357,15 +357,17 @@ SwIndexReg::~SwIndexReg()
 }
 
 
-
-void SwIndexReg::Update( SwIndex const & rIdx, const xub_StrLen nDiff,
-    const bool bNeg, const bool /* argument is only used in derived class*/ )
+void SwIndexReg::Update(
+    SwIndex const & rIdx,
+    const xub_StrLen nDiff,
+    const bool bNeg,
+    const bool /* argument is only used in derived class*/ )
 {
     SwIndex* pStt = const_cast<SwIndex*>(&rIdx);
-	xub_StrLen nNewVal = rIdx.nIndex;
+	const xub_StrLen nNewVal = rIdx.nIndex;
 	if( bNeg )
 	{
-		xub_StrLen nLast = rIdx.GetIndex() + nDiff;
+		const xub_StrLen nLast = rIdx.GetIndex() + nDiff;
 		while( pStt && pStt->nIndex == nNewVal )
 		{
 			pStt->nIndex = nNewVal;

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/crsr/annotationmark.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/crsr/annotationmark.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/crsr/annotationmark.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/crsr/annotationmark.cxx Wed Mar 19 10:14:42 2014
@@ -60,6 +60,7 @@ namespace sw { namespace mark
         SwTxtFld* pTxtFld =
             GetMarkEnd().nNode.GetNode().GetTxtNode()->GetFldTxtAttrAt(
             GetMarkEnd().nContent.GetIndex()-1, true );
+        ASSERT( pTxtFld != NULL, "<AnnotationMark::InitDoc(..)> - missing text attribute for annotation field!" );
         if ( pTxtFld != NULL )
         {
             const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pTxtFld->GetFmtFld().GetField());

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/crsr/bookmrk.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/crsr/bookmrk.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/crsr/bookmrk.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/crsr/bookmrk.cxx Wed Mar 19 10:14:42 2014
@@ -74,25 +74,29 @@ namespace
         const sal_Unicode aStartMark,
         const sal_Unicode aEndMark)
     {
-        SwPosition& rStart = pField->GetMarkStart();
-        SwPosition& rEnd = pField->GetMarkEnd();
-        SwTxtNode const*const pStartTxtNode =
-            rStart.nNode.GetNode().GetTxtNode();
-        SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
-        const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex());
-        const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar(rEnd.nContent.GetIndex()-1);
-        SwPaM aStartPaM(rStart);
-        SwPaM aEndPaM(rEnd);
         io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
+
+        SwPosition rStart = pField->GetMarkStart();
+        SwTxtNode const*const pStartTxtNode = rStart.nNode.GetNode().GetTxtNode();
+        const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex());
         if(ch_start != aStartMark)
         {
+            SwPaM aStartPaM(rStart);
             io_pDoc->InsertString(aStartPaM, aStartMark);
             rStart.nContent--;
+            pField->SetMarkStartPos( rStart );
         }
+
+        const SwPosition& rEnd = pField->GetMarkEnd();
+        SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
+        const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar(rEnd.nContent.GetIndex()-1);
         if ( aEndMark && ( ch_end != aEndMark ) && ( rStart != rEnd ) )
         {
+            SwPaM aEndPaM(rEnd);
             io_pDoc->InsertString(aEndPaM, aEndMark);
         }
+
+
         io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, NULL);
     };
 
@@ -101,29 +105,31 @@ namespace
         const sal_Unicode aStartMark,
         const sal_Unicode aEndMark)
     {
-        SwPosition& rStart = pField->GetMarkStart();
-        SwPosition& rEnd = pField->GetMarkEnd();
+        io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
+
+        const SwPosition& rStart = pField->GetMarkStart();
         SwTxtNode const*const pStartTxtNode = rStart.nNode.GetNode().GetTxtNode();
-        SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
         const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex());
-        xub_StrLen nEndPos = ( rEnd == rStart ||  rEnd.nContent.GetIndex() == 0 ) ?
-            rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1;
-        const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar( nEndPos );
-        SwPaM aStartPaM(rStart);
-        SwPaM aEndPaM(rEnd);
-        io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
         if( ch_start == aStartMark )
         {
             SwPaM aStart(rStart, rStart);
             aStart.End()->nContent++;
             io_pDoc->DeleteRange(aStart);
         }
+
+        const SwPosition& rEnd = pField->GetMarkEnd();
+        SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
+        const xub_StrLen nEndPos = ( rEnd == rStart ||  rEnd.nContent.GetIndex() == 0 )
+                                   ? rEnd.nContent.GetIndex()
+                                   : rEnd.nContent.GetIndex() - 1;
+        const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar( nEndPos );
         if ( ch_end == aEndMark )
         {
             SwPaM aEnd(rEnd, rEnd);
             aEnd.Start()->nContent--;
             io_pDoc->DeleteRange(aEnd);
         }
+
         io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, NULL);
     };
 }
@@ -315,6 +321,22 @@ namespace sw { namespace mark
             SetOtherMarkPos(GetMarkPos());
     }
 
+    void Fieldmark::SetMarkStartPos( const SwPosition& rNewStartPos )
+    {
+        if ( GetMarkPos( ) <= GetOtherMarkPos( ) )
+            return SetMarkPos( rNewStartPos );
+        else
+            return SetOtherMarkPos( rNewStartPos );
+    }
+
+    void Fieldmark::SetMarkEndPos( const SwPosition& rNewEndPos )
+    {
+        if ( GetMarkPos( ) <= GetOtherMarkPos( ) )
+            return SetOtherMarkPos( rNewEndPos );
+        else
+            return SetMarkPos( rNewEndPos );
+    }
+
     rtl::OUString Fieldmark::ToString( ) const
     {
         rtl::OUStringBuffer buf;
@@ -363,7 +385,9 @@ namespace sw { namespace mark
 
         // For some reason the end mark is moved from 1 by the Insert: we don't
         // want this for checkboxes
-        this->GetMarkEnd( ).nContent--;
+        SwPosition aNewEndPos = this->GetMarkEnd();
+        aNewEndPos.nContent--;
+        SetMarkEndPos( aNewEndPos );
     }
     void CheckboxFieldmark::SetChecked(bool checked)
     {

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/crsr/crossrefbookmark.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/crsr/crossrefbookmark.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/crsr/crossrefbookmark.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/crsr/crossrefbookmark.cxx Wed Mar 19 10:14:42 2014
@@ -58,7 +58,7 @@ namespace sw { namespace mark
         MarkBase::SetMarkPos(rNewPos);
     }
 
-    SwPosition& CrossRefBookmark::GetOtherMarkPos() const
+    const SwPosition& CrossRefBookmark::GetOtherMarkPos() const
     {
         OSL_PRECOND(false,
             "<SwCrossRefBookmark::GetOtherMarkPos(..)>"

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/crsr/crsrsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/crsr/crsrsh.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/crsr/crsrsh.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/crsr/crsrsh.cxx Wed Mar 19 10:14:42 2014
@@ -2429,9 +2429,7 @@ sal_Bool SwCrsrShell::IsOverReadOnlyPos(
 	Point aPt( rPt );
 	SwPaM aPam( *pCurCrsr->GetPoint() );
     GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt );
-    // --> FME 2004-06-29 #114856# Formular view
     return aPam.HasReadonlySel( GetViewOptions()->IsFormView() );
-    // <--
 }
 
 
@@ -3058,32 +3056,30 @@ void SwCrsrShell::SetReadOnlyAvailable( 
 
 sal_Bool SwCrsrShell::HasReadonlySel() const
 {
-	sal_Bool bRet = sal_False;
-	if( IsReadOnlyAvailable() ||
-        // --> FME 2004-06-29 #114856# Formular view
-        GetViewOptions()->IsFormView() )
-        // <--
-	{
-		if( pTblCrsr )
-			bRet = pTblCrsr->HasReadOnlyBoxSel() ||
-                   pTblCrsr->HasReadonlySel(
-                            // --> FME 2004-06-29 #114856# Formular view
-                            GetViewOptions()->IsFormView() );
-                            // <--
+    sal_Bool bRet = sal_False;
+    if ( IsReadOnlyAvailable() || GetViewOptions()->IsFormView() )
+    {
+        if ( pTblCrsr != NULL )
+        {
+            bRet = pTblCrsr->HasReadOnlyBoxSel()
+                   || pTblCrsr->HasReadonlySel( GetViewOptions()->IsFormView() );
+        }
         else
-		{
-			const SwPaM* pCrsr = pCurCrsr;
+        {
+            const SwPaM* pCrsr = pCurCrsr;
 
-			do {
-                if( pCrsr->HasReadonlySel(
-                        // --> FME 2004-06-29 #114856# Formular view
-                        GetViewOptions()->IsFormView() ) )
-                        // <--
-					bRet = sal_True;
-			} while( !bRet && pCurCrsr != ( pCrsr = (SwPaM*)pCrsr->GetNext() ));
-		}
-	}
-	return bRet;
+            do
+            {
+                if ( pCrsr->HasReadonlySel( GetViewOptions()->IsFormView() ) )
+                {
+                    bRet = sal_True;
+                }
+
+                pCrsr = (SwPaM*)pCrsr->GetNext();
+            } while ( !bRet && pCrsr != pCurCrsr );
+        }
+    }
+    return bRet;
 }
 
 sal_Bool SwCrsrShell::IsSelFullPara() const

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/crsr/pam.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/crsr/pam.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/crsr/pam.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/crsr/pam.cxx Wed Mar 19 10:14:42 2014
@@ -671,74 +671,80 @@ const SwFrm* lcl_FindEditInReadonlyFrm( 
 
 // steht in etwas geschuetztem oder in die Selektion umspannt
 // etwas geschuetztes.
-sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
+sal_Bool SwPaM::HasReadonlySel( const bool bFormView ) const
 {
     sal_Bool bRet = sal_False;
-    Point aTmpPt;
-    const SwCntntNode *pNd;
-    const SwCntntFrm *pFrm;
 
-    if( 0 != ( pNd = GetPoint()->nNode.GetNode().GetCntntNode() ))
+    const SwCntntNode* pNd = GetPoint()->nNode.GetNode().GetCntntNode();
+    const SwCntntFrm *pFrm = NULL;
+    if ( pNd != NULL )
+    {
+        Point aTmpPt;
         pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), &aTmpPt, GetPoint(), sal_False );
-    else
-        pFrm = 0;
+    }
 
-    // --> FME 2004-06-29 #114856# Formular view
-    // Will be set if point/mark are inside edit-in-readonly environment
-    const SwFrm* pSttEIRFrm = 0;
-    const SwFrm* pEndEIRFrm = 0;
-
-    if( pFrm && ( pFrm->IsProtected() ||
-                  // --> FME 2004-06-29 #114856# Formular view
-                  ( bFormView &&
-                     0 == ( pSttEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
-                  // <--
+    // Will be set if point are inside edit-in-readonly environment
+    const SwFrm* pPointEditInReadonlyFrm = NULL;
+    if ( pFrm != NULL
+         && ( pFrm->IsProtected()
+              || ( bFormView
+                   && 0 == ( pPointEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
+    {
         bRet = sal_True;
-    else if( pNd )
+    }
+    else if( pNd != NULL )
     {
         const SwSectionNode* pSNd = pNd->GetSectionNode();
-        if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
-                      // --> FME 2004-06-29 #114856# Formular view
-                      (bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
-                      // <--
+        if ( pSNd != NULL
+             && ( pSNd->GetSection().IsProtectFlag()
+                  || ( bFormView
+                       && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
+        {
             bRet = sal_True;
+        }
     }
 
-    if( !bRet && HasMark() && GetPoint()->nNode != GetMark()->nNode )
-    {
-        if( 0 != ( pNd = GetMark()->nNode.GetNode().GetCntntNode() ))
+    if ( !bRet
+         && HasMark()
+         && GetPoint()->nNode != GetMark()->nNode )
+    {
+        pNd = GetMark()->nNode.GetNode().GetCntntNode();
+        pFrm = NULL;
+        if ( pNd != NULL )
+        {
+            Point aTmpPt;
             pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), &aTmpPt, GetMark(), sal_False );
-        else
-            pFrm = 0;
+        }
 
-        if( pFrm && ( pFrm->IsProtected() ||
-                  // --> FME 2004-06-29 #114856# Formular view
-                  ( bFormView &&
-                     0 == ( pEndEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
-                  // <--
+        const SwFrm* pMarkEditInReadonlyFrm = NULL;
+        if ( pFrm != NULL
+             && ( pFrm->IsProtected()
+                  || ( bFormView
+                       && 0 == ( pMarkEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
+        {
             bRet = sal_True;
-        else if( pNd )
+        }
+        else if( pNd != NULL )
         {
             const SwSectionNode* pSNd = pNd->GetSectionNode();
-            if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
-                          // --> FME 2004-06-29 #114856# Formular view
-                          (bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
-                          // <--
+            if ( pSNd != NULL
+                 && ( pSNd->GetSection().IsProtectFlag()
+                      || ( bFormView
+                           && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
+            {
                 bRet = sal_True;
+            }
         }
 
-        // --> FME 2004-06-29 #114856# Formular view
         if ( !bRet && bFormView )
         {
            // Check if start and end frame are inside the _same_
            // edit-in-readonly-environment. Otherwise we better return 'true'
-           if ( pSttEIRFrm != pEndEIRFrm )
+           if ( pPointEditInReadonlyFrm != pMarkEditInReadonlyFrm )
                 bRet = sal_True;
         }
-        // <--
 
-        // oder sollte eine geschuetzte Section innerhalb der
-        // Selektion liegen?
+        // check for protected section inside the selection
         if( !bRet )
         {
             sal_uLong nSttIdx = GetMark()->nNode.GetIndex(),
@@ -767,15 +773,6 @@ sal_Bool SwPaM::HasReadonlySel( bool bFo
                         if( nSttIdx <= nIdx && nEndIdx >= nIdx &&
                             rCntnt.GetCntntIdx()->GetNode().GetNodes().IsDocNodes() )
                         {
-/*                          // ist es keine gelinkte Section, dann kann sie auch
-                            // nicht mitselektiert werden
-                            const SwSection& rSect = *pFmt->GetSection();
-                            if( CONTENT_SECTION == rSect.GetType() )
-                            {
-                                RestoreSavePos();
-                                return sal_True;
-                            }
-*/
                             bRet = sal_True;
                             break;
                         }
@@ -819,9 +816,11 @@ sal_Bool SwPaM::HasReadonlySel( bool bFo
             }
         }
     }
+
     //FIXME FieldBk
     // TODO: Form Protection when Enhanced Fields are enabled
-    if (!bRet) {
+    if (!bRet)
+    {
         const SwDoc *pDoc = GetDoc();
         sw::mark::IMark* pA = NULL;
         sw::mark::IMark* pB = NULL;
@@ -836,6 +835,7 @@ sal_Bool SwPaM::HasReadonlySel( bool bFo
         if ( bProtectForm )
             bRet |= ( pA == NULL || pB == NULL );
     }
+
     return bRet;
 }
 

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/crsr/swcrsr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/crsr/swcrsr.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/crsr/swcrsr.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/crsr/swcrsr.cxx Wed Mar 19 10:14:42 2014
@@ -343,7 +343,8 @@ sal_Bool SwCursor::IsSelOvr( int eFlags 
     if( pNd->IsCntntNode() && !dynamic_cast<SwUnoCrsr*>(this) )
     {
         const SwCntntFrm* pFrm = ((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() );
-        if( pFrm && pFrm->IsValid()
+        if( pFrm != NULL
+            && pFrm->IsValid()
             && 0 == pFrm->Frm().Height()
             && 0 != ( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags ) )
         {
@@ -356,40 +357,51 @@ sal_Bool SwCursor::IsSelOvr( int eFlags 
 
             // --> LIJIAN/FME 2007-11-27 #i72394# skip to prev /next valid paragraph
             // with a layout in case the first search did not succeed:
-            if( !pFrm )
+            if ( pFrm == NULL )
             {
                 bGoNxt = !bGoNxt;
                 pFrm = ((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() );
-                while ( pFrm && 0 == pFrm->Frm().Height() ) 
+                while ( pFrm != NULL
+                        && 0 == pFrm->Frm().Height() )
                 {
-                    pFrm = bGoNxt ? pFrm->GetNextCntntFrm()
-                        :   pFrm->GetPrevCntntFrm();
+                    pFrm = bGoNxt ? pFrm->GetNextCntntFrm() : pFrm->GetPrevCntntFrm();
                 }
             }
             // <--
 
-            SwCntntNode* pCNd;
-            if( pFrm && 0 != (pCNd = (SwCntntNode*)pFrm->GetNode()) )
+            SwCntntNode* pCNd = (pFrm != NULL) ? (SwCntntNode*)pFrm->GetNode() : NULL;
+            if ( pCNd != NULL )
             {
                 // set this cntntNode as new position
                 rPtIdx = *pCNd;
                 pNd = pCNd;
 
-                // ContentIndex noch anmelden:
-                xub_StrLen nTmpPos = bGoNxt ? 0 : pCNd->Len();
+                // assign corresponding ContentIndex
+                const xub_StrLen nTmpPos = bGoNxt ? 0 : pCNd->Len();
                 GetPoint()->nContent.Assign( pCNd, nTmpPos );
 
-                // sollten wir in einer Tabelle gelandet sein?
-                if( IsInProtectTable( sal_True ) )
-                    pFrm = 0;
+                if ( rPtIdx.GetIndex() == pSavePos->nNode
+                     && nTmpPos == pSavePos->nCntnt )
+                {
+                    // new position equals saved one
+                    // --> trigger restore of saved pos by setting <pFrm> to NULL - see below
+                    pFrm = NULL;
+                }
+
+                if ( IsInProtectTable( sal_True ) )
+                {
+                    // new position in protected table
+                    // --> trigger restore of saved pos by setting <pFrm> to NULL - see below
+                    pFrm = NULL;
+                }
             }
         }
 
-        if( !pFrm )
+        if( pFrm == NULL )
         {
             DeleteMark();
             RestoreSavePos();
-            return sal_True;		// ohne Frames geht gar nichts!
+            return sal_True;
         }
     }
 

Modified: openoffice/branches/alg_writerframes/main/sw/source/core/doc/dbgoutsw.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/core/doc/dbgoutsw.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/core/doc/dbgoutsw.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/core/doc/dbgoutsw.cxx Wed Mar 19 10:14:42 2014
@@ -635,7 +635,9 @@ String lcl_dbg_out(const SwNode & rNode)
             aTmpStr += String("(", RTL_TEXTENCODING_ASCII_US);
             aTmpStr += String::CreateFromInt32
                 //(static_cast<SwTxtFmtColl *>(pColl)->GetOutlineLevel());//#outline level,zhaojianwei
-				(static_cast<SwTxtFmtColl *>(pColl)->GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
+				(static_cast<SwTxtFmtColl *>(pColl)->IsAssignedToListLevelOfOutlineStyle()
+				 ? static_cast<SwTxtFmtColl *>(pColl)->GetAssignedOutlineStyleLevel()
+				 : 0);//<-end,zhaojianwei
 
             const SwNumRuleItem & rItem =
                 static_cast<const SwNumRuleItem &>