User: kz      
Date: 2008-06-25 12:37:49+0000
Modified:
   dba/dbaccess/source/ui/app/AppIconControl.cxx

Log:
 INTEGRATION: CWS dba30d (1.10.30); FILE MERGED
 2008/06/01 21:02:33 fs 1.10.30.1: #i80943# more preparations for context menu 
interception, including some re-factoring

File Changes:

Directory: /dba/dbaccess/source/ui/app/
=======================================

File [changed]: AppIconControl.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppIconControl.cxx?r1=1.10&r2=1.11
Delta lines:  +21 -16
---------------------
--- AppIconControl.cxx  2008-04-10 13:58:42+0000        1.10
+++ AppIconControl.cxx  2008-06-25 12:37:46+0000        1.11
@@ -69,21 +69,26 @@
 {
     DBG_CTOR(OApplicationIconControl,NULL);
 
-       typedef ::std::pair< USHORT,USHORT> TUSHORTPair;
-       typedef ::std::pair< ElementType,TUSHORTPair> TUSHORT2Pair;
-       typedef ::std::pair< String,TUSHORT2Pair> TPair;
-       static const TPair pTypes[] = { 
-                       
TPair(String(ModuleRes(RID_STR_TABLES_CONTAINER)),TUSHORT2Pair(E_TABLE,TUSHORTPair(IMG_TABLEFOLDER_TREE_L,IMG_TABLEFOLDER_TREE_LHC)
 )) 
-               ,       
TPair(String(ModuleRes(RID_STR_QUERIES_CONTAINER)),TUSHORT2Pair(E_QUERY,TUSHORTPair(IMG_QUERYFOLDER_TREE_L,IMG_QUERYFOLDER_TREE_LHC))
 )
-               ,       
TPair(String(ModuleRes(RID_STR_FORMS_CONTAINER)),TUSHORT2Pair(E_FORM,TUSHORTPair(IMG_FORMFOLDER_TREE_L,IMG_FORMFOLDER_TREE_LHC))
 )
-               ,       
TPair(String(ModuleRes(RID_STR_REPORTS_CONTAINER)),TUSHORT2Pair(E_REPORT,TUSHORTPair(IMG_REPORTFOLDER_TREE_L,IMG_REPORTFOLDER_TREE_LHC))
 )
+    struct CategoryDescriptor
+    {
+        USHORT      nLabelResId;
+        ElementType eType;
+        USHORT      nImageResId;
+        USHORT      nImageResIdHC;
+    }   aCategories[] = {
+        { RID_STR_TABLES_CONTAINER,     E_TABLE,    IMG_TABLEFOLDER_TREE_L, 
IMG_TABLEFOLDER_TREE_LHC    },
+        { RID_STR_QUERIES_CONTAINER,    E_QUERY,    IMG_QUERYFOLDER_TREE_L, 
IMG_QUERYFOLDER_TREE_LHC    },
+               { RID_STR_FORMS_CONTAINER,      E_FORM,     
IMG_FORMFOLDER_TREE_L,  IMG_FORMFOLDER_TREE_LHC     },
+        { RID_STR_REPORTS_CONTAINER,    E_REPORT,   
IMG_REPORTFOLDER_TREE_L,IMG_REPORTFOLDER_TREE_LHC   }
                };
-
-       for (size_t i=0; i < sizeof(pTypes)/sizeof(pTypes[0]); ++i)
+    for ( size_t i=0; i < sizeof(aCategories)/sizeof(aCategories[0]); ++i)
        {
-               SvxIconChoiceCtrlEntry* pEntry = 
InsertEntry(pTypes[i].first,Image(ModuleRes(pTypes[i].second.second.first)),Image(ModuleRes(pTypes[i].second.second.second)));
+        SvxIconChoiceCtrlEntry* pEntry = InsertEntry(
+            String( ModuleRes( aCategories[i].nLabelResId ) ),
+            Image( ModuleRes( aCategories[i].nImageResId ) ),
+            Image( ModuleRes( aCategories[i].nImageResIdHC ) ) );
                if ( pEntry )
-                       pEntry->SetUserData(new 
ElementType(pTypes[i].second.first));
+            pEntry->SetUserData( new ElementType( aCategories[i].eType ) );
        }
 
        SetChoiceWithCursor( TRUE );




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to