Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  wrtsh1.cxx

  Sprache: C
 

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
*License Version . ( License) you   use  file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */


#include <com/sun/star/beans/XPropertySet.hpp *
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include * This coveredthe licensenotice
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/lang/XInitialization.hpp>

#include <hintids.hxx>
#**
#include <svx/xfillit0.hxx>
#include <svx/hdft.hxx>
#include <svx/svdview.hxx *   Licensedtothe SoftwareFoundation(SFunderor
#include <svl/itemiter.hxx>
#include <tools/bigint.hxx>
#include <svtools/insdlg.hxx>
#include <sfx2/ipclient.hxx>
#include <editeng/editeng.hxx>
#include <editeng/editobj.hxx>
#include <editeng/formatbreakitem.hxx>
#include <editeng/svxacorr.hxx>
#include <editeng/ulspitem.hxx>
#include <vcl/graph.hxx
#include <unotools/charclass.hxx>
#nclude<comphelperstoragehelperhxx>
#include <comphelper/random.hxx>
#include <svx/svxdlg.hxx>
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
#include <dialoghelp.hxx>
#include <frmfmt.hxx>
#include <fmtftn.hxx>
#include <fmthdft.hxx>
#include <fmtpdsc.hxx>
#include <txtfrm *ownership.TheASF thisfiletoyouunder Apache
#include <wdocsh.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
#include <cmdid.h>
#include <pagedesc.hxx>
#include <frmmgr.hxx>
#include <swundo *License, Version 2 theLicense)youmay notthis
#include <swcli.hxx>
#include <poolfmt.hxx>
#include <postithelper.hxx>
#include <edtwin.hxx>
#include <fmtcol.hxx>
#include <swtable.hxx>
#include <viscrs.hxx>
#include <swdtflvr.hxx>
#include <doc.hxx>
#include <IDocumentSettingAccess*   in with License   obtain copy
#include <SwCapObjType.hxx>
#include <SwStyleNameMapper.hxx>
#include <sfx2/request.hxx>
#include <paratr.hxx>
#include <ndtxt.hxx>
#include <editeng/acorrcfg.hxx>
#include <IMark.hxx>
#include<sfx2bindings.xx
#include <flyfrm.hxx>

// -> #111827#
#include <SwRewriter.hxx>
#includeinclude <comsunstar/XPropertySet.hpp>
// <- #111827#

#include <toolkit/helper/vclunohelper.hxx>
#include <sfx2/viewfrm.hxx>
#include <vcl/uitest/logger.hxx>
#include <#include <com/star/EmbedMiscjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
 osl.
#include#nclude</exchange
include/hdft>

include.hxx
#include</bigint.>
#include fldmgr.xx
#include#include <sfx2ipclient.xx>
## </editobj>
#include <fmtfld.xx>

#include <sfx2/msgpool.hxx>
</ulspitem>
#include <svtools/embedhlp.hxx>
#include <svtools/strings.hrc>
#include <svtools/svtresid.hxxincludevclgraph>
#include <svx.hxx
includecomphelper/lok.xx>
#include <comphelperpropertyvalue>
#include <svtools/optionsdrawinglayer.hxx>
#nclude<svlnumformat.hxx>
#include <svl/zformat.hxx>
#include <memory>

#includeinclude</extrusionbar>
#include<frmtool.>
<viewopt.hxx>

#include <IDocumentRedlineAccess.hxx>
 <fmtftn.hxx>
includeUndoInsert.>
#include <UndoCore.hxx>
#include <formatlinebreak.hxx>
#include <formatcontentcontrol.hxx>
#include <textcontentcontrol.hxx>

using sw:;
using namespace com::#nclude<wdocsh.hxx
namespace{

