[Libreoffice-commits] core.git: framework/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 23 11:45:41 UTC 2020


 framework/source/uielement/comboboxtoolbarcontroller.cxx    |   45 ------------
 framework/source/uielement/dropdownboxtoolbarcontroller.cxx |   13 ---
 2 files changed, 58 deletions(-)

New commits:
commit 048ab42d3f5c7bc6116b483d9c8ac8975c7d68a4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 22 19:41:05 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 23 13:45:06 2020 +0200

    remove undocumented ComboboxToolbarController properties
    
    what documentation for these addons that I can find leads to
    https://wiki.openoffice.org/wiki/Framework/Article/Generic_UNO_Interfaces_for_complex_toolbar_controls
    
    where "SetDropDownLines", "SetBackgroundColor" and "SetTextColor" don't appear,
    nor are they used in the odk examples, and these are all now problematic
    properties.
    
    originally introduced with
    
    commit b8f9b4ad593f046797f1785dc18ed15ba70be2e3
    Date:   Fri Jul 6 11:23:29 2007 +0000
    
        INTEGRATION: CWS c09tosrc (1.7.92); FILE MERGED
        2007/06/25 14:04:31 rt 1.7.92.2: Avoid warning on mac ('aColor' may be used uninitialized in this function).
        2007/06/18 15:27:16 cd 1.7.92.1: #i78622# Dropdown button of combobox (complex toolbar controller) must be clicked twice
    
    Change-Id: I16e1abb1846f2d7031fe940cc958396f66473ad6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92723
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index e4be0c413c63..11e775fd9911 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -327,51 +327,6 @@ void ComboboxToolbarController::executeControlCommand( const css::frame::Control
             }
         }
     }
-    else if ( rControlCommand.Command == "SetDropDownLines" )
-    {
-        for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
-        {
-            if ( rControlCommand.Arguments[i].Name == "Lines" )
-            {
-                sal_Int32 nValue( 5 );
-                rControlCommand.Arguments[i].Value >>= nValue;
-                m_pComboBox->SetDropDownLineCount( sal_uInt16( nValue ));
-                break;
-            }
-        }
-    }
-    else if ( rControlCommand.Command == "SetBackgroundColor" )
-    {
-        for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
-        {
-            if ( rControlCommand.Arguments[i].Name == "Color" )
-            {
-                css::util::Color aColor(0);
-                if ( rControlCommand.Arguments[i].Value >>= aColor )
-                {
-                    ::Color aBackColor( static_cast< sal_uInt32 >( aColor ));
-                    m_pComboBox->SetControlBackground( aBackColor );
-                }
-                break;
-            }
-        }
-    }
-    else if ( rControlCommand.Command == "SetTextColor" )
-    {
-        for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
-        {
-            if ( rControlCommand.Arguments[i].Name == "Color" )
-            {
-                css::util::Color aColor(0);
-                if ( rControlCommand.Arguments[i].Value >>= aColor )
-                {
-                    ::Color aForeColor( static_cast< sal_uInt32 >( aColor ));
-                    m_pComboBox->SetControlForeground( aForeColor );
-                }
-                break;
-            }
-        }
-    }
 }
 
 } // namespace
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 6eacd138660d..a14a288a2619 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -268,19 +268,6 @@ void DropdownToolbarController::executeControlCommand( const css::frame::Control
             }
         }
     }
-    else if ( rControlCommand.Command == "SetDropDownLines" )
-    {
-        for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
-        {
-            if ( rControlCommand.Arguments[i].Name == "Lines" )
-            {
-                sal_Int32 nValue( 5 );
-                rControlCommand.Arguments[i].Value >>= nValue;
-                m_pListBoxControl->SetDropDownLineCount( sal_uInt16( nValue ));
-                break;
-            }
-        }
-    }
 }
 
 } // namespace


More information about the Libreoffice-commits mailing list