Skip to content

NPOI.XSSF.UserModel.XSSFClientAnchor.cs may have a bug with null reference error #1667

@aljcn

Description

@aljcn
        public override int Dx1
        {
            get
            {
                return (int)Cell1.colOff;
            }
            set
            {
                //cell1.colOff = value;           //Update By Jman 2025.12.18
                Cell1.colOff = value;
            }
        }

        public override int Dy1
        {
            get
            {
                return (int)Cell1.rowOff;
            }
            set
            {
                //cell1.rowOff = value;       //Update By Jman 2025.12.18
                Cell1.rowOff = value;
            }
        }

        public override int Dy2
        {
            get
            {
                return (int)Cell2.rowOff;
            }
            set
            {
                //cell2.rowOff = value;       //Update By Jman 2025.12.18
                Cell2.rowOff = value;
            }
        }

        public override int Dx2
        {
            get
            {
                return (int)Cell2.colOff;
            }
            set
            {
                //cell2.colOff = value;       //Update By Jman 2025.12.18
                Cell2.colOff = value;
            }
        }

        public int Col1
        {
            get
            {
                //return cell1.col;     //Update By Jman 2025.12.18
                return Cell1.col;
            }
            set
            {
                Cell1.col=value;
            }
        }

        public int Col2
        {
            get
            {
                return Cell2.col;         
            }
            set
            {
                //cell2.col = value;    //Update By Jman 2025.12.18
                Cell2.col=value;
            }
        }

        public int Row1
        {
            get
            {
                return Cell1.row;
            }
            set
            {
                //cell1.row = value;      //Update By Jman 2025.12.18
                Cell1.row=value;
            }
        }

        public int Row2
        {
            get
            {
                return Cell2.row;
            }
            set
            {
                //cell2.row = value;    //Update By Jman 2025.12.18
                Cell2.row=value;
            }
        }

after fixed, runs well when shiftrows with picture

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions