diff options
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 1 | ||||
-rw-r--r-- | cui/source/options/optinet2.cxx | 258 | ||||
-rw-r--r-- | cui/source/options/optinet2.hrc | 20 | ||||
-rw-r--r-- | cui/source/options/optinet2.hxx | 51 | ||||
-rw-r--r-- | cui/source/options/optinet2.src | 151 | ||||
-rw-r--r-- | cui/uiconfig/ui/optproxypage.ui | 304 | ||||
-rw-r--r-- | extras/source/glade/libreoffice-catalog.xml.in | 12 | ||||
-rw-r--r-- | include/vcl/builder.hxx | 3 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 14 |
10 files changed, 458 insertions, 357 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> diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index b04b95faf7fa..c369903086ef 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -210,6 +210,18 @@ generic-name="NoSpace Edit" parent="GtkEntry" icon-name="widget-gtk-textentry"/> + <glade-widget-class title="Another NoSpace Edit" name="cuilo-SvxNoSpaceEdit" + generic-name="Another NoSpace Edit" parent="GtkEntry" + icon-name="widget-gtk-textentry"> + <properties> + <property save="True" query="False" id="only-numeric" default="False" name="Allow only numbers"> + <parameter-spec> + <type>GParamBoolean</type> + </parameter-spec> + </property> + </properties> + </glade-widget-class> + <glade-widget-class title="Double Field" name="scuilo-ScDoubleField" generic-name="Double Field" parent="GtkEntry" icon-name="widget-gtk-textentry"/> diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index bb63cf20d535..31a82418447a 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -283,6 +283,9 @@ public: static OString extractCustomProperty(stringmap &rMap); + //add a default value of 25 width-chars to a map if width-chars not set + static void ensureDefaultWidthChars(VclBuilder::stringmap &rMap); + //see m_aDeferredProperties, you need this for toplevel dialogs //which build themselves from their ctor. The properties on //the top level are stored in m_aDeferredProperties and need diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 8ce744577130..3a584084652e 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -699,14 +699,14 @@ namespace return eUnit; } +} - void ensureDefaultWidthChars(VclBuilder::stringmap &rMap) - { - OString sWidthChars("width-chars"); - VclBuilder::stringmap::iterator aFind = rMap.find(sWidthChars); - if (aFind == rMap.end()) - rMap[sWidthChars] = "25"; - } +void VclBuilder::ensureDefaultWidthChars(VclBuilder::stringmap &rMap) +{ + OString sWidthChars("width-chars"); + VclBuilder::stringmap::iterator aFind = rMap.find(sWidthChars); + if (aFind == rMap.end()) + rMap[sWidthChars] = "25"; } bool VclBuilder::extractGroup(const OString &id, stringmap &rMap) |