summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svtools/embedhlp.hxx2
-rw-r--r--svtools/source/misc/embedhlp.cxx27
2 files changed, 18 insertions, 11 deletions
diff --git a/include/svtools/embedhlp.hxx b/include/svtools/embedhlp.hxx
index 49763a20c344..30d690c92ce1 100644
--- a/include/svtools/embedhlp.hxx
+++ b/include/svtools/embedhlp.hxx
@@ -67,6 +67,8 @@ public:
OUString* pMediaType )
throw();
+ static bool IsChart(const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj);
+
const com::sun::star::uno::Reference <com::sun::star::embed::XEmbeddedObject>& operator->() const;
const com::sun::star::uno::Reference <com::sun::star::embed::XEmbeddedObject>& GetObject() const;
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 238ea0379201..365c316a5267 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -786,6 +786,21 @@ uno::Reference< io::XInputStream > EmbeddedObjectRef::GetGraphicReplacementStrea
return ::comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream(nViewAspect,xObj,pMediaType);
}
+bool EmbeddedObjectRef::IsChart(const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj)
+{
+ SvGlobalName aObjClsId(xObj->getClassID());
+ if(
+ SvGlobalName(SO3_SCH_CLASSID_30) == aObjClsId
+ || SvGlobalName(SO3_SCH_CLASSID_40) == aObjClsId
+ || SvGlobalName(SO3_SCH_CLASSID_50) == aObjClsId
+ || SvGlobalName(SO3_SCH_CLASSID_60) == aObjClsId)
+ {
+ return true;
+ }
+
+ return false;
+}
+
void EmbeddedObjectRef::UpdateReplacement()
{
GetReplacement( true );
@@ -816,17 +831,7 @@ bool EmbeddedObjectRef::IsChart() const
if (!mpImpl->mxObj.is())
return false;
- SvGlobalName aObjClsId(mpImpl->mxObj->getClassID());
- if(
- SvGlobalName(SO3_SCH_CLASSID_30) == aObjClsId
- || SvGlobalName(SO3_SCH_CLASSID_40) == aObjClsId
- || SvGlobalName(SO3_SCH_CLASSID_50) == aObjClsId
- || SvGlobalName(SO3_SCH_CLASSID_60) == aObjClsId)
- {
- return true;
- }
-
- return false;
+ return EmbeddedObjectRef::IsChart(mpImpl->mxObj);
}
// MT: Only used for getting accessible attributes, which are not localized