Kaydet (Commit) 292560a9 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedmethods

Change-Id: Icf773925c37dde8b7404edac9864e7b10fe113b4
Reviewed-on: https://gerrit.libreoffice.org/29968Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e64ea988
......@@ -157,22 +157,9 @@ EntryDescriptor::EntryDescriptor (
OSL_ENSURE( m_aDocument.isValid(), "EntryDescriptor::EntryDescriptor: invalid document!" );
}
// TreeListBox
TreeListBox::TreeListBox (vcl::Window* pParent, ResId const& rRes)
: SvTreeListBox( pParent, IDEResId( sal::static_int_cast<sal_uInt16>( rRes.GetId() ) ) )
, m_aNotifier( *this )
{
Init();
}
TreeListBox::TreeListBox (vcl::Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle)
, m_aNotifier( *this )
{
Init();
}
void TreeListBox::Init()
{
SetNodeDefaultImages();
SetSelectionMode( SelectionMode::Single );
......
......@@ -174,7 +174,6 @@ class TreeListBox : public SvTreeListBox, public DocumentEventListener
private:
sal_uInt16 nMode;
DocumentEventNotifier m_aNotifier;
void Init();
void SetEntryBitmaps( SvTreeListEntry * pEntry, const Image& rImage );
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
......@@ -204,7 +203,6 @@ protected:
virtual void onDocumentModeChanged( const ScriptDocument& _rDocument ) override;
public:
TreeListBox(vcl::Window* pParent, const ResId& rRes);
TreeListBox(vcl::Window* pParent, WinBits nStyle);
virtual ~TreeListBox() override;
virtual void dispose() override;
......
......@@ -40,7 +40,6 @@
// #i37443#
#define ANGLE_BOUND_START_VALUE (2.25)
#define ANGLE_BOUND_MINIMUM_VALUE (0.1)
#define COUNT_SUBDIVIDE_DEFAULT (4)
#ifdef DBG_UTIL
static double fAngleBoundStartValue = ANGLE_BOUND_START_VALUE;
#endif
......@@ -322,71 +321,6 @@ namespace basegfx
}
}
B2DPolygon adaptiveSubdivideByCount(const B2DPolygon& rCandidate, sal_uInt32 nCount)
{
if(rCandidate.areControlPointsUsed())
{
const sal_uInt32 nPointCount(rCandidate.count());
B2DPolygon aRetval;
if(nPointCount)
{
// prepare edge-oriented loop
const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1);
B2DCubicBezier aBezier;
aBezier.setStartPoint(rCandidate.getB2DPoint(0));
// perf: try to avoid too many realloctions by guessing the result's pointcount
aRetval.reserve(nPointCount*4);
// add start point (always)
aRetval.append(aBezier.getStartPoint());
// #i37443# prepare convenient count if none was given
if(0 == nCount)
{
nCount = COUNT_SUBDIVIDE_DEFAULT;
}
for(sal_uInt32 a(0); a < nEdgeCount; a++)
{
// get next and control points
const sal_uInt32 nNextIndex((a + 1) % nPointCount);
aBezier.setEndPoint(rCandidate.getB2DPoint(nNextIndex));
aBezier.setControlPointA(rCandidate.getNextControlPoint(a));
aBezier.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex));
aBezier.testAndSolveTrivialBezier();
if(aBezier.isBezier())
{
// call adaptive subdivide
aBezier.adaptiveSubdivideByCount(aRetval, nCount);
}
else
{
// add non-curved edge
aRetval.append(aBezier.getEndPoint());
}
// prepare next step
aBezier.setStartPoint(aBezier.getEndPoint());
}
if(rCandidate.isClosed())
{
// set closed flag and correct last point (which is added double now).
closeWithGeometryChange(aRetval);
}
}
return aRetval;
}
else
{
return rCandidate;
}
}
bool isInside(const B2DPolygon& rCandidate, const B2DPoint& rPoint, bool bWithBorder)
{
const B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? rCandidate.getDefaultAdaptiveSubdivision() : rCandidate);
......
......@@ -1178,39 +1178,6 @@ namespace basegfx
}
}
void createLineTrapezoidFromB2DPolyPolygon(
B2DTrapezoidVector& ro_Result,
const B2DPolyPolygon& rPolyPolygon,
double fLineWidth)
{
if(fTools::lessOrEqual(fLineWidth, 0.0))
{
return;
}
// ensure there are no curves used
B2DPolyPolygon aSource(rPolyPolygon);
if(aSource.areControlPointsUsed())
{
aSource = aSource.getDefaultAdaptiveSubdivision();
}
const sal_uInt32 nCount(aSource.count());
if(!nCount)
{
return;
}
for(sal_uInt32 a(0); a < nCount; a++)
{
createLineTrapezoidFromB2DPolygon(
ro_Result,
aSource.getB2DPolygon(a),
fLineWidth);
}
}
} // end of namespace tools
} // end of namespace basegfx
......
......@@ -155,14 +155,6 @@ namespace connectivity
/** Statements owned by this connection. */
OWeakRefArray m_aStatements;
/**
* Firebird stores binary collations for indexes on Character based
* columns, these can be binary-incompatible between different icu
* version, hence we need to rebuild the indexes when switching icu
* versions.
*/
void rebuildIndexes()
throw (css::sdbc::SQLException, css::uno::RuntimeException, std::exception);
void buildTypeInfo()
throw (css::sdbc::SQLException);
......
......@@ -82,11 +82,6 @@ class ButtonBox
if(nPos != -1)
SelectButtonImpl(nPos);
}
void clear()
{
mnCurrentButton = NO_BUTTON_SELECTED;
maButtonList.clear();
};
};
enum class PageType
......@@ -146,14 +141,6 @@ public:
void SetNewColorList( XColorListRef const & pColorList )
{ mpNewColorList = pColorList; }
const XColorListRef& GetNewColorList() const { return mpNewColorList; }
const XGradientListRef& GetNewGradientList() const
{ return mpNewGradientList; }
const XHatchListRef& GetNewHatchingList() const
{ return mpNewHatchingList; }
const XBitmapListRef& GetNewBitmapList() const { return mpNewBitmapList; }
};
/************************************************************************/
......@@ -430,7 +417,6 @@ private:
DECL_LINK( ChangeAutoStepHdl_Impl, CheckBox&, void );
DECL_LINK( ModifiedSliderHdl_Impl, Slider*, void );
void ModifiedHdl_Impl(void*);
long CheckChanges_Impl();
void SetControlState_Impl( css::awt::GradientStyle eXGS );
sal_Int32 SearchGradientList(const OUString& rGradientName);
......@@ -605,7 +591,6 @@ public:
void Construct();
static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pBitmapRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
......@@ -661,7 +646,6 @@ private:
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
long CheckChanges_Impl();
sal_Int32 SearchPatternList(const OUString& rPatternName);
public:
......@@ -802,8 +786,6 @@ public:
void SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef );
void SetPos( sal_Int32* pInPos ) { pPos = pInPos; }
void SetColorList( const XColorListRef& pColList );
void SaveToViewFrame( SfxViewFrame *pViewFrame );
void SetupForViewFrame( SfxViewFrame *pViewFrame );
void SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
......
......@@ -760,46 +760,6 @@ void SvxColorTabPage::FillUserData()
}
void SvxColorTabPage::SetupForViewFrame( SfxViewFrame *pViewFrame )
{
const OfaRefItem<XColorList> *pPtr = nullptr;
if ( pViewFrame != nullptr && pViewFrame->GetDispatcher() )
pPtr = static_cast<const OfaRefItem<XColorList> *>(pViewFrame->
GetDispatcher()->Execute( SID_GET_COLORLIST,
SfxCallMode::SYNCHRON ));
pColorList = pPtr ? pPtr->GetValue() : XColorList::GetStdColorList();
//SetPos( &pShadow->nUnknownPos );
//SetColorChgd( &pShadow->nChangeType );
Construct();
}
void SvxColorTabPage::SaveToViewFrame( SfxViewFrame *pViewFrame )
{
if( !pColorList.is() )
return;
if( !pViewFrame )
return;
// notify current viewframe that it uses the same color table
if ( !pViewFrame->GetDispatcher() )
return;
const OfaRefItem<XColorList> * pPtr;
pPtr = static_cast<const OfaRefItem<XColorList>*>(pViewFrame->GetDispatcher()->Execute( SID_GET_COLORLIST, SfxCallMode::SYNCHRON ));
if( pPtr )
{
XColorListRef pReference = pPtr->GetValue();
if( pReference.is() &&
pReference->GetPath() == pColorList->GetPath() &&
pReference->GetName() == pColorList->GetName() )
SfxObjectShell::Current()->PutItem( SvxColorListItem( pColorList,
SID_COLOR_TABLE ) );
}
}
void SvxColorTabPage::SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef )
{
(void) t;
......
......@@ -252,68 +252,6 @@ DeactivateRC SvxGradientTabPage::DeactivatePage( SfxItemSet* _pSet )
return DeactivateRC::LeavePage;
}
long SvxGradientTabPage::CheckChanges_Impl()
{
// is used here in order to NOT lose changes
XGradient aTmpGradient( m_pLbColorFrom->GetSelectEntryColor(),
m_pLbColorTo->GetSelectEntryColor(),
(css::awt::GradientStyle) m_pLbGradientType->GetSelectEntryPos(),
static_cast<long>(m_pMtrAngle->GetValue() * 10), // should be changed in resource
(sal_uInt16) m_pMtrCenterX->GetValue(),
(sal_uInt16) m_pMtrCenterY->GetValue(),
(sal_uInt16) m_pMtrBorder->GetValue(),
(sal_uInt16) m_pMtrColorFrom->GetValue(),
(sal_uInt16) m_pMtrColorTo->GetValue() );
size_t nPos = m_pGradientLB->GetSelectItemPos();
if( nPos != VALUESET_ITEM_NOTFOUND )
{
XGradient aGradient = m_pGradientList->GetGradient( static_cast<sal_uInt16>(nPos) )->GetGradient();
if( !( aTmpGradient == aGradient ) )
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
SVX_RESSTR( RID_SVXSTR_GRADIENT ),
CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ),
&aWarningBoxImage );
assert(aMessDlg && "Dialog creation failed!");
aMessDlg->SetButtonText( SvxMessDialogButton::N1,
OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) ) );
aMessDlg->SetButtonText( SvxMessDialogButton::N2,
OUString( ResId( RID_SVXSTR_ADD, rMgr ) ) );
short nRet = aMessDlg->Execute();
switch( nRet )
{
case RET_BTN_1:
{
ClickModifyHdl_Impl( nullptr );
}
break;
case RET_BTN_2:
{
ClickAddHdl_Impl( nullptr );
}
break;
case RET_CANCEL:
break;
}
}
}
nPos = m_pGradientLB->GetSelectItemPos();
if( nPos != VALUESET_ITEM_NOTFOUND )
{
*m_pPos = static_cast<sal_Int32>(nPos);
}
return 0L;
}
bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
{
std::unique_ptr<XGradient> pXGradient;
......
......@@ -427,11 +427,6 @@ void SvxNumberFormat::SetGraphic( const OUString& rName )
aGraphicSize.Width() = aGraphicSize.Height() = 0;
}
void SvxNumberFormat::SetVertOrient(sal_Int16 eSet)
{
eVertOrient = eSet;
}
sal_Int16 SvxNumberFormat::GetVertOrient() const
{
return eVertOrient;
......
......@@ -55,7 +55,6 @@ $(eval $(call gb_Library_add_exception_objects,fwi,\
framework/source/fwi/classes/converter \
framework/source/fwi/classes/protocolhandlercache \
framework/source/fwi/helper/mischelper \
framework/source/fwi/helper/networkdomain \
framework/source/fwi/helper/shareablemutex \
framework/source/fwi/jobs/configaccess \
framework/source/fwi/jobs/jobconst \
......
/* -*- 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_FRAMEWORK_INC_HELPER_NETWORKDOMAIN_HXX
#define INCLUDED_FRAMEWORK_INC_HELPER_NETWORKDOMAIN_HXX
#include <rtl/ustring.hxx>
#include <fwidllapi.h>
namespace framework
{
class FWI_DLLPUBLIC NetworkDomain
{
public:
static OUString GetNTDomainName();
static OUString GetYPDomainName();
};
}
#endif // INCLUDED_FRAMEWORK_INC_HELPER_NETWORKDOMAIN_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 .
*/
#include <helper/networkdomain.hxx>
#ifdef _WIN32
// Windows
#define UNICODE
#if defined _MSC_VER
#pragma warning(push, 1)
#endif
#include <windows.h>
#if defined _MSC_VER
#pragma warning(pop)
#endif
static DWORD WINAPI GetUserDomainW_NT( LPWSTR lpBuffer, DWORD nSize )
{
return GetEnvironmentVariable( TEXT("USERDOMAIN"), lpBuffer, nSize );
}
static OUString GetUserDomain()
{
sal_Unicode aBuffer[256];
DWORD nResult;
nResult = GetUserDomainW_NT( reinterpret_cast<LPWSTR>(aBuffer), sizeof( aBuffer ) );
if ( nResult > 0 )
return OUString( aBuffer );
else
return OUString();
}
// Windows
namespace framework
{
OUString NetworkDomain::GetYPDomainName()
{
return OUString();
}
OUString NetworkDomain::GetNTDomainName()
{
return GetUserDomain();
}
}
#elif defined( UNIX )
#include <rtl/ustring.h>
#include <stdlib.h>
#include <errno.h>
#include <osl/thread.h>
// Unix
#if defined( SOLARIS )
// Solaris
#include <sys/systeminfo.h>
#include <sal/alloca.h>
static rtl_uString *getDomainName()
{
/* Initialize and assume failure */
rtl_uString *ustrDomainName = NULL;
char szBuffer[256];
long nCopied = sizeof(szBuffer);
char *pBuffer = szBuffer;
long nBufSize;
do
{
nBufSize = nCopied;
nCopied = sysinfo( SI_SRPC_DOMAIN, pBuffer, nBufSize );
/* If nCopied is greater than buffersize we need to allocate
a buffer with suitable size */
if ( nCopied > nBufSize )
pBuffer = (char *)alloca( nCopied );
} while ( nCopied > nBufSize );
if ( -1 != nCopied )
{
rtl_string2UString(
&ustrDomainName,
pBuffer,
nCopied - 1,
osl_getThreadTextEncoding(),
OSTRING_TO_OUSTRING_CVTFLAGS );
}
return ustrDomainName;
}
#elif defined( LINUX ) /* endif SOLARIS */
// Linux
#include <unistd.h>
#include <string.h>
static rtl_uString *getDomainName()
{
/* Initialize and assume failure */
rtl_uString *ustrDomainName = nullptr;
char buffer[256]; // actually the man page says 65 bytes should be enough
/* If buffersize is not large enough the name is truncated. */
int const result = getdomainname( &buffer[0], SAL_N_ELEMENTS(buffer) );
if ( 0 == result )
{
rtl_string2UString(
&ustrDomainName,
&buffer[0],
strlen( &buffer[0] ),
osl_getThreadTextEncoding(),
OSTRING_TO_OUSTRING_CVTFLAGS );
}
return ustrDomainName;
}
#else /* LINUX */
// Other Unix
static rtl_uString *getDomainName()
{
return nullptr;
}
#endif
// Unix
namespace framework
{
OUString NetworkDomain::GetYPDomainName()
{
rtl_uString* pResult = getDomainName();
if ( pResult )
return OUString( pResult );
else
return OUString();
}
OUString NetworkDomain::GetNTDomainName()
{
return OUString();
}
}
#else /* UNIX */
// Other operating systems (non-Windows and non-Unix)
namespace framework
{
OUString NetworkDomain::GetYPDomainName()
{
return OUString();
}
OUString NetworkDomain::GetNTDomainName()
{
return OUString();
}
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -137,9 +137,6 @@ namespace basegfx
// Subdivide all contained curves. Use angleBound value if given.
BASEGFX_DLLPUBLIC B2DPolygon adaptiveSubdivideByAngle(const B2DPolygon& rCandidate, double fAngleBound = 0.0);
// #i37443# Subdivide all contained curves.
BASEGFX_DLLPUBLIC B2DPolygon adaptiveSubdivideByCount(const B2DPolygon& rCandidate, sal_uInt32 nCount);
// This version works with two points and vectors to define the
// edges for the cut test.
BASEGFX_DLLPUBLIC CutFlagValue findCut(
......
......@@ -104,14 +104,6 @@ namespace basegfx
const B2DPolygon& rPolygon,
double fLineWidth);
// create trapezoids for all edges of the given polyPolygon. The closed state of
// the tools::PolyPolygon is taken into account. If curves are contaned, the default
// AdaptiveSubdivision will be used.
BASEGFX_DLLPUBLIC void createLineTrapezoidFromB2DPolyPolygon(
B2DTrapezoidVector& ro_Result,
const B2DPolyPolygon& rPolyPolygon,
double fLineWidth);
} // end of namespace tools
} // end of namespace basegfx
......
......@@ -181,7 +181,6 @@ public:
virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = nullptr, const sal_Int16* pOrient = nullptr);
const SvxBrushItem* GetBrush() const {return pGraphicBrush;}
void SetGraphic( const OUString& rName );
virtual void SetVertOrient(sal_Int16 eSet);
virtual sal_Int16 GetVertOrient() const;
void SetGraphicSize(const Size& rSet) {aGraphicSize = rSet;}
const Size& GetGraphicSize() const {return aGraphicSize;}
......
......@@ -91,8 +91,6 @@ protected:
sal_uInt16 GetId() const { return m_nId; }
const css::uno::Reference< css::frame::XFrame >& GetFrame() const { return m_xFrame; }
void BindListener();
void UnbindListener();
void AddStatusListener( const OUString& rCommandURL );
virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent );
......
......@@ -110,8 +110,6 @@ public:
int getSelectedEntryId() const;
int getHighlightedEntryId() const;
void highlightFirstEntry();
protected:
virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
......
......@@ -241,8 +241,6 @@ private:
friend class ValueItemAcc;
using Control::ImplInitSettings;
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit();
SVT_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
......@@ -281,7 +279,6 @@ protected:
public:
ValueSet( vcl::Window* pParent, WinBits nWinStyle );
ValueSet( vcl::Window* pParent, const ResId& rResId );
virtual ~ValueSet() override;
virtual void dispose() override;
......@@ -353,7 +350,6 @@ public: