Kaydet (Commit) b3ff2f45 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:unusedmethods in slideshow to svtools

Change-Id: Icf0056e13c88d7d347e668adaeddd4ed72af85cf
Reviewed-on: https://gerrit.libreoffice.org/25141Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst d4d2fc24
......@@ -88,8 +88,6 @@ protected:
/// Info on a per-view basis
struct ViewEntry
{
ViewEntry() {}
explicit ViewEntry( const UnoViewSharedPtr& rView ) :
mpView( rView )
{
......
......@@ -43,19 +43,6 @@ struct EmptyBase
class MutexBase
{
public:
struct Guard : public osl::MutexGuard
{
explicit Guard(MutexBase const& rBase) :
osl::MutexGuard(rBase.maMutex)
{}
};
struct ClearableGuard : public osl::ClearableMutexGuard
{
explicit ClearableGuard(MutexBase const& rBase) :
osl::ClearableMutexGuard(rBase.maMutex)
{}
};
mutable osl::Mutex maMutex;
};
......
......@@ -84,8 +84,6 @@ public:
Font(rFont), nBorderWidth(-1) { Impl_Init(); }
SmFace(const OUString& rName, const Size& rSize) :
Font(rName, rSize), nBorderWidth(-1) { Impl_Init(); }
SmFace( FontFamily eFamily, const Size& rSize) :
Font(eFamily, rSize), nBorderWidth(-1) { Impl_Init(); }
SmFace(const SmFace &rFace) :
Font(rFace), nBorderWidth(-1) { Impl_Init(); }
......@@ -124,7 +122,6 @@ public:
virtual ~SmFontPickList() { Clear(); }
virtual void Insert(const vcl::Font &rFont);
void Update(const vcl::Font &rFont, const vcl::Font &rNewFont);
void Remove(const vcl::Font &rFont);
void Clear();
......@@ -152,7 +149,6 @@ public:
virtual void Insert(const vcl::Font &rFont) override;
using Window::Update;
using SmFontPickList::Update;
};
#endif
......
......@@ -104,16 +104,6 @@ void SmFontPickList::Insert(const vcl::Font &rFont)
}
}
void SmFontPickList::Update(const vcl::Font &rFont, const vcl::Font &rNewFont)
{
for (vcl::Font & rPos : aFontVec)
if (CompareItem( rPos, rFont ))
{
rPos = rNewFont;
break;
}
}
void SmFontPickList::Remove(const vcl::Font &rFont)
{
for (size_t nPos = 0; nPos < aFontVec.size(); nPos++)
......
......@@ -58,11 +58,6 @@ public:
/** Default Ctor. Does not cache.
*/
inline lru_cache();
/** Ctor.
@param size number of elements to be cached; default param set to 128
*/
explicit inline lru_cache( ::std::size_t size );
/** Destructor: releases all cached elements and keys.
*/
......@@ -111,16 +106,6 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::setSize(
}
}
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
inline lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lru_cache(
::std::size_t size )
: m_size( 0 )
, m_block( nullptr )
, m_tail( nullptr )
{
setSize( size );
}
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
inline lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lru_cache()
: m_size( 0 )
......
......@@ -79,14 +79,6 @@ public:
{
}
NamePassRecord( const OUString& aName, const ::std::vector< OUString >& aMemoryList )
: m_aName( aName )
, m_bHasMemPass( true )
, m_aMemPass( aMemoryList )
, m_bHasPersPass( false )
{
}
NamePassRecord( const OUString& aName, const OUString& aPersistentList )
: m_aName( aName )
, m_bHasMemPass( false )
......@@ -95,16 +87,6 @@ public:
{
}
NamePassRecord( const OUString& aName,
bool bHasMemoryList, const ::std::vector< OUString >& aMemoryList,
bool bHasPersistentList, const OUString & aPersistentList )
: m_aName( aName )
, m_bHasMemPass( bHasMemoryList )
, m_bHasPersPass( bHasPersistentList )
{
InitArrays( bHasMemoryList, aMemoryList, bHasPersistentList, aPersistentList );
}
NamePassRecord( const NamePassRecord& aRecord )
: m_aName( aRecord.m_aName )
, m_bHasMemPass( false )
......@@ -394,16 +376,6 @@ public:
};
class RW_SvMemoryStream : public SvMemoryStream {
public:
RW_SvMemoryStream( void* Buf, sal_uLong Size, StreamMode eMode ):
SvMemoryStream( Buf, Size, eMode){}
RW_SvMemoryStream( sal_uLong InitSize=512, sal_uLong Resize=64 ):
SvMemoryStream( InitSize, Resize ){}
};
#endif // INCLUDED_SVL_SOURCE_INC_PASSWORDCONTAINER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SVL_STRMADPT_HXX
#define INCLUDED_SVL_STRMADPT_HXX
#include <sal/config.h>
#include <com/sun/star/io/XOutputStream.hpp>
class SvOutputStreamOpenLockBytes: public SvOpenLockBytes
{
css::uno::Reference< css::io::XOutputStream > m_xOutputStream;
sal_uInt64 m_nPosition;
public:
SvOutputStreamOpenLockBytes(
const css::uno::Reference< css::io::XOutputStream > & rTheOutputStream):
m_xOutputStream(rTheOutputStream), m_nPosition(0) {}
virtual ErrCode ReadAt(sal_uInt64, void *, sal_uLong, sal_Size *) const override;
virtual ErrCode WriteAt(sal_uInt64 nPos, const void * pBuffer, sal_uLong nCount,
sal_Size * pWritten) override;
virtual ErrCode Flush() const override;
virtual ErrCode SetSize(sal_uInt64) override;
virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const override;
virtual ErrCode FillAppend(const void * pBuffer, sal_uLong nCount,
sal_uLong * pWritten) override;
};
#endif // INCLUDED_SVL_STRMADPT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -26,6 +26,7 @@
#include <string.h>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <osl/diagnose.h>
......@@ -34,8 +35,6 @@
#include <svl/instrm.hxx>
#include <svl/outstrm.hxx>
#include <strmadpt.hxx>
using namespace com::sun::star;
class SvDataPipe_Impl
......@@ -126,89 +125,10 @@ inline bool SvDataPipe_Impl::isEOF() const
&& (!m_pReadPage || m_pReadPage->m_pRead == m_pReadPage->m_pEnd);
}
// SvOutputStreamOpenLockBytes
// virtual
ErrCode SvOutputStreamOpenLockBytes::ReadAt(sal_uInt64, void *, sal_uLong, sal_uLong*)
const
{
return ERRCODE_IO_CANTREAD;
}
// virtual
ErrCode SvOutputStreamOpenLockBytes::WriteAt(sal_uInt64 const nPos, void const * pBuffer,
sal_uLong nCount, sal_uLong * pWritten)
{
if (nPos != m_nPosition)
return ERRCODE_IO_CANTWRITE;
return FillAppend(pBuffer, nCount, pWritten);
}
// virtual
ErrCode SvOutputStreamOpenLockBytes::Flush() const
{
if (!m_xOutputStream.is())
return ERRCODE_IO_CANTWRITE;
try
{
m_xOutputStream->flush();
}
catch (const io::IOException&)
{
return ERRCODE_IO_CANTWRITE;
}
return ERRCODE_NONE;
}
// virtual
ErrCode SvOutputStreamOpenLockBytes::SetSize(sal_uInt64)
{
return ERRCODE_IO_NOTSUPPORTED;
}
// virtual
ErrCode SvOutputStreamOpenLockBytes::Stat(SvLockBytesStat * pStat,
SvLockBytesStatFlag) const
{
if (pStat)
pStat->nSize = m_nPosition;
return ERRCODE_NONE;
}
// virtual
ErrCode SvOutputStreamOpenLockBytes::FillAppend(void const * pBuffer,
sal_uLong nCount,
sal_uLong * pWritten)
{
if (!m_xOutputStream.is())
return ERRCODE_IO_CANTWRITE;
if (nCount > 0
&& nCount > std::numeric_limits< sal_uLong >::max() - m_nPosition)
{
nCount = std::numeric_limits< sal_uLong >::max() - m_nPosition;
if (nCount == 0)
return ERRCODE_IO_CANTWRITE;
}
try
{
m_xOutputStream->
writeBytes(uno::Sequence< sal_Int8 >(
static_cast< sal_Int8 const * >(pBuffer), nCount));
}
catch (const io::IOException&)
{
return ERRCODE_IO_CANTWRITE;
}
m_nPosition += nCount;
if (pWritten)
*pWritten = nCount;
return ERRCODE_NONE;
}
// SvInputStream
bool SvInputStream::open()
{
if (GetError() != ERRCODE_NONE)
......
......@@ -159,9 +159,6 @@ public:
throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw(css::uno::RuntimeException, std::exception) override;
private:
SvNumberFormatsObj(); // never implemented
};
......
......@@ -30,8 +30,6 @@
#include <tools/stream.hxx>
#include <svl/instrm.hxx>
#include <strmadpt.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::io;
......
......@@ -95,13 +95,6 @@ namespace svt { namespace table
RowPos nRow;
TableCellArea eArea;
TableCell()
:nColumn( COL_INVALID )
,nRow( ROW_INVALID )
,eArea( CellContent )
{
}
TableCell( ColPos const i_column, RowPos const i_row )
:nColumn( i_column )
,nRow( i_row )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment