From b9ebdadf5a6ebf22b4df7589d86dd8fdfb675b1e Mon Sep 17 00:00:00 2001 From: Ariel Constenla-Haile Date: Tue, 7 May 2013 05:39:15 +0000 Subject: Resolves: fdo#66027 #i122116# Remove GalleryExplorer member functions (cherry picked from commit e94681fb47e3c5bdba486cd8feca92705d44840d) Conflicts: sc/source/ui/app/typemap.cxx sc/source/ui/view/galwrap.cxx sc/source/ui/view/makefile.mk sc/source/ui/view/tabvwsh9.cxx sd/source/ui/view/drviews9.cxx svx/Package_inc.mk svx/inc/GalleryControl.hxx svx/inc/galbrws2.hxx svx/inc/svx/galbrws.hxx svx/inc/svx/gallery.hxx svx/source/gallery2/GalleryControl.cxx svx/source/gallery2/galbrws.cxx svx/source/gallery2/galbrws2.cxx svx/source/gallery2/galexpl.cxx sw/source/ui/shells/basesh.cxx Change-Id: I49c2b99ca551f058b852c0e5e28cc2fe8c205031 --- include/svx/galbrws.hxx | 9 +----- include/svx/gallery.hxx | 28 ----------------- include/svx/galleryitem.hxx | 76 +++++++++++++++++++++++++++++++++++++++++++++ include/svx/svxcommands.h | 2 ++ 4 files changed, 79 insertions(+), 36 deletions(-) create mode 100644 include/svx/galleryitem.hxx (limited to 'include/svx') diff --git a/include/svx/galbrws.hxx b/include/svx/galbrws.hxx index 3eebaf685f75..2dffc16a8470 100644 --- a/include/svx/galbrws.hxx +++ b/include/svx/galbrws.hxx @@ -26,8 +26,6 @@ #include #include "svx/svxdllapi.h" -#define GALLERYBROWSER() ((GalleryBrowser*)( SfxViewFrame::Current()->GetChildWindow(GalleryChildWindow::GetChildWindowId())->GetWindow())) - class SVX_DLLPUBLIC GalleryChildWindow : public SfxChildWindow { public: @@ -76,12 +74,7 @@ public: Window* pParent, const ResId& rResId ); ~GalleryBrowser(); - INetURLObject GetURL() const; - String GetFilterName() const; - Graphic GetGraphic() const; - sal_Bool IsLinkage() const; - - sal_Bool KeyInput( const KeyEvent& rKEvt, Window* pWindow ); + sal_Bool KeyInput( const KeyEvent& rKEvt, Window* pWindow ); }; #endif // _SVX_GALBRWS_HXX_ diff --git a/include/svx/gallery.hxx b/include/svx/gallery.hxx index 778474b3066c..1fbec79d6d7c 100644 --- a/include/svx/gallery.hxx +++ b/include/svx/gallery.hxx @@ -26,16 +26,6 @@ #include #include "svx/svxdllapi.h" -#define SGA_FORMAT_NONE 0x00000000L -#define SGA_FORMAT_STRING 0x00000001L -#define SGA_FORMAT_GRAPHIC 0x00000010L -#define SGA_FORMAT_SOUND 0x00000100L -#define SGA_FORMAT_OLE 0x00001000L -#define SGA_FORMAT_SVDRAW 0x00010000L -#define SGA_FORMAT_ALL 0xFFFFFFFFL - -#define SVX_GALLERY() (GalleryExplorer::GetGallery()) - // Defines for preinstalled themes // Has to be in sync with svx/inc/galtheme.hrc #define GALLERY_THEME_3D 1 @@ -60,21 +50,8 @@ class OutputDevice; class SVX_DLLPUBLIC GalleryExplorer { -private: - - SVX_DLLPRIVATE static Gallery* ImplGetGallery(); - public: - static GalleryExplorer* GetGallery(); - -public: - - INetURLObject GetURL() const; - String GetFilterName() const; - Graphic GetGraphic() const; - sal_Bool IsLinkage() const; - static bool FillThemeList( std::vector& rThemeList ); // FillObjList is filling rObjList with Strings of the internal Gallery Object URL @@ -88,11 +65,6 @@ public: static sal_Bool InsertURL( const String& rThemeName, const String& rURL ); static sal_Bool InsertURL( sal_uIntPtr nThemeId, const String& rURL ); - static sal_Bool InsertURL( const String& rThemeName, const String& rURL, - const sal_uIntPtr nSgaFormat /* = SGA_FORMAT_ALL */ ); - static sal_Bool InsertURL( sal_uIntPtr nThemeId, const String& rURL, - const sal_uIntPtr nSgaFormat /* = SGA_FORMAT_ALL */ ); - static sal_Bool GetGraphicObj( const String& rThemeName, sal_uIntPtr nPos, Graphic* pGraphic = NULL, BitmapEx* pThumb = NULL, sal_Bool bProgess = sal_False ); diff --git a/include/svx/galleryitem.hxx b/include/svx/galleryitem.hxx new file mode 100644 index 000000000000..738eede12ec6 --- /dev/null +++ b/include/svx/galleryitem.hxx @@ -0,0 +1,76 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef _SVX_GALLERYITEMITEM_HXX +#define _SVX_GALLERYITEMITEM_HXX + +#include +#include + +#include +#include +#include + +// property names map those from css::gallery::GalleryItem +// with exception of "AsLink" and "FilterName" +#define SVXGALLERYITEM_TYPE "GalleryItemType" +#define SVXGALLERYITEM_LINK "AsLink" +#define SVXGALLERYITEM_URL "URL" +#define SVXGALLERYITEM_FILTER "FilterName" +#define SVXGALLERYITEM_DRAWING "Drawing" +#define SVXGALLERYITEM_GRAPHIC "Graphic" +#define SVXGALLERYITEM_PARAMS 6 +#define SVXGALLERYITEM_ARGNAME "GalleryItem" + +DBG_NAMEEX_VISIBILITY( SvxGalleryItem, SVX_DLLPUBLIC ) + +class SVX_DLLPUBLIC SvxGalleryItem : public SfxPoolItem +{ + sal_Int8 m_nType; + sal_Bool m_bIsLink; + rtl::OUString m_aURL; + rtl::OUString m_aFilterName; + com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xDrawing; + com::sun::star::uno::Reference< com::sun::star::graphic::XGraphic > m_xGraphic; + +public: + TYPEINFO(); + + SvxGalleryItem(); + SvxGalleryItem( const SvxGalleryItem& ); + SvxGalleryItem( const sal_uInt16 nId ); + ~SvxGalleryItem(); + + sal_Int8 GetType() const { return m_nType; } + sal_Bool IsLink() const { return m_bIsLink; } + const rtl::OUString GetURL() const { return m_aURL; } + const rtl::OUString GetFilterName() const { return m_aFilterName; } + const com::sun::star::uno::Reference< com::sun::star::lang::XComponent > GetDrawing() const { return m_xDrawing; } + const com::sun::star::uno::Reference< com::sun::star::graphic::XGraphic > GetGraphic() const { return m_xGraphic; } + + // pure virtual methods from SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + // bridge to UNO + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + // not implemented + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; +}; + +#endif diff --git a/include/svx/svxcommands.h b/include/svx/svxcommands.h index 266d3d691df7..61cbd2ca8f26 100644 --- a/include/svx/svxcommands.h +++ b/include/svx/svxcommands.h @@ -80,6 +80,8 @@ #define CMD_SID_ATTRIBUTES_LINE ".uno:FormatLine" #define CMD_SID_FM_FORMATTEDFIELD ".uno:FormattedField" #define CMD_SID_UNGROUP ".uno:FormatUngroup" +#define CMD_SID_GALLERY_ENABLE_ADDCOPY ".uno:GalleryEnableAddCopy" +#define CMD_SID_GALLERY_FORMATS ".uno:InsertGalleryPic" #define CMD_SID_ATTR_GRAF_CROP ".uno:GrafAttrCrop" #define CMD_SID_GRFFILTER_MOSAIC ".uno:GraphicFilterMosaic" #define CMD_SID_GRFFILTER_POSTER ".uno:GraphicFilterPoster" -- cgit