-- Best regards, Marcin "eXine" M.
From a4ab8d0c54f327f3ab105461a965d0f57fcda73e Mon Sep 17 00:00:00 2001 From: eXine <exine@jun.pl> Date: Mon, 1 Nov 2010 21:50:49 +0100 Subject: [PATCH] removed unnecessary comments and whitespaces, dead code, some German translated --- cui/source/customize/acccfg.cxx | 7 -- cui/source/customize/acccfg.src | 50 ---------- cui/source/customize/cfg.cxx | 45 +-------- cui/source/customize/cfgutil.cxx | 175 +-------------------------------- cui/source/customize/eventdlg.cxx | 1 - cui/source/customize/macropg.cxx | 8 -- cui/source/customize/macropg.src | 1 - cui/source/customize/selector.cxx | 3 +- cui/source/dialogs/SpellAttrib.cxx | 54 ++++------- cui/source/dialogs/SpellAttrib.hxx | 14 +-- cui/source/dialogs/SpellDialog.cxx | 153 +++++++++-------------------- cui/source/dialogs/SpellDialog.src | 19 ---- cui/source/dialogs/charmap.src | 116 ---------------------- cui/source/dialogs/commonlingui.src | 17 --- cui/source/dialogs/cuicharmap.cxx | 4 - cui/source/dialogs/cuifmsearch.cxx | 6 +- cui/source/dialogs/cuigaldlg.cxx | 2 - cui/source/dialogs/cuihyperdlg.cxx | 20 ---- cui/source/dialogs/dlgname.src | 25 ----- cui/source/dialogs/grfflt.src | 32 ------ cui/source/dialogs/hangulhanjadlg.cxx | 7 -- cui/source/dialogs/hldocntp.cxx | 3 - cui/source/dialogs/hlmailtp.cxx | 45 --------- cui/source/dialogs/hlmarkwn.cxx | 21 ---- cui/source/dialogs/hlmarkwn.hrc | 3 - cui/source/dialogs/hlmarkwn.src | 17 --- cui/source/dialogs/hltpbase.cxx | 2 - cui/source/dialogs/hyperdlg.hrc | 1 - cui/source/dialogs/hyperdlg.src | 82 --------------- cui/source/dialogs/hyphen.cxx | 2 - cui/source/dialogs/hyphen.src | 2 - cui/source/dialogs/iconcdlg.cxx | 42 +------- cui/source/dialogs/linkdlg.cxx | 15 --- cui/source/dialogs/multipat.src | 23 ----- cui/source/dialogs/newtabledlg.src | 34 ------- cui/source/dialogs/passwdomdlg.cxx | 63 +------------ cui/source/dialogs/passwdomdlg.hrc | 1 - cui/source/dialogs/passwdomdlg.src | 27 +----- cui/source/dialogs/pastedlg.cxx | 47 --------- cui/source/dialogs/postdlg.hrc | 1 - cui/source/dialogs/postdlg.src | 1 - cui/source/dialogs/scriptdlg.cxx | 28 ----- cui/source/dialogs/sdrcelldlg.cxx | 14 --- cui/source/dialogs/sdrcelldlg.src | 31 ------ cui/source/dialogs/showcols.src | 30 ------ cui/source/dialogs/splitcelldlg.src | 2 - cui/source/dialogs/srchxtra.hrc | 4 - cui/source/dialogs/svuidlg.src | 9 -- cui/source/dialogs/thesdlg.cxx | 143 +++++++++------------------ cui/source/dialogs/thesdlg.hrc | 2 - cui/source/dialogs/winpluginlib.cpp | 77 +++++++-------- cui/source/dialogs/zoom.hrc | 1 - cui/source/dialogs/zoom.src | 1 - 53 files changed, 162 insertions(+), 1371 deletions(-) diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 6e9377e..9f3274f 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -635,11 +635,6 @@ void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos , USHORT /*nFlags*/, SvLBoxEntry* pEntry ) { - /*/ ??? realy needed !!! - Font aOldFont(rDevice.GetFont()); - Font aNewFont(aOldFont ); - rDevice.SetFont( aFont ); - */ if (!pEntry) return; @@ -653,7 +648,6 @@ void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos , else rDevice.DrawCtrlText(aPos, GetText(), 0, STRING_LEN, TEXT_DRAW_DISABLE); - //rDev.SetFont( aOldFont ); } //----------------------------------------------- @@ -1520,7 +1514,6 @@ void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTi m_pFileDlg = new sfx2::FileDialogHelper( nDialogType, 0 ); m_pFileDlg->SetTitle( rTitle ); -// m_pFileDlg->SetDialogHelpId( bSave ? HID_CONFIG_SAVE : HID_CONFIG_LOAD ); m_pFileDlg->AddFilter( aFilterAllStr, DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ) ); m_pFileDlg->AddFilter( aFilterCfgStr, DEFINE_CONST_UNICODE( "*.cfg" ) ); diff --git a/cui/source/customize/acccfg.src b/cui/source/customize/acccfg.src index abbe08d..a804c14 100644 --- a/cui/source/customize/acccfg.src +++ b/cui/source/customize/acccfg.src @@ -305,53 +305,3 @@ Resource RID_SVXPAGE_CONFIGGROUPBOX }; // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index e48f650..d515740 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -56,7 +56,6 @@ #include <toolkit/unohlp.hxx> #include <algorithm> -//add #include <cuires.hrc> #include "cfg.hrc" #include "helpid.hrc" @@ -150,7 +149,7 @@ void printPropertySet( uno::Any a = xPropSet->getPropertyValue( aPropDetails[i].Name ); - if ( ( a >>= tmp ) /* && tmp.getLength() != 0 */ ) + if ( a >>= tmp ) { OSL_TRACE("%s: Got property: %s = %s", PRTSTR(prefix), PRTSTR(aPropDetails[i].Name), PRTSTR(tmp)); @@ -223,10 +222,6 @@ OUString replaceSaveInName( name = rMessage.replaceAt( pos, placeholder.getLength(), rSaveInName ); } - else - { - // don't change the message - } return name; } @@ -2637,7 +2632,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) GetSaveInData()->SetModified( TRUE ); } - // #i68101# Moemory leak (!) + // #i68101# Memory leak (!) delete pNameDialog; break; @@ -3235,42 +3230,6 @@ SvxConfigEntry::GetProperties( return aPropSeq; } -/* -SvxMenuConfigEntry::SvxMenuConfigEntry( - const uno::Sequence< beans::PropertyValue >& rProperties, - const uno::Reference< container::XNameAccess >& rCommandToLabelMap ) - : - SvxConfigEntry( rProperties, rCommandToLabelMap ) -{ - uno::Reference< container::XIndexAccess > aChildren; - - for ( sal_Int32 i = 0; i < rProperties.getLength(); i++ ) - { - if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_CONTAINER )) - { - rProperties[i].Value >>= aChildren; - } - } - - if ( aChildren.is() ) - { - SetPopup( TRUE ); - SetEntries( new SvxEntries() ); - - uno::Sequence< beans::PropertyValue > aProps; - for ( sal_Int32 i = 0; i < aChildren->getCount(); i++ ) - { - if ( aChildren->getByIndex( i ) >>= aProps ) - { - SvxConfigEntry* pEntry = - new SvxMenuConfigEntry( aProps, rCommandToLabelMap ); - GetEntries()->push_back( pEntry ); - } - } - } -} -*/ - SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName, const OUString& rCommandURL, bool bPopup, bool bParentData ) : nId( 1 ) diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 9118923..994b14a 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -185,15 +185,6 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle) if (!aStyle.sLabel.getLength()) { aStyle.sLabel = aStyle.sCommand; - /* - #if OSL_DEBUG_LEVEL > 1 - ::rtl::OUStringBuffer sMsg(256); - sMsg.appendAscii("There is no UIName for the style command \""); - sMsg.append (aStyle.sCommand ); - sMsg.appendAscii("\". The UI will be invalid then ..." ); - OSL_ENSURE(sal_False, ::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr()); - #endif - */ } } @@ -291,7 +282,7 @@ SfxConfigFunctionListBox_Impl::SfxConfigFunctionListBox_Impl( Window* pParent, c SetWindowBits( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT ); GetModel()->SetSortMode( SortAscending ); - // Timer f"ur die BallonHelp + // Timer for the BallonHelp aTimer.SetTimeout( 200 ); aTimer.SetTimeoutHdl( LINK( this, SfxConfigFunctionListBox_Impl, TimerHdl ) ); @@ -302,23 +293,6 @@ SfxConfigFunctionListBox_Impl::~SfxConfigFunctionListBox_Impl() ClearAll(); } -void SfxConfigFunctionListBox_Impl::MouseMove( const MouseEvent& ) -{ - /* --> PB 2004-12-01 #i37000# - no own help text needed any longer - Point aMousePos = rMEvt.GetPosPixel(); - pCurEntry = GetCurEntry(); - - if ( pCurEntry && GetEntry( aMousePos ) == pCurEntry ) - aTimer.Start(); - else - { - Help::ShowBalloon( this, aMousePos, String() ); - aTimer.Stop(); - } - */ -} - - IMPL_LINK( SfxConfigFunctionListBox_Impl, TimerHdl, Timer*, pTimer) /* Beschreibung Timer-Handler f"ur die Einblendung eines Hilfetextes. Wenn nach Ablauf des Timers @@ -327,16 +301,6 @@ IMPL_LINK( SfxConfigFunctionListBox_Impl, TimerHdl, Timer*, pTimer) */ { (void)pTimer; // unused - /* --> PB 2004-12-01 #i37000# - no own help text needed any longer - aTimer.Stop(); - Point aMousePos = GetPointerPosPixel(); - SvLBoxEntry *pEntry = GetCurEntry(); - if ( pEntry && GetEntry( aMousePos ) == pEntry && pCurEntry == pEntry ) - { - String sHelpText = GetHelpText( pEntry ); - Help::ShowBalloon( this, OutputToScreenPixel( aMousePos ), sHelpText ); - } - */ return 0L; } @@ -464,57 +428,12 @@ USHORT SfxConfigFunctionListBox_Impl::GetId( SvLBoxEntry *pEntry ) return 0; } -/* -String SfxConfigFunctionListBox_Impl::GetHelpText( SvLBoxEntry *pEntry ) -{ - // Information zum selektierten Entry aus den Userdaten holen - SfxGroupInfo_Impl *pInfo = pEntry ? (SfxGroupInfo_Impl*) pEntry->GetUserData(): 0; - if ( pInfo ) - { - switch ( pInfo->nKind ) - { - case SFX_CFGGROUP_FUNCTION : - case SFX_CFGFUNCTION_SLOT : - { - // Eintrag ist eine Funktion, Hilfe aus der Office-Hilfe - USHORT nId = pInfo->nOrd; - String aText = Application::GetHelp()->GetHelpText( nId, this ); - - if ( !aText.Len() ) - aText = SFX_SLOTPOOL().GetSlotHelpText_Impl( nId ); - return aText; - } - - case SFX_CFGGROUP_SCRIPTCONTAINER : - case SFX_CFGFUNCTION_SCRIPT : - case SFX_CFGGROUP_BASICMGR : - case SFX_CFGGROUP_DOCBASICMGR : - case SFX_CFGGROUP_BASICLIB : - case SFX_CFGGROUP_BASICMOD : - case SFX_CFGFUNCTION_MACRO : - { - // Eintrag ist ein Macro, Hilfe aus der MacroInfo - SfxMacroInfo *pMacInfo = (SfxMacroInfo*) pInfo->pObject; - return pMacInfo->GetHelpText(); - } - - case SFX_CFGGROUP_STYLES : - return String(); - } - } - - return String(); -}*/ - void SfxConfigFunctionListBox_Impl::FunctionSelected() /* Beschreibung Setzt die Balloonhelp zur"uck, da diese immer den Helptext des selektierten Entry anzeigen soll. */ { - /* --> PB 2004-12-01 #i37000# - no own help text needed any longer - Help::ShowBalloon( this, Point(), String() ); - */ } void SfxConfigFunctionListBox_Impl::SetStylesInfo(SfxStylesInfo_Impl* pStyles) @@ -817,7 +736,6 @@ namespace } catch( const Exception& ) { - //DBG_UNHANDLED_EXCEPTION(); } return xDocument; @@ -847,46 +765,6 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul InitStyles(); } - /* - - // Verwendet wird der aktuelle Slotpool - if ( nMode ) - { - pSlotPool = pPool ? pPool : &SFX_SLOTPOOL(); - for ( USHORT i=1; i<pSlotPool->GetGroupCount(); i++ ) - { - // Gruppe anw"ahlen ( Gruppe 0 ist intern ) - String aName = pSlotPool->SeekGroup( i ); - const SfxSlot *pSfxSlot = pSlotPool->FirstSlot(); - if ( pSfxSlot ) - { - // Check if all entries are not useable. Don't - // insert a group without any useable function. - sal_Bool bActiveEntries = sal_False; - while ( pSfxSlot ) - { - USHORT nId = pSfxSlot->GetSlotId(); - if ( pSfxSlot->GetMode() & nMode ) - { - bActiveEntries = sal_True; - break; - } - - pSfxSlot = pSlotPool->NextSlot(); - } - - if ( bActiveEntries ) - { - // Wenn Gruppe nicht leer - SvLBoxEntry *pEntry = InsertEntry( aName, NULL ); - SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_FUNCTION, i ); - aArr.Insert( pInfo, aArr.Count() ); - pEntry->SetUserData( pInfo ); - } - } - } - } -*/ SfxApplication *pSfxApp = SFX_APP(); if ( bShowBasic ) { @@ -898,20 +776,6 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul // Zuerst AppBasic BasicManager *pAppBasicMgr = pSfxApp->GetBasicManager(); BOOL bInsert = TRUE; - /* - if ( pArr ) - { - bInsert = FALSE; - for ( USHORT n=0; n<pArr->Count(); n++ ) - { - if ( *(*pArr)[n] == pSfxApp->GetName() ) - { - bInsert = TRUE; - break; - } - } - } - */ if ( bInsert ) { @@ -923,10 +787,8 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul aAppBasTitle += aMacroName; SvLBoxEntry *pEntry = InsertEntry( aAppBasTitle, 0 ); SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMGR, 0, pAppBasicMgr ); - // aArr.Insert( pInfo, aArr.Count() ); pEntry->SetUserData( pInfo ); pEntry->EnableChildsOnDemand( TRUE ); - // Expand( pEntry ); } } @@ -967,7 +829,6 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW ); rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) ); - //rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) ); } catch( Exception& e ) { @@ -1109,14 +970,6 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul pEntry->EnableChildsOnDemand( TRUE ); } -/* { - String sSymbols( String::CreateFromAscii("Symbols") ); - SvLBoxEntry *pEntry = InsertEntry( sSymbols, 0 ); - SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 ); // TODO last parameter should contain user data - aArr.Insert( pInfo, aArr.Count() ); - pEntry->SetUserData( pInfo ); - } */ - MakeVisible( GetEntry( 0,0 ) ); SetUpdateMode( TRUE ); } @@ -1290,15 +1143,6 @@ SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext
& xC
if (!sUIName.getLength()) { sUIName = sCommand; - /* - #if OSL_DEBUG_LEVEL > 1 - ::rtl::OUStringBuffer sMsg(256); - sMsg.appendAscii("There is no UIName for the internal command \""); - sMsg.append (sCommand ); - sMsg.appendAscii("\". The UI will be invalid then ..." ); - OSL_ENSURE(sal_False, ::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr()); - #endif - */ } return sUIName; @@ -1576,7 +1420,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod ); - BOOL bIsStarScript = FALSE; //pMod->ISA( SbJScriptModule ); + BOOL bIsStarScript = FALSE; BOOL bWantsStarScript = pImp->m_aScriptType.EqualsAscii("StarScript"); if ( bIsStarScript != bWantsStarScript ) continue; @@ -1714,21 +1558,6 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) void SfxConfigGroupListBox_Impl::AddAndSelect( const SfxStringItem* , const SfxStringItem* ) { - /* - if ( pText ) - { - Select( GetEntry( GetEntryCount()-1) ); - SvLBoxEntry* pFuncEntry = pFunctionListBox->InsertEntry( pText->GetValue(), NULL ); - SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 ); - String aCommand = String::CreateFromAscii(".uno:InsertSymbol?Symbols:string="); - aCommand += pText->GetValue(); - pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() ); - pGrpInfo->sCommand = aCommand; - pGrpInfo->sLabel = String::CreateFromAscii("Symbols: "); - pGrpInfo->sLabel += pText->GetValue(); - pFuncEntry->SetUserData( pGrpInfo ); - } - */ } void SfxConfigGroupListBox_Impl::SelectMacro( const SfxMacroInfoItem *pItem ) diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 60219ef..12e2e18 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -97,7 +97,6 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, uno::Reference< document::XEventsSupplier > xSupplier; -// xSupplier = uno::Reference< document::XEventsSupplier >( new GlobalEventConfig()); xSupplier = uno::Reference< document::XEventsSupplier > ( ::comphelper::getProcessServiceFactory()->createInstance( OUString::createFromAscii( diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 91aa523..4949553 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -284,9 +284,6 @@ void _SvxMacroTabPage::InitResources() aDisplayNames.push_back( EventDisplayName( "OnPrint", RID_SVXSTR_EVENT_PRINTDOC ) ); aDisplayNames.push_back( EventDisplayName( "OnModifyChanged", RID_SVXSTR_EVENT_MODIFYCHANGED ) ); aDisplayNames.push_back( EventDisplayName( "OnTitleChanged", RID_SVXSTR_EVENT_TITLECHANGED ) ); -// aDisplayNames.push_back( EventDisplayName( "OnModeChanged", RID_SVXSTR_EVENT_MODECHANGED ) ); -// aDisplayNames.push_back( EventDisplayName( "OnVisAreaChanged", RID_SVXSTR_EVENT_VISAREACHANGED ) ); -// aDisplayNames.push_back( EventDisplayName( "OnStorageChanged", RID_SVXSTR_EVENT_STORAGECHANGED ) ); // application specific events aDisplayNames.push_back( EventDisplayName( "OnMailMerge", RID_SVXSTR_EVENT_MAILMERGE ) ); @@ -296,7 +293,6 @@ void _SvxMacroTabPage::InitResources() aDisplayNames.push_back( EventDisplayName( "OnPageCountChange", RID_SVXSTR_EVENT_PAGECOUNTCHANGE ) ); aDisplayNames.push_back( EventDisplayName( "OnSubComponentOpened", RID_SVXSTR_EVENT_SUBCOMPONENT_OPENED ) ); aDisplayNames.push_back( EventDisplayName( "OnSubComponentClosed", RID_SVXSTR_EVENT_SUBCOMPONENT_CLOSED ) ); -// aDisplayNames.push_back( EventDisplayName( "OnLayoutFinished", RID_SVXSTR_EVENT_LAYOUT_FINISHED ) ); aDisplayNames.push_back( EventDisplayName( "OnSelect", RID_SVXSTR_EVENT_SELECTIONCHANGED ) ); aDisplayNames.push_back( EventDisplayName( "OnDoubleClick", RID_SVXSTR_EVENT_DOUBLECLICK ) ); aDisplayNames.push_back( EventDisplayName( "OnRightClick", RID_SVXSTR_EVENT_RIGHTCLICK ) ); @@ -727,7 +723,6 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* // update the listbox entry pImpl->pEventLB->SetUpdateMode( FALSE ); - // pE->ReplaceItem( new SvLBoxString( pE, 0, sEventURL ), LB_MACROS_ITEMPOS ); pE->ReplaceItem( new IconLBoxString( pE, 0, sEventURL, pImpl->pMacroImg, pImpl->pComponentImg, pImpl->pMacroImg_h, pImpl->pComponentImg_h ), LB_MACROS_ITEMPOS ); @@ -862,9 +857,6 @@ SvxMacroTabPage::SvxMacroTabPage( Window* pParent, const Reference< frame::XFram if( !mpImpl->bIDEDialogMode ) { - // Size aSizeAssign; - // Point aPosAssign; - // mpImpl->pAssignPB->GetPosSizePixel( aPosAssign, aSizeAssign ); Point aPosAssign = mpImpl->pAssignPB->GetPosPixel(); Point aPosComp = mpImpl->pAssignComponentPB->GetPosPixel(); diff --git a/cui/source/customize/macropg.src b/cui/source/customize/macropg.src index 6402587..1fe76ce 100644 --- a/cui/source/customize/macropg.src +++ b/cui/source/customize/macropg.src @@ -36,7 +36,6 @@ TabPage RID_SVXPAGE_MACROASSIGN { - // HelpID = HID_MACROASSIGN ; Hide = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index d04aa04..cdcd76d 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -94,7 +94,7 @@ SvxConfigFunctionListBox_Impl::SvxConfigFunctionListBox_Impl( Window* pParent, c SetWindowBits( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT ); GetModel()->SetSortMode( SortAscending ); - // Timer f"ur die BallonHelp + // Timer for the BallonHelp aTimer.SetTimeout( 200 ); aTimer.SetTimeoutHdl( LINK( this, SvxConfigFunctionListBox_Impl, TimerHdl ) ); @@ -1040,7 +1040,6 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog( aCategories.SetFunctionListBox( &aCommands ); aCategories.Init(); - // aCategories.Select( aCategories.GetEntry( 0, 0 ) ); aCategories.SetSelectHdl( LINK( this, SvxScriptSelectorDialog, SelectHdl ) ); diff --git a/cui/source/dialogs/SpellAttrib.cxx b/cui/source/dialogs/SpellAttrib.cxx index 61f8f82..ce5497e 100644 --- a/cui/source/dialogs/SpellAttrib.cxx +++ b/cui/source/dialogs/SpellAttrib.cxx @@ -37,134 +37,116 @@ using namespace svx; using namespace com::sun::star::linguistic2; using namespace com::sun::star::uno; -/*-- 26.06.2008 10:41:57--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellErrorAttrib::SpellErrorAttrib( const SpellErrorDescription& rDesc ) : TextAttrib(TEXTATTR_SPELL_ERROR), m_aSpellErrorDescription( rDesc ) { } -/*-- 10.09.2003 12:54:34--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellErrorAttrib::SpellErrorAttrib( const SpellErrorAttrib& rAttr ) : TextAttrib(TEXTATTR_SPELL_ERROR), m_aSpellErrorDescription( rAttr.m_aSpellErrorDescription ) { } -/*-- 10.09.2003 12:54:34--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellErrorAttrib::~SpellErrorAttrib() { } -/*-- 10.09.2003 12:54:35--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SpellErrorAttrib::SetFont( Font& ) const { //this attribute doesn't have a visual effect } -/*-- 10.09.2003 12:54:35--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- TextAttrib* SpellErrorAttrib::Clone() const { return new SpellErrorAttrib(*this); } -/*-- 10.09.2003 12:54:35--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- int SpellErrorAttrib::operator==( const TextAttrib& rAttr ) const { return Which() == rAttr.Which() && m_aSpellErrorDescription == static_cast<const SpellErrorAttrib&>(rAttr).m_aSpellErrorDescription; } -/*-- 10.09.2003 14:27:43--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellLanguageAttrib::SpellLanguageAttrib(LanguageType eLang) : TextAttrib(TEXTATTR_SPELL_LANGUAGE), m_eLanguage(eLang) { } -/*-- 10.09.2003 14:27:43--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellLanguageAttrib::SpellLanguageAttrib( const SpellLanguageAttrib& rAttr ) : TextAttrib(TEXTATTR_SPELL_LANGUAGE), m_eLanguage(rAttr.m_eLanguage) { } -/*-- 10.09.2003 14:27:43--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellLanguageAttrib::~SpellLanguageAttrib() { } -/*-- 10.09.2003 14:27:43--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SpellLanguageAttrib::SetFont( Font& ) const { //no visual effect } -/*-- 10.09.2003 14:27:44--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- TextAttrib* SpellLanguageAttrib::Clone() const { return new SpellLanguageAttrib(*this); } -/*-- 10.09.2003 14:27:44--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- int SpellLanguageAttrib::operator==( const TextAttrib& rAttr ) const { return Which() == rAttr.Which() && m_eLanguage == static_cast<const SpellLanguageAttrib&>(rAttr).m_eLanguage; } -/*-- 31.10.2003 16:07:45--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellBackgroundAttrib::SpellBackgroundAttrib(const Color& rCol) : TextAttrib(TEXTATTR_SPELL_BACKGROUND), m_aBackgroundColor(rCol) { } -/*-- 31.10.2003 16:07:45--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellBackgroundAttrib::SpellBackgroundAttrib( const SpellBackgroundAttrib& rAttr ) : TextAttrib(TEXTATTR_SPELL_BACKGROUND), m_aBackgroundColor(rAttr.m_aBackgroundColor) { } -/*-- 31.10.2003 16:07:46--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellBackgroundAttrib::~SpellBackgroundAttrib() { } -/*-- 31.10.2003 16:07:46--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SpellBackgroundAttrib::SetFont( Font& rFont ) const { rFont.SetFillColor(m_aBackgroundColor); } -/*-- 31.10.2003 16:07:46--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- TextAttrib* SpellBackgroundAttrib::Clone() const { return new SpellBackgroundAttrib(*this); } -/*-- 31.10.2003 16:07:47--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- int SpellBackgroundAttrib::operator==( const TextAttrib& rAttr ) const { return Which() == rAttr.Which() && diff --git a/cui/source/dialogs/SpellAttrib.hxx b/cui/source/dialogs/SpellAttrib.hxx index 29bd526..04a9bfb 100644 --- a/cui/source/dialogs/SpellAttrib.hxx +++ b/cui/source/dialogs/SpellAttrib.hxx @@ -35,9 +35,6 @@ #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/linguistic2/XProofreader.hpp> #include <tools/color.hxx> -//namespace com{ namespace sun{ namespace star{ namespace linguistic2{ -// class XSpellAlternatives; -//}}}} #define TEXTATTR_SPELL_ERROR (TEXTATTR_USER_START + 1) #define TEXTATTR_SPELL_LANGUAGE (TEXTATTR_USER_START + 2) @@ -97,21 +94,18 @@ struct SpellErrorDescription sRuleId == rDesc.sRuleId; } }; -/* -----------------10.09.2003 14:23----------------- - --------------------------------------------------*/ +//------------------------------------------------- class SpellErrorAttrib : public TextAttrib { public: private: - //com::sun::star::uno::Reference<com::sun::star::linguistic2::XSpellAlternatives> m_xAlternatives; SpellErrorDescription m_aSpellErrorDescription; //not accessible SpellErrorAttrib(); public: -// SpellErrorAttrib(com::sun::star::uno::Reference<com::sun::star::linguistic2::XSpellAlternatives> xAlternatives); SpellErrorAttrib( const SpellErrorDescription& ); SpellErrorAttrib( const SpellErrorAttrib& rAttr ); ~SpellErrorAttrib(); @@ -123,9 +117,8 @@ public: virtual TextAttrib* Clone() const; virtual int operator==( const TextAttrib& rAttr ) const; }; -/* -----------------10.09.2003 14:23----------------- - --------------------------------------------------*/ +//------------------------------------------------- class SpellLanguageAttrib : public TextAttrib { LanguageType m_eLanguage; @@ -147,9 +140,8 @@ public: virtual TextAttrib* Clone() const; virtual int operator==( const TextAttrib& rAttr ) const; }; -/* -----------------31.10.2003 16:01----------------- - --------------------------------------------------*/ +//------------------------------------------------- class SpellBackgroundAttrib : public TextAttrib { Color m_aBackgroundColor; diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index e933079..7723e85 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -85,7 +85,6 @@ struct SpellDialog_Impl Sequence< Reference< XDictionary > > aDics; }; // ----------------------------------------------------------------------- -//#define VENDOR_IMAGE_HEIGHT 44 //as specified #define SPELLUNDO_CHANGE_LANGUAGE (TEXTUNDO_USER + 1) #define SPELLUNDO_CHANGE_TEXTENGINE (TEXTUNDO_USER + 2) @@ -157,7 +156,6 @@ public: void SetErrorLanguageSelected(bool bSet){ m_bIsErrorLanguageSelected = bSet;} bool IsErrorLanguageSelected() const {return m_bIsErrorLanguageSelected;} - void SetDictionary(Reference<XDictionary> xDict) { m_xDictionary = xDict; } Reference<XDictionary> GetDictionary() const {return m_xDictionary;} void SetAddedWord(const ::rtl::OUString& rWord) {m_sAddedWord = rWord;} @@ -172,22 +170,19 @@ public: }; }//namespace svx using namespace ::svx; -/*-- 06.11.2003 12:16:02--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SpellUndoAction_Impl::~SpellUndoAction_Impl() { } -/*-- 06.11.2003 12:16:02--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SpellUndoAction_Impl::Undo() { m_rActionLink.Call(this); } -/*-- 06.11.2003 12:16:02--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- USHORT SpellUndoAction_Impl::GetId()const { return m_nId; @@ -328,13 +323,11 @@ void SpellDialog::UpdateBoxes_Impl() const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives(); LanguageType nAltLanguage = LANGUAGE_NONE; - //String aAltWord; Sequence< ::rtl::OUString > aNewWords; bool bIsGrammarError = false; if( pSpellErrorDescription ) { nAltLanguage = SvxLocaleToLanguage( pSpellErrorDescription->aLocale ); - //aAltWord = String( xAlt->getWord() ); aNewWords = pSpellErrorDescription->aSuggestions; bIsGrammarError = pSpellErrorDescription->bIsGrammarError; aExplainPB.SetExplanation(pSpellErrorDescription->sExplanation ); @@ -350,7 +343,6 @@ void SpellDialog::UpdateBoxes_Impl() SetTitle_Impl( nAltLanguage ); SetSelectedLang_Impl( nAltLanguage ); - // Alternativen eintragen const ::rtl::OUString *pNewWords = aNewWords.getConstArray(); const sal_Int32 nSize = aNewWords.getLength(); @@ -366,7 +358,6 @@ void SpellDialog::UpdateBoxes_Impl() if(!nSize) aSuggestionLB.InsertEntry( aNoSuggestionsST ); aAutoCorrPB.Enable( nSize > 0 ); - //aSentenceED.GrabFocus(); aSuggestionFT.Enable(nSize > 0); aSuggestionLB.Enable(nSize > 0); @@ -417,7 +408,6 @@ void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrent } while(aControls[++nIdx]); - } if( bNextSentence ) { @@ -486,7 +476,6 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG ) aVendorSize.Width() = aImageSize.Width(); pThis->aVendorImageFI.SetSizePixel( aVendorSize ); } - //aVendorSize.Height() = nDiff; sal_Int32 nDiff = aVendorSize.Height(); pThis->aVendorImageFI.SetSizePixel(aVendorSize); Control* aControls[] = { @@ -634,7 +623,6 @@ IMPL_LINK( SpellDialog, ChangeHdl, Button *, EMPTYARG ) return 1; } - // ----------------------------------------------------------------------- IMPL_LINK( SpellDialog, ChangeAllHdl, Button *, EMPTYARG ) @@ -717,9 +705,8 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton ) aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); return 1; } -/*-- 06.11.2003 11:24:08--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- IMPL_LINK( SpellDialog, UndoHdl, Button*, EMPTYARG ) { aSentenceED.Undo(); @@ -727,9 +714,8 @@ IMPL_LINK( SpellDialog, UndoHdl, Button*, EMPTYARG ) aUndoPB.Enable(FALSE); return 0; } -/*-- 06.11.2003 12:19:15--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- IMPL_LINK( SpellDialog, DialogUndoHdl, SpellUndoAction_Impl*, pAction ) { switch(pAction->GetId()) @@ -806,7 +792,6 @@ IMPL_LINK( SpellDialog, IgnoreHdl, Button *, EMPTYARG ) return 1; } - // ----------------------------------------------------------------------- sal_Bool SpellDialog::Close() @@ -830,9 +815,8 @@ LanguageType SpellDialog::GetSelectedLang_Impl() const INT16 nLang = aLanguageLB.GetSelectLanguage(); return nLang; } -/* -----------------28.10.2003 14:27----------------- - --------------------------------------------------*/ +//------------------------------------------------- IMPL_LINK(SpellDialog, LanguageSelectHdl, SvxLanguageBox*, pBox) { //if currently an error is selected then search for alternatives for @@ -899,7 +883,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang) if( pSpellErrorDescription && pSpellErrorDescription->sServiceName.getLength() ) { bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - ::rtl::OUString sSuggestionImageUrl = + ::rtl::OUString sSuggestionImageUrl = SvtLinguConfig().GetSpellAndGrammarDialogImage( pSpellErrorDescription->sServiceName, bHighContrast ); aVendorImageFI.SetImage( lcl_GetImageFromPngUrl( sSuggestionImageUrl ) ); uno::Reference< lang::XServiceDisplayName > xDisplayName( pSpellErrorDescription->xGrammarChecker, uno::UNO_QUERY ); @@ -908,7 +892,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang) } else { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); aVendorImageFI.SetImage( bHighContrast ? aVendorImageHC : aVendorImage ); } @@ -919,7 +903,6 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang) } else { - //bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); sTitle = m_sTitleSpellingGrammar; } } @@ -995,9 +978,8 @@ void SpellDialog::InitUserDicts() } } } -/*-- 20.10.2003 15:31:06--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) { aSentenceED.UndoActionStart( SPELLUNDO_CHANGE_GROUP ); @@ -1041,9 +1023,8 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); return 0; } -/*------------------------------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd) { if (&aSentenceED == pEd) @@ -1068,9 +1049,8 @@ IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd) } return 0; }; -/*------------------------------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- IMPL_LINK(SpellDialog, CancelHdl, Button *, EMPTYARG ) { //apply changes and ignored text parts first - if there are any @@ -1078,9 +1058,8 @@ IMPL_LINK(SpellDialog, CancelHdl, Button *, EMPTYARG ) Close(); return 0; } -/*------------------------------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SpellDialog::Paint( const Rectangle& rRect ) { ModelessDialog::Paint(rRect ); @@ -1088,9 +1067,8 @@ void SpellDialog::Paint( const Rectangle& rRect ) DecorationView aDecoView( this ); aDecoView.DrawButton( aRect, BUTTON_DRAW_NOFILL); } -/*-- 28.10.2003 13:26:39--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- long SpellDialog::Notify( NotifyEvent& rNEvt ) { /* #i38338# @@ -1117,9 +1095,8 @@ long SpellDialog::Notify( NotifyEvent& rNEvt ) } return SfxModelessDialog::Notify(rNEvt); } -/* -----------------10.09.2003 08:26----------------- - --------------------------------------------------*/ +//------------------------------------------------- void SpellDialog::InvalidateDialog() { if( bFocusLocked ) @@ -1151,15 +1128,13 @@ void SpellDialog::InvalidateDialog() SfxModelessDialog::Deactivate(); } -/*-- 10.09.2003 08:35:56--------------------------------------------------- - - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) { bool bRet = false; - if(!bUseSavedSentence /*&& aSentenceED.IsModified()*/) + if(!bUseSavedSentence) { - //apply changes and ignored text parts + //apply changes and ignored text parts rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(true), bRecheck); } aSentenceED.ResetIgnoreErrorsAt(); @@ -1244,7 +1219,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) } return bRet; } -/*-- 12.11.2003 15:21:25--------------------------------------------------- +/*------------------------------------------------------------------------- replace errrors that have a replacement in the ChangeAllList returns false if the result doesn't contain errors after the replacement -----------------------------------------------------------------------*/ @@ -1277,9 +1252,8 @@ bool SpellDialog::ApplyChangeAllList_Impl(SpellPortions& rSentence, bool &bHasRe } return bRet; } -/*-- 10.09.2003 10:40:21--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SentenceEditWindow_Impl::SentenceEditWindow_Impl( SpellDialog* pParent, const ResId& rResId ) : MultiLineEdit( pParent, rResId ), m_nErrorStart(0), @@ -1288,13 +1262,12 @@ SentenceEditWindow_Impl::SentenceEditWindow_Impl( SpellDialog* pParent, const Re { DisableSelectionOnFocus(); } -/*-- 10.09.2003 10:40:11--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- SentenceEditWindow_Impl::~SentenceEditWindow_Impl() { } -/*-- 20.10.2003 13:42:34--------------------------------------------------- +/*------------------------------------------------------------------------- The selection before inputting a key may have a range or not and it may be inside or outside of field or error attributes. A range may include the attribute partially, completely or together @@ -1386,7 +1359,6 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) bool bHasError = false; bool bHasFieldLeft = false; bool bHasErrorLeft = false; -// bool bInsideAttr = false; bool bHasRange = rCurrentSelection.HasRange(); sal_uInt8 nSelectionType = 0; // invalid type! @@ -1466,7 +1438,6 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) pErrorAttrLeft = pTextEngine->FindCharAttrib( aCursor, TEXTATTR_SPELL_ERROR ); bHasFieldLeft = pBackAttrLeft !=0; bHasErrorLeft = pErrorAttrLeft != 0; -// bInsideAttr = (bHasField || bHasError) && (bHasFieldLeft || bHasErrorLeft); ++aCursor.GetIndex(); } } @@ -1481,9 +1452,6 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) bool bBackspace = rKeyCode.GetCode() == KEY_BACKSPACE; sal_Int8 nAction = ACTION_CONTINUE; -// nAction = ACTION_UNDOEDIT -// nAction = ACTION_SELECTFIELD -// nAction = ACTION_EXPAND switch(nSelectionType) { // 1 - backspace delete any other @@ -1637,9 +1605,8 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) long nRet = bChange ? 1 : MultiLineEdit::PreNotify(rNEvt); return nRet; } -/*-- 10.09.2003 13:38:14--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) { if (bIgnoreCurrentError) @@ -1675,7 +1642,6 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) Reference<XDictionary> xChangeAll( SvxGetChangeAllList(), UNO_QUERY ); Reference<XDictionaryEntry> xEntry; -// Reference <XSpellAlternatives> xAlternatives; const SpellErrorDescription* pSpellErrorDescription = 0; if(pNextError) { @@ -1725,9 +1691,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) return bRet; } -/*-- 06.11.2003 13:30:26--------------------------------------------------- - - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::MoveErrorMarkTo(USHORT nStart, USHORT nEnd, bool bGrammarError) { TextEngine* pTextEngine = GetTextEngine(); @@ -1739,9 +1703,7 @@ void SentenceEditWindow_Impl::MoveErrorMarkTo(USHORT nStart, USHORT nEnd, bool b m_nErrorEnd = nEnd; } -/*-- 17.09.2003 10:13:08--------------------------------------------------- - - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageType eLanguage) { //calculate length changes @@ -1752,7 +1714,6 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT pTextEngine->UndoActionStart( TEXTUNDO_INSERT ); const TextCharAttrib* pErrorAttrib = pTextEngine->FindCharAttrib( TextPaM(0, m_nErrorStart), TEXTATTR_SPELL_ERROR ); DBG_ASSERT(pErrorAttrib, "no error attribute found"); -// Reference <XSpellAlternatives> xAlternatives; const SpellErrorDescription* pSpellErrorDescription = 0; if(pErrorAttrib) { @@ -1761,7 +1722,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT } const TextCharAttrib* pBackAttrib = pTextEngine->FindCharAttrib( TextPaM(0, m_nErrorStart), TEXTATTR_SPELL_BACKGROUND ); pTextEngine->ReplaceText( aSel, rNewWord ); - // + if(!m_nErrorStart) { //attributes following an error at the start of the text are not moved but expanded from the @@ -1804,16 +1765,14 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT SetAttrib( SpellLanguageAttrib(eLanguage), 0, m_nErrorStart, m_nErrorEnd ); pTextEngine->UndoActionEnd( TEXTUNDO_INSERT ); } -/* -----------------08.10.2003 13:18----------------- - --------------------------------------------------*/ +//------------------------------------------------- String SentenceEditWindow_Impl::GetErrorText() const { return GetTextEngine()->GetText(TextSelection(TextPaM(0, m_nErrorStart), TextPaM(0, m_nErrorEnd) )); } -/*-- 26.06.2008 10:54:13--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- const SpellErrorDescription* SentenceEditWindow_Impl::GetAlternatives() { TextPaM aCursor(0, m_nErrorStart); @@ -1821,9 +1780,8 @@ const SpellErrorDescription* SentenceEditWindow_Impl::GetAlternatives() GetTextEngine()->FindAttrib( aCursor, TEXTATTR_SPELL_ERROR)); return pAttrib ? &pAttrib->GetErrorDescription() : 0; } -/*-- 06.09.2004 10:50:32--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::RestoreCurrentError() { TextPaM aCursor(0, m_nErrorStart); @@ -1836,9 +1794,8 @@ void SentenceEditWindow_Impl::RestoreCurrentError() ChangeMarkedWord(rDesc.sErrorText, SvxLocaleToLanguage( rDesc.aLocale )); } } -/*-- 28.10.2003 14:44:10--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::SetAlternatives( Reference< XSpellAlternatives> xAlt ) { TextPaM aCursor(0, m_nErrorStart); @@ -1862,25 +1819,20 @@ void SentenceEditWindow_Impl::SetAlternatives( Reference< XSpellAlternatives> xA GetTextEngine()->SetAttrib( SpellErrorAttrib(aDesc), 0, m_nErrorStart, m_nErrorEnd ); } -/*-- 10.09.2003 14:43:02--------------------------------------------------- - - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd ) { GetTextEngine()->SetAttrib(rAttr, nPara, nStart, nEnd); } -/*-- 10.09.2003 14:43:02--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::SetText( const String& rStr ) { m_nErrorStart = m_nErrorEnd = 0; GetTextEngine()->SetText(rStr); -// InitScrollBars(); } -/*-- 08.10.2003 14:35:52--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- struct LanguagePosition_Impl { USHORT nPosition; @@ -1917,7 +1869,7 @@ void lcl_InsertBreakPosition_Impl( } rBreakPositions.push_back(LanguagePosition_Impl(nInsert, eLanguage)); } -/*-- 17.09.2003 14:26:59--------------------------------------------------- +/*------------------------------------------------------------------------- Returns the text in spell portions. Each portion contains text with an equal language and attribute. The spell alternatives are empty. -----------------------------------------------------------------------*/ @@ -1954,7 +1906,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore } aCursor.GetIndex()++; } - // + if(nTextLen && aBreakPositions.empty()) { //if all content has been overwritten the attributes may have been removed, too @@ -1982,7 +1934,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore aPortion1.sText = pTextEngine->GetText( TextSelection(TextPaM(0, nStart), TextPaM(0, aStart->nPosition))); bool bIsIgnoreError = m_aIgnoreErrorsAt.find( nStart ) != m_aIgnoreErrorsAt.end(); - if( bSetIgnoreFlag && bIsIgnoreError /*m_nErrorStart == nStart*/ ) + if( bSetIgnoreFlag && bIsIgnoreError ) { aPortion1.bIgnoreThisError = true; } @@ -2021,9 +1973,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore return aRet; } -/*-- 06.11.2003 11:30:10--------------------------------------------------- - - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::Undo() { SfxUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); @@ -2042,47 +1992,40 @@ void SentenceEditWindow_Impl::Undo() if(bSaveUndoEdit || SPELLUNDO_CHANGE_GROUP == nId) GetSpellDialog()->UpdateBoxes_Impl(); } -/*-- 06.11.2003 11:30:10--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::ResetUndo() { GetTextEngine()->ResetUndo(); } -/*-- 06.11.2003 12:30:41--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg ) { SfxUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); rUndoMgr.AddUndoAction(pAction, bTryMerg); GetSpellDialog()->aUndoPB.Enable(); } -/*-- 06.11.2003 12:38:44--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- USHORT SentenceEditWindow_Impl::GetUndoActionCount() { return GetTextEngine()->GetUndoManager().GetUndoActionCount(); } -/*-- 12.11.2003 12:12:38--------------------------------------------------- - - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::UndoActionStart( USHORT nId ) { GetTextEngine()->UndoActionStart(nId); } -/*-- 12.11.2003 12:12:38--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::UndoActionEnd( USHORT nId ) { GetTextEngine()->UndoActionEnd(nId); } -/*-- 12.11.2003 12:12:38--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::MoveErrorEnd(long nOffset) { if(nOffset > 0) @@ -2090,9 +2033,8 @@ void SentenceEditWindow_Impl::MoveErrorEnd(long nOffset) else m_nErrorEnd = m_nErrorEnd -(USHORT)- nOffset; } -/*-- 13.11.2003 15:15:19--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void SentenceEditWindow_Impl::SetUndoEditMode(bool bSet) { DBG_ASSERT(!bSet || m_bIsUndoEditMode != bSet, "SetUndoEditMode with equal values?"); @@ -2133,15 +2075,12 @@ void SentenceEditWindow_Impl::SetUndoEditMode(bool bSet) pSpellDialog->aChangePB.Enable(); } -/*-- 30.06.2008 14:15:19--------------------------------------------------- - - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- ExplainButton::~ExplainButton() { } -/*-- 30.06.2008 14:15:19--------------------------------------------------- - -----------------------------------------------------------------------*/ +//----------------------------------------------------------------------- void ExplainButton::RequestHelp( const HelpEvent& ) { Help::ShowBalloon( this, GetPosPixel(), m_sExplanation ); diff --git a/cui/source/dialogs/SpellDialog.src b/cui/source/dialogs/SpellDialog.src index b91bea0..3a10ead 100644 --- a/cui/source/dialogs/SpellDialog.src +++ b/cui/source/dialogs/SpellDialog.src @@ -221,22 +221,3 @@ ModelessDialog RID_SVXDLG_SPELLCHECK }; // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/charmap.src b/cui/source/dialogs/charmap.src index 835ab60..589d8a7 100644 --- a/cui/source/dialogs/charmap.src +++ b/cui/source/dialogs/charmap.src @@ -38,122 +38,6 @@ ModalDialog RID_SVXDLG_CHARMAP HelpId = SID_CHARMAP ; SvLook = TRUE ; Text [ en-US ] = "Special Characters"; -/* Size = MAP_APPFONT ( 297 , 169 ) ; */ - Size = MAP_APPFONT ( 297 , 153 ) ; - OutputSize = TRUE ; - Moveable = TRUE ; - Control CT_SHOWSET - { - HelpId = HID_CHARMAP_CTL_SHOWSET ; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 24 ) ; - Size = MAP_APPFONT ( 230 , 112 ) ; - TabStop = TRUE ; - Group = TRUE ; - }; - FixedText FT_FONT - { - Pos = MAP_APPFONT ( 6 , 8 ) ; - Size = MAP_APPFONT ( 33 , 8 ) ; - Text [ en-US ] = "~Font" ; - Left = TRUE ; - Group = TRUE ; - }; - ListBox LB_FONT - { - Pos = MAP_APPFONT ( 42 , 6 ) ; - Size = MAP_APPFONT ( 70 , 58 ) ; - Sort = TRUE ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - FixedText FT_SUBSET - { - Pos = MAP_APPFONT ( 118 , 8 ) ; - Size = MAP_APPFONT ( 42 , 8 ) ; - Text [ en-US ] = "~Subset"; - }; - ListBox LB_SUBSET - { - Pos = MAP_APPFONT ( 161 , 6 ) ; - Size = MAP_APPFONT ( 63 , 68 ) ; - Sort = FALSE ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - FixedText FT_SYMBOLE - { - Pos = MAP_APPFONT ( 6 , 140 ) ; - Size = MAP_APPFONT ( 38 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "Characters:"; - }; - Control CT_SHOWTEXT - { - HelpId = HID_CHARMAP_CTL_SHOWTEXT ; - Pos = MAP_APPFONT ( 46 , 137 ) ; -/* Size = MAP_APPFONT ( 190 , 16 ) ; */ - Size = MAP_APPFONT ( 244 , 16 ) ; - Group = TRUE ; - }; - Control CT_SHOWCHAR - { - HelpId = HID_CHARMAP_CTL_SHOWCHAR ; - Pos = MAP_APPFONT ( 241 , 79 ) ; - Size = MAP_APPFONT ( 50 , 44 ) ; - Group = TRUE ; - }; - FixedText FT_CHARCODE - { - Pos = MAP_APPFONT ( 241 , 126 ) ; - Size = MAP_APPFONT ( 50 , 8 ) ; - Center = TRUE ; - }; - OKButton BTN_CHAR_OK - { - Pos = MAP_APPFONT ( 242 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CHAR_CANCEL - { - Pos = MAP_APPFONT ( 242 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_CHAR_HELP - { - Pos = MAP_APPFONT ( 242 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - PushButton BTN_DELETE - { - Pos = MAP_APPFONT ( 242 , 63 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Delete"; - }; -/* - PushButton BT_ASSIGN - { - Pos = MAP_APPFONT ( 242 , 140 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Assign shortcut..."; - }; - FixedText FT_ASSIGN - { - Pos = MAP_APPFONT ( 6 , 156 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "Shortcut key: "; - }; - Control CT_ASSIGN - { - Pos = MAP_APPFONT ( 60 , 156 ) ; - Size = MAP_APPFONT ( 160 , 8 ) ; - }; -*/ }; // ********************************************************************** EOF diff --git a/cui/source/dialogs/commonlingui.src b/cui/source/dialogs/commonlingui.src index 1fb25d8..148cd89 100644 --- a/cui/source/dialogs/commonlingui.src +++ b/cui/source/dialogs/commonlingui.src @@ -134,20 +134,3 @@ Window RID_SVX_WND_COMMON_LINGU Text [ en-US ] = "~Close" ; }; }; - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index a2794ad..8d0dbad 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -264,12 +264,10 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe : mpDialog( pDialog ), aShowSet ( pDialog, ResId( CT_SHOWSET, *pResContext ) ), aShowText ( pDialog, ResId( CT_SHOWTEXT, *pResContext ) ), -// aShowShortcut ( pDialog, ResId( CT_ASSIGN, *pResContext ) ), aOKBtn ( pDialog, ResId( BTN_CHAR_OK, *pResContext ) ), aCancelBtn ( pDialog, ResId( BTN_CHAR_CANCEL, *pResContext ) ), aHelpBtn ( pDialog, ResId( BTN_CHAR_HELP, *pResContext ) ), aDeleteBtn ( pDialog, ResId( BTN_DELETE, *pResContext ) ), -// aAssignBtn ( pDialog, ResId( BT_ASSIGN, *pResContext ) ), aFontText ( pDialog, ResId( FT_FONT, *pResContext ) ), aFontLB ( pDialog, ResId( LB_FONT, *pResContext ) ), aSubsetText ( pDialog, ResId( FT_SUBSET, *pResContext ) ), @@ -277,7 +275,6 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe aSymbolText ( pDialog, ResId( FT_SYMBOLE, *pResContext ) ), aShowChar ( pDialog, ResId( CT_SHOWCHAR, *pResContext ), TRUE ), aCharCodeText ( pDialog, ResId( FT_CHARCODE, *pResContext ) ), -// aAssignText ( pDialog, ResId( FT_ASSIGN, *pResContext ) ), bOne( bOne_ ), pSubsetMap( NULL ) { @@ -342,7 +339,6 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe aShowSet.SetHighlightHdl( LINK( this, SvxCharMapData, CharHighlightHdl ) ); aShowSet.SetPreSelectHdl( LINK( this, SvxCharMapData, CharPreSelectHdl ) ); aDeleteBtn.SetClickHdl( LINK( this, SvxCharMapData, DeleteHdl ) ); -// aAssignBtn.SetClickHdl( LINK( this, SvxCharMapData, AssignHdl ) ); if( SvxShowCharSet::getSelectedChar() == ' ') aOKBtn.Disable(); diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 11b21f0..b38e4bb 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -85,7 +85,6 @@ void FmSearchDialog::initCommon( const Reference< XResultSet >& _rxCursor ) m_aHalfFullFormsCJK.Hide(); // never ignore the width (ignoring is expensive) if the option is not available at all - // 04.12.2001 - 91973 - fs@openoffice.org m_pSearchEngine->SetIgnoreWidthCJK( sal_False ); } @@ -630,7 +629,6 @@ void FmSearchDialog::EnableSearchUI(sal_Bool bEnable) if ( !bEnable ) { // if one of my children has the focus, remember it - // 104332 - 2002-10-17 - fs@openoffice.org Window* pFocusWindow = Application::GetFocusWindow( ); if ( pFocusWindow && IsChild( pFocusWindow ) ) m_pPreSearchFocus = pFocusWindow; @@ -665,7 +663,6 @@ void FmSearchDialog::EnableSearchUI(sal_Bool bEnable) { // this means we're preparing for starting a search // In this case, EnableSearchForDependees disabled the search button // But as we're about to use it for cancelling the search, we really need to enable it, again - // 07.12.2001 - 95246 - fs@openoffice.org m_pbSearchAgain.Enable( sal_True ); } } @@ -678,7 +675,6 @@ void FmSearchDialog::EnableSearchUI(sal_Bool bEnable) if ( bEnable ) { // restore focus - // 104332 - 2002-10-17 - fs@openoffice.org if ( m_pPreSearchFocus ) { m_pPreSearchFocus->GrabFocus(); @@ -809,7 +805,7 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, FmSearchProgress*, pProgress) : RID_SVXERR_SEARCH_NORECORD; ErrorBox(this, CUI_RES(nErrorId)).Execute(); } - // KEIN break ! + // NO break ! case FmSearchProgress::STATE_CANCELED: EnableSearchUI(sal_True); if (m_lnkCanceledNotFoundHdl.IsSet()) diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index d1ff451..b90d838 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -1037,7 +1037,6 @@ IMPL_LINK( TPGalleryThemeProperties, ClickSearchHdl, void *, EMPTYARG ) if ( xFolderPicker.is() ) { -// svt::SetDialogHelpId( xFolderPicker, HID_GALLERY_NEWTHEME_FINDFILES ); String aDlgPathName( SvtPathOptions().GetGraphicPath() ); xFolderPicker->setDisplayDirectory(aDlgPathName); @@ -1148,7 +1147,6 @@ IMPL_LINK( TPGalleryThemeProperties, ClickTakeHdl, void*, EMPTYARG ) if( !aLbxFound.GetSelectEntryCount() || !bEntriesFound ) { SvxOpenGraphicDialog aDlg(String( RTL_CONSTASCII_USTRINGPARAM( "Gallery" ) ) ); -// aDlg.SetDialogHelpId( HID_GALLERY_NEWTHEME_ADDFILES ); aDlg.EnableLink(sal_False); aDlg.AsLink(sal_False); diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 2359a4d..e3c58e1 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -238,26 +238,6 @@ void SvxHpLinkDlg::Move() Window::Move(); } -/*long SvxHpLinkDlg::PreNotify( NotifyEvent& rNEvt ) -{ - long nRet = 0; - - if( rNEvt.GetType() == EVENT_KEYINPUT ) - { - DBG_ASSERT( rNEvt.GetKeyEvent(), "-SvxHpLinkDlg::PreNotify(): no KeyEvent for key event?!" ); - - const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - - if( KEY_MOD2 == pKEvt->GetKeyCode().GetModifier() && pKEvt->GetCharCode() && HandleShortCutKey( *pKEvt ) ) - nRet = 1; - } - - if( !nRet ) - nRet = IconChoiceDialog::PreNotify( rNEvt ); - - return nRet; -}*/ - /************************************************************************* |* |* Click on Apply-button diff --git a/cui/source/dialogs/dlgname.src b/cui/source/dialogs/dlgname.src index ee29629..962bf20 100644 --- a/cui/source/dialogs/dlgname.src +++ b/cui/source/dialogs/dlgname.src @@ -242,28 +242,3 @@ ModalDialog RID_SVXDLG_MESSBOX }; }; // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/grfflt.src b/cui/source/dialogs/grfflt.src index 2c49939..d408d4f 100644 --- a/cui/source/dialogs/grfflt.src +++ b/cui/source/dialogs/grfflt.src @@ -420,35 +420,3 @@ ModalDialog RID_SVX_GRFFILTER_DLG_EMBOSS TabStop = TRUE ; }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 2bd8dcd..43f1e39 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -600,19 +600,15 @@ namespace svx m_pPlayground->SetButtonHandler( SvxCommonLinguisticControl::eOptions, LINK( this, HangulHanjaConversionDialog, OnOption ) ); m_pPlayground->GetButton( SvxCommonLinguisticControl::eOptions )->Show(); -// m_pPlayground->EnableButton( SvxCommonLinguisticControl::eOptions, true ); if ( editeng::HangulHanjaConversion::eHangulToHanja == _ePrimaryDirection ) { -// m_aHanjaOnly.Enable( sal_False ); m_pIgnoreNonPrimary = &m_aHangulOnly; } else { -// m_aHangulOnly.Enable( sal_False ); m_pIgnoreNonPrimary = &m_aHanjaOnly; } -// m_pIgnoreNonPrimary->Check(); // initial focus FocusSuggestion( ); @@ -894,8 +890,6 @@ namespace svx //------------------------------------------------------------------------- sal_Bool HangulHanjaConversionDialog::GetUseBothDirections( ) const { -// DBG_ASSERT( m_pIgnoreNonPrimary, "HangulHanjaConversionDialog::GetUseBothDirections: where's the check box pointer?" ); -// return m_pIgnoreNonPrimary ? !m_pIgnoreNonPrimary->IsChecked( ) : sal_True; return !m_aHangulOnly.IsChecked() && !m_aHanjaOnly.IsChecked(); } @@ -1173,7 +1167,6 @@ namespace svx m_aDictsLB.SetWindowBits( WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE ); m_aDictsLB.SetSelectionMode( SINGLE_SELECTION ); m_aDictsLB.SetHighlightRange(); -// m_aDictsLB.SetHelpId( xxx ); m_aDictsLB.SetSelectHdl( LINK( this, HangulHanjaOptionsDialog, DictsLB_SelectHdl ) ); m_aDictsLB.SetDeselectHdl( LINK( this, HangulHanjaOptionsDialog, DictsLB_SelectHdl ) ); diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index b47d675..432be60 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -136,7 +136,6 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& LogicToPixel( Size ( 176 - COL_DIFF, 60), MAP_APPFONT ) ); maCbbPath.Show(); maCbbPath.SetBaseURL(SvtPathOptions().GetWorkPath()); -// maCbbPath.SetHelpId( HID_HYPERDLG_DOC_PATH ); // set defaults maRbtEditNow.Check(); @@ -391,7 +390,6 @@ void SvxHyperlinkNewDocTp::DoApply () SfxStringItem aReferer( SID_REFERER, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) ); SfxStringItem aFrame( SID_TARGETNAME, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "_blank" ) ) ); - //SfxBoolItem aFrame( SID_OPEN_NEW_VIEW, TRUE ); String aStrFlags ( sal_Unicode('S') ); if ( maRbtEditLater.IsChecked() ) @@ -413,7 +411,6 @@ void SvxHyperlinkNewDocTp::DoApply () pViewFrame = pItem->GetFrame(); if (pViewFrame) { - //SfxViewFrame *pViewFrame = pFrame->GetCurrentViewFrame(); SfxStringItem aNewName( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) ); pViewFrame->GetDispatcher()->Execute( SID_SAVEASDOC, diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 034e19e..3f5018c 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -311,51 +311,6 @@ IMPL_LINK ( SvxHyperlinkMailTp, ClickAdrBookHdl_Impl, void *, EMPTYARG ) } -/* uno::Reference< frame::XDispatchProvider > xProv( pViewFrame->GetFrame().GetFrameInterface(), uno::UNO_QUERY ); - if ( xProv.is() ) - { -!!! (pb) we need a new config item here - SfxAppIniManagerProperty aProp; - GetpApp()->Property( aProp ); - if( !aProp.GetIniManager() ) - return ( 0L ); - - String aAddressBook = aProp.GetIniManager()->Get( SFX_KEY_ADDRESSBOOK ); - INetURLObject aObj; - aObj.SetSmartProtocol( INET_PROT_FILE ); - aObj.SetURL( aAddressBook.GetToken( 0, sal_Unicode( ';' ) ) ); - - String aMark( RTL_CONSTASCII_USTRINGPARAM( "db:Table;" ) ); - aMark += aAddressBook.GetToken( 1, sal_Unicode( ';' ) ); - aObj.SetMark( aMark ); - - util::URL aURL; - aURL.Complete = ::rtl::OUString( aObj.GetMainURL( INetURLObject::NO_DECODE ) ); - - uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - if( xFactory.is() ) - { - uno::Reference< util::XURLTransformer > xTrans( xFactory->createInstance - ( OUString::createFromAscii( "com.sun.star.util.URLTransformer" ) ), - uno::UNO_QUERY); - xTrans->parseStrict( aURL ); - - uno::Reference< frame::XDispatch > aDisp = xProv->queryDispatch( aURL, - OUString::createFromAscii( "_beamer" ), - frame::FrameSearchFlag::GLOBAL | - frame::FrameSearchFlag::CREATE ); - if ( aDisp.is() ) - { - uno::Sequence< beans::PropertyValue > aArgs(1); - beans::PropertyValue* pArg = aArgs.getArray(); - pArg[0].Name = DEFINE_CONST_UNICODE("Referer"); - pArg[0].Value = uno::makeAny( OUString( DEFINE_CONST_UNICODE("private:user") ) ); - aDisp->dispatch( aURL, aArgs ); - } - } - } -*/ - return( 0L ); } diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 30a6a9f..4b9146f 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -316,27 +316,6 @@ BOOL SvxHlinkDlgMarkWnd::RefreshFromDoc( OUString aURL ) } return (mnError==0); } -/* -void SvxHlinkDlgMarkWnd::Error(int nNr) -{ - switch(nNr) - { - case 0: - { - Rectangle aDrawRect( Point( 0, 0 ), maLbTree.GetSizePixel() ); - //maLbTree.SetTextColor( Color(COL_BLACK) ); - //maLbTree.DrawText( aDrawRect, "Keine Ziele im Dokument vorhanden.", TEXT_DRAW_LEFT);// | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); - maLbTree.DrawText( Point(0,0), "Keine Ziele im Dokument vorhanden."); - maLbTree.DrawLine(aDrawRect.TopLeft(), aDrawRect.BottomRight() ); - } - break; - case 1: - Rectangle aDrawRect( Point( 0, 0 ), maLbTree.GetSizePixel() ); - maLbTree.DrawText( aDrawRect, "Das Dokument konnte nicht ge�ffnet werden.", TEXT_DRAW_LEFT | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); - break; - } -} -*/ /************************************************************************* |* |* Fill Tree-Control diff --git a/cui/source/dialogs/hlmarkwn.hrc b/cui/source/dialogs/hlmarkwn.hrc index 8122245..60be47a 100644 --- a/cui/source/dialogs/hlmarkwn.hrc +++ b/cui/source/dialogs/hlmarkwn.hrc @@ -29,6 +29,3 @@ #define BT_CLOSE 2 #define TLB_MARK 3 -//#define HYPERLINK_BMP_EXPAND 301 -//#define HYPERLINK_BMP_COLLAPSE 302 - diff --git a/cui/source/dialogs/hlmarkwn.src b/cui/source/dialogs/hlmarkwn.src index 5454312..2df9567 100644 --- a/cui/source/dialogs/hlmarkwn.src +++ b/cui/source/dialogs/hlmarkwn.src @@ -76,20 +76,3 @@ String RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN { Text [ en-US ] = "Couldn't open the document." ; }; - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index bbe131c..ce9e2d2 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -448,7 +448,6 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) SID_ATTR_MACROITEM ); pItemSet->Put ( aItem, SID_ATTR_MACROITEM ); - // --> PB 2006-01-13 #123474# /* disable HyperLinkDlg for input while the MacroAssignDlg is working because if no JAVA is installed an error box occurs and then it is possible to close the HyperLinkDlg before its child (MacroAssignDlg) -> GPF @@ -472,7 +471,6 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) pMacroPage->AddEvent( String( CUI_RESSTR(RID_SVXSTR_HYPDLG_MACROACT3) ), SFX_EVENT_MOUSEOUT_OBJECT); - // --> PB 2006-01-13 #123474# if ( bIsInputEnabled ) GetParent()->EnableInput( TRUE ); // <-- diff --git a/cui/source/dialogs/hyperdlg.hrc b/cui/source/dialogs/hyperdlg.hrc index 6d6c476..3ba0731 100644 --- a/cui/source/dialogs/hyperdlg.hrc +++ b/cui/source/dialogs/hyperdlg.hrc @@ -97,4 +97,3 @@ #define COL_OLD 54 #define COL_2 63 #define COL_DIFF (COL_2 - COL_OLD) - diff --git a/cui/source/dialogs/hyperdlg.src b/cui/source/dialogs/hyperdlg.src index 614c3a4..0da747e 100644 --- a/cui/source/dialogs/hyperdlg.src +++ b/cui/source/dialogs/hyperdlg.src @@ -884,85 +884,3 @@ Image RID_SVXBMP_HLDOCNTP_H ImageBitmap = Bitmap { File = "hldocntp_h.bmp" ; }; MASKCOLOR }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 45c438e..fd2481e 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -75,7 +75,6 @@ HyphenEdit_Impl::HyphenEdit_Impl( Window* pParent, const ResId& rResId ) : void HyphenEdit_Impl::KeyInput( const KeyEvent& rKEvt ) { -// sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier(); sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); switch ( nCode ) @@ -105,7 +104,6 @@ void HyphenEdit_Impl::KeyInput( const KeyEvent& rKEvt ) struct SvxHyphenWordDialog_Impl { SvxHyphenWordDialog * m_pDialog; -// Window * m_pParent; FixedText aWordFT; HyphenEdit_Impl aWordEdit; diff --git a/cui/source/dialogs/hyphen.src b/cui/source/dialogs/hyphen.src index f90048a..d87b92b 100755 --- a/cui/source/dialogs/hyphen.src +++ b/cui/source/dialogs/hyphen.src @@ -122,5 +122,3 @@ ModalDialog RID_SVXDLG_HYPHENATE TABSTOP = TRUE ; }; }; - - diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 034ef6b..0cae816 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -268,12 +268,12 @@ void IconChoicePage::DataChanged( const DataChangedEvent& rDCEvt ) IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, const EIconChoicePos ePos, - const SfxItemSet *pItemSet )//, BOOL bEditFmt, const String *pUserButtonText = 0 ) + const SfxItemSet *pItemSet ) : ModalDialog ( pParent, rResId ), meChoicePos ( ePos ), maIconCtrl ( this, WB_3DLOOK | WB_ICON | WB_BORDER | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | - /* WB_NOSELECTION | */ WB_NODRAGSELECTION | WB_TABSTOP ), + WB_NODRAGSELECTION | WB_TABSTOP ), mnCurrentPageId ( USHRT_MAX ), aOKBtn ( this, WB_DEFBUTTON ), @@ -292,10 +292,8 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, bModified ( FALSE ), bItemsReset ( FALSE ) { - // IconChoiceCtrl-Settings - //maIconCtrl.SetBackground ( Wallpaper( Color (146, 146, 186) ) ); - maIconCtrl.SetStyle (WB_3DLOOK | WB_ICON | WB_BORDER | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | /* WB_NOSELECTION | */ WB_NODRAGSELECTION | WB_TABSTOP | WB_CLIPCHILDREN ); + maIconCtrl.SetStyle (WB_3DLOOK | WB_ICON | WB_BORDER | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | WB_NODRAGSELECTION | WB_TABSTOP | WB_CLIPCHILDREN ); SetCtrlPos ( meChoicePos ); maIconCtrl.SetClickHdl ( LINK ( this, IconChoiceDialog , ChosePageHdl_Impl ) ); maIconCtrl.Show(); @@ -327,26 +325,6 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, // ----------------------------------------------------------------------- -/* -IconChoiceDialog ::IconChoiceDialog ( SfxViewFrame *pViewFrame, Window* pParent, const ResId &rResId, - const SfxItemSet * = 0, BOOL bEditFmt = FALSE, - const String *pUserButtonText = 0 ) -: meChoicePos ( PosLeft ), // Default erst ma Links - maIconCtrl ( this, Die_Winbits ), - aOKBtn ( this ), - pUserBtn ( pUserButtonText? new PushButton(this): 0 ), - aCancelBtn ( this ), - aHelpBtn ( this ), - aResetBtn ( this ), - aBaseFmtBtn ( this ), - mnCurrentPageId ( 0 ) -{ - FreeResource(); -} -*/ - -// ----------------------------------------------------------------------- - IconChoiceDialog ::~IconChoiceDialog () { ULONG i; @@ -381,18 +359,6 @@ IconChoiceDialog ::~IconChoiceDialog () delete pData; } - // remove Pagelist -/* for ( i=0; i<maPageList.Count(); i++ ) - { - IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i ); - - if ( pData->bOnDemand ) - delete ( SfxItemSet * )&( pData->pPage->GetItemSet() ); - - delete pData->pPage; - delete pData; - }*/ - // remove Userdata from Icons for ( i=0; i<maIconCtrl.GetEntryCount(); i++) { @@ -1250,7 +1216,7 @@ void IconChoiceDialog::Start_Impl() USHORT nActPage; if ( mnCurrentPageId == 0 || mnCurrentPageId == USHRT_MAX ) - nActPage = maPageList.GetObject(0)->nId;//First()->nId; + nActPage = maPageList.GetObject(0)->nId; else nActPage = mnCurrentPageId; diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 13230b7..6c69884 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -115,7 +115,6 @@ SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT ); aTbLinks.Resize(); // OS: Hack fuer richtige Selektion - //JP 24.02.99: UpdateTimer fuer DDE-/Grf-Links, auf die gewarted wird aUpdateTimer.SetTimeoutHdl( LINK( this, SvBaseLinksDlg, UpdateWaitingHdl ) ); aUpdateTimer.SetTimeout( 1000 ); @@ -126,7 +125,6 @@ SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml Automatic().SetClickHdl( LINK( this, SvBaseLinksDlg, AutomaticClickHdl ) ); Manual().SetClickHdl( LINK( this, SvBaseLinksDlg, ManualClickHdl ) ); UpdateNow().SetClickHdl( LINK( this, SvBaseLinksDlg, UpdateNowClickHdl ) ); -// OpenSource().SetClickHdl( LINK( this, SvBaseLinksDlg, OpenSourceClickHdl ) ); ChangeSource().SetClickHdl( LINK( this, SvBaseLinksDlg, ChangeSourceClickHdl ) ); if(!bHtmlMode) BreakLink().SetClickHdl( LINK( this, SvBaseLinksDlg, BreakLinkClickHdl ) ); @@ -337,15 +335,6 @@ IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG ) return 0; } -/* -IMPL_LINK_INLINE_START( SvBaseLinksDlg, OpenSourceClickHdl, PushButton *, pPushButton ) -{ - DBG_ASSERT( !this, "Open noch nicht impl." ); - return 0; -} -IMPL_LINK_INLINE_END( SvBaseLinksDlg, OpenSourceClickHdl, PushButton *, pPushButton ) -*/ - IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) { (void)pPushButton; @@ -485,7 +474,6 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) Automatic().Disable(); Manual().Disable(); UpdateNow().Disable(); -// OpenSource().Disable(); ChangeSource().Disable(); BreakLink().Disable(); @@ -502,8 +490,6 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) { (void)pTimer; -// for( SvLBoxEntry* pBox = Links().First(); pBox; -// pBox = Links().Next( pBox )) Links().SetUpdateMode(FALSE); for( ULONG nPos = Links().GetEntryCount(); nPos; ) @@ -529,7 +515,6 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) if( _pLink && _pLink->WasLastEditOK() ) { - // JP 09.01.98: // StarImpress/Draw tauschen die LinkObjecte selbst aus! // also suche den Link im Manager, wenn der nicht mehr existiert, // dann setze fuelle die Liste komplett neu. Ansonsten braucht diff --git a/cui/source/dialogs/multipat.src b/cui/source/dialogs/multipat.src index 45695d8..99611c3 100644 --- a/cui/source/dialogs/multipat.src +++ b/cui/source/dialogs/multipat.src @@ -125,26 +125,3 @@ String RID_SVXSTR_MULTIFILE_DBL_ERR { Text [ en-US ] = "The file %1 already exists." ; }; - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/newtabledlg.src b/cui/source/dialogs/newtabledlg.src index 67e6425..037d915 100644 --- a/cui/source/dialogs/newtabledlg.src +++ b/cui/source/dialogs/newtabledlg.src @@ -99,37 +99,3 @@ ModalDialog RID_SVX_NEWTABLE_DLG TabStop = TRUE ; }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index 0878eb1..07283c4 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -69,8 +69,6 @@ public: PasswordReenterEdit_Impl::PasswordReenterEdit_Impl( Window * pParent, const ResId &rResId ) : Edit( pParent, rResId ) { -// currently the spec does not want to display this text anymore... -// m_aDefaultTxt = String( CUI_RES( STR_PASSWD_MUST_BE_CONFIRMED ) ); } @@ -83,16 +81,7 @@ void PasswordReenterEdit_Impl::Paint( const Rectangle& rRect ) { if (GetText().Len() == 0) { - Push( /*PUSH_FILLCOLOR | PUSH_TEXTFILLCOLOR |*/ PUSH_TEXTCOLOR ); -/* - Color aFillColor( GetParent()->GetBackground().GetColor() ); - SetLineColor(); // don't draw a border when painting the Edit field rectangle with the new background color - SetFillColor( aFillColor ); - SetTextFillColor( aFillColor ); - SetTextColor( GetParent()->GetTextColor() ); // use plain text color even if the Edit field is disabled (it is hard to read the text otherwise) - - DrawRect( Rectangle( Point(), GetOutputSizePixel() ) ); -*/ + Push( PUSH_TEXTCOLOR ); SetTextColor( Color( COL_GRAY ) ); DrawText( Point(), m_aDefaultTxt ); @@ -114,7 +103,6 @@ struct PasswordToOpenModifyDialog_Impl Edit m_aPasswdToOpenED; FixedText m_aReenterPasswdToOpenFT; PasswordReenterEdit_Impl m_aReenterPasswdToOpenED; -// FixedImage m_aPasswdToOpenMatchFI; FixedText m_aPasswdNoteFT; FixedLine m_aButtonsFL; MoreButton m_aMoreFewerOptionsBTN; @@ -126,7 +114,6 @@ struct PasswordToOpenModifyDialog_Impl Edit m_aPasswdToModifyED; FixedText m_aReenterPasswdToModifyFT; PasswordReenterEdit_Impl m_aReenterPasswdToModifyED; -// FixedImage m_aPasswdToModifyMatchFI; String m_aOneMismatch; String m_aTwoMismatch; @@ -136,7 +123,6 @@ struct PasswordToOpenModifyDialog_Impl bool m_bIsPasswordToModify; -// DECL_LINK( ModifyHdl, Edit * ); DECL_LINK( OkBtnClickHdl, OKButton * ); PasswordToOpenModifyDialog_Impl( PasswordToOpenModifyDialog * pParent, @@ -156,7 +142,6 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( m_aPasswdToOpenED ( pParent, CUI_RES( ED_PASSWD_TO_OPEN ) ), m_aReenterPasswdToOpenFT ( pParent, CUI_RES( FT_REENTER_PASSWD_TO_OPEN ) ), m_aReenterPasswdToOpenED ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_OPEN ) ), -// m_aPasswdToOpenMatchFI ( pParent, CUI_RES( FI_PASSWD_TO_OPEN_MATCH ) ), m_aPasswdNoteFT ( pParent, CUI_RES( FT_PASSWD_NOTE ) ), m_aButtonsFL ( pParent, CUI_RES( FL_BUTTONS ) ), m_aMoreFewerOptionsBTN ( pParent, CUI_RES( BTN_MORE_FEWER_OPTIONS ) ), @@ -168,35 +153,17 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( m_aPasswdToModifyED ( pParent, CUI_RES( ED_PASSWD_TO_MODIFY ) ), m_aReenterPasswdToModifyFT ( pParent, CUI_RES( FT_REENTER_PASSWD_TO_MODIFY ) ), m_aReenterPasswdToModifyED ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_MODIFY ) ), -// m_aPasswdToModifyMatchFI ( pParent, CUI_RES( FI_PASSWD_TO_MODIFY_MATCH ) ) m_aOneMismatch( CUI_RES( STR_ONE_PASSWORD_MISMATCH ) ), m_aTwoMismatch( CUI_RES( STR_TWO_PASSWORDS_MISMATCH ) ), m_aInvalidStateForOkButton( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON ) ), m_aInvalidStateForOkButton_v2( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON_V2 ) ), m_bIsPasswordToModify( bIsPasswordToModify ) { -/* - const sal_Bool bHighContrast = pParent->GetSettings().GetStyleSettings().GetHighContrastMode(); - const Image aImage( CUI_RES( bHighContrast ? IMG_PASSWD_MATCH_HC : IMG_PASSWD_MATCH ) ); - m_aPasswdToOpenMatchFI.SetImage( aImage ); - m_aPasswdToModifyMatchFI.SetImage( aImage ); -*/ - m_aMoreFewerOptionsBTN.SetMoreText( String( CUI_RES( STR_MORE_OPTIONS ) ) ); m_aMoreFewerOptionsBTN.SetLessText( String( CUI_RES( STR_FEWER_OPTIONS ) ) ); -#if 0 - Link aModifyLink = LINK( this, PasswordToOpenModifyDialog_Impl, ModifyHdl ); - m_aPasswdToOpenED.SetModifyHdl( aModifyLink ); - m_aReenterPasswdToOpenED.SetModifyHdl( aModifyLink ); - m_aPasswdToModifyED.SetModifyHdl( aModifyLink ); - m_aReenterPasswdToModifyED.SetModifyHdl( aModifyLink ); -#endif - m_aOk.SetClickHdl( LINK( this, PasswordToOpenModifyDialog_Impl, OkBtnClickHdl ) ); -// m_aOk.Enable( FALSE ); - if (nMaxPasswdLen) { m_aPasswdToOpenED.SetMaxTextLen( nMaxPasswdLen ); @@ -209,8 +176,6 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( m_aPasswdToOpenED.GrabFocus(); -// ModifyHdl( NULL ); - m_aMoreFewerOptionsBTN.Enable( bIsPasswordToModify ); if (!bIsPasswordToModify) m_aMoreFewerOptionsBTN.Hide( TRUE ); @@ -221,32 +186,6 @@ PasswordToOpenModifyDialog_Impl::~PasswordToOpenModifyDialog_Impl() { } -#if 0 -IMPL_LINK( PasswordToOpenModifyDialog_Impl, ModifyHdl, Edit *, EMPTYARG /*pEdit*/ ) -{ - // force repaints to get the m_aDefaultTxt displayed again - if (m_aReenterPasswdToOpenED.GetText().Len() == 0) - m_aReenterPasswdToOpenED.Invalidate(); - if (m_aReenterPasswdToModifyED.GetText().Len() == 0) - m_aReenterPasswdToModifyED.Invalidate(); - - const sal_Int32 nPasswdToOpenLen = m_aPasswdToOpenED.GetText().Len(); - const sal_Int32 nPasswdToModifyLen = m_aPasswdToModifyED.GetText().Len(); - - const bool bBothEmpty = nPasswdToOpenLen == 0 && nPasswdToModifyLen == 0; - const bool bToOpenMatch = m_aPasswdToOpenED.GetText() == m_aReenterPasswdToOpenED.GetText(); - const bool bToModifyMatch = m_aPasswdToModifyED.GetText() == m_aReenterPasswdToModifyED.GetText(); - - m_aOk.Enable( bToOpenMatch && bToModifyMatch && !bBothEmpty ); - -// m_aPasswdToOpenMatchFI.Enable( bToOpenMatch && !bBothEmpty ); -// m_aPasswdToModifyMatchFI.Enable( bToModifyMatch && !bBothEmpty ); - - return 0; -} -#endif - - IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG /*pBtn*/ ) { bool bInvalidState = !m_aOpenReadonlyCB.IsChecked() && diff --git a/cui/source/dialogs/passwdomdlg.hrc b/cui/source/dialogs/passwdomdlg.hrc index 9ce3dab..bdbbcdc 100755 --- a/cui/source/dialogs/passwdomdlg.hrc +++ b/cui/source/dialogs/passwdomdlg.hrc @@ -58,4 +58,3 @@ #define STR_INVALID_STATE_FOR_OK_BUTTON_V2 57 #endif - diff --git a/cui/source/dialogs/passwdomdlg.src b/cui/source/dialogs/passwdomdlg.src index 355051c..532284f 100755 --- a/cui/source/dialogs/passwdomdlg.src +++ b/cui/source/dialogs/passwdomdlg.src @@ -81,13 +81,7 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY Border = TRUE ; PassWord = TRUE ; }; -/* - FixedImage FI_PASSWD_TO_OPEN_MATCH - { - Pos = MAP_APPFONT ( 150, 42 ) ; - Size = MAP_APPFONT ( 12 , 12 ) ; - }; -*/ + FixedText FT_PASSWD_NOTE { Pos = MAP_APPFONT( 6, 80 ); @@ -176,13 +170,6 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY Border = TRUE ; PassWord = TRUE ; }; -/* - FixedImage FI_PASSWD_TO_MODIFY_MATCH - { - Pos = MAP_APPFONT ( 150, 224 ) ; - Size = MAP_APPFONT ( 12 , 12 ) ; - }; -*/ String STR_PASSWD_MUST_BE_CONFIRMED { @@ -213,16 +200,4 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY { Text [ en-US ] = "Please enter a password to open or to modify, or check the open read-only option to continue." ; }; -/* - Image IMG_PASSWD_MATCH - { - ImageBitmap = Bitmap { File = "apply.png"; }; - }; - - Image IMG_PASSWD_MATCH_HC - { - ImageBitmap = Bitmap { File = "apply_h.png"; }; - }; -*/ }; - diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 517e778..ca434a0 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -164,53 +164,6 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, String* pName = (String*) aSupplementTable.Get( nFormat ); String aName; -#ifdef WNT -/* - if( !pName && - ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE_OLE || nFormat == SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ) ) - { - BOOL IsClipboardObject_Impl( SotDataObject * ); - if( IsClipboardObject_Impl( pDataObj ) ) - { - IDataObject * pDO = NULL; - OleGetClipboard( &pDO ); - if( pDO ) - { - FORMATETC fe; - STGMEDIUM stm; - (fe).cfFormat=RegisterClipboardFormat( "Object Descriptor" ); - (fe).dwAspect=DVASPECT_CONTENT; - (fe).ptd=NULL; - (fe).tymed=TYMED_HGLOBAL; - (fe).lindex=-1; - - if (SUCCEEDED(pDO->GetData(&fe, &stm))) - { - LPOBJECTDESCRIPTOR pOD=(LPOBJECTDESCRIPTOR)GlobalLock(stm.hGlobal); - if( pOD->dwFullUserTypeName ) - { - OLECHAR * pN = (OLECHAR *)(((BYTE *)pOD) + pOD->dwFullUserTypeName); - aName.Append( pN ); - pName = &aName; - // set format to ole object - nFormat = SOT_FORMATSTR_ID_EMBED_SOURCE_OLE; - } - if( pOD->dwSrcOfCopy ) - { - OLECHAR * pN = (OLECHAR *)(((BYTE *)pOD) + pOD->dwSrcOfCopy); - aSourceName.Append( *pN++ ); - } - else - aSourceName = String( ResId( STR_UNKNOWN_SOURCE, SOAPP->GetResMgr() ) ); - GlobalUnlock(stm.hGlobal); - ReleaseStgMedium(&stm); - } - } - } - } -*/ -#endif - // if there is an "Embed Source" or and "Embedded Object" on the // Clipboard we read the Description and the Source of this object // from an accompanied "Object Descriptor" format on the clipboard diff --git a/cui/source/dialogs/postdlg.hrc b/cui/source/dialogs/postdlg.hrc index c027212..e8d1ee7 100644 --- a/cui/source/dialogs/postdlg.hrc +++ b/cui/source/dialogs/postdlg.hrc @@ -48,4 +48,3 @@ #endif - diff --git a/cui/source/dialogs/postdlg.src b/cui/source/dialogs/postdlg.src index c05b451..69fa33b 100644 --- a/cui/source/dialogs/postdlg.src +++ b/cui/source/dialogs/postdlg.src @@ -122,7 +122,6 @@ ModalDialog RID_SVXDLG_POSTIT String STR_NOTIZ_INSERT { /* ### ACHTUNG: Neuer Text in Resource? Notiz einfügen : Notiz einf³gen */ - /* ### ACHTUNG: Neuer Text in Resource? Notiz einfügen : Notiz einf³gen */ Text [ en-US ] = "Insert note" ; }; }; diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index c9996a4..963451b 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -267,7 +267,6 @@ void SFTreeListBox::Init( const ::rtl::OUString& language ) Reference< browse::XBrowseNode > langEntries = getLangNodeFromRootNode( children[ n ], lang ); - /*SvLBoxEntry* pBasicManagerRootEntry =*/ insertEntry( uiName, app ? IMG_HARDDISK : IMG_DOCUMENT, 0, true, std::auto_ptr< SFEntry >(new SFEntry( OBJTYPE_SFROOT, langEntries, xDocumentModel )), factoryURL ); } @@ -467,18 +466,6 @@ void __EXPORT SFTreeListBox::RequestingChilds( SvLBoxEntry* pEntry ) void __EXPORT SFTreeListBox::ExpandedHdl() { -/* SvLBoxEntry* pEntry = GetHdlEntry(); - DBG_ASSERT( pEntry, "Was wurde zugeklappt?" ); - - if ( !IsExpanded( pEntry ) && pEntry->HasChildsOnDemand() ) - { - SvLBoxEntry* pChild = FirstChild( pEntry ); - while ( pChild ) - { - GetModel()->Remove( pChild ); // Ruft auch den DTOR - pChild = FirstChild( pEntry ); - } - }*/ } // ---------------------------------------------------------------------------- @@ -1166,21 +1153,6 @@ void SvxScriptOrgDialog::renameEntry( SvLBoxEntry* pEntry ) { ::rtl::OUString aUserSuppliedName = xNewDlg->GetObjectName(); bValid = TRUE; - /* - for( sal_Int32 index = 0; index < childNodes.getLength(); index++ ) - { - if ( (aUserSuppliedName+extn).equals( childNodes[index]->getName() ) ) - { - bValid = FALSE; - String aError( m_createErrStr ); - aError.Append( m_createDupStr ); - ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); - aErrorBox.SetText( m_createErrTitleStr ); - aErrorBox.Execute(); - xNewDlg->SetObjectName( aNewName ); - break; - } - } */ if( bValid ) aNewName = aUserSuppliedName; } diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx index 01ea9b9..641c766 100644 --- a/cui/source/dialogs/sdrcelldlg.cxx +++ b/cui/source/dialogs/sdrcelldlg.cxx @@ -54,14 +54,6 @@ SvxFormatCellsDialog::SvxFormatCellsDialog( Window* pParent, const SfxItemSet* p AddTabPage( RID_SVXPAGE_CHAR_EFFECTS ); AddTabPage( RID_SVXPAGE_BORDER ); AddTabPage( RID_SVXPAGE_AREA ); - -/* - SvtCJKOptions aCJKOptions; - if( aCJKOptions.IsAsianTypographyEnabled() ) - AddTabPage( RID_SVXPAGE_PARA_ASIAN); - else - RemoveTabPage( RID_SVXPAGE_PARA_ASIAN ); -*/ } SvxFormatCellsDialog::~SvxFormatCellsDialog() @@ -80,13 +72,7 @@ void SvxFormatCellsDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) ( (SvxAreaTabPage&) rPage ).SetPageType( PT_AREA ); ( (SvxAreaTabPage&) rPage ).SetDlgType( 1 ); ( (SvxAreaTabPage&) rPage ).SetPos( 0 ); -// ( (SvxAreaTabPage&) rPage ).SetAreaTP( &mbAreaTP ); -// ( (SvxAreaTabPage&) rPage ).SetGrdChgd( &mnGradientListState ); -// ( (SvxAreaTabPage&) rPage ).SetHtchChgd( &mnHatchingListState ); -// ( (SvxAreaTabPage&) rPage ).SetBmpChgd( &mnBitmapListState ); -// ( (SvxAreaTabPage&) rPage ).SetColorChgd( &mnColorTableState ); ( (SvxAreaTabPage&) rPage ).Construct(); - // ActivatePage() wird das erste mal nicht gerufen ( (SvxAreaTabPage&) rPage ).ActivatePage( mrOutAttrs ); break; diff --git a/cui/source/dialogs/sdrcelldlg.src b/cui/source/dialogs/sdrcelldlg.src index cef68d3..04b3a9d 100644 --- a/cui/source/dialogs/sdrcelldlg.src +++ b/cui/source/dialogs/sdrcelldlg.src @@ -108,34 +108,3 @@ TabDialog RID_SVX_FORMAT_CELLS_DLG }; Text [ x-comment ] = " "; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/showcols.src b/cui/source/dialogs/showcols.src index f4d124d..ba9fbbd 100644 --- a/cui/source/dialogs/showcols.src +++ b/cui/source/dialogs/showcols.src @@ -70,33 +70,3 @@ ModalDialog RID_SVX_DLG_SHOWGRIDCOLUMNS }; Text [ en-US ] = "Show columns"; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/dialogs/splitcelldlg.src b/cui/source/dialogs/splitcelldlg.src index ea5cbc7..6faf698 100644 --- a/cui/source/dialogs/splitcelldlg.src +++ b/cui/source/dialogs/splitcelldlg.src @@ -128,5 +128,3 @@ ModalDialog RID_SVX_SPLITCELLDLG Text [ en-US ] = "Direction" ; }; }; - - diff --git a/cui/source/dialogs/srchxtra.hrc b/cui/source/dialogs/srchxtra.hrc index 939b1a9..da89b47 100644 --- a/cui/source/dialogs/srchxtra.hrc +++ b/cui/source/dialogs/srchxtra.hrc @@ -44,8 +44,4 @@ #define NF_LONGER 21 #define FL_SIMILARITY 22 - - - #endif - diff --git a/cui/source/dialogs/svuidlg.src b/cui/source/dialogs/svuidlg.src index 5cb13c8..99854fd 100644 --- a/cui/source/dialogs/svuidlg.src +++ b/cui/source/dialogs/svuidlg.src @@ -76,15 +76,6 @@ ModalDialog MD_PASTE_OBJECT Size = MAP_APPFONT ( 64 , 10 ) ; Text [ en-US ] = "~As icon" ; }; - /* - FixedIcon FI_DISPLAY - { - Border = TRUE ; - Hide = TRUE ; - Pos = MAP_APPFONT ( 167 , 75 ) ; - Size = MAP_APPFONT ( 30 , 30 ) ; - }; -*/ PushButton PB_CHANGE_ICON { Hide = TRUE ; diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 7006343..f6712c3 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -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 ) @@ -105,30 +101,27 @@ static void GetReplaceEditString( String &rText ) } // class LookUpComboBox_Impl -------------------------------------------------- - -LookUpComboBox_Impl::LookUpComboBox_Impl( + +LookUpComboBox_Impl::LookUpComboBox_Impl( Window *pParent, const ResId &rResId, SvxThesaurusDialog_Impl &rImpl ) : ComboBox (pParent, rResId), m_rDialogImpl( rImpl ) { m_aModifyTimer.SetTimeoutHdl( LINK( this, LookUpComboBox_Impl, ModifyTimer_Hdl ) ); m_aModifyTimer.SetTimeout( 500 ); - + 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,20 +129,17 @@ IMPL_LINK( LookUpComboBox_Impl, ModifyTimer_Hdl, Timer *, EMPTYARG /*pTimer*/ ) return 0; } - // class ReplaceEdit_Impl -------------------------------------------------- - -ReplaceEdit_Impl::ReplaceEdit_Impl( + +ReplaceEdit_Impl::ReplaceEdit_Impl( Window *pParent, const ResId &rResId ) : Edit (pParent, rResId) { } - ReplaceEdit_Impl::~ReplaceEdit_Impl() { } - void ReplaceEdit_Impl::Modify() { @@ -163,27 +153,25 @@ 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( +AlternativesString_Impl::AlternativesString_Impl( ThesaurusAlternativesCtrl_Impl &rControl, SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) : - // + SvLBoxString( pEntry, nFlags, rStr ), m_rControlImpl( rControl ) { } -void AlternativesString_Impl::Paint( - const Point& rPos, +void AlternativesString_Impl::Paint( + const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* pEntry ) { @@ -203,10 +191,9 @@ void AlternativesString_Impl::Paint( rDev.SetFont( aOldFont ); } - -ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl( +ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl( Window* pParent, - SvxThesaurusDialog_Impl &rImpl ) : + SvxThesaurusDialog_Impl &rImpl ) : SvxCheckListBox( pParent, CUI_RES( CT_THES_ALTERNATIVES ) ), m_rDialogImpl( rImpl ) { @@ -214,22 +201,19 @@ 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, +void ThesaurusAlternativesCtrl_Impl::SetExtraData( + const SvLBoxEntry *pEntry, const AlternativesExtraData &rData ) { if (!pEntry) @@ -242,8 +226,7 @@ void ThesaurusAlternativesCtrl_Impl::SetExtraData( m_aUserData[ pEntry ] = rData; } - -AlternativesExtraData * ThesaurusAlternativesCtrl_Impl::GetExtraData( +AlternativesExtraData * ThesaurusAlternativesCtrl_Impl::GetExtraData( const SvLBoxEntry *pEntry ) { AlternativesExtraData *pRes = NULL; @@ -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; @@ -270,14 +252,13 @@ SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const St SetExtraData( pEntry, AlternativesExtraData( rText, bIsHeader ) ); GetModel()->Insert( pEntry ); - + if (bIsHeader) GetViewDataEntry( pEntry )->SetSelectable( false ); return pEntry; } - void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rKey = rKEvt.GetKeyCode(); @@ -288,33 +269,24 @@ void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) m_rDialogImpl.AlternativesDoubleClickHdl_Impl( this ); // look up current selected entry else if (GetEntryCount()) 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 ---------------------------------------- @@ -342,7 +314,7 @@ SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( SvxThesaurusDialog * pDialog ) m_bWordFound( false ) { // note: FreeResource must only be called in the c-tor of SvxThesaurusDialog - + aReplaceEdit.SetButton( &aReplaceBtn ); aLeftBtn.SetClickHdl( LINK( this, SvxThesaurusDialog_Impl, LeftBtnHdl_Impl ) ); @@ -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 ) ); @@ -398,7 +367,7 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() const uno::Reference< linguistic2::XMeaning > *pMeanings = aMeanings.getConstArray(); m_pAlternativesCT->SetUpdateMode( FALSE ); - + // clear old user data of control before creating new ones via AddEntry below m_pAlternativesCT->ClearExtraData(); @@ -411,7 +380,7 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() const OUString *pSynonyms = aSynonyms.getConstArray(); DBG_ASSERT( rMeaningTxt.getLength() > 0, "meaning with empty text" ); DBG_ASSERT( nSynonyms > 0, "meaning without synonym" ); - + m_pAlternativesCT->AddEntry( i + 1, rMeaningTxt, true ); for (sal_Int32 k = 0; k < nSynonyms; ++k) m_pAlternativesCT->AddEntry( -1, pSynonyms[k], false ); @@ -420,16 +389,14 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() m_pAlternativesCT->SetUpdateMode( TRUE ); 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 aWordCB.SetText( rText ); LookUp_Impl(); -} - +} IMPL_LINK( SvxThesaurusDialog_Impl, LeftBtnHdl_Impl, Button *, pBtn ) { @@ -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,13 +428,12 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) return 0; } - void SvxThesaurusDialog_Impl::LookUp_Impl() { String aText( aWordCB.GetText() ); aLookUpText = OUString( aText ); - if (aLookUpText.getLength() > 0 && + if (aLookUpText.getLength() > 0 && (aLookUpHistory.size() == 0 || aLookUpText != aLookUpHistory.top())) aLookUpHistory.push( aLookUpText ); @@ -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; @@ -507,7 +470,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox String aStr; if (pData && !pData->IsHeader()) { - aStr = pData->GetText(); + aStr = pData->GetText(); GetReplaceEditString( aStr ); } aReplaceEdit.SetText( aStr ); @@ -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; @@ -525,22 +487,21 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis String aStr; if (pData && !pData->IsHeader()) { - aStr = pData->GetText(); + aStr = pData->GetText(); GetReplaceEditString( aStr ); } - + aWordCB.SetText( aStr ); if (aStr.Len() > 0) LookUp_Impl(); } - //! workaround to set the selection since calling SelectEntryPos within + //! workaround to set the selection since calling SelectEntryPos within //! the double click handler does not work Application::PostUserEvent( STATIC_LINK( this, SvxThesaurusDialog_Impl, SelectFirstHdl_Impl ), pBox ); return 0; } - IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) { (void) pThis; @@ -554,10 +515,10 @@ IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) { Image aRes; - + OUString aTmp; osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); - + Graphic aGraphic; const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) ); if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic, NULL, NULL ) ) @@ -567,7 +528,6 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) return aRes; } - static String lcl_GetThesImplName( const lang::Locale &rLocale ) { String aRes; @@ -579,7 +539,7 @@ static String lcl_GetThesImplName( const lang::Locale &rLocale ) xLngMgr = uno::Reference< linguistic2::XLinguServiceManager >( xMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.linguistic2.LinguServiceManager" ))), uno::UNO_QUERY_THROW ); - + DBG_ASSERT( xLngMgr.is(), "LinguServiceManager missing" ); if (xLngMgr.is()) { @@ -589,22 +549,21 @@ static String lcl_GetThesImplName( const lang::Locale &rLocale ) DBG_ASSERT( aServiceNames.getLength() <= 1, "more than one thesaurus found. Should not be possible" ); if (aServiceNames.getLength() == 1) aRes = aServiceNames[0]; - } + } } - catch (uno::Exception &e) + catch (uno::Exception &e) { (void) e; DBG_ASSERT( 0, "failed to get thesaurus" ); - } - + } + return aRes; } - void SvxThesaurusDialog_Impl::UpdateVendorImage() { m_pDialog->SetUpdateMode( sal_False ); - + SvtLinguConfig aCfg; if (aCfg.HasVendorImages( "ThesaurusDialogImage" )) { @@ -619,15 +578,14 @@ void SvxThesaurusDialog_Impl::UpdateVendorImage() aImage = bHC ? aVendorDefaultImageHC : aVendorDefaultImage; aVendorImageFI.SetImage( aImage ); } - + m_pDialog->SetUpdateMode( sal_True ); } - IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl *, EMPTYARG ) { pThis->m_pDialog->SetUpdateMode( sal_False ); - + SvtLinguConfig aCfg; if (aCfg.HasVendorImages( "ThesaurusDialogImage" )) { @@ -676,20 +634,19 @@ IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialo pThis->m_pDialog->SetSizePixel( aDlgSize ); pThis->m_pDialog->Invalidate(); } - + pThis->UpdateVendorImage(); pThis->m_pDialog->SetUpdateMode( sal_True ); - + return 0; }; - // class SvxThesaurusDialog ---------------------------------------------- -SvxThesaurusDialog::SvxThesaurusDialog( - Window* pParent, +SvxThesaurusDialog::SvxThesaurusDialog( + Window* pParent, uno::Reference< linguistic2::XThesaurus > xThes, - const String &rWord, + const String &rWord, LanguageType nLanguage ) : SvxStandardDialog( pParent, CUI_RES( RID_SVXDLG_THESAURUS ) ) @@ -738,18 +695,16 @@ SvxThesaurusDialog::SvxThesaurusDialog( m_pImpl->aLangMBtn.SetPopupMenu( pMenu ); SetWindowTitle( nLanguage ); - + // disable controls if service is missing if (!m_pImpl->xThesaurus.is()) 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: */ diff --git a/cui/source/dialogs/thesdlg.hrc b/cui/source/dialogs/thesdlg.hrc index 46e1227..3763916 100755 --- a/cui/source/dialogs/thesdlg.hrc +++ b/cui/source/dialogs/thesdlg.hrc @@ -47,6 +47,4 @@ #define STR_ERR_TEXTNOTFOUND 101 - #endif - diff --git a/cui/source/dialogs/winpluginlib.cpp b/cui/source/dialogs/winpluginlib.cpp index a8e8a3a..c42c734 100644 --- a/cui/source/dialogs/winpluginlib.cpp +++ b/cui/source/dialogs/winpluginlib.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,8 +37,7 @@ #include <Shlwapi.h> #include <stdio.h> - -#define SO_PATH_SIZE 4096 +#define SO_PATH_SIZE 4096 #define MOZ_PLUGIN_DLL_NAME "npsopluginmi.dll" extern "C" { int lc_isInstalled(const char* realFilePath) @@ -62,7 +61,7 @@ int lc_isInstalled(const char* realFilePath) RegCloseKey(hKeySoftware); if( ret == ERROR_FILE_NOT_FOUND) return 1; - else + else return -1; } ret = RegOpenKeyEx(hMozillaPlugins, "@sun.com/npsopluginmi;version=1.0", 0, KEY_READ, &hStarOffice); @@ -71,18 +70,17 @@ int lc_isInstalled(const char* realFilePath) RegCloseKey(hMozillaPlugins); if( ret == ERROR_FILE_NOT_FOUND) return 1; - else + else return -1; } - - if((realFilePath == NULL) || (strlen(realFilePath) == 0) || (strlen(realFilePath) >= SO_PATH_SIZE)) - ret = -1; + + if((realFilePath == NULL) || (strlen(realFilePath) == 0) || (strlen(realFilePath) >= SO_PATH_SIZE)) + ret = -1; else{ - sprintf(sSoPath,"%s", realFilePath); + sprintf(sSoPath,"%s", realFilePath); ret = 0; - } - //ret = GetCurrentDirectory( SO_PATH_SIZE, sSoPath); - //ret = GetEnvironmentVariable("prog", sSoPath, SO_PATH_SIZE); + } + // GetCurrentDirectory return the char number of the string if(ret == 0){ DWORD dType = REG_SZ; @@ -97,10 +95,10 @@ int lc_isInstalled(const char* realFilePath) else ret = -1; } - else + else ret = -1; - RegCloseKey(hStarOffice); - RegCloseKey(hMozillaPlugins); + RegCloseKey(hStarOffice); + RegCloseKey(hMozillaPlugins); RegCloseKey(hKeySoftware); return ret; } @@ -124,7 +122,7 @@ int lc_uninstallPlugin(const char*) RegCloseKey(hKeySoftware); if( ret == ERROR_FILE_NOT_FOUND) return 0; - else + else return -1; } @@ -134,7 +132,7 @@ int lc_uninstallPlugin(const char*) RegCloseKey(hMozillaPlugins); if( ret == ERROR_FILE_NOT_FOUND) return 0; - else + else return -1; } RegCloseKey(hStarOffice); @@ -156,7 +154,6 @@ int lc_installPlugin(const char* realFilePath) char sSoPath[SO_PATH_SIZE]; DWORD sState; - LONG ret; ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, KEY_READ|KEY_WRITE, &hKeySoftware); if(ret != ERROR_SUCCESS){ @@ -167,44 +164,42 @@ int lc_installPlugin(const char* realFilePath) } ret = RegOpenKeyEx(hKeySoftware, "MozillaPlugins", 0, KEY_READ|KEY_WRITE, &hMozillaPlugins); if(ret != ERROR_SUCCESS){ - RegCreateKeyEx(hKeySoftware, - "MozillaPlugins", - 0, - NULL, - REG_OPTION_NON_VOLATILE, - KEY_READ|KEY_WRITE, + RegCreateKeyEx(hKeySoftware, + "MozillaPlugins", + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_READ|KEY_WRITE, NULL, &hMozillaPlugins, &sState); } - ret = RegCreateKeyEx(hMozillaPlugins, - "@sun.com/npsopluginmi;version=1.0", - 0, - NULL, - REG_OPTION_NON_VOLATILE, - KEY_READ|KEY_WRITE, + ret = RegCreateKeyEx(hMozillaPlugins, + "@sun.com/npsopluginmi;version=1.0", + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_READ|KEY_WRITE, NULL, - &hStarOffice, + &hStarOffice, &sState); if(ret != ERROR_SUCCESS){ RegCloseKey(hKeySoftware); RegCloseKey(hMozillaPlugins); return -1; } - + RegFlushKey(hStarOffice); RegFlushKey(hMozillaPlugins); - - - if((realFilePath == NULL) || (strlen(realFilePath) == 0) || (strlen(realFilePath) >= SO_PATH_SIZE)) - ret = -1; + + if((realFilePath == NULL) || (strlen(realFilePath) == 0) || (strlen(realFilePath) >= SO_PATH_SIZE)) + ret = -1; else{ - sprintf(sSoPath,"%s", realFilePath); - ret = 0; + sprintf(sSoPath,"%s", realFilePath); + ret = 0; } - - //ret = GetCurrentDirectory( SO_PATH_SIZE, sSoPath); + // GetCurrentDirectory return the char number of the string if(ret == 0){ ret = RegSetValueEx( hStarOffice, "Path", 0, REG_SZ, (LPBYTE) sSoPath, strlen(sSoPath) + 1); @@ -213,7 +208,7 @@ int lc_installPlugin(const char* realFilePath) else ret = -1; } - else + else ret = -1; RegFlushKey(hStarOffice); RegFlushKey(hMozillaPlugins); diff --git a/cui/source/dialogs/zoom.hrc b/cui/source/dialogs/zoom.hrc index 0fb3a8a..dbb901f 100644 --- a/cui/source/dialogs/zoom.hrc +++ b/cui/source/dialogs/zoom.hrc @@ -50,4 +50,3 @@ #define BTN_ZOOM_HELP 30 #endif - diff --git a/cui/source/dialogs/zoom.src b/cui/source/dialogs/zoom.src index 54b995f..283cc8d 100644 --- a/cui/source/dialogs/zoom.src +++ b/cui/source/dialogs/zoom.src @@ -154,4 +154,3 @@ ModalDialog RID_SVXDLG_ZOOM }; // ********************************************************************** EOF - -- 1.7.3.2
Attachment:
signature.asc
Description: OpenPGP digital signature