summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-08 13:55:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-09 14:17:08 +0200
commitf4fb14ed796cec7a02f3a06a6556997ae415e79d (patch)
treef4d1cd6d31d8b9530786ee90ce9034e5e4d950c6 /svx
parentd84bf553afa510e5c674817fa480ac0af62e4945 (diff)
loplugin:unusedmethods
Change-Id: I0308ddd467ab6e283c0503f98885a248eb28290c Reviewed-on: https://gerrit.libreoffice.org/58738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/sdr/contact/objectcontactofpageview.hxx3
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx3
-rw-r--r--svx/source/dialog/relfld.cxx24
-rw-r--r--svx/source/sdr/contact/objectcontact.cxx6
-rw-r--r--svx/source/sdr/contact/objectcontactofpageview.cxx7
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofgraphic.cxx10
-rw-r--r--svx/source/svdraw/svdograf.cxx160
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx9
-rw-r--r--svx/source/unodraw/unoshape.cxx13
9 files changed, 0 insertions, 235 deletions
diff --git a/svx/inc/sdr/contact/objectcontactofpageview.hxx b/svx/inc/sdr/contact/objectcontactofpageview.hxx
index 28c54434c9ad..5a73731e12be 100644
--- a/svx/inc/sdr/contact/objectcontactofpageview.hxx
+++ b/svx/inc/sdr/contact/objectcontactofpageview.hxx
@@ -89,9 +89,6 @@ namespace sdr
// check if graphic animation is allowed.
virtual bool IsGraphicAnimationAllowed() const override;
- // check if asynchronious graphis loading is allowed. Default is sal_False.
- virtual bool IsAsynchronGraphicsLoadingAllowed() const override;
-
// print? Default is false
virtual bool isOutputToPrinter() const override;
diff --git a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx
index 360009e58f92..681025cce81b 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx
@@ -31,9 +31,6 @@ namespace sdr
{
class ViewObjectContactOfGraphic final : public ViewObjectContactOfSdrObj
{
- const SdrGrafObj& getSdrGrafObj() const;
- SdrGrafObj& getSdrGrafObj();
-
// This method is responsible for creating the graphical visualisation data
virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
diff --git a/svx/source/dialog/relfld.cxx b/svx/source/dialog/relfld.cxx
index 68031f8e920a..b0ffcb61cefd 100644
--- a/svx/source/dialog/relfld.cxx
+++ b/svx/source/dialog/relfld.cxx
@@ -40,30 +40,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void makeSvxRelativeField(VclPtr<vcl::Window> &
eUnit);
}
-void SvxRelativeField::SetRelative( bool bNewRelative )
-{
- Selection aSelection = GetSelection();
- OUString aStr = GetText();
-
- if ( bNewRelative )
- {
- SetDecimalDigits( 0 );
- SetMin( 0 );
- SetMax( 0 );
- SetUnit( FUNIT_PERCENT );
- }
- else
- {
- SetDecimalDigits( 2 );
- SetMin( 0 );
- SetMax( 9999 );
- SetUnit( FUNIT_CM );
- }
-
- SetText( aStr );
- SetSelection( aSelection );
-}
-
RelativeField::RelativeField(weld::MetricSpinButton* pControl)
: m_xSpinButton(pControl)
, nRelMin(0)
diff --git a/svx/source/sdr/contact/objectcontact.cxx b/svx/source/sdr/contact/objectcontact.cxx
index 2aa2655cac22..9bcd586acf7f 100644
--- a/svx/source/sdr/contact/objectcontact.cxx
+++ b/svx/source/sdr/contact/objectcontact.cxx
@@ -146,12 +146,6 @@ bool ObjectContact::IsGraphicAnimationAllowed() const
return true;
}
-// check if asynchronous graphics loading is allowed. Default is false.
-bool ObjectContact::IsAsynchronGraphicsLoadingAllowed() const
-{
- return false;
-}
-
void ObjectContact::SetViewObjectContactRedirector(ViewObjectContactRedirector* pNew)
{
if(mpViewObjectContactRedirector != pNew)
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 281f304d3829..19b28b9488d0 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -407,13 +407,6 @@ namespace sdr
return rOpt.GetIsAllowAnimatedGraphics();
}
- // check if asynchronious graphis loading is allowed. Default is sal_False.
- bool ObjectContactOfPageView::IsAsynchronGraphicsLoadingAllowed() const
- {
- SdrView& rView = GetPageWindow().GetPageView().GetView();
- return rView.IsSwapAsynchron();
- }
-
// print?
bool ObjectContactOfPageView::isOutputToPrinter() const
{
diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index 59c32e6e4006..0e6fbcfc447a 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -30,16 +30,6 @@ namespace sdr
{
namespace contact
{
- const SdrGrafObj& ViewObjectContactOfGraphic::getSdrGrafObj() const
- {
- return static_cast<const ViewContactOfGraphic& >(GetViewContact()).GetGrafObject();
- }
-
- SdrGrafObj& ViewObjectContactOfGraphic::getSdrGrafObj()
- {
- return static_cast<ViewContactOfGraphic& >(GetViewContact()).GetGrafObject();
- }
-
drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfGraphic::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
// get return value by calling parent
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 6e6e926ba849..2a6463d49d55 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -68,156 +68,30 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
-const Graphic ImpLoadLinkedGraphic( const OUString& aFileName, const OUString& aReferer, const OUString& aFilterName )
-{
- Graphic aGraphic;
-
- SfxMedium aMed( aFileName, aReferer, StreamMode::STD_READ );
- aMed.Download();
-
- SvStream* pInStrm = aMed.GetInStream();
- if ( pInStrm )
- {
- pInStrm->Seek( STREAM_SEEK_TO_BEGIN );
- GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
-
- const sal_uInt16 nFilter = !aFilterName.isEmpty() && rGF.GetImportFormatCount()
- ? rGF.GetImportFormatNumber( aFilterName )
- : GRFILTER_FORMAT_DONTKNOW;
-
- css::uno::Sequence< css::beans::PropertyValue > aFilterData( 1 );
-
- // TODO: Room for improvement:
- // As this is a linked graphic the GfxLink is not needed if saving/loading our own format.
- // But this link is required by some filters to access the native graphic (PDF export/MS export),
- // there we should create a new service to provide this data if needed
- aFilterData[ 0 ].Name = "CreateNativeLink";
- aFilterData[ 0 ].Value <<= true;
-
- // Need to own the solar mutex while creating a SalBitmap.
- SolarMutexGuard aGuard;
-
- // #i123042# for e.g SVG the path is needed, so hand it over here. I have no real idea
- // what consequences this may have; maybe this is not handed over by purpose here. Not
- // handing it over means that any GraphicFormat that internally needs a path as base
- // to interpret included links may fail.
- // Alternatively the path may be set at the result after this call when it is known
- // that it is a SVG graphic, but only because no one yet tried to interpret it.
- rGF.ImportGraphic( aGraphic, aFileName, *pInStrm, nFilter, nullptr, GraphicFilterImportFlags::NONE, &aFilterData );
- }
- aGraphic.setOriginURL(aFileName);
- return aGraphic;
-}
-
-class SdrGraphicUpdater;
class SdrGraphicLink : public sfx2::SvBaseLink
{
SdrGrafObj& rGrafObj;
- SdrGraphicUpdater* pGraphicUpdater;
public:
explicit SdrGraphicLink(SdrGrafObj& rObj);
- virtual ~SdrGraphicLink() override;
virtual void Closed() override;
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue ) override;
- void DataChanged( const Graphic& rGraphic );
void Connect() { GetRealObject(); }
- void UpdateAsynchron();
- void RemoveGraphicUpdater();
const OUString& getReferer() const { return rGrafObj.aReferer; }
};
-class SdrGraphicUpdater : public ::osl::Thread
-{
-public:
- SdrGraphicUpdater( const OUString& rFileName, const OUString& rFilterName, SdrGraphicLink& );
-
- void Terminate();
-
- bool GraphicLinkChanged( const OUString& rFileName ){ return maFileName != rFileName; };
-
-protected:
-
- /** is called from the inherited create method and acts as the
- main function of this thread.
- */
- virtual void SAL_CALL run() override;
-
- /** Called after the thread is terminated via the terminate
- method. Used to kill the thread by calling delete on this.
- */
- virtual void SAL_CALL onTerminated() override;
-
-private:
-
- const OUString maFileName;
- const OUString maFilterName;
- SdrGraphicLink& mrGraphicLink;
-
- volatile bool mbIsTerminated;
-};
-
-SdrGraphicUpdater::SdrGraphicUpdater( const OUString& rFileName, const OUString& rFilterName, SdrGraphicLink& rGraphicLink )
-: maFileName( rFileName )
-, maFilterName( rFilterName )
-, mrGraphicLink( rGraphicLink )
-, mbIsTerminated( false )
-{
- create();
-}
-
-void SdrGraphicUpdater::Terminate()
-{
- mbIsTerminated = true;
-}
-
-void SAL_CALL SdrGraphicUpdater::onTerminated()
-{
- delete this;
-}
-
-void SAL_CALL SdrGraphicUpdater::run()
-{
- osl_setThreadName("SdrGraphicUpdater");
-
- Graphic aGraphic( ImpLoadLinkedGraphic( maFileName, mrGraphicLink.getReferer(), maFilterName ) );
- SolarMutexGuard aSolarGuard;
- if ( !mbIsTerminated )
- {
- mrGraphicLink.DataChanged( aGraphic );
- mrGraphicLink.RemoveGraphicUpdater();
- }
-}
-
SdrGraphicLink::SdrGraphicLink(SdrGrafObj& rObj)
: ::sfx2::SvBaseLink( ::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB )
, rGrafObj( rObj )
-, pGraphicUpdater( nullptr )
{
SetSynchron( false );
}
-SdrGraphicLink::~SdrGraphicLink()
-{
- if ( pGraphicUpdater )
- pGraphicUpdater->Terminate();
-}
-
-void SdrGraphicLink::DataChanged( const Graphic& rGraphic )
-{
- rGrafObj.ImpSetLinkedGraphic( rGraphic );
-}
-
-void SdrGraphicLink::RemoveGraphicUpdater()
-{
- pGraphicUpdater = nullptr;
-}
-
::sfx2::SvBaseLink::UpdateResult SdrGraphicLink::DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue )
{
@@ -251,23 +125,6 @@ void SdrGraphicLink::Closed()
SvBaseLink::Closed();
}
-void SdrGraphicLink::UpdateAsynchron()
-{
- if( GetObj() )
- {
- if ( pGraphicUpdater )
- {
- if ( pGraphicUpdater->GraphicLinkChanged( rGrafObj.GetFileName() ) )
- {
- pGraphicUpdater->Terminate();
- pGraphicUpdater = new SdrGraphicUpdater( rGrafObj.GetFileName(), rGrafObj.GetFilterName(), *this );
- }
- }
- else
- pGraphicUpdater = new SdrGraphicUpdater( rGrafObj.GetFileName(), rGrafObj.GetFilterName(), *this );
- }
-}
-
std::unique_ptr<sdr::properties::BaseProperties> SdrGrafObj::CreateObjectSpecificProperties()
{
return o3tl::make_unique<sdr::properties::GraphicProperties>(*this);
@@ -685,23 +542,6 @@ sal_uInt16 SdrGrafObj::GetObjIdentifier() const
return sal_uInt16( OBJ_GRAF );
}
-/* The graphic of the GraphicLink will be loaded. If it is called with
- bAsynchron = true then the graphic will be set later via DataChanged
-*/
-bool SdrGrafObj::ImpUpdateGraphicLink( bool bAsynchron ) const
-{
- bool bRet = false;
- if( pGraphicLink )
- {
- if ( bAsynchron )
- pGraphicLink->UpdateAsynchron();
- else
- pGraphicLink->DataChanged( ImpLoadLinkedGraphic( aFileName, aReferer, aFilterName ) );
- bRet = true;
- }
- return bRet;
-}
-
void SdrGrafObj::ImpSetLinkedGraphic( const Graphic& rGraphic )
{
const bool bIsChanged(getSdrModelFromSdrObject().IsChanged());
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 84bf6ee94990..34533351ac3e 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1737,15 +1737,6 @@ bool SvxColorWindow::IsNoSelection() const
return !mpButtonAutoColor->IsVisible() && !mpButtonNoneColor->IsVisible();
}
-bool ColorWindow::IsNoSelection() const
-{
- if (!mxColorSet->IsNoSelection())
- return false;
- if (!mxRecentColorSet->IsNoSelection())
- return false;
- return !mxButtonAutoColor->get_visible() && !mxButtonNoneColor->get_visible();
-}
-
void SvxColorWindow::statusChanged( const css::frame::FeatureStateEvent& rEvent )
{
if (rEvent.FeatureURL.Complete == ".uno:ColorTableState")
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 2925e727be6f..6ee4b2e9d97b 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -196,19 +196,6 @@ SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries,
}
-SvxShape::SvxShape()
-: maSize(100,100)
-, mpImpl( new SvxShapeImpl( *this, maMutex ) )
-, mbIsMultiPropertyCall(false)
-, mpPropSet(getSvxMapProvider().GetPropertySet(SVXMAP_SHAPE, SdrObject::GetGlobalDrawObjectItemPool()))
-, maPropMapEntries(getSvxMapProvider().GetMap(SVXMAP_SHAPE))
-, mpSdrObjectWeakReference(nullptr)
-, mnLockCount(0)
-{
- impl_construct();
-}
-
-
SvxShape::~SvxShape() throw()
{
::SolarMutexGuard aGuard;