private static void initXSSFAnchorsMapForSheet ( final Map < String , ClientAnchor > anchortMap , final Map < String , String > positionMap , final XSSFSheet sheet ) { XSSFDrawing drawing = sheet . createDrawingPatriarch ( ) ; CTDrawing ctDrawing = drawing . getCTDrawing ( ) ; if ( ctDrawing . sizeOfTwoCellAnchorArray ( ) <= 0 ) { return ; } List < CTTwoCellAnchor > alist = ctDrawing . getTwoCellAnchorList ( ) ; for ( int j = 0 ; j < alist . size ( ) ; j ++ ) { CTTwoCellAnchor ctanchor = alist . get ( j ) ; String singleChartId = getAnchorAssociateChartId ( ctanchor ) ; if ( singleChartId != null ) { String chartId = sheet . getSheetName ( ) + "!" + singleChartId ; int dx1 = ( int ) ctanchor . getFrom ( ) . getColOff ( ) ; int dy1 = ( int ) ctanchor . getFrom ( ) . getRowOff ( ) ; int dx2 = ( int ) ctanchor . getTo ( ) . getColOff ( ) ; int dy2 = ( int ) ctanchor . getTo ( ) . getRowOff ( ) ; int col1 = ctanchor . getFrom ( ) . getCol ( ) ; int row1 = ctanchor . getFrom ( ) . getRow ( ) ; int col2 = ctanchor . getTo ( ) . getCol ( ) ; int row2 = ctanchor . getTo ( ) . getRow ( ) ; anchortMap . put ( chartId , new XSSFClientAnchor ( dx1 , dy1 , dx2 , dy2 , col1 , row1 , col2 , row2 ) ) ; positionMap . put ( WebSheetUtility . getFullCellRefName ( sheet . getSheetName ( ) , row1 , col1 ) , chartId ) ; } } }
Inits the XSSF anchors map for sheet .