extensions/source/propctrlr/formcomponenthandler.cxx |   71 -------------------
 extensions/source/propctrlr/formcomponenthandler.hxx |    2 
 extensions/source/propctrlr/formstrings.hxx          |    1 
 3 files changed, 2 insertions(+), 72 deletions(-)

New commits:
commit b694178bd7d996eef834892f103610e8d808b1fb
Author:     Xisco Fauli <[email protected]>
AuthorDate: Fri Feb 20 09:29:53 2026 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Fri Feb 20 11:57:22 2026 +0100

    tdf#170839: Revert "tdf#56676 disable form properties when they are not 
available for change"
    
    This reverts commit 57352dce995c98d1282484d02c38ed2132b091f5.
    
    Reason for revert: it affects all kind of databases
    
    Change-Id: Ie852752da413553ef03ab15a0ab75ff156b5b3cf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199798
    Reviewed-by: Xisco Fauli <[email protected]>
    Reviewed-by: Ilmari Lauhakangas <[email protected]>
    Tested-by: Christian Lohmaier <[email protected]>
    Reviewed-by: Christian Lohmaier <[email protected]>

diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index d44350bd475f..a1b7ffa46d38 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -54,7 +54,6 @@
 #include <com/sun/star/form/XGridColumnFactory.hpp>
 #include <com/sun/star/sdb/SQLContext.hpp>
 #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#include <com/sun/star/sdbcx/Privilege.hpp>
 #include <com/sun/star/sdb/XQueriesSupplier.hpp>
 #include <com/sun/star/form/ListSourceType.hpp>
 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
@@ -1515,9 +1514,6 @@ namespace pcr
             if ( !_bFirstTimeInit && m_bHaveCommand )
                 lcl_rebuildAndResetCommand( _rxInspectorUI, this );
             aDependentProperties.push_back( PROPERTY_ID_COMMAND );
-            aDependentProperties.push_back(PROPERTY_ID_ALLOWADDITIONS);
-            aDependentProperties.push_back(PROPERTY_ID_ALLOWEDITS);
-            aDependentProperties.push_back(PROPERTY_ID_ALLOWDELETIONS);
             break;  // case PROPERTY_ID_COMMANDTYPE
 
         // ----- DataSourceName -----
@@ -1541,9 +1537,6 @@ namespace pcr
         case PROPERTY_ID_COMMAND:
             aDependentProperties.push_back( PROPERTY_ID_FILTER );
             aDependentProperties.push_back( PROPERTY_ID_SORT );
-            aDependentProperties.push_back(PROPERTY_ID_ALLOWADDITIONS);
-            aDependentProperties.push_back(PROPERTY_ID_ALLOWEDITS);
-            aDependentProperties.push_back(PROPERTY_ID_ALLOWDELETIONS);
             if ( m_bComponentIsSubForm )
                 aDependentProperties.push_back( PROPERTY_ID_DETAILFIELDS );
             break;
@@ -1793,7 +1786,7 @@ namespace pcr
         }
     }
 
