[Libreoffice-commits] core.git: include/svtools sd/source svtools/source svx/source
include/svtools/embedtransfer.hxx |6 ++-- sd/source/ui/app/sdxfer.cxx | 20 ++--- sd/source/ui/inc/sdxfer.hxx |3 +- svtools/source/misc/embedhlp.cxx | 50 +- svtools/source/misc/embedtransfer.cxx | 13 svx/source/gallery2/galtheme.cxx | 10 +++--- svx/source/svdraw/svdoole2.cxx| 20 ++--- 7 files changed, 62 insertions(+), 60 deletions(-) New commits: commit 94c5c9281ac09186242143191f3e383bef2a89a7 Author: Noel Grandin AuthorDate: Fri Sep 9 20:18:12 2022 +0200 Commit: Noel Grandin CommitDate: Sat Sep 10 11:47:14 2022 +0200 unique_ptr->optional for Graphic Graphic is just a wrapper around shared_ptr, so no need to allocate this separately Change-Id: I30de73ac8a7e29adbc5ffe681f3ce88cd700b68c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139738 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/svtools/embedtransfer.hxx b/include/svtools/embedtransfer.hxx index 98bab1683aa8..03e41bcf1592 100644 --- a/include/svtools/embedtransfer.hxx +++ b/include/svtools/embedtransfer.hxx @@ -21,17 +21,17 @@ #include #include -#include +#include +#include namespace com :: sun :: star :: embed { class XEmbeddedObject; } -class Graphic; class SVT_DLLPUBLIC SvEmbedTransferHelper final : public TransferableHelper { private: css::uno::Reference< css::embed::XEmbeddedObject > m_xObj; -std::unique_ptr m_pGraphic; +std::optional m_oGraphic; sal_Int64 m_nAspect; OUString maParentShellID; diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index d5a6e3c1fadf..3c3fdcd6d912 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -129,7 +129,7 @@ SdTransferable::~SdTransferable() if( mbOwnDocument ) delete mpSdDrawDocumentIntern; -mpGraphic.reset(); +moGraphic.reset(); mpBookmark.reset(); mpImageMap.reset(); @@ -146,7 +146,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj ) return; mpOLEDataHelper.reset(); -mpGraphic.reset(); +moGraphic.reset(); mpBookmark.reset(); mpImageMap.reset(); @@ -164,7 +164,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj ) // The EmbedDataHelper should bring the graphic in future const Graphic* pObjGr = pOleObj->GetGraphic(); if ( pObjGr ) -mpGraphic.reset( new Graphic( *pObjGr ) ); +moGraphic.emplace(*pObjGr); } } catch( uno::Exception& ) @@ -172,7 +172,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj ) } else if( dynamic_cast< const SdrGrafObj *>( pObj ) != nullptr && (mpSourceDoc && !SdDrawDocument::GetAnimationInfo( pObj )) ) { -mpGraphic.reset( new Graphic( static_cast< SdrGrafObj* >( pObj )->GetTransformedGraphic() ) ); +moGraphic.emplace( static_cast< SdrGrafObj* >( pObj )->GetTransformedGraphic() ); } else if( pObj->IsUnoObj() && SdrInventor::FmForm == pObj->GetObjInventor() && ( pObj->GetObjIdentifier() == SdrObjKind::FormButton ) ) { @@ -394,14 +394,14 @@ void SdTransferable::AddSupportedFormats() for( const auto& rItem : aVector ) AddFormat( rItem ); } -else if( mpGraphic ) +else if( moGraphic ) { // #i25616# AddFormat( SotClipboardFormatId::DRAWING ); AddFormat( SotClipboardFormatId::SVXB ); -if( mpGraphic->GetType() == GraphicType::Bitmap ) +if( moGraphic->GetType() == GraphicType::Bitmap ) { AddFormat( SotClipboardFormatId::PNG ); AddFormat( SotClipboardFormatId::BITMAP ); @@ -457,8 +457,8 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo else if( mpOLEDataHelper && mpOLEDataHelper->HasFormat( rFlavor ) ) { // TODO/LATER: support all the graphical formats, the embedded object scenario should not have separated handling -if( nFormat == SotClipboardFormatId::GDIMETAFILE && mpGraphic ) -bOK = SetGDIMetaFile( mpGraphic->GetGDIMetaFile() ); +if( nFormat == SotClipboardFormatId::GDIMETAFILE && moGraphic ) +bOK = SetGDIMetaFile( moGraphic->GetGDIMetaFile() ); else bOK = SetAny( mpOLEDataHelper->GetAny(rFlavor, rDestDoc) ); } @@ -523,9 +523,9 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo { bOK = SetString( mpBookmark->GetURL() ); } -else if( ( nFormat == SotClipboardFormatId::SVXB ) && mpGraphic ) +else if( ( nFormat == SotClipboardFormatId::SVXB ) && moGraphic ) { -bOK = SetGraphic( *mpGraphic ); +bOK = SetGraphic( *moGraphic ); } else if( ( nFormat ==
[Libreoffice-commits] core.git: include/svtools sd/source svtools/source svx/source
include/svtools/ruler.hxx|3 +-- sd/source/ui/view/sdruler.cxx|2 +- svtools/source/control/ruler.cxx |2 +- svx/source/dialog/svxruler.cxx |2 +- 4 files changed, 4 insertions(+), 5 deletions(-) New commits: commit 0a83a11a5324333150dccd3faaeecbd2ec8d2aba Author: Caolán McNamara AuthorDate: Fri Feb 12 17:28:02 2021 + Commit: Caolán McNamara CommitDate: Sat Feb 13 20:03:39 2021 +0100 rename Ruler::GetType to drop using Window::GetType Change-Id: I78da4bb35f5f3e7253737ddc3be1460fbf605ad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110831 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 5c7cc2f6ba8c..27d52b220635 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -759,8 +759,7 @@ public: const RulerSelection& GetHoverSelection() const { return maHoverSelection; } -using Window::GetType; -RulerType GetType( const Point& rPos, sal_uInt16* pAryPos = nullptr ); +RulerType GetRulerType( const Point& rPos, sal_uInt16* pAryPos = nullptr ); voidSetNullOffset( tools::Long nPos ); tools::LongGetNullOffset() const; diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx index a3892acfd957..8490a05d2bd0 100644 --- a/sd/source/ui/view/sdruler.cxx +++ b/sd/source/ui/view/sdruler.cxx @@ -106,7 +106,7 @@ void Ruler::dispose() void Ruler::MouseButtonDown(const MouseEvent& rMEvt) { Point aMPos = rMEvt.GetPosPixel(); -RulerType eType = GetType(aMPos); +RulerType eType = GetRulerType(aMPos); if ( !pDrViewShell->GetView()->IsTextEdit() && rMEvt.IsLeft() && rMEvt.GetClicks() == 1 && diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 2caa18a0f3bc..170769684ba1 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -2309,7 +2309,7 @@ void Ruler::CancelDrag() } } -RulerType Ruler::GetType( const Point& rPos, sal_uInt16* pAryPos ) +RulerType Ruler::GetRulerType( const Point& rPos, sal_uInt16* pAryPos ) { RulerSelection aHitTest; diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 55b575d4a4ca..d24de90e2a7a 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -3297,7 +3297,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent ) bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); if ( !mpTabs.empty() && RulerType::Tab == - GetType( rCommandEvent.GetMousePosPixel(), >nIdx ) && + GetRulerType( rCommandEvent.GetMousePosPixel(), >nIdx ) && mpTabs[mxRulerImpl->nIdx + TAB_GAP].nStyle < RULER_TAB_DEFAULT ) { ScopedVclPtrInstance aMenu; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svtools sd/source svtools/source svx/source
include/svtools/toolbarmenu.hxx | 53 ++-- sd/source/ui/controller/slidelayoutcontroller.cxx |8 - svtools/source/control/toolbarmenu.cxx| 97 ++ svx/source/tbxctrls/tbcontrl.cxx |2 4 files changed, 45 insertions(+), 115 deletions(-) New commits: commit 839b27f249197c83ce0260396a67a2f15bdf4e9a Author: Maxim Monastirsky AuthorDate: Wed Aug 12 15:42:50 2020 +0300 Commit: Maxim Monastirsky CommitDate: Thu Aug 13 00:40:05 2020 +0200 Merge toolbar popup classes Now that all popups are welded. Change-Id: I5ad8a4eb6b9512ea9dd075b56d0ae6ee201fff19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100597 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx index c08da7e9c899..6e8aa5588de2 100644 --- a/include/svtools/toolbarmenu.hxx +++ b/include/svtools/toolbarmenu.hxx @@ -33,45 +33,7 @@ namespace com :: sun :: star :: frame { class XFrame; } namespace com :: sun :: star :: frame { struct FeatureStateEvent; } namespace svt { class FrameStatusListener; } -namespace svtools { - -class SVT_DLLPUBLIC ToolbarPopupBase -{ -friend class ToolbarPopupStatusListener; -public: -ToolbarPopupBase(const css::uno::Reference& rFrame); -virtual ~ToolbarPopupBase(); - -protected: -void AddStatusListener( const OUString& rCommandURL ); - -// Forwarded from XStatusListener (subclasses must override this one to get the status updates): -/// @throws css::uno::RuntimeException -virtual void statusChanged(const css::frame::FeatureStateEvent& Event ); - -css::uno::Reference mxFrame; -rtl::Reference mxStatusListener; -}; - -class UNLESS_MERGELIBS(SVT_DLLPUBLIC) ToolbarPopup : public DockingWindow, public ToolbarPopupBase -{ -public: -ToolbarPopup(const css::uno::Reference& rFrame, - vcl::Window* pParentWindow, - const OString& rID, const OUString& rUIXMLDescription ); -virtual ~ToolbarPopup() override; -virtual void dispose() override; - -protected: -void EndPopupMode(); - -private: -void init(); -}; - -} // namespace svtools - -class SVT_DLLPUBLIC WeldToolbarPopup : public svtools::ToolbarPopupBase +class SVT_DLLPUBLIC WeldToolbarPopup { private: DECL_LINK(FocusHdl, weld::Widget&, void); @@ -80,14 +42,20 @@ protected: std::unique_ptr m_xBuilder; std::unique_ptr m_xTopLevel; std::unique_ptr m_xContainer; +css::uno::Reference m_xFrame; +rtl::Reference m_xStatusListener; public: WeldToolbarPopup(const css::uno::Reference& rFrame, weld::Widget* pParent, const OUString& rUIFile, const OString& rId); -virtual ~WeldToolbarPopup() override; +virtual ~WeldToolbarPopup(); weld::Container* getTopLevel() { return m_xTopLevel.get(); } weld::Container* getContainer() { return m_xContainer.get(); } +void AddStatusListener(const OUString& rCommandURL); +// Forwarded from XStatusListener (subclasses must override this one to get the status updates): +/// @throws css::uno::RuntimeException +virtual void statusChanged(const css::frame::FeatureStateEvent& Event); virtual void GrabFocus() = 0; }; @@ -116,10 +84,11 @@ public: void unsetPopover(); }; -class SVT_DLLPUBLIC InterimToolbarPopup final : public svtools::ToolbarPopup +class SVT_DLLPUBLIC InterimToolbarPopup final : public DockingWindow { private: VclPtr m_xBox; +css::uno::Reference m_xFrame; std::unique_ptr m_xBuilder; std::unique_ptr m_xContainer; std::unique_ptr m_xPopup; @@ -132,7 +101,7 @@ public: virtual void GetFocus() override; -using ToolbarPopup::EndPopupMode; +void EndPopupMode(); }; #endif diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 41071def8409..284df02be296 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -170,9 +170,9 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widg DrawViewMode eMode = DrawViewMode_DRAW; // find out which view is running -if( mxFrame.is() ) try +if( m_xFrame.is() ) try { -Reference< XPropertySet > xControllerSet( mxFrame->getController(), UNO_QUERY_THROW ); +Reference< XPropertySet > xControllerSet( m_xFrame->getController(), UNO_QUERY_THROW ); xControllerSet->getPropertyValue( "DrawViewMode" ) >>= eMode; } catch( Exception& ) @@ -220,7 +220,7 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widg if( eMode != DrawViewMode_DRAW ) return; -if( !mxFrame.is() ) +if( !m_xFrame.is() ) return; OUString sSlotStr; @@ -230,7 +230,7 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController*
[Libreoffice-commits] core.git: include/svtools sd/source svtools/source svx/source
include/svtools/tabbar.hxx|6 sd/source/core/drawdoc.cxx| 38 ++-- sd/source/core/drawdoc2.cxx |9 - sd/source/core/drawdoc4.cxx | 39 sd/source/core/sdpage.cxx |4 sd/source/filter/ppt/pptin.cxx|5 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |3 sd/source/ui/dlg/LayerTabBar.cxx | 124 ++ sd/source/ui/func/fuconrec.cxx|7 sd/source/ui/func/fuconuno.cxx|4 sd/source/ui/inc/LayerTabBar.hxx | 24 ++ sd/source/ui/sidebar/LayoutMenu.cxx |7 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx|5 sd/source/ui/unoidl/unolayer.cxx | 66 --- sd/source/ui/unoidl/unolayer.hxx |3 sd/source/ui/unoidl/unomodel.cxx |8 sd/source/ui/unoidl/unoobj.cxx| 31 --- sd/source/ui/unoidl/unopage.cxx |8 sd/source/ui/view/ViewShellImplementation.cxx |9 - sd/source/ui/view/drviews1.cxx| 46 + sd/source/ui/view/drviews2.cxx| 48 ++--- sd/source/ui/view/drviews3.cxx|9 - sd/source/ui/view/drviews4.cxx| 11 + sd/source/ui/view/drviews5.cxx|2 sd/source/ui/view/drviews7.cxx| 17 - sd/source/ui/view/drviewsa.cxx|3 sd/source/ui/view/drviewsb.cxx|8 sd/source/ui/view/drviewse.cxx|3 sd/source/ui/view/frmview.cxx |4 sd/source/ui/view/sdview.cxx |3 sd/source/ui/view/unmodpg.cxx | 13 - sd/source/ui/view/viewshe3.cxx|5 svtools/source/control/tabbar.cxx | 19 ++ svx/source/svdraw/svdlayer.cxx|4 34 files changed, 285 insertions(+), 310 deletions(-) New commits: commit a9ec212c1b545d745285f0ab3119a80713b1d1f2 Author: Regina Henschel AuthorDate: Fri Sep 14 18:56:23 2018 +0200 Commit: Regina Henschel CommitDate: Fri Sep 21 11:32:34 2018 +0200 tdf#67248 Use localized layer name only for display in UI The internal management of layers was based on localized layer names. So it could happen, that a custom layer name was a standard layer name (which includes special handling) in one local and not in the other. The patch changes the implementation to use the same real layer names as in file, and use localized standard layer names only for display in the UI. Removes no longer needed RestoreLayerName() Removes convertToInternalName(), ersatz convertToLocalizedName() Removes no longer needed convertToExternalName() Includes fix for tdf#119956 in addition Change-Id: Iaedb73e4017e728f7ca3b0dc4aa7bb7f0e6ce6da Reviewed-on: https://gerrit.libreoffice.org/60507 Tested-by: Jenkins Reviewed-by: Regina Henschel diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx index 0e5b93a5e861..94b3b029062f 100644 --- a/include/svtools/tabbar.hxx +++ b/include/svtools/tabbar.hxx @@ -376,6 +376,8 @@ private: protected: virtual void AddTabClick(); +OUString GetAuxiliaryText(sal_uInt16 nPageId) const; // needed in derived class LayerTabBar +void SetAuxiliaryText(sal_uInt16 nPageId, const OUString& rText ); public: static const sal_uInt16 APPEND; @@ -405,7 +407,7 @@ public: virtual voidEndRenaming(); virtual voidMirror(); -voidInsertPage( sal_uInt16 nPageId, const OUString& rText, +virtual voidInsertPage( sal_uInt16 nPageId, const OUString& rText, TabBarPageBits nBits = TabBarPageBits::NONE, sal_uInt16 nPos = TabBar::APPEND ); voidRemovePage( sal_uInt16 nPageId ); @@ -474,7 +476,7 @@ public: voidSwitchPage( const Point& rPos ); voidEndSwitchPage(); -voidSetPageText( sal_uInt16 nPageId, const OUString& rText ); +virtual voidSetPageText( sal_uInt16 nPageId, const OUString& rText ); OUStringGetPageText( sal_uInt16 nPageId ) const; OUStringGetHelpText( sal_uInt16 nPageId ) const; OString GetHelpId( sal_uInt16 nPageId ) const; diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 3bb367c4bbd0..fae113555f12 100644 --- a/sd/source/core/drawdoc.cxx +++