summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/optinet2.cxx68
-rw-r--r--cui/source/options/optinet2.hxx11
-rw-r--r--cui/source/options/optinet2.src54
3 files changed, 26 insertions, 107 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 9e69a0ce64ba..4769db07ec71 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -1247,37 +1247,16 @@ struct SvxEMailTabPage_Impl
MailerProgramCfg_Impl aMailConfig;
};
-SvxEMailTabPage::SvxEMailTabPage(Window* pParent, const SfxItemSet& rSet) :
- SfxTabPage(pParent, CUI_RES( RID_SVXPAGE_INET_MAIL ), rSet),
- aMailFL(this, CUI_RES(FL_MAIL )),
- aMailerURLFI(this, CUI_RES(FI_MAILERURL )),
- aMailerURLFT(this, CUI_RES(FT_MAILERURL )),
- aMailerURLED(this, CUI_RES(ED_MAILERURL )),
- aMailerURLPB(this, CUI_RES(PB_MAILERURL )),
- m_sDefaultFilterName( CUI_RES(STR_DEFAULT_FILENAME )),
- pImpl(new SvxEMailTabPage_Impl)
+SvxEMailTabPage::SvxEMailTabPage(Window* pParent, const SfxItemSet& rSet)
+ : SfxTabPage( pParent, "OptEmailPage", "cui/ui/optemailpage.ui", rSet)
+ , pImpl(new SvxEMailTabPage_Impl)
{
- FreeResource();
-
- aMailerURLPB.SetClickHdl( LINK( this, SvxEMailTabPage, FileDialogHdl_Impl ) );
-
- // FixedText not wide enough?
- long nTxtW = aMailerURLFT.GetCtrlTextWidth( aMailerURLFT.GetText() );
- long nCtrlW = aMailerURLFT.GetSizePixel().Width();
- if ( nTxtW >= nCtrlW )
- {
- long nDelta = Max( (long)10, nTxtW - nCtrlW );
- // so FixedText wider
- Size aNewSz = aMailerURLFT.GetSizePixel();
- aNewSz.Width() += nDelta;
- aMailerURLFT.SetSizePixel( aNewSz );
- // and Edit smaller
- aNewSz = aMailerURLED.GetSizePixel();
- aNewSz.Width() -= nDelta;
- Point aNewPt = aMailerURLED.GetPosPixel();
- aNewPt.X() += nDelta;
- aMailerURLED.SetPosSizePixel( aNewPt, aNewSz );
- }
+ get(m_pMailContainer, "OptEmailPage");
+ get(m_pMailerURLFI, "lockemail");
+ get(m_pMailerURLED, "url");
+ get(m_pMailerURLPB, "browse");
+ m_sDefaultFilterName = get<FixedText>("browsetitle")->GetText();
+ m_pMailerURLPB->SetClickHdl( LINK( this, SvxEMailTabPage, FileDialogHdl_Impl ) );
}
/* -------------------------------------------------------------------------*/
@@ -1299,9 +1278,9 @@ SfxTabPage* SvxEMailTabPage::Create( Window* pParent, const SfxItemSet& rAttrSe
sal_Bool SvxEMailTabPage::FillItemSet( SfxItemSet& )
{
sal_Bool bMailModified = sal_False;
- if(!pImpl->aMailConfig.bROProgram && aMailerURLED.GetSavedValue() != aMailerURLED.GetText())
+ if(!pImpl->aMailConfig.bROProgram && m_pMailerURLED->GetSavedValue() != m_pMailerURLED->GetText())
{
- pImpl->aMailConfig.sProgram = aMailerURLED.GetText();
+ pImpl->aMailConfig.sProgram = m_pMailerURLED->GetText();
bMailModified = sal_True;
}
if ( bMailModified )
@@ -1314,33 +1293,28 @@ sal_Bool SvxEMailTabPage::FillItemSet( SfxItemSet& )
void SvxEMailTabPage::Reset( const SfxItemSet& )
{
- aMailerURLED.Enable(sal_True );
- aMailerURLPB.Enable(sal_True );
+ m_pMailerURLED->Enable(sal_True );
+ m_pMailerURLPB->Enable(sal_True );
- if(pImpl->aMailConfig.bROProgram)
- aMailerURLFI.Show();
+ if (pImpl->aMailConfig.bROProgram)
+ m_pMailerURLFI->Show();
- aMailerURLED.SetText(pImpl->aMailConfig.sProgram);
- aMailerURLED.SaveValue();
- aMailerURLED.Enable(!pImpl->aMailConfig.bROProgram);
- aMailerURLPB.Enable(!pImpl->aMailConfig.bROProgram);
- aMailerURLFT.Enable(!pImpl->aMailConfig.bROProgram);
+ m_pMailerURLED->SetText(pImpl->aMailConfig.sProgram);
+ m_pMailerURLED->SaveValue();
- aMailFL.Enable(aMailerURLFT.IsEnabled() ||
- aMailerURLED.IsEnabled() ||
- aMailerURLPB.IsEnabled());
+ m_pMailContainer->Enable(!pImpl->aMailConfig.bROProgram);
}
/* -------------------------------------------------------------------------*/
IMPL_LINK( SvxEMailTabPage, FileDialogHdl_Impl, PushButton*, pButton )
{
- if ( &aMailerURLPB == pButton && !pImpl->aMailConfig.bROProgram )
+ if (m_pMailerURLPB == pButton && !pImpl->aMailConfig.bROProgram)
{
FileDialogHelper aHelper(
com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
0 );
- OUString sPath = aMailerURLED.GetText();
+ OUString sPath = m_pMailerURLED->GetText();
if ( sPath.isEmpty() )
sPath = OUString("/usr/bin");
@@ -1353,7 +1327,7 @@ IMPL_LINK( SvxEMailTabPage, FileDialogHdl_Impl, PushButton*, pButton )
{
sUrl = aHelper.GetPath();
::utl::LocalFileHelper::ConvertURLToPhysicalName(sUrl, sPath);
- aMailerURLED.SetText(sPath);
+ m_pMailerURLED->SetText(sPath);
}
}
return 0;
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 0d96cfff6282..0057351f406c 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -215,13 +215,12 @@ public:
struct SvxEMailTabPage_Impl;
class SvxEMailTabPage : public SfxTabPage
{
- FixedLine aMailFL;
- ReadOnlyImage aMailerURLFI;
- FixedText aMailerURLFT;
- Edit aMailerURLED;
- PushButton aMailerURLPB;
+ VclContainer* m_pMailContainer;
+ FixedImage* m_pMailerURLFI;
+ Edit* m_pMailerURLED;
+ PushButton* m_pMailerURLPB;
- String m_sDefaultFilterName;
+ OUString m_sDefaultFilterName;
SvxEMailTabPage_Impl* pImpl;
diff --git a/cui/source/options/optinet2.src b/cui/source/options/optinet2.src
index 5eecd852daef..9a8bf0c71dd0 100644
--- a/cui/source/options/optinet2.src
+++ b/cui/source/options/optinet2.src
@@ -290,58 +290,4 @@ ModalDialog RID_SVXDLG_OPT_JAVASCRIPT_DISABLE
};
};
-// *******************************************************************
-
-TabPage RID_SVXPAGE_INET_MAIL
-{
- HelpID = HID_OPTIONS_MAIL ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- Hide = TRUE ;
-
- FixedLine FL_MAIL
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Sending documents as e-mail attachments";
- };
-
- FixedImage FI_MAILERURL
- {
- Pos = MAP_APPFONT ( 5 , 21 ) ;
- Size = MAP_APPFONT ( 6 , 6 ) ;
- Hide = TRUE;
- };
-
- FixedText FT_MAILERURL
- {
- Pos = MAP_APPFONT ( 14 , 20 ) ;
- Size = MAP_APPFONT ( 43 , 8 ) ;
- Text [ en-US ] = "~E-mail program";
- };
-
- Edit ED_MAILERURL
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_MAIL:ED_MAILERURL";
- Pos = MAP_APPFONT ( 60 , 18 ) ;
- Size = MAP_APPFONT ( 171 , 12 ) ;
- Border = TRUE;
- };
-
- PushButton PB_MAILERURL
- {
- HelpID = "cui:PushButton:RID_SVXPAGE_INET_MAIL:PB_MAILERURL";
- Pos = MAP_APPFONT ( 234 , 17 ) ;
- Size = MAP_APPFONT ( 14 , 14 ) ;
- Text = "..." ;
- };
-
- String STR_DEFAULT_FILENAME
- {
- Text [ en-US ] = "All files" ;
- };
-};
-
- // ******************************************************************* EOF
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */