summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-05-16 11:29:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-05-16 14:33:40 +0100
commit545e810da6758f78de45a00374877bd091dc051f (patch)
treefb8985102bbe63d5f74653a035d582cf667cd9bb /cui
parentb1415411a1f0f3ad5ad4c0f7b2600fb5ba1e6f82 (diff)
convert proxy page to .ui
Change-Id: I61db7bf0def96209a85656128188f85899b72292
Diffstat (limited to 'cui')
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/inc/helpid.hrc1
-rw-r--r--cui/source/options/optinet2.cxx258
-rw-r--r--cui/source/options/optinet2.hrc20
-rw-r--r--cui/source/options/optinet2.hxx51
-rw-r--r--cui/source/options/optinet2.src151
-rw-r--r--cui/uiconfig/ui/optproxypage.ui304
7 files changed, 436 insertions, 350 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 25fbc0c3e7b1..c065510f6e22 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optmemorypage \
cui/uiconfig/ui/optonlineupdatepage \
cui/uiconfig/ui/optpathspage \
+ cui/uiconfig/ui/optproxypage \
cui/uiconfig/ui/optsavepage \
cui/uiconfig/ui/optsecuritypage \
cui/uiconfig/ui/optuserpage \
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index c2cd4a96759d..5991d1dc01ad 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -29,7 +29,6 @@
#define HID_OPTIONS_DICT_EDIT "CUI_HID_OPTIONS_DICT_EDIT"
#define HID_OPTIONS_CHART_DEFCOLORS "CUI_HID_OPTIONS_CHART_DEFCOLORS"
#define HID_OPTIONS_CTL "CUI_HID_OPTIONS_CTL"
-#define HID_OPTIONS_PROXY "CUI_HID_OPTIONS_PROXY"
#define HID_OPTIONS_ASIAN_LAYOUT "CUI_HID_OPTIONS_ASIAN_LAYOUT"
#define HID_CLB_EDIT_MODULES_DICS "CUI_HID_CLB_EDIT_MODULES_DICS"
#define HID_CLB_EDIT_MODULES_MODULES "CUI_HID_CLB_EDIT_MODULES_MODULES"
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 9ceec029996b..261058eaf2f3 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -99,6 +99,11 @@ using namespace ::sfx2;
// -----------------------------------------------------------------------
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxNoSpaceEdit(Window *pParent, VclBuilder::stringmap &)
+{
+ return new SvxNoSpaceEdit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK);
+}
+
void SvxNoSpaceEdit::KeyInput( const KeyEvent& rKEvent )
{
if ( bOnlyNumeric )
@@ -136,57 +141,60 @@ void SvxNoSpaceEdit::Modify()
}
}
+bool SvxNoSpaceEdit::set_property(const OString &rKey, const OString &rValue)
+{
+ if (rKey == "only-numeric")
+ bOnlyNumeric = toBool(rValue);
+ else
+ return Edit::set_property(rKey, rValue);
+ return true;
+}
+
+
/********************************************************************/
/* */
/* SvxProxyTabPage */
/* */
/********************************************************************/
-SvxProxyTabPage::SvxProxyTabPage(Window* pParent, const SfxItemSet& rSet ) :
- SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_INET_PROXY ), rSet ),
- aOptionGB (this, CUI_RES(GB_SETTINGS)),
-
- aProxyModeFT (this, CUI_RES(FT_PROXYMODE)),
- aProxyModeLB (this, CUI_RES(LB_PROXYMODE)),
-
- aHttpProxyFT (this, CUI_RES( FT_HTTP_PROXY )),
- aHttpProxyED (this, CUI_RES( ED_HTTP_PROXY )),
- aHttpPortFT (this, CUI_RES( FT_HTTP_PORT )),
- aHttpPortED (this, CUI_RES( ED_HTTP_PORT ), sal_True),
-
- aHttpsProxyFT (this, CUI_RES( FT_HTTPS_PROXY )),
- aHttpsProxyED (this, CUI_RES( ED_HTTPS_PROXY )),
- aHttpsPortFT (this, CUI_RES( FT_HTTPS_PORT )),
- aHttpsPortED (this, CUI_RES( ED_HTTPS_PORT ), sal_True),
-
- aFtpProxyFT (this, CUI_RES( FT_FTP_PROXY )),
- aFtpProxyED (this, CUI_RES( ED_FTP_PROXY )),
- aFtpPortFT (this, CUI_RES( FT_FTP_PORT )),
- aFtpPortED (this, CUI_RES( ED_FTP_PORT ), sal_True),
-
- aNoProxyForFT (this, CUI_RES( FT_NOPROXYFOR )),
- aNoProxyForED (this, CUI_RES( ED_NOPROXYFOR )),
- aNoProxyDescFT (this, CUI_RES( ED_NOPROXYDESC )),
- aProxyModePN("ooInetProxyType"),
- aHttpProxyPN("ooInetHTTPProxyName"),
- aHttpPortPN("ooInetHTTPProxyPort"),
- aHttpsProxyPN("ooInetHTTPSProxyName"),
- aHttpsPortPN("ooInetHTTPSProxyPort"),
- aFtpProxyPN("ooInetFTPProxyName"),
- aFtpPortPN("ooInetFTPProxyPort"),
- aNoProxyDescPN("ooInetNoProxy")
+SvxProxyTabPage::SvxProxyTabPage(Window* pParent, const SfxItemSet& rSet)
+ : SfxTabPage(pParent, "OptProxyPage","cui/ui/optproxypage.ui", rSet)
+ , aProxyModePN("ooInetProxyType")
+ , aHttpProxyPN("ooInetHTTPProxyName")
+ , aHttpPortPN("ooInetHTTPProxyPort")
+ , aHttpsProxyPN("ooInetHTTPSProxyName")
+ , aHttpsPortPN("ooInetHTTPSProxyPort")
+ , aFtpProxyPN("ooInetFTPProxyName")
+ , aFtpPortPN("ooInetFTPProxyPort")
+ , aNoProxyDescPN("ooInetNoProxy")
{
- FreeResource();
+ get(m_pProxyModeLB, "proxymode");
+
+ get(m_pHttpProxyFT, "httpft");
+ get(m_pHttpProxyED, "http");
+ get(m_pHttpPortFT, "httpportft");
+ get(m_pHttpPortED, "httpport");
+
+ get(m_pHttpsProxyFT, "httpsft");
+ get(m_pHttpsProxyED, "https");
+ get(m_pHttpsPortFT, "httpsportft");
+ get(m_pHttpsPortED, "httpsport");
+
+ get(m_pFtpProxyFT, "ftpft");
+ get(m_pFtpProxyED, "ftp");
+ get(m_pFtpPortFT, "ftpportft");
+ get(m_pFtpPortED, "ftpport");
+
+ get(m_pNoProxyForFT, "noproxyft");
+ get(m_pNoProxyForED, "noproxy");
+ get(m_pNoProxyDescFT, "noproxydesc");
- aHttpPortED.SetMaxTextLen(5);
- aHttpsPortED.SetMaxTextLen(5);
- aFtpPortED.SetMaxTextLen(5);
Link aLink = LINK( this, SvxProxyTabPage, LoseFocusHdl_Impl );
- aHttpPortED.SetLoseFocusHdl( aLink );
- aHttpsPortED.SetLoseFocusHdl( aLink );
- aFtpPortED.SetLoseFocusHdl( aLink );
+ m_pHttpPortED->SetLoseFocusHdl( aLink );
+ m_pHttpsPortED->SetLoseFocusHdl( aLink );
+ m_pFtpPortED->SetLoseFocusHdl( aLink );
- aProxyModeLB.SetSelectHdl(LINK( this, SvxProxyTabPage, ProxyHdl_Impl ));
+ m_pProxyModeLB->SetSelectHdl(LINK( this, SvxProxyTabPage, ProxyHdl_Impl ));
Reference< com::sun::star::lang::XMultiServiceFactory >
xConfigurationProvider(
@@ -205,8 +213,6 @@ SvxProxyTabPage::SvxProxyTabPage(Window* pParent, const SfxItemSet& rSet ) :
m_xConfigurationUpdateAccess = xConfigurationProvider->createInstanceWithArguments(
OUString( "com.sun.star.configuration.ConfigurationUpdateAccess" ),
aArgumentList );
-
- ArrangeControls_Impl();
}
SvxProxyTabPage::~SvxProxyTabPage()
@@ -228,42 +234,42 @@ void SvxProxyTabPage::ReadConfigData_Impl()
if( xNameAccess->getByName(aProxyModePN) >>= nIntValue )
{
- aProxyModeLB.SelectEntryPos( (sal_uInt16) nIntValue );
+ m_pProxyModeLB->SelectEntryPos( (sal_uInt16) nIntValue );
}
if( xNameAccess->getByName(aHttpProxyPN) >>= aStringValue )
{
- aHttpProxyED.SetText( aStringValue );
+ m_pHttpProxyED->SetText( aStringValue );
}
if( xNameAccess->getByName(aHttpPortPN) >>= nIntValue )
{
- aHttpPortED.SetText( OUString::number( nIntValue ));
+ m_pHttpPortED->SetText( OUString::number( nIntValue ));
}
if( xNameAccess->getByName(aHttpsProxyPN) >>= aStringValue )
{
- aHttpsProxyED.SetText( aStringValue );
+ m_pHttpsProxyED->SetText( aStringValue );
}
if( xNameAccess->getByName(aHttpsPortPN) >>= nIntValue )
{
- aHttpsPortED.SetText( OUString::number( nIntValue ));
+ m_pHttpsPortED->SetText( OUString::number( nIntValue ));
}
if( xNameAccess->getByName(aFtpProxyPN) >>= aStringValue )
{
- aFtpProxyED.SetText( aStringValue );
+ m_pFtpProxyED->SetText( aStringValue );
}
if( xNameAccess->getByName(aFtpPortPN) >>= nIntValue )
{
- aFtpPortED.SetText( OUString::number( nIntValue ));
+ m_pFtpPortED->SetText( OUString::number( nIntValue ));
}
if( xNameAccess->getByName(aNoProxyDescPN) >>= aStringValue )
{
- aNoProxyForED.SetText( aStringValue );
+ m_pNoProxyForED->SetText( aStringValue );
}
}
@@ -292,37 +298,37 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl()
if( xPropertyState->getPropertyDefault(aHttpProxyPN) >>= aStringValue )
{
- aHttpProxyED.SetText( aStringValue );
+ m_pHttpProxyED->SetText( aStringValue );
}
if( xPropertyState->getPropertyDefault(aHttpPortPN) >>= nIntValue )
{
- aHttpPortED.SetText( OUString::number( nIntValue ));
+ m_pHttpPortED->SetText( OUString::number( nIntValue ));
}
if( xPropertyState->getPropertyDefault(aHttpsProxyPN) >>= aStringValue )
{
- aHttpsProxyED.SetText( aStringValue );
+ m_pHttpsProxyED->SetText( aStringValue );
}
if( xPropertyState->getPropertyDefault(aHttpsPortPN) >>= nIntValue )
{
- aHttpsPortED.SetText( OUString::number( nIntValue ));
+ m_pHttpsPortED->SetText( OUString::number( nIntValue ));
}
if( xPropertyState->getPropertyDefault(aFtpProxyPN) >>= aStringValue )
{
- aFtpProxyED.SetText( aStringValue );
+ m_pFtpProxyED->SetText( aStringValue );
}
if( xPropertyState->getPropertyDefault(aFtpPortPN) >>= nIntValue )
{
- aFtpPortED.SetText( OUString::number( nIntValue ));
+ m_pFtpPortED->SetText( OUString::number( nIntValue ));
}
if( xPropertyState->getPropertyDefault(aNoProxyDescPN) >>= aStringValue )
{
- aNoProxyForED.SetText( aStringValue );
+ m_pNoProxyForED->SetText( aStringValue );
}
}
catch (const beans::UnknownPropertyException &)
@@ -378,16 +384,16 @@ void SvxProxyTabPage::Reset(const SfxItemSet&)
{
ReadConfigData_Impl();
- aProxyModeLB.SaveValue();
- aHttpProxyED.SaveValue();
- aHttpPortED.SaveValue();
- aHttpsProxyED.SaveValue();
- aHttpsPortED.SaveValue();
- aFtpProxyED.SaveValue();
- aFtpPortED.SaveValue();
- aNoProxyForED.SaveValue();
+ m_pProxyModeLB->SaveValue();
+ m_pHttpProxyED->SaveValue();
+ m_pHttpPortED->SaveValue();
+ m_pHttpsProxyED->SaveValue();
+ m_pHttpsPortED->SaveValue();
+ m_pFtpProxyED->SaveValue();
+ m_pFtpPortED->SaveValue();
+ m_pNoProxyForED->SaveValue();
- EnableControls_Impl( aProxyModeLB.GetSelectEntryPos() == 2 );
+ EnableControls_Impl( m_pProxyModeLB->GetSelectEntryPos() == 2 );
}
sal_Bool SvxProxyTabPage::FillItemSet(SfxItemSet& )
@@ -397,8 +403,8 @@ sal_Bool SvxProxyTabPage::FillItemSet(SfxItemSet& )
try {
Reference< beans::XPropertySet > xPropertySet(m_xConfigurationUpdateAccess, UNO_QUERY_THROW );
- sal_uInt16 nSelPos = aProxyModeLB.GetSelectEntryPos();
- if(aProxyModeLB.GetSavedValue() != nSelPos)
+ sal_uInt16 nSelPos = m_pProxyModeLB->GetSelectEntryPos();
+ if(m_pProxyModeLB->GetSavedValue() != nSelPos)
{
if( nSelPos == 1 )
{
@@ -411,45 +417,45 @@ sal_Bool SvxProxyTabPage::FillItemSet(SfxItemSet& )
bModified = sal_True;
}
- if(aHttpProxyED.GetSavedValue() != aHttpProxyED.GetText())
+ if(m_pHttpProxyED->GetSavedValue() != m_pHttpProxyED->GetText())
{
- xPropertySet->setPropertyValue( aHttpProxyPN, makeAny(aHttpProxyED.GetText()));
+ xPropertySet->setPropertyValue( aHttpProxyPN, makeAny(m_pHttpProxyED->GetText()));
bModified = sal_True;
}
- if ( aHttpPortED.GetSavedValue() != aHttpPortED.GetText() )
+ if ( m_pHttpPortED->GetSavedValue() != m_pHttpPortED->GetText() )
{
- xPropertySet->setPropertyValue( aHttpPortPN, makeAny(aHttpPortED.GetText().toInt32()));
+ xPropertySet->setPropertyValue( aHttpPortPN, makeAny(m_pHttpPortED->GetText().toInt32()));
bModified = sal_True;
}
- if( aHttpsProxyED.GetSavedValue() != aHttpsProxyED.GetText() )
+ if( m_pHttpsProxyED->GetSavedValue() != m_pHttpsProxyED->GetText() )
{
- xPropertySet->setPropertyValue( aHttpsProxyPN, makeAny(aHttpsProxyED.GetText()) );
+ xPropertySet->setPropertyValue( aHttpsProxyPN, makeAny(m_pHttpsProxyED->GetText()) );
bModified = sal_True;
}
- if ( aHttpsPortED.GetSavedValue() != aHttpsPortED.GetText() )
+ if ( m_pHttpsPortED->GetSavedValue() != m_pHttpsPortED->GetText() )
{
- xPropertySet->setPropertyValue( aHttpsPortPN, makeAny(aHttpsPortED.GetText().toInt32()) );
+ xPropertySet->setPropertyValue( aHttpsPortPN, makeAny(m_pHttpsPortED->GetText().toInt32()) );
bModified = sal_True;
}
- if( aFtpProxyED.GetSavedValue() != aFtpProxyED.GetText())
+ if( m_pFtpProxyED->GetSavedValue() != m_pFtpProxyED->GetText())
{
- xPropertySet->setPropertyValue( aFtpProxyPN, makeAny(aFtpProxyED.GetText()) );
+ xPropertySet->setPropertyValue( aFtpProxyPN, makeAny(m_pFtpProxyED->GetText()) );
bModified = sal_True;
}
- if ( aFtpPortED.GetSavedValue() != aFtpPortED.GetText() )
+ if ( m_pFtpPortED->GetSavedValue() != m_pFtpPortED->GetText() )
{
- xPropertySet->setPropertyValue( aFtpPortPN, makeAny(aFtpPortED.GetText().toInt32()));
+ xPropertySet->setPropertyValue( aFtpPortPN, makeAny(m_pFtpPortED->GetText().toInt32()));
bModified = sal_True;
}
- if ( aNoProxyForED.GetSavedValue() != aNoProxyForED.GetText() )
+ if ( m_pNoProxyForED->GetSavedValue() != m_pNoProxyForED->GetText() )
{
- xPropertySet->setPropertyValue( aNoProxyDescPN, makeAny( aNoProxyForED.GetText()));
+ xPropertySet->setPropertyValue( aNoProxyDescPN, makeAny( m_pNoProxyForED->GetText()));
bModified = sal_True;
}
@@ -480,76 +486,26 @@ sal_Bool SvxProxyTabPage::FillItemSet(SfxItemSet& )
return bModified;
}
-void SvxProxyTabPage::ArrangeControls_Impl()
-{
- // calculate dynamic width of controls, to not cut-off translated strings #i71445#
- long nWidth = aProxyModeFT.GetCtrlTextWidth( aProxyModeFT.GetText() );
- long nTemp = aHttpProxyFT.GetCtrlTextWidth( aHttpProxyFT.GetText() );
- if ( nTemp > nWidth )
- nWidth = nTemp;
- nTemp = aHttpsProxyFT.GetCtrlTextWidth( aHttpsProxyFT.GetText() );
- if ( nTemp > nWidth )
- nWidth = nTemp;
- nTemp = aFtpProxyFT.GetCtrlTextWidth( aFtpProxyFT.GetText() );
- if ( nTemp > nWidth )
- nWidth = nTemp;
- nTemp = aNoProxyForFT.GetCtrlTextWidth( aNoProxyForFT.GetText() );
- if ( nTemp > nWidth )
- nWidth = nTemp;
-
- nWidth += 10; // To be sure the length of the FixedText is enough on all platforms
- const long nFTWidth = aProxyModeFT.GetSizePixel().Width();
- if ( nWidth > nFTWidth )
- {
- Size aNewSize = aProxyModeFT.GetSizePixel();
- aNewSize.Width() = nWidth;
-
- aProxyModeFT.SetSizePixel( aNewSize );
- aHttpProxyFT.SetSizePixel( aNewSize );
- aHttpsProxyFT.SetSizePixel( aNewSize );
- aFtpProxyFT.SetSizePixel( aNewSize );
- aNoProxyForFT.SetSizePixel( aNewSize );
-
- const long nDelta = nWidth - nFTWidth;
- Point aNewPos = aProxyModeLB.GetPosPixel();
- aNewPos.X() += nDelta;
-
- aProxyModeLB.SetPosPixel( aNewPos );
-
- aNewSize = aHttpProxyED.GetSizePixel();
- aNewSize.Width() -= nDelta;
-
- aNewPos.Y() = aHttpProxyED.GetPosPixel().Y();
- aHttpProxyED.SetPosSizePixel( aNewPos, aNewSize );
- aNewPos.Y() = aHttpsProxyED.GetPosPixel().Y();
- aHttpsProxyED.SetPosSizePixel( aNewPos, aNewSize );
- aNewPos.Y() = aFtpProxyED.GetPosPixel().Y();
- aFtpProxyED.SetPosSizePixel( aNewPos, aNewSize );
- aNewPos.Y() = aNoProxyForED.GetPosPixel().Y();
- aNoProxyForED.SetPosSizePixel( aNewPos, aNewSize );
- }
-}
-
void SvxProxyTabPage::EnableControls_Impl(sal_Bool bEnable)
{
- aHttpProxyFT.Enable(bEnable);
- aHttpProxyED.Enable(bEnable);
- aHttpPortFT.Enable(bEnable);
- aHttpPortED.Enable(bEnable);
-
- aHttpsProxyFT.Enable(bEnable);
- aHttpsProxyED.Enable(bEnable);
- aHttpsPortFT.Enable(bEnable);
- aHttpsPortED.Enable(bEnable);
-
- aFtpProxyFT.Enable(bEnable);
- aFtpProxyED.Enable(bEnable);
- aFtpPortFT.Enable(bEnable);
- aFtpPortED.Enable(bEnable);
-
- aNoProxyForFT.Enable(bEnable);
- aNoProxyForED.Enable(bEnable);
- aNoProxyDescFT.Enable(bEnable);
+ m_pHttpProxyFT->Enable(bEnable);
+ m_pHttpProxyED->Enable(bEnable);
+ m_pHttpPortFT->Enable(bEnable);
+ m_pHttpPortED->Enable(bEnable);
+
+ m_pHttpsProxyFT->Enable(bEnable);
+ m_pHttpsProxyED->Enable(bEnable);
+ m_pHttpsPortFT->Enable(bEnable);
+ m_pHttpsPortED->Enable(bEnable);
+
+ m_pFtpProxyFT->Enable(bEnable);
+ m_pFtpProxyED->Enable(bEnable);
+ m_pFtpPortFT->Enable(bEnable);
+ m_pFtpPortED->Enable(bEnable);
+
+ m_pNoProxyForFT->Enable(bEnable);
+ m_pNoProxyForED->Enable(bEnable);
+ m_pNoProxyDescFT->Enable(bEnable);
}
// -----------------------------------------------------------------------
diff --git a/cui/source/options/optinet2.hrc b/cui/source/options/optinet2.hrc
index 986e9a61e6e9..25d1eae8e640 100644
--- a/cui/source/options/optinet2.hrc
+++ b/cui/source/options/optinet2.hrc
@@ -22,26 +22,6 @@
#include <sfx2/tabpage.hrc>
#include <svtools/controldims.hrc>
-// Proxy ------------------------------------------------------------------
-#define GB_SETTINGS 1
-#define FT_PROXYMODE 2
-#define LB_PROXYMODE 2
-#define FT_HTTP_PROXY 3
-#define ED_HTTP_PROXY 3
-#define FT_HTTP_PORT 4
-#define ED_HTTP_PORT 4
-#define FT_FTP_PROXY 5
-#define ED_FTP_PROXY 5
-#define FT_FTP_PORT 6
-#define ED_FTP_PORT 6
-#define FT_NOPROXYFOR 11
-#define ED_NOPROXYFOR 11
-#define ED_NOPROXYDESC 12
-#define FT_HTTPS_PROXY 14
-#define ED_HTTPS_PROXY 14
-#define FT_HTTPS_PORT 15
-#define ED_HTTPS_PORT 15
-
// Defines - JavaScriptDisableQueryBox_Impl -------------------------------
#define IMG_JSCPT_WARNING 220
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index e848a1194c4c..c19ff8d08066 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -44,14 +44,15 @@ namespace uno = ::com::sun::star::uno;
class SvxNoSpaceEdit : public Edit
{
private:
- sal_Bool bOnlyNumeric;
-
+ bool bOnlyNumeric;
public:
- SvxNoSpaceEdit(Window* pParent, ResId rResId, sal_Bool bNum = sal_False ) :
- Edit( pParent, rResId ), bOnlyNumeric( bNum ) {}
-
- virtual void KeyInput( const KeyEvent& rKEvent );
- virtual void Modify();
+ SvxNoSpaceEdit(Window* pParent, WinBits nStyle)
+ : Edit(pParent, nStyle)
+ , bOnlyNumeric(false)
+ {}
+ virtual void KeyInput(const KeyEvent& rKEvent);
+ virtual void Modify();
+ virtual bool set_property(const OString &rKey, const OString &rValue);
};
// class SvxProxyTabPage -------------------------------------------------
@@ -59,30 +60,27 @@ public:
class SvxProxyTabPage : public SfxTabPage
{
private:
- FixedLine aOptionGB;
-
- FixedText aProxyModeFT;
- ListBox aProxyModeLB;
- FixedText aHttpProxyFT;
- SvxNoSpaceEdit aHttpProxyED;
- FixedText aHttpPortFT;
- SvxNoSpaceEdit aHttpPortED;
+ ListBox* m_pProxyModeLB;
- FixedText aHttpsProxyFT;
- SvxNoSpaceEdit aHttpsProxyED;
- FixedText aHttpsPortFT;
- SvxNoSpaceEdit aHttpsPortED;
+ FixedText* m_pHttpProxyFT;
+ SvxNoSpaceEdit* m_pHttpProxyED;
+ FixedText* m_pHttpPortFT;
+ SvxNoSpaceEdit* m_pHttpPortED;
+ FixedText* m_pHttpsProxyFT;
+ SvxNoSpaceEdit* m_pHttpsProxyED;
+ FixedText* m_pHttpsPortFT;
+ SvxNoSpaceEdit* m_pHttpsPortED;
- FixedText aFtpProxyFT;
- SvxNoSpaceEdit aFtpProxyED;
- FixedText aFtpPortFT;
- SvxNoSpaceEdit aFtpPortED;
+ FixedText* m_pFtpProxyFT;
+ SvxNoSpaceEdit* m_pFtpProxyED;
+ FixedText* m_pFtpPortFT;
+ SvxNoSpaceEdit* m_pFtpPortED;
- FixedText aNoProxyForFT;
- Edit aNoProxyForED;
- FixedText aNoProxyDescFT;
+ FixedText* m_pNoProxyForFT;
+ Edit* m_pNoProxyForED;
+ FixedText* m_pNoProxyDescFT;
const OUString aProxyModePN;
const OUString aHttpProxyPN;
@@ -95,7 +93,6 @@ private:
uno::Reference< uno::XInterface > m_xConfigurationUpdateAccess;
- void ArrangeControls_Impl();
void EnableControls_Impl(sal_Bool bEnable);
void ReadConfigData_Impl();
void ReadConfigDefaults_Impl();
diff --git a/cui/source/options/optinet2.src b/cui/source/options/optinet2.src
index 92acefd45cdf..e572abe79576 100644
--- a/cui/source/options/optinet2.src
+++ b/cui/source/options/optinet2.src
@@ -22,157 +22,6 @@
#include <cuires.hrc>
#include "optinet2.hrc"
-/************************************************************************/
-/* */
-/* Proxy server */
-/* */
-/************************************************************************/
-
-TabPage RID_SVXPAGE_INET_PROXY
-{
- HelpId = HID_OPTIONS_PROXY ;
- OutputSize = TRUE ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- Text [ en-US ] = "Proxy" ;
- #define GB_TYPES_TOP 3
- #define GB_TYPES_LEFT 6
- FixedLine GB_SETTINGS
- {
- Pos = MAP_APPFONT ( GB_TYPES_LEFT , GB_TYPES_TOP ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Settings" ;
- };
- FixedText FT_PROXYMODE
- {
- Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 13 ) ;
- Size = MAP_APPFONT ( 50 , 8 ) ;
- Text [ en-US ] = "Proxy s~erver" ;
- };
- ListBox LB_PROXYMODE
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_INET_PROXY:LB_PROXYMODE";
- Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 11 ) ;
- Size = MAP_APPFONT ( 49 , 48 ) ;
- Border = TRUE ;
- DropDown = TRUE ;
- StringList [ en-US ] =
- {
- < "None" ; > ;
- < "System" ; > ;
- < "Manual" ; > ;
- };
- };
- FixedText FT_HTTP_PROXY
- {
- Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 29 ) ;
- Size = MAP_APPFONT ( 50 , 8 ) ;
- Text [ en-US ] = "HT~TP proxy" ;
- };
- Edit ED_HTTP_PROXY
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_PROXY:ED_HTTP_PROXY";
- Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 27 ) ;
- Size = MAP_APPFONT ( 123 , 12 ) ;
- Border = TRUE ;
- };
-
- #define FT_PORT_WIDTH 37
- #define ED_PORT_WIDTH 20
- #define ED_PORT_COL 229
-
- FixedText FT_HTTP_PORT
- {
- Pos = MAP_APPFONT ( 190 , GB_TYPES_TOP + 29 ) ;
- Size = MAP_APPFONT ( FT_PORT_WIDTH , 8 ) ;
- Right = TRUE;
- Text [ en-US ] = "~Port" ;
- };
- Edit ED_HTTP_PORT
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_PROXY:ED_HTTP_PORT";
- Pos = MAP_APPFONT ( ED_PORT_COL , GB_TYPES_TOP + 27 ) ;
- Size = MAP_APPFONT ( ED_PORT_WIDTH , 12 ) ;
- Border = TRUE ;
- };
-
- FixedText FT_HTTPS_PROXY
- {
- Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 45 ) ;
- Size = MAP_APPFONT ( 50 , 8 ) ;
- Text [ en-US ] = "HTTP~S proxy" ;
- };
- Edit ED_HTTPS_PROXY
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_PROXY:ED_HTTPS_PROXY";
- Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 43 ) ;
- Size = MAP_APPFONT ( 123 , 12 ) ;
- Border = TRUE ;
- };
- FixedText FT_HTTPS_PORT
- {
- Pos = MAP_APPFONT ( 190 , GB_TYPES_TOP + 45 ) ;
- Size = MAP_APPFONT ( FT_PORT_WIDTH , 8 ) ;
- Right = TRUE;
- Text [ en-US ] = "P~ort" ;
- };
- Edit ED_HTTPS_PORT
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_PROXY:ED_HTTPS_PORT";
- Pos = MAP_APPFONT ( ED_PORT_COL , GB_TYPES_TOP + 43 ) ;
- Size = MAP_APPFONT ( ED_PORT_WIDTH , 12 ) ;
- Border = TRUE ;
- };
-
- FixedText FT_FTP_PROXY
- {
- Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 61 ) ;
- Size = MAP_APPFONT ( 50 , 8 ) ;
- Text [ en-US ] = "~FTP proxy" ;
- };
- Edit ED_FTP_PROXY
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_PROXY:ED_FTP_PROXY";
- Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 59 ) ;
- Size = MAP_APPFONT ( 123 , 12 ) ;
- Border = TRUE ;
- };
- FixedText FT_FTP_PORT
- {
- Pos = MAP_APPFONT ( 190 , GB_TYPES_TOP + 61 ) ;
- Size = MAP_APPFONT ( FT_PORT_WIDTH , 8 ) ;
- Right = TRUE;
- Text [ en-US ] = "P~ort" ;
- };
- Edit ED_FTP_PORT
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_PROXY:ED_FTP_PORT";
- Pos = MAP_APPFONT ( ED_PORT_COL , GB_TYPES_TOP + 59 ) ;
- Size = MAP_APPFONT ( ED_PORT_WIDTH , 12 ) ;
- Border = TRUE ;
- };
- FixedText FT_NOPROXYFOR
- {
- Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 93 ) ;
- Size = MAP_APPFONT ( 50 , 8 ) ;
- Text [ en-US ] = "~No proxy for:" ;
- };
- Edit ED_NOPROXYFOR
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_PROXY:ED_NOPROXYFOR";
- Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 91 ) ;
- Size = MAP_APPFONT ( 123 , 12 ) ;
- Border = TRUE ;
- };
- FixedText ED_NOPROXYDESC
- {
- Pos = MAP_APPFONT ( 190 , GB_TYPES_TOP + 93 ) ;
- Size = MAP_APPFONT ( 56 , 8 ) ;
- Text [ en-US ] = "Separator ;" ;
- };
-};
-
ErrorBox RID_SVXERR_OPT_PROXYPORTS
{
BUTTONS = WB_OK ;
diff --git a/cui/uiconfig/ui/optproxypage.ui b/cui/uiconfig/ui/optproxypage.ui
new file mode 100644
index 000000000000..d823a1cef368
--- /dev/null
+++ b/cui/uiconfig/ui/optproxypage.ui
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkFrame" id="OptProxyPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="border_width">6</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="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="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Proxy s_erver</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">proxymode</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="cuilo-SvxNoSpaceEdit" id="http">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</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="cuilo-SvxNoSpaceEdit" id="https">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ </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>
+ <object class="cuilo-SvxNoSpaceEdit" id="ftp">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="noproxy">
+ <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">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="cuilo-SvxNoSpaceEdit" id="httpport">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">5</property>
+ <property name="width_chars">5</property>
+ <property name="only_numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="cuilo-SvxNoSpaceEdit" id="httpsport">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">5</property>
+ <property name="width_chars">5</property>
+ <property name="only_numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="cuilo-SvxNoSpaceEdit" id="ftpport">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">5</property>
+ <property name="width_chars">5</property>
+ <property name="only_numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="proxymode">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">None</item>
+ <item translatable="yes">System</item>
+ <item translatable="yes">Manual</item>
+ </items>
+ </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="GtkLabel" id="httpft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">HT_TP proxy</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">http</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="httpportft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Port</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">httpport</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="httpsft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">HTTP_S proxy</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">https</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="GtkLabel" id="ftpft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_FTP proxy</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">ftp</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="noproxyft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_No proxy for:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">noproxy</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="httpsportft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">P_ort</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">httpsport</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="ftpportft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">P_ort</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">ftpport</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="noproxydesc">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Separator ;</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="width">2</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">Settings</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+</interface>