summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/app/applab.cxx2
-rw-r--r--sw/source/ui/app/docsh.cxx56
-rw-r--r--sw/source/ui/app/docst.cxx4
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx5
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx10
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx15
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx3
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.hxx2
-rw-r--r--sw/source/ui/docvw/edtdd.cxx4
-rw-r--r--sw/source/ui/docvw/edtwin.cxx85
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx224
-rw-r--r--sw/source/ui/docvw/edtwin3.cxx28
-rw-r--r--sw/source/ui/envelp/envfmt.cxx2
-rw-r--r--sw/source/ui/fldui/fldedt.cxx38
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx12
-rw-r--r--sw/source/ui/frmdlg/column.cxx38
-rw-r--r--sw/source/ui/frmdlg/column.hrc7
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx22
-rw-r--r--sw/source/ui/inc/conttree.hxx17
-rw-r--r--sw/source/ui/inc/edtwin.hxx3
-rw-r--r--sw/source/ui/inc/pview.hxx11
-rw-r--r--sw/source/ui/inc/swlbox.hxx3
-rw-r--r--sw/source/ui/inc/swuicnttab.hxx15
-rw-r--r--sw/source/ui/inc/view.hxx5
-rw-r--r--sw/source/ui/inc/wrtsh.hxx5
-rw-r--r--sw/source/ui/index/cnttab.cxx159
-rw-r--r--sw/source/ui/index/cnttab.hrc7
-rw-r--r--sw/source/ui/index/cnttab.src18
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx6
-rw-r--r--sw/source/ui/misc/glossary.hrc4
-rw-r--r--sw/source/ui/misc/insfnote.cxx2
-rw-r--r--sw/source/ui/ribbar/inputwin.cxx8
-rw-r--r--sw/source/ui/ribbar/inputwin.hrc5
-rw-r--r--sw/source/ui/ribbar/inputwin.src16
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx9
-rw-r--r--sw/source/ui/shells/annotsh.cxx36
-rw-r--r--sw/source/ui/shells/basesh.cxx72
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx44
-rw-r--r--sw/source/ui/shells/frmsh.cxx10
-rw-r--r--sw/source/ui/shells/grfsh.cxx25
-rw-r--r--sw/source/ui/shells/langhelper.cxx6
-rw-r--r--sw/source/ui/shells/listsh.cxx7
-rw-r--r--sw/source/ui/shells/tabsh.cxx7
-rw-r--r--sw/source/ui/shells/textfld.cxx148
-rw-r--r--sw/source/ui/shells/textidx.cxx11
-rw-r--r--sw/source/ui/shells/textsh.cxx164
-rw-r--r--sw/source/ui/shells/textsh1.cxx211
-rw-r--r--sw/source/ui/shells/txtattr.cxx22
-rw-r--r--sw/source/ui/shells/txtnum.cxx4
-rw-r--r--sw/source/ui/table/convert.hrc6
-rw-r--r--sw/source/ui/table/tabledlg.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.hrc3
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx4
-rw-r--r--sw/source/ui/uiview/pview.cxx200
-rw-r--r--sw/source/ui/uiview/view.cxx20
-rw-r--r--sw/source/ui/uiview/view2.cxx38
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx28
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx53
-rw-r--r--sw/source/ui/uiview/viewstat.cxx83
-rw-r--r--sw/source/ui/uiview/viewtab.cxx10
-rw-r--r--sw/source/ui/utlui/content.cxx361
-rw-r--r--sw/source/ui/utlui/navipi.hrc5
-rw-r--r--sw/source/ui/wrtsh/delete.cxx2
-rw-r--r--sw/source/ui/wrtsh/select.cxx13
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx57
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx14
66 files changed, 1813 insertions, 703 deletions
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 388e298bcc04..2d3886a9e48b 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -310,7 +310,7 @@ static sal_uInt16 nBCTitleNo = 0;
if ( nMin > 0 )
{
SvxLRSpaceItem aLR( RES_LR_SPACE );
- pSh->SetAttr( aLR );
+ pSh->SetAttrItem( aLR );
SwFmt *pStandard = pSh->GetTxtCollFromPool( RES_POOLCOLL_STANDARD );
aLR.SetLeft ( sal_uInt16(nMin) );
aLR.SetRight( sal_uInt16(nMin) );
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index dbb2327a3172..606434e106f8 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -103,6 +103,9 @@
#include <unotools/fltrcfg.hxx>
#include <svtools/htmlcfg.hxx>
#include <sfx2/fcontnr.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <sfx2/viewfrm.hxx>
+//-----IAccessibility2 Implementation 2009
#include <sfx2/objface.hxx>
#include <comphelper/storagehelper.hxx>
@@ -399,6 +402,22 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveAs" );
+ //IAccessibility2 Implementation 2009-----
+ pDoc->setDocAccTitle(String());
+ SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
+ if (pFrame1)
+ {
+ Window* pWindow = &pFrame1->GetWindow();
+ if ( pWindow )
+ {
+ Window* pSysWin = pWindow->GetSystemWindow();
+ if ( pSysWin )
+ {
+ pSysWin->SetAccessibleName(String());
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
SwWait aWait( *this, sal_True );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
@@ -1264,6 +1283,43 @@ uno::Reference< frame::XController >
/* -----------------------------12.02.01 12:08--------------------------------
---------------------------------------------------------------------------*/
+//IAccessibility2 Implementation 2009-----
+void SwDocShell::setDocAccTitle( const String& rTitle )
+{
+ if (pDoc )
+ {
+ pDoc->setDocAccTitle( rTitle );
+ }
+}
+const String SwDocShell::getDocAccTitle() const
+{
+ String sRet;
+ if (pDoc)
+ {
+ sRet = pDoc->getDocAccTitle();
+ }
+
+ return sRet;
+}
+
+void SwDocShell::setDocReadOnly( sal_Bool bReadOnly)
+{
+ if (pDoc )
+ {
+ pDoc->setDocReadOnly( bReadOnly );
+ }
+}
+sal_Bool SwDocShell::getDocReadOnly() const
+{
+ if (pDoc)
+ {
+ return pDoc->getDocReadOnly();
+ }
+
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
+
static const char* s_EventNames[] =
{
"OnPageCountChange",
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index b28ff49de918..ffaefbe8ae31 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -878,7 +878,7 @@ sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
case SFX_STYLE_FAMILY_CHAR:
{
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
- pSh->SetAttr( aFmt, (nMode & KEY_SHIFT) ?
+ pSh->SetAttrItem( aFmt, (nMode & KEY_SHIFT) ?
nsSetAttrMode::SETATTR_DONTREPLACE : nsSetAttrMode::SETATTR_DEFAULT );
break;
}
@@ -1184,7 +1184,7 @@ sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
pCurrWrtShell->FillByEx( pChar );
pChar->SetDerivedFrom( pCurrWrtShell->GetCurCharFmt() );
SwFmtCharFmt aFmt( pChar );
- pCurrWrtShell->SetAttr( aFmt );
+ pCurrWrtShell->SetAttrItem( aFmt );
pCurrWrtShell->EndAllAction();
}
}
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index d8b6d52e13e5..bb9b291e9474 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -105,8 +105,13 @@ void NoSpaceEdit::Modify()
SetText(sTemp);
SetSelection(aSel);
}
+//IAccessibility2 Impplementaton 2009-----
+ Edit::Modify();
+ /*
if(GetModifyHdl().IsSet())
GetModifyHdl().Call(this);
+ */
+//-----IAccessibility2 Impplementaton 2009
}
/* -----------------25.06.2003 15:57-----------------
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index 39e0b8dc4c63..15e0a1f855ad 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -223,5 +223,11 @@ String SwComboBox::GetText() const
return aTxt;
}
-
-
+//IAccessibility2 Impplementaton 2009-----
+void SwComboBox::SetText( const XubString& rStr )
+{
+ ComboBox::SetText(rStr);
+ // MT: CallEventListeners stay protected for now. Probably not needed at all, as the implementation of VCLXAccessibelEdit/ComboBox should do it on text changed nowadays anyway. Verify.
+ // CallEventListeners( VCLEVENT_EDIT_MODIFY );
+}
+//-----IAccessibility2 Impplementaton 2009
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 32db26d9b4b5..bd0e3bb71641 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -127,12 +127,17 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
break;
}
- const SfxStyleFilter& rFilterList = pFamilyItem->GetFilterList();
- for( i = 0; i < rFilterList.Count(); ++i)
+//IAccessibility2 Impplementaton 2009-----
+ if( pFamilyItem )
{
- aFilterLB.InsertEntry(rFilterList.GetObject(i)->aName);
- sal_uInt16* pFilter = new sal_uInt16(rFilterList.GetObject(i)->nFlags);
- aFilterLB.SetEntryData(i, pFilter);
+ const SfxStyleFilter& rFilterList = pFamilyItem->GetFilterList();
+ for( i = 0; i < rFilterList.Count(); ++i)
+ {
+ aFilterLB.InsertEntry(rFilterList.GetObject(i)->aName);
+ sal_uInt16* pFilter = new sal_uInt16(rFilterList.GetObject(i)->nFlags);
+ aFilterLB.SetEntryData(i, pFilter);
+ }
+//-----IAccessibility2 Impplementaton 2009
}
aFilterLB.SelectEntryPos(1);
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index beb0c3398ad1..6bed9b350b48 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -457,6 +457,9 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL);
aPasswdPB.SetAccessibleRelationLabeledBy(&aPasswdCB);
aSubRegionED.SetAccessibleName(aSubRegionFT.GetText());
+//IAccessibility2 Impplementaton 2009-----
+ aTree.SetAllEntriesAccessibleRoleType(TREEBOX_ALLITEM_ACCROLE_TYPE_TREE);
+//-----IAccessibility2 Impplementaton 2009
}
/* -----------------------------26.04.01 14:56--------------------------------
diff --git a/sw/source/ui/docvw/SidebarTxtControl.hxx b/sw/source/ui/docvw/SidebarTxtControl.hxx
index 99d016ea08cc..444242f5fe69 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.hxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.hxx
@@ -29,7 +29,7 @@
class OutlinerView;
class SwView;
class SwPostItMgr;
-class SpellCallbackInfo;
+struct SpellCallbackInfo;
namespace sw { namespace sidebarwindows {
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index ed2c44cc87e2..90e71bb8c7ce 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -266,7 +266,9 @@ sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppO
{
SwWrtShell &rSh = rView.GetWrtShell();
const Point aDocPt( PixelToLogic( rPixPnt ) );
- if( rSh.ChgCurrPam( aDocPt ) || rSh.IsOverReadOnlyPos( aDocPt ) )
+ if( rSh.ChgCurrPam( aDocPt )
+ || rSh.IsOverReadOnlyPos( aDocPt )
+ || rSh.DocPtInsideInputFld( aDocPt ) )
return 0;
SdrObject *pObj = NULL;
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index bc62f772b709..4542681c7a3f 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -82,6 +82,7 @@
#include <dselect.hxx>
#include <textsh.hxx>
#include <shdwcrsr.hxx>
+#include <txatbase.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
@@ -924,7 +925,7 @@ void SwEditWin::FlushInBuffer()
if(bLang)
{
SvxLanguageItem aLangItem( eBufferLanguage, nWhich );
- rSh.SetAttr( aLangItem );
+ rSh.SetAttrItem( aLangItem );
}
}
}
@@ -1372,8 +1373,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// pressing this inside a note will switch to next/previous note
if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((rKeyCode.GetCode() == KEY_PAGEUP) || (rKeyCode.GetCode() == KEY_PAGEDOWN)))
{
- bool bNext = rKeyCode.GetCode()==KEY_PAGEDOWN ? true : false;
- SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD);
+ const bool bNext = rKeyCode.GetCode()==KEY_PAGEDOWN ? true : false;
+ const SwFieldType* pFldType = rSh.GetFldType( 0, RES_POSTITFLD );
rSh.MoveFldType( pFldType, bNext );
return;
}
@@ -1491,9 +1492,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
- SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys
- : KS_CheckKey,
- eNextKeyState = KS_Ende;
+ SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys : KS_CheckKey;
+ SW_KeyState eNextKeyState = KS_Ende;
sal_uInt8 nDir = 0;
if (nKS_NUMDOWN_Count > 0)
@@ -1778,7 +1778,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KEY_RETURN: // Return
- if( !rSh.HasReadonlySel() )
+ if ( !rSh.HasReadonlySel()
+ && !rSh.CrsrInsideInputFld() )
{
const int nSelectionType = rSh.GetSelectionType();
if(nSelectionType & nsSelectionType::SEL_OLE)
@@ -1814,8 +1815,13 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KEY_RETURN | KEY_MOD2: // ALT-Return
- if( !rSh.HasReadonlySel() && !rSh.IsSttPara() && rSh.GetCurNumRule() )
+ if ( !rSh.HasReadonlySel()
+ && !rSh.IsSttPara()
+ && rSh.GetCurNumRule()
+ && !rSh.CrsrInsideInputFld() )
+ {
eKeyState = KS_NoNum;
+ }
else if( rSh.CanSpecialInsert() )
eKeyState = KS_SpecialInsert;
break;
@@ -1926,6 +1932,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
eKeyState=KS_GotoNextFieldMark;
}
+ else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() )
+ {
+ GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD );
+ eKeyState = KS_Ende;
+ }
else
if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
!rSh.HasReadonlySel() )
@@ -1976,9 +1987,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
#endif
- if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) {
+ if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
+ {
eKeyState=KS_GotoPrevFieldMark;
}
+ else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() )
+ {
+ GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD );
+ eKeyState = KS_Ende;
+ }
else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
!rSh.HasReadonlySel() )
{
@@ -2094,9 +2111,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
eKeyState = rKeyCode.GetModifier() & KEY_SHIFT ?
KS_PrevObject : KS_NextObject;
}
+ else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() )
+ {
+ GetView().GetViewFrame()->GetDispatcher()->Execute(
+ KEY_SHIFT != rKeyCode.GetModifier() ? FN_GOTO_NEXT_INPUTFLD : FN_GOTO_PREV_INPUTFLD );
+ }
else
- rSh.SelectNextPrevHyperlink(
- KEY_SHIFT != rKeyCode.GetModifier() );
+ {
+ rSh.SelectNextPrevHyperlink( KEY_SHIFT != rKeyCode.GetModifier() );
+ }
break;
case KEY_RETURN:
{
@@ -2739,12 +2762,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
}
- //Man kann sich in einem Selektionszustand befinden, wenn zuletzt
- //mit dem Keyboard selektiert wurde, aber noch kein CURSOR_KEY
- //anschliessend bewegt worden ist. In diesem Fall muss die vorher-
- //gehende Selektion zuerst beendet werden.
- //MA 07. Oct. 95: Und zwar nicht nur bei Linker Maustaste sondern immer.
- //siehe auch Bug: 19263
if ( rSh.IsInSelect() )
rSh.EndSelect();
@@ -4165,7 +4182,19 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( SwContentAtPos::SW_FIELD == aCntntAtPos.eCntntAtPos )
{
- rSh.ClickToField( *aCntntAtPos.aFnd.pFld );
+ if ( aCntntAtPos.pFndTxtAttr != NULL
+ && aCntntAtPos.pFndTxtAttr->Which() == RES_TXTATR_INPUTFIELD )
+ {
+ // select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART
+ // and CH_TXT_ATR_INPUTFIELDEND
+ rSh.SttSelect();
+ rSh.SelectTxt( *(aCntntAtPos.pFndTxtAttr->GetStart()) + 1,
+ *(aCntntAtPos.pFndTxtAttr->End()) - 1 );
+ }
+ else
+ {
+ rSh.ClickToField( *aCntntAtPos.aFnd.pFld );
+ }
}
else if ( SwContentAtPos::SW_SMARTTAG == aCntntAtPos.eCntntAtPos )
{
@@ -4320,10 +4349,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
Color aColor( COL_TRANSPARENT );
if( !SwEditWin::bTransparentBackColor )
aColor = SwEditWin::aTextBackColor;
- rSh.SetAttr( SvxBrushItem( aColor, nId ) );
+ rSh.SetAttrItem( SvxBrushItem( aColor, nId ) );
}
else
- rSh.SetAttr( SvxColorItem(SwEditWin::aTextColor, nId) );
+ rSh.SetAttrItem( SvxColorItem(SwEditWin::aTextColor, nId) );
rSh.UnSetVisCrsr();
rSh.EnterStdMode();
rSh.SetVisCrsr(aDocPt);
@@ -4359,7 +4388,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( (( nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL )
& eSelection ) && !rSh.HasReadonlySel() )
{
- rSh.SetAttr( SwFmtCharFmt(pApplyTempl->aColl.pCharFmt) );
+ rSh.SetAttrItem( SwFmtCharFmt(pApplyTempl->aColl.pCharFmt) );
rSh.UnSetVisCrsr();
rSh.EnterStdMode();
rSh.SetVisCrsr(aDocPt);
@@ -5709,3 +5738,17 @@ Selection SwEditWin::GetSurroundingTextSelection() const
return Selection( nPos - nStartPos, nPos - nStartPos );
}
}
+//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 SwEditWin::SwitchView()
+{
+#ifdef ACCESSIBLE_LAYOUT
+ if (!Application::IsAccessibilityEnabled())
+ {
+ return ;
+ }
+ rView.GetWrtShell().InvalidateAccessibleFocus();
+#endif
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index f5cd0a3ae993..d56aa0859bfa 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -136,13 +136,13 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
SwContentAtPos::SW_SMARTTAG |
#ifdef DBG_UTIL
SwContentAtPos::SW_TABLEBOXVALUE |
- ( bBalloon ? SwContentAtPos::SW_CURR_ATTRS : 0) |
+ ( bBalloon ? SwContentAtPos::SW_CURR_ATTRS : 0) |
#endif
SwContentAtPos::SW_TABLEBOXFML );
if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
{
- switch( aCntntAtPos.eCntntAtPos )
+ switch( aCntntAtPos.eCntntAtPos )
{
case SwContentAtPos::SW_TABLEBOXFML:
sTxt.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "= " ));
@@ -150,98 +150,92 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
break;
#ifdef DBG_UTIL
case SwContentAtPos::SW_TABLEBOXVALUE:
- {
- sTxt = UniString(
- ByteString::CreateFromDouble(
- ((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue() )
- , gsl_getSystemTextEncoding());
- }
- break;
+ {
+ sTxt = UniString(
+ ByteString::CreateFromDouble(
+ ((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue() )
+ , gsl_getSystemTextEncoding());
+ }
+ break;
case SwContentAtPos::SW_CURR_ATTRS:
sTxt = aCntntAtPos.sStr;
break;
#endif
case SwContentAtPos::SW_INETATTR:
- {
- sTxt = ((SfxStringItem*)aCntntAtPos.aFnd.pAttr)->GetValue();
- sTxt = URIHelper::removePassword( sTxt,
- INetURLObject::WAS_ENCODED,
- INetURLObject::DECODE_UNAMBIGUOUS);
- //#i63832# remove the link target type
- xub_StrLen nFound = sTxt.Search(cMarkSeperator);
- if( nFound != STRING_NOTFOUND && (++nFound) < sTxt.Len() )
{
- String sSuffix( sTxt.Copy(nFound) );
- if( sSuffix.EqualsAscii( pMarkToTable ) ||
- sSuffix.EqualsAscii( pMarkToFrame ) ||
- sSuffix.EqualsAscii( pMarkToRegion ) ||
- sSuffix.EqualsAscii( pMarkToOutline ) ||
- sSuffix.EqualsAscii( pMarkToText ) ||
- sSuffix.EqualsAscii( pMarkToGraphic ) ||
- sSuffix.EqualsAscii( pMarkToOLE ))
- sTxt = sTxt.Copy( 0, nFound - 1);
- }
- // --> OD 2009-08-18 #i104300#
- // special handling if target is a cross-reference bookmark
- {
- String sTmpSearchStr = sTxt.Copy( 1, sTxt.Len() );
- IDocumentMarkAccess* const pMarkAccess =
- rSh.getIDocumentMarkAccess();
- IDocumentMarkAccess::const_iterator_t ppBkmk =
- pMarkAccess->findBookmark( sTmpSearchStr );
- if ( ppBkmk != pMarkAccess->getBookmarksEnd() &&
- IDocumentMarkAccess::GetType( *(ppBkmk->get()) )
- == IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK )
+ sTxt = ((SfxStringItem*)aCntntAtPos.aFnd.pAttr)->GetValue();
+ sTxt = URIHelper::removePassword( sTxt,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS);
+ //#i63832# remove the link target type
+ xub_StrLen nFound = sTxt.Search(cMarkSeperator);
+ if( nFound != STRING_NOTFOUND && (++nFound) < sTxt.Len() )
+ {
+ String sSuffix( sTxt.Copy(nFound) );
+ if( sSuffix.EqualsAscii( pMarkToTable ) ||
+ sSuffix.EqualsAscii( pMarkToFrame ) ||
+ sSuffix.EqualsAscii( pMarkToRegion ) ||
+ sSuffix.EqualsAscii( pMarkToOutline ) ||
+ sSuffix.EqualsAscii( pMarkToText ) ||
+ sSuffix.EqualsAscii( pMarkToGraphic ) ||
+ sSuffix.EqualsAscii( pMarkToOLE ))
+ sTxt = sTxt.Copy( 0, nFound - 1);
+ }
+ // special handling if target is a cross-reference bookmark
{
- SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode();
- if ( pTxtNode )
+ String sTmpSearchStr = sTxt.Copy( 1, sTxt.Len() );
+ IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
+ IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findBookmark( sTmpSearchStr );
+ if ( ppBkmk != pMarkAccess->getBookmarksEnd()
+ && IDocumentMarkAccess::GetType( *(ppBkmk->get()) ) == IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK )
{
- sTxt = pTxtNode->GetExpandTxt( 0, pTxtNode->Len(), true, true );
-
- if( sTxt.Len() )
+ SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode();
+ if ( pTxtNode )
{
- sTxt.EraseAllChars( 0xad );
- for( sal_Unicode* p = sTxt.GetBufferAccess(); *p; ++p )
+ sTxt = pTxtNode->GetExpandTxt( 0, pTxtNode->Len(), true, true );
+
+ if( sTxt.Len() )
{
- if( *p < 0x20 )
- *p = 0x20;
- else if(*p == 0x2011)
- *p = '-';
+ sTxt.EraseAllChars( 0xad );
+ for( sal_Unicode* p = sTxt.GetBufferAccess(); *p; ++p )
+ {
+ if( *p < 0x20 )
+ *p = 0x20;
+ else if(*p == 0x2011)
+ *p = '-';
+ }
}
}
}
}
- }
- // <--
- // --> OD 2007-07-26 #i80029#
- sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
- if ( !bExecHyperlinks )
- {
- SvtSecurityOptions aSecOpts;
- bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
- sTxt.InsertAscii( ": ", 0 );
- sTxt.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 );
+ SvtSecurityOptions aSecOpts;
+ bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+
+ if ( !bExecHyperlinks )
+ {
+ sTxt.InsertAscii( ": ", 0 );
+ sTxt.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 );
+ }
}
+ break;
}
- // <--
- break;
- }
case SwContentAtPos::SW_SMARTTAG:
- {
- sTxt = SW_RESSTR(STR_SMARTTAG_CLICK);
-
- KeyCode aCode( KEY_SPACE );
- KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
- String aModStr( aModifiedCode.GetName() );
- aModStr.SearchAndReplace( aCode.GetName(), String() );
- aModStr.SearchAndReplaceAllAscii( "+", String() );
- sTxt.SearchAndReplaceAllAscii( "%s", aModStr );
- }
- break;
+ {
+ sTxt = SW_RESSTR(STR_SMARTTAG_CLICK);
+
+ KeyCode aCode( KEY_SPACE );
+ KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
+ String aModStr( aModifiedCode.GetName() );
+ aModStr.SearchAndReplace( aCode.GetName(), String() );
+ aModStr.SearchAndReplaceAllAscii( "+", String() );
+ sTxt.SearchAndReplaceAllAscii( "%s", aModStr );
+ }
+ break;
case SwContentAtPos::SW_FTN:
if( aCntntAtPos.pFndTxtAttr && aCntntAtPos.aFnd.pAttr )
@@ -249,7 +243,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
const SwFmtFtn* pFtn = (SwFmtFtn*)aCntntAtPos.aFnd.pAttr;
pFtn->GetFtnText( sTxt );
sTxt.Insert( SW_RESSTR( pFtn->IsEndNote()
- ? STR_ENDNOTE : STR_FTNNOTE ), 0 );
+ ? STR_ENDNOTE : STR_FTNNOTE ), 0 );
if( aCntntAtPos.IsInRTLText() )
nStyle |= QUICKHELP_BIDI_RTL;
}
@@ -264,7 +258,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( sTxt.Len() && aCntntAtPos.pFndTxtAttr )
{
const SwTOXType* pTType = aCntntAtPos.pFndTxtAttr->
- GetTOXMark().GetTOXType();
+ GetTOXMark().GetTOXType();
if( pTType && pTType->GetTypeName().Len() )
{
sTxt.InsertAscii( ": ", 0 );
@@ -272,6 +266,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
}
break;
+
case SwContentAtPos::SW_REFMARK:
if(aCntntAtPos.aFnd.pAttr)
{
@@ -279,7 +274,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": "));
sTxt += ((const SwFmtRefMark*)aCntntAtPos.aFnd.pAttr)->GetRefName();
}
- break;
+ break;
default:
{
@@ -292,34 +287,16 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case RES_SETEXPFLD:
case RES_TABLEFLD:
case RES_GETEXPFLD:
- {
- sal_uInt16 nOldSubType = pFld->GetSubType();
- ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
- sTxt = pFld->ExpandField(true);
- ((SwField*)pFld)->SetSubType(nOldSubType);
- }
- break;
+ {
+ sal_uInt16 nOldSubType = pFld->GetSubType();
+ ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
+ sTxt = pFld->ExpandField(true);
+ ((SwField*)pFld)->SetSubType(nOldSubType);
+ }
+ break;
case RES_POSTITFLD:
{
- /*
- SwPostItMgr* pMgr = rView.GetPostItMgr();
- if (pMgr->ShowNotes())
- {
- SwFmtFld* pSwFmtFld = 0;
- if (pMgr->ShowPreview(pFld,pSwFmtFld))
- {
- SwPostIt* pPostIt = new SwPostIt(static_cast<Window*>(this),0,pSwFmtFld,pMgr,PB_Preview);
- pPostIt->InitControls();
- pPostIt->SetReadonly(true);
- pMgr->SetColors(pPostIt,static_cast<SwPostItField*>(pSwFmtFld->GetFld()));
- pPostIt->SetVirtualPosSize(rEvt.GetMousePosPixel(),Size(180,70));
- pPostIt->ShowNote();
- SetPointerPosPixel(pPostIt->GetPosPixel() + Point(20,20));
- }
- return;
- }
- */
break;
}
case RES_INPUTFLD: // BubbleHelp, da der Hinweis ggf ziemlich lang sein kann
@@ -346,33 +323,31 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
break;
case RES_GETREFFLD:
- {
- // --> OD 2008-01-09 #i85090#
- const SwGetRefField* pRefFld( dynamic_cast<const SwGetRefField*>(pFld) );
- ASSERT( pRefFld,
- "<SwEditWin::RequestHelp(..)> - unexpected type of <pFld>" );
- if ( pRefFld )
{
- if ( pRefFld->IsRefToHeadingCrossRefBookmark() ||
- pRefFld->IsRefToNumItemCrossRefBookmark() )
+ const SwGetRefField* pRefFld( dynamic_cast<const SwGetRefField*>(pFld) );
+ ASSERT( pRefFld,
+ "<SwEditWin::RequestHelp(..)> - unexpected type of <pFld>" );
+ if ( pRefFld )
{
- sTxt = pRefFld->GetExpandedTxtOfReferencedTxtNode();
- if ( sTxt.Len() > 80 )
+ if ( pRefFld->IsRefToHeadingCrossRefBookmark() ||
+ pRefFld->IsRefToNumItemCrossRefBookmark() )
{
- sTxt.Erase( 80 );
- sTxt += '.';
- sTxt += '.';
- sTxt += '.';
+ sTxt = pRefFld->GetExpandedTxtOfReferencedTxtNode();
+ if ( sTxt.Len() > 80 )
+ {
+ sTxt.Erase( 80 );
+ sTxt += '.';
+ sTxt += '.';
+ sTxt += '.';
+ }
+ }
+ else
+ {
+ sTxt = ((SwGetRefField*)pFld)->GetSetRefName();
}
- }
- else
- {
- sTxt = ((SwGetRefField*)pFld)->GetSetRefName();
}
}
- // <--
- }
- break;
+ break;
}
}
@@ -380,8 +355,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
- lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl,
- sTxt, bBalloon );
+ lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl, sTxt, bBalloon );
}
}
}
@@ -419,7 +393,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case SW_TABROW_VERT:
nTabRes = STR_TABLE_ROW_ADJUST;
break;
- // --> FME 2004-07-30 #i32329# Enhanced table selection
case SW_TABSEL_HORI:
case SW_TABSEL_HORI_RTL:
case SW_TABSEL_VERT:
@@ -434,7 +407,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case SW_TABCOLSEL_VERT:
nTabRes = STR_TABLE_SELECT_COL;
break;
- // <--
}
if(nTabRes)
{
diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx
index 2f8b144badc9..525761819529 100644
--- a/sw/source/ui/docvw/edtwin3.cxx
+++ b/sw/source/ui/docvw/edtwin3.cxx
@@ -142,6 +142,34 @@ sal_Bool SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
return !rRuler.StartDocDrag( rMEvt, RULER_TYPE_INDENT);
}
// <--
+//IAccessibility2 Impplementaton 2009-----
+void AccessibilityScrollMDI(ViewShell* pVwSh, const SwRect& rRect , sal_uInt16 nRangeX, sal_uInt16 nRangeY, sal_Bool isLeftTop)
+{
+ SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
+ SwView* pView = dynamic_cast< SwView* >(pSfxVwSh);
+
+ if(pView)
+ {
+ Size aSz( rRect.Left(), rRect.Top());
+ aSz = pView->GetEditWin().PixelToLogic( aSz );
+
+ Point aTopLeft( aSz.Width(), aSz.Height() );
+ Point aPoint;
+ Rectangle aRect(aTopLeft,aPoint);
+
+ sal_Bool bIsCrsrAtTop = pView->IsCrsrAtTop();
+ sal_Bool bIsCrsrAtCenter = pView->IsCrsrAtCenter();
+ if(isLeftTop)
+ pView->SetCrsrAtTop(sal_True);
+
+ pView->Scroll( aRect, nRangeX, nRangeY );
+
+ if(isLeftTop)
+ pView->SetCrsrAtTop(bIsCrsrAtTop, bIsCrsrAtCenter);
+ }
+
+}
+//-----IAccessibility2 Impplementaton 2009
LAYOUT_NS Dialog* GetSearchDialog()
{
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index f8ac5a382c80..b6fd646319c7 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -300,7 +300,6 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
pCollSet->Put( aTmpBrush );
}
aOutputSet.ClearItem( RES_BACKGROUND );
- //pColl->SetAttr( aTmpSet );
pCollSet->Put(aOutputSet);
}
delete pDlg;
@@ -354,7 +353,6 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
}
if( pOutputSet->Count() )
{
- //pColl->SetAttr( *pOutputSet );
pCollSet->Put(*pOutputSet);
}
}
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 8199757e3335..5b09fcd846fc 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -33,45 +33,24 @@
#include <sfx2/app.hxx>
#include <svx/optgenrl.hxx>
#include <docufld.hxx>
-#ifndef _VIEW_HXX
+#include <expfld.hxx>
#include <view.hxx>
-#endif
#include <dbfld.hxx>
#include <wrtsh.hxx>
-#ifndef _FLDDB_HXX
#include <flddb.hxx>
-#endif
-#ifndef _FLDDINF_HXX
#include <flddinf.hxx>
-#endif
-#ifndef _FLDVAR_HXX
#include <fldvar.hxx>
-#endif
-#ifndef _FLDDOK_HXX
#include <flddok.hxx>
-#endif
-#ifndef _FLDFUNC_HXX
#include <fldfunc.hxx>
-#endif
-#ifndef _FLDREF_HXX
#include <fldref.hxx>
-#endif
#include <fldedt.hxx>
#include <crsskip.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
#include "swabstdlg.hxx"
#include "dialog.hrc"
@@ -103,10 +82,21 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
pSh->SetCareWin(this);
- /* #108536# Only create selection if there is none
- already. Normalize PaM instead of swapping. */
+ if ( pSh->CrsrInsideInputFld() )
+ {
+ // move cursor to start of Input Field
+ SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld);
+ if ( pInputFld != NULL
+ && pInputFld->GetFmtFld() != NULL )
+ {
+ pSh->GotoField( *(pInputFld->GetFmtFld()) );
+ }
+ }
+
if ( ! pSh->HasSelection() )
+ {
pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
+ }
pSh->NormalizePam();
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 4cfdc0078497..78b43ea2ce89 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -343,7 +343,7 @@ SwField* SwFldMgr::GetCurFld()
{
SwWrtShell *pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if ( pSh )
- pCurFld = pSh->GetCurFld();
+ pCurFld = pSh->GetCurFld( true );
else
pCurFld = NULL;
@@ -818,10 +818,12 @@ sal_Bool SwFldMgr::GoNextPrev( sal_Bool bNext, SwFieldType* pTyp )
if (pTyp && pTyp->Which() == RES_DBFLD)
{
// Fuer Feldbefehl-bearbeiten (alle DB-Felder anspringen)
- return pSh->MoveFldType( 0, bNext, USHRT_MAX, RES_DBFLD );
+ return pSh->MoveFldType( 0, (bNext ? true : false), RES_DBFLD );
}
- return pTyp && pSh ? pSh->MoveFldType( pTyp, bNext ) : sal_False;
+ return (pTyp && pSh)
+ ? pSh->MoveFldType( pTyp, (bNext ? true : false) )
+ : sal_False;
}
/*--------------------------------------------------------------------
@@ -1008,7 +1010,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
{
if( rData.sPar1.Len() > 0 && CanInsertRefMark( rData.sPar1 ) )
{
- pCurShell->SetAttr( SwFmtRefMark( rData.sPar1 ) );
+ pCurShell->SetAttrItem( SwFmtRefMark( rData.sPar1 ) );
return sal_True;
}
return sal_False;
@@ -1240,7 +1242,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
(SwInputFieldType*)pCurShell->GetFldType(0, RES_INPUTFLD);
SwInputField* pInpFld =
- new SwInputField(pTyp, rData.sPar1, rData.sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId);
+ new SwInputField( pTyp, rData.sPar1, rData.sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId);
pFld = pInpFld;
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index b0ab9b34e99a..002e16fd93d2 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -517,8 +517,35 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
| WB_ITEMBORDER
| WB_DOUBLEBORDER );
+//IAccessibility2 Impplementaton 2009-----
for( i = 0; i < 5; i++)
- aDefaultVS.InsertItem( i + 1, i );
+ //Solution:Set accessible name one be one
+ //aDefaultVS.InsertItem( i + 1, i );
+ {
+ String aItemText;
+ switch( i )
+ {
+ case 0:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM0 ) ;
+ break;
+ case 1:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM1 ) ;
+ break;
+ case 2:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM2 ) ;
+ break;
+ case 3:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM3 );
+ break;
+ case 4:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM4 );
+ break;
+ default:
+ break;
+ }
+ aDefaultVS.InsertItem( i + 1, aItemText, i );
+ }
+//-----IAccessibility2 Impplementaton 2009
aDefaultVS.SetSelectHdl(LINK(this, SwColumnPage, SetDefaultsHdl));
@@ -968,7 +995,14 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
// #i17816# changing the displayed types within the ValueSet
//from two columns to two columns with different settings doesn't invalidate the
// example windows in ::ColModify()
- if(!pNF ||(pColMgr->GetCount() != nCols))
+//IAccessibility2 Impplementaton 2009-----
+// the pColMgr->GetCount()'s return is some how bugged,
+// it will return 0 when actual count is 1, so fix it.
+ //if(!pNF ||(pColMgr->GetCount() != nCols))
+ int nTemp = pColMgr->GetCount();
+ if(nTemp == 0) nTemp = 1;
+ if( nTemp != nCols )
+//-----IAccessibility2 Impplementaton 2009
{
if(pNF)
aDefaultVS.SetNoSelection();
diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc
index 2e6e23a25fa7..eb506201915d 100644
--- a/sw/source/ui/frmdlg/column.hrc
+++ b/sw/source/ui/frmdlg/column.hrc
@@ -75,8 +75,15 @@
#define FT_TEXTDIRECTION 60
#define LB_TEXTDIRECTION 61
#define FL_VERT 62
+//IAccessibility2 Impplementaton 2009-----
+#define STR_PAGESETUP_SPACING 32765
+//-----IAccessibility2 Impplementaton 2009
#define LISTBOX_SELECTION 0
#define LISTBOX_SECTION 1
#define LISTBOX_SECTIONS 2
#define LISTBOX_PAGE 3
#define LISTBOX_FRAME 4
+
+//IAccessibility2 Impplementaton 2009-----
+#define STR_COLUMN_WIDTH 63
+//-----IAccessibility2 Impplementaton 2009
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 86d861ce0976..e399fd2fdecd 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -639,11 +639,15 @@ sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
namespace
{
- void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto )
+ //IAccessibility2 Implementation 2009-----
+ void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto, PercentField& _rPF_Edit)
{
_rFT_man.Show( !_bChecked );
_rFT_auto.Show( _bChecked );
+ String accName = _bChecked ? _rFT_auto.GetText() : _rFT_man.GetText();
+ _rPF_Edit.SetAccessibleName(accName);
}
+ //-----IAccessibility2 Implementation 2009
}
@@ -2091,14 +2095,18 @@ IMPL_LINK_INLINE_END( SwFrmPage, RealSizeHdl, Button *, EMPTYARG )
IMPL_LINK( SwFrmPage, AutoWidthClickHdl, void*, EMPTYARG )
{
if( !IsInGraficMode() )
- HandleAutoCB( aAutoWidthCB.IsChecked(), aWidthFT, aWidthAutoFT );
+ //IAccessibility2 Implementation 2009-----
+ HandleAutoCB( aAutoWidthCB.IsChecked(), aWidthFT, aWidthAutoFT, aWidthED );
+ //-----IAccessibility2 Implementation 2009
return 0;
}
IMPL_LINK( SwFrmPage, AutoHeightClickHdl, void*, EMPTYARG )
{
if( !IsInGraficMode() )
- HandleAutoCB( aAutoHeightCB.IsChecked(), aHeightFT, aHeightAutoFT );
+ //IAccessibility2 Implementation 2009-----
+ HandleAutoCB( aAutoHeightCB.IsChecked(), aHeightFT, aHeightAutoFT, aWidthED );
+ //-----IAccessibility2 Implementation 2009
return 0;
}
@@ -2247,14 +2255,18 @@ void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset)
SwFrmSize eSize = rSize.GetHeightSizeType();
sal_Bool bCheck = eSize != ATT_FIX_SIZE;
aAutoHeightCB.Check( bCheck );
- HandleAutoCB( bCheck, aHeightFT, aHeightAutoFT );
+ //IAccessibility2 Implementation 2009-----
+ HandleAutoCB( bCheck, aHeightFT, aHeightAutoFT, aWidthED );
+ //-----IAccessibility2 Implementation 2009
if( eSize == ATT_VAR_SIZE )
aHeightED.SetValue( aHeightED.GetMin(), FUNIT_NONE );
eSize = rSize.GetWidthSizeType();
bCheck = eSize != ATT_FIX_SIZE;
aAutoWidthCB.Check( bCheck );
- HandleAutoCB( bCheck, aWidthFT, aWidthAutoFT );
+ //IAccessibility2 Implementation 2009-----
+ HandleAutoCB( bCheck, aWidthFT, aWidthAutoFT, aWidthED );
+ //-----IAccessibility2 Implementation 2009
if( eSize == ATT_VAR_SIZE )
aWidthED.SetValue( aWidthED.GetMin(), FUNIT_NONE );
diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx
index 25ff5fd97060..23e344f0c5cd 100644
--- a/sw/source/ui/inc/conttree.hxx
+++ b/sw/source/ui/inc/conttree.hxx
@@ -36,6 +36,10 @@ class SwGlblDocContents;
class SwGlblDocContent;
class SfxObjectShell;
+//IAccessibility2 Implementation 2009-----
+//Solution: Include SdrObject class
+class SdrObject;
+//-----IAccessibility2 Implementation 2009
#define EDIT_MODE_EDIT 0
#define EDIT_MODE_UPD_IDX 1
@@ -89,7 +93,10 @@ class SwContentTree : public SvTreeListBox
sal_Bool bIsImageListInitialized : 1;
static sal_Bool bIsInDrag;
-
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool bIsKeySpace;
+ Rectangle oldRectangle;
+ //-----IAccessibility2 Implementation 2009
void FindActiveTypeAndRemoveUserData();
using SvLBox::ExecuteDrop;
@@ -144,6 +151,11 @@ protected:
public:
SwContentTree(Window* pParent, const ResId& rResId);
~SwContentTree();
+ //IAccessibility2 Implementation 2009-----
+ String GetEntryAltText( SvLBoxEntry* pEntry ) const;
+ String GetEntryLongDescription( SvLBoxEntry* pEntry ) const;
+ SdrObject* GetDrawingObjectsByContent(const SwContent *pCnt);
+ //-----IAccessibility2 Implementation 2009
sal_Bool ToggleToRoot();
sal_Bool IsRoot() const {return bIsRoot;}
@@ -196,6 +208,9 @@ public:
virtual void KeyInput(const KeyEvent& rKEvt);
virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ //IAccessibility2 Implementation 2009-----
+ virtual sal_Int32 GetEntryRealChildsNum( SvLBoxEntry* pEntry ) const;
+ //-----IAccessibility2 Implementation 2009
};
diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx
index 6facd20b49bb..4c348da304c1 100644
--- a/sw/source/ui/inc/edtwin.hxx
+++ b/sw/source/ui/inc/edtwin.hxx
@@ -297,6 +297,9 @@ public:
SwEditWin(Window *pParent, SwView &);
virtual ~SwEditWin();
+ //IAccessibility2 Implementation 2009-----
+ virtual void SwitchView();
+ //-----IAccessibility2 Implementation 2009
};
#endif
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index a06e08285da5..42f32dc4b040 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -164,6 +164,9 @@ public:
virtual ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible>
CreateAccessible();
+ //IAccessibility2 Implementation 2009-----
+ virtual void SwitchView();
+ //-----IAccessibility2 Implementation 2009
};
@@ -175,7 +178,7 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
{
// ViewWindow und Henkel zur Core
// aktuelle Dispatcher-Shell
- SwPagePreViewWin aViewWin;
+ SwPagePreViewWin* pViewWin;//IAccessibility2 Implementation 2009
//viewdata of the previous SwView and the new crsrposition
String sSwViewData,
//and the new cursor position if the user double click in the PagePreView
@@ -250,11 +253,11 @@ public:
SFX_DECL_INTERFACE(SW_PAGEPREVIEW)
inline Window* GetFrameWindow() const { return &(GetViewFrame())->GetWindow(); }
- inline ViewShell* GetViewShell() const { return aViewWin.GetViewShell(); }
+ inline ViewShell* GetViewShell() const { return pViewWin->GetViewShell(); }
inline const Rectangle& GetVisArea() const { return aVisArea; }
- inline void GrabFocusViewWin() { aViewWin.GrabFocus(); }
+ inline void GrabFocusViewWin() { pViewWin->GrabFocus(); }
inline void RepaintCoreRect( const SwRect& rRect )
- { aViewWin.RepaintCoreRect( rRect ); }
+ { pViewWin->RepaintCoreRect( rRect ); }
void DocSzChgd(const Size& rNewSize);
const Size& GetDocSz() const { return aDocSz; }
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index e5d531d74be1..bec28ca748c9 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -115,6 +115,9 @@ public:
void SetStyle(const sal_uInt16 nSt) { nStyle = nSt; }
String GetText() const;
+//IAccessibility2 Impplementaton 2009-----
+ void SetText( const XubString& rStr );
+ void SetText( const XubString& rStr, const Selection& rNewSelection ) { ComboBox::SetText( rStr, rNewSelection ); };
};
#endif /* _SWLBOX_HXX */
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index 175ad0b2d1ae..253e05be78c8 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -286,6 +286,12 @@ class SwTokenWindow : public Window
Link aButtonSelectedHdl;
Control* pActiveCtrl;
Link aModifyHdl;
+//IAccessibility2 Impplementaton 2009-----
+ String accessibleName;
+ String sAdditionalAccnameString1;
+ String sAdditionalAccnameString2;
+ String sAdditionalAccnameString3;
+//-----IAccessibility2 Impplementaton 2009
SwTOXEntryTabPage* m_pParent;
@@ -337,6 +343,11 @@ public:
virtual void Resize();
virtual void GetFocus();
+//IAccessibility2 Impplementaton 2009-----
+ void SetFocus2theAllBtn();
+private:
+ sal_uInt32 GetControlIndex(FormTokenType eType, const Control* pCurControl) const;
+//-----IAccessibility2 Impplementaton 2009
};
/* -----------------------------23.12.99 14:16--------------------------------
@@ -482,6 +493,10 @@ public:
String GetLevelHelp(sal_uInt16 nLevel) const;
void PreTokenButtonRemoved(const SwFormToken& rToken);
+//IAccessibility2 Impplementaton 2009-----
+ void SetFocus2theAllBtn();
+ virtual long Notify( NotifyEvent& rNEvt );
+//-----IAccessibility2 Impplementaton 2009
};
/* -----------------05.07.99 13:00-------------------
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index f35cc0fe7d9d..68d9b7d3e7d9 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -200,7 +200,10 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
sNewCrsrPos;
// to support keyboard the number of the page to go to can be set too
sal_uInt16 nNewPage;
-
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt16 nOldPageNum;
+ String nOldSectionName;
+ //-----IAccessibility2 Implementation 2009
Point aTabColFromDocPos; //Verschieben von Tabellenspalten aus
//aus dem Dokument heraus.
SwTxtNode * pNumRuleNodeFromDoc; // Moving indent of numrule #i23726#
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index a20e92ab853a..9de7c352939f 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -256,7 +256,7 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
sal_Bool PageCrsr(SwTwips lOffset, sal_Bool bSelect);
// Felder Update
- void UpdateInputFlds( SwInputFieldList* pLst = 0, sal_Bool bOnlyInSel = sal_False );
+ void UpdateInputFlds( SwInputFieldList* pLst = 0 );
void NoEdit(sal_Bool bHideCrsr = sal_True);
void Edit();
@@ -446,9 +446,6 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
void NavigatorPaste( const NaviContentBookmark& rBkmk,
const sal_uInt16 nAction );
- // die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
- virtual void NewCoreSelection();
-
virtual void ApplyViewOptions( const SwViewOption &rOpt );
// autom. Update von Vorlagen
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 2ff5d5563edd..c6a7fca54649 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1860,7 +1860,15 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt )
bNextControl = sal_False;
bCall = sal_True;
}
-
+//IAccessibility2 Impplementaton 2009-----
+ else if ( (aCode.GetCode() == KEY_F3) && aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() )
+ {
+ if ( m_pParent )
+ {
+ m_pParent->SetFocus2theAllBtn();
+ }
+ }
+//-----IAccessibility2 Impplementaton 2009
if(bCall && aPrevNextControlLink.IsSet())
aPrevNextControlLink.Call(this);
@@ -1996,6 +2004,15 @@ void SwTOXButton::KeyInput( const KeyEvent& rKEvt )
//this is invalid here
return;
}
+//IAccessibility2 Impplementaton 2009-----
+ else if ( (aCode.GetCode() == KEY_F3) && aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() )
+ {
+ if ( m_pParent )
+ {
+ m_pParent->SetFocus2theAllBtn();
+ }
+ }
+//-----IAccessibility2 Impplementaton 2009
if(bCall && aPrevNextControlLink.IsSet())
aPrevNextControlLink.Call(this);
else
@@ -2644,6 +2661,30 @@ void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken)
sal_uInt16 nPos = aAuthFieldsLB.InsertEntry(sTemp);
aAuthFieldsLB.SetEntryData(nPos, (void*)(nData));
}
+//IAccessibility2 Impplementaton 2009-----
+void SwTOXEntryTabPage::SetFocus2theAllBtn()
+{
+ aAllLevelsPB.GrabFocus();
+}
+long SwTOXEntryTabPage::Notify( NotifyEvent& rNEvt )
+{
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ const KeyEvent& rKEvt = *rNEvt.GetKeyEvent();
+ KeyCode aCode = rKEvt.GetKeyCode();
+ if ( (aCode.GetCode() == KEY_F4) && aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() )
+ {
+ if ( aTokenWIN.GetActiveControl() )
+ {
+ aTokenWIN.GetActiveControl()->GrabFocus();
+ }
+ }
+
+ }
+
+ return SfxTabPage::Notify( rNEvt );
+}
+//-----IAccessibility2 Impplementaton 2009
/*-- 16.06.99 10:47:35---------------------------------------------------
This function inizializes the default value in the Token
@@ -3137,7 +3178,12 @@ SwTokenWindow::SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId) :
nHelpId = STR_TOKEN_HELP_ENTRY;
aButtonHelpTexts[i] = String(ResId(nHelpId, *rResId.GetResMgr()));
}
-
+//IAccessibility2 Impplementaton 2009-----
+ accessibleName = String(SW_RES(STR_STRUCTURE));
+ sAdditionalAccnameString1 = String(SW_RES(STR_ADDITIONAL_ACCNAME_STRING1));
+ sAdditionalAccnameString2 = String(SW_RES(STR_ADDITIONAL_ACCNAME_STRING2));
+ sAdditionalAccnameString3 = String(SW_RES(STR_ADDITIONAL_ACCNAME_STRING3));
+//-----IAccessibility2 Impplementaton 2009
FreeResource();
Link aLink(LINK(this, SwTokenWindow, ScrollHdl));
@@ -3295,6 +3341,32 @@ Control* SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT
pEdit->SetPosPixel(aControlPos);
aControlList.Insert(pEdit, aControlList.Count());
pEdit->SetText(rText);
+//IAccessibility2 Impplementaton 2009-----
+ sal_uInt32 nIndex = GetControlIndex( TOKEN_TEXT, pEdit );
+ String s1 = String::CreateFromAscii(" (");
+ String s2 = String::CreateFromAscii(")");
+ String s3 = String::CreateFromAscii(", ");
+ String strName(accessibleName);
+ strName += String::CreateFromInt32(nIndex);
+ if ( nIndex == 1 )
+ {
+ /*Press left or right arrow to choose the structure controls*/
+ strName += s1;
+ strName += sAdditionalAccnameString2;
+ strName += s3;
+ /*Press Ctrl+Alt+A to move focus for more operations*/
+ strName += sAdditionalAccnameString1;
+ strName += s3;
+ /*Press Ctrl+Alt+B to move focus back to the current structure control*/
+ strName += sAdditionalAccnameString3;
+ strName += s2;
+ pEdit->SetAccessibleName(strName);
+ }
+ else
+ {
+ pEdit->SetAccessibleName(strName);
+ }
+//-----IAccessibility2 Impplementaton 2009
Size aEditSize(aControlSize);
aEditSize.Width() = pEdit->GetTextWidth(rText) + EDIT_MINWIDTH;
pEdit->SetSizePixel(aEditSize);
@@ -3325,6 +3397,17 @@ Control* SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT
(ToxAuthorityField)rToken.nAuthorityField));
pButton->SetText(sTmp.Copy(0, 2));
}
+//IAccessibility2 Impplementaton 2009-----
+ String sSpace = String::CreateFromAscii(" ");
+ sal_uInt32 nIndex = GetControlIndex( rToken.eTokenType, pButton );
+ String sAccName = aButtonHelpTexts[rToken.eTokenType];
+ if ( nIndex )
+ {
+ sAccName += sSpace;
+ sAccName += String::CreateFromInt32(nIndex);
+ }
+ pButton->SetAccessibleName( sAccName );
+//-----IAccessibility2 Impplementaton 2009
pButton->Show();
pRet = pButton;
}
@@ -3466,6 +3549,32 @@ void SwTokenWindow::InsertAtSelection(
SwTOXEdit* pEdit = new SwTOXEdit(&aCtrlParentWin, this, aTmpToken);
aControlList.Insert(pEdit, nActivePos + 1);
pEdit->SetText(sRight);
+//IAccessibility2 Impplementaton 2009-----
+ sal_uInt32 nIndex = GetControlIndex( TOKEN_TEXT, pEdit );
+ String s1 = String::CreateFromAscii(" (");
+ String s2 = String::CreateFromAscii(")");
+ String s3 = String::CreateFromAscii(", ");
+ String strName(accessibleName);
+ strName += String::CreateFromInt32(nIndex);
+ if ( nIndex == 1)
+ {
+ /*Press left or right arrow to choose the structure controls*/
+ strName += s1;
+ strName += sAdditionalAccnameString2;
+ strName += s3;
+ /*Press Ctrl+Alt+A to move focus for more operations*/
+ strName += sAdditionalAccnameString1;
+ strName += s3;
+ /*Press Ctrl+Alt+B to move focus back to the current structure control*/
+ strName += sAdditionalAccnameString3;
+ strName += s2;
+ pEdit->SetAccessibleName(strName);
+ }
+ else
+ {
+ pEdit->SetAccessibleName(strName);
+ }
+//-----IAccessibility2 Impplementaton 2009
pEdit->SetSizePixel(aControlSize);
pEdit->AdjustSize();
pEdit->SetModifyHdl(LINK(this, SwTokenWindow, EditResize ));
@@ -3495,6 +3604,17 @@ void SwTokenWindow::InsertAtSelection(
pButton->SetText(sTmp.Copy(0, 2));
}
+//IAccessibility2 Impplementaton 2009-----
+ String sSpace = String::CreateFromAscii(" ");
+ sal_uInt32 nIndex = GetControlIndex( rToken.eTokenType, pButton );
+ String sAccName = aButtonHelpTexts[rToken.eTokenType];
+ if ( nIndex )
+ {
+ sAccName += sSpace;
+ sAccName += String::CreateFromInt32(nIndex);
+ }
+ pButton->SetAccessibleName( sAccName );
+//-----IAccessibility2 Impplementaton 2009
Size aEditSize(GetOutputSizePixel());
aEditSize.Width() = pButton->GetTextWidth(rText) + 5;
pButton->SetSizePixel(aEditSize);
@@ -3922,6 +4042,41 @@ void SwTokenWindow::GetFocus()
}
}
}
+//IAccessibility2 Impplementaton 2009-----
+void SwTokenWindow::SetFocus2theAllBtn()
+{
+ if (m_pParent)
+ {
+ m_pParent->SetFocus2theAllBtn();
+ }
+}
+sal_uInt32 SwTokenWindow::GetControlIndex(FormTokenType eType, const Control* pCurControl) const
+{
+ //there are only one entry-text button and only one page-number button,
+ //so we need not add index for these two buttons.
+ if ( eType == TOKEN_ENTRY_TEXT || eType == TOKEN_PAGE_NUMS )
+ {
+ return 0;
+ }
+
+ sal_uInt32 nIndex = 0;
+ const Control* pControl = ((SwTokenWindow*)this)->aControlList.First();
+ while(pControl)
+ {
+ const SwFormToken& rNewToken = WINDOW_EDIT == pControl->GetType()
+ ? ((SwTOXEdit*)pControl)->GetFormToken()
+ : ((SwTOXButton*)pControl)->GetFormToken();
+
+ if(eType == rNewToken.eTokenType)
+ {
+ nIndex++;
+ }
+ pControl = ((SwTokenWindow*)this)->aControlList.Next();
+ }
+
+ return nIndex;
+}
+//-----IAccessibility2 Impplementaton 2009
/* -----------------25.03.99 15:17-------------------
*
* --------------------------------------------------*/
diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc
index f436cb1bff1e..a6ffb2e72e43 100644
--- a/sw/source/ui/index/cnttab.hrc
+++ b/sw/source/ui/index/cnttab.hrc
@@ -169,7 +169,12 @@
#define STR_TOKEN_HELP_AUTHORITY (STR_BUTTON_HELP_TEXT_START + 9)
#define STR_CHARSTYLE (STR_TOKEN_HELP_AUTHORITY + 1)
-
+//IAccessibility2 Impplementaton 2009-----
+#define STR_STRUCTURE (STR_TOKEN_HELP_AUTHORITY + 2)
+#define STR_ADDITIONAL_ACCNAME_STRING1 (STR_TOKEN_HELP_AUTHORITY + 3)
+#define STR_ADDITIONAL_ACCNAME_STRING2 (STR_TOKEN_HELP_AUTHORITY + 4)
+#define STR_ADDITIONAL_ACCNAME_STRING3 (STR_TOKEN_HELP_AUTHORITY + 5)
+//-----IAccessibility2 Impplementaton 2009
#define TLB_STYLES 100
#define FL_STYLES 101
#define PB_OK 102
diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src
index f373bb7299ec..a51713b233e9 100644
--- a/sw/source/ui/index/cnttab.src
+++ b/sw/source/ui/index/cnttab.src
@@ -674,6 +674,24 @@ TabPage TP_TOX_ENTRY
{
Text [ en-US ] = "Character Style: ";
};
+//IAccessibility2 Impplementaton 2009-----
+ String STR_STRUCTURE
+ {
+ Text [ en-US ] = "Structure text";
+ };
+ String STR_ADDITIONAL_ACCNAME_STRING1
+ {
+ Text [ en-US ] = "Press Ctrl+Alt+A to move focus for more operations";
+ };
+ String STR_ADDITIONAL_ACCNAME_STRING2
+ {
+ Text [ en-US ] = "Press left or right arrow to choose the structure controls";
+ };
+ String STR_ADDITIONAL_ACCNAME_STRING3
+ {
+ Text [ en-US ] = "Press Ctrl+Alt+B to move focus back to the current structure control";
+ };
+//-----IAccessibility2 Impplementaton 2009
};
PushButton PB_ALL_LEVELS
{
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index be8b649e5494..be4b349005b4 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -400,7 +400,7 @@ void SwHHCWrapper::ChangeText_impl( const String &rNewText, sal_Bool bKeepAttrib
// was deleted)
rWrtShell.ResetAttr();
// apply previously saved attributes to new text
- rWrtShell.SetAttr( aItemSet );
+ rWrtShell.SetAttrSet( aItemSet );
}
else
{
@@ -512,7 +512,7 @@ void SwHHCWrapper::ReplaceUnit(
SwPaM *pPaM = rWrtShell.GetCrsr();
(void)pPaM;
#endif
- rWrtShell.SetAttr(*pRuby);
+ rWrtShell.SetAttrItem(*pRuby);
delete pRuby;
rWrtShell.EndUndo( UNDO_SETRUBYATTR );
}
@@ -564,7 +564,7 @@ void SwHHCWrapper::ReplaceUnit(
aSet.Put( aFontItem );
}
- rWrtShell.SetAttr( aSet );
+ rWrtShell.SetAttrSet( aSet );
rWrtShell.ClearMark();
}
diff --git a/sw/source/ui/misc/glossary.hrc b/sw/source/ui/misc/glossary.hrc
index 44708bf92343..22bfa334c5dd 100644
--- a/sw/source/ui/misc/glossary.hrc
+++ b/sw/source/ui/misc/glossary.hrc
@@ -84,4 +84,6 @@
#define FL_NN 9
#define BT_CANCEL 10
#define BT_OKNEW 11
-
+//IAccessibility2 Implementation 2009-----
+#define STR_SW_CATEGORY 12
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 8fa8adc5ece4..ea6bec7be94f 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -79,7 +79,7 @@ void __EXPORT SwInsFootNoteDlg::Apply()
rFont.GetStyleName(), rFont.GetPitch(),
eCharSet, RES_CHRATR_FONT );
aSet.Put( aFont );
- rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
+ rSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
rSh.ResetSelect(0, sal_False);
rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index cad727e68413..e17f41834e51 100644
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -47,6 +47,7 @@
#include "cellatr.hxx"
#include "edtwin.hxx"
#include "helpid.h"
+#include "access.hrc"
// nur fuers UpdateRange - Box in dem der gestackte Cursor sthet loeschen
#include "pam.hxx"
@@ -90,9 +91,16 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
pWrtShell = pView ? pView->GetWrtShellPtr() : 0;
InsertWindow( ED_POS, &aPos, 0, 0);
+ //IAccessibility2 Implementation 2009-----
+ SetItemText(ED_POS, String(SW_RES(STR_ACCESS_FORMULA_TYPE)));
+ aPos.SetAccessibleName(String(SW_RES(STR_ACCESS_FORMULA_TYPE)));
+ SetAccessibleName(String(SW_RES(STR_ACCESS_FORMULA_TOOLBAR)));
InsertSeparator ( 1 );
InsertSeparator ();
InsertWindow( ED_FORMULA, &aEdit);
+ SetItemText(ED_FORMULA, String(SW_RES(STR_ACCESS_FORMULA_TEXT)));
+ aEdit.SetAccessibleName(String(SW_RES(STR_ACCESS_FORMULA_TEXT)));
+ //-----IAccessibility2 Implementation 2009
SetHelpId(ED_FORMULA, HID_EDIT_FORMULA);
sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
diff --git a/sw/source/ui/ribbar/inputwin.hrc b/sw/source/ui/ribbar/inputwin.hrc
index 8c87ffc091ba..59ebcf906060 100644
--- a/sw/source/ui/ribbar/inputwin.hrc
+++ b/sw/source/ui/ribbar/inputwin.hrc
@@ -60,6 +60,11 @@
#define ED_POS 2
#define ED_FORMULA 3
+//IAccessibility2 Impplementaton 2009-----
+#define STR_ED_POS 1
+#define STR_ED_FORMULA 2
+#define STR_TOOLBAR_FORMULA 35
+//-----IAccessibility2 Impplementaton 2009
#endif
diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src
index 21c3ccc0e7e8..431c07ae1dec 100644
--- a/sw/source/ui/ribbar/inputwin.src
+++ b/sw/source/ui/ribbar/inputwin.src
@@ -28,6 +28,8 @@
#include "globals.hrc"
#include "ribbar.hrc"
#include "inputwin.hrc"
+#include "access.hrc"
+
ToolBox RID_TBX_FORMULA
{
Pos = MAP_APPFONT ( 0 , 0 ) ;
@@ -279,6 +281,20 @@ String STR_TBL_FORMULA
{
Text [ en-US ] = "Text formula" ;
};
+//IAccessibility2 Impplementaton 2009-----
+String STR_ACCESS_FORMULA_TOOLBAR
+{
+ Text [ en-US ] = "Formula Tool Bar" ;
+};
+String STR_ACCESS_FORMULA_TYPE
+{
+ Text [ en-US ] = "Formula Type" ;
+};
+String STR_ACCESS_FORMULA_TEXT
+{
+ Text [ en-US ] = "Formula Text" ;
+};
+//-----IAccessibility2 Impplementaton 2009
#define TB_INPUT \
ToolBoxItem\
{\
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 6f626ec31f19..7229b9f249ee 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -503,6 +503,15 @@ SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >&
sText = String(SW_RES(nResStr));
nTbxBits = TIB_CHECKABLE;
}
+ //IAccessibility2 Impplementaton 2009-----
+ else
+ {
+ if (nNaviId == NID_PREV)
+ sText = String(SW_RES(STR_IMGBTN_PGE_UP));
+ else if (nNaviId == NID_NEXT)
+ sText = String(SW_RES(STR_IMGBTN_PGE_DOWN));
+ }
+ //-----IAccessibility2 Impplementaton 2009
aToolBox.InsertItem(nNaviId, sText, nTbxBits);
aToolBox.SetHelpId( nNaviId, aNavigationHelpIds[i] );
}
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index e4a9ed62ad84..51d2f0086c4c 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -1100,13 +1100,14 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
- case FN_REPLY:
- case FN_POSTIT:
- case FN_DELETE_COMMENT:
- if ( pPostItMgr->HasActiveSidebarWin() )
- pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot);
- break;
- case FN_DELETE_ALL_NOTES:
+ case FN_REPLY:
+ case FN_POSTIT:
+ case FN_DELETE_COMMENT:
+ if ( pPostItMgr->HasActiveSidebarWin() )
+ pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot);
+ break;
+
+ case FN_DELETE_ALL_NOTES:
pPostItMgr->Delete();
break;
case FN_DELETE_NOTE_AUTHOR:
@@ -1149,22 +1150,23 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
- case FN_POSTIT:
- case FN_DELETE_NOTE_AUTHOR:
- case FN_DELETE_ALL_NOTES:
- case FN_HIDE_NOTE:
- case FN_HIDE_NOTE_AUTHOR:
- case FN_HIDE_ALL_NOTES:
- case FN_DELETE_COMMENT:
+ case FN_POSTIT:
+ case FN_DELETE_NOTE_AUTHOR:
+ case FN_DELETE_ALL_NOTES:
+ case FN_HIDE_NOTE:
+ case FN_HIDE_NOTE_AUTHOR:
+ case FN_HIDE_ALL_NOTES:
+ case FN_DELETE_COMMENT:
{
- if ( !pPostItMgr ||
- !pPostItMgr->HasActiveAnnotationWin() )
+ if( !pPostItMgr
+ || !pPostItMgr->HasActiveAnnotationWin() )
{
rSet.DisableItem(nWhich);
}
break;
}
- case FN_REPLY:
+
+ case FN_REPLY:
{
if ( !pPostItMgr ||
!pPostItMgr->HasActiveAnnotationWin() )
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index eacd9d225196..e23d67df936e 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -296,11 +296,10 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
case SID_PASTE:
{
TransferableDataHelper aDataHelper(
- TransferableDataHelper::CreateFromSystemClipboard(
- &rSh.GetView().GetEditWin() ) );
-
- if( aDataHelper.GetXTransferable().is() &&
- SwTransferable::IsPaste( rSh, aDataHelper ))
+ TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin() ) );
+ if( aDataHelper.GetXTransferable().is()
+ && SwTransferable::IsPaste( rSh, aDataHelper )
+ && !rSh.CrsrInsideInputFld() )
{
// temp. Variablen, da die Shell nach dem Paste schon
// zerstoert sein kann
@@ -348,10 +347,9 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
case SID_PASTE_UNFORMATTED:
{
TransferableDataHelper aDataHelper(
- TransferableDataHelper::CreateFromSystemClipboard(
- &rSh.GetView().GetEditWin()) );
- if( aDataHelper.GetXTransferable().is() &&
- SwTransferable::IsPaste( rSh, aDataHelper ))
+ TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin()) );
+ if( aDataHelper.GetXTransferable().is()
+ && SwTransferable::IsPaste( rSh, aDataHelper ) )
{
// temp. Variablen, da die Shell nach dem Paste schon
// zerstoert sein kann
@@ -383,10 +381,10 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
case SID_PASTE_SPECIAL:
{
TransferableDataHelper aDataHelper(
- TransferableDataHelper::CreateFromSystemClipboard(
- &rSh.GetView().GetEditWin()) );
- if( aDataHelper.GetXTransferable().is() &&
- SwTransferable::IsPaste( rSh, aDataHelper ))
+ TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin()) );
+ if( aDataHelper.GetXTransferable().is()
+ && SwTransferable::IsPaste( rSh, aDataHelper )
+ && !rSh.CrsrInsideInputFld() )
{
// temp. Variablen, da die Shell nach dem Paste schon
// zerstoert sein kann
@@ -399,7 +397,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
{
SfxViewFrame* pViewFrame = pView->GetViewFrame();
uno::Reference< frame::XDispatchRecorder > xRecorder =
- pViewFrame->GetBindings().GetRecorder();
+ pViewFrame->GetBindings().GetRecorder();
if(xRecorder.is()) {
SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, nFormatId ) );
@@ -415,6 +413,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
return;
}
break;
+
default:
DBG_ERROR("falscher Dispatcher");
return;
@@ -452,15 +451,25 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet)
break;
case SID_PASTE:
- if( !GetView().IsPasteAllowed() )
- rSet.DisableItem( SID_PASTE );
+ if( !GetView().IsPasteAllowed()
+ || rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
break;
case SID_PASTE_SPECIAL:
+ if( !GetView().IsPasteSpecialAllowed()
+ || rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ break;
+
+ case SID_PASTE_UNFORMATTED:
if( !GetView().IsPasteSpecialAllowed() )
{
- rSet.DisableItem( SID_PASTE_SPECIAL );
- rSet.DisableItem( SID_PASTE_UNFORMATTED );
+ rSet.DisableItem( nWhich );
}
break;
@@ -660,8 +669,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_UPDATE_INPUTFIELDS:
- rSh.UpdateInputFlds(NULL, sal_False);
+ rSh.UpdateInputFlds();
break;
+
case FN_PREV_BOOKMARK:
rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoPrevBookmark()));
break;
@@ -691,7 +701,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.ClearMark();
rSh.EndSelect();
}
- sal_Bool bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
+ sal_Bool bRet = rSh.MoveFldType( pFldType, nSlot == FN_GOTO_NEXT_MARK );
SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
if (pCurField)
rSh.ClickToField(*pCurField);
@@ -1228,7 +1238,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
else
{
- rSh.SetAttr( *pArgs );
+ rSh.SetAttrSet( *pArgs );
}
rSh.EndAllAction();
}
@@ -1261,7 +1271,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
else
{
// Umrandungsattribute ganz normal ueber Shell setzen
- rSh.SetAttr( *pItem );
+ rSh.SetAttrItem( *pItem );
}
}
break;
@@ -1395,10 +1405,14 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_INSERT_REGION:
- if( rSh.IsSelFrmMode() ||
- !rSh.IsInsRegionAvailable() )
+ if( rSh.CrsrInsideInputFld()
+ || rSh.IsSelFrmMode()
+ || !rSh.IsInsRegionAvailable() )
+ {
rSet.DisableItem( nWhich );
+ }
break;
+
case FN_CONVERT_TABLE_TO_TEXT:
{
sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
@@ -2127,7 +2141,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
if (!bAuto)
{
- rSh.SetAttr( *pArgs );
+ rSh.SetAttrSet( *pArgs );
}
}
delete pSSetItem;
@@ -2392,7 +2406,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
rSh.AutoUpdatePara( pColl, aSet);
}
else
- rSh.SetAttr( aBrushItem );
+ rSh.SetAttrItem( aBrushItem );
}
rReq.Done();
@@ -2530,7 +2544,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
- rSh.SetAttr( *pDlg->GetOutputItemSet() );
+ rSh.SetAttrSet( *pDlg->GetOutputItemSet() );
pOutSet = pDlg->GetOutputItemSet();
}
}
@@ -2598,7 +2612,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
- rSh.SetAttr( *pDlg->GetOutputItemSet() );
+ rSh.SetAttrSet( *pDlg->GetOutputItemSet() );
pOutSet = pDlg->GetOutputItemSet();
}
}
@@ -2881,7 +2895,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
SvxBrushItem aBrush( *pBrush );
aBrush.SetWhich( RES_BACKGROUND );
if ( nPos == nParagraphPos )
- rSh.SetAttr( aBrush );
+ rSh.SetAttrItem( aBrush );
else if ( nPos == nTablePos )
rSh.SetTabBackground( aBrush );
else if ( nPos == nTableRowPos )
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 780ed04c8041..12944dd52b9c 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -992,7 +992,7 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet)
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
ESelection aSel(pOLV->GetSelection());
const sal_Bool bCopy = (aSel.nStartPara != aSel.nEndPara) ||
- (aSel.nStartPos != aSel.nEndPos);
+ (aSel.nStartPos != aSel.nEndPos);
SfxWhichIter aIter(rSet);
@@ -1002,33 +1002,31 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet)
{
switch(nWhich)
{
- case SID_CUT:
- case SID_COPY:
- if( !bCopy )
- rSet.DisableItem( nWhich );
- break;
+ case SID_CUT:
+ case SID_COPY:
+ if( !bCopy )
+ rSet.DisableItem( nWhich );
+ break;
- case SID_PASTE:
- {
- TransferableDataHelper aDataHelper(
- TransferableDataHelper::CreateFromSystemClipboard(
- &GetView().GetEditWin() ) );
+ case SID_PASTE:
+ {
+ TransferableDataHelper aDataHelper(
+ TransferableDataHelper::CreateFromSystemClipboard( &GetView().GetEditWin() ) );
- if( !aDataHelper.GetXTransferable().is() ||
- !SwTransferable::IsPaste( GetShell(), aDataHelper ))
- rSet.DisableItem( SID_PASTE );
+ if( !aDataHelper.GetXTransferable().is()
+ || !SwTransferable::IsPaste( GetShell(), aDataHelper ) )
+ {
+ rSet.DisableItem( nWhich );
}
- break;
+ }
+ break;
- case SID_PASTE_SPECIAL:
- rSet.DisableItem( SID_PASTE_SPECIAL );
- break;
- // --> OD 2008-06-20 #151110#
- case SID_CLIPBOARD_FORMAT_ITEMS:
- rSet.DisableItem( SID_CLIPBOARD_FORMAT_ITEMS );
- break;
- // <--
+ case SID_PASTE_SPECIAL:
+ case SID_CLIPBOARD_FORMAT_ITEMS:
+ rSet.DisableItem( nWhich );
+ break;
}
+
nWhich = aIter.NextWhich();
}
}
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 732c0312bead..4fe1e5815880 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -1219,7 +1219,13 @@ void SwFrameShell::GetLineStyleState(SfxItemSet &rSet)
void SwFrameShell::StateInsert(SfxItemSet &rSet)
{
const int nSel = GetShell().GetSelectionType();
-
- if ((nSel & nsSelectionType::SEL_GRF) || (nSel & nsSelectionType::SEL_OLE))
+ if ( (nSel & nsSelectionType::SEL_GRF)
+ || (nSel & nsSelectionType::SEL_OLE) )
+ {
+ rSet.DisableItem(FN_INSERT_FRAME);
+ }
+ else if ( GetShell().CrsrInsideInputFld() )
+ {
rSet.DisableItem(FN_INSERT_FRAME);
+ }
}
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 847d0bd80d0a..4dda12e079ce 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -339,7 +339,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
RES_GRFATR_END-1 );
aGrfSet.Put( *pSet );
if( aGrfSet.Count() )
- rSh.SetAttr( aGrfSet );
+ rSh.SetAttrSet( aGrfSet );
rSh.EndUndo(UNDO_END);
rSh.EndAllAction();
@@ -354,7 +354,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
rSh.GetCurAttr( aSet );
SwMirrorGrf aGrf((const SwMirrorGrf &)aSet.Get(RES_GRFATR_MIRRORGRF));
aGrf.SetGrfToggle(!aGrf.IsGrfToggle());
- rSh.SetAttr(aGrf);
+ rSh.SetAttrItem(aGrf);
}
break;
@@ -505,7 +505,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
ASSERT(!this, falscher Dispatcher);
}
if( aGrfSet.Count() )
- GetShell().SetAttr( aGrfSet );
+ GetShell().SetAttrSet( aGrfSet );
}
GetView().GetViewFrame()->GetBindings().Invalidate(rReq.GetSlot());
}
@@ -532,11 +532,18 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_TWAIN_TRANSFER:
if( bParentCntProt || !bIsGrfCntnt )
bDisable = sal_True;
+ else if ( nWhich == SID_INSERT_GRAPHIC
+ && rSh.CrsrInsideInputFld() )
+ {
+ bDisable = sal_True;
+ }
break;
+
case FN_SAVE_GRAPHIC:
if( rSh.GetGraphicType() == GRAPHIC_NONE )
bDisable = sal_True;
- break;
+ break;
+
case SID_COLOR_SETTINGS:
{
if ( bParentCntProt || !bIsGrfCntnt )
@@ -646,16 +653,6 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{
if( bParentCntProt || !bIsGrfCntnt )
bDisable = sal_True;
- // --> OD 2006-11-03 #i59688#
- // load graphic only if type is unknown
-// else if( bSwappedOut )
-// {
-// rSet.DisableItem( nWhich );
-// if( AddGrfUpdateSlot( nWhich ))
-// rSh.GetGraphic(sal_False); // start the loading
-// }
-// else
-// bDisable = !bBitmapType;
else
{
const sal_uInt16 eGraphicType( rSh.GetGraphicType() );
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index b178666e004b..070af91a7182 100644
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -282,7 +282,7 @@ namespace SwLangHelper
{
rWrtSh.GetCurAttr( rCoreSet );
rCoreSet.Put( SvxLanguageItem( nLang, nLangWhichId ));
- rWrtSh.SetAttr( rCoreSet );
+ rWrtSh.SetAttrSet( rCoreSet );
}
}
else // change language for all text
@@ -298,7 +298,7 @@ namespace SwLangHelper
// #i102191: hard set respective language attribute in text document
// (for all text in the document - which should be selected by now...)
- rWrtSh.SetAttr( SvxLanguageItem( nLang, nLangWhichId ) );
+ rWrtSh.SetAttrItem( SvxLanguageItem( nLang, nLangWhichId ) );
}
}
}
@@ -346,7 +346,7 @@ namespace SwLangHelper
rWrtSh.GetCurAttr( rCoreSet );
for (sal_uInt16 i = 0; i < 3; ++i)
rCoreSet.Put( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId_Writer[i] ));
- rWrtSh.SetAttr( rCoreSet );
+ rWrtSh.SetAttrSet( rCoreSet );
}
}
else // change language for all text
diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx
index 58068080dd2d..c0a2bc7f8626 100644
--- a/sw/source/ui/shells/listsh.cxx
+++ b/sw/source/ui/shells/listsh.cxx
@@ -273,6 +273,13 @@ void SwListShell::GetState(SfxItemSet &rSet)
if(nCurrentNumLevel == (MAXLEVEL - 1))
rSet.DisableItem(nWhich);
break;
+
+ case FN_NUM_BULLET_NONUM:
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem(nWhich);
+ }
+ break;
}
nWhich = aIter.NextWhich();
}
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 73ef1a358e9b..fb9e85e05b52 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -1290,9 +1290,10 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_INSERT_TABLE:
- // Irgendeinen Wert "putten", damit Controller enabled bleibt.
- // Statt "Insert:Table" erscheint dann "Format:Table".
-// rSet.Put(SfxUInt16Item(nSlot, 1));
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nSlot );
+ }
break;
case FN_TABLE_OPTIMAL_HEIGHT:
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 980add9723d4..4031f5415899 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -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>
@@ -172,11 +173,26 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
sal_Bool bRet = sal_False;
SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD );
- if( pFld && rSh.MoveFldType( pFld,
- FN_GOTO_NEXT_INPUTFLD == nSlot ))
+ const bool bAddSetExpressionFlds = !( rSh.GetViewOptions()->IsReadonly() );
+ if ( pFld != NULL
+ && rSh.MoveFldType(
+ pFld,
+ FN_GOTO_NEXT_INPUTFLD == nSlot,
+ USHRT_MAX,
+ bAddSetExpressionFlds ) )
{
rSh.ClearMark();
- rSh.StartInputFldDlg( rSh.GetCurFld(), sal_False );
+ 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;
}
@@ -340,7 +356,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
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())
{
@@ -615,32 +631,26 @@ void SwTextShell::StateField( SfxItemSet &rSet )
{
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:
+ 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() )
{
- SwPostItMgr* pPostItMgr = GetView().GetPostItMgr();
- if ( !pPostItMgr )
- rSet.InvalidateItem( nWhich );
- else if ( !pPostItMgr->HasActiveSidebarWin() )
- {
- rSet.InvalidateItem( FN_DELETE_COMMENT );
- rSet.InvalidateItem( FN_HIDE_NOTE );
- }
+ 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 ...
- */
+ case FN_EDIT_FIELD:
+ {
if( !bGetField )
{
pField = rSh.GetCurFld();
@@ -654,14 +664,15 @@ void SwTextShell::StateField( SfxItemSet &rSet )
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:
+
+ case FN_EXECUTE_MACROFIELD:
{
if(!bGetField)
{
@@ -673,33 +684,55 @@ void SwTextShell::StateField( SfxItemSet &rSet )
}
break;
- case FN_INSERT_FIELD:
+ 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() &&
- pVFrame->KnowsChildWindow(FN_INSERT_FIELD) && !pVFrame->HasChildWindow(FN_INSERT_FIELD_DATA_ONLY) )
- rSet.Put(SfxBoolItem( FN_INSERT_FIELD, pVFrame->HasChildWindow(nWhich)));
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem(nWhich);
+ }
else
- rSet.DisableItem(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() &&
+ 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:
+
+ case FN_INSERT_REF_FIELD:
{
SfxViewFrame* pVFrame = GetView().GetViewFrame();
- if (!pVFrame->KnowsChildWindow(FN_INSERT_FIELD))
+ if ( !pVFrame->KnowsChildWindow(FN_INSERT_FIELD)
+ || rSh.CrsrInsideInputFld() )
+ {
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())
+
+ case FN_INSERT_FIELD_CTRL:
+ if ( rSh.CrsrInsideInputFld() )
+ {
rSet.DisableItem(nWhich);
- break;
- case FN_POSTIT :
- case FN_JAVAEDIT :
+ }
+ 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)
@@ -707,9 +740,32 @@ void SwTextShell::StateField( SfxItemSet &rSet )
else
bCurField = pField && pField->GetTyp()->Which() == RES_SCRIPTFLD;
- if(!bCurField && rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() )
+ 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();
}
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 27bd4827557f..d6ed9a4cdeec 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -211,7 +211,16 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
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;
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 907a6d981b86..b65e65142875 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -159,7 +159,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_STRING:
if( pItem )
rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue());
- break;
+ break;
+
case FN_INSERT_SOFT_HYPHEN:
if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) &&
CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 ))
@@ -169,20 +170,23 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_HARDHYPHEN:
case FN_INSERT_HARD_SPACE:
{
- sal_Unicode cIns = FN_INSERT_HARD_SPACE == nSlot ? CHAR_HARDBLANK
- : CHAR_HARDHYPHEN;
+ 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 ))
+ 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 :
@@ -199,30 +203,46 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
rSh.Insert( String( cIns ) );
}
break;
+
case FN_INSERT_BREAK:
- rSh.SplitNode();
+ {
+ if( !rSh.CrsrInsideInputFld() )
+ {
+ rSh.SplitNode();
+ }
+ else
+ {
+ rSh.InsertLineBreak();
+ }
+ }
rReq.Done();
- break;
+ break;
+
case FN_INSERT_PAGEBREAK:
rSh.InsertPageBreak();
rReq.Done();
- break;
+ break;
+
case FN_INSERT_LINEBREAK:
rSh.InsertLineBreak();
rReq.Done();
- break;
+ break;
+
case FN_INSERT_COLUMN_BREAK:
rSh.InsertColumnBreak();
rReq.Done();
- break;
+ 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;
+
case SID_INSERT_SOUND:
case SID_INSERT_VIDEO:
{
@@ -262,6 +282,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
}
break;
+
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
{
@@ -709,7 +730,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
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();
@@ -759,38 +780,39 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
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;
+ 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 )
+ if( !aMOpt.IsMath()
+ || eCreateMode == SFX_CREATE_MODE_EMBEDDED
+ || bCrsrInHidden
+ || rSh.CrsrInsideInputFld() )
{
rSet.DisableItem( nWhich );
}
@@ -799,30 +821,38 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case SID_INSERT_FLOATINGFRAME:
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
- {
- if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
{
- rSet.DisableItem( nWhich );
+ 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);
+ }
}
- else if( GetShell().IsSelFrmMode())
- rSet.DisableItem( nWhich );
- else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
+ break;
+
+ case FN_INSERT_FRAME_INTERACT_NOCOL :
+ case FN_INSERT_FRAME_INTERACT:
{
- SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- sal_uInt16 nExport = pHtmlOpt->GetExportMode();
- if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
+ if( GetShell().IsSelFrmMode()
+ || GetShell().CrsrInsideInputFld()
+ || ( 0 != (nHtmlMode & HTMLMODE_ON)
+ && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS) )
+ || bCrsrInHidden )
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;
+ break;
+
case SID_HYPERLINK_GETLINK:
{
SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
@@ -869,24 +899,34 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
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 );
+ HYPERDLG_EVENT_MOUSECLICK_OBJECT | HYPERDLG_EVENT_MOUSEOUT_OBJECT );
rSet.Put(aHLinkItem);
}
break;
case FN_INSERT_FRAME:
- if(rSh.IsSelFrmMode())
+ if (rSh.IsSelFrmMode() )
{
const int nSel = rSh.GetSelectionType();
if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCrsrInHidden )
rSet.DisableItem(nWhich);
}
- break;
+ else if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem(nWhich);
+ }
+ break;
+
case FN_INSERT_HRULER :
- if((rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden )
+ if( (rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel())
+ || bCrsrInHidden
+ || rSh.CrsrInsideInputFld() )
+ {
rSet.DisableItem(nWhich);
- break;
+ }
+ break;
+
case FN_FORMAT_COLUMN :
{
//#i80458# column dialog cannot work if the selection contains different page styles and different sections
@@ -1181,7 +1221,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
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();
@@ -1191,7 +1231,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
// 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();
// <--
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 965c92e812eb..82b4536186ef 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -255,7 +255,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,c
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 &rReq)
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 &rReq)
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 &rReq)
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 &rReq)
// 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 &rReq)
}
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 &rReq)
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 &rReq)
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 &rReq)
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,6 +1471,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART,
rSh.IsNumRuleStart()));
break;
+
case FN_EDIT_FORMULA:
case SID_CHARMAP:
{
@@ -1471,7 +1479,14 @@ void SwTextShell::GetState( SfxItemSet &rSet )
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;
@@ -1479,16 +1494,35 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_INSERT_FOOTNOTE:
case FN_INSERT_FOOTNOTE_DLG:
{
- const sal_uInt16 nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
- FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
+ 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.GetTableFmt() ||
- (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
+ if ( rSh.CrsrInsideInputFld()
+ || rSh.GetTableFmt()
+ || (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
+ {
rSet.DisableItem( nWhich );
+ }
break;
case FN_CALCULATE:
@@ -1507,20 +1541,53 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put( SfxBoolItem( nWhich, SvxAutoCorrCfg::Get()->IsAutoFmtByInput() ));
}
break;
+
case FN_GLOSSARY_DLG:
{
- rSet.Put(SfxBoolItem(nWhich), sal_True);
+ 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,9 +1624,22 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put(SfxBoolItem(nWhich, pApply && pApply->nColor == nWhich));
}
break;
+
case FN_INSERT_BOOKMARK:
- if( rSh.IsTableMode() )
+ 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:
@@ -1596,42 +1676,50 @@ void SwTextShell::GetState( SfxItemSet &rSet )
(FN_TABLE_SORT_DIALOG == nWhich && !rSh.GetTableFmt()))
rSet.DisableItem( nWhich );
break;
+
case SID_RUBY_DIALOG:
- {
- SvtCJKOptions aCJKOptions;
- if(!aCJKOptions.IsRubyEnabled())
{
- GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_False );
- rSet.DisableItem(nWhich);
+ 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 );
}
- else
- GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_True );
break;
- }
- //no break!
+
case SID_HYPERLINK_DIALOG:
- if( GetView().GetDocShell()->IsReadOnly() ||
- (!GetView().GetViewFrame()->HasChildWindow(nWhich) &&
- rSh.HasReadonlySel()) )
+ if( GetView().GetDocShell()->IsReadOnly()
+ || ( !GetView().GetViewFrame()->HasChildWindow(nWhich)
+ && rSh.HasReadonlySel() )
+ || rSh.CrsrInsideInputFld() )
+ {
rSet.DisableItem(nWhich);
+ }
else
- rSet.Put(SfxBoolItem( nWhich, 0 != GetView().
- GetViewFrame()->GetChildWindow( nWhich ) ));
+ {
+ rSet.Put(SfxBoolItem( nWhich, 0 != GetView().GetViewFrame()->GetChildWindow( nWhich ) ));
+ }
break;
+
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);
+ 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;
+ break;
+
case SID_TRANSLITERATE_HALFWIDTH:
case SID_TRANSLITERATE_FULLWIDTH:
case SID_TRANSLITERATE_HIRAGANA:
@@ -1755,13 +1843,6 @@ void SwTextShell::GetState( SfxItemSet &rSet )
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
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 181e0dafc2a9..f955b18ed8ae 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -149,7 +149,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
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(SfxRequest &rReq)
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(SfxRequest &rReq)
if ( pColl )
pColl->SetFmtAttr( aINetFmt );
- else rWrtSh.SetAttr( aINetFmt );
+ else rWrtSh.SetAttrItem( aINetFmt );
rReq.Done();
}
break;
@@ -281,7 +281,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
if( pColl )
pColl->SetFmtAttr( aAttrSet );
else
- rWrtSh.SetAttr( aAttrSet );
+ rWrtSh.SetAttrSet( aAttrSet );
}
rReq.Done();
}
@@ -345,7 +345,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
}
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(SfxRequest &rReq)
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(SfxRequest &rReq)
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(SfxRequest &rReq)
case SID_ATTR_PARA_PAGEBREAK:
if(pItem)
{
- rSh.SetAttr( *pItem );
+ rSh.SetAttrItem( *pItem );
rReq.Done();
}
break;
@@ -594,7 +594,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL, 0);
aCoreSet.Put(*pItem);
SfxToSwPageDescAttr( rSh, aCoreSet);
- rSh.SetAttr(aCoreSet);
+ rSh.SetAttrSet(aCoreSet);
rReq.Done();
}
}
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index b5016bc4dbe4..3c1591aa8d7a 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -354,7 +354,7 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
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(SfxRequest &rReq)
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 );
diff --git a/sw/source/ui/table/convert.hrc b/sw/source/ui/table/convert.hrc
index 7537d868689d..4156a5e7b4d4 100644
--- a/sw/source/ui/table/convert.hrc
+++ b/sw/source/ui/table/convert.hrc
@@ -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
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 088586236c2b..6af7e25d3d4f 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -991,11 +991,9 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
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
}
diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc
index c0fe76d8f9a0..2c063603ce76 100644
--- a/sw/source/ui/table/tabledlg.hrc
+++ b/sw/source/ui/table/tabledlg.hrc
@@ -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
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index cef5e2dc9820..039e5ae3249c 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -509,7 +509,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
// #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( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
rWrtShell.SetFlyFrmAttr(*pTemplateItemSet);
else
{
- rWrtShell.SetAttr(*pTemplateItemSet);
+ rWrtShell.SetAttrSet(*pTemplateItemSet);
// additional numbering properties for paragraph styles
if( nSelectionType & nsSelectionType::SEL_TXT && rWrtShell.GetCurNumRule() )
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index b22d9c15ea3d..d4aceb94a396 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -238,8 +238,11 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
SwPagePreViewWin::~SwPagePreViewWin()
{
- if( mpViewShell )
- delete mpViewShell;
+ //IAccessibility2 Implementation 2009-----
+ // Remove to the deconstruction of SwPagePreView.
+ //if( mpViewShell)
+ // delete mpViewShell;
+ //-----IAccessibility2 Implementation 2009
}
/*--------------------------------------------------------------------
@@ -714,46 +717,46 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
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.
@@ -764,7 +767,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
};
SfxBindings& rBindings = GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
}
@@ -799,11 +802,11 @@ void SwPagePreView::Execute( SfxRequest &rReq )
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;
@@ -818,7 +821,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
( ( 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.
@@ -830,13 +833,13 @@ void SwPagePreView::Execute( SfxRequest &rReq )
};
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:
@@ -930,7 +933,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
}
pPagePrevwLay->CalcStartValuesForSelectedPageMove( nHoriMove, nVertMove,
nNewSelectedPage, nNewStartPage, aNewStartPos );
- if ( aViewWin.SelectedPage() != nNewSelectedPage )
+ if ( pViewWin->SelectedPage() != nNewSelectedPage )
{
if ( pPagePrevwLay->IsPageVisible( nNewSelectedPage ) )
{
@@ -941,8 +944,8 @@ void SwPagePreView::Execute( SfxRequest &rReq )
}
else
{
- aViewWin.SetSelectedPage( nNewSelectedPage );
- aViewWin.SetSttPage( nNewStartPage );
+ pViewWin->SetSelectedPage( nNewSelectedPage );
+ pViewWin->SetSttPage( nNewStartPage );
int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, sal_True );
bRefresh = 0 != nRet;
}
@@ -970,11 +973,11 @@ void SwPagePreView::Execute( SfxRequest &rReq )
}
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:
{
@@ -990,7 +993,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)
{
@@ -999,7 +1002,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 );
@@ -1009,7 +1012,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;
@@ -1022,7 +1025,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 ))
@@ -1039,7 +1042,7 @@ MOVEPAGE:
}
if( bRefresh )
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
/*--------------------------------------------------------------------
@@ -1094,7 +1097,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
case FN_STAT_PAGE:
{
String aStr( sPageStr );
- aViewWin.GetStatusStr( aStr, mnPageCount );
+ pViewWin->GetStatusStr( aStr, mnPageCount );
rSet.Put( SfxStringItem( nWhich, aStr) );
}
break;
@@ -1166,7 +1169,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
break;
case FN_SHOW_TWO_PAGES:
- if( 2 == aViewWin.GetCol() && nRow == aViewWin.GetRow() )
+ if( 2 == pViewWin->GetCol() && nRow == pViewWin->GetRow() )
rSet.DisableItem( nWhich );
break;
@@ -1292,7 +1295,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
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),
@@ -1306,7 +1309,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
mbFormDesignModeToReset( false )
{
SetName(String::CreateFromAscii("PageView" ));
- SetWindow( &aViewWin );
+ SetWindow( pViewWin );
SetHelpId(SW_PAGEPREVIEW);
_CreateScrollbar( sal_True );
_CreateScrollbar( sal_False );
@@ -1341,9 +1344,9 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
// 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 );
}
}
@@ -1356,13 +1359,13 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
}
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();
}
@@ -1376,6 +1379,15 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
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;
@@ -1474,17 +1486,17 @@ IMPL_LINK_INLINE_END( SwPagePreView, BtnPage, Button *, pButton )
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 )
@@ -1516,7 +1528,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
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;
@@ -1536,8 +1548,8 @@ void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
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 );
@@ -1555,14 +1567,14 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
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
@@ -1617,15 +1629,15 @@ void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollba
//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();
}
/*--------------------------------------------------------------------
@@ -1645,7 +1657,7 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar )
// 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(
@@ -1689,7 +1701,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
// 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
@@ -1706,8 +1718,8 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
// 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();
@@ -1715,16 +1727,16 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
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
@@ -1739,13 +1751,13 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
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[] =
@@ -1758,7 +1770,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
// OD 04.03.2003 #107369# - control invalidation of window
if ( bInvalidateWin )
{
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
return 0;
}
@@ -1769,7 +1781,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
Point SwPagePreView::AlignToPixel(const Point &rPt) const
{
- return aViewWin.PixelToLogic( aViewWin.LogicToPixel( rPt ) );
+ return pViewWin->PixelToLogic( pViewWin->LogicToPixel( rPt ) );
}
/*--------------------------------------------------------------------
@@ -1794,7 +1806,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
ChgPage( SwPagePreViewWin::MV_CALC, sal_True );
ScrollDocSzChg();
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
// <--
}
@@ -1814,20 +1826,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 );
@@ -1839,7 +1851,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()) ;
@@ -1852,7 +1864,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;
@@ -1894,7 +1906,7 @@ void SwPagePreView::ScrollDocSzChg()
SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate )
{
- return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
+ return pViewWin->GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
}
/*--------------------------------------------------------------------
@@ -1932,7 +1944,7 @@ sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags,
rSh.ChgAllPageSize( aSz );
}
if( !bNormalPrint )
- aViewWin.CalcWish( aViewWin.GetRow(), aViewWin.GetCol() );
+ pViewWin->CalcWish( pViewWin->GetRow(), pViewWin->GetCol() );
rESh.SetModified();
rESh.EndAllAction();
@@ -2065,7 +2077,10 @@ sal_Bool SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
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;
@@ -2086,7 +2101,7 @@ sal_Bool SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
bOk = sal_True;
}
else
- bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
+ bOk = pViewWin->HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
return bOk;
}
@@ -2098,8 +2113,37 @@ uno::Reference< ::com::sun::star::accessibility::XAccessible >
// 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------------------------------
@@ -2143,7 +2187,7 @@ void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
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();
}
}
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 7d30dbd7a04d..279623663b09 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -540,23 +540,6 @@ IMPL_LINK( SwView, AttrChangedNotify, SwWrtShell *, EMPTYARG )
//#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);
mpPostItMgr->SetShadowState( pWrtShell->GetPostItFieldAtCursor() );
}
@@ -780,6 +763,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
nFormSfxId( USHRT_MAX ),
nLastPasteDestination( 0xFFFF ),
nLeftBorderDistance( 0 ),
+ //IAccessibility2 Implementation 2009-----
+ nOldPageNum(0),
+ //-----IAccessibility2 Implementation 2009
nRightBorderDistance( 0 ),
bInMailMerge(sal_False),
bInDtor(sal_False),
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 96caa859f11a..fa4163e68e17 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -766,7 +766,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
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 &rSet)
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 )
{
@@ -1192,7 +1218,15 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
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
{
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 375409273674..f5d2d7b53f30 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -379,7 +379,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
{
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, MoveNavigationHdl, bool *, pbNext )
}
}
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;
+ {
+ 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)
{
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index c575f5464be3..8cf536b20c02 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -213,6 +213,19 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
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, sal_Bool bNoMessage)
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, sal_Bool bNoMessage)
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, sal_Bool bNoMessage)
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 );
}
}
}
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index 0ece69ed26d5..aee1ca50f096 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -81,31 +81,39 @@ void SwView::GetState(SfxItemSet &rSet)
{
switch(nWhich)
{
- case FN_EDIT_LINK_DLG:
- if( !pWrtShell->GetLinkManager().GetLinks().Count() )
- rSet.DisableItem(nWhich);
- else if( pWrtShell->IsSelFrmMode() &&
- pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT))
- rSet.DisableItem(nWhich);
- break;
+ case FN_EDIT_LINK_DLG:
+ if( !pWrtShell->GetLinkManager().GetLinks().Count() )
+ rSet.DisableItem(nWhich);
+ else if( pWrtShell->IsSelFrmMode() &&
+ pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT))
+ rSet.DisableItem(nWhich);
+ break;
- case FN_INSERT_CAPTION:
+ case SID_INSERT_GRAPHIC:
+ if( pWrtShell->CrsrInsideInputFld() )
{
- // Captions gibt's fuer Grafiken, OLE-Objekte, Rahmen und Tabellen
- if( !bGetFrmType )
- eFrmType = pWrtShell->GetFrmType(0,sal_True), bGetFrmType = sal_True;
- if (! ( ((eFrmType & FRMTYPE_FLY_ANY) && nSelectionType != nsSelectionType::SEL_DRW_TXT)||
+ rSet.DisableItem(nWhich);
+ }
+ break;
+
+ case FN_INSERT_CAPTION:
+ {
+ // Captions gibt's fuer Grafiken, OLE-Objekte, Rahmen und Tabellen
+ if( !bGetFrmType )
+ eFrmType = pWrtShell->GetFrmType(0,sal_True), bGetFrmType = sal_True;
+ if (! ( ((eFrmType & FRMTYPE_FLY_ANY) && nSelectionType != nsSelectionType::SEL_DRW_TXT)||
nSelectionType & nsSelectionType::SEL_TBL ||
nSelectionType & nsSelectionType::SEL_DRW) )
- rSet.DisableItem(nWhich);
- else if((pWrtShell->IsObjSelected()||pWrtShell->IsFrmSelected()) &&
+ rSet.DisableItem(nWhich);
+ else if((pWrtShell->IsObjSelected()||pWrtShell->IsFrmSelected()) &&
(pWrtShell->IsSelObjProtected( FLYPROTECT_PARENT)||
- pWrtShell->IsSelObjProtected( FLYPROTECT_CONTENT )))
- rSet.DisableItem(nWhich);
- else if( pWrtShell->IsTableMode() )
- rSet.DisableItem(nWhich);
- }
- break;
+ pWrtShell->IsSelObjProtected( FLYPROTECT_CONTENT )))
+ rSet.DisableItem(nWhich);
+ else if( pWrtShell->IsTableMode()
+ || pWrtShell->CrsrInsideInputFld() )
+ rSet.DisableItem(nWhich);
+ }
+ break;
case FN_EDIT_FOOTNOTE:
{
@@ -184,24 +192,29 @@ void SwView::GetState(SfxItemSet &rSet)
rSet.Put(aImgItem);
}
break;
+
case FN_INSERT_OBJ_CTRL:
- if(bWeb)
- rSet.DisableItem(nWhich);
- else
- {
- SfxImageItem aImgItem(nWhich, SwView::nInsertObjectCtrlState);
- SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() );
- const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() );
- if(pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ))
+ if( bWeb
+ || pWrtShell->CrsrInsideInputFld() )
{
- if(pWrtShell->IsInVerticalText())
- aImgItem.SetRotation(2700);
- if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(sal_True);
+ rSet.DisableItem(nWhich);
}
- rSet.Put(aImgItem);
- }
- break;
+ else
+ {
+ SfxImageItem aImgItem(nWhich, SwView::nInsertObjectCtrlState);
+ SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() );
+ const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() );
+ if(pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ))
+ {
+ if(pWrtShell->IsInVerticalText())
+ aImgItem.SetRotation(2700);
+ if(pWrtShell->IsInRightToLeftText())
+ aImgItem.SetMirrored(sal_True);
+ }
+ rSet.Put(aImgItem);
+ }
+ break;
+
case FN_UPDATE_TOX:
if(!pWrtShell->GetTOXCount())
rSet.DisableItem(nWhich);
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index ec0be864e81d..db0f5d59b634 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -692,7 +692,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.AutoUpdatePara( pColl, aTmp );
}
else
- rSh.SetAttr( aTabStops );
+ rSh.SetAttrItem( aTabStops );
break;
}
@@ -750,7 +750,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.AutoUpdatePara( pColl, aSet);
}
else
- rSh.SetAttr( aParaMargin );
+ rSh.SetAttrItem( aParaMargin );
if ( aParaMargin.GetTxtFirstLineOfst() < 0 )
{
@@ -789,7 +789,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.AutoUpdatePara( pColl, aSetTmp );
}
else
- rSh.SetAttr( aTabStops );
+ rSh.SetAttrItem( aTabStops );
}
}
}
@@ -814,7 +814,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.AutoUpdatePara( pColl, aSet);
}
else
- rSh.SetAttr( aParaMargin );
+ rSh.SetAttrItem( aParaMargin );
}
break;
@@ -1076,7 +1076,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
RES_LR_SPACE, RES_UL_SPACE, 0 );
// get also the list level indent values merged as LR-SPACE item, if needed.
rSh.GetCurAttr( aCoreSet, true );
- SelectionType nSelType = rSh.GetSelectionType();
+ const SelectionType nSelType = rSh.GetSelectionType();
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 06bb93d8ab29..619639ec5098 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -85,7 +85,15 @@
#include <numrule.hxx>
#include <swundo.hxx>
#include <ndtxt.hxx>
+//IAccessibility2 Implementation 2009-----
+//#include <ndgrf.hxx>
+#include <fmtcntnt.hxx>
#include <PostItMgr.hxx>
+//#include <../../core/inc/flyfrm.hxx>
+//#include <../../core/inc/cntfrm.hxx>
+//#include <ndnotxt.hxx>
+//-----IAccessibility2 Implementation 2009
+//#include <postit.hxx>
#include <postithelper.hxx>
#include <redline.hxx>
#include <docary.hxx>
@@ -891,7 +899,8 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) :
bIsLastReadOnly(sal_False),
bIsOutlineMoveable(sal_True),
bViewHasChanged(sal_False),
- bIsImageListInitialized(sal_False)
+ bIsImageListInitialized(sal_False),
+ bIsKeySpace(sal_False) //IAccessibility2 Implementation 2009
{
sal_uInt16 i;
@@ -928,6 +937,149 @@ SwContentTree::~SwContentTree()
bIsInDrag = sal_False;
}
+//IAccessibility2 Implementation 2009-----
+String SwContentTree::GetEntryAltText( SvLBoxEntry* pEntry ) const
+{
+ if( pEntry == NULL)
+ return String();
+
+ SwContent* pCnt = (SwContent*)pEntry->GetUserData();
+ if( pCnt == NULL || pCnt->GetParent() == NULL)
+ return String();
+
+ sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+ SdrObject* pTemp;
+
+ switch(nJumpType)
+ {
+ case CONTENT_TYPE_DRAWOBJECT:
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ if (pDrawView)
+ {
+ SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+ SdrPage* pPage = pDrawModel->GetPage(0);
+ const sal_uInt32 nCount = pPage->GetObjCount();
+ for( sal_uInt32 i=0; i< nCount; i++ )
+ {
+ pTemp = pPage->GetObj(i);
+ sal_uInt16 nCmpId(OBJ_NONE);
+ switch( pTemp->GetObjIdentifier() )
+ {
+ case OBJ_GRUP:
+ case OBJ_TEXT:
+ case OBJ_RECT:
+ case OBJ_CUSTOMSHAPE:
+ case OBJ_CIRC:
+ case OBJ_POLY:
+ case OBJ_CAPTION:
+ nCmpId = OBJ_GRUP;
+ break;
+ default:
+ nCmpId = pTemp->GetObjIdentifier();
+ }
+ if(nCmpId == OBJ_GRUP && pTemp->GetName() == pCnt->GetName())
+ {
+ return pTemp->GetTitle();
+ }
+ //Commented End
+ }
+ }
+ }
+ break;
+ case CONTENT_TYPE_GRAPHIC :
+ {
+ if( pActiveShell && pActiveShell->GetDoc() )
+ {
+ const SwFlyFrmFmt* pFrmFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0);
+ if( pFrmFmt )
+ {
+// SwNodeIndex aIdx( *(pFrmFmt->GetCntnt().GetCntntIdx()), 1 );
+// const SwGrfNode* pGrfNd = aIdx.GetNode().GetGrfNode();
+// if( pGrfNd )
+// return pGrfNd->GetAlternateText();
+ return pFrmFmt->GetObjTitle();
+ }
+ }
+ }
+ break;
+ case CONTENT_TYPE_OLE :
+ case CONTENT_TYPE_FRAME :
+ {
+ //Can't find the GetAlternateText function. Need to verify again.
+ const SwFlyFrmFmt* pFlyFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0);
+ if( pFlyFmt )
+ return pFlyFmt->/*GetAlternateText*/GetName();
+ }
+ break;
+ }
+ return String();
+}
+
+String SwContentTree::GetEntryLongDescription( SvLBoxEntry* pEntry ) const
+{
+ if( pEntry == NULL)
+ return String();
+
+ SwContent* pCnt = (SwContent*)pEntry->GetUserData();
+ if( pCnt == NULL || pCnt->GetParent() == NULL)
+ return String();
+
+ sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+ SdrObject* pTemp;
+
+ switch(nJumpType)
+ {
+ case CONTENT_TYPE_DRAWOBJECT:
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ if (pDrawView)
+ {
+ SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+ SdrPage* pPage = pDrawModel->GetPage(0);
+ sal_uInt32 nCount = pPage->GetObjCount();
+ for( sal_uInt32 i=0; i< nCount; i++ )
+ {
+ pTemp = pPage->GetObj(i);
+ sal_uInt16 nCmpId(OBJ_NONE);
+ switch( pTemp->GetObjIdentifier() )
+ {
+ case OBJ_GRUP:
+ case OBJ_TEXT:
+ case OBJ_RECT:
+ case OBJ_CUSTOMSHAPE:
+ case OBJ_CIRC:
+ case OBJ_POLY:
+ case OBJ_CAPTION:
+ nCmpId = OBJ_GRUP;
+ break;
+ default:
+ nCmpId = pTemp->GetObjIdentifier();
+ }
+ if(nCmpId == OBJ_GRUP && pTemp->GetName() == pCnt->GetName())
+ {
+ return pTemp->GetDescription();
+ }
+ //Commented End
+ }
+ }
+ }
+ break;
+ case CONTENT_TYPE_GRAPHIC :
+ case CONTENT_TYPE_OLE :
+ case CONTENT_TYPE_FRAME :
+ {
+ //Can't find the function "GetLongDescription". Need to verify again.
+ const SwFlyFrmFmt* pFlyFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0);
+ if( pFlyFmt )
+ return pFlyFmt->GetDescription();
+ }
+ break;
+ }
+ return String();
+}
+
+//-----IAccessibility2 Implementation 2009
/***************************************************************************
Drag&Drop methods
***************************************************************************/
@@ -1211,10 +1363,27 @@ void SwContentTree::RequestingChilds( SvLBoxEntry* pParent )
String sEntry = pCnt->GetName();
if(!sEntry.Len())
sEntry = sSpace;
- InsertEntry(sEntry, pParent,
+ SvLBoxEntry* pChild = InsertEntry(sEntry, pParent,
sal_False, LIST_APPEND, (void*)pCnt);
+ //IAccessibility2 Implementation 2009-----
+ //Solution: If object is marked , the corresponding entry is set true ,
+ //else the corresponding entry is set false .
+ //==================================================
+ SdrObject * pObj = GetDrawingObjectsByContent(pCnt);
+ if(pChild)
+ pChild->SetMarked(sal_False);
+ if(pObj)
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ const bool Marked(pDrawView->isSdrObjectSelected(*pObj));
+ if(Marked)
+ {
+ //sEntry += String::CreateFromAscii(" *");
+ pChild->SetMarked(true);
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
-
}
}
}
@@ -1223,6 +1392,41 @@ void SwContentTree::RequestingChilds( SvLBoxEntry* pParent )
Beschreibung: Expand - Zustand fuer Inhaltstypen merken
***************************************************************************/
+//IAccessibility2 Implementation 2009-----
+//Solution: Get drawing Objects by content .
+SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
+{
+ SdrObject *pRetObj = NULL;
+ sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+ switch(nJumpType)
+ {
+ case CONTENT_TYPE_DRAWOBJECT:
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ if (pDrawView)
+ {
+ SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+ SdrPage* pPage = pDrawModel->GetPage(0);
+ sal_uInt32 nCount = pPage->GetObjCount();
+
+ for( sal_uInt32 i=0; i< nCount; i++ )
+ {
+ SdrObject* pTemp = pPage->GetObj(i);
+ if( pTemp->GetName() == pCnt->GetName())
+ {
+ pRetObj = pTemp;
+ break;
+ }
+ }
+ }
+ break;
+ }
+ default:
+ pRetObj = NULL;
+ }
+ return pRetObj;
+}
+//-----IAccessibility2 Implementation 2009
sal_Bool SwContentTree::Expand( SvLBoxEntry* pParent )
{
@@ -2222,6 +2426,15 @@ IMPL_LINK( SwContentTree, TimerUpdate, Timer*, EMPTYARG)
{
FindActiveTypeAndRemoveUserData();
Display(sal_True);
+ //IAccessibility2 Implementation 2009-----
+ //Solution: Set focus
+ if( bIsKeySpace )
+ {
+ HideFocus();
+ ShowFocus( oldRectangle);
+ bIsKeySpace = sal_False;
+ }
+ //-----IAccessibility2 Implementation 2009
}
}
else if(!pView && bIsActive && !bIsIdleClear)
@@ -2444,6 +2657,113 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
GrabFocus();
}
}
+ //IAccessibility2 Implementation 2009-----
+ //Solution: Make KEY_SPACE has same function as DoubleClick ,
+ //and realize multi-selection .
+ else if(aCode.GetCode() == KEY_SPACE && 0 == aCode.GetModifier())
+ {
+
+ SvLBoxEntry* pEntry = GetCurEntry();
+ if( GetChildCount( pEntry ) == 0 )
+ bIsKeySpace = sal_True;
+ Point tempPoint = GetEntryPosition( pEntry );//Change from "GetEntryPos" to "GetEntryPosition" for acc migration
+ oldRectangle = GetFocusRect( pEntry,tempPoint.Y() );
+
+ if(pEntry)
+ {
+ if(bIsActive || bIsConstant)
+ {
+ if(bIsConstant)
+ {
+ pActiveShell->GetView().GetViewFrame()->GetWindow().ToTop();
+ }
+
+ SwContent* pCnt = (SwContent*)pEntry->GetUserData();
+
+ sal_Bool bSel = sal_False;
+ sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+ switch(nJumpType)
+ {
+ case CONTENT_TYPE_DRAWOBJECT:
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ if (pDrawView)
+ {
+ pDrawView->SdrEndTextEdit();//Change from "EndTextEdit" to "SdrEndTextEdit" for acc migration
+
+ SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+ SdrPage* pPage = pDrawModel->GetPage(0);
+ sal_uInt32 nCount = pPage->GetObjCount();
+ sal_Bool hasObjectMarked = sal_False;
+
+ SdrObject* pObject = NULL;
+ pObject = GetDrawingObjectsByContent( pCnt );
+ if( pObject )
+ {
+ const bool bUnMark(pDrawView->isSdrObjectSelected(*pObject));
+ pDrawView->MarkObj(*pObject, bUnMark);
+ }
+ for( sal_uInt32 i=0; i< nCount; i++ )
+ {
+ SdrObject* pTemp = pPage->GetObj(i);
+
+ if(!pTemp)
+ {
+ OSL_ENSURE(false, "Null pointer SdrObject in SdrPage's GetObj with valid index (!)");
+ continue;
+ }
+
+ sal_uInt16 nCmpId(OBJ_NONE);
+ const bool bMark(pDrawView->isSdrObjectSelected(*pTemp));
+ switch( pTemp->GetObjIdentifier() )
+ {
+ case OBJ_GRUP:
+ case OBJ_TEXT:
+ case OBJ_RECT:
+ case OBJ_CIRC:
+ case OBJ_POLY:
+ case OBJ_CAPTION:
+ case OBJ_CUSTOMSHAPE:
+ nCmpId = OBJ_GRUP;
+ if( bMark )
+ hasObjectMarked = sal_True;
+ break;
+ default:
+ nCmpId = pTemp->GetObjIdentifier();
+ //IAccessibility2 Implementation 2009-----
+ if ( bMark )
+ {
+ pDrawView->MarkObj(*pTemp, true);
+ }
+ //-----IAccessibility2 Implementation 2009
+ }
+ //mod end
+ }
+ if ( pActiveShell && !hasObjectMarked )
+ {
+ SwEditWin& pEditWindow =
+ pActiveShell->GetView().GetEditWin();
+ if( &pEditWindow )
+ {
+ KeyCode tempKeycode( KEY_ESCAPE );
+ KeyEvent rKEvt( 0 , tempKeycode );
+ ((Window*)&pEditWindow)->KeyInput( rKEvt );
+
+ }
+ //rView.GetEditWin().GrabFocus();
+ }
+ }
+ }
+ break;
+ }
+
+
+ bViewHasChanged = sal_True;
+ }
+ }
+
+ }
+ //-----IAccessibility2 Implementation 2009
else
SvTreeListBox::KeyInput(rEvent);
@@ -3202,6 +3522,26 @@ void SwContentLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFl
rDev.DrawText( rPos, GetText() );
rDev.SetFont( aOldFont );
}
+ //IAccessibility2 Implementation 2009-----
+ // IA2 CWS. MT: Removed for now (also in SvLBoxEntry) - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
+ /*
+ else if (pEntry->IsMarked())
+ {
+ rDev.DrawText( rPos, GetText() );
+ XubString str;
+ str = XubString::CreateFromAscii("*");
+ Point rPosStar(rPos.X()-6,rPos.Y());
+ Font aOldFont( rDev.GetFont());
+ Font aFont(aOldFont);
+ Color aCol( aOldFont.GetColor() );
+ aCol.DecreaseLuminance( 200 );
+ aFont.SetColor( aCol );
+ rDev.SetFont( aFont );
+ rDev.DrawText( rPosStar, str);
+ rDev.SetFont( aOldFont );
+ }
+ //-----IAccessibility2 Implementation 2009
+ */
else
SvLBoxString::Paint( rPos, rDev, nFlags, pEntry);
}
@@ -3222,3 +3562,18 @@ void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt )
}
+//IAccessibility2 Implementation 2009-----
+sal_Int32 SwContentTree::GetEntryRealChildsNum( SvLBoxEntry* pParent ) const
+{
+ // ist es ein Inhaltstyp?
+ if(lcl_IsContentType(pParent))
+ {
+ if(!pParent->HasChilds())
+ {
+ SwContentType* pCntType = (SwContentType*)pParent->GetUserData();
+ return pCntType->GetMemberCount();
+ }
+ }
+ return 0;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc
index bae76b4afb6e..2209a5503ce1 100644
--- a/sw/source/ui/utlui/navipi.hrc
+++ b/sw/source/ui/utlui/navipi.hrc
@@ -84,3 +84,8 @@
#define ST_POSTIT_SHOW (ST_GLOBAL_CONTEXT_FIRST +35)
#define ST_POSTIT_HIDE (ST_GLOBAL_CONTEXT_FIRST +36)
#define ST_POSTIT_DELETE (ST_GLOBAL_CONTEXT_FIRST +37)
+
+//IAccessibility2 Implementation 2009-----
+#define ST_TL_GLOBAL ST_GLOBAL_CONTEXT_FIRST +38
+#define ST_TL_CONTENT ST_GLOBAL_CONTEXT_FIRST +39
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx
index b5608fb5edda..10e63e4eab49 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -89,7 +89,7 @@ sal_Bool SwWrtShell::TryRemoveIndent()
if (bResult)
{
aAttrSet.Put(aItem);
- SetAttr(aAttrSet);
+ SetAttrSet(aAttrSet);
}
return bResult;
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index 7b4216c091d0..fcb46a0e6d61 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -46,6 +46,11 @@
#include <swdtflvr.hxx>
#include <crsskip.hxx>
+//IAccessibility2 Implementation 2009-----
+#ifndef _DOC_HXX
+#include <doc.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
#if OSL_DEBUG_LEVEL > 1
#include <pam.hxx>
#endif
@@ -166,6 +171,14 @@ long SwWrtShell::SelAll()
}
SttSelect();
GoEnd(sal_True, &bMoveTable);
+
+ //IAccessibility2 Implementation 2009-----
+ SwDoc *pDoc = GetDoc();
+ if ( pDoc )
+ {
+ pDoc->SetPrepareSelAll();
+ }
+ //-----IAccessibility2 Implementation 2009
if( pStartPos )
{
pTmpCrsr = getShellCrsr( false );
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index ed311635e7bf..be0ab6994f03 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -418,27 +418,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
// TODO/LATER: recording! Convert properties to items
case SID_INSERT_PLUGIN:
- /*
- if(pReq)
- {
- INetURLObject* pURL = aDlg.GetURL();
- if(pURL)
- pReq->AppendItem(SfxStringItem(FN_PARAM_2, pURL->GetMainURL(INetURLObject::NO_DECODE)));
- pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands()));
- } */
case SID_INSERT_FLOATINGFRAME:
- /*
- if(pReq && xFloatingFrame.Is())
- {
- const SfxFrameDescriptor* pDescriptor = xFloatingFrame->GetFrameDescriptor();
- pReq->AppendItem(SfxStringItem(FN_PARAM_1, pDescriptor->GetName()));
- pReq->AppendItem(
- SfxStringItem( FN_PARAM_2,
- pDescriptor->GetURL().GetMainURL(INetURLObject::NO_DECODE)));
- pReq->AppendItem(SvxSizeItem(FN_PARAM_3, pDescriptor->GetMargin()));
- pReq->AppendItem(SfxByteItem(FN_PARAM_4, pDescriptor->GetScrollingMode()));
- pReq->AppendItem(SfxBoolItem(FN_PARAM_5, pDescriptor->HasFrameBorder()));
- }*/
{
SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId);
@@ -959,10 +939,10 @@ void SwWrtShell::InsertPageBreak(const String *pPageDesc, sal_uInt16 nPgNum )
{
SwFmtPageDesc aDesc( pDesc );
aDesc.SetNumOffset( nPgNum );
- SetAttr( aDesc );
+ SetAttrItem( aDesc );
}
else
- SetAttr( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
+ SetAttrItem( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
EndUndo(UNDO_UI_INSERT_PAGE_BREAK);
}
}
@@ -1008,7 +988,7 @@ void SwWrtShell::InsertColumnBreak()
DelRight();
SwFEShell::SplitNode( sal_False, sal_False );
}
- SetAttr(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
+ SetAttrItem(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
EndUndo(UNDO_UI_INSERT_COLUMN_BREAK);
}
@@ -1037,7 +1017,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool
if(rStr.Len())
aFootNote.SetNumStr( rStr );
- SetAttr(aFootNote);
+ SetAttrItem(aFootNote);
if( bEdit )
{
@@ -1514,17 +1494,14 @@ SelectionType SwWrtShell::GetSelectionType() const
if ( BasicActionPend() )
return IsSelFrmMode() ? nsSelectionType::SEL_FRM : nsSelectionType::SEL_TXT;
-// if ( IsTableMode() )
-// return nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS;
-
SwView &_rView = ((SwView&)GetView());
if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() )
return nsSelectionType::SEL_POSTIT;
- int nCnt;
- // Rahmen einfuegen ist kein DrawMode
+ int nCnt;
+ // Insertion of a text frame is not a DrawMode
if ( !_rView.GetEditWin().IsFrmAction() &&
- (IsObjSelected() || (_rView.IsDrawMode() && !IsFrmSelected()) ))
+ (IsObjSelected() || (_rView.IsDrawMode() && !IsFrmSelected()) ))
{
if (GetDrawView()->IsTextEdit())
nCnt = nsSelectionType::SEL_DRW_TXT;
@@ -1541,14 +1518,14 @@ SelectionType SwWrtShell::GetSelectionType() const
nCnt |= nsSelectionType::SEL_MEDIA;
if (svx::checkForSelectedCustomShapes(
- const_cast<SdrView *>(GetDrawView()),
- true /* bOnlyExtruded */ ))
+ const_cast<SdrView *>(GetDrawView()),
+ true /* bOnlyExtruded */ ))
{
nCnt |= nsSelectionType::SEL_EXTRUDED_CUSTOMSHAPE;
}
sal_uInt32 nCheckStatus = 0;
if (svx::checkForSelectedFontWork(
- const_cast<SdrView *>(GetDrawView()), nCheckStatus ))
+ const_cast<SdrView *>(GetDrawView()), nCheckStatus ))
{
nCnt |= nsSelectionType::SEL_FONTWORK;
}
@@ -1573,25 +1550,20 @@ SelectionType SwWrtShell::GetSelectionType() const
if ( IsTableMode() )
nCnt |= (nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS);
- // --> FME 2005-01-12 #i39855#
- // Do not pop up numbering toolbar, if the text node has a numbering
- // of type SVX_NUM_NUMBER_NONE.
+ // Do not pop up numbering toolbar, if the text node has a numbering of type SVX_NUM_NUMBER_NONE.
const SwNumRule* pNumRule = GetCurNumRule();
if ( pNumRule )
{
const SwTxtNode* pTxtNd =
GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
- // --> OD 2008-03-19 #refactorlists#
if ( pTxtNd && pTxtNd->IsInList() )
- // <--
{
const SwNumFmt& rFmt = pNumRule->Get(sal::static_int_cast< sal_uInt8, sal_Int32>(pTxtNd->GetActualListLevel()));
if ( SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() )
nCnt |= nsSelectionType::SEL_NUM;
}
}
- // <--
return nCnt;
}
@@ -1738,7 +1710,7 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet
if(bReset)
{
ResetAttr();
- SetAttr(aCoreSet);
+ SetAttrSet(aCoreSet);
}
pDoc->ChgFmt(*pColl, rStyleSet );
EndAction();
@@ -1853,11 +1825,6 @@ sal_Bool SwWrtShell::CanInsert()
return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL)));
}
-// die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
-void SwWrtShell::NewCoreSelection()
-{
- SttSelect();
-}
// --------------
void SwWrtShell::ChgDBData(const SwDBData& aDBData)
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index f911bb7468f6..52bce47ce554 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -103,16 +103,13 @@ void SwWrtShell::Insert(SwField &rFld)
-void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, sal_Bool bOnlyInSel )
+void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst )
{
// ueber die Liste der Eingabefelder gehen und Updaten
SwInputFieldList* pTmp = pLst;
if( !pTmp )
pTmp = new SwInputFieldList( this );
- if (bOnlyInSel)
- pTmp->RemoveUnselectedFlds();
-
const sal_uInt16 nCnt = pTmp->Count();
if(nCnt)
{
@@ -305,7 +302,13 @@ void SwWrtShell::ClickToField( const SwField& rFld )
break;
case RES_INPUTFLD:
- StartInputFldDlg( (SwField*)&rFld, sal_False );
+ {
+ const SwInputField* pInputField = dynamic_cast<const SwInputField*>(&rFld);
+ if ( pInputField == NULL )
+ {
+ StartInputFldDlg( (SwField*)&rFld, sal_False );
+ }
+ }
break;
case RES_SETEXPFLD:
@@ -321,7 +324,6 @@ void SwWrtShell::ClickToField( const SwField& rFld )
}
-
void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter )
{
if( !rItem.GetValue().Len() )