You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/04/23 11:51:53 UTC
svn commit: r1470868 [35/40] - in /openoffice/branches/ia2: ./
ext_libraries/coinmp/ ext_libraries/serf/ ext_libraries/serf/win/
extras/l10n/source/fi/ main/ main/animations/source/animcore/
main/automation/source/communi/ main/basctl/source/basicide/ ...
Modified: openoffice/branches/ia2/main/sw/source/ui/shells/txtnum.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/shells/txtnum.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/shells/txtnum.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/shells/txtnum.cxx Tue Apr 23 09:51:15 2013
@@ -46,6 +46,11 @@
#include "swabstdlg.hxx"
#include <globals.hrc>
#include <sfx2/tabdlg.hxx>
+#include <svx/nbdtmg.hxx>
+#include <svx/nbdtmgfact.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
+using namespace svx::sidebar;
void SwTextShell::ExecEnterNum(SfxRequest &rReq)
{
@@ -54,43 +59,64 @@ void SwTextShell::ExecEnterNum(SfxReques
{
case FN_NUM_NUMBERING_ON:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- sal_Bool bMode = !GetShell().HasNumber(); // #i29560#
- if ( pItem )
- bMode = pItem->GetValue();
- else
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
-
- if ( bMode != (GetShell().HasNumber()) ) // #i29560#
- {
- rReq.Done();
- if( bMode )
- GetShell().NumOn();
- else
- GetShell().NumOrBulletOff(); // #i29560#
- }
+ GetShell().StartAllAction();
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
+ sal_Bool bMode = !GetShell().SelectionHasNumber(); // #i29560#
+ if ( pItem )
+ bMode = pItem->GetValue();
+ else
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
+
+ if ( bMode != (GetShell().SelectionHasNumber()) ) // #i29560#
+ {
+ rReq.Done();
+ if( bMode )
+ GetShell().NumOn();
+ else
+ GetShell().NumOrBulletOff(); // #i29560#
+ }
+ sal_Bool bNewResult = GetShell().SelectionHasNumber();
+ if (bNewResult!=bMode) {
+ SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings();
+ SfxBoolItem aItem(FN_NUM_NUMBERING_ON,!bNewResult);
+ rBindings.SetState(aItem);
+ SfxBoolItem aNewItem(FN_NUM_NUMBERING_ON,bNewResult);
+ rBindings.SetState(aNewItem);
+ }
+ GetShell().EndAllAction();
}
break;
case FN_NUM_BULLET_ON:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- sal_Bool bMode = !GetShell().HasBullet(); // #i29560#
- if ( pItem )
- bMode = pItem->GetValue();
- else
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
-
- if ( bMode != (GetShell().HasBullet()) ) // #i29560#
- {
- rReq.Done();
- if( bMode )
- GetShell().BulletOn();
- else
- GetShell().NumOrBulletOff(); // #i29560#
- }
+ GetShell().StartAllAction();
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
+ sal_Bool bMode = !GetShell().SelectionHasBullet(); // #i29560#
+ if ( pItem )
+ bMode = pItem->GetValue();
+ else
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
+
+ if ( bMode != (GetShell().SelectionHasBullet()) ) // #i29560#
+ {
+ rReq.Done();
+ if( bMode )
+ GetShell().BulletOn();
+ else
+ GetShell().NumOrBulletOff(); // #i29560#
+ }
+ sal_Bool bNewResult = GetShell().SelectionHasBullet();
+ if (bNewResult!=bMode) {
+ SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings();
+ SfxBoolItem aItem(FN_NUM_BULLET_ON,!bNewResult);
+ rBindings.SetState(aItem);
+ SfxBoolItem aNewItem(FN_NUM_BULLET_ON,bNewResult);
+ rBindings.SetState(aNewItem);
+ }
+ GetShell().EndAllAction();
}
break;
case FN_NUMBER_BULLETS:
+ case SID_OUTLINE_BULLET:
{
// --> OD 2008-02-29 #refactorlists#
// // per default sal_True, damit die Schleife im Dialog richtig arbeitet!
@@ -244,4 +270,179 @@ void SwTextShell::ExecEnterNum(SfxReques
}
}
+void SwTextShell::ExecSetNumber(SfxRequest &rReq)
+{
+ SwNumRule aRule( GetShell().GetUniqueNumRuleName(),
+ // --> OD 2008-06-06 #i89178#
+ numfunc::GetDefaultPositionAndSpaceMode() );
+ // <--
+
+ SvxNumRule aSvxRule = aRule.MakeSvxNumRule();
+ const bool bRightToLeft = GetShell().IsInRightToLeftText( 0 );
+
+ if( bRightToLeft )
+ {
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
+ {
+ SvxNumberFormat aFmt( aSvxRule.GetLevel( n ) );
+ /* if ( n && bHtml )
+ {
+ // 1/2" fuer HTML
+ aFmt.SetLSpace(720);
+ aFmt.SetAbsLSpace(n * 720);
+ }*/
+ // --> FME 2005-01-21 #i38904# Default alignment for
+ // numbering/bullet should be rtl in rtl paragraph:
+ if ( bRightToLeft )
+ {
+ aFmt.SetNumAdjust( SVX_ADJUST_RIGHT );
+ }
+ // <--
+ aSvxRule.SetLevel( n, aFmt, sal_False );
+ }
+ aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
+ }
+
+ const SwNumRule* pCurRule = GetShell().GetCurNumRule();
+ sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF;
+ if( pCurRule )
+ {
+ sal_uInt16 nLevel = GetShell().GetNumLevel();
+ if( nLevel < MAXLEVEL )
+ {
+ nActNumLvl = 1<<nLevel;
+ }
+
+ aSvxRule = pCurRule->MakeSvxNumRule();
+
+ //convert type of linked bitmaps from SVX_NUM_BITMAP to (SVX_NUM_BITMAP|LINK_TOKEN)
+ for(sal_uInt16 i = 0; i < aSvxRule.GetLevelCount(); i++)
+ {
+ SvxNumberFormat aFmt(aSvxRule.GetLevel(i));
+ if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
+ {
+ const SvxBrushItem* pBrush = aFmt.GetBrush();
+ const String* pLinkStr;
+ if(pBrush &&
+ 0 != (pLinkStr = pBrush->GetGraphicLink()) &&
+ pLinkStr->Len())
+ aFmt.SetNumberingType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN));
+ aSvxRule.SetLevel(i, aFmt, aSvxRule.Get(i) != 0);
+ }
+ }
+ }
+
+
+ switch(rReq.GetSlot())
+ {
+ case FN_SVX_SET_NUMBER:
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SfxUInt16Item, FN_SVX_SET_NUMBER , sal_False );
+ if (pItem)
+ {
+ sal_uInt16 nIdx = pItem->GetValue();
+ if (nIdx==DEFAULT_NONE) {
+ GetShell().DelNumRules();
+ break;
+ }
+ --nIdx;
+
+ NBOTypeMgrBase* pNumbering = NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING);
+ if ( pNumbering )
+ {
+ SwNumRule aTmpRule( GetShell().GetUniqueNumRuleName(),
+ numfunc::GetDefaultPositionAndSpaceMode() );
+
+ SvxNumRule aTempRule = aTmpRule.MakeSvxNumRule();
+ //Sym3_2508, set unit attribute to NB Manager
+ SfxItemSet aSet(GetPool(),
+ SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
+ 0 );
+ aSet.Put(SvxNumBulletItem(aTempRule));
+ pNumbering->SetItems(&aSet);
+ pNumbering->ApplyNumRule(aTempRule,nIdx,nActNumLvl);
+
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < aSvxRule.GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aFmt(aTempRule.GetLevel(i));
+ aSvxRule.SetLevel(i, aFmt);
+ }
+ nMask <<= 1 ;
+ }
+
+ aSvxRule.UnLinkGraphics();
+ SwNumRule aSetRule( pCurRule
+ ? pCurRule->GetName()
+ : GetShell().GetUniqueNumRuleName(),
+ numfunc::GetDefaultPositionAndSpaceMode() );
+ aSetRule.SetSvxRule( aSvxRule, GetShell().GetDoc());
+
+ aSetRule.SetAutoRule( sal_True );
+ const bool bCreateList = (pCurRule == 0);
+ GetShell().SetCurNumRule( aSetRule, bCreateList );
+ }
+ //End
+ }
+ break;
+ }
+ case FN_SVX_SET_BULLET:
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SfxUInt16Item, FN_SVX_SET_BULLET , sal_False );
+ if (pItem)
+ {
+ sal_uInt16 nIdx = pItem->GetValue();
+ if (nIdx==DEFAULT_NONE) {
+ GetShell().DelNumRules();
+ break;
+ }
+ nIdx--;
+
+ NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
+ if ( pBullets )
+ {
+ SwNumRule aTmpRule( GetShell().GetUniqueNumRuleName(),
+ numfunc::GetDefaultPositionAndSpaceMode() );
+
+ SvxNumRule aTempRule = aTmpRule.MakeSvxNumRule();
+ //Sym3_2508, set unit attribute to NB Manager
+ SfxItemSet aSet(GetPool(),
+ SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
+ 0 );
+ aSet.Put(SvxNumBulletItem(aTempRule));
+ pBullets->SetItems(&aSet);
+
+ //SvxNumRule aTempRule( 0, 10, false );
+ pBullets->ApplyNumRule(aTempRule,nIdx,nActNumLvl);
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < aSvxRule.GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aFmt(aTempRule.GetLevel(i));
+ aSvxRule.SetLevel(i, aFmt);
+ }
+ nMask <<= 1;
+ }
+ aSvxRule.UnLinkGraphics();
+
+ SwNumRule aSetRule( pCurRule
+ ? pCurRule->GetName()
+ : GetShell().GetUniqueNumRuleName(),
+ numfunc::GetDefaultPositionAndSpaceMode() );
+
+ aSetRule.SetSvxRule( aSvxRule, GetShell().GetDoc());
+
+ aSetRule.SetAutoRule( sal_True );
+ const bool bCreateList = (pCurRule == 0);
+ GetShell().SetCurNumRule( aSetRule, bCreateList );
+ }
+ //End
+ }
+ }
+ break;
+ }
+}
Modified: openoffice/branches/ia2/main/sw/source/ui/sidebar/PagePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/sidebar/PagePropertyPanel.cxx?rev=1470868&r1=1467894&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/sidebar/PagePropertyPanel.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/sidebar/PagePropertyPanel.cxx Tue Apr 23 09:51:15 2013
@@ -499,8 +499,11 @@ void PagePropertyPanel::ClosePageColumnP
void PagePropertyPanel::NotifyItemUpdate(
const sal_uInt16 nSId,
const SfxItemState eState,
- const SfxPoolItem* pState)
+ const SfxPoolItem* pState,
+ const bool bIsEnabled)
{
+ (void)bIsEnabled;
+
switch( nSId )
{
case SID_ATTR_PAGE_COLUMN:
Modified: openoffice/branches/ia2/main/sw/source/ui/sidebar/PagePropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/sidebar/PagePropertyPanel.hxx?rev=1470868&r1=1467894&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/sidebar/PagePropertyPanel.hxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/sidebar/PagePropertyPanel.hxx Tue Apr 23 09:51:15 2013
@@ -65,7 +65,8 @@ namespace sw { namespace sidebar {
virtual void NotifyItemUpdate(
const sal_uInt16 nSId,
const SfxItemState eState,
- const SfxPoolItem* pState );
+ const SfxPoolItem* pState,
+ const bool bIsEnabled);
SfxBindings* GetBindings() const
{
Modified: openoffice/branches/ia2/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx?rev=1470868&r1=1467894&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx Tue Apr 23 09:51:15 2013
@@ -208,8 +208,11 @@ IMPL_LINK(WrapPropertyPanel, WrapTypeHdl
void WrapPropertyPanel::NotifyItemUpdate(
const sal_uInt16 nSId,
const SfxItemState eState,
- const SfxPoolItem* pState )
+ const SfxPoolItem* pState,
+ const bool bIsEnabled)
{
+ (void)bIsEnabled;
+
if ( eState == SFX_ITEM_AVAILABLE &&
pState->ISA(SfxBoolItem) )
{
Modified: openoffice/branches/ia2/main/sw/source/ui/sidebar/WrapPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/sidebar/WrapPropertyPanel.hxx?rev=1470868&r1=1467894&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/sidebar/WrapPropertyPanel.hxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/sidebar/WrapPropertyPanel.hxx Tue Apr 23 09:51:15 2013
@@ -47,7 +47,8 @@ namespace sw { namespace sidebar {
virtual void NotifyItemUpdate(
const sal_uInt16 nSId,
const SfxItemState eState,
- const SfxPoolItem* pState );
+ const SfxPoolItem* pState,
+ const bool bIsEnabled);
private:
WrapPropertyPanel(
Modified: openoffice/branches/ia2/main/sw/source/ui/smartmenu/stmenu.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/smartmenu/stmenu.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/smartmenu/stmenu.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/smartmenu/stmenu.cxx Tue Apr 23 09:51:15 2013
@@ -118,7 +118,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView
{
xAction = rActionComponents[i];
- for ( sal_Int32 k = 0; k < xAction->getActionCount( aSmartTagType, xController ); ++k )
+ for ( sal_Int32 k = 0; k < xAction->getActionCount( aSmartTagType, xController, xSmartTagProperties ); ++k )
{
const sal_uInt32 nActionID = xAction->getActionID( aSmartTagType, k, xController );
rtl::OUString aActionCaption = xAction->getActionCaptionFromID( nActionID,
Modified: openoffice/branches/ia2/main/sw/source/ui/table/convert.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/table/convert.hrc?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/table/convert.hrc (original)
+++ openoffice/branches/ia2/main/sw/source/ui/table/convert.hrc Tue Apr 23 09:51:15 2013
@@ -35,6 +35,12 @@
#define FL_OPTIONS 17
#define FT_REPEAT_HEADER 18
#define NF_REPEAT_HEADER 19
+//Table Row Header for ACC Supporting 2010.02.22
+#define FT_EXPLAIN_REPEAT_HEADER 20
+#define CB_LABEL 21
+#define NF_REPEAT_LABEL 22
+#define FT_REPEAT_LABEL 23
+//End table_row_header
#define BT_OK 100
#define BT_CANCEL 101
Modified: openoffice/branches/ia2/main/sw/source/ui/table/tabledlg.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/table/tabledlg.hrc?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/table/tabledlg.hrc (original)
+++ openoffice/branches/ia2/main/sw/source/ui/table/tabledlg.hrc Tue Apr 23 09:51:15 2013
@@ -102,6 +102,9 @@
#define FL_VERT_ORIENT 140
#define RB_FROM_LEFT 144
+//IAccessibility2 Impplementaton 2009-----
+#define STR_COLUMN_WIDTH 145
+//-----IAccessibility2 Impplementaton 2009
#define FT_VERTORIENT 150
#define LB_VERTORIENT 151
Modified: openoffice/branches/ia2/main/sw/source/ui/uiview/pview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/uiview/pview.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/uiview/pview.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/uiview/pview.cxx Tue Apr 23 09:51:15 2013
@@ -240,8 +240,11 @@ SwPagePreViewWin::SwPagePreViewWin( Wind
SwPagePreViewWin::~SwPagePreViewWin()
{
- if( mpViewShell )
- delete mpViewShell;
+ //IAccessibility2 Implementation 2009-----
+ // Remove to the deconstruction of SwPagePreView.
+ //if( mpViewShell)
+ // delete mpViewShell;
+ //-----IAccessibility2 Implementation 2009
}
/*--------------------------------------------------------------------
@@ -716,46 +719,46 @@ void SwPagePreView::_ExecPgUpAndPgDown(
SwPagePreViewWin::MV_PAGE_UP :
SwPagePreViewWin::MV_PAGE_DOWN;
if ( ChgPage( eMvMode, sal_True ) )
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
else
{
SwTwips nScrollAmount;
sal_uInt16 nNewSelectedPageNum = 0;
- const sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ const sal_uInt16 nVisPages = pViewWin->GetRow() * pViewWin->GetCol();
if( _bPgUp )
{
if ( pPagePrevwLay->DoesPreviewLayoutRowsFitIntoWindow() )
{
nScrollAmount = pPagePrevwLay->GetWinPagesScrollAmount( -1 );
- if ( (aViewWin.SelectedPage() - nVisPages) > 0 )
- nNewSelectedPageNum = aViewWin.SelectedPage() - nVisPages;
+ if ( (pViewWin->SelectedPage() - nVisPages) > 0 )
+ nNewSelectedPageNum = pViewWin->SelectedPage() - nVisPages;
else
nNewSelectedPageNum = 1;
}
else
- nScrollAmount = - Min( aViewWin.GetOutputSize().Height(),
- aViewWin.GetPaintedPreviewDocRect().Top() );
+ nScrollAmount = - Min( pViewWin->GetOutputSize().Height(),
+ pViewWin->GetPaintedPreviewDocRect().Top() );
}
else
{
if ( pPagePrevwLay->DoesPreviewLayoutRowsFitIntoWindow() )
{
nScrollAmount = pPagePrevwLay->GetWinPagesScrollAmount( 1 );
- if ( (aViewWin.SelectedPage() + nVisPages) <= mnPageCount )
- nNewSelectedPageNum = aViewWin.SelectedPage() + nVisPages;
+ if ( (pViewWin->SelectedPage() + nVisPages) <= mnPageCount )
+ nNewSelectedPageNum = pViewWin->SelectedPage() + nVisPages;
else
nNewSelectedPageNum = mnPageCount;
}
else
- nScrollAmount = Min( aViewWin.GetOutputSize().Height(),
+ nScrollAmount = Min( pViewWin->GetOutputSize().Height(),
( pPagePrevwLay->GetPrevwDocSize().Height() -
- aViewWin.GetPaintedPreviewDocRect().Bottom() ) );
+ pViewWin->GetPaintedPreviewDocRect().Bottom() ) );
}
- aViewWin.Scroll( 0, nScrollAmount );
+ pViewWin->Scroll( 0, nScrollAmount );
if ( nNewSelectedPageNum != 0 )
{
- aViewWin.SetSelectedPage( nNewSelectedPageNum );
+ pViewWin->SetSelectedPage( nNewSelectedPageNum );
}
ScrollViewSzChg();
// OD 24.03.2003 #108282# - additional invalidate page status.
@@ -766,7 +769,7 @@ void SwPagePreView::_ExecPgUpAndPgDown(
};
SfxBindings& rBindings = GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
}
@@ -801,11 +804,11 @@ void SwPagePreView::Execute( SfxRequest
SID_ATTR_TABLE_COLUMN)).GetValue();
sal_uInt8 nRows = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(
SID_ATTR_TABLE_ROW)).GetValue();
- aViewWin.CalcWish( nRows, nCols );
+ pViewWin->CalcWish( nRows, nCols );
}
else
- SwPreViewZoomDlg( aViewWin ).Execute();
+ SwPreViewZoomDlg( *pViewWin ).Execute();
}
break;
@@ -820,7 +823,7 @@ void SwPagePreView::Execute( SfxRequest
( ( SwViewOption* ) GetViewShell()->GetViewOptions() )->SetPagePrevBookview( bBookPreview );
// cast is not gentleman like, but it's common use in writer and in this case
}
- if ( aViewWin.SetBookPreviewMode( bBookPreview ) )
+ if ( pViewWin->SetBookPreviewMode( bBookPreview ) )
{
// book preview mode changed. Thus, adjust scrollbars and
// invalidate corresponding states.
@@ -832,13 +835,13 @@ void SwPagePreView::Execute( SfxRequest
};
SfxBindings& rBindings = GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
}
break;
case FN_SHOW_TWO_PAGES:
- aViewWin.CalcWish( nRow, 2 );
+ pViewWin->CalcWish( nRow, 2 );
break;
case FN_PREVIEW_ZOOM:
@@ -932,7 +935,7 @@ void SwPagePreView::Execute( SfxRequest
}
pPagePrevwLay->CalcStartValuesForSelectedPageMove( nHoriMove, nVertMove,
nNewSelectedPage, nNewStartPage, aNewStartPos );
- if ( aViewWin.SelectedPage() != nNewSelectedPage )
+ if ( pViewWin->SelectedPage() != nNewSelectedPage )
{
if ( pPagePrevwLay->IsPageVisible( nNewSelectedPage ) )
{
@@ -943,8 +946,8 @@ void SwPagePreView::Execute( SfxRequest
}
else
{
- aViewWin.SetSelectedPage( nNewSelectedPage );
- aViewWin.SetSttPage( nNewStartPage );
+ pViewWin->SetSelectedPage( nNewSelectedPage );
+ pViewWin->SetSttPage( nNewStartPage );
int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, sal_True );
bRefresh = 0 != nRet;
}
@@ -972,11 +975,11 @@ void SwPagePreView::Execute( SfxRequest
}
case FN_START_OF_LINE:
case FN_START_OF_DOCUMENT:
- aViewWin.SetSelectedPage( 1 );
+ pViewWin->SetSelectedPage( 1 );
eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = sal_True; goto MOVEPAGE;
case FN_END_OF_LINE:
case FN_END_OF_DOCUMENT:
- aViewWin.SetSelectedPage( mnPageCount );
+ pViewWin->SetSelectedPage( mnPageCount );
eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = sal_True; goto MOVEPAGE;
MOVEPAGE:
{
@@ -992,7 +995,7 @@ MOVEPAGE:
case FN_PRINT_PAGEPREVIEW:
{
- const SwPagePreViewPrtData* pPPVPD = aViewWin.GetViewShell()->GetDoc()->GetPreViewPrtData();
+ const SwPagePreViewPrtData* pPPVPD = pViewWin->GetViewShell()->GetDoc()->GetPreViewPrtData();
// die Sache mit der Orientation
if(pPPVPD)
{
@@ -1001,7 +1004,7 @@ MOVEPAGE:
!= pPPVPD->GetLandscape())
pPrinter->SetOrientation(pPPVPD->GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
}
- ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ ::SetAppPrintOptions( pViewWin->GetViewShell(), sal_False );
bNormalPrint = sal_False;
sal_uInt16 nPrtSlot = SID_PRINTDOC;
rReq.SetSlot( nPrtSlot );
@@ -1011,7 +1014,7 @@ MOVEPAGE:
}
case SID_PRINTDOCDIRECT:
case SID_PRINTDOC:
- ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ ::SetAppPrintOptions( pViewWin->GetViewShell(), sal_False );
bNormalPrint = sal_True;
SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
return;
@@ -1024,7 +1027,7 @@ MOVEPAGE:
break;
case FN_INSERT_BREAK:
{
- sal_uInt16 nSelPage = aViewWin.SelectedPage();
+ sal_uInt16 nSelPage = pViewWin->SelectedPage();
//if a dummy page is selected (e.g. a non-existing right/left page)
//the direct neighbor is used
if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage ))
@@ -1041,7 +1044,7 @@ MOVEPAGE:
}
if( bRefresh )
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
/*--------------------------------------------------------------------
@@ -1096,7 +1099,7 @@ void SwPagePreView::GetState( SfxItemSe
case FN_STAT_PAGE:
{
String aStr( sPageStr );
- aViewWin.GetStatusStr( aStr, mnPageCount );
+ pViewWin->GetStatusStr( aStr, mnPageCount );
rSet.Put( SfxStringItem( nWhich, aStr) );
}
break;
@@ -1168,7 +1171,7 @@ void SwPagePreView::GetState( SfxItemSe
break;
case FN_SHOW_TWO_PAGES:
- if( 2 == aViewWin.GetCol() && nRow == aViewWin.GetRow() )
+ if( 2 == pViewWin->GetCol() && nRow == pViewWin->GetRow() )
rSet.DisableItem( nWhich );
break;
@@ -1294,7 +1297,7 @@ void SwPagePreView::Init(const SwViewOpt
SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SfxViewShell( pViewFrame, SWVIEWFLAGS ),
- aViewWin( &pViewFrame->GetWindow(), *this ),
+ pViewWin( new SwPagePreViewWin(&(GetViewFrame())->GetWindow(), *this ) ),//IAccessibility2 Implementation 2009
nNewPage(USHRT_MAX),
pHScrollbar(0),
pVScrollbar(0),
@@ -1308,7 +1311,7 @@ SwPagePreView::SwPagePreView(SfxViewFram
mbFormDesignModeToReset( false )
{
SetName(String::CreateFromAscii("PageView" ));
- SetWindow( &aViewWin );
+ SetWindow( pViewWin );
SetHelpId(SW_PAGEPREVIEW);
_CreateScrollbar( sal_True );
_CreateScrollbar( sal_False );
@@ -1343,9 +1346,9 @@ SwPagePreView::SwPagePreView(SfxViewFram
// setze die akt. Seite als die erste
sal_uInt16 nPhysPg, nVirtPg;
((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*sal_False*/sal_True, sal_False );
- if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
+ if( 1 != pViewWin->GetCol() && 1 == nPhysPg )
--nPhysPg;
- aViewWin.SetSttPage( nPhysPg );
+ pViewWin->SetSttPage( nPhysPg );
}
}
@@ -1358,13 +1361,13 @@ SwPagePreView::SwPagePreView(SfxViewFram
}
if( pVS )
- pNew = new ViewShell( *pVS, &aViewWin, 0, VSHELLFLAG_ISPREVIEW );
+ pNew = new ViewShell( *pVS, pViewWin, 0, VSHELLFLAG_ISPREVIEW );
else
pNew = new ViewShell(
*((SwDocShell*)pViewFrame->GetObjectShell())->GetDoc(),
- &aViewWin, 0, 0, VSHELLFLAG_ISPREVIEW );
+ pViewWin, 0, 0, VSHELLFLAG_ISPREVIEW );
- aViewWin.SetViewShell( pNew );
+ pViewWin->SetViewShell( pNew );
pNew->SetSfxViewShell( this );
Init();
}
@@ -1378,6 +1381,15 @@ SwPagePreView::SwPagePreView(SfxViewFram
SwPagePreView::~SwPagePreView()
{
SetWindow( 0 );
+ //IAccessibility2 Implementation 2009-----
+ ViewShell* pVShell = pViewWin->GetViewShell();
+ pVShell->SetWin(0);
+ //pViewWin->Hide();
+ if( pVShell)
+ delete pVShell;
+ delete pViewWin;
+ //pViewWin->Hide();
+ //-----IAccessibility2 Implementation 2009
delete pScrollFill;
delete pHScrollbar;
@@ -1476,17 +1488,17 @@ IMPL_LINK_INLINE_END( SwPagePreView, Btn
int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
{
- Rectangle aPixVisArea( aViewWin.LogicToPixel( aVisArea ) );
- int bChg = aViewWin.MovePage( eMvMode ) ||
+ Rectangle aPixVisArea( pViewWin->LogicToPixel( aVisArea ) );
+ int bChg = pViewWin->MovePage( eMvMode ) ||
eMvMode == SwPagePreViewWin::MV_CALC ||
eMvMode == SwPagePreViewWin::MV_NEWWINSIZE;
- aVisArea = aViewWin.PixelToLogic( aPixVisArea );
+ aVisArea = pViewWin->PixelToLogic( aPixVisArea );
if( bChg )
{
// Statusleiste updaten
String aStr( sPageStr );
- aViewWin.GetStatusStr( aStr, mnPageCount );
+ pViewWin->GetStatusStr( aStr, mnPageCount );
SfxBindings& rBindings = GetViewFrame()->GetBindings();
if( bUpdateScrollbar )
@@ -1518,7 +1530,7 @@ int SwPagePreView::ChgPage( int eMvMode,
void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
// const long nAdd = bInner ? 0 : ScrollBar::GetWindowOverlapPixel();
- const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
+ const StyleSettings &rSet = pViewWin->GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();// - nAdd;
if ( pVScrollbar->IsVisible( sal_False ))
rToFill.Right() = nTmp;
@@ -1538,8 +1550,8 @@ void SwPagePreView::InnerResizePixel( c
CalcAndSetBorderPixel( aBorder, sal_True );
Rectangle aRect( rOfst, rSize );
aRect += aBorder;
- ViewResizePixel( aViewWin, aRect.TopLeft(), aRect.GetSize(),
- aViewWin.GetOutputSizePixel(),
+ ViewResizePixel( *pViewWin, aRect.TopLeft(), aRect.GetSize(),
+ pViewWin->GetOutputSizePixel(),
sal_True,
*pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, 0,
*pScrollFill );
@@ -1557,14 +1569,14 @@ void SwPagePreView::OuterResizePixel( c
{
SvBorder aBorder;
CalcAndSetBorderPixel( aBorder, sal_False );
- ViewResizePixel( aViewWin, rOfst, rSize, aViewWin.GetOutputSizePixel(),
+ ViewResizePixel( *pViewWin, rOfst, rSize, pViewWin->GetOutputSizePixel(),
sal_False, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn, 0, *pScrollFill );
//EditWin niemals einstellen!
- Size aTmpSize( aViewWin.GetOutputSizePixel() );
- Point aBottomRight( aViewWin.PixelToLogic( Point( aTmpSize.Width(), aTmpSize.Height() ) ) );
+ Size aTmpSize( pViewWin->GetOutputSizePixel() );
+ Point aBottomRight( pViewWin->PixelToLogic( Point( aTmpSize.Width(), aTmpSize.Height() ) ) );
SetVisArea( Rectangle( Point(), aBottomRight ) );
//Aufruf der DocSzChgd-Methode der Scrollbars ist noetig, da vom maximalen
@@ -1619,15 +1631,15 @@ void SwPagePreView::SetVisArea( const Re
//denn dann wir nicht wirklich gepaintet sondern die Rechtecke werden
//lediglich (in Dokumentkoordinaten) vorgemerkt.
if( GetViewShell()->ActionPend() )
- aViewWin.Update();
+ pViewWin->Update();
// setze am View-Win die aktuelle Size
aVisArea = aLR;
- aViewWin.SetWinSize( aLR.GetSize() );
+ pViewWin->SetWinSize( aLR.GetSize() );
// OD 18.12.2002 #103492# - use new mode
ChgPage( SwPagePreViewWin::MV_NEWWINSIZE, bUpdateScrollbar );
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
/*--------------------------------------------------------------------
@@ -1647,7 +1659,7 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwS
// wieviele Seiten scrollen ??
String sStateStr(sPageStr);
sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
- if( 1 == aViewWin.GetCol() || !nThmbPos )
+ if( 1 == pViewWin->GetCol() || !nThmbPos )
++nThmbPos;
sStateStr += String::CreateFromInt32( nThmbPos );
Point aPos = pScrollbar->GetParent()->OutputToScreenPixel(
@@ -1691,7 +1703,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl,
// wieviele Seiten scrollen ??
sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
// OD 05.12.2002 #103492# - adjust to new preview functionality
- if( nThmbPos != aViewWin.SelectedPage() )
+ if( nThmbPos != pViewWin->SelectedPage() )
{
// OD 17.01.2003 #103492# - consider case that page <nThmbPos>
// is already visible
@@ -1708,8 +1720,8 @@ IMPL_LINK( SwPagePreView, EndScrollHdl,
// fit or not.
if ( !pPagePrevwLay->DoesPreviewLayoutColsFitIntoWindow() )
{
- aViewWin.SetSttPage( nThmbPos );
- aViewWin.SetSelectedPage( nThmbPos );
+ pViewWin->SetSttPage( nThmbPos );
+ pViewWin->SetSelectedPage( nThmbPos );
ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False );
// OD 20.01.2003 #103492# - update scrollbars
ScrollViewSzChg();
@@ -1717,16 +1729,16 @@ IMPL_LINK( SwPagePreView, EndScrollHdl,
else
{
// OD 04.03.2003 #107369# - correct scroll amount
- const sal_Int16 nPageDiff = nThmbPos - aViewWin.SelectedPage();
- const sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ const sal_Int16 nPageDiff = nThmbPos - pViewWin->SelectedPage();
+ const sal_uInt16 nVisPages = pViewWin->GetRow() * pViewWin->GetCol();
sal_Int16 nWinPagesToScroll = nPageDiff / nVisPages;
if ( nPageDiff % nVisPages )
{
// decrease/increase number of preview pages to scroll
nPageDiff < 0 ? --nWinPagesToScroll : ++nWinPagesToScroll;
}
- aViewWin.SetSelectedPage( nThmbPos );
- aViewWin.Scroll( 0, pPagePrevwLay->GetWinPagesScrollAmount( nWinPagesToScroll ) );
+ pViewWin->SetSelectedPage( nThmbPos );
+ pViewWin->Scroll( 0, pPagePrevwLay->GetWinPagesScrollAmount( nWinPagesToScroll ) );
}
}
// OD 17.01.2003 #103492# - update accessibility
@@ -1741,13 +1753,13 @@ IMPL_LINK( SwPagePreView, EndScrollHdl,
else
{
long nThmbPos = pScrollbar->GetThumbPos();
- aViewWin.Scroll(0, nThmbPos - aViewWin.GetPaintedPreviewDocRect().Top());
+ pViewWin->Scroll(0, nThmbPos - pViewWin->GetPaintedPreviewDocRect().Top());
}
}
else
{
long nThmbPos = pScrollbar->GetThumbPos();
- aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
+ pViewWin->Scroll(nThmbPos - pViewWin->GetPaintedPreviewDocRect().Left(), 0);
}
// OD 24.03.2003 #108282# - additional invalidate page status.
static sal_uInt16 __READONLY_DATA aInval[] =
@@ -1760,7 +1772,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl,
// OD 04.03.2003 #107369# - control invalidation of window
if ( bInvalidateWin )
{
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
return 0;
}
@@ -1771,7 +1783,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl,
Point SwPagePreView::AlignToPixel(const Point &rPt) const
{
- return aViewWin.PixelToLogic( aViewWin.LogicToPixel( rPt ) );
+ return pViewWin->PixelToLogic( pViewWin->LogicToPixel( rPt ) );
}
/*--------------------------------------------------------------------
@@ -1796,7 +1808,7 @@ void SwPagePreView::DocSzChgd( const Siz
ChgPage( SwPagePreViewWin::MV_CALC, sal_True );
ScrollDocSzChg();
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
// <--
}
@@ -1816,20 +1828,20 @@ void SwPagePreView::ScrollViewSzChg()
{
//vertical scrolling by row
// OD 04.12.2002 #103492# - adjust to new preview functionality
- sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ sal_uInt16 nVisPages = pViewWin->GetRow() * pViewWin->GetCol();
pVScrollbar->SetVisibleSize( nVisPages );
// OD 19.02.2003 #107369# - set selected page as scroll bar position,
// if it is visible.
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
- if ( pPagePrevwLay->IsPageVisible( aViewWin.SelectedPage() ) )
+ if ( pPagePrevwLay->IsPageVisible( pViewWin->SelectedPage() ) )
{
- pVScrollbar->SetThumbPos( aViewWin.SelectedPage() );
+ pVScrollbar->SetThumbPos( pViewWin->SelectedPage() );
}
else
{
- pVScrollbar->SetThumbPos( aViewWin.GetSttPage() );
+ pVScrollbar->SetThumbPos( pViewWin->GetSttPage() );
}
- pVScrollbar->SetLineSize( aViewWin.GetCol() );
+ pVScrollbar->SetLineSize( pViewWin->GetCol() );
pVScrollbar->SetPageSize( nVisPages );
// calculate and set scrollbar range
Range aScrollbarRange( 1, mnPageCount );
@@ -1841,7 +1853,7 @@ void SwPagePreView::ScrollViewSzChg()
}
else //vertical scrolling by pixel
{
- const Rectangle& rDocRect = aViewWin.GetPaintedPreviewDocRect();
+ const Rectangle& rDocRect = pViewWin->GetPaintedPreviewDocRect();
const Size& rPreviewSize =
GetViewShell()->PagePreviewLayout()->GetPrevwDocSize();
pVScrollbar->SetRangeMax(rPreviewSize.Height()) ;
@@ -1854,7 +1866,7 @@ void SwPagePreView::ScrollViewSzChg()
}
if(pHScrollbar)
{
- const Rectangle& rDocRect = aViewWin.GetPaintedPreviewDocRect();
+ const Rectangle& rDocRect = pViewWin->GetPaintedPreviewDocRect();
const Size& rPreviewSize =
GetViewShell()->PagePreviewLayout()->GetPrevwDocSize();
long nVisWidth = 0;
@@ -1896,7 +1908,7 @@ void SwPagePreView::ScrollDocSzChg()
SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate )
{
- return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
+ return pViewWin->GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
}
/*--------------------------------------------------------------------
@@ -1934,7 +1946,7 @@ sal_uInt16 SwPagePreView::SetPrinter( S
rSh.ChgAllPageSize( aSz );
}
if( !bNormalPrint )
- aViewWin.CalcWish( aViewWin.GetRow(), aViewWin.GetCol() );
+ pViewWin->CalcWish( pViewWin->GetRow(), pViewWin->GetCol() );
rESh.SetModified();
rESh.EndAllAction();
@@ -1997,7 +2009,7 @@ Size SwPagePreView::GetOptimalSizePixel
nYBorder -= (nYBorder - nXBorder) / 2;
aMaxSize.Height() -= nYBorder;
//mit der max. moeglichen Outputsize guenstigstes Verhaeltnis ausrechnen
- aViewWin.GetOptimalSize(aMaxSize);
+ pViewWin->GetOptimalSize(aMaxSize);
// Border wieder dazuzaehlen
aMaxSize.Height() += nYBorder;
aMaxSize.Width() += nXBorder;
@@ -2091,7 +2103,10 @@ sal_Bool SwPagePreView::HandleWheelComma
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+ //IAccessibility2 Implementation 2009-----, only the Preference shouldn't control the Zoom, it is better to detect AT tools running. So the bridge can be used here
+ //if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+ if ( !Application::IsAccessibilityEnabled() )
+ //-----IAccessibility2 Implementation 2009
{
sal_uInt16 nFactor = GetViewShell()->GetViewOptions()->GetZoom();
const sal_uInt16 nOffset = 10;
@@ -2112,7 +2127,7 @@ sal_Bool SwPagePreView::HandleWheelComma
bOk = sal_True;
}
else
- bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
+ bOk = pViewWin->HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
return bOk;
}
@@ -2124,8 +2139,37 @@ uno::Reference< ::com::sun::star::access
// happend already!!!
DBG_ASSERT( GetViewShell() != NULL, "We need a view shell" );
- return GetViewShell()->CreateAccessiblePreview();
+ //IAccessibility2 Implementation 2009-----
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible( sal_False );
+ if (xAcc.is())
+ {
+ return xAcc;
+ }
+ if (mpViewShell)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccPreview = mpViewShell->CreateAccessiblePreview();
+ SetAccessible(xAccPreview);
+ }
+ return GetAccessible( sal_False );
+ //-----IAccessibility2 Implementation 2009
+}
+//IAccessibility2 Implementation 2009-----
+// MT: Removed Windows::SwitchView() introduced with IA2 CWS.
+// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism
+void SwPagePreViewWin::SwitchView()
+{
+#ifdef ACCESSIBLE_LAYOUT
+ if (!Application::IsAccessibilityEnabled())
+ {
+ return ;
+ }
+ if (mpViewShell)
+ {
+ mpViewShell->InvalidateAccessibleFocus();
+ }
+#endif
}
+//-----IAccessibility2 Implementation 2009
/* -----------------------------06.05.2002 13:18------------------------------
@@ -2169,7 +2213,7 @@ void SwPagePreView::SetZoom(SvxZoomType
lcl_InvalidateZoomSlots(GetViewFrame()->GetBindings());
// OD 02.12.2002 #103492#
// OD 24.09.2003 #i19975# - also consider zoom type
- aViewWin.AdjustPreviewToNewZoom( nFactor, eType );
+ pViewWin->AdjustPreviewToNewZoom( nFactor, eType );
ScrollViewSzChg();
}
}
Modified: openoffice/branches/ia2/main/sw/source/ui/uiview/view.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/uiview/view.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/uiview/view.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/uiview/view.cxx Tue Apr 23 09:51:15 2013
@@ -780,6 +780,9 @@ SwView::SwView( SfxViewFrame *_pFrame, S
nFormSfxId( USHRT_MAX ),
nLastPasteDestination( 0xFFFF ),
nLeftBorderDistance( 0 ),
+ //IAccessibility2 Implementation 2009-----
+ nOldPageNum(0),
+ //-----IAccessibility2 Implementation 2009
nRightBorderDistance( 0 ),
bInMailMerge(sal_False),
bInDtor(sal_False),
Modified: openoffice/branches/ia2/main/sw/source/ui/uiview/view0.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/uiview/view0.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/uiview/view0.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/uiview/view0.cxx Tue Apr 23 09:51:15 2013
@@ -43,6 +43,7 @@
#include <sfx2/templdlg.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/bindings.hxx>
+#include <sfx2/sidebar/SidebarChildWindow.hxx>
#include <uivwimp.hxx>
#include <avmedia/mediaplayer.hxx>
//#include <swlinguconfig.hxx>
@@ -109,6 +110,7 @@ SFX_IMPL_INTERFACE( SwView, SfxViewShell
{
SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_NAVIGATOR);
SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE);
+ SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SvxSearchDialogWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SwSpellDialogChildWindow::GetChildWindowId());
Modified: openoffice/branches/ia2/main/sw/source/ui/uiview/view1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/uiview/view1.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/uiview/view1.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/uiview/view1.cxx Tue Apr 23 09:51:15 2013
@@ -28,6 +28,7 @@
#include <svx/svdpagv.hxx>
#include <svx/svdview.hxx>
#include <svx/ruler.hxx>
+#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
#include <idxmrk.hxx>
#ifndef _VIEW_HXX
#include <view.hxx>
Modified: openoffice/branches/ia2/main/sw/source/ui/uiview/view2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/uiview/view2.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/uiview/view2.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/uiview/view2.cxx Tue Apr 23 09:51:15 2013
@@ -1093,9 +1093,9 @@ void __EXPORT SwView::Execute(SfxRequest
case SID_ALIGN_ANY_HCENTER : nAlias = SID_ATTR_PARA_ADJUST_CENTER; break;
case SID_ALIGN_ANY_RIGHT : nAlias = SID_ATTR_PARA_ADJUST_RIGHT; break;
case SID_ALIGN_ANY_JUSTIFIED: nAlias = SID_ATTR_PARA_ADJUST_BLOCK; break;
- case SID_ALIGN_ANY_TOP : nAlias = FN_TABLE_VERT_NONE; break;
- case SID_ALIGN_ANY_VCENTER : nAlias = FN_TABLE_VERT_CENTER; break;
- case SID_ALIGN_ANY_BOTTOM : nAlias = FN_TABLE_VERT_BOTTOM; break;
+ case SID_ALIGN_ANY_TOP : nAlias = SID_TABLE_VERT_NONE; break;
+ case SID_ALIGN_ANY_VCENTER : nAlias = SID_TABLE_VERT_CENTER; break;
+ case SID_ALIGN_ANY_BOTTOM : nAlias = SID_TABLE_VERT_BOTTOM; break;
}
}
else
@@ -1179,6 +1179,32 @@ void SwView::StateStatusLine(SfxItemSet
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
ASSERT( nWhich, "leeres Set");
+ //IAccessibility2 Implementation 2009-----
+ if (Application::IsAccessibilityEnabled())
+ {
+ //get section chang event
+ const SwSection* CurrSect = rShell.GetCurrSection();
+ if( CurrSect )
+ {
+ String sCurrentSectionName = CurrSect->GetSectionName();
+ if(sCurrentSectionName != nOldSectionName)
+ {
+ rShell.FireSectionChangeEvent(2, 1);
+ }
+ nOldSectionName = sCurrentSectionName;
+ }
+ else if ( !(nOldSectionName.Equals(String())) )
+ {
+ rShell.FireSectionChangeEvent(2, 1);
+ nOldSectionName = String();
+ }
+ //get column change event
+ if(rShell.bColumnChange())
+ {
+ rShell.FireColumnChangeEvent(2, 1);
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
while( nWhich )
{
@@ -1203,7 +1229,15 @@ void SwView::StateStatusLine(SfxItemSet
rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay );
rSet.Put( SfxStringItem( FN_STAT_PAGE,
GetPageStr( nPage, nLogPage, sDisplay) ));
-
+ //IAccessibility2 Implementation 2009-----
+ //if existing page number is not equal to old page number, send out this event.
+ if (nOldPageNum != nLogPage )
+ {
+ if (nOldPageNum != 0)
+ rShell.FirePageChangeEvent(nOldPageNum, nLogPage);
+ nOldPageNum = nLogPage;
+ }
+ //-----IAccessibility2 Implementation 2009
sal_uInt16 nCnt = GetWrtShell().GetPageCnt();
if (nPageCnt != nCnt) // Basic benachrichtigen
{
Modified: openoffice/branches/ia2/main/sw/source/ui/uiview/viewprt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/uiview/viewprt.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/uiview/viewprt.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/uiview/viewprt.cxx Tue Apr 23 09:51:15 2013
@@ -26,9 +26,7 @@
#include <com/sun/star/text/NotePrintMode.hpp>
-#if STLPORT_VERSION>=321
#include <cstdarg>
-#endif
#ifndef _CMDID_H
#include <cmdid.h>
Modified: openoffice/branches/ia2/main/sw/source/ui/uiview/viewsrch.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/uiview/viewsrch.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/uiview/viewsrch.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/uiview/viewsrch.cxx Tue Apr 23 09:51:15 2013
@@ -213,6 +213,19 @@ void SwView::ExecSearch(SfxRequest& rReq
if( bRet )
Scroll(pWrtShell->GetCharRect().SVRect());
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
+ //IAccessibility2 Implementation 2009-----
+ if ( Application::IsAccessibilityEnabled() )
+ {
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+ SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+ if ( pWrp )
+ {
+ pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg->SetDocWin( (Window*)pEditWin );
+ pSrchDlg->SetSrchFlag();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
break;
case SVX_SEARCHCMD_FIND_ALL:
@@ -228,6 +241,20 @@ void SwView::ExecSearch(SfxRequest& rReq
bFound = sal_False;
}
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
+ //IAccessibility2 Implementation 2009-----
+ if ( Application::IsAccessibilityEnabled() )
+ {
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+ SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+
+ if ( pWrp )
+ {
+ pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg->SetDocWin( (Window*)pEditWin );
+ pSrchDlg->SetSrchFlag();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
break;
case SVX_SEARCHCMD_REPLACE:
@@ -279,6 +306,19 @@ void SwView::ExecSearch(SfxRequest& rReq
pSrchItem->SetCommand( nOldCmd );
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
}
+ //IAccessibility2 Implementation 2009-----
+ {
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+ SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+
+ if ( pWrp )
+ {
+ pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg->SetDocWin( (Window*)pEditWin );
+ pSrchDlg->SetSrchFlag();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
break;
case SVX_SEARCHCMD_REPLACE_ALL:
@@ -328,6 +368,17 @@ void SwView::ExecSearch(SfxRequest& rReq
InfoBox( pParentWindow, aText ).Execute();
}
}
+ //IAccessibility2 Implementation 2009-----
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+ SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+
+ if ( pWrp )
+ {
+ pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg->SetDocWin( (Window*)pEditWin );
+ pSrchDlg->SetSrchFlag();
+ }
+ //-----IAccessibility2 Implementation 2009
break;
}
Modified: openoffice/branches/ia2/main/sw/source/ui/uiview/viewstat.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sw/source/ui/uiview/viewstat.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sw/source/ui/uiview/viewstat.cxx (original)
+++ openoffice/branches/ia2/main/sw/source/ui/uiview/viewstat.cxx Tue Apr 23 09:51:15 2013
@@ -389,9 +389,9 @@ void SwView::GetState(SfxItemSet &rSet)
case SID_ALIGN_ANY_HCENTER : nAlias = SID_ATTR_PARA_ADJUST_CENTER; break;
case SID_ALIGN_ANY_RIGHT : nAlias = SID_ATTR_PARA_ADJUST_RIGHT; break;
case SID_ALIGN_ANY_JUSTIFIED: nAlias = SID_ATTR_PARA_ADJUST_BLOCK; break;
- case SID_ALIGN_ANY_TOP : nAlias = FN_TABLE_VERT_NONE; break;
- case SID_ALIGN_ANY_VCENTER : nAlias = FN_TABLE_VERT_CENTER; break;
- case SID_ALIGN_ANY_BOTTOM : nAlias = FN_TABLE_VERT_BOTTOM; break;
+ case SID_ALIGN_ANY_TOP : nAlias = SID_TABLE_VERT_NONE; break;
+ case SID_ALIGN_ANY_VCENTER : nAlias = SID_TABLE_VERT_CENTER; break;
+ case SID_ALIGN_ANY_BOTTOM : nAlias = SID_TABLE_VERT_BOTTOM; break;
}
}
else if(nSelectionType & (nsSelectionType::SEL_DRW))