Kaydet (Commit) 0d1253c2 authored tarafından Noel Grandin's avatar Noel Grandin

new loplugin writeonlyvars

largely based on the relevant portion of the unusedfields loplugin, but
adapted for local vars

Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1
Reviewed-on: https://gerrit.libreoffice.org/66835
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 2dd7aba7
......@@ -236,11 +236,9 @@ bool DlgEdObj::TransformControlToSdrCoordinates(
DBG_ASSERT( xPSetForm.is(), "DlgEdObj::TransformControlToSdrCoordinates: no form property set!" );
if ( !xPSetForm.is() )
return false;
sal_Int32 nFormX = 0, nFormY = 0, nFormWidth, nFormHeight;
sal_Int32 nFormX = 0, nFormY = 0;
xPSetForm->getPropertyValue( DLGED_PROP_POSITIONX ) >>= nFormX;
xPSetForm->getPropertyValue( DLGED_PROP_POSITIONY ) >>= nFormY;
xPSetForm->getPropertyValue( DLGED_PROP_WIDTH ) >>= nFormWidth;
xPSetForm->getPropertyValue( DLGED_PROP_HEIGHT ) >>= nFormHeight;
Size aFormPos( nFormX, nFormY );
// convert logic units to pixel
......
......@@ -4630,12 +4630,9 @@ void SbUnoStructRefObject::initMemberCache()
{
if ( mbMemberCacheInit )
return;
sal_Int32 nAll = 0;
typelib_TypeDescription * pTD = nullptr;
maMemberInfo.getType().getDescription(&pTD);
typelib_CompoundTypeDescription * pCompTypeDescr = reinterpret_cast<typelib_CompoundTypeDescription *>(pTD);
for ( ; pCompTypeDescr; pCompTypeDescr = pCompTypeDescr->pBaseTypeDescription )
nAll += pCompTypeDescr->nMembers;
for ( pCompTypeDescr = reinterpret_cast<typelib_CompoundTypeDescription *>(pTD); pCompTypeDescr;
pCompTypeDescr = pCompTypeDescr->pBaseTypeDescription )
{
......
......@@ -209,7 +209,6 @@ void SbiExprList::Gen(SbiCodeGen& rGen)
{
rGen.Gen( SbiOpcode::ARGC_ );
// Type adjustment at DECLARE
sal_uInt16 nCount = 1;
for( auto& pExpr: aData )
{
......@@ -249,7 +248,6 @@ void SbiExprList::Gen(SbiCodeGen& rGen)
{
rGen.Gen( SbiOpcode::ARGV_ );
}
nCount++;
}
}
}
......
......@@ -346,8 +346,6 @@ void NetChart::createShapes()
//better performance for big data
std::map< VDataSeries*, FormerPoint > aSeriesFormerPointMap;
m_bPointsWereSkipped = false;
sal_Int32 nSkippedPoints = 0;
sal_Int32 nCreatedPoints = 0;
bool bDateCategory = (m_pExplicitCategoriesProvider && m_pExplicitCategoriesProvider->isDateAxis());
......@@ -487,7 +485,6 @@ void NetChart::createShapes()
aFormerPoint.m_fX, aFormerPoint.m_fY, aFormerPoint.m_fZ
, aScaledLogicPosition.PositionX, aScaledLogicPosition.PositionY, aScaledLogicPosition.PositionZ ) )
{
++nSkippedPoints;
m_bPointsWereSkipped = true;
continue;
}
......@@ -535,8 +532,6 @@ void NetChart::createShapes()
uno::Reference<drawing::XShape>( xPointGroupShape_Shapes, uno::UNO_QUERY );
{
nCreatedPoints++;
//create data point
drawing::Direction3D aSymbolSize(0,0,0);
if (bCreateSymbol) // implies pSymbolProperties
......
......@@ -952,7 +952,6 @@ drawing::Direction3D SeriesPlotterContainer::getPreferredAspectRatio()
{
drawing::Direction3D aPreferredAspectRatio(1.0,1.0,1.0);
sal_Int32 nPlotterCount=0;
//get a list of all preferred aspect ratios and combine them
//first with special demands wins (less or equal zero <-> arbitrary)
double fx, fy, fz;
......@@ -985,7 +984,6 @@ drawing::Direction3D SeriesPlotterContainer::getPreferredAspectRatio()
if( fx>0 && fy>0 && fz>0 )
break;
++nPlotterCount;
}
aPreferredAspectRatio = drawing::Direction3D(fx, fy, fz);
return aPreferredAspectRatio;
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <vector>
#include <ostream>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
namespace Bar
{
void test()
{
// check that we DON'T see reads here
// expected-error@+1 {{write m_bar3 [loplugin:writeonlyvars]}}
int* m_bar3;
// expected-error@+1 {{write m_bar3b [loplugin:writeonlyvars]}}
int* m_bar3b;
m_bar3 = nullptr;
m_bar3b = m_bar3 = nullptr;
// check that we see reads of field when passed to a function pointer
// check that we see read of a field that is a function pointer
// expected-error@+2 {{write m_bar4 [loplugin:writeonlyvars]}}
// expected-error@+1 {{read m_bar4 [loplugin:writeonlyvars]}}
int m_bar4;
// expected-error@+1 {{read m_barfunctionpointer [loplugin:writeonlyvars]}}
void (*m_barfunctionpointer)(int&) = nullptr;
m_barfunctionpointer(m_bar4);
// check that we see reads of a field when used in variable init
// expected-error@+1 {{read m_bar5 [loplugin:writeonlyvars]}}
int m_bar5 = 1;
int x = m_bar5;
(void)x;
// check that we see reads of a field when used in ranged-for
// expected-error@+1 {{read m_bar6 [loplugin:writeonlyvars]}}
std::vector<int> m_bar6;
for (auto i : m_bar6)
{
(void)i;
}
// check that we see writes of array fields
// expected-error@+1 {{write m_bar7 [loplugin:writeonlyvars]}}
int m_bar7[5];
m_bar7[3] = 1;
// check that we see reads when a field is used in an array expression
// expected-error@+1 {{read m_bar8 [loplugin:writeonlyvars]}}
int m_bar8 = 1;
// expected-error@+1 {{read tmp [loplugin:writeonlyvars]}}
char tmp[5];
auto x2 = tmp[m_bar8];
(void)x2;
// check that we don't see reads when calling operator>>=
// expected-error@+1 {{write m_bar9 [loplugin:writeonlyvars]}}
int m_bar9;
// expected-error@+1 {{read any [loplugin:writeonlyvars]}}
css::uno::Any any;
any >>= m_bar9;
// check that we see don't see writes when calling operator<<=
// expected-error@+1 {{read m_bar10 [loplugin:writeonlyvars]}}
int m_bar10;
// expected-error@+2 {{write any2 [loplugin:writeonlyvars]}}
// expected-error@+1 {{read any2 [loplugin:writeonlyvars]}}
css::uno::Any any2;
any2 <<= m_bar10;
};
};
struct ReadOnly1
{
ReadOnly1(int&);
};
namespace ReadOnlyAnalysis
{
void method1(int&);
void test()
{
// check that we see a write when we pass by non-const ref
// expected-error@+2 {{read m_f2 [loplugin:writeonlyvars]}}
// expected-error@+1 {{write m_f2 [loplugin:writeonlyvars]}}
int m_f2;
method1(m_f2);
// expected-error@+1 {{write m_f4 [loplugin:writeonlyvars]}}
std::vector<int> m_f4;
m_f4.push_back(1);
// check that we see a write when we pass by non-const ref
// expected-error@+2 {{read m_f5 [loplugin:writeonlyvars]}}
// expected-error@+1 {{write m_f5 [loplugin:writeonlyvars]}}
int m_f5;
ReadOnly1 a(m_f5);
// check that we see a write when we pass by non-const ref
// expected-error@+2 {{read m_f6 [loplugin:writeonlyvars]}}
// expected-error@+1 {{write m_f6 [loplugin:writeonlyvars]}}
int m_f6;
// expected-error@+1 {{write r [loplugin:writeonlyvars]}}
int& r = m_f6;
r = 1;
};
};
void ReadOnlyAnalysis3()
{
// expected-error@+1 {{read m_f1 [loplugin:writeonlyvars]}}
int m_f1 = 0;
if (m_f1)
m_f1 = 1;
};
// Verify the special logic for container fields that only contains mutations that
// add elements.
void ReadOnlyAnalysis4()
{
// expected-error@+1 {{read m_readonly [loplugin:writeonlyvars]}}
std::vector<int> m_readonly;
// expected-error@+1 {{write m_writeonly [loplugin:writeonlyvars]}}
std::vector<int> m_writeonly;
// expected-error@+1 {{read m_readonlyCss [loplugin:writeonlyvars]}}
css::uno::Sequence<sal_Int32> m_readonlyCss;
// expected-error@+1 {{write x [loplugin:writeonlyvars]}}
int x = m_readonly[0];
(void)x;
*m_readonly.begin() = 1; // TODO?
m_writeonly.push_back(0);
x = m_readonlyCss.getArray()[0];
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
This diff is collapsed.
......@@ -2332,11 +2332,10 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
{
OUString sTempName = createTempFile();
ODbaseTable* pNewTable = new ODbaseTable(m_pTables,static_cast<ODbaseConnection*>(m_pConnection));
Reference< XPropertySet > xHold = pNewTable;
pNewTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(sTempName));
rtl::Reference<ODbaseTable> xNewTable(new ODbaseTable(m_pTables,static_cast<ODbaseConnection*>(m_pConnection)));
xNewTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(sTempName));
{
Reference<XAppend> xAppend(pNewTable->getColumns(),UNO_QUERY);
Reference<XAppend> xAppend(xNewTable->getColumns(),UNO_QUERY);
bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers();
// copy the structure
for(sal_Int32 i=0;i < m_xColumns->getCount();++i)
......@@ -2361,7 +2360,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
}
// construct the new table
if(!pNewTable->CreateImpl())
if(!xNewTable->CreateImpl())
{
const OUString sError( getConnection()->getResources().getResourceStringWithSubstitution(
STR_COLUMN_NOT_ADDABLE,
......@@ -2370,16 +2369,16 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
::dbtools::throwGenericSQLException( sError, *this );
}
pNewTable->construct();
xNewTable->construct();
// copy the data
copyData(pNewTable,pNewTable->m_xColumns->getCount());
copyData(xNewTable.get(),xNewTable->m_xColumns->getCount());
// drop the old table
if(DropImpl())
{
pNewTable->renameImpl(m_Name);
xNewTable->renameImpl(m_Name);
// release the temp file
}
xHold.clear();
xNewTable.clear();
FileClose();
construct();
......@@ -2391,11 +2390,10 @@ void ODbaseTable::dropColumn(sal_Int32 _nPos)
{
OUString sTempName = createTempFile();
ODbaseTable* pNewTable = new ODbaseTable(m_pTables,static_cast<ODbaseConnection*>(m_pConnection));
Reference< XPropertySet > xHold = pNewTable;
pNewTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(sTempName));
rtl::Reference<ODbaseTable> xNewTable(new ODbaseTable(m_pTables,static_cast<ODbaseConnection*>(m_pConnection)));
xNewTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(sTempName));
{
Reference<XAppend> xAppend(pNewTable->getColumns(),UNO_QUERY);
Reference<XAppend> xAppend(xNewTable->getColumns(),UNO_QUERY);
bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers();
// copy the structure
for(sal_Int32 i=0;i < m_xColumns->getCount();++i)
......@@ -2419,24 +2417,23 @@ void ODbaseTable::dropColumn(sal_Int32 _nPos)
}
// construct the new table
if(!pNewTable->CreateImpl())
if(!xNewTable->CreateImpl())
{
xHold.clear();
const OUString sError( getConnection()->getResources().getResourceStringWithSubstitution(
STR_COLUMN_NOT_DROP,
"$position$", OUString::number(_nPos)
) );
::dbtools::throwGenericSQLException( sError, *this );
}
pNewTable->construct();
xNewTable->construct();
// copy the data
copyData(pNewTable,_nPos);
copyData(xNewTable.get(),_nPos);
// drop the old table
if(DropImpl())
pNewTable->renameImpl(m_Name);
xNewTable->renameImpl(m_Name);
// release the temp file
xHold.clear();
xNewTable.clear();
FileClose();
construct();
......
......@@ -135,7 +135,6 @@ void Connection::construct(const OUString& url, const Sequence< PropertyValue >&
// the database may be stored as an
// fdb file in older versions
bool bIsFdbStored = false;
OUString aStorageURL;
if (url == "sdbc:embedded:firebird")
{
m_bIsEmbedded = true;
......@@ -149,10 +148,6 @@ void Connection::construct(const OUString& url, const Sequence< PropertyValue >&
{
m_xEmbeddedStorage.set(pIter->Value,UNO_QUERY);
}
else if ( pIter->Name == "URL" )
{
pIter->Value >>= aStorageURL;
}
else if ( pIter->Name == "Document" )
{
pIter->Value >>= m_xParentDocument;
......
......@@ -195,8 +195,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName,
if (bDefaultChanged)
{
OUString sOldDefault, sNewDefault;
xColumn->getPropertyValue("DefaultValue") >>= sOldDefault;
OUString sNewDefault;
rDescriptor->getPropertyValue("DefaultValue") >>= sNewDefault;
OUString sSql;
......
......@@ -100,13 +100,10 @@ bool MorkParser::parse()
// Run over mork chars and parse each term
char cur = nextChar();
int i = 0;
while ( Result && cur )
{
if ( !isWhiteSpace( cur ) )
{
i++;
// Figure out what a term
switch ( cur )
{
......
......@@ -177,7 +177,7 @@ void SvxHyperlinkNewDocTp::FillDocumentList ()
{
uno::Sequence< beans::PropertyValue >& rDynamicMenuEntry = aDynamicMenuEntries[ i ];
OUString aDocumentUrl, aTitle, aImageId, aTargetName;
OUString aDocumentUrl, aTitle;
for ( int e = 0; e < rDynamicMenuEntry.getLength(); e++ )
{
......@@ -185,10 +185,6 @@ void SvxHyperlinkNewDocTp::FillDocumentList ()
rDynamicMenuEntry[ e ].Value >>= aDocumentUrl;
else if ( rDynamicMenuEntry[e].Name == DYNAMICMENU_PROPERTYNAME_TITLE )
rDynamicMenuEntry[e].Value >>= aTitle;
else if ( rDynamicMenuEntry[e].Name == DYNAMICMENU_PROPERTYNAME_IMAGEIDENTIFIER )
rDynamicMenuEntry[e].Value >>= aImageId;
else if ( rDynamicMenuEntry[e].Name == DYNAMICMENU_PROPERTYNAME_TARGETNAME )
rDynamicMenuEntry[e].Value >>= aTargetName;
}
//#i96822# business cards, labels and database should not be inserted here
if( aDocumentUrl == "private:factory/swriter?slot=21051" ||
......
......@@ -1840,16 +1840,13 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
if ( xNodeAccess.is() )
{
OUString sNodeId, sLabel, sPageURL, sGroupId;
OUString sNodeId, sLabel, sPageURL;
bool bAllModules = false;
sal_Int32 nGroupIndex = 0;
sNodeId = seqNames[i];
xNodeAccess->getByName( "Label" ) >>= sLabel;
xNodeAccess->getByName( "OptionsPage" ) >>= sPageURL;
xNodeAccess->getByName( "AllModules" ) >>= bAllModules;
xNodeAccess->getByName( "GroupId" ) >>= sGroupId;
xNodeAccess->getByName( "GroupIndex" ) >>= nGroupIndex;
if ( sLabel.isEmpty() )
sLabel = sGroupName;
......
......@@ -398,8 +398,6 @@ void ODBExport::exportDataSource()
// special handlings
if ( pProperties->Name == PROPERTY_BOOLEANCOMPARISONMODE )
{
sal_Int32 nValue = 0;
aValue >>= nValue;
if ( sValue == "0" )
sValue = "equal-integer";
else if ( sValue == "1" )
......
......@@ -159,7 +159,6 @@ static ErrCode ReadThroughComponent(
try
{
bool bEncrypted = false;
// open stream (and set parser input)
OUString sStreamName = OUString::createFromAscii(pStreamName);
if ( !xStorage->hasByName( sStreamName ) || !xStorage->isStreamElement( sStreamName ) )
......@@ -179,10 +178,6 @@ static ErrCode ReadThroughComponent(
// get input stream
xDocStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ );
uno::Reference< beans::XPropertySet > xProps( xDocStream, uno::UNO_QUERY_THROW );
uno::Any aAny = xProps->getPropertyValue("Encrypted");
aAny >>= bEncrypted;
}
catch (const packages::WrongPasswordException&)
{
......
......@@ -2963,8 +2963,6 @@ void SbaTableQueryBrowser::unloadAndCleanup( bool _bDisposeConnection )
{
// get the active connection. We need to dispose it.
Reference< XPropertySet > xRowSetProps(getRowSet(),UNO_QUERY);
Reference< XConnection > xConn;
xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION) >>= xConn;
#if OSL_DEBUG_LEVEL > 0
{
Reference< XComponent > xComp(
......
......@@ -121,8 +121,6 @@ bool ORowSetImportExport::Read()
{
Reference<XPropertySet> xProp(m_xResultSet,UNO_QUERY);
sal_Int32 nRowCount = 0;
sal_Int32 nCurrentRow = 0;
sal_Int32 nRowFilterIndex = 0;
if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_ISROWCOUNTFINAL) )
{
bool bFinal = false;
......@@ -141,8 +139,6 @@ bool ORowSetImportExport::Read()
while(m_xResultSet.is() && m_xResultSet->next() && bContinue && nRowCount )
{
--nRowCount;
++nCurrentRow;
++nRowFilterIndex;
bContinue = insertNewRow();
}
}
......
......@@ -815,7 +815,6 @@ void OHTMLImportExport::WriteTables()
// 2. and now the data
Reference< XRowSet > xRowSet(m_xRow,UNO_QUERY);
sal_Int32 j=1;
sal_Int32 kk=0;
m_xResultSet->beforeFirst(); // set back before the first row
while(m_xResultSet->next())
......@@ -846,7 +845,6 @@ void OHTMLImportExport::WriteTables()
}
WriteCell(pFormat[i-1],pColWidth[i-1],nHeight,pHorJustify[i-1],aValue,OOO_STRING_SVTOOLS_HTML_tabledata);
}
++j;
TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_tablerow );
}
}
......
......@@ -311,8 +311,6 @@ bool ORelationTableConnectionData::Update()
OSL_ENSURE(xKey.is(),"Key is not valid!");
if ( xKey.is() )
{
sal_Int32 nType = 0;
xKey->getPropertyValue(PROPERTY_TYPE) >>= nType;
OUString sReferencedTable;
xKey->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= sReferencedTable;
if ( sReferencedTable == getReferencedTable()->GetTableName() )
......
......@@ -354,8 +354,7 @@ void FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
swfdirpath = sPath + "/" + sPresentationName + ".sxi-swf-files";
oslFileError err;
err = osl_createDirectory( swfdirpath.pData );
osl_createDirectory( swfdirpath.pData );
fullpath = swfdirpath + "/backgroundconfig.txt";
......@@ -370,11 +369,10 @@ void FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
osl_openFile( fullpath.pData, &aBackgroundConfig, osl_File_OpenFlag_Create | osl_File_OpenFlag_Write );
sal_uInt64 bytesWritten;
err = osl_writeFile(aBackgroundConfig, "slides=", strlen("slides="), &bytesWritten);
osl_writeFile(aBackgroundConfig, "slides=", strlen("slides="), &bytesWritten);
}
// TODO: check for errors
(void) err;
FlashExporter aFlashExporter(
mxContext,
......
......@@ -681,7 +681,6 @@ void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities,
return;
rEntities.mbBeingDrawn = true;
sal_uLong nCount=0;
DXFTransform aET;
const DXFTransform * pT;
......@@ -744,7 +743,6 @@ void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities,
}
}
pE=pE->pSucc;
nCount++;
}
rEntities.mbBeingDrawn = false;
......
......@@ -170,7 +170,6 @@ OdfFlatXml::exporter(const Sequence< PropertyValue >& sourceData,
const Sequence< OUString >& /*msUserData*/)
{
OUString paramName;
OUString targetURL;
Reference<XOutputStream> outputStream;
// Read output stream and target URL from the parameters given in sourceData.
......@@ -180,8 +179,6 @@ OdfFlatXml::exporter(const Sequence< PropertyValue >& sourceData,
paramName = sourceData[paramIdx].Name;
if ( paramName == "OutputStream" )
sourceData[paramIdx].Value >>= outputStream;
else if ( paramName == "URL" )
sourceData[paramIdx].Value >>= targetURL;
}
if (!getDelegate().is())
......
......@@ -283,7 +283,7 @@ namespace XSLT
// is most important here since we need to supply it to
// the sax parser that drives the supplied document handler
sal_Int32 nLength = aSourceData.getLength();
OUString aName, aFileName, aURL;
OUString aName, aURL;
css::uno::Reference<XInputStream> xInputStream;
css::uno::Reference<XInteractionHandler> xInterActionHandler;
for (sal_Int32 i = 0; i < nLength; i++)
......@@ -292,8 +292,6 @@ namespace XSLT
Any value = aSourceData[i].Value;
if ( aName == "InputStream" )
value >>= xInputStream;
else if ( aName == "FileName" )
value >>= aFileName;
else if ( aName == "URL" )
value >>= aURL;
else if ( aName == "InteractionHandler" )
......@@ -430,18 +428,15 @@ namespace XSLT
// since that is where our xml-writer will push the data
// from its data-source interface
OUString aName, sURL;
bool bIndent = false;
OUString aDoctypePublic;
// css::uno::Reference<XOutputStream> rOutputStream;
sal_Int32 nLength = aSourceData.getLength();
for (sal_Int32 i = 0; i < nLength; i++)
{
aName = aSourceData[i].Name;
if ( aName == "Indent" )
aSourceData[i].Value >>= bIndent;
if ( aName == "DocType_Public" )
aSourceData[i].Value >>= aDoctypePublic;
if ( aName == "OutputStream" )
else if ( aName == "OutputStream" )
aSourceData[i].Value >>= m_rOutputStream;
else if ( aName == "URL" )
aSourceData[i].Value >>= sURL;
......
......@@ -2662,11 +2662,6 @@ IMPL_LINK_NOARG(LayoutManager, AsyncLayoutHdl, Timer *, void)
if( !m_xContainerWindow.is() )
return;
awt::Rectangle aDockingArea( m_aDockingArea );
::Size aStatusBarSize( implts_getStatusBarSize() );
// Subtract status bar height
aDockingArea.Height -= aStatusBarSize.Height();
aReadLock.clear();
implts_setDockingAreaWindowSizes();
......
......@@ -1415,7 +1415,6 @@ void MenuBarManager::FillMenu(
Sequence< PropertyValue > aProp;
OUString aCommandURL;
OUString aLabel;
OUString aHelpURL;
OUString aModuleIdentifier( rModuleIdentifier );
sal_uInt16 nType = 0;
Reference< XIndexAccess > xIndexContainer;
......@@ -1433,8 +1432,6 @@ void MenuBarManager::FillMenu(
OUString aPropName = aProp[i].Name;
if ( aPropName == "CommandURL" )
aProp[i].Value >>= aCommandURL;
else if ( aPropName == "HelpURL" )
aProp[i].Value >>= aHelpURL;
else if ( aPropName == "ItemDescriptorContainer" )
aProp[i].Value >>= xIndexContainer;
else if ( aPropName == "Label" )
......
......@@ -413,7 +413,6 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc
{
uno::Sequence< beans::PropertyValue > aProp;
OUString aCommandURL;
OUString aHelpURL;
sal_Int16 nOffset( 0 );
sal_Int16 nStyle( 0 );
sal_Int16 nWidth( 0 );
......@@ -429,10 +428,6 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc
{
aProp[i].Value >>= aCommandURL;
}
else if ( aProp[i].Name == "HelpURL" )
{
aProp[i].Value >>= aHelpURL;
}
else if ( aProp[i].Name == "Style" )
{
aProp[i].Value >>= nStyle;
......
......@@ -435,7 +435,6 @@ void ToolBarMerger::MergeItems(
{
const sal_Int32 nSize( rAddonToolbarItems.size() );
sal_uInt16 nIndex( 0 );
for ( sal_Int32 i = 0; i < nSize; i++ )
{
const AddonToolbarItem& rItem = rAddonToolbarItems[i];
......@@ -469,7 +468,6 @@ void ToolBarMerger::MergeItems(
ToolBarMerger::CreateToolbarItem( pToolbar, nInsPos, rItemId, rItem );
}
++nIndex;
++rItemId;
}
}
......
......@@ -182,8 +182,6 @@ ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand()
// XNameAccess
Any ConfigurationAccess_UICommand::getByNameImpl( const OUString& rCommandURL )
{
static sal_Int32 nRequests = 0;
osl::MutexGuard g(m_aMutex);
if ( !m_bConfigAccessInitialized )
{
......@@ -210,7 +208,6 @@ Any ConfigurationAccess_UICommand::getByNameImpl( const OUString& rCommandURL )
else
{
// SAFE
++nRequests;
return getInfoFromCommand( rCommandURL );
}
}
......
......@@ -34,7 +34,6 @@ int main(int argc, char *argv[])
multimap<string, size_t> entries;
multimap<string,size_t>::iterator ret(entries.begin());
int line(1);
cin.getline(inputBuffer, MAXLINE);
const string encoding(inputBuffer);
size_t currentOffset(encoding.size()+1);
......@@ -70,7 +69,6 @@ int main(int argc, char *argv[])
{
cin.getline(inputBuffer, MAXLINE);