loplugin: unused variables and commented code

Change-Id: I01f1f1d112767b576d7cfc6e25fe95385de2c0cf
This commit is contained in:
Thomas Arnhold 2013-03-03 06:01:17 +01:00
parent 9657161c2a
commit 919e277466
28 changed files with 8 additions and 60 deletions

View file

@ -277,9 +277,10 @@ namespace comphelper
xContext = xOwningAccessible->getAccessibleContext();
if ( xContext.is() )
{
::rtl::OUString sName = xContext->getAccessibleName();
::rtl::OUString sDescription = xContext->getAccessibleDescription();
// sal_Int32 nPlaceYourBreakpointHere = 0;
//TODO: do something
//::rtl::OUString sName = xContext->getAccessibleName();
//::rtl::OUString sDescription = xContext->getAccessibleDescription();
//sal_Int32 nPlaceYourBreakpointHere = 0;
}
}
catch( const Exception& /*e*/ )

View file

@ -178,7 +178,6 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const ::rtl::OUString& _rForName
Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData();
::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " ));
::rtl::OUString aQuote = xMetaData->getIdentifierQuoteString( );
aSql += ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true );
aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ADD "));

View file

@ -505,7 +505,6 @@ void SAL_CALL OTableHelper::rename( const ::rtl::OUString& newName ) throw(SQLEx
else
{
::rtl::OUString sSql = getRenameStart();
::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);

View file

@ -280,7 +280,6 @@ namespace
if(!xColumns.is() || !xColumns->getCount())
::dbtools::throwFunctionSequenceException(_xConnection);
const ::rtl::OUString sQuote = xMetaData->getIdentifierQuoteString();
aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" PRIMARY KEY ")));
aSql.append(generateColumnNames(xColumns,xMetaData));
}
@ -291,7 +290,6 @@ namespace
if(!xColumns.is() || !xColumns->getCount())
::dbtools::throwFunctionSequenceException(_xConnection);
const ::rtl::OUString sQuote = xMetaData->getIdentifierQuoteString();
aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" UNIQUE ")));
aSql.append(generateColumnNames(xColumns,xMetaData));
}

View file

@ -435,7 +435,6 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
}
else if (pPredicateNode->count() == 3)
{
::rtl::OUString aTableName = pPredicateNode->getChild(0)->getTokenValue();
if(SQL_ISRULE(pPredicateNode->getChild(2),column_val))
aColumnName = pPredicateNode->getChild(2)->getChild(0)->getTokenValue();
else

View file

@ -318,7 +318,6 @@ void OHSQLTable::dropDefaultValue(const ::rtl::OUString& _rColName)
::rtl::OUString OHSQLTable::getAlterTableColumnPart()
{
::rtl::OUString sSql( "ALTER TABLE " );
const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) );
sSql += sComposedName;
@ -387,8 +386,6 @@ void SAL_CALL OHSQLTable::rename( const ::rtl::OUString& newName ) throw(SQLExce
else
sSql += ::rtl::OUString(" TABLE ");
::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);

View file

@ -132,7 +132,6 @@ void HViews::createView( const Reference< XPropertySet >& descriptor )
Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection();
::rtl::OUString aSql( "CREATE VIEW " );
::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sCommand;
aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true );

View file

@ -343,7 +343,6 @@ void OMySQLTable::dropDefaultValue(const ::rtl::OUString& _rColName)
::rtl::OUString OMySQLTable::getAlterTableColumnPart()
{
::rtl::OUString sSql( "ALTER TABLE " );
const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sComposedName(
::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) );

View file

@ -126,7 +126,6 @@ void OViews::createView( const Reference< XPropertySet >& descriptor )
Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection();
::rtl::OUString aSql( "CREATE VIEW " );
::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sCommand;
aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true );

View file

@ -1088,7 +1088,7 @@ void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const ::rtl:
else
pSchemaPat = NULL;
::rtl::OString aPKQ,aPKO,aPKN,aCOL;
::rtl::OString aPKQ,aPKO,aPKN;
if ( catalog.hasValue() )
aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
@ -1132,7 +1132,7 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const Any&
else
pSchemaPat = NULL;
::rtl::OString aPKQ,aPKO,aPKN,aCOL;
::rtl::OString aPKQ,aPKO,aPKN;
if ( catalog.hasValue() )
aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding);
@ -1170,7 +1170,7 @@ void ODatabaseMetaDataResultSet::openForeignKeys( const Any& catalog, const ::rt
const Any& catalog2, const ::rtl::OUString* schema2,
const ::rtl::OUString* table2) throw(SQLException, RuntimeException)
{
::rtl::OString aPKQ,aPKO,aPKN, aFKQ, aFKO, aFKN;
::rtl::OString aPKQ, aPKN, aFKQ, aFKO, aFKN;
if ( catalog.hasValue() )
aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
if ( catalog2.hasValue() )
@ -1219,7 +1219,7 @@ void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const ::rtl
else
pSchemaPat = NULL;
::rtl::OString aPKQ,aPKO,aPKN,aCOL;
::rtl::OString aPKQ,aPKO,aPKN;
if ( catalog.hasValue() )
aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);

View file

@ -1133,7 +1133,6 @@ sal_Bool SvxLineTabPage::FillXLSet_Impl()
void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
{
String aString;
XLineStyle eXLS; // XLINE_NONE, XLINE_SOLID, XLINE_DASH
// Line style

View file

@ -104,7 +104,6 @@ rtl::OUString FontSizeMenuController::retrievePrinterName( com::sun::star::uno::
void FontSizeMenuController::setCurHeight( long nHeight, Reference< css::awt::XPopupMenu >& rPopupMenu )
{
// check menu item
rtl::OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False );
sal_uInt16 nChecked = 0;
sal_uInt16 nItemCount = rPopupMenu->getItemCount();
for( sal_uInt16 i = 0; i < nItemCount; i++ )

View file

@ -178,8 +178,6 @@ Rectangle SdwRectangle::GetOriginalRect() const
Point aLT(aCenter.X()-(long)((double)nWidth/2+0.5),
aCenter.Y()-(long)((double)nHeight/2+0.5));
Point aRT(aLT.X()+nWidth, aLT.Y());
Point aLB(aLT.X(), aLT.Y()-nHeight);
Point aRB(aLT.X()+nWidth, aLT.Y()+nHeight);
return Rectangle(aLT, aRB);

View file

@ -1337,7 +1337,6 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( pStringItem )
{
String aPLZ = pStringItem->GetValue();
bRet = sal_True /*!!!SfxIniManager::CheckPLZ( aPLZ )*/;
}
#ifndef DISABLE_SCRIPTING

View file

@ -232,7 +232,6 @@ void FontSizeMenu::SetCurHeight( long nHeight )
mnCurHeight = nHeight;
// check menu item
OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False );
sal_uInt16 nChecked = 0;
sal_uInt16 nItemCount = GetItemCount();
for( sal_uInt16 i = 0; i < nItemCount; i++ )

View file

@ -811,12 +811,6 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd
pRet = new SdrPathObj( OBJ_POLY, aPolyPoly );
Point aP( pCustomShape->GetSnapRect().Center() );
Size aS( pCustomShape->GetLogicRect().GetSize() );
aP.X() -= aS.Width() / 2;
aP.Y() -= aS.Height() / 2;
Rectangle aLogicRect( aP, aS );
SfxItemSet aSet( pCustomShape->GetMergedItemSet() );
aSet.ClearItem( SDRATTR_TEXTDIRECTION ); //SJ: vertical writing is not required, by removing this item no outliner is created
aSet.Put(SdrShadowItem(sal_False)); // #i37011# NO shadow for FontWork geometry

View file

@ -560,7 +560,6 @@ void IMapWindow::RequestHelp( const HelpEvent& rHEvt )
if ( pIMapObj && ( aStr = pIMapObj->GetURL() ).Len() )
{
String aDescr( pIMapObj->GetAltText() );
Rectangle aLogicPix( LogicToPixel( Rectangle( Point(), GetGraphicSize() ) ) );
Rectangle aScreenRect( OutputToScreenPixel( aLogicPix.TopLeft() ),
OutputToScreenPixel( aLogicPix.BottomRight() ) );

View file

@ -419,9 +419,6 @@ FmControlData::FmControlData(
Reference< XPropertySet > xSet(m_xFormComponent, UNO_QUERY);
if( xSet.is() )
{
#ifdef DBG_UTIL
::rtl::OUString aEntryName = ::comphelper::getString(xSet->getPropertyValue( FM_PROP_NAME ));
#endif
SetText( ::comphelper::getString(xSet->getPropertyValue( FM_PROP_NAME )));
}
}

View file

@ -840,8 +840,6 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons
Reference< XColumnsSupplier> xSupplyCols(m_xModelAsIndex, UNO_QUERY);
Reference< XNameAccess> xFields(xSupplyCols->getColumns(), UNO_QUERY);
::rtl::OUString aQuote( xMetaData->getIdentifierQuoteString() );
// now add the filter rows
try
{

View file

@ -466,7 +466,6 @@ void printMethods(std::ostream & o,
reader.getSuperTypeName(i)));
}
OString stype(codemaker::convertString(super.getTypeName()));
printMethods(o, options, manager, super, generated, delegate,
classname, indentation, defaultvalue, propertyhelper);
}

View file

@ -404,16 +404,6 @@ void printMethods(std::ostream & o,
}
sal_uInt16 method = 0;
for ( sal_uInt16 i = 0; i < reader.getFieldCount(); ++i ) {
// OString fieldName(
// codemaker::convertString(reader.getFieldName(i)).
// replace('/', '.'));
// OString fieldType(
// codemaker::convertString(reader.getFieldTypeName(i)).
// replace('/', '.'));
// attributes.insert(StringPairHashMap::value_type(fieldName,
// std::pair<OString, sal_Int16>(
// fieldType, reader.getFieldFlags(i))));
o << indentation << "public ";
printType(o,
options, manager,
@ -422,9 +412,6 @@ void printMethods(std::ostream & o,
<< codemaker::convertString(reader.getFieldName(i)).getStr()
<< "()";
OUString mn = reader.getMethodName(method);
OUString fn = reader.getFieldName(i);
if ( method < reader.getMethodCount()
&& reader.getMethodFlags(method) == RT_MODE_ATTRIBUTE_GET
&& reader.getMethodName(method) == reader.getFieldName(i) )
@ -459,7 +446,6 @@ void printMethods(std::ostream & o,
}
// REMOVE next line
OUString tmp = reader.getFieldName(i);
if ( (reader.getFieldFlags(i) & RT_ACCESS_READONLY) == 0 ) {
bool setAttrMethod = false;
o << indentation << "public void set"

View file

@ -176,7 +176,6 @@ void writeMethodData( typereg::Writer& rWriter, sal_uInt32 calculatedMemberOffse
Sequence< Reference< XMethodParameter > > parameters(xMethod->getParameters());
Sequence< Reference< XTypeDescription > > exceptions(xMethod->getExceptions());
OUString name(xMethod->getMemberName());
sal_uInt16 methodIndex = (sal_uInt16)(xMethod->getPosition()
- calculatedMemberOffset);
sal_uInt16 paramCount = (sal_uInt16)parameters.getLength();

View file

@ -68,7 +68,6 @@ throw (RuntimeException)
#endif
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{

View file

@ -67,7 +67,6 @@ throw (RuntimeException)
#endif
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{

View file

@ -63,7 +63,6 @@ throw (RuntimeException)
#endif
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{

View file

@ -63,7 +63,6 @@ throw (RuntimeException)
#endif
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{

View file

@ -64,7 +64,6 @@ throw (RuntimeException)
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@ -127,7 +126,6 @@ throw( com::sun::star::uno::RuntimeException )
OUString sTypeName;
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
OUString sURL;
const PropertyValue *pValue = Descriptor.getConstArray();
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)

View file

@ -93,7 +93,6 @@ throw (RuntimeException)
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@ -182,7 +181,6 @@ throw( RuntimeException )
OUString sTypeName;
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
OUString sURL;
const PropertyValue *pValue = Descriptor.getConstArray();
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)