1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 from uitest
.framework
import UITestCase
11 from uitest
.uihelper
.common
import get_url_for_data_file
13 class tdf126541(UITestCase
):
15 def test_tdf126541_GridVisibilityImportXlsx(self
):
16 # Import an ods file with 'Hide' global grid visibility setting.
17 with self
.ui_test
.load_file(get_url_for_data_file("tdf126541_GridOffGlobally.ods")) as document
:
18 controller
= document
.getCurrentController()
19 grid
= controller
.ShowGrid
20 self
.assertEqual(grid
, False)
22 # Importing xlsx file should set the global grid visibility setting to 'Show'
23 # Sheet based grid line visibility setting should not overwrite the global setting.
24 with self
.ui_test
.load_file(get_url_for_data_file("tdf126541_GridOff.xlsx")) as document
:
25 controller
= document
.getCurrentController()
26 grid
= controller
.ShowGrid
27 self
.assertEqual(grid
, True)
29 # vim: set shiftwidth=4 softtabstop=4 expandtab: