sd/inc/unolayer.hxx | 2 sd/inc/unomodel.hxx | 2 sd/source/console/PresenterPaneBorderPainter.cxx | 67 -- sd/source/console/PresenterPaneBorderPainter.hxx | 36 - sd/source/filter/eppt/eppt.cxx | 241 ++++------ sd/source/filter/eppt/eppt.hxx | 2 sd/source/filter/eppt/epptbase.hxx | 7 sd/source/filter/eppt/epptso.cxx | 13 sd/source/filter/eppt/pptx-epptbase.cxx | 32 - sd/source/filter/eppt/pptx-epptooxml.cxx | 176 +++---- sd/source/ui/framework/configuration/ConfigurationController.cxx | 17 sd/source/ui/framework/configuration/ResourceFactoryManager.cxx | 26 - sd/source/ui/framework/configuration/ResourceFactoryManager.hxx | 9 sd/source/ui/framework/factories/FullScreenPane.cxx | 13 sd/source/ui/framework/factories/FullScreenPane.hxx | 2 sd/source/ui/framework/factories/Pane.cxx | 14 sd/source/ui/inc/ViewTabBar.hxx | 29 - sd/source/ui/inc/framework/ConfigurationController.hxx | 7 sd/source/ui/inc/framework/Pane.hxx | 6 sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx | 14 sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx | 3 sd/source/ui/slidesorter/cache/SlsPageCache.cxx | 10 sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx | 12 sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx | 2 sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx | 3 sd/source/ui/view/ViewTabBar.cxx | 38 - solenv/clang-format/excludelist | 2 vcl/unx/generic/dtrans/X11_selection.hxx | 1 28 files changed, 211 insertions(+), 575 deletions(-)
New commits: commit 2edc34a2bb7780f27de59e7d212aaa76e3ea501f Author: Noel Grandin <[email protected]> AuthorDate: Wed Jun 25 13:23:14 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Jun 25 20:48:18 2025 +0200 use more concrete UNO in sd Change-Id: Icc8740b6cf370c53df76ebbdf753782d84856e56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186971 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sd/inc/unolayer.hxx b/sd/inc/unolayer.hxx index 4869e9baae85..d22e4acf47b6 100644 --- a/sd/inc/unolayer.hxx +++ b/sd/inc/unolayer.hxx @@ -25,7 +25,7 @@ #include <comphelper/servicehelper.hxx> #include <rtl/ref.hxx> -#include <unomodel.hxx> +#include "unomodel.hxx" class SdrLayer; class SdLayerManager; diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/inc/unomodel.hxx similarity index 99% rename from sd/source/ui/inc/unomodel.hxx rename to sd/inc/unomodel.hxx index 28f6f9644604..f74dc8eea87a 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/inc/unomodel.hxx @@ -45,7 +45,7 @@ #include <comphelper/servicehelper.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/weakref.hxx> -#include <sddllapi.h> +#include "sddllapi.h" namespace com::sun::star::i18n { class XForbiddenCharacters; } diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 1d7d564de8f6..0e9ff8bb5f5a 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -54,6 +54,7 @@ #include <sdfilter.hxx> #include <memory> #include <utility> +#include <unomodel.hxx> class SfxObjectShell; // complete SfxObjectShell for SaveVBA under -fsanitize=function @@ -67,7 +68,7 @@ using ::com::sun::star::beans::XPropertySet; //============================ PPTWriter ================================== PPTWriter::PPTWriter( rtl::Reference<SotStorage> xSvStorage, - css::uno::Reference< css::frame::XModel > const & rXModel, + rtl::Reference< SdXImpressDocument > const & rXModel, css::uno::Reference< css::task::XStatusIndicator > const & rXStatInd, SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags ) : PPTWriterBase ( rXModel, rXStatInd ), @@ -491,10 +492,8 @@ bool PPTWriter::ImplCreateCurrentUserStream() void PPTWriter::ImplCreateDocumentSummaryInformation() { - uno::Reference<document::XDocumentPropertiesSupplier> xDPS( - mXModel, uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentProperties> xDocProps( - xDPS->getDocumentProperties()); + mXModel->getDocumentProperties()); if (!xDocProps.is()) return; @@ -744,161 +743,153 @@ bool PPTWriter::ImplCreateDocument() } mpPptEscherEx->CloseContainer(); // EPP_SlideListWithText - css::uno::Reference< css::presentation::XPresentationSupplier > - aXPresSupplier( mXModel, css::uno::UNO_QUERY ); - if ( aXPresSupplier.is() ) + css::uno::Reference< css::presentation::XPresentation > aXPresentation( mXModel->getPresentation() ); + if ( aXPresentation.is() ) { - css::uno::Reference< css::presentation::XPresentation > aXPresentation( aXPresSupplier->getPresentation() ); - if ( aXPresentation.is() ) + mXPropSet.set( aXPresentation, css::uno::UNO_QUERY ); + if ( mXPropSet.is() ) { - mXPropSet.set( aXPresentation, css::uno::UNO_QUERY ); - if ( mXPropSet.is() ) + OUString aCustomShow; + sal_uInt32 const nPenColor = 0x1000000; + sal_Int32 const nRestartTime = 0x7fffffff; + sal_Int16 nStartSlide = 0; + sal_Int16 nEndSlide = 0; + sal_uInt32 nFlags = 0; // Bit 0: Auto advance + // Bit 1 Skip builds ( do not allow slide effects ) + // Bit 2 Use slide range + // Bit 3 Use named show + // Bit 4 Browse mode on + // Bit 5 Kiosk mode on + // Bit 6 Skip narration + // Bit 7 loop continuously + // Bit 8 show scrollbar + + if ( ImplGetPropertyValue( u"CustomShow"_ustr ) ) { - OUString aCustomShow; - sal_uInt32 const nPenColor = 0x1000000; - sal_Int32 const nRestartTime = 0x7fffffff; - sal_Int16 nStartSlide = 0; - sal_Int16 nEndSlide = 0; - sal_uInt32 nFlags = 0; // Bit 0: Auto advance - // Bit 1 Skip builds ( do not allow slide effects ) - // Bit 2 Use slide range - // Bit 3 Use named show - // Bit 4 Browse mode on - // Bit 5 Kiosk mode on - // Bit 6 Skip narration - // Bit 7 loop continuously - // Bit 8 show scrollbar - - if ( ImplGetPropertyValue( u"CustomShow"_ustr ) ) + aCustomShow = *o3tl::doAccess<OUString>(mAny); + if ( !aCustomShow.isEmpty() ) { - aCustomShow = *o3tl::doAccess<OUString>(mAny); - if ( !aCustomShow.isEmpty() ) - { - nFlags |= 8; - } + nFlags |= 8; } - if ( ( nFlags & 8 ) == 0 ) + } + if ( ( nFlags & 8 ) == 0 ) + { + if ( ImplGetPropertyValue( u"FirstPage"_ustr ) ) { - if ( ImplGetPropertyValue( u"FirstPage"_ustr ) ) - { - auto aSlideName = o3tl::doAccess<OUString>(mAny); + auto aSlideName = o3tl::doAccess<OUString>(mAny); - std::vector<OUString>::const_iterator pIter = std::find( - maSlideNameList.begin(),maSlideNameList.end(), *aSlideName); + std::vector<OUString>::const_iterator pIter = std::find( + maSlideNameList.begin(),maSlideNameList.end(), *aSlideName); - if (pIter != maSlideNameList.end()) - { - nStartSlide = pIter - maSlideNameList.begin() + 1; - nFlags |= 4; - nEndSlide = static_cast<sal_uInt16>(mnPages); - } + if (pIter != maSlideNameList.end()) + { + nStartSlide = pIter - maSlideNameList.begin() + 1; + nFlags |= 4; + nEndSlide = static_cast<sal_uInt16>(mnPages); } } + } - if ( ImplGetPropertyValue( u"IsAutomatic"_ustr ) ) - { - bool bBool = false; - mAny >>= bBool; - if ( !bBool ) - nFlags |= 1; - } + if ( ImplGetPropertyValue( u"IsAutomatic"_ustr ) ) + { + bool bBool = false; + mAny >>= bBool; + if ( !bBool ) + nFlags |= 1; + } - if ( ImplGetPropertyValue( u"IsEndless"_ustr ) ) - { - bool bBool = false; - mAny >>= bBool; - if ( bBool ) - nFlags |= 0x80; - } - if ( ImplGetPropertyValue( u"IsFullScreen"_ustr ) ) - { - bool bBool = false; - mAny >>= bBool; - if ( !bBool ) - nFlags |= 0x11; - } + if ( ImplGetPropertyValue( u"IsEndless"_ustr ) ) + { + bool bBool = false; + mAny >>= bBool; + if ( bBool ) + nFlags |= 0x80; + } + if ( ImplGetPropertyValue( u"IsFullScreen"_ustr ) ) + { + bool bBool = false; + mAny >>= bBool; + if ( !bBool ) + nFlags |= 0x11; + } - mpPptEscherEx->AddAtom( 80, EPP_SSDocInfoAtom, 1 ); - mpStrm->WriteUInt32( nPenColor ).WriteInt32( nRestartTime ).WriteInt16( nStartSlide ).WriteInt16( nEndSlide ); + mpPptEscherEx->AddAtom( 80, EPP_SSDocInfoAtom, 1 ); + mpStrm->WriteUInt32( nPenColor ).WriteInt32( nRestartTime ).WriteInt16( nStartSlide ).WriteInt16( nEndSlide ); - sal_uInt32 nCustomShowNameLen = aCustomShow.getLength(); - if ( nCustomShowNameLen > 31 ) - nCustomShowNameLen = 31; - if ( nCustomShowNameLen ) // named show identifier + sal_uInt32 nCustomShowNameLen = aCustomShow.getLength(); + if ( nCustomShowNameLen > 31 ) + nCustomShowNameLen = 31; + if ( nCustomShowNameLen ) // named show identifier + { + const sal_Unicode* pCustomShow = aCustomShow.getStr(); + for ( i = 0; i < nCustomShowNameLen; i++ ) { - const sal_Unicode* pCustomShow = aCustomShow.getStr(); - for ( i = 0; i < nCustomShowNameLen; i++ ) - { - mpStrm->WriteUInt16( pCustomShow[ i ] ); - } + mpStrm->WriteUInt16( pCustomShow[ i ] ); } - for ( i = nCustomShowNameLen; i < 32; i++, mpStrm->WriteUInt16( 0 ) ) ; + } + for ( i = nCustomShowNameLen; i < 32; i++, mpStrm->WriteUInt16( 0 ) ) ; - mpStrm->WriteUInt32( nFlags ); - css::uno::Reference< css::presentation::XCustomPresentationSupplier > aXCPSup( mXModel, css::uno::UNO_QUERY ); - if ( aXCPSup.is() ) + mpStrm->WriteUInt32( nFlags ); + css::uno::Reference< css::container::XNameContainer > aXCont( mXModel->getCustomPresentations() ); + if ( aXCont.is() ) + { + const css::uno::Sequence< OUString> aNameSeq( aXCont->getElementNames() ); + if ( aNameSeq.hasElements() ) { - css::uno::Reference< css::container::XNameContainer > aXCont( aXCPSup->getCustomPresentations() ); - if ( aXCont.is() ) + mpPptEscherEx->OpenContainer( EPP_NamedShows ); + sal_uInt32 nCustomShowIndex = 0; + for( OUString const & customShowName : aNameSeq ) { - const css::uno::Sequence< OUString> aNameSeq( aXCont->getElementNames() ); - if ( aNameSeq.hasElements() ) + if ( !customShowName.isEmpty() ) { - mpPptEscherEx->OpenContainer( EPP_NamedShows ); - sal_uInt32 nCustomShowIndex = 0; - for( OUString const & customShowName : aNameSeq ) + mpPptEscherEx->OpenContainer( EPP_NamedShow, nCustomShowIndex++ ); + + sal_uInt32 nNamedShowLen = customShowName.getLength(); + if ( nNamedShowLen > 31 ) + nNamedShowLen = 31; + mpPptEscherEx->AddAtom( nNamedShowLen << 1, EPP_CString ); + const sal_Unicode* pCustomShowName = customShowName.getStr(); + for ( sal_uInt32 k = 0; k < nNamedShowLen; ++k ) + mpStrm->WriteUInt16( pCustomShowName[ k ] ); + mAny = aXCont->getByName( customShowName ); + css::uno::Reference< css::container::XIndexContainer > aXIC; + if ( mAny >>= aXIC ) { - if ( !customShowName.isEmpty() ) + mpPptEscherEx->BeginAtom(); + + sal_Int32 nSlideCount = aXIC->getCount(); + for ( sal_Int32 j = 0; j < nSlideCount; j++ ) // number of slides { - mpPptEscherEx->OpenContainer( EPP_NamedShow, nCustomShowIndex++ ); - - sal_uInt32 nNamedShowLen = customShowName.getLength(); - if ( nNamedShowLen > 31 ) - nNamedShowLen = 31; - mpPptEscherEx->AddAtom( nNamedShowLen << 1, EPP_CString ); - const sal_Unicode* pCustomShowName = customShowName.getStr(); - for ( sal_uInt32 k = 0; k < nNamedShowLen; ++k ) - mpStrm->WriteUInt16( pCustomShowName[ k ] ); - mAny = aXCont->getByName( customShowName ); - css::uno::Reference< css::container::XIndexContainer > aXIC; - if ( mAny >>= aXIC ) + mAny = aXIC->getByIndex( j ); + css::uno::Reference< css::drawing::XDrawPage > aXDrawPage; + if ( mAny >>= aXDrawPage ) { - mpPptEscherEx->BeginAtom(); - - sal_Int32 nSlideCount = aXIC->getCount(); - for ( sal_Int32 j = 0; j < nSlideCount; j++ ) // number of slides + css::uno::Reference< css::container::XNamed > aXName( aXDrawPage, css::uno::UNO_QUERY ); + if ( aXName.is() ) { - mAny = aXIC->getByIndex( j ); - css::uno::Reference< css::drawing::XDrawPage > aXDrawPage; - if ( mAny >>= aXDrawPage ) + OUString aSlideName( aXName->getName() ); + std::vector<OUString>::const_iterator pIter = std::find( + maSlideNameList.begin(),maSlideNameList.end(),aSlideName); + + if (pIter != maSlideNameList.end()) { - css::uno::Reference< css::container::XNamed > aXName( aXDrawPage, css::uno::UNO_QUERY ); - if ( aXName.is() ) - { - OUString aSlideName( aXName->getName() ); - std::vector<OUString>::const_iterator pIter = std::find( - maSlideNameList.begin(),maSlideNameList.end(),aSlideName); - - if (pIter != maSlideNameList.end()) - { - sal_uInt32 nPageNumber = pIter - maSlideNameList.begin(); - mpStrm->WriteUInt32( nPageNumber + 0x100 ); // unique slide id - } - } + sal_uInt32 nPageNumber = pIter - maSlideNameList.begin(); + mpStrm->WriteUInt32( nPageNumber + 0x100 ); // unique slide id } } - mpPptEscherEx->EndAtom( EPP_NamedShowSlides ); } - mpPptEscherEx->CloseContainer(); // EPP_NamedShow } + mpPptEscherEx->EndAtom( EPP_NamedShowSlides ); } - mpPptEscherEx->CloseContainer(); // EPP_NamedShows + mpPptEscherEx->CloseContainer(); // EPP_NamedShow } } + mpPptEscherEx->CloseContainer(); // EPP_NamedShows } } } } + mpPptEscherEx->AddAtom( 0, EPP_EndDocument ); mpPptEscherEx->CloseContainer(); // EPP_Document return true; @@ -1406,7 +1397,9 @@ SAL_DLLPUBLIC_EXPORT bool ExportPPT( const std::vector< css::beans::PropertyValu SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags ) { - PPTWriter aPPTWriter( rSvStorage, rXModel, rXStatInd, pVBA, nCnvrtFlags ); + auto pDoc = dynamic_cast<SdXImpressDocument*>(rXModel.get()); + assert(pDoc); + PPTWriter aPPTWriter( rSvStorage, pDoc, rXStatInd, pVBA, nCnvrtFlags ); aPPTWriter.exportPPT(rMediaData); bool bStatus = aPPTWriter.IsValid(); return bStatus; diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index 90a25eabae18..33bb5a77bb04 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -221,7 +221,7 @@ class PPTWriter final : public PPTWriterBase, public PPTExBulletProvider public: PPTWriter( rtl::Reference<SotStorage> xSvStorage, - css::uno::Reference< css::frame::XModel > const & rModel, + rtl::Reference< SdXImpressDocument > const & rModel, css::uno::Reference< css::task::XStatusIndicator > const & rStatInd, SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags ); diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index 70bcd3a4b6ce..ef02eb30bc7e 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -48,6 +48,7 @@ namespace com::sun::star::drawing { class XShape; } namespace com::sun::star::drawing { class XShapes; } class VirtualDevice; +class SdXImpressDocument; // PLACEMENT_ID enum class EppLayout @@ -320,13 +321,11 @@ class PPTExStyleSheet class PPTWriterBase : public PropValue, public GroupTable { protected: - css::uno::Reference< css::frame::XModel > mXModel; + rtl::Reference< SdXImpressDocument > mXModel; css::uno::Reference< css::task::XStatusIndicator > mXStatusIndicator; bool mbStatusIndicator; - css::uno::Reference< css::drawing::XDrawPagesSupplier > mXDrawPagesSupplier; - css::uno::Reference< css::drawing::XMasterPagesSupplier > mXMasterPagesSupplier; css::uno::Reference< css::drawing::XDrawPages > mXDrawPages; css::uno::Reference< css::drawing::XDrawPage > mXDrawPage; css::uno::Reference< css::beans::XPropertySet > mXPagePropSet; @@ -382,7 +381,7 @@ protected: public: PPTWriterBase(); - PPTWriterBase( const css::uno::Reference< css::frame::XModel > & rModel, + PPTWriterBase( const rtl::Reference< SdXImpressDocument > & rModel, const css::uno::Reference< css::task::XStatusIndicator > & rStatInd ); virtual ~PPTWriterBase(); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index ffec0145717c..b3e1711e8f52 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -56,6 +56,7 @@ #include <com/sun/star/table/XCellRange.hpp> #include <oox/ole/olehelper.hxx> #include <i18nlangtag/languagetag.hxx> +#include <unomodel.hxx> using namespace ::com::sun::star; @@ -1196,15 +1197,11 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u nParaFlags >>= 16; sal_Int32 nDefaultTabSizeSrc = 2011; // I've no idea where this number came from, honestly - const uno::Reference< beans::XPropertySet > xPropSet( mXModel, uno::UNO_QUERY ); - if ( xPropSet.is() ) + if(ImplGetPropertyValue( mXModel, u"TabStop"_ustr )) { - if(ImplGetPropertyValue( xPropSet, u"TabStop"_ustr )) - { - sal_Int32 nTabStop( 0 ); - if ( mAny >>= nTabStop ) - nDefaultTabSizeSrc = nTabStop; - } + sal_Int32 nTabStop( 0 ); + if ( mAny >>= nTabStop ) + nDefaultTabSizeSrc = nTabStop; } const sal_uInt32 nDefaultTabSize = MapSize( awt::Size( nDefaultTabSizeSrc, 1 ) ).Width; sal_uInt32 nDefaultTabs = std::abs( maRect.GetWidth() ) / nDefaultTabSize; diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index c548ff09f1d9..b1eb2675b944 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -46,7 +46,7 @@ #include <com/sun/star/style/XStyle.hpp> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> - +#include <unomodel.hxx> using namespace com::sun::star; @@ -116,7 +116,7 @@ PPTWriterBase::PPTWriterBase() SAL_INFO("sd.eppt", "PPTWriterBase::PPTWriterBase()"); } -PPTWriterBase::PPTWriterBase( const Reference< XModel > & rXModel, +PPTWriterBase::PPTWriterBase( const rtl::Reference< SdXImpressDocument > & rXModel, const Reference< XStatusIndicator > & rXStatInd ) : mXModel(rXModel) , mXStatusIndicator(rXStatInd) @@ -220,18 +220,11 @@ bool PPTWriterBase::InitSOIface() { while( true ) { - mXDrawPagesSupplier.set( mXModel, UNO_QUERY ); - if ( !mXDrawPagesSupplier.is() ) - break; - - mXMasterPagesSupplier.set( mXModel, UNO_QUERY ); - if ( !mXMasterPagesSupplier.is() ) - break; - mXDrawPages = mXMasterPagesSupplier->getMasterPages(); + mXDrawPages = mXModel->getMasterPages(); if ( !mXDrawPages.is() ) break; mnMasterPages = mXDrawPages->getCount(); - mXDrawPages = mXDrawPagesSupplier->getDrawPages(); + mXDrawPages = mXModel->getDrawPages(); if( !mXDrawPages.is() ) break; mnPages = mXDrawPages->getCount(); @@ -254,7 +247,7 @@ bool PPTWriterBase::GetPageByIndex( sal_uInt32 nIndex, PageType ePageType ) case NORMAL : case NOTICE : { - mXDrawPages = mXDrawPagesSupplier->getDrawPages(); + mXDrawPages = mXModel->getDrawPages(); if( !mXDrawPages.is() ) return false; } @@ -262,7 +255,7 @@ bool PPTWriterBase::GetPageByIndex( sal_uInt32 nIndex, PageType ePageType ) case MASTER : { - mXDrawPages = mXMasterPagesSupplier->getMasterPages(); + mXDrawPages = mXModel->getMasterPages(); if( !mXDrawPages.is() ) return false; } @@ -485,13 +478,7 @@ bool PPTWriterBase::GetStyleSheets() Reference< XNameAccess > aXNameAccess; - Reference< XStyleFamiliesSupplier > - aXStyleFamiliesSupplier( mXModel, UNO_QUERY ); - - Reference< XPropertySet > - aXPropSet( mXModel, UNO_QUERY ); - - sal_uInt16 nDefaultTab = ( aXPropSet.is() && ImplGetPropertyValue( aXPropSet, u"TabStop"_ustr ) ) + sal_uInt16 nDefaultTab = ( mXModel.is() && ImplGetPropertyValue( mXModel, u"TabStop"_ustr ) ) ? static_cast<sal_uInt16>( convertMm100ToMasterUnit(*o3tl::doAccess<sal_Int32>(mAny)) ) : 1250; @@ -500,10 +487,9 @@ bool PPTWriterBase::GetStyleSheets() if ( GetPageByIndex( nPageNum, MASTER ) ) aXNamed.set( mXDrawPage, UNO_QUERY ); - if ( aXStyleFamiliesSupplier.is() ) - aXNameAccess = aXStyleFamiliesSupplier->getStyleFamilies(); + aXNameAccess = mXModel->getStyleFamilies(); - bRetValue = aXNamed.is() && aXNameAccess.is() && aXStyleFamiliesSupplier.is(); + bRetValue = aXNamed.is() && aXNameAccess.is(); if ( bRetValue ) { for ( nInstance = EPP_TEXTTYPE_Title; nInstance <= EPP_TEXTTYPE_CenterTitle; nInstance++ ) diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index d4886de41a25..2174b6c32ebe 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -398,14 +398,12 @@ PowerPointExport::~PowerPointExport() void PowerPointExport::writeDocumentProperties() { - uno::Reference<document::XDocumentPropertiesSupplier> xDPS(mXModel, uno::UNO_QUERY); - uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties(); + uno::Reference<document::XDocumentProperties> xDocProps = mXModel->getDocumentProperties(); if (xDocProps.is()) { bool bSecurityOptOpenReadOnly = false; - uno::Reference< lang::XMultiServiceFactory > xFactory(mXModel, uno::UNO_QUERY); - uno::Reference< beans::XPropertySet > xSettings(xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY); + uno::Reference< beans::XPropertySet > xSettings(mXModel->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY); try { xSettings->getPropertyValue(u"LoadReadonly"_ustr) >>= bSecurityOptOpenReadOnly; @@ -439,7 +437,9 @@ bool PowerPointExport::exportDocument() maShapeMap.clear(); - mXModel = getModel(); + auto pDoc = dynamic_cast<SdXImpressDocument*>(getModel().get()); + assert(pDoc); + mXModel = pDoc; //write document properties writeDocumentProperties(); @@ -669,10 +669,7 @@ std::unordered_set<OUString> PowerPointExport::getUsedFontList() { std::unordered_set<OUString> aReturnSet; - SdDrawDocument* pDocument = nullptr; - if (auto* pSdXImpressDocument = dynamic_cast<SdXImpressDocument*>(mXModel.get())) - pDocument = pSdXImpressDocument->GetDoc(); - + SdDrawDocument* pDocument = mXModel->GetDoc(); if (!pDocument) return aReturnSet; @@ -701,12 +698,8 @@ void PowerPointExport::WriteEmbeddedFontList() std::vector<EmbeddedFont> aEmbeddedFontInfo; - uno::Reference<beans::XPropertySet> xProperties(mXModel, UNO_QUERY); - if (!xProperties.is()) - return; - uno::Sequence<uno::Any> aAnySeq; - if (!(xProperties->getPropertyValue("Fonts") >>= aAnySeq)) + if (!(mXModel->getPropertyValue("Fonts") >>= aAnySeq)) return; if (aAnySeq.getLength() % 5 != 0) @@ -883,15 +876,13 @@ void PowerPointExport::WriteEmbeddedFontList() void PowerPointExport::WriteCustomSlideShow() { - Reference<XCustomPresentationSupplier> aXCPSup(mXModel, css::uno::UNO_QUERY); - if (!aXCPSup.is() || !aXCPSup->getCustomPresentations()->hasElements()) + if (!mXModel->getCustomPresentations()->hasElements()) return; mPresentationFS->startElementNS(XML_p, XML_custShowLst); - Reference<XDrawPagesSupplier> xDPS(getModel(), uno::UNO_QUERY_THROW); - Reference<XDrawPages> xDrawPages(xDPS->getDrawPages(), uno::UNO_SET_THROW); - Reference<XNameContainer> aXNameCont(aXCPSup->getCustomPresentations()); + Reference<XDrawPages> xDrawPages(mXModel->getDrawPages(), uno::UNO_SET_THROW); + Reference<XNameContainer> aXNameCont(mXModel->getCustomPresentations()); const Sequence<OUString> aNameSeq(aXNameCont->getElementNames()); OUString sRelId; @@ -1448,11 +1439,7 @@ sal_Int32 PowerPointExport::GetAuthorIdAndLastIndex(const OUString& sAuthor, void PowerPointExport::WritePresentationProps() { - Reference<XPresentationSupplier> xPresentationSupplier(mXModel, uno::UNO_QUERY); - if (!xPresentationSupplier.is()) - return; - - Reference<beans::XPropertySet> xPresentationProps(xPresentationSupplier->getPresentation(), + Reference<beans::XPropertySet> xPresentationProps(mXModel->getPresentation(), uno::UNO_QUERY); bool bEndlessVal = xPresentationProps->getPropertyValue(u"IsEndless"_ustr).get<bool>(); bool bChangeManually = xPresentationProps->getPropertyValue(u"IsAutomatic"_ustr).get<bool>(); @@ -1472,8 +1459,7 @@ void PowerPointExport::WritePresentationProps() XML_useTimings, sax_fastparser::UseIf("0", bChangeManually), XML_showNarration, "1"); - Reference<drawing::XDrawPagesSupplier> xDPS(mXModel, uno::UNO_QUERY_THROW); - Reference<drawing::XDrawPages> xDrawPages(xDPS->getDrawPages(), uno::UNO_SET_THROW); + Reference<drawing::XDrawPages> xDrawPages(mXModel->getDrawPages(), uno::UNO_SET_THROW); if (!sFirstPage.isEmpty()) { sal_Int32 nStartSlide = 1; @@ -1496,10 +1482,8 @@ void PowerPointExport::WritePresentationProps() if (!sCustomShow.isEmpty()) { - css::uno::Reference<css::presentation::XCustomPresentationSupplier> - XCustPresentationSupplier(mXModel, css::uno::UNO_QUERY_THROW); css::uno::Reference<css::container::XNameContainer> mxCustShows; - mxCustShows = XCustPresentationSupplier->getCustomPresentations(); + mxCustShows = mXModel->getCustomPresentations(); const css::uno::Sequence<OUString> aNameSeq(mxCustShows->getElementNames()); sal_Int32 nCustShowIndex = 0; @@ -1608,11 +1592,7 @@ void PowerPointExport::WriteVBA() if (!mbPptm) return; - uno::Reference<document::XStorageBasedDocument> xStorageBasedDocument(getModel(), uno::UNO_QUERY); - if (!xStorageBasedDocument.is()) - return; - - uno::Reference<embed::XStorage> xDocumentStorage = xStorageBasedDocument->getDocumentStorage(); + uno::Reference<embed::XStorage> xDocumentStorage = mXModel->getDocumentStorage(); OUString aMacrosName(u"_MS_VBA_Macros"_ustr); if (!xDocumentStorage.is() || !xDocumentStorage->hasByName(aMacrosName)) return; @@ -1635,9 +1615,8 @@ void PowerPointExport::WriteModifyVerifier() try { - Reference<lang::XMultiServiceFactory> xFactory(mXModel, UNO_QUERY); Reference<XPropertySet> xDocSettings( - xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), UNO_QUERY); + mXModel->createInstance(u"com.sun.star.document.Settings"_ustr), UNO_QUERY); xDocSettings->getPropertyValue(u"ModifyPasswordInfo"_ustr) >>= aInfo; } catch (const Exception&) @@ -1900,7 +1879,7 @@ static bool lcl_ComparePageProperties(SdrPage* pMasterPage, SdrPage* pMasterNext void PowerPointExport::FindEquivalentMasterPages() { css::uno::Reference<css::drawing::XDrawPages> xDrawPages( - mXMasterPagesSupplier->getMasterPages()); + mXModel->getMasterPages()); maMastersLayouts.resize(mnMasterPages); maEquivalentMasters.resize(mnMasterPages, SAL_MAX_UINT32); for (sal_uInt32 i = 0; i < mnMasterPages; i++) @@ -2033,77 +2012,73 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro pFS->endElementNS(XML_p, XML_cSld); - css::uno::Reference< css::beans::XPropertySet > xDocPropSet(getModel(), uno::UNO_QUERY); - if (xDocPropSet.is()) - { - uno::Sequence<beans::PropertyValue> aGrabBag; - if (xDocPropSet->getPropertySetInfo()->hasPropertyByName(u"InteropGrabBag"_ustr)) - xDocPropSet->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag; + uno::Sequence<beans::PropertyValue> aGrabBag; + if (mXModel->getPropertySetInfo()->hasPropertyByName(u"InteropGrabBag"_ustr)) + mXModel->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag; - std::vector<OUString> aClrMap; - aClrMap.reserve(12); - uno::Sequence<beans::PropertyValue> aClrMapPropValue; - if(aGrabBag.hasElements()) + std::vector<OUString> aClrMap; + aClrMap.reserve(12); + uno::Sequence<beans::PropertyValue> aClrMapPropValue; + if(aGrabBag.hasElements()) + { + for (const auto& rProp : aGrabBag) { - for (const auto& rProp : aGrabBag) + if (rProp.Name == "OOXColorMap") { - if (rProp.Name == "OOXColorMap") - { - rProp.Value >>= aClrMapPropValue; - break; - } + rProp.Value >>= aClrMapPropValue; + break; } } + } - if (aClrMapPropValue.getLength()) + if (aClrMapPropValue.getLength()) + { + OUString sName; + sal_Int32 nToken = XML_TOKEN_INVALID; + for(const auto& item : aClrMapPropValue) { - OUString sName; - sal_Int32 nToken = XML_TOKEN_INVALID; - for(const auto& item : aClrMapPropValue) + item.Value >>= nToken; + switch (nToken) { - item.Value >>= nToken; - switch (nToken) - { - case XML_dk1: sName = u"dk1"_ustr; break; - case XML_lt1: sName = u"lt1"_ustr; break; - case XML_dk2: sName = u"dk2"_ustr; break; - case XML_lt2: sName = u"lt2"_ustr; break; - case XML_accent1: sName = u"accent1"_ustr; break; - case XML_accent2: sName = u"accent2"_ustr; break; - case XML_accent3: sName = u"accent3"_ustr; break; - case XML_accent4: sName = u"accent4"_ustr; break; - case XML_accent5: sName = u"accent5"_ustr; break; - case XML_accent6: sName = u"accent6"_ustr; break; - case XML_hlink: sName = u"hlink"_ustr; break; - case XML_folHlink: sName = u"folHlink"_ustr; break; - } - aClrMap.push_back(sName); + case XML_dk1: sName = u"dk1"_ustr; break; + case XML_lt1: sName = u"lt1"_ustr; break; + case XML_dk2: sName = u"dk2"_ustr; break; + case XML_lt2: sName = u"lt2"_ustr; break; + case XML_accent1: sName = u"accent1"_ustr; break; + case XML_accent2: sName = u"accent2"_ustr; break; + case XML_accent3: sName = u"accent3"_ustr; break; + case XML_accent4: sName = u"accent4"_ustr; break; + case XML_accent5: sName = u"accent5"_ustr; break; + case XML_accent6: sName = u"accent6"_ustr; break; + case XML_hlink: sName = u"hlink"_ustr; break; + case XML_folHlink: sName = u"folHlink"_ustr; break; } - assert(aClrMap.size() == 12 && "missing entries for ClrMap"); + aClrMap.push_back(sName); } - else - { - // default clrMap to export ".odp" files to ".pptx" - aClrMap = { u"lt1"_ustr, u"dk1"_ustr, u"lt2"_ustr, u"dk2"_ustr, - u"accent1"_ustr, u"accent2"_ustr, u"accent3"_ustr, u"accent4"_ustr, - u"accent5"_ustr, u"accent6"_ustr, u"hlink"_ustr, u"folHlink"_ustr }; - } - - pFS->singleElementNS(XML_p, XML_clrMap, - XML_bg1, aClrMap[0], - XML_tx1, aClrMap[1], - XML_bg2, aClrMap[2], - XML_tx2, aClrMap[3], - XML_accent1, aClrMap[4], - XML_accent2, aClrMap[5], - XML_accent3, aClrMap[6], - XML_accent4, aClrMap[7], - XML_accent5, aClrMap[8], - XML_accent6, aClrMap[9], - XML_hlink, aClrMap[10], - XML_folHlink, aClrMap[11]); + assert(aClrMap.size() == 12 && "missing entries for ClrMap"); + } + else + { + // default clrMap to export ".odp" files to ".pptx" + aClrMap = { u"lt1"_ustr, u"dk1"_ustr, u"lt2"_ustr, u"dk2"_ustr, + u"accent1"_ustr, u"accent2"_ustr, u"accent3"_ustr, u"accent4"_ustr, + u"accent5"_ustr, u"accent6"_ustr, u"hlink"_ustr, u"folHlink"_ustr }; } + pFS->singleElementNS(XML_p, XML_clrMap, + XML_bg1, aClrMap[0], + XML_tx1, aClrMap[1], + XML_bg2, aClrMap[2], + XML_tx2, aClrMap[3], + XML_accent1, aClrMap[4], + XML_accent2, aClrMap[5], + XML_accent3, aClrMap[6], + XML_accent4, aClrMap[7], + XML_accent5, aClrMap[8], + XML_accent6, aClrMap[9], + XML_hlink, aClrMap[10], + XML_folHlink, aClrMap[11]); + // use master's id type as they have same range, mso does that as well pFS->startElementNS(XML_p, XML_sldLayoutIdLst); @@ -2197,8 +2172,7 @@ void PowerPointExport::ImplWritePPTXLayout(sal_Int32 nOffset, sal_uInt32 nMaster { SAL_INFO("sd.eppt", "write layout: " << nOffset); - Reference< drawing::XDrawPagesSupplier > xDPS(getModel(), uno::UNO_QUERY); - Reference< drawing::XDrawPages > xDrawPages = xDPS->getDrawPages(); + Reference< drawing::XDrawPages > xDrawPages = mXModel->getDrawPages(); Reference< drawing::XDrawPage > xSlide = xDrawPages->insertNewByIndex(xDrawPages->getCount()); #if OSL_DEBUG_LEVEL >= 2 @@ -2780,11 +2754,7 @@ void PowerPointExport::embedEffectAudio(const FSHelperPtr& pFS, const OUString& { if (sUrl.startsWith("vnd.sun.star.Package:")) { - uno::Reference<document::XStorageBasedDocument> xStorageBasedDocument(getModel(), uno::UNO_QUERY); - if (!xStorageBasedDocument.is()) - return; - - uno::Reference<embed::XStorage> xDocumentStorage = xStorageBasedDocument->getDocumentStorage(); + uno::Reference<embed::XStorage> xDocumentStorage = mXModel->getDocumentStorage(); if (!xDocumentStorage.is()) return; diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 04939eca45d2..a9ca8d18a8de 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -9242,6 +9242,7 @@ sd/inc/strings.hxx sd/inc/undo/undofactory.hxx sd/inc/undo/undomanager.hxx sd/inc/unolayer.hxx +sd/inc/unomodel.hxx sd/qa/unit/SVGExportTests.cxx sd/qa/unit/activex-controls-tests.cxx sd/qa/unit/dialogs-test.cxx @@ -9699,7 +9700,6 @@ sd/source/ui/inc/undopage.hxx sd/source/ui/inc/unmodpg.hxx sd/source/ui/inc/unmovss.hxx sd/source/ui/inc/unoaprms.hxx -sd/source/ui/inc/unomodel.hxx sd/source/ui/inc/unopage.hxx sd/source/ui/inc/unoprnms.hxx sd/source/ui/inc/unosrch.hxx commit 543f403a14d20f1291f307033d680400a96a795c Author: Noel Grandin <[email protected]> AuthorDate: Wed Jun 25 12:38:02 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Jun 25 20:48:09 2025 +0200 loplugin:unusedmethods most of this is as a consequence of my recent removal of UNO API in offapi/../drawing/framework Change-Id: I702f2e5f2b30a7689e039c9e4d7a8b2771320957 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186969 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sd/source/console/PresenterPaneBorderPainter.cxx b/sd/source/console/PresenterPaneBorderPainter.cxx index f98d9006e39a..056c76b7d44c 100644 --- a/sd/source/console/PresenterPaneBorderPainter.cxx +++ b/sd/source/console/PresenterPaneBorderPainter.cxx @@ -114,8 +114,6 @@ public: const awt::Rectangle& rOuterBox, const OUString& rsPaneStyleName); std::shared_ptr<RendererPaneStyle> GetRendererPaneStyle (const OUString& rsResourceURL); - void SetCalloutAnchor ( - const awt::Point& rCalloutAnchor); private: std::shared_ptr<PresenterTheme> mpTheme; @@ -209,64 +207,6 @@ void PresenterPaneBorderPainter::paintBorder ( rsPaneBorderStyleName); } -void PresenterPaneBorderPainter::paintBorderWithCallout ( - const OUString& rsPaneBorderStyleName, - const css::uno::Reference<css::rendering::XCanvas>& rxCanvas, - const css::awt::Rectangle& rOuterBorderRectangle, - const css::awt::Rectangle& rRepaintArea, - const OUString& rsTitle, - const css::awt::Point& rCalloutAnchor) -{ - ThrowIfDisposed(); - - // Early reject paints completely outside the repaint area. - if (rRepaintArea.X >= rOuterBorderRectangle.X+rOuterBorderRectangle.Width - || rRepaintArea.Y >= rOuterBorderRectangle.Y+rOuterBorderRectangle.Height - || rRepaintArea.X+rRepaintArea.Width <= rOuterBorderRectangle.X - || rRepaintArea.Y+rRepaintArea.Height <= rOuterBorderRectangle.Y) - { - return; - } - ProvideTheme(rxCanvas); - - if (mpRenderer == nullptr) - return; - - mpRenderer->SetCanvas(rxCanvas); - mpRenderer->SetupClipping( - rRepaintArea, - rOuterBorderRectangle, - rsPaneBorderStyleName); - mpRenderer->SetCalloutAnchor(rCalloutAnchor); - mpRenderer->PaintBorder( - rsTitle, - rOuterBorderRectangle, - rRepaintArea, - rsPaneBorderStyleName); -} - -awt::Point PresenterPaneBorderPainter::getCalloutOffset ( - const OUString& rsPaneBorderStyleName) -{ - ThrowIfDisposed(); - ProvideTheme(); - if (mpRenderer != nullptr) - { - const std::shared_ptr<RendererPaneStyle> pRendererPaneStyle( - mpRenderer->GetRendererPaneStyle(rsPaneBorderStyleName)); - if (pRendererPaneStyle != nullptr && pRendererPaneStyle->mpBottomCallout) - { - return awt::Point ( - 0, - pRendererPaneStyle->mpBottomCallout->mnHeight - - pRendererPaneStyle->mpBottomCallout->mnYHotSpot); - } - } - - return awt::Point(0,0); -} - - bool PresenterPaneBorderPainter::ProvideTheme (const Reference<rendering::XCanvas>& rxCanvas) { bool bModified (false); @@ -550,13 +490,6 @@ std::shared_ptr<RendererPaneStyle> return std::shared_ptr<RendererPaneStyle>(); } -void PresenterPaneBorderPainter::Renderer::SetCalloutAnchor ( - const awt::Point& rCalloutAnchor) -{ - mbHasCallout = true; - maCalloutAnchor = rCalloutAnchor; -} - void PresenterPaneBorderPainter::Renderer::PaintBitmap( const awt::Rectangle& rBox, const awt::Rectangle& rUpdateBox, diff --git a/sd/source/console/PresenterPaneBorderPainter.hxx b/sd/source/console/PresenterPaneBorderPainter.hxx index 81c8c0d162cb..6b3f6b57bdb8 100644 --- a/sd/source/console/PresenterPaneBorderPainter.hxx +++ b/sd/source/console/PresenterPaneBorderPainter.hxx @@ -150,42 +150,6 @@ public: const css::awt::Rectangle& rRepaintArea, const OUString& rsTitle); - /** Paint the border around a pane where the border includes a call out - that is anchored at the given point. Most arguments have the same - meaning as in the paintBorder(). - - @see paintBorder - - @param sPaneBorderStyleName - See description in #paintBorder. - @param xCanvas - See description in #paintBorder. - @param aOuterBorderRectangle - See description in #paintBorder. - @param aRepaintArea - See description in #paintBorder. - @param sTitle - See description in #paintBorder. - @param aCalloutAnchor - The anchor point of the call out. It is usually located outside - the border. - */ - void paintBorderWithCallout ( - const OUString& rsPaneBorderStyleName, - const css::uno::Reference<css::rendering::XCanvas>& rxCanvas, - const css::awt::Rectangle& rOuterBorderRectangle, - const css::awt::Rectangle& rRepaintArea, - const OUString& rsTitle, - const css::awt::Point& rCalloutAnchor); - - /** Return the offset of a call out anchor with respect to the outer - border. This value is used when the call out is realized by a fixed - bitmap in order to determine the size and/or location of the outer - border for a given call out. - */ - css::awt::Point getCalloutOffset ( - const OUString& rsPaneBorderStyleName); - private: css::uno::Reference<css::uno::XComponentContext> mxContext; std::shared_ptr<PresenterTheme> mpTheme; diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx index 3c7fe0c90940..151967405133 100644 --- a/sd/source/ui/framework/configuration/ConfigurationController.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx @@ -447,14 +447,6 @@ void ConfigurationController::addResourceFactory( mpImplementation->mpResourceFactoryContainer->AddFactory(sResourceURL, rxResourceFactory); } -void ConfigurationController::removeResourceFactoryForURL( - const OUString& sResourceURL) -{ - ::osl::MutexGuard aGuard (m_aMutex); - ThrowIfDisposed(); - mpImplementation->mpResourceFactoryContainer->RemoveFactoryForURL(sResourceURL); -} - void ConfigurationController::removeResourceFactoryForReference( const rtl::Reference<ResourceFactory>& rxResourceFactory) { @@ -463,15 +455,6 @@ void ConfigurationController::removeResourceFactoryForReference( mpImplementation->mpResourceFactoryContainer->RemoveFactoryForReference(rxResourceFactory); } -rtl::Reference<ResourceFactory> ConfigurationController::getResourceFactory ( - const OUString& sResourceURL) -{ - ::osl::MutexGuard aGuard (m_aMutex); - ThrowIfDisposed(); - - return mpImplementation->mpResourceFactoryContainer->GetFactory(sResourceURL); -} - void ConfigurationController::ThrowIfDisposed () const { if (mbIsDisposed) diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx index f2cfc57e4e82..f2f0bbf26dd5 100644 --- a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx +++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx @@ -90,32 +90,6 @@ void ResourceFactoryManager::AddFactory ( } } -void ResourceFactoryManager::RemoveFactoryForURL ( - const OUString& rsURL) -{ - if (rsURL.isEmpty()) - throw lang::IllegalArgumentException(); - - std::scoped_lock aGuard (maMutex); - - FactoryMap::iterator iFactory (maFactoryMap.find(rsURL)); - if (iFactory != maFactoryMap.end()) - { - maFactoryMap.erase(iFactory); - } - else - { - // The URL may be a pattern. Look that up. - auto iPattern = std::find_if(maFactoryPatternList.begin(), maFactoryPatternList.end(), - [&rsURL](const FactoryPatternList::value_type& rPattern) { return rPattern.first == rsURL; }); - if (iPattern != maFactoryPatternList.end()) - { - // Found the pattern. Remove it. - maFactoryPatternList.erase(iPattern); - } - } -} - void ResourceFactoryManager::RemoveFactoryForReference( const rtl::Reference<ResourceFactory>& rxFactory) { diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx index 9efb82c224cf..03b6b80ab8ca 100644 --- a/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx +++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx @@ -56,15 +56,6 @@ public: const OUString& rsURL, const rtl::Reference<sd::framework::ResourceFactory>& rxFactory); - /** Unregister the specified factory. - @param rsURL - Unregister only the factory for this URL. When the same factory - is registered for other URLs then these remain registered. - @throws css::uno::RuntimeException - */ - void RemoveFactoryForURL( - const OUString& rsURL); - /** Unregister the specified factory. @param rxFactory Unregister the this factory for all URLs that it has been diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx index 6c90b827ec08..918c59eff5fa 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.cxx +++ b/sd/source/ui/framework/factories/FullScreenPane.cxx @@ -119,19 +119,6 @@ void FullScreenPane::disposing(std::unique_lock<std::mutex>& l) FrameWindowPane::disposing(l); } -bool FullScreenPane::isVisible() -{ - { - std::unique_lock aGuard (m_aMutex); - throwIfDisposed(aGuard); - } - - if (mpWindow != nullptr) - return mpWindow->IsReallyVisible(); - else - return false; -} - void FullScreenPane::setVisible (const bool bIsVisible) { { diff --git a/sd/source/ui/framework/factories/FullScreenPane.hxx b/sd/source/ui/framework/factories/FullScreenPane.hxx index 780272412bfc..662e0273107d 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.hxx +++ b/sd/source/ui/framework/factories/FullScreenPane.hxx @@ -59,8 +59,6 @@ public: virtual void disposing(std::unique_lock<std::mutex>&) override; - virtual bool isVisible() override; - virtual void setVisible (bool bIsVisible) override; DECL_LINK(WindowEventHandler, VclWindowEvent&, void); diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx index 3cc71aefe5a0..ec2f9a91e0f4 100644 --- a/sd/source/ui/framework/factories/Pane.cxx +++ b/sd/source/ui/framework/factories/Pane.cxx @@ -82,20 +82,6 @@ Reference<rendering::XCanvas> Pane::getCanvas() return mxCanvas; } -bool Pane::isVisible() -{ - { - std::unique_lock aGuard (m_aMutex); - throwIfDisposed(aGuard); - } - - const vcl::Window* pWindow = GetWindow(); - if (pWindow != nullptr) - return pWindow->IsVisible(); - else - return false; -} - void Pane::setVisible (bool bIsVisible) { { diff --git a/sd/source/ui/inc/ViewTabBar.hxx b/sd/source/ui/inc/ViewTabBar.hxx index 791003111ac6..afef06f8a6b8 100644 --- a/sd/source/ui/inc/ViewTabBar.hxx +++ b/sd/source/ui/inc/ViewTabBar.hxx @@ -128,23 +128,6 @@ public: const TabBarButton& rButton, const TabBarButton& rAnchor); - /** Add a tab bar button at the right most position. - @param aButton - The new tab bar button that is to be inserted. - */ - void - appendTabBarButton ( - const TabBarButton& rButton); - - /** Remove a tab bar button. - @param aButton - The tab bar button to remove. When there is no button with the - specified resource id then this call is silently ignored. - */ - void - removeTabBarButton ( - const TabBarButton& rButton); - /** Test whether the specified button exists in the tab bar. @param aButton The tab bar button whose existence is tested. @@ -155,14 +138,6 @@ public: hasTabBarButton ( const TabBarButton& rButton); - /** Return a sequence of all the tab bar buttons. - <p>Their order reflects the visible order in the tab bar.</p> - <p>This method can be used when - addTabBarButtonAfter() does not provide enough - control as to where to insert a new button.</p> - */ - const std::vector<TabBarButton>& getTabBarButtons() const; - //----- AbstractResource --------------------------------------------------------- virtual css::uno::Reference< @@ -186,10 +161,6 @@ public: void AddTabBarButton ( const TabBarButton& rButton, const TabBarButton& rAnchor); - void AddTabBarButton ( - const TabBarButton& rButton); - void RemoveTabBarButton ( - const TabBarButton& rButton); bool HasTabBarButton ( const TabBarButton& rButton); diff --git a/sd/source/ui/inc/framework/ConfigurationController.hxx b/sd/source/ui/inc/framework/ConfigurationController.hxx index ce8c1f7740af..b626a4a5603c 100644 --- a/sd/source/ui/inc/framework/ConfigurationController.hxx +++ b/sd/source/ui/inc/framework/ConfigurationController.hxx @@ -154,16 +154,9 @@ public: const OUString& sResourceURL, const rtl::Reference<sd::framework::ResourceFactory>& rxResourceFactory); - void removeResourceFactoryForURL( - const OUString& sResourceURL); - void removeResourceFactoryForReference( const rtl::Reference<sd::framework::ResourceFactory>& rxResourceFactory); - rtl::Reference<sd::framework::ResourceFactory> - getResourceFactory ( - const OUString& sResourceURL); - /** Use this class instead of calling lock() and unlock() directly in order to be exception safe. */ diff --git a/sd/source/ui/inc/framework/Pane.hxx b/sd/source/ui/inc/framework/Pane.hxx index b588b9db1af6..79e2fe5a760e 100644 --- a/sd/source/ui/inc/framework/Pane.hxx +++ b/sd/source/ui/inc/framework/Pane.hxx @@ -74,12 +74,6 @@ public: virtual css::uno::Reference<css::rendering::XCanvas> getCanvas() override; - /** Return whether all windows that are used to implement the pane are - visible. - @return `TRUE` when all windows of the pane are visible. - */ - virtual bool isVisible(); - /** Hide or show the pane. If there is more than one window used to implement the pane then it is left to the implementation if one, some, or all windows are hidden or shown as long as the pane becomes diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx index 367683b9388a..7676dac2e390 100644 --- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx @@ -260,20 +260,6 @@ void GenericPageCache::SetPreciousFlag ( mpBitmapCache->SetPrecious(mpCacheContext->GetPage(aKey), bIsPrecious); } -void GenericPageCache::Pause() -{ - ProvideCacheAndProcessor(); - if (mpQueueProcessor != nullptr) - mpQueueProcessor->Pause(); -} - -void GenericPageCache::Resume() -{ - ProvideCacheAndProcessor(); - if (mpQueueProcessor != nullptr) - mpQueueProcessor->Resume(); -} - } // end of namespace ::sd::slidesorter::cache /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx index 900d402686d7..a47846884c60 100644 --- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx +++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx @@ -123,9 +123,6 @@ public: */ void SetPreciousFlag (const CacheKey aKey, const bool bIsPrecious); - void Pause(); - void Resume(); - private: std::shared_ptr<BitmapCache> mpBitmapCache; diff --git a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx index 82b1b8ae47bc..76c1f14e812c 100644 --- a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx @@ -94,16 +94,6 @@ void PageCache::SetPreciousFlag ( mpImplementation->SetPreciousFlag(aKey, bIsPrecious); } -void PageCache::Pause() -{ - mpImplementation->Pause(); -} - -void PageCache::Resume() -{ - mpImplementation->Resume(); -} - } // end of namespace ::sd::slidesorter::cache /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx index 2325e232aba7..164af4f7cc74 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx @@ -72,18 +72,6 @@ void QueueProcessor::Stop() maTimer.Stop(); } -void QueueProcessor::Pause() -{ - mbIsPaused = true; -} - -void QueueProcessor::Resume() -{ - mbIsPaused = false; - if ( ! mrQueue.IsEmpty()) - Start(mrQueue.GetFrontPriorityClass()); -} - void QueueProcessor::SetPreviewSize ( const Size& rPreviewSize, const bool bDoSuperSampling) diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx index 70ea8d5b3eb3..fd9f3a59de84 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx @@ -58,8 +58,6 @@ public: */ void Start (int nPriorityClass); void Stop(); - void Pause(); - void Resume(); void SetPreviewSize ( const Size& rSize, diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx index 4fb596195e8c..509b9951097e 100644 --- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx +++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx @@ -129,9 +129,6 @@ public: */ void SetPreciousFlag(const CacheKey aKey, const bool bIsPrecious); - void Pause(); - void Resume(); - private: std::unique_ptr<GenericPageCache> mpImplementation; }; diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index 8e902ad0b1c5..02292bbf8586 100644 --- a/sd/source/ui/view/ViewTabBar.cxx +++ b/sd/source/ui/view/ViewTabBar.cxx @@ -221,18 +221,6 @@ void ViewTabBar::addTabBarButtonAfter ( AddTabBarButton(rButton, rAnchor); } -void ViewTabBar::appendTabBarButton (const TabBarButton& rButton) -{ - const SolarMutexGuard aSolarGuard; - AddTabBarButton(rButton); -} - -void ViewTabBar::removeTabBarButton (const TabBarButton& rButton) -{ - const SolarMutexGuard aSolarGuard; - RemoveTabBarButton(rButton); -} - bool ViewTabBar::hasTabBarButton (const TabBarButton& rButton) { const SolarMutexGuard aSolarGuard; @@ -356,12 +344,6 @@ void ViewTabBar::AddTabBarButton ( AddTabBarButton(rButton,nIndex); } -void ViewTabBar::AddTabBarButton ( - const TabBarButton& rButton) -{ - AddTabBarButton(rButton, maTabBarButtons.size()); -} - void ViewTabBar::AddTabBarButton ( const TabBarButton& rButton, sal_Int32 nPosition) @@ -376,21 +358,6 @@ void ViewTabBar::AddTabBarButton ( } } -void ViewTabBar::RemoveTabBarButton ( - const TabBarButton& rButton) -{ - for (TabBarButtonList::size_type nIndex=0; nIndex<maTabBarButtons.size(); ++nIndex) - { - if (IsEqual(maTabBarButtons[nIndex], rButton)) - { - maTabBarButtons.erase(maTabBarButtons.begin()+nIndex); - UpdateTabBarButtons(); - UpdateActiveButton(); - break; - } - } -} - bool ViewTabBar::HasTabBarButton ( const TabBarButton& rButton) { @@ -408,11 +375,6 @@ bool ViewTabBar::HasTabBarButton ( return bResult; } -const std::vector<TabBarButton>& ViewTabBar::getTabBarButtons() const -{ - return maTabBarButtons; -} - void ViewTabBar::UpdateActiveButton() { rtl::Reference<sd::framework::AbstractView> xView; diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx index 5ec683990a0d..ce89ffc64b70 100644 --- a/vcl/unx/generic/dtrans/X11_selection.hxx +++ b/vcl/unx/generic/dtrans/X11_selection.hxx @@ -410,7 +410,6 @@ namespace x11 { OUString convertFromCompound( const char* pText, int nLen ); sal_Int8 getUserDragAction() const; - sal_Int32 getSelectionTimeout(); public: static SelectionManager& get();
