From 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 9 Oct 2012 12:22:23 +0100 Subject: re-base on ALv2 code. Includes (at least) relevant parts of: linecap: Reintegrating finished LineCap feature Patch contributed by Regina Henschel http://svn.apache.org/viewvc?view=revision&revision=1232507 Patches contributed by Sven Jacobi impress212: #i81610# fixed animation export http://svn.apache.org/viewvc?view=revision&revision=1167620 impress212: drawinglayer gbuild environment changes http://svn.apache.org/viewvc?view=revision&revision=1167627 http://svn.apache.org/viewvc?view=revision&revision=1167628 impress212: DffPropSet -> minor code improvements, removing table http://svn.apache.org/viewvc?view=revision&revision=1167634 impress212: #158494# fixed excel import (text rotation) http://svn.apache.org/viewvc?view=revision&revision=1167638 Patches contributed by Armin Le Grand Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement http://svn.apache.org/viewvc?view=revision&revision=1220836 #118728# changed indentifying definitions for Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1229961 #118838# LineGeometry creation for complicated cases optimized to create single Polygons http://svn.apache.org/viewvc?view=revision&revision=1236232 #119176# corrected file type detection for SVG for svg files without xml header http://svn.apache.org/viewvc?view=revision&revision=1309445 #118728# Extended Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1230531 #118529# solve break converters and convert commands for OLEs and images http://svn.apache.org/viewvc?view=revision&revision=1186168 svg: added WaE changes from branch svgreplacement to trunc http://svn.apache.org/viewvc?view=revision&revision=1222974 svg: corrected missing member initialization http://svn.apache.org/viewvc?view=revision&revision=1226134 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert metafiles to bitmapEx ... http://svn.apache.org/viewvc?view=revision&revision=1293316 fix for #118525#: removed no longer used variable maOriginalMapMode, one more exception eliminated http://svn.apache.org/viewvc?view=revision&revision=1227097 #16758# Added buffering to the VDev usages of the VclProcessor2D derivates... http://svn.apache.org/viewvc?view=revision&revision=1229521 #116758# Secured VDev buffer device to Vcl deinit http://svn.apache.org/viewvc?view=revision&revision=1230574 #116758# added remembering allocated VDevs for VDevBuffer to be able to also delete these when vcl goes down; it should never happen, but You never know http://svn.apache.org/viewvc?view=revision&revision=1230927 #118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive representation instead of TransparencePrimitive2D http://svn.apache.org/viewvc?view=revision&revision=1231198 #118822# secured 3D geometry creation (slices) by subdividing the 2D source polyPolygon early http://svn.apache.org/viewvc?view=revision&revision=1234749 #118829# enhanced Svg gradient quality, obstacles avoided http://svn.apache.org/viewvc?view=revision&revision=1235361 #118834# Unified usage of TextBreakupHelper as single tooling class for i18n text primitive breakup http://svn.apache.org/viewvc?view=revision&revision=1236110 #118853# added square pixel size limit to conversion of TransparencePrimitive2D to Metafile action http://svn.apache.org/viewvc?view=revision&revision=1237656 #118824# coreccted mirroring and boundrect when the graphicmanager is used for bitmap output http://svn.apache.org/viewvc?view=revision&revision=1240097 #115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for various optimization scenarios http://svn.apache.org/viewvc?view=revision&revision=1241434 #118783# Corrected errors in ID strings, corrected Svg line/fill export, corrected polygon close state http://svn.apache.org/viewvc?view=revision&revision=1232006 #118796# corrected null-pointer usage in SVG text exporter http://svn.apache.org/viewvc?view=revision&revision=1240262 #118729# Use GraphicStreamUrl and GraphicUrl to allow multi image import with linked graphics, too http://svn.apache.org/viewvc?view=revision&revision=1229962 #118898# corrected error in GDIMetaFile::GetBoundRect in handling MetaFloatTransparentAction http://svn.apache.org/viewvc?view=revision&revision=1293349 #118855# Corrected handling of possibly created empty clipRegions after PolyPolygon clipping http://svn.apache.org/viewvc?view=revision&revision=1237725 #115962# Better (but not yet optimal, see comments in task) handling of MetaFloatTransparentAction in PDF export http://svn.apache.org/viewvc?view=revision&revision=1241078 IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ... http://svn.apache.org/viewvc?view=revision&revision=1200879 118779# Added svg content streaming in/out to ImpGraphic stream operators http://svn.apache.org/viewvc?view=revision&revision=1231908 linecap: correctons for WaE and mac drawing http://svn.apache.org/viewvc?view=revision&revision=1232793 svg: uses current system Dpi for Svg replacement image creation http://svn.apache.org/viewvc?view=revision&revision=1233948 Patches contributed by Mathias Bauer (and others) gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1394326 Remove duplicate header includes. cws mba34issues01: #i117720#: convert assertion into warning http://svn.apache.org/viewvc?view=revision&revision=1172352 118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand. http://svn.apache.org/viewvc?view=revision&revision=1182166 cws mba34issues01: #i117714#: remove assertion http://svn.apache.org/viewvc?view=revision&revision=1172357 Patch contributed by Jurgen Schmidt add some additional checks to ensure proper reading operations http://svn.apache.org/viewvc?view=revision&revision=1209022 mostly prefer our stream / bounds checking work. Patches contributed by Herbert Duerr #i118816# add clarifying comment regarding Font::*Color*() methods http://svn.apache.org/viewvc?view=revision&revision=1233833 extend macro->string handling for empty strings http://svn.apache.org/viewvc?view=revision&revision=1175801 avoid magic constants for SALCOLOR_NONE http://svn.apache.org/viewvc?view=revision&revision=1177543 initialize slant properly in ImplFontMetricData constructor (author=iorsh) http://svn.apache.org/viewvc?view=revision&revision=1177551 #i118675# make check for extension updates more stable http://svn.apache.org/viewvc?view=revision&revision=1214797 #a118617# remove VBasicEventListener.dll binary There are no known users depending on its CLSID http://svn.apache.org/viewvc?view=revision&revision=1203697 Patches contributed by Ariel Constenla-Haile Fix build breaker on Linux/gcc http://svn.apache.org/viewvc?view=revision&revision=1221104 Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG http://svn.apache.org/viewvc?view=revision&revision=1215559 Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117962# - method - consider instances of http://svn.apache.org/viewvc?view=revision&revision=1172120 sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 gnumake4 work variously from Hans-Joachim Lankenau http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1396782 http://svn.apache.org/viewvc?view=revision&revision=1394707 plus some amount of re-splitting of legacy headers. Patch contributed by Pavel Janik WaE: Remove unused variables. http://svn.apache.org/viewvc?view=revision&revision=1230697 Patches contributed by Takashi Ono mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 Patch contributed by Christian Lippka impress212: #i98044# re enable Text menu for outline and title shapes http://svn.apache.org/viewvc?view=revision&revision=1167639 Patch contributed by Andre Fischer 118674: Made category B code optional and disabled by default. http://svn.apache.org/viewvc?view=revision&revision=1215131 118881: Ignore empty paragraphs after bullets. http://svn.apache.org/viewvc?view=revision&revision=1296205 Patches contributed by Philipp Lohmann ooo340fixes: #i117780# use rtl allocator http://svn.apache.org/viewvc?view=revision&revision=1172087 ooo34gsl02: #i117807# fix an off by one error (index actually inside the pfb section header) http://svn.apache.org/viewvc?view=revision&revision=1167576 various cleanups, related compilation fixes, warning cleanups, re-working of obsolete stl template pieces to use boost instead, changed string classes, re-adapt KDE about data, about dialog, fixing warnings, and other fixes & improvements. Disable svg import / render for about/ branding code-paths for now. Restore full icon theme set. Remove OS/2 conditionals and sources. Remove conflicting gtk/full-screen monitors support. Retain existing svg rasterizer files - temporarily disabled. Standardize stringificaiton and fixup dllpostfix issues. Rename SvgGradientHelper::== to equalTo to avoid overloading issues. Use the flat GdiPlus API for LineCaps calls. --- filter/Library_msfilter.mk | 2 + filter/Package_inc.mk | 2 + filter/inc/filter/msfilter/dffpropset.hxx | 71 ++ filter/inc/filter/msfilter/dffrecordheader.hxx | 63 ++ filter/inc/filter/msfilter/escherex.hxx | 37 +- filter/inc/filter/msfilter/msdffimp.hxx | 129 +-- filter/source/config/tools/merge/FCFGMerge.cfg | 33 +- filter/source/config/tools/merge/pyAltFCFGMerge | 2 +- filter/source/flash/swfwriter1.cxx | 52 +- filter/source/graphicfilter/eos2met/eos2met.cxx | 62 +- filter/source/graphicfilter/epict/epict.cxx | 55 +- filter/source/graphicfilter/eps/eps.cxx | 78 +- filter/source/msfilter/dffpropset.cxx | 1344 +++++++++++++++++++++++ filter/source/msfilter/dffrecordheader.cxx | 41 + filter/source/msfilter/escherex.cxx | 70 +- filter/source/msfilter/msdffimp.cxx | 859 ++++----------- filter/source/msfilter/viscache.hxx | 37 +- filter/source/svg/svgexport.cxx | 47 +- filter/source/svg/svgwriter.cxx | 179 ++- filter/source/svg/svgwriter.hxx | 51 +- filter/source/svg/tokenmap.cxx | 27 +- 21 files changed, 2108 insertions(+), 1133 deletions(-) create mode 100644 filter/inc/filter/msfilter/dffpropset.hxx create mode 100644 filter/inc/filter/msfilter/dffrecordheader.hxx create mode 100644 filter/source/msfilter/dffpropset.cxx create mode 100644 filter/source/msfilter/dffrecordheader.cxx (limited to 'filter') diff --git a/filter/Library_msfilter.mk b/filter/Library_msfilter.mk index ea042bba87a1..098d72a9871a 100644 --- a/filter/Library_msfilter.mk +++ b/filter/Library_msfilter.mk @@ -56,6 +56,8 @@ $(eval $(call gb_Library_use_libraries,msfilter,\ $(eval $(call gb_Library_add_exception_objects,msfilter,\ filter/source/msfilter/countryid \ + filter/source/msfilter/dffpropset \ + filter/source/msfilter/dffrecordheader \ filter/source/msfilter/escherex \ filter/source/msfilter/eschesdo \ filter/source/msfilter/mscodec \ diff --git a/filter/Package_inc.mk b/filter/Package_inc.mk index 578fe96207df..f14893df1b61 100644 --- a/filter/Package_inc.mk +++ b/filter/Package_inc.mk @@ -20,6 +20,8 @@ $(eval $(call gb_Package_Package,filter_inc,$(SRCDIR)/filter/inc)) $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/msfilterdllapi.h,filter/msfilter/msfilterdllapi.h)) $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/countryid.hxx,filter/msfilter/countryid.hxx)) +$(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/dffpropset.hxx,filter/msfilter/dffpropset.hxx)) +$(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/dffrecordheader.hxx,filter/msfilter/dffrecordheader.hxx)) $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/escherex.hxx,filter/msfilter/escherex.hxx)) $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/mscodec.hxx,filter/msfilter/mscodec.hxx)) $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/msdffimp.hxx,filter/msfilter/msdffimp.hxx)) diff --git a/filter/inc/filter/msfilter/dffpropset.hxx b/filter/inc/filter/msfilter/dffpropset.hxx new file mode 100644 index 000000000000..a11b3822bd3f --- /dev/null +++ b/filter/inc/filter/msfilter/dffpropset.hxx @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef _DFFPROPSET_HXX +#define _DFFPROPSET_HXX + +#include +#include +#include +#include +#include + +struct DffPropFlags +{ + sal_uInt8 bSet : 1; + sal_uInt8 bComplex : 1; + sal_uInt8 bBlip : 1; + sal_uInt8 bSoftAttr : 1; +}; + +struct DffPropSetEntry +{ + DffPropFlags aFlags; + sal_uInt16 nComplexIndexOrFlagsHAttr; + sal_uInt32 nContent; +}; + +class MSFILTER_DLLPUBLIC DffPropSet +{ + private: + DffPropSetEntry* mpPropSetEntries; + std::vector< sal_uInt32 > maOffsets; + + void ReadPropSet( SvStream&, bool ); + + public: + explicit DffPropSet(); + ~DffPropSet(); + + inline sal_Bool IsProperty( sal_uInt32 nRecType ) const { return ( mpPropSetEntries[ nRecType & 0x3ff ].aFlags.bSet ); }; + sal_Bool IsHardAttribute( sal_uInt32 nId ) const; + sal_uInt32 GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault = 0 ) const; + /** Returns a boolean property by its real identifier. */ + bool GetPropertyBool( sal_uInt32 nId, bool bDefault = false ) const; + /** Returns a string property. */ + ::rtl::OUString GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const; + void SetPropertyValue( sal_uInt32 nId, sal_uInt32 nValue ) const; + sal_Bool SeekToContent( sal_uInt32 nRecType, SvStream& rSt ) const; + void InitializePropSet( sal_uInt16 nPropSetType ) const; + + friend SvStream& operator>>( SvStream& rIn, DffPropSet& rPropSet ); + friend SvStream& operator|=( SvStream& rIn, DffPropSet& rPropSet ); +}; + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/inc/filter/msfilter/dffrecordheader.hxx b/filter/inc/filter/msfilter/dffrecordheader.hxx new file mode 100644 index 000000000000..ca2fcc368c46 --- /dev/null +++ b/filter/inc/filter/msfilter/dffrecordheader.hxx @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef _DFFRECORDHEADER_HXX +#define _DFFRECORDHEADER_HXX + +#include +#include +#include +#include + +class MSFILTER_DLLPUBLIC DffRecordHeader +{ +public: + sal_uInt8 nRecVer; // may be DFF_PSFLAG_CONTAINER + sal_uInt16 nRecInstance; + sal_uInt16 nImpVerInst; + sal_uInt16 nRecType; + sal_uInt32 nRecLen; + sal_uLong nFilePos; + + DffRecordHeader() : nRecVer(0), nRecInstance(0), nImpVerInst(0), + nRecType(0), nRecLen(0), nFilePos(0) {} + bool IsContainer() const { return nRecVer == DFF_PSFLAG_CONTAINER; } + sal_uLong GetRecBegFilePos() const { return nFilePos; } + sal_uLong GetRecEndFilePos() const + { return nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; } + bool SeekToEndOfRecord(SvStream& rIn) const + { + sal_Size nPos = nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; + return nPos == rIn.Seek(nPos); + } + bool SeekToContent(SvStream& rIn) const + { + sal_Size nPos = nFilePos + DFF_COMMON_RECORD_HEADER_SIZE; + return nPos == rIn.Seek(nPos); + } + bool SeekToBegOfRecord(SvStream& rIn) const + { + return nFilePos == rIn.Seek(nFilePos); + } + + MSFILTER_DLLPUBLIC friend SvStream& operator>>(SvStream& rIn, DffRecordHeader& rRec); +}; + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx index a5b7352ecb5a..5182417333ff 100644 --- a/filter/inc/filter/msfilter/escherex.hxx +++ b/filter/inc/filter/msfilter/escherex.hxx @@ -1,30 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #ifndef _SVX_ESCHEREX_HXX #define _SVX_ESCHEREX_HXX diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx index e9e1b148346d..ef1946bdba65 100644 --- a/filter/inc/filter/msfilter/msdffimp.hxx +++ b/filter/inc/filter/msfilter/msdffimp.hxx @@ -1,30 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #ifndef FLT_MSDFFIMP_HXX #define FLT_MSDFFIMP_HXX @@ -53,10 +44,11 @@ #include #include +#include +#include #include - class Graphic; class SvStream; class SdrObject; @@ -66,91 +58,13 @@ class Polygon; class PolyPolygon; class FmFormModel; class SdrModel; -class DffRecordHeader; class SwFlyFrmFmt; struct SvxMSDffBLIPInfo; struct SvxMSDffShapeInfo; struct SvxMSDffShapeOrder; -class MSFILTER_DLLPUBLIC DffRecordHeader -{ -public: - sal_uInt8 nRecVer; // may be DFF_PSFLAG_CONTAINER - sal_uInt16 nRecInstance; - sal_uInt16 nImpVerInst; - sal_uInt16 nRecType; - sal_uInt32 nRecLen; - sal_uLong nFilePos; - - DffRecordHeader() : nRecVer(0), nRecInstance(0), nImpVerInst(0), - nRecType(0), nRecLen(0), nFilePos(0) {} - bool IsContainer() const { return nRecVer == DFF_PSFLAG_CONTAINER; } - sal_uLong GetRecBegFilePos() const { return nFilePos; } - sal_uLong GetRecEndFilePos() const - { return nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; } - bool SeekToEndOfRecord(SvStream& rIn) const - { - sal_Size nPos = nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; - return nPos == rIn.Seek(nPos); - } - bool SeekToContent(SvStream& rIn) const - { - sal_Size nPos = nFilePos + DFF_COMMON_RECORD_HEADER_SIZE; - return nPos == rIn.Seek(nPos); - } - bool SeekToBegOfRecord(SvStream& rIn) const - { - return nFilePos == rIn.Seek(nFilePos); - } - - MSFILTER_DLLPUBLIC friend SvStream& operator>>(SvStream& rIn, DffRecordHeader& rRec); -}; - -struct DffPropFlags -{ - sal_uInt8 bSet : 1; - sal_uInt8 bComplex : 1; - sal_uInt8 bBlip : 1; - sal_uInt8 bSoftAttr : 1; -}; - class SvxMSDffManager; - -class MSFILTER_DLLPUBLIC DffPropSet -{ -private: - void InitializeProp(sal_uInt32 nKey, sal_uInt32 nContent, - DffPropFlags& rFlags, sal_uInt32 nRecordType) const; - -protected: - typedef std::map RecordTypesMap; - - RecordTypesMap maRecordTypes; - sal_uInt32 mpContents[ 1024 ]; - DffPropFlags mpFlags[ 1024 ]; - -public: - explicit DffPropSet( sal_Bool bInitialize = sal_False ) - { - if ( bInitialize ) - memset( mpFlags, 0, 0x400 * sizeof( DffPropFlags ) ); - }; - - inline sal_Bool IsProperty( sal_uInt32 nRecType ) const - { return ( mpFlags[ nRecType & 0x3ff ].bSet ); }; - sal_Bool IsHardAttribute( sal_uInt32 nId ) const; - sal_uInt32 GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault = 0 ) const; - /** Returns a boolean property by its real identifier. */ - bool GetPropertyBool( sal_uInt32 nId, bool bDefault = false ) const; - /** Returns a string property. */ - ::rtl::OUString GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const; - sal_Bool SeekToContent( sal_uInt32 nRecType, SvStream& rSt ) const; - void Merge( DffPropSet& rMasterPropSet ) const; - void InitializePropSet() const; - friend SvStream& operator>>( SvStream& rIn, DffPropSet& rPropSet ); -}; - class SfxItemSet; class SdrObject; struct DffObjData; @@ -161,6 +75,7 @@ class MSFILTER_DLLPUBLIC DffPropertyReader : public DffPropSet DffPropSet* pDefaultPropSet; void ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const; + void CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const; void ApplyCustomShapeAdjustmentAttributes( SfxItemSet& rSet ) const; void ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxItemSet& rSet, @@ -182,7 +97,7 @@ public: void SetDefaultPropSet( SvStream& rIn, sal_uInt32 nOffDgg ) const; void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const; - void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const; + void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const; }; #define COL_DEFAULT RGB_COLORDATA( 0xFA, 0xFB, 0xFC ) @@ -394,7 +309,9 @@ struct DffObjData sal_Bool bClientData : 1; sal_Bool bChildAnchor : 1; sal_Bool bOpt : 1; + sal_Bool bOpt2 : 1; sal_Bool bIsAutoText : 1; + sal_Bool bRotateTextWithShape : 1; int nCalledByGroup; @@ -411,7 +328,9 @@ struct DffObjData bClientData( sal_False ), bChildAnchor( sal_False ), bOpt( sal_False ), + bOpt2( sal_False ), bIsAutoText( sal_False ), + bRotateTextWithShape( sal_True ), nCalledByGroup( nClByGroup ){} }; @@ -600,6 +519,7 @@ protected : virtual sal_Bool ShapeHasText(sal_uLong nShapeId, sal_uLong nFilePos) const; public: + DffPropertyReader* pSecPropSet; std::map aEscherBlipCache; DffRecordManager maShapeRecords; @@ -685,9 +605,6 @@ public: sal_uInt32 nLen, const GDIMetaFile*, const SotStorageRef & rDest ); - static rtl::OUString ReadDffString( SvStream& rSt, - DffRecordHeader aStrHd = DffRecordHeader()); - static bool ReadObjText(SvStream& rSt, SdrObject* pObj); void SetModel(SdrModel* pModel, long nApplicationScale); SdrModel* GetModel() const { return pSdrModel; } diff --git a/filter/source/config/tools/merge/FCFGMerge.cfg b/filter/source/config/tools/merge/FCFGMerge.cfg index 59d35b8be7bf..4516a777bc57 100644 --- a/filter/source/config/tools/merge/FCFGMerge.cfg +++ b/filter/source/config/tools/merge/FCFGMerge.cfg @@ -1,29 +1,20 @@ -#************************************************************************* # -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# This file is part of the LibreOffice project. # -# Copyright 2008 by Sun Microsystems, Inc. +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # -# OpenOffice.org - a multi-platform office productivity suite +# This file incorporates work covered by the following license notice: # -# This file is part of OpenOffice.org. +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . # -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* #************************************************ # Specify the verbose mode of this tool. diff --git a/filter/source/config/tools/merge/pyAltFCFGMerge b/filter/source/config/tools/merge/pyAltFCFGMerge index dfebbecfe21f..b05e37d9b32f 100755 --- a/filter/source/config/tools/merge/pyAltFCFGMerge +++ b/filter/source/config/tools/merge/pyAltFCFGMerge @@ -9,7 +9,7 @@ # there is a java which is available for use by all #_____________________________________________ -import sys, string, os.path, codecs +import sys, string, os.path, codecs CFGFILE = os.environ["SOLARVER"] + "/" + os.environ["INPATH_FOR_BUILD"] + "/inc/l10ntools/FCFGMerge.cfg" diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index c7e86955a9a2..cce56ee7c4db 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include #include @@ -40,7 +30,6 @@ #include #include #include -#include #ifndef _ZLIB_H #ifdef SYSTEM_ZLIB @@ -1833,19 +1822,6 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_RENDERGRAPHIC_ACTION ): - { - const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pAction; - const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); - const Point aPointPixel; - const Size aSizePixel( mpVDev->LogicToPixel( pA->GetSize() ) ); - const BitmapEx aBmpEx( aRasterizer.Rasterize( aSizePixel ) ); - - Impl_writeImage( aBmpEx, pA->GetPoint(), pA->GetSize(), - aPointPixel, aBmpEx.GetSizePixel(), clipRect, 1 == bMap ); - } - break; - case( META_MAPMODE_ACTION ): { bMap++; diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index 6849e5408d1a..834a0f462798 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include @@ -43,7 +33,6 @@ #include #include #include -#include #include @@ -175,7 +164,7 @@ private: // Callback as the case may be. Sets bStatus to sal_False if the user wants to cancel void CountActionsAndBitmaps(const GDIMetaFile * pMTF); - // Counts the bitmaps and actions (nNumberOfActions and nNumberOfBitmaps have to + // Counts the bitmaps and actions (nNumberOfActions and nNumberOfBitmaps have to // be set to 0 at the beginning, since this method is recursive) void WriteBigEndianShort(sal_uInt16 nWord); @@ -325,7 +314,6 @@ void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF) case META_BMPEX_ACTION: case META_BMPEXSCALE_ACTION: case META_BMPEXSCALEPART_ACTION: - case META_RENDERGRAPHIC_ACTION: nNumberOfBitmaps++; break; } @@ -799,17 +787,6 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF) } } break; - - case( META_RENDERGRAPHIC_ACTION ): - { - const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA; - const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); - const BitmapEx aBmpEx( aRasterizer.Rasterize( pCompDev->LogicToPixel( pA->GetSize() ) ) ); - - METSetMix( eGDIRasterOp ); - WriteImageObject( Graphic( aBmpEx ).GetBitmap() ); - } - break; } if (bStatus==sal_False) @@ -2332,15 +2309,6 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) WriteOrders( &aTmpMtf ); } break; - - case( META_RENDERGRAPHIC_ACTION ): - { - const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA; - - METSetMix( eGDIRasterOp ); - METBitBlt( pA->GetPoint(), pA->GetSize(), pCompDev->LogicToPixel( pA->GetSize(), pMTF->GetPrefMapMode() ) ); - } - break; } nWrittenActions++; diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index fe1c05c8d20a..f8934c1ae4b9 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include #include @@ -43,8 +33,6 @@ #include #include #include -#include - #include #include @@ -224,7 +212,6 @@ void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & rMTF) case META_BMPEX_ACTION: case META_BMPEXSCALE_ACTION: case META_BMPEXSCALEPART_ACTION: - case META_RENDERGRAPHIC_ACTION: nNumberOfBitmaps++; break; } @@ -254,7 +241,7 @@ Polygon PictWriter::PolyPolygonToPolygon(const PolyPolygon & rPolyPoly) nSize2=aPoly2.GetSize(); // At first we look for a point in aPoly1 (referenced by nBestIdx1) and a - // point in aPoly2 (referenced by nBestid2), which + // point in aPoly2 (referenced by nBestid2), which // Zunaechst werden ein Punkt in aPoly1 (referenziert durch nBestIdx1) und ein // Punkt in aPoly2 (referenziert durch nBestIdx2) gesucht, die moeglichst dicht // beieinander liegen. Da dies mit quadratischem Aufwand einher geht, und somit @@ -2150,18 +2137,6 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) WriteOpcodes( aTmpMtf ); } break; - - case( META_RENDERGRAPHIC_ACTION ): - { - const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA; - const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); - VirtualDevice aVirDev; - const Bitmap aBmp( Graphic( aRasterizer.Rasterize( - aVirDev.LogicToPixel( pA->GetSize() ) ) ).GetBitmap() ); - - WriteOpcode_BitsRect( pA->GetPoint(), pA->GetSize(), aBmp ); - } - break; } nWrittenActions++; diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index ba9f1a3dfae8..e8e0ab45543f 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. +/* + * This file is part of the LibreOffice project. * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. + * This file incorporates work covered by the following license notice: * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include #include @@ -46,7 +36,6 @@ #include #include #include -#include #include "strings.hrc" #include @@ -1367,7 +1356,6 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case META_BMPSCALEPART_ACTION : case META_BMPEXSCALE_ACTION : case META_BMPEXSCALEPART_ACTION : - case META_RENDERGRAPHIC_ACTION : { nBitmapCount++; nBitmapAction = nCurAction; @@ -1426,23 +1414,6 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) } } break; - - case( META_RENDERGRAPHIC_ACTION ): - { - const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA; - const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); - const BitmapEx aBmpEx( aRasterizer.Rasterize( rVDev.LogicToPixel( pA->GetSize() ) ) ); - Bitmap aBmp( aBmpEx.GetBitmap() ); - - if ( mbGrayScale ) - aBmp.Convert( BMP_CONVERSION_8BIT_GREYS ); - - Bitmap aMask( aBmpEx.GetMask() ); - Size aSize( pA->GetSize() ); - - ImplBmp( &aBmp, &aMask, pA->GetPoint(), aSize.Width(), aSize.Height() ); - } - break; } } } @@ -2419,6 +2390,7 @@ void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo ) l_aDashArray.push_back( 2 ); const double fLWidth(( ( rLineInfo.GetWidth() + 1 ) + ( rLineInfo.GetWidth() + 1 ) ) * 0.5); SvtGraphicStroke::JoinType aJoinType(SvtGraphicStroke::joinMiter); + SvtGraphicStroke::CapType aCapType(SvtGraphicStroke::capButt); switch(rLineInfo.GetLineJoin()) { @@ -2437,8 +2409,26 @@ void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo ) aJoinType = SvtGraphicStroke::joinRound; break; } + switch(rLineInfo.GetLineCap()) + { + default: /* com::sun::star::drawing::LineCap_BUTT */ + { + aCapType = SvtGraphicStroke::capButt; + break; + } + case com::sun::star::drawing::LineCap_ROUND: + { + aCapType = SvtGraphicStroke::capRound; + break; + } + case com::sun::star::drawing::LineCap_SQUARE: + { + aCapType = SvtGraphicStroke::capSquare; + break; + } + } - ImplWriteLineInfo( fLWidth, fMiterLimit, SvtGraphicStroke::capButt, aJoinType, l_aDashArray ); + ImplWriteLineInfo( fLWidth, fMiterLimit, aCapType, aJoinType, l_aDashArray ); } //--------------------------------------------------------------------------------- diff --git a/filter/source/msfilter/dffpropset.cxx b/filter/source/msfilter/dffpropset.cxx new file mode 100644 index 000000000000..c3ade4dfc055 --- /dev/null +++ b/filter/source/msfilter/dffpropset.cxx @@ -0,0 +1,1344 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include +#include + +static const DffPropSetEntry mso_PropSetDefaults[] = { + +// 0 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, + +// 64 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0 }, // DFF_Prop_LockAgainstGrouping + +// 128 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0x0010 }, // DFF_Prop_FitTextToShape + +// 192 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0 }, // DFF_Prop_gtextFStrikethrough + +//256 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0 }, // DFF_Prop_pictureActive + +// 320 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0x0039 }, // DFF_Prop_fFillOK + +// 384 +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0xffffff }, // DFF_Prop_fillColor +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0x001c }, // DFF_Prop_fNoFillHitTest + +// 448 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0x001e }, // DFF_Prop_fNoLineDrawDash + +// 512 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0 }, // DFF_Prop_fshadowObscured + +// 576 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0 }, // DFF_Prop_fPerspective + +// 640 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0x0001 }, // DFF_Prop_fc3DLightFace + +// 704 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0x0016 }, // DFF_Prop_fc3DFillHarsh + +// 768 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0 }, // DFF_Prop_fBackground + +// 832 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0x0010 }, // DFF_Prop_fCalloutLengthSpecified + +// 896 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { true, false, false, true }, 0, 0x0001 }, // DFF_Prop_fPrint + +// 960 +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 }, +{ { false, false, false, false }, 0, 0 } + +}; + +DffPropSet::DffPropSet() +{ + mpPropSetEntries = reinterpret_cast< DffPropSetEntry* >( new sal_uInt8[ 1024 * sizeof( DffPropSetEntry ) ] ); +} + +DffPropSet::~DffPropSet() +{ + delete[] reinterpret_cast< sal_uInt8* >( mpPropSetEntries ); +} + +void DffPropSet::ReadPropSet( SvStream& rIn, bool bSetUninitializedOnly ) +{ + DffRecordHeader aHd; + rIn >> aHd; + + if ( !bSetUninitializedOnly ) + { + InitializePropSet( aHd.nRecType ); + maOffsets.clear(); + } + + sal_uInt32 nPropCount = aHd.nRecInstance; + + // FilePos der ComplexData merken + sal_uInt32 nComplexDataFilePos = rIn.Tell() + ( nPropCount * 6 ); + + for( sal_uInt32 nPropNum = 0; nPropNum < nPropCount; nPropNum++ ) + { + sal_uInt16 nTmp; + sal_uInt32 nRecType, nContent; + rIn >> nTmp + >> nContent; + + nRecType = nTmp & 0x3fff; + + if ( nRecType > 0x3ff ) + break; + if ( ( nRecType & 0x3f ) == 0x3f ) + { + if ( bSetUninitializedOnly ) + { + sal_uInt32 nCurrentFlags = mpPropSetEntries[ nRecType ].nContent; + sal_uInt32 nMergeFlags = nContent; + + nMergeFlags &= ( nMergeFlags >> 16 ) | 0xffff0000; // clearing low word + nMergeFlags &= ( ( nCurrentFlags & 0xffff0000 ) // remove allready hard set + | ( nCurrentFlags >> 16 ) ) ^ 0xffffffff; // attributes from mergeflags + nCurrentFlags &= ( ( nMergeFlags & 0xffff0000 ) // apply zero master bits + | ( nMergeFlags >> 16 ) ) ^ 0xffffffff; + nCurrentFlags |= (sal_uInt16)nMergeFlags; // apply filled master bits + mpPropSetEntries[ nRecType ].nContent = nCurrentFlags; + mpPropSetEntries[ nRecType ].nComplexIndexOrFlagsHAttr |= static_cast< sal_uInt16 >( nContent >> 16 ); + } + else + { + // clear flags that have to be cleared + mpPropSetEntries[ nRecType ].nContent &= ( ( nContent >> 16 ) ^ 0xffffffff ); + // set flags that have to be set + mpPropSetEntries[ nRecType ].nContent |= nContent; + mpPropSetEntries[ nRecType ].nComplexIndexOrFlagsHAttr = static_cast< sal_uInt16 >( nContent >> 16 ); + } + } + else + { + bool bSetProperty = !bSetUninitializedOnly || ( !IsProperty( nRecType ) || !IsHardAttribute( nRecType ) ); + + DffPropFlags aPropFlag = { 1, 0, 0, 0 }; + if ( nTmp & 0x4000 ) + aPropFlag.bBlip = sal_True; + if ( nTmp & 0x8000 ) + aPropFlag.bComplex = sal_True; + if ( aPropFlag.bComplex && nContent && ( nComplexDataFilePos < aHd.GetRecEndFilePos() ) ) + { + // normally nContent is the complete size of the complex property, + // but this is not always true for IMsoArrays ( what the hell is a IMsoArray ? ) + + // I love special threatments :-( + if ( ( nRecType == DFF_Prop_pVertices ) || ( nRecType == DFF_Prop_pSegmentInfo ) + || ( nRecType == DFF_Prop_fillShadeColors ) || ( nRecType == DFF_Prop_lineDashStyle ) + || ( nRecType == DFF_Prop_pWrapPolygonVertices ) || ( nRecType == DFF_Prop_connectorPoints ) + || ( nRecType == DFF_Prop_Handles ) || ( nRecType == DFF_Prop_pFormulas ) + || ( nRecType == DFF_Prop_textRectangles ) ) + { + // now check if the current content size is possible, or 6 bytes too small + sal_uInt32 nOldPos = rIn.Tell(); + sal_Int16 nNumElem, nNumElemReserved, nSize; + + rIn.Seek( nComplexDataFilePos ); + rIn >> nNumElem >> nNumElemReserved >> nSize; + if ( nNumElemReserved >= nNumElem ) + { + // the size of these array elements is nowhere defined, + // what if the size is negative ? + // ok, we will make it positive and shift it. + // for -16 this works + if ( nSize < 0 ) + nSize = ( -nSize ) >> 2; + sal_uInt32 nDataSize = (sal_uInt32)( nSize * nNumElem ); + + // sometimes the content size is 6 bytes too small (array header information is missing ) + if ( nDataSize == nContent ) + nContent += 6; + + // check if array fits into the PropertyContainer + if ( ( nComplexDataFilePos + nContent ) > aHd.GetRecEndFilePos() ) + nContent = 0; + } + else + nContent = 0; + rIn.Seek( nOldPos ); + } + if ( nContent ) + { + if ( bSetProperty ) + { + mpPropSetEntries[ nRecType ].nComplexIndexOrFlagsHAttr = static_cast< sal_uInt16 >( maOffsets.size() ); + maOffsets.push_back( nComplexDataFilePos ); // insert the filepos of this property; + } + nComplexDataFilePos += nContent; // store filepos, that is used for the next complex property + } + else // a complex property needs content + aPropFlag.bSet = sal_False; // otherwise something is wrong + } + if ( bSetProperty ) + { + mpPropSetEntries[ nRecType ].nContent = nContent; + mpPropSetEntries[ nRecType ].aFlags = aPropFlag; + } + } + } + aHd.SeekToEndOfRecord( rIn ); +} + +SvStream& operator>>( SvStream& rIn, DffPropSet& rRec ) +{ + rRec.ReadPropSet( rIn, false ); + return rIn; +} + +SvStream& operator|=( SvStream& rIn, DffPropSet& rRec ) +{ + rRec.ReadPropSet( rIn, true ); + return rIn; +} + +void DffPropSet::InitializePropSet( sal_uInt16 nPropSetType ) const +{ + /* + cmc: + " Boolean properties are grouped in bitfields by property set; note that + the Boolean properties in each property set are contiguous. They are saved + under the property ID of the last Boolean property in the set, and are + placed in the value field in reverse order starting with the last property + in the low bit. " + + e.g. + + fEditedWrap + fBehindDocument + fOnDblClickNotify + fIsButton + fOneD + fHidden + fPrint + + are all part of a group and all are by default false except for fPrint, + which equates to a default bit sequence for the group of 0000001 -> 0x1 + + If at a later stage word sets fBehindDocument away from the default it + will be done by having a property named fPrint whose bitsequence will have + the fBehindDocument bit set. e.g. a DFF_Prop_fPrint with value 0x200020 + has set bit 6 on so as to enable fBehindDocument (as well as disabling + everything else) + */ + if ( nPropSetType == DFF_msofbtOPT ) + { + memcpy( mpPropSetEntries, mso_PropSetDefaults, 0x400 * sizeof( DffPropSetEntry ) ); + } + else + { + memset( mpPropSetEntries, 0, 0x400 * sizeof( DffPropSetEntry ) ); + } +} + +sal_Bool DffPropSet::IsHardAttribute( sal_uInt32 nId ) const +{ + sal_Bool bRetValue = sal_True; + nId &= 0x3ff; + if ( ( nId & 0x3f ) >= 48 ) // is this a flag id + bRetValue = ( mpPropSetEntries[ nId ].nComplexIndexOrFlagsHAttr & ( 1 << ( 0xf - ( nId & 0xf ) ) ) ) != 0; + else + bRetValue = ( mpPropSetEntries[ nId ].aFlags.bSoftAttr == 0 ); + return bRetValue; +}; + +sal_uInt32 DffPropSet::GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault ) const +{ + nId &= 0x3ff; + return ( mpPropSetEntries[ nId ].aFlags.bSet ) ? mpPropSetEntries[ nId ].nContent : nDefault; +}; + +bool DffPropSet::GetPropertyBool( sal_uInt32 nId, bool bDefault ) const +{ + sal_uInt32 nBaseId = nId | 31; // base ID to get the sal_uInt32 property value + sal_uInt32 nMask = 1 << (nBaseId - nId); // bit mask of the boolean property + + sal_uInt32 nPropValue = GetPropertyValue( nBaseId, bDefault ? nMask : 0 ); + return (nPropValue & nMask) != 0; +} + +::rtl::OUString DffPropSet::GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const +{ + sal_Size nOldPos = rStrm.Tell(); + ::rtl::OUStringBuffer aBuffer; + sal_uInt32 nBufferSize = GetPropertyValue( nId ); + if( (nBufferSize > 0) && SeekToContent( nId, rStrm ) ) + { + sal_Int32 nStrLen = static_cast< sal_Int32 >( nBufferSize / 2 ); + //clip initial size of buffer to something sane in case of silly length + //strings. If there really is a silly amount of data available it still + //works out ok of course + aBuffer.ensureCapacity(std::min(nStrLen,static_cast(8192))); + for( sal_Int32 nCharIdx = 0; nCharIdx < nStrLen; ++nCharIdx ) + { + sal_uInt16 nChar = 0; + rStrm >> nChar; + if( nChar > 0 ) + aBuffer.append( static_cast< sal_Unicode >( nChar ) ); + else + break; + } + } + rStrm.Seek( nOldPos ); + return aBuffer.makeStringAndClear(); +} + +void DffPropSet::SetPropertyValue( sal_uInt32 nId, sal_uInt32 nValue ) const +{ + nId &= 0x3ff; + mpPropSetEntries[ nId ].aFlags.bSet = true; + mpPropSetEntries[ nId ].nContent = nValue; +}; + +sal_Bool DffPropSet::SeekToContent( sal_uInt32 nRecType, SvStream& rStrm ) const +{ + nRecType &= 0x3ff; + if ( mpPropSetEntries[ nRecType ].aFlags.bSet ) + { + if ( mpPropSetEntries[ nRecType ].aFlags.bComplex ) + { + sal_uInt16 nIndex = mpPropSetEntries[ nRecType ].nComplexIndexOrFlagsHAttr; + if ( nIndex < maOffsets.size() ) + { + rStrm.Seek( maOffsets[ nIndex ] ); + return sal_True; + } + } + } + return sal_False; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/msfilter/dffrecordheader.cxx b/filter/source/msfilter/dffrecordheader.cxx new file mode 100644 index 000000000000..74c2c8566456 --- /dev/null +++ b/filter/source/msfilter/dffrecordheader.cxx @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include + +SvStream& operator>>( SvStream& rIn, DffRecordHeader& rRec ) +{ + rRec.nFilePos = rIn.Tell(); + sal_uInt16 nTmp(0); + rIn >> nTmp; + rRec.nImpVerInst = nTmp; + rRec.nRecVer = sal::static_int_cast< sal_uInt8 >(nTmp & 0x000F); + rRec.nRecInstance = nTmp >> 4; + rIn >> rRec.nRecType; + rIn >> rRec.nRecLen; + + // preserving overflow, optimally we would check + // the record size against the parent header + if ( rRec.nRecLen > ( SAL_MAX_UINT32 - rRec.nFilePos ) ) + rIn.SetError( SVSTREAM_FILEFORMAT_ERROR ); + + return rIn; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index fd2ef5288f6b..33314f4c70f8 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1,30 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "eschesdo.hxx" #include @@ -54,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -849,6 +841,35 @@ void EscherPropertyContainer::CreateLineProperties( AddOpt( ESCHER_Prop_lineEndArrowhead, eLineEnd ); nLineFlags |= 0x100010; } + + // support LineCaps + if(EscherPropertyValueHelper::GetPropertyValue(aAny, rXPropSet, String(RTL_CONSTASCII_USTRINGPARAM("LineCap")), sal_False)) + { + ::com::sun::star::drawing::LineCap aLineCap(com::sun::star::drawing::LineCap_BUTT); + + if(aAny >>= aLineCap) + { + switch (aLineCap) + { + default: /* com::sun::star::drawing::LineCap_BUTT */ + { + AddOpt(ESCHER_Prop_lineEndCapStyle, ESCHER_LineEndCapFlat); + break; + } + case com::sun::star::drawing::LineCap_ROUND: + { + AddOpt(ESCHER_Prop_lineEndCapStyle, ESCHER_LineEndCapRound); + break; + } + case com::sun::star::drawing::LineCap_SQUARE: + { + AddOpt(ESCHER_Prop_lineEndCapStyle, ESCHER_LineEndCapSquare); + break; + } + } + } + } + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" ) ), sal_False ) ) { @@ -4091,7 +4112,8 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst ) } else if ( nGluePointType == com::sun::star::drawing::EnhancedCustomShapeGluePointType::SEGMENTS ) { - SdrObject* pPoly = pCustoShape->DoConvertToPolyObj( sal_True ); + // FIXME_REMOVE_WHEN_RE_BASE_COMPLETE + SdrObject* pPoly = pCustoShape->DoConvertToPolyObj( sal_True /*, true */ ); if ( pPoly && pPoly->ISA( SdrPathObj ) ) { sal_Int16 a, b, nIndex = 0; diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index ed07cd1e5b70..9081122bb4ce 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include @@ -41,6 +31,8 @@ #include #include #include +#include +#include #include #include #include @@ -205,319 +197,11 @@ void Impl_OlePres::Write( SvStream & rStm ) rStm.Seek( nEndPos ); } -//--------------------------------------------------------------------------- -// Hilfs Klassen aus MSDFFDEF.HXX -//--------------------------------------------------------------------------- - -SvStream& operator>>( SvStream& rIn, DffRecordHeader& rRec ) -{ - rRec.nFilePos = rIn.Tell(); - sal_uInt16 nTmp(0); - rIn >> nTmp; - rRec.nImpVerInst = nTmp; - rRec.nRecVer = sal::static_int_cast< sal_uInt8 >(nTmp & 0x000F); - rRec.nRecInstance = nTmp >> 4; - rIn >> rRec.nRecType; - rIn >> rRec.nRecLen; - return rIn; -} - -SvStream& operator>>( SvStream& rIn, DffPropSet& rRec ) -{ - rRec.InitializePropSet(); - - DffRecordHeader aHd; - rIn >> aHd; - sal_uInt32 nPropCount = aHd.nRecInstance; - - // remember FilePos of the ComplexData - sal_uInt32 nComplexDataFilePos = rIn.Tell() + ( nPropCount * 6 ); - - for( sal_uInt32 nPropNum = 0; nPropNum < nPropCount; nPropNum++ ) - { - sal_uInt16 nTmp; - sal_uInt32 nRecType, nContent, nContentEx = 0xffff0000; - rIn >> nTmp - >> nContent; - - nRecType = nTmp & 0x3fff; - - if ( nRecType > 0x3ff ) - break; - if ( ( nRecType & 0x3f ) == 0x3f ) - { // clear flags that have to be cleared - rRec.mpContents[ nRecType ] &= ( ( nContent >> 16 ) ^ 0xffffffff ); - // set flags that have to be set - rRec.mpContents[ nRecType ] |= nContent; - nContentEx |= ( nContent >> 16 ); - rRec.maRecordTypes[ nRecType ] = nContentEx; - } - else - { - DffPropFlags aPropFlag = { 1, 0, 0, 0 }; - if ( nTmp & 0x4000 ) - aPropFlag.bBlip = sal_True; - if ( nTmp & 0x8000 ) - aPropFlag.bComplex = sal_True; - if ( aPropFlag.bComplex && nContent && ( nComplexDataFilePos < aHd.GetRecEndFilePos() ) ) - { - // normally nContent is the complete size of the complex property, - // but this is not always true for IMsoArrays ( what the hell is a IMsoArray ? ) - - // I love special treatments :-( - if ( ( nRecType == DFF_Prop_pVertices ) || ( nRecType == DFF_Prop_pSegmentInfo ) - || ( nRecType == DFF_Prop_fillShadeColors ) || ( nRecType == DFF_Prop_lineDashStyle ) - || ( nRecType == DFF_Prop_pWrapPolygonVertices ) || ( nRecType == DFF_Prop_connectorPoints ) - || ( nRecType == DFF_Prop_Handles ) || ( nRecType == DFF_Prop_pFormulas ) - || ( nRecType == DFF_Prop_textRectangles ) ) - { - // now check if the current content size is possible, or 6 bytes too small - sal_uInt32 nOldPos = rIn.Tell(); - sal_Int16 nNumElem, nNumElemReserved, nSize; - - rIn.Seek( nComplexDataFilePos ); - rIn >> nNumElem >> nNumElemReserved >> nSize; - if ( nNumElemReserved >= nNumElem ) - { - // the size of these array elements is nowhere defined, - // what if the size is negative ? - // ok, we will make it positive and shift it. - // for -16 this works - if ( nSize < 0 ) - nSize = ( -nSize ) >> 2; - sal_uInt32 nDataSize = (sal_uInt32)( nSize * nNumElem ); - - // sometimes the content size is 6 bytes too small (array header information is missing ) - if ( nDataSize == nContent ) - nContent += 6; - - // check if array fits into the PropertyContainer - if ( ( nComplexDataFilePos + nContent ) > aHd.GetRecEndFilePos() ) - nContent = 0; - } - else - nContent = 0; - rIn.Seek( nOldPos ); - } - if ( nContent ) - { - nContentEx = nComplexDataFilePos; // insert the filepos of this property; - nComplexDataFilePos += nContent; // store filepos, that is used for the next complex property - } - else // a complex property needs content - aPropFlag.bSet = sal_False; // otherwise something is wrong - } - rRec.mpContents[ nRecType ] = nContent; - rRec.mpFlags[ nRecType ] = aPropFlag; - rRec.maRecordTypes[ nRecType ] = nContentEx; - } - } - aHd.SeekToEndOfRecord( rIn ); - return rIn; -} - -void DffPropSet::InitializePropSet() const -{ - /* - cmc: - " Boolean properties are grouped in bitfields by property set; note that - the Boolean properties in each property set are contiguous. They are saved - under the property ID of the last Boolean property in the set, and are - placed in the value field in reverse order starting with the last property - in the low bit. " - - e.g. - - fEditedWrap - fBehindDocument - fOnDblClickNotify - fIsButton - fOneD - fHidden - fPrint - - are all part of a group and all are by default false except for fPrint, - which equates to a default bit sequence for the group of 0000001 -> 0x1 - - If at a later stage word sets fBehindDocument away from the default it - will be done by having a property named fPrint whose bitsequence will have - the fBehindDocument bit set. e.g. a DFF_Prop_fPrint with value 0x200020 - has set bit 6 on so as to enable fBehindDocument (as well as disabling - everything else) - */ - - DffPropSet* self = (DffPropSet*) this; - memset( self->mpFlags, 0, 0x400 * sizeof(DffPropFlags) ); - self->maRecordTypes.clear(); - - DffPropFlags nFlags = { 1, 0, 0, 1 }; - - //0x01ff0000; - InitializeProp( DFF_Prop_LockAgainstGrouping, 0x0000, nFlags, 0xffff0000 ); - //0x001f0010; - InitializeProp( DFF_Prop_FitTextToShape, 0x0010, nFlags, 0xffff0000 ); - //0xffff0000; - InitializeProp( DFF_Prop_gtextFStrikethrough, 0x0000, nFlags, 0xffff0000 ); - //0x000f0000; - InitializeProp( DFF_Prop_pictureActive, 0x0000, nFlags, 0xffff0000 ); - //0x003f0039; - InitializeProp( DFF_Prop_fFillOK, 0x0039, nFlags, 0xffff0000 ); - //0x001f001c; - InitializeProp( DFF_Prop_fNoFillHitTest, 0x001c, nFlags, 0xffff0000 ); - //0x001f000e; - InitializeProp( DFF_Prop_fNoLineDrawDash, 0x001e, nFlags, 0xffff0000 ); - //0x00030000; - InitializeProp( DFF_Prop_fshadowObscured, 0x0000, nFlags, 0xffff0000 ); - //0x00010000; - InitializeProp( DFF_Prop_fPerspective, 0x0000, nFlags, 0xffff0000 ); - //0x000f0001; - InitializeProp( DFF_Prop_fc3DLightFace, 0x0001, nFlags, 0xffff0000 ); - //0x001f0016; - InitializeProp( DFF_Prop_fc3DFillHarsh, 0x0016, nFlags, 0xffff0000 ); - //0x001f0000; - InitializeProp( DFF_Prop_fBackground, 0x0000, nFlags, 0xffff0000 ); - //0x00ef0010; - InitializeProp( DFF_Prop_fCalloutLengthSpecified, 0x0010, nFlags, 0xffff0000 ); - //0x00ef0001; - InitializeProp( DFF_Prop_fPrint, 0x0001, nFlags, 0xffff0000 ); - - InitializeProp( DFF_Prop_fillColor, 0xffffff, nFlags, 0xffff0000 ); -} - -void DffPropSet::InitializeProp(sal_uInt32 nKey, sal_uInt32 nContent, DffPropFlags& rFlags, sal_uInt32 nRecordType ) const -{ - DffPropSet* self = (DffPropSet*) this; - self->mpContents[ nKey ] = nContent; - self->mpFlags[ nKey ] = rFlags; - self->maRecordTypes[ nKey ] = nRecordType; -} - - -void DffPropSet::Merge( DffPropSet& rMaster ) const -{ - for ( RecordTypesMap::const_iterator it = rMaster.maRecordTypes.begin(); - it != rMaster.maRecordTypes.end(); ++it ) - { - sal_uInt32 nRecType = it->first; - if ( ( nRecType & 0x3f ) == 0x3f ) // this is something called FLAGS - { - sal_uInt32 nCurrentFlags = mpContents[ nRecType ]; - sal_uInt32 nMergeFlags = rMaster.mpContents[ nRecType ]; - nMergeFlags &= ( nMergeFlags >> 16 ) | 0xffff0000; // clearing low word - nMergeFlags &= ( ( nCurrentFlags & 0xffff0000 ) // remove already hard set - | ( nCurrentFlags >> 16 ) ) ^ 0xffffffff; // attributes from mergeflags - nCurrentFlags &= ( ( nMergeFlags & 0xffff0000 ) // apply zero master bits - | ( nMergeFlags >> 16 ) ) ^ 0xffffffff; - nCurrentFlags |= (sal_uInt16)nMergeFlags; // apply filled master bits - ( (DffPropSet*) this )->mpContents[ nRecType ] = nCurrentFlags; - - - sal_uInt32 nNewContentEx = it->second; - RecordTypesMap::const_iterator it2 = maRecordTypes.find( nRecType ); - if ( it2 != maRecordTypes.end() ) - nNewContentEx |= it2->second; - ( (DffPropSet*) this )->maRecordTypes[ nRecType ] = nNewContentEx; - } - else - { - if ( !IsProperty( nRecType ) || !IsHardAttribute( nRecType ) ) - { - ( (DffPropSet*) this )->mpContents[ nRecType ] = rMaster.mpContents[ nRecType ]; - DffPropFlags nFlags( rMaster.mpFlags[ nRecType ] ); - nFlags.bSoftAttr = sal_True; - ( (DffPropSet*) this )->mpFlags[ nRecType ] = nFlags; - ( (DffPropSet*) this )->maRecordTypes[ nRecType ] = it->second; - } - } - } -} - -sal_Bool DffPropSet::IsHardAttribute( sal_uInt32 nId ) const -{ - sal_Bool bRetValue = sal_True; - nId &= 0x3ff; - if ( ( nId & 0x3f ) >= 48 ) // is this a flag id - { - RecordTypesMap::const_iterator it = maRecordTypes.find( nId | 0x3f ); - if ( it != maRecordTypes.end() ) - { - sal_uInt32 nContentEx = it->second; - bRetValue = ( nContentEx & ( 1 << ( 0xf - ( nId & 0xf ) ) ) ) != 0; - } - } - else - bRetValue = ( mpFlags[ nId ].bSoftAttr == 0 ); - return bRetValue; -}; - -sal_uInt32 DffPropSet::GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault ) const -{ - nId &= 0x3ff; - return ( mpFlags[ nId ].bSet ) ? mpContents[ nId ] : nDefault; -}; - -bool DffPropSet::GetPropertyBool( sal_uInt32 nId, bool bDefault ) const -{ - sal_uInt32 nBaseId = nId | 31; // base ID to get the sal_uInt32 property value - sal_uInt32 nMask = 1 << (nBaseId - nId); // bit mask of the boolean property - - sal_uInt32 nPropValue = GetPropertyValue( nBaseId, bDefault ? nMask : 0 ); - return (nPropValue & nMask) != 0; -} - -::rtl::OUString DffPropSet::GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const -{ - sal_Size nOldPos = rStrm.Tell(); - ::rtl::OUStringBuffer aBuffer; - sal_uInt32 nBufferSize = GetPropertyValue( nId ); - if( (nBufferSize > 0) && SeekToContent( nId, rStrm ) ) - { - sal_Int32 nStrLen = static_cast< sal_Int32 >( nBufferSize / 2 ); - //clip initial size of buffer to something sane in case of silly length - //strings. If there really is a silly amount of data available it still - //works out ok of course - aBuffer.ensureCapacity(std::min(nStrLen,static_cast(8192))); - for( sal_Int32 nCharIdx = 0; nCharIdx < nStrLen; ++nCharIdx ) - { - sal_uInt16 nChar = 0; - rStrm >> nChar; - if( nChar > 0 ) - aBuffer.append( static_cast< sal_Unicode >( nChar ) ); - else - break; - } - } - rStrm.Seek( nOldPos ); - return aBuffer.makeStringAndClear(); -} - -sal_Bool DffPropSet::SeekToContent( sal_uInt32 nRecType, SvStream& rStrm ) const -{ - nRecType &= 0x3ff; - if ( mpFlags[ nRecType ].bSet ) - { - if ( mpFlags[ nRecType ].bComplex ) - { - RecordTypesMap::const_iterator it = maRecordTypes.find( nRecType ); - if ( it != maRecordTypes.end() ) - { - sal_uInt32 nOffset = it->second; - if ( nOffset && ( ( nOffset & 0xffff0000 ) != 0xffff0000 ) ) - { - rStrm.Seek( nOffset ); - return sal_True; - } - } - } - } - return sal_False; -} - DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan ) : rManager( rMan ), pDefaultPropSet( NULL ) { - InitializePropSet(); + InitializePropSet( DFF_msofbtOPT ); } void DffPropertyReader::SetDefaultPropSet( SvStream& rStCtrl, sal_uInt32 nOffsDgg ) const @@ -555,9 +239,7 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const rIn >> aRecHd; if ( rManager.SeekToRec( rIn, DFF_msofbtOPT, aRecHd.GetRecEndFilePos() ) ) { - DffPropSet aMasterPropSet; - rIn >> aMasterPropSet; - Merge( aMasterPropSet ); + rIn |= (DffPropertyReader&)*this; } } } @@ -1217,22 +899,43 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh if ( nLineFlags & 8 ) { - // Linienattribute + // Line Attributes sal_Int32 nLineWidth = (sal_Int32)GetPropertyValue( DFF_Prop_lineWidth, 9525 ); + // support LineCap + const MSO_LineCap eLineCap((MSO_LineCap)GetPropertyValue(DFF_Prop_lineEndCapStyle, mso_lineEndCapSquare)); + + switch(eLineCap) + { + default: /* case mso_lineEndCapFlat */ + { + // no need to set, it is the default. If this changes, this needs to be activated + // rSet.Put(XLineCapItem(com::sun::star::drawing::LineCap_BUTT)); + break; + } + case mso_lineEndCapRound: + { + rSet.Put(XLineCapItem(com::sun::star::drawing::LineCap_ROUND)); + break; + } + case mso_lineEndCapSquare: + { + rSet.Put(XLineCapItem(com::sun::star::drawing::LineCap_SQUARE)); + break; + } + } + MSO_LineDashing eLineDashing = (MSO_LineDashing)GetPropertyValue( DFF_Prop_lineDashing, mso_lineSolid ); if ( eLineDashing == mso_lineSolid ) rSet.Put(XLineStyleItem( XLINE_SOLID ) ); else { -// MSO_LineCap eLineCap = (MSO_LineCap)GetPropertyValue( DFF_Prop_lineEndCapStyle, mso_lineEndCapSquare ); - XDashStyle eDash = XDASH_RECT; sal_uInt16 nDots = 1; sal_uInt32 nDotLen = nLineWidth / 360; sal_uInt16 nDashes = 0; sal_uInt32 nDashLen = ( 8 * nLineWidth ) / 360; - sal_uInt32 nDistance = ( 3 * nLineWidth ) / 360;; + sal_uInt32 nDistance = ( 3 * nLineWidth ) / 360; switch ( eLineDashing ) { @@ -1349,24 +1052,6 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh rSet.Put( XLineEndItem( aArrowName, aPolyPoly ) ); rSet.Put( XLineEndCenterItem( bArrowCenter ) ); } - if ( IsProperty( DFF_Prop_lineEndCapStyle ) ) - { - MSO_LineCap eLineCap = (MSO_LineCap)GetPropertyValue( DFF_Prop_lineEndCapStyle ); - const SfxPoolItem* pPoolItem = NULL; - if ( rSet.GetItemState( XATTR_LINEDASH, sal_False, &pPoolItem ) == SFX_ITEM_SET ) - { - XDashStyle eNewStyle = XDASH_RECT; - if ( eLineCap == mso_lineEndCapRound ) - eNewStyle = XDASH_ROUND; - const XDash& rOldDash = ( (const XLineDashItem*)pPoolItem )->GetDashValue(); - if ( rOldDash.GetDashStyle() != eNewStyle ) - { - XDash aNew( rOldDash ); - aNew.SetDashStyle( eNewStyle ); - rSet.Put( XLineDashItem( rtl::OUString(), aNew ) ); - } - } - } } } else @@ -2890,91 +2575,65 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const ApplyAttributes( rIn, rSet, aDffObjTemp ); } -void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const +void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const { sal_Bool bHasShadow = sal_False; - for ( RecordTypesMap::const_iterator it = maRecordTypes.begin(); it != maRecordTypes.end(); ++it ) + if ( IsProperty( DFF_Prop_gtextSize ) ) + rSet.Put( SvxFontHeightItem( rManager.ScalePt( GetPropertyValue( DFF_Prop_gtextSize ) ), 100, EE_CHAR_FONTHEIGHT ) ); + sal_uInt32 nFontAttributes = GetPropertyValue( DFF_Prop_gtextFStrikethrough ); + if ( nFontAttributes & 0x20 ) + rSet.Put( SvxWeightItem( nFontAttributes & 0x20 ? WEIGHT_BOLD : WEIGHT_NORMAL, EE_CHAR_WEIGHT ) ); + if ( nFontAttributes & 0x10 ) + rSet.Put( SvxPostureItem( nFontAttributes & 0x10 ? ITALIC_NORMAL : ITALIC_NONE, EE_CHAR_ITALIC ) ); + if ( nFontAttributes & 0x08 ) + rSet.Put( SvxUnderlineItem( nFontAttributes & 0x08 ? UNDERLINE_SINGLE : UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); + if ( nFontAttributes & 0x40 ) + rSet.Put( SvxShadowedItem( ( nFontAttributes & 0x40 ) != 0, EE_CHAR_SHADOW ) ); +// if ( nFontAttributes & 0x02 ) +// rSet.Put( SvxCaseMapItem( nFontAttributes & 0x02 ? SVX_CASEMAP_KAPITAELCHEN : SVX_CASEMAP_NOT_MAPPED ) ); + if ( nFontAttributes & 0x01 ) + rSet.Put( SvxCrossedOutItem( nFontAttributes & 0x01 ? STRIKEOUT_SINGLE : STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) ); + if ( IsProperty( DFF_Prop_fillColor ) ) + rSet.Put( XFillColorItem( String(), rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillColor ), DFF_Prop_fillColor ) ) ); + if ( IsProperty( DFF_Prop_shadowType ) ) { - sal_uInt32 nRecType = it->first; - sal_uInt32 nContent = mpContents[ nRecType ]; - switch ( nRecType ) + MSO_ShadowType eShadowType = static_cast< MSO_ShadowType >( GetPropertyValue( DFF_Prop_shadowType ) ); + if( eShadowType != mso_shadowOffset ) { - case DFF_Prop_gtextSize : - rSet.Put( SvxFontHeightItem( rManager.ScalePt( nContent ), 100, EE_CHAR_FONTHEIGHT ) ); - break; - // GeoText - case DFF_Prop_gtextFStrikethrough : - { - if ( nContent & 0x20 ) - rSet.Put( SvxWeightItem( nContent ? WEIGHT_BOLD : WEIGHT_NORMAL, EE_CHAR_WEIGHT ) ); - if ( nContent & 0x10 ) - rSet.Put( SvxPostureItem( nContent ? ITALIC_NORMAL : ITALIC_NONE, EE_CHAR_ITALIC ) ); - if ( nContent & 0x08 ) - rSet.Put( SvxUnderlineItem( nContent ? UNDERLINE_SINGLE : UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); - if ( nContent & 0x40 ) - rSet.Put(SvxShadowedItem( nContent != 0, EE_CHAR_SHADOW ) ); - if ( nContent & 0x01 ) - rSet.Put( SvxCrossedOutItem( nContent ? STRIKEOUT_SINGLE : STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) ); - } - break; - - case DFF_Prop_fillColor : - rSet.Put( XFillColorItem( rtl::OUString(), rManager.MSO_CLR_ToColor( nContent, DFF_Prop_fillColor ) ) ); - break; - - // ShadowStyle - case DFF_Prop_shadowType : - { - MSO_ShadowType eShadowType = (MSO_ShadowType)nContent; - if( eShadowType != mso_shadowOffset ) - { - // mso_shadowDouble - // mso_shadowRich - // mso_shadowEmbossOrEngrave - // not possible in LibreOffice, create default shadow with default distance - rSet.Put( SdrShadowXDistItem( 35 ) ); // 0,35 mm shadow distance - rSet.Put( SdrShadowYDistItem( 35 ) ); - } - } - break; - case DFF_Prop_shadowColor : - rSet.Put( SdrShadowColorItem( rtl::OUString(), rManager.MSO_CLR_ToColor( nContent, DFF_Prop_shadowColor ) ) ); - break; - case DFF_Prop_shadowOpacity : - rSet.Put( SdrShadowTransparenceItem( (sal_uInt16)( ( 0x10000 - nContent ) / 655 ) ) ); - break; - case DFF_Prop_shadowOffsetX : - { - sal_Int32 nVal = (sal_Int32)nContent; - rManager.ScaleEmu( nVal ); - if ( nVal ) - rSet.Put( SdrShadowXDistItem( nVal ) ); - } - break; - case DFF_Prop_shadowOffsetY : - { - sal_Int32 nVal = (sal_Int32)nContent; - rManager.ScaleEmu( nVal ); - if ( nVal ) - rSet.Put( SdrShadowYDistItem( nVal ) ); - } - break; - case DFF_Prop_fshadowObscured : - { - bHasShadow = ( nContent & 2 ) != 0; - if ( bHasShadow ) - { - if ( !IsProperty( DFF_Prop_shadowOffsetX ) ) - rSet.Put( SdrShadowXDistItem( 35 ) ); - if ( !IsProperty( DFF_Prop_shadowOffsetY ) ) - rSet.Put( SdrShadowYDistItem( 35 ) ); - } - } - break; + rSet.Put( SdrShadowXDistItem( 35 ) ); // 0,35 mm Schattendistanz + rSet.Put( SdrShadowYDistItem( 35 ) ); + } + } + if ( IsProperty( DFF_Prop_shadowColor ) ) + rSet.Put( SdrShadowColorItem( String(), rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_shadowColor ), DFF_Prop_shadowColor ) ) ); + if ( IsProperty( DFF_Prop_shadowOpacity ) ) + rSet.Put( SdrShadowTransparenceItem( (sal_uInt16)( ( 0x10000 - GetPropertyValue( DFF_Prop_shadowOpacity ) ) / 655 ) ) ); + if ( IsProperty( DFF_Prop_shadowOffsetX ) ) + { + sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetX ) ); + rManager.ScaleEmu( nVal ); + if ( nVal ) + rSet.Put( SdrShadowXDistItem( nVal ) ); + } + if ( IsProperty( DFF_Prop_shadowOffsetY ) ) + { + sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetY ) ); + rManager.ScaleEmu( nVal ); + if ( nVal ) + rSet.Put( SdrShadowYDistItem( nVal ) ); + } + if ( IsProperty( DFF_Prop_fshadowObscured ) ) + { + bHasShadow = ( GetPropertyValue( DFF_Prop_fshadowObscured ) & 2 ) != 0; + if ( bHasShadow ) + { + if ( !IsProperty( DFF_Prop_shadowOffsetX ) ) + rSet.Put( SdrShadowXDistItem( 35 ) ); + if ( !IsProperty( DFF_Prop_shadowOffsetY ) ) + rSet.Put( SdrShadowYDistItem( 35 ) ); } } - if ( bHasShadow ) { // #160376# sj: activating shadow only if fill and or linestyle is used @@ -3018,6 +2677,105 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const { ApplyCustomShapeGeometryAttributes( rIn, rSet, rObjData ); ApplyCustomShapeTextAttributes( rSet ); + if ( rManager.GetSvxMSDffSettings() & SVXMSDFF_SETTINGS_IMPORT_EXCEL ) + { + if ( mnFix16Angle || ( rObjData.nSpFlags & SP_FFLIPV ) ) + CheckAndCorrectExcelTextRotation( rIn, rSet, rObjData ); + } + } +} + +void DffPropertyReader::CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const +{ + sal_Bool bRotateTextWithShape = rObjData.bRotateTextWithShape; + if ( rObjData.bOpt2 ) // sj: #158494# is the second property set available ? if then we have to check the xml data of + { // the shape, because the textrotation of Excel 2003 and greater versions is stored there + // (upright property of the textbox) + if ( rManager.pSecPropSet->SeekToContent( DFF_Prop_metroBlob, rIn ) ) + { + sal_uInt32 nLen = rManager.pSecPropSet->GetPropertyValue( DFF_Prop_metroBlob ); + if ( nLen ) + { + ::com::sun::star::uno::Sequence< sal_Int8 > aXMLDataSeq( nLen ); + rIn.Read( aXMLDataSeq.getArray(), nLen ); + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream + ( new ::comphelper::SequenceInputStream( aXMLDataSeq ) ); + try + { + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); + if ( xFactory.is() ) + { + ::com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage + ( ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( + OFOPXML_STORAGE_FORMAT_STRING, xInputStream, xFactory, sal_True ) ); + if ( xStorage.is() ) + { + const rtl::OUString sDRS( RTL_CONSTASCII_USTRINGPARAM ( "drs" ) ); + ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > + xStorageDRS( xStorage->openStorageElement( sDRS, ::com::sun::star::embed::ElementModes::SEEKABLEREAD ) ); + if ( xStorageDRS.is() ) + { + const rtl::OUString sShapeXML( RTL_CONSTASCII_USTRINGPARAM ( "shapexml.xml" ) ); + ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xShapeXMLStream( xStorageDRS->openStreamElement( sShapeXML, ::com::sun::star::embed::ElementModes::SEEKABLEREAD ) ); + if ( xShapeXMLStream.is() ) + { + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xShapeXMLInputStream( xShapeXMLStream->getInputStream() ); + if ( xShapeXMLInputStream.is() ) + { + ::com::sun::star::uno::Sequence< sal_Int8 > aSeq; + sal_Int32 nBytesRead = xShapeXMLInputStream->readBytes( aSeq, 0x7fffffff ); + if ( nBytesRead ) + { // for only one property I spare to use a XML parser at this point, this + // should be enhanced if needed + + bRotateTextWithShape = sal_True; // using the correct xml default + const char* pArry = reinterpret_cast< char* >( aSeq.getArray() ); + const char* pUpright = "upright="; + const char* pEnd = pArry + nBytesRead; + const char* pPtr = pArry; + while( ( pPtr + 12 ) < pEnd ) + { + if ( !memcmp( pUpright, pPtr, 8 ) ) + { + bRotateTextWithShape = ( pPtr[ 9 ] != '1' ) && ( pPtr[ 9 ] != 't' ); + break; + } + else + pPtr++; + } + } + } + } + } + } + } + } + catch( com::sun::star::uno::Exception& ) + { + } + } + } + } + if ( !bRotateTextWithShape ) + { + const com::sun::star::uno::Any* pAny, aAny; + SdrCustomShapeGeometryItem aGeometryItem((SdrCustomShapeGeometryItem&)rSet.Get( SDRATTR_CUSTOMSHAPE_GEOMETRY )); + const rtl::OUString sTextRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "TextRotateAngle" ) ); + pAny = aGeometryItem.GetPropertyValueByName( sTextRotateAngle ); + double fExtraTextRotateAngle = 0.0; + if ( pAny ) + *pAny >>= fExtraTextRotateAngle; + + if ( rManager.mnFix16Angle ) + fExtraTextRotateAngle += mnFix16Angle / 100.0; + if ( rObjData.nSpFlags & SP_FFLIPV ) + fExtraTextRotateAngle -= 180.0; + + com::sun::star::beans::PropertyValue aTextRotateAngle; + aTextRotateAngle.Name = sTextRotateAngle; + aTextRotateAngle.Value <<= fExtraTextRotateAngle; + aGeometryItem.SetPropertyValue( aTextRotateAngle ); + rSet.Put( aGeometryItem ); } } @@ -3374,7 +3132,7 @@ sal_Bool SvxMSDffManager::SeekToShape( SvStream& rSt, void* /* pClientData */, s bool SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd, sal_uLong nSkipCount ) const { bool bRet = sal_False; - sal_uLong nFPosMerk = rSt.Tell(); // FilePos merken fuer ggf. spaetere Restauration + sal_uLong nFPosMerk = rSt.Tell(); // store FilePos to restore it later if necessary DffRecordHeader aHd; do { @@ -3405,7 +3163,7 @@ bool SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMa } while ( rSt.good() && rSt.Tell() < nMaxFilePos && !bRet ); if ( !bRet ) - rSt.Seek( nFPosMerk ); // restore FilePos + rSt.Seek( nFPosMerk ); // restore original FilePos return bRet; } @@ -3433,7 +3191,7 @@ bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uL if ( !bRet ) aHd.SeekToEndOfRecord( rStCtrl ); } - while ( rStCtrl.GetError() == 0 && rStCtrl.Tell() < nMaxFilePos && !bRet ); + while ( rStCtrl.good() && rStCtrl.Tell() < nMaxFilePos && !bRet ); if ( !bRet ) rStCtrl.Seek( nFPosMerk ); // restore FilePos return bRet; @@ -3697,32 +3455,6 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nConte return aColor; } -rtl::OUString SvxMSDffManager::ReadDffString(SvStream& rSt, DffRecordHeader aStrHd) -{ - String aRet; - if( aStrHd.nRecType == 0x0 && !ReadCommonRecordHeader(aStrHd, rSt) ) - rSt.Seek( aStrHd.nFilePos ); - else if ( aStrHd.nRecType == DFF_PST_TextBytesAtom || aStrHd.nRecType == DFF_PST_TextCharsAtom ) - { - bool bUniCode=aStrHd.nRecType==DFF_PST_TextCharsAtom; - sal_uInt32 nBytes = aStrHd.nRecLen; - aRet = MSDFFReadZString( rSt, nBytes, bUniCode ); - if( !bUniCode ) - { - for ( xub_StrLen n = 0; n < nBytes; n++ ) - { - if( aRet.GetChar( n ) == 0x0B ) - aRet.SetChar( n, ' ' ); // Weicher Umbruch - // TODO: Zeilenumbruch im Absatz via Outliner setzen. - } - } - aStrHd.SeekToEndOfRecord( rSt ); - } - else - aStrHd.SeekToBegOfRecord( rSt ); - return aRet; -} - // sj: I just want to set a string for a text object that may contain multiple // paragraphs. If I now take a look at the follwing code I get the impression that // our outliner is too complicate to be used properly, @@ -3786,185 +3518,6 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const } } -bool SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) -{ - bool bRet=sal_False; - SdrTextObj* pText = PTR_CAST(SdrTextObj, pObj); - if( pText ) - { - DffRecordHeader aTextHd; - if( !ReadCommonRecordHeader(aTextHd, rSt) ) - rSt.Seek( aTextHd.nFilePos ); - else if ( aTextHd.nRecType==DFF_msofbtClientTextbox || aTextHd.nRecType == 0x1022 ) - { - bRet=sal_True; - sal_uLong nRecEnd=aTextHd.GetRecEndFilePos(); - DffRecordHeader aHd; - String aText; - - SdrOutliner& rOutliner=pText->ImpGetDrawOutliner(); - sal_uInt16 nOutlMode = rOutliner.GetMode(); - - { // apparently a small bug in the EditEngine which causes - // the paragraph attributes not to be delted on Clear() - bool bClearParaAttribs = true; - rOutliner.SetStyleSheet( 0, NULL ); - SfxItemSet aSet(rOutliner.GetEmptyItemSet()); - aSet.Put(SvxColorItem( COL_BLACK )); - rOutliner.SetParaAttribs(0,aSet); - pText->SetMergedItemSet(aSet); - - bClearParaAttribs = sal_False; - if( bClearParaAttribs ) - { - // apparently a small bug in the EditEngine which causes - // the paragraph attributes not to be delted on Clear() - rOutliner.SetParaAttribs(0,rOutliner.GetEmptyItemSet()); - } - } - rOutliner.Init( OUTLINERMODE_TEXTOBJECT ); - - /////////////////////////////////// - // read TextString and MetaChars // - /////////////////////////////////// - do - { - if( !ReadCommonRecordHeader(aHd, rSt) ) - rSt.Seek( aHd.nFilePos ); - else - { - switch (aHd.nRecType) - { - default: - break; - //case DFF_PST_TextHeaderAtom: - //case TextSpecInfoAtom - case DFF_PST_TextBytesAtom: - case DFF_PST_TextCharsAtom: - aText = ReadDffString(rSt, aHd); - break; - case DFF_PST_TextRulerAtom : - { - sal_uInt16 nLen = (sal_uInt16)aHd.nRecLen; - if(nLen) - { - sal_uInt32 nMask; - sal_uInt16 nVal1, nVal2, nVal3; - sal_uInt16 nDefaultTab = 2540; // PPT def: 1 Inch //rOutliner.GetDefTab(); - sal_uInt16 nMostrightTab = 0; - SfxItemSet aSet(rOutliner.GetEmptyItemSet()); - SvxTabStopItem aTabItem(0, 0, SVX_TAB_ADJUST_DEFAULT, EE_PARA_TABS); - - rSt >> nMask; - nLen -= 4; - - if(nLen && (nMask & 0x0002)) - { - // number of indent levels - rSt >> nVal3; - nLen -= 2; - } - - // Allg. TAB verstellt auf Wert in nVal3 - if(nLen && (nMask & 0x0001)) - { - rSt >> nVal3; - nLen -= 2; - nDefaultTab = (sal_uInt16)(((sal_uInt32)nVal3 * 1000) / 240); - } - - // Weitere, frei gesetzte TABs - if(nLen && (nMask & 0x0004)) - { - rSt >> nVal1; - nLen -= 2; - - // fest gesetzte TABs importieren - while(nLen && nVal1--) - { - rSt >> nVal2; - rSt >> nVal3; - nLen -= 4; - - sal_uInt16 nNewTabPos = (sal_uInt16)(((sal_uInt32)nVal2 * 1000) / 240); - if(nNewTabPos > nMostrightTab) - nMostrightTab = nNewTabPos; - - SvxTabStop aTabStop(nNewTabPos); - aTabItem.Insert(aTabStop); - } - } - - // evtl. noch default-TABs ergaenzen (immer) - sal_uInt16 nObjWidth = sal_uInt16(pObj->GetSnapRect().GetWidth() + 1); - sal_uInt16 nDefaultTabPos = nDefaultTab; - - while(nDefaultTabPos <= nObjWidth && nDefaultTabPos <= nMostrightTab) - nDefaultTabPos = - nDefaultTabPos + nDefaultTab; - - while(nDefaultTabPos <= nObjWidth) - { - SvxTabStop aTabStop(nDefaultTabPos); - aTabItem.Insert(aTabStop); - nDefaultTabPos = - nDefaultTabPos + nDefaultTab; - } - - // Falls TABs angelegt wurden, setze diese - if(aTabItem.Count()) - { - aSet.Put(aTabItem); - rOutliner.SetParaAttribs(0, aSet); - } - } - } - break; - } - aHd.SeekToEndOfRecord( rSt ); - } - } - while ( rSt.GetError() == 0 && rSt.Tell() < nRecEnd ); - - //////////////////////// - // replace SHIFT-Ret // - //////////////////////// - if ( aText.Len() ) - { - aText += ' '; - aText.SetChar( aText.Len()-1, 0x0D ); - rOutliner.SetText( aText, rOutliner.GetParagraph( 0 ) ); - - // replace SHIFT-Ret in the Outliner - if (comphelper::string::getTokenCount(aText, 0x0B) > 1) - { - sal_uInt32 nParaCount = rOutliner.GetParagraphCount(); - for(sal_uInt16 a=0;aNbcSetOutlinerParaObject(pNewText); - } - else - aTextHd.SeekToBegOfRecord(rSt); - - } - return bRet; -} - //static rtl::OUString SvxMSDffManager::MSDFFReadZString(SvStream& rIn, sal_uInt32 nLen, bool bUniCode) @@ -4442,6 +3995,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r return pRet; DffObjData aObjData( rHd, rClientRect, nCalledByGroup ); + aObjData.bRotateTextWithShape = ( GetSvxMSDffSettings() & SVXMSDFF_SETTINGS_IMPORT_EXCEL ) == 0; maShapeRecords.Consume( rSt, sal_False ); aObjData.bShapeType = maShapeRecords.SeekToContent( rSt, DFF_msofbtSp, SEEK_FROM_BEGINNING ); if ( aObjData.bShapeType ) @@ -4473,10 +4027,18 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r } else { - InitializePropSet(); // get the default PropSet + InitializePropSet( DFF_msofbtOPT ); // get the default PropSet ( (DffPropertyReader*) this )->mnFix16Angle = 0; } + aObjData.bOpt2 = maShapeRecords.SeekToContent( rSt, DFF_msofbtUDefProp, SEEK_FROM_CURRENT_AND_RESTART ); + if ( aObjData.bOpt2 ) + { + maShapeRecords.Current()->SeekToBegOfRecord( rSt ); + pSecPropSet = new DffPropertyReader( *this ); + pSecPropSet->ReadPropSet( rSt, NULL ); + } + aObjData.bChildAnchor = maShapeRecords.SeekToContent( rSt, DFF_msofbtChildAnchor, SEEK_FROM_CURRENT_AND_RESTART ); if ( aObjData.bChildAnchor ) { @@ -5756,6 +5318,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_, pStData2( pStData2_ ), nSvxMSDffSettings( 0 ), nSvxMSDffOLEConvFlags( 0 ), + pSecPropSet( NULL ), mnDefaultColor( mnDefaultColor_), mbTracing( sal_False ) { @@ -5800,6 +5363,7 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const String& rBaseURL ) pStData2( 0 ), nSvxMSDffSettings( 0 ), nSvxMSDffOLEConvFlags( 0 ), + pSecPropSet( NULL ), mnDefaultColor( COL_DEFAULT ), mbTracing( sal_False ) { @@ -5808,6 +5372,7 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const String& rBaseURL ) SvxMSDffManager::~SvxMSDffManager() { + delete pSecPropSet; delete pBLIPInfos; delete pShapeOrders; delete pFormModel; @@ -6009,7 +5574,7 @@ void SvxMSDffManager::GetCtrlData( sal_uInt32 nOffsDgg_ ) if( !bOk ) { - nPos++; + nPos++; // ????????? TODO: trying to get an one-hit wonder, this code code should be rewritten... if (nPos != rStCtrl.Seek(nPos)) break; bOk = ReadCommonRecordHeader( rStCtrl, nVer, nInst, nFbt, nLength ) @@ -6022,7 +5587,7 @@ void SvxMSDffManager::GetCtrlData( sal_uInt32 nOffsDgg_ ) nPos += DFF_COMMON_RECORD_HEADER_SIZE + nLength; ++nDrawingContainerId; } - while( nPos < nMaxStrPos && bOk ); + while( ( rStCtrl.GetError() == 0 ) && ( nPos < nMaxStrPos ) && bOk ); } } diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx index 3459e6b229bc..0d1049e24d06 100644 --- a/filter/source/msfilter/viscache.hxx +++ b/filter/source/msfilter/viscache.hxx @@ -1,30 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include #include diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 2013fff563bd..4289a30abb67 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ - /************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2008 by Sun Microsystems, Inc. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "svgwriter.hxx" #include "svgfontexport.hxx" @@ -52,16 +42,11 @@ #include #include - #include - using ::rtl::OUString; using namespace ::com::sun::star; - - - // ------------------------------- // - ooo elements and attributes - // ------------------------------- @@ -1350,7 +1335,7 @@ sal_Bool SVGFilter::implExportTextEmbeddedBitmaps() // specifying the wanted position, they will result // misplaced. pAction->Move( -aPt.X(), -aPt.Y() ); - mpSVGWriter->WriteMetaFile( aTopLeft, aSize, aMtf, SVGWRITER_WRITE_ALL, NULL ); + mpSVGWriter->WriteMetaFile( aTopLeft, aSize, aMtf, 0xffffffff, NULL ); // We reset to the original values so that when the // element is created the x, y attributes are correct. pAction->Move( aPt.X(), aPt.Y() ); @@ -1818,7 +1803,7 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) { SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "g", sal_True, sal_True ); mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, - SVGWRITER_WRITE_ALL, + 0xffffffff, pElementId, &rxShape, pEmbeddedBitmapsMtf ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 2e7316b8ebcc..cf1602fdbc0b 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2008 by Sun Microsystems, Inc. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "svgfilter.hxx" #include "svgfontexport.hxx" @@ -97,6 +87,8 @@ static const char aXMLAttrGradientUnits[] = "gradientUnits"; static const char aXMLAttrPatternUnits[] = "patternUnits"; static const char aXMLAttrOffset[] = "offset"; static const char aXMLAttrStopColor[] = "stop-color"; +static const char aXMLAttrStrokeLinejoin[] = "stroke-linejoin"; +static const char aXMLAttrStrokeLinecap[] = "stroke-linecap"; #define NSPREFIX "ooo:" @@ -2033,6 +2025,7 @@ PolyPolygon& SVGActionWriter::ImplMap( const PolyPolygon& rPolyPoly, PolyPolygon aPathData += ::rtl::OUString::valueOf( aPolyPoint.Y() ); sal_Char nCurrentMode = 0; + const bool bClose(!bLine || rPoly[0] == rPoly[nSize - 1]); while( n < nSize ) { aPathData += aBlank; @@ -2066,7 +2059,7 @@ PolyPolygon& SVGActionWriter::ImplMap( const PolyPolygon& rPolyPoly, PolyPolygon } } - if( !bLine ) + if(bClose) aPathData += B2UCONST( " Z" ); if( i < ( nCount - 1 ) ) @@ -2218,6 +2211,51 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape, sal_Bool mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStrokeWidth, ::rtl::OUString::valueOf( nStrokeWidth ) ); } + // support for LineJoin + switch(rShape.maLineJoin) + { + default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE + case basegfx::B2DLINEJOIN_MITER: + { + // miter is Svg default, so no need to write until the exporter might write styles. + // If this happens, activate here + // mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinejoin, ::rtl::OUString::createFromAscii("miter")); + break; + } + case basegfx::B2DLINEJOIN_BEVEL: + { + mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinejoin, ::rtl::OUString::createFromAscii("bevel")); + break; + } + case basegfx::B2DLINEJOIN_ROUND: + { + mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinejoin, ::rtl::OUString::createFromAscii("round")); + break; + } + } + + // support for LineCap + switch(rShape.maLineCap) + { + default: /* com::sun::star::drawing::LineCap_BUTT */ + { + // butt is Svg default, so no need to write until the exporter might write styles. + // If this happens, activate here + // mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinecap, ::rtl::OUString::createFromAscii("butt")); + break; + } + case com::sun::star::drawing::LineCap_ROUND: + { + mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinecap, ::rtl::OUString::createFromAscii("round")); + break; + } + case com::sun::star::drawing::LineCap_SQUARE: + { + mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinecap, ::rtl::OUString::createFromAscii("square")); + break; + } + } + if( rShape.maDashArray.size() ) { const ::rtl::OUString aComma( B2UCONST( "," ) ); @@ -2787,7 +2825,10 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, } if( bCont ) + { + // #118796# do NOT access pDXArray, it may be zero (!) nX = aPos.X() + pDX[ nCurPos - 1 ]; + } } } } @@ -2901,6 +2942,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const Reference< XShape >* pxShape, const GDIMetaFile* pTextEmbeddedBitmapMtf ) { + // need a counter fo rthe actions written per shape to avoid double ID + // generation + sal_Int32 nEntryCount(0); + if( mnInnerMtfCount ) nWriteFlags |= SVGWRITER_NO_SHAPE_COMMENTS; @@ -3279,7 +3324,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, mapCurShape.reset( new SVGShapeDescriptor ); if( pElementId ) - mapCurShape->maId = *pElementId; + { + mapCurShape->maId = *pElementId + B2UCONST("_") + ::rtl::OUString::valueOf(nEntryCount++); + } mapCurShape->maShapePolyPoly = aShapePolyPoly; mapCurShape->maShapeFillColor = aFill.getFillColor(); @@ -3345,14 +3392,30 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( bSkip ) { - if( !mapCurShape.get() ) + Polygon aPoly; + + aStroke.getPath(aPoly); + + if(mapCurShape.get()) { - Polygon aPoly; + if(1 != mapCurShape->maShapePolyPoly.Count() + || !mapCurShape->maShapePolyPoly[0].IsEqual(aPoly)) + { + // this path action is not covering the same path than the already existing + // fill polypolygon, so write out the fill polygon + ImplWriteShape( *mapCurShape ); + mapCurShape.reset(); + } + } + if( !mapCurShape.get() ) + { mapCurShape.reset( new SVGShapeDescriptor ); if( pElementId ) - mapCurShape->maId = *pElementId; + { + mapCurShape->maId = *pElementId + B2UCONST("_") + ::rtl::OUString::valueOf(nEntryCount++); + } aStroke.getPath( aPoly ); mapCurShape->maShapePolyPoly = aPoly; @@ -3364,6 +3427,46 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, aStroke.getDashArray( mapCurShape->maDashArray ); } + // support for LineJoin + switch(aStroke.getJoinType()) + { + default: /* SvtGraphicStroke::joinMiter, SvtGraphicStroke::joinNone */ + { + mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_MITER; + break; + } + case SvtGraphicStroke::joinRound: + { + mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_ROUND; + break; + } + case SvtGraphicStroke::joinBevel: + { + mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_BEVEL; + break; + } + } + + // support for LineCap + switch(aStroke.getCapType()) + { + default: /* SvtGraphicStroke::capButt */ + { + mapCurShape->maLineCap = com::sun::star::drawing::LineCap_BUTT; + break; + } + case SvtGraphicStroke::capRound: + { + mapCurShape->maLineCap = com::sun::star::drawing::LineCap_ROUND; + break; + } + case SvtGraphicStroke::capSquare: + { + mapCurShape->maLineCap = com::sun::star::drawing::LineCap_SQUARE; + break; + } + } + // write open shape in every case if( mapCurShape.get() ) { @@ -3682,24 +3785,6 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, } break; - case( META_RENDERGRAPHIC_ACTION ): - { - if( nWriteFlags & SVGWRITER_WRITE_FILL ) - { - // TODO KA: try to embed the native data in case the RenderGraphic - // contains valid SVG data (MimeType "image/svg+xml") - // => incorporate 'use' or 'image' element (KA 01/2011) - const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pAction; - const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); - const Point aPointPixel; - const Size aSizePixel( mpVDev->LogicToPixel( pA->GetSize() ) ); - const BitmapEx aBmpEx( aRasterizer.Rasterize( aSizePixel ) ); - - ImplWriteBmp( aBmpEx, pA->GetPoint(), pA->GetSize(), aPointPixel, aBmpEx.GetSizePixel() ); - } - } - break; - case( META_CLIPREGION_ACTION ): case( META_ISECTRECTCLIPREGION_ACTION ): case( META_ISECTREGIONCLIPREGION_ACTION ): diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index 7f79f6ffaade..ebffda9a5f10 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -1,30 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2008 by Sun Microsystems, Inc. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #ifndef SVGWRITER_HXX #define SVGWRITER_HXX @@ -40,7 +31,6 @@ #include #include #include -#include #include #include @@ -98,7 +88,6 @@ using namespace ::com::sun::star::style; #define SVGWRITER_WRITE_FILL 0x00000001 #define SVGWRITER_WRITE_TEXT 0x00000002 #define SVGWRITER_NO_SHAPE_COMMENTS 0x01000000 -#define SVGWRITER_WRITE_ALL 0xFFFFFFFF // ---------------------- // - SVGAttributeWriter - @@ -120,6 +109,9 @@ private: SvXMLElementExport* mpElemFont; SvXMLElementExport* mpElemPaint; + basegfx::B2DLineJoin maLineJoin; + com::sun::star::drawing::LineCap maLineCap; + SVGAttributeWriter(); double ImplRound( double fVal, sal_Int32 nDecs = 3 ); @@ -129,8 +121,6 @@ public: SVGAttributeWriter( SVGExport& rExport, SVGFontExport& rFontExport ); virtual ~SVGAttributeWriter(); - ::rtl::OUString GetFontStyle( const Font& rFont ); - ::rtl::OUString GetPaintStyle( const Color& rLineColor, const Color& rFillColor, const LineInfo* pLineInfo ); void AddColorAttr( const char* pColorAttrName, const char* pColorOpacityAttrName, const Color& rColor ); void AddGradientDef( const Rectangle& rObjRect,const Gradient& rGradient, ::rtl::OUString& rGradientId ); void AddPaintAttr( const Color& rLineColor, const Color& rFillColor, @@ -154,12 +144,17 @@ struct SVGShapeDescriptor ::std::auto_ptr< Gradient > mapShapeGradient; ::rtl::OUString maId; + basegfx::B2DLineJoin maLineJoin; + com::sun::star::drawing::LineCap maLineCap; + // ------------------------------------------------------------------------- SVGShapeDescriptor() : maShapeFillColor( Color( COL_TRANSPARENT ) ), maShapeLineColor( Color( COL_TRANSPARENT ) ), - mnStrokeWidth( 0 ) + mnStrokeWidth( 0 ), + maLineJoin(basegfx::B2DLINEJOIN_MITER), // miter is Svg 'stroke-linejoin' default + maLineCap(com::sun::star::drawing::LineCap_BUTT) // butt is Svg 'stroke-linecap' default { } }; diff --git a/filter/source/svg/tokenmap.cxx b/filter/source/svg/tokenmap.cxx index 79107d3400ff..7bf6fd1c885e 100644 --- a/filter/source/svg/tokenmap.cxx +++ b/filter/source/svg/tokenmap.cxx @@ -1,20 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * OpenOffice.org - a multi-platform office productivity suite + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Author: - * Fridrich Strba - * Thorsten Behrens + * This file incorporates work covered by the following license notice: * - * Copyright (C) 2008, Novell Inc. - * Parts copyright 2005 by Sun Microsystems, Inc. - * - * The Contents of this file are made available subject to - * the terms of GNU Lesser General Public License Version 3. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "tokenmap.hxx" #include -- cgit