[PATCH] Dead code, translations.

Wol anthony at youngman.org.uk
Tue Nov 23 15:33:20 PST 2010


---
 dbaccess/source/ui/misc/DExport.cxx             |    7 +--
 dbaccess/source/ui/misc/HtmlReader.cxx          |    3 +-
 dbaccess/source/ui/misc/RtfReader.cxx           |    2 -
 dbaccess/source/ui/misc/TokenWriter.cxx         |   60 ++---------------------
 dbaccess/source/ui/misc/UITools.cxx             |   13 +----
 dbaccess/source/ui/misc/WColumnSelect.cxx       |    1 -
 dbaccess/source/ui/misc/WCopyTable.cxx          |    6 +-
 dbaccess/source/ui/misc/WNameMatch.cxx          |    1 -
 dbaccess/source/ui/misc/controllerframe.cxx     |    5 --
 dbaccess/source/ui/misc/indexcollection.cxx     |    6 --
 dbaccess/source/ui/misc/linkeddocuments.cxx     |    1 -
 dbaccess/source/ui/misc/singledoccontroller.cxx |    9 +---
 12 files changed, 14 insertions(+), 100 deletions(-)

diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index ce0e28f..cd9704d 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -290,7 +290,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
                 break;
             }
         }
-    } // if(xSet.is())
+    }
     if ( !m_pTypeInfo )
         m_pTypeInfo	= TOTypeInfoSP(new OTypeInfo());
     SetColumnTypes(pList,_pInfoMap);
@@ -326,9 +326,6 @@ void ODatabaseExport::insertValueIntoColumn()
                 sal_Int32 nPos = m_vColumns[nNewPos].first;
                 if ( nPos != COLUMN_POSITION_NOT_FOUND )
                 {
-    //                  if(m_nDefToken != LANGUAGE_DONTKNOW) // falls Sprache anders als Systemsprache
-    //                      m_pNF->ChangeIntl((LanguageType)m_nDefToken);
-
                     if ( !m_sTextToken.Len() && pField->IsNullable() )
                         m_pUpdateHelper->updateNull(nPos,pField->GetType());
                     else
@@ -790,7 +787,7 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException
             m_bDontAskAgain = TRUE;
         else
             m_bError = TRUE;
-    } // if(!m_bDontAskAgain)
+    }
 }
 // -----------------------------------------------------------------------------
 void ODatabaseExport::adjustFormat()
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 0ddc53d..a3b0692 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -337,7 +337,6 @@ void OHTMLReader::fetchOptions()
             case HTML_O_SDVAL:
             {
                 m_sValToken = pOption->GetString();
-                //m_sTextToken = pOption->GetString();
                 m_bSDNum = sal_True;
             }
             break;
@@ -446,7 +445,7 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption* pOption )
     {
         if ( rOptVal.Search('*') != STRING_NOTFOUND )
         {	// relativ zu was?!?
-//2do: ColArray aller relativen Werte sammeln und dann MakeCol
+//TODO: ColArray aller relativen Werte sammeln und dann MakeCol
             return 0;
         }
         else
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index 725b822..b9e57c3 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -315,8 +315,6 @@ sal_Bool ORTFReader::CreateTable(int nToken)
                 }
                 break;
             case RTF_CF:
-                //	if(nTokenValue < m_vecColor.size())
-                    //	m_xTable->setPropertyValue(PROPERTY_TEXTCOLOR,makeAny(m_vecColor[nTokenValue]));
                 break;
             case RTF_B:
                 aFont.Weight = ::com::sun::star::awt::FontWeight::BOLD;
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index aa26061..800394f 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -201,8 +201,6 @@ void SAL_CALL ODatabaseImportExport::disposing( const EventObject& Source ) thro
         m_xConnection.clear();
         dispose();
         m_bNeedToReInitialize = true;
-        //if(!m_bInInitialize)
-        //	initialize();
     }
 }
 // -----------------------------------------------------------------------------
@@ -369,7 +367,7 @@ BOOL ODatabaseImportExport::Write()
     {
         if ( !m_bInInitialize )
             initialize();
-    } // if ( m_bNeedToReInitialize )
+    }
     return TRUE;
 }
 // -----------------------------------------------------------------------------
@@ -379,7 +377,7 @@ BOOL ODatabaseImportExport::Read()
     {
         if ( !m_bInInitialize )
             initialize();
-    } // if ( m_bNeedToReInitialize )
+    }
     return TRUE;
 }
 // -----------------------------------------------------------------------------
@@ -404,54 +402,6 @@ BOOL ORTFImportExport::Write()
     (*m_pStream) << OOO_STRING_SVTOOLS_RTF_ANSI	<< ODatabaseImportExport::sNewLine;
     rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252;
 
-    /*
-    // Access RTF Export Beispiel
-    {\rtf1\ansi
-        {\colortbl\red0\green0\blue0;\red255\green255\blue255;\red192\green192\blue192;}
-        {\fonttbl\f0\fcharset0\fnil MS Sans Serif;\f1\fcharset0\fnil Arial;\f2\fcharset0\fnil Arial;}
-        \trowd\trgaph40
-                \clbrdrl\brdrs\brdrcf0\clbrdrt\brdrs\brdrcf0\clbrdrb\brdrs\brdrcf0\clbrdrr\brdrs\brdrcf0\clshdng10000\clcfpat2\cellx1437
-                \clbrdrl\brdrs\brdrcf0\clbrdrt\brdrs\brdrcf0\clbrdrb\brdrs\brdrcf0\clbrdrr\brdrs\brdrcf0\clshdng10000\clcfpat2\cellx2874
-        {
-            \trrh-270\pard\intbl
-                {\qc\fs20\b\f1\cf0\cb2 text\cell}
-                \pard\intbl
-                {\qc\fs20\b\f1\cf0\cb2 datum\cell}
-                \pard\intbl\row
-        }
-        \trowd\trgaph40\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx1437\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
-        {\trrh-270\pard\intbl
-            {\ql\fs20\f2\cf0\cb1 heute\cell}
-            \pard\intbl
-            {\qr\fs20\f2\cf0\cb1 10.11.98\cell}
-            \pard\intbl\row
-        }
-        \trowd\trgaph40\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx1437\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
-        {\trrh-270\pard\intbl
-            {\ql\fs20\f2\cf0\cb1 morgen\cell}
-            \pard\intbl
-            {\qr\fs20\f2\cf0\cb1 11.11.98\cell}
-            \pard\intbl\row
-        }
-        \trowd\trgaph40\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx1437\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
-        {\trrh-270\pard\intbl
-            {\ql\fs20\f2\cf0\cb1 bruder\cell}
-            \pard\intbl
-            {\qr\fs20\f2\cf0\cb1 21.04.98\cell}
-            \pard\intbl\row
-        }
-        \trowd\trgaph40
-        \clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx
-        \clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
-        {\trrh-270\pard\intbl
-            {\ql\fs20\f2\cf0\cb1 vater\cell}
-            \pard\intbl
-            {\qr\fs20\f2\cf0\cb1 28.06.98\cell}
-            \pard\intbl\row
-        }
-    }
-    */
-
     BOOL bBold			= ( ::com::sun::star::awt::FontWeight::BOLD		== m_aFont.Weight );
     BOOL bItalic		= ( ::com::sun::star::awt::FontSlant_ITALIC		== m_aFont.Slant );
     BOOL bUnderline		= ( ::com::sun::star::awt::FontUnderline::NONE	!= m_aFont.Underline );
@@ -671,8 +621,6 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
                 Reference<XPropertySet> xColumn(m_xRowSetColumns->getByIndex(i-1),UNO_QUERY_THROW);
                 dbtools::FormattedColumnValue aFormatedValue(aContext,xRowSet,xColumn);
                 ::rtl::OUString sValue = aFormatedValue.getFormattedValue();
