summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCsikós Tamás <csks.tomi@gmail.com>2013-07-12 11:16:44 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-07-12 12:47:11 +0000
commitefc09e121ceffb0d2c1b841b809277bd6484f1a7 (patch)
tree894ac2d8d8e5fbecd5f3f6ddd8ff10371422176f /sw
parentd8dbf1b5dbfa0db2d765063a1d848d031835398a (diff)
modern .ui widgetlayout for frmpage/frmurlpage
Change-Id: Ia308fa393baffc7f456ba613cb216b427c450ca6 Reviewed-on: https://gerrit.libreoffice.org/4854 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/inc/helpid.h1
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx67
-rw-r--r--sw/source/ui/frmdlg/frmpage.hrc10
-rw-r--r--sw/source/ui/frmdlg/frmpage.src88
-rw-r--r--sw/source/ui/inc/frmpage.hxx17
-rw-r--r--sw/uiconfig/swriter/ui/frmurlpage.ui266
7 files changed, 304 insertions, 146 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 7096808754ad..4cd89abfb59a 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -88,6 +88,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/footnotepage \
sw/uiconfig/swriter/ui/footnoteareapage \
sw/uiconfig/swriter/ui/frmaddpage \
+ sw/uiconfig/swriter/ui/frmurlpage \
sw/uiconfig/swriter/ui/indexentry \
sw/uiconfig/swriter/ui/inputfielddialog \
sw/uiconfig/swriter/ui/insertbookmark \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 062ae991a1c3..c82e46e35b83 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -151,7 +151,6 @@
#define HID_LAB_FMT "SW_HID_LAB_FMT"
#define HID_ENV_ENV "SW_HID_ENV_ENV"
#define HID_ENV_FMT "SW_HID_ENV_FMT"
-#define HID_FRM_URL "SW_HID_FRM_URL"
#define HID_COND_COLL "SW_HID_COND_COLL"
#define HID_FLD_DB "SW_HID_FLD_DB"
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 210293f665fe..4240747b2a84 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2599,22 +2599,17 @@ void BmpWindow::SetGraphic(const Graphic& rGrf)
Description: set URL and ImageMap at frames
***************************************************************************/
SwFrmURLPage::SwFrmURLPage( Window *pParent, const SfxItemSet &rSet ) :
- SfxTabPage(pParent, SW_RES(TP_FRM_URL), rSet),
- aHyperLinkFL (this, SW_RES( FL_HYPERLINK )),
- aURLFT (this, SW_RES( FT_URL )),
- aURLED (this, SW_RES( ED_URL )),
- aSearchPB (this, SW_RES( PB_SEARCH )),
- aNameFT (this, SW_RES( FT_NAME )),
- aNameED (this, SW_RES( ED_NAME )),
- aFrameFT (this, SW_RES( FT_FRAME )),
- aFrameCB (this, SW_RES( CB_FRAME )),
-
- aImageFL (this, SW_RES( FL_IMAGE )),
- aServerCB (this, SW_RES( CB_SERVER )),
- aClientCB (this, SW_RES( CB_CLIENT ))
+ SfxTabPage(pParent, "FrmURLPage" , "modules/swriter/ui/frmurlpage.ui", rSet)
{
- FreeResource();
- aSearchPB.SetClickHdl(LINK(this, SwFrmURLPage, InsertFileHdl));
+ get(pURLED,"url");
+ get(pSearchPB,"search");
+ get(pNameED,"name");
+ get(pFrameCB,"frame");
+
+ get(pServerCB,"server");
+ get(pClientCB,"client");
+
+ pSearchPB->SetClickHdl(LINK(this, SwFrmURLPage, InsertFileHdl));
}
SwFrmURLPage::~SwFrmURLPage()
@@ -2633,7 +2628,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
size_t nCount = pList->size();
for ( size_t i = 0; i < nCount; i++ )
{
- aFrameCB.InsertEntry( *pList->at( i ) );
+ pFrameCB->InsertEntry( *pList->at( i ) );
}
for ( size_t i = nCount; i; )
{
@@ -2646,24 +2641,24 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, sal_True, &pItem ) )
{
const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
- aURLED.SetText( INetURLObject::decode( pFmtURL->GetURL(),
+ pURLED->SetText( INetURLObject::decode( pFmtURL->GetURL(),
INET_HEX_ESCAPE,
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ));
- aNameED.SetText( pFmtURL->GetName());
+ pNameED->SetText( pFmtURL->GetName());
- aClientCB.Enable( pFmtURL->GetMap() != 0 );
- aClientCB.Check ( pFmtURL->GetMap() != 0 );
- aServerCB.Check ( pFmtURL->IsServerMap() );
+ pClientCB->Enable( pFmtURL->GetMap() != 0 );
+ pClientCB->Check ( pFmtURL->GetMap() != 0 );
+ pServerCB->Check ( pFmtURL->IsServerMap() );
- aFrameCB.SetText(pFmtURL->GetTargetFrameName());
- aFrameCB.SaveValue();
+ pFrameCB->SetText(pFmtURL->GetTargetFrameName());
+ pFrameCB->SaveValue();
}
else
- aClientCB.Enable( sal_False );
+ pClientCB->Enable( sal_False );
- aServerCB.SaveValue();
- aClientCB.SaveValue();
+ pServerCB->SaveValue();
+ pClientCB->SaveValue();
}
sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
@@ -2677,27 +2672,27 @@ sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
pFmtURL = new SwFmtURL();
{
- String sText = aURLED.GetText();
+ String sText = pURLED->GetText();
if( pFmtURL->GetURL() != sText ||
- OUString(pFmtURL->GetName()) != aNameED.GetText() ||
- aServerCB.IsChecked() != pFmtURL->IsServerMap() )
+ OUString(pFmtURL->GetName()) != pNameED->GetText() ||
+ pServerCB->IsChecked() != pFmtURL->IsServerMap() )
{
- pFmtURL->SetURL( sText, aServerCB.IsChecked() );
- pFmtURL->SetName( aNameED.GetText() );
+ pFmtURL->SetURL( sText, pServerCB->IsChecked() );
+ pFmtURL->SetName( pNameED->GetText() );
bModified = sal_True;
}
}
- if(!aClientCB.IsChecked() && pFmtURL->GetMap() != 0)
+ if(!pClientCB->IsChecked() && pFmtURL->GetMap() != 0)
{
pFmtURL->SetMap(0);
bModified = sal_True;
}
- if(OUString(pFmtURL->GetTargetFrameName()) != aFrameCB.GetText())
+ if(OUString(pFmtURL->GetTargetFrameName()) != pFrameCB->GetText())
{
- pFmtURL->SetTargetFrameName(aFrameCB.GetText());
+ pFmtURL->SetTargetFrameName(pFrameCB->GetText());
bModified = sal_True;
}
rSet.Put(*pFmtURL);
@@ -2717,7 +2712,7 @@ IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl)
try
{
- String sTemp(aURLED.GetText());
+ String sTemp(pURLED->GetText());
if(sTemp.Len())
xFP->setDisplayDirectory(sTemp);
}
@@ -2727,7 +2722,7 @@ IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl)
}
if( aDlgHelper.Execute() == ERRCODE_NONE )
{
- aURLED.SetText( xFP->getFiles().getConstArray()[0] );
+ pURLED->SetText( xFP->getFiles().getConstArray()[0] );
}
return 0;
diff --git a/sw/source/ui/frmdlg/frmpage.hrc b/sw/source/ui/frmdlg/frmpage.hrc
index e44fc4271d8d..8e910992c6e3 100644
--- a/sw/source/ui/frmdlg/frmpage.hrc
+++ b/sw/source/ui/frmdlg/frmpage.hrc
@@ -89,25 +89,15 @@
#define ED_CONNECT 54
#define FL_CONNECT 55
#define FT_CONNECT 57
-#define FT_URL 58
-#define ED_URL 59
#define BMP_EXAMPLE 62
#define RB_MIRROR_ALL_PAGES 64
#define RB_MIRROR_LEFT_PAGES 65
#define RB_MIRROR_RIGHT_PAGES 66
-#define FL_HYPERLINK 94
-#define FT_FRAME 95
-#define CB_FRAME 96
-#define FL_IMAGE 97
-#define CB_SERVER 98
-#define CB_CLIENT 99
-
#define CB_REL_WIDTH 100
#define CB_REL_HEIGHT 101
#define CB_FIXEDRATIO 102
-#define PB_SEARCH 103
#define CB_ANCHOR_ONLY 103
diff --git a/sw/source/ui/frmdlg/frmpage.src b/sw/source/ui/frmdlg/frmpage.src
index 9223bcecb9ae..55755915f352 100644
--- a/sw/source/ui/frmdlg/frmpage.src
+++ b/sw/source/ui/frmdlg/frmpage.src
@@ -617,92 +617,4 @@ String STR_EDIT_GRF
{
Text [ en-US ] = "Link" ;
};
-
-TabPage TP_FRM_URL
-{
- Hide = TRUE ;
- SVLook = TRUE ;
- HelpID = HID_FRM_URL ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- FixedText FT_URL
- {
- Pos = MAP_APPFONT ( 12 , 16 ) ;
- Size = MAP_APPFONT ( 30 , 8 ) ;
- Text [ en-US ] = "~URL" ;
- };
- Edit ED_URL
- {
- HelpID = "sw:Edit:TP_FRM_URL:ED_URL";
- Pos = MAP_APPFONT ( 45 , 14 ) ;
- Size = MAP_APPFONT ( 149 , 12 ) ;
- Left = TRUE ;
- Border = TRUE ;
- TabStop = TRUE ;
- };
- FixedText FT_NAME
- {
- Pos = MAP_APPFONT ( 12 , 32 ) ;
- Size = MAP_APPFONT ( 30 , 8 ) ;
- Text [ en-US ] = "~Name" ;
- };
- Edit ED_NAME
- {
- HelpID = "sw:Edit:TP_FRM_URL:ED_NAME";
- Pos = MAP_APPFONT ( 45 , 30 ) ;
- Size = MAP_APPFONT ( 149 , 12 ) ;
- Left = TRUE ;
- Border = TRUE ;
- TabStop = TRUE ;
- };
- FixedText FT_FRAME
- {
- Pos = MAP_APPFONT ( 12 , 48 ) ;
- Size = MAP_APPFONT ( 30 , 8 ) ;
- Text [ en-US ] = "Frame" ;
- };
- ComboBox CB_FRAME
- {
- HelpID = "sw:ComboBox:TP_FRM_URL:CB_FRAME";
- Pos = MAP_APPFONT ( 45 , 46 ) ;
- Size = MAP_APPFONT ( 89 , 50 ) ;
- Left = TRUE ;
- DropDown = TRUE ;
- TabStop = TRUE ;
- };
- PushButton PB_SEARCH
- {
- HelpID = "sw:PushButton:TP_FRM_URL:PB_SEARCH";
- Pos = MAP_APPFONT ( 198 , 13 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Browse..." ;
- };
- FixedLine FL_HYPERLINK
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Link to";
- };
- CheckBox CB_SERVER
- {
- HelpID = "sw:CheckBox:TP_FRM_URL:CB_SERVER";
- Pos = MAP_APPFONT ( 12 , 75 ) ;
- Size = MAP_APPFONT ( 236 , 10 ) ;
- Text [ en-US ] = "~Server-side image map";
- };
- CheckBox CB_CLIENT
- {
- HelpID = "sw:CheckBox:TP_FRM_URL:CB_CLIENT";
- Pos = MAP_APPFONT ( 12 , 89 ) ;
- Size = MAP_APPFONT ( 236 , 10 ) ;
- Text [ en-US ] = "~Client-side image map";
- };
- FixedLine FL_IMAGE
- {
- Pos = MAP_APPFONT ( 6 , 64 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Image map" ;
- };
-};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx
index 8b15ed67d351..4a7ab7deb540 100644
--- a/sw/source/ui/inc/frmpage.hxx
+++ b/sw/source/ui/inc/frmpage.hxx
@@ -241,19 +241,14 @@ public:
class SwFrmURLPage : public SfxTabPage
{
// hyperlink
- FixedLine aHyperLinkFL;
- FixedText aURLFT;
- Edit aURLED;
- PushButton aSearchPB;
- FixedText aNameFT;
- Edit aNameED;
- FixedText aFrameFT;
- ComboBox aFrameCB;
+ Edit* pURLED;
+ PushButton* pSearchPB;
+ Edit* pNameED;
+ ComboBox* pFrameCB;
// image map
- FixedLine aImageFL;
- CheckBox aServerCB;
- CheckBox aClientCB;
+ CheckBox* pServerCB;
+ CheckBox* pClientCB;
DECL_LINK(InsertFileHdl, void *);
diff --git a/sw/uiconfig/swriter/ui/frmurlpage.ui b/sw/uiconfig/swriter/ui/frmurlpage.ui
new file mode 100644
index 000000000000..b079044636ff
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/frmurlpage.ui
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="FrmURLPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <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="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkEntry" id="url">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="name">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="url_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_URL:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">url</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="name_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Name:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">name</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="frame_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Frame:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">frame</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="search">
+ <property name="label" translatable="yes">_Browse...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="frame">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has_entry">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="comboboxtext-entry">
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </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">Link to</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">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="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkCheckButton" id="server">
+ <property name="label" translatable="yes">_Server-side image map</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="hexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="client">
+ <property name="label" translatable="yes">_Client-side image map</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="hexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Image map</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>
+</interface>