[Libreoffice-commits] .: sw/source

David Tardon dtardon at kemper.freedesktop.org
Thu Nov 25 21:15:38 PST 2010


 sw/source/ui/config/fontcfg.cxx          |    4 --
 sw/source/ui/config/optpage.cxx          |   19 ---------
 sw/source/ui/dbui/dbinsdlg.cxx           |    4 --
 sw/source/ui/dbui/dbmgr.cxx              |   12 ------
 sw/source/ui/dbui/mailmergehelper.cxx    |    2 -
 sw/source/ui/dbui/mmaddressblockpage.cxx |    6 ---
 sw/source/ui/dbui/mmdocselectpage.cxx    |    1 
 sw/source/ui/dbui/mmlayoutpage.cxx       |    3 -
 sw/source/ui/dbui/mmoutputpage.cxx       |   16 --------
 sw/source/ui/dialog/ascfldlg.cxx         |    6 ---
 sw/source/ui/dialog/macassgn.cxx         |    5 --
 sw/source/ui/dialog/uiregionsw.cxx       |    8 ----
 sw/source/ui/dochdl/gloshdl.cxx          |   25 +-----------
 sw/source/ui/dochdl/swdtflvr.cxx         |   62 -------------------------------
 sw/source/ui/docvw/SidebarTxtControl.cxx |    1 
 sw/source/ui/docvw/SidebarWin.cxx        |    6 ---
 sw/source/ui/docvw/edtdd.cxx             |    1 
 sw/source/ui/docvw/edtwin.cxx            |    5 --
 sw/source/ui/docvw/romenu.cxx            |    1 
 sw/source/ui/docvw/srcedtw.cxx           |    2 -
 20 files changed, 6 insertions(+), 183 deletions(-)

New commits:
commit 2b37c29994f62256d5f628b023f6871777a09214
Author: Kayo Hamid <revol.code at yahoo.com>
Date:   Thu Nov 25 08:42:25 2010 +0100

    Clean code at writer

diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx
index 989477a..2290b21 100644
--- a/sw/source/ui/config/fontcfg.cxx
+++ b/sw/source/ui/config/fontcfg.cxx
@@ -264,10 +264,6 @@ String  SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang)
         case FONT_INDEX_CTL   :
             nFontId = DEFAULTFONT_CTL_TEXT;
         break;
-//        case FONT_STANDARD:
-//        case FONT_LIST    :
-//        case FONT_CAPTION :
-//        case FONT_INDEX   :
         default:
             nFontId = DEFAULTFONT_LATIN_TEXT;
     }
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 7979a49..dda5965 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -313,8 +313,6 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
     SfxTabPage( pParent, SW_RES( TP_OPTPRINT_PAGE ), rCoreSet),
     aFL1          (this, SW_RES(FL_1)),
     aGrfCB           (this, SW_RES(CB_PGRF)),
-//	aTabCB           (this, SW_RES(CB_PTAB)),
-//	aDrawCB          (this, SW_RES(CB_PDRAW)),
     aCtrlFldCB       (this, SW_RES(CB_CTRLFLD)),
     aBackgroundCB    (this, SW_RES(CB_BACKGROUND)),
     aBlackFontCB 	 (this, SW_RES(CB_BLACK_FONT)),
@@ -324,7 +322,6 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
     aFL2          (this, SW_RES(FL_2)),
     aLeftPageCB      (this, SW_RES(CB_LEFTP)),
     aRightPageCB     (this, SW_RES(CB_RIGHTP)),
-//    aReverseCB       (this, SW_RES(CB_REVERSE)),
     aProspectCB      (this, SW_RES(CB_PROSPECT)),
     aProspectCB_RTL      (this, SW_RES(CB_PROSPECT_RTL)),
     aSeparatorRFL    (this, SW_RES(FL_SEP_PRT_RIGHT)),
@@ -335,7 +332,6 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
     aFL3          (this, SW_RES(FL_3)),
     aFL4          (this, SW_RES(FL_4)),
     aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)),
-//    aSingleJobsCB    (this, SW_RES(CB_SINGLEJOBS)),
     aPaperFromSetupCB(this, SW_RES(CB_PAPERFROMSETUP)),
     aFaxFT           (this, SW_RES(FT_FAX)),
     aFaxLB           (this, SW_RES(LB_FAX)),
