Kaydet (Commit) 748ed65f authored tarafından Caolán McNamara's avatar Caolán McNamara

drop TabControl resource loader

Change-Id: Idb909c205dfadaadeb8b98ce08fe2f4286cfce26
üst 1ea4f163
...@@ -23,7 +23,6 @@ $(eval $(call gb_AllLangResTarget_set_reslocation,fwe,framework)) ...@@ -23,7 +23,6 @@ $(eval $(call gb_AllLangResTarget_set_reslocation,fwe,framework))
$(eval $(call gb_AllLangResTarget_add_srs,fwe,\ $(eval $(call gb_AllLangResTarget_add_srs,fwe,\
fwe/fwk_classes \ fwe/fwk_classes \
fwe/fwk_services \
)) ))
......
...@@ -44,9 +44,9 @@ namespace framework ...@@ -44,9 +44,9 @@ namespace framework
class FwkTabControl : public TabControl class FwkTabControl : public TabControl
{ {
public: public:
FwkTabControl( Window* pParent, const ResId& rResId ); FwkTabControl(Window* pParent);
void BroadcastEvent( sal_uLong nEvent ); void BroadcastEvent( sal_uLong nEvent );
}; };
class FwkTabPage : public TabPage class FwkTabPage : public TabPage
......
/* -*- 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: */
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
// autogen include statement, do not remove // autogen include statement, do not remove
#include <classes/fwktabwindow.hxx> #include <classes/fwktabwindow.hxx>
#include "framework.hrc"
#include <classes/fwkresid.hxx> #include <classes/fwkresid.hxx>
#include <com/sun/star/awt/PosSize.hpp> #include <com/sun/star/awt/PosSize.hpp>
...@@ -49,9 +48,8 @@ namespace framework ...@@ -49,9 +48,8 @@ namespace framework
{ {
// class FwkTabControl --------------------------------------------------- // class FwkTabControl ---------------------------------------------------
FwkTabControl::FwkTabControl( Window* pParent, const ResId& rResId ) : FwkTabControl::FwkTabControl(Window* pParent)
: TabControl(pParent)
TabControl( pParent, rResId )
{ {
} }
...@@ -174,12 +172,9 @@ void FwkTabPage::Resize() ...@@ -174,12 +172,9 @@ void FwkTabPage::Resize()
} }
// class FwkTabWindow --------------------------------------------- // class FwkTabWindow ---------------------------------------------
FwkTabWindow::FwkTabWindow( Window* pParent )
FwkTabWindow::FwkTabWindow( Window* pParent ) : : Window(pParent)
, m_aTabCtrl(this)
Window( pParent, FwkResId( WIN_TABWINDOW ) ),
m_aTabCtrl ( this, FwkResId( TC_TABCONTROL ) )
{ {
m_xWinProvider = awt::ContainerWindowProvider::create( ::comphelper::getProcessComponentContext() ); m_xWinProvider = awt::ContainerWindowProvider::create( ::comphelper::getProcessComponentContext() );
......
/* -*- 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: */
...@@ -170,9 +170,6 @@ typedef short RSWND_STYLE; ...@@ -170,9 +170,6 @@ typedef short RSWND_STYLE;
#define RSC_TABCONTROLITEM_TEXT 0x0002 #define RSC_TABCONTROLITEM_TEXT 0x0002
#define RSC_TABCONTROLITEM_PAGERESID 0x0008 #define RSC_TABCONTROLITEM_PAGERESID 0x0008
// For "TabControl" resources:
#define RSC_TABCONTROL_ITEMLIST 0x01
// For "ImageButtons": // For "ImageButtons":
#define RSC_IMAGEBUTTON_IMAGE 0x01 #define RSC_IMAGEBUTTON_IMAGE 0x01
#define RSC_IMAGEBUTTON_SYMBOL 0x02 #define RSC_IMAGEBUTTON_SYMBOL 0x02
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
#define RSC_DOCKINGWINDOW (RSC_NOTYPE + 0x72) #define RSC_DOCKINGWINDOW (RSC_NOTYPE + 0x72)
#define RSC_TABPAGE (RSC_NOTYPE + 0x74) #define RSC_TABPAGE (RSC_NOTYPE + 0x74)
#define RSC_TABCONTROL (RSC_NOTYPE + 0x75)
#define RSC_TABCONTROLITEM (RSC_NOTYPE + 0x77) #define RSC_TABCONTROLITEM (RSC_NOTYPE + 0x77)
#define RSC_STRINGARRAY (RSC_NOTYPE + 0x79) #define RSC_STRINGARRAY (RSC_NOTYPE + 0x79)
......
...@@ -73,7 +73,6 @@ private: ...@@ -73,7 +73,6 @@ private:
protected: protected:
using Window::ImplInit; using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
virtual void FillLayoutData() const SAL_OVERRIDE; virtual void FillLayoutData() const SAL_OVERRIDE;
virtual const Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE;
...@@ -83,7 +82,6 @@ protected: ...@@ -83,7 +82,6 @@ protected:
public: public:
TabControl( Window* pParent, TabControl( Window* pParent,
WinBits nStyle = WB_STDTABCONTROL ); WinBits nStyle = WB_STDTABCONTROL );
TabControl( Window* pParent, const ResId& rResId );
virtual ~TabControl(); virtual ~TabControl();
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
......
...@@ -224,9 +224,6 @@ class RscTypCont ...@@ -224,9 +224,6 @@ class RscTypCont
RscTop * pClassImageList ); RscTop * pClassImageList );
RscTop * InitClassFloatingWindow( RscTop * pSuper, RscTop * InitClassFloatingWindow( RscTop * pSuper,
RscEnum * pMapUnit ); RscEnum * pMapUnit );
RscTop * InitClassTabControlItem( RscTop * pSuper );
RscTop * InitClassTabControl( RscTop * pSuper,
RscTop * pClassTabControlItem );
RscTop * InitClassSfxStyleFamilyItem( RscTop * pSuper, RscTop * InitClassSfxStyleFamilyItem( RscTop * pSuper,
RscTop * pClassBitmap, RscTop * pClassBitmap,
RscTop * pClassImage, RscTop * pClassImage,
......
...@@ -1622,58 +1622,6 @@ RscTop * RscTypCont::InitClassFloatingWindow( RscTop * pSuper, ...@@ -1622,58 +1622,6 @@ RscTop * RscTypCont::InitClassFloatingWindow( RscTop * pSuper,
return pClassFloatingWindow; 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 * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper,
RscTop * pClassBitmap, RscTop * pClassBitmap,
RscTop * pClassImage, RscTop * pClassImage,
......
...@@ -116,8 +116,6 @@ void RscTypCont::Init() ...@@ -116,8 +116,6 @@ void RscTypCont::Init()
RscTop * pClassToolBox; RscTop * pClassToolBox;
RscTop * pClassFloatingWindow; RscTop * pClassFloatingWindow;
RscTop * pClassTabPage; RscTop * pClassTabPage;
RscTop * pClassTabControlItem;
RscTop * pClassTabControl;
RscTop * pClassFixedLine; RscTop * pClassFixedLine;
RscTop * pClassSfxStyleFamilyItem; RscTop * pClassSfxStyleFamilyItem;
RscTop * pClassSfxTemplateDialog; RscTop * pClassSfxTemplateDialog;
...@@ -609,13 +607,6 @@ void RscTypCont::Init() ...@@ -609,13 +607,6 @@ void RscTypCont::Init()
aNmTb.Put( nId, CLASSNAME, pClassTabPage ); aNmTb.Put( nId, CLASSNAME, pClassTabPage );
pRoot->Insert( pClassTabPage ); pRoot->Insert( pClassTabPage );
pClassTabControlItem = InitClassTabControlItem( pClassMgr );
pRoot->Insert( pClassTabControlItem );
pClassTabControl = InitClassTabControl( pClassControl,
pClassTabControlItem );
pRoot->Insert( pClassTabControl );
// Klasse anlegen // Klasse anlegen
nId = pHS->getID( "FixedLine" ); nId = pHS->getID( "FixedLine" );
pClassFixedLine = pClassFixedLine =
......
...@@ -1479,7 +1479,6 @@ OString ResMgr::GetAutoHelpId() ...@@ -1479,7 +1479,6 @@ OString ResMgr::GetAutoHelpId()
// intentionally no breaks! // intentionally no breaks!
// auto help ids for controls // auto help ids for controls
switch( pRC->pResource->GetRT() ) { switch( pRC->pResource->GetRT() ) {
case RSC_TABCONTROL: aHID.append( "TabControl" ); break;
case RSC_RADIOBUTTON: aHID.append( "RadioButton" ); break; case RSC_RADIOBUTTON: aHID.append( "RadioButton" ); break;
case RSC_CHECKBOX: aHID.append( "CheckBox" ); break; case RSC_CHECKBOX: aHID.append( "CheckBox" ); break;
case RSC_TRISTATEBOX: aHID.append( "TriStateBox" ); break; case RSC_TRISTATEBOX: aHID.append( "TriStateBox" ); break;
......
...@@ -190,37 +190,6 @@ TabControl::TabControl( Window* pParent, WinBits nStyle ) : ...@@ -190,37 +190,6 @@ TabControl::TabControl( Window* pParent, WinBits nStyle ) :
OSL_TRACE("*** TABCONTROL no notabs? %s", ( GetStyle() & WB_NOBORDER ) ? "true" : "false" ); 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() TabControl::~TabControl()
{ {
if ( GetParent()->IsDialog() ) if ( GetParent()->IsDialog() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment