Kaydet (Commit) 0a8bf4b5 authored tarafından Caolán McNamara's avatar Caolán McNamara

FloatingWindows are no longer loaded from resource files

Change-Id: I2705bbb4db52779e0065400f09604384fd9cf151
üst 5ae49477
...@@ -20,7 +20,7 @@ infoboxes=0 ...@@ -20,7 +20,7 @@ infoboxes=0
queryboxes=0 queryboxes=0
warningboxes=0 warningboxes=0
msgboxes=0 msgboxes=0
floatingwindows=`git grep -h FloatingWindow -- *.src|grep -v HelpID|cut -d' ' -f2- |sort|uniq|wc -l` floatingwindows=0
dockingwindows=`git grep -h DockingWindow -- *.src|grep -v HelpID|grep -v hrc|cut -d' ' -f2- |sort|uniq|wc -l` dockingwindows=`git grep -h DockingWindow -- *.src|grep -v HelpID|grep -v hrc|cut -d' ' -f2- |sort|uniq|wc -l`
echo There are $dialogs unconverted dialogs echo There are $dialogs unconverted dialogs
...@@ -33,7 +33,7 @@ echo There are $msgboxes unconverted msgboxes ...@@ -33,7 +33,7 @@ echo There are $msgboxes unconverted msgboxes
echo There are $floatingwindows unconverted floatingwindows echo There are $floatingwindows unconverted floatingwindows
echo There are $dockingwindows unconverted dockingwindows echo There are $dockingwindows unconverted dockingwindows
num=$(($floatingwindows + dockingwindows)) num=$dockingwindows
echo An estimated additional $num .ui are required echo An estimated additional $num .ui are required
percent=$(($converted * 100 / ($num + $converted))) percent=$(($converted * 100 / ($num + $converted)))
......
...@@ -134,10 +134,6 @@ protected: ...@@ -134,10 +134,6 @@ protected:
SfxChildWindow *pCW, SfxChildWindow *pCW,
Window* pParent, Window* pParent,
WinBits nWinBits=WB_STDMODELESS); WinBits nWinBits=WB_STDMODELESS);
SfxFloatingWindow( SfxBindings *pBindings,
SfxChildWindow *pCW,
Window* pParent,
const ResId& rResId);
SfxFloatingWindow( SfxBindings *pBindings, SfxFloatingWindow( SfxBindings *pBindings,
SfxChildWindow *pCW, SfxChildWindow *pCW,
Window* pParent, Window* pParent,
......
...@@ -150,10 +150,6 @@ public: ...@@ -150,10 +150,6 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
Window* pParentWindow, Window* pParentWindow,
WinBits nBits ); WinBits nBits );
SfxPopupWindow( sal_uInt16 nId,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
Window* pParentWindow,
const ResId &rId );
virtual ~SfxPopupWindow(); virtual ~SfxPopupWindow();
virtual SfxPopupWindow* Clone() const; virtual SfxPopupWindow* Clone() const;
......
...@@ -150,12 +150,6 @@ typedef short RSWND_STYLE; ...@@ -150,12 +150,6 @@ typedef short RSWND_STYLE;
#define RSC_TOOLBOX_ITEMIMAGELIST 0x40 #define RSC_TOOLBOX_ITEMIMAGELIST 0x40
#define RSC_TOOLBOX_ITEMLIST 0x80 #define RSC_TOOLBOX_ITEMLIST 0x80
// For "FloatingWindow" resources:
#define RSC_FLOATINGWINDOW_WHMAPMODE 0x01
#define RSC_FLOATINGWINDOW_WIDTH 0x02
#define RSC_FLOATINGWINDOW_HEIGHT 0x04
#define RSC_FLOATINGWINDOW_ZOOMIN 0x08
// For "DockingWindow" resources: // For "DockingWindow" resources:
#define RSC_DOCKINGWINDOW_XYMAPMODE 0x01 #define RSC_DOCKINGWINDOW_XYMAPMODE 0x01
#define RSC_DOCKINGWINDOW_X 0x02 #define RSC_DOCKINGWINDOW_X 0x02
......
...@@ -51,8 +51,6 @@ ...@@ -51,8 +51,6 @@
#define RSC_SYSWINDOW (RSC_NOTYPE + 0x36) #define RSC_SYSWINDOW (RSC_NOTYPE + 0x36)
#define RSC_WORKWIN (RSC_NOTYPE + 0x37) #define RSC_WORKWIN (RSC_NOTYPE + 0x37)
#define RSC_FLOATINGWINDOW (RSC_NOTYPE + 0x39)
#define RSC_CONTROL (RSC_NOTYPE + 0x44) #define RSC_CONTROL (RSC_NOTYPE + 0x44)
#define RSC_BUTTON (RSC_NOTYPE + 0x45) #define RSC_BUTTON (RSC_NOTYPE + 0x45)
#define RSC_PUSHBUTTON (RSC_NOTYPE + 0x46) #define RSC_PUSHBUTTON (RSC_NOTYPE + 0x46)
......
...@@ -103,7 +103,6 @@ protected: ...@@ -103,7 +103,6 @@ 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 ImplInitSettings(); SAL_DLLPRIVATE void ImplInitSettings();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public: public:
SAL_DLLPRIVATE FloatingWindow* ImplFloatHitTest( Window* pReference, const Point& rPos, HitTest& rHitTest ); SAL_DLLPRIVATE FloatingWindow* ImplFloatHitTest( Window* pReference, const Point& rPos, HitTest& rHitTest );
...@@ -123,7 +122,6 @@ public: ...@@ -123,7 +122,6 @@ public:
explicit FloatingWindow(Window* pParent, WinBits nStyle = WB_STDFLOATWIN); explicit FloatingWindow(Window* pParent, WinBits nStyle = WB_STDFLOATWIN);
explicit FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, explicit FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>()); const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>());
explicit FloatingWindow( Window* pParent, const ResId& );
virtual ~FloatingWindow(); virtual ~FloatingWindow();
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
......
...@@ -213,8 +213,6 @@ class RscTypCont ...@@ -213,8 +213,6 @@ class RscTypCont
RscEnum * pTriState ); RscEnum * pTriState );
RscTop * InitClassToolBox( RscTop * pSuper, RscTop * pClassToolBoxItem, RscTop * InitClassToolBox( RscTop * pSuper, RscTop * pClassToolBoxItem,
RscTop * pClassImageList ); RscTop * pClassImageList );
RscTop * InitClassFloatingWindow( RscTop * pSuper,
RscEnum * pMapUnit );
RscTop * InitClassSfxStyleFamilyItem( RscTop * pSuper, RscTop * InitClassSfxStyleFamilyItem( RscTop * pSuper,
RscTop * pClassBitmap, RscTop * pClassBitmap,
RscTop * pClassImage, RscTop * pClassImage,
......
...@@ -1480,40 +1480,6 @@ RscTop * RscTypCont::InitClassToolBox( RscTop * pSuper, ...@@ -1480,40 +1480,6 @@ RscTop * RscTypCont::InitClassToolBox( RscTop * pSuper,
return pClassToolBox; return pClassToolBox;
} }
RscTop * RscTypCont::InitClassFloatingWindow( RscTop * pSuper,
RscEnum * pMapUnit )
{
Atom nId;
RscTop * pClassFloatingWindow;
// Klasse anlegen
nId = pHS->getID( "FloatingWindow" );
pClassFloatingWindow = new RscClass( nId, RSC_FLOATINGWINDOW, pSuper );
pClassFloatingWindow->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
aNmTb.Put( nId, CLASSNAME, pClassFloatingWindow );
// Variablen anlegen
nId = aNmTb.Put( "_ZoomInMapMode", VARNAME );
pClassFloatingWindow->SetVariable( nId, pMapUnit, NULL, 0,
RSC_FLOATINGWINDOW_WHMAPMODE );
nId = aNmTb.Put( "_ZoomInWidth", VARNAME );
pClassFloatingWindow->SetVariable( nId, &aShort, NULL, 0,
RSC_FLOATINGWINDOW_WIDTH );
nId = aNmTb.Put( "_ZoomInHeight", VARNAME );
pClassFloatingWindow->SetVariable( nId, &aShort, NULL, 0,
RSC_FLOATINGWINDOW_HEIGHT );
nId = aNmTb.Put( "ZoomIn", VARNAME );
pClassFloatingWindow->SetVariable( nId, &aBool, NULL, 0,
RSC_FLOATINGWINDOW_ZOOMIN );
INS_WINBIT(pClassFloatingWindow,Zoomable)
INS_WINBIT(pClassFloatingWindow,HideWhenDeactivate)
INS_WINBIT(pClassFloatingWindow,EnableResizing)
INS_WINBIT(pClassFloatingWindow,StdPopup)
return pClassFloatingWindow;
}
RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper, RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper,
RscTop * pClassBitmap, RscTop * pClassBitmap,
RscTop * pClassImage, RscTop * pClassImage,
......
...@@ -100,7 +100,6 @@ void RscTypCont::Init() ...@@ -100,7 +100,6 @@ void RscTypCont::Init()
RscTop * pClassDockingWindow; RscTop * pClassDockingWindow;
RscTop * pClassToolBoxItem; RscTop * pClassToolBoxItem;
RscTop * pClassToolBox; RscTop * pClassToolBox;
RscTop * pClassFloatingWindow;
RscTop * pClassFixedLine; RscTop * pClassFixedLine;
RscTop * pClassSfxStyleFamilyItem; RscTop * pClassSfxStyleFamilyItem;
RscTop * pClassSfxTemplateDialog; RscTop * pClassSfxTemplateDialog;
...@@ -511,10 +510,6 @@ void RscTypCont::Init() ...@@ -511,10 +510,6 @@ void RscTypCont::Init()
pClassImageList ); pClassImageList );
pRoot->Insert( pClassToolBox ); pRoot->Insert( pClassToolBox );
pClassFloatingWindow = InitClassFloatingWindow( pClassSystemWindow,
pMapUnit );
pRoot->Insert( pClassFloatingWindow );
// Klasse anlegen // Klasse anlegen
nId = pHS->getID( "FixedLine" ); nId = pHS->getID( "FixedLine" );
pClassFixedLine = pClassFixedLine =
......
...@@ -460,26 +460,6 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, ...@@ -460,26 +460,6 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl)); pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
} }
SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
SfxChildWindow *pCW,
Window* pParent,
const ResId& rResId) :
FloatingWindow(pParent, rResId),
pBindings(pBindinx),
pImp( new SfxFloatingWindow_Impl )
{
pImp->pMgr = pCW;
pImp->bConstructed = false;
SetUniqueId( GetHelpId() );
SetHelpId("");
if ( pBindinx )
pImp->StartListening( *pBindinx );
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
}
SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
SfxChildWindow *pCW, SfxChildWindow *pCW,
Window* pParent, Window* pParent,
......
...@@ -1172,23 +1172,6 @@ SfxPopupWindow::SfxPopupWindow( ...@@ -1172,23 +1172,6 @@ SfxPopupWindow::SfxPopupWindow(
((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this ); ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this );
} }
SfxPopupWindow::SfxPopupWindow(
sal_uInt16 nId,
const Reference< XFrame >& rFrame,
Window* pParentWindow,
const ResId &rId ) :
FloatingWindow( pParentWindow, rId )
, m_bFloating( false )
, m_bCascading( false )
, m_nId( nId )
, m_xFrame( rFrame )
, m_pStatusListener( 0 )
{
Window* pWindow = GetTopMostParentSystemWindow( this );
if ( pWindow )
((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this );
}
SfxPopupWindow::SfxPopupWindow( SfxPopupWindow::SfxPopupWindow(
sal_uInt16 nId, sal_uInt16 nId,
Window* pParentWindow, Window* pParentWindow,
......
...@@ -134,7 +134,6 @@ ...@@ -134,7 +134,6 @@
#define HID_SMA_ATTRIBUTES_TBX "STARMATH_HID_SMA_ATTRIBUTES_TBX" #define HID_SMA_ATTRIBUTES_TBX "STARMATH_HID_SMA_ATTRIBUTES_TBX"
#define HID_SMA_BRACKETS_TBX "STARMATH_HID_SMA_BRACKETS_TBX" #define HID_SMA_BRACKETS_TBX "STARMATH_HID_SMA_BRACKETS_TBX"
#define HID_SMA_FORMAT_TBX "STARMATH_HID_SMA_FORMAT_TBX" #define HID_SMA_FORMAT_TBX "STARMATH_HID_SMA_FORMAT_TBX"
#define HID_SMA_SELECTION_TBX "STARMATH_HID_SMA_SELECTION_TBX"
#define HID_SMA_COMMAND_WIN "STARMATH_HID_SMA_COMMAND_WIN" #define HID_SMA_COMMAND_WIN "STARMATH_HID_SMA_COMMAND_WIN"
#define HID_SMA_MISC_MENU "STARMATH_HID_SMA_MISC_MENU" #define HID_SMA_MISC_MENU "STARMATH_HID_SMA_MISC_MENU"
#define HID_SMA_FUNCTIONSOTHER1_MENU "STARMATH_HID_SMA_FUNCTIONSOTHER1_MENU" #define HID_SMA_FUNCTIONSOTHER1_MENU "STARMATH_HID_SMA_FUNCTIONSOTHER1_MENU"
......
...@@ -1460,7 +1460,6 @@ OString ResMgr::GetAutoHelpId() ...@@ -1460,7 +1460,6 @@ OString ResMgr::GetAutoHelpId()
switch( pRC->pResource->GetRT() ) { switch( pRC->pResource->GetRT() ) {
case RSC_DOCKINGWINDOW: aHID.append( "DockingWindow" ); break; case RSC_DOCKINGWINDOW: aHID.append( "DockingWindow" ); break;
case RSC_WORKWIN: aHID.append( "WorkWindow" ); break; case RSC_WORKWIN: aHID.append( "WorkWindow" ); break;
case RSC_FLOATINGWINDOW: aHID.append( "FloatingWindow" ); break;
default: return OString(); default: return OString();
} }
} }
...@@ -1471,7 +1470,6 @@ OString ResMgr::GetAutoHelpId() ...@@ -1471,7 +1470,6 @@ OString ResMgr::GetAutoHelpId()
switch( pRC1->pResource->GetRT() ) { switch( pRC1->pResource->GetRT() ) {
case RSC_DOCKINGWINDOW: case RSC_DOCKINGWINDOW:
case RSC_WORKWIN: case RSC_WORKWIN:
case RSC_FLOATINGWINDOW:
// intentionally no breaks! // intentionally no breaks!
// auto help ids for controls // auto help ids for controls
switch( pRC->pResource->GetRT() ) { switch( pRC->pResource->GetRT() ) {
......
...@@ -152,18 +152,6 @@ FloatingWindow::FloatingWindow( Window* pParent, WinBits nStyle ) : ...@@ -152,18 +152,6 @@ FloatingWindow::FloatingWindow( Window* pParent, WinBits nStyle ) :
ImplInit( pParent, nStyle ); ImplInit( pParent, nStyle );
} }
FloatingWindow::FloatingWindow( Window* pParent, const ResId& rResId ) :
SystemWindow( WINDOW_FLOATINGWINDOW )
{
rResId.SetRT( RSC_FLOATINGWINDOW );
WinBits nStyle = ImplInitRes( rResId );
ImplInit( pParent, nStyle );
ImplLoadRes( rResId );
if ( !(nStyle & WB_HIDE) )
Show();
}
FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
: SystemWindow(WINDOW_FLOATINGWINDOW) : SystemWindow(WINDOW_FLOATINGWINDOW)
{ {
...@@ -179,36 +167,6 @@ void FloatingWindow::doDeferredInit(WinBits nBits) ...@@ -179,36 +167,6 @@ void FloatingWindow::doDeferredInit(WinBits nBits)
mbIsDefferedInit = false; mbIsDefferedInit = false;
} }
void FloatingWindow::ImplLoadRes( const ResId& rResId )
{
SystemWindow::ImplLoadRes( rResId );
sal_uLong nObjMask = ReadLongRes();
if ( (RSC_FLOATINGWINDOW_WHMAPMODE | RSC_FLOATINGWINDOW_WIDTH |
RSC_FLOATINGWINDOW_HEIGHT) & nObjMask )
{
// use Sizes from the Resource
Size aSize;
MapUnit eSizeMap = MAP_PIXEL;
if ( RSC_FLOATINGWINDOW_WHMAPMODE & nObjMask )
eSizeMap = (MapUnit) ReadShortRes();
if ( RSC_FLOATINGWINDOW_WIDTH & nObjMask )
aSize.Width() = ReadShortRes();
if ( RSC_FLOATINGWINDOW_HEIGHT & nObjMask )
aSize.Height() = ReadShortRes();
SetRollUpOutputSizePixel( LogicToPixel( aSize, eSizeMap ) );
}
if (nObjMask & RSC_FLOATINGWINDOW_ZOOMIN )
{
if ( ReadShortRes() )
RollUp();
}
}
FloatingWindow::~FloatingWindow() FloatingWindow::~FloatingWindow()
{ {
if( mbPopupModeCanceled ) if( mbPopupModeCanceled )
......
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