[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - sfx2/source
Muhammet Kara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 17 20:52:48 UTC 2019
sfx2/source/doc/SfxRedactionHelper.cxx | 8 ++++++++
sfx2/source/doc/objserv.cxx | 6 ------
2 files changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 0e6c070d083157bd3fbd3dbe2fba51520b08774c
Author: Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Fri Mar 29 12:38:13 2019 +0300
Commit: Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Mon Jun 17 22:52:12 2019 +0200
Enable redaction for Impress
After the commit c2330b14e2bfa170131a83c375ec0b1a91c95415,
different page sizes and orientations are handled properly,
and Impress pages are converted to Draw perfectly.
Change-Id: Ib9ab6b298e12fc0d8e9440bf63f31ad6dd05ab35
Reviewed-on: https://gerrit.libreoffice.org/69910
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/74217
Tested-by: Muhammet Kara <muhammet.kara at collabora.com>
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index ffd7643658af..a34ad5c24113 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -556,12 +556,6 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
bool bIsWriter = aRenderer.isWriter();
bool bIsCalc = aRenderer.isCalc();
- if (!bIsWriter && !bIsCalc)
- {
- SAL_WARN( "sfx.doc", "Redaction is supported only for Writer and Calc! (for now...)");
- return;
- }
-
sal_Int32 nPages = aRenderer.getPageCount();
std::vector< GDIMetaFile > aMetaFiles;
commit 169d37f12dc427edd29de7a2a77edd4f5bff08f3
Author: Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Fri Mar 29 12:18:12 2019 +0300
Commit: Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Mon Jun 17 22:51:55 2019 +0200
Handle different page sizes for redaction
Change-Id: I7136717936668fbb1d87b5d9491430c13c5e73fd
Reviewed-on: https://gerrit.libreoffice.org/69909
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/74216
Tested-by: Muhammet Kara <muhammet.kara at collabora.com>
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx
index b23ed271eb87..a117bc14123b 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -122,9 +122,17 @@ void SfxRedactionHelper::addPagesToDraw(uno::Reference<XComponent>& xComponent,
GDIMetaFile rGDIMetaFile = aMetaFiles[nPage];
Graphic aGraphic(rGDIMetaFile);
+ sal_Int32 nPageHeight(rGDIMetaFile.GetPrefSize().Height());
+ sal_Int32 nPageWidth(rGDIMetaFile.GetPrefSize().Width());
+
uno::Reference<graphic::XGraphic> xGraph = aGraphic.GetXGraphic();
uno::Reference<drawing::XDrawPage> xPage = xDrawPages->insertNewByIndex(nPage);
+ // Set page size
+ uno::Reference<beans::XPropertySet> xPageProperySet(xPage, uno::UNO_QUERY);
+ xPageProperySet->setPropertyValue("Height", css::uno::makeAny(nPageHeight));
+ xPageProperySet->setPropertyValue("Width", css::uno::makeAny(nPageWidth));
+
// Create and insert the shape
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY);
More information about the Libreoffice-commits
mailing list