https://bugs.documentfoundation.org/show_bug.cgi?id=99099

            Bug ID: 99099
           Summary: Addition of new rows in Spreadsheet in not inheriting
                    previous row attributes in .xlsx but inheriting in
                    .xls
           Product: LibreOffice
           Version: 5.0.4.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: jvchb...@gmail.com

We use LibreOffice to convert .xls documents to .xls and xlsx documents.
 We use MS Excel 97 filter to produce  xls  documents and Calc MS Excel 2007
XML to produce .xlsx documents.

 We use conditional formatting for one column to apply background color for the
cell.

It  works fine for .xls with MS Excel 97 filter but fails for .xlsx with Calc
MS Excel 2007 XML  filter.It outputs the cells without applying conditional
formatting for .xlsx.

The code we use for additions of new rows for both .xls and .xlsx is same.
 So the issue is with Calc MS Excel 2007 XML  filter only as MS Excel 97 filter
is working absolutely fine.

Code Snippet used for generating new rows:
-------------------------------------------
public void insertCells(XSpreadsheet xSheet, int left, int top, int right, int
bottom, int num, CellInsertMode nMode) {
        try {
            XCellRangeMovement xMovement = (XCellRangeMovement)
UnoRuntime.queryInterface(XCellRangeMovement.class,
                    xSheet);
            if (num <= 0) {
                // don't do anything
                return;
            }

            if (nMode == CellInsertMode.DOWN || nMode == CellInsertMode.ROWS) {
                // only expand row cells
                top = bottom + 1;
                bottom = top + num - 1;
            } else if (nMode == CellInsertMode.RIGHT || nMode ==
CellInsertMode.COLUMNS) {
                // only expand column cells
                left = right + 1;
                right = left + num - 1;
            }



CellRangeAddress addrRange = null;

            XCellRangeAddressable xAddr = (XCellRangeAddressable)
UnoRuntime.queryInterface(
                    XCellRangeAddressable.class,
xSheet.getCellRangeByPosition(left, top, right, bottom));
            addrRange = xAddr.getRangeAddress();

xMovement.insertCells(addrRange, nMode);
 Please let us know  if more information is required  to reproduce the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to