extensions/source/propctrlr/formcomponenthandler.cxx |   10 ++++++++++
 extensions/source/propctrlr/formcomponenthandler.hxx |    2 ++
 extensions/source/propctrlr/formmetadata.cxx         |    2 +-
 extensions/source/propctrlr/formmetadata.hxx         |    1 +
 4 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 00ad779e71f4ae675d0bacf68d2f2fc62b6b26d5
Author: Caolán McNamara <[email protected]>
Date:   Wed Apr 5 12:21:40 2017 +0100

    Resolves: tdf#52949 don't show mouse wheel property in report designer
    
    Change-Id: I3ecf2e9a40f2848b058aff34967ca01479f815b0

diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index 54aee775e94c..1918dcd0f8ed 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2165,6 +2165,13 @@ namespace pcr
         }
     }
 
+    bool FormComponentPropertyHandler::isReportModel() const
+    {
+        Reference<XModel> xModel(impl_getContextDocument_nothrow());
+        Reference<XReportDefinition> xReportDef(xModel, css::uno::UNO_QUERY);
+        return xReportDef.is();
+    }
+
     bool FormComponentPropertyHandler::impl_shouldExcludeProperty_nothrow( 
const Property& _rProperty ) const
     {
         OSL_ENSURE( _rProperty.Handle == m_pInfoService->getPropertyId( 
_rProperty.Name ),
@@ -2249,6 +2256,9 @@ namespace pcr
             if ( !SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) )
                 return true;
 
+        if ((nPropertyUIFlags & PROP_FLAG_REPORT_INVISIBLE) != 0 && 
isReportModel())
+            return true;
+
         return false;
     }
 
diff --git a/extensions/source/propctrlr/formcomponenthandler.hxx 
b/extensions/source/propctrlr/formcomponenthandler.hxx
index 5db0a3c54601..2534dfadce91 100644
--- a/extensions/source/propctrlr/formcomponenthandler.hxx
+++ b/extensions/source/propctrlr/formcomponenthandler.hxx
@@ -145,6 +145,8 @@ namespace pcr
         */
         void    impl_classifyControlModel_throw();
 
+        bool isReportModel() const;
+
         /** const-version of ->getPropertyValue
         */
         css::uno::Any impl_getPropertyValue_throw( const OUString& 
_rPropertyName ) const;
diff --git a/extensions/source/propctrlr/formmetadata.cxx 
b/extensions/source/propctrlr/formmetadata.cxx
index 21f01ffb4a39..2920f1d26590 100644
--- a/extensions/source/propctrlr/formmetadata.cxx
+++ b/extensions/source/propctrlr/formmetadata.cxx
@@ -125,7 +125,7 @@ namespace pcr
         DEF_INFO_3( READONLY,          READONLY,            13, READONLY,      
    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
         DEF_INFO_3( PRINTABLE,         PRINTABLE,           14, PRINTABLE,     
    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
         DEF_INFO_3( STEP,              STEP,                15, STEP,          
    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
-        DEF_INFO_3( WHEEL_BEHAVIOR,    WHEEL_BEHAVIOR,      16, 
WHEEL_BEHAVIOR,    FORM_VISIBLE, ENUM, COMPOSEABLE ),
+        DEF_INFO_3( WHEEL_BEHAVIOR,    WHEEL_BEHAVIOR,      16, 
WHEEL_BEHAVIOR,    FORM_VISIBLE | PROP_FLAG_REPORT_INVISIBLE, ENUM, COMPOSEABLE 
),
         DEF_INFO_3( TABSTOP,           TABSTOP,             17, TABSTOP,       
    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
         DEF_INFO_2( TABINDEX,          TABINDEX,            18, TABINDEX,      
    FORM_VISIBLE, DIALOG_VISIBLE ),
 
diff --git a/extensions/source/propctrlr/formmetadata.hxx 
b/extensions/source/propctrlr/formmetadata.hxx
index a851732f3d7c..27e289692efe 100644
--- a/extensions/source/propctrlr/formmetadata.hxx
+++ b/extensions/source/propctrlr/formmetadata.hxx
@@ -116,6 +116,7 @@ namespace pcr
 #define PROP_FLAG_EXPERIMENTAL      0x00000100  // the property is 
experimental, i.e. should not appear in the
                                                 // UI, unless experimental 
properties are enabled by a configuration
                                                 // option
+#define PROP_FLAG_REPORT_INVISIBLE  0x00000200  // the property should not 
appear in the Report Designer UI
 
 
     //= property ids (for all browseable properties)
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to