[PATCH] Changes made to fix Watermark image shown on foreground, to ...
Prasanna Barate (via Code Review)
gerrit at gerrit.libreoffice.org
Mon Feb 11 06:03:48 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2102
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/02/2102/1
Changes made to fix Watermark image shown on foreground, to show it in background
Change-Id: I7f1510f5d37eb310e9dca7c45d3ac988e5e1ee98
---
M oox/inc/oox/vml/vmlshape.hxx
M oox/source/vml/vmlshape.cxx
M oox/source/vml/vmlshapecontext.cxx
M writerfilter/source/dmapper/DomainMapper_Impl.cxx
4 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/oox/inc/oox/vml/vmlshape.hxx b/oox/inc/oox/vml/vmlshape.hxx
index f1a9652..04c3cf4 100644
--- a/oox/inc/oox/vml/vmlshape.hxx
+++ b/oox/inc/oox/vml/vmlshape.hxx
@@ -84,7 +84,7 @@
sal_Bool mbVisible; ///< Visible or Hidden
::rtl::OUString maWrapStyle; ///< Wrapping mode for text.
::rtl::OUString maArcsize; ///< round rectangles arc size
-
+ ::rtl::OUString maZindex; ///< Zindex value.
StrokeModel maStrokeModel; ///< Border line formatting.
FillModel maFillModel; ///< Shape fill formatting.
ShadowModel maShadowModel; ///< Shape shadow formatting.
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 3239151..bb6b425 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -429,6 +429,7 @@
{
// Map to as-character by default, that fixes vertical position of some textframes.
rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_CHARACTER);
+ rPropSet.setProperty(PROP_Title,rTypeModel.maZindex);
}
if ( rTypeModel.maPositionVerticalRelative == "page" )
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index 79dac8e..8041d15 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -383,6 +383,7 @@
else if( aName.equalsAscii( "visibility" ) )
mrTypeModel.mbVisible = !aValue.equalsAscii( "hidden" );
else if( aName == "mso-wrap-style" ) mrTypeModel.maWrapStyle = aValue;
+ else if( aName == "z-index" ) mrTypeModel.maZindex = aValue;
}
}
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c808d76..ef42b43 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -71,7 +71,7 @@
#include <comphelper/configurationhelper.hxx>
#include <comphelper/stlunosequence.hxx>
-
+ rtl::OUString zIndexValue;
using namespace ::com::sun::star;
using namespace ::rtl;
namespace writerfilter {
@@ -1634,11 +1634,23 @@
xProps->getPropertyValue(rPropNameSupplier.GetName( PROP_ANCHOR_TYPE )) >>= nAnchorType;
if (nAnchorType == text::TextContentAnchorType_AT_PAGE)
bIsGraphic = false;
-
+
if (nAnchorType != text::TextContentAnchorType_AT_PAGE)
- xProps->setPropertyValue(
- rPropNameSupplier.GetName( PROP_OPAQUE ),
- uno::makeAny( true ) );
+{ if(xProps->getPropertyValue(rPropNameSupplier.GetName(PROP_TITLE)) != rtl::OUString(""))
+ {
+ xProps->getPropertyValue(rPropNameSupplier.GetName(PROP_TITLE)) >>= zIndexValue;
+ sal_Bool zIndexBool = zIndexValue.match(::rtl::OUString("-"),0);
+ if(zIndexBool)
+
+ xProps->setPropertyValue(rPropNameSupplier.GetName( PROP_OPAQUE ),uno::makeAny( false ) );
+ }
+ else
+ {
+
+ xProps->setPropertyValue(rPropNameSupplier.GetName( PROP_OPAQUE ),uno::makeAny( true ) );
+ }
+
+ }
if (xSInfo->supportsService("com.sun.star.text.TextFrame"))
{
uno::Reference<text::XTextContent> xTextContent(xShape, uno::UNO_QUERY_THROW);
--
To view, visit https://gerrit.libreoffice.org/2102
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f1510f5d37eb310e9dca7c45d3ac988e5e1ee98
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Prasanna Barate <prasanna.barate at synerzip.com>
More information about the LibreOffice
mailing list