[Libreoffice-commits] core.git: 2 commits - bin/count-todo-dialogs framework/AllLangResTarget_fwe.mk framework/inc framework/source include/tools include/vcl rsc/inc rsc/source sfx2/source tools/source vcl/source

Caolán McNamara caolanm at redhat.com
Fri Aug 15 09:03:34 PDT 2014


 bin/count-todo-dialogs                     |   10 +++++
 framework/AllLangResTarget_fwe.mk          |    1 
 framework/inc/classes/fwktabwindow.hxx     |    4 +-
 framework/inc/framework.hrc                |   33 ------------------
 framework/source/classes/fwktabwindow.cxx  |   15 ++------
 framework/source/services/fwk_services.src |   32 -----------------
 include/tools/rc.h                         |    3 -
 include/tools/rcid.h                       |    2 -
 include/vcl/tabctrl.hxx                    |    2 -
 rsc/inc/rscdb.hxx                          |    3 -
 rsc/source/parser/rscicpx.cxx              |   52 -----------------------------
 rsc/source/parser/rscinit.cxx              |    9 -----
 sfx2/source/view/view.src                  |    1 
 tools/source/rc/resmgr.cxx                 |    1 
 vcl/source/control/tabctrl.cxx             |   31 -----------------
 15 files changed, 17 insertions(+), 182 deletions(-)

New commits:
commit ab2b2971c161f46a89f5481bf6092c4ea82be61c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 15 16:54:41 2014 +0100

    display amount of *Box elements remaining in .src format
    
    Change-Id: I33614c44cbe58ec0945406691bc38bafafc24923

diff --git a/bin/count-todo-dialogs b/bin/count-todo-dialogs
index 27f5f3c..c530e36 100755
--- a/bin/count-todo-dialogs
+++ b/bin/count-todo-dialogs
@@ -24,5 +24,13 @@ num=$(($dialogs + $tabpages))
 echo An estimated additional $num .ui are required
 
 percent=$(($converted * 100 / ($num + $converted)))
-echo We are $percent% of the way through.
+echo We are $percent% of the way through the .ui conversion.
 
+errorboxes=`git grep -h ErrorBox -- *.src|cut -d' ' -f2- |sort|uniq|wc -l`
+infoboxes=`git grep -h InfoBox -- *.src|cut -d' ' -f2- |sort|uniq|wc -l`
+queryboxes=`git grep -h QueryBox -- *.src|cut -d' ' -f2- |sort|uniq|wc -l`
+
+echo
+echo We need to reduce $errorboxes ErrorBox to basic strings as arguments to MessageDialog
+echo We need to reduce $infoboxes InfoBox to basic strings as arguments to MessageDialog
+echo We need to reduce $queryboxes QueryBox to basic strings as arguments to MessageDialog
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
index eb2de4e..7f0b599 100644
--- a/sfx2/source/view/view.src
+++ b/sfx2/source/view/view.src
@@ -78,7 +78,6 @@ InfoBox MSG_ERROR_SEND_MAIL
     Message [ en-US ] = "An error occurred in sending the message. Possible errors could be a missing user account or a defective setup.\nPlease check the %PRODUCTNAME settings or your e-mail program settings." ;
 };
 
