summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-03-26 23:07:42 +0100
committerTomaž Vajngerl <quikee@gmail.com>2013-03-30 16:54:39 +0100
commita5e22906c0b27019b61b41161ccc8cbc2cf40ade (patch)
treeb8173ac4189e3ef305b26a222272c0e9231da94c /sc
parentbd5e62e199f30724b59f7261bd65add6375a1e16 (diff)
Export Chart as Graphic - allow vector graphic export
Readd removed SaveShapeAsGraphic to GraphicHelper with which it is possible to export any shape to vector/raster graphic. Additionally cleanup GraphicHelper and ExternalEdit (convertsion to OUString, remove unused imports, comments). Change-Id: I1af45e2ed5d3b66dbd80a5f3a71c44530e46baef
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/drawfunc/chartsh.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index d4de9cf6ab16..170ede8f1833 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -40,6 +40,8 @@
#define ScChartShell
#include "scslots.hxx"
+using namespace ::css::uno;
+
SFX_IMPL_INTERFACE(ScChartShell, ScDrawShell, ScResId(SCSTR_CHARTSHELL) )
{
SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER,
@@ -88,13 +90,8 @@ void ScChartShell::ExecuteExportAsGraphic( SfxRequest& )
if( pObject && pObject->ISA( SdrOle2Obj ) )
{
- SdrOle2Obj* aOle2Object = ((SdrOle2Obj*) pObject)->Clone();
- aOle2Object->NbcResize(Point(), Fraction(1,1), Fraction(1,1));
- const Graphic* pGraphic = aOle2Object->GetGraphic();
- if( pGraphic != NULL )
- {
- GraphicHelper::ExportGraphic( *pGraphic, String("") );
- }
+ Reference< XShape > xSourceDoc = Reference< XShape >( pObject->getUnoShape(), UNO_QUERY_THROW );
+ GraphicHelper::SaveShapeAsGraphic( xSourceDoc );
}
}