@@ -349,14 +345,11 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
     aGrfCB.SetClickHdl( aLk );
     aRightPageCB.SetClickHdl( aLk );
     aLeftPageCB.SetClickHdl( aLk );
-//	aTabCB.SetClickHdl( aLk );
-//	aDrawCB.SetClickHdl( aLk );
     aCtrlFldCB.SetClickHdl( aLk );
     aBackgroundCB.SetClickHdl( aLk );
     aBlackFontCB.SetClickHdl( aLk );
     aPrintHiddenTextCB.SetClickHdl( aLk );
     aPrintTextPlaceholderCB.SetClickHdl( aLk );
-//	aReverseCB.SetClickHdl( aLk );
     aProspectCB.SetClickHdl( aLk );
     aProspectCB_RTL.SetClickHdl( aLk );
     aPaperFromSetupCB.SetClickHdl( aLk );
@@ -365,27 +358,20 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
     aEndRB.SetClickHdl( aLk );
     aOnlyRB.SetClickHdl( aLk );
     aNoRB.SetClickHdl( aLk );
-//	aSingleJobsCB.SetClickHdl( aLk );
     aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
 
     const SfxPoolItem* pItem;
     if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
         && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
     {
-//		aDrawCB      .Hide();
         aLeftPageCB  .Hide();
         aRightPageCB .Hide();
         aPrintHiddenTextCB.Hide();
         aPrintTextPlaceholderCB.Hide();
-//		aReverseCB.SetPosPixel(aLeftPageCB.GetPosPixel());
         aProspectCB.SetPosPixel(aLeftPageCB.GetPosPixel());
         Point aPt( aRightPageCB.GetPosPixel() );
         aPt.setX(aPt.getX() + 15); // indent
         aProspectCB_RTL.SetPosPixel(aPt);
-//		aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
-//        aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
-//		aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
-//		aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
         
         // hide aPrintEmptyPagesCB and move everything below up accordingly
         long nDeltaY = aPaperFromSetupCB.GetPosPixel().getY() - aPrintEmptyPagesCB.GetPosPixel().getY();
@@ -477,8 +463,6 @@ void 	SwAddPrinterTabPage::Reset( const SfxItemSet&  )
                                     (const SfxPoolItem**)&pAddPrinterAttr ))
     {
         aGrfCB.Check(			pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw );
-//		aTabCB.Check(			pAddPrinterAttr->bPrintTable);
-//        aDrawCB.Check(          pAddPrinterAttr->bPrintDraw);
         aCtrlFldCB.Check(		pAddPrinterAttr->bPrintControl);
         aBackgroundCB.Check(    pAddPrinterAttr->bPrintPageBackground);
         aBlackFontCB.Check(		pAddPrinterAttr->bPrintBlackFont);
@@ -486,12 +470,10 @@ void 	SwAddPrinterTabPage::Reset( const SfxItemSet&  )
         aPrintTextPlaceholderCB.Check(pAddPrinterAttr->bPrintTextPlaceholder);
         aLeftPageCB.Check(      pAddPrinterAttr->bPrintLeftPages);
         aRightPageCB.Check(     pAddPrinterAttr->bPrintRightPages);
-//		aReverseCB.Check(		pAddPrinterAttr->bPrintReverse);
         aPaperFromSetupCB.Check(pAddPrinterAttr->bPaperFromSetup);
         aPrintEmptyPagesCB.Check(pAddPrinterAttr->bPrintEmptyPages);
         aProspectCB.Check(      pAddPrinterAttr->bPrintProspect);
         aProspectCB_RTL.Check(      pAddPrinterAttr->bPrintProspectRTL);
-//		aSingleJobsCB.Check(    pAddPrinterAttr->bPrintSingleJobs);
 
         aNoRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_NONE ) ;
         aOnlyRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_ONLY ) ;
