Commits

Anonymous committed 86dffb1

CWS-TOOLING: integrate CWS sw32a11y01
2009-08-27 10:11:46 +0200 hde r275457 : new testcase i103265
2009-08-27 08:24:31 +0200 hde r275454 : new testcase i103265
2009-08-27 08:23:05 +0200 hde r275453 : new document for testcase i103265
2009-08-26 13:43:33 +0200 hde r275421 : added new autotest
2009-08-26 13:36:28 +0200 hde r275420 : added new autotest
2009-08-18 15:41:18 +0200 od r275113 : #i104300# method <SwEditWin::RequestHelp(..)>
- improve help tip for hyperlinks to cross-reference bookmarks.
2009-08-10 15:18:41 +0200 od r274816 : #i73249# method <SwFrameShell::Execute(..)>
- no update of fly frame manager on dialog "Title and Description"
2009-08-10 14:24:15 +0200 od r274813 : #i92125# correction of end of file - missing newline end
2009-08-10 14:10:14 +0200 od r274811 : #i92125# correction of end of file - newline missing
2009-08-10 14:00:30 +0200 od r274808 : #i92125# - correct end of file - new line missing
2009-08-10 09:12:30 +0200 od r274794 : CWS-TOOLING: rebase CWS sw32a11y01 to trunk@274622 (milestone: DEV300:m54)
2009-08-07 15:52:59 +0200 od r274775 : #i73249# minor adjustment due to compiler warning
2009-08-07 15:40:38 +0200 od r274774 : #i92125# method <MarkManager::deleteMarks(..)>
- do not delete cross-reference bookmark, if deletion occurs inside a certain node
2009-08-06 12:53:05 +0200 od r274717 : #i92125# method <MarkManager::deleteMarks(..)
- no move of position for cross-reference bookmark, if move occurs inside certain node.
2009-08-06 12:50:27 +0200 od r274716 : #i92125# method <SwUndoSaveCntnt::DelCntntIndex(..)>
- keep cross-reference bookmarks, if deletion occurs inside a certain node.
2009-08-06 09:53:29 +0200 od r274705 : #i103265# method <SwTOXPara::GetURL()>
- For outline and template entries create link to bookmark.
The bookmark of type CROSSREF_HEADING_BOOKMARK is created, if needed
2009-07-22 13:57:04 +0200 od r274236 : #i73249# adjustment for export of svg:title and svg:description
2009-07-22 13:51:58 +0200 od r274234 : #i73249# adjust and enhance import/export of svg:title and svg:description
for Writer's text frames, graphics and embedded objects
2009-07-21 10:26:27 +0200 od r274168 : #i73249# implement support for attributes Title and Description for
text frames, graphics and embedded objects in Writer
- core, UNO-API, undo/redo and UI
2009-07-21 10:05:15 +0200 od r274164 : #i73249# new optional properties Title and Description as basis frame properties in text documents
2009-07-13 12:19:54 +0200 od r273928 : #i73249# Implementation of Undo/Redo of drawing object's name, title and description

Comments (0)

Files changed (57)

offapi/com/sun/star/text/BaseFrameProperties.idl

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
     /** returns the actual size of the object.
 
         <p>Since to obtain the correct actual size of the object not only
-        the  layouting for the frame needs to be finished but the whole 
-        document needs to be formatted as well. Thus if that was not done 
+        the  layouting for the frame needs to be finished but the whole
+        document needs to be formatted as well. Thus if that was not done
         previously it may take some while to retrieve this value.</p>
 
         @since OOo 2.0.4
      */
     [optional, property, maybevoid] com::sun::star::awt::Size LayoutSize;
 
+    //-------------------------------------------------------------------------
+        /** contains short title for the object
+
+            <p>This short title is visible as an alternative tag in HTML format.
+            Accessibility tools can read this text.</p>
+
+            @since OOo 3.2
+        */
+        [optional, property] string Title;
+
+    //-------------------------------------------------------------------------
+        /** contains description for the object
+
+            <p>The long description text can be entered to describe a object in
+            more detail to users with screen reader software. The description is
+            visible as an alternative tag for accessibility tools.</p>
+
+            @since OOo 3.2
+        */
+        [optional, property] string Description;
 };
 
 //=============================================================================

svx/inc/svdstr.hrc

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 #define STR_UndoNewLayer             (STR_UndoBegin +13)
 #define STR_UndoDelLayer             (STR_UndoBegin +14)
 #define STR_UndoMovLayer             (STR_UndoBegin +15)
-#define STR_UndoEnd                  (STR_UndoMovLayer)
+
+// --> OD 2009-07-09 #i73249#
+#define STR_UndoObjName              (STR_UndoBegin +16)
+#define STR_UndoObjTitle             (STR_UndoBegin +17)
+#define STR_UndoObjDescription       (STR_UndoBegin +18)
+// <--
+#define STR_UndoEnd                  (STR_UndoObjDescription)
 
 
 #define STR_LayerBegin               (STR_UndoEnd+1)

svx/inc/svx/svdundo.hxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 	virtual bool CanSdrRepeat(SdrView& rView) const;
 };
 
+// --> OD 2009-07-09 #i73249#
+class SdrUndoObjStrAttr : public SdrUndoObj
+{
+public:
+    enum ObjStrAttrType
+    {
+        OBJ_NAME,
+        OBJ_TITLE,
+        OBJ_DESCRIPTION
+    };
+
+protected:
+    const ObjStrAttrType meObjStrAttr;
+    const String msOldStr;
+    const String msNewStr;
+
+public:
+    SdrUndoObjStrAttr( SdrObject& rNewObj,
+                       const ObjStrAttrType eObjStrAttr,
+                       const String& sOldStr,
+                       const String& sNewStr);
+
+    virtual void Undo();
+    virtual void Redo();
+
+    virtual String GetComment() const;
+};
+// <--
+
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 //
 //  @@     @@@@  @@  @@ @@@@@ @@@@@
 	virtual SdrUndoAction* CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer );
 	virtual SdrUndoAction* CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText );
 
+    // --> OD 2009-07-09 #i73249#
+    virtual SdrUndoAction* CreateUndoObjectStrAttr( SdrObject& rObject,
+                                                    SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType,
+                                                    String sOldStr,
+                                                    String sNewStr );
+    // <--
+
 	// layer
 	virtual SdrUndoAction* CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
 	virtual SdrUndoAction* CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);

svx/source/svdraw/svdobj.cxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 #include "svx/shapepropertynotifier.hxx"
 #include <svx/sdrhittesthelper.hxx>
 
+// --> OD 2009-07-10 #i73249#
+#include <svx/svdundo.hxx>
+// <--
+
 using namespace ::com::sun::star;
 
 // #104018# replace macros above with type-detecting methods
 
 void SdrObjUserData::PaintMacro(OutputDevice& rOut, const Rectangle& /*rDirtyRect*/, const SdrObjMacroHitRec& /*rRec*/, const SdrObject* pObj) const
 {
-	if(!pObj) 
+	if(!pObj)
         return;
 
 	const RasterOp eRop(rOut.GetRasterOp());
     rOut.SetFillColor();
 	rOut.SetRasterOp(ROP_INVERT);
 
-	for(sal_uInt32 a(0); a < nCount; a++) 
+	for(sal_uInt32 a(0); a < nCount; a++)
 	{
 		rOut.DrawPolyLine(aPolyPolygon.getB2DPolygon(a));
 	}
 
 	if(pPlusData && pPlusData->aObjName != rStr)
 	{
-		pPlusData->aObjName = rStr;
+        // --> OD 2009-07-09 #i73249#
+        // Undo/Redo for setting object's name
+        bool bUndo( false );
+        if ( GetModel() && GetModel()->IsUndoEnabled() )
+        {
+            bUndo = true;
+            SdrUndoAction* pUndoAction =
+                    GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr(
+                                                    *this,
+                                                    SdrUndoObjStrAttr::OBJ_NAME,
+                                                    GetName(),
+                                                    rStr );
+            GetModel()->BegUndo( pUndoAction->GetComment() );
+            GetModel()->AddUndo( pUndoAction );
+        }
+        // <--
+        pPlusData->aObjName = rStr;
+        // --> OD 2009-07-09 #i73249#
+        if ( bUndo )
+        {
+            GetModel()->EndUndo();
+        }
+        // <--
 		SetChanged();
         BroadcastObjectChange();
 	}
 
 String SdrObject::GetName() const
 {
-	if(pPlusData) 
+	if(pPlusData)
 	{
 		return pPlusData->aObjName;
 	}
 
 	if(pPlusData && pPlusData->aObjTitle != rStr)
 	{
+        // --> OD 2009-07-13 #i73249#
+        // Undo/Redo for setting object's title
+        bool bUndo( false );
+        if ( GetModel() && GetModel()->IsUndoEnabled() )
+        {
+            bUndo = true;
+            SdrUndoAction* pUndoAction =
+                    GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr(
+                                                    *this,
+                                                    SdrUndoObjStrAttr::OBJ_TITLE,
+                                                    GetTitle(),
+                                                    rStr );
+            GetModel()->BegUndo( pUndoAction->GetComment() );
+            GetModel()->AddUndo( pUndoAction );
+        }
+        // <--
 		pPlusData->aObjTitle = rStr;
+        // --> OD 2009-07-13 #i73249#
+        if ( bUndo )
+        {
+            GetModel()->EndUndo();
+        }
+        // <--
 		SetChanged();
         BroadcastObjectChange();
 	}
 
 String SdrObject::GetTitle() const
 {
-	if(pPlusData) 
+	if(pPlusData)
 	{
 		return pPlusData->aObjTitle;
 	}
 
 	if(pPlusData && pPlusData->aObjDescription != rStr)
 	{
+        // --> OD 2009-07-13 #i73249#
+        // Undo/Redo for setting object's description
+        bool bUndo( false );
+        if ( GetModel() && GetModel()->IsUndoEnabled() )
+        {
+            bUndo = true;
+            SdrUndoAction* pUndoAction =
+                    GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr(
+                                                    *this,
+                                                    SdrUndoObjStrAttr::OBJ_DESCRIPTION,
+                                                    GetDescription(),
+                                                    rStr );
+            GetModel()->BegUndo( pUndoAction->GetComment() );
+            GetModel()->AddUndo( pUndoAction );
+        }
+        // <--
 		pPlusData->aObjDescription = rStr;
+        // --> OD 2009-07-13 #i73249#
+        if ( bUndo )
+        {
+            GetModel()->EndUndo();
+        }
+        // <--
 		SetChanged();
         BroadcastObjectChange();
 	}
 
 String SdrObject::GetDescription() const
 {
-	if(pPlusData) 
+	if(pPlusData)
 	{
 		return pPlusData->aObjDescription;
 	}
 // GetCurrentBoundRect().
 const Rectangle& SdrObject::GetCurrentBoundRect() const
 {
-	if(aOutRect.IsEmpty()) 
+	if(aOutRect.IsEmpty())
 	{
 		const_cast< SdrObject* >(this)->RecalcBoundRect();
 	}
-	
+
 	return aOutRect;
 }
 
 		return;
 
 	// central new method which will calculate the BoundRect using primitive geometry
-	if(aOutRect.IsEmpty()) 
+	if(aOutRect.IsEmpty())
 	{
     	const drawinglayer::primitive2d::Primitive2DSequence xPrimitives(GetViewContact().getViewIndependentPrimitive2DSequence());
 
 		    if(!aRange.isEmpty())
 		    {
 			    aOutRect = Rectangle(
-					    (sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()), 
+					    (sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()),
 					    (sal_Int32)ceil(aRange.getMaxX()), (sal_Int32)ceil(aRange.getMaxY()));
                 return;
 		    }
 {
 	basegfx::B2DPolyPolygon aRetval;
 
-    // create cloned object without text, but with XLINE_SOLID, 
+    // create cloned object without text, but with XLINE_SOLID,
     // COL_BLACK as line color and XFILL_NONE
 	SdrObject* pClone = Clone();
 
     SdrHdlKind eHdl = (pHdl == NULL) ? HDL_MOVE : pHdl->GetKind();
 
     if(eHdl==HDL_UPLFT || eHdl==HDL_UPPER || eHdl==HDL_UPRGT ||
-	    eHdl==HDL_LEFT || eHdl==HDL_RIGHT || eHdl==HDL_LWLFT || 
-        eHdl==HDL_LOWER || eHdl==HDL_LWRGT) 
+	    eHdl==HDL_LEFT || eHdl==HDL_RIGHT || eHdl==HDL_LWLFT ||
+        eHdl==HDL_LOWER || eHdl==HDL_LWRGT)
     {
         return true;
     }
 {
 	Rectangle aNewRect(ImpDragCalcRect(rDrag));
 
-    if(aNewRect != GetSnapRect()) 
+    if(aNewRect != GetSnapRect())
     {
    		NbcSetSnapRect(aNewRect);
 	}
-	
+
     return true;
 }
 
 void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
 {
 	SdrObjUserData* pData=ImpGetMacroUserData();
-	
-    if(pData) 
+
+    if(pData)
     {
 		pData->PaintMacro(rOut,rDirtyRect,rRec,this);
-	} 
-    else 
+	}
+    else
     {
 	    const RasterOp eRop(rOut.GetRasterOp());
 	    const basegfx::B2DPolyPolygon aPolyPolygon(TakeXorPoly());
         rOut.SetFillColor();
 	    rOut.SetRasterOp(ROP_INVERT);
 
-	    for(sal_uInt32 a(0); a < nCount; a++) 
+	    for(sal_uInt32 a(0); a < nCount; a++)
 	    {
 		    rOut.DrawPolyLine(aPolyPolygon.getB2DPolygon(a));
 	    }
 	// #i41936# Use SnapRect for default GluePoints
 	const Rectangle aR(GetSnapRect());
 	Point aPt;
-	
-	switch(nPosNum) 
+
+	switch(nPosNum)
 	{
 		case 0 : aPt = aR.TopCenter();    break;
 		case 1 : aPt = aR.RightCenter();  break;
 			// create extractor, process and get result
 			drawinglayer::processor2d::LineGeometryExtractor2D aExtractor(aViewInformation2D);
 			aExtractor.process(xSequence);
-		
+
 			// #i102241# check for line results
 			const std::vector< basegfx::B2DPolygon >& rHairlineVector = aExtractor.getExtractedHairlines();
 
         {
             SdrPathObj* pPathObj = (SdrPathObj*)pRet;
 
-            // bezier geometry got created, even for straight edges since the given 
-            // object is a result of DoConvertToPolyObj. For conversion to contour 
+            // bezier geometry got created, even for straight edges since the given
+            // object is a result of DoConvertToPolyObj. For conversion to contour
             // this is not really needed and can be reduced again AFAP
             pPathObj->SetPathPoly(basegfx::tools::simplifyCurveSegments(pPathObj->GetPathPoly()));
         }
 {
 	maWeakUnoShape = _rxUnoShape;
 	mpSvxShape = SvxShape::getImplementation( _rxUnoShape );
-    OSL_ENSURE( mpSvxShape || !_rxUnoShape.is(),
-        "SdrObject::setUnoShape: not sure it's a good idea to have an XShape which is not implemented by SvxShape ..." );
+//    OSL_ENSURE( mpSvxShape || !_rxUnoShape.is(),
+//        "SdrObject::setUnoShape: not sure it's a good idea to have an XShape which is not implemented by SvxShape ..." );
 }
 
 /** only for internal use! */
 
 	// build matrix
 	rMatrix.identity();
-	
+
 	if(1.0 != aScale.getX() || 1.0 != aScale.getY())
 	{
 		rMatrix.scale(aScale.getX(), aScale.getY());

svx/source/svdraw/svdstr.src

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 {
 	Text [ en-US ] = "Change order of layers" ;
 };
+// --> OD 2009-07-09 #i73249#
+String STR_UndoObjName
+{
+    Text [ en-US ] = "Change object name of %1 to" ;
+};
+String STR_UndoObjTitle
+{
+    Text [ en-US ] = "Change object title of %1" ;
+};
+String STR_UndoObjDescription
+{
+    Text [ en-US ] = "Change object description of %1" ;
+};
+// <--
 String STR_StandardLayerName
 {
 	Text [ en-US ] = "Standard" ;

svx/source/svdraw/svdundo.cxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 		// #97172#
 		// only repaint, no objectchange
 		pObj->ActionChanged();
-	} 
-	else 
+	}
+	else
 	{
 		if (pRedoGeo!=NULL) delete pRedoGeo;
 		pRedoGeo=pObj->GetGeoData();
 void SdrUndoRemoveObj::Redo()
 {
 	DBG_ASSERT(pObj->IsInserted(),"RedoRemoveObj: pObj ist nicht Inserted");
-	if (pObj->IsInserted()) 
+	if (pObj->IsInserted())
 	{
 		ImplUnmarkObject( pObj );
         E3DModifySceneSnapRectUpdater aUpdater(pObj);
 	ImpShowPageOfThisObject();
 
 	DBG_ASSERT(pObj->IsInserted(),"UndoInsertObj: pObj ist nicht Inserted");
-	if (pObj->IsInserted()) 
+	if (pObj->IsInserted())
 	{
 		ImplUnmarkObject( pObj );
 
 		DBG_ASSERT(pObj->IsInserted(),"SdrUndoReplaceObj::Redo(): Altes Objekt ist nicht inserted!");
 		SetOldOwner(TRUE);
 		SetNewOwner(FALSE);
-	
+
 		ImplUnmarkObject( pObj );
 		pObjList->ReplaceObject(pNewObj,nOrdNum);
 
 {
 	// Text fuer Undo kopieren, denn SetOutlinerParaObject() ist Eigentumsuebereignung
 	OutlinerParaObject* pText1 = pNewText;
-	
+
 	if(pText1)
 		pText1 = new OutlinerParaObject(*pText1);
 
 		{
 			SdrObject* pObj2=rML.GetMark(nm)->GetMarkedSdrObj();
 			SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pObj2);
-			if (pTextObj!=NULL) 
+			if (pTextObj!=NULL)
 			{
 				if( bUndo )
 					rView.AddUndo(new SdrUndoObjSetText(*pTextObj,0));
 	return bOk;
 }
 
+// --> OD 2009-07-09 #i73249#
+SdrUndoObjStrAttr::SdrUndoObjStrAttr( SdrObject& rNewObj,
+                                      const ObjStrAttrType eObjStrAttr,
+                                      const String& sOldStr,
+                                      const String& sNewStr)
+    : SdrUndoObj( rNewObj ),
+      meObjStrAttr( eObjStrAttr ),
+      msOldStr( sOldStr ),
+      msNewStr( sNewStr )
+{
+}
+
+void SdrUndoObjStrAttr::Undo()
+{
+    ImpShowPageOfThisObject();
+
+    switch ( meObjStrAttr )
+    {
+        case OBJ_NAME:
+        {
+            pObj->SetName( msOldStr );
+        }
+        break;
+        case OBJ_TITLE:
+        {
+            pObj->SetTitle( msOldStr );
+        }
+        break;
+        case OBJ_DESCRIPTION:
+        {
+            pObj->SetDescription( msOldStr );
+        }
+        break;
+    }
+}
+
+void SdrUndoObjStrAttr::Redo()
+{
+    switch ( meObjStrAttr )
+    {
+        case OBJ_NAME:
+        {
+            pObj->SetName( msNewStr );
+        }
+        break;
+        case OBJ_TITLE:
+        {
+            pObj->SetTitle( msNewStr );
+        }
+        break;
+        case OBJ_DESCRIPTION:
+        {
+            pObj->SetDescription( msNewStr );
+        }
+        break;
+    }
+
+    ImpShowPageOfThisObject();
+}
+
+String SdrUndoObjStrAttr::GetComment() const
+{
+    String aStr;
+    switch ( meObjStrAttr )
+    {
+        case OBJ_NAME:
+        {
+            ImpTakeDescriptionStr( STR_UndoObjName, aStr );
+            aStr += sal_Unicode(' ');
+            aStr += sal_Unicode('\'');
+            aStr += msNewStr;
+            aStr += sal_Unicode('\'');
+        }
+        break;
+        case OBJ_TITLE:
+        {
+            ImpTakeDescriptionStr( STR_UndoObjTitle, aStr );
+        }
+        break;
+        case OBJ_DESCRIPTION:
+        {
+            ImpTakeDescriptionStr( STR_UndoObjDescription, aStr );
+        }
+        break;
+    }
+
+    return aStr;
+}
+
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 //
 	return new SdrUndoObjSetText( rNewObj, nText );
 }
 
+SdrUndoAction* SdrUndoFactory::CreateUndoObjectStrAttr( SdrObject& rObject,
+                                                        SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType,
+                                                        String sOldStr,
+                                                        String sNewStr )
+{
+    return new SdrUndoObjStrAttr( rObject, eObjStrAttrType, sOldStr, sNewStr );
+}
+
+
 // layer
 SdrUndoAction* SdrUndoFactory::CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel)
 {
 #define FN_IID_COLRIGHT                 (FN_FRAME + 17)
 
 #define FN_SET_FRM_ALT_NAME             (FN_FRAME + 18)
+// --> OD 2009-07-13 #i73249#
+#define FN_UNO_TITLE                    (FN_FRAME + 19)
+#define FN_UNO_DESCRIPTION              (FN_FRAME + 20)
+// <--
 
 
 //Member-Ids fuer Fill/SetVariable an Items
 
     sal_Bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt,
 						SfxItemSet* pSet = 0, sal_Bool bKeepOrient = sal_False );
-
+    // --> OD 2009-07-20 #i73249#
+    void SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
+                         const String& sNewTitle );
+    void SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
+                               const String& sNewDescription );
+    // <--
 
     /** Footnotes
     */

sw/inc/editsh.hxx

     // <--
     // detect highest and lowest level to check moving of outline levels
     void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
-	
-	
+
+
 	// get Outline level of current paragraph
 	int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei
 
 				  const Graphic* pGraphic = 0,
 				  const GraphicObject* pGrafObj = 0 );
 
-	// alternativen Text einer Grafik/OLe-Objectes abfragen/setzen
-	const String& GetAlternateText() const;
-	void SetAlternateText( const String& rTxt );
+//    // alternativen Text einer Grafik/OLe-Objectes abfragen/setzen
+//    const String& GetAlternateText() const;
+//    void SetAlternateText( const String& rTxt );
 
 	//eindeutige Identifikation des Objektes (fuer ImageMapDlg)
 	void    *GetIMapInventor() const;
 		::com::sun::star::linguistic2::XSpellAlternatives >
             GetCorrection( const Point* pPt, SwRect& rSelectRect );
 
-    
+
     bool GetGrammarCorrection( ::com::sun::star::linguistic2::ProofreadingResult /*out*/ &rResult,
             sal_Int32 /*out*/ &rErrorPosInText,
             sal_Int32 /*out*/ &rErrorIndexInResult,
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 	const Graphic *GetGrfAtPos( const Point &rDocPos,
 								String &rName, BOOL &rbLink ) const;
 
+    // --> OD 2009-07-13 #i73249#
+    const String GetObjTitle() const;
+    void SetObjTitle( const String& rTitle );
+    const String GetObjDescription() const;
+    void SetObjDescription( const String& rDescription );
+    // <--
+
 //SS fuer Rahmen --------------------------------------------
 
 	BOOL IsFrmSelected() const;

sw/inc/frmfmt.hxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 
 	virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
 
+    // --> OD 2009-07-14 #i73249#
+    const String GetObjTitle() const;
+    void SetObjTitle( const String& rTitle,
+                      bool bBroadcast = false );
+    const String GetObjDescription() const;
+    void SetObjDescription( const String& rDescription,
+                            bool bBroadcast = false );
+    // <--
+
     /** SwFlyFrmFmt::IsBackgroundTransparent - for #99657#
 
         OD 22.08.2002 - overloading virtual method and its default implementation,

sw/inc/hintids.hxx

 	RES_GRAPHIC_SWAPIN,
 	RES_FIELD_DELETED,
 	RES_NAME_CHANGED,
-	RES_ALT_TEXT_CHANGED,
+    RES_TITLE_CHANGED,
+    RES_DESCRIPTION_CHANGED,
     RES_UNOCURSOR_LEAVES_SECTION,
     RES_LINKED_GRAPHIC_STREAM_ARRIVED,
 RES_MSG_END

sw/inc/ndnotxt.hxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 	friend class SwNodes;
 	friend class SwNoTxtFrm;
 
-	String aAlternateText;		// alternativer Text  (HTML)
+//    String aAlternateText;      // alternativer Text  (HTML)
 
 	PolyPolygon *pContour;		// Polygon fuer Konturumlauf
     BOOL bAutomaticContour : 1; // automatic contour polygon, not manipulated
 	virtual BOOL SavePersistentData();
 	virtual BOOL RestorePersistentData();
 
-	// alternativen Text abfragen/setzen
-	const String& GetAlternateText() const		{ return aAlternateText; }
-	void SetAlternateText( const String& rTxt, sal_Bool bBroadcast=sal_False );
+    const String GetTitle() const;
+    void SetTitle( const String& rTitle,
+                   bool bBroadcast = false );
+    const String GetDescription() const;
+    void SetDescription( const String& rDescription,
+                         bool bBroadcast = false );
+
+//    const String GetAlternateText() const;
+//    void SetAlternateText( const String& rTxt,
+//                           sal_Bool bBroadcast=sal_False );
 
     void               SetContour( const PolyPolygon *pPoly,
                                    BOOL bAutomatic = FALSE );

sw/inc/swundo.hxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
     UNDO_ROW_DELETE, // 109
     UNDO_RENAME_PAGEDESC, // 110
     UNDO_NUMDOWN, // 111
-    UNDO_STD_END= UNDO_NUMDOWN,
+    // --> OD 2009-07-16 #i73249#
+    UNDO_FLYFRMFMT_TITLE,           // 112
+    UNDO_FLYFRMFMT_DESCRIPTION,     // 113
+    // <--
+    UNDO_STD_END= UNDO_FLYFRMFMT_DESCRIPTION,
 
     // UI undo ID's...
     UNDO_UI_REPLACE             =  UNDO_STD_END + 1,

sw/inc/unoprnms.hxx

 /* 0161 */	UNO_NAME_PARA_BACK_TRANSPARENT,
 /* 0162 */	UNO_NAME_POSITION_END_OF_DOC,
 /* 0163 */	UNO_NAME_POSITION_PROTECTED,
-/* 0164 */	UNO_NAME_ALTERNATIVE_TEXT,
+/* 0164 */  UNO_NAME_ALTERNATIVE_TEXT,
 /* 0165 */	UNO_NAME_PRIMARY_KEY,
 /* 0166 */	UNO_NAME_PRINT_TABLES,
 /* 0167 */	UNO_NAME_PRINT_GRAPHICS,
 /* 0734 */  UNO_NAME_CHAR_OVERLINE_COLOR,
 /* 0735 */  UNO_NAME_CHAR_OVERLINE_HAS_COLOR,
 /* 0736 */  UNO_NAME_OUTLINE_LEVEL,  //#outline level,add<-zhaojianwei outlinelevel
-/* 0737 */  SW_PROPNAME_END
+// --> OD 2009-07-13 #i73249#
+/* 0737 */  UNO_NAME_DESCRIPTION,
+// <--
+/* 0738 */  SW_PROPNAME_END
 };
 
 

sw/sdi/_frmsh.sdi

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
         StateMethod = GetState ;
         DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
     ]
-    
+
     FN_FORMAT_FOOTNOTE_DLG // status()
 	[
 		ExecMethod = Execute;
 	]
-	
+
     SID_OPEN_XML_FILTERSETTINGS // ole : no, status : ?
     [
         ExecMethod = Execute ;
 	[
 		ExecMethod = Execute ;
 	]
+        // --> OD 2009-07-08 #i73249#
+        FN_TITLE_DESCRIPTION_SHAPE
+        [
+                ExecMethod = Execute ;
+                StateMethod = GetState ;
+                DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+        ]
+        // <--
 
-    
+
     /*****************************************************
 
  Abfragefunktionen fuer ImageMaps

sw/source/core/access/accnotextframe.cxx

  /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 #include <ndnotxt.hxx>
 #include <flyfrm.hxx>
 #include <cntfrm.hxx>
+// --> OD 2009-07-14 #i73249#
+#include <hints.hxx>
+// <--
 #include "accnotextframe.hxx"
 
 using namespace ::com::sun::star;
         sal_Int16 nInitRole,
         const SwFlyFrm* pFlyFrm  ) :
     SwAccessibleFrameBase( pInitMap, nInitRole, pFlyFrm ),
-	aDepend( this, const_cast < SwNoTxtNode * >( GetNoTxtNode() ) )
+    aDepend( this, const_cast < SwNoTxtNode * >( GetNoTxtNode() ) ),
+    msTitle(),
+    msDesc()
 {
-	const SwNoTxtNode *pNd = GetNoTxtNode();
-	if( pNd )
-		sDesc = OUString( pNd->GetAlternateText() );
-	if( !sDesc.getLength() )
-		sDesc = GetName();
+    const SwNoTxtNode* pNd = GetNoTxtNode();
+    // --> OD 2009-07-14 #i73249#
+    // consider new attributes Title and Description
+    if( pNd )
+    {
+        msTitle = pNd->GetTitle();
+
+        msDesc = pNd->GetDescription();
+        if ( msDesc.getLength() == 0 &&
+             msTitle != GetName() )
+        {
+            msDesc = msTitle;
+        }
+    }
+    // <--
 }
 
 SwAccessibleNoTextFrame::~SwAccessibleNoTextFrame()
 
 void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
 {
-	SwAccessibleFrameBase::Modify( pOld, pNew );
+    const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+    // --> OD 2009-07-14 #i73249#
+    // suppress handling of RES_NAME_CHANGED in case that attribute Title is
+    // used as the accessible name.
+    if ( nWhich != RES_NAME_CHANGED ||
+         msTitle.getLength() == 0 )
+    {
+        SwAccessibleFrameBase::Modify( pOld, pNew );
+    }
 
-	sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
-	const SwNoTxtNode *pNd = GetNoTxtNode();
-	ASSERT( pNd == aDepend.GetRegisteredIn(), "invalid frame" );
-	switch( nWhich )
+    const SwNoTxtNode *pNd = GetNoTxtNode();
+    ASSERT( pNd == aDepend.GetRegisteredIn(), "invalid frame" );
+    switch( nWhich )
 	{
-	case RES_NAME_CHANGED:
-		if( pNd->GetAlternateText().Len() )
-			break;
-	case RES_ALT_TEXT_CHANGED:
-		if( pNd && GetFrm() )
-		{
-			OUString sOldDesc( sDesc );
+        // --> OD 2009-07-14 #i73249#
+        case RES_TITLE_CHANGED:
+        {
+            const String& sOldTitle(
+                        dynamic_cast<SwStringMsgPoolItem*>(pOld)->GetString() );
+            const String& sNewTitle(
+                        dynamic_cast<SwStringMsgPoolItem*>(pNew)->GetString() );
+            if ( sOldTitle == sNewTitle )
+            {
+                break;
+            }
+            msTitle = sNewTitle;
+            AccessibleEventObject aEvent;
+            aEvent.EventId = AccessibleEventId::NAME_CHANGED;
+            aEvent.OldValue <<= OUString( sOldTitle );
+            aEvent.NewValue <<= msTitle;
+            FireAccessibleEvent( aEvent );
 
-			const String& rDesc = pNd->GetAlternateText();
-			sDesc = rDesc;
-			if( !sDesc.getLength() )
-				sDesc = GetName();
+            if ( pNd->GetDescription().Len() != 0 )
+            {
+                break;
+            }
+        }
+        // intentional no break here
+        case RES_DESCRIPTION_CHANGED:
+        {
+            if ( pNd && GetFrm() )
+            {
+                const OUString sOldDesc( msDesc );
 
-			if( sDesc != sOldDesc )
-			{
-				AccessibleEventObject aEvent;
-				aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED;
-				aEvent.OldValue <<= sOldDesc;
-				aEvent.NewValue <<= sDesc;
-				FireAccessibleEvent( aEvent );
-			}
-		}
-		break;
-		/*
+                const String& rDesc = pNd->GetDescription();
+                msDesc = rDesc;
+                if ( msDesc.getLength() == 0 &&
+                     msTitle != GetName() )
+                {
+                    msDesc = msTitle;
+                }
+
+                if ( msDesc != sOldDesc )
+                {
+                    AccessibleEventObject aEvent;
+                    aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED;
+                    aEvent.OldValue <<= sOldDesc;
+                    aEvent.NewValue <<= msDesc;
+                    FireAccessibleEvent( aEvent );
+                }
+            }
+        }
+        break;
+        // <--
+        /*
 	case RES_OBJECTDYING:
 		if( aDepend.GetRegisteredIn() ==
 				static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
 	SwAccessibleFrameBase::Dispose( bRecursive );
 }
 
+// --> OD 2009-07-14 #i73249#
+OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleName (void)
+        throw (uno::RuntimeException)
+{
+    vos::OGuard aGuard(Application::GetSolarMutex());
+
+    CHECK_FOR_DEFUNC( XAccessibleContext )
+
+    if ( msTitle.getLength() != 0 )
+    {
+        return msTitle;
+    }
+
+    return SwAccessibleFrameBase::getAccessibleName();
+}
+// <--
+
 OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void)
         throw (uno::RuntimeException)
 {
 
 	CHECK_FOR_DEFUNC( XAccessibleContext )
 
-	return sDesc;
+    return msDesc;
 }
 
 
 // XInterface
 //
 
-uno::Any SAL_CALL SwAccessibleNoTextFrame::queryInterface( const uno::Type& aType ) 
-    throw (uno::RuntimeException)    
+uno::Any SAL_CALL SwAccessibleNoTextFrame::queryInterface( const uno::Type& aType )
+    throw (uno::RuntimeException)
 {
-    if( aType == 
+    if( aType ==
         ::getCppuType( static_cast<uno::Reference<XAccessibleImage>*>( NULL ) ) )
     {
         uno::Reference<XAccessibleImage> xImage = this;
 // all releveant information is already accessible through other
 // methods. So we just delegate to those.
 
-OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageDescription() 
+OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageDescription()
     throw ( uno::RuntimeException )
 {
     return getAccessibleDescription();
 }
 
-sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageHeight(  ) 
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageHeight(  )
     throw ( uno::RuntimeException )
 {
     return getSize().Height;
 }
 
-sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageWidth(  ) 
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageWidth(  )
     throw ( uno::RuntimeException )
 {
     return getSize().Width;

sw/source/core/access/accnotextframe.hxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
                                 public ::com::sun::star::accessibility::XAccessibleImage
 {
 	SwDepend		aDepend;
-	::rtl::OUString	sDesc;
+    // --> OD 2009-07-14 #i73249#
+    ::rtl::OUString msTitle;
+    // <--
+    ::rtl::OUString msDesc;
 
 protected:
 
 
 	//=====  XAccessibleContext  ==============================================
 
-    ///	Return this object's description.
+    // --> OD 2009-07-14 #i73249#
+    /// Return the object's current name.
+    virtual ::rtl::OUString SAL_CALL
+        getAccessibleName (void)
+        throw (::com::sun::star::uno::RuntimeException);
+    // <--
+
+    /// Return this object's description.
 	virtual ::rtl::OUString SAL_CALL
     	getAccessibleDescription (void)
         throw (com::sun::star::uno::RuntimeException);

sw/source/core/access/acctextframe.cxx

  /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 #include <flyfrm.hxx>
 #include <accmap.hxx>
 #include <unotools/accessiblerelationsethelper.hxx>
+// --> OD 2009-07-14 #i73249#
+#include <hints.hxx>
+// <--
 #include "acctextframe.hxx"
 
 using namespace ::com::sun::star;
 SwAccessibleTextFrame::SwAccessibleTextFrame(
         SwAccessibleMap* pInitMap,
         const SwFlyFrm* pFlyFrm  ) :
-    SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, pFlyFrm )
+    SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, pFlyFrm ),
+    msTitle(),
+    msDesc()
 {
+    if ( pFlyFrm )
+    {
+        const SwFlyFrmFmt* pFlyFrmFmt =
+                        dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() );
+        msTitle = pFlyFrmFmt->GetObjTitle();
+
+        msDesc = pFlyFrmFmt->GetObjDescription();
+        if ( msDesc.getLength() == 0 &&
+             msTitle != GetName() )
+        {
+            msDesc = msTitle;
+        }
+    }
 }
 
 SwAccessibleTextFrame::~SwAccessibleTextFrame()
 
 void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
 {
-	sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
-	const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() );
+    const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+    // --> OD 2009-07-14 #i73249#
+    // suppress handling of RES_NAME_CHANGED in case that attribute Title is
+    // used as the accessible name.
+    if ( nWhich != RES_NAME_CHANGED ||
+         msTitle.getLength() == 0 )
+    {
+        SwAccessibleFrameBase::Modify( pOld, pNew );
+    }
+
+    const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() );
 	switch( nWhich )
 	{
-	case RES_NAME_CHANGED:
-		if( pFlyFrm )
-		{
-			OUString sOldDesc( GetName() );
-			SwAccessibleFrameBase::Modify( pOld, pNew );
+        // --> OD 2009-07-14 #i73249#
+        case RES_TITLE_CHANGED:
+        {
+            const String& sOldTitle(
+                        dynamic_cast<SwStringMsgPoolItem*>(pOld)->GetString() );
+            const String& sNewTitle(
+                        dynamic_cast<SwStringMsgPoolItem*>(pNew)->GetString() );
+            if ( sOldTitle == sNewTitle )
+            {
+                break;
+            }
+            msTitle = sNewTitle;
+            AccessibleEventObject aEvent;
+            aEvent.EventId = AccessibleEventId::NAME_CHANGED;
+            aEvent.OldValue <<= OUString( sOldTitle );
+            aEvent.NewValue <<= msTitle;
+            FireAccessibleEvent( aEvent );
 
-			if( sOldDesc != GetName() )
-			{
-				AccessibleEventObject aEvent;
-				aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED;
-				aEvent.OldValue <<= sOldDesc;
-				aEvent.NewValue <<= GetName();
-				FireAccessibleEvent( aEvent );
-			}
-		}
-		break;
-	default:
-		SwAccessibleFrameBase::Modify( pOld, pNew );
-		break;
+            const SwFlyFrmFmt* pFlyFrmFmt =
+                            dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() );
+            if ( pFlyFrmFmt->GetObjDescription().Len() != 0 )
+            {
+                break;
+            }
+        }
+        // intentional no break here
+        case RES_DESCRIPTION_CHANGED:
+        {
+            if ( pFlyFrm )
+            {
+                const OUString sOldDesc( msDesc );
+
+                const SwFlyFrmFmt* pFlyFrmFmt =
+                                dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() );
+                const String& rDesc = pFlyFrmFmt->GetObjDescription();
+                msDesc = rDesc;
+                if ( msDesc.getLength() == 0 &&
+                     msTitle != GetName() )
+                {
+                    msDesc = msTitle;
+                }
+
+                if ( msDesc != sOldDesc )
+                {
+                    AccessibleEventObject aEvent;
+                    aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED;
+                    aEvent.OldValue <<= sOldDesc;
+                    aEvent.NewValue <<= msDesc;
+                    FireAccessibleEvent( aEvent );
+                }
+            }
+        }
+        break;
+        // <--
 	}
 }
 
+// --> OD 2009-07-14 #i73249#
+OUString SAL_CALL SwAccessibleTextFrame::getAccessibleName (void)
+        throw (uno::RuntimeException)
+{
+    vos::OGuard aGuard(Application::GetSolarMutex());
+
+    CHECK_FOR_DEFUNC( XAccessibleContext )
+
+    if ( msTitle.getLength() != 0 )
+    {
+        return msTitle;
+    }
+
+    return SwAccessibleFrameBase::getAccessibleName();
+}
+// <--
 OUString SAL_CALL SwAccessibleTextFrame::getAccessibleDescription (void)
         throw (uno::RuntimeException)
 {
 
     CHECK_FOR_DEFUNC( XAccessibleContext )
 
-	return GetName();
+    return msDesc;
 
 }
 
 	return aRet;
 }
 
-uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTextFrame::getImplementationId() 
+uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTextFrame::getImplementationId()
 		throw(uno::RuntimeException)
 {
     vos::OGuard aGuard(Application::GetSolarMutex());

sw/source/core/access/acctextframe.hxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 
 class SwAccessibleTextFrame : public SwAccessibleFrameBase
 {
+private:
+    // --> OD 2009-07-14 #i73249#
+    ::rtl::OUString msTitle;
+    ::rtl::OUString msDesc;
+    // <--
 
 protected:
 
 
 	//=====  XAccessibleContext  ==============================================
 
-    ///	Return this object's description.
+    // --> OD 2009-07-14 #i73249#
+    /// Return the object's current name.
+    virtual ::rtl::OUString SAL_CALL
+        getAccessibleName (void)
+        throw (::com::sun::star::uno::RuntimeException);
+    // <--
+    /// Return this object's description.
 	virtual ::rtl::OUString SAL_CALL
     	getAccessibleDescription (void)
         throw (com::sun::star::uno::RuntimeException);

sw/source/core/doc/docbm.cxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
         return pResult;
     }
 
-    // return a position at the begin of rEnd, if it is a CntntNode 
-    // else set it to the begin of the Node after rEnd, if there is one 
+    // return a position at the begin of rEnd, if it is a CntntNode
+    // else set it to the begin of the Node after rEnd, if there is one
     // else set it to the end of the node before rStt
     // else set it to the CntntNode of the Pos outside the Range
     static inline auto_ptr<SwPosition> lcl_FindExpelPosition(const SwNodeIndex& rStt,
             // illegal selection? collapse the mark and restore sorting later
             isSortingNeeded |= lcl_FixCorrectedMark(bChangedPos, bChangedOPos, pMark);
         }
-        // restore sorting if needed 
+        // restore sorting if needed
         if(isSortingNeeded)
             sortMarks();
 #if FALSE
             // illegal selection? collapse the mark and restore sorting later
             isSortingNeeded |= lcl_FixCorrectedMark(bChangedPos, bChangedOPos, pMark);
         }
-        // restore sorting if needed 
+        // restore sorting if needed
         if(isSortingNeeded)
             sortMarks();
 #if FALSE
     }
 
     void MarkManager::deleteMarks(
-        const SwNodeIndex& rStt,
-        const SwNodeIndex& rEnd,
-        ::std::vector<SaveBookmark>* pSaveBkmk,
-        const SwIndex* pSttIdx,
-        const SwIndex* pEndIdx)
+            const SwNodeIndex& rStt,
+            const SwNodeIndex& rEnd,
+            ::std::vector<SaveBookmark>* pSaveBkmk,
+            const SwIndex* pSttIdx,
+            const SwIndex* pEndIdx )
     {
         vector<const_iterator_t> vMarksToDelete;
         bool isSortingNeeded = false;
             bool isOtherPosInRange = (pMark->IsExpanded() &&
                 lcl_GreaterThan(pMark->GetOtherMarkPos(), rStt, pSttIdx) &&
                 lcl_Lower(pMark->GetOtherMarkPos(), rEnd, pEndIdx));
-            // special case: completely in range, touching the end? 
+            // special case: completely in range, touching the end?
             if(pEndIdx &&
                     ((isOtherPosInRange
                     && pMark->GetMarkPos().nNode == rEnd
                 isPosInRange = true, isOtherPosInRange = true;
             }
 
-            if(isPosInRange && isOtherPosInRange)
+            if(isPosInRange && (isOtherPosInRange || !pMark->IsExpanded()))
             {
                 // completely in range
-                if(pSaveBkmk)
-                    pSaveBkmk->push_back(SaveBookmark(true, true, *pMark, rStt, pSttIdx));
-                vMarksToDelete.push_back(ppMark);
+
+                // --> OD 2009-08-07 #i92125#
+                bool bKeepCrossRefBkmk( false );
+                {
+                    if ( rStt == rEnd &&
+                         ( IDocumentMarkAccess::GetType(*pMark) ==
+                            IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK ||
+                           IDocumentMarkAccess::GetType(*pMark) ==
+                            IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK ) )
+                    {
+                        bKeepCrossRefBkmk = true;
+                    }
+                }
+                if ( !bKeepCrossRefBkmk )
+                {
+                    if(pSaveBkmk)
+                        pSaveBkmk->push_back(SaveBookmark(true, true, *pMark, rStt, pSttIdx));
+                    vMarksToDelete.push_back(ppMark);
+                }
+                // <--
             }
             else if(isPosInRange ^ isOtherPosInRange)
             {
                         rEnd,
                         isPosInRange ? pMark->GetOtherMarkPos() : pMark->GetMarkPos());
 
-                if(isPosInRange)
-                    pMark->SetMarkPos(*pNewPos);
-                else
-                    pMark->SetOtherMarkPos(*pNewPos);
+                // --> OD 2009-08-06 #i92125#
+                // no move of position for cross-reference bookmarks,
+                // if move occurs inside a certain node
+                if ( ( IDocumentMarkAccess::GetType(*pMark) !=
+                                IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK &&
+                       IDocumentMarkAccess::GetType(*pMark) !=
+                                IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK ) ||
+                     pMark->GetMarkPos().nNode != pNewPos->nNode )
+                {
+                    if(isPosInRange)
+                        pMark->SetMarkPos(*pNewPos);
+                    else
+                        pMark->SetOtherMarkPos(*pNewPos);
 
-                // illegal selection? collapse the mark and restore sorting later
-                isSortingNeeded |= lcl_FixCorrectedMark(isPosInRange, isOtherPosInRange, pMark);
+                    // illegal selection? collapse the mark and restore sorting later
+                    isSortingNeeded |= lcl_FixCorrectedMark(isPosInRange, isOtherPosInRange, pMark);
+                }
+                // <--
             }
         }
 
         // we just remembered the iterators to delete, so we do not need to search
         // for the shared_ptr<> (the entry in m_vMarks) again
         // reverse iteration, since erasing an entry invalidates iterators
-        // behind it (the iterators in vMarksToDelete are sorted)  
+        // behind it (the iterators in vMarksToDelete are sorted)
         for(vector<const_iterator_t>::reverse_iterator pppMark = vMarksToDelete.rbegin();
             pppMark != vMarksToDelete.rend();
             pppMark++)
+        {
             deleteMark(*pppMark);
+        }
         if(isSortingNeeded)
             sortMarks();
 #if FALSE

sw/source/core/doc/docfly.cxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 #include <fmtcnct.hxx>
 #include <dflyobj.hxx>
 
+// --> OD 2009-07-20 #i73249#
+#include <undoflystrattr.hxx>
+// <--
+
 extern USHORT GetHtmlMode( const SwDocShell* );
 
 
     return aTmpSet.Count() || MAKEFRMS == nMakeFrms;
 }
 
+// --> OD 2009-07-20 #i73249#
+void SwDoc::SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
+                            const String& sNewTitle )
+{
+    if ( rFlyFrmFmt.GetObjTitle() == sNewTitle )
+    {
+        return;
+    }
+
+    const bool bFormerIsNoDrawUndoObj( IsNoDrawUndoObj() );
+    SetNoDrawUndoObj( true );
+
+    if ( DoesUndo() )
+    {
+        ClearRedo();
+        AppendUndo( new SwUndoFlyStrAttr( rFlyFrmFmt,
+                                          UNDO_FLYFRMFMT_TITLE,
+                                          rFlyFrmFmt.GetObjTitle(),
+                                          sNewTitle ) );
+    }
+
+    rFlyFrmFmt.SetObjTitle( sNewTitle, true );
+
+    SetNoDrawUndoObj( bFormerIsNoDrawUndoObj );
+
+    SetModified();
+}
+
+void SwDoc::SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
+                                  const String& sNewDescription )
+{
+    if ( rFlyFrmFmt.GetObjDescription() == sNewDescription )
+    {
+        return;
+    }
+
+    const bool bFormerIsNoDrawUndoObj( IsNoDrawUndoObj() );
+    SetNoDrawUndoObj( true );
+
+    if ( DoesUndo() )
+    {
+        ClearRedo();
+        AppendUndo( new SwUndoFlyStrAttr( rFlyFrmFmt,
+                                          UNDO_FLYFRMFMT_DESCRIPTION,
+                                          rFlyFrmFmt.GetObjDescription(),
+                                          sNewDescription ) );
+    }
+
+    rFlyFrmFmt.SetObjDescription( sNewDescription, true );
+
+    SetNoDrawUndoObj( bFormerIsNoDrawUndoObj );
+
+    SetModified();
+}
+// <--
 
 /***************************************************************************
  *	Methode		:	BOOL SwDoc::SetFrmFmtToFly( SwFlyFrm&, SwFrmFmt& )

sw/source/core/doc/notxtfrm.cxx

         if ( pSh->GetWin() && !pSh->IsPreView() )
 		{
 			const SwNoTxtNode* pNd = GetNode()->GetNoTxtNode();
-			String aTxt( pNd->GetAlternateText() );
+            String aTxt( pNd->GetTitle() );
 			if ( !aTxt.Len() && pNd->IsGrfNode() )
 				GetRealURL( *(SwGrfNode*)pNd, aTxt );
 			if( !aTxt.Len() )
                     pGrfNd->TriggerAsyncRetrieveInputStream();
                     // <--
 				}
-				String aTxt( pGrfNd->GetAlternateText() );
+                String aTxt( pGrfNd->GetTitle() );
 				if ( !aTxt.Len() )
 					GetRealURL( *pGrfNd, aTxt );
                 ::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, FALSE );
 				((SwNoTxtFrm*)this)->nWeight = -1;
 				String aText;
 				if ( !nResId &&
-					!(aText = pGrfNd->GetAlternateText()).Len() &&
+                     !(aText = pGrfNd->GetTitle()).Len() &&
 					 (!GetRealURL( *pGrfNd, aText ) || !aText.Len()))
 				{
 					nResId = STR_COMCORE_READERROR;

sw/source/core/docnode/ndnotxt.cxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 #include <istyleaccess.hxx>
 #include <SwStyleNameMapper.hxx>
 
+// --> OD 2009-07-13 #i73249#
+#include <frmfmt.hxx>
+// <--
+
 SwNoTxtNode::SwNoTxtNode( const SwNodeIndex & rWhere,
 				  const BYTE nNdType,
 				  SwGrfFmtColl *pGrfColl,
 	return aRet;
 }
 
+// --> OD 2009-07-14 #i73249#
+void SwNoTxtNode::SetTitle( const String& rTitle, bool bBroadcast )
+{
+    // Title attribute of <SdrObject> replaces own AlternateText attribute
+    SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(GetFlyFmt());
+    ASSERT( pFlyFmt,
+            "<SwNoTxtNode::SetTitle(..)> - missing <SwFlyFrmFmt> instance" );
+    if ( !pFlyFmt )
+    {
+        return;
+    }
 
-void SwNoTxtNode::SetAlternateText( const String& rTxt, sal_Bool bBroadcast )
-{
-	if( bBroadcast )
-	{
-		SwStringMsgPoolItem aOld( RES_ALT_TEXT_CHANGED, aAlternateText );
-		SwStringMsgPoolItem aNew( RES_ALT_TEXT_CHANGED, rTxt );
-		aAlternateText = rTxt;
-		Modify( &aOld, &aNew );
-	}
-	else
-	{
-		aAlternateText = rTxt;
-	}
+    pFlyFmt->SetObjTitle( rTitle, bBroadcast );
 }
 
+const String SwNoTxtNode::GetTitle() const
+{
+    const SwFlyFrmFmt* pFlyFmt = dynamic_cast<const SwFlyFrmFmt*>(GetFlyFmt());
+    ASSERT( pFlyFmt,
+            "<SwNoTxtNode::GetTitle(..)> - missing <SwFlyFrmFmt> instance" );
+    if ( !pFlyFmt )
+    {
+        return aEmptyStr;
+    }
+
+    return pFlyFmt->GetObjTitle();
+}
+
+void SwNoTxtNode::SetDescription( const String& rDescription, bool bBroadcast )
+{
+    SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(GetFlyFmt());
+    ASSERT( pFlyFmt,
+            "<SwNoTxtNode::SetDescription(..)> - missing <SwFlyFrmFmt> instance" );
+    if ( !pFlyFmt )
+    {
+        return;
+    }
+
+    pFlyFmt->SetObjDescription( rDescription, bBroadcast );
+}
+
+const String SwNoTxtNode::GetDescription() const
+{
+    const SwFlyFrmFmt* pFlyFmt = dynamic_cast<const SwFlyFrmFmt*>(GetFlyFmt());
+    ASSERT( pFlyFmt,
+            "<SwNoTxtNode::GetDescription(..)> - missing <SwFlyFrmFmt> instance" );
+    if ( !pFlyFmt )
+    {
+        return aEmptyStr;
+    }
+
+    return pFlyFmt->GetObjDescription();
+}
+// <--

sw/source/core/edit/editsh.cxx

 
 
 // alternativen Text abfragen/setzen
-const String& SwEditShell::GetAlternateText() const
-{
-	SwPaM* pCrsr = GetCrsr();
-	const SwNoTxtNode* pNd;
-	if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) )
-		return pNd->GetAlternateText();
+//const String& SwEditShell::GetAlternateText() const
+//{
+//    SwPaM* pCrsr = GetCrsr();
+//    const SwNoTxtNode* pNd;
+//    if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) )
+//        return pNd->GetAlternateText();
 
-	return aEmptyStr;
-}
+//    return aEmptyStr;
+//}
 
 
-void SwEditShell::SetAlternateText( const String& rTxt )
-{
-	SwPaM* pCrsr = GetCrsr();
-	SwNoTxtNode* pNd;
-	if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) )
-    {
-		pNd->SetAlternateText( rTxt, sal_True );
-        GetDoc()->SetModified();
-    }
-}
+//void SwEditShell::SetAlternateText( const String& rTxt )
+//{
+//    SwPaM* pCrsr = GetCrsr();
+//    SwNoTxtNode* pNd;
+//    if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) )
+//    {
+//        pNd->SetAlternateText( rTxt, sal_True );
+//        GetDoc()->SetModified();
+//    }
+//}
 
 
 const PolyPolygon *SwEditShell::GetGraphicPolygon() const

sw/source/core/frmedt/fefly1.cxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 
     EndAction();
 }
+
+// --> OD 2009-07-13 #i73249#
+const String SwFEShell::GetObjTitle() const
+{
+    String aTitle;
+
+    if ( Imp()->HasDrawView() )
+    {
+        const SdrMarkList *pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList();
+        if ( pMrkList->GetMarkCount() == 1 )
+        {
+            const SdrObject* pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
+            const SwFrmFmt* pFmt = FindFrmFmt( pObj );
+            if ( pFmt->Which() == RES_FLYFRMFMT )
+            {
+                aTitle = dynamic_cast<const SwFlyFrmFmt*>(pFmt)->GetObjTitle();
+            }
+            else
+            {
+                aTitle = pObj->GetTitle();
+            }
+        }
+    }
+
+    return aTitle;
+}
+
+void SwFEShell::SetObjTitle( const String& rTitle )
+{
+    if ( Imp()->HasDrawView() )
+    {
+        const SdrMarkList *pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList();
+        if ( pMrkList->GetMarkCount() == 1 )
+        {
+            SdrObject* pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
+            SwFrmFmt* pFmt = FindFrmFmt( pObj );
+            if ( pFmt->Which() == RES_FLYFRMFMT )
+            {
+                GetDoc()->SetFlyFrmTitle( *(dynamic_cast<SwFlyFrmFmt*>(pFmt)),
+                                          rTitle );
+            }
+            else
+            {
+                pObj->SetTitle( rTitle );
+            }
+        }
+    }
+}
+
+const String SwFEShell::GetObjDescription() const
+{
+    String aDescription;
+
+    if ( Imp()->HasDrawView() )
+    {
+        const SdrMarkList *pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList();
+        if ( pMrkList->GetMarkCount() == 1 )
+        {
+            const SdrObject* pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
+            const SwFrmFmt* pFmt = FindFrmFmt( pObj );
+            if ( pFmt->Which() == RES_FLYFRMFMT )
+            {
+                aDescription = dynamic_cast<const SwFlyFrmFmt*>(pFmt)->GetObjDescription();
+            }
+            else
+            {
+                aDescription = pObj->GetDescription();
+            }
+        }
+    }
+
+    return aDescription;
+}
+
+void SwFEShell::SetObjDescription( const String& rDescription )
+{
+    if ( Imp()->HasDrawView() )
+    {
+        const SdrMarkList *pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList();
+        if ( pMrkList->GetMarkCount() == 1 )
+        {
+            SdrObject* pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
+            SwFrmFmt* pFmt = FindFrmFmt( pObj );
+            if ( pFmt->Which() == RES_FLYFRMFMT )
+            {
+                GetDoc()->SetFlyFrmDescription( *(dynamic_cast<SwFlyFrmFmt*>(pFmt)),
+                                                rDescription );
+            }
+            else
+            {
+                pObj->SetDescription( rDescription );
+            }
+        }
+    }
+}
+// <--

sw/source/core/graphic/ndgrf.cxx

 	SwGrfNode* pGrfNd = pDoc->GetNodes().MakeGrfNode( rIdx, sFile, sFilter,
 													&aTmpGrf, pColl,
 											(SwAttrSet*)GetpSwAttrSet() );
-	pGrfNd->SetAlternateText( GetAlternateText() );
+    pGrfNd->SetTitle( GetTitle() );
+    pGrfNd->SetDescription( GetDescription() );
     pGrfNd->SetContour( HasContour(), HasAutomaticContour() );
 	return pGrfNd;
 }

sw/source/core/inc/undoflystrattr.hxx

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwUndoPageDesc.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _UNDO_FLY_STR_ATTR_HXX
+#define _UNDO_FLY_STR_ATTR_HXX
+
+#include <undobj.hxx>
+#include <swundo.hxx>
+
+class SwFlyFrmFmt;
+class String;
+
+class SwUndoFlyStrAttr : public SwUndo
+{
+    public:
+        SwUndoFlyStrAttr( SwFlyFrmFmt& rFlyFrmFmt,
+                          const SwUndoId eUndoId,
+                          const String& sOldStr,
+                          const String& sNewStr );
+        virtual ~SwUndoFlyStrAttr();
+
+        virtual void Undo( SwUndoIter & rIt );
+        virtual void Redo( SwUndoIter & rIt );
+        virtual void Repeat( SwUndoIter & rIt );
+
+        virtual SwRewriter GetRewriter() const;
+
+    private:
+        SwFlyFrmFmt& mrFlyFrmFmt;
+        const String msOldStr;
+        const String msNewStr;
+};
+
+#endif // _UNDO_FLY_STR_ATTR_HXX

sw/source/core/layout/atrfrm.cxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 	return sal_True;
 }
 
+// --> OD 2009-07-14 #i73249#
+void SwFlyFrmFmt::SetObjTitle( const String& rTitle, bool bBroadcast )
+{
+    SdrObject* pMasterObject = FindSdrObject();
+    ASSERT( pMasterObject,
+            "<SwNoTxtNode::SetObjTitle(..)> - missing <SdrObject> instance" );
+    if ( !pMasterObject )
+    {
+        return;
+    }
+
+    if( bBroadcast )
+    {
+        SwStringMsgPoolItem aOld( RES_TITLE_CHANGED, pMasterObject->GetTitle() );
+        SwStringMsgPoolItem aNew( RES_TITLE_CHANGED, rTitle );
+        pMasterObject->SetTitle( rTitle );
+        Modify( &aOld, &aNew );
+    }
+    else
+    {
+        pMasterObject->SetTitle( rTitle );
+    }
+}
+
+const String SwFlyFrmFmt::GetObjTitle() const
+{
+    const SdrObject* pMasterObject = FindSdrObject();
+    ASSERT( pMasterObject,
+            "<SwFlyFrmFmt::GetObjTitle(..)> - missing <SdrObject> instance" );
+    if ( !pMasterObject )
+    {
+        return aEmptyStr;
+    }
+
+    return pMasterObject->GetTitle();
+}
+