diff options
author | Marcin eXine M <exine@jun.pl> | 2010-11-02 13:40:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-02 14:54:40 +0000 |
commit | f525717534829abb4ca618e0fcb394ae4b95755a (patch) | |
tree | 0ce6c9179fd1c97b55f50a890a4ec232c54e7960 /cui/source/dialogs/thesdlg.cxx | |
parent | 4fd29f3d182f2c651b0923e8a58d7df74e47b0a4 (diff) |
removed unnecessary comments and whitespaces, dead code
Diffstat (limited to 'cui/source/dialogs/thesdlg.cxx')
-rw-r--r-- | cui/source/dialogs/thesdlg.cxx | 53 |
1 files changed, 2 insertions, 51 deletions
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index d62d0d98d63e..a61d394d23bc 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -59,7 +59,6 @@ #include <comphelper/processfactory.hxx> #include <osl/file.hxx> - #include <stack> #include <algorithm> @@ -70,11 +69,8 @@ using namespace ::com::sun::star; using ::rtl::OUString; - #define A2S(x) String::CreateFromAscii( x ) - - // GetReplaceEditString ------------------------------- static void GetReplaceEditString( String &rText ) @@ -117,18 +113,15 @@ LookUpComboBox_Impl::LookUpComboBox_Impl( EnableAutocomplete( FALSE ); } - LookUpComboBox_Impl::~LookUpComboBox_Impl() { } - void LookUpComboBox_Impl::Modify() { m_aModifyTimer.Start(); } - IMPL_LINK( LookUpComboBox_Impl, ModifyTimer_Hdl, Timer *, EMPTYARG /*pTimer*/ ) { m_rDialogImpl.LookUp( GetText() ); @@ -136,7 +129,6 @@ IMPL_LINK( LookUpComboBox_Impl, ModifyTimer_Hdl, Timer *, EMPTYARG /*pTimer*/ ) return 0; } - // class ReplaceEdit_Impl -------------------------------------------------- ReplaceEdit_Impl::ReplaceEdit_Impl( @@ -145,12 +137,10 @@ ReplaceEdit_Impl::ReplaceEdit_Impl( { } - ReplaceEdit_Impl::~ReplaceEdit_Impl() { } - void ReplaceEdit_Impl::Modify() { if (m_pBtn) @@ -163,20 +153,18 @@ void ReplaceEdit_Impl::SetText( const XubString& rStr ) Modify(); } - void ReplaceEdit_Impl::SetText( const XubString& rStr, const Selection& rNewSelection ) { Edit::SetText( rStr, rNewSelection ); Modify(); } - // class ThesaurusAlternativesCtrl_Impl ---------------------------------- AlternativesString_Impl::AlternativesString_Impl( ThesaurusAlternativesCtrl_Impl &rControl, SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) : - // + SvLBoxString( pEntry, nFlags, rStr ), m_rControlImpl( rControl ) { @@ -203,7 +191,6 @@ void AlternativesString_Impl::Paint( rDev.SetFont( aOldFont ); } - ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl( Window* pParent, SvxThesaurusDialog_Impl &rImpl ) : @@ -214,20 +201,17 @@ ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl( SetHighlightRange(); } - ThesaurusAlternativesCtrl_Impl::~ThesaurusAlternativesCtrl_Impl() { ClearExtraData(); } - void ThesaurusAlternativesCtrl_Impl::ClearExtraData() { UserDataMap_t aEmpty; m_aUserData.swap( aEmpty ); } - void ThesaurusAlternativesCtrl_Impl::SetExtraData( const SvLBoxEntry *pEntry, const AlternativesExtraData &rData ) @@ -242,7 +226,6 @@ void ThesaurusAlternativesCtrl_Impl::SetExtraData( m_aUserData[ pEntry ] = rData; } - AlternativesExtraData * ThesaurusAlternativesCtrl_Impl::GetExtraData( const SvLBoxEntry *pEntry ) { @@ -253,7 +236,6 @@ AlternativesExtraData * ThesaurusAlternativesCtrl_Impl::GetExtraData( return pRes; } - SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader ) { SvLBoxEntry* pEntry = new SvLBoxEntry; @@ -277,7 +259,6 @@ SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const St return pEntry; } - void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rKey = rKEvt.GetKeyCode(); @@ -290,32 +271,23 @@ void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SvxCheckListBox::KeyInput( rKEvt ); } - void ThesaurusAlternativesCtrl_Impl::Paint( const Rectangle& rRect ) { if (!m_rDialogImpl.m_bWordFound) { -/* Push( PUSH_FONT ); - - Font aFont( GetFont() ); - aFont.SetHeight( 2 * aFont.GetHeight() ); - SetFont( aFont ); -*/ Size aTextSize( GetTextWidth( m_rDialogImpl.aErrStr ), GetTextHeight() ); aTextSize = LogicToPixel( aTextSize ); Point aPos; aPos.X() += GetSizePixel().Width() / 2 - aTextSize.Width() / 2; - aPos.Y() += GetSizePixel().Height() / 2 /*- aTextSize.Height() / 2*/; + aPos.Y() += GetSizePixel().Height() / 2; aPos = PixelToLogic( aPos ); DrawText( aPos, m_rDialogImpl.aErrStr ); -// Pop(); } else SvxCheckListBox::Paint( rRect ); } - // struct SvxThesaurusDialog_Impl ---------------------------------------- SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( SvxThesaurusDialog * pDialog ) : @@ -354,13 +326,11 @@ SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( SvxThesaurusDialog * pDialog ) Application::PostUserEvent( STATIC_LINK( this, SvxThesaurusDialog_Impl, VendorImageInitHdl ) ); } - SvxThesaurusDialog_Impl::~SvxThesaurusDialog_Impl() { delete aLangMBtn.GetPopupMenu(); } - uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL SvxThesaurusDialog_Impl::queryMeanings_Impl( OUString& rTerm, const lang::Locale& rLocale, @@ -388,7 +358,6 @@ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL SvxThesaurusDi return aMeanings; } - bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() { lang::Locale aLocale( SvxCreateLocale( nLookUpLanguage ) ); @@ -422,7 +391,6 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() return nMeanings > 0; } - void SvxThesaurusDialog_Impl::LookUp( const String &rText ) { if (rText != aWordCB.GetText()) // avoid moving of the cursor if the text is the same @@ -430,7 +398,6 @@ void SvxThesaurusDialog_Impl::LookUp( const String &rText ) LookUp_Impl(); } - IMPL_LINK( SvxThesaurusDialog_Impl, LeftBtnHdl_Impl, Button *, pBtn ) { if (pBtn && aLookUpHistory.size() >= 2) @@ -443,7 +410,6 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LeftBtnHdl_Impl, Button *, pBtn ) return 0; } - IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) { PopupMenu *pMenu = aLangMBtn.GetPopupMenu(); @@ -462,7 +428,6 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) return 0; } - void SvxThesaurusDialog_Impl::LookUp_Impl() { String aText( aWordCB.GetText() ); @@ -482,7 +447,6 @@ void SvxThesaurusDialog_Impl::LookUp_Impl() aLeftBtn.Enable( aLookUpHistory.size() > 1 ); } - IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox ) { if (pBox && !aWordCB.IsTravelSelect()) // act only upon return key and not when traveling with cursor keys @@ -497,7 +461,6 @@ IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox ) return 0; } - IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox *, pBox ) { SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL; @@ -515,7 +478,6 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox return 0; } - IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckListBox *, pBox ) { SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL; @@ -540,7 +502,6 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis return 0; } - IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) { (void) pThis; @@ -567,7 +528,6 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) return aRes; } - static String lcl_GetThesImplName( const lang::Locale &rLocale ) { String aRes; @@ -600,7 +560,6 @@ static String lcl_GetThesImplName( const lang::Locale &rLocale ) return aRes; } - void SvxThesaurusDialog_Impl::UpdateVendorImage() { m_pDialog->SetUpdateMode( sal_False ); @@ -623,7 +582,6 @@ void SvxThesaurusDialog_Impl::UpdateVendorImage() m_pDialog->SetUpdateMode( sal_True ); } - IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl *, EMPTYARG ) { pThis->m_pDialog->SetUpdateMode( sal_False ); @@ -683,7 +641,6 @@ IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialo return 0; }; - // class SvxThesaurusDialog ---------------------------------------------- SvxThesaurusDialog::SvxThesaurusDialog( @@ -744,12 +701,10 @@ SvxThesaurusDialog::SvxThesaurusDialog( Enable( sal_False ); } - SvxThesaurusDialog::~SvxThesaurusDialog() { } - void SvxThesaurusDialog::SetWindowTitle( LanguageType nLanguage ) { // Sprache anpassen @@ -761,22 +716,18 @@ void SvxThesaurusDialog::SetWindowTitle( LanguageType nLanguage ) SetText( aStr ); // set window title } - String SvxThesaurusDialog::GetWord() { return m_pImpl->aReplaceEdit.GetText(); } - sal_uInt16 SvxThesaurusDialog::GetLanguage() const { return m_pImpl->nLookUpLanguage; } - void SvxThesaurusDialog::Apply() { } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |