[Libreoffice-commits] core.git: 11 commits - cui/source cui/uiconfig cui/UIConfig_cui.mk extras/source
Caolán McNamara
caolanm at redhat.com
Tue Jun 24 02:05:52 PDT 2014
cui/UIConfig_cui.mk | 5
cui/source/dialogs/cuihyperdlg.cxx | 50 +
cui/source/dialogs/hldocntp.cxx | 92 +--
cui/source/dialogs/hldoctp.cxx | 82 +-
cui/source/dialogs/hlinettp.cxx | 155 ++---
cui/source/dialogs/hlmailtp.cxx | 88 +--
cui/source/dialogs/hltpbase.cxx | 105 +--
cui/source/dialogs/hyperdlg.hrc | 82 --
cui/source/dialogs/hyperdlg.src | 732 +------------------------
cui/source/dialogs/iconcdlg.cxx | 423 ++------------
cui/source/inc/cuires.hrc | 7
cui/source/inc/hldocntp.hxx | 17
cui/source/inc/hldoctp.hxx | 21
cui/source/inc/hlinettp.hxx | 26
cui/source/inc/hlmailtp.hxx | 18
cui/source/inc/hltpbase.hxx | 21
cui/source/inc/iconcdlg.hxx | 46 -
cui/uiconfig/ui/hyperlinkdialog.ui | 148 +++++
cui/uiconfig/ui/hyperlinkdocpage.ui | 523 +++++++++++++++++
cui/uiconfig/ui/hyperlinkinternetpage.ui | 460 +++++++++++++++
cui/uiconfig/ui/hyperlinkmailpage.ui | 402 +++++++++++++
cui/uiconfig/ui/hyperlinknewdocpage.ui | 406 +++++++++++++
extras/source/glade/libreoffice-catalog.xml.in | 8
23 files changed, 2394 insertions(+), 1523 deletions(-)
New commits:
commit 46de7b7dbe0092c1a169c865edf2eb46913124cf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 24 10:00:33 2014 +0100
tweak sizes
Change-Id: Ica7275696b3f7e59d0db5d27811905710dce32e1
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 39bc47b..b9ed4ca 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -108,6 +108,7 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, IconChoiceDialog*
get(m_pBtCreate, "create");
m_pBtCreate->SetModeImage(Image(CUI_RES(RID_SVXBMP_NEWDOC)));
get(m_pLbDocTypes, "types");
+ m_pLbDocTypes->set_height_request(m_pLbDocTypes->GetTextHeight() * 5);
// Set HC bitmaps and disable display of bitmap names.
m_pBtCreate->EnableTextDisplay (false);
diff --git a/cui/uiconfig/ui/hyperlinkdocpage.ui b/cui/uiconfig/ui/hyperlinkdocpage.ui
index c3b3678..f1bc48d 100644
--- a/cui/uiconfig/ui/hyperlinkdocpage.ui
+++ b/cui/uiconfig/ui/hyperlinkdocpage.ui
@@ -509,4 +509,15 @@
</packing>
</child>
</object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="path_label"/>
+ <widget name="subject_label"/>
+ <widget name="target_label"/>
+ <widget name="url_label"/>
+ <widget name="frame_label"/>
+ <widget name="indication_label"/>
+ <widget name="name_label"/>
+ </widgets>
+ </object>
</interface>
diff --git a/cui/uiconfig/ui/hyperlinkinternetpage.ui b/cui/uiconfig/ui/hyperlinkinternetpage.ui
index 536fd2f..8e501ff 100644
--- a/cui/uiconfig/ui/hyperlinkinternetpage.ui
+++ b/cui/uiconfig/ui/hyperlinkinternetpage.ui
@@ -447,4 +447,14 @@
</packing>
</child>
</object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="target_label"/>
+ <widget name="login_label"/>
+ <widget name="password_label"/>
+ <widget name="frame_label"/>
+ <widget name="indication_label"/>
+ <widget name="name_label"/>
+ </widgets>
+ </object>
</interface>
diff --git a/cui/uiconfig/ui/hyperlinkmailpage.ui b/cui/uiconfig/ui/hyperlinkmailpage.ui
index f8b672a..211db02 100644
--- a/cui/uiconfig/ui/hyperlinkmailpage.ui
+++ b/cui/uiconfig/ui/hyperlinkmailpage.ui
@@ -390,4 +390,13 @@
</packing>
</child>
</object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="receiver_label"/>
+ <widget name="subject_label"/>
+ <widget name="frame_label"/>
+ <widget name="indication_label"/>
+ <widget name="name_label"/>
+ </widgets>
+ </object>
</interface>
diff --git a/cui/uiconfig/ui/hyperlinknewdocpage.ui b/cui/uiconfig/ui/hyperlinknewdocpage.ui
index 2d2933a..35ec7df 100644
--- a/cui/uiconfig/ui/hyperlinknewdocpage.ui
+++ b/cui/uiconfig/ui/hyperlinknewdocpage.ui
@@ -14,12 +14,14 @@
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</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="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -137,6 +139,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="xalign">0</property>
+ <property name="yalign">0</property>
<property name="ypad">1</property>
<property name="label" translatable="yes">File _type</property>
<property name="use_underline">True</property>
@@ -153,6 +156,7 @@
<object class="GtkTreeView" id="types:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
@@ -390,4 +394,13 @@
</packing>
</child>
</object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="file_label"/>
+ <widget name="types_label"/>
+ <widget name="frame_label"/>
+ <widget name="indication_label"/>
+ <widget name="name_label"/>
+ </widgets>
+ </object>
</interface>
commit 1579fc7930971e76ed36428d83652401aaa15879
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 24 09:48:14 2014 +0100
hide old page on showing new page
and showing/hiding pages during Paint seems crazy to me, doing it
during ShowPage makes sense.
Change-Id: Ifd0c3c50812157cfa793da86715d58818e944e6b
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index a66bf09..0af84e0 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -323,31 +323,6 @@ SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage(
return pEntry;
}
-/**********************************************************************
-|
-| Paint-method
-|
-\**********************************************************************/
-
-void IconChoiceDialog::Paint( const Rectangle& rRect )
-{
- Dialog::Paint ( rRect );
-
- for ( size_t i = 0; i < maPageList.size(); i++ )
- {
- IconChoicePageData* pData = maPageList[ i ];
-
- if ( pData->nId == mnCurrentPageId )
- {
- ShowPageImpl ( pData );
- }
- else
- {
- HidePageImpl ( pData );
- }
- }
-}
-
void IconChoiceDialog::SetCtrlStyle()
{
WinBits aWinBits = WB_3DLOOK | WB_ICON | WB_BORDER | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | WB_NODRAGSELECTION | WB_TABSTOP | WB_CLIPCHILDREN | WB_ALIGN_LEFT | WB_NOHSCROLL;
@@ -375,20 +350,26 @@ void IconChoiceDialog::HidePageImpl ( IconChoicePageData* pData )
pData->pPage->Hide();
}
-
-
-void IconChoiceDialog::ShowPage( sal_uInt16 nId )
+void IconChoiceDialog::ShowPage(sal_uInt16 nId)
{
- bool bInvalidate = GetCurPageId() != nId;
- SetCurPageId( nId );
- ActivatePageImpl( );
- if(bInvalidate)
- Invalidate();
+ sal_uInt16 nOldPageId = GetCurPageId();
+ bool bInvalidate = nOldPageId != nId;
+ SetCurPageId(nId);
+ ActivatePageImpl();
+ if (bInvalidate)
+ {
+ IconChoicePageData* pOldData = GetPageData(nOldPageId);
+ if (pOldData && pOldData->pPage)
+ {
+ DeActivatePageImpl();
+ HidePageImpl(pOldData);
+ }
- // IA2 CWS. MT: I guess we want the event now, and not in Paint()?
- IconChoicePageData* pData = GetPageData ( mnCurrentPageId );
- if(pData)
- ShowPageImpl ( pData );
+ Invalidate();
+ }
+ IconChoicePageData* pNewData = GetPageData(nId);
+ if (pNewData && pNewData->pPage)
+ ShowPageImpl(pNewData);
}
/**********************************************************************
@@ -408,14 +389,7 @@ IMPL_LINK_NOARG(IconChoiceDialog , ChosePageHdl_Impl)
if( *pId != mnCurrentPageId )
{
- IconChoicePageData* pData = GetPageData ( mnCurrentPageId );
- if ( pData->pPage )
- DeActivatePageImpl();
-
- SetCurPageId ( *pId );
-
- ActivatePageImpl();
- Invalidate();
+ ShowPage(*pId);
}
return 0L;
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index dec5373..fb8ad2f 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -186,8 +186,6 @@ public :
const SfxItemSet * pItemSet = 0 );
virtual ~IconChoiceDialog ();
- virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
-
// interface
SvxIconChoiceCtrlEntry* AddTabPage(
sal_uInt16 nId, const OUString& rIconText, const Image& rChoiceIcon,
commit 5b98dcd94f08242f108a61928ba31c5ab5b3fe7a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 24 09:43:30 2014 +0100
loop through all pages to get optimal size
Change-Id: Ie565ec33c8eaacb490eebcacec7662fde511e98a
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 97f5485..33081c1 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -111,7 +111,10 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings)
aImage = Image( CUI_RES ( RID_SVXBMP_HLDOCNTP ) );
pEntry = AddTabPage ( RID_SVXPAGE_HYPERLINK_NEWDOCUMENT, aStrTitle, aImage, SvxHyperlinkNewDocTp::Create );
pEntry->SetQuickHelpText( CUI_RESSTR( RID_SVXSTR_HYPERDLG_HLDOCNTP_HELP ) );
- SetCurPageId(RID_SVXPAGE_HYPERLINK_INTERNET);
+
+ // set OK/Cancel - button
+ GetOKButton().SetText ( CUI_RESSTR(RID_SVXSTR_HYPDLG_APPLYBUT) );
+ GetCancelButton().SetText ( CUI_RESSTR(RID_SVXSTR_HYPDLG_CLOSEBUT) );
// create itemset for tabpages
mpItemSet = new SfxItemSet( SFX_APP()->GetPool(), SID_HYPERLINK_GETLINK,
@@ -122,15 +125,32 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings)
SetInputSet (mpItemSet);
+ //loop through the pages and get their max bounds and lock that down
+ ShowPage(RID_SVXPAGE_HYPERLINK_NEWDOCUMENT);
+ VclBox *pBox = get_content_area();
+ Size aMaxPrefSize(pBox->get_preferred_size());
+ ShowPage(RID_SVXPAGE_HYPERLINK_DOCUMENT);
+ Size aSize(pBox->get_preferred_size());
+ aMaxPrefSize.Width() = std::max(aMaxPrefSize.Width(), aSize.Width());
+ aMaxPrefSize.Height() = std::max(aMaxPrefSize.Height(), aSize.Height());
+ ShowPage(RID_SVXPAGE_HYPERLINK_MAIL);
+ aSize = pBox->get_preferred_size();
+ aMaxPrefSize.Width() = std::max(aMaxPrefSize.Width(), aSize.Width());
+ aMaxPrefSize.Height() = std::max(aMaxPrefSize.Height(), aSize.Height());
+ ShowPage(RID_SVXPAGE_HYPERLINK_INTERNET);
+ aSize = pBox->get_preferred_size();
+ aMaxPrefSize.Width() = std::max(aMaxPrefSize.Width(), aSize.Width());
+ aMaxPrefSize.Height() = std::max(aMaxPrefSize.Height(), aSize.Height());
+ pBox->set_width_request(aMaxPrefSize.Width());
+ pBox->set_height_request(aMaxPrefSize.Height());
+
+ SetCurPageId(RID_SVXPAGE_HYPERLINK_INTERNET);
+
// Init Dialog
Start (false);
pBindings->Update( SID_READONLY_MODE );
- // set OK/Cancel - button
- GetOKButton().SetText ( CUI_RESSTR(RID_SVXSTR_HYPDLG_APPLYBUT) );
- GetCancelButton().SetText ( CUI_RESSTR(RID_SVXSTR_HYPDLG_CLOSEBUT) );
-
GetOKButton().SetClickHdl ( LINK ( this, SvxHpLinkDlg, ClickApplyHdl_Impl ) );
GetCancelButton().SetClickHdl( LINK ( this, SvxHpLinkDlg, ClickCloseHdl_Impl ) );
}
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 8bc677c..dec5373 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -139,7 +139,6 @@ private :
PushButton *m_pResetBtn;
VclVBox *m_pTabContainer;
-
const SfxItemSet* pSet;
SfxItemSet* pOutSet;
SfxItemSet* pExampleSet;
diff --git a/cui/uiconfig/ui/hyperlinkdialog.ui b/cui/uiconfig/ui/hyperlinkdialog.ui
index d547d6e..5a55417 100644
--- a/cui/uiconfig/ui/hyperlinkdialog.ui
+++ b/cui/uiconfig/ui/hyperlinkdialog.ui
@@ -4,8 +4,6 @@
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="HyperlinkDialog">
- <property name="width_request">550</property>
- <property name="height_request">400</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
@@ -102,6 +100,7 @@
<child>
<object class="cuilo-SvtIconChoiceCtrl" id="icon_control">
<property name="width_request">110</property>
+ <property name="height_request">400</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin">0</property>
commit 6a2bbceb295768f4b2f079523ff7864761d50776
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 23 17:02:41 2014 +0100
fix spacing, mnemonics, etc
Change-Id: I9371ef04e643a32d2eadf46f555c4b7a465a5e0f
diff --git a/cui/uiconfig/ui/hyperlinkdocpage.ui b/cui/uiconfig/ui/hyperlinkdocpage.ui
index e4a5a87..c3b3678 100644
--- a/cui/uiconfig/ui/hyperlinkdocpage.ui
+++ b/cui/uiconfig/ui/hyperlinkdocpage.ui
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="HyperlinkDocPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">24</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
@@ -18,6 +20,7 @@
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
@@ -26,14 +29,14 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">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="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkRadioButton" id="linktyp_mail">
<property name="label" translatable="yes">_E-mail</property>
@@ -41,7 +44,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -61,7 +63,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -88,8 +89,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">_Path</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">path</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -100,11 +103,11 @@
</child>
<child>
<object class="cuilo-SvxHyperURLBox" id="path">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">â¢</property>
- </object>
+ <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>
@@ -120,7 +123,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Open File</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -134,9 +136,11 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="ypad">1</property>
<property name="label" translatable="yes">_Subject</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">subject</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -177,6 +181,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Document</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
@@ -196,20 +203,23 @@
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="target_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">Targ_et</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">target</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -223,6 +233,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">URL</property>
<property name="use_underline">True</property>
</object>
@@ -241,7 +252,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Target in Document</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -290,6 +300,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Target in document</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
@@ -311,20 +324,23 @@
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="frame_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">F_rame</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">frame</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -338,8 +354,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">Te_xt</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">indication</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -353,8 +371,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">N_ame</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">name</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -395,13 +415,15 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="form_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">F_orm</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">form</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -430,7 +452,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Events</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">3</property>
@@ -475,6 +496,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Further settings</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
diff --git a/cui/uiconfig/ui/hyperlinkinternetpage.ui b/cui/uiconfig/ui/hyperlinkinternetpage.ui
index 35c984e..536fd2f 100644
--- a/cui/uiconfig/ui/hyperlinkinternetpage.ui
+++ b/cui/uiconfig/ui/hyperlinkinternetpage.ui
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="HyperlinkInternetPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">24</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
@@ -18,6 +20,7 @@
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
@@ -26,14 +29,14 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">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="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkRadioButton" id="linktyp_internet">
<property name="label" translatable="yes">_Web</property>
@@ -41,7 +44,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -61,7 +63,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -88,8 +89,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">Tar_get</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">target</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -100,11 +103,11 @@
</child>
<child>
<object class="cuilo-SvxHyperURLBox" id="target">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">â¢</property>
- </object>
+ <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>
@@ -120,7 +123,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Open web browser, copy an URL, and paste it to Target field</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -134,9 +136,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="ypad">1</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">_Login name</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">login</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -150,8 +153,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">_Password</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">password</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -195,7 +200,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -234,6 +238,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hyperlink type</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
@@ -255,20 +262,23 @@
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="frame_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">F_rame</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">frame</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -282,8 +292,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">Te_xt</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">indication</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -297,8 +309,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">N_ame</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">name</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -344,8 +358,10 @@
<object class="GtkLabel" id="form_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">F_orm</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">form</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -374,7 +390,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Events</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">3</property>
@@ -419,6 +434,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Further settings</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
diff --git a/cui/uiconfig/ui/hyperlinkmailpage.ui b/cui/uiconfig/ui/hyperlinkmailpage.ui
index bf71384..f8b672a 100644
--- a/cui/uiconfig/ui/hyperlinkmailpage.ui
+++ b/cui/uiconfig/ui/hyperlinkmailpage.ui
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="HyperlinkMailPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">24</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
@@ -18,6 +20,7 @@
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
@@ -26,14 +29,14 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">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="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkRadioButton" id="linktyp_mail">
<property name="label" translatable="yes">_E-mail</property>
@@ -41,7 +44,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -61,7 +63,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -88,8 +89,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">Re_cipient</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">receiver</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -100,11 +103,11 @@
</child>
<child>
<object class="cuilo-SvxHyperURLBox" id="receiver">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">â¢</property>
- </object>
+ <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>
@@ -120,7 +123,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Data Sources...</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -134,9 +136,11 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="ypad">1</property>
<property name="label" translatable="yes">_Subject</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">subject</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -177,6 +181,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Mail & news</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
@@ -198,20 +205,23 @@
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="frame_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">F_rame</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">frame</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -225,8 +235,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">Te_xt</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">indication</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -240,8 +252,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">N_ame</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">name</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -282,13 +296,15 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="form_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">F_orm</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">form</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -317,7 +333,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Events</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">3</property>
@@ -362,6 +377,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Further settings</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
diff --git a/cui/uiconfig/ui/hyperlinknewdocpage.ui b/cui/uiconfig/ui/hyperlinknewdocpage.ui
index 9ac47cd..2d2933a 100644
--- a/cui/uiconfig/ui/hyperlinknewdocpage.ui
+++ b/cui/uiconfig/ui/hyperlinknewdocpage.ui
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="HyperlinkNewDocPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">24</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
@@ -18,6 +20,7 @@
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
@@ -26,14 +29,14 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">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="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkRadioButton" id="editnow">
<property name="label" translatable="yes">Edit _now</property>
@@ -41,7 +44,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -61,7 +63,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -88,8 +89,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">_File</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">path</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -100,11 +103,11 @@
</child>
<child>
<object class="cuilo-SvxHyperURLBox" id="path">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">â¢</property>
- </object>
+ <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>
@@ -120,7 +123,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Select Path</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -134,9 +136,11 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="ypad">1</property>
<property name="label" translatable="yes">File _type</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">types:border</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -178,6 +182,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">New document</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
@@ -199,20 +206,23 @@
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="frame_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">F_rame</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">frame</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -226,8 +236,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">Te_xt</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">indication</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -241,8 +253,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">N_ame</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">name</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -283,13 +297,14 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="form_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">F_orm</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">form</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -318,7 +333,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Events</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">3</property>
@@ -363,6 +377,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Further settings</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
commit 35ec23fa290c877153cbf832526fa4d051a6981d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 23 16:16:45 2014 +0100
rename and rework SetCtrlPos to SetCtrlStyle
Change-Id: I5720f5f27ea5e7e9eefb6bfb53c30a52146c689e
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index adc34ce..a66bf09 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -223,8 +223,7 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const OString& rID,
get(m_pIconCtrl, "icon_control");
get(m_pTabContainer, "tab");
- m_pIconCtrl->SetStyle (WB_3DLOOK | WB_ICON | WB_BORDER | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | WB_NODRAGSELECTION | WB_TABSTOP | WB_CLIPCHILDREN );
- SetCtrlPos();
+ SetCtrlStyle();
m_pIconCtrl->SetClickHdl ( LINK ( this, IconChoiceDialog , ChosePageHdl_Impl ) );
m_pIconCtrl->Show();
m_pIconCtrl->SetChoiceWithCursor ( true );
@@ -249,11 +248,8 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const OString& rID,
m_pCancelBtn->Show();
m_pHelpBtn->Show();
m_pResetBtn->Show();
-
- m_pIconCtrl->ArrangeIcons();
}
-
IconChoiceDialog ::~IconChoiceDialog ()
{
// save configuration at INI-Manager
@@ -352,13 +348,10 @@ void IconChoiceDialog::Paint( const Rectangle& rRect )
}
}
-void IconChoiceDialog::SetCtrlPos()
+void IconChoiceDialog::SetCtrlStyle()
{
- WinBits aWinBits = m_pIconCtrl->GetStyle ();
- aWinBits &= ~WB_ALIGN_TOP & ~WB_NOVSCROLL;
- aWinBits |= WB_ALIGN_LEFT | WB_NOHSCROLL;
- m_pIconCtrl->SetStyle ( aWinBits );
-
+ WinBits aWinBits = WB_3DLOOK | WB_ICON | WB_BORDER | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | WB_NODRAGSELECTION | WB_TABSTOP | WB_CLIPCHILDREN | WB_ALIGN_LEFT | WB_NOHSCROLL;
+ m_pIconCtrl->SetStyle(aWinBits);
m_pIconCtrl->ArrangeIcons();
}
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 5cac100..8bc677c 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -217,7 +217,7 @@ public :
const SfxItemSet* GetExampleSet() const { return pExampleSet; }
- void SetCtrlPos();
+ void SetCtrlStyle();
};
#endif // INCLUDED_CUI_SOURCE_INC_ICONCDLG_HXX
commit ea3fc1dd4a208823488867491cfff66072678a38
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 23 16:00:59 2014 +0100
unnecessary check before delete
Change-Id: Ie5793f910dd58e8930c2c2b27df00bd073c26f35
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 3ec07125..adc34ce 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -293,10 +293,8 @@ IconChoiceDialog ::~IconChoiceDialog ()
}
- if ( pRanges )
- delete pRanges;
- if ( pOutSet )
- delete pOutSet;
+ delete pRanges;
+ delete pOutSet;
}
/**********************************************************************
commit 88afb39fd1f22b87e56996057e13f3ebb3784483
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 23 16:00:04 2014 +0100
drop Resize
Change-Id: Ie8546cf0eb54888627dc2dfa47257de63b382f9d
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index f152ade..3ec07125 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -402,25 +402,9 @@ void IconChoiceDialog::ShowPage( sal_uInt16 nId )
/**********************************************************************
|
-| Resize Dialog
-|
-\**********************************************************************/
-void IconChoiceDialog::Resize()
-{
- Dialog::Resize ();
-
- if ( IsReallyVisible() )
- {
- m_pIconCtrl->ArrangeIcons();
- }
-}
-
-/**********************************************************************
-|
| select a page
|
\**********************************************************************/
-
IMPL_LINK_NOARG(IconChoiceDialog , ChosePageHdl_Impl)
{
sal_uLong nPos;
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 6bab742..5cac100 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -188,7 +188,6 @@ public :
virtual ~IconChoiceDialog ();
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
- virtual void Resize() SAL_OVERRIDE;
// interface
SvxIconChoiceCtrlEntry* AddTabPage(
commit c8512315ba88498fd184f7a0cbd2b63be3bc720b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 23 15:56:38 2014 +0100
drop SetPosSizePages
Change-Id: I9835a4660ac9a9633ad81fc228b0e53b01fc85bf
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index bbd8a52..f152ade 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -415,27 +415,6 @@ void IconChoiceDialog::Resize()
}
}
-void IconChoiceDialog::SetPosSizePages ( sal_uInt16 nId )
-{
- const Point aCtrlOffset ( LogicToPixel( Point( CTRLS_OFFSET, CTRLS_OFFSET ), MAP_APPFONT ) );
- IconChoicePageData* pData = GetPageData ( nId );
-
- if ( pData->pPage )
- {
- Size aOutSize ( GetOutputSizePixel() );
- Size aIconCtrlSize ( m_pIconCtrl->GetSizePixel() );
-
- Point aNewPagePos( aIconCtrlSize.Width() + (2*aCtrlOffset.X()),
- aCtrlOffset.X() );
- Size aNewPageSize( aOutSize.Width() - m_pIconCtrl->GetSizePixel().Width() -
- (3*aCtrlOffset.X()),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- (3*aCtrlOffset.X()) );
-
- pData->pPage->SetPosSizePixel ( aNewPagePos, aNewPageSize );
- }
-}
-
/**********************************************************************
|
| select a page
@@ -552,10 +531,6 @@ void IconChoiceDialog::ActivatePageImpl ()
else
pData->pPage = (pData->fnCreatePage)( m_pTabContainer, this, *CreateInputItemSet( mnCurrentPageId ) );
- //SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number(pData->nId) );
- //pData->pPage->SetUserData( GetViewOptUserItem( aTabPageOpt ) );
- SetPosSizePages ( pData->nId );
-
if ( pData->bOnDemand )
pData->pPage->Reset( (SfxItemSet &)pData->pPage->GetItemSet() );
else
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index b0e6408..6bab742 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -161,8 +161,6 @@ private :
void Start_Impl();
bool OK_Impl();
- void SetPosSizePages ( sal_uInt16 nId );
-
void FocusOnIcon ( sal_uInt16 nId );
protected :
commit f89ea2f4def2020f7c7b0782e21d701013dcc669
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 23 15:46:46 2014 +0100
strip SetPosSizeCtrls down to min required
Change-Id: I8c198f9d1b318b35e0dc6221291bb4a57805e3ae
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 0d47c7b..bbd8a52 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -250,7 +250,7 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const OString& rID,
m_pHelpBtn->Show();
m_pResetBtn->Show();
- SetPosSizeCtrls ( true );
+ m_pIconCtrl->ArrangeIcons();
}
@@ -361,7 +361,7 @@ void IconChoiceDialog::SetCtrlPos()
aWinBits |= WB_ALIGN_LEFT | WB_NOHSCROLL;
m_pIconCtrl->SetStyle ( aWinBits );
- SetPosSizeCtrls();
+ m_pIconCtrl->ArrangeIcons();
}
/**********************************************************************
@@ -405,97 +405,14 @@ void IconChoiceDialog::ShowPage( sal_uInt16 nId )
| Resize Dialog
|
\**********************************************************************/
-
-#define ICONCTRL_WIDTH_PIXEL 110
-
void IconChoiceDialog::Resize()
{
Dialog::Resize ();
if ( IsReallyVisible() )
{
- SetPosSizeCtrls ();
- }
-}
-
-void IconChoiceDialog::SetPosSizeCtrls ( bool bInit )
-{
- const Point aCtrlOffset ( LogicToPixel( Point( CTRLS_OFFSET, CTRLS_OFFSET ), MAP_APPFONT ) );
- Size aOutSize ( GetOutputSizePixel() );
-
-
- // Button-Defaults
-
- Size aDefaultButtonSize = LogicToPixel( Size( 50, 14 ), MAP_APPFONT );
-
- // Reset-Button
- Size aResetButtonSize ( bInit ? aDefaultButtonSize :
- m_pResetBtn->GetSizePixel () );
-
-
- // IconChoiceCtrl resizen & positionieren
-
- SvtTabAppearanceCfg aCfg;
- const long nDefaultWidth = (aCfg.GetScaleFactor() * ICONCTRL_WIDTH_PIXEL) / 100;
-
- Point aIconCtrlPos(aCtrlOffset);
- Size aNewIconCtrlSize( nDefaultWidth,
- aOutSize.Height()-(2*aCtrlOffset.X()) );
- m_pIconCtrl->SetPosSizePixel ( aIconCtrlPos, aNewIconCtrlSize );
- m_pIconCtrl->ArrangeIcons();
-
-
- // resize & position the pages
-
- for ( size_t i = 0; i < maPageList.size(); i++ )
- {
- IconChoicePageData* pData = maPageList[ i ];
-
- Point aNewPagePos( aNewIconCtrlSize.Width() + (2*CTRLS_OFFSET),
- CTRLS_OFFSET );
- Size aNewPageSize( aOutSize.Width() - aNewIconCtrlSize.Width() -
- (3*CTRLS_OFFSET),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- (3*CTRLS_OFFSET) );
-
- if ( pData->pPage )
- pData->pPage->SetPosSizePixel ( aNewPagePos, aNewPageSize );
+ m_pIconCtrl->ArrangeIcons();
}
-
-
- // position the buttons
- m_pResetBtn->SetPosSizePixel ( Point( aOutSize.Width() -
- aResetButtonSize.Width()-aCtrlOffset.X(),
- aOutSize.Height()-aResetButtonSize.Height()-
- aCtrlOffset.X() ),
- aResetButtonSize );
- // Help-Button
- Size aHelpButtonSize ( bInit ? aDefaultButtonSize :
- m_pHelpBtn->GetSizePixel () );
- m_pHelpBtn->SetPosSizePixel ( Point( aOutSize.Width()-aResetButtonSize.Width()-
- aHelpButtonSize.Width() -
- (2*aCtrlOffset.X()),
- aOutSize.Height()-aHelpButtonSize.Height()-
- aCtrlOffset.X() ),
- aHelpButtonSize );
- // Cancel-Button
- Size aCancelButtonSize ( bInit ? aDefaultButtonSize :
- m_pCancelBtn->GetSizePixel () );
- m_pCancelBtn->SetPosSizePixel ( Point( aOutSize.Width()-aCancelButtonSize.Width()-
- aResetButtonSize.Width()-aHelpButtonSize.Width()-
- (3*aCtrlOffset.X()),
- aOutSize.Height()-aCancelButtonSize.Height()-
- aCtrlOffset.X() ),
- aCancelButtonSize );
- // OK-Button
- Size aOKButtonSize ( bInit ? aDefaultButtonSize : m_pOKBtn->GetSizePixel () );
- m_pOKBtn->SetPosSizePixel ( Point( aOutSize.Width()-aOKButtonSize.Width()-
- aCancelButtonSize.Width()-aResetButtonSize.Width()-
- aHelpButtonSize.Width()-(4*aCtrlOffset.X()),
- aOutSize.Height()-aOKButtonSize.Height()-aCtrlOffset.X() ),
- aOKButtonSize );
-
- Invalidate();
}
void IconChoiceDialog::SetPosSizePages ( sal_uInt16 nId )
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 30effcc..b0e6408 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -161,7 +161,6 @@ private :
void Start_Impl();
bool OK_Impl();
- void SetPosSizeCtrls ( bool bInit = false );
void SetPosSizePages ( sal_uInt16 nId );
void FocusOnIcon ( sal_uInt16 nId );
diff --git a/cui/uiconfig/ui/hyperlinkdialog.ui b/cui/uiconfig/ui/hyperlinkdialog.ui
index b2757e4..d547d6e 100644
--- a/cui/uiconfig/ui/hyperlinkdialog.ui
+++ b/cui/uiconfig/ui/hyperlinkdialog.ui
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="HyperlinkDialog">
<property name="width_request">550</property>
<property name="height_request">400</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">5</property>
+ <property name="border_width">6</property>
<property name="title" translatable="yes">Hyperlink</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
@@ -27,8 +29,9 @@
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -44,7 +47,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -60,7 +62,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -76,7 +77,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
@@ -101,9 +101,10 @@
<property name="spacing">6</property>
<child>
<object class="cuilo-SvtIconChoiceCtrl" id="icon_control">
+ <property name="width_request">110</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
+ <property name="margin">0</property>
<property name="vexpand">True</property>
</object>
<packing>
commit 80bf2654d72995f6b13c5addcd7c5e89ec76b0d9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 23 15:34:02 2014 +0100
meChoicePos is always PosLeft, simplify
Change-Id: I40085b0db89484f0d24ecaccf910f4399198294d
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index a171fa9..0d47c7b 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -201,10 +201,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvtIconChoiceCtrl(Window *p
IconChoiceDialog::IconChoiceDialog ( Window* pParent, const OString& rID,
const OUString& rUIXMLDescription,
- const EIconChoicePos ePos,
const SfxItemSet *pItemSet )
: ModalDialog ( pParent, rID, rUIXMLDescription ),
- meChoicePos ( ePos ),
mnCurrentPageId ( USHRT_MAX ),
pSet ( pItemSet ),
@@ -226,7 +224,7 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const OString& rID,
get(m_pTabContainer, "tab");
m_pIconCtrl->SetStyle (WB_3DLOOK | WB_ICON | WB_BORDER | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | WB_NODRAGSELECTION | WB_TABSTOP | WB_CLIPCHILDREN );
- SetCtrlPos ( meChoicePos );
+ SetCtrlPos();
m_pIconCtrl->SetClickHdl ( LINK ( this, IconChoiceDialog , ChosePageHdl_Impl ) );
m_pIconCtrl->Show();
m_pIconCtrl->SetChoiceWithCursor ( true );
@@ -356,38 +354,14 @@ void IconChoiceDialog::Paint( const Rectangle& rRect )
}
}
-EIconChoicePos IconChoiceDialog::SetCtrlPos( const EIconChoicePos& rPos )
+void IconChoiceDialog::SetCtrlPos()
{
WinBits aWinBits = m_pIconCtrl->GetStyle ();
-
- switch ( meChoicePos )
- {
- case PosLeft :
- aWinBits &= ~WB_ALIGN_TOP & ~WB_NOVSCROLL;
- aWinBits |= WB_ALIGN_LEFT | WB_NOHSCROLL;
- break;
- case PosRight :
- aWinBits &= ~WB_ALIGN_TOP & ~WB_NOVSCROLL;
- aWinBits |= WB_ALIGN_LEFT | WB_NOHSCROLL;
- break;
- case PosTop :
- aWinBits &= ~WB_ALIGN_LEFT & ~WB_NOHSCROLL;
- aWinBits |= WB_ALIGN_TOP | WB_NOVSCROLL;
- break;
- case PosBottom :
- aWinBits &= ~WB_ALIGN_LEFT & ~WB_NOHSCROLL;
- aWinBits |= WB_ALIGN_TOP | WB_NOVSCROLL;
- break;
- }
+ aWinBits &= ~WB_ALIGN_TOP & ~WB_NOVSCROLL;
+ aWinBits |= WB_ALIGN_LEFT | WB_NOHSCROLL;
m_pIconCtrl->SetStyle ( aWinBits );
SetPosSizeCtrls();
-
-
- EIconChoicePos eOldPos = meChoicePos;
- meChoicePos = rPos;
-
- return eOldPos;
}
/**********************************************************************
@@ -433,7 +407,6 @@ void IconChoiceDialog::ShowPage( sal_uInt16 nId )
\**********************************************************************/
#define ICONCTRL_WIDTH_PIXEL 110
-#define ICONCTRL_HEIGHT_PIXEL 75
void IconChoiceDialog::Resize()
{
@@ -464,37 +437,10 @@ void IconChoiceDialog::SetPosSizeCtrls ( bool bInit )
SvtTabAppearanceCfg aCfg;
const long nDefaultWidth = (aCfg.GetScaleFactor() * ICONCTRL_WIDTH_PIXEL) / 100;
- const long nDefaultHeight = (aCfg.GetScaleFactor() * ICONCTRL_HEIGHT_PIXEL) / 100;
- Size aNewIconCtrlSize ( nDefaultWidth,
- aOutSize.Height()-(2*aCtrlOffset.X()) );
- Point aIconCtrlPos;
- switch ( meChoicePos )
- {
- case PosLeft :
- aIconCtrlPos = aCtrlOffset;
- aNewIconCtrlSize = Size ( nDefaultWidth,
- aOutSize.Height()-(2*aCtrlOffset.X()) );
- break;
- case PosRight :
- aIconCtrlPos = Point ( aOutSize.Width() - nDefaultWidth -
- aCtrlOffset.X(), aCtrlOffset.X() );
- aNewIconCtrlSize = Size ( nDefaultWidth,
- aOutSize.Height()-(2*aCtrlOffset.X()) );
- break;
- case PosTop :
- aIconCtrlPos = aCtrlOffset;
- aNewIconCtrlSize = Size ( aOutSize.Width()-(2*aCtrlOffset.X()),
- nDefaultHeight );
- break;
- case PosBottom :
- aIconCtrlPos = Point ( aCtrlOffset.X(), aOutSize.Height() -
- aResetButtonSize.Height() - (2*aCtrlOffset.X()) -
- nDefaultHeight );
- aNewIconCtrlSize = Size ( aOutSize.Width()-(2*aCtrlOffset.X()),
- nDefaultHeight );
- break;
- }
+ Point aIconCtrlPos(aCtrlOffset);
+ Size aNewIconCtrlSize( nDefaultWidth,
+ aOutSize.Height()-(2*aCtrlOffset.X()) );
m_pIconCtrl->SetPosSizePixel ( aIconCtrlPos, aNewIconCtrlSize );
m_pIconCtrl->ArrangeIcons();
@@ -505,39 +451,12 @@ void IconChoiceDialog::SetPosSizeCtrls ( bool bInit )
{
IconChoicePageData* pData = maPageList[ i ];
- Point aNewPagePos;
- Size aNewPageSize;
- switch ( meChoicePos )
- {
- case PosLeft :
- aNewPagePos = Point ( aNewIconCtrlSize.Width() + (2*CTRLS_OFFSET),
- CTRLS_OFFSET );
- aNewPageSize = Size ( aOutSize.Width() - aNewIconCtrlSize.Width() -
- (3*CTRLS_OFFSET),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- (3*CTRLS_OFFSET) );
- break;
- case PosRight :
- aNewPagePos = aCtrlOffset;
- aNewPageSize = Size ( aOutSize.Width() - aNewIconCtrlSize.Width() -
- (3*aCtrlOffset.X()),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- (3*aCtrlOffset.X()) );
- break;
- case PosTop :
- aNewPagePos = Point ( aCtrlOffset.X(), aNewIconCtrlSize.Height() +
- (2*aCtrlOffset.X()) );
- aNewPageSize = Size ( aOutSize.Width() - (2*aCtrlOffset.X()),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- aNewIconCtrlSize.Height() - (4*aCtrlOffset.X()) );
- break;
- case PosBottom :
- aNewPagePos = aCtrlOffset;
- aNewPageSize = Size ( aOutSize.Width() - (2*aCtrlOffset.X()),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- aNewIconCtrlSize.Height() - (4*aCtrlOffset.X()) );
- break;
- }
+ Point aNewPagePos( aNewIconCtrlSize.Width() + (2*CTRLS_OFFSET),
+ CTRLS_OFFSET );
+ Size aNewPageSize( aOutSize.Width() - aNewIconCtrlSize.Width() -
+ (3*CTRLS_OFFSET),
+ aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
+ (3*CTRLS_OFFSET) );
if ( pData->pPage )
pData->pPage->SetPosSizePixel ( aNewPagePos, aNewPageSize );
@@ -545,12 +464,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( bool bInit )
// position the buttons
-
- sal_uLong nXOffset=0;
- if ( meChoicePos == PosRight )
- nXOffset = aNewIconCtrlSize.Width()+(2*aCtrlOffset.X());
-
- m_pResetBtn->SetPosSizePixel ( Point( aOutSize.Width() - nXOffset -
+ m_pResetBtn->SetPosSizePixel ( Point( aOutSize.Width() -
aResetButtonSize.Width()-aCtrlOffset.X(),
aOutSize.Height()-aResetButtonSize.Height()-
aCtrlOffset.X() ),
@@ -559,7 +473,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( bool bInit )
Size aHelpButtonSize ( bInit ? aDefaultButtonSize :
m_pHelpBtn->GetSizePixel () );
m_pHelpBtn->SetPosSizePixel ( Point( aOutSize.Width()-aResetButtonSize.Width()-
- aHelpButtonSize.Width()- nXOffset -
+ aHelpButtonSize.Width() -
(2*aCtrlOffset.X()),
aOutSize.Height()-aHelpButtonSize.Height()-
aCtrlOffset.X() ),
@@ -569,7 +483,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( bool bInit )
m_pCancelBtn->GetSizePixel () );
m_pCancelBtn->SetPosSizePixel ( Point( aOutSize.Width()-aCancelButtonSize.Width()-
aResetButtonSize.Width()-aHelpButtonSize.Width()-
- (3*aCtrlOffset.X()) - nXOffset,
+ (3*aCtrlOffset.X()),
aOutSize.Height()-aCancelButtonSize.Height()-
aCtrlOffset.X() ),
aCancelButtonSize );
@@ -577,7 +491,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( bool bInit )
Size aOKButtonSize ( bInit ? aDefaultButtonSize : m_pOKBtn->GetSizePixel () );
m_pOKBtn->SetPosSizePixel ( Point( aOutSize.Width()-aOKButtonSize.Width()-
aCancelButtonSize.Width()-aResetButtonSize.Width()-
- aHelpButtonSize.Width()-(4*aCtrlOffset.X())- nXOffset,
+ aHelpButtonSize.Width()-(4*aCtrlOffset.X()),
aOutSize.Height()-aOKButtonSize.Height()-aCtrlOffset.X() ),
aOKButtonSize );
@@ -594,39 +508,12 @@ void IconChoiceDialog::SetPosSizePages ( sal_uInt16 nId )
Size aOutSize ( GetOutputSizePixel() );
Size aIconCtrlSize ( m_pIconCtrl->GetSizePixel() );
- Point aNewPagePos;
- Size aNewPageSize;
- switch ( meChoicePos )
- {
- case PosLeft :
- aNewPagePos = Point ( aIconCtrlSize.Width() + (2*aCtrlOffset.X()),
- aCtrlOffset.X() );
- aNewPageSize = Size ( aOutSize.Width() - m_pIconCtrl->GetSizePixel().Width() -
- (3*aCtrlOffset.X()),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- (3*aCtrlOffset.X()) );
- break;
- case PosRight :
- aNewPagePos = aCtrlOffset;
- aNewPageSize = Size ( aOutSize.Width() - m_pIconCtrl->GetSizePixel().Width() -
- (3*aCtrlOffset.X()),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- (3*aCtrlOffset.X()) );
- break;
- case PosTop :
- aNewPagePos = Point ( aCtrlOffset.X(), aIconCtrlSize.Height() +
- (2*aCtrlOffset.X()) );
- aNewPageSize = Size ( aOutSize.Width() - (2*aCtrlOffset.X()),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- m_pIconCtrl->GetSizePixel().Height() - (4*aCtrlOffset.X()) );
- break;
- case PosBottom :
- aNewPagePos = aCtrlOffset;
- aNewPageSize = Size ( aOutSize.Width() - (2*aCtrlOffset.X()),
- aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
- m_pIconCtrl->GetSizePixel().Height() - (4*aCtrlOffset.X()) );
- break;
- }
+ Point aNewPagePos( aIconCtrlSize.Width() + (2*aCtrlOffset.X()),
+ aCtrlOffset.X() );
+ Size aNewPageSize( aOutSize.Width() - m_pIconCtrl->GetSizePixel().Width() -
+ (3*aCtrlOffset.X()),
+ aOutSize.Height() - m_pOKBtn->GetSizePixel().Height() -
+ (3*aCtrlOffset.X()) );
pData->pPage->SetPosSizePixel ( aNewPagePos, aNewPageSize );
}
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 576ddbe..30effcc 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -44,9 +44,6 @@ class IconChoicePage;
typedef IconChoicePage* (*CreatePage)(Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet &rAttrSet);
typedef const sal_uInt16* (*GetPageRanges)(); // gives international Which-value
-// position of iconchoicectrl
-enum EIconChoicePos { PosLeft, PosRight, PosTop, PosBottom };
-
/// Data-structure for pages in dialog
struct IconChoicePageData
{
@@ -129,7 +126,6 @@ class IconChoiceDialog : public ModalDialog
private :
friend class IconChoicePage;
- EIconChoicePos meChoicePos;
::std::vector< IconChoicePageData* > maPageList;
SvtIconChoiceCtrl *m_pIconCtrl;
@@ -191,7 +187,7 @@ public :
// the IconChoiceCtrl's could also be set in the Ctor
IconChoiceDialog ( Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
- const EIconChoicePos ePos = PosLeft, const SfxItemSet * pItemSet = 0 );
+ const SfxItemSet * pItemSet = 0 );
virtual ~IconChoiceDialog ();
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
@@ -225,7 +221,7 @@ public :
const SfxItemSet* GetExampleSet() const { return pExampleSet; }
- EIconChoicePos SetCtrlPos ( const EIconChoicePos& rPos );
+ void SetCtrlPos();
};
#endif // INCLUDED_CUI_SOURCE_INC_ICONCDLG_HXX
commit 360796b491d9e05f1438e97c88f15ad0f1cda281
Author: Szymon KÅos <eszkadev at gmail.com>
Date: Sun Jun 22 12:24:33 2014 +0200
RID_SVXDLG_NEWHYPERLINK conversion to .ui
Conflicts:
cui/UIConfig_cui.mk
Change-Id: I8f06518f2d84e333b553c247ca3d9a28d1280eea
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index d150fb6..124c909 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -70,7 +70,12 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/hangulhanjaadddialog \
cui/uiconfig/ui/hangulhanjaoptdialog \
cui/uiconfig/ui/hatchpage \
+ cui/uiconfig/ui/hyperlinkdialog \
+ cui/uiconfig/ui/hyperlinkdocpage \
+ cui/uiconfig/ui/hyperlinkinternetpage \
cui/uiconfig/ui/hyperlinkmarkdialog \
+ cui/uiconfig/ui/hyperlinkmailpage \
+ cui/uiconfig/ui/hyperlinknewdocpage \
cui/uiconfig/ui/hyphenate \
cui/uiconfig/ui/insertfloatingframe \
cui/uiconfig/ui/insertoleobject \
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 45ec57a..97f5485 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -24,7 +24,6 @@
#include "hlmailtp.hxx"
#include "hldoctp.hxx"
#include "hldocntp.hxx"
-#include "hyperdlg.hrc"
#include <svx/svxids.hrc>
using ::com::sun::star::uno::Reference;
@@ -83,7 +82,7 @@ void SvxHlinkCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
|************************************************************************/
SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings)
-: IconChoiceDialog( pParent, CUI_RES ( RID_SVXDLG_NEWHYPERLINK ) ),
+: IconChoiceDialog( pParent, "HyperlinkDialog", "cui/ui/hyperlinkdialog.ui" ),
maCtrl ( SID_HYPERLINK_GETLINK, *pBindings, this ),
mpBindings ( pBindings ),
mbReadOnly ( false ),
@@ -112,6 +111,7 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings)
aImage = Image( CUI_RES ( RID_SVXBMP_HLDOCNTP ) );
pEntry = AddTabPage ( RID_SVXPAGE_HYPERLINK_NEWDOCUMENT, aStrTitle, aImage, SvxHyperlinkNewDocTp::Create );
pEntry->SetQuickHelpText( CUI_RESSTR( RID_SVXSTR_HYPERDLG_HLDOCNTP_HELP ) );
+ SetCurPageId(RID_SVXPAGE_HYPERLINK_INTERNET);
// create itemset for tabpages
mpItemSet = new SfxItemSet( SFX_APP()->GetPool(), SID_HYPERLINK_GETLINK,
@@ -301,14 +301,18 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
mbIsHTMLDoc = (pItem->GetInsertMode() & HLINK_HTMLMODE) ? true : false;
- SfxItemSet& aPageSet = (SfxItemSet&)GetTabPage (nPageId)->GetItemSet ();
- aPageSet.Put ( *pItem );
-
- pCurrentPage->Reset( aPageSet );
- if ( mbGrabFocus )
+ IconChoicePage* pPage = GetTabPage (nPageId);
+ if(pPage)
{
- pCurrentPage->SetInitFocus(); // #92535# grab the focus only once at initialization
- mbGrabFocus = false;
+ SfxItemSet& aPageSet = (SfxItemSet&)pPage->GetItemSet ();
+ aPageSet.Put ( *pItem );
+
+ pCurrentPage->Reset( aPageSet );
+ if ( mbGrabFocus )
+ {
+ pCurrentPage->SetInitFocus(); // #92535# grab the focus only once at initialization
+ mbGrabFocus = false;
+ }
}
return nPageId;
}
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index c04c81c..39bc47b 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -33,7 +33,6 @@
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/ucbhelper.hxx>
-#include "hyperdlg.hrc"
#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
@@ -84,9 +83,9 @@ bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OUStri
}
if ( bIsValidURL )
{
- sal_Int32 nPos = maLbDocTypes.GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbDocTypes->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- aURLObject.SetExtension( ((DocumentTypeData*)maLbDocTypes.GetEntryData( nPos ))->aStrExt );
+ aURLObject.SetExtension( ((DocumentTypeData*)m_pLbDocTypes->GetEntryData( nPos ))->aStrExt );
}
}
@@ -99,47 +98,41 @@ bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OUStri
|*
|************************************************************************/
-SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& rItemSet)
-: SvxHyperlinkTabPageBase ( pParent, CUI_RES( RID_SVXPAGE_HYPERLINK_NEWDOCUMENT ), rItemSet ),
- maGrpNewDoc ( this, CUI_RES (GRP_NEWDOCUMENT) ),
- maRbtEditNow ( this, CUI_RES (RB_EDITNOW) ),
- maRbtEditLater ( this, CUI_RES (RB_EDITLATER) ),
- maFtPath ( this, CUI_RES (FT_PATH_NEWDOC) ),
- maCbbPath ( this, INET_PROT_FILE ),
- maBtCreate ( this, CUI_RES (BTN_CREATE) ),
- maFtDocTypes ( this, CUI_RES (FT_DOCUMENT_TYPES) ),
- maLbDocTypes ( this, CUI_RES (LB_DOCUMENT_TYPES) )
+SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet)
+: SvxHyperlinkTabPageBase ( pParent, pDlg, "HyperlinkNewDocPage", "cui/ui/hyperlinknewdocpage.ui", rItemSet )
{
+ get(m_pRbtEditNow, "editnow");
+ get(m_pRbtEditLater, "editlater");
+ get(m_pCbbPath, "path");
+ m_pCbbPath->SetSmartProtocol(INET_PROT_FILE);
+ get(m_pBtCreate, "create");
+ m_pBtCreate->SetModeImage(Image(CUI_RES(RID_SVXBMP_NEWDOC)));
+ get(m_pLbDocTypes, "types");
+
// Set HC bitmaps and disable display of bitmap names.
- maBtCreate.EnableTextDisplay (false);
+ m_pBtCreate->EnableTextDisplay (false);
InitStdControls();
- FreeResource();
SetExchangeSupport ();
- maCbbPath.SetPosSizePixel ( LogicToPixel( Point( COL_2 , 25 ), MAP_APPFONT ),
- LogicToPixel( Size ( 176 - COL_DIFF, 60), MAP_APPFONT ) );
- maCbbPath.Show();
- maCbbPath.SetBaseURL(SvtPathOptions().GetWorkPath());
+ m_pCbbPath->Show();
+ m_pCbbPath->SetBaseURL(SvtPathOptions().GetWorkPath());
// set defaults
- maRbtEditNow.Check();
-
- maBtCreate.SetClickHdl ( LINK ( this, SvxHyperlinkNewDocTp, ClickNewHdl_Impl ) );
+ m_pRbtEditNow->Check();
- maBtCreate.SetAccessibleRelationMemberOf( &maGrpNewDoc );
- maBtCreate.SetAccessibleRelationLabeledBy( &maFtPath );
+ m_pBtCreate->SetClickHdl ( LINK ( this, SvxHyperlinkNewDocTp, ClickNewHdl_Impl ) );
FillDocumentList ();
}
SvxHyperlinkNewDocTp::~SvxHyperlinkNewDocTp ()
{
- for ( sal_uInt16 n=0; n<maLbDocTypes.GetEntryCount(); n++ )
+ for ( sal_uInt16 n=0; n<m_pLbDocTypes->GetEntryCount(); n++ )
{
DocumentTypeData* pTypeData = (DocumentTypeData*)
- maLbDocTypes.GetEntryData ( n );
+ m_pLbDocTypes->GetEntryData ( n );
delete pTypeData;
}
}
@@ -200,14 +193,14 @@ void SvxHyperlinkNewDocTp::FillDocumentList ()
OUString aTitleName( aTitle );
aTitleName = aTitleName.replaceFirst( "~", "" );
- sal_Int16 nPos = maLbDocTypes.InsertEntry ( aTitleName );
+ sal_Int16 nPos = m_pLbDocTypes->InsertEntry ( aTitleName );
OUString aStrDefExt( pFilter->GetDefaultExtension () );
DocumentTypeData *pTypeData = new DocumentTypeData ( aDocumentUrl, aStrDefExt.copy( 2 ) );
- maLbDocTypes.SetEntryData ( nPos, pTypeData );
+ m_pLbDocTypes->SetEntryData ( nPos, pTypeData );
}
}
}
- maLbDocTypes.SelectEntryPos ( 0 );
+ m_pLbDocTypes->SelectEntryPos ( 0 );
LeaveWait();
}
@@ -223,9 +216,9 @@ void SvxHyperlinkNewDocTp::GetCurentItemData ( OUString& rStrURL, OUString& aStr
SvxLinkInsertMode& eMode )
{
// get data from dialog-controls
- rStrURL = maCbbPath.GetText();
+ rStrURL = m_pCbbPath->GetText();
INetURLObject aURL;
- if ( ImplGetURLObject( rStrURL, maCbbPath.GetBaseURL(), aURL ) )
+ if ( ImplGetURLObject( rStrURL, m_pCbbPath->GetBaseURL(), aURL ) )
{
rStrURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
}
@@ -239,9 +232,9 @@ void SvxHyperlinkNewDocTp::GetCurentItemData ( OUString& rStrURL, OUString& aStr
|*
|************************************************************************/
-IconChoicePage* SvxHyperlinkNewDocTp::Create( Window* pWindow, const SfxItemSet& rItemSet )
+IconChoicePage* SvxHyperlinkNewDocTp::Create( Window* pWindow, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet )
{
- return( new SvxHyperlinkNewDocTp( pWindow, rItemSet ) );
+ return( new SvxHyperlinkNewDocTp( pWindow, pDlg, rItemSet ) );
}
/*************************************************************************
@@ -252,7 +245,7 @@ IconChoicePage* SvxHyperlinkNewDocTp::Create( Window* pWindow, const SfxItemSet&
void SvxHyperlinkNewDocTp::SetInitFocus()
{
- maCbbPath.GrabFocus();
+ m_pCbbPath->GrabFocus();
}
/*************************************************************************
@@ -264,7 +257,7 @@ void SvxHyperlinkNewDocTp::SetInitFocus()
bool SvxHyperlinkNewDocTp::AskApply()
{
INetURLObject aINetURLObject;
- bool bRet = ImplGetURLObject( maCbbPath.GetText(), maCbbPath.GetBaseURL(), aINetURLObject );
+ bool bRet = ImplGetURLObject( m_pCbbPath->GetText(), m_pCbbPath->GetBaseURL(), aINetURLObject );
if ( !bRet )
{
WarningBox aWarning( this, WB_OK, CUI_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) );
@@ -284,7 +277,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
EnterWait();
// get data from dialog-controls
- OUString aStrNewName = maCbbPath.GetText();
+ OUString aStrNewName = m_pCbbPath->GetText();
if ( aStrNewName == aEmptyStr )
aStrNewName = maStrInitURL;
@@ -293,7 +286,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
// create a real URL-String
INetURLObject aURL;
- if ( ImplGetURLObject( aStrNewName, maCbbPath.GetBaseURL(), aURL ) )
+ if ( ImplGetURLObject( aStrNewName, m_pCbbPath->GetBaseURL(), aURL ) )
{
@@ -330,11 +323,11 @@ void SvxHyperlinkNewDocTp::DoApply ()
if ( aStrNewName != aEmptyStr )
{
// get private-url
- sal_Int32 nPos = maLbDocTypes.GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbDocTypes->GetSelectEntryPos();
if( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos=0;
OUString aStrDocName ( ( ( DocumentTypeData* )
- maLbDocTypes.GetEntryData( nPos ) )->aStrURL );
+ m_pLbDocTypes->GetEntryData( nPos ) )->aStrURL );
// create items
SfxStringItem aName( SID_FILE_NAME, aStrDocName );
@@ -342,7 +335,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
SfxStringItem aFrame( SID_TARGETNAME, OUString("_blank") );
OUString aStrFlags('S');
- if ( maRbtEditLater.IsChecked() )
+ if ( m_pRbtEditLater->IsChecked() )
{
aStrFlags += OUString('H');
}
@@ -371,7 +364,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
}
}
- if ( maRbtEditNow.IsChecked() && pCurrentDocFrame )
+ if ( m_pRbtEditNow->IsChecked() && pCurrentDocFrame )
{
pCurrentDocFrame->ToTop();
}
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list