summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorGabor Kelemen <gabor.kelemen.extern@allotropia.de>2024-01-17 17:31:47 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-01-22 08:30:54 +0100
commit09f6ad451156cdc5c2d0f398237a72b99598f32f (patch)
treefe9d1820900003039a15352771fb2b6dd182eb55 /unotools
parent2782fa00d3ec8d401a44ae91cd3fda9d1d60188b (diff)
Remove DetectHiddenControls method of locking down UI
It is used only on the Load/Save - General page, and it's redundant with using officecfg methods and setting UI elements representing locked down keys as insensitive + showing a lock icon Change-Id: I689e7925198f8aac60b5711bf1c349c45a5ab62a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162267 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/optionsdlg.cxx22
1 files changed, 2 insertions, 20 deletions
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx
index c88bd095106c..35e964afbf08 100644
--- a/unotools/source/config/optionsdlg.cxx
+++ b/unotools/source/config/optionsdlg.cxx
@@ -30,10 +30,9 @@ using namespace com::sun::star::uno;
constexpr OUString ROOT_NODE = u"OptionsDialogGroups"_ustr;
constexpr OUString PAGES_NODE = u"Pages"_ustr;
-constexpr OUString OPTIONS_NODE = u"Options"_ustr;
namespace {
- enum NodeType{ NT_Group, NT_Page, NT_Option };
+ enum NodeType{ NT_Group, NT_Option };
}
constexpr OUString g_sPathDelimiter = u"/"_ustr;
static void ReadNode(
@@ -72,13 +71,6 @@ static void ReadNode(
break;
}
- case NT_Page :
- {
- sSet = OPTIONS_NODE;
- nLen = 2;
- break;
- }
-
case NT_Option :
{
nLen = 1;
@@ -106,7 +98,7 @@ static void ReadNode(
for ( const auto& rNode : aNodes )
{
OUString sSubNodeName( sNodes + g_sPathDelimiter + rNode );
- ReadNode( xHierarchyAccess, aOptionNodeList, sSubNodeName, _eType == NT_Group ? NT_Page : NT_Option );
+ ReadNode( xHierarchyAccess, aOptionNodeList, sSubNodeName, NT_Option );
}
}
}
@@ -119,10 +111,6 @@ static OUString getPagePath( std::u16string_view _rPage )
{
return OUString( OUString::Concat(PAGES_NODE) + "/" + _rPage + "/" );
}
-static OUString getOptionPath( std::u16string_view _rOption )
-{
- return OUString( OUString::Concat(OPTIONS_NODE) + "/" + _rOption + "/" );
-}
bool SvtOptionsDialogOptions::IsHidden( const OUString& _rPath ) const
{
@@ -143,10 +131,4 @@ bool SvtOptionsDialogOptions::IsPageHidden( std::u16string_view _rPage, std::u16
return IsHidden( getGroupPath( _rGroup ) + getPagePath( _rPage ) );
}
-bool SvtOptionsDialogOptions::IsOptionHidden(
- std::u16string_view _rOption, std::u16string_view _rPage, std::u16string_view _rGroup ) const
-{
- return IsHidden( getGroupPath( _rGroup ) + getPagePath( _rPage ) + getOptionPath( _rOption ) );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */