openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1543679 [30/32] - in /openoffice/branches/capstone2013: ./ main/ main/accessibility/inc/accessibility/extended/ main/accessibility/inc/accessibility/helper/ main/accessibility/inc/accessibility/standard/ main/accessibility/source/extended/...
Date Wed, 20 Nov 2013 00:50:01 GMT
Modified: openoffice/branches/capstone2013/main/sw/source/ui/shells/textfld.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/shells/textfld.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/shells/textfld.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/shells/textfld.cxx Wed Nov 20 00:49:46 2013
@@ -45,6 +45,7 @@
 #include <fldwrap.hxx>
 #include <redline.hxx>
 #include <view.hxx>
+#include <viewopt.hxx>
 #include <wrtsh.hxx>
 #include <basesh.hxx>
 #include <wrtsh.hxx>
@@ -167,22 +168,37 @@ void SwTextShell::ExecField(SfxRequest &
 		}
 		break;
 
-		case FN_GOTO_NEXT_INPUTFLD:
-		case FN_GOTO_PREV_INPUTFLD:
-			{
-				sal_Bool bRet = sal_False;
-				SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD );
-				if( pFld && rSh.MoveFldType( pFld,
-							FN_GOTO_NEXT_INPUTFLD == nSlot ))
-				{
-					rSh.ClearMark();
-					rSh.StartInputFldDlg( rSh.GetCurFld(), sal_False );
-					bRet = sal_True;
-				}
+        case FN_GOTO_NEXT_INPUTFLD:
+        case FN_GOTO_PREV_INPUTFLD:
+            {
+                sal_Bool bRet = sal_False;
+                SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD );
+                const bool bAddSetExpressionFlds = !( rSh.GetViewOptions()->IsReadonly() );
+                if ( pFld != NULL
+                     && rSh.MoveFldType(
+                            pFld,
+                            FN_GOTO_NEXT_INPUTFLD == nSlot,
+                            USHRT_MAX,
+                            bAddSetExpressionFlds ) )
+                {
+                    rSh.ClearMark();
+                    if ( dynamic_cast<SwInputField*>(rSh.GetCurFld( true )) != NULL )
+                    {
+                        rSh.SttSelect();
+                        rSh.SelectTxt(
+                            rSh.StartOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) + 1,
+                            rSh.EndOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) - 1 );
+                    }
+                    else
+                    {
+                        rSh.StartInputFldDlg( rSh.GetCurFld( true ), sal_False );
+                    }
+                    bRet = sal_True;
+                }
 
-				rReq.SetReturnValue( SfxBoolItem( nSlot, bRet ));
-			}
-			break;
+                rReq.SetReturnValue( SfxBoolItem( nSlot, bRet ));
+            }
+            break;
 
 		default:
 			bMore = sal_True;
@@ -340,7 +356,7 @@ void SwTextShell::ExecField(SfxRequest &
 			break;
 			case FN_POSTIT:
 			{
-	            SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
+	            SwPostItField* pPostIt = dynamic_cast<SwPostItField*>(aFldMgr.GetCurFld());
       	        sal_Bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
 				if (bNew || GetView().GetPostItMgr()->IsAnswer())
 				{
@@ -605,42 +621,36 @@ FIELD_INSERT:
 
 void SwTextShell::StateField( SfxItemSet &rSet )
 {
-	SwWrtShell& rSh = GetShell();
-	SfxWhichIter aIter( rSet );
-	const SwField* pField = 0;
-	int bGetField = sal_False;
-	sal_uInt16 nWhich = aIter.FirstWhich();
-
-	while (nWhich)
-	{
-		switch (nWhich)
-		{
-            case FN_DELETE_COMMENT:
-			case FN_DELETE_NOTE_AUTHOR:
-			case FN_DELETE_ALL_NOTES:
-			case FN_HIDE_NOTE:
-			case FN_HIDE_NOTE_AUTHOR:
-			case FN_HIDE_ALL_NOTES:
-				{
-					SwPostItMgr* pPostItMgr = GetView().GetPostItMgr();
-					if ( !pPostItMgr )
-						rSet.InvalidateItem( nWhich );
-                    else if ( !pPostItMgr->HasActiveSidebarWin() )
-					{
-                        rSet.InvalidateItem( FN_DELETE_COMMENT );
-						rSet.InvalidateItem( FN_HIDE_NOTE );
-					}
-				}
-			break;
-			case FN_EDIT_FIELD:
-			{
-                /* #108536# Fields can be selected, too now. Removed
-
-                if( rSh.HasSelection() )
- 					rSet.DisableItem(nWhich);
-                else ...
-                */
+    SwWrtShell& rSh = GetShell();
+    SfxWhichIter aIter( rSet );
+    const SwField* pField = 0;
+    int bGetField = sal_False;
+    sal_uInt16 nWhich = aIter.FirstWhich();
+
+    while (nWhich)
+    {
+        switch (nWhich)
+        {
+        case FN_DELETE_COMMENT:
+        case FN_DELETE_NOTE_AUTHOR:
+        case FN_DELETE_ALL_NOTES:
+        case FN_HIDE_NOTE:
+        case FN_HIDE_NOTE_AUTHOR:
+        case FN_HIDE_ALL_NOTES:
+            {
+                SwPostItMgr* pPostItMgr = GetView().GetPostItMgr();
+                if ( !pPostItMgr )
+                    rSet.InvalidateItem( nWhich );
+                else if ( !pPostItMgr->HasActiveSidebarWin() )
+                {
+                    rSet.InvalidateItem( FN_DELETE_COMMENT );
+                    rSet.InvalidateItem( FN_HIDE_NOTE );
+                }
+            }
+            break;
 
+        case FN_EDIT_FIELD:
+            {
                 if( !bGetField )
                 {
                     pField = rSh.GetCurFld();
@@ -654,65 +664,111 @@ void SwTextShell::StateField( SfxItemSet
                     RES_AUTHORITY == nTempWhich )
                     rSet.DisableItem( nWhich );
                 else if( RES_DDEFLD == nTempWhich &&
-                        !((SwDDEFieldType*)pField->GetTyp())->GetBaseLink().IsVisible())
+                    !((SwDDEFieldType*)pField->GetTyp())->GetBaseLink().IsVisible())
                 {
                     // nested links cannot be edited
                     rSet.DisableItem( nWhich );
                 }
-			}
-			break;
-			case FN_EXECUTE_MACROFIELD:
-			{
-				if(!bGetField)
-				{
-					pField = rSh.GetCurFld();
-					bGetField = sal_True;
-				}
-				if(!pField || pField->GetTyp()->Which() != RES_MACROFLD)
-					rSet.DisableItem(nWhich);
-			}
-			break;
+            }
+            break;
 
-			case FN_INSERT_FIELD:
-			{
-				SfxViewFrame* pVFrame = GetView().GetViewFrame();
-                //#i5788# prevent closing of the field dialog while a modal dialog ( Input field dialog ) is active
-                if(!pVFrame->IsInModalMode() &&
+        case FN_EXECUTE_MACROFIELD:
+            {
+                if(!bGetField)
+                {
+                    pField = rSh.GetCurFld();
+                    bGetField = sal_True;
+                }
+                if(!pField || pField->GetTyp()->Which() != RES_MACROFLD)
+                    rSet.DisableItem(nWhich);
+            }
+            break;
+
+        case FN_INSERT_FIELD:
+            {
+                if ( rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem(nWhich);
+                }
+                else
+                {
+                    SfxViewFrame* pVFrame = GetView().GetViewFrame();
+                    //#i5788# prevent closing of the field dialog while a modal dialog ( Input field dialog ) is active
+                    if(!pVFrame->IsInModalMode() &&
                         pVFrame->KnowsChildWindow(FN_INSERT_FIELD) && !pVFrame->HasChildWindow(FN_INSERT_FIELD_DATA_ONLY) )
-					rSet.Put(SfxBoolItem( FN_INSERT_FIELD, pVFrame->HasChildWindow(nWhich)));
-				else
-					rSet.DisableItem(FN_INSERT_FIELD);
-			}
-			break;
-			case FN_INSERT_REF_FIELD:
-			{
-				SfxViewFrame* pVFrame = GetView().GetViewFrame();
-				if (!pVFrame->KnowsChildWindow(FN_INSERT_FIELD))
-					rSet.DisableItem(FN_INSERT_REF_FIELD);
-			}
-			break;
-			case FN_INSERT_FIELD_CTRL:
-				rSet.Put(SfxBoolItem( nWhich, GetView().GetViewFrame()->HasChildWindow(FN_INSERT_FIELD)));
-			break;
-			case FN_REDLINE_COMMENT:
-				if (!rSh.GetCurrRedline())
-					rSet.DisableItem(nWhich);
-				break;
-			case FN_POSTIT :
-			case FN_JAVAEDIT :
-				sal_Bool bCurField = sal_False;
+                        rSet.Put(SfxBoolItem( FN_INSERT_FIELD, pVFrame->HasChildWindow(nWhich)));
+                    else
+                        rSet.DisableItem(FN_INSERT_FIELD);
+                }
+            }
+            break;
+
+        case FN_INSERT_REF_FIELD:
+            {
+                SfxViewFrame* pVFrame = GetView().GetViewFrame();
+                if ( !pVFrame->KnowsChildWindow(FN_INSERT_FIELD)
+                     || rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem(FN_INSERT_REF_FIELD);
+                }
+            }
+            break;
+
+        case FN_INSERT_FIELD_CTRL:
+                if ( rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem(nWhich);
+                }
+                else
+                {
+                    rSet.Put(SfxBoolItem( nWhich, GetView().GetViewFrame()->HasChildWindow(FN_INSERT_FIELD)));
+                }
+            break;
+
+        case FN_REDLINE_COMMENT:
+            if (!rSh.GetCurrRedline())
+                rSet.DisableItem(nWhich);
+            break;
+
+        case FN_POSTIT :
+        case FN_JAVAEDIT :
+            {
+                sal_Bool bCurField = sal_False;
                 pField = rSh.GetCurFld();
-				if(nWhich == FN_POSTIT)
-					bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD;
-				else
-					bCurField = pField && pField->GetTyp()->Which() == RES_SCRIPTFLD;
+                if(nWhich == FN_POSTIT)
+                    bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD;
+                else
+                    bCurField = pField && pField->GetTyp()->Which() == RES_SCRIPTFLD;
 
-				if(!bCurField && rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() )
-					rSet.DisableItem(nWhich);
-			break;
-		}
-		nWhich = aIter.NextWhich();
-	}
+                if( !bCurField && rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() )
+                {
+                    rSet.DisableItem(nWhich);
+                }
+                else if ( rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem(nWhich);
+                }
+            }
+
+            break;
+
+        case FN_INSERT_FLD_AUTHOR:
+        case FN_INSERT_FLD_DATE:
+        case FN_INSERT_FLD_PGCOUNT:
+        case FN_INSERT_FLD_PGNUMBER:
+        case FN_INSERT_FLD_TIME:
+        case FN_INSERT_FLD_TITLE:
+        case FN_INSERT_FLD_TOPIC:
+        case FN_INSERT_DBFIELD:
+            if ( rSh.CrsrInsideInputFld() )
+            {
+                rSet.DisableItem(nWhich);
+            }
+            break;
+
+        }
+        nWhich = aIter.NextWhich();
+    }
 }
 
 /*---------------------------------------------------------------------------

Modified: openoffice/branches/capstone2013/main/sw/source/ui/shells/textidx.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/shells/textidx.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/shells/textidx.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/shells/textidx.cxx Wed Nov 20 00:49:46 2013
@@ -211,7 +211,16 @@ void SwTextShell::GetIdxState(SfxItemSet
 			rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, sal_True));
 
 	}
-	else //if( SFX_ITEM_UNKNOWN != rSet.GetItemState( FN_EDIT_IDX_ENTRY_DLG ))
+    else if ( rSh.CrsrInsideInputFld() )
+    {
+        rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG );
+        rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG );
+        rSet.DisableItem( FN_EDIT_AUTH_ENTRY_DLG );
+        rSet.DisableItem( FN_EDIT_IDX_ENTRY_DLG );
+        rSet.DisableItem( FN_INSERT_MULTI_TOX );
+        rSet.DisableItem( FN_REMOVE_CUR_TOX );
+    }
+	else
 	{
 
 		sal_Bool bEnableEdit = sal_True;

Modified: openoffice/branches/capstone2013/main/sw/source/ui/shells/textsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/shells/textsh.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/shells/textsh.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/shells/textsh.cxx Wed Nov 20 00:49:46 2013
@@ -160,35 +160,39 @@ void SwTextShell::ExecInsert(SfxRequest 
 	if(pArgs)
 		pArgs->GetItemState(nSlot, sal_False, &pItem );
 
-	switch( nSlot )
-	{
+    switch( nSlot )
+    {
     case FN_INSERT_STRING:
-		if( pItem )
-			rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue());
-    break;
+        if( pItem )
+            rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue());
+        break;
+
     case FN_INSERT_SOFT_HYPHEN:
-		if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) &&
-			CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 ))
-			rSh.Insert( String( CHAR_SOFTHYPHEN ) );
-		break;
+        if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) &&
+            CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 ))
+            rSh.Insert( String( CHAR_SOFTHYPHEN ) );
+        break;
 
-	case FN_INSERT_HARDHYPHEN:
-	case FN_INSERT_HARD_SPACE:
-		{
-			sal_Unicode cIns = FN_INSERT_HARD_SPACE == nSlot ? CHAR_HARDBLANK
-															 : CHAR_HARDHYPHEN;
+    case FN_INSERT_HARDHYPHEN:
+    case FN_INSERT_HARD_SPACE:
+        {
+            const sal_Unicode cIns = FN_INSERT_HARD_SPACE == nSlot ? CHAR_HARDBLANK : CHAR_HARDHYPHEN;
 
             SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
             SvxAutoCorrect* pACorr = pACfg->GetAutoCorrect();
-            if( pACorr && pACfg->IsAutoFmtByInput() &&
-                    pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
-								AddNonBrkSpace | ChgOrdinalNumber |
-                                ChgToEnEmDash | SetINetAttr | Autocorrect ))
-				rSh.AutoCorrect( *pACorr, cIns );
-			else
-				rSh.Insert( String( cIns ) );
-		}
-		break;
+            if( pACorr && pACfg->IsAutoFmtByInput()
+                && pACorr->IsAutoCorrFlag(
+                    CptlSttSntnc | CptlSttWrd | AddNonBrkSpace | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) )
+            {
+                rSh.AutoCorrect( *pACorr, cIns );
+            }
+            else
+            {
+                rSh.Insert( String( cIns ) );
+            }
+        }
+        break;
+
     case SID_INSERT_RLM :
     case SID_INSERT_LRM :
     case SID_INSERT_ZWNBSP :
@@ -205,30 +209,46 @@ void SwTextShell::ExecInsert(SfxRequest 
         rSh.Insert( String( cIns ) );
     }
     break;
-	case FN_INSERT_BREAK:
-		rSh.SplitNode();
+
+    case FN_INSERT_BREAK:
+        {
+            if( !rSh.CrsrInsideInputFld() )
+            {
+                rSh.SplitNode();
+            }
+            else
+            {
+                rSh.InsertLineBreak();
+            }
+        }
         rReq.Done();
-	break;
-	case FN_INSERT_PAGEBREAK:
-		rSh.InsertPageBreak();
+        break;
+
+    case FN_INSERT_PAGEBREAK:
+        rSh.InsertPageBreak();
         rReq.Done();
-	break;
-	case FN_INSERT_LINEBREAK:
-		rSh.InsertLineBreak();
+        break;
+
+    case FN_INSERT_LINEBREAK:
+        rSh.InsertLineBreak();
         rReq.Done();
-	break;
-	case FN_INSERT_COLUMN_BREAK:
-		rSh.InsertColumnBreak();
+        break;
+
+    case FN_INSERT_COLUMN_BREAK:
+        rSh.InsertColumnBreak();
         rReq.Done();
-	break;
-	case SID_HYPERLINK_SETLINK:
-		if (pItem)
-			InsertHyperlink(*((const SvxHyperlinkItem *)pItem));
+        break;
+
+    case SID_HYPERLINK_SETLINK:
+        if (pItem)
+            InsertHyperlink(*((const SvxHyperlinkItem *)pItem));
         rReq.Done();
-		break;
-	case SID_INSERT_AVMEDIA:
-		rReq.SetReturnValue(SfxBoolItem(nSlot, InsertMediaDlg( rReq )));
-		break;
+        break;
+
+    case SID_INSERT_AVMEDIA:
+        rReq.SetReturnValue(SfxBoolItem(nSlot, InsertMediaDlg( rReq )));
+        break;
+
 	case  SID_INSERT_SOUND:
 	case  SID_INSERT_VIDEO:
 	{
@@ -268,6 +288,7 @@ void SwTextShell::ExecInsert(SfxRequest 
 		}
 	}
 	break;
+
 	case SID_INSERT_OBJECT:
 	case SID_INSERT_PLUGIN:
     {
@@ -715,7 +736,7 @@ void SwTextShell::ExecInsert(SfxRequest 
 			rSh.SplitNode( sal_False, sal_False );
 			rSh.SplitNode( sal_False, sal_False );
 			rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
-			rSh.SetAttr(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST ));
+			rSh.SetAttrItem(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST ));
             if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, sal_True, 0, 0 ))
 				bRet = sal_True;
 			rSh.EnterStdMode();
@@ -755,144 +776,163 @@ bool lcl_IsMarkInSameSection( SwWrtShell
 
 void SwTextShell::StateInsert( SfxItemSet &rSet )
 {
-	sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
-	SfxWhichIter aIter( rSet );
-	SwWrtShell &rSh = GetShell();
-	sal_uInt16 nWhich = aIter.FirstWhich();
-	SvtModuleOptions aMOpt;
+    sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+    SfxWhichIter aIter( rSet );
+    SwWrtShell &rSh = GetShell();
+    sal_uInt16 nWhich = aIter.FirstWhich();
+    SvtModuleOptions aMOpt;
     SfxObjectCreateMode eCreateMode =
                         GetView().GetDocShell()->GetCreateMode();
 
     rSh.Push();
     const sal_Bool bCrsrInHidden = rSh.SelectHiddenRange();
-    // --> OD 2009-08-05 #i103839#, #b6855246#
-    // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <sal_False>
-    // in order to avoid that the view jumps to the visible cursor.
     rSh.Pop();
-    // <--
 
     while ( nWhich )
-	{
-		switch ( nWhich )
-		{
-			case SID_INSERT_SOUND:
-			case SID_INSERT_VIDEO:
-                /*!SvxPluginFileDlg::IsAvailable( nWhich ) ||
-
-                discussed with mba: for performance reasons we skip the IsAvailable call here
-                */
-				if ( GetShell().IsSelFrmMode() ||
-                     SFX_CREATE_MODE_EMBEDDED == eCreateMode || bCrsrInHidden )
-				{
-					rSet.DisableItem( nWhich );
-				}
-				break;
+    {
+        switch ( nWhich )
+        {
+        case SID_INSERT_AVMEDIA:
+        case SID_INSERT_SOUND:
+        case SID_INSERT_VIDEO:
+            if ( GetShell().IsSelFrmMode()
+                 || GetShell().CrsrInsideInputFld()
+                 || SFX_CREATE_MODE_EMBEDDED == eCreateMode
+                 || bCrsrInHidden )
+            {
+                rSet.DisableItem( nWhich );
+            }
+            break;
 
-			case SID_INSERT_DIAGRAM:
-                if( !aMOpt.IsChart() || eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
-				{
-					rSet.DisableItem( nWhich );
-				}
-				break;
+        case SID_INSERT_DIAGRAM:
+            if( !aMOpt.IsChart()
+                || GetShell().CrsrInsideInputFld()
+                || eCreateMode == SFX_CREATE_MODE_EMBEDDED
+                || bCrsrInHidden )
+            {
+                rSet.DisableItem( nWhich );
+            }
+            break;
 
-			case FN_INSERT_SMA:
-                if( !aMOpt.IsMath() || eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
-				{
-					rSet.DisableItem( nWhich );
-				}
-				break;
+            case FN_INSERT_SMA:
+                if( !aMOpt.IsMath()
+                    || eCreateMode == SFX_CREATE_MODE_EMBEDDED
+                    || bCrsrInHidden
+                    || rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem( nWhich );
+                }
+                break;
 
-			case SID_INSERT_FLOATINGFRAME:
-			case SID_INSERT_OBJECT:
-			case SID_INSERT_PLUGIN:
-			{
-				if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
+            case SID_INSERT_FLOATINGFRAME:
+            case SID_INSERT_OBJECT:
+            case SID_INSERT_PLUGIN:
+                {
+                    if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
+                    {
+                        rSet.DisableItem( nWhich );
+                    }
+                    else if( GetShell().IsSelFrmMode()
+                             || GetShell().CrsrInsideInputFld() )
+                    {
+                        rSet.DisableItem( nWhich );
+                    }
+                    else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
+                    {
+                        SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
+                        sal_uInt16 nExport = pHtmlOpt->GetExportMode();
+                        if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
+                            rSet.DisableItem(nWhich);
+                    }
+                }
+                break;
+
+            case FN_INSERT_FRAME_INTERACT_NOCOL :
+            case FN_INSERT_FRAME_INTERACT:
                 {
-					rSet.DisableItem( nWhich );
+                    if( GetShell().IsSelFrmMode()
+                        || GetShell().CrsrInsideInputFld()
+                        || ( 0 != (nHtmlMode & HTMLMODE_ON)
+                             && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS) )
+                        || bCrsrInHidden )
+                        rSet.DisableItem(nWhich);
                 }
-				else if( GetShell().IsSelFrmMode())
-					rSet.DisableItem( nWhich );
-				else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
-				{
-					SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
-					sal_uInt16 nExport = pHtmlOpt->GetExportMode();
-					if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
-						rSet.DisableItem(nWhich);
-				}
-			}
-			break;
-			case FN_INSERT_FRAME_INTERACT_NOCOL :
-			case FN_INSERT_FRAME_INTERACT:
-			{
-				if ( GetShell().IsSelFrmMode() ||
-					(0 != (nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)) || bCrsrInHidden )
-					rSet.DisableItem(nWhich);
-			}
-			break;
-			case SID_HYPERLINK_GETLINK:
-				{
-					SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
+                break;
+
+            case SID_HYPERLINK_GETLINK:
+                {
+                    SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
                     rSh.GetCurAttr( aSet );
 
-					SvxHyperlinkItem aHLinkItem;
-					const SfxPoolItem* pItem;
-					if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
-					{
-						const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
-						aHLinkItem.SetURL(pINetFmt->GetValue());
-						aHLinkItem.SetTargetFrame(pINetFmt->GetTargetFrame());
-						aHLinkItem.SetIntName(pINetFmt->GetName());
-						const SvxMacro *pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSEOVER_OBJECT );
-						if( pMacro )
-							aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSEOVER_OBJECT, *pMacro);
-
-						pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSECLICK_OBJECT );
-						if( pMacro )
-							aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSECLICK_OBJECT, *pMacro);
-
-						pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSEOUT_OBJECT );
-						if( pMacro )
-							aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSEOUT_OBJECT, *pMacro);
-
-						// Text des Links besorgen
-						rSh.StartAction();
-						rSh.CreateCrsr();
-						rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,sal_True);
-						String sLinkName = rSh.GetSelTxt();
-						aHLinkItem.SetName(sLinkName);
-						aHLinkItem.SetInsertMode(HLINK_FIELD);
-						rSh.DestroyCrsr();
-						rSh.EndAction();
-					}
-					else
-					{
-						String sReturn = rSh.GetSelTxt();
-						sReturn.Erase(255);
-						sReturn.EraseTrailingChars();
-						aHLinkItem.SetName(sReturn);
-					}
+                    SvxHyperlinkItem aHLinkItem;
+                    const SfxPoolItem* pItem;
+                    if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
+                    {
+                        const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
+                        aHLinkItem.SetURL(pINetFmt->GetValue());
+                        aHLinkItem.SetTargetFrame(pINetFmt->GetTargetFrame());
+                        aHLinkItem.SetIntName(pINetFmt->GetName());
+                        const SvxMacro *pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSEOVER_OBJECT );
+                        if( pMacro )
+                            aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSEOVER_OBJECT, *pMacro);
+
+                        pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSECLICK_OBJECT );
+                        if( pMacro )
+                            aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSECLICK_OBJECT, *pMacro);
+
+                        pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSEOUT_OBJECT );
+                        if( pMacro )
+                            aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSEOUT_OBJECT, *pMacro);
+
+                        // Text des Links besorgen
+                        rSh.StartAction();
+                        rSh.CreateCrsr();
+                        rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,sal_True);
+                        String sLinkName = rSh.GetSelTxt();
+                        aHLinkItem.SetName(sLinkName);
+                        aHLinkItem.SetInsertMode(HLINK_FIELD);
+                        rSh.DestroyCrsr();
+                        rSh.EndAction();
+                    }
+                    else
+                    {
+                        String sReturn = rSh.GetSelTxt();
+                        sReturn.Erase(255);
+                        sReturn.EraseTrailingChars();
+                        aHLinkItem.SetName(sReturn);
+                    }
 
-					aHLinkItem.SetInsertMode((SvxLinkInsertMode)(aHLinkItem.GetInsertMode() |
-						((nHtmlMode & HTMLMODE_ON) != 0 ? HLINK_HTMLMODE : 0)));
-					aHLinkItem.SetMacroEvents (	HYPERDLG_EVENT_MOUSEOVER_OBJECT|
-								HYPERDLG_EVENT_MOUSECLICK_OBJECT | HYPERDLG_EVENT_MOUSEOUT_OBJECT );
+                    aHLinkItem.SetInsertMode((SvxLinkInsertMode)(aHLinkItem.GetInsertMode() |
+                        ((nHtmlMode & HTMLMODE_ON) != 0 ? HLINK_HTMLMODE : 0)));
+                    aHLinkItem.SetMacroEvents (	HYPERDLG_EVENT_MOUSEOVER_OBJECT|
+                        HYPERDLG_EVENT_MOUSECLICK_OBJECT | HYPERDLG_EVENT_MOUSEOUT_OBJECT );
 
-					rSet.Put(aHLinkItem);
-				}
-				break;
+                    rSet.Put(aHLinkItem);
+                }
+                break;
+
+            case FN_INSERT_FRAME:
+                if (rSh.IsSelFrmMode() )
+                {
+                    const int nSel = rSh.GetSelectionType();
+                    if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCrsrInHidden )
+                        rSet.DisableItem(nWhich);
+                }
+                else if ( rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem(nWhich);
+                }
+                break;
+
+            case FN_INSERT_HRULER :
+                if( (rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel())
+                    || bCrsrInHidden
+                    || rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem(nWhich);
+                }
+                break;
 