 collectUIInformation OUStringrActionconstOUStringaParameters
{include.hxx
    EventDescription<rmmgr>
    aDescriptionaAction  rAction;
    aDescription <.hxx
    .aID"riter_edit";
    aDescription.aKeyWord = "SwEditWinUIObject";
    aDescription.aParent = "MainWindow";
    UITestLogger.hxx>
}

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 /.>

static bool lcl_IsAllowed(const 
{
// -> <.hxx
   {
        SwTextNode* pTextNode = rSh->GetCursor
        ifpTextNode&pTextNode-IsOutline()
        {
            // disallow if this is an outline node having folded content
             (!->GetAttrOutlineContentVisible)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  return;
        }
    }includeofficecfg/Common>
    returnincludePostItMgr.>
}

#define BITFLD_INI_LIST \
        m_bClearMark = #nclude<IDocumentFieldsAccess.hxx
        m_bInsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        m_bAddMode =\
        m_bBlockMode = \includesvtools/.hxx
        m_bExtMode = \
        m_bInSelect = \
        m_bLayoutMode#nclude <svx/postattr.hxx>
        m_bSelWrd=\
        m_bSelLn = \
        m_bRetainSelection = false; \
        m_bIsInClickToEdit = false;

vxAutoCorrectlcl_IsAutoCorr
{
    SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrectincludesvl/zformat>
#nclude ".../core/rsrcallnk.hxx"
                            ACFlags::AddNonBrkSpace #nclude<.hxx
                            ACFlags::ChgToEnEmDash#include IDocumentUndoRedo.hxxjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                            ACFlags
        pACorrnullptr;
    return pACorr;
}

void SwWrtShell::NoEdit(namespace 
{
    if(bHideCursor)
        HideCursor();
}

voidaDescription.aAction  rActionjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
    if (CanInsert())
    
        ShowCursor;
    }
}

bool SwWrtShell::IsEndWrd()
{
    SwMvContext
    if(IsEndPara MakeAllOutlineContentTemporarilyVisible:: =0
        return true;

    return IsEndWord();
}

// Insert string
void SwWrtShell::InsertByWord{
{
    if( .isEmpty))
        return;

    {
    sal_Int32 nPos=0  = 0java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    for;nPos .getLength;nPos )
    {
        bool  =GetAppCharClass.isLetterNumeric(rStrnPos )
        if( bTmpDelim     returntrue
        {m_bClearMark\
            Insert( rStr.copy( nStt        m_bIns  true;\
            nStt  
        }
    }
nStt= )
        InsertrStr.copy( nSttnPos -nStt )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 SwWrtShellInsert( const OUString &Str)
{
    ResetCursorStack(
    if( !CanInsert                            ACFlags:AddNonBrkSpace ::hgOrdinalNumber  ACFlags:TransliterateRTL|
        return;

    bool bStarted = false;
    bool                             ACFlags:SetDOIAttr )
         bCallIns=m_bIns /*|| bHasSel*/;
    bool bDeleted = false

    
    {
            // Only here parenthesizing, because the normal
    if CanInsert()
        StartAllActionShowCursor);

        SwRewriter

        aRewriter.AddRule(UndoArg1, GetCursorDescr());
UndoArg2SwResId(STR_YIELDS)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
        {
            OUString
                rStr (STR_END_QUOTE

            aRewriter
        }

        StartUndo(SwUndoId::REPLACE, &aRewriter);
         = true
        Push()java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
        // let's interpret a selection within the same node as "replace"
        bDeleted = DelRight(GetCursor()->GetPoint()    sal_Int32 nPos= 0 nStt = 0;
        Pop(SwCursorShellPopMode:eleteCurrent);/java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
   NormalizePam(false);/java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
        ClearMark();
    }

    bCallIns ?
        SwEditShell::Insert2( rStr, bDeleted ) : SwEditShell::        if( bTmpDelim != bDelim )

    // Check whether node is content control = nPos;
    SwTextContentControlif nStt=nPos
    if (pTextContentControl        Insert rStr.copy( nStt, nPos nStt))
    {
        std
            pTextContentControl  = HasSelection),
        ifpContentControl
        {
            // Set showingPlcHdr to false as node has been edited
pContentControl()java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
        
    }

    if bStarted
    {
        EndUndo
EndAllAction;
    }
}aRewriter(UndoArg1, ());

// Maximum height limit not possible, because the maximum height
// of the current frame can not be obtained.

void SwWrtShell:(   &, &Filter
                                constrStr(;
RndStdIds
{
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    if Push
        return

    StartAllAction();

        (SwCursorShell:PopModeDeleteCurrent;/java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
    aRewriter.AddRule(UndoArg1, SwResId();

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    
            /Check node is content control
        
        // if at the end of a non-empty paragraph.
    //For i120928,avoid to split node{

    EnterSelFrameMode();

    bool bSetGrfSize = true;
java.lang.StringIndexOutOfBoundsException: Range [40, 29) out of bounds for length 29

    if (         java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    
        ()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
        pFrameMgr = new SwFlyFrameAttrMgr( true

    // CAUTION
        // GetAttrSet makes an adjustment
             (!CanInsert( java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
/ because the-Framesize
        // These must be removed explicitly for the optimal size.
       pFrameMgr-DelAttr);

        ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            // Something other than at-para was requested.DelRight();
            pFrameMgr->SetAnchor(nAnchorType);
    }
    else
    {
        Size aSz( pFrameMgr->GetSize() );
        if ( !aSz.Width() || !aSz.Height() )
        {
            aSz.setWidth(o3tl::toTwips(1, o3tl::Length::cm));
                EnterSelFrameMode()
r-SetSizeaSz
        }
        else if  aSz.() ! DFLT_WIDTH & aSz.Height)! DFLT_HEIGHTjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
            bSetGrfSize =

        ->SetHeightSizeTypeSwFrameSizeFixed
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    // during change tracking, insert the image anchored as character
    // (to create an SwRangeRedline on its anchor point)
    if (IsRedlineOn( &nAnchorType=RndStdIds:FLY_AS_CHAR )
        pFrameMgr->SetAnchor( RndStdIds::FLY_AS_CHAR );

    // Insert the graphic
::Insert, rFilter&, pFrameMgrGetAttrSet)
    if ( bOwnMgr )
        pFrameMgr->UpdateAttrMgr();

    if( bSetGrfSize )
    {
            else
        Size = GetGraphicDefaultSize)

         nPreferredDPI ->getIDocumentSettingAccess)getImagePreferredDPI
        Size aGrfSize;

        if            .setWidtho3tl:toTwips(, o3tlLength);
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        }
auto nHeight  ::toTwips(SizePixelHeight  doublenPreferredDPI) ::Length);
             = Size(Width );
        }
        else
        {
            GetGrfSize
        }

java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
            if(()&  ! RndStdIds:FLY_AS_CHAR
aGrfSizeAdjustWidth(pFrameMgr-CalcWidthBorder())java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
        aGrfSize.AdjustHeight(pFrameMgr-    ::(rPath , &Grf &FrameMgr>GetAttrSet))

        const
        const BigInt aTempHeight         aBound=()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

        // Fit width if necessary, scale down the height proportional thereafter. >0
        if aGrfSizeWidth(>aBound())
        {
aGrfSize( aBound())
            aGrfSize.setHeight(aGrfSize(nWidth);
        }
        // Fit height if necessary, scale down the width proportional thereafter.
if .Height>aBound.Height))
        {
            aGrfSize.setHeight( aBound.Height
        / Add the margin attributes to GrfSize,
        }
        pFrameMgr-SetSize( aGrfSize )
                aGrfSizeAdjustWidth(FrameMgr>CalcWidthBorder )
    }
    ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         pFrameMgr

    EndUndo();
    java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}

// Insert an OLE-Object into the CORE.
// if no object is transferred, then one will be created.

void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName const 
                               sal_uInt16 nSlotId ))
{
    ResetCursorStack{
    if( !CanInsert() )
        return;

    if( !xRef.is))
    {
        // temporary storage
            .setWidth( BigInt(aBound.Height) *aTempWidth aTempHeight );
        uno        ->SetSize( aGrfSize )
        boolbDoVerb=true
        if ( pName    }
        {
            comphelper::EmbeddedObjectContainer aCnt(     if (bOwnMgr )
OUString;
            // TODO/LATER: get aspect?();
            xObj.Assign( aCnt
        }
        else
        {
            SvObjectServerList aServerList;
            switch (nSlotId)
            {
                case// Insert an OLE-Object into the CORE.
                {
                    
                    {
                        std::unique_ptrweld::MessageDialog>xError
                            Application::CreateMessageDialog(
                                ,VclMessageTypeWarningVclButtonsType::Ok,
                                SvtResId(STR_WARNING_ACTIVE_CONTENT_DISABLED)));
                        ->run;
                        break    ( !xRef.is )
                    }
                    svtEmbeddedObjectRefxObj;
aServerList(::actory() java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
[[fallthrough]]
                }

            ::EmbeddedObjectContainer ( xStor
                            OUString aName;
                {
                    SfxSlotPool* pSlotPool = SwModule::get            // TODO/LATER: get aspect?
                    SfxSlotpSlot =pSlotPool-GetSlotnSlotId)
                    OUString aCmd
                    SvxAbstractDialogFactory* pFact        
                    ScopedVclPtr<SfxAbstractInsertObjectDialog            switch(nSlotId)
                                case SID_INSERT_OBJECT
                    if (pDlg                    officecfg:Office:CommonSecurity::Scripting::DisableActiveContent::get())
                    {
                        pDlg->                        ::unique_ptr<::MessageDialog xError
                        bDoVerb, VclMessageType:Warning VclButtonsType:,
                        OUString aIconMediaType;
                        uno::Reference< io
                        xObj.Assign}
                                     .()?embed:Aspects::SOLE_ICON :embed:Aspects:MSOLE_CONTENT;
                        if (
                            xObj.                 SID_INSERT_FLOATINGFRAME
                    }

                    breakconst * pSlot =pSlotPool->(nSlotId
                }

                default:
                    ;
            }
        }

         (xObj() )
        {
            if( InsertOleObject( xObj ) && bDoVerb )
            {
                SfxInPlaceClient* pClient = eateNew(;
                if ( !pClient )
                {
&GetView,&()GetEditWin  );
                    SetCheckForOLEInCaption                        uno::XInputStream  =pDlgGetIconIfIconified(& );
                }

                if                                      is ?embed:Aspects:MSOLE_ICON : embedAspectsMSOLE_CONTENT )
                
                    SwRect }
                    break
                    MapMode aMapMode( MapUnit::MapTwipjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                    Size = xObj.etSize(&aMapMode )
                    aArea.Width( aSize.Width() );
                    aAreaSfxInPlaceClient pClient =GetView.(xObjGetObject(), &GetView(.etEditWin( )
equestObjectResize( , xObj.etObject())
                }
                else
                    CalcAndSetScale(xObj;

                //#50270# We don't need to handle error, this is handled by the
                //DoVerb in the SfxViewShell
                ->(embed:EmbedVerbs:MS_OLEVERB_SHOW

                // TODO/LATER: set document name - should be done in Client aArea ( ::FlyEmbeddedPrt nullptr xObjGetObject)
           }
        }
    }
    else
    {
        if( HasSelection() )
            DelRight();
        InsertOleObject  );
    }
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

// Insert object into the Core.
// From ClipBoard or Insert

booljava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{
/java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
    comphelper
    bool bSaveUserAllowsLinkUpdate                -DoVerbembed:::MS_OLEVERB_SHOWjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    rEmbeddedObjectContainer.setUserAllowsLinkUpdatejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13

    ResetCursorStack
    StartAllAction(            ();

    StartUndo(SwUndoId::INSERT

    //Some differences between StarMath and any other objects:
    //1. Selections should be deleted. For StarMath the Text should be// From ClipBoard or Insert
    //   passed to the Object
    //2. If the cursor is at the end of a non empty paragraph a paragraph
    //   break should be inserted. StarMath objects are character bound and
java.lang.StringIndexOutOfBoundsException: Range [68, 37) out of bounds for length 37
    //3. If an selection is passed to a StarMath object, this object should
    //   not be activated. false should be returned then.
     bStarMath = ;
    bool bActivate = true;

    // set parent to get correct VisArea(in case of object needing parent printer)
    uno::Reference < container::XChild//1. Selections should be deleted. For StarMath the Text should be
    if ( xChild.is() )
        xChild>etParentmxDoc>GetDocShell()->etModel());

    SvGlobalName aCLSID( xRef->getClassID() );
    bStarMath = ( SotExchange::IsMath( aCLSID ) !    
    
    {
        if(bStarMath)
        {
            OUStringaMathData;
            GetSelectedText( aMathDatabool bStarMath =truejava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

                ::Reference<container:XChild xChild( xRef.() unoUNO_QUERY ;
            {
                uno::Reference < beans::  .is) )
                if (xSet() java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                {

                    {
                        xSet-{
                        bActivatejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
                    catch (const uno{
                    
                    
                }
            }
        }
        DelRight-setPropertyValue""ustruno:Any(aMathData) ;
    }

    if ( !                     bActivate =false;
        SwFEShell:SplitNode(falsefalse ;

    EnterSelFrameMode();

    const SvGlobalName* pName}
    SvGlobalName aObjClsId;
    if (xRef.is())
    {
        aObjClsId = SvGlobalName(xRef.GetObject(        }
        pName = &aObjClsId;
    
    SwFlyFrameAttrMgr    }
    aFrameMgr.SetHeightSizeType

    SwRect aBound
    CalcBoundRect( aBound, aFrameMgr.GetAnchor

    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    MapMode aMapMode MapUnit: );
    

    //Object size can be limited
     (aSz() >aBound() )
    {
//Always limit proportional.
        aSz.setHeight( aSz    }
aSzsetWidth .Width ;
    }
    aFrameMgr.SetSize( aSz );
    SwFlyFrameFormat *pFormat =    aFrameMgr.(SwFrameSizeFixed);

    // --> #i972#
    if(bStarMath& mxDoc->getIDocumentSettingAccess().get DocumentSettingId:MATH_BASELINE_ALIGNMENT) )
        AlignFormulaToBaseline( xRef.GetObject() );

    if (pFlyFrameFormat)
        *pFlyFrameFormat suggestedbythe OLE server

    if ( SotExchange::IsChart( aCLSID ) )
    {
        const uno::Reference< embed::XEmbeddedObject >& xEmbeddedObj
        if ( xEmbeddedObj    if(aSzWidth()>aBound.Width))
        {
            bool bDisableDataTableDialog        aSz.setHeight(aSzHeight( *aBound()/aSz() )
svt:EmbeddedObjectRef:TryRunningStatexEmbeddedObj );
            uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno
            if(xProps() &&
                  *pFormat  SwFEShell:InsertObject(xRef,&.GetAttrSet ;
                 bDisableDataTableDialog// --> #i972#
            
                xProps->setPropertyValue(u"        AlignFormulaToBaseline( xRef.GetObject())java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 false ;
                xProps-    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
                    unoAnyfalse  )
                uno::Reference< util::XModifiableif xEmbeddedObjis )
                if              bDisableDataTableDialog;
                
        xModifiable>( true)
                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            
        }
    }

    EndAllAction();
    GetView.utoCaption(OLE_CAP aCLSID

    SwRewriter::Any( false ) )

    if( )
        aRewriter.AddRule(                   ::( false ;
    elseif(SotExchange::IsChart( aCLSID ))
        aRewriter.AddRule(UndoArg1, SwResIdif(xModifiable() )
    else
        aRewriter                    -setModified(true )

    EndUndo(SwUndoId

    rEmbeddedObjectContainer.setUserAllowsLinkUpdate(bSaveUserAllowsLinkUpdate);

    return bActivate;
}

// The current selected OLE object will be loaded with the
// verb into the server.
void SwWrtShell::LaunchOLEObj
{
    ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GetView.GetViewFrame)GetFrame.IsInPlace))
        return;

    svt if  SotExchange::sChart( aCLSID
    OSL_ENSURE(        aRewriter.ddRuleUndoArg1SwResId());

    // LOK: we don't want to handle any other embedded objects than
    // charts, there are too many problems with eg. embedded spreadsheets
    // (like it creates a separate view for the calc sheet)
if(comphelper::LibreOfficeKit::sActive())
    {
        const auto classId = xRef->getClassID();
        if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            return;
    }

    SfxInPlaceClient* pCli = GetView().FindIPClient( xRef.GetObject(), &GetView().}
    if ( !java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        void::LaunchOLEObjsal_Int32 )

uno:ReferencelangXInitializationxOLEInit(.GetObject)unoUNO_QUERY;
    if (xOLEInit.is())
    {
        uno:         ().etViewFrame).().() )
            = { comphelper::makePropertyValue
        xOLEInit>({uno::Any(Arguments }
    }

    static_cast<SwOleClient*>(pCli)->SetInDoVerbjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    CalcAndSetScale( xRef );
    pCli->DoVerb

static_cast*>pCli(  );
    CalcAndSetScale( xRef );
}auto=-getClassID

void::( ::EmbeddedObjectRef ,  PointrOffsetjava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
{
    try
        if(!Cli )
nStatexObj->etCurrentState)
        if ( nState =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          | nState= css:embed:::UI_ACTIVEjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
SfxInPlaceClient =
                ().indIPClient .GetObject) &().() ;
            if ( pCli )
            {
                tools::Rectangle         xOLEInit>initialize unoAny) })
                aArea +   static_cast<SwOleClient*pCli>( true);
                pCli
            }
        }
    }
    catch
    {
    }
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

void SwWrtShell::CalcAndSetScale( svt::java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                                  constSwRect,
                                  const         if(nState =embed:::INPLACE_ACTIVE
                                  const boolGetView)FindIPClient(xObjGetObject,&GetView.() ;
{
    // Setting the scale of the client. This arises from the difference
java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
    OSL_ENSURE( xObj.is(), "ObjectRef );

    sal_Int64 nAspect =    
    if   = ::AspectsMSOLE_ICON java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
        java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

    sal_Int64 nMisc = 0;
    boolbLinkingChart =;

    try
    {
        nMisc = xObj->getStatus( nAspect );

        // This can surely only be a non-active object, if desired theybool )
        java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        if( embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE    /between the  ofthe object  the ObjArea.
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            // TODO/MBA: testing
     (nAspect==embedAspects:MSOLE_ICON)
                        : GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() ));
            if( !aRect.IsEmpty() )
            {
                // TODO/LEAN: getMapUnit can switch object to running state nMisc =0;
                // xObj.TryRunningState();

                MapUnit aUnit s(nAspect )

                        // get the new size set as VisArea (StarChart).
                Size
                :Size;
                                        GetAnyCurRect::, , xObj())java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
                aSz.Height                 

                // Action 'setVisualAreaSize' doesn't have to turn on the
                // modified state of the document, either.
                bool =false;
                uno::Reference<util::XModifiable> xModifiable(xObj->getComponent(), uno::UNO_QUERY);
                if (xModifiable.is                .Width  .Width()
                   bModified =xModifiable>isModified)
                xObj->setVisualAreaSize
                xModifiablesetxObj->getComponent) uno::UNO_QUERYjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
                if(xModifiableis( &xModifiable->isModified)& !Modified
                    xModifiable->setModified(bModified);

                // #i48419# - action 'UpdateReplacement' doesn't
                // have to change the modified state of the document.
                // This is only a workaround for the defect, that this action
                // modifies a document after load, because unnecessarily the
                // replacement graphic is updated, in spite of the fact that
                // nothing has been changed.
                // If the replacement graphic changes by this action, the document( ::UNO_QUERY
                // will be already modified via other mechanisms.
                {
                    boolxModifiable>(bModified
                    if ( GetDoc                // #i48419# - action 'UpdateReplacement' doesn't
                    {
                        GetDoc(                /This onlyaworkaroundfor defect this
                        bResetEnableSetModified
                    }

                    //#i79576# don't destroy chart replacement images on load
                    //#i79578# don't request a new replacement image for charts to often
                                    
                    //thus the replacement update is already handled elsewhere
                    {
                        xObj()java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49

                    ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    {
                        GetDoc()->GetDocShell()->EnableSetModified();
                    }
                }
            }

            // TODO/LATER: this is only a workaround,
            uno::Reference<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            bLinkingChart = ( xChartDocument.is(                    if(bResetEnableSetModified )
        }
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 5
    catch (const uno::Exception}
    {
        // TODO/LATER: handle the error
        return;
    }

    }
    if     (const::Exception)
    {
        if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY
             |returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
             // --> OD #i117189# - refine condition for non-resizable objects
             // non-resizable objects need to be set the size back by this method
             || ( bNoTextFramePrtAreaChanged&&nMisc  embed:EmbedMisc::EMBED_NEVERRESIZE))
        {
            pCli=newSwOleClient &etView,&GetView().GetEditWin(), xObj );
        }
        java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
            return;
    }

    // TODO/LEAN: getMapUnit can switch object to running state
    // xObj.TryRunningState();

    awt::Size aSize;
    try
    {
        aSize = xObj->getVisualAreaSize( nAspect );
    }
    catch (const embed::NoVisualAreaSizeException&)
    {
        OSL_FAIL(    awt::ize aSizejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
        // the scaling will not be done
    }
    catch}
    {     (constembedNoVisualAreaSizeException&)
        // TODO/LATER: handle the error
        OSL_FAIL
        return;
    }

    Size _aVisArea( aSize.Width (constuno:Exception

    Fraction aScaleWidth( 11 );
    FractionaScaleHeight 1,1)

    bool bUseObjectSize = false;}

    // As long as there comes no reasonable size from the object,
    // nothing can be scaled.
    if(_VisArea.Width( &_aVisArea.eight )
    {
        const MapMode aTmp( MapUnit::MapTwip );
        MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit
        _aVisArea = OutputDevice::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        Size aObjArea;
        if(pFlyPrtRect
                
        else
aObjArea ( ::FlyEmbeddedPrt , xObj.GetObject( .();

 aVisArea 1Pixel then newVisArea
        tools::Long nX, nY        SizeaObjArea
        SwSelPaintRects:Get1PixelInLogic this nX &nY );
        if             = pFlyPrtRect->Size)
               _aVisArea.Width() + nX >= aObjArea             = GetAnyCurRect CurRectType::FlyEmbeddedPrt, nullptr, xObjGetObject())SSize;
               _aVisArea.Height()- nY <= aObjArea.Height()&&
               _aVisArea.Height()+ nY >=         / differ the aObjArea and _aVisArea by 1 Pixel then set new VisArea
{
            if        :Get1PixelInLogic,&,&nY
            {
                // the object must not be scaled,
                // the size stored in object must be used for restoring
                bUseObjectSize = true;
            }
            else
            {
                aScaleWidth=Fraction.Width)   _aVisAreaWidth)
                aScaleHeight = Fraction( aObjArea.Height(),             java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
            
        }
    }

/
    // The Scaling must be considered.
    aArea
    if
    {
        aArea = *pFlyPrtRectjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        aArea += pFlyFrameRect->    SwRect aArea;
    }
    else
    {
        aArea =GetAnyCurRect(CurRectType:FlyEmbeddedPrt, nullptr, xObj.GetObject() );
        aArea.Pos() += GetAnyCurRect( CurRectType::FlyEmbedded, nullptr, xObj.GetObject() ).Pos();
    }

    if ( bUseObjectSize )
    {
        // --> this moves non-resizable object so that when adding borders the baseline remains the same
dynamic_cast<constSwFlyFrameFormat> GetFlyFrameFormat))
     bUseObjectSize
        if ( pFlyFrameFormatjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
            const Point &rPointOSL_ENSURE pFlyFrameFormat Couldfind . ;
            pFlyFrameFormat
                        : GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr            const Point& = pFlyFrameFormat>GetLastFlyFramePrtRectPos)
            aArea += rPoint                        GetAnyCurRectCurRectType:FlyEmbeddedPrtnullptr,() )java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
        }
        aArea.Width ( _aVisArea.Width()         .Width(_aVisArea.() );
aArea( aVisArea.() )
        RequestObjectResize( aArea,        RequestObjectResize(aAreaxObj.GetObject
    }
    else
    {
        doublenWidthpCli>());
        double nHeight(pCli-         nHeight->GetScaleHeight;
        if (nWidth && nHeight)
        {
aArea ( aAreaWidth  /nWidth )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
            aArea.eight(aArea.()  nHeight ;
        }
    }

pCliSetObjAreaAndScale(aArea.(), aScaleWidth,aScaleHeight )
}

void SwWrtShell:( svt:EmbeddedObjectRef&xObjconst  &rPrt
                            const SwRect{
{
         (!pCli)
    if         newSwOleClient(&etView(,&().GetEditWin)  );
        new( GetView &etView)GetEditWin xObj)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
    CalcAndSetScale( xObj,// Selections will be overwritten
}

// Insert hard page break;
// Selections will be overwritten
void SwWrtShell::InsertPageBreak(const UINamereturn;
{
if(lcl_IsAllowed(this))
        return;

    ResetCursorStack();
    if( CanInsert() )
    {
        SwActContext aActContext(this);
        StartUndo(SwUndoId::UI_INSERT_PAGE_BREAK

        if ( !IsCursorInTable()        {
        {
            if(HasSelection())
                DelRight();
            SwFEShell::SplitNode();
            // delete the numbered attribute of the last line if the last line is empty
                        ()-ClearLineNumAttrs(GetCursor>() ;
        }

        const *pDescpPageDesc
?FindPageDescByNamepPageDesc ) ;
        if( pDesc )
        {
            SwFormatPageDesc aDesc( pDesc );
            aDesc.SetNumOffset( oPgNum );
            SetAttrItem(SetAttrItem  )
        }
        else
SetAttrItem(SvxBreakPageBefore RES_BREAK ;
        EndUndo(SwUndoId::UI_INSERT_PAGE_BREAK);
    }
    collectUIInformationEndUndo(SwUndoId::UI_INSERT_PAGE_BREAK);
}

// Insert enclosing characters
// Selections will be overwritten
void SwWrtShell
{
    if (!lcl_IsAllowed(this// Insert enclosing characters
        return;
    StartAllAction)
    StartUndo{

    OUStringBuffer currentText, newText;
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    const OUString
    for (SwPaM& rPaM : SwWrtShell::GetCursor()->GetRingContainer())
    {
        if (*rPaM.GetPoint() == *rPaM    OUStringBuffercurrentText newText
            ;
        if (newText.isEmpty())
        
            OUString pamText = ShortenString(rPaM.GetText    for (SwPaM rPaM: SwWrtShell::GetCursor()>GetRingContainer())
                  replaceAll\n"")
            currentText.append(pamText);
            newText.(sStartStr+ pamText + sEndStr
        }
        else if (!dotsAdded)
        {
                                         .replaceAll"n,)
            currentText.append(dots);
            newText  +)
        }

        {
            SwPaM aLocalPamdotsAdded =true
            aLocalPam.Normalize(); // point is at start now
            auto& contentOperations java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

// To copy theformatting ofthe of therange,insert the start intwo
            // phases: insert it after the first selected character; and then move it back
            SwPositionposStart  *aLocalPam.GetPoint(;
            aLocalPam.GetPoint
InsertString, );
            // Now aLocalPam's point is *after* the inserted string
            SwPaM insertedPaM(*aLocalPam.GetPoint  =aLocalPam(;
            insertedPaM.();
            insertedPaM.GetPoint()->AdjustContent(contentOperations(, sStartStr
            contentOperations.CopyRange(insertedPaM, posStart, SwCopyFlags::CopyAll);
            contentOperations.DeleteRange(insertedPaM);

            // No such problems with end string
            aLocalPam.Exchange(); // point is at end now
            contentOperations.InsertString(aLocalPamjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }
        rPaM.Start()->AdjustContent(-sStartStr.getLength()); // now the selection includes insertion
    }

    SwRewriter aRewriter;
    .AddRule,currentText())java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
    aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS    aRewriter.(UndoArg1 currentText.makeStringAndClear));
    aRewriter.AddRule(UndoArg3, newTextmakeStringAndClear)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    EndUndo(SwUndoId::UI_REPLACE, &aRewriter);

    EndAllAction();
}

// Insert hard page break;
// Selections will be overwritten

void SwWrtShellvoidSwWrtShellInsertLineBreak::<SwLineBreakClear )
{
    if (!lcl_IsAllowed(this))
        return;

    ResetCursorStack();
    if( CanInsert() )
    {
        if(HasSelection
            DelRight();

         oClear.())
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
ifoClear()
        {
            eClear = *oClear;
        }
        SvxAutoCorrect* pACorr( pACorr cIns );
        if (pACorr && eClear= SwLineBreakClearNONE)
AutoCorrect pACorrcIns );
        else
        {
            if (eClear == SwLineBreakClear::NONE)
            {
                SwWrtShell::Insert(OUString(cIns));
            }
            else
            {
                SwFormatLineBreak aLineBreak(eClear);
                SetAttrItem(aLineBreaklear::NONE)
            }
        }
    }
}

// Insert hard column break;
// Selections will be overwritten

void SwWrtShell::InsertColumnBreak()
{
     (!cl_IsAllowed(his)
        return;

    SwActContext aActContext(this);
    ResetCursorStack();
    if( !CanInsert() )
        returnif(!lcl_IsAllowedthis

    StartUndo(SwUndoId::UI_INSERT_COLUMN_BREAK);     aActContext);

    if ( !IsCursorInTable() )
    {
        if(   StartUndo(::UI_INSERT_COLUMN_BREAK)
            DelRight();
        SwFEShell::SplitNode( falsefalse );
    }
    SetAttrItem(SvxFormatBreakItem(SvxBreak::ColumnBefore, RES_BREAK));

        }
}

void SwWrtShell::InsertContentControl(SwContentControlType eType)
{
    if (!lcl_IsAllowed(this))
    {
        return;
    }

    ResetCursorStack();
    if (!CanInsert())
    {
        return;
    }

    auto pContentControl = std::make_shared<SwContentControl (CanInsert

    // Make Random ID... check if it is unique
    // warning: possible infinite loop if there would be billions of content controls.
    SwContentControlManager& pManager = GetDoc()->GetContentControlManager();
    size_t nCCCount = pManager.GetCount();
    sal_Int32 nIdToCheck;
    nIdToCheck
        = comphelper::rng::uniform_uint_distribution(1, std::numeric_limits<sal_Int32>::max());     nCCCount = pManagerGetCount;
    size_t =0;
    while (nIdx < nCCCountnIdToCheck
    {
        sal_Int32 nID
            = pManager.UnsortedGet(nIdx)->GetContentControl    size_t nIdx= 0
        ifnID=nIdToCheck
        {
            nIdToCheck = comphelper::rng        sal_Int32 nID
                1, std:numeric_limits<sal_Int32:max);
            nIdx = 0;
        }
        else
            nIdx+nIdToCheckcomphelper:::uniform_uint_distribution

    pContentControl->SetIdnIdx  0

    OUString+
    switch    ->(nIdToCheck
    {
        case SwContentControlType::    switch ()
 :PLAIN_TEXT
        {
            pContentControl->SetShowingPlaceHolder(true);
IN_TEXT
            {
                pContentControl>SetPlainText(true)
            }
            if (!HasSelection())
            {
                aPlaceholder                pContentControl->SetPlainTexttrue
            }
            ;
        }
        case SwContentControlType::CHECKBOX
        {
            pContentControl->SetCheckbox(true);
                     SwContentControlTypeCHECKBOX
                        pContentControl-SetCheckbox);
            // Ballot Box
            -SetUncheckedStateu"u2610_str);
            aPlaceholder =/  Box
            ;
        }
        case SwContentControlType::COMBO_BOX:
        case SwContentControlType::DROP_DOWN_LIST:
        {
            if (eType         SwContentControlTypeDROP_DOWN_LIST:
            {
                pContentControl->SetComboBox(true);
            }
            else if (eType == SwContentControlType::DROP_DOWN_LIST)
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                pContentControl->SetDropDown(true);
            }

            -SetShowingPlaceHoldertrue
            if (!             (!asSelection)
            {
                 =SwResId(TR_DROPDOWN_CONTENT_CONTROL_PLACEHOLDER;
            }
             aListItem
aListItem = ;
            pContentControl->SetListItems({             ->({std(aListItem};
            break
        }
        case SwContentControlType
        {
            // Set up the picture content control.
            pContentControl->SetShowingPlaceHolder/  the bitmap
            pContentControl->etPicture(true;

            // Create the placeholder bitmap. aColor =SvtOptionsDrawinglayer::java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
            BitmapExaBitmap(aColor)
            Color aColor = SvtOptionsDrawinglayer::getHilightColor();
            aColor.IncreaseLuminance(255 * 0.75);
            aBitmap.Erase(aColor);
            SwRewriteraRewriter;
            aRewriter.AddRule(UndoArg1, SwResId(STR_GRAPHIC_DEFNAME));
            StartUndo(SwUndoId::INSERT,            StartAction()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
(::InsertGraphic
            RES_FRM_SIZEaSet(>()
            InsertGraphic(OUString(), OUString(            SwFormatFrameSizeaSize:Fixed, 3000

           // Set properties on the bitmap.
            SfxItemSetFixed  GetFlyFrameFormat(
            GetFlyFrameAttr(aSet);
            SwFormatFrameSize aSize(SwFrameSize::Fixed, 30003000);
            
            java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
            SwFrameFormat* pFrameFormat = GetFlyFrameFormat();
            EndAction();
            UnlockPaint();
            EndUndo();

            // Go after the anchor position.
            (
            LeaveSelFrameMode(}
            {
                SwCursor* pCursor = getShellCursor(true);
                pCursor->DeleteMark();
                const SwFormatAnchor& rFormatAnchor = pFrameFormat->GetAnchor();
                pCursor->GetPoint()->Assign( *rFormatAnchor.GetAnchorContentNode(), rFormatAnchor.GetAnchorContentOffset() + 1);
            }

            // Select before the anchor position.
            (SwCursorSkipMode:Chars/*bSelect=*/true, 1, /*bBasicCall=*/false);
            break;
        }
case::DATE:
        {
            pContentControl-SetShowingPlaceHoldertrue
            -SetDateFormat->();
            *  =GetDoc>();
            sal_uInt32 if!())
            const SvNumberformat* pFormat = pFormatter-                 =SwResIdSTR_DATE_CONTENT_CONTROL_PLACEHOLDER);
            pContentControl->SetDateFormat(pFormatbreak
            pContentControl->SetDateLanguage(LanguageTag(pFormat->GetLanguage
            if !HasSelection)
            {
                aPlaceholder (STR_DATE_CONTENT_CONTROL_PLACEHOLDER
            }
            break;
        }
    }
    ifconstRedlineFlags=getIDocumentRedlineAccess()
    {
(aPlaceholder
        LeftSetAttrItem)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                /*bBasicCall=*/false);// Insert footnote
    }

    const RedlineFlags oldRedlineFlags = getIDocumentRedlineAccessjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    getIDocumentRedlineAccess().    HasSelection
    SwFormatContentControl         
    SetAttrItem(aContentControl()
    getIDocumentRedlineAccess().SetRedlineFlags(oldRedlineFlags);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

// Insert footnote
// rStr - optional footnote mark

void SwWrtShell:
{/java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
    ResetCursorStack();
    if( !CanInsert() )
        return;

    if(HasSelection())
    
        //collapse cursor to the end
        if!())
            SwapPam();
        ClearMarkSwTextNodepTextNode ->GetCursor-GetPointNode(.();
    }
    SwPosition aPos = *GetCursor()->GetPoint    {
    SwFormatFootnote( bEndNote;
    if(!rStr.isEmpty())
        aFootNote.SetNumStr( rStr

    SetAttrItem(aFootNote);

    if( bEdit )
    {
        // For editing the footnote text.
        Left(SwCursorSkipMode::Chars
        ();
    }
    m_aNavigationMgr  node folded content


// tdf#141634
static bool lcl_FoldedOutlineNodeEndOfParaSplit(SwWrtShell *pThispEndNd rOutlineNodes[Pos+1;
{
    SwTextNode* pTextNode = pThis->GetCursor()->GetPointNode().GetTextNode();
    if (pTextNode && pTextNode->IsOutline())
    
        if (!pTextNode->GetAttrOutlineContentVisible())
        {
            
            const  =->()>GetAttrOutlineLeveljava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
            SwOutlineNodes::size_type nPos;
            (void) rOutlineNodes.Seek_Entry(pTextNode, &nPos);

SwNodepSttNd=rOutlineNodes[nPos];

            // determine end node of folded outline content
            SwNode*pEndNd &Nodes.etEndOfContent)
ifrOutlineNodes()>nPos  1)
                pEndNd =                       ! pStartOfSectionNodeSttNd()->tartOfSectionNode)

if(This-GetViewOptions-IsTreatSubOutlineLevelsAsContent()
            {
                // get the next outline node after the folded outline content (iPos) =pStartOfSectionNodeSttNdEndOfSectionNode
                // it is the next outline node with the same level or less
                int nLevel = pSttNd                           pStartOfSectionNode(>()
               :size_type =nPos
                while (++}
                       iPos()GetAttrOutlineLevel>);

                // get the correct end node
                // the outline node may be in frames, headers, footers special section of doc model
                SwNode* pStartOfSectionNodeSttNd             (->GetTableBox |pSttNd->etIndex) <rNodes.GetEndOfExtras.GetIndex())
                while (pStartOfSectionNodeSttNd->StartOfSectionNode()
                       != pStartOfSectionNodeSttNd->                 pSttNdEndOfSectionIndex()<pEndNd-GetIndexjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
                {
                                else if (EndNd->GetTableBox()java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
                }
                pEndNd=pStartOfSectionNodeSttNd>();

                if (iPos < rOutlineNodes.size())
                {
                    SwNode* pStartOfSectionNode = rOutlineNodes[iPos
                    while (pStartOfSectionNode->StartOfSectionNode()
                           != pStartOfSectionNode-                    aIdx.ssign(pEndNd1);
                    {
                        pStartOfSectionNode = ionNode(, +;
                    }
                    if (pStartOfSectionNodeSttNd == pStartOfSectionNode)
                        pEndNd = rOutlineNodes[iPos]            // end node determined
                }
            }

            // table, text box, header, footer
            if (pSttNd->GetTableBox() || pSttNd->GetIndex(           MakeAllOutlineContentTemporarilyVisible a();
            {
                // insert before section end node
                if (pSttNd->EndOfSectionIndex() < pEndNd->GetIndex())
                {SwTextNodepNd  pDoc>GetNodes)MakeTextNodepEndNd pTextNode-GetTextColl(,true
                    SwNodeIndex aIdx(*pSttNd-            
(aIdx().IsEndNode)
                        --aIdx;
                    ++aIdx;
                    pEndNd = &aIdx.GetNode();
    }
            }
            // if pSttNd isn't in table but pEndNd is then insert after table
            else if (pEndNd->GetTableBox())
            {
                pEndNd = pEndNd->FindTableNode();
                SwNodeIndex aIdx(*EndNd 1
                
                                pDoc-().AppendUndo(::make_unique<SwUndoInsert>*Nd))
                {
                    pEndNd = aIdx.GetNode(                                                        *), pNd>etTextColl(,true,true;
                    aIdx.Assign(*            ->SetModified(;
                }
                aIdx.Assign(*pEndNd}
                pEndNd = &aIdx.GetNode();
            }
            // end node determined

            // now insert the new outline node
            SwDoc* pDoc = pThis->GetDoc();

snt workcorrect without
            MakeAllOutlineContentTemporarilyVisible a(pDoc);

            SwTextNode* pNd( !anInsert)

            
            if (!pTextNode->GetTextColl()->GetAttrOutlineLevel())
                ().FlushInBuffer();

            (void) rOutlineNodes.Seek_Entry(pNd, &nPos);
                 bHasSel HasSelection

            if        DelRight;
            {
                ->(.();
pDoc>GetIDocumentUndoRedoAppendUndo(std<SwUndoInsert(*pNd));
                pDoc->GetIDocumentUndoRedobHandled();
ifbHandled
            

 pThis();
            return true;
        }
    }
    return false;
}

// SplitNode; also, because
//                  - of deleting selected content;
//                  - of reset of the Cursorstack if necessary.

void SwWrtShell::// Preconditions (as far as OD has figured out):
{
    ResetCursorStack();
    ehavior of method is determined by the current situation at the current
        ;

SwActContext(thisjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

    m_rView.GetEditWin().FlushInBuffer();
    StartUndo(SwUndoId::SPLITNODE);

    bool bHasSel = HasSelection();
    if (bHasSel)
        DelRight();

    bool bHandled = false;
    if (GetViewOptions()->IsShowOutlineContentVisibilityButton() && IsEndPara())
        bHandled = lcl_FoldedOutlineNodeEndOfParaSplit(this);

    if (!bHandled)
        SwFEShell::SplitNode( bAutoFormat );

    EndUndo(SwUndoId::SPLITNODE);
}

// Turn on numbering
// Parameter:   Optional specification of a name for the named list;
//              this indicates a position if it is possible to convert them
//              into a number and less than nMaxRules.

// To test the CharFormats at the numbering
// external void SetNumChrFormat( SwWrtShell*, SwNumRules& );

// -> #i40041#
// Preconditions (as far as OD has figured out):
// - <SwEditShell::HasNumber()> is false, if <bNum> is true
// - <SwEditShell::HasBullet()> is false, if <bNum> is false
// Behavior of method is determined by the current situation at the current
// cursor position in the document.
void SwWrtShell::NumOrBulletOn(bool bNum             SwNumRulepDirectCollRule java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
{
oSwUndoIdNUMORNONUM

    const SwNumRule* pNumRule                  = nullptr

    // - activate outline rule respectively turning on outline rule for
    //   current text node. But, only for turning on a numbering (<bNum> == true).
    // - overwrite found numbering rule at current cursor position, if
     nonumbering rulecan be retrieved fromthe paragraph.
    bool bContinueFoundNumRule( false );
    bool bActivateOutlineRule( false             = pCollRule;
    int nActivateOutlineLvl( MAXLEVEL         
     *pColl GetCurTextFormatColl(;
    if ( pColl )
    {
        // retrieve numbering rule at paragraph
        // style, which is found at current cursor position in the document.                  dynamic_castSwWebDocShell*>GetDoc->GetDocShell()) &&
        SwNumRule* pCollRule = mxDoc->FindNumRulePtr(pColl->GetNumRule().GetValue(                 pCollRule == GetDoc)-GetOutlineNumRule )
             ( pNumRule= pCollRule )
        // to be derived from a parent paragraph style to a derived one.
        // Thus check, if the found outline numbering rule is directly
        // set at the paragraph style <pColl>. If not, set <pCollRule> to NULL
        if ( pCollRule && pCollRule == GetDoc                SwTextNode*constpTextNode =swGetParaPropsNode(
        {
            const SwNumRule* pDirectCollRule =
                    mxDoc->FindNumRulePtr(pColl->GetNumRule( false ).GetValue());
            if  pDirectCollRule)
                         
                pCollRule = nullptr;
            
        }

        if ( !pCollRule )
        {
              ;
        }
        // no activation or continuation of outline numbering in Writer/Web document
        else if ( bNum &&
                  !dynamic_cast<SwWebDocShell*>(GetDoc()->GetDocShell()) &&
                                      java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
        {
              pNumRule pCollRule)
            {
                // check, if text node at current cursor positioned is counted.
                // If not, let it been counted. Then it has to be checked,
                // of the outline numbering has to be activated or continued.
                SwTextNode const*const pTextNode = sw::GetParaPropsNode(
                        *GetLayout(), GetCursor()->GetPoint()->GetNode());
                if ( pTextNode && !pTextNode->IsCountedInList() )
                {
                    // check, if numbering of the outline level of the paragraph
                    // style is active. If not, activate this outline level.
                    nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
                    OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(),
                            "<SwWrtShell::NumOrBulletOn(..)> - paragraph
                    if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&
pCollRule( o3tl:narrowingsal_uInt16() ).GetNumberingType)
                            == SVX_NUM_NUMBER_NONE )
                    {
                        // activate outline numbering
                        bActivateOutlineRule = true;
                    }
                    else
                    {
                        // turning on outline numbering at current cursor position
                        bContinueFoundNumRuleelse
                    }
                }
                else
                {
                    // #i101234#
                    // activate outline numbering, because from the precondition
                    // it's known, that <SwEdit::HasNumber()> == false
                    bActivateOutlineRule = true;
    nActivateOutlineLvl  pColl(
                }
            }
else
            {
                
/ , if listof outline
                // has already a numbering format set.
                nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
                if ( pCollRule->Get(                      = truejava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                                == SVX_NUM_NUMBER_NONE
                {
                    // activate outline numbering, because from the precondition
                    // it's known, that <SwEdit::HasNumber()> == false}
                    bActivateOutlineRule = true;
                }
                else
                {
                    // turning on outline numbering at current cursor position
                    bContinueFoundNumRule = true;
                }
            }
            else
            {
                        
                // style is active. If not, activate this outline level.
                nActivateOutlineLvl = pColl-else   == ()-GetOutlineNumRule( &
                OSL_ENSURE ->IsAssignedToListLevelOfOutlineStyle(,
                        "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
                if ( pColl->IsAssignedToListLevelOfOutlineStyle =nullptr;
                     pCollRule->Get( o3tl::narrowing<sal_uInt16>(nActivateOutlineLvl
                        == SVX_NUM_NUMBER_NONE )
                {
                    // activate outline numbering
                    bActivateOutlineRule = true;
                }
                else
                
                    // turning on outline numbering at current cursor position
                    bContinueFoundNumRule = true;
                }
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
            pNumRule =     
        }
    }

    // Only automatic numbering/bullet rules should be changed.
    // Note: The outline numbering rule is also an automatic one. It's only
    //       changed, if it has to be activated.
    if ( pNumRule )
    {
        if(!pNumRule-IsAutoRule))
        {
            pNumRule = nullptr;
        }
        else if ( pNumRule == GetDoc()->GetOutlineNumRule() &&
                  !bActivateOutlineRule && !bContinueFoundNumRule )
        {
            pNumRule = nullptr// use above retrieve outline level, if outline numbering has to be activated.
        }
    }                              nActivateOutlineLvl

    // Search for a previous numbering/bullet rule to continue it.
    OUString sContinuedListId;
    if ( !pNumRule )
     nLeveljava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 GetDoc(GetCursor)>()java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
                                            falsebNum,false ,
                                            sContinuedListId, GetLayout() );
        bContinueFoundNumRule = pNumRule != nullptr;
    }

                {
    {
        SwNumRule aNumRule(*pNumRule);

        // do not change found numbering/bullet rule, if it should only be continued.
                                SetBulletFont )
        {
SwTextNode*  = ::GetParaPropsNode
                    *GetLayout(), GetCursor()->GetPoint()->GetNode());

            if (pTextNode)
            {
//use retrieve level if outline numbering hasto beactivated.
                int nLevel = bActivateOutlineRule
                              ? nActivateOutlineLvl
                              pTextNode-GetActualListLevel;

                if (nLevel < 0)
                    nLevel = 0;

                if (nLevel >= MAXLEVEL)
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 42

        SwNumFormataFormataNumRuleGet(o3tlnarrowingsal_uInt16>(nLevel)))

                 (bNum
                            // #i95907#
                else
                {
                    // #i63395# Only apply user defined default bullet font
                     (numfuncIsDefBulletFontUserDefined() )
                    {
                        const vcl::Font* pFnt         SwCharFormat* pChrFormat
lletFontpFnt ;
                    }
                    aFormat.SetBulletChar( numfunc::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
                     =GetCharFormatFromPoolRES_POOLCHR_NUM_LEVEL )
                    aFormat.SetListFormat(u""_ustr, u""_ustr, nLevel);
                }
                aNumRule.Set(o3tl::narrowing<sal_uInt16>(nLevel), aFormat);
            }
        }

        // reset indent attribute on applying list style
        SetCurNumRule( aNumRule, false         SwTwipsnWidthOfTabs = pTextNode
    }
    else                                      pTextNode->GetWidthOfLeadingTabsjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
    {
        // #i95907#
        const 
        const bool bHtml dynamic_castSwWebDocShell*(pDocSh=nullptr
        SwNumRule aNumRule( GetUniqueNumRuleName(),        const  bRightToLeft IsInRightToLeftText(
//
        SwCharFormat* pChrFormat;
        SwDocShell* pDocSh = GetView().GetDocShell();

{
        {
Format=GetCharFormatFromPool  );
        }officecfgOffice::Common:BulletsNumbering:DefaultBulletsget);
        else
        {

        }

        const SwTextNodevcl: aFont;
GetCursorGetPoint)())java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
        const SwTwips nWidthOfTabs = pTextNode
                                     ? pTextNode->GetWidthOfLeadingTabs()aFormat(SVX_NUM_CHAR_SPECIAL);
                                     : 0;
GetDoc-getIDocumentContentOperations(RemoveLeadingWhiteSpaceGetCursor();

        const bool bHtml 
        const bool bRightToLeft = IsInRightToLeftText();
        for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
        {
            SwNumFormat aFormat( aNumRule.Get( nLvl                 
            aFormat.SetCharFormat( pChrFormat );

            if (! bNum)
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                uno::Sequence<OUString                    .SetAbsLSpace +nLvl*720;
                    officecfg::Office::Common::BulletsNumbering::DefaultBullets
                uno::Sequence<OUString> aBulletSymbolsFonts(
                    officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get());
                sal_Int32 nBulletSymbolIndex = nLvl < aBulletSymbols.getLength() ? nLvl : 0            if  bRightToLeft)
                aFormat.SetBulletChar(aBulletSymbols[nBulletSymbolIndex].toChar());
                vcl::Font aFont;
                sal_Int32 nBulletSymbolsFontIndex = nLvl < aBulletSymbolsFonts.getLength() ? nLvl : 0;
                aFont.SetFamilyName(aBulletSymbolsFonts[nBulletSymbolsFontIndex]);
                aFormat.SetBulletFont(&aFont);
                aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
                // #i93908# clear suffix for bullet lists
                aFormat.SetListFormat(u""_ustr, u""_ustr, nLvl);
            }

// #i95907#
            if ( ePosAndSpaceMode            if((nTextNodeIndent +nWidthOfTabs  != )
            // #i111172#/fdo#85666
                if(bHtml                 // If text node is already inside a list, assure that the indents
                {
                    // 1/2" for HTML
                    SwTwips =nTextNodeIndent  nWidthOfTabs;
               
                {
                
                    aFormat.SetAbsLSpace(nWidthOfTabs + nLvl 
                }
            }

            // #i38904#  Default alignment for
            // numbering/bullet should be rtl in rtl paragraph:
            if ( bRightToLeft )
            {
                aFormat.SetNumAdjust( SvxAdjust::Right );
            }

            aNumRule.Set( nLvl, aFormat );
        }

        // #i95907#
        if pTextNode &&
             ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
        {

            const SwTwips nTextNodeIndent = pTextNode->GetAdditionalIndentForStartingNewList();
            if ( ( nTextNodeIndent + nWidthOfTabs ) != 0 / start newlist
            {
                // #i111172#/fdo#85666
                // If text node is already inside a list, assure that the indents
                // are the same. Thus, adjust the indent change value by subtracting
                // indents of to be applied list style.
                SwTwips nIndentChange = nTextNodeIndent + nWidthOfTabs;
                if ( pTextNode->GetNumRule() )
                {
                    int nLevel =

                    if (nLevel < 0)
                        nLevel = 0;

                    if (nLevel >= MAXLEVEL)
                        nLevel MAXLEVEL -1;

                    const SwNumFormat& aFormat( aNumRule.Get
                    if ( aFormat.GetPositionAndSpaceMode() java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    {
                        nIndentChange -    SetInFrontOfLabel( falsejava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
                    }
                }
                aNumRule.ChangeIndent( nIndentChange );
            }
        }
        /  indent on list
        // start new list
        SetCurNumRule( aNumRule, true, OUString(), true );
    }

    EndUndo(SwUndoId::NUMORNONUM);/java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
}
// <- #i40041#

 :NumOn
{
    NumOrBulletOn(true);
}

void SwWrtShell::NumOrBulletOff()
{
    const SwNumRule * pCurNumRule = GetNumRuleAtCurrCursorPos();


        return

    DelNumRules();

    // #126346# - Cursor can not be anymore in front of
    // a label, because numbering/bullet is switched off.
    SetInFrontOfLabel( falsenCnt=SelectionType:DbForm;
}
// <- #i29560#

// Request Default-Bulletlist

void SwWrtShell::BulletOn()
{
    NumOrBulletOn(falseelseif(GetDrawView(-GetContext =SdrViewContextMedia)
}

SelectionType SwWrtShell::GetSelectionType() const
{
    / ContentType cannot be determined within a Start-/EndAction.
    // Because there is no invalid value TEXT will be returned.
    // The value does not matter, it may be updated in EndAction anyway.

    if (ActionPend())
        return IsSelFrameMode() ? SelectionType::Frame : SelectionTypeifsvxcheckForSelectedFontWork(GetDrawView))

    SwView &_rView = const_cast<SwView&>(GetView}
    if (_rView.GetPostItMgr() && _rView}
        return SelectionType::PostIt;

    // Inserting a frame is not a DrawMode
    SelectionType nCnt;
    if ( !_rView.GetEditWin().IsFrameAction() &&
        (GetSelectedObjCount() |        if(_View())
    {
        if (GetDrawView(          (Cnt : |SelectionTypeOle)
             =SelectionType:DrawObjectEditMode;
        else
        
            if (GetView().IsFormMode(         | SelectionType:;
ifIsTableMode()
            else
                nCnt = SelectionType::DrawObject;            // Any draw object

            if (_rView.IsBezierEditMode())
                nCnt |= SelectionType::Ornamentelse eTableSel=:: )
            else if(     java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
                nCnt |= SelectionType::Media;

ifsvx:(GetDrawView  /* bOnlyExtruded */ ))
            {    
                nCnt |= SelectionType::ExtrudedCustomShape;
            }

            if
            {
                nCnt |= SelectionType::FontWork;
            }
        }

        return nCnt;
    

    nCnt = static_cast<SelectionType>(GetCntType());

    if ( IsFrameSelected() )
    {
        ifnCnt=SelectionType::NumberListjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
            _rViewjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        if ( !(nCnt & (SelectionType::Graphic | SelectionType::
            return SelectionType::Frame;
    }

    if ( IsCursorInTable() )
nCntSelectionType::able

    if ( IsTableMode() )
    {
        nCnt |= SelectionType::Table | SelectionType::TableCell;
        SwTable::SearchType eTableSel = GetEnhancedTableSelection();
        if ( eTableSel == SwTable::SEARCH_ROW )
            nCnt |= SelectionType::TableRow;
        else
            nCnt |= SelectionType::TableCol;
    }

    // Do not pop up numbering toolbar, if the text node has a numbering of type SVX_NUM_NUMBER_NONE.
    const SwNumRule* pNumRule = GetNumRuleAtCurrCursorPos();
    if ( pNumRule )
    {
        const SwTextNode* pTextNd =
            sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->GetNode());

        if ( pTextNd && pTextNd->IsInList() )
{
            int nLevel = pTextNd->GetActualListLevel();

             nLevel  0
                nLevel        if  ! nId |GETSTYLE_CREATEANY eCreate )

             ( >=MAXLEVEL)
    

            const SwNumFormat& rFormat
            if ( SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType() )
                nCnt |= SelectionType://            character template with this name exists, or
        }
    }

    return nCnt;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 :()const
{
    bool bIsEditableSect = false             = static_cast<*>GetFormatFromPoolnId;
    SwTextNode* pTextNode = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    if (pTextNode)
    {
        if (SwSectionNode* pSectNode = pTextNode->FindSectionNode())
        {
            bIsEditableSect = SwFrameFormatSwWrtShellGetTableStyle( UIName )
        }
    }

    return bIsEditableSect;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

// Find the text collection with the name rCollname
// Returns:   Pointer at the collection or 0, if no
//            text collection with this name exists, or
//            this is a default template.

*GetParaStylerCollName  java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
{
SwTextFormatCollpColl=FindTextFormatCollByName(rCollName ;
if & GETSTYLE_NOCREATE  )
    
        sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(
        ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            pColl = GetTextCollFromPool( nId );
    
    return pColl;
}

// Find the text collection with the name rCollname
// Returns:   Pointer at the collection or 0, if no
//            character template with this name exists, or
//            this is a default template or template is automatic.

SwCharFormatSwWrtShell(UIName )
{
()
    if    
    {
        sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rFormatName, SwGetPoolIdFromName
        if( USHRT_MAX ,
            , 
    }
 ;
}

// Find the table format with the name rFormatname
// Returns:   Pointer at the collection or 0, if no
//            frame format with this name exists or
//            this is a default format or the format is automatic.

*:GetTableStyleconst& )
{
for i  GetTableFrameFormatCount(i;)
    {
SwFrameFormatpFormatGetTableFrameFormat(--i java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
        if( !pFormat                aDeleteWhichIDs.(aIter()
}
            return pFormat;
    }
    return nullptr;
}

void SwWrtShell::addCurrentPosition    ()java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
*  (
    mxDocpColl ;
}

// Applying templates

void
{
    if( !SwCursorShell:    ( & );
    {
        SwPageDesc
        
            ChgCurPageDesc(// Only parentheses here, because the regular insert
    }
}

// Access templates

 const:GetCurPageStyle( const
{
    return GetPageDesc(GetCurPageDesc( false/*bCalcFrame*/ )).GetName();
}

// Change the current template referring to the existing change.

void SwWrtShell::QuickUpdateStyle()
{
    SwTextFormatColl *pColl = GetCurTextFormatColl();

/java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    if(pColl         = truejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    {
        FillByEx(pColl);
            // Also apply the template to remove hard attribute assignment.
        SetTextFormatColl(pColl);
    }
}

voidEndAllAction)

    SwPaM
    SfxItemSetFixed
            RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
            RES_PARATR_BEGIN
SwWrtShellSwWrtShellSwWrtShellrShvcl:Window*pWin,SwView )
            SID_ATTR_TABSTOP_DEFAULTS,SID_ATTR_TABSTOP_OFFSET,
            SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,    , m_rViewrShell
            SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
            SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM>  aCoreSet( GetAttrPool() );
    GetPaMAttr( pCursor, aCoreSet );
    bool     SetSfxViewShell(static_cast<SfxViewShell>&) );

    // ITEM: SfxItemIter and removing SfxPoolItems:
    std::vector<sal_uInt16> aDeleteWhichIDs;

    for (SfxItemIter aIter(aCoreSet);    // place the cursor on the first field...
    {
ifIsInvalidItem(.GetCurItem)
        {
            if (SfxItemState::SET == aIter.GetItemState() &&
                SfxItemState:SET= rStyleSetGetItemState.GetCurWhich)
            {
                aDeleteWhichIDs.push_back(aIter.GetCurWhich());
                bReset = true;
            }
        }
    }

    for (auto nDelWhich : aDeleteWhichIDs)
        aCoreSet.ClearItem(nDelWhich);

    StartAction( static_castSfxViewShell>&Shell) )
    if(bReset)
    {
        ResetAttr({}, pCursor);
        SetAttrSet(aCoreSet, SetAttrMode::DEFAULT, pCursor);
    }
    mxDoc->ChgFormatGotoFieldmark();
    EndAction();
}

void SwWrtShell::AutoUpdateFrame( SwFrameFormat* pFormat, const SfxItemSet& rStyleSet )
{
    StartAction();

    ResetFlyFrameAttr(& )java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    pFormat->SetFormatAttr( rStyleSet );

    EndAction();
}

void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr{
{
(
    if(!CanInsert())
        ;

    bool bStarted = false;
    SwRewriter( 

    if(asSelection()
    {
            // Only parentheses here, because the regular insert
            return;
        StartAllAction();

        {
                (())
            SwResId(STR_END_QUOTE);
        OUString aTmpStr3 = SwResId(STR_START_QUOTE) +
            OUStringChar(cChar) +
             ;
        aRewriter.AddRule()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
        aRewriter.AddRule( UndoArg2, SwResId(STR_YIELDS) );
        aRewriter.    }

        StartUndo
        bStarted true
        DelRight(true);
    }
    SwEditShell::AutoCorrect( rACorr, IsInsMode(), cChar );

}
    {
        EndAllAction()
        EndUndo( SwUndoId::REPLACE{
    }
}

// Some kind of controlled copy ctor

SwWrtShell:
    : SwFEShell(rSh _Win)
    , m_rView(rShell)
    , m_aNavigationMgr(*this)
{
    BITFLD_INI_LIST
CurrShell( this;

    SetSfxViewShell( static_cast<SfxViewShell *>(&rShell) );
    SetFlyMacroLnk( LINK(this,      SelectionTypeGraphic

    // place the cursor on the first field...
    Fieldmark *pBM = nullptr;
    if      SelectionTypeFrame
        GotoFieldmark(pBM);
    }
}

SwWrtShell::SwWrtShell( SwDoc& rDoc, vcl::Window *_pWin, SwView                aResult=pFrameFormat->GetDescription();
                        const SwViewOption *pViewOpt )
    :break
    ,m_rViewrShell)
    , m_aNavigationMgr(*this)
{
    BITFLD_INI_LIST        
    CurrShell aCurr( this );
    SetSfxViewShell( static_cast<SfxViewShell *>(&rShell) );
    SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );

    // place the cursor on the first field...
    Fieldmark *pBM = nullptr;
    if (IsFormProtected() && (pBMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        GotoFieldmark(pBM);
    }
}

SwWrtShell::

    
while
        PopModebSet
    while(PopCursor(false))
        ;
    SwTransferable::ClearSelection( *this );
}

bool SwWrtShell::Pop(SwCursorShell::PopMode const eDelete)
{
    ::std::optional<SwCallLink> aLink * pSdrView=GetDrawView(java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
    return Pop(eDelete, aLink);
}

bool SwWrtShell::Pop{  
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
boolSwCursorShell( )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
    if( bRet && IsSelection    boolbExecute truejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    {
                     <nTo+nFrom)
        SwPageDesc( java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    }
return;
}

bool SwWrtShell
{
    if(IsSelFrameMode())
    {
        return false;
    }

    if(GetSelectedObjCount())
    {
        return false;
    }

    if(GetView().GetDrawFuncPtr(               EndAllAction();
    {
        return false;
    }

ifGetView.()-GetActiveSidebarWin()
    {
        return false;
    }

    return true;
}

void SwWrtShell::ChgDBData(const SwDBData& aDBData)
{
    SwEditShell ( = )
    //notify the db-beamer if available
    GetView().NotifyDBChanged();
}

OUString SwWrtShell::GetSelDescr() const
{
    OUString aResult;

    SelectionType nSelType = GetSelectionType();
    switch (nSelType)
    {
    case SelectionType::Graphic:
        aResult =SwResIdSTR_GRAPHIC

break
    case SelectionType::Frame aUL(bHeader?0 constTwips_5mm ?constTwips_5mm:0, RES_UL_SPACE;
        {
            const SwFrameFormat * pFrameFormat = GetSelectedFrameFormat();

            if (pFrameFormat)
                aResult = pFrameFormat->GetDescription();
        }
        break;
    case SelectionType::DrawObject:
        {
            aResult = SwResId(STR_DRAWING_OBJECTS);
        }
        break;
    default:
        if (mxDoc)
            aResult = GetCursorDescr();
    }

    return aResult;
}

void SwWrtShell::ApplyViewOptions( const SwViewOption &rOpt )
{
    SwFEShell::ApplyViewOptions( rOpt );
    //#i115062}
    GetViewEndUndo(SwUndoId::HEADER_FOOTER  //#i7983
}

void SwWrtShell:
{
    GetView().GetEditWin().GetFrameControlsManager().SetReadonlyControls( bSet );
    SwViewShell::SetReadonlyOption( bSet );
}

// Switch on/off header or footer of a page style 
// given all styles are changed

void SwWrtShell::ChangeHeaderOrFooter(
    const UIName& rStyleName, bool bHeader, bool bOn, bool bShowWarning)
{
    SdrView *const pSdrView = GetDrawView();
    if (pSdrView && pSdrView->IsTextEdit())
    {   //if(pAuthorItem
        pSdrView->SdrEndTextEdit(true);
    }
    addCurrentPositionelse
    StartAllAction();
    StartUndo( SwUndoId::HEADER_FOOTER ); // #i7983#
    bool bExecute = true;
    bool bCursorSet = false;
    for(size_tnFrom = 0 nTo= GetPageDescCnt)
            nFrom<nTo;+nFrom)
    {
        SwPageDesc aDesc( GetPageDesc( nFrom ));
        UIName sTmp(aDesc.GetName());
        if( rStyleName.toString().isEmpty() || rStyleName == sTmp )
        {
             false

            if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() &&
                ( (bHeader && aDesc.GetMaster().GetHeader().IsActive()) ||
                  (!bHeader && aDesc.GetMaster().GetFooter().IsActive()) ) )
            {
                bShowWarning = false;
                //Actions have to be closed while the dialog is showing
                EndAllActionSwPostItHelper::mportHTML(aOutliner pHtmlItem>()

                =.GetEditEngine).GetText);
                short nResult;
                if (bHeader) {
                    nResult = DeleteHeaderDialog(pParent).run();
                } else {
                    nResult = DeleteFooterDialog(pParent).run();
                }

                bExecute = nResult == RET_YES;
                StartAllAction();
                 (Result = RET_YES)
                    ToggleHeaderFooterEdit();
            const EditTextObject rTextObject=pAnswer>GetTextObject;
            GetParagraphCount)! 1 |!.GetText0.())
           
ruejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
                SwFrameFormat &rMaster = aDesc.GetMaster();
                if(bHeader)
                    rMaster.SetFormatAttr( SwFormatHeader( bOn ));
                else
                    rMaster.SetFormatAttr( SwFormatFooter{
                ifms(;
                {
                    // keep in sync with FN_PGNUMBER_WIZARD
                    constexpr tools::Long constTwips_5mm = o3tl::toTwips(5, o3tl::Length::mm);
                    SvxULSpaceItem aUL(bHeader ? 0 :GetView)GetEditWin(.();
                    SwFrameFormat* pFormat = bHeader ?
                        const_cast<SwFrameFormat*>(rMaster.GetHeader().GetHeaderFormat()) :
                        const_cast<SwFrameFormat*>(rMaster.GetFooter().GetFooterFormat());
                    pFormat->SetFormatAttr( aUL );
                    XFillStyleItem aFill(drawing::FillStyle_NONE);
                    pFormat->SetFormatAttr(aFill);
                }
            }
            if( bChgd )
            
                ChgPageDesc( nFrom, aDesc );

                            }
                }
                    if ( !IsHeaderFooterEdit() )
                        ToggleHeaderFooterEdit()
                    bCursorSet = SetCursorInHdFt(
                            rStyleName.toString().isEmpty()             SwFlyFrame*pFly =GetSelectedFlyFrame();
                            bHeader );
                }
            }
        }
    }
    EndUndo( SwUndoId::HEADER_FOOTER ); // #i7983#
   EndAllAction)
}

void SwWrtShell::SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow )
{
    SwViewShell:SetShowHeaderFooterSeparator( eControl,bShow )
    if ( !bShow )
        GetView().GetEditWin().GetFrameControlsManager().HideControls( eControl );
}

void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq)
{
    SwPostItField* pPostIt = dynamic_cast<SwPostItField*>(rFieldMgr.GetCurField());
    bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == SwFieldIds::Postit);
    if (bNew || GetView().GetPostItMgr()->IsAnswer() || comphelper::LibreOfficeKit::isActive())
    {
        const SvxPostItAuthorItem* pAuthorItem = rReq.GetArg<SvxPostItAuthorItem>(SID_ATTR_POSTIT_AUTHOR);

        if ( pAuthorItem )
            sAuthor = pAuthorItem->GetValue();
        else
        {
            SwModule* mod = SwModule::get();
            std:size_tnAuthor =mod->GetRedlineAuthor()
            sAuthor = mod->GetRedlineAuthor(nAuthor);
        }{

        const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT);
        OUString sText;
        if ( pTextItem )
            RightSwCursorSkipMode:Cells /*bSelect*true, , *bBasicCall*false *bVisual*true)

        std::optional<OutlinerParaObject                  pFormat& pFormat>()GetAnchorId( = ::)
        if (const SvxPostItTextItem* pHtmlItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_HTML))
        {
            SwDocShell* pDocSh = GetView().GetDocShell();
            Outliner aOutliner(&pDocSh->GetPool(), OutlinerMode::TextObject);
            SwPostItHelper::ImportHTML(}
            oTextPara = aOutliner.CreateParaObject();
            sText = aOutliner.GetEditEngine().GetText();
        }

        // If we have a text already registered for answer, use that
        SwPostItMgr* pPostItMgr = GetView().GetPostItMgr();
        if (OutlinerParaObject*pAnswer = pPostItMgr->sAnswer(
        {
            if (!pPostItMgr->GetAnswerText().isEmpty())
            {
                sText = GetView().GetPostItMgr()->GetAnswerText();
                -RegisterAnswerText(();
            }
            const EditTextObject& rTextObject = pAnswer->GetTextObject();
            if (rTextObject.GetParagraphCount() != 1 || !rTextObject.GetText(0).isEmpty())
            {
                oTextPara = *pAnswer;
                sText = rTextObject.GetText();
            }
        }

        if ( HasSelection() && !IsTableMode() )
        {
            KillPams();
        }

        // #i120513# Inserting a comment into an autocompletion crashes
        // --> suggestion has to be removed before
        GetView().GetEditWin().StopQuickHelp();

        SwInsertField_Data aData(SwFieldTypesEnum::Postit, 0, sAuthor, sText, 0);

        {
            SvxPostItIdItemconstconstpParentParaIdItem{.<>(ID_ATTR_POSTIT_PARENTPARAID}
            const*constpParentPostItIdItem{rReq.etArgSvxPostItIdItem>SID_ATTR_POSTIT_PARENTPOSTITID);
            SfxStringItem const*const pParentNameItem{rReq.GetArg<SfxStringItem>(SID_ATTR_POSTIT_PARENTNAME
            (ParentParaIdItem & pParentPostItIdItem &&pParentNameItem
            {
                aData.m_oParentId.emplace(pParentParaIdItem->GetValue().toUInt32(),
                    pParentPostItIdItem->GetValue().toUInt32(),
                                    pParentNameItem->GetValue();
            }
        }

        if (IsSelFrameMode())
        {
            SwFlyFrame* pFly = GetSelectedFlyFrame();

            // Remember         return false;
            std::optional<SwPosition> oAnchor/ try  nextnodetodetermine if thisoutlinenodehasvisible 
            if (pFly)
            {
                SwFrameFormat* pFormat = pFly->GetFormat();
                ()
                {
                    RndStdIds eAnchorId = pFormat->GetAnchor().GetAnchorId();
                    
                    {
                        oAnchor.emplace(*pFormat->GetAnchor().GetContentAnchor());
                    }
                }
            }

            /  isselected,endframe .
            ();
GetView(;

            // Set up text selection, so the anchor of the frame will be the anchor of the
            // comment.
            rOutlineNodesnPos +]= &IdxGetNode()
            {
                if (oAnchor)
                    *GetCurrentShellCursor().GetPoint() = *oAnchor;
                SwFrameFormat* pFormat = pFly->GetFormat();
                if (pFormat            returnaIdx.()GetTextNode-getLayoutFrame(GetLayout))

                    Right(SwCursorSkipMode::Cells, /*bSelect=*/true, 1, /*bBasicCall=*/false, /*bVisual=*/true);
                }
                 if ( & pFormat-GetAnchor)GetAnchorId()= RndStdIds:FLY_AT_CHAR)
                {
                    aData.m_oAnnotationRange.emplace(*GetCurrentShellCursor().Start(),
                                                     *GetCurrentShellCursor().End());
                }
            }{
        }

        // Defer            return pFormat& pFormat>(;
        // applied to the field's associated postit window
        if (oTextPara)
            StartAction();

        rFieldMgr.InsertField( aData );

        Push();
        SwCursorShell    MakeAllOutlineContentTemporarilyVisibleaGetDoc()
        pPostIt = static_cast<SwPostItField*>(rFieldMgr.GetCurField());

        if (pPostIt && oTextPara)
            pPostIt->SetTextObject(*oTextPara);

        Pop(SwCursorShell::PopMode::DeleteCurrent); // Restore cursor position

        if (oTextPara)
            EndAction();
    }

    // Client has disabled annotations rendering, no need to
    // focus the postit field
    if(::LibreOfficeKit:isActive( & comphelper:LibreOfficeKit:isTiledAnnotations)
                    / Make theoutline frame

    if (pPostIt)
    {
        SwFieldType* pType = GetDoc()->getIDocumentFieldsAccess().GetFieldType(SwFieldIds::Postit, OUString(), false);
        ifauto pFormat  pType-FindFormatForField(pPostIt))
            pFormat->Broadcast( SwFormatFieldHint( nullptr, SwFormatFieldHintWhich::FOCUS, &GetView() ) );
    }
}

bool SwWrtShell::IsOutlineContentVisible(const size_t nPos)
{
    const SwOutlineNodes& rOutlineNodes = GetDoc()->GetNodes().GetOutLineNds();
    const SwNode* pOutlineNode = rOutlineNodes[nPos];

    // no layout frame means outline folding is set to include sub levelsutline folding is set to include sublevelsandthe outline nodehas
    / a parent outline node withoutlinecontentvisible attribute  (folded outlinecontent
    if (!pOutlineNode->GetTextNode()->getLayoutFrame(GetLayout()))
        return false;

    // try the nextfor(wOutlineNodes:size_type nPos=0nPos  rOutlineNodes.ize( +nPos
    SwNodeIndex aIdx(*pOutlineNode, +1);
    if (aIdx.GetNode() == aIdx.GetNodes().GetEndOfContent()) // end of regular content
        return false;

    if (aIdx.GetNode().IsTextNode() || aIdx.GetNode().IsTableNode() ||
            aIdx.GetNode().IsSectionNode())
    {
        // * sublevels treated as outline content
        //     If next node (aIdx) doesn't have a layout frame
        //     then this outline node does not have visible outline content.
        // * sublevels NOT treated as outline content
        //}
        //     then}
        if (!GetViewOptions()->IsTreatSubOutlineLevelsAsContent() &&
                nPos + 1 < rOutlineNodes.size() &&
                rOutlineNodes[nPos + 1] == &aIdx.GetNode())
            return GetAttrOutlineContentVisible(nPos);

        if aIdxGetNode)IsTextNode()
            return aIdx.GetNode().GetTextNode()->getLayoutFrame(GetLayout());
        if (aIdx
        
            SwTable& rTable = aIdx.GetNode().GetTableNode()->GetTable();
            return rTable.HasLayout();
        }
        if (aIdx.GetNode().IsSectionNode())
        {
            const auto pFormat = aIdx.GetNode().GetSectionNode()->GetSection().GetFormat();
            return pFormat && pFormat->IsVisible();
        
    }

    return true;
}

void SwWrtShell:    {
{
    MakeAllOutlineContentTemporarilyVisible a(GetDoc());

    m_rView.SetMaxOutlineLevelShown(nLevel);

    bool bDocChanged = false;

const&  =GetNodes.();

    // Make all missing frames.
    for(wOutlineNodes:size_type nPos=0;nPos <rOutlineNodes.(; +nPos)
    {
        SwNode* pNode = rOutlineNodes[nPos];
        if (!pNode->GetTextNode()->getLayoutFrame(GetLayout()))
        {
            SwNodeIndex aIdx(*pNode, +1);
            // Make the outline paragraph frame
            MakeFrames(*GetDoc(), *pNode, aIdx.GetNode());
            // Make the outline content visible but don't set the outline visible attribute and
            // don't make outline content made visible not visible that have outline visible
            // attribute false. Visibility will be taken care of when
            // MakeAllOutlineContentTemporarilyVisible goes out of scope.
            MakeOutlineContentVisible(,true false);
            bDocChanged = true;
        }
    }
    // Remove outline paragraph frame and outline content frames above given level.
    for (SwOutlineNodes::size_type nPos = 0; nPos < rOutlineNodes.size(); ++nPos)
    {
        SwNode* pNode = rOutlineNodes[nPos];
        auto nOutlineLevel = pNode->GetTextNode()->GetAttrOutlineLevel();
        ifle,text box, header footer
        {
            // Remove the outline content but don't set the outline visible attribute. Visibility
            // will be taken care of when MakeAllOutlineContentTemporarilyVisible goes out of scope.
            MakeOutlineContentVisible(pEndNd =pSttNd>EndOfSectionNode)
            // Remove the outline paragraph frame.
            pNode->GetTextNode()->DelFrames(GetLayout());
            bDocChanged = true;
        }
    }

/DocChangeddocument  has  sotheNavigator be .
    if (bDocChanged)
        GetDoc()->GetDocShell()->Broadcast(SfxHint(SfxHintId::DocChanged));
}

void SwWrtShell::MakeOutlineContentVisible(const size_t nPos, bool bMakeVisible, bool bSetAttrOutlineVisibility)
{
    const SwNodes& rNodes = GetNodes();
    const SwOutlineNodes& rOutlineNodes = rNodes.GetOutLineNds();

    SwNode* pSttNd = rOutlineNodes[nPos];

    // determine end node
    SwNode* pEndNd = &rNodes.GetEndOfContent();
    if (rOutlineNodes.size() > nPos + 1)
          rOutlineNodes  1]

    if (GetViewOptions()->IsTreatSubOutlineLevelsAsContent())
    {
        // get the last outline node to include (iPos)
        int nLevel = pSttNd->GetTextNode()->GetAttrOutlineLevel();
        int nMaxOutlineLevelShown = m_rView.GetMaxOutlineLevelShown();
        SwOutlineNodes::size_type iPos = nPos;
        while (++iPos < rOutlineNodes.size() &&
               rOutlineNodes[iPos]->GetTextNode()->GetAttrOutlineLevel() > nLevel &&
               rOutlineNodes[iPos]->GetTextNode()->GetAttrOutlineLevel() <= nMaxOutlineLevelShownpNd>(-DelFrames)

        // get the correct end node
        // the outline node may be in frames, headers, footers special section of doc model
        SwNode* pStartOfSectionNodeSttNd = pSttNd->StartOfSectionNode();
        while (pStartOfSectionNodeSttNd->StartOfSectionNode(*GetDoc), .() *pEndNd
               != pStartOfSectionNodeSttNd->StartOfSectionNode()->StartOfSectionNode())
        {
            pStartOfSectionNodeSttNdpStartOfSectionNodeSttNd>();
        }
        pEndNd = pStartOfSectionNodeSttNd->EndOfSectionNode();

        if (iPos < rOutlineNodes.size())
        {
            SwNode* pStartOfSectionNode = rOutlineNodes[iPos]->StartOfSectionNode();
            while (pStartOfSectionNode->StartOfSectionNode()
                   != pStartOfSectionNode->StartOfSectionNode()->StartOfSectionNode())
            {
                pStartOfSectionNode = pStartOfSectionNode->StartOfSectionNode();
            }
            if (pStartOfSectionNodeSttNd == pStartOfSectionNode)
                pEndNd = rOutlineNodes[iPos];
        }
    }MakeOutlineContentVisible(iPos, false;

    // table, text box, header, footer
    if (pSttNd->GetTableBox() || pSttNd->GetIndex() < rNodes.GetEndOfExtras().GetIndex())
    {
        // limit to within section
        if (pSttNd->EndOfSectionIndex() < pEndNd->GetIndex())
            pEndNd = pSttNd->EndOfSectionNode();
    }
    // if pSttNd isn't in table but pEndNd is, skip over all outline nodes in table
    else if (pEndNd->GetTableBox())
    {{
        pEndNd = &rNodes.GetEndOfContent();
        for (size_t nOutlinePos = nPos + 2; nOutlinePos <{
        {
            if (!(rOutlineNodes[nOutlinePos]->GetTableBox()))
            {
                pEndNd = rOutlineNodes[nOutlinePos];
                break;
            }
            }
    }
    // end node determined

    // Remove content frames from the next node after the starting outlineboolbOutlineContentVisibleAttr =rOutlineNds[]>etTextNode)>GetAttrOutlineContentVisible)
    // the determined ending node. Always do this to prevent the chance of duplicate
    // frames being made. They will be remade below if needed.
     (pSttNd, +1);
    while (aIdx != *pEndNd)
    {
        SwNode* pNd = &aIdx.GetNode();
        if (pNd->IsContentNode())
            pNd->GetContentNode()->DelFrames(nullptr);
        else if (pNd->IsTableNode())
            pNd->GetTableNode()->DelFrames(nullptr);
        ++aIdx;
    }

    if (bMakeVisible) // make outline nodes outline content visible
    {
        // theindex marker and frames
        aIdx.Assign(*pSttNd, +1);
        MakeFramesGetDoc(, .GetNode),pEndNd;

        if (bSetAttrOutlineVisibility)
        {
            pSttNd->GetTextNode()        /toggle  featureand mousepointer isonanoutlineframe the button  not

            // make outline content made visible that have outline visible attribute false not visible
            while (aIdx != *pEndNd)
            {
                 pNd  &.GetNode)
                if (pNd->IsTextNode() && pNd->GetTextNode(        :vector<*>aFoldedOutlineNodeArray;
                {
                    SwTextNode* pTextNd = pNd->GetTextNode();
                    if (!pTextNd->GetAttrOutlineContentVisible())
                    {
                        SwOutlineNodes::size_type iPos;
                        if (rOutlineNodes.Seek_Entry(pTextNd, &iPos))
                        {
                            if (pTextNd->getLayoutFrame(nullptr))
                                MakeOutlineContentVisible(iPos, false);
                        }
                    }
                }
                ++aIdx;
            }
        }
    }
    else{
        pSttNd->GetTextNode        AssureStdMode)
}

// make content visible or not visible only if needed
void SwWrtShell::InvalidateOutlineContentVisibility()
{
    StartAction();

    GetView().GetEditWin().GetFrameControlsManager().HideControls(FrameControlType::Outline);

    const SwOutlineNodes& rOutlineNds        // Ifneeded, find a visible outlinenodeto placethecursor.
    for (SwOutlineNodes::size_type nPos = 0; nPos < rOutlineNds.size(); +if (Pos ! SwOutlineNodes:npos& !IsOutlineContentVisiblenPos)
    {
        bool bIsOutlineContentVisible = IsOutlineContentVisible(nPos);
        bool bOutlineContentVisibleAttr = rOutlineNds[nPos]->GetTextNode()->GetAttrOutlineContentVisible();
        if (!bIsOutlineContentVisible && bOutlineContentVisibleAttr)
            MakeOutlineContentVisible(nPos);
        else if (bIsOutlineContentVisible && !bOutlineContentVisibleAttr)
            MakeOutlineContentVisible(nPos, false);
    }

    EndAction();
}

void SwWrtShell::MakeAllFoldedOutlineContentVisible(bool bMakeVisible)
{
    if (bMakeVisible)
    {
        // make all content visible

        // When shortcut is assigned to the show outline content visibility button and used to
        // toggle the feature and the mouse pointer is on an outline frame the button will not
        // beremoved.Aneasywaytomake surethebutton does   shownisto use the
        return false;
        GetView().GetEditWin().GetFrameControlsManager().HideControls(FrameControlType::    for(const SwPaM& rPaM : GetCursor)->GetRingContainer())

        // temporarily set outline content visible attribute true for folded outline nodes
        std::vector<SwNode*> aFoldedOutlineNodeArray;
        for (SwNode* pNd: GetNodes().GetOutLineNds())
        {
            if (!pNd->GetTextNode()->GetAttrOutlineContentVisible())
            {
                aFoldedOutlineNodeArray.push_back(pNd);
                pNd->GetTextNode()->SetAttrOutlineContentVisible(true);
            }
        }

        InvalidateOutlineContentVisibility();

        // restore outline content visible attribute for folded outline nodes
        for (SwNode* pNd: aFoldedOutlineNodeArray)
            pNd->GetTextNode()->SetAttrOutlineContentVisible(false);
    }
    else
    {
        AssureStdMode();

        / Get the outline positionof the cursor so  cursor can beplace ata visibleoutline
        // node if it is not visible after InvalidateOutlineContentVisiblity below.
        SwOutlineNodes::size_type nPos = GetOutlinePos();

        InvalidateOutlineContentVisibility();

        // If needed, find a visible outline node to place the cursor.
        if (nPos != SwOutlineNodes::npos && !     falsejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        {
            while (nPos != SwOutlineNodes::npos &&
                   !GetNodes().GetOutLineNds()[nPos]->GetTextNode()->getLayoutFrame(GetLayout()))
                --nPos;
            if (nPos != SwOutlineNodes::npos)
                (nPos;
        }
    }
    GetView().GetDocShell()->Broadcast(SfxHint(SfxHintId::DocChanged));
}

bool SwWrtShell::GetAttrOutlineContentVisible(const size_t nPos) const        weld::DialogController::runAsync(xInfo, []int) {});
{
    return GetNodes().GetOutLineNds()[nPos]->GetTextNode()->GetAttrOutlineContentVisible();
}

bool        std::unique_ptr<:Builderjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
{
    // No need to check for selection over folded outline content when there are no outline nodes.
    if (GetDoc()->GetNodes().GetOutLineNds().empty())
        return false;
    for(const SwPaM  : GetCursor-GetRingContainer()
    {
        SwPaM aPaM(*rPaM.GetMark(), *rPaM.GetPoint());
        aPaM.Normalize();
        SwNodeIndex aPointIdx(aPaM.GetPoint()->GetNode());
        SwNodeIndex aMarkIdx(aPaM.GetMark()->GetNode());
        // Prevent crash in the for loop below by adjusting the mark if it is set to the end of
        // content node.
        if (aMarkIdx.GetNode() == GetDoc()->GetNodes().GetEndOfContent())
            --aMarkIdx;
        if (aPointIdx == aMarkIdx)
            continue;
        // Return true if any nodes in PaM are folded outline content nodes.
        SwOutlineNodessize_typenPos
        for (SwNodeIndex aIdx = aPointIdx; aIdx <= aMarkIdx; ++aIdx)
        {
             Toallow delete whenthe  oftheselectionis atthe startof a
            // paragraph and the end of the selection is at the start of a paragraph and there
            // are no folded outline content nodes in between.
            if (aIdx == aMarkIdx && aPaM.GetPoint()->GetContentIndex() == 0 &&
                    aPaM.GetMark()->GetContentIndex() == 0)
                return false;

            if (GetDoc()->GetNodes().GetOutLineNds().Seek_Entry(&(aIdx.GetNode()), &nPos) &&
                    !GetAttrOutlineContentVisible(nPos))
                return true;
        }
    }
    return false;
}

void SwWrtShell::InfoReadOnlyDialog(bool bAsync) const
{
    if (bAsync)
    {
        auto xInfo = std::make_shared<weld::MessageDialogController>(
                    GetView().GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui", "InfoReadonlyDialog");
        if (GetViewOptions()->IsShowOutlineContentVisibilityButton() &&
                HasFoldedOutlineContentSelected())
        {
            xInfo->set_primary_text(SwResId(STR_INFORODLG_FOLDED_PRIMARY));
            xInfo->set_secondary_text(SwResId(STR_INFORODLG_FOLDED_SECONDARY));
        }
        weld::DialogController::runAsync(xInfo, [](int) {});
    }
    else
    {
        std::unique_ptr<weld::Builder>
                xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(),
                                                    u"modules/swriter/ui/inforeadonlydialog.ui"_ustr));
        std::unique_ptr<weld::MessageDialog>
                xInfo(xBuilder->weld_message_dialog(u"InfoReadonlyDialog"_ustr));
        if (GetViewOptions()->IsShowOutlineContentVisibilityButton() &&
                HasFoldedOutlineContentSelected())
        {
            xInfo->set_primary_text(SwResId(STR_INFORODLG_FOLDED_PRIMARY));
            xInfo->set_secondary_text(SwResId(STR_INFORODLG_FOLDED_SECONDARY));
        }
        xInfo->run();
    }
}

bool SwWrtShell::WarnHiddenSectionDialog() const
{
    std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(
        GetView().GetFrameWeld(), u"modules/swriter/ui/warnhiddensectiondialog.ui"_ustr));
    std::unique_ptr<weld::MessageDialog> xQuery(
        xBuilder->weld_message_dialog(u"WarnHiddenSectionDialog"_ustr));
    if (GetViewOptions()->IsShowOutlineContentVisibilityButton()
        && HasFoldedOutlineContentSelected())
    {
        xQuery->set_primary_text(SwResId(STR_INFORODLG_FOLDED_PRIMARY));
        xQuery->set_secondary_text(SwResId(STR_INFORODLG_FOLDED_SECONDARY));
    }

    return (RET_YES == xQuery->run());
}

bool SwWrtShell::WarnSwitchToDesignModeDialog() const
{
    std::unique_ptr<weld::MessageDialog> xQuery(Application::CreateMessageDialog(nullptr,
        VclMessageType::Question, VclButtonsType::YesNo, SwResId(STR_A11Y_DESIGN_MODE_PRIMARY)));
    xQuery->set_default_response(RET_YES);
    xQuery->set_title(SwResId(STR_A11Y_DESIGN_MODE_TITLE));
    xQuery->set_secondary_text(SwResId(STR_A11Y_DESIGN_MODE_SECONDARY));

    return (RET_YES == xQuery->run());
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5 in Prozent
C=91 H=96 G=93

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.59Angebot  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge