Kaydet (Commit) 646a6307 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Caolán McNamara

loplugin:unusedmethods

Change-Id: I66ef078794ed1eb44dbfa854c589545e5f9ba78e
Reviewed-on: https://gerrit.libreoffice.org/62407
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 97ed3b93
......@@ -39,15 +39,6 @@ namespace chart
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
LegendPositionResources::LegendPositionResources(weld::Builder& rBuilder)
: m_xRbtLeft(rBuilder.weld_radio_button("left"))
, m_xRbtRight(rBuilder.weld_radio_button("right"))
, m_xRbtTop(rBuilder.weld_radio_button("top"))
, m_xRbtBottom(rBuilder.weld_radio_button("bottom"))
{
impl_setRadioButtonToggleHdl();
}
LegendPositionResources::LegendPositionResources(weld::Builder& rBuilder,
const uno::Reference< uno::XComponentContext >& xCC)
: m_xCC(xCC)
......@@ -174,54 +165,6 @@ IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl, weld::ToggleButton&,
m_aChangeLink.Call(nullptr);
}
void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs )
{
const SfxPoolItem* pPoolItem = nullptr;
if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET )
{
chart2::LegendPosition nLegendPosition = static_cast<chart2::LegendPosition>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
switch( nLegendPosition )
{
case chart2::LegendPosition_LINE_START:
m_xRbtLeft->set_active(true);
break;
case chart2::LegendPosition_PAGE_START:
m_xRbtTop->set_active(true);
break;
case chart2::LegendPosition_LINE_END:
m_xRbtRight->set_active(true);
break;
case chart2::LegendPosition_PAGE_END:
m_xRbtBottom->set_active(true);
break;
default:
break;
}
}
if( m_xCbxShow && rInAttrs.GetItemState( SCHATTR_LEGEND_SHOW, true, &pPoolItem ) == SfxItemState::SET )
{
bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
m_xCbxShow->set_active(bShow);
}
}
void LegendPositionResources::writeToItemSet( SfxItemSet& rOutAttrs ) const
{
chart2::LegendPosition nLegendPosition = chart2::LegendPosition_CUSTOM;
if( m_xRbtLeft->get_active() )
nLegendPosition = chart2::LegendPosition_LINE_START;
else if( m_xRbtTop->get_active() )
nLegendPosition = chart2::LegendPosition_PAGE_START;
else if( m_xRbtRight->get_active() )
nLegendPosition = chart2::LegendPosition_LINE_END;
else if( m_xRbtBottom->get_active() )
nLegendPosition = chart2::LegendPosition_PAGE_END;
rOutAttrs.Put( SfxInt32Item(SCHATTR_LEGEND_POS, static_cast<sal_Int32>(nLegendPosition) ) );
rOutAttrs.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, !m_xCbxShow || m_xCbxShow->get_active()) );
}
IMPL_LINK (LegendPositionResources, PositionChangeHdl, weld::ToggleButton&, rRadio, void)
{
//for each radio click there are coming two change events
......
......@@ -32,8 +32,6 @@ class LegendPositionResources final
{
public:
//constructor without Display checkbox
LegendPositionResources(weld::Builder& rBuilder);
//constructor inclusive Display checkbox
LegendPositionResources(weld::Builder& rBuilder, const css::uno::Reference<
css::uno::XComponentContext>& xCC );
......@@ -42,9 +40,6 @@ public:
void writeToResources( const css::uno::Reference< css::frame::XModel >& xChartModel );
void writeToModel( const css::uno::Reference< css::frame::XModel >& xChartModel ) const;
void initFromItemSet( const SfxItemSet& rInAttrs );
void writeToItemSet( SfxItemSet& rOutAttrs ) const;
void SetChangeHdl( const Link<LinkParamNone*,void>& rLink );
DECL_LINK( PositionEnableHdl, weld::ToggleButton&, void );
......@@ -82,8 +77,6 @@ public:
void initFromItemSet( const SfxItemSet& rInAttrs );
void writeToItemSet( SfxItemSet& rOutAttrs ) const;
void SetChangeHdl( const Link<LinkParamNone*,void>& rLink );
DECL_LINK(PositionEnableHdl, weld::ToggleButton&, void);
private:
......
......@@ -12,9 +12,9 @@ extensions/source/scanner/sane.hxx:147
_Bool Sane::ActivateButtonOption(int)
extensions/source/scanner/sane.hxx:153
_Bool Sane::Open(int)
extensions/source/scanner/sanedlg.hxx:90
extensions/source/scanner/sanedlg.hxx:89
_Bool SaneDlg::LoadState()
extensions/source/scanner/sanedlg.hxx:104
extensions/source/scanner/sanedlg.hxx:103
_Bool SaneDlg::SetAdjustedNumericalValue(const char *,double,int)
filter/source/flash/swfexporter.hxx:85
_Bool swf::FlashExporter::exportAll(const class com::sun::star::uno::Reference<class com::sun::star::lang::XComponent> &,const class com::sun::star::uno::Reference<class com::sun::star::io::XOutputStream> &,const class com::sun::star::uno::Reference<class com::sun::star::task::XStatusIndicator> &)
......@@ -26,7 +26,7 @@ include/basegfx/range/b2dconnectedranges.hxx:217
type-parameter-?-? basegfx::B2DConnectedRanges::forEachAggregate(type-parameter-?-?) const
include/basegfx/vector/b2dvector.hxx:115
class basegfx::B2DVector & basegfx::B2DVector::setLength(double)
include/basegfx/vector/b2ivector.hxx:101
include/basegfx/vector/b2ivector.hxx:100
class basegfx::B2IVector & basegfx::B2IVector::setLength(double)
include/basegfx/vector/b3dvector.hxx:146
class basegfx::B3DVector & basegfx::B3DVector::setLength(double)
......@@ -196,9 +196,9 @@ include/vcl/texteng.hxx:279
_Bool TextEngine::Read(class SvStream &,const class TextSelection *)
include/vcl/toolbox.hxx:514
_Bool ToolBox::ChangeHighlightUpDn(_Bool)
include/vcl/weld.hxx:344
include/vcl/weld.hxx:348
_Bool weld::ComboBox::get_entry_selection_bounds(int &,int &)
include/vcl/weld.hxx:1017
include/vcl/weld.hxx:1022
_Bool weld::TextView::get_selection_bounds(int &,int &)
lotuswordpro/inc/lwpsvstream.hxx:76
class LwpSvStream & LwpSvStream::ReadUInt8(unsigned char &)
......@@ -206,8 +206,6 @@ lotuswordpro/inc/lwpsvstream.hxx:77
class LwpSvStream & LwpSvStream::ReadUInt16(unsigned short &)
lotuswordpro/inc/lwpsvstream.hxx:78
class LwpSvStream & LwpSvStream::ReadUInt32(unsigned int &)
reportdesign/source/ui/inc/DateTime.hxx:76
short rptui::ODateTimeDialog::execute()
sc/inc/orcusfilters.hxx:44
_Bool ScOrcusFilters::importODS_Styles(class ScDocument &,class rtl::OUString &) const
sc/source/core/opencl/formulagroupcl.cxx:990
......@@ -258,10 +256,6 @@ sd/source/ui/inc/OutlineViewShell.hxx:115
class ErrCode sd::OutlineViewShell::ReadRtf(class SvStream &)
sd/source/ui/remotecontrol/IBluetoothSocket.hxx:37
int sd::IBluetoothSocket::write(const void *,unsigned int)
sfx2/source/appl/appserv.cxx:322
short (anonymous namespace)::LicenseDialog::execute()
sfx2/source/appl/appserv.cxx:339
short (anonymous namespace)::SafeModeQueryDialog::execute()
sw/inc/calc.hxx:113
class SwSbxValue & SwSbxValue::MakeDouble()
sw/inc/doc.hxx:1063
......@@ -284,8 +278,6 @@ sw/source/core/inc/scriptinfo.hxx:227
_Bool SwScriptInfo::GetBoundsOfHiddenRange(int,int &,int &) const
sw/source/filter/ww8/ww8toolbar.hxx:339
_Bool Tcg::ImportCustomToolBar(class SfxObjectShell &)
sw/source/ui/frmdlg/cption.cxx:80
short SwSequenceOptionDialog::execute()
sw/source/uibase/inc/fldmgr.hxx:114
const class com::sun::star::uno::Reference<class com::sun::star::text::XNumberingTypeInfo> & SwFieldMgr::GetNumberingInfo() const
sw/source/uibase/inc/mailmergewizard.hxx:79
......@@ -314,9 +306,9 @@ vcl/inc/unx/gtk/gtkdata.hxx:164
int GtkSalDisplay::CaptureMouse(class SalFrame *)
vcl/inc/unx/saldisp.hxx:316
_Bool SalDisplay::Dispatch(union _XEvent *)
vcl/source/gdi/pdfwriter_impl.hxx:1255
vcl/source/gdi/pdfwriter_impl.hxx:1252
_Bool vcl::PDFWriterImpl::setCurrentStructureElement(int)
vcl/source/gdi/pdfwriter_impl.hxx:1256
vcl/source/gdi/pdfwriter_impl.hxx:1253
_Bool vcl::PDFWriterImpl::setStructureAttribute(enum vcl::PDFWriter::StructAttribute,enum vcl::PDFWriter::StructAttributeValue)
vcl/source/gdi/pdfwriter_impl.hxx:1257
vcl/source/gdi/pdfwriter_impl.hxx:1254
_Bool vcl::PDFWriterImpl::setStructureAttributeNumerical(enum vcl::PDFWriter::StructAttribute,int)
......@@ -447,33 +447,6 @@ namespace dbaui
m_xHostPortRadio->set_active(true);
}
bool DBMySQLNativeSettings::canAdvance() const
{
if (m_xDatabaseName->get_text().isEmpty())
return false;
if ( m_xHostPortRadio->get_active()
&& ( ( m_xHostName->get_text().isEmpty() )
|| ( m_xPort->get_text().isEmpty() )
)
)
return false;
#ifdef UNX
if ( ( m_xSocketRadio->get_active() )
&& ( m_xSocket->get_text().isEmpty() )
)
#else
if ( ( m_xNamedPipeRadio->get_active() )
&& ( m_xNamedPipe->get_text().isEmpty() )
)
#endif
return false;
return true;
}
} // namespace dbaui
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -95,8 +95,6 @@ namespace dbaui
bool FillItemSet( SfxItemSet* rCoreAttrs );
void implInitControls( const SfxItemSet& _rSet );
bool canAdvance() const;
};
} // namespace dbaui
......
......@@ -111,7 +111,6 @@ public:
OutputDevice* GetRefDevPtr() const { return nRefDevPtr; }
sal_uLong GetPaperWidth() const { return nPaperWidth; }
OutDevType GetRefDevType() const { return eRefDevType; }
bool RefDevIsVirtual() const
{ return (eRefDevType == OUTDEV_VIRDEV) || (eRefDevType == OUTDEV_PDF); }
const MapMode& GetRefMapMode() const { return aRefMapMode; }
......
......@@ -180,7 +180,6 @@ public:
const CancelButton& GetCancelButton() const { return *m_pCancelBtn; }
CancelButton& GetCancelButton() { return *m_pCancelBtn; }
void RemoveResetButton();
void RemoveStandardButton();
short Execute() override;
......
......@@ -38,9 +38,8 @@ using namespace ::comphelper;
OPageNumberDialog::OPageNumberDialog(weld::Window* pParent,
const uno::Reference< report::XReportDefinition >& _xHoldAlive,
OReportController* _pController)
OReportController* )
: GenericDialogController(pParent, "modules/dbreport/ui/pagenumberdialog.ui", "PageNumberDialog")
, m_pController(_pController)
, m_xHoldAlive(_xHoldAlive)
, m_xPageN(m_xBuilder->weld_radio_button("pagen"))
, m_xPageNofM(m_xBuilder->weld_radio_button("pagenofm"))
......@@ -56,53 +55,6 @@ OPageNumberDialog::~OPageNumberDialog()
{
}
void OPageNumberDialog::execute()
{
short nRet = m_xDialog->run();
if (nRet == RET_OK)
{
try
{
sal_Int32 nControlMaxSize = 3000;
sal_Int32 nPosX = 0;
sal_Int32 nPos2X = 0;
awt::Size aRptSize = getStyleProperty<awt::Size>(m_xHoldAlive,PROPERTY_PAPERSIZE);
switch (m_xAlignmentLst->get_active())
{
case 0: // left
nPosX = getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN);
break;
case 1: // middle
nPosX = getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN) + (aRptSize.Width - getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN) - getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - nControlMaxSize) / 2;
break;
case 2: // right
nPosX = (aRptSize.Width - getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - nControlMaxSize);
break;
case 3: // inner
case 4: // outer
nPosX = getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN);
nPos2X = (aRptSize.Width - getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - nControlMaxSize);
break;
default:
break;
}
if (m_xAlignmentLst->get_active() > 2)
nPosX = nPos2X;
uno::Sequence<beans::PropertyValue> aValues( comphelper::InitPropertySequence({
{ PROPERTY_POSITION, uno::Any(awt::Point(nPosX,0)) },
{ PROPERTY_PAGEHEADERON, uno::Any(m_xTopPage->get_active()) },
{ PROPERTY_STATE, uno::Any(m_xPageNofM->get_active()) }
}));
m_pController->executeChecked(SID_INSERT_FLD_PGNUMBER,aValues);
}
catch(uno::Exception&)
{
}
}
}
} // rptui
......
......@@ -32,7 +32,6 @@ class OReportController;
\************************************************************************/
class OPageNumberDialog : public weld::GenericDialogController
{
::rptui::OReportController* m_pController;
css::uno::Reference< css::report::XReportDefinition>
m_xHoldAlive;
std::unique_ptr<weld::RadioButton> m_xPageN;
......@@ -49,7 +48,6 @@ public:
const css::uno::Reference< css::report::XReportDefinition>& _xHoldAlive,
::rptui::OReportController* _pController);
virtual ~OPageNumberDialog() override;
void execute();
};
} // namespace rptui
......
......@@ -555,12 +555,6 @@ void SfxTabDialog::Init_Impl(bool bFmtFlag)
}
}
void SfxTabDialog::RemoveResetButton()
{
m_pResetBtn->Hide();
m_pImpl->bHideResetBtn = true;
}
void SfxTabDialog::RemoveStandardButton()
{
m_pBaseFmtBtn->Hide();
......
......@@ -1793,11 +1793,6 @@ void AuthorMarkPane::InitControls()
m_xTitleFI->set_label(pEntry->GetAuthorField(AUTH_FIELD_TITLE));
}
void AuthorMarkPane::Activate()
{
m_xActionBT->set_sensitive(!pSh->HasReadonlySel());
}
namespace
{
const char* STR_AUTH_FIELD_ARY[] =
......
......@@ -259,21 +259,6 @@ void SwAddressPreview::Clear()
UpdateScrollBar();
}
void SwAddressPreview::ReplaceSelectedAddress(const OUString& rNew)
{
pImpl->aAddresses[pImpl->nSelectedAddress] = rNew;
Invalidate();
}
void SwAddressPreview::RemoveSelectedAddress()
{
pImpl->aAddresses.erase(pImpl->aAddresses.begin() + pImpl->nSelectedAddress);
if(pImpl->nSelectedAddress)
--pImpl->nSelectedAddress;
UpdateScrollBar();
Invalidate();
}
void SwAddressPreview::SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns)
{
pImpl->nRows = nRows;
......@@ -281,11 +266,6 @@ void SwAddressPreview::SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns)
UpdateScrollBar();
}
void SwAddressPreview::EnableScrollBar()
{
pImpl->bEnableScrollBar = true;
}
void SwAddressPreview::UpdateScrollBar()
{
if(pImpl->nColumns)
......@@ -592,13 +572,6 @@ void AddressPreview::SelectAddress(sal_uInt16 nSelect)
m_xVScrollBar->vadjustment_set_value(nSelectRow);
}
void AddressPreview::Clear()
{
pImpl->aAddresses.clear();
pImpl->nSelectedAddress = 0;
UpdateScrollBar();
}
void AddressPreview::ReplaceSelectedAddress(const OUString& rNew)
{
pImpl->aAddresses[pImpl->nSelectedAddress] = rNew;
......@@ -779,102 +752,6 @@ void AddressPreview::DrawText_Impl(vcl::RenderContext& rRenderContext, const OUS
while (nPos >= 0);
}
OUString AddressPreview::FillData(
const OUString& rAddress,
SwMailMergeConfigItem const & rConfigItem,
const Sequence< OUString>* pAssignments)
{
//find the column names in the address string (with name assignment!) and
//exchange the placeholder (like <Firstname>) with the database content
//unassigned columns are expanded to <not assigned>
Reference< XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), UNO_QUERY);
Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
Sequence< OUString> aAssignment = pAssignments ?
*pAssignments :
rConfigItem.GetColumnAssignment(
rConfigItem.GetCurrentDBData() );
const OUString* pAssignment = aAssignment.getConstArray();
const std::vector<std::pair<OUString, int>>& rDefHeaders = rConfigItem.GetDefaultAddressHeaders();
OUString sNotAssigned = "<" + SwResId(STR_NOTASSIGNED) + ">";
bool bIncludeCountry = rConfigItem.IsIncludeCountry();
const OUString rExcludeCountry = rConfigItem.GetExcludeCountry();
bool bSpecialReplacementForCountry = (!bIncludeCountry || !rExcludeCountry.isEmpty());
OUString sCountryColumn;
if( bSpecialReplacementForCountry )
{
sCountryColumn = rDefHeaders[MM_PART_COUNTRY].first;
Sequence< OUString> aSpecialAssignment =
rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() );
if(aSpecialAssignment.getLength() > MM_PART_COUNTRY && aSpecialAssignment[MM_PART_COUNTRY].getLength())
sCountryColumn = aSpecialAssignment[MM_PART_COUNTRY];
}
SwAddressIterator aIter(rAddress);
OUStringBuffer sAddress;
while(aIter.HasMore())
{
SwMergeAddressItem aItem = aIter.Next();
if(aItem.bIsColumn)
{
//get the default column name
//find the appropriate assignment
OUString sConvertedColumn = aItem.sText;
for(sal_uInt32 nColumn = 0;
nColumn < rDefHeaders.size() && nColumn < sal_uInt32(aAssignment.getLength());
++nColumn)
{
if (rDefHeaders[nColumn].first == aItem.sText &&
!pAssignment[nColumn].isEmpty())
{
sConvertedColumn = pAssignment[nColumn];
break;
}
}
if(!sConvertedColumn.isEmpty() &&
xColAccess.is() &&
xColAccess->hasByName(sConvertedColumn))
{
//get the content and exchange it in the address string
Any aCol = xColAccess->getByName(sConvertedColumn);
Reference< XColumn > xColumn;
aCol >>= xColumn;
if(xColumn.is())
{
try
{
OUString sReplace = xColumn->getString();
if( bSpecialReplacementForCountry && sCountryColumn == sConvertedColumn )
{
if( !rExcludeCountry.isEmpty() && sReplace != rExcludeCountry )
aItem.sText = sReplace;
else
aItem.sText.clear();
}
else
{
aItem.sText = sReplace;
}
}
catch (const sdbc::SQLException&)
{
OSL_FAIL("SQLException caught");
}
}
}
else
{
aItem.sText = sNotAssigned;
}
}
sAddress.append(aItem.sText);
}
return sAddress.makeStringAndClear();
}
SwMergeAddressItem SwAddressIterator::Next()
{
//currently the string may either start with a '<' then it's a column
......
......@@ -99,12 +99,9 @@ public:
// returns the selected address
sal_uInt16 GetSelectedAddress() const;
void SelectAddress(sal_uInt16 nSelect);
void ReplaceSelectedAddress(const OUString&);
void RemoveSelectedAddress();
// set the number of rows and columns of addresses
void SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns);
void EnableScrollBar();
// fill the actual data into a string (address block or greeting)
static OUString FillData(const OUString& rAddress, SwMailMergeConfigItem const & rConfigItem,
......@@ -143,8 +140,6 @@ public:
void AddAddress(const OUString& rAddress);
// for preview mode - replaces the currently used address by the given one
void SetAddress(const OUString& rAddress);
// removes all addresses
void Clear();
// returns the selected address
sal_uInt16 GetSelectedAddress() const;
......@@ -155,12 +150,6 @@ public:
// set the number of rows and columns of addresses
void SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns);
void EnableScrollBar();
// fill the actual data into a string (address block or greeting)
static OUString FillData(const OUString& rAddress, SwMailMergeConfigItem const & rConfigItem,
const css::uno::Sequence<OUString>* pAssignments = nullptr);
void SetSelectHdl (const Link<LinkParamNone*,void>& rLink) { m_aSelectHdl = rLink; }
};
......
......@@ -271,7 +271,6 @@ class AuthorMarkPane
DECL_LINK(EditModifyHdl, weld::Entry&, void);
void InitControls();
void Activate();
public:
AuthorMarkPane(weld::DialogController& rDialog, weld::Builder& rBuilder, bool bNew);
......
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