[Libreoffice-commits] core.git: 3 commits - include/svx sfx2/source svx/source unoidl/source

Caolán McNamara caolanm at redhat.com
Wed Dec 21 18:40:19 UTC 2016


 include/svx/dialogs.hrc               |    6 ++++
 include/svx/fmresids.hrc              |    1 
 sfx2/source/dialog/dialog.hrc         |    5 +++-
 sfx2/source/dialog/templdlg.cxx       |   17 ++++----------
 sfx2/source/dialog/templdlg.src       |   21 +++++++++--------
 sfx2/source/inc/templdgi.hxx          |    2 -
 svx/source/form/datanavi.cxx          |   12 ++++-----
 svx/source/form/datanavi.src          |   41 +++++++++++++++++++---------------
 svx/source/inc/datanavi.hrc           |    7 -----
 svx/source/inc/datanavi.hxx           |    1 
 unoidl/source/sourceprovider-parser.y |    2 +
 11 files changed, 58 insertions(+), 57 deletions(-)

New commits:
commit 0f00751af858da91d379208b8b679002a180ff93
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 21 17:23:33 2016 +0000

    unwind RID_STYLE_DESIGNER_IMAGELIST ImageList
    
    Change-Id: I8fd69aa8acc8aa2bb1705b3819cf089e618464b5

diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 800f717..c860dbd 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -57,11 +57,14 @@
 
 #define STR_PDF_EXPORT_SEND             ( RC_DIALOG_BEGIN + 120 )
 #define IMG_INFO                        ( RC_DIALOG_BEGIN + 122 )
-#define RID_STYLE_DESIGNER_IMAGELIST    ( RC_DIALOG_BEGIN + 123 )
+//free
 #define SFX_ST_EDIT                     ( RC_DIALOG_BEGIN + 124 )
 #define STR_STYLE_ELEMTLIST             ( RC_DIALOG_BEGIN + 125 )
 #define STR_FONT_TABPAGE                ( RC_DIALOG_BEGIN + 126 )
 #define STR_PREVIEW_CHECKBOX            ( RC_DIALOG_BEGIN + 127 )
+#define RID_SFXBMP_WATERCAN             ( RC_DIALOG_BEGIN + 128 )
+#define RID_SFXBMP_NEW_BY_EXAMPLE       ( RC_DIALOG_BEGIN + 129 )
+#define RID_SFXBMP_UPDATE_BY_EXAMPLE    ( RC_DIALOG_BEGIN + 130 )
 
 #endif
 
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 8e5f32e..a8f6af1 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -343,8 +343,6 @@ SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Wi
 {
     OSL_ASSERT(mpBindings!=nullptr);
 
-    pImpl->setNonFamilyImages();
-
     SetStyle(GetStyle() & ~WB_DOCKABLE);
 }
 
@@ -2176,26 +2174,26 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(SfxBindings* pB, SfxTemplatePanel
                     ::comphelper::getProcessComponentContext()) );
         uno::Reference< container::XNameAccess > xUICommands;
         OUString sTextDoc("com.sun.star.text.TextDocument");
-        if(xNameAccess->hasByName(sTextDoc))
+        if (xNameAccess->hasByName(sTextDoc))
         {
-            uno::Any a = xNameAccess->getByName( sTextDoc );
+            uno::Any a = xNameAccess->getByName(sTextDoc);
             a >>= xUICommands;
         }
         if (xUICommands.is())
         {
             uno::Any aCommand = xUICommands->getByName(".uno:StyleApply");
             OUString sLabel = lcl_GetLabel( aCommand );
-            m_aActionTbR->InsertItem( SID_STYLE_WATERCAN, sLabel );
+            m_aActionTbR->InsertItem(SID_STYLE_WATERCAN, Image(BitmapEx(SfxResId(RID_SFXBMP_WATERCAN))), sLabel);
             m_aActionTbR->SetHelpId(SID_STYLE_WATERCAN, HID_TEMPLDLG_WATERCAN);
 
             aCommand = xUICommands->getByName(".uno:StyleNewByExample");
             sLabel = lcl_GetLabel( aCommand );
-            m_aActionTbR->InsertItem( SID_STYLE_NEW_BY_EXAMPLE, sLabel );
+            m_aActionTbR->InsertItem(SID_STYLE_NEW_BY_EXAMPLE, Image(BitmapEx(SfxResId(RID_SFXBMP_NEW_BY_EXAMPLE))), sLabel);
             m_aActionTbR->SetHelpId(SID_STYLE_NEW_BY_EXAMPLE, HID_TEMPLDLG_NEWBYEXAMPLE);
 
             aCommand = xUICommands->getByName(".uno:StyleUpdateByExample");
             sLabel = lcl_GetLabel( aCommand );
-            m_aActionTbR->InsertItem( SID_STYLE_UPDATE_BY_EXAMPLE, sLabel );
+            m_aActionTbR->InsertItem(SID_STYLE_UPDATE_BY_EXAMPLE, Image(BitmapEx(SfxResId(RID_SFXBMP_UPDATE_BY_EXAMPLE))), sLabel);
             m_aActionTbR->SetHelpId(SID_STYLE_UPDATE_BY_EXAMPLE, HID_TEMPLDLG_UPDATEBYEXAMPLE);
         }
     }