@@ -548,7 +530,6 @@ IMPL_LINK_INLINE_END( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
 
 void SwAddPrinterTabPage::PageCreated (SfxAllItemSet aSet)
 {
-    //SFX_ITEMSET_ARG (&aSet,pListItem,SfxStringListItem,SID_FAX_LIST,sal_False);
     SFX_ITEMSET_ARG (&aSet,pListItem,SfxBoolItem,SID_FAX_LIST,sal_False);
     SFX_ITEMSET_ARG (&aSet,pPreviewItem,SfxBoolItem,SID_PREVIEWFLAG_TYPE,sal_False);
     if (pPreviewItem)
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index c6ac31d..f766b41 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -455,7 +455,6 @@ SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot()
     delete pTblSet;
     delete pRep;
 
-//	delete pConfig;
     delete pTAutoFmt;
 }
 
@@ -1403,14 +1402,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
                         // Cursor am Ende wieder auf Anfangsposition
                         // gesetzt werden kann.
 
-                        // rSh.SwCrsrShell::MovePara( fnParaCurr, fnParaStart );
                         rSh.SwCrsrShell::MovePara(
                             GetfnParaCurr(), GetfnParaStart() );
                         pMark = rSh.SetBookmark(
                             KeyCode(),
                             ::rtl::OUString(),
                             ::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK );
-                        // rSh.SwCrsrShell::MovePara( fnParaCurr, fnParaEnd );
                         rSh.SwCrsrShell::MovePara(
                             GetfnParaCurr(), GetfnParaEnd() );
                         bSetCrsr = FALSE;
@@ -1806,7 +1803,6 @@ void SwInsertDBColAutoPilot::Load()
                 pInsDBColumn->nUsrNumFmt = rNFmtr.GetEntryKey( pInsDBColumn->sUsrNumFmt,
                                                         pInsDBColumn->eUsrNumFmtLng );
 
-//				pInsDBColumn->nDBNumFmt
 
                 pNewData->aDBColumns.Insert(pInsDBColumn);
             }
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index b2b4bee..dcf975d 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1287,10 +1287,6 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
                     aOptions.realloc( nOpts + 1 );
                     aOptions[ nOpts ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wait"));
                     aOptions[ nOpts ].Value <<= sal_True ;
-//                    aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) ); 
-//                    // #i52629# aynchronous printing should only be done in silent mode - otherwise
-//                    // the printer dialog does not come up
-//                    aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDescriptor.bPrintAsync ));
                     // move print options 
                     const beans::PropertyValue* pPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray();
                     for( sal_Int32 nOption = 0; nOption < rMergeDescriptor.aPrintOptions.getLength(); ++nOption)
@@ -1307,14 +1303,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
                         }
                     }
 
-//                    const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig();
-//                    if (pModOpt->IsSinglePrintJob())
-//                    {
-//                    }    
-//                    else
-//                    {
                         pTargetView->ExecPrint( aOptions, IsMergeSilent(), rMergeDescriptor.bPrintAsync );
-//                    }    
                 }
                 xTargetDocShell->DoClose();
             }
@@ -2749,7 +2738,6 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
         Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame().GetWindow();
         rTargetWindow.SetPosPixel(rSourceWindow.GetPosPixel());
 
-//        pTargetFrame->GetFrame().Appear();
         SwView* pTargetView = static_cast<SwView*>( pTargetFrame->GetViewShell() );
         rMMConfig.SetTargetView(pTargetView);
         //initiate SelectShell() to create sub shells
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 1a8a103..aa0b259 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -662,13 +662,11 @@ SwConnectionListener::~SwConnectionListener()
 void SwConnectionListener::connected(const lang::EventObject& /*aEvent*/)
     throw (uno::RuntimeException)
 {
-    //OSL_ENSURE(false, "Connection opened");
 }
 
 void SwConnectionListener::disconnected(const lang::EventObject& /*aEvent*/)
     throw (uno::RuntimeException)
 {
-    //OSL_ENSURE(false, "Connection closed");
 }
 
 void SwConnectionListener::disposing(const lang::EventObject& /*aEvent*/)
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 2c7fed8..528a349 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -322,8 +322,6 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton
         }
     }
     m_aPrevSetIB.Enable(bEnable);
-    //m_aNextSetIB.Enable(bEnable);
-    //m_aDocumentIndexFI.Enable(bEnable);
     String sTemp(m_sDocument);
     sTemp.SearchAndReplaceAscii("%1", String::CreateFromInt32(nPos));
     m_aDocumentIndexFI.SetText(sTemp);
@@ -1322,7 +1320,6 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId)
 {
     SetWindowBits( /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/
                             WB_CLIPCHILDREN );
-//    SetSpaceBetweenEntries(3);
     SetSelectionMode( SINGLE_SELECTION );
     SetDragDropMode(   SV_DRAGDROP_CTRL_COPY );
     EnableAsyncDrag(TRUE);
@@ -1372,7 +1369,6 @@ AddressMultiLineEdit::AddressMultiLineEdit(SwCustomizeAddressBlockDialog* pParen
 {
     GetTextView()->SupportProtectAttribute(sal_True);
     StartListening(*GetTextEngine());
-    //DisableSelectionOnFocus();
     EnableFocusSelectionHide(FALSE);
 }
 
@@ -1503,7 +1499,6 @@ void AddressMultiLineEdit::RemoveCurrentEntry()
     ExtTextView* pTextView = GetTextView();
     const TextSelection& rSelection = pTextView->GetSelection();
     const TextCharAttrib* pBeginAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED );
-//    const TextCharAttrib* pEndAttrib = pTextEngine->FindCharAttrib( rSelection.GetEnd(), TEXTATTR_PROTECTED );
     if(pBeginAttrib &&
             (pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
                             && pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
@@ -1597,7 +1592,6 @@ sal_uInt16  AddressMultiLineEdit::IsCurrentItemMoveable()
     ExtTextView* pTextView = GetTextView();
     const TextSelection& rSelection = pTextView->GetSelection();
     const TextCharAttrib* pBeginAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED );
-//    const TextCharAttrib* pEndAttrib = pTextEngine->FindCharAttrib( rSelection.GetEnd(), TEXTATTR_PROTECTED );
     if(pBeginAttrib &&
             (pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
                             && pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index a016508..232dbed 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -132,7 +132,6 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
     {
         m_aLoadTemplateRB.Check();
         SfxNewFileDialog* pNewFileDlg = new SfxNewFileDialog(this, 0);
-        //pNewFileDlg->SetTemplateFlags(nFlags);
         USHORT nRet = pNewFileDlg->Execute();
         if(RET_TEMPLATE_LOAD == nRet)
             bTemplate = false;
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 0bcda18..f14ca1c 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -482,7 +482,6 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
         rShell.MovePara(GetfnParaCurr(), GetfnParaStart());
     }
     bool bSplitNode = rShell.GetText().Len() > 0;
-//    rShell.SetTxtFmtColl( rShell.GetTxtCollFromPool( RES_POOLCOLL_GREETING ) );
     sal_Int32 nMoves = rConfigItem.GetGreetingMoves();
     if( !bExample && 0 != nMoves )
     {
@@ -710,8 +709,6 @@ IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
     aZoom <<= (sal_Int16)DocumentZoomType::ENTIRE_PAGE;
     m_xViewProperties->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
 
-
-//    m_pExampleWrtShell->SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) );
     const SwFmtFrmSize& rPageSize = m_pExampleWrtShell->GetPageDesc(
                                      m_pExampleWrtShell->GetCurPageDesc()).GetMaster().GetFrmSize();
     m_aLeftMF.SetMax(rPageSize.GetWidth() - DEFAULT_LEFT_DISTANCE);
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index a3bad20..9b64fe1 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -518,7 +518,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
         aPos = m_aFromNF.GetPosPixel();     aPos.Y() = nNewRBXPos + nRB_FT_Offset; m_aFromNF.SetPosPixel(aPos);
         aPos = m_aToNF.GetPosPixel();       aPos.Y() = nNewRBXPos + nRB_FT_Offset; m_aToNF.SetPosPixel(aPos);
     }
-    else /*if(&m_aSendMailRB == pButton)*/
+    else
     {
         Control* aMailControls[] =
         {
@@ -785,7 +785,6 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
             SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
             xTempDocShell->DoInitNew( 0 );
             SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
-//            pTempFrame->GetFrame().Appear();
             SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
             pTargetView->GetWrtShell().StartAction();
             SwgReaderOption aOpt;
@@ -805,8 +804,6 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
             String sCounter('_');
             sCounter += String::CreateFromInt32(nDoc);
             sOutPath.Insert(sCounter, sOutPath.Len() - sExtension.Len() - 1);
-            //SfxStringItem aName(SID_FILE_NAME, sOutPath);
-            //SfxStringItem aFilter(SID_FILTER_NAME, sFilter);
 
             while(true)
             {
@@ -885,7 +882,6 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox*, pBox)
         m_aPrinterSettingsPB.Disable();
     m_pWizard->GetConfigItem().SetSelectedPrinter( pBox->GetSelectEntry() );
 
-//    return m_pTempPrinter;
     return 0;
 }
 
@@ -930,7 +926,6 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
     SfxObjectShell* pObjSh = pTargetView->GetViewFrame()->GetObjectShell();
     SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), pObjSh));
     rSh.GetNewDBMgr()->SetMergeType( DBMGR_MERGE_DOCUMENTS );
-    //SfxDispatcher *pDis = pTargetView->GetViewFrame()->GetDispatcher();
     SfxBoolItem aMergeSilent(SID_SILENT, sal_False);
     m_pWizard->enableButtons(WZB_CANCEL, sal_False);
 
@@ -1174,7 +1169,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
         SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
         xTempDocShell->DoInitNew( 0 );
         SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
-//        pTempFrame->GetFrame().Appear();
         SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
         pTargetView->GetWrtShell().StartAction();
         SwgReaderOption aOpt;
@@ -1195,14 +1189,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
                     INetURLObject(), utl::TempFile::CreateTempName(0),
                     URIHelper::GetMaybeFileHdl()) );
 