-                // m_xRow->getString(i);
-                //if (!m_xRow->wasNull())
                 if ( sValue.getLength() )
                     RTFOutFuncs::Out_String(*m_pStream,sValue,m_eDestEnc);
             }
@@ -724,7 +672,7 @@ const sal_Int16 OHTMLImportExport::nCellSpacing = 0;
 const char __FAR_DATA OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
 
 //========================================================================
-// Makros fuer HTML-Export
+// Macros for HTML-Export
 //========================================================================
 #define OUT_PROLOGUE()		((*m_pStream) << sHTML30_Prologue << ODatabaseImportExport::sNewLine << ODatabaseImportExport::sNewLine)
 #define TAG_ON( tag )		HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag )
@@ -835,7 +783,7 @@ void OHTMLImportExport::WriteBody()
     IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_style );
     OUT_LF();
 
-    // default Textfarbe schwarz
+    // default Textcolour black
     (*m_pStream) << '<' << OOO_STRING_SVTOOLS_HTML_body << ' ' << OOO_STRING_SVTOOLS_HTML_O_text << '=';
     sal_Int32 nColor = 0;
     if(m_xObject.is())
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index c7476d2..ad91370 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -233,8 +233,6 @@ SQLExceptionInfo createConnection(	const Reference< ::com::sun::star::beans::XPr
     catch(SQLException& e) { aInfo = SQLExceptionInfo(e); }
     catch(Exception&) { OSL_ENSURE(0,"SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
 
-    //	showError(aInfo);
-
     return aInfo;
 }
 // -----------------------------------------------------------------------------
@@ -419,11 +417,6 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
             // -> drop the precision and the scale restriction, accept any type with the property
             // type id (nType)
 
-            //OSL_ENSURE(sal_False,
-            //	(	::rtl::OString("getTypeInfoFromType: did not find a matching type")
-            //	+=	::rtl::OString(" (expected type name: ")
-            //	+=	::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding())
-            //	+=	::rtl::OString(")! Defaulting to the first matching type.")).getStr());
             for(aIter = aPair.first; aIter != aPair.second; ++aIter)
             {
                 // search the best matching type (now comparing the local names)
@@ -947,7 +940,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
                                 sal_Bool  _bHasFormat)
 {
     sal_Bool bRet = sal_False;
-    // the allowed format changes depend of the type of the field ...
+    // the allowed format changes depending on the type of the field ...
     _nFlags = TP_ATTR_ALIGN;
 
     if (_bHasFormat)
@@ -1448,13 +1441,13 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
             break;
         default:
             ;
-    } // switch(_nDataType)
+    }
     if ( !pTypeInfo )
     {
         ::rtl::OUString sCreate(RTL_CONSTASCII_USTRINGPARAM("x")),sTypeName;
         sal_Bool bForce = sal_True;
         pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,sCreate,50,0,sal_False,bForce);
-    } // if ( !pTypeInfo )
+    }
     OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!");
     return pTypeInfo;
 }
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index d86e3e0..147f3f0 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -161,7 +161,6 @@ sal_Bool OWizColumnSelect::LeavePage()
 {
     DBG_CHKTHIS(OWizColumnSelect,NULL);
 
-    //	m_pParent->getColumns()->clear();
     m_pParent->clearDestColumns();
 
     for(sal_uInt16 i=0 ; i< m_lbNewColumnNames.GetEntryCount();++i)
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 0bdeb74..d3ab45c 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -1025,7 +1025,7 @@ IMPL_LINK( OCopyTableWizard, ImplActivateHdl, WizardDialog*, EMPTYARG )
 void OCopyTableWizard::CheckButtons()
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen at sun.com", "OCopyTableWizard::CheckButtons" );
-    if(GetCurLevel() == 0) // erste Seite hat kein PrevButton
+    if(GetCurLevel() == 0) // the first page has no back button
     {
         if(m_nPageCount > 1)
             m_pbNext.Enable(sal_True);
@@ -1034,7 +1034,7 @@ void OCopyTableWizard::CheckButtons()
 
         m_pbPrev.Enable(sal_False);
     }
-    else if(GetCurLevel() == m_nPageCount-1) // letzte Seite hat keinen Next Button
+    else if(GetCurLevel() == m_nPageCount-1) // the last page has no next button
     {
         m_pbNext.Enable(sal_False);
         m_pbPrev.Enable(sal_True);
@@ -1042,7 +1042,7 @@ void OCopyTableWizard::CheckButtons()
     else
     {
         m_pbPrev.Enable(sal_True);
-        // next has already his state
+        // next already has its state
     }
 }
 // -----------------------------------------------------------------------
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index ed287bd..f60b6ec 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -163,7 +163,6 @@ sal_Bool OWizNameMatching::LeavePage()
             ;
         const sal_Int32 nPos = ::std::distance(pSrcColumns->begin(),aSrcIter);
 
-        //	sal_Int32 nPos = m_CTRL_LEFT.GetModel()->GetAbsPos(pLeftEntry);
         if(m_CTRL_LEFT.GetCheckButtonState(pLeftEntry) == SV_BUTTON_CHECKED)
         {
             OFieldDescription* pDestField = static_cast<OFieldDescription*>(pRightEntry->GetUserData());
diff --git a/dbaccess/source/ui/misc/controllerframe.cxx b/dbaccess/source/ui/misc/controllerframe.cxx
index f374308..e04b735 100644
--- a/dbaccess/source/ui/misc/controllerframe.cxx
+++ b/dbaccess/source/ui/misc/controllerframe.cxx
@@ -295,11 +295,6 @@ namespace dbaui
                 const Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
                 ENSURE_OR_THROW( pContainerWindow, "no Window implementation for the frame's container window!" );
 
-                /*const Window* pContainerParentWindow = pContainerWindow->GetParent();
-                if ( pContainerParentWindow && ( pContainerParentWindow->GetType() == WINDOW_BORDERWINDOW ) )
-                    pContainerParentWindow = pContainerParentWindow->GetParent();
-                m_pData->m_bIsTopLevelDocumentWindow = ( pContainerParentWindow == NULL );*/
-
                 m_pData->m_bIsTopLevelDocumentWindow = ( pContainerWindow->GetExtendedStyle() & WB_EXT_DOCUMENT ) != 0;
             }
 
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index 56cd550..5a5d372 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -65,12 +65,6 @@ namespace dbaui
     }
 
     //------------------------------------------------------------------
