products/Sources/formale Sprachen/C/LibreOffice/sw/source/uibase/wrtsh/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 100 kB image not shown  

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.
 *
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 * License, v. 2.0. If a    , Version20(he"";youmaynotusethisfile
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  file incorporates work by the followinglicense notice:
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
      Apache Foundation ()  one or more
 graph>
 # comphelper/.hxxjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
      licensesthis file  you  theApache
   Version.0( "")  may  use  file
 *except  compliancewith theLicense.Youmayobtain a copy of
 # sfx2/bindings.xx>
 */


#<///beans
#include <com//java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
includecom/sunstar/embed.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <com/sun/star/embed/EmbedVerbs.hpp>
#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#include<osl/diagnoseh>
#nclude <ot.hxx>
#include <svx/xfillit0.hxx>
#include <svxhdft.hxx
#include <svx/svdview.hxx
#include<PostItMgr>
 <oolsbiginthxx
#include <svtools/insdlg<fldmgr.>
includesfx2/ipclient.xx
#include <editeng/editeng.hxx>
includeediteng.hxx
#include <fmtfld.xx
.hxx
includeediteng.hxxjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
#include <vcl/.hxx
#include <unotools/charclass/postattr>
## <comphelper/lok.xx
#include <comphelperincludecomphelper/.hxxjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
#include <svx/#nclude svl/numformathxxjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
#include <svx.hxx
#include frmtool.hxx
#includeincludeviewopthxx
#includejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#include<fmtftn.hxx>
#include <UndoInserthxx
#include <
#using namespace:mark
#nclude wdocsh>
#include <swmodule.hxx>
#include <wrtsh.hxx {
#include <view
void(const& , const & )
<pagedesc>
#include <.hxx
#include <swundo.aAction=rAction;
#include<wcli>
#include <aDescription = "riter_edit"java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
helper
#include <edtwin.hxx>
#include <fmtcol.hxx>
#include <swtable.hxx>
#include <viscrs.hxx>
#include <swdtflvr
#include <}
#include <IDocumentSettingAccess.hxx>
#include <SwCapObjType.hxx>
#include <SwStyleNameMapper.hxx>
#include <sfx2/request.hxx>
#include <paratr.hxx>
#include <ndtxt.hxx>
#include <editengacorrcfghxx
#include <java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 28
#include <flyfrm.hxx

// -> #111827#
includeSwRewriter>
#   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// <- #111827#

#include <toolkit/helper/vclunohelper.         ( & pTextNode>IsOutline)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
#include <sfx2/viewfrm.hxx>
#include <vcl/uitest/loggerif(pTextNodeGetAttrOutlineContentVisible()
#include <vcl/uitest/eventdescription.hxx>
#include <osl/diagnose.h>
#include <o3tlreturn false
#include </Office.hxx

#include <PostItMgrhxx
#include <FrameControlsManager.hxx>
#include <fldmgr.hxx>
#include <docufld BITFLD_INI_LIST
IDocumentFieldsAccess>
#include <fmtfld.hxx>

#include <sfx2/msgpool.hxx>
#include <sfx2/msg.hxxm_bAddMode \
#include <svtoolsembedhlp>
#include <svtoolsm_bExtMode 
#includem_bInSelect 
#svxpostattr
#include <  java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
#include <comphelper
#include* ()
#include <java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#include <svl.hxx
#include <memory>

#nclude "/.core/rsr/callnkhxxjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
#nclude frmtool>
#include <viewopt.hxx>

#include <IDocumentRedlineAccess.hxx>
#include <IDocumentUndoRedohxx>
#include <UndoInsert.hxx>
#include <UndoCore.hxx>
#include <formatlinebreak.hxx>
#include <formatcontentcontrol.hxx>


using namespace sw:         = nullptr;
using java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
namespace{

void collectUIInformationjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
    EventDescription
    aDescriptionaAction=rAction;
    aDescription.aParameters = {{"parameters", aParameters}};
    aDescription{
    aDescription        ()
    aDescription
    UITestLoggerjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

}

sal_uInt32MakeAllOutlineContentTemporarilyVisiblenLock = 0= ;

static truejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    {
        SwTextNode
    ifrStr( java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        
            sal_Int32 nPos  , nStt ;
            if (!pTextNode->GetAttrOutlineContentVisible())
                return( ;  <rStr() ++)
        }
    }        boolbTmpDelim ().isLetterNumeric , nPos )
    return ;
}

#define BITFLD_INI_LIST \
         = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
m_bIns=true\
        m_bAddMode = \
        m_bBlockMode = \
de=\
        m_bInSelect = \
    
         !=nPos
        m_bSelLn( rStrcopy , nPos-nStt))
        m_bRetainSelection = false; \
}

static SvxAutoCorrect* lcl_IsAutoCorr()
{
    void::Insert constOUString &Str )
    if(    ResetCursorStack(;
                            ACFlags:: |ACFlags:hgOrdinalNumber|ACFlags:TransliterateRTL java.lang.StringIndexOutOfBoundsException: Index 109 out of bounds for length 109
                            java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                            ACFlags:SetDOIAttr)
        pACorr = nullptr;
    returnbCallIns  m_bIns/java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}

void SwWrtShell
{
    if(bHideCursor)
        HideCursor();
}

void SwWrtShell::Edit()
{
    if(CanInsert)
    {
        ShowCursor();
    }
}

bool java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    SwMvContext aMvContext, SwResIdSTR_YIELDS);
    if(IsEndPara() && !IsSttPara())
        return true;

    return IsEndWord                 +SwResId);
}

// Insert string
voidjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    if( rStrbStartedtrue;
                Push);

    bool bDelim = GetAppCharClass// let's interpret a selection within the same node as "replace"
sal_Int32  ,nStt0
    for( ; nPos::::eleteCurrent / Restore selection (if tracking changes)
     NormalizePamfalse / tdf#127635 put point at the end of deletion
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ifbTmpDelim 
        {
            Insert
            nSttnPos
        }
    }
    (  !  )
(copy - )
}

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

    bool bStarted = false;
    boolbHasSel(
         bCallIns = m_bInsif ()
    booljava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

            pContentControl->SetShowingPlaceHolderfalse;
    {
            // Only here parenthesizing, because the normal
            // insert is already in parentheses at Editshell.}
        StartAllAction    if( bStarted )

        SwRewriter        ();

        .AddRuleUndoArg1 GetCursorDescr;
        aRewriter// Maximum height limit not possible, because the maximum height
        // of the current frame can not be obtained.
            OUStringvoid SwWrtShell:InsertGraphicconstOUStringrPath const OUString&Filter,
                 + SwResIdSTR_END_QUOTE)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

                                 nAnchorType )
        }

        StartUndo(SwUndoId::REPLACE, &aRewriter);
        bStarted = true;
        ();
        // let's interpret a selection within the same node as "replace"        return;
        bDeleted
PopSwCursorShell:::DeleteCurrent) / Restore selection (if tracking changes)
        NormalizePam(false); // tdf#127635 put point at the end of deletion
        ClearMark;
    }

    bCallIns ?
        SwEditShell

//  whethernode iscontent control
    SwTextContentControl* pTextContentControl = CursorInsideContentControl// Inserted graphics in its own paragraph,
    if (pTextContentControl)
    {
        std::shared_ptr<SwContentControl
            pTextContentControl->GetContentControl().GetContentControl();
        if (pContentControl)
        {
            // Set showingPlcHdr to false as node has been edited
            pContentControl->SetShowingPlaceHolder(false);
        }
    }

    if( bStarted )
    {
    {
EndAllAction;
    }
}

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