-/*        if(bIsPDF)
-        {
-            SfxDispatcher* pSfxDispatcher = pTempView->GetViewFrame()->GetDispatcher();
-            pSfxDispatcher->Execute(
-                            SID_DIRECTEXPORTDOCASPDF,
-                                  SFX_CALLMODE_SYNCHRON, &aName, &aFilterName, 0L );
-        }
-        else*/
         {
             uno::Sequence< beans::PropertyValue > aFilterValues(MM_DOCTYPE_TEXT == nDocType ? 2 : 1);
             beans::PropertyValue* pFilterValues = aFilterValues.getArray();
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 28e9638..ca181cd 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -143,21 +143,15 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
                 if( bLF )
                 {
                     aOpt.SetParaFlags( LINEEND_CRLF );
-// have to check if of CharSet is type of ANSI
-//					aOpt.SetCharSet( CHARSET_ANSI );
                 }
                 else
                 {
                     aOpt.SetParaFlags( LINEEND_CR );
-// have to check if CharSet is type of MAC
-//					aOpt.SetCharSet( CHARSET_MAC );
                 }
             }
             else if( bLF )
             {
                 aOpt.SetParaFlags( LINEEND_LF );
-// have to check if of CharSet is type of ANSI
-//				aOpt.SetCharSet( CHARSET_ANSI );
             }
         }
 
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index a4fb78a..0253de7 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -60,11 +60,8 @@
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::frame::XFrame;
 
-// SvStringsDtor* __EXPORT _GetRangeHdl( _SfxMacroTabPage*, const String& );
-
 SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
 {
-    // const SfxItemSet& rSet = rPg.GetItemSet();
     SfxEventNamesItem aItem(SID_EVENTCONFIG);
 
     BOOL bHtmlMode = FALSE;
@@ -74,13 +71,11 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
     switch( eType )
     {
     case MACASSGN_TEXTBAUST:			// Textbausteine
-        // rPg.SetGetRangeLink( &_GetRangeHdl );
         aItem.AddEvent( String( SW_RES(STR_EVENT_START_INS_GLOSSARY) ), String(),
                             SW_EVENT_START_INS_GLOSSARY );
         aItem.AddEvent( String( SW_RES(STR_EVENT_END_INS_GLOSSARY) ), String(), 
                             SW_EVENT_END_INS_GLOSSARY);
         // damit der neue Handler aktiv wird!
-        // rPg.Reset( rSet );
         break;
     case MACASSGN_ALLFRM:
     case MACASSGN_GRAPHIC:			// Grafiken
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 690a6dd..f705b24 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -695,7 +695,6 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
             aConditionED.SetText(sCondition);
         else
         {
-//			aConditionED.SetText(aEmptyStr);
             aConditionFT.Enable(FALSE);
             aConditionED.Enable(FALSE);
         }
@@ -705,7 +704,6 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
         aFileNameED	.Enable(FALSE);
         aSubRegionFT.Enable(FALSE);
         aSubRegionED.Enable(FALSE);
-//        aNameFT     .Enable(FALSE);
         aCurName	.Enable(FALSE);
         aOptionsPB	.Enable(FALSE);
         aDDECB   			.Enable(FALSE);
@@ -726,7 +724,6 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
     }
     else if (pEntry )
     {
-//        aNameFT     .Enable(TRUE);
         aCurName	.Enable(TRUE);
         aOptionsPB	.Enable(TRUE);
         SectRepr* pRepr=(SectRepr*) pEntry->GetUserData();
@@ -800,7 +797,6 @@ IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox )
         aFileNameED  .Enable(FALSE);
         aSubRegionFT .Enable(FALSE);
         aSubRegionED .Enable(FALSE);
-//        aNameFT      .Enable(FALSE);
         aCurName	 .Enable(FALSE);
         aDDECB   			.Enable(FALSE);
         aDDECommandFT       .Enable(FALSE);
@@ -881,7 +877,6 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
         if( USHRT_MAX != nNewPos )
             rSh.DelSectionFmt( nNewPos );
     }
