diff options
author | Jens Carl <j.carl43@gmx.de> | 2017-08-23 07:35:01 +0000 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-08-23 23:41:40 +0200 |
commit | 4818ee60172b2c7d5d04e57499e345e1cfd7b430 (patch) | |
tree | 71dc5ea4660bed77085e787be171c6c058ab2457 /qadevOOo/tests | |
parent | 40fdfea0ae994569fb0919c974fc2356dd4bb5c4 (diff) |
tdf#45904 Move Java _XUniqueCellFormatRangesSupplier test to C++
Change-Id: I66c62f1676515437197d1875600407408040ca74
Reviewed-on: https://gerrit.libreoffice.org/41445
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'qadevOOo/tests')
-rw-r--r-- | qadevOOo/tests/java/ifc/sheet/_XUniqueCellFormatRangesSupplier.java | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/qadevOOo/tests/java/ifc/sheet/_XUniqueCellFormatRangesSupplier.java b/qadevOOo/tests/java/ifc/sheet/_XUniqueCellFormatRangesSupplier.java deleted file mode 100644 index 982a85e4e25c..000000000000 --- a/qadevOOo/tests/java/ifc/sheet/_XUniqueCellFormatRangesSupplier.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.sheet; - -import lib.MultiMethodTest; - -import com.sun.star.container.XIndexAccess; -import com.sun.star.sheet.XUniqueCellFormatRangesSupplier; - -public class _XUniqueCellFormatRangesSupplier extends MultiMethodTest { - - public XUniqueCellFormatRangesSupplier oObj; - - /** - * call the method getUniqueCellFormatRanges and returns OK result if - * the gained XIndexAccess isn't null and the method checkIndexAccess - * returns true. - */ - - public void _getUniqueCellFormatRanges() { - boolean res = true; - XIndexAccess xIA = oObj.getUniqueCellFormatRanges(); - if (xIA != null) { - res = checkIndexAccess(xIA); - } else { - log.println("The gained IndexAccess is null"); - res = false; - } - tRes.tested("getUniqueCellFormatRanges()",res); - } - - /** - * calls the method getCount at the IndexAccess, returns true is it is >0 - * and getByIndex() doesn't throw an exception for Indexes between 0 and count - */ - - protected boolean checkIndexAccess(XIndexAccess xIA) { - boolean res = true; - int count = xIA.getCount(); - log.println("Found "+count+" Elements"); - res &= count>0; - for (int k=0; k<count; k++) { - try { - Object element = xIA.getByIndex(k); - log.println("Element "+k+" = "+element); - } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - log.println("Unexpected Exception while getting by Index ("+k+")"+e.getMessage()); - res &=false; - } catch (com.sun.star.lang.WrappedTargetException e) { - log.println("Unexpected Exception while getting by Index ("+k+")"+e.getMessage()); - res &=false; - } - } - return res; - } - - -} |