From 32823280efffc02a250fc8d4749b8eb0f491ae77 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 9 Nov 2017 15:47:45 +0200 Subject: loplugin:unusedmethods Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454 Reviewed-on: https://gerrit.libreoffice.org/44553 Tested-by: Jenkins Reviewed-by: Noel Grandin --- avmedia/source/viewer/mediawindow_impl.hxx | 1 - basegfx/source/inc/stringconversiontools.hxx | 8 --- compilerplugins/clang/unusedmethods.cxx | 4 -- compilerplugins/clang/unusedmethods.py | 87 +--------------------------- cui/source/customize/cfg.cxx | 78 ------------------------- cui/source/inc/cfg.hxx | 10 ---- cui/source/inc/cfgutil.hxx | 2 - dbaccess/source/ui/inc/DExport.hxx | 2 - dbaccess/source/ui/inc/HtmlReader.hxx | 2 - dbaccess/source/ui/inc/RtfReader.hxx | 3 - dbaccess/source/ui/misc/HtmlReader.cxx | 5 -- dbaccess/source/ui/misc/RtfReader.cxx | 5 -- editeng/source/items/CustomPropertyField.cxx | 4 -- editeng/source/items/textitem.cxx | 1 - include/editeng/CustomPropertyField.hxx | 1 - include/editeng/udlnitem.hxx | 2 - include/svx/framelink.hxx | 2 - include/svx/rulritem.hxx | 2 - include/svx/xmleohlp.hxx | 1 - include/vcl/GraphicNativeTransform.hxx | 1 - include/vcl/opengl/OpenGLContext.hxx | 3 - sc/inc/chartarr.hxx | 5 -- sc/inc/document.hxx | 3 - sc/source/core/data/documen5.cxx | 79 ------------------------- sc/source/core/tool/chartarr.cxx | 14 ----- sc/source/ui/inc/viewdata.hxx | 2 - sc/source/ui/view/viewdata.cxx | 19 ------ sd/source/ui/inc/View.hxx | 2 - svx/source/dialog/framelink.cxx | 15 ----- svx/source/dialog/rulritem.cxx | 8 --- vcl/source/filter/GraphicNativeTransform.cxx | 16 ----- vcl/source/opengl/OpenGLContext.cxx | 10 ---- 32 files changed, 1 insertion(+), 396 deletions(-) diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx index 2c7d8f33cc81..3b100c36e324 100644 --- a/avmedia/source/viewer/mediawindow_impl.hxx +++ b/avmedia/source/viewer/mediawindow_impl.hxx @@ -61,7 +61,6 @@ class MediaChildWindow : public SystemChildWindow public: explicit MediaChildWindow( vcl::Window* pParent ); - MediaChildWindow( vcl::Window* pParent, SystemWindowData* pData ); protected: diff --git a/basegfx/source/inc/stringconversiontools.hxx b/basegfx/source/inc/stringconversiontools.hxx index f2ccb1ac3324..77489cf00260 100644 --- a/basegfx/source/inc/stringconversiontools.hxx +++ b/basegfx/source/inc/stringconversiontools.hxx @@ -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, diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx index 53514db91cfe..3b7b4cb2a5fb 100644 --- a/compilerplugins/clang/unusedmethods.cxx +++ b/compilerplugins/clang/unusedmethods.cxx @@ -221,10 +221,6 @@ bool UnusedMethods::VisitCallExpr(CallExpr* expr) if (calleeFunctionDecl) goto gotfunc; } - /* - expr->dump(); - throw "Can't touch this"; - */ return true; } diff --git a/compilerplugins/clang/unusedmethods.py b/compilerplugins/clang/unusedmethods.py index fc3b1ab518dc..aaa19abfc8e2 100755 --- a/compilerplugins/clang/unusedmethods.py +++ b/compilerplugins/clang/unusedmethods.py @@ -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 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 > &)", - # debugging methods - "void oox::drawingml::TextParagraphProperties::dump() const", - "void oox::PropertyMap::dumpCode(class com::sun::star::uno::Reference)", - "void oox::PropertyMap::dumpData(class com::sun::star::uno::Reference)", - "class std::basic_string, class std::allocator > 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 std::__debug::vector > > SwSortedObjs::begin() const", - "class __gnu_debug::_Safe_iterator > >, class std::__debug::vector > > 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::XInterface * org_libreoffice_comp_chart2_sidebar_ChartPanelFactory(class com::sun::star::uno::XComponentContext *,const class com::sun::star::uno::Sequence &)", - "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 WordPerfectImportFilterDialog_createInstance(const class com::sun::star::uno::Reference &)", - "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 &)", - "void ExportDOC(const class rtl::OUString &,const class rtl::OUString &,class tools::SvRef &)", - "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 &)", - # called from extensions - "unsigned short MenuBar::AddMenuBarButton(const class Image &,const class Link &,const class rtl::OUString &)", - "void MenuBar::SetMenuBarButtonHighlightHdl(unsigned short,const class Link &)", - "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 &" and d[1].startswith("operator<<(basic_ostream>= 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(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 ) diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 81386ef877b2..836f13ccb32e 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -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; diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index 3b2b190ed26e..4e7dd97cdcb7 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -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& ); diff --git a/dbaccess/source/ui/inc/DExport.hxx b/dbaccess/source/ui/inc/DExport.hxx index 99c0c8053270..40a7a15431ef 100644 --- a/dbaccess/source/ui/inc/DExport.hxx +++ b/dbaccess/source/ui/inc/DExport.hxx @@ -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; } diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx index 3420042f5089..375d04a9803a 100644 --- a/dbaccess/source/ui/inc/HtmlReader.hxx +++ b/dbaccess/source/ui/inc/HtmlReader.hxx @@ -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 OHTMLReaderRef; diff --git a/dbaccess/source/ui/inc/RtfReader.hxx b/dbaccess/source/ui/inc/RtfReader.hxx index 3e9c3badd2d9..9c380d1edd77 100644 --- a/dbaccess/source/ui/inc/RtfReader.hxx +++ b/dbaccess/source/ui/inc/RtfReader.hxx @@ -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 ORTFReaderRef; diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx index 176f9eeab172..9493af953f17 100644 --- a/dbaccess/source/ui/misc/HtmlReader.cxx +++ b/dbaccess/source/ui/misc/HtmlReader.cxx @@ -503,11 +503,6 @@ void OHTMLReader::setTextEncoding() ParseMetaOptions(nullptr, nullptr); } -void OHTMLReader::release() -{ - ReleaseRef(); -} - TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory() { return &OWizHTMLExtend::Create; diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx index 1153352764fa..86cc730bd126 100644 --- a/dbaccess/source/ui/misc/RtfReader.cxx +++ b/dbaccess/source/ui/misc/RtfReader.cxx @@ -323,11 +323,6 @@ bool ORTFReader::CreateTable(int nToken) return bOk; } -void ORTFReader::release() -{ - ReleaseRef(); -} - TypeSelectionPageFactory ORTFReader::getTypeSelectionPageFactory() { return &OWizRTFExtend::Create; diff --git a/editeng/source/items/CustomPropertyField.cxx b/editeng/source/items/CustomPropertyField.cxx index 70a6a40197b2..621272150fac 100644 --- a/editeng/source/items/CustomPropertyField.cxx +++ b/editeng/source/items/CustomPropertyField.cxx @@ -18,10 +18,6 @@ using namespace css; namespace editeng { -CustomPropertyField::CustomPropertyField() - : SvxFieldData() -{} - CustomPropertyField::CustomPropertyField(OUString const & rName, OUString const & rCurrentPresentation) : SvxFieldData() , msName(rName) diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index f8cd6f193301..8623ef42b061 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -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);} diff --git a/include/editeng/CustomPropertyField.hxx b/include/editeng/CustomPropertyField.hxx index 687b4a171375..30f082c5cfd4 100644 --- a/include/editeng/CustomPropertyField.hxx +++ b/include/editeng/CustomPropertyField.hxx @@ -30,7 +30,6 @@ private: OUString msCurrentPresentation; public: - CustomPropertyField(); explicit CustomPropertyField(OUString const & rName, OUString const & rCurrentPresentation); virtual ~CustomPropertyField() override; diff --git a/include/editeng/udlnitem.hxx b/include/editeng/udlnitem.hxx index 94fcfe06f9b8..3c65c015c010 100644 --- a/include/editeng/udlnitem.hxx +++ b/include/editeng/udlnitem.hxx @@ -34,8 +34,6 @@ class EDITENG_DLLPUBLIC SvxTextLineItem : public SfxEnumItem { Color mColor; public: - static SfxPoolItem* CreateDefault(); - SvxTextLineItem( const FontLineStyle eSt, const sal_uInt16 nId ); diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx index 3e4b440fc886..887c512e5433 100644 --- a/include/svx/framelink.hxx +++ b/include/svx/framelink.hxx @@ -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; } }; diff --git a/include/svx/rulritem.hxx b/include/svx/rulritem.hxx index 4ce3bedfcebb..c88ae2711d8b 100644 --- a/include/svx/rulritem.hxx +++ b/include/svx/rulritem.hxx @@ -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, diff --git a/include/svx/xmleohlp.hxx b/include/svx/xmleohlp.hxx index 833db1690784..c96f40c3d75c 100644 --- a/include/svx/xmleohlp.hxx +++ b/include/svx/xmleohlp.hxx @@ -103,7 +103,6 @@ public: static rtl::Reference Create( ::comphelper::IEmbeddedHelper& rDocPersist, SvXMLEmbeddedObjectHelperMode eCreateMode ); - static void Destroy( SvXMLEmbeddedObjectHelper* pSvXMLEmbeddedObjectHelper ); // XEmbeddedObjectResolver virtual OUString SAL_CALL resolveEmbeddedObjectURL( const OUString& aURL ) override; diff --git a/include/vcl/GraphicNativeTransform.hxx b/include/vcl/GraphicNativeTransform.hxx index 08053d416536..1ec965a2d8fd 100644 --- a/include/vcl/GraphicNativeTransform.hxx +++ b/include/vcl/GraphicNativeTransform.hxx @@ -34,7 +34,6 @@ public: GraphicNativeTransform(Graphic& rGraphic); ~GraphicNativeTransform(); - bool canBeRotated(); bool rotate(sal_uInt16 aRotation); }; diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index b638d70ccc36..2df8f8c563fb 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -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: diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx index 57013e9b0034..87b67d5f465b 100644 --- a/sc/inc/chartarr.hxx +++ b/sc/inc/chartarr.hxx @@ -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; diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 31c5e2f4957a..dec590867b13 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -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, diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index 632e58bb1850..254be756e6b5 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -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(maTabs.size()); - for (SCTAB nTab=0; nTab< nSize; nTab++) - { - if (maTabs[nTab]) - { - SdrPage* pPage = mpDrawLayer->GetPage(static_cast(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(pObject)->GetObjRef(); - if ( xIPObj.is() ) - { - OUString aIPName = static_cast(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(maTabs.size()) && maTabs[nTab]) diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx index 64ff0f8aa49e..883a2b7cd622 100644 --- a/sc/source/core/tool/chartarr.cxx +++ b/sc/source/core/tool/chartarr.cxx @@ -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(p)); -} - void ScChartCollection::clear() { m_Data.clear(); diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 7960d19acd43..a87f3dbe6f11 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -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 diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 656af7c880d1..ffe32d905f9a 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -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 ), diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index 1b77b049749b..63b124b33f42 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -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 ); diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index 6ee2988ebcb6..f96c3b5e5f95 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -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) diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index e7426f0e0adc..8dc6c275dec5 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -568,14 +568,6 @@ bool SvxColumnItem::IsLastAct() const return nActColumn == Count() - 1; } -SvxColumnDescription::SvxColumnDescription() : - nStart (0), - nEnd (0), - bVisible (true), - nEndMin (0), - nEndMax (0) -{} - SvxColumnDescription::SvxColumnDescription(long start, long end, bool bVis) : nStart (start), nEnd (end), diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx index 187d3d089a61..4870e7011649 100644 --- a/vcl/source/filter/GraphicNativeTransform.cxx +++ b/vcl/source/filter/GraphicNativeTransform.cxx @@ -34,22 +34,6 @@ GraphicNativeTransform::GraphicNativeTransform(Graphic& rGraphic) : GraphicNativeTransform::~GraphicNativeTransform() {} -bool GraphicNativeTransform::canBeRotated() -{ - GfxLink aLink = mrGraphic.GetLink(); - - // Don't allow rotation on animations for now - if (mrGraphic.IsAnimated()) - { - return false; - } - - return aLink.GetType() == GfxLinkType::NativeJpg - || aLink.GetType() == GfxLinkType::NativePng - || aLink.GetType() == GfxLinkType::NativeGif - || aLink.GetType() == GfxLinkType::NONE; -} - bool GraphicNativeTransform::rotate(sal_uInt16 aInputRotation) { // Rotation can be between 0 and 3600 diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 66cd13bddf29..958c59925db2 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -116,11 +116,6 @@ void OpenGLContext::requestLegacyContext() mbRequestLegacyContext = true; } -void OpenGLContext::requestSingleBufferedRendering() -{ - mbUseDoubleBufferedRendering = false; -} - #ifdef DBG_UTIL namespace { @@ -609,11 +604,6 @@ const SystemChildWindow* OpenGLContext::getChildWindow() const return m_pChildWindow; } -bool OpenGLContext::supportMultiSampling() const -{ - return getOpenGLWindow().bMultiSampleSupported; -} - bool OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer ) { OpenGLZone aZone; -- cgit