-    void FormComponentPropertyHandler::impl_updateDependentProperty_nothrow( 
PropertyId _nPropId, const Reference< XObjectInspectorUI >& _rxInspectorUI )
+    void FormComponentPropertyHandler::impl_updateDependentProperty_nothrow( 
PropertyId _nPropId, const Reference< XObjectInspectorUI >& _rxInspectorUI ) 
const
     {
         try
         {
@@ -1827,68 +1820,6 @@ namespace pcr
             }
             break;  // case PROPERTY_ID_STRINGITEMLIST
 
-            case PROPERTY_ID_ALLOWADDITIONS:
-            {
-                bool bEnable = false;
-                sal_Int32 nPrivileges = 0;
-                if 
(m_xComponent->getPropertySetInfo()->hasPropertyByName(PROPERTY_PRIVILEGES))
-                {
-                    m_xComponent->getPropertyValue(PROPERTY_PRIVILEGES) >>= 
nPrivileges;
-                    bEnable = (nPrivileges & css::sdbcx::Privilege::INSERT) != 
0;
-                }
-                _rxInspectorUI->enablePropertyUI(
-                    
impl_getPropertyNameFromId_nothrow(PROPERTY_ID_ALLOWADDITIONS),
-                    bEnable
-                );
-                // Set value to false if disabled
-                if (!bEnable)
-                {
-                    
setPropertyValue(impl_getPropertyNameFromId_nothrow(PROPERTY_ID_ALLOWADDITIONS),
 Any(false));
-                }
-            }
-            break;
-
-            case PROPERTY_ID_ALLOWEDITS:
-            {
-                bool bEnable = false;
-                sal_Int32 nPrivileges = 0;
-                if 
(m_xComponent->getPropertySetInfo()->hasPropertyByName(PROPERTY_PRIVILEGES))
-                {
-                    m_xComponent->getPropertyValue(PROPERTY_PRIVILEGES) >>= 
nPrivileges;
-                    bEnable = (nPrivileges & css::sdbcx::Privilege::UPDATE) != 
0;
-                }
-                _rxInspectorUI->enablePropertyUI(
-                    impl_getPropertyNameFromId_nothrow(PROPERTY_ID_ALLOWEDITS),
-                    bEnable
-                );
-                // Set value to false if disabled
-                if (!bEnable)
-                {
-                    
setPropertyValue(impl_getPropertyNameFromId_nothrow(PROPERTY_ID_ALLOWEDITS), 
Any(false));
-                }
-            }
-            break;
-
-            case PROPERTY_ID_ALLOWDELETIONS:
-            {
-                bool bEnable = false;
-                sal_Int32 nPrivileges = 0;
-                if 
(m_xComponent->getPropertySetInfo()->hasPropertyByName(PROPERTY_PRIVILEGES))
-                {
-                    m_xComponent->getPropertyValue(PROPERTY_PRIVILEGES) >>= 
nPrivileges;
-                    bEnable = (nPrivileges & css::sdbcx::Privilege::DELETE) != 
0;
-                }
-                _rxInspectorUI->enablePropertyUI(
-                    
impl_getPropertyNameFromId_nothrow(PROPERTY_ID_ALLOWDELETIONS),
-                    bEnable
-                );
-                // Set value to false if disabled
-                if (!bEnable)
-                {
-                    
setPropertyValue(impl_getPropertyNameFromId_nothrow(PROPERTY_ID_ALLOWDELETIONS),
 Any(false));
-                }
-            }
-            break;
             // ----- TypedItemList -----
             case PROPERTY_ID_TYPEDITEMLIST:
             {
diff --git a/extensions/source/propctrlr/formcomponenthandler.hxx 
b/extensions/source/propctrlr/formcomponenthandler.hxx
index 1596f3b2e103..d28c893f3b74 100644
--- a/extensions/source/propctrlr/formcomponenthandler.hxx
+++ b/extensions/source/propctrlr/formcomponenthandler.hxx
@@ -392,7 +392,7 @@ namespace pcr
             @param _rxInspectorUI
                 provides access to the property browser UI. Must not be 
<NULL/>.
         */
-        void impl_updateDependentProperty_nothrow( PropertyId _nPropId, const 
css::uno::Reference< css::inspection::XObjectInspectorUI >& _rxInspectorUI );
+        void impl_updateDependentProperty_nothrow( PropertyId _nPropId, const 
css::uno::Reference< css::inspection::XObjectInspectorUI >& _rxInspectorUI ) 
const;
 
         /** determines whether the given form has a valid data source 
signature.
 
diff --git a/extensions/source/propctrlr/formstrings.hxx 
b/extensions/source/propctrlr/formstrings.hxx
index d37cc98c226c..495e178f842e 100644
--- a/extensions/source/propctrlr/formstrings.hxx
+++ b/extensions/source/propctrlr/formstrings.hxx
@@ -114,7 +114,6 @@ inline constexpr OUString PROPERTY_SHOW_SCROLLBARS = 
u"ShowScrollbars"_ustr;
 inline constexpr OUString PROPERTY_TABSTOP = u"Tabstop"_ustr;
 inline constexpr OUString PROPERTY_AUTOCOMPLETE = u"Autocomplete"_ustr;
 inline constexpr OUString PROPERTY_PRINTABLE = u"Printable"_ustr;
-inline constexpr OUString PROPERTY_PRIVILEGES = u"Privileges"_ustr;
 inline constexpr OUString PROPERTY_ECHO_CHAR = u"EchoChar"_ustr;
 inline constexpr OUString PROPERTY_ROWHEIGHT = u"RowHeight"_ustr;
 inline constexpr OUString PROPERTY_HELPTEXT = u"HelpText"_ustr;

Reply via email to