summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------helpcontent20
-rw-r--r--include/svx/dialogs.hrc2
-rw-r--r--include/svx/fontworkgallery.hxx9
-rw-r--r--svx/UIConfig_svx.mk1
-rw-r--r--svx/inc/fontworkgallery.hrc9
-rw-r--r--svx/inc/helpid.hrc1
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx36
-rw-r--r--svx/source/tbxctrls/fontworkgallery.src61
-rw-r--r--svx/uiconfig/ui/fontworkgallerydialog.ui124
9 files changed, 144 insertions, 99 deletions
diff --git a/helpcontent2 b/helpcontent2
-Subproject a193d80ec52e7e90015b4ab59c533dbd04d1c7e
+Subproject 440af54dcae5a9380810ba81b68bdf198730423
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 3fddc023e567..7687f94abeae 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -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 )
diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx
index d792b135a7c4..a5b63bada0c6 100644
--- a/include/svx/fontworkgallery.hxx
+++ b/include/svx/fontworkgallery.hxx
@@ -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 * );
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 731169894a3f..8f30b32eefbc 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -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 \
diff --git a/svx/inc/fontworkgallery.hrc b/svx/inc/fontworkgallery.hrc
index 4946a8ce4be0..115abb4f0245 100644
--- a/svx/inc/fontworkgallery.hrc
+++ b/svx/inc/fontworkgallery.hrc
@@ -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
diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc
index 0c1f040be84c..c868e8cdb363 100644
--- a/svx/inc/helpid.hrc
+++ b/svx/inc/helpid.hrc
@@ -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"
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 29cfb35ee34c..ea03126902b9 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -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 )
{
diff --git a/svx/source/tbxctrls/fontworkgallery.src b/svx/source/tbxctrls/fontworkgallery.src
index 9e049a97c037..dbefa6020655 100644
--- a/svx/source/tbxctrls/fontworkgallery.src
+++ b/svx/source/tbxctrls/fontworkgallery.src
@@ -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";
diff --git a/svx/uiconfig/ui/fontworkgallerydialog.ui b/svx/uiconfig/ui/fontworkgallerydialog.ui
new file mode 100644
index 000000000000..0a52026a8182
--- /dev/null
+++ b/svx/uiconfig/ui/fontworkgallerydialog.ui
@@ -0,0 +1,124 @@
+<?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>