diff options
Diffstat (limited to 'sw/source')
34 files changed, 272 insertions, 22 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 6f5516d69c1f..8379f87c0783 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <memory> #include <com/sun/star/text/XTextRange.hpp> @@ -1558,7 +1560,9 @@ class SwNotifyAccAboutInvalidTextSelections ~SwNotifyAccAboutInvalidTextSelections() COVERITY_NOEXCEPT_FALSE { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY mrCursorSh.InvalidateAccessibleParaTextSelection(); +#endif } }; @@ -1744,8 +1748,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_pVisibleCursor->Show(); // show again } m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (Imp()->IsAccessible()) Imp()->InvalidateAccessibleCursorPosition( pTableFrame ); +#endif return; } } @@ -2016,8 +2022,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (Imp()->IsAccessible()) Imp()->InvalidateAccessibleCursorPosition( pFrame ); +#endif // switch from blinking cursor to read-only-text-selection cursor const sal_uInt64 nBlinkTime = GetOut()->GetSettings().GetStyleSettings(). diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 26647f2355cf..8d2f420d3751 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hintids.hxx> #include <osl/diagnose.h> #include <sfx2/linkmgr.hxx> @@ -1115,6 +1117,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1126,6 +1129,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt()) ); } } +#endif pNew = pSct; } @@ -1141,6 +1145,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1152,6 +1157,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt()) ); } } +#endif if ( bInitNewSect ) static_cast<SwSectionFrame*>(pNew)->Init(); } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index d11f09ecf69a..8c2435858311 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <memory> #include <fesh.hxx> #include <hintids.hxx> @@ -2426,6 +2428,7 @@ void SwTableNode::MakeOwnFrames(SwNodeIndex* pIdxBehind) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -2436,6 +2439,7 @@ void SwTableNode::MakeOwnFrames(SwNodeIndex* pIdxBehind) dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt()) ); } } +#endif pNew->RegistFlys(); } } @@ -2461,6 +2465,7 @@ void SwTableNode::DelFrames(SwRootFrame const*const pLayout) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -2471,6 +2476,7 @@ void SwTableNode::DelFrames(SwRootFrame const*const pLayout) dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt()) ); } } +#endif pFrame->Cut(); SwFrame::DestroyFrame(pFrame); bAgain = true; diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 809ecd349c81..e1c866aecabf 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hintids.hxx> #include <editeng/protitem.hxx> #include <osl/diagnose.h> @@ -1385,6 +1387,7 @@ void SwContentNode::MakeFramesForAdjacentContentNode(SwContentNode& rNode) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1396,6 +1399,7 @@ void SwContentNode::MakeFramesForAdjacentContentNode(SwContentNode& rNode) dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt()) ); } } +#endif } } @@ -1480,6 +1484,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) @@ -1488,6 +1493,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout) dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt()) ); } +#endif } if( pFrame->IsFollow() ) diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index dfa884e80db5..85d537be0a58 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hintids.hxx> #include <svx/svdpage.hxx> #include <svx/svdpagv.hxx> @@ -371,6 +373,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pTmpFlyFrame = dynamic_cast<SwFlyFrame *>( pAnchoredObj ) ) { m_rImp.DisposeAccessibleFrame( pTmpFlyFrame ); @@ -381,6 +384,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true); m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() ); } +#endif } aAnchoredObjs.pop_back(); } @@ -404,6 +408,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nTmpNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pTmpFlyFrame = dynamic_cast<SwFlyFrame *>( pAnchoredObj ) ) { m_rImp.DisposeAccessibleFrame( pTmpFlyFrame ); @@ -414,6 +419,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true); m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() ); } +#endif } aAnchoredObjs.pop_back(); } @@ -581,8 +587,10 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, if ( auto pFlyFrame = dynamic_cast< SwFlyFrame *>( pMovedAnchoredObj ) ) { // adjustments for accessibility API +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY m_rImp.DisposeAccessibleFrame( pFlyFrame ); m_rImp.AddAccessibleFrame( pFlyFrame ); +#endif const sal_uInt32 nChildNewPos = bMovedForward ? nNewPos : nNewPos+1; size_t i = bMovedForward ? nOldPos : nObjCount-1; @@ -609,6 +617,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, // collect 'child' object aMovedChildObjs.push_back( pTmpObj ); // adjustments for accessibility API +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pFlyDrawObj = dynamic_cast<SwVirtFlyDrawObj *>( pTmpObj ) ) { const SwFlyFrame *pTmpFlyFrame = pFlyDrawObj->GetFlyFrame(); @@ -620,6 +629,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, m_rImp.DisposeAccessibleObj(pTmpObj, true); m_rImp.AddAccessibleObj( pTmpObj ); } +#endif } else { @@ -633,12 +643,14 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, } while ( ( bMovedForward && i < ( nObjCount - aMovedChildObjs.size() ) ) || ( !bMovedForward && i > ( nNewPos + aMovedChildObjs.size() ) ) ); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY else { // adjustments for accessibility API m_rImp.DisposeAccessibleObj(pObj, true); m_rImp.AddAccessibleObj( pObj ); } +#endif MoveRepeatedObjs( *pMovedAnchoredObj, aMovedChildObjs ); } diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 8110b5120c74..9d492ecbccba 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <dcontact.hxx> #include <rootfrm.hxx> #include <pagefrm.hxx> @@ -123,11 +125,13 @@ SwPosNotify::~SwPosNotify() COVERITY_NOEXCEPT_FALSE } } // tdf#101464 notify SwAccessibleMap about new drawing object position +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (mpOldPageFrame && mpOldPageFrame->getRootFrame()->IsAnyShellAccessible()) { mpOldPageFrame->getRootFrame()->GetCurrShell()->Imp()->MoveAccessible( nullptr, mpAnchoredDrawObj->GetDrawObj(), maOldObjRect); } +#endif } // --> #i32795# diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index bf01c3b1dc7a..986c812454df 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <svl/itemiter.hxx> #include <vcl/imap.hxx> #include <tools/helpers.hxx> @@ -261,6 +263,7 @@ void SwFlyFrame::DestroyImpl() // For frames bound as char or frames that don't have an anchor we have // to do that ourselves. For any other frame the call RemoveFly at the // anchor will do that. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( IsAccessibleFrame() && GetFormat() && (IsFlyInContentFrame() || !GetAnchorFrame()) ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -275,6 +278,7 @@ void SwFlyFrame::DestroyImpl() } } } +#endif if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { @@ -484,6 +488,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) } // invalidate accessible relation set (accessibility wrapper) +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { @@ -491,6 +496,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow ); } +#endif } void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) @@ -530,6 +536,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) pFollow->GetFormat()->GetDoc(), ++nIndex ); // invalidate accessible relation set (accessibility wrapper) +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { @@ -537,6 +544,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow ); } +#endif } SwFlyFrame *SwFlyFrame::FindChainNeighbour( SwFrameFormat const &rChain, SwFrame *pAnch ) @@ -792,12 +800,14 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, const SvxProtectItem *pP = static_cast<const SvxProtectItem*>(pNew); GetVirtDrawObj()->SetMoveProtect( pP->IsPosProtected() ); GetVirtDrawObj()->SetResizeProtect( pP->IsSizeProtected() ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( pSh ) { SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleEditableState( true, this ); } +#endif } break; case RES_COL: @@ -975,15 +985,17 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, rIDDMA.GetHeavenId() : rIDDMA.GetHellId(); GetVirtDrawObj()->SetLayer( nId ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( pSh ) { SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) - { - pSh->Imp()->DisposeAccessibleFrame( this ); - pSh->Imp()->AddAccessibleFrame( this ); - } + { + pSh->Imp()->DisposeAccessibleFrame( this ); + pSh->Imp()->AddAccessibleFrame( this ); + } } +#endif // #i28701# - perform reorder of object lists // at anchor frame and at page frame. rInvFlags |= SwFlyFrameInvFlags::UpdateObjInSortedList; @@ -2203,6 +2215,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove ) pPage->RemoveFlyFromPage( pToRemove ); } // #i73201# +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY else { if ( pToRemove->IsAccessibleFrame() && @@ -2220,6 +2233,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove ) } } } +#endif m_pDrawObjs->Remove(*pToRemove); if (!m_pDrawObjs->size()) @@ -2301,6 +2315,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) } // Notify accessible layout. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { @@ -2310,6 +2325,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) pSh->Imp()->AddAccessibleObj( _rNewObj.GetDrawObj() ); } } +#endif assert(!m_pDrawObjs || m_pDrawObjs->is_sorted()); } @@ -2317,6 +2333,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) { // Notify accessible layout. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { @@ -2324,6 +2341,7 @@ void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) if (pLayout && pLayout->IsAnyShellAccessible()) pSh->Imp()->DisposeAccessibleObj(_rToRemoveObj.GetDrawObj(), false); } +#endif // deregister from page frame SwPageFrame* pPage = _rToRemoveObj.GetPageFrame(); diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index ea50b06ab364..6c73afe06d6f 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <pagefrm.hxx> #include <rootfrm.hxx> #include <cntfrm.hxx> @@ -847,6 +849,7 @@ void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -854,6 +857,7 @@ void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->AddAccessibleFrame( pNew ); } +#endif } // #i28701# - correction: consider also drawing objects @@ -920,6 +924,7 @@ void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -927,6 +932,7 @@ void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->DisposeAccessibleFrame( pToRemove, true ); } +#endif // #i28701# - use new method <SetPageFrame(..)> pToRemove->SetPageFrame( nullptr ); @@ -956,6 +962,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -963,6 +970,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->DisposeAccessibleFrame( pToMove, true ); } +#endif // The FlyColl might be gone already, because the page's dtor is being executed. if ( m_pSortedObjs ) @@ -992,6 +1000,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -999,6 +1008,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->AddAccessibleFrame( pToMove ); } +#endif // #i28701# - correction: move lowers of Writer fly frame if ( !pToMove->GetDrawObjs() ) diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 51e76b63daaa..3a3d4ccef161 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <svx/svdpage.hxx> #include <editeng/brushitem.hxx> #include <editeng/shaditem.hxx> @@ -240,6 +242,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE if ( bAbsP || bPrtP || bChgWidth || bChgHeight || bPrtWidth || bPrtHeight || bChgFlyBasePos ) { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( mpFrame->IsAccessibleFrame() ) { SwRootFrame *pRootFrame = mpFrame->getRootFrame(); @@ -249,6 +252,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( mpFrame, maFrame ); } } +#endif // Notification of anchored objects if ( mpFrame->GetDrawObjs() ) @@ -368,6 +372,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE } } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY else if( mpFrame->IsTextFrame() && mbValidSize != mpFrame->isFrameAreaSizeValid() ) { SwRootFrame *pRootFrame = mpFrame->getRootFrame(); @@ -377,6 +382,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE pRootFrame->GetCurrShell()->Imp()->InvalidateAccessibleFrameContent( mpFrame ); } } +#endif // #i9046# Automatic frame width SwFlyFrame* pFly = nullptr; @@ -1564,6 +1570,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( pFrame->IsTextFrame() ) { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); @@ -1585,6 +1592,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, pFrame->InvalidateInfFlags(); } } +#endif // OD 12.08.2003 #i17969# - consider horizontal/vertical layout // for setting position at newly inserted frame lcl_SetPos( *pFrame, *pLay ); @@ -1651,6 +1659,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if <SwViewShell> is in construction @@ -1664,6 +1673,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt()) ); } } +#endif if ( bObjsDirect && !pTable->empty() ) static_cast<SwTabFrame*>(pFrame)->RegistFlys(); // OD 12.08.2003 #i17969# - consider horizontal/vertical layout @@ -1763,6 +1773,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if <SwViewShell> is in construction @@ -1776,6 +1787,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt()) ); } } +#endif pFrame->CheckDirChange(); // OD 12.08.2003 #i17969# - consider horizontal/vertical layout diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 0ab451c111a0..bf2eba734ca7 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -18,6 +18,7 @@ */ #include <config_feature_desktop.h> +#include <config_wasm_strip.h> #include <ctime> #include <rootfrm.hxx> @@ -2342,8 +2343,10 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : m_pImp->GetShell()->EnableSmooth( true ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( m_pImp->IsAccessible() ) m_pImp->FireAccessibleEvents(); +#endif SAL_INFO("sw.idle", "SwLayIdle() return"); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index d699d59ecb80..fb2392d5c081 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <comphelper/lok.hxx> #include <ndole.hxx> #include <sal/log.hxx> @@ -2063,23 +2065,25 @@ static void lcl_MoveAllLowerObjs( SwFrame* pFrame, const Point& rOffset ) static void lcl_MoveAllLowers( SwFrame* pFrame, const Point& rOffset ) { - const SwRect aFrame( pFrame->getFrameArea() ); - // first move the current frame // RotateFlyFrame3: moved to transform_translate instead of // direct modification to allow the SwFrame evtl. needed own reactions pFrame->transform_translate(rOffset); // Don't forget accessibility: +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( pFrame->IsAccessibleFrame() ) { SwRootFrame *pRootFrame = pFrame->getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) { + const SwRect aFrame( pFrame->getFrameArea() ); + pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pFrame, aFrame ); } } +#endif // the move any objects lcl_MoveAllLowerObjs( pFrame, rOffset ); diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 079e7de2b264..ea9972ab90b0 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <sal/config.h> #include <sal/log.hxx> @@ -198,6 +200,7 @@ void SwSectionFrame::DelEmpty( bool bRemove ) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -208,6 +211,7 @@ void SwSectionFrame::DelEmpty( bool bRemove ) dynamic_cast<SwTextFrame*>(FindPrevCnt()) ); } } +#endif Cut_( bRemove ); } SwSectionFrame *pMaster = IsFollow() ? FindMaster() : nullptr; @@ -2705,11 +2709,13 @@ void SwSectionFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pN break; case RES_PROTECT: +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetLayout()->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleEditableState( true, this ); } +#endif break; default: diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index b4ac7980e90a..3fc0d10b5d1b 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <pagefrm.hxx> #include <rootfrm.hxx> #include <dcontact.hxx> @@ -329,6 +331,7 @@ void SwFrame::DestroyImpl() // accessible objects for fly and cell frames have been already disposed // by the destructors of the derived classes. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (IsAccessibleFrame() && !(IsFlyFrame() || IsCellFrame()) && (GetDep() || IsTextFrame())) // sw_redlinehide: text frame may not have Dep! { @@ -344,6 +347,7 @@ void SwFrame::DestroyImpl() } } } +#endif if (!m_pDrawObjs) return; diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index fe3016b0037a..14dbbe42491e 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <pagefrm.hxx> #include <rootfrm.hxx> #include <IDocumentFieldsAccess.hxx> @@ -3190,8 +3192,6 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) if ( GetUpper() ) { - SwRect aOldFrame( getFrameArea() ); - //The upper only grows as far as needed. nReal provides the distance //which is already available. SwTwips nReal = aRectFnSet.GetHeight(GetUpper()->getFramePrintArea()); @@ -3220,12 +3220,15 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) aRectFnSet.AddBottom( aFrm, nDist ); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) { + SwRect aOldFrame( getFrameArea() ); pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } +#endif } } @@ -4504,7 +4507,6 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight ) SwFrame *pFrame = Lower(); if ( bHeight ) { - SwRootFrame *pRootFrame = getRootFrame(); SwRectFnSet aRectFnSet(this); SwRect aOldFrame; @@ -4581,8 +4583,11 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight ) if ( pNotify ) { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY + SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pNotify, aOldFrame ); +#endif pNotify->InvalidatePrt_(); } @@ -4853,12 +4858,14 @@ void SwCellFrame::DestroyImpl() { // At this stage the lower frames aren't destroyed already, // therefore we have to do a recursive dispose. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) { pRootFrame->GetCurrShell()->Imp()->DisposeAccessibleFrame( this, true ); } +#endif pMod->Remove( this ); if( !pMod->HasWriterListeners() ) @@ -5449,12 +5456,14 @@ void SwCellFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) InvalidatePrt(); } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if(pProtectItem) { SwViewShell* pSh = getRootFrame()->GetCurrShell(); if(pSh && pSh->GetLayout()->IsAnyShellAccessible()) pSh->Imp()->InvalidateAccessibleEditableState(true, this); } +#endif if(pFrameDirItem) { SetDerivedVert(false); @@ -5596,6 +5605,7 @@ void SwCellFrame::dumpAsXmlAttributes(xmlTextWriterPtr pWriter) const void SwCellFrame::Cut() { // notification for accessibility +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() ) @@ -5607,6 +5617,7 @@ void SwCellFrame::Cut() } } } +#endif SwLayoutFrame::Cut(); } diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 90f80ba4be31..c60c0c347bcc 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hints.hxx> #include <osl/diagnose.h> #include <o3tl/safeint.hxx> @@ -2771,6 +2773,7 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( bMoveAccFrame && IsAccessibleFrame() ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -2780,6 +2783,11 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } } +#else + (void)bMoveAccFrame; + (void)aOldFrame; +#endif + return nReal; } @@ -2912,6 +2920,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) AdjustNeighbourhood( nReal - nShrink ); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( bMoveAccFrame && IsAccessibleFrame() ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -2921,6 +2930,11 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } } +#else + (void)aOldFrame; + (void)bMoveAccFrame; +#endif + if ( !bTst && (IsCellFrame() || IsColumnFrame() ? nReal : nRealDist) ) { SwPageFrame *pPage = FindPageFrame(); diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 12a4492bbec7..1592a5633935 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <sal/config.h> #include <sal/log.hxx> @@ -666,6 +668,7 @@ SwContentFrame *SwTextFrame::JoinFrame() // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph, which // is <this>, will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFoll->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -676,6 +679,8 @@ SwContentFrame *SwTextFrame::JoinFrame() this ); } } +#endif + pFoll->Cut(); SetFollow(pNxt); SwFrame::DestroyFrame(pFoll); @@ -700,6 +705,7 @@ void SwTextFrame::SplitFrame(TextFrameIndex const nTextPos) // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph, which // is <this>, will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -710,6 +716,7 @@ void SwTextFrame::SplitFrame(TextFrameIndex const nTextPos) this ); } } +#endif // If footnotes end up in pNew bz our actions, we need // to re-register them diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index ce0d6cc99c2f..8d00ce8e45d9 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hintids.hxx> #include <hints.hxx> #include <svl/ctloptions.hxx> @@ -1950,6 +1952,7 @@ void UpdateMergedParaForMove(sw::MergedPara & rMerged, * Related: fdo#56031 filter out attribute changes that don't matter for * humans/a11y to stop flooding the destination mortal with useless noise */ +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY static bool isA11yRelevantAttribute(sal_uInt16 nWhich) { return nWhich != RES_CHRATR_RSID; @@ -1963,6 +1966,7 @@ static bool hasA11yRelevantAttribute( const std::vector<sal_uInt16>& rWhichFmtAt return false; } +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY // Note: for now this overrides SwClient::SwClientNotify; the intermediary // classes still override SwClient::Modify, which should continue to work @@ -2249,6 +2253,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint) } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( isA11yRelevantAttribute( pNewUpdate->getWhichAttr() ) && hasA11yRelevantAttribute( pNewUpdate->getFmtAttrs() ) ) { @@ -2258,6 +2263,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint) pViewSh->InvalidateAccessibleParaAttrs( *this ); } } +#endif } break; case RES_OBJECTDYING: @@ -2555,6 +2561,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint) SwContentFrame::SwClientNotify(rModify, sw::LegacyModifyHint(pOld, pNew)); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (isA11yRelevantAttribute(nWhich)) { SwViewShell* pViewSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; @@ -2563,6 +2570,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint) pViewSh->InvalidateAccessibleParaAttrs( *this ); } } +#endif } break; diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 19fcadedbe4e..8fad2f39ea0e 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hintids.hxx> #include <vcl/svapp.hxx> #include <svl/itemiter.hxx> @@ -1387,9 +1389,11 @@ SwRect SwTextFrame::AutoSpell_(SwTextNode & rNode, sal_Int32 nActPos) aRect = lcl_CalculateRepaintRect(*this, rNode, nChgStart, nChgEnd); // fdo#71558 notify misspelled word to accessibility +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pViewSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if( pViewSh ) pViewSh->InvalidateAccessibleParaAttrs( *this ); +#endif } pNode->GetWrong()->SetInvalid( nInvStart, nInvEnd ); diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 4a19062f4db6..bd8dafbf17f2 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <pagepreviewlayout.hxx> #include <prevwpage.hxx> @@ -1127,6 +1129,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools: // OD 17.11.2003 #i22014# - no update of accessible preview, if a new // print preview layout is created during paint. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( !mbNewLayoutDuringPaint ) { // update at accessibility interface @@ -1136,6 +1139,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools: mrLayoutRootFrame.GetPageByPageNum( mnSelectedPageNum ), maWinSize ); } +#endif pOutputDev->SetMapMode( aSavedMapMode ); mrParentViewShell.maVisArea.Clear(); diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 3cadcfd3556a..35dda1b12921 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <rootfrm.hxx> #include <pagefrm.hxx> #include <viewimp.hxx> @@ -97,7 +99,9 @@ SwViewShellImp::SwViewShellImp( SwViewShell *pParent ) : SwViewShellImp::~SwViewShellImp() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY m_pAccessibleMap.reset(); +#endif m_pPagePreviewLayout.reset(); @@ -283,6 +287,7 @@ void SwViewShellImp::InitPagePreviewLayout() m_pPagePreviewLayout.reset( new SwPagePreviewLayout( *m_pShell, *(m_pShell->GetLayout()) ) ); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY void SwViewShellImp::UpdateAccessible() { // We require a layout and an XModel to be accessible. @@ -454,5 +459,6 @@ void SwViewShellImp::FireAccessibleEvents() if( IsAccessible() ) GetAccessibleMap().FireEvents(); } +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 2c4d195ba3eb..8d5c33c37056 100644 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <tools/fract.hxx> #include <osl/diagnose.h> #include <viewsh.hxx> @@ -37,7 +39,11 @@ SwPagePreviewLayout* SwViewShell::PagePreviewLayout() void SwViewShell::ShowPreviewSelection( sal_uInt16 nSelPage ) { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY Imp()->InvalidateAccessiblePreviewSelection( nSelPage ); +#else + (void)nSelPage; +#endif } // adjust view options for page preview diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index a28f3dc2df52..9ea7527e5cf2 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <com/sun/star/accessibility/XAccessible.hpp> #include <sfx2/viewfrm.hxx> #include <sfx2/progress.hxx> @@ -247,10 +249,12 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) UISizeNotify(); // tdf#101464 print preview may generate events if another view shell // performs layout... +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (IsPreview() && Imp()->IsAccessible()) { Imp()->FireAccessibleEvents(); } +#endif return; } @@ -451,8 +455,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) UISizeNotify(); ++mnStartAction; +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( Imp()->IsAccessible() ) Imp()->FireAccessibleEvents(); +#endif } void SwViewShell::ImplStartAction() @@ -1233,8 +1239,10 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) pPostItMgr->CorrectPositions(); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( Imp()->IsAccessible() ) Imp()->UpdateAccessible(); +#endif } bool SwViewShell::SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const tools::Rectangle *pRect ) @@ -2385,8 +2393,10 @@ void SwViewShell::SetReadonlyOption(bool bSet) } else if ( GetWin() ) GetWin()->Invalidate(); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( Imp()->IsAccessible() ) Imp()->InvalidateAccessibleEditableState( false ); +#endif } void SwViewShell::SetPDFExportOption(bool bSet) @@ -2439,6 +2449,7 @@ bool SwViewShell::IsNewLayout() const return GetLayout()->IsNewLayout(); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY uno::Reference< css::accessibility::XAccessible > SwViewShell::CreateAccessible() { uno::Reference< css::accessibility::XAccessible > xAcc; @@ -2542,6 +2553,7 @@ void SwViewShell::ApplyAccessibilityOptions(SvtAccessibilityOptions const & rAcc mpOpt->SetSelectionInReadonly(rAccessibilityOptions.IsSelectionInReadonly()); } } +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY ShellResource* SwViewShell::GetShellRes() { diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 0590fea71d35..75ca82c4662f 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include "docxexport.hxx" #include "docxexportfilter.hxx" #include "docxattributeoutput.hxx" @@ -385,6 +387,10 @@ OString DocxExport::OutputChart( uno::Reference< frame::XModel > const & xModel, m_rFilter.openFragmentStreamWithSerializer( aFileName, "application/vnd.openxmlformats-officedocument.drawingml.chart+xml" ); +#ifndef ENABLE_WASM_STRIP_CHART + // WASM_CHART change + // TODO: With Chart extracted this cannot really happen since + // no Chart could've been added at all oox::drawingml::ChartExport aChartExport(XML_w, pChartFS, xModel, &m_rFilter, oox::drawingml::DOCUMENT_DOCX); css::uno::Reference<css::util::XModifiable> xModifiable(xModel, css::uno::UNO_QUERY); const bool bOldModified = xModifiable && xModifiable->isModified(); @@ -393,6 +399,9 @@ OString DocxExport::OutputChart( uno::Reference< frame::XModel > const & xModel, // tdf#134973: the model could get modified: e.g., calling XChartDocument::getSubTitle(), // which creates the object if absent, and sets the modified state. xModifiable->setModified(bOldModified); +#else + (void)xModel; +#endif return OUStringToOString( sId, RTL_TEXTENCODING_UTF8 ); } diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 3074d96f7bab..080a5c3fb418 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -18,6 +18,7 @@ */ #include <config_features.h> +#include <config_wasm_strip.h> #include <comphelper/propertysequence.hxx> #include <sfx2/dispatch.hxx> @@ -944,13 +945,10 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con { m_bAuthorInitialised = false; } - else if ( pBrdCst == m_pColorConfig.get() || pBrdCst == m_pAccessibilityOptions.get() ) + else if ( pBrdCst == m_pColorConfig.get() ) { - bool bAccessibility = false; if( pBrdCst == m_pColorConfig.get() ) SwViewOption::ApplyColorConfigValues(*m_pColorConfig); - else - bAccessibility = true; //invalidate all edit windows SfxViewShell* pViewShell = SfxViewShell::GetFirst(); @@ -962,19 +960,38 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con dynamic_cast< const SwPagePreview *>( pViewShell ) != nullptr || dynamic_cast< const SwSrcView *>( pViewShell ) != nullptr) { - if(bAccessibility) - { - if(auto pSwView = dynamic_cast<SwView *>( pViewShell )) - pSwView->ApplyAccessibilityOptions(*m_pAccessibilityOptions); - else if(auto pPagePreview = dynamic_cast<SwPagePreview *>( pViewShell )) - pPagePreview->ApplyAccessibilityOptions(*m_pAccessibilityOptions); - } pViewShell->GetWindow()->Invalidate(); } } pViewShell = SfxViewShell::GetNext( *pViewShell ); } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY + else if ( pBrdCst == m_pAccessibilityOptions.get() ) + { + //set Accessibility options + SfxViewShell* pViewShell = SfxViewShell::GetFirst(); + while(pViewShell) + { + if(pViewShell->GetWindow()) + { + auto pSwView = dynamic_cast<SwView *>( pViewShell ); + auto pPagePreview = dynamic_cast<SwPagePreview *>( pViewShell ); + + if(pSwView) + pSwView->ApplyAccessibilityOptions(*m_pAccessibilityOptions); + else if(pPagePreview) + pPagePreview->ApplyAccessibilityOptions(*m_pAccessibilityOptions); + + if(pSwView || pPagePreview || dynamic_cast< const SwSrcView *>( pViewShell ) != nullptr) + { + pViewShell->GetWindow()->Invalidate(); + } + } + pViewShell = SfxViewShell::GetNext( *pViewShell ); + } + } +#endif else if( pBrdCst == m_pCTLOptions.get() ) { const SfxObjectShell* pObjSh = SfxObjectShell::GetFirst(); diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 654ff05a0650..492c151f58e5 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <memory> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> @@ -1529,9 +1531,13 @@ void SwDocShell::MakeByExample( const OUString &rName, SfxStyleFamily nFamily, sfx::AccessibilityIssueCollection SwDocShell::runAccessibilityCheck() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY sw::AccessibilityCheck aCheck(m_xDoc.get()); aCheck.check(); return aCheck.getIssueCollection(); +#else + return sfx::AccessibilityIssueCollection(); +#endif } std::set<Color> SwDocShell::GetDocColors() diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index e354a62204a8..aa8479240d6f 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <AnnotationWin.hxx> #include <PostItMgr.hxx> @@ -121,9 +123,11 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, mpShadow->setVisible(false); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY mrMgr.ConnectSidebarWinToFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), mrSidebarItem.GetFormatField(), *this ); +#endif if (SupportsDoubleBuffering()) // When double-buffering, allow parents to paint on our area. That's @@ -141,8 +145,10 @@ void SwAnnotationWin::dispose() if (IsDisposed()) return; +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY mrMgr.DisconnectSidebarWinFromFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), *this ); +#endif Disable(); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index b2604377e2e0..8f3e2e982bc4 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <sal/config.h> #include <cstddef> @@ -1367,15 +1369,18 @@ bool SwAnnotationWin::IsScrollbarVisible() const void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem ) { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY const bool bAnchorChanged = mpAnchorFrame != rSidebarItem.maLayoutInfo.mpAnchorFrame; if ( bAnchorChanged ) { mrMgr.DisconnectSidebarWinFromFrame( *mpAnchorFrame, *this ); } +#endif mrSidebarItem = rSidebarItem; mpAnchorFrame = mrSidebarItem.maLayoutInfo.mpAnchorFrame; +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (mxSidebarWinAccessible) mxSidebarWinAccessible->ChangeSidebarItem( mrSidebarItem ); @@ -1385,10 +1390,12 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem ) mrSidebarItem.GetFormatField(), *this ); } +#endif } css::uno::Reference< css::accessibility::XAccessible > SwAnnotationWin::CreateAccessible() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY // This is rather dodgy code. Normally in CreateAccessible, if we want a custom // object, we return a custom object, but we do no override the default toolkit // window peer. @@ -1396,6 +1403,7 @@ css::uno::Reference< css::accessibility::XAccessible > SwAnnotationWin::CreateAc mxSidebarWinAccessible = new SidebarWinAccessible( *this, mrView.GetWrtShell(), mrSidebarItem ); +#endif return mxSidebarWinAccessible; } diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index d8b79c6e9d7e..1c8187460ada 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <boost/property_tree/json_parser.hpp> #include <PostItMgr.hxx> @@ -2400,6 +2402,7 @@ void SwPostItMgr::ToggleInsModeOnActiveSidebarWin() } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY void SwPostItMgr::ConnectSidebarWinToFrame( const SwFrame& rFrame, const SwFormatField& rFormatField, SwAnnotationWin& rSidebarWin ) @@ -2430,6 +2433,7 @@ void SwPostItMgr::DisconnectSidebarWinFromFrame( const SwFrame& rFrame, } } } +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY bool SwPostItMgr::HasFrameConnectedSidebarWins( const SwFrame& rFrame ) { diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 342f52086fc8..dcca9c390b4a 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include "SidebarTxtControl.hxx" #include <docsh.hxx> @@ -120,7 +122,9 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) pDrawingArea->set_cursor(PointerStyle::Text); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY InitAccessible(); +#endif } void SidebarTextControl::SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 446d2faa5405..b8cab944d285 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <swtypes.hxx> #include <hintids.hxx> #include <com/sun/star/accessibility/XAccessible.hpp> @@ -5286,14 +5288,18 @@ void SwEditWin::GetFocus() { m_rView.GotFocus(); Window::GetFocus(); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY m_rView.GetWrtShell().InvalidateAccessibleFocus(); +#endif } } void SwEditWin::LoseFocus() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (m_rView.GetWrtShellPtr()) m_rView.GetWrtShell().InvalidateAccessibleFocus(); +#endif Window::LoseFocus(); if( m_pQuickHlpData && m_pQuickHlpData->m_bIsDisplayed ) m_pQuickHlpData->Stop( m_rView.GetWrtShell() ); @@ -5985,6 +5991,7 @@ void SwEditWin::SetChainMode( bool bOn ) uno::Reference< css::accessibility::XAccessible > SwEditWin::CreateAccessible() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SolarMutexGuard aGuard; // this should have happened already!!! SwWrtShell *pSh = m_rView.GetWrtShellPtr(); OSL_ENSURE( pSh, "no writer shell, no accessible object" ); @@ -5994,6 +6001,9 @@ uno::Reference< css::accessibility::XAccessible > SwEditWin::CreateAccessible() xAcc = pSh->CreateAccessible(); return xAcc; +#else + return nullptr; +#endif } void QuickHelpData::Move( QuickHelpData& rCpy ) diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 760f32a59e53..0f22c6924ad4 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -18,6 +18,7 @@ */ #include <config_features.h> +#include <config_wasm_strip.h> #include <sal/config.h> @@ -2744,6 +2745,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) } } break; +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY case SID_ACCESSIBILITY_CHECK: { sw::AccessibilityCheck aCheck(rSh.GetDoc()); @@ -2752,6 +2754,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) aDialog.run(); } break; +#endif default:OSL_FAIL("wrong Dispatcher (basesh.cxx)"); } if(!bDone) diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 9ca718e016f6..716ad499455b 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <sfx2/objface.hxx> #include <vcl/help.hxx> #include <vcl/commandevent.hxx> @@ -1119,7 +1121,9 @@ void SwPagePreview::Init() aOpt.SetHideWhitespaceMode( false ); GetViewShell()->ApplyViewOptions( aOpt ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY GetViewShell()->ApplyAccessibilityOptions(SW_MOD()->GetAccessibilityOptions()); +#endif // adjust view shell option to the same as for print SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false); @@ -1811,7 +1815,7 @@ uno::Reference< css::accessibility::XAccessible > SwPagePreviewWin::CreateAccessible() { SolarMutexGuard aGuard; // this should have happened already!!! - +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE( GetViewShell() != nullptr, "We need a view shell" ); css::uno::Reference< css::accessibility::XAccessible > xAcc = GetAccessible( false ); if (xAcc.is()) @@ -1823,6 +1827,7 @@ uno::Reference< css::accessibility::XAccessible > css::uno::Reference< css::accessibility::XAccessible > xAccPreview = mpViewShell->CreateAccessiblePreview(); SetAccessible(xAccPreview); } +#endif return GetAccessible( false ); } diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 5612191cc77a..1b5972cd1281 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -18,6 +18,7 @@ */ #include <config_features.h> +#include <config_wasm_strip.h> #include <stdlib.h> #include <hintids.hxx> @@ -966,7 +967,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_pWrtShell->SetUIOptions( aUsrPref ); m_pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY m_pWrtShell->ApplyAccessibilityOptions(SW_MOD()->GetAccessibilityOptions()); +#endif if( m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpField() ) { diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 01bed0a3f35b..4e260ec3e33c 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -18,6 +18,7 @@ */ #include <config_features.h> +#include <config_wasm_strip.h> #include <SwSpellDialogChildWindow.hxx> #include <svl/eitem.hxx> @@ -115,11 +116,14 @@ view::XSelectionSupplier* SwView::GetUNOObject() void SwView::ApplyAccessibilityOptions(SvtAccessibilityOptions const & rAccessibilityOptions) { +#ifdef ENABLE_WASM_STRIP_ACCESSIBILITY + (void)rAccessibilityOptions; +#else m_pWrtShell->ApplyAccessibilityOptions(rAccessibilityOptions); //to enable the right state of the selection cursor in readonly documents if(GetDocShell()->IsReadOnly()) m_pWrtShell->ShowCursor(); - +#endif } void SwView::SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem> const & rConfigItem) |