[Libreoffice-commits] .: oox/source

Noel Power noelp at kemper.freedesktop.org
Wed Oct 5 15:39:54 PDT 2011


 oox/source/ole/olehelper.cxx |   28 ++--------------------------
 1 file changed, 2 insertions(+), 26 deletions(-)

New commits:
commit ec294b77c0e9ac6202cce751f08aaf0f500fcf11
Author: Noel Power <noel.power at novell.com>
Date:   Wed Oct 5 23:42:47 2011 +0100

    Revert "add hackery re. EditControls, FormattedField & ImageControls from msocximex"
    
    This reverts commit 04688482241aa28b40f3ba911a4c9acab87b5d56.

diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 3943e65..fd4672a 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -138,7 +138,6 @@ struct IdCntrlData
 };
 
 const sal_Int16 TOGGLEBUTTON = -1;
-const sal_Int16 FIELDCONTROL = -2;
 
 typedef std::map< sal_Int16, GUIDCNamePair > GUIDCNamePairMap;
 class classIdToGUIDCNamePairMap
@@ -197,9 +196,6 @@ classIdToGUIDCNamePairMap::classIdToGUIDCNamePairMap()
         {  FormComponentType::PATTERNFIELD,
              { AX_GUID_TEXTBOX, "TextBox"},
         },
-        {  FormComponentType::FORMULAFIELD,
-             { AX_GUID_TEXTBOX, "TextBox"},
-        },
         {  FormComponentType::IMAGEBUTTON,
              { AX_GUID_COMMANDBUTTON, "CommandButton"},
         },
@@ -505,34 +501,14 @@ OleFormCtrlExportHelper::OleFormCtrlExportHelper(  const Reference< XComponentCo
         PropertySet aPropSet( mxControlModel );
         if ( aPropSet.getProperty( nClassId, PROP_ClassId ) )
         {
-            /* psuedo ripped from legacy msocximex:
-              "There is a truly horrible thing with EditControls and FormattedField
-              Controls, they both pretend to have an EDITBOX ClassId for compability
-              reasons, at some stage in the future hopefully there will be a proper
-              FormulaField ClassId rather than this piggybacking two controls onto the
-              same ClassId, cmc."
-            */
-            if ( nClassId == FormComponentType::TEXTFIELD)
-            {
-                if (xInfo->
-                    supportsService( CREATE_OUSTRING( "com.sun.star.form.component.FormattedField" ) ) )
-                    nClassId = FormComponentType::FORMULAFIELD;
-            }
-            else if ( nClassId == FormComponentType::COMMANDBUTTON )
+            // psuedo ripped from legacy msocximex
+            if ( nClassId == FormComponentType::COMMANDBUTTON )
             {
                 bool bToggle = false;
                 aPropSet.getProperty( bToggle, PROP_Toggle );
                 if ( bToggle )
                     nClassId = TOGGLEBUTTON;
             }
-            else if ( nClassId == FormComponentType::CONTROL )
-            {
-                Reference< XServiceInfo > xInfo( xCntrlModel,
-                    UNO_QUERY);
-                if (xInfo->
-                    supportsService(OUString( CREATE_OUSTRING( "com.sun.star.form.component.ImageControl" ) ) ) )
-                nClassId = FormComponentType::IMAGECONTROL;
-            }
 
             GUIDCNamePairMap& cntrlMap = classIdToGUIDCNamePairMap::get();
             GUIDCNamePairMap::iterator it = cntrlMap.find( nClassId );


More information about the Libreoffice-commits mailing list