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

loplugin:unusedmethods

Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454
Reviewed-on: https://gerrit.libreoffice.org/44553Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 617fb9ee
......@@ -61,7 +61,6 @@ class MediaChildWindow : public SystemChildWindow
public:
explicit MediaChildWindow( vcl::Window* pParent );
MediaChildWindow( vcl::Window* pParent, SystemWindowData* pData );
protected:
......
......@@ -31,10 +31,6 @@ namespace basegfx
const OUString& rStr,
const sal_Int32 nLen);
void skipSpacesAndCommas(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen);
inline bool isOnNumberChar(const sal_Unicode aChar,
bool bSignAllowed)
{
......@@ -52,10 +48,6 @@ namespace basegfx
return isOnNumberChar(rStr[nPos], true/*bSignAllowed*/);
}
bool getDoubleChar(double& o_fRetval,
sal_Int32& io_rPos,
const OUString& rStr);
bool importDoubleAndSpaces(double& o_fRetval,
sal_Int32& io_rPos,
const OUString& rStr,
......
......@@ -221,10 +221,6 @@ bool UnusedMethods::VisitCallExpr(CallExpr* expr)
if (calleeFunctionDecl)
goto gotfunc;
}
/*
expr->dump();
throw "Can't touch this";
*/
return true;
}
......
......@@ -22,87 +22,6 @@ virtualSet = set() # set of tuple(return_type, name_and_params)
# for the "unused return types" analysis
usedReturnSet = set() # set of tuple(return_type, name_and_params)
# things we need to exclude for reasons like :
# - it's a weird template thingy that confuses the plugin
unusedMethodsExclusionSet = set([
# only used by Windows build
"_Bool basegfx::B2ITuple::equalZero() const",
"const class basegfx::B2DPolyPolygon & basegfx::unotools::UnoPolyPolygon::getPolyPolygonUnsafe() const",
"void basegfx::B2IRange::expand(const class basegfx::B2IRange &)",
"void OpenGLContext::requestSingleBufferedRendering()",
"_Bool TabitemValue::isBothAligned() const",
"_Bool TabitemValue::isNotAligned() const",
"void TabitemValue::isLast() const",
"void StyleSettings::SetSpinSize(long)",
"void StyleSettings::SetFloatTitleHeight(long)",
"void StyleSettings::SetTitleHeight(long)",
"void StyleSettings::SetUseFlatBorders(_Bool)",
"void StyleSettings::SetUseFlatMenus(_Bool)",
"void StyleSettings::SetCursorSize(long)",
"_Bool CommandMediaData::GetPassThroughToOS() const",
"void Application::AppEvent(const class ApplicationEvent &)",
"int PhysicalFontFace::GetWidth() const",
"void PhysicalFontFace::SetBitmapSize(int,int)",
"class boost::intrusive_ptr<class FontCharMap> FontCharMap::GetDefaultMap(_Bool)",
"_Bool SalObject::IsEraseBackgroundEnabled()",
"const class rtl::OUString & connectivity::OColumn::getCatalogName() const",
"const class rtl::OUString & connectivity::OColumn::getSchemaName() const",
"_Bool connectivity::OColumn::isDefinitelyWritable() const",
"_Bool connectivity::OColumn::isReadOnly() const",
"_Bool connectivity::OColumn::isWritable() const",
"_Bool IDocumentLinksAdministration::GetData(const class rtl::OUString &,const class rtl::OUString &,class com::sun::star::uno::Any &) const",
"_Bool IDocumentLinksAdministration::SetData(const class rtl::OUString &,const class rtl::OUString &,const class com::sun::star::uno::Any &)",
"_Bool ScImportExport::ImportData(const class rtl::OUString &,const class com::sun::star::uno::Any &)",
"void* ScannerManager::GetData()",
"void ScannerManager::SetData(void *)",
"class rtl::OUString FilterConfigCache::GetImportFormatMediaType(unsigned short)",
# only used by OSX build
"void StyleSettings::SetHideDisabledMenuItems(_Bool)",
"_Bool TabitemValue::isLast() const",
"ApplicationEvent::ApplicationEvent(enum ApplicationEvent::Type,const class std::__debug::vector<class rtl::OUString, class std::allocator<class rtl::OUString> > &)",
# debugging methods
"void oox::drawingml::TextParagraphProperties::dump() const",
"void oox::PropertyMap::dumpCode(class com::sun::star::uno::Reference<class com::sun::star::beans::XPropertySet>)",
"void oox::PropertyMap::dumpData(class com::sun::star::uno::Reference<class com::sun::star::beans::XPropertySet>)",
"class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char> > writerfilter::ooxml::OOXMLPropertySet::toString()",
# I need to teach the plugin that for loops with range expressions call begin() and end()
"class __gnu_debug::_Safe_iterator<class __gnu_cxx::__normal_iterator<class SwAnchoredObject *const *, class std::__cxx1998::vector<class SwAnchoredObject *, class std::allocator<class SwAnchoredObject *> > >, class std::__debug::vector<class SwAnchoredObject *, class std::allocator<class SwAnchoredObject *> > > SwSortedObjs::begin() const",
"class __gnu_debug::_Safe_iterator<class __gnu_cxx::__normal_iterator<class SwAnchoredObject *const *, class std::__cxx1998::vector<class SwAnchoredObject *, class std::allocator<class SwAnchoredObject *> > >, class std::__debug::vector<class SwAnchoredObject *, class std::allocator<class SwAnchoredObject *> > > SwSortedObjs::end() const",
# loaded by dlopen()
"void * getStandardAccessibleFactory()",
"void * getSvtAccessibilityComponentFactory()",
"struct _rtl_uString * basicide_choose_macro(void *,void *,unsigned char,struct _rtl_uString *)",
"void basicide_macro_organizer(short)",
"long basicide_handle_basic_error(void *)",
"class com::sun::star::uno::XInterface * org_libreoffice_chart2_Chart2ToolboxController(class com::sun::star::uno::XComponentContext *,const class com::sun::star::uno::Sequence<class com::sun::star::uno::Any> &)",
"class com::sun::star::uno::XInterface * org_libreoffice_comp_chart2_sidebar_ChartPanelFactory(class com::sun::star::uno::XComponentContext *,const class com::sun::star::uno::Sequence<class com::sun::star::uno::Any> &)",
"class chart::opengl::OpenglShapeFactory * getOpenglShapeFactory()",
"class VclAbstractDialogFactory * CreateDialogFactory()",
"_Bool GetSpecialCharsForEdit(class vcl::Window *,const class vcl::Font &,class rtl::OUString &)",
"const struct ImplTextEncodingData * sal_getFullTextEncodingData(unsigned short)",
"class SalInstance * create_SalInstance()",
"class SwAbstractDialogFactory * SwCreateDialogFactory()",
"class com::sun::star::uno::Reference<class com::sun::star::uno::XInterface> WordPerfectImportFilterDialog_createInstance(const class com::sun::star::uno::Reference<class com::sun::star::uno::XComponentContext> &)",
"class UnoWrapperBase * CreateUnoWrapper()",
"class SwAbstractDialogFactory * SwCreateDialogFactory()",
"unsigned long GetSaveWarningOfMSVBAStorage_ww8(class SfxObjectShell &)",
"unsigned long SaveOrDelMSVBAStorage_ww8(class SfxObjectShell &,class SotStorage &,unsigned char,const class rtl::OUString &)",
"void ExportRTF(const class rtl::OUString &,const class rtl::OUString &,class tools::SvRef<class Writer> &)",
"void ExportDOC(const class rtl::OUString &,const class rtl::OUString &,class tools::SvRef<class Writer> &)",
"class Reader * ImportRTF()",
"void ImportXE(class SwDoc &,class SwPaM &,const class rtl::OUString &)",
"_Bool TestImportDOC(const class rtl::OUString &,const class rtl::OUString &)",
"class vcl::Window * CreateWindow(class VCLXWindow **,const struct com::sun::star::awt::WindowDescriptor *,class vcl::Window *,long)",
# only used when the ODBC driver is enabled
"_Bool getImplementation(type-parameter-?-? *&,const class com::sun::star::uno::Reference<class com::sun::star::uno::XInterface> &)",
# called from extensions
"unsigned short MenuBar::AddMenuBarButton(const class Image &,const class Link<struct MenuBar::MenuBarButtonCallbackArg &, _Bool> &,const class rtl::OUString &)",
"void MenuBar::SetMenuBarButtonHighlightHdl(unsigned short,const class Link<struct MenuBar::MenuBarButtonCallbackArg &, _Bool> &)",
"class Rectangle MenuBar::GetMenuBarButtonRectPixel(unsigned short)",
"void MenuBar::RemoveMenuBarButton(unsigned short)",
])
# clang does not always use exactly the same numbers in the type-parameter vars it generates
# so I need to substitute them to ensure we can match correctly.
normalizeTypeParamsRegex = re.compile(r"type-parameter-\d+-\d+")
......@@ -197,8 +116,6 @@ tmp1set = set() # set of tuple(method, source_location)
unusedSet = set() # set of tuple(return_type, name_and_params)
for d in definitionSet:
method = d[0] + " " + d[1]
if method in unusedMethodsExclusionSet:
continue
if d in callSet:
continue
if isOtherConstness(d, callSet):
......@@ -251,8 +168,6 @@ for d in definitionSet:
continue
if d[0] == "basic_ostream<type-parameter-?-?, type-parameter-?-?> &" and d[1].startswith("operator<<(basic_ostream<type-parameter-?-?"):
continue
if "::operator" in d[1]:
continue
location = definitionToSourceLocationMap[d];
# whacky template stuff
......@@ -298,7 +213,7 @@ for d in definitionSet:
if "_get_implementation" in d[1] or "_getFactory" in d[1]:
continue
# the plugin can't see calls to these
if "operator new" in d[1]:
if "::operator new" in d[1]:
continue
# unused return type is not a problem here
if ("operator=(" in d[1] or "operator&=" in d[1] or "operator|=" in d[1] or "operator^=" in d[1]
......
......@@ -2092,20 +2092,6 @@ SvxConfigEntry* SvxMainMenuOrganizerDialog::GetSelectedEntry()
return static_cast<SvxConfigEntry*>(m_pMenuListBox->FirstSelected()->GetUserData());
}
const OUString&
SvxConfigEntry::GetHelpText()
{
if ( aHelpText.isEmpty() )
{
if ( !aCommand.isEmpty() )
{
aHelpText = Application::GetHelp()->GetHelpText( aCommand, nullptr );
}
}
return aHelpText;
}
SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName,
const OUString& rCommandURL, bool bPopup, bool bParentData )
: nId( 1 )
......@@ -2141,21 +2127,11 @@ SvxConfigEntry::~SvxConfigEntry()
}
}
bool SvxConfigEntry::IsMovable()
{
return !IsPopup() || IsMain();
}
bool SvxConfigEntry::IsDeletable()
{
return !IsMain() || IsUserDefined();
}
bool SvxConfigEntry::IsRenamable()
{
return !IsMain() || IsUserDefined();
}
ToolbarSaveInData::ToolbarSaveInData(
const uno::Reference < css::ui::XUIConfigurationManager >& xCfgMgr,
const uno::Reference < css::ui::XUIConfigurationManager >& xParentCfgMgr,
......@@ -2179,60 +2155,6 @@ ToolbarSaveInData::~ToolbarSaveInData()
{
}
void ToolbarSaveInData::SetSystemStyle(
const uno::Reference< frame::XFrame >& xFrame,
const OUString& rResourceURL,
sal_Int32 nStyle )
{
// change the style using the API
SetSystemStyle( rResourceURL, nStyle );
// this code is a temporary hack as the UI is not updating after
// changing the toolbar style via the API
uno::Reference< css::frame::XLayoutManager > xLayoutManager;
vcl::Window *window = nullptr;
uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY );
if ( xPropSet.is() )
{
uno::Any a = xPropSet->getPropertyValue( "LayoutManager" );
a >>= xLayoutManager;
}
if ( xLayoutManager.is() )
{
uno::Reference< css::ui::XUIElement > xUIElement =
xLayoutManager->getElement( rResourceURL );
// check reference before we call getRealInterface. The layout manager
// can only provide references for elements that have been created
// before. It's possible that the current element is not available.
uno::Reference< css::awt::XWindow > xWindow;
if ( xUIElement.is() )
xWindow.set( xUIElement->getRealInterface(), uno::UNO_QUERY );
window = VCLUnoHelper::GetWindow( xWindow ).get();
}
if ( window != nullptr && window->GetType() == WindowType::TOOLBOX )
{
ToolBox* toolbox = static_cast<ToolBox*>(window);
if ( nStyle == 0 )
{
toolbox->SetButtonType();
}
else if ( nStyle == 1 )
{
toolbox->SetButtonType( ButtonType::TEXT );
}
if ( nStyle == 2 )
{
toolbox->SetButtonType( ButtonType::SYMBOLTEXT );
}
}
}
void ToolbarSaveInData::SetSystemStyle(
const OUString& rResourceURL,
sal_Int32 nStyle )
......
......@@ -300,8 +300,6 @@ public:
void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = true; }
bool HasChangedName() const { return bStrEdited; }
const OUString& GetHelpText();
bool IsPopup() const { return bPopUp; }
void SetUserDefined( bool bOn = true ) { bIsUserDefined = bOn; }
......@@ -322,9 +320,7 @@ public:
void SetModified( bool bValue = true ) { bIsModified = bValue; }
bool IsModified() { return bIsModified; }
bool IsMovable();
bool IsDeletable();
bool IsRenamable();
void SetVisible( bool b ) { bIsVisible = b; }
bool IsVisible() const { return bIsVisible; }
......@@ -335,8 +331,6 @@ public:
const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic()
{ return xBackupGraphic; }
bool IsIconModified() { return xBackupGraphic.is(); }
sal_Int32 GetStyle() { return nStyle; }
void SetStyle( sal_Int32 style ) { nStyle = style; }
};
......@@ -567,10 +561,6 @@ public:
void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle );
void SetSystemStyle(
const css::uno::Reference< css::frame::XFrame >& xFrame,
const OUString& rResourceURL, sal_Int32 nStyle );
SvxEntries* GetEntries() override;
void SetEntries( SvxEntries* ) override;
bool HasSettings() override;
......
......@@ -173,8 +173,6 @@ public:
bool bEventMode);
void SetFunctionListBox( SfxConfigFunctionListBox *pBox )
{ pFunctionListBox = pBox; }
void SetImageProvider( SaveInData* provider )
{ m_pImageProvider = provider; }
void GroupSelected();
void SelectMacro( const SfxMacroInfoItem* );
void SelectMacro( const OUString&, const OUString& );
......
......@@ -156,8 +156,6 @@ namespace dbaui
void SetTableName(const OUString &_sTableName){ m_sDefaultTableName = _sTableName ; }
virtual void release() = 0;
void enableCheckOnly() { m_bCheckOnly = true; }
bool isCheckEnabled() const { return m_bCheckOnly; }
......
......@@ -63,8 +63,6 @@ namespace dbaui
bool _bAutoIncrementEnabled);
virtual SvParserState CallParser() override;// base class
virtual void release() override;
///< @attention recovers only valid data if 1. CTOR has been used
};
typedef tools::SvRef<OHTMLReader> OHTMLReaderRef;
......
......@@ -54,9 +54,6 @@ namespace dbaui
bool _bAutoIncrementEnabled);
virtual SvParserState CallParser() override;// base class
/// @note Only recovers correct data if 2. CTOR has been used.
/// Otherwise, the SbaColumnList will be returned without changes
virtual void release() override;
};
typedef tools::SvRef<ORTFReader> ORTFReaderRef;
......
......@@ -503,11 +503,6 @@ void OHTMLReader::setTextEncoding()
ParseMetaOptions(nullptr, nullptr);
}
void OHTMLReader::release()
{
ReleaseRef();
}
TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory()
{
return &OWizHTMLExtend::Create;
......
......@@ -323,11 +323,6 @@ bool ORTFReader::CreateTable(int nToken)
return bOk;
}
void ORTFReader::release()
{
ReleaseRef();
}
TypeSelectionPageFactory ORTFReader::getTypeSelectionPageFactory()
{
return &OWizRTFExtend::Create;
......
......@@ -18,10 +18,6 @@ using namespace css;
namespace editeng
{
CustomPropertyField::CustomPropertyField()
: SvxFieldData()
{}
CustomPropertyField::CustomPropertyField(OUString const & rName, OUString const & rCurrentPresentation)
: SvxFieldData()
, msName(rName)
......
......@@ -104,7 +104,6 @@ SfxPoolItem* SvxFontItem::CreateDefault() {return new SvxFontItem(0);}
SfxPoolItem* SvxPostureItem::CreateDefault() { return new SvxPostureItem(ITALIC_NONE, 0);}
SfxPoolItem* SvxWeightItem::CreateDefault() {return new SvxWeightItem(WEIGHT_NORMAL, 0);}
SfxPoolItem* SvxFontHeightItem::CreateDefault() {return new SvxFontHeightItem(240, 100, 0);}
SfxPoolItem* SvxTextLineItem::CreateDefault() {return new SvxTextLineItem(LINESTYLE_NONE, 0);}
SfxPoolItem* SvxUnderlineItem::CreateDefault() {return new SvxUnderlineItem(LINESTYLE_NONE, 0);}
SfxPoolItem* SvxOverlineItem::CreateDefault() {return new SvxOverlineItem(LINESTYLE_NONE, 0);}
SfxPoolItem* SvxCrossedOutItem::CreateDefault() {return new SvxCrossedOutItem(STRIKEOUT_NONE, 0);}
......
......@@ -30,7 +30,6 @@ private:
OUString msCurrentPresentation;
public:
CustomPropertyField();
explicit CustomPropertyField(OUString const & rName, OUString const & rCurrentPresentation);
virtual ~CustomPropertyField() override;
......
......@@ -34,8 +34,6 @@ class EDITENG_DLLPUBLIC SvxTextLineItem : public SfxEnumItem<FontLineStyle>
{
Color mColor;
public:
static SfxPoolItem* CreateDefault();
SvxTextLineItem( const FontLineStyle eSt,
const sal_uInt16 nId );
......
......@@ -174,7 +174,6 @@ public:
double Dist() const { if(!maImplStyle) return 0.0; return maImplStyle->mfDist; }
double Secn() const { if(!maImplStyle) return 0.0; return maImplStyle->mfSecn; }
double PatternScale() const { if(!maImplStyle) return 1.0; return maImplStyle->mfPatternScale;}
void SetPatternScale( double fScale );
SvxBorderLineStyle Type() const { if(!maImplStyle) return SvxBorderLineStyle::SOLID; return maImplStyle->mnType; }
/// Check if this style is used - this depends on it having any width definition.
......@@ -273,7 +272,6 @@ public:
void sort();
bool empty() const { return maEntries.empty(); }
size_t size() const { return maEntries.size(); }
const std::vector< StyleVectorCombination >& getEntries() const{ return maEntries; }
};
......
......@@ -126,8 +126,6 @@ struct SVX_DLLPUBLIC SvxColumnDescription
long nEndMin; //min. possible position of end
long nEndMax; //max. possible position of end
SvxColumnDescription();
SvxColumnDescription(long start, long end, bool bVis);
SvxColumnDescription(long start, long end,
......
......@@ -103,7 +103,6 @@ public:
static rtl::Reference<SvXMLEmbeddedObjectHelper> Create(
::comphelper::IEmbeddedHelper& rDocPersist,
SvXMLEmbeddedObjectHelperMode eCreateMode );
static void Destroy( SvXMLEmbeddedObjectHelper* pSvXMLEmbeddedObjectHelper );
// XEmbeddedObjectResolver
virtual OUString SAL_CALL resolveEmbeddedObjectURL( const OUString& aURL ) override;
......
......@@ -34,7 +34,6 @@ public:
GraphicNativeTransform(Graphic& rGraphic);
~GraphicNativeTransform();
bool canBeRotated();
bool rotate(sal_uInt16 aRotation);
};
......
......@@ -74,7 +74,6 @@ public:
void dispose();
void requestLegacyContext();
void requestSingleBufferedRendering();
bool init(vcl::Window* pParent = nullptr);
bool init(SystemChildWindow* pChildWindow);
......@@ -151,8 +150,6 @@ public:
void setVCLOnly() { mbVCLOnly = true; }
bool isVCLOnly() { return mbVCLOnly; }
bool supportMultiSampling() const;
virtual SystemWindowData generateWinData(vcl::Window* pParent, bool bRequestLegacyContext);
private:
......
......@@ -66,10 +66,6 @@ private:
ScMemChart* CreateMemChartSingle();
ScMemChart* CreateMemChartMulti();
public:
ScChartArray( ScDocument* pDoc, SCTAB nTab,
SCCOL nStartColP, SCROW nStartRowP,
SCCOL nEndColP, SCROW nEndRowP,
const OUString& rChartName );
ScChartArray( ScDocument* pDoc, const ScRangeListRef& rRangeList,
const OUString& rChartName );
ScChartArray( const ScChartArray& rArr );
......@@ -95,7 +91,6 @@ public:
ScChartCollection();
ScChartCollection(const ScChartCollection& rColl);
SC_DLLPUBLIC void push_back(ScChartArray* p);
void clear();
size_t size() const;
bool empty() const;
......
......@@ -721,8 +721,6 @@ public:
SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
SC_DLLPUBLIC ScChartCollection* GetChartCollection() const { return pChartCollection;}
void StopTemporaryChartLock();
void EnsureGraphicNames();
......@@ -946,7 +944,6 @@ public:
static bool IsChart( const SdrObject* pObject );
SC_DLLPUBLIC void UpdateAllCharts();
void UpdateChartRef( UpdateRefMode eUpdateRefMode,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
......
......@@ -103,85 +103,6 @@ static void lcl_SetChartParameters( const uno::Reference< chart2::data::XDataRec
}
}
// update charts after loading old document
void ScDocument::UpdateAllCharts()
{
if ( !mpDrawLayer || !mpShell )
return;
if (pChartCollection->empty())
return ; // nothing to do
size_t nDataCount = pChartCollection->size();
SCTAB nSize = static_cast<SCTAB>(maTabs.size());
for (SCTAB nTab=0; nTab< nSize; nTab++)
{
if (maTabs[nTab])
{
SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
OSL_ENSURE(pPage,"Page ?");
SdrObjListIter aIter( *pPage, SdrIterMode::DeepNoGroups );
SdrObject* pObject = aIter.Next();
while (pObject)
{
if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
{
uno::Reference< embed::XEmbeddedObject > xIPObj = static_cast<SdrOle2Obj*>(pObject)->GetObjRef();
if ( xIPObj.is() )
{
OUString aIPName = static_cast<SdrOle2Obj*>(pObject)->GetPersistName();
for (size_t nPos = 0; nPos < nDataCount; ++nPos)
{
ScChartArray* pChartObj = (*pChartCollection)[nPos];
if (pChartObj->GetName() == aIPName)
{
ScRangeListRef aRanges = pChartObj->GetRangeList();
OUString sRangeStr;
aRanges->Format( sRangeStr, ScRefFlags::RANGE_ABS_3D, this, GetAddressConvention() );
bool bHasCategories = pChartObj->HasRowHeaders();
bool bFirstCellAsLabel = pChartObj->HasColHeaders();
// Calc -> DataProvider
uno::Reference< chart2::data::XDataProvider > xDataProvider =
new ScChart2DataProvider( this );
// Chart -> DataReceiver
uno::Reference< chart2::data::XDataReceiver > xReceiver;
uno::Reference< embed::XComponentSupplier > xCompSupp( xIPObj, uno::UNO_QUERY );
if( xCompSupp.is())
xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY );
if( xReceiver.is())
{
// connect
xReceiver->attachDataProvider( xDataProvider );
uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier(
mpShell->GetModel(), uno::UNO_QUERY );
xReceiver->attachNumberFormatsSupplier( xNumberFormatsSupplier );
lcl_SetChartParameters( xReceiver, sRangeStr, chart::ChartDataRowSource_COLUMNS,
bHasCategories, bFirstCellAsLabel );
}
ScChartListener* pCL = new ScChartListener(
aIPName, this, pChartObj->GetRangeList() );
pChartListenerCollection->insert( pCL );
pCL->StartListeningTo();
}
}
}
}
pObject = aIter.Next();
}
}
}
pChartCollection->clear();
}
bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName )
{
if (mpDrawLayer && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
......
......@@ -55,15 +55,6 @@ ScMemChart::~ScMemChart()
{
}
ScChartArray::ScChartArray( ScDocument* pDoc, SCTAB nTab,
SCCOL nStartColP, SCROW nStartRowP, SCCOL nEndColP, SCROW nEndRowP,
const OUString& rChartName ) :
aName( rChartName ),
pDocument( pDoc ),
aPositioner(pDoc, nTab, nStartColP, nStartRowP, nEndColP, nEndRowP)
{
}
ScChartArray::ScChartArray(
ScDocument* pDoc, const ScRangeListRef& rRangeList, const OUString& rChartName ) :
aName( rChartName ),
......@@ -416,11 +407,6 @@ ScChartCollection::ScChartCollection(const ScChartCollection& r)
}
}
void ScChartCollection::push_back(ScChartArray* p)
{
m_Data.push_back(std::unique_ptr<ScChartArray>(p));
}
void ScChartCollection::clear()
{
m_Data.clear();
......
......@@ -141,13 +141,11 @@ public:
void insert(index_type nIndex, long nPos);
void removeByIndex(index_type nIndex);
void removeByPosition(long nPos);
void invalidateByIndex(index_type nIndex);
void invalidateByPosition(long nPos);
const value_type& getNearestByIndex(index_type nIndex) const;
const value_type& getNearestByPosition(long nPos) const;
long getPosition(index_type nIndex) const;
index_type getIndex(long nPos) const;
};
class ScViewDataTable // per-sheet data
......
......@@ -134,18 +134,6 @@ void ScPositionHelper::removeByIndex(index_type nIndex)
"ScPositionHelper::remove: after erase: size: " << mData.size());
}
void ScPositionHelper::removeByPosition(long nPos)
{
SAL_INFO("sc.lok.poshelper", "ScPositionHelper::remove: nPos: " << nPos
<< ", size: " << mData.size());
auto it = mData.find(std::make_pair(null, nPos));
if (it == mData.end() || it->first <= 0)
return;
mData.erase(it);
SAL_INFO("sc.lok.poshelper",
"ScPositionHelper::remove: after erase: size: " << mData.size());
}
void ScPositionHelper::invalidateByIndex(index_type nIndex)
{
SAL_INFO("sc.lok.poshelper", "ScPositionHelper::invalidate: nIndex: " << nIndex);
......@@ -243,13 +231,6 @@ long ScPositionHelper::getPosition(index_type nIndex) const
return it->second;
}
ScPositionHelper::index_type ScPositionHelper::getIndex(long nPos) const
{
auto it = mData.find(std::make_pair(null, nPos));
if (it == mData.end()) return null;
return it->first;
}
ScViewDataTable::ScViewDataTable() :
eZoomType( SvxZoomType::PERCENT ),
aZoomX( 1,1 ),
......
......@@ -148,8 +148,6 @@ public:
void InsertMediaURL( const OUString& rMediaURL, sal_Int8& rAction,
const Point& rPos, const Size& rSize,
bool const bLink );
void Insert3DModelURL( const OUString& rModelURL, sal_Int8& rAction,
const Point& rPos, const Size& rSize );
SdrMediaObj* InsertMediaObj( const OUString& rURL, const OUString& rMimeType, sal_Int8& rAction,
const Point& rPos, const Size& rSize );
......
......@@ -86,21 +86,6 @@ Style::Style( const editeng::SvxBorderLine* pBorder, double fScale ) :
}
}
void Style::SetPatternScale( double fScale )
{
if(!maImplStyle)
{
if(rtl::math::approxEqual(1.0, fScale))
{
return;
}
implEnsureImplStyle();
}
maImplStyle->mfPatternScale = fScale;
}
void Style::Clear()
{
if(maImplStyle)
......
......@@ -568,14 +568,6 @@ bool SvxColumnItem::IsLastAct() const
return nActColumn == Count() - 1;
}
SvxColumnDescription::SvxColumnDescription() :
nStart (0),
nEnd (0),