Kaydet (Commit) 7209372b authored tarafından Palenik Mihály's avatar Palenik Mihály Kaydeden (comit) Caolán McNamara

Convert RID_SVX_MDLG_FONTWORK_GALLERY to .ui

Change-Id: I18c02b6c1f9ea9642d3f04092f7df4dcc9d92990
Reviewed-on: https://gerrit.libreoffice.org/8689Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 359a7d4b
helpcontent2 @ 440af54d
Subproject commit a193d80ec52e7e90015b4ab59c533dbd04d1c7e9
Subproject commit 440af54dcae5a9380810ba81b68bdf198730423b
......@@ -1008,8 +1008,6 @@
// "ModalDialog" resource ids
#define RID_SVX_MDLG_FONTWORK_GALLERY ( RID_SVX_START + 2 )
// "Menu" resource ids
#define RID_SVX_MDLG_FONTWORK_CHARSPACING ( RID_SVX_START + 19 )
......
......@@ -77,19 +77,14 @@ public:
class SVX_DLLPUBLIC FontWorkGalleryDialog : public ModalDialog
{
FixedLine maFLFavorites;
ValueSet maCtlFavorites;
OKButton maOKButton;
CancelButton maCancelButton;
HelpButton maHelpButton;
ValueSet* mpCtlFavorites;
OKButton* mpOKButton;
sal_uInt16 mnThemeId;
SdrView* mpSdrView;
FmFormModel* mpModel;
OUString maStrClickToAddText;
DECL_LINK( DoubleClickFavoriteHdl, void * );
DECL_LINK( ClickOKHdl, void * );
DECL_LINK( ClickTextDirectionHdl, ImageButton * );
......
......@@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/deletefooterdialog \
svx/uiconfig/ui/extrustiondepthdialog \
svx/uiconfig/ui/findreplacedialog \
svx/uiconfig/ui/fontworkgallerydialog \
svx/uiconfig/ui/fontworkspacingdialog \
svx/uiconfig/ui/headfootformatpage \
svx/uiconfig/ui/linkwarndialog \
......
......@@ -18,15 +18,6 @@
*/
#include <svx/dialogs.hrc>
#define FL_FAVORITES 1
#define CTL_FAVORITES 2
#define BTN_OK 3
#define BTN_CANCEL 4
#define BTN_HELP 9
#define STR_CLICK_TO_ADD_TEXT 1
#define STR_ALIGN_LEFT 1
#define STR_ALIGN_CENTER 2
#define STR_ALIGN_RIGHT 3
......
......@@ -44,7 +44,6 @@
#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_CTL_FONTWORK_FAVORITES "SVX_HID_CTL_FONTWORK_FAVORITES"
#define HID_CTRL3D_HSCROLL "SVX_HID_CTRL3D_HSCROLL"
#define HID_CTRL3D_SWITCHER "SVX_HID_CTRL3D_SWITCHER"
#define HID_CTRL3D_VSCROLL "SVX_HID_CTRL3D_VSCROLL"
......
......@@ -72,27 +72,25 @@ const int nLineCount = 4;
|* Svx3DWin - FloatingWindow
\************************************************************************/
FontWorkGalleryDialog::FontWorkGalleryDialog( SdrView* pSdrView, Window* pParent, sal_uInt16 /*nSID*/ ) :
ModalDialog( pParent, SVX_RES( RID_SVX_MDLG_FONTWORK_GALLERY ) ),
maFLFavorites ( this, SVX_RES( FL_FAVORITES ) ),
maCtlFavorites ( this, SVX_RES( CTL_FAVORITES ) ),
maOKButton ( this, SVX_RES( BTN_OK ) ),
maCancelButton ( this, SVX_RES( BTN_CANCEL ) ),
maHelpButton ( this, SVX_RES( BTN_HELP ) ),
ModalDialog(pParent, "FontworkGalleryDialog", "svx/ui/fontworkgallerydialog.ui" ),
mnThemeId ( 0xffff ),
mpSdrView ( pSdrView ),
mpModel ( (FmFormModel*)pSdrView->GetModel() ),
maStrClickToAddText ( SVX_RESSTR( STR_CLICK_TO_ADD_TEXT ) ),
mppSdrObject ( NULL ),
mpDestModel ( NULL )
{
FreeResource();
get(mpOKButton, "ok");
get(mpCtlFavorites, "ctlFavorites");
Size aSize(LogicToPixel(Size(200, 200), MAP_APPFONT));
mpCtlFavorites->set_width_request(aSize.Width());
mpCtlFavorites->set_height_request(aSize.Height());
maCtlFavorites.SetDoubleClickHdl( LINK( this, FontWorkGalleryDialog, DoubleClickFavoriteHdl ) );
maOKButton.SetClickHdl( LINK( this, FontWorkGalleryDialog, ClickOKHdl ) );
mpCtlFavorites->SetDoubleClickHdl( LINK( this, FontWorkGalleryDialog, DoubleClickFavoriteHdl ) );
mpOKButton->SetClickHdl( LINK( this, FontWorkGalleryDialog, ClickOKHdl ) );
maCtlFavorites.SetColCount( nColCount );
maCtlFavorites.SetLineCount( nLineCount );
maCtlFavorites.SetExtraSpacing( 3 );
mpCtlFavorites->SetColCount( nColCount );
mpCtlFavorites->SetLineCount( nLineCount );
mpCtlFavorites->SetExtraSpacing( 3 );
initFavorites( GALLERY_THEME_FONTWORK );
fillFavorites( GALLERY_THEME_FONTWORK );
......@@ -162,7 +160,7 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 nThemeId)
{
mnThemeId = nThemeId;
Size aThumbSize( maCtlFavorites.GetSizePixel() );
Size aThumbSize( mpCtlFavorites->GetSizePixel() );
aThumbSize.Width() /= nColCount;
aThumbSize.Height() /= nLineCount;
aThumbSize.Width() -= 12;
......@@ -173,12 +171,12 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 nThemeId)
// ValueSet Favoriten
if( nFavCount > (nColCount * nLineCount) )
{
WinBits nWinBits = maCtlFavorites.GetStyle();
WinBits nWinBits = mpCtlFavorites->GetStyle();
nWinBits |= WB_VSCROLL;
maCtlFavorites.SetStyle( nWinBits );
mpCtlFavorites->SetStyle( nWinBits );
}
maCtlFavorites.Clear();
mpCtlFavorites->Clear();
sal_uInt32 nFavorite;
for( nFavorite = 1; nFavorite <= nFavCount; nFavorite++ )
......@@ -187,7 +185,7 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 nThemeId)
aStr += " ";
aStr += OUString::number((sal_Int32)nFavorite);
Image aThumbImage( maFavoritesHorizontal[nFavorite-1] );
maCtlFavorites.InsertItem( (sal_uInt16)nFavorite, aThumbImage, aStr );
mpCtlFavorites->InsertItem( (sal_uInt16)nFavorite, aThumbImage, aStr );
}
}
......@@ -199,7 +197,7 @@ void FontWorkGalleryDialog::SetSdrObjectRef( SdrObject** ppSdrObject, SdrModel*
void FontWorkGalleryDialog::insertSelectedFontwork()
{
sal_uInt16 nItemId = maCtlFavorites.GetSelectItemId();
sal_uInt16 nItemId = mpCtlFavorites->GetSelectItemId();
if( nItemId > 0 )
{
......
......@@ -22,69 +22,8 @@
#include "fontworkgallery.hrc"
#include "svtools/controldims.hrc"
#define WIDTH 256
#define HEIGHT 256
#define MASKCOLOR MaskColor = Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; };
ModalDialog RID_SVX_MDLG_FONTWORK_GALLERY
{
HelpID = "svx:ModalDialog:RID_SVX_MDLG_FONTWORK_GALLERY";
OutputSize = TRUE;
SVLook = TRUE ;
Moveable = TRUE;
Closeable = TRUE;
Size = MAP_APPFONT( WIDTH, HEIGHT );
Text [ en-US ] = "Fontwork Gallery" ;
FixedLine FL_FAVORITES
{
Pos = MAP_APPFONT ( 3 , 3 ) ;
Size = MAP_APPFONT ( WIDTH - 6 , 8 ) ;
Text [ en-US ] = "Select a Fontwork style:" ;
};
Control CTL_FAVORITES
{
HelpId = HID_CTL_FONTWORK_FAVORITES ;
Border = FALSE ;
Pos = MAP_APPFONT ( 3 , 14 ) ;
Size = MAP_APPFONT ( WIDTH - 6,
HEIGHT - RSC_CD_PUSHBUTTON_HEIGHT -
6 - RSC_CD_PUSHBUTTON_HEIGHT ) ;
TabStop = TRUE ;
};
OkButton BTN_OK
{
Pos = MAP_APPFONT ( WIDTH - 3 * RSC_CD_PUSHBUTTON_WIDTH - 9 ,
HEIGHT - 3 - RSC_CD_PUSHBUTTON_HEIGHT ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH,
RSC_CD_PUSHBUTTON_HEIGHT ) ;
TabStop = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( WIDTH - 2 * RSC_CD_PUSHBUTTON_WIDTH - 6 ,
HEIGHT - 3 - RSC_CD_PUSHBUTTON_HEIGHT ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH,
RSC_CD_PUSHBUTTON_HEIGHT ) ;
TabStop = TRUE ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( WIDTH - 1 * RSC_CD_PUSHBUTTON_WIDTH - 3 ,
HEIGHT - 3 - RSC_CD_PUSHBUTTON_HEIGHT ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH,
RSC_CD_PUSHBUTTON_HEIGHT ) ;
TabStop = TRUE ;
};
String STR_CLICK_TO_ADD_TEXT
{
Text [ en-US ] = "Click to edit text" ;
};
};
DockingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT
{
HelpID = "svx:DockingWindow:RID_SVXFLOAT_FONTWORK_ALIGNMENT";
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<!-- interface-requires LibreOffice 1.0 -->
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="FontworkGalleryDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Fontwork Gallery</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="svtlo-ValueSet" id="ctlFavorites">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Select a Fontwork style</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
<action-widget response="0">help</action-widget>
</action-widgets>
</object>
</interface>
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