void
        
                                RndStdIds nAnchorType )
{
    ResetCursorStack();
if CanInsert()
        return;

    StartAllAction();

        /because of DEFFramesize


    StartUndo(SwUndoId::INSERT, &aRewriter)       pFrameMgr>(RES_FRM_SIZE

    if ( HasSelection() )
        DelRight
        // Inserted graphics in its own paragraph,
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    //For i120928,avoid to split nodejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

EnterSelFrameMode;

    bool bSetGrfSize>(  );
    bool bOwnMgr        else if(aSzWidth! DFLT_WIDTH& aSzHeight( =DFLT_HEIGHT )

    if ( !pFrameMgr )
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 5
        pFrameMgrSetHeightSizeType(::);
        }

        // CAUTION
        // GetAttrSet makes an adjustment
        // While pasting is a SwFrameSize present
        // because of the DEF-Framesize
        // These must be removed explicitly for the optimal size.(IsRedlineOn)&  ! RndStdIds:FLY_AS_CHARjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
            

        if ll:(rPath , rGrf&->();
            // Something other than at-para was requested.
            pFrameMgr    if bSetGrfSize)
    }
    else
    {
        Size aBoundGetGraphicDefaultSize(;
        ifsal_Int32 =mxDocgetIDocumentSettingAccess(.();
        
aSz(o3tl:toTwips1 ::::cm)
            aSz.setHeight(o3tl::toTwips(1, o3tl{
            pFrameMgr->SetSize( aSz );
        
        else nHeight=o3tltoTwips(SizePixel.()/double(nPreferredDPI,o3tl::in
            bSetGrfSizeaGrfSizeSize(Width,nHeight

        pFrameMgr->else
    }

    // during change tracking, insert the image anchored as character
            // Add the margin attributes to GrfSize,
    if  IsRedlineOn &nAnchorType=RndStdIds:FLY_AS_CHAR )
        pFrameMgr        .AdjustWidth(pFrameMgr>CalcWidthBorder);

    // Insert the graphic
SwFEShellInsert,rFilter&Grf,&FrameMgr-GetAttrSet())
    if ( bOwnMgr )
        pFrameMgr->UpdateAttrMgr();

    if( bSetGrfSize )
    {
        Size aSizePixel = rGrf.GetSizePixel();
SizeaBound  GetGraphicDefaultSize;

        sal_Int32 nPreferredDPI = mxDoc->getIDocumentSettingAccess().getImagePreferredDPI();
        Size aGrfSize;

        if (nPreferredDPI )
        {
            auto nWidthif(aGrfSize.Width(  .Width )
            auto nHeight            .setWidth.Width ;
            = SizenWidth, nHeight
        }        
        else
        {
            GetGrfSize(        ( aGrfSize()  aBound( 


/java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                pFrameMgr-SetSize aGrfSize)
        aGrfSize.AdjustWidth(FrameMgr-CalcWidthBorder() ;
        aGrfSize.AdjustHeight    

        const BigInt aTempWidth( aGrfSize.Width() );
        const BigInt aTempHeight( aGrfSizedelete;

        EndAllAction();
        if( aGrfSize.Width() > aBound
        {
            aGrfSize.setWidth( aBound.Width() );
            aGrfSize.setHeight( BigInt(aBoundjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 9
        sal_uInt16 
        if( aGrfSize.
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            aGrfSize.if(xRef()
aGrfSize(BigIntaBound()   /aTempHeight;
        }
pFrameMgrSetSizeaGrfSize)
        pFrameMgr->UpdateFlyFrame   ;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if  bOwnMgr
        delete pFrameMgr;

            OUString aName
    EndAllActionjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [29, 1) out of bounds for length 1

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

void SwWrtShell
                               std:<weldMessageDialog (
{
    ResetCursorStacknullptr ::, VclButtonsTypeOkjava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
    if( !CanInsert() )
        xError()

    if !xRef() )
    {
                            
        ::EmbeddedObjectRef xObj
        uno::Reference < embed                    .Remove SwDocShell:actory().GetClassId);
        bool bDoVerb = true;
        if                    fallthrough]]
        {
            comphelperEmbeddedObjectContaineraCnt );
            OUStringaNamejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
            // TODO/LATER: get aspect?
            xObj.const* pSlot=pSlotPool>(nSlotId)
        }
        else
{
            SvObjectServerList aServerList;
 ()
            {
                case:
                {
if (officecfg:Office:::Security
                    
stdunique_ptrweld>(
                            Application::CreateMessageDialog(
 nullptrVclMessageType:Warning,VclButtonsType:Ok
                                SvtResId(STR_WARNING_ACTIVE_CONTENT_DISABLEDaIconMediaType

                        break;
                    
                    aServerListxIconMetaFileis) ::Aspects:SOLE_ICON :embed:Aspects: );
                    aServerList.Remove( SwDocShell::Factory().GetClassId() );
                    [[fallthrough]];
                }

                // TODO/LATER: recording! Convert properties to items
                caseSID_INSERT_FLOATINGFRAME:
                {
                    SfxSlotPool*                    }
                    SfxSlotpSlot =pSlotPool-GetSlot);
                    OUString aCmd = pSlot                }
                    SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory:break
                    ScopedVclPtr}
                                aCmdif .is 
                    if (pDlg)
                    {
                        pDlg->Execute()            
eateNew(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
                        OUString aIconMediaType() GetView.(),xObj
                        uno:Reference< io: >xIconMetaFile ->GetIconIfIconified aIconMediaType
                        xObj.Assign( pDlg-                
xIconMetaFile.()  embed:Aspects:::::MSOLE_CONTENT ;
                        if ( xIconMetaFile.is() )
                            xObj.SetGraphicStream( {
                    

                    ;
                }

                default:
                    break;
            }
        }

        if ( xObj.is() )
        {
                                 aSizexObj.etSize aMapMode )java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
            {
                * pClient ()FindIPClient .GetObject(), &GetView(.etEditWin))
                if ( equestObjectResizeaAreaxObj.etObject);
                {
                    pClient                    CalcAndSetScale  );
java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 52
                }

                if ( xObjpClientDoVerb::EmbedVerbs:MS_OLEVERB_SHOW);
                
                    SwRect =GetAnyCurRectCurRectTypeFlyEmbeddedPrt,nullptr,xObj.() )
                    aArea.Pos() += GetAnyCurRect( CurRectType:           java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                    MapModeInsertOleObject(xRefjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                    Size aSize}
                    aArea.Width( aSize.Width() );
                    aArea.Height( aSize.Height() );
                    RequestObjectResize( aArea, xObj.GetObject() );
                }
                else
                    CalcAndSetScale( xObj );

    /tdf#125100 Ensure that ole object is initially shown as pictogram
  //DoVerb in the SfxViewShell
                pClient>DoVerb(embed:EmbedVerbsMS_OLEVERB_SHOW);

                // TODO/LATER: set document name - should be done in Client
            }
        }
    }
    else
    {
tion() )
            DelRight
        InsertOleObject( xRef );
    }
}

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

bool SwWrtShell::InsertOleObject( const svt    //   passed to the Object
{
    //tdf#125100 Ensure that ole object is initially shown as pictogram
    comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = 
    bool bSaveUserAllowsLinkUpdate = rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
    rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true);

    ResetCursorStack();
    StartAllAction();

    StartUndo(SwUndoId::booltrue

    //Some differences between StarMath and any other objects:
    
    //   passed to the Object
    //2. If the cursor is at the end of a non empty paragraph a paragraph->( ->GetDocShell>etModel java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
//   break should be inserted. StarMath objects are character bound and
    //   no break should be inserted.
    //3. If an selection is passed to a StarMath object, this object shouldif( )
    //   not be activated. false should be returned then. aMathData
    boolbStarMath=true;
    bool bActivate = true;

    // set parent to get correct VisArea(in case of object needing parent printer)
unoReference  container: > xChild( xRefGetObject,::UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
    if(xChild() )
        xChild->setParent( mxDocif (.is)

    SvGlobalName aCLSID( xRef->getClassID() );
    bStarMath = ( SotExchange
    if( IsSelection() )
    {
        if( bStarMath )
        {
            OUString aMathData;
            GetSelectedText( aMathData, ParaBreakType::ToOnlyCR );

            if( !aMathData                    
            
                uno::Reference < beans{
}
                {
                    try
                    {
                        xSet>(uFormula_, uno:Any(aMathData ))java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
                        bActivate  false
                    }
                    catchSwFEShell:SplitNode , false)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
                    {
                    
                }
            }
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        DelRight
    

    if ( !bStarMathSwRect;
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 45

    EnterSelFrameMode();

    const SvGlobalName    MapModeaMapMode(MapUnit:MapTwipjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
    SvGlobalName aObjClsId;
    if (xRef.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    {
        aObjClsIdif .Width .Width)
        
    
    SwFlyFrameAttrMgr aFrameMgr        .setWidth(aBound() )java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
aFrameMgrSetHeightSizeType::Fixed

    SwRect
    CalcBoundRect(    if ( &getIDocumentSettingAccess(: java.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108

  the server
    MapMode java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    Size    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    //Object size can be limited
     (.Width)>aBoundWidth( 
    {
        //Always limit proportional.
        aSzsetHeight .Height)* .Width  .Width ;
        aSz.setWidth( aBound            ::EmbeddedObjectRef:( xEmbeddedObj)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 5
                 (.is&&
matpFormat=SwFEShell:InsertObject(xRef aFrameMgr())

    // --> #i972#
    if            {{
        AlignFormulaToBaseline xRefGetObject ;

    if (pFlyFrameFormat)
        *pFlyFrameFormat = pFormat;

    if ( SotExchange::IsChart ) )
    {
        const uno::                    ::( false))
         (xEmbeddedObj.() )
        {
bool = false
            svt::EmbeddedObjectRef::TryRunningState{
            xModifiable-setModifiedtrue ;
                }
                 ( xProps->getPropertyValue(u"DisableDataTableDialog"}
                 bDisableDataTableDialog
            {
                xProps->setPropertyValue(u    ().utoCaptionOLE_CAP,&);
      unoAny false ) )
                xProps->setPropertyValue(u"DisableComplexChartTypes"_ustr (bStarMath
                   unoAny ) );
                uno::Reference       SotExchangeIsChart aCLSID)
                  .is
                {
xModifiable>setModified true)
                }
            }
java.lang.StringIndexOutOfBoundsException: Range [20, 9) out of bounds for length 9
    }

    EndAllAction();
    GetView().AutoCaption(OLE_CAP, // verb into the server.

    SwRewriter aRewriter

    if ( bStarMath )
        aRewriter.AddRule(UndoArg1,          ().GetViewFrame(.()IsInPlace( java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    elseif( SotExchange:sChart(  ) )
aRewriter.ddRule(, SwResIdSTR_CHARTjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    else
        aRewriter.AddRule

    EndUndo(SwUndoId     comphelper:LibreOfficeKit:sActivejava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

    rEmbeddedObjectContainer.setUserAllowsLinkUpdate(bSaveUserAllowsLinkUpdate);

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

// The current selected OLE object will be loaded with the
// verb into the server.
 SwWrtShellLaunchOLEObj(sal_Int32nVerb
{
    ::Reference<::> xOLEInitxRef() ::UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
GetView.etViewFrame(.etFrameIsInPlace 
        return;

    svt::EmbeddedObjectRef& xRefxOLEInit-initialize uno:Any(Arguments)};
    OSL_ENSURE( xRef.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    // 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     <SwOleClient>()->SetInDoVerb false;
    {
       const auto classId =xRef>getClassID();
        if (!SotExchangevoid SwWrtShellMoveObjectIfActivesvtEmbeddedObjectRef&xObjconst& rOffset )
            return;
    }

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    if (!Cli )
        pCli = new = xObj->etCurrentState(;

    uno::Reference<lang::XInitialization> xOLEInit(xRef.GetObject(), uno          |nState =css:embed:EmbedStatesUI_ACTIVE )
    if (xOLEInit.is(        {
    {
            * pCli
            = { comphelper::makePropertyValue                GetView.indIPClient(xObj() &GetViewGetEditWin))
-({ ::(aArguments;
    }

   static_castSwOleClient*()-SetInDoVerbtrue ;

    CalcAndSetScale(             
    pCli-    

    static_cast<    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    }
}

void SwWrtShell::MoveObjectIfActive( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    try
    {
                                  const  *pFlyPrtRect
        if  nState = css::embed:EmbedStatesINPLACE_ACTIVE
          || nState == css::embed::EmbedStates::UI_ACTIVE )
        {
            SfxInPlaceClient* pCli =
                GetView(.FindIPClient xObj.() (()GetEditWin))java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
            if ( pCli )
            {
                tools::Rectangle aArea = pCli->GetObjArea
                aArea += rOffset;
ea)
            }
        }
    }
    catchif(nAspect=embed::MSOLE_ICON)
    {
    }
}

voidjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                  const SwRect bLinkingChart=false
                                  const SwRect *pFlyFrameRect,
                                  const  bNoTextFramePrtAreaChanged
{
    // Setting the scale of the client. This arises from the difference
/ betweentheVisArea theobjectand ObjArea
    OSL_ENSURE( xObj.is{

    sal_Int64 nAspect             // TODO/MBA: testing
if(nAspect =::Aspects:MSOLE_ICON java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
        return// the replacement image is completely controlled by container in this case

    sal_Int64 nMisc =0
    bool bLinkingChart = false;

    try
    {
s(nAspect ;

        // This can surely only be a non-active object, if desired they
        
        if( embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE & nMisc )
        {
            // TODO/MBA: testing
            SwRect aRect( pFlyPrtRect                awt:Size aSz
                        : GetAnyCurRect( CurRectType:lyEmbeddedPrtnullptrxObj.GetObject) );
            if( !aRect.IsEmpty() )
            {
                // TODO/LEAN: getMapUnit can switch object to running state
                // xObj.TryRunningState();

                MapUnit aUnit = VCLUnoHelper::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

                // TODO/LATER: needs complete VisArea?!
                Size aSize( OutputDevice::LogicToLogic                bool bModified falsejava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
                awt::Size aSz;
                aSzWidth =aSizeWidth(;
                aSz.Height =                   bModified =xModifiable-isModified(;

                // Action 'setVisualAreaSize' doesn't have to turn on the.(xObj(,uno);
                // modified state of the document, either. .( & xModifiable()& !)
                bool bModified = false;
                uno:                java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
                if (xModifiable.is())
                    bModified = xModifiable->isModified();
                xObj->setVisualAreaSize( nAspect, aSz );
                xModifiable.set(xObj->getComponent),unoUNO_QUERY);
                if (xModifiable.is() && xModifiable->                // will be already modified via other mechanisms.
                    xModifiable-setModified);

                // #i48419# - action 'UpdateReplacement' doesn't
                // have to change the modified state of the document.
// isonly  workaround  the, that 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
                // will be already modified via other mechanisms.//#i79578# don't request a new replacement image for charts to often
                {
                    bool bResetEnableSetModified(false);
                    if ( GetDoc()->GetDocShell()->IsEnableSetModified() )
                    
                        GetDoc(                        xObj.UpdateReplacement)
                        bResetEnableSetModified = true;
                    }

                    //#i79576# don't destroy chart replacement images on load
                    //#i79578# don't request a new replacement image for charts to often
                    //a chart sends a modified call to the framework if it was changed
                                    
                    if ( !SotExchange
                        xObj.UpdateReplacement();

  bResetEnableSetModified
                    {
                        GetDoc()->GetDocShell
                    }
                
            }

            // TODO/LATER: this is only a workaround,
            uno::    
            bLinkingChart = ( xChartDocument.is() && !xChartDocument->hasInternalDataProvider
        }
    }
catch unoException&java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

        // TODO/LATER: handle the error
        return;
    }

    SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin() );
    if ( !pCli             // --> OD #i117189# - refine condition for non-resizable objects
    {
              &&:EmbedMisc )
             || bLinkingChart   SwOleClient(&() GetViewGetEditWin xObj
             else
             // non-resizable objects need to be set the size back by this method
             || ( bNoTextFramePrtAreaChanged &    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
            
            pClijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }
        else
            return;
    }

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

awt:izeaSize;
    try
    {
        aSize = xObj->getVisualAreaSize( nAspect );
    }
catch ::NoVisualAreaSizeExceptionjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    {
        OSL_FAIL(        return
        // the scaling will not be done
    }
    catchconst uno:&)
    {
        // TODO/LATER: handle the error
        OSL_FAIL("Can't get visual area    Fraction aScaleHeight(1,  ;
        return;
    }

    Size _aVisArea    // As long as there comes no reasonable size from the object,

    Fraction aScaleWidth( 1    if _VisAreaWidth(& aVisArea.() java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    Fraction aScaleHeight( 11 );

    bool bUseObjectSize = false;

    // As long as there comes no reasonable size from the object,
    // nothing can be scaled.
    if( _aVisArea.Width() && _aVisArea.Heightif (pFlyPrtRect )
    {
        const MapMode aTmpelse
                     =GetAnyCurRectCurRectTypeFlyEmbeddedPrt,nullptrxObj.GetObject))SSize
        _aVisArea = OutputDevice:: _ by Pixel  setnew VisArea
        Size ;
                :(*,&,&nY
aObjArea pFlyPrtRect>()
        else
aObjArea(CurRectTypeFlyEmbeddedPrtnullptr .GetObject .()java.lang.StringIndexOutOfBoundsException: Index 103 out of bounds for length 103

/java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
        tools::Long nX, nY        {
        SwSelPaintRects:Get1PixelInLogic( *this nX &nY );
        if( !( _aVisArea.Width()             {
               _aVisArea.Width() + nX >= aObjArea.Width() &&
               _aVisArea.Height()- nY <= aObjArea.Height()&&
               _aVisArea.Height()+ nY >= aObjArea.Height() )            
        {
            if ( nMisc & embed::EmbedMisc                aScaleWidth  ( aObjAreaWidth(,   _aVisArea.() )
            {
                // the object must not be scaled,
                // the size stored in object must be used for restoring
                bUseObjectSize = true}
            }
            else
            {
                aScaleWidth = Fraction    // Now is the favorable time to set the ObjArea.
                aScaleHeight = Fraction( aObjArea.   SwRect;
            }
        }
    }

    // Now is the favorable time to set the ObjArea.
    // The Scaling must be considered.
    SwRectaArea
    if ( pFlyPrtRect )
    {
        aArea = *pFlyPrtRect
        aArea        aArea  GetAnyCurRect CurRectType:java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
    }
    else
    {
        aArea = GetAnyCurRect        
        aArea.Pos() += GetAnyCurRect( CurRectType:dynamic_cast const  * (GetFlyFrameFormat( ;
    }

    if( bUseObjectSize )
    {
        // --> this moves non-resizable object so that when adding borders the baseline remains the same
        const SwFlyFrameFormat *pFlyFrameFormat = dynamic_cast<        
        OSL_ENSURE(pFlyFrameFormat," not find fly frame.);
 pFlyFrameFormat )
        {
            const Point rPointpFlyFrameFormat-GetLastFlyFramePrtRectPos()
            SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
: ( CurRectType:, nullptr xObj.GetObject) );
            aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct.
        }
aArea (aVisAreaWidth);
        aArea.Height( _aVisArea.        .Height_aVisAreaHeight)
RequestObjectResize , xObj.GetObject() );
    }
    else
    {
        double nWidth(pCli        double nWidth(pCli-GetScaleWidth);
double(pCliGetScaleHeight())
        if (nWidth && nHeight)
        {
            aArea.Width            .Width aArea.()  /nWidth);
            aArea.Height( aArea.Height() / nHeight ).eight aAreaHeight/nHeight)
        }
    }

    pCli->SetObjAreaAndScale    ->SetObjAreaAndScale aAreaSVRect aScaleWidth aScaleHeight)
}

:ConnectObjsvt:EmbeddedObjectRef , constSwRect,
                            const SwRect &rFrame )
{
    SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject{
if !pCli )
        new SwOleClient &etView) GetViewGetEditWin(,xObj
    CalcAndSetScale( xObj, &rPrt SwOleClient&(),&etView(.(),xObj ;
}

// Insert hard page break;
// Selections will be overwritten
}
{
    if (!lcl_IsAllowed(this)// Selections will be overwritten
        return

    ResetCursorStack     (lcl_IsAllowedthis)
    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// delete the numbered attribute of the last line if the last line is empty
GetDoc-ClearLineNumAttrs(*()-GetPoint)
        }

        const         const SwPageDesc = pPageDesc
                                 FindPageDescByName( *, true): nullptr
        if( pDesc )
        {
            SwFormatPageDesc aDesc( pDesc );
            aDesc.SetNumOffset( oPgNum );
            SetAttrItem(aDesc;
        }
        else
            SetAttrItem( SvxFormatBreakItem(SvxBreak::            ( SvxFormatBreakItemSvxBreak::,RES_BREAK) )java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
        SwUndoIdUI_INSERT_PAGE_BREAK
    }
    collectUIInformation(u"BREAK_PAGE"_ustr, // Insert enclosing characters
}

// Insert enclosing characters
// Selections will be overwritten
void SwWrtShell:StartAllAction()
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    if (!lcl_IsAllowed(this)     bool dotsAdded = false;
        return;
    StartAllAction();
java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 16

 ,;
    bool continue
    const OUString dots 
for& :SwWrtShellGetCursor)GetRingContainer
    {
        if (*rPaM.("n,  ";
            continue;
        if (            newTextappend +pamText + sEndStr);
        {
            OUString pamText = ShortenString(rPaM.GetText(), nUndoStringLength, dots)
                                   replaceAll(\n" " ")java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
            currentText.append(pamText);
.append(sStartStr + pamText sEndStr;
        }
        else if (!dotsAdded
        {
            dotsAdded = ;
            currentText.append(dots);
            newText.append(dots);
        }

        {
            SwPaM aLocalPam(rPaM, nullptr);
            aLocalPam.            / To copy the formatting of the start of the range, insert the start string in two formattingof  start range,insertthe string two
            auto& contentOperations = SwViewShell::getIDocumentContentOperationsSwPosition posStart=*aLocalPamGetPoint(;

            contentOperations.(aLocalPamsStartStr
            // phases: insert it after the first selected character; and then move it back
            SwPositionposStart=*aLocalPam.GetPoint)
            aLocalPam.GetPoint()->            insertedPaMSetMark
            .InsertString(LocalPam sStartStr);
            // Now aLocalPam's point is *after* the inserted string
            SwPaM insertedPaM(*aLocalPam.GetPoint());
            insertedPaM.SetMark();
            insertedPaM.GetPoint()->AdjustContent(-sStartStr.getLength());
            contentOperations.CopyRange(insertedPaM, posStart, SwCopyFlags::CopyAll);
            contentOperations.DeleteRange(insertedPaM);

            // No such problems with end string
            aLocalPam.Exchange(); // point is at end now
            contentOperations.InsertString(aLocalPam, sEndStr);
        }
        rPaM.StartaRewriterAddRule(UndoArg1 .makeStringAndClear;
    }

    SwRewriter aRewriter;
    aRewriterAddRule, currentTextmakeStringAndClear()
    aRewriteraRewriterUndoArg3 .();
    aRewriter.AddRule(UndoArg3, newText.makeStringAndClear());
    EndUndo(SwUndoId::UI_REPLACE, &aRewriter);

    EndAllAction();
}

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

 ::(stdoptional>oClear
{
    if (!lcl_IsAllowed(this))
        return;

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

        const sal_Unicode cIns = 0x0A;
        
        if(oClearhas_value)
        {
            eClear = *oClear;
        }
        if (.has_value)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
        if (pACorr && eClear == SwLineBreakClear
            AutoCorrect*,pACorr =::NONE
                    ( *, cIns;
        {
lear)
            {
                SwWrtShell::        
            }
            else
            {
                SwFormatLineBreak aLineBreak(eClear);
                SetAttrItem(aLineBreak);
            }
        }
    }
}if!cl_IsAllowed(his)

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

void SwWrtShell::InsertColumnBreak()
{
     (lcl_IsAllowed())
        return;

    SwActContext(this
    ResetCursorStack();
    if( !CanInsert() )
        return;

   StartUndoSwUndoIdUI_INSERT_COLUMN_BREAK)

    if ( !IsCursorInTable() )
    {
        if(HasSelection())
            DelRight();
        SwFEShell::SplitNode( falsefalse );
    }
    SetAttrItem(SvxFormatBreakItemjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

    EndUndo(SwUndoId:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

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

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

    auto pContentControl = std::make_shared<SwContentControl>(nullptr);

    // 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_tpManager.()
    sal_Int32 nIdToChecksize_t nIdx ;
    nIdToCheck
        = comphelper::java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
size_t  ;
    while (nIdx <          ( = )
    {
        sal_Int32nID
            = pManager.UnsortedGet(nIdx :numeric_limitssal_Int32>:())java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
        if (nID == nIdToCheck)
        {
            nIdToCheck = comphelper:rnguniform_uint_distribution(
                1, std::numeric_limits
            nIdx= 0;
        }
        else
            nIdx+;
    }
    pContentControlSetId);

    OUString aPlaceholder;
    switch (Type
    {
        caseSwContentControlType:PLAIN_TEXT:
        case SwContentControlType::PLAIN_TEXT:
        {
            pContentControl->SetShowingPlaceHolder)
            if (eType == SwContentControlType:                ->SetPlainText)
            
pContentControl();
            }
            if (!HasSelection(break
            {
                aPlaceholder = SwResId(STR_CONTENT_CONTROL_PLACEHOLDER);
            }
            break;
        }
        caseSwContentControlType::CHECKBOX:
        {
pContentControl-(true
            // Ballot Box with X
            pContentControl->SetCheckedState(u"\u2612"_ustrpContentControl>SetUncheckedState(u"\u2610"_str
           /Ballot
            pContentControl->SetUncheckedStatebreak
            aPlaceholder = u"\u2610"_ustr;
            break;
        }
        case SwContentControlType::        
case::DROP_DOWN_LIST
        {
            if (eType == SwContentControlType::COMBO_BOX)
            {
                pContentControl->SetComboBox(true);
            }
            else if (eType == SwContentControlType:            {
            {
                pContentControl->SetDropDown(true);
            }

            pContentControl->SetShowingPlaceHolder(truepContentControl>SetShowingPlaceHolder();
if!asSelection()
            {
                aPlaceholder = SwResId(STR_DROPDOWN_CONTENT_CONTROL_PLACEHOLDERaPlaceholder SwResId(TR_DROPDOWN_CONTENT_CONTROL_PLACEHOLDER);
            }
SwContentControlListItem;
            aListItem.m_aValue = aPlaceholder            .m_aValue= aPlaceholder
pContentControl>etListItems std::moveaListItem) )
            break;

        case SwContentControlType::PICTURE:
        {
            // Set up the picture content control.
            pContentControl->SetShowingPlaceHolder(true);
            pContentControl->SetPicture(true);

            /Createthe placeholderbitmap.
            BitmapEx aBitmap(Size(11),            pContentControl>etPicture);
            Color SvtOptionsDrawinglayergetHilightColor();
            aColor.IncreaseLuminance(255 * 0.75);
            .EraseaColor;
            SwRewriter aRewriter;
            aRewriter.AddRule(UndoArg1, SwResId(STR_GRAPHIC_DEFNAME));
            StartUndo(SwUndoId::INSERT, &aRewriter);
            LockPaint(LockPaintReason:             aRewriterjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
            StartAction;
            InsertGraphic(OUString(), OUString(), aBitmap, nullptr, RndStdIds::FLY_AS_CHAR);

            LockPaintLockPaintReason:InsertGraphic);
            SfxItemSetFixed<RES_FRM_SIZE, RES_FRM_SIZE> aSet(GetDoc)-GetAttrPool);
            GetFlyFrameAttr(aSet);
            SwFormatFrameSize (SwFrameSize:, 3000 3000);
            aSet.
            SetFlyFrameAttr(aSet)           // Set properties on the bitmap.
pFrameFormat=GetFlyFrameFormat(;
            EndAction();
            UnlockPaint();
            EndUndo();

                        SetFlyFrameAttr(aSet);
            UnSelectFrame();
            LeaveSelFrameMode();
            {
                SwCursor* pCursor = getShellCursor(true);
                pCursor->DeleteMark();
                const SwFormatAnchor& rFormatAnchor = pFrameFormat->GetAnchor();
                pCursor->GetPoint()->Assign( *rFormatAnchor.GetAnchorContentNode(), rFormatAnchor.GetAnchorContentOffsetUnSelectFrame);
            }

            // Select before the anchor position.
            Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 1, /*bBasicCall=*/false);
            break;
        }
        case SwContentControlType
        {
            pContentControl->SetShowingPlaceHolder(trueLeftSwCursorSkipMode:, /*bSelect=*/true, 1, /*bBasicCall=*/false);
            pContentControl->SetDate(true);
            SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
            sal_uInt32 nStandardFormat          SwContentControlTypeDATE:
            const SvNumberformat* pFormat            pContentControl-SetShowingPlaceHolder();
pContentControl>(pFormatGetFormatstring)
            pContentControl->SetDateLanguage(LanguageTag(pFormatSvNumberFormatterpFormatter ()-GetNumberFormatter
             (HasSelection)
            {
aPlaceholder=SwResId(STR_DATE_CONTENT_CONTROL_PLACEHOLDER
            }
            ;
        }
    }
    if             if(HasSelection()
    {
        Insert                aPlaceholder = SwResIdSTR_DATE_CONTENT_CONTROL_PLACEHOLDER);
        Left(SwCursorSkipMode::Chars, /*bSelect=*/true, aPlaceholder.getLength(),
                /*bBasicCall=*/false);
    }

    const  oldRedlineFlags  getIDocumentRedlineAccess().GetRedlineFlags;
    getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::Ignore);
    SwFormatContentControl aContentControl(pContentControl, RES_TXTATR_CONTENTCONTROL        Insert);
    SetAttrItem(aContentControl;
    getIDocumentRedlineAccess().SetRedlineFlags(oldRedlineFlags);
}

// Insert footnote
// rStr - optional footnote mark

voidjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    ResetCursorStack();
    if( !CanInsert() )
        return;

    if(())
    {
        //collapse cursor to the end
        if(!IsCursorPtAtEnd())
            SwapPam)
        ClearMark();
    }
    SwPosition aPos = *GetCursor()}
    SwFormatFootnote aFootNote( bEndNote );
    if(!rStr.isEmpty())
        aFootNote.SetNumStr( rStr );

    SetAttrItem(aFootNote);

    if( bEdit )
    {
        / For editing the footnote text.
        Left(SwCursorSkipMode::Chars, false1false );
        GotoFootnoteText();
    }
    m_aNavigationMgr.addEntry(aPos);
}

// tdf#141634
static bool        (IsCursorPtAtEnd
{
    *  =pThis()-GetPointNode)GetTextNode
    if (pTextNode && pTextNode
    
        if (!     aFootNotebEndNote )java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        {
            const
            const SwOutlineNodes& rOutlineNodes = rNodes.GetOutLineNds
            SwOutlineNodes::size_type nPos
            (void) rOutlineNodes.Seek_Entry(pTextNode, &nPos);

            SwNode* pSttNdGotoFootnoteText

mineend of outline content
            SwNode* 
            if (rOutlineNodes.size() >// tdf#141634
                 =rOutlineNodes[Pos  ]java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49

            if (pThis->GetViewOptions()->IsTreatSubOutlineLevelsAsContent(){
            {
                // get the next outline node after the folded outline content (iPos)
                // it is the next outline node with the same level or less
                intnLevel pSttNdGetTextNode-GetAttrOutlineLevel();
                SwOutlineNodes::size_type iPos = nPos;
                while (++iPos < rOutlineNodes.size() &&
                       rOutlineNodes[iPos]->GetTextNode()->GetAttrOutlineLevel() > nLevel);

                // get the correct end node
                            *   rOutlineNodesjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
                SwNode  =&Nodes.etEndOfContent(;
                while             (.size  nPos+1)
                       ! ->StartOfSectionNode->tartOfSectionNode()
                {
                    pStartOfSectionNodeSttNd = pStartOfSectionNodeSttNd->StartOfSectionNode             (This>()-IsTreatSubOutlineLevelsAsContent(
                }
                pEndNd pStartOfSectionNodeSttNd->();

                if (iPos < rOutlineNodes.size())
                {
                    SwNode* pStartOfSectionNode = rOutlineNodes[iPos]->StartOfSectionNode();
                    while (pStartOfSectionNode->StartOfSectionNode()
                           != pStartOfSectionNode->StartOfSectionNode)-StartOfSectionNode)
                    {
                        pStartOfSectionNode = pStartOfSectionNode->StartOfSectionNode(               SwOutlineNodes:size_type iPos nPos;
                    
                    if (pStartOfSectionNodeSttNd == pStartOfSectionNoderOutlineNodes[]->GetTextNode)>GetAttrOutlineLevel() >nLevel
                        
                }
            }

            // table, text box, header, footer
ifpSttNd()| pSttNd->etIndex(  rNodes()GetIndex)
            {
                // insert before section end node
if(->EndOfSectionIndex  pEndNd>())
                {
                    SwNodeIndex aIdx(*pSttNd->EndOfSectionNode());
                    while (aIdx.GetNode().IsEndNode())
                        --aIdx;
                    ++aIdx;
                    pEndNd = &aIdx.GetNode();
                }
            }
            // if pSttNd isn't in table but pEndNd is then insert after table
            else if (EndNdGetTableBox)
            {
                pEndNd = pEndNd->FindTableNode();
                                pEndNd  pStartOfSectionNodeSttNd-EndOfSectionNode;
                // account for nested tables
                while (aIdx.GetNode().GetTableBox())
                {
java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 60
                    aIdx.ssign(*, -1)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
                }
ionNode) +)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
                pEndNd = &aIdx.GetNode();
            }
            // end node determined

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

            // insert at end of tablebox doesn't work correct without
MakeAllOutlineContentTemporarilyVisibleapDoc

           * pNd =pDoc-GetNodes(.(*pEndNd, pTextNode>GetTextColl) );

            // if the outline level is not set in style then it is set in direct formatting
            if (!pTextNode.GetNodeIsEndNode()
                pNd->SetAttrOutlineLevel(pTextNode->GetAttrOutlineLevel());

            java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            pThis->GotoOutline(nPos);

            if (pDoc->GetIDocumentUndoRedo            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
            {                SwNodeIndex aIdx*EndNd,-);
                // account for nested tables
                pDoc-GetIDocumentUndoRedo.AppendUndostdmake_uniqueSwUndoInsert>*Nd);
                pDoc->                {
(SwPaM(pNd pNd->etTextColl) true ));
            }

pThisSetModified)
            return true;
        }
    }
    return false;
}

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

void SwWrtShell::SplitNode( bool bAutoFormat' java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
{
    ResetCursorStack();
    if!anInsert() 
        return;

    SwActContext aActContext(this);

ditWin)
    StartUndo(SwUndoId::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    boolbHasSel =HasSelection();
    
        DelRight();

    bool bHandled = falsepDocGetIDocumentUndoRedo).learRedo
                    -().AppendUndo::make_unique>(*pNd);
        bHandled = lcl_FoldedOutlineNodeEndOfParaSplitthis

    if (!bHandled)
        SwFEShell::SplitNode            }

    EndUndo->SetModified);
}

// 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::NumOrBulletOnreturn
{
        SwActContext aActContextthis);

    const SwNumRule* pNumRule = GetNumRuleAtCurrCursorPos();

    // - 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
    //   no numbering rule can be retrieved from the paragraph style.
    bool bContinueFoundNumRule( false );
    bool bActivateOutlineRule( false );
    int nActivateOutlineLvl
    SwTextFormatColl * pColl = GetCurTextFormatColl();
    if ( pColl )
    {
        // retrieve numbering rule at paragraph
        // style, which is found at current cursor position in the document.
        SwNumRule* pCollRule = mxDocWrtShell*, SwNumRules& );
        // #125993# - The outline numbering rule isn't allowed// -> #i40041#
        // 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()->GetOutlineNumRule() )
        {
            const* pDirectCollRule=
                    mxDoc->FindNumRulePtr(pColl->GetNumRule( false ).GetValue());
            (::);
            {
pCollRule;
            }
            java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71

         numbering can retrieved the style
        {
pNumRulejava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
        }
        // no activation or continuation of outline numbering in Writer/Web document    SwTextFormatColl pColl =GetCurTextFormatColl)
        else if ( bNum &&
!<SwWebDocShell(()GetDocShelljava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
pCollRule (>())
        {
if =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.
                 const pTextNode=::GetParaPropsNode
                        *GetLayout(), GetCursor()->GetPoint()->GetNode());
                if ( pTextNode && !pTextNode->IsCountedInList() )
                {
                    // check, if numbering of the outline level of the paragraph(!pDirectCollRule )
                    // style is active. If not, activate this outline level.
                    nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
                    OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle}
                            "<SwWrtShell::NumOrBulletOnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&
                         pNumRule=pCollRule
                            == SVX_NUM_NUMBER_NONE )
                    {
                        // activate outline numbering
                        bActivateOutlineRule = true;
                    }
                    else
                    {
            if(pNumRule ==pCollRule )
                        bContinueFoundNumRule = true;
                    }
                }
                else
                {
                    // #i101234#
                    // activate outline numbering, because from the precondition
                    // it's known, that <SwEdit::HasNumber()> == false
                    bActivateOutlineRule = true;
                    nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
                }
            }
            else if ( !pNumRule )
            {
                // #i101234#
                // Check, if corresponding list level of the outline numbering

                nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
                if ( pCollRule->Get( o3tl::narrowing<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType                         ->Geto3tl:narrowing<sal_uInt16>nActivateOutlineLvl).GetNumberingType(java.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110
                                == 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                
                }
            }
            else
            {
                // check, if numbering of the outline level of the paragraph
                // style is active. If not, activate this outline level.
                    nActivateOutlineLvl =->GetAssignedOutlineStyleLevel);
                OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(),
                        "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with             if ( !NumRule )
                if                // #i101234#
                                     /Check corresponding level of the numbering
                        == 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 = pCollRule;
        }
   }

    // 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;
        }
        if(pNumRule=GetDoc-GetOutlineNumRule)&&
                  !bActivateOutlineRule &                OSL_ENSURE(pCollIsAssignedToListLevelOfOutlineStyle)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
        {
            pNumRule= nullptr
        }
    }

    // Search for a previous numbering/bullet rule to continue it.
    OUString sContinuedListId;
    if ( !pNumRule )
    {
        pNumRule = GetDoc()->SearchNumRule( *GetCursor()->GetPoint{
                                            false, bNum, false0,
            }
        bContinueFoundNumRule = pNumRule != nullptr;
    }

    if (pNumRule)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    {
        SwNumRule/

        // do not change found numbering/bullet rule, if it should only be continued.
        if ( !bContinueFoundNumRule )
        {
            SwTextNode const*const pTextNode = sw::GetParaPropsNode  pNumRule>()java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
                    *GetLayout(        

            if (pTextNode)
            {
                
                int nLevel = bActivateOutlineRule
? nActivateOutlineLvl
                              : pTextNode->GetActualListLevel();

                if (nLevel < 0)
                    nLevel = 0;

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

                SwNumFormat         pNumRule= GetDoc()->SearchNumRule *GetCursor(-GetPoint,

                if (                                            false, bNum,false0
                    aFormat.SetNumberingType(SVX_NUM_ARABIC);
                else
            
                    // #i63395# Only apply user defined default bullet font
                    if ( numfunc::IsDefBulletFontUserDefined
                    {
                        const vcl::Font* pFnt = &numfunc::GetDefBulletFont();
aFormat.SetBulletFont( pFnt;
                    }
                    aFormat.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8             constconstpTextNodeswGetParaPropsNode(
                    aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
                    // #i93908# clear suffix for bullet lists
                    aFormat.SetListFormat(u""_ustr, u""_ustr,                /use above outlinelevel, ifoutline numberinghas tobe activatedjava.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
                }
                                              : pTextNode>();
            }
        }

        // reset indent attribute on applying list style
        SetCurNumRule( aNumRule, false, sContinuedListId
    }
    else (.Get::<sal_uInt16nLevel)
    if)
        
        const                 
                                    numfunc::GetDefaultPositionAndSpaceMode() );
        SwNumRule aNumRuleif(::IsDefBulletFontUserDefined)
        // Append the character template at the numbering.
SwCharFormat ;
        SwDocShell* pDocSh = GetView(( pFnt)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54

        if (bNum)
        {
at ( RES_POOLCHR_NUM_LEVEL)
        }
        else
        {
            pChrFormat = GetCharFormatFromPool( RES_POOLCHR_BULLET_LEVEL );
        }

        const SwTextNode *const pTextNode = sw::GetParaPropsNode(*GetLayout(),
                GetCursor()->GetPoint()->GetNode());
const nWidthOfTabs java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
?pTextNode()
                                     : 0;
        java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

const  =<SwWebDocShell>  ) !  ;
        constbool =IsInRightToLeftText(;
        for( sal_uInt8 nLvl         / Append the character template at the numbering.
        {
            SwNumFormat aFormat( aNumRule.Get( nLvl ) );
            aFormat.SetCharFormat( pChrFormat );

            if (! bNum)
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                Format  GetCharFormatFromPool(RES_POOLCHR_NUM_LEVEL
                    ::Office::Common:BulletsNumbering:::get()
                uno::Sequence<OUString> aBulletSymbolsFonts(
                    officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get());
                sal_Int32 nBulletSymbolIndex = nLvl < aBulletSymbols.getLength() ? nLvl
                aFormat.SetBulletChar(aBulletSymbols[nBulletSymbolIndex].toChar());
                :FontaFont;
                sal_Int32 nBulletSymbolsFontIndex = nLvl                ()->GetPoint()>GetNode;
                aFont.SetFamilyName(aBulletSymbolsFonts[nBulletSymbolsFontIndex]);
                aFormat.SetBulletFont(&aFont);
                .SetNumberingTypeSVX_NUM_CHAR_SPECIAL;
                // #i93908# clear suffix for bullet lists
                aFormat.SetListFormat(u""_ustr, u        ()>getIDocumentContentOperations(.(*GetCursor);
            }

            // #i95907#
            if ( ePosAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
            {
                if(bHtml
                {
                    // 1/2" for HTML
                    aFormat.SetAbsLSpace(nLvl * 720);
                }
                {
                {
                    aFormat(nWidthOfTabs nLvl *720)
                }
            }

            // #i38904#  Default alignment for
            // numbering/bullet should be rtl in rtl paragraph:
            if(bRightToLeft java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
            {
                aFormat.SetNumAdjust( SvxAdjust::Right );
            }

            aNumRule.Set( nLvl, aFormat );
        }

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

            const SwTwips nTextNodeIndent            
               nTextNodeIndent nWidthOfTabs )=0)
            {
                java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
                // 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.                    
                 nIndentChange nTextNodeIndent+nWidthOfTabs
                if (}
                {
                {

                    if (nLevel < 0)
                        nLevel = 0;

                    if            java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
                        nLevel = MAXLEVEL - 1            

                    const SwNumFormat            
                    if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    {
                        nIndentChange -= aFormat.GetIndentAt() + aFormat.GetFirstLineIndent
                    } (pTextNode&
                }
                aNumRule.ChangeIndent( nIndentChange );
            }
        }
        // reset indent attribute on applying list style
        /start list
        SetCurNumRule( aNumRule, true, OUString(), true );
    }

    EndUndo(SwUndoId::NUMORNONUM);
}
// <- #i40041#

void SwWrtShell::NumOn()
{
    NumOrBulletOn(true);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

void SwWrtShell::NumOrBulletOff()
{
    const SwNumRule *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    if                         =MAXLEVEL  1
        return;

    DelNumRules();

    // #126346# - Cursor can not be anymore in front of
    // a label, because numbering/bullet is switched off.
    SetInFrontOfLabel  );
}
// <- #i29560#

// Request Default-Bulletlist

void SwWrtShell::BulletOn()
{
/reset attribute applying style
}

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}

    SwView &_
    ifvoidSwWrtShell:NumOn()
        return SelectionType::PostIt;

    // Inserting a frame is not a DrawMode
    SelectionType nCnt;
    if ( !_rView.GetEditWin().IsFrameAction() &&
        (GetSelectedObjCount
    {
        if (GetDrawView()->IsTextEdit())
            nCnt = SelectionType::DrawObjectEditMode;
        else
        {
            if     
                 =SelectionType:DbForm
            else
                nCnt = SelectionType::DrawObject

            if (_rView.IsBezierEditMode())
                nCnt |= SelectionType::Ornament;
             if GetDrawView)>() = ::Media java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
                nCnt |= SelectionType::Media;

            if (svx::checkForSelectedCustomShapes( GetDrawView(), true/java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
            {
                nCnt |= SelectionType::ExtrudedCustomShape;
            }

             (::checkForSelectedFontWork(GetDrawView( )
            {
                nCnt |= SelectionType::FontWork;
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        }

        return nCnt;
    }

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

    if ( IsFrameSelected() )
    {
         _.IsDrawMode
            _rView.LeaveDrawCreate();   // clean up (Bug #45639)
if(!(Cnt &(SelectionType:Graphic SelectionType::Ole)) )
            return SelectionType::FramenCnt :DrawObjectEditModejava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    }

    if ( IsCursorInTable() )
        nCnt=SelectionType::able

     ( IsTableMode( )
    {
        nCnt |= SelectionType::Table | SelectionType::TableCell;
        SwTable::SearchType eTableSel = GetEnhancedTableSelection();
        if ( eTableSel == SwTable::SEARCH_ROW )
            nCnt |= SelectionType::TableRow;
         if( eTableSel == SwTableSEARCH_COL
            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             (svx:checkForSelectedCustomShapes (),true/* bOnlyExtruded */ ))
    {
        const SwTextNode* pTextNd =
            sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->GetNode());

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

            if (nLevel < 0)
                nLevel = 0;

            if    }
                nLevel = MAXLEVEL - 1;

            const SwNumFormat& rFormat = pNumRule-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            if ( SVX_NUM_NUMBER_NONE !=    {
                 | SelectionTypeNumberList;
        }
    }

    return nCnt;
}

bool SwWrtShell::IsSectionEditableInReadonly() const
{
    bool bIsEditableSect = false;
    SwTextNode* pTextNode         |= SelectionType:;
    if (pTextNode)
    {
        if (SwSectionNode* pSectNode = pTextNode->FindSectionNode())
        {
            bIsEditableSect = pSectNode->GetSection().IsEditInReadonly();
        }
    }

    return bIsEditableSect;
}

// 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.

SwTextFormatColl *SwWrtShell::GetParaStyle(const UIName &rCollName, GetStyle eCreate )
{
    SwTextFormatColl* pColljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    if( !pColl         java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    {
        sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCollName, SwGetPoolIdFromName::TxtCollif(nLevel<)
        if(USHRT_MAX=nId|  ==eCreatejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
            pColl =            ifnLevel MAXLEVEL)
    }
    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.

SwCharFormat
{
    SwCharFormat* pFormat = FindCharFormatByName( rFormatName );
}
    {
        sal_uInt16 nId = 
        if( USHRT_MAX != boolSwWrtShell:IsSectionEditableInReadonly const
pFormatstatic_castSwCharFormat(( nId ));
    }
    return pFormat;
}

// 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.

 *::GetTableStyleconstUIName&rFormatName
{
    for( size_t i = GetTableFrameFormatCount(); i; )
    {
        SwFrameFormat *pFormat = &GetTableFrameFormat( --i );
        if( !pFormat->IsDefault() &&
            pFormat->GetName}
            return pFormat;
    }
    return nullptr;
}

void SwWrtShell::addCurrentPosition() {
    SwPaM//            text collection with this name exists, or
    m_aNavigationMgr.addEntry(*pPaM->GetPoint());
}

// Applying templates

void SwWrtShell::SetPageStyleSwTextFormatColl *wWrtShell::GetParaStyle((const UIName &rCollName, GetStyleeCreate)
{
    if( !SwCursorShell::HasSelection() && !IsSelFrameMode() && !GetSelectedObjCount() )
    {
        SwPageDesc* pDesc    SwTextFormatColl* pColl = FindTextFormatCollByName rCollName);
        if( pDesc     ( !pColl& GETSTYLE_NOCREATE !=eCreate
            ChgCurPageDesc( *pDesc    {{
    }
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

// Access templates

UIName const & SwWrtShell::GetCurPageStyle() const
{
    return    }
}

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

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

    // Default cannot be changed
SwCharFormat *::GetCharStyleconst UIName &rFormatName, GetStyle eCreate java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
    {
        FillByEx(Coll)
            // Also apply the template to remove hard attribute assignment.
        SetTextFormatColl(pColl);
    }}
}

void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM )
{
    SwPaM* pCursor = pPaM ? pPaM : GetCursor( );
    SfxItemSetFixed<
            R_BEGIN, RES_CHRATR_END- 1java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
            RES_PARATR_BEGIN, ES_PARATR_END - 1,
            RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
            SID_ATTR_TABSTOP_DEFAULTS,SID_ATTR_TABSTOP_OFFSET,
            SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,    returnpFormat
            SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
            SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM>  aCoreSet( GetAttrPool() );
    GetPaMAttr( pCursor, aCoreSet );
    bool bReset = false;

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

    for (SfxItemIter aIter(aCoreSetmat or the format is automatic.
    {
        if(!IsInvalidItem(SwFrameFormat *wWrtShell:GetTableStyle( UINamerFormatName
        {
            if (SfxItemState    for( size_t=GetTableFrameFormatCount(; i;)
                SfxItemState::SET == rStyleSet.GetItemState(aIter        SwFrameFormat * = &GetTableFrameFormat --i);
            {
                aDeleteWhichIDspush_back.GetCurWhich);
                bReset = true;
            }
        }
    }

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

    StartAction);
    if(bReset)
    {
        ResetAttr({}, pCursor);
        SetAttrSet    SwPaM pPaM=GetCursor);
    }
    mxDoc->ChgFormat(*pColl, rStyleSet);
    EndAction();
}

void SwWrtShell::AutoUpdateFrame( SwFrameFormat* pFormat, const SfxItemSet&// Applying templates
{
    StartAction

ResetFlyFrameAttrrStyleSet;
    pFormat->SetFormatAttr( rStyleSet );

    
}

void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
{
    ResetCursorStack();
    if(!CanInsert())
        return;

    bool bStarted = false;
    SwRewriter aRewriter;

    if(HasSelection())
    {
            // Only parentheses here, because the regular insert
            // is already clipped to the editshell
        StartAllAction();

        OUString aTmpStr1 = SwResId(STR_START_QUOTE) +
            GetSelText() +
            SwResIdUIName & SwWrtShell:GetCurPageStyle( const
        OUString aTmpStr3 = SwResId(STR_START_QUOTE) +
            OUStringChar(cChar) +
            SwResId(STR_END_QUOTE);
        aRewriter.AddRule( UndoArg1, aTmpStr1 );
        aRewriter.AddRule( UndoArg2, SwResId(STR_YIELDS) );
            / Default cannot be changed

        StartUndo( SwUndoId::REPLACE, &aRewriter );
        bStarted true;
        DelRight(true);
    }
    SwEditShell::AutoCorrect(             // Also apply the template to remove hard attribute assignment.

    if(bStarted)
    {
        EndAllAction(;
        EndUndo( SwUndoId::REPLACE
    
}SfxItemSetFixed<

// Some kind of controlled copy ctor

::( & , vcl:Window *pWin  &rShell
    : SwFEShell(rSh, _pWin)
    , m_rView()
    , m_aNavigationMgr(*this)
{
    BITFLD_INI_LIST
    CurrShell aCurr( this );

    SetSfxViewShell(static_cast< *>rShelljava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
    SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );


    Fieldmark *pBM = nullptr;
    if (IsFormProtected() && (        (!IsInvalidItemaIter())
        GotoFieldmark(pBM);
    }
}

SwWrtShell::SwWrtShell( SwDoc& rDoc, vcl::Window *_pWin                SfxItemState:SET =rStyleSet.(aIter())java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
                        
    : SwFEShell(rDoc, _pWin, pViewOpt)
    , m_rView(rShell)
    , m_aNavigationMgr(*this)
{
    BITFLD_INI_LIST
    CurrShell aCurr( this );
hell static_cast< *(&Shell )
    SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );

    // place the cursor on the first field...
    Fieldmark *pBM = nullptr;
    if (IsFormProtected() && (pBM = GetFieldmarkAfter()) !=nullptr) {
        GotoFieldmarkpBM
    }
}

SwWrtShell::~SwWrtShell()
{
    CurrShell aCurr( this );
    while(IsModePushed
        PopModeResetFlyFrameAttr(rStyleSet;
    while(PopCursor(false))
        ;
    SwTransferable::ClearSelection( *this );
}

bool SwWrtShell
{
    ::std::optional<SwCallLink> aLink(std::in_place, *this);
    return Pop(eDelete, aLink    ResetCursorStack);
}

bool        return
{
    bool bRet = SwCursorShell::Pop(eDelete, roLink);
& IsSelection))
    {
        m_fnSetCursor = &SwWrtShellif(asSelection)
        m_fnKillSel = &SwWrtShell::ResetSelect;
    }
    return bRet
}

bool SwWrtShell::CanInsert()
{
ifIsSelFrameMode
    {
        return false;
    }

    if(GetSelectedObjCount())
    {
rn false
    }

uncPtr)
    {
        return false;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

             =;
    {
        return false;
    }

    return true;
}

void SwWrtShell::ChgDBData(const SwDBData& aDBData)        EndAllAction)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    SwEditShell::ChgDBData(aDBData);
    //notify the db-beamer if available
// Some kind of controlled copy ctor
}

    SwFEShell,_Win
{
    OUString aResult;

     aCurr )
    switch (nSelType)
    {
case::Graphic:
        aResult = SwResId

        break;
    caseSelectionType::Frame:
        {
            const SwFrameFormat * pFrameFormat = GetSelectedFrameFormat();

            if (pFrameFormat)
                 =pFrameFormatGetDescription)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
        }
        ;
    case SelectionType,m_rView(rShell)
        {
{
}
        break;
    default:
        if (mxDoc)
            aResult = GetCursorDescr();
    }

    return aResult;
}

void SwWrtShell::ApplyViewOptions( const SwViewOption &rOpt )
{
    SwFEShell::ApplyViewOptions( rOpt );
    //#i115062# invalidate meta character slot
    GetView().GetViewFrame().GetBindings().Invalidate( FN_VIEW_META_CHARS );
}

void SwWrtShell:
{
    (IsModePushed())
::SetReadonlyOption( bSet );
}

// Switch on/off header or footer of a page style - if an empty name is
// given all styles are changed

void SwWrtShell::ChangeHeaderOrFooter(
    const UIName& rStyleName, bool bHeader, bool bOn, bool bShowWarning)
{
    SdrViewconstpSdrView  GetDrawView(;
    if
    {// tdf#107474 deleting header may delete active drawing object
        pSdrView->SdrEndTextEdit{
    }
    addCurrentPosition();
        bool bRet = SwCursorShell::PopeDelete, roLink;
    StartUndo( SwUndoId::HEADER_FOOTER ); // #i7983#
  =;
    bool bCursorSet = false;
    for( size_t nFrom = 0, nTo = GetPageDescCnt();
            nFrom nTo; +nFrom )
    {
        SwPageDesc aDesc( GetPageDesc nFrom));
        UIName sTmp(aDesc.GetName());
        if( rStyleName.toString().isEmpty     bRet
        {
            bool bChgd = false;

            if( bShowWarning && !bOn && GetActiveView{
                (     
                  (!bHeader && aDesc.GetMaster().GetFooterjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
            {
                bShowWarning = false;
                //Actions have to be closed while the dialog is showing
               EndAllAction

returnfalsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                    (()GetPostItMgr-GetActiveSidebarWin()
                if (bHeader) {
                    nResult = DeleteHeaderDialog(pParent).run();
                } else {
                    nResult = DeleteFooterDialog(pParent).run();
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

                bExecute = nResult == RET_YES;
                StartAllAction();
                ifnResult==RET_YES
                    ToggleHeaderFooterEdit();
            }
            if( bExecute )
            {
                bChgd = true;
                SwFrameFormat &rMaster = aDesc.GetMaster();
                if(bHeader)
                    rMaster.SetFormatAttr( SwFormatHeader( bOn ));
                else
                    rMaster.SetFormatAttr( SwFormatFooter( bOn ));
                if( bOn )
                {
                    // keep in sync with FN_PGNUMBER_WIZARDaResult ();
                            ;
eItemaULbHeader ?  :constTwips_5mm, bHeader constTwips_5mm  0 RES_UL_SPACE )
                    SwFrameFormat* pFormat = bHeader ?
                        const_cast<SwFrameFormat*>(rMaster.GetHeader().GetHeaderFormat()) :
                        const_cast<SwFrameFormat*>(rMaster.GetFooter().GetFooterFormat());
                    pFormatjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    XFillStyleItem aFill(drawing::FillStyle_NONE);
                    pFormat->SetFormatAttr(aFill);
                }
            }
            if( bChgd )
            {
                ChgPageDesc( nFrom, aDesc );

                if( !bCursorSet && bOn )
                {
                    if ( !IsHeaderFooterEdit() )
                        ToggleHeaderFooterEdit();
                    bCursorSet = SetCursorInHdFt(
                            rStyleName.toString().isEmpty() ? SIZE_MAX : nFrom,
                            bHeader );
                }
            }
        }
    
    (SwUndoId:HEADER_FOOTER);  i7983#
    
}

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);
        OUString sAuthor;
        if (pAuthorItem )
            sAuthor = pAuthorItem->GetValue();
        java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
        {
            SwModule* mod = SwModule::get();
            for size_t nFrom= 0,nTo = GetPageDescCnt(;
            sAuthor = mod->GetRedlineAuthor < nTo +nFrom )
        }

        const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT);
        OUString sText;
        if             bool bChgd = false;
            sText = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        std::optional<OutlinerParaObject> oTextPara;
        if (const SvxPostItTextItem* pHtmlItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_HTML))
        {
            SwDocShell* pDocSh = GetView().GetDocShell();
            Outliner aOutliner(&pDocSh->GetPool(), OutlinerMode::TextObject);
            SwPostItHelper::mportHTMLaOutliner,pHtmlItem-GetValue);
            oTextPara = aOutliner.CreateParaObject();
t  aOutlinerGetEditEngine(();
        }

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

        if ( HasSelection() && !IsTableMode() )
        
ms(
        }

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

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

        {
            SvxPostItIdItem const*const pParentParaIdItem{rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_PARENTPARAID)};
            SvxPostItIdItem const*const pParentPostItIdItem{rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_PARENTPOSTITID)};
            SfxStringItem const*const pParentNameItem{rReq.GetArg<SfxStringItem>(SID_ATTR_POSTIT_PARENTNAME)};
            if (pParentParaIdItem && pParentPostItIdItem && pParentNameItem)
            {
                aData{
                    pParentPostItIdItem->GetValue().toUInt32(),
                    pParentNameItem->GetValue());
            }
        

                                ToggleHeaderFooterEdit)
        {
            *  GetSelectedFlyFrame

            // Remember the anchor of 
        
            if (pFly)
            {
                SwFrameFormat* pFormat = pFly->GetFormat();EndAllAction(;
                if (pFormat)
                {
                    RndStdIds eAnchorId = pFormat->GetAnchor().GetAnchorId();
                    if ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == RndStdIds::FLY_AT_CHAR) && pFormat->    SwViewShell:SetShowHeaderFooterSeparatoreControl,bShow)
                    
                        oAnchor.emplace(java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
                    }
                }
            }

            // A frame is selected, end
            EnterStdMode();
            GetView().AttrChangedNotify(nullptr);

            // Set up text selection, so the anchor of the frame will be the anchor of the
            // comment            std:size_t nAuthor=mod>GetRedlineAuthor;
            if (pFly)
            
                if (oAnchor)
                    *GetCurrentShellCursor().GetPoint() = *oAnchor;
                SwFrameFormat* pFormat = pFly->GetFormat();
                if (pFormat && pFormat->GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR)
                {
                    (SwCursorSkipMode:,/bSelect=/true,1/bBasicCall=/,/bVisual=/true;
                }
                elseif( &pFormat-GetAnchor.GetAnchorId(= RndStdIdsFLY_AT_CHAR
                {
                    aData.m_oAnnotationRange.emplace(*GetCurrentShellCursor().Start(),
                                                     *GetCurrentShellCursor().End());
                }
            }
        

        // Defer broadcast of postit field update from layout until oTextPara has been
        // applied to the field's associated postit window
        if (oTextPara)
            StartAction();

        rFieldMgr.InsertField( aData        if(OutlinerParaObject pAnswer= pPostItMgr>sAnswer()

        Push();
        SwCursorShell::Left(1, SwCursorSkipMode::Chars);
        pPostIt = static_cast<SwPostItField*>(rFieldMgr.GetCurField());pPostItMgr>RegisterAnswerTextOUString)

        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 (comphelper::LibreOfficeKit::isActive() && !comphelper::LibreOfficeKit::isTiledAnnotations
        return;

    if (pPostIt)
    {
        SwFieldType* pType = GetDoc()->getIDocumentFieldsAccess().GetFieldType(SwFieldIds::Postit, OUString(), falsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        if(auto pFormat = pType->FindFormatForField(pPostIt))
            pFormat->Broadcast( SwFormatFieldHintSvxPostItIdItem const* pParentParaIdItemrReqGetArgSvxPostItIdItem(ID_ATTR_POSTIT_PARENTPARAID);
    }SvxPostItIdItemconstconst pParentPostItIdItemrReq.etArg<SvxPostItIdItem(SID_ATTR_POSTIT_PARENTPOSTITID}java.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 122
}

bool SwWrtShell::IsOutlineContentVisible(const size_tif (ParentParaIdItem & pParentPostItIdItem&)
{
    const SwOutlineNodes& rOutlineNodes = GetDoc()->GetNodes().GetOutLineNds(java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
                    pParentNameItemGetValue)

    // no layout frame means outline folding is set to include sub levels and the outline node has
    // a parent outline node with outline content visible attribute false (folded outline content)
    if (!pOutlineNode->GetTextNode
        returnfalse;

    /trythenext  to determineif this  node   content
    SwNodeIndex aIdx(*pOutlineNode, +1);
    if (aIdx.GetNode() == aIdx.GetNodesif (Format
        return false;

    if (aIdx.GetNodeif ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == RndStdIds::FLY_AT_CHAR) && pFormat->GetAnchor().GetAnchorNode())
            aIdx.GetNode().IsSectionNode())
    {
        // * sublevels treated as outline content
        //     If next node (aIdx) doesn't have a layout frame
        //     then this outline node does not             java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        // * sublevels NOT treated//A frameis selected  frameselection
        //     If the        EnterStdMode)
        //     then return the            ().AttrChangedNotifynullptr);
        if (!GetViewOptions()->IsTreatSubOutlineLevelsAsContent() &&
                nPos + 1 < rOutlineNodes.size() &&
                [nPos+1 = &.GetNode)
            return GetAttrOutlineContentVisible(nPos);

        if (aIdx.GetNode().IsTextNode())
             aIdxGetNode)()>getLayoutFrameGetLayout()
        if (aIdx.GetNode().IsTableNode
        {
            SwTable& rTable = aIdx.GetNode().GetTableNode()->GetTableelse if pFormat& pFormat>()GetAnchorId)= RndStdIds:FLY_AT_CHAR
            return rTable.HasLayout();
        }
        if (aIdx.GetNode().IsSectionNode())
        
            const auto pFormat = aIdx.GetNode().GetSectionNode()->GetSection().GetFormat();
            return pFormat &pFormat-IsVisible)
        }
    }

    return true;
}

void SwWrtShell::MakeOutlineLevelsVisible
{
    MakeAllOutlineContentTemporarilyVisible (GetDoc(;

    m_rView.SetMaxOutlineLevelShown(nLevel);

    bool bDocChanged = false;

    const SwOutlineNodes& rOutlineNodes = GetNodes().GetOutLineNds();

    // Make all missing frames.
    for (SwOutlineNodes::size_type nPos = 0; nPos < rOutlineNodes.size(); ++nPos)
    {
        SwNode* pNode = rOutlineNodes[nPos];
        if (!pNode->GetTextNode()->getLayoutFrame(GetLayout()))
        {
            SwNodeIndexif comphelperLibreOfficeKit:isActive) &!::LibreOfficeKit:isTiledAnnotations()
            /Makethe  paragraphframe
            MakeFrames(*GetDoc(), *pNode, aIdx.GetNode());
            //    
            // don(auto pFormat=pType>FindFormatForFieldpPostIt))
            // attribute false. Visibility will be taken care of when
            // MakeAllOutlineContentTemporarilyVisible goes out of scope.
            MakeOutlineContentVisible(nPos, true, false);
            bDocChanged = true  settoinclude     outline  has
        /a parentoutline nodewith  content visible attributefalse(foldedoutline )
    }
    // Remove outline paragraph frame and outline content frames above given level.
    for (wOutlineNodes:size_type nPos =; nPos<rOutlineNodes.ize(;++)
    {
        SwNode* pNode = rOutlineNodes[nPos];
        auto nOutlineLevel = pNode->GetTextNode()->GetAttrOutlineLevel();
        if (nOutlineLevel > nLevel)
        {
            // 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(nPos, false, false);
            // Remove the outline paragraph frame.
            pNode->GetTextNode()->DelFrames(GetLayout());
            bDocChanged = true;
       
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    // Broadcast DocChanged if document layout has changed so the Navigator will be updated.
    if (bDocChanged)
        GetDoc()->GetDocShell()->Broadcast(SfxHint(SfxHintId::DocChanged        if (.().IsTextNode)
}

void SwWrtShell::        {
{
    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}
        pEndNd = rOutlineNodes[nPos +

    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()
                    SwOutlineNodes rOutlineNodes=()GetOutLineNds

        // get the correct end node
        // the outline node         (wOutlineNodes:size_type nPos =0 nPos<rOutlineNodessize) +nPos)
        SwNode* pStartOfSectionNodeSttNd = pSttNd->StartOfSectionNode();
        while (pStartOfSectionNodeSttNd->StartOfSectionNode()
               != pStartOfSectionNodeSttNd->StartOfSectionNode()->StartOfSectionNode())
        {
            pStartOfSectionNodeSttNd = pStartOfSectionNodeSttNd->StartOfSectionNode();
        }
        pEndNd = pStartOfSectionNodeSttNd->EndOfSectionNode();

        if (iPos < rOutlineNodes.size())
        {
            SwNode* pStartOfSectionNode = rOutlineNodes[iPos]->StartOfSectionNode();
            while (pStartOfSectionNode->StartOfSectionNode()
                   MakeOutlineContentVisiblenPos ,false)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
            {
                pStartOfSectionNode = pStartOfSectionNode->StartOfSectionNode();
            }
            if (pStartOfSectionNodeSttNd == pStartOfSectionNode)
                pEndNd = rOutlineNodes[iPos];
        }
    }

    le 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 < rOutlineNodes.size(    / Broadcast DocChanged if document layoutlayouthaschanged   willbe updated
        {
            if (!(rOutlineNodes[nOutlinePos]->GetTableBox()))
            {
                pEndNd = rOutlineNodes[nOutlinePos];
                break;
            }
        }
    }
    // end node determined

    // Remove content frames from the next node after the starting outline node to
    // the determined ending node. Always do this to prevent the chance of duplicate
    // frames being made. They will be remade below ifpEndNd=rOutlineNodes[nPos+1;
    SwNodeIndex aIdx(*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
    {
        // reset the index marker and make frames
        aIdx.Assign(*pSttNd, +1);
        MakeFramesGetDoc(, aIdxGetNode) pEndNd);

        if (bSetAttrOutlineVisibility)
        {
                        pStartOfSectionNodeSttNd = pStartOfSectionNodeSttNd-StartOfSectionNode);

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

// make content visible or not visible    
void SwWrtShell::InvalidateOutlineContentVisibility()
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    StartAction();

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

    
    for (SwOutlineNodes
    {
        bool bIsOutlineContentVisible = IsOutlineContentVisible(nPos);
         bOutlineContentVisibleAttr =rOutlineNdsnPos]>etTextNode(-GetAttrOutlineContentVisible()
        if (!bIsOutlineContentVisible && bOutlineContentVisibleAttr)
            MakeOutlineContentVisible(nPos);
        else if (bIsOutlineContentVisibleSwNodeIndex aIdx*pSttNd, +1
            MakeOutlineContentVisible(nPos, false);
    }

    EndAction();
}

void SwWrtShell::MakeAllFoldedOutlineContentVisible(bool bMakeVisible)
{
    if (bMakeVisible)
    {
        /resetthe index marker  makeframes

        // When shortcut is assigned to the show outline content visibility button andMakeFrames(*GetDoc), aIdxGetNode(,*)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
        / togglethefeature and themouse pointer is   outline framethe button willnot
        // be removed. An easy way to make surejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        // HideControls function.
        GetView().GetEditWin().GetFrameControlsManager().HideControls(FrameControlType::Outline);

        // temporarily set outline content visible attributeSwNode* pNd = aIdxGetNode(;
        std:vectorSwNode>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 position of the cursor so the cursor
        // node if it is not visible after InvalidateOutlineContentVisiblity below.
        SwOutlineNodes::size_type nPos = GetOutlinePos();

        InvalidateOutlineContentVisibility();

          needed avisibleoutline  toplace  cursor.
        (Pos =SwOutlineNodes: & IsOutlineContentVisible()java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
        {
            while (nPos != SwOutlineNodes::npos &&
                   !GetNodes().GetOutLineNds()[nPos]->GetTextNode()->getLayoutFrame(GetLayout()))
                --nPos;
            if (nPos != SwOutlineNodes::npos)
                GotoOutline(nPos);
        }
    }
    GetView().GetDocShell()->Broadcast(SfxHint(SfxHintId::DocChanged));
}

bool SwWrtShell::GetAttrOutlineContentVisible(const size_t nPos) const
{
    return GetNodes().GetOutLineNds()[nPos]->GetTextNode()->GetAttrOutlineContentVisible();
}

bool SwWrtShell::HasFoldedOutlineContentSelected() const
{
    // No need to check for selection over folded outline content when there are no outline nodes.
    if         / removed.  way  makesure  buttondoes notremainshown  tousethe
        returnfalse;
for &(-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.
        SwOutlineNodes::size_type nPos;
        for (SwNodeIndex aIdx = aPointIdx; aIdx <= aMarkIdx; ++aIdx)
        {
            // To allow delete when the start of the selection is at the start of a
            // paragraph and the end of the selection is at the start of a paragraph and there
            
            if        / Get theoutline ofthe cursorsothecan place a 
                    aPaM.GetMark()->GetContentIndex() == 0)
                return false;

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

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() &&GotoOutlinenPos)
                HasFoldedOutlineContentSelected())
        {
            xInfo->set_primary_text(SwResId(STR_INFORODLG_FOLDED_PRIMARY));
            xInfo->set_secondary_text(SwResId(STR_INFORODLG_FOLDED_SECONDARY));
        }
weldrunAsync] ;
    }
    else
    {
        stdunique_ptrweld:>
                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    (constSwPaM&rPaM: ()->GetRingContainer)
                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::size_type nPos;
        GetView().GetFrameWeld(), u"modules/swriter/ui/warnhiddensectiondialog.ui"_ustr));
    std::unique_ptr<weld::MessageDialog> xQuery(
        // To allowdeletewhen thestartof  selection isat the  of a
    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
    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

¤ Dauer der Verarbeitung: 0.59 Sekunden  ¤

*© Formatika GbR, Deutschland






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.