summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <Armin.Le.Grand@me.com>2021-04-30 17:26:41 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2022-01-20 12:28:54 +0100
commit02140554ee1d70b219a42546191e2219d58be4b0 (patch)
tree3dd419dbdd0c23676c7f749bd8a83d09ad26c8bd /sw
parent02634fb7c7e8dc613ffc3717bb244f85cf81a7c6 (diff)
WASM --enable-wasm-strip now skips lots of LO code
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/Library_sw.mk15
-rw-r--r--sw/source/core/crsr/crsrsh.cxx10
-rw-r--r--sw/source/core/docnode/ndsect.cxx6
-rw-r--r--sw/source/core/docnode/ndtbl.cxx6
-rw-r--r--sw/source/core/docnode/node.cxx6
-rw-r--r--sw/source/core/draw/dview.cxx12
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx4
-rw-r--r--sw/source/core/layout/fly.cxx18
-rw-r--r--sw/source/core/layout/flylay.cxx10
-rw-r--r--sw/source/core/layout/frmtool.cxx12
-rw-r--r--sw/source/core/layout/layact.cxx3
-rw-r--r--sw/source/core/layout/pagechg.cxx8
-rw-r--r--sw/source/core/layout/sectfrm.cxx6
-rw-r--r--sw/source/core/layout/ssfrm.cxx4
-rw-r--r--sw/source/core/layout/tabfrm.cxx21
-rw-r--r--sw/source/core/layout/wsfrm.cxx14
-rw-r--r--sw/source/core/text/frmform.cxx7
-rw-r--r--sw/source/core/text/txtfrm.cxx8
-rw-r--r--sw/source/core/txtnode/txtedt.cxx4
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx4
-rw-r--r--sw/source/core/view/viewimp.cxx6
-rw-r--r--sw/source/core/view/viewpg.cxx6
-rw-r--r--sw/source/core/view/viewsh.cxx12
-rw-r--r--sw/source/filter/ww8/docxexport.cxx9
-rw-r--r--sw/source/uibase/app/apphdl.cxx39
-rw-r--r--sw/source/uibase/app/docst.cxx6
-rw-r--r--sw/source/uibase/docvw/AnnotationWin.cxx7
-rw-r--r--sw/source/uibase/docvw/AnnotationWin2.cxx8
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx4
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx10
-rw-r--r--sw/source/uibase/shells/basesh.cxx1
-rw-r--r--sw/source/uibase/uiview/pview.cxx7
-rw-r--r--sw/source/uibase/uiview/view.cxx3
-rw-r--r--sw/source/uibase/uiview/view0.cxx6
35 files changed, 282 insertions, 24 deletions
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 46f601c65d3d..daa08fb9f3f7 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -94,11 +94,8 @@ $(eval $(call gb_Library_use_externals,sw,\
libxml2 \
))
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
$(eval $(call gb_Library_add_exception_objects,sw,\
- sw/source/core/SwNumberTree/SwNodeNum \
- sw/source/core/SwNumberTree/SwNumberTree \
- sw/source/core/access/AccessibilityCheck \
- sw/source/core/access/AccessibilityIssue \
sw/source/core/access/acccell \
sw/source/core/access/acccontext \
sw/source/core/access/accdoc \
@@ -125,6 +122,15 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/access/acctextframe \
sw/source/core/access/parachangetrackinginfo \
sw/source/core/access/textmarkuphelper \
+ sw/source/uibase/docvw/SidebarWinAcc \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,sw,\
+ sw/source/core/SwNumberTree/SwNodeNum \
+ sw/source/core/SwNumberTree/SwNumberTree \
+ sw/source/core/access/AccessibilityCheck \
+ sw/source/core/access/AccessibilityIssue \
sw/source/core/attr/BorderCacheOwner \
sw/source/core/attr/calbck \
sw/source/core/attr/cellatr \
@@ -626,7 +632,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/uibase/docvw/PostItMgr \
sw/source/uibase/docvw/ShadowOverlayObject \
sw/source/uibase/docvw/SidebarTxtControl \
- sw/source/uibase/docvw/SidebarWinAcc \
sw/source/uibase/docvw/HeaderFooterWin \
sw/source/uibase/docvw/OutlineContentVisibilityWin \
sw/source/uibase/docvw/edtdd \
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index ae7b2c81133d..e4b1d55b1d9e 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>
@@ -1545,6 +1547,7 @@ static void lcl_CheckHiddenPara( SwPosition& rPos )
rPos = SwPosition( aTmp, SwIndex( pTextNd, 0 ) );
}
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
namespace {
// #i27301# - helper class that notifies the accessibility about invalid text
@@ -1566,6 +1569,7 @@ class SwNotifyAccAboutInvalidTextSelections
};
}
+#endif
void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
{
@@ -1579,7 +1583,9 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
return; // if not then no update
}
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SwNotifyAccAboutInvalidTextSelections aInvalidateTextSelections( *this );
+#endif
if ( m_bIgnoreReadonly )
{
@@ -1747,8 +1753,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
m_pVisibleCursor->Show(); // show again
}
m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if (Imp()->IsAccessible())
Imp()->InvalidateAccessibleCursorPosition( pTableFrame );
+#endif
return;
}
}
@@ -2019,8 +2027,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint
+#if !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 6c1afc01070e..1087f9eebfa4 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 <libxml/xmlwriter.h>
#include <hintids.hxx>
@@ -1117,6 +1119,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if ( pNew->IsTextFrame() )
{
SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() );
@@ -1130,6 +1133,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx)
pPrev ? pPrev->DynCastTextFrame() : nullptr );
}
}
+#endif
pNew = pSct;
}
@@ -1145,6 +1149,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if ( pNew->IsTextFrame() )
{
SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() );
@@ -1158,6 +1163,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx)
pPrev ? pPrev->DynCastTextFrame() : nullptr );
}
}
+#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 1b0e09f9b0f2..302fbd007b8d 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>
@@ -2427,6 +2429,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
{
SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() );
if ( pViewShell && pViewShell->GetLayout() &&
@@ -2439,6 +2442,7 @@ void SwTableNode::MakeOwnFrames(SwNodeIndex* pIdxBehind)
pPrev ? pPrev->DynCastTextFrame() : nullptr );
}
}
+#endif
pNew->RegistFlys();
}
}
@@ -2464,6 +2468,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
{
SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
if ( pViewShell && pViewShell->GetLayout() &&
@@ -2476,6 +2481,7 @@ void SwTableNode::DelFrames(SwRootFrame const*const pLayout)
pPrev ? pPrev->DynCastTextFrame() : nullptr );
}
}
+#endif
if (pFrame->GetUpper())
pFrame->Cut();
SwFrame::DestroyFrame(pFrame);
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index f0ee2aad5b6c..1995377f9a51 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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if ( pNew->IsTextFrame() )
{
SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() );
@@ -1398,6 +1401,7 @@ void SwContentNode::MakeFramesForAdjacentContentNode(SwContentNode& rNode)
pPrev ? pPrev->DynCastTextFrame() : nullptr );
}
}
+#endif
}
}
@@ -1482,6 +1486,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
if ( pViewShell && pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
@@ -1492,6 +1497,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout)
pNext ? pNext->DynCastTextFrame() : nullptr,
pPrev ? pPrev->DynCastTextFrame() : nullptr );
}
+#endif
}
if( pFrame->IsFollow() )
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 12b955d04ee5..b7e0aa638839 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 <svtools/optionsdrawinglayer.hxx>
#include <svx/svdpage.hxx>
@@ -379,6 +381,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
nNewPos );
pDrawPage->RecalcObjOrdNums();
// adjustments for accessibility API
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if ( auto pTmpFlyFrame = pAnchoredObj->DynCastFlyFrame() )
{
m_rImp.DisposeAccessibleFrame( pTmpFlyFrame );
@@ -389,6 +392,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true);
m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() );
}
+#endif
}
aAnchoredObjs.pop_back();
}
@@ -412,6 +416,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
nTmpNewPos );
pDrawPage->RecalcObjOrdNums();
// adjustments for accessibility API
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if ( auto pTmpFlyFrame = pAnchoredObj->DynCastFlyFrame() )
{
m_rImp.DisposeAccessibleFrame( pTmpFlyFrame );
@@ -422,6 +427,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true);
m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() );
}
+#endif
}
aAnchoredObjs.pop_back();
}
@@ -589,8 +595,10 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos,
if ( auto pFlyFrame = pMovedAnchoredObj->DynCastFlyFrame() )
{
// adjustments for accessibility API
+#if !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;
@@ -617,6 +625,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos,
// collect 'child' object
aMovedChildObjs.push_back( pTmpObj );
// adjustments for accessibility API
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if ( auto pFlyDrawObj = dynamic_cast<SwVirtFlyDrawObj *>( pTmpObj ) )
{
const SwFlyFrame *pTmpFlyFrame = pFlyDrawObj->GetFlyFrame();
@@ -628,6 +637,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos,
m_rImp.DisposeAccessibleObj(pTmpObj, true);
m_rImp.AddAccessibleObj( pTmpObj );
}
+#endif
}
else
{
@@ -641,12 +651,14 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos,
} while ( ( bMovedForward && i < ( nObjCount - aMovedChildObjs.size() ) ) ||
( !bMovedForward && i > ( nNewPos + aMovedChildObjs.size() ) ) );
}
+#if !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 3e37961dffd6..996aa1f3a5bb 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
+#if !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 b4b98f6e76cc..28cd55a2dbcc 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>
@@ -262,6 +264,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( IsAccessibleFrame() && GetFormat() && (IsFlyInContentFrame() || !GetAnchorFrame()) )
{
SwRootFrame *pRootFrame = getRootFrame();
@@ -276,6 +279,7 @@ void SwFlyFrame::DestroyImpl()
}
}
}
+#endif
if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() )
{
@@ -485,6 +489,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
}
// invalidate accessible relation set (accessibility wrapper)
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell();
if( pSh )
{
@@ -492,6 +497,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 )
@@ -531,6 +537,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
pFollow->GetFormat()->GetDoc(), ++nIndex );
// invalidate accessible relation set (accessibility wrapper)
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell();
if( pSh )
{
@@ -538,6 +545,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 )
@@ -794,12 +802,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() );
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( pSh )
{
SwRootFrame* pLayout = getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
pSh->Imp()->InvalidateAccessibleEditableState( true, this );
}
+#endif
}
break;
case RES_COL:
@@ -977,6 +987,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
rIDDMA.GetHeavenId() :
rIDDMA.GetHellId();
GetVirtDrawObj()->SetLayer( nId );
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( pSh )
{
SwRootFrame* pLayout = getRootFrame();
@@ -986,6 +997,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
pSh->Imp()->AddAccessibleFrame( this );
}
}
+#endif
// #i28701# - perform reorder of object lists
// at anchor frame and at page frame.
rInvFlags |= SwFlyFrameInvFlags::UpdateObjInSortedList;
@@ -2204,6 +2216,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove )
pPage->RemoveFlyFromPage( pToRemove );
}
// #i73201#
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
else
{
if ( pToRemove->IsAccessibleFrame() &&
@@ -2221,6 +2234,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove )
}
}
}
+#endif
m_pDrawObjs->Remove(*pToRemove);
if (!m_pDrawObjs->size())
@@ -2302,6 +2316,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj )
}
// Notify accessible layout.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SwViewShell* pSh = getRootFrame()->GetCurrShell();
if( pSh )
{
@@ -2311,6 +2326,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj )
pSh->Imp()->AddAccessibleObj( _rNewObj.GetDrawObj() );
}
}
+#endif
assert(!m_pDrawObjs || m_pDrawObjs->is_sorted());
}
@@ -2318,6 +2334,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj )
void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj )
{
// Notify accessible layout.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SwViewShell* pSh = getRootFrame()->GetCurrShell();
if( pSh )
{
@@ -2325,6 +2342,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 44083e8a5001..cb490c366a9b 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>
@@ -846,6 +848,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( GetUpper() &&
static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() &&
static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() )
@@ -853,6 +856,7 @@ void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew )
static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp()
->AddAccessibleFrame( pNew );
}
+#endif
}
// #i28701# - correction: consider also drawing objects
@@ -919,6 +923,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( GetUpper() &&
static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() &&
static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() )
@@ -926,6 +931,7 @@ void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove )
static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp()
->DisposeAccessibleFrame( pToRemove, true );
}
+#endif
// #i28701# - use new method <SetPageFrame(..)>
pToRemove->SetPageFrame( nullptr );
@@ -955,6 +961,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( GetUpper() &&
static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() &&
static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() )
@@ -962,6 +969,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 )
@@ -991,6 +999,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( GetUpper() &&
static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() &&
static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() )
@@ -998,6 +1007,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 b2ac45b5ead9..ee50dcc7cd12 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>
@@ -264,6 +266,7 @@ void SwFrameNotify::ImplDestroy()
if ( bAbsP || bPrtP || bChgWidth || bChgHeight ||
bPrtWidth || bPrtHeight || bChgFlyBasePos )
{
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( mpFrame->IsAccessibleFrame() )
{
SwRootFrame *pRootFrame = mpFrame->getRootFrame();
@@ -273,6 +276,7 @@ void SwFrameNotify::ImplDestroy()
pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( mpFrame, maFrame );
}
}
+#endif
// Notification of anchored objects
if ( mpFrame->GetDrawObjs() )
@@ -392,6 +396,7 @@ void SwFrameNotify::ImplDestroy()
}
}
}
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
else if( mpFrame->IsTextFrame() && mbValidSize != mpFrame->isFrameAreaSizeValid() )
{
SwRootFrame *pRootFrame = mpFrame->getRootFrame();
@@ -401,6 +406,7 @@ void SwFrameNotify::ImplDestroy()
pRootFrame->GetCurrShell()->Imp()->InvalidateAccessibleFrameContent( mpFrame );
}
}
+#endif
// #i9046# Automatic frame width
SwFlyFrame* pFly = nullptr;
@@ -1600,6 +1606,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if ( pFrame->IsTextFrame() )
{
SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
@@ -1623,6 +1630,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 );
@@ -1696,6 +1704,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
{
SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
// no notification, if <SwViewShell> is in construction
@@ -1711,6 +1720,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
pPrev ? pPrev->DynCastTextFrame() : nullptr );
}
}
+#endif
if ( bObjsDirect && !pTable->empty() )
static_cast<SwTabFrame*>(pFrame)->RegistFlys();
// OD 12.08.2003 #i17969# - consider horizontal/vertical layout
@@ -1813,6 +1823,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
{
SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
// no notification, if <SwViewShell> is in construction
@@ -1828,6 +1839,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
pPrev ? pPrev->DynCastTextFrame() : nullptr );
}
}
+#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 047a7ecf7a12..a21a16f64afe 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>
@@ -2390,8 +2391,10 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) :
m_pImp->GetShell()->EnableSmooth( true );
+#if !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 fe84f956a35c..e5e62d0b47bd 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>
@@ -2067,23 +2069,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:
+#if !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 9b33ceeadd63..ce0c7a813f51 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>
@@ -202,6 +204,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
{
SwViewShell* pViewShell( getRootFrame()->GetCurrShell() );
if ( pViewShell && pViewShell->GetLayout() &&
@@ -214,6 +217,7 @@ void SwSectionFrame::DelEmpty( bool bRemove )
pPrev ? pPrev->DynCastTextFrame() : nullptr );
}
}
+#endif
Cut_( bRemove );
}
SwSectionFrame *pMaster = IsFollow() ? FindMaster() : nullptr;
@@ -2718,11 +2722,13 @@ void SwSectionFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pN
break;
case RES_PROTECT:
+#if !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 486d67bb9e95..c7d11b3cabed 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.
+#if !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 95388db5c9ac..47a71e8bf42c 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>
@@ -3231,8 +3233,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());
@@ -3261,12 +3261,15 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
aRectFnSet.AddBottom( aFrm, nDist );
}
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SwRootFrame *pRootFrame = getRootFrame();
if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
pRootFrame->GetCurrShell() )
{
+ SwRect aOldFrame( getFrameArea() );
pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame );
}
+#endif
}
}
@@ -4582,9 +4585,10 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight )
SwFrame *pFrame = Lower();
if ( bHeight )
{
- SwRootFrame *pRootFrame = getRootFrame();
SwRectFnSet aRectFnSet(this);
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SwRect aOldFrame;
+#endif
while ( pFrame )
{
@@ -4651,7 +4655,9 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight )
const tools::Long nDiff = nSumRowHeight - aRectFnSet.GetHeight(pToAdjust->getFrameArea());
if ( nDiff )
{
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
aOldFrame = pToAdjust->getFrameArea();
+#endif
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pToAdjust);
aRectFnSet.AddBottom( aFrm, nDiff );
pNotify = pToAdjust;
@@ -4659,8 +4665,11 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight )
if ( pNotify )
{
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
+ SwRootFrame *pRootFrame = getRootFrame();
if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() )
pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pNotify, aOldFrame );
+#endif
pNotify->InvalidatePrt_();
}
@@ -4931,12 +4940,14 @@ void SwCellFrame::DestroyImpl()
{
// At this stage the lower frames aren't destroyed already,
// therefore we have to do a recursive dispose.
+#if !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() )
@@ -5551,12 +5562,14 @@ void SwCellFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint)
InvalidatePrt();
}
}
+#if !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);
@@ -5698,6 +5711,7 @@ void SwCellFrame::dumpAsXmlAttributes(xmlTextWriterPtr pWriter) const
void SwCellFrame::Cut()
{
// notification for accessibility
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
{
SwRootFrame *pRootFrame = getRootFrame();
if( pRootFrame && pRootFrame->IsAnyShellAccessible() )
@@ -5709,6 +5723,7 @@ void SwCellFrame::Cut()
}
}
}
+#endif
SwLayoutFrame::Cut();
}
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index dea716d803d6..13c8bae2e618 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>
@@ -2785,6 +2787,7 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
}
}
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( bMoveAccFrame && IsAccessibleFrame() )
{
SwRootFrame *pRootFrame = getRootFrame();
@@ -2794,6 +2797,11 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame );
}
}
+#else
+ (void)bMoveAccFrame;
+ (void)aOldFrame;
+#endif
+
return nReal;
}
@@ -2929,6 +2937,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
AdjustNeighbourhood( nReal - nShrink );
}
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( bMoveAccFrame && IsAccessibleFrame() )
{
SwRootFrame *pRootFrame = getRootFrame();
@@ -2938,6 +2947,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 93b6e2b272d8..2ad1e648874b 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>
@@ -663,6 +665,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
{
SwViewShell* pViewShell( pFoll->getRootFrame()->GetCurrShell() );
if ( pViewShell && pViewShell->GetLayout() &&
@@ -674,6 +677,8 @@ SwContentFrame *SwTextFrame::JoinFrame()
this );
}
}
+#endif
+
pFoll->Cut();
SetFollow(pNxt);
SwFrame::DestroyFrame(pFoll);
@@ -698,6 +703,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.
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
{
SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() );
if ( pViewShell && pViewShell->GetLayout() &&
@@ -709,6 +715,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 eda5507c1ef7..b592f179226f 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>
@@ -1949,6 +1951,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
*/
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
static bool isA11yRelevantAttribute(sal_uInt16 nWhich)
{
return nWhich != RES_CHRATR_RSID;
@@ -1962,6 +1965,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)
}
}
+#if !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));
}
+#if !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 f4d43feb3cdc..f68518148749 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>
@@ -1400,9 +1402,11 @@ SwRect SwTextFrame::AutoSpell_(SwTextNode & rNode, sal_Int32 nActPos)
aRect = lcl_CalculateRepaintRect(*this, rNode, nChgStart, nChgEnd);
// fdo#71558 notify misspelled word to accessibility
+#if !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 1dac62197f13..5fc740ebfda9 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.
+#if !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 f1b2c2531897..d6bf3833e2fb 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()
{
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
m_pAccessibleMap.reset();
+#endif
m_pPagePreviewLayout.reset();
@@ -320,6 +324,7 @@ void SwViewShellImp::InitPagePreviewLayout()
m_pPagePreviewLayout.reset( new SwPagePreviewLayout( *m_pShell, *(m_pShell->GetLayout()) ) );
}
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
void SwViewShellImp::UpdateAccessible()
{
// We require a layout and an XModel to be accessible.
@@ -491,5 +496,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..4d2385483c92 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 )
{
+#if !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 1c5981c08a56..bb412cc25098 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -18,6 +18,8 @@
*/
#include <officecfg/Office/Common.hxx>
+#include <config_wasm_strip.h>
+
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <sfx2/viewfrm.hxx>
#include <sfx2/progress.hxx>
@@ -251,10 +253,12 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
UISizeNotify();
// tdf#101464 print preview may generate events if another view shell
// performs layout...
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if (IsPreview() && Imp()->IsAccessible())
{
Imp()->FireAccessibleEvents();
}
+#endif
return;
}
@@ -459,8 +463,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
UISizeNotify();
++mnStartAction;
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( Imp()->IsAccessible() )
Imp()->FireAccessibleEvents();
+#endif
}
void SwViewShell::ImplStartAction()
@@ -1334,8 +1340,10 @@ void SwViewShell::VisPortChgd( const SwRect &rRect)
if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
pPostItMgr->CorrectPositions();
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( Imp()->IsAccessible() )
Imp()->UpdateAccessible();
+#endif
}
bool SwViewShell::SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const tools::Rectangle *pRect )
@@ -2491,8 +2499,10 @@ void SwViewShell::SetReadonlyOption(bool bSet)
}
else if ( GetWin() )
GetWin()->Invalidate();
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if( Imp()->IsAccessible() )
Imp()->InvalidateAccessibleEditableState( false );
+#endif
}
void SwViewShell::SetPDFExportOption(bool bSet)
@@ -2545,6 +2555,7 @@ bool SwViewShell::IsNewLayout() const
return GetLayout()->IsNewLayout();
}
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
uno::Reference< css::accessibility::XAccessible > SwViewShell::CreateAccessible()
{
uno::Reference< css::accessibility::XAccessible > xAcc;
@@ -2648,6 +2659,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 5dcb89e89ea0..c5518afa822f 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" );
+#if !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 f5d537b8974a..8042ed313605 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -19,6 +19,7 @@
#include <config_features.h>
#include <config_fuzzers.h>
+#include <config_wasm_strip.h>
#include <comphelper/propertysequence.hxx>
#include <sfx2/dispatch.hxx>
@@ -965,13 +966,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();
@@ -983,19 +981,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 );
}
}
+#if !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 44e42d6f58c3..857850f1a55d 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>
@@ -1561,9 +1563,13 @@ void SwDocShell::MakeByExample( const OUString &rName, SfxStyleFamily nFamily,
sfx::AccessibilityIssueCollection SwDocShell::runAccessibilityCheck()
{
+#if !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 c41b7a2136a8..b7858a97350f 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>
@@ -115,9 +117,11 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
mpShadow->setVisible(false);
}
+#if !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
@@ -132,9 +136,10 @@ SwAnnotationWin::~SwAnnotationWin()
void SwAnnotationWin::dispose()
{
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
mrMgr.DisconnectSidebarWinFromFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame),
*this );
-
+#endif
Disable();
mxSidebarTextControlWin.reset();
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 6981b422ca0e..7872d02b38e7 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>
@@ -1406,15 +1408,18 @@ bool SwAnnotationWin::IsScrollbarVisible() const
void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem )
{
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
const bool bAnchorChanged = mpAnchorFrame != rSidebarItem.maLayoutInfo.mpAnchorFrame;
if ( bAnchorChanged )
{
mrMgr.DisconnectSidebarWinFromFrame( *mpAnchorFrame, *this );
}
+#endif
mrSidebarItem = rSidebarItem;
mpAnchorFrame = mrSidebarItem.maLayoutInfo.mpAnchorFrame;
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if (mxSidebarWinAccessible)
mxSidebarWinAccessible->ChangeSidebarItem( mrSidebarItem );
@@ -1424,10 +1429,12 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem )
mrSidebarItem.GetFormatField(),
*this );
}
+#endif
}
css::uno::Reference< css::accessibility::XAccessible > SwAnnotationWin::CreateAccessible()
{
+#if !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.
@@ -1435,6 +1442,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 bd8eb7c348f8..9c1963ea6108 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>
@@ -2406,6 +2408,7 @@ void SwPostItMgr::ToggleInsModeOnActiveSidebarWin()
}
}
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
void SwPostItMgr::ConnectSidebarWinToFrame( const SwFrame& rFrame,
const SwFormatField& rFormatField,
SwAnnotationWin& rSidebarWin )
@@ -2436,6 +2439,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 3ffcdf76d6ee..fecaf6aafef3 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>
@@ -125,7 +127,9 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
pDrawingArea->set_cursor(PointerStyle::Text);
+#if !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 91b4d970f5ad..859c35664fea 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>
@@ -5311,14 +5313,18 @@ void SwEditWin::GetFocus()
{
m_rView.GotFocus();
Window::GetFocus();
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
m_rView.GetWrtShell().InvalidateAccessibleFocus();
+#endif
}
}
void SwEditWin::LoseFocus()
{
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if (m_rView.GetWrtShellPtr())
m_rView.GetWrtShell().InvalidateAccessibleFocus();
+#endif
Window::LoseFocus();
if( s_pQuickHlpData && s_pQuickHlpData->m_bIsDisplayed )
s_pQuickHlpData->Stop( m_rView.GetWrtShell() );
@@ -6013,6 +6019,7 @@ void SwEditWin::SetChainMode( bool bOn )
uno::Reference< css::accessibility::XAccessible > SwEditWin::CreateAccessible()
{
+#if !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" );
@@ -6022,6 +6029,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 194af1799ba9..3e13df5ec568 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -19,6 +19,7 @@
#include <config_features.h>
#include <config_fuzzers.h>
+#include <config_wasm_strip.h>
#include <sal/config.h>
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 165c119e08bc..2ef6de717240 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>
@@ -1121,7 +1123,9 @@ void SwPagePreview::Init()
aOpt.SetHideWhitespaceMode( false );
GetViewShell()->ApplyViewOptions( aOpt );
+#if !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);
@@ -1815,7 +1819,7 @@ uno::Reference< css::accessibility::XAccessible >
SwPagePreviewWin::CreateAccessible()
{
SolarMutexGuard aGuard; // this should have happened already!!!
-
+#if !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())
@@ -1827,6 +1831,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 7500f740369b..0aeb611d5ed4 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -22,6 +22,7 @@
#include <string_view>
#include <config_features.h>
+#include <config_wasm_strip.h>
#include <stdlib.h>
#include <hintids.hxx>
@@ -973,7 +974,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
m_pWrtShell->SetUIOptions( aUsrPref );
m_pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() );
+#if !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 b9d04202d607..a1cfb72330a5 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)
{
+#if 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)