-//    rSh.ChgSectionPasswd(aNewPasswd);
 
     aOrigArray.Remove( 0, aOrigArray.Count() );
 
@@ -1850,7 +1845,6 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
     aDDECB.Enable(bFile);
     if( bFile )
     {
-//		aFileNameED.SetText( aFileName );
         aFileNameED.GrabFocus();
         aProtectCB.Check( TRUE );
     }
@@ -1858,7 +1852,6 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
     {
         aDDECB.Check(FALSE);
         DDEHdl(&aDDECB);
-//		aFileNameED.SetText(aEmptyStr);
     }
     return 0;
 }
@@ -2082,7 +2075,6 @@ void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
     USHORT eState = rAttr.GetValue();
     switch( eState )
     {
-    // case FTNEND_ATPGORDOCEND:
     case FTNEND_ATTXTEND_OWNNUMANDFMT:
         pNtNumFmtCB->SetState( STATE_CHECK );
         // no break;
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index ba5de07..ce8d0b2 100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -158,12 +158,9 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
                 sGroup.GetToken(0, GLOS_DELIM) == sCurBase)
                 bPathEqual = TRUE;
         }
-//		const String aMac_Tmp(pCurGrp->GetName());
+
         // Beim Pfadwechsel kann man sich auf den Namen nicht verlassen
-        if(!bAlwaysCreateNew &&
-                bPathEqual
-//		aMac_Tmp == sGroup
-        )
+        if(!bAlwaysCreateNew && bPathEqual)
             return;
     }
     aCurGrp = sGroup;
@@ -250,10 +247,6 @@ BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName,  String& rSource
     SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, FALSE);
     if(pDestGroup->IsReadOnly() || (bMove && pSourceGroup->IsReadOnly()) )
         return FALSE;
-    /*if(pDestGroup->IsOld()&& 0!= pDestGroup->ConvertToNew())
-        return FALSE;
-    if(bMove && pSourceGroup->IsOld() && 0 != pSourceGroup->ConvertToNew())
-        return FALSE;*/
 
     //Der Index muss hier ermittelt werden, weil rSourceShortName in CopyBlock evtl veraendert wird
     USHORT nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
@@ -344,20 +337,6 @@ BOOL SwGlossaryHdl::HasShortName(const String& rShortName) const
 
 BOOL    SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
 {
-    /*if( rOld.IsOld() )
-    {
-        QueryBox aAsk( pWrtShell->GetView().GetWindow(), SW_RES( MSG_UPDATE_NEW_GLOS_FMT ) );
-        if( aAsk.Execute() == RET_YES )
-        {
-            if( rOld.ConvertToNew() )
-            {
-                InfoBox(pWrtShell->GetView().GetWindow(), SW_RES(MSG_ERR_INSERT_GLOS)).Execute();
-                return FALSE;
-            }
-        }
-        else
-            return FALSE;
-    }*/
     return TRUE;
 }
 
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index f981296..3bb769d 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -582,7 +582,6 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
             break;
 
         case SOT_FORMATSTR_ID_EMBED_SOURCE:
-//		default:
             if( !aDocShellRef.Is() )
             {
                 SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
@@ -1176,9 +1175,6 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
                 SwTransferable::SetSelInShell( rSh, TRUE, pPt );
                 break;
 
-            // case EXCHG_DEST_DOC_TEXTFRAME:
-            // case EXCHG_DEST_SWDOC_FREE_AREA:
-            // case EXCHG_DEST_DOC_URLFIELD:
             default:
                 SwTransferable::SetSelInShell( rSh, FALSE, pPt );
                 break;
@@ -1214,13 +1210,6 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
     }
 
     SwTransferable *pTrans=0, *pTunneledTrans=GetSwTransferable( rData );