-			case FN_INSERT_FRAME:
-				if(rSh.IsSelFrmMode())
-				{
-					const int nSel = rSh.GetSelectionType();
-					if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCrsrInHidden )
-						rSet.DisableItem(nWhich);
-				}
-			break;
-			case FN_INSERT_HRULER :
-                if((rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden )
-					rSet.DisableItem(nWhich);
-			break;
             case FN_FORMAT_COLUMN :
             {
                 //#i80458# column dialog cannot work if the selection contains different page styles and different sections
@@ -1187,7 +1227,7 @@ void SwTextShell::InsertSymbol( SfxReque
 
 			rSh.SetMark();
 			rSh.ExtendSelection( sal_False, aChars.Len() );
-			rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND | nsSetAttrMode::SETATTR_NOFORMATATTR );
+			rSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND | nsSetAttrMode::SETATTR_NOFORMATATTR );
 			if( !rSh.IsCrsrPtAtEnd() )
 				rSh.SwapPam();
 
@@ -1197,7 +1237,7 @@ void SwTextShell::InsertSymbol( SfxReque
             // SETATTR_DONTEXPAND does not work if there are already hard attributes.
             // Therefore we have to restore the font attributes.
             rSh.SetMark();
-            rSh.SetAttr( aRestoreSet );
+            rSh.SetAttrSet( aRestoreSet );
             rSh.ClearMark();
             // <--
 

Modified: openoffice/branches/capstone2013/main/sw/source/ui/shells/textsh1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/shells/textsh1.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/shells/textsh1.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/shells/textsh1.cxx Wed Nov 20 00:49:46 2013
@@ -255,7 +255,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh,
 			rWrtSh.AutoUpdatePara(pColl, aTmpSet);
 		}
 		else
-			rWrtSh.SetAttr( aTmpSet );
+			rWrtSh.SetAttrSet( aTmpSet );
 		if (pReq)
 			pReq->Done(aTmpSet);
 		if(bInsert)
@@ -462,7 +462,7 @@ void SwTextShell::Execute(SfxRequest &rR
                 SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
                                     rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
                                     //pCharset ? (CharSet) pCharset->GetValue() : RTL_TEXTENCODING_DONTKNOW );
-                rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
+                rWrtSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
                 rWrtSh.ResetSelect(0, sal_False);
                 rWrtSh.EndSelect();
                 rWrtSh.GotoFtnTxt();
@@ -1039,7 +1039,7 @@ void SwTextShell::Execute(SfxRequest &rR
                         if ( ((SfxStringItem*)pItem)->GetValue().Len() )
                             rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
                     }
-                    rWrtSh.SetAttr( *pSet );
+                    rWrtSh.SetAttrSet( *pSet );
 //                    rWrtSh.EndUndo( UNDO_END );
                     rWrtSh.EndAction();
                     SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl();
@@ -1119,8 +1119,35 @@ void SwTextShell::Execute(SfxRequest &rR
 
 		case SID_DEC_INDENT:
 		case SID_INC_INDENT:
+//IAccessibility2 Implementation 2009-----
+			//According to the requirement, modified the behavior when user
+			//using the indent button on the toolbar. Now if we increase/decrease indent for a
+			//paragraph which has bullet style it will increase/decrease the bullet level.
+			{
+				//If the current paragraph has bullet call the function to 
+				//increase or decrease the bullet level.
+				//Why could I know wheter a paragraph has bullet or not by checking the below conditions?
+				//Please refer to the "case KEY_TAB:" section in SwEditWin::KeyInput(..) :
+				//		if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
+				//					!rSh.HasReadonlySel() )
+				//				eKeyState = KS_NumDown;
+				//Above code demonstrates that when the cursor is at the start of a paragraph which has bullet,
+				//press TAB will increase the bullet level.
+				//So I copied from that ^^
+				if ( rWrtSh.GetCurNumRule() && !rWrtSh.HasReadonlySel() )
+				{
+					rWrtSh.NumUpDown( SID_INC_INDENT == nSlot );
+				}
+				else//execute the original processing functions
+				{
+					//below is copied of the old codes
 			rWrtSh.MoveLeftMargin( SID_INC_INDENT == nSlot,
 									rReq.GetModifier() != KEY_MOD1 );
+				}
+			}
+			//rWrtSh.MoveLeftMargin( SID_INC_INDENT == nSlot,
+			//						rReq.GetModifier() != KEY_MOD1 );
+//-----IAccessibility2 Implementation 2009
 			rReq.Done();
 			break;
 		case FN_DEC_INDENT_OFFSET:
@@ -1143,7 +1170,7 @@ void SwTextShell::Execute(SfxRequest &rR
 				// besteht eine Selektion, wird sie gleich gefaerbt
 				if(!pApply && rWrtSh.HasSelection())
 				{
-                    rWrtSh.SetAttr(SvxColorItem (aSet, RES_CHRATR_COLOR));
+                    rWrtSh.SetAttrItem(SvxColorItem (aSet, RES_CHRATR_COLOR));
 				}
 				else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
 				{
@@ -1151,17 +1178,6 @@ void SwTextShell::Execute(SfxRequest &rR
 				}
 
                 rReq.Done();
-/*		 		OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
-				SwEditWin& rEdtWin = GetView().GetEditWin();
-
-				SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
-				SvxColorItem aItem(aSet, RES_CHRATR_COLOR);
-
-				if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
-				{
-					GetShell().SetAttr(aItem);
-				}
-*/
 			}
 		}
 		break;
@@ -1183,7 +1199,7 @@ void SwTextShell::Execute(SfxRequest &rR
 					aBrushItem.SetColor(aSet);
 				else
 					aBrushItem.SetColor(Color(COL_TRANSPARENT));
-				rWrtSh.SetAttr( aBrushItem );
+				rWrtSh.SetAttrItem( aBrushItem );
 			}
 			else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
 			{
@@ -1192,15 +1208,6 @@ void SwTextShell::Execute(SfxRequest &rR
 
             rReq.Done();
 
-/*			OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
-			if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
-			{
-				Brush aBrush(pItem ? BRUSH_SOLID : BRUSH_NULL);
-				if(pItem)
-					aBrush.SetColor( aSet );
-				GetShell().SetAttr( SvxBrushItem(aBrush, RES_CHRATR_BACKGROUND) );
-			}
-*/
 		}
 		break;
 		case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
@@ -1215,12 +1222,12 @@ void SwTextShell::Execute(SfxRequest &rR
 
 				if(nSlot == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
 				{
-					rWrtSh.SetAttr( SvxBrushItem(
-						rEdtWin.GetTextBackColor(), RES_CHRATR_BACKGROUND) );
+					rWrtSh.SetAttrItem(
+                        SvxBrushItem( rEdtWin.GetTextBackColor(), RES_CHRATR_BACKGROUND) );
 				}
 				else
-					rWrtSh.SetAttr( SvxColorItem( rEdtWin.GetTextColor(),
-																RES_CHRATR_COLOR) );
+					rWrtSh.SetAttrItem(
+                        SvxColorItem( rEdtWin.GetTextColor(), RES_CHRATR_COLOR) );
 			}
 			else
 			{
@@ -1464,32 +1471,59 @@ void SwTextShell::GetState( SfxItemSet &
                 rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART,
                     rSh.IsNumRuleStart()));
         break;
-		case FN_EDIT_FORMULA:
-		case SID_CHARMAP:
-			{
-				const int nType = rSh.GetSelectionType();
-				if (!(nType & nsSelectionType::SEL_TXT) &&
-					!(nType & nsSelectionType::SEL_TBL) &&
-					!(nType & nsSelectionType::SEL_NUM))
-					rSet.DisableItem(nWhich);
-			}
-			break;
 
-		case FN_INSERT_ENDNOTE:
-		case FN_INSERT_FOOTNOTE:
-		case FN_INSERT_FOOTNOTE_DLG:
-			{
-				const sal_uInt16 nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
-										FRMTYPE_FOOTER  | FRMTYPE_FOOTNOTE;
-				if ( (rSh.GetFrmType(0,sal_True) & nNoType) )
-					rSet.DisableItem(nWhich);
-			}
-			break;
-		case FN_INSERT_TABLE:
-			if ( rSh.GetTableFmt() ||
-					(rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
-				rSet.DisableItem( nWhich );
-			break;
+        case FN_EDIT_FORMULA:
+        case SID_CHARMAP:
+            {
+                const int nType = rSh.GetSelectionType();
+                if (!(nType & nsSelectionType::SEL_TXT) &&
+                    !(nType & nsSelectionType::SEL_TBL) &&
+                    !(nType & nsSelectionType::SEL_NUM))
+                {
+                    rSet.DisableItem(nWhich);
+                }
+                else if ( nWhich == FN_EDIT_FORMULA
+                          && rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem( nWhich );
+                }
+            }
+            break;
+
+        case FN_INSERT_ENDNOTE:
+        case FN_INSERT_FOOTNOTE:
+        case FN_INSERT_FOOTNOTE_DLG:
+            {
+                const sal_uInt16 nNoType =
+                    FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
+                if ( (rSh.GetFrmType(0,sal_True) & nNoType) )
+                    rSet.DisableItem(nWhich);
+
+                if ( rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem( nWhich );
+                }
+            }
+            break;
+
+        case FN_INSERT_HYPERLINK:
+        case SID_INSERTDOC:
+        case FN_INSERT_GLOSSARY:
+        case FN_EXPAND_GLOSSARY:
+            if ( rSh.CrsrInsideInputFld() )
+            {
+                rSet.DisableItem( nWhich );
+            }
+            break;
+
+        case FN_INSERT_TABLE:
+            if ( rSh.CrsrInsideInputFld()
+                 || rSh.GetTableFmt()
+                 || (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
+            {
+                rSet.DisableItem( nWhich );
+            }
+            break;
 
 		case FN_CALCULATE:
 			if ( !rSh.IsSelection() )
@@ -1507,20 +1541,53 @@ void SwTextShell::GetState( SfxItemSet &
 				rSet.Put( SfxBoolItem( nWhich, SvxAutoCorrCfg::Get()->IsAutoFmtByInput() ));
 			}
 			break;
-		case FN_GLOSSARY_DLG:
-			{
-				rSet.Put(SfxBoolItem(nWhich), sal_True);
-			}
-			break;
+
+        case FN_GLOSSARY_DLG:
+            {
+                if ( rSh.CrsrInsideInputFld() )
+                {
+                    rSet.DisableItem( nWhich );
+                }
+                else
+                {
+                    rSet.Put(SfxBoolItem(nWhich), sal_True);
+                }
+            }
+            break;
 
 		case SID_DEC_INDENT:
 		case SID_INC_INDENT:
 			{
+//IAccessibility2 Implementation 2009-----
+				//if the paragrah has bullet we'll do the following things:
+				//1: if the bullet level is the first level, disable the decrease-indent button
+				//2: if the bullet level is the last level, disable the increase-indent button
+				if ( rSh.GetCurNumRule() && !rSh.HasReadonlySel() )
+				{
+					sal_uInt8 nLevel = rSh.GetNumLevel();
+					if ( nLevel == (MAXLEVEL-1) && nWhich == SID_INC_INDENT ||
+						nLevel == 0 && nWhich == SID_DEC_INDENT )
+					{
+						rSet.DisableItem( nWhich );
+					}
+				}
+				else//if the paragraph has no bullet, execute the original functions
+				{
+					//below is copied of the old codes
 				sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
 				nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
 				if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
 										SID_INC_INDENT == nWhich, sal_True ))
 					rSet.DisableItem( nWhich );
+				}
+				//old code begins
+				//sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+				//nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
+				//if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
+				//	SID_INC_INDENT == nWhich, TRUE ))
+				//	rSet.DisableItem( nWhich );
+				//old code ends
+//-----IAccessibility2 Implementation 2009
 			}
 			break;
 
@@ -1557,10 +1624,23 @@ void SwTextShell::GetState( SfxItemSet &
 				rSet.Put(SfxBoolItem(nWhich, pApply && pApply->nColor == nWhich));
 			}
 			break;
-		case FN_INSERT_BOOKMARK:
-			if( rSh.IsTableMode() )
-				rSet.DisableItem( nWhich );
-			break;
+
+        case FN_INSERT_BOOKMARK:
+            if( rSh.IsTableMode()
+                || rSh.CrsrInsideInputFld() )
+            {
+                rSet.DisableItem( nWhich );
+            }
+            break;
+
+        case FN_INSERT_BREAK_DLG:
+        case FN_INSERT_COLUMN_BREAK:
+        case FN_INSERT_PAGEBREAK:
+            if( rSh.CrsrInsideInputFld() )
+            {
+                rSet.DisableItem( nWhich );
+            }
+            break;
 
 		case FN_INSERT_PAGEHEADER:
 		case FN_INSERT_PAGEFOOTER:
@@ -1596,42 +1676,50 @@ void SwTextShell::GetState( SfxItemSet &
                         (FN_TABLE_SORT_DIALOG == nWhich && !rSh.GetTableFmt()))
 					rSet.DisableItem( nWhich );
 			break;
-			case SID_RUBY_DIALOG:
-            {
-                SvtCJKOptions aCJKOptions;
-                if(!aCJKOptions.IsRubyEnabled())
+
+            case SID_RUBY_DIALOG:
+                {
+                    SvtCJKOptions aCJKOptions;
+                    if( !aCJKOptions.IsRubyEnabled()
+                        || rSh.CrsrInsideInputFld() )
+                    {
+                        GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_False );
+                        rSet.DisableItem(nWhich);
+                    }
+                    else
+                        GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_True );
+                }
+                break;
+
+            case SID_HYPERLINK_DIALOG:
+                if( GetView().GetDocShell()->IsReadOnly()
+                    || ( !GetView().GetViewFrame()->HasChildWindow(nWhich)
+                         && rSh.HasReadonlySel() )
+                    || rSh.CrsrInsideInputFld() )
                 {
-                    GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_False );
                     rSet.DisableItem(nWhich);
                 }
                 else
-                    GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_True );
+                {
+                    rSet.Put(SfxBoolItem( nWhich, 0 != GetView().GetViewFrame()->GetChildWindow( nWhich ) ));
+                }
                 break;
-            }
-            //no break!
-			case SID_HYPERLINK_DIALOG:
-				if( GetView().GetDocShell()->IsReadOnly() ||
-					(!GetView().GetViewFrame()->HasChildWindow(nWhich) &&
-					 rSh.HasReadonlySel()) )
-					rSet.DisableItem(nWhich);
-				else
-					rSet.Put(SfxBoolItem( nWhich, 0 != GetView().
-								GetViewFrame()->GetChildWindow( nWhich ) ));
-				break;
-			case FN_EDIT_HYPERLINK:
+
+            case FN_EDIT_HYPERLINK:
             case FN_REMOVE_HYPERLINK:
             case FN_COPY_HYPERLINK_LOCATION:
-			{
-				SfxItemSet aSet(GetPool(),
-								RES_TXTATR_INETFMT,
-								RES_TXTATR_INETFMT);
-                rSh.GetCurAttr(aSet);
-				if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel())
-				{
-                    rSet.DisableItem(nWhich);
-				}
-			}
-			break;
+                {
+                    SfxItemSet aSet(GetPool(),
+                        RES_TXTATR_INETFMT,
+                        RES_TXTATR_INETFMT);
+                    rSh.GetCurAttr(aSet);
+                    if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel())
+                    {
+                        rSet.DisableItem(nWhich);
+                    }
+                }
+                break;
+
             case SID_TRANSLITERATE_HALFWIDTH:
             case SID_TRANSLITERATE_FULLWIDTH:
             case SID_TRANSLITERATE_HIRAGANA:
@@ -1755,13 +1843,6 @@ void SwTextShell::GetState( SfxItemSet &
             break;
             case FN_NUM_CONTINUE:
             {
-                // --> OD 2009-08-26 #i86492#
-                // Allow continuation of previous list, even if at current cursor
-                // a list is active.
-//                if ( rSh.GetCurNumRule() )
-//                    rSet.DisableItem(nWhich);
-//                else
-                // <--
                 {
                     // --> OD 2009-08-26 #i86492#
                     // Search also for bullet list

Modified: openoffice/branches/capstone2013/main/sw/source/ui/shells/txtattr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/shells/txtattr.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/shells/txtattr.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/shells/txtattr.cxx Wed Nov 20 00:49:46 2013
@@ -149,7 +149,7 @@ void SwTextShell::ExecCharAttr(SfxReques
 				if(eEscape == FN_SET_SUPER_SCRIPT)
 					aEscape.GetEsc() *= -1;
 			}
-			rSh.SetAttr( aEscape );
+			rSh.SetAttrItem( aEscape );
             rReq.AppendItem( aEscape );
             rReq.Done();
 		}
@@ -178,7 +178,7 @@ void SwTextShell::ExecCharAttr(SfxReques
 				break;
 			}
             SvxUnderlineItem aUnderline(eUnderline, RES_CHRATR_UNDERLINE );
-            rSh.SetAttr( aUnderline );
+            rSh.SetAttrItem( aUnderline );
             rReq.AppendItem( aUnderline );
             rReq.Done();
 		}
@@ -234,7 +234,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRe
 
 			if ( pColl )
                 pColl->SetFmtAttr( aINetFmt );
-			else rWrtSh.SetAttr( aINetFmt );
+			else rWrtSh.SetAttrItem( aINetFmt );
             rReq.Done();
 		}
 		break;
@@ -281,7 +281,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRe
 					if( pColl )
                         pColl->SetFmtAttr( aAttrSet );
 					else
-						rWrtSh.SetAttr( aAttrSet );
+						rWrtSh.SetAttrSet( aAttrSet );
 				}
             rReq.Done();
 		}
@@ -345,7 +345,7 @@ void SwTextShell::ExecParaAttr(SfxReques
 	}
 	else
     {
-		rWrtSh.SetAttr( aSet );
+		rWrtSh.SetAttrSet( aSet );
         rReq.Done( aSet );
     }
 }
@@ -508,7 +508,7 @@ SET_LINESPACE:
 		rWrtSh.AutoUpdatePara(pColl, aSet);
 	}
 	else
-		rWrtSh.SetAttr( aSet );
+		rWrtSh.SetAttrSet( aSet );
     rReq.Done();
 }
 
@@ -539,14 +539,14 @@ void SwTextShell::ExecParaAttrArgs(SfxRe
                     pFmt = rSh.FindCharFmtByName( sCharStyleName );
                 aDropItem.SetCharFmt( pFmt );
                 aSet.Put(aDropItem);
-                rSh.SetAttr(aSet);
+                rSh.SetAttrSet(aSet);
             }
         break;
         case FN_FORMAT_DROPCAPS:
         {
 			if(pItem)
             {
-				rSh.SetAttr(*pItem);
+				rSh.SetAttrItem(*pItem);
                 rReq.Done();
             }
 			else
@@ -569,7 +569,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRe
 						if ( ((SfxStringItem*)pItem)->GetValue().Len() )
 							rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
 					}
-					rSh.SetAttr(*pDlg->GetOutputItemSet());
+					rSh.SetAttrSet(*pDlg->GetOutputItemSet());
 					rSh.StartUndo( UNDO_END );
 					rSh.EndAction();
                     rReq.Done(*pDlg->GetOutputItemSet());
@@ -581,7 +581,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRe
 		case SID_ATTR_PARA_PAGEBREAK:
 			if(pItem)
 			{
-				rSh.SetAttr( *pItem );
+				rSh.SetAttrItem( *pItem );
                 rReq.Done();
 			}
 		break;
@@ -594,7 +594,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRe
 					SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL, 0);
 				aCoreSet.Put(*pItem);
 				SfxToSwPageDescAttr( rSh, aCoreSet);
-				rSh.SetAttr(aCoreSet);
+				rSh.SetAttrSet(aCoreSet);
                 rReq.Done();
 			}
 		}

Modified: openoffice/branches/capstone2013/main/sw/source/ui/shells/txtnum.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/shells/txtnum.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/shells/txtnum.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/shells/txtnum.cxx Wed Nov 20 00:49:46 2013
@@ -354,7 +354,7 @@ void SwTextShell::ExecSetNumber(SfxReque
 						 numfunc::GetDefaultPositionAndSpaceMode() );
 	
 					SvxNumRule aTempRule = aTmpRule.MakeSvxNumRule();
-					//Sym3_2508, set unit attribute to NB Manager
+					// set unit attribute to NB Manager
 					SfxItemSet aSet(GetPool(),
 							SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
 							0 );
@@ -407,7 +407,7 @@ void SwTextShell::ExecSetNumber(SfxReque
 						 numfunc::GetDefaultPositionAndSpaceMode() );
 	
 					SvxNumRule aTempRule = aTmpRule.MakeSvxNumRule();
-					//Sym3_2508, set unit attribute to NB Manager
+					// set unit attribute to NB Manager
 					SfxItemSet aSet(GetPool(),
 							SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
 							0 );

Modified: openoffice/branches/capstone2013/main/sw/source/ui/table/convert.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/table/convert.hrc?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/table/convert.hrc (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/table/convert.hrc Wed Nov 20 00:49:46 2013
@@ -35,6 +35,12 @@
 #define FL_OPTIONS                      17
 #define FT_REPEAT_HEADER	18
 #define NF_REPEAT_HEADER	19
+//Table Row Header for ACC Supporting 2010.02.22
+#define FT_EXPLAIN_REPEAT_HEADER		20
+#define CB_LABEL		21
+#define NF_REPEAT_LABEL		22
+#define FT_REPEAT_LABEL		23
+//End table_row_header
 
 #define BT_OK 			100
 #define BT_CANCEL 		101

Modified: openoffice/branches/capstone2013/main/sw/source/ui/table/tabledlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/table/tabledlg.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/table/tabledlg.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/table/tabledlg.cxx Wed Nov 20 00:49:46 2013
@@ -991,11 +991,9 @@ IMPL_LINK( SwTableColumnPage, AutoClickH
 		sEntry += sIndex;
 		pTextArr[i]->SetText( sEntry );
 //IAccessibility2 Impplementaton 2009-----
-		//added by menghu for SODC_5143,12/12/2006
 		String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH);
 		sColumnWidth.SearchAndReplace( DEFINE_CONST_UNICODE("%1"), sIndex );
 		pFieldArr[i]->SetAccessibleName( sColumnWidth );
-		//end of SODC_5143
 //-----IAccessibility2 Impplementaton 2009
 	}
 

Modified: openoffice/branches/capstone2013/main/sw/source/ui/table/tabledlg.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/table/tabledlg.hrc?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/table/tabledlg.hrc (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/table/tabledlg.hrc Wed Nov 20 00:49:46 2013
@@ -102,6 +102,9 @@
 #define FL_VERT_ORIENT          140
 #define RB_FROM_LEFT		144
 
+//IAccessibility2 Impplementaton 2009-----
+#define STR_COLUMN_WIDTH	145
+//-----IAccessibility2 Impplementaton 2009
 #define FT_VERTORIENT       150
 #define LB_VERTORIENT       151
 

Modified: openoffice/branches/capstone2013/main/sw/source/ui/uiview/formatclipboard.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/uiview/formatclipboard.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/uiview/formatclipboard.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/uiview/formatclipboard.cxx Wed Nov 20 00:49:46 2013
@@ -509,7 +509,7 @@ void SwFormatClipboard::Paste( SwWrtShel
                     // #144857# collect items from character style
                     lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
                     sal_uInt16 nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
-		            rWrtShell.SetAttr( aFmt, nFlags );
+                    rWrtShell.SetAttrItem( aFmt, nFlags );
                 }
             }
             if(m_aParaStyle.Len() && !bNoParagraphFormats )
@@ -550,7 +550,7 @@ void SwFormatClipboard::Paste( SwWrtShel
                     rWrtShell.SetFlyFrmAttr(*pTemplateItemSet);
                 else
                 {
-                    rWrtShell.SetAttr(*pTemplateItemSet);
+                    rWrtShell.SetAttrSet(*pTemplateItemSet);
 
                     // additional numbering properties for paragraph styles
                     if( nSelectionType & nsSelectionType::SEL_TXT && rWrtShell.GetCurNumRule() )

Modified: openoffice/branches/capstone2013/main/sw/source/ui/uiview/pview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/uiview/pview.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/uiview/pview.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/uiview/pview.cxx Wed Nov 20 00:49:46 2013
@@ -240,8 +240,11 @@ SwPagePreViewWin::SwPagePreViewWin( Wind
 
 SwPagePreViewWin::~SwPagePreViewWin()
 {
-    if( mpViewShell )
-        delete mpViewShell;
+	//IAccessibility2 Implementation 2009-----
+	// Remove to the deconstruction of SwPagePreView.
+	//if( mpViewShell)
+	//	delete mpViewShell;
+	//-----IAccessibility2 Implementation 2009
 }
 
 /*--------------------------------------------------------------------
@@ -716,46 +719,46 @@ void SwPagePreView::_ExecPgUpAndPgDown( 
                                 SwPagePreViewWin::MV_PAGE_UP :
                                 SwPagePreViewWin::MV_PAGE_DOWN;
             if ( ChgPage( eMvMode, sal_True ) )
-                aViewWin.Invalidate();
+                pViewWin->Invalidate();
         }
         else
         {
             SwTwips nScrollAmount;
             sal_uInt16 nNewSelectedPageNum = 0;
-            const sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+            const sal_uInt16 nVisPages = pViewWin->GetRow() * pViewWin->GetCol();
             if( _bPgUp )
             {
                 if ( pPagePrevwLay->DoesPreviewLayoutRowsFitIntoWindow() )
                 {
                     nScrollAmount = pPagePrevwLay->GetWinPagesScrollAmount( -1 );
-                    if ( (aViewWin.SelectedPage() - nVisPages) > 0 )
-                        nNewSelectedPageNum = aViewWin.SelectedPage() - nVisPages;
+                    if ( (pViewWin->SelectedPage() - nVisPages) > 0 )
+                        nNewSelectedPageNum = pViewWin->SelectedPage() - nVisPages;
                     else
                         nNewSelectedPageNum = 1;
                 }
                 else
-                    nScrollAmount = - Min( aViewWin.GetOutputSize().Height(),
-                                           aViewWin.GetPaintedPreviewDocRect().Top() );
+                    nScrollAmount = - Min( pViewWin->GetOutputSize().Height(),
+                                           pViewWin->GetPaintedPreviewDocRect().Top() );
             }
             else
             {
                 if ( pPagePrevwLay->DoesPreviewLayoutRowsFitIntoWindow() )
                 {
                     nScrollAmount = pPagePrevwLay->GetWinPagesScrollAmount( 1 );
-                    if ( (aViewWin.SelectedPage() + nVisPages) <= mnPageCount )
-                        nNewSelectedPageNum = aViewWin.SelectedPage() + nVisPages;
+                    if ( (pViewWin->SelectedPage() + nVisPages) <= mnPageCount )
+                        nNewSelectedPageNum = pViewWin->SelectedPage() + nVisPages;
                     else
                         nNewSelectedPageNum = mnPageCount;
                 }
                 else
-                    nScrollAmount = Min( aViewWin.GetOutputSize().Height(),
+                    nScrollAmount = Min( pViewWin->GetOutputSize().Height(),
                                          ( pPagePrevwLay->GetPrevwDocSize().Height() -
-                                           aViewWin.GetPaintedPreviewDocRect().Bottom() ) );
+                                           pViewWin->GetPaintedPreviewDocRect().Bottom() ) );
             }
-            aViewWin.Scroll( 0, nScrollAmount );
+            pViewWin->Scroll( 0, nScrollAmount );
             if ( nNewSelectedPageNum != 0 )
             {
-                aViewWin.SetSelectedPage( nNewSelectedPageNum );
+                pViewWin->SetSelectedPage( nNewSelectedPageNum );
             }
             ScrollViewSzChg();
 			// OD 24.03.2003 #108282# - additional invalidate page status.
@@ -766,7 +769,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( 
             };
             SfxBindings& rBindings = GetViewFrame()->GetBindings();
             rBindings.Invalidate( aInval );
-            aViewWin.Invalidate();
+            pViewWin->Invalidate();
         }
     }
 
@@ -801,11 +804,11 @@ void  SwPagePreView::Execute( SfxRequest
                                         SID_ATTR_TABLE_COLUMN)).GetValue();
                 sal_uInt8 nRows = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(
                                         SID_ATTR_TABLE_ROW)).GetValue();
-                aViewWin.CalcWish( nRows, nCols );
+                pViewWin->CalcWish( nRows, nCols );
 
             }
             else
-                SwPreViewZoomDlg( aViewWin ).Execute();
+                SwPreViewZoomDlg( *pViewWin ).Execute();
 
         }
 		break;
@@ -820,7 +823,7 @@ void  SwPagePreView::Execute( SfxRequest
                 ( ( SwViewOption* ) GetViewShell()->GetViewOptions() )->SetPagePrevBookview( bBookPreview );
 					// cast is not gentleman like, but it's common use in writer and in this case
             }
-            if ( aViewWin.SetBookPreviewMode( bBookPreview ) )
+            if ( pViewWin->SetBookPreviewMode( bBookPreview ) )
             {
                 // book preview mode changed. Thus, adjust scrollbars and
                 // invalidate corresponding states.
@@ -832,13 +835,13 @@ void  SwPagePreView::Execute( SfxRequest
                 };
                 SfxBindings& rBindings = GetViewFrame()->GetBindings();
                 rBindings.Invalidate( aInval );
-                aViewWin.Invalidate();
+                pViewWin->Invalidate();
             }
 
         }
 		break;
         case FN_SHOW_TWO_PAGES:
-			aViewWin.CalcWish( nRow, 2 );
+			pViewWin->CalcWish( nRow, 2 );
 			break;
 
 		case FN_PREVIEW_ZOOM:
@@ -932,7 +935,7 @@ void  SwPagePreView::Execute( SfxRequest
             }
             pPagePrevwLay->CalcStartValuesForSelectedPageMove( nHoriMove, nVertMove,
                                 nNewSelectedPage, nNewStartPage, aNewStartPos );
-            if ( aViewWin.SelectedPage() != nNewSelectedPage )
+            if ( pViewWin->SelectedPage() != nNewSelectedPage )
             {
                 if ( pPagePrevwLay->IsPageVisible( nNewSelectedPage ) )
                 {
@@ -943,8 +946,8 @@ void  SwPagePreView::Execute( SfxRequest
                 }
                 else
                 {
-                    aViewWin.SetSelectedPage( nNewSelectedPage );
-                    aViewWin.SetSttPage( nNewStartPage );
+                    pViewWin->SetSelectedPage( nNewSelectedPage );
+                    pViewWin->SetSttPage( nNewStartPage );
                     int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, sal_True );
                     bRefresh = 0 != nRet;
                 }
@@ -972,11 +975,11 @@ void  SwPagePreView::Execute( SfxRequest
         }
         case FN_START_OF_LINE:
         case FN_START_OF_DOCUMENT:
-            aViewWin.SetSelectedPage( 1 );
+            pViewWin->SetSelectedPage( 1 );
 			eMvMode = SwPagePreViewWin::MV_DOC_STT;	bRetVal = sal_True;	goto MOVEPAGE;
         case FN_END_OF_LINE:
         case FN_END_OF_DOCUMENT:
-            aViewWin.SetSelectedPage( mnPageCount );
+            pViewWin->SetSelectedPage( mnPageCount );
             eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = sal_True; goto MOVEPAGE;
 MOVEPAGE:
 			{
@@ -992,7 +995,7 @@ MOVEPAGE:
 
 		case FN_PRINT_PAGEPREVIEW:
 		{
-			const SwPagePreViewPrtData* pPPVPD = aViewWin.GetViewShell()->GetDoc()->GetPreViewPrtData();
+			const SwPagePreViewPrtData* pPPVPD = pViewWin->GetViewShell()->GetDoc()->GetPreViewPrtData();
 			// die Sache mit der Orientation
 			if(pPPVPD)
 			{
@@ -1001,7 +1004,7 @@ MOVEPAGE:
 						!= pPPVPD->GetLandscape())
 					pPrinter->SetOrientation(pPPVPD->GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
 			}
-			::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+			::SetAppPrintOptions( pViewWin->GetViewShell(), sal_False );
 			bNormalPrint = sal_False;
 			sal_uInt16 nPrtSlot = SID_PRINTDOC;
 			rReq.SetSlot( nPrtSlot );
@@ -1011,7 +1014,7 @@ MOVEPAGE:
 		}
 		case SID_PRINTDOCDIRECT:
 		case SID_PRINTDOC:
-			::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+			::SetAppPrintOptions( pViewWin->GetViewShell(), sal_False );
 			bNormalPrint = sal_True;
 			SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
 			return;
@@ -1024,7 +1027,7 @@ MOVEPAGE:
 			break;
         case FN_INSERT_BREAK:
         {
-            sal_uInt16 nSelPage = aViewWin.SelectedPage();
+            sal_uInt16 nSelPage = pViewWin->SelectedPage();
             //if a dummy page is selected (e.g. a non-existing right/left page)
             //the direct neighbor is used
             if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage ))
@@ -1041,7 +1044,7 @@ MOVEPAGE:
 	}
 
 	if( bRefresh )
-		aViewWin.Invalidate();
+		pViewWin->Invalidate();
 }
 
 /*--------------------------------------------------------------------
@@ -1096,7 +1099,7 @@ void  SwPagePreView::GetState( SfxItemSe
 		case FN_STAT_PAGE:
 			{
 				String aStr( sPageStr );
-                aViewWin.GetStatusStr( aStr, mnPageCount );
+                pViewWin->GetStatusStr( aStr, mnPageCount );
 				rSet.Put( SfxStringItem( nWhich, aStr) );
 			}
 			break;
@@ -1168,7 +1171,7 @@ void  SwPagePreView::GetState( SfxItemSe
 		break;
 
 		case FN_SHOW_TWO_PAGES:
-			if( 2 == aViewWin.GetCol() && nRow == aViewWin.GetRow() )
+			if( 2 == pViewWin->GetCol() && nRow == pViewWin->GetRow() )
 				rSet.DisableItem( nWhich );
 			break;
 
@@ -1294,7 +1297,7 @@ void SwPagePreView::Init(const SwViewOpt
 
 SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
 	SfxViewShell( pViewFrame, SWVIEWFLAGS ),
-	aViewWin( &pViewFrame->GetWindow(), *this ),
+	pViewWin( new SwPagePreViewWin(&(GetViewFrame())->GetWindow(), *this ) ),//IAccessibility2 Implementation 2009
     nNewPage(USHRT_MAX),
 	pHScrollbar(0),
 	pVScrollbar(0),
@@ -1308,7 +1311,7 @@ SwPagePreView::SwPagePreView(SfxViewFram
     mbFormDesignModeToReset( false )
 {
 	SetName(String::CreateFromAscii("PageView" ));
-	SetWindow( &aViewWin );
+	SetWindow( pViewWin );
 	SetHelpId(SW_PAGEPREVIEW);
     _CreateScrollbar( sal_True );
     _CreateScrollbar( sal_False );
@@ -1343,9 +1346,9 @@ SwPagePreView::SwPagePreView(SfxViewFram
 			// setze die akt. Seite als die erste
 			sal_uInt16 nPhysPg, nVirtPg;
 			((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*sal_False*/sal_True, sal_False );
-			if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
+			if( 1 != pViewWin->GetCol() && 1 == nPhysPg )
 				--nPhysPg;
-			aViewWin.SetSttPage( nPhysPg );
+			pViewWin->SetSttPage( nPhysPg );
 		}
 	}
 
@@ -1358,13 +1361,13 @@ SwPagePreView::SwPagePreView(SfxViewFram
     }
 
     if( pVS )
-		pNew = new ViewShell( *pVS, &aViewWin, 0, VSHELLFLAG_ISPREVIEW );
+		pNew = new ViewShell( *pVS, pViewWin, 0, VSHELLFLAG_ISPREVIEW );
 	else
 		pNew = new ViewShell(
 				*((SwDocShell*)pViewFrame->GetObjectShell())->GetDoc(),
-				&aViewWin, 0, 0, VSHELLFLAG_ISPREVIEW );
+				pViewWin, 0, 0, VSHELLFLAG_ISPREVIEW );
 
-    aViewWin.SetViewShell( pNew );
+    pViewWin->SetViewShell( pNew );
 	pNew->SetSfxViewShell( this );
 	Init();
 }
@@ -1378,6 +1381,15 @@ SwPagePreView::SwPagePreView(SfxViewFram
  SwPagePreView::~SwPagePreView()
 {
 	SetWindow( 0 );
+	//IAccessibility2 Implementation 2009-----
+	ViewShell* pVShell =  pViewWin->GetViewShell();
+	pVShell->SetWin(0);
+	//pViewWin->Hide();
+	if( pVShell)
+		delete pVShell;
+	delete pViewWin;
+	//pViewWin->Hide();
+	//-----IAccessibility2 Implementation 2009
 
 	delete pScrollFill;
 	delete pHScrollbar;
@@ -1476,17 +1488,17 @@ IMPL_LINK_INLINE_END( SwPagePreView, Btn
 
 int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
 {
-	Rectangle aPixVisArea( aViewWin.LogicToPixel( aVisArea ) );
-	int bChg = aViewWin.MovePage( eMvMode ) ||
+	Rectangle aPixVisArea( pViewWin->LogicToPixel( aVisArea ) );
+	int bChg = pViewWin->MovePage( eMvMode ) ||
                eMvMode == SwPagePreViewWin::MV_CALC ||
                eMvMode == SwPagePreViewWin::MV_NEWWINSIZE;
-	aVisArea = aViewWin.PixelToLogic( aPixVisArea );
+	aVisArea = pViewWin->PixelToLogic( aPixVisArea );
 
 	if( bChg )
 	{
 		// Statusleiste updaten
 		String aStr( sPageStr );
-        aViewWin.GetStatusStr( aStr, mnPageCount );
+        pViewWin->GetStatusStr( aStr, mnPageCount );
 		SfxBindings& rBindings = GetViewFrame()->GetBindings();
 
 		if( bUpdateScrollbar )
@@ -1518,7 +1530,7 @@ int SwPagePreView::ChgPage( int eMvMode,
 void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
 {
 //	const long nAdd = bInner ? 0 : ScrollBar::GetWindowOverlapPixel();
-	const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
+	const StyleSettings &rSet = pViewWin->GetSettings().GetStyleSettings();
 	const long nTmp = rSet.GetScrollBarSize();// - nAdd;
     if ( pVScrollbar->IsVisible( sal_False ))
 		rToFill.Right()  = nTmp;
@@ -1538,8 +1550,8 @@ void  SwPagePreView::InnerResizePixel( c
 	CalcAndSetBorderPixel( aBorder, sal_True );
 	Rectangle aRect( rOfst, rSize );
 	aRect += aBorder;
-	ViewResizePixel( aViewWin, aRect.TopLeft(), aRect.GetSize(),
-					aViewWin.GetOutputSizePixel(),
+	ViewResizePixel( *pViewWin, aRect.TopLeft(), aRect.GetSize(),
+					pViewWin->GetOutputSizePixel(),
 					sal_True,
                     *pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, 0,
                     *pScrollFill );
@@ -1557,14 +1569,14 @@ void  SwPagePreView::OuterResizePixel( c
 {
 	SvBorder aBorder;
 	CalcAndSetBorderPixel( aBorder, sal_False );
-	ViewResizePixel( aViewWin, rOfst, rSize, aViewWin.GetOutputSizePixel(),
+	ViewResizePixel( *pViewWin, rOfst, rSize, pViewWin->GetOutputSizePixel(),
                         sal_False, *pVScrollbar,
                         *pHScrollbar, pPageUpBtn, pPageDownBtn, 0, *pScrollFill );
 
 	//EditWin niemals einstellen!
 
-	Size aTmpSize( aViewWin.GetOutputSizePixel() );
-	Point aBottomRight( aViewWin.PixelToLogic( Point( aTmpSize.Width(), aTmpSize.Height() ) ) );
+	Size aTmpSize( pViewWin->GetOutputSizePixel() );
+	Point aBottomRight( pViewWin->PixelToLogic( Point( aTmpSize.Width(), aTmpSize.Height() ) ) );
 	SetVisArea( Rectangle( Point(), aBottomRight ) );
 
 	//Aufruf der DocSzChgd-Methode der Scrollbars ist noetig, da vom maximalen
@@ -1619,15 +1631,15 @@ void SwPagePreView::SetVisArea( const Re
 	//denn dann wir nicht wirklich gepaintet sondern die Rechtecke werden
 	//lediglich (in Dokumentkoordinaten) vorgemerkt.
     if( GetViewShell()->ActionPend() )
-		aViewWin.Update();
+		pViewWin->Update();
 
 	// setze am View-Win die aktuelle Size
 	aVisArea = aLR;
-	aViewWin.SetWinSize( aLR.GetSize() );
+	pViewWin->SetWinSize( aLR.GetSize() );
     // OD 18.12.2002 #103492# - use new mode
     ChgPage( SwPagePreViewWin::MV_NEWWINSIZE, bUpdateScrollbar );
 
-	aViewWin.Invalidate();
+	pViewWin->Invalidate();
 }
 
 /*--------------------------------------------------------------------
@@ -1647,7 +1659,7 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwS
 		// wieviele Seiten scrollen ??
 		String sStateStr(sPageStr);
 		sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
-		if( 1 == aViewWin.GetCol() || !nThmbPos )
+		if( 1 == pViewWin->GetCol() || !nThmbPos )
 			++nThmbPos;
 		sStateStr += String::CreateFromInt32( nThmbPos );
 		Point aPos = pScrollbar->GetParent()->OutputToScreenPixel(
@@ -1691,7 +1703,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, 
             // wieviele Seiten scrollen ??
             sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
             // OD 05.12.2002 #103492# - adjust to new preview functionality
-            if( nThmbPos != aViewWin.SelectedPage() )
+            if( nThmbPos != pViewWin->SelectedPage() )
             {
                 // OD 17.01.2003 #103492# - consider case that page <nThmbPos>
                 // is already visible
@@ -1708,8 +1720,8 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, 
                     // fit or not.
                     if ( !pPagePrevwLay->DoesPreviewLayoutColsFitIntoWindow() )
                     {
-                        aViewWin.SetSttPage( nThmbPos );
-                        aViewWin.SetSelectedPage( nThmbPos );
+                        pViewWin->SetSttPage( nThmbPos );
+                        pViewWin->SetSelectedPage( nThmbPos );
                         ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False );
                         // OD 20.01.2003 #103492# - update scrollbars
                         ScrollViewSzChg();
@@ -1717,16 +1729,16 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, 
                     else
                     {
                         // OD 04.03.2003 #107369# - correct scroll amount
-                        const sal_Int16 nPageDiff = nThmbPos - aViewWin.SelectedPage();
-                        const sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+                        const sal_Int16 nPageDiff = nThmbPos - pViewWin->SelectedPage();
+                        const sal_uInt16 nVisPages = pViewWin->GetRow() * pViewWin->GetCol();
                         sal_Int16 nWinPagesToScroll = nPageDiff / nVisPages;
                         if ( nPageDiff % nVisPages )
                         {
                             // decrease/increase number of preview pages to scroll
                             nPageDiff < 0 ? --nWinPagesToScroll : ++nWinPagesToScroll;
                         }
-                        aViewWin.SetSelectedPage( nThmbPos );
-                        aViewWin.Scroll( 0, pPagePrevwLay->GetWinPagesScrollAmount( nWinPagesToScroll ) );
+                        pViewWin->SetSelectedPage( nThmbPos );
+                        pViewWin->Scroll( 0, pPagePrevwLay->GetWinPagesScrollAmount( nWinPagesToScroll ) );
                     }
                 }
                 // OD 17.01.2003 #103492# - update accessibility
@@ -1741,13 +1753,13 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, 
         else
         {
             long nThmbPos = pScrollbar->GetThumbPos();
-            aViewWin.Scroll(0, nThmbPos - aViewWin.GetPaintedPreviewDocRect().Top());
+            pViewWin->Scroll(0, nThmbPos - pViewWin->GetPaintedPreviewDocRect().Top());
         }
 	}
     else
     {
         long nThmbPos = pScrollbar->GetThumbPos();
-        aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
+        pViewWin->Scroll(nThmbPos - pViewWin->GetPaintedPreviewDocRect().Left(), 0);
     }
     // OD 24.03.2003 #108282# - additional invalidate page status.
     static sal_uInt16 __READONLY_DATA aInval[] =
@@ -1760,7 +1772,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, 
     // OD 04.03.2003 #107369# - control invalidation of window
     if ( bInvalidateWin )
     {
-        aViewWin.Invalidate();
+        pViewWin->Invalidate();
     }
     return 0;
 }
@@ -1771,7 +1783,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, 
 
 Point SwPagePreView::AlignToPixel(const Point &rPt) const
 {
-	return aViewWin.PixelToLogic( aViewWin.LogicToPixel( rPt ) );
+	return pViewWin->PixelToLogic( pViewWin->LogicToPixel( rPt ) );
 }
 
 /*--------------------------------------------------------------------
@@ -1796,7 +1808,7 @@ void SwPagePreView::DocSzChgd( const Siz
 		ChgPage( SwPagePreViewWin::MV_CALC, sal_True );
         ScrollDocSzChg();
 
-		aViewWin.Invalidate();
+		pViewWin->Invalidate();
 	}
     // <--
 }
@@ -1816,20 +1828,20 @@ void SwPagePreView::ScrollViewSzChg()
         {
             //vertical scrolling by row
             // OD 04.12.2002 #103492# - adjust to new preview functionality
-            sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+            sal_uInt16 nVisPages = pViewWin->GetRow() * pViewWin->GetCol();
             pVScrollbar->SetVisibleSize( nVisPages );
             // OD 19.02.2003 #107369# - set selected page as scroll bar position,
             // if it is visible.
             SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
-            if ( pPagePrevwLay->IsPageVisible( aViewWin.SelectedPage() ) )
+            if ( pPagePrevwLay->IsPageVisible( pViewWin->SelectedPage() ) )
             {
-                pVScrollbar->SetThumbPos( aViewWin.SelectedPage() );
+                pVScrollbar->SetThumbPos( pViewWin->SelectedPage() );
             }
             else
             {
-                pVScrollbar->SetThumbPos( aViewWin.GetSttPage() );
+                pVScrollbar->SetThumbPos( pViewWin->GetSttPage() );
             }
-            pVScrollbar->SetLineSize( aViewWin.GetCol() );
+            pVScrollbar->SetLineSize( pViewWin->GetCol() );
             pVScrollbar->SetPageSize( nVisPages );
             // calculate and set scrollbar range
             Range aScrollbarRange( 1, mnPageCount );
@@ -1841,7 +1853,7 @@ void SwPagePreView::ScrollViewSzChg()
         }
         else //vertical scrolling by pixel
         {
-            const Rectangle& rDocRect = aViewWin.GetPaintedPreviewDocRect();
+            const Rectangle& rDocRect = pViewWin->GetPaintedPreviewDocRect();
             const Size& rPreviewSize =
                     GetViewShell()->PagePreviewLayout()->GetPrevwDocSize();
             pVScrollbar->SetRangeMax(rPreviewSize.Height()) ;
@@ -1854,7 +1866,7 @@ void SwPagePreView::ScrollViewSzChg()
     }
     if(pHScrollbar)
     {
-        const Rectangle& rDocRect = aViewWin.GetPaintedPreviewDocRect();
+        const Rectangle& rDocRect = pViewWin->GetPaintedPreviewDocRect();
         const Size& rPreviewSize =
                 GetViewShell()->PagePreviewLayout()->GetPrevwDocSize();
         long nVisWidth = 0;
@@ -1896,7 +1908,7 @@ void SwPagePreView::ScrollDocSzChg()
 
 SfxPrinter*  SwPagePreView::GetPrinter( sal_Bool bCreate )
 {
-    return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
+    return pViewWin->GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
 }
 
 /*--------------------------------------------------------------------
@@ -1934,7 +1946,7 @@ sal_uInt16  SwPagePreView::SetPrinter( S
 			rSh.ChgAllPageSize( aSz );
 		}
 		if( !bNormalPrint )
-			aViewWin.CalcWish( aViewWin.GetRow(), aViewWin.GetCol() );
+			pViewWin->CalcWish( pViewWin->GetRow(), pViewWin->GetCol() );
 		rESh.SetModified();
 		rESh.EndAllAction();
 
@@ -1997,7 +2009,7 @@ Size  SwPagePreView::GetOptimalSizePixel
 	nYBorder -= (nYBorder - nXBorder) / 2;
 	aMaxSize.Height() -= nYBorder;
 	//mit der max. moeglichen Outputsize guenstigstes Verhaeltnis ausrechnen
-	aViewWin.GetOptimalSize(aMaxSize);
+	pViewWin->GetOptimalSize(aMaxSize);
 	// Border wieder dazuzaehlen
 	aMaxSize.Height() += nYBorder;
 	aMaxSize.Width() += nXBorder;
@@ -2091,7 +2103,10 @@ sal_Bool SwPagePreView::HandleWheelComma
 	const CommandWheelData* pWData = rCEvt.GetWheelData();
 	if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
 	{
-        if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+	//IAccessibility2 Implementation 2009-----, only the Preference shouldn't control the Zoom, it is better to detect AT tools running. So the bridge can be used here
+        //if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+	if ( !Application::IsAccessibilityEnabled() )
+	//-----IAccessibility2 Implementation 2009
         {
             sal_uInt16 nFactor = GetViewShell()->GetViewOptions()->GetZoom();
             const sal_uInt16 nOffset = 10;
@@ -2112,7 +2127,7 @@ sal_Bool SwPagePreView::HandleWheelComma
 		bOk = sal_True;
 	}
 	else
-        bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
+        bOk = pViewWin->HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
 	return bOk;
 }
 
@@ -2124,8 +2139,37 @@ uno::Reference< ::com::sun::star::access
 														// happend already!!!
 
     DBG_ASSERT( GetViewShell() != NULL, "We need a view shell" );
-    return GetViewShell()->CreateAccessiblePreview();
+	//IAccessibility2 Implementation 2009-----
+	::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible( sal_False );
+	if (xAcc.is())
+	{
+		return xAcc;
+	}
+	if (mpViewShell)
+	{	    
+		::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccPreview = mpViewShell->CreateAccessiblePreview();
+		SetAccessible(xAccPreview);
+	}
+	return GetAccessible( sal_False );
+	//-----IAccessibility2 Implementation 2009
+}
+//IAccessibility2 Implementation 2009-----
+// MT: Removed Windows::SwitchView() introduced with IA2 CWS.
+// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism
+void SwPagePreViewWin::SwitchView()
+{
+#ifdef ACCESSIBLE_LAYOUT
+	if (!Application::IsAccessibilityEnabled())
+	{
+		return ;
+	}
+	if (mpViewShell)
+	{
+		mpViewShell->InvalidateAccessibleFocus();
+	}
+#endif
 }
+//-----IAccessibility2 Implementation 2009
 
 /* -----------------------------06.05.2002 13:18------------------------------
 
@@ -2169,7 +2213,7 @@ void SwPagePreView::SetZoom(SvxZoomType 
         lcl_InvalidateZoomSlots(GetViewFrame()->GetBindings());
         // OD 02.12.2002 #103492#
         // OD 24.09.2003 #i19975# - also consider zoom type
-        aViewWin.AdjustPreviewToNewZoom( nFactor, eType );
+        pViewWin->AdjustPreviewToNewZoom( nFactor, eType );
         ScrollViewSzChg();
     }
 }

Modified: openoffice/branches/capstone2013/main/sw/source/ui/uiview/view.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/uiview/view.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/uiview/view.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/uiview/view.cxx Wed Nov 20 00:49:46 2013
@@ -537,30 +537,13 @@ IMPL_LINK( SwView, AttrChangedNotify, Sw
 
 	}
 
-	//#i6193#, change ui if cursor is at a SwPostItField
-	if (mpPostItMgr)
-	{
-        // --> OD 2008-06-19 #i90516#
-        // only perform the code that is needed to determine, if at the
-        // actual cursor position is a post-it field
-//        SwRect aFldRect;
-//        SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD);
-//        if( pWrtShell->GetContentAtPos( pWrtShell->GetCrsrDocPos(), aCntntAtPos, sal_False, &aFldRect ) )
-//        {
-//            const SwField* pFld = aCntntAtPos.aFnd.pFld;
-//            if (pFld->Which()== RES_POSTITFLD)
-//            {
-//                mpPostItMgr->SetShadowState(reinterpret_cast<const SwPostItField*>(pFld));
-//            }
-//            else
-//                mpPostItMgr->SetShadowState(0);
-//        }
-//        else
-//            mpPostItMgr->SetShadowState(0);
+    //#i6193#, change ui if cursor is at a SwPostItField
+    if (mpPostItMgr)
+    {
         mpPostItMgr->SetShadowState( pWrtShell->GetPostItFieldAtCursor() );
-	}
+    }
 
-	return 0;
+    return 0;
 }
 
 
@@ -780,6 +763,9 @@ SwView::SwView( SfxViewFrame *_pFrame, S
 	nFormSfxId( USHRT_MAX ),
     nLastPasteDestination( 0xFFFF ),
     nLeftBorderDistance( 0 ),
+    //IAccessibility2 Implementation 2009-----
+	nOldPageNum(0),
+    //-----IAccessibility2 Implementation 2009
     nRightBorderDistance( 0 ),
     bInMailMerge(sal_False),
     bInDtor(sal_False),

Modified: openoffice/branches/capstone2013/main/sw/source/ui/uiview/view2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/uiview/view2.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/uiview/view2.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/uiview/view2.cxx Wed Nov 20 00:49:46 2013
@@ -766,7 +766,7 @@ void __EXPORT SwView::Execute(SfxRequest
 		case SID_ATTR_BORDER_OUTER:
 		case SID_ATTR_BORDER_SHADOW:
 			if(pArgs)
-				pWrtShell->SetAttr(*pArgs);
+				pWrtShell->SetAttrSet(*pArgs);
 			break;
 
 		case SID_ATTR_PAGE:
@@ -1179,6 +1179,32 @@ void SwView::StateStatusLine(SfxItemSet 
 	SfxWhichIter aIter( rSet );
 	sal_uInt16 nWhich = aIter.FirstWhich();
 	ASSERT( nWhich, "leeres Set");
+	//IAccessibility2 Implementation 2009-----
+	if (Application::IsAccessibilityEnabled())
+	{
+		//get section chang event
+		const SwSection* CurrSect = rShell.GetCurrSection();
+		if( CurrSect )
+		{
+            String sCurrentSectionName = CurrSect->GetSectionName();
+			if(sCurrentSectionName != nOldSectionName)
+			{
+				rShell.FireSectionChangeEvent(2, 1);
+			}
+			nOldSectionName = sCurrentSectionName;
+		}
+		else if ( !(nOldSectionName.Equals(String()))  )
+		{
+			rShell.FireSectionChangeEvent(2, 1);
+			nOldSectionName = String();
+		}
+		//get column change event
+		if(rShell.bColumnChange())
+		{
+			rShell.FireColumnChangeEvent(2, 1);
+		}
+	}
+	//-----IAccessibility2 Implementation 2009
 
 	while( nWhich )
 	{
@@ -1203,7 +1229,15 @@ void SwView::StateStatusLine(SfxItemSet 
 				rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay );
 				rSet.Put( SfxStringItem( FN_STAT_PAGE,
 							GetPageStr( nPage, nLogPage, sDisplay) ));
-
+				//IAccessibility2 Implementation 2009-----
+				//if existing page number is not equal to old page number, send out this event.
+				if (nOldPageNum != nLogPage )
+				{
+					if (nOldPageNum != 0)
+						rShell.FirePageChangeEvent(nOldPageNum, nLogPage);
+					nOldPageNum = nLogPage;
+				}
+				//-----IAccessibility2 Implementation 2009
 				sal_uInt16 nCnt = GetWrtShell().GetPageCnt();
 				if (nPageCnt != nCnt)	// Basic benachrichtigen
 				{

Modified: openoffice/branches/capstone2013/main/sw/source/ui/uiview/viewmdi.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/uiview/viewmdi.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/uiview/viewmdi.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/uiview/viewmdi.cxx Wed Nov 20 00:49:46 2013
@@ -379,7 +379,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigation
 {
     if ( !pbNext )
         return 0;
-    bool bNext = *pbNext;
+    const bool bNext = *pbNext;
     SwWrtShell& rSh = pThis->GetWrtShell();
 	switch( nMoveType )
 	{
@@ -482,19 +482,21 @@ IMPL_STATIC_LINK( SwView, MoveNavigation
             }
         }
         break;
-		case NID_POSTIT:
-		{
-            sw::sidebarwindows::SwSidebarWin* pPostIt = pThis->GetPostItMgr()->GetActiveSidebarWin();
-			if (pPostIt)
-                pThis->GetPostItMgr()->SetActiveSidebarWin(0);
-			SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD);
-			if (rSh.MoveFldType(pFldType, bNext))
-				pThis->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
-			else
-				//first/last item
-                pThis->GetPostItMgr()->SetActiveSidebarWin(pPostIt);
-		}
-		break;
+
+        case NID_POSTIT:
+            {
+                sw::sidebarwindows::SwSidebarWin* pPostIt = pThis->GetPostItMgr()->GetActiveSidebarWin();
+                if (pPostIt)
+                    pThis->GetPostItMgr()->SetActiveSidebarWin(0);
+                SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD);
+                if ( rSh.MoveFldType( pFldType, bNext ) )
+                    pThis->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
+                else
+                    //first/last item
+                    pThis->GetPostItMgr()->SetActiveSidebarWin(pPostIt);
+            }
+            break;
+
 		case NID_SRCH_REP:
 		if(pSrchItem)
 		{

Modified: openoffice/branches/capstone2013/main/sw/source/ui/uiview/viewsrch.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/ui/uiview/viewsrch.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/ui/uiview/viewsrch.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/ui/uiview/viewsrch.cxx Wed Nov 20 00:49:46 2013
@@ -213,6 +213,19 @@ void SwView::ExecSearch(SfxRequest& rReq
 				if( bRet )
 					Scroll(pWrtShell->GetCharRect().SVRect());
 				rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
+				//IAccessibility2 Implementation 2009-----
+				if ( Application::IsAccessibilityEnabled() )
+				{
+					const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+					SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+					if ( pWrp )
+					{					
+						pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+						pSrchDlg->SetDocWin( (Window*)pEditWin );
+						pSrchDlg->SetSrchFlag();
+					}
+				}
+				//-----IAccessibility2 Implementation 2009
 			}
 			break;
 			case SVX_SEARCHCMD_FIND_ALL:
@@ -228,6 +241,20 @@ void SwView::ExecSearch(SfxRequest& rReq
 					bFound = sal_False;
 				}
 				rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
+				//IAccessibility2 Implementation 2009-----
+				if ( Application::IsAccessibilityEnabled() )
+				{
+					const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+					SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+
+					if ( pWrp )
+					{					
+						pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+						pSrchDlg->SetDocWin( (Window*)pEditWin );
+						pSrchDlg->SetSrchFlag();				
+					}
+				}
+				//-----IAccessibility2 Implementation 2009
 			}
 			break;
 			case SVX_SEARCHCMD_REPLACE:
@@ -279,6 +306,19 @@ void SwView::ExecSearch(SfxRequest& rReq
 					pSrchItem->SetCommand( nOldCmd );
 					rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
 				}
+				//IAccessibility2 Implementation 2009-----
+				{					
+					const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+					SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+				
+					if ( pWrp )
+					{					
+						pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+						pSrchDlg->SetDocWin( (Window*)pEditWin );
+						pSrchDlg->SetSrchFlag();			
+					}
+				}
+				//-----IAccessibility2 Implementation 2009
 				break;
 
 			case SVX_SEARCHCMD_REPLACE_ALL:
@@ -328,6 +368,17 @@ void SwView::ExecSearch(SfxRequest& rReq
 						InfoBox( pParentWindow, aText ).Execute();
 					}
 				}
+				//IAccessibility2 Implementation 2009-----
+				const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+				SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+			
+				if ( pWrp )
+				{					
+					pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+					pSrchDlg->SetDocWin( (Window*)pEditWin );
+					pSrchDlg->SetSrchFlag();				
+				}
+				//-----IAccessibility2 Implementation 2009
 				break;
 			}
 
@@ -597,7 +648,7 @@ void SwView::Replace()
 			if( pReplList->Get( aReplSet ).Count() )
 			{
 				::SfxToSwPageDescAttr( *pWrtShell, aReplSet );
-				pWrtShell->SwEditShell::SetAttr( aReplSet );
+				pWrtShell->SwEditShell::SetAttrSet( aReplSet );
 			}
 		}
 	}



Mime
View raw message