@@ -2251,11 +2249,6 @@ void SfxTemplateDialog_Impl::ReplaceUpdateButtonByMenu()
             ToolBoxItemBits::DROPDOWNONLY|m_aActionTbR->GetItemBits( SID_STYLE_NEW_BY_EXAMPLE ));
 }
 
-void SfxTemplateDialog_Impl::setNonFamilyImages()
-{
-    m_aActionTbR->SetImageList(ImageList(SfxResId(RID_STYLE_DESIGNER_IMAGELIST)));
-}
-
 void SfxTemplateDialog_Impl::ClearFamilyList()
 {
     m_aActionTbL->Clear();
diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src
index 0381acf..ee0e92d 100644
--- a/sfx2/source/dialog/templdlg.src
+++ b/sfx2/source/dialog/templdlg.src
@@ -21,16 +21,19 @@
 #include "dialog.hrc"
 #include "helpid.hrc"
 
-ImageList RID_STYLE_DESIGNER_IMAGELIST
+Bitmap RID_SFXBMP_WATERCAN
 {
-    Prefix = "sc";
-    IdList =
-    {
-        SID_STYLE_WATERCAN ;
-        SID_STYLE_NEW_BY_EXAMPLE ;
-        SID_STYLE_UPDATE_BY_EXAMPLE ;
-    };
-    IdCount = { 3 ; };
+    File = "sc05554.png";
+};
+
+Bitmap RID_SFXBMP_NEW_BY_EXAMPLE
+{
+    File = "sc05555.png";
+};
+
+Bitmap RID_SFXBMP_UPDATE_BY_EXAMPLE
+{
+    File = "sc05556.png";
 };
 
 // Strings ---------------------------------------------------------------
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 738f8b2..ab9cb30 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -367,8 +367,6 @@ protected:
     void Resize();
     Size GetMinOutputSizePixel();
 
-    void setNonFamilyImages();
-
 public:
     friend class SfxTemplateDialog;
 
commit a15bdfa3a5e990a340c9fbfafa92845eb2fe9e47
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 21 17:03:35 2016 +0000

    unwind RID_SVXIMGLIST_XFORMS_TBX ImageList
    
    Change-Id: Ib2e41e65dbc5079db12bf7ad63f857c8473cf0f3

diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index cd7984d1..437db03 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -189,6 +189,12 @@
 #define RID_SVXBMP_FRAME11                  (RID_SVX_START +  85)
 #define RID_SVXBMP_FRAME12                  (RID_SVX_START +  86)
 
+#define RID_SVXBMP_ADD                      (RID_SVX_START +  87)
+#define RID_SVXBMP_ADD_ELEMENT              (RID_SVX_START +  88)
+#define RID_SVXBMP_ADD_ATTRIBUTE            (RID_SVX_START +  89)
+#define RID_SVXBMP_EDIT                     (RID_SVX_START +  90)
+#define RID_SVXBMP_REMOVE                   (RID_SVX_START +  91)
+
 // Menu for the ruler
 #define RID_SVXMN_RULER                     (RID_SVX_START +  92)
 
diff --git a/include/svx/fmresids.hrc b/include/svx/fmresids.hrc
index abdb362..0e181ac 100644
--- a/include/svx/fmresids.hrc
+++ b/include/svx/fmresids.hrc
@@ -26,7 +26,6 @@
 
 // ImageList-Id's -----------------------------------------------------------
 #define RID_SVXIMGLIST_FMEXPL                       (RID_FORMS_START + 0)
-#define RID_SVXIMGLIST_XFORMS_TBX                   (RID_FORMS_START + 1)
 
 // Image-Id's -----------------------------------------------------------
 #define RID_SVXIMG_FORM                             SID_FM_CONFIG
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 1653273..56b114c 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -308,7 +308,6 @@ namespace svxform
         m_pNaviWin      ( _pNaviWin ),
         m_bHasModel     ( false ),
         m_eGroup        ( _eGroup ),
-        m_TbxImageList  ( SVX_RES( RID_SVXIMGLIST_XFORMS_TBX ) ),
         m_bLinkOnce     ( false )
 
     {
@@ -329,13 +328,12 @@ namespace svxform
 
         m_pItemList->SetToolBoxItemIds(m_nAddId, m_nAddElementId, m_nAddAttributeId, m_nEditId, m_nRemoveId);
 
-        const ImageList& rImageList = m_TbxImageList;
         m_pToolBox->InsertSeparator(4,5);
-        m_pToolBox->SetItemImage( m_nAddId, rImageList.GetImage( IID_ITEM_ADD ) );
-        m_pToolBox->SetItemImage( m_nAddElementId, rImageList.GetImage( IID_ITEM_ADD_ELEMENT ) );
-        m_pToolBox->SetItemImage( m_nAddAttributeId, rImageList.GetImage( IID_ITEM_ADD_ATTRIBUTE ) );
-        m_pToolBox->SetItemImage( m_nEditId, rImageList.GetImage( IID_ITEM_EDIT ) );
-        m_pToolBox->SetItemImage( m_nRemoveId, rImageList.GetImage( IID_ITEM_REMOVE ) );
+        m_pToolBox->SetItemImage(m_nAddId, Image(BitmapEx(SVX_RES(RID_SVXBMP_ADD))));
+        m_pToolBox->SetItemImage(m_nAddElementId, Image(BitmapEx(SVX_RES(RID_SVXBMP_ADD_ELEMENT))));
+        m_pToolBox->SetItemImage(m_nAddAttributeId, Image(BitmapEx(SVX_RES(RID_SVXBMP_ADD_ATTRIBUTE))));
+        m_pToolBox->SetItemImage(m_nEditId, Image(BitmapEx(SVX_RES(RID_SVXBMP_EDIT))));
+        m_pToolBox->SetItemImage(m_nRemoveId, Image(BitmapEx(SVX_RES(RID_SVXBMP_REMOVE))));
 
         if ( DGTInstance == m_eGroup )
             m_pToolBox->RemoveItem( m_pToolBox->GetItemPos( m_nAddId ) );
diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src
index 56575ff..1636d1a 100644
--- a/svx/source/form/datanavi.src
+++ b/svx/source/form/datanavi.src
@@ -22,23 +22,30 @@
 #include "svx/fmresids.hrc"
 #include "fmhelp.hrc"
 
-#define IMG_LST                 \
-IdList =                        \
-{                               \
-    IID_ITEM_ADD ;              \
-    IID_ITEM_ADD_ELEMENT ;      \
-    IID_ITEM_ADD_ATTRIBUTE ;    \
-    IID_ITEM_EDIT ;             \
-    IID_ITEM_REMOVE ;           \
-};                              \
-IdCount = { 5 ; } ;
-
-ImageList RID_SVXIMGLIST_XFORMS_TBX
-{
-    Prefix = "tb";
-    IMG_LST
-};
-#undef IMG_LST
+Bitmap RID_SVXBMP_ADD
+{
+    File = "tb01.png";
+};
+
+Bitmap RID_SVXBMP_ADD_ELEMENT
+{
+    File = "tb02.png";
+};
+
+Bitmap RID_SVXBMP_ADD_ATTRIBUTE
+{
+    File = "tb03.png";
+};
+
+Bitmap RID_SVXBMP_EDIT
+{
+    File = "tb04.png";
+};
+
+Bitmap RID_SVXBMP_REMOVE
+{
+    File = "tb05.png";
+};
 
 Bitmap RID_SVXBMP_GROUP_CLOSED
 {
diff --git a/svx/source/inc/datanavi.hrc b/svx/source/inc/datanavi.hrc
index 6fe3513..f51cec3 100644
--- a/svx/source/inc/datanavi.hrc
+++ b/svx/source/inc/datanavi.hrc
@@ -32,13 +32,6 @@
 #define TBI_ITEM_EDIT           13
 #define TBI_ITEM_REMOVE         14
 
-// ImageIndexes
-#define IID_ITEM_ADD            1
-#define IID_ITEM_ADD_ELEMENT    2
-#define IID_ITEM_ADD_ATTRIBUTE  3
-#define IID_ITEM_EDIT           4
-#define IID_ITEM_REMOVE         5
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 4ff5938..c573ff1 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -250,7 +250,6 @@ namespace svxform
         VclPtr<DataNavigatorWindow> m_pNaviWin;
         bool                        m_bHasModel;
         DataGroupType               m_eGroup;
-        ImageList                   m_TbxImageList;
         // these strings are not valid on the Submission and Binding Page
         // mb: furthermore these are properties of an instance, thus
         // it would be much better to get/set them through the UIHelper
commit 1b9fd9a47be7baeee6dc4b18c83f8dc57bb0ac34
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 21 16:44:49 2016 +0000

    some more fallthrough warning quietening
    
    Change-Id: I61785adbba22a54484b7ffcd6494c75b61b00fc7

diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y
index 518f1c5..9cb7d06 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -1916,6 +1916,7 @@ typedefDefn:
                   break;
               case unoidl::detail::SourceProviderEntity::KIND_MODULE:
                   assert(false && "this cannot happen");
+                  SAL_FALLTHROUGH;
               default:
                   assert(t.entity->entity.is() || t.entity->pad.is());
                   unpub
@@ -1935,6 +1936,7 @@ typedefDefn:
           break;
       case unoidl::detail::SourceProviderType::TYPE_PARAMETER:
           assert(false && "this cannot happen");
+          SAL_FALLTHROUGH;
       default:
           break;
       }


More information about the Libreoffice-commits mailing list