diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-12 14:03:59 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-12 14:03:59 +0000 |
commit | 3036f2ff807c36acda761b58d0bdaf5895dd1d2a (patch) | |
tree | fd1c75a21e247077a6cbd5c658bf288b75faab93 /svx | |
parent | 520f0e3413513f68c572ad53e71b3b84a54b5e30 (diff) |
CWS-TOOLING: integrate CWS fwk99
2009-01-20 17:39:31 +0100 pb r266605 : fix: #i98280# new 'More templates'-URL
2009-01-15 20:17:58 +0100 mst r266391 : #i95702# convert wizards to DocumentProperties (partially based on patch by cmc)
2009-01-12 07:35:44 +0100 pb r266131 : fix: #i96851# HID_PASTE_DLG and HID_LINKDLG_TABLB added
2009-01-09 10:40:48 +0100 pb r266061 : fix: #i97386# Execute_Impl() while sub-dialog is open this could be deleted; #i68415# patch from cmc
2009-01-09 10:35:24 +0100 pb r266059 : fix: #i97386# struct Deleted added
2009-01-09 10:05:17 +0100 pb r266057 : fix: #i97365# ModalDialog RID_SVXPAGE_IMPROVEMENT removed
2009-01-09 10:02:39 +0100 pb r266056 : fix: #i97841# new: set InfoURL and HandleHyperLink()
2009-01-09 09:59:13 +0100 pb r266053 : fix: #i97391# MinWidth re-calculated; #i97365# SvxImprovementDialog2 removed
2009-01-09 09:55:00 +0100 pb r266051 : fix: #i97841# new: HandleHyperLink(); #i97365# SvxImprovementDialog2 removed
2009-01-06 14:24:24 +0100 cd r265921 : #i96831# Fix build problem with gcc 4.3.2 using the return value of link correctly.
2009-01-06 12:18:41 +0100 cd r265907 : #i96831# Fix build problem with gcc 4.3.2
2009-01-06 12:02:59 +0100 mst r265905 : fix #i97775#
- xmloff/source/core/nmspmap.cxx:
+ SvXMLNamespaceMap::GetQNameByKey does not handle default namespace
correctly
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/optimprove.hxx | 19 | ||||
-rw-r--r-- | svx/source/dialog/optimprove.cxx | 114 | ||||
-rw-r--r-- | svx/source/dialog/optimprove2.cxx | 35 | ||||
-rw-r--r-- | svx/source/options/optimprove.src | 50 | ||||
-rw-r--r-- | svx/util/hidother.src | 3 |
5 files changed, 43 insertions, 178 deletions
diff --git a/svx/inc/svx/optimprove.hxx b/svx/inc/svx/optimprove.hxx index 63d4ce854827..816e531ca28a 100644 --- a/svx/inc/svx/optimprove.hxx +++ b/svx/inc/svx/optimprove.hxx @@ -102,6 +102,7 @@ private: SVX_DLLPRIVATE SvxImprovementOptionsPage( Window* pParent, const SfxItemSet& rSet ); + DECL_DLLPRIVATE_LINK( HandleHyperlink, svt::FixedHyperlinkImage * ); DECL_DLLPRIVATE_LINK( HandleShowData, PushButton * ); public: @@ -137,23 +138,5 @@ public: void SetInfoText( const String& rText ); }; -class SVX_DLLPUBLIC SvxImprovementDialog2 : public ModalDialog -{ -private: - SvxInfoWindow m_aInfoWin; - FixedText m_aInvitationFT; - RadioButton m_aYesRB; - RadioButton m_aNoRB; - FixedLine m_aButtonLine; - svt::FixedHyperlinkImage m_aInfoFI; - OKButton m_aOKBtn; - - DECL_DLLPRIVATE_LINK( HandleOK, OKButton * ); - DECL_DLLPRIVATE_LINK( HandleHyperlink, svt::FixedHyperlinkImage * ); - -public: - SvxImprovementDialog2( Window* pParent ); -}; - #endif diff --git a/svx/source/dialog/optimprove.cxx b/svx/source/dialog/optimprove.cxx index 088064266083..ae67f627aed6 100644 --- a/svx/source/dialog/optimprove.cxx +++ b/svx/source/dialog/optimprove.cxx @@ -87,11 +87,12 @@ SvxImprovementPage::SvxImprovementPage( Window* pParent ) : m_aShowDataPB.Hide(); Size aNewSize = m_aInvitationFT.GetSizePixel(); - const long nNewWidth = aNewSize.Width() * 4 / 5; + const long nMinWidth = m_aYesRB.CalcMinimumSize().Width(); + const long nNewWidth = std::max( aNewSize.Width() * 4 / 5, nMinWidth ); const long nWDelta = aNewSize.Width() - nNewWidth; aNewSize.Width() = nNewWidth; - Size aCalcSize = m_aInvitationFT.CalcMinimumSize( nNewWidth ); - long nHDelta = aCalcSize.Height() - aNewSize.Height(); + const Size aCalcSize = m_aInvitationFT.CalcMinimumSize( nNewWidth ); + const long nHDelta = aCalcSize.Height() - aNewSize.Height(); aNewSize.Height() = aCalcSize.Height(); m_aInvitationFT.SetSizePixel( aNewSize ); @@ -222,110 +223,3 @@ void SvxInfoWindow::SetInfoText( const String& rText ) m_aInfoText.SetPosSizePixel( aPos, aSize ); } -// class SvxImprovementDialog2 ------------------------------------------- - -SvxImprovementDialog2::SvxImprovementDialog2( Window* pParent ) : - - ModalDialog( pParent, SVX_RES( RID_SVXPAGE_IMPROVEMENT ) ), - - m_aInfoWin ( this, SVX_RES( WIN_INFO ) ), - m_aInvitationFT ( this, SVX_RES( FT_INVITATION ) ), - m_aYesRB ( this, SVX_RES( RB_YES ) ), - m_aNoRB ( this, SVX_RES( RB_NO ) ), - m_aButtonLine ( this, SVX_RES( FL_IMPROVE ) ), - m_aInfoFI ( this, SVX_RES( FI_INFO ) ), - m_aOKBtn ( this, SVX_RES( BTN_OK ) ) - -{ - FreeResource(); - - SvxImprovementPage* pPage = new SvxImprovementPage( this ); - m_aInfoWin.Show(); - m_aInfoWin.SetInfoText( pPage->GetInfoText() ); - m_aInvitationFT.SetText( pPage->GetInvitationText() ); - m_aYesRB.SetText( pPage->GetYesButtonText() ); - m_aNoRB.SetText( pPage->GetNoButtonText() ); - SetText( pPage->GetPageText() ); - delete pPage; - - m_aInfoFI.SetClickHdl( LINK( this, SvxImprovementDialog2, HandleHyperlink ) ); - m_aOKBtn.SetClickHdl( LINK( this, SvxImprovementDialog2, HandleOK ) ); - - Size aImgSz = m_aInfoFI.GetImage().GetSizePixel(); - Size aCtrlSz = m_aInfoFI.GetSizePixel(); - Point aCtrlPos = m_aInfoFI.GetPosPixel(); - - long nDeltaW = aCtrlSz.Width() - aImgSz.Width(); - long nDeltaH = aCtrlSz.Height() - aImgSz.Height(); - if ( nDeltaW > 4 ) - { - nDeltaW -= 4; - aCtrlSz.Width() -= nDeltaW; - aCtrlPos.X() -= ( nDeltaW / 2 ); - } - if ( nDeltaH > 4 ) - { - nDeltaH -= 4; - aCtrlSz.Height() -= nDeltaH; - aCtrlPos.Y() -= ( nDeltaH / 2 ); - } - m_aInfoFI.SetPosSizePixel( aCtrlPos, aCtrlSz ); -} - -IMPL_LINK( SvxImprovementDialog2, HandleHyperlink, svt::FixedHyperlinkImage*, pHyperlinkImage ) -{ - ::rtl::OUString sURL( pHyperlinkImage->GetURL() ); - - if ( sURL.getLength() > 0 ) - { - try - { - uno::Reference< lang::XMultiServiceFactory > xSMGR = - ::comphelper::getProcessServiceFactory(); - uno::Reference< XSystemShellExecute > xSystemShell( - xSMGR->createInstance( ::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ), - uno::UNO_QUERY_THROW ); - if ( xSystemShell.is() ) - { - xSystemShell->execute( - sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS ); - } - } - catch( const uno::Exception& e ) - { - OSL_TRACE( "Caught exception: %s\n thread terminated.\n", - rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); - } - } - - return 0; -} - -IMPL_LINK( SvxImprovementDialog2, HandleOK, OKButton*, EMPTYARG ) -{ - uno::Reference< lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory(); - uno::Reference< com::sun::star::oooimprovement::XCoreController > core_c( - xSMGR->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.oooimprovement.CoreController")), - uno::UNO_QUERY); - if(core_c.is()) - { - ::comphelper::ConfigurationHelper::writeDirectKey( - xSMGR, - ::rtl::OUString::createFromAscii("/org.openoffice.Office.OOoImprovement.Settings"), - ::rtl::OUString::createFromAscii("Participation"), - ::rtl::OUString::createFromAscii("ShowedInvitation"), - uno::makeAny( true ), - ::comphelper::ConfigurationHelper::E_STANDARD ); - ::comphelper::ConfigurationHelper::writeDirectKey( - xSMGR, - ::rtl::OUString::createFromAscii("/org.openoffice.Office.OOoImprovement.Settings"), - ::rtl::OUString::createFromAscii("Participation"), - ::rtl::OUString::createFromAscii("InvitationAccepted"), - uno::makeAny( m_aYesRB.IsChecked() != FALSE ), - ::comphelper::ConfigurationHelper::E_STANDARD ); - } - EndDialog( RET_OK ); - return 0; -} - diff --git a/svx/source/dialog/optimprove2.cxx b/svx/source/dialog/optimprove2.cxx index 91f2f95f1805..843bf8ae920e 100644 --- a/svx/source/dialog/optimprove2.cxx +++ b/svx/source/dialog/optimprove2.cxx @@ -51,6 +51,8 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/oooimprovement/XCore.hpp> #include <com/sun/star/oooimprovement/XCoreController.hpp> +#include <com/sun/star/system/XSystemShellExecute.hpp> +#include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include <com/sun/star/util/XStringSubstitution.hpp> #include <comphelper/configurationhelper.hxx> #include <comphelper/processfactory.hxx> @@ -62,6 +64,7 @@ namespace beans = ::com::sun::star::beans; namespace lang = ::com::sun::star::lang; namespace uno = ::com::sun::star::uno; namespace util = ::com::sun::star::util; +using namespace com::sun::star::system; // class SvxEmptyPage ---------------------------------------------------- @@ -97,6 +100,8 @@ SvxImprovementOptionsPage::SvxImprovementOptionsPage( Window* pParent, const Sfx { FreeResource(); + m_aInfoFI.SetURL( C2S( "www.sun.com/privacy/" ) ); + m_aInfoFI.SetClickHdl( LINK( this, SvxImprovementOptionsPage, HandleHyperlink ) ); m_aShowDataPB.SetClickHdl( LINK( this, SvxImprovementOptionsPage, HandleShowData ) ); } @@ -104,6 +109,36 @@ SvxImprovementOptionsPage::~SvxImprovementOptionsPage() { } +IMPL_LINK( SvxImprovementOptionsPage, HandleHyperlink, svt::FixedHyperlinkImage*, EMPTYARG ) +{ + ::rtl::OUString sURL( m_aInfoFI.GetURL() ); + + if ( sURL.getLength() > 0 ) + { + try + { + uno::Reference< lang::XMultiServiceFactory > xSMGR = + ::comphelper::getProcessServiceFactory(); + uno::Reference< XSystemShellExecute > xSystemShell( + xSMGR->createInstance( ::rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ), + uno::UNO_QUERY_THROW ); + if ( xSystemShell.is() ) + { + xSystemShell->execute( + sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS ); + } + } + catch( const uno::Exception& e ) + { + OSL_TRACE( "Caught exception: %s\n thread terminated.\n", + rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); + } + } + + return 0; +} + IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG ) { uno::Reference < uno::XInterface > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance( diff --git a/svx/source/options/optimprove.src b/svx/source/options/optimprove.src index 722735730b0d..148d7391c905 100644 --- a/svx/source/options/optimprove.src +++ b/svx/source/options/optimprove.src @@ -121,53 +121,3 @@ TabPage RID_SVXPAGE_IMPROVEMENT }; }; -ModalDialog RID_SVXPAGE_IMPROVEMENT -{ - //!HelpId = HID_OPTIONS_IMPROVEMENT ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 210 , 173 ) ; - Moveable = TRUE ; - Window WIN_INFO - { - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( 210 , 30 ) ; - }; - FixedText FT_INVITATION - { - Pos = MAP_APPFONT ( 6 , 36 ) ; - Size = MAP_APPFONT ( 198 , 72 ) ; - WordBreak = TRUE ; - }; - RadioButton RB_YES - { - Pos = MAP_APPFONT ( 6 , 114 ) ; - Size = MAP_APPFONT ( 198 , 10 ) ; - Check = TRUE ; - }; - RadioButton RB_NO - { - Pos = MAP_APPFONT ( 6 , 127 ) ; - Size = MAP_APPFONT ( 198 , 10 ) ; - }; - FixedLine FL_IMPROVE - { - Pos = MAP_APPFONT ( 0 , 140 ) ; - Size = MAP_APPFONT ( 210 , 8 ) ; - }; - FixedImage FI_INFO - { - Pos = MAP_APPFONT ( 6 , 151 ) ; - Size = MAP_APPFONT ( 18 , 18 ) ; - Fixed = Image - { - ImageBitmap = Bitmap { File = "info.png"; }; - }; - }; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 154, 153 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; -}; - diff --git a/svx/util/hidother.src b/svx/util/hidother.src index ea18f2c0ee97..1dff4a184b7e 100644 --- a/svx/util/hidother.src +++ b/svx/util/hidother.src @@ -31,6 +31,7 @@ #include "hidother.hrc" #include <svx/svxids.hrc> #include "../inc/fmhelp.hrc" +#include "../source/dialog/svuidlg.hrc" hidspecial SID_GALLERY_IMPORTTHEME { HelpID = SID_GALLERY_IMPORTTHEME; }; hidspecial HID_GALLERY_NEW_THEME { HelpID = HID_GALLERY_NEW_THEME; }; @@ -502,4 +503,6 @@ hidspecial HID_HANGULDLG_SUGGESTIONS { HelpId = HID_HANGULDLG_SUGGESTIONS; }; hidspecial HID_HANGULDLG_SUGGESTIONS_GRID { HelpId = HID_HANGULDLG_SUGGESTIONS_GRID; }; hidspecial HID_HANGULDLG_SUGGESTIONS_LIST { HelpId = HID_HANGULDLG_SUGGESTIONS_LIST; }; +hidspecial HID_PASTE_DLG { HelpId = HID_PASTE_DLG; }; +hidspecial HID_LINKDLG_TABLB { HelpId = HID_LINKDLG_TABLB; }; |