-//	OIndexCollection::OIndexCollection(const Reference< XNameAccess >& _rxIndexes)
-//	{
-//		implConstructFrom(_rxIndexes);
-//	}
-
-    //------------------------------------------------------------------
     const OIndexCollection& OIndexCollection::operator=(const OIndexCollection& _rSource)
     {
         detach();
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index 58e920c..517ab5b 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -360,7 +360,6 @@ namespace dbaui
 
                 com::sun::star::sdbc::SQLException aSQLException;
                 aSQLException.Message = sMessage;
-                // aSQLException.Context = e.Context;
                 aInfo = dbtools::SQLExceptionInfo(aSQLException);
             }
             return xRet;
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index 8c22f54..3162ae8 100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -667,14 +667,7 @@ namespace dbaui
             sTitle.appendAscii(" : ");
         }
         sTitle.append( getPrivateTitle() );
-        // There can be only one view with the same object
-        //const sal_Int32 nCurrentView = getCurrentStartNumber();
-        //if ( nCurrentView > 1 )
-        //{
-        //    sTitle.appendAscii(" : ");
-        //    sTitle.append(nCurrentView);
-        //}
-        
+
         return sTitle.makeStringAndClear();
     }
     // -----------------------------------------------------------------------------
-- 
1.7.2.2


--------------060100010409040500070809--


More information about the LibreOffice mailing list