- // QueryBoxen ------------------------------------------------------------
 QueryBox MSG_QUERY_OPENASTEMPLATE
 {
     Buttons = WB_YES_NO ;
commit 748ed65ffba9d69ed333fd1347c30dd7a3a944b8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 15 11:25:15 2014 +0100

    drop TabControl resource loader
    
    Change-Id: Idb909c205dfadaadeb8b98ce08fe2f4286cfce26

diff --git a/framework/AllLangResTarget_fwe.mk b/framework/AllLangResTarget_fwe.mk
index 8875133..a59cb9a 100644
--- a/framework/AllLangResTarget_fwe.mk
+++ b/framework/AllLangResTarget_fwe.mk
@@ -23,7 +23,6 @@ $(eval $(call gb_AllLangResTarget_set_reslocation,fwe,framework))
 
 $(eval $(call gb_AllLangResTarget_add_srs,fwe,\
     fwe/fwk_classes \
-    fwe/fwk_services \
 ))
 
 
diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx
index ea45014..323dc9d 100644
--- a/framework/inc/classes/fwktabwindow.hxx
+++ b/framework/inc/classes/fwktabwindow.hxx
@@ -44,9 +44,9 @@ namespace framework
 class FwkTabControl : public TabControl
 {
 public:
-    FwkTabControl( Window* pParent, const ResId& rResId );
+    FwkTabControl(Window* pParent);
 
-    void    BroadcastEvent( sal_uLong nEvent );
+    void BroadcastEvent( sal_uLong nEvent );
 };
 
 class FwkTabPage : public TabPage
diff --git a/framework/inc/framework.hrc b/framework/inc/framework.hrc
deleted file mode 100644
index 2b969e1..0000000
--- a/framework/inc/framework.hrc
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _FRAMEWORK_HRC
-#define _FRAMEWORK_HRC
-
-#include <svl/solar.hrc>
-
-#define RID_FWK_START                       2409
-
-// Ids of TabWindow
-#define WIN_TABWINDOW                       (RID_FWK_START+0)
-#define TC_TABCONTROL                        1
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx
index f7af3e7..64973e6 100644
--- a/framework/source/classes/fwktabwindow.cxx
+++ b/framework/source/classes/fwktabwindow.cxx
@@ -20,7 +20,6 @@
 // autogen include statement, do not remove
 
 #include <classes/fwktabwindow.hxx>
-#include "framework.hrc"
 #include <classes/fwkresid.hxx>
 
 #include <com/sun/star/awt/PosSize.hpp>
@@ -49,9 +48,8 @@ namespace framework
 {
 
 // class FwkTabControl ---------------------------------------------------
-FwkTabControl::FwkTabControl( Window* pParent, const ResId& rResId ) :
-
-    TabControl( pParent, rResId )
+FwkTabControl::FwkTabControl(Window* pParent)
+    : TabControl(pParent)
 {
 }
 
@@ -174,12 +172,9 @@ void FwkTabPage::Resize()
 }
 
 // class FwkTabWindow ---------------------------------------------
-
-FwkTabWindow::FwkTabWindow( Window* pParent ) :
-
-    Window( pParent, FwkResId( WIN_TABWINDOW ) ),
-
-    m_aTabCtrl  ( this, FwkResId( TC_TABCONTROL ) )
+FwkTabWindow::FwkTabWindow( Window* pParent )
+    : Window(pParent)
+    , m_aTabCtrl(this)
 {
     m_xWinProvider = awt::ContainerWindowProvider::create( ::comphelper::getProcessComponentContext() );
 
diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src
deleted file mode 100644
index 00f6b16..0000000
--- a/framework/source/services/fwk_services.src
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "framework.hrc"
-
-Window WIN_TABWINDOW
-{
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    TabControl TC_TABCONTROL
-    {
-        OutputSize = TRUE ;
-    };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/tools/rc.h b/include/tools/rc.h
index 20fb804..29dd4f3 100644
--- a/include/tools/rc.h
+++ b/include/tools/rc.h
@@ -170,9 +170,6 @@ typedef short RSWND_STYLE;
 #define RSC_TABCONTROLITEM_TEXT         0x0002
 #define RSC_TABCONTROLITEM_PAGERESID    0x0008
 
-// For "TabControl" resources:
-#define RSC_TABCONTROL_ITEMLIST         0x01
-
 // For "ImageButtons":
 #define RSC_IMAGEBUTTON_IMAGE           0x01
 #define RSC_IMAGEBUTTON_SYMBOL          0x02
diff --git a/include/tools/rcid.h b/include/tools/rcid.h
index 9a71f31..032b815 100644
--- a/include/tools/rcid.h
+++ b/include/tools/rcid.h
@@ -100,7 +100,7 @@
 #define RSC_DOCKINGWINDOW       (RSC_NOTYPE + 0x72)
 
 #define RSC_TABPAGE             (RSC_NOTYPE + 0x74)
-#define RSC_TABCONTROL          (RSC_NOTYPE + 0x75)
+
 #define RSC_TABCONTROLITEM      (RSC_NOTYPE + 0x77)
 
 #define RSC_STRINGARRAY         (RSC_NOTYPE + 0x79)
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index 00e3a06..6f92853 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -73,7 +73,6 @@ private:
 protected:
     using Window::ImplInit;
     SAL_DLLPRIVATE void         ImplInit( Window* pParent, WinBits nStyle );
-    SAL_DLLPRIVATE void         ImplLoadRes( const ResId& rResId );
 
     virtual void                FillLayoutData() const SAL_OVERRIDE;
     virtual const Font&         GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE;
@@ -83,7 +82,6 @@ protected:
 public:
                         TabControl( Window* pParent,
                                     WinBits nStyle = WB_STDTABCONTROL );
-                        TabControl( Window* pParent, const ResId& rResId );
                         virtual ~TabControl();
 
     virtual void        MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 1393d1c..c5f84b7 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -224,9 +224,6 @@ class RscTypCont
                                   RscTop * pClassImageList );
     RscTop *    InitClassFloatingWindow( RscTop * pSuper,
                                          RscEnum * pMapUnit );
-    RscTop *    InitClassTabControlItem( RscTop * pSuper );
-    RscTop *    InitClassTabControl(  RscTop * pSuper,
-                                     RscTop * pClassTabControlItem );
     RscTop *    InitClassSfxStyleFamilyItem( RscTop * pSuper,
                                              RscTop * pClassBitmap,
                                              RscTop * pClassImage,
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index e75ca84..e920df4 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -1622,58 +1622,6 @@ RscTop * RscTypCont::InitClassFloatingWindow( RscTop * pSuper,
     return pClassFloatingWindow;
 }
 
-RscTop * RscTypCont::InitClassTabControlItem( RscTop * pSuper )
-{
-    Atom        nId;
-    RscTop *    pClassTabControlItem;
-
-    // Klasse anlegen
-    nId = pHS->getID( "PageItem" );
-    pClassTabControlItem = new RscClass( nId, RSC_TABCONTROLITEM, pSuper );
-    aNmTb.Put( nId, CLASSNAME, pClassTabControlItem );
-
-    // Variablen anlegen
-    nId = aNmTb.Put( "Identifier", VARNAME );
-    pClassTabControlItem->SetVariable( nId, &aIdNoZeroUShort, NULL, 0,
-                                       RSC_TABCONTROLITEM_ID );
-    nId = aNmTb.Put( "Text", VARNAME );
-    pClassTabControlItem->SetVariable( nId, &aLangString, NULL, 0,
-                                       RSC_TABCONTROLITEM_TEXT );
-    nId = aNmTb.Put( "PageResID", VARNAME );
-    pClassTabControlItem->SetVariable( nId, &aIdLong, NULL, 0,
-                                       RSC_TABCONTROLITEM_PAGERESID );
-
-    return pClassTabControlItem;
-}
-
-RscTop * RscTypCont::InitClassTabControl( RscTop * pSuper,
-                                          RscTop * pClassTabControlItem )
-{
-    Atom        nId;
-    RscTop *    pClassTabControl;
-
-    // Klasse anlegen
-    nId = pHS->getID( "TabControl" );
-    pClassTabControl = new RscClass( nId, RSC_TABCONTROL, pSuper );
-    pClassTabControl->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
-    aNmTb.Put( nId, CLASSNAME, pClassTabControl );
-
-    // Variablen anlegen
-    {
-        RscCont * pCont;
-
-        aBaseLst.push_back( pCont = new RscCont( pHS->getID( "ContTabControlItem" ), RSC_NOTYPE ) );
-        pCont->SetTypeClass( pClassTabControlItem );
-        nId = aNmTb.Put( "PageList", VARNAME );
-        pClassTabControl->SetVariable( nId, pCont, NULL, 0,
-                                       RSC_TABCONTROL_ITEMLIST );
-
-        INS_WINBIT( pClassTabControl, DropDown );
-    }
-
-    return pClassTabControl;
-}
-
 RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper,
                                                   RscTop * pClassBitmap,
                                                   RscTop * pClassImage,
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index d45450d..1da37a6 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -116,8 +116,6 @@ void RscTypCont::Init()
     RscTop   *  pClassToolBox;
     RscTop   *  pClassFloatingWindow;
     RscTop   *  pClassTabPage;
-    RscTop   *  pClassTabControlItem;
-    RscTop   *  pClassTabControl;
     RscTop   *  pClassFixedLine;
     RscTop *    pClassSfxStyleFamilyItem;
     RscTop *    pClassSfxTemplateDialog;
@@ -609,13 +607,6 @@ void RscTypCont::Init()
     aNmTb.Put( nId, CLASSNAME, pClassTabPage );
     pRoot->Insert( pClassTabPage );
 
-    pClassTabControlItem = InitClassTabControlItem( pClassMgr );
-    pRoot->Insert( pClassTabControlItem );
-
-    pClassTabControl = InitClassTabControl( pClassControl,
-                                            pClassTabControlItem );
-    pRoot->Insert( pClassTabControl );
-
     // Klasse anlegen
     nId = pHS->getID( "FixedLine" );
     pClassFixedLine =
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index be86db1..59bd7dc 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -1479,7 +1479,6 @@ OString ResMgr::GetAutoHelpId()
                 // intentionally no breaks!
                 // auto help ids for controls
                 switch( pRC->pResource->GetRT() ) {
-                    case RSC_TABCONTROL:        aHID.append( "TabControl" );       break;
                     case RSC_RADIOBUTTON:       aHID.append( "RadioButton" );      break;
                     case RSC_CHECKBOX:          aHID.append( "CheckBox" );         break;
                     case RSC_TRISTATEBOX:       aHID.append( "TriStateBox" );      break;
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index cb21606..09af363 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -190,37 +190,6 @@ TabControl::TabControl( Window* pParent, WinBits nStyle ) :
     OSL_TRACE("*** TABCONTROL no notabs? %s", ( GetStyle() & WB_NOBORDER ) ? "true" : "false" );
 }
 
-TabControl::TabControl( Window* pParent, const ResId& rResId ) :
-    Control( WINDOW_TABCONTROL )
-{
-    rResId.SetRT( RSC_TABCONTROL );
-    WinBits nStyle = ImplInitRes( rResId );
-    ImplInit( pParent, nStyle );
-    ImplLoadRes( rResId );
-
-    if ( !(nStyle & WB_HIDE) )
-        Show();
-}
-
-void TabControl::ImplLoadRes( const ResId& rResId )
-{
-    Control::ImplLoadRes( rResId );
-
-    sal_uLong nObjMask = ReadLongRes();
-
-    if ( nObjMask & RSC_TABCONTROL_ITEMLIST )
-    {
-        sal_uLong nEle = ReadLongRes();
-
-        // add item
-        for( sal_uLong i = 0; i < nEle; i++ )
-        {
-            InsertPage( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
-            IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
-        }
-    }
-}
-
 TabControl::~TabControl()
 {
     if ( GetParent()->IsDialog() )


More information about the Libreoffice-commits mailing list