Kaydet (Commit) 149c7ac2 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert floating RID_SVXDLG_CONTOUR to .ui

Change-Id: I5c441f6d4fccb771a0b2a4a1315497335ba8f81f
üst 8b4c5348
......@@ -73,8 +73,8 @@ protected:
public:
SvxContourDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
Window* pParent, const ResId& rResId );
SvxContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
Window* pParent);
virtual ~SvxContourDlg();
const Graphic& GetGraphic() const;
......
......@@ -80,9 +80,8 @@ protected:
public:
GraphCtrl( Window* pParent, const ResId& rResId );
GraphCtrl( Window* pParent, WinBits nStyle );
virtual ~GraphCtrl();
GraphCtrl( Window* pParent, WinBits nStyle );
virtual ~GraphCtrl();
void SetWinStyle( WinBits nWinBits );
WinBits GetWinStyle() const { return nWinStyle; }
......
......@@ -90,7 +90,6 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
FixedText *m_pFtTarget;
ComboBox *m_pCbbTarget;
StatusBar *m_pStbStatus;
ImageList maImageList;
sal_uInt16 mnApplyId;
sal_uInt16 mnOpenId;
......@@ -110,24 +109,6 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
sal_uInt16 mnMacroId;
sal_uInt16 mnPropertyId;
Image maApplyImg;
Image maOpenImg;
Image maSaveAsImg;
Image maSelectImg;
Image maRectImg;
Image maCircleImg;
Image maPolyImg;
Image maFreePolyImg;
Image maPolyEditImg;
Image maPolyMoveImg;
Image maPolyInsertImg;
Image maPolyDeleteImg;
Image maUndoImg;
Image maRedoImg;
Image maActiveImg;
Image maMacroImg;
Image maPropertyImg;
Size aLastSize;
IMapWindow* pIMapWnd;
IMapOwnData* pOwnData;
......@@ -172,9 +153,6 @@ public:
const TargetList* pTargetList = NULL, void* pEditingObj = NULL );
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
void ApplyImageList();
};
......
......@@ -39,7 +39,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
svx/source/accessibility/accessibility.src \
svx/source/core/graphichelper.src \
svx/source/dialog/bmpmask.src \
svx/source/dialog/contdlg.src \
svx/source/dialog/compressgraphicdialog.src \
svx/source/dialog/dlgctrl.src \
svx/source/dialog/docrecovery.src \
......
......@@ -30,6 +30,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/docrecoverysavedialog \
svx/uiconfig/ui/extrustiondepthdialog \
svx/uiconfig/ui/findreplacedialog \
svx/uiconfig/ui/floatingcontour \
svx/uiconfig/ui/floatingundoredo \
svx/uiconfig/ui/fontworkgallerydialog \
svx/uiconfig/ui/fontworkspacingdialog \
......
......@@ -27,22 +27,6 @@
#define HID_BMPMASK_CTL_QCOL_1 "SVX_HID_BMPMASK_CTL_QCOL_1"
#define HID_BMPMASK_TBI_PIPETTE "SVX_HID_BMPMASK_TBI_PIPETTE"
#define HID_COLOR_CTL_COLORS "SVX_HID_COLOR_CTL_COLORS"
#define HID_CONTDLG_APPLY "SVX_HID_CONTDLG_APPLY"
#define HID_CONTDLG_AUTOCONTOUR "SVX_HID_CONTDLG_AUTOCONTOUR"
#define HID_CONTDLG_CIRCLE "SVX_HID_CONTDLG_CIRCLE"
#define HID_CONTDLG_GRAPHWND "SVX_HID_CONTDLG_GRAPHWND"
#define HID_CONTDLG_PIPETTE "SVX_HID_CONTDLG_PIPETTE"
#define HID_CONTDLG_POLY "SVX_HID_CONTDLG_POLY"
#define HID_CONTDLG_POLYDELETE "SVX_HID_CONTDLG_POLYDELETE"
#define HID_CONTDLG_POLYEDIT "SVX_HID_CONTDLG_POLYEDIT"
#define HID_CONTDLG_POLYINSERT "SVX_HID_CONTDLG_POLYINSERT"
#define HID_CONTDLG_POLYMOVE "SVX_HID_CONTDLG_POLYMOVE"
#define HID_CONTDLG_RECT "SVX_HID_CONTDLG_RECT"
#define HID_CONTDLG_REDO "SVX_HID_CONTDLG_REDO"
#define HID_CONTDLG_SELECT "SVX_HID_CONTDLG_SELECT"
#define HID_CONTDLG_TOOLBOX "SVX_HID_CONTDLG_TOOLBOX"
#define HID_CONTDLG_UNDO "SVX_HID_CONTDLG_UNDO"
#define HID_CONTDLG_WORKPLACE "SVX_HID_CONTDLG_WORKPLACE"
#define HID_CTRL3D_HSCROLL "SVX_HID_CTRL3D_HSCROLL"
#define HID_CTRL3D_SWITCHER "SVX_HID_CTRL3D_SWITCHER"
#define HID_CTRL3D_VSCROLL "SVX_HID_CTRL3D_VSCROLL"
......
This diff is collapsed.
/* -*- 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 <svx/dialogs.hrc>
// ImapDlg dialog
#define RID_SVX_CONTOURDLG_START RID_SVX_CONTOUR_START
/******************************************************************************/
#define RID_SVXDLG_CONTOUR (RID_SVX_CONTOURDLG_START)
#define TBX1 1
#define TBI_APPLY 1
#define TBI_WORKPLACE 2
#define TBI_SELECT 5
#define TBI_RECT 6
#define TBI_CIRCLE 7
#define TBI_POLY 8
#define TBI_FREEPOLY 9
#define TBI_POLYEDIT 15
#define TBI_POLYMOVE 16
#define TBI_POLYINSERT 17
#define TBI_POLYDELETE 18
#define TBI_UNDO 20
#define TBI_REDO 21
#define TBI_AUTOCONTOUR 25
#define TBI_PIPETTE 26
#define MTF_TOLERANCE 1
#define CTL_CONTOUR 1
#define STB_STATUS 1
#define CD_IMAPDLG 1300
/******************************************************************************/
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 "helpid.hrc"
#include "contdlg.hrc"
#define MASKCOLOR MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; } ;
// RID_SVXDLG_CONTOUR ----------------------------------------------------
FloatingWindow RID_SVXDLG_CONTOUR
{
HelpID = "svx:FloatingWindow:RID_SVXDLG_CONTOUR";
OutputSize = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( 270 , 213 ) ;
Text [ en-US ] = "Contour Editor" ;
Sizeable = TRUE ;
Moveable = TRUE ;
Closeable = TRUE ;
Zoomable = TRUE ;
ToolBox TBX1
{
SVLook = TRUE ;
Pos = MAP_APPFONT ( 6 , 6 ) ;
HelpId = HID_CONTDLG_TOOLBOX ;
ItemList =
{
ToolBoxItem
{
Identifier = TBI_APPLY ;
HelpId = HID_CONTDLG_APPLY ;
Text [ en-US ] = "Apply" ;
};
ToolBoxItem
{
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
{
Identifier = TBI_WORKPLACE ;
HelpId = HID_CONTDLG_WORKPLACE ;
Text [ en-US ] = "Workspace" ;
AutoCheck = TRUE ;
};
ToolBoxItem
{
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
{
Identifier = TBI_SELECT ;
HelpId = HID_CONTDLG_SELECT ;
RadioCheck = TRUE ;
AutoCheck = TRUE ;
Text [ en-US ] = "Select" ;
};
ToolBoxItem
{
Identifier = TBI_RECT ;
HelpId = HID_CONTDLG_RECT ;
RadioCheck = TRUE ;
AutoCheck = TRUE ;
Text [ en-US ] = "Rectangle" ;
};
ToolBoxItem
{
Identifier = TBI_CIRCLE ;
HelpId = HID_CONTDLG_CIRCLE ;
RadioCheck = TRUE ;
AutoCheck = TRUE ;
Text [ en-US ] = "Ellipse" ;
};
ToolBoxItem
{
Identifier = TBI_POLY ;
HelpId = HID_CONTDLG_POLY ;
RadioCheck = TRUE ;
AutoCheck = TRUE ;
Text [ en-US ] = "Polygon" ;
};
ToolBoxItem
{
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
{
Identifier = TBI_POLYEDIT ;
HelpId = HID_CONTDLG_POLYEDIT ;
Text [ en-US ] = "Edit Points" ;
AutoCheck = TRUE ;
};
ToolBoxItem
{
Identifier = TBI_POLYMOVE ;
HelpId = HID_CONTDLG_POLYMOVE ;
Text [ en-US ] = "Move Points" ;
RadioCheck = TRUE ;
AutoCheck = TRUE ;
};
ToolBoxItem
{
Identifier = TBI_POLYINSERT ;
HelpId = HID_CONTDLG_POLYINSERT ;
Text [ en-US ] = "Insert Points" ;
RadioCheck = TRUE ;
AutoCheck = TRUE ;
};
ToolBoxItem
{
Identifier = TBI_POLYDELETE ;
HelpId = HID_CONTDLG_POLYDELETE ;
Text [ en-US ] = "Delete Points" ;
};
ToolBoxItem
{
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
{
Identifier = TBI_AUTOCONTOUR ;
HelpId = HID_CONTDLG_AUTOCONTOUR ;
Text [ en-US ] = "AutoContour" ;
};
ToolBoxItem
{
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
{
Identifier = TBI_UNDO ;
HelpId = HID_CONTDLG_UNDO ;
Text [ en-US ] = "Undo " ;
};
ToolBoxItem
{
Identifier = TBI_REDO ;
HelpId = HID_CONTDLG_REDO ;
Text [ en-US ] = "Redo " ;
};
ToolBoxItem
{
Identifier = TBI_PIPETTE ;
HelpId = HID_CONTDLG_PIPETTE ;
Text [ en-US ] = "Pipette" ;
AutoCheck = TRUE ;
};
};
};
MetricField MTF_TOLERANCE
{
HelpID = "svx:MetricField:RID_SVXDLG_CONTOUR:MTF_TOLERANCE";
Border = TRUE ;
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( 28 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 99 ;
Last = 99 ;
SpinSize = 1 ;
Unit = FUNIT_PERCENT ;
QuickHelpText [ en-US ] = "Color Tolerance" ;
};
Control CTL_CONTOUR
{
Border = TRUE ;
SVLook = TRUE ;
Pos = MAP_APPFONT ( 6 , 24 ) ;
HelpId = HID_CONTDLG_GRAPHWND ;
};
#define CONTOURDLG_IDLIST \
IdList = \
{ \
TBI_APPLY ; \
TBI_WORKPLACE ; \
TBI_SELECT ; \
TBI_RECT ; \
TBI_CIRCLE ; \
TBI_POLY ; \
TBI_POLYEDIT ; \
TBI_POLYMOVE ; \
TBI_POLYINSERT ; \
TBI_POLYDELETE ; \
TBI_AUTOCONTOUR ; \
TBI_UNDO ; \
TBI_REDO ; \
TBI_PIPETTE ; \
}; \
IdCount = { 14 ; };
ImageList CD_IMAPDLG
{
Prefix = "cd";
MASKCOLOR
CONTOURDLG_IDLIST
};
};
/******************************************************************************/
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -41,17 +41,30 @@ class SvxSuperContourDlg : public SvxContourDlg
void* pUpdateEditingObject;
void* pCheckObj;
SvxContourDlgItem aContourItem;
ToolBox aTbx1;
MetricField aMtfTolerance;
ContourWindow aContourWnd;
StatusBar aStbStatus;
sal_uIntPtr nGrfChanged;
ToolBox* m_pTbx1;
MetricField* m_pMtfTolerance;
ContourWindow* m_pContourWnd;
StatusBar* m_pStbStatus;
sal_uIntPtr nGrfChanged;
bool bExecState;
bool bUpdateGraphicLinked;
bool bGraphicLinked;
ImageList maImageList;
virtual void Resize() SAL_OVERRIDE;
sal_uInt16 mnApplyId;
sal_uInt16 mnWorkSpaceId;
sal_uInt16 mnSelectId;
sal_uInt16 mnRectId;
sal_uInt16 mnCircleId;
sal_uInt16 mnPolyId;
sal_uInt16 mnPolyEditId;
sal_uInt16 mnPolyMoveId;
sal_uInt16 mnPolyInsertId;
sal_uInt16 mnPolyDeleteId;
sal_uInt16 mnAutoContourId;
sal_uInt16 mnUndoId;
sal_uInt16 mnRedoId;
sal_uInt16 mnPipetteId;
virtual bool Close() SAL_OVERRIDE;
DECL_LINK( Tbx1ClickHdl, ToolBox* );
......@@ -67,8 +80,8 @@ class SvxSuperContourDlg : public SvxContourDlg
public:
SvxSuperContourDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
Window* pParent, const ResId& rResId );
SvxSuperContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
Window* pParent);
virtual ~SvxSuperContourDlg();
void SetExecState( bool bEnable );
......@@ -90,14 +103,6 @@ public:
void UpdateGraphic( const Graphic& rGraphic, bool bGraphicLinked,
const PolyPolygon* pPolyPoly = NULL,
void* pEditingObj = NULL );
/** switches the toolbox images depending on the actuall high contrast display mode state */
void ApplyImageList();
/** virtual method from Window is used to detect change in high contrast display mode
to switch the toolbox images */
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
};
......
......@@ -20,7 +20,6 @@
#include <svx/xoutbmp.hxx>
#include <svx/dialogs.hrc>
#include <svx/svxids.hrc>
#include <contdlg.hrc>
#include <contwnd.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdopath.hxx>
......@@ -34,8 +33,8 @@ using namespace com::sun::star;
#define TRANSCOL Color( COL_WHITE )
ContourWindow::ContourWindow( Window* pParent, const ResId& rResId ) :
GraphCtrl ( pParent, rResId ),
ContourWindow::ContourWindow( Window* pParent, WinBits nBits ) :
GraphCtrl ( pParent, nBits ),
aWorkRect ( 0, 0, 0, 0 ),
bPipetteMode ( false ),
bWorkplaceMode ( false ),
......@@ -267,4 +266,9 @@ void ContourWindow::Paint( const Rectangle& rRect )
pView->EndCompleteRedraw(*pPaintWindow, true);
}
Size ContourWindow::GetOptimalSize() const
{
return LogicToPixel(Size(270, 170), MAP_APPFONT);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -43,13 +43,14 @@ protected:
virtual void SdrObjCreated( const SdrObject& rObj ) SAL_OVERRIDE;
virtual void InitSdrModel() SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
void CreatePolyPolygon();
public:
ContourWindow( Window* pParent, const ResId& rResId );
virtual ~ContourWindow();
ContourWindow(Window* pParent, WinBits nBits);
virtual ~ContourWindow();
void SetPolyPolygon( const PolyPolygon& rPolyPoly );
const PolyPolygon& GetPolyPolygon();
......
......@@ -53,26 +53,6 @@ void GraphCtrlUserCall::Changed( const SdrObject& rObj, SdrUserCallType eType, c
}
}
GraphCtrl::GraphCtrl( Window* pParent, const ResId& rResId ) :
Control ( pParent, rResId ),
aMap100 ( MAP_100TH_MM ),
nWinStyle ( 0 ),
eObjKind ( OBJ_NONE ),
nPolyEdit ( 0 ),
bEditMode ( false ),
bSdrMode ( false ),
bAnim ( false ),
mpAccContext ( NULL ),
pModel ( NULL ),
pView ( NULL )
{
pUserCall = new GraphCtrlUserCall( *this );
aUpdateTimer.SetTimeout( 500 );
aUpdateTimer.SetTimeoutHdl( LINK( this, GraphCtrl, UpdateHdl ) );
aUpdateTimer.Start();
EnableRTL( false );
}
GraphCtrl::GraphCtrl( Window* pParent, WinBits nStyle ) :
Control ( pParent, nStyle ),
aMap100 ( MAP_100TH_MM ),
......
......@@ -124,7 +124,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeStatusBar(Window *pParent,
SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, Window* _pParent)
: SfxModelessDialog(_pBindings, pCW, _pParent, "ImapDialog", "svx/ui/imapdialog.ui")
, maImageList(SVX_RES(IL_IMAPDLG))
, pCheckObj(NULL)
, aIMapItem(SID_IMAP_EXEC, *this, *_pBindings)
{
......@@ -152,24 +151,6 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, Window* _pP
mnMacroId = m_pTbxIMapDlg1->GetItemId("TBI_MACRO");
mnPropertyId = m_pTbxIMapDlg1->GetItemId("TBI_PROPERTY");
maApplyImg = maImageList.GetImage(TBI_APPLY);
maOpenImg = maImageList.GetImage(TBI_OPEN);
maSaveAsImg = maImageList.GetImage(TBI_SAVEAS);
maSelectImg = maImageList.GetImage(TBI_SELECT);
maRectImg = maImageList.GetImage(TBI_RECT);
maCircleImg = maImageList.GetImage(TBI_CIRCLE);
maPolyImg = maImageList.GetImage(TBI_POLY);
maFreePolyImg = maImageList.GetImage(TBI_FREEPOLY);
maPolyEditImg = maImageList.GetImage(TBI_POLYEDIT);
maPolyMoveImg = maImageList.GetImage(TBI_POLYMOVE);
maPolyInsertImg = maImageList.GetImage(TBI_POLYINSERT);
maPolyDeleteImg = maImageList.GetImage(TBI_POLYDELETE);
maUndoImg = maImageList.GetImage(TBI_UNDO);
maRedoImg = maImageList.GetImage(TBI_REDO);
maActiveImg = maImageList.GetImage(TBI_ACTIVE);
maMacroImg = maImageList.GetImage(TBI_MACRO);
maPropertyImg = maImageList.GetImage(TBI_PROPERTY);
get(m_pFtURL, "urlft");
get(m_pURLBox, "url");
get(m_pFtText, "textft");
......@@ -195,8 +176,6 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, Window* _pP
pIMapWnd->set_vexpand(true);
pIMapWnd->Show();
ApplyImageList();
pOwnData = new IMapOwnData;
pIMapWnd->SetInfoLink( LINK( this, SvxIMapDlg, InfoHdl ) );
......@@ -797,33 +776,4 @@ IMPL_LINK_NOARG(SvxIMapDlg, MiscHdl)
return 0L;
}
void SvxIMapDlg::ApplyImageList()
{
m_pTbxIMapDlg1->SetItemImage(mnApplyId, maApplyImg);
m_pTbxIMapDlg1->SetItemImage(mnOpenId, maOpenImg);
m_pTbxIMapDlg1->SetItemImage(mnSaveAsId, maSaveAsImg);
m_pTbxIMapDlg1->SetItemImage(mnSelectId, maSelectImg);
m_pTbxIMapDlg1->SetItemImage(mnRectId, maRectImg);
m_pTbxIMapDlg1->SetItemImage(mnCircleId, maCircleImg);
m_pTbxIMapDlg1->SetItemImage(mnPolyId, maPolyImg);
m_pTbxIMapDlg1->SetItemImage(mnFreePolyId, maFreePolyImg);
m_pTbxIMapDlg1->SetItemImage(mnPolyEditId, maPolyEditImg);
m_pTbxIMapDlg1->SetItemImage(mnPolyMoveId, maPolyMoveImg);
m_pTbxIMapDlg1->SetItemImage(mnPolyInsertId, maPolyInsertImg);
m_pTbxIMapDlg1->SetItemImage(mnPolyDeleteId, maPolyDeleteImg);
m_pTbxIMapDlg1->SetItemImage(mnUndoId, maUndoImg);
m_pTbxIMapDlg1->SetItemImage(mnRedoId, maRedoImg);
m_pTbxIMapDlg1->SetItemImage(mnActiveId, maActiveImg);
m_pTbxIMapDlg1->SetItemImage(mnMacroId, maMacroImg);
m_pTbxIMapDlg1->SetItemImage(mnPropertyId, maPropertyImg);
}
void SvxIMapDlg::DataChanged( const DataChangedEvent& rDCEvt )
{
SfxModelessDialog::DataChanged( rDCEvt );
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
ApplyImageList();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
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