loplugin:unusedmethods

Change-Id: I5f9ef043d76c55f2c761fd08a2bc1dae66b675c8
Reviewed-on: https://gerrit.libreoffice.org/61073
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-09-28 13:31:49 +02:00
parent d664a01f3b
commit 2fbb97367a
19 changed files with 59 additions and 663 deletions
+58 -34
View File
@@ -46,8 +46,6 @@ connectivity/source/inc/OTypeInfo.hxx:46
_Bool connectivity::OTypeInfo::operator==(const struct connectivity::OTypeInfo &) const
connectivity/source/inc/OTypeInfo.hxx:47
_Bool connectivity::OTypeInfo::operator!=(const struct connectivity::OTypeInfo &) const
cui/source/inc/hyphen.hxx:35
HyphenEdit::HyphenEdit(class vcl::Window *)
dbaccess/source/filter/hsqldb/fbalterparser.hxx:20
void dbahsql::FbAlterStmtParser::ensureProperTableLengths() const
dbaccess/source/filter/hsqldb/parseschema.hxx:82
@@ -282,6 +280,8 @@ include/basegfx/utils/b2dclipstate.hxx:75
_Bool basegfx::utils::B2DClipState::operator!=(const class basegfx::utils::B2DClipState &) const
include/basegfx/utils/systemdependentdata.hxx:69
basegfx::MinimalSystemDependentDataManager::MinimalSystemDependentDataManager()
include/basegfx/utils/systemdependentdata.hxx:116
long basegfx::SystemDependentData::estimateUsageInBytes() const
include/basegfx/utils/unopolypolygon.hxx:91
const class basegfx::B2DPolyPolygon & basegfx::unotools::UnoPolyPolygon::getPolyPolygonUnsafe() const
include/basegfx/vector/b2ivector.hxx:75
@@ -330,9 +330,9 @@ include/codemaker/global.hxx:61
class FileStream & operator<<(class FileStream &,const class rtl::OStringBuffer &)
include/comphelper/automationinvokedzone.hxx:28
comphelper::Automation::AutomationInvokedZone::AutomationInvokedZone()
include/comphelper/basicio.hxx:51
const class com::sun::star::uno::Reference<class com::sun::star::io::XObjectInputStream> & comphelper::operator>>(const class com::sun::star::uno::Reference<class com::sun::star::io::XObjectInputStream> &,unsigned int &)
include/comphelper/basicio.hxx:52
const class com::sun::star::uno::Reference<class com::sun::star::io::XObjectInputStream> & comphelper::operator>>(const class com::sun::star::uno::Reference<class com::sun::star::io::XObjectInputStream> &,unsigned int &)
include/comphelper/basicio.hxx:53
const class com::sun::star::uno::Reference<class com::sun::star::io::XObjectOutputStream> & comphelper::operator<<(const class com::sun::star::uno::Reference<class com::sun::star::io::XObjectOutputStream> &,unsigned int)
include/comphelper/configuration.hxx:248
type-parameter-?-? comphelper::ConfigurationLocalizedProperty::get(const class com::sun::star::uno::Reference<class com::sun::star::uno::XComponentContext> &)
@@ -374,7 +374,7 @@ include/comphelper/logging.hxx:413
void comphelper::EventLogger::logp(const int,const char *,const char *,const char *,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?) const
include/comphelper/logging.hxx:426
void comphelper::EventLogger::logp(const int,const char *,const char *,const char *,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?) const
include/comphelper/lok.hxx:46
include/comphelper/lok.hxx:47
_Bool comphelper::LibreOfficeKit::isLocalRendering()
include/comphelper/propagg.hxx:55
_Bool comphelper::internal::OPropertyAccessor::operator==(const struct comphelper::internal::OPropertyAccessor &) const
@@ -554,8 +554,40 @@ include/sfx2/charwin.hxx:63
void SvxCharView::connect_focus_in(const class Link<class weld::Widget &, void> &)
include/sfx2/charwin.hxx:64
void SvxCharView::connect_focus_out(const class Link<class weld::Widget &, void> &)
include/sfx2/controlwrapper.hxx:150
_Bool sfx::ControlWrapperBase::IsControlDontKnow() const
include/sfx2/controlwrapper.hxx:152
void sfx::ControlWrapperBase::SetControlDontKnow(_Bool)
include/sfx2/controlwrapper.hxx:235
sfx::MetricFieldWrapper::MetricFieldWrapper<ValueT>(class MetricField &,enum FieldUnit)
include/sfx2/docfilt.hxx:83
_Bool SfxFilter::GetGpgEncryption() const
include/sfx2/itemconnect.hxx:215
sfx::ItemControlConnection::ItemControlConnection<ItemWrpT, ControlWrpT>(unsigned short,type-parameter-?-? *,enum ItemConnFlags)
include/sfx2/itemconnect.hxx:221
sfx::ItemControlConnection::ItemControlConnection<ItemWrpT, ControlWrpT>(unsigned short,typename type-parameter-?-?::ControlType &,enum ItemConnFlags)
include/sfx2/itemconnect.hxx:254
sfx::DummyItemConnection::DummyItemConnection(unsigned short,class vcl::Window &,enum ItemConnFlags)
include/sfx2/itemconnect.hxx:286
sfx::ListBoxConnection::ListBoxConnection<ItemWrpT>(unsigned short,class ListBox &,const typename ItemControlConnection<type-parameter-?-?, ListBoxWrapper<typename type-parameter-?-?::ItemValueType> >::ControlWrapperType::MapEntryType *,enum ItemConnFlags)
include/sfx2/itemconnect.hxx:306
sfx::ItemConnectionArray::ItemConnectionArray()
include/sfx2/itemconnect.hxx:311
void sfx::ItemConnectionArray::AddConnection(class sfx::ItemConnectionBase *)
include/sfx2/itemwrapper.hxx:92
sfx::SingleItemWrapper::SingleItemWrapper<ItemT, ValueT>(unsigned short)
include/sfx2/itemwrapper.hxx:97
unsigned short sfx::SingleItemWrapper::GetSlotId() const
include/sfx2/itemwrapper.hxx:103
const type-parameter-?-? * sfx::SingleItemWrapper::GetUniqueItem(const class SfxItemSet &) const
include/sfx2/itemwrapper.hxx:107
const type-parameter-?-? & sfx::SingleItemWrapper::GetDefaultItem(const class SfxItemSet &) const
include/sfx2/itemwrapper.hxx:110
type-parameter-?-? sfx::SingleItemWrapper::GetItemValue(const type-parameter-?-? &) const
include/sfx2/itemwrapper.hxx:112
void sfx::SingleItemWrapper::SetItemValue(type-parameter-?-? &,type-parameter-?-?) const
include/sfx2/itemwrapper.hxx:133
sfx::ValueItemWrapper::ValueItemWrapper<ItemT, ValueT, InternalValueT>(unsigned short)
include/sfx2/lokcharthelper.hxx:41
void LokChartHelper::Invalidate()
include/sfx2/msg.hxx:120
@@ -570,8 +602,6 @@ include/svtools/ctrlbox.hxx:208
long LineListBox::GetWidth() const
include/svtools/dialogcontrolling.hxx:167
void svt::ControlDependencyManager::enableOnCheckMark(class CheckBox &,class vcl::Window &,class vcl::Window &)
include/svtools/unitconv.hxx:37
void SetFieldUnit(class MetricBox &,enum FieldUnit)
include/svx/ClassificationEditView.hxx:42
void svx::ClassificationEditView::SetCharAttributes()
include/svx/ClassificationEditView.hxx:48
@@ -584,22 +614,16 @@ include/svx/framelink.hxx:201
_Bool svx::frame::operator>(const class svx::frame::Style &,const class svx::frame::Style &)
include/svx/framelink.hxx:238
_Bool svx::frame::StyleVectorCombination::operator<(const class svx::frame::StyleVectorCombination &) const
include/svx/langbox.hxx:110
void SvxLanguageBoxBase::ImplSetNoSelection()
include/svx/langbox.hxx:111
void SvxLanguageBoxBase::ImplHide()
include/svx/langbox.hxx:112
void SvxLanguageBoxBase::ImplDisable()
include/svx/langbox.hxx:113
void SvxLanguageBoxBase::ImplSaveValue()
include/svx/langbox.hxx:114
int SvxLanguageBoxBase::ImplGetSavedValue() const
include/svx/orienthelper.hxx:86
void svx::OrientationHelper::EnableStackedTriState(_Bool)
include/svx/svdlayer.hxx:75
_Bool SdrLayer::operator==(const class SdrLayer &) const
include/svx/svdpage.hxx:105
class SdrModel & SdrObjList::getSdrModelFromSdrObjList() const
include/svx/svdpntv.hxx:462
_Bool SdrPaintView::IsSwapAsynchron() const
include/svx/svdundo.hxx:190
SdrUndoMoveObj::SdrUndoMoveObj(class SdrObject &)
include/svx/svdundo.hxx:525
SdrUndoMoveLayer::SdrUndoMoveLayer(unsigned short,class SdrLayerAdmin &,class SdrModel &,unsigned short)
include/svx/xpoly.hxx:82
_Bool XPolygon::operator==(const class XPolygon &) const
include/tools/bigint.hxx:86
@@ -692,10 +716,6 @@ include/vcl/errcode.hxx:89
_Bool ErrCode::operator>(const class ErrCode &) const
include/vcl/errcode.hxx:90
_Bool ErrCode::operator>=(const class ErrCode &) const
include/vcl/field.hxx:671
long MetricBox::GetValue(int) const
include/vcl/field.hxx:672
int MetricBox::GetValuePos(long,enum FieldUnit) const
include/vcl/gdimtf.hxx:111
_Bool GDIMetaFile::operator!=(const class GDIMetaFile &) const
include/vcl/gradient.hxx:104
@@ -710,8 +730,6 @@ include/vcl/opengl/OpenGLHelper.hxx:61
void OpenGLHelper::renderToFile(long,long,const class rtl::OUString &)
include/vcl/opengl/OpenGLHelper.hxx:91
void OpenGLHelper::debugMsgStreamWarn(const class std::__cxx11::basic_ostringstream<char> &)
include/vcl/print.hxx:491
class rtl::OUString vcl::PrinterController::getDependency(const class rtl::OUString &) const
include/vcl/salnativewidgets.hxx:387
_Bool TabitemValue::isBothAligned() const
include/vcl/salnativewidgets.hxx:388
@@ -828,6 +846,8 @@ include/vcl/window.hxx:1239
class Size vcl::Window::PaintActiveFloatingWindow(class VirtualDevice &) const
libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.hxx:35
void openLokDialog(struct _GtkWidget *,void *)
lotuswordpro/source/filter/lwplaypiece.hxx:219
double LwpLayoutColumns::GetColWidth(unsigned short)
o3tl/qa/cow_wrapper_clients.hxx:140
_Bool o3tltests::cow_wrapper_client4::operator==(const class o3tltests::cow_wrapper_client4 &) const
o3tl/qa/cow_wrapper_clients.hxx:141
@@ -852,6 +872,8 @@ sc/inc/datamapper.hxx:85
void sc::ExternalDataSource::setURL(const class rtl::OUString &)
sc/inc/datamapper.hxx:86
void sc::ExternalDataSource::setProvider(const class rtl::OUString &)
sc/inc/documentlinkmgr.hxx:65
void sc::DocumentLinkManager::disconnectDdeLinks()
sc/inc/dpfilteredcache.hxx:143
void ScDPFilteredCache::dump() const
sc/inc/formulacell.hxx:460
@@ -910,7 +932,7 @@ sc/source/core/opencl/op_statistical.hxx:204
sc::opencl::OpGeoMean::OpGeoMean()
sc/source/core/tool/scmatrix.cxx:2354
type-parameter-?-? * wrapped_iterator::operator->() const
sc/source/core/tool/scmatrix.cxx:3360
sc/source/core/tool/scmatrix.cxx:3370
const class svl::SharedString & matop::COp::operator()(char,type-parameter-?-?,double,double,const class svl::SharedString &) const
sc/source/filter/inc/htmlpars.hxx:60
void ScHTMLStyles::add(const char *,unsigned long,const char *,unsigned long,const class rtl::OUString &,const class rtl::OUString &)
@@ -954,8 +976,6 @@ sccomp/source/solver/DifferentialEvolution.hxx:67
int DifferentialEvolutionAlgorithm::getLastChange()
sccomp/source/solver/ParticelSwarmOptimization.hxx:85
int ParticleSwarmOptimizationAlgorithm::getLastChange()
sd/inc/drawdoc.hxx:486
void SdDrawDocument::RestoreLayerNames()
sd/inc/sddll.hxx:48
SdDLL::SdDLL()
sd/source/filter/ppt/pptinanimations.hxx:105
@@ -1014,7 +1034,9 @@ slideshow/source/engine/animationfactory.cxx:548
typename type-parameter-?-?::ValueType slideshow::internal::(anonymous namespace)::GenericAnimation::getUnderlyingValue() const
slideshow/source/engine/opengl/TransitionImpl.hxx:180
void OGLTransitionImpl::finish(double,double,double,double,double)
slideshow/source/inc/shapeattributelayer.hxx:391
slideshow/source/inc/shapeattributelayer.hxx:380
_Bool slideshow::internal::ShapeAttributeLayer::isCharRotationAngleValid() const
slideshow/source/inc/shapeattributelayer.hxx:387
void slideshow::internal::ShapeAttributeLayer::setCharRotationAngle(const double &)
svgio/inc/svgstyleattributes.hxx:346
class svgio::svgreader::SvgNumber svgio::svgreader::SvgStyleAttributes::getStrokeDashOffset() const
@@ -1098,6 +1120,8 @@ sw/inc/extinput.hxx:48
class SwExtTextInput * SwExtTextInput::GetPrev()
sw/inc/extinput.hxx:49
const class SwExtTextInput * SwExtTextInput::GetPrev() const
sw/inc/fesh.hxx:538
void SwFEShell::BreakMark()
sw/inc/IDocumentLinksAdministration.hxx:53
_Bool IDocumentLinksAdministration::GetData(const class rtl::OUString &,const class rtl::OUString &,class com::sun::star::uno::Any &) const
sw/inc/IDocumentLinksAdministration.hxx:55
@@ -1158,7 +1182,7 @@ sw/inc/viscrs.hxx:204
const class SwShellTableCursor * SwShellTableCursor::GetPrev() const
sw/qa/extras/inc/swmodeltestbase.hxx:621
class com::sun::star::uno::Reference<class com::sun::star::beans::XPropertySet> SwModelTestBase::getParagraphAnchoredObject(const int,const class com::sun::star::uno::Reference<class com::sun::star::text::XTextRange> &) const
sw/qa/extras/uiwriter/uiwriter.cxx:6538
sw/qa/extras/uiwriter/uiwriter.cxx:6530
int main()
sw/source/core/inc/frame.hxx:907
void SwFrame::dumpTopMostAsXml(struct _xmlTextWriter *) const
@@ -1176,8 +1200,6 @@ sw/source/core/text/porlin.hxx:120
_Bool SwLinePortion::IsTabRightPortion() const
sw/source/core/text/txtpaint.hxx:73
DbgRect::DbgRect(class OutputDevice *,const class tools::Rectangle &,const _Bool,class Color)
sw/source/filter/ww8/ww8scan.hxx:1861
void SwapQuotesInField(class rtl::OUString &)
sw/source/filter/ww8/ww8struc.hxx:243
WW8_BRCVer6::WW8_BRCVer6()
sw/source/uibase/inc/swcont.hxx:86
@@ -1290,10 +1312,12 @@ vcl/source/fontsubset/xlat.hxx:34
unsigned short vcl::TranslateChar15(unsigned short)
vcl/source/fontsubset/xlat.hxx:35
unsigned short vcl::TranslateChar16(unsigned short)
workdir/LexTarget/l10ntools/source/cfglex.cxx:3721
void YYWarning(const char *)
workdir/LexTarget/l10ntools/source/xrmlex.cxx:715
void YYWarning()
workdir/LexTarget/l10ntools/source/xrmlex.cxx:2211
void YYWarning(const char *)
writerfilter/source/dmapper/TableData.hxx:329
void writerfilter::dmapper::TableData::insertCellProperties(unsigned int,class tools::SvRef<class writerfilter::dmapper::TablePropertyMap>)
writerfilter/source/ooxml/OOXMLPropertySet.hxx:176
class __gnu_debug::_Safe_iterator<class __gnu_cxx::__normal_iterator<const class tools::SvRef<class writerfilter::ooxml::OOXMLProperty> *, class std::__cxx1998::vector<class tools::SvRef<class writerfilter::ooxml::OOXMLProperty>, class std::allocator<class tools::SvRef<class writerfilter::ooxml::OOXMLProperty> > > >, class std::__debug::vector<class tools::SvRef<class writerfilter::ooxml::OOXMLProperty>, class std::allocator<class tools::SvRef<class writerfilter::ooxml::OOXMLProperty> > > > writerfilter::ooxml::OOXMLPropertySet::begin() const
writerfilter/source/ooxml/OOXMLPropertySet.hxx:177
@@ -32,7 +32,7 @@ include/basegfx/vector/b3dvector.hxx:146
class basegfx::B3DVector & basegfx::B3DVector::setLength(double)
include/basegfx/vector/b3dvector.hxx:171
class basegfx::B3DVector & basegfx::B3DVector::normalize()
include/comphelper/backupfilehelper.hxx:207
include/comphelper/backupfilehelper.hxx:204
_Bool comphelper::BackupFileHelper::tryPush_extensionInfo(const class rtl::OUString &)
include/editeng/editview.hxx:220
class ErrCode EditView::Read(class SvStream &,enum EETextFormat,class SvKeyValueIterator *)
@@ -152,8 +152,6 @@ include/svx/dlgctrl.hxx:105
class Point SvxRectCtl::SetActualRPWithoutInvalidate(enum RectPoint)
include/svx/framelink.hxx:195
class svx::frame::Style & svx::frame::Style::MirrorSelf()
include/svx/svdhdl.hxx:461
class SdrHdl * SdrHdlList::RemoveHdl(unsigned long)
include/svx/SvxColorValueSet.hxx:55
class Size ColorValueSet::layoutToGivenHeight(unsigned int,unsigned int)
include/test/sheet/xcellrangedata.hxx:21
-62
View File
@@ -146,11 +146,6 @@ public:
@descr Will do nothing, if the corresponding parameter is TRISTATE_INDET. */
virtual void ModifyControl( TriState eShow ) = 0;
/** Derived classes return true if the control is in "don't know" state. */
virtual bool IsControlDontKnow() const = 0;
/** Derived classes set the control to "don't know" state. */
virtual void SetControlDontKnow( bool bSet ) = 0;
private:
ControlWrapperBase( const ControlWrapperBase& ) = delete;
ControlWrapperBase& operator=( const ControlWrapperBase& ) = delete;
@@ -214,38 +209,11 @@ class SFX2_DLLPUBLIC DummyWindowWrapper:
public:
explicit DummyWindowWrapper( vcl::Window& rWindow );
virtual bool IsControlDontKnow() const override;
virtual void SetControlDontKnow( bool ) override;
virtual void* GetControlValue() const override;
virtual void SetControlValue( void* ) override;
};
/** A wrapper for the VCL MetricField.
Adds support for field units during accessing the control value. The
wrapper respects the field unit set at the control itself and converts it
from/to the field unit passed to the constructor.
*/
template< typename ValueT >
class MetricFieldWrapper : public SingleControlWrapper< MetricField, ValueT >
{
public:
explicit MetricFieldWrapper( MetricField& rField, FieldUnit eUnit ) :
SingleControlWrapper< MetricField, ValueT >( rField ), meUnit( eUnit ) {}
virtual bool IsControlDontKnow() const override;
virtual void SetControlDontKnow( bool bSet ) override;
virtual ValueT GetControlValue() const override;
virtual void SetControlValue( ValueT nValue ) override;
private:
FieldUnit meUnit;
};
#define WRAPPER_LISTBOX_ENTRY_NOTFOUND 0xFFFF /* XXX was value of LISTBOX_ENTRY_NOTFOUND */
/** A wrapper for the VCL ListBox.
@@ -269,11 +237,6 @@ public:
explicit ListBoxWrapper( ListBox& rListBox, const MapEntryType* pMap ) :
SingleControlWrapper< ListBox, ValueT >( rListBox ), MapperType( WRAPPER_LISTBOX_ENTRY_NOTFOUND, pMap ) {}
virtual bool IsControlDontKnow() const override
{ return this->GetControl().GetSelectedEntryCount() == 0; }
virtual void SetControlDontKnow( bool bSet ) override
{ if( bSet ) this->GetControl().SetNoSelection(); }
virtual ValueT GetControlValue() const override;
virtual void SetControlValue( ValueT nValue ) override;
};
@@ -333,31 +296,6 @@ inline void SingleControlWrapper< ControlT, ValueT >::ModifyControl( TriState eS
}
template< typename ValueT >
bool MetricFieldWrapper< ValueT >::IsControlDontKnow() const
{
return this->GetControl().GetText().isEmpty();
}
template< typename ValueT >
void MetricFieldWrapper< ValueT >::SetControlDontKnow( bool bSet )
{
if( bSet )
this->GetControl().SetText( OUString() );
}
template< typename ValueT >
ValueT MetricFieldWrapper< ValueT >::GetControlValue() const
{
return static_cast< ValueT >( this->GetControl().Denormalize( this->GetControl().GetValue( meUnit ) ) );
}
template< typename ValueT >
void MetricFieldWrapper< ValueT >::SetControlValue( ValueT nValue )
{
this->GetControl().SetValue( this->GetControl().Normalize( static_cast< sal_Int64 >( nValue ) ), meUnit );
}
template< typename ValueT >
ValueT ListBoxWrapper< ValueT >::GetControlValue() const
{
-217
View File
@@ -189,223 +189,6 @@ private:
ItemConnFlags mnFlags; /// Flags for additional options.
};
/** Base class template for single item <-> single control connection objects.
This template uses functions provided by the SingleItemWrapper and the
SingleControlWrapper template classes. The virtual functions ApplyFlags(),
Reset(), and FillItemSet() are implemented here in a generic way using the
virtual functions of the wrapper classes. Derived classes only have to
create or otherwise provide appropriate wrappers.
*/
template< typename ItemWrpT, typename ControlWrpT >
class ItemControlConnection : public ItemConnectionBase
{
public:
typedef ItemWrpT ItemWrapperType;
typedef ControlWrpT ControlWrapperType;
typedef ItemControlConnection< ItemWrpT, ControlWrpT > ItemControlConnectionType;
typedef typename ItemWrpT::ItemType ItemType;
typedef typename ItemWrpT::ItemValueType ItemValueType;
typedef typename ControlWrpT::ControlType ControlType;
typedef typename ControlWrpT::ControlValueType ControlValueType;
/** Receives pointer to a newly created control wrapper.
@descr Takes ownership of the control wrapper. */
explicit ItemControlConnection( sal_uInt16 nSlot, ControlWrpT* pNewCtrlWrp,
ItemConnFlags nFlags );
/** Convenience constructor. Receives reference to a control directly.
@descr May only be used, if ControlWrpT::ControlWrpT( ControlType& )
constructor exists. */
explicit ItemControlConnection( sal_uInt16 nSlot, ControlType& rControl,
ItemConnFlags nFlags = ItemConnFlags::NONE );
virtual ~ItemControlConnection() override;
protected:
/** Actions according to current flags for the control. */
virtual void ApplyFlags( const SfxItemSet* pItemSet ) override;
/** Resets the control according to the item contents. */
virtual void Reset( const SfxItemSet* pItemSet ) override;
/** Fills the item set according to the control's state. */
virtual bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet ) override;
ItemWrapperType maItemWrp;
std::unique_ptr<ControlWrpT> mxCtrlWrp;
bool mbModified;
};
// Standard connections
/** This is a helper class to enable/disable/show/hide a control only.
This class does nothing special in the Reset() and FillItemSet() functions.
It can be used to control the visibility of i.e. fixed lines or fixed texts
related to the availability of an item by passing the appropriate flags to
the constructor of this connection.
*/
class SFX2_DLLPUBLIC DummyItemConnection:
public ItemConnectionBase, public DummyWindowWrapper
{
public:
explicit DummyItemConnection( sal_uInt16 nSlot, vcl::Window& rWindow,
ItemConnFlags nFlags );
protected:
virtual void ApplyFlags( const SfxItemSet* pItemSet ) override;
virtual void Reset( const SfxItemSet* pItemSet ) override;
virtual bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet ) override;
private:
sal_uInt16 mnSlot;
};
/** Connection between an item and a VCL ListBox.
Optionally a map can be passed that maps list box positions to item values.
This map MUST be terminated with an entry containing
WRAPPER_LISTBOX_ENTRY_NOTFOUND as list box position. The item value
contained in this last entry is used as default item value in case of an
error.
*/
template< typename ItemWrpT >
class ListBoxConnection : public ItemControlConnection< ItemWrpT,
ListBoxWrapper< typename ItemWrpT::ItemValueType > >
{
typedef ItemControlConnection< ItemWrpT,
ListBoxWrapper< typename ItemWrpT::ItemValueType > >
ItemControlConnectionType;
public:
typedef typename ItemControlConnectionType::ControlWrapperType ListBoxWrapperType;
typedef typename ListBoxWrapperType::MapEntryType MapEntryType;
explicit ListBoxConnection( sal_uInt16 nSlot, ListBox& rListBox,
const MapEntryType* pMap, ItemConnFlags nFlags = ItemConnFlags::NONE );
};
// Array of connections
class ItemConnectionArrayImpl;
/** A container of connection objects.
This is a connection with the only purpose to contain other connection
objects. This way it is possible to create a tree structure of connections
for a convenient connection management. This class is used by the class
SfxTabPage to store all connections.
*/
class ItemConnectionArray : public ItemConnectionBase
{
public:
explicit ItemConnectionArray();
virtual ~ItemConnectionArray() override;
/** Adds a new connection to the list.
@descr Takes ownership of the connection! */
void AddConnection( ItemConnectionBase* pConnection );
protected:
virtual void ApplyFlags( const SfxItemSet* pItemSet ) override;
virtual void Reset( const SfxItemSet* pItemSet ) override;
virtual bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet ) override;
private:
std::unique_ptr< ItemConnectionArrayImpl > mxImpl;
};
// *** Implementation of template functions ***
// Base connection classes
template< typename ItemWrpT, typename ControlWrpT >
ItemControlConnection< ItemWrpT, ControlWrpT >::ItemControlConnection(
sal_uInt16 nSlot, ControlWrpT* pNewCtrlWrp, ItemConnFlags nFlags ) :
ItemConnectionBase( nFlags ),
maItemWrp( nSlot ),
mxCtrlWrp( pNewCtrlWrp ),
mbModified( false )
{
}
template< typename ItemWrpT, typename ControlWrpT >
ItemControlConnection< ItemWrpT, ControlWrpT >::ItemControlConnection(
sal_uInt16 nSlot, ControlType& rControl, ItemConnFlags nFlags ) :
ItemConnectionBase( nFlags ),
maItemWrp( nSlot ),
mxCtrlWrp( new ControlWrpT( rControl ) ),
mbModified( false )
{
}
template< typename ItemWrpT, typename ControlWrpT >
ItemControlConnection< ItemWrpT, ControlWrpT >::~ItemControlConnection()
{
}
template< typename ItemWrpT, typename ControlWrpT >
void ItemControlConnection< ItemWrpT, ControlWrpT >::ApplyFlags( const SfxItemSet* pItemSet )
{
bool bKnown = ItemWrapperHelper::IsKnownItem( *pItemSet, maItemWrp.GetSlotId() );
mxCtrlWrp->ModifyControl( GetShowState( bKnown ) );
}
template< typename ItemWrpT, typename ControlWrpT >
void ItemControlConnection< ItemWrpT, ControlWrpT >::Reset( const SfxItemSet* pItemSet )
{
const ItemType* pItem = maItemWrp.GetUniqueItem( *pItemSet );
mxCtrlWrp->SetControlDontKnow( pItem == nullptr );
if( pItem )
mxCtrlWrp->SetControlValue( maItemWrp.GetItemValue( *pItem ) );
mbModified = false;
}
template< typename ItemWrpT, typename ControlWrpT >
bool ItemControlConnection< ItemWrpT, ControlWrpT >::FillItemSet(
SfxItemSet& rDestSet, const SfxItemSet& rOldSet )
{
const ItemType* pOldItem = maItemWrp.GetUniqueItem( rOldSet );
if( !mxCtrlWrp->IsControlDontKnow() )
{
// first store the control value in a local variable
ControlValueType aCtrlValue( mxCtrlWrp->GetControlValue() );
// convert to item value type -> possible to convert i.e. from 'T' to 'const T&'
ItemValueType aNewValue( aCtrlValue );
// do not rely on existence of ItemValueType::operator!=
if( mbModified || !pOldItem || !(maItemWrp.GetItemValue( *pOldItem ) == aNewValue) )
{
sal_uInt16 nWhich = ItemWrapperHelper::GetWhichId( rDestSet, maItemWrp.GetSlotId() );
std::unique_ptr< ItemType > xItem(
static_cast< ItemType* >( maItemWrp.GetDefaultItem( rDestSet ).Clone() ) );
xItem->SetWhich( nWhich );
maItemWrp.SetItemValue( *xItem, aNewValue );
rDestSet.Put( *xItem );
mbModified = true;
}
}
if( !mbModified )
ItemWrapperHelper::RemoveDefaultItem( rDestSet, rOldSet, maItemWrp.GetSlotId() );
return mbModified;
}
// Standard connections
template< typename ItemWrpT >
ListBoxConnection< ItemWrpT >::ListBoxConnection(
sal_uInt16 nSlot, ListBox& rListBox, const MapEntryType* pMap, ItemConnFlags nFlags ) :
ItemControlConnectionType( nSlot, new ListBoxWrapperType( rListBox, pMap ), nFlags )
{
}
} // namespace sfx
#endif
-111
View File
@@ -53,117 +53,6 @@ public:
static void RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, sal_uInt16 nSlot );
};
// Item wrappers
/** Base class wrapping a single item.
Objects of this class store the SID of an item. Exchanging data with the
item is done with the virtual functions GetItemValue() and SetItemValue().
Derived classes implement these functions according to the item type they
work on.
The current tree of base classes/templates and standard item wrappers:
SingleItemWrapper< ItemT, ValueT >
|
+- ValueItemWrapper< ItemT, ValueT > [1]
| |
| +- BoolItemWrapper [1]
| +- UInt16ItemWrapper [1]
| +- Int32ItemWrapper [1]
|
+- IdentItemWrapper< ItemT > [1]
Notes:
[1] Standard wrappers ready to use.
See documentation of class ItemConnectionBase for more details.
*/
template< typename ItemT, typename ValueT >
class SingleItemWrapper
{
public:
typedef ItemT ItemType;
typedef ValueT ItemValueType;
typedef SingleItemWrapper< ItemT, ValueT > SingleItemWrapperType;
explicit SingleItemWrapper( sal_uInt16 nSlot ) : mnSlot( nSlot ) {}
virtual ~SingleItemWrapper() {}
/** Returns the SID this wrapper works on. */
sal_uInt16 GetSlotId() const { return mnSlot; }
/** Returns the item from an item set, if it is not in "don't know" state.
@descr Similar to ItemWrapperHelper::GetUniqueItem(), but works always
with the own SID and returns the correct item type.
@return Pointer to item, or 0 if it has "don't know" state. */
const ItemT* GetUniqueItem( const SfxItemSet& rItemSet ) const;
/** Returns the default item from the pool of the passed item set.
@descr Similar to ItemWrapperHelper::GetDefaultItem(), but works
always with the own SID and returns the correct item type. */
const ItemT& GetDefaultItem( const SfxItemSet& rItemSet ) const;
/** Derived classes return the value of the passed item. */
virtual ValueT GetItemValue( const ItemT& rItem ) const = 0;
/** Derived classes set the value at the passed item. */
virtual void SetItemValue( ItemT& rItem, ValueT aValue ) const = 0;
private:
sal_uInt16 mnSlot; /// The SID of this item wrapper.
};
/** An item wrapper usable for most types of items.
The item type must support the following functions:
- ValueT ItemT::GetValue() const
- void ItemT::SetValue( ValueT )
The template parameter InternalValueT can be used to specify the internal
value type of the item, if it differs from ValueT. This parameter has to be
used to prevent compiler warnings.
*/
template< typename ItemT, typename ValueT, typename InternalValueT = ValueT >
class ValueItemWrapper : public SingleItemWrapper< ItemT, ValueT >
{
public:
explicit ValueItemWrapper( sal_uInt16 nSlot ) :
SingleItemWrapper< ItemT, ValueT >( nSlot ) {}
virtual ValueT GetItemValue( const ItemT& rItem ) const override
{ return static_cast< ValueT >( rItem.GetValue() ); }
virtual void SetItemValue( ItemT& rItem, ValueT aValue ) const override
{ rItem.SetValue( static_cast< InternalValueT >( aValue ) ); }
};
typedef ValueItemWrapper< SfxBoolItem, sal_Bool > BoolItemWrapper;
typedef ValueItemWrapper< SfxUInt16Item, sal_uInt16 > UInt16ItemWrapper;
typedef ValueItemWrapper< SfxInt32Item, sal_Int32 > Int32ItemWrapper;
// *** Implementation of template functions ***
// Item wrappers
template< typename ItemT, typename ValueT >
const ItemT* SingleItemWrapper< ItemT, ValueT >::GetUniqueItem( const SfxItemSet& rItemSet ) const
{
return static_cast< const ItemT* >( ItemWrapperHelper::GetUniqueItem( rItemSet, mnSlot ) );
}
template< typename ItemT, typename ValueT >
const ItemT& SingleItemWrapper< ItemT, ValueT >::GetDefaultItem( const SfxItemSet& rItemSet ) const
{
return static_cast< const ItemT& >( ItemWrapperHelper::GetDefaultItem( rItemSet, mnSlot ) );
}
} // namespace sfx
#endif
-3
View File
@@ -82,9 +82,6 @@ public:
/** Returns the state of the "stacked" check box. */
TriState GetStackedState() const;
/** Enables/disables the "don't know" state of the "Stacked text" check box. */
void EnableStackedTriState( bool bEnable );
private:
std::unique_ptr< OrientationHelper_Impl > mpImpl;
};
-21
View File
@@ -187,7 +187,6 @@ class SVX_DLLPUBLIC SdrUndoMoveObj final : public SdrUndoObj
Size aDistance; // Distance by which we move
public:
SdrUndoMoveObj(SdrObject& rNewObj): SdrUndoObj(rNewObj) {}
SdrUndoMoveObj(SdrObject& rNewObj, const Size& rDist): SdrUndoObj(rNewObj),aDistance(rDist) {}
virtual ~SdrUndoMoveObj() override;
@@ -512,26 +511,6 @@ public:
virtual OUString GetComment() const override;
};
/**
* Moving a Layer.
* Create Action before the Move.
*/
class SdrUndoMoveLayer : public SdrUndoLayer
{
sal_uInt16 nNewPos;
public:
SdrUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNewPos1)
: SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel), nNewPos(nNewPos1) {}
virtual void Undo() override;
virtual void Redo() override;
virtual OUString GetComment() const override;
};
/*
* Pages
*/
@@ -286,15 +286,6 @@ void LwpLayoutColumns::Read()
}
}
double LwpLayoutColumns::GetColWidth(sal_uInt16 nIndex)
{
if(nIndex >= m_nNumCols)
{
return 0;
}
return m_pColumns[nIndex].GetWidth();
}
double LwpLayoutColumns::GetColGap(sal_uInt16 nIndex)
{
if(nIndex >= m_nNumCols)
@@ -216,7 +216,6 @@ public:
LwpLayoutColumns(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
sal_uInt16 GetNumCols(){return m_nNumCols;}
double GetColWidth(sal_uInt16 nIndex);
double GetColGap(sal_uInt16 nIndex);
private:
virtual void Read() override;
-1
View File
@@ -62,7 +62,6 @@ public:
size_t getDdeLinkCount() const;
void disconnectDdeLinks();
private:
bool hasDdeOrOleOrWebServiceLinks(bool bDde, bool bOle, bool bWebService) const;
};
-16
View File
@@ -260,22 +260,6 @@ size_t DocumentLinkManager::getDdeLinkCount() const
return nDdeCount;
}
void DocumentLinkManager::disconnectDdeLinks()
{
sfx2::LinkManager* pMgr = mpImpl->mpLinkManager;
if (!pMgr)
return;
const sfx2::SvBaseLinks& rLinks = pMgr->GetLinks();
for (const auto & rLink : rLinks)
{
::sfx2::SvBaseLink* pBase = rLink.get();
ScDdeLink* pDdeLink = dynamic_cast<ScDdeLink*>(pBase);
if (pDdeLink)
pDdeLink->Disconnect();
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-112
View File
@@ -83,15 +83,6 @@ DummyWindowWrapper::DummyWindowWrapper( vcl::Window& rWindow ) :
{
}
bool DummyWindowWrapper::IsControlDontKnow() const
{
return false;
}
void DummyWindowWrapper::SetControlDontKnow( bool )
{
}
void* DummyWindowWrapper::GetControlValue() const
{
return nullptr;
@@ -134,109 +125,6 @@ TriState ItemConnectionBase::GetShowState( bool bKnown ) const
}
// Standard connections
DummyItemConnection::DummyItemConnection( sal_uInt16 nSlot, vcl::Window& rWindow, ItemConnFlags nFlags ) :
ItemConnectionBase( nFlags ),
DummyWindowWrapper( rWindow ),
mnSlot( nSlot )
{
}
void DummyItemConnection::ApplyFlags( const SfxItemSet* pItemSet )
{
bool bKnown = ItemWrapperHelper::IsKnownItem( *pItemSet, mnSlot );
ModifyControl( GetShowState( bKnown ) );
}
void DummyItemConnection::Reset( const SfxItemSet* )
{
}
bool DummyItemConnection::FillItemSet( SfxItemSet& /*rDestSet*/, const SfxItemSet& /*rOldSet*/ )
{
return false; // item set not changed
}
// Array of connections
class ItemConnectionArrayImpl
{
public:
void Append( ItemConnectionBase* pConnection );
void ApplyFlags( const SfxItemSet* pItemSet );
void Reset( const SfxItemSet* pItemSet );
bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet );
private:
typedef std::shared_ptr< ItemConnectionBase > ItemConnectionRef;
typedef std::vector< ItemConnectionRef > ItemConnectionVector;
ItemConnectionVector maVector;
};
void ItemConnectionArrayImpl::Append( ItemConnectionBase* pConnection )
{
if( pConnection )
maVector.push_back( ItemConnectionRef( pConnection ) );
}
void ItemConnectionArrayImpl::ApplyFlags( const SfxItemSet* pItemSet )
{
for (auto const& itemConnection : maVector)
itemConnection->DoApplyFlags( pItemSet );
}
void ItemConnectionArrayImpl::Reset( const SfxItemSet* pItemSet )
{
for (auto const& itemConnection : maVector)
itemConnection->DoReset( pItemSet );
}
bool ItemConnectionArrayImpl::FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet )
{
bool bChanged = false;
for (auto const& itemConnection : maVector)
bChanged |= itemConnection->DoFillItemSet( rDestSet, rOldSet );
return bChanged;
}
ItemConnectionArray::ItemConnectionArray() :
ItemConnectionBase(ItemConnFlags::NONE),
mxImpl( new ItemConnectionArrayImpl )
{
}
ItemConnectionArray::~ItemConnectionArray()
{
}
void ItemConnectionArray::AddConnection( ItemConnectionBase* pConnection )
{
mxImpl->Append( pConnection );
}
void ItemConnectionArray::ApplyFlags( const SfxItemSet* pItemSet )
{
mxImpl->ApplyFlags( pItemSet );
}
void ItemConnectionArray::Reset( const SfxItemSet* pItemSet )
{
mxImpl->Reset( pItemSet );
}
bool ItemConnectionArray::FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet )
{
return mxImpl->FillItemSet( rDestSet, rOldSet );
}
} // namespace sfx
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -139,7 +139,6 @@ namespace slideshow
mnShearXAngle(),
mnShearYAngle(),
mnAlpha(),
mnCharRotationAngle(),
mnCharScale(),
mnCharWeight(),
@@ -178,7 +177,6 @@ namespace slideshow
mbAlphaValid( false ),
mbCharRotationAngleValid( false ),
mbCharScaleValid( false ),
mbDimColorValid( false ),
@@ -645,21 +643,6 @@ namespace slideshow
++mnContentState;
}
bool ShapeAttributeLayer::isCharRotationAngleValid() const
{
return mbCharRotationAngleValid || ( haveChild() && mpChild->isCharRotationAngleValid() );
}
void ShapeAttributeLayer::setCharRotationAngle( const double& rNewAngle )
{
ENSURE_OR_THROW( ::rtl::math::isFinite(rNewAngle),
"ShapeAttributeLayer::setCharRotationAngle(): Invalid angle" );
mnCharRotationAngle = rNewAngle;
mbCharRotationAngleValid = true;
++mnContentState;
}
bool ShapeAttributeLayer::isCharWeightValid() const
{
return mbCharWeightValid || ( haveChild() && mpChild->isCharWeightValid() );
@@ -375,17 +375,6 @@ namespace slideshow
*/
void setCharColor( const RGBColor& nNewColor );
/** Query whether the char rotation angle attribute is valid
*/
bool isCharRotationAngleValid() const;
/** Set the new text rotation angle of the shape
@param rNewAngle
New text rotation angle in degrees.
*/
void setCharRotationAngle( const double& rNewAngle );
/** Query whether the char weight attribute is valid
*/
bool isCharWeightValid() const;
@@ -498,7 +487,6 @@ namespace slideshow
double mnShearXAngle;
double mnShearYAngle;
double mnAlpha;
double mnCharRotationAngle;
double mnCharScale;
double mnCharWeight;
@@ -537,7 +525,6 @@ namespace slideshow
bool mbAlphaValid : 1;
bool mbCharRotationAngleValid: 1;
bool mbCharScaleValid : 1;
bool mbDimColorValid : 1;
-5
View File
@@ -144,11 +144,6 @@ TriState OrientationHelper::GetStackedState() const
return mpImpl->mrCbStacked.GetState();
}
void OrientationHelper::EnableStackedTriState( bool bEnable )
{
mpImpl->mrCbStacked.EnableTriState( bEnable );
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-20
View File
@@ -1313,26 +1313,6 @@ OUString SdrUndoDelLayer::GetComment() const
}
void SdrUndoMoveLayer::Undo()
{
SdrLayer* pCmpLayer= pLayerAdmin->RemoveLayer(nNewPos);
DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Undo(): Removed layer is != pLayer.");
pLayerAdmin->InsertLayer(pLayer,nNum);
}
void SdrUndoMoveLayer::Redo()
{
SdrLayer* pCmpLayer= pLayerAdmin->RemoveLayer(nNum);
DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Redo(): Removed layer is != pLayer.");
pLayerAdmin->InsertLayer(pLayer,nNewPos);
}
OUString SdrUndoMoveLayer::GetComment() const
{
return SvxResId(STR_UndoMovLayer);
}
SdrUndoPage::SdrUndoPage(SdrPage& rNewPg)
: SdrUndoAction(rNewPg.getSdrModelFromSdrPage())
,mrPage(rNewPg)
-1
View File
@@ -535,7 +535,6 @@ public:
bool BeginMark( const Point &rPos );
void MoveMark ( const Point &rPos );
bool EndMark ();
void BreakMark();
/// Create and destroy group, don't when frame is selected.
bool IsGroupSelected(); ///< Can be a mixed selection!
-6
View File
@@ -2221,12 +2221,6 @@ bool SwFEShell::EndMark()
return bRet;
}
void SwFEShell::BreakMark()
{
OSL_ENSURE( Imp()->HasDrawView(), "BreakMark without DrawView?" );
Imp()->GetDrawView()->BrkMarkObj();
}
RndStdIds SwFEShell::GetAnchorId() const
{
RndStdIds nRet = RndStdIds(SHRT_MAX);
-11
View File
@@ -320,17 +320,6 @@ public:
mpRow->insertCellProperties(pProps);
}
/**
Add properties to a cell of the current row.
@param i index of the cell
@param pProps properties to add
*/
void insertCellProperties(unsigned int i, TablePropertyMapPtr pProps)
{
mpRow->insertCellProperties(i, pProps);
}
/**
Return number of rows in the table.
*/