summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oox/source/core/filterdetect.cxx3
-rw-r--r--oox/source/core/xmlfilterbase.cxx6
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx4
-rw-r--r--oox/source/export/chartexport.cxx3
-rw-r--r--oox/source/export/drawingml.cxx3
-rw-r--r--oox/source/helper/binaryoutputstream.cxx3
-rw-r--r--oox/source/vml/vmlshape.cxx3
-rw-r--r--package/source/xstor/ocompinstream.cxx4
-rw-r--r--package/source/xstor/ohierarchyholder.cxx8
-rw-r--r--package/source/xstor/owriteablestream.cxx8
-rw-r--r--package/source/xstor/xstorage.cxx4
-rw-r--r--pyuno/source/module/pyuno.cxx4
-rw-r--r--pyuno/source/module/pyuno_gc.cxx3
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx3
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx3
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx3
16 files changed, 19 insertions, 46 deletions
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
index b68f05160a62..59a4f605ab5c 100644
--- a/oox/source/core/filterdetect.cxx
+++ b/oox/source/core/filterdetect.cxx
@@ -316,8 +316,7 @@ Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescript
(according to the verifier), or with an empty string if
user has cancelled the password input dialog. */
PasswordVerifier aVerifier( aDecryptor );
- Sequence<NamedValue> aEncryptionData;
- aEncryptionData = rMediaDescriptor.requestAndVerifyDocPassword(
+ Sequence<NamedValue> aEncryptionData = rMediaDescriptor.requestAndVerifyDocPassword(
aVerifier,
comphelper::DocPasswordRequestType::MS,
&aDefaultPasswords );
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 8050c91b0d8e..632a3ce357b6 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -870,8 +870,7 @@ Reference< XInputStream > XmlFilterBase::implGetInputStream( MediaDescriptor& rM
Reference<XStream> XmlFilterBase::implGetOutputStream( MediaDescriptor& rMediaDescriptor ) const
{
- Sequence< NamedValue > aMediaEncData;
- aMediaEncData = rMediaDescriptor.getUnpackedValueOrDefault(
+ Sequence< NamedValue > aMediaEncData = rMediaDescriptor.getUnpackedValueOrDefault(
MediaDescriptor::PROP_ENCRYPTIONDATA(),
Sequence< NamedValue >() );
@@ -902,8 +901,7 @@ bool XmlFilterBase::implFinalizeExport( MediaDescriptor& rMediaDescriptor )
{
bool bRet = true;
- Sequence< NamedValue > aMediaEncData;
- aMediaEncData = rMediaDescriptor.getUnpackedValueOrDefault(
+ Sequence< NamedValue > aMediaEncData = rMediaDescriptor.getUnpackedValueOrDefault(
MediaDescriptor::PROP_ENCRYPTIONDATA(),
Sequence< NamedValue >() );
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 7d64e82059af..7686ddf2413c 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -362,9 +362,7 @@ sal_Int32 ConditionAtom::getNodeCount() const
const dgm::Point* pPoint = getPresNode();
if (pPoint)
{
- OUString sNodeId = "";
-
- sNodeId
+ OUString sNodeId
= navigate(mrLayoutNode, XML_presOf, pPoint->msModelId, /*bSourceToDestination*/ false);
if (sNodeId.isEmpty())
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 5641d62119a1..15e9bca1c1c9 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2303,8 +2303,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen
pFS->writeEscaped( aCellRange );
pFS->endElement( FSNS( XML_c, XML_f ) );
- ::std::vector< double > aValues;
- aValues = lcl_getAllValuesFromSequence( xValueSeq );
+ ::std::vector< double > aValues = lcl_getAllValuesFromSequence( xValueSeq );
sal_Int32 ptCount = aValues.size();
pFS->startElement( FSNS( XML_c, XML_numCache ),
FSEND );
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 1cebeaa84ec1..e259aa856906 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1316,8 +1316,7 @@ void DrawingML::WriteBlipFill( const Reference< XPropertySet >& rXPropSet, const
uno::Reference<graphic::XGraphic> xGraphic;
if (mAny.has<uno::Reference<awt::XBitmap>>())
{
- uno::Reference<awt::XBitmap> xBitmap;
- xBitmap = mAny.get<uno::Reference<awt::XBitmap>>();
+ uno::Reference<awt::XBitmap> xBitmap = mAny.get<uno::Reference<awt::XBitmap>>();
if (xBitmap.is())
xGraphic.set(xBitmap, uno::UNO_QUERY);
}
diff --git a/oox/source/helper/binaryoutputstream.cxx b/oox/source/helper/binaryoutputstream.cxx
index 43cf86277c1e..ccfd6e4ed9f2 100644
--- a/oox/source/helper/binaryoutputstream.cxx
+++ b/oox/source/helper/binaryoutputstream.cxx
@@ -109,8 +109,7 @@ BinaryOutputStream::writeCharArrayUC( const OUString& rString, rtl_TextEncoding
void
BinaryOutputStream::writeUnicodeArray( const OUString& rString )
{
- OUString sBuf( rString );
- sBuf = sBuf.replace( '\0', '?' );
+ OUString sBuf = rString.replace( '\0', '?' );
#ifdef OSL_BIGENDIAN
// need a non-const buffer for swapping byte order
sal_Unicode notConst[sBuf.getLength()];
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 951c164b0b94..bc4e77818e18 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -678,8 +678,7 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
SdrObject* pShape = GetSdrObjectFromXShape( xShape );
if( pShape && getShapeType() >= 0 )
{
- OUString aShapeType;
- aShapeType = EnhancedCustomShapeTypeNames::Get( static_cast< MSO_SPT >(getShapeType()) );
+ OUString aShapeType = EnhancedCustomShapeTypeNames::Get( static_cast< MSO_SPT >(getShapeType()) );
//The resize autoshape to fit text attr of FontWork/Word-Art should always be false
//for the fallback geometry.
if(aShapeType.startsWith("fontwork"))
diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx
index 98592e61c590..52565b7933cf 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -74,10 +74,8 @@ OInputCompStream::~OInputCompStream()
uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType )
{
- uno::Any aReturn;
-
// common interfaces
- aReturn = ::cppu::queryInterface
+ uno::Any aReturn = ::cppu::queryInterface
( rType
, static_cast<io::XInputStream*> ( this )
, static_cast<io::XStream*> ( this )
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx
index 20c613b8b8d2..76d8842fb497 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -92,9 +92,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea
uno::Reference< embed::XExtendedStorageStream > xResult;
- uno::Reference< embed::XStorage > xOwnStor;
-
- xOwnStor = m_xOwnStorage.is() ? m_xOwnStorage
+ uno::Reference< embed::XStorage > xOwnStor = m_xOwnStorage.is() ? m_xOwnStorage
: uno::Reference< embed::XStorage >( m_xWeakOwnStorage.get(), uno::UNO_QUERY_THROW );
if ( aListPath.empty() )
@@ -171,9 +169,7 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( std::vector<OUString>&
OUString aNextName = *(aListPath.begin());
aListPath.erase( aListPath.begin() );
- uno::Reference< embed::XStorage > xOwnStor;
-
- xOwnStor = m_xOwnStorage.is() ? m_xOwnStorage
+ uno::Reference< embed::XStorage > xOwnStor = m_xOwnStorage.is() ? m_xOwnStorage
: uno::Reference< embed::XStorage >( m_xWeakOwnStorage.get(), uno::UNO_QUERY_THROW );
if ( aListPath.empty() )
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index ee06fc0c398c..213c53efaf49 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -1267,9 +1267,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre
throw io::IOException();
}
- uno::Reference< io::XInputStream > xInStream;
-
- xInStream = GetTempFileAsInputStream(); //TODO:
+ uno::Reference< io::XInputStream > xInStream = GetTempFileAsInputStream(); //TODO:
if ( !xInStream.is() )
throw io::IOException();
@@ -1800,10 +1798,8 @@ void OWriteStream::ModifyParentUnlockMutex_Impl(osl::ClearableMutexGuard& aGuard
uno::Any SAL_CALL OWriteStream::queryInterface( const uno::Type& rType )
{
- uno::Any aReturn;
-
// common interfaces
- aReturn = ::cppu::queryInterface
+ uno::Any aReturn = ::cppu::queryInterface
( rType
, static_cast<lang::XTypeProvider*> ( this )
, static_cast<io::XInputStream*> ( this )
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 28e20c43703a..c3033decefd6 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -2046,10 +2046,8 @@ void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XCompone
uno::Any SAL_CALL OStorage::queryInterface( const uno::Type& rType )
{
- uno::Any aReturn;
-
// common interfaces
- aReturn = ::cppu::queryInterface
+ uno::Any aReturn = ::cppu::queryInterface
( rType
, static_cast<lang::XTypeProvider*> ( this )
, static_cast<embed::XStorage*> ( this )
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index a581d8335d76..bb176de4bfb5 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -573,9 +573,7 @@ static void lcl_getRowsColumns( PyUNO const * me, sal_Int32& nRows, sal_Int32& n
Sequence<short> aOutParamIndex;
Sequence<Any> aOutParam;
Sequence<Any> aParams;
- Any aRet;
-
- aRet = me->members->xInvocation->invoke ( "getRows", aParams, aOutParamIndex, aOutParam );
+ Any aRet = me->members->xInvocation->invoke ( "getRows", aParams, aOutParamIndex, aOutParam );
Reference< XIndexAccess > xIndexAccessRows( aRet, UNO_QUERY );
nRows = xIndexAccessRows->getCount();
aRet = me->members->xInvocation->invoke ( "getColumns", aParams, aOutParamIndex, aOutParam );
diff --git a/pyuno/source/module/pyuno_gc.cxx b/pyuno/source/module/pyuno_gc.cxx
index 170e32ef7619..1be9cd4ed69b 100644
--- a/pyuno/source/module/pyuno_gc.cxx
+++ b/pyuno/source/module/pyuno_gc.cxx
@@ -86,8 +86,7 @@ void GCThread::execute()
}
catch( const css::uno::RuntimeException & e )
{
- OString msg;
- msg = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
+ OString msg = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
fprintf( stderr, "Leaking python objects bridged to UNO for reason %s\n",msg.getStr());
}
}
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 53c7acb709b8..10f3ce953aac 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -512,8 +512,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
{
for ( i = 0; i < s.getLength (); i++)
{
- PyRef element;
- element = any2PyObject (tc->convertTo (s[i], s[i].getValueType() ));
+ PyRef element = any2PyObject (tc->convertTo (s[i], s[i].getValueType() ));
OSL_ASSERT( element.is() );
PyTuple_SetItem( tuple.get(), i, element.getAcquired() );
}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index b78f70d7681c..d4c823561aa4 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1647,8 +1647,7 @@ void OReportController::impl_initialize( )
m_xFormatter->attachNumberFormatsSupplier(Reference< XNumberFormatsSupplier>(m_xReportDefinition,uno::UNO_QUERY));
utl::MediaDescriptor aDescriptor( m_xReportDefinition->getArgs() );
- OUString sHierarchicalDocumentName;
- sHierarchicalDocumentName = aDescriptor.getUnpackedValueOrDefault("HierarchicalDocumentName",sHierarchicalDocumentName);
+ OUString sHierarchicalDocumentName = aDescriptor.getUnpackedValueOrDefault("HierarchicalDocumentName",OUString());
if ( sHierarchicalDocumentName.isEmpty() && getConnection().is() )
{
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 9e49938e5484..43814411a25f 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -690,8 +690,7 @@ sal_Int8 OReportSection::AcceptDrop( const AcceptDropEvent& _rEvt )
)
{
if (!m_pParent) return DND_ACTION_NONE;
- sal_uInt16 nCurrentPosition = 0;
- nCurrentPosition = m_pParent->getViewsWindow()->getPosition(m_pParent);
+ sal_uInt16 nCurrentPosition = m_pParent->getViewsWindow()->getPosition(m_pParent);
if (_rEvt.mnAction == DND_ACTION_COPY )
{
// we must assure, we can't drop in the top section