-//    uno::Reference<XUnoTunnel> xTunnel( rData.GetTransferable(), UNO_QUERY );
-//    if ( xTunnel.is() )
-//    {
-//        sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() );
-//        if ( nHandle )
-//            pTunneledTrans = (SwTransferable*) (sal_IntPtr) nHandle;
-//    }
 
     if( pPt && ( bPasteSelection ? 0 != ( pTrans = pMod->pXSelection )
                                  : 0 != ( pTrans = pMod->pDragDrop) ))
@@ -1563,7 +1552,6 @@ USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh,
     case OBJCNT_GROUPOBJ:	nRet = EXCHG_DEST_DOC_GROUPOBJ;		break;
 
 // was mmchen wir bei Mehrfachselektion???
-//	case OBJCNT_DONTCARE:
     default:
         {
 /*
@@ -1633,7 +1621,6 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
                 pStream = aMSE40ClpObj.IsValid( *xStrm );
                 pRead = ReadHTML;
                 pRead->SetReadUTF8( TRUE );
-                //pRead->SetBaseURL( aMSE40ClpObj.GetBaseURL() );
 
                 BOOL bNoComments =
                     ( nFmt == SOT_FORMATSTR_ID_HTML_NO_COMMENT );
@@ -1809,18 +1796,6 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
             Graphic aGraphic;
             ULONG nGrFormat = 0;
 
-// (wg. Selection Manager bei Trustet Solaris)
-#ifndef SOLARIS
-/*
-            if( rData.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) )
-                nGrFormat = SOT_FORMATSTR_ID_SVXB;
-            else if( rData.GetGraphic( FORMAT_GDIMETAFILE, aGraphic ) )
-                nGrFormat = SOT_FORMAT_GDIMETAFILE;
-            else if( rData.GetGraphic( FORMAT_BITMAP, aGraphic ) )
-                nGrFormat = SOT_FORMAT_BITMAP;
-*/
-#endif
-
             // insert replacement image ( if there is one ) into the object helper
             if ( nGrFormat )
             {
@@ -2223,13 +2198,6 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
     case SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR:
         if( 0 != ( nRet = rData.GetINetBookmark( nFmt, aBkmk ) ))
         {
-/*				if( SW_PASTESDR_SETATTR != nAction )
-            {
-                INetURLObject aURL( aBkmk.GetURL() );
-                bCheckForGrf = INET_PROT_FILE == aURL.GetProtocol();
-                nRet = 0 != bCheckForGrf;
-            }
-*/
             if( SW_PASTESDR_SETATTR == nAction )
                 nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK;
             else
@@ -2471,15 +2439,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
                 const SfxFilter* pFlt = SW_PASTESDR_SETATTR == nAction
                         ? 0 : SwIoSystem::GetFileFilter(
                         sFileURL, aEmptyStr );
-                if( pFlt && !rSh.GetView().GetDocShell()->ISA(SwWebDocShell)
-    /*
-    JP 02.07.98: warum nur fuer die Formate ??
-                    && ( pFlt->GetUserData() == FILTER_SW5 ||
-                    pFlt->GetUserData() == FILTER_SW4 ||
-                    pFlt->GetUserData() == FILTER_SW3 ||
-                    pFlt->GetUserData() == FILTER_SWG )
-    */
-                    )
+                if( pFlt && !rSh.GetView().GetDocShell()->ISA(SwWebDocShell) )
                 {
     // und dann per PostUser Event den Bereich-Einfuegen-Dialog hochreissen
                     SwSectionData * pSect = new SwSectionData(
@@ -3123,14 +3083,6 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
         pWrtShell->HideCrsr();
     else
         pWrtShell->ShowCrsr();
-//!!	else if( DND_ACTION_NONE != nAction )
-//!!		pWrtShell->ShowCrsr();
-//!!	else
-//!!	{
-//!!		//Muss wohl sein weil gescrollt wurde und ?...?
-//!!		pWrtShell->StartAction();
-//!!		pWrtShell->EndAction();
-//!!	}
 
     ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( bOldIdle );
 }
@@ -3180,10 +3132,6 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
 // a word in the buffer, word in this context means 'something with spaces at
 // beginning and end'. In this case we definitely want these spaces to be inserted
 // here.
-//      if( SCRIPTTYPE_LATIN != rShell.GetScriptType() )
-//          bSmart = FALSE;
-//      else
-//      {
             bInWrd = rShell.IsInWrd();
              bEndWrd = rShell.IsEndWrd();
             bSmart = bInWrd || bEndWrd;
@@ -3193,7 +3141,6 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
                 if( bSmart && !bSttWrd && (bInWrd || bEndWrd) )
                     rShell.SwEditShell::Insert(' ');
             }
-//      }
     }
 
     int nRet = rShell.Paste( pClpDocFac->GetDoc() );
@@ -3586,7 +3533,6 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
         {
             refObj->AddConnectAdvise( this );
             refObj->AddDataAdvise( this,
-//                          SotExchange::GetFormatMimeType( FORMAT_RTF ),
                             aEmptyStr,
                             ADVISEMODE_NODATA | ADVISEMODE_ONLYONCE );
             nOldTimeOut = refObj->GetUpdateTimeout();
@@ -3640,12 +3586,6 @@ BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
     rStrm.Write( pMem, nLen );
     delete[] pMem;
 
-    //if( bDelBookmrk )
-    //{
-    //  // er wird das erstemal abgeholt, also ins Undo mitaufnehmen
-    //  // aber wie??
-    //}
-
     IDocumentMarkAccess* const pMarkAccess = pDocShell->GetDoc()->getIDocumentMarkAccess();
     IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->findMark(sName);
     if(ppMark != pMarkAccess->getMarksEnd()
diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx
index d380b00..1c23e22 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -364,7 +364,6 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt )
             //!! call different Execute function to get rid of the new thesaurus sub menu
             //!! pointer created in the call to Popup.
             //!! Otherwise we would have a memory leak (see also #i107205#)
-            //((PopupMenu*)pMgr->GetSVMenu())->Execute( this, aPos );
             pMgr->Execute( aPos, this );
             delete pMgr;
         }
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index c5b74f7..ccd09d5 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -998,11 +998,7 @@ IMPL_LINK( SwSidebarWin, WindowEventListener, VclSimpleEvent*, pEvent )
             }
             else if ( pMouseEvt->IsLeaveWindow())
             {
-                if (IsPreview())
-                {
-                    //doLazyDelete();
-                }
-                else
+                if (!IsPreview())
                 {
                     mbMouseOver = false;
                     if ( !HasFocus() )
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index a15f873..61563ee 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -226,7 +226,6 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
         if ( aRect.IsInside(aPos) )
         {
             rSh.StartAllAction();
-//!!			sal_Int8 nRet = DND_ACTION_NONE/*pOLV->ExecuteDrop( rEvt )*/;
             rSh.EndAllAction();
             return nRet;
         }
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index ff68fb3..dccc970 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -377,9 +377,6 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
         return;
     }
 
-    // Removed ExecHyperlink option.
-    //BOOL bExecHyperlinks = rSh.GetViewOptions()->IsExecHyperlinks() ^
-    //                     (nModifier == KEY_MOD2 ? TRUE : FALSE);
     BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
     if ( !bExecHyperlinks )
     {
@@ -4129,7 +4126,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
                                     }
                                 }
                             }
-                            else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos )
+                            else
                             {
                                 if ( bExecHyperlinks )
                                     rSh.ClickToINetAttr( *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr, nFilter );
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index 2a30f0b..8b543bc 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -428,7 +428,6 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
     FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE, 0 );
     Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
 
-//    aExpDlg.SetHelpId(HID_FILEDLG_ROMENU);
     INetURLObject aPath;
     aPath.SetSmartURL( sGrfPath );
 
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 37a0b0e..e961632 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -921,8 +921,6 @@ BOOL  lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages
         case RTL_TEXTENCODING_TIS_620          :
             aLanguages[0] = LANGUAGE_THAI;
         break;
-//        case RTL_TEXTENCODING_SYMBOL      :
-//        case RTL_TEXTENCODING_DONTKNOW:        :
         default: aLanguages[0] = Application::GetSettings().GetUILanguage();
     }
     return aLanguages[0] != LANGUAGE_SYSTEM;


More information about the Libreoffice-commits mailing list