summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2013-05-07 05:39:15 +0000
committerAriel Constenla-Haile <arielch@apache.org>2013-05-07 05:39:15 +0000
commite94681fb47e3c5bdba486cd8feca92705d44840d (patch)
tree94b53590bf4211a56e3bbc96cc79ff67e9a49d22 /sc/source
parentf3695b261c9fb6f7053b325bd25dc43f578b32fe (diff)
i122116 - Remove GalleryExplorer member functions
Notes
Notes: merged as: b9ebdadf5a6ebf22b4df7589d86dd8fdfb675b1e
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/app/typemap.cxx25
-rw-r--r--sc/source/ui/view/galwrap.cxx75
-rw-r--r--sc/source/ui/view/makefile.mk1
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx68
4 files changed, 26 insertions, 143 deletions
diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx
index 077364ea0f2e..d31dcc9f3aa6 100644
--- a/sc/source/ui/app/typemap.cxx
+++ b/sc/source/ui/app/typemap.cxx
@@ -30,32 +30,8 @@
#include "scitems.hxx"
#include <editeng/memberids.hrc>
-
#define ITEMID_DBTYPE 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#include <sfx2/msg.hxx>
#include <svl/stritem.hxx>
#include <svl/slstitm.hxx>
@@ -135,6 +111,7 @@
#include <svx/xlncapit.hxx>
#include <svx/xlinjoit.hxx>
#include <svx/AffineMatrixItem.hxx>
+#include <svx/galleryitem.hxx>
#define SFX_TYPEMAP
#include "scslots.hxx"
diff --git a/sc/source/ui/view/galwrap.cxx b/sc/source/ui/view/galwrap.cxx
deleted file mode 100644
index 253f0261a6b8..000000000000
--- a/sc/source/ui/view/galwrap.cxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sc.hxx"
-
-
-
-
-// INCLUDE ---------------------------------------------------------------
-
-#include <vcl/graph.hxx>
-#include <svx/gallery.hxx>
-#include <sfx2/app.hxx>
-
-// -----------------------------------------------------------------------
-
-Graphic GalleryGetGraphic()
-{
- GalleryExplorer* pGal = SVX_GALLERY();
- DBG_ASSERT( pGal, "Wo ist die Gallery?" );
- return pGal->GetGraphic();
-}
-
-sal_uInt16 GallerySGA_FORMAT_GRAPHIC()
-{
- return SGA_FORMAT_GRAPHIC;
-}
-
-sal_Bool GalleryIsLinkage()
-{
- GalleryExplorer* pGal = SVX_GALLERY();
- DBG_ASSERT( pGal, "Wo ist die Gallery?" );
- return pGal->IsLinkage();
-}
-
-String GalleryGetFullPath()
-{
- GalleryExplorer* pGal = SVX_GALLERY();
- DBG_ASSERT( pGal, "Wo ist die Gallery?" );
-// return pGal->GetPath().GetFull();
- return pGal->GetURL().GetMainURL(INetURLObject::NO_DECODE);
- // URL as stored in GraphicLink must be encoded
-}
-
-String GalleryGetFilterName()
-{
- GalleryExplorer* pGal = SVX_GALLERY();
- DBG_ASSERT( pGal, "Wo ist die Gallery?" );
- return pGal->GetFilterName();
-}
-
-
-
-
diff --git a/sc/source/ui/view/makefile.mk b/sc/source/ui/view/makefile.mk
index 5ed5ec4d112d..8ee1d985f80b 100644
--- a/sc/source/ui/view/makefile.mk
+++ b/sc/source/ui/view/makefile.mk
@@ -102,7 +102,6 @@ SLOFILES = \
$(SLO)$/hdrcont.obj \
$(SLO)$/colrowba.obj \
$(SLO)$/olkact.obj \
- $(SLO)$/galwrap.obj \
$(SLO)$/imapwrap.obj \
$(SLO)$/reffact.obj \
$(SLO)$/selectionstate.obj \
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index 658db8d0ae7f..62955e076b2d 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -47,13 +47,8 @@
#include "userdat.hxx"
#include "docsh.hxx"
-// forwards -> galwrap.cxx (wg. CLOOKs)
-
-sal_uInt16 GallerySGA_FORMAT_GRAPHIC();
-Graphic GalleryGetGraphic ();
-sal_Bool GalleryIsLinkage ();
-String GalleryGetFullPath ();
-String GalleryGetFilterName ();
+#include <svx/galleryitem.hxx>
+#include <com/sun/star/gallery/GalleryItemType.hpp>
// forwards -> imapwrap.cxx (wg. CLOOKs)
@@ -111,46 +106,33 @@ void ScTabViewShell::ExecGallery( SfxRequest& rReq )
{
const SfxItemSet* pArgs = rReq.GetArgs();
- if ( pArgs )
- {
- const SfxPoolItem* pItem = NULL;
- SfxItemState eState = pArgs->GetItemState(SID_GALLERY_FORMATS, sal_True, &pItem);
- if ( eState == SFX_ITEM_SET )
- {
- sal_uInt32 nFormats = ((const SfxUInt32Item*)pItem)->GetValue();
-
- /******************************************************************
- * Graphik einfuegen
- ******************************************************************/
- if ( nFormats & GallerySGA_FORMAT_GRAPHIC() )
- {
- MakeDrawLayer();
+ SFX_ITEMSET_ARG( pArgs, pGalleryItem, SvxGalleryItem, SID_GALLERY_FORMATS, sal_False );
+ if ( !pGalleryItem )
+ return;
- Graphic aGraphic = GalleryGetGraphic();
- Point aPos = GetInsertPos();
-
- String aPath, aFilter;
- if ( GalleryIsLinkage() ) // als Link einfuegen?
- {
- aPath = GalleryGetFullPath();
- aFilter = GalleryGetFilterName();
- }
+ sal_Int8 nType( pGalleryItem->GetType() );
+ if ( nType == com::sun::star::gallery::GalleryItemType::GRAPHIC )
+ {
+ MakeDrawLayer();
- PasteGraphic( aPos, aGraphic, aPath, aFilter );
- }
- else if ( nFormats & SGA_FORMAT_SOUND )
- {
- // #98115# for sounds (linked or not), insert a hyperlink button,
- // like in Impress and Writer
+ Graphic aGraphic( pGalleryItem->GetGraphic() );
+ Point aPos = GetInsertPos();
- GalleryExplorer* pGal = SVX_GALLERY();
- if ( pGal )
- {
- const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGal->GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
- GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
- }
- }
+ String aPath, aFilter;
+ if ( pGalleryItem->IsLink() ) // als Link einfuegen?
+ {
+ aPath = pGalleryItem->GetURL();
+ aFilter = pGalleryItem->GetFilterName();
}
+
+ PasteGraphic( aPos, aGraphic, aPath, aFilter );
+ }
+ else if ( nType == com::sun::star::gallery::GalleryItemType::MEDIA )
+ {
+ // #98115# for sounds (linked or not), insert a hyperlink button,
+ // like in Impress and Writer
+ const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() );
+ GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
}
}