summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/gpgmepp/ExternalProject_gpgmepp.mk2
-rw-r--r--external/libassuan/ExternalProject_libassuan.mk2
-rw-r--r--external/libgpg-error/ExternalProject_libgpg-error.mk2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Common.xcu3
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs8
-rw-r--r--sfx2/source/doc/objstor.cxx33
-rw-r--r--sw/source/core/layout/wsfrm.cxx17
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx26
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx9
9 files changed, 86 insertions, 16 deletions
diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk
index 8ecdf60e6f87..d7835622ca21 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -39,7 +39,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \
--host=$(gb_ExternalProject_gpgmepp_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk
index 83d79a520988..899c21e4cec9 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -34,7 +34,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executabl
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
--host=$(gb_ExternalProject_libassuan_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk b/external/libgpg-error/ExternalProject_libgpg-error.mk
index 1fcd63180e20..e5155aad94c1 100644
--- a/external/libgpg-error/ExternalProject_libgpg-error.mk
+++ b/external/libgpg-error/ExternalProject_libgpg-error.mk
@@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Execut
--disable-doc \
--disable-tests \
--host=$(gb_ExternalProject_libgpg-error_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
&& $(MAKE) \
)
else
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 5f99ddc036bd..ab7986d388b5 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -60,6 +60,9 @@
<value install:module="unx">false</value>
<value install:module="wnt">true</value>
</prop>
+ <prop oor:name="AllowPdfToPdfEmbedding" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
</node>
<node oor:name="I18N">
<node oor:name="CTL">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index cc7fd9f2d85d..b0c738194f25 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -857,6 +857,14 @@
</info>
<value>false</value>
</prop>
+ <prop oor:name="AllowPdfToPdfEmbedding" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Specifies if at PDF export it is allowed to embed other PDFs which are
+ part of the Document in their original form or use another form of graphic
+ representation, e.g. pixel graphic.</desc>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="ForceOpenGL" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>Specifies if OpenGL rendering should be used in VCL backends
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index b865ce456b7d..36f58416a9e9 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -986,6 +986,39 @@ bool SfxObjectShell::DoSave()
pImpl->bIsSaving = true;
+ if (IsOwnStorageFormat(*GetMedium()))
+ {
+ SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_012;
+ if (!utl::ConfigManager::IsFuzzing())
+ {
+ SvtSaveOptions aSaveOpt;
+ nDefVersion = aSaveOpt.GetODFSaneDefaultVersion();
+ }
+ uno::Reference<beans::XPropertySet> const xProps(GetMedium()->GetStorage(), uno::UNO_QUERY);
+ assert(xProps.is());
+ if (nDefVersion >= SvtSaveOptions::ODFSVER_012) // property exists only since ODF 1.2
+ {
+ try // tdf#134582 set Version on embedded objects as they
+ { // could have been loaded with a different/old version
+#if 0
+// not on old branch
+ if (SvtSaveOptions::ODFSVER_013 <= nDefVersion)
+ {
+ xProps->setPropertyValue("Version", uno::makeAny<OUString>(ODFVER_013_TEXT));
+ }
+ else
+#endif
+ {
+ xProps->setPropertyValue("Version", uno::makeAny<OUString>(ODFVER_012_TEXT));
+ }
+ }
+ catch (uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("sfx.doc" /*, "SfxObjectShell::DoSave"*/);
+ }
+ }
+ }
+
uno::Sequence< beans::NamedValue > aEncryptionData;
if ( IsPackageStorageFormat_Impl( *GetMedium() ) )
{
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 95af7d95dda2..1e496df41395 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -45,6 +45,7 @@
#include <fmtcntnt.hxx>
#include <ftnfrm.hxx>
#include <tabfrm.hxx>
+#include <rowfrm.hxx>
#include <flyfrms.hxx>
#include <sectfrm.hxx>
#include <fmtclds.hxx>
@@ -1154,6 +1155,7 @@ void SwContentFrame::Cut()
}
}
+ SwTabFrame* pMasterTab(nullptr);
if( nullptr != (pFrame = GetIndNext()) )
{
// The old follow may have calculated a gap to the predecessor which
@@ -1217,11 +1219,9 @@ void SwContentFrame::Cut()
if ( IsInTab() )
{
SwTabFrame* pThisTab = FindTabFrame();
- SwTabFrame* pMasterTab = pThisTab && pThisTab->IsFollow() ? pThisTab->FindMaster() : nullptr;
- if ( pMasterTab )
+ if (pThisTab && pThisTab->IsFollow())
{
- pMasterTab->InvalidatePos_();
- pMasterTab->SetRemoveFollowFlowLinePending( true );
+ pMasterTab = pThisTab->FindMaster();
}
}
}
@@ -1229,8 +1229,17 @@ void SwContentFrame::Cut()
//Remove first, then shrink the upper.
SwLayoutFrame *pUp = GetUpper();
RemoveFromLayout();
+ assert(pUp || !pMasterTab);
if ( pUp )
{
+ if (pMasterTab
+ && !pMasterTab->GetFollow()->GetFirstNonHeadlineRow()->ContainsContent())
+ { // only do this if there's no content in other cells of the row!
+ pMasterTab->InvalidatePos_();
+ pMasterTab->SetRemoveFollowFlowLinePending(true);
+ }
+
+
SwSectionFrame *pSct = nullptr;
if ( !pUp->Lower() &&
( ( pUp->IsFootnoteFrame() && !pUp->IsColLocked() ) ||
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 28b9fc9f3bcc..32288d569728 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -138,20 +138,32 @@ public:
void testTdf121615();
void testTocLink();
+ // the following tests do *not* work when
+ // LIBO_ALLOW_PDF_TO_PDF_EMBEDDING is FALSE, so need
+ // to deactivate those. These are indeed the ones that
+ // check for reference/form and similar stuff
+ //BAD CPPUNIT_TEST(testTdf106059);
+ //BAD CPPUNIT_TEST(testTdf106693);
+ //BAD CPPUNIT_TEST(testForcePoint71);
+ //BAD CPPUNIT_TEST(testTdf106972);
+ //BAD CPPUNIT_TEST(testTdf106972Pdf17);
+ //BAD CPPUNIT_TEST(testTdf107018);
+ //BAD CPPUNIT_TEST(testTdf107089);
+
CPPUNIT_TEST_SUITE(PdfExportTest);
- CPPUNIT_TEST(testTdf106059);
+ // CPPUNIT_TEST(testTdf106059);
CPPUNIT_TEST(testTdf105461);
CPPUNIT_TEST(testTdf107868);
CPPUNIT_TEST(testTdf105093);
CPPUNIT_TEST(testTdf106206);
- CPPUNIT_TEST(testTdf106693);
- CPPUNIT_TEST(testForcePoint71);
- CPPUNIT_TEST(testTdf106972);
- CPPUNIT_TEST(testTdf106972Pdf17);
+ // CPPUNIT_TEST(testTdf106693);
+ // CPPUNIT_TEST(testForcePoint71);
+ // CPPUNIT_TEST(testTdf106972);
+ // CPPUNIT_TEST(testTdf106972Pdf17);
CPPUNIT_TEST(testSofthyphenPos);
CPPUNIT_TEST(testTdf107013);
- CPPUNIT_TEST(testTdf107018);
- CPPUNIT_TEST(testTdf107089);
+ // CPPUNIT_TEST(testTdf107018);
+ // CPPUNIT_TEST(testTdf107089);
CPPUNIT_TEST(testTdf99680);
CPPUNIT_TEST(testTdf99680_2);
CPPUNIT_TEST(testTdf108963);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 1a5f772af2e5..9173a94ab0dd 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -80,6 +80,7 @@
#include <textlineinfo.hxx>
#include <bitmapwriteaccess.hxx>
#include <impglyphitem.hxx>
+#include <officecfg/Office/Common.hxx>
#include "pdfwriter_impl.hxx"
@@ -9338,7 +9339,9 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject
// no pdf data.
rEmit.m_nBitmapObject = nBitmapObject;
- if (!rGraphic.hasPdfData())
+ static bool bAllowPdfToPdf(officecfg::Office::Common::VCL::AllowPdfToPdfEmbedding::get());
+ const bool bHasPdfDFata(bAllowPdfToPdf && rGraphic.hasPdfData());
+ if (!bHasPdfDFata)
return;
if (m_aContext.UseReferenceXObject)
@@ -9406,7 +9409,9 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
{
m_aJPGs.emplace( m_aJPGs.begin() );
JPGEmit& rEmit = m_aJPGs.front();
- if (!rGraphic.hasPdfData() || m_aContext.UseReferenceXObject)
+ static bool bAllowPdfToPdf(officecfg::Office::Common::VCL::AllowPdfToPdfEmbedding::get());
+ const bool bHasPdfDFata(bAllowPdfToPdf && rGraphic.hasPdfData());
+ if (!bHasPdfDFata || m_aContext.UseReferenceXObject)
rEmit.m_nObject = createObject();
rEmit.m_aID = aID;
rEmit.m_pStream = std::move( pStream );