diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index 6bac7d7bdeb6..0a5514cfe5ba 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -61,12 +61,12 @@ - + Master Pages - MasterPagesDeck + SdMasterPagesDeck private:graphicrepository/sfx2/res/symphony/sidebar-template-large.png @@ -81,12 +81,12 @@ - + Custom Animation - CustomAnimationDeck + SdCustomAnimationDeck private:graphicrepository/sfx2/res/symphony/sidebar-animation-large.png @@ -101,12 +101,12 @@ - + Slide Transition - SlideTransitionDeck + SdSlideTransitionDeck private:graphicrepository/sfx2/res/symphony/sidebar-transition-large.png @@ -161,12 +161,12 @@ - + Functions - FunctionsDeck + ScFunctionsDeck private:graphicrepository/sfx2/res/symphony/sidebar-functions-large.png @@ -181,12 +181,12 @@ - + Manage Changes - ManageChangesDeck + SwManageChangesDeck private:graphicrepository/cmd/lc_trackchangesbar.png @@ -208,12 +208,12 @@ - + Design - DesignDeck + SwDesignDeck private:graphicrepository/cmd/lc_designerdialog.png @@ -558,7 +558,7 @@ - + Layouts @@ -566,7 +566,7 @@ false - ImpressLayoutsPanel + SdLayoutsPanel PropertyDeck @@ -588,7 +588,7 @@ - + Used in This Presentation @@ -596,10 +596,10 @@ false - UsedMasterPagesPanel + SdUsedMasterPagesPanel - MasterPagesDeck + SdMasterPagesDeck @@ -614,7 +614,7 @@ - + Recently Used @@ -622,10 +622,10 @@ false - RecentMasterPagesPanel + SdRecentMasterPagesPanel - MasterPagesDeck + SdMasterPagesDeck @@ -640,7 +640,7 @@ - + Available for Use @@ -648,10 +648,10 @@ false - AllMasterPagesPanel + SdAllMasterPagesPanel - MasterPagesDeck + SdMasterPagesDeck @@ -666,7 +666,7 @@ - + Custom Animation @@ -674,10 +674,10 @@ true - CustomAnimationPanel + SdCustomAnimationPanel - CustomAnimationDeck + SdCustomAnimationDeck @@ -692,7 +692,7 @@ - + Slide Transition @@ -700,10 +700,10 @@ true - SlideTransitionPanel + SdSlideTransitionPanel - SlideTransitionDeck + SdSlideTransitionDeck @@ -718,7 +718,7 @@ - + Table Design @@ -726,7 +726,7 @@ false - ImpressTableDesignPanel + SdTableDesignPanel PropertyDeck @@ -770,12 +770,12 @@ - + Alignment - AlignmentPropertyPanel + ScAlignmentPropertyPanel PropertyDeck @@ -800,12 +800,12 @@ - + Cell Appearance - CellAppearancePropertyPanel + ScCellAppearancePropertyPanel PropertyDeck @@ -830,12 +830,12 @@ - + Number Format - NumberFormatPropertyPanel + ScNumberFormatPropertyPanel PropertyDeck @@ -897,12 +897,12 @@ - + Wrap - WrapPropertyPanel + SwWrapPropertyPanel PropertyDeck @@ -1026,7 +1026,7 @@ SwManageChangesPanel - ManageChangesDeck + SwManageChangesDeck @@ -1067,7 +1067,7 @@ - + Functions @@ -1075,10 +1075,10 @@ true - FunctionsPanel + ScFunctionsPanel - FunctionsDeck + ScFunctionsDeck @@ -1092,15 +1092,15 @@ 100 - + Style Presets - StylePresetsPanel + SwStylePresetsPanel - DesignDeck + SwDesignDeck @@ -1118,15 +1118,15 @@ - + Themes - ThemePanel + SwThemePanel - DesignDeck + SwDesignDeck @@ -1172,7 +1172,7 @@ Data Series - SeriesPanel + ChartSeriesPanel ChartDeck diff --git a/sfx2/PythonTest_sfx2_python.mk b/sfx2/PythonTest_sfx2_python.mk index 43001100eb0d..a3a80079dc8c 100644 --- a/sfx2/PythonTest_sfx2_python.mk +++ b/sfx2/PythonTest_sfx2_python.mk @@ -15,6 +15,7 @@ $(eval $(call gb_PythonTest_set_defs,sfx2_python,\ $(eval $(call gb_PythonTest_add_modules,sfx2_python,$(SRCDIR)/sfx2/qa/python,\ check_sidebar \ + check_sidebar_registry \ )) # vim: set noet sw=4 ts=4: diff --git a/sfx2/qa/python/check_sidebar_registry.py b/sfx2/qa/python/check_sidebar_registry.py new file mode 100644 index 000000000000..9635f27010d6 --- /dev/null +++ b/sfx2/qa/python/check_sidebar_registry.py @@ -0,0 +1,92 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# 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/. +# + +import unittest +import unohelper +import os +from org.libreoffice.unotest import UnoInProcess +import uno + +class CheckSidebarRegistry(unittest.TestCase): + _uno = None + _xDoc = None + + @classmethod + def setUpClass(cls): + cls._uno = UnoInProcess() + cls._uno.setUp() + cls._xDoc = cls._uno.openEmptyDoc( url = "private:factory/scalc", bHidden = False, bReadOnly = False) + + @classmethod + def tearDownClass(cls): + cls._uno.tearDown() + + def test_sidebar_registry(self): + + # assert(result) after whole processing to list defected nodes at once + result = True + + #open registry node in Sidebar.xcu + configProvider = self.createUnoService("com.sun.star.configuration.ConfigurationProvider") + + param = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + param.Name = "nodepath" + + + # Deck names consitency + + param.Value = "org.openoffice.Office.UI.Sidebar/Content/DeckList" + + sidebarDecksSettings = configProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", + (param, )) + for nodeName in sidebarDecksSettings: + + node = sidebarDecksSettings.getByName(nodeName) + + if (node.Id != nodeName): + print("\nNon-consistent sidebar.xcu Deck registry names", nodeName, node.Id) + result = False + + # panel names consitency + + param.Value = "org.openoffice.Office.UI.Sidebar/Content/PanelList" + + sidebarPanelsSettings = configProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", + (param, )) + for nodeName in sidebarPanelsSettings: + + node = sidebarPanelsSettings.getByName(nodeName) + + if (node.Id != nodeName): + print("\nNon-consistent sidebar.xcu Panel registry names", nodeName, node.Id) + result = False + + # is panel bound to an existing Deck ? + FoundDeckId = False + for deckNodeName in sidebarDecksSettings: + deckNode = sidebarDecksSettings.getByName(deckNodeName) + if (node.DeckId == deckNode.Id): + FoundDeckId = True + if not FoundDeckId: + print("\nNon existing DeckId for the panel ",node.Id) + result = False + + # trigger the overall result. details of each error have already be printed + assert(result) + + + def createUnoService(self, serviceName): + + sm = uno.getComponentContext().ServiceManager + return sm.createInstanceWithContext(serviceName, uno.getComponentContext()) + +if __name__ == "__main__": + unittest.main() + +# vim: set noet sw=4 ts=4: