summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-09-11 10:53:47 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2017-09-11 12:07:47 +0200
commit653e49371444e5ae48b1570e85822577fb8fd147 (patch)
treec85c200978880335f6f50181deb78a7be7ba7704
parentgtk3: flicker-free opengl transitions (diff)
downloadcore-653e49371444e5ae48b1570e85822577fb8fd147.tar.gz
core-653e49371444e5ae48b1570e85822577fb8fd147.zip
tdf#112304 Revert "Watermark: not visible if page background was set"
This reverts commit 39c08074a286855dd014ce1c30b8f7ef95b10242. Fixed by: I69517efb7d82acd719d6a27a09ba61554dbf1ec9 Change-Id: Icd45b3f55292670ff7338a367eba212453a0687e Reviewed-on: https://gerrit.libreoffice.org/42155 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/watermark-layer.docxbin17964 -> 0 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx15
-rw-r--r--sw/source/core/edit/edfcol.cxx15
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx10
4 files changed, 6 insertions, 34 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/watermark-layer.docx b/sw/qa/extras/ooxmlexport/data/watermark-layer.docx
deleted file mode 100755
index 9428686c1bad..000000000000
--- a/sw/qa/extras/ooxmlexport/data/watermark-layer.docx
+++ /dev/null
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 5f45cbcc7109..693d18d59fb4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -31,10 +31,8 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <ftninfo.hxx>
-#include <drawdoc.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
-#include <svx/svdpage.hxx>
class Test : public SwModelTestBase
{
@@ -1014,19 +1012,6 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXControlAtRunEnd, "activex_control_at_run_end
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet2,"AnchorType"));
}
-DECLARE_OOXMLEXPORT_TEST(testWatermarkLayer, "watermark-layer.docx")
-{
- // Watermark was not visible if page background was set.
-
- SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
- CPPUNIT_ASSERT(pTextDoc);
- SdrPage* pPage = pTextDoc->GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
- SdrObject* pObject = pPage->GetObj(0);
-
- CPPUNIT_ASSERT(pObject);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>(1), pObject->GetLayer().get());
-}
-
DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_group.docx")
{
// Optionbutton groups were not handled
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 17eeea9847b5..1b29cbedaf59 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -68,7 +68,6 @@
#include <pagefrm.hxx>
#include <rdfhelper.hxx>
#include <sfx2/watermarkitem.hxx>
-#include <DocumentDrawModelManager.hxx>
#include <unoparagraph.hxx>
#include <unotextrange.hxx>
@@ -460,8 +459,7 @@ SfxWatermarkItem SwEditShell::GetWatermark()
void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
const uno::Reference<frame::XModel>& xModel,
const uno::Reference<beans::XPropertySet>& xPageStyle,
- const uno::Reference<text::XText>& xHeaderText,
- sal_Int16 nLayer)
+ const uno::Reference<text::XText>& xHeaderText)
{
uno::Reference<lang::XMultiServiceFactory> xMultiServiceFactory(xModel, uno::UNO_QUERY);
OUString aShapeServiceName = "com.sun.star.drawing.CustomShape";
@@ -583,7 +581,6 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
xPropertySet->setPropertyValue("Transformation", uno::makeAny(aMatrix));
xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT, uno::makeAny(static_cast<sal_Int16>(text::HoriOrientation::CENTER)));
xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT, uno::makeAny(static_cast<sal_Int16>(text::VertOrientation::CENTER)));
- xPropertySet->setPropertyValue(UNO_NAME_MISC_OBJ_LAYERID, uno::makeAny(nLayer));
uno::Reference<text::XTextRange> xTextRange(xShape, uno::UNO_QUERY);
xTextRange->setString(rWatermark.GetText());
@@ -629,8 +626,6 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark)
uno::Reference<container::XNameAccess> xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY);
- sal_Int16 nHeavenId = GetDoc()->getIDocumentDrawModelAccess().GetHeavenId().get();
-
std::set<OUString> aUsedPageStyles = lcl_getUsedPageStyles(this);
for (const OUString& rPageStyleName : aUsedPageStyles)
{
@@ -656,16 +651,16 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark)
uno::Reference<text::XText> xHeaderTextRight;
xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT) >>= xHeaderText;
- lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, xHeaderText, nHeavenId);
+ lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, xHeaderText);
xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT_FIRST) >>= xHeaderTextFirst;
- lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, xHeaderTextFirst, nHeavenId);
+ lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, xHeaderTextFirst);
xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT_LEFT) >>= xHeaderTextLeft;
- lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, xHeaderTextLeft, nHeavenId);
+ lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, xHeaderTextLeft);
xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT_RIGHT) >>= xHeaderTextRight;
- lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, xHeaderTextRight, nHeavenId);
+ lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, xHeaderTextRight);
// tdf#108494 the header height was switched to height of a watermark
// and shape was moved to the lower part of a page
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 229bfa71be2d..2cd7f7fff6c2 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -88,7 +88,7 @@
#include <comphelper/propertyvalue.hxx>
#include <comphelper/propertysequence.hxx>
#include <unotools/mediadescriptor.hxx>
-#include <editeng/unoprnms.hxx>
+
@@ -2185,14 +2185,6 @@ void DomainMapper_Impl::PopShapeContext()
{
}
}
- // Move Watermark upper to be visible if page background is set
- uno::Reference<drawing::XShape> xShape( xObj, uno::UNO_QUERY_THROW );
- uno::Reference<container::XNamed> xNamed( xShape, uno::UNO_QUERY );
- if ( xNamed.is() && xNamed->getName().match( "PowerPlusWaterMarkObject" ) )
- {
- uno::Reference<beans::XPropertySet> xShapePropertySet( xShape, uno::UNO_QUERY );
- xShapePropertySet->setPropertyValue( UNO_NAME_MISC_OBJ_LAYERID, uno::makeAny( sal_Int16(1) ) );
- }
m_aAnchoredStack.pop();
}
m_bFrameBtLr = false;