summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-04-26 22:04:27 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-05-07 16:30:35 +0200
commit7a8ed362eb163ac15a000ba1cfc74b58315800a1 (patch)
tree79c1543ac1edd99a7cf3fe7f26573828b4b2be1e /writerfilter
parent3e7bea5ece847dcd7234f7e7fd310b1daab0eec1 (diff)
[API CHANGE] revert and deprecate *BackGraphicURL add *BackGraphic
*BackGraphicURL include the following properties: - BackGraphicURL - FooterBackGraphicURL - HeaderBackGraphicURL - ParaBackGraphicURL This were removed, but for backwards compatibility this commit adds them back again and depreactes them in the UNO API. The behaviour also changes as internal vnd.sun.star.GraphicObject scheme URLs aren't supported so this properties can only be set and only if a external URL is provided. If getting such a property then a RuntimeException will be thrown. [ Miklos Vajna: fixed up sw/qa and writerfilter bits. ] Change-Id: If60011837da96197b576bfe2671ecafccad736c7 Reviewed-on: https://gerrit.libreoffice.org/53511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index ca2042b11c28..f9a09b31df61 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -51,6 +51,7 @@
#include <comphelper/propertyvalue.hxx>
#include <tools/diagnose_ex.h>
#include "PropertyMapHelper.hxx"
+#include <set>
using namespace com::sun::star;
@@ -1459,10 +1460,18 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
uno::Reference< beans::XPropertySet > pageProperties( m_bTitlePage ? m_aFirstPageStyle : m_aFollowPageStyle );
uno::Reference< beans::XPropertySetInfo > pagePropertiesInfo( pageProperties->getPropertySetInfo() );
uno::Sequence< beans::Property > propertyList( pagePropertiesInfo->getProperties() );
+ // Ignore write-only properties.
+ static const std::set<OUString> aBlacklist
+ = { "FooterBackGraphicURL", "BackGraphicURL", "HeaderBackGraphicURL" };
for ( int i = 0; i < propertyList.getLength(); ++i )
{
if ( (propertyList[i].Attributes & beans::PropertyAttribute::READONLY) == 0 )
- evenOddStyle->setPropertyValue( propertyList[i].Name, pageProperties->getPropertyValue( propertyList[i].Name ) );
+ {
+ if (aBlacklist.find(propertyList[i].Name) == aBlacklist.end())
+ evenOddStyle->setPropertyValue(
+ propertyList[i].Name,
+ pageProperties->getPropertyValue(propertyList[i].Name));
+ }
}
evenOddStyle->setPropertyValue( "FollowStyle", uno::makeAny( *pageStyle ) );
rDM_Impl.GetPageStyles()->insertByName( evenOddStyleName, uno::makeAny( evenOddStyle ) );