summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx8
-rw-r--r--writerfilter/source/dmapper/OLEHandler.cxx12
-rw-r--r--writerfilter/source/dmapper/OLEHandler.hxx4
3 files changed, 24 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 1a0238e59fac..244969372080 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1753,6 +1753,14 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const std::share
xOLEProperties->setPropertyValue(getPropertyName( PROP_HEIGHT ),
uno::makeAny(aSize.Height));
+ OUString aVisAreaWidth = pOLEHandler->GetVisAreaWidth();
+ if(!aVisAreaWidth.isEmpty())
+ xOLEProperties->setPropertyValue("VisibleAreaWidth", uno::makeAny(aVisAreaWidth));
+
+ OUString aVisAreaHeight = pOLEHandler->GetVisAreaHeight();
+ if(!aVisAreaHeight.isEmpty())
+ xOLEProperties->setPropertyValue("VisibleAreaHeight", uno::makeAny(aVisAreaHeight));
+
uno::Reference< graphic::XGraphic > xGraphic = pOLEHandler->getReplacement();
xOLEProperties->setPropertyValue(getPropertyName( PROP_GRAPHIC ),
uno::makeAny(xGraphic));
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index dee9ceb22ae1..fad449489e3c 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -95,8 +95,10 @@ void OLEHandler::lcl_attribute(Id rName, Value & rVal)
rVal.getAny() >>= m_xInputStream;
break;
case NS_ooxml::LN_CT_Object_dxaOrig:
+ m_sVisAreaWidth = sStringValue;
break;
case NS_ooxml::LN_CT_Object_dyaOrig:
+ m_sVisAreaHeight = sStringValue;
break;
case NS_ooxml::LN_shape:
{
@@ -262,6 +264,16 @@ OUString const & OLEHandler::GetDrawAspect() const
return m_sDrawAspect;
}
+OUString const & OLEHandler::GetVisAreaWidth() const
+{
+ return m_sVisAreaWidth;
+}
+
+OUString const & OLEHandler::GetVisAreaHeight() const
+{
+ return m_sVisAreaHeight;
+}
+
OUString OLEHandler::copyOLEOStream(
uno::Reference<text::XTextDocument> const& xTextDocument)
{
diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx
index 6ba2fb34ae1a..b0aae530f37a 100644
--- a/writerfilter/source/dmapper/OLEHandler.hxx
+++ b/writerfilter/source/dmapper/OLEHandler.hxx
@@ -52,6 +52,8 @@ class OLEHandler : public LoggedProperties
OUString m_sProgId;
OUString m_sShapeId;
OUString m_sDrawAspect;
+ OUString m_sVisAreaWidth;
+ OUString m_sVisAreaHeight;
OUString m_sObjectId;
OUString m_sr_id;
/// The stream URL right after the import of the raw data.
@@ -90,6 +92,8 @@ public:
OUString getCLSID(const css::uno::Reference<css::uno::XComponentContext>& xComponentContext) const;
OUString const & GetDrawAspect() const;
+ OUString const & GetVisAreaWidth() const;
+ OUString const & GetVisAreaHeight() const;
OUString copyOLEOStream(css::uno::Reference<css::text::XTextDocument> const& xTextDocument);