summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
Diffstat (limited to 'filter')
-rw-r--r--filter/Configuration_filter.mk74
-rw-r--r--filter/CppunitTest_filter_dxf_test.mk39
-rw-r--r--filter/CppunitTest_filter_eps_test.mk43
-rw-r--r--filter/CppunitTest_filter_met_test.mk39
-rw-r--r--filter/CppunitTest_filter_pcd_test.mk38
-rw-r--r--filter/CppunitTest_filter_pcx_test.mk38
-rw-r--r--filter/CppunitTest_filter_pdf.mk49
-rw-r--r--filter/CppunitTest_filter_pict_test.mk50
-rw-r--r--filter/CppunitTest_filter_ppm_test.mk38
-rw-r--r--filter/CppunitTest_filter_psd_test.mk38
-rw-r--r--filter/CppunitTest_filter_ras_test.mk38
-rw-r--r--filter/CppunitTest_filter_svg.mk1
-rw-r--r--filter/CppunitTest_filter_textfilterdetect.mk6
-rw-r--r--filter/CppunitTest_filter_tga_test.mk38
-rw-r--r--filter/CustomTarget_svg.mk7
-rw-r--r--filter/IwyuFilter_filter.yaml3
-rw-r--r--filter/Library_filterconfig.mk3
-rw-r--r--filter/Library_gie.mk75
-rw-r--r--filter/Library_graphicfilter.mk2
-rw-r--r--filter/Library_icg.mk4
-rw-r--r--filter/Library_msfilter.mk7
-rw-r--r--filter/Library_odfflatxml.mk2
-rw-r--r--filter/Library_pdffilter.mk4
-rw-r--r--filter/Library_storagefd.mk2
-rw-r--r--filter/Library_svgfilter.mk3
-rw-r--r--filter/Library_t602filter.mk3
-rw-r--r--filter/Library_textfd.mk2
-rw-r--r--filter/Library_xmlfa.mk7
-rw-r--r--filter/Library_xmlfd.mk3
-rw-r--r--filter/Library_xsltdlg.mk2
-rw-r--r--filter/Library_xsltfilter.mk2
-rw-r--r--filter/Module_filter.mk12
-rw-r--r--filter/README25
-rw-r--r--filter/README.md25
-rw-r--r--filter/inc/strings.hrc28
-rw-r--r--filter/inc/strings.hxx23
-rw-r--r--filter/qa/complex/filter/detection/typeDetection/files.csv1
-rw-r--r--filter/qa/cppunit/data/dxf/fail/CVE-2010-1681-1.dxfbin4063 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/dxf/fail/hang-1.dxf1
-rw-r--r--filter/qa/cppunit/data/dxf/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/dxf/pass/bigangle-1.dxf143
-rw-r--r--filter/qa/cppunit/data/dxf/pass/loop-1.dxf17320
-rw-r--r--filter/qa/cppunit/data/dxf/pass/loop-2.dxf13974
-rw-r--r--filter/qa/cppunit/data/dxf/pass/pyramid.dxf25008
-rw-r--r--filter/qa/cppunit/data/eps/fail/CVE-2009-4195-1.epsbin45336 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/eps/fail/short-1.epsbin29 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/eps/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/eps/pass/CVE-2013-4979-1.epsbin5708521 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/eps/pass/fdo13433-4.eps667
-rw-r--r--filter/qa/cppunit/data/met/fail/.gitignore0
-rw-r--r--filter/qa/cppunit/data/met/fail/afl-divide-zero-1.metbin629 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/met/fail/crash-1.metbin681 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/met/fail/hang-1.metbin600 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/met/fail/hang-2.metbin289 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/met/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/met/pass/.gitignore0
-rw-r--r--filter/qa/cppunit/data/met/pass/hang-3.metbin608 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/met/pass/sample.metbin629 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pbm/fail/.gitignore0
-rw-r--r--filter/qa/cppunit/data/pbm/fail/crash-1.pbm6
-rw-r--r--filter/qa/cppunit/data/pbm/fail/hang-1.pbmbin266 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pbm/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/pbm/pass/.gitignore0
-rw-r--r--filter/qa/cppunit/data/pbm/pass/rhbz160429-1.pbmbin456 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pcd/fail/.gitignore0
-rw-r--r--filter/qa/cppunit/data/pcd/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/pcd/pass/.gitignore0
-rw-r--r--filter/qa/cppunit/data/pcd/pass/blank-square.pcdbin788480 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pcx/fail/.gitignore0
-rw-r--r--filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-1.pcxbin41066 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-2.pcxbin41136 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-3.pcxbin41107 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pcx/fail/CVE-2008-1097-1.pcxbin91531 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pcx/fail/hang-1.pcxbin897 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pcx/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/pcx/pass/.gitignore0
-rw-r--r--filter/qa/cppunit/data/pcx/pass/rhbz469075-1.pcxbin58596 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pict/clipping-problem.pctbin32768 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pict/fail/.gitignore0
-rw-r--r--filter/qa/cppunit/data/pict/fail/CVE-2008-1097-1.pctbin22898 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pict/fail/CVE-2012-0277-1.pctbin30649 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pict/fail/CVE-2013-2577-1.pctbin3725256 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pict/fail/EDB-19332-1.pctbin95604 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pict/fail/exception-1.pctbin11086 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pict/fail/hang-1.pctbin97206 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pict/indeterminate/.gitignore2
-rw-r--r--filter/qa/cppunit/data/pict/pass/.gitignore0
-rw-r--r--filter/qa/cppunit/data/pict/pass/ooo25876-2.pctbin11168 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/pict/pass/tdf92789.pctbin62988 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/ppm/fail/.gitignore0
-rw-r--r--filter/qa/cppunit/data/ppm/fail/CVE-2008-1097-1.ppmbin92583 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/ppm/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/ppm/pass/.gitignore0
-rw-r--r--filter/qa/cppunit/data/ppm/pass/fdo19811-2.ppmbin90735 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/psd/fail/.gitignore0
-rw-r--r--filter/qa/cppunit/data/psd/fail/CVE-2007-3741-1.psdbin896870 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/psd/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/psd/pass/.gitignore0
-rw-r--r--filter/qa/cppunit/data/psd/pass/blank-square.psdbin23846 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/psd/pass/hang-1.psdbin67086 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/psd/pass/rhbz899670-1.psdbin2147990 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/ras/fail/.gitignore0
-rw-r--r--filter/qa/cppunit/data/ras/fail/CVE-2007-2356-1.rasbin4000 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/ras/fail/CVE-2008-1097-1.rasbin92752 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/ras/fail/crash-1.rasbin913 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/ras/fail/hang-1.rasbin40 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/ras/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/ras/pass/.gitignore0
-rw-r--r--filter/qa/cppunit/data/ras/pass/marbles.rasbin4262290 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/tga/fail/.gitignore0
-rw-r--r--filter/qa/cppunit/data/tga/fail/CVE-2012-3755-1.tgabin1440044 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/tga/indeterminate/.gitignore1
-rw-r--r--filter/qa/cppunit/data/tga/pass/.gitignore0
-rw-r--r--filter/qa/cppunit/data/tga/pass/fdo14924-5.tgabin2005 -> 0 bytes
-rw-r--r--filter/qa/cppunit/data/tga/pass/fdo14924-6.tgabin3171 -> 0 bytes
-rw-r--r--filter/qa/cppunit/filters-dxf-test.cxx67
-rw-r--r--filter/qa/cppunit/filters-eps-test.cxx67
-rw-r--r--filter/qa/cppunit/filters-met-test.cxx67
-rw-r--r--filter/qa/cppunit/filters-pcd-test.cxx67
-rw-r--r--filter/qa/cppunit/filters-pcx-test.cxx67
-rw-r--r--filter/qa/cppunit/filters-pict-test.cxx100
-rw-r--r--filter/qa/cppunit/filters-ppm-test.cxx70
-rw-r--r--filter/qa/cppunit/filters-psd-test.cxx67
-rw-r--r--filter/qa/cppunit/filters-ras-test.cxx67
-rw-r--r--filter/qa/cppunit/filters-tga-test.cxx67
-rw-r--r--filter/qa/cppunit/msfilter-test.cxx2
-rw-r--r--filter/qa/cppunit/priority-test.cxx14
-rw-r--r--filter/qa/cppunit/xslt-test.cxx56
-rw-r--r--filter/qa/data/commentsInMargin.odtbin0 -> 9938 bytes
-rw-r--r--filter/qa/data/picture.pdfbin0 -> 13829 bytes
-rw-r--r--filter/qa/pdf.cxx373
-rw-r--r--filter/qa/unit/data/attributeRedefinedTest.odpbin0 -> 12610 bytes
-rw-r--r--filter/qa/unit/data/calc.otsbin0 -> 9564 bytes
-rw-r--r--filter/qa/unit/data/custom-bullet.fodp36
-rw-r--r--filter/qa/unit/data/empty.doc (renamed from filter/qa/cppunit/data/dxf/fail/.gitignore)0
-rw-r--r--filter/qa/unit/data/empty.odp (renamed from filter/qa/cppunit/data/dxf/pass/.gitignore)0
-rw-r--r--filter/qa/unit/data/empty.ods (renamed from filter/qa/cppunit/data/eps/fail/.gitignore)0
-rw-r--r--filter/qa/unit/data/empty.odt (renamed from filter/qa/cppunit/data/eps/pass/.gitignore)0
-rw-r--r--filter/qa/unit/data/hybrid_calc.pdfbin0 -> 10420 bytes
-rw-r--r--filter/qa/unit/data/hybrid_impress.pdfbin0 -> 21055 bytes
-rw-r--r--filter/qa/unit/data/hybrid_writer.pdfbin0 -> 10732 bytes
-rw-r--r--filter/qa/unit/data/impress.otpbin0 -> 15382 bytes
-rw-r--r--filter/qa/unit/data/semi-transparent-fill.odgbin0 -> 10597 bytes
-rw-r--r--filter/qa/unit/data/text-in-image.odpbin0 -> 13584 bytes
-rw-r--r--filter/qa/unit/data/writer.ottbin0 -> 10017 bytes
-rw-r--r--filter/qa/unit/svg.cxx289
-rw-r--r--filter/qa/unit/textfilterdetect.cxx207
-rw-r--r--filter/source/config/cache/basecontainer.cxx186
-rw-r--r--filter/source/config/cache/basecontainer.hxx29
-rw-r--r--filter/source/config/cache/cacheitem.cxx242
-rw-r--r--filter/source/config/cache/cacheitem.hxx27
-rw-r--r--filter/source/config/cache/cacheupdatelistener.cxx32
-rw-r--r--filter/source/config/cache/cacheupdatelistener.hxx13
-rw-r--r--filter/source/config/cache/configflush.cxx41
-rw-r--r--filter/source/config/cache/configflush.hxx16
-rw-r--r--filter/source/config/cache/constant.hxx146
-rw-r--r--filter/source/config/cache/contenthandlerfactory.cxx9
-rw-r--r--filter/source/config/cache/contenthandlerfactory.hxx5
-rw-r--r--filter/source/config/cache/filtercache.cxx364
-rw-r--r--filter/source/config/cache/filtercache.hxx29
-rw-r--r--filter/source/config/cache/filterfactory.cxx82
-rw-r--r--filter/source/config/cache/filterfactory.hxx9
-rw-r--r--filter/source/config/cache/frameloaderfactory.cxx9
-rw-r--r--filter/source/config/cache/frameloaderfactory.hxx5
-rw-r--r--filter/source/config/cache/querytokenizer.cxx11
-rw-r--r--filter/source/config/cache/querytokenizer.hxx7
-rw-r--r--filter/source/config/cache/typedetection.cxx338
-rw-r--r--filter/source/config/cache/typedetection.hxx45
-rw-r--r--filter/source/config/fragments/filters/APNG___Animated_Portable_Network_Graphic.xcu30
-rw-r--r--filter/source/config/fragments/filters/EMZ___Compressed_MS_Windows_Metafile.xcu30
-rw-r--r--filter/source/config/fragments/filters/MS_PowerPoint_97.xcu2
-rw-r--r--filter/source/config/fragments/filters/MS_PowerPoint_97_AutoPlay.xcu2
-rw-r--r--filter/source/config/fragments/filters/MS_PowerPoint_97_Vorlage.xcu2
-rw-r--r--filter/source/config/fragments/filters/MS_Word_2007_XML.xcu3
-rw-r--r--filter/source/config/fragments/filters/MS_Word_2007_XML_Template.xcu3
-rw-r--r--filter/source/config/fragments/filters/MS_Word_2007_XML_VBA.xcu3
-rw-r--r--filter/source/config/fragments/filters/OOXML_Text.xcu4
-rw-r--r--filter/source/config/fragments/filters/OOXML_Text_Template.xcu4
-rw-r--r--filter/source/config/fragments/filters/PNG___Portable_Network_Graphic.xcu2
-rw-r--r--filter/source/config/fragments/filters/SVGZ___Compressed_Scalable_Vector_Graphics.xcu30
-rw-r--r--filter/source/config/fragments/filters/WEBP___WebP.xcu (renamed from filter/source/graphicfilter/idxf/idxf.cxx)45
-rw-r--r--filter/source/config/fragments/filters/WMZ___Compressed_MS_Windows_Metafile.xcu30
-rw-r--r--filter/source/config/fragments/filters/calc_Parquet.xcu19
-rw-r--r--filter/source/config/fragments/filters/calc_png_Export.xcu2
-rw-r--r--filter/source/config/fragments/filters/calc_webp_Export.xcu20
-rw-r--r--filter/source/config/fragments/filters/draw_apng_Export.xcu30
-rw-r--r--filter/source/config/fragments/filters/draw_emz_Export.xcu30
-rw-r--r--filter/source/config/fragments/filters/draw_html_Export.xcu4
-rw-r--r--filter/source/config/fragments/filters/draw_png_Export.xcu2
-rw-r--r--filter/source/config/fragments/filters/draw_svgz_Export.xcu30
-rw-r--r--filter/source/config/fragments/filters/draw_webp_Export.xcu30
-rw-r--r--filter/source/config/fragments/filters/draw_wmz_Export.xcu30
-rw-r--r--filter/source/config/fragments/filters/impress_html_Export.xcu4
-rw-r--r--filter/source/config/fragments/filters/impress_png_Export.xcu2
-rw-r--r--filter/source/config/fragments/filters/impress_webp_Export.xcu30
-rw-r--r--filter/source/config/fragments/filters/writer_indexing_export.xcu22
-rw-r--r--filter/source/config/fragments/filters/writer_png_Export.xcu2
-rw-r--r--filter/source/config/fragments/filters/writer_web_png_Export.xcu2
-rw-r--r--filter/source/config/fragments/filters/writer_web_webp_Export.xcu21
-rw-r--r--filter/source/config/fragments/filters/writer_webp_Export.xcu30
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/apng_Export.xcu27
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/dxf_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/emz_Export.xcu27
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/emz_Import.xcu27
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/eps_Export.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/eps_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/gif_Export.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/met_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/pbm_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base16.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base4.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/pct_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/pcx_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/pgm_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/png_Export.xcu2
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/png_Import.xcu2
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/ppm_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/psd_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/ras_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/svgz_Export.xcu27
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/svgz_Import.xcu27
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/tga_Import.xcu21
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/webp_Export.xcu27
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/webp_Import.xcu27
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/wmz_Export.xcu27
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/wmz_Import.xcu27
-rw-r--r--filter/source/config/fragments/types/apng_Animated_Portable_Network_Graphic.xcu29
-rw-r--r--filter/source/config/fragments/types/calc_Parquet.xcu17
-rw-r--r--filter/source/config/fragments/types/emz_Compressed_MS_Windows_Metafile.xcu29
-rw-r--r--filter/source/config/fragments/types/png_Portable_Network_Graphic.xcu2
-rw-r--r--filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu2
-rw-r--r--filter/source/config/fragments/types/svgz_Compressed_Scalable_Vector_Graphics.xcu29
-rw-r--r--filter/source/config/fragments/types/webp_WebP.xcu29
-rw-r--r--filter/source/config/fragments/types/wmz_Compressed_MS_Windows_Metafile.xcu29
-rw-r--r--filter/source/config/fragments/types/writer_MS_Word_2007_XML.xcu2
-rw-r--r--filter/source/config/fragments/types/writer_MS_Word_2007_XML_Template.xcu2
-rw-r--r--filter/source/config/fragments/types/writer_MS_Word_2007_XML_VBA.xcu2
-rw-r--r--filter/source/config/fragments/types/writer_OOXML.xcu2
-rw-r--r--filter/source/config/fragments/types/writer_OOXML_Template.xcu2
-rw-r--r--filter/source/config/fragments/types/writer_T602_Document.xcu2
-rw-r--r--filter/source/config/fragments/types/writer_indexing_export_xml.xcu21
-rw-r--r--filter/source/config/tools/merge/FCFGMerge.cfg4
-rw-r--r--filter/source/graphic/GraphicExportFilter.cxx11
-rw-r--r--filter/source/graphic/GraphicExportFilter.hxx7
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx549
-rw-r--r--filter/source/graphicfilter/egif/giflzwc.cxx225
-rw-r--r--filter/source/graphicfilter/egif/giflzwc.hxx55
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx2676
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx51
-rw-r--r--filter/source/graphicfilter/icgm/bitmap.cxx72
-rw-r--r--filter/source/graphicfilter/icgm/bitmap.hxx10
-rw-r--r--filter/source/graphicfilter/icgm/bundles.cxx1
-rw-r--r--filter/source/graphicfilter/icgm/bundles.hxx5
-rw-r--r--filter/source/graphicfilter/icgm/cgm.cxx23
-rw-r--r--filter/source/graphicfilter/icgm/cgm.hxx18
-rw-r--r--filter/source/graphicfilter/icgm/cgmtypes.hxx5
-rw-r--r--filter/source/graphicfilter/icgm/chart.hxx5
-rw-r--r--filter/source/graphicfilter/icgm/class0.cxx6
-rw-r--r--filter/source/graphicfilter/icgm/class1.cxx3
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx273
-rw-r--r--filter/source/graphicfilter/icgm/class7.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/elements.hxx5
-rw-r--r--filter/source/graphicfilter/icgm/outact.hxx5
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx904
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.hxx119
-rw-r--r--filter/source/graphicfilter/idxf/dxfblkrd.cxx125
-rw-r--r--filter/source/graphicfilter/idxf/dxfblkrd.hxx83
-rw-r--r--filter/source/graphicfilter/idxf/dxfentrd.cxx850
-rw-r--r--filter/source/graphicfilter/idxf/dxfentrd.hxx539
-rw-r--r--filter/source/graphicfilter/idxf/dxfgrprd.cxx213
-rw-r--r--filter/source/graphicfilter/idxf/dxfgrprd.hxx115
-rw-r--r--filter/source/graphicfilter/idxf/dxfreprd.cxx482
-rw-r--r--filter/source/graphicfilter/idxf/dxfreprd.hxx130
-rw-r--r--filter/source/graphicfilter/idxf/dxftblrd.cxx380
-rw-r--r--filter/source/graphicfilter/idxf/dxftblrd.hxx175
-rw-r--r--filter/source/graphicfilter/idxf/dxfvec.cxx234
-rw-r--r--filter/source/graphicfilter/idxf/dxfvec.hxx218
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx824
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx2813
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx541
-rw-r--r--filter/source/graphicfilter/ipcd/ipcd.cxx363
-rw-r--r--filter/source/graphicfilter/ipcx/ipcx.cxx411
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx2017
-rw-r--r--filter/source/graphicfilter/ipict/ipict.hxx26
-rw-r--r--filter/source/graphicfilter/ipict/shape.cxx259
-rw-r--r--filter/source/graphicfilter/ipict/shape.hxx57
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx772
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx414
-rw-r--r--filter/source/graphicfilter/itga/itga.cxx791
-rw-r--r--filter/source/msfilter/countryid.cxx2
-rw-r--r--filter/source/msfilter/dffpropset.cxx4
-rw-r--r--filter/source/msfilter/dffrecordheader.cxx35
-rw-r--r--filter/source/msfilter/escherex.cxx332
-rw-r--r--filter/source/msfilter/eschesdo.cxx132
-rw-r--r--filter/source/msfilter/eschesdo.hxx22
-rw-r--r--filter/source/msfilter/mscodec.cxx38
-rw-r--r--filter/source/msfilter/msdffimp.cxx907
-rw-r--r--filter/source/msfilter/msocximex.cxx5
-rw-r--r--filter/source/msfilter/msoleexp.cxx62
-rw-r--r--filter/source/msfilter/mstoolbar.cxx40
-rw-r--r--filter/source/msfilter/msvbahelper.cxx285
-rw-r--r--filter/source/msfilter/rtfutil.cxx141
-rw-r--r--filter/source/msfilter/svdfppt.cxx820
-rw-r--r--filter/source/msfilter/svxmsbas2.cxx8
-rw-r--r--filter/source/msfilter/util.cxx1353
-rw-r--r--filter/source/msfilter/viscache.hxx7
-rw-r--r--filter/source/odfflatxml/OdfFlatXml.cxx52
-rw-r--r--filter/source/pdf/impdialog.cxx565
-rw-r--r--filter/source/pdf/impdialog.hxx82
-rw-r--r--filter/source/pdf/pdfdecomposer.cxx23
-rw-r--r--filter/source/pdf/pdfdialog.cxx32
-rw-r--r--filter/source/pdf/pdfdialog.hxx18
-rw-r--r--filter/source/pdf/pdfexport.cxx728
-rw-r--r--filter/source/pdf/pdfexport.hxx92
-rw-r--r--filter/source/pdf/pdffilter.cxx61
-rw-r--r--filter/source/pdf/pdffilter.hxx5
-rw-r--r--filter/source/pdf/pdfinteract.hxx5
-rw-r--r--filter/source/storagefilterdetect/filterdetect.cxx118
-rw-r--r--filter/source/storagefilterdetect/filterdetect.hxx7
-rw-r--r--filter/source/svg/gentoken.py2
-rw-r--r--filter/source/svg/presentation_engine.js829
-rw-r--r--filter/source/svg/svgexport.cxx802
-rw-r--r--filter/source/svg/svgfilter.cxx272
-rw-r--r--filter/source/svg/svgfilter.hxx38
-rw-r--r--filter/source/svg/svgfontexport.cxx16
-rw-r--r--filter/source/svg/svgfontexport.hxx9
-rw-r--r--filter/source/svg/svgwriter.cxx1154
-rw-r--r--filter/source/svg/svgwriter.hxx59
-rw-r--r--filter/source/svg/test/odfserializer.hxx5
-rw-r--r--filter/source/t602/t602filter.cxx94
-rw-r--r--filter/source/t602/t602filter.hxx26
-rw-r--r--filter/source/textfilterdetect/filterdetect.cxx82
-rw-r--r--filter/source/textfilterdetect/filterdetect.hxx5
-rw-r--r--filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx40
-rw-r--r--filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx10
-rw-r--r--filter/source/xmlfilterdetect/filterdetect.cxx15
-rw-r--r--filter/source/xmlfilterdetect/filterdetect.hxx10
-rw-r--r--filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl2
-rw-r--r--filter/source/xslt/export/wordml/ooo2wordml_list.xsl6
-rw-r--r--filter/source/xslt/export/wordml/ooo2wordml_settings.xsl8
-rw-r--r--filter/source/xslt/import/uof/uof2odf_spreadsheet.xsl4
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/body.xsl5
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl131
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl30
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/table/table.xsl4
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/table/table_rows.xsl5
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl27
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl716
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/header.xsl110
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl23
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/table.xsl6
-rw-r--r--filter/source/xsltdialog/typedetectionexport.cxx141
-rw-r--r--filter/source/xsltdialog/typedetectionexport.hxx5
-rw-r--r--filter/source/xsltdialog/typedetectionimport.cxx42
-rw-r--r--filter/source/xsltdialog/typedetectionimport.hxx4
-rw-r--r--filter/source/xsltdialog/xmlfiltercommon.hxx8
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogcomponent.cxx132
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.cxx46
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.hxx8
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx196
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.hxx7
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx12
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.hxx5
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagebasic.hxx5
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.cxx3
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.hxx6
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx73
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.hxx5
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx50
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.hxx11
-rw-r--r--filter/source/xsltfilter/OleHandler.cxx50
-rw-r--r--filter/source/xsltfilter/OleHandler.hxx10
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx300
-rw-r--r--filter/uiconfig/ui/pdfgeneralpage.ui689
-rw-r--r--filter/uiconfig/ui/pdflinkspage.ui114
-rw-r--r--filter/uiconfig/ui/pdfsignpage.ui168
-rw-r--r--filter/uiconfig/ui/pdfuserinterfacepage.ui9
-rw-r--r--filter/uiconfig/ui/pdfviewpage.ui270
-rw-r--r--filter/uiconfig/ui/warnpdfdialog.ui58
-rw-r--r--filter/uiconfig/ui/xmlfiltersettings.ui95
-rw-r--r--filter/uiconfig/ui/xmlfiltertabpagegeneral.ui118
-rw-r--r--filter/uiconfig/ui/xsltfilterdialog.ui105
383 files changed, 10797 insertions, 82855 deletions
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index d53afa704fc9..42ebab575cd3 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -39,9 +39,7 @@ $(call gb_XcuFilterTypesTarget_get_target,%) : $(filter_MERGE_TARGET)
$(call gb_Trace_StartRange,$*,FIT)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
- RESPONSEFILE=`$(gb_MKTEMP)` && \
- echo "items=$(basename $(notdir $(filter %.xcu,$^)))" \
- | sed "s/ /$(COMMA)/g" > $${RESPONSEFILE} && \
+ RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),items=$(subst $(WHITESPACE),$(COMMA),$(basename $(notdir $(filter %.xcu,$^))))) && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
@@ -82,9 +80,7 @@ $(call gb_XcuFilterFiltersTarget_get_target,%) : $(filter_MERGE_TARGET)
$(call gb_Trace_StartRange,$*,FIF)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
- RESPONSEFILE=`$(gb_MKTEMP)` && \
- echo "items=$(basename $(notdir $(filter %.xcu,$^)))" \
- | sed "s/ /$(COMMA)/g" > $${RESPONSEFILE} && \
+ RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),items=$(subst $(WHITESPACE),$(COMMA),$(basename $(notdir $(filter %.xcu,$^))))) && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
@@ -115,12 +111,8 @@ $(call gb_XcuFilterOthersTarget_get_target,%) : $(filter_MERGE_TARGET)
$(call gb_Trace_StartRange,$*,FIO)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
- RESPONSEFILE=`$(gb_MKTEMP)` && \
- RESPONSEFILE2=`$(gb_MKTEMP)` && \
- echo "items=$(strip $(foreach xcu,$(filter %.xcu,$^),$(if $(filter frameloaders,$(notdir $(patsubst %/,%,$(dir $(xcu))))),$(basename $(notdir $(xcu),)))))" \
- | sed "s/ /$(COMMA)/g" > $${RESPONSEFILE} && \
- echo "items=$(strip $(foreach xcu,$(filter %.xcu,$^),$(if $(filter contenthandlers,$(notdir $(patsubst %/,%,$(dir $(xcu))))),$(basename $(notdir $(xcu),)))))" \
- | sed "s/ /$(COMMA)/g" > $${RESPONSEFILE2} && \
+ RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),items=$(subst $(WHITESPACE),$(COMMA),$(strip $(foreach xcu,$(filter %.xcu,$^),$(if $(filter frameloaders,$(notdir $(patsubst %/,%,$(dir $(xcu))))),$(basename $(notdir $(xcu),))))))) && \
+ RESPONSEFILE2=$(call gb_var2file,$(shell $(gb_MKTEMP)),items=$(subst $(WHITESPACE),$(COMMA),$(strip $(foreach xcu,$(filter %.xcu,$^),$(if $(filter contenthandlers,$(notdir $(patsubst %/,%,$(dir $(xcu))))),$(basename $(notdir $(xcu),))))))) && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
@@ -151,9 +143,7 @@ $(call gb_XcuFilterInternalTarget_get_target,%) : $(filter_MERGE_TARGET)
$(call gb_Trace_StartRange,$*,FII)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
- RESPONSEFILE=`$(gb_MKTEMP)` && \
- echo "items=$(basename $(notdir $(filter %.xcu,$^)))" \
- | sed "s/ /$(COMMA)/g" > $${RESPONSEFILE} && \
+ RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),items=$(subst $(WHITESPACE),$(COMMA),$(basename $(notdir $(filter %.xcu,$^))))) && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
@@ -199,9 +189,7 @@ $(filter_XcuFilterUiTarget) : $(filter_MERGE_TARGET)
$(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),FIU)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
- RESPONSEFILE=`$(gb_MKTEMP)` && \
- echo "items=$(basename $(notdir $(filter %.xcu,$^)))" \
- | sed "s/ /$(COMMA)/g" > $${RESPONSEFILE} && \
+ RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),items=$(subst $(WHITESPACE),$(COMMA),$(basename $(notdir $(filter %.xcu,$^))))) && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
@@ -294,6 +282,7 @@ $(eval $(call filter_Configuration_add_others,fcfg_langpack,fcfg_base_others.xcu
contenthandlers/com_sun_star_comp_framework_oxt_handler \
))
+ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE)
# fcfg_database
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_database_types.xcu,filter/source/config/fragments/types,\
StarBase \
@@ -306,7 +295,9 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_database_filte
$(eval $(call filter_Configuration_add_others,fcfg_langpack,fcfg_database_others.xcu,filter/source/config/fragments,\
frameloaders/org_openoffice_comp_dbflt_DBContentLoader2 \
))
+endif
+ifeq ($(ENABLE_REPORTBUILDER),TRUE)
# fcfg_reportbuilder
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_reportbuilder_types.xcu,filter/source/config/fragments/types,\
StarBaseReport \
@@ -317,6 +308,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_reportbuilder_
StarBaseReport \
StarBaseReportChart \
))
+endif
# fcfg_writer
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter/source/config/fragments/types,\
@@ -358,6 +350,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu
writer_OOXML \
writer_OOXML_Template \
writer_layout_dump_xml \
+ writer_indexing_export_xml \
writer_BroadBand_eBook \
writer_FictionBook_2 \
writer_PalmDoc \
@@ -407,6 +400,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters
OOXML_Text \
OOXML_Text_Template \
writer_layout_dump \
+ writer_indexing_export \
BroadBand_eBook \
FictionBook_2 \
PalmDoc \
@@ -440,6 +434,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_web_filters.xc
writer_web_pdf_Export\
writer_web_png_Export\
writer_web_jpg_Export\
+ writer_web_webp_Export\
writerweb8_writer_template\
writerweb8_writer \
))
@@ -474,6 +469,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,f
generic_Text \
calc_Gnumeric \
calc_Lotus \
+ calc_Parquet \
calc_QPro \
calc_MS_Excel_40 \
calc_MS_Excel_40_VorlageTemplate \
@@ -532,6 +528,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.x
calc_HTML_WebQuery \
calc_StarOffice_XML_Calc_Template \
calc_pdf_Export \
+ calc_Parquet \
dBase \
calc8 \
calc8_template \
@@ -555,6 +552,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.x
MS_Multiplan \
))
+ifneq ($(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),TRUE)
# fcfg_draw
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,filter/source/config/fragments/types,\
draw_ODG_FlatXML \
@@ -653,6 +651,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_impress_filter
MWAW_Presentation \
PowerPoint3 \
))
+endif
# fcfg_chart
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_chart_types.xcu,filter/source/config/fragments/types,\
@@ -669,6 +668,7 @@ $(eval $(call filter_Configuration_add_others,fcfg_langpack,fcfg_chart_others.xc
frameloaders/com_sun_star_comp_chart2_ChartFrameLoader \
))
+ifneq ($(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),TRUE)
# fcfg_math
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_math_types.xcu,filter/source/config/fragments/types,\
math_MathML_XML_Math \
@@ -685,12 +685,14 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_math_filters.x
math_pdf_Export \
math8 \
))
+endif
# fcfg_drawgraphics
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_drawgraphics_types.xcu,filter/source/config/fragments/types,\
bmp_MS_Windows \
dxf_AutoCAD_Interchange \
emf_MS_Windows_Metafile \
+ emz_Compressed_MS_Windows_Metafile \
eps_Encapsulated_PostScript \
gif_Graphics_Interchange \
graphic_HTML \
@@ -710,18 +712,23 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_drawgraphics_typ
ras_Sun_Rasterfile \
svg_Scalable_Vector_Graphics_Draw \
svg_Scalable_Vector_Graphics \
+ svgz_Compressed_Scalable_Vector_Graphics \
svm_StarView_Metafile \
tga_Truevision_TARGA \
tif_Tag_Image_File \
+ webp_WebP \
wmf_MS_Windows_Metafile \
+ wmz_Compressed_MS_Windows_Metafile \
xbm_X_Consortium \
xpm_XPM \
))
$(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_drawgraphics_filters.xcu,filter/source/config/fragments/filters,\
+ APNG___Animated_Portable_Network_Graphic \
BMP___MS_Windows \
DXF___AutoCAD_Interchange \
EMF___MS_Windows_Metafile \
+ EMZ___Compressed_MS_Windows_Metafile \
EPS___Encapsulated_PostScript \
GIF___Graphics_Interchange \
JPG___JPEG \
@@ -737,31 +744,40 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_drawgraphics_f
RAS___Sun_Rasterfile \
SVG___Scalable_Vector_Graphics_Draw \
SVG___Scalable_Vector_Graphics \
+ SVGZ___Compressed_Scalable_Vector_Graphics \
SVM___StarView_Metafile \
TGA___Truevision_TARGA \
TIF___Tag_Image_File \
+ WEBP___WebP \
WMF___MS_Windows_Metafile \
+ WMZ___Compressed_MS_Windows_Metafile \
XBM___X_Consortium \
XPM \
draw_PCD_Photo_CD_Base \
draw_PCD_Photo_CD_Base16 \
draw_PCD_Photo_CD_Base4 \
+ draw_apng_Export \
draw_bmp_Export \
draw_emf_Export \
+ draw_emz_Export \
draw_eps_Export \
draw_gif_Export \
draw_html_Export \
draw_jpg_Export \
draw_png_Export \
draw_svg_Export \
+ draw_svgz_Export \
draw_tif_Export \
+ draw_webp_Export \
draw_wmf_Export \
+ draw_wmz_Export \
))
# fcfg_impressgraphics
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_impressgraphics_types.xcu,filter/source/config/fragments/types,\
bmp_MS_Windows \
emf_MS_Windows_Metafile \
+ emz_Compressed_MS_Windows_Metafile \
eps_Encapsulated_PostScript \
gif_Graphics_Interchange \
graphic_HTML \
@@ -776,9 +792,12 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_impressgraphics_
ras_Sun_Rasterfile \
svg_Scalable_Vector_Graphics_Draw \
svg_Scalable_Vector_Graphics \
+ svgz_Compressed_Scalable_Vector_Graphics \
svm_StarView_Metafile \
tif_Tag_Image_File \
wmf_MS_Windows_Metafile \
+ wmz_Compressed_MS_Windows_Metafile \
+ webp_WebP \
xpm_XPM \
))
@@ -793,6 +812,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_impressgraphic
impress_png_Export \
impress_svg_Export \
impress_tif_Export \
+ impress_webp_Export \
impress_wmf_Export \
))
@@ -807,6 +827,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writergraphics
writer_jpg_Export \
writer_png_Export \
writer_svg_Export \
+ writer_webp_Export \
))
# fcfg_calcgraphics
@@ -819,13 +840,16 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calcgraphics_f
calc_jpg_Export \
calc_png_Export \
calc_svg_Export \
+ calc_webp_Export \
))
# fcfg_internalgraphics
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_internalgraphics_types.xcu,filter/source/config/fragments/types,\
+ apng_Animated_Portable_Network_Graphic \
bmp_MS_Windows \
dxf_AutoCAD_Interchange \
emf_MS_Windows_Metafile \
+ emz_Compressed_MS_Windows_Metafile \
eps_Encapsulated_PostScript \
gif_Graphics_Interchange \
jpg_JPEG \
@@ -843,20 +867,26 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_internalgraphics
psd_Adobe_Photoshop \
ras_Sun_Rasterfile \
svg_Scalable_Vector_Graphics \
+ svgz_Compressed_Scalable_Vector_Graphics \
svm_StarView_Metafile \
tga_Truevision_TARGA \
tif_Tag_Image_File \
+ webp_WebP \
wmf_MS_Windows_Metafile \
+ wmz_Compressed_MS_Windows_Metafile \
xbm_X_Consortium \
xpm_XPM \
))
$(eval $(call filter_Configuration_add_internal_filters,fcfg_langpack,fcfg_internalgraphics_filters.xcu,filter/source/config/fragments/internalgraphicfilters,\
+ apng_Export \
bmp_Export \
bmp_Import \
dxf_Import \
emf_Export \
+ emz_Export \
emf_Import \
+ emz_Import \
eps_Export \
eps_Import \
gif_Export \
@@ -880,16 +910,22 @@ $(eval $(call filter_Configuration_add_internal_filters,fcfg_langpack,fcfg_inter
ras_Import \
svg_Export \
svg_Import \
+ svgz_Export \
+ svgz_Import \
svm_Export \
svm_Import \
tga_Import \
tif_Export \
tif_Import \
+ webp_Export \
+ webp_Import \
wmf_Export \
+ wmz_Export \
wmf_Import \
+ wmz_Import \
xbm_Import \
xpm_Import \
- mov_Import \
+ mov_Import \
))
# fcfg_xslt
diff --git a/filter/CppunitTest_filter_dxf_test.mk b/filter/CppunitTest_filter_dxf_test.mk
deleted file mode 100644
index 4a10c1845cef..000000000000
--- a/filter/CppunitTest_filter_dxf_test.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_dxf_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_dxf_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_dxf_test, \
- filter/qa/cppunit/filters-dxf-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_dxf_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_dxf_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_dxf_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_dxf_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_dxf_test,\
- configmgr/source/configmgr \
- i18npool/util/i18npool \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_dxf_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_eps_test.mk b/filter/CppunitTest_filter_eps_test.mk
deleted file mode 100644
index 8adbf42b88fc..000000000000
--- a/filter/CppunitTest_filter_eps_test.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_eps_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_eps_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_eps_test, \
- filter/qa/cppunit/filters-eps-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_eps_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_eps_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_eps_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_eps_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_eps_test,\
- configmgr/source/configmgr \
- emfio/emfio \
- i18npool/util/i18npool \
- ucb/source/core/ucb1 \
- ucb/source/ucp/file/ucpfile1 \
- uui/util/uui \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_eps_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_met_test.mk b/filter/CppunitTest_filter_met_test.mk
deleted file mode 100644
index 6bf756f2a671..000000000000
--- a/filter/CppunitTest_filter_met_test.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_met_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_met_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_met_test, \
- filter/qa/cppunit/filters-met-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_met_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_met_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_met_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_met_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_met_test,\
- configmgr/source/configmgr \
- i18npool/util/i18npool \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_met_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_pcd_test.mk b/filter/CppunitTest_filter_pcd_test.mk
deleted file mode 100644
index 3741d5c9bf5a..000000000000
--- a/filter/CppunitTest_filter_pcd_test.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_pcd_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_pcd_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_pcd_test, \
- filter/qa/cppunit/filters-pcd-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_pcd_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_pcd_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_pcd_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_pcd_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_pcd_test,\
- configmgr/source/configmgr \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_pcd_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_pcx_test.mk b/filter/CppunitTest_filter_pcx_test.mk
deleted file mode 100644
index 12334d75ad42..000000000000
--- a/filter/CppunitTest_filter_pcx_test.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_pcx_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_pcx_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_pcx_test, \
- filter/qa/cppunit/filters-pcx-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_pcx_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_pcx_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_pcx_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_pcx_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_pcx_test,\
- configmgr/source/configmgr \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_pcx_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_pdf.mk b/filter/CppunitTest_filter_pdf.mk
new file mode 100644
index 000000000000..912b84e0edb4
--- /dev/null
+++ b/filter/CppunitTest_filter_pdf.mk
@@ -0,0 +1,49 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# 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/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,filter_pdf))
+
+$(eval $(call gb_CppunitTest_use_externals,filter_pdf,\
+ boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,filter_pdf, \
+ filter/qa/pdf \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,filter_pdf, \
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ subsequenttest \
+ test \
+ tl \
+ unotest \
+ utl \
+ vcl \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,filter_pdf))
+
+$(eval $(call gb_CppunitTest_use_ure,filter_pdf))
+$(eval $(call gb_CppunitTest_use_vcl,filter_pdf))
+
+$(eval $(call gb_CppunitTest_use_rdb,filter_pdf,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,filter_pdf,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,filter_pdf))
+
+# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_pict_test.mk b/filter/CppunitTest_filter_pict_test.mk
deleted file mode 100644
index 431166e6e3cd..000000000000
--- a/filter/CppunitTest_filter_pict_test.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-$(eval $(call gb_CppunitTest_CppunitTest,filter_pict_test))
-
-$(eval $(call gb_CppunitTest_use_externals,filter_pict_test,\
- boost_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_pict_test, \
- filter/qa/cppunit/filters-pict-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_pict_test, \
- cppu \
- comphelper \
- basegfx \
- sal \
- salhelper \
- test \
- tk \
- tl \
- utl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_library_objects,filter_pict_test, \
- gie \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_pict_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_pict_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_pict_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_pict_test,\
- configmgr/source/configmgr \
- i18npool/util/i18npool \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_pict_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_ppm_test.mk b/filter/CppunitTest_filter_ppm_test.mk
deleted file mode 100644
index 273db952300d..000000000000
--- a/filter/CppunitTest_filter_ppm_test.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_ppm_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_ppm_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_ppm_test, \
- filter/qa/cppunit/filters-ppm-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_ppm_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_ppm_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_ppm_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_ppm_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_ppm_test,\
- configmgr/source/configmgr \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_ppm_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_psd_test.mk b/filter/CppunitTest_filter_psd_test.mk
deleted file mode 100644
index 22a2531eb43f..000000000000
--- a/filter/CppunitTest_filter_psd_test.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_psd_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_psd_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_psd_test, \
- filter/qa/cppunit/filters-psd-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_psd_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_psd_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_psd_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_psd_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_psd_test,\
- configmgr/source/configmgr \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_psd_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_ras_test.mk b/filter/CppunitTest_filter_ras_test.mk
deleted file mode 100644
index 50f6852a7b2b..000000000000
--- a/filter/CppunitTest_filter_ras_test.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_ras_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_ras_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_ras_test, \
- filter/qa/cppunit/filters-ras-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_ras_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_ras_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_ras_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_ras_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_ras_test,\
- configmgr/source/configmgr \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_ras_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_svg.mk b/filter/CppunitTest_filter_svg.mk
index ec0841929f3f..96147625e4b3 100644
--- a/filter/CppunitTest_filter_svg.mk
+++ b/filter/CppunitTest_filter_svg.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_CppunitTest_use_libraries,filter_svg, \
cppu \
cppuhelper \
sal \
+ subsequenttest \
test \
unotest \
utl \
diff --git a/filter/CppunitTest_filter_textfilterdetect.mk b/filter/CppunitTest_filter_textfilterdetect.mk
index 4066c26591a3..e931a5741a1d 100644
--- a/filter/CppunitTest_filter_textfilterdetect.mk
+++ b/filter/CppunitTest_filter_textfilterdetect.mk
@@ -21,6 +21,8 @@ $(eval $(call gb_CppunitTest_use_libraries,filter_textfilterdetect, \
cppu \
cppuhelper \
sal \
+ sfx \
+ subsequenttest \
test \
textfd \
tl \
@@ -40,4 +42,8 @@ $(eval $(call gb_CppunitTest_use_rdb,filter_textfilterdetect,services))
$(eval $(call gb_CppunitTest_use_configuration,filter_textfilterdetect))
+$(eval $(call gb_CppunitTest_use_custom_headers,filter_textfilterdetect, \
+ officecfg/registry \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_tga_test.mk b/filter/CppunitTest_filter_tga_test.mk
deleted file mode 100644
index 33ae034c0e30..000000000000
--- a/filter/CppunitTest_filter_tga_test.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_tga_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_tga_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_tga_test, \
- filter/qa/cppunit/filters-tga-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_tga_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_tga_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_tga_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_tga_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_tga_test,\
- configmgr/source/configmgr \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_tga_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/CustomTarget_svg.mk b/filter/CustomTarget_svg.mk
index 065e26e1bb1c..7eb0d6178d52 100644
--- a/filter/CustomTarget_svg.mk
+++ b/filter/CustomTarget_svg.mk
@@ -39,10 +39,9 @@ $(filter_GEN_svg_Tokens_hxx) : $(filter_GEN_svg_Tokens_gperf)
$(filter_GEN_svg_Tokens_cxx) : $(filter_GEN_svg_Tokens_gperf)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,GPF,1)
- $(call gb_Helper_abbreviate_dirs, \
- $(GPERF) --compare-strncmp -C -m 20 --switch=2 --readonly-tables $(filter_GEN_svg_Tokens_gperf) \
- | sed -e "s/(char\*)0/(char\*)0$(COMMA) 0/g" \
- > $(filter_GEN_svg_Tokens_cxx))
+ $(call gb_Helper_wsl_path,\
+ $(GPERF) --compare-strncmp -C -m 20 --switch=2 --readonly-tables $(filter_GEN_svg_Tokens_gperf)) \
+ | sed -e '/^#line/d' -e 's/(char\*)0/(char\*)0, 0/g' > $@
$(filter_GEN_svg_Script_hxx) : \
$(call gb_ExternalExecutable_get_dependencies,python) \
diff --git a/filter/IwyuFilter_filter.yaml b/filter/IwyuFilter_filter.yaml
index 14ae4e91a041..741729f711f6 100644
--- a/filter/IwyuFilter_filter.yaml
+++ b/filter/IwyuFilter_filter.yaml
@@ -4,9 +4,6 @@ excludelist:
filter/source/graphicfilter/icgm/cgm.cxx:
# OSL_BIGENDIAN is being checked
- osl/endian.h
- filter/source/graphicfilter/ieps/ieps.cxx:
- # Needed on WIN32
- - o3tl/char16_t2wchar_t.hxx
filter/source/msfilter/mscodec.cxx:
# Actually used
- com/sun/star/beans/NamedValue.hpp
diff --git a/filter/Library_filterconfig.mk b/filter/Library_filterconfig.mk
index 79557890786c..7d9318781eb3 100644
--- a/filter/Library_filterconfig.mk
+++ b/filter/Library_filterconfig.mk
@@ -19,7 +19,7 @@
$(eval $(call gb_Library_Library,filterconfig))
-$(eval $(call gb_Library_set_componentfile,filterconfig,filter/source/config/cache/filterconfig1))
+$(eval $(call gb_Library_set_componentfile,filterconfig,filter/source/config/cache/filterconfig1,services))
$(eval $(call gb_Library_use_external,filterconfig,boost_headers))
@@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,filterconfig,\
cppu \
sal \
salhelper \
+ sfx \
i18nlangtag \
))
diff --git a/filter/Library_gie.mk b/filter/Library_gie.mk
deleted file mode 100644
index 8c0cbd46b9b9..000000000000
--- a/filter/Library_gie.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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 .
-#
-
-$(eval $(call gb_Library_Library,gie))
-
-$(eval $(call gb_Library_set_include,gie,\
- $$(INCLUDE) \
- -I$(SRCDIR)/filter/inc \
-))
-
-$(eval $(call gb_Library_use_external,gie,boost_headers))
-
-$(eval $(call gb_Library_use_sdk_api,gie))
-
-$(eval $(call gb_Library_use_custom_headers,gie,\
- officecfg/registry \
-))
-
-$(eval $(call gb_Library_use_common_precompiled_header,gie))
-
-$(eval $(call gb_Library_use_libraries,gie,\
- basegfx \
- comphelper \
- i18nlangtag \
- svt \
- vcl \
- utl \
- tl \
- tk \
- cppu \
- sal \
- salhelper \
-))
-
-$(eval $(call gb_Library_add_exception_objects,gie,\
- filter/source/graphicfilter/egif/egif \
- filter/source/graphicfilter/eps/eps \
- filter/source/graphicfilter/egif/giflzwc \
- filter/source/graphicfilter/ipict/ipict \
- filter/source/graphicfilter/ipict/shape \
- filter/source/graphicfilter/ipcx/ipcx \
- filter/source/graphicfilter/iras/iras \
- filter/source/graphicfilter/itga/itga \
- filter/source/graphicfilter/ieps/ieps \
- filter/source/graphicfilter/ipsd/ipsd \
- filter/source/graphicfilter/ipbm/ipbm \
- filter/source/graphicfilter/ios2met/ios2met \
- filter/source/graphicfilter/idxf/dxf2mtf \
- filter/source/graphicfilter/idxf/dxfblkrd \
- filter/source/graphicfilter/idxf/dxfentrd \
- filter/source/graphicfilter/idxf/dxfgrprd \
- filter/source/graphicfilter/idxf/dxfreprd \
- filter/source/graphicfilter/idxf/dxftblrd \
- filter/source/graphicfilter/idxf/dxfvec \
- filter/source/graphicfilter/idxf/idxf \
- filter/source/graphicfilter/ipcd/ipcd \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/Library_graphicfilter.mk b/filter/Library_graphicfilter.mk
index 110e9b4d8a13..34f9662d0aa1 100644
--- a/filter/Library_graphicfilter.mk
+++ b/filter/Library_graphicfilter.mk
@@ -19,7 +19,7 @@
$(eval $(call gb_Library_Library,graphicfilter))
-$(eval $(call gb_Library_set_componentfile,graphicfilter,filter/source/graphic/graphicfilter))
+$(eval $(call gb_Library_set_componentfile,graphicfilter,filter/source/graphic/graphicfilter,services))
$(eval $(call gb_Library_use_external,graphicfilter,boost_headers))
diff --git a/filter/Library_icg.mk b/filter/Library_icg.mk
index 94949bb32904..6203c0a6eedd 100644
--- a/filter/Library_icg.mk
+++ b/filter/Library_icg.mk
@@ -23,6 +23,10 @@ $(eval $(call gb_Library_use_external,icg,boost_headers))
$(eval $(call gb_Library_use_sdk_api,icg))
+$(eval $(call gb_Library_add_defs,icg,\
+ -DFILTER_DLLIMPLEMENTATION \
+))
+
$(eval $(call gb_Library_use_libraries,icg,\
comphelper \
cppuhelper \
diff --git a/filter/Library_msfilter.mk b/filter/Library_msfilter.mk
index 22c765f20d78..fcc343520602 100644
--- a/filter/Library_msfilter.mk
+++ b/filter/Library_msfilter.mk
@@ -19,9 +19,12 @@
$(eval $(call gb_Library_Library,msfilter))
-$(eval $(call gb_Library_set_componentfile,msfilter,filter/source/msfilter/msfilter))
+$(eval $(call gb_Library_set_componentfile,msfilter,filter/source/msfilter/msfilter,services))
-$(eval $(call gb_Library_use_external,msfilter,boost_headers))
+$(eval $(call gb_Library_use_externals,msfilter,\
+ boost_headers \
+ frozen \
+))
$(eval $(call gb_Library_use_sdk_api,msfilter))
diff --git a/filter/Library_odfflatxml.mk b/filter/Library_odfflatxml.mk
index 8ed2aa4ce199..176530035ddd 100644
--- a/filter/Library_odfflatxml.mk
+++ b/filter/Library_odfflatxml.mk
@@ -10,7 +10,7 @@
$(eval $(call gb_Library_Library,odfflatxml))
-$(eval $(call gb_Library_set_componentfile,odfflatxml,filter/source/odfflatxml/odfflatxml))
+$(eval $(call gb_Library_set_componentfile,odfflatxml,filter/source/odfflatxml/odfflatxml,services))
$(eval $(call gb_Library_use_sdk_api,odfflatxml))
diff --git a/filter/Library_pdffilter.mk b/filter/Library_pdffilter.mk
index a7cb47a65231..178a479d72ac 100644
--- a/filter/Library_pdffilter.mk
+++ b/filter/Library_pdffilter.mk
@@ -19,7 +19,7 @@
$(eval $(call gb_Library_Library,pdffilter))
-$(eval $(call gb_Library_set_componentfile,pdffilter,filter/source/pdf/pdffilter))
+$(eval $(call gb_Library_set_componentfile,pdffilter,filter/source/pdf/pdffilter,services))
$(eval $(call gb_Library_use_external,pdffilter,boost_headers))
@@ -49,7 +49,9 @@ $(eval $(call gb_Library_use_libraries,pdffilter,\
cppuhelper \
cppu \
sal \
+ salhelper \
drawinglayer \
+ drawinglayercore \
))
$(eval $(call gb_Library_add_exception_objects,pdffilter,\
diff --git a/filter/Library_storagefd.mk b/filter/Library_storagefd.mk
index 938096ecef0f..4d2fd1dfeed7 100644
--- a/filter/Library_storagefd.mk
+++ b/filter/Library_storagefd.mk
@@ -11,7 +11,7 @@
$(eval $(call gb_Library_Library,storagefd))
-$(eval $(call gb_Library_set_componentfile,storagefd,filter/source/storagefilterdetect/storagefd))
+$(eval $(call gb_Library_set_componentfile,storagefd,filter/source/storagefilterdetect/storagefd,services))
$(eval $(call gb_Library_use_external,storagefd,boost_headers))
diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk
index 21318aa1fd03..37372b9d0cfa 100644
--- a/filter/Library_svgfilter.mk
+++ b/filter/Library_svgfilter.mk
@@ -21,7 +21,7 @@ $(eval $(call gb_Library_Library,svgfilter))
$(eval $(call gb_Library_use_custom_headers,svgfilter,filter/source/svg))
-$(eval $(call gb_Library_set_componentfile,svgfilter,filter/source/svg/svgfilter))
+$(eval $(call gb_Library_set_componentfile,svgfilter,filter/source/svg/svgfilter,services))
$(eval $(call gb_Library_add_defs,svgfilter,\
-DBOOST_ALL_NO_LIB \
@@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_libraries,svgfilter,\
sax \
salhelper \
comphelper \
+ drawinglayercore \
drawinglayer \
basegfx \
cppuhelper \
diff --git a/filter/Library_t602filter.mk b/filter/Library_t602filter.mk
index 90f834e1238d..027709c4c6e2 100644
--- a/filter/Library_t602filter.mk
+++ b/filter/Library_t602filter.mk
@@ -24,7 +24,7 @@ $(eval $(call gb_Library_set_include,t602filter,\
-I$(SRCDIR)/filter/inc \
))
-$(eval $(call gb_Library_set_componentfile,t602filter,filter/source/t602/t602filter))
+$(eval $(call gb_Library_set_componentfile,t602filter,filter/source/t602/t602filter,services))
$(eval $(call gb_Library_use_external,t602filter,boost_headers))
@@ -34,6 +34,7 @@ $(eval $(call gb_Library_use_libraries,t602filter,\
xo \
tl \
utl \
+ comphelper \
cppuhelper \
cppu \
sal \
diff --git a/filter/Library_textfd.mk b/filter/Library_textfd.mk
index c6155f1e9876..d3318dcbdb35 100644
--- a/filter/Library_textfd.mk
+++ b/filter/Library_textfd.mk
@@ -11,7 +11,7 @@
$(eval $(call gb_Library_Library,textfd))
-$(eval $(call gb_Library_set_componentfile,textfd,filter/source/textfilterdetect/textfd))
+$(eval $(call gb_Library_set_componentfile,textfd,filter/source/textfilterdetect/textfd,services))
$(eval $(call gb_Library_use_external,textfd,boost_headers))
diff --git a/filter/Library_xmlfa.mk b/filter/Library_xmlfa.mk
index 147bed21d7c6..e1157cca3059 100644
--- a/filter/Library_xmlfa.mk
+++ b/filter/Library_xmlfa.mk
@@ -19,12 +19,17 @@
$(eval $(call gb_Library_Library,xmlfa))
-$(eval $(call gb_Library_set_componentfile,xmlfa,filter/source/xmlfilteradaptor/xmlfa))
+$(eval $(call gb_Library_set_componentfile,xmlfa,filter/source/xmlfilteradaptor/xmlfa,services))
$(eval $(call gb_Library_use_external,xmlfa,boost_headers))
$(eval $(call gb_Library_use_sdk_api,xmlfa))
+$(eval $(call gb_Library_set_include,xmlfa,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/filter/inc \
+))
+
$(eval $(call gb_Library_use_libraries,xmlfa,\
comphelper \
cppuhelper \
diff --git a/filter/Library_xmlfd.mk b/filter/Library_xmlfd.mk
index 8ec02c3c0ff7..06aa201f15ec 100644
--- a/filter/Library_xmlfd.mk
+++ b/filter/Library_xmlfd.mk
@@ -19,7 +19,7 @@
$(eval $(call gb_Library_Library,xmlfd))
-$(eval $(call gb_Library_set_componentfile,xmlfd,filter/source/xmlfilterdetect/xmlfd))
+$(eval $(call gb_Library_set_componentfile,xmlfd,filter/source/xmlfilterdetect/xmlfd,services))
$(eval $(call gb_Library_use_external,xmlfd,boost_headers))
@@ -27,6 +27,7 @@ $(eval $(call gb_Library_use_sdk_api,xmlfd))
$(eval $(call gb_Library_use_libraries,xmlfd,\
ucbhelper \
+ comphelper \
cppuhelper \
cppu \
sal \
diff --git a/filter/Library_xsltdlg.mk b/filter/Library_xsltdlg.mk
index 737f79e7b225..fd5f480e7fa5 100644
--- a/filter/Library_xsltdlg.mk
+++ b/filter/Library_xsltdlg.mk
@@ -19,7 +19,7 @@
$(eval $(call gb_Library_Library,xsltdlg))
-$(eval $(call gb_Library_set_componentfile,xsltdlg,filter/source/xsltdialog/xsltdlg))
+$(eval $(call gb_Library_set_componentfile,xsltdlg,filter/source/xsltdialog/xsltdlg,services))
$(eval $(call gb_Library_use_external,xsltdlg,boost_headers))
diff --git a/filter/Library_xsltfilter.mk b/filter/Library_xsltfilter.mk
index 92e2e11e2f64..42f426c945ea 100644
--- a/filter/Library_xsltfilter.mk
+++ b/filter/Library_xsltfilter.mk
@@ -19,7 +19,7 @@
$(eval $(call gb_Library_Library,xsltfilter))
-$(eval $(call gb_Library_set_componentfile,xsltfilter,filter/source/xsltfilter/xsltfilter))
+$(eval $(call gb_Library_set_componentfile,xsltfilter,filter/source/xsltfilter/xsltfilter,services))
$(eval $(call gb_Library_use_sdk_api,xsltfilter))
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 898ac710db8a..c28c72705cec 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -21,7 +21,6 @@ $(eval $(call gb_Module_Module,filter))
$(eval $(call gb_Module_add_targets,filter,\
Configuration_filter \
CustomTarget_svg \
- Library_gie \
Library_filterconfig \
Library_icg \
Library_msfilter \
@@ -51,20 +50,11 @@ $(eval $(call gb_Module_add_check_targets,filter,\
CppunitTest_filter_priority \
CppunitTest_filter_msfilter \
CppunitTest_filter_textfilterdetect \
+ CppunitTest_filter_pdf \
))
ifneq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_Module_add_check_targets,filter,\
- CppunitTest_filter_dxf_test \
- CppunitTest_filter_eps_test \
- CppunitTest_filter_met_test \
- CppunitTest_filter_pcd_test \
- CppunitTest_filter_pcx_test \
- CppunitTest_filter_pict_test \
- CppunitTest_filter_ppm_test \
- CppunitTest_filter_psd_test \
- CppunitTest_filter_ras_test \
- CppunitTest_filter_tga_test \
CppunitTest_filter_svg \
))
endif
diff --git a/filter/README b/filter/README
deleted file mode 100644
index 78d469a6859f..000000000000
--- a/filter/README
+++ /dev/null
@@ -1,25 +0,0 @@
-Filter registration and some simple filters (also descriptions).
-
-Desperate splitting of code into small shared libraries for historical
-reasons presumably (OS/2 and Windows 3.x). The libraries produced from
-the code in each subdirectory of filter/source/graphicfilter are
-graphic format import or export filters. But they don't have uniform
-API. Some have either a GraphicImport or GraphicExport entry point,
-and are loaded and used in a uniform fashion from code in
-svtools/source/filter/filter.cxx. Others have different API and are
-loaded from other places. For instance "icgm" has ImportCGM, and is
-loaded and used by sd/source/filter/cgm/sdcgmfilter.cxx (!).
-Svgreader is used for "File->Open" and then to choose the svg file.
-For "Insert->Picture->From File", see svgio/source/svgreader directory.
-
-====================
-filter configuration
-====================
-
-The filter configuration consists of two parts, the type definition in
-filter/source/config/fragments/types/ and the actual filter definition
-in filter/source/config/fragments/filters/.
-
-Each file type e.g. text file should be represented by exactly one
-type definition. This type can then be referenced by several different
-filters, e.g. calc text, writer text.
diff --git a/filter/README.md b/filter/README.md
new file mode 100644
index 000000000000..19caeb73eaf9
--- /dev/null
+++ b/filter/README.md
@@ -0,0 +1,25 @@
+# LibreOffice Filters
+
+Filter registration and some simple filters (also descriptions).
+
+Desperate splitting of code into small shared libraries for historical
+reasons presumably (OS/2 and Windows 3.x). The libraries produced from
+the code in each subdirectory of `filter/source/graphicfilter` are
+graphic format import or export filters. But they don't have uniform
+API. Some have either a `GraphicImport` or `GraphicExport` entry point,
+and are loaded and used in a uniform fashion from code in
+`svtools/source/filter/filter.cxx`. Others have different API and are
+loaded from other places. For instance `icgm` has `ImportCGM`, and is
+loaded and used by `sd/source/filter/cgm/sdcgmfilter.cxx` (!).
+Svgreader is used for "File -> Open" and then to choose the svg file.
+For "Insert -> Picture -> From File", see `svgio/source/svgreader` directory.
+
+## Filter Configuration
+
+The filter configuration consists of two parts, the type definition in
+`filter/source/config/fragments/types/` and the actual filter definition
+in `filter/source/config/fragments/filters/`.
+
+Each file type e.g. text file should be represented by exactly one
+type definition. This type can then be referenced by several different
+filters, e.g. calc text, writer text.
diff --git a/filter/inc/strings.hrc b/filter/inc/strings.hrc
index 406ff9123d32..3fd833352194 100644
--- a/filter/inc/strings.hrc
+++ b/filter/inc/strings.hrc
@@ -17,10 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_INC_STRINGS_HRC
-#define INCLUDED_FILTER_INC_STRINGS_HRC
+#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
+
+#define NC_(Context, String) TranslateId(Context, u8##String)
+#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
#define STR_UNKNOWN_APPLICATION NC_("STR_UNKNOWN_APPLICATION", "Unknown")
#define STR_IMPORT_ONLY NC_("STR_IMPORT_ONLY", "import filter")
@@ -55,8 +58,6 @@
#define T602FILTER_STR_CANCEL_BUTTON NC_("T602FILTER_STR_CANCEL_BUTTON", "Cancel")
#define T602FILTER_STR_OK_BUTTON NC_("T602FILTER_STR_OK_BUTTON", "OK")
-#define KEY_VERSION_CHECK NC_("KEY_VERSION_CHECK", "Warning: Not all of the imported EPS graphics could be saved at level1\nas some are at a higher level!")
-
#define PDF_PROGRESS_BAR NC_("PDF_PROGRESS_BAR", "Export as PDF")
//strings used in encryption UI
@@ -75,7 +76,22 @@
#define STR_WARN_TRANSP_CONVERTED_SHORT NC_("STR_WARN_TRANSP_CONVERTED_SHORT", "Transparencies removed")
#define STR_ERR_SIGNATURE_FAILED NC_("STR_ERR_SIGNATURE_FAILED", "Signature generation failed")
#define STR_ERR_PDF_EXPORT_ABORTED NC_("STR_ERR_PDF_EXPORT_ABORTED", "PDF export aborted")
+#define STR_WARN_PDFUA_ISSUES NNC_("STR_WARN_PDFUA_ISSUES", "One accessibility issue detected. Do you want to continue?", "%1 accessibility issues detected. Do you want to continue?")
+#define STR_PDFUA_IGNORE NC_("STR_PDFUA_IGNORE", "Continue")
+#define STR_PDFUA_INVESTIGATE NNC_("STR_PDFUA_INVESTIGATE", "Investigate issue", "Investigate issues")
+
+// Progress bar status indicator when importing or exporting
+#define STR_FILTER_DOC_LOADING NC_("STR_FILTER_DOC_LOADING", "Loading: ")
+#define STR_FILTER_DOC_SAVING NC_("STR_FILTER_DOC_SAVING", "Saving: ")
+
+static inline OUString FilterResId(TranslateId aId)
+{
+ return Translate::get(aId, Translate::Create("flt"));
+}
-#endif
+static inline OUString FilterResId(TranslateNId aContextSingularPlural, int nCardinality)
+{
+ return Translate::nget(aContextSingularPlural, nCardinality, Translate::Create("flt"));
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/inc/strings.hxx b/filter/inc/strings.hxx
index c405e61121ab..21e5d90de63a 100644
--- a/filter/inc/strings.hxx
+++ b/filter/inc/strings.hxx
@@ -7,19 +7,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_FILTER_INC_STRINGS_HXX
-#define INCLUDED_FILTER_INC_STRINGS_HXX
+#pragma once
-#define STR_APPL_NAME_WRITER "%PRODUCTNAME Writer (.sxw)"
-#define STR_APPL_NAME_CALC "%PRODUCTNAME Calc (.sxc)"
-#define STR_APPL_NAME_IMPRESS "%PRODUCTNAME Impress (.sxi)"
-#define STR_APPL_NAME_DRAW "%PRODUCTNAME Draw (.sxd)"
-#define STR_APPL_NAME_OASIS_WRITER "%PRODUCTNAME Writer (.odt)"
-#define STR_APPL_NAME_OASIS_CALC "%PRODUCTNAME Calc (.ods)"
-#define STR_APPL_NAME_OASIS_IMPRESS "%PRODUCTNAME Impress (.odp)"
-#define STR_APPL_NAME_OASIS_DRAW "%PRODUCTNAME Draw (.odg)"
-#define STR_DEFAULT_EXTENSION "xml"
+#include <rtl/ustring.hxx>
-#endif
+inline constexpr OUString STR_APPL_NAME_WRITER = u"%PRODUCTNAME Writer (.sxw)"_ustr;
+inline constexpr OUString STR_APPL_NAME_CALC = u"%PRODUCTNAME Calc (.sxc)"_ustr;
+inline constexpr OUString STR_APPL_NAME_IMPRESS = u"%PRODUCTNAME Impress (.sxi)"_ustr;
+inline constexpr OUString STR_APPL_NAME_DRAW = u"%PRODUCTNAME Draw (.sxd)"_ustr;
+inline constexpr OUString STR_APPL_NAME_OASIS_WRITER = u"%PRODUCTNAME Writer (.odt)"_ustr;
+inline constexpr OUString STR_APPL_NAME_OASIS_CALC = u"%PRODUCTNAME Calc (.ods)"_ustr;
+inline constexpr OUString STR_APPL_NAME_OASIS_IMPRESS = u"%PRODUCTNAME Impress (.odp)"_ustr;
+inline constexpr OUString STR_APPL_NAME_OASIS_DRAW = u"%PRODUCTNAME Draw (.odg)"_ustr;
+inline constexpr OUString STR_DEFAULT_EXTENSION = u"xml"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/filter/qa/complex/filter/detection/typeDetection/files.csv b/filter/qa/complex/filter/detection/typeDetection/files.csv
index b882ea1179ca..8e558590b4e7 100644
--- a/filter/qa/complex/filter/detection/typeDetection/files.csv
+++ b/filter/qa/complex/filter/detection/typeDetection/files.csv
@@ -111,6 +111,7 @@ ppm;Graphics/pic.ppm;ppm_Portable_Pixelmap;ppm_Portable_Pixelmap
ras;Graphics/pic.ras;ras_Sun_Rasterfile;ras_Sun_Rasterfile
svm;Graphics/pic.svm;svm_StarView_Metafile;svm_StarView_Metafile:generic_Text
tif;Graphics/pic.tif;tif_Tag_Image_File;tif_Tag_Image_File:generic_Text
+webp;Graphics/pic.webp;webp_WebP;webp_WebP
wmf;Graphics/pic.wmf;wmf_MS_Windows_Metafile;wmf_MS_Windows_Metafile:generic_Text
diff --git a/filter/qa/cppunit/data/dxf/fail/CVE-2010-1681-1.dxf b/filter/qa/cppunit/data/dxf/fail/CVE-2010-1681-1.dxf
deleted file mode 100644
index b4629d9dc1d9..000000000000
--- a/filter/qa/cppunit/data/dxf/fail/CVE-2010-1681-1.dxf
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/dxf/fail/hang-1.dxf b/filter/qa/cppunit/data/dxf/fail/hang-1.dxf
deleted file mode 100644
index d97edbb29fa1..000000000000
--- a/filter/qa/cppunit/data/dxf/fail/hang-1.dxf
+++ /dev/null
@@ -1 +0,0 @@
-99 \ No newline at end of file
diff --git a/filter/qa/cppunit/data/dxf/indeterminate/.gitignore b/filter/qa/cppunit/data/dxf/indeterminate/.gitignore
deleted file mode 100644
index 98457bc105e0..000000000000
--- a/filter/qa/cppunit/data/dxf/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.dxf-*
diff --git a/filter/qa/cppunit/data/dxf/pass/bigangle-1.dxf b/filter/qa/cppunit/data/dxf/pass/bigangle-1.dxf
deleted file mode 100644
index 3c4741447592..000000000000
--- a/filter/qa/cppunit/data/dxf/pass/bigangle-1.dxf
+++ /dev/null
@@ -1,143 +0,0 @@
-99
-170141183460469231731687303715884105718
- 2
-BL0C
- 0
-SECTION
- 2
-ENTITIES
- 0111 N9.0
-0
-ARC
-111 N9
- 1
-I
- 39
-9
-130
-
- 51
-1758770265ded1a13ecce6855794837535bf766a7fRC
-111 N9.0007
- 39
-9
-130
-10
- 2
-BL0C
- 0
-SECTION
- 2
-ENTITIES
- 0111 N9.0
-0
-ARC
-111 N9
- 1
-I
- 39
-9
-130
-
- 51
-9705
-0
-ARC
-111 39
-9
-130
-
- 51
-183460469231731687303715884105718
- 2
-BL0C
- 0
-SECTION
- 2
-ENTITIES
- 0111 N9.0
-0
-ARC
-111 N9
- 1
-I
- 39
-9
-130
-
- 51
-1758770265ded1a13ecce6855794837535bf766a7fRC
-111 N9.0007
- 39
-9
-130
-10
- 2
-BL0C
- 0
-SECTION
- 2
-ENTITIES
- 0111 N9.0
-0
-ARC
-111 N9
- 1
-I
- 39
-9
-130
-
- 51
-9705
-0
-ARC
-111 39
-9
-130
-
- 51
-197
-0
-ARC
-111 N9.00÷dL07
- 39
-9
-130
-
- 56
-15
- 8
-
-0
-EOF
-111 N9.0
- 56*
-15
- 8
-
-0
-EO?
-111 197
-0
-ARC
-111 N9.00÷dL07
- 39
-9
-130
-
- 56
-15
- 8
-
-0
-EOF
-111 N9.0
- 56*
-15
- 8
-
-0
-EO?
-111 N9.000
-3 N 2S 79 799
diff --git a/filter/qa/cppunit/data/dxf/pass/loop-1.dxf b/filter/qa/cppunit/data/dxf/pass/loop-1.dxf
deleted file mode 100644
index e3277e69b844..000000000000
--- a/filter/qa/cppunit/data/dxf/pass/loop-1.dxf
+++ /dev/null
@@ -1,17320 +0,0 @@
- 0
-SECTION
- 2
-HEADER
- 9
-$ACADVER
- 1
-AC1015
- 9
-$ACADMAINTVER
- 70
- 6
- 9
-$DWGCODEPAGE
- 3
-ANSI_1252
- 9
-$INSBASE
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$EXTMIN
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$EXTMAX
- 10
-297.0
- 20
-420.0
- 30
-0.0
- 9
-$LIMMIN
- 10
-0.0
- 20
-0.0
- 9
-$LIMMAX
- 10
-297.0
- 20
-420.0
- 9
-$ORTHOMODE
- 70
- 0
- 9
-$REGENMODE
- 70
- 1
- 9
-$FILL«ODE
- 70
- 1
- 9
-$QTEXTMODE
- 70
- 0
- 9
-$MIRRTEXT
- 70
- 1
- 9
-$LTSCALE
- 40
-1.0
- 9
-$ATTMODE
- 70
- 1
- 9
-$TEXTSIZE
- 40
-3.5
- 9
-$TRACEWID
- 40
-1.0
- 9
-$TEXTSTYLE
- 7
-Standard
- 9
-$CLAYER
- 8
-0
- 9
-$CELTYPE
- 6
-ByLayer
- 9
-$CECOLOR
- 62
- 256
- 9
-$CELTSCALE
- 40
-1.0
- 9
-$DISPSILH
- 70
- 0
- 9
-$DIMSCALE
- 40
-1.0
- 9
-$DIMASZ
- 40
-3.0
- 9
-$DIMEXO
- 40
-1.0
- 9
-$DIMDLI
- 40
-3.75
- 9
-$DIMRND
- 40
-0.0
- 9
-$DIMDLE
- 40
-0.0
- 9
-$DIMEXE
- 40
-1.0
- 9
-$DIMTP
- 40
-0.0
- 9
-$DIMTM
- 40
-0.0
- 9
-$DIMTXT
- 40
-3.5
- 9
-$DIMCEN
- 40
-2.5
- 9
-$DIMTSZ
- 40
-0.0
- 9
-$DIMTOL
- 70
- 0
- 9
-$DIMLIM
- 70
- 0
- 9
-$DIMTIH
- 70
- 1
- 9
-$DIMTOH
- 70
- 1
- 9
-$DIMSE1
- 70
- 0
- 9
-$DIMSE2
- 70
- 0
- 9
-$DIMTAD
- 70
- 1
- 9
-$DIMZIN
- 70
- 0
- 9
-$DIMBLK
- 1
-
- 9
-$DIMASO
- 70
- 1
- 9
-$DIMSHO
- 70
- 1
- 9
-$DIMPOST
- 1
-
- 9
-$DIMAPOST
- 1
-
- 9
-$DIMALT
- 70
- 0
- 9
-$DIMALTD
- 70
- 3
- 9
-$DIMALTF
- 40
-0.0393700787
- 9
-$DIMLFAC
- 40
-100.0
- 9
-$DIMTOFL
- 70
- 1
- 9
-$DIMTVP
- 40
-0.0
- 9
-$DIMTIX
- 70
- 0
- 9
-$DIMSOXD
- 70
- 0
- 9
-$DIMSAH
- 70
- 0
- 9
-$DIMBLK1
- 1
-
- 9
-$DIMBLK2
- 1
-
- 9
-$DIMSTYLE
- 2
-ISO-25
- 9
-$DIMCLRD
- 70
- 0
- 9
-$DIMCLRE
- 70
- 0
- 9
-$DIMCLRT
- 70
- 0
- 9
-$DIMTFAC
- 40
-1.0
- 9
-$DIMGAP
- 40
-1.524
- 9
-$DIMJUST
- 70
- 0
- 9
-$DIMSD1
- 70
- 0
- 9
-$DIMSD2
- 70
- 0
- 9
-$DIMTOLJ
- 70
- 0
- 9
-$DIMTZIN
- 70
- 0
- 9
-$DIMALTZ
- 70
- 0
- 9
-$DIMALTTZ
- 70
- 0
- 9
-$DIMUPT
- 70
- 0
- 9
-$DIMDEC
- 70
- 3
- 9
-$DIMTDEC
- 70
- 3
- 9
-$DIMALTU
- 70
- 2
- 9
-$DIMALTTD
- 70
- 3
- 9
-$DIMTXSTY
- 7
-Standard
- 9
-$DIMAUNIT
- 70
- 0
- 9
-$DIMADEC
- 70
- 2
- 9
-$DIMALTRND
- 40
-0.0
- 9
-$DIMAZIN
- 70
- 0
- 9
-$DIMDSEP
- 70
- 44
- 9
-$DIMATFIT
- 70
- 3
- 9
-$DIMFRAC
- 70
- 0
- 9
-$DIMLDRBLK
- 1
-
- 9
-$DIMLUNIT
- 70
- 2
- 9
-$DIMLWD
- 70
- -2
- 9
-$DIMLWE
- 70
- -2
- 9
-$DIMTMOVE
- 70
- 0
- 9
-$LUNITS
- 70
- 2
- 9
-$LUPREC
- 70
- 2
- 9
-$SKETCHINC
- 40
-1.0
- 9
-$FILLETRAD
- 40
-10.0
- 9
-$AUNITS
- 70
- 0
- 9
-$AUPREC
- 70
- 2
- 9
-$MENU
- 1
-.
- 9
-$ELEVATION
- 40
-0.0
- 9
-$PELEVATION
- 40
-0.0
- 9
-$THICKNESS
- 40
-0.0
- 9
-$LIMCHECK
- 70
- 0
- 9
-$CHAMFERA
- 40
-10.0
- 9
-$CHAMFERB
- 40
-10.0
- 9
-$CHAMFERC
- 40
-20.0
- 9
-$CHAMFERD
- 40
-0.0
- 9
-$SKPOLY
- 70
- 0
- 9
-$TDCREATE
- 40
-2456962.662635255
- 9
-$TDUCREATE
- 40
-2456962.620968588
- 9
-$TDUPDATE
- 40
-2456962.662636401
- 9
-$TDUUPDATE
- 40
-2456962.620969734
- 9
-$TDINDWG
- 40
-0.0000000116
- 9
-$TDUSRTIMER
- 40
-0.0000000116
- 9
-$USRTIMER
- 70
- 1
- 9
-$ANGBASE
- 50
-0.0
- 9
-$ANGDIR
- 70
- 0
- 9
-$PDMODE
- 70
- 0
- 9
-$PDSIZE
- 40
--1.0
- 9
-$PLINEWID
- 40
-0.0
- 9
-$SPLFRAME
- 70
- 0
- 9
-$SPLINETYPE
- 70
- 6
- 9
-$SPLINESEGS
- 70
- 8
- 9
-$HANDSEED
- 5
-5C0
- 9
-$SURFTAB1
- 70
- 6
- 9
-$SURFTAB2
- 70
- 6
- 9
-$SURFTYPE
- 70
- 6
- 9
-$SURFU
- 70
- 6
- 9
-$SURFV
- 70
- 6
- 9
-$UCSBASE
- 2
-
- 9
-$UCSNAME
- 2
-
- 9
-$UCSORG
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$UCSXDIR
- 10
-1.0
- 20
-0.0
- 30
-0.0
- 9
-$UCSYDIR
- 10
-0.0
- 20
-1.0
- 30
-0.0
- 9
-$UCSORTHOREF
- 2
-
- 9
-$UCSORTHOVIEW
- 70
- 0
- 9
-$UCSORGTOP
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$UCSORGBOTTOM
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$UCSORGLEFT
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$UCSORGRIGHT
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$UCSORGFRONT
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$UCSORGBACK
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$PUCSBASE
- 2
-
- 9
-$PUCSNAME
- 2
-
- 9
-$PUCSORG
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$PUCSXDIR
- 10
-1.0
- 20
-0.0
- 30
-0.0
- 9
-$PUCSYDIR
- 10
-0.0
- 20
-1.0
- 30
-0.0
- 9
-$PUCSORTHOREF
- 2
-
- 9
-$PUCSORTHOVIEW
- 70
- 0
- 9
-$PUCSORGTOP
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$PUCSORGBOTTOM
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$PUCSORGLEFT
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$PUCSORGRIGHT
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$PUCSORGFRONT
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$PUCSORGBACK
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$USERI1
- 70
- 0
- 9
-$USERI2
- 70
- 0
- 9
-$USERI3
- 70
- 0
- 9
-$USERI4
- 70
- 0
- 9
-$USERI5
- 70
- 0
- 9
-$USERR1
- 40
-0.0
- 9
-$USERR2
- 40
-0.0
- 9
-$USERR3
- 40
-0.0
- 9
-$USERR4
- 40
-0.0
- 9
-$USERR5
- 40
-0.0
- 9
-$WORLDVIEW
- 70
- 1
- 9
-$SHADEDGE
- 70
- 3
- 9
-$SHADEDIF
- 70
- 70
- 9
-$TILEMODE
- 70
- 1
- 9
-$MAXACTVP
- 70
- 64
- 9
-$PINSBASE
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$PLIMCHECK
- 70
- 0
- 9
-$PEXTMIN
- 10
-1.0000000000E+20
- 20
-1.0000000000E+20
- 30
-1.0000000000E+20
- 9
-$PEXTMAX
- 10
--1.0000000000E+20
- 20
--1.0000000000E+20
- 30
--1.0000000000E+20
- 9
-$PLIMMIN
- 10
-0.0
- 20
-0.0
- 9
-$PLIMMAX
- 10
-420.0
- 20
-297.0
- 9
-$UNITMODE
- 70
- 0
- 9
-$VISRETAIN
- 70
- 1
- 9
-$PLINEGEN
- 70
- 0
- 9
-$PSLTSCALE
- 70
- 1
- 9
-$TREEDEPTH
- 70
- 3020
- 9
-$CMLSTYLE
- 2
-Standard
- 9
-$CMLJUST
- 70
- 0
- 9
-$CMLSCALE
- 40
-20.0
- 9
-$PROXYGRAPHICS
- 70
- 1
- 9
-$MEASUREMENT
- 70
- 1
- 9
-$CELWEIGHT
-370
- -1
- 9
-$ENDCAPS
-280
- 0
- 9
-$JOINSTYLE
-280
- 0
- 9
-$LWDISPLAY
-290
- 1
- 9
-$INSUNITS
- 70
- 4
- 9
-$HYPERLINKBASE
- 1
-
- 9
-$STYLESHEET
- 1
-
- 9
-$XEDIT
-290
- 1
- 9
-$CEPSNTYPE
-380
- 0
- 9
-$PSTYLEMODE
-290
- 1
- 9
-$FINGERPRINTGUID
- 2
-{12852F08-F252-4439-8DDF-34F6DEA5435B}
- 9
-$VERSIONGUID
- 2
-{FAEB1C32-E019-11D5-929B-00C0DF256EC4}
- 9
-$EXTNAMES
-290
- 1
- 9
-$PSVPSCALE
- 40
-0.0
- 9
-$OLESTARTUP
-290
- 0
- 0
-ENDSEC
- 0
-SECTION
- 2
-CLASSES
- 0
-CLASS
- 1
-ACDBDICTIONARYWDFLT
- 2
-AcDbDictionaryWithDefault
- 3
-ObjectDBX Classes
- 90
- 0
-280
- 0
-281
- 0
- 0
-CLASS
- 1
-VISUALSTYLE
- 2
-AcDbVisualStyle
- 3
-ObjectDBX Classes
- 90
- 4095
-280
- 0
-281
- 0
- 0
-CLASS
- 1
-MATERIAL
- 2
-AcDbMaterial
- 3
-ObjectDBX Classes
- 90
- 1153
-280
- 0
-281
- 0
- 0
-CLASS
- 1
-ACDBPLACEHOLDER
- 2
-AcDbPlaceHolder
- 3
-ObjectDBX Classes
- 90
- 0
-280
- 0
-281
- 0
- 0
-CLASS
- 1
-LAYOUT
- 2
-AcDbLayout
- 3
-ObjectDBX Classes
- 90
- 0
-280
- 0
-281
- 0
- 0
-ENDSEC
- 0
-SECTION
- 2
-TABLES
- 0
-TABLE
- 2
-VPORT
- 5
-8
-330
-0
-100
-AcDbSymbolTable
- 70
- 1
- 0
-VPORT
- 5
-29
-330
-8
-100
-AcDbSymbolTableRecord
-100
-AcDbViewportTableRecord
- 2
-*Active
- 70
- 0
- 10
-0.0
- 20
-0.0
- 11
-1.0
- 21
-1.0
- 12
-148.5
- 22
-210.0
- 13
-0.0
- 23
-0.0
- 14
-10.0
- 24
-10.0
- 15
-10.0
- 25
-10.0
- 16
-0.0
- 26
-0.0
- 36
-1.0
- 17
-0.0
- 27
-0.0
- 37
-0.0
- 40
-420.0
- 41
-0.7071428571
- 42
-50.0
- 43
-0.0
- 44
-0.0
- 50
-0.0
- 51
-0.0
- 71
- 0
- 72
- 2000
- 73
- 1
- 74
- 3
- 75
- 0
- 76
- 0
- 77
- 0
- 78
- 0
-281
- 0
- 65
- 1
-110
-0.0
-120
-0.0
-130
-0.0
-111
-1.0
-121
-0.0
-131
-0.0
-112
-0.0
-122
-1.0
-132
-0.0
- 79
- 0
-146
-0.0
- 0
-ENDTAB
- 0
-TABLE
- 2
-LTYPE
- 5
-5
-330
-0
-100
-AcDbSymbolTable
- 70
- 6
- 0
-LTYPE
- 5
-14
-330
-5
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
- 2
-ByBlock
- 70
- 0
- 3
-
- 72
- 65
- 73
- 0
- 40
-0.0
- 0
-LTYPE
- 5
-15
-330
-5
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
- 2
-ByLayer
- 70
- 0
- 3
-
- 72
- 65
- 73
- 0
- 40
-0.0
- 0
-LTYPE
- 5
-16
-330
-5
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
- 2
-Continuous
- 70
- 0
- 3
-Solid line
- 72
- 65
- 73
- 0
- 40
-0.0
- 0
-LTYPE
- 5
-3F
-330
-5
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
- 2
-HIDDEN
- 70
- 0
- 3
-Hidden __ __ __ __ __ __ __ __ __ __ __ __ __ __
- 72
- 65
- 73
- 2
- 40
-1.905
- 49
-1.27
- 74
- 0
- 49
--0.635
- 74
- 0
- 0
-LTYPE
- 5
-40
-330
-5
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
- 2
-PHANTOM
- 70
- 0
- 3
-Phantom ______ __ __ ______ __ __ ______
- 72
- 65
- 73
- 6
- 40
-12.7
- 49
-6.35
- 74
- 0
- 49
--1.27
- 74
- 0
- 49
-1.27
- 74
- 0
- 49
--1.27
- 74
- 0
- 49
-1.27
- 74
- 0
- 49
--1.27
- 74
- 0
- 0
-LTYPE
- 5
-41
-330
-5
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
- 2
-CENTER
- 70
- 0
- 3
-Center ____ _ ____ _ ____ _ ____ _ ____ _ ____
- 72
- 65
- 73
- 4
- 40
-10.16
- 49
-6.35
- 74
- 0
- 49
--1.27
- 74
- 0
- 49
-1.27
- 74
- 0
- 49
--1.27
- 74
- 0
- 0
-LTYPE
- 5
-42
-330
-5
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
- 2
-CENTERX2
- 70
- 0
- 3
-Center (2x) ________ __ ________ __ _____
- 72
- 65
- 73
- 4
- 40
-20.32
- 49
-12.7
- 74
- 0
- 49
--2.54
- 74
- 0
- 49
-2.54
- 74
- 0
- 49
--2.54
- 74
- 0
- 0
-LTYPE
- 5
-43
-330
-5
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
- 2
-DOT2
- 70
- 0
- 3
-Dot (.5x) ........................................
- 72
- 65
- 73
- 2
- 40
-0.635
- 49
-0.0
- 74
- 0
- 49
--0.635
- 74
- 0
- 0
-ENDTAB
- 0
-TABLE
- 2
-LAYER
- 5
-2
-330
-0
-100
-AcDbSymbolTable
- 70
- 8
- 0
-LAYER
- 5
-10
-330
-2
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
- 2
-0
- 70
- 0
- 62
- 7
- 6
-Continuous
-370
- -3
-390
-F
- 0
-LAYER
- 5
-44
-330
-2
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
- 2
-TEKENLIJN
- 70
- 0
- 62
- 7
- 6
-Continuous
-370
- -3
-390
-F
- 0
-LAYER
- 5
-45
-330
-2
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
- 2
-HARTLIJN
- 70
- 0
- 62
- 7
- 6
-CENTER
-370
- -3
-390
-F
- 0
-LAYER
- 5
-46
-330
-2
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
- 2
-STIPPELIJN
- 70
- 0
- 62
- 7
- 6
-HIDDEN
-370
- 15
-390
-F
- 0
-LAYER
- 5
-47
-330
-2
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
- 2
-DIKKE_MAATLIJN
- 70
- 0
- 62
- 7
- 6
-Continuous
-370
- 158
-390
-F
- 0
-LAYER
- 5
-48
-330
-2
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
- 2
-STUKLIJST
- 70
- 0
- 62
- 7
- 6
-Continuous
-370
- 15
-390
-F
- 0
-LAYER
- 5
-49
-330
-2
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
- 2
-MAATLIJN
- 70
- 0
- 62
- 7
- 6
-Continuous
-370
- -3
-390
-F
- 0
-LAYER
- 5
-4A
-330
-2
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
- 2
-TEKST
- 70
- 0
- 62
- 7
- 6
-Continuous
-370
- 15
-390
-F
- 0
-ENDTAB
- 0
-TABLE
- 2
-STYLE
- 5
-3
-330
-0
-100
-AcDbSymbolTable
- 70
- 3
- 0
-STYLE
- 5
-11
-330
-3
-100
-AcDbSymbolTableRecord
-100
-AcDbTextStyleTableRecord
- 2
-Standard
- 70
- 0
- 40
-0.0
- 41
-1.0
- 50
-0.0
- 71
- 0
- 42
-3.5
- 3
-txt
- 4
-
- 0
-STYLE
- 5
-54
-330
-3
-100
-AcDbSymbolTableRecord
-100
-AcDbTextStyleTableRecord
- 2
-SLDTEXTSTYLE0
- 70
- 0
- 40
-0.0
- 41
-0.75
- 50
-0.0
- 71
- 0
- 42
-0.2
- 3
-TXT
- 4
-
- 0
-STYLE
- 5
-56A
-330
-3
-100
-AcDbSymbolTableRecord
-100
-AcDbTextStyleTableRecord
- 2
-SLDTEXTSTYLE1
- 70
- 0
- 40
-0.0
- 41
-0.7
- 50
-0.0
- 71
- 0
- 42
-0.2
- 3
-TXT
- 4
-
- 0
-ENDTAB
- 0
-TABLE
- 2
-VIEW
- 5
-6
-330
-0
-100
-AcDbSymbolTable
- 70
- 0
- 0
-ENDTAB
- 0
-TABLE
- 2
-UCS
- 5
-7
-330
-0
-100
-AcDbSymbolTable
- 70
- 0
- 0
-ENDTAB
- 0
-TABLE
- 2
-APPID
- 5
-9
-330
-0
-100
-AcDbSymbolTable
- 70
- 1
- 0
-APPID
- 5
-12
-330
-9
-100
-AcDbSymbolTableRecord
-100
-AcDbRegAppTableRecord
- 2
-ACAD
- 70
- 0
- 0
-ENDTAB
- 0
-TABLE
- 2
-DIMSTYLE
- 5
-A
-330
-0
-100
-AcDbSymbolTable
- 70
- 4
-100
-AcDbDimStyleTable
- 0
-DIMSTYLE
-105
-27
-330
-A
-100
-AcDbSymbolTableRecord
-100
-AcDbDimStyleTableRecord
- 2
-ISO-25
- 70
- 0
- 41
-2.5
- 42
-0.625
- 43
-3.75
- 44
-1.25
- 73
- 0
- 74
- 0
- 77
- 1
- 78
- 8
-140
-2.5
-141
-2.5
-143
-0.0393700787
-147
-0.625
-171
- 3
-172
- 1
-178
- 0
-271
- 2
-272
- 2
-274
- 3
-278
- 44
-283
- 0
-284
- 8
-340
-11
- 0
-DIMSTYLE
-105
-501
-102
-{ACAD_REACTORS
-330
-500
-102
-}
-330
-A
-100
-AcDbSymbolTableRecord
-100
-AcDbDimStyleTableRecord
- 2
-SLDDIMSTYLE0
- 70
- 0
- 41
-3.0
- 44
-0.0
- 45
-0.000000001
- 73
- 0
- 74
- 0
- 77
- 1
- 78
- 12
- 79
- 3
-140
-3.5
-144
-2.5
-147
-0.875
-172
- 1
-173
- 1
-178
- 0
-271
- 3
-272
- 3
-276
- 2
-284
- 12
-289
- 0
-340
-54
- 0
-DIMSTYLE
-105
-50E
-102
-{ACAD_REACTORS
-330
-50D
-330
-51A
-330
-526
-330
-56C
-330
-578
-330
-584
-102
-}
-330
-A
-100
-AcDbSymbolTableRecord
-100
-AcDbDimStyleTableRecord
- 2
-SLDDIMSTYLE1
- 70
- 0
- 41
-3.0
- 44
-0.0
- 45
-0.000000001
- 73
- 0
- 74
- 0
- 77
- 1
- 78
- 12
- 79
- 3
-140
-3.5
-144
-2.5
-147
-0.875
-172
- 1
-173
- 1
-178
- 0
-271
- 0
-272
- 0
-276
- 2
-284
- 12
-289
- 0
-340
-54
- 0
-DIMSTYLE
-105
-533
-102
-{ACAD_REACTORS
-330
-532
-330
-53C
-330
-545
-330
-54E
-330
-557
-330
-561
-102
-}
-330
-A
-100
-AcDbSymbolTableRecord
-100
-AcDbDimStyleTableRecord
- 2
-SLDDIMSTYLE2
- 70
- 0
- 41
-3.0
- 44
-0.0
- 45
-0.000000001
- 73
- 0
- 74
- 0
- 77
- 1
- 78
- 12
- 79
- 3
-140
-3.5
-144
-2.5
-147
-0.875
-173
- 1
-178
- 0
-271
- 3
-272
- 3
-276
- 2
-284
- 12
-340
-54
- 0
-ENDTAB
- 0
-TABLE
- 2
-BLOCK_RECORD
- 5
-1
-330
-0
-100
-AcDbSymbolTable
- 70
- 15
- 0
-BLOCK_RECORD
- 5
-1F
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-*Model_Space
-340
-22
- 0
-BLOCK_RECORD
- 5
-1B
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-*Paper_Space
-340
-1E
- 0
-BLOCK_RECORD
- 5
-23
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-*Paper_Space0
-340
-26
- 0
-BLOCK_RECORD
- 5
-56
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-SW_BROKEN_VIEW_0
-340
-0
-102
-{BLKREFS
-331
-59
-102
-}
- 0
-BLOCK_RECORD
- 5
-502
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D
-340
-0
- 0
-BLOCK_RECORD
- 5
-50F
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_1
-340
-0
- 0
-BLOCK_RECORD
- 5
-51B
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_2
-340
-0
- 0
-BLOCK_RECORD
- 5
-527
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_3
-340
-0
- 0
-BLOCK_RECORD
- 5
-534
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_4
-340
-0
- 0
-BLOCK_RECORD
- 5
-53D
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_5
-340
-0
- 0
-BLOCK_RECORD
- 5
-546
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_6
-340
-0
- 0
-BLOCK_RECORD
- 5
-54F
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_7
-340
-0
- 0
-BLOCK_RECORD
- 5
-558
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_8
-340
-0
- 0
-BLOCK_RECORD
- 5
-562
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_9
-340
-0
- 0
-BLOCK_RECORD
- 5
-56D
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_10
-340
-0
- 0
-BLOCK_RECORD
- 5
-579
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_11
-340
-0
- 0
-BLOCK_RECORD
- 5
-585
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_12
-340
-0
- 0
-ENDTAB
- 0
-ENDSEC
- 0
-SECTION
- 2
-BLOCKS
- 0
-BLOCK
- 5
-20
-330
-1F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-*Model_Space
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-*Model_Space
- 1
-
- 0
-ENDBLK
- 5
-21
-330
-1F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-1C
-330
-1B
-100
-AcDbEntity
- 67
- 1
- 8
-0
-100
-AcDbBlockBegin
- 2
-*Paper_Space
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-*Paper_Space
- 1
-
- 0
-ENDBLK
- 5
-1D
-330
-1B
-100
-AcDbEntity
- 67
- 1
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-24
-330
-23
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-*Paper_Space0
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-*Paper_Space0
- 1
-
- 0
-ENDBLK
- 5
-25
-330
-23
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-57
-330
-56
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-SW_BROKEN_VIEW_0
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-SW_BROKEN_VIEW_0
- 1
-
- 0
-ENDBLK
- 5
-58
-330
-56
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-503
-330
-502
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D
- 1
-
- 0
-SOLID
- 5
-505
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-194.9299255838
- 21
-25.7821787182
- 31
-0.0
- 12
-195.9299255838
- 22
-25.7821787182
- 32
-0.0
- 13
-195.9299255838
- 23
-25.7821787182
- 33
-0.0
- 0
-SOLID
- 5
-506
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.9299255838
- 21
-44.9821787182
- 31
-0.0
- 12
-194.9299255838
- 22
-44.9821787182
- 32
-0.0
- 13
-194.9299255838
- 23
-44.9821787182
- 33
-0.0
- 0
-LINE
- 5
-507
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-143.0299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-196.4299255838
- 21
-28.7821787182
- 31
-0.0
- 0
-LINE
- 5
-508
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.0299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-196.4299255838
- 21
-41.9821787182
- 31
-0.0
- 0
-LINE
- 5
-509
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-22.7821787182
- 31
-0.0
- 0
-LINE
- 5
-50A
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-41.9821787182
- 31
-0.0
- 0
-LINE
- 5
-50B
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-47.9821787182
- 31
-0.0
- 0
-MTEXT
- 5
-50C
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-190.9181886692
- 20
-31.991019801
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-33
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-504
-330
-502
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-510
-330
-50F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_1
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_1
- 1
-
- 0
-SOLID
- 5
-512
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-280.0124004364
- 30
-0.0
- 11
-170.9299255838
- 21
-277.0124004364
- 31
-0.0
- 12
-171.9299255838
- 22
-277.0124004364
- 32
-0.0
- 13
-171.9299255838
- 23
-277.0124004364
- 33
-0.0
- 0
-SOLID
- 5
-513
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-287.499722104
- 30
-0.0
- 11
-171.9299255838
- 21
-290.499722104
- 31
-0.0
- 12
-170.9299255838
- 22
-290.499722104
- 32
-0.0
- 13
-170.9299255838
- 23
-290.499722104
- 33
-0.0
- 0
-LINE
- 5
-514
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-150.4168593775
- 20
-280.0124004364
- 30
-0.0
- 11
-172.4299255838
- 21
-280.0124004364
- 31
-0.0
- 0
-LINE
- 5
-515
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-287.499722104
- 30
-0.0
- 11
-172.4299255838
- 21
-287.499722104
- 31
-0.0
- 0
-LINE
- 5
-516
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-280.0124004364
- 30
-0.0
- 11
-171.4299255838
- 21
-267.6770872868
- 31
-0.0
- 0
-LINE
- 5
-517
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-280.0124004364
- 30
-0.0
- 11
-171.4299255838
- 21
-287.499722104
- 31
-0.0
- 0
-LINE
- 5
-518
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-287.499722104
- 30
-0.0
- 11
-171.4299255838
- 21
-293.499722104
- 31
-0.0
- 0
-MTEXT
- 5
-519
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-166.9181886692
- 20
-267.6770872868
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-19
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-511
-330
-50F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-51C
-330
-51B
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_2
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_2
- 1
-
- 0
-SOLID
- 5
-51E
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-202.8200717467
- 30
-0.0
- 11
-170.9299255838
- 21
-199.8200717467
- 31
-0.0
- 12
-171.9299255838
- 22
-199.8200717467
- 32
-0.0
- 13
-171.9299255838
- 23
-199.8200717467
- 33
-0.0
- 0
-SOLID
- 5
-51F
-330
-51B
-370
- 0
-100
-AcDbCircle
- 10
-149.1879091276
- 20
-124.2049907824
- 30
-0.0
- 40
-0.0800276369171186
-100
-AcDbArc
- 50
-31.2357600789
- 51
-89.9882535152
- 0
-LINE
- 5
-3A8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2563360204
- 20
-105.7777046893
- 30
-0.0
- 11
-149.2563360204
- 21
-124.2464899752
- 31
-0.0
- 0
-LINE
- 5
-3A9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2162960043
- 20
-105.7777046893
- 30
-0.0
- 11
-134.2162960043
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3AA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2162960043
- 20
-124.2850184176
- 30
-0.0
- 11
-134.1499254873
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3AB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.4299252202
- 20
-105.7777046893
- 30
-0.0
- 11
-133.4299252202
- 21
-124.2555737231
- 31
-0.0
- 0
-LWPOLYLINE
- 5
-3AC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbPolyline
- 90
- 4
- 70
- 128
- 43
-0.0
- 10
-149.2569536736
- 20
-124.2454528544
- 10
-149.2656842639
- 20
-124.2305516932
- 10
-149.2736712863
- 20
-124.2169141505
- 10
-149.2808976044
- 20
-124.204575989
- 0
-LINE
- 5
-3AD
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.3099258115
- 20
-105.7777046893
- 30
-0.0
- 11
-149.3099258115
- 21
-124.1757392619
- 31
-0.0
- 0
-LINE
- 5
-3AE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2563360204
- 20
-124.2464899752
- 30
-0.0
- 11
-149.2569536736
- 21
-124.2454528544
- 31
-0.0
- 0
-LINE
- 5
-3AF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2299253514
- 20
-105.7777046893
- 30
-0.0
- 11
-134.2299253514
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3B0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2299253514
- 20
-124.2850184176
- 30
-0.0
- 11
-134.2162960043
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3B1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.5099256804
- 20
-105.7777046893
- 30
-0.0
- 11
-148.5099256804
- 21
-123.090755913
- 31
-0.0
- 0
-LINE
- 5
-3B2 5
-4FF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-133.4299255838
- 20
-660.3011936068
- 30
-0.0
- 0
-DIMENSION
- 5
-500
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-34.5771309945
- 31
-0.0
- 70
- 160
- 1
-33
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE0
-100
-AcDbAlignedDimension
- 13
-142.0299255838
- 23
-28.7821787182
- 33
-0.0
- 14
-148.0299255838
- 24
-41.9821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-50D
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_1
- 10
-171.4299255838
- 20
-287.499722104
- 30
-0.0
- 11
-171.4299255838
- 21
-271.6850735678
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-280.0124004364
- 33
-0.0
- 14
-147.8555696261
- 24
-287.499722104
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-51A
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_2
- 10
-171.4299255838
- 20
-210.3073934143
- 30
-0.0
- 11
-171.4299255838
- 21
-194.8678981433
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-202.8200717467
- 33
-0.0
- 14
-147.8555696261
- 24
-210.3073934143
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-526
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_3
- 10
-171.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-171.4299255838
- 21
-113.1236101725
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-126.2783621669
- 33
-0.0
- 14
-148.0299255838
- 24
-133.7256838344
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-532
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_4
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-84.1586135498
- 31
-0.0
- 70
- 160
- 1
-675,902
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-148.0299255838
- 23
-133.7256838344
- 33
-0.0
- 14
-148.0299255838
- 24
-41.9821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-53C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_5
- 10
-195.3191971725
- 20
-133.7649839595
- 30
-0.0
- 11
-195.2817915125
- 21
-178.7746730971
- 31
-0.0
- 70
- 160
- 1
-524,500
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-210.3073934143
- 33
-0.0
- 14
-148.0299255838
- 24
-133.7256838344
- 34
-0.0
- 50
--89.9523838979
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-545
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_6
- 10
-195.2555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-195.2555696261
- 21
-246.0726158741
- 31
-0.0
- 70
- 160
- 1
-524,400
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-287.499722104
- 33
-0.0
- 14
-147.8555696261
- 24
-210.3073934143
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-54E
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_7
- 10
-195.2555696261
- 20
-397.2202084954
- 30
-0.0
- 11
-195.2555696261
- 21
-357.7845521004
- 31
-0.0
- 70
- 160
- 1
-545,698
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-287.499722104
- 33
-0.0
- 14
-145.8378589248
- 24
-397.2202084954
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-557
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_8
- 10
-219.4299255838
- 20
-397.2202084954
- 30
-0.0
- 11
-219.4299255838
- 21
-226.31135989
- 31
-0.0
- 70
- 160
- 1
-Kozijnmaat =
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-142.0299255838
- 23
-28.7821787182
- 33
-0.0
- 14
-145.8378589248
- 24
-397.2202084954
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-561
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_9
- 10
-99.2299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-99.2299255838
- 21
-214.5361780403
- 31
-0.0
- 70
- 160
- 1
-DMH =
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-133.4299255838
- 23
-383.8202084954
- 33
-0.0
- 14
-142.0299255838
- 24
-28.7821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-56C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_10
- 10
-117.2299255838
- 20
-148.4450158005
- 30
-0.0
- 11
-117.2299255838
- 21
-157.3719824392
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-147.8850158005
- 33
-0.0
- 14
-133.5499255838
- 24
-148.4450158005
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-578
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_11
- 10
-117.2299255838
- 20
-224.9867253803
- 30
-0.0
- 11
-117.2299255838
- 21
-236.5334651005
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-224.4267253803
- 33
-0.0
- 14
-133.5499255838
- 24
-224.9867253803
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-584
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_12
- 10
-117.2299255838
- 20
-302.17905407
- 30
-0.0
- 11
-117.2299255838
- 21
-311.8110919194
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-301.61905407
- 33
-0.0
- 14
-133.5499255838
- 24
-302.17905407
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-LINE
- 5
-590
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-103.7777066237
- 30
-0.0
- 11
-142.3699255838
- 21
-103.4
- 51
-89.9999492362
- 0
-ARC
- 5
-3D7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.5163691973
- 20
-133.4850123101
- 30
-0.0
- 40
-0.1200011213146664
-100
-AcDbArc
- 50
-138.497247328
- 51
-269.9999068087
- 0
-ARC
- 5
-3D8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-136.355993356
- 20
-132.6849348127
- 30
-0.0
- 40
-0.0800841035922697
-100
-AcDbArc
- 50
-90.0150168159
- 51
-113.8359930711
- 0
-ARC
- 5
-3D9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-135.0299508788
- 20
-135.6849288285
- 30
-0.0
- 40
-3.199908694378492
-100
-AcDbArc
- 50
-269.9995452672
- 51
-293.8464037785
- 0
-LINE
- 5
-3DA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-135.0299254825
- 20
-132.4850201342
- 30
-0.0
- 11
-134.2499256899
- 21
-132.4850201342
- 31
-0.0
- 0
-ARC
- 5
-3DB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.2499379652
- 20
-132.3650080634
- 30
-0.0
- 40
-0.1200120715024033
-100
-AcDbArc
- 50
-90.0058604254
- 51
-179.9980525768
- 0
-LINE
- 5
-3DC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.1299258938
- 20
-132.3650121424
- 30
-0.0
- 11
-134.1299258938
- 21
-132.2075128291
- 31
-0.0
- 0
-ARC
- 5
-3DD
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.2499411967
- 20
-132.2075174672
- 30
-0.0
- 40
-0.1200153029850342
-100
-AcDbArc
- 50
-180.0022142502
- 51
-218.9973251432
- 0
-LINE
- 5
-3DE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.1566682627
- 20
-132.1319937442
- 30
-0.0
- 11
-134.4031833877
- 21
-131.8275689814
- 31
-0.0
- 0
-ARC
- 5
-3DF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.3099104538
- 20
-131.7520452584
- 30
-0.0
- 40
-0.1200153029849757
-100
-AcDbArc
- 50
-0.0022142501
- 51
-38.9973251432
- 0
-LINE
- 5
-3E0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.4299257567
- 20
-131.7520498965
- 30
-0.0
- 11
-134.4299257567
- 21
-127.9414653514
- 31
-0.0
- 0
-ARC
- 5
-3E1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.3099104538
- 20
-127.9414699895
- 30
-0.0
- 40
-0.1200153029849757
-100
-AcDbArc
- 50
-321.0026748568
- 51
-359.9977857499
- 0
-LINE
- 5
-3E2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.4031833877
- 20
-127.8659462664
- 30
-0.0
- 11
-134.05666806
- 21
-127.4380445216
- 31
-0.0
- 0
-ARC
- 5
-3E3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.149940994
- 20
-127.3625207985
- 30
-0.0
- 40
-0.120015302984857
-100
-AcDbArc
- 50
-141.0026748568
- 51
-179.9977857499
- 0
-LINE
- 5
-3E4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.0299256911
- 20
-127.3625254367
- 30
-0.0
- 11
-134.0299256911
- 21
-126.1250138018
- 31
-0.0
- 0
-ARC
- 5
-3E5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.1499186836
- 20
-126.1250107233
- 30
-0.0
- 40
-0.1199929925412997
-100
-AcDbArc
- 50
-179.9985300323
- 51
-270.0032486934
- 0
-LINE
- 5
-3E6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.1499254873
- 20
-126.005017731
- 30
-0.0
- 11
-136.2299256792
- 21
-126.005017731
- 31
-0.0
- 0
-ARC
- 5
-3E7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-136.229912767
- 20
-125.8850050222
- 30
-0.0
- 40
-0.1200127094438369
-100
-AcDbArc
- 50
-0.0079431648
- 51
-89.9938355609
- 0
-LINE
- 5
-3E8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-136.3499254753
- 20
-125.8850216601
- 30
-0.0
- 11
-136.3499254753
- 21
-125.2050161097
- 31
-0.0
- 0
-ARC
- 5
-3E9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-136.4699184679
- 20
-125.2050130312
- 30
-0.0
- 40
-0.1199929925783876
-100
-AcDbArc
- 50
-179.9985300396
- 51
-270.0034265556
- 0
-LINE
- 5
-3EA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-136.469925644
- 20
-125.0850200389
- 30
-0.0
- 11
-148.7099253406
- 21
-125.0850200389
- 31
-0.0
- 0
-ARC
- 5
-3EB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.7099328893
- 20
-125.2050130312
- 30
-0.0
- 40
-0.119992992617387
-100
-AcDbArc
- 50
-269.9963955831
- 51
-0.0014699527
- 0
-LINE
- 5
-3EC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.8299258818
- 20
-125.2050161097
- 30
-0.0
- 11
-148.8299258818
- 21
-125.9183764193
- 31
-0.0
- 0
-ARC
- 5
-3ED
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.709927865
- 20
-125.91837716
- 30
-0.0
- 40
-0.1199980168837526
-100
-AcDbArc
- 50
-359.9996463459
- 51
-53.9732887541
- 0
-LINE
- 5
-3EE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7805061807
- 20
-126.0154247019
- 30
-0.0
- 11
-146.6793448498
- 21
-127.5435447428
- 31
-0.0
- 0
-ARC
- 5
-3EF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.749919111
- 20
-127.6405897595
- 30
-0.0
- 40
-0.1199935898327405
-100
-AcDbArc
- 50
-179.9984405241
- 51
-233.9741452813
- 0
-LINE
- 5
-3F0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.6299255212
- 20
-127.6405930255
- 30
-0.0
- 11
-146.6299255212
- 21
-133.3159088824
- 31
-0.0
- 0
-ARC
- 5
-3F1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.5099232936
- 20
-133.315903341
- 30
-0.0
- 40
-0.120002227728508
-100
-AcDbArc
- 50
-0.0026457597
- 51
-20.999682824
- 0
-LINE
- 5
-3F2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.6219552626
- 20
-133.3589076731
- 30
-0.0
- 11
-146.3471007367
- 21
-134.0749263499
- 31
-0.0
- 0
-ARC
- 5
-3F3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.2350683839
- 20
-134.0319208293
- 30
-0.0
- 40
-0.1200030119081427
-100
-AcDbArc
- 50
-21.0001469018
- 51
-134.9966517297
- 0
-LINE
- 5
-3F4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.1502183994
- 20
-134.1167807315
- 30
-0.0
- 11
-144.8336009701
- 21
-132.8001618121
- 31
-0.0
- 0
-ARC
- 5
-3F5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-144.748758296
- 20
-132.8850047843
- 30
-0.0
- 40
-0.1199858712428317
-100
-AcDbArc
- 50
-269.995164801
- 51
-314.9998993415
- 0
-LINE
- 5
-3F6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-144.7487481703
- 20
-132.7650189135
- 30
-0.0
- 11
-136.3559723665
- 21
-132.7650189135
- 31
-0.0
- 0
-ARC
- 5
-3F7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-133.3499200157
- 20
-124.3450103265
- 30
-0.0
- 40
-0.1199960615305855
-100
-AcDbArc
- 50
-127.9778213362
- 51
-315.5786816839
- 0
-ARC
- 5
-3F8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-133.492770837
- 20
-124.204971188
- 30
-0.0
- 40
-0.0800472312450756
-100
-AcDbArc
- 50
-90.0117105688
- 51
-135.5556160835
- 0
-LINE
- 5
-3F9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.4927544763
- 20
-124.2850184176
- 30
-0.0
- 11
-134.1499254873
- 21
-124.2850184176
- 31
-0.0
- 0
-ARC
- 5
-3FA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.1499294027
- 20
-124.3650139485
- 30
-0.0
- 40
-0.0799955310302896
-100
-AcDbArc
- 50
-269.9971956253
- 51
-15.9984086718
- 0
-LINE
- 5
-3FB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2268266549
- 20
-124.3870615695
- 30
-0.0
- 11
-134.0812475254
- 21
-124.8947620127
- 31
-0.0
- 0
-ARC
- 5
-3FC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.465753153
- 20
-125.0050135586
- 30
-0.0
- 40
-0.3999999762120172
-100
-AcDbArc
- 50
-90.0000765526
- 51
-195.9994948625
- 0
-LINE
- 5
-3FD
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.4657526185
- 20
-125.4050135348
- 30
-0.0
- 11
-134.8818720152
- 21
-125.4050135348
- 31
-0.0
- 0
-ARC
- 5
-3FE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.8818895266
- 20
-125.0050340998
- 30
-0.0
- 40
-0.3999794353998879
-100
-AcDbArc
- 50
-15.9988052851
- 51
-90.0025084456
- 0
-LINE
- 5
-3FF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-135.2663767358
- 20
-125.1152753565
- 30
-0.0
- 11
-135.3382822891
- 21
-124.864506695
- 31
-0.0
- 0
-ARC
- 5
-400
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-136.1072824299
- 20
-125.085006887
- 30
-0.0
- 40
-0.7999884694317702
-100
-AcDbArc
- 50
-195.9995146278
- 51
-270.000666096
- 0
-LINE
- 5
-401
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-136.1072917303
- 20
-124.2850184176
- 30
-0.0
- 11
-144.2699256187
- 21
-124.2850184176
- 31
-0.0
- 0
-ARC
- 5
-402
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-144.2699168791
- 20
-124.2050096278
- 30
-0.0
- 40
-0.0800087902519152
-100
-AcDbArc
- 50
-0.0053247404
- 51
-89.9937414529
- 0
-LINE
- 5
-403
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-144.349925669
- 20
-124.2050170634
- 30
-0.0
- 11
-144.349925669
- 21
-123.9650130007
- 31
-0.0
- 0
-ARC
- 5
-404
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-144.4299341409
- 20
-123.9650201183
- 30
-0.0
- 40
-0.0800084721904046
-100
-AcDbArc
- 50
-180.0050970011
- 51
-269.9938357899
- 0
-LINE
- 5
-405
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-144.4299255331
- 20
-123.8850116465
- 30
-0.0
- 11
-144.669925498
- 21
-123.8850116465
- 31
-0.0
- 0
-ARC
- 5
-406
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-144.6699166267
- 20
-123.9650207543
- 30
-0.0
- 40
-0.0800091083155471
-100
-AcDbArc
- 50
-270.0063528841
- 51
-359.9944475208
- 0
-LINE
- 5
-407
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-144.7499257346
- 20
-123.9650130007
- 30
-0.0
- 11
-144.7499257346
- 21
-124.2050170634
- 31
-0.0
- 0
-ARC
- 5
-408
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-144.8299342065
- 20
-124.2050099459
- 30
-0.0
- 40
-0.0800084721903386
-100
-AcDbArc
- 50
-90.00616421
- 51
-179.9949029989
- 0
-LINE
- 5
-409
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-144.8299255987
- 20
-124.2850184176
- 30
-0.0
- 11
-147.7288805713
- 21
-124.2850184176
- 31
-0.0
- 0
-ARC
- 5
-40A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.7288779357
- 20
-123.8850159947
- 30
-0.0
- 40
-0.4000024229248144
-100
-AcDbArc
- 50
-345.0003781315
- 51
-89.9996224743
- 0
-LINE
- 5
-40B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.1152512898
- 20
-123.7814902995
- 30
-0.0
- 11
-147.6108663549
- 21
-121.8991040919
- 31
-0.0
- 0
-ARC
- 5
-40C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.1754788065
- 20
-122.0157535212
- 30
-0.0
- 40
-0.4507431714908194
-100
-AcDbArc
- 50
-188.9989377763
- 51
-345.0015117857
- 0
-LINE
- 5
-40D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.7302837243
- 20
-121.9452500079
- 30
-0.0
- 11
-146.7030935754
- 21
-122.1169233058
- 31
-0.0
- 0
-ARC
- 5
-40E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.5055559119
- 20
-122.0856369716
- 30
-0.0
- 40
-0.1999999080912635
-100
-AcDbArc
- 50
-8.9998420876
- 51
-161.9998367828
- 0
-LINE
- 5
-40F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.3153448721
- 20
-122.1474408839
- 30
-0.0
- 11
-145.8463118245
- 21
-120.7038998339
- 31
-0.0
- 0
-ARC
- 5
-410
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircleTrace
- 10
-195.2555696261
- 20
-397.2202084954
- 30
-0.0
- 11
-194.7555696261
- 21
-394.2202084954
- 31
-0.0
- 12
-195.7555696261
- 22
-394.2202084954
- 32
-0.0
- 13
-195.7555696261
- 23
-394.2202084954
- 33
-0.0
- 0
-LINE
- 5
-554
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-287.499722104
- 30
-0.0
- 11
-196.2555696261
- 21
-287.499722104
- 31
-0.0
- 0
-LINE
- 5
-555
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-146.8378589248
- 20
-397.2202084954
- 30
-0.0
- 11
-196.2555696261
- 21
-397.2202084954
- 31
-0.0
- 0
-LINE
- 5
-556
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.2555696261
- 20
-287.499722104
- 30
-0.0
- 11
-195.2555696261
- 21
-397.2202084954
- 31
-0.0
- 0
-ENDBLK
- 5
-551
-330
-54F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-559
-330
-558
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_8
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_8
- 1
-
- 0
-SOLID
- 5
-55B
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-219.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-219.9299255838
- 21
-31.7821787182
- 31
-0.0
- 12
-218.9299255838
- 22
-31.7821787182
- 32
-0.0
- 13
-218.9299255838
- 23
-31.7821787182
- 33
-0.0
- 0
-SOLID
- 5
-55C
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-219.4299255838
- 20
-397.2202084954
- 30
-0.0
- 11
-218.9299255838
- 21
-394.2202084954
- 31
-0.0
- 12
-219.9299255838
- 22
-394.2202084954
- 32
-0.0
- 13
-219.9299255838
- 23
-394.2202084954
- 33
-0.0
- 0
-LINE
- 5
-55D
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-143.0299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-220.4299255838
- 21
-28.7821787182
- 31
-0.0
- 0
-LINE
- 5
-55E
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-146.8378589248
- 20
-397.2202084954
- 30
-0.0
- 11
-220.4299255838
- 21
-397.2202084954
- 31
-0.0
- 0
-LINE
- 5
-55F
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-219.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-219.4299255838
- 21
-397.2202084954
- 31
-0.0
- 0
-MTEXT
- 5
-560
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-214.9181886692
- 20
-211.8228183688
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-Kozijnmaat =
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-55A
-330
-558
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-563
-330
-562
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_9
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_9
- 1
-
- 0
-SOLID
- 5
-565
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-99.2299255838
- 20
-383.8202084954
- 30
-0.0
- 11
-98.7299255838
- 21
-380.8202084954
- 31
-0.0
- 12
-99.7299255838
- 22
-380.8202084954
- 32
-0.0
- 13
-99.7299255838
- 23
-380.8202084954
- 33
-0.0
- 0
-SOLID
- 5
-566
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-99.2299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-99.7299255838
- 21
-31.7821787182
- 31
-0.0
- 12
-98.7299255838
- 22
-31.7821787182
- 32
-0.0
- 13
-98.7299255838
- 23
-31.7821787182
- 33
-0.0
- 0
-LINE
- 5
-567
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.4299255838
- 20
-383.8202084954
- 30
-0.0
- 11
-98.2299255838
- 21
-383.8202084954
- 31
-0.0
- 0
-LINE
- 5
-568
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-141.0299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-98.2299255838
- 21
-28.7821787182
- 31
-0.0
- 0
-LINE
- 5
-569
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-99.2299255838
- 20
-383.8202084954
- 30
-0.0
- 11
-99.2299255838
- 21
-28.7821787182
- 31
-0.0
- 0
-MTEXT
- 5
-56B
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-94.7181886692
- 20
-207.001456174
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-DMH =
- 7
-SLDTEXTSTYLE1
- 11
--7.044195017643634E-15
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-564
-330
-562
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-56E
-330
-56D
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_10
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_10
- 1
-
- 0
-SOLID
- 5
-570
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-147.8850158005
- 30
-0.0
- 11
-116.7299255838
- 21
-144.8850158005
- 31
-0.0
- 12
-117.7299255838
- 22
-144.8850158005
- 32
-0.0
- 13
-117.7299255838
- 23
-144.8850158005
- 33
-0.0
- 0
-SOLID
- 5
-571
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-148.4450158005
- 30
-0.0
- 11
-117.7299255838
- 21
-151.4450158005
- 31
-0.0
- 12
-116.7299255838
- 22
-151.4450158005
- 32
-0.0
- 13
-116.7299255838
- 23
-151.4450158005
- 33
-0.0
- 0
-LINE
- 5
-572
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-147.8850158005
- 30
-0.0
- 11
-116.2299255838
- 21
-147.8850158005
- 31
-0.0
- 0
-LINE
- 5
-573
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-148.4450158005
- 30
-0.0
- 11
-116.2299255838
- 21
-148.4450158005
- 31
-0.0
- 0
-LINE
- 5
-574
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-147.8850158005
- 30
-0.0
- 11
-117.2299255838
- 21
-141.8850158005
- 31
-0.0
- 0
-LINE
- 5
-575
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-147.8850158005
- 30
-0.0
- 11
-117.2299255838
- 21
-148.4450158005
- 31
-0.0
- 0
-LINE
- 5
-576
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-148.4450158005
- 30
-0.0
- 11
-117.2299255838
- 21
-160.0869130071
- 31
-0.0
- 0
-MTEXT
- 5
-577
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-112.7181886692
- 20
-154.6570518713
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-1
- 7
-SLDTEXTSTYLE0
- 11
--7.044195017643634E-15
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-56F
-330
-56D
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-57A
-330
-579
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_11
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_11
- 1
-
- 0
-SOLID
- 5
-57C
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-224.4267253803
- 30
-0.0
- 11
-116.7299255838
- 21
-221.4267253803
- 31
-0.0
- 12
-117.7299255838
- 22
-221.4267253803
- 32
-0.0
- 13
-117.7299255838
- 23
-221.4267253803
- 33
-0.0
- 0
-SOLID
- 5
-57D
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-224.9867253803
- 30
-0.0
- 11
-117.7299255838
- 21
-227.9867253803
- 31
-0.0
- 12
-116.7299255838
- 22
-227.9867253803
- 32
-0.0
- 13
-116.7299255838
- 23
-227.9867253803
- 33
-0.0
- 0
-LINE
- 5
-57E
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-224.4267253803
- 30
-0.0
- 11
-116.2299255838
- 21
-224.4267253803
- 31
-0.0
- 0
-LINE
- 5
-57F
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-224.9867253803
- 30
-0.0
- 11
-116.2299255838
- 21
-224.9867253803
- 31
-0.0
- 0
-LINE
- 5
-580
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-224.4267253803
- 30
-0.0
- 11
-117.2299255838
- 21
-218.4267253803
- 31
-0.0
- 0
-LINE
- 5
-581
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-224.4267253803
- 30
-0.0
- 11
-117.2299255838
- 21
-224.9867253803
- 31
-0.0
- 0
-LINE
- 5
-582
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-224.9867253803
- 30
-0.0
- 11
-117.2299255838
- 21
-239.2483956684
- 31
-0.0
- 0
-MTEXT
- 5
-583
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-112.7181886692
- 20
-233.8185345326
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-1
- 7
-SLDTEXTSTYLE0
- 11
--7.044195017643634E-15
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-57B
-330
-579
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-586
-330
-585
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_12
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_12
- 1
-
- 0
-SOLID
- 5
-588
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-301.61905407
- 30
-0.0
- 11
-116.7299255838
- 21
-298.61905407
- 31
-0.0
- 12
-117.7299255838
- 22
-298.61905407
- 32
-0.0
- 13
-117.7299255838
- 23
-298.61905407
- 33
-0.0
- 0
-SOLID
- 5
-589
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-302.17905407
- 30
-0.0
- 11
-117.7299255838
- 21
-305.17905407
- 31
-0.0
- 12
-116.7299255838
- 22
-305.17905407
- 32
-0.0
- 13
-116.7299255838
- 23
-305.17905407
- 33
-0.0
- 0
-LINE
- 5
-58A
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-301.61905407
- 30
-0.0
- 11
-116.2299255838
- 21
-301.61905407
- 31
-0.0
- 0
-LINE
- 5
-58B
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-302.17905407
- 30
-0.0
- 11
-116.2299255838
- 21
-302.17905407
- 31
-0.0
- 0
-LINE
- 5
-58C
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-301.61905407
- 30
-0.0
- 11
-117.2299255838
- 21
-295.61905407
- 31
-0.0
- 0
-LINE
- 5
-58D
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-301.61905407
- 30
-0.0
- 11
-117.2299255838
- 21
-302.17905407
- 31
-0.0
- 0
-LINE
- 5
-58E
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-302.17905407
- 30
-0.0
- 11
-117.2299255838
- 21
-314.5260224873
- 31
-0.0
- 0
-MTEXT
- 5
-58F
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-112.7181886692
- 20
-309.0961613515
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-1
- 7
-SLDTEXTSTYLE0
- 11
--7.044195017643634E-15
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-587
-330
-585
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-ENDSEC
- 0
-SECTION
- 2
-ENTITIES
- 0
-LINE
- 5
-4B
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-123.9140543182
- 20
-383.8493547742
- 30
-0.0
- 11
-160.598524565
- 21
-383.8493547742
- 31
-0.0
- 0
-LINE
- 5
-4C
-330
-1F
-100
-AcDbEntity
- 8
-STUKLIJST
-100
-AcDbLine
- 10
-10.3087825773
- 20
-9.2198227322
- 30
-0.0
- 11
-10.3087825773
- 21
-409.2698227322
- 31
-0.0
- 0
-LINE
- 5
-4D
-330
-1F
-100
-AcDbEntity
- 8
-STUKLIJST
-100
-AcDbLine
- 10
-10.3087825773
- 20
-9.2198227322
- 30
-0.0
- 11
-287.198438446
- 21
-9.2198227322
- 31
-0.0
- 0
-LINE
- 5
-4E
-330
-1F
-100
-AcDbEntity
- 8
-STUKLIJST
-100
-AcDbLine
- 10
-287.198438446
- 20
-409.2698227322
- 30
-0.0
- 11
-287.198438446
- 21
-9.2198227322
- 31
-0.0
- 0
-LINE
- 5
-4F
-330
-1F
-100
-AcDbEntity
- 8
-STUKLIJST
-100
-AcDbLine
- 10
-287.198438446
- 20
-409.2698227322
- 30
-0.0
- 11
-10.3087825773
- 21
-409.2698227322
- 31
-0.0
- 0
-LINE
- 5
-50
-330
-1F
-100
-AcDbEntity
- 8
-MAATLIJN
-100
-AcDbLine
- 10
-4.3087825773
- 20
-3.2198227322
- 30
-0.0
- 11
-4.3087825773
- 21
-415.2698227322
- 31
-0.0
- 0
-LINE
- 5
-51
-330
-1F
-100
-AcDbEntity
- 8
-MAATLIJN
-100
-AcDbLine
- 10
-4.3087825773
- 20
-415.2698227322
- 30
-0.0
- 11
-293.4090035115
- 21
-415.2698227322
- 31
-0.0
- 0
-LINE
- 5
-52
-330
-1F
-100
-AcDbEntity
- 8
-MAATLIJN
-100
-AcDbLine
- 10
-293.4090035115
- 20
-415.2698227322
- 30
-0.0
- 11
-293.4090035115
- 21
-3.2198227322
- 31
-0.0
- 0
-LINE
- 5
-53
-330
-1F
-100
-AcDbEntity
- 8
-MAATLIJN
-100
-AcDbLine
- 10
-293.4090035115
- 20
-3.2198227322
- 30
-0.0
- 11
-4.3087825773
- 21
-3.2198227322
- 31
-0.0
- 0
-MTEXT
- 5
-55
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-211.9617900851
- 20
-18.9651870984
- 30
-0.0
- 40
-4.2333333333
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-Alum. deurblad - 4 secties
- 7
-SLDTEXTSTYLE0
- 73
- 1
- 44
-1.0
- 0
-INSERT
- 5
-59
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-100
-AcDbBlockReference
- 2
-SW_BROKEN_VIEW_0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 0
-LINE
- 5
-5A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.9420049658
- 20
-336.7369001461
- 30
-0.0
- 11
-148.9420049658
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.1445668807
- 20
-336.7369001461
- 30
-0.0
- 11
-149.1445668807
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.0406432023
- 20
-336.7369001461
- 30
-0.0
- 11
-149.0406432023
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.0406432023
- 20
-359.2202013088
- 30
-0.0
- 11
-148.9420049658
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.9137577285
- 20
-336.7369001461
- 30
-0.0
- 11
-133.9137577285
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.797846066
- 20
-336.7369001461
- 30
-0.0
- 11
-133.797846066
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-60
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.6992078294
- 20
-336.7369001461
- 30
-0.0
- 11
-133.6992078294
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-61
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.797846066
- 20
-359.2202013088
- 30
-0.0
- 11
-133.6992078294
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-62
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.5952848961
- 20
-336.7369001461
- 30
-0.0
- 11
-133.5952848961
- 21
-359.2202013088
- 31
-0.0
- 0
-ARC
- 5
-63
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.1879324767
- 20
-359.1402151319
- 30
-0.0
- 40
-0.0799861772139263
-100
-AcDbArc
- 50
-31.2190407028
- 51
-90.0049728915
- 0
-LINE
- 5
-64
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2563360204
- 20
-336.7369001461
- 30
-0.0
- 11
-149.2563360204
- 21
-359.1816728664
- 31
-0.0
- 0
-LINE
- 5
-65
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2162960043
- 20
-336.7369001461
- 30
-0.0
- 11
-134.2162960043
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-66
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2162960043
- 20
-359.2202013088
- 30
-0.0
- 11
-134.1499254873
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-67
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.4299252202
- 20
-336.7369001461
- 30
-0.0
- 11
-133.4299252202
- 21
-359.1907804561
- 31
-0.0
- 0
-ARC
- 5
-68
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-127.793914781
- 20
-346.5773729462
- 30
-0.0
- 40
-24.8898367051569
-100
-AcDbArc
- 50
-30.3127339119
- 51
-30.4217624082
- 0
-LINE
- 5
-69
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.3099258115
- 20
-336.7369001461
- 30
-0.0
- 11
-149.3099258115
- 21
-359.1109102321
- 31
-0.0
- 0
-LINE
- 5
-6A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2563360204
- 20
-359.1816728664
- 30
-0.0
- 11
-149.2569536736
- 21
-359.1806238247
- 31
-0.0
- 0
-LINE
- 5
-6B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2299253514
- 20
-336.7369001461
- 30
-0.0
- 11
-134.2299253514
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-6C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2299253514
- 20
-359.2202013088
- 30
-0.0
- 11
-134.2162960043
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-6D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.5099256804
- 20
-336.7369001461
- 30
-0.0
- 11
-148.5099256804
- 21
-358.0259626461
- 31
-0.0
- 0
-LINE
- 5
-6E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.6299254169
- 20
-336.7369001461
- 30
-0.0
- 11
-134.6299254169
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-6F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.6299254169
- 20
-359.2202013088
- 30
-0.0
- 11
-134.2299253514
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-70
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.0299256762
- 20
-359.2202013088
- 30
-0.0
- 11
-143.0299256762
- 21
-353.6202257229
- 31
-0.0
- 0
-LINE
- 5
-71
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.0299256762
- 20
-353.6202257229
- 30
-0.0
- 11
-147.3280240615
- 21
-353.6202257229
- 31
-0.0
- 0
-LINE
- 5
-72
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-147.3280240615
- 20
-353.6202257229
- 30
-0.0
- 11
-147.5545917471
- 21
-354.4657533718
- 31
-0.0
- 0
-LINE
- 5
-73
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-141.5499255826
- 20
-359.2202013088
- 30
-0.0
- 11
-141.3099255843
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-74
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-138.9099255969
- 20
-359.2202013088
- 30
-0.0
- 11
-134.6299254169
- 21
-359.2202013088
- 31
-0.0
- 0
-ARC
- 5
-75
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.1595398236
- 20
-361.9409267861
- 30
-0.0
- 40
-0.3992677940247622
-100
-AcDbArc
- 50
-89.9681903289
- 51
-114.7477262168
- 0
-LINE
- 5
-76
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-137.1597614904
- 20
-362.3401945186
- 30
-0.0
- 11
-139.7899255922
- 21
-362.3401945186
- 31
-0.0
- 0
-ARC
- 5
-77
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-139.7899227961
- 20
-361.9401917488
- 30
-0.0
- 40
-0.4000027697985571
-100
-AcDbArc
- 50
-0.0045494665
- 51
-89.9995994903
- 0
-LINE
- 5
-78
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-140.1899255646
- 20
-361.9402235103
- 30
-0.0
- 11
-140.1899255646
- 21
-360.4202097011
- 31
-0.0
- 0
-ARC
- 5
-79
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-140.5899283325
- 20
-360.4201937773
- 30
-0.0
- 40
-0.4000027681863966
-100
-AcDbArc
- 50
-179.9977190938
- 51
-269.999606256
- 0
-LINE
- 5
-7A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-140.5899255836
- 20
-360.0201910091
- 30
-0.0
- 11
-142.2699255703
- 21
-360.0201910091
- 31
-0.0
- 0
-ARC
- 5
-7B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-142.2699229338
- 20
-360.4201936183
- 30
-0.0
- 40
-0.4000026092087915
-100
-AcDbArc
- 50
-270.0003776416
- 51
-0.0023036787
- 0
-LINE
- 5
-7C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-142.6699255427
- 20
-360.4202097011
- 30
-0.0
- 11
-142.6699255427
- 21
-361.9402235103
- 31
-0.0
- 0
-ARC
- 5
-7D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.0699283112
- 20
-361.9401917488
- 30
-0.0
- 40
-0.4000027697974622
-100
-AcDbArc
- 50
-90.0003871694
- 51
-179.9954505335
- 0
-LINE
- 5
-7E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.0699256082
- 20
-362.3401945186
- 30
-0.0
- 11
-148.5899255445
- 21
-362.3401945186
- 31
-0.0
- 0
-ARC
- 5
-7F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5899336175
- 20
-362.4601862448
- 30
-0.0
- 40
-0.1199917263967713
-100
-AcDbArc
- 50
-269.9961451292
- 51
-0.0134590356
- 0
-LINE
- 5
-80
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-362.4602144314
- 30
-0.0
- 11
-148.7099253406
- 21
-366.669732864
- 31
-0.0
- 0
-ARC
- 5
-81
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5098175737
- 20
-366.669705415
- 30
-0.0
- 40
-0.2001077687858761
-100
-AcDbArc
- 50
-0.0078593224
- 51
-46.1736252111
- 0
-ARC
- 5
-82
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.229892261
- 20
-367.4202030254
- 30
-0.0
- 40
-0.8399663770856335
-100
-AcDbArc
- 50
-133.8120979057
- 51
-226.1879020943
- 0
-ARC
- 5
-83
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5098175737
- 20
-368.1707006358
- 30
-0.0
- 40
-0.200107768785933
-100
-AcDbArc
- 50
-313.8263747889
- 51
-359.9921406775
- 0
-LINE
- 5
-84
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-368.1706731868
- 30
-0.0
- 11
-148.7099253406
- 21
-370.3305070949
- 31
-0.0
- 0
-ARC
- 5
-85
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5900202217
- 20
-370.3305234822
- 30
-0.0
- 40
-0.1199051200450481
-100
-AcDbArc
- 50
-359.9921694514
- 51
-45.0183972297
- 0
-LINE
- 5
-86
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.6747787168
- 20
-370.4153364254
- 30
-0.0
- 11
-148.5050731172
- 21
-370.58504277
- 31
-0.0
- 0
-ARC
- 5
-87
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5900489089
- 20
-370.6699467703
- 30
-0.0
- 40
-0.1201231635795685
-100
-AcDbArc
- 50
-180.0128717119
- 51
-224.9757867508
- 0
-LINE
- 5
-88
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.4699257483
- 20
-370.6699197841
- 30
-0.0
- 11
-148.4699257483
- 21
-371.770507629
- 31
-0.0
- 0
-ARC
- 5
-89
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5898274113
- 20
-371.7705247037
- 30
-0.0
- 40
-0.1199016642176248
-100
-AcDbArc
- 50
-134.9804150373
- 51
-180.0081592821
- 0
-LINE
- 5
-8A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.5050731172
- 20
-371.8553369594
- 30
-0.0
- 11
-148.6747787168
- 21
-372.025043304
- 31
-0.0
- 0
-ARC
- 5
-8B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5897987133
- 20
-372.1099479939
- 30
-0.0
- 40
-0.1201266304909027
-100
-AcDbArc
- 50
-315.0254004562
- 51
-359.9867997393
- 0
-LINE
- 5
-8C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-372.1099203182
- 30
-0.0
- 11
-148.7099253406
- 21
-374.2697542263
- 31
-0.0
- 0
-ARC
- 5
-8D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5100322735
- 20
-374.2697706431
- 30
-0.0
- 40
-0.1998930677679371
-100
-AcDbArc
- 50
-359.9952944114
- 51
-46.1998513567
- 0
-ARC
- 5
-8E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.229948176
- 20
-375.0202005459
- 30
-0.0
- 40
-0.840022291756649
-100
-AcDbArc
- 50
-133.8137242063
- 51
-226.1862757937
- 0
-ARC
- 5
-8F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5100322233
- 20
-375.7706304833
- 30
-0.0
- 40
-0.1998931275890775
-100
-AcDbArc
- 50
-313.8001521475
- 51
-0.018363319
- 0
-LINE
- 5
-90
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-375.7706945491
- 30
-0.0
- 11
-148.7099253406
- 21
-392.9185693813
- 31
-0.0
- 0
-ARC
- 5
-91
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.3098818552
- 20
-392.9185180141
- 30
-0.0
- 40
-0.4000434887682899
-100
-AcDbArc
- 50
-0.0073570038
- 51
-106.4508778333
- 0
-ARC
- 5
-92
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.6299231955
- 20
-395.2202061714
- 30
-0.0
- 40
-1.999979879929223
-100
-AcDbArc
- 50
-230.0551007785
- 51
-286.4594915024
- 0
-ARC
- 5
-93
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.0888728608
- 20
-393.3797645665
- 30
-0.0
- 40
-0.4004495854783311
-100
-AcDbArc
- 50
-50.0825069136
- 51
-89.9794164413
- 0
-LINE
- 5
-94
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.0890167227
- 20
-393.7802141262
- 30
-0.0
- 11
-136.7708344778
- 21
-393.7802141262
- 31
-0.0
- 0
-ARC
- 5
-95
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-136.7709783396
- 20
-393.3797645665
- 30
-0.0
- 40
-0.4004495854783879
-100
-AcDbArc
- 50
-90.0205835587
- 51
-129.9174930864
- 0
-ARC
- 5
-96
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-135.2299278051
- 20
-395.220206584
- 30
-0.0
- 40
-1.999980324488907
-100
-AcDbArc
- 50
-253.5405071009
- 51
-309.9448960222
- 0
-ARC
- 5
-97
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.5499689727
- 20
-392.9185180141
- 30
-0.0
- 40
-0.4000434887683444
-100
-AcDbArc
- 50
-73.5491221667
- 51
-179.9926429962
- 0
-LINE
- 5
-98
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.1499254873
- 20
-392.9185693813
- 30
-0.0
- 11
-134.1499254873
- 21
-361.3064115596
- 31
-0.0
- 0
-ARC
- 5
-99
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.3499114332
- 20
-361.3063661517
- 30
-0.0
- 40
-0.1999859510592641
-100
-AcDbArc
- 50
-179.9869906558
- 51
-294.7406415951
- 0
-LINE
- 5
-9A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.4336078336
- 20
-361.1247366024
- 30
-0.0
- 11
-136.9923968633
- 21
-362.3035257412
- 31
-0.0
- 0
-ARC
- 5
-9B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-135.2299441549
- 20
-395.2202094278
- 30
-0.0
- 40
-1.999982807792111
-100
-AcDbArc
- 50
-346.3277484711
- 51
-21.510375133
- 0
-ARC
- 5
-9C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.3676151968
- 20
-394.7002149549
- 30
-0.0
- 40
-0.2000244053689593
-100
-AcDbArc
- 50
-166.3324477609
- 51
-269.9922055192
- 0
-LINE
- 5
-9D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-145.4922632148
- 20
-394.5001905513
- 30
-0.0
- 11
-137.3675879856
- 21
-394.5001905513
- 31
-0.0
- 0
-ARC
- 5
-9E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-145.4922360036
- 20
-394.7002149549
- 30
-0.0
- 40
-0.2000244053689451
-100
-AcDbArc
- 50
-270.0077944808
- 51
-13.6675522392
- 0
-ARC
- 5
-9F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.6299070455
- 20
-395.2202094278
- 30
-0.0
- 40
-1.999982807792221
-100
-AcDbArc
- 50
-158.489624867
- 51
-193.6722515289
- 0
-ARC
- 5
-A0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-145.3970883777
- 20
-396.1002000547
- 30
-0.0
- 40
-0.3999885893651534
-100
-AcDbArc
- 50
-338.4905744645
- 51
-90.0012269037
- 0
-LINE
- 5
-A1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.9099256714
- 20
-396.500188644
- 30
-0.0
- 11
-145.3970798125
- 21
-396.500188644
- 31
-0.0
- 0
-ARC
- 5
-A2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.9099748178
- 20
-396.5802378337
- 30
-0.0
- 40
-0.0800492048011358
-100
-AcDbArc
- 50
-180.0257061046
- 51
-269.9648231328
- 0
-LINE
- 5
-A3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.8299256211
- 20
-397.1401994777
- 30
-0.0
- 11
-143.8299256211
- 21
-396.5802019191
- 31
-0.0
- 0
-ARC
- 5
-A4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.9098934092
- 20
-397.1402449584
- 30
-0.0
- 40
-0.0799678010352043
-100
-AcDbArc
- 50
-89.9768845512
- 51
-180.0325862115
- 0
-LINE
- 5
-A5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-145.8378587683
- 20
-397.2202127529
- 30
-0.0
- 11
-143.9099256714
- 21
-397.2202127529
- 31
-0.0
- 0
-ARC
- 5
-A6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-145.8378250788
- 20
-396.8201414766
- 30
-0.0
- 40
-0.4000712776531297
-100
-AcDbArc
- 50
-35.0061485493
- 51
-89.9951751956
- 0
-LINE
- 5
-A7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.7657630166
- 20
-396.1923902584
- 30
-0.0
- 11
-146.1655196567
- 21
-397.0496481014
- 31
-0.0
- 0
-ARC
- 5
-A8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.667516349
- 20
-396.1235761057
- 30
-0.0
- 40
-0.1199491362526079
-100
-AcDbArc
- 50
-316.8039486115
- 51
-35.0082542764
- 0
-ARC
- 5
-A9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.6299254989
- 20
-395.2202090721
- 30
-0.0
- 40
-1.200014262087242
-100
-AcDbArc
- 50
-136.8133643338
- 51
-43.1866356662
- 0
-ARC
- 5
-AA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5923363035
- 20
-396.1235762241
- 30
-0.0
- 40
-0.1199504236850838
-100
-AcDbArc
- 50
-144.9922455228
- 51
-223.1955515893
- 0
-LINE
- 5
-AB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.1713189354
- 20
-397.1596067501
- 30
-0.0
- 11
-148.4940879812
- 21
-396.1923902584
- 31
-0.0
- 0
-ARC
- 5
-AC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.2877619365
- 20
-397.0780497932
- 30
-0.0
- 40
-0.1421636723032836
-100
-AcDbArc
- 50
-0.0071750237
- 51
-144.9925091982
- 0
-LINE
- 5
-AD
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.4299256077
- 20
-375.5001848293
- 30
-0.0
- 11
-149.4299256077
- 21
-397.078067596
- 31
-0.0
- 0
-ARC
- 5
-AE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484881
- 20
-375.500185302
- 30
-0.0
- 40
-0.3999771195635114
-100
-AcDbArc
- 50
-292.617691446
- 51
-359.9999322798
- 0
-ARC
- 5
-AF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.2299252955
- 20
-375.0202005459
- 30
-0.0
- 40
-0.1199998892853004
-100
-AcDbArc
- 50
-112.6196870788
- 51
-247.3803129212
- 0
-ARC
- 5
-B0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484881
- 20
-374.5402157897
- 30
-0.0
- 40
-0.3999771195634261
-100
-AcDbArc
- 50
-0.0000677202
- 51
-67.382308554
- 0
-LINE
- 5
-B1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.4299256077
- 20
-371.973878677
- 30
-0.0
- 11
-149.4299256077
- 21
-374.5402162624
- 31
-0.0
- 0
-ARC
- 5
-B2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.3098934127
- 20
-371.9739249372
- 30
-0.0
- 40
-0.1200322038601951
-100
-AcDbArc
- 50
-284.0483064245
- 51
-359.9779182862
- 0
-LINE
- 5
-B3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2808216085
- 20
-371.8429391933
- 30
-0.0
- 11
-149.3390300145
- 21
-371.8574827266
- 31
-0.0
- 0
-ARC
- 5
-B4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.309957026
- 20
-371.7264971484
- 30
-0.0
- 40
-0.1200317557485873
-100
-AcDbArc
- 50
-104.0477772241
- 51
-180.000758526
- 0
-LINE
- 5
-B5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.1899252703
- 20
-370.7138841701
- 30
-0.0
- 11
-149.1899252703
- 21
-371.7264955593
- 31
-0.0
- 0
-ARC
- 5
-B6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.3099570381
- 20
-370.7139302833
- 30
-0.0
- 40
-0.120031776642215
- 0
-ARC
- 5
-46F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.3098818552
- 20
-46.4038720687
- 30
-0.0
- 40
-0.4000434887682782
-100
-AcDbArc
- 50
-253.5491221667
- 51
-359.9926429962
- 0
-LINE
- 5
-470
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-63.5516955336
- 30
-0.0
- 11
-148.7099253406
- 21
-46.4038207015
- 31
-0.0
- 0
-ARC
- 5
-471
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5098175737
- 20
-63.5516680847
- 30
-0.0
- 40
-0.2001077687861043
-100
-AcDbArc
- 50
-0.0078593225
- 51
-46.1736252111
- 0
-ARC
- 5
-472
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.229948176
- 20
-64.3021895369
- 30
-0.0
- 40
-0.8400222917564932
-100
-AcDbArc
- 50
-133.8137242063
- 51
-226.1862757937
- 0
-ARC
- 5
-473
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5100322735
- 20
-65.0526194397
- 30
-0.0
- 40
-0.1998930677682871
-100
-AcDbArc
- 50
-313.8001486433
- 51
-0.0047055886
- 0
-LINE
- 5
-474
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-67.2124697646
- 30
-0.0
- 11
-148.7099253406
- 21
-65.0526358565
- 31
-0.0
- 0
-ARC
- 5
-475
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5897987133
- 20
-67.2124420889
- 30
-0.0
- 40
-0.1201266304911527
-100
-AcDbArc
- 50
-0.0132002608
- 51
-44.9745995438
- 0
-LINE
- 5
-476
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.5050731172
- 20
-67.4670531234
- 30
-0.0
- 11
-148.6747787168
- 21
-67.2973467788
- 31
-0.0
- 0
-ARC
- 5
-477
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5898274113
- 20
-67.5518653791
- 30
-0.0
- 40
-0.1199016642178358
-100
-AcDbArc
- 50
-179.9918407179
- 51
-225.0195849627
- 0
-LINE
- 5
-478
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.4699257483
- 20
-68.6524702987
- 30
-0.0
- 11
-148.4699257483
- 21
-67.5518824538
- 31
-0.0
- 0
-ARC
- 5
-479
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5900489089
- 20
-68.6524433125
- 30
-0.0
- 40
-0.1201231635794379
-100
-AcDbArc
- 50
-135.0242132492
- 51
-179.9871282881
- 0
-LINE
- 5
-47A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.6747787168
- 20
-68.9070536574
- 30
-0.0
- 11
-148.5050731172
- 21
-68.7373473128
- 31
-0.0
- 0
-ARC
- 5
-47B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5900202217
- 20
-68.9918666006
- 30
-0.0
- 40
-0.1199051200450481
-100
-AcDbArc
- 50
-314.9816027702
- 51
-0.0078305486
- 0
-LINE
- 5
-47C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-71.151716896
- 30
-0.0
- 11
-148.7099253406
- 21
-68.9918829879
- 31
-0.0
- 0
-ARC
- 5
-47D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5098175737
- 20
-71.151689447
- 30
-0.0
- 40
-0.200107768785911
-100
-AcDbArc
- 50
-0.0078593225
- 51
-46.1736252111
- 0
-ARC
- 5
-47E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.229892261
- 20
-71.9021870574
- 30
-0.0
- 40
-0.8399663770856326
-100
-AcDbArc
- 50
-133.8120979057
- 51
-226.1879020943
- 0
-ARC
- 5
-47F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5098175737
- 20
-72.6526846678
- 30
-0.0
- 40
-0.200107768785933
-100
-AcDbArc
- 50
-313.8263747889
- 51
-359.9921406776
- 0
-LINE
- 5
-480
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-76.8621756514
- 30
-0.0
- 11
-148.7099253406
- 21
-72.6526572188
- 31
-0.0
- 0
-ARC
- 5
-481
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5899336175
- 20
-76.862203838
- 30
-0.0
- 40
-0.1199917263968139
-100
-AcDbArc
- 50
-359.9865409644
- 51
-90.0038548708
- 0
-LINE
- 5
-482
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.0699256082
- 20
-76.9821955642
- 30
-0.0
- 11
-148.5899255445
- 21
-76.9821955642
- 31
-0.0
- 0
-ARC
- 5
-483
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.0699283112
- 20
-77.382198334
- 30
-0.0
- 40
-0.4000027697974338
-100
-AcDbArc
- 50
-180.0045494665
- 51
-269.9996128306
- 0
-LINE
- 5
-484
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-142.6699255427
- 20
-78.9021803817
- 30
-0.0
- 11
-142.6699255427
- 21
-77.3821665725
- 31
-0.0
- 0
-ARC
- 5
-485
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-142.2699229338
- 20
-78.9021964645
- 30
-0.0
- 40
-0.4000026092089052
-100
-AcDbArc
- 50
-359.9976963213
- 51
-89.9996223584
- 0
-LINE
- 5
-486
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-140.5899255836
- 20
-79.3021990737
- 30
-0.0
- 11
-142.2699255703
- 21
-79.3021990737
- 31
-0.0
- 0
-ARC
- 5
-487
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-140.5899283325
- 20
-78.9021963055
- 30
-0.0
- 40
-0.4000027681864251
-100
-AcDbArc
- 50
-90.000393744
- 51
-180.0022809062
- 0
-LINE
- 5
-488
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-140.1899255646
- 20
-77.3821665725
- 30
-0.0
- 11
-140.1899255646
- 21
-78.9021803817
- 31
-0.0
- 0
-ARC
- 5
-489
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-139.7899227961
- 20
-77.382198334
- 30
-0.0
- 40
-0.400002769798557
-100
-AcDbArc
- 50
-270.0004005097
- 51
-359.9954505335
- 0
-LINE
- 5
-48A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-137.1597614904
- 20
-76.9821955642
- 30
-0.0
- 11
-139.7899255922
- 21
-76.9821955642
- 31
-0.0
- 0
-ARC
- 5
-48B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.1595398236
- 20
-77.3814632967
- 30
-0.0
- 40
-0.3992677940260214
-100
-AcDbArc
- 50
-245.2522737832
- 51
-270.0318096711
- 0
-LINE
- 5
-48C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.4336078336
- 20
-78.1976534804
- 30
-0.0
- 11
-136.9923968633
- 21
-77.0188643416
- 31
-0.0
- 0
-ARC
- 5
-48D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.3499584368
- 20
-78.0159505357
- 30
-0.0
- 40
-0.2000329515294041
-100
-AcDbArc
- 50
-65.2803842384
- 51
-179.9919835107
- 0
-LINE
- 5
-48E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-137.4627713879
- 20
-42.8222014388
- 30
-0.0
- 11
-138.949925529
- 21
-42.8222014388
- 31
-0.0
- 0
-ARC
- 5
-48F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-138.9498760641
- 20
-42.7421519306
- 30
-0.0
- 40
-0.0800495234356318
-100
-AcDbArc
- 50
-0.0259339259
- 51
-89.9645953115
- 0
-LINE
- 5
-490
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-139.0299255793
- 20
-42.7421881637
- 30
-0.0
- 11
-139.0299255793
- 21
-42.1821906051
- 31
-0.0
- 0
-ARC
- 5
-491
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-138.9499574737
- 20
-42.182145442
- 30
-0.0
- 40
-0.0799681184311334
-100
-AcDbArc
- 50
-269.9771121806
- 51
-0.032358582
- 0
-LINE
- 5
-492
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-138.949925529
- 20
-42.1021773299
- 30
-0.0
- 11
-137.0219920596
- 21
-42.1021773299
- 31
-0.0
- 0
-ARC
- 5
-493
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.0220261217
- 20
-42.5022486063
- 30
-0.0
- 40
-0.400071277792755
-100
-AcDbArc
- 50
-215.0061485542
- 51
-269.9951218307
- 0
-LINE
- 5
-494
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-136.6943315437
- 20
-42.2727419814
- 30
-0.0
- 11
-136.0940881839
- 21
-43.1299998244
- 31
-0.0
- 0
-ARC
- 5
-495
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-136.1923348514
- 20
-43.1988139771
- 30
-0.0
- 40
-0.1199491362525765
-100
-AcDbArc
- 50
-136.8039486115
- 51
-215.0082542764
- 0
-ARC
- 5
-496
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-135.2299255153
- 20
-44.1021809094
- 30
-0.0
- 40
-1.20001432860059
-100
-AcDbArc
- 50
-316.8133739453
- 51
-223.1866260547
- 0
-ARC
- 5
-497
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.2675178339
- 20
-43.1988140955
- 30
-0.0
- 40
-0.1199478488608696
-100
-AcDbArc
- 50
-324.9912459259
- 51
-43.1965511861
- 0
-LINE
- 5
-498
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.3657628467
- 20
-43.1299998244
- 30
-0.0
- 11
-133.6885318925
- 21
-42.1627833327
- 31
-0.0
- 0
-ARC
- 5
-499
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-133.5720888914
- 20
-42.2443402896
- 30
-0.0
- 40
-0.1421636723032335
-100
-AcDbArc
- 50
-180.0071750236
- 51
-324.9925091983
- 0
-LINE
- 5
-49A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.4299252202
- 20
-42.2443224868
- 30
-0.0
- 11
-133.4299252202
- 21
-79.6323134383
- 31
-0.0
- 0
-ARC
- 5
-49B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-133.0298319476
- 20
-79.6322623339
- 30
-0.0
- 40
-0.4000932758665615
-100
-AcDbArc
- 50
-0.0073184602
- 51
-52.0135000174
- 0
-ARC
- 5
-49C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-133.3499255703
- 20
-80.0421799816
- 30
-0.0
- 40
-0.1199955680613621
-100
-AcDbArc
- 50
-44.424867041
- 51
-232.0186299389
- 0
-ARC
- 5
-49D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-133.4927816435
- 20
-80.1822896055
- 30
-0.0
- 40
-0.080100836150903
-100
-AcDbArc
- 50
-224.4724320243
- 51
-269.9805674286
- 0
-LINE
- 5
-49E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.4927544763
- 20
-80.102188774
- 30
-0.0
- 11
-134.1499254873
- 21
-80.102188774
- 31
-0.0
- 0
-ARC
- 5
-49F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.1499294027
- 20
-80.0221932431
- 30
-0.0
- 40
-0.0799955310303124
-100
-AcDbArc
- 50
-344.0015913282
- 51
-90.0028043747
- 0
-LINE
- 5
-4A0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2268266549
- 20
-80.0001456221
- 30
-0.0
- 11
-134.042500781
- 21
-79.3573214492
- 31
-0.0
- 0
-ARC
- 5
-4A1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.2347360924
- 20
-79.3021720325
- 30
-0.0
- 40
-0.1999896824440735
-100
-AcDbArc
- 50
-163.9926116413
- 51
-245.2696135787
- 0
-LINE
- 5
-4A2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.1510706415
- 20
-79.1205241164
- 30
-0.0
- 11
-137.1502664705
- 21
-77.7388884505
- 31
-0.0
- 0
-ARC
- 5
-4A3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.317737162
- 20
-78.1024627412
- 30
-0.0
- 40
-0.4002907660301162
-100
-AcDbArc
- 50
-245.2681140451
- 51
-269.98476511
- 0
-LINE
- 5
-4A4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-137.3176307251
- 20
-77.7021719893
- 30
-0.0
- 11
-139.1499255618
- 21
-77.7021719893
- 31
-0.0
- 0
-ARC
- 5
-4A5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-139.1499227005
- 20
-78.1021749165
- 30
-0.0
- 40
-0.4000029271641257
-100
-AcDbArc
- 50
-270.0004098464
- 51
-0.0022581337
- 0
-LINE
- 5
-4A6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-139.5499256273
- 20
-78.1021906814
- 30
-0.0
- 11
-139.5499256273
- 21
-78.9021803817
- 31
-0.0
- 0
-ARC
- 5
-4A7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-139.1499227005
- 20
-78.9021961465
- 30
-0.0
- 40
-0.4000029271641541
-100
-AcDbArc
- 50
-359.9977418663
- 51
-89.9995901536
- 0
-LINE
- 5
-4A8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-139.1499255618
- 20
-79.3021990737
- 30
-0.0
- 11
-138.9099255969
- 21
-79.3021990737
- 31
-0.0
- 0
-ARC
- 5
-4A9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-138.9099203808
- 20
-79.7021939238
- 30
-0.0
- 40
-0.3999948501927155
-100
-AcDbArc
- 50
-89.9992528415
- 51
-270.0007471585
- 0
-LINE
- 5
-4AA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-138.9099255969
- 20
-80.102188774
- 30
-0.0
- 11
-141.3099255843
- 21
-80.102188774
- 31
-0.0
- 0
-ARC
- 5
-4AB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-141.4299255835
- 20
-80.1021688621
- 30
-0.0
- 40
-0.1200000008033507
-100
-AcDbArc
- 50
-179.9904927603
- 51
-0.0095072397
- 0
-LINE
- 5
-4AC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-141.5499255826
- 20
-80.102188774
- 30
-0.0
- 11
-144.2299255004
- 21
-80.102188774
- 31
-0.0
- 0
-ARC
- 5
-4AD
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-144.2299329932
- 20
-80.2221814513
- 30
-0.0
- 40
-0.1199926775530223
-100
-AcDbArc
- 50
-269.9964221996
- 51
-359.9902360528
- 0
-LINE
- 5
-4AE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-144.349925669
- 20
-80.222161003
- 30
-0.0
- 11
-144.349925669
- 21
-80.3821875533
- 31
-0.0
- 0
-ARC
- 5
-4AF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-144.4699183448
- 20
-80.382167105
- 30
-0.0
- 40
-0.1199926775144228
-100
-AcDbArc
- 50
-89.9966000615
- 51
-179.9902360605
- 0
-LINE
- 5
-4B0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 99255659
- 21
-158.8450193141
- 31
-0.0
- 0
-ARC
- 5
-366
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-144.629912391
- 20
-158.7250059711
- 30
-0.0
- 40
-0.1200133437027802
-100
-AcDbArc
- 50
-0.0025547204
- 51
-89.9937101469
- 0
-LINE
- 5
-367
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-144.7499257346
- 20
-158.7250113223
- 30
-0.0
- 11
-144.7499257346
- 21
-158.445012543
- 31
-0.0
- 0
-ARC
- 5
-368
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.9499198813
- 20
-158.445016775
- 30
-0.0
- 40
-0.8000058532867297
-100
-AcDbArc
- 50
-270.0004098155
- 51
-359.9996969061
- 0
-LINE
- 5
-369
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.9499256035
- 20
-157.6450109217
- 30
-0.0
- 11
-143.7099256386
- 21
-157.6450109217
- 31
-0.0
- 0
-ARC
- 5
-36A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.7099078321
- 20
-157.2450286629
- 30
-0.0
- 40
-0.3999822592042693
-100
-AcDbArc
- 50
-89.9974492852
- 51
-180.0018036581
- 0
-LINE
- 5
-36B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.3099255731
- 20
-157.2450160716
- 30
-0.0
- 11
-143.3099255731
- 21
-156.4450144503
- 31
-0.0
- 0
-ARC
- 5
-36C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.7099281818
- 20
-156.4450222089
- 30
-0.0
- 40
-0.4000026087843038
-100
-AcDbArc
- 50
-180.0011113328
- 51
-269.9996357238
- 0
-LINE
- 5
-36D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.7099256386
- 20
-156.0450196002
- 30
-0.0
- 11
-148.7099253406
- 21
-156.0450196002
- 31
-0.0
- 0
-ARC
- 5
-36E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.7099328893
- 20
-156.1650125925
- 30
-0.0
- 40
-0.1199929926174386
-100
-AcDbArc
- 50
-269.9963955831
- 51
-0.0014699526
- 0
-LINE
- 5
-36F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.8299258818
- 20
-156.165015671
- 30
-0.0
- 11
-148.8299258818
- 21
-157.5693249438
- 31
-0.0
- 0
-ARC
- 5
-370
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.7098943691
- 20
-157.569311977
- 30
-0.0
- 40
-0.1200315134707315
-100
-AcDbArc
- 50
-0.0061895736
- 51
-64.4733233418
- 0
-LINE
- 5
-371
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.761619704
- 20
-157.6776265834
- 30
-0.0
- 11
-148.4608449807
- 21
-157.8211903308
- 31
-0.0
- 0
-ARC
- 5
-372
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5125576602
- 20
-157.9295010743
- 30
-0.0
- 40
-0.1200225744513657
-100
-AcDbArc
- 50
-195.0053952559
- 51
-244.4779803301
- 0
-LINE
- 5
-373
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.3966276815
- 20
-157.8984260295
- 30
-0.0
- 11
-147.6108663549
- 21
-160.8309268687
- 31
-0.0
- 0
-ARC
- 5
-374
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.1754788065
- 20
-160.7142774394
- 30
-0.0
- 40
-0.4507431714908047
-100
-AcDbArc
- 50
-14.9984882143
- 51
-171.0010622237
- 0
-LINE
- 5
-375
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.7302837243
- 20
-160.7847809527
- 30
-0.0
- 11
-146.7030935754
- 21
-160.6131076548
- 31
-0.0
- 0
-ARC
- 5
-376
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.5055559119
- 20
-160.644393989
- 30
-0.0
- 40
-0.1999999080912547
-100
-AcDbArc
- 50
-198.0001632172
- 51
-351.0001579124
- 0
-LINE
- 5
-377
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.3153448721
- 20
-160.5825900767
- 30
-0.0
- 11
-145.8463118245
- 21
-162.0261311267
- 31
-0.0
- 0
-ARC
- 5
-378
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.1506496208
- 20
-162.1250192095
- 30
-0.0
- 40
-0.3200005424109761
-100
-AcDbArc
- 50
-23.0000921291
- 51
-198.0004663253
- 0
-LINE
- 5
-379
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.4452114721
- 20
-162.2500538562
- 30
-0.0
- 11
-146.5646275153
- 21
-161.9687199328
- 31
-0.0
- 0
-ARC
- 5
-37A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.9328278996
- 20
-162.1250205588
- 30
-0.0
- 40
-0.4000017608535774
-100
-AcDbArc
- 50
-203.0011649826
- 51
-14.9999803862
- 0
-LINE
- 5
-37B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-147.3191999664
- 20
-162.2285485003
- 30
-0.0
- 11
-147.1380212178
- 21
-162.9047155116
- 31
-0.0
- 0
-ARC
- 5
-37C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.2539203196
- 20
-162.9357712365
- 30
-0.0
- 40
-0.1199877487818145
-100
-AcDbArc
- 50
-127.997310757
- 51
-195.0003017269
- 0
-LINE
- 5
-37D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-147.1800529232
- 20
-163.03032634
- 30
-0.0
- 11
-147.4331305196
- 21
-163.2280587886
- 31
-0.0
- 0
-ARC
- 5
-37E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.482384254
- 20
-163.1650243775
- 30
-0.0
- 40
-0.0799954206548413
-100
-AcDbArc
- 50
-14.9903109854
- 51
-128.0033046167
- 0
-LINE
- 5
-37F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-147.5596573969
- 20
-163.1857156489
- 30
-0.0
- 11
-148.8140375187
- 21
-158.5043072436
- 31
-0.0
- 0
-ARC
- 5
-380
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.8913172899
- 20
-158.5250198997
- 30
-0.0
- 40
-0.0800073569232727
-100
-AcDbArc
- 50
-195.0038763407
- 51
-269.9961833848
- 0
-LINE
- 5
-381
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.1546171179
- 20
-157.4790596697
- 30
-0.0
- 11
-137.2058146467
- 21
-156.0562610362
- 31
-0.0
- 0
-LINE
- 5
-382
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7197578718
- 20
-138.1291627619
- 30
-0.0
- 11
-148.1495865454
- 21
-138.0822777484
- 31
-0.0
- 0
-ARC
- 5
-383
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.7099336428
- 20
-138.2487521509
- 30
-0.0
- 40
-0.1199922390625343
-100
-AcDbArc
- 50
-274.6962840302
- 51
-0.000654307
- 0
-LINE
- 5
-384
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.8299258818
- 20
-155.2850126956
- 30
-0.0
- 11
-148.8299258818
- 21
-138.2487535212
- 31
-0.0
- 0
-ARC
- 5
-385
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.7099125383
- 20
-155.2850073444
- 30
-0.0
- 40
-0.1200133436339415
-100
-AcDbArc
- 50
-0.0025547068
- 51
-89.9938880295
- 0
-LINE
- 5
-386
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.0699256082
- 20
-155.4050206874
- 30
-0.0
- 11
-148.7099253406
- 21
-155.4050206874
- 31
-0.0
- 0
-ARC
- 5
-387
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.0699079607
- 20
-155.8050031051
- 30
-0.0
- 40
-0.3999824181675279
-100
-AcDbArc
- 50
-179.9982191144
- 51
-270.0025279423
- 0
-LINE
- 5
-388
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-142.6699255427
- 20
-157.2450160716
- 30
-0.0
- 11
-142.6699255427
- 21
-155.8050155375
- 31
-0.0
- 0
-ARC
- 5
-389
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-142.2699432837
- 20
-157.2450286629
- 30
-0.0
- 40
-0.3999822591972353
-100
-AcDbArc
- 50
-359.9981963414
- 51
-90.002537375
- 0
-LINE
- 5
-38A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-141.7499255688
- 20
-157.6450109217
- 30
-0.0
- 11
-142.2699255703
- 21
-157.6450109217
- 31
-0.0
- 0
-ARC
- 5
-38B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-141.6299255748
- 20
-157.645014845
- 30
-0.0
- 40
-0.1199999941223236
-100
-AcDbArc
- 50
-180.001873219
- 51
-359.998126781
- 0
-LINE
- 5
-38C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-141.3499255833
- 20
-157.6450109217
- 30
-0.0
- 11
-141.5099255807
- 21
-157.6450109217
- 31
-0.0
- 0
-ARC
- 5
-38D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-141.2299255842
- 20
-157.6450148501
- 30
-0.0
- 40
-0.1199999992156321
-100
-AcDbArc
- 50
-180.0018756508
- 51
-359.9981243492
- 0
-LINE
- 5
-38E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-140.5899255836
- 20
-157.6450109217
- 30
-0.0
- 11
-141.109925585
- 21
-157.6450109217
- 31
-0.0
- 0
-ARC
- 5
-38F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-140.5899079826
- 20
-157.245028504
- 30
-0.0
- 40
-0.3999824181641026
-100
-AcDbArc
- 50
-89.9974787276
- 51
-180.0017808858
- 0
-LINE
- 5
-390
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-140.1899255646
- 20
-155.8050155375
- 30
-0.0
- 11
-140.1899255646
- 21
-157.2450160716
- 31
-0.0
- 0
-ARC
- 5
-391
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-139.7899431466
- 20
-155.8050031051
- 30
-0.0
- 40
-0.3999824181605363
-100
-AcDbArc
- 50
-269.9974853975
- 51
-0.001780886
- 0
-LINE
- 5
-392
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2699252834
- 20
-155.4050206874
- 30
-0.0
- 11
-139.7899255922
- 21
-155.4050206874
- 31
-0.0
- 0
-ARC
- 5
-393
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.2699388309
- 20
-155.2850073443
- 30
-0.0
- 40
-0.1200133437736084
-100
-AcDbArc
- 50
-90.0064677366
- 51
-179.9974452656
- 0
-LINE
- 5
-394
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.1499254873
- 20
-154.7275066111
- 30
-0.0
- 11
-134.1499254873
- 21
-155.2850126956
- 31
-0.0
- 0
-ARC
- 5
-395
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.2699407901
- 20
-154.7275112492
- 30
-0.0
- 40
-0.1200153029849757
-100
-AcDbArc
- 50
-180.0022142501
- 51
-218.9973251432
- 0
-LINE
- 5
-396
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.4031833877
- 20
-154.3722629283
- 30
-0.0
- 11
-134.1766678562
- 21
-154.6519875262
- 31
-0.0
- 0
-ARC
- 5
-397
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.3099758432
- 20
-154.2967623625
- 30
-0.0
- 40
-0.1199499136121352
-100
-AcDbArc
- 50
-359.99684824
- 51
-39.0083836716
- 0
-LINE
- 5
-398
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.4299257567
- 20
-150.296747658
- 30
-0.0
- 11
-134.4299257567
- 21
-154.2967557643
- 31
-0.0
- 0
-ARC
- 5
-399
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.3099104538
- 20
-150.2967522961
- 30
-0.0
- 40
-0.12001530298499
-100
-AcDbArc
- 50
-321.0026748568
- 51
-359.9977857498
- 0
-LINE
- 5
-39A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.1766678562
- 20
-149.9415039752
- 30
-0.0
- 11
-134.4031833877
- 21
-150.2212285731
- 31
-0.0
- 0
-ARC
- 5
-39B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.2698754103
- 20
-149.8660034041
- 30
-0.0
- 40
-0.1199499244803327
-100
-AcDbArc
- 50
-140.9916172207
- 51
-180.0088433859
- 0
-LINE
- 5
-39C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.1499254873
- 20
-149.1650104258
- 30
-0.0
- 11
-134.1499254873
- 21
-149.8659848902
- 31
-0.0
- 0
-ARC
- 5
-39D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-134.2699184798
- 20
-149.1650073473
- 30
-0.0
- 40
-0.1199929925413281
-100
-AcDbArc
- 50
-179.9985300323
- 51
-270.0032486934
- 0
-LINE
- 5
-39E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.9420049658
- 20
-105.7777046893
- 30
-0.0
- 11
-148.9420049658
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-39F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.1445668807
- 20
-105.7777046893
- 30
-0.0
- 11
-149.1445668807
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3A0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.0406432023
- 20
-105.7777046893
- 30
-0.0
- 11
-149.0406432023
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3A1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.0406432023
- 20
-124.2850184176
- 30
-0.0
- 11
-148.9420049658
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3A2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.9137577285
- 20
-105.7777046893
- 30
-0.0
- 11
-133.9137577285
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3A3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.797846066
- 20
-105.7777046893
- 30
-0.0
- 11
-133.797846066
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3A4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.6992078294
- 20
-105.7777046893
- 30
-0.0
- 11
-133.6992078294
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3A5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.797846066
- 20
-124.2850184176
- 30
-0.0
- 11
-133.6992078294
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3A6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.5952848961
- 20
-105.7777046893
- 30
-0.0
- 11
-133.5952848961
- 21
-124.2850184176
- 31
-0.0
- 0
-ARC
- 5
-3A7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.1879091276
- 20
-124.2049907824
- 30
-0.0
- 40
-0.0800276369171186
-100
-AcDbArc
- 50
-31.2357600789
- 51
-89.9882535152
- 0
-LINE
- 5
-3A8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2563360204
- 20
-105.7777046893
- 30
-0.0
- 11
-149.2563360204
- 21
-124.2464899752
- 31
-0.0
- 0
-LINE
- 5
-3A9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2162960043
- 20
-105.7777046893
- 30
-0.0
- 11
-134.2162960043
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3AA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2162960043
- 20
-124.2850184176
- 30
-0.0
- 11
-134.1499254873
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3AB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.4299252202
- 20
-105.7777046893
- 30
-0.0
- 11
-133.4299252202
- 21
-124.2555737231
- 31
-0.0
- 0
-LWPOLYLINE
- 5
-3AC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbPolyline
- 90
- 4
- 70
- 128
- 43
-0.0
- 10
-149.2569536736
- 20
-124.2454528544
- 10
-149.2656842639
- 20
-124.2305516932
- 10
-149.2736712863
- 20
-124.2169141505
- 10
-149.2808976044
- 20
-124.204575989
- 0
-LINE
- 5
-3AD
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.3099258115
- 20
-105.7777046893
- 30
-0.0
- 11
-149.3099258115
- 21
-124.1757392619
- 31
-0.0
- 0
-LINE
- 5
-3AE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2563360204
- 20
-124.2464899752
- 30
-0.0
- 11
-149.2569536736
- 21
-124.2454528544
- 31
-0.0
- 0
-LINE
- 5
-3AF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2299253514
- 20
-105.7777046893
- 30
-0.0
- 11
-134.2299253514
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3B0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2299253514
- 20
-124.2850184176
- 30
-0.0
- 11
-134.2162960043
- 21
-124.2850184176
- 31
-0.0
- 0
-LINE
- 5
-3B1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.5099256804
- 20
-105.7777046893
- 30
-0.0
- 11
-148.5099256804
- 21
-123.090755913
- 31
-0.0
- 0
-LINE
- 5
-3B2 5
-4FF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-133.4299255838
- 20
-660.3011936068
- 30
-0.0
- 0
-DIMENSION
- 5
-500
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-34.5771309945
- 31
-0.0
- 70
- 160
- 1
-33
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE0
-100
-AcDbAlignedDimension
- 13
-142.0299255838
- 23
-28.7821787182
- 33
-0.0
- 14
-148.0299255838
- 24
-41.9821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-50D
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_1
- 10
-171.4299255838
- 20
-287.499722104
- 30
-0.0
- 11
-171.4299255838
- 21
-271.6850735678
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-280.0124004364
- 33
-0.0
- 14
-147.8555696261
- 24
-287.499722104
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-51A
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_2
- 10
-171.4299255838
- 20
-210.3073934143
- 30
-0.0
- 11
-171.4299255838
- 21
-194.8678981433
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-202.8200717467
- 33
-0.0
- 14
-147.8555696261
- 24
-210.3073934143
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-526
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_3
- 10
-171.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-171.4299255838
- 21
-113.1236101725
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-126.2783621669
- 33
-0.0
- 14
-148.0299255838
- 24
-133.7256838344
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-532
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_4
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-84.1586135498
- 31
-0.0
- 70
- 160
- 1
-675,902
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-148.0299255838
- 23
-133.7256838344
- 33
-0.0
- 14
-148.0299255838
- 24
-41.9821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-53C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_5
- 10
-195.3191971725
- 20
-133.7649839595
- 30
-0.0
- 11
-195.2817915125
- 21
-178.7746730971
- 31
-0.0
- 70
- 160
- 1
-524,500
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-210.3073934143
- 33
-0.0
- 14
-148.0299255838
- 24
-133.7256838344
- 34
-0.0
- 50
--89.9523838979
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-545
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_6
- 10
-195.2555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-195.2555696261
- 21
-246.0726158741
- 31
-0.0
- 70
- 160
- 1
-524,400
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-287.499722104
- 33
-0.0
- 14
-147.8555696261
- 24
-210.3073934143
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-54E
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_7
- 10
-195.2555696261
- 20
-397.2202084954
- 30
-0.0
- 11
-195.2555696261
- 21
-357.7845521004
- 31
-0.0
- 70
- 160
- 1
-545,698
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-287.499722104
- 33
-0.0
- 14
-145.8378589248
- 24
-397.2202084954
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-557
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_8
- 10
-219.4299255838
- 20
-397.2202084954
- 30
-0.0
- 11
-219.4299255838
- 21
-226.31135989
- 31
-0.0
- 70
- 160
- 1
-Kozijnmaat =
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-142.0299255838
- 23
-28.7821787182
- 33
-0.0
- 14
-145.8378589248
- 24
-397.2202084954
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-561
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_9
- 10
-99.2299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-99.2299255838
- 21
-214.5361780403
- 31
-0.0
- 70
- 160
- 1
-DMH =
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-133.4299255838
- 23
-383.8202084954
- 33
-0.0
- 14
-142.0299255838
- 24
-28.7821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-56C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_10
- 10
-117.2299255838
- 20
-148.4450158005
- 30
-0.0
- 11
-117.2299255838
- 21
-157.3719824392
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-147.8850158005
- 33
-0.0
- 14
-133.5499255838
- 24
-148.4450158005
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-578
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_11
- 10
-117.2299255838
- 20
-224.9867253803
- 30
-0.0
- 11
-117.2299255838
- 21
-236.5334651005
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-224.4267253803
- 33
-0.0
- 14
-133.5499255838
- 24
-224.9867253803
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-584
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_12
- 10
-117.2299255838
- 20
-302.17905407
- 30
-0.0
- 11
-117.2299255838
- 21
-311.8110919194
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-301.61905407
- 33
-0.0
- 14
-133.5499255838
- 24
-302.17905407
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-LINE
- 5
-590
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-103.7777066237
- 30
-0.0
- 11
-142.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-591
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-143.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-592
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-141.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-593
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-139.3699255838
- 21
-101.7777066237
- 31
-0.0
- 0
-LINE
- 5
-594
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-101.7777066237
- 30
-0.0
- 11
-140.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-595
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-130.2549255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-596
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-105.7777066237
- 30
-0.0
- 11
-142.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-597
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-143.3699255838
- 21
-107.7777066237
- 31
-0.0
- 0
-LINE
- 5
-598
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-107.7777066237
- 30
-0.0
- 11
-141.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-599
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-139.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-59A
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-140.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-59B
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-130.2549255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-59C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-179.2366515846
- 30
-0.0
- 11
-142.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-59D
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-143.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-59E
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-141.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-59F
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 31
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-139.3699255838
- 21
-177.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A0
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-177.2366515846
- 30
-0.0
- 11
-140.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A1
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-130.2549255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A2
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-181.2366515846
- 30
-0.0
- 11
-142.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A3
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-143.3699255838
- 21
-183.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A4
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-183.2366515846
- 30
-0.0
- 11
-141.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A5
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-139.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A6
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-140.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A7
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-130.2549255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A8
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-256.4750445598
- 30
-0.0
- 11
-142.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5A9
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-143.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AA
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-141.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AB
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-139.3699255838
- 21
-254.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AC
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-254.4750445598
- 30
-0.0
- 11
-140.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AD
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-130.2549255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AE
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-258.4750445598
- 30
-0.0
- 11
-142.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-143.3699255838
- 21
-260.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B0
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-260.4750445598
- 30
-0.0
- 11
-141.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B1
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-139.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B2
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-140.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B3
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-130.2549255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B4
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-334.7369117996
- 30
-0.0
- 11
-142.3699255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B5
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-334.7369117996
- 30
-0.0
- 11
-143.3699255838
- 21
-336.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B6
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-336.7369117996
- 30
-0.0
- 11
-141.3699255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B7
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-334.7369117996
- 30
-0.0
- 11
-139.3699255838
- 21
-332.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B8
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-332.7369117996
- 30
-0.0
- 11
-140.3699255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B9
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-334.7369117996
- 30
-0.0
- 11
-130.2549255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BA
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-336.7369117996
- 30
-0.0
- 11
-142.3699255838
- 21
-336.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BB
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-336.7369117996
- 30
-0.0
- 11
-143.3699255838
- 21
-338.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BC
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-338.7369117996
- 30
-0.0
- 11
-141.3699255838
- 21
-336.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BD
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-336.7369117996
- 30
-0.0
- 11
-139.3699255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BE
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-334.7369117996
- 30
-0.0
- 11
-140.3699255838
- 21
-336.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-336.7369117996
- 30
-0.0
- 11
-130.2549255838
- 21
-336.7369117996
- 31
-0.0
- 0
-ENDSEC
- 0
-SECTION
- 2
-OBJECTS
- 0
-DICTIONARY
- 5
-C
-330
-0
-100
-AcDbDictionary
-281
- 1
- 3
-ACAD_GROUP
-350
-D
- 3
-ACAD_LAYOUT
-350
-1A
- 3
-ACAD_MLINESTYLE
-350
-17
- 3
-ACAD_PLOTSETTINGS
-350
-19
- 3
-ACAD_PLOTSTYLENAME
-350
-E
- 0
-DICTIONARY
- 5
-D
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 0
-DICTIONARY
- 5
-1A
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 3
-Layout1
-350
-1E
- 3
-Layout2
-350
-26
- 3
-Model
-350
-22
- 0
-DICTIONARY
- 5
-17
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 3
-Standard
-350
-18
- 0
-DICTIONARY
- 5
-19
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 0
-ACDBDICTIONARYWDFLT
- 5
-E
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 3
-Normal
-350
-F
-100
-AcDbDictionaryWithDefault
-340
-F
- 0
-LAYOUT
- 5
-1E
-102
-{ACAD_REACTORS
-330
-1A
-102
-}
-330
-1A
-100
-AcDbPlotSettings
- 1
-
- 2
-none_device
- 4
-
- 6
-
- 40
-0.0
- 41
-0.0
- 42
-0.0
- 43
-0.0
- 44
-0.0
- 45
-0.0
- 46
-0.0
- 47
-0.0
- 48
-0.0
- 49
-0.0
-140
-0.0
-141
-0.0
-142
-1.0
-143
-1.0
- 70
- 688
- 72
- 0
- 73
- 0
- 74
- 5
- 7
-
- 75
- 16
-147
-1.0
-148
-0.0
-149
-0.0
-100
-AcDbLayout
- 1
-Layout1
- 70
- 1
- 71
- 1
- 10
-0.0
- 20
-0.0
- 11
-420.0
- 21
-297.0
- 12
-0.0
- 22
-0.0
- 32
-0.0
- 14
-1.0000000000E+20
- 24
-1.0000000000E+20
- 34
-1.0000000000E+20
- 15
--1.0000000000E+20
- 25
--1.0000000000E+20
- 35
--1.0000000000E+20
-146
-0.0
- 13
-0.0
- 23
-0.0
- 33
-0.0
- 16
-1.0
- 26
-0.0
- 36
-0.0
- 17
-0.0
- 27
-1.0
- 37
-0.0
- 76
- 0
-330
-1B
- 0
-LAYOUT
- 5
-26
-102
-{ACAD_REACTORS
-330
-1A
-102
-}
-330
-1A
-100
-AcDbPlotSettings
- 1
-
- 2
-none_device
- 4
-
- 6
-
- 40
-0.0
- 41
-0.0
- 42
-0.0
- 43
-0.0
- 44
-0.0
- 45
-0.0
- 46
-0.0
- 47
-0.0
- 48
-0.0
- 49
-0.0
-140
-0.0
-141
-0.0
-142
-1.0
-143
-1.0
- 70
- 688
- 72
- 0
- 73
- 0
- 74
- 5
- 7
-
- 75
- 16
-147
-1.0
-148
-0.0
-149
-0.0
-100
-AcDbLayout
- 1
-Layout2
- 70
- 1
- 71
- 2
- 10
-0.0
- 20
-0.0
- 11
-0.0
- 21
-0.0
- 12
-0.0
- 22
-0.0
- 32
-0.0
- 14
-0.0
- 24
-0.0
- 34
-0.0
- 15
-0.0
- 25
-0.0
- 35
-0.0
-146
-0.0
- 13
-0.0
- 23
-0.0
- 33
-0.0
- 16
-1.0
- 26
-0.0
- 36
-0.0
- 17
-0.0
- 27
-1.0
- 37
-0.0
- 76
- 0
-330
-23
- 0
-LAYOUT
- 5
-22
-102
-{ACAD_REACTORS
-330
-1A
-102
-}
-330
-1A
-100
-AcDbPlotSettings
- 1
-
- 2
-none_device
- 4
-
- 6
-
- 40
-0.0
- 41
-0.0
- 42
-0.0
- 43
-0.0
- 44
-0.0
- 45
-0.0
- 46
-0.0
- 47
-0.0
- 48
-0.0
- 49
-0.0
-140
-0.0
-141
-0.0
-142
-1.0
-143
-1.0
- 70
- 1712
- 72
- 0
- 73
- 0
- 74
- 0
- 7
-
- 75
- 0
-147
-1.0
-148
-0.0
-149
-0.0
-100
-AcDbLayout
- 1
-Model
- 70
- 1
- 71
- 0
- 10
-0.0
- 20
-0.0
- 11
-297.0
- 21
-420.0
- 12
-0.0
- 22
-0.0
- 32
-0.0
- 14
-0.0
- 24
-0.0
- 34
-0.0
- 15
-297.0
- 25
-420.0
- 35
-0.0
-146
-0.0
- 13
-0.0
- 23
-0.0
- 33
-0.0
- 16
-1.0
- 26
-0.0
- 36
-0.0
- 17
-0.0
- 27
-1.0
- 37
-0.0
- 76
- 0
-330
-1F
-331
-29
- 0
-MLINESTYLE
- 5
-18
-102
-{ACAD_REACTORS
-330
-17
-102
-}
-330
-17
-100
-AcDbMlineStyle
- 2
-Standard
- 70
- 0
- 3
-
- 62
- 256
- 51
-90.0
- 52
-90.0
- 71
- 2
- 49
-0.5
- 62
- 256
- 6
-BYLAYER
- 49
--0.5
- 62
- 256
- 6
-BYLAYER
- 0
-ACDBPLACEHOLDER
- 5
-F
-102
-{ACAD_REACTORS
-330
-E
-102
-}
-330
-E
- 0
-ENDSEC
- 0
-EOF
diff --git a/filter/qa/cppunit/data/dxf/pass/loop-2.dxf b/filter/qa/cppunit/data/dxf/pass/loop-2.dxf
deleted file mode 100644
index 961dd35a1624..000000000000
--- a/filter/qa/cppunit/data/dxf/pass/loop-2.dxf
+++ /dev/null
@@ -1,13974 +0,0 @@
- 0
-SECTION*
- 2
-HEADER
- 9
-$ACADVER
- 1
-AC1015
- 9
-$ACADMAINTVER
- 70
- 6
- 9
-$DWGCODEPAGE
- 3
-ANSI_1252
- 9
-$INSBASE
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$EXTMIN
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 9
-$EXTMAX
- 10
-297.0
- 20
-420.0
- 30
-0.0
- 9
-$LIMMIN
- 10
-0.0
- 20
-0.0
- 9
-$LIMMAX
- 10
-297.0
- 20
-420.0
- 9
-$ORTHOMODE
- 70
- 0
- 9
-$REGENMODE
- 70
- 1
- 9
-$FILL«ODE
- 70
- 1
- 9
-$QTEXTMODE
- 70
- 0
- 9
-$MIRRTEXT
- 70
- 1
- 0
-DIMSTYLE
-105
-501
-102
-{ACAD_REACTORS
-330
-500
-102
-}
-330
-A
-100
-AcDbSymbolTableRecord
-100
-AcDbDimStyleTableRecord
- 2
-SLDDIMSTYLE0
- 70
- 0
- 41
-3.0
- 44
-0.0
- 45
-0.000000001
- 73
- 0
- 74
- 0
- 77
- 1
- 78
- 12
- 79
- 3
-140
-3.5
-144
-2.5
-147
-0.875
-172
- 1
-173
- 1
-178
- 0
-271
- 3
-272
- 3
-276
- 2
-284
- 12
-289
- 0
-340
-54
- 0
-DIMSTYLE
-105
-50E
-102
-{ACAD_REACTORS
-330
-50D
-330
-51A
-330
-526
-330
-56C
-330
-578
-330
-584
-102
-}
-330
-A
-100
-AcDbSymbolTableRecord
-100
-AcDbDimStyleTableRecord
- 2
-SLDDIMSTYLE1
- 70
- 0
- 41
-3.0
- 44
-0.0
- 45
-0.000000001
- 73
- 0
- 74
- 0
- 77
- 1
- 78
- 12
- 79
- 3
-140
-3.5
-144
-2.5
-147
-0.875
-172
- 1
-173
- 1
-178
- 0
-271
- 0
-272
- 0
-276
- 2
-284
- 12
-289
- 0
-340
-54
- 0
-DIMSTYLE
-105
-533
-102
-{ACAD_REACTORS
-330
-532
-330
-53C
-330
-545
-330
-54E
-330
-557
-330
-561
-102
-}
-330
-A
-100
-AcDbSymbolTableRecord
-100
-AcDbDimStyleTableRecord
- 2
-SLDDIMSTYLE2
- 70
- 0
- 41
-3.0
- 44
-0.0
- 45
-0.000000001
- 73
- 0
- 74
- 0
- 77
- 1
- 78
- 12
- 79
- 3
-140
-3.5
-144
-2.5
-147
-0.875
-173
- 1
-178
- 0
-271
- 3
-272
- 3
-276
- 2
-284
- 12
-340
-54
- 0
-ENDTAB
- 0
-TABLE
- 2
-BLOCK_RECORD
- 5
-1
-330
-0
-100
-AcDbSymbolTable
- 70
- 15
- 0
-BLOCK_RECORD
- 5
-1F
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-*Model_Space
-340
-22
- 0
-BLOCK_RECORD
- 5
-1B
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-*Paper_Space
-340
-1E
- 0
-BLOCK_RECORD
- 5
-23
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-*Paper_Space0
-340
-26
- 0
-BLOCK_RECORD
- 5
-56
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-SW_BROKEN_VIEW_0
-340
-0
-102
-{BLKREFS
-331
-59
-102
-}
- 0
-BLOCK_RECORD
- 5
-502
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D
-340
-0
- 0
-BLOCK_RECORD
- 5
-50F
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_1
-340
-0
- 0
-BLOCK_RECORD
- 5
-51B
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_2
-340
-0
- 0
-BLOCK_RECORD
- 5
-527
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_3
-340
-0
- 0
-BLOCK_RECORD
- 5
-534
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_4
-340
-0
- 0
-BLOCK_RECORD
- 5
-53D
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_5
-340
-0
- 0
-BLOCK_RECORD
- 5
-546
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_6
-340
-0
- 0
-BLOCK_RECORD
- 5
-54F
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_7
-340
-0
- 0
-BLOCK_RECORD
- 5
-558
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_8
-340
-0
- 0
-BLOCK_RECORD
- 5
-562
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_9
-340
-0
- 0
-BLOCK_RECORD
- 5
-56D
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_10
-340
-0
- 0
-BLOCK_RECORD
- 5
-579
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_11
-340
-0
- 0
-BLOCK_RECORD
- 5
-585
-330
-1
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
- 2
-_D_12
-340
-0
- 0
-ENDTAB
- 0
-ENDSEC
- 0
-SECTION
- 2
-BLOCKS
- 0
-BLOCK
- 5
-20
-330
-1F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-*Model_Space
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-*Model_Space
- 1
-
- 0
-ENDBLK
- 5
-21
-330
-1F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-1C
-330
-1B
-100
-AcDbEntity
- 67
- 1
- 8
-0
-100
-AcDbBlockBegin
- 2
-*Paper_Space
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-*Paper_Space
- 1
-
- 0
-ENDBLK
- 5
-1D
-330
-1B
-100
-AcDbEntity
- 67
- 1
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-24
-330
-23
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-*Paper_Space0
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-*Paper_Space0
- 1
-
- 0
-ENDBLË
- 5
-25
-330
-23
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-57
-330
-56
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-SW_BROKEN_VIEW_0
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-SW_BROKEN_VIEW_0
- 1
-
- 0
-ENDBLK
- 5
-58
-330
-56
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-503
-330
-502
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D
- 1
-
- 0
-SOLID
- 5
-505
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-194.9299255838
- 21
-25.7821787182
- 31
-0.0
- 12
-195.9299255838
- 22
-25.7821787182
- 32
-0.0
- 13
-195.9299255838
- 23
-25.7821787182
- 33
-0.0
- 0
-SOLID
- 5
-506
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.9299255838
- 21
-44.9821787182
- 31
-0.0
- 12
-194.9299255838
- 22
-44.9821787182
- 32
-0.0
- 13
-194.9299255838
- 23
-44.9821787182
- 33
-0.0
- 0
-LINE
- 5
-507
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-143.0299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-196.4299255838
- 21
-28.7821787182
- 31
-0.0
- 0
-LINE
- 5
-508
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.0299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-196.4299255838
- 21
-41.9821787182
- 31
-0.0
- 0
-LINE
- 5
-509
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-22.7821787182
- 31
-0.0
- 0
-LINE
- 5
-50A
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-41.9821787182
- 31
-0.0
- 0
-LINE
- 5
-50B
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-47.9821787182
- 31
-0.0
- 0
-MTEXT
- 5
-50C
-330
-502
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-190.9181886692
- 20
-31.991019801
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-33
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-504
-330
-502
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-510
-330
-50F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_1
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_1
- 1
-
- 0
-SOLID
- 5
-512
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-280.0124004364
- 30
-0.0
- 11
-170.9299255838
- 21
-277.0124004364
- 31
-0.0
- 12
-171.9299255838
- 22
-277.0124004364
- 32
-0.0
- 13
-171.9299255838
- 23
-277.0124004364
- 33
-0.0
- 0
-SOLID
- 5
-513
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-287.499722104
- 30
-0.0
- 11
-171.9299255838
- 21
-290.499722104
- 31
-0.0
- 12
-170.9299255838
- 22
-290.499722104
- 32
-0.0
- 13
-170.9299255838
- 23
-290.499722104
- 33
-0.0
- 0
-LINE
- 5
-514
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-150.4168593775
- 20
-280.0124004364
- 30
-0.0
- 11
-172.4299255838
- 21
-280.0124004364
- 31
-0.0
- 0
-LINE
- 5
-515
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-287.499722104
- 30
-0.0
- 11
-172.4299255838
- 21
-287.499722104
- 31
-0.0
- 0
-LINE
- 5
-516
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-280.0124004364
- 30
-0.0
- 11
-171.4299255838
- 21
-267.6770872868
- 31
-0.0
- 0
-LINE
- 5
-517
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-280.0124004364
- 30
-0.0
- 11
-171.4299255838
- 21
-287.499722104
- 31
-0.0
- 0
-LINE
- 5
-518
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-287.499722104
- 30
-0.0
- 11
-171.4299255838
- 21
-293.499722104
- 31
-0.0
- 0
-MTEXT
- 5
-519
-330
-50F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-166.9181886692
- 20
-267.6770872868
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-19
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-511
-330
-50F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-51C
-330
-51B
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_2
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_2
- 1
-
- 0
-SOLID
- 5
-51E
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-202.8200717467
- 30
-0.0
- 11
-170.9299255838
- 21
-199.8200717467
- 31
-0.0
- 12
-1715696261
- 21
-284.499722104
- 31
-0.0
- 12
-195.7555696261
- 22
-284.499722104
- 32
-0.0
- 13
-195.7555696261
- 23
-284.499722104
- 33
-0.0
- 0
-SOLID
- 5
-54A
-330
-546
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.2555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-195.7555696261
- 21
-213.3073934143
- 31
-0.0
- 12
-194.7555696261
- 22
-213.3073934143
- 32
-0.0
- 13
-194.7555696261
- 23
-213.3073934143
- 33
-0.0
- 0
-LINE
- 5
-54B
-330
-546
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-287.499722104
- 30
-0.0
- 11
-196.2555696261
- 21
-287.499722104
- 31
-0.0
- 0
-LINE
- 5
-54C
-330
-546
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-196.2555696261
- 21
-210.3073934143
- 31
-0.0
- 0
-LINE
- 5
-54D
-330
-546
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.2555696261
- 20
-287.499722104
- 30
-0.0
- 11
-195.2555696261
- 21
-210.3073934143
- 31
-0.0
- 0
-ENDBLK
- 5
-548
-330
-546
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-550
-330
-54F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_7
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_7
- 1
-
- 0
-SOLID
- 5
-552
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.2555696261
- 20
-287.499722104
- 30
-0.0
- 11
-195.7555696261
- 21
-290.499722104
- 31
-0.0
- 12
-194.7555696261
- 22
-290.499722104
- 32
-0.0
- 13
-194.7555696261
- 23
-290.499722104
- 33
-0.0
- 0
-SOLID
- 5
-553
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.2555696261
- 20
-397.2202084954
- 30
-0.0
- 11
-194.7555696261
- 21
-394.2202084954
- 31
-0.0
- 12
-195.7555696261
- 22
-394.2202084954
- 32
-0.0
- 13
-195.7555696261
- 23
-394.2202084954
- 33
-0.0
- 0
-LINE
- 5
-554
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-287.499722104
- 30
-0.0
- 11
-196.2555696261
- 21
-287.499722104
- 31
-0.0
- 0
-LINE
- 5
-555
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-146.8378589248
- 20
-397.2202084954
- 30
-0.0
- 11
-196.2555696261
- 21
-397.2202084954
- 31
-0.0
- 0
-LINE
- 5
-556
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.2555696261
- 20
-287.499722104
- 30
-0.0
- 11
-195.2555696261
- 21
-397.2202084954
- 31
-0.0
- 0
-ENDBLK
- 5
-551
-330
-54F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-559
-330
-558
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_8
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_8
- 1
-
- 0
-SOLID
- 5
-55B
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-219.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-219.9299255838
- 21
-31.7821787182
- 31
-0.0
- 12
-218.9299255838
- 22
-31.7821787182
- 32
-0.0
- 13
-218.9299255838
- 23
-31.7821787182
- 33
-0.0
- 0
-SOLID
- 5
-55C
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-219.4299255838
- 20
-397.2202084954
- 30
-0.0
- 11
-218.9299255838
- 21
-394.2202084954
- 31
-0.0
- 12
-219.9299255838
- 22
-394.2202084954
- 32
-0.0
- 13
-219.9299255838
- 23
-394.2202084954
- 33
-0.0
- 0
-LINE
- 5
-5527
- 20
-360.4202097011
- 30
-0.0
- 11
-142.6699255427
- 21
-361.9402235103
- 31
-0.0
- 0
-ARC
- 5
-7D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.0699283112
- 20
-361.9401917488
- 30
-0.0
- 40
-0.4000027697974622
-100
-AcDbArc
- 50
-90.0003871694
- 51
-179.9954505335
- 0
-LINE
- 5
-7E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.0699256082
- 20
-362.3401945186
- 30
-0.0
- 11
-148.5899255445
- 21
-362.3401945186
- 31
-0.0
- 0
-ARC
- 5
-7F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5899336175
- 20
-362.4601862448
- 30
-0.0
- 40
-0.1199917263967713
-100
-AcDbArc
- 50
-269.9961451292
- 51
-0.0134590356
- 0
-LINE
- 5
-80
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-362.4602144314
- 30
-0.0
- 11
-148.7099253406
- 21
-366.669732864
- 31
-0.0
- 0
-ARC
- 5
-81
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5098175737
- 20
-366.669705415
- 30
-0.0
- 40
-0.2001077687858761
-100
-AcDbArc
- 50
-0.0078593224
- 51
-46.1736252111
- 0
-ARC
- 5
-82
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.229892261
- 20
-367.4202030254
- 30
-0.0
- 40
-0.8399663770856335
-100
-AcDbArc
- 50
-133.8120979057
- 51
-226.1879020943
- 0
-ARC
- 5
-83
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5098175737
- 20
-368.1707006358
- 30
-0.0
- 40
-0.200107768785933
-100
-AcDbArc
- 50
-313.8263747889
- 51
-359.9921406775
- 0
-LINE
- 5
-84
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-368.1706731868
- 30
-0.0
- 11
-148.7099253406
- 21
-370.3305070949
- 31
-0.0
- 0
-ARC
- 5
-85
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5900202217
- 20
-370.3305234822
- 30
-0.0
- 40
-0.1199051200450481
-100
-AcDbArc
- 50
-359.9921694514
- 51
-45.0183972297
- 0
-LINE
- 5
-86
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.6747787168
- 20
-370.4153364254
- 30
-0.0
- 11
-148.5050731172
- 21
-370.58504277
- 31
-0.0
- 0
-ARC
- 5
-87
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5900489089
- 20
-370.6699467703
- 30
-0.0
- 40
-0.1201231635795685
-100
-AcDbArc
- 50
-180.0128717119
- 51
-224.9757867508
- 0
-LINE
- 5
-88
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.4699257483
- 20
-370.669919ontinuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484826
- 20
-72.3821479784
- 30
-0.0
- 40
-0.399977127854635
-100
-AcDbArc
- 50
-292.6176918057
- 51
-0.0067619015
- 0
-ARC
- 5
-4D2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.2299252955
- 20
-71.9021632155
- 30
-0.0
- 40
-0.1199998892853113
-100
-AcDbArc
- 50
-112.6196870788
- 51
-247.3803129212
- 0
-ARC
- 5
-4D3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484881
- 20
-71.4221784593
- 30
-0.0
- 40
-0.3999771195634846
-100
-AcDbArc
- 50
-0.0000677203
- 51
-67.382308554
- 0
-LINE
- 5
-4D4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.4299256077
- 20
-71.4221789321
- 30
-0.0
- 11
-149.4299256077
- 21
-68.8558890304
- 31
-0.0
- 0
-ARC
- 5
-4D5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.3098934248
- 20
-68.8558875882
- 30
-0.0
- 40
-0.1200321828299822
-100
-AcDbArc
- 50
-284.0483029705
- 51
-0.0006883757
- 0
-LINE
- 5
-4D6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.3390300145
- 20
-68.7394453963
- 30
-0.0
- 11
-149.2808216085
- 21
-68.724901863
- 31
-0.0
- 0
-ARC
- 5
-4D7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.3099570381
- 20
-68.6084597995
- 30
-0.0
- 40
-0.1200317766406951
-100
-AcDbArc
- 50
-104.0477806555
- 51
-179.9779884139
- 0
-LINE
- 5
-4D8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.1899252703
- 20
-68.6085059127
- 30
-0.0
- 11
-149.1899252703
- 21
-67.5958945235
- 31
-0.0
- 0
-ARC
- 5
-4D9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.309957026
- 20
-67.5958929344
- 30
-0.0
- 40
-0.1200317557485991
-100
-AcDbArc
- 50
-179.999241474
- 51
-255.952222776
- 0
-LINE
- 5
-4DA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2808216085
- 20
-67.4794508895
- 30
-0.0
- 11
-149.3390300145
- 21
-67.4649073562
- 31
-0.0
- 0
-ARC
- 5
-4DB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.3098934248
- 20
-67.3484651642
- 30
-0.0
- 40
-0.1200321828298969
-100
-AcDbArc
- 50
-359.9993116244
- 51
-75.9516970296
- 0
-LINE
- 5
-4DC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.4299256077
- 20
-67.3484637221
- 30
-0.0
- 11
-149.4299256077
- 21
-64.7821738204
- 31
-0.0
- 0
-ARC
- 5
-4DD
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484881
- 20
-64.7821742931
- 30
-0.0
- 40
-0.3999771195634605
-100
-AcDbArc
- 50
-292.617691446
- 51
-359.9999322797
- 0
-ARC
- 5
-4DE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.2299252955
- 20
-64.3021895369
- 30
-0.0
- 40
-0.1199998892853769
-100
-AcDbArc
- 50
-112.6196870788
- 51
-247.3803129212
- 0
-ARC
- 5
-4DF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484826
- 20
-63.8222047741
- 30
-0.0
- 40
-0.3999771278546918
-100
-AcDbArc
- 50
-359.9932380985
- 51
-67.3823081943
- 0
-LINE
- 5
-4E0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.4299256077
- 20
-63.8221575698
- 30
-0.0
- 11
-149.4299256077
- 21
-42.2443224868
- 31
-0.0
- 0
-ARC
- 5
-4E1
-330
-1F
-100
-AcDbEnt
- 21
-254.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AC
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-254.4750445598
- 30
-0.0
- 11
-140.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AD
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-130.2549255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AE
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-258.4750445598
- 30
-0.0
- 11
-142.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-143.3699255838
- 21
-260.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B0
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-260.4750445598
- 30
-0.0
- 11
-141.3699255838
- 21
-258.4750.9299255838
- 22
-199.8200717467
- 32
-0.0
- 13
-171.9299255838
- 23
-199.8200717467
- 33
-0.0
- 0
-SOLID
- 5
-51F
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-210.3073934143
- 30
-0.0
- 11
-171.9299255838
- 21
-213.3073934143
- 31
-0.0
- 12
-170.9299255838
- 22
-213.3073934143
- 32
-0.0
- 13
-170.9299255838
- 23
-213.3073934143
- 33
-0.0
- 0
-LINE
- 5
-520
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-150.4168593775
- 20
-202.8200717467
- 30
-0.0
- 11
-172.4299255838
- 21
-202.8200717467
- 31
-0.0
- 0
-LINE
- 5
-521
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-172.4299255838
- 21
-210.3073934143
- 31
-0.0
- 0
-LINE
- 5
-522
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-202.8200717467
- 30
-0.0
- 11
-171.4299255838
- 21
-190.8599118622
- 31
-0.0
- 0
-LINE
- 5
-523
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-202.8200717467
- 30
-0.0
- 11
-171.4299255838
- 21
-210.3073934143
- 31
-0.0
- 0
-LINE
- 5
-524
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-210.3073934143
- 30
-0.0
- 11
-171.4299255838
- 21
-216.3073934143
- 31
-0.0
- 0
-MTEXT
- 5
-525
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-166.9181886692
- 20
-190.8599118622
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-19
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-51D
-330
-51B
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-528
-330
-527
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_3
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_3
- 1
-
- 0
-SOLID
- 5
-52A
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-126.2783621669
- 30
-0.0
- 11
-170.9299255838
- 21
-123.2783621669
- 31
-0.0
- 12
-171.9299255838
- 22
-123.2783621669
- 32
-0.0
- 13
-171.9299255838
- 23
-123.2783621669
- 33
-0.0
- 0
-SOLID
- 5
-52B
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-171.9299255838
- 21
-136.7256838344
- 31
-0.0
- 12
-170.9299255838
- 22
-136.7256838344
- 32
-0.0
- 13
-170.9299255838
- 23
-136.7256838344
- 33
-0.0
- 0
-LINE
- 5
-52C
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-150.4168593775
- 20
-126.2783621669
- 30
-0.0
- 11
-172.4299255838
- 21
-126.2783621669
- 31
-0.0
- 0
-LINE
- 5
-52D
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.0299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-172.4299255838
- 21
-133.7256838344
- 31
-0.0
- 0
-LINE
- 5
-52E
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-126.2783621669
- 30
-0.0
- 11
-171.4299255838
- 21
-109.1156238914
- 31
-0.0
- 0
-LINE
- 5
-52F
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-126.2783621669
- 30
-0.0
- 11
-171.4299255838
- 21
-133.7256838344
- 31
-0.0
- 0
-LINE
- 5
-530
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-171.4299255838
- 21
-139.7256838344
- 31
-0.0
- 0
-MTEXT
- 5
-531
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-166.9181886692
- 20
-109.1156238914
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-19
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-529
-330
-527
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-535
-330
-534
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_4
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_4
- 1
-
- 0
-SOLID
- 5
-537
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-194.9299255838
- 21
-130.7256838344
- 31
-0.0
- 12
-195.9299255838
- 22
-130.7256838344
- 32
-0.0
- 13
-195.9299255838
- 23
-130.7256838344
- 33
-0.0
- 0
-SOLID
- 5
-538
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.9299255838
- 21
-44.9821787182
- 31
-0.0
- 12
-194.9299255838
- 22
-44.9821787182
- 32
-0.0
- 13
-194.9299255838
- 23
-44.9821787182
- 33
-0.0
- 0
-LINE
- 5
-539
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.0299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-196.4299255838
- 21
-133.7256838344
- 31
-0.0
- 0
-LINE
- 5
-53A
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.0299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-196.4299255838
- 21
-41.9821787182
- 31
-0.0
- 0
-LINE
- 5
-53B
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-195.4299255838
- 21
-41.9821787182
- 31
-0.0
- 0
-ENDBLK
- 5
-536
-330
-534
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-53E
-330
-53D
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_5
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_5
- 1
-
- 0
-SOLID
- 5
-540
-330
-53D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.2555532575
- 20
-210.3467855475
- 30
-0.0
- 11
-194.7580466032
- 21
-207.3463710546
- 31
-0.0
- 12
-195.7580462578
- 22
-207.3472021123
- 32
-0.0
- 13
-195.7580462578
- 23
-207.3472021123
- 33
-0.0
- 0
-SOLID
- 5
-541
-330
-53D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.3191971725
- 20
-133.7649839595
- 30
-0.0
- 11
-195.8167038268
- 21
-136.7653984523
- 31
-0.0
- 12
-194.8167041722
- 22
-136.7645673947
- 32
-0.0
- 13
-194.8167041722
- 23
-136.7645673947
- 33
-0.0
- 0
-LINE
- 5
-542
-330
-53D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555692807
- 20
-210.3082244719
- 30
-0.0
- 11
-196.2555529122
- 21
-210.3476166051
- 31
-0.0
- 0
-LINE
- 5
-543
-330
-53D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.029925238ity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.2877619365
- 20
-42.2443402896
- 30
-0.0
- 40
-0.1421636723032661
-100
-AcDbArc
- 50
-215.0074908018
- 51
-359.9928249763
- 0
-LINE
- 5
-4E2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.1713189354
- 20
-42.1627833327
- 30
-0.0
- 11
-148.4940879812
- 21
-43.1299998244
- 31
-0.0
- 0
-ARC
- 5
-4E3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5923363035
- 20
-43.1988138586
- 30
-0.0
- 40
-0.1199504236850504
-100
-AcDbArc
- 50
-136.8044484108
- 51
-215.0077544772
- 0
-ARC
- 5
-4E4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.6299254989
- 20
-44.1021810107
- 30
-0.0
- 40
-1.200014262087228
-100
-AcDbArc
- 50
-316.8133643338
- 51
-223.1866356662
- 0
-ARC
- 5
-4E5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.667516349
- 20
-43.1988139771
- 30
-0.0
- 40
-0.1199491362526016
-100
-AcDbArc
- 50
-324.9917457236
- 51
-43.1960513885
- 0
-LINE
- 5
-4E6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.7657630166
- 20
-43.1299998244
- 30
-0.0
- 11
-146.1655196567
- 21
-42.2727419814
- 31
-0.0
- 0
-ARC
- 5
-4E7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-145.8378250788
- 20
-42.5022486061
- 30
-0.0
- 40
-0.4000712776530942
-100
-AcDbArc
- 50
-270.0048248044
- 51
-324.9938514507
- 0
-LINE
- 5
-4E8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-145.8378587683
- 20
-42.1021773299
- 30
-0.0
- 11
-143.9099256714
- 21
-42.1021773299
- 31
-0.0
- 0
-ARC
- 5
-4E9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.9098934092
- 20
-42.1821451244
- 30
-0.0
- 40
-0.0799678010352872
-100
-AcDbArc
- 50
-179.9674137886
- 51
-270.0231154488
- 0
-LINE
- 5
-4EA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.8299256211
- 20
-42.1821906051
- 30
-0.0
- 11
-143.8299256211
- 21
-42.7421881637
- 31
-0.0
- 0
-ARC
- 5
-4EB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.9099748178
- 20
-42.7421522491
- 30
-0.0
- 40
-0.080049204801129
-100
-AcDbArc
- 50
-90.0351768672
- 51
-179.9742938954
- 0
-LINE
- 5
-4EC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.9099256714
- 20
-42.8222014388
- 30
-0.0
- 11
-145.3970798125
- 21
-42.8222014388
- 31
-0.0
- 0
-ARC
- 5
-4ED
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-145.3970883777
- 20
-43.2221900281
- 30
-0.0
- 40
-0.3999885893651605
-100
-AcDbArc
- 50
-269.9987730963
- 51
-21.5094255355
- 0
-ARC
- 5
-4EE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.6299070455
- 20
-44.102180655
- 30
-0.0
- 40
-1.999982807792672
-100
-AcDbArc
- 50
-166.3277484711
- 51
-201.510375133
- 0
-ARC
- 5
-4EF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-145.4922360036
- 20
-44.6221751279
- 30
-0.0
- 40
-0.2000244053689678
-100
-AcDbArc
- 50
-346.3324477609
- 51
-89.9922055192
- 0
-LINE
- 5
-4F0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-145.4922632148
- 20
-44.8221995315
- 30
-0.0
- 11
-137.3675879856
- 21
-44.8221995315
- 31
-0.0
- 0
-ARC
- 5
-4F1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.3676151968
- 20
-44.6221751279
- 30
-0.0
- 40
-0.2000244053689526
-100
-AcDbArc
- 50
-90.0077944808
- 51
-193.6675522391
- 0
-ARC
- 5
-4F2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-135.2299441549
- 20
-44.102180655
- 30
-0.0
- 40
-1.999982807792147
-100
-AcDbArc
- 50
-338.489624867
- 51
-13.672251529
- 0
-ARC
- 5
-4F3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.4627628227
- 20
-43.2221900281
- 30
-0.0
- 40
-0.399988589365143
-100
-AcDbArc
- 50
-158.4905744645
- 51
-270.0012269037
- 0
-LINE
- 5
-4F4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 8
-370
- 0
-100
-AcDbLine
- 10
-148.8260940482
- 20
-80.1358534774
- 30
-0.0
- 11
-148.8260940482
- 21
-103.7777020415
- 31
-0.0
- 0
-LINE
- 5
-4F5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 8
-370
- 0
-100
-AcDbLine
- 10
-133.4835157563
- 20
-80.1027132949
- 30
-0.0
- 11
-133.4835157563
- 21
-103.7777020415
- 31
-0.0
- 0
-LINE
- 5
-4F6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 8
-370
- 0
-100
-AcDbLine
- 10
-148.5235550275
- 20
-81.2455489119
- 30
-0.0
- 11
-148.5235550275
- 21
-103.7777020415
- 31
-0.0
- 0
-LINE
- 5
-4F7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 8
-370
- 0
-100
-AcDbLine
- 10
-148.1099256148
- 20
-82.7892615279
- 30
-0.0
- 11
-148.1099256148
- 21
-103.7777020415
- 31
-0.0
- 0
-POINT
- 5
-4F8
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-142.0299255838
- 20
--247.6988063932
- 30
-0.0
- 0
-POINT
- 5
-4F9
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-149.4168593775
- 20
-447.9345399732
- 30
-0.0
- 0
-POINT
- 5
-4FA
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-149.4168593775
- 20
-238.1745399732
- 30
-0.0
- 0
-POINT
- 5
-4FB
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-147.8555696261
- 20
-245.6618616408
- 30
-0.0
- 0
-POINT
- 5
-4FC
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-147.8555696261
- 20
-455.4218616408
- 30
-0.0
- 0
-POINT
- 5
-4FD
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-148.0299255838
- 20
-35.8618616408
- 30
-0.0
- 0
-POINT
- 5
-4FE
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-149.4168593775
- 20
-28.4145399732
- 30
-0.0
- 0
-POINT
- 5
-4FF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-133.4299255838
- 20
-660.3011936068
- 30
-0.0
- 0
-DIMENSION
- 5
-500
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-34.5771309945
- 31
-0.0
- 70
- 160
- 1
-33
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE0
-100
-AcDbAlignedDimension
- 13
-142.0299255838
- 23
-28.7821787182
- 33
-0.0
- 14
-148.0299255838
- 24
-41.9821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-50D
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_1
- 10
-171.4299255838
- 20
-287.499722104
- 30
-0.0
- 11
-171.4299255838
- 21
-271.6850735678
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-280.0124004364
- 33
-0.0
- 14
-147.8555696261
- 24
-287.499722104
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-51A
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_2
- 10
-171.4299255838
- 20
-210.3073934143
- 30
-0.0
- 11
-171.4299255838
- 21
-194.8678981433
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-202.8200717467
- 33
-0.0
- 14
-147.8555696261
- 24
-210.3073934143
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-526
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_3
- 10
-171.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-171.4299255838
- 21
-113.1236101725
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-126.2783621669
- 33
-0.0
- 14
-148.0299255838
- 24
-133.7256838344
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-532
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_4
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-84.1586135498
- 31
-0.0
- 70
- 160
- 1
-675,902
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-148.0299255838
- 23
-133.7256838344
- 33
-0.0
- 14
-148.0299255838
- 24
-41.9821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-53C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_5
- 10
-195.3191971725
- 20
-133.7649839595
- 30
-0.0
- 11
-195.2817915125
- 21
-178.7746730971
- 31
-0.0
- 70
- 160
- 1
-524,500
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-210.3073934143
- 33
-0.0
- 14
-148.0299255838
- 24
-133.7256838344
- 34
-0.0
- 50
--89.9523838979
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-545
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_6
- 10
-195.2555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-195.2555696261
- 21
-246.0726158741
- 31
-0.0
- 70
- 160
- 1
-524,400
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-287.499722104
- 33
-0.0
- 14
-147.8555696261
- 24
-210.3073934143
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-54E
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_7
- 10
-195.2555696261
- 20
-397.2202084954
- 30
-0.0
- 11
-195.2555696261
- 21
-357.7845521004
- 31
-0.0
- 70
- 160
- 1
-545,698
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-287.499722104
- 33
-0.0
- 14
-145.8378589248
- 24
-397.2202084954
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-557
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_8
- 10
-219.4299255838
- 20
-397.2202084954
- 30
-0.0
- 11
-219.4299255838
- 21
-226.31135989
- 31
-0.0
- 70
- 160
- 1
-Kozijnmaat =
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-142.0299255838
- 23
-28.7821787182
- 33
-0.0
- 14
-145.8378589248
- 24
-397.2202084954
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-561
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_9
- 10
-99.2299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-99.2299255838
- 21
-214.5361780403
- 31
-0.0
- 70
- 160
- 1
-DMH =
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-133.4299255838
- 23
-383.8202084954
- 33
-0.0
- 14
-142.0299255838
- 24
-28.7821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-56C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_10
- 10
-117.2299255838
- 20
-148.4450158005
- 30
-0.0
- 11
-117.2299255838
- 21
-157.3719824392
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-147.8850158005
- 33
-0.0
- 14
-133.5499255838
- 24
-148.4450158005
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-578
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_11
- 10
-117.2299255838
- 20
-224.9867253803
- 30
-0.0
- 11
-117.2299255838
- 21
-236.5334651005
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-224.4267253803
- 33
-0.0
- 14
-133.5499255838
- 24
-224.9867253803
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-584
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_12
- 10
-117.2299255838
- 20
-302.17905407
- 30
-0.0
- 11
-117.2299255838
- 21
-311.8110919194
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-301.61905407
- 33
-0.0
- 14
-133.5499255838
- 24
-302.17905407
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-LINE
- 5
-590
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-103.7777066237
- 30
-0.0
- 11
-142.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-591
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-143.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-592
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-141.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-593
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-139.3699255838
- 21
-101.7777066237
- 31
-0.0
- 0
-LINE
- 5
-594
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-101.7777066237
- 30
-0.0
- 11
-140.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-595
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-130.2549255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-596
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-105.7777066237
- 30
-0.0
- 11
-142.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-597
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-143.3699255838
- 21
-107.7777066237
- 31
-0.0
- 0
-LINE
- 5
-598
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-107.7777066237
- 30
-0.0
- 11
-141.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-599
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-139.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-59A
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-140.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-59B
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-130.2549255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-59C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-179.2366515846
- 30
-0.0
- 11
-142.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-59D
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-143.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-59E
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-141.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-59F
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-139.3699255838
- 21
-177.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A0
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-177.2366515846
- 30
-0.0
- 11
-140.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A1
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-130.2549255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A2
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-181.2366515846
- 30
-0.0
- 11
-142.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A3
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-143.3699255838
- 21
-183.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A4
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-183.2366515846
- 30
-0.0
- 11
-141.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A5
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-139.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A6
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-140.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A7
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-130.2549255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A8
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-256.4750445598
- 30
-0.0
- 11
-142.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5A9
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-143.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AA
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-141.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AB
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-139.3699255838
- 21
-254.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AC
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-254.4750445598
- 30
-0.0
- 11
-140.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AD
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-130.2549255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AE
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-258.4750445598
- 30
-0.0
- 11
-142.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-143.3699255838
- 21
-260.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B0
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-260.4750445598
- 30
-0.0
- 11
-141.3699255838
- 21
-258.4750.9299255838
- 22
-199.8200717467
- 32
-0.0
- 13
-171.9299255838
- 23
-199.8200717467
- 33
-0.0
- 0
-SOLID
- 5
-51F
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-210.3073934143
- 30
-0.0
- 11
-171.9299255838
- 21
-213.3073934143
- 31
-0.0
- 12
-170.9299255838
- 22
-213.3073934143
- 32
-0.0
- 13
-170.9299255838
- 23
-213.3073934143
- 33
-0.0
- 0
-LINE
- 5
-520
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-150.4168593775
- 20
-202.8200717467
- 30
-0.0
- 11
-172.4299255838
- 21
-202.8200717467
- 31
-0.0
- 0
-LINE
- 5
-521
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-172.4299255838
- 21
-210.3073934143
- 31
-0.0
- 0
-LINE
- 5
-522
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-202.8200717467
- 30
-0.0
- 11
-171.4299255838
- 21
-190.8599118622
- 31
-0.0
- 0
-LINE
- 5
-523
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-202.8200717467
- 30
-0.0
- 11
-171.4299255838
- 21
-210.3073934143
- 31
-0.0
- 0
-LINE
- 5
-524
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-210.3073934143
- 30
-0.0
- 11
-171.4299255838
- 21
-216.3073934143
- 31
-0.0
- 0
-MTEXT
- 5
-525
-330
-51B
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-166.9181886692
- 20
-190.8599118622
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-19
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-51D
-330
-51B
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-528
-330
-527
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_3
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_3
- 1
-
- 0
-SOLID
- 5
-52A
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-126.2783621669
- 30
-0.0
- 11
-170.9299255838
- 21
-123.2783621669
- 31
-0.0
- 12
-171.9299255838
- 22
-123.2783621669
- 32
-0.0
- 13
-171.9299255838
- 23
-123.2783621669
- 33
-0.0
- 0
-SOLID
- 5
-52B
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-171.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-171.9299255838
- 21
-136.7256838344
- 31
-0.0
- 12
-170.9299255838
- 22
-136.7256838344
- 32
-0.0
- 13
-170.9299255838
- 23
-136.7256838344
- 33
-0.0
- 0
-LINE
- 5
-52C
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-150.4168593775
- 20
-126.2783621669
- 30
-0.0
- 11
-172.4299255838
- 21
-126.2783621669
- 31
-0.0
- 0
-LINE
- 5
-52D
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.0299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-172.4299255838
- 21
-133.7256838344
- 31
-0.0
- 0
-LINE
- 5
-52E
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-126.2783621669
- 30
-0.0
- 11
-171.4299255838
- 21
-109.1156238914
- 31
-0.0
- 0
-LINE
- 5
-52F
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-126.2783621669
- 30
-0.0
- 11
-171.4299255838
- 21
-133.7256838344
- 31
-0.0
- 0
-LINE
- 5
-530
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-171.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-171.4299255838
- 21
-139.7256838344
- 31
-0.0
- 0
-MTEXT
- 5
-531
-330
-527
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-166.9181886692
- 20
-109.1156238914
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-19
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-529
-330
-527
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-535
-330
-534
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_4
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_4
- 1
-
- 0
-SOLID
- 5
-537
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-194.9299255838
- 21
-130.7256838344
- 31
-0.0
- 12
-195.9299255838
- 22
-130.7256838344
- 32
-0.0
- 13
-195.9299255838
- 23
-130.7256838344
- 33
-0.0
- 0
-SOLID
- 5
-538
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.9299255838
- 21
-44.9821787182
- 31
-0.0
- 12
-194.9299255838
- 22
-44.9821787182
- 32
-0.0
- 13
-194.9299255838
- 23
-44.9821787182
- 33
-0.0
- 0
-LINE
- 5
-539
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.0299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-196.4299255838
- 21
-133.7256838344
- 31
-0.0
- 0
-LINE
- 5
-53A
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.0299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-196.4299255838
- 21
-41.9821787182
- 31
-0.0
- 0
-LINE
- 5
-53B
-330
-534
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-195.4299255838
- 21
-41.9821787182
- 31
-0.0
- 0
-ENDBLK
- 5
-536
-330
-534
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-53E
-330
-53D
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_5
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_5
- 1
-
- 0
-SOLID
- 5
-540
-330
-53D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.2555532575
- 20
-210.3467855475
- 30
-0.0
- 11
-194.7580466032
- 21
-207.3463710546
- 31
-0.0
- 12
-195.7580462578
- 22
-207.3472021123
- 32
-0.0
- 13
-195.7580462578
- 23
-207.3472021123
- 33
-0.0
- 0
-SOLID
- 5
-541
-330
-53D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.3191971725
- 20
-133.7649839595
- 30
-0.0
- 11
-195.8167038268
- 21
-136.7653984523
- 31
-0.0
- 12
-194.8167041722
- 22
-136.7645673947
- 32
-0.0
- 13
-194.8167041722
- 23
-136.7645673947
- 33
-0.0
- 0
-LINE
- 5
-542
-330
-53D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555692807
- 20
-210.3082244719
- 30
-0.0
- 11
-196.2555529122
- 21
-210.3476166051
- 31
-0.0
- 0
-LINE
- 5
-543
-330
-53D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-149.0299252385
- 20
-133.7265148921
- 30
-0.0
- 11
-196.3191968272
- 21
-133.7658150172
- 31
-0.0
- 0
-LINE
- 5
-544
-330
-53D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.2555532575
- 20
-210.3467855475
- 30
-0.0
- 11
-195.3191971725
- 21
-133.7649839595
- 31
-0.0
- 0
-ENDBLK
- 5
-53F
-330
-53D
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-547
-330
-546
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_6
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_6
- 1
-
- 0
-SOLID
- 5
-549
-330
-546
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.2555696261
- 20
-287.499722104
- 30
-0.0
- 11
-194.7555696261
- 21
-284.499722104
- 31
-0.0
- 12
-195.7555696261
- 22
-284.499722104
- 32
-0.0
- 13
-195.7555696261
- 23
-284.499722104
- 33
-0.0
- 0
-SOLID
- 5
-54A
-330
-546
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.2555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-195.7555696261
- 21
-213.3073934143
- 31
-0.0
- 12
-194.7555696261
- 22
-213.3073934143
- 32
-0.0
- 13
-194.7555696261
- 23
-213.3073934143
- 33
-0.0
- 0
-LINE
- 5
-54B
-330
-546
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-287.499722104
- 30
-0.0
- 11
-196.2555696261
- 21
-287.499722104
- 31
-0.0
- 0
-LINE
- 5
-54C
-330
-546
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-196.2555696261
- 21
-210.3073934143
- 31
-0.0
- 0
-LINE
- 5
-54D
-330
-546
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.2555696261
- 20
-287.499722104
- 30
-0.0
- 11
-195.2555696261
- 21
-210.3073934143
- 31
-0.0
- 0
-ENDBLK
- 5
-548
-330
-546
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-550
-330
-54F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_7
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_7
- 1
-
- 0
-SOLID
- 5
-552
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.2555696261
- 20
-287.499722104
- 30
-0.0
- 11
-195.7555696261
- 21
-290.499722104
- 31
-0.0
- 12
-194.7555696261
- 22
-290.499722104
- 32
-0.0
- 13
-194.7555696261
- 23
-290.499722104
- 33
-0.0
- 0
-SOLID
- 5
-553
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-195.2555696261
- 20
-397.2202084954
- 30
-0.0
- 11
-194.7555696261
- 21
-394.2202084954
- 31
-0.0
- 12
-195.7555696261
- 22
-394.2202084954
- 32
-0.0
- 13
-195.7555696261
- 23
-394.2202084954
- 33
-0.0
- 0
-LINE
- 5
-554
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-148.8555696261
- 20
-287.499722104
- 30
-0.0
- 11
-196.2555696261
- 21
-287.499722104
- 31
-0.0
- 0
-LINE
- 5
-555
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-146.8378589248
- 20
-397.2202084954
- 30
-0.0
- 11
-196.2555696261
- 21
-397.2202084954
- 31
-0.0
- 0
-LINE
- 5
-556
-330
-54F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-195.2555696261
- 20
-287.499722104
- 30
-0.0
- 11
-195.2555696261
- 21
-397.2202084954
- 31
-0.0
- 0
-ENDBLK
- 5
-551
-330
-54F
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-559
-330
-558
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_8
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_8
- 1
-
- 0
-SOLID
- 5
-55B
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-219.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-219.9299255838
- 21
-31.7821787182
- 31
-0.0
- 12
-218.9299255838
- 22
-31.7821787182
- 32
-0.0
- 13
-218.9299255838
- 23
-31.7821787182
- 33
-0.0
- 0
-SOLID
- 5
-55C
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-219.4299255838
- 20
-397.2202084954
- 30
-0.0
- 11
-218.9299255838
- 21
-394.2202084954
- 31
-0.0
- 12
-219.9299255838
- 22
-394.2202084954
- 32
-0.0
- 13
-219.9299255838
- 23
-394.2202084954
- 33
-0.0
- 0
-LINE
- 5
-55D
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-143.0299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-220.4299255838
- 21
-28.7821787182
- 31
-0.0
- 0
-LINE
- 5
-55E
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-146.8378589248
- 20
-397.2202084954
- 30
-0.0
- 11
-220.4299255838
- 21
-397.2202084954
- 31
-0.0
- 0
-LINE
- 5
-55F
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-219.4299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-219.4299255838
- 21
-397.2202084954
- 31
-0.0
- 0
-MTEXT
- 5
-560
-330
-558
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-214.9181886692
- 20
-211.8228183688
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-Kozijnmaat =
- 7
-SLDTEXTSTYLE0
- 11
-6.123233995736766E-17
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-55A
-330
-558
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-563
-330
-562
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_9
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_9
- 1
-
- 0
-SOLID
- 5
-565
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-99.2299255838
- 20
-383.8202084954
- 30
-0.0
- 11
-98.7299255838
- 21
-380.8202084954
- 31
-0.0
- 12
-99.7299255838
- 22
-380.8202084954
- 32
-0.0
- 13
-99.7299255838
- 23
-380.8202084954
- 33
-0.0
- 0
-SOLID
- 5
-566
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-99.2299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-99.7299255838
- 21
-31.7821787182
- 31
-0.0
- 12
-98.7299255838
- 22
-31.7821787182
- 32
-0.0
- 13
-98.7299255838
- 23
-31.7821787182
- 33
-0.0
- 0
-LINE
- 5
-567
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.4299255838
- 20
-383.8202084954
- 30
-0.0
- 11
-98.2299255838
- 21
-383.8202084954
- 31
-0.0
- 0
-LINE
- 5
-568
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-141.0299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-98.2299255838
- 21
-28.7821787182
- 31
-0.0
- 0
-LINE
- 5
-569
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-99.2299255838
- 20
-383.8202084954
- 30
-0.0
- 11
-99.2299255838
- 21
-28.7821787182
- 31
-0.0
- 0
-MTEXT
- 5
-56B
-330
-562
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-94.7181886692
- 20
-207.001456174
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-DMH =
- 7
-SLDTEXTSTYLE1
- 11
--7.044195017643634E-15
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-564
-330
-562
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-56E
-330
-56D
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_10
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_10
- 1
-
- 0
-SOLID
- 5
-570
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-147.8850158005
- 30
-0.0
- 11
-116.7299255838
- 21
-144.8850158005
- 31
-0.0
- 12
-117.7299255838
- 22
-144.8850158005
- 32
-0.0
- 13
-117.7299255838
- 23
-144.8850158005
- 33
-0.0
- 0
-SOLID
- 5
-571
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-148.4450158005
- 30
-0.0
- 11
-117.7299255838
- 21
-151.4450158005
- 31
-0.0
- 12
-116.7299255838
- 22
-151.4450158005
- 32
-0.0
- 13
-116.7299255838
- 23
-151.4450158005
- 33
-0.0
- 0
-LINE
- 5
-572
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-147.8850158005
- 30
-0.0
- 11
-116.2299255838
- 21
-147.8850158005
- 31
-0.0
- 0
-LINE
- 5
-573
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-148.4450158005
- 30
-0.0
- 11
-116.2299255838
- 21
-148.4450158005
- 31
-0.0
- 0
-LINE
- 5
-574
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-147.8850158005
- 30
-0.0
- 11
-117.2299255838
- 21
-141.8850158005
- 31
-0.0
- 0
-LINE
- 5
-575
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-147.8850158005
- 30
-0.0
- 11
-117.2299255838
- 21
-148.4450158005
- 31
-0.0
- 0
-LINE
- 5
-576
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-148.4450158005
- 30
-0.0
- 11
-117.2299255838
- 21
-160.0869130071
- 31
-0.0
- 0
-MTEXT
- 5
-577
-330
-56D
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-112.7181886692
- 20
-154.6570518713
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-1
- 7
-SLDTEXTSTYLE0
- 11
--7.044195017643634E-15
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-56F
-330
-56D
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-57A
-330
-579
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_11
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_11
- 1
-
- 0
-SOLID
- 5
-57C
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-224.4267253803
- 30
-0.0
- 11
-116.7299255838
- 21
-221.4267253803
- 31
-0.0
- 12
-117.7299255838
- 22
-221.4267253803
- 32
-0.0
- 13
-117.7299255838
- 23
-221.4267253803
- 33
-0.0
- 0
-SOLID
- 5
-57D
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-224.9867253803
- 30
-0.0
- 11
-117.7299255838
- 21
-227.9867253803
- 31
-0.0
- 12
-116.7299255838
- 22
-227.9867253803
- 32
-0.0
- 13
-116.7299255838
- 23
-227.9867253803
- 33
-0.0
- 0
-LINE
- 5
-57E
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-224.4267253803
- 30
-0.0
- 11
-116.2299255838
- 21
-224.4267253803
- 31
-0.0
- 0
-LINE
- 5
-57F
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-224.9867253803
- 30
-0.0
- 11
-116.2299255838
- 21
-224.9867253803
- 31
-0.0
- 0
-LINE
- 5
-580
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-224.4267253803
- 30
-0.0
- 11
-117.2299255838
- 21
-218.4267253803
- 31
-0.0
- 0
-LINE
- 5
-581
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-224.4267253803
- 30
-0.0
- 11
-117.2299255838
- 21
-224.9867253803
- 31
-0.0
- 0
-LINE
- 5
-582
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-224.9867253803
- 30
-0.0
- 11
-117.2299255838
- 21
-239.2483956684
- 31
-0.0
- 0
-MTEXT
- 5
-583
-330
-579
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-112.7181886692
- 20
-233.8185345326
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-1
- 7
-SLDTEXTSTYLE0
- 11
--7.044195017643634E-15
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-57B
-330
-579
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-BLOCK
- 5
-586
-330
-585
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockBegin
- 2
-_D_12
- 70
- 0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 3
-_D_12
- 1
-
- 0
-SOLID
- 5
-588
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-301.61905407
- 30
-0.0
- 11
-116.7299255838
- 21
-298.61905407
- 31
-0.0
- 12
-117.7299255838
- 22
-298.61905407
- 32
-0.0
- 13
-117.7299255838
- 23
-298.61905407
- 33
-0.0
- 0
-SOLID
- 5
-589
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbTrace
- 10
-117.2299255838
- 20
-302.17905407
- 30
-0.0
- 11
-117.7299255838
- 21
-305.17905407
- 31
-0.0
- 12
-116.7299255838
- 22
-305.17905407
- 32
-0.0
- 13
-116.7299255838
- 23
-305.17905407
- 33
-0.0
- 0
-LINE
- 5
-58A
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-301.61905407
- 30
-0.0
- 11
-116.2299255838
- 21
-301.61905407
- 31
-0.0
- 0
-LINE
- 5
-58B
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-132.5499255838
- 20
-302.17905407
- 30
-0.0
- 11
-116.2299255838
- 21
-302.17905407
- 31
-0.0
- 0
-LINE
- 5
-58C
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-301.61905407
- 30
-0.0
- 11
-117.2299255838
- 21
-295.61905407
- 31
-0.0
- 0
-LINE
- 5
-58D
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-301.61905407
- 30
-0.0
- 11
-117.2299255838
- 21
-302.17905407
- 31
-0.0
- 0
-LINE
- 5
-58E
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-117.2299255838
- 20
-302.17905407
- 30
-0.0
- 11
-117.2299255838
- 21
-314.5260224873
- 31
-0.0
- 0
-MTEXT
- 5
-58F
-330
-585
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-112.7181886692
- 20
-309.0961613515
- 30
-0.04
- 40
-3.5
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-1
- 7
-SLDTEXTSTYLE0
- 11
--7.044195017643634E-15
- 21
-1.0
- 31
-0.0
- 73
- 1
- 44
-1.0
- 0
-ENDBLK
- 5
-587
-330
-585
-100
-AcDbEntity
- 8
-0
-100
-AcDbBlockEnd
- 0
-ENDSEC
- 0
-SECTION
- 2
-ENTITIES
- 0
-LINE
- 5
-4B
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbLine
- 10
-123.9140543182
- 20
-383.8493547742
- 30
-0.0
- 11
-160.598524565
- 21
-383.8493547742
- 31
-0.0
- 0
-LINE
- 5
-4C
-330
-1F
-100
-AcDbEntity
- 8
-STUKLIJST
-100
-AcDbLine
- 10
-10.3087825773
- 20
-9.2198227322
- 30
-0.0
- 11
-10.3087825773
- 21
-409.2698227322
- 31
-0.0
- 0
-LINE
- 5
-4D
-330
-1F
-100
-AcDbEntity
- 8
-STUKLIJST
-100
-AcDbLine
- 10
-10.3087825773
- 20
-9.2198227322
- 30
-0.0
- 11
-287.198438446
- 21
-9.2198227322
- 31
-0.0
- 0
-LINE
- 5
-4E
-330
-1F
-100
-AcDbEntity
- 8
-STUKLIJST
-100
-AcDbLine
- 10
-287.198438446
- 20
-409.2698227322
- 30
-0.0
- 11
-287.198438446
- 21
-9.2198227322
- 31
-0.0
- 0
-LINE
- 5
-4F
-330
-1F
-100
-AcDbEntity
- 8
-STUKLIJST
-100
-AcDbLine
- 10
-287.198438446
- 20
-409.2698227322
- 30
-0.0
- 11
-10.3087825773
- 21
-409.2698227322
- 31
-0.0
- 0
-LINE
- 5
-50
-330
-1F
-100
-AcDbEntity
- 8
-MAATLIJN
-100
-AcDbLine
- 10
-4.3087825773
- 20
-3.2198227322
- 30
-0.0
- 11
-4.3087825773
- 21
-415.2698227322
- 31
-0.0
- 0
-LINE
- 5
-51
-330
-1F
-100
-AcDbEntity
- 8
-MAATLIJN
-100
-AcDbLine
- 10
-4.3087825773
- 20
-415.2698227322
- 30
-0.0
- 11
-293.4090035115
- 21
-415.2698227322
- 31
-0.0
- 0
-LINE
- 5
-52
-330
-1F
-100
-AcDbEntity
- 8
-MAATLIJN
-100
-AcDbLine
- 10
-293.4090035115
- 20
-415.2698227322
- 30
-0.0
- 11
-293.4090035115
- 21
-3.2198227322
- 31
-0.0
- 0
-LINE
- 5
-53
-330
-1F
-100
-AcDbEntity
- 8
-MAATLIJN
-100
-AcDbLine
- 10
-293.4090035115
- 20
-3.2198227322
- 30
-0.0
- 11
-4.3087825773
- 21
-3.2198227322
- 31
-0.0
- 0
-MTEXT
- 5
-55
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbMText
- 10
-211.9617900851
- 20
-18.9651870984
- 30
-0.0
- 40
-4.2333333333
- 41
-0.0
- 71
- 1
- 72
- 1
- 1
-Alum. deurblad - 4 secties
- 7
-SLDTEXTSTYLE0
- 73
- 1
- 44
-1.0
- 0
-INSERT
- 5
-59
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-100
-AcDbBlockReference
- 2
-SW_BROKEN_VIEW_0
- 10
-0.0
- 20
-0.0
- 30
-0.0
- 0
-LINE
- 5
-5A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.9420049658
- 20
-336.7369001461
- 30
-0.0
- 11
-148.9420049658
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.1445668807
- 20
-336.7369001461
- 30
-0.0
- 11
-149.1445668807
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.0406432023
- 20
-336.7369001461
- 30
-0.0
- 11
-149.0406432023
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.0406432023
- 20
-359.2202013088
- 30
-0.0
- 11
-148.9420049658
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.9137577285
- 20
-336.7369001461
- 30
-0.0
- 11
-133.9137577285
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-5F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.797846066
- 20
-336.7369001461
- 30
-0.0
- 11
-133.797846066
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-60
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.6992078294
- 20
-336.7369001461
- 30
-0.0
- 11
-133.6992078294
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-61
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.797846066
- 20
-359.2202013088
- 30
-0.0
- 11
-133.6992078294
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-62
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.5952848961
- 20
-336.7369001461
- 30
-0.0
- 11
-133.5952848961
- 21
-359.2202013088
- 31
-0.0
- 0
-ARC
- 5
-63
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.1879324767
- 20
-359.1402151319
- 30
-0.0
- 40
-0.0799861772139263
-100
-AcDbArc
- 50
-31.2190407028
- 51
-90.0049728915
- 0
-LINE
- 5
-64
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2563360204
- 20
-336.7369001461
- 30
-0.0
- 11
-149.2563360204
- 21
-359.1816728664
- 31
-0.0
- 0
-LINE
- 5
-65
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2162960043
- 20
-336.7369001461
- 30
-0.0
- 11
-134.2162960043
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-66
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2162960043
- 20
-359.2202013088
- 30
-0.0
- 11
-134.1499254873
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-67
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-133.4299252202
- 20
-336.7369001461
- 30
-0.0
- 11
-133.4299252202
- 21
-359.1907804561
- 31
-0.0
- 0
-ARC
- 5
-68
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-127.793914781
- 20
-346.5773729462
- 30
-0.0
- 40
-24.8898367051569
-100
-AcDbArc
- 50
-30.3127339119
- 51
-30.4217624082
- 0
-LINE
- 5
-69
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.3099258115
- 20
-336.7369001461
- 30
-0.0
- 11
-149.3099258115
- 21
-359.1109102321
- 31
-0.0
- 0
-LINE
- 5
-6A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2563360204
- 20
-359.1816728664
- 30
-0.0
- 11
-149.2569536736
- 21
-359.1806238247
- 31
-0.0
- 0
-LINE
- 5
-6B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2299253514
- 20
-336.7369001461
- 30
-0.0
- 11
-134.2299253514
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-6C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.2299253514
- 20
-359.2202013088
- 30
-0.0
- 11
-134.2162960043
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-6D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.5099256804
- 20
-336.7369001461
- 30
-0.0
- 11
-148.5099256804
- 21
-358.0259626461
- 31
-0.0
- 0
-LINE
- 5
-6E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.6299254169
- 20
-336.7369001461
- 30
-0.0
- 11
-134.6299254169
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-6F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-134.6299254169
- 20
-359.2202013088
- 30
-0.0
- 11
-134.2299253514
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-70
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.0299256762
- 20
-359.2202013088
- 30
-0.0
- 11
-143.0299256762
- 21
-353.6202257229
- 31
-0.0
- 0
-LINE
- 5
-71
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.0299256762
- 20
-353.6202257229
- 30
-0.0
- 11
-147.3280240615
- 21
-353.6202257229
- 31
-0.0
- 0
-LINE
- 5
-72
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-147.3280240615
- 20
-353.6202257229
- 30
-0.0
- 11
-147.5545917471
- 21
-354.4657533718
- 31
-0.0
- 0
-LINE
- 5
-73
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-141.5499255826
- 20
-359.2202013088
- 30
-0.0
- 11
-141.3099255843
- 21
-359.2202013088
- 31
-0.0
- 0
-LINE
- 5
-74
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-138.9099255969
- 20
-359.2202013088
- 30
-0.0
- 11
-134.6299254169
- 21
-359.2202013088
- 31
-0.0
- 0
-ARC
- 5
-75
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.1595398236
- 20
-361.9409267861
- 30
-0.0
- 40
-0.3992677940247622
-100
-AcDbArc
- 50
-89.9681903289
- 51
-114.7477262168
- 0
-LINE
- 5
-76
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-137.1597614904
- 20
-362.3401945186
- 30
-0.0
- 11
-139.7899255922
- 21
-362.3401945186
- 31
-0.0
- 0
-ARC
- 5
-77
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-139.7899227961
- 20
-361.9401917488
- 30
-0.0
- 40
-0.4000027697985571
-100
-AcDbArc
- 50
-0.0045494665
- 51
-89.9995994903
- 0
-LINE
- 5
-78
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-140.1899255646
- 20
-361.9402235103
- 30
-0.0
- 11
-140.1899255646
- 21
-360.4202097011
- 31
-0.0
- 0
-ARC
- 5
-79
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-140.5899283325
- 20
-360.4201937773
- 30
-0.0
- 40
-0.4000027681863966
-100
-AcDbArc
- 50
-179.9977190938
- 51
-269.999606256
- 0
-LINE
- 5
-7A
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-140.5899255836
- 20
-360.0201910091
- 30
-0.0
- 11
-142.2699255703
- 21
-360.0201910091
- 31
-0.0
- 0
-ARC
- 5
-7B
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-142.2699229338
- 20
-360.4201936183
- 30
-0.0
- 40
-0.4000026092087915
-100
-AcDbArc
- 50
-270.0003776416
- 51
-0.0023036787
- 0
-LINE
- 5
-7C
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-142.6699255427
- 20
-360.4202097011
- 30
-0.0
- 11
-142.6699255427
- 21
-361.9402235103
- 31
-0.0
- 0
-ARC
- 5
-7D
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.0699283112
- 20
-361.9401917488
- 30
-0.0
- 40
-0.4000027697974622
-100
-AcDbArc
- 50
-90.0003871694
- 51
-179.9954505335
- 0
-LINE
- 5
-7E
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.0699256082
- 20
-362.3401945186
- 30
-0.0
- 11
-148.5899255445
- 21
-362.3401945186
- 31
-0.0
- 0
-ARC
- 5
-7F
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5899336175
- 20
-362.4601862448
- 30
-0.0
- 40
-0.1199917263967713
-100
-AcDbArc
- 50
-269.9961451292
- 51
-0.0134590356
- 0
-LINE
- 5
-80
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-362.4602144314
- 30
-0.0
- 11
-148.7099253406
- 21
-366.669732864
- 31
-0.0
- 0
-ARC
- 5
-81
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5098175737
- 20
-366.669705415
- 30
-0.0
- 40
-0.2001077687858761
-100
-AcDbArc
- 50
-0.0078593224
- 51
-46.1736252111
- 0
-ARC
- 5
-82
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.229892261
- 20
-367.4202030254
- 30
-0.0
- 40
-0.8399663770856335
-100
-AcDbArc
- 50
-133.8120979057
- 51
-226.1879020943
- 0
-ARC
- 5
-83
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5098175737
- 20
-368.1707006358
- 30
-0.0
- 40
-0.200107768785933
-100
-AcDbArc
- 50
-313.8263747889
- 51
-359.9921406775
- 0
-LINE
- 5
-84
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.7099253406
- 20
-368.1706731868
- 30
-0.0
- 11
-148.7099253406
- 21
-370.3305070949
- 31
-0.0
- 0
-ARC
- 5
-85
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5900202217
- 20
-370.3305234822
- 30
-0.0
- 40
-0.1199051200450481
-100
-AcDbArc
- 50
-359.9921694514
- 51
-45.0183972297
- 0
-LINE
- 5
-86
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.6747787168
- 20
-370.4153364254
- 30
-0.0
- 11
-148.5050731172
- 21
-370.58504277
- 31
-0.0
- 0
-ARC
- 5
-87
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5900489089
- 20
-370.6699467703
- 30
-0.0
- 40
-0.1201231635795685
-100
-AcDbArc
- 50
-180.0128717119
- 51
-224.9757867508
- 0
-LINE
- 5
-88
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-148.4699257483
- 20
-370.669919ontinuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484826
- 20
-72.3821479784
- 30
-0.0
- 40
-0.399977127854635
-100
-AcDbArc
- 50
-292.6176918057
- 51
-0.0067619015
- 0
-ARC
- 5
-4D2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.2299252955
- 20
-71.9021632155
- 30
-0.0
- 40
-0.1199998892853113
-100
-AcDbArc
- 50
-112.6196870788
- 51
-247.3803129212
- 0
-ARC
- 5
-4D3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484881
- 20
-71.4221784593
- 30
-0.0
- 40
-0.3999771195634846
-100
-AcDbArc
- 50
-0.0000677203
- 51
-67.382308554
- 0
-LINE
- 5
-4D4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.4299256077
- 20
-71.4221789321
- 30
-0.0
- 11
-149.4299256077
- 21
-68.8558890304
- 31
-0.0
- 0
-ARC
- 5
-4D5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.3098934248
- 20
-68.8558875882
- 30
-0.0
- 40
-0.1200321828299822
-100
-AcDbArc
- 50
-284.0483029705
- 51
-0.0006883757
- 0
-LINE
- 5
-4D6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.3390300145
- 20
-68.7394453963
- 30
-0.0
- 11
-149.2808216085
- 21
-68.724901863
- 31
-0.0
- 0
-ARC
- 5
-4D7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.3099570381
- 20
-68.6084597995
- 30
-0.0
- 40
-0.1200317766406951
-100
-AcDbArc
- 50
-104.0477806555
- 51
-179.9779884139
- 0
-LINE
- 5
-4D8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.1899252703
- 20
-68.6085059127
- 30
-0.0
- 11
-149.1899252703
- 21
-67.5958945235
- 31
-0.0
- 0
-ARC
- 5
-4D9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.309957026
- 20
-67.5958929344
- 30
-0.0
- 40
-0.1200317557485991
-100
-AcDbArc
- 50
-179.999241474
- 51
-255.952222776
- 0
-LINE
- 5
-4DA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.2808216085
- 20
-67.4794508895
- 30
-0.0
- 11
-149.3390300145
- 21
-67.4649073562
- 31
-0.0
- 0
-ARC
- 5
-4DB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.3098934248
- 20
-67.3484651642
- 30
-0.0
- 40
-0.1200321828298969
-100
-AcDbArc
- 50
-359.9993116244
- 51
-75.9516970296
- 0
-LINE
- 5
-4DC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.4299256077
- 20
-67.3484637221
- 30
-0.0
- 11
-149.4299256077
- 21
-64.7821738204
- 31
-0.0
- 0
-ARC
- 5
-4DD
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484881
- 20
-64.7821742931
- 30
-0.0
- 40
-0.3999771195634605
-100
-AcDbArc
- 50
-292.617691446
- 51
-359.9999322797
- 0
-ARC
- 5
-4DE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.2299252955
- 20
-64.3021895369
- 30
-0.0
- 40
-0.1199998892853769
-100
-AcDbArc
- 50
-112.6196870788
- 51
-247.3803129212
- 0
-ARC
- 5
-4DF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.0299484826
- 20
-63.8222047741
- 30
-0.0
- 40
-0.3999771278546918
-100
-AcDbArc
- 50
-359.9932380985
- 51
-67.3823081943
- 0
-LINE
- 5
-4E0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.4299256077
- 20
-63.8221575698
- 30
-0.0
- 11
-149.4299256077
- 21
-42.2443224868
- 31
-0.0
- 0
-ARC
- 5
-4E1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-149.2877619365
- 20
-42.2443402896
- 30
-0.0
- 40
-0.1421636723032661
-100
-AcDbArc
- 50
-215.0074908018
- 51
-359.9928249763
- 0
-LINE
- 5
-4E2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-149.1713189354
- 20
-42.1627833327
- 30
-0.0
- 11
-148.4940879812
- 21
-43.1299998244
- 31
-0.0
- 0
-ARC
- 5
-4E3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-148.5923363035
- 20
-43.1988138586
- 30
-0.0
- 40
-0.1199504236850504
-100
-AcDbArc
- 50
-136.8044484108
- 51
-215.0077544772
- 0
-ARC
- 5
-4E4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.6299254989
- 20
-44.1021810107
- 30
-0.0
- 40
-1.200014262087228
-100
-AcDbArc
- 50
-316.8133643338
- 51
-223.1866356662
- 0
-ARC
- 5
-4E5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-146.667516349
- 20
-43.1988139771
- 30
-0.0
- 40
-0.1199491362526016
-100
-AcDbArc
- 50
-324.9917457236
- 51
-43.1960513885
- 0
-LINE
- 5
-4E6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-146.7657630166
- 20
-43.1299998244
- 30
-0.0
- 11
-146.1655196567
- 21
-42.2727419814
- 31
-0.0
- 0
-ARC
- 5
-4E7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-145.8378250788
- 20
-42.5022486061
- 30
-0.0
- 40
-0.4000712776530942
-100
-AcDbArc
- 50
-270.0048248044
- 51
-324.9938514507
- 0
-LINE
- 5
-4E8
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-145.8378587683
- 20
-42.1021773299
- 30
-0.0
- 11
-143.9099256714
- 21
-42.1021773299
- 31
-0.0
- 0
-ARC
- 5
-4E9
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.9098934092
- 20
-42.1821451244
- 30
-0.0
- 40
-0.0799678010352872
-100
-AcDbArc
- 50
-179.9674137886
- 51
-270.0231154488
- 0
-LINE
- 5
-4EA
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.8299256211
- 20
-42.1821906051
- 30
-0.0
- 11
-143.8299256211
- 21
-42.7421881637
- 31
-0.0
- 0
-ARC
- 5
-4EB
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-143.9099748178
- 20
-42.7421522491
- 30
-0.0
- 40
-0.080049204801129
-100
-AcDbArc
- 50
-90.0351768672
- 51
-179.9742938954
- 0
-LINE
- 5
-4EC
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-143.9099256714
- 20
-42.8222014388
- 30
-0.0
- 11
-145.3970798125
- 21
-42.8222014388
- 31
-0.0
- 0
-ARC
- 5
-4ED
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-145.3970883777
- 20
-43.2221900281
- 30
-0.0
- 40
-0.3999885893651605
-100
-AcDbArc
- 50
-269.9987730963
- 51
-21.5094255355
- 0
-ARC
- 5
-4EE
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-147.6299070455
- 20
-44.102180655
- 30
-0.0
- 40
-1.999982807792672
-100
-AcDbArc
- 50
-166.3277484711
- 51
-201.510375133
- 0
-ARC
- 5
-4EF
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-145.4922360036
- 20
-44.6221751279
- 30
-0.0
- 40
-0.2000244053689678
-100
-AcDbArc
- 50
-346.3324477609
- 51
-89.9922055192
- 0
-LINE
- 5
-4F0
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbLine
- 10
-145.4922632148
- 20
-44.8221995315
- 30
-0.0
- 11
-137.3675879856
- 21
-44.8221995315
- 31
-0.0
- 0
-ARC
- 5
-4F1
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.3676151968
- 20
-44.6221751279
- 30
-0.0
- 40
-0.2000244053689526
-100
-AcDbArc
- 50
-90.0077944808
- 51
-193.6675522391
- 0
-ARC
- 5
-4F2
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-135.2299441549
- 20
-44.102180655
- 30
-0.0
- 40
-1.999982807792147
-100
-AcDbArc
- 50
-338.489624867
- 51
-13.672251529
- 0
-ARC
- 5
-4F3
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 7
-370
- 0
-100
-AcDbCircle
- 10
-137.4627628227
- 20
-43.2221900281
- 30
-0.0
- 40
-0.399988589365143
-100
-AcDbArc
- 50
-158.4905744645
- 51
-270.0012269037
- 0
-LINE
- 5
-4F4
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 8
-370
- 0
-100
-AcDbLine
- 10
-148.8260940482
- 20
-80.1358534774
- 30
-0.0
- 11
-148.8260940482
- 21
-103.7777020415
- 31
-0.0
- 0
-LINE
- 5
-4F5
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 8
-370
- 0
-100
-AcDbLine
- 10
-133.4835157563
- 20
-80.1027132949
- 30
-0.0
- 11
-133.4835157563
- 21
-103.7777020415
- 31
-0.0
- 0
-LINE
- 5
-4F6
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 8
-370
- 0
-100
-AcDbLine
- 10
-148.5235550275
- 20
-81.2455489119
- 30
-0.0
- 11
-148.5235550275
- 21
-103.7777020415
- 31
-0.0
- 0
-LINE
- 5
-4F7
-330
-1F
-100
-AcDbEntity
- 8
-0
- 6
-Continuous
- 62
- 8
-370
- 0
-100
-AcDbLine
- 10
-148.1099256148
- 20
-82.7892615279
- 30
-0.0
- 11
-148.1099256148
- 21
-103.7777020415
- 31
-0.0
- 0
-POINT
- 5
-4F8
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-142.0299255838
- 20
--247.6988063932
- 30
-0.0
- 0
-POINT
- 5
-4F9
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-149.4168593775
- 20
-447.9345399732
- 30
-0.0
- 0
-POINT
- 5
-4FA
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-149.4168593775
- 20
-238.1745399732
- 30
-0.0
- 0
-POINT
- 5
-4FB
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-147.8555696261
- 20
-245.6618616408
- 30
-0.0
- 0
-POINT
- 5
-4FC
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-147.8555696261
- 20
-455.4218616408
- 30
-0.0
- 0
-POINT
- 5
-4FD
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-148.0299255838
- 20
-35.8618616408
- 30
-0.0
- 0
-POINT
- 5
-4FE
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-149.4168593775
- 20
-28.4145399732
- 30
-0.0
- 0
-POINT
- 5
-4FF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbPoint
- 10
-133.4299255838
- 20
-660.3011936068
- 30
-0.0
- 0
-DIMENSION
- 5
-500
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-34.5771309945
- 31
-0.0
- 70
- 160
- 1
-33
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE0
-100
-AcDbAlignedDimension
- 13
-142.0299255838
- 23
-28.7821787182
- 33
-0.0
- 14
-148.0299255838
- 24
-41.9821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-50D
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_1
- 10
-171.4299255838
- 20
-287.499722104
- 30
-0.0
- 11
-171.4299255838
- 21
-271.6850735678
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-280.0124004364
- 33
-0.0
- 14
-147.8555696261
- 24
-287.499722104
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-51A
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_2
- 10
-171.4299255838
- 20
-210.3073934143
- 30
-0.0
- 11
-171.4299255838
- 21
-194.8678981433
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-202.8200717467
- 33
-0.0
- 14
-147.8555696261
- 24
-210.3073934143
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-526
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_3
- 10
-171.4299255838
- 20
-133.7256838344
- 30
-0.0
- 11
-171.4299255838
- 21
-113.1236101725
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-149.4168593775
- 23
-126.2783621669
- 33
-0.0
- 14
-148.0299255838
- 24
-133.7256838344
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-532
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_4
- 10
-195.4299255838
- 20
-41.9821787182
- 30
-0.0
- 11
-195.4299255838
- 21
-84.1586135498
- 31
-0.0
- 70
- 160
- 1
-675,902
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-148.0299255838
- 23
-133.7256838344
- 33
-0.0
- 14
-148.0299255838
- 24
-41.9821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-53C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_5
- 10
-195.3191971725
- 20
-133.7649839595
- 30
-0.0
- 11
-195.2817915125
- 21
-178.7746730971
- 31
-0.0
- 70
- 160
- 1
-524,500
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-210.3073934143
- 33
-0.0
- 14
-148.0299255838
- 24
-133.7256838344
- 34
-0.0
- 50
--89.9523838979
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-545
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_6
- 10
-195.2555696261
- 20
-210.3073934143
- 30
-0.0
- 11
-195.2555696261
- 21
-246.0726158741
- 31
-0.0
- 70
- 160
- 1
-524,400
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-287.499722104
- 33
-0.0
- 14
-147.8555696261
- 24
-210.3073934143
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-54E
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_7
- 10
-195.2555696261
- 20
-397.2202084954
- 30
-0.0
- 11
-195.2555696261
- 21
-357.7845521004
- 31
-0.0
- 70
- 160
- 1
-545,698
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-147.8555696261
- 23
-287.499722104
- 33
-0.0
- 14
-145.8378589248
- 24
-397.2202084954
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-557
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_8
- 10
-219.4299255838
- 20
-397.2202084954
- 30
-0.0
- 11
-219.4299255838
- 21
-226.31135989
- 31
-0.0
- 70
- 160
- 1
-Kozijnmaat =
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-142.0299255838
- 23
-28.7821787182
- 33
-0.0
- 14
-145.8378589248
- 24
-397.2202084954
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-561
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_9
- 10
-99.2299255838
- 20
-28.7821787182
- 30
-0.0
- 11
-99.2299255838
- 21
-214.5361780403
- 31
-0.0
- 70
- 160
- 1
-DMH =
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE2
-100
-AcDbAlignedDimension
- 13
-133.4299255838
- 23
-383.8202084954
- 33
-0.0
- 14
-142.0299255838
- 24
-28.7821787182
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-56C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_10
- 10
-117.2299255838
- 20
-148.4450158005
- 30
-0.0
- 11
-117.2299255838
- 21
-157.3719824392
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-147.8850158005
- 33
-0.0
- 14
-133.5499255838
- 24
-148.4450158005
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-578
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_11
- 10
-117.2299255838
- 20
-224.9867253803
- 30
-0.0
- 11
-117.2299255838
- 21
-236.5334651005
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-224.4267253803
- 33
-0.0
- 14
-133.5499255838
- 24
-224.9867253803
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-DIMENSION
- 5
-584
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
-100
-AcDbDimension
- 2
-_D_12
- 10
-117.2299255838
- 20
-302.17905407
- 30
-0.0
- 11
-117.2299255838
- 21
-311.8110919194
- 31
-0.0
- 70
- 160
- 1
-<>
- 71
- 2
- 42
--1.0
- 3
-SLDDIMSTYLE1
-100
-AcDbAlignedDimension
- 13
-133.5499255838
- 23
-301.61905407
- 33
-0.0
- 14
-133.5499255838
- 24
-302.17905407
- 34
-0.0
- 50
-90.0
-100
-AcDbRotatedDimension
- 0
-LINE
- 5
-590
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-103.7777066237
- 30
-0.0
- 11
-142.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-591
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-143.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-592
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-141.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-593
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-139.3699255838
- 21
-101.7777066237
- 31
-0.0
- 0
-LINE
- 5
-594
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-101.7777066237
- 30
-0.0
- 11
-140.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-595
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-130.2549255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-596
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-105.7777066237
- 30
-0.0
- 11
-142.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-597
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-143.3699255838
- 21
-107.7777066237
- 31
-0.0
- 0
-LINE
- 5
-598
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-107.7777066237
- 30
-0.0
- 11
-141.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-599
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-139.3699255838
- 21
-103.7777066237
- 31
-0.0
- 0
-LINE
- 5
-59A
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-103.7777066237
- 30
-0.0
- 11
-140.3699255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-59B
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-105.7777066237
- 30
-0.0
- 11
-130.2549255838
- 21
-105.7777066237
- 31
-0.0
- 0
-LINE
- 5
-59C
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-179.2366515846
- 30
-0.0
- 11
-142.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-59D
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-143.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-59E
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-141.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-59F
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-139.3699255838
- 21
-177.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A0
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-177.2366515846
- 30
-0.0
- 11
-140.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A1
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-130.2549255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A2
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-181.2366515846
- 30
-0.0
- 11
-142.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A3
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-143.3699255838
- 21
-183.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A4
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-183.2366515846
- 30
-0.0
- 11
-141.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A5
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-139.3699255838
- 21
-179.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A6
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-179.2366515846
- 30
-0.0
- 11
-140.3699255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A7
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-181.2366515846
- 30
-0.0
- 11
-130.2549255838
- 21
-181.2366515846
- 31
-0.0
- 0
-LINE
- 5
-5A8
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-256.4750445598
- 30
-0.0
- 11
-142.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5A9
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-143.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AA
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-141.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AB
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-139.3699255838
- 21
-254.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AC
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-254.4750445598
- 30
-0.0
- 11
-140.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AD
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-130.2549255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AE
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-258.4750445598
- 30
-0.0
- 11
-142.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5AF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-143.3699255838
- 21
-260.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B0
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-260.4750445598
- 30
-0.0
- 11
-141.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B1
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-139.3699255838
- 21
-256.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B2
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-256.4750445598
- 30
-0.0
- 11
-140.3699255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B3
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-258.4750445598
- 30
-0.0
- 11
-130.2549255838
- 21
-258.4750445598
- 31
-0.0
- 0
-LINE
- 5
-5B4
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-334.7369117996
- 30
-0.0
- 11
-142.3699255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B5
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-334.7369117996
- 30
-0.0
- 11
-143.3699255838
- 21
-336.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B6
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-336.7369117996
- 30
-0.0
- 11
-141.3699255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B7
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-334.7369117996
- 30
-0.0
- 11
-139.3699255838
- 21
-332.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B8
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-332.7369117996
- 30
-0.0
- 11
-140.3699255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5B9
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-334.7369117996
- 30
-0.0
- 11
-130.2549255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BA
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-152.4849255838
- 20
-336.7369117996
- 30
-0.0
- 11
-142.3699255838
- 21
-336.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BB
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-142.3699255838
- 20
-336.7369117996
- 30
-0.0
- 11
-143.3699255838
- 21
-338.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BC
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-143.3699255838
- 20
-338.7369117996
- 30
-0.0
- 11
-141.3699255838
- 21
-336.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BD
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-141.3699255838
- 20
-336.7369117996
- 30
-0.0
- 11
-139.3699255838
- 21
-334.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BE
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-139.3699255838
- 20
-334.7369117996
- 30
-0.0
- 11
-140.3699255838
- 21
-336.7369117996
- 31
-0.0
- 0
-LINE
- 5
-5BF
-330
-1F
-100
-AcDbEntity
- 8
-HARTLIJN
- 62
- 7
-100
-AcDbLine
- 10
-140.3699255838
- 20
-336.7369117996
- 30
-0.0
- 11
-130.2549255838
- 21
-336.7369117996
- 31
-0.0
- 0
-ENDSEC
- 0
-SECTION
- 2
-OBJECTS
- 0
-DICTIONARY
- 5
-C
-330
-0
-100
-AcDbDictionary
-281
- 1
- 3
-ACAD_GROUP
-350
-D
- 3
-ACAD_LAYOUT
-350
-1A
- 3
-ACAD_MLINESTYLE
-350
-17
- 3
-ACAD_PLOTSETTINGS
-350
-19
- 3
-ACAD_PLOTSTYLENAME
-350
-E
- 0
-DICTIONARY
- 5
-D
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 0
-DICTIONARY
- 5
-1A
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 3
-Layout1
-350
-1E
- 3
-Layout2
-350
-26
- 3
-Model
-350
-22
- 0
-DICTIONARY
- 5
-17
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 3
-Standard
-350
-18
- 0
-DICTIONARY
- 5
-19
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 0
-ACDBDICTIONARYWDFLT
- 5
-E
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-330
-C
-100
-AcDbDictionary
-281
- 1
- 3
-Normal
-350
-F
-100
-AcDbDictionaryWithDefault
-340
-F
- 0
-LAYOUT
- 5
-1E
-102
-{ACAD_REACTORS
-330
-1A
-102
-}
-330
-1A
-100
-AcDbPlotSettings
- 1
-
- 2
-none_device
- 4
-
- 6
-
- 40
-0.0
- 41
-0.0
- 42
-0.0
- 43
-0.0
- 44
-0.0
- 45
-0.0
- 46
-0.0
- 47
-0.0
- 48
-0.0
- 49
-0.0
-140
-0.0
-141
-0.0
-142
-1.0
-143
-1.0
- 70
- 688
- 72
- 0
- 73
- 0
- 74
- 5
- 7
-
- 75
- 16
-147
-1.0
-148
-0.0
-149
-0.0
-100
-AcDbLayout
- 1
-Layout1
- 70
- 1
- 71
- 1
- 10
-0.0
- 20
-0.0
- 11
-420.0
- 21
-297.0
- 12
-0.0
- 22
-0.0
- 32
-0.0
- 14
-1.0000000000E+20
- 24
-1.0000000000E+20
- 34
-1.0000000000E+20
- 15
--1.0000000000E+20
- 25
--1.0000000000E+20
- 35
--1.0000000000E+20
-146
-0.0
- 13
-0.0
- 23
-0.0
- 33
-0.0
- 16
-1.0
- 26
-0.0
- 36
-0.0
- 17
-0.0
- 27
-1.0
- 37
-0.0
- 76
- 0
-330
-1B
- 0
-LAYOUT
- 5
-26
-102
-{ACAD_REACTORS
-330
-1A
-102
-}
-330
-1A
-100
-AcDbPlotSettings
- 1
-
- 2
-none_device
- 4
-
- 6
-
- 40
-0.0
- 41
-0.0
- 42
-0.0
- 43
-0.0
- 44
-0.0
- 45
-0.0
- 46
-0.0
- 47
-0.0
- 48
-0.0
- 49
-0.0
-140
-0.0
-141
-0.0
-142
-1.0
-143
-1.0
- 70
- 688
- 72
- 0
- 73
- 0
- 74
- 5
- 7
-
- 75
- 16
-147
-1.0
-148
-0.0
-149
-0.0
-100
-AcDbLayout
- 1
-Layout2
- 70
- 1
- 71
- 2
- 10
-0.0
- 20
-0.0
- 11
-0.0
- 21
-0.0
- 12
-0.0
- 22
-0.0
- 32
-0.0
- 14
-0.0
- 24
-0.0
- 34
-0.0
- 15
-0.0
- 25
-0.0
- 35
-0.0
-146
-0.0
- 13
-0.0
- 23
-0.0
- 33
-0.0
- 16
-1.0
- 26
-0.0
- 36
-0.0
- 17
-0.0
- 27
-1.0
- 37
-0.0
- 76
- 0
-330
-23
- 0
-LAYOUT
- 5
-22
-102
-{ACAD_REACTORS
-330
-1A
-102
-}
-330
-1A
-100
-AcDbPlotSettings
- 1
-
- 2
-none_device
- 4
-
- 6
-
- 40
-0.0
- 41
-0.0
- 42
-0.0
- 43
-0.0
- 44
-0.0
- 45
-0.0
- 46
-0.0
- 47
-0.0
- 48
-0.0
- 49
-0.0
-140
-0.0
-141
-0.0
-142
-1.0
-143
-1.0
- 70
- 1712
- 72
- 0
- 73
- 0
- 74
- 0
- 7
-
- 75
- 0
-147
-1.0
-148
-0.0
-149
-0.0
-100
-AcDbLayout
- 1
-Model
- 70
- 1
- 71
- 0
- 10
-0.0
- 20
-0.0
- 11
-297.0
- 21
-420.0
- 12
-0.0
- 22
-0.0
- 32
-0.0
- 14
-0.0
- 24
-0.0
- 34
-0.0
- 15
-297.0
- 25
-420.0
- 35
-0.0
-146
-0.0
- 13
-0.0
- 23
-0.0
- 33
-0.0
- 16
-1.0
- 26
-0.0
- 36
-0.0
- 17
-0.0
- 27
-1.0
- 37
-0.0
- 76
- 0
-330
-1F
-331
-29
- 0
-MLINESTYLE
- 5
-18
-102
-{ACAD_REACTORS
-330
-17
-102
-}
-330
-17
-100
-AcDbMlineStyle
- 2
-Standard
- 70
- 0
- 3
-
- 62
- 256
- 51
-90.0
- 52
-90.0
- 71
- 2
- 49
-0.5
- 62
- 256
- 6
-BYLAYER
- 49
--0.5
- 62
- 256
- 6
-BYLAYER
- 0
-ACDBPLACEHOLDER
- 5
-F
-102
-{ACAD_REACTORS
-330
-E
-102
-}
-330
-E
- 0
-ENDSEC
- 0
-EOF
diff --git a/filter/qa/cppunit/data/dxf/pass/pyramid.dxf b/filter/qa/cppunit/data/dxf/pass/pyramid.dxf
deleted file mode 100644
index 65cd5f838c50..000000000000
--- a/filter/qa/cppunit/data/dxf/pass/pyramid.dxf
+++ /dev/null
@@ -1,25008 +0,0 @@
-0
-SECTION
-2
-HEADER
-9
-$ACADVER
-1
-AC1014
-9
-$ACADMAINTVER
-70
-8
-9
-$DWGCODEPAGE
-3
-ANSI_1252
-9
-$INSBASE
-10
-0.0
-20
-0.0
-30
-0.0
-9
-$EXTMIN
-10
-1.000000E+20
-20
-1.000000E+20
-30
-1.000000E+20
-9
-$EXTMAX
-10
--1.000000E+20
-20
--1.000000E+20
-30
--1.000000E+20
-9
-$LIMMIN
-10
-0.0
-20
-0.0
-9
-$LIMMAX
-10
-12.0
-20
-9.0
-9
-$ORTHOMODE
-70
-0
-9
-$REGENMODE
-70
-1
-9
-$FILLMODE
-70
-1
-9
-$QTEXTMODE
-70
-0
-9
-$MIRRTEXT
-70
-1
-9
-$DRAGMODE
-70
-2
-9
-$LTSCALE
-40
-1.0
-9
-$OSMODE
-70
-0
-9
-$ATTMODE
-70
-1
-9
-$TEXTSIZE
-40
-0.2
-9
-$TRACEWID
-40
-0.05
-9
-$TEXTSTYLE
-7
-STANDARD
-9
-$CLAYER
-8
-0
-9
-$CELTYPE
-6
-BYLAYER
-9
-$CECOLOR
-62
-256
-9
-$CELTSCALE
-40
-1.0
-9
-$DELOBJ
-70
-1
-9
-$DISPSILH
-70
-0
-9
-$DIMSCALE
-40
-1.0
-9
-$DIMASZ
-40
-0.18
-9
-$DIMEXO
-40
-0.0625
-9
-$DIMDLI
-40
-0.38
-9
-$DIMRND
-40
-0.0
-9
-$DIMDLE
-40
-0.0
-9
-$DIMEXE
-40
-0.18
-9
-$DIMTP
-40
-0.0
-9
-$DIMTM
-40
-0.0
-9
-$DIMTXT
-40
-0.18
-9
-$DIMCEN
-40
-0.09
-9
-$DIMTSZ
-40
-0.0
-9
-$DIMTOL
-70
-0
-9
-$DIMLIM
-70
-0
-9
-$DIMTIH
-70
-1
-9
-$DIMTOH
-70
-1
-9
-$DIMSE1
-70
-0
-9
-$DIMSE2
-70
-0
-9
-$DIMTAD
-70
-0
-9
-$DIMZIN
-70
-0
-9
-$DIMBLK
-1
-
-9
-$DIMASO
-70
-1
-9
-$DIMSHO
-70
-1
-9
-$DIMPOST
-1
-
-9
-$DIMAPOST
-1
-
-9
-$DIMALT
-70
-0
-9
-$DIMALTD
-70
-2
-9
-$DIMALTF
-40
-25.4
-9
-$DIMLFAC
-40
-1.0
-9
-$DIMTOFL
-70
-0
-9
-$DIMTVP
-40
-0.0
-9
-$DIMTIX
-70
-0
-9
-$DIMSOXD
-70
-0
-9
-$DIMSAH
-70
-0
-9
-$DIMBLK1
-1
-
-9
-$DIMBLK2
-1
-
-9
-$DIMSTYLE
-2
-STANDARD
-9
-$DIMCLRD
-70
-0
-9
-$DIMCLRE
-70
-0
-9
-$DIMCLRT
-70
-0
-9
-$DIMTFAC
-40
-1.0
-9
-$DIMGAP
-40
-0.09
-9
-$DIMJUST
-70
-0
-9
-$DIMSD1
-70
-0
-9
-$DIMSD2
-70
-0
-9
-$DIMTOLJ
-70
-1
-9
-$DIMTZIN
-70
-0
-9
-$DIMALTZ
-70
-0
-9
-$DIMALTTZ
-70
-0
-9
-$DIMFIT
-70
-3
-9
-$DIMUPT
-70
-0
-9
-$DIMUNIT
-70
-2
-9
-$DIMDEC
-70
-4
-9
-$DIMTDEC
-70
-4
-9
-$DIMALTU
-70
-2
-9
-$DIMALTTD
-70
-2
-9
-$DIMTXSTY
-7
-STANDARD
-9
-$DIMAUNIT
-70
-0
-9
-$LUNITS
-70
-2
-9
-$LUPREC
-70
-4
-9
-$SKETCHINC
-40
-0.1
-9
-$FILLETRAD
-40
-0.5
-9
-$AUNITS
-70
-0
-9
-$AUPREC
-70
-0
-9
-$MENU
-1
-.
-9
-$ELEVATION
-40
-0.0
-9
-$PELEVATION
-40
-0.0
-9
-$THICKNESS
-40
-0.0
-9
-$LIMCHECK
-70
-0
-9
-$BLIPMODE
-70
-0
-9
-$CHAMFERA
-40
-0.5
-9
-$CHAMFERB
-40
-0.5
-9
-$CHAMFERC
-40
-1.0
-9
-$CHAMFERD
-40
-0.0
-9
-$SKPOLY
-70
-1
-9
-$TDCREATE
-40
-2451008.519973958
-9
-$TDUPDATE
-40
-2451008.523538426
-9
-$TDINDWG
-40
-0.0024055556
-9
-$TDUSRTIMER
-40
-0.0024055556
-9
-$USRTIMER
-70
-1
-9
-$ANGBASE
-50
-0.0
-9
-$ANGDIR
-70
-0
-9
-$PDMODE
-70
-0
-9
-$PDSIZE
-40
-0.0
-9
-$PLINEWID
-40
-0.0
-9
-$COORDS
-70
-1
-9
-$SPLFRAME
-70
-0
-9
-$SPLINETYPE
-70
-6
-9
-$SPLINESEGS
-70
-8
-9
-$ATTDIA
-70
-0
-9
-$ATTREQ
-70
-1
-9
-$HANDLING
-70
-1
-9
-$HANDSEED
-5
-5B
-9
-$SURFTAB1
-70
-6
-9
-$SURFTAB2
-70
-6
-9
-$SURFTYPE
-70
-6
-9
-$SURFU
-70
-6
-9
-$SURFV
-70
-6
-9
-$UCSNAME
-2
-
-9
-$UCSORG
-10
-0.0
-20
-0.0
-30
-0.0
-9
-$UCSXDIR
-10
-1.0
-20
-0.0
-30
-0.0
-9
-$UCSYDIR
-10
-0.0
-20
-1.0
-30
-0.0
-9
-$PUCSNAME
-2
-
-9
-$PUCSORG
-10
-0.0
-20
-0.0
-30
-0.0
-9
-$PUCSXDIR
-10
-1.0
-20
-0.0
-30
-0.0
-9
-$PUCSYDIR
-10
-0.0
-20
-1.0
-30
-0.0
-9
-$USERI1
-70
-0
-9
-$USERI2
-70
-0
-9
-$USERI3
-70
-0
-9
-$USERI4
-70
-0
-9
-$USERI5
-70
-0
-9
-$USERR1
-40
-0.0
-9
-$USERR2
-40
-0.0
-9
-$USERR3
-40
-0.0
-9
-$USERR4
-40
-0.0
-9
-$USERR5
-40
-0.0
-9
-$WORLDVIEW
-70
-1
-9
-$SHADEDGE
-70
-3
-9
-$SHADEDIF
-70
-70
-9
-$TILEMODE
-70
-1
-9
-$MAXACTVP
-70
-48
-9
-$PINSBASE
-10
-0.0
-20
-0.0
-30
-0.0
-9
-$PLIMCHECK
-70
-0
-9
-$PEXTMIN
-10
-1.000000E+20
-20
-1.000000E+20
-30
-1.000000E+20
-9
-$PEXTMAX
-10
--1.000000E+20
-20
--1.000000E+20
-30
--1.000000E+20
-9
-$PLIMMIN
-10
-0.0
-20
-0.0
-9
-$PLIMMAX
-10
-12.0
-20
-9.0
-9
-$UNITMODE
-70
-0
-9
-$VISRETAIN
-70
-1
-9
-$PLINEGEN
-70
-0
-9
-$PSLTSCALE
-70
-1
-9
-$TREEDEPTH
-70
-3020
-9
-$PICKSTYLE
-70
-1
-9
-$CMLSTYLE
-2
-STANDARD
-9
-$CMLJUST
-70
-0
-9
-$CMLSCALE
-40
-1.0
-9
-$PROXYGRAPHICS
-70
-1
-9
-$MEASUREMENT
-70
-0
-0
-ENDSEC
-0
-SECTION
-2
-CLASSES
-0
-ENDSEC
-0
-SECTION
-2
-TABLES
-0
-TABLE
-2
-VPORT
-5
-8
-100
-AcDbSymbolTable
-70
-3
-0
-VPORT
-5
-5A
-100
-AcDbSymbolTableRecord
-100
-AcDbViewportTableRecord
-2
-*ACTIVE
-70
-0
-10
-0.0
-20
-0.0
-11
-1.0
-21
-1.0
-12
-7.623626
-22
-4.5
-13
-0.0
-23
-0.0
-14
-0.5
-24
-0.5
-15
-0.5
-25
-0.5
-16
-0.0
-26
-0.0
-36
-1.0
-17
-0.0
-27
-0.0
-37
-0.0
-40
-9.0
-41
-1.694139
-42
-50.0
-43
-0.0
-44
-0.0
-50
-0.0
-51
-0.0
-71
-0
-72
-100
-73
-1
-74
-1
-75
-0
-76
-0
-77
-0
-78
-0
-0
-ENDTAB
-0
-TABLE
-2
-LTYPE
-5
-5
-100
-AcDbSymbolTable
-70
-1
-0
-LTYPE
-5
-13
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
-2
-BYBLOCK
-70
-0
-3
-
-72
-65
-73
-0
-40
-0.0
-0
-LTYPE
-5
-14
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
-2
-BYLAYER
-70
-0
-3
-
-72
-65
-73
-0
-40
-0.0
-0
-LTYPE
-5
-15
-100
-AcDbSymbolTableRecord
-100
-AcDbLinetypeTableRecord
-2
-CONTINUOUS
-70
-0
-3
-Solid line
-72
-65
-73
-0
-40
-0.0
-0
-ENDTAB
-0
-TABLE
-2
-LAYER
-5
-2
-100
-AcDbSymbolTable
-70
-10
-0
-LAYER
-5
-F
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-0
-70
-0
-62
-7
-6
-CONTINUOUS
-0
-LAYER
-5
-4C
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-FRAMES
-70
-0
-62
-2
-6
-CONTINUOUS
-0
-LAYER
-5
-4D
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-JOINTS
-70
-0
-62
-2
-6
-CONTINUOUS
-0
-LAYER
-5
-4E
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-SHELLS
-70
-0
-62
-1
-6
-CONTINUOUS
-0
-LAYER
-5
-4F
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-GRIDS
-70
-0
-62
-8
-6
-CONTINUOUS
-0
-LAYER
-5
-50
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-PLANES
-70
-0
-62
-5
-6
-CONTINUOUS
-0
-LAYER
-5
-51
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-ASOLIDS
-70
-0
-62
-6
-6
-CONTINUOUS
-0
-LAYER
-5
-52
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-SOLIDS
-70
-0
-62
-7
-6
-CONTINUOUS
-0
-LAYER
-5
-53
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-TEXT
-70
-0
-62
-94
-6
-CONTINUOUS
-0
-LAYER
-5
-58
-100
-AcDbSymbolTableRecord
-100
-AcDbLayerTableRecord
-2
-NLLINKS
-70
-0
-62
-3
-6
-CONTINUOUS
-0
-ENDTAB
-0
-TABLE
-2
-STYLE
-5
-3
-100
-AcDbSymbolTable
-70
-1
-0
-STYLE
-5
-10
-100
-AcDbSymbolTableRecord
-100
-AcDbTextStyleTableRecord
-2
-STANDARD
-70
-0
-40
-0.0
-41
-1.0
-50
-0.0
-71
-0
-42
-0.2
-3
-txt
-4
-
-0
-ENDTAB
-0
-TABLE
-2
-VIEW
-5
-6
-100
-AcDbSymbolTable
-70
-0
-0
-ENDTAB
-0
-TABLE
-2
-UCS
-5
-7
-100
-AcDbSymbolTable
-70
-0
-0
-ENDTAB
-0
-TABLE
-2
-APPID
-5
-9
-100
-AcDbSymbolTable
-70
-1
-0
-APPID
-5
-11
-100
-AcDbSymbolTableRecord
-100
-AcDbRegAppTableRecord
-2
-ACAD
-70
-0
-0
-ENDTAB
-0
-TABLE
-2
-DIMSTYLE
-5
-A
-100
-AcDbSymbolTable
-70
-1
-0
-DIMSTYLE
-105
-1D
-100
-AcDbSymbolTableRecord
-100
-AcDbDimStyleTableRecord
-2
-STANDARD
-70
-0
-3
-
-4
-
-5
-
-6
-
-7
-
-40
-1.0
-41
-0.18
-42
-0.0625
-43
-0.38
-44
-0.18
-45
-0.0
-46
-0.0
-47
-0.0
-48
-0.0
-140
-0.18
-141
-0.09
-142
-0.0
-143
-25.4
-144
-1.0
-145
-0.0
-146
-1.0
-147
-0.09
-71
-0
-72
-0
-73
-1
-74
-1
-75
-0
-76
-0
-77
-0
-78
-0
-170
-0
-171
-2
-172
-0
-173
-0
-174
-0
-175
-0
-176
-0
-177
-0
-178
-0
-270
-2
-271
-4
-272
-4
-273
-2
-274
-2
-340
-10
-275
-0
-280
-0
-281
-0
-282
-0
-283
-1
-284
-0
-285
-0
-286
-0
-287
-3
-288
-0
-0
-ENDTAB
-0
-TABLE
-2
-BLOCK_RECORD
-5
-1
-100
-AcDbSymbolTable
-70
-0
-0
-BLOCK_RECORD
-5
-19
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
-2
-*MODEL_SPACE
-0
-BLOCK_RECORD
-5
-16
-100
-AcDbSymbolTableRecord
-100
-AcDbBlockTableRecord
-2
-*PAPER_SPACE
-0
-ENDTAB
-0
-ENDSEC
-0
-SECTION
-2
-BLOCKS
-0
-BLOCK
-5
-1A
-100
-AcDbEntity
-8
-0
-100
-AcDbBlockBegin
-2
-*MODEL_SPACE
-70
-0
-10
-0.0
-20
-0.0
-30
-0.0
-3
-*MODEL_SPACE
-1
-
-0
-ENDBLK
-5
-1B
-100
-AcDbEntity
-8
-0
-100
-AcDbBlockEnd
-0
-BLOCK
-5
-17
-100
-AcDbEntity
-67
-1
-8
-0
-100
-AcDbBlockBegin
-2
-*PAPER_SPACE
-70
-0
-10
-0.0
-20
-0.0
-30
-0.0
-3
-*PAPER_SPACE
-1
-
-0
-ENDBLK
-5
-18
-100
-AcDbEntity
-67
-1
-8
-0
-100
-AcDbBlockEnd
-0
-ENDSEC
-0
-SECTION
-2
-ENTITIES
-0
-POLYLINE
-5
-B1
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B2
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B3
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B4
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B5
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B6
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B7
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B8
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B9
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B10
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B11
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B12
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B13
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B14
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B15
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B16
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B17
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B18
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B19
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--684
-30
-240
-70
-64
-0
-SEQEND
-5
-B20
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B21
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B22
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B23
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B24
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B25
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B26
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B27
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B28
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B29
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B30
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B31
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B32
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B33
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B34
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B35
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B36
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B37
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B38
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B39
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--648
-30
-480
-70
-64
-0
-SEQEND
-5
-B40
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B41
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B42
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B43
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B44
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B45
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B46
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B47
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B48
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B49
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B50
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B51
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B52
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B53
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B54
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B55
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B56
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B57
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B58
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B59
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--612
-30
-720
-70
-64
-0
-SEQEND
-5
-B60
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B61
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B62
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--576
-30
-960
-70
-64
-0
-VERTEX
-5
-B63
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B64
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B65
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--576
-30
-960
-70
-64
-0
-VERTEX
-5
-B66
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B67
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B68
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B69
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B70
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B71
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B72
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B73
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B74
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B75
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B76
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--576
-30
-960
-70
-64
-0
-VERTEX
-5
-B77
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B78
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B79
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--576
-30
-960
-70
-64
-0
-SEQEND
-5
-B80
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B81
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B82
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B83
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B84
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B85
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B86
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B87
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B88
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B89
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B90
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B91
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B92
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B93
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B94
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B95
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B96
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B97
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B98
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B99
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--432
-30
-240
-70
-64
-0
-SEQEND
-5
-B100
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B101
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B102
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B103
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B104
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B105
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B106
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B107
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B108
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B109
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B110
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B111
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B112
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B113
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B114
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B115
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B116
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B117
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B118
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B119
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--432
-30
-480
-70
-64
-0
-SEQEND
-5
-B120
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B121
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B122
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B123
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B124
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B125
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B126
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B127
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B128
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B129
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B130
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B131
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B132
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B133
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B134
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B135
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B136
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B137
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B138
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B139
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--432
-30
-720
-70
-64
-0
-SEQEND
-5
-B140
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B141
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B142
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B143
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B144
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B145
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B146
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B147
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B148
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B149
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B150
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B151
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B152
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B153
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B154
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B155
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B156
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B157
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B158
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B159
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--432
-30
-960
-70
-64
-0
-SEQEND
-5
-B160
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B161
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B162
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B163
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B164
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B165
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B166
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B167
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B168
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B169
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B170
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B171
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B172
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B173
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B174
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B175
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B176
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B177
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B178
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B179
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--180
-30
-240
-70
-64
-0
-SEQEND
-5
-B180
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B181
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B182
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B183
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B184
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B185
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B186
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B187
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B188
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B189
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B190
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B191
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B192
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B193
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B194
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B195
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B196
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B197
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B198
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B199
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--216
-30
-480
-70
-64
-0
-SEQEND
-5
-B200
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B201
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B202
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B203
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B204
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B205
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B206
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B207
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B208
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B209
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B210
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B211
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B212
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B213
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B214
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B215
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B216
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B217
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B218
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B219
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--252
-30
-720
-70
-64
-0
-SEQEND
-5
-B220
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B221
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B222
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B223
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B224
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B225
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B226
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B227
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B228
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B229
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B230
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B231
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B232
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B233
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B234
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B235
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B236
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B237
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B238
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B239
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--288
-30
-960
-70
-64
-0
-SEQEND
-5
-B240
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B241
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B242
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B243
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B244
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B245
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B246
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B247
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B248
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B249
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B250
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B251
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B252
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B253
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B254
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B255
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B256
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B257
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B258
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B259
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-72
-30
-240
-70
-64
-0
-SEQEND
-5
-B260
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B261
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B262
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B263
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B264
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B265
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B266
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B267
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B268
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B269
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B270
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B271
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B272
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B273
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B274
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B275
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B276
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B277
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B278
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B279
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-0
-30
-480
-70
-64
-0
-SEQEND
-5
-B280
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B281
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B282
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B283
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B284
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B285
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B286
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B287
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B288
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B289
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B290
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B291
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B292
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B293
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B294
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B295
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B296
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B297
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B298
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B299
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--72
-30
-720
-70
-64
-0
-SEQEND
-5
-B300
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B301
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B302
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B303
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B304
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B305
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B306
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B307
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B308
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B309
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B310
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B311
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B312
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B313
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B314
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B315
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B316
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B317
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B318
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B319
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
--144
-30
-960
-70
-64
-0
-SEQEND
-5
-B320
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B321
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B322
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B323
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B324
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B325
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B326
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B327
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B328
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B329
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
-720
-30
-0
-70
-64
-0
-VERTEX
-5
-B330
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--480
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B331
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B332
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-720
-30
-0
-70
-64
-0
-VERTEX
-5
-B333
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B334
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B335
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B336
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B337
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B338
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B339
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-324
-30
-240
-70
-64
-0
-SEQEND
-5
-B340
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B341
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B342
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B343
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B344
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B345
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B346
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B347
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B348
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B349
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B350
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--444
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B351
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B352
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B353
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B354
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B355
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B356
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B357
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B358
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B359
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-216
-30
-480
-70
-64
-0
-SEQEND
-5
-B360
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B361
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B362
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B363
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B364
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B365
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B366
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B367
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B368
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B369
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B370
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--408
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B371
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B372
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B373
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B374
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B375
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B376
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B377
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B378
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B379
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-108
-30
-720
-70
-64
-0
-SEQEND
-5
-B380
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B381
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B382
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B383
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B384
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B385
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B386
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B387
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B388
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B389
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B390
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--372
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B391
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B392
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B393
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B394
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B395
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B396
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B397
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B398
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B399
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--336
-20
-0
-30
-960
-70
-64
-0
-SEQEND
-5
-B400
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B401
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B402
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B403
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B404
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B405
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B406
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B407
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B408
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B409
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B410
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B411
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B412
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B413
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B414
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B415
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B416
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B417
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B418
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B419
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-SEQEND
-5
-B420
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B421
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B422
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B423
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B424
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B425
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B426
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B427
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B428
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B429
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B430
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B431
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B432
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B433
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B434
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B435
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B436
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B437
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B438
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B439
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-SEQEND
-5
-B440
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B441
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B442
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B443
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B444
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B445
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B446
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B447
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B448
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B449
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B450
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B451
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B452
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B453
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B454
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B455
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B456
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B457
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B458
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B459
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-SEQEND
-5
-B460
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B461
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B462
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--576
-30
-960
-70
-64
-0
-VERTEX
-5
-B463
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B464
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B465
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--576
-30
-960
-70
-64
-0
-VERTEX
-5
-B466
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B467
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B468
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B469
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B470
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B471
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B472
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B473
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B474
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B475
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B476
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--576
-30
-960
-70
-64
-0
-VERTEX
-5
-B477
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B478
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B479
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--576
-30
-960
-70
-64
-0
-SEQEND
-5
-B480
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B481
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B482
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B483
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B484
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B485
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B486
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B487
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B488
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B489
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B490
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B491
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B492
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B493
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B494
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B495
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B496
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B497
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B498
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B499
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-SEQEND
-5
-B500
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B501
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B502
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B503
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B504
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B505
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B506
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B507
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B508
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B509
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B510
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B511
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B512
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B513
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B514
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B515
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B516
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B517
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B518
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B519
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-SEQEND
-5
-B520
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B521
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B522
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B523
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B524
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B525
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B526
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B527
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B528
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B529
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B530
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B531
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B532
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B533
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B534
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B535
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B536
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B537
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B538
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B539
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-SEQEND
-5
-B540
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B541
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B542
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B543
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B544
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B545
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B546
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B547
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B548
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B549
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B550
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B551
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B552
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B553
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B554
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B555
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B556
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B557
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B558
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B559
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--432
-30
-960
-70
-64
-0
-SEQEND
-5
-B560
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B561
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B562
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B563
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B564
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B565
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B566
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B567
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B568
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B569
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B570
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B571
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B572
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B573
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B574
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B575
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B576
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B577
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B578
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B579
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-SEQEND
-5
-B580
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B581
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B582
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B583
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B584
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B585
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B586
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B587
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B588
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B589
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B590
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B591
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B592
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B593
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B594
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B595
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B596
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B597
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B598
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B599
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-SEQEND
-5
-B600
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B601
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B602
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B603
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B604
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B605
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B606
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B607
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B608
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B609
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B610
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B611
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B612
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B613
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B614
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B615
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B616
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B617
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B618
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B619
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-SEQEND
-5
-B620
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B621
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B622
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B623
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B624
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B625
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B626
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B627
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B628
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B629
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B630
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B631
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B632
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B633
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B634
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B635
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B636
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B637
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B638
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B639
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--288
-30
-960
-70
-64
-0
-SEQEND
-5
-B640
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B641
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B642
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B643
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B644
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B645
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B646
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B647
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B648
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B649
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B650
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B651
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B652
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B653
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B654
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B655
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B656
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B657
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B658
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B659
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-SEQEND
-5
-B660
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B661
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B662
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B663
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B664
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B665
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B666
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B667
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B668
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B669
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B670
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B671
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B672
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B673
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B674
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B675
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B676
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B677
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B678
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B679
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-SEQEND
-5
-B680
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B681
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B682
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B683
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B684
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B685
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B686
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B687
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B688
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B689
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B690
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B691
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B692
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B693
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B694
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B695
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B696
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B697
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B698
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B699
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-SEQEND
-5
-B700
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B701
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B702
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B703
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B704
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B705
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B706
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B707
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B708
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B709
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B710
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B711
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B712
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B713
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B714
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B715
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B716
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B717
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B718
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B719
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
--144
-30
-960
-70
-64
-0
-SEQEND
-5
-B720
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B721
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B722
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B723
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B724
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B725
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B726
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B727
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B728
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B729
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-720
-30
-0
-70
-64
-0
-VERTEX
-5
-B730
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B731
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B732
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-720
-30
-0
-70
-64
-0
-VERTEX
-5
-B733
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B734
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B735
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B736
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B737
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B738
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B739
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-SEQEND
-5
-B740
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B741
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B742
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B743
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B744
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B745
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B746
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B747
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B748
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B749
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B750
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--144
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B751
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B752
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B753
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B754
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B755
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B756
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B757
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B758
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B759
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-SEQEND
-5
-B760
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B761
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B762
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B763
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B764
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B765
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B766
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B767
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B768
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B769
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B770
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--128
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B771
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B772
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B773
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B774
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B775
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B776
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B777
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B778
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B779
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-SEQEND
-5
-B780
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B781
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B782
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B783
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B784
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B785
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B786
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B787
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B788
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B789
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B790
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--112
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B791
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B792
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B793
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B794
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B795
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B796
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B797
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B798
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B799
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
--96
-20
-0
-30
-960
-70
-64
-0
-SEQEND
-5
-B800
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B801
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B802
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B803
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B804
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B805
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B806
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B807
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B808
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B809
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B810
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B811
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B812
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B813
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--720
-30
-0
-70
-64
-0
-VERTEX
-5
-B814
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B815
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B816
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B817
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B818
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B819
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-SEQEND
-5
-B820
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B821
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B822
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B823
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B824
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B825
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B826
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B827
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B828
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B829
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B830
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B831
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B832
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B833
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--684
-30
-240
-70
-64
-0
-VERTEX
-5
-B834
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B835
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B836
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B837
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B838
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B839
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-SEQEND
-5
-B840
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B841
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B842
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B843
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B844
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B845
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B846
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B847
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B848
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B849
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B850
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B851
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B852
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B853
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--648
-30
-480
-70
-64
-0
-VERTEX
-5
-B854
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B855
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B856
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B857
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B858
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B859
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-SEQEND
-5
-B860
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B861
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B862
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--576
-30
-960
-70
-64
-0
-VERTEX
-5
-B863
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B864
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B865
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--576
-30
-960
-70
-64
-0
-VERTEX
-5
-B866
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B867
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B868
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B869
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B870
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B871
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B872
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B873
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--612
-30
-720
-70
-64
-0
-VERTEX
-5
-B874
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B875
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B876
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--576
-30
-960
-70
-64
-0
-VERTEX
-5
-B877
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B878
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B879
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--576
-30
-960
-70
-64
-0
-SEQEND
-5
-B880
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B881
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B882
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B883
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B884
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B885
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B886
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B887
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B888
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B889
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B890
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B891
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B892
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B893
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--432
-30
-0
-70
-64
-0
-VERTEX
-5
-B894
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B895
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B896
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B897
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B898
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B899
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-SEQEND
-5
-B900
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B901
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B902
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B903
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B904
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B905
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B906
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B907
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B908
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B909
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B910
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B911
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B912
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B913
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--432
-30
-240
-70
-64
-0
-VERTEX
-5
-B914
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B915
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B916
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B917
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B918
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B919
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-SEQEND
-5
-B920
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B921
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B922
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B923
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B924
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B925
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B926
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B927
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B928
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B929
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B930
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B931
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B932
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B933
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--432
-30
-480
-70
-64
-0
-VERTEX
-5
-B934
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B935
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B936
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B937
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B938
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B939
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-SEQEND
-5
-B940
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B941
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B942
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B943
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B944
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B945
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B946
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B947
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B948
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B949
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B950
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B951
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B952
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B953
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--432
-30
-720
-70
-64
-0
-VERTEX
-5
-B954
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B955
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B956
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--432
-30
-960
-70
-64
-0
-VERTEX
-5
-B957
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B958
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B959
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--432
-30
-960
-70
-64
-0
-SEQEND
-5
-B960
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B961
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B962
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B963
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B964
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B965
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B966
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B967
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B968
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B969
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B970
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B971
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B972
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B973
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
--144
-30
-0
-70
-64
-0
-VERTEX
-5
-B974
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B975
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B976
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B977
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B978
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B979
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-SEQEND
-5
-B980
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B981
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B982
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B983
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B984
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B985
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B986
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B987
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B988
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B989
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B990
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B991
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B992
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B993
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
--180
-30
-240
-70
-64
-0
-VERTEX
-5
-B994
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B995
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B996
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B997
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B998
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B999
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-SEQEND
-5
-B1000
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1001
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1002
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B1003
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1004
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1005
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B1006
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1007
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1008
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1009
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1010
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1011
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1012
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1013
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
--216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1014
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1015
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1016
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B1017
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1018
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1019
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-SEQEND
-5
-B1020
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1021
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1022
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B1023
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B1024
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B1025
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B1026
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B1027
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B1028
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1029
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1030
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B1031
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1032
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1033
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--252
-30
-720
-70
-64
-0
-VERTEX
-5
-B1034
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1035
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1036
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--288
-30
-960
-70
-64
-0
-VERTEX
-5
-B1037
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1038
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1039
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--288
-30
-960
-70
-64
-0
-SEQEND
-5
-B1040
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1041
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1042
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B1043
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B1044
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B1045
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B1046
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B1047
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B1048
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1049
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B1050
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B1051
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1052
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B1053
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
-144
-30
-0
-70
-64
-0
-VERTEX
-5
-B1054
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1055
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1056
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B1057
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1058
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1059
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-SEQEND
-5
-B1060
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1061
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1062
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1063
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B1064
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B1065
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1066
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B1067
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B1068
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1069
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1070
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B1071
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1072
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1073
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-72
-30
-240
-70
-64
-0
-VERTEX
-5
-B1074
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1075
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1076
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1077
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1078
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1079
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-SEQEND
-5
-B1080
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1081
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1082
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1083
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1084
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1085
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1086
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1087
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1088
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1089
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1090
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1091
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1092
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1093
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-0
-30
-480
-70
-64
-0
-VERTEX
-5
-B1094
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1095
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1096
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1097
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1098
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1099
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-SEQEND
-5
-B1100
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1101
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1102
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1103
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1104
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1105
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1106
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1107
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1108
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B1109
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1110
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1111
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B1112
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1113
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
--72
-30
-720
-70
-64
-0
-VERTEX
-5
-B1114
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B1115
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B1116
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
--144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1117
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B1118
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B1119
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
--144
-30
-960
-70
-64
-0
-SEQEND
-5
-B1120
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1121
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1122
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1123
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B1124
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B1125
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1126
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B1127
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B1128
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B1129
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-720
-30
-0
-70
-64
-0
-VERTEX
-5
-B1130
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-160
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B1131
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B1132
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
-720
-30
-0
-70
-64
-0
-VERTEX
-5
-B1133
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-480
-20
-432
-30
-0
-70
-64
-0
-VERTEX
-5
-B1134
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B1135
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B1136
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1137
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B1138
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B1139
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-SEQEND
-5
-B1140
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1141
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1142
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1143
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1144
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1145
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1146
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1147
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1148
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B1149
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B1150
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-156
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1151
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B1152
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-576
-30
-240
-70
-64
-0
-VERTEX
-5
-B1153
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-456
-20
-324
-30
-240
-70
-64
-0
-VERTEX
-5
-B1154
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B1155
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B1156
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1157
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B1158
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B1159
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-SEQEND
-5
-B1160
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1161
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1162
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1163
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1164
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1165
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1166
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1167
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1168
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B1169
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B1170
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-152
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1171
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B1172
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-432
-30
-480
-70
-64
-0
-VERTEX
-5
-B1173
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-432
-20
-216
-30
-480
-70
-64
-0
-VERTEX
-5
-B1174
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B1175
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B1176
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1177
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B1178
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B1179
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-SEQEND
-5
-B1180
-100
-AcDbEntity
-8
-SOLIDS
-0
-POLYLINE
-5
-B1181
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbPolygonMesh
-66
-1
-10
-0
-20
-0
-30
-0
-70
-16
-71
-6
-72
-3
-0
-VERTEX
-5
-B1182
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B1183
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1184
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1185
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B1186
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1187
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1188
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1189
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B1190
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-148
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1191
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1192
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-288
-30
-720
-70
-64
-0
-VERTEX
-5
-B1193
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-408
-20
-108
-30
-720
-70
-64
-0
-VERTEX
-5
-B1194
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1195
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1196
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-384
-20
-0
-30
-960
-70
-64
-0
-VERTEX
-5
-B1197
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1198
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-144
-30
-960
-70
-64
-0
-VERTEX
-5
-B1199
-100
-AcDbEntity
-8
-SOLIDS
-100
-AcDbVertex
-100
-AcDbPolygonMeshVertex
-10
-144
-20
-0
-30
-960
-70
-64
-0
-SEQEND
-5
-B1200
-100
-AcDbEntity
-8
-SOLIDS
-0
-ENDSEC
-0
-SECTION
-2
-OBJECTS
-0
-DICTIONARY
-5
-C
-100
-AcDbDictionary
-3
-ACAD_GROUP
-350
-D
-3
-ACAD_MLINESTYLE
-350
-E
-0
-DICTIONARY
-5
-D
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-100
-AcDbDictionary
-0
-DICTIONARY
-5
-E
-102
-{ACAD_REACTORS
-330
-C
-102
-}
-100
-AcDbDictionary
-3
-STANDARD
-350
-1C
-0
-MLINESTYLE
-5
-1C
-102
-{ACAD_REACTORS
-330
-E
-102
-}
-100
-AcDbMlineStyle
-2
-STANDARD
-70
-0
-3
-
-62
-0
-51
-90.0
-52
-90.0
-71
-2
-49
-0.5
-62
-256
-6
-BYLAYER
-49
--0.5
-62
-256
-6
-BYLAYER
-0
-ENDSEC
-0
-EOF
diff --git a/filter/qa/cppunit/data/eps/fail/CVE-2009-4195-1.eps b/filter/qa/cppunit/data/eps/fail/CVE-2009-4195-1.eps
deleted file mode 100644
index 5ae189f15105..000000000000
--- a/filter/qa/cppunit/data/eps/fail/CVE-2009-4195-1.eps
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/eps/fail/short-1.eps b/filter/qa/cppunit/data/eps/fail/short-1.eps
deleted file mode 100644
index 4b38b782f6fd..000000000000
--- a/filter/qa/cppunit/data/eps/fail/short-1.eps
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/eps/indeterminate/.gitignore b/filter/qa/cppunit/data/eps/indeterminate/.gitignore
deleted file mode 100644
index b2a2eb0476ab..000000000000
--- a/filter/qa/cppunit/data/eps/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.eps-*
diff --git a/filter/qa/cppunit/data/eps/pass/CVE-2013-4979-1.eps b/filter/qa/cppunit/data/eps/pass/CVE-2013-4979-1.eps
deleted file mode 100644
index ae6c6aad7e1e..000000000000
--- a/filter/qa/cppunit/data/eps/pass/CVE-2013-4979-1.eps
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/eps/pass/fdo13433-4.eps b/filter/qa/cppunit/data/eps/pass/fdo13433-4.eps
deleted file mode 100644
index 6ca427f86f4f..000000000000
--- a/filter/qa/cppunit/data/eps/pass/fdo13433-4.eps
+++ /dev/null
@@ -1,667 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Title: /home/amg/newtest05.eps
-%%Creator: matplotlib version 0.98.0, http://matplotlib.sourceforge.net/
-%%CreationDate: Sat Jul 19 09:49:37 2008
-%%Orientation: portrait
-%%BoundingBox: 13 175 598 616
-%%EndComments
-%%BeginProlog
-/mpldict 7 dict def
-mpldict begin
-/m { moveto } bind def
-/l { lineto } bind def
-/r { rlineto } bind def
-/c { curveto } bind def
-/cl { closepath } bind def
-/box {
-m
-1 index 0 r
-0 exch r
-neg 0 r
-cl
-} bind def
-/clipbox {
-box
-clip
-newpath
-} bind def
-end
-%%EndProlog
-mpldict begin
-13.5 175.5 translate
-585 441 0 0 clipbox
-1.000 setlinewidth
-0 setlinejoin
-2 setlinecap
-[] 0 setdash
-1.000 setgray
-gsave
-0 0 m
-585 0 l
-585 441 l
-0 441 l
-0 0 l
-gsave
-fill
-grestore
-stroke
-grestore
-0.000 setgray
-gsave
-73.125 44.1 m
-526.5 44.1 l
-526.5 396.9 l
-73.125 396.9 l
-73.125 44.1 l
-gsave
-1.000 setgray
-fill
-grestore
-stroke
-grestore
-0.500 setlinewidth
-0 setlinecap
-gsave
-453.4 352.8 73.12 44.1 clipbox
-/o {
-gsave
-newpath
-translate
-0 -3 m
-0.795609 -3 1.55874 -2.6839 2.12132 -2.12132 c
-2.6839 -1.55874 3 -0.795609 3 0 c
-3 0.795609 2.6839 1.55874 2.12132 2.12132 c
-1.55874 2.6839 0.795609 3 0 3 c
--0.795609 3 -1.55874 2.6839 -2.12132 2.12132 c
--2.6839 1.55874 -3 0.795609 -3 0 c
--3 -0.795609 -2.6839 -1.55874 -2.12132 -2.12132 c
--1.55874 -2.6839 -0.795609 -3 0 -3 c
-cl
-gsave
-1.000 0.000 0.000 setrgbcolor
-fill
-grestore
-stroke
-grestore
-} bind def
-73.1 92.5 o
-77.7 206 o
-82.2 204 o
-86.7 293 o
-91.3 189 o
-95.8 276 o
-100 250 o
-105 226 o
-109 240 o
-114 329 o
-118 250 o
-123 226 o
-128 99 o
-132 195 o
-137 241 o
-141 168 o
-146 166 o
-150 301 o
-155 294 o
-159 223 o
-164 220 o
-168 184 o
-173 205 o
-177 242 o
-182 320 o
-186 239 o
-191 306 o
-196 272 o
-200 96.1 o
-205 293 o
-209 265 o
-214 233 o
-218 231 o
-223 138 o
-227 204 o
-232 278 o
-236 271 o
-241 165 o
-245 199 o
-250 239 o
-254 234 o
-259 306 o
-264 304 o
-268 246 o
-273 172 o
-277 180 o
-282 246 o
-286 146 o
-291 97.8 o
-295 241 o
-300 141 o
-304 242 o
-309 177 o
-313 189 o
-318 142 o
-322 216 o
-327 273 o
-332 261 o
-336 173 o
-341 223 o
-345 282 o
-350 285 o
-354 90.1 o
-359 241 o
-363 344 o
-368 187 o
-372 172 o
-377 224 o
-381 300 o
-386 237 o
-390 107 o
-395 249 o
-400 263 o
-404 146 o
-409 162 o
-413 228 o
-418 252 o
-422 166 o
-427 255 o
-431 92.7 o
-436 277 o
-440 204 o
-445 226 o
-449 356 o
-454 277 o
-458 247 o
-463 244 o
-468 272 o
-472 286 o
-477 259 o
-481 332 o
-486 138 o
-490 212 o
-495 203 o
-499 163 o
-504 374 o
-508 371 o
-513 223 o
-517 126 o
-522 205 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 4 l
-stroke
-grestore
-} bind def
-73.1 44.1 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 -4 l
-stroke
-grestore
-} bind def
-73.1 397 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-70.389000 31.664000 translate
-0.000000 rotate
-0.000000 0.000000 m /zero glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 4 l
-stroke
-grestore
-} bind def
-164 44.1 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 -4 l
-stroke
-grestore
-} bind def
-164 397 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-158.328000 31.436000 translate
-0.000000 rotate
-0.000000 0.000000 m /two glyphshow
-5.472000 0.000000 m /zero glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 4 l
-stroke
-grestore
-} bind def
-254 44.1 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 -4 l
-stroke
-grestore
-} bind def
-254 397 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-249.003000 31.436000 translate
-0.000000 rotate
-0.000000 0.000000 m /four glyphshow
-5.472000 0.000000 m /zero glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 4 l
-stroke
-grestore
-} bind def
-345 44.1 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 -4 l
-stroke
-grestore
-} bind def
-345 397 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-339.678000 31.664000 translate
-0.000000 rotate
-0.000000 0.000000 m /six glyphshow
-5.472000 0.000000 m /zero glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 4 l
-stroke
-grestore
-} bind def
-436 44.1 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 -4 l
-stroke
-grestore
-} bind def
-436 397 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-430.353000 31.664000 translate
-0.000000 rotate
-0.000000 0.000000 m /eight glyphshow
-5.472000 0.000000 m /zero glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 4 l
-stroke
-grestore
-} bind def
-526 44.1 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-0 -4 l
-stroke
-grestore
-} bind def
-526 397 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-518.292000 31.436000 translate
-0.000000 rotate
-0.000000 0.000000 m /one glyphshow
-5.472000 0.000000 m /zero glyphshow
-10.944000 0.000000 m /zero glyphshow
-grestore
- 1.000 setlinewidth
-gsave
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-296.531 17.82 moveto
-0.0 rotate
-(X)
-0.000 0.000 0.000 setrgbcolor
-show
-grestore
-stroke
-grestore
-0.500 setlinewidth
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-4 0 l
-stroke
-grestore
-} bind def
-73.1 44.1 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
--4 0 l
-stroke
-grestore
-} bind def
-526 44.1 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-57.905000 39.882000 translate
-0.000000 rotate
-0.000000 0.000000 m /minus glyphshow
-5.748000 0.000000 m /three glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-4 0 l
-stroke
-grestore
-} bind def
-73.1 103 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
--4 0 l
-stroke
-grestore
-} bind def
-526 103 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-57.905000 98.682000 translate
-0.000000 rotate
-0.000000 0.000000 m /minus glyphshow
-5.748000 0.000000 m /two glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-4 0 l
-stroke
-grestore
-} bind def
-73.1 162 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
--4 0 l
-stroke
-grestore
-} bind def
-526 162 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-57.905000 157.482000 translate
-0.000000 rotate
-0.000000 0.000000 m /minus glyphshow
-5.748000 0.000000 m /one glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-4 0 l
-stroke
-grestore
-} bind def
-73.1 221 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
--4 0 l
-stroke
-grestore
-} bind def
-526 221 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-63.653000 216.282000 translate
-0.000000 rotate
-0.000000 0.000000 m /zero glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-4 0 l
-stroke
-grestore
-} bind def
-73.1 279 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
--4 0 l
-stroke
-grestore
-} bind def
-526 279 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-63.653000 275.082000 translate
-0.000000 rotate
-0.000000 0.000000 m /one glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-4 0 l
-stroke
-grestore
-} bind def
-73.1 338 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
--4 0 l
-stroke
-grestore
-} bind def
-526 338 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-63.653000 333.882000 translate
-0.000000 rotate
-0.000000 0.000000 m /two glyphshow
-grestore
- gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
-4 0 l
-stroke
-grestore
-} bind def
-73.1 397 o
-grestore
-gsave
-/o {
-gsave
-newpath
-translate
-0 0 m
--4 0 l
-stroke
-grestore
-} bind def
-526 397 o
-grestore
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-63.653000 392.682000 translate
-0.000000 rotate
-0.000000 0.000000 m /three glyphshow
-grestore
- 1.000 setlinewidth
-gsave
-gsave
-/Helvetica-Narrow findfont
-12.0 scalefont
-setfont
-52.905 217.218 moveto
-90.0 rotate
-(Y)
-0.000 0.000 0.000 setrgbcolor
-show
-grestore
-stroke
-grestore
-2 setlinecap
-gsave
-73.125 44.1 m
-526.5 44.1 l
-526.5 396.9 l
-73.125 396.9 l
-73.125 44.1 l
-stroke
-grestore
-0 setlinecap
-gsave
-gsave
-/Helvetica-Narrow findfont
-14.0 scalefont
-setfont
-277.798 404.798 moveto
-0.0 rotate
-(Test plot)
-0.000 0.000 0.000 setrgbcolor
-show
-grestore
-stroke
-grestore
-
-end
-showpage
diff --git a/filter/qa/cppunit/data/met/fail/.gitignore b/filter/qa/cppunit/data/met/fail/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/met/fail/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/met/fail/afl-divide-zero-1.met b/filter/qa/cppunit/data/met/fail/afl-divide-zero-1.met
deleted file mode 100644
index 62ccf48f6d89..000000000000
--- a/filter/qa/cppunit/data/met/fail/afl-divide-zero-1.met
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/met/fail/crash-1.met b/filter/qa/cppunit/data/met/fail/crash-1.met
deleted file mode 100644
index c46b4a9f168a..000000000000
--- a/filter/qa/cppunit/data/met/fail/crash-1.met
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/met/fail/hang-1.met b/filter/qa/cppunit/data/met/fail/hang-1.met
deleted file mode 100644
index c1a095d3fad5..000000000000
--- a/filter/qa/cppunit/data/met/fail/hang-1.met
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/met/fail/hang-2.met b/filter/qa/cppunit/data/met/fail/hang-2.met
deleted file mode 100644
index e807d584e372..000000000000
--- a/filter/qa/cppunit/data/met/fail/hang-2.met
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/met/indeterminate/.gitignore b/filter/qa/cppunit/data/met/indeterminate/.gitignore
deleted file mode 100644
index 8276f4291e67..000000000000
--- a/filter/qa/cppunit/data/met/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.met-*
diff --git a/filter/qa/cppunit/data/met/pass/.gitignore b/filter/qa/cppunit/data/met/pass/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/met/pass/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/met/pass/hang-3.met b/filter/qa/cppunit/data/met/pass/hang-3.met
deleted file mode 100644
index 84b432e63f69..000000000000
--- a/filter/qa/cppunit/data/met/pass/hang-3.met
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/met/pass/sample.met b/filter/qa/cppunit/data/met/pass/sample.met
deleted file mode 100644
index 7635e841fded..000000000000
--- a/filter/qa/cppunit/data/met/pass/sample.met
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pbm/fail/.gitignore b/filter/qa/cppunit/data/pbm/fail/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/pbm/fail/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/pbm/fail/crash-1.pbm b/filter/qa/cppunit/data/pbm/fail/crash-1.pbm
deleted file mode 100644
index 9ddcddfe669c..000000000000
--- a/filter/qa/cppunit/data/pbm/fail/crash-1.pbm
+++ /dev/null
@@ -1,6 +0,0 @@
-P3
-30000000000000000000000000000000 1
-255
-103 79 59
- 95 7P 55
- 87 67 51
diff --git a/filter/qa/cppunit/data/pbm/fail/hang-1.pbm b/filter/qa/cppunit/data/pbm/fail/hang-1.pbm
deleted file mode 100644
index 21742d204c79..000000000000
--- a/filter/qa/cppunit/data/pbm/fail/hang-1.pbm
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pbm/indeterminate/.gitignore b/filter/qa/cppunit/data/pbm/indeterminate/.gitignore
deleted file mode 100644
index e9c5b1765b8f..000000000000
--- a/filter/qa/cppunit/data/pbm/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.ppm-*
diff --git a/filter/qa/cppunit/data/pbm/pass/.gitignore b/filter/qa/cppunit/data/pbm/pass/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/pbm/pass/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/pbm/pass/rhbz160429-1.pbm b/filter/qa/cppunit/data/pbm/pass/rhbz160429-1.pbm
deleted file mode 100644
index d6e3fc6349b8..000000000000
--- a/filter/qa/cppunit/data/pbm/pass/rhbz160429-1.pbm
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pcd/fail/.gitignore b/filter/qa/cppunit/data/pcd/fail/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/pcd/fail/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/pcd/indeterminate/.gitignore b/filter/qa/cppunit/data/pcd/indeterminate/.gitignore
deleted file mode 100644
index 23ad7d155635..000000000000
--- a/filter/qa/cppunit/data/pcd/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.pcd-*
diff --git a/filter/qa/cppunit/data/pcd/pass/.gitignore b/filter/qa/cppunit/data/pcd/pass/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/pcd/pass/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/pcd/pass/blank-square.pcd b/filter/qa/cppunit/data/pcd/pass/blank-square.pcd
deleted file mode 100644
index a626b5f2309b..000000000000
--- a/filter/qa/cppunit/data/pcd/pass/blank-square.pcd
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pcx/fail/.gitignore b/filter/qa/cppunit/data/pcx/fail/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/pcx/fail/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-1.pcx b/filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-1.pcx
deleted file mode 100644
index 915f38aec2e3..000000000000
--- a/filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-1.pcx
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-2.pcx b/filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-2.pcx
deleted file mode 100644
index 9c8a751a486d..000000000000
--- a/filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-2.pcx
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-3.pcx b/filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-3.pcx
deleted file mode 100644
index 41175653a4ca..000000000000
--- a/filter/qa/cppunit/data/pcx/fail/CVE-2007-3741-3.pcx
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pcx/fail/CVE-2008-1097-1.pcx b/filter/qa/cppunit/data/pcx/fail/CVE-2008-1097-1.pcx
deleted file mode 100644
index c55c64ed9a8a..000000000000
--- a/filter/qa/cppunit/data/pcx/fail/CVE-2008-1097-1.pcx
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pcx/fail/hang-1.pcx b/filter/qa/cppunit/data/pcx/fail/hang-1.pcx
deleted file mode 100644
index 73798ea56160..000000000000
--- a/filter/qa/cppunit/data/pcx/fail/hang-1.pcx
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pcx/indeterminate/.gitignore b/filter/qa/cppunit/data/pcx/indeterminate/.gitignore
deleted file mode 100644
index f73b09798145..000000000000
--- a/filter/qa/cppunit/data/pcx/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.pcx-*
diff --git a/filter/qa/cppunit/data/pcx/pass/.gitignore b/filter/qa/cppunit/data/pcx/pass/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/pcx/pass/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/pcx/pass/rhbz469075-1.pcx b/filter/qa/cppunit/data/pcx/pass/rhbz469075-1.pcx
deleted file mode 100644
index d928c08908ba..000000000000
--- a/filter/qa/cppunit/data/pcx/pass/rhbz469075-1.pcx
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pict/clipping-problem.pct b/filter/qa/cppunit/data/pict/clipping-problem.pct
deleted file mode 100644
index 37fe66c80f7a..000000000000
--- a/filter/qa/cppunit/data/pict/clipping-problem.pct
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pict/fail/.gitignore b/filter/qa/cppunit/data/pict/fail/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/pict/fail/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/pict/fail/CVE-2008-1097-1.pct b/filter/qa/cppunit/data/pict/fail/CVE-2008-1097-1.pct
deleted file mode 100644
index 73943c9d79b9..000000000000
--- a/filter/qa/cppunit/data/pict/fail/CVE-2008-1097-1.pct
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pict/fail/CVE-2012-0277-1.pct b/filter/qa/cppunit/data/pict/fail/CVE-2012-0277-1.pct
deleted file mode 100644
index 5683a55b5f1d..000000000000
--- a/filter/qa/cppunit/data/pict/fail/CVE-2012-0277-1.pct
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pict/fail/CVE-2013-2577-1.pct b/filter/qa/cppunit/data/pict/fail/CVE-2013-2577-1.pct
deleted file mode 100644
index 1e1f6d5b5f05..000000000000
--- a/filter/qa/cppunit/data/pict/fail/CVE-2013-2577-1.pct
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pict/fail/EDB-19332-1.pct b/filter/qa/cppunit/data/pict/fail/EDB-19332-1.pct
deleted file mode 100644
index 5f8740305076..000000000000
--- a/filter/qa/cppunit/data/pict/fail/EDB-19332-1.pct
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pict/fail/exception-1.pct b/filter/qa/cppunit/data/pict/fail/exception-1.pct
deleted file mode 100644
index f9cd85a4aece..000000000000
--- a/filter/qa/cppunit/data/pict/fail/exception-1.pct
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pict/fail/hang-1.pct b/filter/qa/cppunit/data/pict/fail/hang-1.pct
deleted file mode 100644
index 735ce0aca7f3..000000000000
--- a/filter/qa/cppunit/data/pict/fail/hang-1.pct
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pict/indeterminate/.gitignore b/filter/qa/cppunit/data/pict/indeterminate/.gitignore
deleted file mode 100644
index 1bdee77373fa..000000000000
--- a/filter/qa/cppunit/data/pict/indeterminate/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.pict-*
-*.pct-*
diff --git a/filter/qa/cppunit/data/pict/pass/.gitignore b/filter/qa/cppunit/data/pict/pass/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/pict/pass/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/pict/pass/ooo25876-2.pct b/filter/qa/cppunit/data/pict/pass/ooo25876-2.pct
deleted file mode 100644
index 9807e36f74cb..000000000000
--- a/filter/qa/cppunit/data/pict/pass/ooo25876-2.pct
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/pict/pass/tdf92789.pct b/filter/qa/cppunit/data/pict/pass/tdf92789.pct
deleted file mode 100644
index 2d6f0d8848bf..000000000000
--- a/filter/qa/cppunit/data/pict/pass/tdf92789.pct
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/ppm/fail/.gitignore b/filter/qa/cppunit/data/ppm/fail/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/ppm/fail/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/ppm/fail/CVE-2008-1097-1.ppm b/filter/qa/cppunit/data/ppm/fail/CVE-2008-1097-1.ppm
deleted file mode 100644
index 457289577df7..000000000000
--- a/filter/qa/cppunit/data/ppm/fail/CVE-2008-1097-1.ppm
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/ppm/indeterminate/.gitignore b/filter/qa/cppunit/data/ppm/indeterminate/.gitignore
deleted file mode 100644
index e9c5b1765b8f..000000000000
--- a/filter/qa/cppunit/data/ppm/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.ppm-*
diff --git a/filter/qa/cppunit/data/ppm/pass/.gitignore b/filter/qa/cppunit/data/ppm/pass/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/ppm/pass/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/ppm/pass/fdo19811-2.ppm b/filter/qa/cppunit/data/ppm/pass/fdo19811-2.ppm
deleted file mode 100644
index 828b9725693e..000000000000
--- a/filter/qa/cppunit/data/ppm/pass/fdo19811-2.ppm
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/psd/fail/.gitignore b/filter/qa/cppunit/data/psd/fail/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/psd/fail/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/psd/fail/CVE-2007-3741-1.psd b/filter/qa/cppunit/data/psd/fail/CVE-2007-3741-1.psd
deleted file mode 100644
index 59b690063b7b..000000000000
--- a/filter/qa/cppunit/data/psd/fail/CVE-2007-3741-1.psd
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/psd/indeterminate/.gitignore b/filter/qa/cppunit/data/psd/indeterminate/.gitignore
deleted file mode 100644
index 49b8ba044fa1..000000000000
--- a/filter/qa/cppunit/data/psd/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.psd-*
diff --git a/filter/qa/cppunit/data/psd/pass/.gitignore b/filter/qa/cppunit/data/psd/pass/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/psd/pass/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/psd/pass/blank-square.psd b/filter/qa/cppunit/data/psd/pass/blank-square.psd
deleted file mode 100644
index fc811da006e7..000000000000
--- a/filter/qa/cppunit/data/psd/pass/blank-square.psd
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/psd/pass/hang-1.psd b/filter/qa/cppunit/data/psd/pass/hang-1.psd
deleted file mode 100644
index 8f557dd80d55..000000000000
--- a/filter/qa/cppunit/data/psd/pass/hang-1.psd
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/psd/pass/rhbz899670-1.psd b/filter/qa/cppunit/data/psd/pass/rhbz899670-1.psd
deleted file mode 100644
index ce8de8493ebe..000000000000
--- a/filter/qa/cppunit/data/psd/pass/rhbz899670-1.psd
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/ras/fail/.gitignore b/filter/qa/cppunit/data/ras/fail/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/ras/fail/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/ras/fail/CVE-2007-2356-1.ras b/filter/qa/cppunit/data/ras/fail/CVE-2007-2356-1.ras
deleted file mode 100644
index c00c27016b57..000000000000
--- a/filter/qa/cppunit/data/ras/fail/CVE-2007-2356-1.ras
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/ras/fail/CVE-2008-1097-1.ras b/filter/qa/cppunit/data/ras/fail/CVE-2008-1097-1.ras
deleted file mode 100644
index effd654ac5e4..000000000000
--- a/filter/qa/cppunit/data/ras/fail/CVE-2008-1097-1.ras
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/ras/fail/crash-1.ras b/filter/qa/cppunit/data/ras/fail/crash-1.ras
deleted file mode 100644
index d1abbaefcbae..000000000000
--- a/filter/qa/cppunit/data/ras/fail/crash-1.ras
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/ras/fail/hang-1.ras b/filter/qa/cppunit/data/ras/fail/hang-1.ras
deleted file mode 100644
index 44dec67607b4..000000000000
--- a/filter/qa/cppunit/data/ras/fail/hang-1.ras
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/ras/indeterminate/.gitignore b/filter/qa/cppunit/data/ras/indeterminate/.gitignore
deleted file mode 100644
index 60147ad08a9d..000000000000
--- a/filter/qa/cppunit/data/ras/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.ras-*
diff --git a/filter/qa/cppunit/data/ras/pass/.gitignore b/filter/qa/cppunit/data/ras/pass/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/ras/pass/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/ras/pass/marbles.ras b/filter/qa/cppunit/data/ras/pass/marbles.ras
deleted file mode 100644
index 9b3fb0d853b6..000000000000
--- a/filter/qa/cppunit/data/ras/pass/marbles.ras
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/tga/fail/.gitignore b/filter/qa/cppunit/data/tga/fail/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/tga/fail/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/tga/fail/CVE-2012-3755-1.tga b/filter/qa/cppunit/data/tga/fail/CVE-2012-3755-1.tga
deleted file mode 100644
index 963e5d3aedc3..000000000000
--- a/filter/qa/cppunit/data/tga/fail/CVE-2012-3755-1.tga
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/tga/indeterminate/.gitignore b/filter/qa/cppunit/data/tga/indeterminate/.gitignore
deleted file mode 100644
index 38bf024a9b53..000000000000
--- a/filter/qa/cppunit/data/tga/indeterminate/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.tga-*
diff --git a/filter/qa/cppunit/data/tga/pass/.gitignore b/filter/qa/cppunit/data/tga/pass/.gitignore
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/filter/qa/cppunit/data/tga/pass/.gitignore
+++ /dev/null
diff --git a/filter/qa/cppunit/data/tga/pass/fdo14924-5.tga b/filter/qa/cppunit/data/tga/pass/fdo14924-5.tga
deleted file mode 100644
index c3b38f313f82..000000000000
--- a/filter/qa/cppunit/data/tga/pass/fdo14924-5.tga
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/data/tga/pass/fdo14924-6.tga b/filter/qa/cppunit/data/tga/pass/fdo14924-6.tga
deleted file mode 100644
index 92b720053702..000000000000
--- a/filter/qa/cppunit/data/tga/pass/fdo14924-6.tga
+++ /dev/null
Binary files differ
diff --git a/filter/qa/cppunit/filters-dxf-test.cxx b/filter/qa/cppunit/filters-dxf-test.cxx
deleted file mode 100644
index 2dddac45d026..000000000000
--- a/filter/qa/cppunit/filters-dxf-test.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-#include <vcl/graph.hxx>
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- idxGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class DxfFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
-{
-public:
- DxfFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(DxfFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool DxfFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return idxGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void DxfFilterTest::testCVEs()
-{
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/dxf/"));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(DxfFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/filters-eps-test.cxx b/filter/qa/cppunit/filters-eps-test.cxx
deleted file mode 100644
index d3f7a18220d5..000000000000
--- a/filter/qa/cppunit/filters-eps-test.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-#include <vcl/graph.hxx>
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- ipsGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class EpsFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
-{
-public:
- EpsFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(EpsFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool EpsFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return ipsGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void EpsFilterTest::testCVEs()
-{
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/eps/"));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(EpsFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/filters-met-test.cxx b/filter/qa/cppunit/filters-met-test.cxx
deleted file mode 100644
index e850a06a37df..000000000000
--- a/filter/qa/cppunit/filters-met-test.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-#include <vcl/graph.hxx>
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- imeGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class MetFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
-{
-public:
- MetFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(MetFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool MetFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return imeGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void MetFilterTest::testCVEs()
-{
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/met/"));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(MetFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/filters-pcd-test.cxx b/filter/qa/cppunit/filters-pcd-test.cxx
deleted file mode 100644
index dc32e33469e7..000000000000
--- a/filter/qa/cppunit/filters-pcd-test.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-#include <vcl/graph.hxx>
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- icdGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class PcdFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
-{
-public:
- PcdFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(PcdFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool PcdFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return icdGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void PcdFilterTest::testCVEs()
-{
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/pcd/"));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(PcdFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/filters-pcx-test.cxx b/filter/qa/cppunit/filters-pcx-test.cxx
deleted file mode 100644
index 3a28e24626fa..000000000000
--- a/filter/qa/cppunit/filters-pcx-test.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-#include <vcl/graph.hxx>
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- ipxGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class PcxFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
-{
-public:
- PcxFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(PcxFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool PcxFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return ipxGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void PcxFilterTest::testCVEs()
-{
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/pcx/"));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(PcxFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/filters-pict-test.cxx b/filter/qa/cppunit/filters-pict-test.cxx
deleted file mode 100644
index b4f0432441db..000000000000
--- a/filter/qa/cppunit/filters-pict-test.cxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <test/xmltesttools.hxx>
-#include <tools/stream.hxx>
-#include <vcl/gdimtf.hxx>
-#include <vcl/graph.hxx>
-#include <vcl/metaactiontypes.hxx>
-
-#include "../../source/graphicfilter/ipict/ipict.hxx"
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- iptGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class PictFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
- , public XmlTestTools
-{
-public:
- PictFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- OUString pictURL()
- {
- return m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/pict/");
- }
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- void testDontClipTooMuch();
-
- CPPUNIT_TEST_SUITE(PictFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST(testDontClipTooMuch);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool PictFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return iptGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void PictFilterTest::testCVEs()
-{
- testDir(OUString(),
- pictURL());
-}
-
-void PictFilterTest::testDontClipTooMuch()
-{
- SvFileStream aFileStream(pictURL() + "clipping-problem.pct", StreamMode::READ);
- GDIMetaFile aGDIMetaFile;
- pict::ReadPictFile(aFileStream, aGDIMetaFile);
-
- MetafileXmlDump dumper;
- dumper.filterAllActionTypes();
- dumper.filterActionType(MetaActionType::CLIPREGION, false);
- xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
-
- CPPUNIT_ASSERT (pDoc);
-
- assertXPath(pDoc, "/metafile/clipregion[5]", "top", "0");
- assertXPath(pDoc, "/metafile/clipregion[5]", "left", "0");
- assertXPath(pDoc, "/metafile/clipregion[5]", "bottom", "empty");
- assertXPath(pDoc, "/metafile/clipregion[5]", "right", "empty");
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(PictFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/filters-ppm-test.cxx b/filter/qa/cppunit/filters-ppm-test.cxx
deleted file mode 100644
index 43ae966a0c57..000000000000
--- a/filter/qa/cppunit/filters-ppm-test.cxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-#include <vcl/graph.hxx>
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- ipbGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class PpmFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
-{
-public:
- PpmFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(PpmFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool PpmFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return ipbGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void PpmFilterTest::testCVEs()
-{
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/ppm/"));
-
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/pbm/"));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(PpmFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/filters-psd-test.cxx b/filter/qa/cppunit/filters-psd-test.cxx
deleted file mode 100644
index 7a3447a1b1ec..000000000000
--- a/filter/qa/cppunit/filters-psd-test.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-#include <vcl/graph.hxx>
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- ipdGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class PsdFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
-{
-public:
- PsdFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(PsdFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool PsdFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return ipdGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void PsdFilterTest::testCVEs()
-{
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/psd/"));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(PsdFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/filters-ras-test.cxx b/filter/qa/cppunit/filters-ras-test.cxx
deleted file mode 100644
index 2f3b678e4e0a..000000000000
--- a/filter/qa/cppunit/filters-ras-test.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-#include <vcl/graph.hxx>
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- iraGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class RasFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
-{
-public:
- RasFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(RasFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool RasFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return iraGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void RasFilterTest::testCVEs()
-{
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/ras/"));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(RasFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/filters-tga-test.cxx b/filter/qa/cppunit/filters-tga-test.cxx
deleted file mode 100644
index c87216803120..000000000000
--- a/filter/qa/cppunit/filters-tga-test.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- 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/.
- */
-
-#include <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-#include <vcl/graph.hxx>
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- itgGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class TgaFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
-{
-public:
- TgaFilterTest() : BootstrapFixture(true, false) {}
-
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
-
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(TgaFilterTest);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-};
-
-bool TgaFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
-{
- SvFileStream aFileStream(rURL, StreamMode::READ);
- Graphic aGraphic;
- return itgGraphicImport(aFileStream, aGraphic, nullptr);
-}
-
-void TgaFilterTest::testCVEs()
-{
- testDir(OUString(),
- m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/tga/"));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(TgaFilterTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/msfilter-test.cxx b/filter/qa/cppunit/msfilter-test.cxx
index 439aad88b674..0969e272803b 100644
--- a/filter/qa/cppunit/msfilter-test.cxx
+++ b/filter/qa/cppunit/msfilter-test.cxx
@@ -52,7 +52,7 @@ void MSFilterTest::testTransColToIco()
15, 14, 13, 13, 12, 12, 9, 9, 9, 10, 10, 11, 11,
1, 14, 13, 13, 1, 12, 1, 9, 1, 10, 1, 11, 1 };
- for( size_t i = 0; i < SAL_N_ELEMENTS(aStdCol); ++i)
+ for( size_t i = 0; i < std::size(aStdCol); ++i)
{
const OString sMessage = "Index of unmatched color: " + OString::number(i);
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpected[i],
diff --git a/filter/qa/cppunit/priority-test.cxx b/filter/qa/cppunit/priority-test.cxx
index 018d882a7215..7b37ce07e6ee 100644
--- a/filter/qa/cppunit/priority-test.cxx
+++ b/filter/qa/cppunit/priority-test.cxx
@@ -21,7 +21,6 @@
#include <unotest/bootstrapfixturebase.hxx>
-using namespace std;
using namespace css;
namespace {
@@ -51,20 +50,17 @@ void PriorityFilterTest::testPriority()
// TODO: expand this to check more of these priorities
};
- for (size_t i = 0; i < SAL_N_ELEMENTS(aToCheck); i++)
+ for (auto const[pURL, pFormat] : aToCheck)
{
- OUString aURL = OUString::createFromAscii(aToCheck[i].pURL);
+ OUString aURL = OUString::createFromAscii(pURL);
try
{
OUString aTypeName = xDetection->queryTypeByURL(aURL);
- OUString aFormatCorrect = OUString::createFromAscii(aToCheck[i].pFormat);
+ OUString aFormatCorrect = OUString::createFromAscii(pFormat);
OUString aMsg = "Mis-matching formats "
- "'" +
- aTypeName +
- "' should be '" +
- aFormatCorrect +
- "'";
+ "'" +
+ aTypeName + "' should be '" + aFormatCorrect + "'";
CPPUNIT_ASSERT_EQUAL_MESSAGE(OUStringToOString(aMsg,
RTL_TEXTENCODING_UTF8).getStr(),
aFormatCorrect, aTypeName);
diff --git a/filter/qa/cppunit/xslt-test.cxx b/filter/qa/cppunit/xslt-test.cxx
index 1dcb2a7d5455..4e0c621d6786 100644
--- a/filter/qa/cppunit/xslt-test.cxx
+++ b/filter/qa/cppunit/xslt-test.cxx
@@ -33,7 +33,6 @@
#include <test/bootstrapfixture.hxx>
-using namespace std;
using namespace ::com::sun::star;
@@ -67,10 +66,10 @@ private:
std::condition_variable m_cond;
bool m_bDone;
- virtual void SAL_CALL disposing(const lang::EventObject&) throw() override {}
- virtual void SAL_CALL started() throw() override {}
- virtual void SAL_CALL closed() throw() override { notifyDone(); }
- virtual void SAL_CALL terminated() throw() override { notifyDone(); }
+ virtual void SAL_CALL disposing(const lang::EventObject&) noexcept override {}
+ virtual void SAL_CALL started() noexcept override {}
+ virtual void SAL_CALL closed() noexcept override { notifyDone(); }
+ virtual void SAL_CALL terminated() noexcept override { notifyDone(); }
virtual void SAL_CALL error(const uno::Any& e) override
{
notifyDone(); // set on error too, otherwise main thread waits forever
@@ -97,16 +96,17 @@ void XsltFilterTest::testXsltCopyNew()
OUString source(
m_directories.getURLFromSrc(u"/filter/source/xsltfilter/xsltfilter.component"));
- uno::Sequence<uno::Any> args(7);
- args[0] <<= beans::NamedValue("StylesheetURL",
- uno::makeAny(m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/xslt/copy.xslt")));
- args[1] <<= beans::NamedValue("SourceURL", uno::makeAny(source));
- args[2] <<= beans::NamedValue("TargetURL", uno::makeAny(tempURL));
- args[3] <<= beans::NamedValue("SourceBaseURL",
- uno::makeAny(m_directories.getURLFromSrc(u"/filter/source/xsltfilter/")));
- args[4] <<= beans::NamedValue("TargetBaseURL", uno::makeAny(tempDirURL));
- args[5] <<= beans::NamedValue("SystemType", uno::makeAny(OUString()));
- args[6] <<= beans::NamedValue("PublicType", uno::makeAny(OUString()));
+ uno::Sequence<uno::Any> args{
+ uno::Any(beans::NamedValue("StylesheetURL",
+ uno::Any(m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/xslt/copy.xslt")))),
+ uno::Any(beans::NamedValue("SourceURL", uno::Any(source))),
+ uno::Any(beans::NamedValue("TargetURL", uno::Any(tempURL))),
+ uno::Any(beans::NamedValue("SourceBaseURL",
+ uno::Any(m_directories.getURLFromSrc(u"/filter/source/xsltfilter/")))),
+ uno::Any(beans::NamedValue("TargetBaseURL", uno::Any(tempDirURL))),
+ uno::Any(beans::NamedValue("SystemType", uno::Any(OUString()))),
+ uno::Any(beans::NamedValue("PublicType", uno::Any(OUString())))
+ };
uno::Reference<ucb::XSimpleFileAccess3> xSFA =
ucb::SimpleFileAccess::create(getComponentContext());
@@ -119,7 +119,7 @@ void XsltFilterTest::testXsltCopyNew()
uno::Reference<xml::xslt::XXSLTTransformer> xXslt(
xml::xslt::XSLTTransformer::create(getComponentContext(), args));
- xXslt->addListener(uno::Reference<io::XStreamListener>(xListener.get()));
+ xXslt->addListener(xListener);
xXslt->setInputStream(xIn);
xXslt->setOutputStream(xOut);
@@ -151,17 +151,17 @@ void XsltFilterTest::testXsltCopyOld()
OUString source(
m_directories.getURLFromSrc(u"/filter/source/xsltfilter/xsltfilter.component"));
- uno::Sequence<uno::Any> args(7);
- args[0] <<= beans::NamedValue("StylesheetURL",
- uno::makeAny(m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/xslt/copy.xslt")));
- args[1] <<= beans::NamedValue("SourceURL", uno::makeAny(source));
- args[2] <<= beans::NamedValue("TargetURL", uno::makeAny(tempURL));
- args[3] <<= beans::NamedValue("SourceBaseURL",
- uno::makeAny(m_directories.getURLFromSrc(u"/filter/source/xsltfilter/")));
- args[4] <<= beans::NamedValue("TargetBaseURL", uno::makeAny(tempDirURL));
- args[5] <<= beans::NamedValue("SystemType", uno::makeAny(OUString()));
- args[6] <<= beans::NamedValue("PublicType", uno::makeAny(OUString()));
-
+ uno::Sequence<uno::Any> args{
+ uno::Any(beans::NamedValue("StylesheetURL",
+ uno::Any(m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/xslt/copy.xslt")))),
+ uno::Any(beans::NamedValue("SourceURL", uno::Any(source))),
+ uno::Any(beans::NamedValue("TargetURL", uno::Any(tempURL))),
+ uno::Any(beans::NamedValue("SourceBaseURL",
+ uno::Any(m_directories.getURLFromSrc(u"/filter/source/xsltfilter/")))),
+ uno::Any(beans::NamedValue("TargetBaseURL", uno::Any(tempDirURL))),
+ uno::Any(beans::NamedValue("SystemType", uno::Any(OUString()))),
+ uno::Any(beans::NamedValue("PublicType", uno::Any(OUString())))
+ };
uno::Reference<ucb::XSimpleFileAccess3> xSFA =
ucb::SimpleFileAccess::create(getComponentContext());
@@ -178,7 +178,7 @@ void XsltFilterTest::testXsltCopyOld()
uno::Reference<lang::XInitialization> xInit(xXslt, uno::UNO_QUERY_THROW);
xInit->initialize(args);
- xXslt->addListener(uno::Reference<io::XStreamListener>(xListener.get()));
+ xXslt->addListener(xListener);
xXslt->setInputStream(xIn);
xXslt->setOutputStream(xOut);
diff --git a/filter/qa/data/commentsInMargin.odt b/filter/qa/data/commentsInMargin.odt
new file mode 100644
index 000000000000..3286f9e01899
--- /dev/null
+++ b/filter/qa/data/commentsInMargin.odt
Binary files differ
diff --git a/filter/qa/data/picture.pdf b/filter/qa/data/picture.pdf
new file mode 100644
index 000000000000..79af2b349dd2
--- /dev/null
+++ b/filter/qa/data/picture.pdf
Binary files differ
diff --git a/filter/qa/pdf.cxx b/filter/qa/pdf.cxx
new file mode 100644
index 000000000000..9ab11cd36d71
--- /dev/null
+++ b/filter/qa/pdf.cxx
@@ -0,0 +1,373 @@
+/* -*- 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/.
+ */
+
+#include <test/unoapi_test.hxx>
+
+#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/document/XFilter.hpp>
+#include <com/sun/star/xml/crypto/SEInitializer.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+
+#include <comphelper/propertyvalue.hxx>
+#include <tools/stream.hxx>
+#include <unotools/streamwrap.hxx>
+#include <vcl/filter/PDFiumLibrary.hxx>
+#include <tools/helpers.hxx>
+
+using namespace ::com::sun::star;
+
+namespace
+{
+/// Covers filter/source/pdf/ fixes.
+class Test : public UnoApiTest
+{
+public:
+ Test()
+ : UnoApiTest("/filter/qa/data/")
+ {
+ }
+
+ void setUp() override;
+ void doTestCommentsInMargin(bool commentsInMarginEnabled);
+};
+
+void Test::setUp()
+{
+ UnoApiTest::setUp();
+
+ MacrosTest::setUpX509(m_directories, "filter_pdf");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSignCertificateSubjectName)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ uno::Reference<xml::crypto::XSEInitializer> xSEInitializer
+ = xml::crypto::SEInitializer::create(mxComponentContext);
+ uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext
+ = xSEInitializer->createSecurityContext(OUString());
+ uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment
+ = xSecurityContext->getSecurityEnvironment();
+ uno::Sequence<beans::PropertyValue> aFilterData{
+ comphelper::makePropertyValue("SignPDF", true),
+ comphelper::makePropertyValue(
+ "SignCertificateSubjectName",
+ OUString(
+ "CN=Xmlsecurity RSA Test example Alice,O=Xmlsecurity RSA Test,ST=England,C=UK")),
+ };
+ if (!GetValidCertificate(xSecurityEnvironment->getPersonalCertificates(), xSecurityEnvironment,
+ aFilterData))
+ {
+ return;
+ }
+
+ // Given an empty document:
+ mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
+
+ // When exporting to PDF, and referring to a certificate using a subject name:
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
+ uno::Reference<document::XFilter> xFilter(
+ xFactory->createInstance("com.sun.star.document.PDFFilter"), uno::UNO_QUERY);
+ uno::Reference<document::XExporter> xExporter(xFilter, uno::UNO_QUERY);
+ xExporter->setSourceDocument(mxComponent);
+ SvMemoryStream aStream;
+ uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream));
+
+ uno::Sequence<beans::PropertyValue> aDescriptor{
+ comphelper::makePropertyValue("FilterName", OUString("writer_pdf_Export")),
+ comphelper::makePropertyValue("FilterData", aFilterData),
+ comphelper::makePropertyValue("OutputStream", xOutputStream),
+ };
+ xFilter->filter(aDescriptor);
+
+ // Then make sure the resulting PDF has a signature:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(aStream.GetData(), aStream.GetSize(), OString());
+ // Without the accompanying fix in place, this test would have failed, as signing was enabled
+ // without configuring a certificate, so the whole export failed.
+ CPPUNIT_ASSERT(pPdfDocument);
+ CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getSignatureCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPdfDecompositionSize)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given an empty Writer document:
+ mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
+
+ // When inserting a 267 points wide PDF image into the document:
+ uno::Sequence<beans::PropertyValue> aArgs = {
+ comphelper::makePropertyValue("FileName", createFileURL(u"picture.pdf")),
+ };
+ dispatchCommand(mxComponent, ".uno:InsertGraphic", aArgs);
+
+ // Then make sure that its size is correct:
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ auto xGraphic = xShape->getPropertyValue("Graphic").get<uno::Reference<graphic::XGraphic>>();
+ CPPUNIT_ASSERT(xGraphic.is());
+ Graphic aGraphic(xGraphic);
+ basegfx::B2DRange aRange = aGraphic.getVectorGraphicData()->getRange();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 9437
+ // - Actual : 34176
+ // i.e. the width was too large, it used all width of the body frame.
+ // 9437 mm100 is 267.507 points from the file.
+#if defined MACOSX
+ // TODO the bitmap size is larger (75486) on macOS, but that should not affect the logic size.
+ (void)aRange;
+#else
+ // Unfortunately, this test is DPI-dependent.
+ // Use some allowance (~1/2 pt) to let it pass on non-default DPI.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(9437, aRange.getWidth(), 20.0);
+#endif
+}
+
+void Test::doTestCommentsInMargin(bool commentsInMarginEnabled)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ loadFromFile(u"commentsInMargin.odt");
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
+ uno::Reference<document::XFilter> xFilter(
+ xFactory->createInstance("com.sun.star.document.PDFFilter"), uno::UNO_QUERY);
+ uno::Reference<document::XExporter> xExporter(xFilter, uno::UNO_QUERY);
+ xExporter->setSourceDocument(mxComponent);
+ SvMemoryStream aStream;
+ uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream));
+ uno::Sequence<beans::PropertyValue> aFilterData{ comphelper::makePropertyValue(
+ "ExportNotesInMargin", commentsInMarginEnabled) };
+ uno::Sequence<beans::PropertyValue> aDescriptor{
+ comphelper::makePropertyValue("FilterName", OUString("writer_pdf_Export")),
+ comphelper::makePropertyValue("FilterData", aFilterData),
+ comphelper::makePropertyValue("OutputStream", xOutputStream),
+ };
+ xFilter->filter(aDescriptor);
+
+ // Make sure the number of objects is correct
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(aStream.GetData(), aStream.GetSize(), OString());
+ CPPUNIT_ASSERT(pPdfDocument);
+ if (commentsInMarginEnabled)
+ {
+ // Unfortunately, the comment box is DPI dependent, and the lines there may split
+ // at higher DPIs, creating additional objects on import, hence the "_GREATER"
+ CPPUNIT_ASSERT_GREATER(8, pPdfDocument->openPage(0)->getObjectCount());
+ }
+ else
+ CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->openPage(0)->getObjectCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCommentsInMargin)
+{
+ // Test that setting/unsetting the "ExportNotesInMargin" property works correctly
+ doTestCommentsInMargin(true);
+ doTestCommentsInMargin(false);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWatermarkColor)
+{
+ // Given an empty Writer document:
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+ mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
+
+ // When exporting that as PDF with a red watermark:
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
+ uno::Reference<document::XFilter> xFilter(
+ xFactory->createInstance("com.sun.star.document.PDFFilter"), uno::UNO_QUERY);
+ uno::Reference<document::XExporter> xExporter(xFilter, uno::UNO_QUERY);
+ xExporter->setSourceDocument(mxComponent);
+ SvMemoryStream aStream;
+ uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream));
+ uno::Sequence<beans::PropertyValue> aFilterData{
+ comphelper::makePropertyValue("Watermark", OUString("X")),
+ comphelper::makePropertyValue("WatermarkColor", static_cast<sal_Int32>(0xff0000)),
+ };
+ uno::Sequence<beans::PropertyValue> aDescriptor{
+ comphelper::makePropertyValue("FilterName", OUString("writer_pdf_Export")),
+ comphelper::makePropertyValue("FilterData", aFilterData),
+ comphelper::makePropertyValue("OutputStream", xOutputStream),
+ };
+ xFilter->filter(aDescriptor);
+
+ // Then make sure that the watermark color is correct:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(aStream.GetData(), aStream.GetSize(), OString());
+ CPPUNIT_ASSERT(pPdfDocument);
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getObjectCount());
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pPageObject = pPage->getObject(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPageObject->getFormObjectCount());
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pFormObject = pPageObject->getFormObject(0);
+ Color aFillColor = pFormObject->getFillColor();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: rgba[ff0000ff]
+ // - Actual : rgba[00ff00ff]
+ // i.e. the color was the (default) green, not red.
+ CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0xff0000), aFillColor);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWatermarkFontHeight)
+{
+ // Given an empty Writer document:
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+ mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
+
+ // When exporting that as PDF with a 100pt-sized watermark:
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
+ uno::Reference<document::XFilter> xFilter(
+ xFactory->createInstance("com.sun.star.document.PDFFilter"), uno::UNO_QUERY);
+ uno::Reference<document::XExporter> xExporter(xFilter, uno::UNO_QUERY);
+ xExporter->setSourceDocument(mxComponent);
+ SvMemoryStream aStream;
+ uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream));
+ sal_Int32 nExpectedFontSize = 100;
+ uno::Sequence<beans::PropertyValue> aFilterData{
+ comphelper::makePropertyValue("Watermark", OUString("X")),
+ comphelper::makePropertyValue("WatermarkFontHeight", nExpectedFontSize),
+ };
+ uno::Sequence<beans::PropertyValue> aDescriptor{
+ comphelper::makePropertyValue("FilterName", OUString("writer_pdf_Export")),
+ comphelper::makePropertyValue("FilterData", aFilterData),
+ comphelper::makePropertyValue("OutputStream", xOutputStream),
+ };
+ xFilter->filter(aDescriptor);
+
+ // Then make sure that the watermark font size is correct:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(aStream.GetData(), aStream.GetSize(), OString());
+ CPPUNIT_ASSERT(pPdfDocument);
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getObjectCount());
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pPageObject = pPage->getObject(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPageObject->getFormObjectCount());
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pFormObject = pPageObject->getFormObject(0);
+ sal_Int32 nFontSize = pFormObject->getFontSize();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 100
+ // - Actual : 594
+ // i.e. the font size was automatic, could not specify an explicit size.
+ CPPUNIT_ASSERT_EQUAL(nExpectedFontSize, nFontSize);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWatermarkFontName)
+{
+ // Given an empty Writer document:
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+ mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
+
+ // When exporting that as PDF with a serif watermark:
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
+ uno::Reference<document::XFilter> xFilter(
+ xFactory->createInstance("com.sun.star.document.PDFFilter"), uno::UNO_QUERY);
+ uno::Reference<document::XExporter> xExporter(xFilter, uno::UNO_QUERY);
+ xExporter->setSourceDocument(mxComponent);
+ SvMemoryStream aStream;
+ uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream));
+ OUString aExpectedFontName("Liberation Serif");
+ uno::Sequence<beans::PropertyValue> aFilterData{
+ comphelper::makePropertyValue("Watermark", OUString("X")),
+ comphelper::makePropertyValue("WatermarkFontName", aExpectedFontName),
+ };
+ uno::Sequence<beans::PropertyValue> aDescriptor{
+ comphelper::makePropertyValue("FilterName", OUString("writer_pdf_Export")),
+ comphelper::makePropertyValue("FilterData", aFilterData),
+ comphelper::makePropertyValue("OutputStream", xOutputStream),
+ };
+ xFilter->filter(aDescriptor);
+
+ // Then make sure that the watermark font name is correct:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(aStream.GetData(), aStream.GetSize(), OString());
+ CPPUNIT_ASSERT(pPdfDocument);
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getObjectCount());
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pPageObject = pPage->getObject(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPageObject->getFormObjectCount());
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pFormObject = pPageObject->getFormObject(0);
+ OUString aFontName = pFormObject->getFontName();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: Liberation Serif
+ // - Actual : Helvetica
+ // i.e. the font name was sans, could not specify an explicit name.
+ CPPUNIT_ASSERT_EQUAL(aExpectedFontName, aFontName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWatermarkRotateAngle)
+{
+ // Given an empty Writer document:
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+ mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
+
+ // When exporting that as PDF with a rotated watermark:
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
+ uno::Reference<document::XFilter> xFilter(
+ xFactory->createInstance("com.sun.star.document.PDFFilter"), uno::UNO_QUERY);
+ uno::Reference<document::XExporter> xExporter(xFilter, uno::UNO_QUERY);
+ xExporter->setSourceDocument(mxComponent);
+ SvMemoryStream aStream;
+ uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream));
+ // 45.0 degrees, counter-clockwise.
+ sal_Int32 nExpectedRotateAngle = 45;
+ uno::Sequence<beans::PropertyValue> aFilterData{
+ comphelper::makePropertyValue("Watermark", OUString("X")),
+ comphelper::makePropertyValue("WatermarkRotateAngle", nExpectedRotateAngle * 10),
+ };
+ uno::Sequence<beans::PropertyValue> aDescriptor{
+ comphelper::makePropertyValue("FilterName", OUString("writer_pdf_Export")),
+ comphelper::makePropertyValue("FilterData", aFilterData),
+ comphelper::makePropertyValue("OutputStream", xOutputStream),
+ };
+ xFilter->filter(aDescriptor);
+
+ // Then make sure that the watermark rotation angle is correct:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(aStream.GetData(), aStream.GetSize(), OString());
+ CPPUNIT_ASSERT(pPdfDocument);
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getObjectCount());
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pPageObject = pPage->getObject(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPageObject->getFormObjectCount());
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pFormObject = pPageObject->getFormObject(0);
+ basegfx::B2DHomMatrix aMatrix = pFormObject->getMatrix();
+ basegfx::B2DTuple aScale;
+ basegfx::B2DTuple aTranslate;
+ double fRotate{};
+ double fShearX{};
+ aMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
+ sal_Int32 nActualRotateAngle = NormAngle360(basegfx::rad2deg<1>(fRotate));
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 45
+ // - Actual : 270
+ // i.e. the rotation angle was 270 for an A4 page, not the requested 45 degrees.
+ CPPUNIT_ASSERT_EQUAL(nExpectedRotateAngle, nActualRotateAngle);
+}
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/unit/data/attributeRedefinedTest.odp b/filter/qa/unit/data/attributeRedefinedTest.odp
new file mode 100644
index 000000000000..dfb814bfb9ec
--- /dev/null
+++ b/filter/qa/unit/data/attributeRedefinedTest.odp
Binary files differ
diff --git a/filter/qa/unit/data/calc.ots b/filter/qa/unit/data/calc.ots
new file mode 100644
index 000000000000..d16d2307fee9
--- /dev/null
+++ b/filter/qa/unit/data/calc.ots
Binary files differ
diff --git a/filter/qa/unit/data/custom-bullet.fodp b/filter/qa/unit/data/custom-bullet.fodp
new file mode 100644
index 000000000000..4139260f9780
--- /dev/null
+++ b/filter/qa/unit/data/custom-bullet.fodp
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.presentation">
+ <office:automatic-styles>
+ <style:page-layout style:name="PM1">
+ <style:page-layout-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:page-width="28cm" fo:page-height="15.75cm" style:print-orientation="landscape"/>
+ </style:page-layout>
+ <style:style style:name="gr1" style:family="graphic" style:parent-style-name="standard">
+ <style:graphic-properties draw:stroke="none" svg:stroke-color="#000000" draw:fill="none" draw:fill-color="#ffffff" draw:auto-grow-height="true" draw:auto-grow-width="false" fo:max-height="0cm" fo:min-height="0cm"/>
+ </style:style>
+ <text:list-style style:name="L1">
+ <text:list-level-style-bullet text:level="1" text:bullet-char="-">
+ <style:list-level-properties text:min-label-width="0.6cm"/>
+ <style:text-properties fo:font-family="OpenSymbol" style:font-style-name="Regular" style:font-charset="x-symbol" style:use-window-font-color="true" fo:font-size="45%"/>
+ </text:list-level-style-bullet>
+ </text:list-style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Default" style:page-layout-name="PM1">
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:presentation>
+ <draw:page draw:name="page1" draw:master-page-name="Default">
+ <draw:frame draw:style-name="gr1" draw:text-style-name="P8" draw:layer="layout" svg:width="9.525cm" svg:height="0.962cm" svg:x="3.175cm" svg:y="2.54cm">
+ <draw:text-box>
+ <text:list text:style-name="L1">
+ <text:list-item>
+ <text:p>hello</text:p>
+ </text:list-item>
+ </text:list>
+ </draw:text-box>
+ </draw:frame>
+ </draw:page>
+ </office:presentation>
+ </office:body>
+</office:document>
diff --git a/filter/qa/cppunit/data/dxf/fail/.gitignore b/filter/qa/unit/data/empty.doc
index e69de29bb2d1..e69de29bb2d1 100644
--- a/filter/qa/cppunit/data/dxf/fail/.gitignore
+++ b/filter/qa/unit/data/empty.doc
diff --git a/filter/qa/cppunit/data/dxf/pass/.gitignore b/filter/qa/unit/data/empty.odp
index e69de29bb2d1..e69de29bb2d1 100644
--- a/filter/qa/cppunit/data/dxf/pass/.gitignore
+++ b/filter/qa/unit/data/empty.odp
diff --git a/filter/qa/cppunit/data/eps/fail/.gitignore b/filter/qa/unit/data/empty.ods
index e69de29bb2d1..e69de29bb2d1 100644
--- a/filter/qa/cppunit/data/eps/fail/.gitignore
+++ b/filter/qa/unit/data/empty.ods
diff --git a/filter/qa/cppunit/data/eps/pass/.gitignore b/filter/qa/unit/data/empty.odt
index e69de29bb2d1..e69de29bb2d1 100644
--- a/filter/qa/cppunit/data/eps/pass/.gitignore
+++ b/filter/qa/unit/data/empty.odt
diff --git a/filter/qa/unit/data/hybrid_calc.pdf b/filter/qa/unit/data/hybrid_calc.pdf
new file mode 100644
index 000000000000..b104113a5238
--- /dev/null
+++ b/filter/qa/unit/data/hybrid_calc.pdf
Binary files differ
diff --git a/filter/qa/unit/data/hybrid_impress.pdf b/filter/qa/unit/data/hybrid_impress.pdf
new file mode 100644
index 000000000000..78e7136211f4
--- /dev/null
+++ b/filter/qa/unit/data/hybrid_impress.pdf
Binary files differ
diff --git a/filter/qa/unit/data/hybrid_writer.pdf b/filter/qa/unit/data/hybrid_writer.pdf
new file mode 100644
index 000000000000..00cf3de44c5c
--- /dev/null
+++ b/filter/qa/unit/data/hybrid_writer.pdf
Binary files differ
diff --git a/filter/qa/unit/data/impress.otp b/filter/qa/unit/data/impress.otp
new file mode 100644
index 000000000000..199a5f9d470f
--- /dev/null
+++ b/filter/qa/unit/data/impress.otp
Binary files differ
diff --git a/filter/qa/unit/data/semi-transparent-fill.odg b/filter/qa/unit/data/semi-transparent-fill.odg
new file mode 100644
index 000000000000..713f48991bcb
--- /dev/null
+++ b/filter/qa/unit/data/semi-transparent-fill.odg
Binary files differ
diff --git a/filter/qa/unit/data/text-in-image.odp b/filter/qa/unit/data/text-in-image.odp
new file mode 100644
index 000000000000..660e27062373
--- /dev/null
+++ b/filter/qa/unit/data/text-in-image.odp
Binary files differ
diff --git a/filter/qa/unit/data/writer.ott b/filter/qa/unit/data/writer.ott
new file mode 100644
index 000000000000..1ded03150e01
--- /dev/null
+++ b/filter/qa/unit/data/writer.ott
Binary files differ
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index be11dc57c631..82dc3832e1b8 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -9,56 +9,34 @@
#include <sal/config.h>
-#include <string_view>
+#include <test/unoapixml_test.hxx>
-#include <test/bootstrapfixture.hxx>
-#include <unotest/macros_test.hxx>
-#include <test/xmltesttools.hxx>
-
-#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <comphelper/propertyvalue.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/mediadescriptor.hxx>
#include <tools/stream.hxx>
using namespace ::com::sun::star;
-constexpr OUStringLiteral DATA_DIRECTORY = u"/filter/qa/unit/data/";
-
/// SVG filter tests.
-class SvgFilterTest : public test::BootstrapFixture, public unotest::MacrosTest, public XmlTestTools
+class SvgFilterTest : public UnoApiXmlTest
{
-private:
- uno::Reference<lang::XComponent> mxComponent;
-
public:
- void setUp() override;
- void tearDown() override;
+ SvgFilterTest();
void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override;
- uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
- void load(std::u16string_view rURL);
};
-void SvgFilterTest::setUp()
-{
- test::BootstrapFixture::setUp();
-
- mxDesktop.set(frame::Desktop::create(mxComponentContext));
-}
-
-void SvgFilterTest::tearDown()
+SvgFilterTest::SvgFilterTest()
+ : UnoApiXmlTest("/filter/qa/unit/data/")
{
- if (mxComponent.is())
- mxComponent->dispose();
-
- test::BootstrapFixture::tearDown();
-}
-
-void SvgFilterTest::load(std::u16string_view rFileName)
-{
- OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
- mxComponent = loadFromDesktop(aURL);
}
void SvgFilterTest::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
@@ -68,27 +46,23 @@ void SvgFilterTest::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
CPPUNIT_TEST_FIXTURE(SvgFilterTest, testPreserveJpg)
{
-#if !defined(MACOSX)
+// On Windows, SVGFilter::filterWriterOrCalc can't get current frame to obtain selection
+#if !defined(MACOSX) && !defined(_WIN32)
// Load a document with a jpeg image in it.
- load(u"preserve-jpg.odt");
+ loadFromFile(u"preserve-jpg.odt");
// Select the image.
- dispatchCommand(getComponent(), ".uno:JumpToNextFrame", {});
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
// Export the selection to SVG.
- uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY_THROW);
- SvMemoryStream aStream;
- uno::Reference<io::XOutputStream> xOut = new utl::OOutputStreamWrapper(aStream);
- utl::MediaDescriptor aMediaDescriptor;
- aMediaDescriptor["FilterName"] <<= OUString("writer_svg_Export");
- aMediaDescriptor["SelectionOnly"] <<= true;
- aMediaDescriptor["OutputStream"] <<= xOut;
- xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
- aStream.Seek(STREAM_SEEK_TO_BEGIN);
+ saveWithParams({
+ comphelper::makePropertyValue("FilterName", u"writer_svg_Export"_ustr),
+ comphelper::makePropertyValue("SelectionOnly", true),
+ });
// Make sure that the original JPG data is reused and we don't perform a PNG re-compress.
- xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
- OUString aAttributeValue = getXPath(pXmlDoc, "//svg:image", "href");
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
+ OUString aAttributeValue = getXPath(pXmlDoc, "//svg:image"_ostr, "href"_ostr);
// Without the accompanying fix in place, this test would have failed with:
// - Expression: aAttributeValue.startsWith("data:image/jpeg")
@@ -101,31 +75,50 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testPreserveJpg)
CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentLine)
{
// Load a document with a semi-transparent line shape.
- load(u"semi-transparent-line.odg");
+ loadFromFile(u"semi-transparent-line.odg");
// Export it to SVG.
- uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY_THROW);
- SvMemoryStream aStream;
- uno::Reference<io::XOutputStream> xOut = new utl::OOutputStreamWrapper(aStream);
- utl::MediaDescriptor aMediaDescriptor;
- aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export");
- aMediaDescriptor["OutputStream"] <<= xOut;
- xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
- aStream.Seek(STREAM_SEEK_TO_BEGIN);
+ save("draw_svg_Export");
// Get the style of the group around the actual <path> element.
- xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
OUString aStyle = getXPath(
- pXmlDoc, "//svg:g[@class='com.sun.star.drawing.LineShape']/svg:g/svg:g", "style");
- OUString aPrefix("opacity: ");
+ pXmlDoc, "//svg:g[@class='com.sun.star.drawing.LineShape']/svg:g/svg:g"_ostr, "style"_ostr);
// Without the accompanying fix in place, this test would have failed, as the style was
// "mask:url(#mask1)", not "opacity: <value>".
- CPPUNIT_ASSERT(aStyle.startsWith(aPrefix));
- int nPercent = std::round(aStyle.copy(aPrefix.getLength()).toDouble() * 100);
+ CPPUNIT_ASSERT(aStyle.startsWith("opacity: ", &aStyle));
+ int nPercent = std::round(aStyle.toDouble() * 100);
// Make sure that the line is still 30% opaque, rather than completely invisible.
CPPUNIT_ASSERT_EQUAL(30, nPercent);
}
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentFillWithTransparentLine)
+{
+ // Load a document with a shape with semi-transparent fill and line
+ loadFromFile(u"semi-transparent-fill.odg");
+
+ // Export it to SVG.
+ save("draw_svg_Export");
+
+ // Get the style of the group around the actual <path> element.
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
+ OUString aStyle
+ = getXPath(pXmlDoc, "//svg:g[@class='com.sun.star.drawing.EllipseShape']/svg:g/svg:g"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(aStyle.startsWith("opacity: ", &aStyle));
+ int nPercent = std::round(aStyle.toDouble() * 100);
+ // Make sure that the line is still 50% opaque
+ CPPUNIT_ASSERT_EQUAL(50, nPercent);
+
+ // Get the stroke of the fill of the EllipseShape (it must be "none")
+ OUString aStroke = getXPath(
+ pXmlDoc, "//svg:g[@class='com.sun.star.drawing.EllipseShape']/svg:g/svg:path"_ostr,
+ "stroke"_ostr);
+ // Without the accompanying fix in place, this test would have failed, as the stroke was
+ // "rgb(255,255,255)", not "none".
+ CPPUNIT_ASSERT_EQUAL(OUString("none"), aStroke);
+}
+
CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentText)
{
// Two shapes, one with transparent text and the other one with
@@ -133,44 +126,79 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentText)
// correct transparency factor applied for the first shape.
// Load draw document with transparent text in one box
- load(u"TransparentText.odg");
+ loadFromFile(u"TransparentText.odg");
// Export to SVG.
- uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY_THROW);
-
- SvMemoryStream aStream;
- uno::Reference<io::XOutputStream> xOut = new utl::OOutputStreamWrapper(aStream);
- utl::MediaDescriptor aMediaDescriptor;
- aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export");
- aMediaDescriptor["OutputStream"] <<= xOut;
- xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
- aStream.Seek(STREAM_SEEK_TO_BEGIN);
-
- xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
+ save("draw_svg_Export");
- // We expect 2 groups of class "com.sun.star.drawing.TextShape" that
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
+ // We expect 2 groups of class "TextShape" that
// have some svg:text node inside.
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 2
// - Actual : 1
// i.e. the 2nd shape lots its text.
- assertXPath(pXmlDoc, "//svg:g[@class='com.sun.star.drawing.TextShape']//svg:text", 2);
+ assertXPath(pXmlDoc, "//svg:g[@class='TextShape']//svg:text"_ostr, 2);
// First shape has semi-transparent text.
- assertXPath(pXmlDoc, "//svg:text[1]/svg:tspan/svg:tspan/svg:tspan[@fill-opacity='0.8']");
+ assertXPath(pXmlDoc, "//svg:text[1]/svg:tspan/svg:tspan/svg:tspan[@fill-opacity='0.8']"_ostr);
// Second shape has normal text.
- assertXPath(pXmlDoc, "//svg:text[2]/svg:tspan/svg:tspan/svg:tspan[@fill-opacity]", 0);
+ assertXPath(pXmlDoc, "//svg:text[2]/svg:tspan/svg:tspan/svg:tspan[@fill-opacity]"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentMultiParaText)
+{
+ // Given a shape with semi-transparent, multi-paragraph text:
+ mxComponent
+ = loadFromDesktop("private:factory/simpress", "com.sun.star.drawing.DrawingDocument");
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(
+ xFactory->createInstance("com.sun.star.drawing.TextShape"), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XShapes> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ xDrawPage->add(xShape);
+ xShape->setSize(awt::Size(10000, 10000));
+ uno::Reference<text::XSimpleText> xShapeText(xShape, uno::UNO_QUERY);
+ uno::Reference<text::XTextCursor> xCursor = xShapeText->createTextCursor();
+ xShapeText->insertString(xCursor, "foo", /*bAbsorb=*/false);
+ xShapeText->insertControlCharacter(xCursor, text::ControlCharacter::APPEND_PARAGRAPH,
+ /*bAbsorb=*/false);
+ xShapeText->insertString(xCursor, "bar", /*bAbsorb=*/false);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ xShapeProps->setPropertyValue("CharColor", uno::Any(static_cast<sal_Int32>(0xff0000)));
+ xShapeProps->setPropertyValue("CharTransparence", uno::Any(static_cast<sal_Int16>(20)));
+
+ // When exporting to SVG:
+ save("draw_svg_Export");
+
+ // Then make sure that the two semi-transparent paragraphs have the same X position:
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
+ assertXPath(pXmlDoc, "(//svg:g[@class='TextShape']//svg:tspan[@class='TextPosition'])[1]"_ostr,
+ "x"_ostr, "250");
+ assertXPath(pXmlDoc,
+ "(//svg:g[@class='TextShape']//svg:tspan[@class='TextPosition'])[1]/svg:tspan"_ostr,
+ "fill-opacity"_ostr, "0.8");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 250
+ // - Actual : 8819
+ // i.e. the X position of the second paragraph was wrong.
+ assertXPath(pXmlDoc, "(//svg:g[@class='TextShape']//svg:tspan[@class='TextPosition'])[2]"_ostr,
+ "x"_ostr, "250");
+ assertXPath(pXmlDoc,
+ "(//svg:g[@class='TextShape']//svg:tspan[@class='TextPosition'])[2]/svg:tspan"_ostr,
+ "fill-opacity"_ostr, "0.8");
}
CPPUNIT_TEST_FIXTURE(SvgFilterTest, testShapeNographic)
{
// Load a document containing a 3D shape.
- load(u"shape-nographic.odp");
+ loadFromFile(u"shape-nographic.odp");
// Export to SVG.
- uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY_THROW);
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW);
SvMemoryStream aStream;
uno::Reference<io::XOutputStream> xOut = new utl::OOutputStreamWrapper(aStream);
utl::MediaDescriptor aMediaDescriptor;
@@ -183,6 +211,107 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testShapeNographic)
xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
}
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, testCustomBullet)
+{
+ // Given a presentation with a custom bullet:
+ loadFromFile(u"custom-bullet.fodp");
+
+ // When exporting that to SVG:
+ save("impress_svg_Export");
+
+ // Then make sure the bullet glyph is not lost:
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - XPath '//svg:g[@class='BulletChars']//svg:path' number of nodes is incorrect
+ // i.e. the custom bullet used '<use transform="scale(285,285)"
+ // xlink:href="#bullet-char-template-45"/>', but nobody produced a bullet-char-template-45,
+ // instead we need the path of the glyph inline.
+ CPPUNIT_ASSERT(
+ !getXPath(pXmlDoc, "//svg:g[@class='BulletChars']//svg:path"_ostr, "d"_ostr).isEmpty());
+}
+
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, attributeRedefinedTest)
+{
+ // Load document containing empty paragraphs with ids.
+ loadFromFile(u"attributeRedefinedTest.odp");
+
+ // Export to SVG.
+ save("impress_svg_Export");
+
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
+ // We expect four paragraph
+ // 2 empty paragraphs with ids
+ // 2 paragraphs with text
+ // Without the accompanying fix the test would have failed with
+ // Expected : 4
+ // Actual : 2
+ // i.e. 2 of the empty paragraph do not get generated even if there
+ // is id imported for the paragraphs
+ // If we don't create the empty paragraphs the id attribute gets redefined like this:
+ // <tspan id="id14" id="id15" id="id17" class="TextParagraph" font-family="Bahnschrift Light" font-size="1129px" font-weight="400">
+
+ OString xPath = "//svg:g[@class='TextShape']//svg:text[@class='SVGTextShape']//"
+ "svg:tspan[@class='TextParagraph']"_ostr;
+ assertXPath(pXmlDoc, xPath, 4);
+
+ //assert that each tspan element with TextParagraph class has id and the tspan element of
+ //each empty paragraph does not contain tspan element with class TextPosition
+ assertXPath(pXmlDoc, xPath + "[1]", "id"_ostr, "id4");
+ assertXPath(pXmlDoc, xPath + "[2]", "id"_ostr, "id5");
+ assertXPath(pXmlDoc, xPath + "[2]//svg:tspan[@class='TextPosition']", 0);
+ assertXPath(pXmlDoc, xPath + "[3]", "id"_ostr, "id6");
+ assertXPath(pXmlDoc, xPath + "[3]//svg:tspan[@class='TextPosition']", 0);
+ assertXPath(pXmlDoc, xPath + "[4]", "id"_ostr, "id7");
+}
+
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, testTab)
+{
+ // Given a shape with "A\tB" text:
+ mxComponent = loadFromDesktop("private:factory/simpress",
+ "com.sun.star.presentation.PresentationDocument");
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(
+ xFactory->createInstance("com.sun.star.drawing.TextShape"), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XShapes> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ xDrawPage->add(xShape);
+ xShape->setSize(awt::Size(10000, 10000));
+ uno::Reference<text::XTextRange> xShapeText(xShape, uno::UNO_QUERY);
+ xShapeText->setString("A\tB");
+
+ // When exporting that document to SVG:
+ save("impress_svg_Export");
+
+ // Then make sure the tab is not lost:
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 1
+ // i.e. the 2nd text portion was not positioned, which looked as if the tab is lost.
+ assertXPath(pXmlDoc, "//svg:g[@class='TextShape']//svg:tspan[@class='TextPosition']"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, textInImage)
+{
+ // Load document containing empty paragraphs with ids.
+ loadFromFile(u"text-in-image.odp");
+
+ // Export to SVG.
+ save("impress_svg_Export");
+
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
+
+ // We expect the Graphic to have an image and a text
+ assertXPath(pXmlDoc, "//svg:g[@class='Graphic']//svg:image"_ostr, 1);
+ assertXPath(pXmlDoc, "//svg:g[@class='Graphic']//svg:text"_ostr, 1);
+ // Without the accompanying fix, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/unit/textfilterdetect.cxx b/filter/qa/unit/textfilterdetect.cxx
index d66839402d9b..e578d4b88fee 100644
--- a/filter/qa/unit/textfilterdetect.cxx
+++ b/filter/qa/unit/textfilterdetect.cxx
@@ -7,14 +7,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/bootstrapfixture.hxx>
-#include <unotest/macros_test.hxx>
+#include <test/unoapi_test.hxx>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
-#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/sheet/XCellRangesAccess.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <comphelper/configuration.hxx>
#include <comphelper/propertyvalue.hxx>
+#include <officecfg/Office/Common.hxx>
+#include <osl/file.hxx>
+#include <sfx2/docfac.hxx>
#include <unotools/mediadescriptor.hxx>
#include <unotools/streamwrap.hxx>
#include <tools/stream.hxx>
@@ -28,40 +34,27 @@ using namespace com::sun::star;
namespace
{
-/// Test class for PlainTextFilterDetect.
-class TextFilterDetectTest : public test::BootstrapFixture, public unotest::MacrosTest
-{
- uno::Reference<lang::XComponent> mxComponent;
-
-public:
- void setUp() override;
- void tearDown() override;
- uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
-};
-
-void TextFilterDetectTest::setUp()
+bool supportsService(const uno::Reference<lang::XComponent>& x, const OUString& s)
{
- test::BootstrapFixture::setUp();
-
- mxDesktop.set(frame::Desktop::create(mxComponentContext));
+ return uno::Reference<lang::XServiceInfo>(x, uno::UNO_QUERY_THROW)->supportsService(s);
}
-void TextFilterDetectTest::tearDown()
+/// Test class for PlainTextFilterDetect.
+class TextFilterDetectTest : public UnoApiTest
{
- if (mxComponent.is())
- mxComponent->dispose();
-
- test::BootstrapFixture::tearDown();
-}
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/filter/qa/unit/data/";
+public:
+ TextFilterDetectTest()
+ : UnoApiTest("/filter/qa/unit/data/")
+ {
+ }
+};
CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testTdf114428)
{
uno::Reference<document::XExtendedFilterDetection> xDetect(
getMultiServiceFactory()->createInstance("com.sun.star.comp.filters.PlainTextFilterDetect"),
uno::UNO_QUERY);
- OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf114428.xhtml";
+ OUString aURL = createFileURL(u"tdf114428.xhtml");
SvFileStream aStream(aURL, StreamMode::READ);
uno::Reference<io::XInputStream> xStream(new utl::OStreamWrapper(aStream));
uno::Sequence<beans::PropertyValue> aDescriptor
@@ -79,19 +72,167 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testTdf114428)
CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile)
{
// Given an empty file, with a pptx extension
- OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "empty.pptx";
-
// When loading the file
- getComponent() = loadFromDesktop(aURL);
+ loadFromFile(u"empty.pptx");
// Then make sure it is opened in Impress.
- uno::Reference<lang::XServiceInfo> xServiceInfo(getComponent(), uno::UNO_QUERY);
- CPPUNIT_ASSERT(xServiceInfo.is());
+ // Without the accompanying fix in place, this test would have failed, as it was opened in
+ // Writer instead.
+ CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.presentation.PresentationDocument"));
+ // Now also test ODT
+ loadFromFile(u"empty.odt");
+ // Make sure it opens in Writer.
+ CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.text.TextDocument"));
+
+ // ... and ODS
+ loadFromFile(u"empty.ods");
+ // Make sure it opens in Calc.
+ CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.sheet.SpreadsheetDocument"));
+
+ // ... and ODP
+ loadFromFile(u"empty.odp");
// Without the accompanying fix in place, this test would have failed, as it was opened in
// Writer instead.
- CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument"));
+ CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.presentation.PresentationDocument"));
+
+ // ... and DOC
+ // Without the accompanying fix in place, this test would have failed, the import filter aborted
+ // loading.
+ loadFromFile(u"empty.doc");
+ CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.text.TextDocument"));
+ {
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aArgs = xModel->getArgs();
+ comphelper::SequenceAsHashMap aMap(aArgs);
+ OUString aFilterName;
+ aMap["FilterName"] >>= aFilterName;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: MS Word 97
+ // - Actual : MS WinWord 6.0
+ // i.e. opening worked, but saving back failed instead of producing a WW8 binary file.
+ CPPUNIT_ASSERT_EQUAL(OUString("MS Word 97"), aFilterName);
+ }
+
+ // Now test with default templates set
+
+ SfxObjectFactory::SetStandardTemplate("com.sun.star.presentation.PresentationDocument",
+ createFileURL(u"impress.otp"));
+ SfxObjectFactory::SetStandardTemplate("com.sun.star.text.TextDocument",
+ createFileURL(u"writer.ott"));
+ SfxObjectFactory::SetStandardTemplate("com.sun.star.sheet.SpreadsheetDocument",
+ createFileURL(u"calc.ots"));
+
+ loadFromFile(u"empty.pptx");
+ {
+ uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<drawing::XDrawPages> xPages(xDoc->getDrawPages(), uno::UNO_SET_THROW);
+ uno::Reference<drawing::XDrawPage> xPage(xPages->getByIndex(0), uno::UNO_QUERY_THROW);
+ uno::Reference<text::XTextRange> xBox(xPage->getByIndex(0), uno::UNO_QUERY_THROW);
+
+ // Make sure the template's text was loaded
+ CPPUNIT_ASSERT_EQUAL(OUString("Title of Impress template"), xBox->getString());
+ }
+
+ loadFromFile(u"empty.odt");
+ {
+ uno::Reference<text::XTextDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<container::XEnumerationAccess> xEA(xDoc->getText(), uno::UNO_QUERY_THROW);
+ uno::Reference<container::XEnumeration> xEnum(xEA->createEnumeration(), uno::UNO_SET_THROW);
+ uno::Reference<text::XTextRange> xParagraph(xEnum->nextElement(), uno::UNO_QUERY_THROW);
+
+ // Make sure the template's text was loaded
+ CPPUNIT_ASSERT_EQUAL(u"Writer template’s first line"_ustr, xParagraph->getString());
+ }
+
+ loadFromFile(u"empty.ods");
+ {
+ uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XCellRangesAccess> xRA(xDoc->getSheets(), uno::UNO_QUERY_THROW);
+ uno::Reference<text::XTextRange> xC(xRA->getCellByPosition(0, 0, 0), uno::UNO_QUERY_THROW);
+
+ // Make sure the template's text was loaded
+ CPPUNIT_ASSERT_EQUAL(u"Calc template’s first cell"_ustr, xC->getString());
+ }
+
+ loadFromFile(u"empty.odp");
+ {
+ uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<drawing::XDrawPages> xPages(xDoc->getDrawPages(), uno::UNO_SET_THROW);
+ uno::Reference<drawing::XDrawPage> xPage(xPages->getByIndex(0), uno::UNO_QUERY_THROW);
+ uno::Reference<text::XTextRange> xBox(xPage->getByIndex(0), uno::UNO_QUERY_THROW);
+
+ // Make sure the template's text was loaded
+ CPPUNIT_ASSERT_EQUAL(OUString("Title of Impress template"), xBox->getString());
+ }
+ loadFromFile(u"empty.doc");
+ {
+ uno::Reference<text::XTextDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<container::XEnumerationAccess> xEA(xDoc->getText(), uno::UNO_QUERY_THROW);
+ uno::Reference<container::XEnumeration> xEnum(xEA->createEnumeration(), uno::UNO_SET_THROW);
+ uno::Reference<text::XTextRange> xParagraph(xEnum->nextElement(), uno::UNO_QUERY_THROW);
+
+ // Make sure the template's text was loaded
+ CPPUNIT_ASSERT_EQUAL(u"Writer template’s first line"_ustr, xParagraph->getString());
+ }
+}
+
+// The unit test fails on some Linux systems. Until it is found out why the file URLs are broken
+// there, let it be Windows-only, since the original issue tested here was Windows-specific.
+// See https://lists.freedesktop.org/archives/libreoffice/2023-December/091265.html for details.
+#ifdef _WIN32
+CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testHybridPDFFile)
+{
+ // Make sure that file locking is ON
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::UseDocumentSystemFileLocking::set(true, xChanges);
+ xChanges->commit();
+ }
+
+ // Given a hybrid PDF file
+
+ {
+ // Created in Writer
+ utl::TempFileNamed nonAsciiName(u"абв_αβγ_");
+ nonAsciiName.EnableKillingFile();
+ CPPUNIT_ASSERT_EQUAL(
+ osl::FileBase::E_None,
+ osl::File::copy(createFileURL(u"hybrid_writer.pdf"), nonAsciiName.GetURL()));
+ load(nonAsciiName.GetURL());
+ // Make sure it opens in Writer.
+ // Without the accompanying fix in place, this test would have failed on Windows, as it was
+ // opened in Draw instead.
+ CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.text.TextDocument"));
+ }
+
+ {
+ // Created in Calc
+ utl::TempFileNamed nonAsciiName(u"абв_αβγ_");
+ nonAsciiName.EnableKillingFile();
+ CPPUNIT_ASSERT_EQUAL(
+ osl::FileBase::E_None,
+ osl::File::copy(createFileURL(u"hybrid_calc.pdf"), nonAsciiName.GetURL()));
+ load(nonAsciiName.GetURL());
+ // Make sure it opens in Calc.
+ CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.sheet.SpreadsheetDocument"));
+ }
+
+ {
+ // Created in Impress
+ utl::TempFileNamed nonAsciiName(u"абв_αβγ_");
+ nonAsciiName.EnableKillingFile();
+ CPPUNIT_ASSERT_EQUAL(
+ osl::FileBase::E_None,
+ osl::File::copy(createFileURL(u"hybrid_impress.pdf"), nonAsciiName.GetURL()));
+ load(nonAsciiName.GetURL());
+ // Make sure it opens in Impress.
+ CPPUNIT_ASSERT(
+ supportsService(mxComponent, "com.sun.star.presentation.PresentationDocument"));
+ }
}
+#endif // _WIN32
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx
index 4f7b4f04ca49..fe05d7f5ba2b 100644
--- a/filter/source/config/cache/basecontainer.cxx
+++ b/filter/source/config/cache/basecontainer.cxx
@@ -21,24 +21,18 @@
#include "basecontainer.hxx"
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
-#include <com/sun/star/document/FilterConfigRefresh.hpp>
#include <com/sun/star/uno/Type.h>
#include <comphelper/enumhelper.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
-#define LOAD_IMPLICIT
-
namespace filter::config{
BaseContainer::BaseContainer()
- : BaseLock ( )
- , m_pFlushCache()
- , m_eType()
- , m_lListener (m_aLock)
+ : m_eType()
{
- TheFilterCache::get().load(FilterCache::E_CONTAINS_STANDARD);
+ GetTheFilterCache().load(FilterCache::E_CONTAINS_STANDARD);
}
@@ -47,28 +41,22 @@ BaseContainer::~BaseContainer()
}
-void BaseContainer::init(const css::uno::Reference< css::uno::XComponentContext >& rxContext ,
- const OUString& sImplementationName,
+void BaseContainer::init(const OUString& sImplementationName,
const css::uno::Sequence< OUString >& lServiceNames ,
FilterCache::EItemType eType )
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
m_sImplementationName = sImplementationName;
m_lServiceNames = lServiceNames ;
m_eType = eType ;
- m_xRefreshBroadcaster = css::document::FilterConfigRefresh::create(rxContext);
// <- SAFE
}
-void BaseContainer::impl_loadOnDemand()
+void BaseContainer::impl_loadOnDemand(std::unique_lock<std::mutex>& /*rGuard*/)
{
-#ifdef LOAD_IMPLICIT
- // SAFE ->
- osl::MutexGuard aLock(m_aLock);
-
// A generic container needs all items of a set of our cache!
// Of course it can block for a while, till the cache is really filled.
// Note: don't load all sets supported by the cache here!
@@ -93,34 +81,26 @@ void BaseContainer::impl_loadOnDemand()
break;
}
- TheFilterCache::get().load(eRequiredState);
- // <- SAFE
-#endif
+ GetTheFilterCache().load(eRequiredState);
}
-void BaseContainer::impl_initFlushMode()
+void BaseContainer::impl_initFlushMode(std::unique_lock<std::mutex>& /*rGuard*/)
{
- // SAFE ->
- osl::MutexGuard aLock(m_aLock);
if (!m_pFlushCache)
- m_pFlushCache = TheFilterCache::get().clone();
+ m_pFlushCache = GetTheFilterCache().clone();
if (!m_pFlushCache)
throw css::uno::RuntimeException( "Can not create write copy of internal used cache on demand.",
- static_cast< OWeakObject* >(this));
- // <- SAFE
+ getXWeak());
}
-FilterCache* BaseContainer::impl_getWorkingCache() const
+FilterCache* BaseContainer::impl_getWorkingCache(std::unique_lock<std::mutex>& /*rGuard*/) const
{
- // SAFE ->
- osl::MutexGuard aLock(m_aLock);
if (m_pFlushCache)
return m_pFlushCache.get();
else
- return &TheFilterCache::get();
- // <- SAFE
+ return &GetTheFilterCache();
}
@@ -159,15 +139,15 @@ void SAL_CALL BaseContainer::insertByName(const OUString& sItem ,
throw css::lang::IllegalArgumentException(ex.Message, static_cast< css::container::XNameContainer* >(this), 2);
}
- impl_loadOnDemand();
-
// SAFE -> ----------------------------------
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
+
+ impl_loadOnDemand(aLock);
// create write copy of used cache on demand ...
- impl_initFlushMode();
+ impl_initFlushMode(aLock);
- FilterCache* pCache = impl_getWorkingCache();
+ FilterCache* pCache = impl_getWorkingCache(aLock);
if (pCache->hasItem(m_eType, sItem))
throw css::container::ElementExistException(OUString(), static_cast< css::container::XNameContainer* >(this));
pCache->setItem(m_eType, sItem, aItem);
@@ -177,15 +157,15 @@ void SAL_CALL BaseContainer::insertByName(const OUString& sItem ,
void SAL_CALL BaseContainer::removeByName(const OUString& sItem)
{
- impl_loadOnDemand();
-
// SAFE -> ----------------------------------
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
+
+ impl_loadOnDemand(aLock);
// create write copy of used cache on demand ...
- impl_initFlushMode();
+ impl_initFlushMode(aLock);
- FilterCache* pCache = impl_getWorkingCache();
+ FilterCache* pCache = impl_getWorkingCache(aLock);
pCache->removeItem(m_eType, sItem); // throw exceptions automatically
// <- SAFE ----------------------------------
}
@@ -209,15 +189,15 @@ void SAL_CALL BaseContainer::replaceByName(const OUString& sItem ,
throw css::lang::IllegalArgumentException(ex.Message, static_cast< css::container::XNameContainer* >(this), 2);
}
- impl_loadOnDemand();
-
// SAFE -> ----------------------------------
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
+
+ impl_loadOnDemand(aLock);
// create write copy of used cache on demand ...
- impl_initFlushMode();
+ impl_initFlushMode(aLock);
- FilterCache* pCache = impl_getWorkingCache();
+ FilterCache* pCache = impl_getWorkingCache(aLock);
if (!pCache->hasItem(m_eType, sItem))
throw css::container::NoSuchElementException(OUString(), static_cast< css::container::XNameContainer* >(this));
pCache->setItem(m_eType, sItem, aItem);
@@ -233,17 +213,15 @@ css::uno::Any SAL_CALL BaseContainer::getByName(const OUString& sItem)
css::uno::Any aValue;
- impl_loadOnDemand();
-
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
+
+ impl_loadOnDemand(aLock);
- CacheItem aItem;
try
{
- FilterCache* pCache = impl_getWorkingCache();
- aItem = pCache->getItem(m_eType, sItem);
- pCache->addStatePropsToItem(m_eType, sItem, aItem); // add implicit props "Finalized"/"Mandatory"
+ FilterCache* pCache = impl_getWorkingCache(aLock);
+ aValue = pCache->getItemWithStateProps(m_eType, sItem);
}
catch(const css::container::NoSuchElementException&)
{
@@ -252,10 +230,8 @@ css::uno::Any SAL_CALL BaseContainer::getByName(const OUString& sItem)
catch(const css::uno::Exception&)
{
// TODO invalid cache!? How should it be handled right?
- aItem.clear();
}
- aValue <<= aItem.getAsPackedPropertyValueList();
// <- SAFE
return aValue;
@@ -266,14 +242,14 @@ css::uno::Sequence< OUString > SAL_CALL BaseContainer::getElementNames()
{
css::uno::Sequence< OUString > lNames;
- impl_loadOnDemand();
-
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
+
+ impl_loadOnDemand(aLock);
try
{
- FilterCache* pCache = impl_getWorkingCache();
+ FilterCache* pCache = impl_getWorkingCache(aLock);
std::vector<OUString> lKeys = pCache->getItemNames(m_eType);
lNames = comphelper::containerToSequence(lKeys);
}
@@ -293,14 +269,14 @@ sal_Bool SAL_CALL BaseContainer::hasByName(const OUString& sItem)
{
bool bHasOne = false;
- impl_loadOnDemand();
-
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
+
+ impl_loadOnDemand(aLock);
try
{
- FilterCache* pCache = impl_getWorkingCache();
+ FilterCache* pCache = impl_getWorkingCache(aLock);
bHasOne = pCache->hasItem(m_eType, sItem);
}
catch(const css::uno::Exception&)
@@ -327,14 +303,14 @@ sal_Bool SAL_CALL BaseContainer::hasElements()
{
bool bHasSome = false;
- impl_loadOnDemand();
-
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
+
+ impl_loadOnDemand(aLock);
try
{
- FilterCache* pCache = impl_getWorkingCache();
+ FilterCache* pCache = impl_getWorkingCache(aLock);
bHasSome = pCache->hasItems(m_eType);
}
catch(const css::uno::Exception&)
@@ -353,8 +329,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::crea
{
OSL_FAIL("not pure virtual ... but not really implemented .-)");
- ::comphelper::OEnumerationByName* pEnum = new ::comphelper::OEnumerationByName(this, css::uno::Sequence< OUString >());
- return css::uno::Reference< css::container::XEnumeration >(static_cast< css::container::XEnumeration* >(pEnum), css::uno::UNO_QUERY);
+ return new ::comphelper::OEnumerationByName(this, {});
}
@@ -362,21 +337,17 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::crea
{
std::vector<OUString> lKeys;
- impl_loadOnDemand();
-
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
+
+ impl_loadOnDemand(aLock);
try
{
- // convert the given properties first to our internal representation
- CacheItem lProps;
- lProps << lProperties;
-
// search the key names of all items, where its properties match
// the given ones in its minimum
- FilterCache* pCache = impl_getWorkingCache();
- lKeys = pCache->getMatchingItemsByProps(m_eType, lProps);
+ FilterCache* pCache = impl_getWorkingCache(aLock);
+ lKeys = pCache->getMatchingItemsByProps(m_eType, std::span<const css::beans::NamedValue>( lProperties.getConstArray(), lProperties.getLength() ));
}
catch(const css::uno::Exception&)
{
@@ -397,21 +368,19 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::crea
Further its easier to work directly with the return value
instead of checking of NULL returns! */
- css::uno::Sequence< OUString > lSubSet = comphelper::containerToSequence(lKeys);
- ::comphelper::OEnumerationByName* pEnum = new ::comphelper::OEnumerationByName(this, lSubSet);
- return css::uno::Reference< css::container::XEnumeration >(static_cast< css::container::XEnumeration* >(pEnum), css::uno::UNO_QUERY);
+ return new ::comphelper::OEnumerationByName(this, std::move(lKeys));
}
void SAL_CALL BaseContainer::flush()
{
// SAFE ->
- osl::ClearableMutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
if (!m_pFlushCache)
throw css::lang::WrappedTargetRuntimeException(
"Can not guarantee cache consistency. Special flush container does not exists!",
- static_cast< OWeakObject* >(this),
+ getXWeak(),
css::uno::Any());
try
@@ -424,7 +393,7 @@ void SAL_CALL BaseContainer::flush()
If the global cache gets this information via listener,
we should remove this method!
*/
- TheFilterCache::get().takeOver(*m_pFlushCache);
+ GetTheFilterCache().takeOver(*m_pFlushCache);
}
catch(const css::uno::Exception& ex)
{
@@ -433,63 +402,30 @@ void SAL_CALL BaseContainer::flush()
// later again ...
throw css::lang::WrappedTargetRuntimeException( "Flush rejected by internal container.",
- static_cast< OWeakObject* >(this),
- css::uno::makeAny(ex));
+ getXWeak(),
+ css::uno::Any(ex));
}
m_pFlushCache.reset();
- css::uno::Reference< css::util::XRefreshable > xRefreshBroadcaster = m_xRefreshBroadcaster;
-
- aLock.clear();
- // <- SAFE
-
- if (xRefreshBroadcaster.is())
- xRefreshBroadcaster->refresh();
-
- // notify listener outside the lock!
- // The used listener helper lives if we live
- // and is threadsafe by itself.
- // Further it's not a good idea to hold the own lock
- // if an outside object is called :-)
css::lang::EventObject aSource (static_cast< css::util::XFlushable* >(this));
- ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer(cppu::UnoType<css::util::XFlushListener>::get());
- if (!pContainer)
- return;
+ m_lListener.notifyEach( aLock, &css::util::XFlushListener::flushed, aSource);
- ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
- while (pIterator.hasMoreElements())
- {
- try
- {
- // ... this pointer can be interesting to find out, where will be called as listener
- // Don't optimize it to a direct iterator cast :-)
- css::util::XFlushListener* pListener = static_cast<css::util::XFlushListener*>(pIterator.next());
- pListener->flushed(aSource);
- }
- catch(const css::uno::Exception&)
- {
- // ignore any "damaged" flush listener!
- // May its remote reference is broken ...
- pIterator.remove();
- }
- }
+ // <- SAFE
}
void SAL_CALL BaseContainer::addFlushListener(const css::uno::Reference< css::util::XFlushListener >& xListener)
{
- // no locks necessary
- // used helper lives if we live and is threadsafe by itself ...
- m_lListener.addInterface(cppu::UnoType<css::util::XFlushListener>::get(), xListener);
+ std::unique_lock g(m_aMutex);
+ m_lListener.addInterface(g, xListener);
}
void SAL_CALL BaseContainer::removeFlushListener(const css::uno::Reference< css::util::XFlushListener >& xListener)
{
- // no locks necessary
- // used helper lives if we live and is threadsafe by itself ...
- m_lListener.removeInterface(cppu::UnoType<css::util::XFlushListener>::get(), xListener);
+ std::unique_lock g(m_aMutex);
+ m_lListener.removeInterface(g, xListener);
}
} // namespace filter::config
diff --git a/filter/source/config/cache/basecontainer.hxx b/filter/source/config/cache/basecontainer.hxx
index 7ba811ccc060..f1f63b10bc42 100644
--- a/filter/source/config/cache/basecontainer.hxx
+++ b/filter/source/config/cache/basecontainer.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_BASECONTAINER_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_BASECONTAINER_HXX
+#pragma once
#include <memory>
@@ -28,7 +27,7 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XContainerQuery.hpp>
#include <com/sun/star/util/XFlushable.hpp>
-#include <cppuhelper/interfacecontainer.h>
+#include <comphelper/interfacecontainer4.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/weakref.hxx>
#include <rtl/ustring.hxx>
@@ -50,8 +49,7 @@ namespace filter::config {
present by this base class!) was full initialized inside our own
ctor as first!
*/
-class BaseContainer : public BaseLock
- , public ::cppu::WeakImplHelper< css::lang::XServiceInfo ,
+class BaseContainer : public ::cppu::WeakImplHelper< css::lang::XServiceInfo ,
css::container::XNameContainer , // => XNameReplace => XNameAccess => XElementAccess
css::container::XContainerQuery ,
css::util::XFlushable >
@@ -60,9 +58,7 @@ class BaseContainer : public BaseLock
// member
protected:
-
- // TODO
- css::uno::WeakReference< css::util::XRefreshable > m_xRefreshBroadcaster;
+ mutable std::mutex m_aMutex;
/** @short the implementation name of our derived class, which we provide
at the interface XServiceInfo of our class... */
@@ -94,7 +90,7 @@ class BaseContainer : public BaseLock
FilterCache::EItemType m_eType;
/** @short holds all listener, which are registered at this instance. */
- ::cppu::OMultiTypeInterfaceContainerHelper m_lListener;
+ comphelper::OInterfaceContainerHelper4<css::util::XFlushListener> m_lListener;
// native interface
@@ -146,10 +142,9 @@ class BaseContainer : public BaseLock
specify, which sub container of the used filter cache
must be wrapped by this container interface.
*/
- void init(const css::uno::Reference< css::uno::XComponentContext >& rxContext ,
- const OUString& sImplementationName,
- const css::uno::Sequence< OUString >& lServiceNames ,
- FilterCache::EItemType eType );
+ void init( const OUString& sImplementationName,
+ const css::uno::Sequence< OUString >& lServiceNames ,
+ FilterCache::EItemType eType );
// helper
@@ -160,7 +155,7 @@ class BaseContainer : public BaseLock
/** @short check if the underlying configuration data was already loaded
and do it if necessary automatically.
*/
- void impl_loadOnDemand();
+ void impl_loadOnDemand(std::unique_lock<std::mutex>& rGuard);
/** @short it creates the global instance m_pFilterCache, which is a copy
@@ -172,7 +167,7 @@ class BaseContainer : public BaseLock
@throws css::uno::RuntimeException
*/
- void impl_initFlushMode();
+ void impl_initFlushMode(std::unique_lock<std::mutex>& rGuard);
/** @short returns a pointer to the current used cache member.
@@ -193,7 +188,7 @@ class BaseContainer : public BaseLock
aLock.clear();
// after this point p can't b e guaranteed any longer!
*/
- FilterCache* impl_getWorkingCache() const;
+ FilterCache* impl_getWorkingCache(std::unique_lock<std::mutex>& rGuard) const;
// uno interface
@@ -258,6 +253,4 @@ class BaseContainer : public BaseLock
} // namespace filter::config
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_BASECONTAINER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/cacheitem.cxx b/filter/source/config/cache/cacheitem.cxx
index fd8af23fe3ce..dddb7d464286 100644
--- a/filter/source/config/cache/cacheitem.cxx
+++ b/filter/source/config/cache/cacheitem.cxx
@@ -33,7 +33,6 @@
namespace filter::config{
CacheItem::CacheItem()
- : SequenceAsHashMap()
{
}
@@ -41,13 +40,7 @@ CacheItem::CacheItem()
void CacheItem::update(const CacheItem& rUpdateItem)
{
for (auto const& elem : rUpdateItem)
- {
- iterator pItThis = find(elem.first);
- if (pItThis == end())
- (*this)[elem.first] = elem.second; // add new prop
- else
- pItThis->second = elem.second; // change value of existing prop
- }
+ (*this)[elem.first] = elem.second;
}
@@ -84,28 +77,35 @@ void CacheItem::validateUINames(const OUString& sActLocale)
}
-css::uno::Sequence< css::beans::PropertyValue > CacheItem::getAsPackedPropertyValueList()
+css::uno::Sequence< css::beans::PropertyValue > CacheItem::getAsPackedPropertyValueList(bool bFinalized, bool bMandatory) const
{
sal_Int32 c = static_cast<sal_Int32>(size());
sal_Int32 i = 0;
- css::uno::Sequence< css::beans::PropertyValue > lList(c);
+ css::uno::Sequence< css::beans::PropertyValue > lList(c+2);
css::beans::PropertyValue* pList = lList.getArray();
for (const_iterator pProp = begin();
pProp != end() ;
++pProp )
{
- const OUString& rName = pProp->first;
+ const OUString& rName = pProp->first.maString;
const css::uno::Any& rValue = pProp->second;
if (!rValue.hasValue())
continue;
+ assert (rName != PROPNAME_FINALIZED && rName != PROPNAME_MANDATORY);
pList[i].Name = rName ;
pList[i].Value = rValue;
++i;
}
+ pList[i].Name = PROPNAME_FINALIZED ;
+ pList[i].Value <<= bFinalized;
+ ++i;
+ pList[i].Name = PROPNAME_MANDATORY ;
+ pList[i].Value <<= bMandatory;
+ ++i;
lList.realloc(i);
return lList;
@@ -123,169 +123,159 @@ static bool isSubSet(const css::uno::Any& aSubSet,
return false;
}
- css::uno::TypeClass aTypeClass = aT1.getTypeClass();
- switch(aTypeClass)
+ if (aSubSet.hasValue() && aSet.hasValue())
{
-
- case css::uno::TypeClass_BOOLEAN :
- case css::uno::TypeClass_BYTE :
- case css::uno::TypeClass_SHORT :
- case css::uno::TypeClass_UNSIGNED_SHORT :
- case css::uno::TypeClass_LONG :
- case css::uno::TypeClass_UNSIGNED_LONG :
- case css::uno::TypeClass_HYPER :
- case css::uno::TypeClass_UNSIGNED_HYPER :
- case css::uno::TypeClass_FLOAT :
- case css::uno::TypeClass_DOUBLE :
- {
- bool bIs = (aSubSet == aSet);
- return bIs;
- }
-
-
- case css::uno::TypeClass_STRING :
+ css::uno::TypeClass aTypeClass = aT1.getTypeClass();
+ switch(aTypeClass)
{
- OUString v1;
- OUString v2;
- if (
- (aSubSet >>= v1) &&
- (aSet >>= v2)
- )
+ case css::uno::TypeClass_BOOLEAN :
+ case css::uno::TypeClass_BYTE :
+ case css::uno::TypeClass_SHORT :
+ case css::uno::TypeClass_UNSIGNED_SHORT :
+ case css::uno::TypeClass_LONG :
+ case css::uno::TypeClass_UNSIGNED_LONG :
+ case css::uno::TypeClass_HYPER :
+ case css::uno::TypeClass_UNSIGNED_HYPER :
+ case css::uno::TypeClass_FLOAT :
+ case css::uno::TypeClass_DOUBLE :
{
- bool bIs = v1 == v2;
+ bool bIs = (aSubSet == aSet);
return bIs;
}
- }
- break;
- case css::uno::TypeClass_STRUCT :
- {
- css::beans::PropertyValue p1;
- css::beans::PropertyValue p2;
+ case css::uno::TypeClass_STRING :
+ return aSubSet == aSet;
+ break;
- if (
- (aSubSet >>= p1) &&
- (aSet >>= p2)
- )
- {
- bool bIs = (p1.Name == p2.Name) && isSubSet(p1.Value, p2.Value);
- return bIs;
- }
- css::beans::NamedValue n1;
- css::beans::NamedValue n2;
-
- if (
- (aSubSet >>= n1) &&
- (aSet >>= n2)
- )
+ case css::uno::TypeClass_STRUCT :
{
- bool bIs = (n1.Name == n2.Name) && isSubSet(n1.Value, n2.Value);
- return bIs;
- }
- }
- break;
+ css::beans::PropertyValue p1;
+ css::beans::PropertyValue p2;
+ if (
+ (aSubSet >>= p1) &&
+ (aSet >>= p2)
+ )
+ {
+ bool bIs = (p1.Name == p2.Name) && isSubSet(p1.Value, p2.Value);
+ return bIs;
+ }
- case css::uno::TypeClass_SEQUENCE :
- {
- css::uno::Sequence< OUString > uno_s1;
- css::uno::Sequence< OUString > uno_s2;
-
- if (
- (aSubSet >>= uno_s1) &&
- (aSet >>= uno_s2)
- )
- {
- std::vector<OUString> stl_s1(comphelper::sequenceToContainer< std::vector<OUString> >(uno_s1));
- std::vector<OUString> stl_s2(comphelper::sequenceToContainer< std::vector<OUString> >(uno_s2));
+ css::beans::NamedValue n1;
+ css::beans::NamedValue n2;
- for (auto const& elem : stl_s1)
+ if (
+ (aSubSet >>= n1) &&
+ (aSet >>= n2)
+ )
{
- if (::std::find(stl_s2.begin(), stl_s2.end(), elem) == stl_s2.end())
- {
- return false;
- }
+ bool bIs = (n1.Name == n2.Name) && isSubSet(n1.Value, n2.Value);
+ return bIs;
}
- return true;
}
+ break;
- css::uno::Sequence< css::beans::PropertyValue > uno_p1;
- css::uno::Sequence< css::beans::PropertyValue > uno_p2;
- if (
- (aSubSet >>= uno_p1) &&
- (aSet >>= uno_p2)
- )
+ case css::uno::TypeClass_SEQUENCE :
{
- ::comphelper::SequenceAsHashMap stl_p1(uno_p1);
- ::comphelper::SequenceAsHashMap stl_p2(uno_p2);
+ css::uno::Sequence< OUString > uno_s1;
+ css::uno::Sequence< OUString > uno_s2;
- for (auto const& elem : stl_p1)
+ if (
+ (aSubSet >>= uno_s1) &&
+ (aSet >>= uno_s2)
+ )
{
- ::comphelper::SequenceAsHashMap::const_iterator it2 = stl_p2.find(elem.first);
- if (it2 == stl_p2.end())
- {
- return false;
- }
- if (!isSubSet(elem.second, it2->second))
+ auto s2Begin = uno_s2.getConstArray();
+ auto s2End = uno_s2.getConstArray() + uno_s2.getLength();
+
+ for (auto const& elem : uno_s1)
{
- return false;
+ if (::std::find(s2Begin, s2End, elem) == s2End)
+ {
+ return false;
+ }
}
+ return true;
}
- return true;
- }
- css::uno::Sequence< css::beans::NamedValue > uno_n1;
- css::uno::Sequence< css::beans::NamedValue > uno_n2;
+ css::uno::Sequence< css::beans::PropertyValue > uno_p1;
+ css::uno::Sequence< css::beans::PropertyValue > uno_p2;
- if (
- (aSubSet >>= uno_n1) &&
- (aSet >>= uno_n2)
- )
- {
- ::comphelper::SequenceAsHashMap stl_n1(uno_n1);
- ::comphelper::SequenceAsHashMap stl_n2(uno_n2);
-
- for (auto const& elem : stl_n1)
+ if (
+ (aSubSet >>= uno_p1) &&
+ (aSet >>= uno_p2)
+ )
{
- ::comphelper::SequenceAsHashMap::const_iterator it2 = stl_n2.find(elem.first);
- if (it2 == stl_n2.end())
+ ::comphelper::SequenceAsHashMap stl_p1(uno_p1);
+ ::comphelper::SequenceAsHashMap stl_p2(uno_p2);
+
+ for (auto const& elem : stl_p1)
{
- return false;
+ ::comphelper::SequenceAsHashMap::const_iterator it2 = stl_p2.find(elem.first);
+ if (it2 == stl_p2.end())
+ {
+ return false;
+ }
+ if (!isSubSet(elem.second, it2->second))
+ {
+ return false;
+ }
}
- if (!isSubSet(elem.second, it2->second))
+ return true;
+ }
+
+ css::uno::Sequence< css::beans::NamedValue > uno_n1;
+ css::uno::Sequence< css::beans::NamedValue > uno_n2;
+
+ if (
+ (aSubSet >>= uno_n1) &&
+ (aSet >>= uno_n2)
+ )
+ {
+ ::comphelper::SequenceAsHashMap stl_n1(uno_n1);
+ ::comphelper::SequenceAsHashMap stl_n2(uno_n2);
+
+ for (auto const& elem : stl_n1)
{
- return false;
+ ::comphelper::SequenceAsHashMap::const_iterator it2 = stl_n2.find(elem.first);
+ if (it2 == stl_n2.end())
+ {
+ return false;
+ }
+ if (!isSubSet(elem.second, it2->second))
+ {
+ return false;
+ }
}
+ return true;
}
- return true;
}
+ break;
+ default: break;
}
- break;
- default: break;
}
-
OSL_FAIL("isSubSet() ... this point should not be reached!");
return false;
}
-bool CacheItem::haveProps(const CacheItem& lProps) const
+bool CacheItem::haveProps(std::span< const css::beans::NamedValue > lProps) const
{
for (auto const& prop : lProps)
{
// i) one required property does not exist at this item => return false
- const_iterator pItThis = find(prop.first);
+ const_iterator pItThis = find(prop.Name);
if (pItThis == end())
{
return false;
}
// ii) one item does not have the right value => return false
- if (!isSubSet(prop.second, pItThis->second))
+ if (!isSubSet(prop.Value, pItThis->second))
{
return false;
}
@@ -298,7 +288,7 @@ bool CacheItem::haveProps(const CacheItem& lProps) const
}
-bool CacheItem::dontHaveProps(const CacheItem& lProps) const
+bool CacheItem::dontHaveProps(std::span< const css::beans::NamedValue > lProps) const
{
for (auto const& prop : lProps)
{
@@ -306,7 +296,7 @@ bool CacheItem::dontHaveProps(const CacheItem& lProps) const
// => continue with next one, because
// "excluding" means... "don't have it".
// And "not exists" matches to "don't have it".
- const_iterator pItThis = find(prop.first);
+ const_iterator pItThis = find(prop.Name);
if (pItThis == end())
{
continue;
@@ -315,7 +305,7 @@ bool CacheItem::dontHaveProps(const CacheItem& lProps) const
// ii) one item have the right value => return false
// because this item has the requested property...
// But we checked for "don't have it" here.
- if (isSubSet(prop.second, pItThis->second))
+ if (isSubSet(prop.Value, pItThis->second))
{
return false;
}
diff --git a/filter/source/config/cache/cacheitem.hxx b/filter/source/config/cache/cacheitem.hxx
index aeaaf3a83afb..9ed263442150 100644
--- a/filter/source/config/cache/cacheitem.hxx
+++ b/filter/source/config/cache/cacheitem.hxx
@@ -17,33 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CACHEITEM_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CACHEITEM_HXX
+#pragma once
+#include <span>
#include <unordered_map>
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <vector>
#include <comphelper/sequenceashashmap.hxx>
-#include <osl/mutex.hxx>
-
namespace filter::config {
-/** @short Must be used as first derived base class
- to get a full initialized mutex member,
- which can be used during the ctor runs too!
- */
-struct BaseLock
-{
- public:
-
- // must be mutable to be usable in const environments too!
- mutable ::osl::Mutex m_aLock;
-};
-
-
/** @short represent an item of a FilterCache
instance.
@@ -89,7 +74,7 @@ class CacheItem : public ::comphelper::SequenceAsHashMap
@return sal_True if all given properties exists
at this item; sal_False otherwise.
*/
- bool haveProps(const CacheItem& lProps) const;
+ bool haveProps(std::span< const css::beans::NamedValue > lProps) const;
/** @short check, if the given properties don't exist
@@ -105,7 +90,7 @@ class CacheItem : public ::comphelper::SequenceAsHashMap
@return sal_False if at least on property exists at this item(!);
sal_True otherwise.
*/
- bool dontHaveProps(const CacheItem& lProps) const;
+ bool dontHaveProps(std::span< const css::beans::NamedValue > lProps) const;
/** @short because we know two UIName properties
@@ -133,7 +118,7 @@ class CacheItem : public ::comphelper::SequenceAsHashMap
as a list of all properties of this cacheitem,
where empty properties was removed.
*/
- css::uno::Sequence< css::beans::PropertyValue > getAsPackedPropertyValueList();
+ css::uno::Sequence< css::beans::PropertyValue > getAsPackedPropertyValueList(bool bFinalized, bool bMandatory) const;
};
@@ -189,6 +174,4 @@ typedef ::std::vector< FlatDetectionInfo > FlatDetection;
} // namespace filter::config
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CACHEITEM_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/cacheupdatelistener.cxx b/filter/source/config/cache/cacheupdatelistener.cxx
index 4a20d29dcb14..c613d0549185 100644
--- a/filter/source/config/cache/cacheupdatelistener.cxx
+++ b/filter/source/config/cache/cacheupdatelistener.cxx
@@ -19,23 +19,23 @@
#include "cacheupdatelistener.hxx"
+#include "configflush.hxx"
#include <com/sun/star/util/XChangesNotifier.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
-#include <com/sun/star/document/FilterConfigRefresh.hpp>
#include <unotools/configpaths.hxx>
#include <rtl/ustring.hxx>
#include <comphelper/processfactory.hxx>
+#include <utility>
namespace filter::config{
CacheUpdateListener::CacheUpdateListener(FilterCache &rFilterCache,
- const css::uno::Reference< css::uno::XInterface >& xConfigAccess,
+ css::uno::Reference< css::uno::XInterface > xConfigAccess,
FilterCache::EItemType eConfigType)
- : BaseLock()
- , m_rCache(rFilterCache)
- , m_xConfig(xConfigAccess)
+ : m_rCache(rFilterCache)
+ , m_xConfig(std::move(xConfigAccess))
, m_eConfigType(eConfigType)
{
}
@@ -47,15 +47,15 @@ CacheUpdateListener::~CacheUpdateListener()
void CacheUpdateListener::startListening()
{
// SAFE ->
- osl::ClearableMutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
css::uno::Reference< css::util::XChangesNotifier > xNotifier(m_xConfig, css::uno::UNO_QUERY);
- aLock.clear();
+ aLock.unlock();
// <- SAFE
if (!xNotifier.is())
return;
- css::uno::Reference< css::util::XChangesListener > xThis(static_cast< css::util::XChangesListener* >(this), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::util::XChangesListener > xThis(this);
xNotifier->addChangesListener(xThis);
}
@@ -63,15 +63,15 @@ void CacheUpdateListener::startListening()
void CacheUpdateListener::stopListening()
{
// SAFE ->
- osl::ClearableMutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
css::uno::Reference< css::util::XChangesNotifier > xNotifier(m_xConfig, css::uno::UNO_QUERY);
- aLock.clear();
+ aLock.unlock();
// <- SAFE
if (!xNotifier.is())
return;
- css::uno::Reference< css::util::XChangesListener > xThis(static_cast< css::util::XChangesListener* >(this), css::uno::UNO_QUERY);
+ css::uno::Reference< css::util::XChangesListener > xThis(this);
xNotifier->removeChangesListener(xThis);
}
@@ -79,7 +79,7 @@ void CacheUpdateListener::stopListening()
void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEvent& aEvent)
{
// SAFE ->
- osl::ClearableMutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
// disposed ?
if ( ! m_xConfig.is())
@@ -87,7 +87,7 @@ void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEven
FilterCache::EItemType eType = m_eConfigType;
- aLock.clear();
+ aLock.unlock();
// <- SAFE
std::vector<OUString> lChangedItems;
@@ -162,9 +162,7 @@ void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEven
// notify sfx cache about the changed filter cache .-)
if (bNotifyRefresh)
{
- css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
- css::uno::Reference< css::util::XRefreshable > xRefreshBroadcaster =
- css::document::FilterConfigRefresh::create(xContext);
+ rtl::Reference< ConfigFlush > xRefreshBroadcaster = new ConfigFlush();
xRefreshBroadcaster->refresh();
}
}
@@ -173,7 +171,7 @@ void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEven
void SAL_CALL CacheUpdateListener::disposing(const css::lang::EventObject& aEvent)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
if (aEvent.Source == m_xConfig)
m_xConfig.clear();
// <- SAFE
diff --git a/filter/source/config/cache/cacheupdatelistener.hxx b/filter/source/config/cache/cacheupdatelistener.hxx
index 714e4016ba51..3870b9916859 100644
--- a/filter/source/config/cache/cacheupdatelistener.hxx
+++ b/filter/source/config/cache/cacheupdatelistener.hxx
@@ -16,12 +16,12 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CACHEUPDATELISTENER_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CACHEUPDATELISTENER_HXX
+#pragma once
#include "filtercache.hxx"
#include <com/sun/star/util/XChangesListener.hpp>
#include <cppuhelper/implbase.hxx>
+#include <mutex>
namespace filter::config {
@@ -31,14 +31,15 @@ namespace filter::config {
global filter cache, if the underlying configuration
wa changed by other processes.
*/
-class CacheUpdateListener : public BaseLock // must be the first one to guarantee right initialized mutex member!
- , public ::cppu::WeakImplHelper< css::util::XChangesListener >
+class CacheUpdateListener : public ::cppu::WeakImplHelper< css::util::XChangesListener >
{
// member
private:
+ std::mutex m_aMutex;
+
/** @short reference to the singleton(!) filter cache implementation,
which should be updated by this thread. */
FilterCache &m_rCache;
@@ -74,7 +75,7 @@ class CacheUpdateListener : public BaseLock // must be the first one to guarante
specify the type of configuration.
*/
CacheUpdateListener(FilterCache &rFilterCache,
- const css::uno::Reference< css::uno::XInterface >& xConfigAccess,
+ css::uno::Reference< css::uno::XInterface > xConfigAccess,
FilterCache::EItemType eConfigType);
@@ -109,6 +110,4 @@ class CacheUpdateListener : public BaseLock // must be the first one to guarante
} // namespace filter::config
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CACHEUPDATELISTENER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/configflush.cxx b/filter/source/config/cache/configflush.cxx
index f3f114b90ca2..ed4da6d71185 100644
--- a/filter/source/config/cache/configflush.cxx
+++ b/filter/source/config/cache/configflush.cxx
@@ -26,8 +26,6 @@
namespace filter::config{
ConfigFlush::ConfigFlush()
- : BaseLock ( )
- , m_lListener(m_aLock)
{
}
@@ -58,46 +56,25 @@ void SAL_CALL ConfigFlush::refresh()
// and is threadsafe by itself.
// Further it's not a good idea to hold the own lock
// if an outside object is called :-)
- css::lang::EventObject aSource (static_cast< css::util::XRefreshable* >(this));
- ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer(cppu::UnoType<css::util::XRefreshListener>::get());
- if (!pContainer)
+ std::unique_lock g(m_aMutex);
+ if (!m_aRefreshListeners.getLength(g))
return;
-
- ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
- while (pIterator.hasMoreElements())
- {
- try
- {
- // ... this pointer can be interesting to find out, where will be called as listener
- // Don't optimize it to a direct iterator cast :-)
- css::util::XRefreshListener* pListener = static_cast<css::util::XRefreshListener*>(pIterator.next());
- pListener->refreshed(aSource);
- }
- catch(const css::uno::Exception&)
- {
- // ignore any "damaged" flush listener!
- // May its remote reference is broken ...
- pIterator.remove();
- }
- }
+ css::lang::EventObject aSource(static_cast< css::util::XRefreshable* >(this));
+ m_aRefreshListeners.notifyEach(g, &css::util::XRefreshListener::refreshed, aSource);
}
void SAL_CALL ConfigFlush::addRefreshListener(const css::uno::Reference< css::util::XRefreshListener >& xListener)
{
- // no locks necessary
- // used helper lives if we live and is threadsafe by itself ...
- m_lListener.addInterface(cppu::UnoType<css::util::XRefreshListener>::get(),
- xListener);
+ std::unique_lock g(m_aMutex);
+ m_aRefreshListeners.addInterface(g, xListener);
}
void SAL_CALL ConfigFlush::removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener >& xListener)
{
- // no locks necessary
- // used helper lives if we live and is threadsafe by itself ...
- m_lListener.removeInterface(cppu::UnoType<css::util::XRefreshListener>::get(),
- xListener);
+ std::unique_lock g(m_aMutex);
+ m_aRefreshListeners.removeInterface(g, xListener);
}
@@ -107,7 +84,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
filter_ConfigFlush_get_implementation(
css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new filter::config::ConfigFlush()));
+ return cppu::acquire(new filter::config::ConfigFlush());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/configflush.hxx b/filter/source/config/cache/configflush.hxx
index f3e284556681..ba20c9e9d505 100644
--- a/filter/source/config/cache/configflush.hxx
+++ b/filter/source/config/cache/configflush.hxx
@@ -16,13 +16,11 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONFIGFLUSH_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONFIGFLUSH_HXX
+#pragma once
-#include "cacheitem.hxx"
#include <com/sun/star/util/XRefreshable.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <cppuhelper/interfacecontainer.h>
+#include <comphelper/interfacecontainer4.hxx>
#include <cppuhelper/implbase.hxx>
@@ -35,14 +33,14 @@ namespace filter::config {
@descr Such refresh listener will be called in case the
type/filter configuration will be changed at runtime.
*/
-class ConfigFlush final : public BaseLock
- , public ::cppu::WeakImplHelper<
+class ConfigFlush final : public ::cppu::WeakImplHelper<
css::util::XRefreshable,
css::lang::XServiceInfo
>
{
- /** @short holds all listener, which are registered at this instance. */
- ::cppu::OMultiTypeInterfaceContainerHelper m_lListener;
+ std::mutex m_aMutex;
+ /** @short holds all listener, which are registered at this instance. */
+ comphelper::OInterfaceContainerHelper4<css::util::XRefreshListener> m_aRefreshListeners;
// native interface
@@ -87,6 +85,4 @@ class ConfigFlush final : public BaseLock
} // namespace filter::config
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONFIGFLUSH_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/constant.hxx b/filter/source/config/cache/constant.hxx
index 820c16953831..a371fccf406e 100644
--- a/filter/source/config/cache/constant.hxx
+++ b/filter/source/config/cache/constant.hxx
@@ -16,71 +16,66 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONSTANT_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONSTANT_HXX
-
-/* disable impl_loadOnDemand function of BaseContainer for certain
- functions, where it the feature "impl_loadItemOnDemand() of class FilterCache
- can be used instead of loadAll()!*/
-// #define LOAD_IMPLICIT
+#pragma once
+#include <rtl/ustring.hxx>
/** @short used to identify a some generic item properties against the
configuration API and can be used at all name containers
(based on this filtercache) too.
*/
-#define PROPNAME_NAME "Name"
+inline constexpr OUString PROPNAME_NAME = u"Name"_ustr;
/** @short used to identify a type item property against the
configuration API and can be used at all name containers
(based on this filtercache) too.
*/
-#define PROPNAME_UINAME "UIName"
-#define PROPNAME_UINAMES "UINames"
-#define PROPNAME_PREFERRED "Preferred"
-#define PROPNAME_PREFERREDFILTER "PreferredFilter"
-#define PROPNAME_DETECTSERVICE "DetectService"
-#define PROPNAME_MEDIATYPE "MediaType"
-#define PROPNAME_CLIPBOARDFORMAT "ClipboardFormat"
-#define PROPNAME_URLPATTERN "URLPattern"
-#define PROPNAME_EXTENSIONS "Extensions"
+inline constexpr OUString PROPNAME_UINAME = u"UIName"_ustr;
+inline constexpr OUString PROPNAME_UINAMES = u"UINames"_ustr;
+inline constexpr OUString PROPNAME_PREFERRED = u"Preferred"_ustr;
+inline constexpr OUString PROPNAME_PREFERREDFILTER = u"PreferredFilter"_ustr;
+inline constexpr OUString PROPNAME_DETECTSERVICE = u"DetectService"_ustr;
+inline constexpr OUString PROPNAME_MEDIATYPE = u"MediaType"_ustr;
+inline constexpr OUString PROPNAME_CLIPBOARDFORMAT = u"ClipboardFormat"_ustr;
+inline constexpr OUString PROPNAME_URLPATTERN = u"URLPattern"_ustr;
+inline constexpr OUString PROPNAME_EXTENSIONS = u"Extensions"_ustr;
/** @short used to identify a filter item property against the
configuration API and can be used at all name containers
(based on this filtercache) too.
*/
-#define PROPNAME_TYPE "Type"
-#define PROPNAME_DOCUMENTSERVICE "DocumentService"
-#define PROPNAME_FILTERSERVICE "FilterService"
-#define PROPNAME_UICOMPONENT "UIComponent"
-#define PROPNAME_FLAGS "Flags"
-#define PROPNAME_USERDATA "UserData"
-#define PROPNAME_TEMPLATENAME "TemplateName"
-#define PROPNAME_FILEFORMATVERSION "FileFormatVersion"
-#define PROPNAME_EXPORTEXTENSION "ExportExtension"
-#define PROPNAME_ENABLED "Enabled"
+inline constexpr OUString PROPNAME_TYPE = u"Type"_ustr;
+inline constexpr OUString PROPNAME_DOCUMENTSERVICE = u"DocumentService"_ustr;
+inline constexpr OUString PROPNAME_FILTERSERVICE = u"FilterService"_ustr;
+inline constexpr OUString PROPNAME_UICOMPONENT = u"UIComponent"_ustr;
+inline constexpr OUString PROPNAME_FLAGS = u"Flags"_ustr;
+inline constexpr OUString PROPNAME_USERDATA = u"UserData"_ustr;
+inline constexpr OUString PROPNAME_TEMPLATENAME = u"TemplateName"_ustr;
+inline constexpr OUString PROPNAME_FILEFORMATVERSION = u"FileFormatVersion"_ustr;
+inline constexpr OUString PROPNAME_EXPORTEXTENSION = u"ExportExtension"_ustr;
+inline constexpr OUString PROPNAME_ENABLED = u"Enabled"_ustr;
/** @short used to identify a frame loader or detect service item
property against the configuration API and can be used
at all name containers (based on this filtercache) too.
*/
-#define PROPNAME_TYPES "Types"
+inline constexpr OUString PROPNAME_TYPES = u"Types"_ustr;
/** @short used to identify the list of sorted filters for a specific
office module
*/
-#define PROPNAME_SORTEDFILTERLIST "SortedFilterList"
+inline constexpr OUString PROPNAME_SORTEDFILTERLIST = u"SortedFilterList"_ustr;
/** @short implicit properties. which are used at the container interface only.
*/
-#define PROPNAME_FINALIZED "Finalized"
-#define PROPNAME_MANDATORY "Mandatory"
+inline constexpr OUString PROPNAME_FINALIZED = u"Finalized"_ustr;
+inline constexpr OUString PROPNAME_MANDATORY = u"Mandatory"_ustr;
/** @short used to identify a set of items against the configuration API. */
-#define CFGSET_TYPES "Types"
-#define CFGSET_FILTERS "Filters"
-#define CFGSET_FRAMELOADERS "FrameLoaders"
-#define CFGSET_CONTENTHANDLERS "ContentHandlers"
+inline constexpr OUString CFGSET_TYPES = u"Types"_ustr;
+inline constexpr OUString CFGSET_FILTERS = u"Filters"_ustr;
+inline constexpr OUString CFGSET_FRAMELOADERS = u"FrameLoaders"_ustr;
+inline constexpr OUString CFGSET_CONTENTHANDLERS = u"ContentHandlers"_ustr;
/** @short used to address some configuration keys directly.
@@ -89,8 +84,8 @@
@TODO define these direct keys ...
*/
-#define CFGDIRECTKEY_OFFICELOCALE "/org.openoffice.Setup/L10N/ooLocale"
-#define CFGDIRECTKEY_DEFAULTFRAMELOADER "/org.openoffice.TypeDetection.Misc/Defaults/DefaultFrameLoader"
+inline constexpr OUString CFGDIRECTKEY_OFFICELOCALE = u"/org.openoffice.Setup/L10N/ooLocale"_ustr;
+inline constexpr OUString CFGDIRECTKEY_DEFAULTFRAMELOADER = u"/org.openoffice.TypeDetection.Misc/Defaults/DefaultFrameLoader"_ustr;
#define CFGDIRECTKEY_PRODUCTNAME "/org.openoffice.Setup/Product/ooName"
// Note that these flag bits have parallel names in
@@ -98,58 +93,55 @@
// documentation on their meaning.
/** @short names of filter flags, sorted in alphabetical order */
-#define FLAGNAME_3RDPARTYFILTER "3RDPARTYFILTER"
-#define FLAGNAME_ALIEN "ALIEN"
-#define FLAGNAME_CONSULTSERVICE "CONSULTSERVICE"
-#define FLAGNAME_DEFAULT "DEFAULT"
-#define FLAGNAME_ENCRYPTION "ENCRYPTION"
-#define FLAGNAME_EXPORT "EXPORT"
-#define FLAGNAME_GPGENCRYPTION "GPGENCRYPTION"
-#define FLAGNAME_IMPORT "IMPORT"
-#define FLAGNAME_INTERNAL "INTERNAL"
-#define FLAGNAME_NOTINFILEDIALOG "NOTINFILEDIALOG"
-#define FLAGNAME_NOTINSTALLED "NOTINSTALLED"
-#define FLAGNAME_OWN "OWN"
-#define FLAGNAME_PACKED "PACKED"
-#define FLAGNAME_PASSWORDTOMODIFY "PASSWORDTOMODIFY"
-#define FLAGNAME_PREFERRED "PREFERRED"
-#define FLAGNAME_STARTPRESENTATION "STARTPRESENTATION"
-#define FLAGNAME_READONLY "READONLY"
-#define FLAGNAME_SUPPORTSSELECTION "SUPPORTSSELECTION"
-#define FLAGNAME_TEMPLATE "TEMPLATE"
-#define FLAGNAME_TEMPLATEPATH "TEMPLATEPATH"
-#define FLAGNAME_COMBINED "COMBINED"
-#define FLAGNAME_SUPPORTSSIGNING "SUPPORTSSIGNING"
-#define FLAGNAME_EXOTIC "EXOTIC"
+inline constexpr OUString FLAGNAME_3RDPARTYFILTER = u"3RDPARTYFILTER"_ustr;
+inline constexpr OUString FLAGNAME_ALIEN = u"ALIEN"_ustr;
+inline constexpr OUString FLAGNAME_CONSULTSERVICE = u"CONSULTSERVICE"_ustr;
+inline constexpr OUString FLAGNAME_DEFAULT = u"DEFAULT"_ustr;
+inline constexpr OUString FLAGNAME_ENCRYPTION = u"ENCRYPTION"_ustr;
+inline constexpr OUString FLAGNAME_EXPORT = u"EXPORT"_ustr;
+inline constexpr OUString FLAGNAME_GPGENCRYPTION = u"GPGENCRYPTION"_ustr;
+inline constexpr OUString FLAGNAME_IMPORT = u"IMPORT"_ustr;
+inline constexpr OUString FLAGNAME_INTERNAL = u"INTERNAL"_ustr;
+inline constexpr OUString FLAGNAME_NOTINFILEDIALOG = u"NOTINFILEDIALOG"_ustr;
+inline constexpr OUString FLAGNAME_NOTINSTALLED = u"NOTINSTALLED"_ustr;
+inline constexpr OUString FLAGNAME_OWN = u"OWN"_ustr;
+inline constexpr OUString FLAGNAME_PACKED = u"PACKED"_ustr;
+inline constexpr OUString FLAGNAME_PASSWORDTOMODIFY = u"PASSWORDTOMODIFY"_ustr;
+inline constexpr OUString FLAGNAME_PREFERRED = u"PREFERRED"_ustr;
+inline constexpr OUString FLAGNAME_STARTPRESENTATION = u"STARTPRESENTATION"_ustr;
+inline constexpr OUString FLAGNAME_READONLY = u"READONLY"_ustr;
+inline constexpr OUString FLAGNAME_SUPPORTSSELECTION = u"SUPPORTSSELECTION"_ustr;
+inline constexpr OUString FLAGNAME_TEMPLATE = u"TEMPLATE"_ustr;
+inline constexpr OUString FLAGNAME_TEMPLATEPATH = u"TEMPLATEPATH"_ustr;
+inline constexpr OUString FLAGNAME_COMBINED = u"COMBINED"_ustr;
+inline constexpr OUString FLAGNAME_SUPPORTSSIGNING = u"SUPPORTSSIGNING"_ustr;
+inline constexpr OUString FLAGNAME_EXOTIC = u"EXOTIC"_ustr;
/** @short some uno service names.
*/
-#define SERVICE_CONFIGURATIONUPDATEACCESS "com.sun.star.configuration.ConfigurationUpdateAccess"
-#define SERVICE_CONFIGURATIONACCESS "com.sun.star.configuration.ConfigurationAccess"
+inline constexpr OUString SERVICE_CONFIGURATIONUPDATEACCESS = u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr;
+inline constexpr OUString SERVICE_CONFIGURATIONACCESS = u"com.sun.star.configuration.ConfigurationAccess"_ustr;
/** @short some configuration paths.
*/
-#define CFGPACKAGE_TD_TYPES "/org.openoffice.TypeDetection.Types"
-#define CFGPACKAGE_TD_FILTERS "/org.openoffice.TypeDetection.Filter"
-#define CFGPACKAGE_TD_OTHERS "/org.openoffice.TypeDetection.Misc"
-#define CFGPACKAGE_TD_OLD "/org.openoffice.Office.TypeDetection"
+inline constexpr OUString CFGPACKAGE_TD_TYPES = u"/org.openoffice.TypeDetection.Types"_ustr;
+inline constexpr OUString CFGPACKAGE_TD_FILTERS = u"/org.openoffice.TypeDetection.Filter"_ustr;
+inline constexpr OUString CFGPACKAGE_TD_OTHERS = u"/org.openoffice.TypeDetection.Misc"_ustr;
+inline constexpr OUString CFGPACKAGE_TD_OLD = u"/org.openoffice.Office.TypeDetection"_ustr;
/** @short some default values.
*/
-#define DEFAULT_OFFICELOCALE "en-US"
+inline constexpr OUString DEFAULT_OFFICELOCALE = u"en-US"_ustr;
/** @short used for the queries of the FilterFactory service.
*/
-#define QUERY_IDENTIFIER_MATCHBYDOCUMENTSERVICE "matchByDocumentService"
-#define QUERY_IDENTIFIER_GETPREFERREDFILTERFORTYPE "getDefaultFilterForType"
-#define QUERY_IDENTIFIER_GET_SORTED_FILTERLIST "getSortedFilterList()"
-
-#define QUERY_PARAM_IFLAGS "iflags"
-#define QUERY_PARAM_EFLAGS "eflags"
-#define QUERY_PARAM_MODULE "module"
-#define QUERY_PARAM_DEFAULTFIRST "default_first"
-#define QUERY_CONSTVALUE_ALL "all"
+inline constexpr OUString QUERY_IDENTIFIER_MATCHBYDOCUMENTSERVICE = u"matchByDocumentService"_ustr;
+inline constexpr OUString QUERY_IDENTIFIER_GETPREFERREDFILTERFORTYPE = u"getDefaultFilterForType"_ustr;
+inline constexpr OUString QUERY_IDENTIFIER_GET_SORTED_FILTERLIST = u"getSortedFilterList()"_ustr;
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONSTANT_HXX
+inline constexpr OUString QUERY_PARAM_IFLAGS = u"iflags"_ustr;
+inline constexpr OUString QUERY_PARAM_EFLAGS = u"eflags"_ustr;
+inline constexpr OUString QUERY_PARAM_MODULE = u"module"_ustr;
+#define QUERY_CONSTVALUE_ALL "all"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/contenthandlerfactory.cxx b/filter/source/config/cache/contenthandlerfactory.cxx
index a5140acdbed2..f844362b6907 100644
--- a/filter/source/config/cache/contenthandlerfactory.cxx
+++ b/filter/source/config/cache/contenthandlerfactory.cxx
@@ -29,8 +29,7 @@ namespace filter::config{
ContentHandlerFactory::ContentHandlerFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext)
: m_xContext(rxContext)
{
- BaseContainer::init(rxContext ,
- "com.sun.star.comp.filter.config.ContentHandlerFactory" ,
+ BaseContainer::init("com.sun.star.comp.filter.config.ContentHandlerFactory" ,
{ "com.sun.star.frame.ContentHandlerFactory" },
FilterCache::E_CONTENTHANDLER );
}
@@ -53,9 +52,9 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::crea
css::uno::Reference< css::uno::XInterface > xHandler;
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
- auto & cache = TheFilterCache::get();
+ auto & cache = GetTheFilterCache();
// search handler on cache
CacheItem aHandler = cache.getItem(FilterCache::E_CONTENTHANDLER, sHandler);
@@ -75,7 +74,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::crea
aHandler >> lConfig;
::std::vector< css::uno::Any > stlArguments(comphelper::sequenceToContainer< ::std::vector< css::uno::Any > >(lArguments));
- stlArguments.insert(stlArguments.begin(), css::uno::makeAny(lConfig));
+ stlArguments.insert(stlArguments.begin(), css::uno::Any(lConfig));
xInit->initialize(comphelper::containerToSequence(stlArguments));
}
diff --git a/filter/source/config/cache/contenthandlerfactory.hxx b/filter/source/config/cache/contenthandlerfactory.hxx
index bc6f17ba4b45..5c3ecd76019c 100644
--- a/filter/source/config/cache/contenthandlerfactory.hxx
+++ b/filter/source/config/cache/contenthandlerfactory.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONTENTHANDLERFACTORY_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONTENTHANDLERFACTORY_HXX
+#pragma once
#include "basecontainer.hxx"
#include <com/sun/star/frame/XLoaderFactory.hpp>
@@ -97,6 +96,4 @@ class ContentHandlerFactory : public ::cppu::ImplInheritanceHelper< BaseContaine
} // namespace filter::config
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONTENTHANDLERFACTORY_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index b3ac1594fade..2abf11a5ada9 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -19,7 +19,7 @@
#include <memory>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include "filtercache.hxx"
#include "constant.hxx"
#include "cacheupdatelistener.hxx"
@@ -51,13 +51,13 @@
#include <i18nlangtag/languagetag.hxx>
#include <officecfg/Setup.hxx>
+#include <o3tl/string_view.hxx>
namespace filter::config{
FilterCache::FilterCache()
- : BaseLock ( )
- , m_eFillState(E_CONTAINS_NOTHING )
+ : m_eFillState(E_CONTAINS_NOTHING )
{
int i = 0;
OUString sStandardProps[10];
@@ -119,7 +119,7 @@ FilterCache::~FilterCache()
std::unique_ptr<FilterCache> FilterCache::clone() const
{
// SAFE -> ----------------------------------
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
auto pClone = std::make_unique<FilterCache>();
@@ -151,7 +151,7 @@ std::unique_ptr<FilterCache> FilterCache::clone() const
void FilterCache::takeOver(const FilterCache& rClone)
{
// SAFE -> ----------------------------------
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// a)
// Don't copy the configuration access points here!
@@ -199,7 +199,7 @@ void FilterCache::takeOver(const FilterCache& rClone)
void FilterCache::load(EFillState eRequired)
{
// SAFE -> ----------------------------------
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// check if required fill state is already reached ...
// There is nothing to do then.
@@ -238,18 +238,18 @@ void FilterCache::load(EFillState eRequired)
bool FilterCache::isFillState(FilterCache::EFillState eState) const
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
return ((m_eFillState & eState) == eState);
// <- SAFE
}
std::vector<OUString> FilterCache::getMatchingItemsByProps( EItemType eType ,
- const CacheItem& lIProps,
- const CacheItem& lEProps) const
+ std::span< const css::beans::NamedValue > lIProps,
+ std::span< const css::beans::NamedValue > lEProps) const
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// search for right list
// An exception is thrown - "eType" is unknown.
@@ -257,6 +257,7 @@ std::vector<OUString> FilterCache::getMatchingItemsByProps( EItemType eTyp
const CacheItemList& rList = impl_getItemList(eType);
std::vector<OUString> lKeys;
+ lKeys.reserve(rList.size());
// search items, which provides all needed properties of set "lIProps"
// but not of set "lEProps"!
@@ -279,7 +280,7 @@ std::vector<OUString> FilterCache::getMatchingItemsByProps( EItemType eTyp
bool FilterCache::hasItems(EItemType eType) const
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// search for right list
// An exception is thrown - "eType" is unknown.
@@ -294,7 +295,7 @@ bool FilterCache::hasItems(EItemType eType) const
std::vector<OUString> FilterCache::getItemNames(EItemType eType) const
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// search for right list
// An exception is thrown - "eType" is unknown.
@@ -315,7 +316,7 @@ bool FilterCache::hasItem( EItemType eType,
const OUString& sItem)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// search for right list
// An exception is thrown - "eType" is unknown.
@@ -347,8 +348,17 @@ CacheItem FilterCache::getItem( EItemType eType,
const OUString& sItem)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
+ CacheItem aItem = impl_getItem(eType, sItem);
+ // <- SAFE
+ return aItem;
+}
+
+
+CacheItem& FilterCache::impl_getItem( EItemType eType,
+ const OUString& sItem)
+{
// search for right list
// An exception is thrown if "eType" is unknown.
// => rList will be valid everytimes next line is reached.
@@ -389,7 +399,6 @@ CacheItem FilterCache::getItem( EItemType eType,
}
return pIt->second;
- // <- SAFE
}
@@ -397,7 +406,7 @@ void FilterCache::removeItem( EItemType eType,
const OUString& sItem)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// search for right list
// An exception is thrown - "eType" is unknown.
@@ -418,7 +427,7 @@ void FilterCache::setItem( EItemType eType ,
const CacheItem& aValue)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// search for right list
// An exception is thrown - "eType" is unknown.
@@ -445,17 +454,18 @@ void FilterCache::refreshItem( EItemType eType,
const OUString& sItem)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
impl_loadItemOnDemand(eType, sItem);
}
-void FilterCache::addStatePropsToItem( EItemType eType,
- const OUString& sItem,
- CacheItem& rItem)
+css::uno::Any FilterCache::getItemWithStateProps( EItemType eType,
+ const OUString& sItem)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
+
+ const CacheItem& rItem = impl_getItem(eType, sItem);
// Note: Opening of the configuration layer throws some exceptions
// if it failed. So we mustn't check any reference here...
@@ -494,9 +504,8 @@ void FilterCache::addStatePropsToItem( EItemType eType,
(sItem == sDefaultFrameLoader )
)
{
- rItem[PROPNAME_FINALIZED] <<= true;
- rItem[PROPNAME_MANDATORY] <<= true;
- return;
+ css::uno::Sequence aProps = rItem.getAsPackedPropertyValueList(true, true);
+ return css::uno::Any(aProps);
}
/* <-- HACK */
@@ -514,17 +523,16 @@ void FilterCache::addStatePropsToItem( EItemType eType,
default: break;
}
+ bool bFinalized, bMandatory;
try
{
css::uno::Reference< css::beans::XProperty > xItem;
xSet->getByName(sItem) >>= xItem;
css::beans::Property aDescription = xItem->getAsProperty();
- bool bFinalized = ((aDescription.Attributes & css::beans::PropertyAttribute::READONLY ) == css::beans::PropertyAttribute::READONLY );
- bool bMandatory = ((aDescription.Attributes & css::beans::PropertyAttribute::REMOVABLE) != css::beans::PropertyAttribute::REMOVABLE);
+ bFinalized = ((aDescription.Attributes & css::beans::PropertyAttribute::READONLY ) == css::beans::PropertyAttribute::READONLY );
+ bMandatory = ((aDescription.Attributes & css::beans::PropertyAttribute::REMOVABLE) != css::beans::PropertyAttribute::REMOVABLE);
- rItem[PROPNAME_FINALIZED] <<= bFinalized;
- rItem[PROPNAME_MANDATORY] <<= bMandatory;
}
catch(const css::container::NoSuchElementException&)
{
@@ -537,10 +545,13 @@ void FilterCache::addStatePropsToItem( EItemType eType,
=> mark item as FINALIZED / MANDATORY, we don't support writing to the old format
*/
- rItem[PROPNAME_FINALIZED] <<= true;
- rItem[PROPNAME_MANDATORY] <<= true;
+ bFinalized = true;
+ bMandatory = true;
}
+ css::uno::Sequence<css::beans::PropertyValue> aProps = rItem.getAsPackedPropertyValueList(bFinalized, bMandatory);
+
+ return css::uno::Any(aProps);
// <- SAFE
}
@@ -559,7 +570,7 @@ void FilterCache::removeStatePropsFromItem(CacheItem& rItem)
void FilterCache::flush()
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// renew all dependencies and optimizations
impl_validateAndOptimize();
@@ -623,7 +634,7 @@ void FilterCache::impl_flushByList(const css::uno::Reference< css::container::XN
CacheItemList::const_iterator pItem = rCache.find(item);
impl_saveItem(xItem, eType, pItem->second);
- xAddRemoveSet->insertByName(item, css::uno::makeAny(xItem));
+ xAddRemoveSet->insertByName(item, css::uno::Any(xItem));
}
break;
@@ -661,7 +672,7 @@ void FilterCache::detectFlatForURL(const css::util::URL& aURL ,
sExtension = sExtension.toAsciiLowerCase();
// SAFE -> ----------------------------------
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// i) Step over all well known URL pattern
@@ -710,7 +721,7 @@ void FilterCache::detectFlatForURL(const css::util::URL& aURL ,
const CacheItemList& FilterCache::impl_getItemList(EItemType eType) const
{
// SAFE -> ----------------------------------
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
switch(eType)
{
@@ -729,7 +740,7 @@ const CacheItemList& FilterCache::impl_getItemList(EItemType eType) const
CacheItemList& FilterCache::impl_getItemList(EItemType eType)
{
// SAFE -> ----------------------------------
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
switch(eType)
{
@@ -747,7 +758,7 @@ CacheItemList& FilterCache::impl_getItemList(EItemType eType)
css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfigProvider eProvider)
{
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
OUString sPath ;
css::uno::Reference< css::uno::XInterface >* pConfig = nullptr;
@@ -762,7 +773,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
return m_xConfigTypes;
sPath = CFGPACKAGE_TD_TYPES;
pConfig = &m_xConfigTypes;
- sRtlLog = "impl_openconfig(E_PROVIDER_TYPES)";
+ sRtlLog = "impl_openconfig(E_PROVIDER_TYPES)"_ostr;
}
break;
@@ -772,7 +783,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
return m_xConfigFilters;
sPath = CFGPACKAGE_TD_FILTERS;
pConfig = &m_xConfigFilters;
- sRtlLog = "impl_openconfig(E_PROVIDER_FILTERS)";
+ sRtlLog = "impl_openconfig(E_PROVIDER_FILTERS)"_ostr;
}
break;
@@ -782,7 +793,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
return m_xConfigOthers;
sPath = CFGPACKAGE_TD_OTHERS;
pConfig = &m_xConfigOthers;
- sRtlLog = "impl_openconfig(E_PROVIDER_OTHERS)";
+ sRtlLog = "impl_openconfig(E_PROVIDER_OTHERS)"_ostr;
}
break;
@@ -792,7 +803,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
// the old configuration format only. It's not cached!
sPath = CFGPACKAGE_TD_OLD;
pConfig = &xOld;
- sRtlLog = "impl_openconfig(E_PROVIDER_OLD)";
+ sRtlLog = "impl_openconfig(E_PROVIDER_OLD)"_ostr;
}
break;
@@ -829,7 +840,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
return *pConfig;
}
-css::uno::Any FilterCache::impl_getDirectCFGValue(const OUString& sDirectKey)
+css::uno::Any FilterCache::impl_getDirectCFGValue(std::u16string_view sDirectKey)
{
OUString sRoot;
OUString sKey ;
@@ -873,11 +884,11 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess
bool bLocalesMode)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
css::uno::Reference< css::uno::XInterface > xCfg;
- if (!utl::ConfigManager::IsFuzzing())
+ if (!comphelper::IsFuzzing())
{
try
{
@@ -890,14 +901,14 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess
// set root path
aParam.Name = "nodepath";
aParam.Value <<= sRoot;
- lParams.push_back(css::uno::makeAny(aParam));
+ lParams.push_back(css::uno::Any(aParam));
// enable "all locales mode" ... if required
if (bLocalesMode)
{
aParam.Name = "locale";
aParam.Value <<= OUString("*");
- lParams.push_back(css::uno::makeAny(aParam));
+ lParams.push_back(css::uno::Any(aParam));
}
// open it
@@ -933,7 +944,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess
void FilterCache::impl_validateAndOptimize()
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// First check if any filter or type could be read
// from the underlying configuration!
@@ -973,8 +984,8 @@ void FilterCache::impl_validateAndOptimize()
for (auto const& elem : m_lTypes)
{
- OUString sType = elem.first;
- CacheItem aType = elem.second;
+ const OUString & sType = elem.first;
+ const CacheItem & aType = elem.second;
// get its registration for file Extensions AND(!) URLPattern ...
// It doesn't matter if these items exists or if our
@@ -984,38 +995,46 @@ void FilterCache::impl_validateAndOptimize()
// from this cache!
css::uno::Sequence< OUString > lExtensions;
css::uno::Sequence< OUString > lURLPattern;
- aType[PROPNAME_EXTENSIONS] >>= lExtensions;
- aType[PROPNAME_URLPATTERN] >>= lURLPattern;
+ auto it = aType.find(PROPNAME_EXTENSIONS);
+ if (it != aType.end())
+ it->second >>= lExtensions;
+ it = aType.find(PROPNAME_URLPATTERN);
+ if (it != aType.end())
+ it->second >>= lURLPattern;
sal_Int32 ce = lExtensions.getLength();
sal_Int32 cu = lURLPattern.getLength();
#if OSL_DEBUG_LEVEL > 0
OUString sInternalTypeNameCheck;
- aType[PROPNAME_NAME] >>= sInternalTypeNameCheck;
+ it = aType.find(PROPNAME_NAME);
+ if (it != aType.end())
+ it->second >>= sInternalTypeNameCheck;
if (sInternalTypeNameCheck != sType)
{
- sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" does support the property \"Name\" correctly.\n");
+ sLog.append("Warning\t:\t" "The type \"" + sType + "\" does support the property \"Name\" correctly.\n");
++nWarnings;
}
if (!ce && !cu)
{
- sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" does not contain any URL pattern nor any extensions.\n");
+ sLog.append("Warning\t:\t" "The type \"" + sType + "\" does not contain any URL pattern nor any extensions.\n");
++nWarnings;
}
#endif
// create an optimized registration for this type to
// its set list of extensions/url pattern. If it's a "normal" type
- // set it at the end of this optimized list. But if its
+ // set it at the end of this optimized list. But if it's
// a "Preferred" one - set it to the front of this list.
// Of course multiple "Preferred" registrations can occur
// (they shouldn't - but they can!) ... Ignore it. The last
// preferred type is usable in the same manner then every
// other type!
bool bPreferred = false;
- aType[PROPNAME_PREFERRED] >>= bPreferred;
+ it = aType.find(PROPNAME_PREFERRED);
+ if (it != aType.end())
+ it->second >>= bPreferred;
const OUString* pExtensions = lExtensions.getConstArray();
for (sal_Int32 e=0; e<ce; ++e)
@@ -1057,7 +1076,9 @@ void FilterCache::impl_validateAndOptimize()
continue;
OUString sPrefFilter;
- aType[PROPNAME_PREFERREDFILTER] >>= sPrefFilter;
+ it = aType.find(PROPNAME_PREFERREDFILTER);
+ if (it != aType.end())
+ it->second >>= sPrefFilter;
if (sPrefFilter.isEmpty())
{
// OK - there is no filter for this type. But that's not an error.
@@ -1077,7 +1098,7 @@ void FilterCache::impl_validateAndOptimize()
(!bReferencedByHandler)
)
{
- sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" is not used by any filter, loader or content handler.\n");
+ sLog.append("Warning\t:\t" "The type \"" + sType + "\" is not used by any filter, loader or content handler.\n");
++nWarnings;
}
}
@@ -1098,7 +1119,7 @@ void FilterCache::impl_validateAndOptimize()
sLog.append("warning\t:\t");
}
- sLog.append("The type \"").append(sType).append("\" points to an invalid filter \"").append(sPrefFilter).append("\".\n");
+ sLog.append("The type \"" + sType + "\" points to an invalid filter \"" + sPrefFilter + "\".\n");
continue;
}
@@ -1107,10 +1128,10 @@ void FilterCache::impl_validateAndOptimize()
aPrefFilter[PROPNAME_TYPE] >>= sFilterTypeReg;
if (sFilterTypeReg != sType)
{
- sLog.append("error\t:\t" "The preferred filter \"")
- .append(sPrefFilter).append("\" of type \"").append(sType)
- .append("\" is registered for another type \"").append(sFilterTypeReg)
- .append("\".\n");
+ sLog.append("error\t:\t" "The preferred filter \"" +
+ sPrefFilter + "\" of type \"" + sType +
+ "\" is registered for another type \"" + sFilterTypeReg +
+ "\".\n");
++nErrors;
}
@@ -1118,8 +1139,8 @@ void FilterCache::impl_validateAndOptimize()
aPrefFilter[PROPNAME_FLAGS] >>= nFlags;
if (!(static_cast<SfxFilterFlags>(nFlags) & SfxFilterFlags::IMPORT))
{
- sLog.append("error\t:\t" "The preferred filter \"").append(sPrefFilter).append("\" of type \"")
- .append(sType).append("\" is not an IMPORT filter!\n");
+ sLog.append("error\t:\t" "The preferred filter \"" + sPrefFilter + "\" of type \"" +
+ sType + "\" is not an IMPORT filter!\n");
++nErrors;
}
@@ -1127,8 +1148,8 @@ void FilterCache::impl_validateAndOptimize()
aPrefFilter[PROPNAME_NAME] >>= sInternalFilterNameCheck;
if (sInternalFilterNameCheck != sPrefFilter)
{
- sLog.append("Warning\t:\t" "The filter \"").append(sPrefFilter)
- .append("\" does support the property \"Name\" correctly.\n");
+ sLog.append("Warning\t:\t" "The filter \"" + sPrefFilter +
+ "\" does support the property \"Name\" correctly.\n");
++nWarnings;
}
}
@@ -1167,7 +1188,7 @@ void FilterCache::impl_validateAndOptimize()
CacheItem& rLoader = frameLoader.second;
css::uno::Any& rTypesReg = rLoader[PROPNAME_TYPES];
- std::vector<OUString> lTypesReg (comphelper::sequenceToContainer< std::vector<OUString> >(rTypesReg.get<css::uno::Sequence<OUString> >()));
+ const css::uno::Sequence<OUString> lTypesReg = rTypesReg.get<css::uno::Sequence<OUString> >();
for (auto const& typeReg : lTypesReg)
{
@@ -1250,7 +1271,7 @@ FilterCache::EItemFlushState FilterCache::impl_specifyFlushOperation(const css::
void FilterCache::impl_load(EFillState eRequiredState)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
// Attention: Detect services are part of the standard set!
// So there is no need to handle it separately.
@@ -1263,7 +1284,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
)
{
// Attention! If config couldn't be opened successfully
- // and exception os thrown automatically and must be forwarded
+ // and exception is thrown automatically and must be forwarded
// to our caller...
css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW);
{
@@ -1280,7 +1301,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
)
{
// Attention! If config couldn't be opened successfully
- // and exception os thrown automatically and must be forwarded
+ // and exception is thrown automatically and must be forwarded
// to our call...
css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW);
{
@@ -1297,7 +1318,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
)
{
// Attention! If config couldn't be opened successfully
- // and exception os thrown automatically and must be forwarded
+ // and exception is thrown automatically and must be forwarded
// to our call...
css::uno::Reference< css::container::XNameAccess > xFilters(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW);
{
@@ -1314,7 +1335,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
)
{
// Attention! If config couldn't be opened successfully
- // and exception os thrown automatically and must be forwarded
+ // and exception is thrown automatically and must be forwarded
// to our call...
css::uno::Reference< css::container::XNameAccess > xLoaders(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW);
{
@@ -1331,7 +1352,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
)
{
// Attention! If config couldn't be opened successfully
- // and exception os thrown automatically and must be forwarded
+ // and exception is thrown automatically and must be forwarded
// to our call...
css::uno::Reference< css::container::XNameAccess > xHandlers(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW);
{
@@ -1463,7 +1484,7 @@ void FilterCache::impl_readPatchUINames(const css::uno::Reference< css::containe
{
// SAFE -> ----------------------------------
- osl::ClearableMutexGuard aLock(m_aLock);
+ osl::ClearableMutexGuard aLock(m_aMutex);
OUString sActLocale = m_sActLocale ;
aLock.clear();
// <- SAFE ----------------------------------
@@ -1599,7 +1620,7 @@ CacheItem FilterCache::impl_loadItem(const css::uno::Reference< css::container::
for (sal_Int32 i = 0; i < rNames.getLength(); i++)
{
- OUString &rPropName = rNames[i];
+ const OUString &rPropName = rNames[i];
if (i != rNames.getLength() - 1 || rPropName != PROPNAME_FLAGS)
aItem[rPropName] = aValues[i];
else
@@ -1806,6 +1827,37 @@ void FilterCache::impl_saveItem(const css::uno::Reference< css::container::XName
}
}
+namespace {
+ constexpr struct {
+ SfxFilterFlags eFlag;
+ OUString aName;
+ } flagFilterSwitcher[] = {
+ { SfxFilterFlags::STARONEFILTER, FLAGNAME_3RDPARTYFILTER },
+ { SfxFilterFlags::ALIEN, FLAGNAME_ALIEN },
+ { SfxFilterFlags::CONSULTSERVICE, FLAGNAME_CONSULTSERVICE },
+ { SfxFilterFlags::DEFAULT, FLAGNAME_DEFAULT },
+ { SfxFilterFlags::ENCRYPTION, FLAGNAME_ENCRYPTION },
+ { SfxFilterFlags::EXPORT, FLAGNAME_EXPORT },
+ { SfxFilterFlags::IMPORT, FLAGNAME_IMPORT },
+ { SfxFilterFlags::INTERNAL, FLAGNAME_INTERNAL },
+ { SfxFilterFlags::NOTINFILEDLG, FLAGNAME_NOTINFILEDIALOG },
+ { SfxFilterFlags::MUSTINSTALL, FLAGNAME_NOTINSTALLED },
+ { SfxFilterFlags::OWN, FLAGNAME_OWN },
+ { SfxFilterFlags::PACKED, FLAGNAME_PACKED },
+ { SfxFilterFlags::PASSWORDTOMODIFY, FLAGNAME_PASSWORDTOMODIFY },
+ { SfxFilterFlags::PREFERED, FLAGNAME_PREFERRED },
+ { SfxFilterFlags::STARTPRESENTATION, FLAGNAME_STARTPRESENTATION },
+ { SfxFilterFlags::OPENREADONLY, FLAGNAME_READONLY },
+ { SfxFilterFlags::SUPPORTSSELECTION, FLAGNAME_SUPPORTSSELECTION },
+ { SfxFilterFlags::TEMPLATE, FLAGNAME_TEMPLATE },
+ { SfxFilterFlags::TEMPLATEPATH, FLAGNAME_TEMPLATEPATH },
+ { SfxFilterFlags::COMBINED, FLAGNAME_COMBINED },
+ { SfxFilterFlags::SUPPORTSSIGNING, FLAGNAME_SUPPORTSSIGNING },
+ { SfxFilterFlags::GPGENCRYPTION, FLAGNAME_GPGENCRYPTION },
+ { SfxFilterFlags::EXOTIC, FLAGNAME_EXOTIC },
+ };
+}
+
/*-----------------------------------------------
static! => no locks necessary
-----------------------------------------------*/
@@ -1813,29 +1865,11 @@ css::uno::Sequence< OUString > FilterCache::impl_convertFlagField2FlagNames(SfxF
{
std::vector<OUString> lFlagNames;
- if (nFlags & SfxFilterFlags::STARONEFILTER ) lFlagNames.emplace_back(FLAGNAME_3RDPARTYFILTER );
- if (nFlags & SfxFilterFlags::ALIEN ) lFlagNames.emplace_back(FLAGNAME_ALIEN );
- if (nFlags & SfxFilterFlags::CONSULTSERVICE ) lFlagNames.emplace_back(FLAGNAME_CONSULTSERVICE );
- if (nFlags & SfxFilterFlags::DEFAULT ) lFlagNames.emplace_back(FLAGNAME_DEFAULT );
- if (nFlags & SfxFilterFlags::ENCRYPTION ) lFlagNames.emplace_back(FLAGNAME_ENCRYPTION );
- if (nFlags & SfxFilterFlags::EXPORT ) lFlagNames.emplace_back(FLAGNAME_EXPORT );
- if (nFlags & SfxFilterFlags::IMPORT ) lFlagNames.emplace_back(FLAGNAME_IMPORT );
- if (nFlags & SfxFilterFlags::INTERNAL ) lFlagNames.emplace_back(FLAGNAME_INTERNAL );
- if (nFlags & SfxFilterFlags::NOTINFILEDLG ) lFlagNames.emplace_back(FLAGNAME_NOTINFILEDIALOG );
- if (nFlags & SfxFilterFlags::MUSTINSTALL ) lFlagNames.emplace_back(FLAGNAME_NOTINSTALLED );
- if (nFlags & SfxFilterFlags::OWN ) lFlagNames.emplace_back(FLAGNAME_OWN );
- if (nFlags & SfxFilterFlags::PACKED ) lFlagNames.emplace_back(FLAGNAME_PACKED );
- if (nFlags & SfxFilterFlags::PASSWORDTOMODIFY ) lFlagNames.emplace_back(FLAGNAME_PASSWORDTOMODIFY );
- if (nFlags & SfxFilterFlags::PREFERED ) lFlagNames.emplace_back(FLAGNAME_PREFERRED );
- if (nFlags & SfxFilterFlags::STARTPRESENTATION) lFlagNames.emplace_back(FLAGNAME_STARTPRESENTATION);
- if (nFlags & SfxFilterFlags::OPENREADONLY ) lFlagNames.emplace_back(FLAGNAME_READONLY );
- if (nFlags & SfxFilterFlags::SUPPORTSSELECTION) lFlagNames.emplace_back(FLAGNAME_SUPPORTSSELECTION);
- if (nFlags & SfxFilterFlags::TEMPLATE ) lFlagNames.emplace_back(FLAGNAME_TEMPLATE );
- if (nFlags & SfxFilterFlags::TEMPLATEPATH ) lFlagNames.emplace_back(FLAGNAME_TEMPLATEPATH );
- if (nFlags & SfxFilterFlags::COMBINED ) lFlagNames.emplace_back(FLAGNAME_COMBINED );
- if (nFlags & SfxFilterFlags::SUPPORTSSIGNING) lFlagNames.emplace_back(FLAGNAME_SUPPORTSSIGNING);
- if (nFlags & SfxFilterFlags::GPGENCRYPTION) lFlagNames.emplace_back(FLAGNAME_GPGENCRYPTION);
- if (nFlags & SfxFilterFlags::EXOTIC) lFlagNames.emplace_back(FLAGNAME_EXOTIC);
+ for (const auto& [eFlag, aName] : flagFilterSwitcher)
+ {
+ if (nFlags & eFlag)
+ lFlagNames.emplace_back(aName);
+ }
return comphelper::containerToSequence(lFlagNames);
}
@@ -1851,120 +1885,12 @@ SfxFilterFlags FilterCache::impl_convertFlagNames2FlagField(const css::uno::Sequ
sal_Int32 c = lNames.getLength();
for (sal_Int32 i=0; i<c; ++i)
{
- if (pNames[i] == FLAGNAME_3RDPARTYFILTER)
- {
- nField |= SfxFilterFlags::STARONEFILTER;
- continue;
- }
- if (pNames[i] == FLAGNAME_ALIEN)
- {
- nField |= SfxFilterFlags::ALIEN;
- continue;
- }
- if (pNames[i] == FLAGNAME_CONSULTSERVICE)
- {
- nField |= SfxFilterFlags::CONSULTSERVICE;
- continue;
- }
- if (pNames[i] == FLAGNAME_DEFAULT)
- {
- nField |= SfxFilterFlags::DEFAULT;
- continue;
- }
- if (pNames[i] == FLAGNAME_ENCRYPTION)
- {
- nField |= SfxFilterFlags::ENCRYPTION;
- continue;
- }
- if (pNames[i] == FLAGNAME_EXOTIC)
- {
- nField |= SfxFilterFlags::EXOTIC;
- continue;
- }
- if (pNames[i] == FLAGNAME_EXPORT)
+ for (const auto& [eFlag, aName] : flagFilterSwitcher)
{
- nField |= SfxFilterFlags::EXPORT;
- continue;
- }
- if (pNames[i] == FLAGNAME_GPGENCRYPTION)
- {
- nField |= SfxFilterFlags::GPGENCRYPTION;
- continue;
- }
- if (pNames[i] == FLAGNAME_IMPORT)
- {
- nField |= SfxFilterFlags::IMPORT;
- continue;
- }
- if (pNames[i] == FLAGNAME_INTERNAL)
- {
- nField |= SfxFilterFlags::INTERNAL;
- continue;
- }
- if (pNames[i] == FLAGNAME_NOTINFILEDIALOG)
- {
- nField |= SfxFilterFlags::NOTINFILEDLG;
- continue;
- }
- if (pNames[i] == FLAGNAME_NOTINSTALLED)
- {
- nField |= SfxFilterFlags::MUSTINSTALL;
- continue;
- }
- if (pNames[i] == FLAGNAME_OWN)
- {
- nField |= SfxFilterFlags::OWN;
- continue;
- }
- if (pNames[i] == FLAGNAME_PACKED)
- {
- nField |= SfxFilterFlags::PACKED;
- continue;
- }
- if (pNames[i] == FLAGNAME_PASSWORDTOMODIFY)
- {
- nField |= SfxFilterFlags::PASSWORDTOMODIFY;
- continue;
- }
- if (pNames[i] == FLAGNAME_PREFERRED)
- {
- nField |= SfxFilterFlags::PREFERED;
- continue;
- }
- if (pNames[i] == FLAGNAME_STARTPRESENTATION)
- {
- nField |= SfxFilterFlags::STARTPRESENTATION;
- continue;
- }
- if (pNames[i] == FLAGNAME_SUPPORTSSIGNING)
- {
- nField |= SfxFilterFlags::SUPPORTSSIGNING;
- continue;
- }
- if (pNames[i] == FLAGNAME_READONLY)
- {
- nField |= SfxFilterFlags::OPENREADONLY;
- continue;
- }
- if (pNames[i] == FLAGNAME_SUPPORTSSELECTION)
- {
- nField |= SfxFilterFlags::SUPPORTSSELECTION;
- continue;
- }
- if (pNames[i] == FLAGNAME_TEMPLATE)
- {
- nField |= SfxFilterFlags::TEMPLATE;
- continue;
- }
- if (pNames[i] == FLAGNAME_TEMPLATEPATH)
- {
- nField |= SfxFilterFlags::TEMPLATEPATH;
- continue;
- }
- if (pNames[i] == FLAGNAME_COMBINED)
- {
- nField |= SfxFilterFlags::COMBINED;
- continue;
+ if (pNames[i] == aName) {
+ nField |= eFlag;
+ break;
+ }
}
}
@@ -2137,14 +2063,14 @@ CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::containe
}
-std::vector<OUString> FilterCache::impl_tokenizeString(const OUString& sData ,
+std::vector<OUString> FilterCache::impl_tokenizeString(std::u16string_view sData ,
sal_Unicode cSeparator)
{
std::vector<OUString> lData ;
sal_Int32 nToken = 0;
do
{
- OUString sToken = sData.getToken(0, cSeparator, nToken);
+ OUString sToken( o3tl::getToken(sData, 0, cSeparator, nToken) );
lData.push_back(sToken);
}
while(nToken >= 0);
@@ -2160,8 +2086,8 @@ OUString FilterCache::impl_searchFrameLoaderForType(const OUString& sType) const
{
const OUString& sItem = frameLoader.first;
::comphelper::SequenceAsHashMap lProps(frameLoader.second);
- std::vector<OUString> lTypes(
- comphelper::sequenceToContainer< std::vector<OUString> >(lProps[PROPNAME_TYPES].get<css::uno::Sequence<OUString> >()));
+ const css::uno::Sequence<OUString> lTypes =
+ lProps[PROPNAME_TYPES].get<css::uno::Sequence<OUString> >();
if (::std::find(lTypes.begin(), lTypes.end(), sType) != lTypes.end())
return sItem;
@@ -2177,8 +2103,8 @@ OUString FilterCache::impl_searchContentHandlerForType(const OUString& sType) co
{
const OUString& sItem = contentHandler.first;
::comphelper::SequenceAsHashMap lProps(contentHandler.second);
- std::vector<OUString> lTypes(
- comphelper::sequenceToContainer< std::vector<OUString> >( lProps[PROPNAME_TYPES].get<css::uno::Sequence<OUString> >() ));
+ const css::uno::Sequence<OUString> lTypes =
+ lProps[PROPNAME_TYPES].get<css::uno::Sequence<OUString> >();
if (::std::find(lTypes.begin(), lTypes.end(), sType) != lTypes.end())
return sItem;
}
@@ -2194,7 +2120,7 @@ bool FilterCache::impl_isModuleInstalled(const OUString& sModule)
// SAFE ->
{
- osl::MutexGuard aLock(m_aLock);
+ osl::MutexGuard aLock(m_aMutex);
if (!m_xModuleCfg.is())
{
m_xModuleCfg = officecfg::Setup::Office::Factories::get();
diff --git a/filter/source/config/cache/filtercache.hxx b/filter/source/config/cache/filtercache.hxx
index 243c192a8072..8445efea8227 100644
--- a/filter/source/config/cache/filtercache.hxx
+++ b/filter/source/config/cache/filtercache.hxx
@@ -17,12 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FILTERCACHE_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FILTERCACHE_HXX
+#pragma once
#include <memory>
#include "cacheitem.hxx"
+#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -30,7 +30,7 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Any.h>
#include <comphelper/documentconstants.hxx>
-#include <rtl/instance.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
@@ -56,7 +56,7 @@ class CacheUpdateListener;
Further we make it public. So any user of this class
can lock us from outside too.
*/
-class FilterCache : public BaseLock
+class FilterCache : public cppu::BaseMutex
{
// public types
@@ -362,9 +362,9 @@ class FilterCache : public BaseLock
if some input parameter are wrong or the cache itself is not valid
any longer, because any operation before damage it.
*/
- std::vector<OUString> getMatchingItemsByProps( EItemType eType ,
- const CacheItem& lIProps ,
- const CacheItem& lEProps = CacheItem()) const;
+ std::vector<OUString> getMatchingItemsByProps( EItemType eType,
+ std::span< const css::beans::NamedValue > lIProps,
+ std::span< const css::beans::NamedValue > lEProps = {}) const;
/** @short indicates if the requested sub container
@@ -525,10 +525,8 @@ class FilterCache : public BaseLock
was not migrated to the new one. So we can't provide write access
to such items...
*/
- void addStatePropsToItem( EItemType eType,
- const OUString& sItem,
- CacheItem& rItem);
-
+ css::uno::Any getItemWithStateProps( EItemType eType,
+ const OUString& sItem);
/** TODO document me
@@ -601,6 +599,7 @@ class FilterCache : public BaseLock
CacheItemList& impl_getItemList(EItemType eType);
+ CacheItem& impl_getItem( EItemType eType, const OUString& sItem);
/** @short return a valid configuration update access
to the underlying configuration package, which
@@ -666,7 +665,7 @@ class FilterCache : public BaseLock
Can be empty if an internal error occurred or if the requested
key does not exists!
*/
- css::uno::Any impl_getDirectCFGValue(const OUString& sDirectKey);
+ css::uno::Any impl_getDirectCFGValue(std::u16string_view sDirectKey);
/** @short load the underlying configuration into this cache.
@@ -892,7 +891,7 @@ class FilterCache : public BaseLock
/** TODO */
- static std::vector<OUString> impl_tokenizeString(const OUString& sData ,
+ static std::vector<OUString> impl_tokenizeString(std::u16string_view sData ,
sal_Unicode cSeparator);
@@ -934,10 +933,8 @@ class FilterCache : public BaseLock
static css::uno::Sequence< OUString > impl_convertFlagField2FlagNames(SfxFilterFlags nFlags);
};
-struct TheFilterCache: public rtl::Static<FilterCache, TheFilterCache> {};
+FilterCache& GetTheFilterCache();
} // namespace filter::config
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FILTERCACHE_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx
index fa26ee7ba580..9b0793b94e1e 100644
--- a/filter/source/config/cache/filterfactory.cxx
+++ b/filter/source/config/cache/filterfactory.cxx
@@ -30,6 +30,12 @@
namespace filter::config{
+FilterCache& GetTheFilterCache()
+{
+ static FilterCache CACHE;
+ return CACHE;
+}
+
/** @short define all possible parts of a filter query.
@descr syntax: "<query>[:<param>[=<value>]]"
@@ -49,9 +55,9 @@ namespace filter::config{
FilterFactory::FilterFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext)
: m_xContext(rxContext)
{
- BaseContainer::init(rxContext ,
- "com.sun.star.comp.filter.config.FilterFactory" ,
- { "com.sun.star.document.FilterFactory" },
+ static const css::uno::Sequence<OUString> sServiceNames { "com.sun.star.document.FilterFactory" };
+ BaseContainer::init("com.sun.star.comp.filter.config.FilterFactory" ,
+ sServiceNames,
FilterCache::E_FILTER );
}
@@ -71,9 +77,9 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FilterFactory::createInstan
const css::uno::Sequence< css::uno::Any >& lArguments)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
- auto & cache = TheFilterCache::get();
+ auto & cache = GetTheFilterCache();
// search filter on cache
CacheItem aFilter = cache.getItem(FilterCache::E_FILTER, sFilter);
@@ -97,7 +103,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FilterFactory::createInstan
aFilter >> lConfig;
::std::vector< css::uno::Any > stlArguments(comphelper::sequenceToContainer< ::std::vector< css::uno::Any > >(lArguments));
- stlArguments.insert(stlArguments.begin(), css::uno::makeAny(lConfig));
+ stlArguments.insert(stlArguments.begin(), css::uno::Any(lConfig));
xInit->initialize(comphelper::containerToSequence(stlArguments));
}
@@ -115,14 +121,13 @@ css::uno::Sequence< OUString > SAL_CALL FilterFactory::getAvailableServiceNames(
Of course we can't check for corrupted service names here. We can check
for empty strings only...
*/
- CacheItem lIProps;
- CacheItem lEProps;
- lEProps[PROPNAME_FILTERSERVICE] <<= OUString();
+ css::beans::NamedValue lEProps[] {
+ { PROPNAME_FILTERSERVICE, css::uno::Any(OUString()) } };
std::vector<OUString> lUNOFilters;
try
{
- lUNOFilters = TheFilterCache::get().getMatchingItemsByProps(FilterCache::E_FILTER, lIProps, lEProps);
+ lUNOFilters = GetTheFilterCache().getMatchingItemsByProps(FilterCache::E_FILTER, {}, lEProps);
}
catch(const css::uno::RuntimeException&)
{ throw; }
@@ -147,8 +152,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL FilterFactory::crea
if (pos != -1)
{
OSL_FAIL("DEPRECATED!\nPlease use new query format: 'matchByDocumentService=...'");
- OUString sPatchedQuery(OUString::Concat("matchByDocumentService=") + sNewQuery.subView(7));
- sNewQuery = sPatchedQuery;
+ sNewQuery = OUString::Concat("matchByDocumentService=") + sNewQuery.subView(7);
}
// analyze query and split it into its tokens
@@ -161,10 +165,10 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL FilterFactory::crea
{
// SAFE -> ----------------------
{
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
// May be not all filters was loaded ...
// But we need it now!
- impl_loadOnDemand();
+ impl_loadOnDemand(aLock);
}
// <- SAFE ----------------------
@@ -181,9 +185,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL FilterFactory::crea
// pack list of item names as an enum list
// Attention: Do not return empty reference for empty list!
// The outside check "hasMoreElements()" should be enough, to detect this state :-)
- css::uno::Sequence< OUString > lSet = comphelper::containerToSequence(lEnumSet);
- ::comphelper::OEnumerationByName* pEnum = new ::comphelper::OEnumerationByName(this, lSet);
- return css::uno::Reference< css::container::XEnumeration >(static_cast< css::container::XEnumeration* >(pEnum), css::uno::UNO_QUERY);
+ return new ::comphelper::OEnumerationByName(this, std::move(lEnumSet));
}
@@ -248,10 +250,10 @@ std::vector<OUString> FilterFactory::impl_queryMatchByDocumentService(const Quer
nEFlags = pIt->second.toInt32();
// SAFE -> ----------------------
- osl::ClearableMutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
// search suitable filters
- FilterCache* pCache = impl_getWorkingCache();
+ FilterCache* pCache = impl_getWorkingCache(aLock);
std::vector<OUString> lFilterNames = pCache->getItemNames(FilterCache::E_FILTER);
std::vector<OUString> lResult ;
@@ -309,7 +311,7 @@ std::vector<OUString> FilterFactory::impl_queryMatchByDocumentService(const Quer
{ continue; }
}
- aLock.clear();
+ aLock.unlock();
// <- SAFE ----------------------
return lResult;
@@ -386,7 +388,7 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterList(const QueryTokeniz
{
// more complex search for all filters
// We check first, which office modules are installed...
- std::vector<OUString> lModules = impl_getListOfInstalledModules();
+ const css::uno::Sequence<OUString> lModules = impl_getListOfInstalledModules();
for (auto const& module : lModules)
{
std::vector<OUString> lFilters4Module = impl_getSortedFilterListForModule(module, nIFlags, nEFlags);
@@ -401,17 +403,10 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterList(const QueryTokeniz
}
-std::vector<OUString> FilterFactory::impl_getListOfInstalledModules() const
+css::uno::Sequence<OUString> FilterFactory::impl_getListOfInstalledModules()
{
- // SAFE -> ----------------------
- osl::ClearableMutexGuard aLock(m_aLock);
- css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
- aLock.clear();
- // <- SAFE ----------------------
-
- css::uno::Reference< css::container::XNameAccess > xModuleConfig = officecfg::Setup::Office::Factories::get(xContext);
- std::vector<OUString> lModules(comphelper::sequenceToContainer< std::vector<OUString> >(xModuleConfig->getElementNames()));
- return lModules;
+ css::uno::Reference< css::container::XNameAccess > xModuleConfig = officecfg::Setup::Office::Factories::get();
+ return xModuleConfig->getElementNames();
}
@@ -422,14 +417,13 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterListForModule(const OUS
std::vector<OUString> lSortedFilters = impl_readSortedFilterListFromConfig(sModule);
// get all filters for the requested module
- CacheItem lIProps;
- lIProps[PROPNAME_DOCUMENTSERVICE] <<= sModule;
+ css::beans::NamedValue lIProps[] { { PROPNAME_DOCUMENTSERVICE, css::uno::Any(sModule) } };
// SAFE -> ----------------------
- osl::ClearableMutexGuard aLock(m_aLock);
- FilterCache* pCache = impl_getWorkingCache();
+ std::unique_lock aLock(m_aMutex);
+ FilterCache* pCache = impl_getWorkingCache(aLock);
std::vector<OUString> lOtherFilters = pCache->getMatchingItemsByProps(FilterCache::E_FILTER, lIProps);
- aLock.clear();
+ aLock.unlock();
// <- SAFE ----------------------
// bring "other" filters in an alphabetical order
@@ -448,13 +442,11 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterListForModule(const OUS
// remove all filters from this merged list, which does not fit the flag specification
if (nIFlags != -1)
{
- auto pItToErase = ::std::remove_if(lMergedFilters.begin(), lMergedFilters.end(), stlcomp_removeIfMatchFlags(pCache, nIFlags, true));
- lMergedFilters.erase(pItToErase, lMergedFilters.end());
+ std::erase_if(lMergedFilters, stlcomp_removeIfMatchFlags(pCache, nIFlags, true));
}
if (nEFlags != -1)
{
- auto pItToErase = ::std::remove_if(lMergedFilters.begin(), lMergedFilters.end(), stlcomp_removeIfMatchFlags(pCache, nEFlags, false));
- lMergedFilters.erase(pItToErase, lMergedFilters.end());
+ std::erase_if(lMergedFilters, stlcomp_removeIfMatchFlags(pCache, nEFlags, false));
}
// sort the default filter to the front of this list
@@ -464,17 +456,11 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterListForModule(const OUS
}
-std::vector<OUString> FilterFactory::impl_readSortedFilterListFromConfig(const OUString& sModule) const
+std::vector<OUString> FilterFactory::impl_readSortedFilterListFromConfig(const OUString& sModule)
{
- // SAFE -> ----------------------
- osl::ClearableMutexGuard aLock(m_aLock);
- css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
- aLock.clear();
- // <- SAFE ----------------------
-
try
{
- css::uno::Reference< css::container::XNameAccess > xUISortConfig = officecfg::TypeDetection::UISort::ModuleDependendFilterOrder::get(xContext);
+ css::uno::Reference< css::container::XNameAccess > xUISortConfig = officecfg::TypeDetection::UISort::ModuleDependendFilterOrder::get();
// don't check the module name here. If it does not exists, an exception is thrown and caught below.
// We return an empty list as result then.
css::uno::Reference< css::container::XNameAccess > xModule;
diff --git a/filter/source/config/cache/filterfactory.hxx b/filter/source/config/cache/filterfactory.hxx
index 77d1b426d08e..9be370f4dc56 100644
--- a/filter/source/config/cache/filterfactory.hxx
+++ b/filter/source/config/cache/filterfactory.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FILTERFACTORY_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FILTERFACTORY_HXX
+#pragma once
#include "basecontainer.hxx"
#include "querytokenizer.hxx"
@@ -96,7 +95,7 @@ class FilterFactory : public ::cppu::ImplInheritanceHelper< BaseContainer
/** TODO document me
*/
- std::vector<OUString> impl_getListOfInstalledModules() const;
+ static css::uno::Sequence<OUString> impl_getListOfInstalledModules();
/** @short implement the container string query:
@@ -127,12 +126,10 @@ class FilterFactory : public ::cppu::ImplInheritanceHelper< BaseContainer
@return A string list of internal filter names.
Can be empty.
*/
- std::vector<OUString> impl_readSortedFilterListFromConfig(const OUString& sModule) const;
+ static std::vector<OUString> impl_readSortedFilterListFromConfig(const OUString& sModule);
};
} // namespace filter::config
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FILTERFACTORY_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/frameloaderfactory.cxx b/filter/source/config/cache/frameloaderfactory.cxx
index c7906b4acf1d..ee78ebd98979 100644
--- a/filter/source/config/cache/frameloaderfactory.cxx
+++ b/filter/source/config/cache/frameloaderfactory.cxx
@@ -29,8 +29,7 @@ namespace filter::config{
FrameLoaderFactory::FrameLoaderFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext)
: m_xContext(rxContext)
{
- BaseContainer::init(rxContext ,
- "com.sun.star.comp.filter.config.FrameLoaderFactory" ,
+ BaseContainer::init("com.sun.star.comp.filter.config.FrameLoaderFactory" ,
{ "com.sun.star.frame.FrameLoaderFactory" },
FilterCache::E_FRAMELOADER );
}
@@ -51,9 +50,9 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::createI
const css::uno::Sequence< css::uno::Any >& lArguments)
{
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
- auto & cache = TheFilterCache::get();
+ auto & cache = GetTheFilterCache();
// search loader on cache
CacheItem aLoader = cache.getItem(m_eType, sLoader);
@@ -73,7 +72,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::createI
aLoader >> lConfig;
::std::vector< css::uno::Any > stlArguments(comphelper::sequenceToContainer< ::std::vector<css::uno::Any> >(lArguments));
- stlArguments.insert(stlArguments.begin(), css::uno::makeAny(lConfig));
+ stlArguments.insert(stlArguments.begin(), css::uno::Any(lConfig));
xInit->initialize(comphelper::containerToSequence(stlArguments));
}
diff --git a/filter/source/config/cache/frameloaderfactory.hxx b/filter/source/config/cache/frameloaderfactory.hxx
index a1aa859e1555..2b9098b1a8e2 100644
--- a/filter/source/config/cache/frameloaderfactory.hxx
+++ b/filter/source/config/cache/frameloaderfactory.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FRAMELOADERFACTORY_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FRAMELOADERFACTORY_HXX
+#pragma once
#include "basecontainer.hxx"
#include <com/sun/star/frame/XLoaderFactory.hpp>
@@ -96,6 +95,4 @@ class FrameLoaderFactory : public ::cppu::ImplInheritanceHelper< BaseContainer
} // namespace filter::config
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FRAMELOADERFACTORY_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/querytokenizer.cxx b/filter/source/config/cache/querytokenizer.cxx
index 9b64f68fe6d8..f5b021f53b45 100644
--- a/filter/source/config/cache/querytokenizer.cxx
+++ b/filter/source/config/cache/querytokenizer.cxx
@@ -20,23 +20,24 @@
#include "querytokenizer.hxx"
#include <osl/diagnose.h>
+#include <o3tl/string_view.hxx>
namespace filter::config{
-QueryTokenizer::QueryTokenizer(const OUString& sQuery)
+QueryTokenizer::QueryTokenizer(std::u16string_view sQuery)
: m_bValid(true)
{
sal_Int32 token = 0;
while(token != -1)
{
- OUString sToken = sQuery.getToken(0, ':', token);
- if (!sToken.isEmpty())
+ std::u16string_view sToken = o3tl::getToken(sQuery,0, ':', token);
+ if (!sToken.empty())
{
sal_Int32 nIdx{ 0 };
- const OUString sKey{ sToken.getToken(0, '=', nIdx) };
- const OUString sVal{ sToken.getToken(0, ':', nIdx) };
+ const OUString sKey{ o3tl::getToken(sToken, 0, '=', nIdx) };
+ const OUString sVal{ o3tl::getToken(sToken, 0, ':', nIdx) };
if (sKey.isEmpty())
m_bValid = false;
diff --git a/filter/source/config/cache/querytokenizer.hxx b/filter/source/config/cache/querytokenizer.hxx
index f5dbf7623650..0c7e79b3ddc7 100644
--- a/filter/source/config/cache/querytokenizer.hxx
+++ b/filter/source/config/cache/querytokenizer.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_QUERYTOKENIZER_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_QUERYTOKENIZER_HXX
+#pragma once
#include <rtl/ustring.hxx>
#include <unordered_map>
@@ -74,7 +73,7 @@ class QueryTokenizer : public std::unordered_map< OUString, OUString >
@param sQuery
the query string.
*/
- explicit QueryTokenizer(const OUString& sQuery);
+ explicit QueryTokenizer(std::u16string_view sQuery);
/** @short destruct an instance of this class.
@@ -90,6 +89,4 @@ class QueryTokenizer : public std::unordered_map< OUString, OUString >
} // namespace filter::config
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_QUERYTOKENIZER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index e9e149511cff..065fe483a3dd 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -25,16 +25,25 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/embed/StorageFormats.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
+
+#include <sfx2/brokenpackageint.hxx>
+#include <o3tl/string_view.hxx>
#include <tools/wldcrd.hxx>
#include <sal/log.hxx>
#include <framework/interaction.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/fileurl.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <utility>
#define DEBUG_TYPE_DETECTION 0
@@ -53,9 +62,8 @@ TypeDetection::TypeDetection(const css::uno::Reference< css::uno::XComponentCont
, m_xTerminateListener(new TerminateDetection(this))
, m_bCancel(false)
{
- css::frame::Desktop::create(m_xContext)->addTerminateListener(m_xTerminateListener.get());
- BaseContainer::init(rxContext ,
- "com.sun.star.comp.filter.config.TypeDetection" ,
+ css::frame::Desktop::create(m_xContext)->addTerminateListener(m_xTerminateListener);
+ BaseContainer::init("com.sun.star.comp.filter.config.TypeDetection" ,
{ "com.sun.star.document.TypeDetection" },
FilterCache::E_TYPE );
}
@@ -63,7 +71,7 @@ TypeDetection::TypeDetection(const css::uno::Reference< css::uno::XComponentCont
TypeDetection::~TypeDetection()
{
- css::frame::Desktop::create(m_xContext)->removeTerminateListener(m_xTerminateListener.get());
+ css::frame::Desktop::create(m_xContext)->removeTerminateListener(m_xTerminateListener);
}
@@ -72,7 +80,7 @@ OUString SAL_CALL TypeDetection::queryTypeByURL(const OUString& sURL)
OUString sType;
// SAFE ->
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
css::util::URL aURL;
aURL.Complete = sURL;
@@ -82,7 +90,7 @@ OUString SAL_CALL TypeDetection::queryTypeByURL(const OUString& sURL)
// set std types as minimum requirement first!
// Only in case no type was found for given URL,
// use optional types too ...
- auto & cache = TheFilterCache::get();
+ auto & cache = GetTheFilterCache();
FlatDetection lFlatTypes;
cache.detectFlatForURL(aURL, lFlatTypes);
@@ -125,7 +133,7 @@ namespace {
* In each category, rank them from strictly-structured to
* loosely-structured.
*/
-int getFlatTypeRank(const OUString& rType)
+int getFlatTypeRank(std::u16string_view rType)
{
// List formats from more complex to less complex.
// TODO: Add more.
@@ -210,6 +218,7 @@ int getFlatTypeRank(const OUString& rType)
"calc_SYLK",
"calc_DIF",
"calc_dBase",
+ "Apache Parquet",
// Binary (raster and vector image files)
"emf_MS_Windows_Metafile",
@@ -232,6 +241,7 @@ int getFlatTypeRank(const OUString& rType)
"pcd_Photo_CD_Base",
"pcd_Photo_CD_Base4",
"pcd_Photo_CD_Base16",
+ "webp_WebP",
"impress_CGM_Computer_Graphics_Metafile", // There is binary and ascii variants ?
"draw_WordPerfect_Graphics",
"draw_Visio_Document",
@@ -273,6 +283,7 @@ int getFlatTypeRank(const OUString& rType)
// Export only
"writer_layout_dump_xml",
+ "writer_indexing_export",
"graphic_HTML",
// Internal use only
@@ -281,11 +292,11 @@ int getFlatTypeRank(const OUString& rType)
"math_MathType_3x", // MathType equation embedded in Word doc.
};
- size_t n = SAL_N_ELEMENTS(ranks);
+ size_t n = std::size(ranks);
for (size_t i = 0; i < n; ++i)
{
- if (rType.equalsAscii(ranks[i]))
+ if (o3tl::equalsAscii(rType, ranks[i]))
return n - i - 1;
}
@@ -343,7 +354,7 @@ class FindByType
{
OUString maType;
public:
- explicit FindByType(const OUString& rType) : maType(rType) {}
+ explicit FindByType(OUString aType) : maType(std::move(aType)) {}
bool operator() (const FlatDetectionInfo& rInfo) const
{
return rInfo.sType == maType;
@@ -376,10 +387,10 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css::
try
{
// SAFE -> ----------------------------------
- osl::ClearableMutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
// parse given URL to split it into e.g. main and jump marks ...
- sURL = stlDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString());
+ sURL = stlDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL, OUString());
#if OSL_DEBUG_LEVEL > 0
if (stlDescriptor.find( "FileName" ) != stlDescriptor.end())
@@ -392,19 +403,19 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css::
xParser->parseStrict(aURL);
OUString aSelectedFilter = stlDescriptor.getUnpackedValueOrDefault(
- utl::MediaDescriptor::PROP_FILTERNAME(), OUString());
+ utl::MediaDescriptor::PROP_FILTERNAME, OUString());
if (!aSelectedFilter.isEmpty())
{
// Caller specified the filter type. Honor it. Just get the default
// type for that filter, and bail out.
if (impl_validateAndSetFilterOnDescriptor(stlDescriptor, aSelectedFilter))
- return stlDescriptor[utl::MediaDescriptor::PROP_TYPENAME()].get<OUString>();
+ return stlDescriptor[utl::MediaDescriptor::PROP_TYPENAME].get<OUString>();
}
FlatDetection lFlatTypes;
- impl_getAllFormatTypes(aURL, stlDescriptor, lFlatTypes);
+ impl_getAllFormatTypes(aLock, aURL, stlDescriptor, lFlatTypes);
- aLock.clear();
+ aLock.unlock();
// <- SAFE ----------------------------------
// Properly prioritize all candidate types.
@@ -421,9 +432,8 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css::
// outside (bAllowDeep=sal_False) or break the whole detection by
// throwing an exception if creation of the might needed input
// stream failed by e.g. an IO exception ...
- std::vector<OUString> lUsedDetectors;
if (!lFlatTypes.empty())
- sType = impl_detectTypeFlatAndDeep(stlDescriptor, lFlatTypes, bAllowDeep, lUsedDetectors, sLastChance);
+ sType = impl_detectTypeFlatAndDeep(stlDescriptor, lFlatTypes, bAllowDeep, sLastChance);
// flat detection failed
// pure deep detection failed
@@ -467,18 +477,18 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
// a)
// Don't overwrite a might preselected filter!
OUString sFilter = rDescriptor.getUnpackedValueOrDefault(
- utl::MediaDescriptor::PROP_FILTERNAME(),
+ utl::MediaDescriptor::PROP_FILTERNAME,
OUString());
if (!sFilter.isEmpty())
return;
- auto & cache = TheFilterCache::get();
+ auto & cache = GetTheFilterCache();
// b)
// check a preselected document service too.
// Then we have to search a suitable filter within this module.
OUString sDocumentService = rDescriptor.getUnpackedValueOrDefault(
- utl::MediaDescriptor::PROP_DOCUMENTSERVICE(),
+ utl::MediaDescriptor::PROP_DOCUMENTSERVICE,
OUString());
if (!sDocumentService.isEmpty())
{
@@ -487,25 +497,25 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
OUString sRealType = sType;
// SAFE ->
- ::osl::ResettableMutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
// Attention: For executing next lines of code, We must be sure that
// all filters already loaded :-(
// That can disturb our "load on demand feature". But we have no other chance!
cache.load(FilterCache::E_CONTAINS_FILTERS);
- CacheItem lIProps;
- lIProps[PROPNAME_DOCUMENTSERVICE] <<= sDocumentService;
- lIProps[PROPNAME_TYPE ] <<= sRealType;
+ css::beans::NamedValue lIProps[] {
+ { PROPNAME_DOCUMENTSERVICE, uno::Any(sDocumentService) },
+ { PROPNAME_TYPE, uno::Any(sRealType) } };
std::vector<OUString> lFilters = cache.getMatchingItemsByProps(FilterCache::E_FILTER, lIProps);
- aLock.clear();
+ aLock.unlock();
// <- SAFE
for (auto const& filter : lFilters)
{
// SAFE ->
- aLock.reset();
+ aLock.lock();
try
{
CacheItem aFilter = cache.getItem(FilterCache::E_FILTER, filter);
@@ -518,14 +528,14 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
break;
}
catch(const css::uno::Exception&) {}
- aLock.clear();
+ aLock.unlock();
// <- SAFE
}
if (!sFilter.isEmpty())
{
- rDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= sRealType;
- rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter;
+ rDescriptor[utl::MediaDescriptor::PROP_TYPENAME ] <<= sRealType;
+ rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME] <<= sFilter;
sType = sRealType;
return;
}
@@ -544,19 +554,13 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
sFilter.clear();
try
{
- // SAFE ->
- osl::ClearableMutexGuard aLock(m_aLock);
-
CacheItem aType = cache.getItem(FilterCache::E_TYPE, sType);
aType[PROPNAME_PREFERREDFILTER] >>= sFilter;
cache.getItem(FilterCache::E_FILTER, sFilter);
- aLock.clear();
- // <- SAFE
-
// no exception => found valid type and filter => set it on the given descriptor
- rDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= sType ;
- rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter;
+ rDescriptor[utl::MediaDescriptor::PROP_TYPENAME ] <<= sType ;
+ rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME] <<= sFilter;
return;
}
catch(const css::uno::Exception&)
@@ -567,27 +571,19 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
sFilter.clear();
try
{
- // SAFE ->
- ::osl::ResettableMutexGuard aLock(m_aLock);
-
// Attention: For executing next lines of code, We must be sure that
// all filters already loaded :-(
// That can disturb our "load on demand feature". But we have no other chance!
cache.load(FilterCache::E_CONTAINS_FILTERS);
- CacheItem lIProps;
- lIProps[PROPNAME_TYPE] <<= sType;
+ css::beans::NamedValue lIProps[] {
+ { PROPNAME_TYPE, uno::Any(sType) } };
std::vector<OUString> lFilters = cache.getMatchingItemsByProps(FilterCache::E_FILTER, lIProps);
- aLock.clear();
- // <- SAFE
-
for (auto const& filter : lFilters)
{
sFilter = filter;
- // SAFE ->
- aLock.reset();
try
{
CacheItem aFilter = cache.getItem(FilterCache::E_FILTER, sFilter);
@@ -599,16 +595,14 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
}
catch(const css::uno::Exception&)
{ continue; }
- aLock.clear();
- // <- SAFE
sFilter.clear();
}
if (!sFilter.isEmpty())
{
- rDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= sType ;
- rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter;
+ rDescriptor[utl::MediaDescriptor::PROP_TYPENAME ] <<= sType ;
+ rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME] <<= sFilter;
return;
}
}
@@ -618,6 +612,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
bool TypeDetection::impl_getPreselectionForType(
+ std::unique_lock<std::mutex>& /*rGuard*/,
const OUString& sPreSelType, const util::URL& aParsedURL, FlatDetection& rFlatTypes, bool bDocService)
{
// Can be used to suppress execution of some parts of this method
@@ -639,10 +634,7 @@ bool TypeDetection::impl_getPreselectionForType(
CacheItem aType;
try
{
- // SAFE -> --------------------------
- osl::MutexGuard aLock(m_aLock);
- aType = TheFilterCache::get().getItem(FilterCache::E_TYPE, sType);
- // <- SAFE --------------------------
+ aType = GetTheFilterCache().getItem(FilterCache::E_TYPE, sType);
}
catch(const css::container::NoSuchElementException&)
{
@@ -669,8 +661,8 @@ bool TypeDetection::impl_getPreselectionForType(
// otherwise we must know, if it matches to the given URL really.
// especially if it matches by its extension or pattern registration.
- std::vector<OUString> lExtensions(comphelper::sequenceToContainer< std::vector<OUString> >(aType[PROPNAME_EXTENSIONS].get<css::uno::Sequence<OUString> >() ));
- std::vector<OUString> lURLPattern(comphelper::sequenceToContainer< std::vector<OUString> >(aType[PROPNAME_URLPATTERN].get<css::uno::Sequence<OUString> >() ));
+ const css::uno::Sequence<OUString> lExtensions = aType[PROPNAME_EXTENSIONS].get<css::uno::Sequence<OUString> >();
+ const css::uno::Sequence<OUString> lURLPattern = aType[PROPNAME_URLPATTERN].get<css::uno::Sequence<OUString> >();
for (auto const& extension : lExtensions)
{
@@ -719,25 +711,22 @@ bool TypeDetection::impl_getPreselectionForType(
}
void TypeDetection::impl_getPreselectionForDocumentService(
+ std::unique_lock<std::mutex>& rGuard,
const OUString& sPreSelDocumentService, const util::URL& aParsedURL, FlatDetection& rFlatTypes)
{
// get all filters, which match to this doc service
std::vector<OUString> lFilters;
try
{
- // SAFE -> --------------------------
- osl::MutexGuard aLock(m_aLock);
-
// Attention: For executing next lines of code, We must be sure that
// all filters already loaded :-(
// That can disturb our "load on demand feature". But we have no other chance!
- auto & cache = TheFilterCache::get();
+ auto & cache = GetTheFilterCache();
cache.load(FilterCache::E_CONTAINS_FILTERS);
- CacheItem lIProps;
- lIProps[PROPNAME_DOCUMENTSERVICE] <<= sPreSelDocumentService;
+ css::beans::NamedValue lIProps[] {
+ { PROPNAME_DOCUMENTSERVICE, css::uno::Any(sPreSelDocumentService) } };
lFilters = cache.getMatchingItemsByProps(FilterCache::E_FILTER, lIProps);
- // <- SAFE --------------------------
}
catch (const css::container::NoSuchElementException&)
{
@@ -751,21 +740,20 @@ void TypeDetection::impl_getPreselectionForDocumentService(
// is an easier job than removing them .-)
for (auto const& filter : lFilters)
{
- OUString aType = impl_getTypeFromFilter(filter);
+ OUString aType = impl_getTypeFromFilter(rGuard, filter);
if (aType.isEmpty())
continue;
- impl_getPreselectionForType(aType, aParsedURL, rFlatTypes, true);
+ impl_getPreselectionForType(rGuard, aType, aParsedURL, rFlatTypes, true);
}
}
-OUString TypeDetection::impl_getTypeFromFilter(const OUString& rFilterName)
+OUString TypeDetection::impl_getTypeFromFilter(std::unique_lock<std::mutex>& /*rGuard*/, const OUString& rFilterName)
{
CacheItem aFilter;
try
{
- osl::MutexGuard aLock(m_aLock);
- aFilter = TheFilterCache::get().getItem(FilterCache::E_FILTER, rFilterName);
+ aFilter = GetTheFilterCache().getItem(FilterCache::E_FILTER, rFilterName);
}
catch (const container::NoSuchElementException&)
{
@@ -778,6 +766,7 @@ OUString TypeDetection::impl_getTypeFromFilter(const OUString& rFilterName)
}
void TypeDetection::impl_getAllFormatTypes(
+ std::unique_lock<std::mutex>& rGuard,
const util::URL& aParsedURL, utl::MediaDescriptor const & rDescriptor, FlatDetection& rFlatTypes)
{
rFlatTypes.clear();
@@ -786,8 +775,7 @@ void TypeDetection::impl_getAllFormatTypes(
std::vector<OUString> aFilterNames;
try
{
- osl::MutexGuard aLock(m_aLock);
- auto & cache = TheFilterCache::get();
+ auto & cache = GetTheFilterCache();
cache.load(FilterCache::E_CONTAINS_FILTERS);
aFilterNames = cache.getItemNames(FilterCache::E_FILTER);
}
@@ -799,7 +787,7 @@ void TypeDetection::impl_getAllFormatTypes(
// Retrieve the default type for each of these filters, and store them.
for (auto const& filterName : aFilterNames)
{
- OUString aType = impl_getTypeFromFilter(filterName);
+ OUString aType = impl_getTypeFromFilter(rGuard, filterName);
if (aType.isEmpty())
continue;
@@ -812,7 +800,7 @@ void TypeDetection::impl_getAllFormatTypes(
{
// Get all types that match the URL alone.
FlatDetection aFlatByURL;
- TheFilterCache::get().detectFlatForURL(aParsedURL, aFlatByURL);
+ GetTheFilterCache().detectFlatForURL(aParsedURL, aFlatByURL);
for (auto const& elem : aFlatByURL)
{
FlatDetection::iterator itPos = std::find_if(rFlatTypes.begin(), rFlatTypes.end(), FindByType(elem.sType));
@@ -840,27 +828,153 @@ void TypeDetection::impl_getAllFormatTypes(
rFlatTypes.erase(last, rFlatTypes.end());
// Mark pre-selected type (if any) to have it prioritized.
- OUString sSelectedType = rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_TYPENAME(), OUString());
+ OUString sSelectedType = rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_TYPENAME, OUString());
if (!sSelectedType.isEmpty())
- impl_getPreselectionForType(sSelectedType, aParsedURL, rFlatTypes, false);
+ impl_getPreselectionForType(rGuard, sSelectedType, aParsedURL, rFlatTypes, false);
// Mark all types preferred by the current document service, to have it prioritized.
- OUString sSelectedDoc = rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_DOCUMENTSERVICE(), OUString());
+ OUString sSelectedDoc = rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_DOCUMENTSERVICE, OUString());
if (!sSelectedDoc.isEmpty())
- impl_getPreselectionForDocumentService(sSelectedDoc, aParsedURL, rFlatTypes);
+ impl_getPreselectionForDocumentService(rGuard, sSelectedDoc, aParsedURL, rFlatTypes);
+}
+
+
+static bool isBrokenZIP(const css::uno::Reference<css::io::XInputStream>& xStream,
+ const css::uno::Reference<css::uno::XComponentContext>& xContext)
+{
+ try
+ {
+ // Only consider seekable streams starting with "PK", to avoid false detections
+ css::uno::Reference<css::io::XSeekable> xSeek(xStream, css::uno::UNO_QUERY_THROW);
+ comphelper::ScopeGuard restorePos(
+ [xSeek, nPos = xSeek->getPosition()]
+ {
+ try
+ {
+ xSeek->seek(nPos);
+ }
+ catch (const css::uno::Exception&)
+ {
+ }
+ });
+ css::uno::Sequence<sal_Int8> magic(2);
+ xStream->readBytes(magic, 2);
+ if (magic.getLength() < 2 || magic[0] != 'P' || magic[1] != 'K')
+ return false;
+ }
+ catch (const css::uno::Exception&)
+ {
+ return false;
+ }
+
+ std::vector<css::uno::Any> aArguments{
+ css::uno::Any(xStream),
+ css::uno::Any(css::beans::NamedValue("AllowRemoveOnInsert", css::uno::Any(false))),
+ css::uno::Any(css::beans::NamedValue("StorageFormat",
+ css::uno::Any(css::embed::StorageFormats::ZIP))),
+ };
+ try
+ {
+ // If this is a broken ZIP package, or not a ZIP, this would throw ZipIOException
+ xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+ "com.sun.star.packages.comp.ZipPackage", comphelper::containerToSequence(aArguments),
+ xContext);
+ }
+ catch (const css::packages::zip::ZipIOException&)
+ {
+ // Now test if repair will succeed
+ aArguments.emplace_back(css::beans::NamedValue("RepairPackage", css::uno::Any(true)));
+ try
+ {
+ // If this is a broken ZIP package that can be repaired, this would succeed,
+ // and the result will be not empty
+ if (css::uno::Reference<css::beans::XPropertySet> xPackage{
+ xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+ "com.sun.star.packages.comp.ZipPackage",
+ comphelper::containerToSequence(aArguments), xContext),
+ css::uno::UNO_QUERY })
+ if (bool bHasElements; xPackage->getPropertyValue("HasElements") >>= bHasElements)
+ return bHasElements;
+ }
+ catch (const css::uno::Exception&)
+ {
+ }
+ }
+ catch (const css::uno::Exception&)
+ {
+ }
+ // The package is either not broken, or is not a repairable ZIP
+ return false;
}
OUString TypeDetection::impl_detectTypeFlatAndDeep( utl::MediaDescriptor& rDescriptor ,
const FlatDetection& lFlatTypes ,
bool bAllowDeep ,
- std::vector<OUString>& rUsedDetectors,
OUString& rLastChance )
{
// reset it everytimes, so the outside code can distinguish between
// a set and a not set value.
rLastChance.clear();
- rUsedDetectors.clear();
+
+ // tdf#96401: First of all, check if this is a broken ZIP package. Not doing this here would
+ // make some filters silently not recognize their content in broken packages, and some filters
+ // show a warning and mistakenly claim own content based on user choice.
+ if (bAllowDeep && !rDescriptor.getUnpackedValueOrDefault("RepairPackage", false)
+ && rDescriptor.getUnpackedValueOrDefault("RepairAllowed", true)
+ && rDescriptor.contains(utl::MediaDescriptor::PROP_INTERACTIONHANDLER))
+ {
+ try
+ {
+ impl_openStream(rDescriptor);
+ if (auto xStream = rDescriptor.getUnpackedValueOrDefault(
+ utl::MediaDescriptor::PROP_INPUTSTREAM,
+ css::uno::Reference<css::io::XInputStream>()))
+ {
+ css::uno::Reference<css::uno::XComponentContext> xContext;
+
+ // SAFE ->
+ {
+ std::unique_lock aLock(m_aMutex);
+ xContext = m_xContext;
+ }
+ // <- SAFE
+
+ if (isBrokenZIP(xStream, xContext))
+ {
+ if (css::uno::Reference<css::task::XInteractionHandler> xInteraction{
+ rDescriptor.getValue(utl::MediaDescriptor::PROP_INTERACTIONHANDLER),
+ css::uno::UNO_QUERY })
+ {
+ INetURLObject aURL(rDescriptor.getUnpackedValueOrDefault(
+ utl::MediaDescriptor::PROP_URL, OUString()));
+ OUString aDocumentTitle
+ = aURL.getName(INetURLObject::LAST_SEGMENT, true,
+ INetURLObject::DecodeMechanism::WithCharset);
+
+ // Ask the user whether they wants to try to repair
+ RequestPackageReparation aRequest(aDocumentTitle);
+ xInteraction->handle(aRequest.GetRequest());
+
+ if (aRequest.isApproved())
+ {
+ // lok: we want to overwrite file in jail, so don't use template flag
+ const bool bIsLOK = comphelper::LibreOfficeKit::isActive();
+ rDescriptor[utl::MediaDescriptor::PROP_DOCUMENTTITLE] <<= aDocumentTitle;
+ rDescriptor[utl::MediaDescriptor::PROP_ASTEMPLATE] <<= !bIsLOK;
+ rDescriptor["RepairPackage"] <<= true;
+ }
+ else
+ rDescriptor["RepairAllowed"] <<= false; // Do not ask again
+ }
+ }
+ }
+ }
+ catch (const css::uno::Exception&)
+ {
+ // No problem
+ }
+ }
// step over all possible types for this URL.
// solutions:
@@ -898,9 +1012,9 @@ OUString TypeDetection::impl_detectTypeFlatAndDeep( utl::MediaDescriptor& r
try
{
// SAFE -> ----------------------------------
- osl::ClearableMutexGuard aLock(m_aLock);
- CacheItem aType = TheFilterCache::get().getItem(FilterCache::E_TYPE, sFlatType);
- aLock.clear();
+ std::unique_lock aLock(m_aMutex);
+ CacheItem aType = GetTheFilterCache().getItem(FilterCache::E_TYPE, sFlatType);
+ aLock.unlock();
OUString sDetectService;
aType[PROPNAME_DETECTSERVICE] >>= sDetectService;
@@ -918,10 +1032,6 @@ OUString TypeDetection::impl_detectTypeFlatAndDeep( utl::MediaDescriptor& r
continue;
}
- // don't forget to add every real asked deep detection service here.
- // Such detectors will be ignored if may be "impl_detectTypeDeepOnly()"
- // must be called later!
- rUsedDetectors.push_back(sDetectService);
OUString sDeepType = impl_askDetectService(sDetectService, rDescriptor);
// d)
@@ -942,7 +1052,7 @@ void TypeDetection::impl_seekStreamToZero(utl::MediaDescriptor const & rDescript
// try to seek to 0 ...
// But because XSeekable is an optional interface ... try it only .-)
css::uno::Reference< css::io::XInputStream > xStream = rDescriptor.getUnpackedValueOrDefault(
- utl::MediaDescriptor::PROP_INPUTSTREAM(),
+ utl::MediaDescriptor::PROP_INPUTSTREAM,
css::uno::Reference< css::io::XInputStream >());
css::uno::Reference< css::io::XSeekable > xSeek(xStream, css::uno::UNO_QUERY);
if (!xSeek.is())
@@ -980,7 +1090,7 @@ OUString TypeDetection::impl_askDetectService(const OUString& sDet
// SAFE ->
{
- osl::MutexGuard aLock(m_aLock);
+ std::unique_lock aLock(m_aMutex);
xContext = m_xContext;
}
// <- SAFE
@@ -1051,18 +1161,18 @@ OUString TypeDetection::impl_askDetectService(const OUString& sDet
OUString TypeDetection::impl_askUserForTypeAndFilterIfAllowed(utl::MediaDescriptor& rDescriptor)
{
css::uno::Reference< css::task::XInteractionHandler > xInteraction =
- rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_INTERACTIONHANDLER(),
+ rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_INTERACTIONHANDLER,
css::uno::Reference< css::task::XInteractionHandler >());
if (!xInteraction.is())
return OUString();
OUString sURL =
- rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(),
+ rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL,
OUString());
css::uno::Reference< css::io::XInputStream > xStream =
- rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_INPUTSTREAM(),
+ rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_INPUTSTREAM,
css::uno::Reference< css::io::XInputStream >());
// Don't disturb the user for "non existing files - means empty URLs" or
@@ -1096,9 +1206,8 @@ OUString TypeDetection::impl_askUserForTypeAndFilterIfAllowed(utl::MediaDescript
OUString sFilter = aRequest.getFilter();
if (!impl_validateAndSetFilterOnDescriptor(rDescriptor, sFilter))
return OUString();
-
OUString sType;
- rDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] >>= sType;
+ rDescriptor[utl::MediaDescriptor::PROP_TYPENAME] >>= sType;
return sType;
}
catch(const css::uno::Exception&)
@@ -1111,8 +1220,8 @@ OUString TypeDetection::impl_askUserForTypeAndFilterIfAllowed(utl::MediaDescript
void TypeDetection::impl_openStream(utl::MediaDescriptor& rDescriptor)
{
bool bSuccess = false;
- OUString sURL = rDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_URL(), OUString() );
- bool bRequestedReadOnly = rDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_READONLY(), false );
+ OUString sURL = rDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_URL, OUString() );
+ bool bRequestedReadOnly = rDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_READONLY, false );
if ( comphelper::isFileUrl( sURL ) )
{
// OOo uses own file locking mechanics in case of local file
@@ -1124,7 +1233,7 @@ void TypeDetection::impl_openStream(utl::MediaDescriptor& rDescriptor)
if ( !bSuccess )
throw css::uno::Exception(
"Could not open stream for <" + sURL + ">",
- static_cast<OWeakObject *>(this));
+ getXWeak());
if ( !bRequestedReadOnly )
{
@@ -1132,15 +1241,15 @@ void TypeDetection::impl_openStream(utl::MediaDescriptor& rDescriptor)
// this argument should be either removed or an additional argument should be added so that application
// can separate the case when the user explicitly requests readonly document.
// The current solution is to remove it here.
- rDescriptor.erase( utl::MediaDescriptor::PROP_READONLY() );
+ rDescriptor.erase( utl::MediaDescriptor::PROP_READONLY );
}
}
void TypeDetection::impl_removeTypeFilterFromDescriptor(utl::MediaDescriptor& rDescriptor)
{
- utl::MediaDescriptor::iterator pItType = rDescriptor.find(utl::MediaDescriptor::PROP_TYPENAME() );
- utl::MediaDescriptor::iterator pItFilter = rDescriptor.find(utl::MediaDescriptor::PROP_FILTERNAME());
+ utl::MediaDescriptor::iterator pItType = rDescriptor.find(utl::MediaDescriptor::PROP_TYPENAME );
+ utl::MediaDescriptor::iterator pItFilter = rDescriptor.find(utl::MediaDescriptor::PROP_FILTERNAME);
if (pItType != rDescriptor.end())
rDescriptor.erase(pItType);
if (pItFilter != rDescriptor.end())
@@ -1151,16 +1260,11 @@ void TypeDetection::impl_removeTypeFilterFromDescriptor(utl::MediaDescriptor& rD
bool TypeDetection::impl_validateAndSetTypeOnDescriptor( utl::MediaDescriptor& rDescriptor,
const OUString& sType )
{
- // SAFE ->
+ if (GetTheFilterCache().hasItem(FilterCache::E_TYPE, sType))
{
- osl::MutexGuard aLock(m_aLock);
- if (TheFilterCache::get().hasItem(FilterCache::E_TYPE, sType))
- {
- rDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sType;
- return true;
- }
+ rDescriptor[utl::MediaDescriptor::PROP_TYPENAME] <<= sType;
+ return true;
}
- // <- SAFE
// remove all related information from the descriptor
impl_removeTypeFilterFromDescriptor(rDescriptor);
@@ -1168,25 +1272,19 @@ bool TypeDetection::impl_validateAndSetTypeOnDescriptor( utl::MediaDescript
}
-bool TypeDetection::impl_validateAndSetFilterOnDescriptor( utl::MediaDescriptor& rDescriptor,
- const OUString& sFilter )
+bool TypeDetection::impl_validateAndSetFilterOnDescriptor( utl::MediaDescriptor& rDescriptor,
+ const OUString& sFilter )
{
try
{
- // SAFE ->
- osl::ClearableMutexGuard aLock(m_aLock);
-
- auto & cache = TheFilterCache::get();
+ auto & cache = GetTheFilterCache();
CacheItem aFilter = cache.getItem(FilterCache::E_FILTER, sFilter);
OUString sType;
aFilter[PROPNAME_TYPE] >>= sType;
- aLock.clear();
- // <- SAFE
-
// found valid type and filter => set it on the given descriptor
- rDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= sType ;
- rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter;
+ rDescriptor[utl::MediaDescriptor::PROP_TYPENAME ] <<= sType ;
+ rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME] <<= sFilter;
return true;
}
catch(const css::container::NoSuchElementException&){}
diff --git a/filter/source/config/cache/typedetection.hxx b/filter/source/config/cache/typedetection.hxx
index b0281d5f983d..6ff70e64eba4 100644
--- a/filter/source/config/cache/typedetection.hxx
+++ b/filter/source/config/cache/typedetection.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_TYPEDETECTION_HXX
-#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_TYPEDETECTION_HXX
+#pragma once
#include "basecontainer.hxx"
#include <com/sun/star/document/XTypeDetection.hpp>
@@ -25,6 +24,7 @@
#include <unotools/mediadescriptor.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/implbase.hxx>
+#include <comphelper/compbase.hxx>
namespace filter::config {
@@ -70,18 +70,21 @@ public:
private:
- bool impl_getPreselectionForType(
+ static bool impl_getPreselectionForType(
+ std::unique_lock<std::mutex>& rGuard,
const OUString& sPreSelType, const css::util::URL& aParsedURL, FlatDetection& rFlatTypes, bool bDocService);
- void impl_getPreselectionForDocumentService(
+ static void impl_getPreselectionForDocumentService(
+ std::unique_lock<std::mutex>& rGuard,
const OUString& sPreSelDocumentService, const css::util::URL& aParsedURL, FlatDetection& rFlatTypes);
- OUString impl_getTypeFromFilter(const OUString& rFilterName);
+ static OUString impl_getTypeFromFilter(std::unique_lock<std::mutex>& rGuard, const OUString& rFilterName);
/**
* Get all format types that we handle.
*/
- void impl_getAllFormatTypes(
+ static void impl_getAllFormatTypes(
+ std::unique_lock<std::mutex>& rGuard,
const css::util::URL& aParsedURL, utl::MediaDescriptor const & rDescriptor,
FlatDetection& rFlatTypes);
@@ -99,10 +102,6 @@ private:
was used without getting any result. Then this "last-chance-type"
should be returned. Of course using of it can fail too ... but it's a try :-)
- As an optimization - this method collects the names of all used deep
- detection services. This information can be useful inside the may be
- afterwards called method "impl_detectTypeDeepOnly()"!
-
@param rDescriptor
provides any easy-to-use stl interface to the MediaDescriptor.
Note : Its content will be adapted to returned result of this method.
@@ -117,12 +116,6 @@ private:
Note: it will be reset to an empty string every time. So
a set value of "rLastChance" can be detected outside very easy.
- @param rUsedDetectors
- used as [out] parameter. It contains a list of names of all deep
- detection services, which was used inside this method.
- Such detectors can be ignored later if "impl_detectTypeDeepOnly()"
- is called.
-
@param bAllowDeep
enable/disable using of a might existing deep detection service.
@@ -133,7 +126,6 @@ private:
OUString impl_detectTypeFlatAndDeep( utl::MediaDescriptor& rDescriptor ,
const FlatDetection& lFlatTypes ,
bool bAllowDeep ,
- std::vector<OUString>& rUsedDetectors,
OUString& rLastChance );
@@ -184,7 +176,7 @@ private:
@return [string]
a valid type name or an empty string if user canceled interaction.
*/
- OUString impl_askUserForTypeAndFilterIfAllowed(utl::MediaDescriptor& rDescriptor);
+ static OUString impl_askUserForTypeAndFilterIfAllowed(utl::MediaDescriptor& rDescriptor);
/** @short check if an input stream is already part of the
@@ -241,8 +233,8 @@ private:
@return TRUE the specified type and its registrations was valid(!) and
could be set on the descriptor.
*/
- bool impl_validateAndSetTypeOnDescriptor( utl::MediaDescriptor& rDescriptor,
- const OUString& sType );
+ static bool impl_validateAndSetTypeOnDescriptor( utl::MediaDescriptor& rDescriptor,
+ const OUString& sType );
/** @short validate the specified filter and its relationships
@@ -262,7 +254,8 @@ private:
@return TRUE the specified type and its registrations was valid(!) and
could be set on the descriptor.
*/
- bool impl_validateAndSetFilterOnDescriptor( utl::MediaDescriptor& rDescriptor,
+ static bool impl_validateAndSetFilterOnDescriptor(
+ utl::MediaDescriptor& rDescriptor,
const OUString& sFilter );
@@ -328,15 +321,14 @@ public:
};
-class TerminateDetection : public cppu::WeakComponentImplHelper<css::frame::XTerminateListener>
+class TerminateDetection : public comphelper::WeakComponentImplHelper<css::frame::XTerminateListener>
{
private:
- osl::Mutex m_aLock;
TypeDetection* m_pTypeDetection;
public:
- using cppu::WeakComponentImplHelperBase::disposing;
+ using comphelper::WeakComponentImplHelperBase::disposing;
virtual void SAL_CALL disposing(const css::lang::EventObject&) override
{
}
@@ -352,14 +344,11 @@ public:
}
TerminateDetection(TypeDetection* pTypeDetection)
- : cppu::WeakComponentImplHelper<css::frame::XTerminateListener>(m_aLock)
- , m_pTypeDetection(pTypeDetection)
+ : m_pTypeDetection(pTypeDetection)
{
}
};
}
-#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_TYPEDETECTION_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/config/fragments/filters/APNG___Animated_Portable_Network_Graphic.xcu b/filter/source/config/fragments/filters/APNG___Animated_Portable_Network_Graphic.xcu
new file mode 100644
index 000000000000..79c118c46d10
--- /dev/null
+++ b/filter/source/config/fragments/filters/APNG___Animated_Portable_Network_Graphic.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="APNG - Animated Portable Network Graphic" oor:op="replace">
+ <prop oor:name="Flags"><value>IMPORT ALIEN</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">APNG - Animated Portable Network Graphics</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>apng_Animated_Portable_Network_Graphic</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/EMZ___Compressed_MS_Windows_Metafile.xcu b/filter/source/config/fragments/filters/EMZ___Compressed_MS_Windows_Metafile.xcu
new file mode 100644
index 000000000000..4d76ea375bad
--- /dev/null
+++ b/filter/source/config/fragments/filters/EMZ___Compressed_MS_Windows_Metafile.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="EMZ - Compressed MS Windows Metafile" oor:op="replace">
+ <prop oor:name="Flags"><value>IMPORT ALIEN</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">EMZ - Compressed Enhanced Metafile</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>emz_Compressed_MS_Windows_Metafile</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/MS_PowerPoint_97.xcu b/filter/source/config/fragments/filters/MS_PowerPoint_97.xcu
index eab7c73e316d..73ea306af0b1 100644
--- a/filter/source/config/fragments/filters/MS_PowerPoint_97.xcu
+++ b/filter/source/config/fragments/filters/MS_PowerPoint_97.xcu
@@ -19,7 +19,7 @@
<prop oor:name="Flags"><value>IMPORT EXPORT ALIEN</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"/>
- <prop oor:name="UserData"><value>sdfilt</value></prop>
+ <prop oor:name="UserData"><value>sd</value></prop>
<prop oor:name="UIName">
<value xml:lang="en-US">PowerPoint 97–2003</value>
</prop>
diff --git a/filter/source/config/fragments/filters/MS_PowerPoint_97_AutoPlay.xcu b/filter/source/config/fragments/filters/MS_PowerPoint_97_AutoPlay.xcu
index 24683ea1b8b7..62358fa79ec0 100644
--- a/filter/source/config/fragments/filters/MS_PowerPoint_97_AutoPlay.xcu
+++ b/filter/source/config/fragments/filters/MS_PowerPoint_97_AutoPlay.xcu
@@ -19,7 +19,7 @@
<prop oor:name="Flags"><value>IMPORT EXPORT ALIEN STARTPRESENTATION</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"/>
- <prop oor:name="UserData"><value>sdfilt</value></prop>
+ <prop oor:name="UserData"><value>sd</value></prop>
<prop oor:name="UIName">
<value xml:lang="en-US">PowerPoint 97–2003 AutoPlay</value>
</prop>
diff --git a/filter/source/config/fragments/filters/MS_PowerPoint_97_Vorlage.xcu b/filter/source/config/fragments/filters/MS_PowerPoint_97_Vorlage.xcu
index 4de589b1d908..098b2947afee 100644
--- a/filter/source/config/fragments/filters/MS_PowerPoint_97_Vorlage.xcu
+++ b/filter/source/config/fragments/filters/MS_PowerPoint_97_Vorlage.xcu
@@ -19,7 +19,7 @@
<prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH ALIEN</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"/>
- <prop oor:name="UserData"><value>sdfilt</value></prop>
+ <prop oor:name="UserData"><value>sd</value></prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>impress_MS_PowerPoint_97_Vorlage</value></prop>
<prop oor:name="TemplateName"/>
diff --git a/filter/source/config/fragments/filters/MS_Word_2007_XML.xcu b/filter/source/config/fragments/filters/MS_Word_2007_XML.xcu
index c4e6f828cc77..91c7e02d226f 100644
--- a/filter/source/config/fragments/filters/MS_Word_2007_XML.xcu
+++ b/filter/source/config/fragments/filters/MS_Word_2007_XML.xcu
@@ -21,8 +21,9 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.WriterFilter</value></prop>
<prop oor:name="UserData"><value>OXML</value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">Word 2007–365</value>
+ <value xml:lang="en-US">Word 2007</value>
</prop>
+ <!-- ECMA 376 1st edition -->
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>writer_MS_Word_2007</value></prop>
<prop oor:name="TemplateName"/>
diff --git a/filter/source/config/fragments/filters/MS_Word_2007_XML_Template.xcu b/filter/source/config/fragments/filters/MS_Word_2007_XML_Template.xcu
index cd81c9943032..ab1823a70316 100644
--- a/filter/source/config/fragments/filters/MS_Word_2007_XML_Template.xcu
+++ b/filter/source/config/fragments/filters/MS_Word_2007_XML_Template.xcu
@@ -20,7 +20,8 @@
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.WriterFilter</value></prop>
<prop oor:name="UserData"><value>OXML</value></prop>
- <prop oor:name="UIName"><value xml:lang="en-US">Word 2007–365 Template</value></prop>
+ <prop oor:name="UIName"><value xml:lang="en-US">Word 2007 Template</value></prop>
+ <!-- ECMA 376 1st edition -->
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>writer_MS_Word_2007_Template</value></prop>
<prop oor:name="TemplateName"/>
diff --git a/filter/source/config/fragments/filters/MS_Word_2007_XML_VBA.xcu b/filter/source/config/fragments/filters/MS_Word_2007_XML_VBA.xcu
index 0f1bdb7239e4..87b561b025f7 100644
--- a/filter/source/config/fragments/filters/MS_Word_2007_XML_VBA.xcu
+++ b/filter/source/config/fragments/filters/MS_Word_2007_XML_VBA.xcu
@@ -10,7 +10,8 @@
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.WriterFilter</value></prop>
<prop oor:name="UserData"><value>OXML</value></prop>
- <prop oor:name="UIName"><value xml:lang="en-US">Word 2007–365 VBA</value></prop>
+ <prop oor:name="UIName"><value xml:lang="en-US">Word 2007 VBA</value></prop>
+ <!-- ECMA 376 1st edition -->
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>writer_MS_Word_2007_VBA</value></prop>
<prop oor:name="TemplateName"/>
diff --git a/filter/source/config/fragments/filters/OOXML_Text.xcu b/filter/source/config/fragments/filters/OOXML_Text.xcu
index ebaab6406fd6..bbcceb1713d8 100644
--- a/filter/source/config/fragments/filters/OOXML_Text.xcu
+++ b/filter/source/config/fragments/filters/OOXML_Text.xcu
@@ -16,12 +16,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<node oor:name="Office Open XML Text" oor:op="replace">
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER ENCRYPTION PASSWORDTOMODIFY</value></prop>
+ <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER ENCRYPTION PASSWORDTOMODIFY SUPPORTSSIGNING</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.WriterFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">Office Open XML Text (Transitional)</value>
+ <value xml:lang="en-US">Word 2010–365 Document</value>
</prop>
<!-- ISO/IEC 29500:2008 -->
<prop oor:name="FileFormatVersion"><value>1</value></prop>
diff --git a/filter/source/config/fragments/filters/OOXML_Text_Template.xcu b/filter/source/config/fragments/filters/OOXML_Text_Template.xcu
index 88fbf7047140..55d326563bf6 100644
--- a/filter/source/config/fragments/filters/OOXML_Text_Template.xcu
+++ b/filter/source/config/fragments/filters/OOXML_Text_Template.xcu
@@ -16,12 +16,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<node oor:name="Office Open XML Text Template" oor:op="replace">
- <prop oor:name="Flags"><value>IMPORT ALIEN 3RDPARTYFILTER TEMPLATE TEMPLATEPATH</value></prop>
+ <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER TEMPLATE TEMPLATEPATH</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.WriterFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">Office Open XML Text Template (Transitional)</value>
+ <value xml:lang="en-US">Word 2010–365 Template</value>
</prop>
<!-- ISO/IEC 29500:2008 -->
<prop oor:name="FileFormatVersion"><value>1</value></prop>
diff --git a/filter/source/config/fragments/filters/PNG___Portable_Network_Graphic.xcu b/filter/source/config/fragments/filters/PNG___Portable_Network_Graphic.xcu
index 6a0b9d545b6b..b321ab6da49e 100644
--- a/filter/source/config/fragments/filters/PNG___Portable_Network_Graphic.xcu
+++ b/filter/source/config/fragments/filters/PNG___Portable_Network_Graphic.xcu
@@ -21,7 +21,7 @@
<prop oor:name="FilterService"/>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">PNG - Portable Network Graphic</value>
+ <value xml:lang="en-US">PNG - Portable Network Graphics</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>png_Portable_Network_Graphic</value></prop>
diff --git a/filter/source/config/fragments/filters/SVGZ___Compressed_Scalable_Vector_Graphics.xcu b/filter/source/config/fragments/filters/SVGZ___Compressed_Scalable_Vector_Graphics.xcu
new file mode 100644
index 000000000000..35753a1f1a8b
--- /dev/null
+++ b/filter/source/config/fragments/filters/SVGZ___Compressed_Scalable_Vector_Graphics.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="SVGZ - Compressed Scalable Vector Graphics" oor:op="replace">
+ <prop oor:name="Flags"><value>IMPORT ALIEN 3RDPARTYFILTER PREFERRED</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.SVGFilter</value></prop>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">SVGZ - Compressed Scalable Vector Graphics</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>svgz_Compressed_Scalable_Vector_Graphics</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.presentation.PresentationDocument</value></prop>
+ </node>
diff --git a/filter/source/graphicfilter/idxf/idxf.cxx b/filter/source/config/fragments/filters/WEBP___WebP.xcu
index ad75d6b5e1c3..9c650e3de42e 100644
--- a/filter/source/graphicfilter/idxf/idxf.cxx
+++ b/filter/source/config/fragments/filters/WEBP___WebP.xcu
@@ -1,5 +1,4 @@
-/* -*- 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
@@ -15,31 +14,17 @@
* 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 <vcl/gdimtf.hxx>
-#include <vcl/graph.hxx>
-#include "dxf2mtf.hxx"
-
-class FilterConfigItem;
-
-//================== GraphicImport - the exported function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-idxGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
-{
- DXFRepresentation aDXF;
- DXF2GDIMetaFile aConverter;
- GDIMetaFile aMTF;
-
- if ( !aDXF.Read( rStream ) )
- return false;
- if ( !aConverter.Convert( aDXF, aMTF, 60, 100 ) )
- return false;
- rGraphic = Graphic(aMTF);
-
- return true;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+-->
+ <node oor:name="WEBP - WebP" oor:op="replace">
+ <prop oor:name="Flags"><value>IMPORT ALIEN</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WEBP - WebP Image</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>webp_WebP</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/WMZ___Compressed_MS_Windows_Metafile.xcu b/filter/source/config/fragments/filters/WMZ___Compressed_MS_Windows_Metafile.xcu
new file mode 100644
index 000000000000..875dfb8ac295
--- /dev/null
+++ b/filter/source/config/fragments/filters/WMZ___Compressed_MS_Windows_Metafile.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="WMZ - Compressed MS Windows Metafile" oor:op="replace">
+ <prop oor:name="Flags"><value>IMPORT ALIEN</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WMZ - Compressed Windows Metafile</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>wmz_Compressed_MS_Windows_Metafile</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/calc_Parquet.xcu b/filter/source/config/fragments/filters/calc_Parquet.xcu
new file mode 100644
index 000000000000..5b0fea8257bb
--- /dev/null
+++ b/filter/source/config/fragments/filters/calc_Parquet.xcu
@@ -0,0 +1,19 @@
+<!--
+ * 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/.
+-->
+<node oor:name="Apache Parquet Spreadsheet" oor:op="replace">
+ <prop oor:name="Flags"><value>IMPORT ALIEN PREFERRED</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"/>
+ <prop oor:name="Type"><value>Apache Parquet</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">Apache Parquet Spreadsheet</value>
+ </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/calc_png_Export.xcu b/filter/source/config/fragments/filters/calc_png_Export.xcu
index a67677abed5e..bdc49e484d42 100644
--- a/filter/source/config/fragments/filters/calc_png_Export.xcu
+++ b/filter/source/config/fragments/filters/calc_png_Export.xcu
@@ -11,7 +11,7 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.GraphicExportFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">PNG - Portable Network Graphic</value>
+ <value xml:lang="en-US">PNG - Portable Network Graphics</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>png_Portable_Network_Graphic</value></prop>
diff --git a/filter/source/config/fragments/filters/calc_webp_Export.xcu b/filter/source/config/fragments/filters/calc_webp_Export.xcu
new file mode 100644
index 000000000000..a6e5d18a3347
--- /dev/null
+++ b/filter/source/config/fragments/filters/calc_webp_Export.xcu
@@ -0,0 +1,20 @@
+<!--
+ * 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/.
+-->
+ <node oor:name="calc_webp_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER SUPPORTSSELECTION</value></prop>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.GraphicExportFilter</value></prop>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WEBP - WebP Image</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>webp_WebP</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/draw_apng_Export.xcu b/filter/source/config/fragments/filters/draw_apng_Export.xcu
new file mode 100644
index 000000000000..f413ca74711a
--- /dev/null
+++ b/filter/source/config/fragments/filters/draw_apng_Export.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="draw_apng_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN SUPPORTSSELECTION</value></prop>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">APNG - Animated Portable Network Graphics</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>apng_Animated_Portable_Network_Graphic</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/draw_emz_Export.xcu b/filter/source/config/fragments/filters/draw_emz_Export.xcu
new file mode 100644
index 000000000000..5c1aae3a761c
--- /dev/null
+++ b/filter/source/config/fragments/filters/draw_emz_Export.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="draw_emz_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN SUPPORTSSELECTION</value></prop>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">EMZ - Compressed Enhanced Metafile</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>emz_Compressed_MS_Windows_Metafile</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/draw_html_Export.xcu b/filter/source/config/fragments/filters/draw_html_Export.xcu
index 179c7bb7edc0..ebb14b75b19f 100644
--- a/filter/source/config/fragments/filters/draw_html_Export.xcu
+++ b/filter/source/config/fragments/filters/draw_html_Export.xcu
@@ -17,8 +17,8 @@
-->
<node oor:name="draw_html_Export" oor:op="replace">
<prop oor:name="Flags"><value>EXPORT ALIEN</value></prop>
- <prop oor:name="UIComponent"><value>com.sun.star.comp.draw.SdHtmlOptionsDialog</value></prop>
- <prop oor:name="FilterService"/>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>graphic_HTML</value></prop>
diff --git a/filter/source/config/fragments/filters/draw_png_Export.xcu b/filter/source/config/fragments/filters/draw_png_Export.xcu
index a5517a8c68dc..5ba112cc53ea 100644
--- a/filter/source/config/fragments/filters/draw_png_Export.xcu
+++ b/filter/source/config/fragments/filters/draw_png_Export.xcu
@@ -21,7 +21,7 @@
<prop oor:name="FilterService"/>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">PNG - Portable Network Graphic</value>
+ <value xml:lang="en-US">PNG - Portable Network Graphics</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>png_Portable_Network_Graphic</value></prop>
diff --git a/filter/source/config/fragments/filters/draw_svgz_Export.xcu b/filter/source/config/fragments/filters/draw_svgz_Export.xcu
new file mode 100644
index 000000000000..59af9fa1d5d4
--- /dev/null
+++ b/filter/source/config/fragments/filters/draw_svgz_Export.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="draw_svgz_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.SVGFilter</value></prop>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">SVGZ - Compressed Scalable Vector Graphics</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>svgz_Compressed_Scalable_Vector_Graphics</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/draw_webp_Export.xcu b/filter/source/config/fragments/filters/draw_webp_Export.xcu
new file mode 100644
index 000000000000..e6da69197a61
--- /dev/null
+++ b/filter/source/config/fragments/filters/draw_webp_Export.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="draw_webp_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN SUPPORTSSELECTION</value></prop>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WEBP - WebP Image</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>webp_WebP</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/draw_wmz_Export.xcu b/filter/source/config/fragments/filters/draw_wmz_Export.xcu
new file mode 100644
index 000000000000..272880aa4b0a
--- /dev/null
+++ b/filter/source/config/fragments/filters/draw_wmz_Export.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="draw_wmz_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN SUPPORTSSELECTION</value></prop>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WMZ - Compressed Windows Metafile</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>wmz_Compressed_MS_Windows_Metafile</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/impress_html_Export.xcu b/filter/source/config/fragments/filters/impress_html_Export.xcu
index 65a5c5dadf78..1e0fb435e01e 100644
--- a/filter/source/config/fragments/filters/impress_html_Export.xcu
+++ b/filter/source/config/fragments/filters/impress_html_Export.xcu
@@ -17,8 +17,8 @@
-->
<node oor:name="impress_html_Export" oor:op="replace">
<prop oor:name="Flags"><value>EXPORT ALIEN</value></prop>
- <prop oor:name="UIComponent"><value>com.sun.star.comp.draw.SdHtmlOptionsDialog</value></prop>
- <prop oor:name="FilterService"/>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>graphic_HTML</value></prop>
diff --git a/filter/source/config/fragments/filters/impress_png_Export.xcu b/filter/source/config/fragments/filters/impress_png_Export.xcu
index f4884175bab1..f2de7528d734 100644
--- a/filter/source/config/fragments/filters/impress_png_Export.xcu
+++ b/filter/source/config/fragments/filters/impress_png_Export.xcu
@@ -21,7 +21,7 @@
<prop oor:name="FilterService"/>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">PNG - Portable Network Graphic</value>
+ <value xml:lang="en-US">PNG - Portable Network Graphics</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>png_Portable_Network_Graphic</value></prop>
diff --git a/filter/source/config/fragments/filters/impress_webp_Export.xcu b/filter/source/config/fragments/filters/impress_webp_Export.xcu
new file mode 100644
index 000000000000..00284a272cba
--- /dev/null
+++ b/filter/source/config/fragments/filters/impress_webp_Export.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="impress_webp_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN SUPPORTSSELECTION</value></prop>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="FilterService"/>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WEBP - WebP Image</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>webp_WebP</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.presentation.PresentationDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/writer_indexing_export.xcu b/filter/source/config/fragments/filters/writer_indexing_export.xcu
new file mode 100644
index 000000000000..28cbe5b5b055
--- /dev/null
+++ b/filter/source/config/fragments/filters/writer_indexing_export.xcu
@@ -0,0 +1,22 @@
+<!--
+ * 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/.
+ *
+-->
+
+<node oor:name="writer_indexing_export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.IndexingExportFilter</value></prop>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">Writer Indexing Export XML</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>writer_indexing_export_xml</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
+</node>
diff --git a/filter/source/config/fragments/filters/writer_png_Export.xcu b/filter/source/config/fragments/filters/writer_png_Export.xcu
index 8dd58b35139c..1ea189ee6519 100644
--- a/filter/source/config/fragments/filters/writer_png_Export.xcu
+++ b/filter/source/config/fragments/filters/writer_png_Export.xcu
@@ -21,7 +21,7 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.GraphicExportFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">PNG - Portable Network Graphic</value>
+ <value xml:lang="en-US">PNG - Portable Network Graphics</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>png_Portable_Network_Graphic</value></prop>
diff --git a/filter/source/config/fragments/filters/writer_web_png_Export.xcu b/filter/source/config/fragments/filters/writer_web_png_Export.xcu
index 424161cbc071..4c44173bf5bb 100644
--- a/filter/source/config/fragments/filters/writer_web_png_Export.xcu
+++ b/filter/source/config/fragments/filters/writer_web_png_Export.xcu
@@ -12,7 +12,7 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.GraphicExportFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">PNG - Portable Network Graphic</value>
+ <value xml:lang="en-US">PNG - Portable Network Graphics</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>png_Portable_Network_Graphic</value></prop>
diff --git a/filter/source/config/fragments/filters/writer_web_webp_Export.xcu b/filter/source/config/fragments/filters/writer_web_webp_Export.xcu
new file mode 100644
index 000000000000..5273bb72228b
--- /dev/null
+++ b/filter/source/config/fragments/filters/writer_web_webp_Export.xcu
@@ -0,0 +1,21 @@
+<!--
+ * 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/.
+ *
+-->
+ <node oor:name="writer_web_webp_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER</value></prop>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.GraphicExportFilter</value></prop>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WEBP - WebP Image</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>webp_WebP</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.text.WebDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/filters/writer_webp_Export.xcu b/filter/source/config/fragments/filters/writer_webp_Export.xcu
new file mode 100644
index 000000000000..ceb56a8c035f
--- /dev/null
+++ b/filter/source/config/fragments/filters/writer_webp_Export.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="writer_webp_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER</value></prop>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.GraphicExportFilter</value></prop>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WEBP - WebP Image</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>webp_WebP</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/apng_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/apng_Export.xcu
new file mode 100644
index 000000000000..2bf240fa801a
--- /dev/null
+++ b/filter/source/config/fragments/internalgraphicfilters/apng_Export.xcu
@@ -0,0 +1,27 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="apng_Export" oor:op="replace" >
+ <prop oor:name="Type"><value>apng_Animated_Portable_Network_Graphic</value></prop>
+ <prop oor:name="FormatName"><value>SVEAPNG</value></prop>
+ <prop oor:name="RealFilterName"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">APNG - Animated Portable Network Graphics</value>
+ </prop>
+ <prop oor:name="Flags"><value>EXPORT</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/dxf_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/dxf_Import.xcu
index 1ab3279bd809..d4ce34e28b1e 100644
--- a/filter/source/config/fragments/internalgraphicfilters/dxf_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/dxf_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="dxf_Import" oor:op="replace" >
- <prop oor:name="Type"><value>dxf_AutoCAD_Interchange</value></prop>
- <prop oor:name="FormatName"><value>idx</value></prop>
- <prop oor:name="RealFilterName"><value>DXF - AutoCAD Interchange</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">DXF - AutoCAD Interchange Format</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="dxf_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>dxf_AutoCAD_Interchange</value></prop>
+ <prop oor:name="FormatName"><value>SVDXF</value></prop>
+ <prop oor:name="RealFilterName"><value>DXF - AutoCAD Interchange</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">DXF - AutoCAD Interchange Format</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/emz_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/emz_Export.xcu
new file mode 100644
index 000000000000..40ccb11105b3
--- /dev/null
+++ b/filter/source/config/fragments/internalgraphicfilters/emz_Export.xcu
@@ -0,0 +1,27 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="emz_Export" oor:op="replace" >
+ <prop oor:name="Type"><value>emz_Compressed_MS_Windows_Metafile</value></prop>
+ <prop oor:name="FormatName"><value>SVEMZ</value></prop>
+ <prop oor:name="RealFilterName"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">EMZ - Compressed Enhanced Metafile</value>
+ </prop>
+ <prop oor:name="Flags"><value>EXPORT</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/emz_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/emz_Import.xcu
new file mode 100644
index 000000000000..590ef29d567b
--- /dev/null
+++ b/filter/source/config/fragments/internalgraphicfilters/emz_Import.xcu
@@ -0,0 +1,27 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="emz_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>emz_Compressed_MS_Windows_Metafile</value></prop>
+ <prop oor:name="FormatName"><value>SVEMZ</value></prop>
+ <prop oor:name="RealFilterName"><value>EMZ - Compressed MS Windows Metafile</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">EMZ - Compressed Enhanced Metafile</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/eps_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/eps_Export.xcu
index ad5d989af762..b89453e45d1b 100644
--- a/filter/source/config/fragments/internalgraphicfilters/eps_Export.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/eps_Export.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="eps_Export" oor:op="replace" >
- <prop oor:name="Type"><value>eps_Encapsulated_PostScript</value></prop>
- <prop oor:name="FormatName"><value>eps</value></prop>
- <prop oor:name="RealFilterName"/>
- <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
- <prop oor:name="UIName">
- <value xml:lang="en-US">EPS - Encapsulated PostScript</value>
- </prop>
- <prop oor:name="Flags"><value>EXPORT</value></prop>
- </node>
+
+<node oor:name="eps_Export" oor:op="replace" >
+ <prop oor:name="Type"><value>eps_Encapsulated_PostScript</value></prop>
+ <prop oor:name="FormatName"><value>SVEEPS</value></prop>
+ <prop oor:name="RealFilterName"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">EPS - Encapsulated PostScript</value>
+ </prop>
+ <prop oor:name="Flags"><value>EXPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/eps_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/eps_Import.xcu
index f2f190173e03..327834368dcb 100644
--- a/filter/source/config/fragments/internalgraphicfilters/eps_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/eps_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="eps_Import" oor:op="replace" >
- <prop oor:name="Type"><value>eps_Encapsulated_PostScript</value></prop>
- <prop oor:name="FormatName"><value>ips</value></prop>
- <prop oor:name="RealFilterName"><value>EPS - Encapsulated PostScript</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">EPS - Encapsulated PostScript</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="eps_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>eps_Encapsulated_PostScript</value></prop>
+ <prop oor:name="FormatName"><value>SVIEPS</value></prop>
+ <prop oor:name="RealFilterName"><value>EPS - Encapsulated PostScript</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">EPS - Encapsulated PostScript</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/gif_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/gif_Export.xcu
index 7f021c1b9a7f..f55d1ba55385 100644
--- a/filter/source/config/fragments/internalgraphicfilters/gif_Export.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/gif_Export.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="gif_Export" oor:op="replace" >
- <prop oor:name="Type"><value>gif_Graphics_Interchange</value></prop>
- <prop oor:name="FormatName"><value>egi</value></prop>
- <prop oor:name="RealFilterName"/>
- <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
- <prop oor:name="UIName">
- <value xml:lang="en-US">GIF - Graphics Interchange Format</value>
- </prop>
- <prop oor:name="Flags"><value>EXPORT</value></prop>
- </node>
+
+<node oor:name="gif_Export" oor:op="replace" >
+ <prop oor:name="Type"><value>gif_Graphics_Interchange</value></prop>
+ <prop oor:name="FormatName"><value>SVEGIF</value></prop>
+ <prop oor:name="RealFilterName"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">GIF - Graphics Interchange Format</value>
+ </prop>
+ <prop oor:name="Flags"><value>EXPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/met_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/met_Import.xcu
index c13a17f952db..8e6aa1b9ea7a 100644
--- a/filter/source/config/fragments/internalgraphicfilters/met_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/met_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="met_Import" oor:op="replace" >
- <prop oor:name="Type"><value>met_OS2_Metafile</value></prop>
- <prop oor:name="FormatName"><value>ime</value></prop>
- <prop oor:name="RealFilterName"><value>MET - OS/2 Metafile</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">MET - OS/2 Metafile</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="met_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>met_OS2_Metafile</value></prop>
+ <prop oor:name="FormatName"><value>SVMET</value></prop>
+ <prop oor:name="RealFilterName"><value>MET - OS/2 Metafile</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">MET - OS/2 Metafile</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/pbm_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/pbm_Import.xcu
index 49db4b3c7eb4..0e7f0b9402b5 100644
--- a/filter/source/config/fragments/internalgraphicfilters/pbm_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/pbm_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="pbm_Import" oor:op="replace" >
- <prop oor:name="Type"><value>pbm_Portable_Bitmap</value></prop>
- <prop oor:name="FormatName"><value>ipb</value></prop>
- <prop oor:name="RealFilterName"><value>PBM - Portable Bitmap</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">PBM - Portable Bitmap</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="pbm_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>pbm_Portable_Bitmap</value></prop>
+ <prop oor:name="FormatName"><value>SVPBM</value></prop>
+ <prop oor:name="RealFilterName"><value>PBM - Portable Bitmap</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">PBM - Portable Bitmap</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base.xcu b/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base.xcu
index c5a0094b86e4..29c7b846ddae 100644
--- a/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="pcd_Import_Base" oor:op="replace" >
- <prop oor:name="Type"><value>pcd_Photo_CD_Base</value></prop>
- <prop oor:name="FormatName"><value>icd</value></prop>
- <prop oor:name="RealFilterName"><value>draw_PCD_Photo_CD_Base</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">PCD - Kodak Photo CD (768x512)</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="pcd_Import_Base" oor:op="replace" >
+ <prop oor:name="Type"><value>pcd_Photo_CD_Base</value></prop>
+ <prop oor:name="FormatName"><value>SVPCD</value></prop>
+ <prop oor:name="RealFilterName"><value>draw_PCD_Photo_CD_Base</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">PCD - Kodak Photo CD (768x512)</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base16.xcu b/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base16.xcu
index 27a471a2c75f..b61fde810697 100644
--- a/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base16.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base16.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="pcd_Import_Base16" oor:op="replace" >
- <prop oor:name="Type"><value>pcd_Photo_CD_Base16</value></prop>
- <prop oor:name="FormatName"><value>icd</value></prop>
- <prop oor:name="RealFilterName"><value>draw_PCD_Photo_CD_Base16</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">PCD - Kodak Photo CD (192x128)</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="pcd_Import_Base16" oor:op="replace" >
+ <prop oor:name="Type"><value>pcd_Photo_CD_Base16</value></prop>
+ <prop oor:name="FormatName"><value>SVPCD</value></prop>
+ <prop oor:name="RealFilterName"><value>draw_PCD_Photo_CD_Base16</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">PCD - Kodak Photo CD (192x128)</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base4.xcu b/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base4.xcu
index ba5f536b9a45..15d51918a09b 100644
--- a/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base4.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/pcd_Import_Base4.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="pcd_Import_Base4" oor:op="replace" >
- <prop oor:name="Type"><value>pcd_Photo_CD_Base4</value></prop>
- <prop oor:name="FormatName"><value>icd</value></prop>
- <prop oor:name="RealFilterName"><value>draw_PCD_Photo_CD_Base4</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">PCD - Kodak Photo CD (384x256)</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="pcd_Import_Base4" oor:op="replace" >
+ <prop oor:name="Type"><value>pcd_Photo_CD_Base4</value></prop>
+ <prop oor:name="FormatName"><value>SVPCD</value></prop>
+ <prop oor:name="RealFilterName"><value>draw_PCD_Photo_CD_Base4</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">PCD - Kodak Photo CD (384x256)</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/pct_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/pct_Import.xcu
index 63048f9b4eb2..974bb330066b 100644
--- a/filter/source/config/fragments/internalgraphicfilters/pct_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/pct_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="pct_Import" oor:op="replace" >
- <prop oor:name="Type"><value>pct_Mac_Pict</value></prop>
- <prop oor:name="FormatName"><value>ipt</value></prop>
- <prop oor:name="RealFilterName"><value>PCT - Mac Pict</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">PCT - Mac Pict</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="pct_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>pct_Mac_Pict</value></prop>
+ <prop oor:name="FormatName"><value>SVPICT</value></prop>
+ <prop oor:name="RealFilterName"><value>PCT - Mac Pict</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">PCT - Mac Pict</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/pcx_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/pcx_Import.xcu
index 4f8eb67340e4..da49344d4e60 100644
--- a/filter/source/config/fragments/internalgraphicfilters/pcx_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/pcx_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="pcx_Import" oor:op="replace" >
- <prop oor:name="Type"><value>pcx_Zsoft_Paintbrush</value></prop>
- <prop oor:name="FormatName"><value>ipx</value></prop>
- <prop oor:name="RealFilterName"><value>PCX - Zsoft Paintbrush</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">PCX - Zsoft Paintbrush</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="pcx_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>pcx_Zsoft_Paintbrush</value></prop>
+ <prop oor:name="FormatName"><value>SVPCX</value></prop>
+ <prop oor:name="RealFilterName"><value>PCX - Zsoft Paintbrush</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">PCX - Zsoft Paintbrush</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/pgm_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/pgm_Import.xcu
index 2e1d4bb27f68..0356e69543f5 100644
--- a/filter/source/config/fragments/internalgraphicfilters/pgm_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/pgm_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="pgm_Import" oor:op="replace" >
- <prop oor:name="Type"><value>pgm_Portable_Graymap</value></prop>
- <prop oor:name="FormatName"><value>ipb</value></prop>
- <prop oor:name="RealFilterName"><value>PGM - Portable Graymap</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">PGM - Portable Graymap</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="pgm_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>pgm_Portable_Graymap</value></prop>
+ <prop oor:name="FormatName"><value>SVPBM</value></prop>
+ <prop oor:name="RealFilterName"><value>PGM - Portable Graymap</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">PGM - Portable Graymap</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/png_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/png_Export.xcu
index 5f94ab304a26..95fc65272fec 100644
--- a/filter/source/config/fragments/internalgraphicfilters/png_Export.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/png_Export.xcu
@@ -21,7 +21,7 @@
<prop oor:name="RealFilterName"/>
<prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
<prop oor:name="UIName">
- <value xml:lang="en-US">PNG - Portable Network Graphic</value>
+ <value xml:lang="en-US">PNG - Portable Network Graphics</value>
</prop>
<prop oor:name="Flags"><value>EXPORT</value></prop>
</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/png_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/png_Import.xcu
index 1defed70b8f9..cbc4c650734f 100644
--- a/filter/source/config/fragments/internalgraphicfilters/png_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/png_Import.xcu
@@ -21,7 +21,7 @@
<prop oor:name="RealFilterName"><value>PNG - Portable Network Graphic</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="UIName">
- <value xml:lang="en-US">PNG - Portable Network Graphic</value>
+ <value xml:lang="en-US">PNG - Portable Network Graphics</value>
</prop>
<prop oor:name="Flags"><value>IMPORT</value></prop>
</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/ppm_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/ppm_Import.xcu
index c2213e24f8bc..03134558c806 100644
--- a/filter/source/config/fragments/internalgraphicfilters/ppm_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/ppm_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="ppm_Import" oor:op="replace" >
- <prop oor:name="Type"><value>ppm_Portable_Pixelmap</value></prop>
- <prop oor:name="FormatName"><value>ipb</value></prop>
- <prop oor:name="RealFilterName"><value>PPM - Portable Pixelmap</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">PPM - Portable Pixelmap</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="ppm_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>ppm_Portable_Pixelmap</value></prop>
+ <prop oor:name="FormatName"><value>SVPBM</value></prop>
+ <prop oor:name="RealFilterName"><value>PPM - Portable Pixelmap</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">PPM - Portable Pixelmap</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/psd_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/psd_Import.xcu
index ce2c3066b8da..f51b0fa59d48 100644
--- a/filter/source/config/fragments/internalgraphicfilters/psd_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/psd_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="psd_Import" oor:op="replace" >
- <prop oor:name="Type"><value>psd_Adobe_Photoshop</value></prop>
- <prop oor:name="FormatName"><value>ipd</value></prop>
- <prop oor:name="RealFilterName"><value>PSD - Adobe Photoshop</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">PSD - Adobe Photoshop</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="psd_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>psd_Adobe_Photoshop</value></prop>
+ <prop oor:name="FormatName"><value>SVPSD</value></prop>
+ <prop oor:name="RealFilterName"><value>PSD - Adobe Photoshop</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">PSD - Adobe Photoshop</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/ras_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/ras_Import.xcu
index 95108022b03a..7e9a3b2bbc07 100644
--- a/filter/source/config/fragments/internalgraphicfilters/ras_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/ras_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="ras_Import" oor:op="replace" >
- <prop oor:name="Type"><value>ras_Sun_Rasterfile</value></prop>
- <prop oor:name="FormatName"><value>ira</value></prop>
- <prop oor:name="RealFilterName"><value>RAS - Sun Rasterfile</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">RAS - Sun Raster Image</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="ras_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>ras_Sun_Rasterfile</value></prop>
+ <prop oor:name="FormatName"><value>SVRAS</value></prop>
+ <prop oor:name="RealFilterName"><value>RAS - Sun Rasterfile</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">RAS - Sun Raster Image</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/svgz_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/svgz_Export.xcu
new file mode 100644
index 000000000000..8231ca965ff1
--- /dev/null
+++ b/filter/source/config/fragments/internalgraphicfilters/svgz_Export.xcu
@@ -0,0 +1,27 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="svgz_Export" oor:op="replace" >
+ <prop oor:name="Type"><value>svgz_Compressed_Scalable_Vector_Graphics</value></prop>
+ <prop oor:name="FormatName"><value>SVESVGZ</value></prop>
+ <prop oor:name="RealFilterName"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">SVGZ - Compressed Scalable Vector Graphics</value>
+ </prop>
+ <prop oor:name="Flags"><value>EXPORT</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/svgz_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/svgz_Import.xcu
new file mode 100644
index 000000000000..fe0d2deaac2a
--- /dev/null
+++ b/filter/source/config/fragments/internalgraphicfilters/svgz_Import.xcu
@@ -0,0 +1,27 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="svgz_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>svgz_Compressed_Scalable_Vector_Graphics</value></prop>
+ <prop oor:name="FormatName"><value>SVISVGZ</value></prop>
+ <prop oor:name="RealFilterName"><value>SVGZ - Compressed Scalable Vector Graphics</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">SVGZ - Compressed Scalable Vector Graphics</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/tga_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/tga_Import.xcu
index 7ea4d49ec624..922cdefbf1ab 100644
--- a/filter/source/config/fragments/internalgraphicfilters/tga_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/tga_Import.xcu
@@ -15,13 +15,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
- <node oor:name="tga_Import" oor:op="replace" >
- <prop oor:name="Type"><value>tga_Truevision_TARGA</value></prop>
- <prop oor:name="FormatName"><value>itg</value></prop>
- <prop oor:name="RealFilterName"><value>TGA - Truevision TARGA</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">TGA - Truevision Targa</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT</value></prop>
- </node>
+
+<node oor:name="tga_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>tga_Truevision_TARGA</value></prop>
+ <prop oor:name="FormatName"><value>SVTGA</value></prop>
+ <prop oor:name="RealFilterName"><value>TGA - Truevision TARGA</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">TGA - Truevision Targa</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/webp_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/webp_Export.xcu
new file mode 100644
index 000000000000..70ff15429734
--- /dev/null
+++ b/filter/source/config/fragments/internalgraphicfilters/webp_Export.xcu
@@ -0,0 +1,27 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="webp_Export" oor:op="replace" >
+ <prop oor:name="Type"><value>webp_WebP</value></prop>
+ <prop oor:name="FormatName"><value>SVEWEBP</value></prop>
+ <prop oor:name="RealFilterName"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WEBP - WebP Image</value>
+ </prop>
+ <prop oor:name="Flags"><value>EXPORT</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/webp_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/webp_Import.xcu
new file mode 100644
index 000000000000..cdce5c9e4047
--- /dev/null
+++ b/filter/source/config/fragments/internalgraphicfilters/webp_Import.xcu
@@ -0,0 +1,27 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="webp_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>webp_WebP</value></prop>
+ <prop oor:name="FormatName"><value>SVIWEBP</value></prop>
+ <prop oor:name="RealFilterName"><value>WEBP - WebP</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WEBP - WebP Image</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/wmz_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/wmz_Export.xcu
new file mode 100644
index 000000000000..69b9aec9e0e2
--- /dev/null
+++ b/filter/source/config/fragments/internalgraphicfilters/wmz_Export.xcu
@@ -0,0 +1,27 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="wmz_Export" oor:op="replace" >
+ <prop oor:name="Type"><value>wmz_Compressed_MS_Windows_Metafile</value></prop>
+ <prop oor:name="FormatName"><value>SVWMZ</value></prop>
+ <prop oor:name="RealFilterName"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WMZ - Compressed Windows Metafile</value>
+ </prop>
+ <prop oor:name="Flags"><value>EXPORT</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/internalgraphicfilters/wmz_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/wmz_Import.xcu
new file mode 100644
index 000000000000..9f124f1a1817
--- /dev/null
+++ b/filter/source/config/fragments/internalgraphicfilters/wmz_Import.xcu
@@ -0,0 +1,27 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="wmz_Import" oor:op="replace" >
+ <prop oor:name="Type"><value>wmz_Compressed_MS_Windows_Metafile</value></prop>
+ <prop oor:name="FormatName"><value>SVWMZ</value></prop>
+ <prop oor:name="RealFilterName"><value>WMZ - Compressed MS Windows Metafile</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">WMZ - Compressed Windows Metafile</value>
+ </prop>
+ <prop oor:name="Flags"><value>IMPORT</value></prop>
+ </node>
diff --git a/filter/source/config/fragments/types/apng_Animated_Portable_Network_Graphic.xcu b/filter/source/config/fragments/types/apng_Animated_Portable_Network_Graphic.xcu
new file mode 100644
index 000000000000..b094e81e912d
--- /dev/null
+++ b/filter/source/config/fragments/types/apng_Animated_Portable_Network_Graphic.xcu
@@ -0,0 +1,29 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="apng_Animated_Portable_Network_Graphic" oor:op="replace" >
+ <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
+ <prop oor:name="URLPattern"/>
+ <prop oor:name="Extensions"><value>apng</value></prop>
+ <prop oor:name="MediaType"><value>image/apng</value></prop>
+ <prop oor:name="Preferred"><value>false</value></prop>
+ <prop oor:name="PreferredFilter"><value>APNG - Animated Portable Network Graphic</value></prop>
+ <prop oor:name="UIName">
+ <value>APNG - Animated Portable Network Graphic</value>
+ </prop>
+ <prop oor:name="ClipboardFormat"/>
+ </node>
diff --git a/filter/source/config/fragments/types/calc_Parquet.xcu b/filter/source/config/fragments/types/calc_Parquet.xcu
new file mode 100644
index 000000000000..6c29d886c92f
--- /dev/null
+++ b/filter/source/config/fragments/types/calc_Parquet.xcu
@@ -0,0 +1,17 @@
+<!--
+ * 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/.
+-->
+<node oor:name="Apache Parquet" oor:op="replace" >
+ <prop oor:name="DetectService"><value>com.sun.star.comp.sc.OrcusFilterDetect</value></prop>
+ <prop oor:name="URLPattern"/>
+ <prop oor:name="Extensions"><value>parquet</value></prop>
+ <prop oor:name="MediaType"/>
+ <prop oor:name="Preferred"><value>true</value></prop>
+ <prop oor:name="PreferredFilter"><value>Apache Parquet Spreadsheet</value></prop>
+ <prop oor:name="UIName"><value xml:lang="en-US">Apache Parquet</value></prop>
+ <prop oor:name="ClipboardFormat"/>
+</node>
diff --git a/filter/source/config/fragments/types/emz_Compressed_MS_Windows_Metafile.xcu b/filter/source/config/fragments/types/emz_Compressed_MS_Windows_Metafile.xcu
new file mode 100644
index 000000000000..b2dfeb3f9532
--- /dev/null
+++ b/filter/source/config/fragments/types/emz_Compressed_MS_Windows_Metafile.xcu
@@ -0,0 +1,29 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="emz_Compressed_MS_Windows_Metafile" oor:op="replace" >
+ <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
+ <prop oor:name="URLPattern"/>
+ <prop oor:name="Extensions"><value>emz</value></prop>
+ <prop oor:name="MediaType"><value>image/x-emf</value></prop>
+ <prop oor:name="Preferred"><value>false</value></prop>
+ <prop oor:name="PreferredFilter"><value>EMZ - Compressed MS Windows Metafile</value></prop>
+ <prop oor:name="UIName">
+ <value>EMZ - Compressed Enhanced Meta File</value>
+ </prop>
+ <prop oor:name="ClipboardFormat"/>
+ </node>
diff --git a/filter/source/config/fragments/types/png_Portable_Network_Graphic.xcu b/filter/source/config/fragments/types/png_Portable_Network_Graphic.xcu
index 7fe5e2adbfda..0b5be4b19923 100644
--- a/filter/source/config/fragments/types/png_Portable_Network_Graphic.xcu
+++ b/filter/source/config/fragments/types/png_Portable_Network_Graphic.xcu
@@ -18,7 +18,7 @@
<node oor:name="png_Portable_Network_Graphic" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>png</value></prop>
+ <prop oor:name="Extensions"><value>png apng</value></prop>
<prop oor:name="MediaType"><value>image/png</value></prop>
<prop oor:name="Preferred"><value>false</value></prop>
<prop oor:name="PreferredFilter"><value>PNG - Portable Network Graphic</value></prop>
diff --git a/filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu b/filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu
index a2015a536873..04b08c08b664 100644
--- a/filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu
+++ b/filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu
@@ -18,7 +18,7 @@
<node oor:name="svg_Scalable_Vector_Graphics" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Draw.SVGFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>svg svgz</value></prop>
+ <prop oor:name="Extensions"><value>svg</value></prop>
<prop oor:name="MediaType"><value>image/svg+xml</value></prop>
<prop oor:name="Preferred"><value>false</value></prop>
<prop oor:name="PreferredFilter"><value>SVG - Scalable Vector Graphics</value></prop>
diff --git a/filter/source/config/fragments/types/svgz_Compressed_Scalable_Vector_Graphics.xcu b/filter/source/config/fragments/types/svgz_Compressed_Scalable_Vector_Graphics.xcu
new file mode 100644
index 000000000000..7ba66f15f092
--- /dev/null
+++ b/filter/source/config/fragments/types/svgz_Compressed_Scalable_Vector_Graphics.xcu
@@ -0,0 +1,29 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="svgz_Compressed_Scalable_Vector_Graphics" oor:op="replace" >
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.SVGFilter</value></prop>
+ <prop oor:name="URLPattern"/>
+ <prop oor:name="Extensions"><value>svgz</value></prop>
+ <prop oor:name="MediaType"><value>image/svg+xml</value></prop>
+ <prop oor:name="Preferred"><value>false</value></prop>
+ <prop oor:name="PreferredFilter"><value>SVGZ - Compressed Scalable Vector Graphics</value></prop>
+ <prop oor:name="UIName">
+ <value>SVGZ - Compressed Scalable Vector Graphics</value>
+ </prop>
+ <prop oor:name="ClipboardFormat"/>
+ </node>
diff --git a/filter/source/config/fragments/types/webp_WebP.xcu b/filter/source/config/fragments/types/webp_WebP.xcu
new file mode 100644
index 000000000000..e58984fbedc7
--- /dev/null
+++ b/filter/source/config/fragments/types/webp_WebP.xcu
@@ -0,0 +1,29 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="webp_WebP" oor:op="replace" >
+ <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
+ <prop oor:name="URLPattern"/>
+ <prop oor:name="Extensions"><value>webp</value></prop>
+ <prop oor:name="MediaType"><value>image/webp</value></prop>
+ <prop oor:name="Preferred"><value>false</value></prop>
+ <prop oor:name="PreferredFilter"><value>WEBP - WebP</value></prop>
+ <prop oor:name="UIName">
+ <value>WEBP - WebP Image</value>
+ </prop>
+ <prop oor:name="ClipboardFormat"/>
+ </node>
diff --git a/filter/source/config/fragments/types/wmz_Compressed_MS_Windows_Metafile.xcu b/filter/source/config/fragments/types/wmz_Compressed_MS_Windows_Metafile.xcu
new file mode 100644
index 000000000000..859c9d6d27bd
--- /dev/null
+++ b/filter/source/config/fragments/types/wmz_Compressed_MS_Windows_Metafile.xcu
@@ -0,0 +1,29 @@
+<!--
+ * 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 .
+-->
+ <node oor:name="wmz_Compressed_MS_Windows_Metafile" oor:op="replace" >
+ <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
+ <prop oor:name="URLPattern"/>
+ <prop oor:name="Extensions"><value>wmz</value></prop>
+ <prop oor:name="MediaType"><value>image/x-wmf</value></prop>
+ <prop oor:name="Preferred"><value>false</value></prop>
+ <prop oor:name="PreferredFilter"><value>WMZ - Compressed MS Windows Metafile</value></prop>
+ <prop oor:name="UIName">
+ <value>WMZ - Compressed Windows Metafile</value>
+ </prop>
+ <prop oor:name="ClipboardFormat"/>
+ </node>
diff --git a/filter/source/config/fragments/types/writer_MS_Word_2007_XML.xcu b/filter/source/config/fragments/types/writer_MS_Word_2007_XML.xcu
index 75cb091cd0aa..11396057a026 100644
--- a/filter/source/config/fragments/types/writer_MS_Word_2007_XML.xcu
+++ b/filter/source/config/fragments/types/writer_MS_Word_2007_XML.xcu
@@ -22,6 +22,6 @@
<prop oor:name="MediaType"><value>application/msword</value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>MS Word 2007 XML</value></prop>
- <prop oor:name="UIName"><value xml:lang="en-US">Word 2007–365</value></prop>
+ <prop oor:name="UIName"><value xml:lang="en-US">Word 2007</value></prop>
<prop oor:name="ClipboardFormat"><value>MSWordDoc</value></prop>
</node>
diff --git a/filter/source/config/fragments/types/writer_MS_Word_2007_XML_Template.xcu b/filter/source/config/fragments/types/writer_MS_Word_2007_XML_Template.xcu
index 391cc20cec3b..059e7078a40e 100644
--- a/filter/source/config/fragments/types/writer_MS_Word_2007_XML_Template.xcu
+++ b/filter/source/config/fragments/types/writer_MS_Word_2007_XML_Template.xcu
@@ -22,6 +22,6 @@
<prop oor:name="MediaType"><value>application/msword</value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>MS Word 2007 XML Template</value></prop>
- <prop oor:name="UIName"><value xml:lang="en-US">Word 2007–365 Template</value></prop>
+ <prop oor:name="UIName"><value xml:lang="en-US">Word 2007 Template</value></prop>
<prop oor:name="ClipboardFormat"><value>MSWordDoc</value></prop>
</node>
diff --git a/filter/source/config/fragments/types/writer_MS_Word_2007_XML_VBA.xcu b/filter/source/config/fragments/types/writer_MS_Word_2007_XML_VBA.xcu
index 8a44c1e5f3a2..0519bcd7dac7 100644
--- a/filter/source/config/fragments/types/writer_MS_Word_2007_XML_VBA.xcu
+++ b/filter/source/config/fragments/types/writer_MS_Word_2007_XML_VBA.xcu
@@ -12,6 +12,6 @@
<prop oor:name="MediaType"><value>application/msword</value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>MS Word 2007 XML VBA</value></prop>
- <prop oor:name="UIName"><value xml:lang="en-US">Word 2007–365 VBA</value></prop>
+ <prop oor:name="UIName"><value xml:lang="en-US">Word 2007 VBA</value></prop>
<prop oor:name="ClipboardFormat"><value>MSWordDoc</value></prop>
</node>
diff --git a/filter/source/config/fragments/types/writer_OOXML.xcu b/filter/source/config/fragments/types/writer_OOXML.xcu
index 8d6a025fdac2..079a6421f072 100644
--- a/filter/source/config/fragments/types/writer_OOXML.xcu
+++ b/filter/source/config/fragments/types/writer_OOXML.xcu
@@ -23,7 +23,7 @@
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>Office Open XML Text</value></prop>
<prop oor:name="UIName">
- <value>Office Open XML Text Document (Transitional)</value>
+ <value>Word 2010–365 Document</value>
</prop>
<prop oor:name="ClipboardFormat"><value>MSWordDoc</value></prop>
</node>
diff --git a/filter/source/config/fragments/types/writer_OOXML_Template.xcu b/filter/source/config/fragments/types/writer_OOXML_Template.xcu
index 39f499eb6b68..a9d424b967b4 100644
--- a/filter/source/config/fragments/types/writer_OOXML_Template.xcu
+++ b/filter/source/config/fragments/types/writer_OOXML_Template.xcu
@@ -23,7 +23,7 @@
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>Office Open XML Text Template</value></prop>
<prop oor:name="UIName">
- <value>Office Open XML Text Template (Transitional)</value>
+ <value>Word 2010–365 Template</value>
</prop>
<prop oor:name="ClipboardFormat"><value>MSWordDoc</value></prop>
</node>
diff --git a/filter/source/config/fragments/types/writer_T602_Document.xcu b/filter/source/config/fragments/types/writer_T602_Document.xcu
index c34f823da4ca..e9b3df39cf33 100644
--- a/filter/source/config/fragments/types/writer_T602_Document.xcu
+++ b/filter/source/config/fragments/types/writer_T602_Document.xcu
@@ -18,7 +18,7 @@
<node oor:name="writer_T602_Document" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Writer.T602ImportFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>602 txt</value></prop>
+ <prop oor:name="Extensions"><value>602</value></prop>
<prop oor:name="MediaType"><value>application/x-t602</value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>T602Document</value></prop>
diff --git a/filter/source/config/fragments/types/writer_indexing_export_xml.xcu b/filter/source/config/fragments/types/writer_indexing_export_xml.xcu
new file mode 100644
index 000000000000..4cda6e597461
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_indexing_export_xml.xcu
@@ -0,0 +1,21 @@
+<!--
+ * 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/.
+ *
+-->
+
+<node oor:name="writer_indexing_export_xml" oor:op="replace" >
+ <prop oor:name="DetectService"/>
+ <prop oor:name="URLPattern"/>
+ <prop oor:name="Extensions"><value>xml</value></prop>
+ <prop oor:name="MediaType"/>
+ <prop oor:name="Preferred"><value>false</value></prop>
+ <prop oor:name="PreferredFilter"/>
+ <prop oor:name="UIName">
+ <value>Writer Indexing Export XML</value>
+ </prop>
+ <prop oor:name="ClipboardFormat"/>
+</node>
diff --git a/filter/source/config/tools/merge/FCFGMerge.cfg b/filter/source/config/tools/merge/FCFGMerge.cfg
index 8a0b4b78fec8..041a16a9f17b 100644
--- a/filter/source/config/tools/merge/FCFGMerge.cfg
+++ b/filter/source/config/tools/merge/FCFGMerge.cfg
@@ -32,7 +32,7 @@ loglevel = 2
# This extension is used for all XML files. It doesn't
# matter if it's used for reading fragments or writing
# XML packages.
-# Must be given without any additional signes like "."
+# Must be given without any additional signs like "."
# or "*."!
#
# [REQUIRED]
@@ -44,7 +44,7 @@ extension_xcu=xcu
# This extension is used for all Package files. It doesn't
# matter if it's used for reading such files or writing
# it.
-# Must be given without any additional signes like "."
+# Must be given without any additional signs like "."
# or "*."!
#
# [REQUIRED]
diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx
index b498e71dd4e3..224c4b2b0794 100644
--- a/filter/source/graphic/GraphicExportFilter.cxx
+++ b/filter/source/graphic/GraphicExportFilter.cxx
@@ -25,14 +25,15 @@
#include <com/sun/star/frame/XModel.hpp>
#include <cppuhelper/supportsservice.hxx>
+#include <utility>
#include <vcl/graphicfilter.hxx>
#include <svl/outstrm.hxx>
#include <svtools/DocumentToGraphicRenderer.hxx>
using namespace css;
-GraphicExportFilter::GraphicExportFilter( const uno::Reference< uno::XComponentContext > & rxContext )
- : mxContext(rxContext)
+GraphicExportFilter::GraphicExportFilter( uno::Reference< uno::XComponentContext > xContext )
+ : mxContext(std::move(xContext))
, mnTargetWidth(0)
, mnTargetHeight(0)
, mbSelectionOnly(false)
@@ -89,7 +90,7 @@ void GraphicExportFilter::gatherProperties( const uno::Sequence< beans::Property
}
}
- for ( const beans::PropertyValue& rProp : std::as_const(maFilterDataSequence) )
+ for (const beans::PropertyValue& rProp : maFilterDataSequence)
{
if ( rProp.Name == "PixelWidth" )
{
@@ -163,7 +164,7 @@ bool GraphicExportFilter::filterRenderDocument() const
SvMemoryStream aMemStream;
const GraphicConversionParameters aParameters(aTargetSizePixel, true, true);
- const ErrCode nResult = rFilter.ExportGraphic( aGraphic.GetBitmapEx(aParameters), OUString(), aMemStream,
+ const ErrCode nResult = rFilter.ExportGraphic( aGraphic.GetBitmapEx(aParameters), u"", aMemStream,
nFilterFormat, &maFilterDataSequence );
if ( nResult == ERRCODE_NONE )
@@ -203,7 +204,7 @@ bool GraphicExportFilter::filterExportShape(
{
if (aDescriptor[i].Name == "FilterName")
{
- aDescriptor[i].Value <<= maFilterExtension;
+ aDescriptor.getArray()[i].Value <<= maFilterExtension;
break;
}
}
diff --git a/filter/source/graphic/GraphicExportFilter.hxx b/filter/source/graphic/GraphicExportFilter.hxx
index d9d4c5a898ac..c78b25d70a89 100644
--- a/filter/source/graphic/GraphicExportFilter.hxx
+++ b/filter/source/graphic/GraphicExportFilter.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHIC_GRAPHICEXPORTFILTER_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHIC_GRAPHICEXPORTFILTER_HXX
+#pragma once
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XExporter.hpp>
@@ -58,7 +57,7 @@ class GraphicExportFilter :
const css::uno::Reference< css::drawing::XShape > & rxShape ) const;
public:
- explicit GraphicExportFilter( const css::uno::Reference< css::uno::XComponentContext > & rxContext );
+ explicit GraphicExportFilter( css::uno::Reference< css::uno::XComponentContext > xContext );
virtual ~GraphicExportFilter() override;
// XServiceInfo
@@ -77,6 +76,4 @@ public:
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any > & rArguments ) override;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
deleted file mode 100644
index 7a70d337e6c5..000000000000
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ /dev/null
@@ -1,549 +0,0 @@
-/* -*- 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 <tools/stream.hxx>
-#include <tools/debug.hxx>
-#include <vcl/BitmapReadAccess.hxx>
-#include <vcl/graph.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <com/sun/star/task/XStatusIndicator.hpp>
-#include "giflzwc.hxx"
-#include <memory>
-
-namespace {
-
-class GIFWriter
-{
- Bitmap aAccBmp;
- SvStream& m_rGIF;
- BitmapReadAccess* m_pAcc;
- sal_uInt32 nMinPercent;
- sal_uInt32 nMaxPercent;
- sal_uInt32 nLastPercent;
- tools::Long nActX;
- tools::Long nActY;
- sal_Int32 nInterlaced;
- bool bStatus;
- bool bTransparent;
-
- void MayCallback(sal_uInt32 nPercent);
- void WriteSignature( bool bGIF89a );
- void WriteGlobalHeader( const Size& rSize );
- void WriteLoopExtension( const Animation& rAnimation );
- void WriteLogSizeExtension( const Size& rSize100 );
- void WriteImageExtension( tools::Long nTimer, Disposal eDisposal );
- void WriteLocalHeader();
- void WritePalette();
- void WriteAccess();
- void WriteTerminator();
-
- bool CreateAccess( const BitmapEx& rBmpEx );
- void DestroyAccess();
-
- void WriteAnimation( const Animation& rAnimation );
- void WriteBitmapEx( const BitmapEx& rBmpEx, const Point& rPoint, bool bExtended,
- tools::Long nTimer = 0, Disposal eDisposal = Disposal::Not );
-
- css::uno::Reference< css::task::XStatusIndicator > xStatusIndicator;
-
-public:
-
- explicit GIFWriter(SvStream &rStream);
-
- bool WriteGIF( const Graphic& rGraphic, FilterConfigItem* pConfigItem );
-};
-
-}
-
-GIFWriter::GIFWriter(SvStream &rStream)
- : m_rGIF(rStream)
- , m_pAcc(nullptr)
- , nMinPercent(0)
- , nMaxPercent(0)
- , nLastPercent(0)
- , nActX(0)
- , nActY(0)
- , nInterlaced(0)
- , bStatus(false)
- , bTransparent(false)
-{
-}
-
-
-bool GIFWriter::WriteGIF(const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem)
-{
- if ( pFilterConfigItem )
- {
- xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
- if ( xStatusIndicator.is() )
- {
- xStatusIndicator->start( OUString(), 100 );
- }
- }
-
- Size aSize100;
- const MapMode aMap( rGraphic.GetPrefMapMode() );
- bool bLogSize = ( aMap.GetMapUnit() != MapUnit::MapPixel );
-
- if( bLogSize )
- aSize100 = OutputDevice::LogicToLogic(rGraphic.GetPrefSize(), aMap, MapMode(MapUnit::Map100thMM));
-
- bStatus = true;
- nLastPercent = 0;
- nInterlaced = 0;
- m_pAcc = nullptr;
-
- if ( pFilterConfigItem )
- nInterlaced = pFilterConfigItem->ReadInt32( "Interlaced", 0 );
-
- m_rGIF.SetEndian( SvStreamEndian::LITTLE );
-
- if( rGraphic.IsAnimated() )
- {
- const Animation& rAnimation = rGraphic.GetAnimation();
-
- WriteSignature( true );
-
- if ( bStatus )
- {
- WriteGlobalHeader( rAnimation.GetDisplaySizePixel() );
-
- if( bStatus )
- {
- WriteLoopExtension( rAnimation );
-
- if( bStatus )
- WriteAnimation( rAnimation );
- }
- }
- }
- else
- {
- const bool bGrafTrans = rGraphic.IsTransparent();
-
- BitmapEx aBmpEx = rGraphic.GetBitmapEx();
-
- nMinPercent = 0;
- nMaxPercent = 100;
-
- WriteSignature( bGrafTrans || bLogSize );
-
- if( bStatus )
- {
- WriteGlobalHeader( aBmpEx.GetSizePixel() );
-
- if( bStatus )
- WriteBitmapEx( aBmpEx, Point(), bGrafTrans );
- }
- }
-
- if( bStatus )
- {
- if( bLogSize )
- WriteLogSizeExtension( aSize100 );
-
- WriteTerminator();
- }
-
- if ( xStatusIndicator.is() )
- xStatusIndicator->end();
-
- return bStatus;
-}
-
-
-void GIFWriter::WriteBitmapEx( const BitmapEx& rBmpEx, const Point& rPoint,
- bool bExtended, tools::Long nTimer, Disposal eDisposal )
-{
- if( !CreateAccess( rBmpEx ) )
- return;
-
- nActX = rPoint.X();
- nActY = rPoint.Y();
-
- if( bExtended )
- WriteImageExtension( nTimer, eDisposal );
-
- if( bStatus )
- {
- WriteLocalHeader();
-
- if( bStatus )
- {
- WritePalette();
-
- if( bStatus )
- WriteAccess();
- }
- }
-
- DestroyAccess();
-}
-
-
-void GIFWriter::WriteAnimation( const Animation& rAnimation )
-{
- const sal_uInt16 nCount = rAnimation.Count();
-
- if( !nCount )
- return;
-
- const double fStep = 100. / nCount;
-
- nMinPercent = 0;
- nMaxPercent = static_cast<sal_uInt32>(fStep);
-
- for( sal_uInt16 i = 0; i < nCount; i++ )
- {
- const AnimationBitmap& rAnimationBitmap = rAnimation.Get( i );
-
- WriteBitmapEx(rAnimationBitmap.maBitmapEx, rAnimationBitmap.maPositionPixel, true,
- rAnimationBitmap.mnWait, rAnimationBitmap.meDisposal );
- nMinPercent = nMaxPercent;
- nMaxPercent = static_cast<sal_uInt32>(nMaxPercent + fStep);
- }
-}
-
-
-void GIFWriter::MayCallback(sal_uInt32 nPercent)
-{
- if ( xStatusIndicator.is() )
- {
- if( nPercent >= nLastPercent + 3 )
- {
- nLastPercent = nPercent;
- if ( nPercent <= 100 )
- xStatusIndicator->setValue( nPercent );
- }
- }
-}
-
-
-bool GIFWriter::CreateAccess( const BitmapEx& rBmpEx )
-{
- if( bStatus )
- {
- Bitmap aMask( rBmpEx.GetMask() );
-
- aAccBmp = rBmpEx.GetBitmap();
- bTransparent = false;
-
- if( !!aMask )
- {
- if( aAccBmp.Convert( BmpConversion::N8BitTrans ) )
- {
- aMask.Convert( BmpConversion::N1BitThreshold );
- aAccBmp.Replace( aMask, BMP_COL_TRANS );
- bTransparent = true;
- }
- else
- aAccBmp.Convert( BmpConversion::N8BitColors );
- }
- else
- aAccBmp.Convert( BmpConversion::N8BitColors );
-
- m_pAcc = aAccBmp.AcquireReadAccess();
-
- if( !m_pAcc )
- bStatus = false;
- }
-
- return bStatus;
-}
-
-
-void GIFWriter::DestroyAccess()
-{
- Bitmap::ReleaseAccess( m_pAcc );
- m_pAcc = nullptr;
-}
-
-
-void GIFWriter::WriteSignature( bool bGIF89a )
-{
- if( bStatus )
- {
- m_rGIF.WriteBytes(bGIF89a ? "GIF89a" : "GIF87a" , 6);
-
- if( m_rGIF.GetError() )
- bStatus = false;
- }
-}
-
-
-void GIFWriter::WriteGlobalHeader( const Size& rSize )
-{
- if( !bStatus )
- return;
-
- // 256 colors
- const sal_uInt16 nWidth = static_cast<sal_uInt16>(rSize.Width());
- const sal_uInt16 nHeight = static_cast<sal_uInt16>(rSize.Height());
- const sal_uInt8 cFlags = 128 | ( 7 << 4 );
-
- // write values
- m_rGIF.WriteUInt16( nWidth );
- m_rGIF.WriteUInt16( nHeight );
- m_rGIF.WriteUChar( cFlags );
- m_rGIF.WriteUChar( 0x00 );
- m_rGIF.WriteUChar( 0x00 );
-
- // write dummy palette with two entries (black/white);
- // we do this only because of a bug in Photoshop, since those can't
- // read pictures without a global color palette
- m_rGIF.WriteUInt16( 0 );
- m_rGIF.WriteUInt16( 255 );
- m_rGIF.WriteUInt16( 65535 );
-
- if( m_rGIF.GetError() )
- bStatus = false;
-}
-
-
-void GIFWriter::WriteLoopExtension( const Animation& rAnimation )
-{
- DBG_ASSERT( rAnimation.Count() > 0, "Animation has no bitmaps!" );
-
- sal_uInt16 nLoopCount = static_cast<sal_uInt16>(rAnimation.GetLoopCount());
-
- // if only one run should take place
- // the LoopExtension won't be written
- // The default in this case is a single run
- if( nLoopCount == 1 )
- return;
-
- // Netscape interprets the LoopCount
- // as the sole number of _repetitions_
- if( nLoopCount )
- nLoopCount--;
-
- const sal_uInt8 cLoByte = static_cast<sal_uInt8>(nLoopCount);
- const sal_uInt8 cHiByte = static_cast<sal_uInt8>( nLoopCount >> 8 );
-
- m_rGIF.WriteUChar( 0x21 );
- m_rGIF.WriteUChar( 0xff );
- m_rGIF.WriteUChar( 0x0b );
- m_rGIF.WriteBytes( "NETSCAPE2.0", 11 );
- m_rGIF.WriteUChar( 0x03 );
- m_rGIF.WriteUChar( 0x01 );
- m_rGIF.WriteUChar( cLoByte );
- m_rGIF.WriteUChar( cHiByte );
- m_rGIF.WriteUChar( 0x00 );
-}
-
-
-void GIFWriter::WriteLogSizeExtension( const Size& rSize100 )
-{
- // writer PrefSize in 100th-mm as ApplicationExtension
- if( rSize100.Width() && rSize100.Height() )
- {
- m_rGIF.WriteUChar( 0x21 );
- m_rGIF.WriteUChar( 0xff );
- m_rGIF.WriteUChar( 0x0b );
- m_rGIF.WriteBytes( "STARDIV 5.0", 11 );
- m_rGIF.WriteUChar( 0x09 );
- m_rGIF.WriteUChar( 0x01 );
- m_rGIF.WriteUInt32( rSize100.Width() );
- m_rGIF.WriteUInt32( rSize100.Height() );
- m_rGIF.WriteUChar( 0x00 );
- }
-}
-
-
-void GIFWriter::WriteImageExtension( tools::Long nTimer, Disposal eDisposal )
-{
- if( !bStatus )
- return;
-
- const sal_uInt16 nDelay = static_cast<sal_uInt16>(nTimer);
- sal_uInt8 cFlags = 0;
-
- // set Transparency-Flag
- if( bTransparent )
- cFlags |= 1;
-
- // set Disposal-value
- if( eDisposal == Disposal::Back )
- cFlags |= ( 2 << 2 );
- else if( eDisposal == Disposal::Previous )
- cFlags |= ( 3 << 2 );
-
- m_rGIF.WriteUChar( 0x21 );
- m_rGIF.WriteUChar( 0xf9 );
- m_rGIF.WriteUChar( 0x04 );
- m_rGIF.WriteUChar( cFlags );
- m_rGIF.WriteUInt16( nDelay );
- m_rGIF.WriteUChar( m_pAcc->GetBestPaletteIndex( BMP_COL_TRANS ) );
- m_rGIF.WriteUChar( 0x00 );
-
- if( m_rGIF.GetError() )
- bStatus = false;
-}
-
-
-void GIFWriter::WriteLocalHeader()
-{
- if( !bStatus )
- return;
-
- const sal_uInt16 nPosX = static_cast<sal_uInt16>(nActX);
- const sal_uInt16 nPosY = static_cast<sal_uInt16>(nActY);
- const sal_uInt16 nWidth = static_cast<sal_uInt16>(m_pAcc->Width());
- const sal_uInt16 nHeight = static_cast<sal_uInt16>(m_pAcc->Height());
- sal_uInt8 cFlags = static_cast<sal_uInt8>( m_pAcc->GetBitCount() - 1 );
-
- // set Interlaced-Flag
- if( nInterlaced )
- cFlags |= 0x40;
-
- // set Flag for the local color palette
- cFlags |= 0x80;
-
- m_rGIF.WriteUChar( 0x2c );
- m_rGIF.WriteUInt16( nPosX );
- m_rGIF.WriteUInt16( nPosY );
- m_rGIF.WriteUInt16( nWidth );
- m_rGIF.WriteUInt16( nHeight );
- m_rGIF.WriteUChar( cFlags );
-
- if( m_rGIF.GetError() )
- bStatus = false;
-}
-
-
-void GIFWriter::WritePalette()
-{
- if( !(bStatus && m_pAcc->HasPalette()) )
- return;
-
- const sal_uInt16 nCount = m_pAcc->GetPaletteEntryCount();
- const sal_uInt16 nMaxCount = ( 1 << m_pAcc->GetBitCount() );
-
- for ( sal_uInt16 i = 0; i < nCount; i++ )
- {
- const BitmapColor& rColor = m_pAcc->GetPaletteColor( i );
-
- m_rGIF.WriteUChar( rColor.GetRed() );
- m_rGIF.WriteUChar( rColor.GetGreen() );
- m_rGIF.WriteUChar( rColor.GetBlue() );
- }
-
- // fill up the rest with 0
- if( nCount < nMaxCount )
- m_rGIF.SeekRel( ( nMaxCount - nCount ) * 3 );
-
- if( m_rGIF.GetError() )
- bStatus = false;
-}
-
-
-void GIFWriter::WriteAccess()
-{
- GIFLZWCompressor aCompressor;
- const tools::Long nWidth = m_pAcc->Width();
- const tools::Long nHeight = m_pAcc->Height();
- std::unique_ptr<sal_uInt8[]> pBuffer;
- bool bNative = m_pAcc->GetScanlineFormat() == ScanlineFormat::N8BitPal;
-
- if( !bNative )
- pBuffer.reset(new sal_uInt8[ nWidth ]);
-
- if( !(bStatus && ( 8 == m_pAcc->GetBitCount() ) && m_pAcc->HasPalette()) )
- return;
-
- aCompressor.StartCompression( m_rGIF, m_pAcc->GetBitCount() );
-
- tools::Long nY, nT;
-
- for( tools::Long i = 0; i < nHeight; ++i )
- {
- if( nInterlaced )
- {
- nY = i << 3;
-
- if( nY >= nHeight )
- {
- nT = i - ( ( nHeight + 7 ) >> 3 );
- nY= ( nT << 3 ) + 4;
-
- if( nY >= nHeight )
- {
- nT -= ( nHeight + 3 ) >> 3;
- nY = ( nT << 2 ) + 2;
-
- if ( nY >= nHeight )
- {
- nT -= ( ( nHeight + 1 ) >> 2 );
- nY = ( nT << 1 ) + 1;
- }
- }
- }
- }
- else
- nY = i;
-
- if( bNative )
- aCompressor.Compress( m_pAcc->GetScanline( nY ), nWidth );
- else
- {
- Scanline pScanline = m_pAcc->GetScanline( nY );
- for( tools::Long nX = 0; nX < nWidth; nX++ )
- pBuffer[ nX ] = m_pAcc->GetIndexFromData( pScanline, nX );
-
- aCompressor.Compress( pBuffer.get(), nWidth );
- }
-
- if ( m_rGIF.GetError() )
- bStatus = false;
-
- MayCallback( nMinPercent + ( nMaxPercent - nMinPercent ) * i / nHeight );
-
- if( !bStatus )
- break;
- }
-
- aCompressor.EndCompression();
-
- if ( m_rGIF.GetError() )
- bStatus = false;
-}
-
-
-void GIFWriter::WriteTerminator()
-{
- if( bStatus )
- {
- m_rGIF.WriteUChar( 0x3b );
-
- if( m_rGIF.GetError() )
- bStatus = false;
- }
-}
-
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-egiGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem )
-{
- GIFWriter aWriter(rStream);
- return aWriter.WriteGIF(rGraphic, pConfigItem);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/filter/source/graphicfilter/egif/giflzwc.cxx
deleted file mode 100644
index 41c65d2da4c2..000000000000
--- a/filter/source/graphicfilter/egif/giflzwc.cxx
+++ /dev/null
@@ -1,225 +0,0 @@
-/* -*- 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 <tools/stream.hxx>
-#include "giflzwc.hxx"
-#include <array>
-
-
-class GIFImageDataOutputStream
-{
-private:
-
- void FlushBlockBuf();
- inline void FlushBitsBufsFullBytes();
-
- SvStream& rStream;
- std::array<sal_uInt8, 255>
- pBlockBuf;
- sal_uInt8 nBlockBufSize;
- sal_uInt32 nBitsBuf;
- sal_uInt16 nBitsBufSize;
-
-public:
-
- GIFImageDataOutputStream( SvStream & rGIF, sal_uInt8 nLZWDataSize );
- ~GIFImageDataOutputStream();
-
- inline void WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen );
-};
-
-
-inline void GIFImageDataOutputStream::FlushBitsBufsFullBytes()
-{
- while (nBitsBufSize>=8)
- {
- if( nBlockBufSize==255 )
- FlushBlockBuf();
-
- pBlockBuf[nBlockBufSize++] = static_cast<sal_uInt8>(nBitsBuf);
- nBitsBuf >>= 8;
- nBitsBufSize -= 8;
- }
-}
-
-
-inline void GIFImageDataOutputStream::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen )
-{
- if( nBitsBufSize+nCodeLen>32 )
- FlushBitsBufsFullBytes();
-
- nBitsBuf |= static_cast<sal_uInt32>(nCode) << nBitsBufSize;
- nBitsBufSize = nBitsBufSize + nCodeLen;
-}
-
-
-GIFImageDataOutputStream::GIFImageDataOutputStream( SvStream & rGIF, sal_uInt8 nLZWDataSize ) :
- rStream(rGIF), nBlockBufSize(0), nBitsBuf(0), nBitsBufSize(0)
-{
- rStream.WriteUChar( nLZWDataSize );
-}
-
-
-GIFImageDataOutputStream::~GIFImageDataOutputStream()
-{
- WriteBits(0,7);
- FlushBitsBufsFullBytes();
- FlushBlockBuf();
- rStream.WriteUChar( 0 );
-}
-
-
-void GIFImageDataOutputStream::FlushBlockBuf()
-{
- if( nBlockBufSize )
- {
- rStream.WriteUChar( nBlockBufSize );
- rStream.WriteBytes(pBlockBuf.data(), nBlockBufSize);
- nBlockBufSize = 0;
- }
-}
-
-
-struct GIFLZWCTreeNode
-{
-
- GIFLZWCTreeNode* pBrother; // next node which has the same father
- GIFLZWCTreeNode* pFirstChild; // first
- sal_uInt16 nCode; // the code for the string of pixel values which comes about
- sal_uInt16 nValue; // the pixel value
-};
-
-
-GIFLZWCompressor::GIFLZWCompressor()
- : pPrefix(nullptr), nDataSize(0), nClearCode(0),
- nEOICode(0), nTableSize(0), nCodeSize(0)
-{
-}
-
-
-GIFLZWCompressor::~GIFLZWCompressor()
-{
- if (pIDOS!=nullptr) EndCompression();
-}
-
-
-void GIFLZWCompressor::StartCompression( SvStream& rGIF, sal_uInt16 nPixelSize )
-{
- if( pIDOS )
- return;
-
- sal_uInt16 i;
-
- nDataSize = nPixelSize;
-
- if( nDataSize < 2 )
- nDataSize=2;
-
- nClearCode=1<<nDataSize;
- nEOICode=nClearCode+1;
- nTableSize=nEOICode+1;
- nCodeSize=nDataSize+1;
-
- pIDOS.reset(new GIFImageDataOutputStream(rGIF,static_cast<sal_uInt8>(nDataSize)));
- pTable.reset(new GIFLZWCTreeNode[4096]);
-
- for (i=0; i<4096; i++)
- {
- pTable[i].pBrother = pTable[i].pFirstChild = nullptr;
- pTable[i].nCode = i;
- pTable[i].nValue = static_cast<sal_uInt8>( i );
- }
-
- pPrefix = nullptr;
- pIDOS->WriteBits( nClearCode,nCodeSize );
-}
-
-void GIFLZWCompressor::Compress(sal_uInt8* pSrc, sal_uInt32 nSize)
-{
- if( !pIDOS )
- return;
-
- GIFLZWCTreeNode* p;
- sal_uInt16 i;
- sal_uInt8 nV;
-
- if( !pPrefix && nSize )
- {
- pPrefix=&pTable[*pSrc++];
- nSize--;
- }
-
- while( nSize )
- {
- nSize--;
- nV=*pSrc++;
- for( p=pPrefix->pFirstChild; p!=nullptr; p=p->pBrother )
- {
- if (p->nValue==nV)
- break;
- }
-
- if( p)
- pPrefix=p;
- else
- {
- pIDOS->WriteBits(pPrefix->nCode,nCodeSize);
-
- if (nTableSize==4096)
- {
- pIDOS->WriteBits(nClearCode,nCodeSize);
-
- for (i=0; i<nClearCode; i++)
- pTable[i].pFirstChild=nullptr;
-
- nCodeSize=nDataSize+1;
- nTableSize=nEOICode+1;
- }
- else
- {
- if(nTableSize==static_cast<sal_uInt16>(1<<nCodeSize))
- nCodeSize++;
-
- p=&pTable[nTableSize++];
- p->pBrother=pPrefix->pFirstChild;
- pPrefix->pFirstChild=p;
- p->nValue=nV;
- p->pFirstChild=nullptr;
- }
-
- pPrefix=&pTable[nV];
- }
- }
-}
-
-void GIFLZWCompressor::EndCompression()
-{
- if( pIDOS )
- {
- if( pPrefix )
- pIDOS->WriteBits(pPrefix->nCode,nCodeSize);
-
- pIDOS->WriteBits( nEOICode,nCodeSize );
- pTable.reset();
- pIDOS.reset();
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/egif/giflzwc.hxx b/filter/source/graphicfilter/egif/giflzwc.hxx
deleted file mode 100644
index 057710c85230..000000000000
--- a/filter/source/graphicfilter/egif/giflzwc.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- 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 INCLUDED_FILTER_SOURCE_GRAPHICFILTER_EGIF_GIFLZWC_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_EGIF_GIFLZWC_HXX
-
-#include <vcl/mapmod.hxx>
-
-
-class GIFImageDataOutputStream;
-struct GIFLZWCTreeNode;
-
-
-class GIFLZWCompressor
-{
-private:
-
- std::unique_ptr<GIFImageDataOutputStream> pIDOS;
- std::unique_ptr<GIFLZWCTreeNode[]> pTable;
- GIFLZWCTreeNode* pPrefix;
- sal_uInt16 nDataSize;
- sal_uInt16 nClearCode;
- sal_uInt16 nEOICode;
- sal_uInt16 nTableSize;
- sal_uInt16 nCodeSize;
-
-public:
-
- GIFLZWCompressor();
- ~GIFLZWCompressor();
-
- void StartCompression( SvStream& rGIF, sal_uInt16 nPixelSize );
- void Compress(sal_uInt8* pSrc, sal_uInt32 nSize);
- void EndCompression();
-};
-
-#endif // INCLUDED_FILTER_SOURCE_GRAPHICFILTER_EGIF_GIFLZWC_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
deleted file mode 100644
index 04fc15559a06..000000000000
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ /dev/null
@@ -1,2676 +0,0 @@
-/* -*- 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 <tools/stream.hxx>
-#include <tools/poly.hxx>
-#include <tools/fract.hxx>
-#include <tools/helpers.hxx>
-#include <unotools/resmgr.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/metaact.hxx>
-#include <vcl/graph.hxx>
-#include <vcl/BitmapReadAccess.hxx>
-#include <vcl/region.hxx>
-#include <vcl/font.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/cvtgrf.hxx>
-#include <vcl/gradient.hxx>
-#include <unotools/configmgr.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <vcl/graphictools.hxx>
-#include <vcl/weld.hxx>
-#include <strings.hrc>
-#include <osl/diagnose.h>
-#include <com/sun/star/task/XStatusIndicator.hpp>
-
-#include <cstdlib>
-#include <memory>
-
-using namespace ::com::sun::star::uno;
-
-#define POSTSCRIPT_BOUNDINGSEARCH 0x1000 // we only try to get the BoundingBox
- // in the first 4096 bytes
-
-#define EPS_PREVIEW_TIFF 1
-#define EPS_PREVIEW_EPSI 2
-
-#define PS_LINESIZE 70 // maximum number of characters a line in the output
-
-// -----------------------------field-types------------------------------
-
-namespace {
-
-struct StackMember
-{
- struct StackMember * pSucc;
- Color aGlobalCol;
- bool bLineCol;
- Color aLineCol;
- bool bFillCol;
- Color aFillCol;
- Color aTextCol;
- bool bTextFillCol;
- Color aTextFillCol;
- Color aBackgroundCol;
- vcl::Font aFont;
- TextAlign eTextAlign;
-
- double fLineWidth;
- double fMiterLimit;
- SvtGraphicStroke::CapType eLineCap;
- SvtGraphicStroke::JoinType eJoinType;
- SvtGraphicStroke::DashArray aDashArray;
-};
-
-struct PSLZWCTreeNode
-{
-
- PSLZWCTreeNode* pBrother; // next node who has the same father
- PSLZWCTreeNode* pFirstChild; // first son
- sal_uInt16 nCode; // The code for the string of pixel values, which arises if... <missing comment>
- sal_uInt16 nValue; // the pixel value
-};
-
-enum NMode {PS_NONE = 0x00, PS_SPACE = 0x01, PS_RET = 0x02, PS_WRAP = 0x04}; // formatting mode: action which is inserted behind the output
-inline NMode operator|(NMode a, NMode b)
-{
- return static_cast<NMode>(static_cast<sal_uInt8>(a) | static_cast<sal_uInt8>(b));
-}
-
-class PSWriter
-{
-private:
- bool mbStatus;
- bool mbLevelWarning; // if there any embedded eps file which was not exported
- sal_uInt32 mnLatestPush; // offset to streamposition, where last push was done
-
- tools::Long mnLevel; // dialog options
- bool mbGrayScale;
- bool mbCompression;
- sal_Int32 mnPreview;
- sal_Int32 mnTextMode;
-
- SvStream* mpPS;
- const GDIMetaFile* pMTF;
- std::unique_ptr<GDIMetaFile>
- pAMTF; // only created if Graphics is not a Metafile
- ScopedVclPtrInstance<VirtualDevice>
- pVDev;
-
- double nBoundingX2; // this represents the bounding box
- double nBoundingY2;
-
- StackMember* pGDIStack;
- sal_uInt32 mnCursorPos; // current cursor position in output
- Color aColor; // current color which is used for output
- bool bLineColor;
- Color aLineColor; // current GDIMetafile color settings
- bool bFillColor;
- Color aFillColor;
- Color aTextColor;
- bool bTextFillColor;
- Color aTextFillColor;
- Color aBackgroundColor;
- TextAlign eTextAlign;
-
- double fLineWidth;
- double fMiterLimit;
- SvtGraphicStroke::CapType eLineCap;
- SvtGraphicStroke::JoinType eJoinType;
- SvtGraphicStroke::DashArray aDashArray;
-
- vcl::Font maFont;
- vcl::Font maLastFont;
- sal_uInt8 nNextChrSetId; // first unused ChrSet-Id
-
- std::unique_ptr<PSLZWCTreeNode[]> pTable; // LZW compression data
- PSLZWCTreeNode* pPrefix; // the compression is as same as the TIFF compression
- sal_uInt16 nDataSize;
- sal_uInt16 nClearCode;
- sal_uInt16 nEOICode;
- sal_uInt16 nTableSize;
- sal_uInt16 nCodeSize;
- sal_uInt32 nOffset;
- sal_uInt32 dwShift;
-
- css::uno::Reference< css::task::XStatusIndicator > xStatusIndicator;
-
- void ImplWriteProlog( const Graphic* pPreviewEPSI );
- void ImplWriteEpilog();
- void ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev );
-
- // this method makes LF's, space inserting and word wrapping as used in all nMode
- // parameters
- inline void ImplExecMode( NMode nMode );
-
- // writes char[] + LF to stream
- inline void ImplWriteLine( const char*, NMode nMode = PS_RET );
-
- // writes ( nNumb / 10^nCount ) in ASCII format to stream
- void ImplWriteF( sal_Int32 nNumb, sal_uInt8 nCount = 3, NMode nMode = PS_SPACE );
-
- // writes a double in ASCII format to stream
- void ImplWriteDouble( double );
-
- // writes a long in ASCII format to stream
- void ImplWriteLong( sal_Int32 nNumb, NMode nMode = PS_SPACE );
-
- // writes a byte in ASCII format to stream
- void ImplWriteByte( sal_uInt8 nNumb, NMode nMode = PS_SPACE );
-
- // writes a byte in ASCII (hex) format to stream
- void ImplWriteHexByte( sal_uInt8 nNumb, NMode nMode = PS_WRAP );
-
- // writes nNumb as number from 0.000 till 1.000 in ASCII format to stream
- void ImplWriteB1( sal_uInt8 nNumb );
-
- inline void ImplWritePoint( const Point& );
- void ImplMoveTo( const Point& );
- void ImplLineTo( const Point&, NMode nMode = PS_SPACE );
- void ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3, NMode nMode );
- void ImplTranslate( const double& fX, const double& fY );
- void ImplScale( const double& fX, const double& fY );
-
- void ImplAddPath( const tools::Polygon & rPolygon );
- void ImplWriteLineInfo( double fLineWidth, double fMiterLimit, SvtGraphicStroke::CapType eLineCap,
- SvtGraphicStroke::JoinType eJoinType, SvtGraphicStroke::DashArray const & rDashArray );
- void ImplWriteLineInfo( const LineInfo& rLineInfo );
- void ImplRect( const tools::Rectangle & rRectangle );
- void ImplRectFill ( const tools::Rectangle & rRectangle );
- void ImplWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice& rVDev );
- void ImplIntersect( const tools::PolyPolygon& rPolyPoly );
- void ImplPolyPoly( const tools::PolyPolygon & rPolyPolygon, bool bTextOutline = false );
- void ImplPolyLine( const tools::Polygon & rPolygon );
-
- void ImplSetClipRegion( vcl::Region const & rRegion );
- void ImplBmp( Bitmap const *, Bitmap const *, const Point &, double nWidth, double nHeight );
- void ImplText( const OUString& rUniString, const Point& rPos, const tools::Long* pDXArry, sal_Int32 nWidth, VirtualDevice const & rVDev );
- void ImplSetAttrForText( const Point & rPoint );
- void ImplWriteCharacter( char );
- void ImplWriteString( const OString&, VirtualDevice const & rVDev, const tools::Long* pDXArry, bool bStretch );
- void ImplDefineFont( const char*, const char* );
-
- void ImplClosePathDraw();
- void ImplPathDraw();
-
- inline void ImplWriteLineColor( NMode nMode );
- inline void ImplWriteFillColor( NMode nMode );
- inline void ImplWriteTextColor( NMode nMode );
- void ImplWriteColor( NMode nMode );
-
- static double ImplGetScaling( const MapMode& );
- void ImplGetMapMode( const MapMode& );
- static bool ImplGetBoundingBox( double* nNumb, sal_uInt8* pSource, sal_uInt32 nSize );
- static sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uInt32 nComp, sal_uInt32 nSize );
- // LZW methods
- void StartCompression();
- void Compress( sal_uInt8 nSrc );
- void EndCompression();
- inline void WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen );
-
-public:
- bool WritePS( const Graphic& rGraphic, SvStream& rTargetStream, FilterConfigItem* );
- PSWriter();
-};
-
-}
-
-//========================== methods from PSWriter ==========================
-
-
-PSWriter::PSWriter()
- : mbStatus(false)
- , mbLevelWarning(false)
- , mnLatestPush(0)
- , mnLevel(0)
- , mbGrayScale(false)
- , mbCompression(false)
- , mnPreview(0)
- , mnTextMode(0)
- , mpPS(nullptr)
- , pMTF(nullptr)
- , pVDev()
- , nBoundingX2(0)
- , nBoundingY2(0)
- , pGDIStack(nullptr)
- , mnCursorPos(0)
- , aColor()
- , bLineColor(false)
- , aLineColor()
- , bFillColor(false)
- , aFillColor()
- , aTextColor()
- , bTextFillColor(false)
- , aTextFillColor()
- , aBackgroundColor()
- , eTextAlign()
- , fLineWidth(0)
- , fMiterLimit(0)
- , eLineCap()
- , eJoinType()
- , aDashArray()
- , maFont()
- , maLastFont()
- , nNextChrSetId(0)
- , pPrefix(nullptr)
- , nDataSize(0)
- , nClearCode(0)
- , nEOICode(0)
- , nTableSize(0)
- , nCodeSize(0)
- , nOffset(0)
- , dwShift(0)
- , xStatusIndicator()
-{
-}
-
-bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, FilterConfigItem* pFilterConfigItem )
-{
- sal_uInt32 nStreamPosition = 0, nPSPosition = 0; // -Wall warning, unset, check
-
- mbStatus = true;
- mnPreview = 0;
- mbLevelWarning = false;
- mnLatestPush = 0xEFFFFFFE;
-
- if ( pFilterConfigItem )
- {
- xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
- if ( xStatusIndicator.is() )
- {
- xStatusIndicator->start( OUString(), 100 );
- }
- }
-
- mpPS = &rTargetStream;
- mpPS->SetEndian( SvStreamEndian::LITTLE );
-
- // default values for the dialog options
- mnLevel = 2;
- mbGrayScale = false;
-#ifdef UNX // don't compress by default on unix as ghostscript is unable to read LZW compressed eps
- mbCompression = false;
-#else
- mbCompression = true;
-#endif
- mnTextMode = 0; // default0 : export glyph outlines
-
- // try to get the dialog selection
- if ( pFilterConfigItem )
- {
-#ifdef UNX // don't put binary tiff preview ahead of postscript code by default on unix as ghostscript is unable to read it
- mnPreview = pFilterConfigItem->ReadInt32( "Preview", 0 );
-#else
- mnPreview = pFilterConfigItem->ReadInt32( "Preview", 1 );
-#endif
- mnLevel = pFilterConfigItem->ReadInt32( "Version", 2 );
- if ( mnLevel != 1 )
- mnLevel = 2;
- mbGrayScale = pFilterConfigItem->ReadInt32( "ColorFormat", 1 ) == 2;
-#ifdef UNX // don't compress by default on unix as ghostscript is unable to read LZW compressed eps
- mbCompression = pFilterConfigItem->ReadInt32( "CompressionMode", 0 ) != 0;
-#else
- mbCompression = pFilterConfigItem->ReadInt32( "CompressionMode", 1 ) == 1;
-#endif
- mnTextMode = pFilterConfigItem->ReadInt32( "TextMode", 0 );
- if ( mnTextMode > 2 )
- mnTextMode = 0;
- }
-
- // compression is not available for Level 1
- if ( mnLevel == 1 )
- {
- mbGrayScale = true;
- mbCompression = false;
- }
-
- if ( mnPreview & EPS_PREVIEW_TIFF )
- {
- rTargetStream.WriteUInt32( 0xC6D3D0C5 );
- nStreamPosition = rTargetStream.Tell();
- rTargetStream.WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 )
- .WriteUInt32( nStreamPosition + 26 ).WriteUInt32( 0 ).WriteUInt16( 0xffff );
-
- ErrCode nErrCode;
- if ( mbGrayScale )
- {
- BitmapEx aTempBitmapEx( rGraphic.GetBitmapEx() );
- aTempBitmapEx.Convert( BmpConversion::N8BitGreys );
- nErrCode = GraphicConverter::Export( rTargetStream, aTempBitmapEx, ConvertDataFormat::TIF ) ;
- }
- else
- nErrCode = GraphicConverter::Export( rTargetStream, rGraphic, ConvertDataFormat::TIF ) ;
-
- if ( nErrCode == ERRCODE_NONE )
- {
- nPSPosition = rTargetStream.TellEnd();
- rTargetStream.Seek( nStreamPosition + 20 );
- rTargetStream.WriteUInt32( nPSPosition - 30 ); // size of tiff gfx
- rTargetStream.Seek( nPSPosition );
- }
- else
- {
- mnPreview &=~ EPS_PREVIEW_TIFF;
- rTargetStream.Seek( nStreamPosition - 4 );
- }
- }
-
- // global default value setting
- StackMember* pGS;
-
- if (rGraphic.GetType() == GraphicType::GdiMetafile)
- pMTF = &rGraphic.GetGDIMetaFile();
- else if (rGraphic.GetGDIMetaFile().GetActionSize())
- {
- pAMTF.reset( new GDIMetaFile( rGraphic.GetGDIMetaFile() ) );
- pMTF = pAMTF.get();
- }
- else
- {
- BitmapEx aBmp( rGraphic.GetBitmapEx() );
- pAMTF.reset( new GDIMetaFile );
- ScopedVclPtrInstance< VirtualDevice > pTmpVDev;
- pAMTF->Record( pTmpVDev );
- pTmpVDev->DrawBitmapEx( Point(), aBmp );
- pAMTF->Stop();
- pAMTF->SetPrefSize( aBmp.GetSizePixel() );
- pMTF = pAMTF.get();
- }
- pVDev->SetMapMode( pMTF->GetPrefMapMode() );
- nBoundingX2 = pMTF->GetPrefSize().Width();
- nBoundingY2 = pMTF->GetPrefSize().Height();
-
- pGDIStack = nullptr;
- aColor = COL_TRANSPARENT;
- bLineColor = true;
- aLineColor = COL_BLACK;
- bFillColor = true;
- aFillColor = COL_WHITE;
- bTextFillColor = true;
- aTextFillColor = COL_BLACK;
- fLineWidth = 1;
- fMiterLimit = 15; // use same limit as most graphic systems and basegfx
- eLineCap = SvtGraphicStroke::capButt;
- eJoinType = SvtGraphicStroke::joinMiter;
- aBackgroundColor = COL_WHITE;
- eTextAlign = ALIGN_BASELINE;
-
- nNextChrSetId = 1;
-
- if( pMTF->GetActionSize() )
- {
- ImplWriteProlog( ( mnPreview & EPS_PREVIEW_EPSI ) ? &rGraphic : nullptr );
- mnCursorPos = 0;
- ImplWriteActions( *pMTF, *pVDev );
- ImplWriteEpilog();
- if ( mnPreview & EPS_PREVIEW_TIFF )
- {
- sal_uInt32 nPosition = rTargetStream.Tell();
- rTargetStream.Seek( nStreamPosition );
- rTargetStream.WriteUInt32( nPSPosition );
- rTargetStream.WriteUInt32( nPosition - nPSPosition );
- rTargetStream.Seek( nPosition );
- }
- while( pGDIStack )
- {
- pGS=pGDIStack;
- pGDIStack=pGS->pSucc;
- delete pGS;
- }
- }
- else
- mbStatus = false;
-
- if ( mbStatus && mbLevelWarning && pFilterConfigItem )
- {
- std::locale loc = Translate::Create("flt");
- std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
- VclMessageType::Info, VclButtonsType::Ok,
- Translate::get(KEY_VERSION_CHECK, loc)));
- xInfoBox->run();
- }
-
- if ( xStatusIndicator.is() )
- xStatusIndicator->end();
-
- return mbStatus;
-}
-
-void PSWriter::ImplWriteProlog( const Graphic* pPreview )
-{
- ImplWriteLine( "%!PS-Adobe-3.0 EPSF-3.0 " );
- mpPS->WriteCharPtr( "%%BoundingBox: " ); // BoundingBox
- ImplWriteLong( 0 );
- ImplWriteLong( 0 );
- Size aSizePoint = OutputDevice::LogicToLogic( pMTF->GetPrefSize(),
- pMTF->GetPrefMapMode(), MapMode(MapUnit::MapPoint));
- ImplWriteLong( aSizePoint.Width() );
- ImplWriteLong( aSizePoint.Height() ,PS_RET );
- ImplWriteLine( "%%Pages: 0" );
- OUString aCreator( "%%Creator: " + utl::ConfigManager::getProductName() + " " +
- utl::ConfigManager::getProductVersion() );
- ImplWriteLine( OUStringToOString( aCreator, RTL_TEXTENCODING_UTF8 ).getStr() );
- ImplWriteLine( "%%Title: none" );
- ImplWriteLine( "%%CreationDate: none" );
-
-// defaults
-
- mpPS->WriteCharPtr( "%%LanguageLevel: " ); // Language level
- ImplWriteLong( mnLevel, PS_RET );
- if ( !mbGrayScale && mnLevel == 1 )
- ImplWriteLine( "%%Extensions: CMYK" ); // CMYK extension is to set in color mode in level 1
- ImplWriteLine( "%%EndComments" );
- if ( pPreview && aSizePoint.Width() && aSizePoint.Height() )
- {
- Size aSizeBitmap( ( aSizePoint.Width() + 7 ) & ~7, aSizePoint.Height() );
- Bitmap aTmpBitmap( pPreview->GetBitmapEx().GetBitmap() );
- aTmpBitmap.Scale( aSizeBitmap, BmpScaleFlag::BestQuality );
- aTmpBitmap.Convert( BmpConversion::N1BitThreshold );
- BitmapReadAccess* pAcc = aTmpBitmap.AcquireReadAccess();
- if ( pAcc )
- {
- mpPS->WriteCharPtr( "%%BeginPreview: " ); // BoundingBox
- ImplWriteLong( aSizeBitmap.Width() );
- ImplWriteLong( aSizeBitmap.Height() );
- mpPS->WriteCharPtr( "1 " );
- sal_Int32 nLines = aSizeBitmap.Width() / 312;
- if ( ( nLines * 312 ) != aSizeBitmap.Width() )
- nLines++;
- nLines *= aSizeBitmap.Height();
- ImplWriteLong( nLines );
- sal_Int32 nCount2, nCount = 4;
- const BitmapColor aBlack( pAcc->GetBestMatchingColor( COL_BLACK ) );
- for ( tools::Long nY = 0; nY < aSizeBitmap.Height(); nY++ )
- {
- nCount2 = 0;
- char nVal = 0;
- Scanline pScanline = pAcc->GetScanline( nY );
- for ( tools::Long nX = 0; nX < aSizeBitmap.Width(); nX++ )
- {
- if ( !nCount2 )
- {
- ImplExecMode( PS_RET );
- mpPS->WriteCharPtr( "%" );
- nCount2 = 312;
- }
- nVal <<= 1;
- if ( pAcc->GetPixelFromData( pScanline, nX ) == aBlack )
- nVal |= 1;
- if ( ! ( --nCount ) )
- {
- if ( nVal > 9 )
- nVal += 'A' - 10;
- else
- nVal += '0';
- mpPS->WriteChar( nVal );
- nVal = 0;
- nCount += 4;
- }
- nCount2--;
- }
- }
- Bitmap::ReleaseAccess( pAcc );
- ImplExecMode( PS_RET );
- ImplWriteLine( "%%EndPreview" );
- }
- }
- ImplWriteLine( "%%BeginProlog" );
- ImplWriteLine( "%%BeginResource: procset SDRes-Prolog 1.0 0" );
-
-// BEGIN EPSF
- ImplWriteLine( "/b4_inc_state save def\n/dict_count countdictstack def\n/op_count count 1 sub def\nuserdict begin" );
- ImplWriteLine( "0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit[] 0 setdash newpath" );
- ImplWriteLine( "/languagelevel where {pop languagelevel 1 ne {false setstrokeadjust false setoverprint} if} if" );
-
- ImplWriteLine( "/bdef {bind def} bind def" ); // the new operator bdef is created
- if ( mbGrayScale )
- ImplWriteLine( "/c {setgray} bdef" );
- else
- ImplWriteLine( "/c {setrgbcolor} bdef" );
- ImplWriteLine( "/l {neg lineto} bdef" );
- ImplWriteLine( "/rl {neg rlineto} bdef" );
- ImplWriteLine( "/lc {setlinecap} bdef" );
- ImplWriteLine( "/lj {setlinejoin} bdef" );
- ImplWriteLine( "/lw {setlinewidth} bdef" );
- ImplWriteLine( "/ml {setmiterlimit} bdef" );
- ImplWriteLine( "/ld {setdash} bdef" );
- ImplWriteLine( "/m {neg moveto} bdef" );
- ImplWriteLine( "/ct {6 2 roll neg 6 2 roll neg 6 2 roll neg curveto} bdef" );
- ImplWriteLine( "/r {rotate} bdef" );
- ImplWriteLine( "/t {neg translate} bdef" );
- ImplWriteLine( "/s {scale} bdef" );
- ImplWriteLine( "/sw {show} bdef" );
- ImplWriteLine( "/gs {gsave} bdef" );
- ImplWriteLine( "/gr {grestore} bdef" );
-
- ImplWriteLine( "/f {findfont dup length dict begin" ); // Setfont
- ImplWriteLine( "{1 index /FID ne {def} {pop pop} ifelse} forall /Encoding ISOLatin1Encoding def" );
- ImplWriteLine( "currentdict end /NFont exch definefont pop /NFont findfont} bdef" );
-
- ImplWriteLine( "/p {closepath} bdef" );
- ImplWriteLine( "/sf {scalefont setfont} bdef" );
-
- ImplWriteLine( "/ef {eofill}bdef" ); // close path and fill
- ImplWriteLine( "/pc {closepath stroke}bdef" ); // close path and draw
- ImplWriteLine( "/ps {stroke}bdef" ); // draw current path
- ImplWriteLine( "/pum {matrix currentmatrix}bdef" ); // pushes the current matrix
- ImplWriteLine( "/pom {setmatrix}bdef" ); // pops the matrix
- ImplWriteLine( "/bs {/aString exch def /nXOfs exch def /nWidth exch def currentpoint nXOfs 0 rmoveto pum nWidth aString stringwidth pop div 1 scale aString show pom moveto} bdef" );
- ImplWriteLine( "%%EndResource" );
- ImplWriteLine( "%%EndProlog" );
- ImplWriteLine( "%%BeginSetup" );
- ImplWriteLine( "%%EndSetup" );
- ImplWriteLine( "%%Page: 1 1" );
- ImplWriteLine( "%%BeginPageSetup" );
- ImplWriteLine( "%%EndPageSetup" );
- ImplWriteLine( "pum" );
- ImplScale( static_cast<double>(aSizePoint.Width()) / static_cast<double>(pMTF->GetPrefSize().Width()), static_cast<double>(aSizePoint.Height()) / static_cast<double>(pMTF->GetPrefSize().Height()) );
- ImplWriteDouble( 0 );
- ImplWriteDouble( -pMTF->GetPrefSize().Height() );
- ImplWriteLine( "t" );
- ImplWriteLine( "/tm matrix currentmatrix def" );
-}
-
-void PSWriter::ImplWriteEpilog()
-{
- ImplTranslate( 0, nBoundingY2 );
- ImplWriteLine( "pom" );
- ImplWriteLine( "count op_count sub {pop} repeat countdictstack dict_count sub {end} repeat b4_inc_state restore" );
-
- ImplWriteLine( "%%PageTrailer" );
- ImplWriteLine( "%%Trailer" );
-
- ImplWriteLine( "%%EOF" );
-}
-
-void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
-{
- tools::PolyPolygon aFillPath;
-
- for( size_t nCurAction = 0, nCount = rMtf.GetActionSize(); nCurAction < nCount; nCurAction++ )
- {
- MetaAction* pMA = rMtf.GetAction( nCurAction );
-
- switch( pMA->GetType() )
- {
- case MetaActionType::NONE :
- break;
-
- case MetaActionType::PIXEL :
- {
- Color aOldLineColor( aLineColor );
- aLineColor = static_cast<const MetaPixelAction*>(pMA)->GetColor();
- ImplWriteLineColor( PS_SPACE );
- ImplMoveTo( static_cast<const MetaPixelAction*>(pMA)->GetPoint() );
- ImplLineTo( static_cast<const MetaPixelAction*>(pMA)->GetPoint() );
- ImplPathDraw();
- aLineColor = aOldLineColor;
- }
- break;
-
- case MetaActionType::POINT :
- {
- ImplWriteLineColor( PS_SPACE );
- ImplMoveTo( static_cast<const MetaPointAction*>(pMA)->GetPoint() );
- ImplLineTo( static_cast<const MetaPointAction*>(pMA)->GetPoint() );
- ImplPathDraw();
- }
- break;
-
- case MetaActionType::LINE :
- {
- const LineInfo& rLineInfo = static_cast<const MetaLineAction*>(pMA)->GetLineInfo();
- ImplWriteLineInfo( rLineInfo );
- if ( bLineColor )
- {
- ImplWriteLineColor( PS_SPACE );
- ImplMoveTo( static_cast<const MetaLineAction*>(pMA)->GetStartPoint() );
- ImplLineTo( static_cast<const MetaLineAction*>(pMA )->GetEndPoint() );
- ImplPathDraw();
- }
- }
- break;
-
- case MetaActionType::RECT :
- {
- ImplRect( static_cast<const MetaRectAction*>(pMA)->GetRect() );
- }
- break;
-
- case MetaActionType::ROUNDRECT :
- ImplRect( static_cast<const MetaRoundRectAction*>(pMA)->GetRect() );
- break;
-
- case MetaActionType::ELLIPSE :
- {
- tools::Rectangle aRect = static_cast<const MetaEllipseAction*>(pMA)->GetRect();
- Point aCenter = aRect.Center();
- tools::Polygon aPoly( aCenter, aRect.GetWidth() / 2, aRect.GetHeight() / 2 );
- tools::PolyPolygon aPolyPoly( aPoly );
- ImplPolyPoly( aPolyPoly );
- }
- break;
-
- case MetaActionType::ARC :
- {
- tools::Polygon aPoly( static_cast<const MetaArcAction*>(pMA)->GetRect(), static_cast<const MetaArcAction*>(pMA)->GetStartPoint(),
- static_cast<const MetaArcAction*>(pMA)->GetEndPoint(), PolyStyle::Arc );
- tools::PolyPolygon aPolyPoly( aPoly );
- ImplPolyPoly( aPolyPoly );
- }
- break;
-
- case MetaActionType::PIE :
- {
- tools::Polygon aPoly( static_cast<const MetaPieAction*>(pMA)->GetRect(), static_cast<const MetaPieAction*>(pMA)->GetStartPoint(),
- static_cast<const MetaPieAction*>(pMA)->GetEndPoint(), PolyStyle::Pie );
- tools::PolyPolygon aPolyPoly( aPoly );
- ImplPolyPoly( aPolyPoly );
- }
- break;
-
- case MetaActionType::CHORD :
- {
- tools::Polygon aPoly( static_cast<const MetaChordAction*>(pMA)->GetRect(), static_cast<const MetaChordAction*>(pMA)->GetStartPoint(),
- static_cast<const MetaChordAction*>(pMA)->GetEndPoint(), PolyStyle::Chord );
- tools::PolyPolygon aPolyPoly( aPoly );
- ImplPolyPoly( aPolyPoly );
- }
- break;
-
- case MetaActionType::POLYLINE :
- {
- tools::Polygon aPoly( static_cast<const MetaPolyLineAction*>(pMA)->GetPolygon() );
- const LineInfo& rLineInfo = static_cast<const MetaPolyLineAction*>(pMA)->GetLineInfo();
- ImplWriteLineInfo( rLineInfo );
-
- if(basegfx::B2DLineJoin::NONE == rLineInfo.GetLineJoin()
- && rLineInfo.GetWidth() > 1)
- {
- // emulate B2DLineJoin::NONE by creating single edges
- const sal_uInt16 nPoints(aPoly.GetSize());
- const bool bCurve(aPoly.HasFlags());
-
- for(sal_uInt16 a(0); a + 1 < nPoints; a++)
- {
- if(bCurve
- && PolyFlags::Normal != aPoly.GetFlags(a + 1)
- && a + 2 < nPoints
- && PolyFlags::Normal != aPoly.GetFlags(a + 2)
- && a + 3 < nPoints)
- {
- const tools::Polygon aSnippet(4,
- aPoly.GetConstPointAry() + a,
- aPoly.GetConstFlagAry() + a);
- ImplPolyLine(aSnippet);
- a += 2;
- }
- else
- {
- const tools::Polygon aSnippet(2,
- aPoly.GetConstPointAry() + a);
- ImplPolyLine(aSnippet);
- }
- }
- }
- else
- {
- ImplPolyLine( aPoly );
- }
- }
- break;
-
- case MetaActionType::POLYGON :
- {
- tools::PolyPolygon aPolyPoly( static_cast<const MetaPolygonAction*>(pMA)->GetPolygon() );
- ImplPolyPoly( aPolyPoly );
- }
- break;
-
- case MetaActionType::POLYPOLYGON :
- {
- ImplPolyPoly( static_cast<const MetaPolyPolygonAction*>(pMA)->GetPolyPolygon() );
- }
- break;
-
- case MetaActionType::TEXT:
- {
- const MetaTextAction * pA = static_cast<const MetaTextAction*>(pMA);
-
- OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
- Point aPoint( pA->GetPoint() );
-
- ImplText( aUniStr, aPoint, nullptr, 0, rVDev );
- }
- break;
-
- case MetaActionType::TEXTRECT:
- {
- OSL_FAIL( "Unsupported action: TextRect...Action!" );
- }
- break;
-
- case MetaActionType::STRETCHTEXT :
- {
- const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pMA);
- OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
- Point aPoint( pA->GetPoint() );
-
- ImplText( aUniStr, aPoint, nullptr, pA->GetWidth(), rVDev );
- }
- break;
-
- case MetaActionType::TEXTARRAY:
- {
- const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pMA);
- OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
- Point aPoint( pA->GetPoint() );
-
- ImplText( aUniStr, aPoint, pA->GetDXArray(), 0, rVDev );
- }
- break;
-
- case MetaActionType::BMP :
- {
- Bitmap aBitmap = static_cast<const MetaBmpAction*>(pMA)->GetBitmap();
- if ( mbGrayScale )
- aBitmap.Convert( BmpConversion::N8BitGreys );
- Point aPoint = static_cast<const MetaBmpAction*>(pMA)->GetPoint();
- Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) );
- ImplBmp( &aBitmap, nullptr, aPoint, aSize.Width(), aSize.Height() );
- }
- break;
-
- case MetaActionType::BMPSCALE :
- {
- Bitmap aBitmap = static_cast<const MetaBmpScaleAction*>(pMA)->GetBitmap();
- if ( mbGrayScale )
- aBitmap.Convert( BmpConversion::N8BitGreys );
- Point aPoint = static_cast<const MetaBmpScaleAction*>(pMA)->GetPoint();
- Size aSize = static_cast<const MetaBmpScaleAction*>(pMA)->GetSize();
- ImplBmp( &aBitmap, nullptr, aPoint, aSize.Width(), aSize.Height() );
- }
- break;
-
- case MetaActionType::BMPSCALEPART :
- {
- Bitmap aBitmap( static_cast<const MetaBmpScalePartAction*>(pMA)->GetBitmap() );
- aBitmap.Crop( tools::Rectangle( static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcPoint(),
- static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcSize() ) );
- if ( mbGrayScale )
- aBitmap.Convert( BmpConversion::N8BitGreys );
- Point aPoint = static_cast<const MetaBmpScalePartAction*>(pMA)->GetDestPoint();
- Size aSize = static_cast<const MetaBmpScalePartAction*>(pMA)->GetDestSize();
- ImplBmp( &aBitmap, nullptr, aPoint, aSize.Width(), aSize.Height() );
- }
- break;
-
- case MetaActionType::BMPEX :
- {
- BitmapEx aBitmapEx( static_cast<MetaBmpExAction*>(pMA)->GetBitmapEx() );
- Bitmap aBitmap( aBitmapEx.GetBitmap() );
- if ( mbGrayScale )
- aBitmap.Convert( BmpConversion::N8BitGreys );
- Bitmap aMask( aBitmapEx.GetMask() );
- Point aPoint( static_cast<const MetaBmpExAction*>(pMA)->GetPoint() );
- Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) );
- ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
- }
- break;
-
- case MetaActionType::BMPEXSCALE :
- {
- BitmapEx aBitmapEx( static_cast<MetaBmpExScaleAction*>(pMA)->GetBitmapEx() );
- Bitmap aBitmap( aBitmapEx.GetBitmap() );
- if ( mbGrayScale )
- aBitmap.Convert( BmpConversion::N8BitGreys );
- Bitmap aMask( aBitmapEx.GetMask() );
- Point aPoint = static_cast<const MetaBmpExScaleAction*>(pMA)->GetPoint();
- Size aSize( static_cast<const MetaBmpExScaleAction*>(pMA)->GetSize() );
- ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
- }
- break;
-
- case MetaActionType::BMPEXSCALEPART :
- {
- BitmapEx aBitmapEx( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetBitmapEx() );
- aBitmapEx.Crop( tools::Rectangle( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcPoint(),
- static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcSize() ) );
- Bitmap aBitmap( aBitmapEx.GetBitmap() );
- if ( mbGrayScale )
- aBitmap.Convert( BmpConversion::N8BitGreys );
- Bitmap aMask( aBitmapEx.GetMask() );
- Point aPoint = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestPoint();
- Size aSize = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestSize();
- ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
- }
- break;
-
- // Unsupported Actions
- case MetaActionType::MASK:
- case MetaActionType::MASKSCALE:
- case MetaActionType::MASKSCALEPART:
- {
- OSL_FAIL( "Unsupported action: MetaMask...Action!" );
- }
- break;
-
- case MetaActionType::GRADIENT :
- {
- tools::PolyPolygon aPolyPoly( static_cast<const MetaGradientAction*>(pMA)->GetRect() );
- ImplWriteGradient( aPolyPoly, static_cast<const MetaGradientAction*>(pMA)->GetGradient(), rVDev );
- }
- break;
-
- case MetaActionType::GRADIENTEX :
- {
- tools::PolyPolygon aPolyPoly( static_cast<const MetaGradientExAction*>(pMA)->GetPolyPolygon() );
- ImplWriteGradient( aPolyPoly, static_cast<const MetaGradientExAction*>(pMA)->GetGradient(), rVDev );
- }
- break;
-
- case MetaActionType::HATCH :
- {
- ScopedVclPtrInstance< VirtualDevice > l_pVirDev;
- GDIMetaFile aTmpMtf;
-
- l_pVirDev->SetMapMode( rVDev.GetMapMode() );
- l_pVirDev->AddHatchActions( static_cast<const MetaHatchAction*>(pMA)->GetPolyPolygon(),
- static_cast<const MetaHatchAction*>(pMA)->GetHatch(), aTmpMtf );
- ImplWriteActions( aTmpMtf, rVDev );
- }
- break;
-
- case MetaActionType::WALLPAPER :
- {
- const MetaWallpaperAction* pA = static_cast<const MetaWallpaperAction*>(pMA);
- tools::Rectangle aRect = pA->GetRect();
- const Wallpaper& aWallpaper = pA->GetWallpaper();
-
- if ( aWallpaper.IsBitmap() )
- {
- BitmapEx aBitmapEx = aWallpaper.GetBitmap();
- Bitmap aBitmap( aBitmapEx.GetBitmap() );
- if ( aBitmapEx.IsTransparent() )
- {
- if ( aWallpaper.IsGradient() )
- {
-
- // gradient action
-
- }
- Bitmap aMask( aBitmapEx.GetMask() );
- ImplBmp( &aBitmap, &aMask, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() );
- }
- else
- ImplBmp( &aBitmap, nullptr, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() );
-
- // wallpaper Style
-
- }
- else if ( aWallpaper.IsGradient() )
- {
-
- // gradient action
-
- }
- else
- {
- aColor = aWallpaper.GetColor();
- ImplRectFill( aRect );
- }
- }
- break;
-
- case MetaActionType::ISECTRECTCLIPREGION:
- {
- const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pMA);
- vcl::Region aRegion( pA->GetRect() );
- ImplSetClipRegion( aRegion );
- }
- break;
-
- case MetaActionType::CLIPREGION:
- {
- const MetaClipRegionAction* pA = static_cast<const MetaClipRegionAction*>(pMA);
- const vcl::Region& aRegion( pA->GetRegion() );
- ImplSetClipRegion( aRegion );
- }
- break;
-
- case MetaActionType::ISECTREGIONCLIPREGION:
- {
- const MetaISectRegionClipRegionAction* pA = static_cast<const MetaISectRegionClipRegionAction*>(pMA);
- const vcl::Region& aRegion( pA->GetRegion() );
- ImplSetClipRegion( aRegion );
- }
- break;
-
- case MetaActionType::MOVECLIPREGION:
- {
- // TODO: Implement!
- }
- break;
-
- case MetaActionType::LINECOLOR :
- {
- if ( static_cast<const MetaLineColorAction*>(pMA)->IsSetting() )
- {
- bLineColor = true;
- aLineColor = static_cast<const MetaLineColorAction*>(pMA)->GetColor();
- }
- else
- bLineColor = false;
- }
- break;
-
- case MetaActionType::FILLCOLOR :
- {
- if ( static_cast<const MetaFillColorAction*>(pMA)->IsSetting() )
- {
- bFillColor = true;
- aFillColor = static_cast<const MetaFillColorAction*>(pMA)->GetColor();
- }
- else
- bFillColor = false;
- }
- break;
-
- case MetaActionType::TEXTCOLOR :
- {
- aTextColor = static_cast<const MetaTextColorAction*>(pMA)->GetColor();
- }
- break;
-
- case MetaActionType::TEXTFILLCOLOR :
- {
- if ( static_cast<const MetaTextFillColorAction*>(pMA)->IsSetting() )
- {
- bTextFillColor = true;
- aTextFillColor = static_cast<const MetaTextFillColorAction*>(pMA)->GetColor();
- }
- else
- bTextFillColor = false;
- }
- break;
-
- case MetaActionType::TEXTALIGN :
- {
- eTextAlign = static_cast<const MetaTextAlignAction*>(pMA)->GetTextAlign();
- }
- break;
-
- case MetaActionType::MAPMODE :
- {
- pMA->Execute( &rVDev );
- ImplGetMapMode( rVDev.GetMapMode() );
- }
- break;
-
- case MetaActionType::FONT :
- {
- maFont = static_cast<const MetaFontAction*>(pMA)->GetFont();
- rVDev.SetFont( maFont );
- }
- break;
-
- case MetaActionType::PUSH :
- {
- rVDev.Push(static_cast<const MetaPushAction*>(pMA)->GetFlags() );
- StackMember* pGS = new StackMember;
- pGS->pSucc = pGDIStack;
- pGDIStack = pGS;
- pGS->aDashArray = aDashArray;
- pGS->eJoinType = eJoinType;
- pGS->eLineCap = eLineCap;
- pGS->fLineWidth = fLineWidth;
- pGS->fMiterLimit = fMiterLimit;
- pGS->eTextAlign = eTextAlign;
- pGS->aGlobalCol = aColor;
- pGS->bLineCol = bLineColor;
- pGS->aLineCol = aLineColor;
- pGS->bFillCol = bFillColor;
- pGS->aFillCol = aFillColor;
- pGS->aTextCol = aTextColor;
- pGS->bTextFillCol = bTextFillColor;
- pGS->aTextFillCol = aTextFillColor;
- pGS->aBackgroundCol = aBackgroundColor;
- pGS->aFont = maFont;
- mnLatestPush = mpPS->Tell();
- ImplWriteLine( "gs" );
- }
- break;
-
- case MetaActionType::POP :
- {
- rVDev.Pop();
- if( pGDIStack )
- {
- StackMember* pGS = pGDIStack;
- pGDIStack = pGS->pSucc;
- aDashArray = pGS->aDashArray;
- eJoinType = pGS->eJoinType;
- eLineCap = pGS->eLineCap;
- fLineWidth = pGS->fLineWidth;
- fMiterLimit = pGS->fMiterLimit;
- eTextAlign = pGS->eTextAlign;
- aColor = pGS->aGlobalCol;
- bLineColor = pGS->bLineCol;
- aLineColor = pGS->aLineCol;
- bFillColor = pGS->bFillCol;
- aFillColor = pGS->aFillCol;
- aTextColor = pGS->aTextCol;
- bTextFillColor = pGS->bTextFillCol;
- aTextFillColor = pGS->aTextFillCol;
- aBackgroundColor = pGS->aBackgroundCol;
- maFont = pGS->aFont;
- maLastFont = vcl::Font(); // set maLastFont != maFont -> so that
- delete pGS;
- sal_uInt32 nCurrentPos = mpPS->Tell();
- if ( nCurrentPos - 3 == mnLatestPush )
- {
- mpPS->Seek( mnLatestPush );
- ImplWriteLine( " " );
- mpPS->Seek( mnLatestPush );
- }
- else
- ImplWriteLine( "gr" );
- }
- }
- break;
-
- case MetaActionType::EPS :
- {
- GfxLink aGfxLink = static_cast<const MetaEPSAction*>(pMA)->GetLink();
- const GDIMetaFile aSubstitute( static_cast<const MetaEPSAction*>(pMA)->GetSubstitute() );
-
- bool bLevelConflict = false;
- sal_uInt8* pSource = const_cast<sal_uInt8*>(aGfxLink.GetData());
- sal_uInt32 nSize = aGfxLink.GetDataSize();
- sal_uInt32 nParseThis = POSTSCRIPT_BOUNDINGSEARCH;
- if ( nSize < 64 ) // assuming eps is larger than 64 bytes
- pSource = nullptr;
- if ( nParseThis > nSize )
- nParseThis = nSize;
-
- if ( pSource && ( mnLevel == 1 ) )
- {
- sal_uInt8* pFound = ImplSearchEntry( pSource, reinterpret_cast<sal_uInt8 const *>("%%LanguageLevel:"), nParseThis - 10, 16 );
- if ( pFound )
- {
- sal_uInt8 k, i = 10;
- pFound += 16;
- while ( --i )
- {
- k = *pFound++;
- if ( ( k > '0' ) && ( k <= '9' ) )
- {
- if ( k != '1' )
- {
- bLevelConflict = true;
- mbLevelWarning = true;
- }
- break;
- }
- }
- }
- }
- if ( !bLevelConflict )
- {
- double nBoundingBox[4];
- if ( pSource && ImplGetBoundingBox( nBoundingBox, pSource, nParseThis ) )
- {
- Point aPoint = static_cast<const MetaEPSAction*>(pMA)->GetPoint();
- Size aSize = static_cast<const MetaEPSAction*>(pMA)->GetSize();
-
- MapMode aMapMode( aSubstitute.GetPrefMapMode() );
- Size aOutSize( OutputDevice::LogicToLogic( aSize, rVDev.GetMapMode(), aMapMode ) );
- Point aOrigin( OutputDevice::LogicToLogic( aPoint, rVDev.GetMapMode(), aMapMode ) );
- aOrigin.AdjustY(aOutSize.Height() );
- aMapMode.SetOrigin( aOrigin );
- aMapMode.SetScaleX( Fraction(aOutSize.Width() / ( nBoundingBox[ 2 ] - nBoundingBox[ 0 ] )) );
- aMapMode.SetScaleY( Fraction(aOutSize.Height() / ( nBoundingBox[ 3 ] - nBoundingBox[ 1 ] )) );
- ImplWriteLine( "gs" );
- ImplGetMapMode( aMapMode );
- ImplWriteLine( "%%BeginDocument:" );
- mpPS->WriteBytes(pSource, aGfxLink.GetDataSize());
- ImplWriteLine( "%%EndDocument\ngr" );
- }
- }
- }
- break;
-
- case MetaActionType::Transparent:
- {
- // TODO: implement!
- }
- break;
-
- case MetaActionType::RASTEROP:
- {
- pMA->Execute( &rVDev );
- }
- break;
-
- case MetaActionType::FLOATTRANSPARENT:
- {
- const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pMA);
-
- GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() );
- Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() );
- const Size aSrcSize( aTmpMtf.GetPrefSize() );
- const Point aDestPt( pA->GetPoint() );
- const Size aDestSize( pA->GetSize() );
- const double fScaleX = aSrcSize.Width() ? static_cast<double>(aDestSize.Width()) / aSrcSize.Width() : 1.0;
- const double fScaleY = aSrcSize.Height() ? static_cast<double>(aDestSize.Height()) / aSrcSize.Height() : 1.0;
- tools::Long nMoveX, nMoveY;
-
- if( fScaleX != 1.0 || fScaleY != 1.0 )
- {
- aTmpMtf.Scale( fScaleX, fScaleY );
- aSrcPt.setX( FRound( aSrcPt.X() * fScaleX ) );
- aSrcPt.setY( FRound( aSrcPt.Y() * fScaleY ) );
- }
-
- nMoveX = aDestPt.X() - aSrcPt.X();
- nMoveY = aDestPt.Y() - aSrcPt.Y();
-
- if( nMoveX || nMoveY )
- aTmpMtf.Move( nMoveX, nMoveY );
-
- ImplWriteActions( aTmpMtf, rVDev );
- }
- break;
-
- case MetaActionType::COMMENT:
- {
- const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pMA);
- if ( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") )
- {
- const MetaGradientExAction* pGradAction = nullptr;
- while( ++nCurAction < nCount )
- {
- MetaAction* pAction = rMtf.GetAction( nCurAction );
- if( pAction->GetType() == MetaActionType::GRADIENTEX )
- pGradAction = static_cast<const MetaGradientExAction*>(pAction);
- else if( ( pAction->GetType() == MetaActionType::COMMENT ) &&
- ( static_cast<const MetaCommentAction*>(pAction)->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) )
- {
- break;
- }
- }
-
- if( pGradAction )
- ImplWriteGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), rVDev );
- }
- else if ( pA->GetComment() == "XPATHFILL_SEQ_END" )
- {
- if ( aFillPath.Count() )
- {
- aFillPath = tools::PolyPolygon();
- ImplWriteLine( "gr" );
- }
- }
- else
- {
- const sal_uInt8* pData = pA->GetData();
- if ( pData )
- {
- SvMemoryStream aMemStm( const_cast<sal_uInt8 *>(pData), pA->GetDataSize(), StreamMode::READ );
- bool bSkipSequence = false;
- OString sSeqEnd;
-
- if( pA->GetComment() == "XPATHSTROKE_SEQ_BEGIN" )
- {
- sSeqEnd = "XPATHSTROKE_SEQ_END";
- SvtGraphicStroke aStroke;
- ReadSvtGraphicStroke( aMemStm, aStroke );
-
- tools::Polygon aPath;
- aStroke.getPath( aPath );
-
- tools::PolyPolygon aStartArrow;
- tools::PolyPolygon aEndArrow;
- double fStrokeWidth( aStroke.getStrokeWidth() );
- SvtGraphicStroke::JoinType eJT( aStroke.getJoinType() );
- SvtGraphicStroke::DashArray l_aDashArray;
-
- aStroke.getStartArrow( aStartArrow );
- aStroke.getEndArrow( aEndArrow );
- aStroke.getDashArray( l_aDashArray );
-
- bSkipSequence = true;
- if ( l_aDashArray.size() > 11 ) // ps dasharray limit is 11
- bSkipSequence = false;
- if ( aStartArrow.Count() || aEndArrow.Count() )
- bSkipSequence = false;
- if ( static_cast<sal_uInt32>(eJT) > 2 )
- bSkipSequence = false;
- if ( !l_aDashArray.empty() && ( fStrokeWidth != 0.0 ) )
- bSkipSequence = false;
- if ( bSkipSequence )
- {
- ImplWriteLineInfo( fStrokeWidth, aStroke.getMiterLimit(),
- aStroke.getCapType(), eJT, l_aDashArray );
- ImplPolyLine( aPath );
- }
- }
- else if (pA->GetComment() == "XPATHFILL_SEQ_BEGIN")
- {
- sSeqEnd = "XPATHFILL_SEQ_END";
- SvtGraphicFill aFill;
- ReadSvtGraphicFill( aMemStm, aFill );
- switch( aFill.getFillType() )
- {
- case SvtGraphicFill::fillSolid :
- {
- bSkipSequence = true;
- tools::PolyPolygon aPolyPoly;
- aFill.getPath( aPolyPoly );
- sal_uInt16 i, nPolyCount = aPolyPoly.Count();
- if ( nPolyCount )
- {
- aFillColor = aFill.getFillColor();
- ImplWriteFillColor( PS_SPACE );
- for ( i = 0; i < nPolyCount; )
- {
- ImplAddPath( aPolyPoly.GetObject( i ) );
- if ( ++i < nPolyCount )
- {
- mpPS->WriteCharPtr( "p" );
- mnCursorPos += 2;
- ImplExecMode( PS_RET );
- }
- }
- mpPS->WriteCharPtr( "p ef" );
- mnCursorPos += 4;
- ImplExecMode( PS_RET );
- }
- }
- break;
-
- case SvtGraphicFill::fillTexture :
- {
- aFill.getPath( aFillPath );
-
- /* normally an object filling is consisting of three MetaActions:
- MetaBitmapAction using RasterOp xor,
- MetaPolyPolygonAction using RasterOp rop_0
- MetaBitmapAction using RasterOp xor
-
- Because RasterOps cannot been used in Postscript, we have to
- replace these actions. The MetaComment "XPATHFILL_SEQ_BEGIN" is
- providing the clippath of the object. The following loop is
- trying to find the bitmap that is matching the clippath, so that
- only one bitmap is exported, otherwise if the bitmap is not
- locatable, all metaactions are played normally.
- */
- sal_uInt32 nCommentStartAction = nCurAction;
- sal_uInt32 nBitmapCount = 0;
- sal_uInt32 nBitmapAction = 0;
-
- bool bOk = true;
- while( bOk && ( ++nCurAction < nCount ) )
- {
- MetaAction* pAction = rMtf.GetAction( nCurAction );
- switch( pAction->GetType() )
- {
- case MetaActionType::BMPSCALE :
- case MetaActionType::BMPSCALEPART :
- case MetaActionType::BMPEXSCALE :
- case MetaActionType::BMPEXSCALEPART :
- {
- nBitmapCount++;
- nBitmapAction = nCurAction;
- }
- break;
- case MetaActionType::COMMENT :
- {
- if (static_cast<const MetaCommentAction*>(pAction)->GetComment() == "XPATHFILL_SEQ_END")
- bOk = false;
- }
- break;
- default: break;
- }
- }
- if( nBitmapCount == 2 )
- {
- ImplWriteLine( "gs" );
- ImplIntersect( aFillPath );
- GDIMetaFile aTempMtf;
- aTempMtf.AddAction( rMtf.GetAction( nBitmapAction )->Clone() );
- ImplWriteActions( aTempMtf, rVDev );
- ImplWriteLine( "gr" );
- aFillPath = tools::PolyPolygon();
- }
- else
- nCurAction = nCommentStartAction + 1;
- }
- break;
-
- case SvtGraphicFill::fillGradient :
- aFill.getPath( aFillPath );
- break;
-
- case SvtGraphicFill::fillHatch :
- break;
- }
- if ( aFillPath.Count() )
- {
- ImplWriteLine( "gs" );
- ImplIntersect( aFillPath );
- }
- }
- if ( bSkipSequence )
- {
- while( ++nCurAction < nCount )
- {
- pMA = rMtf.GetAction( nCurAction );
- if ( pMA->GetType() == MetaActionType::COMMENT )
- {
- OString sComment( static_cast<MetaCommentAction*>(pMA)->GetComment() );
- if ( sComment == sSeqEnd )
- break;
- }
- }
- }
- }
- }
- }
- break;
- default: break;
- }
- }
-}
-
-inline void PSWriter::ImplWritePoint( const Point& rPoint )
-{
- ImplWriteDouble( rPoint.X() );
- ImplWriteDouble( rPoint.Y() );
-}
-
-void PSWriter::ImplMoveTo( const Point& rPoint )
-{
- ImplWritePoint( rPoint );
- ImplWriteByte( 'm' );
- ImplExecMode( PS_SPACE );
-}
-
-void PSWriter::ImplLineTo( const Point& rPoint, NMode nMode )
-{
- ImplWritePoint( rPoint );
- ImplWriteByte( 'l' );
- ImplExecMode( nMode );
-}
-
-void PSWriter::ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3, NMode nMode )
-{
- ImplWritePoint( rP1 );
- ImplWritePoint( rP2 );
- ImplWritePoint( rP3 );
- mpPS->WriteCharPtr( "ct " );
- ImplExecMode( nMode );
-}
-
-void PSWriter::ImplTranslate( const double& fX, const double& fY )
-{
- ImplWriteDouble( fX );
- ImplWriteDouble( fY );
- ImplWriteByte( 't' );
- ImplExecMode( PS_RET );
-}
-
-void PSWriter::ImplScale( const double& fX, const double& fY )
-{
- ImplWriteDouble( fX );
- ImplWriteDouble( fY );
- ImplWriteByte( 's' );
- ImplExecMode( PS_RET );
-}
-
-void PSWriter::ImplRect( const tools::Rectangle & rRect )
-{
- if ( bFillColor )
- ImplRectFill( rRect );
- if ( bLineColor )
- {
- double nWidth = rRect.GetWidth();
- double nHeight = rRect.GetHeight();
-
- ImplWriteLineColor( PS_SPACE );
- ImplMoveTo( rRect.TopLeft() );
- ImplWriteDouble( nWidth );
- mpPS->WriteCharPtr( "0 rl 0 " );
- ImplWriteDouble( nHeight );
- mpPS->WriteCharPtr( "rl " );
- ImplWriteDouble( nWidth );
- mpPS->WriteCharPtr( "neg 0 rl " );
- ImplClosePathDraw();
- }
- mpPS->WriteUChar( 10 );
- mnCursorPos = 0;
-}
-
-void PSWriter::ImplRectFill( const tools::Rectangle & rRect )
-{
- double nWidth = rRect.GetWidth();
- double nHeight = rRect.GetHeight();
-
- ImplWriteFillColor( PS_SPACE );
- ImplMoveTo( rRect.TopLeft() );
- ImplWriteDouble( nWidth );
- mpPS->WriteCharPtr( "0 rl 0 " );
- ImplWriteDouble( nHeight );
- mpPS->WriteCharPtr( "rl " );
- ImplWriteDouble( nWidth );
- mpPS->WriteCharPtr( "neg 0 rl ef " );
- mpPS->WriteCharPtr( "p ef" );
- mnCursorPos += 2;
- ImplExecMode( PS_RET );
-}
-
-void PSWriter::ImplAddPath( const tools::Polygon & rPolygon )
-{
- sal_uInt16 nPointCount = rPolygon.GetSize();
- if ( nPointCount <= 1 )
- return;
-
- sal_uInt16 i = 1;
- ImplMoveTo( rPolygon.GetPoint( 0 ) );
- while ( i < nPointCount )
- {
- if ( ( rPolygon.GetFlags( i ) == PolyFlags::Control )
- && ( ( i + 2 ) < nPointCount )
- && ( rPolygon.GetFlags( i + 1 ) == PolyFlags::Control )
- && ( rPolygon.GetFlags( i + 2 ) != PolyFlags::Control ) )
- {
- ImplCurveTo( rPolygon[ i ], rPolygon[ i + 1 ], rPolygon[ i + 2 ], PS_WRAP );
- i += 3;
- }
- else
- ImplLineTo( rPolygon.GetPoint( i++ ), PS_SPACE | PS_WRAP );
- }
-}
-
-void PSWriter::ImplIntersect( const tools::PolyPolygon& rPolyPoly )
-{
- sal_uInt16 i, nPolyCount = rPolyPoly.Count();
- for ( i = 0; i < nPolyCount; )
- {
- ImplAddPath( rPolyPoly.GetObject( i ) );
- if ( ++i < nPolyCount )
- {
- mpPS->WriteCharPtr( "p" );
- mnCursorPos += 2;
- ImplExecMode( PS_RET );
- }
- }
- ImplWriteLine( "eoclip newpath" );
-}
-
-void PSWriter::ImplWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice& rVDev )
-{
- ScopedVclPtrInstance< VirtualDevice > l_pVDev;
- GDIMetaFile aTmpMtf;
- l_pVDev->SetMapMode( rVDev.GetMapMode() );
- l_pVDev->AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf );
- ImplWriteActions( aTmpMtf, rVDev );
-}
-
-void PSWriter::ImplPolyPoly( const tools::PolyPolygon & rPolyPoly, bool bTextOutline )
-{
- sal_uInt16 i, nPolyCount = rPolyPoly.Count();
- if ( !nPolyCount )
- return;
-
- if ( bFillColor || bTextOutline )
- {
- if ( bTextOutline )
- ImplWriteTextColor( PS_SPACE );
- else
- ImplWriteFillColor( PS_SPACE );
- for ( i = 0; i < nPolyCount; )
- {
- ImplAddPath( rPolyPoly.GetObject( i ) );
- if ( ++i < nPolyCount )
- {
- mpPS->WriteCharPtr( "p" );
- mnCursorPos += 2;
- ImplExecMode( PS_RET );
- }
- }
- mpPS->WriteCharPtr( "p ef" );
- mnCursorPos += 4;
- ImplExecMode( PS_RET );
- }
- if ( bLineColor )
- {
- ImplWriteLineColor( PS_SPACE );
- for ( i = 0; i < nPolyCount; i++ )
- ImplAddPath( rPolyPoly.GetObject( i ) );
- ImplClosePathDraw();
- }
-}
-
-void PSWriter::ImplPolyLine( const tools::Polygon & rPoly )
-{
- if ( !bLineColor )
- return;
-
- ImplWriteLineColor( PS_SPACE );
- sal_uInt16 i, nPointCount = rPoly.GetSize();
- if ( !nPointCount )
- return;
-
- if ( nPointCount > 1 )
- {
- ImplMoveTo( rPoly.GetPoint( 0 ) );
- i = 1;
- while ( i < nPointCount )
- {
- if ( ( rPoly.GetFlags( i ) == PolyFlags::Control )
- && ( ( i + 2 ) < nPointCount )
- && ( rPoly.GetFlags( i + 1 ) == PolyFlags::Control )
- && ( rPoly.GetFlags( i + 2 ) != PolyFlags::Control ) )
- {
- ImplCurveTo( rPoly[ i ], rPoly[ i + 1 ], rPoly[ i + 2 ], PS_WRAP );
- i += 3;
- }
- else
- ImplLineTo( rPoly.GetPoint( i++ ), PS_SPACE | PS_WRAP );
- }
- }
-
- // #104645# explicitly close path if polygon is closed
- if( rPoly[ 0 ] == rPoly[ nPointCount-1 ] )
- ImplClosePathDraw();
- else
- ImplPathDraw();
-}
-
-void PSWriter::ImplSetClipRegion( vcl::Region const & rClipRegion )
-{
- if ( rClipRegion.IsEmpty() )
- return;
-
- RectangleVector aRectangles;
- rClipRegion.GetRegionRectangles(aRectangles);
-
- for (auto const& rectangle : aRectangles)
- {
- double nX1(rectangle.Left());
- double nY1(rectangle.Top());
- double nX2(rectangle.Right());
- double nY2(rectangle.Bottom());
-
- ImplWriteDouble( nX1 );
- ImplWriteDouble( nY1 );
- ImplWriteByte( 'm' );
- ImplWriteDouble( nX2 );
- ImplWriteDouble( nY1 );
- ImplWriteByte( 'l' );
- ImplWriteDouble( nX2 );
- ImplWriteDouble( nY2 );
- ImplWriteByte( 'l' );
- ImplWriteDouble( nX1 );
- ImplWriteDouble( nY2 );
- ImplWriteByte( 'l' );
- ImplWriteDouble( nX1 );
- ImplWriteDouble( nY1 );
- ImplWriteByte( 'l', PS_SPACE | PS_WRAP );
- }
-
- ImplWriteLine( "eoclip newpath" );
-}
-
-// possible gfx formats:
-//
-// level 1: grayscale 8 bit
-// color 24 bit
-//
-// level 2: grayscale 8 bit
-// color 1(pal), 4(pal), 8(pal), 24 Bit
-//
-
-void PSWriter::ImplBmp( Bitmap const * pBitmap, Bitmap const * pMaskBitmap, const Point & rPoint, double nXWidth, double nYHeightOrg )
-{
- if ( !pBitmap )
- return;
-
- sal_Int32 nHeightOrg = pBitmap->GetSizePixel().Height();
- sal_Int32 nHeightLeft = nHeightOrg;
- tools::Long nWidth = pBitmap->GetSizePixel().Width();
- Point aSourcePos( rPoint );
-
- while ( nHeightLeft )
- {
- Bitmap aTileBitmap( *pBitmap );
- tools::Long nHeight = nHeightLeft;
- double nYHeight = nYHeightOrg;
-
- bool bDoTrans = false;
-
- tools::Rectangle aRect;
- vcl::Region aRegion;
-
- if ( pMaskBitmap )
- {
- bDoTrans = true;
- while (true)
- {
- if ( mnLevel == 1 && nHeight > 10 )
- nHeight = 8;
- aRect = tools::Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) );
- aRegion = pMaskBitmap->CreateRegion( COL_BLACK, aRect );
-
- if( mnLevel == 1 )
- {
- RectangleVector aRectangleVector;
- aRegion.GetRegionRectangles(aRectangleVector);
-
- if ( aRectangleVector.size() * 5 > 1000 )
- {
- nHeight >>= 1;
- if ( nHeight < 2 )
- return;
- continue;
- }
- }
- break;
- }
- }
- if ( nHeight != nHeightOrg )
- {
- nYHeight = nYHeightOrg * nHeight / nHeightOrg;
- aTileBitmap.Crop( tools::Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) ) );
- }
- if ( bDoTrans )
- {
- ImplWriteLine( "gs\npum" );
- ImplTranslate( aSourcePos.X(), aSourcePos.Y() );
- ImplScale( nXWidth / nWidth, nYHeight / nHeight );
-
- RectangleVector aRectangles;
- aRegion.GetRegionRectangles(aRectangles);
- const tools::Long nMoveVertical(nHeightLeft - nHeightOrg);
-
- for (auto & rectangle : aRectangles)
- {
- rectangle.Move(0, nMoveVertical);
-
- ImplWriteLong( rectangle.Left() );
- ImplWriteLong( rectangle.Top() );
- ImplWriteByte( 'm' );
- ImplWriteLong( rectangle.Right() + 1 );
- ImplWriteLong( rectangle.Top() );
- ImplWriteByte( 'l' );
- ImplWriteLong( rectangle.Right() + 1 );
- ImplWriteLong( rectangle.Bottom() + 1 );
- ImplWriteByte( 'l' );
- ImplWriteLong( rectangle.Left() );
- ImplWriteLong( rectangle.Bottom() + 1 );
- ImplWriteByte( 'l' );
- ImplWriteByte( 'p', PS_SPACE | PS_WRAP );
- }
-
- ImplWriteLine( "eoclip newpath" );
- ImplWriteLine( "pom" );
- }
- BitmapReadAccess* pAcc = aTileBitmap.AcquireReadAccess();
-
- if (!bDoTrans )
- ImplWriteLine( "pum" );
-
- ImplTranslate( aSourcePos.X(), aSourcePos.Y() + nYHeight );
- ImplScale( nXWidth, nYHeight );
- if ( mnLevel == 1 ) // level 1 is always grayscale !!!
- {
- ImplWriteLong( nWidth );
- ImplWriteLong( nHeight );
- mpPS->WriteCharPtr( "8 [" );
- ImplWriteLong( nWidth );
- mpPS->WriteCharPtr( "0 0 " );
- ImplWriteLong( -nHeight );
- ImplWriteLong( 0 );
- ImplWriteLong( nHeight );
- ImplWriteLine( "]" );
- mpPS->WriteCharPtr( "{currentfile " );
- ImplWriteLong( nWidth );
- ImplWriteLine( "string readhexstring pop}" );
- ImplWriteLine( "image" );
- for ( tools::Long y = 0; y < nHeight; y++ )
- {
- Scanline pScanlineRead = pAcc->GetScanline( y );
- for ( tools::Long x = 0; x < nWidth; x++ )
- {
- ImplWriteHexByte( pAcc->GetIndexFromData( pScanlineRead, x ) );
- }
- }
- mpPS->WriteUChar( 10 );
- }
- else // Level 2
- {
- if ( mbGrayScale )
- {
- ImplWriteLine( "/DeviceGray setcolorspace" );
- ImplWriteLine( "<<" );
- ImplWriteLine( "/ImageType 1" );
- mpPS->WriteCharPtr( "/Width " );
- ImplWriteLong( nWidth, PS_RET );
- mpPS->WriteCharPtr( "/Height " );
- ImplWriteLong( nHeight, PS_RET );
- ImplWriteLine( "/BitsPerComponent 8" );
- ImplWriteLine( "/Decode[0 1]" );
- mpPS->WriteCharPtr( "/ImageMatrix[" );
- ImplWriteLong( nWidth );
- mpPS->WriteCharPtr( "0 0 " );
- ImplWriteLong( -nHeight );
- ImplWriteLong( 0 );
- ImplWriteLong( nHeight, PS_NONE );
- ImplWriteByte( ']', PS_RET );
- ImplWriteLine( "/DataSource currentfile" );
- ImplWriteLine( "/ASCIIHexDecode filter" );
- if ( mbCompression )
- ImplWriteLine( "/LZWDecode filter" );
- ImplWriteLine( ">>" );
- ImplWriteLine( "image" );
- if ( mbCompression )
- {
- StartCompression();
- for ( tools::Long y = 0; y < nHeight; y++ )
- {
- Scanline pScanlineRead = pAcc->GetScanline( y );
- for ( tools::Long x = 0; x < nWidth; x++ )
- {
- Compress( pAcc->GetIndexFromData( pScanlineRead, x ) );
- }
- }
- EndCompression();
- }
- else
- {
- for ( tools::Long y = 0; y < nHeight; y++ )
- {
- Scanline pScanlineRead = pAcc->GetScanline( y );
- for ( tools::Long x = 0; x < nWidth; x++ )
- {
- ImplWriteHexByte( pAcc->GetIndexFromData( pScanlineRead, x ) );
- }
- }
- }
- }
- else
- {
- // have we to write a palette ?
-
- if ( pAcc->HasPalette() )
- {
- ImplWriteLine( "[/Indexed /DeviceRGB " );
- ImplWriteLong( pAcc->GetPaletteEntryCount() - 1, PS_RET );
- ImplWriteByte( '<', PS_NONE );
- for ( sal_uInt16 i = 0; i < pAcc->GetPaletteEntryCount(); i++ )
- {
- BitmapColor aBitmapColor = pAcc->GetPaletteColor( i );
- ImplWriteHexByte( aBitmapColor.GetRed(), PS_NONE );
- ImplWriteHexByte( aBitmapColor.GetGreen(), PS_NONE );
- ImplWriteHexByte( aBitmapColor.GetBlue(), PS_SPACE | PS_WRAP );
- }
- ImplWriteByte( '>', PS_RET );
-
- ImplWriteLine( "] setcolorspace" );
- ImplWriteLine( "<<" );
- ImplWriteLine( "/ImageType 1" );
- mpPS->WriteCharPtr( "/Width " );
- ImplWriteLong( nWidth, PS_RET );
- mpPS->WriteCharPtr( "/Height " );
- ImplWriteLong( nHeight, PS_RET );
- ImplWriteLine( "/BitsPerComponent 8" );
- ImplWriteLine( "/Decode[0 255]" );
- mpPS->WriteCharPtr( "/ImageMatrix[" );
- ImplWriteLong( nWidth );
- mpPS->WriteCharPtr( "0 0 " );
- ImplWriteLong( -nHeight );
- ImplWriteLong( 0);
- ImplWriteLong( nHeight, PS_NONE );
- ImplWriteByte( ']', PS_RET );
- ImplWriteLine( "/DataSource currentfile" );
- ImplWriteLine( "/ASCIIHexDecode filter" );
- if ( mbCompression )
- ImplWriteLine( "/LZWDecode filter" );
- ImplWriteLine( ">>" );
- ImplWriteLine( "image" );
- if ( mbCompression )
- {
- StartCompression();
- for ( tools::Long y = 0; y < nHeight; y++ )
- {
- Scanline pScanlineRead = pAcc->GetScanline( y );
- for ( tools::Long x = 0; x < nWidth; x++ )
- {
- Compress( pAcc->GetIndexFromData( pScanlineRead, x ) );
- }
- }
- EndCompression();
- }
- else
- {
- for ( tools::Long y = 0; y < nHeight; y++ )
- {
- Scanline pScanlineRead = pAcc->GetScanline( y );
- for ( tools::Long x = 0; x < nWidth; x++ )
- {
- ImplWriteHexByte( pAcc->GetIndexFromData( pScanlineRead, x ) );
- }
- }
- }
- }
- else // 24 bit color
- {
- ImplWriteLine( "/DeviceRGB setcolorspace" );
- ImplWriteLine( "<<" );
- ImplWriteLine( "/ImageType 1" );
- mpPS->WriteCharPtr( "/Width " );
- ImplWriteLong( nWidth, PS_RET );
- mpPS->WriteCharPtr( "/Height " );
- ImplWriteLong( nHeight, PS_RET );
- ImplWriteLine( "/BitsPerComponent 8" );
- ImplWriteLine( "/Decode[0 1 0 1 0 1]" );
- mpPS->WriteCharPtr( "/ImageMatrix[" );
- ImplWriteLong( nWidth );
- mpPS->WriteCharPtr( "0 0 " );
- ImplWriteLong( -nHeight );
- ImplWriteLong( 0 );
- ImplWriteLong( nHeight, PS_NONE );
- ImplWriteByte( ']', PS_RET );
- ImplWriteLine( "/DataSource currentfile" );
- ImplWriteLine( "/ASCIIHexDecode filter" );
- if ( mbCompression )
- ImplWriteLine( "/LZWDecode filter" );
- ImplWriteLine( ">>" );
- ImplWriteLine( "image" );
- if ( mbCompression )
- {
- StartCompression();
- for ( tools::Long y = 0; y < nHeight; y++ )
- {
- Scanline pScanlineRead = pAcc->GetScanline( y );
- for ( tools::Long x = 0; x < nWidth; x++ )
- {
- const BitmapColor aBitmapColor( pAcc->GetPixelFromData( pScanlineRead, x ) );
- Compress( aBitmapColor.GetRed() );
- Compress( aBitmapColor.GetGreen() );
- Compress( aBitmapColor.GetBlue() );
- }
- }
- EndCompression();
- }
- else
- {
- for ( tools::Long y = 0; y < nHeight; y++ )
- {
- Scanline pScanline = pAcc->GetScanline( y );
- for ( tools::Long x = 0; x < nWidth; x++ )
- {
- const BitmapColor aBitmapColor( pAcc->GetPixelFromData( pScanline, x ) );
- ImplWriteHexByte( aBitmapColor.GetRed() );
- ImplWriteHexByte( aBitmapColor.GetGreen() );
- ImplWriteHexByte( aBitmapColor.GetBlue() );
- }
- }
- }
- }
- }
- ImplWriteLine( ">" ); // in Level 2 the dictionary needs to be closed (eod)
- }
- if ( bDoTrans )
- ImplWriteLine( "gr" );
- else
- ImplWriteLine( "pom" );
-
- Bitmap::ReleaseAccess( pAcc );
- nHeightLeft -= nHeight;
- if ( nHeightLeft )
- {
- nHeightLeft++;
- aSourcePos.setY( static_cast<tools::Long>( rPoint.Y() + ( nYHeightOrg * ( nHeightOrg - nHeightLeft ) ) / nHeightOrg ) );
- }
- }
-}
-
-void PSWriter::ImplWriteCharacter( char nChar )
-{
- switch( nChar )
- {
- case '(' :
- case ')' :
- case '\\' :
- ImplWriteByte( sal_uInt8('\\'), PS_NONE );
- }
- ImplWriteByte( static_cast<sal_uInt8>(nChar), PS_NONE );
-}
-
-void PSWriter::ImplWriteString( const OString& rString, VirtualDevice const & rVDev, const tools::Long* pDXArry, bool bStretch )
-{
- sal_Int32 nLen = rString.getLength();
- if ( !nLen )
- return;
-
- if ( pDXArry )
- {
- double nx = 0;
-
- for (sal_Int32 i = 0; i < nLen; ++i)
- {
- if ( i > 0 )
- nx = pDXArry[ i - 1 ];
- ImplWriteDouble( bStretch ? nx : rVDev.GetTextWidth( OUString(rString[i]) ) );
- ImplWriteDouble( nx );
- ImplWriteLine( "(", PS_NONE );
- ImplWriteCharacter( rString[i] );
- ImplWriteLine( ") bs" );
- }
- }
- else
- {
- ImplWriteByte( '(', PS_NONE );
- for (sal_Int32 i = 0; i < nLen; ++i)
- ImplWriteCharacter( rString[i] );
- ImplWriteLine( ") sw" );
- }
-}
-
-void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const tools::Long* pDXArry, sal_Int32 nWidth, VirtualDevice const & rVDev )
-{
- if ( rUniString.isEmpty() )
- return;
- if ( mnTextMode == 0 ) // using glyph outlines
- {
- vcl::Font aNotRotatedFont( maFont );
- aNotRotatedFont.SetOrientation( 0_deg10 );
-
- ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::BITMASK);
- pVirDev->SetMapMode( rVDev.GetMapMode() );
- pVirDev->SetFont( aNotRotatedFont );
- pVirDev->SetTextAlign( eTextAlign );
-
- Degree10 nRotation = maFont.GetOrientation();
- tools::Polygon aPolyDummy( 1 );
-
- Point aPos( rPos );
- if ( nRotation )
- {
- aPolyDummy.SetPoint( aPos, 0 );
- aPolyDummy.Rotate( rPos, nRotation );
- aPos = aPolyDummy.GetPoint( 0 );
- }
- bool bOldLineColor = bLineColor;
- bLineColor = false;
- std::vector<tools::PolyPolygon> aPolyPolyVec;
- if ( pVirDev->GetTextOutlines( aPolyPolyVec, rUniString, 0, 0, -1, nWidth, pDXArry ) )
- {
- // always adjust text position to match baseline alignment
- ImplWriteLine( "pum" );
- ImplWriteDouble( aPos.X() );
- ImplWriteDouble( aPos.Y() );
- ImplWriteLine( "t" );
- if ( nRotation )
- {
- ImplWriteF( nRotation.get(), 1 );
- mpPS->WriteCharPtr( "r " );
- }
- for (auto const& elem : aPolyPolyVec)
- ImplPolyPoly( elem, true );
- ImplWriteLine( "pom" );
- }
- bLineColor = bOldLineColor;
- }
- else if ( ( mnTextMode == 1 ) || ( mnTextMode == 2 ) ) // normal text output
- {
- if ( mnTextMode == 2 ) // forcing output one complete text packet, by
- pDXArry = nullptr; // ignoring the kerning array
- ImplSetAttrForText( rPos );
- OString aStr(OUStringToOString(rUniString,
- maFont.GetCharSet()));
- ImplWriteString( aStr, rVDev, pDXArry, nWidth != 0 );
- if ( maFont.GetOrientation() )
- ImplWriteLine( "gr" );
- }
-}
-
-void PSWriter::ImplSetAttrForText( const Point& rPoint )
-{
- Point aPoint( rPoint );
-
- Degree10 nRotation = maFont.GetOrientation();
- ImplWriteTextColor(PS_RET);
-
- Size aSize = maFont.GetFontSize();
-
- if ( maLastFont != maFont )
- {
- if ( maFont.GetPitch() == PITCH_FIXED ) // a little bit font selection
- ImplDefineFont( "Courier", "Oblique" );
- else if ( maFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
- ImplWriteLine( "/Symbol findfont" );
- else if ( maFont.GetFamilyType() == FAMILY_SWISS )
- ImplDefineFont( "Helvetica", "Oblique" );
- else
- ImplDefineFont( "Times", "Italic" );
-
- maLastFont = maFont;
- aSize = maFont.GetFontSize();
- ImplWriteDouble( aSize.Height() );
- mpPS->WriteCharPtr( "sf " );
- }
- if ( eTextAlign != ALIGN_BASELINE )
- { // PostScript does not know about FontAlignment
- if ( eTextAlign == ALIGN_TOP ) // -> so I assume that
- aPoint.AdjustY( aSize.Height() * 4 / 5 ); // the area under the baseline
- else if ( eTextAlign == ALIGN_BOTTOM ) // is about 20% of the font size
- aPoint.AdjustY( -( aSize.Height() / 5 ) );
- }
- ImplMoveTo( aPoint );
- if ( nRotation )
- {
- mpPS->WriteCharPtr( "gs " );
- ImplWriteF( nRotation.get(), 1 );
- mpPS->WriteCharPtr( "r " );
- }
-}
-
-void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic )
-{
- mpPS->WriteUChar( '/' ); //convert the font pOriginalName using ISOLatin1Encoding
- mpPS->WriteCharPtr( pOriginalName );
- switch ( maFont.GetWeight() )
- {
- case WEIGHT_SEMIBOLD :
- case WEIGHT_BOLD :
- case WEIGHT_ULTRABOLD :
- case WEIGHT_BLACK :
- mpPS->WriteCharPtr( "-Bold" );
- if ( maFont.GetItalic() != ITALIC_NONE )
- mpPS->WriteCharPtr( pItalic );
- break;
- default:
- if ( maFont.GetItalic() != ITALIC_NONE )
- mpPS->WriteCharPtr( pItalic );
- break;
- }
- ImplWriteLine( " f" );
-}
-
-void PSWriter::ImplClosePathDraw()
-{
- mpPS->WriteCharPtr( "pc" );
- mnCursorPos += 2;
- ImplExecMode( PS_RET );
-}
-
-void PSWriter::ImplPathDraw()
-{
- mpPS->WriteCharPtr( "ps" );
- mnCursorPos += 2;
- ImplExecMode( PS_RET );
-}
-
-
-inline void PSWriter::ImplWriteLineColor( NMode nMode )
-{
- if ( aColor != aLineColor )
- {
- aColor = aLineColor;
- ImplWriteColor( nMode );
- }
-}
-
-inline void PSWriter::ImplWriteFillColor( NMode nMode )
-{
- if ( aColor != aFillColor )
- {
- aColor = aFillColor;
- ImplWriteColor( nMode );
- }
-}
-
-inline void PSWriter::ImplWriteTextColor( NMode nMode )
-{
- if ( aColor != aTextColor )
- {
- aColor = aTextColor;
- ImplWriteColor( nMode );
- }
-}
-
-void PSWriter::ImplWriteColor( NMode nMode )
-{
- if ( mbGrayScale )
- {
- // writes the Color (grayscale) as a Number from 0.000 up to 1.000
-
- ImplWriteF( 1000 * ( aColor.GetRed() * 77 + aColor.GetGreen() * 151 +
- aColor.GetBlue() * 28 + 1 ) / 65536, 3, nMode );
- }
- else
- {
- ImplWriteB1 ( aColor.GetRed() );
- ImplWriteB1 ( aColor.GetGreen() );
- ImplWriteB1 ( aColor.GetBlue() );
- }
- mpPS->WriteCharPtr( "c" ); // ( c is defined as setrgbcolor or setgray )
- ImplExecMode( nMode );
-}
-
-void PSWriter::ImplGetMapMode( const MapMode& rMapMode )
-{
- ImplWriteLine( "tm setmatrix" );
- double fMul = ImplGetScaling(rMapMode);
- double fScaleX = static_cast<double>(rMapMode.GetScaleX()) * fMul;
- double fScaleY = static_cast<double>(rMapMode.GetScaleY()) * fMul;
- ImplTranslate( rMapMode.GetOrigin().X() * fScaleX, rMapMode.GetOrigin().Y() * fScaleY );
- ImplScale( fScaleX, fScaleY );
-}
-
-inline void PSWriter::ImplExecMode( NMode nMode )
-{
- if ( nMode & PS_WRAP )
- {
- if ( mnCursorPos >= PS_LINESIZE )
- {
- mnCursorPos = 0;
- mpPS->WriteUChar( 0xa );
- return;
- }
- }
- if ( nMode & PS_SPACE )
- {
- mpPS->WriteUChar( 32 );
- mnCursorPos++;
- }
- if ( nMode & PS_RET )
- {
- mpPS->WriteUChar( 0xa );
- mnCursorPos = 0;
- }
-}
-
-inline void PSWriter::ImplWriteLine( const char* pString, NMode nMode )
-{
- sal_uInt32 i = 0;
- while ( pString[ i ] )
- {
- mpPS->WriteUChar( pString[ i++ ] );
- }
- mnCursorPos += i;
- ImplExecMode( nMode );
-}
-
-double PSWriter::ImplGetScaling( const MapMode& rMapMode )
-{
- double nMul;
- switch (rMapMode.GetMapUnit())
- {
- case MapUnit::MapPixel :
- case MapUnit::MapSysFont :
- case MapUnit::MapAppFont :
-
- case MapUnit::Map100thMM :
- nMul = 1;
- break;
- case MapUnit::Map10thMM :
- nMul = 10;
- break;
- case MapUnit::MapMM :
- nMul = 100;
- break;
- case MapUnit::MapCM :
- nMul = 1000;
- break;
- case MapUnit::Map1000thInch :
- nMul = 2.54;
- break;
- case MapUnit::Map100thInch :
- nMul = 25.4;
- break;
- case MapUnit::Map10thInch :
- nMul = 254;
- break;
- case MapUnit::MapInch :
- nMul = 2540;
- break;
- case MapUnit::MapTwip :
- nMul = 1.76388889;
- break;
- case MapUnit::MapPoint :
- nMul = 35.27777778;
- break;
- default:
- nMul = 1.0;
- break;
- }
- return nMul;
-}
-
-
-void PSWriter::ImplWriteLineInfo( double fLWidth, double fMLimit,
- SvtGraphicStroke::CapType eLCap,
- SvtGraphicStroke::JoinType eJoin,
- SvtGraphicStroke::DashArray const & rLDash )
-{
- if ( fLineWidth != fLWidth )
- {
- fLineWidth = fLWidth;
- ImplWriteDouble( fLineWidth );
- ImplWriteLine( "lw", PS_SPACE );
- }
- if ( eLineCap != eLCap )
- {
- eLineCap = eLCap;
- ImplWriteLong( static_cast<sal_Int32>(eLineCap) );
- ImplWriteLine( "lc", PS_SPACE );
- }
- if ( eJoinType != eJoin )
- {
- eJoinType = eJoin;
- ImplWriteLong( static_cast<sal_Int32>(eJoinType) );
- ImplWriteLine( "lj", PS_SPACE );
- }
- if ( eJoinType == SvtGraphicStroke::joinMiter )
- {
- if ( fMiterLimit != fMLimit )
- {
- fMiterLimit = fMLimit;
- ImplWriteDouble( fMiterLimit );
- ImplWriteLine( "ml", PS_SPACE );
- }
- }
- if ( aDashArray != rLDash )
- {
- aDashArray = rLDash;
- sal_uInt32 j, i = aDashArray.size();
- ImplWriteLine( "[", PS_SPACE );
- for ( j = 0; j < i; j++ )
- ImplWriteDouble( aDashArray[ j ] );
- ImplWriteLine( "] 0 ld" );
- }
-}
-
-void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo )
-{
- SvtGraphicStroke::DashArray l_aDashArray;
- if ( rLineInfo.GetStyle() == LineStyle::Dash )
- 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())
- {
- case basegfx::B2DLineJoin::NONE:
- // do NOT use SvtGraphicStroke::joinNone here
- // since it will be written as numerical value directly
- // and is NOT a valid EPS value
- break;
- case basegfx::B2DLineJoin::Miter:
- aJoinType = SvtGraphicStroke::joinMiter;
- break;
- case basegfx::B2DLineJoin::Bevel:
- aJoinType = SvtGraphicStroke::joinBevel;
- break;
- case basegfx::B2DLineJoin::Round:
- aJoinType = SvtGraphicStroke::joinRound;
- break;
- }
- switch(rLineInfo.GetLineCap())
- {
- default: /* css::drawing::LineCap_BUTT */
- {
- aCapType = SvtGraphicStroke::capButt;
- break;
- }
- case css::drawing::LineCap_ROUND:
- {
- aCapType = SvtGraphicStroke::capRound;
- break;
- }
- case css::drawing::LineCap_SQUARE:
- {
- aCapType = SvtGraphicStroke::capSquare;
- break;
- }
- }
-
- ImplWriteLineInfo( fLWidth, fMiterLimit, aCapType, aJoinType, l_aDashArray );
-}
-
-void PSWriter::ImplWriteLong(sal_Int32 nNumber, NMode nMode)
-{
- const OString aNumber(OString::number(nNumber));
- mnCursorPos += aNumber.getLength();
- mpPS->WriteOString( aNumber );
- ImplExecMode(nMode);
-}
-
-void PSWriter::ImplWriteDouble( double fNumber )
-{
- sal_Int32 nPTemp = static_cast<sal_Int32>(fNumber);
- sal_Int32 nATemp = std::abs( static_cast<sal_Int32>( ( fNumber - nPTemp ) * 100000 ) );
-
- if ( !nPTemp && nATemp && ( fNumber < 0.0 ) )
- mpPS->WriteChar( '-' );
-
- const OString aNumber1(OString::number(nPTemp));
- mpPS->WriteOString( aNumber1 );
- mnCursorPos += aNumber1.getLength();
-
- if ( nATemp )
- {
- int zCount = 0;
- mpPS->WriteUChar( '.' );
- mnCursorPos++;
- const OString aNumber2(OString::number(nATemp));
-
- sal_Int16 n, nLen = aNumber2.getLength();
- if ( nLen < 8 )
- {
- mnCursorPos += 6 - nLen;
- for ( n = 0; n < ( 5 - nLen ); n++ )
- {
- mpPS->WriteUChar( '0' );
- }
- }
- mnCursorPos += nLen;
- for ( n = 0; n < nLen; n++ )
- {
- mpPS->WriteChar( aNumber2[n] );
- zCount--;
- if ( aNumber2[n] != '0' )
- zCount = 0;
- }
- if ( zCount )
- mpPS->SeekRel( zCount );
- }
- ImplExecMode( PS_SPACE );
-}
-
-/// Writes the number to stream: nNumber / ( 10^nCount )
-void PSWriter::ImplWriteF( sal_Int32 nNumber, sal_uInt8 nCount, NMode nMode )
-{
- if ( nNumber < 0 )
- {
- mpPS->WriteUChar( '-' );
- nNumber = -nNumber;
- mnCursorPos++;
- }
- const OString aScaleFactor(OString::number(nNumber));
- sal_uInt32 nLen = aScaleFactor.getLength();
- sal_Int32 const nStSize = (nCount + 1) - nLen;
- static_assert(sizeof(nStSize) == sizeof((nCount + 1) - nLen)); // tdf#134667
- if ( nStSize >= 1 )
- {
- mpPS->WriteUChar( '0' );
- mnCursorPos++;
- }
- if ( nStSize >= 2 )
- {
- mpPS->WriteUChar( '.' );
- for (sal_Int32 i = 1; i < nStSize; ++i)
- {
- mpPS->WriteUChar( '0' );
- mnCursorPos++;
- }
- }
- mnCursorPos += nLen;
- for( sal_uInt32 n = 0; n < nLen; n++ )
- {
- if ( n == nLen - nCount )
- {
- mpPS->WriteUChar( '.' );
- mnCursorPos++;
- }
- mpPS->WriteChar( aScaleFactor[n] );
- }
- ImplExecMode( nMode );
-}
-
-void PSWriter::ImplWriteByte( sal_uInt8 nNumb, NMode nMode )
-{
- mpPS->WriteUChar( nNumb );
- mnCursorPos++;
- ImplExecMode( nMode );
-}
-
-void PSWriter::ImplWriteHexByte( sal_uInt8 nNumb, NMode nMode )
-{
- if ( ( nNumb >> 4 ) > 9 )
- mpPS->WriteUChar( ( nNumb >> 4 ) + 'A' - 10 );
- else
- mpPS->WriteUChar( ( nNumb >> 4 ) + '0' );
-
- if ( ( nNumb & 0xf ) > 9 )
- mpPS->WriteUChar( ( nNumb & 0xf ) + 'A' - 10 );
- else
- mpPS->WriteUChar( ( nNumb & 0xf ) + '0' );
- mnCursorPos += 2;
- ImplExecMode( nMode );
-}
-
-// writes the sal_uInt8 nNumb as a Number from 0.000 up to 1.000
-
-void PSWriter::ImplWriteB1( sal_uInt8 nNumb )
-{
- ImplWriteF( 1000 * ( nNumb + 1 ) / 256 );
-}
-
-inline void PSWriter::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen )
-{
- dwShift |= ( nCode << ( nOffset - nCodeLen ) );
- nOffset -= nCodeLen;
- while ( nOffset < 24 )
- {
- ImplWriteHexByte( static_cast<sal_uInt8>( dwShift >> 24 ) );
- dwShift <<= 8;
- nOffset += 8;
- }
- if ( nCode == 257 && nOffset != 32 )
- ImplWriteHexByte( static_cast<sal_uInt8>( dwShift >> 24 ) );
-}
-
-void PSWriter::StartCompression()
-{
- sal_uInt16 i;
- nDataSize = 8;
-
- nClearCode = 1 << nDataSize;
- nEOICode = nClearCode + 1;
- nTableSize = nEOICode + 1;
- nCodeSize = nDataSize + 1;
-
- nOffset = 32; // number of free unused in dwShift
- dwShift = 0;
-
- pTable.reset(new PSLZWCTreeNode[ 4096 ]);
-
- for ( i = 0; i < 4096; i++ )
- {
- pTable[ i ].pBrother = pTable[ i ].pFirstChild = nullptr;
- pTable[ i ].nCode = i;
- pTable[ i ].nValue = static_cast<sal_uInt8>( i );
- }
- pPrefix = nullptr;
- WriteBits( nClearCode, nCodeSize );
-}
-
-void PSWriter::Compress( sal_uInt8 nCompThis )
-{
- PSLZWCTreeNode* p;
- sal_uInt16 i;
- sal_uInt8 nV;
-
- if( !pPrefix )
- {
- pPrefix = pTable.get() + nCompThis;
- }
- else
- {
- nV = nCompThis;
- for( p = pPrefix->pFirstChild; p != nullptr; p = p->pBrother )
- {
- if ( p->nValue == nV )
- break;
- }
-
- if( p )
- pPrefix = p;
- else
- {
- WriteBits( pPrefix->nCode, nCodeSize );
-
- if ( nTableSize == 409 )
- {
- WriteBits( nClearCode, nCodeSize );
-
- for ( i = 0; i < nClearCode; i++ )
- pTable[ i ].pFirstChild = nullptr;
-
- nCodeSize = nDataSize + 1;
- nTableSize = nEOICode + 1;
- }
- else
- {
- if( nTableSize == static_cast<sal_uInt16>( ( 1 << nCodeSize ) - 1 ) )
- nCodeSize++;
-
- p = pTable.get() + ( nTableSize++ );
- p->pBrother = pPrefix->pFirstChild;
- pPrefix->pFirstChild = p;
- p->nValue = nV;
- p->pFirstChild = nullptr;
- }
-
- pPrefix = pTable.get() + nV;
- }
- }
-}
-
-void PSWriter::EndCompression()
-{
- if( pPrefix )
- WriteBits( pPrefix->nCode, nCodeSize );
-
- WriteBits( nEOICode, nCodeSize );
- pTable.reset();
-}
-
-sal_uInt8* PSWriter::ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uInt32 nComp, sal_uInt32 nSize )
-{
- while ( nComp-- >= nSize )
- {
- sal_uInt64 i;
- for ( i = 0; i < nSize; i++ )
- {
- if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
- break;
- }
- if ( i == nSize )
- return pSource;
- pSource++;
- }
- return nullptr;
-}
-
-bool PSWriter::ImplGetBoundingBox( double* nNumb, sal_uInt8* pSource, sal_uInt32 nSize )
-{
- bool bRetValue = false;
- sal_uInt32 nBytesRead;
-
- if ( nSize < 256 ) // we assume that the file is greater than 256 bytes
- return false;
-
- if ( nSize < POSTSCRIPT_BOUNDINGSEARCH )
- nBytesRead = nSize;
- else
- nBytesRead = POSTSCRIPT_BOUNDINGSEARCH;
-
- sal_uInt8* pDest = ImplSearchEntry( pSource, reinterpret_cast<sal_uInt8 const *>("%%BoundingBox:"), nBytesRead, 14 );
- if ( pDest )
- {
- int nSecurityCount = 100; // only 100 bytes following the bounding box will be checked
- nNumb[0] = nNumb[1] = nNumb[2] = nNumb[3] = 0;
- pDest += 14;
- for ( int i = 0; ( i < 4 ) && nSecurityCount; i++ )
- {
- int nDivision = 1;
- bool bDivision = false;
- bool bNegative = false;
- bool bValid = true;
-
- while ( ( --nSecurityCount ) && ( ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) )
- pDest++;
- sal_uInt8 nByte = *pDest;
- while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) )
- {
- switch ( nByte )
- {
- case '.' :
- if ( bDivision )
- bValid = false;
- else
- bDivision = true;
- break;
- case '-' :
- bNegative = true;
- break;
- default :
- if ( ( nByte < '0' ) || ( nByte > '9' ) )
- nSecurityCount = 1; // error parsing the bounding box values
- else if ( bValid )
- {
- if ( bDivision )
- nDivision*=10;
- nNumb[i] *= 10;
- nNumb[i] += nByte - '0';
- }
- break;
- }
- nSecurityCount--;
- nByte = *(++pDest);
- }
- if ( bNegative )
- nNumb[i] = -nNumb[i];
- if ( bDivision && ( nDivision != 1 ) )
- nNumb[i] /= nDivision;
- }
- if ( nSecurityCount)
- bRetValue = true;
- }
- return bRetValue;
-}
-
-//================== GraphicExport - the exported function ===================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-epsGraphicExport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem )
-{
- PSWriter aPSWriter;
- return aPSWriter.WritePS( rGraphic, rStream, pFilterConfigItem );
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index 48a71609519e..e726db7a137c 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <o3tl/any.hxx>
#include <o3tl/safeint.hxx>
@@ -46,7 +47,7 @@
#include <comphelper/processfactory.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/helpers.hxx>
-#include <unotools/configmgr.hxx>
+#include <comphelper/configuration.hxx>
#include "bitmap.hxx"
#include "elements.hxx"
@@ -109,7 +110,7 @@ bool CGMImpressOutAct::ImplInitPage()
bool CGMImpressOutAct::ImplCreateShape( const OUString& rType )
{
- if (utl::ConfigManager::IsFuzzing())
+ if (comphelper::IsFuzzing())
return false;
uno::Reference< uno::XInterface > xNewShape( maXMultiServiceFactory->createInstance( rType ) );
maXShape.set( xNewShape, uno::UNO_QUERY );
@@ -386,11 +387,10 @@ void CGMImpressOutAct::InsertPage()
{
if ( mnCurrentPage ) // one side is always existing, therefore the first side will be left out
{
- uno::Reference< drawing::XDrawPage > xPage = maXDrawPages->insertNewByIndex( 0xffff );
- maXDrawPage = xPage;
+ maXDrawPage = maXDrawPages->insertNewByIndex(0xffff);
if ( !ImplInitPage() )
mpCGM->mbStatus = false;
- if (mnCurrentPage > MAX_PAGES_FOR_FUZZING && utl::ConfigManager::IsFuzzing())
+ if (mnCurrentPage > MAX_PAGES_FOR_FUZZING && comphelper::IsFuzzing())
{
// ofz#21753 that's enough pages for fuzzing, we're not doing anything productive now
mpCGM->mbStatus = false;
@@ -451,16 +451,35 @@ void CGMImpressOutAct::EndGrouping()
void CGMImpressOutAct::DrawRectangle( FloatRect const & rFloatRect )
{
- if ( mnGroupActCount != ( mpCGM->mnActCount - 1 ) ) // POWERPOINT HACK !!!
+ if (mnGroupActCount == (mpCGM->mnActCount - 1)) // POWERPOINT HACK !!!
+ return;
+ if (useless(rFloatRect.Left))
{
- if ( ImplCreateShape( "com.sun.star.drawing.RectangleShape" ) )
- {
- awt::Size aSize( static_cast<tools::Long>(rFloatRect.Right - rFloatRect.Left ), static_cast<tools::Long>(rFloatRect.Bottom-rFloatRect.Top ) );
- maXShape->setSize( aSize );
- maXShape->setPosition( awt::Point( static_cast<tools::Long>(rFloatRect.Left), static_cast<tools::Long>(rFloatRect.Top) ) );
- ImplSetFillBundle();
- }
+ SAL_WARN("filter.icgm", "bad left: " << rFloatRect.Left);
+ return;
}
+ if (useless(rFloatRect.Top))
+ {
+ SAL_WARN("filter.icgm", "bad top: " << rFloatRect.Top);
+ return;
+ }
+ double fWidth = rFloatRect.Right - rFloatRect.Left;
+ if (useless(fWidth))
+ {
+ SAL_WARN("filter.icgm", "bad width: " << fWidth);
+ return;
+ }
+ double fHeight = rFloatRect.Bottom - rFloatRect.Top;
+ if (useless(fHeight))
+ {
+ SAL_WARN("filter.icgm", "bad height: " << fHeight);
+ return;
+ }
+ if (!ImplCreateShape( "com.sun.star.drawing.RectangleShape"))
+ return;
+ maXShape->setSize(awt::Size(fWidth, fHeight));
+ maXShape->setPosition(awt::Point(rFloatRect.Left, rFloatRect.Top));
+ ImplSetFillBundle();
}
void CGMImpressOutAct::DrawEllipse( FloatPoint const & rCenter, FloatPoint const & rSize, double& rOrientation )
@@ -553,7 +572,7 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint const & rCenter, FloatPoint
void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
{
- if ( !pBmpDesc->mbStatus || !pBmpDesc->mxBitmap )
+ if ( !pBmpDesc->mbStatus || pBmpDesc->mxBitmap.IsEmpty() )
return;
FloatPoint aOrigin = pBmpDesc->mnOrigin;
@@ -771,8 +790,8 @@ void CGMImpressOutAct::DrawText(awt::Point const & rTextPos, awt::Size const & r
maXShape->setSize( awt::Size( nWidth, nHeight ) );
double nX = mpCGM->pElement->nCharacterOrientation[ 2 ];
double nY = mpCGM->pElement->nCharacterOrientation[ 3 ];
- double fSqrt = sqrt(nX * nX + nY * nY);
- double nOrientation = fSqrt != 0.0 ? (acos(nX / fSqrt) * 57.29577951308) : 0.0;
+ double fSqrt = std::hypot(nX, nY);
+ double nOrientation = fSqrt != 0.0 ? basegfx::rad2deg(acos(nX / fSqrt)) : 0.0;
if ( nY < 0 )
nOrientation = 360 - nOrientation;
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx
index d857c5848ed6..ed163206641a 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -19,7 +19,7 @@
#include <sal/log.hxx>
-#include <unotools/configmgr.hxx>
+#include <comphelper/configuration.hxx>
#include <vcl/BitmapTools.hxx>
#include <memory>
@@ -34,14 +34,13 @@ Color BMCOL(sal_uInt32 _col) {
}
-CGMBitmap::CGMBitmap( CGM& rCGM ) :
- mpCGM ( &rCGM ),
- pCGMBitmapDescriptor ( new CGMBitmapDescriptor )
+CGMBitmap::CGMBitmap(CGM& rCGM)
+ : mpCGM(&rCGM)
+ , pCGMBitmapDescriptor(new CGMBitmapDescriptor)
{
ImplGetBitmap( *pCGMBitmapDescriptor );
};
-
CGMBitmap::~CGMBitmap()
{
}
@@ -58,7 +57,6 @@ namespace
case 8:
case 24:
return true;
- break;
default:
break;
}
@@ -93,7 +91,6 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
switch ( rDesc.mnDstBitsPerPixel ) {
case 1 : {
- bool bOk = true;
std::vector<Color> palette(2);
if ( rDesc.mnLocalColorPrecision == 1 )
palette = ImplGeneratePalette( rDesc );
@@ -103,7 +100,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
? BMCOL( mpCGM->pElement->pFillBundle->GetColor() )
: BMCOL( mpCGM->pElement->aFillBundle.GetColor() );
};
- for (ny = 0; bOk && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
+ for (ny = 0; rDesc.mbStatus && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
nxC = nxCount;
for ( nx = 0; --nxC; nx++ ) {
// this is not fast, but a one bit/pixel format is rarely used
@@ -111,7 +108,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
if (pPos >= rDesc.mpEndBuf)
{
SAL_WARN("filter.icgm", "buffer is too small");
- bOk = false;
+ rDesc.mbStatus = false;
break;
}
sal_uInt8 colorIndex = static_cast<sal_uInt8>((*pPos >> ((nx & 7)^7))) & 1;
@@ -122,9 +119,8 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
break;
case 2 : {
- bool bOk = true;
auto palette = ImplGeneratePalette( rDesc );
- for (ny = 0; bOk && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
+ for (ny = 0; rDesc.mbStatus && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
nxC = nxCount;
for ( nx = 0; --nxC; nx++ ) {
// this is not fast, but a two bits/pixel format is rarely used
@@ -132,7 +128,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
if (pPos >= rDesc.mpEndBuf)
{
SAL_WARN("filter.icgm", "buffer is too small");
- bOk = false;
+ rDesc.mbStatus = false;
break;
}
aBitmap.SetPixel(ny, nx, palette[static_cast<sal_uInt8>( (*pPos >> (((nx & 3)^3) << 1))) & 3]);
@@ -142,9 +138,8 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
break;
case 4 : {
- bool bOk = true;
auto palette = ImplGeneratePalette( rDesc );
- for (ny = 0; bOk && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
+ for (ny = 0; rDesc.mbStatus && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
nxC = nxCount;
sal_uInt8* pTemp = rDesc.mpBuf;
for ( nx = 0; --nxC; nx++ ) {
@@ -152,7 +147,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
if (pTemp >= rDesc.mpEndBuf)
{
SAL_WARN("filter.icgm", "buffer is too small");
- bOk = false;
+ rDesc.mbStatus = false;
break;
}
@@ -170,9 +165,8 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
break;
case 8 : {
- bool bOk = true;
auto palette = ImplGeneratePalette( rDesc );
- for (ny = 0; bOk && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
+ for (ny = 0; rDesc.mbStatus && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
sal_uInt8* pTemp = rDesc.mpBuf;
nxC = nxCount;
for ( nx = 0; --nxC; nx++ ) {
@@ -180,7 +174,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
if (pTemp >= rDesc.mpEndBuf)
{
SAL_WARN("filter.icgm", "buffer is too small");
- bOk = false;
+ rDesc.mbStatus = false;
break;
}
@@ -191,9 +185,8 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
break;
case 24 : {
- bool bOk = true;
Color aBitmapColor;
- for (ny = 0; bOk && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
+ for (ny = 0; rDesc.mbStatus && --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize) {
sal_uInt8* pTemp = rDesc.mpBuf;
nxC = nxCount;
for ( nx = 0; --nxC; nx++ ) {
@@ -201,7 +194,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
if (pTemp + 2 >= rDesc.mpEndBuf)
{
SAL_WARN("filter.icgm", "buffer is too small");
- bOk = false;
+ rDesc.mbStatus = false;
break;
}
@@ -222,32 +215,32 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
double nX = rDesc.mnR.X - rDesc.mnQ.X;
double nY = rDesc.mnR.Y - rDesc.mnQ.Y;
- rDesc.mndy = sqrt( nX * nX + nY * nY );
+ rDesc.mndy = std::hypot(nX, nY);
nX = rDesc.mnR.X - rDesc.mnP.X;
nY = rDesc.mnR.Y - rDesc.mnP.Y;
- rDesc.mndx = sqrt( nX * nX + nY * nY );
+ rDesc.mndx = std::hypot(nX, nY);
nX = rDesc.mnR.X - rDesc.mnP.X;
nY = rDesc.mnR.Y - rDesc.mnP.Y;
- double fSqrt = sqrt(nX * nX + nY * nY);
- rDesc.mnOrientation = fSqrt != 0.0 ? (acos(nX / fSqrt) * 57.29577951308) : 0.0;
+ double fSqrt = std::hypot(nX, nY);
+ rDesc.mnOrientation = fSqrt != 0.0 ? basegfx::rad2deg(acos(nX / fSqrt)) : 0.0;
if ( nY > 0 )
rDesc.mnOrientation = 360 - rDesc.mnOrientation;
nX = rDesc.mnQ.X - rDesc.mnR.X;
nY = rDesc.mnQ.Y - rDesc.mnR.Y;
- double fAngle = 0.01745329251994 * ( 360 - rDesc.mnOrientation );
+ double fAngle = basegfx::deg2rad( 360 - rDesc.mnOrientation );
double fSin = sin(fAngle);
double fCos = cos(fAngle);
nX = fCos * nX + fSin * nY;
nY = -( fSin * nX - fCos * nY );
- fSqrt = sqrt(nX * nX + nY * nY);
- fAngle = fSqrt != 0.0 ? (acos(nX / fSqrt) * 57.29577951308) : 0.0;
+ fSqrt = std::hypot(nX, nY);
+ fAngle = fSqrt != 0.0 ? basegfx::rad2deg(acos(nX / fSqrt)) : 0.0;
if ( nY > 0 )
fAngle = 360 - fAngle;
@@ -381,15 +374,26 @@ bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc )
void CGMBitmap::ImplInsert( CGMBitmapDescriptor const & rSource, CGMBitmapDescriptor& rDest )
{
- if (utl::ConfigManager::IsFuzzing() && rDest.mxBitmap.GetSizePixel().Height() + rSource.mnY > SAL_MAX_UINT16)
+ ++mpCGM->mnBitmapInserts;
+ static const bool bFuzzing = comphelper::IsFuzzing();
+ if (bFuzzing)
{
- SAL_WARN("filter.icgm", "bitmap would expand too much");
- rDest.mbStatus = false;
- return;
+ if (rDest.mxBitmap.GetSizePixel().Height() + rSource.mnY > SAL_MAX_UINT16)
+ {
+ SAL_WARN("filter.icgm", "bitmap would expand too much");
+ rDest.mbStatus = false;
+ return;
+ }
+ if (mpCGM->mnBitmapInserts > 1024)
+ {
+ SAL_WARN("filter.icgm", "too many inserts");
+ rDest.mbStatus = false;
+ return;
+ }
}
rDest.mxBitmap.Expand( 0, rSource.mnY );
rDest.mxBitmap.CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ),
- tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), &rSource.mxBitmap );
+ tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mxBitmap );
if ( ( rSource.mnR.Y == rDest.mnQ.Y ) && ( rSource.mnR.X == rDest.mnQ.X ) )
{ // Insert on Bottom
@@ -417,7 +421,7 @@ void CGMBitmap::ImplInsert( CGMBitmapDescriptor const & rSource, CGMBitmapDescri
std::unique_ptr<CGMBitmap> CGMBitmap::GetNext()
{
std::unique_ptr<CGMBitmap> xCGMTempBitmap;
- if (!!pCGMBitmapDescriptor->mxBitmap && pCGMBitmapDescriptor->mbStatus)
+ if (!pCGMBitmapDescriptor->mxBitmap.IsEmpty() && pCGMBitmapDescriptor->mbStatus)
{
xCGMTempBitmap.reset(new CGMBitmap(*mpCGM));
if ( ( static_cast<tools::Long>(xCGMTempBitmap->pCGMBitmapDescriptor->mnOrientation) == static_cast<tools::Long>(pCGMBitmapDescriptor->mnOrientation) ) &&
diff --git a/filter/source/graphicfilter/icgm/bitmap.hxx b/filter/source/graphicfilter/icgm/bitmap.hxx
index 2fb7de98b32f..564284b22135 100644
--- a/filter/source/graphicfilter/icgm/bitmap.hxx
+++ b/filter/source/graphicfilter/icgm/bitmap.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_BITMAP_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_BITMAP_HXX
+#pragma once
#include "cgm.hxx"
#include <vcl/bitmapex.hxx>
@@ -32,8 +31,8 @@ class CGMBitmapDescriptor
sal_uInt8* mpBuf;
sal_uInt8* mpEndBuf;
BitmapEx mxBitmap;
- bool mbStatus;
- bool mbVMirror;
+ bool mbStatus;
+ bool mbVMirror;
sal_uInt32 mnDstBitsPerPixel;
sal_uInt32 mnScanSize; // bytes per line
FloatPoint mnP, mnQ, mnR;
@@ -43,7 +42,7 @@ class CGMBitmapDescriptor
double mnOrientation;
sal_uInt32 mnX, mnY;
- tools::Long mnLocalColorPrecision;
+ tools::Long mnLocalColorPrecision;
sal_uInt32 mnCompressionMode;
CGMBitmapDescriptor()
@@ -78,6 +77,5 @@ public:
CGMBitmapDescriptor* GetBitmap() { return pCGMBitmapDescriptor.get();}
std::unique_ptr<CGMBitmap> GetNext();
};
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx
index 89ce93e31bcf..64e63a750186 100644
--- a/filter/source/graphicfilter/icgm/bundles.cxx
+++ b/filter/source/graphicfilter/icgm/bundles.cxx
@@ -20,7 +20,6 @@
#include "bundles.hxx"
-#include <memory>
#include <string.h>
void Bundle::SetColor( sal_uInt32 nColor )
diff --git a/filter/source/graphicfilter/icgm/bundles.hxx b/filter/source/graphicfilter/icgm/bundles.hxx
index a884937f8dae..209eae6dd396 100644
--- a/filter/source/graphicfilter/icgm/bundles.hxx
+++ b/filter/source/graphicfilter/icgm/bundles.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_BUNDLES_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_BUNDLES_HXX
+#pragma once
#include <sal/types.h>
#include "cgmtypes.hxx"
@@ -164,6 +163,4 @@ public:
void InsertCharSet( sal_uInt8 const * pSource, sal_uInt32 nSize );
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 02f1d0219f02..e8488328356d 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -17,9 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/task/XStatusIndicator.hpp>
#include <o3tl/safeint.hxx>
#include <osl/endian.h>
+#include <filter/importcgm.hxx>
#include <tools/stream.hxx>
#include "bitmap.hxx"
#include "chart.hxx"
@@ -27,7 +27,7 @@
#include "outact.hxx"
#include <memory>
#include <sal/log.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
@@ -53,6 +53,7 @@ CGM::CGM(uno::Reference< frame::XModel > const & rModel)
, mbFirstOutPut(false)
, mbInDefaultReplacement(false)
, mnAct4PostReset(0)
+ , mnBitmapInserts(0)
, mpOutAct(new CGMImpressOutAct(*this, rModel))
, mpSource(nullptr)
, mpEndValidSource(nullptr)
@@ -682,7 +683,7 @@ bool CGM::Write( SvStream& rIStm )
};
// GraphicImport - the exported function
-extern "C" SAL_DLLPUBLIC_EXPORT sal_uInt32
+FILTER_DLLPUBLIC sal_uInt32
ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, css::uno::Reference<css::task::XStatusIndicator> const & aXStatInd)
{
@@ -693,24 +694,24 @@ ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, css::u
{
try
{
- std::unique_ptr<CGM> pCGM(new CGM(rXModel));
- if (pCGM->IsValid())
+ CGM aCGM(rXModel);
+ if (aCGM.IsValid())
{
rIn.SetEndian(SvStreamEndian::BIG);
sal_uInt64 const nInSize = rIn.remainingSize();
rIn.Seek(0);
- sal_uInt32 nNext = 0;
+ sal_uInt64 nNext = 0;
sal_uInt32 nAdd = nInSize / 20;
bool bProgressBar = aXStatInd.is();
if ( bProgressBar )
aXStatInd->start( "CGM Import" , nInSize );
- while (pCGM->IsValid() && (rIn.Tell() < nInSize) && !pCGM->IsFinished())
+ while (aCGM.IsValid() && (rIn.Tell() < nInSize) && !aCGM.IsFinished())
{
if ( bProgressBar )
{
- sal_uInt32 nCurrentPos = rIn.Tell();
+ sal_uInt64 nCurrentPos = rIn.Tell();
if ( nCurrentPos >= nNext )
{
aXStatInd->setValue( nCurrentPos );
@@ -718,12 +719,12 @@ ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, css::u
}
}
- if (!pCGM->Write(rIn))
+ if (!aCGM.Write(rIn))
break;
}
- if ( pCGM->IsValid() )
+ if ( aCGM.IsValid() )
{
- nStatus = pCGM->GetBackGroundColor() | 0xff000000;
+ nStatus = aCGM.GetBackGroundColor() | 0xff000000;
}
if ( bProgressBar )
aXStatInd->end();
diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index 3f9c88dde649..e2281311e438 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -17,13 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CGM_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CGM_HXX
+#pragma once
#include <com/sun/star/frame/XModel.hpp>
-#include <vector>
+#include <cmath>
#include <memory>
+#include <vector>
#include "cgmtypes.hxx"
class Graphic;
@@ -61,6 +61,7 @@ class CGM
bool mbFirstOutPut;
bool mbInDefaultReplacement;
sal_uInt32 mnAct4PostReset;
+ int mnBitmapInserts;
std::unique_ptr<CGMBitmap> mpBitmapInUse;
std::unique_ptr<CGMChart> mpChart; // if sal_True->"SHWSLIDEREC"
// otherwise "BEGINPIC" commands
@@ -137,6 +138,15 @@ class CGM
bool Write( SvStream& rIStm );
};
-#endif
+
+inline bool useless(double value)
+{
+ if (!std::isfinite(value))
+ return true;
+ int exp;
+ std::frexp(value, &exp);
+ const int maxbits = sizeof(tools::Long) * 8;
+ return exp > maxbits;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/icgm/cgmtypes.hxx b/filter/source/graphicfilter/icgm/cgmtypes.hxx
index e78d2757a8d3..5b7def212842 100644
--- a/filter/source/graphicfilter/icgm/cgmtypes.hxx
+++ b/filter/source/graphicfilter/icgm/cgmtypes.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CGMTYPES_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CGMTYPES_HXX
+#pragma once
#include <tools/long.hxx>
@@ -125,6 +124,4 @@ enum FillInteriorStyle { FIS_HOLLOW = 0, FIS_SOLID = 1, FIS_PATTERN = 2, FIS_HA
FIS_INTERPOLATED = 6, FIS_GRADIENT = 7 };
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/icgm/chart.hxx b/filter/source/graphicfilter/icgm/chart.hxx
index 96b715b9a879..ef77ace0e22f 100644
--- a/filter/source/graphicfilter/icgm/chart.hxx
+++ b/filter/source/graphicfilter/icgm/chart.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CHART_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CHART_HXX
+#pragma once
#include <sal/types.h>
@@ -82,6 +81,4 @@ class CGMChart final
bool IsAnnotation() const;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/icgm/class0.cxx b/filter/source/graphicfilter/icgm/class0.cxx
index aa6152d241d0..a31bce5d2e89 100644
--- a/filter/source/graphicfilter/icgm/class0.cxx
+++ b/filter/source/graphicfilter/icgm/class0.cxx
@@ -49,13 +49,13 @@ void CGM::ImplDoClass0()
break;
case 0x03 : /*Begin Picture*/
{
- ImplDefaultReplacement();
- ImplSetMapMode();
- if ( mbPicture )
+ if (mbPicture || mbInDefaultReplacement)
mbStatus = false;
else
{
*pCopyOfE = *pElement;
+ ImplDefaultReplacement();
+ ImplSetMapMode();
mbPicture = mbFirstOutPut = true;
mbFigure = false;
mnAct4PostReset = 0;
diff --git a/filter/source/graphicfilter/icgm/class1.cxx b/filter/source/graphicfilter/icgm/class1.cxx
index 07a6fe253e4e..4304d142b5e5 100644
--- a/filter/source/graphicfilter/icgm/class1.cxx
+++ b/filter/source/graphicfilter/icgm/class1.cxx
@@ -151,9 +151,6 @@ void CGM::ImplDoClass1()
}
break;
case 0x0a : /*Color Value Extent*/
- {
- nI1 = 6;
- }
break;
case 0x0b : /*MetaFile Element List */break;
case 0x0c : /*MetaFile Default Replacement*/
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index 18eff3452451..af66ff26ae09 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -24,9 +24,9 @@
#include "elements.hxx"
#include "outact.hxx"
+#include <o3tl/float_int_conversion.hxx>
#include <o3tl/safeint.hxx>
-#include <math.h>
#include <memory>
using namespace ::com::sun::star;
@@ -36,8 +36,8 @@ double CGM::ImplGetOrientation( FloatPoint const & rCenter, FloatPoint const & r
double nX = rPoint.X - rCenter.X;
double nY = rPoint.Y - rCenter.Y;
- double fSqrt = sqrt(nX * nX + nY * nY);
- double fOrientation = fSqrt != 0.0 ? (acos(nX / fSqrt) * 57.29577951308) : 0.0;
+ double fSqrt = std::hypot(nX, nY);
+ double fOrientation = fSqrt != 0.0 ? basegfx::rad2deg(acos(nX / fSqrt)) : 0.0;
if (nY > 0)
fOrientation = 360 - fOrientation;
@@ -89,10 +89,10 @@ bool CGM::ImplGetEllipse( FloatPoint& rCenter, FloatPoint& rRadius, double& rAng
rAngle = ImplGetOrientation( rCenter, aPoint1 );
aPoint1.X -= rCenter.X;
aPoint1.Y -= rCenter.Y;
- rRadius.X = sqrt( aPoint1.X * aPoint1.X + aPoint1.Y * aPoint1.Y );
+ rRadius.X = std::hypot(aPoint1.X, aPoint1.Y);
aPoint2.X -= rCenter.X;
aPoint2.Y -= rCenter.Y;
- rRadius.Y = sqrt( aPoint2.X * aPoint2.X + aPoint2.Y * aPoint2.Y );
+ rRadius.Y = std::hypot(aPoint2.X, aPoint2.Y);
if ( fRot1 > fRot2 )
{
@@ -276,29 +276,21 @@ void CGM::ImplDoClass4()
if ( mbFigure )
mpOutAct->CloseRegion();
- sal_uInt16 nPoints = 0;
- std::unique_ptr<Point[]> pPoints(new Point[ 0x4000 ]);
-
+ std::vector<Point> aPoints;
tools::PolyPolygon aPolyPolygon;
FloatPoint aFloatPoint;
- sal_uInt32 nEdgeFlag;
+
while ( mnParaSize < mnElementSize )
{
ImplGetPoint( aFloatPoint, true );
- nEdgeFlag = ImplGetUI16();
- pPoints[ nPoints++ ] = Point( static_cast<tools::Long>(aFloatPoint.X), static_cast<tools::Long>(aFloatPoint.Y) );
+ sal_uInt32 nEdgeFlag = ImplGetUI16();
+ aPoints.push_back(Point(static_cast<tools::Long>(aFloatPoint.X), static_cast<tools::Long>(aFloatPoint.Y)));
if ( ( nEdgeFlag & 2 ) || ( mnParaSize == mnElementSize ) )
{
- tools::Polygon aPolygon( nPoints );
- for ( sal_uInt16 i = 0; i < nPoints; i++ )
- {
- aPolygon.SetPoint( pPoints[ i ], i );
- }
- aPolyPolygon.Insert( aPolygon );
- nPoints = 0;
+ aPolyPolygon.Insert(tools::Polygon(aPoints.size(), aPoints.data()));
+ aPoints.clear();
}
}
- pPoints.reset();
mpOutAct->DrawPolyPolygon( aPolyPolygon );
}
break;
@@ -377,11 +369,21 @@ void CGM::ImplDoClass4()
double fG = 2.0 * ( fA * ( aEndingPoint.Y - aIntermediatePoint.Y ) - fB * ( aEndingPoint.X - aIntermediatePoint.X ) );
- if ( fG != 0 )
+ bool bUseless = fG == 0;
+
+ FloatPoint aCenterPoint;
+ if (!bUseless)
{
- FloatPoint aCenterPoint;
aCenterPoint.X = ( fD * fE - fB * fF ) / fG;
aCenterPoint.Y = ( fA * fF - fC * fE ) / fG;
+ bUseless = useless(aCenterPoint.X) || useless(aCenterPoint.Y);
+ }
+
+ if (!bUseless)
+ bUseless = useless(aStartingPoint.X) || useless(aStartingPoint.Y);
+
+ if (!bUseless)
+ {
double fStartAngle = ImplGetOrientation( aCenterPoint, aStartingPoint );
double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint );
double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint );
@@ -408,17 +410,36 @@ void CGM::ImplDoClass4()
fStartAngle = fEndAngle;
fEndAngle = fG;
}
- double fRadius = sqrt( pow( ( aStartingPoint.X - aCenterPoint.X ), 2 ) + pow( ( aStartingPoint.Y - aCenterPoint.Y ), 2 ) ) ;
+ double fRadius = std::hypot(aStartingPoint.X - aCenterPoint.X, aStartingPoint.Y - aCenterPoint.Y);
if ( mbFigure )
{
- tools::Rectangle aBoundingBox(aCenterPoint.X - fRadius, aCenterPoint.Y - fRadius);
- aBoundingBox.SaturatingSetSize(Size(2 * fRadius, 2 * fRadius));
- tools::Polygon aPolygon( aBoundingBox, Point( static_cast<tools::Long>(aStartingPoint.X), static_cast<tools::Long>(aStartingPoint.Y) ) ,Point( static_cast<tools::Long>(aEndingPoint.X), static_cast<tools::Long>(aEndingPoint.Y) ), PolyStyle::Arc );
- if ( nSwitch )
- mpOutAct->RegPolyLine( aPolygon, true );
- else
- mpOutAct->RegPolyLine( aPolygon );
+ double fLeft = aCenterPoint.X - fRadius;
+ double fTop = aCenterPoint.Y - fRadius;
+ double fRight = fLeft + (2 * fRadius);
+ double fBottom = fTop + (2 * fRadius);
+ bUseless = useless(fLeft) || useless(fTop) || useless(2 * fRadius) || useless(fRight) || useless(fBottom);
+ if (!bUseless)
+ {
+ double fCenterCalc = fLeft + fRight;
+ bUseless = !o3tl::convertsToAtLeast(fCenterCalc, std::numeric_limits<tools::Long>::min()) ||
+ !o3tl::convertsToAtMost(fCenterCalc, std::numeric_limits<tools::Long>::max());
+ }
+ if (!bUseless)
+ {
+ double fCenterCalc = fTop + fBottom;
+ bUseless = !o3tl::convertsToAtLeast(fCenterCalc, std::numeric_limits<tools::Long>::min()) ||
+ !o3tl::convertsToAtMost(fCenterCalc, std::numeric_limits<tools::Long>::max());
+ }
+ if (!bUseless)
+ {
+ tools::Rectangle aBoundingBox(Point(fLeft, fTop), Size(2 * fRadius, 2 * fRadius));
+ tools::Polygon aPolygon( aBoundingBox, Point( static_cast<tools::Long>(aStartingPoint.X), static_cast<tools::Long>(aStartingPoint.Y) ) ,Point( static_cast<tools::Long>(aEndingPoint.X), static_cast<tools::Long>(aEndingPoint.Y) ), PolyStyle::Arc );
+ if ( nSwitch )
+ mpOutAct->RegPolyLine( aPolygon, true );
+ else
+ mpOutAct->RegPolyLine( aPolygon );
+ }
}
else
{
@@ -479,7 +500,7 @@ void CGM::ImplDoClass4()
fEndAngle = fG;
}
FloatPoint fRadius;
- fRadius.Y = fRadius.X = sqrt( pow( ( aStartingPoint.X - aCenterPoint.X ), 2 ) + pow( ( aStartingPoint.Y - aCenterPoint.Y ), 2 ) ) ;
+ fRadius.Y = fRadius.X = std::hypot(aStartingPoint.X - aCenterPoint.X, aStartingPoint.Y - aCenterPoint.Y);
sal_uInt32 nType = ImplGetUI16();
if ( nType == 0 )
@@ -516,35 +537,58 @@ void CGM::ImplDoClass4()
ImplMapDouble( aRadius.X );
aRadius.Y = aRadius.X;
- const double fStartSqrt = sqrt(vector[0] * vector[ 0 ] + vector[1] * vector[1]);
- fStartAngle = fStartSqrt != 0.0 ? (acos(vector[0] / fStartSqrt) * 57.29577951308) : 0.0;
- const double fEndSqrt = sqrt(vector[2] * vector[ 2 ] + vector[3] * vector[3]);
- fEndAngle = fEndSqrt != 0.0 ? (acos(vector[ 2 ] / fEndSqrt) * 57.29577951308) : 0.0;
+ bool bUseless = useless(vector[0]) || useless(vector[1]) || useless(vector[2]) || useless(vector[3]);
+ if (!bUseless)
+ {
+ const double fStartSqrt = std::hypot(vector[0], vector[1]);
+ fStartAngle = fStartSqrt != 0.0 ? basegfx::rad2deg(acos(vector[0] / fStartSqrt)) : 0.0;
+ const double fEndSqrt = std::hypot(vector[2], vector[3]);
+ fEndAngle = fEndSqrt != 0.0 ? basegfx::rad2deg(acos(vector[ 2 ] / fEndSqrt)) : 0.0;
- if ( vector[ 1 ] > 0 )
- fStartAngle = 360 - fStartAngle;
- if ( vector[ 3 ] > 0 )
- fEndAngle = 360 - fEndAngle;
+ if ( vector[ 1 ] > 0 )
+ fStartAngle = 360 - fStartAngle;
+ if ( vector[ 3 ] > 0 )
+ fEndAngle = 360 - fEndAngle;
- if ( mbAngReverse )
- ImplSwitchStartEndAngle( fStartAngle, fEndAngle );
+ if ( mbAngReverse )
+ ImplSwitchStartEndAngle( fStartAngle, fEndAngle );
- if ( mbFigure )
- {
- tools::Rectangle aBoundingBox(aCenter.X - aRadius.X, aCenter.Y - aRadius.X);
- aBoundingBox.SaturatingSetSize(Size(2 * aRadius.X, 2 * aRadius.X));
- tools::Polygon aPolygon( aBoundingBox,
- Point( static_cast<tools::Long>(vector[ 0 ]), static_cast<tools::Long>(vector[ 1 ]) ),
- Point( static_cast<tools::Long>(vector[ 2 ]), static_cast<tools::Long>(vector[ 3 ]) ), PolyStyle::Arc );
- mpOutAct->RegPolyLine( aPolygon );
- }
- else
- {
- double fOrientation = 0;
- mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, 2, fStartAngle, fEndAngle );
+ if ( mbFigure )
+ {
+ double fLeft = aCenter.X - aRadius.X;
+ double fTop = aCenter.Y - aRadius.X;
+ double fRight = fLeft + (2 * aRadius.X);
+ double fBottom = fTop + (2 * aRadius.X);
+ bUseless = useless(fLeft) || useless(fTop) || useless(2 * aRadius.X) || useless(fRight) || useless(fBottom);
+ if (!bUseless)
+ {
+ double fCenterCalc = fLeft + fRight;
+ bUseless = !o3tl::convertsToAtLeast(fCenterCalc, std::numeric_limits<tools::Long>::min()) ||
+ !o3tl::convertsToAtMost(fCenterCalc, std::numeric_limits<tools::Long>::max());
+ }
+ if (!bUseless)
+ {
+ double fCenterCalc = fTop + fBottom;
+ bUseless = !o3tl::convertsToAtLeast(fCenterCalc, std::numeric_limits<tools::Long>::min()) ||
+ !o3tl::convertsToAtMost(fCenterCalc, std::numeric_limits<tools::Long>::max());
+ }
+ if (!bUseless)
+ {
+ tools::Rectangle aBoundingBox(Point(fLeft, fTop), Size(2 * aRadius.X, 2 * aRadius.X));
+ tools::Polygon aPolygon( aBoundingBox,
+ Point( static_cast<tools::Long>(vector[ 0 ]), static_cast<tools::Long>(vector[ 1 ]) ),
+ Point( static_cast<tools::Long>(vector[ 2 ]), static_cast<tools::Long>(vector[ 3 ]) ), PolyStyle::Arc );
+ mpOutAct->RegPolyLine( aPolygon );
+ }
+ }
+ else
+ {
+ double fOrientation = 0;
+ mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, 2, fStartAngle, fEndAngle );
+ }
}
- mnParaSize = mnElementSize;
+ mnParaSize = mnElementSize;
}
break;
@@ -568,29 +612,35 @@ void CGM::ImplDoClass4()
}
ImplMapDouble( aRadius.X );
aRadius.Y = aRadius.X;
- const double fStartSqrt = sqrt(vector[0] * vector[0] + vector[1] * vector[1]);
- double fStartAngle = fStartSqrt ? (acos(vector[0] / fStartSqrt) * 57.29577951308) : 0.0;
- const double fEndSqrt = sqrt(vector[2] * vector[2] + vector[3] * vector[3]);
- double fEndAngle = fEndSqrt ? acos(vector[2] / fEndSqrt) * 57.29577951308 : 0.0;
- if ( vector[ 1 ] > 0 )
- fStartAngle = 360 - fStartAngle;
- if ( vector[ 3 ] > 0 )
- fEndAngle = 360 - fEndAngle;
+ sal_uInt32 nType = ImplGetUI16();
+
+ bool bUseless = useless(vector[0]) || useless(vector[1]) || useless(vector[2]) || useless(vector[3]);
+ if (!bUseless)
+ {
+ const double fStartSqrt = std::hypot(vector[0], vector[1]);
+ double fStartAngle = fStartSqrt ? basegfx::rad2deg(acos(vector[0] / fStartSqrt)) : 0.0;
+ const double fEndSqrt = std::hypot(vector[2], vector[3]);
+ double fEndAngle = fEndSqrt ? basegfx::rad2deg(acos(vector[2] / fEndSqrt)) : 0.0;
- if ( mbAngReverse )
- ImplSwitchStartEndAngle( fStartAngle, fEndAngle );
+ if ( vector[ 1 ] > 0 )
+ fStartAngle = 360 - fStartAngle;
+ if ( vector[ 3 ] > 0 )
+ fEndAngle = 360 - fEndAngle;
+ if ( mbAngReverse )
+ ImplSwitchStartEndAngle( fStartAngle, fEndAngle );
- sal_uInt32 nType = ImplGetUI16();
- if ( nType == 0 )
- nType = 0; // is PIE
- else
- nType = 1; // is CHORD
- fOrientation = 0;
+ if ( nType == 0 )
+ nType = 0; // is PIE
+ else
+ nType = 1; // is CHORD
+ fOrientation = 0;
+
+ mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
+ nType, fStartAngle, fEndAngle );
+ }
- mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
- nType, fStartAngle, fEndAngle );
mnParaSize = mnElementSize;
}
break;
@@ -622,22 +672,26 @@ void CGM::ImplDoClass4()
bool bDirection = ImplGetEllipse( aCenter, aRadius, fOrientation );
ImplGetVector( &vector[ 0 ] );
- double fStartSqrt = sqrt(vector[0] * vector[0] + vector[1] * vector[1]);
- fStartAngle = fStartSqrt ? (acos(vector[0] / fStartSqrt) * 57.29577951308) : 0.0;
- double fEndSqrt = sqrt(vector[2] * vector[2] + vector[3] * vector[3]);
- fEndAngle = fEndSqrt ? (acos(vector[2] / fEndSqrt) * 57.29577951308) : 0.0;
-
- if ( vector[ 1 ] > 0 )
- fStartAngle = 360 - fStartAngle;
- if ( vector[ 3 ] > 0 )
- fEndAngle = 360 - fEndAngle;
-
- if ( bDirection )
- mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
- 2, fStartAngle, fEndAngle );
- else
- mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
- 2, fEndAngle, fStartAngle);
+ bool bUseless = useless(vector[0]) || useless(vector[1]) || useless(vector[2]) || useless(vector[3]);
+ if (!bUseless)
+ {
+ double fStartSqrt = std::hypot(vector[0], vector[1]);
+ fStartAngle = fStartSqrt ? basegfx::rad2deg(acos(vector[0] / fStartSqrt)) : 0.0;
+ double fEndSqrt = std::hypot(vector[2], vector[3]);
+ fEndAngle = fEndSqrt ? basegfx::rad2deg(acos(vector[2] / fEndSqrt)) : 0.0;
+
+ if ( vector[ 1 ] > 0 )
+ fStartAngle = 360 - fStartAngle;
+ if ( vector[ 3 ] > 0 )
+ fEndAngle = 360 - fEndAngle;
+
+ if ( bDirection )
+ mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
+ 2, fStartAngle, fEndAngle );
+ else
+ mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
+ 2, fEndAngle, fStartAngle);
+ }
}
break;
@@ -652,28 +706,33 @@ void CGM::ImplDoClass4()
bool bDirection = ImplGetEllipse( aCenter, aRadius, fOrientation );
ImplGetVector( &vector[ 0 ] );
- double fStartSqrt = sqrt(vector[0] * vector[0] + vector[1] * vector[1]);
- fStartAngle = fStartSqrt ? (acos(vector[0] / fStartSqrt) * 57.29577951308) : 0.0;
- double fEndSqrt = sqrt(vector[2] * vector[2] + vector[3] * vector[3]);
- fEndAngle = fEndSqrt ? (acos(vector[2] / fEndSqrt) * 57.29577951308) : 0.0;
+ sal_uInt32 nType = ImplGetUI16();
- if ( vector[ 1 ] > 0 )
- fStartAngle = 360 - fStartAngle;
- if ( vector[ 3 ] > 0 )
- fEndAngle = 360 - fEndAngle;
+ bool bUseless = useless(vector[0]) || useless(vector[1]) || useless(vector[2]) || useless(vector[3]);
+ if (!bUseless)
+ {
+ double fStartSqrt = std::hypot(vector[0], vector[1]);
+ fStartAngle = fStartSqrt ? basegfx::rad2deg(acos(vector[0] / fStartSqrt)) : 0.0;
+ double fEndSqrt = std::hypot(vector[2], vector[3]);
+ fEndAngle = fEndSqrt ? basegfx::rad2deg(acos(vector[2] / fEndSqrt)) : 0.0;
- sal_uInt32 nType = ImplGetUI16();
- if ( nType == 0 )
- nType = 0; // is PIE
- else
- nType = 1; // is CHORD
+ if ( vector[ 1 ] > 0 )
+ fStartAngle = 360 - fStartAngle;
+ if ( vector[ 3 ] > 0 )
+ fEndAngle = 360 - fEndAngle;
- if ( bDirection )
- mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
- nType, fStartAngle, fEndAngle );
- else
- mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
- nType, fEndAngle, fStartAngle);
+ if ( nType == 0 )
+ nType = 0; // is PIE
+ else
+ nType = 1; // is CHORD
+
+ if ( bDirection )
+ mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
+ nType, fStartAngle, fEndAngle );
+ else
+ mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation,
+ nType, fEndAngle, fStartAngle);
+ }
}
break;
case 0x14 : /*Circular Arc Centre Reversed*/
diff --git a/filter/source/graphicfilter/icgm/class7.cxx b/filter/source/graphicfilter/icgm/class7.cxx
index 1b51ce98e71c..63bce3296343 100644
--- a/filter/source/graphicfilter/icgm/class7.cxx
+++ b/filter/source/graphicfilter/icgm/class7.cxx
@@ -89,7 +89,7 @@ void CGM::ImplDoClass7()
break;
case 0x2BE : /*AppData - SHWSLIDEREC*/
{
- if (mpEndValidSource - pAppData < 16)
+ if (mpEndValidSource - pAppData < 17)
throw css::uno::Exception("attempt to read past end of input", nullptr);
if ( pAppData[ 16 ] == 0 ) // a blank template ?
diff --git a/filter/source/graphicfilter/icgm/elements.hxx b/filter/source/graphicfilter/icgm/elements.hxx
index 8a7812cb699c..3f4bd710a4f2 100644
--- a/filter/source/graphicfilter/icgm/elements.hxx
+++ b/filter/source/graphicfilter/icgm/elements.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_ELEMENTS_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_ELEMENTS_HXX
+#pragma once
#include "bundles.hxx"
#include "cgmtypes.hxx"
@@ -134,6 +133,4 @@ class CGMElements
static void CopyAllBundles( const BundleList& Source, BundleList& Dest );
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx
index 2364c787fea1..b06fffda8cc0 100644
--- a/filter/source/graphicfilter/icgm/outact.hxx
+++ b/filter/source/graphicfilter/icgm/outact.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_OUTACT_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_OUTACT_HXX
+#pragma once
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/document/XActionLockable.hpp>
@@ -106,6 +105,4 @@ public:
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
deleted file mode 100644
index 06aebc3da16b..000000000000
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ /dev/null
@@ -1,904 +0,0 @@
-/* -*- 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 <unotools/configmgr.hxx>
-#include <vcl/gdimtf.hxx>
-#include <vcl/metaact.hxx>
-#include <vcl/virdev.hxx>
-#include <tools/poly.hxx>
-#include "dxf2mtf.hxx"
-
-#include <math.h>
-
-
-sal_uInt64 DXF2GDIMetaFile::CountEntities(const DXFEntities & rEntities)
-{
- const DXFBasicEntity * pBE;
- sal_uInt64 nRes;
-
- nRes=0;
- for (pBE=rEntities.pFirst; pBE!=nullptr; pBE=pBE->pSucc) nRes++;
- return nRes;
-}
-
-Color DXF2GDIMetaFile::ConvertColor(sal_uInt8 nColor)
-{
- return Color(
- pDXF->aPalette.GetRed( nColor ),
- pDXF->aPalette.GetGreen( nColor ),
- pDXF->aPalette.GetBlue( nColor ) );
-}
-
-tools::Long DXF2GDIMetaFile::GetEntityColor(const DXFBasicEntity & rE)
-{
- tools::Long nColor;
-
- nColor=rE.nColor;
- if (nColor==256) {
- if (rE.m_sLayer.getLength() < 2) {
- nColor=nParentLayerColor;
- } else {
- const DXFLayer * pLayer=pDXF->aTables.SearchLayer(rE.m_sLayer);
- if (pLayer!=nullptr) nColor=pLayer->nColor;
- else nColor=nParentLayerColor;
- }
- }
- else if (nColor==0) nColor=nBlockColor;
- return nColor;
-}
-
-DXFLineInfo DXF2GDIMetaFile::LTypeToDXFLineInfo(std::string_view rLineType)
-{
- const DXFLType * pLT;
- DXFLineInfo aDXFLineInfo;
-
- pLT = pDXF->aTables.SearchLType(rLineType);
- if (pLT==nullptr || pLT->nDashCount == 0) {
- aDXFLineInfo.eStyle = LineStyle::Solid;
- }
- else {
- aDXFLineInfo.eStyle = LineStyle::Dash;
- for (tools::Long i=0; i < (pLT->nDashCount); i++) {
- const double x = pLT->fDash[i] * pDXF->getGlobalLineTypeScale();
- if ( x >= 0.0 ) {
- if ( aDXFLineInfo.nDotCount == 0 ) {
- aDXFLineInfo.nDotCount ++;
- aDXFLineInfo.fDotLen = x;
- }
- else if ( aDXFLineInfo.fDotLen == x ) {
- aDXFLineInfo.nDotCount ++;
- }
- else if ( aDXFLineInfo.nDashCount == 0 ) {
- aDXFLineInfo.nDashCount ++;
- aDXFLineInfo.fDashLen = x;
- }
- else if ( aDXFLineInfo.fDashLen == x ) {
- aDXFLineInfo.nDashCount ++;
- }
- else {
- // It is impossible to be converted.
- }
- }
- else {
- if ( aDXFLineInfo.fDistance == 0 ) {
- aDXFLineInfo.fDistance = -1 * x;
- }
- else {
- // It is impossible to be converted.
- }
- }
-
- }
- }
-
- return aDXFLineInfo;
-}
-
-DXFLineInfo DXF2GDIMetaFile::GetEntityDXFLineInfo(const DXFBasicEntity & rE)
-{
- DXFLineInfo aDXFLineInfo;
-
- aDXFLineInfo.eStyle = LineStyle::Solid;
- aDXFLineInfo.nDashCount = 0;
- aDXFLineInfo.fDashLen = 0;
- aDXFLineInfo.nDotCount = 0;
- aDXFLineInfo.fDotLen = 0;
- aDXFLineInfo.fDistance = 0;
-
- if (rE.m_sLineType == "BYLAYER") {
- if (rE.m_sLayer.getLength() < 2) {
- aDXFLineInfo=aParentLayerDXFLineInfo;
- } else {
- const DXFLayer * pLayer=pDXF->aTables.SearchLayer(rE.m_sLayer);
- if (pLayer!=nullptr) {
- aDXFLineInfo = LTypeToDXFLineInfo(pLayer->m_sLineType);
- }
- else aDXFLineInfo=aParentLayerDXFLineInfo;
- }
- }
- else if (rE.m_sLineType == "BYBLOCK") {
- aDXFLineInfo=aBlockDXFLineInfo;
- }
- else {
- aDXFLineInfo = LTypeToDXFLineInfo(rE.m_sLineType);
- }
- return aDXFLineInfo;
-}
-
-
-bool DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE)
-{
- tools::Long nColor;
- Color aColor;
-
- nColor=GetEntityColor(rE);
- if (nColor<0) return false;
- aColor=ConvertColor(static_cast<sal_uInt8>(nColor));
-
- if (aActLineColor!=aColor) {
- aActLineColor = aColor;
- pVirDev->SetLineColor( aActLineColor );
- }
-
- if (aActFillColor!=COL_TRANSPARENT) {
- aActFillColor = COL_TRANSPARENT;
- pVirDev->SetFillColor(aActFillColor);
- }
- return true;
-}
-
-
-bool DXF2GDIMetaFile::SetAreaAttribute(const DXFBasicEntity & rE)
-{
- tools::Long nColor;
- Color aColor;
-
- nColor=GetEntityColor(rE);
- if (nColor<0) return false;
- aColor=ConvertColor(static_cast<sal_uInt8>(nColor));
-
- if (aActLineColor!=aColor) {
- aActLineColor = aColor;
- pVirDev->SetLineColor( aActLineColor );
- }
-
- if ( aActFillColor == COL_TRANSPARENT || aActFillColor != aColor) {
- aActFillColor = aColor;
- pVirDev->SetFillColor( aActFillColor );
- }
- return true;
-}
-
-
-bool DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle, sal_uInt16 nHeight)
-{
- tools::Long nColor;
- Color aColor;
- vcl::Font aFont;
-
- nAngle=-nAngle;
- while (nAngle>=3600) nAngle-=3600;
- while (nAngle<0) nAngle+=3600;
-
- nColor=GetEntityColor(rE);
- if (nColor<0) return false;
- aColor=ConvertColor(static_cast<sal_uInt8>(nColor));
-
- aFont.SetColor(aColor);
- aFont.SetTransparent(true);
- aFont.SetFamily(FAMILY_SWISS);
- aFont.SetFontSize(Size(0,nHeight));
- aFont.SetAlignment(ALIGN_BASELINE);
- aFont.SetOrientation(Degree10(nAngle));
- if (aActFont!=aFont) {
- aActFont=aFont;
- pVirDev->SetFont(aActFont);
- }
-
- return true;
-}
-
-
-void DXF2GDIMetaFile::DrawLineEntity(const DXFLineEntity & rE, const DXFTransform & rTransform)
-{
- if (!SetLineAttribute(rE))
- return;
-
- Point aP0,aP1;
- rTransform.Transform(rE.aP0,aP0);
- rTransform.Transform(rE.aP1,aP1);
-
- DXFLineInfo aDXFLineInfo=GetEntityDXFLineInfo(rE);
- LineInfo aLineInfo;
- aLineInfo = rTransform.Transform(aDXFLineInfo);
-
- pVirDev->DrawLine(aP0,aP1,aLineInfo);
- if (rE.fThickness!=0) {
- Point aP2,aP3;
- rTransform.Transform(rE.aP0+DXFVector(0,0,rE.fThickness),aP2);
- rTransform.Transform(rE.aP1+DXFVector(0,0,rE.fThickness),aP3);
- DrawLine(aP2,aP3);
- DrawLine(aP0,aP2);
- DrawLine(aP1,aP3);
- }
-}
-
-
-void DXF2GDIMetaFile::DrawPointEntity(const DXFPointEntity & rE, const DXFTransform & rTransform)
-{
-
- if (SetLineAttribute(rE)) {
- Point aP0;
- rTransform.Transform(rE.aP0,aP0);
- if (rE.fThickness==0) pVirDev->DrawPixel(aP0);
- else {
- Point aP1;
- rTransform.Transform(rE.aP0+DXFVector(0,0,rE.fThickness),aP1);
- DrawLine(aP0,aP1);
- }
- }
-}
-
-
-void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTransform & rTransform)
-{
- double frx,fry;
- sal_uInt16 nPoints,i;
- DXFVector aC;
-
- if (!SetLineAttribute(rE)) return;
- rTransform.Transform(rE.aP0,aC);
- if (rE.fThickness==0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)) {
- pVirDev->DrawEllipse(
- tools::Rectangle(static_cast<tools::Long>(aC.fx-frx+0.5),static_cast<tools::Long>(aC.fy-fry+0.5),
- static_cast<tools::Long>(aC.fx+frx+0.5),static_cast<tools::Long>(aC.fy+fry+0.5)));
- }
- else {
- double fAng;
- nPoints=OptPointsPerCircle;
- tools::Polygon aPoly(nPoints);
- for (i=0; i<nPoints; i++) {
- fAng=2*3.14159265359/static_cast<double>(nPoints-1)*static_cast<double>(i);
- rTransform.Transform(
- rE.aP0+DXFVector(rE.fRadius*cos(fAng),rE.fRadius*sin(fAng),0),
- aPoly[i]
- );
- }
- pVirDev->DrawPolyLine(aPoly);
- if (rE.fThickness!=0) {
- tools::Polygon aPoly2(nPoints);
- for (i=0; i<nPoints; i++) {
- fAng=2*3.14159265359/static_cast<double>(nPoints-1)*static_cast<double>(i);
- rTransform.Transform(
- rE.aP0+DXFVector(rE.fRadius*cos(fAng),rE.fRadius*sin(fAng),rE.fThickness),
- aPoly2[i]
- );
-
- }
- pVirDev->DrawPolyLine(aPoly2);
- for (i=0; i<nPoints-1; i++) DrawLine(aPoly[i],aPoly2[i]);
- }
- }
-}
-
-void DXF2GDIMetaFile::DrawLine(const Point& rA, const Point& rB)
-{
- if (utl::ConfigManager::IsFuzzing())
- return;
- GDIMetaFile* pMetaFile = pVirDev->GetConnectMetaFile();
- assert(pMetaFile);
- //use AddAction instead of OutputDevice::DrawLine so that we can explicitly share
- //the aDefaultLineInfo between the MetaLineActions to reduce memory use
- pMetaFile->AddAction(new MetaLineAction(rA, rB, aDefaultLineInfo));
-}
-
-void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & rE, const DXFTransform & rTransform)
-{
- double frx,fry;
- sal_uInt16 nPoints,i;
- DXFVector aC;
-
- if (!SetLineAttribute(rE)) return;
- double fA1=rE.fStart;
- double fdA=rE.fEnd-fA1;
- fdA = fmod(fdA, 360.0);
- if (fdA<=0) fdA+=360.0;
- rTransform.Transform(rE.aP0,aC);
- if (rE.fThickness==0 && fdA>5.0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)) {
- DXFVector aVS(cos(fA1/180.0*3.14159265359),sin(fA1/180.0*3.14159265359),0.0);
- aVS*=rE.fRadius;
- aVS+=rE.aP0;
- DXFVector aVE(cos((fA1+fdA)/180.0*3.14159265359),sin((fA1+fdA)/180.0*3.14159265359),0.0);
- aVE*=rE.fRadius;
- aVE+=rE.aP0;
- Point aPS,aPE;
- if (rTransform.Mirror()) {
- rTransform.Transform(aVS,aPS);
- rTransform.Transform(aVE,aPE);
- }
- else {
- rTransform.Transform(aVS,aPE);
- rTransform.Transform(aVE,aPS);
- }
- pVirDev->DrawArc(
- tools::Rectangle(static_cast<tools::Long>(aC.fx-frx+0.5),static_cast<tools::Long>(aC.fy-fry+0.5),
- static_cast<tools::Long>(aC.fx+frx+0.5),static_cast<tools::Long>(aC.fy+fry+0.5)),
- aPS,aPE
- );
- }
- else {
- double fAng;
- nPoints=static_cast<sal_uInt16>(fdA/360.0*static_cast<double>(OptPointsPerCircle)+0.5);
- if (nPoints<2) nPoints=2;
- tools::Polygon aPoly(nPoints);
- for (i=0; i<nPoints; i++) {
- fAng=3.14159265359/180.0 * ( fA1 + fdA/static_cast<double>(nPoints-1)*static_cast<double>(i) );
- rTransform.Transform(
- rE.aP0+DXFVector(rE.fRadius*cos(fAng),rE.fRadius*sin(fAng),0),
- aPoly[i]
- );
- }
- pVirDev->DrawPolyLine(aPoly);
- if (rE.fThickness!=0) {
- tools::Polygon aPoly2(nPoints);
- for (i=0; i<nPoints; i++) {
- fAng=3.14159265359/180.0 * ( fA1 + fdA/static_cast<double>(nPoints-1)*static_cast<double>(i) );
- rTransform.Transform(
- rE.aP0+DXFVector(rE.fRadius*cos(fAng),rE.fRadius*sin(fAng),rE.fThickness),
- aPoly2[i]
- );
- }
- pVirDev->DrawPolyLine(aPoly2);
- for (i=0; i<nPoints; i++)
- DrawLine(aPoly[i], aPoly2[i]);
- }
- }
-}
-
-void DXF2GDIMetaFile::DrawTraceEntity(const DXFTraceEntity & rE, const DXFTransform & rTransform)
-{
- if (!SetLineAttribute(rE))
- return;
-
- tools::Polygon aPoly(4);
- rTransform.Transform(rE.aP0,aPoly[0]);
- rTransform.Transform(rE.aP1,aPoly[1]);
- rTransform.Transform(rE.aP3,aPoly[2]);
- rTransform.Transform(rE.aP2,aPoly[3]);
- pVirDev->DrawPolygon(aPoly);
- if (rE.fThickness!=0) {
- sal_uInt16 i;
- tools::Polygon aPoly2(4);
- DXFVector aVAdd(0,0,rE.fThickness);
- rTransform.Transform(rE.aP0+aVAdd,aPoly2[0]);
- rTransform.Transform(rE.aP1+aVAdd,aPoly2[1]);
- rTransform.Transform(rE.aP3+aVAdd,aPoly2[2]);
- rTransform.Transform(rE.aP2+aVAdd,aPoly2[3]);
- pVirDev->DrawPolygon(aPoly2);
- for (i=0; i<4; i++) DrawLine(aPoly[i],aPoly2[i]);
- }
-}
-
-
-void DXF2GDIMetaFile::DrawSolidEntity(const DXFSolidEntity & rE, const DXFTransform & rTransform)
-{
- if (!SetAreaAttribute(rE))
- return;
-
- sal_uInt16 nN;
- if (rE.aP2==rE.aP3) nN=3; else nN=4;
- tools::Polygon aPoly(nN);
- rTransform.Transform(rE.aP0,aPoly[0]);
- rTransform.Transform(rE.aP1,aPoly[1]);
- rTransform.Transform(rE.aP3,aPoly[2]);
- if (nN>3) rTransform.Transform(rE.aP2,aPoly[3]);
- pVirDev->DrawPolygon(aPoly);
- if (rE.fThickness==0) return;
-
- tools::Polygon aPoly2(nN);
- DXFVector aVAdd(0,0,rE.fThickness);
- rTransform.Transform(rE.aP0+aVAdd,aPoly2[0]);
- rTransform.Transform(rE.aP1+aVAdd,aPoly2[1]);
- rTransform.Transform(rE.aP3+aVAdd,aPoly2[2]);
- if (nN>3) rTransform.Transform(rE.aP2+aVAdd,aPoly2[3]);
- pVirDev->DrawPolygon(aPoly2);
- if (SetLineAttribute(rE)) {
- sal_uInt16 i;
- for (i=0; i<nN; i++) DrawLine(aPoly[i],aPoly2[i]);
- }
-}
-
-
-void DXF2GDIMetaFile::DrawTextEntity(const DXFTextEntity & rE, const DXFTransform & rTransform)
-{
- DXFVector aV;
- double fA;
- sal_uInt16 nHeight;
- short nAng;
- DXFTransform aT( DXFTransform(rE.fXScale,rE.fHeight,1.0,rE.fRotAngle,rE.aP0), rTransform );
- aT.TransDir(DXFVector(0,1,0),aV);
- nHeight=static_cast<sal_uInt16>(aV.Abs()+0.5);
- fA=aT.CalcRotAngle();
- nAng=static_cast<short>(fA*10.0+0.5);
- aT.TransDir(DXFVector(1,0,0),aV);
- if ( SetFontAttribute( rE,nAng, nHeight ) )
- {
- OUString const aUString(pDXF->ToOUString(rE.m_sText));
- Point aPt;
- aT.Transform( DXFVector( 0, 0, 0 ), aPt );
- pVirDev->DrawText( aPt, aUString );
- }
-}
-
-
-void DXF2GDIMetaFile::DrawInsertEntity(const DXFInsertEntity & rE, const DXFTransform & rTransform)
-{
- const DXFBlock * pB;
- pB=pDXF->aBlocks.Search(rE.m_sName);
- if (pB==nullptr)
- return;
-
- DXFTransform aDXFTransform1(1.0,1.0,1.0,DXFVector(0.0,0.0,0.0)-pB->aBasePoint);
- DXFTransform aDXFTransform2(rE.fXScale,rE.fYScale,rE.fZScale,rE.fRotAngle,rE.aP0);
- DXFTransform aT(
- DXFTransform( aDXFTransform1, aDXFTransform2 ),
- rTransform
- );
- tools::Long nSavedBlockColor, nSavedParentLayerColor;
- DXFLineInfo aSavedBlockDXFLineInfo, aSavedParentLayerDXFLineInfo;
- nSavedBlockColor=nBlockColor;
- nSavedParentLayerColor=nParentLayerColor;
- aSavedBlockDXFLineInfo=aBlockDXFLineInfo;
- aSavedParentLayerDXFLineInfo=aParentLayerDXFLineInfo;
- nBlockColor=GetEntityColor(rE);
- aBlockDXFLineInfo=GetEntityDXFLineInfo(rE);
- if (rE.m_sLayer.getLength() > 1) {
- DXFLayer * pLayer=pDXF->aTables.SearchLayer(rE.m_sLayer);
- if (pLayer!=nullptr) {
- nParentLayerColor=pLayer->nColor;
- aParentLayerDXFLineInfo = LTypeToDXFLineInfo(pLayer->m_sLineType);
- }
- }
- DrawEntities(*pB,aT);
- aBlockDXFLineInfo=aSavedBlockDXFLineInfo;
- aParentLayerDXFLineInfo=aSavedParentLayerDXFLineInfo;
- nBlockColor=nSavedBlockColor;
- nParentLayerColor=nSavedParentLayerColor;
-}
-
-
-void DXF2GDIMetaFile::DrawAttribEntity(const DXFAttribEntity & rE, const DXFTransform & rTransform)
-{
- if ((rE.nAttrFlags&1)!=0)
- return;
-
- DXFVector aV;
- double fA;
- sal_uInt16 nHeight;
- short nAng;
- DXFTransform aT( DXFTransform( rE.fXScale, rE.fHeight, 1.0, rE.fRotAngle, rE.aP0 ), rTransform );
- aT.TransDir(DXFVector(0,1,0),aV);
- nHeight=static_cast<sal_uInt16>(aV.Abs()+0.5);
- fA=aT.CalcRotAngle();
- nAng=static_cast<short>(fA*10.0+0.5);
- aT.TransDir(DXFVector(1,0,0),aV);
- if (SetFontAttribute(rE,nAng,nHeight))
- {
- OUString const aUString(pDXF->ToOUString(rE.m_sText));
- Point aPt;
- aT.Transform( DXFVector( 0, 0, 0 ), aPt );
- pVirDev->DrawText( aPt, aUString );
- }
-}
-
-
-void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXFTransform & rTransform)
-{
- sal_uInt16 i,nPolySize;
- const DXFBasicEntity * pBE;
-
- nPolySize=0;
- pBE=rE.pSucc;
- while (pBE!=nullptr && pBE->eType==DXF_VERTEX) {
- nPolySize++;
- pBE=pBE->pSucc;
- }
- if (nPolySize<2)
- return;
- tools::Polygon aPoly(nPolySize);
- pBE=rE.pSucc;
- for (i=0; i<nPolySize; i++) {
- rTransform.Transform(static_cast<const DXFVertexEntity*>(pBE)->aP0,aPoly[i]);
- pBE=pBE->pSucc;
- }
-
- if (!SetLineAttribute(rE))
- return;
-
- if ((rE.nFlags&1)!=0) pVirDev->DrawPolygon(aPoly);
- else pVirDev->DrawPolyLine(aPoly);
- if (rE.fThickness==0)
- return;
-
- tools::Polygon aPoly2(nPolySize);
- pBE=rE.pSucc;
- for (i=0; i<nPolySize; i++) {
- rTransform.Transform(
- (static_cast<const DXFVertexEntity*>(pBE)->aP0)+DXFVector(0,0,rE.fThickness),
- aPoly2[i]
- );
- pBE=pBE->pSucc;
- }
- if ((rE.nFlags&1)!=0) pVirDev->DrawPolygon(aPoly2);
- else pVirDev->DrawPolyLine(aPoly2);
- for (i=0; i<nPolySize; i++) DrawLine(aPoly[i],aPoly2[i]);
-}
-
-void DXF2GDIMetaFile::DrawLWPolyLineEntity(const DXFLWPolyLineEntity & rE, const DXFTransform & rTransform )
-{
- sal_Int32 nPolySize = rE.aP.size();
- if (!nPolySize)
- return;
-
- tools::Polygon aPoly( static_cast<sal_uInt16>(nPolySize));
- for (sal_Int32 i = 0; i < nPolySize; ++i)
- {
- rTransform.Transform( rE.aP[ static_cast<sal_uInt16>(i) ], aPoly[ static_cast<sal_uInt16>(i) ] );
- }
- if ( SetLineAttribute( rE ) )
- {
- if ( ( rE.nFlags & 1 ) != 0 )
- pVirDev->DrawPolygon( aPoly );
- else
- pVirDev->DrawPolyLine( aPoly );
- }
-}
-
-void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransform & rTransform )
-{
- if ( !rE.nBoundaryPathCount )
- return;
-
- SetAreaAttribute( rE );
- sal_Int32 j = 0;
- tools::PolyPolygon aPolyPoly;
- for ( j = 0; j < rE.nBoundaryPathCount; j++ )
- {
- std::vector< Point > aPtAry;
- const DXFBoundaryPathData& rPathData = rE.pBoundaryPathData[ j ];
- if ( rPathData.bIsPolyLine )
- {
- for (const auto& a : rPathData.aP)
- {
- Point aPt;
- rTransform.Transform(a, aPt);
- aPtAry.push_back( aPt );
- }
- }
- else
- {
- for ( auto& rEdge : rPathData.aEdges )
- {
- const DXFEdgeType* pEdge = rEdge.get();
- switch( pEdge->nEdgeType )
- {
- case 1 :
- {
- Point aPt;
- rTransform.Transform( static_cast<const DXFEdgeTypeLine*>(pEdge)->aStartPoint, aPt );
- aPtAry.push_back( aPt );
- rTransform.Transform( static_cast<const DXFEdgeTypeLine*>(pEdge)->aEndPoint, aPt );
- aPtAry.push_back( aPt );
- }
- break;
- case 2 :
- case 3 :
- case 4 :
- break;
- }
- }
- }
- sal_uInt16 i, nSize = static_cast<sal_uInt16>(aPtAry.size());
- if ( nSize )
- {
- tools::Polygon aPoly( nSize );
- for ( i = 0; i < nSize; i++ )
- aPoly[ i ] = aPtAry[ i ];
- aPolyPoly.Insert( aPoly );
- }
- }
- if ( aPolyPoly.Count() )
- pVirDev->DrawPolyPolygon( aPolyPoly );
-}
-
-void DXF2GDIMetaFile::Draw3DFaceEntity(const DXF3DFaceEntity & rE, const DXFTransform & rTransform)
-{
- sal_uInt16 nN,i;
- if (!SetLineAttribute(rE))
- return;
-
- if (rE.aP2==rE.aP3) nN=3; else nN=4;
- tools::Polygon aPoly(nN);
- rTransform.Transform(rE.aP0,aPoly[0]);
- rTransform.Transform(rE.aP1,aPoly[1]);
- rTransform.Transform(rE.aP2,aPoly[2]);
- if (nN>3) rTransform.Transform(rE.aP3,aPoly[3]);
- if ((rE.nIEFlags&0x0f)==0) pVirDev->DrawPolygon(aPoly);
- else {
- for (i=0; i<nN; i++) {
- if ( (rE.nIEFlags & (static_cast<tools::Long>(1)<<i)) == 0 ) {
- DrawLine(aPoly[i],aPoly[(i+1)%nN]);
- }
- }
- }
-}
-
-void DXF2GDIMetaFile::DrawDimensionEntity(const DXFDimensionEntity & rE, const DXFTransform & rTransform)
-{
- const DXFBlock * pB;
- pB=pDXF->aBlocks.Search(rE.m_sPseudoBlock);
- if (pB==nullptr)
- return;
-
- DXFTransform aT(
- DXFTransform(1.0,1.0,1.0,DXFVector(0.0,0.0,0.0)-pB->aBasePoint),
- rTransform
- );
- tools::Long nSavedBlockColor, nSavedParentLayerColor;
- DXFLineInfo aSavedBlockDXFLineInfo, aSavedParentLayerDXFLineInfo;
- nSavedBlockColor=nBlockColor;
- nSavedParentLayerColor=nParentLayerColor;
- aSavedBlockDXFLineInfo=aBlockDXFLineInfo;
- aSavedParentLayerDXFLineInfo=aParentLayerDXFLineInfo;
- nBlockColor=GetEntityColor(rE);
- aBlockDXFLineInfo=GetEntityDXFLineInfo(rE);
- if (rE.m_sLayer.getLength() > 1) {
- DXFLayer * pLayer=pDXF->aTables.SearchLayer(rE.m_sLayer);
- if (pLayer!=nullptr) {
- nParentLayerColor=pLayer->nColor;
- aParentLayerDXFLineInfo = LTypeToDXFLineInfo(pLayer->m_sLineType);
- }
- }
- DrawEntities(*pB,aT);
- aBlockDXFLineInfo=aSavedBlockDXFLineInfo;
- aParentLayerDXFLineInfo=aSavedParentLayerDXFLineInfo;
- nBlockColor=nSavedBlockColor;
- nParentLayerColor=nSavedParentLayerColor;
-}
-
-
-void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities,
- const DXFTransform & rTransform)
-{
- if (rEntities.mbBeingDrawn)
- return;
- rEntities.mbBeingDrawn = true;
-
- DXFTransform aET;
- const DXFTransform * pT;
-
- const DXFBasicEntity * pE=rEntities.pFirst;
-
- while (pE!=nullptr && bStatus) {
- if (pE->nSpace==0) {
- if (pE->aExtrusion.fz==1.0) {
- pT=&rTransform;
- }
- else {
- aET=DXFTransform(DXFTransform(pE->aExtrusion),rTransform);
- pT=&aET;
- }
- switch (pE->eType) {
- case DXF_LINE:
- DrawLineEntity(static_cast<const DXFLineEntity&>(*pE),*pT);
- break;
- case DXF_POINT:
- DrawPointEntity(static_cast<const DXFPointEntity&>(*pE),*pT);
- break;
- case DXF_CIRCLE:
- DrawCircleEntity(static_cast<const DXFCircleEntity&>(*pE),*pT);
- break;
- case DXF_ARC:
- DrawArcEntity(static_cast<const DXFArcEntity&>(*pE),*pT);
- break;
- case DXF_TRACE:
- DrawTraceEntity(static_cast<const DXFTraceEntity&>(*pE),*pT);
- break;
- case DXF_SOLID:
- DrawSolidEntity(static_cast<const DXFSolidEntity&>(*pE),*pT);
- break;
- case DXF_TEXT:
- DrawTextEntity(static_cast<const DXFTextEntity&>(*pE),*pT);
- break;
- case DXF_INSERT:
- DrawInsertEntity(static_cast<const DXFInsertEntity&>(*pE),*pT);
- break;
- case DXF_ATTRIB:
- DrawAttribEntity(static_cast<const DXFAttribEntity&>(*pE),*pT);
- break;
- case DXF_POLYLINE:
- DrawPolyLineEntity(static_cast<const DXFPolyLineEntity&>(*pE),*pT);
- break;
- case DXF_LWPOLYLINE :
- DrawLWPolyLineEntity(static_cast<const DXFLWPolyLineEntity&>(*pE), *pT);
- break;
- case DXF_HATCH :
- DrawHatchEntity(static_cast<const DXFHatchEntity&>(*pE), *pT);
- break;
- case DXF_3DFACE:
- Draw3DFaceEntity(static_cast<const DXF3DFaceEntity&>(*pE),*pT);
- break;
- case DXF_DIMENSION:
- DrawDimensionEntity(static_cast<const DXFDimensionEntity&>(*pE),*pT);
- break;
- default:
- break; // four other values not handled -Wall
- }
- }
- pE=pE->pSucc;
- }
-
- rEntities.mbBeingDrawn = false;
-}
-
-
-DXF2GDIMetaFile::DXF2GDIMetaFile()
- : pVirDev(nullptr)
- , pDXF(nullptr)
- , bStatus(false)
- , OptPointsPerCircle(0)
- , nMinPercent(0)
- , nMaxPercent(0)
- , nLastPercent(0)
- , nMainEntitiesCount(0)
- , nBlockColor(0)
- , nParentLayerColor(0)
-{
-}
-
-
-DXF2GDIMetaFile::~DXF2GDIMetaFile()
-{
-}
-
-
-bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF, sal_uInt16 nminpercent, sal_uInt16 nmaxpercent)
-{
- double fWidth,fHeight,fScale(0.0);
- DXFTransform aTransform;
- Size aPrefSize;
- const DXFLayer * pLayer;
- const DXFVPort * pVPort;
-
- pVirDev = VclPtr<VirtualDevice>::Create();
- pDXF = &rDXF;
- bStatus = true;
-
- OptPointsPerCircle=50;
-
- nMinPercent=nminpercent;
- nMaxPercent=nmaxpercent;
- nLastPercent=nMinPercent;
- nMainEntitiesCount=CountEntities(pDXF->aEntities);
-
- nBlockColor=7;
- aBlockDXFLineInfo.eStyle = LineStyle::Solid;
- aBlockDXFLineInfo.nDashCount = 0;
- aBlockDXFLineInfo.fDashLen = 0;
- aBlockDXFLineInfo.nDotCount = 0;
- aBlockDXFLineInfo.fDotLen = 0;
- aBlockDXFLineInfo.fDistance = 0;
-
- pLayer=pDXF->aTables.SearchLayer("0");
- if (pLayer!=nullptr) {
- nParentLayerColor=pLayer->nColor & 0xff;
- aParentLayerDXFLineInfo = LTypeToDXFLineInfo(pLayer->m_sLineType);
- }
- else {
- nParentLayerColor=7;
- aParentLayerDXFLineInfo.eStyle = LineStyle::Solid;
- aParentLayerDXFLineInfo.nDashCount = 0;
- aParentLayerDXFLineInfo.fDashLen = 0;
- aParentLayerDXFLineInfo.nDotCount = 0;
- aParentLayerDXFLineInfo.fDotLen = 0;
- aParentLayerDXFLineInfo.fDistance = 0;
- }
-
- pVirDev->EnableOutput(false);
- if (!utl::ConfigManager::IsFuzzing()) // for fuzzing don't bother recording the drawing
- rMTF.Record(pVirDev);
-
- aActLineColor = pVirDev->GetLineColor();
- aActFillColor = pVirDev->GetFillColor();
- aActFont = pVirDev->GetFont();
-
- pVPort=pDXF->aTables.SearchVPort("*ACTIVE");
- if (pVPort!=nullptr) {
- if (pVPort->aDirection.fx==0 && pVPort->aDirection.fy==0)
- pVPort=nullptr;
- }
-
- if (pVPort==nullptr) {
- if (pDXF->aBoundingBox.bEmpty)
- bStatus=false;
- else {
- fWidth=pDXF->aBoundingBox.fMaxX-pDXF->aBoundingBox.fMinX;
- fHeight=pDXF->aBoundingBox.fMaxY-pDXF->aBoundingBox.fMinY;
- if (fWidth<=0 || fHeight<=0) {
- bStatus=false;
- }
- else {
- if (fWidth>fHeight)
- fScale=10000.0/fWidth;
- else
- fScale=10000.0/fHeight;
- aTransform=DXFTransform(fScale,-fScale,fScale,
- DXFVector(-pDXF->aBoundingBox.fMinX*fScale,
- pDXF->aBoundingBox.fMaxY*fScale,
- -pDXF->aBoundingBox.fMinZ*fScale));
- }
- aPrefSize.setWidth(static_cast<tools::Long>(fWidth*fScale+1.5) );
- aPrefSize.setHeight(static_cast<tools::Long>(fHeight*fScale+1.5) );
- }
- }
- else {
- fHeight=pVPort->fHeight;
- fWidth=fHeight*pVPort->fAspectRatio;
- if (fWidth<=0 || fHeight<=0) {
- bStatus=false;
- } else {
- if (fWidth>fHeight)
- fScale=10000.0/fWidth;
- else
- fScale=10000.0/fHeight;
- aTransform=DXFTransform(
- DXFTransform(pVPort->aDirection,pVPort->aTarget),
- DXFTransform(
- DXFTransform(1.0,-1.0,1.0,DXFVector(fWidth/2-pVPort->fCenterX,fHeight/2+pVPort->fCenterY,0)),
- DXFTransform(fScale,fScale,fScale,DXFVector(0,0,0))
- )
- );
- }
- aPrefSize.setWidth(static_cast<tools::Long>(fWidth*fScale+1.5) );
- aPrefSize.setHeight(static_cast<tools::Long>(fHeight*fScale+1.5) );
- }
-
- if (bStatus)
- DrawEntities(pDXF->aEntities,aTransform);
-
- rMTF.Stop();
-
- if ( bStatus )
- {
- rMTF.SetPrefSize( aPrefSize );
- // simply set map mode to 1/100-mm (1/10-mm) if the graphic
- // does not get not too small (<0.5cm)
- if( ( aPrefSize.Width() < 500 ) && ( aPrefSize.Height() < 500 ) )
- rMTF.SetPrefMapMode( MapMode( MapUnit::Map10thMM ) );
- else
- rMTF.SetPrefMapMode( MapMode( MapUnit::Map100thMM ) );
- }
-
- pVirDev.disposeAndClear();
- return bStatus;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/filter/source/graphicfilter/idxf/dxf2mtf.hxx
deleted file mode 100644
index 6d383dae1005..000000000000
--- a/filter/source/graphicfilter/idxf/dxf2mtf.hxx
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- 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 INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXF2MTF_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXF2MTF_HXX
-
-#include <sal/config.h>
-
-#include <string_view>
-
-#include "dxfreprd.hxx"
-#include <vcl/font.hxx>
-#include <vcl/lineinfo.hxx>
-#include <vcl/vclptr.hxx>
-#include <vcl/virdev.hxx>
-
-class DXF2GDIMetaFile {
-private:
-
- VclPtr<VirtualDevice> pVirDev;
- const DXFRepresentation * pDXF;
- bool bStatus;
-
- sal_uInt16 OptPointsPerCircle;
-
- sal_uInt16 nMinPercent;
- sal_uInt16 nMaxPercent;
- sal_uInt16 nLastPercent;
- sal_uInt16 nMainEntitiesCount;
-
- tools::Long nBlockColor;
- DXFLineInfo aBlockDXFLineInfo;
- tools::Long nParentLayerColor;
- DXFLineInfo aParentLayerDXFLineInfo;
- Color aActLineColor;
- Color aActFillColor;
- vcl::Font aActFont;
- const LineInfo aDefaultLineInfo; // to share between lines to reduce memory
-
- static sal_uInt64 CountEntities(const DXFEntities & rEntities);
-
- Color ConvertColor(sal_uInt8 nColor);
-
- tools::Long GetEntityColor(const DXFBasicEntity & rE);
-
- DXFLineInfo LTypeToDXFLineInfo(std::string_view rLineType);
-
- DXFLineInfo GetEntityDXFLineInfo(const DXFBasicEntity & rE);
-
- bool SetLineAttribute(const DXFBasicEntity & rE);
-
- bool SetAreaAttribute(const DXFBasicEntity & rE);
-
- bool SetFontAttribute(const DXFBasicEntity & rE, short nAngle,
- sal_uInt16 nHeight);
-
- void DrawLineEntity(const DXFLineEntity & rE, const DXFTransform & rTransform);
-
- void DrawPointEntity(const DXFPointEntity & rE, const DXFTransform & rTransform);
-
- void DrawCircleEntity(const DXFCircleEntity & rE, const DXFTransform & rTransform);
-
- void DrawArcEntity(const DXFArcEntity & rE, const DXFTransform & rTransform);
-
- void DrawTraceEntity(const DXFTraceEntity & rE, const DXFTransform & rTransform);
-
- void DrawSolidEntity(const DXFSolidEntity & rE, const DXFTransform & rTransform);
-
- void DrawTextEntity(const DXFTextEntity & rE, const DXFTransform & rTransform);
-
- void DrawInsertEntity(const DXFInsertEntity & rE, const DXFTransform & rTransform);
-
- void DrawAttribEntity(const DXFAttribEntity & rE, const DXFTransform & rTransform);
-
- void DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXFTransform & rTransform);
-
- void Draw3DFaceEntity(const DXF3DFaceEntity & rE, const DXFTransform & rTransform);
-
- void DrawDimensionEntity(const DXFDimensionEntity & rE, const DXFTransform & rTransform);
-
- void DrawLWPolyLineEntity( const DXFLWPolyLineEntity & rE, const DXFTransform & rTransform );
-
- void DrawHatchEntity( const DXFHatchEntity & rE, const DXFTransform & rTransform );
-
- void DrawEntities(const DXFEntities & rEntities,
- const DXFTransform & rTransform);
-
- void DrawLine(const Point& rA, const Point& rB);
-
-public:
-
- DXF2GDIMetaFile();
- ~DXF2GDIMetaFile();
-
- bool Convert( const DXFRepresentation & rDXF, GDIMetaFile & rMTF, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent);
-
-};
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfblkrd.cxx b/filter/source/graphicfilter/idxf/dxfblkrd.cxx
deleted file mode 100644
index b5a96b93ea9a..000000000000
--- a/filter/source/graphicfilter/idxf/dxfblkrd.cxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- 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 "dxfblkrd.hxx"
-
-
-//---------------- DXFBlock --------------------------------------------------
-
-
-DXFBlock::DXFBlock()
- : pSucc(nullptr)
- , nFlags(0)
-{
-}
-
-
-DXFBlock::~DXFBlock()
-{
-}
-
-
-void DXFBlock::Read(DXFGroupReader & rDGR)
-{
- m_sName = "";
- m_sAlsoName = "";
- aBasePoint.fx=0.0;
- aBasePoint.fy=0.0;
- aBasePoint.fz=0.0;
- nFlags=0;
- m_sXRef = "";
-
- while (rDGR.Read()!=0)
- {
- switch (rDGR.GetG())
- {
- case 2: m_sName = rDGR.GetS(); break;
- case 3: m_sAlsoName = rDGR.GetS(); break;
- case 70: nFlags=rDGR.GetI(); break;
- case 10: aBasePoint.fx=rDGR.GetF(); break;
- case 20: aBasePoint.fy=rDGR.GetF(); break;
- case 30: aBasePoint.fz=rDGR.GetF(); break;
- case 1: m_sXRef = rDGR.GetS(); break;
- }
- }
- DXFEntities::Read(rDGR);
-}
-
-
-//---------------- DXFBlocks -------------------------------------------------
-
-
-DXFBlocks::DXFBlocks()
-{
- pFirst=nullptr;
-}
-
-
-DXFBlocks::~DXFBlocks()
-{
- Clear();
-}
-
-
-void DXFBlocks::Read(DXFGroupReader & rDGR)
-{
- DXFBlock * pB, * * ppSucc;
-
- ppSucc=&pFirst;
- while (*ppSucc!=nullptr) ppSucc=&((*ppSucc)->pSucc);
-
- for (;;) {
- while (rDGR.GetG()!=0) rDGR.Read();
- if (rDGR.GetS() == "ENDSEC" ||
- rDGR.GetS() == "EOF") break;
- if (rDGR.GetS() == "BLOCK") {
- pB=new DXFBlock;
- pB->Read(rDGR);
- *ppSucc=pB;
- ppSucc=&(pB->pSucc);
- }
- else rDGR.Read();
- }
-}
-
-
-DXFBlock * DXFBlocks::Search(std::string_view rName) const
-{
- DXFBlock * pB;
- for (pB=pFirst; pB!=nullptr; pB=pB->pSucc) {
- if (rName == pB->m_sName) break;
- }
- return pB;
-}
-
-
-void DXFBlocks::Clear()
-{
- DXFBlock * ptmp;
-
- while (pFirst!=nullptr) {
- ptmp=pFirst;
- pFirst=ptmp->pSucc;
- delete ptmp;
- }
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfblkrd.hxx b/filter/source/graphicfilter/idxf/dxfblkrd.hxx
deleted file mode 100644
index ca0a0e68aa54..000000000000
--- a/filter/source/graphicfilter/idxf/dxfblkrd.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- 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 INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFBLKRD_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFBLKRD_HXX
-
-#include <sal/config.h>
-
-#include <string_view>
-
-#include "dxfentrd.hxx"
-
-
-//---------------- A Block (= Set of Entities) --------------------------
-
-
-class DXFBlock : public DXFEntities {
-
-public:
-
- DXFBlock * pSucc;
- // pointer to the next block in the list DXFBlocks::pFirst
-
- // properties of blocks; commented with group codes:
- OString m_sName; // 2
- OString m_sAlsoName; // 3
- tools::Long nFlags; // 70
- DXFVector aBasePoint; // 10,20,30
- OString m_sXRef; // 1
-
- DXFBlock();
- ~DXFBlock();
-
- void Read(DXFGroupReader & rDGR);
- // reads the block (including entities) from a dxf file
- // by rGDR until an ENDBLK, ENDSEC or EOF.
-};
-
-
-//---------------- A set of blocks -----------------------------------
-
-
-class DXFBlocks {
-
- DXFBlock * pFirst;
- // list of blocks, READ ONLY!
-
-public:
-
- DXFBlocks();
- ~DXFBlocks();
-
- void Read(DXFGroupReader & rDGR);
- // reads all block per rDGR until an ENDSEC or EOF.
-
- DXFBlock * Search(std::string_view rName) const;
- // looks for a block with the name, return NULL if not successful
-
- void Clear();
- // deletes all blocks
-
-};
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/filter/source/graphicfilter/idxf/dxfentrd.cxx
deleted file mode 100644
index f1bc5c883fb7..000000000000
--- a/filter/source/graphicfilter/idxf/dxfentrd.cxx
+++ /dev/null
@@ -1,850 +0,0 @@
-/* -*- 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 <sal/config.h>
-
-#include <o3tl/safeint.hxx>
-
-#include "dxfentrd.hxx"
-
-//--------------------------DXFBasicEntity--------------------------------------
-
-DXFBasicEntity::DXFBasicEntity(DXFEntityType eThisType)
- : m_sLayer("0")
- , m_sLineType("BYLAYER")
-{
- eType=eThisType;
- pSucc=nullptr;
- fThickness=0;
- nColor=256;
- nSpace=0;
- aExtrusion.fx=0.0;
- aExtrusion.fy=0.0;
- aExtrusion.fz=1.0;
-}
-
-void DXFBasicEntity::Read(DXFGroupReader & rDGR)
-{
- while (rDGR.Read()!=0) EvaluateGroup(rDGR);
-}
-
-void DXFBasicEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG())
- {
- case 8: m_sLayer = rDGR.GetS(); break;
- case 6: m_sLineType = rDGR.GetS(); break;
- case 39: fThickness=rDGR.GetF(); break;
- case 62: nColor=rDGR.GetI(); break;
- case 67: nSpace=rDGR.GetI(); break;
- case 210: aExtrusion.fx=rDGR.GetF(); break;
- case 220: aExtrusion.fy=rDGR.GetF(); break;
- case 230: aExtrusion.fz=rDGR.GetF(); break;
- }
-}
-
-DXFBasicEntity::~DXFBasicEntity()
-{
-}
-
-//--------------------------DXFLineEntity---------------------------------------
-
-DXFLineEntity::DXFLineEntity() : DXFBasicEntity(DXF_LINE)
-{
-}
-
-void DXFLineEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 11: aP1.fx=rDGR.GetF(); break;
- case 21: aP1.fy=rDGR.GetF(); break;
- case 31: aP1.fz=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFPointEntity--------------------------------------
-
-DXFPointEntity::DXFPointEntity() : DXFBasicEntity(DXF_POINT)
-{
-}
-
-void DXFPointEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFCircleEntity-------------------------------------
-
-DXFCircleEntity::DXFCircleEntity() : DXFBasicEntity(DXF_CIRCLE)
-{
- fRadius=1.0;
-}
-
-void DXFCircleEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 40: fRadius=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFArcEntity----------------------------------------
-
-DXFArcEntity::DXFArcEntity() : DXFBasicEntity(DXF_ARC)
-{
- fRadius=1.0;
- fStart=0;
- fEnd=360.0;
-}
-
-void DXFArcEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 40: fRadius=rDGR.GetF(); break;
- case 50: fStart=rDGR.GetF(); break;
- case 51: fEnd=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFTraceEntity--------------------------------------
-
-DXFTraceEntity::DXFTraceEntity() : DXFBasicEntity(DXF_TRACE)
-{
-}
-
-void DXFTraceEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 11: aP1.fx=rDGR.GetF(); break;
- case 21: aP1.fy=rDGR.GetF(); break;
- case 31: aP1.fz=rDGR.GetF(); break;
- case 12: aP2.fx=rDGR.GetF(); break;
- case 22: aP2.fy=rDGR.GetF(); break;
- case 32: aP2.fz=rDGR.GetF(); break;
- case 13: aP3.fx=rDGR.GetF(); break;
- case 23: aP3.fy=rDGR.GetF(); break;
- case 33: aP3.fz=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFSolidEntity--------------------------------------
-
-DXFSolidEntity::DXFSolidEntity() : DXFBasicEntity(DXF_SOLID)
-{
-}
-
-void DXFSolidEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 11: aP1.fx=rDGR.GetF(); break;
- case 21: aP1.fy=rDGR.GetF(); break;
- case 31: aP1.fz=rDGR.GetF(); break;
- case 12: aP2.fx=rDGR.GetF(); break;
- case 22: aP2.fy=rDGR.GetF(); break;
- case 32: aP2.fz=rDGR.GetF(); break;
- case 13: aP3.fx=rDGR.GetF(); break;
- case 23: aP3.fy=rDGR.GetF(); break;
- case 33: aP3.fz=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFTextEntity---------------------------------------
-
-DXFTextEntity::DXFTextEntity()
- : DXFBasicEntity(DXF_TEXT)
- , m_sStyle("STANDARD")
-{
- fHeight=1.0;
- fRotAngle=0.0;
- fXScale=1.0;
- fOblAngle=0.0;
- nGenFlags=0;
- nHorzJust=0;
- nVertJust=0;
-}
-
-void DXFTextEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 40: fHeight=rDGR.GetF(); break;
- case 1: m_sText = rDGR.GetS(); break;
- case 50: fRotAngle=rDGR.GetF(); break;
- case 41: fXScale=rDGR.GetF(); break;
- case 42: fOblAngle=rDGR.GetF(); break;
- case 7: m_sStyle = rDGR.GetS(); break;
- case 71: nGenFlags=rDGR.GetI(); break;
- case 72: nHorzJust=rDGR.GetI(); break;
- case 73: nVertJust=rDGR.GetI(); break;
- case 11: aAlign.fx=rDGR.GetF(); break;
- case 21: aAlign.fy=rDGR.GetF(); break;
- case 31: aAlign.fz=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFShapeEntity--------------------------------------
-
-DXFShapeEntity::DXFShapeEntity() : DXFBasicEntity(DXF_SHAPE)
-{
- fSize=1.0;
- fRotAngle=0;
- fXScale=1.0;
- fOblAngle=0;
-}
-
-void DXFShapeEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 40: fSize=rDGR.GetF(); break;
- case 2: m_sName = rDGR.GetS(); break;
- case 50: fRotAngle=rDGR.GetF(); break;
- case 41: fXScale=rDGR.GetF(); break;
- case 51: fOblAngle=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFInsertEntity-------------------------------------
-
-DXFInsertEntity::DXFInsertEntity() : DXFBasicEntity(DXF_INSERT)
-{
- nAttrFlag=0;
- fXScale=1.0;
- fYScale=1.0;
- fZScale=1.0;
- fRotAngle=0.0;
- nColCount=1;
- nRowCount=1;
- fColSpace=0.0;
- fRowSpace=0.0;
-}
-
-void DXFInsertEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 66: nAttrFlag=rDGR.GetI(); break;
- case 2: m_sName = rDGR.GetS(); break;
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 41: fXScale=rDGR.GetF(); break;
- case 42: fYScale=rDGR.GetF(); break;
- case 43: fZScale=rDGR.GetF(); break;
- case 50: fRotAngle=rDGR.GetF(); break;
- case 70: nColCount=rDGR.GetI(); break;
- case 71: nRowCount=rDGR.GetI(); break;
- case 44: fColSpace=rDGR.GetF(); break;
- case 45: fRowSpace=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFAttDefEntity-------------------------------------
-
-DXFAttDefEntity::DXFAttDefEntity()
- : DXFBasicEntity(DXF_ATTDEF)
- , m_sStyle("STANDARD")
-{
- fHeight=1.0;
- nAttrFlags=0;
- nFieldLen=0;
- fRotAngle=0.0;
- fXScale=1.0;
- fOblAngle=0.0;
- nGenFlags=0;
- nHorzJust=0;
- nVertJust=0;
-}
-
-void DXFAttDefEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 40: fHeight=rDGR.GetF(); break;
- case 1: m_sDefVal = rDGR.GetS(); break;
- case 3: m_sPrompt = rDGR.GetS(); break;
- case 2: m_sTagStr = rDGR.GetS(); break;
- case 70: nAttrFlags=rDGR.GetI(); break;
- case 73: nFieldLen=rDGR.GetI(); break;
- case 50: fRotAngle=rDGR.GetF(); break;
- case 41: fXScale=rDGR.GetF(); break;
- case 51: fOblAngle=rDGR.GetF(); break;
- case 7: m_sStyle = rDGR.GetS(); break;
- case 71: nGenFlags=rDGR.GetI(); break;
- case 72: nHorzJust=rDGR.GetI(); break;
- case 74: nVertJust=rDGR.GetI(); break;
- case 11: aAlign.fx=rDGR.GetF(); break;
- case 21: aAlign.fy=rDGR.GetF(); break;
- case 31: aAlign.fz=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFAttribEntity-------------------------------------
-
-DXFAttribEntity::DXFAttribEntity()
- : DXFBasicEntity(DXF_ATTRIB)
- , m_sStyle("STANDARD")
-{
- fHeight=1.0;
- nAttrFlags=0;
- nFieldLen=0;
- fRotAngle=0.0;
- fXScale=1.0;
- fOblAngle=0.0;
- nGenFlags=0;
- nHorzJust=0;
- nVertJust=0;
-}
-
-void DXFAttribEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 40: fHeight=rDGR.GetF(); break;
- case 1: m_sText = rDGR.GetS(); break;
- case 2: m_sTagStr = rDGR.GetS(); break;
- case 70: nAttrFlags=rDGR.GetI(); break;
- case 73: nFieldLen=rDGR.GetI(); break;
- case 50: fRotAngle=rDGR.GetF(); break;
- case 41: fXScale=rDGR.GetF(); break;
- case 51: fOblAngle=rDGR.GetF(); break;
- case 7: m_sStyle = rDGR.GetS(); break;
- case 71: nGenFlags=rDGR.GetI(); break;
- case 72: nHorzJust=rDGR.GetI(); break;
- case 74: nVertJust=rDGR.GetI(); break;
- case 11: aAlign.fx=rDGR.GetF(); break;
- case 21: aAlign.fy=rDGR.GetF(); break;
- case 31: aAlign.fz=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFPolyLine-----------------------------------------
-
-DXFPolyLineEntity::DXFPolyLineEntity() : DXFBasicEntity(DXF_POLYLINE)
-{
- nFlags=0;
- fSWidth=0.0;
- fEWidth=0.0;
- nMeshMCount=0;
- nMeshNCount=0;
- nMDensity=0;
- nNDensity=0;
- nCSSType=0;
-}
-
-void DXFPolyLineEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 70: nFlags=rDGR.GetI(); break;
- case 40: fSWidth=rDGR.GetF(); break;
- case 41: fEWidth=rDGR.GetF(); break;
- case 71: nMeshMCount=rDGR.GetI(); break;
- case 72: nMeshNCount=rDGR.GetI(); break;
- case 73: nMDensity=rDGR.GetI(); break;
- case 74: nNDensity=rDGR.GetI(); break;
- case 75: nCSSType=rDGR.GetI(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFLWPolyLine---------------------------------------
-
-DXFLWPolyLineEntity::DXFLWPolyLineEntity() :
- DXFBasicEntity( DXF_LWPOLYLINE ),
- nIndex( 0 ),
- nCount( 0 ),
- nFlags( 0 ),
- fConstantWidth( 0.0 ),
- fStartWidth( 0.0 ),
- fEndWidth( 0.0 )
-{
-}
-
-void DXFLWPolyLineEntity::EvaluateGroup( DXFGroupReader & rDGR )
-{
- switch ( rDGR.GetG() )
- {
- case 90 :
- {
- nCount = rDGR.GetI();
- // limit alloc to max reasonable size based on remaining data in stream
- if (nCount > 0 && o3tl::make_unsigned(nCount) <= rDGR.remainingSize())
- aP.reserve(nCount);
- else
- nCount = 0;
- }
- break;
- case 70: nFlags = rDGR.GetI(); break;
- case 43: fConstantWidth = rDGR.GetF(); break;
- case 40: fStartWidth = rDGR.GetF(); break;
- case 41: fEndWidth = rDGR.GetF(); break;
- case 10:
- {
- if (nIndex < nCount)
- {
- aP.resize(nIndex+1);
- aP[nIndex].fx = rDGR.GetF();
- }
- }
- break;
- case 20:
- {
- if (nIndex < nCount)
- {
- aP.resize(nIndex+1);
- aP[nIndex].fy = rDGR.GetF();
- ++nIndex;
- }
- }
- break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFHatchEntity-------------------------------------
-
-DXFEdgeTypeLine::DXFEdgeTypeLine() :
- DXFEdgeType( 1 )
-{
-
-}
-
-bool DXFEdgeTypeLine::EvaluateGroup( DXFGroupReader & rDGR )
-{
- bool bExecutingGroupCode = true;
- switch ( rDGR.GetG() )
- {
- case 10 : aStartPoint.fx = rDGR.GetF(); break;
- case 20 : aStartPoint.fy = rDGR.GetF(); break;
- case 11 : aEndPoint.fx = rDGR.GetF(); break;
- case 21 : aEndPoint.fy = rDGR.GetF(); break;
- default : bExecutingGroupCode = false; break;
- }
- return bExecutingGroupCode;
-}
-
-DXFEdgeTypeCircularArc::DXFEdgeTypeCircularArc() :
- DXFEdgeType( 2 ),
- fRadius( 0.0 ),
- fStartAngle( 0.0 ),
- fEndAngle( 0.0 ),
- nIsCounterClockwiseFlag( 0 )
-{
-}
-
-bool DXFEdgeTypeCircularArc::EvaluateGroup( DXFGroupReader & rDGR )
-{
- bool bExecutingGroupCode = true;
- switch ( rDGR.GetG() )
- {
- case 10 : aCenter.fx = rDGR.GetF(); break;
- case 20 : aCenter.fy = rDGR.GetF(); break;
- case 40 : fRadius = rDGR.GetF(); break;
- case 50 : fStartAngle = rDGR.GetF(); break;
- case 51 : fEndAngle = rDGR.GetF(); break;
- case 73 : nIsCounterClockwiseFlag = rDGR.GetI(); break;
- default : bExecutingGroupCode = false; break;
- }
- return bExecutingGroupCode;
-}
-
-DXFEdgeTypeEllipticalArc::DXFEdgeTypeEllipticalArc() :
- DXFEdgeType( 3 ),
- fLength( 0.0 ),
- fStartAngle( 0.0 ),
- fEndAngle( 0.0 ),
- nIsCounterClockwiseFlag( 0 )
-{
-}
-
-bool DXFEdgeTypeEllipticalArc::EvaluateGroup( DXFGroupReader & rDGR )
-{
- bool bExecutingGroupCode = true;
- switch( rDGR.GetG() )
- {
- case 10 : aCenter.fx = rDGR.GetF(); break;
- case 20 : aCenter.fy = rDGR.GetF(); break;
- case 11 : aEndPoint.fx = rDGR.GetF(); break;
- case 21 : aEndPoint.fy = rDGR.GetF(); break;
- case 40 : fLength = rDGR.GetF(); break;
- case 50 : fStartAngle = rDGR.GetF(); break;
- case 51 : fEndAngle = rDGR.GetF(); break;
- case 73 : nIsCounterClockwiseFlag = rDGR.GetI(); break;
- default : bExecutingGroupCode = false; break;
- }
- return bExecutingGroupCode;
-}
-
-DXFEdgeTypeSpline::DXFEdgeTypeSpline() :
- DXFEdgeType( 4 ),
- nDegree( 0 ),
- nRational( 0 ),
- nPeriodic( 0 ),
- nKnotCount( 0 ),
- nControlCount( 0 )
-{
-}
-
-bool DXFEdgeTypeSpline::EvaluateGroup( DXFGroupReader & rDGR )
-{
- bool bExecutingGroupCode = true;
- switch ( rDGR.GetG() )
- {
- case 94 : nDegree = rDGR.GetI(); break;
- case 73 : nRational = rDGR.GetI(); break;
- case 74 : nPeriodic = rDGR.GetI(); break;
- case 95 : nKnotCount = rDGR.GetI(); break;
- case 96 : nControlCount = rDGR.GetI(); break;
- default : bExecutingGroupCode = false; break;
- }
- return bExecutingGroupCode;
-}
-
-DXFBoundaryPathData::DXFBoundaryPathData() :
- nPointCount( 0 ),
- nFlags( 0 ),
- nHasBulgeFlag( 0 ),
- nIsClosedFlag( 0 ),
- fBulge( 0.0 ),
- nSourceBoundaryObjects( 0 ),
- nEdgeCount( 0 ),
- bIsPolyLine( true ),
- nPointIndex( 0 )
-{
-}
-
-DXFBoundaryPathData::~DXFBoundaryPathData()
-{
-}
-
-bool DXFBoundaryPathData::EvaluateGroup( DXFGroupReader & rDGR )
-{
- bool bExecutingGroupCode = true;
- if ( bIsPolyLine )
- {
- switch( rDGR.GetG() )
- {
- case 92 :
- {
- nFlags = rDGR.GetI();
- if ( ( nFlags & 2 ) == 0 )
- bIsPolyLine = false;
- }
- break;
- case 93 :
- {
- nPointCount = rDGR.GetI();
- // limit alloc to max reasonable size based on remaining data in stream
- if (nPointCount > 0 && o3tl::make_unsigned(nPointCount) <= rDGR.remainingSize())
- aP.reserve(nPointCount);
- else
- nPointCount = 0;
- }
- break;
- case 72 : nHasBulgeFlag = rDGR.GetI(); break;
- case 73 : nIsClosedFlag = rDGR.GetI(); break;
- case 97 : nSourceBoundaryObjects = rDGR.GetI(); break;
- case 42 : fBulge = rDGR.GetF(); break;
- case 10:
- {
- if (nPointIndex < nPointCount)
- {
- aP.resize(nPointIndex+1);
- aP[nPointIndex].fx = rDGR.GetF();
- }
- }
- break;
- case 20:
- {
- if (nPointIndex < nPointCount)
- {
- aP.resize(nPointIndex+1);
- aP[nPointIndex].fy = rDGR.GetF();
- ++nPointIndex;
- }
- }
- break;
-
- default : bExecutingGroupCode = false; break;
- }
- }
- else
- {
- if ( rDGR.GetG() == 93 )
- nEdgeCount = rDGR.GetI();
- else if ( rDGR.GetG() == 72 )
- {
- sal_Int32 nEdgeType = rDGR.GetI();
- switch( nEdgeType )
- {
- case 1 : aEdges.emplace_back( new DXFEdgeTypeLine() ); break;
- case 2 : aEdges.emplace_back( new DXFEdgeTypeCircularArc() ); break;
- case 3 : aEdges.emplace_back( new DXFEdgeTypeEllipticalArc() ); break;
- case 4 : aEdges.emplace_back( new DXFEdgeTypeSpline() ); break;
- }
- }
- else if ( !aEdges.empty() )
- aEdges.back()->EvaluateGroup( rDGR );
- else
- bExecutingGroupCode = false;
- }
- return bExecutingGroupCode;
-}
-
-DXFHatchEntity::DXFHatchEntity() :
- DXFBasicEntity( DXF_HATCH ),
- bIsInBoundaryPathContext( false ),
- nCurrentBoundaryPathIndex( -1 ),
- nFlags( 0 ),
- nAssociativityFlag( 0 ),
- nBoundaryPathCount( 0 ),
- nHatchStyle( 0 ),
- nHatchPatternType( 0 ),
- fHatchPatternAngle( 0.0 ),
- fHatchPatternScale( 1.0 ),
- nHatchDoubleFlag( 0 ),
- nHatchPatternDefinitionLines( 0 ),
- fPixelSize( 1.0 ),
- nNumberOfSeedPoints( 0 )
-{
-}
-
-void DXFHatchEntity::EvaluateGroup( DXFGroupReader & rDGR )
-{
- switch ( rDGR.GetG() )
- {
-// case 10 : aElevationPoint.fx = rDGR.GetF(); break;
-// case 20 : aElevationPoint.fy = rDGR.GetF(); break;
-// case 30 : aElevationPoint.fz = rDGR.GetF(); break;
- case 70 : nFlags = rDGR.GetI(); break;
- case 71 : nAssociativityFlag = rDGR.GetI(); break;
- case 91 :
- {
- bIsInBoundaryPathContext = true;
- nBoundaryPathCount = rDGR.GetI();
- // limit alloc to max reasonable size based on remaining data in stream
- if (nBoundaryPathCount > 0 && o3tl::make_unsigned(nBoundaryPathCount) <= rDGR.remainingSize())
- pBoundaryPathData.reset( new DXFBoundaryPathData[ nBoundaryPathCount ] );
- else
- nBoundaryPathCount = 0;
- }
- break;
- case 75 :
- {
- nHatchStyle = rDGR.GetI();
- bIsInBoundaryPathContext = false;
- }
- break;
- case 76 : nHatchPatternType = rDGR.GetI(); break;
- case 52 : fHatchPatternAngle = rDGR.GetF(); break;
- case 41 : fHatchPatternScale = rDGR.GetF(); break;
- case 77 : nHatchDoubleFlag = rDGR.GetI(); break;
- case 78 : nHatchPatternDefinitionLines = rDGR.GetI(); break;
- case 47 : fPixelSize = rDGR.GetF(); break;
- case 98 : nNumberOfSeedPoints = rDGR.GetI(); break;
-
- case 92:
- nCurrentBoundaryPathIndex++;
- [[fallthrough]];
- default:
- {
- bool bExecutingGroupCode = false;
- if ( bIsInBoundaryPathContext )
- {
- if ( ( nCurrentBoundaryPathIndex >= 0 ) &&
- ( nCurrentBoundaryPathIndex < nBoundaryPathCount ) )
- bExecutingGroupCode = pBoundaryPathData[ nCurrentBoundaryPathIndex ].EvaluateGroup( rDGR );
- }
- if ( !bExecutingGroupCode )
- DXFBasicEntity::EvaluateGroup(rDGR);
- }
- break;
- }
-}
-
-//--------------------------DXFVertexEntity-------------------------------------
-
-DXFVertexEntity::DXFVertexEntity() : DXFBasicEntity(DXF_VERTEX)
-{
- fSWidth=-1.0;
- fEWidth=-1.0;
- fBulge=0.0;
- nFlags=0;
- fCFTDir=0.0;
-
-}
-
-void DXFVertexEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 40: fSWidth=rDGR.GetF(); break;
- case 41: fEWidth=rDGR.GetF(); break;
- case 42: fBulge=rDGR.GetF(); break;
- case 70: nFlags=rDGR.GetI(); break;
- case 50: fCFTDir=rDGR.GetF(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//--------------------------DXFSeqEndEntity-------------------------------------
-
-DXFSeqEndEntity::DXFSeqEndEntity() : DXFBasicEntity(DXF_SEQEND)
-{
-}
-
-//--------------------------DXF3DFace-------------------------------------------
-
-DXF3DFaceEntity::DXF3DFaceEntity() : DXFBasicEntity(DXF_3DFACE)
-{
- nIEFlags=0;
-}
-
-void DXF3DFaceEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 10: aP0.fx=rDGR.GetF(); break;
- case 20: aP0.fy=rDGR.GetF(); break;
- case 30: aP0.fz=rDGR.GetF(); break;
- case 11: aP1.fx=rDGR.GetF(); break;
- case 21: aP1.fy=rDGR.GetF(); break;
- case 31: aP1.fz=rDGR.GetF(); break;
- case 12: aP2.fx=rDGR.GetF(); break;
- case 22: aP2.fy=rDGR.GetF(); break;
- case 32: aP2.fz=rDGR.GetF(); break;
- case 13: aP3.fx=rDGR.GetF(); break;
- case 23: aP3.fy=rDGR.GetF(); break;
- case 33: aP3.fz=rDGR.GetF(); break;
- case 70: nIEFlags=rDGR.GetI(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-
-//--------------------------DXFDimensionEntity----------------------------------
-
-DXFDimensionEntity::DXFDimensionEntity() : DXFBasicEntity(DXF_DIMENSION)
-{
-}
-
-void DXFDimensionEntity::EvaluateGroup(DXFGroupReader & rDGR)
-{
- switch (rDGR.GetG()) {
- case 2: m_sPseudoBlock = rDGR.GetS(); break;
- default: DXFBasicEntity::EvaluateGroup(rDGR);
- }
-}
-
-//---------------------------- DXFEntities --------------------------------------
-
-void DXFEntities::Read(DXFGroupReader & rDGR)
-{
- DXFBasicEntity * pE, * * ppSucc;
-
- ppSucc=&pFirst;
- while (*ppSucc!=nullptr) ppSucc=&((*ppSucc)->pSucc);
-
- while (rDGR.GetG()!=0) rDGR.Read();
-
- while (rDGR.GetS()!="ENDBLK" &&
- rDGR.GetS()!="ENDSEC" &&
- rDGR.GetS()!="EOF" )
- {
-
- if (rDGR.GetS() == "LINE" ) pE=new DXFLineEntity;
- else if (rDGR.GetS() == "POINT" ) pE=new DXFPointEntity;
- else if (rDGR.GetS() == "CIRCLE" ) pE=new DXFCircleEntity;
- else if (rDGR.GetS() == "ARC" ) pE=new DXFArcEntity;
- else if (rDGR.GetS() == "TRACE" ) pE=new DXFTraceEntity;
- else if (rDGR.GetS() == "SOLID" ) pE=new DXFSolidEntity;
- else if (rDGR.GetS() == "TEXT" ) pE=new DXFTextEntity;
- else if (rDGR.GetS() == "SHAPE" ) pE=new DXFShapeEntity;
- else if (rDGR.GetS() == "INSERT" ) pE=new DXFInsertEntity;
- else if (rDGR.GetS() == "ATTDEF" ) pE=new DXFAttDefEntity;
- else if (rDGR.GetS() == "ATTRIB" ) pE=new DXFAttribEntity;
- else if (rDGR.GetS() == "POLYLINE" ) pE=new DXFPolyLineEntity;
- else if (rDGR.GetS() == "LWPOLYLINE") pE=new DXFLWPolyLineEntity;
- else if (rDGR.GetS() == "VERTEX" ) pE=new DXFVertexEntity;
- else if (rDGR.GetS() == "SEQEND" ) pE=new DXFSeqEndEntity;
- else if (rDGR.GetS() == "3DFACE" ) pE=new DXF3DFaceEntity;
- else if (rDGR.GetS() == "DIMENSION" ) pE=new DXFDimensionEntity;
- else if (rDGR.GetS() == "HATCH" ) pE=new DXFHatchEntity;
- else
- {
- do {
- rDGR.Read();
- } while (rDGR.GetG()!=0);
- continue;
- }
- *ppSucc=pE;
- ppSucc=&(pE->pSucc);
- pE->Read(rDGR);
- }
-}
-
-void DXFEntities::Clear()
-{
- DXFBasicEntity * ptmp;
-
- while (pFirst!=nullptr) {
- ptmp=pFirst;
- pFirst=ptmp->pSucc;
- delete ptmp;
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.hxx b/filter/source/graphicfilter/idxf/dxfentrd.hxx
deleted file mode 100644
index 35b05bdbf4dc..000000000000
--- a/filter/source/graphicfilter/idxf/dxfentrd.hxx
+++ /dev/null
@@ -1,539 +0,0 @@
-/* -*- 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 INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFENTRD_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFENTRD_HXX
-
-#include "dxfgrprd.hxx"
-#include "dxfvec.hxx"
-#include <tools/long.hxx>
-
-#include <memory>
-#include <vector>
-
-enum DXFEntityType {
- DXF_LINE,
- DXF_POINT,
- DXF_CIRCLE,
- DXF_ARC,
- DXF_TRACE,
- DXF_SOLID,
- DXF_TEXT,
- DXF_SHAPE,
- DXF_INSERT,
- DXF_ATTDEF,
- DXF_ATTRIB,
- DXF_POLYLINE,
- DXF_VERTEX,
- DXF_SEQEND,
- DXF_3DFACE,
- DXF_DIMENSION,
- DXF_LWPOLYLINE,
- DXF_HATCH
-};
-
-// base class of an entity
-
-class DXFBasicEntity {
-
-public:
-
- DXFBasicEntity * pSucc;
- // pointer to next entity (in the list of DXFEntities.pFirst)
-
- DXFEntityType eType;
- // entity kind (line or circle or what)
-
- // properties that all entities have, each
- // commented with group codes:
- OString m_sLayer; // 8
- OString m_sLineType; // 6
- double fThickness; // 39
- tools::Long nColor; // 62
- tools::Long nSpace; // 67
- DXFVector aExtrusion; // 210,220,230
-
-protected:
-
- DXFBasicEntity(DXFEntityType eThisType);
- // always initialize the constructors of entities with default values
-
-public:
-
- virtual ~DXFBasicEntity();
- void Read(DXFGroupReader & rDGR);
- // Reads a parameter till the next 0-group
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR);
- // This method will be called by Read() for every parameter (respectively
- // for every group).
- // As far as the group code of the entity is known, the corresponding
- // parameter is fetched.
-
-};
-
-
-// the different kinds of entities
-
-class DXFLineEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
- DXFVector aP1; // 11,21,31
-
- DXFLineEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFPointEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
-
- DXFPointEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFCircleEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
- double fRadius; // 40
-
- DXFCircleEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFArcEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
- double fRadius; // 40
- double fStart; // 50
- double fEnd; // 51
-
- DXFArcEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFTraceEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
- DXFVector aP1; // 11,21,31
- DXFVector aP2; // 12,22,32
- DXFVector aP3; // 13,23,33
-
- DXFTraceEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFSolidEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
- DXFVector aP1; // 11,21,31
- DXFVector aP2; // 12,22,32
- DXFVector aP3; // 13,23,33
-
- DXFSolidEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFTextEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
- double fHeight; // 40
- OString m_sText; // 1
- double fRotAngle; // 50
- double fXScale; // 41
- double fOblAngle; // 42
- OString m_sStyle; // 7
- tools::Long nGenFlags; // 71
- tools::Long nHorzJust; // 72
- tools::Long nVertJust; // 73
- DXFVector aAlign; // 11,21,31
-
- DXFTextEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFShapeEntity : public DXFBasicEntity {
-
- DXFVector aP0; // 10,20,30
- double fSize; // 40
- OString m_sName; // 2
- double fRotAngle; // 50
- double fXScale; // 41
- double fOblAngle; // 51
-
-public:
-
- DXFShapeEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFInsertEntity : public DXFBasicEntity {
-
-public:
-
- tools::Long nAttrFlag; // 66
- OString m_sName; // 2
- DXFVector aP0; // 10,20,30
- double fXScale; // 41
- double fYScale; // 42
- double fZScale; // 43
- double fRotAngle; // 50
- tools::Long nColCount; // 70
- tools::Long nRowCount; // 71
- double fColSpace; // 44
- double fRowSpace; // 45
-
- DXFInsertEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFAttDefEntity : public DXFBasicEntity {
-
- DXFVector aP0; // 10,20,30
- double fHeight; // 40
- OString m_sDefVal; // 1
- OString m_sPrompt; // 3
- OString m_sTagStr; // 2
- tools::Long nAttrFlags; // 70
- tools::Long nFieldLen; // 73
- double fRotAngle; // 50
- double fXScale; // 41
- double fOblAngle; // 51
- OString m_sStyle; // 7
- tools::Long nGenFlags; // 71
- tools::Long nHorzJust; // 72
- tools::Long nVertJust; // 74
- DXFVector aAlign; // 11,21,31
-
-public:
-
- DXFAttDefEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFAttribEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
- double fHeight; // 40
- OString m_sText; // 1
- OString m_sTagStr; // 2
- tools::Long nAttrFlags; // 70
- tools::Long nFieldLen; // 73
- double fRotAngle; // 50
- double fXScale; // 41
- double fOblAngle; // 51
- OString m_sStyle; // 7
- tools::Long nGenFlags; // 71
- tools::Long nHorzJust; // 72
- tools::Long nVertJust; // 74
- DXFVector aAlign; // 11,21,31
-
- DXFAttribEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFPolyLineEntity : public DXFBasicEntity {
-
-public:
-
- tools::Long nFlags; // 70
- double fSWidth; // 40
- double fEWidth; // 41
- tools::Long nMeshMCount; // 71
- tools::Long nMeshNCount; // 72
- tools::Long nMDensity; // 73
- tools::Long nNDensity; // 74
- tools::Long nCSSType; // 75
-
- DXFPolyLineEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFLWPolyLineEntity : public DXFBasicEntity
-{
- sal_Int32 nIndex;
- sal_Int32 nCount; // 90
-
- public:
-
- sal_Int32 nFlags; // 70 1 = closed, 128 = plinegen
- double fConstantWidth; // 43 (optional - default: 0, not used if fStartWidth and/or fEndWidth is used)
- double fStartWidth; // 40
- double fEndWidth; // 41
-
- std::vector<DXFVector> aP;
-
- DXFLWPolyLineEntity();
-
- protected:
-
- virtual void EvaluateGroup( DXFGroupReader & rDGR ) override;
-
-};
-
-struct DXFEdgeType
-{
- sal_Int32 nEdgeType;
-
- virtual ~DXFEdgeType(){};
- virtual bool EvaluateGroup( DXFGroupReader & /*rDGR*/ ){ return true; };
-
- protected:
-
- DXFEdgeType( sal_Int32 EdgeType ):nEdgeType(EdgeType){};
-};
-
-struct DXFEdgeTypeLine : public DXFEdgeType
-{
- DXFVector aStartPoint; // 10,20
- DXFVector aEndPoint; // 11,21
- DXFEdgeTypeLine();
- virtual bool EvaluateGroup( DXFGroupReader & rDGR ) override;
-};
-
-struct DXFEdgeTypeCircularArc : public DXFEdgeType
-{
- DXFVector aCenter; // 10,20
- double fRadius; // 40
- double fStartAngle; // 50
- double fEndAngle; // 51
- sal_Int32 nIsCounterClockwiseFlag; // 73
- DXFEdgeTypeCircularArc();
- virtual bool EvaluateGroup( DXFGroupReader & rDGR ) override;
-};
-
-struct DXFEdgeTypeEllipticalArc : public DXFEdgeType
-{
- DXFVector aCenter; // 10,20
- DXFVector aEndPoint; // 11,21
- double fLength; // 40
- double fStartAngle; // 50
- double fEndAngle; // 51
- sal_Int32 nIsCounterClockwiseFlag; // 73
-
- DXFEdgeTypeEllipticalArc();
- virtual bool EvaluateGroup( DXFGroupReader & rDGR ) override;
-};
-
-struct DXFEdgeTypeSpline : public DXFEdgeType
-{
- sal_Int32 nDegree; // 94
- sal_Int32 nRational; // 73
- sal_Int32 nPeriodic; // 74
- sal_Int32 nKnotCount; // 75
- sal_Int32 nControlCount; // 76
-
- DXFEdgeTypeSpline();
- virtual bool EvaluateGroup( DXFGroupReader & rDGR ) override;
-};
-
-struct DXFBoundaryPathData
-{
-private:
- sal_Int32 nPointCount; // 93
-public:
- sal_Int32 nFlags; // 92
- sal_Int32 nHasBulgeFlag; // 72
- sal_Int32 nIsClosedFlag; // 73
- double fBulge; // 42
- sal_Int32 nSourceBoundaryObjects; // 97
- sal_Int32 nEdgeCount; // 93
-
- bool bIsPolyLine;
- sal_Int32 nPointIndex;
-
- std::vector<DXFVector> aP;
- std::vector<std::unique_ptr<DXFEdgeType>> aEdges;
-
- DXFBoundaryPathData();
- ~DXFBoundaryPathData();
-
- bool EvaluateGroup( DXFGroupReader & rDGR );
-};
-
-class DXFHatchEntity : public DXFBasicEntity
-{
- bool bIsInBoundaryPathContext;
- sal_Int32 nCurrentBoundaryPathIndex;
-
- public:
-
- sal_Int32 nFlags; // 70 (solid fill = 1, pattern fill = 0)
- sal_Int32 nAssociativityFlag; // 71 (associative = 1, non-associative = 0)
- sal_Int32 nBoundaryPathCount; // 91
- sal_Int32 nHatchStyle; // 75 (odd parity = 0, outmost area = 1, entire area = 2 )
- sal_Int32 nHatchPatternType; // 76 (user defined = 0, predefined = 1, custom = 2)
- double fHatchPatternAngle; // 52 (pattern fill only)
- double fHatchPatternScale; // 41 (pattern fill only:scale or spacing)
- sal_Int32 nHatchDoubleFlag; // 77 (pattern fill only:double = 1, not double = 0)
- sal_Int32 nHatchPatternDefinitionLines; // 78
- double fPixelSize; // 47
- sal_Int32 nNumberOfSeedPoints; // 98
-
- std::unique_ptr<DXFBoundaryPathData[]> pBoundaryPathData;
-
- DXFHatchEntity();
-
- protected:
-
- virtual void EvaluateGroup( DXFGroupReader & rDGR ) override;
-};
-
-class DXFVertexEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
- double fSWidth; // 40 (if <0.0, then one has DXFPolyLine::fSWidth)
- double fEWidth; // 41 (if <0.0, then one has DXFPolyLine::fEWidth)
- double fBulge; // 42
- tools::Long nFlags; // 70
- double fCFTDir; // 50
-
- DXFVertexEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFSeqEndEntity : public DXFBasicEntity {
-
-public:
-
- DXFSeqEndEntity();
-};
-
-class DXF3DFaceEntity : public DXFBasicEntity {
-
-public:
-
- DXFVector aP0; // 10,20,30
- DXFVector aP1; // 11,21,31
- DXFVector aP2; // 12,22,32
- DXFVector aP3; // 13,23,33
- tools::Long nIEFlags; // 70
-
- DXF3DFaceEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-class DXFDimensionEntity : public DXFBasicEntity {
-
-public:
-
- OString m_sPseudoBlock; // 2
-
- DXFDimensionEntity();
-
-protected:
-
- virtual void EvaluateGroup(DXFGroupReader & rDGR) override;
-};
-
-
-// read and represent the set of entities
-class DXFEntities {
-
-public:
-
- DXFEntities()
- : pFirst(nullptr)
- , mbBeingDrawn(false)
- {
- }
-
- ~DXFEntities()
- {
- Clear();
- }
-
- DXFBasicEntity * pFirst; // list of entities, READ ONLY!
- mutable bool mbBeingDrawn; // guard for loop in entity parsing
-
- void Read(DXFGroupReader & rDGR);
- // read entities by rGDR of a DXF file until a
- // ENDBLK, ENDSEC or EOF (of group 0).
- // (all unknown thing will be skipped)
-
- void Clear();
- // deletes all entities
-};
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
deleted file mode 100644
index f5d42106c2ad..000000000000
--- a/filter/source/graphicfilter/idxf/dxfgrprd.cxx
+++ /dev/null
@@ -1,213 +0,0 @@
-/* -*- 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 <stdlib.h>
-#include <rtl/strbuf.hxx>
-#include <tools/stream.hxx>
-#include "dxfgrprd.hxx"
-
-// we use an own ReadLine function, because Stream::ReadLine stops if
-// a 0-sign occurs; this function converts 0-signs to blanks and reads
-// a complete line until a cr/lf is found
-
-static OString DXFReadLine(SvStream& rIStm)
-{
- char buf[256 + 1];
- bool bEnd = false;
- sal_uInt64 nOldFilePos = rIStm.Tell();
- char c = 0;
-
- OStringBuffer aBuf(512);
-
- while( !bEnd && !rIStm.GetError() ) // !!! do not check for EOF
- // !!! because we read blockwise
- {
- sal_uInt16 nLen = static_cast<sal_uInt16>(rIStm.ReadBytes(buf, sizeof(buf)-1));
- if( !nLen )
- {
- if( aBuf.isEmpty() )
- return OString();
- else
- break;
- }
-
- for( sal_uInt16 n = 0; n < nLen ; n++ )
- {
- c = buf[n];
- if( c != '\n' && c != '\r' )
- {
- if( !c )
- c = ' ';
- aBuf.append(c);
- }
- else
- {
- bEnd = true;
- break;
- }
- }
- }
-
- if( !bEnd && !rIStm.GetError() && !aBuf.isEmpty() )
- bEnd = true;
-
- nOldFilePos += aBuf.getLength();
- if( rIStm.Tell() > nOldFilePos )
- nOldFilePos++;
- rIStm.Seek( nOldFilePos ); // seek because of BlockRead above!
-
- if( bEnd && (c=='\r' || c=='\n')) // special treatment of DOS files
- {
- char cTemp(0);
- rIStm.ReadBytes(&cTemp, 1);
- if( cTemp == c || (cTemp != '\n' && cTemp != '\r') )
- rIStm.Seek( nOldFilePos );
- }
-
- return aBuf.makeStringAndClear();
-}
-
-static void DXFSkipLine(SvStream& rIStm)
-{
- while (rIStm.good())
- {
- char buf[256 + 1];
- sal_uInt16 nLen = static_cast<sal_uInt16>(rIStm.ReadBytes(buf, sizeof(buf) - 1));
- for (sal_uInt16 n = 0; n < nLen; n++)
- {
- char c = buf[n];
- if ((c == '\n') || (c == '\r'))
- {
- rIStm.SeekRel(n-nLen+1); // return stream to next to current position
- char c1 = 0;
- rIStm.ReadBytes(&c1, 1);
- if (c1 == c || (c1 != '\n' && c1!= '\r'))
- rIStm.SeekRel(-1);
- return;
- }
- }
- }
-}
-
-DXFGroupReader::DXFGroupReader(SvStream & rIStream)
- : rIS(rIStream)
- , bStatus(true)
- , nLastG(0)
- , S()
- , I(0)
-{
- rIS.Seek(0);
-}
-
-sal_uInt16 DXFGroupReader::Read()
-{
- sal_uInt16 nG = 0;
- if ( bStatus )
- {
- nG = static_cast<sal_uInt16>(ReadI());
- if ( bStatus )
- {
- if (nG< 10) ReadS();
- else if (nG< 60) F = ReadF();
- else if (nG< 80) I = ReadI();
- else if (nG< 90) DXFSkipLine(rIS);
- else if (nG< 99) I = ReadI();
- else if (nG==100) ReadS();
- else if (nG==102) ReadS();
- else if (nG==105) DXFSkipLine(rIS);
- else if (nG< 140) DXFSkipLine(rIS);
- else if (nG< 148) F = ReadF();
- else if (nG< 170) DXFSkipLine(rIS);
- else if (nG< 176) I = ReadI();
- else if (nG< 180) DXFSkipLine(rIS); // ReadI();
- else if (nG< 210) DXFSkipLine(rIS);
- else if (nG< 240) F = ReadF();
- else if (nG<=369) DXFSkipLine(rIS);
- else if (nG< 999) DXFSkipLine(rIS);
- else if (nG<1010) ReadS();
- else if (nG<1060) F = ReadF();
- else if (nG<1072) I = ReadI();
- else bStatus = false;
- }
- }
- if ( !bStatus )
- {
- nG = 0;
- S = "EOF";
- }
- nLastG = nG;
- return nG;
-}
-
-tools::Long DXFGroupReader::ReadI()
-{
- OString s = DXFReadLine(rIS);
- char *p=s.pData->buffer;
- const char *end = s.pData->buffer + s.pData->length;
-
- while((p != end) && (*p==0x20)) p++;
-
- if ((p == end) || ((*p<'0' || *p>'9') && *p!='-')) {
- bStatus=false;
- return 0;
- }
-
- OStringBuffer aNumber;
- if (*p == '-') {
- aNumber.append(*p++);
- }
-
- while ((p != end) && *p >= '0' && *p <= '9') {
- aNumber.append(*p++);
- }
-
- while ((p != end) && (*p==0x20)) p++;
- if (p != end) {
- bStatus=false;
- return 0;
- }
-
- return aNumber.toString().toInt32();
-}
-
-double DXFGroupReader::ReadF()
-{
- OString s = DXFReadLine(rIS);
- char *p = s.pData->buffer;
- const char *end = s.pData->buffer + s.pData->length;
-
- while((p != end) && (*p==0x20)) p++;
- if ((p == end) || ((*p<'0' || *p>'9') && *p!='.' && *p!='-')) {
- bStatus=false;
- return 0.0;
- }
- return atof(p);
-}
-
-void DXFGroupReader::ReadS()
-{
- S = DXFReadLine(rIS);
-}
-
-sal_uInt64 DXFGroupReader::remainingSize() const
-{
- return rIS.remainingSize();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.hxx b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
deleted file mode 100644
index 4d20ae2bff0f..000000000000
--- a/filter/source/graphicfilter/idxf/dxfgrprd.hxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- 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 INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFGRPRD_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFGRPRD_HXX
-
-#include <rtl/string.hxx>
-#include <sal/types.h>
-#include <tools/long.hxx>
-
-class SvStream;
-
-class DXFGroupReader
-{
-public:
- explicit DXFGroupReader( SvStream & rIStream );
-
- bool GetStatus() const;
-
- void SetError();
-
- sal_uInt16 Read();
- // Reads next group and returns the group code.
- // In case of an error GetStatus() returns sal_False, group code will be set
- // to 0 and SetS(0,"EOF") will be executed.
- bool Read(sal_uInt16 nExpectedG) { return Read() == nExpectedG; }
-
- sal_uInt16 GetG() const;
- // Return the last group code (the one the last Read() did return).
-
- tools::Long GetI() const;
- // Returns the integer value of the group which was read earlier with Read().
- // This read must have returned a group code for datatype Integer.
- // If not 0 is returned
-
- double GetF() const;
- // Returns the floating point value of the group which was read earlier with Read().
- // This read must have returned a group code for datatype Floatingpoint.
- // If not 0 is returned
-
- const OString& GetS() const;
- // Returns the string of the group which was read earlier with Read().
- // This read must have returned a group code for datatype String.
- // If not NULL is returned
-
- sal_uInt64 remainingSize() const;
-private:
-
- tools::Long ReadI();
- double ReadF();
- void ReadS();
-
- SvStream & rIS;
- bool bStatus;
- sal_uInt16 nLastG;
-
- OString S;
- union {
- double F;
- tools::Long I;
- };
-};
-
-
-inline bool DXFGroupReader::GetStatus() const
-{
- return bStatus;
-}
-
-
-inline void DXFGroupReader::SetError()
-{
- bStatus=false;
-}
-
-inline sal_uInt16 DXFGroupReader::GetG() const
-{
- return nLastG;
-}
-
-inline tools::Long DXFGroupReader::GetI() const
-{
- return I;
-}
-
-inline double DXFGroupReader::GetF() const
-{
- return F;
-}
-
-inline const OString& DXFGroupReader::GetS() const
-{
- return S;
-}
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx
deleted file mode 100644
index 340f8fcb5e0a..000000000000
--- a/filter/source/graphicfilter/idxf/dxfreprd.cxx
+++ /dev/null
@@ -1,482 +0,0 @@
-/* -*- 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 "dxfreprd.hxx"
-#include <osl/nlsupport.h>
-#include <unotools/defaultencoding.hxx>
-#include <unotools/wincodepage.hxx>
-
-//------------------DXFBoundingBox--------------------------------------------
-
-
-void DXFBoundingBox::Union(const DXFVector & rVector)
-{
- if (bEmpty) {
- fMinX=rVector.fx;
- fMinY=rVector.fy;
- fMinZ=rVector.fz;
- fMaxX=rVector.fx;
- fMaxY=rVector.fy;
- fMaxZ=rVector.fz;
- bEmpty=false;
- }
- else {
- if (fMinX>rVector.fx) fMinX=rVector.fx;
- if (fMinY>rVector.fy) fMinY=rVector.fy;
- if (fMinZ>rVector.fz) fMinZ=rVector.fz;
- if (fMaxX<rVector.fx) fMaxX=rVector.fx;
- if (fMaxY<rVector.fy) fMaxY=rVector.fy;
- if (fMaxZ<rVector.fz) fMaxZ=rVector.fz;
- }
-}
-
-
-//------------------DXFPalette------------------------------------------------
-
-
-DXFPalette::DXFPalette()
-{
- short i,j,nHue,nNSat,nVal,nC[3],nmax,nmed,nmin;
- sal_uInt8 nV;
-
- // colors 0 - 9 (normal colors)
- SetColor(0, 0x00, 0x00, 0x00); // actually never being used
- SetColor(1, 0xff, 0x00, 0x00);
- SetColor(2, 0xff, 0xff, 0x00);
- SetColor(3, 0x00, 0xff, 0x00);
- SetColor(4, 0x00, 0xff, 0xff);
- SetColor(5, 0x00, 0x00, 0xff);
- SetColor(6, 0xff, 0x00, 0xff);
- SetColor(7, 0x0f, 0x0f, 0x0f); // actually white???
- SetColor(8, 0x80, 0x80, 0x80);
- SetColor(9, 0xc0, 0xc0, 0xc0);
-
- // colors 10 - 249
- // (Universal-Palette: 24 hues * 5 lightnesses * 2 saturations )
- i=10;
- for (nHue=0; nHue<24; nHue++) {
- for (nVal=5; nVal>=1; nVal--) {
- for (nNSat=0; nNSat<2; nNSat++) {
- nmax=((nHue+3)>>3)%3;
- j=nHue-(nmax<<3); if (j>4) j=j-24;
- if (j>=0) {
- nmed=(nmax+1)%3;
- nmin=(nmax+2)%3;
- }
- else {
- nmed=(nmax+2)%3;
- nmin=(nmax+1)%3;
- j=-j;
- }
- nC[nmin]=0;
- nC[nmed]=255*j/4;
- nC[nmax]=255;
- if (nNSat!=0) {
- for (j=0; j<3; j++) nC[j]=(nC[j]>>1)+128;
- }
- for (j=0; j<3; j++) nC[j]=nC[j]*nVal/5;
- SetColor(static_cast<sal_uInt8>(i++),static_cast<sal_uInt8>(nC[0]),static_cast<sal_uInt8>(nC[1]),static_cast<sal_uInt8>(nC[2]));
- }
- }
- }
-
- // Farben 250 - 255 (shades of gray)
- for (i=0; i<6; i++) {
- nV=static_cast<sal_uInt8>(i*38+65);
- SetColor(static_cast<sal_uInt8>(250+i),nV,nV,nV);
- }
-}
-
-
-DXFPalette::~DXFPalette()
-{
-}
-
-
-void DXFPalette::SetColor(sal_uInt8 nIndex, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
-{
- pRed[nIndex]=nRed;
- pGreen[nIndex]=nGreen;
- pBlue[nIndex]=nBlue;
-}
-
-
-//------------------DXFRepresentation-----------------------------------------
-
-
-DXFRepresentation::DXFRepresentation()
- : mEnc(RTL_TEXTENCODING_DONTKNOW)
- , mbInCalc(false)
-{
- setGlobalLineTypeScale(1.0);
-}
-
-DXFRepresentation::~DXFRepresentation()
-{
-}
-
-rtl_TextEncoding DXFRepresentation::getTextEncoding() const
-{
- return (isTextEncodingSet()) ?
- mEnc :
- osl_getTextEncodingFromLocale(nullptr); // Use default encoding if none specified
-}
-
-bool DXFRepresentation::Read( SvStream & rIStream )
-{
- bool bRes;
-
- aTables.Clear();
- aBlocks.Clear();
- aEntities.Clear();
-
- DXFGroupReader DGR( rIStream );
-
- DGR.Read();
- while (DGR.GetG()!=0 || (DGR.GetS() != "EOF")) {
- if (DGR.GetG()==0 && DGR.GetS() == "SECTION") {
- if (DGR.Read()!=2) {
- DGR.SetError();
- break;
- }
- if (DGR.GetS() == "HEADER") ReadHeader(DGR);
- else if (DGR.GetS() == "TABLES") aTables.Read(DGR);
- else if (DGR.GetS() == "BLOCKS") aBlocks.Read(DGR);
- else if (DGR.GetS() == "ENTITIES") aEntities.Read(DGR);
- else DGR.Read();
- }
- else DGR.Read();
- }
-
- bRes=DGR.GetStatus();
-
- if (bRes && aBoundingBox.bEmpty)
- CalcBoundingBox(aEntities,aBoundingBox);
-
- return bRes;
-}
-
-void DXFRepresentation::ReadHeader(DXFGroupReader & rDGR)
-{
- while (rDGR.GetG()!=0 || (rDGR.GetS() != "EOF" && rDGR.GetS() != "ENDSEC") )
- {
- if (rDGR.GetG()==9) {
- if (rDGR.GetS() == "$EXTMIN" ||
- rDGR.GetS() == "$EXTMAX")
- {
- DXFVector aVector;
- while (rDGR.Read()!=9 && rDGR.GetG()!=0) {
- switch (rDGR.GetG()) {
- case 10: aVector.fx = rDGR.GetF(); break;
- case 20: aVector.fy = rDGR.GetF(); break;
- case 30: aVector.fz = rDGR.GetF(); break;
- }
- }
- aBoundingBox.Union(aVector);
- }
- else if (rDGR.GetS() == "$ACADVER")
- {
- if (!rDGR.Read(1))
- continue;
- // Versions of AutoCAD up to Release 12 (inclusive, AC1009)
- // were DOS software and used OEM encoding for storing strings.
- // Release 13 (AC1012) had both DOS and Windows variants.
- // Its Windows variant, and later releases used ANSI encodings for
- // strings (up to version 2006, which was the last one to do so).
- // Later versions (2007+, AC1021+) use UTF-8 for that.
- // Other (non-Autodesk) implementations may have used different
- // encodings for storing to corresponding formats, but there's
- // no way to know that.
- // See http://autodesk.blogs.com/between_the_lines/autocad-release-history.html
- if ((rDGR.GetS() <= "AC1009") || (rDGR.GetS() == "AC2.22") || (rDGR.GetS() == "AC2.21") || (rDGR.GetS() == "AC2.10") ||
- (rDGR.GetS() == "AC1.50") || (rDGR.GetS() == "AC1.40") || (rDGR.GetS() == "AC1.2") || (rDGR.GetS() == "MC0.0"))
- {
- // Set OEM encoding for old DOS formats
- // only if the encoding is not set yet
- // e.g. by previous $DWGCODEPAGE
- if (!isTextEncodingSet())
- setTextEncoding(utl_getWinTextEncodingFromLangStr(
- utl_getLocaleForGlobalDefaultEncoding(), true));
- }
- else if (rDGR.GetS() >= "AC1021")
- setTextEncoding(RTL_TEXTENCODING_UTF8);
- else
- {
- // Set ANSI encoding for old Windows formats
- // only if the encoding is not set yet
- // e.g. by previous $DWGCODEPAGE
- if (!isTextEncodingSet())
- setTextEncoding(utl_getWinTextEncodingFromLangStr(
- utl_getLocaleForGlobalDefaultEncoding()));
- }
- }
- else if (rDGR.GetS() == "$DWGCODEPAGE")
- {
- if (!rDGR.Read(3))
- continue;
-
- // If we already use UTF8, then don't update encoding anymore
- if (mEnc == RTL_TEXTENCODING_UTF8)
- continue;
- // FIXME: we really need a whole table of
- // $DWGCODEPAGE to encodings mappings
- else if ( (rDGR.GetS().equalsIgnoreAsciiCase("ANSI_932")) ||
- (rDGR.GetS().equalsIgnoreAsciiCase("DOS932")) )
- {
- setTextEncoding(RTL_TEXTENCODING_MS_932);
- }
- else if (rDGR.GetS().equalsIgnoreAsciiCase("ANSI_936"))
- {
- setTextEncoding(RTL_TEXTENCODING_MS_936);
- }
- else if (rDGR.GetS().equalsIgnoreAsciiCase("ANSI_949"))
- {
- setTextEncoding(RTL_TEXTENCODING_MS_949);
- }
- else if (rDGR.GetS().equalsIgnoreAsciiCase("ANSI_950"))
- {
- setTextEncoding(RTL_TEXTENCODING_MS_950);
- }
- else if (rDGR.GetS().equalsIgnoreAsciiCase("ANSI_1251"))
- {
- setTextEncoding(RTL_TEXTENCODING_MS_1251);
- }
- }
- else if (rDGR.GetS() == "$LTSCALE")
- {
- if (!rDGR.Read(40))
- continue;
- setGlobalLineTypeScale(getGlobalLineTypeScale() * rDGR.GetF());
- }
- else rDGR.Read();
- }
- else rDGR.Read();
- }
-}
-
-void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
- DXFBoundingBox & rBox)
-{
- if (mbInCalc)
- return;
- mbInCalc = true;
-
- DXFBasicEntity * pBE=rEntities.pFirst;
- while (pBE!=nullptr) {
- switch (pBE->eType) {
- case DXF_LINE: {
- const DXFLineEntity * pE = static_cast<const DXFLineEntity*>(pBE);
- rBox.Union(pE->aP0);
- rBox.Union(pE->aP1);
- break;
- }
- case DXF_POINT: {
- const DXFPointEntity * pE = static_cast<const DXFPointEntity*>(pBE);
- rBox.Union(pE->aP0);
- break;
- }
- case DXF_CIRCLE: {
- const DXFCircleEntity * pE = static_cast<const DXFCircleEntity*>(pBE);
- DXFVector aP;
- aP=pE->aP0;
- aP.fx-=pE->fRadius;
- aP.fy-=pE->fRadius;
- rBox.Union(aP);
- aP=pE->aP0;
- aP.fx+=pE->fRadius;
- aP.fy+=pE->fRadius;
- rBox.Union(aP);
- break;
- }
- case DXF_ARC: {
- const DXFArcEntity * pE = static_cast<const DXFArcEntity*>(pBE);
- DXFVector aP;
- aP=pE->aP0;
- aP.fx-=pE->fRadius;
- aP.fy-=pE->fRadius;
- rBox.Union(aP);
- aP=pE->aP0;
- aP.fx+=pE->fRadius;
- aP.fy+=pE->fRadius;
- rBox.Union(aP);
- break;
- }
- case DXF_TRACE: {
- const DXFTraceEntity * pE = static_cast<const DXFTraceEntity*>(pBE);
- rBox.Union(pE->aP0);
- rBox.Union(pE->aP1);
- rBox.Union(pE->aP2);
- rBox.Union(pE->aP3);
- break;
- }
- case DXF_SOLID: {
- const DXFSolidEntity * pE = static_cast<const DXFSolidEntity*>(pBE);
- rBox.Union(pE->aP0);
- rBox.Union(pE->aP1);
- rBox.Union(pE->aP2);
- rBox.Union(pE->aP3);
- break;
- }
- case DXF_TEXT: {
- //const DXFTextEntity * pE = (DXFTextEntity*)pBE;
- //???
- break;
- }
- case DXF_SHAPE: {
- //const DXFShapeEntity * pE = (DXFShapeEntity*)pBE;
- //???
- break;
- }
- case DXF_INSERT: {
- const DXFInsertEntity * pE = static_cast<const DXFInsertEntity*>(pBE);
- DXFBlock * pB;
- DXFBoundingBox aBox;
- DXFVector aP;
- pB=aBlocks.Search(pE->m_sName);
- if (pB==nullptr) break;
- CalcBoundingBox(*pB,aBox);
- if (aBox.bEmpty) break;
- aP.fx=(aBox.fMinX-pB->aBasePoint.fx)*pE->fXScale+pE->aP0.fx;
- aP.fy=(aBox.fMinY-pB->aBasePoint.fy)*pE->fYScale+pE->aP0.fy;
- aP.fz=(aBox.fMinZ-pB->aBasePoint.fz)*pE->fZScale+pE->aP0.fz;
- rBox.Union(aP);
- aP.fx=(aBox.fMaxX-pB->aBasePoint.fx)*pE->fXScale+pE->aP0.fx;
- aP.fy=(aBox.fMaxY-pB->aBasePoint.fy)*pE->fYScale+pE->aP0.fy;
- aP.fz=(aBox.fMaxZ-pB->aBasePoint.fz)*pE->fZScale+pE->aP0.fz;
- rBox.Union(aP);
- break;
- }
- case DXF_ATTDEF: {
- //const DXFAttDefEntity * pE = (DXFAttDefEntity*)pBE;
- //???
- break;
- }
- case DXF_ATTRIB: {
- //const DXFAttribEntity * pE = (DXFAttribEntity*)pBE;
- //???
- break;
- }
- case DXF_VERTEX: {
- const DXFVertexEntity * pE = static_cast<const DXFVertexEntity*>(pBE);
- rBox.Union(pE->aP0);
- break;
- }
- case DXF_3DFACE: {
- const DXF3DFaceEntity * pE = static_cast<const DXF3DFaceEntity*>(pBE);
- rBox.Union(pE->aP0);
- rBox.Union(pE->aP1);
- rBox.Union(pE->aP2);
- rBox.Union(pE->aP3);
- break;
- }
- case DXF_DIMENSION: {
- const DXFDimensionEntity * pE = static_cast<const DXFDimensionEntity*>(pBE);
- DXFBlock * pB;
- DXFBoundingBox aBox;
- DXFVector aP;
- pB = aBlocks.Search(pE->m_sPseudoBlock);
- if (pB==nullptr) break;
- CalcBoundingBox(*pB,aBox);
- if (aBox.bEmpty) break;
- aP.fx=aBox.fMinX-pB->aBasePoint.fx;
- aP.fy=aBox.fMinY-pB->aBasePoint.fy;
- aP.fz=aBox.fMinZ-pB->aBasePoint.fz;
- rBox.Union(aP);
- aP.fx=aBox.fMaxX-pB->aBasePoint.fx;
- aP.fy=aBox.fMaxY-pB->aBasePoint.fy;
- aP.fz=aBox.fMaxZ-pB->aBasePoint.fz;
- rBox.Union(aP);
- break;
- }
- case DXF_POLYLINE: {
- //const DXFAttribEntity * pE = (DXFAttribEntity*)pBE;
- //???
- break;
- }
- case DXF_SEQEND: {
- //const DXFAttribEntity * pE = (DXFAttribEntity*)pBE;
- //???
- break;
- }
- case DXF_HATCH :
- break;
- case DXF_LWPOLYLINE :
- break;
- }
- pBE=pBE->pSucc;
- }
- mbInCalc = false;
-}
-
-namespace {
- bool lcl_isDec(sal_Unicode ch)
- {
- return ch >= L'0' && ch <= L'9';
- }
- bool lcl_isHex(sal_Unicode ch)
- {
- return lcl_isDec(ch) || (ch >= L'A' && ch <= L'F') || (ch >= L'a' && ch <= L'f');
- }
-}
-
-OUString DXFRepresentation::ToOUString(std::string_view s) const
-{
- OUString result = OStringToOUString(s, getTextEncoding(),
- RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
- | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
- | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR);
- result = result.replaceAll("%%o", "") // Overscore - simply remove
- .replaceAll("%%u", "") // Underscore - simply remove
- .replaceAll("%%d", u"\u00B0") // Degrees symbol (°)
- .replaceAll("%%p", u"\u00B1") // Tolerance symbol (±)
- .replaceAll("%%c", u"\u2205") // Diameter symbol
- .replaceAll("%%%", "%"); // Percent symbol
-
- sal_Int32 pos = result.indexOf("%%"); // %%nnn, where nnn - 3-digit decimal ASCII code
- while (pos != -1 && pos <= result.getLength() - 5) {
- OUString asciiNum = result.copy(pos + 2, 3);
- if (lcl_isDec(asciiNum[0]) &&
- lcl_isDec(asciiNum[1]) &&
- lcl_isDec(asciiNum[2]))
- {
- char ch = static_cast<char>(asciiNum.toUInt32());
- OUString codePt(&ch, 1, mEnc);
- result = result.replaceAll(result.subView(pos, 5), codePt, pos);
- }
- pos = result.indexOf("%%", pos + 1);
- }
-
- pos = result.indexOf("\\U+"); // \U+XXXX, where XXXX - 4-digit hex unicode
- while (pos != -1 && pos <= result.getLength() - 7) {
- OUString codePtNum = result.copy(pos + 3, 4);
- if (lcl_isHex(codePtNum[0]) &&
- lcl_isHex(codePtNum[1]) &&
- lcl_isHex(codePtNum[2]) &&
- lcl_isHex(codePtNum[3]))
- {
- OUString codePt(static_cast<sal_Unicode>(codePtNum.toUInt32(16)));
- result = result.replaceAll(result.subView(pos, 7), codePt, pos);
- }
- pos = result.indexOf("\\U+", pos + 1);
- }
- return result;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.hxx b/filter/source/graphicfilter/idxf/dxfreprd.hxx
deleted file mode 100644
index 99745343ff7f..000000000000
--- a/filter/source/graphicfilter/idxf/dxfreprd.hxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- 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 INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFREPRD_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFREPRD_HXX
-
-#include "dxfblkrd.hxx"
-#include "dxftblrd.hxx"
-#include <array>
-#include <string_view>
-
-//--------------------Other stuff---------------------------------------------
-
-
-//-------------------A 3D-Min/Max-Box-----------------------------------------
-
-class DXFBoundingBox {
-public:
- bool bEmpty;
- double fMinX;
- double fMinY;
- double fMinZ;
- double fMaxX;
- double fMaxY;
- double fMaxZ;
-
- DXFBoundingBox():bEmpty(true), fMinX(0.0), fMinY(0.0), fMinZ(0.0), fMaxX(0.0), fMaxY(0.0), fMaxZ(0.0) {}
- void Union(const DXFVector & rVector);
-};
-
-
-//-------------------The (constant) palette for DXF-------------------------
-
-class DXFPalette {
-
-public:
-
- DXFPalette();
- ~DXFPalette();
-
- sal_uInt8 GetRed(sal_uInt8 nIndex) const;
- sal_uInt8 GetGreen(sal_uInt8 nIndex) const;
- sal_uInt8 GetBlue(sal_uInt8 nIndex) const;
-
-private:
- std::array<sal_uInt8, 256> pRed;
- std::array<sal_uInt8, 256> pGreen;
- std::array<sal_uInt8, 256> pBlue;
- void SetColor(sal_uInt8 nIndex, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue);
-};
-
-
-//-----------------read and represent DXF file--------------------------------
-
-
-class DXFRepresentation {
-
-public:
-
- DXFPalette aPalette;
- // The always equal DXF color palette
-
- DXFBoundingBox aBoundingBox;
- // is equal to the AutoCAD variables EXTMIN, EXTMAX if those exist
- // within the DXF file. Otherwise the BoundingBox gets calculated (in Read())
-
- DXFTables aTables;
- // the tables of the DXF file
-
- DXFBlocks aBlocks;
- // the blocks of the DXF file
-
- DXFEntities aEntities;
- // the entities (from the Entities-Section) of the DXF file
-
- rtl_TextEncoding mEnc; // $DWGCODEPAGE
-
- double mfGlobalLineTypeScale; // $LTSCALE
-
- bool mbInCalc; // guard for self-recursive bounding box calc
-
- DXFRepresentation();
- ~DXFRepresentation();
-
- rtl_TextEncoding getTextEncoding() const;
- void setTextEncoding(rtl_TextEncoding aEnc) { mEnc = aEnc; }
- OUString ToOUString(std::string_view s) const;
-
- double getGlobalLineTypeScale() const { return mfGlobalLineTypeScale; }
- void setGlobalLineTypeScale(double fGlobalLineTypeScale) { mfGlobalLineTypeScale = fGlobalLineTypeScale; }
-
- bool Read( SvStream & rIStream );
- // Reads complete DXF file.
-
-private:
- void ReadHeader(DXFGroupReader & rDGR);
- void CalcBoundingBox(const DXFEntities & rEntities,
- DXFBoundingBox & rBox);
-
- bool isTextEncodingSet() const { return mEnc != RTL_TEXTENCODING_DONTKNOW; }
-};
-
-
-//-------------------inlines--------------------------------------------------
-
-
-inline sal_uInt8 DXFPalette::GetRed(sal_uInt8 nIndex) const { return pRed[nIndex]; }
-inline sal_uInt8 DXFPalette::GetGreen(sal_uInt8 nIndex) const { return pGreen[nIndex]; }
-inline sal_uInt8 DXFPalette::GetBlue(sal_uInt8 nIndex) const { return pBlue[nIndex]; }
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxftblrd.cxx b/filter/source/graphicfilter/idxf/dxftblrd.cxx
deleted file mode 100644
index 5077b687bed8..000000000000
--- a/filter/source/graphicfilter/idxf/dxftblrd.cxx
+++ /dev/null
@@ -1,380 +0,0 @@
-/* -*- 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 "dxftblrd.hxx"
-
-//----------------------------------DXFLType-----------------------------------
-
-DXFLType::DXFLType()
- : pSucc(nullptr)
- , nFlags(0)
- , nDashCount(0)
- , fPatternLength(0.0)
-{
-}
-
-void DXFLType::Read(DXFGroupReader & rDGR)
-{
- tools::Long nDashIndex=-1;
-
- while (rDGR.Read()!=0)
- {
- switch (rDGR.GetG())
- {
- case 2:
- m_sName = rDGR.GetS();
- break;
- case 3:
- m_sDescription = rDGR.GetS();
- break;
- case 70:
- nFlags=rDGR.GetI();
- break;
- case 73:
- if (nDashIndex!=-1)
- {
- rDGR.SetError();
- return;
- }
- nDashCount=rDGR.GetI();
- if (nDashCount>DXF_MAX_DASH_COUNT)
- {
- nDashCount=DXF_MAX_DASH_COUNT;
- }
- nDashIndex=0;
- break;
- case 40: fPatternLength=rDGR.GetF(); break;
- case 49:
- if (nDashCount==-1)
- {
- rDGR.SetError();
- return;
- }
- if (nDashIndex < nDashCount)
- {
- if (nDashIndex < 0)
- {
- rDGR.SetError();
- return;
- }
- fDash[nDashIndex++] = rDGR.GetF();
- }
- break;
- }
- }
-}
-
-//----------------------------------DXFLayer-----------------------------------
-
-DXFLayer::DXFLayer()
-{
- pSucc=nullptr;
- nFlags=0;
- nColor=-1;
-}
-
-void DXFLayer::Read(DXFGroupReader & rDGR)
-{
- while (rDGR.Read()!=0)
- {
- switch(rDGR.GetG())
- {
- case 2:
- m_sName = rDGR.GetS();
- break;
- case 6:
- m_sLineType = rDGR.GetS();
- break;
- case 70:
- nFlags=rDGR.GetI();
- break;
- case 62:
- nColor=rDGR.GetI();
- break;
- }
- }
-}
-
-//----------------------------------DXFStyle-----------------------------------
-
-DXFStyle::DXFStyle()
-{
- pSucc=nullptr;
- nFlags=0;
- fHeight=0.0;
- fWidthFak=1.0;
- fOblAngle=0.0;
- nTextGenFlags=0;
- fLastHeightUsed=0.0;
-}
-
-void DXFStyle::Read(DXFGroupReader & rDGR)
-{
- while (rDGR.Read()!=0)
- {
- switch(rDGR.GetG())
- {
- case 2:
- m_sName = rDGR.GetS();
- break;
- case 3:
- m_sPrimFontFile = rDGR.GetS();
- break;
- case 4:
- m_sBigFontFile = rDGR.GetS();
- break;
- case 70:
- nFlags=rDGR.GetI();
- break;
- case 40:
- fHeight=rDGR.GetF();
- break;
- case 41:
- fWidthFak=rDGR.GetF();
- break;
- case 42:
- fLastHeightUsed=rDGR.GetF();
- break;
- case 50:
- fOblAngle=rDGR.GetF();
- break;
- case 71:
- nTextGenFlags=rDGR.GetI();
- break;
- }
- }
-}
-
-//----------------------------------DXFVPort-----------------------------------
-
-DXFVPort::DXFVPort()
- : pSucc(nullptr)
- , nFlags(0)
- , fMinX(0.0)
- , fMinY(0.0)
- , fMaxX(0.0)
- , fMaxY(0.0)
- , fCenterX(0.0)
- , fCenterY(0.0)
- , fSnapBaseX(0.0)
- , fSnapBaseY(0.0)
- , fSnapSpacingX(0.0)
- , fSnapSpacingY(0.0)
- , fGridX(0.0)
- , fGridY(0.0)
- , aDirection(DXFVector(0.0, 0.0, 1.0))
- , fHeight(0.0)
- , fAspectRatio(0.0)
- , fLensLength(0.0)
- , fFrontClipPlane(0.0)
- , fBackClipPlane(0.0)
- , fTwistAngle(0.0)
- , nStatus(0)
- , nID(0)
- , nMode(0)
- , nCircleZoomPercent(0)
- , nFastZoom(0)
- , nUCSICON(0)
- , nSnap(0)
- , nGrid(0)
- , nSnapStyle(0)
- , nSnapIsopair(0)
-{
-}
-
-void DXFVPort::Read(DXFGroupReader & rDGR)
-{
- while (rDGR.Read()!=0)
- {
- switch(rDGR.GetG())
- {
- case 2:
- m_sName = rDGR.GetS();
- break;
- case 10: fMinX=rDGR.GetF(); break;
- case 11: fMaxX=rDGR.GetF(); break;
- case 12: fCenterX=rDGR.GetF(); break;
- case 13: fSnapBaseX=rDGR.GetF(); break;
- case 14: fSnapSpacingX=rDGR.GetF(); break;
- case 15: fGridX=rDGR.GetF(); break;
- case 16: aDirection.fx=rDGR.GetF(); break;
- case 17: aTarget.fx=rDGR.GetF(); break;
- case 20: fMinY=rDGR.GetF(); break;
- case 21: fMaxY=rDGR.GetF(); break;
- case 22: fCenterY=rDGR.GetF(); break;
- case 23: fSnapBaseY=rDGR.GetF(); break;
- case 24: fSnapSpacingY=rDGR.GetF(); break;
- case 25: fGridY=rDGR.GetF(); break;
- case 26: aDirection.fy=rDGR.GetF(); break;
- case 27: aTarget.fy=rDGR.GetF(); break;
- case 36: aDirection.fz=rDGR.GetF(); break;
- case 37: aTarget.fz=rDGR.GetF(); break;
- case 40: fHeight=rDGR.GetF(); break;
- case 41: fAspectRatio=rDGR.GetF(); break;
- case 42: fLensLength=rDGR.GetF(); break;
- case 43: fFrontClipPlane=rDGR.GetF(); break;
- case 44: fBackClipPlane=rDGR.GetF(); break;
- case 51: fTwistAngle=rDGR.GetF(); break;
- case 68: nStatus=rDGR.GetI(); break;
- case 69: nID=rDGR.GetI(); break;
- case 70: nFlags=rDGR.GetI(); break;
- case 71: nMode=rDGR.GetI(); break;
- case 72: nCircleZoomPercent=rDGR.GetI(); break;
- case 73: nFastZoom=rDGR.GetI(); break;
- case 74: nUCSICON=rDGR.GetI(); break;
- case 75: nSnap=rDGR.GetI(); break;
- case 76: nGrid=rDGR.GetI(); break;
- case 77: nSnapStyle=rDGR.GetI(); break;
- case 78: nSnapIsopair=rDGR.GetI(); break;
- }
- }
-}
-
-//----------------------------------DXFTables----------------------------------
-
-
-DXFTables::DXFTables()
-{
- pLTypes=nullptr;
- pLayers=nullptr;
- pStyles=nullptr;
- pVPorts=nullptr;
-}
-
-
-DXFTables::~DXFTables()
-{
- Clear();
-}
-
-
-void DXFTables::Read(DXFGroupReader & rDGR)
-{
- DXFLType * * ppLT, * pLT;
- DXFLayer * * ppLa, * pLa;
- DXFStyle * * ppSt, * pSt;
- DXFVPort * * ppVP, * pVP;
-
- ppLT=&pLTypes;
- while(*ppLT!=nullptr) ppLT=&((*ppLT)->pSucc);
-
- ppLa=&pLayers;
- while(*ppLa!=nullptr) ppLa=&((*ppLa)->pSucc);
-
- ppSt=&pStyles;
- while(*ppSt!=nullptr) ppSt=&((*ppSt)->pSucc);
-
- ppVP=&pVPorts;
- while(*ppVP!=nullptr) ppVP=&((*ppVP)->pSucc);
-
- for (;;) {
- while (rDGR.GetG()!=0) rDGR.Read();
- if (rDGR.GetS() == "EOF" ||
- rDGR.GetS() == "ENDSEC") break;
- else if (rDGR.GetS() == "LTYPE") {
- pLT=new DXFLType;
- pLT->Read(rDGR);
- *ppLT=pLT;
- ppLT=&(pLT->pSucc);
- }
- else if (rDGR.GetS() == "LAYER") {
- pLa=new DXFLayer;
- pLa->Read(rDGR);
- *ppLa=pLa;
- ppLa=&(pLa->pSucc);
- }
- else if (rDGR.GetS() == "STYLE") {
- pSt=new DXFStyle;
- pSt->Read(rDGR);
- *ppSt=pSt;
- ppSt=&(pSt->pSucc);
- }
- else if (rDGR.GetS() == "VPORT") {
- pVP=new DXFVPort;
- pVP->Read(rDGR);
- *ppVP=pVP;
- ppVP=&(pVP->pSucc);
- }
- else rDGR.Read();
- }
-}
-
-
-void DXFTables::Clear()
-{
- DXFLType * pLT;
- DXFLayer * pLa;
- DXFStyle * pSt;
- DXFVPort * pVP;
-
- while (pStyles!=nullptr) {
- pSt=pStyles;
- pStyles=pSt->pSucc;
- delete pSt;
- }
- while (pLayers!=nullptr) {
- pLa=pLayers;
- pLayers=pLa->pSucc;
- delete pLa;
- }
- while (pLTypes!=nullptr) {
- pLT=pLTypes;
- pLTypes=pLT->pSucc;
- delete pLT;
- }
- while (pVPorts!=nullptr) {
- pVP=pVPorts;
- pVPorts=pVP->pSucc;
- delete pVP;
- }
-}
-
-
-DXFLType * DXFTables::SearchLType(std::string_view rName) const
-{
- DXFLType * p;
- for (p=pLTypes; p!=nullptr; p=p->pSucc) {
- if (rName == p->m_sName) break;
- }
- return p;
-}
-
-
-DXFLayer * DXFTables::SearchLayer(std::string_view rName) const
-{
- DXFLayer * p;
- for (p=pLayers; p!=nullptr; p=p->pSucc) {
- if (rName == p->m_sName) break;
- }
- return p;
-}
-
-
-DXFVPort * DXFTables::SearchVPort(std::string_view rName) const
-{
- DXFVPort * p;
- for (p=pVPorts; p!=nullptr; p=p->pSucc) {
- if (rName == p->m_sName) break;
- }
- return p;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxftblrd.hxx b/filter/source/graphicfilter/idxf/dxftblrd.hxx
deleted file mode 100644
index f60c0461e2a7..000000000000
--- a/filter/source/graphicfilter/idxf/dxftblrd.hxx
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- 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 INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFTBLRD_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFTBLRD_HXX
-
-#include <sal/config.h>
-
-#include <string_view>
-
-#include "dxfgrprd.hxx"
-#include "dxfvec.hxx"
-
-
-//------------------- Line Type ----------------------------------------------
-
-
-#define DXF_MAX_DASH_COUNT 32
-
-class DXFLType {
-
-public:
-
- DXFLType * pSucc;
-
- OString m_sName; // 2
- tools::Long nFlags; // 70
- OString m_sDescription; // 3
- tools::Long nDashCount; // 73
- double fPatternLength; // 40
- double fDash[DXF_MAX_DASH_COUNT]; // 49,49,...
-
- DXFLType();
- void Read(DXFGroupReader & rDGR);
-};
-
-
-//------------------ Layer ---------------------------------------------------
-
-
-class DXFLayer {
-
-public:
-
- DXFLayer * pSucc;
-
- OString m_sName; // 2
- tools::Long nFlags; // 70
- tools::Long nColor; // 62
- OString m_sLineType; // 6
-
- DXFLayer();
- void Read(DXFGroupReader & rDGR);
-};
-
-
-//------------------ Style ---------------------------------------------------
-
-
-class DXFStyle {
-
-public:
-
- DXFStyle * pSucc;
-
- OString m_sName; // 2
- tools::Long nFlags; // 70
- double fHeight; // 40
- double fWidthFak; // 41
- double fOblAngle; // 50
- tools::Long nTextGenFlags; // 71
- double fLastHeightUsed; // 42
- OString m_sPrimFontFile; // 3
- OString m_sBigFontFile; // 4
-
- DXFStyle();
- void Read(DXFGroupReader & rDGR);
-};
-
-
-//------------------ VPort ---------------------------------------------------
-
-
-class DXFVPort {
-
-public:
-
- DXFVPort * pSucc;
-
- OString m_sName; // 2
- tools::Long nFlags; // 70
- double fMinX; // 10
- double fMinY; // 20
- double fMaxX; // 11
- double fMaxY; // 21
- double fCenterX; // 12
- double fCenterY; // 22
- double fSnapBaseX; // 13
- double fSnapBaseY; // 23
- double fSnapSpacingX; // 14
- double fSnapSpacingY; // 24
- double fGridX; // 15
- double fGridY; // 25
- DXFVector aDirection; // 16,26,36
- DXFVector aTarget; // 17,27,37
- double fHeight; // 40
- double fAspectRatio; // 41
- double fLensLength; // 42
- double fFrontClipPlane; // 43
- double fBackClipPlane; // 44
- double fTwistAngle; // 51
- tools::Long nStatus; // 68
- tools::Long nID; // 69
- tools::Long nMode; // 71
- tools::Long nCircleZoomPercent; // 72
- tools::Long nFastZoom; // 73
- tools::Long nUCSICON; // 74
- tools::Long nSnap; // 75
- tools::Long nGrid; // 76
- tools::Long nSnapStyle; // 77
- tools::Long nSnapIsopair; // 78
-
- DXFVPort();
- void Read(DXFGroupReader & rDGR);
-};
-
-
-//------------------ Tables --------------------------------------------------
-
-
-class DXFTables {
-
- DXFLType * pLTypes; // list of line types
- DXFLayer * pLayers; // list of layers
- DXFStyle * pStyles; // list of styles
- DXFVPort * pVPorts; // list of viewports
-
-public:
-
- DXFTables();
- ~DXFTables();
-
- void Read(DXFGroupReader & rDGR);
- // Reads the table until an ENDSEC or EOF
- // (Unknown things/tables will be skipped)
-
- void Clear();
-
- // look for table entries:
- DXFLType * SearchLType(std::string_view rName) const;
- DXFLayer * SearchLayer(std::string_view rName) const;
- DXFVPort * SearchVPort(std::string_view rName) const;
-
-};
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfvec.cxx b/filter/source/graphicfilter/idxf/dxfvec.cxx
deleted file mode 100644
index fb1ff647d591..000000000000
--- a/filter/source/graphicfilter/idxf/dxfvec.cxx
+++ /dev/null
@@ -1,234 +0,0 @@
-/* -*- 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 <math.h>
-#include "dxfvec.hxx"
-#include <tools/gen.hxx>
-
-
-//---------------------------- DXFVector ---------------------------------------
-
-
-double DXFVector::Abs() const
-{
- return sqrt(SProd(*this));
-}
-
-
-DXFVector DXFVector::Unit() const
-{
- double flen;
-
- flen=Abs();
- if (flen!=0) return (*this)*(1.0/flen);
- else return DXFVector(1.0,0.0,0.0);
-}
-
-
-//---------------------------- DXFTransform ------------------------------------
-
-
-DXFTransform::DXFTransform() :
- aMX(1.0, 0.0, 0.0),
- aMY(0.0, 1.0, 0.0),
- aMZ(0.0, 0.0, 1.0),
- aMP(0.0, 0.0, 0.0)
-{
-}
-
-
-DXFTransform::DXFTransform(double fScaleX, double fScaleY, double fScaleZ,
- const DXFVector & rShift) :
- aMX(fScaleX, 0.0, 0.0),
- aMY(0.0, fScaleY, 0.0),
- aMZ(0.0, 0.0, fScaleZ),
- aMP(rShift)
-{
-}
-
-
-DXFTransform::DXFTransform(double fScaleX, double fScaleY, double fScaleZ,
- double fRotAngle,
- const DXFVector & rShift) :
- aMX(0.0, 0.0, 0.0),
- aMY(0.0, 0.0, 0.0),
- aMZ(0.0, 0.0, fScaleZ),
- aMP(rShift)
-{
- aMX.fx=cos(3.14159265359/180.0*fRotAngle);
- aMX.fy=sin(3.14159265359/180.0*fRotAngle);
- aMY.fx=-aMX.fy;
- aMY.fy=aMX.fx;
- aMX*=fScaleX;
- aMY*=fScaleY;
-}
-
-
-DXFTransform::DXFTransform(const DXFVector & rExtrusion) :
- aMX(), aMY(), aMZ(), aMP(0.0, 0.0, 0.0)
-{
- // 'Arbitrary Axis Algorithm' (cf. DXF documentation by Autodesk)
- if ( fabs(rExtrusion.fx) < 1.0/64.0 && fabs(rExtrusion.fy) < 1.0/64.0) {
- aMX = DXFVector(0.0, 1.0, 0.0) * rExtrusion;
- }
- else {
- aMX = DXFVector(0.0, 0.0, 1.0) * rExtrusion;
- }
- aMX=aMX.Unit();
- aMY=(rExtrusion*aMX).Unit();
- aMZ=rExtrusion.Unit();
-}
-
-
-DXFTransform::DXFTransform(const DXFVector & rViewDir, const DXFVector & rViewTarget) :
- aMX(), aMY(), aMZ(), aMP()
-{
- DXFVector aV;
-
- aV=rViewDir.Unit();
- aMX.fz=aV.fx;
- aMY.fz=aV.fy;
- aMZ.fz=aV.fz;
-
- aMZ.fx=0;
- if (aV.fx==0) aMY.fx=0; else aMY.fx=sqrt(1/(1+aV.fy*aV.fy/(aV.fx*aV.fx)));
- aMX.fx=sqrt(1-aMY.fx*aMY.fx);
- if (aV.fx*aV.fy*aMY.fx>0) aMX.fx=-aMX.fx;
-
- aV=aV*DXFVector(aMX.fx,aMY.fx,aMZ.fx);
- aMX.fy=aV.fx;
- aMY.fy=aV.fy;
- aMZ.fy=aV.fz;
-
- if (aMZ.fy<0) {
- aMX.fy=-aMX.fy;
- aMY.fy=-aMY.fy;
- aMZ.fy=-aMZ.fy;
- aMX.fx=-aMX.fx;
- aMY.fx=-aMY.fx;
- }
-
- aV=DXFVector(0,0,0)-rViewTarget;
- aMP.fx = aV.fx * aMX.fx + aV.fy * aMY.fx + aV.fz * aMZ.fx;
- aMP.fy = aV.fx * aMX.fy + aV.fy * aMY.fy + aV.fz * aMZ.fy;
- aMP.fz = aV.fx * aMX.fz + aV.fy * aMY.fz + aV.fz * aMZ.fz;
-}
-
-
-DXFTransform::DXFTransform(const DXFTransform & rT1, const DXFTransform & rT2) :
- aMX(),aMY(),aMZ(),aMP()
-{
- rT2.TransDir(rT1.aMX,aMX);
- rT2.TransDir(rT1.aMY,aMY);
- rT2.TransDir(rT1.aMZ,aMZ);
- rT2.Transform(rT1.aMP,aMP);
-}
-
-
-void DXFTransform::Transform(const DXFVector & rSrc, DXFVector & rTgt) const
-{
- rTgt.fx = rSrc.fx * aMX.fx + rSrc.fy * aMY.fx + rSrc.fz * aMZ.fx + aMP.fx;
- rTgt.fy = rSrc.fx * aMX.fy + rSrc.fy * aMY.fy + rSrc.fz * aMZ.fy + aMP.fy;
- rTgt.fz = rSrc.fx * aMX.fz + rSrc.fy * aMY.fz + rSrc.fz * aMZ.fz + aMP.fz;
-}
-
-
-void DXFTransform::Transform(const DXFVector & rSrc, Point & rTgt) const
-{
- rTgt.setX(static_cast<tools::Long>( rSrc.fx * aMX.fx + rSrc.fy * aMY.fx + rSrc.fz * aMZ.fx + aMP.fx + 0.5 ) );
- rTgt.setY(static_cast<tools::Long>( rSrc.fx * aMX.fy + rSrc.fy * aMY.fy + rSrc.fz * aMZ.fy + aMP.fy + 0.5 ) );
-}
-
-
-void DXFTransform::TransDir(const DXFVector & rSrc, DXFVector & rTgt) const
-{
- rTgt.fx = rSrc.fx * aMX.fx + rSrc.fy * aMY.fx + rSrc.fz * aMZ.fx;
- rTgt.fy = rSrc.fx * aMX.fy + rSrc.fy * aMY.fy + rSrc.fz * aMZ.fy;
- rTgt.fz = rSrc.fx * aMX.fz + rSrc.fy * aMY.fz + rSrc.fz * aMZ.fz;
-}
-
-
-bool DXFTransform::TransCircleToEllipse(double fRadius, double & rEx, double & rEy) const
-{
- double fMXAbs=aMX.Abs();
- double fMYAbs=aMY.Abs();
- double fNearNull=(fMXAbs+fMYAbs)*0.001;
-
- if (fabs(aMX.fy)<=fNearNull && fabs(aMX.fz)<=fNearNull &&
- fabs(aMY.fx)<=fNearNull && fabs(aMY.fz)<=fNearNull)
- {
- rEx=fabs(aMX.fx*fRadius);
- rEy=fabs(aMY.fy*fRadius);
- return true;
- }
- else if (fabs(aMX.fx)<=fNearNull && fabs(aMX.fz)<=fNearNull &&
- fabs(aMY.fy)<=fNearNull && fabs(aMY.fz)<=fNearNull)
- {
- rEx=fabs(aMY.fx*fRadius);
- rEy=fabs(aMX.fy*fRadius);
- return true;
- }
- else if (fabs(fMXAbs-fMYAbs)<=fNearNull &&
- fabs(aMX.fz)<=fNearNull && fabs(aMY.fz)<=fNearNull)
- {
- rEx=rEy=fabs(((fMXAbs+fMYAbs)/2)*fRadius);
- return true;
- }
- else return false;
-}
-
-LineInfo DXFTransform::Transform(const DXFLineInfo& aDXFLineInfo) const
-{
- double fex,fey,scale;
-
- fex=sqrt(aMX.fx*aMX.fx + aMX.fy*aMX.fy);
- fey=sqrt(aMY.fx*aMY.fx + aMY.fy*aMY.fy);
- scale = (fex+fey)/2.0;
-
- LineInfo aLineInfo;
-
- aLineInfo.SetStyle( aDXFLineInfo.eStyle );
- aLineInfo.SetWidth( 0 );
- aLineInfo.SetDashCount( static_cast< sal_uInt16 >( aDXFLineInfo.nDashCount ) );
- aLineInfo.SetDashLen( static_cast<sal_Int32>(aDXFLineInfo.fDashLen * scale + 0.5) );
- aLineInfo.SetDotCount( static_cast< sal_uInt16 >( aDXFLineInfo.nDotCount ) );
- aLineInfo.SetDotLen( static_cast<sal_Int32>(aDXFLineInfo.fDotLen * scale + 0.5) );
- aLineInfo.SetDistance( static_cast<sal_Int32>(aDXFLineInfo.fDistance * scale + 0.5) );
-
- if ( aLineInfo.GetDashCount() > 0 && aLineInfo.GetDashLen() == 0 )
- aLineInfo.SetDashLen(1);
-
- if ( aLineInfo.GetDotCount() > 0 && aLineInfo.GetDotLen() == 0 )
- aLineInfo.SetDotLen(1);
-
- return aLineInfo;
-}
-
-double DXFTransform::CalcRotAngle() const
-{
- return atan2(aMX.fy,aMX.fx)/3.14159265359*180.0;
-}
-
-bool DXFTransform::Mirror() const
-{
- return aMZ.SProd(aMX*aMY)<0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/idxf/dxfvec.hxx b/filter/source/graphicfilter/idxf/dxfvec.hxx
deleted file mode 100644
index 59b6babc2965..000000000000
--- a/filter/source/graphicfilter/idxf/dxfvec.hxx
+++ /dev/null
@@ -1,218 +0,0 @@
-/* -*- 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 INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFVEC_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFVEC_HXX
-
-#include <sal/types.h>
-#include <vcl/lineinfo.hxx>
-
-class Point;
-
-class DXFLineInfo {
-public:
- LineStyle eStyle;
- sal_Int32 nDashCount;
- double fDashLen;
- sal_Int32 nDotCount;
- double fDotLen;
- double fDistance;
-
- DXFLineInfo() :
- eStyle(LineStyle::Solid),
- nDashCount(0),
- fDashLen(0),
- nDotCount(0),
- fDotLen(0),
- fDistance(0) {}
-};
-
-
-//---------------------------- DXFVector ---------------------------------------
-
-// common 3D vector with doubles
-
-class DXFVector {
-
-public:
-
- double fx,fy,fz; // public ! - why not?
-
- inline DXFVector(double fX=0.0, double fY=0.0, double fZ=0.0);
-
- // summation/subtraktion:
- DXFVector & operator += (const DXFVector & rV);
- DXFVector operator + (const DXFVector & rV) const;
- DXFVector operator - (const DXFVector & rV) const;
-
- // vector product
- DXFVector operator * (const DXFVector & rV) const;
-
- // scalar product:
- double SProd(const DXFVector & rV) const;
-
- // multiplication with scalar:
- DXFVector & operator *= (double fs);
- DXFVector operator * (double fs) const;
-
- // length:
- double Abs() const;
-
- // vector with same direction and a length of 1:
- DXFVector Unit() const;
-
- // equivalence or net:
- bool operator == (const DXFVector & rV) const;
-};
-
-
-//---------------------------- DXFTransform ------------------------------------
-
-// a transformation matrice specialized for our problem
-
-class DXFTransform {
-
-public:
-
- DXFTransform();
- // destination coordinate = source coordinate
-
- DXFTransform(double fScaleX, double fScaleY, double fScaleZ,
- const DXFVector & rShift);
- // dest coordinate = translate(scale(source coordinate))
-
- DXFTransform(double fScaleX, double fScaleY, double fScaleZ,
- double fRotAngle,
- const DXFVector & rShift);
- // dest coordinate = translate(rotate(scale(source coordinate)))
- // rotation around z-axis, fRotAngle in degrees.
-
- DXFTransform(const DXFVector & rExtrusion);
- // Transformation "ECS->WCS" via "Entity Extrusion Direction"
- // ant the "Arbitrary Axis Algorithm"
- // (See DXF-Docu from AutoDesk)
-
- DXFTransform(const DXFVector & rViewDir, const DXFVector & rViewTarget);
- // Transformation object space->picture space on the basis of direction
- // destination point of a viewport
- // (See DXF-Docu from AutoDesk: VPORT)
-
- DXFTransform(const DXFTransform & rT1, const DXFTransform & rT2);
- // destination coordinate = rT2(rT1(source coordinate))
-
-
- void Transform(const DXFVector & rSrc, DXFVector & rTgt) const;
- // Transformation from DXFVector to DXFVector
-
- void Transform(const DXFVector & rSrc, Point & rTgt) const;
- // Transformation from DXFVector to SvPoint
-
- void TransDir(const DXFVector & rSrc, DXFVector & rTgt) const;
- // Transformation of a relative vector (so no translation)
-
- bool TransCircleToEllipse(double fRadius, double & rEx, double & rEy) const;
- // Attempt to transform a circle (in xy plane) so that it results
- // in an aligned ellipse. If the does not work because an ellipse of
- // arbitrary position would be created, sal_False is returned.
- // (The center point will not be transformed, use Transform(..))
-
- double CalcRotAngle() const;
- // Calculates the rotation angle around z-axis (in degrees)
-
- bool Mirror() const;
- // Returns sal_True, if the matrice represents a left-handed coordinate system
-
- LineInfo Transform(const DXFLineInfo& aDXFLineInfo) const;
- // Transform to LineInfo
-
-private:
- DXFVector aMX;
- DXFVector aMY;
- DXFVector aMZ;
- DXFVector aMP;
-};
-
-
-//------------------------------- inlines --------------------------------------
-
-
-inline DXFVector::DXFVector(double fX, double fY, double fZ)
-{
- fx=fX; fy=fY; fz=fZ;
-}
-
-
-inline DXFVector & DXFVector::operator += (const DXFVector & rV)
-{
- fx+=rV.fx; fy+=rV.fy; fz+=rV.fz;
- return *this;
-}
-
-
-inline DXFVector DXFVector::operator + (const DXFVector & rV) const
-{
- return DXFVector(fx+rV.fx, fy+rV.fy, fz+rV.fz);
-}
-
-
-inline DXFVector DXFVector::operator - (const DXFVector & rV) const
-{
- return DXFVector(fx-rV.fx, fy-rV.fy, fz-rV.fz);
-}
-
-
-inline DXFVector DXFVector::operator * (const DXFVector & rV) const
-{
- return DXFVector(
- fy * rV.fz - fz * rV.fy,
- fz * rV.fx - fx * rV.fz,
- fx * rV.fy - fy * rV.fx
- );
-}
-
-
-inline double DXFVector::SProd(const DXFVector & rV) const
-{
- return fx*rV.fx + fy*rV.fy + fz*rV.fz;
-}
-
-
-inline DXFVector & DXFVector::operator *= (double fs)
-{
- fx*=fs; fy*=fs; fz*=fs;
- return *this;
-}
-
-
-inline DXFVector DXFVector::operator * (double fs) const
-{
- return DXFVector(fx*fs,fy*fs,fz*fs);
-}
-
-
-inline bool DXFVector::operator == (const DXFVector & rV) const
-{
- if (fx==rV.fx && fy==rV.fy && fz==rV.fz) return true;
- else return false;
-}
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
deleted file mode 100644
index ed294f9ec1fb..000000000000
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ /dev/null
@@ -1,824 +0,0 @@
-/* -*- 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 <vcl/svapp.hxx>
-#include <vcl/gdimtf.hxx>
-#include <vcl/graph.hxx>
-#include <vcl/metaact.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/cvtgrf.hxx>
-#include <vcl/BitmapTools.hxx>
-#include <unotools/configmgr.hxx>
-#include <unotools/tempfile.hxx>
-#include <osl/process.h>
-#include <osl/file.hxx>
-#include <osl/thread.h>
-#include <rtl/byteseq.hxx>
-#include <sal/log.hxx>
-#include <o3tl/char16_t2wchar_t.hxx>
-#include <o3tl/safeint.hxx>
-#include <memory>
-#include <string_view>
-
-class FilterConfigItem;
-
-/*************************************************************************
-|*
-|* ImpSearchEntry()
-|*
-|* Description Checks if there is a string(pDest) of length nSize
-|* inside the memory area pSource which is nComp bytes long.
-|* Check is NON-CASE-SENSITIVE. The return value is the
-|* address where the string is found or NULL
-|*
-*************************************************************************/
-
-static sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, size_t nComp, size_t nSize )
-{
- while ( nComp-- >= nSize )
- {
- size_t i;
- for ( i = 0; i < nSize; i++ )
- {
- if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
- break;
- }
- if ( i == nSize )
- return pSource;
- pSource++;
- }
- return nullptr;
-}
-
-
-// SecurityCount is the buffersize of the buffer in which we will parse for a number
-static tools::Long ImplGetNumber(sal_uInt8* &rBuf, sal_uInt32& nSecurityCount)
-{
- bool bValid = true;
- bool bNegative = false;
- tools::Long nRetValue = 0;
- while (nSecurityCount && (*rBuf == ' ' || *rBuf == 0x9))
- {
- ++rBuf;
- --nSecurityCount;
- }
- while ( nSecurityCount && ( *rBuf != ' ' ) && ( *rBuf != 0x9 ) && ( *rBuf != 0xd ) && ( *rBuf != 0xa ) )
- {
- switch ( *rBuf )
- {
- case '.' :
- // we'll only use the integer format
- bValid = false;
- break;
- case '-' :
- bNegative = true;
- break;
- default :
- if ( ( *rBuf < '0' ) || ( *rBuf > '9' ) )
- nSecurityCount = 1; // error parsing the bounding box values
- else if ( bValid )
- {
- const bool bFail = o3tl::checked_multiply<tools::Long>(nRetValue, 10, nRetValue) ||
- o3tl::checked_add<tools::Long>(nRetValue, *rBuf - '0', nRetValue);
- if (bFail)
- return 0;
- }
- break;
- }
- nSecurityCount--;
- ++rBuf;
- }
- if ( bNegative )
- nRetValue = -nRetValue;
- return nRetValue;
-}
-
-
-static int ImplGetLen( sal_uInt8* pBuf, int nMax )
-{
- int nLen = 0;
- while( nLen != nMax )
- {
- sal_uInt8 nDat = *pBuf++;
- if ( nDat == 0x0a || nDat == 0x25 )
- break;
- nLen++;
- }
- return nLen;
-}
-
-static void MakeAsMeta(Graphic &rGraphic)
-{
- ScopedVclPtrInstance< VirtualDevice > pVDev;
- GDIMetaFile aMtf;
- Size aSize = rGraphic.GetPrefSize();
-
- if( !aSize.Width() || !aSize.Height() )
- aSize = Application::GetDefaultDevice()->PixelToLogic(
- rGraphic.GetSizePixel(), MapMode(MapUnit::Map100thMM));
- else
- aSize = OutputDevice::LogicToLogic( aSize,
- rGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM));
-
- pVDev->EnableOutput( false );
- aMtf.Record( pVDev );
- pVDev->DrawBitmapEx( Point(), aSize, rGraphic.GetBitmapEx() );
- aMtf.Stop();
- aMtf.WindStart();
- aMtf.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
- aMtf.SetPrefSize( aSize );
- rGraphic = aMtf;
-}
-
-static oslProcessError runProcessWithPathSearch(const OUString &rProgName,
- rtl_uString* pArgs[], sal_uInt32 nArgs, oslProcess *pProcess,
- oslFileHandle *pIn, oslFileHandle *pOut, oslFileHandle *pErr)
-{
- oslProcessError result = osl_Process_E_None;
- oslSecurity pSecurity = osl_getCurrentSecurity();
-#ifdef _WIN32
- /*
- * ooo#72096
- * On Window the underlying SearchPath searches in order of...
- * The directory from which the application loaded.
- * The current directory.
- * The Windows system directory.
- * The Windows directory.
- * The directories that are listed in the PATH environment variable.
- *
- * Because one of our programs is called "convert" and there is a convert
- * in the windows system directory, we want to explicitly search the PATH
- * to avoid picking up on that one if ImageMagick's convert precedes it in
- * PATH.
- *
- */
- OUString url;
- OUString path(o3tl::toU(_wgetenv(L"PATH")));
-
- oslFileError err = osl_searchFileURL(rProgName.pData, path.pData, &url.pData);
- if (err != osl_File_E_None)
- result = osl_Process_E_NotFound;
- else
- result = osl_executeProcess_WithRedirectedIO(url.pData,
- pArgs, nArgs, osl_Process_HIDDEN,
- pSecurity, nullptr, nullptr, 0, pProcess, pIn, pOut, pErr);
-#else
- result = osl_executeProcess_WithRedirectedIO(rProgName.pData,
- pArgs, nArgs, osl_Process_SEARCHPATH | osl_Process_HIDDEN,
- pSecurity, nullptr, nullptr, 0, pProcess, pIn, pOut, pErr);
-#endif
- osl_freeSecurityHandle( pSecurity );
- return result;
-}
-
-#if defined(_WIN32)
-# define EXESUFFIX ".exe"
-#else
-# define EXESUFFIX ""
-#endif
-
-static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &rGraphic)
-{
- utl::TempFile aTempOutput;
- utl::TempFile aTempInput;
- aTempOutput.EnableKillingFile();
- aTempInput.EnableKillingFile();
- OUString output;
- osl::FileBase::getSystemPathFromFileURL(aTempOutput.GetURL(), output);
- OUString input;
- osl::FileBase::getSystemPathFromFileURL(aTempInput.GetURL(), input);
-
- SvStream* pInputStream = aTempInput.GetStream(StreamMode::WRITE);
- sal_uInt64 nCount = pInputStream->WriteBytes(pBuf, nBytesRead);
- aTempInput.CloseStream();
-
- //fdo#64161 pstoedit under non-windows uses libEMF to output the EMF, but
- //libEMF cannot calculate the bounding box of text, so the overall bounding
- //box is not increased to include that of any text in the eps
- //
- //-drawbb will force pstoedit to draw a pair of pixels with the bg color to
- //the topleft and bottom right of the bounding box as pstoedit sees it,
- //which libEMF will then extend its bounding box to fit
- //
- //-usebbfrominput forces pstoedit to take the original ps bounding box
- //as the bounding box as it sees it, instead of calculating its own
- //which also doesn't work for this example
- //
- //Under Linux, positioning of letters within pstoedit is very approximate.
- //Using the -nfw option delegates the positioning to the reader, and we
- //will do a proper job. The option is ignored on Windows.
- OUString arg1("-usebbfrominput"); //-usebbfrominput use the original ps bounding box
- OUString arg2("-f");
- OUString arg3("emf:-OO -drawbb -nfw"); //-drawbb mark out the bounding box extent with bg pixels
- //-nfw delegate letter placement to us
- rtl_uString *args[] =
- {
- arg1.pData, arg2.pData, arg3.pData, input.pData, output.pData
- };
- oslProcess aProcess;
- oslFileHandle pIn = nullptr;
- oslFileHandle pOut = nullptr;
- oslFileHandle pErr = nullptr;
- oslProcessError eErr = runProcessWithPathSearch(
- "pstoedit" EXESUFFIX,
- args, SAL_N_ELEMENTS(args),
- &aProcess, &pIn, &pOut, &pErr);
-
- if (eErr!=osl_Process_E_None)
- return false;
-
- bool bRet = false;
- if (pIn) osl_closeFile(pIn);
- osl_joinProcess(aProcess);
- osl_freeProcessHandle(aProcess);
- bool bEMFSupported=true;
- if (pOut)
- {
- rtl::ByteSequence seq;
- if (osl_File_E_None == osl_readLine(pOut, reinterpret_cast<sal_Sequence **>(&seq)))
- {
- OString line( reinterpret_cast<const char *>(seq.getConstArray()), seq.getLength() );
- if (line.startsWith("Unsupported output format"))
- bEMFSupported=false;
- }
- osl_closeFile(pOut);
- }
- if (pErr) osl_closeFile(pErr);
- if (nCount == nBytesRead && bEMFSupported)
- {
- SvFileStream aFile(output, StreamMode::READ);
- if (GraphicConverter::Import(aFile, rGraphic, ConvertDataFormat::EMF) == ERRCODE_NONE)
- bRet = true;
- }
-
- return bRet;
-}
-
-namespace {
-
-struct WriteData
-{
- oslFileHandle m_pFile;
- const sal_uInt8 *m_pBuf;
- sal_uInt32 m_nBytesToWrite;
-};
-
-}
-
-extern "C" {
-
-static void WriteFileInThread(void *wData)
-{
- sal_uInt64 nCount;
- WriteData *wdata = static_cast<WriteData *>(wData);
- osl_writeFile(wdata->m_pFile, wdata->m_pBuf, wdata->m_nBytesToWrite, &nCount);
- // The number of bytes written does not matter.
- // The helper process may close its input stream before reading it all.
- // (e.g. at "showpage" in EPS)
-
- // File must be closed here.
- // Otherwise, the helper process may wait for the next input,
- // then its stdout is not closed and osl_readFile() blocks.
- if (wdata->m_pFile) osl_closeFile(wdata->m_pFile);
-}
-
-}
-
-static bool RenderAsBMPThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
- Graphic& rGraphic,
- std::initializer_list<std::u16string_view> aProgNames,
- rtl_uString* pArgs[], size_t nArgs)
-{
- oslProcess aProcess = nullptr;
- oslFileHandle pIn = nullptr;
- oslFileHandle pOut = nullptr;
- oslFileHandle pErr = nullptr;
- oslProcessError eErr = osl_Process_E_Unknown;
- for (const auto& rProgName : aProgNames)
- {
- eErr = runProcessWithPathSearch(OUString(rProgName), pArgs, nArgs, &aProcess, &pIn, &pOut, &pErr);
- if (eErr == osl_Process_E_None)
- break;
- }
- if (eErr!=osl_Process_E_None)
- return false;
-
- WriteData Data;
- Data.m_pFile = pIn;
- Data.m_pBuf = pBuf;
- Data.m_nBytesToWrite = nBytesRead;
- oslThread hThread = osl_createThread(WriteFileInThread, &Data);
-
- bool bRet = false;
- sal_uInt64 nCount;
- {
- SvMemoryStream aMemStm;
- sal_uInt8 aBuf[32000];
- oslFileError eFileErr = osl_readFile(pOut, aBuf, 32000, &nCount);
- while (eFileErr == osl_File_E_None && nCount)
- {
- aMemStm.WriteBytes(aBuf, sal::static_int_cast<std::size_t>(nCount));
- eFileErr = osl_readFile(pOut, aBuf, 32000, &nCount);
- }
-
- aMemStm.Seek(0);
- if (
- aMemStm.GetEndOfData() &&
- GraphicConverter::Import(aMemStm, rGraphic, ConvertDataFormat::BMP) == ERRCODE_NONE
- )
- {
- MakeAsMeta(rGraphic);
- bRet = true;
- }
- }
- if (pOut) osl_closeFile(pOut);
- if (pErr) osl_closeFile(pErr);
- osl_joinProcess(aProcess);
- osl_freeProcessHandle(aProcess);
- osl_joinWithThread(hThread);
- osl_destroyThread(hThread);
- return bRet;
-}
-
-static bool RenderAsBMPThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
- Graphic &rGraphic)
-{
- // density in pixel/inch
- OUString arg1("-density");
- // since the preview is also used for PDF-Export & printing on non-PS-printers,
- // use some better quality - 300x300 should allow some resizing as well
- OUString arg2("300x300");
- // read eps from STDIN
- OUString arg3("eps:-");
- // write bmp to STDOUT
- OUString arg4("bmp:-");
- rtl_uString *args[] =
- {
- arg1.pData, arg2.pData, arg3.pData, arg4.pData
- };
- return RenderAsBMPThroughHelper(pBuf, nBytesRead, rGraphic,
- { u"convert" EXESUFFIX },
- args,
- SAL_N_ELEMENTS(args));
-}
-
-static bool RenderAsBMPThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
- Graphic &rGraphic)
-{
- OUString arg1("-q");
- OUString arg2("-dBATCH");
- OUString arg3("-dNOPAUSE");
- OUString arg4("-dPARANOIDSAFER");
- OUString arg5("-dEPSCrop");
- OUString arg6("-dTextAlphaBits=4");
- OUString arg7("-dGraphicsAlphaBits=4");
- OUString arg8("-r300x300");
- OUString arg9("-sDEVICE=bmp16m");
- OUString arg10("-sOutputFile=-");
- OUString arg11("-");
- rtl_uString *args[] =
- {
- arg1.pData, arg2.pData, arg3.pData, arg4.pData, arg5.pData,
- arg6.pData, arg7.pData, arg8.pData, arg9.pData, arg10.pData,
- arg11.pData
- };
- return RenderAsBMPThroughHelper(pBuf, nBytesRead, rGraphic,
-#ifdef _WIN32
- // Try both 32-bit and 64-bit ghostscript executable name
- {
- u"gswin32c" EXESUFFIX,
- u"gswin64c" EXESUFFIX,
- },
-#else
- { u"gs" EXESUFFIX },
-#endif
- args,
- SAL_N_ELEMENTS(args));
-}
-
-static bool RenderAsBMP(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &rGraphic)
-{
- if (RenderAsBMPThroughGS(pBuf, nBytesRead, rGraphic))
- return true;
- else
- return RenderAsBMPThroughConvert(pBuf, nBytesRead, rGraphic);
-}
-
-// this method adds a replacement action containing the original wmf or tiff replacement,
-// so the original eps can be written when storing to ODF.
-static void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32 nOrigPos, sal_uInt32 nPSSize,
- sal_uInt32 nPosWMF, sal_uInt32 nSizeWMF, sal_uInt32 nPosTIFF, sal_uInt32 nSizeTIFF )
-{
- OString aComment("EPSReplacementGraphic");
- if ( nSizeWMF || nSizeTIFF )
- {
- std::vector<sal_uInt8> aWMFBuf;
- if (nSizeWMF && checkSeek(rStrm, nOrigPos + nPosWMF) && rStrm.remainingSize() >= nSizeWMF)
- {
- aWMFBuf.resize(nSizeWMF);
- aWMFBuf.resize(rStrm.ReadBytes(aWMFBuf.data(), nSizeWMF));
- }
- nSizeWMF = aWMFBuf.size();
-
- std::vector<sal_uInt8> aTIFFBuf;
- if (nSizeTIFF && checkSeek(rStrm, nOrigPos + nPosTIFF) && rStrm.remainingSize() >= nSizeTIFF)
- {
- aTIFFBuf.resize(nSizeTIFF);
- aTIFFBuf.resize(rStrm.ReadBytes(aTIFFBuf.data(), nSizeTIFF));
- }
- nSizeTIFF = aTIFFBuf.size();
-
- SvMemoryStream aReplacement( nSizeWMF + nSizeTIFF + 28 );
- sal_uInt32 const nMagic = 0xc6d3d0c5;
- sal_uInt32 nPPos = 28 + nSizeWMF + nSizeTIFF;
- sal_uInt32 nWPos = nSizeWMF ? 28 : 0;
- sal_uInt32 nTPos = nSizeTIFF ? 28 + nSizeWMF : 0;
-
- aReplacement.WriteUInt32( nMagic ).WriteUInt32( nPPos ).WriteUInt32( nPSSize )
- .WriteUInt32( nWPos ).WriteUInt32( nSizeWMF )
- .WriteUInt32( nTPos ).WriteUInt32( nSizeTIFF );
-
- aReplacement.WriteBytes(aWMFBuf.data(), nSizeWMF);
- aReplacement.WriteBytes(aTIFFBuf.data(), nSizeTIFF);
- rMtf.AddAction( static_cast<MetaAction*>( new MetaCommentAction( aComment, 0, static_cast<const sal_uInt8*>(aReplacement.GetData()), aReplacement.Tell() ) ) );
- }
- else
- rMtf.AddAction( static_cast<MetaAction*>( new MetaCommentAction( aComment, 0, nullptr, 0 ) ) );
-}
-
-//there is no preview -> make a red box
-static void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
- tools::Long nWidth, tools::Long nHeight, Graphic &rGraphic)
-{
- GDIMetaFile aMtf;
- ScopedVclPtrInstance< VirtualDevice > pVDev;
- vcl::Font aFont;
-
- pVDev->EnableOutput( false );
- aMtf.Record( pVDev );
- pVDev->SetLineColor( COL_RED );
- pVDev->SetFillColor();
-
- aFont.SetColor( COL_LIGHTRED );
-
- pVDev->Push( PushFlags::FONT );
- pVDev->SetFont( aFont );
-
- tools::Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) );
- pVDev->DrawRect( aRect );
-
- OUString aString;
- int nLen;
- sal_uInt8* pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%Title:"), nBytesRead - 32, 8 );
- sal_uInt32 nRemainingBytes = pDest ? (nBytesRead - (pDest - pBuf)) : 0;
- if (nRemainingBytes >= 8)
- {
- pDest += 8;
- nRemainingBytes -= 8;
- if (nRemainingBytes && *pDest == ' ')
- {
- ++pDest;
- --nRemainingBytes;
- }
- nLen = ImplGetLen(pDest, std::min<sal_uInt32>(nRemainingBytes, 32));
- if (o3tl::make_unsigned(nLen) < nRemainingBytes)
- {
- sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
- if ( strcmp( reinterpret_cast<char*>(pDest), "none" ) != 0 )
- {
- const char* pStr = reinterpret_cast<char*>(pDest);
- aString += " Title:" + OUString(pStr, strlen(pStr), RTL_TEXTENCODING_ASCII_US) + "\n";
- }
- pDest[ nLen ] = aOldValue;
- }
- }
- pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%Creator:"), nBytesRead - 32, 10 );
- nRemainingBytes = pDest ? (nBytesRead - (pDest - pBuf)) : 0;
- if (nRemainingBytes >= 10)
- {
- pDest += 10;
- nRemainingBytes -= 10;
- if (nRemainingBytes && *pDest == ' ')
- {
- ++pDest;
- --nRemainingBytes;
- }
- nLen = ImplGetLen(pDest, std::min<sal_uInt32>(nRemainingBytes, 32));
- if (o3tl::make_unsigned(nLen) < nRemainingBytes)
- {
- sal_uInt8 aOldValue(pDest[nLen]); pDest[nLen] = 0;
- const char* pStr = reinterpret_cast<char*>(pDest);
- aString += " Creator:" + OUString(pStr, strlen(pStr), RTL_TEXTENCODING_ASCII_US) + "\n";
- pDest[nLen] = aOldValue;
- }
- }
- pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%CreationDate:"), nBytesRead - 32, 15 );
- nRemainingBytes = pDest ? (nBytesRead - (pDest - pBuf)) : 0;
- if (nRemainingBytes >= 15)
- {
- pDest += 15;
- nRemainingBytes -= 15;
- if (nRemainingBytes && *pDest == ' ')
- {
- ++pDest;
- --nRemainingBytes;
- }
- nLen = ImplGetLen(pDest, std::min<sal_uInt32>(nRemainingBytes, 32));
- if (o3tl::make_unsigned(nLen) < nRemainingBytes)
- {
- sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
- if ( strcmp( reinterpret_cast<char*>(pDest), "none" ) != 0 )
- {
- aString += " CreationDate:" + OUString::createFromAscii( reinterpret_cast<char*>(pDest) ) + "\n";
- const char* pStr = reinterpret_cast<char*>(pDest);
- aString += " CreationDate:" + OUString(pStr, strlen(pStr), RTL_TEXTENCODING_ASCII_US) + "\n";
- }
- pDest[ nLen ] = aOldValue;
- }
- }
- pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%LanguageLevel:"), nBytesRead - 4, 16 );
- nRemainingBytes = pDest ? (nBytesRead - (pDest - pBuf)) : 0;
- if (nRemainingBytes >= 16)
- {
- pDest += 16;
- nRemainingBytes -= 16;
- sal_uInt32 nCount = std::min<sal_uInt32>(nRemainingBytes, 4U);
- sal_uInt32 nNumber = ImplGetNumber(pDest, nCount);
- if (nCount && nNumber < 10)
- {
- aString += " LanguageLevel:" + OUString::number( nNumber );
- }
- }
- pVDev->DrawText( aRect, aString, DrawTextFlags::Clip | DrawTextFlags::MultiLine );
- pVDev->Pop();
- aMtf.Stop();
- aMtf.WindStart();
- aMtf.SetPrefMapMode(MapMode(MapUnit::MapPoint));
- aMtf.SetPrefSize( Size( nWidth, nHeight ) );
- rGraphic = aMtf;
-}
-
-//================== GraphicImport - the exported function ================
-
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
-{
- if ( rStream.GetError() )
- return false;
-
- Graphic aGraphic;
- bool bRetValue = false;
- bool bHasPreview = false;
- sal_uInt32 nSignature = 0, nPSStreamPos, nPSSize = 0;
- sal_uInt32 nSizeWMF = 0;
- sal_uInt32 nPosWMF = 0;
- sal_uInt32 nSizeTIFF = 0;
- sal_uInt32 nPosTIFF = 0;
-
- auto nOrigPos = nPSStreamPos = rStream.Tell();
- SvStreamEndian nOldFormat = rStream.GetEndian();
-
- rStream.SetEndian( SvStreamEndian::LITTLE );
- rStream.ReadUInt32( nSignature );
- if ( nSignature == 0xc6d3d0c5 )
- {
- rStream.ReadUInt32( nPSStreamPos ).ReadUInt32( nPSSize ).ReadUInt32( nPosWMF ).ReadUInt32( nSizeWMF );
-
- // first we try to get the metafile grafix
-
- if ( nSizeWMF )
- {
- if (nPosWMF && checkSeek(rStream, nOrigPos + nPosWMF))
- {
- if (GraphicConverter::Import(rStream, aGraphic, ConvertDataFormat::WMF) == ERRCODE_NONE)
- bHasPreview = bRetValue = true;
- }
- }
- else
- {
- rStream.ReadUInt32( nPosTIFF ).ReadUInt32( nSizeTIFF );
-
- // else we have to get the tiff grafix
-
- if (nPosTIFF && nSizeTIFF && checkSeek(rStream, nOrigPos + nPosTIFF))
- {
- if ( GraphicConverter::Import( rStream, aGraphic, ConvertDataFormat::TIF ) == ERRCODE_NONE )
- {
- MakeAsMeta(aGraphic);
- rStream.Seek( nOrigPos + nPosTIFF );
- bHasPreview = bRetValue = true;
- }
- }
- }
- }
- else
- {
- nPSStreamPos = nOrigPos; // no preview available _>so we must get the size manually
- nPSSize = rStream.Seek( STREAM_SEEK_TO_END ) - nOrigPos;
- }
-
- std::unique_ptr<sal_uInt8[]> pHeader( new sal_uInt8[ 22 ] );
- rStream.Seek( nPSStreamPos );
- rStream.ReadBytes(pHeader.get(), 22); // check PostScript header
- bool bOk = ImplSearchEntry(pHeader.get(), reinterpret_cast<sal_uInt8 const *>("%!PS-Adobe"), 10, 10) &&
- ImplSearchEntry(&pHeader[ 15 ], reinterpret_cast<sal_uInt8 const *>("EPS"), 3, 3);
- if (bOk)
- {
- rStream.Seek(nPSStreamPos);
- bOk = rStream.remainingSize() >= nPSSize;
- SAL_WARN_IF(!bOk, "filter.eps", "eps claims to be: " << nPSSize << " in size, but only " << rStream.remainingSize() << " remains");
- }
- if (bOk)
- {
- std::unique_ptr<sal_uInt8[]> pBuf( new sal_uInt8[ nPSSize ] );
-
- sal_uInt32 nBufStartPos = rStream.Tell();
- sal_uInt32 nBytesRead = rStream.ReadBytes(pBuf.get(), nPSSize);
- if ( nBytesRead == nPSSize )
- {
- sal_uInt32 nSecurityCount = 32;
- // if there is no tiff/wmf preview, we will parse for a preview in
- // the eps prolog
- if (!bHasPreview && nBytesRead >= nSecurityCount)
- {
- sal_uInt8* pDest = ImplSearchEntry( pBuf.get(), reinterpret_cast<sal_uInt8 const *>("%%BeginPreview:"), nBytesRead - nSecurityCount, 15 );
- sal_uInt32 nRemainingBytes = pDest ? (nBytesRead - (pDest - pBuf.get())) : 0;
- if (nRemainingBytes >= 15)
- {
- pDest += 15;
- nSecurityCount = nRemainingBytes - 15;
- tools::Long nWidth = ImplGetNumber(pDest, nSecurityCount);
- tools::Long nHeight = ImplGetNumber(pDest, nSecurityCount);
- tools::Long nBitDepth = ImplGetNumber(pDest, nSecurityCount);
- tools::Long nScanLines = ImplGetNumber(pDest, nSecurityCount);
- pDest = ImplSearchEntry(pDest, reinterpret_cast<sal_uInt8 const *>("%"), nSecurityCount, 1); // go to the first Scanline
- bOk = pDest && nWidth > 0 && nHeight > 0 && ( ( nBitDepth == 1 ) || ( nBitDepth == 8 ) ) && nScanLines;
- if (bOk)
- {
- tools::Long nResult;
- bOk = !o3tl::checked_multiply(nWidth, nHeight, nResult) && nResult <= SAL_MAX_INT32/2/3;
- }
- if (bOk)
- {
- rStream.Seek( nBufStartPos + ( pDest - pBuf.get() ) );
-
- vcl::bitmap::RawBitmap aBitmap( Size( nWidth, nHeight ), 24 );
- {
- bool bIsValid = true;
- sal_uInt8 nDat = 0;
- char nByte;
- for (tools::Long y = 0; bIsValid && y < nHeight; ++y)
- {
- int nBitsLeft = 0;
- for (tools::Long x = 0; x < nWidth; ++x)
- {
- if ( --nBitsLeft < 0 )
- {
- while ( bIsValid && ( nBitsLeft != 7 ) )
- {
- rStream.ReadChar(nByte);
- bIsValid = rStream.good();
- if (!bIsValid)
- break;
- switch (nByte)
- {
- case 0x0a :
- if ( --nScanLines < 0 )
- bIsValid = false;
- break;
- case 0x09 :
- case 0x0d :
- case 0x20 :
- case 0x25 :
- break;
- default:
- {
- if ( nByte >= '0' )
- {
- if ( nByte > '9' )
- {
- nByte &=~0x20; // case none sensitive for hexadecimal values
- nByte -= ( 'A' - 10 );
- if ( nByte > 15 )
- bIsValid = false;
- }
- else
- nByte -= '0';
- nBitsLeft += 4;
- nDat <<= 4;
- nDat |= ( nByte ^ 0xf ); // in epsi a zero bit represents white color
- }
- else
- bIsValid = false;
- }
- break;
- }
- }
- }
- if (!bIsValid)
- break;
- if ( nBitDepth == 1 )
- aBitmap.SetPixel( y, x, Color(ColorTransparency, static_cast<sal_uInt8>(nDat >> nBitsLeft) & 1) );
- else
- {
- aBitmap.SetPixel( y, x, nDat ? COL_WHITE : COL_BLACK ); // nBitDepth == 8
- nBitsLeft = 0;
- }
- }
- }
- if (bIsValid)
- {
- ScopedVclPtrInstance<VirtualDevice> pVDev;
- GDIMetaFile aMtf;
- Size aSize( nWidth, nHeight );
- pVDev->EnableOutput( false );
- aMtf.Record( pVDev );
- aSize = OutputDevice::LogicToLogic(aSize, MapMode(), MapMode(MapUnit::Map100thMM));
- pVDev->DrawBitmapEx( Point(), aSize, vcl::bitmap::CreateFromData(std::move(aBitmap)) );
- aMtf.Stop();
- aMtf.WindStart();
- aMtf.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
- aMtf.SetPrefSize( aSize );
- aGraphic = aMtf;
- bHasPreview = bRetValue = true;
- }
- }
- }
- }
- }
-
- sal_uInt8* pDest = ImplSearchEntry( pBuf.get(), reinterpret_cast<sal_uInt8 const *>("%%BoundingBox:"), nBytesRead, 14 );
- sal_uInt32 nRemainingBytes = pDest ? (nBytesRead - (pDest - pBuf.get())) : 0;
- if (nRemainingBytes >= 14)
- {
- pDest += 14;
- nSecurityCount = std::min<sal_uInt32>(nRemainingBytes - 14, 100);
- tools::Long nNumb[4];
- nNumb[0] = nNumb[1] = nNumb[2] = nNumb[3] = 0;
- for ( int i = 0; ( i < 4 ) && nSecurityCount; i++ )
- {
- nNumb[ i ] = ImplGetNumber(pDest, nSecurityCount);
- }
- bool bFail = nSecurityCount == 0;
- tools::Long nWidth(0), nHeight(0);
- if (!bFail)
- bFail = o3tl::checked_sub(nNumb[2], nNumb[0], nWidth) || o3tl::checked_add(nWidth, tools::Long(1), nWidth);
- if (!bFail)
- bFail = o3tl::checked_sub(nNumb[3], nNumb[1], nHeight) || o3tl::checked_add(nHeight, tools::Long(1), nHeight);
- if (!bFail && nWidth > 0 && nHeight > 0)
- {
- GDIMetaFile aMtf;
-
- // if there is no preview -> try with gs to make one
- if (!bHasPreview && !utl::ConfigManager::IsFuzzing())
- {
- bHasPreview = RenderAsEMF(pBuf.get(), nBytesRead, aGraphic);
- if (!bHasPreview)
- bHasPreview = RenderAsBMP(pBuf.get(), nBytesRead, aGraphic);
- }
-
- // if there is no preview -> make a red box
- if( !bHasPreview )
- {
- MakePreview(pBuf.get(), nBytesRead, nWidth, nHeight,
- aGraphic);
- }
-
- GfxLink aGfxLink( std::move(pBuf), nPSSize, GfxLinkType::EpsBuffer ) ;
- aMtf.AddAction( static_cast<MetaAction*>( new MetaEPSAction( Point(), Size( nWidth, nHeight ),
- aGfxLink, aGraphic.GetGDIMetaFile() ) ) );
- CreateMtfReplacementAction( aMtf, rStream, nOrigPos, nPSSize, nPosWMF, nSizeWMF, nPosTIFF, nSizeTIFF );
- aMtf.WindStart();
- aMtf.SetPrefMapMode(MapMode(MapUnit::MapPoint));
- aMtf.SetPrefSize( Size( nWidth, nHeight ) );
- rGraphic = aMtf;
- bRetValue = true;
- }
- }
- }
- }
-
- rStream.SetEndian(nOldFormat);
- rStream.Seek( nOrigPos );
- return bRetValue;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
deleted file mode 100644
index f17565ebd715..000000000000
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ /dev/null
@@ -1,2813 +0,0 @@
-/* -*- 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 <osl/thread.h>
-#include <o3tl/safeint.hxx>
-#include <tools/poly.hxx>
-#include <tools/fract.hxx>
-#include <tools/stream.hxx>
-#include <sal/log.hxx>
-#include <vcl/graph.hxx>
-#include <vcl/dibtools.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/lineinfo.hxx>
-#include <vcl/gdimtf.hxx>
-
-#include <math.h>
-#include <memory>
-
-class FilterConfigItem;
-
-namespace {
-
-enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
-
-}
-
-// -----------------------------Field Types-------------------------------
-
-#define BegDocumnMagic 0xA8A8 /* Begin Document */
-#define EndDocumnMagic 0xA8A9 /* End Document */
-
-#define BegResGrpMagic 0xC6A8 /* Begin Resource Group */
-#define EndResGrpMagic 0xC6A9 /* End Resource Group */
-
-#define BegColAtrMagic 0x77A8 /* Begin Color Attribute Table */
-#define EndColAtrMagic 0x77A9 /* End Color Attribute Table */
-#define BlkColAtrMagic 0x77B0 /* Color Attribute Table */
-#define MapColAtrMagic 0x77AB /* Map Color Attribute Table */
-
-#define BegImgObjMagic 0xFBA8 /* Begin Image Object */
-#define EndImgObjMagic 0xFBA9 /* End Image Object */
-#define DscImgObjMagic 0xFBA6 /* Image Data Descriptor */
-#define DatImgObjMagic 0xFBEE /* Image Picture Data */
-
-#define BegObEnv1Magic 0xC7A8 /* Begin Object Environment Group */
-#define EndObEnv1Magic 0xC7A9 /* End Object Environment Group */
-
-#define BegGrfObjMagic 0xBBA8 /* Begin Graphics Object */
-#define EndGrfObjMagic 0xBBA9 /* End Graphics Object */
-#define DscGrfObjMagic 0xBBA6 /* Graphics Data Descriptor */
-#define DatGrfObjMagic 0xBBEE /* Graphics Data */
-
-#define MapCodFntMagic 0x8AAB /* Map Coded Font */
-#define MapDatResMagic 0xC3AB /* Map Data Resource */
-
-// -----------------------------Order Types-------------------------------
-
-#define GOrdGivArc 0xC6 /* 1 Arc at given position */
-#define GOrdCurArc 0x86 /* 1 Arc at current position */
-#define GOrdGivBzr 0xE5 /* 1 Beziercurve at given position */
-#define GOrdCurBzr 0xA5 /* 1 Beziercurve at current position */
-#define GOrdGivBox 0xC0 /* 1 Box at given position */
-#define GOrdCurBox 0x80 /* 1 Box at current position */
-#define GOrdGivFil 0xC5 /* 1 Fillet at given position */
-#define GOrdCurFil 0x85 /* 1 Fillet at current position */
-#define GOrdGivCrc 0xC7 /* 1 Full arc (circle) at given position */
-#define GOrdCurCrc 0x87 /* 1 Full arc (circle) at current position */
-#define GOrdGivLin 0xC1 /* 1 Line at given position */
-#define GOrdCurLin 0x81 /* 1 Line at current position */
-#define GOrdGivMrk 0xC2 /* 1 Marker at given position */
-#define GOrdCurMrk 0x82 /* 1 Marker at current position */
-#define GOrdGivArP 0xE3 /* 1 Partial arc at given position */
-#define GOrdCurArP 0xA3 /* 1 Partial arc at current position */
-#define GOrdGivRLn 0xE1 /* 1 Relative line at given position */
-#define GOrdCurRLn 0xA1 /* 1 Relative line at current position */
-#define GOrdGivSFl 0xE4 /* 1 Sharp fillet at given position */
-#define GOrdCurSFl 0xA4 /* 1 Sharp fillet at current position */
-
-#define GOrdGivStM 0xF1 /* 1 Character string move at given position */
-#define GOrdCurStM 0xB1 /* 1 Character string move at current position */
-#define GOrdGivStr 0xC3 /* 1 Character string at given position */
-#define GOrdCurStr 0x83 /* 1 Character string at current position */
-#define GOrdGivStx 0xFEF0 /* 2 Character string extended at given position */
-#define GOrdCurStx 0xFEB0 /* 2 Character string extended at current position */
-
-#define GOrdGivImg 0xD1 /* 1 Begin Image at given position */
-#define GOrdCurImg 0x91 /* 1 Begin Image at current position */
-#define GOrdImgDat 0x92 /* 1 Image data */
-#define GOrdEndImg 0x93 /* 1 End Image */
-#define GOrdBegAra 0x68 /* 0 1 Begin area */
-#define GOrdEndAra 0x60 /* 1 End area */
-#define GOrdBegElm 0xD2 /* 1 Begin element */
-#define GOrdEndElm 0x49 /* 0 1 End element */
-
-#define GOrdBegPth 0xD0 /* 1 Begin path */
-#define GOrdEndPth 0x7F /* 0 1 End path */
-#define GOrdFilPth 0xD7 /* 1 Fill path */
-#define GOrdModPth 0xD8 /* 1 Modify path */
-#define GOrdOutPth 0xD4 /* 1 Outline path */
-#define GOrdSClPth 0xB4 /* 1 Set clip path */
-
-#define GOrdNopNop 0x00 /* 0 0 No operation */
-#define GOrdRemark 0x01 /* 1 Comment */
-#define GOrdSegLab 0xD3 /* 1 Label */
-#define GOrdBitBlt 0xD6 /* 1 Bitblt */
-#define GOrdCalSeg 0x07 /* 1 Call Segment */
-#define GOrdSSgBnd 0x32 /* 1 Set segment boundary */
-#define GOrdSegChr 0x04 /* 1 Segment characteristics */
-#define GOrdCloFig 0x7D /* 0 1 Close Figure */
-#define GOrdEndSym 0xFF /* 0 0 End of symbol definition */
-#define GOrdEndPlg 0x3E /* 0 1 End prolog */
-#define GOrdEscape 0xD5 /* 1 Escape */
-#define GOrdExtEsc 0xFED5 /* 2 Extended Escape */
-#define GOrdPolygn 0xF3 /* 2 Polygons */
-
-#define GOrdStkPop 0x3F /* 0 1 Pop */
-
-#define GOrdSIvAtr 0x14 /* 1 Set individual attribute */
-#define GOrdPIvAtr 0x54 /* 1 Push and set individual attribute */
-#define GOrdSColor 0x0A /* 0 1 Set color */
-#define GOrdPColor 0x4A /* 0 1 Push and set color */
-#define GOrdSIxCol 0xA6 /* 1 Set indexed color */
-#define GOrdPIxCol 0xE6 /* 1 Push and set indexed color */
-#define GOrdSXtCol 0x26 /* 1 Set extended color */
-#define GOrdPXtCol 0x66 /* 1 Push and set extended color */
-#define GOrdSBgCol 0x25 /* 1 Set background color */
-#define GOrdPBgCol 0x65 /* 1 Push and set background color */
-#define GOrdSBxCol 0xA7 /* 1 Set background indexed color */
-#define GOrdPBxCol 0xE7 /* 1 Push and set background indexed color */
-#define GOrdSMixMd 0x0C /* 0 1 Set mix */
-#define GOrdPMixMd 0x4C /* 0 1 Push and set mix */
-#define GOrdSBgMix 0x0D /* 0 1 Set background mix */
-#define GOrdPBgMix 0x4D /* 0 1 Push and set background mix */
-
-#define GOrdSPtSet 0x08 /* 0 1 Set pattern set */
-#define GOrdPPtSet 0x48 /* 0 1 Push and set pattern set */
-#define GOrdSPtSym 0x28 /* 0 1 Set pattern symbol */
-#define GOrdPPtSym 0x09 /* 0 1 Push and set pattern symbol */
-#define GOrdSPtRef 0xA0 /* 1 Set model pattern reference */
-#define GOrdPPtRef 0xE0 /* 1 Push and set pattern reference point */
-
-#define GOrdSLnEnd 0x1A /* 0 1 Set line end */
-#define GOrdPLnEnd 0x5A /* 0 1 Push and set line end */
-#define GOrdSLnJoi 0x1B /* 0 1 Set line join */
-#define GOrdPLnJoi 0x5B /* 0 1 Push and set line join */
-#define GOrdSLnTyp 0x18 /* 0 1 Set line type */
-#define GOrdPLnTyp 0x58 /* 0 1 Push and set line type */
-#define GOrdSLnWdt 0x19 /* 0 1 Set line width */
-#define GOrdPLnWdt 0x59 /* 0 1 Push and set line width */
-#define GOrdSFrLWd 0x11 /* 1 Set fractional line width */
-#define GOrdPFrLWd 0x51 /* 1 Push and set fractional line width */
-#define GOrdSStLWd 0x15 /* 1 Set stroke line width */
-#define GOrdPStLWd 0x55 /* 1 Push and set stroke line width */
-
-#define GOrdSChDir 0x3A /* 0 1 Set character direction */
-#define GOrdPChDir 0x7A /* 0 1 Push and set character direction */
-#define GOrdSChPrc 0x39 /* 0 1 Set character precision */
-#define GOrdPChPrc 0x79 /* 0 1 Push and set character precision */
-#define GOrdSChSet 0x38 /* 0 1 Set character set */
-#define GOrdPChSet 0x78 /* 0 1 Push and set character set */
-#define GOrdSChAng 0x34 /* 1 Set character angle */
-#define GOrdPChAng 0x74 /* 1 Push and set character angle */
-#define GOrdSChBrx 0x05 /* 1 Set character break extra */
-#define GOrdPChBrx 0x45 /* 1 Push and set character break extra */
-#define GOrdSChCel 0x33 /* 1 Set character cell */
-#define GOrdPChCel 0x03 /* 1 Push and set character cell */
-#define GOrdSChXtr 0x17 /* 1 Set character extra */
-#define GOrdPChXtr 0x57 /* 1 Push and set character extra */
-#define GOrdSChShr 0x35 /* 1 Set character shear */
-#define GOrdPChShr 0x75 /* 1 Push and set character shear */
-#define GOrdSTxAlg 0x36 /* 0 2 Set text allingment */
-#define GOrdPTxAlg 0x76 /* 0 2 Push and set text allingment */
-
-#define GOrdSMkPrc 0x3B /* 0 1 Set marker precision */
-#define GOrdPMkPrc 0x7B /* 0 1 Push and set marker precision */
-#define GOrdSMkSet 0x3C /* 0 1 Set marker set */
-#define GOrdPMkSet 0x7C /* 0 1 Push and set marker set */
-#define GOrdSMkSym 0x29 /* 0 1 Set marker symbol */
-#define GOrdPMkSym 0x69 /* 0 1 Push and set marker symbol */
-#define GOrdSMkCel 0x37 /* 1 Set marker cell */
-#define GOrdPMkCel 0x77 /* 1 Push and set marker cell */
-
-#define GOrdSArcPa 0x22 /* 1 Set arc parameters */
-#define GOrdPArcPa 0x62 /* 1 Push and set arc parameters */
-
-#define GOrdSCrPos 0x21 /* 1 Set current position */
-#define GOrdPCrPos 0x61 /* 1 Push and set current position */
-
-#define GOrdSMdTrn 0x24 /* 1 Set model transform */
-#define GOrdPMdTrn 0x64 /* 1 Push and set model transform */
-#define GOrdSPkIdn 0x43 /* 1 Set pick identifier */
-#define GOrdPPkIdn 0x23 /* 1 Push and set pick identifier */
-#define GOrdSVwTrn 0x31 /* 1 Set viewing transform */
-#define GOrdSVwWin 0x27 /* 1 Set viewing window */
-#define GOrdPVwWin 0x67 /* 1 Push and set viewing window */
-
-//============================ OS2METReader ==================================
-
-namespace {
-
-struct OSPalette {
- OSPalette * pSucc;
- sal_uInt32 * p0RGB; // May be NULL!
- size_t nSize;
-};
-
-struct OSArea {
- OSArea * pSucc;
- sal_uInt8 nFlags;
- tools::PolyPolygon aPPoly;
- bool bClosed;
- Color aCol;
- Color aBgCol;
- RasterOp eMix;
- RasterOp eBgMix;
- bool bFill;
-};
-
-struct OSPath
-{
- OSPath* pSucc;
- sal_uInt32 nID;
- tools::PolyPolygon aPPoly;
- bool bClosed;
- bool bStroke;
-};
-
-struct OSFont {
- OSFont * pSucc;
- sal_uInt32 nID;
- vcl::Font aFont;
-};
-
-struct OSBitmap {
- OSBitmap * pSucc;
- sal_uInt32 nID;
- BitmapEx aBitmapEx;
-
- // required during reading of the bitmap:
- SvStream * pBMP; // pointer to temporary Windows-BMP file or NULL
- sal_uInt32 nWidth, nHeight;
- sal_uInt16 nBitsPerPixel;
- sal_uInt32 nMapPos;
-};
-
-struct OSAttr
-{
- OSAttr * pSucc;
- sal_uInt16 nPushOrder;
- sal_uInt8 nIvAttrA, nIvAttrP; // special variables for the Order "GOrdPIvAtr"
-
- Color aLinCol;
- Color aLinBgCol;
- RasterOp eLinMix;
- RasterOp eLinBgMix;
- Color aChrCol;
- Color aChrBgCol;
- RasterOp eChrMix;
- RasterOp eChrBgMix;
- Color aMrkCol;
- Color aMrkBgCol;
- RasterOp eMrkMix;
- RasterOp eMrkBgMix;
- Color aPatCol;
- Color aPatBgCol;
- RasterOp ePatMix;
- RasterOp ePatBgMix;
- Color aImgCol;
- Color aImgBgCol;
- RasterOp eImgMix;
- RasterOp eImgBgMix;
- sal_Int32 nArcP, nArcQ, nArcR, nArcS;
- Degree10 nChrAng;
- Size aChrCellSize;
- sal_uInt32 nChrSet;
- Point aCurPos;
- PenStyle eLinStyle;
- sal_uInt16 nLinWidth;
- Size aMrkCellSize;
- sal_uInt8 nMrkPrec;
- sal_uInt8 nMrkSet;
- sal_uInt8 nMrkSymbol;
- bool bFill;
- sal_uInt16 nStrLinWidth;
-
- OSAttr()
- : pSucc(nullptr)
- , nPushOrder(0)
- , nIvAttrA(0)
- , nIvAttrP(0)
- , eLinMix(RasterOp::OverPaint)
- , eLinBgMix(RasterOp::OverPaint)
- , eChrMix(RasterOp::OverPaint)
- , eChrBgMix(RasterOp::OverPaint)
- , eMrkMix(RasterOp::OverPaint)
- , eMrkBgMix(RasterOp::OverPaint)
- , ePatMix(RasterOp::OverPaint)
- , ePatBgMix(RasterOp::OverPaint)
- , eImgMix(RasterOp::OverPaint)
- , eImgBgMix(RasterOp::OverPaint)
- , nArcP(0)
- , nArcQ(0)
- , nArcR(0)
- , nArcS(0)
- , nChrAng(0)
- , nChrSet(0)
- , eLinStyle(PEN_NULL)
- , nLinWidth(0)
- , nMrkPrec(0)
- , nMrkSet(0)
- , nMrkSymbol(0)
- , bFill(false)
- , nStrLinWidth(0)
- {
- }
-};
-
-class OS2METReader {
-
-private:
-
- int ErrorCode;
-
- SvStream * pOS2MET; // the OS2MET file to be read
- VclPtr<VirtualDevice> pVirDev; // here the drawing methods are being called
- // While doing this a recording in the GDIMetaFile
- // will take place.
- tools::Rectangle aBoundingRect; // bounding rectangle as stored in the file
- tools::Rectangle aCalcBndRect; // bounding rectangle calculated on our own
- MapMode aGlobMapMode; // resolution of the picture
- bool bCoord32;
-
- OSPalette * pPaletteStack;
-
- LineInfo aLineInfo;
-
- OSArea * pAreaStack; // Areas that are being worked on
-
- OSPath * pPathStack; // Paths that are being worked on
- OSPath * pPathList; // finished Paths
-
- OSFont * pFontList;
-
- OSBitmap * pBitmapList;
-
- OSAttr aDefAttr;
- OSAttr aAttr;
- OSAttr * pAttrStack;
-
- std::unique_ptr<SvStream> xOrdFile;
-
- void AddPointsToPath(const tools::Polygon & rPoly);
- void AddPointsToArea(const tools::Polygon & rPoly);
- void CloseFigure();
- void PushAttr(sal_uInt16 nPushOrder);
- void PopAttr();
-
- void ChangeBrush( const Color& rPatColor, bool bFill );
- void SetPen( const Color& rColor, sal_uInt16 nStrLinWidth = 0, PenStyle ePenStyle = PEN_SOLID );
- void SetRasterOp(RasterOp eROP);
-
- void SetPalette0RGB(sal_uInt16 nIndex, sal_uInt32 nCol);
- sal_uInt32 GetPalette0RGB(sal_uInt32 nIndex);
- // gets color from palette, or, if it doesn't exist,
- // interprets nIndex as immediate RGB value.
- Color GetPaletteColor(sal_uInt32 nIndex);
-
-
- bool IsLineInfo() const;
- void DrawPolyLine( const tools::Polygon& rPolygon );
- void DrawPolygon( const tools::Polygon& rPolygon );
- void DrawPolyPolygon( const tools::PolyPolygon& rPolygon );
- sal_uInt16 ReadBigEndianWord();
- sal_uInt32 ReadBigEndian3BytesLong();
- sal_uInt32 ReadLittleEndian3BytesLong();
- sal_Int32 ReadCoord(bool b32);
- Point ReadPoint( const bool bAdjustBoundRect = true );
- static RasterOp OS2MixToRasterOp(sal_uInt8 nMix);
- void ReadLine(bool bGivenPos, sal_uInt16 nOrderLen);
- void ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen);
- void ReadBox(bool bGivenPos);
- void ReadBitBlt();
- void ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt16 nOrderLen);
- void ReadArc(bool bGivenPos);
- void ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize);
- void ReadPartialArc(bool bGivenPos, sal_uInt16 nOrderSize);
- void ReadPolygons();
- void ReadBezier(bool bGivenPos, sal_uInt16 nOrderLen);
- void ReadFillet(bool bGivenPos, sal_uInt16 nOrderLen);
- void ReadFilletSharp(bool bGivenPos, sal_uInt16 nOrderLen);
- void ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen);
- void ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen);
- void ReadDsc(sal_uInt16 nDscID);
- void ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen);
- void ReadFont(sal_uInt16 nFieldSize);
- void ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize);
-
-public:
-
- OS2METReader();
- ~OS2METReader();
-
- void ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaFile );
- // Reads from the stream an OS2MET file and fills up the GDIMetaFile
-
-};
-
-}
-
-//=================== Methods of OS2METReader ==============================
-
-OS2METReader::OS2METReader()
- : ErrorCode(0)
- , pOS2MET(nullptr)
- , pVirDev(VclPtr<VirtualDevice>::Create())
- , aBoundingRect()
- , aCalcBndRect()
- , aGlobMapMode()
- , bCoord32(false)
- , pPaletteStack(nullptr)
- , aLineInfo()
- , pAreaStack(nullptr)
- , pPathStack(nullptr)
- , pPathList(nullptr)
- , pFontList(nullptr)
- , pBitmapList(nullptr)
- , aDefAttr()
- , aAttr()
- , pAttrStack(nullptr)
-{
- pVirDev->EnableOutput(false);
-}
-
-OS2METReader::~OS2METReader()
-{
- pVirDev.disposeAndClear();
-
- while (pAreaStack!=nullptr) {
- OSArea * p=pAreaStack;
- pAreaStack=p->pSucc;
- delete p;
- }
-
- while (pPathStack!=nullptr) {
- OSPath * p=pPathStack;
- pPathStack=p->pSucc;
- delete p;
- }
-
- while (pPathList!=nullptr) {
- OSPath * p=pPathList;
- pPathList=p->pSucc;
- delete p;
- }
-
- while (pFontList!=nullptr) {
- OSFont * p=pFontList;
- pFontList=p->pSucc;
- delete p;
- }
-
- while (pBitmapList!=nullptr) {
- OSBitmap * p=pBitmapList;
- pBitmapList=p->pSucc;
- delete p->pBMP;
- delete p;
- }
-
- while (pAttrStack!=nullptr) {
- OSAttr * p=pAttrStack;
- pAttrStack=p->pSucc;
- delete p;
- }
-
- while (pPaletteStack!=nullptr) {
- OSPalette * p=pPaletteStack;
- pPaletteStack=p->pSucc;
- delete[] p->p0RGB;
- delete p;
- }
-}
-
-bool OS2METReader::IsLineInfo() const
-{
- return ( ! ( aLineInfo.IsDefault() || ( aLineInfo.GetStyle() == LineStyle::NONE ) || ( pVirDev->GetLineColor() == COL_TRANSPARENT ) ) );
-}
-
-void OS2METReader::DrawPolyLine( const tools::Polygon& rPolygon )
-{
- if ( aLineInfo.GetStyle() == LineStyle::Dash || ( aLineInfo.GetWidth() > 1 ) )
- pVirDev->DrawPolyLine( rPolygon, aLineInfo );
- else
- pVirDev->DrawPolyLine( rPolygon );
-}
-
-void OS2METReader::DrawPolygon( const tools::Polygon& rPolygon )
-{
- if ( IsLineInfo() )
- {
- pVirDev->Push( PushFlags::LINECOLOR );
- pVirDev->SetLineColor( COL_TRANSPARENT );
- pVirDev->DrawPolygon( rPolygon );
- pVirDev->Pop();
- pVirDev->DrawPolyLine( rPolygon, aLineInfo );
- }
- else
- pVirDev->DrawPolygon( rPolygon );
-}
-
-void OS2METReader::DrawPolyPolygon( const tools::PolyPolygon& rPolyPolygon )
-{
- if ( IsLineInfo() )
- {
- pVirDev->Push( PushFlags::LINECOLOR );
- pVirDev->SetLineColor( COL_TRANSPARENT );
- pVirDev->DrawPolyPolygon( rPolyPolygon );
- pVirDev->Pop();
- for ( sal_uInt16 i = 0; i < rPolyPolygon.Count(); i++ )
- pVirDev->DrawPolyLine( rPolyPolygon.GetObject( i ), aLineInfo );
- }
- else
- pVirDev->DrawPolyPolygon( rPolyPolygon );
-}
-
-void OS2METReader::AddPointsToArea(const tools::Polygon & rPoly)
-{
- sal_uInt16 nOldSize, nNewSize,i;
-
- if (pAreaStack==nullptr || rPoly.GetSize()==0) return;
- tools::PolyPolygon * pPP=&(pAreaStack->aPPoly);
- if (pPP->Count()==0 || pAreaStack->bClosed) pPP->Insert(rPoly);
- else {
- tools::Polygon aLastPoly(pPP->GetObject(pPP->Count()-1));
- nOldSize=aLastPoly.GetSize();
- if (nOldSize && aLastPoly.GetPoint(nOldSize-1)==rPoly.GetPoint(0)) nOldSize--;
- nNewSize=nOldSize+rPoly.GetSize();
- aLastPoly.SetSize(nNewSize);
- for (i=nOldSize; i<nNewSize; i++) {
- aLastPoly.SetPoint(rPoly.GetPoint(i-nOldSize),i);
- }
- pPP->Replace(aLastPoly,pPP->Count()-1);
- }
- pAreaStack->bClosed=false;
-}
-
-void OS2METReader::AddPointsToPath(const tools::Polygon & rPoly)
-{
- sal_uInt16 nOldSize, nNewSize,i;
-
- if (pPathStack==nullptr || rPoly.GetSize()==0) return;
- tools::PolyPolygon * pPP=&(pPathStack->aPPoly);
- if (pPP->Count()==0 /*|| pPathStack->bClosed==sal_True*/) pPP->Insert(rPoly);
- else {
- tools::Polygon aLastPoly(pPP->GetObject(pPP->Count()-1));
- nOldSize=aLastPoly.GetSize();
- if (nOldSize && aLastPoly.GetPoint(nOldSize-1)!=rPoly.GetPoint(0)) pPP->Insert(rPoly);
- else {
- nOldSize--;
- nNewSize=nOldSize+rPoly.GetSize();
- aLastPoly.SetSize(nNewSize);
- for (i=nOldSize; i<nNewSize; i++) {
- aLastPoly.SetPoint(rPoly.GetPoint(i-nOldSize),i);
- }
- pPP->Replace(aLastPoly,pPP->Count()-1);
- }
- }
- pPathStack->bClosed=false;
-}
-
-void OS2METReader::CloseFigure()
-{
- if (pAreaStack!=nullptr) pAreaStack->bClosed=true;
- else if (pPathStack!=nullptr) pPathStack->bClosed=true;
-}
-
-void OS2METReader::PushAttr(sal_uInt16 nPushOrder)
-{
- OSAttr * p;
- p=new OSAttr;
- *p=aAttr;
- p->pSucc=pAttrStack; pAttrStack=p;
- p->nPushOrder=nPushOrder;
-}
-
-void OS2METReader::PopAttr()
-{
- OSAttr * p=pAttrStack;
-
- if (p==nullptr) return;
- switch (p->nPushOrder) {
-
- case GOrdPIvAtr:
- switch (p->nIvAttrA) {
- case 1: switch (p->nIvAttrP) {
- case 1: aAttr.aLinCol=p->aLinCol; break;
- case 2: aAttr.aChrCol=p->aChrCol; break;
- case 3: aAttr.aMrkCol=p->aMrkCol; break;
- case 4: aAttr.aPatCol=p->aPatCol; break;
- case 5: aAttr.aImgCol=p->aImgCol; break;
- } break;
- case 2: switch (p->nIvAttrP) {
- case 1: aAttr.aLinBgCol=p->aLinBgCol; break;
- case 2: aAttr.aChrBgCol=p->aChrBgCol; break;
- case 3: aAttr.aMrkBgCol=p->aMrkBgCol; break;
- case 4: aAttr.aPatBgCol=p->aPatBgCol; break;
- case 5: aAttr.aImgBgCol=p->aImgBgCol; break;
- } break;
- case 3: switch (p->nIvAttrP) {
- case 1: aAttr.eLinMix=p->eLinMix; break;
- case 2: aAttr.eChrMix=p->eChrMix; break;
- case 3: aAttr.eMrkMix=p->eMrkMix; break;
- case 4: aAttr.ePatMix=p->ePatMix; break;
- case 5: aAttr.eImgMix=p->eImgMix; break;
- } break;
- case 4: switch (p->nIvAttrP) {
- case 1: aAttr.eLinBgMix=p->eLinBgMix; break;
- case 2: aAttr.eChrBgMix=p->eChrBgMix; break;
- case 3: aAttr.eMrkBgMix=p->eMrkBgMix; break;
- case 4: aAttr.ePatBgMix=p->ePatBgMix; break;
- case 5: aAttr.eImgBgMix=p->eImgBgMix; break;
- } break;
- }
- break;
-
- case GOrdPLnTyp: aAttr.eLinStyle=p->eLinStyle; break;
-
- case GOrdPLnWdt: aAttr.nLinWidth=p->nLinWidth; break;
-
- case GOrdPStLWd: aAttr.nStrLinWidth=p->nStrLinWidth; break;
-
- case GOrdPChSet: aAttr.nChrSet=p->nChrSet; break;
-
- case GOrdPChAng: aAttr.nChrAng=p->nChrAng; break;
-
- case GOrdPMixMd:
- aAttr.eLinMix=p->eLinMix;
- aAttr.eChrMix=p->eChrMix;
- aAttr.eMrkMix=p->eMrkMix;
- aAttr.ePatMix=p->ePatMix;
- aAttr.eImgMix=p->eImgMix;
- break;
-
- case GOrdPBgMix:
- aAttr.eLinBgMix=p->eLinBgMix;
- aAttr.eChrBgMix=p->eChrBgMix;
- aAttr.eMrkBgMix=p->eMrkBgMix;
- aAttr.ePatBgMix=p->ePatBgMix;
- aAttr.eImgBgMix=p->eImgBgMix;
- break;
-
- case GOrdPPtSym: aAttr.bFill = p->bFill; break;
-
- case GOrdPColor:
- case GOrdPIxCol:
- case GOrdPXtCol:
- aAttr.aLinCol=p->aLinCol;
- aAttr.aChrCol=p->aChrCol;
- aAttr.aMrkCol=p->aMrkCol;
- aAttr.aPatCol=p->aPatCol;
- aAttr.aImgCol=p->aImgCol;
- break;
-
- case GOrdPBgCol:
- case GOrdPBxCol:
- aAttr.aLinBgCol=p->aLinBgCol;
- aAttr.aChrBgCol=p->aChrBgCol;
- aAttr.aMrkBgCol=p->aMrkBgCol;
- aAttr.aPatBgCol=p->aPatBgCol;
- aAttr.aImgBgCol=p->aImgBgCol;
- break;
-
- case GOrdPMkPrc: aAttr.nMrkPrec=aDefAttr.nMrkPrec; break;
-
- case GOrdPMkSet: aAttr.nMrkSet=aDefAttr.nMrkSet; break;
-
- case GOrdPMkSym: aAttr.nMrkSymbol=aDefAttr.nMrkSymbol; break;
-
- case GOrdPMkCel: aAttr.aMrkCellSize=aDefAttr.aMrkCellSize; break;
-
- case GOrdPArcPa:
- aAttr.nArcP=p->nArcP; aAttr.nArcQ=p->nArcQ;
- aAttr.nArcR=p->nArcR; aAttr.nArcS=p->nArcS;
- break;
-
- case GOrdPCrPos:
- aAttr.aCurPos=p->aCurPos;
- break;
- }
- pAttrStack=p->pSucc;
- delete p;
-}
-
-void OS2METReader::ChangeBrush(const Color& rPatColor, bool bFill )
-{
- Color aColor;
-
- if( bFill )
- aColor = rPatColor;
- else
- aColor = COL_TRANSPARENT;
-
- if( pVirDev->GetFillColor() != aColor )
- pVirDev->SetFillColor( aColor );
-}
-
-void OS2METReader::SetPen( const Color& rColor, sal_uInt16 nLineWidth, PenStyle ePenStyle )
-{
- LineStyle eLineStyle( LineStyle::Solid );
-
- if ( pVirDev->GetLineColor() != rColor )
- pVirDev->SetLineColor( rColor );
- aLineInfo.SetWidth( nLineWidth );
-
- sal_uInt16 nDotCount = 0;
- sal_uInt16 nDashCount = 0;
- switch ( ePenStyle )
- {
- case PEN_NULL :
- eLineStyle = LineStyle::NONE;
- break;
- case PEN_DASHDOT :
- nDashCount++;
- [[fallthrough]];
- case PEN_DOT :
- nDotCount++;
- nDashCount--;
- [[fallthrough]];
- case PEN_DASH :
- nDashCount++;
- aLineInfo.SetDotCount( nDotCount );
- aLineInfo.SetDashCount( nDashCount );
- aLineInfo.SetDistance( nLineWidth );
- aLineInfo.SetDotLen( nLineWidth );
- aLineInfo.SetDashLen( nLineWidth << 2 );
- eLineStyle = LineStyle::Dash;
- break;
- case PEN_SOLID:
- break; // -Wall not handled...
- }
- aLineInfo.SetStyle( eLineStyle );
-}
-
-void OS2METReader::SetRasterOp(RasterOp eROP)
-{
- if (pVirDev->GetRasterOp()!=eROP) pVirDev->SetRasterOp(eROP);
-}
-
-void OS2METReader::SetPalette0RGB(sal_uInt16 nIndex, sal_uInt32 nCol)
-{
- if (pPaletteStack==nullptr) {
- pPaletteStack=new OSPalette;
- pPaletteStack->pSucc=nullptr;
- pPaletteStack->p0RGB=nullptr;
- pPaletteStack->nSize=0;
- }
- if (pPaletteStack->p0RGB==nullptr || nIndex>=pPaletteStack->nSize) {
- sal_uInt32 * pOld0RGB=pPaletteStack->p0RGB;
- size_t nOldSize = pPaletteStack->nSize;
- if (pOld0RGB==nullptr) nOldSize=0;
- pPaletteStack->nSize=2*(nIndex+1);
- if (pPaletteStack->nSize<256) pPaletteStack->nSize=256;
- pPaletteStack->p0RGB = new sal_uInt32[pPaletteStack->nSize];
- for (size_t i=0; i < pPaletteStack->nSize; ++i)
- {
- if (i<nOldSize) pPaletteStack->p0RGB[i]=pOld0RGB[i];
- else if (i==0) pPaletteStack->p0RGB[i]=0x00ffffff;
- else pPaletteStack->p0RGB[i]=0;
- }
- delete[] pOld0RGB;
- }
- pPaletteStack->p0RGB[nIndex]=nCol;
-}
-
-sal_uInt32 OS2METReader::GetPalette0RGB(sal_uInt32 nIndex)
-{
- if (pPaletteStack!=nullptr && pPaletteStack->p0RGB!=nullptr &&
- pPaletteStack->nSize>nIndex) nIndex=pPaletteStack->p0RGB[nIndex];
- return nIndex;
-}
-
-Color OS2METReader::GetPaletteColor(sal_uInt32 nIndex)
-{
- nIndex=GetPalette0RGB(nIndex);
- return Color(sal::static_int_cast< sal_uInt8 >((nIndex>>16)&0xff),
- sal::static_int_cast< sal_uInt8 >((nIndex>>8)&0xff),
- sal::static_int_cast< sal_uInt8 >(nIndex&0xff));
-}
-
-sal_uInt16 OS2METReader::ReadBigEndianWord()
-{
- sal_uInt8 nLo(0), nHi(0);
- pOS2MET->ReadUChar( nHi ).ReadUChar( nLo );
- return (static_cast<sal_uInt16>(nHi)<<8)|(static_cast<sal_uInt16>(nLo)&0x00ff);
-}
-
-sal_uInt32 OS2METReader::ReadBigEndian3BytesLong()
-{
- sal_uInt8 nHi(0);
- pOS2MET->ReadUChar( nHi );
- sal_uInt16 nLo = ReadBigEndianWord();
- return ((static_cast<sal_uInt32>(nHi)<<16)&0x00ff0000)|static_cast<sal_uInt32>(nLo);
-}
-
-sal_uInt32 OS2METReader::ReadLittleEndian3BytesLong()
-{
- sal_uInt8 nHi,nMed,nLo;
-
- pOS2MET->ReadUChar( nLo ).ReadUChar( nMed ).ReadUChar( nHi );
- return ((static_cast<sal_uInt32>(nHi)&0xff)<<16)|((static_cast<sal_uInt32>(nMed)&0xff)<<8)|(static_cast<sal_uInt32>(nLo)&0xff);
-}
-
-sal_Int32 OS2METReader::ReadCoord(bool b32)
-{
- sal_Int32 l(0);
-
- if (b32) pOS2MET->ReadInt32( l );
- else { short s(0); pOS2MET->ReadInt16( s ); l = static_cast<sal_Int32>(s); }
- return l;
-}
-
-Point OS2METReader::ReadPoint( const bool bAdjustBoundRect )
-{
- sal_Int32 x = ReadCoord(bCoord32);
- sal_Int32 y = ReadCoord(bCoord32);
- x=x-aBoundingRect.Left();
- y=aBoundingRect.Bottom()-y;
-
- if (bAdjustBoundRect)
- {
- if (x == SAL_MAX_INT32 || y == SAL_MAX_INT32)
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- else
- aCalcBndRect.Union(tools::Rectangle(x, y, x + 1, y + 1));
- }
-
- return Point(x,y);
-}
-
-RasterOp OS2METReader::OS2MixToRasterOp(sal_uInt8 nMix)
-{
- switch (nMix) {
- case 0x0c: return RasterOp::Invert;
- case 0x04: return RasterOp::Xor;
- case 0x0b: return RasterOp::Xor;
- default: return RasterOp::OverPaint;
- }
-}
-
-void OS2METReader::ReadLine(bool bGivenPos, sal_uInt16 nOrderLen)
-{
- sal_uInt16 i,nPolySize;
-
- if (bCoord32) nPolySize=nOrderLen/8; else nPolySize=nOrderLen/4;
- if (!bGivenPos) nPolySize++;
- if (nPolySize==0) return;
- tools::Polygon aPolygon(nPolySize);
- for (i=0; i<nPolySize; i++) {
- if (i==0 && !bGivenPos) aPolygon.SetPoint(aAttr.aCurPos,i);
- else aPolygon.SetPoint(ReadPoint(),i);
- }
- aAttr.aCurPos=aPolygon.GetPoint(nPolySize-1);
- if (pAreaStack!=nullptr) AddPointsToArea(aPolygon);
- else if (pPathStack!=nullptr) AddPointsToPath(aPolygon);
- else
- {
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- SetRasterOp(aAttr.eLinMix);
- DrawPolyLine( aPolygon );
- }
-}
-
-void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen)
-{
- sal_uInt16 i,nPolySize;
- Point aP0;
-
- if (bGivenPos) {
- aP0=ReadPoint();
- if (bCoord32) nOrderLen-=8; else nOrderLen-=4;
- }
- else aP0=aAttr.aCurPos;
- if (nOrderLen > pOS2MET->remainingSize())
- throw css::uno::Exception("attempt to read past end of input", nullptr);
- nPolySize=nOrderLen/2;
- if (nPolySize==0) return;
- tools::Polygon aPolygon(nPolySize);
- for (i=0; i<nPolySize; i++) {
- sal_Int8 nsignedbyte;
- pOS2MET->ReadSChar( nsignedbyte ); aP0.AdjustX(static_cast<sal_Int32>(nsignedbyte));
- pOS2MET->ReadSChar( nsignedbyte ); aP0.AdjustY(-static_cast<sal_Int32>(nsignedbyte));
- aCalcBndRect.Union(tools::Rectangle(aP0,Size(1,1)));
- aPolygon.SetPoint(aP0,i);
- }
- aAttr.aCurPos=aPolygon.GetPoint(nPolySize-1);
- if (pAreaStack!=nullptr) AddPointsToArea(aPolygon);
- else if (pPathStack!=nullptr) AddPointsToPath(aPolygon);
- else
- {
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- SetRasterOp(aAttr.eLinMix);
- DrawPolyLine( aPolygon );
- }
-}
-
-void OS2METReader::ReadBox(bool bGivenPos)
-{
- sal_uInt8 nFlags;
- Point P0;
-
- pOS2MET->ReadUChar( nFlags );
- pOS2MET->SeekRel(1);
-
- if ( bGivenPos )
- P0 = ReadPoint();
- else
- P0 = aAttr.aCurPos;
-
- aAttr.aCurPos = ReadPoint();
- sal_Int32 nHRound = ReadCoord(bCoord32);
- sal_Int32 nVRound = ReadCoord(bCoord32);
-
- tools::Rectangle aBoxRect( P0, aAttr.aCurPos );
-
- if ( pAreaStack )
- AddPointsToArea( tools::Polygon( aBoxRect ) );
- else if ( pPathStack )
- AddPointsToPath( tools::Polygon( aBoxRect ) );
- else
- {
- if ( nFlags & 0x20 )
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- else
- SetPen( COL_TRANSPARENT );
-
- if ( nFlags & 0x40 )
- {
- ChangeBrush(aAttr.aPatCol, aAttr.bFill);
- SetRasterOp(aAttr.ePatMix);
- }
- else
- {
- ChangeBrush( COL_TRANSPARENT, false );
- SetRasterOp(aAttr.eLinMix);
- }
-
- if ( IsLineInfo() )
- {
- tools::Polygon aPolygon( aBoxRect, nHRound, nVRound );
- if ( nFlags & 0x40 )
- {
- pVirDev->Push( PushFlags::LINECOLOR );
- pVirDev->SetLineColor( COL_TRANSPARENT );
- pVirDev->DrawRect( aBoxRect, nHRound, nVRound );
- pVirDev->Pop();
- }
- pVirDev->DrawPolyLine( aPolygon, aLineInfo );
- }
- else
- pVirDev->DrawRect( aBoxRect, nHRound, nVRound );
- }
-}
-
-void OS2METReader::ReadBitBlt()
-{
- Point aP1,aP2;
- Size aSize;
- sal_uInt32 nID;
- OSBitmap * pB;
-
- pOS2MET->SeekRel(4);
- pOS2MET->ReadUInt32( nID );
- pOS2MET->SeekRel(4);
- aP1=ReadPoint(); aP2=ReadPoint();
- if (aP1.X() > aP2.X()) { auto nt=aP1.X(); aP1.setX(aP2.X() ); aP2.setX(nt ); }
- if (aP1.Y() > aP2.Y()) { auto nt=aP1.Y(); aP1.setY(aP2.Y() ); aP2.setY(nt ); }
- aSize=Size(aP2.X()-aP1.X(),aP2.Y()-aP1.Y());
-
- pB=pBitmapList;
- while (pB!=nullptr && pB->nID!=nID) pB=pB->pSucc;
- if (pB!=nullptr) {
- SetRasterOp(aAttr.ePatMix);
- pVirDev->DrawBitmapEx(aP1,aSize,pB->aBitmapEx);
- }
-}
-
-void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt16 nOrderLen)
-{
- Point aP0;
- sal_uInt16 i, nLen;
- OSFont * pF;
- vcl::Font aFont;
- Size aSize;
-
- pF = pFontList;
- while (pF!=nullptr && pF->nID!=aAttr.nChrSet) pF=pF->pSucc;
- if (pF!=nullptr)
- aFont = pF->aFont;
- aFont.SetColor(aAttr.aChrCol);
- aFont.SetFontSize(Size(0,aAttr.aChrCellSize.Height()));
- if ( aAttr.nChrAng )
- aFont.SetOrientation(aAttr.nChrAng);
-
- if (bGivenPos)
- aP0 = ReadPoint();
- else
- aP0 = aAttr.aCurPos;
- if (bExtra)
- {
- pOS2MET->SeekRel(2);
- ReadPoint( false );
- ReadPoint( false );
- pOS2MET->ReadUInt16( nLen );
- }
- else
- {
- if ( !bGivenPos )
- nLen = nOrderLen;
- else if ( bCoord32 )
- nLen = nOrderLen-8;
- else
- nLen = nOrderLen-4;
- }
- if (nLen > pOS2MET->remainingSize())
- throw css::uno::Exception("attempt to read past end of input", nullptr);
- std::unique_ptr<char[]> pChr(new char[nLen+1]);
- for (i=0; i<nLen; i++)
- pOS2MET->ReadChar( pChr[i] );
- pChr[nLen] = 0;
- OUString aStr( pChr.get(), strlen(pChr.get()), osl_getThreadTextEncoding() );
- SetRasterOp(aAttr.eChrMix);
- if (pVirDev->GetFont()!=aFont)
- pVirDev->SetFont(aFont);
- pVirDev->DrawText(aP0,aStr);
-
- aSize = Size( pVirDev->GetTextWidth(aStr), pVirDev->GetTextHeight() );
- if ( !aAttr.nChrAng )
- {
- aCalcBndRect.Union(tools::Rectangle( Point(aP0.X(),aP0.Y()-aSize.Height()),
- Size(aSize.Width(),aSize.Height()*2)));
- if (bMove)
- aAttr.aCurPos = Point( aP0.X() + aSize.Width(), aP0.Y());
- }
- else
- {
- tools::Polygon aDummyPoly(4);
-
- aDummyPoly.SetPoint( Point( aP0.X(), aP0.Y() ), 0); // TOP LEFT
- aDummyPoly.SetPoint( Point( aP0.X(), aP0.Y() - aSize.Height() ), 1); // BOTTOM LEFT
- aDummyPoly.SetPoint( Point( aP0.X() + aSize.Width(), aP0.Y() ), 2); // TOP RIGHT
- aDummyPoly.SetPoint( Point( aP0.X() + aSize.Width(), aP0.Y() - aSize.Height() ), 3);// BOTTOM RIGHT
- aDummyPoly.Rotate( aP0, aAttr.nChrAng );
- if ( bMove )
- aAttr.aCurPos = aDummyPoly.GetPoint( 0 );
- aCalcBndRect.Union( tools::Rectangle( aDummyPoly.GetPoint( 0 ), aDummyPoly.GetPoint( 3 ) ) );
- aCalcBndRect.Union( tools::Rectangle( aDummyPoly.GetPoint( 1 ), aDummyPoly.GetPoint( 2 ) ) );
- }
-}
-
-void OS2METReader::ReadArc(bool bGivenPos)
-{
- Point aP1, aP2, aP3;
- double x1,y1,x2,y2,x3,y3,p,q,cx,cy,ncx,ncy,r,rx,ry,w1,w3;
- if (bGivenPos) aP1=ReadPoint(); else aP1=aAttr.aCurPos;
- aP2=ReadPoint(); aP3=ReadPoint();
- aAttr.aCurPos=aP3;
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- SetRasterOp(aAttr.eLinMix);
- // Ok, given are 3 point of the ellipse, and the relation
- // of width and height (as p to q):
- x1=aP1.X(); y1=aP1.Y();
- x2=aP2.X(); y2=aP2.Y();
- x3=aP3.X(); y3=aP3.Y();
- p=aAttr.nArcP;q=aAttr.nArcQ;
- // Calculation of the center point cx, cy of the ellipse:
- ncy=2*p*p*((y3-y1)*(x2-x1)-(y1-y2)*(x1-x3));
- ncx=2*q*q*(x2-x1);
- if ( (ncx<0.001 && ncx>-0.001) || (ncy<0.001 && ncy>-0.001) ) {
- // Calculation impossible, points are all on the same straight line
- pVirDev->DrawLine(aP1,aP2);
- pVirDev->DrawLine(aP2,aP3);
- return;
- }
- cy=( q*q*((x3*x3-x1*x1)*(x2-x1)+(x2*x2-x1*x1)*(x1-x3)) +
- p*p*((y3*y3-y1*y1)*(x2-x1)+(y2*y2-y1*y1)*(x1-x3)) ) / ncy;
- cx=( q*q*(x2*x2-x1*x1)+p*p*(y2*y2-y1*y1)+cy*2*p*p*(y1-y2) ) / ncx;
- // now we still need the radius in x and y direction:
- r=sqrt(q*q*(x1-cx)*(x1-cx)+p*p*(y1-cy)*(y1-cy));
- rx=r/q; ry=r/p;
- // We now have to find out how the starting and the end point
- // have to be chosen so that point no. 2 lies inside the drawn arc:
- w1=fmod((atan2(x1-cx,y1-cy)-atan2(x2-cx,y2-cy)),6.28318530718); if (w1<0) w1+=6.28318530718;
- w3=fmod((atan2(x3-cx,y3-cy)-atan2(x2-cx,y2-cy)),6.28318530718); if (w3<0) w3+=6.28318530718;
- if (w3<w1) {
- pVirDev->DrawArc(tools::Rectangle(static_cast<sal_Int32>(cx-rx),static_cast<sal_Int32>(cy-ry),
- static_cast<sal_Int32>(cx+rx),static_cast<sal_Int32>(cy+ry)),aP1,aP3);
- }
- else {
- pVirDev->DrawArc(tools::Rectangle(static_cast<sal_Int32>(cx-rx),static_cast<sal_Int32>(cy-ry),
- static_cast<sal_Int32>(cx+rx),static_cast<sal_Int32>(cy+ry)),aP3,aP1);
- }
-}
-
-void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize)
-{
- Point aCenter;
- tools::Rectangle aRect;
-
- if (bGivenPos) {
- aCenter=ReadPoint();
- if (bCoord32) nOrderSize-=8; else nOrderSize-=4;
- }
- else aCenter=aAttr.aCurPos;
-
- sal_Int32 nP = aAttr.nArcP;
- sal_Int32 nQ = aAttr.nArcQ;
- if (nP < 0)
- nP = o3tl::saturating_toggle_sign(nP);
- if (nQ < 0)
- nQ = o3tl::saturating_toggle_sign(nQ);
- sal_uInt32 nMul(0);
- if (nOrderSize>=4)
- pOS2MET->ReadUInt32( nMul );
- else {
- sal_uInt16 nMulS(0);
- pOS2MET->ReadUInt16( nMulS );
- nMul=static_cast<sal_uInt32>(nMulS)<<8;
- }
- if (nMul!=0x00010000) {
- nP=(nP*nMul)>>16;
- nQ=(nQ*nMul)>>16;
- }
-
- aRect=tools::Rectangle(aCenter.X()-nP,aCenter.Y()-nQ,
- aCenter.X()+nP,aCenter.Y()+nQ);
- aCalcBndRect.Union(aRect);
-
- if (pAreaStack!=nullptr) {
- ChangeBrush(aAttr.aPatCol, aAttr.bFill);
- SetRasterOp(aAttr.ePatMix);
- if ((pAreaStack->nFlags&0x40)!=0)
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- else
- SetPen( COL_TRANSPARENT, 0, PEN_NULL );
- }
- else
- {
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- ChangeBrush(COL_TRANSPARENT, false);
- SetRasterOp(aAttr.eLinMix);
- }
- pVirDev->DrawEllipse(aRect);
-}
-
-void OS2METReader::ReadPartialArc(bool bGivenPos, sal_uInt16 nOrderSize)
-{
- Point aP0, aCenter,aPStart,aPEnd;
- tools::Rectangle aRect;
-
- if (bGivenPos) {
- aP0=ReadPoint();
- if (bCoord32) nOrderSize-=8; else nOrderSize-=4;
- }
- else aP0=aAttr.aCurPos;
- aCenter=ReadPoint();
-
- sal_Int32 nP = aAttr.nArcP;
- sal_Int32 nQ = aAttr.nArcQ;
- if (nP < 0)
- nP = o3tl::saturating_toggle_sign(nP);
- if (nQ < 0)
- nQ = o3tl::saturating_toggle_sign(nQ);
- sal_uInt32 nMul(0);
- if (nOrderSize>=12)
- pOS2MET->ReadUInt32( nMul );
- else {
- sal_uInt16 nMulS(0);
- pOS2MET->ReadUInt16( nMulS );
- nMul=static_cast<sal_uInt32>(nMulS)<<8;
- }
- if (nMul!=0x00010000) {
- nP=(nP*nMul)>>16;
- nQ=(nQ*nMul)>>16;
- }
-
- sal_Int32 nStart(0), nSweep(0);
- pOS2MET->ReadInt32( nStart ).ReadInt32( nSweep );
- double fStart = static_cast<double>(nStart)/65536.0/180.0*3.14159265359;
- double fEnd = fStart+ static_cast<double>(nSweep)/65536.0/180.0*3.14159265359;
- aPStart=Point(aCenter.X()+static_cast<sal_Int32>( cos(fStart)*nP),
- aCenter.Y()+static_cast<sal_Int32>(-sin(fStart)*nQ));
- aPEnd= Point(aCenter.X()+static_cast<sal_Int32>( cos(fEnd)*nP),
- aCenter.Y()+static_cast<sal_Int32>(-sin(fEnd)*nQ));
-
- aRect=tools::Rectangle(aCenter.X()-nP,aCenter.Y()-nQ,
- aCenter.X()+nP,aCenter.Y()+nQ);
- aCalcBndRect.Union(aRect);
-
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- SetRasterOp(aAttr.eLinMix);
-
- pVirDev->DrawLine(aP0,aPStart);
- pVirDev->DrawArc(aRect,aPStart,aPEnd);
- aAttr.aCurPos=aPEnd;
-}
-
-void OS2METReader::ReadPolygons()
-{
- tools::PolyPolygon aPolyPoly;
- tools::Polygon aPoly;
- Point aPoint;
-
- sal_uInt8 nFlags(0);
- sal_uInt32 nNumPolys(0);
- pOS2MET->ReadUChar(nFlags).ReadUInt32(nNumPolys);
-
- if (nNumPolys > SAL_MAX_UINT16)
- {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=11;
- return;
- }
-
- for (sal_uInt32 i=0; i<nNumPolys; ++i)
- {
- sal_uInt32 nNumPoints(0);
- pOS2MET->ReadUInt32(nNumPoints);
- sal_uInt32 nLimit = SAL_MAX_UINT16;
- if (i==0) --nLimit;
- if (nNumPoints > nLimit)
- {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=11;
- return;
- }
- if (i==0) ++nNumPoints;
- aPoly.SetSize(static_cast<short>(nNumPoints));
- for (sal_uInt32 j=0; j<nNumPoints; ++j)
- {
- if (i==0 && j==0) aPoint=aAttr.aCurPos;
- else aPoint=ReadPoint();
- aPoly.SetPoint(aPoint,static_cast<short>(j));
- if (i==nNumPolys-1 && j==nNumPoints-1) aAttr.aCurPos=aPoint;
- }
- aPolyPoly.Insert(aPoly);
- }
-
- ChangeBrush(aAttr.aPatCol, aAttr.bFill);
- SetRasterOp(aAttr.ePatMix);
- if ((nFlags&0x01)!=0)
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- else
- SetPen( COL_TRANSPARENT, 0, PEN_NULL );
- DrawPolyPolygon( aPolyPoly );
-}
-
-void OS2METReader::ReadBezier(bool bGivenPos, sal_uInt16 nOrderLen)
-{
- sal_uInt16 i, nNumPoints = nOrderLen / ( bCoord32 ? 8 : 4 );
-
- if( !bGivenPos )
- nNumPoints++;
-
- if( !nNumPoints )
- return;
-
- tools::Polygon aPolygon( nNumPoints );
-
- for( i=0; i < nNumPoints; i++ )
- {
- if( i==0 && !bGivenPos)
- aPolygon.SetPoint( aAttr.aCurPos, i );
- else
- aPolygon.SetPoint( ReadPoint(), i );
- }
-
- if( !( nNumPoints % 4 ) )
- {
- // create bezier polygon
- const sal_uInt16 nSegPoints = 25;
- const sal_uInt16 nSegments = aPolygon.GetSize() >> 2;
- tools::Polygon aBezPoly( nSegments * nSegPoints );
-
- sal_uInt16 nSeg, nBezPos, nStartPos;
- for( nSeg = 0, nBezPos = 0, nStartPos = 0; nSeg < nSegments; nSeg++, nStartPos += 4 )
- {
- const tools::Polygon aSegPoly( aPolygon[ nStartPos ], aPolygon[ nStartPos + 1 ],
- aPolygon[ nStartPos + 3 ], aPolygon[ nStartPos + 2 ],
- nSegPoints );
-
- for( sal_uInt16 nSegPos = 0; nSegPos < nSegPoints; )
- aBezPoly[ nBezPos++ ] = aSegPoly[ nSegPos++ ];
- }
-
- nNumPoints = nBezPos;
-
- if( nNumPoints != aBezPoly.GetSize() )
- aBezPoly.SetSize( nNumPoints );
-
- aPolygon = aBezPoly;
- }
-
- aAttr.aCurPos = aPolygon[ nNumPoints - 1 ];
-
- if (pAreaStack!=nullptr)
- AddPointsToArea(aPolygon);
- else if (pPathStack!=nullptr)
- AddPointsToPath(aPolygon);
- else
- {
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- SetRasterOp(aAttr.eLinMix);
- DrawPolyLine( aPolygon );
- }
-}
-
-void OS2METReader::ReadFillet(bool bGivenPos, sal_uInt16 nOrderLen)
-{
- sal_uInt16 i,nNumPoints;
-
- if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4;
- if (!bGivenPos) nNumPoints++;
- if (nNumPoints==0) return;
- tools::Polygon aPolygon(nNumPoints);
- for (i=0; i<nNumPoints; i++) {
- if (i==0 && !bGivenPos) aPolygon.SetPoint(aAttr.aCurPos,i);
- else aPolygon.SetPoint(ReadPoint(),i);
- }
- aAttr.aCurPos=aPolygon.GetPoint(nNumPoints-1);
- if (pAreaStack!=nullptr) AddPointsToArea(aPolygon);
- else if (pPathStack!=nullptr) AddPointsToPath(aPolygon);
- else {
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- SetRasterOp(aAttr.eLinMix);
- DrawPolyLine( aPolygon );
- }
-}
-
-void OS2METReader::ReadFilletSharp(bool bGivenPos, sal_uInt16 nOrderLen)
-{
- sal_uInt16 i,nNumPoints;
-
- if (bGivenPos) {
- aAttr.aCurPos=ReadPoint();
- if (bCoord32) nOrderLen-=8; else nOrderLen-=4;
- }
- if (bCoord32) nNumPoints=1+nOrderLen/10;
- else nNumPoints=1+nOrderLen/6;
- tools::Polygon aPolygon(nNumPoints);
- aPolygon.SetPoint(aAttr.aCurPos,0);
- for (i=1; i<nNumPoints; i++) aPolygon.SetPoint(ReadPoint(),i);
- aAttr.aCurPos=aPolygon.GetPoint(nNumPoints-1);
- if (pAreaStack!=nullptr) AddPointsToArea(aPolygon);
- else if (pPathStack!=nullptr) AddPointsToPath(aPolygon);
- else
- {
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- SetRasterOp(aAttr.eLinMix);
- DrawPolyLine( aPolygon );
- }
-}
-
-void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen)
-{
- sal_uInt16 i,nNumPoints;
-
- SetPen( aAttr.aMrkCol );
- SetRasterOp(aAttr.eMrkMix);
- if (aAttr.nMrkSymbol>=5 && aAttr.nMrkSymbol<=9)
- {
- ChangeBrush(aAttr.aMrkCol, true);
- }
- else
- {
- ChangeBrush(COL_TRANSPARENT, false);
- }
- if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4;
- if (!bGivenPos) nNumPoints++;
- for (i=0; i<nNumPoints; i++) {
- if (i!=0 || bGivenPos) aAttr.aCurPos=ReadPoint();
- const auto x = aAttr.aCurPos.X();
- const auto y = aAttr.aCurPos.Y();
- aCalcBndRect.Union(tools::Rectangle(x-5,y-5,x+5,y+5));
- switch (aAttr.nMrkSymbol) {
- case 2: // PLUS
- pVirDev->DrawLine(Point(x-4,y),Point(x+4,y));
- pVirDev->DrawLine(Point(x,y-4),Point(x,y+4));
- break;
- case 3: // DIAMOND
- case 7: { // SOLIDDIAMOND
- tools::Polygon aPoly(4);
- aPoly.SetPoint(Point(x,y+4),0);
- aPoly.SetPoint(Point(x+4,y),1);
- aPoly.SetPoint(Point(x,y-4),2);
- aPoly.SetPoint(Point(x-4,y),3);
- pVirDev->DrawPolygon(aPoly);
- break;
- }
- case 4: // SQUARE
- case 8: { // SOLIDSUARE
- tools::Polygon aPoly(4);
- aPoly.SetPoint(Point(x+4,y+4),0);
- aPoly.SetPoint(Point(x+4,y-4),1);
- aPoly.SetPoint(Point(x-4,y-4),2);
- aPoly.SetPoint(Point(x-4,y+4),3);
- pVirDev->DrawPolygon(aPoly);
- break;
- }
- case 5: { // SIXPOINTSTAR
- tools::Polygon aPoly(12);
- aPoly.SetPoint(Point(x ,y-4),0);
- aPoly.SetPoint(Point(x+2,y-2),1);
- aPoly.SetPoint(Point(x+4,y-2),2);
- aPoly.SetPoint(Point(x+2,y ),3);
- aPoly.SetPoint(Point(x+4,y+2),4);
- aPoly.SetPoint(Point(x+2,y+2),5);
- aPoly.SetPoint(Point(x ,y+4),6);
- aPoly.SetPoint(Point(x-2,y+2),7);
- aPoly.SetPoint(Point(x-4,y+2),8);
- aPoly.SetPoint(Point(x-2,y ),9);
- aPoly.SetPoint(Point(x-4,y-2),10);
- aPoly.SetPoint(Point(x-2,y-2),11);
- pVirDev->DrawPolygon(aPoly);
- break;
- }
- case 6: { // EIGHTPOINTSTAR
- tools::Polygon aPoly(16);
- aPoly.SetPoint(Point(x ,y-4),0);
- aPoly.SetPoint(Point(x+1,y-2),1);
- aPoly.SetPoint(Point(x+3,y-3),2);
- aPoly.SetPoint(Point(x+2,y-1),3);
- aPoly.SetPoint(Point(x+4,y ),4);
- aPoly.SetPoint(Point(x+2,y+1),5);
- aPoly.SetPoint(Point(x+3,y+3),6);
- aPoly.SetPoint(Point(x+1,y+2),7);
- aPoly.SetPoint(Point(x ,y+4),8);
- aPoly.SetPoint(Point(x-1,y+2),9);
- aPoly.SetPoint(Point(x-3,y+3),10);
- aPoly.SetPoint(Point(x-2,y+1),11);
- aPoly.SetPoint(Point(x-4,y ),12);
- aPoly.SetPoint(Point(x-2,y-1),13);
- aPoly.SetPoint(Point(x-3,y-3),14);
- aPoly.SetPoint(Point(x-1,y-2),15);
- pVirDev->DrawPolygon(aPoly);
- break;
- }
- case 9: // DOT
- pVirDev->DrawEllipse(tools::Rectangle(x-1,y-1,x+1,y+1));
- break;
- case 10: // SMALLCIRCLE
- pVirDev->DrawEllipse(tools::Rectangle(x-2,y-2,x+2,y+2));
- break;
- case 64: // BLANK
- break;
- default: // (=1) CROSS
- pVirDev->DrawLine(Point(x-4,y-4),Point(x+4,y+4));
- pVirDev->DrawLine(Point(x-4,y+4),Point(x+4,y-4));
- break;
- }
- }
-}
-
-void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
-{
- switch (nOrderID) {
-
- case GOrdGivArc: ReadArc(true); break;
- case GOrdCurArc: ReadArc(false); break;
-
- case GOrdGivBzr: ReadBezier(true,nOrderLen); break;
- case GOrdCurBzr: ReadBezier(false,nOrderLen); break;
-
- case GOrdGivBox: ReadBox(true); break;
- case GOrdCurBox: ReadBox(false); break;
-
- case GOrdGivFil: ReadFillet(true,nOrderLen); break;
- case GOrdCurFil: ReadFillet(false,nOrderLen); break;
-
- case GOrdGivCrc: ReadFullArc(true,nOrderLen); break;
- case GOrdCurCrc: ReadFullArc(false,nOrderLen); break;
-
- case GOrdGivLin: ReadLine(true, nOrderLen); break;
- case GOrdCurLin: ReadLine(false, nOrderLen); break;
-
- case GOrdGivMrk: ReadMarker(true, nOrderLen); break;
- case GOrdCurMrk: ReadMarker(false, nOrderLen); break;
-
- case GOrdGivArP: ReadPartialArc(true,nOrderLen); break;
- case GOrdCurArP: ReadPartialArc(false,nOrderLen); break;
-
- case GOrdGivRLn: ReadRelLine(true,nOrderLen); break;
- case GOrdCurRLn: ReadRelLine(false,nOrderLen); break;
-
- case GOrdGivSFl: ReadFilletSharp(true,nOrderLen); break;
- case GOrdCurSFl: ReadFilletSharp(false,nOrderLen); break;
-
- case GOrdGivStM: ReadChrStr(true , true , false, nOrderLen); break;
- case GOrdCurStM: ReadChrStr(false, true , false, nOrderLen); break;
- case GOrdGivStr: ReadChrStr(true , false, false, nOrderLen); break;
- case GOrdCurStr: ReadChrStr(false, false, false, nOrderLen); break;
- case GOrdGivStx: ReadChrStr(true , false, true , nOrderLen); break;
- case GOrdCurStx: ReadChrStr(false, false, true , nOrderLen); break;
-
- case GOrdGivImg: SAL_INFO("filter.os2met","GOrdGivImg");
- break;
- case GOrdCurImg: SAL_INFO("filter.os2met","GOrdCurImg");
- break;
- case GOrdImgDat: SAL_INFO("filter.os2met","GOrdImgDat");
- break;
- case GOrdEndImg: SAL_INFO("filter.os2met","GOrdEndImg");
- break;
-
- case GOrdBegAra: {
- OSArea * p=new OSArea;
- p->bClosed=false;
- p->pSucc=pAreaStack; pAreaStack=p;
- pOS2MET->ReadUChar( p->nFlags );
- p->aCol=aAttr.aPatCol;
- p->aBgCol=aAttr.aPatBgCol;
- p->eMix=aAttr.ePatMix;
- p->eBgMix=aAttr.ePatBgMix;
- p->bFill=aAttr.bFill;
- break;
- }
- case GOrdEndAra:
- {
- OSArea * p=pAreaStack;
- if ( p )
- {
- pAreaStack = p->pSucc;
- if ( pPathStack )
- {
- for ( sal_uInt16 i=0; i<p->aPPoly.Count(); i++ )
- {
- AddPointsToPath( p->aPPoly.GetObject( i ) );
- CloseFigure();
- }
- }
- else
- {
- if ( ( p->nFlags & 0x40 ) == 0 )
- SetPen( COL_TRANSPARENT, 0, PEN_NULL );
- else
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
-
- ChangeBrush(p->aCol, p->bFill);
- SetRasterOp(p->eMix);
- DrawPolyPolygon( p->aPPoly );
- }
- delete p;
- }
- }
- break;
-
- case GOrdBegElm: SAL_INFO("filter.os2met","GOrdBegElm");
- break;
- case GOrdEndElm: SAL_INFO("filter.os2met","GOrdEndElm");
- break;
-
- case GOrdBegPth: {
- OSPath * p=new OSPath;
- p->pSucc=pPathStack; pPathStack=p;
- pOS2MET->SeekRel(2);
- pOS2MET->ReadUInt32( p->nID );
- p->bClosed=false;
- p->bStroke=false;
- break;
- }
- case GOrdEndPth: {
- OSPath * p, * pprev, * psucc;
- if (pPathStack==nullptr) break;
- p=pPathList; pprev=nullptr;
- while (p!=nullptr) {
- psucc=p->pSucc;
- if (p->nID==pPathStack->nID) {
- if (pprev==nullptr) pPathList=psucc; else pprev->pSucc=psucc;
- delete p;
- }
- else pprev=p;
- p=psucc;
- }
- p=pPathStack;
- pPathStack=p->pSucc;
- p->pSucc=pPathList; pPathList=p;
- break;
- }
- case GOrdFilPth:
- {
- sal_uInt32 nID;
- sal_uInt16 nDummy;
- OSPath* p = pPathList;
-
- pOS2MET->ReadUInt16( nDummy )
- .ReadUInt32( nID );
-
- if ( ! ( nDummy & 0x20 ) ) // #30933# i do not know the exact meaning of this bit,
- { // but if set it seems to be better not to fill this path
- while( p && p->nID != nID )
- p = p->pSucc;
-
- if( p )
- {
- if( p->bStroke )
- {
- SetPen( aAttr.aPatCol, aAttr.nStrLinWidth );
- ChangeBrush(COL_TRANSPARENT, false);
- SetRasterOp( aAttr.ePatMix );
- if ( IsLineInfo() )
- {
- for ( sal_uInt16 i = 0; i < p->aPPoly.Count(); i++ )
- pVirDev->DrawPolyLine( p->aPPoly.GetObject( i ), aLineInfo );
- }
- else
- pVirDev->DrawPolyPolygon( p->aPPoly );
- }
- else
- {
- SetPen( COL_TRANSPARENT, 0, PEN_NULL );
- ChangeBrush( aAttr.aPatCol, aAttr.bFill );
- SetRasterOp( aAttr.ePatMix );
- pVirDev->DrawPolyPolygon( p->aPPoly );
- }
- }
- }
- }
- break;
-
- case GOrdModPth:
- {
- OSPath* p = pPathList;
-
- while( p && p->nID != 1 )
- p = p->pSucc;
-
- if( p )
- p->bStroke = true;
- }
- break;
-
- case GOrdOutPth:
- {
- sal_uInt32 nID;
- sal_uInt16 i,nC;
- OSPath* p=pPathList;
- pOS2MET->SeekRel(2);
- pOS2MET->ReadUInt32( nID );
- while (p!=nullptr && p->nID!=nID)
- p=p->pSucc;
-
- if( p!=nullptr )
- {
- SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- SetRasterOp(aAttr.eLinMix);
- ChangeBrush(COL_TRANSPARENT, false);
- nC=p->aPPoly.Count();
- for (i=0; i<nC; i++)
- {
- if (i+1<nC || p->bClosed)
- DrawPolygon( p->aPPoly.GetObject( i ) );
- else
- DrawPolyLine( p->aPPoly.GetObject( i ) );
- }
- }
- break;
- }
- case GOrdSClPth: {
- SAL_INFO("filter.os2met","GOrdSClPth");
- sal_uInt32 nID;
- OSPath * p=pPathList;
- pOS2MET->SeekRel(2);
- pOS2MET->ReadUInt32( nID );
- if (nID==0) p=nullptr;
- while (p!=nullptr && p->nID!=nID) p=p->pSucc;
- if (p!=nullptr) pVirDev->SetClipRegion(vcl::Region(p->aPPoly));
- else pVirDev->SetClipRegion();
- break;
- }
- case GOrdNopNop:
- break;
- case GOrdRemark: SAL_INFO("filter.os2met","GOrdRemark");
- break;
- case GOrdSegLab: SAL_INFO("filter.os2met","GOrdSegLab");
- break;
-
- case GOrdBitBlt: ReadBitBlt(); break;
-
- case GOrdCalSeg: SAL_INFO("filter.os2met","GOrdCalSeg");
- break;
- case GOrdSSgBnd: SAL_INFO("filter.os2met","GOrdSSgBnd");
- break;
- case GOrdSegChr: SAL_INFO("filter.os2met","GOrdSegChr");
- break;
- case GOrdCloFig:
- CloseFigure();
- break;
- case GOrdEndSym: SAL_INFO("filter.os2met","GOrdEndSym");
- break;
- case GOrdEndPlg: SAL_INFO("filter.os2met","GOrdEndPlg");
- break;
- case GOrdEscape: SAL_INFO("filter.os2met","GOrdEscape");
- break;
- case GOrdExtEsc: SAL_INFO("filter.os2met","GOrdExtEsc");
- break;
-
- case GOrdPolygn: ReadPolygons(); break;
-
- case GOrdStkPop: PopAttr(); break;
-
- case GOrdPIvAtr: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSIvAtr: {
- sal_uInt8 nA, nP, nFlags;
- Color aCol;
- RasterOp eROP;
- pOS2MET->ReadUChar( nA ).ReadUChar( nP ).ReadUChar( nFlags );
- if (nOrderID==GOrdPIvAtr) {
- pAttrStack->nIvAttrA=nA;
- pAttrStack->nIvAttrP=nP;
- }
- if (nA<=2) {
- if ((nFlags&0x80)!=0) {
- if (nA==1) switch (nP) {
- case 1: aAttr.aLinCol=aDefAttr.aLinCol; break;
- case 2: aAttr.aChrCol=aDefAttr.aChrCol; break;
- case 3: aAttr.aMrkCol=aDefAttr.aMrkCol; break;
- case 4: aAttr.aPatCol=aDefAttr.aPatCol; break;
- case 5: aAttr.aImgCol=aDefAttr.aImgCol; break;
- }
- else switch (nP) {
- case 1: aAttr.aLinBgCol=aDefAttr.aLinBgCol; break;
- case 2: aAttr.aChrBgCol=aDefAttr.aChrBgCol; break;
- case 3: aAttr.aMrkBgCol=aDefAttr.aMrkBgCol; break;
- case 4: aAttr.aPatBgCol=aDefAttr.aPatBgCol; break;
- case 5: aAttr.aImgBgCol=aDefAttr.aImgBgCol; break;
- }
- }
- else {
- const auto nVal = ReadLittleEndian3BytesLong();
- if ((nFlags&0x40)!=0 && nVal==1) aCol=COL_BLACK;
- else if ((nFlags&0x40)!=0 && nVal==2) aCol=COL_WHITE;
- else if ((nFlags&0x40)!=0 && nVal==4) aCol=COL_WHITE;
- else if ((nFlags&0x40)!=0 && nVal==5) aCol=COL_BLACK;
- else aCol=GetPaletteColor(nVal);
- if (nA==1) switch (nP) {
- case 1: aAttr.aLinCol=aCol; break;
- case 2: aAttr.aChrCol=aCol; break;
- case 3: aAttr.aMrkCol=aCol; break;
- case 4: aAttr.aPatCol=aCol; break;
- case 5: aAttr.aImgCol=aCol; break;
- }
- else switch (nP) {
- case 1: aAttr.aLinBgCol=aCol; break;
- case 2: aAttr.aChrBgCol=aCol; break;
- case 3: aAttr.aMrkBgCol=aCol; break;
- case 4: aAttr.aPatBgCol=aCol; break;
- case 5: aAttr.aImgBgCol=aCol; break;
- }
- }
- }
- else {
- sal_uInt8 nMix;
- pOS2MET->ReadUChar( nMix );
- if (nMix==0) {
- switch (nP) {
- case 1: aAttr.eLinBgMix=aDefAttr.eLinBgMix; break;
- case 2: aAttr.eChrBgMix=aDefAttr.eChrBgMix; break;
- case 3: aAttr.eMrkBgMix=aDefAttr.eMrkBgMix; break;
- case 4: aAttr.ePatBgMix=aDefAttr.ePatBgMix; break;
- case 5: aAttr.eImgBgMix=aDefAttr.eImgBgMix; break;
- }
- }
- else {
- eROP=OS2MixToRasterOp(nMix);
- switch (nP) {
- case 1: aAttr.eLinBgMix=eROP; break;
- case 2: aAttr.eChrBgMix=eROP; break;
- case 3: aAttr.eMrkBgMix=eROP; break;
- case 4: aAttr.ePatBgMix=eROP; break;
- case 5: aAttr.eImgBgMix=eROP; break;
- }
- }
- }
- break;
- }
- case GOrdPIxCol: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSIxCol: {
- sal_uInt8 nFlags;
- pOS2MET->ReadUChar( nFlags );
- if ((nFlags&0x80)!=0) {
- aAttr.aLinCol=aDefAttr.aLinCol;
- aAttr.aChrCol=aDefAttr.aChrCol;
- aAttr.aMrkCol=aDefAttr.aMrkCol;
- aAttr.aPatCol=aDefAttr.aPatCol;
- aAttr.aImgCol=aDefAttr.aImgCol;
- }
- else {
- Color aCol;
- const auto nVal = ReadLittleEndian3BytesLong();
- if ((nFlags&0x40)!=0 && nVal==1) aCol=COL_BLACK;
- else if ((nFlags&0x40)!=0 && nVal==2) aCol=COL_WHITE;
- else if ((nFlags&0x40)!=0 && nVal==4) aCol=COL_WHITE;
- else if ((nFlags&0x40)!=0 && nVal==5) aCol=COL_BLACK;
- else aCol=GetPaletteColor(nVal);
- aAttr.aLinCol = aAttr.aChrCol = aAttr.aMrkCol = aAttr.aPatCol =
- aAttr.aImgCol = aCol;
- }
- break;
- }
-
- case GOrdPColor:
- case GOrdPXtCol: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSColor:
- case GOrdSXtCol: {
- sal_uInt16 nVal;
- if (nOrderID==GOrdPColor || nOrderID==GOrdSColor) {
- sal_uInt8 nbyte;
- pOS2MET->ReadUChar( nbyte ); nVal=static_cast<sal_uInt16>(nbyte)|0xff00;
- }
- else pOS2MET->ReadUInt16( nVal );
- if (nVal==0x0000 || nVal==0xff00) {
- aAttr.aLinCol=aDefAttr.aLinCol;
- aAttr.aChrCol=aDefAttr.aChrCol;
- aAttr.aMrkCol=aDefAttr.aMrkCol;
- aAttr.aPatCol=aDefAttr.aPatCol;
- aAttr.aImgCol=aDefAttr.aImgCol;
- }
- else {
- Color aCol;
- if (nVal==0x0007) aCol=COL_WHITE;
- else if (nVal==0x0008) aCol=COL_BLACK;
- else if (nVal==0xff08) aCol=GetPaletteColor(1);
- else aCol=GetPaletteColor(static_cast<sal_uInt32>(nVal) & 0x000000ff);
- aAttr.aLinCol = aAttr.aChrCol = aAttr.aMrkCol = aAttr.aPatCol =
- aAttr.aImgCol = aCol;
- }
- break;
- }
-
- case GOrdPBgCol: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSBgCol: {
- sal_uInt16 nVal;
- pOS2MET->ReadUInt16( nVal );
- if (nVal==0x0000 || nVal==0xff00) {
- aAttr.aLinBgCol=aDefAttr.aLinBgCol;
- aAttr.aChrBgCol=aDefAttr.aChrBgCol;
- aAttr.aMrkBgCol=aDefAttr.aMrkBgCol;
- aAttr.aPatBgCol=aDefAttr.aPatBgCol;
- aAttr.aImgBgCol=aDefAttr.aImgBgCol;
- }
- else {
- Color aCol;
- if (nVal==0x0007) aCol=COL_WHITE;
- else if (nVal==0x0008) aCol=COL_BLACK;
- else if (nVal==0xff08) aCol=GetPaletteColor(0);
- else aCol=GetPaletteColor(static_cast<sal_uInt32>(nVal) & 0x000000ff);
- aAttr.aLinBgCol = aAttr.aChrBgCol = aAttr.aMrkBgCol =
- aAttr.aPatBgCol = aAttr.aImgBgCol = aCol;
- }
- break;
- }
- case GOrdPBxCol: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSBxCol: {
- sal_uInt8 nFlags;
- pOS2MET->ReadUChar( nFlags );
- if ((nFlags&0x80)!=0) {
- aAttr.aLinBgCol=aDefAttr.aLinBgCol;
- aAttr.aChrBgCol=aDefAttr.aChrBgCol;
- aAttr.aMrkBgCol=aDefAttr.aMrkBgCol;
- aAttr.aPatBgCol=aDefAttr.aPatBgCol;
- aAttr.aImgBgCol=aDefAttr.aImgBgCol;
- }
- else {
- Color aCol;
- const auto nVal = ReadLittleEndian3BytesLong();
- if ((nFlags&0x40)!=0 && nVal==1) aCol=COL_BLACK;
- else if ((nFlags&0x40)!=0 && nVal==2) aCol=COL_WHITE;
- else if ((nFlags&0x40)!=0 && nVal==4) aCol=COL_WHITE;
- else if ((nFlags&0x40)!=0 && nVal==5) aCol=COL_BLACK;
- else aCol=GetPaletteColor(nVal);
- aAttr.aLinBgCol = aAttr.aChrBgCol = aAttr.aMrkBgCol =
- aAttr.aPatBgCol = aAttr.aImgBgCol = aCol;
- }
- break;
- }
-
- case GOrdPMixMd: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSMixMd: {
- sal_uInt8 nMix;
- pOS2MET->ReadUChar( nMix );
- if (nMix==0) {
- aAttr.eLinMix=aDefAttr.eLinMix;
- aAttr.eChrMix=aDefAttr.eChrMix;
- aAttr.eMrkMix=aDefAttr.eMrkMix;
- aAttr.ePatMix=aDefAttr.ePatMix;
- aAttr.eImgMix=aDefAttr.eImgMix;
- }
- else {
- aAttr.eLinMix = aAttr.eChrMix = aAttr.eMrkMix =
- aAttr.ePatMix = aAttr.eImgMix = OS2MixToRasterOp(nMix);
- }
- break;
- }
- case GOrdPBgMix: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSBgMix: {
- sal_uInt8 nMix;
- pOS2MET->ReadUChar( nMix );
- if (nMix==0) {
- aAttr.eLinBgMix=aDefAttr.eLinBgMix;
- aAttr.eChrBgMix=aDefAttr.eChrBgMix;
- aAttr.eMrkBgMix=aDefAttr.eMrkBgMix;
- aAttr.ePatBgMix=aDefAttr.ePatBgMix;
- aAttr.eImgBgMix=aDefAttr.eImgBgMix;
- }
- else {
- aAttr.eLinBgMix = aAttr.eChrBgMix = aAttr.eMrkBgMix =
- aAttr.ePatBgMix = aAttr.eImgBgMix = OS2MixToRasterOp(nMix);
- }
- break;
- }
- case GOrdPPtSet: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSPtSet: SAL_INFO("filter.os2met","GOrdSPtSet");
- break;
-
- case GOrdPPtSym: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSPtSym: {
- sal_uInt8 nPatt;
- pOS2MET->ReadUChar( nPatt );
- aAttr.bFill = ( nPatt != 0x0f );
- break;
- }
-
- case GOrdPPtRef: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSPtRef: SAL_INFO("filter.os2met","GOrdSPtRef");
- break;
-
- case GOrdPLnEnd: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSLnEnd:
- break;
-
- case GOrdPLnJoi: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSLnJoi:
- break;
-
- case GOrdPLnTyp: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSLnTyp: {
- sal_uInt8 nType;
- pOS2MET->ReadUChar( nType );
- switch (nType) {
- case 0: aAttr.eLinStyle=aDefAttr.eLinStyle; break;
- case 1: case 4: aAttr.eLinStyle=PEN_DOT; break;
- case 2: case 5: aAttr.eLinStyle=PEN_DASH; break;
- case 3: case 6: aAttr.eLinStyle=PEN_DASHDOT; break;
- case 8: aAttr.eLinStyle=PEN_NULL; break;
- default: aAttr.eLinStyle=PEN_SOLID;
- }
- break;
- }
- case GOrdPLnWdt: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSLnWdt: {
- sal_uInt8 nbyte;
- pOS2MET->ReadUChar( nbyte );
- if (nbyte==0) aAttr.nLinWidth=aDefAttr.nLinWidth;
- else aAttr.nLinWidth=static_cast<sal_uInt16>(nbyte)-1;
- break;
- }
- case GOrdPFrLWd: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSFrLWd:
- break;
-
- case GOrdPStLWd: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSStLWd :
- {
- sal_uInt8 nFlags;
-
- pOS2MET->ReadUChar( nFlags );
- if ( nFlags & 0x80 )
- aAttr.nStrLinWidth = aDefAttr.nStrLinWidth;
- else
- {
- pOS2MET->SeekRel( 1 );
- sal_Int32 nWd = ReadCoord( bCoord32 );
- if (nWd < 0)
- nWd = o3tl::saturating_toggle_sign(nWd);
- aAttr.nStrLinWidth = static_cast<sal_uInt16>(nWd);
- }
- break;
- }
- case GOrdPChDir: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSChDir:
- break;
-
- case GOrdPChPrc: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSChPrc:
- break;
-
- case GOrdPChSet: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSChSet: {
- sal_uInt8 nbyte; pOS2MET->ReadUChar( nbyte );
- aAttr.nChrSet=static_cast<sal_uInt32>(nbyte)&0xff;
- break;
- }
- case GOrdPChAng: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSChAng: {
- sal_Int32 nX = ReadCoord(bCoord32);
- sal_Int32 nY = ReadCoord(bCoord32);
- if (nX>=0 && nY==0) aAttr.nChrAng=0_deg10;
- else {
- aAttr.nChrAng = Degree10(static_cast<short>(atan2(static_cast<double>(nY),static_cast<double>(nX))/3.1415926539*1800.0));
- while (aAttr.nChrAng < 0_deg10) aAttr.nChrAng += 3600_deg10;
- aAttr.nChrAng %= 3600_deg10;
- }
- break;
- }
- case GOrdPChBrx: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSChBrx:
- break;
-
- case GOrdPChCel: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSChCel: {
- sal_uInt16 nLen=nOrderLen;
- auto nWidth = ReadCoord(bCoord32);
- auto nHeight = ReadCoord(bCoord32);
- if (nWidth < 0 || nHeight < 0)
- aAttr.aChrCellSize = aDefAttr.aChrCellSize;
- else
- aAttr.aChrCellSize = Size(nWidth, nHeight);
- if (bCoord32) nLen-=8; else nLen-=4;
- if (nLen>=4) {
- pOS2MET->SeekRel(4); nLen-=4;
- }
- if (nLen>=2) {
- sal_uInt8 nbyte;
- pOS2MET->ReadUChar( nbyte );
- if ((nbyte&0x80)==0 && aAttr.aChrCellSize==Size(0,0))
- aAttr.aChrCellSize = aDefAttr.aChrCellSize;
- }
- break;
- }
- case GOrdPChXtr: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSChXtr:
- break;
-
- case GOrdPChShr: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSChShr:
- break;
-
- case GOrdPTxAlg: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSTxAlg: SAL_INFO("filter.os2met","GOrdSTxAlg");
- break;
-
- case GOrdPMkPrc: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSMkPrc: {
- sal_uInt8 nbyte;
- pOS2MET->ReadUChar( nbyte );
- if (nbyte==0) aAttr.nMrkPrec=aDefAttr.nMrkPrec;
- else aAttr.nMrkPrec=nbyte;
- break;
- }
-
- case GOrdPMkSet: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSMkSet: {
- sal_uInt8 nbyte;
- pOS2MET->ReadUChar( nbyte );
- if (nbyte==0) aAttr.nMrkSet=aDefAttr.nMrkSet;
- else aAttr.nMrkSet=nbyte;
- break;
- }
-
- case GOrdPMkSym: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSMkSym: {
- sal_uInt8 nbyte;
- pOS2MET->ReadUChar( nbyte );
- if (nbyte==0) aAttr.nMrkSymbol=aDefAttr.nMrkSymbol;
- else aAttr.nMrkSymbol=nbyte;
- break;
- }
-
- case GOrdPMkCel: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSMkCel: {
- sal_uInt16 nLen=nOrderLen;
- aAttr.aMrkCellSize.setWidth(ReadCoord(bCoord32) );
- aAttr.aMrkCellSize.setHeight(ReadCoord(bCoord32) );
- if (bCoord32) nLen-=8; else nLen-=4;
- if (nLen>=2) {
- sal_uInt8 nbyte;
- pOS2MET->ReadUChar( nbyte );
- if ((nbyte&0x80)==0 && aAttr.aMrkCellSize==Size(0,0))
- aAttr.aMrkCellSize=aDefAttr.aMrkCellSize;
- }
- break;
- }
-
- case GOrdPArcPa: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSArcPa:
- aAttr.nArcP=ReadCoord(bCoord32);
- aAttr.nArcQ=ReadCoord(bCoord32);
- aAttr.nArcR=ReadCoord(bCoord32);
- aAttr.nArcS=ReadCoord(bCoord32);
- break;
-
- case GOrdPCrPos: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSCrPos:
- aAttr.aCurPos=ReadPoint();
- break;
-
- case GOrdPMdTrn: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSMdTrn: SAL_INFO("filter.os2met","GOrdSMdTrn");
- break;
-
- case GOrdPPkIdn: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSPkIdn: SAL_INFO("filter.os2met","GOrdSPkIdn");
- break;
-
- case GOrdSVwTrn: SAL_INFO("filter.os2met","GOrdSVwTrn");
- break;
-
- case GOrdPVwWin: PushAttr(nOrderID);
- [[fallthrough]];
- case GOrdSVwWin: SAL_INFO("filter.os2met","GOrdSVwWin");
- break;
- default: SAL_INFO("filter.os2met","Unknown order: " << nOrderID);
- }
-}
-
-void OS2METReader::ReadDsc(sal_uInt16 nDscID)
-{
- switch (nDscID) {
- case 0x00f7: { // 'Specify GVM Subset'
- sal_uInt8 nbyte;
- pOS2MET->SeekRel(6);
- pOS2MET->ReadUChar( nbyte );
- if (nbyte==0x05) bCoord32=true;
- else if (nbyte==0x04) bCoord32=false;
- else {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=1;
- }
- break;
- }
- case 0x00f6:
- {
- // 'Set Picture Descriptor'
- bool b32;
- sal_uInt8 nbyte,nUnitType;
-
- pOS2MET->SeekRel(2);
- pOS2MET->ReadUChar( nbyte );
-
- if (nbyte==0x05)
- b32=true;
- else if(nbyte==0x04)
- b32=false;
- else
- {
- b32 = false; // -Wall added the case.
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=2;
- }
-
- pOS2MET->ReadUChar( nUnitType );
-
- sal_Int32 xr = ReadCoord(b32);
- sal_Int32 yr = ReadCoord(b32);
-
- ReadCoord(b32);
-
- if (nUnitType==0x00 && xr>0 && yr>0)
- aGlobMapMode=MapMode(MapUnit::MapInch,Point(0,0),Fraction(10,xr),Fraction(10,yr));
- else if (nUnitType==0x01 && xr>0 && yr>0)
- aGlobMapMode=MapMode(MapUnit::MapCM,Point(0,0),Fraction(10,xr),Fraction(10,yr));
- else
- aGlobMapMode=MapMode();
-
- sal_Int32 x1 = ReadCoord(b32);
- sal_Int32 x2 = ReadCoord(b32);
- sal_Int32 y1 = ReadCoord(b32);
- sal_Int32 y2 = ReadCoord(b32);
-
- if (x1>x2)
- {
- const auto nt = x1;
- x1=x2;
- x2=nt;
- }
-
- if (y1>y2)
- {
- const auto nt = y1;
- y1=y2;
- y2=nt;
- }
-
- aBoundingRect.SetLeft( x1 );
- aBoundingRect.SetRight( x2 );
- aBoundingRect.SetTop( y1 );
- aBoundingRect.SetBottom( y2 );
-
- // no output beside this bounding rect
- pVirDev->IntersectClipRegion( tools::Rectangle( Point(), aBoundingRect.GetSize() ) );
-
- break;
- }
- case 0x0021: // 'Set Current Defaults'
- break;
- }
-}
-
-void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
-{
- OSBitmap * p=pBitmapList; if (p==nullptr) return;
-
- switch (nDataID) {
-
- case 0x0070: // Begin Segment
- break;
-
- case 0x0091: // Begin Image Content
- break;
-
- case 0x0094: // Image Size
- pOS2MET->SeekRel(5);
- p->nHeight=ReadBigEndianWord();
- p->nWidth=ReadBigEndianWord();
- break;
-
- case 0x0095: // Image Encoding
- break;
-
- case 0x0096: { // Image IDE-Size
- sal_uInt8 nbyte;
- pOS2MET->ReadUChar( nbyte ); p->nBitsPerPixel=nbyte;
- break;
- }
-
- case 0x0097: // Image LUT-ID
- break;
-
- case 0x009b: // IDE Structure
- break;
-
- case 0xfe92: { // Image Data
- // At the latest we now need the temporary BMP file and
- // inside this file we need the header and the palette.
- if (p->pBMP==nullptr) {
- p->pBMP=new SvMemoryStream();
- p->pBMP->SetEndian(SvStreamEndian::LITTLE);
- if (p->nWidth==0 || p->nHeight==0 || p->nBitsPerPixel==0) {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=3;
- return;
- }
- // write (Windows-)BITMAPINFOHEADER:
- p->pBMP->WriteUInt32( 40 ).WriteUInt32( p->nWidth ).WriteUInt32( p->nHeight );
- p->pBMP->WriteUInt16( 1 ).WriteUInt16( p->nBitsPerPixel );
- p->pBMP->WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 );
- p->pBMP->WriteUInt32( 0 ).WriteUInt32( 0 );
- // write color table:
- if (p->nBitsPerPixel<=8) {
- sal_uInt16 i, nColTabSize=1<<(p->nBitsPerPixel);
- for (i=0; i<nColTabSize; i++) p->pBMP->WriteUInt32( GetPalette0RGB(i) );
- }
- }
- // OK, now the map data is being pushed. Unfortunately OS2 and BMP
- // do have a different RGB ordering when using 24-bit
- std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nDataLen]);
- pOS2MET->ReadBytes(pBuf.get(), nDataLen);
- sal_uInt32 nBytesPerLineToSwap = (p->nBitsPerPixel == 24) ?
- ((p->nWidth * 3 + 3) & 0xfffffffc) : 0;
- if (nBytesPerLineToSwap) {
- sal_uInt32 nAlign = p->nMapPos - (p->nMapPos % nBytesPerLineToSwap);
- sal_uInt32 i=0;
- while (nAlign+i+2<p->nMapPos+nDataLen) {
- if (nAlign+i>=p->nMapPos) {
- sal_uInt32 j = nAlign + i - p->nMapPos;
- std::swap(pBuf[j], pBuf[j+2]);
- }
- i+=3;
- if (i + 2 >= nBytesPerLineToSwap) {
- nAlign += nBytesPerLineToSwap;
- i=0;
- }
- }
- }
- p->pBMP->WriteBytes(pBuf.get(), nDataLen);
- p->nMapPos+=nDataLen;
- break;
- }
- case 0x0093: // End Image Content
- break;
-
- case 0x0071: // End Segment
- break;
- }
-}
-
-void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
-{
- sal_uInt8 nByte, nTripType, nTripType2;
- OSFont * pF=new OSFont;
- pF->pSucc=pFontList; pFontList=pF;
- pF->nID=0;
- pF->aFont.SetTransparent(true);
- pF->aFont.SetAlignment(ALIGN_BASELINE);
-
- auto nPos=pOS2MET->Tell();
- auto nMaxPos = nPos + nFieldSize;
- pOS2MET->SeekRel(2); nPos+=2;
- while (nPos<nMaxPos && pOS2MET->GetError()==ERRCODE_NONE) {
- pOS2MET->ReadUChar( nByte );
- sal_uInt16 nLen = static_cast<sal_uInt16>(nByte) & 0x00ff;
- if (nLen == 0)
- {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=4;
- }
- pOS2MET->ReadUChar( nTripType );
- switch (nTripType) {
- case 0x02:
- pOS2MET->ReadUChar( nTripType2 );
- switch (nTripType2) {
- case 0x84: // Font name
- break;
- case 0x08: { // Font Typeface
- char str[33];
- pOS2MET->SeekRel(1);
- pOS2MET->ReadBytes( &str, 32 );
- str[ 32 ] = 0;
- OUString aStr( str, strlen(str), osl_getThreadTextEncoding() );
- if ( aStr.equalsIgnoreAsciiCase( "Helv" ) )
- aStr = "Helvetica";
- pF->aFont.SetFamilyName( aStr );
- break;
- }
- }
- break;
- case 0x24: // Icid
- pOS2MET->ReadUChar( nTripType2 );
- switch (nTripType2) {
- case 0x05: //Icid
- pOS2MET->ReadUChar( nByte );
- pF->nID=static_cast<sal_uInt32>(nByte)&0xff;
- break;
- }
- break;
- case 0x20: // Font Binary GCID
- break;
- case 0x1f: { // Font Attributes
- FontWeight eWeight;
- sal_uInt8 nbyte;
- pOS2MET->ReadUChar( nbyte );
- switch (nbyte) {
- case 1: eWeight=WEIGHT_THIN; break;
- case 2: eWeight=WEIGHT_ULTRALIGHT; break;
- case 3: eWeight=WEIGHT_LIGHT; break;
- case 4: eWeight=WEIGHT_SEMILIGHT; break;
- case 5: eWeight=WEIGHT_NORMAL; break;
- case 6: eWeight=WEIGHT_SEMIBOLD; break;
- case 7: eWeight=WEIGHT_BOLD; break;
- case 8: eWeight=WEIGHT_ULTRABOLD; break;
- case 9: eWeight=WEIGHT_BLACK; break;
- default: eWeight=WEIGHT_DONTKNOW;
- }
- pF->aFont.SetWeight(eWeight);
- break;
- }
- }
- nPos+=nLen;
- pOS2MET->Seek(nPos);
- }
-}
-
-void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
-{
- switch (nFieldType) {
- case BegDocumnMagic:
- break;
- case EndDocumnMagic:
- break;
- case BegResGrpMagic:
- break;
- case EndResGrpMagic:
- break;
- case BegColAtrMagic:
- break;
- case EndColAtrMagic:
- break;
- case BlkColAtrMagic: {
- sal_uInt8 nbyte;
- sal_uInt16 nStartIndex, nEndIndex, i, nElemLen, nBytesPerCol;
-
- auto nPos = pOS2MET->Tell();
- auto nMaxPos = nPos + nFieldSize;
- pOS2MET->SeekRel(3); nPos+=3;
- while (nPos<nMaxPos && pOS2MET->GetError()==ERRCODE_NONE) {
- pOS2MET->ReadUChar( nbyte ); nElemLen=static_cast<sal_uInt16>(nbyte) & 0x00ff;
- if (nElemLen>11) {
- pOS2MET->SeekRel(4);
- nStartIndex=ReadBigEndianWord();
- pOS2MET->SeekRel(3);
- pOS2MET->ReadUChar( nbyte );
- nBytesPerCol=static_cast<sal_uInt16>(nbyte) & 0x00ff;
- if (nBytesPerCol == 0)
- {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=4;
- break;
- }
- nEndIndex=nStartIndex+(nElemLen-11)/nBytesPerCol;
- for (i=nStartIndex; i<nEndIndex; i++) {
- if (nBytesPerCol > 3) pOS2MET->SeekRel(nBytesPerCol-3);
- auto nCol = ReadBigEndian3BytesLong();
- SetPalette0RGB(i, nCol);
- }
- }
- else if (nElemLen<10) {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=4;
- }
- nPos += nElemLen;
- pOS2MET->Seek(nPos);
- }
- break;
- }
- case MapColAtrMagic:
- break;
- case BegImgObjMagic: {
- // create new bitmap by now: (will be filled later)
- OSBitmap * pB=new OSBitmap;
- pB->pSucc=pBitmapList; pBitmapList=pB;
- pB->pBMP=nullptr; pB->nWidth=0; pB->nHeight=0; pB->nBitsPerPixel=0;
- pB->nMapPos=0;
- // determine ID of the bitmap:
- pB->nID=0;
- for (sal_uInt8 i = 0; i < 4; ++i) {
- sal_uInt8 nbyte(0),nbyte2(0);
- pOS2MET->ReadUChar(nbyte).ReadUChar(nbyte2);
- nbyte -= 0x30;
- nbyte2 -= 0x30;
- nbyte = (nbyte << 4) | nbyte2;
- pB->nID=(pB->nID>>8)|(static_cast<sal_uInt32>(nbyte)<<24);
- }
- // put new palette on the palette stack: (will be filled later)
- OSPalette * pP=new OSPalette;
- pP->pSucc=pPaletteStack; pPaletteStack=pP;
- pP->p0RGB=nullptr; pP->nSize=0;
- break;
- }
- case EndImgObjMagic: {
- // read temporary Windows BMP file:
- if (pBitmapList==nullptr || pBitmapList->pBMP==nullptr ||
- pBitmapList->pBMP->GetError()!=ERRCODE_NONE) {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=5;
- return;
- }
- pBitmapList->pBMP->Seek(0);
-
- ReadDIBBitmapEx(pBitmapList->aBitmapEx, *(pBitmapList->pBMP), false);
-
- if (pBitmapList->pBMP->GetError()!=ERRCODE_NONE) {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=6;
- }
- delete pBitmapList->pBMP; pBitmapList->pBMP=nullptr;
- // kill palette from stack:
- OSPalette * pP=pPaletteStack;
- if (pP!=nullptr) {
- pPaletteStack=pP->pSucc;
- delete[] pP->p0RGB;
- delete pP;
- }
- break;
- }
- case DscImgObjMagic:
- break;
- case DatImgObjMagic: {
- sal_uInt16 nDataID, nDataLen;
- sal_uInt8 nbyte;
-
- auto nPos = pOS2MET->Tell();
- auto nMaxPos = nPos + nFieldSize;
- while (nPos<nMaxPos && pOS2MET->GetError()==ERRCODE_NONE) {
- pOS2MET->ReadUChar( nbyte ); nDataID=static_cast<sal_uInt16>(nbyte)&0x00ff;
- if (nDataID==0x00fe) {
- pOS2MET->ReadUChar( nbyte );
- nDataID=(nDataID<<8)|(static_cast<sal_uInt16>(nbyte)&0x00ff);
- nDataLen=ReadBigEndianWord();
- nPos+=4;
- }
- else {
- pOS2MET->ReadUChar( nbyte ); nDataLen=static_cast<sal_uInt16>(nbyte)&0x00ff;
- nPos+=2;
- }
- ReadImageData(nDataID, nDataLen);
- nPos += nDataLen;
- pOS2MET->Seek(nPos);
- }
- break;
- }
-
- case BegObEnv1Magic:
- break;
- case EndObEnv1Magic:
- break;
- case BegGrfObjMagic:
- break;
- case EndGrfObjMagic: {
- SvStream * pSave;
- sal_uInt16 nOrderID, nOrderLen;
- sal_uInt8 nbyte;
-
- if (!xOrdFile)
- break;
-
- // In xOrdFile all "DatGrfObj" fields were collected so that the
- // therein contained "Orders" are continuous and not segmented by fields.
- // To read them from the memory stream without having any trouble,
- // we use a little trick:
-
- pSave=pOS2MET;
- pOS2MET=xOrdFile.get(); //(!)
- auto nMaxPos = pOS2MET->Tell();
- pOS2MET->Seek(0);
-
- // "Segment header":
- pOS2MET->ReadUChar( nbyte );
- if (nbyte==0x70) { // header exists
- pOS2MET->SeekRel(15); // but we don't need it
- }
- else pOS2MET->SeekRel(-1); // no header, go back one byte
-
- // loop through Order:
- while (pOS2MET->Tell()<nMaxPos && pOS2MET->GetError()==ERRCODE_NONE) {
- pOS2MET->ReadUChar( nbyte ); nOrderID=static_cast<sal_uInt16>(nbyte) & 0x00ff;
- if (nOrderID==0x00fe) {
- pOS2MET->ReadUChar( nbyte );
- nOrderID=(nOrderID << 8) | (static_cast<sal_uInt16>(nbyte) & 0x00ff);
- }
- if (nOrderID>0x00ff || nOrderID==GOrdPolygn) {
- // ooo: As written in OS2 documentation, the order length should now
- // be written as big endian word. (Quote: "Highorder byte precedes loworder byte").
- // In reality there are files in which the length is stored as little endian word
- // (at least for nOrderID==GOrdPolygn)
- // So we throw a coin or what else can we do?
- pOS2MET->ReadUChar( nbyte ); nOrderLen=static_cast<sal_uInt16>(nbyte)&0x00ff;
- pOS2MET->ReadUChar( nbyte ); if (nbyte!=0) nOrderLen=nOrderLen<<8|(static_cast<sal_uInt16>(nbyte)&0x00ff);
- }
- else if (nOrderID==GOrdSTxAlg || nOrderID==GOrdPTxAlg) nOrderLen=2;
- else if ((nOrderID&0xff88)==0x0008) nOrderLen=1;
- else if (nOrderID==0x0000 || nOrderID==0x00ff) nOrderLen=0;
- else { pOS2MET->ReadUChar( nbyte ); nOrderLen=static_cast<sal_uInt16>(nbyte) & 0x00ff; }
- auto nPos=pOS2MET->Tell();
- ReadOrder(nOrderID, nOrderLen);
- if (nPos+nOrderLen < pOS2MET->Tell()) {
- SAL_INFO("filter.os2met","Order is shorter than expected. OrderID: " << nOrderID << " Position: " << nPos);
- }
- else if (nPos+nOrderLen != pOS2MET->Tell()) {
- SAL_INFO("filter.os2met","Order was not read completely. OrderID: " << nOrderID << " Position: " << nPos);
- }
- pOS2MET->Seek(nPos+nOrderLen);
- }
-
- pOS2MET=pSave;
- if (xOrdFile->GetError()) {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=10;
- }
- xOrdFile.reset();
- break;
- }
- case DscGrfObjMagic: {
- sal_uInt16 nDscID, nDscLen;
- sal_uInt8 nbyte;
-
- auto nMaxPos = pOS2MET->Tell() + nFieldSize;
- while (pOS2MET->Tell()<nMaxPos && pOS2MET->GetError()==ERRCODE_NONE) {
- pOS2MET->ReadUChar( nbyte ); nDscID =static_cast<sal_uInt16>(nbyte) & 0x00ff;
- pOS2MET->ReadUChar( nbyte ); nDscLen=static_cast<sal_uInt16>(nbyte) & 0x00ff;
- auto nPos = pOS2MET->Tell();
- ReadDsc(nDscID);
- pOS2MET->Seek(nPos+nDscLen);
- }
- break;
- }
- case DatGrfObjMagic: {
- if (!xOrdFile) {
- xOrdFile.reset(new SvMemoryStream);
- xOrdFile->SetEndian(SvStreamEndian::LITTLE);
- }
- std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nFieldSize]);
- pOS2MET->ReadBytes(pBuf.get(), nFieldSize);
- xOrdFile->WriteBytes(pBuf.get(), nFieldSize);
- break;
- }
- case MapCodFntMagic:
- ReadFont(nFieldSize);
- break;
-
- case MapDatResMagic:
- break;
- }
-}
-
-void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaFile )
-{
- ErrorCode=0;
-
- pOS2MET = &rStreamOS2MET;
- auto nOrigPos = pOS2MET->Tell();
- SvStreamEndian nOrigNumberFormat = pOS2MET->GetEndian();
-
- bCoord32 = true;
- pPaletteStack=nullptr;
- pAreaStack=nullptr;
- pPathStack=nullptr;
- pPathList=nullptr;
- pFontList=nullptr;
- pBitmapList=nullptr;
- pAttrStack=nullptr;
-
- aDefAttr.aLinCol =COL_BLACK;
- aDefAttr.aLinBgCol =COL_WHITE;
- aDefAttr.eLinMix =RasterOp::OverPaint;
- aDefAttr.eLinBgMix =RasterOp::OverPaint;
- aDefAttr.aChrCol =COL_BLACK;
- aDefAttr.aChrBgCol =COL_WHITE;
- aDefAttr.eChrMix =RasterOp::OverPaint;
- aDefAttr.eChrBgMix =RasterOp::OverPaint;
- aDefAttr.aMrkCol =COL_BLACK;
- aDefAttr.aMrkBgCol =COL_WHITE;
- aDefAttr.eMrkMix =RasterOp::OverPaint;
- aDefAttr.eMrkBgMix =RasterOp::OverPaint;
- aDefAttr.aPatCol =COL_BLACK;
- aDefAttr.aPatBgCol =COL_WHITE;
- aDefAttr.ePatMix =RasterOp::OverPaint;
- aDefAttr.ePatBgMix =RasterOp::OverPaint;
- aDefAttr.aImgCol =COL_BLACK;
- aDefAttr.aImgBgCol =COL_WHITE;
- aDefAttr.eImgMix =RasterOp::OverPaint;
- aDefAttr.eImgBgMix =RasterOp::OverPaint;
- aDefAttr.nArcP =1;
- aDefAttr.nArcQ =1;
- aDefAttr.nArcR =0;
- aDefAttr.nArcS =0;
- aDefAttr.nChrAng =0_deg10;
- aDefAttr.aChrCellSize=Size(12,12);
- aDefAttr.nChrSet =0;
- aDefAttr.aCurPos =Point(0,0);
- aDefAttr.eLinStyle =PEN_SOLID;
- aDefAttr.nLinWidth =0;
- aDefAttr.aMrkCellSize=Size(10,10);
- aDefAttr.nMrkPrec =0x01;
- aDefAttr.nMrkSet =0xff;
- aDefAttr.nMrkSymbol =0x01;
- aDefAttr.bFill =true;
- aDefAttr.nStrLinWidth=0;
-
- aAttr=aDefAttr;
-
- xOrdFile.reset();
-
- rGDIMetaFile.Record(pVirDev);
-
- pOS2MET->SetEndian(SvStreamEndian::LITTLE);
-
- sal_uInt64 nPos = pOS2MET->Tell();
-
- for (;;) {
-
- sal_uInt16 nFieldSize = ReadBigEndianWord();
- sal_uInt8 nMagicByte(0);
- pOS2MET->ReadUChar( nMagicByte );
- if (nMagicByte!=0xd3) {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=7;
- break;
- }
-
- sal_uInt16 nFieldType(0);
- pOS2MET->ReadUInt16(nFieldType);
-
- pOS2MET->SeekRel(3);
-
- if (pOS2MET->GetError())
- break;
-
- if (nFieldType==EndDocumnMagic)
- break;
-
- if (pOS2MET->eof() || nFieldSize < 8)
- {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=8;
- break;
- }
-
- nPos+=8; nFieldSize-=8;
-
- if (nFieldSize > pOS2MET->remainingSize())
- {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=8;
- break;
- }
-
- ReadField(nFieldType, nFieldSize);
- nPos += nFieldSize;
-
- if (pOS2MET->Tell() > nPos)
- {
- pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- ErrorCode=9;
- break;
- }
- pOS2MET->Seek(nPos);
- }
-
- rGDIMetaFile.Stop();
-
- rGDIMetaFile.SetPrefMapMode( aGlobMapMode );
-
- if( aBoundingRect.GetWidth() && aBoundingRect.GetHeight() )
- rGDIMetaFile.SetPrefSize( aBoundingRect.GetSize() );
- else
- {
- if( aCalcBndRect.Left() || aCalcBndRect.Top() )
- rGDIMetaFile.Move( -aCalcBndRect.Left(), -aCalcBndRect.Top() );
-
- rGDIMetaFile.SetPrefSize( aCalcBndRect.GetSize() );
- }
-
- pOS2MET->SetEndian(nOrigNumberFormat);
-
- if (pOS2MET->GetError()) {
- SAL_INFO("filter.os2met","Error code: " << ErrorCode);
- pOS2MET->Seek(nOrigPos);
- }
-}
-
-//================== GraphicImport - the exported function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-imeGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
-{
- OS2METReader aOS2METReader;
- GDIMetaFile aMTF;
- bool bRet = false;
-
- try
- {
- aOS2METReader.ReadOS2MET( rStream, aMTF );
-
- if ( !rStream.GetError() )
- {
- rGraphic=Graphic( aMTF );
- bRet = true;
- }
- }
- catch (const css::uno::Exception&)
- {
- }
-
- return bRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
deleted file mode 100644
index 4c12c18523fd..000000000000
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ /dev/null
@@ -1,541 +0,0 @@
-/* -*- 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 <sal/config.h>
-#include <o3tl/safeint.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <vcl/graph.hxx>
-#include <vcl/BitmapTools.hxx>
-#include <tools/stream.hxx>
-
-//============================ PBMReader ==================================
-
-namespace {
-
-class PBMReader {
-
-private:
-
- SvStream& mrPBM; // the PBM file to read
-
- bool mbStatus;
- bool mbRemark; // sal_False if the stream is in a comment
- bool mbRaw; // RAW/ASCII MODE
- sal_uInt8 mnMode; // 0->PBM, 1->PGM, 2->PPM
- std::unique_ptr<vcl::bitmap::RawBitmap> mpRawBmp;
- std::vector<Color> mvPalette;
- sal_Int32 mnWidth, mnHeight; // dimensions in pixel
- sal_uInt16 mnCol;
- sal_uInt64 mnMaxVal; // max value in the <missing comment>
- bool ImplReadBody();
- bool ImplReadHeader();
-
-public:
- explicit PBMReader(SvStream & rPBM);
- bool ReadPBM(Graphic & rGraphic );
-};
-
-}
-
-//=================== Methods of PBMReader ==============================
-
-PBMReader::PBMReader(SvStream & rPBM)
- : mrPBM(rPBM)
- , mbStatus(true)
- , mbRemark(false)
- , mbRaw(true)
- , mnMode(0)
- , mnWidth(0)
- , mnHeight(0)
- , mnCol(0)
- , mnMaxVal(0)
-{
-}
-
-bool PBMReader::ReadPBM(Graphic & rGraphic )
-{
- if ( mrPBM.GetError() )
- return false;
-
- mrPBM.SetEndian( SvStreamEndian::LITTLE );
-
- // read header:
-
- mbStatus = ImplReadHeader();
- if ( !mbStatus )
- return false;
-
- if ( ( mnMaxVal == 0 ) || ( mnWidth <= 0 ) || ( mnHeight <= 0 ) )
- return false;
-
- sal_uInt32 nPixelsRequired;
- if (o3tl::checked_multiply<sal_uInt32>(mnWidth, mnHeight, nPixelsRequired))
- return false;
- const auto nRemainingSize = mrPBM.remainingSize();
-
- // 0->PBM, 1->PGM, 2->PPM
- switch ( mnMode )
- {
- case 0:
- {
- if (nRemainingSize < nPixelsRequired / 8)
- return false;
-
- mpRawBmp.reset( new vcl::bitmap::RawBitmap( Size( mnWidth, mnHeight ), 24 ) );
- mvPalette.resize( 2 );
- mvPalette[0] = Color( 0xff, 0xff, 0xff );
- mvPalette[1] = Color( 0x00, 0x00, 0x00 );
- break;
- }
- case 1 :
- if (nRemainingSize < nPixelsRequired)
- return false;
-
- mpRawBmp.reset( new vcl::bitmap::RawBitmap( Size( mnWidth, mnHeight ), 24 ) );
- mnCol = static_cast<sal_uInt16>(mnMaxVal) + 1;
- if ( mnCol > 256 )
- mnCol = 256;
-
- mvPalette.resize( 256 );
- for ( sal_uInt16 i = 0; i < mnCol; i++ )
- {
- sal_uInt16 nCount = 255 * i / mnCol;
- mvPalette[i] = Color( static_cast<sal_uInt8>(nCount), static_cast<sal_uInt8>(nCount), static_cast<sal_uInt8>(nCount) );
- }
- break;
- case 2 :
- if (nRemainingSize / 3 < nPixelsRequired)
- return false;
-
- mpRawBmp.reset( new vcl::bitmap::RawBitmap( Size( mnWidth, mnHeight ), 24 ) );
- break;
- }
-
- // read bitmap data
- mbStatus = ImplReadBody();
-
- if ( mbStatus )
- rGraphic = vcl::bitmap::CreateFromData(std::move(*mpRawBmp));
-
- return mbStatus;
-}
-
-bool PBMReader::ImplReadHeader()
-{
- sal_uInt8 nID[ 2 ];
- sal_uInt8 nDat;
- sal_uInt8 nMax, nCount = 0;
- bool bFinished = false;
-
- mrPBM.ReadUChar( nID[ 0 ] ).ReadUChar( nID[ 1 ] );
- if ( nID[ 0 ] != 'P' )
- return false;
- mnMaxVal = mnWidth = mnHeight = 0;
- switch ( nID[ 1 ] )
- {
- case '1' :
- mbRaw = false;
- [[fallthrough]];
- case '4' :
- mnMode = 0;
- nMax = 2; // number of parameters in Header
- mnMaxVal = 1;
- break;
- case '2' :
- mbRaw = false;
- [[fallthrough]];
- case '5' :
- mnMode = 1;
- nMax = 3;
- break;
- case '3' :
- mbRaw = false;
- [[fallthrough]];
- case '6' :
- mnMode = 2;
- nMax = 3;
- break;
- default:
- return false;
- }
- while ( !bFinished )
- {
- if (!mrPBM.good())
- return false;
-
- mrPBM.ReadUChar( nDat );
-
- if ( nDat == '#' )
- {
- mbRemark = true;
- continue;
- }
- else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) )
- {
- mbRemark = false;
- nDat = 0x20;
- }
- if ( mbRemark )
- continue;
-
- if ( ( nDat == 0x20 ) || ( nDat == 0x09 ) )
- {
- if ( ( nCount == 0 ) && mnWidth )
- nCount++;
- else if ( ( nCount == 1 ) && mnHeight )
- {
- if ( ++nCount == nMax )
- bFinished = true;
- }
- else if ( ( nCount == 2 ) && mnMaxVal )
- {
- bFinished = true;
- }
- continue;
- }
- if ( ( nDat >= '0' ) && ( nDat <= '9' ) )
- {
- nDat -= '0';
- if ( nCount == 0 )
- {
- if (mnWidth > SAL_MAX_INT32 / 10)
- {
- return false;
- }
- mnWidth *= 10;
- if (nDat > SAL_MAX_INT32 - mnWidth)
- {
- return false;
- }
- mnWidth += nDat;
- }
- else if ( nCount == 1 )
- {
- if (mnHeight > SAL_MAX_INT32 / 10)
- {
- return false;
- }
- mnHeight *= 10;
- if (nDat > SAL_MAX_INT32 - mnHeight)
- {
- return false;
- }
- mnHeight += nDat;
- }
- else if ( nCount == 2 )
- {
- if (mnMaxVal > std::numeric_limits<sal_uInt64>::max() / 10)
- {
- return false;
- }
- mnMaxVal *= 10;
- if (nDat > std::numeric_limits<sal_uInt64>::max() - mnMaxVal)
- {
- return false;
- }
- mnMaxVal += nDat;
- }
- }
- else
- return false;
- }
- return mbStatus;
-}
-
-bool PBMReader::ImplReadBody()
-{
- sal_uInt8 nDat = 0, nCount;
- sal_uInt64 nGrey, nRGB[3];
- sal_Int32 nWidth = 0;
- sal_Int32 nHeight = 0;
-
- if ( mbRaw )
- {
- signed char nShift = 0;
- switch ( mnMode )
- {
-
- // PBM
- case 0 :
- while ( nHeight != mnHeight )
- {
- if (!mrPBM.good())
- return false;
-
- if ( --nShift < 0 )
- {
- mrPBM.ReadUChar( nDat );
- nShift = 7;
- }
- mpRawBmp->SetPixel( nHeight, nWidth, mvPalette[(nDat >> nShift) & 0x01] );
- if ( ++nWidth == mnWidth )
- {
- nShift = 0;
- nWidth = 0;
- nHeight++;
- }
- }
- break;
-
- // PGM
- case 1 :
- while ( nHeight != mnHeight )
- {
- if (!mrPBM.good())
- return false;
-
- mrPBM.ReadUChar( nDat );
- mpRawBmp->SetPixel( nHeight, nWidth++, mvPalette[nDat]);
-
- if ( nWidth == mnWidth )
- {
- nWidth = 0;
- nHeight++;
- }
- }
- break;
-
- // PPM
- case 2 :
- while ( nHeight != mnHeight )
- {
- if (!mrPBM.good())
- return false;
-
- sal_uInt8 nR, nG, nB;
- sal_uInt8 nRed, nGreen, nBlue;
- mrPBM.ReadUChar( nR ).ReadUChar( nG ).ReadUChar( nB );
- nRed = 255 * nR / mnMaxVal;
- nGreen = 255 * nG / mnMaxVal;
- nBlue = 255 * nB / mnMaxVal;
- mpRawBmp->SetPixel( nHeight, nWidth++, Color( nRed, nGreen, nBlue ) );
- if ( nWidth == mnWidth )
- {
- nWidth = 0;
- nHeight++;
- }
- }
- break;
- }
- }
- else
- {
- bool bPara = false;
- bool bFinished = false;
-
- switch ( mnMode )
- {
- // PBM
- case 0 :
- while ( !bFinished )
- {
- if (!mrPBM.good())
- return false;
-
- mrPBM.ReadUChar( nDat );
-
- if ( nDat == '#' )
- {
- mbRemark = true;
- continue;
- }
- else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) )
- {
- mbRemark = false;
- continue;
- }
- if ( mbRemark || nDat == 0x20 || nDat == 0x09 )
- continue;
-
- if ( nDat == '0' || nDat == '1' )
- {
- mpRawBmp->SetPixel( nHeight, nWidth, mvPalette[static_cast<sal_uInt8>(nDat - '0')] );
- nWidth++;
- if ( nWidth == mnWidth )
- {
- nWidth = 0;
- if ( ++nHeight == mnHeight )
- bFinished = true;
- }
- }
- else
- return false;
- }
- break;
-
- // PGM
- case 1 :
-
- bPara = false;
- nCount = 0;
- nGrey = 0;
-
- while ( !bFinished )
- {
- if ( nCount )
- {
- nCount--;
- if ( nGrey <= mnMaxVal )
- nGrey = 255 * nGrey / mnMaxVal;
- mpRawBmp->SetPixel( nHeight, nWidth++, mvPalette[static_cast<sal_uInt8>(nGrey)] );
- nGrey = 0;
- if ( nWidth == mnWidth )
- {
- nWidth = 0;
- if ( ++nHeight == mnHeight )
- bFinished = true;
- }
- continue;
- }
-
- if (!mrPBM.good())
- return false;
-
- mrPBM.ReadUChar( nDat );
-
- if ( nDat == '#' )
- {
- mbRemark = true;
- if ( bPara )
- {
- bPara = false;
- nCount++;
- }
- continue;
- }
- else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) )
- {
- mbRemark = false;
- if ( bPara )
- {
- bPara = false;
- nCount++;
- }
- continue;
- }
-
- if ( nDat == 0x20 || nDat == 0x09 )
- {
- if ( bPara )
- {
- bPara = false;
- nCount++;
- }
- continue;
- }
- if ( nDat >= '0' && nDat <= '9' )
- {
- bPara = true;
- nGrey *= 10;
- nGrey += nDat-'0';
- continue;
- }
- else
- return false;
- }
- break;
-
-
- // PPM
- case 2 :
-
- bPara = false;
- nCount = 0;
- nRGB[ 0 ] = nRGB[ 1 ] = nRGB[ 2 ] = 0;
-
- while ( !bFinished )
- {
- if ( nCount == 3 )
- {
- nCount = 0;
- mpRawBmp->SetPixel( nHeight, nWidth++, Color( static_cast< sal_uInt8 >( ( nRGB[ 0 ] * 255 ) / mnMaxVal ),
- static_cast< sal_uInt8 >( ( nRGB[ 1 ] * 255 ) / mnMaxVal ),
- static_cast< sal_uInt8 >( ( nRGB[ 2 ] * 255 ) / mnMaxVal ) ) );
- nRGB[ 0 ] = nRGB[ 1 ] = nRGB[ 2 ] = 0;
- if ( nWidth == mnWidth )
- {
- nWidth = 0;
- if ( ++nHeight == mnHeight )
- bFinished = true;
- }
- continue;
- }
-
- if (!mrPBM.good())
- return false;
-
- mrPBM.ReadUChar( nDat );
-
- if ( nDat == '#' )
- {
- mbRemark = true;
- if ( bPara )
- {
- bPara = false;
- nCount++;
- }
- continue;
- }
- else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) )
- {
- mbRemark = false;
- if ( bPara )
- {
- bPara = false;
- nCount++;
- }
- continue;
- }
-
- if ( nDat == 0x20 || nDat == 0x09 )
- {
- if ( bPara )
- {
- bPara = false;
- nCount++;
- }
- continue;
- }
- if ( nDat >= '0' && nDat <= '9' )
- {
- bPara = true;
- nRGB[ nCount ] *= 10;
- nRGB[ nCount ] += nDat-'0';
- continue;
- }
- else
- return false;
- }
- break;
- }
- }
- return mbStatus;
-}
-
-//================== GraphicImport - the exported function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-ipbGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
-{
- PBMReader aPBMReader(rStream);
-
- return aPBMReader.ReadPBM(rGraphic );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
deleted file mode 100644
index b2b585606286..000000000000
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ /dev/null
@@ -1,363 +0,0 @@
-/* -*- 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 <vcl/graph.hxx>
-#include <vcl/BitmapTools.hxx>
-#include <vcl/FilterConfigItem.hxx>
-#include <tools/stream.hxx>
-
-//============================ PCDReader ==================================
-
-namespace {
-
-// these resolutions are contained in a PCD file:
-enum PCDResolution {
- PCDRES_BASE16, // 192 x 128
- PCDRES_BASE4, // 384 x 256
- PCDRES_BASE, // 768 x 512
- // the following ones are compressed
- // and CANNOT be read by us
- PCDRES_4BASE, // 1536 x 1024
- PCDRES_16BASE // 3072 x 3072
-};
-
-class PCDReader {
-
-private:
-
- bool bStatus;
-
- SvStream &m_rPCD;
- std::unique_ptr<vcl::bitmap::RawBitmap> mpBitmap;
-
- sal_uInt8 nOrientation; // orientation of the picture within the PCD file:
- // 0 - spire point up
- // 1 - spire points to the right
- // 2 - spire points down
- // 3 - spire points to the left
-
- PCDResolution eResolution; // which resolution we want
-
- sal_uInt32 nWidth; // width of the PCD picture
- sal_uInt32 nHeight; // height of the PCD picture
- sal_uInt32 nImagePos; // position of the picture within the PCD file
-
- // temporary lLue-Green-Red-Bitmap
- sal_uInt32 nBMPWidth;
- sal_uInt32 nBMPHeight;
-
- void CheckPCDImagePacFile();
- // checks whether it's a Photo-CD file with 'Image Pac'
-
- void ReadOrientation();
- // reads the orientation and sets nOrientation
-
- void ReadImage();
-
-public:
-
- explicit PCDReader(SvStream &rStream)
- : bStatus(false)
- , m_rPCD(rStream)
- , nOrientation(0)
- , eResolution(PCDRES_BASE16)
- , nWidth(0)
- , nHeight(0)
- , nImagePos(0)
- , nBMPWidth(0)
- , nBMPHeight(0)
- {
- }
-
- bool ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem );
-};
-
-}
-
-//=================== Methods of PCDReader ==============================
-
-bool PCDReader::ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem )
-{
- bStatus = true;
-
- // is it a PCD file with a picture? ( sets bStatus == sal_False, if that's not the case):
- CheckPCDImagePacFile();
-
- // read orientation of the picture:
- ReadOrientation();
-
- // which resolution do we want?:
- eResolution = PCDRES_BASE;
- if ( pConfigItem )
- {
- sal_Int32 nResolution = pConfigItem->ReadInt32( "Resolution", 2 );
- if ( nResolution == 1 )
- eResolution = PCDRES_BASE4;
- else if ( nResolution == 0 )
- eResolution = PCDRES_BASE16;
- }
- // determine size and position (position within the PCD file) of the picture:
- switch (eResolution)
- {
- case PCDRES_BASE16 :
- nWidth = 192;
- nHeight = 128;
- nImagePos = 8192;
- break;
-
- case PCDRES_BASE4 :
- nWidth = 384;
- nHeight = 256;
- nImagePos = 47104;
- break;
-
- case PCDRES_BASE :
- nWidth = 768;
- nHeight = 512;
- nImagePos = 196608;
- break;
-
- default:
- bStatus = false;
- }
- if ( bStatus )
- {
- if ( ( nOrientation & 0x01 ) == 0 )
- {
- nBMPWidth = nWidth;
- nBMPHeight = nHeight;
- }
- else
- {
- nBMPWidth = nHeight;
- nBMPHeight = nWidth;
- }
- mpBitmap.reset(new vcl::bitmap::RawBitmap( Size( nBMPWidth, nBMPHeight ), 24 ));
-
- ReadImage();
-
- rGraphic = vcl::bitmap::CreateFromData(std::move(*mpBitmap));
- }
- return bStatus;
-}
-
-
-void PCDReader::CheckPCDImagePacFile()
-{
- char Buf[ 8 ];
-
- m_rPCD.Seek( 2048 );
- m_rPCD.ReadBytes(Buf, 7);
- Buf[ 7 ] = 0;
- if (OString(Buf) != "PCD_IPI")
- bStatus = false;
-}
-
-
-void PCDReader::ReadOrientation()
-{
- if ( !bStatus )
- return;
- m_rPCD.Seek( 194635 );
- m_rPCD.ReadUChar( nOrientation );
- nOrientation &= 0x03;
-}
-
-
-void PCDReader::ReadImage()
-{
- sal_uInt32 nx,ny,nW2,nH2,nYPair,ndy,nXPair;
- tools::Long nL,nCb,nCr,nRed,nGreen,nBlue;
- sal_uInt8 * pt;
- sal_uInt8 * pL0; // luminance for each pixel of the 1st row of the current pair of rows
- sal_uInt8 * pL1; // luminance for each pixel of the 2nd row of the current pair of rows
- sal_uInt8 * pCb; // blue chrominance for each 2x2 pixel of the current pair of rows
- sal_uInt8 * pCr; // red chrominance for each 2x2 pixel of the current pair of rows
- sal_uInt8 * pL0N, * pL1N, * pCbN, * pCrN; // like above, but for the next pair of rows
-
- if ( !bStatus )
- return;
-
- nW2=nWidth>>1;
- nH2=nHeight>>1;
-
- pL0 =static_cast<sal_uInt8*>(std::malloc( nWidth ));
- pL1 =static_cast<sal_uInt8*>(std::malloc( nWidth ));
- pCb =static_cast<sal_uInt8*>(std::malloc( nW2+1 ));
- pCr =static_cast<sal_uInt8*>(std::malloc( nW2+1 ));
- pL0N=static_cast<sal_uInt8*>(std::malloc( nWidth ));
- pL1N=static_cast<sal_uInt8*>(std::malloc( nWidth ));
- pCbN=static_cast<sal_uInt8*>(std::malloc( nW2+1 ));
- pCrN=static_cast<sal_uInt8*>(std::malloc( nW2+1 ));
-
- if ( pL0 == nullptr || pL1 == nullptr || pCb == nullptr || pCr == nullptr ||
- pL0N == nullptr || pL1N == nullptr || pCbN == nullptr || pCrN == nullptr)
- {
- std::free(static_cast<void*>(pL0) );
- std::free(static_cast<void*>(pL1) );
- std::free(static_cast<void*>(pCb) );
- std::free(static_cast<void*>(pCr) );
- std::free(static_cast<void*>(pL0N));
- std::free(static_cast<void*>(pL1N));
- std::free(static_cast<void*>(pCbN));
- std::free(static_cast<void*>(pCrN));
- bStatus = false;
- return;
- }
-
- m_rPCD.Seek( nImagePos );
-
- // next pair of rows := first pair of rows:
- m_rPCD.ReadBytes( pL0N, nWidth );
- m_rPCD.ReadBytes( pL1N, nWidth );
- m_rPCD.ReadBytes( pCbN, nW2 );
- m_rPCD.ReadBytes( pCrN, nW2 );
- pCbN[ nW2 ] = pCbN[ nW2 - 1 ];
- pCrN[ nW2 ] = pCrN[ nW2 - 1 ];
-
- for ( nYPair = 0; nYPair < nH2; nYPair++ )
- {
- // current pair of rows := next pair of rows:
- pt=pL0; pL0=pL0N; pL0N=pt;
- pt=pL1; pL1=pL1N; pL1N=pt;
- pt=pCb; pCb=pCbN; pCbN=pt;
- pt=pCr; pCr=pCrN; pCrN=pt;
-
- // get the next pair of rows:
- if ( nYPair < nH2 - 1 )
- {
- m_rPCD.ReadBytes( pL0N, nWidth );
- m_rPCD.ReadBytes( pL1N, nWidth );
- m_rPCD.ReadBytes( pCbN, nW2 );
- m_rPCD.ReadBytes( pCrN, nW2 );
- pCbN[nW2]=pCbN[ nW2 - 1 ];
- pCrN[nW2]=pCrN[ nW2 - 1 ];
- }
- else
- {
- for ( nXPair = 0; nXPair < nW2; nXPair++ )
- {
- pCbN[ nXPair ] = pCb[ nXPair ];
- pCrN[ nXPair ] = pCr[ nXPair ];
- }
- }
-
- // loop through both rows of the pair of rows:
- for ( ndy = 0; ndy < 2; ndy++ )
- {
- ny = ( nYPair << 1 ) + ndy;
-
- // loop through X:
- for ( nx = 0; nx < nWidth; nx++ )
- {
- // get/calculate nL,nCb,nCr for the pixel nx,ny:
- nXPair = nx >> 1;
- if ( ndy == 0 )
- {
- nL = static_cast<tools::Long>(pL0[ nx ]);
- if (( nx & 1 ) == 0 )
- {
- nCb = static_cast<tools::Long>(pCb[ nXPair ]);
- nCr = static_cast<tools::Long>(pCr[ nXPair ]);
- }
- else
- {
- nCb = ( static_cast<tools::Long>(pCb[ nXPair ]) + static_cast<tools::Long>(pCb[ nXPair + 1 ]) ) >> 1;
- nCr = ( static_cast<tools::Long>(pCr[ nXPair ]) + static_cast<tools::Long>(pCr[ nXPair + 1 ]) ) >> 1;
- }
- }
- else {
- nL = pL1[ nx ];
- if ( ( nx & 1 ) == 0 )
- {
- nCb = ( static_cast<tools::Long>(pCb[ nXPair ]) + static_cast<tools::Long>(pCbN[ nXPair ]) ) >> 1;
- nCr = ( static_cast<tools::Long>(pCr[ nXPair ]) + static_cast<tools::Long>(pCrN[ nXPair ]) ) >> 1;
- }
- else
- {
- nCb = ( static_cast<tools::Long>(pCb[ nXPair ]) + static_cast<tools::Long>(pCb[ nXPair + 1 ]) +
- static_cast<tools::Long>(pCbN[ nXPair ]) + static_cast<tools::Long>(pCbN[ nXPair + 1 ]) ) >> 2;
- nCr = ( static_cast<tools::Long>(pCr[ nXPair ]) + static_cast<tools::Long>(pCr[ nXPair + 1]) +
- static_cast<tools::Long>(pCrN[ nXPair ]) + static_cast<tools::Long>(pCrN[ nXPair + 1 ]) ) >> 2;
- }
- }
- // conversion of nL,nCb,nCr in nRed,nGreen,nBlue:
- nL *= 89024;
- nCb -= 156;
- nCr -= 137;
- nRed = ( nL + nCr * 119374 + 0x8000 ) >> 16;
- if ( nRed < 0 )
- nRed = 0;
- if ( nRed > 255)
- nRed = 255;
- nGreen = ( nL - nCb * 28198 - nCr * 60761 + 0x8000 ) >> 16;
- if ( nGreen < 0 )
- nGreen = 0;
- if ( nGreen > 255 )
- nGreen = 255;
- nBlue = ( nL + nCb * 145352 + 0x8000 ) >> 16;
- if ( nBlue < 0 )
- nBlue = 0;
- if ( nBlue > 255 )
- nBlue = 255;
-
- // register color value in pBMPMap:
- if ( nOrientation < 2 )
- {
- if ( nOrientation == 0 )
- mpBitmap->SetPixel( ny, nx, Color( static_cast<sal_uInt8>(nRed), static_cast<sal_uInt8>(nGreen), static_cast<sal_uInt8>(nBlue) ) );
- else
- mpBitmap->SetPixel( nWidth - 1 - nx, ny, Color( static_cast<sal_uInt8>(nRed), static_cast<sal_uInt8>(nGreen), static_cast<sal_uInt8>(nBlue) ) );
- }
- else
- {
- if ( nOrientation == 2 )
- mpBitmap->SetPixel( nHeight - 1 - ny, ( nWidth - 1 - nx ), Color( static_cast<sal_uInt8>(nRed), static_cast<sal_uInt8>(nGreen), static_cast<sal_uInt8>(nBlue) ) );
- else
- mpBitmap->SetPixel( nx, ( nHeight - 1 - ny ), Color( static_cast<sal_uInt8>(nRed), static_cast<sal_uInt8>(nGreen), static_cast<sal_uInt8>(nBlue) ) );
- }
- }
- }
-
- if ( m_rPCD.GetError() )
- bStatus = false;
- if ( !bStatus )
- break;
- }
- std::free(static_cast<void*>(pL0) );
- std::free(static_cast<void*>(pL1) );
- std::free(static_cast<void*>(pCb) );
- std::free(static_cast<void*>(pCr) );
- std::free(static_cast<void*>(pL0N));
- std::free(static_cast<void*>(pL1N));
- std::free(static_cast<void*>(pCbN));
- std::free(static_cast<void*>(pCrN));
-}
-
-//================== GraphicImport - the exported Function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-icdGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pConfigItem )
-{
- PCDReader aPCDReader(rStream);
- return aPCDReader.ReadPCD(rGraphic, pConfigItem);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
deleted file mode 100644
index 67cbc947fefc..000000000000
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ /dev/null
@@ -1,411 +0,0 @@
-/* -*- 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 <memory>
-#include <vcl/graph.hxx>
-#include <vcl/BitmapTools.hxx>
-#include <tools/stream.hxx>
-
-class FilterConfigItem;
-
-//============================ PCXReader ==================================
-
-namespace {
-
-class PCXReader {
-
-private:
-
- SvStream& m_rPCX; // the PCX file to read
-
- std::unique_ptr<vcl::bitmap::RawBitmap> mpBitmap;
- std::vector<Color> mvPalette;
- sal_uInt8 nVersion; // PCX-Version
- sal_uInt8 nEncoding; // compression type
- sal_uInt16 nBitsPerPlanePix; // bits per plane per pixel
- sal_uInt16 nPlanes; // no of planes
- sal_uInt16 nBytesPerPlaneLin; // bytes per plane line
-
- sal_uInt32 nWidth, nHeight; // dimension in pixel
- sal_uInt16 nResX, nResY; // resolution in pixel per inch or 0,0
- sal_uInt16 nDestBitsPerPixel; // bits per pixel in destination bitmap 1,4,8 or 24
- std::unique_ptr<sal_uInt8[]>
- pPalette;
- bool bStatus; // from now on do not read status from stream ( SJ )
-
-
- void ImplReadBody();
- void ImplReadPalette( unsigned int nCol );
- void ImplReadHeader();
-
-public:
- explicit PCXReader(SvStream &rStream);
- bool ReadPCX(Graphic & rGraphic );
- // Reads a PCX file from the stream and fills the GDIMetaFile
-};
-
-}
-
-//=================== methods of PCXReader ==============================
-
-PCXReader::PCXReader(SvStream &rStream)
- : m_rPCX(rStream)
- , nVersion(0)
- , nEncoding(0)
- , nBitsPerPlanePix(0)
- , nPlanes(0)
- , nBytesPerPlaneLin(0)
- , nWidth(0)
- , nHeight(0)
- , nResX(0)
- , nResY(0)
- , nDestBitsPerPixel(0)
- , pPalette(new sal_uInt8[ 768 ])
- , bStatus(false)
-{
-}
-
-bool PCXReader::ReadPCX(Graphic & rGraphic)
-{
- if ( m_rPCX.GetError() )
- return false;
-
- m_rPCX.SetEndian(SvStreamEndian::LITTLE);
-
- // read header:
-
- bStatus = true;
-
- ImplReadHeader();
-
- // sanity check there is enough data before trying allocation
- if (bStatus && nBytesPerPlaneLin > m_rPCX.remainingSize() / nPlanes)
- {
- bStatus = false;
- }
-
- if (bStatus)
- {
- sal_uInt32 nResult;
- bStatus = !o3tl::checked_multiply(nWidth, nHeight, nResult) && nResult <= SAL_MAX_INT32/2/3;
- }
-
- // Write BMP header and conditionally (maybe invalid for now) color palette:
- if (bStatus)
- {
- mpBitmap.reset( new vcl::bitmap::RawBitmap( Size( nWidth, nHeight ), 24 ) );
-
- if ( nDestBitsPerPixel <= 8 )
- {
- sal_uInt16 nColors = 1 << nDestBitsPerPixel;
- sal_uInt8* pPal = pPalette.get();
- mvPalette.resize( nColors );
- for ( sal_uInt16 i = 0; i < nColors; i++, pPal += 3 )
- {
- mvPalette[i] = Color( pPal[ 0 ], pPal[ 1 ], pPal[ 2 ] );
- }
- }
-
- // read bitmap data
- ImplReadBody();
-
- // If an extended color palette exists at the end of the file, then read it and
- // and write again in palette:
- if ( nDestBitsPerPixel == 8 && bStatus )
- {
- sal_uInt8* pPal = pPalette.get();
- m_rPCX.SeekRel(1);
- ImplReadPalette(256);
- mvPalette.resize( 256 );
- for ( sal_uInt16 i = 0; i < 256; i++, pPal += 3 )
- {
- mvPalette[i] = Color( pPal[ 0 ], pPal[ 1 ], pPal[ 2 ] );
- }
- }
-
- if ( bStatus )
- {
- rGraphic = vcl::bitmap::CreateFromData(std::move(*mpBitmap));
- return true;
- }
- }
- return false;
-}
-
-void PCXReader::ImplReadHeader()
-{
- sal_uInt8 nbyte(0);
- m_rPCX.ReadUChar( nbyte ).ReadUChar( nVersion ).ReadUChar( nEncoding );
- if ( nbyte!=0x0a || (nVersion != 0 && nVersion != 2 && nVersion != 3 && nVersion != 5) || nEncoding > 1 )
- {
- bStatus = false;
- return;
- }
-
- nbyte = 0;
- m_rPCX.ReadUChar( nbyte ); nBitsPerPlanePix = static_cast<sal_uInt16>(nbyte);
- sal_uInt16 nMinX(0),nMinY(0),nMaxX(0),nMaxY(0);
- m_rPCX.ReadUInt16( nMinX ).ReadUInt16( nMinY ).ReadUInt16( nMaxX ).ReadUInt16( nMaxY );
-
- if ((nMinX > nMaxX) || (nMinY > nMaxY))
- {
- bStatus = false;
- return;
- }
-
- nWidth = nMaxX-nMinX+1;
- nHeight = nMaxY-nMinY+1;
-
- m_rPCX.ReadUInt16( nResX );
- m_rPCX.ReadUInt16( nResY );
- if ( nResX >= nWidth || nResY >= nHeight || ( nResX != nResY ) )
- nResX = nResY = 0;
-
- ImplReadPalette( 16 );
-
- m_rPCX.SeekRel( 1 );
- nbyte = 0;
- m_rPCX.ReadUChar( nbyte ); nPlanes = static_cast<sal_uInt16>(nbyte);
- sal_uInt16 nushort(0);
- m_rPCX.ReadUInt16( nushort ); nBytesPerPlaneLin = nushort;
- sal_uInt16 nPaletteInfo;
- m_rPCX.ReadUInt16( nPaletteInfo );
-
- m_rPCX.SeekRel( 58 );
-
- nDestBitsPerPixel = nBitsPerPlanePix * nPlanes;
- if (nDestBitsPerPixel == 2 || nDestBitsPerPixel == 3) nDestBitsPerPixel = 4;
-
- if ( ( nDestBitsPerPixel != 1 && nDestBitsPerPixel != 4 && nDestBitsPerPixel != 8 && nDestBitsPerPixel != 24 )
- || nPlanes > 4 || nBytesPerPlaneLin < ( ( nWidth * nBitsPerPlanePix+7 ) >> 3 ) )
- {
- bStatus = false;
- return;
- }
-
- // If the bitmap has only 2 colors, the palette is most often invalid and it is always(?)
- // a black and white image:
- if ( nPlanes == 1 && nBitsPerPlanePix == 1 )
- {
- pPalette[ 0 ] = pPalette[ 1 ] = pPalette[ 2 ] = 0x00;
- pPalette[ 3 ] = pPalette[ 4 ] = pPalette[ 5 ] = 0xff;
- }
-}
-
-void PCXReader::ImplReadBody()
-{
- std::unique_ptr<sal_uInt8[]> pPlane[ 4 ];
- sal_uInt8 * pDest;
- sal_uInt32 i, ny, nLastPercent = 0, nPercent;
- sal_uInt16 nCount, nx, np;
- sal_uInt8 nDat = 0, nCol = 0;
-
- for( np = 0; np < nPlanes; np++ )
- pPlane[ np ].reset(new sal_uInt8[ nBytesPerPlaneLin ]);
-
- nCount = 0;
- for ( ny = 0; ny < nHeight; ny++ )
- {
- if (!m_rPCX.good())
- {
- bStatus = false;
- break;
- }
- nPercent = ny * 60 / nHeight + 10;
- if ( ny == 0 || nLastPercent + 4 <= nPercent )
- {
- nLastPercent = nPercent;
- }
- for ( np = 0; np < nPlanes; np++)
- {
- if ( nEncoding == 0)
- m_rPCX.ReadBytes( static_cast<void *>(pPlane[ np ].get()), nBytesPerPlaneLin );
- else
- {
- pDest = pPlane[ np ].get();
- nx = nBytesPerPlaneLin;
- while ( nCount > 0 && nx > 0)
- {
- *(pDest++) = nDat;
- nx--;
- nCount--;
- }
- while (nx > 0 && m_rPCX.good())
- {
- m_rPCX.ReadUChar( nDat );
- if ( ( nDat & 0xc0 ) == 0xc0 )
- {
- nCount =static_cast<sal_uInt64>(nDat) & 0x003f;
- m_rPCX.ReadUChar( nDat );
- if ( nCount < nx )
- {
- nx -= nCount;
- while ( nCount > 0)
- {
- *(pDest++) = nDat;
- nCount--;
- }
- }
- else
- {
- nCount -= nx;
- do
- {
- *(pDest++) = nDat;
- nx--;
- }
- while ( nx > 0 );
- break;
- }
- }
- else
- {
- *(pDest++) = nDat;
- nx--;
- }
- }
- }
- }
- sal_uInt8 *pSource1 = pPlane[ 0 ].get();
- sal_uInt8 *pSource2 = pPlane[ 1 ].get();
- sal_uInt8 *pSource3 = pPlane[ 2 ].get();
- sal_uInt8 *pSource4 = pPlane[ 3 ].get();
- switch ( nBitsPerPlanePix + ( nPlanes << 8 ) )
- {
- // 2 colors
- case 0x101 :
- for ( i = 0; i < nWidth; i++ )
- {
- sal_uInt32 nShift = ( i & 7 ) ^ 7;
- if ( nShift == 0 )
- mpBitmap->SetPixel( ny, i, mvPalette[*(pSource1++) & 1] );
- else
- mpBitmap->SetPixel( ny, i, mvPalette[(*pSource1 >> nShift ) & 1] );
- }
- break;
- // 4 colors
- case 0x102 :
- for ( i = 0; i < nWidth; i++ )
- {
- switch( i & 3 )
- {
- case 0 :
- nCol = *pSource1 >> 6;
- break;
- case 1 :
- nCol = ( *pSource1 >> 4 ) & 0x03 ;
- break;
- case 2 :
- nCol = ( *pSource1 >> 2 ) & 0x03;
- break;
- case 3 :
- nCol = ( *pSource1++ ) & 0x03;
- break;
- }
- mpBitmap->SetPixel( ny, i, mvPalette[nCol] );
- }
- break;
- // 256 colors
- case 0x108 :
- for ( i = 0; i < nWidth; i++ )
- {
- mpBitmap->SetPixel( ny, i, mvPalette[*pSource1++] );
- }
- break;
- // 8 colors
- case 0x301 :
- for ( i = 0; i < nWidth; i++ )
- {
- sal_uInt32 nShift = ( i & 7 ) ^ 7;
- if ( nShift == 0 )
- {
- nCol = ( *pSource1++ & 1) + ( ( *pSource2++ << 1 ) & 2 ) + ( ( *pSource3++ << 2 ) & 4 );
- mpBitmap->SetPixel( ny, i, mvPalette[nCol] );
- }
- else
- {
- nCol = sal::static_int_cast< sal_uInt8 >(
- ( ( *pSource1 >> nShift ) & 1) + ( ( ( *pSource2 >> nShift ) << 1 ) & 2 ) +
- ( ( ( *pSource3 >> nShift ) << 2 ) & 4 ));
- mpBitmap->SetPixel( ny, i, mvPalette[nCol] );
- }
- }
- break;
- // 16 colors
- case 0x401 :
- for ( i = 0; i < nWidth; i++ )
- {
- sal_uInt32 nShift = ( i & 7 ) ^ 7;
- if ( nShift == 0 )
- {
- nCol = ( *pSource1++ & 1) + ( ( *pSource2++ << 1 ) & 2 ) + ( ( *pSource3++ << 2 ) & 4 ) +
- ( ( *pSource4++ << 3 ) & 8 );
- mpBitmap->SetPixel( ny, i, mvPalette[nCol] );
- }
- else
- {
- nCol = sal::static_int_cast< sal_uInt8 >(
- ( ( *pSource1 >> nShift ) & 1) + ( ( ( *pSource2 >> nShift ) << 1 ) & 2 ) +
- ( ( ( *pSource3 >> nShift ) << 2 ) & 4 ) + ( ( ( *pSource4 >> nShift ) << 3 ) & 8 ));
- mpBitmap->SetPixel( ny, i, mvPalette[nCol] );
- }
- }
- break;
- // 16m colors
- case 0x308 :
- for ( i = 0; i < nWidth; i++ )
- {
- mpBitmap->SetPixel( ny, i, Color( *pSource1++, *pSource2++, *pSource3++ ) );
-
- }
- break;
- default :
- bStatus = false;
- break;
- }
- }
-}
-
-void PCXReader::ImplReadPalette( unsigned int nCol )
-{
- sal_uInt8 r, g, b;
- sal_uInt8* pPtr = pPalette.get();
- for ( unsigned int i = 0; i < nCol; i++ )
- {
- m_rPCX.ReadUChar( r ).ReadUChar( g ).ReadUChar( b );
- *pPtr++ = r;
- *pPtr++ = g;
- *pPtr++ = b;
- }
-}
-
-//================== GraphicImport - the exported function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-ipxGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
-{
- PCXReader aPCXReader(rStream);
- bool bRetValue = aPCXReader.ReadPCX(rGraphic);
- if ( !bRetValue )
- rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return bRetValue;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
deleted file mode 100644
index 43b872f09558..000000000000
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ /dev/null
@@ -1,2017 +0,0 @@
-/* -*- 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 <string.h>
-#include <osl/thread.h>
-#include <sal/log.hxx>
-#include <vcl/BitmapTools.hxx>
-#include <vcl/graph.hxx>
-#include <vcl/gdimtf.hxx>
-#include <tools/poly.hxx>
-#include <tools/fract.hxx>
-#include <tools/stream.hxx>
-#include <vcl/virdev.hxx>
-#include <math.h>
-
-#include "ipict.hxx"
-#include "shape.hxx"
-#include <memory>
-
-#include <vcl/FilterConfigItem.hxx>
- // complete FilterConfigItem for GraphicImport under -fsanitize=function
-
-namespace PictReaderInternal {
- namespace {
-
- //! utilitary class to store a pattern, ...
- class Pattern {
- public:
- //! constructor
- Pattern() : penStyle(PEN_SOLID),
- brushStyle(BRUSH_SOLID),
- nBitCount(64),
- isColor(false),
- isRead(false)
- {}
-
- //! reads black/white pattern from SvStream
- sal_uInt8 read(SvStream &stream);
- //! sets the color
- void setColor(Color col) { isColor = true; color = col; }
- /** returns a color which can be "used" to replace the pattern,
- * created from ForeColor and BackColor, ...
- *
- * note: maybe, we must also use some mode PatCopy, ... to define the color
- */
- Color getColor(Color bkColor, Color fgColor) const {
- if (isColor) return color;
- // we create a gray pattern from nBitCount
- double alpha = nBitCount / 64.0;
- return Color(sal_uInt8(alpha*fgColor.GetRed()+(1.0-alpha)*bkColor.GetRed()),
- sal_uInt8(alpha*fgColor.GetGreen()+(1.0-alpha)*bkColor.GetGreen()),
- sal_uInt8(alpha*fgColor.GetBlue()+(1.0-alpha)*bkColor.GetBlue()));
- }
-
- //! returns true if this is the default pattern
- bool isDefault() const { return !isRead; }
-
- enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
- enum BrushStyle { BRUSH_SOLID, BRUSH_HORZ, BRUSH_VERT,
- BRUSH_CROSS, BRUSH_DIAGCROSS, BRUSH_UPDIAG, BRUSH_DOWNDIAG,
- BRUSH_25, BRUSH_50, BRUSH_75 };
- // Data
- enum PenStyle penStyle;
- enum BrushStyle brushStyle;
- short nBitCount;
-
- bool isColor; // true if it is a color pattern
- Color color;
-
- protected:
- // flag to know if the pattern came from reading the picture, or if it is the default pattern
- bool isRead;
- };
-
- }
-
- sal_uInt8 Pattern::read(SvStream &stream) {
- unsigned char nbyte[8];
- sal_uInt32 nHiBytes, nLoBytes;
- isColor = false;
-
- // count the no of bits in pattern which are set to 1:
- nBitCount=0;
- for (unsigned char & ny : nbyte) {
- stream.ReadChar( reinterpret_cast<char&>(ny) );
- for (short nx=0; nx<8; nx++) {
- if ( (ny & (1<<nx)) != 0 ) nBitCount++;
- }
- }
-
- // store pattern in 2 long words:
- nHiBytes=(((((static_cast<sal_uInt32>(nbyte[0])<<8)|
- static_cast<sal_uInt32>(nbyte[1]))<<8)|
- static_cast<sal_uInt32>(nbyte[2]))<<8)|
- static_cast<sal_uInt32>(nbyte[3]);
- nLoBytes=(((((static_cast<sal_uInt32>(nbyte[4])<<8)|
- static_cast<sal_uInt32>(nbyte[5]))<<8)|
- static_cast<sal_uInt32>(nbyte[6]))<<8)|
- static_cast<sal_uInt32>(nbyte[7]);
-
- // create a PenStyle:
- if (nBitCount<=0) penStyle=PEN_NULL;
- else if (nBitCount<=16) penStyle=PEN_DOT;
- else if (nBitCount<=32) penStyle=PEN_DASHDOT;
- else if (nBitCount<=48) penStyle=PEN_DASH;
- else penStyle=PEN_SOLID;
-
- // create a BrushStyle:
- if (nHiBytes==0xffffffff && nLoBytes==0xffffffff) brushStyle=BRUSH_SOLID;
- else if (nHiBytes==0xff000000 && nLoBytes==0x00000000) brushStyle=BRUSH_HORZ;
- else if (nHiBytes==0x80808080 && nLoBytes==0x80808080) brushStyle=BRUSH_VERT;
- else if (nHiBytes==0xff808080 && nLoBytes==0x80808080) brushStyle=BRUSH_CROSS;
- else if (nHiBytes==0x01824428 && nLoBytes==0x10284482) brushStyle=BRUSH_DIAGCROSS;
- else if (nHiBytes==0x80402010 && nLoBytes==0x08040201) brushStyle=BRUSH_UPDIAG;
- else if (nHiBytes==0x01020408 && nLoBytes==0x10204080) brushStyle=BRUSH_DOWNDIAG;
- else if (nBitCount<=24) brushStyle=BRUSH_25;
- else if (nBitCount<=40) brushStyle=BRUSH_50;
- else if (nBitCount<=56) brushStyle=BRUSH_75;
- else brushStyle=BRUSH_SOLID;
-
- isRead = true;
-
- return 8;
- }
-}
-
-//============================ PictReader ==================================
-
-namespace {
-
-enum class PictDrawingMethod {
- FRAME, PAINT, ERASE, INVERT, FILL,
- TEXT, UNDEFINED
-};
-
-class PictReader {
- typedef class PictReaderInternal::Pattern Pattern;
-private:
-
- SvStream * pPict; // The Pict file to read.
- VclPtr<VirtualDevice> pVirDev; // Here the drawing method will be called.
- // A recording into the GDIMetaFile will take place.
-
- sal_uInt64 nOrigPos; // Initial position in pPict.
- bool IsVersion2; // If it is a version 2 Pictfile.
- tools::Rectangle aBoundingRect; // Min/Max-Rectangle for the whole drawing.
-
- Point aPenPosition;
- Point aTextPosition;
- Color aActForeColor;
- Color aActBackColor;
- Pattern eActPenPattern;
- Pattern eActFillPattern;
- Pattern eActBackPattern;
- Size nActPenSize;
- // Note: Postscript mode is stored by setting eActRop to RasterOp::N1
- RasterOp eActROP;
- PictDrawingMethod eActMethod;
- Size aActOvalSize;
- vcl::Font aActFont;
-
- Fraction aHRes;
- Fraction aVRes;
-
- Point ReadPoint();
-
- Point ReadDeltaH(Point aBase);
- Point ReadDeltaV(Point aBase);
-
- Point ReadUnsignedDeltaH(Point aBase);
- Point ReadUnsignedDeltaV(Point aBase);
-
- Size ReadSize();
-
- Color ReadColor();
-
- Color ReadRGBColor();
-
- void ReadRectangle(tools::Rectangle & rRect);
-
- sal_uInt64 ReadPolygon(tools::Polygon & rPoly);
-
- sal_uInt64 ReadPixPattern(Pattern &pattern);
-
- tools::Rectangle aLastRect;
- sal_uInt8 ReadAndDrawRect(PictDrawingMethod eMethod);
- sal_uInt8 ReadAndDrawSameRect(PictDrawingMethod eMethod);
-
- tools::Rectangle aLastRoundRect;
- sal_uInt8 ReadAndDrawRoundRect(PictDrawingMethod eMethod);
- sal_uInt8 ReadAndDrawSameRoundRect(PictDrawingMethod eMethod);
-
- tools::Rectangle aLastOval;
- sal_uInt8 ReadAndDrawOval(PictDrawingMethod eMethod);
- sal_uInt8 ReadAndDrawSameOval(PictDrawingMethod eMethod);
-
- tools::Polygon aLastPolygon;
- sal_uInt64 ReadAndDrawPolygon(PictDrawingMethod eMethod);
- sal_uInt8 ReadAndDrawSamePolygon(PictDrawingMethod eMethod);
-
- tools::Rectangle aLastArcRect;
- sal_uInt8 ReadAndDrawArc(PictDrawingMethod eMethod);
- sal_uInt8 ReadAndDrawSameArc(PictDrawingMethod eMethod);
-
- sal_uInt64 ReadAndDrawRgn(PictDrawingMethod eMethod);
- sal_uInt8 ReadAndDrawSameRgn(PictDrawingMethod eMethod);
-
- // returns true if there's no need to print the shape/text/frame
- bool IsInvisible( PictDrawingMethod eMethod ) const {
- if ( eActROP == RasterOp::N1 ) return true;
- if ( eMethod == PictDrawingMethod::FRAME && nActPenSize.IsEmpty() ) return true;
- return false;
- }
-
- void DrawingMethod(PictDrawingMethod eMethod);
-
- sal_uInt64 ReadAndDrawText();
-
- sal_uInt64 ReadPixMapEtc(BitmapEx & rBitmap, bool bBaseAddr, bool bColorTable,
- tools::Rectangle * pSrcRect, tools::Rectangle * pDestRect,
- bool bMode, bool bMaskRgn);
-
- void ReadHeader();
- // Reads the header of the Pict file, set IsVersion and aBoundingRect
-
- sal_uInt64 ReadData(sal_uInt16 nOpcode);
- // Reads the date of anOopcode and executes the operation.
- // The number of data bytes belonging to the opcode will be returned
- // in any case.
-
- void SetLineColor( const Color& rColor );
- void SetFillColor( const Color& rColor );
-
- // OSNOLA: returns the text encoding which must be used for system id
- static rtl_TextEncoding GetTextEncoding (sal_uInt16 fId = 0xFFFF);
-
-public:
-
- PictReader()
- : pPict(nullptr)
- , pVirDev(nullptr)
- , nOrigPos(0)
- , IsVersion2(false)
- , eActROP(RasterOp::OverPaint)
- , eActMethod(PictDrawingMethod::UNDEFINED)
- {
- aActFont.SetCharSet(GetTextEncoding());
- }
-
- void ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile );
- // reads a pict file from the stream and fills the GDIMetaFile
-
-};
-
-}
-
-static void SetByte(sal_uInt16& nx, sal_uInt16 ny, vcl::bitmap::RawBitmap& rBitmap, sal_uInt16 nPixelSize, sal_uInt8 nDat, sal_uInt16 nWidth, std::vector<Color> const & rvPalette)
-{
- switch (nPixelSize)
- {
- case 1:
- rBitmap.SetPixel(ny, nx++, rvPalette[(nDat >> 7) & 1]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[(nDat >> 6) & 1]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[(nDat >> 5) & 1]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[(nDat >> 4) & 1]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[(nDat >> 3) & 1]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[(nDat >> 2) & 1]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[(nDat >> 1) & 1]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[nDat & 1]);
- break;
- case 2:
- rBitmap.SetPixel(ny, nx++, rvPalette[nDat >> 6]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[(nDat>>4)&3]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[(nDat>>2)&3]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[nDat & 3]);
- break;
- case 4:
- rBitmap.SetPixel(ny, nx++, rvPalette[nDat >> 4]);
- if ( nx == nWidth ) break;
- rBitmap.SetPixel(ny, nx++, rvPalette[nDat & 0x0f]);
- break;
- case 8:
- rBitmap.SetPixel(ny, nx++, rvPalette[nDat]);
- break;
- }
-}
-
-//=================== methods of PictReader ==============================
-rtl_TextEncoding PictReader::GetTextEncoding (sal_uInt16 fId) {
- static rtl_TextEncoding enc = [&]()
- {
- rtl_TextEncoding def = osl_getThreadTextEncoding();
- // we keep osl_getThreadTextEncoding only if it is a mac encoding
- switch(def) {
- case RTL_TEXTENCODING_APPLE_ROMAN:
- case RTL_TEXTENCODING_APPLE_ARABIC:
- case RTL_TEXTENCODING_APPLE_CENTEURO:
- case RTL_TEXTENCODING_APPLE_CROATIAN:
- case RTL_TEXTENCODING_APPLE_CYRILLIC:
- case RTL_TEXTENCODING_APPLE_DEVANAGARI:
- case RTL_TEXTENCODING_APPLE_FARSI:
- case RTL_TEXTENCODING_APPLE_GREEK:
- case RTL_TEXTENCODING_APPLE_GUJARATI:
- case RTL_TEXTENCODING_APPLE_GURMUKHI:
- case RTL_TEXTENCODING_APPLE_HEBREW:
- case RTL_TEXTENCODING_APPLE_ICELAND:
- case RTL_TEXTENCODING_APPLE_ROMANIAN:
- case RTL_TEXTENCODING_APPLE_THAI:
- case RTL_TEXTENCODING_APPLE_TURKISH:
- case RTL_TEXTENCODING_APPLE_UKRAINIAN:
- case RTL_TEXTENCODING_APPLE_CHINSIMP:
- case RTL_TEXTENCODING_APPLE_CHINTRAD:
- case RTL_TEXTENCODING_APPLE_JAPANESE:
- case RTL_TEXTENCODING_APPLE_KOREAN:
- return def; break;
- default:
- break;
- }
- return RTL_TEXTENCODING_APPLE_ROMAN;
- }();
- if (fId == 13) return RTL_TEXTENCODING_ADOBE_DINGBATS; // CHECKME
- if (fId == 23) return RTL_TEXTENCODING_ADOBE_SYMBOL;
- return enc;
-}
-
-void PictReader::SetLineColor( const Color& rColor )
-{
- pVirDev->SetLineColor( rColor );
-}
-
-void PictReader::SetFillColor( const Color& rColor )
-{
- pVirDev->SetFillColor( rColor );
-}
-
-Point PictReader::ReadPoint()
-{
- short nx,ny;
-
- pPict->ReadInt16( ny ).ReadInt16( nx );
-
- Point aPoint( static_cast<tools::Long>(nx) - aBoundingRect.Left(),
- static_cast<tools::Long>(ny) - aBoundingRect.Top() );
-
- SAL_INFO("filter.pict", "ReadPoint: " << aPoint);
- return aPoint;
-}
-
-Point PictReader::ReadDeltaH(Point aBase)
-{
- signed char ndh;
-
- pPict->ReadChar( reinterpret_cast<char&>(ndh) );
-
- return Point( aBase.X() + static_cast<tools::Long>(ndh), aBase.Y() );
-}
-
-Point PictReader::ReadDeltaV(Point aBase)
-{
- signed char ndv;
-
- pPict->ReadChar( reinterpret_cast<char&>(ndv) );
-
- return Point( aBase.X(), aBase.Y() + static_cast<tools::Long>(ndv) );
-}
-
-Point PictReader::ReadUnsignedDeltaH(Point aBase)
-{
- sal_uInt8 ndh;
-
- pPict->ReadUChar( ndh );
-
- return Point( aBase.X() + static_cast<tools::Long>(ndh), aBase.Y() );
-}
-
-Point PictReader::ReadUnsignedDeltaV(Point aBase)
-{
- sal_uInt8 ndv;
-
- pPict->ReadUChar( ndv );
-
- return Point( aBase.X(), aBase.Y() + static_cast<tools::Long>(ndv) );
-}
-
-Size PictReader::ReadSize()
-{
- short nx,ny;
-
- pPict->ReadInt16( ny ).ReadInt16( nx );
-
- return Size( static_cast<tools::Long>(nx), static_cast<tools::Long>(ny) );
-}
-
-Color PictReader::ReadColor()
-{
- sal_uInt32 nCol;
- Color aCol;
-
- pPict->ReadUInt32( nCol );
- switch (nCol)
- {
- case 33: aCol=COL_BLACK; break;
- case 30: aCol=COL_WHITE; break;
- case 205: aCol=COL_LIGHTRED; break;
- case 341: aCol=COL_LIGHTGREEN; break;
- case 409: aCol=COL_LIGHTBLUE; break;
- case 273: aCol=COL_LIGHTCYAN; break;
- case 137: aCol=COL_LIGHTMAGENTA; break;
- case 69: aCol=COL_YELLOW; break;
- default: aCol=COL_LIGHTGRAY;
- }
- return aCol;
-}
-
-
-Color PictReader::ReadRGBColor()
-{
- sal_uInt16 nR, nG, nB;
-
- pPict->ReadUInt16( nR ).ReadUInt16( nG ).ReadUInt16( nB );
- return Color( static_cast<sal_uInt8>( nR >> 8 ), static_cast<sal_uInt8>( nG >> 8 ), static_cast<sal_uInt8>( nB >> 8 ) );
-}
-
-
-void PictReader::ReadRectangle(tools::Rectangle & rRect)
-{
- Point aTopLeft, aBottomRight;
-
- aTopLeft=ReadPoint();
- aBottomRight=ReadPoint();
- if (aTopLeft.X() > aBottomRight.X() || aTopLeft.Y() > aBottomRight.Y())
- {
- SAL_WARN("filter.pict", "broken rectangle");
- pPict->SetError( SVSTREAM_FILEFORMAT_ERROR );
- rRect = tools::Rectangle();
- return;
- }
- rRect=tools::Rectangle(aTopLeft,aBottomRight);
-
- SAL_INFO("filter.pict", "ReadRectangle: " << rRect);
-}
-
-sal_uInt64 PictReader::ReadPolygon(tools::Polygon & rPoly)
-{
- sal_uInt16 nSize(0);
- pPict->ReadUInt16(nSize);
- pPict->SeekRel(8);
- sal_uInt64 nDataSize = static_cast<sal_uInt64>(nSize);
- nSize=(nSize-10)/4;
- const size_t nMaxPossiblePoints = pPict->remainingSize() / 2 * sizeof(sal_uInt16);
- if (nSize > nMaxPossiblePoints)
- {
- SAL_WARN("filter.pict", "pict record claims to have: " << nSize << " points, but only " << nMaxPossiblePoints << " possible, clamping");
- nSize = nMaxPossiblePoints;
- }
- rPoly.SetSize(nSize);
- for (sal_uInt16 i = 0; i < nSize; ++i)
- {
- rPoly.SetPoint(ReadPoint(), i);
- if (!pPict->good())
- {
- rPoly.SetSize(i);
- break;
- }
- }
- return nDataSize;
-}
-
-sal_uInt64 PictReader::ReadPixPattern(PictReader::Pattern &pattern)
-{
- // Don't know if this is correct because no picture which contains PixPatterns found.
- // Here again the attempt to calculate the size of the date to create simple StarView-Styles
- // from them. Luckily a PixPattern always contains a normal pattern.
-
-
- sal_uInt64 nDataSize;
- sal_uInt16 nPatType;
- BitmapEx aBMP;
-
- pPict->ReadUInt16( nPatType );
- if (nPatType==1) {
- pattern.read(*pPict);
- nDataSize=ReadPixMapEtc(aBMP,false,true,nullptr,nullptr,false,false);
- // CHANGEME: use average pixmap colors to update the pattern, ...
- if (nDataSize!=0xffffffff) nDataSize+=10;
- }
- else if (nPatType==2) {
- pattern.read(*pPict);
- // RGBColor
- sal_uInt16 nR, nG, nB;
- pPict->ReadUInt16( nR ).ReadUInt16( nG ).ReadUInt16( nB );
- Color col(static_cast<sal_uInt8>( nR >> 8 ), static_cast<sal_uInt8>( nG >> 8 ), static_cast<sal_uInt8>( nB >> 8 ) );
- pattern.setColor(col);
- nDataSize=16;
- }
- else nDataSize=0xffffffff;
-
- return nDataSize;
-}
-
-sal_uInt8 PictReader::ReadAndDrawRect(PictDrawingMethod eMethod)
-{
- ReadRectangle(aLastRect);
- ReadAndDrawSameRect(eMethod);
- return 8;
-}
-
-sal_uInt8 PictReader::ReadAndDrawSameRect(PictDrawingMethod eMethod)
-{
- if (IsInvisible(eMethod)) return 0;
- DrawingMethod(eMethod);
- PictReaderShape::drawRectangle( pVirDev, eMethod == PictDrawingMethod::FRAME, aLastRect, nActPenSize );
- return 0;
-}
-
-sal_uInt8 PictReader::ReadAndDrawRoundRect(PictDrawingMethod eMethod)
-{
- ReadRectangle(aLastRoundRect);
- ReadAndDrawSameRoundRect(eMethod);
- return 8;
-}
-
-sal_uInt8 PictReader::ReadAndDrawSameRoundRect(PictDrawingMethod eMethod)
-{
- if (IsInvisible(eMethod)) return 0;
- DrawingMethod(eMethod);
- PictReaderShape::drawRoundRectangle( pVirDev, eMethod == PictDrawingMethod::FRAME, aLastRoundRect, aActOvalSize, nActPenSize );
- return 0;
-}
-
-sal_uInt8 PictReader::ReadAndDrawOval(PictDrawingMethod eMethod)
-{
- ReadRectangle(aLastOval);
- ReadAndDrawSameOval(eMethod);
- return 8;
-}
-
-sal_uInt8 PictReader::ReadAndDrawSameOval(PictDrawingMethod eMethod)
-{
- if (IsInvisible(eMethod)) return 0;
- DrawingMethod(eMethod);
- PictReaderShape::drawEllipse( pVirDev, eMethod == PictDrawingMethod::FRAME, aLastOval, nActPenSize );
- return 0;
-}
-
-sal_uInt64 PictReader::ReadAndDrawPolygon(PictDrawingMethod eMethod)
-{
- sal_uInt64 nDataSize;
- nDataSize=ReadPolygon(aLastPolygon);
- ReadAndDrawSamePolygon(eMethod);
- return nDataSize;
-}
-
-sal_uInt8 PictReader::ReadAndDrawSamePolygon(PictDrawingMethod eMethod)
-{
- if (IsInvisible(eMethod)) return 0;
- DrawingMethod(eMethod);
- PictReaderShape::drawPolygon( pVirDev, eMethod == PictDrawingMethod::FRAME, aLastPolygon, nActPenSize );
- return 0;
-}
-
-
-sal_uInt8 PictReader::ReadAndDrawArc(PictDrawingMethod eMethod)
-{
- ReadRectangle(aLastArcRect);
- ReadAndDrawSameArc(eMethod);
- return 12;
-}
-
-sal_uInt8 PictReader::ReadAndDrawSameArc(PictDrawingMethod eMethod)
-{
- short nstartAngle, narcAngle;
- double fAng1, fAng2;
-
- pPict->ReadInt16( nstartAngle ).ReadInt16( narcAngle );
- if (IsInvisible(eMethod)) return 4;
- DrawingMethod(eMethod);
-
- if (narcAngle<0) {
- nstartAngle = nstartAngle + narcAngle;
- narcAngle=-narcAngle;
- }
- const double pi = 2 * acos(0.0);
- fAng1 = static_cast<double>(nstartAngle) * pi / 180.0;
- fAng2 = static_cast<double>(nstartAngle + narcAngle) * pi / 180.0;
- PictReaderShape::drawArc( pVirDev, eMethod == PictDrawingMethod::FRAME, aLastArcRect, fAng1, fAng2, nActPenSize );
- return 4;
-}
-
-sal_uInt64 PictReader::ReadAndDrawRgn(PictDrawingMethod eMethod)
-{
- sal_uInt16 nSize;
-
- pPict->ReadUInt16( nSize );
- // read the DATA
- //
- // a region data is a mask and is probably coded as
- // - the first 8 bytes: bdbox ( which can be read by ReadRectangle )
- // - then a list of line modifiers: y_i, a_0, b_0, a_1, b_1, ..., a_{n_i}, b_{n_i}, 0x7fff
- // - 0x7fff
- // where y_i is the increasing sequences of line coordinates
- // and on each line: a0 < b0 < a1 < b1 < ... < a_{n_i} < b_{n_i}
-
- // it can be probably decoded as :
- // M=an empty mask: ie. (0, 0, ... ) with (left_box-right_box+1) zeroes
- // then for each line (y_i):
- // - takes M and inverts all values in [a_0,b_0-1], in [a_1,b_1-1] ...
- // - sets M = new y_i line mask
- ReadAndDrawSameRgn(eMethod);
- return static_cast<sal_uInt64>(nSize);
-}
-
-sal_uInt8 PictReader::ReadAndDrawSameRgn(PictDrawingMethod eMethod)
-{
- if (IsInvisible(eMethod)) return 0;
- DrawingMethod(eMethod);
- // DISPLAY: ...???...
- return 0;
-}
-
-void PictReader::DrawingMethod(PictDrawingMethod eMethod)
-{
- if( eActMethod==eMethod ) return;
- switch (eMethod) {
- case PictDrawingMethod::FRAME:
- if (eActPenPattern.isDefault())
- SetLineColor( aActForeColor );
- else
- SetLineColor(eActPenPattern.getColor(aActBackColor, aActForeColor));
- SetFillColor( COL_TRANSPARENT );
- pVirDev->SetRasterOp(eActROP);
- break;
- case PictDrawingMethod::PAINT:
- SetLineColor( COL_TRANSPARENT );
- if (eActPenPattern.isDefault())
- SetFillColor( aActForeColor );
- else
- SetFillColor(eActPenPattern.getColor(aActBackColor, aActForeColor));
- pVirDev->SetRasterOp(eActROP);
- break;
- case PictDrawingMethod::ERASE:
- SetLineColor( COL_TRANSPARENT );
- if (eActBackPattern.isDefault())
- SetFillColor( aActBackColor );// Osnola: previously aActForeColor
- else // checkMe
- SetFillColor(eActBackPattern.getColor(COL_BLACK, aActBackColor));
- pVirDev->SetRasterOp(RasterOp::OverPaint);
- break;
- case PictDrawingMethod::INVERT: // checkme
- SetLineColor( COL_TRANSPARENT);
- SetFillColor( COL_BLACK );
- pVirDev->SetRasterOp(RasterOp::Invert);
- break;
- case PictDrawingMethod::FILL:
- SetLineColor( COL_TRANSPARENT );
- if (eActFillPattern.isDefault())
- SetFillColor( aActForeColor );
- else
- SetFillColor(eActFillPattern.getColor(aActBackColor, aActForeColor));
- pVirDev->SetRasterOp(RasterOp::OverPaint);
- break;
- case PictDrawingMethod::TEXT:
- aActFont.SetColor(aActForeColor);
- aActFont.SetFillColor(aActBackColor);
- aActFont.SetTransparent(true);
- pVirDev->SetFont(aActFont);
- pVirDev->SetRasterOp(RasterOp::OverPaint);
- break;
- default:
- break; // -Wall undefined not handled...
- }
- eActMethod=eMethod;
-}
-
-sal_uInt64 PictReader::ReadAndDrawText()
-{
- char nByteLen;
- sal_uInt32 nLen, nDataLen;
- char sText[256];
-
- pPict->ReadChar( nByteLen ); nLen=static_cast<sal_uInt32>(nByteLen)&0x000000ff;
- nDataLen = nLen + 1;
- pPict->ReadBytes(&sText, nLen);
-
- if (IsInvisible( PictDrawingMethod::TEXT )) return nDataLen;
- DrawingMethod( PictDrawingMethod::TEXT );
-
- // remove annoying control characters:
- while ( nLen > 0 && static_cast<unsigned char>(sText[ nLen - 1 ]) < 32 )
- nLen--;
- sText[ nLen ] = 0;
- OUString aString( sText, strlen(sText), aActFont.GetCharSet());
- pVirDev->DrawText( Point( aTextPosition.X(), aTextPosition.Y() ), aString );
- return nDataLen;
-}
-
-sal_uInt64 PictReader::ReadPixMapEtc( BitmapEx &rBitmap, bool bBaseAddr, bool bColorTable, tools::Rectangle* pSrcRect,
- tools::Rectangle* pDestRect, bool bMode, bool bMaskRgn )
-{
- std::unique_ptr<vcl::bitmap::RawBitmap> pBitmap;
- sal_uInt16 nPackType(0), nPixelSize(0), nCmpCount(0), nCmpSize(0);
- sal_uInt8 nDat(0), nRed(0), nGreen(0), nBlue(0);
-
- // The calculation of nDataSize is considering the size of the whole data.
- size_t nDataSize = 0;
-
- // conditionally skip BaseAddr
- if ( bBaseAddr )
- {
- pPict->SeekRel( 4 );
- nDataSize += 4;
- }
-
- // Read PixMap or Bitmap structure;
- sal_uInt16 nRowBytes(0), nBndX(0), nBndY(0), nWidth(0), nHeight(0);
- pPict->ReadUInt16(nRowBytes).ReadUInt16(nBndY).ReadUInt16(nBndX).ReadUInt16(nHeight).ReadUInt16(nWidth);
- if (nBndY > nHeight)
- return 0xffffffff;
- nHeight = nHeight - nBndY;
- if (nHeight == 0)
- return 0xffffffff;
- if (nBndX > nWidth)
- return 0xffffffff;
- nWidth = nWidth - nBndX;
- if (nWidth == 0)
- return 0xffffffff;
-
- std::vector<Color> aPalette;
- const bool bNotMonoChrome = (nRowBytes & 0x8000) != 0;
- if (bNotMonoChrome)
- { // it is a PixMap
- nRowBytes &= 0x3fff;
- sal_uInt16 nVersion;
- sal_uInt32 nPackSize;
- sal_uInt16 nPixelType;
- sal_uInt32 nPlaneBytes;
- sal_uInt32 nHRes, nVRes;
- pPict->ReadUInt16( nVersion ).ReadUInt16( nPackType ).ReadUInt32( nPackSize ).ReadUInt32( nHRes ).ReadUInt32( nVRes ).ReadUInt16( nPixelType ).ReadUInt16( nPixelSize ).ReadUInt16( nCmpCount ).ReadUInt16( nCmpSize ).ReadUInt32( nPlaneBytes );
-
- pPict->SeekRel( 8 );
- nDataSize += 46;
-
- if ( bColorTable )
- {
- pPict->SeekRel( 6 );
- sal_uInt16 nColTabSize(0);
- pPict->ReadUInt16(nColTabSize);
-
- if (nColTabSize > 255)
- return 0xffffffff;
-
- ++nColTabSize;
-
- aPalette.resize(nColTabSize);
-
- for (size_t i = 0; i < nColTabSize; ++i)
- {
- pPict->SeekRel(2);
- sal_uInt8 nDummy;
- pPict->ReadUChar( nRed ).ReadUChar( nDummy ).ReadUChar( nGreen ).ReadUChar( nDummy ).ReadUChar( nBlue ).ReadUChar( nDummy );
- aPalette[i] = Color(nRed, nGreen, nBlue);
- }
-
- nDataSize += 8 + nColTabSize * 8;
- }
- }
- else
- {
- nRowBytes &= 0x3fff;
- nPixelSize = nCmpCount = nCmpSize = 1;
- nDataSize += 10;
- aPalette.resize(2);
- aPalette[0] = Color(0xff, 0xff, 0xff);
- aPalette[1] = Color(0, 0, 0);
- }
-
- // conditionally read source rectangle:
- if ( pSrcRect != nullptr)
- {
- sal_uInt16 nTop, nLeft, nBottom, nRight;
- pPict->ReadUInt16( nTop ).ReadUInt16( nLeft ).ReadUInt16( nBottom ).ReadUInt16( nRight );
- *pSrcRect = tools::Rectangle(nLeft, nTop, nRight, nBottom);
- nDataSize += 8;
- }
-
- // conditionally read destination rectangle:
- if ( pDestRect != nullptr )
- {
- Point aTL, aBR;
- aTL = ReadPoint();
- aBR = ReadPoint();
- *pDestRect = tools::Rectangle( aTL, aBR );
- nDataSize += 8;
- }
-
- // conditionally read mode (or skip it):
- if ( bMode )
- {
- pPict->SeekRel(2);
- nDataSize += 2;
- }
-
- // conditionally read region (or skip it):
- if ( bMaskRgn )
- {
- sal_uInt16 nSize;
- pPict->ReadUInt16( nSize );
- pPict->SeekRel( nSize - 2 );
- nDataSize += nSize;
- }
-
- // read and write Bitmap bits:
- if ( nPixelSize == 1 || nPixelSize == 2 || nPixelSize == 4 || nPixelSize == 8 )
- {
- sal_uInt16 nSrcBPL, nDestBPL;
- size_t nCount;
-
- if ( nPixelSize == 1 ) nSrcBPL = ( nWidth + 7 ) >> 3;
- else if ( nPixelSize == 2 ) nSrcBPL = ( nWidth + 3 ) >> 2;
- else if ( nPixelSize == 4 ) nSrcBPL = ( nWidth + 1 ) >> 1;
- else nSrcBPL = nWidth;
- nDestBPL = ( nSrcBPL + 3 ) & 0xfffc;
- if (!nRowBytes || nRowBytes < nSrcBPL || nRowBytes > nDestBPL)
- return 0xffffffff;
-
- if (nRowBytes < 8 || nPackType == 1)
- {
- if (nHeight > pPict->remainingSize() / (sizeof(sal_uInt8) * nRowBytes))
- return 0xffffffff;
- }
- else
- {
- size_t nByteCountSize = nRowBytes > 250 ? sizeof(sal_uInt16) : sizeof(sal_uInt8);
- if (nHeight > pPict->remainingSize() / nByteCountSize)
- return 0xffffffff;
- }
-
- pBitmap.reset(new vcl::bitmap::RawBitmap( Size(nWidth, nHeight), 24 ));
-
- for (sal_uInt16 ny = 0; ny < nHeight; ++ny)
- {
- sal_uInt16 nx = 0;
- if ( nRowBytes < 8 || nPackType == 1 )
- {
- for (size_t i = 0; i < nRowBytes; ++i)
- {
- pPict->ReadUChar( nDat );
- if ( nx < nWidth )
- SetByte(nx, ny, *pBitmap, nPixelSize, nDat, nWidth, aPalette);
- }
- nDataSize += nRowBytes;
- }
- else
- {
- sal_uInt16 nByteCount(0);
- if ( nRowBytes > 250 )
- {
- pPict->ReadUInt16( nByteCount );
- nDataSize += 2 + static_cast<sal_uInt32>(nByteCount);
- }
- else
- {
- sal_uInt8 nByteCountAsByte(0);
- pPict->ReadUChar( nByteCountAsByte );
- nByteCount = static_cast<sal_uInt16>(nByteCountAsByte) & 0x00ff;
- nDataSize += 1 + nByteCount;
- }
-
- while (pPict->good() && nByteCount)
- {
- sal_uInt8 nFlagCounterByte(0);
- pPict->ReadUChar(nFlagCounterByte);
- if ( ( nFlagCounterByte & 0x80 ) == 0 )
- {
- nCount = static_cast<sal_uInt16>(nFlagCounterByte) + 1;
- for (size_t i = 0; i < nCount; ++i)
- {
- pPict->ReadUChar( nDat );
- if ( nx < nWidth )
- SetByte(nx, ny, *pBitmap, nPixelSize, nDat, nWidth, aPalette);
- }
- nByteCount -= 1 + nCount;
- }
- else
- {
- nCount = static_cast<sal_uInt16>( 1 - sal_Int16( static_cast<sal_uInt16>(nFlagCounterByte) | 0xff00 ) );
- pPict->ReadUChar( nDat );
- for (size_t i = 0; i < nCount; ++i)
- {
- if ( nx < nWidth )
- SetByte(nx, ny, *pBitmap, nPixelSize, nDat, nWidth, aPalette);
- }
- nByteCount -= 2;
- }
- }
- }
- }
- }
- else if ( nPixelSize == 16 )
- {
- sal_uInt8 nByteCountAsByte, nFlagCounterByte;
- sal_uInt16 nByteCount, nCount, nD;
- sal_uInt64 nSrcBitsPos;
-
- if (nWidth > nRowBytes / 2)
- return 0xffffffff;
-
- if (nRowBytes < 8 || nPackType == 1)
- {
- if (nHeight > pPict->remainingSize() / (sizeof(sal_uInt8) * nRowBytes))
- return 0xffffffff;
- }
- else
- {
- size_t nByteCountSize = nRowBytes > 250 ? sizeof(sal_uInt16) : sizeof(sal_uInt8);
- if (nHeight > pPict->remainingSize() / nByteCountSize)
- return 0xffffffff;
- }
-
- pBitmap.reset(new vcl::bitmap::RawBitmap( Size(nWidth, nHeight), 24 ));
-
- for (sal_uInt16 ny = 0; ny < nHeight; ++ny)
- {
- sal_uInt16 nx = 0;
- if ( nRowBytes < 8 || nPackType == 1 )
- {
- for (size_t i = 0; i < nWidth; ++i)
- {
- pPict->ReadUInt16( nD );
- nRed = static_cast<sal_uInt8>( nD >> 7 );
- nGreen = static_cast<sal_uInt8>( nD >> 2 );
- nBlue = static_cast<sal_uInt8>( nD << 3 );
- pBitmap->SetPixel(ny, nx++, Color(nRed, nGreen, nBlue));
- }
- nDataSize += static_cast<sal_uInt32>(nWidth) * 2;
- }
- else
- {
- nSrcBitsPos = pPict->Tell();
- if ( nRowBytes > 250 )
- {
- pPict->ReadUInt16( nByteCount );
- nByteCount += 2;
- }
- else
- {
- pPict->ReadUChar( nByteCountAsByte );
- nByteCount = static_cast<sal_uInt16>(nByteCountAsByte) & 0x00ff;
- nByteCount++;
- }
- while ( nx != nWidth )
- {
- pPict->ReadUChar( nFlagCounterByte );
- if ( (nFlagCounterByte & 0x80) == 0)
- {
- nCount=static_cast<sal_uInt16>(nFlagCounterByte)+1;
- if ( nCount + nx > nWidth)
- nCount = nWidth - nx;
- if (pPict->remainingSize() < sizeof(sal_uInt16) * nCount)
- return 0xffffffff;
- /* SJ: the RLE decoding seems not to be correct here,
- I don't want to change this until I have a bugdoc for
- this case. Have a look at 32bit, there I changed the
- encoding, so that it is used a straight forward array
- */
- for (size_t i = 0; i < nCount; ++i)
- {
- pPict->ReadUInt16( nD );
- nRed = static_cast<sal_uInt8>( nD >> 7 );
- nGreen = static_cast<sal_uInt8>( nD >> 2 );
- nBlue = static_cast<sal_uInt8>( nD << 3 );
- pBitmap->SetPixel(ny, nx++, Color(nRed, nGreen, nBlue));
- }
- }
- else
- {
- if (pPict->remainingSize() < sizeof(sal_uInt16))
- return 0xffffffff;
- nCount=(1-sal_Int16(static_cast<sal_uInt16>(nFlagCounterByte)|0xff00));
- if ( nCount + nx > nWidth )
- nCount = nWidth - nx;
- pPict->ReadUInt16( nD );
- nRed = static_cast<sal_uInt8>( nD >> 7 );
- nGreen = static_cast<sal_uInt8>( nD >> 2 );
- nBlue = static_cast<sal_uInt8>( nD << 3 );
- for (size_t i = 0; i < nCount; ++i)
- {
- pBitmap->SetPixel(ny, nx++, Color(nRed, nGreen, nBlue));
- }
- }
- }
- nDataSize += nByteCount;
- pPict->Seek(nSrcBitsPos+nByteCount);
- }
- }
- }
- else if ( nPixelSize == 32 )
- {
- sal_uInt16 nByteCount;
- size_t nCount;
- sal_uInt64 nSrcBitsPos;
- if ( nRowBytes != 4*nWidth )
- return 0xffffffff;
-
- if ( nRowBytes < 8 || nPackType == 1 )
- {
- const size_t nMaxPixels = pPict->remainingSize() / 4;
- const size_t nMaxRows = nMaxPixels / nWidth;
- if (nHeight > nMaxRows)
- return 0xffffffff;
- const size_t nMaxCols = nMaxPixels / nHeight;
- if (nWidth > nMaxCols)
- return 0xffffffff;
-
- pBitmap.reset(new vcl::bitmap::RawBitmap( Size(nWidth, nHeight), 24 ));
-
- for (sal_uInt16 ny = 0; ny < nHeight; ++ny)
- {
- for (sal_uInt16 nx = 0; nx < nWidth; ++nx)
- {
- sal_uInt8 nDummy;
- pPict->ReadUChar( nDummy ).ReadUChar( nRed ).ReadUChar( nGreen ).ReadUChar( nBlue );
- pBitmap->SetPixel(ny, nx, Color(nRed, nGreen, nBlue));
- }
- nDataSize += static_cast<sal_uInt32>(nWidth) * 4;
- }
- }
- else if ( nPackType == 2 )
- {
- const size_t nMaxPixels = pPict->remainingSize() / 3;
- const size_t nMaxRows = nMaxPixels / nWidth;
- if (nHeight > nMaxRows)
- return 0xffffffff;
- const size_t nMaxCols = nMaxPixels / nHeight;
- if (nWidth > nMaxCols)
- return 0xffffffff;
-
- pBitmap.reset(new vcl::bitmap::RawBitmap( Size(nWidth, nHeight), 24 ));
-
- for (sal_uInt16 ny = 0; ny < nHeight; ++ny)
- {
- for (sal_uInt16 nx = 0; nx < nWidth; ++nx)
- {
- pPict->ReadUChar( nRed ).ReadUChar( nGreen ).ReadUChar( nBlue );
- pBitmap->SetPixel(ny, nx, Color(nRed, nGreen, nBlue));
- }
- nDataSize += static_cast<sal_uInt32>(nWidth) * 3;
- }
- }
- else
- {
- sal_uInt8 nByteCountAsByte;
- sal_uInt8 nFlagCounterByte;
- if ( ( nCmpCount == 3 ) || ( nCmpCount == 4 ) )
- {
- size_t nByteCountSize = nRowBytes > 250 ? sizeof(sal_uInt16) : sizeof(sal_uInt8);
- if (nHeight > pPict->remainingSize() / nByteCountSize)
- return 0xffffffff;
-
- pBitmap.reset(new vcl::bitmap::RawBitmap( Size(nWidth, nHeight), 24 ));
-
- // cid#1458434 to sanitize Untrusted loop bound
- nWidth = pBitmap->Width();
-
- size_t nByteWidth = static_cast<size_t>(nWidth) * nCmpCount;
- std::vector<sal_uInt8> aScanline(nByteWidth);
- for (sal_uInt16 ny = 0; ny < nHeight; ++ny)
- {
- nSrcBitsPos = pPict->Tell();
- if ( nRowBytes > 250 )
- {
- pPict->ReadUInt16( nByteCount );
- nByteCount += 2;
- }
- else
- {
- pPict->ReadUChar( nByteCountAsByte );
- nByteCount = nByteCountAsByte;
- nByteCount++;
- }
- size_t i = 0;
- while (i < aScanline.size())
- {
- pPict->ReadUChar( nFlagCounterByte );
- if ( ( nFlagCounterByte & 0x80 ) == 0)
- {
- nCount = static_cast<sal_uInt16>(nFlagCounterByte) + 1;
- if ((i + nCount) > aScanline.size())
- nCount = aScanline.size() - i;
- if (pPict->remainingSize() < nCount)
- return 0xffffffff;
- while( nCount-- )
- {
- pPict->ReadUChar( nDat );
- aScanline[ i++ ] = nDat;
- }
- }
- else
- {
- if (pPict->remainingSize() < 1)
- return 0xffffffff;
- nCount = ( 1 - sal_Int16( static_cast<sal_uInt16>(nFlagCounterByte) | 0xff00 ) );
- if (( i + nCount) > aScanline.size())
- nCount = aScanline.size() - i;
- pPict->ReadUChar( nDat );
- while( nCount-- )
- aScanline[ i++ ] = nDat;
- }
- }
- sal_uInt8* pTmp = aScanline.data();
- if ( nCmpCount == 4 )
- pTmp += nWidth;
- for (sal_uInt16 nx = 0; nx < nWidth; pTmp++)
- pBitmap->SetPixel(ny, nx++, Color(*pTmp, pTmp[ nWidth ], pTmp[ 2 * nWidth ]));
- nDataSize += nByteCount;
- pPict->Seek( nSrcBitsPos + nByteCount );
- }
- }
- }
- }
- else
- return 0xffffffff;
- rBitmap = vcl::bitmap::CreateFromData(std::move(*pBitmap));
- return nDataSize;
-}
-
-void PictReader::ReadHeader()
-{
- short y1,x1,y2,x2;
-
- char sBuf[ 2 ];
- // previous code considers pPict->Tell() as the normal starting position,
- // can we have nStartPos != 0 ?
- sal_uInt64 nStartPos = pPict->Tell();
- // Standard:
- // a picture file begins by 512 bytes (reserved to the application) followed by the picture data
- // while clipboard, pictures stored in a document often contain only the picture data.
-
- // Special cases:
- // - some Pict v.1 use 0x00 0x11 0x01 ( instead of 0x11 0x01) to store the version op
- // (we consider here this as another standard for Pict. v.1 )
- // - some files seem to contain extra garbage data at the beginning
- // - some picture data seem to contain extra NOP opcode(0x00) between the bounding box and the version opcode
-
- // This code looks hard to find a picture header, ie. it looks at positions
- // - nStartPos+0, nStartPos+512 with potential extra NOP codes between bdbox and version (at most 9 extra NOP)
- // - 512..1024 with more strict bdbox checking and no extra NOP codes
-
- // Notes:
- // - if the header can begin at nStartPos+0 and at nStartPos+512, we try to choose the more
- // <<probable>> ( using the variable confidence)
- // - svtools/source/filter.vcl/filter/{filter.cxx,filter2.cxx} only check for standard Pict,
- // this may cause future problems
- int st;
- sal_uInt32 nOffset;
- int confidence[2] = { 0, 0};
- for ( st = 0; st < 3 + 513; st++ )
- {
- int actualConfid = 20; // the actual confidence
- pPict->ResetError();
- if (st < 2) nOffset = nStartPos+st*512;
- else if (st == 2) {
- // choose nStartPos+0 or nStartPos+512 even if there are a little dubious
- int actPos = -1, actConf=0;
- if (confidence[0] > 0) { actPos = 0; actConf = confidence[0]; }
- if (confidence[1] > 0 && confidence[1] >= actConf) actPos = 1;
- if (actPos < 0) continue;
- nOffset = nStartPos+actPos*512;
- }
- else {
- nOffset = 509+st; // illogical : more logical will be nStartPos+509+st or to consider that nStartPos=0
- // a small test to check if versionOp code exists after the bdbox ( with no extra NOP codes)
- pPict->Seek(nOffset+10);
- pPict->ReadBytes(sBuf, 2);
- if (!pPict->good()) break;
- if (sBuf[0] == 0x11 || (sBuf[0] == 0x00 && sBuf[1] == 0x11)) ; // maybe ok
- else continue;
- }
- pPict->Seek(nOffset);
-
- // 2 bytes to store size ( version 1 ) ignored
- pPict->SeekRel( 2 );
- pPict->ReadInt16( y1 ).ReadInt16( x1 ).ReadInt16( y2 ).ReadInt16( x2 ); // frame rectangle of the picture
- if (x1 > x2 || y1 > y2) continue; // bad bdbox
- if (x1 < -2048 || x2 > 2048 || y1 < -2048 || y2 > 2048 || // origin|dest is very small|large
- (x1 == x2 && y1 == y2) ) // 1 pixel pict is dubious
- actualConfid-=3;
- else if (x2 < x1+8 || y2 < y1+8) // a little dubious
- actualConfid-=1;
- if (st >= 3 && actualConfid != 20) continue;
- aBoundingRect=tools::Rectangle( x1,y1, x2, y2 );
-
- if (!pPict->good()) continue;
- // read version
- pPict->ReadBytes(sBuf, 2);
- // version 1 file
- if ( sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 ) {
- // pict v1 must be rare and we do only few tests
- if (st < 2) { confidence[st] = --actualConfid; continue; }
- IsVersion2 = false; return;
- }
- if (sBuf[0] != 0x00) continue; // unrecoverable error
- int numZero = 0;
- do
- {
- numZero++;
- pPict->SeekRel(-1);
- pPict->ReadBytes(sBuf, 2);
- }
- while ( sBuf[0] == 0x00 && numZero < 10);
- actualConfid -= (numZero-1); // extra nop are dubious
- if (!pPict->good()) continue;
- if (sBuf[0] != 0x11) continue; // not a version opcode
- // abnormal version 1 file
- if (sBuf[1] == 0x01 ) {
- // pict v1 must be rare and we do only few tests
- if (st < 2) { confidence[st] = --actualConfid; continue; }
- IsVersion2 = false; return;
- }
- if (sBuf[1] != 0x02 ) continue; // not a version 2 file
-
- IsVersion2=true;
- short nExtVer, nReserved;
- // 3 Bytes ignored : end of version arg 0x02FF (ie: 0xFF), HeaderOp : 0x0C00
- pPict->SeekRel( 3 );
- pPict->ReadInt16( nExtVer ).ReadInt16( nReserved );
- if (!pPict->good()) continue;
-
- if ( nExtVer == -2 ) // extended version 2 picture
- {
- sal_Int32 nHResFixed, nVResFixed;
- pPict->ReadInt32( nHResFixed ).ReadInt32( nVResFixed );
- pPict->ReadInt16( y1 ).ReadInt16( x1 ).ReadInt16( y2 ).ReadInt16( x2 ); // reading the optimal bounding rect
- if (x1 > x2 || y1 > y2) continue; // bad bdbox
- if (st < 2 && actualConfid != 20) { confidence[st] = actualConfid; continue; }
-
- double fHRes = nHResFixed;
- fHRes /= 65536;
- double fVRes = nVResFixed;
- fVRes /= 65536;
- aHRes /= fHRes;
- aVRes /= fVRes;
- aBoundingRect=tools::Rectangle( x1,y1, x2, y2 );
- pPict->SeekRel( 4 ); // 4 bytes reserved
- return;
- }
- else if (nExtVer == -1 ) { // basic version 2 picture
- if (st < 2 && actualConfid != 20) { confidence[st] = actualConfid; continue; }
- pPict->SeekRel( 16); // bdbox(4 fixed number)
- pPict->SeekRel(4); // 4 bytes reserved
- return;
- }
- }
- pPict->SetError(SVSTREAM_FILEFORMAT_ERROR);
-}
-
-#if OSL_DEBUG_LEVEL > 0
-static const char* operationName(sal_uInt16 nOpcode)
-{
- // add here whatever makes the debugging easier for you, otherwise you'll
- // see only the operation's opcode
- switch (nOpcode)
- {
- case 0x0001: return "Clip";
- case 0x0003: return "TxFont";
- case 0x0004: return "TxFace";
- case 0x0008: return "PnMode";
- case 0x0009: return "PnPat";
- case 0x000d: return "TxSize";
- case 0x001a: return "RGBFgCol";
- case 0x001d: return "HiliteColor";
- case 0x0020: return "Line";
- case 0x0022: return "ShortLine";
- case 0x0028: return "LongText";
- case 0x0029: return "DHText";
- case 0x002a: return "DVText";
- case 0x002c: return "fontName";
- case 0x002e: return "glyphState";
- case 0x0031: return "paintRect";
- case 0x0038: return "frameSameRect";
- case 0x0070: return "framePoly";
- case 0x0071: return "paintPoly";
- case 0x00a1: return "LongComment";
- default: return "?";
- }
-}
-#endif
-
-sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode)
-{
- sal_uInt16 nUSHORT;
- Point aPoint;
- sal_uInt64 nDataSize=0;
- PictDrawingMethod shapeDMethod = PictDrawingMethod::UNDEFINED;
- switch (nOpcode & 7) {
- case 0: shapeDMethod = PictDrawingMethod::FRAME; break;
- case 1: shapeDMethod = PictDrawingMethod::PAINT; break;
- case 2: shapeDMethod = PictDrawingMethod::ERASE; break;
- case 3: shapeDMethod = PictDrawingMethod::INVERT; break;
- case 4: shapeDMethod = PictDrawingMethod::FILL; break;
- default: break;
- }
-
-#if OSL_DEBUG_LEVEL > 0
- SAL_INFO("filter.pict", "Operation: 0x" << OUString::number(nOpcode, 16) << " [" << operationName(nOpcode) << "]");
-#endif
-
- switch(nOpcode) {
-
- case 0x0000: // NOP
- nDataSize=0;
- break;
-
- case 0x0001: { // Clip
- tools::Rectangle aRect;
- pPict->ReadUInt16( nUSHORT );
- nDataSize=nUSHORT;
- ReadRectangle(aRect);
- // checkme: do we really want to extend the rectangle here ?
- // I do that because the clipping is often used to clean a region,
- // before drawing some text and also to draw this text.
- // So using a too small region can lead to clip the end of the text ;
- // but this can be discussable...
- aRect.setWidth(aRect.getWidth()+1);
- aRect.setHeight(aRect.getHeight()+1);
- pVirDev->SetClipRegion( vcl::Region( aRect ) );
- break;
- }
- case 0x0002: // BkPat
- nDataSize = eActBackPattern.read(*pPict);
- eActMethod = PictDrawingMethod::UNDEFINED;
- break;
-
- case 0x0003: // TxFont
- pPict->ReadUInt16( nUSHORT );
- if (nUSHORT <= 1) aActFont.SetFamily(FAMILY_SWISS);
- else if (nUSHORT <= 12) aActFont.SetFamily(FAMILY_DECORATIVE);
- else if (nUSHORT <= 20) aActFont.SetFamily(FAMILY_ROMAN);
- else if (nUSHORT == 21) aActFont.SetFamily(FAMILY_SWISS);
- else if (nUSHORT == 22) aActFont.SetFamily(FAMILY_MODERN);
- else if (nUSHORT <= 1023) aActFont.SetFamily(FAMILY_SWISS);
- else aActFont.SetFamily(FAMILY_ROMAN);
- aActFont.SetCharSet(GetTextEncoding(nUSHORT));
- eActMethod = PictDrawingMethod::UNDEFINED;
- nDataSize=2;
- break;
-
- case 0x0004: { // TxFace
- char nFace;
- pPict->ReadChar( nFace );
- if ( (nFace & 0x01)!=0 ) aActFont.SetWeight(WEIGHT_BOLD);
- else aActFont.SetWeight(WEIGHT_NORMAL);
- if ( (nFace & 0x02)!=0 ) aActFont.SetItalic(ITALIC_NORMAL);
- else aActFont.SetItalic(ITALIC_NONE);
- if ( (nFace & 0x04)!=0 ) aActFont.SetUnderline(LINESTYLE_SINGLE);
- else aActFont.SetUnderline(LINESTYLE_NONE);
- if ( (nFace & 0x08)!=0 ) aActFont.SetOutline(true);
- else aActFont.SetOutline(false);
- if ( (nFace & 0x10)!=0 ) aActFont.SetShadow(true);
- else aActFont.SetShadow(false);
- eActMethod = PictDrawingMethod::UNDEFINED;
- nDataSize=1;
- break;
- }
- case 0x0005: // TxMode
- nDataSize=2;
- break;
-
- case 0x0006: // SpExtra
- nDataSize=4;
- break;
-
- case 0x0007: { // PnSize
- nActPenSize=ReadSize();
- eActMethod = PictDrawingMethod::UNDEFINED;
- nDataSize=4;
- break;
- }
- case 0x0008: // PnMode
- pPict->ReadUInt16( nUSHORT );
- // internal code for postscript command (Quickdraw Reference Drawing B-30,B-34)
- if (nUSHORT==23) eActROP = RasterOp::N1;
- else {
- switch (nUSHORT & 0x0007) {
- case 0: eActROP=RasterOp::OverPaint; break; // Copy
- case 1: eActROP=RasterOp::OverPaint; break; // Or
- case 2: eActROP=RasterOp::Xor; break; // Xor
- case 3: eActROP=RasterOp::OverPaint; break; // Bic
- case 4: eActROP=RasterOp::Invert; break; // notCopy
- case 5: eActROP=RasterOp::OverPaint; break; // notOr
- case 6: eActROP=RasterOp::Xor; break; // notXor
- case 7: eActROP=RasterOp::OverPaint; break; // notBic
- }
- }
- eActMethod = PictDrawingMethod::UNDEFINED;
- nDataSize=2;
- break;
-
- case 0x0009: // PnPat
- nDataSize=eActPenPattern.read(*pPict);
- eActMethod = PictDrawingMethod::UNDEFINED;
- break;
-
- case 0x000a: // FillPat
- nDataSize=eActFillPattern.read(*pPict);
- eActMethod = PictDrawingMethod::UNDEFINED;
- break;
-
- case 0x000b: // OvSize
- aActOvalSize=ReadSize();
- nDataSize=4;
- break;
-
- case 0x000c: // Origin
- nDataSize=4;
- break;
-
- case 0x000d: // TxSize
- {
- pPict->ReadUInt16( nUSHORT );
- aActFont.SetFontSize( Size( 0, static_cast<tools::Long>(nUSHORT) ) );
- eActMethod = PictDrawingMethod::UNDEFINED;
- nDataSize=2;
- }
- break;
-
- case 0x000e: // FgColor
- aActForeColor=ReadColor();
- eActMethod = PictDrawingMethod::UNDEFINED;
- nDataSize=4;
- break;
-
- case 0x000f: // BkColor
- aActBackColor=ReadColor();
- nDataSize=4;
- break;
-
- case 0x0010: // TxRatio
- nDataSize=8;
- break;
-
- case 0x0011: // VersionOp
- nDataSize=1;
- break;
-
- case 0x0012: // BkPixPat
- nDataSize=ReadPixPattern(eActBackPattern);
- eActMethod = PictDrawingMethod::UNDEFINED;
- break;
-
- case 0x0013: // PnPixPat
- nDataSize=ReadPixPattern(eActPenPattern);
- eActMethod = PictDrawingMethod::UNDEFINED;
- break;
-
- case 0x0014: // FillPixPat
- nDataSize=ReadPixPattern(eActFillPattern);
- eActMethod = PictDrawingMethod::UNDEFINED;
- break;
-
- case 0x0015: // PnLocHFrac
- nDataSize=2;
- break;
-
- case 0x0016: // ChExtra
- nDataSize=2;
- break;
-
- case 0x0017: // Reserved (0 Bytes)
- case 0x0018: // Reserved (0 Bytes)
- case 0x0019: // Reserved (0 Bytes)
- nDataSize=0;
- break;
-
- case 0x001a: // RGBFgCol
- aActForeColor=ReadRGBColor();
- eActMethod = PictDrawingMethod::UNDEFINED;
- nDataSize=6;
- break;
-
- case 0x001b: // RGBBkCol
- aActBackColor=ReadRGBColor();
- eActMethod = PictDrawingMethod::UNDEFINED;
- nDataSize=6;
- break;
-
- case 0x001c: // HiliteMode
- nDataSize=0;
- break;
-
- case 0x001d: // HiliteColor
- nDataSize=6;
- break;
-
- case 0x001e: // DefHilite
- nDataSize=0;
- break;
-
- case 0x001f: // OpColor
- nDataSize=6;
- break;
-
- case 0x0020: // Line
- aPoint=ReadPoint(); aPenPosition=ReadPoint();
- nDataSize=8;
-
- if (IsInvisible( PictDrawingMethod::FRAME )) break;
- DrawingMethod( PictDrawingMethod::FRAME );
- PictReaderShape::drawLine(pVirDev, aPoint,aPenPosition, nActPenSize);
- break;
-
- case 0x0021: // LineFrom
- aPoint=aPenPosition; aPenPosition=ReadPoint();
- nDataSize=4;
-
- if (IsInvisible( PictDrawingMethod::FRAME )) break;
- DrawingMethod( PictDrawingMethod::FRAME );
- PictReaderShape::drawLine(pVirDev, aPoint,aPenPosition, nActPenSize);
- break;
-
- case 0x0022: // ShortLine
- aPoint=ReadPoint();
- aPenPosition=ReadDeltaH(aPoint);
- aPenPosition=ReadDeltaV(aPenPosition);
- nDataSize=6;
-
- if ( IsInvisible(PictDrawingMethod::FRAME) ) break;
- DrawingMethod( PictDrawingMethod::FRAME );
- PictReaderShape::drawLine(pVirDev, aPoint,aPenPosition, nActPenSize);
- break;
-
- case 0x0023: // ShortLineFrom
- aPoint=aPenPosition;
- aPenPosition=ReadDeltaH(aPoint);
- aPenPosition=ReadDeltaV(aPenPosition);
- nDataSize=2;
-
- if (IsInvisible( PictDrawingMethod::FRAME )) break;
- DrawingMethod( PictDrawingMethod::FRAME );
- PictReaderShape::drawLine(pVirDev, aPoint,aPenPosition, nActPenSize);
- break;
-
- case 0x0024: // Reserved (n Bytes)
- case 0x0025: // Reserved (n Bytes)
- case 0x0026: // Reserved (n Bytes)
- case 0x0027: // Reserved (n Bytes)
- pPict->ReadUInt16( nUSHORT );
- nDataSize=2+nUSHORT;
- break;
-
- case 0x0028: // LongText
- aTextPosition=ReadPoint();
- nDataSize=4+ReadAndDrawText();
- break;
-
- case 0x0029: // DHText
- aTextPosition=ReadUnsignedDeltaH(aTextPosition);
- nDataSize=1+ReadAndDrawText();
- break;
-
- case 0x002a: // DVText
- aTextPosition=ReadUnsignedDeltaV(aTextPosition);
- nDataSize=1+ReadAndDrawText();
- break;
-
- case 0x002b: // DHDVText
- aTextPosition=ReadUnsignedDeltaH(aTextPosition);
- aTextPosition=ReadUnsignedDeltaV(aTextPosition);
- nDataSize=2+ReadAndDrawText();
- break;
-
- case 0x002c: { // fontName
- char sFName[ 256 ], nByteLen;
- sal_uInt16 nLen;
- pPict->ReadUInt16( nUSHORT ); nDataSize=nUSHORT+2;
- pPict->ReadUInt16( nUSHORT );
- if (nUSHORT <= 1) aActFont.SetFamily(FAMILY_SWISS);
- else if (nUSHORT <= 12) aActFont.SetFamily(FAMILY_DECORATIVE);
- else if (nUSHORT <= 20) aActFont.SetFamily(FAMILY_ROMAN);
- else if (nUSHORT == 21) aActFont.SetFamily(FAMILY_SWISS);
- else if (nUSHORT == 22) aActFont.SetFamily(FAMILY_MODERN);
- else if (nUSHORT <= 1023) aActFont.SetFamily(FAMILY_SWISS);
- else aActFont.SetFamily(FAMILY_ROMAN);
- aActFont.SetCharSet(GetTextEncoding(nUSHORT));
- pPict->ReadChar( nByteLen ); nLen=static_cast<sal_uInt16>(nByteLen)&0x00ff;
- pPict->ReadBytes(&sFName, nLen);
- sFName[ nLen ] = 0;
- OUString aString( sFName, strlen(sFName), osl_getThreadTextEncoding() );
- aActFont.SetFamilyName( aString );
- eActMethod = PictDrawingMethod::UNDEFINED;
- break;
- }
- case 0x002d: // lineJustify
- nDataSize=10;
- break;
-
- case 0x002e: // glyphState
- pPict->ReadUInt16( nUSHORT );
- nDataSize=2+nUSHORT;
- break;
-
- case 0x002f: // Reserved (n Bytes)
- pPict->ReadUInt16( nUSHORT );
- nDataSize=2+nUSHORT;
- break;
-
- case 0x0030: // frameRect
- case 0x0031: // paintRect
- case 0x0032: // eraseRect
- case 0x0033: // invertRect
- case 0x0034: // fillRect
- nDataSize=ReadAndDrawRect(shapeDMethod);
- break;
-
- case 0x0035: // Reserved (8 Bytes)
- case 0x0036: // Reserved (8 Bytes)
- case 0x0037: // Reserved (8 Bytes)
- nDataSize=8;
- break;
-
- case 0x0038: // frameSameRect
- case 0x0039: // paintSameRect
- case 0x003a: // eraseSameRect
- case 0x003b: // invertSameRect
- case 0x003c: // fillSameRect
- nDataSize=ReadAndDrawSameRect(shapeDMethod);
- break;
-
- case 0x003d: // Reserved (0 Bytes)
- case 0x003e: // Reserved (0 Bytes)
- case 0x003f: // Reserved (0 Bytes)
- nDataSize=0;
- break;
-
- case 0x0040: // frameRRect
- case 0x0041: // paintRRect
- case 0x0042: // eraseRRect
- case 0x0043: // invertRRect
- case 0x0044: // fillRRect
- nDataSize=ReadAndDrawRoundRect(shapeDMethod);
- break;
-
- case 0x0045: // Reserved (8 Bytes)
- case 0x0046: // Reserved (8 Bytes)
- case 0x0047: // Reserved (8 Bytes)
- nDataSize=8;
- break;
-
- case 0x0048: // frameSameRRect
- case 0x0049: // paintSameRRect
- case 0x004a: // eraseSameRRect
- case 0x004b: // invertSameRRect
- case 0x004c: // fillSameRRect
- nDataSize=ReadAndDrawSameRoundRect(shapeDMethod);
- break;
-
- case 0x004d: // Reserved (0 Bytes)
- case 0x004e: // Reserved (0 Bytes)
- case 0x004f: // Reserved (0 Bytes)
- nDataSize=0;
- break;
-
- case 0x0050: // frameOval
- case 0x0051: // paintOval
- case 0x0052: // eraseOval
- case 0x0053: // invertOval
- case 0x0054: // fillOval
- nDataSize=ReadAndDrawOval(shapeDMethod);
- break;
-
- case 0x0055: // Reserved (8 Bytes)
- case 0x0056: // Reserved (8 Bytes)
- case 0x0057: // Reserved (8 Bytes)
- nDataSize=8;
- break;
-
- case 0x0058: // frameSameOval
- case 0x0059: // paintSameOval
- case 0x005a: // eraseSameOval
- case 0x005b: // invertSameOval
- case 0x005c: // fillSameOval
- nDataSize=ReadAndDrawSameOval(shapeDMethod);
- break;
-
- case 0x005d: // Reserved (0 Bytes)
- case 0x005e: // Reserved (0 Bytes)
- case 0x005f: // Reserved (0 Bytes)
- nDataSize=0;
- break;
-
- case 0x0060: // frameArc
- case 0x0061: // paintArc
- case 0x0062: // eraseArc
- case 0x0063: // invertArc
- case 0x0064: // fillArc
- nDataSize=ReadAndDrawArc(shapeDMethod);
- break;
-
- case 0x0065: // Reserved (12 Bytes)
- case 0x0066: // Reserved (12 Bytes)
- case 0x0067: // Reserved (12 Bytes)
- nDataSize=12;
- break;
-
- case 0x0068: // frameSameArc
- case 0x0069: // paintSameArc
- case 0x006a: // eraseSameArc
- case 0x006b: // invertSameArc
- case 0x006c: // fillSameArc
- nDataSize=ReadAndDrawSameArc(shapeDMethod);
- break;
-
- case 0x006d: // Reserved (4 Bytes)
- case 0x006e: // Reserved (4 Bytes)
- case 0x006f: // Reserved (4 Bytes)
- nDataSize=4;
- break;
-
- case 0x0070: // framePoly
- case 0x0071: // paintPoly
- case 0x0072: // erasePoly
- case 0x0073: // invertPoly
- case 0x0074: // fillPoly
- nDataSize=ReadAndDrawPolygon(shapeDMethod);
- break;
-
- case 0x0075: // Reserved (Polygon-Size)
- case 0x0076: // Reserved (Polygon-Size)
- case 0x0077: // Reserved (Polygon-Size)
- pPict->ReadUInt16( nUSHORT ); nDataSize=nUSHORT;
- break;
-
- case 0x0078: // frameSamePoly
- case 0x0079: // paintSamePoly
- case 0x007a: // eraseSamePoly
- case 0x007b: // invertSamePoly
- case 0x007c: // fillSamePoly
- nDataSize=ReadAndDrawSamePolygon(shapeDMethod);
- break;
-
- case 0x007d: // Reserved (0 Bytes)
- case 0x007e: // Reserved (0 Bytes)
- case 0x007f: // Reserved (0 Bytes)
- nDataSize=0;
- break;
-
- case 0x0080: // frameRgn
- case 0x0081: // paintRgn
- case 0x0082: // eraseRgn
- case 0x0083: // invertRgn
- case 0x0084: // fillRgn
- nDataSize=ReadAndDrawRgn(shapeDMethod);
- break;
-
- case 0x0085: // Reserved (Region-Size)
- case 0x0086: // Reserved (Region-Size)
- case 0x0087: // Reserved (Region-Size)
- pPict->ReadUInt16( nUSHORT ); nDataSize=nUSHORT;
- break;
-
- case 0x0088: // frameSameRgn
- case 0x0089: // paintSameRgn
- case 0x008a: // eraseSameRgn
- case 0x008b: // invertSameRgn
- case 0x008c: // fillSameRgn
- nDataSize=ReadAndDrawSameRgn(shapeDMethod);
- break;
-
- case 0x008d: // Reserved (0 Bytes)
- case 0x008e: // Reserved (0 Bytes)
- case 0x008f: // Reserved (0 Bytes)
- nDataSize=0;
- break;
-
- case 0x0090: { // BitsRect
- BitmapEx aBmp;
- tools::Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false);
- DrawingMethod( PictDrawingMethod::PAINT );
- pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
- break;
- }
- case 0x0091: { // BitsRgn
- BitmapEx aBmp;
- tools::Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true);
- DrawingMethod( PictDrawingMethod::PAINT );
- pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
- break;
- }
- case 0x0092: // Reserved (n Bytes)
- case 0x0093: // Reserved (n Bytes)
- case 0x0094: // Reserved (n Bytes)
- case 0x0095: // Reserved (n Bytes)
- case 0x0096: // Reserved (n Bytes)
- case 0x0097: // Reserved (n Bytes)
- pPict->ReadUInt16( nUSHORT ); nDataSize=2+nUSHORT;
- break;
-
- case 0x0098: { // PackBitsRect
- BitmapEx aBmp;
- tools::Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false);
- DrawingMethod( PictDrawingMethod::PAINT );
- pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
- break;
- }
- case 0x0099: { // PackBitsRgn
- BitmapEx aBmp;
- tools::Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true);
- DrawingMethod( PictDrawingMethod::PAINT );
- pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
- break;
- }
- case 0x009a: { // DirectBitsRect
- BitmapEx aBmp;
- tools::Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, false);
- DrawingMethod( PictDrawingMethod::PAINT );
- pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
- break;
- }
- case 0x009b: { // DirectBitsRgn
- BitmapEx aBmp;
- tools::Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, true);
- DrawingMethod( PictDrawingMethod::PAINT );
- pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
- break;
- }
- case 0x009c: // Reserved (n Bytes)
- case 0x009d: // Reserved (n Bytes)
- case 0x009e: // Reserved (n Bytes)
- case 0x009f: // Reserved (n Bytes)
- pPict->ReadUInt16( nUSHORT ); nDataSize=2+nUSHORT;
- break;
-
- case 0x00a0: // ShortComment
- nDataSize=2;
- break;
-
- case 0x00a1: // LongComment
- pPict->SeekRel(2); pPict->ReadUInt16( nUSHORT ); nDataSize=4+nUSHORT;
- break;
-
- default: // 0x00a2 bis 0xffff (most times reserved)
- if (nOpcode<=0x00af) { pPict->ReadUInt16( nUSHORT ); nDataSize=2+nUSHORT; }
- else if (nOpcode<=0x00cf) { nDataSize=0; }
- else if (nOpcode<=0x00fe) { sal_uInt32 nTemp; pPict->ReadUInt32( nTemp ) ; nDataSize = nTemp; nDataSize+=4; }
- // Osnola: checkme: in the Quickdraw Ref examples ( for pict v2)
- // 0x00ff(EndOfPict) is also not followed by any data...
- else if (nOpcode==0x00ff) { nDataSize=IsVersion2 ? 2 : 0; } // OpEndPic
- else if (nOpcode<=0x01ff) { nDataSize=2; }
- else if (nOpcode<=0x0bfe) { nDataSize=4; }
- else if (nOpcode<=0x0bff) { nDataSize=22; }
- else if (nOpcode==0x0c00) { nDataSize=24; } // HeaderOp
- else if (nOpcode<=0x7eff) { nDataSize=24; }
- else if (nOpcode<=0x7fff) { nDataSize=254; }
- else if (nOpcode<=0x80ff) { nDataSize=0; }
- else { sal_uInt32 nTemp; pPict->ReadUInt32( nTemp ) ; nDataSize = nTemp; nDataSize+=4; }
- }
-
- if (nDataSize==0xffffffff) {
- pPict->SetError(SVSTREAM_FILEFORMAT_ERROR);
- return 0;
- }
- return nDataSize;
-}
-
-void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
-{
- try {
- sal_uInt16 nOpcode;
- sal_uInt8 nOneByteOpcode;
- sal_uInt64 nSize;
-
- pPict = &rStreamPict;
- nOrigPos = pPict->Tell();
- SvStreamEndian nOrigNumberFormat = pPict->GetEndian();
-
- aActForeColor = COL_BLACK;
- aActBackColor = COL_WHITE;
- nActPenSize = Size(1,1);
- eActROP = RasterOp::OverPaint;
- eActMethod = PictDrawingMethod::UNDEFINED;
- aActOvalSize = Size(1,1);
-
- aActFont.SetCharSet( GetTextEncoding());
- aActFont.SetFamily(FAMILY_SWISS);
- aActFont.SetFontSize(Size(0,12));
- aActFont.SetAlignment(ALIGN_BASELINE);
-
- aHRes = aVRes = Fraction( 1, 1 );
-
- pVirDev = VclPtr<VirtualDevice>::Create();
- pVirDev->EnableOutput(false);
- rGDIMetaFile.Record(pVirDev);
-
- pPict->SetEndian(SvStreamEndian::BIG);
-
- ReadHeader();
-
- aPenPosition=Point(-aBoundingRect.Left(),-aBoundingRect.Top());
- aTextPosition=aPenPosition;
-
- sal_uInt64 nPos=pPict->Tell();
-
- for (;;) {
-
- if (IsVersion2 )
- pPict->ReadUInt16( nOpcode );
- else
- {
- pPict->ReadUChar( nOneByteOpcode );
- nOpcode=static_cast<sal_uInt16>(nOneByteOpcode);
- }
-
- if (pPict->GetError())
- break;
-
- if (pPict->eof())
- {
- pPict->SetError(SVSTREAM_FILEFORMAT_ERROR);
- break;
- }
-
- if (nOpcode==0x00ff)
- break;
-
- nSize=ReadData(nOpcode);
-
- if ( IsVersion2 )
- {
- if ( nSize & 1 )
- nSize++;
-
- nPos+=2+nSize;
- }
- else
- nPos+=1+nSize;
-
- pPict->Seek(nPos);
- }
-
- pVirDev->SetClipRegion();
- rGDIMetaFile.Stop();
- pVirDev.disposeAndClear();
-
- rGDIMetaFile.SetPrefMapMode( MapMode( MapUnit::MapInch, Point(), aHRes, aVRes ) );
- rGDIMetaFile.SetPrefSize( aBoundingRect.GetSize() );
-
- pPict->SetEndian(nOrigNumberFormat);
-
- if (pPict->GetError()) pPict->Seek(nOrigPos);
- } catch (...)
- {
- rStreamPict.SetError(SVSTREAM_FILEFORMAT_ERROR);
- }
-}
-
-namespace pict {
-
-void ReadPictFile(SvStream &rStreamPict, GDIMetaFile& rGDIMetaFile)
-{
- PictReader aPictReader;
- aPictReader.ReadPict(rStreamPict, rGDIMetaFile);
-}
-
-}
-
-//================== GraphicImport - the exported function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-iptGraphicImport( SvStream& rIStm, Graphic & rGraphic, FilterConfigItem* )
-{
- GDIMetaFile aMTF;
- bool bRet = false;
-
- pict::ReadPictFile( rIStm, aMTF );
-
- if ( !rIStm.GetError() )
- {
- rGraphic = Graphic( aMTF );
- bRet = true;
- }
-
- return bRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ipict/ipict.hxx b/filter/source/graphicfilter/ipict/ipict.hxx
deleted file mode 100644
index 31ffdac0a81e..000000000000
--- a/filter/source/graphicfilter/ipict/ipict.hxx
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- 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/.
- */
-
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_HXX
-
-#include <sal/config.h>
-
-class GDIMetaFile;
-class SvStream;
-
-namespace pict
-{
-/// Function to access PictReader::ReadPict for unit testing.
-void ReadPictFile(SvStream& rStreamPict, GDIMetaFile& rGDIMetaFile);
-}
-
-#endif // INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx
deleted file mode 100644
index 79643123639c..000000000000
--- a/filter/source/graphicfilter/ipict/shape.cxx
+++ /dev/null
@@ -1,259 +0,0 @@
-/* -*- 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 .
- */
-
-/** Osnola:
-IMPORTANT NOTE: some Quickdraw lines/frames can not be "quickly" drawn exactly:
-for instance, when PenSize=(1,1), the line from (0,0) to (8,0)
-corresponds to the rectangle (0,0)(0,1)(9,1)(9,0), which can only be drawn
- by drawing a rectangle. Drawing a non horizontal/vertical will imply to draw
-a polygon, ...
-Similarly, drawing the frame of a rectangle (0,0)(0,1)(9,1)(9,0) when PenSize=(1,1),
-will imply to draw a rectangle (0.5,0.5)(0.5,8.5)(8.5,8.5)(8.5,0.5) with linewidth=1...
-
-Here, we choose:
-- for horizontal/vertical lines and line with length less than five to draw the real line,
-- in the other case, we keep the same shape (even if this means some "bad" coordinates)
-*/
-
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include "shape.hxx"
-
-namespace PictReaderShapePrivate {
- /** returns an inside rectangle knowing the penSize in order to obtain the ``correct'' position
- when we draw a frame in wide length*/
- static tools::Rectangle contractRectangle(bool drawFrame, tools::Rectangle const &rect, Size const &pSize) {
- if (!drawFrame) return rect;
- tools::Long penSize=(pSize.Width()+pSize.Height())/2;
- if (2*penSize > rect.Right()-rect.Left()) penSize = (rect.Right()-rect.Left()+1)/2;
- if (2*penSize > rect.Bottom()-rect.Top()) penSize = (rect.Bottom()-rect.Top()+1)/2;
- tools::Long const X[2] = { rect.Left()+penSize/2, rect.Right()-(penSize+1)/2 };
- tools::Long const Y[2] = { rect.Top()+penSize/2, rect.Bottom()-(penSize+1)/2 };
- return tools::Rectangle(Point(X[0],Y[0]), Point(X[1], Y[1]));
- }
-}
-
-namespace PictReaderShape {
- //--------- draws a horizontal/vertical/small line (by creating a "rectangle/polygon") ---------
- static bool drawLineHQ(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize) {
- tools::Long dir[2] = { dest.X()-orig.X(), dest.Y()-orig.Y() };
- bool vertic = dir[0] == 0;
- bool horiz = dir[1] == 0;
- if (!horiz && !vertic && dir[0]*dir[0]+dir[1]*dir[1] > 25) return false;
-
- using namespace basegfx;
- B2DPolygon poly;
- if (horiz || vertic) {
- tools::Long X[2]={ orig.X(), dest.X() }, Y[2] = { orig.Y(), dest.Y() };
- if (horiz) {
- if (X[0] < X[1]) X[1]+=pSize.Width();
- else X[0]+=pSize.Width();
- Y[1] += pSize.Height();
- }
- else {
- if (Y[0] < Y[1]) Y[1]+=pSize.Height();
- else Y[0]+=pSize.Height();
- X[1] += pSize.Width();
- }
- poly.append(B2DPoint(X[0], Y[0])); poly.append(B2DPoint(X[1], Y[0]));
- poly.append(B2DPoint(X[1], Y[1])); poly.append(B2DPoint(X[0], Y[1]));
- poly.append(B2DPoint(X[0], Y[0]));
- }
- else {
- tools::Long origPt[4][2] = { { orig.X(), orig.Y() }, { orig.X()+pSize.Width(), orig.Y() },
- { orig.X()+pSize.Width(), orig.Y()+pSize.Height() },
- { orig.X(), orig.Y()+pSize.Height() }};
- int origAvoid = dir[0] > 0 ? (dir[1] > 0 ? 2 : 1) : (dir[1] > 0 ? 3 : 0);
- tools::Long destPt[4][2] = { { dest.X(), dest.Y() }, { dest.X()+pSize.Width(), dest.Y() },
- { dest.X()+pSize.Width(), dest.Y()+pSize.Height() },
- { dest.X(), dest.Y()+pSize.Height() }};
- for (int w = origAvoid+1; w < origAvoid+4; w++) {
- int wh = w%4;
- poly.append(B2DPoint(origPt[wh][0], origPt[wh][1]));
- }
- for (int w = origAvoid+3; w < origAvoid+6; w++) {
- int wh = w%4;
- poly.append(B2DPoint(destPt[wh][0], destPt[wh][1]));
- }
- int wh = (origAvoid+1)%4;
- poly.append(B2DPoint(origPt[wh][0], origPt[wh][1]));
- }
-
- // HACK: here we use the line coloring when drawing the shape
- // must be changed if other parameter are changed to draw
- // a line/fill shape
- Color oldFColor = dev->GetFillColor(), oldLColor = dev->GetLineColor();
- dev->SetFillColor(oldLColor); dev->SetLineColor(COL_TRANSPARENT);
- dev->DrawPolygon(poly);
- dev->SetLineColor(oldLColor); dev->SetFillColor(oldFColor);
- return true;
- }
-
-
- //-------------------- draws a line --------------------
-
- void drawLine(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize) {
- if (drawLineHQ(dev,orig,dest,pSize)) return;
-
- tools::Long penSize=(pSize.Width()+pSize.Height())/2;
- tools::Long decal[2] = { pSize.Width()/2, pSize.Height()/2};
-
- using namespace basegfx;
- B2DPolygon poly;
- poly.append(B2DPoint(double(orig.X()+decal[0]), double(orig.Y()+decal[1])));
- poly.append(B2DPoint(double(dest.X()+decal[0]), double(dest.Y()+decal[1])));
- dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE);
- }
-
- //-------------------- draws a rectangle --------------------
- /* Note(checkme): contradictally with the QuickDraw's reference 3-23, it seems better to consider
- that the frame/content of a rectangle appears inside the given rectangle. Does a conversion
- appear between the pascal functions and the data stored in the file ? */
- void drawRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &pSize) {
- int penSize=(pSize.Width()+pSize.Height())/2;
- tools::Rectangle rect = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
- tools::Long const X[2] = { rect.Left(), rect.Right() };
- tools::Long const Y[2] = { rect.Top(), rect.Bottom() };
-
- using namespace basegfx;
- B2DPolygon poly;
- poly.append(B2DPoint(X[0], Y[0])); poly.append(B2DPoint(X[1], Y[0]));
- poly.append(B2DPoint(X[1], Y[1])); poly.append(B2DPoint(X[0], Y[1]));
- poly.append(B2DPoint(X[0], Y[0]));
-
- if (drawFrame)
- dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE);
- else
- dev->DrawPolygon(poly);
- }
-
- //-------------------- draws an ellipse --------------------
- void drawEllipse(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &pSize) {
- int penSize=(pSize.Width()+pSize.Height())/2;
- tools::Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
- using namespace basegfx;
- tools::Long const X[2] = { oval.Left(), oval.Right() };
- tools::Long const Y[2] = { oval.Top(), oval.Bottom() };
- B2DPoint center(0.5*(X[1]+X[0]), 0.5*(Y[1]+Y[0]));
- B2DPolygon poly = basegfx::utils::createPolygonFromEllipse(center, 0.5*(X[1]-X[0]), 0.5*(Y[1]-Y[0]));
- if (drawFrame)
- dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE);
- else
- dev->DrawPolygon(poly);
- }
-
- //-------------------- draws an arc/pie --------------------
- void drawArc(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize) {
- int penSize=(pSize.Width()+pSize.Height())/2;
- tools::Rectangle arc = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
- using namespace basegfx;
-
- // pict angle are CW with 0 at twelve o'clock (with Y-axis inverted)...
- double angl1 = angle1-M_PI_2;
- double angl2 = angle2-M_PI_2;
- tools::Long const X[2] = { arc.Left(), arc.Right() };
- tools::Long const Y[2] = { arc.Top(), arc.Bottom() };
- B2DPoint center(0.5*(X[1]+X[0]), 0.5*(Y[1]+Y[0]));
-
- // We must have angl1 between 0 and F_2PI
- while (angl1 < 0.0) { angl1 += F_2PI; angl2 += F_2PI; }
- while (angl1 >= F_2PI) { angl1 -= F_2PI; angl2 -= F_2PI; }
-
- // if this happen, we want a complete circle
- // so we set angl2 slightly less than angl1
- if (angl2 >= angl1+F_2PI) angl2 = angl1-0.001;
-
- // We must have angl2 between 0 and F_2PI
- while (angl2 < 0.0) angl2 += F_2PI;
- while (angl2 >= F_2PI) angl2 -= F_2PI;
-
- B2DPolygon poly = basegfx::utils::createPolygonFromEllipseSegment(center, 0.5*(X[1]-X[0]), 0.5*(Y[1]-Y[0]), angl1, angl2);
- if (drawFrame)
- dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE);
- else {
- // adds circle's center
- poly.append(center);
- dev->DrawPolygon(poly);
- }
- }
- //-------------------- draws a rectangle with round corner --------------------
- void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &ovalSize, Size const &pSize) {
- int penSize=(pSize.Width()+pSize.Height())/2;
- tools::Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
- int ovalW=ovalSize.Width(), ovalH=ovalSize.Height();
- using namespace basegfx;
- tools::Long const X[2] = { oval.Left(), oval.Right() };
- tools::Long const Y[2] = { oval.Top(), oval.Bottom() };
- tools::Long width = X[1] - X[0];
- tools::Long height = Y[1] - Y[0];
- if (ovalW > width) ovalW = static_cast< int >( width );
- if (ovalH > height) ovalH = static_cast< int >( height );
-
- B2DRectangle rect(B2DPoint(X[0],Y[0]), B2DPoint(X[1],Y[1]));
- B2DPolygon poly = basegfx::utils::createPolygonFromRect(rect, (width != 0.0) ? ovalW/width : 0.0, (height != 0.0) ? ovalH/height : 0.0);
-
- if (drawFrame)
- dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE);
- else
- dev->DrawPolygon(poly);
- }
-
- //-------------------- draws a polygon --------------------
-void drawPolygon(VirtualDevice *dev, bool drawFrame, tools::Polygon const &orig, Size const &pSize) {
- int penSize=(pSize.Width()+pSize.Height())/2;
- tools::Long decalTL[2] = {0, 0}, decalBR[2] = { pSize.Width(), pSize.Height()};
- if (drawFrame) {
- decalTL[0] += penSize/2; decalTL[1] += penSize/2;
- decalBR[0] -= (penSize+1)/2; decalBR[1] -= (penSize+1)/2;
- }
- // Quickdraw Drawing Reference 3-82: the pen size is only used for frame
- else decalBR[0] = decalBR[1] = 0;
-
-
- int numPt = orig.GetSize();
- if (numPt <= 1) return;
-
- // we compute a barycenter of the point to define the extended direction of each point
- double bary[2] = { 0.0, 0.0 };
- for (int i = 0; i < numPt; i++) {
- Point const &pt = orig.GetPoint(i);
- bary[0] += double(pt.X()); bary[1] += double(pt.Y());
- }
- bary[0]/=double(numPt); bary[1]/=double(numPt);
-
- using namespace basegfx;
- B2DPolygon poly;
- poly.reserve(numPt);
- // Note: a polygon can be open, so we must not close it when we draw the frame
- for (int i = 0; i < numPt; i++) {
- Point const &pt = orig.GetPoint(i);
- double x = (double(pt.X()) < bary[0]) ? pt.X()+decalTL[0] : pt.X()+decalBR[0];
- double y = (double(pt.Y()) < bary[1]) ? pt.Y()+decalTL[1] : pt.Y()+decalBR[1];
- poly.append(B2DPoint(x, y));
- }
- if (drawFrame)
- dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE);
- else
- dev->DrawPolygon(poly);
- }
-
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ipict/shape.hxx b/filter/source/graphicfilter/ipict/shape.hxx
deleted file mode 100644
index bccd39e63c26..000000000000
--- a/filter/source/graphicfilter/ipict/shape.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- 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 INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_SHAPE_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_SHAPE_HXX
-
-#include <vcl/virdev.hxx>
-
-namespace PictReaderShape {
- /** draws a line from orig to dest knowing penSize
-
- Attention: in order to draw horizontal/vertical/small lines, this function can instead draw a rectangle or
- a polygon. In this case, we retrieve the line information from VirtualDev ( GetLineColor )
- and we use them as fill information ( SetFillColor ). We restore after the VirtualDev state.
-
- This implies also that this function must be modified if we use real pattern to draw these primitives.
- */
- void drawLine(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize);
-
- /** draws a rectangle knowing penSize */
- void drawRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &rect, Size const &pSize);
-
- /** draws a polygon knowing penSize */
-void drawPolygon(VirtualDevice *dev, bool drawFrame, tools::Polygon const &rect, Size const &pSize);
-
- /** draws an ellipse knowing penSize */
- void drawEllipse(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &pSize);
-
- /** draws a rounded rectangle knowing penSize
- \note ovalSize is two time the size of the corner
- */
- void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &ovalS, Size const &pSize);
-
- /** draws an arc in a b2dpolygon knowing penSize
- \note - it supposes that angl1 < angl2
- */
- void drawArc(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize);
-}
-
-#endif // INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_SHAPE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
deleted file mode 100644
index 91599bf3352b..000000000000
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ /dev/null
@@ -1,772 +0,0 @@
-/* -*- 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 <vcl/graph.hxx>
-#include <vcl/BitmapTools.hxx>
-#include <vcl/outdev.hxx>
-#include <sal/log.hxx>
-#include <tools/fract.hxx>
-#include <tools/helpers.hxx>
-#include <tools/stream.hxx>
-#include <memory>
-
-class FilterConfigItem;
-
-//============================ PSDReader ==================================
-
-#define PSD_BITMAP 0
-#define PSD_GRAYSCALE 1
-#define PSD_INDEXED 2
-#define PSD_RGB 3
-#define PSD_CMYK 4
-#define PSD_MULTICHANNEL 7
-#define PSD_DUOTONE 8
-#define PSD_LAB 9
-
-namespace {
-
-struct PSDFileHeader
-{
- sal_uInt32 nSignature;
- sal_uInt16 nVersion;
- sal_uInt32 nPad1;
- sal_uInt16 nPad2;
- sal_uInt16 nChannels;
- sal_uInt32 nRows;
- sal_uInt32 nColumns;
- sal_uInt16 nDepth;
- sal_uInt16 nMode;
-};
-
-class PSDReader {
-
-private:
-
- SvStream& m_rPSD; // the PSD file to be read in
- std::unique_ptr<PSDFileHeader>
- mpFileHeader;
-
- sal_uInt32 mnXResFixed;
- sal_uInt32 mnYResFixed;
-
- bool mbStatus;
- bool mbTransparent;
-
- std::unique_ptr<vcl::bitmap::RawBitmap> mpBitmap;
- std::vector<Color> mvPalette;
- sal_uInt16 mnDestBitDepth;
- bool mbCompression; // RLE decoding
- std::unique_ptr<sal_uInt8[]>
- mpPalette;
-
- bool ImplReadBody();
- bool ImplReadHeader();
-
-public:
- explicit PSDReader(SvStream &rStream);
- bool ReadPSD(Graphic & rGraphic);
-};
-
-}
-
-//=================== Methods of PSDReader ==============================
-
-PSDReader::PSDReader(SvStream &rStream)
- : m_rPSD(rStream)
- , mnXResFixed(0)
- , mnYResFixed(0)
- , mbStatus(true)
- , mbTransparent(false)
- , mnDestBitDepth(0)
- , mbCompression(false)
-{
-}
-
-bool PSDReader::ReadPSD(Graphic & rGraphic )
-{
- if (m_rPSD.GetError())
- return false;
-
- m_rPSD.SetEndian( SvStreamEndian::BIG );
-
- // read header:
-
- if ( !ImplReadHeader() )
- return false;
-
- if (mbStatus)
- {
- sal_uInt32 nResult;
- if (o3tl::checked_multiply(mpFileHeader->nColumns, mpFileHeader->nRows, nResult) || nResult > SAL_MAX_INT32/2/3)
- return false;
- }
-
- Size aBitmapSize( mpFileHeader->nColumns, mpFileHeader->nRows );
- mpBitmap.reset( new vcl::bitmap::RawBitmap( aBitmapSize, 24 ) );
- if ( mpPalette && mbStatus )
- {
- mvPalette.resize( 256 );
- for ( sal_uInt16 i = 0; i < 256; i++ )
- {
- mvPalette[i] = Color( mpPalette[ i ], mpPalette[ i + 256 ], mpPalette[ i + 512 ] );
- }
- }
-
- if ((mnDestBitDepth == 1 || mnDestBitDepth == 8 || mbTransparent) && mvPalette.empty())
- {
- mbStatus = false;
- return mbStatus;
- }
-
- // read bitmap data
- if ( mbStatus && ImplReadBody() )
- {
- rGraphic = Graphic( vcl::bitmap::CreateFromData( std::move(*mpBitmap) ) );
-
- if ( mnXResFixed && mnYResFixed )
- {
- Fraction aFractX( 1, mnXResFixed >> 16 );
- Fraction aFractY( 1, mnYResFixed >> 16 );
- MapMode aMapMode( MapUnit::MapInch, Point(), aFractX, aFractY );
- Size aPrefSize = OutputDevice::LogicToLogic(aBitmapSize, aMapMode, MapMode(MapUnit::Map100thMM));
- rGraphic.SetPrefSize( aPrefSize );
- rGraphic.SetPrefMapMode( MapMode( MapUnit::Map100thMM ) );
- }
- }
- else
- mbStatus = false;
- return mbStatus;
-}
-
-
-bool PSDReader::ImplReadHeader()
-{
- mpFileHeader.reset( new PSDFileHeader );
-
- m_rPSD.ReadUInt32( mpFileHeader->nSignature ).ReadUInt16( mpFileHeader->nVersion ).ReadUInt32( mpFileHeader->nPad1 ). ReadUInt16( mpFileHeader->nPad2 ).ReadUInt16( mpFileHeader->nChannels ).ReadUInt32( mpFileHeader->nRows ). ReadUInt32( mpFileHeader->nColumns ).ReadUInt16( mpFileHeader->nDepth ).ReadUInt16( mpFileHeader->nMode );
-
- if ( ( mpFileHeader->nSignature != 0x38425053 ) || ( mpFileHeader->nVersion != 1 ) )
- return false;
-
- if ( mpFileHeader->nRows == 0 || mpFileHeader->nColumns == 0 )
- return false;
-
- if ( ( mpFileHeader->nRows > 30000 ) || ( mpFileHeader->nColumns > 30000 ) )
- return false;
-
- sal_uInt16 nDepth = mpFileHeader->nDepth;
- if (!( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) ) )
- return false;
-
- mnDestBitDepth = ( nDepth == 16 ) ? 8 : nDepth;
-
- sal_uInt32 nColorLength(0);
- m_rPSD.ReadUInt32( nColorLength );
- if ( mpFileHeader->nMode == PSD_CMYK )
- {
- switch ( mpFileHeader->nChannels )
- {
- case 5 :
- mbTransparent = true;
- [[fallthrough]];
- case 4 :
- mnDestBitDepth = 24;
- break;
- default :
- return false;
- }
- }
- else switch ( mpFileHeader->nChannels )
- {
- case 2 :
- mbTransparent = true;
- break;
- case 1 :
- break;
- case 4 :
- mbTransparent = true;
- [[fallthrough]];
- case 3 :
- mnDestBitDepth = 24;
- break;
- default:
- return false;
- }
-
- switch ( mpFileHeader->nMode )
- {
- case PSD_BITMAP :
- {
- if ( nColorLength || ( nDepth != 1 ) )
- return false;
- }
- break;
-
- case PSD_INDEXED :
- {
- if ( nColorLength != 768 ) // we need the color map
- return false;
- mpPalette.reset( new sal_uInt8[ 768 ] );
- m_rPSD.ReadBytes(mpPalette.get(), 768);
- }
- break;
-
- case PSD_DUOTONE : // we'll handle the duotone color like a normal grayscale picture
- m_rPSD.SeekRel( nColorLength );
- nColorLength = 0;
- [[fallthrough]];
- case PSD_GRAYSCALE :
- {
- if ( nColorLength )
- return false;
- mpPalette.reset( new sal_uInt8[ 768 ] );
- for ( sal_uInt16 i = 0; i < 256; i++ )
- {
- mpPalette[ i ] = mpPalette[ i + 256 ] = mpPalette[ i + 512 ] = static_cast<sal_uInt8>(i);
- }
- }
- break;
-
- case PSD_CMYK :
- case PSD_RGB :
- case PSD_MULTICHANNEL :
- case PSD_LAB :
- {
- if ( nColorLength ) // color table is not supported by the other graphic modes
- return false;
- }
- break;
-
- default:
- return false;
- }
- sal_uInt32 nResourceLength(0);
- m_rPSD.ReadUInt32(nResourceLength);
- if (nResourceLength > m_rPSD.remainingSize())
- return false;
- sal_uInt32 nLayerPos = m_rPSD.Tell() + nResourceLength;
-
- // this is a loop over the resource entries to get the resolution info
- while( m_rPSD.Tell() < nLayerPos )
- {
- sal_uInt32 nType(0);
- sal_uInt16 nUniqueID(0);
- sal_uInt8 n8(0);
- m_rPSD.ReadUInt32(nType).ReadUInt16(nUniqueID).ReadUChar(n8);
- if (nType != 0x3842494d)
- break;
- sal_uInt32 nPStringLen = n8;
- if ( ! ( nPStringLen & 1 ) )
- nPStringLen++;
- m_rPSD.SeekRel( nPStringLen ); // skipping the pstring
- sal_uInt32 nResEntryLen(0);
- m_rPSD.ReadUInt32( nResEntryLen );
- if ( nResEntryLen & 1 )
- nResEntryLen++; // the resource entries are padded
- sal_uInt32 nCurrentPos = m_rPSD.Tell();
- if (nCurrentPos > nLayerPos || nResEntryLen > (nLayerPos - nCurrentPos)) // check if size
- break; // is possible
- switch( nUniqueID )
- {
- case 0x3ed : // UID for the resolution info
- {
- sal_Int16 nUnit;
-
- m_rPSD.ReadUInt32( mnXResFixed ).ReadInt16( nUnit ).ReadInt16( nUnit )
- .ReadUInt32( mnYResFixed ).ReadInt16( nUnit ).ReadInt16( nUnit );
- }
- break;
- }
- m_rPSD.Seek( nCurrentPos + nResEntryLen ); // set the stream to the next
- } // resource entry
- m_rPSD.Seek( nLayerPos );
- sal_uInt32 nLayerMaskLength(0);
- m_rPSD.ReadUInt32( nLayerMaskLength );
- m_rPSD.SeekRel( nLayerMaskLength );
-
- sal_uInt16 nCompression(0);
- m_rPSD.ReadUInt16(nCompression);
- if ( nCompression == 0 )
- {
- mbCompression = false;
- }
- else if ( nCompression == 1 )
- {
- m_rPSD.SeekRel( ( mpFileHeader->nRows * mpFileHeader->nChannels ) << 1 );
- mbCompression = true;
- }
- else
- return false;
-
- return true;
-}
-
-namespace
-{
- const Color& SanitizePaletteIndex(std::vector<Color> const & rvPalette, sal_uInt8 nIndex)
- {
- if (nIndex >= rvPalette.size())
- {
- auto nSanitizedIndex = nIndex % rvPalette.size();
- SAL_WARN_IF(nIndex != nSanitizedIndex, "filter.psd", "invalid colormap index: "
- << static_cast<unsigned int>(nIndex) << ", colormap len is: "
- << rvPalette.size());
- nIndex = nSanitizedIndex;
- }
- return rvPalette[nIndex];
- }
-}
-
-bool PSDReader::ImplReadBody()
-{
- sal_uInt32 nX, nY;
- signed char nRunCount = 0;
- sal_uInt8 nDat = 0, nDummy, nRed, nGreen, nBlue;
- BitmapColor aBitmapColor;
- nX = nY = 0;
-
- switch ( mnDestBitDepth )
- {
- case 1 :
- {
- signed char nBitCount = -1;
- while (nY < mpFileHeader->nRows && m_rPSD.good())
- {
- if ( nBitCount == -1 )
- {
- if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- {
- char nTmp(0);
- m_rPSD.ReadChar(nTmp);
- nRunCount = nTmp;
- }
- }
- if ( nRunCount & 0x80 ) // a run length packet
- {
- const sal_uInt16 nCount = -nRunCount + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- if ( nBitCount == -1 ) // bits left in nDat?
- {
- m_rPSD.ReadUChar( nDat );
- nDat ^= 0xff;
- nBitCount = 7;
- }
- mpBitmap->SetPixel(nY, nX, SanitizePaletteIndex(mvPalette, nDat >> nBitCount--));
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- nBitCount = -1;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- else // a raw packet
- {
- const sal_uInt16 nCount = (nRunCount & 0x7f) + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- if ( nBitCount == -1 ) // bits left in nDat ?
- {
- m_rPSD.ReadUChar( nDat );
- nDat ^= 0xff;
- nBitCount = 7;
- }
- mpBitmap->SetPixel(nY, nX, SanitizePaletteIndex(mvPalette, nDat >> nBitCount--));
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- nBitCount = -1;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- }
- }
- break;
-
- case 8 :
- {
- while (nY < mpFileHeader->nRows && m_rPSD.good())
- {
- if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- {
- char nTmp(0);
- m_rPSD.ReadChar(nTmp);
- nRunCount = nTmp;
- }
-
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rPSD.ReadUChar( nDat );
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- const sal_uInt16 nCount = -nRunCount + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- mpBitmap->SetPixel(nY, nX, SanitizePaletteIndex(mvPalette, nDat));
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- else // a raw packet
- {
- const sal_uInt16 nCount = (nRunCount & 0x7f) + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- m_rPSD.ReadUChar( nDat );
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- mpBitmap->SetPixel(nY, nX, SanitizePaletteIndex(mvPalette, nDat));
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- }
- }
- break;
-
- case 24 :
- {
-
- // the psd format is in plain order (RRRR GGGG BBBB) so we have to set each pixel three times
- // maybe the format is CCCC MMMM YYYY KKKK
-
- while (nY < mpFileHeader->nRows && m_rPSD.good())
- {
- if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- {
- char nTmp(0);
- m_rPSD.ReadChar(nTmp);
- nRunCount = nTmp;
- }
-
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rPSD.ReadUChar( nRed );
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- const sal_uInt16 nCount = -nRunCount + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- mpBitmap->SetPixel( nY, nX, Color( nRed, sal_uInt8(0), sal_uInt8(0) ) );
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- else // a raw packet
- {
- const sal_uInt16 nCount = (nRunCount & 0x7f) + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- m_rPSD.ReadUChar( nRed );
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- mpBitmap->SetPixel( nY, nX, Color( nRed, sal_uInt8(0), sal_uInt8(0) ) );
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- }
- nY = 0;
- while (nY < mpFileHeader->nRows && m_rPSD.good())
- {
- if ( mbCompression )
- {
- char nTmp(0);
- m_rPSD.ReadChar(nTmp);
- nRunCount = nTmp;
- }
-
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rPSD.ReadUChar( nGreen );
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- const sal_uInt16 nCount = -nRunCount + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- aBitmapColor = mpBitmap->GetPixel( nY, nX );
- mpBitmap->SetPixel( nY, nX, Color( aBitmapColor.GetRed(), nGreen, aBitmapColor.GetBlue() ) );
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- else // a raw packet
- {
- const sal_uInt16 nCount = (nRunCount & 0x7f) + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- m_rPSD.ReadUChar( nGreen );
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- aBitmapColor = mpBitmap->GetPixel( nY, nX );
- mpBitmap->SetPixel( nY, nX, Color( aBitmapColor.GetRed(), nGreen, aBitmapColor.GetBlue() ) );
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- }
- nY = 0;
- while (nY < mpFileHeader->nRows && m_rPSD.good())
- {
- if ( mbCompression )
- {
- char nTmp(0);
- m_rPSD.ReadChar(nTmp);
- nRunCount = nTmp;
- }
-
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rPSD.ReadUChar( nBlue );
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- const sal_uInt16 nCount = -nRunCount + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- aBitmapColor = mpBitmap->GetPixel( nY, nX );
- mpBitmap->SetPixel( nY, nX, Color( aBitmapColor.GetRed(), aBitmapColor.GetGreen(), nBlue ) );
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- else // a raw packet
- {
- const sal_uInt16 nCount = (nRunCount & 0x7f) + 1;
- for (sal_uInt16 i = 0; i < nCount && m_rPSD.good(); ++i)
- {
- m_rPSD.ReadUChar( nBlue );
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- aBitmapColor = mpBitmap->GetPixel( nY, nX );
- mpBitmap->SetPixel( nY, nX, Color( aBitmapColor.GetRed(), aBitmapColor.GetGreen(), nBlue ) );
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- }
- if (mpFileHeader->nMode == PSD_CMYK && m_rPSD.good())
- {
- sal_uInt32 nBlack, nBlackMax = 0;
- std::unique_ptr<sal_uInt8[]> pBlack(new sal_uInt8[ mpFileHeader->nRows * mpFileHeader->nColumns ]);
- nY = 0;
- while (nY < mpFileHeader->nRows && m_rPSD.good())
- {
- if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- {
- char nTmp(0);
- m_rPSD.ReadChar(nTmp);
- nRunCount = nTmp;
- }
-
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rPSD.ReadUChar( nDat );
-
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
-
- for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
- {
- nBlack = mpBitmap->GetPixel( nY, nX ).GetRed() + nDat;
- if ( nBlack > nBlackMax )
- nBlackMax = nBlack;
- nBlack = mpBitmap->GetPixel( nY, nX ).GetGreen() + nDat;
- if ( nBlack > nBlackMax )
- nBlackMax = nBlack;
- nBlack = mpBitmap->GetPixel( nY, nX ).GetBlue() + nDat;
- if ( nBlack > nBlackMax )
- nBlackMax = nBlack;
- pBlack[ nX + nY * mpFileHeader->nColumns ] = nDat ^ 0xff;
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- else // a raw packet
- {
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- m_rPSD.ReadUChar( nDat );
-
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- nBlack = mpBitmap->GetPixel( nY, nX ).GetRed() + nDat;
- if ( nBlack > nBlackMax )
- nBlackMax = nBlack;
- nBlack = mpBitmap->GetPixel( nY, nX ).GetGreen() + nDat;
- if ( nBlack > nBlackMax )
- nBlackMax = nBlack;
- nBlack = mpBitmap->GetPixel( nY, nX ).GetBlue() + nDat;
- if ( nBlack > nBlackMax )
- nBlackMax = nBlack;
- pBlack[ nX + nY * mpFileHeader->nColumns ] = nDat ^ 0xff;
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- }
-
- for ( nY = 0; nY < mpFileHeader->nRows; nY++ )
- {
- for ( nX = 0; nX < mpFileHeader->nColumns; nX++ )
- {
- sal_Int32 nDAT = pBlack[ nX + nY * mpFileHeader->nColumns ] * ( nBlackMax - 256 ) / 0x1ff;
-
- aBitmapColor = mpBitmap->GetPixel( nY, nX );
- sal_uInt8 cR = static_cast<sal_uInt8>(MinMax( aBitmapColor.GetRed() - nDAT, 0, 255L ));
- sal_uInt8 cG = static_cast<sal_uInt8>(MinMax( aBitmapColor.GetGreen() - nDAT, 0, 255L ));
- sal_uInt8 cB = static_cast<sal_uInt8>(MinMax( aBitmapColor.GetBlue() - nDAT, 0, 255L ));
- mpBitmap->SetPixel( nY, nX, Color( cR, cG, cB ) );
- }
- }
- }
- }
- break;
- }
-
- if (mbTransparent && m_rPSD.good())
- {
- // the psd is 24 or 8 bit grafix + alphachannel
-
- nY = nX = 0;
- while ( nY < mpFileHeader->nRows )
- {
- if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- {
- char nTmp(0);
- m_rPSD.ReadChar(nTmp);
- nRunCount = nTmp;
- }
-
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rPSD.ReadUChar( nDat );
- if ( nDat )
- nDat = 0;
- else
- nDat = 1;
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
- {
- mpBitmap->SetPixel(nY, nX, SanitizePaletteIndex(mvPalette, nDat));
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- else // a raw packet
- {
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- m_rPSD.ReadUChar( nDat );
- if ( nDat )
- nDat = 0;
- else
- nDat = 1;
- if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD.ReadUChar( nDummy );
- mpBitmap->SetPixel(nY, nX, SanitizePaletteIndex(mvPalette, nDat));
- if ( ++nX == mpFileHeader->nColumns )
- {
- nX = 0;
- nY++;
- if ( nY == mpFileHeader->nRows )
- break;
- }
- }
- }
- }
- }
-
- return m_rPSD.good();
-}
-
-//================== GraphicImport - the exported function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-ipdGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
-{
- PSDReader aPSDReader(rStream);
-
- return aPSDReader.ReadPSD(rGraphic);
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
deleted file mode 100644
index 5205d6253e22..000000000000
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ /dev/null
@@ -1,414 +0,0 @@
-/* -*- 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 <vcl/graph.hxx>
-#include <vcl/BitmapTools.hxx>
-#include <sal/log.hxx>
-#include <tools/stream.hxx>
-
-class FilterConfigItem;
-
-#define RAS_TYPE_OLD 0x00000000 // supported formats by this filter
-#define RAS_TYPE_STANDARD 0x00000001
-#define RAS_TYPE_BYTE_ENCODED 0x00000002
-#define RAS_TYPE_RGB_FORMAT 0x00000003
-
-#define RAS_COLOR_NO_MAP 0x00000000
-#define RAS_COLOR_RGB_MAP 0x00000001
-#define RAS_COLOR_RAW_MAP 0x00000002
-
-#define SUNRASTER_MAGICNUMBER 0x59a66a95
-
-//============================ RASReader ==================================
-
-namespace {
-
-class RASReader {
-
-private:
-
- SvStream& m_rRAS; // the RAS file to be read in
-
- bool mbStatus;
- sal_Int32 mnWidth, mnHeight; // image dimensions in pixels
- sal_uInt16 mnDstBitsPerPix;
- sal_uInt16 mnDstColors;
- sal_Int32 mnDepth, mnImageDatSize, mnType;
- sal_Int32 mnColorMapType, mnColorMapSize;
- sal_uInt8 mnRepCount, mnRepVal; // RLE Decoding
-
- bool ImplReadBody(vcl::bitmap::RawBitmap&, std::vector<Color> const & rvPalette);
- bool ImplReadHeader();
- sal_uInt8 ImplGetByte();
-
-public:
- explicit RASReader(SvStream &rRAS);
- bool ReadRAS(Graphic & rGraphic);
-};
-
-}
-
-//=================== Methods of RASReader ==============================
-
-RASReader::RASReader(SvStream &rRAS)
- : m_rRAS(rRAS)
- , mbStatus(true)
- , mnWidth(0)
- , mnHeight(0)
- , mnDstBitsPerPix(0)
- , mnDstColors(0)
- , mnDepth(0)
- , mnImageDatSize(0)
- , mnType(0)
- , mnColorMapType(0)
- , mnColorMapSize(0)
- , mnRepCount(0)
- , mnRepVal(0)
-{
-}
-
-bool RASReader::ReadRAS(Graphic & rGraphic)
-{
- sal_uInt32 nMagicNumber;
-
- if ( m_rRAS.GetError() )
- return false;
-
- m_rRAS.SetEndian( SvStreamEndian::BIG );
- m_rRAS.ReadUInt32( nMagicNumber );
- if ( nMagicNumber != SUNRASTER_MAGICNUMBER )
- return false;
-
- // Kopf einlesen:
-
- mbStatus = ImplReadHeader();
- if ( !mbStatus )
- return false;
-
- std::vector<Color> aPalette;
- bool bOk = true;
-
- if ( mnDstBitsPerPix <= 8 ) // pallets pictures
- {
- bool bPalette(false);
-
- if ( mnColorMapType == RAS_COLOR_RAW_MAP ) // RAW color map is skipped
- {
- sal_uInt64 nCurPos = m_rRAS.Tell();
- bOk = checkSeek(m_rRAS, nCurPos + mnColorMapSize);
- }
- else if ( mnColorMapType == RAS_COLOR_RGB_MAP ) // we can read out the RGB
- {
- mnDstColors = static_cast<sal_uInt16>( mnColorMapSize / 3 );
-
- if ( ( 1 << mnDstBitsPerPix ) < mnDstColors )
- return false;
-
- if ( ( mnDstColors >= 2 ) && ( ( mnColorMapSize % 3 ) == 0 ) )
- {
- aPalette.resize(mnDstColors);
- sal_uInt16 i;
- sal_uInt8 nRed[256], nGreen[256], nBlue[256];
- for ( i = 0; i < mnDstColors; i++ ) m_rRAS.ReadUChar( nRed[ i ] );
- for ( i = 0; i < mnDstColors; i++ ) m_rRAS.ReadUChar( nGreen[ i ] );
- for ( i = 0; i < mnDstColors; i++ ) m_rRAS.ReadUChar( nBlue[ i ] );
- for ( i = 0; i < mnDstColors; i++ )
- {
- aPalette[i] = Color(nRed[ i ], nGreen[ i ], nBlue[ i ]);
- }
- bPalette = true;
- }
- else
- return false;
-
- }
- else if ( mnColorMapType != RAS_COLOR_NO_MAP ) // everything else is not standard
- return false;
-
- if (!bPalette)
- {
- mnDstColors = 1 << mnDstBitsPerPix;
- aPalette.resize(mnDstColors);
- for ( sal_uInt16 i = 0; i < mnDstColors; i++ )
- {
- sal_uInt8 nCount = 255 - ( 255 * i / ( mnDstColors - 1 ) );
- aPalette[i] = Color(nCount, nCount, nCount);
- }
- }
- }
- else
- {
- if ( mnColorMapType != RAS_COLOR_NO_MAP ) // when graphic has more than 256 colors and a color map we skip
- { // the colormap
- sal_uInt64 nCurPos = m_rRAS.Tell();
- bOk = checkSeek(m_rRAS, nCurPos + mnColorMapSize);
- }
- }
-
- if (!bOk)
- return false;
-
- //The RLE packets are typically three bytes in size:
- //The first byte is a Flag Value indicating the type of RLE packet.
- //The second byte is the Run Count.
- //The third byte is the Run Value.
- //
- //for the sake of simplicity we'll assume that RAS_TYPE_BYTE_ENCODED can
- //describe data 255 times larger than the data stored
- size_t nMaxCompression = mnType != RAS_TYPE_BYTE_ENCODED ? 1 : 255;
- sal_Int32 nBitSize;
- if (o3tl::checked_multiply<sal_Int32>(mnWidth, mnHeight, nBitSize) || o3tl::checked_multiply<sal_Int32>(nBitSize, mnDepth, nBitSize))
- return false;
- if (m_rRAS.remainingSize() * nMaxCompression < static_cast<sal_uInt32>(nBitSize) / 8)
- return false;
-
- vcl::bitmap::RawBitmap aBmp(Size(mnWidth, mnHeight), 24);
-
- // read in the bitmap data
- mbStatus = ImplReadBody(aBmp, aPalette);
-
- if ( mbStatus )
- rGraphic = vcl::bitmap::CreateFromData(std::move(aBmp));
-
- return mbStatus;
-}
-
-bool RASReader::ImplReadHeader()
-{
- m_rRAS.ReadInt32(mnWidth).ReadInt32(mnHeight).ReadInt32(mnDepth).ReadInt32(mnImageDatSize).ReadInt32(mnType).ReadInt32(mnColorMapType).ReadInt32(mnColorMapSize);
-
- if (!m_rRAS.good() || mnWidth <= 0 || mnHeight <= 0 || mnImageDatSize <= 0)
- mbStatus = false;
-
- switch ( mnDepth )
- {
- case 24 :
- case 8 :
- case 1 :
- mnDstBitsPerPix = static_cast<sal_uInt16>(mnDepth);
- break;
- case 32 :
- mnDstBitsPerPix = 24;
- break;
-
- default :
- mbStatus = false;
- }
-
- switch ( mnType )
- {
- case RAS_TYPE_OLD :
- case RAS_TYPE_STANDARD :
- case RAS_TYPE_RGB_FORMAT :
- case RAS_TYPE_BYTE_ENCODED : // this type will be supported later
- break;
-
- default:
- mbStatus = false;
- }
- return mbStatus;
-}
-
-namespace
-{
- const Color& SanitizePaletteIndex(std::vector<Color> const & rvPalette, sal_uInt8 nIndex)
- {
- if (nIndex >= rvPalette.size())
- {
- auto nSanitizedIndex = nIndex % rvPalette.size();
- SAL_WARN_IF(nIndex != nSanitizedIndex, "filter.ras", "invalid colormap index: "
- << static_cast<unsigned int>(nIndex) << ", colormap len is: "
- << rvPalette.size());
- nIndex = nSanitizedIndex;
- }
- return rvPalette[nIndex];
- }
-}
-
-bool RASReader::ImplReadBody(vcl::bitmap::RawBitmap& rBitmap, std::vector<Color> const & rvPalette)
-{
- sal_Int32 x, y;
- sal_uInt8 nRed, nGreen, nBlue;
- switch ( mnDstBitsPerPix )
- {
- case 1 :
- {
- sal_uInt8 nDat = 0;
- for (y = 0; y < mnHeight && mbStatus; ++y)
- {
- for (x = 0; x < mnWidth && mbStatus; ++x)
- {
- if (!(x & 7))
- {
- nDat = ImplGetByte();
- if (!m_rRAS.good())
- mbStatus = false;
- }
- rBitmap.SetPixel(y, x, SanitizePaletteIndex(rvPalette,
- sal::static_int_cast< sal_uInt8 >(
- nDat >> ( ( x & 7 ) ^ 7 ))));
- }
- if (!( ( x - 1 ) & 0x8 ) )
- {
- ImplGetByte(); // WORD ALIGNMENT ???
- if (!m_rRAS.good())
- mbStatus = false;
- }
- }
- break;
- }
-
- case 8 :
- for (y = 0; y < mnHeight && mbStatus; ++y)
- {
- for (x = 0; x < mnWidth && mbStatus; ++x)
- {
- sal_uInt8 nDat = ImplGetByte();
- rBitmap.SetPixel(y, x, SanitizePaletteIndex(rvPalette, nDat));
- if (!m_rRAS.good())
- mbStatus = false;
- }
- if ( x & 1 )
- {
- ImplGetByte(); // WORD ALIGNMENT ???
- if (!m_rRAS.good())
- mbStatus = false;
- }
- }
- break;
-
- case 24 :
- switch ( mnDepth )
- {
-
- case 24 :
- for (y = 0; y < mnHeight && mbStatus; ++y)
- {
- for (x = 0; x < mnWidth && mbStatus; ++x)
- {
- if ( mnType == RAS_TYPE_RGB_FORMAT )
- {
- nRed = ImplGetByte();
- nGreen = ImplGetByte();
- nBlue = ImplGetByte();
- }
- else
- {
- nBlue = ImplGetByte();
- nGreen = ImplGetByte();
- nRed = ImplGetByte();
- }
- rBitmap.SetPixel(y, x, Color(nRed, nGreen, nBlue));
- if (!m_rRAS.good())
- mbStatus = false;
- }
- if ( x & 1 )
- {
- ImplGetByte(); // WORD ALIGNMENT ???
- if (!m_rRAS.good())
- mbStatus = false;
- }
- }
- break;
-
- case 32 :
- for (y = 0; y < mnHeight && mbStatus; ++y)
- {
- for (x = 0; x < mnWidth && mbStatus; ++x)
- {
- ImplGetByte(); // pad byte > nil
- if ( mnType == RAS_TYPE_RGB_FORMAT )
- {
- nRed = ImplGetByte();
- nGreen = ImplGetByte();
- nBlue = ImplGetByte();
- }
- else
- {
- nBlue = ImplGetByte();
- nGreen = ImplGetByte();
- nRed = ImplGetByte();
- }
- rBitmap.SetPixel(y, x, Color(nRed, nGreen, nBlue));
- if (!m_rRAS.good())
- mbStatus = false;
- }
- }
- break;
- }
- break;
-
- default:
- mbStatus = false;
- break;
- }
- return mbStatus;
-}
-
-sal_uInt8 RASReader::ImplGetByte()
-{
- sal_uInt8 nRetVal;
- if ( mnType != RAS_TYPE_BYTE_ENCODED )
- {
- m_rRAS.ReadUChar( nRetVal );
- return nRetVal;
- }
- else
- {
- if ( mnRepCount )
- {
- mnRepCount--;
- return mnRepVal;
- }
- else
- {
- m_rRAS.ReadUChar( nRetVal );
- if ( nRetVal != 0x80 )
- return nRetVal;
- m_rRAS.ReadUChar( nRetVal );
- if ( nRetVal == 0 )
- return 0x80;
- mnRepCount = nRetVal ;
- m_rRAS.ReadUChar( mnRepVal );
- return mnRepVal;
- }
- }
-}
-
-//================== GraphicImport - the exported function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-iraGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
-{
- bool bRet = false;
-
- try
- {
- RASReader aRASReader(rStream);
- bRet = aRASReader.ReadRAS(rGraphic );
- }
- catch (...)
- {
- }
-
- return bRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
deleted file mode 100644
index 8c8af9d52cd8..000000000000
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ /dev/null
@@ -1,791 +0,0 @@
-/* -*- 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 <vcl/graph.hxx>
-#include <vcl/BitmapTools.hxx>
-#include <tools/stream.hxx>
-#include <memory>
-
-class FilterConfigItem;
-
-//============================ TGAReader ==================================
-
-namespace {
-
-struct TGAFileHeader
-{
- sal_uInt8 nImageIDLength;
- sal_uInt8 nColorMapType;
- sal_uInt8 nImageType;
- sal_uInt16 nColorMapFirstEntryIndex;
- sal_uInt16 nColorMapLength;
- sal_uInt8 nColorMapEntrySize;
- sal_uInt16 nColorMapXOrigin;
- sal_uInt16 nColorMapYOrigin;
- sal_uInt16 nImageWidth;
- sal_uInt16 nImageHeight;
- sal_uInt8 nPixelDepth;
- sal_uInt8 nImageDescriptor;
-};
-
-#define SizeOfTGAFileFooter 26
-
-struct TGAFileFooter
-{
- sal_uInt32 nExtensionFileOffset;
- sal_uInt32 nDeveloperDirectoryOffset;
- sal_uInt32 nSignature[4];
- sal_uInt8 nPadByte;
- sal_uInt8 nStringTerminator;
-};
-
-#define SizeOfTGAExtension 495
-
-struct TGAExtension
-{
- sal_uInt16 nExtensionSize;
- char sAuthorName[41];
- char sAuthorComment[324];
- char sDateTimeStamp[12];
- char sJobNameID[41];
- char sSoftwareID[41];
- sal_uInt16 nSoftwareVersionNumber;
- sal_uInt8 nSoftwareVersionLetter;
- sal_uInt32 nKeyColor;
- sal_uInt16 nPixelAspectRatioNumerator;
- sal_uInt16 nPixelAspectRatioDeNumerator;
- sal_uInt16 nGammaValueNumerator;
- sal_uInt16 nGammaValueDeNumerator;
- sal_uInt32 nColorCorrectionOffset;
- sal_uInt32 nPostageStampOffset;
- sal_uInt32 nScanLineOffset;
- sal_uInt8 nAttributesType;
-};
-
-class TGAReader {
-
-private:
-
- SvStream& m_rTGA;
-
- std::unique_ptr<vcl::bitmap::RawBitmap> mpBitmap;
- std::vector<Color> mvPalette;
- std::unique_ptr<TGAFileHeader>
- mpFileHeader;
- std::unique_ptr<TGAFileFooter>
- mpFileFooter;
- std::unique_ptr<TGAExtension>
- mpExtension;
- std::unique_ptr<sal_uInt32[]>
- mpColorMap;
-
- bool mbStatus;
-
- sal_uInt8 mnTGAVersion; // Enhanced TGA is defined as Version 2.0
- sal_uInt16 mnDestBitDepth;
- bool mbIndexing; // sal_True if source contains indexing color values
- bool mbEncoding; // sal_True if source is compressed
-
- bool ImplReadHeader();
- bool ImplReadPalette();
- bool ImplReadBody();
-
-public:
- explicit TGAReader(SvStream &rTGA);
- bool ReadTGA(Graphic &rGraphic);
-};
-
-}
-
-//=================== Methods of TGAReader ==============================
-
-TGAReader::TGAReader(SvStream &rTGA)
- : m_rTGA(rTGA)
- , mbStatus(true)
- , mnTGAVersion(1)
- , mnDestBitDepth(8)
- , mbIndexing(false)
- , mbEncoding(false)
-{
-}
-
-bool TGAReader::ReadTGA(Graphic & rGraphic)
-{
- if ( m_rTGA.GetError() )
- return false;
-
- m_rTGA.SetEndian( SvStreamEndian::LITTLE );
-
- // Kopf einlesen:
-
- if ( !m_rTGA.GetError() )
- {
- mbStatus = ImplReadHeader();
- if (mbStatus)
- mbStatus = mpFileHeader->nImageWidth && mpFileHeader->nImageHeight;
- if (mbStatus)
- {
- sal_Size nSize = mpFileHeader->nImageWidth;
- nSize *= mpFileHeader->nImageHeight;
- if (nSize > SAL_MAX_INT32/2/3)
- return false;
-
- mpBitmap.reset( new vcl::bitmap::RawBitmap( Size( mpFileHeader->nImageWidth, mpFileHeader->nImageHeight ), 24 ) );
- if ( mbIndexing )
- mbStatus = ImplReadPalette();
- if ( mbStatus )
- mbStatus = ImplReadBody();
-
- if ( mbStatus )
- rGraphic = vcl::bitmap::CreateFromData(std::move(*mpBitmap));
- }
- }
- return mbStatus;
-}
-
-
-bool TGAReader::ImplReadHeader()
-{
- mpFileHeader.reset( new TGAFileHeader );
-
- m_rTGA.ReadUChar( mpFileHeader->nImageIDLength ).ReadUChar( mpFileHeader->nColorMapType ).ReadUChar( mpFileHeader->nImageType ). ReadUInt16( mpFileHeader->nColorMapFirstEntryIndex ).ReadUInt16( mpFileHeader->nColorMapLength ).ReadUChar( mpFileHeader->nColorMapEntrySize ). ReadUInt16( mpFileHeader->nColorMapXOrigin ).ReadUInt16( mpFileHeader->nColorMapYOrigin ).ReadUInt16( mpFileHeader->nImageWidth ). ReadUInt16( mpFileHeader->nImageHeight ).ReadUChar( mpFileHeader->nPixelDepth ).ReadUChar( mpFileHeader->nImageDescriptor );
-
- if ( !m_rTGA.good())
- return false;
-
- if ( mpFileHeader->nColorMapType > 1 )
- return false;
- if ( mpFileHeader->nColorMapType == 1 )
- mbIndexing = true;
-
- // first we want to get the version
- mpFileFooter.reset( new TGAFileFooter ); // read the TGA-File-Footer to determine whether
- // we got an old TGA format or the new one
-
- sal_uInt64 nCurStreamPos = m_rTGA.Tell();
- m_rTGA.Seek( STREAM_SEEK_TO_END );
- sal_uInt64 nTemp = m_rTGA.Tell();
- m_rTGA.Seek( nTemp - SizeOfTGAFileFooter );
-
- m_rTGA.ReadUInt32( mpFileFooter->nExtensionFileOffset ).ReadUInt32( mpFileFooter->nDeveloperDirectoryOffset ). ReadUInt32( mpFileFooter->nSignature[0] ).ReadUInt32( mpFileFooter->nSignature[1] ).ReadUInt32( mpFileFooter->nSignature[2] ). ReadUInt32( mpFileFooter->nSignature[3] ).ReadUChar( mpFileFooter->nPadByte ).ReadUChar( mpFileFooter->nStringTerminator );
-
-
- if ( !m_rTGA.good())
- return false;
-
- // check for sal_True, VISI, ON-X, FILE in the signatures
- if ( mpFileFooter->nSignature[ 0 ] == (('T'<<24)|('R'<<16)|('U'<<8)|'E') &&
- mpFileFooter->nSignature[ 1 ] == (('V'<<24)|('I'<<16)|('S'<<8)|'I') &&
- mpFileFooter->nSignature[ 2 ] == (('O'<<24)|('N'<<16)|('-'<<8)|'X') &&
- mpFileFooter->nSignature[ 3 ] == (('F'<<24)|('I'<<16)|('L'<<8)|'E') )
- {
- mpExtension.reset( new TGAExtension );
-
- m_rTGA.Seek( mpFileFooter->nExtensionFileOffset );
- m_rTGA.ReadUInt16( mpExtension->nExtensionSize );
- if ( !m_rTGA.good())
- return false;
- if ( mpExtension->nExtensionSize >= SizeOfTGAExtension )
- {
- mnTGAVersion = 2;
-
- m_rTGA.ReadBytes(mpExtension->sAuthorName, 41);
- m_rTGA.ReadBytes(mpExtension->sAuthorComment, 324);
- m_rTGA.ReadBytes(mpExtension->sDateTimeStamp, 12);
- m_rTGA.ReadBytes(mpExtension->sJobNameID, 12);
- m_rTGA.ReadChar( mpExtension->sJobNameID[ 0 ] ).ReadChar( mpExtension->sJobNameID[ 1 ] ).ReadChar( mpExtension->sJobNameID[ 2 ] );
- m_rTGA.ReadBytes(mpExtension->sSoftwareID, 41);
- m_rTGA.ReadUInt16( mpExtension->nSoftwareVersionNumber ).ReadUChar( mpExtension->nSoftwareVersionLetter )
- .ReadUInt32( mpExtension->nKeyColor ).ReadUInt16( mpExtension->nPixelAspectRatioNumerator )
- .ReadUInt16( mpExtension->nPixelAspectRatioDeNumerator ).ReadUInt16( mpExtension->nGammaValueNumerator )
- .ReadUInt16( mpExtension->nGammaValueDeNumerator ).ReadUInt32( mpExtension->nColorCorrectionOffset )
- .ReadUInt32( mpExtension->nPostageStampOffset ).ReadUInt32( mpExtension->nScanLineOffset )
- .ReadUChar( mpExtension->nAttributesType );
-
- if ( !m_rTGA.good())
- return false;
- }
- }
- m_rTGA.Seek( nCurStreamPos );
-
- // using the TGA file specification this was the correct form but adobe photoshop sets nImageDescriptor
- // equal to nPixelDepth
- // mnDestBitDepth = mpFileHeader->nPixelDepth - ( mpFileHeader->nImageDescriptor & 0xf );
- mnDestBitDepth = mpFileHeader->nPixelDepth;
-
- if ( mnDestBitDepth == 8 ) // this is a patch for grayscale pictures not including a palette
- mbIndexing = true;
-
- if ( mnDestBitDepth > 32 ) // maybe the pixeldepth is invalid
- return false;
- else if ( mnDestBitDepth > 8 )
- mnDestBitDepth = 24;
- else if ( mnDestBitDepth > 4 )
- mnDestBitDepth = 8;
- else if ( mnDestBitDepth > 2 )
- mnDestBitDepth = 4;
-
- if ( !mbIndexing && ( mnDestBitDepth < 15 ) )
- return false;
-
- switch ( mpFileHeader->nImageType )
- {
- case 9 : // encoding for colortype 9, 10, 11
- case 10 :
- case 11 :
- mbEncoding = true;
- break;
- }
-
- if ( mpFileHeader->nImageIDLength ) // skip the Image ID
- m_rTGA.SeekRel( mpFileHeader->nImageIDLength );
-
- return mbStatus;
-}
-
-
-bool TGAReader::ImplReadBody()
-{
-
- sal_uInt16 nXCount, nYCount, nRGB16;
- sal_uInt8 nRed, nGreen, nBlue, nRunCount, nDummy, nDepth;
-
- // this four variables match the image direction
- tools::Long nY, nYAdd, nX, nXAdd, nXStart;
-
- nX = nXStart = nY = 0;
- nXCount = nYCount = 0;
- nYAdd = nXAdd = 1;
-
- if ( mpFileHeader->nImageDescriptor & 0x10 )
- {
- nX = nXStart = mpFileHeader->nImageWidth - 1;
- nXAdd -= 2;
- }
-
- if ( !(mpFileHeader->nImageDescriptor & 0x20 ) )
- {
- nY = mpFileHeader->nImageHeight - 1;
- nYAdd -=2;
- }
-
- nDepth = mpFileHeader->nPixelDepth;
-
- if ( mbEncoding )
- {
- if ( mbIndexing )
- {
- switch( nDepth )
- {
- // 16 bit encoding + indexing
- case 16 :
- while ( nYCount < mpFileHeader->nImageHeight )
- {
- m_rTGA.ReadUChar( nRunCount );
- if ( !m_rTGA.good())
- return false;
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rTGA.ReadUInt16( nRGB16 );
- if ( nRGB16 >= mpFileHeader->nColorMapLength )
- return false;
- nRed = static_cast<sal_uInt8>( mpColorMap[ nRGB16 ] >> 16 );
- nGreen = static_cast<sal_uInt8>( mpColorMap[ nRGB16 ] >> 8 );
- nBlue = static_cast<sal_uInt8>( mpColorMap[ nRGB16 ] );
- if ( !m_rTGA.good())
- return false;
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- else // a raw packet
- {
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- m_rTGA.ReadUInt16( nRGB16 );
- if ( !m_rTGA.good())
- return false;
- if ( nRGB16 >= mpFileHeader->nColorMapLength )
- return false;
- nRed = static_cast<sal_uInt8>( mpColorMap[ nRGB16 ] >> 16 );
- nGreen = static_cast<sal_uInt8>( mpColorMap[ nRGB16 ] >> 8 );
- nBlue = static_cast<sal_uInt8>( mpColorMap[ nRGB16 ] );
- if ( !m_rTGA.good())
- return false;
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- }
- break;
-
- // 8 bit encoding + indexing
- case 8 :
- while ( nYCount < mpFileHeader->nImageHeight )
- {
- m_rTGA.ReadUChar( nRunCount );
- if ( !m_rTGA.good())
- return false;
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rTGA.ReadUChar( nDummy );
- if ( !m_rTGA.good())
- return false;
- if ( nDummy >= mpFileHeader->nColorMapLength )
- return false;
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- mpBitmap->SetPixel( nY, nX, mvPalette[nDummy] );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- else // a raw packet
- {
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
-
- m_rTGA.ReadUChar( nDummy );
- if ( !m_rTGA.good())
- return false;
- if ( nDummy >= mpFileHeader->nColorMapLength )
- return false;
- mpBitmap->SetPixel( nY, nX, mvPalette[nDummy] );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- }
- break;
- default:
- return false;
- }
- }
- else
- {
- switch( nDepth )
- {
- // 32 bit transparent true color encoding
- case 32 :
- {
- while ( nYCount < mpFileHeader->nImageHeight )
- {
- m_rTGA.ReadUChar( nRunCount );
- if ( !m_rTGA.good())
- return false;
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed ).ReadUChar( nDummy );
- if ( !m_rTGA.good())
- return false;
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- else // a raw packet
- {
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed ).ReadUChar( nDummy );
- if ( !m_rTGA.good())
- return false;
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- }
- }
- break;
-
- // 24 bit true color encoding
- case 24 :
- while ( nYCount < mpFileHeader->nImageHeight )
- {
- m_rTGA.ReadUChar( nRunCount );
- if ( !m_rTGA.good())
- return false;
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed );
- if ( !m_rTGA.good())
- return false;
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- else // a raw packet
- {
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed );
- if ( !m_rTGA.good())
- return false;
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- }
- break;
-
- // 16 bit true color encoding
- case 16 :
- while ( nYCount < mpFileHeader->nImageHeight )
- {
- m_rTGA.ReadUChar( nRunCount );
- if ( !m_rTGA.good())
- return false;
- if ( nRunCount & 0x80 ) // a run length packet
- {
- m_rTGA.ReadUInt16( nRGB16 );
- if ( !m_rTGA.good())
- return false;
- nRed = static_cast<sal_uInt8>( nRGB16 >> 7 ) & 0xf8;
- nGreen = static_cast<sal_uInt8>( nRGB16 >> 2 ) & 0xf8;
- nBlue = static_cast<sal_uInt8>( nRGB16 << 3 ) & 0xf8;
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- else // a raw packet
- {
- for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
- {
- m_rTGA.ReadUInt16( nRGB16 );
- if ( !m_rTGA.good())
- return false;
- nRed = static_cast<sal_uInt8>( nRGB16 >> 7 ) & 0xf8;
- nGreen = static_cast<sal_uInt8>( nRGB16 >> 2 ) & 0xf8;
- nBlue = static_cast<sal_uInt8>( nRGB16 << 3 ) & 0xf8;
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- nX += nXAdd;
- nXCount++;
- if ( nXCount == mpFileHeader->nImageWidth )
- {
- nX = nXStart;
- nXCount = 0;
- nY += nYAdd;
- nYCount++;
-
- if( nYCount >= mpFileHeader->nImageHeight )
- break;
- }
- }
- }
- }
- break;
-
- default:
- return false;
- }
- }
- }
- else
- {
- for ( nYCount = 0; nYCount < mpFileHeader->nImageHeight; nYCount++, nY += nYAdd )
- {
- nX = nXStart;
- nXCount = 0;
-
- if ( mbIndexing )
- {
- switch( nDepth )
- {
- // 16 bit indexing
- case 16 :
- for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
- {
- m_rTGA.ReadUInt16( nRGB16 );
- if ( !m_rTGA.good())
- return false;
- if ( nRGB16 >= mpFileHeader->nColorMapLength )
- return false;
- nRed = static_cast<sal_uInt8>( mpColorMap[ nRGB16 ] >> 16 );
- nGreen = static_cast<sal_uInt8>( mpColorMap[ nRGB16 ] >> 8 );
- nBlue = static_cast<sal_uInt8>( mpColorMap[ nRGB16 ] );
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- }
- break;
-
- // 8 bit indexing
- case 8 :
- for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
- {
- m_rTGA.ReadUChar( nDummy );
- if ( !m_rTGA.good())
- return false;
- if ( nDummy >= mpFileHeader->nColorMapLength )
- return false;
- mpBitmap->SetPixel( nY, nX, Color(ColorTransparency, nDummy) );
- }
- break;
- default:
- return false;
- }
- }
- else
- {
- switch( nDepth )
- {
- // 32 bit true color
- case 32 :
- {
- for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
- {
- m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed ).ReadUChar( nDummy );
- if ( !m_rTGA.good())
- return false;
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- }
- }
- break;
-
- // 24 bit true color
- case 24 :
- for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
- {
- m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed );
- if ( !m_rTGA.good())
- return false;
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- }
- break;
-
- // 16 bit true color
- case 16 :
- for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
- {
- m_rTGA.ReadUInt16( nRGB16 );
- if ( !m_rTGA.good())
- return false;
- nRed = static_cast<sal_uInt8>( nRGB16 >> 7 ) & 0xf8;
- nGreen = static_cast<sal_uInt8>( nRGB16 >> 2 ) & 0xf8;
- nBlue = static_cast<sal_uInt8>( nRGB16 << 3 ) & 0xf8;
- mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) );
- }
- break;
- default:
- return false;
- }
- }
- }
- }
- return mbStatus;
-}
-
-
-bool TGAReader::ImplReadPalette()
-{
- if ( mbIndexing ) // read the colormap
- {
- sal_uInt16 nColors = mpFileHeader->nColorMapLength;
-
- if ( !nColors ) // colors == 0 ? -> we will build a grayscale palette
- {
- if ( mpFileHeader->nPixelDepth != 8 )
- return false;
- nColors = 256;
- mpFileHeader->nColorMapLength = 256;
- mpFileHeader->nColorMapEntrySize = 0x3f; // patch for the following switch routine
- }
- mpColorMap.reset( new sal_uInt32[ nColors ] ); // we will always index dwords
-
- switch( mpFileHeader->nColorMapEntrySize )
- {
- case 0x3f :
- {
- for (sal_uInt32 i = 0; i < nColors; ++i)
- {
- mpColorMap[ i ] = ( i << 16 ) + ( i << 8 ) + i;
- }
- }
- break;
-
- case 32 :
- for (sal_uInt16 i = 0; i < nColors; i++)
- {
- m_rTGA.ReadUInt32(mpColorMap[i]);
- }
- break;
-
- case 24 :
- {
- for ( sal_uInt16 i = 0; i < nColors; i++ )
- {
- sal_uInt8 nBlue;
- sal_uInt8 nGreen;
- sal_uInt8 nRed;
- m_rTGA.ReadUChar(nBlue).ReadUChar(nGreen).ReadUChar(nRed);
- mpColorMap[i] = (nRed << 16) | (nGreen << 8) | nBlue;
- }
- }
- break;
-
- case 15 :
- case 16 :
- {
- for ( sal_uInt16 i = 0; i < nColors; i++ )
- {
- sal_uInt16 nTemp;
- m_rTGA.ReadUInt16( nTemp );
- if ( !m_rTGA.good() )
- return false;
- mpColorMap[ i ] = ( ( nTemp & 0x7c00 ) << 9 ) + ( ( nTemp & 0x01e0 ) << 6 ) +
- ( ( nTemp & 0x1f ) << 3 );
- }
- }
- break;
-
- default :
- return false;
- }
- if ( mnDestBitDepth <= 8 )
- {
- sal_uInt16 nDestColors = ( 1 << mnDestBitDepth );
- if ( nColors > nDestColors )
- return false;
-
- mvPalette.resize( nColors );
- for ( sal_uInt16 i = 0; i < nColors; i++ )
- {
- mvPalette[i] = Color( static_cast<sal_uInt8>( mpColorMap[ i ] >> 16 ),
- static_cast<sal_uInt8>( mpColorMap[ i ] >> 8 ), static_cast<sal_uInt8>(mpColorMap[ i ] ) );
- }
- }
- }
-
- return mbStatus;
-}
-
-//================== GraphicImport - the exported function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-itgGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
-{
- TGAReader aTGAReader(rStream);
-
- return aTGAReader.ReadTGA(rGraphic);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/msfilter/countryid.cxx b/filter/source/msfilter/countryid.cxx
index 9ad504ab3272..a6f72001db17 100644
--- a/filter/source/msfilter/countryid.cxx
+++ b/filter/source/msfilter/countryid.cxx
@@ -243,7 +243,7 @@ const CountryEntry pTable[] =
{ COUNTRY_UZBEKISTAN, LANGUAGE_UZBEK_LATIN, false }
};
-const CountryEntry * const pEnd = pTable + SAL_N_ELEMENTS( pTable );
+const CountryEntry * const pEnd = pTable + std::size( pTable );
/** Predicate comparing a country ID with the member of a CountryEntry. */
struct CountryEntryPred_Country
diff --git a/filter/source/msfilter/dffpropset.cxx b/filter/source/msfilter/dffpropset.cxx
index e6ef672b0328..15e203961f15 100644
--- a/filter/source/msfilter/dffpropset.cxx
+++ b/filter/source/msfilter/dffpropset.cxx
@@ -1108,7 +1108,7 @@ void DffPropSet::ReadPropSet( SvStream& rIn, bool bSetUninitializedOnly )
sal_uInt32 nPropCount = aHd.nRecInstance;
- sal_uInt32 nComplexDataFilePos = rIn.Tell() + ( nPropCount * 6 );
+ sal_uInt64 nComplexDataFilePos = rIn.Tell() + ( nPropCount * 6 );
const size_t nMaxPossibleRecords = rIn.remainingSize() / (sizeof(sal_uInt16) + sizeof(sal_uInt32));
if (nPropCount > nMaxPossibleRecords)
@@ -1176,7 +1176,7 @@ void DffPropSet::ReadPropSet( SvStream& rIn, bool bSetUninitializedOnly )
|| ( nRecType == DFF_Prop_textRectangles ) )
{
// now check if the current content size is possible, or 6 bytes too small
- sal_uInt32 nOldPos = rIn.Tell();
+ sal_uInt64 nOldPos = rIn.Tell();
sal_Int16 nNumElem(0), nNumElemReserved(0), nSize(0);
if (checkSeek(rIn, nComplexDataFilePos))
diff --git a/filter/source/msfilter/dffrecordheader.cxx b/filter/source/msfilter/dffrecordheader.cxx
index 2a8c91a89b1b..c94bec53b611 100644
--- a/filter/source/msfilter/dffrecordheader.cxx
+++ b/filter/source/msfilter/dffrecordheader.cxx
@@ -22,28 +22,21 @@
bool ReadDffRecordHeader(SvStream& rIn, DffRecordHeader& rRec)
{
rRec.nFilePos = rIn.Tell();
- if (rIn.remainingSize() >= 8)
- {
- sal_uInt16 nTmp(0);
- rIn.ReadUInt16(nTmp);
- rRec.nImpVerInst = nTmp;
- rRec.nRecVer = sal::static_int_cast<sal_uInt8>(nTmp & 0x000F);
- rRec.nRecInstance = nTmp >> 4;
- rIn.ReadUInt16(rRec.nRecType);
- rIn.ReadUInt32(rRec.nRecLen);
+ sal_uInt16 nTmp(0);
+ rIn.ReadUInt16(nTmp);
+ rRec.nImpVerInst = nTmp;
+ rRec.nRecVer = sal::static_int_cast<sal_uInt8>(nTmp & 0x000F);
+ rRec.nRecInstance = nTmp >> 4;
+ rRec.nRecType = 0;
+ rIn.ReadUInt16(rRec.nRecType);
+ rRec.nRecLen = 0;
+ rIn.ReadUInt32(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);
- // 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);
- }
- else
- {
- rRec.nImpVerInst = 0;
- rRec.nRecVer = 0;
- rRec.nRecInstance = 0;
- rIn.Seek(STREAM_SEEK_TO_END);
- }
return rIn.good();
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 31d382796f43..b5be935d9b95 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -19,6 +19,7 @@
#include "eschesdo.hxx"
#include <o3tl/any.hxx>
+#include <o3tl/string_view.hxx>
#include <svx/svdxcgv.hxx>
#include <svx/svdomedia.hxx>
#include <svx/xflftrit.hxx>
@@ -30,6 +31,7 @@
#include <svx/svdoole2.hxx>
#include <svx/sdtfsitm.hxx>
#include <editeng/outlobj.hxx>
+#include <utility>
#include <vcl/graph.hxx>
#include <vcl/cvtgrf.hxx>
#include <vcl/svapp.hxx>
@@ -91,6 +93,8 @@
#include <sal/log.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <osl/diagnose.h>
#include <algorithm>
#include <memory>
@@ -105,8 +109,8 @@ EscherExContainer::EscherExContainer( SvStream& rSt, const sal_uInt16 nRecType,
}
EscherExContainer::~EscherExContainer()
{
- sal_uInt32 nPos = rStrm.Tell();
- sal_uInt32 nSize= nPos - nContPos;
+ sal_uInt64 nPos = rStrm.Tell();
+ sal_uInt32 nSize = nPos - nContPos;
if ( nSize )
{
rStrm.Seek( nContPos - 4 );
@@ -123,8 +127,8 @@ EscherExAtom::EscherExAtom( SvStream& rSt, const sal_uInt16 nRecType, const sal_
}
EscherExAtom::~EscherExAtom()
{
- sal_uInt32 nPos = rStrm.Tell();
- sal_uInt32 nSize= nPos - nContPos;
+ sal_uInt64 nPos = rStrm.Tell();
+ sal_uInt32 nSize = nPos - nContPos;
if ( nSize )
{
rStrm.Seek( nContPos - 4 );
@@ -205,14 +209,13 @@ void EscherPropertyContainer::AddOpt(
void EscherPropertyContainer::AddOpt(
sal_uInt16 nPropID,
- const OUString& rString)
+ std::u16string_view rString)
{
std::vector<sal_uInt8> aBuf;
- aBuf.reserve(rString.getLength() * 2 + 2);
+ aBuf.reserve(rString.size() * 2 + 2);
- for(sal_Int32 i(0); i < rString.getLength(); i++)
+ for(const sal_Unicode nUnicode: rString)
{
- const sal_Unicode nUnicode(rString[i]);
aBuf.push_back(static_cast<sal_uInt8>(nUnicode));
aBuf.push_back(static_cast<sal_uInt8>(nUnicode >> 8));
}
@@ -289,14 +292,9 @@ bool EscherPropertyContainer::GetOpt( sal_uInt16 nPropId, EscherPropSortStruct&
return false;
}
-EscherProperties EscherPropertyContainer::GetOpts() const
+const EscherProperties & EscherPropertyContainer::GetOpts() const
{
- EscherProperties aVector;
-
- for ( size_t i = 0; i < pSortStruct.size(); ++i )
- aVector.push_back( pSortStruct[ i ] );
-
- return aVector;
+ return pSortStruct;
}
extern "C" {
@@ -409,7 +407,7 @@ void EscherPropertyContainer::CreateGradientProperties(
nFillType = ESCHER_FillShadeScale;
nAngle = (rGradient.Angle * 0x10000) / 10;
nFillFocus = (sal::static_int_cast<int>(rGradient.Style) ==
- sal::static_int_cast<int>(GradientStyle::Linear)) ? 0 : 50;
+ sal::static_int_cast<int>(css::awt::GradientStyle_LINEAR)) ? 0 : 50;
}
break;
case awt::GradientStyle_RADIAL :
@@ -580,7 +578,7 @@ void EscherPropertyContainer::CreateFillProperties(
{
if ( rXShape.is() )
{
- SdrObject* pObj = GetSdrObjectFromXShape( rXShape );
+ SdrObject* pObj = SdrObject::getSdrObjectFromXShape(rXShape);
if ( pObj )
{
const SfxItemSet& aAttr( pObj->GetMergedItemSet() );
@@ -600,7 +598,7 @@ void EscherPropertyContainer::CreateFillProperties(
uno::Any aAny;
AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapNone );
AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle );
- const OUString aPropName( "FillStyle" );
+ static constexpr OUString aPropName( u"FillStyle"_ustr );
if ( EscherPropertyValueHelper::GetPropertyValue(
aAny, rXPropSet, aPropName ) )
@@ -932,16 +930,16 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart,
if ( !bIsMapped && comphelper::string::getTokenCount(aArrowStartName, ' ') == 2 )
{
sal_Int32 nIdx{ 0 };
- OUString aArrowName( aArrowStartName.getToken( 0, ' ', nIdx ) );
- if ( aArrowName == "msArrowEnd" )
+ std::u16string_view aArrowName( o3tl::getToken(aArrowStartName, 0, ' ', nIdx ) );
+ if ( aArrowName == u"msArrowEnd" )
reLineEnd = ESCHER_LineArrowEnd;
- else if ( aArrowName == "msArrowOpenEnd" )
+ else if ( aArrowName == u"msArrowOpenEnd" )
reLineEnd = ESCHER_LineArrowOpenEnd;
- else if ( aArrowName == "msArrowStealthEnd" )
+ else if ( aArrowName == u"msArrowStealthEnd" )
reLineEnd = ESCHER_LineArrowStealthEnd;
- else if ( aArrowName == "msArrowDiamondEnd" )
+ else if ( aArrowName == u"msArrowDiamondEnd" )
reLineEnd = ESCHER_LineArrowDiamondEnd;
- else if ( aArrowName == "msArrowOvalEnd" )
+ else if ( aArrowName == u"msArrowOvalEnd" )
reLineEnd = ESCHER_LineArrowOvalEnd;
else
nIdx = -1;
@@ -949,8 +947,8 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart,
// now we have the arrow, and try to determine the arrow size;
if ( nIdx>0 )
{
- OUString aArrowSize( aArrowStartName.getToken( 0, ' ', nIdx ) );
- sal_Int32 nArrowSize = aArrowSize.toInt32();
+ std::u16string_view aArrowSize = o3tl::getToken(aArrowStartName, 0, ' ', nIdx );
+ sal_Int32 nArrowSize = o3tl::toInt32(aArrowSize);
rnArrowWidth = ( nArrowSize - 1 ) / 3;
rnArrowLength = nArrowSize - ( rnArrowWidth * 3 ) - 1;
}
@@ -1337,15 +1335,14 @@ bool EscherPropertyContainer::CreateOLEGraphicProperties(const uno::Reference<dr
if ( rXShape.is() )
{
- SdrObject* pObject = GetSdrObjectFromXShape(rXShape); // SJ: leaving unoapi, because currently there is
+ SdrObject* pObject = SdrObject::getSdrObjectFromXShape(rXShape); // SJ: leaving unoapi, because currently there is
if (auto pOle2Obj = dynamic_cast<const SdrOle2Obj*>(pObject)) // no access to the native graphic object
{
const Graphic* pGraphic = pOle2Obj->GetGraphic();
if (pGraphic)
{
- Graphic aGraphic(*pGraphic);
- std::unique_ptr<GraphicObject> xGraphicObject(new GraphicObject(aGraphic));
- bRetValue = CreateGraphicProperties(rXShape, *xGraphicObject);
+ GraphicObject aGraphicObject(*pGraphic);
+ bRetValue = CreateGraphicProperties(rXShape, aGraphicObject);
}
}
}
@@ -1387,11 +1384,11 @@ bool EscherPropertyContainer::CreateMediaGraphicProperties(const uno::Reference<
bool bRetValue = false;
if ( rXShape.is() )
{
- SdrObject* pSdrObject(GetSdrObjectFromXShape(rXShape)); // SJ: leaving unoapi, because currently there is
+ SdrObject* pSdrObject(SdrObject::getSdrObjectFromXShape(rXShape)); // SJ: leaving unoapi, because currently there is
if (auto pSdrMediaObj = dynamic_cast<const SdrMediaObj*>(pSdrObject)) // no access to the native graphic object
{
- std::unique_ptr<GraphicObject> xGraphicObject(new GraphicObject(pSdrMediaObj->getSnapshot()));
- bRetValue = CreateGraphicProperties(rXShape, *xGraphicObject);
+ GraphicObject aGraphicObject(pSdrMediaObj->getSnapshot());
+ bRetValue = CreateGraphicProperties(rXShape, aGraphicObject);
}
}
return bRetValue;
@@ -1419,10 +1416,10 @@ void EscherPropertyContainer::CreateEmbeddedBitmapProperties(
uno::Reference<graphic::XGraphic> xGraphic(rxBitmap, uno::UNO_QUERY);
if (!xGraphic.is())
return;
- const Graphic aGraphic(xGraphic);
+ Graphic aGraphic(xGraphic);
if (aGraphic.IsNone())
return;
- const GraphicObject aGraphicObject(aGraphic);
+ GraphicObject aGraphicObject(std::move(aGraphic));
if (aGraphicObject.GetType() == GraphicType::NONE)
return;
if (ImplCreateEmbeddedBmp(aGraphicObject))
@@ -1468,7 +1465,7 @@ void EscherPropertyContainer::CreateEmbeddedHatchProperties(const drawing::Hatch
{
const tools::Rectangle aRect(pShapeBoundRect ? *pShapeBoundRect : tools::Rectangle(Point(0,0), Size(28000, 21000)));
Graphic aGraphic(lclDrawHatch(rHatch, rBackColor, bFillBackground, aRect));
- GraphicObject aGraphicObject(aGraphic);
+ GraphicObject aGraphicObject(std::move(aGraphic));
if (ImplCreateEmbeddedBmp(aGraphicObject))
AddOpt( ESCHER_Prop_fillType, ESCHER_FillTexture );
@@ -1635,7 +1632,9 @@ bool EscherPropertyContainer::CreateGraphicProperties(const uno::Reference<beans
nFormat != GraphicFileFormat::TIF &&
nFormat != GraphicFileFormat::PCT &&
nFormat != GraphicFileFormat::WMF &&
- nFormat != GraphicFileFormat::EMF) )
+ nFormat != GraphicFileFormat::WMZ &&
+ nFormat != GraphicFileFormat::EMF &&
+ nFormat != GraphicFileFormat::EMZ) )
{
std::unique_ptr<SvStream> pIn(::utl::UcbStreamHelper::CreateStream(
aTmp.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
@@ -1777,7 +1776,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(const uno::Reference<beans
{
EscherGraphicProvider aProvider;
SvMemoryStream aMemStrm;
- GraphicObject aGraphicObject(aGraphic);
+ GraphicObject aGraphicObject(std::move(aGraphic));
if (aProvider.GetBlibID(aMemStrm, aGraphicObject, nullptr, pGraphicAttr.get(), bOOxmlExport))
{
@@ -1911,14 +1910,20 @@ bool EscherPropertyContainer::CreatePolygonProperties(
const sal_uInt16 nPolyCount(aPolyPolygon.Count());
sal_uInt32 nTotalPoints(0);
- std::vector< sal_uInt8 > aVertices(4, 0);
- std::vector< sal_uInt8 > aSegments(4, 0);
- aVertices.push_back(static_cast<sal_uInt8>(0xf0));
- aVertices.push_back(static_cast<sal_uInt8>(0xff));
+ std::vector< sal_uInt8 > aVertices
+ {
+ 0, 0, 0, 0,
+ static_cast<sal_uInt8>(0xf0),
+ static_cast<sal_uInt8>(0xff)
+ };
- aSegments.push_back(static_cast<sal_uInt8>(2));
- aSegments.push_back(static_cast<sal_uInt8>(0));
+ std::vector< sal_uInt8 > aSegments
+ {
+ 0, 0, 0, 0,
+ static_cast<sal_uInt8>(2),
+ static_cast<sal_uInt8>(0)
+ };
for(sal_uInt16 j(0); j < nPolyCount; ++j)
{
@@ -1995,47 +2000,45 @@ bool EscherPropertyContainer::CreatePolygonProperties(
}
}
- if(0 != nTotalPoints && aSegments.size() >= 6 && aVertices.size() >= 6)
- {
- // Little endian
- aVertices[0] = static_cast<sal_uInt8>(nTotalPoints);
- aVertices[1] = static_cast<sal_uInt8>(nTotalPoints >> 8);
- aVertices[2] = static_cast<sal_uInt8>(nTotalPoints);
- aVertices[3] = static_cast<sal_uInt8>(nTotalPoints >> 8);
-
- aSegments.push_back(static_cast<sal_uInt8>(0));
- aSegments.push_back(static_cast<sal_uInt8>(0x80));
-
- const sal_uInt32 nSegmentBufSize(aSegments.size() - 6);
- aSegments[0] = static_cast<sal_uInt8>(nSegmentBufSize >> 1);
- aSegments[1] = static_cast<sal_uInt8>(nSegmentBufSize >> 9);
- aSegments[2] = static_cast<sal_uInt8>(nSegmentBufSize >> 1);
- aSegments[3] = static_cast<sal_uInt8>(nSegmentBufSize >> 9);
-
- AddOpt(
- ESCHER_Prop_geoRight,
- rGeoRect.Width);
- AddOpt(
- ESCHER_Prop_geoBottom,
- rGeoRect.Height);
- AddOpt(
- ESCHER_Prop_shapePath,
- ESCHER_ShapeComplex);
- AddOpt(
- ESCHER_Prop_pVertices,
- true,
- aVertices.size() - 6,
- aVertices);
- AddOpt(
- ESCHER_Prop_pSegmentInfo,
- true,
- aSegments.size(),
- aSegments);
+ if(0 == nTotalPoints || aSegments.size() < 6 || aVertices.size() < 6)
+ return false;
- return true;
- }
+ // Little endian
+ aVertices[0] = static_cast<sal_uInt8>(nTotalPoints);
+ aVertices[1] = static_cast<sal_uInt8>(nTotalPoints >> 8);
+ aVertices[2] = static_cast<sal_uInt8>(nTotalPoints);
+ aVertices[3] = static_cast<sal_uInt8>(nTotalPoints >> 8);
- return false;
+ aSegments.push_back(static_cast<sal_uInt8>(0));
+ aSegments.push_back(static_cast<sal_uInt8>(0x80));
+
+ const sal_uInt32 nSegmentBufSize(aSegments.size() - 6);
+ aSegments[0] = static_cast<sal_uInt8>(nSegmentBufSize >> 1);
+ aSegments[1] = static_cast<sal_uInt8>(nSegmentBufSize >> 9);
+ aSegments[2] = static_cast<sal_uInt8>(nSegmentBufSize >> 1);
+ aSegments[3] = static_cast<sal_uInt8>(nSegmentBufSize >> 9);
+
+ AddOpt(
+ ESCHER_Prop_geoRight,
+ rGeoRect.Width);
+ AddOpt(
+ ESCHER_Prop_geoBottom,
+ rGeoRect.Height);
+ AddOpt(
+ ESCHER_Prop_shapePath,
+ ESCHER_ShapeComplex);
+ AddOpt(
+ ESCHER_Prop_pVertices,
+ true,
+ aVertices.size() - 6,
+ aVertices);
+ AddOpt(
+ ESCHER_Prop_pSegmentInfo,
+ true,
+ aSegments.size(),
+ aSegments);
+
+ return true;
}
@@ -2127,7 +2130,6 @@ static void lcl_Rotate(Degree100 nAngle, Point center, Point& pt)
break;
default:
return;
- break;
}
sal_Int32 x0 =pt.X()-center.X();
sal_Int32 y0 =pt.Y()-center.Y();
@@ -2451,13 +2453,13 @@ static void ConvertEnhancedCustomShapeEquation(
sal_Int32 i;
for ( i = 0; i < nEquationSourceCount; i++ )
{
- EnhancedCustomShape2d aCustoShape2d(
+ EnhancedCustomShape2d aCustomShape2d(
const_cast< SdrObjCustomShape& >(rSdrObjCustomShape));
try
{
std::shared_ptr< EnhancedCustomShape::ExpressionNode > aExpressNode(
EnhancedCustomShape::FunctionParser::parseFunction(
- sEquationSource[ i ], aCustoShape2d));
+ sEquationSource[ i ], aCustomShape2d));
drawing::EnhancedCustomShapeParameter aPara( aExpressNode->fillNode( rEquations, nullptr, 0 ) );
if ( aPara.Type != drawing::EnhancedCustomShapeParameterType::EQUATION )
{
@@ -2516,7 +2518,7 @@ bool EscherPropertyContainer::IsDefaultObject(
{
switch(eShapeType)
{
- // if the custom shape is not default shape of ppt, return sal_Fasle;
+ // if the custom shape is not default shape of ppt, return false;
case mso_sptTearDrop:
return false;
@@ -2537,17 +2539,17 @@ bool EscherPropertyContainer::IsDefaultObject(
void EscherPropertyContainer::LookForPolarHandles( const MSO_SPT eShapeType, sal_Int32& nAdjustmentsWhichNeedsToBeConverted )
{
const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eShapeType );
- if ( !(pDefCustomShape && pDefCustomShape->nHandles && pDefCustomShape->pHandles) )
+ if ( !pDefCustomShape || pDefCustomShape->pHandles.empty() )
return;
- sal_Int32 k, nkCount = pDefCustomShape->nHandles;
- const SvxMSDffHandle* pData = pDefCustomShape->pHandles;
- for ( k = 0; k < nkCount; k++, pData++ )
+ sal_Int32 k, nkCount = pDefCustomShape->pHandles.size();
+ for (k = 0; k < nkCount; k++)
{
+ const SvxMSDffHandle* pData = &pDefCustomShape->pHandles[k];
if ( pData->nFlags & SvxMSDffHandleFlags::POLAR )
{
- if ( ( pData->nPositionY >= 0x256 ) || ( pData->nPositionY <= 0x107 ) )
- nAdjustmentsWhichNeedsToBeConverted |= ( 1 << k );
+ if ( ( pData->nPositionY >= 0x256 ) || ( pData->nPositionY <= 0x107 ) )
+ nAdjustmentsWhichNeedsToBeConverted |= ( 1 << k );
}
}
}
@@ -2582,25 +2584,26 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
if ( !aXPropSet.is() )
return;
- if(nullptr == dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(rXShape)))
+ SdrObjCustomShape* pSdrObjCustomShape = dynamic_cast< SdrObjCustomShape* >(SdrObject::getSdrObjectFromXShape(rXShape));
+ if(!pSdrObjCustomShape)
{
return;
}
- SdrObjCustomShape& rSdrObjCustomShape(static_cast< SdrObjCustomShape& >(*GetSdrObjectFromXShape(rXShape)));
+ SdrObjCustomShape& rSdrObjCustomShape = *pSdrObjCustomShape;
uno::Any aGeoPropSet = aXPropSet->getPropertyValue( "CustomShapeGeometry" );
uno::Sequence< beans::PropertyValue > aGeoPropSeq;
if ( !(aGeoPropSet >>= aGeoPropSeq) )
return;
- const OUString sViewBox ( "ViewBox" );
- const OUString sTextRotateAngle ( "TextRotateAngle" );
- const OUString sExtrusion ( "Extrusion" );
- const OUString sEquations ( "Equations" );
- const OUString sPath ( "Path" );
- const OUString sTextPath ( "TextPath" );
- const OUString sHandles ( "Handles" );
- const OUString sAdjustmentValues ( "AdjustmentValues" );
+ static constexpr OUStringLiteral sViewBox ( u"ViewBox" );
+ static constexpr OUStringLiteral sTextRotateAngle ( u"TextRotateAngle" );
+ static constexpr OUString sExtrusion ( u"Extrusion"_ustr );
+ static constexpr OUStringLiteral sEquations ( u"Equations" );
+ static constexpr OUStringLiteral sPath ( u"Path" );
+ static constexpr OUString sTextPath ( u"TextPath"_ustr );
+ static constexpr OUStringLiteral sHandles ( u"Handles" );
+ static constexpr OUStringLiteral sAdjustmentValues ( u"AdjustmentValues" );
bool bAdjustmentValuesProp = false;
uno::Any aAdjustmentValuesProp;
@@ -2847,8 +2850,9 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
drawing::Direction3D aExtrusionRotationCenter;
if ( rrProp.Value >>= aExtrusionRotationCenter )
{
- AddOpt( DFF_Prop_c3DRotationCenterX, static_cast<sal_Int32>( aExtrusionRotationCenter.DirectionX * 360.0 ) );
- AddOpt( DFF_Prop_c3DRotationCenterY, static_cast<sal_Int32>( aExtrusionRotationCenter.DirectionY * 360.0 ) );
+ // tdf#145904 X- and Y-component is fraction, Z-component in EMU
+ AddOpt( DFF_Prop_c3DRotationCenterX, static_cast<sal_Int32>( aExtrusionRotationCenter.DirectionX * 65536.0 ) );
+ AddOpt( DFF_Prop_c3DRotationCenterY, static_cast<sal_Int32>( aExtrusionRotationCenter.DirectionY * 65536.0 ) );
AddOpt( DFF_Prop_c3DRotationCenterZ, static_cast<sal_Int32>( aExtrusionRotationCenter.DirectionZ * 360.0 ) );
nFillHarshFlags &=~8; // don't use AutoRotationCenter;
}
@@ -2857,7 +2861,11 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
{
double fExtrusionShininess = 0;
if ( rrProp.Value >>= fExtrusionShininess )
- AddOpt( DFF_Prop_c3DShininess, static_cast<sal_Int32>( fExtrusionShininess * 655.36 ) );
+ {
+ // ODF to MS Office conversion invers to msdffimp.cxx
+ fExtrusionShininess = std::round(fExtrusionShininess / 10.0);
+ AddOpt( DFF_Prop_c3DShininess, static_cast<sal_Int32>(fExtrusionShininess) );
+ }
}
else if ( rrProp.Name == "Skew" )
{
@@ -2874,7 +2882,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
{
double fExtrusionSpecularity = 0;
if ( rrProp.Value >>= fExtrusionSpecularity )
- AddOpt( DFF_Prop_c3DSpecularAmt, static_cast<sal_Int32>( fExtrusionSpecularity * 1333 ) );
+ AddOpt( DFF_Prop_c3DSpecularAmt, static_cast<sal_Int32>( fExtrusionSpecularity * 655.36 ) );
}
else if ( rrProp.Name == "ProjectionMode" )
{
@@ -3444,10 +3452,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt(DFF_Prop_gtextAlign,gTextAlign);
}
}
- if((nTextPathFlags & 0x4000) != 0) // Is Font work
+ if((nTextPathFlags & 0x4000) != 0) // Is Fontwork
{
OutlinerParaObject* pOutlinerParaObject(rSdrObjCustomShape.GetOutlinerParaObject());
- if ( pOutlinerParaObject && pOutlinerParaObject->IsVertical() )
+ if ( pOutlinerParaObject && pOutlinerParaObject->IsEffectivelyVertical() )
nTextPathFlags |= 0x2000;
}
@@ -3711,8 +3719,7 @@ MSO_SPT EscherPropertyContainer::GetCustomShapeType( const uno::Reference< drawi
// In case of VML export, try to handle the
// ooxml- prefix in rShapeType. If that fails,
// just do the same as the binary export.
- OString aType = OUStringToOString(rShapeType, RTL_TEXTENCODING_UTF8);
- eShapeType = msfilter::util::GETVMLShapeType(aType);
+ eShapeType = msfilter::util::GETVMLShapeType(rShapeType);
if (eShapeType == mso_sptNil)
eShapeType = EnhancedCustomShapeTypeNames::Get(rShapeType);
}
@@ -3747,23 +3754,23 @@ MSO_SPT EscherPropertyContainer::GetCustomShapeType( const uno::Reference< drawi
bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const uno::Reference<beans::XPropertySet> & rXPropSet,
const uno::Reference<drawing::XShape> & rXShape)
{
- SdrObject* pShape = GetSdrObjectFromXShape( rXShape );
- if ( pShape )
- {
- const Graphic aGraphic(SdrExchangeView::GetObjGraphic(*pShape));
- const GraphicObject aGraphicObject(aGraphic);
+ SdrObject* pShape = SdrObject::getSdrObjectFromXShape(rXShape);
+ if ( !pShape )
+ return false;
+
+ Graphic aGraphic(SdrExchangeView::GetObjGraphic(*pShape));
+ const GraphicObject aGraphicObject(std::move(aGraphic));
- if (!aGraphicObject.GetUniqueID().isEmpty())
+ if (!aGraphicObject.GetUniqueID().isEmpty())
+ {
+ if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect )
{
- if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect )
+ sal_uInt32 nBlibId = pGraphicProvider->GetBlibID(*pPicOutStrm, aGraphicObject);
+ if ( nBlibId )
{
- sal_uInt32 nBlibId = pGraphicProvider->GetBlibID(*pPicOutStrm, aGraphicObject);
- if ( nBlibId )
- {
- AddOpt( ESCHER_Prop_pib, nBlibId, true );
- ImplCreateGraphicAttributes( rXPropSet, nBlibId, false );
- return true;
- }
+ AddOpt( ESCHER_Prop_pib, nBlibId, true );
+ ImplCreateGraphicAttributes( rXPropSet, nBlibId, false );
+ return true;
}
}
}
@@ -3781,12 +3788,8 @@ EscherPersistTable::~EscherPersistTable()
bool EscherPersistTable::PtIsID( sal_uInt32 nID )
{
- for(auto const & pPtr : maPersistTable) {
- if ( pPtr->mnID == nID ) {
- return true;
- }
- }
- return false;
+ return std::any_of(maPersistTable.begin(), maPersistTable.end(),
+ [&nID](const auto& rxEntry) { return rxEntry->mnID == nID; });
}
void EscherPersistTable::PtInsert( sal_uInt32 nID, sal_uInt32 nOfs )
@@ -3891,11 +3894,11 @@ beans::PropertyState EscherPropertyValueHelper::GetPropertyState(
EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject& rObject, const OString& rId,
const GraphicAttr* pGraphicAttr ) :
+ maPrefMapMode ( rObject.GetPrefMapMode() ),
+ maPrefSize ( rObject.GetPrefSize() ),
mnPictureOffset ( nPictureOffset ),
mnRefCount ( 1 ),
mnSizeExtra ( 0 ),
- maPrefSize ( rObject.GetPrefSize() ),
- maPrefMapMode ( rObject.GetPrefMapMode() ),
mbIsEmpty ( true )
{
mbIsNativeGraphicPossible = ( pGraphicAttr == nullptr );
@@ -4050,7 +4053,8 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM
if ( pMergePicStreamBSE )
{
- sal_uInt32 nBlipSize, nOldPos = pMergePicStreamBSE->Tell();
+ sal_uInt32 nBlipSize;
+ sal_uInt64 nOldPos = pMergePicStreamBSE->Tell();
const sal_uInt32 nBuf = 0x40000; // 256KB buffer
std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ nBuf ]);
@@ -4194,15 +4198,13 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, GraphicObjec
SvMemoryStream aGIFStream;
const char* const pString = "MSOFFICE9.0";
aGIFStream.WriteBytes(pString, strlen(pString));
- nErrCode = rFilter.ExportGraphic( aGraphic, OUString(), aGIFStream,
+ nErrCode = rFilter.ExportGraphic( aGraphic, u"", aGIFStream,
rFilter.GetExportFormatNumberForShortName( u"GIF" ) );
SAL_WARN_IF(
nErrCode != ERRCODE_NONE, "filter.ms",
"ExportGraphic to GIF failed with " << nErrCode);
if (nErrCode == ERRCODE_NONE)
{
- uno::Sequence<beans::PropertyValue> aFilterData( 1 );
- uno::Sequence<beans::PropertyValue> aAdditionalChunkSequence( 1 );
sal_uInt32 nGIFSreamLen = aGIFStream.Tell();
uno::Sequence<sal_Int8> aGIFSeq( nGIFSreamLen );
sal_Int8* pSeq = aGIFSeq.getArray();
@@ -4211,11 +4213,11 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, GraphicObjec
beans::PropertyValue aChunkProp, aFilterProp;
aChunkProp.Name = "msOG";
aChunkProp.Value <<= aGIFSeq;
- aAdditionalChunkSequence[ 0 ] = aChunkProp;
+ uno::Sequence<beans::PropertyValue> aAdditionalChunkSequence{ aChunkProp };
aFilterProp.Name = "AdditionalChunks";
aFilterProp.Value <<= aAdditionalChunkSequence;
- aFilterData[ 0 ] = aFilterProp;
- nErrCode = rFilter.ExportGraphic( aGraphic, OUString(), aStream,
+ uno::Sequence<beans::PropertyValue> aFilterData{ aFilterProp };
+ nErrCode = rFilter.ExportGraphic( aGraphic, u"", aStream,
rFilter.GetExportFormatNumberForShortName( u"PNG" ), &aFilterData );
}
}
@@ -4339,7 +4341,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, GraphicObjec
}
if ( nAtomSize )
{
- sal_uInt32 nPos = rPicOutStrm.Tell();
+ sal_uInt64 nPos = rPicOutStrm.Tell();
rPicOutStrm.Seek( nAtomSize - 4 );
rPicOutStrm.WriteUInt32( nPos - nAtomSize );
rPicOutStrm.Seek( nPos );
@@ -4369,8 +4371,8 @@ struct EscherShapeListEntry
uno::Reference<drawing::XShape>aXShape;
sal_uInt32 n_EscherId;
- EscherShapeListEntry(const uno::Reference<drawing::XShape> & rShape, sal_uInt32 nId)
- : aXShape(rShape)
+ EscherShapeListEntry(uno::Reference<drawing::XShape> xShape, sal_uInt32 nId)
+ : aXShape(std::move(xShape))
, n_EscherId(nId)
{}
};
@@ -4419,7 +4421,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
uno::Reference<beans::XPropertySet>
aPropertySet( aXShape, uno::UNO_QUERY );
- if ((aType == OString( "drawing.PolyPolygon" )) || (aType == OString( "drawing.PolyLine" )))
+ if ((aType == "drawing.PolyPolygon") || (aType == "drawing.PolyLine"))
{
if ( aPropertySet.is() )
{
@@ -4458,8 +4460,8 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
}
}
}
- else if ((aType == OString( "drawing.OpenBezier" )) || (aType == OString( "drawing.OpenFreeHand" )) || (aType == OString( "drawing.PolyLinePath" ))
- || (aType == OString( "drawing.ClosedBezier" )) || ( aType == OString( "drawing.ClosedFreeHand" )) || (aType == OString( "drawing.PolyPolygonPath" )) )
+ else if ((aType == "drawing.OpenBezier") || (aType == "drawing.OpenFreeHand") || (aType == "drawing.PolyLinePath")
+ || (aType == "drawing.ClosedBezier") || ( aType == "drawing.ClosedFreeHand") || (aType == "drawing.PolyPolygonPath") )
{
uno::Reference<beans::XPropertySet>
aPropertySet2( aXShape, uno::UNO_QUERY );
@@ -4518,7 +4520,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
if (aType == "drawing.Custom")
{
- if (auto pSdrObjCustomShape = dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(aXShape)))
+ if (auto pSdrObjCustomShape = dynamic_cast< SdrObjCustomShape* >(SdrObject::getSdrObjectFromXShape(aXShape)))
{
const SdrCustomShapeGeometryItem& rGeometryItem =
pSdrObjCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
@@ -4559,7 +4561,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
else if ( nGluePointType == drawing::EnhancedCustomShapeGluePointType::SEGMENTS )
{
tools::PolyPolygon aPolyPoly;
- SdrObjectUniquePtr pTemporaryConvertResultObject(pSdrObjCustomShape->DoConvertToPolyObj(true, true));
+ rtl::Reference<SdrObject> pTemporaryConvertResultObject(pSdrObjCustomShape->DoConvertToPolyObj(true, true));
SdrPathObj* pSdrPathObj(dynamic_cast< SdrPathObj* >(pTemporaryConvertResultObject.get()));
if(pSdrPathObj)
@@ -4570,7 +4572,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
}
// do *not* forget to delete the temporary used SdrObject - possible memory leak (!)
- pTemporaryConvertResultObject.reset();
+ pTemporaryConvertResultObject.clear();
pSdrPathObj = nullptr;
if(0 != aPolyPoly.Count())
@@ -4623,7 +4625,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
aPoly.Rotate( aRect.TopLeft(), Degree10(static_cast<sal_Int16>( ( nAngle + 5 ) / 10 )) );
nRule = GetClosestPoint( aPoly, aRefPoint );
- if (aType == OString( "drawing.Ellipse" ))
+ if (aType == "drawing.Ellipse")
nRule <<= 1; // In PPT an ellipse has 8 ways to connect
}
}
@@ -4853,15 +4855,14 @@ protected:
virtual void FlushData() override {}
public:
- SvNullStream() : SvStream() {}
+ SvNullStream() {}
};
}
-EscherEx::EscherEx(const std::shared_ptr<EscherExGlobal>& rxGlobal, SvStream* pOutStrm, bool bOOXML)
- : mxGlobal(rxGlobal)
+EscherEx::EscherEx(std::shared_ptr<EscherExGlobal> xGlobal, SvStream* pOutStrm, bool bOOXML)
+ : mxGlobal(std::move(xGlobal))
, mpOutStrm(pOutStrm)
- , mbOwnsStrm(false)
, mnCurrentDg(0)
, mnCountOfs(0)
, mnGroupLevel(0)
@@ -4872,8 +4873,8 @@ EscherEx::EscherEx(const std::shared_ptr<EscherExGlobal>& rxGlobal, SvStream* pO
{
if (!mpOutStrm)
{
- mpOutStrm = new SvNullStream();
- mbOwnsStrm = true;
+ mxOwnStrm = std::make_unique<SvNullStream>();
+ mpOutStrm = mxOwnStrm.get();
}
mnStrmStartOfs = mpOutStrm->Tell();
mpImplEESdrWriter.reset( new ImplEESdrWriter( *this ) );
@@ -4881,8 +4882,6 @@ EscherEx::EscherEx(const std::shared_ptr<EscherExGlobal>& rxGlobal, SvStream* pO
EscherEx::~EscherEx()
{
- if (mbOwnsStrm)
- delete mpOutStrm;
}
void EscherEx::Flush( SvStream* pPicStreamMergeBSE /* = NULL */ )
@@ -4922,7 +4921,8 @@ void EscherEx::Flush( SvStream* pPicStreamMergeBSE /* = NULL */ )
void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes )
{
- sal_uInt32 nSize, nType, nSource, nBufSize, nToCopy, nCurPos = mpOutStrm->Tell();
+ sal_uInt32 nSize, nType, nSource, nBufSize, nToCopy;
+ sal_uInt64 nCurPos = mpOutStrm->Tell();
// adjust persist table
for(auto const & pPtr : maPersistTable) {
@@ -4937,7 +4937,7 @@ void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes )
while ( mpOutStrm->Tell() < nCurPos )
{
mpOutStrm->ReadUInt32( nType ).ReadUInt32( nSize );
- sal_uInt32 nEndOfRecord = mpOutStrm->Tell() + nSize;
+ sal_uInt64 nEndOfRecord = mpOutStrm->Tell() + nSize;
bool bContainer = (nType & 0x0F) == 0x0F;
/* Expand the record, if the insertion position is inside, or if the
position is at the end of a container (expands always), or at the
@@ -5014,7 +5014,7 @@ bool EscherEx::SeekToPersistOffset( sal_uInt32 nKey )
void EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue )
{
- sal_uInt32 nOldPos = mpOutStrm->Tell();
+ sal_uInt64 nOldPos = mpOutStrm->Tell();
bool bRetValue = SeekToPersistOffset( nKey );
if ( bRetValue )
{
@@ -5081,8 +5081,8 @@ void EscherEx::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
void EscherEx::CloseContainer()
{
- sal_uInt32 nSize, nPos = mpOutStrm->Tell();
- nSize = ( nPos - mOffsets.back() ) - 4;
+ sal_uInt64 nPos = mpOutStrm->Tell();
+ sal_uInt32 nSize = ( nPos - mOffsets.back() ) - 4;
mpOutStrm->Seek( mOffsets.back() );
mpOutStrm->WriteUInt32( nSize );
@@ -5125,7 +5125,7 @@ void EscherEx::BeginAtom()
void EscherEx::EndAtom( sal_uInt16 nRecType, int nRecVersion, int nRecInstance )
{
- sal_uInt32 nOldPos = mpOutStrm->Tell();
+ sal_uInt64 nOldPos = mpOutStrm->Tell();
mpOutStrm->Seek( mnCountOfs );
sal_uInt32 nSize = nOldPos - mnCountOfs;
mpOutStrm->WriteUInt16( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ).WriteUInt16( nRecType ).WriteUInt32( nSize - 8 );
@@ -5217,7 +5217,7 @@ void EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const tools::Rectangle&
{
if ( nGroupLevel )
{
- sal_uInt32 nCurrentPos = mpOutStrm->Tell();
+ sal_uInt64 nCurrentPos = mpOutStrm->Tell();
if ( DoSeek( ESCHER_Persist_Grouping_Snap | ( nGroupLevel - 1 ) ) )
{
mpOutStrm ->WriteInt32( rRect.Left() ) // Bounding box for the grouped shapes to which they will be attached
@@ -5233,7 +5233,7 @@ void EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const tools::Rectangle
{
if ( nGroupLevel )
{
- sal_uInt32 nCurrentPos = mpOutStrm->Tell();
+ sal_uInt64 nCurrentPos = mpOutStrm->Tell();
if ( DoSeek( ESCHER_Persist_Grouping_Logic | ( nGroupLevel - 1 ) ) )
{
mpOutStrm->WriteInt16( rRect.Top() ).WriteInt16( rRect.Left() ).WriteInt16( rRect.Right() ).WriteInt16( rRect.Bottom() );
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 24f47d62909f..b21534676e4c 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -21,15 +21,14 @@
#include "eschesdo.hxx"
#include <o3tl/any.hxx>
#include <svx/svdobj.hxx>
-#include <svx/unoapi.hxx>
-#include <svx/unoshape.hxx>
-#include <vcl/outdev.hxx>
#include <tools/poly.hxx>
#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <tools/fract.hxx>
-#include <svx/fmdpage.hxx>
+#include <comphelper/diagnose_ex.hxx>
+#include <svx/unopage.hxx>
#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/drawing/CircleKind.hpp>
@@ -45,15 +44,13 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::task;
-using namespace ::com::sun::star::style;
-#define EES_MAP_FRACTION 1440 // 1440 dpi
+constexpr o3tl::Length geUnitsSrc(o3tl::Length::mm100);
+// PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi
+constexpr o3tl::Length geUnitsDest(o3tl::Length::twip);
ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
: mpEscherEx(&rEx)
- , maMapModeSrc(MapUnit::Map100thMM)
- // PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi
- , maMapModeDest( MapUnit::MapInch, Point(), Fraction( 1, EES_MAP_FRACTION ), Fraction( 1, EES_MAP_FRACTION ) )
, mpPicStrm(nullptr)
, mpHostAppData(nullptr)
, mbIsTitlePossible(false)
@@ -65,12 +62,12 @@ ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
Point ImplEESdrWriter::ImplMapPoint( const Point& rPoint )
{
- return OutputDevice::LogicToLogic( rPoint, maMapModeSrc, maMapModeDest );
+ return o3tl::convert( rPoint, geUnitsSrc, geUnitsDest );
}
Size ImplEESdrWriter::ImplMapSize( const Size& rSize )
{
- Size aRetSize( OutputDevice::LogicToLogic( rSize, maMapModeSrc, maMapModeDest ) );
+ Size aRetSize( o3tl::convert( rSize, geUnitsSrc, geUnitsDest ) );
if ( !aRetSize.Width() )
aRetSize.AdjustWidth( 1 );
@@ -92,7 +89,7 @@ void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherProperty
while ( nAngle > 9000 )
nAngle = ( 18000 - ( nAngle % 18000 ) );
- double fVal = static_cast<double>(nAngle) * F_PI18000;
+ double fVal = basegfx::deg2rad<100>(nAngle);
double fCos = cos( fVal );
double fSin = sin( fVal );
@@ -167,7 +164,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if ( xPropInfo.is() && xPropInfo->hasPropertyByName( "InteropGrabBag" ) )
{
xPropertySet->getPropertyValue( "InteropGrabBag" ) >>= aGrabBag;
- for (const beans::PropertyValue& rProp : std::as_const(aGrabBag))
+ for (const beans::PropertyValue& rProp : aGrabBag)
{
if (rProp.Name == "mso-edit-as")
{
@@ -193,7 +190,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
for( sal_uInt32 n = 0, nCnt = xXIndexAccess->getCount();
n < nCnt; ++n )
{
- ImplEESdrObject aObj( *this, *o3tl::doAccess<Reference<XShape>>(
+ ImplEESdrObject aObj( *o3tl::doAccess<Reference<XShape>>(
xXIndexAccess->getByIndex( n )) );
if( aObj.IsValid() )
{
@@ -250,7 +247,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100000 ); // no fill
aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90000 ); // no linestyle
- SdrObject* pObj = GetSdrObjectFromXShape( rObj.GetShapeRef() );
+ SdrObject* pObj = SdrObject::getSdrObjectFromXShape(rObj.GetShapeRef());
if ( pObj )
{
tools::Rectangle aBound = pObj->GetCurrentBoundRect();
@@ -371,10 +368,10 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
nEndAngle = *o3tl::doAccess<sal_Int32>(rObj.GetUsrAny());
Point aStart, aEnd, aCenter;
- aStart.setX( static_cast<sal_Int32>( cos( nStartAngle * F_PI18000 ) * 100.0 ) );
- aStart.setY( - static_cast<sal_Int32>( sin( nStartAngle * F_PI18000 ) * 100.0 ) );
- aEnd.setX( static_cast<sal_Int32>( cos( nEndAngle * F_PI18000 ) * 100.0 ) );
- aEnd.setY( - static_cast<sal_Int32>( sin( nEndAngle * F_PI18000 ) * 100.0 ) );
+ aStart.setX( static_cast<sal_Int32>( cos( basegfx::deg2rad<100>(nStartAngle) ) * 100.0 ) );
+ aStart.setY( - static_cast<sal_Int32>( sin( basegfx::deg2rad<100>(nStartAngle) ) * 100.0 ) );
+ aEnd.setX( static_cast<sal_Int32>( cos( basegfx::deg2rad<100>(nEndAngle) ) * 100.0 ) );
+ aEnd.setY( - static_cast<sal_Int32>( sin( basegfx::deg2rad<100>(nEndAngle) ) * 100.0 ) );
const tools::Rectangle& rRect = aRect100thmm;
aCenter.setX( rRect.Left() + ( rRect.GetWidth() / 2 ) );
aCenter.setY( rRect.Top() + ( rRect.GetHeight() / 2 ) );
@@ -421,8 +418,8 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
{
const Reference< XPropertySet > xPropSet = rObj.mXPropSet;
const Reference<XPropertySetInfo> xPropInfo = xPropSet.is() ? xPropSet->getPropertySetInfo() : Reference<XPropertySetInfo>();
- // This code is expected to be called only for DOCX format.
- if (xPropInfo.is())
+ // This code is expected to be called only for DOCX/XLSX formats.
+ if (xPropInfo.is() && bOOxmlExport)
{
bool bInline = false;
if (xPropInfo->hasPropertyByName("AnchorType"))
@@ -433,13 +430,17 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
}
mpEscherEx->OpenContainer( ESCHER_SpContainer );
- if(bInline)
+ nShapeType = bInline ? ESCHER_ShpInst_PictureFrame : ESCHER_ShpInst_HostControl;
+ const ShapeFlag nFlags = ShapeFlag::HaveShapeProperty | ShapeFlag::HaveAnchor;
+ nShapeID = rObj.GetShapeId();
+ if (nShapeID)
{
- addShape( ESCHER_ShpInst_PictureFrame, ShapeFlag::HaveShapeProperty | ShapeFlag::HaveAnchor );
+ mpEscherEx->AddShape(nShapeType, nFlags, nShapeID );
+ rSolverContainer.AddShape(rObj.GetShapeRef(), nShapeID);
}
else
{
- addShape( ESCHER_ShpInst_HostControl, ShapeFlag::HaveShapeProperty | ShapeFlag::HaveAnchor );
+ addShape(nShapeType, nFlags);
}
}
else
@@ -672,14 +673,14 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( SDRLAYER_NOTFOUND != mpEscherEx->GetHellLayerId() &&
rObj.ImplGetPropertyValue( "LayerID" ) &&
- *o3tl::doAccess<sal_uInt16>(rObj.GetUsrAny()) == sal_uInt8(mpEscherEx->GetHellLayerId()) )
+ *o3tl::doAccess<sal_Int16>(rObj.GetUsrAny()) == mpEscherEx->GetHellLayerId().get() )
{
aPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x200020 );
}
{
tools::Rectangle aRect( rObj.GetRect() );
- aRect.Justify();
+ aRect.Normalize();
rObj.SetRect( aRect );
}
@@ -834,18 +835,18 @@ void ImplEESdrWriter::ImplInitPageValues()
}
void ImplEESdrWriter::ImplWritePage(
- EscherSolverContainer& rSolverContainer )
+ EscherSolverContainer& rSolverContainer, bool ooxmlExport )
{
ImplInitPageValues();
const sal_uInt32 nShapes = mXShapes->getCount();
for( sal_uInt32 n = 0; n < nShapes; ++n )
{
- ImplEESdrObject aObj( *this, *o3tl::doAccess<Reference<XShape>>(
+ ImplEESdrObject aObj( *o3tl::doAccess<Reference<XShape>>(
mXShapes->getByIndex( n )) );
if( aObj.IsValid() )
{
- ImplWriteShape( aObj, rSolverContainer, true );
+ ImplWriteShape( aObj, rSolverContainer, ooxmlExport );
}
}
}
@@ -861,7 +862,7 @@ ImplEESdrWriter::~ImplEESdrWriter()
bool ImplEESdrWriter::ImplInitPage( const SdrPage& rPage )
{
- SvxDrawPage* pSvxDrawPage;
+ rtl::Reference<SvxDrawPage> pSvxDrawPage;
if ( mpSdrPage != &rPage || !mXDrawPage.is() )
{
// eventually write SolverContainer of current page, deletes the Solver
@@ -871,7 +872,7 @@ bool ImplEESdrWriter::ImplInitPage( const SdrPage& rPage )
Reference<css::lang::XComponent> xOldDrawPage(mXDrawPage, UNO_QUERY);
if (xOldDrawPage.is())
xOldDrawPage->dispose();
- mXDrawPage = pSvxDrawPage = new SvxFmDrawPage( const_cast<SdrPage*>(&rPage) );
+ mXDrawPage = pSvxDrawPage = new SvxDrawPage( const_cast<SdrPage*>(&rPage) );
mXShapes = mXDrawPage;
if ( !mXShapes.is() )
return false;
@@ -881,7 +882,7 @@ bool ImplEESdrWriter::ImplInitPage( const SdrPage& rPage )
mpSolverContainer.reset( new EscherSolverContainer );
}
else
- pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>(mXDrawPage);
+ pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>(mXDrawPage);
return pSvxDrawPage != nullptr;
}
@@ -924,10 +925,10 @@ void ImplEESdrWriter::ImplFlushSolverContainer()
}
}
-void ImplEESdrWriter::ImplWriteCurrentPage()
+void ImplEESdrWriter::ImplWriteCurrentPage(bool ooxmlExport)
{
assert(mpSolverContainer && "ImplEESdrWriter::ImplWriteCurrentPage: no SolverContainer");
- ImplWritePage( *mpSolverContainer );
+ ImplWritePage( *mpSolverContainer, ooxmlExport );
ImplExitPage();
}
@@ -937,21 +938,21 @@ sal_uInt32 ImplEESdrWriter::ImplWriteTheShape( ImplEESdrObject& rObj , bool ooxm
return ImplWriteShape( rObj, *mpSolverContainer, ooxmlExport );
}
-void EscherEx::AddSdrPage( const SdrPage& rPage )
+void EscherEx::AddSdrPage( const SdrPage& rPage, bool ooxmlExport )
{
if ( mpImplEESdrWriter->ImplInitPage( rPage ) )
- mpImplEESdrWriter->ImplWriteCurrentPage();
+ mpImplEESdrWriter->ImplWriteCurrentPage(ooxmlExport);
}
-void EscherEx::AddUnoShapes( const Reference< XShapes >& rxShapes )
+void EscherEx::AddUnoShapes( const Reference< XShapes >& rxShapes, bool ooxmlExport )
{
if ( mpImplEESdrWriter->ImplInitUnoShapes( rxShapes ) )
- mpImplEESdrWriter->ImplWriteCurrentPage();
+ mpImplEESdrWriter->ImplWriteCurrentPage(ooxmlExport);
}
-sal_uInt32 EscherEx::AddSdrObject( const SdrObject& rObj, bool ooxmlExport )
+sal_uInt32 EscherEx::AddSdrObject(const SdrObject& rObj, bool ooxmlExport, sal_uInt32 nId)
{
- ImplEESdrObject aObj( *mpImplEESdrWriter, rObj, mbOOXML );
+ ImplEESdrObject aObj(*mpImplEESdrWriter, rObj, mbOOXML , nId);
if( aObj.IsValid() )
return mpImplEESdrWriter->ImplWriteTheShape( aObj, ooxmlExport );
return 0;
@@ -991,21 +992,15 @@ sal_uInt32 EscherEx::AddDummyShape()
// static
const SdrObject* EscherEx::GetSdrObject( const Reference< XShape >& rShape )
{
- const SdrObject* pRet = nullptr;
- const SvxShape* pSvxShape = comphelper::getUnoTunnelImplementation<SvxShape>( rShape );
- DBG_ASSERT( pSvxShape, "EscherEx::GetSdrObject: no SvxShape" );
- if( pSvxShape )
- {
- pRet = pSvxShape->GetSdrObject();
- DBG_ASSERT( pRet, "EscherEx::GetSdrObject: no SdrObj" );
- }
+ const SdrObject* pRet = SdrObject::getSdrObjectFromXShape( rShape );
+ DBG_ASSERT( pRet, "EscherEx::GetSdrObject: no SdrObj" );
return pRet;
}
ImplEESdrObject::ImplEESdrObject( ImplEESdrWriter& rEx,
- const SdrObject& rObj, bool bOOXML ) :
- mnShapeId( 0 ),
+ const SdrObject& rObj, bool bOOXML, sal_uInt32 nId) :
+ mnShapeId(nId),
mnTextSize( 0 ),
mnAngle( 0 ),
mbValid( false ),
@@ -1020,12 +1015,11 @@ ImplEESdrObject::ImplEESdrObject( ImplEESdrWriter& rEx,
// why not declare a const parameter if the object will
// not be modified?
mXShape.set( const_cast<SdrObject*>(&rObj)->getUnoShape(), UNO_QUERY );
- Init( rEx );
+ Init();
}
}
-ImplEESdrObject::ImplEESdrObject( ImplEESdrWriter& rEx,
- const Reference< XShape >& rShape ) :
+ImplEESdrObject::ImplEESdrObject( const Reference< XShape >& rShape ) :
mXShape( rShape ),
mnShapeId( 0 ),
mnTextSize( 0 ),
@@ -1035,7 +1029,7 @@ ImplEESdrObject::ImplEESdrObject( ImplEESdrWriter& rEx,
mbEmptyPresObj( false ),
mbOOXML(false)
{
- Init( rEx );
+ Init();
}
@@ -1096,9 +1090,10 @@ static basegfx::B2DRange getUnrotatedGroupBoundRange(const Reference< XShape >&
aHomogenMatrix.set(1, 0, aMatrix.Line2.Column1);
aHomogenMatrix.set(1, 1, aMatrix.Line2.Column2);
aHomogenMatrix.set(1, 2, aMatrix.Line2.Column3);
- aHomogenMatrix.set(2, 0, aMatrix.Line3.Column1);
- aHomogenMatrix.set(2, 1, aMatrix.Line3.Column2);
- aHomogenMatrix.set(2, 2, aMatrix.Line3.Column3);
+ // For this to be a valid 2D transform matrix, the last row must be [0,0,1]
+ assert( aMatrix.Line3.Column1 == 0 );
+ assert( aMatrix.Line3.Column2 == 0 );
+ assert( aMatrix.Line3.Column3 == 1 );
basegfx::B2DVector aScale, aTranslate;
double fRotate, fShearX;
@@ -1146,7 +1141,7 @@ static basegfx::B2DRange getUnrotatedGroupBoundRange(const Reference< XShape >&
return aRetval;
}
-void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
+void ImplEESdrObject::Init()
{
mXPropSet.set( mXShape, UNO_QUERY );
if( !mXPropSet.is() )
@@ -1161,10 +1156,19 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
{
// if it's a group, the unrotated range is needed for that group
const basegfx::B2DRange aUnrotatedRange(getUnrotatedGroupBoundRange(mXShape));
- const Point aNewP(basegfx::fround(aUnrotatedRange.getMinX()), basegfx::fround(aUnrotatedRange.getMinY()));
- const Size aNewS(basegfx::fround(aUnrotatedRange.getWidth()), basegfx::fround(aUnrotatedRange.getHeight()));
+ if (aUnrotatedRange.isEmpty())
+ {
+ SetRect(tools::Rectangle());
+ }
+ else
+ {
+ const Point aNewP(basegfx::fround<tools::Long>(aUnrotatedRange.getMinX()),
+ basegfx::fround<tools::Long>(aUnrotatedRange.getMinY()));
+ const Size aNewS(basegfx::fround<tools::Long>(aUnrotatedRange.getWidth()),
+ basegfx::fround<tools::Long>(aUnrotatedRange.getHeight()));
- SetRect(rEx.ImplMapPoint(aNewP), rEx.ImplMapSize(aNewS));
+ SetRect(ImplEESdrWriter::ImplMapPoint(aNewP), ImplEESdrWriter::ImplMapSize(aNewS));
+ }
}
else
{
@@ -1172,7 +1176,7 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
const Point aOldP(mXShape->getPosition().X, mXShape->getPosition().Y);
const Size aOldS(mXShape->getSize().Width, mXShape->getSize().Height);
- SetRect(rEx.ImplMapPoint(aOldP), rEx.ImplMapSize(aOldS));
+ SetRect(ImplEESdrWriter::ImplMapPoint(aOldP), ImplEESdrWriter::ImplMapSize(aOldS));
}
if( ImplGetPropertyValue( "IsPresentationObject" ) )
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index fc1522c79dca..ae3fe91ec1cd 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -16,11 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_MSFILTER_ESCHESDO_HXX
-#define INCLUDED_FILTER_SOURCE_MSFILTER_ESCHESDO_HXX
+#pragma once
#include <filter/msfilter/escherex.hxx>
#include <o3tl/any.hxx>
-#include <vcl/mapmod.hxx>
// fractions of Draw PPTWriter etc.
@@ -43,12 +41,12 @@ class ImplEESdrObject
bool mbEmptyPresObj : 1;
bool mbOOXML;
- void Init( ImplEESdrWriter& rEx );
+ void Init();
public:
css::uno::Reference< css::beans::XPropertySet > mXPropSet;
- ImplEESdrObject( ImplEESdrWriter& rEx, const SdrObject& rObj, bool bOOXML );
- ImplEESdrObject( ImplEESdrWriter& rEx, const css::uno::Reference< css::drawing::XShape >& rShape );
+ ImplEESdrObject(ImplEESdrWriter& rEx, const SdrObject& rObj, bool bOOXML, sal_uInt32 nId = 0);
+ ImplEESdrObject( const css::uno::Reference< css::drawing::XShape >& rShape );
~ImplEESdrObject();
bool ImplGetPropertyValue( const OUString& rString );
@@ -101,8 +99,6 @@ class EscherExHostAppData;
class ImplEESdrWriter
{
EscherEx* mpEscherEx;
- MapMode maMapModeSrc;
- MapMode maMapModeDest;
css::uno::Reference< css::drawing::XDrawPage > mXDrawPage;
css::uno::Reference< css::drawing::XShapes > mXShapes;
SvStream* mpPicStrm;
@@ -113,7 +109,7 @@ class ImplEESdrWriter
std::unique_ptr<EscherSolverContainer> mpSolverContainer;
void ImplInitPageValues();
- void ImplWritePage( EscherSolverContainer& rSolver );
+ void ImplWritePage( EscherSolverContainer& rSolver, bool ooxmlExport );
sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj,
EscherSolverContainer& rSolver,
const bool bOOxmlExport = false ); // returns ShapeID
@@ -128,17 +124,15 @@ class ImplEESdrWriter
public:
explicit ImplEESdrWriter( EscherEx& rEx );
~ImplEESdrWriter();
- Point ImplMapPoint( const Point& rPoint );
- Size ImplMapSize( const Size& rSize );
+ static Point ImplMapPoint( const Point& rPoint );
+ static Size ImplMapSize( const Size& rSize );
EscherExHostAppData* ImplGetHostData() { return mpHostAppData; }
bool ImplInitPage( const SdrPage& rPage );
bool ImplInitUnoShapes( const css::uno::Reference< css::drawing::XShapes >& rxShapes );
- void ImplWriteCurrentPage();
+ void ImplWriteCurrentPage( bool ooxmlExport );
sal_uInt32 ImplWriteTheShape( ImplEESdrObject& rObj, bool ooxmlExport );
void ImplExitPage();
};
-#endif // INCLUDED_FILTER_SOURCE_MSFILTER_ESCHESDO_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx
index 50b282f8434b..376a453206fc 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -28,6 +28,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/docpasswordhelper.hxx>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <utility>
#define DEBUG_MSO_ENCRYPTION_STD97 0
@@ -127,7 +128,7 @@ MSCodec_Xor95::MSCodec_Xor95(int nRotateDistance) :
MSCodec_Xor95::~MSCodec_Xor95()
{
- (void)memset( mpnKey, 0, sizeof( mpnKey ) );
+ memset( mpnKey, 0, sizeof( mpnKey ) );
mnKey = mnHash = 0;
}
@@ -136,7 +137,7 @@ void MSCodec_Xor95::InitKey( const sal_uInt8 pnPassData[ 16 ] )
mnKey = lclGetKey( pnPassData, 16 );
mnHash = lclGetHash( pnPassData, 16 );
- (void)memcpy( mpnKey, pnPassData, 16 );
+ memcpy( mpnKey, pnPassData, 16 );
static const sal_uInt8 spnFillChars[] =
{
@@ -170,7 +171,7 @@ bool MSCodec_Xor95::InitCodec( const uno::Sequence< beans::NamedValue >& aData )
if ( aKey.getLength() == 16 )
{
- (void)memcpy( mpnKey, aKey.getConstArray(), 16 );
+ memcpy( mpnKey, aKey.getConstArray(), 16 );
bResult = true;
mnKey = static_cast<sal_uInt16>(aHashData.getUnpackedValueOrDefault("XOR95BaseKey", sal_Int16(0) ));
@@ -185,6 +186,7 @@ bool MSCodec_Xor95::InitCodec( const uno::Sequence< beans::NamedValue >& aData )
uno::Sequence< beans::NamedValue > MSCodec_Xor95::GetEncryptionData()
{
::comphelper::SequenceAsHashMap aHashData;
+ // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence
aHashData[ OUString( "XOR95EncryptionKey" ) ] <<= uno::Sequence<sal_Int8>( reinterpret_cast<sal_Int8*>(mpnKey), 16 );
aHashData[ OUString( "XOR95BaseKey" ) ] <<= static_cast<sal_Int16>(mnKey);
aHashData[ OUString( "XOR95PasswordHash" ) ] <<= static_cast<sal_Int16>(mnHash);
@@ -245,8 +247,8 @@ void MSCodec_Xor95::Skip( std::size_t nBytes )
mnOffset = (mnOffset + nBytes) & 0x0F;
}
-MSCodec97::MSCodec97(size_t nHashLen, const OUString& rEncKeyName)
- : m_sEncKeyName(rEncKeyName)
+MSCodec97::MSCodec97(size_t nHashLen, OUString aEncKeyName)
+ : m_sEncKeyName(std::move(aEncKeyName))
, m_nHashLen(nHashLen)
, m_hCipher(rtl_cipher_create(rtl_Cipher_AlgorithmARCFOUR, rtl_Cipher_ModeStream))
, m_aDocId(16, 0)
@@ -269,8 +271,8 @@ MSCodec_CryptoAPI::MSCodec_CryptoAPI()
MSCodec97::~MSCodec97()
{
- (void)memset(m_aDigestValue.data(), 0, m_aDigestValue.size());
- (void)memset(m_aDocId.data(), 0, m_aDocId.size());
+ memset(m_aDigestValue.data(), 0, m_aDigestValue.size());
+ memset(m_aDocId.data(), 0, m_aDocId.size());
rtl_cipher_destroy(m_hCipher);
}
@@ -306,12 +308,12 @@ bool MSCodec97::InitCodec( const uno::Sequence< beans::NamedValue >& aData )
if (nKeyLen == m_nHashLen)
{
assert(m_aDigestValue.size() == m_nHashLen);
- (void)memcpy(m_aDigestValue.data(), aKey.getConstArray(), m_nHashLen);
+ memcpy(m_aDigestValue.data(), aKey.getConstArray(), m_nHashLen);
uno::Sequence< sal_Int8 > aUniqueID = aHashData.getUnpackedValueOrDefault("STD97UniqueID", uno::Sequence< sal_Int8 >() );
if ( aUniqueID.getLength() == 16 )
{
assert(m_aDocId.size() == static_cast<size_t>(aUniqueID.getLength()));
- (void)memcpy(m_aDocId.data(), aUniqueID.getConstArray(), m_aDocId.size());
+ memcpy(m_aDocId.data(), aUniqueID.getConstArray(), m_aDocId.size());
bResult = true;
lcl_PrintDigest(m_aDigestValue.data(), "digest value");
lcl_PrintDigest(m_aDocId.data(), "DocId value");
@@ -347,13 +349,13 @@ void MSCodec_Std97::InitKey (
const size_t nKeyLen = aKey.getLength();
if (m_aDigestValue.size() == nKeyLen)
- (void)memcpy(m_aDigestValue.data(), aKey.getConstArray(), m_aDigestValue.size());
+ memcpy(m_aDigestValue.data(), aKey.getConstArray(), m_aDigestValue.size());
else
memset(m_aDigestValue.data(), 0, m_aDigestValue.size());
lcl_PrintDigest(m_aDigestValue.data(), "digest value");
- (void)memcpy (m_aDocId.data(), pDocId, 16);
+ memcpy (m_aDocId.data(), pDocId, 16);
lcl_PrintDigest(m_aDocId.data(), "DocId value");
}
@@ -382,7 +384,7 @@ void MSCodec_CryptoAPI::InitKey (
lcl_PrintDigest(m_aDigestValue.data(), "digest value");
- (void)memcpy(m_aDocId.data(), pDocId, 16);
+ memcpy(m_aDocId.data(), pDocId, 16);
lcl_PrintDigest(m_aDocId.data(), "DocId value");
@@ -437,7 +439,7 @@ bool MSCodec_Std97::InitCipher(sal_uInt32 nCounter)
sal_uInt8 pKeyData[64] = {}; // 512-bit message block
// Fill 40 bit of DigestValue into [0..4].
- (void)memcpy (pKeyData, m_aDigestValue.data(), 5);
+ memcpy (pKeyData, m_aDigestValue.data(), 5);
// Fill counter into [5..8].
pKeyData[ 5] = sal_uInt8((nCounter >> 0) & 0xff);
@@ -506,7 +508,7 @@ void MSCodec_Std97::CreateSaltDigest( const sal_uInt8 nSaltData[16], sal_uInt8 n
rtl_cipher_decode (
m_hCipher, pDigest, 16, pDigest, sizeof(pDigest));
- (void)memcpy(nSaltDigest, pDigest, 16);
+ memcpy(nSaltDigest, pDigest, 16);
}
}
@@ -559,7 +561,7 @@ void MSCodec_Std97::GetDigestFromSalt(const sal_uInt8* pSaltData, sal_uInt8* pDi
pBuffer[16] = 0x80;
// erase the rest of the buffer with zeros.
- (void)memset (pBuffer + 17, 0, sizeof(pBuffer) - 17);
+ memset (pBuffer + 17, 0, sizeof(pBuffer) - 17);
// set the 441st bit.
pBuffer[56] = 0x80;
@@ -587,10 +589,10 @@ void MSCodec_Std97::GetEncryptKey (
rtl_cipher_encode (
m_hCipher, pSalt, 16, pSaltData, sizeof(pBuffer));
- (void)memcpy( pBuffer, pSalt, 16 );
+ memcpy( pBuffer, pSalt, 16 );
pBuffer[16] = 0x80;
- (void)memset (pBuffer + 17, 0, sizeof(pBuffer) - 17);
+ memset (pBuffer + 17, 0, sizeof(pBuffer) - 17);
pBuffer[56] = 0x80;
rtl_digest_updateMD5 (
@@ -608,7 +610,7 @@ void MSCodec_Std97::GetEncryptKey (
void MSCodec97::GetDocId( sal_uInt8 pDocId[16] )
{
assert(m_aDocId.size() == 16);
- (void)memcpy(pDocId, m_aDocId.data(), 16);
+ memcpy(pDocId, m_aDocId.data(), 16);
}
EncryptionStandardHeader::EncryptionStandardHeader()
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 91b36b230129..702e14d64d89 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -23,6 +23,7 @@
#include <math.h>
#include <limits>
#include <limits.h>
+#include <utility>
#include <vector>
#include <o3tl/any.hxx>
@@ -34,7 +35,7 @@
#include <comphelper/classids.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <unotools/configmgr.hxx>
+#include <comphelper/configuration.hxx>
#include <unotools/streamwrap.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
@@ -53,8 +54,9 @@
// SvxItem-Mapping. Is needed to successfully include the SvxItem-Header
#include <editeng/eeitem.hxx>
#include <editeng/editdata.hxx>
-#include <tools/stream.hxx>
+#include <tools/bigint.hxx>
#include <tools/debug.hxx>
+#include <tools/stream.hxx>
#include <tools/zcodec.hxx>
#include <filter/msfilter/escherex.hxx>
#include <basegfx/numeric/ftools.hxx>
@@ -72,6 +74,7 @@
#include <sfx2/fcontnr.hxx>
#include <svx/xbtmpit.hxx>
#include <svx/xsflclit.hxx>
+#include <svx/xfilluseslidebackgrounditem.hxx>
#include <svx/xflgrit.hxx>
#include <svx/xflftrit.hxx>
#include <svx/sdgcpitm.hxx>
@@ -149,6 +152,7 @@
#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeMetalType.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -167,14 +171,26 @@ using namespace container ;
// static counter for OLE-Objects
static sal_uInt32 nMSOleObjCntr = 0;
-#define MSO_OLE_Obj "MSO_OLE_Obj"
+constexpr OUString MSO_OLE_Obj = u"MSO_OLE_Obj"_ustr;
namespace {
+/* Office File Formats - 2.2.23 */
+enum class OfficeArtBlipRecInstance : sal_uInt32
+{
+ EMF = 0x3D4, // defined in section 2.2.24.
+ WMF = 0x216, // defined in section 2.2.25.
+ PICT = 0x542, // as defined in section 2.2.26.
+ JPEG_RGB = 0x46A, // defined in section 2.2.27.
+ JPEG_CMYK = 0x6E2, // defined in section 2.2.27.
+ PNG = 0x6E0, // defined in section 2.2.28.
+ DIB = 0x7A8, // defined in section 2.2.29.
+ TIFF = 0x6E4 // defined in section 2.2.30.
+};
struct SvxMSDffBLIPInfo
{
- sal_uLong nFilePos; ///< offset of the BLIP in data stream
- explicit SvxMSDffBLIPInfo(sal_uLong nFPos)
+ sal_uInt32 nFilePos; ///< offset of the BLIP in data stream
+ explicit SvxMSDffBLIPInfo(sal_uInt32 nFPos)
: nFilePos(nFPos)
{
}
@@ -422,23 +438,23 @@ SvStream& ReadSvxMSDffSolverContainer( SvStream& rIn, SvxMSDffSolverContainer& r
{
DffRecordHeader aHd;
bool bOk = ReadDffRecordHeader( rIn, aHd );
- if (bOk && aHd.nRecType == DFF_msofbtSolverContainer)
+ if (!bOk || aHd.nRecType != DFF_msofbtSolverContainer)
+ return rIn;
+
+ DffRecordHeader aCRule;
+ auto nEndPos = DffPropSet::SanitizeEndPos(rIn, aHd.GetRecEndFilePos());
+ while ( rIn.good() && ( rIn.Tell() < nEndPos ) )
{
- DffRecordHeader aCRule;
- auto nEndPos = DffPropSet::SanitizeEndPos(rIn, aHd.GetRecEndFilePos());
- while ( rIn.good() && ( rIn.Tell() < nEndPos ) )
+ if (!ReadDffRecordHeader(rIn, aCRule))
+ break;
+ if ( aCRule.nRecType == DFF_msofbtConnectorRule )
{
- if (!ReadDffRecordHeader(rIn, aCRule))
- break;
- if ( aCRule.nRecType == DFF_msofbtConnectorRule )
- {
- std::unique_ptr<SvxMSDffConnectorRule> pRule(new SvxMSDffConnectorRule);
- rIn >> *pRule;
- rContainer.aCList.push_back( std::move(pRule) );
- }
- if (!aCRule.SeekToEndOfRecord(rIn))
- break;
+ std::unique_ptr<SvxMSDffConnectorRule> pRule(new SvxMSDffConnectorRule);
+ rIn >> *pRule;
+ rContainer.aCList.push_back( std::move(pRule) );
}
+ if (!aCRule.SeekToEndOfRecord(rIn))
+ break;
}
return rIn;
}
@@ -481,16 +497,16 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
if( nInventor == SdrInventor::Default )
{
bool bValidGluePoint = false;
- sal_uInt32 nObjId = pO->GetObjIdentifier();
+ SdrObjKind nObjId = pO->GetObjIdentifier();
switch( nObjId )
{
- case OBJ_GRUP :
- case OBJ_GRAF :
- case OBJ_RECT :
- case OBJ_TEXT :
- case OBJ_PAGE :
- case OBJ_TITLETEXT :
- case OBJ_OUTLINETEXT :
+ case SdrObjKind::Group :
+ case SdrObjKind::Graphic :
+ case SdrObjKind::Rectangle :
+ case SdrObjKind::Text :
+ case SdrObjKind::Page :
+ case SdrObjKind::TitleText :
+ case SdrObjKind::OutlineText :
{
if ( nC & 1 )
{
@@ -521,17 +537,15 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
bValidGluePoint = true;
}
break;
- case OBJ_POLY :
- case OBJ_PLIN :
- case OBJ_LINE :
- case OBJ_PATHLINE :
- case OBJ_PATHFILL :
- case OBJ_FREELINE :
- case OBJ_FREEFILL :
- case OBJ_SPLNLINE :
- case OBJ_SPLNFILL :
- case OBJ_PATHPOLY :
- case OBJ_PATHPLIN :
+ case SdrObjKind::Polygon :
+ case SdrObjKind::PolyLine :
+ case SdrObjKind::Line :
+ case SdrObjKind::PathLine :
+ case SdrObjKind::PathFill :
+ case SdrObjKind::FreehandLine :
+ case SdrObjKind::FreehandFill :
+ case SdrObjKind::PathPoly :
+ case SdrObjKind::PathPolyLine :
{
if (pList)
{
@@ -597,11 +611,11 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
}
break;
- case OBJ_CUSTOMSHAPE :
+ case SdrObjKind::CustomShape :
{
const SfxPoolItem& aCustomShape = static_cast<SdrObjCustomShape*>(pO)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(aCustomShape) );
- const OUString sPath( "Path" );
+ static constexpr OUString sPath( u"Path"_ustr );
sal_Int16 nGluePointType = EnhancedCustomShapeGluePointType::SEGMENTS;
css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sPath, "GluePointType" );
if ( pAny )
@@ -719,19 +733,20 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
if ( nPt < o3tl::make_unsigned(aCoordinates.getLength()) )
{
nId = 4;
- css::drawing::EnhancedCustomShapeParameterPair& rPara = aCoordinates[ nPt ];
+ css::drawing::EnhancedCustomShapeParameterPair& rPara = aCoordinates.getArray()[ nPt ];
sal_Int32 nX = 0, nY = 0;
if ( ( rPara.First.Value >>= nX ) && ( rPara.Second.Value >>= nY ) )
{
- const OUString sGluePoints( "GluePoints" );
+ static constexpr OUString sGluePoints( u"GluePoints"_ustr );
css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > aGluePoints;
pAny = aGeometryItem.GetPropertyValueByName( sPath, sGluePoints );
if ( pAny )
*pAny >>= aGluePoints;
sal_Int32 nGluePoints = aGluePoints.getLength();
aGluePoints.realloc( nGluePoints + 1 );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ nGluePoints ].First, nX );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ nGluePoints ].Second, nY );
+ auto pGluePoints = aGluePoints.getArray();
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( pGluePoints[ nGluePoints ].First, nX );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( pGluePoints[ nGluePoints ].Second, nY );
PropertyValue aProp;
aProp.Name = sGluePoints;
aProp.Value <<= aGluePoints;
@@ -747,6 +762,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
}
}
break;
+ default: ;
}
if ( bValidGluePoint )
{
@@ -1076,7 +1092,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh
basegfx::B2DPolyPolygon aPolyPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLength, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows ));
rSet.Put( XLineStartWidthItem( nArrowWidth ) );
- rSet.Put( XLineStartItem( aArrowName, aPolyPoly) );
+ rSet.Put( XLineStartItem( std::move(aArrowName), std::move(aPolyPoly) ) );
rSet.Put( XLineStartCenterItem( bArrowCenter ) );
}
@@ -1094,7 +1110,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh
basegfx::B2DPolyPolygon aPolyPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLength, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows ));
rSet.Put( XLineEndWidthItem( nArrowWidth ) );
- rSet.Put( XLineEndItem( aArrowName, aPolyPoly ) );
+ rSet.Put( XLineEndItem( std::move(aArrowName), std::move(aPolyPoly) ) );
rSet.Put( XLineEndCenterItem( bArrowCenter ) );
}
}
@@ -1292,7 +1308,7 @@ static void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, S
if ( bRotateWithShape )
{
// convert from 100th to 10th degrees
- aBitmapEx.Rotate( toDegree10(nFix16Angle), rShadeColors[ 0 ].aColor );
+ aBitmapEx.Rotate( to<Degree10>(nFix16Angle), rShadeColors[ 0 ].aColor );
BmpMirrorFlags nMirrorFlags = BmpMirrorFlags::NONE;
if ( rObjData.nSpFlags & ShapeFlag::FlipV )
@@ -1323,6 +1339,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
if ( nFillFlags & 0x10 )
{
auto eMSO_FillType = GetPropertyValue(DFF_Prop_fillType, mso_fillSolid);
+ bool bUseSlideBackground = false;
drawing::FillStyle eXFill = drawing::FillStyle_NONE;
switch( eMSO_FillType )
{
@@ -1351,7 +1368,10 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
case mso_fillShadeTitle : // special type - shade to title --- for PP
eXFill = drawing::FillStyle_GRADIENT;
break;
-// case mso_fillBackground : // Use the background fill color/pattern
+ case mso_fillBackground : // Use the background fill color/pattern
+ eXFill = drawing::FillStyle_NONE;
+ bUseSlideBackground = true;
+ break;
default: break;
}
rSet.Put( XFillStyleItem( eXFill ) );
@@ -1395,7 +1415,9 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
if ( eMSO_FillType == mso_fillPattern )
{
Bitmap aBmp( aGraf.GetBitmapEx().GetBitmap() );
- if( aBmp.GetSizePixel().Width() == 8 && aBmp.GetSizePixel().Height() == 8 && aBmp.GetColorCount() == 2)
+ if (aBmp.GetSizePixel().Width() == 8 &&
+ aBmp.GetSizePixel().Height() == 8 &&
+ aBmp.getPixelFormat() == vcl::PixelFormat::N8_BPP)
{
Color aCol1( COL_WHITE ), aCol2( COL_WHITE );
@@ -1408,7 +1430,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
// Create a bitmap for the pattern with expected colors
vcl::bitmap::RawBitmap aResult(Size(8, 8), 24);
{
- Bitmap::ScopedReadAccess pRead(aBmp);
+ BitmapScopedReadAccess pRead(aBmp);
for (tools::Long y = 0; y < aResult.Height(); ++y)
{
@@ -1443,12 +1465,18 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
}
else
{
- rSet.Put(XFillBitmapItem(OUString(), aGraf));
+ rSet.Put(XFillBitmapItem(OUString(), std::move(aGraf)));
rSet.Put(XFillBmpTileItem(false));
}
}
}
}
+ else if (eXFill == drawing::FillStyle_NONE && bUseSlideBackground)
+ {
+ rSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
+ XFillUseSlideBackgroundItem aFillBgItem(true);
+ rSet.Put(aFillBgItem);
+ }
}
else
rSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
@@ -1671,14 +1699,20 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aExtrusionPropVec.push_back( aProp );
// "Brightness"
+ // MS Office default 0x00004E20 16.16 FixedPoint, 20000/65536=0.30517, ODF default 33%.
+ // Thus must set value even if default.
+ double fBrightness = 20000.0;
if ( IsProperty( DFF_Prop_c3DAmbientIntensity ) )
{
- double fBrightness = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DAmbientIntensity, 0 ));
- fBrightness /= 655.36;
- aProp.Name = "Brightness";
- aProp.Value <<= fBrightness;
- aExtrusionPropVec.push_back( aProp );
+ // Value must be in range 0.0 to 1.0 in MS Office binary specification, but larger
+ // values are in fact interpreted.
+ fBrightness = GetPropertyValue( DFF_Prop_c3DAmbientIntensity, 0 );
}
+ fBrightness /= 655.36;
+ aProp.Name = "Brightness";
+ aProp.Value <<= fBrightness;
+ aExtrusionPropVec.push_back( aProp );
+
// "Depth" in 1/100mm
if ( IsProperty( DFF_Prop_c3DExtrudeBackward ) || IsProperty( DFF_Prop_c3DExtrudeForward ) )
{
@@ -1696,14 +1730,17 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aExtrusionPropVec.push_back( aProp );
}
// "Diffusion"
+ // ODF default is 0%, MS Office default is 100%. Thus must set value even if default.
+ double fDiffusion = 100;
if ( IsProperty( DFF_Prop_c3DDiffuseAmt ) )
{
- double fDiffusion = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DDiffuseAmt, 0 ));
+ fDiffusion = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DDiffuseAmt, 0 ));
fDiffusion /= 655.36;
- aProp.Name = "Diffusion";
- aProp.Value <<= fDiffusion;
- aExtrusionPropVec.push_back( aProp );
}
+ aProp.Name = "Diffusion";
+ aProp.Value <<= fDiffusion;
+ aExtrusionPropVec.push_back( aProp );
+
// "NumberOfLineSegments"
if ( IsProperty( DFF_Prop_c3DTolerance ) )
{
@@ -1726,24 +1763,35 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aProp.Name = "SecondLightHarsh";
aProp.Value <<= bExtrusionSecondLightHarsh;
aExtrusionPropVec.push_back( aProp );
+
// "FirstLightLevel"
+ // MS Office default 0x00009470 16.16 FixedPoint, 38000/65536 = 0.5798, ODF default 66%.
+ // Thus must set value even if default.
+ double fFirstLightLevel = 38000.0;
if ( IsProperty( DFF_Prop_c3DKeyIntensity ) )
{
- double fFirstLightLevel = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DKeyIntensity, 0 ));
- fFirstLightLevel /= 655.36;
- aProp.Name = "FirstLightLevel";
- aProp.Value <<= fFirstLightLevel;
- aExtrusionPropVec.push_back( aProp );
+ // value<0 and value>1 are allowed in MS Office. Clamp such in ODF export, not here.
+ fFirstLightLevel = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DKeyIntensity, 0 ));
}
+ fFirstLightLevel /= 655.36;
+ aProp.Name = "FirstLightLevel";
+ aProp.Value <<= fFirstLightLevel;
+ aExtrusionPropVec.push_back( aProp );
+
// "SecondLightLevel"
+ // MS Office default 0x00009470 16.16 FixedPoint, 38000/65536 = 0.5798, ODF default 66%.
+ // Thus must set value even if default.
+ double fSecondLightLevel = 38000.0;
if ( IsProperty( DFF_Prop_c3DFillIntensity ) )
{
- double fSecondLightLevel = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DFillIntensity, 0 ));
- fSecondLightLevel /= 655.36;
- aProp.Name = "SecondLightLevel";
- aProp.Value <<= fSecondLightLevel;
- aExtrusionPropVec.push_back( aProp );
+ // value<0 and value>1 are allowed in MS Office. Clamp such in ODF export, not here.
+ fSecondLightLevel = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DFillIntensity, 0 ));
}
+ fSecondLightLevel /= 655.36;
+ aProp.Name = "SecondLightLevel";
+ aProp.Value <<= fSecondLightLevel;
+ aExtrusionPropVec.push_back( aProp );
+
// "FirstLightDirection"
if ( IsProperty( DFF_Prop_c3DKeyX ) || IsProperty( DFF_Prop_c3DKeyY ) || IsProperty( DFF_Prop_c3DKeyZ ) )
{
@@ -1772,6 +1820,10 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aProp.Name = "Metal";
aProp.Value <<= bExtrusionMetal;
aExtrusionPropVec.push_back( aProp );
+ aProp.Name = "MetalType";
+ aProp.Value <<= css::drawing::EnhancedCustomShapeMetalType::MetalMSCompatible;
+ aExtrusionPropVec.push_back(aProp);
+
// "ShadeMode"
if ( IsProperty( DFF_Prop_c3DRenderMode ) )
{
@@ -1784,7 +1836,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aProp.Value <<= eExtrusionShadeMode;
aExtrusionPropVec.push_back( aProp );
}
- // "RotateAngle" in Grad
+ // "RotateAngle" in Degree
if ( IsProperty( DFF_Prop_c3DXRotationAngle ) || IsProperty( DFF_Prop_c3DYRotationAngle ) )
{
double fAngleX = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DXRotationAngle, 0 ))) / 65536.0;
@@ -1805,9 +1857,10 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
// "RotationCenter"
if ( IsProperty( DFF_Prop_c3DRotationCenterX ) || IsProperty( DFF_Prop_c3DRotationCenterY ) || IsProperty( DFF_Prop_c3DRotationCenterZ ) )
{
+ // tdf#145904 X- and Y-component is fraction, Z-component in EMU
css::drawing::Direction3D aRotationCenter(
- static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DRotationCenterX, 0 ))) / 360.0,
- static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DRotationCenterY, 0 ))) / 360.0,
+ static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DRotationCenterX, 0 ))) / 65536.0,
+ static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DRotationCenterY, 0 ))) / 65536.0,
static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DRotationCenterZ, 0 ))) / 360.0 );
aProp.Name = "RotationCenter";
@@ -1816,34 +1869,44 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
}
}
// "Shininess"
+ // MS Office default 5, ODF default 50%.
if ( IsProperty( DFF_Prop_c3DShininess ) )
{
double fShininess = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DShininess, 0 ));
- fShininess /= 655.36;
+ fShininess *= 10.0; // error in [MS ODRAW] (2021), type is not FixedPoint but long.
aProp.Name = "Shininess";
aProp.Value <<= fShininess;
aExtrusionPropVec.push_back( aProp );
}
+
// "Skew"
+ // MS Office angle file value is 16.16 FixedPoint, default 0xFF790000,
+ // -8847360/65536=-135, ODF default 45. Thus must set value even if default.
+ double fSkewAngle = -135.0;
+ // MS Office amount file value is signed integer in range 0xFFFFFF9C to 0x00000064,
+ // default 0x00000032, ODF default 50.0
+ double fSkewAmount = 50.0;
if ( IsProperty( DFF_Prop_c3DSkewAmount ) || IsProperty( DFF_Prop_c3DSkewAngle ) )
{
- double fSkewAmount = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DSkewAmount, 50 ));
- double fSkewAngle = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DSkewAngle, sal::static_int_cast< sal_uInt32 >(-135 * 65536) ))) / 65536.0;
+ fSkewAmount = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DSkewAmount, 50 ));
+ fSkewAngle = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DSkewAngle, sal::static_int_cast< sal_uInt32 >(-135 * 65536) ));
+ fSkewAngle /= 65536.0;
+ }
+ EnhancedCustomShapeParameterPair aSkewPair;
+ aSkewPair.First.Value <<= fSkewAmount;
+ aSkewPair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
+ aSkewPair.Second.Value <<= fSkewAngle;
+ aSkewPair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
+ aProp.Name = "Skew";
+ aProp.Value <<= aSkewPair;
+ aExtrusionPropVec.push_back( aProp );
- EnhancedCustomShapeParameterPair aSkewPair;
- aSkewPair.First.Value <<= fSkewAmount;
- aSkewPair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
- aSkewPair.Second.Value <<= fSkewAngle;
- aSkewPair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
- aProp.Name = "Skew";
- aProp.Value <<= aSkewPair;
- aExtrusionPropVec.push_back( aProp );
- }
// "Specularity"
+ // Type Fixed point 16.16, percent in API
if ( IsProperty( DFF_Prop_c3DSpecularAmt ) )
{
double fSpecularity = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DSpecularAmt, 0 ));
- fSpecularity /= 1333;
+ fSpecularity /= 655.36;
aProp.Name = "Specularity";
aProp.Value <<= fSpecularity;
aExtrusionPropVec.push_back( aProp );
@@ -1855,16 +1918,22 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aExtrusionPropVec.push_back( aProp );
// "ViewPoint" in 1/100mm
+ // MS Office default 1250000 EMU=3472.222 Hmm, ODF default 3.5cm
+ // Thus must set value even if default.
+ double fViewX = 1250000.0 / 360.0;
+ double fViewY = -1250000.0 / 360.0;;
+ double fViewZ = 9000000.0 / 360.0;
if ( IsProperty( DFF_Prop_c3DXViewpoint ) || IsProperty( DFF_Prop_c3DYViewpoint ) || IsProperty( DFF_Prop_c3DZViewpoint ) )
{
- double fViewX = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DXViewpoint, 1250000 ))) / 360.0;
- double fViewY = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DYViewpoint, sal_uInt32(-1250000) )))/ 360.0;
- double fViewZ = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DZViewpoint, 9000000 ))) / 360.0;
- css::drawing::Position3D aExtrusionViewPoint( fViewX, fViewY, fViewZ );
- aProp.Name = "ViewPoint";
- aProp.Value <<= aExtrusionViewPoint;
- aExtrusionPropVec.push_back( aProp );
+ fViewX = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DXViewpoint, 1250000 ))) / 360.0;
+ fViewY = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DYViewpoint, sal_uInt32(-1250000) )))/ 360.0;
+ fViewZ = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DZViewpoint, 9000000 ))) / 360.0;
}
+ css::drawing::Position3D aExtrusionViewPoint( fViewX, fViewY, fViewZ );
+ aProp.Name = "ViewPoint";
+ aProp.Value <<= aExtrusionViewPoint;
+ aExtrusionPropVec.push_back( aProp );
+
// "Origin"
if ( IsProperty( DFF_Prop_c3DOriginX ) || IsProperty( DFF_Prop_c3DOriginY ) )
{
@@ -1911,12 +1980,12 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if ( nNumElem <= 128 )
{
uno::Sequence< OUString > aEquations( nNumElem );
- for ( sal_uInt16 i = 0; i < nNumElem; i++ )
+ for ( auto& rEquation : asNonConstRange(aEquations) )
{
sal_Int16 nP1(0), nP2(0), nP3(0);
sal_uInt16 nFlags(0);
rIn.ReadUInt16( nFlags ).ReadInt16( nP1 ).ReadInt16( nP2 ).ReadInt16( nP3 );
- aEquations[ i ] = EnhancedCustomShape2d::GetEquation( nFlags, nP1, nP2, nP3 );
+ rEquation = EnhancedCustomShape2d::GetEquation( nFlags, nP1, nP2, nP3 );
}
// pushing the whole Equations element
aProp.Name = "Equations";
@@ -1947,6 +2016,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if (bImport)
{
uno::Sequence< beans::PropertyValues > aHandles( nNumElem );
+ auto aHandlesRange = asNonConstRange(aHandles);
for (sal_uInt32 i = 0; i < nNumElem; ++i)
{
PropVec aHandlePropVec;
@@ -2093,7 +2163,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
}
if ( !aHandlePropVec.empty() )
{
- aHandles[ i ] = comphelper::containerToSequence(aHandlePropVec);
+ aHandlesRange[ i ] = comphelper::containerToSequence(aHandlePropVec);
}
}
// pushing the whole Handles element
@@ -2105,12 +2175,13 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
else
{
const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( rObjData.eShapeType );
- if ( pDefCustomShape && pDefCustomShape->nHandles && pDefCustomShape->pHandles )
+ if (pDefCustomShape && !pDefCustomShape->pHandles.empty())
{
- sal_uInt32 i, nCnt = pDefCustomShape->nHandles;
- const SvxMSDffHandle* pData = pDefCustomShape->pHandles;
- for ( i = 0; i < nCnt; i++, pData++ )
+ // TODO: This is very similar to EscherPropertyContainer::LookForPolarHandles
+ sal_uInt32 i, nCnt = pDefCustomShape->pHandles.size();
+ for (i = 0; i < nCnt; i++)
{
+ const SvxMSDffHandle* pData = &pDefCustomShape->pHandles[i];
if ( pData->nFlags & SvxMSDffHandleFlags::POLAR )
{
if ( ( pData->nPositionY >= 0x256 ) || ( pData->nPositionY <= 0x107 ) )
@@ -2170,7 +2241,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if (bImport)
{
aCoordinates.realloc( nNumElemVert );
- for (sal_uInt16 i = 0; i < nNumElemVert; ++i)
+ for (auto& rCoordinate : asNonConstRange(aCoordinates))
{
sal_Int32 nX(0), nY(0);
@@ -2201,8 +2272,8 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
nY = nTmpB;
}
}
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aCoordinates[ i ].First, nX );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aCoordinates[ i ].Second, nY );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( rCoordinate.First, nX );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( rCoordinate.Second, nY );
}
}
aProp.Name = "Coordinates";
@@ -2231,7 +2302,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if ( nNumElemSeg )
{
aSegments.realloc( nNumElemSeg );
- for (sal_uInt16 i = 0; i < nNumElemSeg; ++i)
+ for (auto& rSegment : asNonConstRange(aSegments))
{
sal_uInt16 nTmp(0);
rIn.ReadUInt16( nTmp );
@@ -2331,8 +2402,8 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
// if the command is unknown, we will store all the data in nCnt, so it will be possible to export without loss
if ( nCommand == EnhancedCustomShapeSegmentCommand::UNKNOWN )
nCnt = static_cast<sal_Int16>(nTmp);
- aSegments[ i ].Command = nCommand;
- aSegments[ i ].Count = nCnt;
+ rSegment.Command = nCommand;
+ rSegment.Count = nCnt;
}
}
aProp.Name = "Segments";
@@ -2375,7 +2446,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if (bImport)
{
css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame > aTextFrames( nNumElem );
- for (sal_uInt16 i = 0; i < nNumElem; ++i)
+ for (auto& rTextFrame : asNonConstRange(aTextFrames))
{
sal_Int32 nLeft(0), nTop(0), nRight(0), nBottom(0);
@@ -2384,10 +2455,10 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
.ReadInt32( nRight )
.ReadInt32( nBottom );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrames[ i ].TopLeft.First, nLeft );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrames[ i ].TopLeft.Second, nTop );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrames[ i ].BottomRight.First, nRight );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrames[ i ].BottomRight.Second, nBottom);
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( rTextFrame.TopLeft.First, nLeft );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( rTextFrame.TopLeft.Second, nTop );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( rTextFrame.BottomRight.First, nRight );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( rTextFrame.BottomRight.Second, nBottom);
}
aProp.Name = "TextFrames";
aProp.Value <<= aTextFrames;
@@ -2416,7 +2487,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if (bImport)
{
aGluePoints.realloc( nNumElemVert );
- for (sal_uInt16 i = 0; i < nNumElemVert; ++i)
+ for (auto& rGluePoint : asNonConstRange(aGluePoints))
{
sal_Int32 nX(0), nY(0);
if ( nElemSizeVert == 8 )
@@ -2434,8 +2505,8 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
nX = nTmpA;
nY = nTmpB;
}
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].First, nX );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].Second, nY );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( rGluePoint.First, nX );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( rGluePoint.Second, nY );
}
}
aProp.Name = "GluePoints";
@@ -2527,6 +2598,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if ( nAdjustmentValues )
{
uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq( nAdjustmentValues );
+ auto pAdjustmentSeq = aAdjustmentSeq.getArray();
while( --nAdjustmentValues >= 0 )
{
sal_Int32 nValue = 0;
@@ -2540,11 +2612,11 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
{
double fValue = nValue;
fValue /= 65536;
- aAdjustmentSeq[ nAdjustmentValues ].Value <<= fValue;
+ pAdjustmentSeq[ nAdjustmentValues ].Value <<= fValue;
}
else
- aAdjustmentSeq[ nAdjustmentValues ].Value <<= nValue;
- aAdjustmentSeq[ nAdjustmentValues ].State = ePropertyState;
+ pAdjustmentSeq[ nAdjustmentValues ].Value <<= nValue;
+ pAdjustmentSeq[ nAdjustmentValues ].State = ePropertyState;
i--;
}
aProp.Name = "AdjustmentValues";
@@ -2762,14 +2834,14 @@ void DffPropertyReader::CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItem
const css::uno::Any* pAny;
SdrCustomShapeGeometryItem aGeometryItem(rSet.Get( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
- const OUString sTextRotateAngle( "TextRotateAngle" );
+ static constexpr OUString sTextRotateAngle( u"TextRotateAngle"_ustr );
pAny = aGeometryItem.GetPropertyValueByName( sTextRotateAngle );
double fExtraTextRotateAngle = 0.0;
if ( pAny )
*pAny >>= fExtraTextRotateAngle;
if ( rManager.mnFix16Angle )
- fExtraTextRotateAngle += mnFix16Angle.get() / 100.0;
+ fExtraTextRotateAngle += toDegrees(mnFix16Angle);
if ( rObjData.nSpFlags & ShapeFlag::FlipV )
fExtraTextRotateAngle -= 180.0;
@@ -2792,24 +2864,21 @@ void DffPropertyReader::ImportGradientColor( SfxItemSet& aSet, sal_uInt32 eMSO_F
nChgColors ^= 1;
//Translate a MS clockwise(+) or count clockwise angle(-) into an AOO count clock wise angle
- Degree10 nAngle( 3600 - ( ( Fix16ToAngle(nAngleFix16).get() + 5 ) / 10 ) );
+ Degree10 nAngle( 3600_deg10 - to<Degree10>( Fix16ToAngle(nAngleFix16) ) );
//Make sure this angle belongs to 0~3600
- while ( nAngle >= Degree10(3600) ) nAngle -= Degree10(3600);
- while ( nAngle < Degree10(0) ) nAngle += Degree10(3600);
+ while ( nAngle >= 3600_deg10 ) nAngle -= 3600_deg10;
+ while ( nAngle < 0_deg10 ) nAngle += 3600_deg10;
//Rotate angle
if ( mbRotateGranientFillWithAngle )
{
sal_Int32 nRotateAngle = GetPropertyValue( DFF_Prop_Rotation, 0 );
- if(nRotateAngle)//fixed point number
- nRotateAngle = ( static_cast<sal_Int16>( nRotateAngle >> 16) * 100L ) + ( ( ( nRotateAngle & 0x0000ffff) * 100L ) >> 16 );
- nRotateAngle = ( nRotateAngle + 5 ) / 10 ;//round up
//nAngle is a clockwise angle. If nRotateAngle is a clockwise angle, then gradient needs to be rotated a little less
//or it needs to be rotated a little more
- nAngle -= Degree10(nRotateAngle);
+ nAngle -= to<Degree10>(Fix16ToAngle(nRotateAngle));
}
- while ( nAngle >= Degree10(3600) ) nAngle -= Degree10(3600);
- while ( nAngle < Degree10(0) ) nAngle += Degree10(3600);
+ while ( nAngle >= 3600_deg10 ) nAngle -= 3600_deg10;
+ while ( nAngle < 0_deg10 ) nAngle += 3600_deg10;
css::awt::GradientStyle eGrad = css::awt::GradientStyle_LINEAR;
@@ -2863,13 +2932,13 @@ void DffPropertyReader::ImportGradientColor( SfxItemSet& aSet, sal_uInt32 eMSO_F
aCol1 = aCol2;
aCol2 = aZwi;
//Swap two colors' transparency
- double dTemp = dTrans;
- dTrans = dBackTrans;
- dBackTrans = dTemp;
+ std::swap( dTrans, dBackTrans );
}
//Construct gradient item
- XGradient aGrad( aCol2, aCol1, eGrad, nAngle, nFocusX, nFocusY );
+ basegfx::BGradient aGrad(
+ basegfx::BColorStops(aCol2.getBColor(), aCol1.getBColor()),
+ eGrad, nAngle, nFocusX, nFocusY );
//Intensity has been merged into color. So here just set is as 100
aGrad.SetStartIntens( 100 );
aGrad.SetEndIntens( 100 );
@@ -2882,7 +2951,9 @@ void DffPropertyReader::ImportGradientColor( SfxItemSet& aSet, sal_uInt32 eMSO_F
aCol1 = Color(nStartCol, nStartCol, nStartCol);
aCol2 = Color(nEndCol, nEndCol, nEndCol);
- XGradient aGrad2( aCol2 , aCol1 , eGrad, nAngle, nFocusX, nFocusY );
+ basegfx::BGradient aGrad2(
+ basegfx::BColorStops(aCol2.getBColor(), aCol1.getBColor()),
+ eGrad, nAngle, nFocusX, nFocusY );
aSet.Put( XFillFloatTransparenceItem( OUString(), aGrad2 ) );
}
}
@@ -3098,7 +3169,22 @@ bool CompareSvxMSDffShapeInfoByTxBxComp::operator() (
void SvxMSDffManager::Scale( sal_Int32& rVal ) const
{
if ( bNeedMap )
+ {
+ if (rVal > nMaxAllowedVal)
+ {
+ SAL_WARN("filter.ms", "Cannot scale value: " << rVal);
+ rVal = SAL_MAX_INT32;
+ return;
+ }
+ else if (rVal < nMinAllowedVal)
+ {
+ SAL_WARN("filter.ms", "Cannot scale value: " << rVal);
+ rVal = SAL_MAX_INT32;
+ return;
+ }
+
rVal = BigMulDiv( rVal, nMapMul, nMapDiv );
+ }
}
void SvxMSDffManager::Scale( Point& rPos ) const
@@ -3181,6 +3267,26 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, tools::Long nApplicationScale)
nMapMul = nMapDiv = nMapXOfs = nMapYOfs = nEmuMul = nEmuDiv = nPntMul = nPntDiv = 0;
bNeedMap = false;
}
+
+ if (bNeedMap)
+ {
+ assert(nMapMul > nMapDiv);
+
+ BigInt aMinVal(SAL_MIN_INT32);
+ aMinVal /= nMapMul;
+ aMinVal *= nMapDiv;
+ nMinAllowedVal = aMinVal;
+
+ BigInt aMaxVal(SAL_MAX_INT32);
+ aMaxVal /= nMapMul;
+ aMaxVal *= nMapDiv;
+ nMaxAllowedVal = aMaxVal;
+ }
+ else
+ {
+ nMinAllowedVal = SAL_MIN_INT32;
+ nMaxAllowedVal = SAL_MAX_INT32;
+ }
}
bool SvxMSDffManager::SeekToShape( SvStream& rSt, SvxMSDffClientData* /* pClientData */, sal_uInt32 nId ) const
@@ -3610,15 +3716,14 @@ void SvxMSDffManager::ReadObjText( SvStream& rStream, SdrObject* pObj )
// our outliner is too complicate to be used properly,
void SvxMSDffManager::ReadObjText( const OUString& rText, SdrObject* pObj )
{
- SdrTextObj* pText = dynamic_cast<SdrTextObj*>( pObj );
+ SdrTextObj* pText = DynCastSdrTextObj( pObj );
if ( !pText )
return;
SdrOutliner& rOutliner = pText->ImpGetDrawOutliner();
rOutliner.Init( OutlinerMode::TextObject );
- bool bOldUpdateMode = rOutliner.GetUpdateMode();
- rOutliner.SetUpdateMode( false );
+ bool bOldUpdateMode = rOutliner.SetUpdateLayout( false );
rOutliner.SetVertical( pText->IsVerticalWriting() );
sal_Int32 nParaIndex = 0;
@@ -3662,10 +3767,13 @@ void SvxMSDffManager::ReadObjText( const OUString& rText, SdrObject* pObj )
rOutliner.QuickSetAttribs( aParagraphAttribs, aSelection );
nParaIndex++;
}
- std::unique_ptr<OutlinerParaObject> pNewText = rOutliner.CreateParaObject();
+ std::optional<OutlinerParaObject> pNewText = rOutliner.CreateParaObject();
rOutliner.Clear();
- rOutliner.SetUpdateMode( bOldUpdateMode );
+ rOutliner.SetUpdateLayout( bOldUpdateMode );
pText->SetOutlinerParaObject( std::move(pNewText) );
+ // tdf#143315: restore stylesheet applied to Outliner's nodes when SdrTextObj initializes
+ // its attributes, but removed by Outliner::Init, which calls Outliner::Clear.
+ pText->SetStyleSheet(pText->GetStyleSheet(), true);
}
//static
@@ -3761,9 +3869,9 @@ static void lcl_ApplyCropping( const DffPropSet& rPropSet, SfxItemSet* pSet, Gra
}
}
-SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, const DffObjData& rObjData )
+rtl::Reference<SdrObject> SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, const DffObjData& rObjData )
{
- SdrObject* pRet = nullptr;
+ rtl::Reference<SdrObject> pRet;
OUString aLinkFileName;
tools::Rectangle aVisArea;
@@ -3797,9 +3905,9 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
}
if (bOk && DFF_msofbtBSE == aHd.nRecType)
{
- const sal_uLong nSkipBLIPLen = 20;
- const sal_uLong nSkipShapePos = 4;
- const sal_uLong nSkipBLIP = 4;
+ const sal_uInt8 nSkipBLIPLen = 20;
+ const sal_uInt8 nSkipShapePos = 4;
+ const sal_uInt8 nSkipBLIP = 4;
const sal_uLong nSkip =
nSkipBLIPLen + 4 + nSkipShapePos + 4 + nSkipBLIP;
@@ -3960,7 +4068,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
{
pRet = new SdrGrafObj(*pSdrModel);
if( bGrfRead )
- static_cast<SdrGrafObj*>(pRet)->SetGraphic( aGraf );
+ static_cast<SdrGrafObj*>(pRet.get())->SetGraphic( aGraf );
if( bLinkGrf && !bGrfRead ) // sj: #i55484# if the graphic was embedded ( bGrfRead == true ) then
{ // we do not need to set a link. TODO: not to lose the information where the graphic is linked from
@@ -3997,9 +4105,9 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
pRet->SetName( aFileName );
}
}
- pRet->SetLogicRect( rObjData.aBoundRect );
+ pRet->NbcSetLogicRect( rObjData.aBoundRect );
- if (SdrGrafObj* pGrafObj = dynamic_cast<SdrGrafObj*>(pRet))
+ if (SdrGrafObj* pGrafObj = dynamic_cast<SdrGrafObj*>(pRet.get()))
{
if( aLinkFileName.getLength() )
{
@@ -4019,10 +4127,10 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
}
// PptSlidePersistEntry& rPersistEntry, SdPage* pPage
-SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, SvxMSDffClientData& rClientData,
+rtl::Reference<SdrObject> SvxMSDffManager::ImportObj( SvStream& rSt, SvxMSDffClientData& rClientData,
tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId )
{
- SdrObject* pRet = nullptr;
+ rtl::Reference<SdrObject> pRet;
DffRecordHeader aObjHd;
bool bOk = ReadDffRecordHeader(rSt, aObjHd);
if (bOk && aObjHd.nRecType == DFF_msofbtSpgrContainer)
@@ -4037,17 +4145,17 @@ SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, SvxMSDffClientData& rClien
return pRet;
}
-SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& rSt, SvxMSDffClientData& rClientData,
+rtl::Reference<SdrObject> SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& rSt, SvxMSDffClientData& rClientData,
tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect,
int nCalledByGroup, sal_Int32* pShapeId )
{
- SdrObject* pRet = nullptr;
-
if( pShapeId )
*pShapeId = 0;
if (!rHd.SeekToContent(rSt))
- return pRet;
+ return nullptr;
+
+ rtl::Reference<SdrObject> xRet;
DffRecordHeader aRecHd; // the first atom has to be the SpContainer for the GroupObject
bool bOk = ReadDffRecordHeader(rSt, aRecHd);
@@ -4055,9 +4163,9 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
{
mnFix16Angle = 0_deg100;
if (!aRecHd.SeekToBegOfRecord(rSt))
- return pRet;
- pRet = ImportObj( rSt, rClientData, rClientRect, rGlobalChildRect, nCalledByGroup + 1, pShapeId );
- if ( pRet )
+ return xRet;
+ xRet = ImportObj(rSt, rClientData, rClientRect, rGlobalChildRect, nCalledByGroup + 1, pShapeId);
+ if (xRet)
{
Degree100 nGroupRotateAngle(0);
ShapeFlag nSpFlags = nGroupShapeFlags;
@@ -4087,7 +4195,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
// now importing the inner objects of the group
if (!aRecHd.SeekToEndOfRecord(rSt))
- return pRet;
+ return xRet;
while (rSt.good() && ( rSt.Tell() < rHd.GetRecEndFilePos()))
{
@@ -4099,81 +4207,79 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
tools::Rectangle aGroupClientAnchor, aGroupChildAnchor;
GetGroupAnchors( aRecHd2, rSt, aGroupClientAnchor, aGroupChildAnchor, aClientRect, aGlobalChildRect );
if (!aRecHd2.SeekToBegOfRecord(rSt))
- return pRet;
+ return xRet;
sal_Int32 nShapeId;
- SdrObject* pTmp = ImportGroup( aRecHd2, rSt, rClientData, aGroupClientAnchor, aGroupChildAnchor, nCalledByGroup + 1, &nShapeId );
+ rtl::Reference<SdrObject> pTmp = ImportGroup( aRecHd2, rSt, rClientData, aGroupClientAnchor, aGroupChildAnchor, nCalledByGroup + 1, &nShapeId );
if (pTmp)
{
- SdrObjGroup* pGroup = dynamic_cast<SdrObjGroup*>(pRet);
+ SdrObjGroup* pGroup = dynamic_cast<SdrObjGroup*>(xRet.get());
if (pGroup && pGroup->GetSubList())
{
- pGroup->GetSubList()->NbcInsertObject(pTmp);
+ pGroup->GetSubList()->NbcInsertObject(pTmp.get());
if (nShapeId)
- insertShapeId(nShapeId, pTmp);
+ insertShapeId(nShapeId, pTmp.get());
}
else
- FreeObj(rClientData, pTmp);
+ FreeObj(rClientData, pTmp.get());
}
}
else if ( aRecHd2.nRecType == DFF_msofbtSpContainer )
{
if (!aRecHd2.SeekToBegOfRecord(rSt))
- return pRet;
+ return xRet;
sal_Int32 nShapeId;
- SdrObject* pTmp = ImportShape( aRecHd2, rSt, rClientData, aClientRect, aGlobalChildRect, nCalledByGroup + 1, &nShapeId );
+ rtl::Reference<SdrObject> pTmp = ImportShape( aRecHd2, rSt, rClientData, aClientRect, aGlobalChildRect, nCalledByGroup + 1, &nShapeId );
if (pTmp)
{
- SdrObjGroup* pGroup = dynamic_cast<SdrObjGroup*>(pRet);
+ SdrObjGroup* pGroup = dynamic_cast<SdrObjGroup*>(xRet.get());
if (pGroup && pGroup->GetSubList())
{
- pGroup->GetSubList()->NbcInsertObject(pTmp);
+ pGroup->GetSubList()->NbcInsertObject(pTmp.get());
if (nShapeId)
- insertShapeId(nShapeId, pTmp);
+ insertShapeId(nShapeId, pTmp.get());
}
else
- FreeObj(rClientData, pTmp);
+ FreeObj(rClientData, pTmp.get());
}
}
if (!aRecHd2.SeekToEndOfRecord(rSt))
- return pRet;
+ return xRet;
}
if ( nGroupRotateAngle )
- pRet->NbcRotate( aClientRect.Center(), nGroupRotateAngle );
+ xRet->NbcRotate( aClientRect.Center(), nGroupRotateAngle );
if ( nSpFlags & ShapeFlag::FlipV )
{ // BoundRect in aBoundRect
Point aLeft( aClientRect.Left(), ( aClientRect.Top() + aClientRect.Bottom() ) >> 1 );
Point aRight( aLeft.X() + 1000, aLeft.Y() );
- pRet->NbcMirror( aLeft, aRight );
+ xRet->NbcMirror( aLeft, aRight );
}
if ( nSpFlags & ShapeFlag::FlipH )
{ // BoundRect in aBoundRect
Point aTop( ( aClientRect.Left() + aClientRect.Right() ) >> 1, aClientRect.Top() );
Point aBottom( aTop.X(), aTop.Y() + 1000 );
- pRet->NbcMirror( aTop, aBottom );
+ xRet->NbcMirror( aTop, aBottom );
}
}
}
if (o3tl::make_unsigned(nCalledByGroup) < maPendingGroupData.size())
{
// finalization for this group is pending, do it now
- pRet = FinalizeObj(maPendingGroupData.back().first, pRet);
+ xRet = FinalizeObj(maPendingGroupData.back().first, xRet.get());
maPendingGroupData.pop_back();
}
- return pRet;
+ return xRet;
}
-SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& rSt, SvxMSDffClientData& rClientData,
+rtl::Reference<SdrObject> SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& rSt, SvxMSDffClientData& rClientData,
tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect,
int nCalledByGroup, sal_Int32* pShapeId )
{
- SdrObject* pRet = nullptr;
-
if( pShapeId )
*pShapeId = 0;
if (!rHd.SeekToBegOfRecord(rSt))
- return pRet;
+ return nullptr;
DffObjData aObjData( rHd, rClientRect, nCalledByGroup );
@@ -4204,7 +4310,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aObjData.bShapeType = maShapeRecords.SeekToContent( rSt, DFF_msofbtSp );
if ( aObjData.bShapeType )
{
- sal_uInt32 temp;
+ sal_uInt32 temp(0);
rSt.ReadUInt32( aObjData.nShapeId )
.ReadUInt32( temp );
aObjData.nSpFlags = ShapeFlag(temp);
@@ -4224,7 +4330,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( aObjData.bOpt )
{
if (!maShapeRecords.Current()->SeekToBegOfRecord(rSt))
- return pRet;
+ return nullptr;
#ifdef DBG_AUTOSHAPE
ReadPropSet( rSt, &rClientData, (sal_uInt32)aObjData.eShapeType );
#else
@@ -4279,6 +4385,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( aObjData.nSpFlags & ShapeFlag::Background )
aObjData.aBoundRect = tools::Rectangle( Point(), Size( 1, 1 ) );
+ rtl::Reference<SdrObject> xRet;
+
tools::Rectangle aTextRect;
if ( !aObjData.aBoundRect.IsEmpty() )
{ // apply rotation to the BoundingBox BEFORE an object has been generated
@@ -4303,7 +4411,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( aObjData.nSpFlags & ShapeFlag::Group )
{
- pRet = new SdrObjGroup(*pSdrModel);
+ xRet = new SdrObjGroup(*pSdrModel);
/* After CWS aw033 has been integrated, an empty group object
cannot store its resulting bounding rectangle anymore. We have
to return this rectangle via rClientRect now, but only, if
@@ -4323,9 +4431,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( bGraphic )
{
if (!mbSkipImages) {
- pRet = ImportGraphic( rSt, aSet, aObjData ); // SJ: #68396# is no longer true (fixed in ppt2000)
+ xRet = ImportGraphic(rSt, aSet, aObjData); // SJ: #68396# is no longer true (fixed in ppt2000)
ApplyAttributes( rSt, aSet, aObjData );
- pRet->SetMergedItemSet(aSet);
+ xRet->SetMergedItemSet(aSet);
}
}
else if ( aObjData.eShapeType == mso_sptLine && !( GetPropertyValue( DFF_Prop_fc3DLightFace, 0 ) & 8 ) )
@@ -4333,12 +4441,12 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
basegfx::B2DPolygon aPoly;
aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom()));
- pRet = new SdrPathObj(
+ xRet = new SdrPathObj(
*pSdrModel,
- OBJ_LINE,
+ SdrObjKind::Line,
basegfx::B2DPolyPolygon(aPoly));
ApplyAttributes( rSt, aSet, aObjData );
- pRet->SetMergedItemSet(aSet);
+ xRet->SetMergedItemSet(aSet);
}
else
{
@@ -4347,7 +4455,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
ApplyAttributes( rSt, aSet, aObjData );
- pRet = new SdrObjCustomShape(*pSdrModel);
+ xRet = new SdrObjCustomShape(*pSdrModel);
sal_uInt32 ngtextFStrikethrough = GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 );
bool bIsFontwork = ( ngtextFStrikethrough & 0x4000 ) != 0;
@@ -4383,12 +4491,12 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// this should be replaced through "CharacterRotation"
// by 90 degrees, therefore a new Item has to be
// supported by svx core, api and xml file format
- static_cast<SdrObjCustomShape*>(pRet)->SetVerticalWriting( ( ngtextFStrikethrough & 0x2000 ) != 0 );
+ static_cast<SdrObjCustomShape*>(xRet.get())->SetVerticalWriting( ( ngtextFStrikethrough & 0x2000 ) != 0 );
if ( SeekToContent( DFF_Prop_gtextUNICODE, rSt ) )
{
aObjectText = MSDFFReadZString( rSt, GetPropertyValue( DFF_Prop_gtextUNICODE, 0 ), true );
- ReadObjText( aObjectText, pRet );
+ ReadObjText(aObjectText, xRet.get());
}
auto eGeoTextAlign = GetPropertyValue(DFF_Prop_gtextAlign, mso_alignTextCenter);
@@ -4447,30 +4555,29 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
&& aObjName.match( "PowerPlusWaterMarkObject" ) )
{
double fRatio = static_cast<double>(pDevice->GetTextHeight()) / nTextWidth;
- sal_Int32 nNewHeight = fRatio * aObjData.aBoundRect.getWidth();
- sal_Int32 nPaddingY = aObjData.aBoundRect.getHeight() - nNewHeight;
+ sal_Int32 nNewHeight = fRatio * aObjData.aBoundRect.getOpenWidth();
+ sal_Int32 nPaddingY = aObjData.aBoundRect.getOpenHeight() - nNewHeight;
if ( nPaddingY > 0 )
aObjData.aBoundRect.setHeight( nNewHeight );
}
}
}
- pRet->SetMergedItemSet( aSet );
+ xRet->SetMergedItemSet( aSet );
// sj: taking care of rtl, ltr. In case of fontwork mso. seems not to be able to set
// proper text directions, instead the text default is depending to the string.
// so we have to calculate the a text direction from string:
if ( bIsFontwork )
{
- OutlinerParaObject* pParaObj = static_cast<SdrObjCustomShape*>(pRet)->GetOutlinerParaObject();
+ OutlinerParaObject* pParaObj = static_cast<SdrObjCustomShape*>(xRet.get())->GetOutlinerParaObject();
if ( pParaObj )
{
- SdrOutliner& rOutliner = static_cast<SdrObjCustomShape*>(pRet)->ImpGetDrawOutliner();
- bool bOldUpdateMode = rOutliner.GetUpdateMode();
- rOutliner.SetStyleSheetPool(static_cast< SfxStyleSheetPool* >(pRet->getSdrModelFromSdrObject().GetStyleSheetPool()));
- rOutliner.SetUpdateMode( false );
+ SdrOutliner& rOutliner = static_cast<SdrObjCustomShape*>(xRet.get())->ImpGetDrawOutliner();
+ rOutliner.SetStyleSheetPool(static_cast< SfxStyleSheetPool* >(xRet->getSdrModelFromSdrObject().GetStyleSheetPool()));
+ bool bOldUpdateMode = rOutliner.SetUpdateLayout( false );
rOutliner.SetText( *pParaObj );
- ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::BITMASK);
+ ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::WITHOUT_ALPHA);
pVirDev->SetMapMode(MapMode(MapUnit::Map100thMM));
sal_Int32 i, nParagraphs = rOutliner.GetParagraphCount();
if ( nParagraphs )
@@ -4490,13 +4597,13 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
}
if ( bCreateNewParaObject )
{
- std::unique_ptr<OutlinerParaObject> pNewText = rOutliner.CreateParaObject();
+ std::optional<OutlinerParaObject> pNewText = rOutliner.CreateParaObject();
rOutliner.Init( OutlinerMode::TextObject );
- static_cast<SdrObjCustomShape*>(pRet)->NbcSetOutlinerParaObject( std::move(pNewText) );
+ static_cast<SdrObjCustomShape*>(xRet.get())->NbcSetOutlinerParaObject( std::move(pNewText) );
}
}
rOutliner.Clear();
- rOutliner.SetUpdateMode( bOldUpdateMode );
+ rOutliner.SetUpdateLayout( bOldUpdateMode );
}
}
@@ -4506,10 +4613,10 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// applies only if importing arcs from MS Office.
if ( aObjData.eShapeType == mso_sptArc )
{
- const OUString sAdjustmentValues( "AdjustmentValues" );
- const OUString sViewBox( "ViewBox" );
- const OUString sPath( "Path" );
- SdrCustomShapeGeometryItem aGeometryItem( static_cast<SdrObjCustomShape*>(pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ static constexpr OUString sAdjustmentValues( u"AdjustmentValues"_ustr );
+ static constexpr OUString sViewBox( u"ViewBox"_ustr );
+ static constexpr OUString sPath( u"Path"_ustr );
+ SdrCustomShapeGeometryItem aGeometryItem( static_cast<SdrObjCustomShape*>(xRet.get())->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
PropertyValue aPropVal;
// The default arc goes form -90deg to 0deg. Replace general defaults used
@@ -4520,15 +4627,16 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
const uno::Any* pAny = aGeometryItem.GetPropertyValueByName(sAdjustmentValues);
if (pAny && (*pAny >>= seqAdjustmentValues) && seqAdjustmentValues.getLength() > 1)
{
+ auto pseqAdjustmentValues = seqAdjustmentValues.getArray();
if (seqAdjustmentValues[0].State == css::beans::PropertyState_DEFAULT_VALUE)
{
- seqAdjustmentValues[0].Value <<= -90.0;
- seqAdjustmentValues[0].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
+ pseqAdjustmentValues[0].Value <<= -90.0;
+ pseqAdjustmentValues[0].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
}
if (seqAdjustmentValues[1].State == css::beans::PropertyState_DEFAULT_VALUE)
{
- seqAdjustmentValues[1].Value <<= 0.0;
- seqAdjustmentValues[1].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
+ pseqAdjustmentValues[1].Value <<= 0.0;
+ pseqAdjustmentValues[1].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
}
seqAdjustmentValues[0].Value >>= fStartAngle;
seqAdjustmentValues[1].Value >>= fEndAngle;
@@ -4620,8 +4728,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
{
double fLogicXOfs(0.0); // LogicLeft_LO = LogicLeft_MS + fXLogicOfs
double fLogicYOfs(0.0);
- double fLogicPieWidth(aObjData.aBoundRect.getWidth());
- double fLogicPieHeight(aObjData.aBoundRect.getHeight());
+ double fLogicPieWidth(aObjData.aBoundRect.getOpenWidth());
+ double fLogicPieHeight(aObjData.aBoundRect.getOpenHeight());
double fLogicEllipseWidth(0.0); // to be LogicWidth_LO
double fLogicEllipseHeight(0.0);
if (aPieRect_MS.getWidth())
@@ -4664,10 +4772,11 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
sal_Int32 nRight = static_cast<sal_Int32>((aPieRect_MS.getMaxX() - aEllipseRect_MS.getMinX()) * fTextFrameScaleX );
sal_Int32 nBottom= static_cast<sal_Int32>((aPieRect_MS.getMaxY() - aEllipseRect_MS.getMinY()) * fTextFrameScaleY );
css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame > aTextFrame( 1 );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].TopLeft.First, nLeft );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].TopLeft.Second, nTop );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].BottomRight.First, nRight );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].BottomRight.Second,nBottom );
+ auto pTextFrame = aTextFrame.getArray();
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( pTextFrame[ 0 ].TopLeft.First, nLeft );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( pTextFrame[ 0 ].TopLeft.Second, nTop );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( pTextFrame[ 0 ].BottomRight.First, nRight );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( pTextFrame[ 0 ].BottomRight.Second,nBottom );
PropertyValue aProp;
aProp.Name = "TextFrames";
aProp.Value <<= aTextFrame;
@@ -4681,7 +4790,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
nAngle = 36000_deg100 - nAngle;
if ( nSpFlags & ShapeFlag::FlipV )
nAngle = -nAngle;
- double a = nAngle.get() * F_PI18000;
+ double a = toRadians(nAngle);
double ss = sin( a );
double cc = cos( a );
Point aP1( aOldBoundRect.TopLeft() );
@@ -4699,56 +4808,55 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aGeometryItem.ClearPropertyValue( "Equations" );
aGeometryItem.ClearPropertyValue( sPath );
- static_cast<SdrObjCustomShape*>(pRet)->SetMergedItem( aGeometryItem );
- static_cast<SdrObjCustomShape*>(pRet)->MergeDefaultAttributes();
+ static_cast<SdrObjCustomShape*>(xRet.get())->SetMergedItem( aGeometryItem );
+ static_cast<SdrObjCustomShape*>(xRet.get())->MergeDefaultAttributes();
// now setting a new name, so the above correction is only done once when importing from ms
- SdrCustomShapeGeometryItem aGeoName( static_cast<SdrObjCustomShape*>(pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ SdrCustomShapeGeometryItem aGeoName( static_cast<SdrObjCustomShape*>(xRet.get())->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
aPropVal.Name = "Type";
aPropVal.Value <<= OUString( "mso-spt100" );
aGeoName.SetPropertyValue( aPropVal );
- static_cast<SdrObjCustomShape*>(pRet)->SetMergedItem( aGeoName );
+ static_cast<SdrObjCustomShape*>(xRet.get())->SetMergedItem( aGeoName );
}
else
- static_cast<SdrObjCustomShape*>(pRet)->MergeDefaultAttributes();
+ static_cast<SdrObjCustomShape*>(xRet.get())->MergeDefaultAttributes();
- pRet->SetSnapRect( aObjData.aBoundRect );
- EnhancedCustomShape2d aCustomShape2d(static_cast<SdrObjCustomShape&>(*pRet));
+ xRet->SetSnapRect( aObjData.aBoundRect );
+ EnhancedCustomShape2d aCustomShape2d(static_cast<SdrObjCustomShape&>(*xRet));
aTextRect = aCustomShape2d.GetTextRect();
if( bIsConnector )
{
if( nObjectRotation )
- pRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation );
+ xRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation );
// mirrored horizontally?
if ( nSpFlags & ShapeFlag::FlipH )
{
- tools::Rectangle aBndRect( pRet->GetSnapRect() );
+ tools::Rectangle aBndRect(xRet->GetSnapRect());
Point aTop( ( aBndRect.Left() + aBndRect.Right() ) >> 1, aBndRect.Top() );
Point aBottom( aTop.X(), aTop.Y() + 1000 );
- pRet->NbcMirror( aTop, aBottom );
+ xRet->NbcMirror( aTop, aBottom );
}
// mirrored vertically?
if ( nSpFlags & ShapeFlag::FlipV )
{
- tools::Rectangle aBndRect( pRet->GetSnapRect() );
+ tools::Rectangle aBndRect(xRet->GetSnapRect());
Point aLeft( aBndRect.Left(), ( aBndRect.Top() + aBndRect.Bottom() ) >> 1 );
Point aRight( aLeft.X() + 1000, aLeft.Y() );
- pRet->NbcMirror( aLeft, aRight );
+ xRet->NbcMirror( aLeft, aRight );
}
- basegfx::B2DPolyPolygon aPoly( static_cast<SdrObjCustomShape*>(pRet)->GetLineGeometry( true ) );
- SdrObject::Free( pRet );
+ basegfx::B2DPolyPolygon aPoly( static_cast<SdrObjCustomShape*>(xRet.get())->GetLineGeometry( true ) );
- pRet = new SdrEdgeObj(*pSdrModel);
+ xRet = new SdrEdgeObj(*pSdrModel);
ApplyAttributes( rSt, aSet, aObjData );
- pRet->SetLogicRect( aObjData.aBoundRect );
- pRet->SetMergedItemSet(aSet);
+ xRet->SetLogicRect( aObjData.aBoundRect );
+ xRet->SetMergedItemSet(aSet);
// connectors
auto eConnectorStyle = GetPropertyValue(DFF_Prop_cxstyle, mso_cxstyleStraight);
- static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(true, nullptr);
- static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(false, nullptr);
+ static_cast<SdrEdgeObj*>(xRet.get())->ConnectToNode(true, nullptr);
+ static_cast<SdrEdgeObj*>(xRet.get())->ConnectToNode(false, nullptr);
Point aPoint1( aObjData.aBoundRect.TopLeft() );
Point aPoint2( aObjData.aBoundRect.BottomRight() );
@@ -4756,7 +4864,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// pay attention to the rotations
if ( nObjectRotation )
{
- double a = nObjectRotation.get() * F_PI18000;
+ double a = toRadians(nObjectRotation);
Point aCenter( aObjData.aBoundRect.Center() );
double ss = sin(a);
double cc = cos(a);
@@ -4788,8 +4896,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
nSpFlags &= ~ShapeFlag::FlipV;
}
- pRet->NbcSetPoint(aPoint1, 0); // start point
- pRet->NbcSetPoint(aPoint2, 1); // endpoint
+ xRet->NbcSetPoint(aPoint1, 0); // start point
+ xRet->NbcSetPoint(aPoint2, 1); // endpoint
sal_Int32 n1HorzDist, n1VertDist, n2HorzDist, n2VertDist;
n1HorzDist = n1VertDist = n2HorzDist = n2VertDist = 0;
@@ -4813,74 +4921,73 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aSet.Put( SdrEdgeNode2HorzDistItem( n2HorzDist ) );
aSet.Put( SdrEdgeNode2VertDistItem( n2VertDist ) );
- static_cast<SdrEdgeObj*>(pRet)->SetEdgeTrackPath( aPoly );
- pRet->SetMergedItemSet( aSet );
+ static_cast<SdrEdgeObj*>(xRet.get())->SetEdgeTrackPath( aPoly );
+ xRet->SetMergedItemSet(aSet);
}
if ( aObjData.eShapeType == mso_sptLine )
{
- pRet->SetMergedItemSet(aSet);
- static_cast<SdrObjCustomShape*>(pRet)->MergeDefaultAttributes();
+ xRet->SetMergedItemSet(aSet);
+ static_cast<SdrObjCustomShape*>(xRet.get())->MergeDefaultAttributes();
}
}
}
- if ( pRet )
+ if (xRet)
{
if( nObjectRotation )
- pRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation );
+ xRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation );
// mirrored horizontally?
if ( nSpFlags & ShapeFlag::FlipH )
{
- tools::Rectangle aBndRect( pRet->GetSnapRect() );
+ tools::Rectangle aBndRect(xRet->GetSnapRect());
Point aTop( ( aBndRect.Left() + aBndRect.Right() ) >> 1, aBndRect.Top() );
Point aBottom( aTop.X(), aTop.Y() + 1000 );
- pRet->NbcMirror( aTop, aBottom );
+ xRet->NbcMirror(aTop, aBottom);
}
// mirrored vertically?
if ( nSpFlags & ShapeFlag::FlipV )
{
- tools::Rectangle aBndRect( pRet->GetSnapRect() );
+ tools::Rectangle aBndRect(xRet->GetSnapRect());
Point aLeft( aBndRect.Left(), ( aBndRect.Top() + aBndRect.Bottom() ) >> 1 );
Point aRight( aLeft.X() + 1000, aLeft.Y() );
- pRet->NbcMirror( aLeft, aRight );
+ xRet->NbcMirror(aLeft, aRight);
}
}
}
}
// #i51348# #118052# name of the shape
- if( pRet )
+ if (xRet)
{
OUString aObjName = GetPropertyString( DFF_Prop_wzName, rSt );
if( !aObjName.isEmpty() )
- pRet->SetName( aObjName );
+ xRet->SetName(aObjName);
}
- pRet =
- ProcessObj( rSt, aObjData, rClientData, aTextRect, pRet);
+ xRet = ProcessObj(rSt, aObjData, rClientData, aTextRect, xRet.get());
- if ( pRet )
+ if (xRet)
{
sal_Int32 nGroupProperties( GetPropertyValue( DFF_Prop_fPrint, 0 ) );
const bool bVisible = ( ( nGroupProperties & 2 ) == 0 );
- pRet->SetVisible( bVisible );
+ xRet->SetVisible( bVisible );
// In Excel hidden means not printed
if ( !bVisible )
{
- pRet->SetPrintable( false );
+ xRet->SetPrintable(false);
}
else
{
// This property isn't used in Excel anymore, leaving it for legacy reasons
- pRet->SetPrintable( ( nGroupProperties & 1 ) != 0 );
+ xRet->SetPrintable( ( nGroupProperties & 1 ) != 0 );
}
}
//Import alt text as description
- if ( pRet && SeekToContent( DFF_Prop_wzDescription, rSt ) )
+ if (xRet && SeekToContent(DFF_Prop_wzDescription, rSt))
{
OUString aAltText = MSDFFReadZString(rSt, GetPropertyValue(DFF_Prop_wzDescription, 0), true);
- pRet->SetDescription( aAltText );
+ xRet->SetDescription(aAltText);
}
// If this shape opens a new group, push back its object data because
@@ -4893,9 +5000,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
}
else
{
- pRet = FinalizeObj(aObjData, pRet);
+ xRet = FinalizeObj(aObjData, xRet.get());
}
- return pRet;
+ return xRet;
}
tools::Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvStream& rSt, tools::Rectangle& aClientRect )
@@ -5057,7 +5164,7 @@ void SvxMSDffImportData::insert(std::unique_ptr<SvxMSDffImportRec> pImpRec)
if (bSuccess)
{
SvxMSDffImportRec* pRec = aRet.first->get();
- m_ObjToRecMap[pRec->pObj] = pRec;
+ m_ObjToRecMap[pRec->pObj.get()] = pRec;
}
}
@@ -5075,9 +5182,8 @@ void SvxMSDffManager::NotifyFreeObj(SvxMSDffClientData& rData, SdrObject* pObj)
if (SdrObjGroup* pGroup = dynamic_cast<SdrObjGroup*>(pObj))
{
SdrObjList* pSubList = pGroup->GetSubList();
- size_t nObjCount = pSubList->GetObjCount();
- for (size_t i = 0; i < nObjCount; ++i)
- NotifyFreeObj(rData, pSubList->GetObj(i));
+ for (const rtl::Reference<SdrObject>& pChildObj : *pSubList)
+ NotifyFreeObj(rData, pChildObj.get());
}
rData.NotifyFreeObj(pObj);
@@ -5086,16 +5192,16 @@ void SvxMSDffManager::NotifyFreeObj(SvxMSDffClientData& rData, SdrObject* pObj)
void SvxMSDffManager::FreeObj(SvxMSDffClientData& rData, SdrObject* pObj)
{
NotifyFreeObj(rData, pObj);
- SdrObject::Free(pObj);
}
-SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
+rtl::Reference<SdrObject> SvxMSDffManager::ProcessObj(SvStream& rSt,
DffObjData& rObjData,
SvxMSDffClientData& rData,
tools::Rectangle& rTextRect,
- SdrObject* pObj
+ SdrObject* pObj1
)
{
+ rtl::Reference<SdrObject> pObj = pObj1;
if( !rTextRect.IsEmpty() )
{
SvxMSDffImportData& rImportData = static_cast<SvxMSDffImportData&>(rData);
@@ -5151,7 +5257,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
case 0x0392:
pImpRec->nYRelTo = nUDData;
break;
- case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
+ case 0x03BF: pImpRec->nGroupShapeBooleanProperties = nUDData; break;
case 0x0393:
// This seems to correspond to o:hrpct from .docx (even including
// the difference that it's in 0.1% even though the .docx spec
@@ -5172,8 +5278,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
}
// text frame, also Title or Outline
- SdrObject* pOrgObj = pObj;
- SdrRectObj* pTextObj = nullptr;
+ rtl::Reference<SdrObject> pOrgObj = pObj;
+ rtl::Reference<SdrRectObj> pTextObj;
sal_uInt32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
if( nTextId )
{
@@ -5202,8 +5308,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
if (bTextFrame)
{
- SdrObject::Free( pObj );
- pObj = pOrgObj = nullptr;
+ pObj = nullptr;
+ pOrgObj = nullptr;
}
// Distance of Textbox to its surrounding Customshape
@@ -5287,7 +5393,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
pTextObj = new SdrRectObj(
*pSdrModel,
- OBJ_TEXT,
+ SdrObjKind::Text,
rTextRect);
pTextImpRec = new SvxMSDffImportRec(*pImpRec);
bDeleteTextImpRec = true;
@@ -5433,27 +5539,27 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
// rotate text with shape?
if ( mnFix16Angle )
{
- double a = mnFix16Angle.get() * F_PI18000;
+ double a = toRadians(mnFix16Angle);
pTextObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle,
sin( a ), cos( a ) );
}
if( !pObj )
{
- pObj = pTextObj;
+ pObj = pTextObj.get();
}
else
{
- if( pTextObj != pObj )
+ if( pTextObj.get() != pObj.get() )
{
- SdrObject* pGroup = new SdrObjGroup(*pSdrModel);
- pGroup->GetSubList()->NbcInsertObject( pObj );
- pGroup->GetSubList()->NbcInsertObject( pTextObj );
+ rtl::Reference<SdrObject> pGroup = new SdrObjGroup(*pSdrModel);
+ pGroup->GetSubList()->NbcInsertObject( pObj.get() );
+ pGroup->GetSubList()->NbcInsertObject( pTextObj.get() );
if (pOrgObj == pObj)
pOrgObj = pGroup;
else
pOrgObj = pObj;
- pObj = pGroup;
+ pObj = pGroup.get();
}
}
}
@@ -5470,9 +5576,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
SfxItemSet aSet( pSdrModel->GetItemPool() );
ApplyAttributes( rSt, aSet, rObjData );
- const SfxPoolItem* pPoolItem=nullptr;
- SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
- false, &pPoolItem );
+ SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR );
if( SfxItemState::DEFAULT == eState )
aSet.Put( XFillColorItem( OUString(), mnDefaultColor ) );
pObj->SetMergedItemSet(aSet);
@@ -5520,7 +5624,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
bool bOk = nElemSizeVert && (rSt.remainingSize() / nElemSizeVert >= nNumElemVert);
if (bOk)
{
- pTextImpRec->pWrapPolygon.reset(new tools::Polygon(nNumElemVert));
+ pTextImpRec->pWrapPolygon = tools::Polygon(nNumElemVert);
for (sal_uInt16 i = 0; i < nNumElemVert; ++i)
{
sal_Int32 nX(0), nY(0);
@@ -5568,7 +5672,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
// amend the import record list
if( pOrgObj )
{
- pImpRec->pObj = pOrgObj;
+ pImpRec->pObj = pOrgObj.get();
rImportData.insert(std::unique_ptr<SvxMSDffImportRec>(pImpRec));
bDeleteImpRec = false;
if (pImpRec == pTextImpRec)
@@ -5579,7 +5683,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
{
// Modify ShapeId (must be unique)
pImpRec->nShapeId |= 0x8000000;
- pTextImpRec->pObj = pTextObj;
+ pTextImpRec->pObj = pTextObj.get();
rImportData.insert(std::unique_ptr<SvxMSDffImportRec>(pTextImpRec));
bDeleteTextImpRec = false;
if (pTextImpRec == pImpRec)
@@ -5595,7 +5699,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
)
StoreShapeOrder( pImpRec->nShapeId,
( static_cast<sal_uLong>(pImpRec->aTextId.nTxBxS) << 16 )
- + pImpRec->aTextId.nSequence, pObj );
+ + pImpRec->aTextId.nSequence, pObj.get() );
}
if (bDeleteImpRec)
@@ -5664,7 +5768,7 @@ void SvxMSDffManager::RemoveFromShapeOrder( SdrObject const * pObject ) const
// exported class: Public Methods
SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
- const OUString& rBaseURL,
+ OUString aBaseURL,
sal_uInt32 nOffsDgg_,
SvStream* pStData_,
SdrModel* pSdrModel_,// see SetModel() below
@@ -5679,7 +5783,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
nBLIPCount( USHRT_MAX ), // initialize with error, since we first check if the
nGroupShapeFlags(ShapeFlag::NONE), // ensure initialization here, as some corrupted
// files may yield to this being uninitialized
- maBaseURL( rBaseURL ),
+ maBaseURL(std::move( aBaseURL )),
mnIdClusters(0),
rStCtrl( rStCtrl_ ),
pStData( pStData_ ),
@@ -5714,14 +5818,14 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
pStData->Seek( nOldPosData );
}
-SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL )
+SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, OUString aBaseURL )
:DffPropertyReader( *this ),
m_pBLIPInfos( new SvxMSDffBLIPInfos ),
m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ),
nOffsDgg( 0 ),
nBLIPCount( USHRT_MAX ), // initialize with error, since we first have to check
nGroupShapeFlags(ShapeFlag::NONE),
- maBaseURL( rBaseURL ),
+ maBaseURL(std::move( aBaseURL )),
mnIdClusters(0),
rStCtrl( rStCtrl_ ),
pStData( nullptr ),
@@ -5893,10 +5997,10 @@ void SvxMSDffManager::GetCtrlData(sal_uInt32 nOffsDggL)
if (!checkSeek(rStCtrl, nOffsDggL))
return;
- sal_uInt8 nVer;
- sal_uInt16 nInst;
- sal_uInt16 nFbt;
- sal_uInt32 nLength;
+ sal_uInt8 nVer(0);
+ sal_uInt16 nInst(0);
+ sal_uInt16 nFbt(0);
+ sal_uInt32 nLength(0);
if( !ReadCommonRecordHeader( rStCtrl, nVer, nInst, nFbt, nLength ) ) return;
sal_uInt64 nPos = nOffsDggL + DFF_COMMON_RECORD_HEADER_SIZE;
@@ -6031,7 +6135,7 @@ void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, sal_uInt32 nL
void SvxMSDffManager::GetDrawingContainerData( SvStream& rSt, sal_uInt32 nLenDg,
sal_uInt16 nDrawingContainerId )
{
- sal_uInt8 nVer;sal_uInt16 nInst;sal_uInt16 nFbt;sal_uInt32 nLength;
+ sal_uInt8 nVer;sal_uInt16 nInst;sal_uInt16 nFbt(0);sal_uInt32 nLength(0);
sal_uLong nReadDg = 0;
@@ -6232,7 +6336,6 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
// complex Prop found:
// Length is always 6. The length of the appended extra data
// after the actual prop table is of different size.
- nPropVal = 6;
}
}
break;
@@ -6299,38 +6402,37 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
Access to a shape at runtime (via the Shape-Id)
----------------------------
******************************************************************************/
-bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape,
+bool SvxMSDffManager::GetShape(sal_uLong nId, rtl::Reference<SdrObject>& rpShape,
SvxMSDffImportData& rData)
{
auto const pTmpRec = std::make_shared<SvxMSDffShapeInfo>(0, nId);
SvxMSDffShapeInfos_ById::const_iterator const it =
m_xShapeInfosById->find(pTmpRec);
- if (it != m_xShapeInfosById->end())
- {
- // Possibly delete old error flag.
- if( rStCtrl.GetError() )
- rStCtrl.ResetError();
- // store FilePos of the stream(s)
- sal_uInt64 nOldPosCtrl = rStCtrl.Tell();
- sal_uInt64 nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
- // jump to the shape in the control stream
- sal_uInt64 const nFilePos((*it)->nFilePos);
- bool bSeeked = (nFilePos == rStCtrl.Seek(nFilePos));
+ if (it == m_xShapeInfosById->end())
+ return false;
- // if it failed, reset error statusF
- if (!bSeeked || rStCtrl.GetError())
- rStCtrl.ResetError();
- else
- rpShape = ImportObj( rStCtrl, rData, rData.aParentRect, rData.aParentRect, /*nCalledByGroup*/0, /*pShapeId*/nullptr );
+ // Possibly delete old error flag.
+ if( rStCtrl.GetError() )
+ rStCtrl.ResetError();
+ // store FilePos of the stream(s)
+ sal_uInt64 nOldPosCtrl = rStCtrl.Tell();
+ sal_uInt64 nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
+ // jump to the shape in the control stream
+ sal_uInt64 const nFilePos((*it)->nFilePos);
+ bool bSeeked = (nFilePos == rStCtrl.Seek(nFilePos));
- // restore old FilePos of the stream(s)
- rStCtrl.Seek( nOldPosCtrl );
- if( &rStCtrl != pStData && pStData )
- pStData->Seek( nOldPosData );
- return ( nullptr != rpShape );
- }
- return false;
+ // if it failed, reset error statusF
+ if (!bSeeked || rStCtrl.GetError())
+ rStCtrl.ResetError();
+ else
+ rpShape = ImportObj( rStCtrl, rData, rData.aParentRect, rData.aParentRect, /*nCalledByGroup*/0, /*pShapeId*/nullptr );
+
+ // restore old FilePos of the stream(s)
+ rStCtrl.Seek( nOldPosCtrl );
+ if( &rStCtrl != pStData && pStData )
+ pStData->Seek( nOldPosData );
+ return bool( rpShape );
}
@@ -6436,40 +6538,42 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tool
bool bMtfBLIP = false;
bool bZCodecCompression = false;
// now position it exactly at the beginning of the embedded graphic
- sal_uLong nSkip = ( nInst & 0x0001 ) ? 32 : 16;
-
- switch( nInst & 0xFFFE )
+ sal_uLong nSkip = (nInst & 0x0001) ? 32 : 16;
+ const OfficeArtBlipRecInstance aRecInstanse = OfficeArtBlipRecInstance(nInst & 0xFFFE);
+ switch (aRecInstanse)
{
- case 0x216 : // Metafile header then compressed WMF
- case 0x3D4 : // Metafile header then compressed EMF
- case 0x542 : // Metafile hd. then compressed PICT
+ case OfficeArtBlipRecInstance::EMF:
+ case OfficeArtBlipRecInstance::WMF:
+ case OfficeArtBlipRecInstance::PICT:
{
- rBLIPStream.SeekRel( nSkip + 20 );
+ rBLIPStream.SeekRel(nSkip + 20);
- // read in size of metafile in EMUS
+ // read in size of metafile in English Metric Units (EMUs)
sal_Int32 width(0), height(0);
- rBLIPStream.ReadInt32( width ).ReadInt32( height );
- aMtfSize100.setWidth( width );
- aMtfSize100.setHeight( height );
+ rBLIPStream.ReadInt32(width).ReadInt32(height);
+ aMtfSize100.setWidth(width);
+ aMtfSize100.setHeight(height);
+ // 1 EMU = 1/360,000 of a centimeter
// scale to 1/100mm
- aMtfSize100.setWidth( aMtfSize100.Width() / 360 );
- aMtfSize100.setHeight( aMtfSize100.Height() / 360 );
+ aMtfSize100.setWidth(aMtfSize100.Width() / 360);
+ aMtfSize100.setHeight(aMtfSize100.Height() / 360);
- if ( pVisArea ) // seem that we currently are skipping the visarea position
- *pVisArea = tools::Rectangle( Point(), aMtfSize100 );
+ if (pVisArea) // seem that we currently are skipping the visarea position
+ *pVisArea = tools::Rectangle(Point(), aMtfSize100);
// skip rest of header
nSkip = 6;
bMtfBLIP = bZCodecCompression = true;
}
break;
- case 0x46A : // One byte tag then JPEG (= JFIF) data
- case 0x6E0 : // One byte tag then PNG data
- case 0x6E2 : // One byte tag then JPEG in CMYK color space
- case 0x7A8 :
- nSkip += 1; // One byte tag then DIB data
- break;
+ case OfficeArtBlipRecInstance::JPEG_RGB:
+ case OfficeArtBlipRecInstance::JPEG_CMYK:
+ case OfficeArtBlipRecInstance::PNG:
+ case OfficeArtBlipRecInstance::DIB:
+ case OfficeArtBlipRecInstance::TIFF:
+ nSkip += 1; // Skip one byte tag
+ break;
}
rBLIPStream.SeekRel( nSkip );
@@ -6492,18 +6596,34 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tool
// extract graphics from ole storage into "dbggfxNNN.*"
static sal_Int32 nGrfCount;
- OUString aFileName = "dbggfx" + OUString::number( nGrfCount++ );
- switch( nInst &~ 1 )
+ OUString aFileName = "dbggfx" + OUString::number(nGrfCount++);
+ switch (aRecInstanse)
{
- case 0x216 : aFileName += ".wmf"; break;
- case 0x3d4 : aFileName += ".emf"; break;
- case 0x542 : aFileName += ".pct"; break;
- case 0x46a : aFileName += ".jpg"; break;
- case 0x6e0 : aFileName += ".png"; break;
- case 0x6e2 : aFileName += ".jpg"; break;
- case 0x7a8 : aFileName += ".bmp"; break;
+ case OfficeArtBlipRecInstance::WMF:
+ aFileName += ".wmf";
+ break;
+ case OfficeArtBlipRecInstance::EMF:
+ aFileName += ".emf";
+ break;
+ case OfficeArtBlipRecInstance::PICT:
+ aFileName += ".pct";
+ break;
+ case OfficeArtBlipRecInstance::JPEG_RGB:
+ case OfficeArtBlipRecInstance::JPEG_CMYK:
+ aFileName += ".jpg";
+ break;
+ case OfficeArtBlipRecInstance::PNG:
+ aFileName += ".png";
+ break;
+ case OfficeArtBlipRecInstance::DIB:
+ aFileName += ".bmp";
+ break;
+ case OfficeArtBlipRecInstance::TIFF:
+ aFileName += ".tif";
+ break;
}
+
OUString aURLStr;
if( osl::FileBase::getFileURLFromSystemPath( Application::GetAppFileName(), aURLStr ) == osl::FileBase::E_None )
{
@@ -6540,8 +6660,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tool
}
}
#endif
-
- if( ( nInst & 0xFFFE ) == 0x7A8 )
+ if (aRecInstanse == OfficeArtBlipRecInstance::DIB)
{ // getting the DIBs immediately
Bitmap aNew;
if( ReadDIB(aNew, *pGrStream, false) )
@@ -6571,7 +6690,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tool
nRes = ERRCODE_NONE;
}
else
- nRes = rGF.ImportGraphic( rData, "", *pGrStream );
+ nRes = rGF.ImportGraphic( rData, u"", *pGrStream );
// SJ: I40472, sometimes the aspect ratio (aMtfSize100) does not match and we get scaling problems,
// then it is better to use the prefsize that is stored within the metafile. Bug #72846# for what the
@@ -6579,7 +6698,8 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tool
//
// For pict graphics we will furthermore scale the metafile, because font scaling leads to error if the
// dxarray is empty (this has been solved in wmf/emf but not for pict)
- if( bMtfBLIP && ( ERRCODE_NONE == nRes ) && ( rData.GetType() == GraphicType::GdiMetafile ) && ( ( nInst & 0xFFFE ) == 0x542 ) )
+ if (bMtfBLIP && (ERRCODE_NONE == nRes) && (rData.GetType() == GraphicType::GdiMetafile)
+ && (aRecInstanse == OfficeArtBlipRecInstance::PICT))
{
if ( ( aMtfSize100.Width() >= 1000 ) && ( aMtfSize100.Height() >= 1000 ) )
{ // #75956#, scaling does not work properly, if the graphic is less than 1cm
@@ -6650,7 +6770,7 @@ void SvxMSDffManager::ProcessClientAnchor2( SvStream& /* rSt */, DffRecordHeader
// will be overridden by SJ in Draw
}
-bool SvxMSDffManager::GetOLEStorageName( sal_uInt32, OUString&, tools::SvRef<SotStorage>&, uno::Reference < embed::XStorage >& ) const
+bool SvxMSDffManager::GetOLEStorageName( sal_uInt32, OUString&, rtl::Reference<SotStorage>&, uno::Reference < embed::XStorage >& ) const
{
return false;
}
@@ -6661,15 +6781,15 @@ bool SvxMSDffManager::ShapeHasText( sal_uLong /* nShapeId */, sal_uLong /* nFile
}
// #i32596# - add new parameter <_nCalledByGroup>
-SdrObject* SvxMSDffManager::ImportOLE( sal_uInt32 nOLEId,
+rtl::Reference<SdrObject> SvxMSDffManager::ImportOLE( sal_uInt32 nOLEId,
const Graphic& rGrf,
const tools::Rectangle& rBoundRect,
const tools::Rectangle& rVisArea,
const int /* _nCalledByGroup */ ) const
{
- SdrObject* pRet = nullptr;
+ rtl::Reference<SdrObject> pRet;
OUString sStorageName;
- tools::SvRef<SotStorage> xSrcStg;
+ rtl::Reference<SotStorage> xSrcStg;
ErrCode nError = ERRCODE_NONE;
uno::Reference < embed::XStorage > xDstStg;
if( GetOLEStorageName( nOLEId, sStorageName, xSrcStg, xDstStg ))
@@ -6691,7 +6811,7 @@ SdrObject* SvxMSDffManager::ImportOLE( sal_uInt32 nOLEId,
bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile & rMtf )
{
- tools::SvRef<SotStorageStream> xStm = pStor->OpenSotStream(SVEXT_PERSIST_STREAM);
+ rtl::Reference<SotStorageStream> xStm = pStor->OpenSotStream(SVEXT_PERSIST_STREAM);
xStm->SetVersion( pStor->GetVersion() );
xStm->SetBufferSize( 8192 );
@@ -6831,10 +6951,10 @@ const ClsIDs aClsIDs[] = {
bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
- const GDIMetaFile * pMtf, const tools::SvRef<SotStorage>& rDest )
+ const GDIMetaFile * pMtf, const rtl::Reference<SotStorage>& rDest )
{
bool bMtfRead = false;
- tools::SvRef<SotStorageStream> xOle10Stm = rDest->OpenSotStream( "\1Ole10Native",
+ rtl::Reference<SotStorageStream> xOle10Stm = rDest->OpenSotStream( "\1Ole10Native",
StreamMode::WRITE| StreamMode::SHARE_DENYALL );
if( xOle10Stm->GetError() )
return false;
@@ -6880,7 +7000,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
// write to ole10 stream
xOle10Stm->WriteUInt32( nDataLen );
xOle10Stm->WriteBytes(pData.get(), nDataLen);
- xOle10Stm = tools::SvRef<SotStorageStream>();
+ xOle10Stm.clear();
// set the compobj stream
const ClsIDs* pIds;
@@ -6998,7 +7118,7 @@ OUString SvxMSDffManager::GetFilterNameFromClassID( const SvGlobalName& aGlobNam
void SvxMSDffManager::ExtractOwnStream(SotStorage& rSrcStg, SvMemoryStream& rMemStream)
{
- tools::SvRef<SotStorageStream> xStr
+ rtl::Reference<SotStorageStream> xStr
= rSrcStg.OpenSotStream("package_stream", StreamMode::STD_READ);
xStr->ReadStream(rMemStream);
}
@@ -7063,22 +7183,24 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
{
//TODO/MBA: check if (and when) storage and stream will be destroyed!
std::shared_ptr<const SfxFilter> pFilter;
- std::unique_ptr<SvMemoryStream> xMemStream (new SvMemoryStream);
+ SvMemoryStream aMemStream;
if ( pName )
{
// TODO/LATER: perhaps we need to retrieve VisArea and Metafile from the storage also
- SvxMSDffManager::ExtractOwnStream(rSrcStg, *xMemStream);
+ SvxMSDffManager::ExtractOwnStream(rSrcStg, aMemStream);
}
else
{
- SfxFilterMatcher aMatch( sStarName );
- tools::SvRef<SotStorage> xStorage = new SotStorage( false, *xMemStream );
+ rtl::Reference<SotStorage> xStorage = new SotStorage(false, aMemStream);
rSrcStg.CopyTo( xStorage.get() );
xStorage->Commit();
xStorage.clear();
OUString aType = SfxFilter::GetTypeFromStorage( rSrcStg );
- if (aType.getLength() && !utl::ConfigManager::IsFuzzing())
+ if (aType.getLength() && !comphelper::IsFuzzing())
+ {
+ SfxFilterMatcher aMatch( sStarName );
pFilter = aMatch.GetFilter4EA( aType );
+ }
}
#ifdef DEBUG_FILTER_MSFILTER
@@ -7104,18 +7226,19 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
aFilterName = SvxMSDffManager::GetFilterNameFromClassID( aStgNm );
uno::Sequence<beans::PropertyValue> aMedium(aFilterName.isEmpty() ? 3 : 4);
- aMedium[0].Name = "InputStream";
- uno::Reference < io::XInputStream > xStream = new ::utl::OSeekableInputStreamWrapper( *xMemStream );
- aMedium[0].Value <<= xStream;
- aMedium[1].Name = "URL";
- aMedium[1].Value <<= OUString( "private:stream" );
- aMedium[2].Name = "DocumentBaseURL";
- aMedium[2].Value <<= rBaseURL;
+ auto pMedium = aMedium.getArray();
+ pMedium[0].Name = "InputStream";
+ uno::Reference < io::XInputStream > xStream = new ::utl::OSeekableInputStreamWrapper( aMemStream );
+ pMedium[0].Value <<= xStream;
+ pMedium[1].Name = "URL";
+ pMedium[1].Value <<= OUString( "private:stream" );
+ pMedium[2].Name = "DocumentBaseURL";
+ pMedium[2].Value <<= rBaseURL;
if ( !aFilterName.isEmpty() )
{
- aMedium[3].Name = "FilterName";
- aMedium[3].Value <<= aFilterName;
+ pMedium[3].Name = "FilterName";
+ pMedium[3].Value <<= aFilterName;
}
OUString aName( aDstStgName );
@@ -7179,10 +7302,10 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
}
// TODO/MBA: code review and testing!
-SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
+rtl::Reference<SdrOle2Obj> SvxMSDffManager::CreateSdrOLEFromStorage(
SdrModel& rSdrModel,
const OUString& rStorageName,
- tools::SvRef<SotStorage> const & rSrcStorage,
+ rtl::Reference<SotStorage> const & rSrcStorage,
const uno::Reference < embed::XStorage >& xDestStorage,
const Graphic& rGrf,
const tools::Rectangle& rBoundRect,
@@ -7194,7 +7317,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
OUString const& rBaseURL)
{
sal_Int64 nAspect = nRecommendedAspect;
- SdrOle2Obj* pRet = nullptr;
+ rtl::Reference<SdrOle2Obj> pRet;
if( rSrcStorage.is() && xDestStorage.is() && rStorageName.getLength() )
{
comphelper::EmbeddedObjectContainer aCnt( xDestStorage );
@@ -7205,12 +7328,12 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
OUString aDstStgName = MSO_OLE_Obj + OUString::number( ++nMSOleObjCntr );
{
- tools::SvRef<SotStorage> xObjStg = rSrcStorage->OpenSotStorage( rStorageName );
+ rtl::Reference<SotStorage> xObjStg = rSrcStorage->OpenSotStorage(rStorageName);
if( xObjStg.is() )
{
{
sal_uInt8 aTestA[10]; // exist the \1CompObj-Stream ?
- tools::SvRef<SotStorageStream> xSrcTst = xObjStg->OpenSotStream( "\1CompObj" );
+ rtl::Reference<SotStorageStream> xSrcTst = xObjStg->OpenSotStream("\1CompObj");
bValidStorage = xSrcTst.is() && sizeof( aTestA ) ==
xSrcTst->ReadBytes(aTestA, sizeof(aTestA));
if( !bValidStorage )
@@ -7231,7 +7354,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
// is a kind of embedded objects in Word documents
// TODO/LATER: should the caller be notified if the aspect changes in future?
- tools::SvRef<SotStorageStream> xObjInfoSrc = xObjStg->OpenSotStream(
+ rtl::Reference<SotStorageStream> xObjInfoSrc = xObjStg->OpenSotStream(
"\3ObjInfo", StreamMode::STD_READ );
if ( xObjInfoSrc.is() && !xObjInfoSrc->GetError() )
{
@@ -7273,11 +7396,11 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
if( bValidStorage )
{
// object is not an own object
- tools::SvRef<SotStorage> xObjStor = SotStorage::OpenOLEStorage( xDestStorage, aDstStgName, StreamMode::READWRITE );
+ rtl::Reference<SotStorage> xObjStor = SotStorage::OpenOLEStorage( xDestStorage, aDstStgName, StreamMode::READWRITE );
if ( xObjStor.is() )
{
- tools::SvRef<SotStorage> xSrcStor = rSrcStorage->OpenSotStorage( rStorageName, StreamMode::READ );
+ rtl::Reference<SotStorage> xSrcStor = rSrcStorage->OpenSotStorage( rStorageName, StreamMode::READ );
xSrcStor->CopyTo( xObjStor.get() );
if( !xObjStor->GetError() )
@@ -7304,7 +7427,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
else
{
// or is it an OLE-1 Stream in the DataStream?
- tools::SvRef<SotStorage> xObjStor = SotStorage::OpenOLEStorage( xDestStorage, aDstStgName );
+ rtl::Reference<SotStorage> xObjStor = SotStorage::OpenOLEStorage( xDestStorage, aDstStgName );
//TODO/MBA: remove metafile conversion from ConvertToOle2
//when is this code used?!
GDIMetaFile aMtf;
@@ -7401,12 +7524,11 @@ bool SvxMSDffManager::SetPropValue( const uno::Any& rAny, const uno::Reference<
}
SvxMSDffImportRec::SvxMSDffImportRec()
- : pObj( nullptr ),
- nClientAnchorLen( 0 ),
+ : nClientAnchorLen( 0 ),
nClientDataLen( 0 ),
nXAlign( 0 ), // position n cm from left
nYAlign( 0 ), // position n cm below
- nLayoutInTableCell( 0 ), // element is laid out in table cell
+ nGroupShapeBooleanProperties(0), // 16 settings: LayoutInCell/AllowOverlap/BehindDocument...
nFlags( ShapeFlag::NONE ),
nDxTextLeft( 144 ),
nDyTextTop( 72 ),
@@ -7420,7 +7542,6 @@ SvxMSDffImportRec::SvxMSDffImportRec()
nCropFromBottom( 0 ),
nCropFromLeft( 0 ),
nCropFromRight( 0 ),
- aTextId(),
nNextShapeId( 0 ),
nShapeId( 0 ),
eShapeType( mso_sptNil ),
@@ -7444,7 +7565,7 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
nXRelTo( rCopy.nXRelTo ),
nYAlign( rCopy.nYAlign ),
nYRelTo( rCopy.nYRelTo ),
- nLayoutInTableCell( rCopy.nLayoutInTableCell ),
+ nGroupShapeBooleanProperties(rCopy.nGroupShapeBooleanProperties),
nFlags( rCopy.nFlags ),
nDxTextLeft( rCopy.nDxTextLeft ),
nDyTextTop( rCopy.nDyTextTop ),
@@ -7496,7 +7617,7 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
pClientDataBuffer = nullptr;
if (rCopy.pWrapPolygon)
- pWrapPolygon.reset( new tools::Polygon(*rCopy.pWrapPolygon) );
+ pWrapPolygon = rCopy.pWrapPolygon;
}
SvxMSDffImportRec::~SvxMSDffImportRec()
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx
index d2236f62c30c..f57f3d25bd08 100644
--- a/filter/source/msfilter/msocximex.cxx
+++ b/filter/source/msfilter/msocximex.cxx
@@ -28,12 +28,13 @@
#include <com/sun/star/form/XForm.hpp>
#include <osl/diagnose.h>
#include <filter/msfilter/msocximex.hxx>
+#include <utility>
using namespace ::com::sun::star;
-constexpr OUStringLiteral sWW8_form( u"WW-Standard" );
+constexpr OUString sWW8_form( u"WW-Standard"_ustr );
-SvxMSConvertOCXControls::SvxMSConvertOCXControls( const uno::Reference< frame::XModel >& rxModel) : mxModel(rxModel)
+SvxMSConvertOCXControls::SvxMSConvertOCXControls( uno::Reference< frame::XModel > xModel) : mxModel(std::move(xModel))
{
}
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index da109342b6c9..5e0729be55bd 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -19,10 +19,6 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/configuration/theDefaultProvider.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
@@ -35,9 +31,9 @@
#include <sfx2/fcontnr.hxx>
#include <sot/formats.hxx>
#include <sot/storage.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <comphelper/fileformat.h>
-#include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <unotools/streamwrap.hxx>
#include <comphelper/storagehelper.hxx>
#include <svtools/embedhlp.hxx>
@@ -82,36 +78,6 @@ static OUString GetStorageType( const SvGlobalName& aEmbName )
return OUString();
}
-static bool UseOldMSExport()
-{
- uno::Reference< lang::XMultiServiceFactory > xProvider(
- configuration::theDefaultProvider::get(
- comphelper::getProcessComponentContext()));
- try {
- uno::Sequence< uno::Any > aArg( 1 );
- aArg[0] <<= OUString( "/org.openoffice.Office.Common/InternalMSExport" );
- uno::Reference< container::XNameAccess > xNameAccess(
- xProvider->createInstanceWithArguments(
- "com.sun.star.configuration.ConfigurationUpdateAccess",
- aArg ),
- uno::UNO_QUERY );
- if ( xNameAccess.is() )
- {
- uno::Any aResult = xNameAccess->getByName( "UseOldExport" );
-
- bool bResult;
- if ( aResult >>= bResult )
- return bResult;
- }
- }
- catch( const uno::Exception& )
- {
- }
-
- OSL_FAIL( "Could not get access to configuration entry!" );
- return false;
-}
-
void SvxMSExportOLEObjects::ExportOLEObject( const css::uno::Reference < css::embed::XEmbeddedObject>& rObj, SotStorage& rDestStg )
{
svt::EmbeddedObjectRef aObj( rObj, embed::Aspects::MSOLE_CONTENT );
@@ -189,13 +155,12 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj
rObj->changeState( embed::EmbedStates::RUNNING );
//TODO/LATER: is stream instead of outputstream a better choice?!
//TODO/LATER: a "StoreTo" method at embedded object would be nice
- uno::Sequence < beans::PropertyValue > aSeq(2);
SvStream* pStream = new SvMemoryStream;
- aSeq[0].Name = "OutputStream";
::uno::Reference < io::XOutputStream > xOut = new ::utl::OOutputStreamWrapper( *pStream );
- aSeq[0].Value <<= xOut;
- aSeq[1].Name = "FilterName";
- aSeq[1].Value <<= pExpFilter->GetName();
+ uno::Sequence < beans::PropertyValue > aSeq{
+ comphelper::makePropertyValue("OutputStream", xOut),
+ comphelper::makePropertyValue("FilterName", pExpFilter->GetName())
+ };
uno::Reference < frame::XStorable > xStor( rObj->getComponent(), uno::UNO_QUERY );
try
{
@@ -203,7 +168,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj
}
catch( const uno::Exception& ) {} // #TODO really handle exceptions - interactionalhandler etc. ?
- tools::SvRef<SotStorage> xOLEStor = new SotStorage( pStream, true );
+ rtl::Reference<SotStorage> xOLEStor = new SotStorage( pStream, true );
xOLEStor->CopyTo( &rDestStg );
rDestStg.Commit();
}
@@ -217,14 +182,14 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj
{
// own format, maybe SO6 format or lower
SvGlobalName aEmbName = GetEmbeddedVersion( aOwnGlobalName );
- if ( aEmbName != SvGlobalName() && !UseOldMSExport() )
+ if ( aEmbName != SvGlobalName() )
{
// this is a SO6 embedded object, save in old binary format
rDestStg.SetVersion( SOFFICE_FILEFORMAT_31 );
rDestStg.SetClass( aEmbName,
SotClipboardFormatId::EMBEDDED_OBJ_OLE,
GetStorageType( aEmbName ) );
- tools::SvRef<SotStorageStream> xExtStm = rDestStg.OpenSotStream(
+ rtl::Reference<SotStorageStream> xExtStm = rDestStg.OpenSotStream(
"properties_stream");
bool bExtentSuccess = false;
@@ -279,7 +244,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj
if ( bExtentSuccess )
{
- tools::SvRef<SotStorageStream> xEmbStm = rDestStg.OpenSotStream(
+ rtl::Reference<SotStorageStream> xEmbStm = rDestStg.OpenSotStream(
"package_stream");
if( !xEmbStm->GetError() )
{
@@ -289,10 +254,9 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj
rObj->changeState( embed::EmbedStates::RUNNING );
//TODO/LATER: is stream instead of outputstream a better choice?!
//TODO/LATER: a "StoreTo" method at embedded object would be nice
- uno::Sequence < beans::PropertyValue > aSeq(1);
- aSeq[0].Name = "OutputStream";
::uno::Reference < io::XOutputStream > xOut = new ::utl::OOutputStreamWrapper( *xEmbStm );
- aSeq[0].Value <<= xOut;
+ uno::Sequence < beans::PropertyValue > aSeq{ comphelper::makePropertyValue(
+ "OutputStream", xOut) };
uno::Reference < frame::XStorable > xStor( rObj->getComponent(), uno::UNO_QUERY );
xStor->storeToURL( "private:stream", aSeq );
}
@@ -327,7 +291,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj
catch ( const uno::Exception& )
{}
- tools::SvRef<SotStorage> xOLEStor = SotStorage::OpenOLEStorage( xStor, aTempName, StreamMode::STD_READ );
+ rtl::Reference<SotStorage> xOLEStor = SotStorage::OpenOLEStorage( xStor, aTempName, StreamMode::STD_READ );
xOLEStor->CopyTo( &rDestStg );
rDestStg.Commit();
}
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 817844e2364b..fa78dce52443 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -6,6 +6,10 @@
* 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/.
*/
+
+#include <sal/config.h>
+
+#include <comphelper/propertyvalue.hxx>
#include <filter/msfilter/mstoolbar.hxx>
#include <o3tl/safeint.hxx>
#include <sal/log.hxx>
@@ -19,6 +23,7 @@
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
+#include <utility>
#include <vcl/dibtools.hxx>
#include <vcl/graph.hxx>
#include <vcl/bitmapex.hxx>
@@ -53,8 +58,8 @@ void CustomToolBarImportHelper::applyIcons()
for (auto const& concommand : iconcommands)
{
uno::Sequence<OUString> commands { concommand.sCommand };
- uno::Sequence< uno::Reference< graphic::XGraphic > > images(1);
- images[ 0 ] = concommand.image;
+ uno::Sequence< uno::Reference< graphic::XGraphic > > images { concommand.image };
+ auto pimages = images.getArray();
uno::Reference< ui::XImageManager > xImageManager( getCfgManager()->getImageManager(), uno::UNO_QUERY_THROW );
sal_uInt16 nColor = ui::ImageType::COLOR_NORMAL;
@@ -63,9 +68,9 @@ void CustomToolBarImportHelper::applyIcons()
if ( topwin != nullptr && topwin->GetBackgroundColor().IsDark() )
nColor = css::ui::ImageType::COLOR_HIGHCONTRAST;
- ScaleImage( images[ 0 ], 16 );
+ ScaleImage( pimages[ 0 ], 16 );
xImageManager->replaceImages( ui::ImageType::SIZE_DEFAULT | nColor, commands, images );
- ScaleImage( images[ 0 ], 26 );
+ ScaleImage( pimages[ 0 ], 26 );
xImageManager->replaceImages( ui::ImageType::SIZE_LARGE | nColor, commands, images );
}
}
@@ -98,7 +103,7 @@ CustomToolBarImportHelper::createCommandFromMacro( std::u16string_view sCmd )
// create script url
OUString scriptURL
= OUString::Concat("vnd.sun.star.script:") + sCmd + "?language=Basic&location=document";
- return uno::makeAny( scriptURL );
+ return uno::Any( scriptURL );
}
OUString CustomToolBarImportHelper::MSOCommandToOOCommand( sal_Int16 msoCmd )
@@ -128,20 +133,17 @@ CustomToolBarImportHelper::createMenu( const OUString& rName, const uno::Referen
uno::Reference< container::XIndexContainer > xPopup( xCfgManager->createSettings(), uno::UNO_SET_THROW );
uno::Reference< beans::XPropertySet > xProps( xPopup, uno::UNO_QUERY_THROW );
// set name for menubar
- xProps->setPropertyValue("UIName", uno::makeAny( rName ) );
+ xProps->setPropertyValue("UIName", uno::Any( rName ) );
if ( xPopup.is() )
{
- uno::Sequence< beans::PropertyValue > aPopupMenu( 4 );
- aPopupMenu[0].Name = "CommandURL";
- aPopupMenu[0].Value <<= "vnd.openoffice.org:" + rName;
- aPopupMenu[1].Name = "Label";
- aPopupMenu[1].Value <<= rName;
- aPopupMenu[2].Name = "ItemDescriptorContainer";
- aPopupMenu[2].Value <<= xMenuDesc;
- aPopupMenu[3].Name = "Type";
- aPopupMenu[3].Value <<= sal_Int32( 0 );
-
- xPopup->insertByIndex( xPopup->getCount(), uno::makeAny( aPopupMenu ) );
+ uno::Sequence< beans::PropertyValue > aPopupMenu{
+ comphelper::makePropertyValue("CommandURL", "vnd.openoffice.org:" + rName),
+ comphelper::makePropertyValue("Label", rName),
+ comphelper::makePropertyValue("ItemDescriptorContainer", xMenuDesc),
+ comphelper::makePropertyValue("Type", sal_Int32( 0 ))
+ };
+
+ xPopup->insertByIndex( xPopup->getCount(), uno::Any( aPopupMenu ) );
xCfgManager->insertSettings( sMenuBar, xPopup );
uno::Reference< ui::XUIConfigurationPersistence > xPersistence( xCfgManager, uno::UNO_QUERY_THROW );
xPersistence->store();
@@ -218,7 +220,7 @@ void TBCHeader::Print( FILE* fp )
}
#endif
-TBCData::TBCData( const TBCHeader& Header ) : rHeader( Header )
+TBCData::TBCData( TBCHeader Header ) : rHeader(std::move( Header ))
{
}
@@ -301,7 +303,7 @@ void TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect
// according to the spec:
// "the iconMask is white in all the areas in which the icon is
// displayed as transparent and is black in all other areas."
- aBitEx = BitmapEx(aBitEx.GetBitmap(), rMaskBase.CreateMask(COL_WHITE));
+ aBitEx = BitmapEx(aBitEx.GetBitmap(), rMaskBase.CreateAlphaMask(COL_WHITE));
}
}
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index d6e4442c2584..17282aebf61a 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -28,9 +28,9 @@
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/script/vba/XVBACompatibility.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/frame/XModel.hpp>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <tools/urlobj.hxx>
#include <osl/file.hxx>
@@ -38,41 +38,43 @@
#include <unotools/pathoptions.hxx>
#include <rtl/character.hxx>
#include <sfx2/objsh.hxx>
-
+#include <o3tl/string_view.hxx>
#include <svtools/acceleratorexecute.hxx>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#include <map>
+#include <frozen/bits/defines.h>
+#include <frozen/bits/elsa_std.h>
+#include <frozen/unordered_map.h>
using namespace ::com::sun::star;
namespace ooo::vba {
-constexpr OUStringLiteral sUrlPart0( u"vnd.sun.star.script:" );
-constexpr OUStringLiteral sUrlPart1( u"?language=Basic&location=document" );
+constexpr OUString sUrlPart0( u"vnd.sun.star.script:"_ustr );
+constexpr OUString sUrlPart1( u"?language=Basic&location=document"_ustr );
OUString makeMacroURL( std::u16string_view sMacroName )
{
return sUrlPart0 + sMacroName + sUrlPart1;
}
-OUString extractMacroName( const OUString& rMacroUrl )
+OUString extractMacroName( std::u16string_view rMacroUrl )
{
- if( rMacroUrl.startsWith( sUrlPart0 ) && rMacroUrl.endsWith( sUrlPart1 ) )
+ if( o3tl::starts_with(rMacroUrl, sUrlPart0 ) && o3tl::ends_with(rMacroUrl, sUrlPart1 ) )
{
- return rMacroUrl.copy( sUrlPart0.getLength(),
- rMacroUrl.getLength() - sUrlPart0.getLength() - sUrlPart1.getLength() );
+ return OUString(rMacroUrl.substr( sUrlPart0.getLength(),
+ rMacroUrl.size() - sUrlPart0.getLength() - sUrlPart1.getLength() ));
}
return OUString();
}
-static OUString trimMacroName( const OUString& rMacroName )
+static std::u16string_view trimMacroName( std::u16string_view rMacroName )
{
// the name may contain whitespaces and may be enclosed in apostrophs
- OUString aMacroName = rMacroName.trim();
- sal_Int32 nMacroLen = aMacroName.getLength();
+ std::u16string_view aMacroName = o3tl::trim(rMacroName);
+ size_t nMacroLen = aMacroName.size();
if( (nMacroLen >= 2) && (aMacroName[ 0 ] == '\'') && (aMacroName[ nMacroLen - 1 ] == '\'') )
- aMacroName = aMacroName.copy( 1, nMacroLen - 2 ).trim();
+ aMacroName = o3tl::trim(aMacroName.substr( 1, nMacroLen - 2 ));
return aMacroName;
}
@@ -108,17 +110,17 @@ static SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath )
<< " and we look for " << aURL);
OUString aName = xModel->getURL() ;
if (aName.isEmpty())
+ {
+ uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_SET_THROW );
+ uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
+ xProps->getPropertyValue("Title") >>= aName;
+ aName = o3tl::trim(o3tl::getToken(aName, 0, '-'));
+ if( sMacroURLOrPath.lastIndexOf( aName ) >= 0 )
{
- uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_SET_THROW );
- uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
- xProps->getPropertyValue("Title") >>= aName;
- aName = aName.getToken(0, '-').trim();
- if( sMacroURLOrPath.lastIndexOf( aName ) >= 0 )
- {
- pFoundShell = pShell;
- break;
- }
+ pFoundShell = pShell;
+ break;
}
+ }
if ( sMacroURLOrPath.endsWithIgnoreAsciiCase( ".dot" ) )
{
@@ -171,59 +173,76 @@ static SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath )
// sMod can be empty ( but we really need the library to search in )
// if sMod is empty and a macro is found then sMod is updated
// if sMod is empty, only standard modules will be searched (no class, document, form modules)
-static bool hasMacro( SfxObjectShell const * pShell, const OUString& sLibrary, OUString& sMod, const OUString& sMacro )
+static bool hasMacro(SfxObjectShell const* pShell, const OUString& sLibrary, OUString& sMod,
+ const OUString& sMacro, bool bOnlyPublic, const OUString& sSkipModule)
{
- bool bFound = false;
-
#if !HAVE_FEATURE_SCRIPTING
(void) pShell;
(void) sLibrary;
(void) sMod;
(void) sMacro;
+ (void) bOnlyPublic;
+ (void) sSkipModule;
#else
- if ( !sLibrary.isEmpty() && !sMacro.isEmpty() )
+ if (sLibrary.isEmpty() || sMacro.isEmpty())
+ return false;
+
+ BasicManager* pBasicMgr = pShell->GetBasicManager();
+ if (!pBasicMgr)
+ return false;
+
+ StarBASIC* pBasic = pBasicMgr->GetLib(sLibrary);
+ if (!pBasic)
{
- BasicManager* pBasicMgr = pShell-> GetBasicManager();
- if ( pBasicMgr )
+ sal_uInt16 nId = pBasicMgr->GetLibId(sLibrary);
+ pBasicMgr->LoadLib(nId);
+ pBasic = pBasicMgr->GetLib(sLibrary);
+ }
+ if (!pBasic)
+ return false;
+
+ if (!sMod.isEmpty()) // we wish to find the macro is a specific module
+ {
+ SbModule* pModule = pBasic->FindModule(sMod);
+ if (!pModule)
+ return false;
+ SbMethod* pMeth = pModule->FindMethod(sMacro, SbxClassType::Method);
+
+ // Must be compiled before we can trust SbxFlagBits::Private
+ if (pMeth && bOnlyPublic && !pModule->IsCompiled())
+ pModule->Compile();
+
+ return pMeth && (!bOnlyPublic || !pMeth->IsSet(SbxFlagBits::Private));
+ }
+
+ for (auto const& rModuleRef : pBasic->GetModules())
+ {
+ SbMethod* pMeth = rModuleRef->FindMethod(sMacro, SbxClassType::Method);
+ if (pMeth)
{
- StarBASIC* pBasic = pBasicMgr->GetLib( sLibrary );
- if ( !pBasic )
- {
- sal_uInt16 nId = pBasicMgr->GetLibId( sLibrary );
- pBasicMgr->LoadLib( nId );
- pBasic = pBasicMgr->GetLib( sLibrary );
- }
- if ( pBasic )
+ if (rModuleRef->GetName() == sSkipModule)
+ continue;
+
+ if (bOnlyPublic)
{
- if ( !sMod.isEmpty() ) // we wish to find the macro is a specific module
- {
- SbModule* pModule = pBasic->FindModule( sMod );
- if ( pModule && pModule->FindMethod( sMacro, SbxClassType::Method ))
- {
- bFound = true;
- }
- }
- else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxClassType::Method ) ) )
- {
- if( SbModule* pModule = pMethod->GetModule() )
- {
- // when searching for a macro without module name, do not search in class/document/form modules
- if( pModule->GetModuleType() == script::ModuleType::NORMAL )
- {
- sMod = pModule->GetName();
- bFound = true;
- }
- }
- }
+ if (!rModuleRef->IsCompiled())
+ rModuleRef->Compile();
+
+ if (pMeth->IsSet(SbxFlagBits::Private))
+ continue;
}
+ sMod = rModuleRef->GetName();
+ return true;
}
}
#endif
- return bFound;
+ return false;
}
#endif
+#if HAVE_FEATURE_SCRIPTING
+
OUString getDefaultProjectName( SfxObjectShell const * pShell )
{
OUString aPrjName;
@@ -236,8 +255,6 @@ OUString getDefaultProjectName( SfxObjectShell const * pShell )
return aPrjName;
}
-#if HAVE_FEATURE_SCRIPTING
-
static void parseMacro( const OUString& sMacro, OUString& sContainer, OUString& sModule, OUString& sProcedure )
{
sal_Int32 nMacroDot = sMacro.lastIndexOf( '.' );
@@ -246,7 +263,7 @@ static void parseMacro( const OUString& sMacro, OUString& sContainer, OUString&
{
sProcedure = sMacro.copy( nMacroDot + 1 );
- sal_Int32 nContainerDot = sMacro.lastIndexOf( '.', nMacroDot - 1 );
+ const sal_Int32 nContainerDot = sMacro.lastIndexOf('.', nMacroDot);
if ( nContainerDot != -1 )
{
sModule = sMacro.copy( nContainerDot + 1, nMacroDot - nContainerDot - 1 );
@@ -261,19 +278,23 @@ static void parseMacro( const OUString& sMacro, OUString& sContainer, OUString&
#endif
-OUString resolveVBAMacro( SfxObjectShell const * pShell, const OUString& rLibName, const OUString& rModuleName, const OUString& rMacroName )
+OUString resolveVBAMacro(SfxObjectShell const* pShell, const OUString& rLibName,
+ const OUString& rModuleName, const OUString& rMacroName,
+ bool bOnlyPublic, const OUString& sSkipModule)
{
#if !HAVE_FEATURE_SCRIPTING
(void) pShell;
(void) rLibName;
(void) rModuleName;
(void) rMacroName;
+ (void) bOnlyPublic;
+ (void) sSkipModule;
#else
if( pShell )
{
OUString aLibName = rLibName.isEmpty() ? getDefaultProjectName( pShell ) : rLibName ;
OUString aModuleName = rModuleName;
- if( hasMacro( pShell, aLibName, aModuleName, rMacroName ) )
+ if (hasMacro(pShell, aLibName, aModuleName, rMacroName, bOnlyPublic, sSkipModule))
return aLibName + "." + aModuleName + "." + rMacroName;
}
#endif
@@ -293,34 +314,34 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const OUString& Macro
return MacroResolvedInfo();
// the name may be enclosed in apostrophs
- OUString aMacroName = trimMacroName( MacroName );
+ std::u16string_view aMacroName = trimMacroName( MacroName );
// parse the macro name
- sal_Int32 nDocSepIndex = aMacroName.indexOf( '!' );
- if( nDocSepIndex > 0 )
+ size_t nDocSepIndex = aMacroName.find( '!' );
+ if( nDocSepIndex > 0 && nDocSepIndex != std::u16string_view::npos )
{
// macro specified by document name
// find document shell for document name and call ourselves
// recursively
// assume for now that the document name is *this* document
- OUString sDocUrlOrPath = aMacroName.copy( 0, nDocSepIndex );
- aMacroName = aMacroName.copy( nDocSepIndex + 1 );
+ std::u16string_view sDocUrlOrPath = aMacroName.substr( 0, nDocSepIndex );
+ aMacroName = aMacroName.substr( nDocSepIndex + 1 );
SAL_INFO("filter.ms", "doc search, current shell is " << pShell);
SfxObjectShell* pFoundShell = nullptr;
if( bSearchGlobalTemplates )
{
SvtPathOptions aPathOpt;
const OUString& aAddinPath = aPathOpt.GetAddinPath();
- if( sDocUrlOrPath.startsWith( aAddinPath ) )
+ if( o3tl::starts_with(sDocUrlOrPath, aAddinPath) )
pFoundShell = pShell;
}
if( !pFoundShell )
- pFoundShell = findShellForUrl( sDocUrlOrPath );
+ pFoundShell = findShellForUrl( OUString(sDocUrlOrPath) );
SAL_INFO(
"filter.ms",
"doc search, after find, found shell is " << pFoundShell);
- return resolveVBAMacro( pFoundShell, aMacroName );
+ return resolveVBAMacro( pFoundShell, OUString(aMacroName) );
}
// macro is contained in 'this' document ( or code imported from a template
@@ -331,7 +352,7 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const OUString& Macro
// macro format = Container.Module.Procedure
OUString sContainer, sModule, sProcedure;
- parseMacro( aMacroName, sContainer, sModule, sProcedure );
+ parseMacro( OUString(aMacroName), sContainer, sModule, sProcedure );
#if 0
// As long as service VBAProjectNameProvider isn't supported in the model, disable the createInstance call
@@ -444,7 +465,7 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const OUString& Macro
for (auto const& search : sSearchList)
{
- aRes.mbFound = hasMacro( pShell, search, sModule, sProcedure );
+ aRes.mbFound = hasMacro(pShell, search, sModule, sProcedure, /*bOnlyPublic=*/false, "");
if ( aRes.mbFound )
{
sContainer = search;
@@ -484,10 +505,11 @@ bool executeMacro( SfxObjectShell* pShell, const OUString& sMacroName, uno::Sequ
// convert any out params to seem like they were inputs
if (nLen)
{
+ auto pArgs = aArgs.getArray();
for (sal_Int32 index = 0; index < nLen; ++index)
{
sal_Int32 nOutIndex = aOutArgsIndex[index];
- aArgs[nOutIndex] = aOutArgs[index];
+ pArgs[nOutIndex] = aOutArgs[index];
}
}
bRes = ( nErr == ERRCODE_NONE );
@@ -538,8 +560,7 @@ void SAL_CALL VBAMacroResolver::initialize( const uno::Sequence< uno::Any >& rAr
// first argument: document model
mxModel.set( rArgs[ 0 ], uno::UNO_QUERY_THROW );
- uno::Reference< lang::XUnoTunnel > xUnoTunnel( mxModel, uno::UNO_QUERY_THROW );
- mpObjShell = reinterpret_cast< SfxObjectShell* >( xUnoTunnel->getSomething( SfxObjectShell::getUnoTunnelId() ) );
+ mpObjShell = comphelper::getFromUnoTunnel<SfxObjectShell>(mxModel);
if( !mpObjShell )
throw uno::RuntimeException();
@@ -556,7 +577,7 @@ OUString SAL_CALL VBAMacroResolver::resolveVBAMacroToScriptURL( const OUString&
throw uno::RuntimeException();
// the name may be enclosed in apostrophs
- OUString aMacroName = trimMacroName( rVBAMacroName );
+ OUString aMacroName( trimMacroName( rVBAMacroName ) );
if( aMacroName.isEmpty() )
throw lang::IllegalArgumentException();
@@ -624,95 +645,82 @@ static sal_uInt16 parseChar( sal_Unicode c )
return nVclKey;
}
-namespace {
+namespace
+{
-struct KeyCodeEntry
+constexpr frozen::unordered_map<std::u16string_view, sal_uInt16, 34> s_KeyCodes
{
- const char* sName;
- sal_uInt16 nCode;
+ { u"BACKSPACE", KEY_BACKSPACE },
+ { u"BS", KEY_BACKSPACE },
+ { u"DELETE", KEY_DELETE },
+ { u"DEL", KEY_DELETE },
+ { u"DOWN", KEY_DOWN },
+ { u"UP", KEY_UP },
+ { u"LEFT", KEY_LEFT },
+ { u"RIGHT", KEY_RIGHT },
+ { u"END", KEY_END },
+ { u"ESCAPE", KEY_ESCAPE },
+ { u"ESC", KEY_ESCAPE },
+ { u"HELP", KEY_HELP },
+ { u"HOME", KEY_HOME },
+ { u"PGDN", KEY_PAGEDOWN },
+ { u"PGUP", KEY_PAGEUP },
+ { u"INSERT", KEY_INSERT },
+ { u"SCROLLLOCK", KEY_SCROLLLOCK },
+ { u"NUMLOCK", KEY_NUMLOCK },
+ { u"TAB", KEY_TAB },
+ { u"F1", KEY_F1 },
+ { u"F2", KEY_F2 },
+ { u"F3", KEY_F3 },
+ { u"F4", KEY_F4 },
+ { u"F5", KEY_F5 },
+ { u"F6", KEY_F6 },
+ { u"F7", KEY_F7 },
+ { u"F8", KEY_F8 },
+ { u"F9", KEY_F9 },
+ { u"F10", KEY_F10 },
+ { u"F11", KEY_F11 },
+ { u"F12", KEY_F12 },
+ { u"F13", KEY_F13 },
+ { u"F14", KEY_F14 },
+ { u"F15", KEY_F15 }
};
-}
+} // end anonymous namespace
-KeyCodeEntry const aMSKeyCodesData[] = {
- { "BACKSPACE", KEY_BACKSPACE },
- { "BS", KEY_BACKSPACE },
- { "DELETE", KEY_DELETE },
- { "DEL", KEY_DELETE },
- { "DOWN", KEY_DOWN },
- { "UP", KEY_UP },
- { "LEFT", KEY_LEFT },
- { "RIGHT", KEY_RIGHT },
- { "END", KEY_END },
- { "ESCAPE", KEY_ESCAPE },
- { "ESC", KEY_ESCAPE },
- { "HELP", KEY_HELP },
- { "HOME", KEY_HOME },
- { "PGDN", KEY_PAGEDOWN },
- { "PGUP", KEY_PAGEUP },
- { "INSERT", KEY_INSERT },
- { "SCROLLLOCK", KEY_SCROLLLOCK },
- { "NUMLOCK", KEY_NUMLOCK },
- { "TAB", KEY_TAB },
- { "F1", KEY_F1 },
- { "F2", KEY_F2 },
- { "F3", KEY_F3 },
- { "F4", KEY_F4 },
- { "F5", KEY_F5 },
- { "F6", KEY_F6 },
- { "F7", KEY_F7 },
- { "F8", KEY_F8 },
- { "F9", KEY_F9 },
- { "F10", KEY_F10 },
- { "F11", KEY_F11 },
- { "F12", KEY_F12 },
- { "F13", KEY_F13 },
- { "F14", KEY_F14 },
- { "F15", KEY_F15 },
-};
-
-awt::KeyEvent parseKeyEvent( const OUString& Key )
+awt::KeyEvent parseKeyEvent( std::u16string_view Key )
{
- static std::map< OUString, sal_uInt16 > s_KeyCodes = [&]()
- {
- std::map< OUString, sal_uInt16 > tmp;
- for (KeyCodeEntry const & i : aMSKeyCodesData)
- {
- tmp[ OUString::createFromAscii( i.sName ) ] = i.nCode;
- }
- return tmp;
- }();
- OUString sKeyCode;
+ std::u16string_view sKeyCode;
sal_uInt16 nVclKey = 0;
// parse the modifier if any
- for ( int i=0; i<Key.getLength(); ++i )
+ for ( size_t i=0; i<Key.size(); ++i )
{
if ( ! getModifier( Key[ i ], nVclKey ) )
{
- sKeyCode = Key.copy( i );
+ sKeyCode = Key.substr( i );
break;
}
}
// check if keycode is surrounded by '{}', if so scoop out the contents
// else it should be just one char of ( 'a-z,A-Z,0-9' )
- if ( sKeyCode.getLength() == 1 ) // ( a single char )
+ if ( sKeyCode.size() == 1 ) // ( a single char )
{
nVclKey |= parseChar( sKeyCode[ 0 ] );
}
else // key should be enclosed in '{}'
{
- if ( sKeyCode.getLength() < 3 || sKeyCode[0] != '{' || sKeyCode[sKeyCode.getLength() - 1 ] != '}' )
+ if ( sKeyCode.size() < 3 || sKeyCode[0] != '{' || sKeyCode[sKeyCode.size() - 1 ] != '}' )
throw uno::RuntimeException();
- sKeyCode = sKeyCode.copy(1, sKeyCode.getLength() - 2 );
+ sKeyCode = sKeyCode.substr(1, sKeyCode.size() - 2 );
- if ( sKeyCode.getLength() == 1 )
+ if ( sKeyCode.size() == 1 )
nVclKey |= parseChar( sKeyCode[ 0 ] );
else
{
- auto it = s_KeyCodes.find( sKeyCode );
+ auto it = s_KeyCodes.find(sKeyCode);
if ( it == s_KeyCodes.end() ) // unknown or unsupported
throw uno::RuntimeException();
nVclKey |= it->second;
@@ -730,12 +738,11 @@ void applyShortCutKeyBinding ( const uno::Reference< frame::XModel >& rxModel, c
{
OUString aMacroName = MacroName.trim();
if( aMacroName.startsWith("!") )
- MacroName = aMacroName.copy(1).trim();
+ aMacroName = o3tl::trim(aMacroName.subView(1));
SfxObjectShell* pShell = nullptr;
if ( rxModel.is() )
{
- uno::Reference< lang::XUnoTunnel > xObjShellTunnel( rxModel, uno::UNO_QUERY_THROW );
- pShell = reinterpret_cast<SfxObjectShell*>( xObjShellTunnel->getSomething(SfxObjectShell::getUnoTunnelId()));
+ pShell = comphelper::getFromUnoTunnel<SfxObjectShell>(rxModel);
if ( !pShell )
throw uno::RuntimeException();
}
diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx
index 4d6c5dda2fea..b5a06c929e7d 100644
--- a/filter/source/msfilter/rtfutil.cxx
+++ b/filter/source/msfilter/rtfutil.cxx
@@ -26,12 +26,12 @@ namespace
void WrapOle1InOle2(SvStream& rOle1, sal_uInt32 nOle1Size, SvStream& rOle2,
const OString& rClassName)
{
- tools::SvRef<SotStorage> pStorage = new SotStorage(rOle2);
+ rtl::Reference<SotStorage> pStorage = new SotStorage(rOle2);
OString aAnsiUserType;
SvGlobalName aName;
if (rClassName == "PBrush")
{
- aAnsiUserType = "Bitmap Image";
+ aAnsiUserType = "Bitmap Image"_ostr;
aName = SvGlobalName(0x0003000A, 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
}
else
@@ -40,13 +40,13 @@ void WrapOle1InOle2(SvStream& rOle1, sal_uInt32 nOle1Size, SvStream& rOle2,
{
SAL_WARN("filter.ms", "WrapOle1InOle2: unexpected class name: '" << rClassName << "'");
}
- aAnsiUserType = "OLE Package";
+ aAnsiUserType = "OLE Package"_ostr;
aName = SvGlobalName(0x0003000C, 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
}
pStorage->SetClass(aName, SotClipboardFormatId::NONE, "");
// [MS-OLEDS] 2.3.7 CompObjHeader
- tools::SvRef<SotStorageStream> pCompObj = pStorage->OpenSotStream("\1CompObj");
+ rtl::Reference<SotStorageStream> pCompObj = pStorage->OpenSotStream("\1CompObj");
// Reserved1
pCompObj->WriteUInt32(0xfffe0001);
// Version
@@ -65,9 +65,8 @@ void WrapOle1InOle2(SvStream& rOle1, sal_uInt32 nOle1Size, SvStream& rOle2,
// AnsiClipboardFormat
pCompObj->WriteUInt32(0x00000000);
// Reserved1
- OString aReserved1(rClassName);
- pCompObj->WriteUInt32(aReserved1.getLength() + 1);
- pCompObj->WriteOString(aReserved1);
+ pCompObj->WriteUInt32(rClassName.getLength() + 1);
+ pCompObj->WriteOString(rClassName);
pCompObj->WriteChar(0);
// UnicodeMarker
pCompObj->WriteUInt32(0x71B239F4);
@@ -81,7 +80,7 @@ void WrapOle1InOle2(SvStream& rOle1, sal_uInt32 nOle1Size, SvStream& rOle2,
pCompObj.clear();
// [MS-OLEDS] 2.3.6 OLENativeStream
- tools::SvRef<SotStorageStream> pOleNative = pStorage->OpenSotStream("\1Ole10Native");
+ rtl::Reference<SotStorageStream> pOleNative = pStorage->OpenSotStream("\1Ole10Native");
// NativeDataSize
pOleNative->WriteUInt32(nOle1Size);
pOleNative->WriteStream(rOle1, nOle1Size);
@@ -181,20 +180,17 @@ OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool* pS
{
if (*pUCMode != nLen)
{
- aBuf.append("\\uc");
- aBuf.append(nLen);
+ aBuf.append("\\uc" + OString::number(nLen));
// #i47831# add an additional whitespace, so that "document whitespaces" are not ignored.
aBuf.append(' ');
*pUCMode = nLen;
}
- aBuf.append("\\u");
- aBuf.append(static_cast<sal_Int32>(c));
+ aBuf.append("\\u" + OString::number(static_cast<sal_Int32>(c)));
}
for (sal_Int32 nI = 0; nI < nLen; ++nI)
{
- aBuf.append("\\'");
- aBuf.append(OutHex(sConverted[nI], 2));
+ aBuf.append("\\'" + OutHex(sConverted[nI], 2));
}
}
}
@@ -214,28 +210,26 @@ OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool* pS
return aBuf.makeStringAndClear();
}
-OString OutString(const OUString& rStr, rtl_TextEncoding eDestEnc, bool bUnicode)
+OString OutString(std::u16string_view rStr, rtl_TextEncoding eDestEnc, bool bUnicode)
{
- SAL_INFO("filter.ms", __func__ << ", rStr = '" << rStr << "'");
OStringBuffer aBuf;
int nUCMode = 1;
- for (sal_Int32 n = 0; n < rStr.getLength(); ++n)
+ for (size_t n = 0; n < rStr.size(); ++n)
aBuf.append(OutChar(rStr[n], &nUCMode, eDestEnc, nullptr, bUnicode));
if (nUCMode != 1)
{
- aBuf.append(OOO_STRING_SVTOOLS_RTF_UC);
- aBuf.append(sal_Int32(1));
aBuf.append(
- " "); // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored.;
+ OOO_STRING_SVTOOLS_RTF_UC + OString::number(sal_Int32(1))
+ + " "); // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored.;
}
return aBuf.makeStringAndClear();
}
/// Checks if lossless conversion of the string to eDestEnc is possible or not.
-static bool TryOutString(const OUString& rStr, rtl_TextEncoding eDestEnc)
+static bool TryOutString(std::u16string_view rStr, rtl_TextEncoding eDestEnc)
{
int nUCMode = 1;
- for (sal_Int32 n = 0; n < rStr.getLength(); ++n)
+ for (size_t n = 0; n < rStr.size(); ++n)
{
bool bRet;
OutChar(rStr[n], &nUCMode, eDestEnc, &bRet);
@@ -245,22 +239,15 @@ static bool TryOutString(const OUString& rStr, rtl_TextEncoding eDestEnc)
return true;
}
-OString OutStringUpr(const char* pToken, const OUString& rStr, rtl_TextEncoding eDestEnc)
+OString OutStringUpr(std::string_view pToken, std::u16string_view rStr, rtl_TextEncoding eDestEnc)
{
if (TryOutString(rStr, eDestEnc))
- return OStringLiteral("{") + pToken + " " + OutString(rStr, eDestEnc) + "}";
+ return OString::Concat("{") + pToken + " " + OutString(rStr, eDestEnc) + "}";
- OStringBuffer aRet;
- aRet.append("{" OOO_STRING_SVTOOLS_RTF_UPR "{");
- aRet.append(pToken);
- aRet.append(" ");
- aRet.append(OutString(rStr, eDestEnc, /*bUnicode =*/false));
- aRet.append("}{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_UD "{");
- aRet.append(pToken);
- aRet.append(" ");
- aRet.append(OutString(rStr, eDestEnc));
- aRet.append("}}}");
- return aRet.makeStringAndClear();
+ return OString::Concat("{" OOO_STRING_SVTOOLS_RTF_UPR "{") + pToken + " "
+ + OutString(rStr, eDestEnc, /*bUnicode =*/false)
+ + "}{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_UD "{" + pToken + " "
+ + OutString(rStr, eDestEnc) + "}}}";
}
int AsHex(char ch)
@@ -303,7 +290,7 @@ OString WriteHex(const sal_uInt8* pData, sal_uInt32 nSize, SvStream* pStream, sa
if (++nBreak == nLimit)
{
if (pStream)
- pStream->WriteCharPtr(SAL_NEWLINE_STRING);
+ pStream->WriteOString(SAL_NEWLINE_STRING);
else
aRet.append(SAL_NEWLINE_STRING);
nBreak = 0;
@@ -341,50 +328,50 @@ bool ExtractOLE2FromObjdata(const OString& rObjdata, SvStream& rOle2)
}
// Skip ObjectHeader, see [MS-OLEDS] 2.2.4.
- if (aStream.Tell())
+ if (!aStream.Tell())
+ return true;
+
+ aStream.Seek(0);
+ sal_uInt32 nData;
+ aStream.ReadUInt32(nData); // OLEVersion
+ aStream.ReadUInt32(nData); // FormatID
+ aStream.ReadUInt32(nData); // ClassName
+ OString aClassName;
+ if (nData)
{
- aStream.Seek(0);
- sal_uInt32 nData;
- aStream.ReadUInt32(nData); // OLEVersion
- aStream.ReadUInt32(nData); // FormatID
- aStream.ReadUInt32(nData); // ClassName
- OString aClassName;
- if (nData)
- {
- // -1 because it is null-terminated.
- aClassName = read_uInt8s_ToOString(aStream, nData - 1);
- // Skip null-termination.
- aStream.SeekRel(1);
- }
- aStream.ReadUInt32(nData); // TopicName
- aStream.SeekRel(nData);
- aStream.ReadUInt32(nData); // ItemName
- aStream.SeekRel(nData);
- aStream.ReadUInt32(nData); // NativeDataSize
+ // -1 because it is null-terminated.
+ aClassName = read_uInt8s_ToOString(aStream, nData - 1);
+ // Skip null-termination.
+ aStream.SeekRel(1);
+ }
+ aStream.ReadUInt32(nData); // TopicName
+ aStream.SeekRel(nData);
+ aStream.ReadUInt32(nData); // ItemName
+ aStream.SeekRel(nData);
+ aStream.ReadUInt32(nData); // NativeDataSize
- if (nData)
- {
- sal_uInt64 nPos = aStream.Tell();
- sal_uInt8 aSignature[8];
- aStream.ReadBytes(aSignature, SAL_N_ELEMENTS(aSignature));
- aStream.Seek(nPos);
- const sal_uInt8 aOle2Signature[8] = { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 };
- // Don't use Storage::IsStorageFile() here, that would seek to the start of the stream,
- // where the magic will always mismatch.
- if (std::memcmp(aSignature, aOle2Signature, SAL_N_ELEMENTS(aSignature)) == 0)
- {
- // NativeData
- rOle2.WriteStream(aStream, nData);
- }
- else
- {
- SvMemoryStream aStorage;
- WrapOle1InOle2(aStream, nData, aStorage, aClassName);
- rOle2.WriteStream(aStorage);
- }
- rOle2.Seek(0);
- }
+ if (!nData)
+ return true;
+
+ sal_uInt64 nPos = aStream.Tell();
+ sal_uInt8 aSignature[8];
+ aStream.ReadBytes(aSignature, std::size(aSignature));
+ aStream.Seek(nPos);
+ const sal_uInt8 aOle2Signature[8] = { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 };
+ // Don't use Storage::IsStorageFile() here, that would seek to the start of the stream,
+ // where the magic will always mismatch.
+ if (std::memcmp(aSignature, aOle2Signature, sizeof(aSignature)) == 0)
+ {
+ // NativeData
+ rOle2.WriteStream(aStream, nData);
}
+ else
+ {
+ SvMemoryStream aStorage;
+ WrapOle1InOle2(aStream, nData, aStorage, aClassName);
+ rOle2.WriteStream(aStorage);
+ }
+ rOle2.Seek(0);
return true;
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 1d7a36032d4c..42b31c99af02 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -20,11 +20,11 @@
#include <sal/config.h>
#include <osl/endian.h>
+#include <utility>
#include <vcl/svapp.hxx>
#include <unotools/tempfile.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/UnitConversion.hxx>
-#include <math.h>
#include <editeng/eeitem.hxx>
#include <editeng/editdata.hxx>
#include <sot/storage.hxx>
@@ -53,6 +53,7 @@
#include <svx/svdopath.hxx>
#include <svx/svdotable.hxx>
#include <svx/xfillit0.hxx>
+#include <svx/xfilluseslidebackgrounditem.hxx>
#include <svx/xflbstit.hxx>
#include <svx/xflbmtit.hxx>
#include <svx/xflclit.hxx>
@@ -100,7 +101,6 @@
#include <editeng/brushitem.hxx>
#include <editeng/langitem.hxx>
#include <svx/svdoole2.hxx>
-#include <svx/unoapi.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
@@ -126,7 +126,6 @@
#include <algorithm>
#include <cassert>
-#include <utility>
#include <rtl/strbuf.hxx>
#include <tools/time.hxx>
#include <memory>
@@ -172,7 +171,7 @@ SvStream& ReadPptCurrentUserAtom( SvStream& rIn, PptCurrentUserAtom& rAtom )
if ( aHd.nRecType == PPT_PST_CurrentUserAtom )
{
sal_uInt32 nLen;
- sal_uInt16 nUserNameLen, nPad;
+ sal_uInt16 nUserNameLen(0), nPad;
rIn.ReadUInt32( nLen )
.ReadUInt32( rAtom.nMagic )
.ReadUInt32( rAtom.nCurrentUserEdit )
@@ -218,7 +217,7 @@ sal_uInt16 PptSlidePersistList::FindPage(sal_uInt32 nId) const
return PPTSLIDEPERSIST_ENTRY_NOTFOUND;
}
-SvStream& ReadPptInteractiveInfoAtom( SvStream& rIn, PptInteractiveInfoAtom& rAtom )
+bool ReadPptInteractiveInfoAtom( SvStream& rIn, PptInteractiveInfoAtom& rAtom )
{
rIn.ReadUInt32( rAtom.nSoundRef )
.ReadUInt32( rAtom.nExHyperlinkId )
@@ -230,7 +229,7 @@ SvStream& ReadPptInteractiveInfoAtom( SvStream& rIn, PptInteractiveInfoAtom& rAt
.ReadUChar( rAtom.nUnknown1 )
.ReadUChar( rAtom.nUnknown2 )
.ReadUChar( rAtom.nUnknown3 );
- return rIn;
+ return rIn.good();
}
SvStream& ReadPptExOleObjAtom( SvStream& rIn, PptExOleObjAtom& rAtom )
@@ -264,9 +263,9 @@ SvStream& ReadPptDocumentAtom(SvStream& rIn, PptDocumentAtom& rAtom)
// 39 bShowComments 1
DffRecordHeader aHd;
- sal_Int32 nSlideX,nSlideY, nNoticeX, nNoticeY, nDummy;
- sal_uInt16 nSlidePageFormat;
- sal_Int8 nEmbeddedTrueType, nTitlePlaceHoldersOmitted, nRightToLeft, nShowComments;
+ sal_Int32 nSlideX(0), nSlideY(0), nNoticeX(0), nNoticeY(0), nDummy;
+ sal_uInt16 nSlidePageFormat(0);
+ sal_Int8 nEmbeddedTrueType(0), nTitlePlaceHoldersOmitted(0), nRightToLeft(0), nShowComments(0);
ReadDffRecordHeader( rIn, aHd );
rIn
@@ -484,7 +483,7 @@ void PptOEPlaceholderAtom::Clear()
SvStream& ReadPptOEPlaceholderAtom( SvStream& rIn, PptOEPlaceholderAtom& rAtom )
{
rIn.ReadUInt32( rAtom.nPlacementId );
- sal_uInt8 nTmp;
+ sal_uInt8 nTmp(0);
rIn.ReadUChar(nTmp);
rAtom.nPlaceholderId = static_cast<PptPlaceholder>(nTmp);
rIn.ReadUChar( rAtom.nPlaceholderSize );
@@ -496,7 +495,6 @@ PptSlidePersistEntry::PptSlidePersistEntry() :
nSlidePersistEndOffset ( 0 ),
nBackgroundOffset ( 0 ),
nDrawingDgId ( 0xffffffff ),
- pBObj ( nullptr ),
ePageKind ( PPT_MASTERPAGE ),
bNotesMaster ( false ),
bHandoutMaster ( false ),
@@ -556,12 +554,11 @@ bool SdrEscherImport::SeekToShape( SvStream& /*rSt*/, SvxMSDffClientData* /*pCli
return false;
}
-PptFontEntityAtom* SdrEscherImport::GetFontEnityAtom( sal_uInt32 nNum ) const
+const PptFontEntityAtom* SdrEscherImport::GetFontEnityAtom( sal_uInt32 nNum ) const
{
- PptFontEntityAtom* pRetValue = nullptr;
- if (m_pFonts && (nNum < m_pFonts->size()))
- pRetValue = (*m_pFonts)[ nNum ].get();
- return pRetValue;
+ if (m_xFonts && nNum < m_xFonts->size())
+ return &(*m_xFonts)[ nNum ];
+ return nullptr;
}
SdrObject* SdrEscherImport::ReadObjText( PPTTextObj* /*pTextObj*/, SdrObject* pObj, SdPageCapsule /*pPage*/) const
@@ -585,6 +582,11 @@ void SdrEscherImport::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd,
r = rs;
b = bs;
}
+ if (!rSt.good())
+ {
+ SAL_WARN("filter.ms", "ProcessClientAnchor2: short read");
+ return;
+ }
Scale( l );
Scale( t );
Scale( r );
@@ -628,7 +630,7 @@ void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic
{
for ( ; i > 0; i-- )
{
- sal_uInt32 nPos = rSt.Tell();
+ sal_uInt64 nPos = rSt.Tell();
sal_uInt16 nChanged;
rSt.ReadUInt16( nChanged );
if ( nChanged & 1 )
@@ -727,13 +729,13 @@ void ProcessData::NotifyFreeObj(SdrObject* pObj)
The parameter pOriginalObj is the object as it was imported by our general escher import, it must either
be deleted or it can be returned to be inserted into the sdr page.
*/
-SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, SvxMSDffClientData& rClientData, tools::Rectangle& rTextRect, SdrObject* pOriginalObj )
+rtl::Reference<SdrObject> SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, SvxMSDffClientData& rClientData, tools::Rectangle& rTextRect, SdrObject* pOriginalObj )
{
if ( dynamic_cast<const SdrObjCustomShape* >(pOriginalObj) != nullptr )
pOriginalObj->SetMergedItem( SdrTextFixedCellHeightItem( true ) );
// we are initializing our return value with the object that was imported by our escher import
- SdrObject* pRet = pOriginalObj;
+ rtl::Reference<SdrObject> pRet = pOriginalObj;
ProcessData& rData = static_cast<ProcessData&>(rClientData);
PptSlidePersistEntry& rPersistEntry = rData.rPersistEntry;
@@ -778,12 +780,12 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
case PPT_PST_RecolorInfoAtom :
{
- if ( auto pSdrGrafObj = dynamic_cast<const SdrGrafObj* >(pRet) )
+ if ( auto pSdrGrafObj = dynamic_cast<SdrGrafObj* >(pRet.get()) )
if ( pSdrGrafObj->HasGDIMetaFile() )
{
Graphic aGraphic( pSdrGrafObj->GetGraphic() );
RecolorGraphic( rSt, aClientDataHd.nRecLen, aGraphic );
- static_cast<SdrGrafObj*>(pRet)->SetGraphic( aGraphic );
+ pSdrGrafObj->SetGraphic( aGraphic );
}
}
break;
@@ -799,7 +801,6 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
nPageNum--;
// replacing the object which we will return with a SdrPageObj
- SdrObject::Free( pRet );
pRet = new SdrPageObj(
*pSdrModel,
rObjData.aBoundRect,
@@ -846,11 +847,13 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
aTextObj.SetVertical( bVerticalText );
if ( pRet )
{
- bool bDeleteSource = aTextObj.GetOEPlaceHolderAtom() != nullptr;
- if ( bDeleteSource && dynamic_cast<const SdrGrafObj* >(pRet) == nullptr // we are not allowed to get
- && dynamic_cast<const SdrObjGroup* >(pRet) == nullptr // grouped placeholder objects
- && dynamic_cast<const SdrOle2Obj* >(pRet) == nullptr )
- SdrObject::Free( pRet );
+ bool bDeleteSource = aTextObj.GetOEPlaceHolderAtom().has_value();
+ if ( bDeleteSource && dynamic_cast<const SdrGrafObj* >(pRet.get()) == nullptr // we are not allowed to get
+ && dynamic_cast<const SdrObjGroup* >(pRet.get()) == nullptr // grouped placeholder objects
+ && dynamic_cast<const SdrOle2Obj* >(pRet.get()) == nullptr )
+ {
+ pRet = nullptr;
+ }
}
sal_uInt32 nTextFlags = aTextObj.GetTextFlags();
sal_Int32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 25 * 3600 ); // 0.25 cm (emu)
@@ -983,18 +986,18 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
nMinFrameHeight = rTextRect.GetHeight() - ( nTextTop + nTextBottom );
}
- SdrObjKind eTextKind = OBJ_RECT;
+ SdrObjKind eTextKind = SdrObjKind::Rectangle;
if ( ( aPlaceholderAtom.nPlaceholderId == PptPlaceholder::NOTESSLIDEIMAGE )
|| ( aPlaceholderAtom.nPlaceholderId == PptPlaceholder::MASTERNOTESSLIDEIMAGE ) )
{
aTextObj.SetInstance( TSS_Type::Notes );
- eTextKind = OBJ_TITLETEXT;
+ eTextKind = SdrObjKind::TitleText;
}
else if ( ( aPlaceholderAtom.nPlaceholderId == PptPlaceholder::MASTERNOTESBODYIMAGE )
|| ( aPlaceholderAtom.nPlaceholderId == PptPlaceholder::NOTESBODY ) )
{
aTextObj.SetInstance( TSS_Type::Notes );
- eTextKind = OBJ_TEXT;
+ eTextKind = SdrObjKind::Text;
}
TSS_Type nDestinationInstance = aTextObj.GetInstance();
@@ -1032,11 +1035,11 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
switch ( aTextObj.GetInstance() )
{
case TSS_Type::PageTitle :
- case TSS_Type::Title : eTextKind = OBJ_TITLETEXT; break;
- case TSS_Type::Subtitle : eTextKind = OBJ_TEXT; break;
+ case TSS_Type::Title : eTextKind = SdrObjKind::TitleText; break;
+ case TSS_Type::Subtitle : eTextKind = SdrObjKind::Text; break;
case TSS_Type::Body :
case TSS_Type::HalfBody :
- case TSS_Type::QuarterBody : eTextKind = OBJ_OUTLINETEXT; bAutoFit = true; break;
+ case TSS_Type::QuarterBody : eTextKind = SdrObjKind::OutlineText; bAutoFit = true; break;
default: break;
}
if ( aTextObj.GetDestinationInstance() != TSS_Type::TextInShape )
@@ -1044,14 +1047,14 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
if ( !aTextObj.GetOEPlaceHolderAtom() || aTextObj.GetOEPlaceHolderAtom()->nPlaceholderId == PptPlaceholder::NONE )
{
aTextObj.SetDestinationInstance( TSS_Type::TextInShape );
- eTextKind = OBJ_RECT;
+ eTextKind = SdrObjKind::Rectangle;
}
}
- SdrObject* pTObj = nullptr;
+ rtl::Reference<SdrObject> pTObj;
bool bWordWrap = GetPropertyValue(DFF_Prop_WrapText, mso_wrapSquare) != mso_wrapNone;
bool bFitShapeToText = ( GetPropertyValue( DFF_Prop_FitTextToShape, 0 ) & 2 ) != 0;
- if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr && ( eTextKind == OBJ_RECT ) )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pRet.get()) != nullptr && ( eTextKind == SdrObjKind::Rectangle ) )
{
bAutoGrowHeight = bFitShapeToText;
bAutoGrowWidth = !bWordWrap;
@@ -1060,14 +1063,13 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
}
else
{
- if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pRet.get()) != nullptr )
{
- SdrObject::Free( pRet );
pRet = nullptr;
}
pTObj = new SdrRectObj(
*pSdrModel,
- eTextKind != OBJ_RECT ? eTextKind : OBJ_TEXT);
+ eTextKind != SdrObjKind::Rectangle ? eTextKind : SdrObjKind::Text);
SfxItemSet aSet( pSdrModel->GetItemPool() );
if ( !pRet )
ApplyAttributes( rSt, aSet, rObjData );
@@ -1101,7 +1103,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
pTObj->SetMergedItem( SdrTextFitToSizeTypeItem(drawing::TextFitToSizeType_AUTOFIT) );
}
- if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj.get()) == nullptr )
{
pTObj->SetMergedItem( makeSdrTextAutoGrowWidthItem( bAutoGrowWidth ) );
pTObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( bAutoGrowHeight ) );
@@ -1117,12 +1119,12 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
if ( nMinFrameHeight < 0 )
nMinFrameHeight = 0;
- if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj.get()) == nullptr )
pTObj->SetMergedItem( makeSdrTextMinFrameHeightItem( nMinFrameHeight ) );
if ( nMinFrameWidth < 0 )
nMinFrameWidth = 0;
- if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj.get()) == nullptr )
pTObj->SetMergedItem( makeSdrTextMinFrameWidthItem( nMinFrameWidth ) );
// set margins at the borders of the textbox
@@ -1132,9 +1134,9 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
pTObj->SetMergedItem( makeSdrTextLowerDistItem( nTextBottom ) );
pTObj->SetMergedItem( SdrTextFixedCellHeightItem( true ) );
- if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj.get()) == nullptr )
pTObj->SetSnapRect( rTextRect );
- pTObj = ReadObjText( &aTextObj, pTObj, rData.pPage );
+ pTObj = ReadObjText( &aTextObj, pTObj.get(), rData.pPage );
if ( pTObj )
{
@@ -1144,9 +1146,9 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
snaprect of the object. Then we will use
ADJUST_CENTER instead of ADJUST_BLOCK.
*/
- if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr && !bFitShapeToText && !bWordWrap )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj.get()) == nullptr && !bFitShapeToText && !bWordWrap )
{
- SdrTextObj* pText = dynamic_cast<SdrTextObj*>( pTObj );
+ SdrTextObj* pText = DynCastSdrTextObj( pTObj.get() );
if ( pText )
{
if ( bVerticalText )
@@ -1177,12 +1179,11 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
Degree100 nAngle = ( rObjData.nSpFlags & ShapeFlag::FlipV ) ? -mnFix16Angle : mnFix16Angle; // #72116# vertical flip -> rotate by using the other way
nAngle += nTextRotationAngle;
- if ( dynamic_cast< const SdrObjCustomShape* >(pTObj) == nullptr )
+ if ( dynamic_cast< const SdrObjCustomShape* >(pTObj.get()) == nullptr )
{
if ( rObjData.nSpFlags & ShapeFlag::FlipV )
{
- double a = 18000 * F_PI18000;
- pTObj->Rotate( rTextRect.Center(), 18000_deg100, sin( a ), cos( a ) );
+ pTObj->Rotate( rTextRect.Center(), 18000_deg100, 0.0, -1.0 );
}
if ( rObjData.nSpFlags & ShapeFlag::FlipH )
nAngle = 36000_deg100 - nAngle;
@@ -1191,13 +1192,13 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
}
if ( pRet )
{
- SdrObject* pGroup = new SdrObjGroup(*pSdrModel);
- pGroup->GetSubList()->NbcInsertObject( pRet );
- pGroup->GetSubList()->NbcInsertObject( pTObj );
+ rtl::Reference<SdrObject> pGroup = new SdrObjGroup(*pSdrModel);
+ pGroup->GetSubList()->NbcInsertObject( pRet.get() );
+ pGroup->GetSubList()->NbcInsertObject( pTObj.get() );
pRet = pGroup;
}
else
- pRet = pTObj;
+ pRet = pTObj.get();
}
}
}
@@ -1253,11 +1254,11 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
for (auto & pPtr : rPersistEntry.xSolverContainer->aCList)
{
if ( rObjData.nShapeId == pPtr->nShapeC )
- pPtr->pCObj = pRet;
+ pPtr->pCObj = pRet.get();
else
{
- SdrObject* pConnectObj = pRet;
- if ( pOriginalObj && dynamic_cast< const SdrObjGroup* >(pRet) != nullptr )
+ SdrObject* pConnectObj = pRet.get();
+ if ( pOriginalObj && dynamic_cast< const SdrObjGroup* >(pRet.get()) != nullptr )
{ /* check if the original object from the escherimport is part of the group object,
if this is the case, we will use the original object to connect to */
SdrObjListIter aIter( *pRet, SdrIterMode::DeepWithGroups );
@@ -1294,13 +1295,6 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx
maFidcls[ nSec ].dgid = rPersistEntry.nDrawingDgId; // insert the correct drawing id;
}
}
- if ( GetPropertyValue( DFF_Prop_fNoFillHitTest, 0 ) & 0x10 )
- {
- if (GetPropertyValue(DFF_Prop_fillType, mso_fillSolid) == mso_fillBackground)
- {
- rData.aBackgroundColoredObjects.push_back( pRet );
- }
- }
}
return pRet;
}
@@ -1318,8 +1312,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
{
if ( m_bOk )
{
- rStCtrl.Seek( STREAM_SEEK_TO_END );
- nStreamLen = rStCtrl.Tell();
+ nStreamLen = rStCtrl.TellEnd();
// try to allocate the UserEditAtom via CurrentUserAtom
sal_uInt32 nCurrentUserEdit = rParam.aCurrentUserAtom.nCurrentUserEdit;
@@ -1457,7 +1450,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
if ( m_bOk )
{
- if (!m_pFonts)
+ if (!m_xFonts)
ReadFontCollection();
// reading TxPF, TxSI
@@ -1678,7 +1671,7 @@ SdrPowerPointImport::~SdrPowerPointImport()
m_pNotePages.reset();
}
-bool PPTConvertOCXControls::ReadOCXStream( tools::SvRef<SotStorage>& rSrc,
+bool PPTConvertOCXControls::ReadOCXStream( rtl::Reference<SotStorage>& rSrc,
css::uno::Reference< css::drawing::XShape > *pShapeRef )
{
bool bRes = false;
@@ -1783,7 +1776,7 @@ void PPTConvertOCXControls::GetDrawPage()
static bool SdrPowerPointOLEDecompress( SvStream& rOutput, SvStream& rInput, sal_uInt32 nInputSize )
{
- sal_uInt32 nOldPos = rInput.Tell();
+ sal_uInt64 nOldPos = rInput.Tell();
std::unique_ptr<char[]> pBuf(new char[ nInputSize ]);
rInput.ReadBytes(pBuf.get(), nInputSize);
ZCodec aZCodec( 0x8000, 0x8000 );
@@ -1796,15 +1789,15 @@ static bool SdrPowerPointOLEDecompress( SvStream& rOutput, SvStream& rInput, sal
}
// #i32596# - add new parameter <_nCalledByGroup>
-SdrObject* SdrPowerPointImport::ImportOLE( sal_uInt32 nOLEId,
+rtl::Reference<SdrObject> SdrPowerPointImport::ImportOLE( sal_uInt32 nOLEId,
const Graphic& rGraf,
const tools::Rectangle& rBoundRect,
const tools::Rectangle& rVisArea,
const int /*_nCalledByGroup*/ ) const
{
- SdrObject* pRet = nullptr;
+ rtl::Reference<SdrObject> pRet;
- sal_uInt32 nOldPos = rStCtrl.Tell();
+ sal_uInt64 nOldPos = rStCtrl.Tell();
Graphic aGraphic( rGraf );
@@ -1847,138 +1840,129 @@ SdrObject* SdrPowerPointImport::ImportOLE( sal_uInt32 nOLEId,
rStCtrl.SeekRel( 4 );
- ::utl::TempFile aTmpFile;
- aTmpFile.EnableKillingFile();
-
- if ( aTmpFile.IsValid() )
+ ::utl::TempFileFast aTmpFile;
+ SvStream* pDest = aTmpFile.GetStream(StreamMode::READWRITE);
+ if (pDest)
{
- SvStream* pDest = aTmpFile.GetStream(StreamMode::TRUNC | StreamMode::WRITE);
- if (pDest)
- {
- bSuccess = SdrPowerPointOLEDecompress( *pDest, rStCtrl, nLen );
- }
- aTmpFile.CloseStream();
+ bSuccess = SdrPowerPointOLEDecompress( *pDest, rStCtrl, nLen );
}
if ( bSuccess )
{
- SvStream* pDest = aTmpFile.GetStream(StreamMode::READ);
- Storage* pObjStor = pDest ? new Storage( *pDest, true ) : nullptr;
- if (pObjStor)
+ pDest->Seek(0);
+ Storage* pObjStor = new Storage(*pDest, false);
+ rtl::Reference<SotStorage> xObjStor(new SotStorage(pObjStor));
+ if ( xObjStor.is() && !xObjStor->GetError() )
{
- tools::SvRef<SotStorage> xObjStor( new SotStorage( pObjStor ) );
- if ( xObjStor.is() && !xObjStor->GetError() )
+ if ( xObjStor->GetClassName() == SvGlobalName() )
{
- if ( xObjStor->GetClassName() == SvGlobalName() )
- {
- xObjStor->SetClass( SvGlobalName( pObjStor->GetClassId() ), pObjStor->GetFormat(), pObjStor->GetUserName() );
+ xObjStor->SetClass( SvGlobalName( pObjStor->GetClassId() ), pObjStor->GetFormat(), pObjStor->GetUserName() );
+ }
+ rtl::Reference<SotStorageStream> xSrcTst = xObjStor->OpenSotStream("\1Ole");
+ if ( xSrcTst.is() )
+ {
+ sal_uInt8 aTestA[ 10 ];
+ bool bGetItAsOle = (sizeof(aTestA) == xSrcTst->ReadBytes(aTestA, sizeof(aTestA)));
+ if ( !bGetItAsOle )
+ { // maybe there is a contents stream in here
+ xSrcTst = xObjStor->OpenSotStream( "Contents", StreamMode::READWRITE | StreamMode::NOCREATE );
+ bGetItAsOle = (xSrcTst.is() &&
+ sizeof(aTestA) == xSrcTst->ReadBytes(aTestA, sizeof(aTestA)));
}
- tools::SvRef<SotStorageStream> xSrcTst = xObjStor->OpenSotStream( "\1Ole" );
- if ( xSrcTst.is() )
+ if ( bGetItAsOle )
{
- sal_uInt8 aTestA[ 10 ];
- bool bGetItAsOle = (sizeof(aTestA) == xSrcTst->ReadBytes(aTestA, sizeof(aTestA)));
- if ( !bGetItAsOle )
- { // maybe there is a contents stream in here
- xSrcTst = xObjStor->OpenSotStream( "Contents", StreamMode::READWRITE | StreamMode::NOCREATE );
- bGetItAsOle = (xSrcTst.is() &&
- sizeof(aTestA) == xSrcTst->ReadBytes(aTestA, sizeof(aTestA)));
- }
- if ( bGetItAsOle )
+ OUString aNm;
+ // if ( nSvxMSDffOLEConvFlags )
{
- OUString aNm;
- // if ( nSvxMSDffOLEConvFlags )
+ uno::Reference < embed::XStorage > xDestStorage( rOe.pShell->GetStorage() );
+ uno::Reference < embed::XEmbeddedObject > xObj =
+ CheckForConvertToSOObj(nSvxMSDffOLEConvFlags, *xObjStor, xDestStorage, rGraf, rVisArea, maBaseURL);
+ if( xObj.is() )
{
- uno::Reference < embed::XStorage > xDestStorage( rOe.pShell->GetStorage() );
- uno::Reference < embed::XEmbeddedObject > xObj =
- CheckForConvertToSOObj(nSvxMSDffOLEConvFlags, *xObjStor, xDestStorage, rGraf, rVisArea, maBaseURL);
- if( xObj.is() )
- {
- rOe.pShell->getEmbeddedObjectContainer().InsertEmbeddedObject( xObj, aNm );
+ rOe.pShell->getEmbeddedObjectContainer().InsertEmbeddedObject( xObj, aNm );
- svt::EmbeddedObjectRef aObj( xObj, rOe.nAspect );
+ svt::EmbeddedObjectRef aObj( xObj, rOe.nAspect );
- // TODO/LATER: need MediaType for Graphic
- aObj.SetGraphic( rGraf, OUString() );
- pRet = new SdrOle2Obj(
- *pSdrModel,
- aObj,
- aNm,
- rBoundRect);
- }
+ // TODO/LATER: need MediaType for Graphic
+ aObj.SetGraphic( rGraf, OUString() );
+ pRet = new SdrOle2Obj(
+ *pSdrModel,
+ aObj,
+ aNm,
+ rBoundRect);
}
- if ( !pRet && ( rOe.nType == PPT_PST_ExControl ) )
- {
- uno::Reference< frame::XModel > xModel( rOe.pShell->GetModel() );
- PPTConvertOCXControls aPPTConvertOCXControls( this, xModel, m_eCurrentPageKind );
- css::uno::Reference< css::drawing::XShape > xShape;
- if ( aPPTConvertOCXControls.ReadOCXStream( xObjStor, &xShape ) )
- pRet = GetSdrObjectFromXShape( xShape );
+ }
+ if ( !pRet && ( rOe.nType == PPT_PST_ExControl ) )
+ {
+ uno::Reference< frame::XModel > xModel( rOe.pShell->GetModel() );
+ PPTConvertOCXControls aPPTConvertOCXControls( this, xModel, m_eCurrentPageKind );
+ css::uno::Reference< css::drawing::XShape > xShape;
+ if ( aPPTConvertOCXControls.ReadOCXStream( xObjStor, &xShape ) )
+ pRet = SdrObject::getSdrObjectFromXShape(xShape);
- }
- if ( !pRet )
- {
- aNm = rOe.pShell->getEmbeddedObjectContainer().CreateUniqueObjectName();
+ }
+ if ( !pRet )
+ {
+ aNm = rOe.pShell->getEmbeddedObjectContainer().CreateUniqueObjectName();
- // object is not an own object
- const css::uno::Reference < css::embed::XStorage >& rStorage = rOe.pShell->GetStorage();
- if (rStorage.is())
+ // object is not an own object
+ const css::uno::Reference < css::embed::XStorage >& rStorage = rOe.pShell->GetStorage();
+ if (rStorage.is())
+ {
+ rtl::Reference<SotStorage> xTarget = SotStorage::OpenOLEStorage(rStorage, aNm, StreamMode::READWRITE);
+ if (xObjStor.is() && xTarget.is())
{
- tools::SvRef<SotStorage> xTarget = SotStorage::OpenOLEStorage(rStorage, aNm, StreamMode::READWRITE);
- if (xObjStor.is() && xTarget.is())
- {
- xObjStor->CopyTo(xTarget.get());
- if (!xTarget->GetError())
- xTarget->Commit();
- }
- xTarget.clear();
+ xObjStor->CopyTo(xTarget.get());
+ if (!xTarget->GetError())
+ xTarget->Commit();
}
+ xTarget.clear();
+ }
- uno::Reference < embed::XEmbeddedObject > xObj =
- rOe.pShell->getEmbeddedObjectContainer().GetEmbeddedObject( aNm );
- if ( xObj.is() )
+ uno::Reference < embed::XEmbeddedObject > xObj =
+ rOe.pShell->getEmbeddedObjectContainer().GetEmbeddedObject( aNm );
+ if ( xObj.is() )
+ {
+ if ( rOe.nAspect != embed::Aspects::MSOLE_ICON )
{
- if ( rOe.nAspect != embed::Aspects::MSOLE_ICON )
+ //TODO/LATER: keep on hacking?!
+ // we don't want to be modified
+ //xInplaceObj->EnableSetModified( sal_False );
+ if ( rVisArea.IsEmpty() )
{
- //TODO/LATER: keep on hacking?!
- // we don't want to be modified
- //xInplaceObj->EnableSetModified( sal_False );
- if ( rVisArea.IsEmpty() )
- {
- MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( rOe.nAspect ) );
- Size aSize( OutputDevice::LogicToLogic( aGraphic.GetPrefSize(),
- aGraphic.GetPrefMapMode(), MapMode( aMapUnit ) ) );
-
- awt::Size aSz;
- aSz.Width = aSize.Width();
- aSz.Height = aSize.Height();
- xObj->setVisualAreaSize( rOe.nAspect, aSz );
- }
- else
- {
- awt::Size aSize( rVisArea.GetSize().Width(), rVisArea.GetSize().Height() );
- xObj->setVisualAreaSize( rOe.nAspect, aSize );
- }
- //xInplaceObj->EnableSetModified( sal_True );
+ MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( rOe.nAspect ) );
+ Size aSize( OutputDevice::LogicToLogic( aGraphic.GetPrefSize(),
+ aGraphic.GetPrefMapMode(), MapMode( aMapUnit ) ) );
+
+ awt::Size aSz;
+ aSz.Width = aSize.Width();
+ aSz.Height = aSize.Height();
+ xObj->setVisualAreaSize( rOe.nAspect, aSz );
}
+ else
+ {
+ awt::Size aSize( rVisArea.GetSize().Width(), rVisArea.GetSize().Height() );
+ xObj->setVisualAreaSize( rOe.nAspect, aSize );
+ }
+ //xInplaceObj->EnableSetModified( sal_True );
+ }
- svt::EmbeddedObjectRef aObj( xObj, rOe.nAspect );
+ svt::EmbeddedObjectRef aObj( xObj, rOe.nAspect );
- // TODO/LATER: need MediaType for Graphic
- aObj.SetGraphic( aGraphic, OUString() );
+ // TODO/LATER: need MediaType for Graphic
+ aObj.SetGraphic( aGraphic, OUString() );
- pRet = new SdrOle2Obj(
- *pSdrModel,
- aObj,
- aNm,
- rBoundRect);
- }
+ pRet = new SdrOle2Obj(
+ *pSdrModel,
+ aObj,
+ aNm,
+ rBoundRect);
}
}
}
}
}
- aTmpFile.CloseStream();
}
+ aTmpFile.CloseStream();
}
}
rStCtrl.Seek( nOldPos );
@@ -2024,7 +2008,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
DffRecordHeader* pHd;
- sal_uInt32 nOldPos = rStCtrl.Tell();
+ sal_uInt64 nOldPos = rStCtrl.Tell();
if ( nFilterOptions & 1 )
{
pHd = aDocRecManager.GetRecordHeader( PPT_PST_List );
@@ -2045,16 +2029,16 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
std::unique_ptr<SvMemoryStream> pBas = ImportExOleObjStg( nPersistPtr, nOleId );
if ( pBas )
{
- tools::SvRef<SotStorage> xSource( new SotStorage( pBas.release(), true ) );
- tools::SvRef<SotStorage> xDest( new SotStorage( new SvMemoryStream(), true ) );
+ rtl::Reference<SotStorage> xSource(new SotStorage(pBas.release(), true));
+ rtl::Reference<SotStorage> xDest( new SotStorage( new SvMemoryStream(), true ) );
if ( xSource.is() && xDest.is() )
{
// is this a visual basic storage ?
- tools::SvRef<SotStorage> xSubStorage = xSource->OpenSotStorage( "VBA",
+ rtl::Reference<SotStorage> xSubStorage = xSource->OpenSotStorage( "VBA",
StreamMode::READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL );
if( xSubStorage.is() && ( ERRCODE_NONE == xSubStorage->GetError() ) )
{
- tools::SvRef<SotStorage> xMacros = xDest->OpenSotStorage( "MACROS" );
+ rtl::Reference<SotStorage> xMacros = xDest->OpenSotStorage( "MACROS" );
if ( xMacros.is() )
{
SvStorageInfoList aList;
@@ -2073,13 +2057,13 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
uno::Reference < embed::XStorage > xDoc( pShell->GetStorage() );
if ( xDoc.is() )
{
- tools::SvRef<SotStorage> xVBA = SotStorage::OpenOLEStorage( xDoc, SvxImportMSVBasic::GetMSBasicStorageName() );
+ rtl::Reference<SotStorage> xVBA = SotStorage::OpenOLEStorage( xDoc, SvxImportMSVBasic::GetMSBasicStorageName() );
if ( xVBA.is() && ( xVBA->GetError() == ERRCODE_NONE ) )
{
- tools::SvRef<SotStorage> xSubVBA = xVBA->OpenSotStorage( "_MS_VBA_Overhead" );
+ rtl::Reference<SotStorage> xSubVBA = xVBA->OpenSotStorage( "_MS_VBA_Overhead" );
if ( xSubVBA.is() && ( xSubVBA->GetError() == ERRCODE_NONE ) )
{
- tools::SvRef<SotStorageStream> xOriginal = xSubVBA->OpenSotStream( "_MS_VBA_Overhead2" );
+ rtl::Reference<SotStorageStream> xOriginal = xSubVBA->OpenSotStream( "_MS_VBA_Overhead2" );
if ( xOriginal.is() && ( xOriginal->GetError() == ERRCODE_NONE ) )
{
if ( nPersistPtr && ( nPersistPtr < m_nPersistPtrCnt ) )
@@ -2121,7 +2105,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
DffRecordHeader* pExEmbed = nullptr;
pHd->SeekToBegOfRecord( rStCtrl );
- std::unique_ptr<DffRecordManager> pExObjListManager(new DffRecordManager( rStCtrl ));
+ DffRecordManager aExObjListManager( rStCtrl );
sal_uInt16 i, nRecType(PPT_PST_ExEmbed);
for ( i = 0; i < 2; i++ )
@@ -2131,8 +2115,8 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
case 0 : nRecType = PPT_PST_ExEmbed; break;
case 1 : nRecType = PPT_PST_ExControl; break;
}
- for ( pExEmbed = pExObjListManager->GetRecordHeader( nRecType );
- pExEmbed; pExEmbed = pExObjListManager->GetRecordHeader( nRecType, SEEK_FROM_CURRENT ) )
+ for ( pExEmbed = aExObjListManager.GetRecordHeader( nRecType );
+ pExEmbed; pExEmbed = aExObjListManager.GetRecordHeader( nRecType, SEEK_FROM_CURRENT ) )
{
pExEmbed->SeekToContent( rStCtrl );
@@ -2168,7 +2152,7 @@ bool SdrPowerPointImport::ReadFontCollection()
DffRecordHeader* pEnvHd = aDocRecManager.GetRecordHeader( PPT_PST_Environment );
if ( pEnvHd )
{
- sal_uLong nOldFPos = rStCtrl.Tell(); // remember FilePos for restoring it later
+ sal_uInt64 nOldFPos = rStCtrl.Tell(); // remember FilePos for restoring it later
pEnvHd->SeekToContent( rStCtrl );
DffRecordHeader aListHd;
if ( SeekToRec( rStCtrl, PPT_PST_FontCollection, pEnvHd->GetRecEndFilePos(), &aListHd ) )
@@ -2177,33 +2161,33 @@ bool SdrPowerPointImport::ReadFontCollection()
while ( SeekToRec( rStCtrl, PPT_PST_FontEntityAtom, aListHd.GetRecEndFilePos() ) )
{
bRet = true;
- if (!m_pFonts)
- m_pFonts.reset( new std::vector<std::unique_ptr<PptFontEntityAtom>> );
- std::unique_ptr<PptFontEntityAtom> pFont(new PptFontEntityAtom);
- ReadPptFontEntityAtom( rStCtrl, *pFont );
+ if (!m_xFonts)
+ m_xFonts.emplace();
+ PptFontEntityAtom aFontAtom;
+ ReadPptFontEntityAtom( rStCtrl, aFontAtom );
vcl::Font aFont;
- aFont.SetCharSet( pFont->eCharSet );
- aFont.SetFamilyName( pFont->aName );
- aFont.SetFamily( pFont->eFamily );
- aFont.SetPitch( pFont->ePitch );
+ aFont.SetCharSet( aFontAtom.eCharSet );
+ aFont.SetFamilyName( aFontAtom.aName );
+ aFont.SetFamily( aFontAtom.eFamily );
+ aFont.SetPitch( aFontAtom.ePitch );
aFont.SetFontHeight( 100 );
// following block is necessary, because our old PowerPoint export did not set the
// correct charset
- if ( pFont->aName.equalsIgnoreAsciiCase( "Wingdings" ) ||
- pFont->aName.equalsIgnoreAsciiCase( "Wingdings 2" ) ||
- pFont->aName.equalsIgnoreAsciiCase( "Wingdings 3" ) ||
- pFont->aName.equalsIgnoreAsciiCase( "Monotype Sorts" ) ||
- pFont->aName.equalsIgnoreAsciiCase( "Monotype Sorts 2" ) ||
- pFont->aName.equalsIgnoreAsciiCase( "Webdings" ) ||
- pFont->aName.equalsIgnoreAsciiCase( "StarBats" ) ||
- pFont->aName.equalsIgnoreAsciiCase( "StarMath" ) ||
- pFont->aName.equalsIgnoreAsciiCase( "ZapfDingbats" ) )
+ if ( aFontAtom.aName.equalsIgnoreAsciiCase( "Wingdings" ) ||
+ aFontAtom.aName.equalsIgnoreAsciiCase( "Wingdings 2" ) ||
+ aFontAtom.aName.equalsIgnoreAsciiCase( "Wingdings 3" ) ||
+ aFontAtom.aName.equalsIgnoreAsciiCase( "Monotype Sorts" ) ||
+ aFontAtom.aName.equalsIgnoreAsciiCase( "Monotype Sorts 2" ) ||
+ aFontAtom.aName.equalsIgnoreAsciiCase( "Webdings" ) ||
+ aFontAtom.aName.equalsIgnoreAsciiCase( "StarBats" ) ||
+ aFontAtom.aName.equalsIgnoreAsciiCase( "StarMath" ) ||
+ aFontAtom.aName.equalsIgnoreAsciiCase( "ZapfDingbats" ) )
{
- pFont->eCharSet = RTL_TEXTENCODING_SYMBOL;
+ aFontAtom.eCharSet = RTL_TEXTENCODING_SYMBOL;
};
- m_pFonts->insert(m_pFonts->begin() + nCount2++, std::move(pFont));
+ m_xFonts->insert(m_xFonts->begin() + nCount2++, std::move(aFontAtom));
}
}
rStCtrl.Seek( nOldFPos ); // restore FilePos
@@ -2236,7 +2220,7 @@ SdrOutliner* SdrPowerPointImport::GetDrawOutliner( SdrTextObj const * pSdrText )
SdrObject* SdrPowerPointImport::ReadObjText( PPTTextObj* pTextObj, SdrObject* pSdrObj, SdPageCapsule pPage ) const
{
- SdrTextObj* pText = dynamic_cast<SdrTextObj*>( pSdrObj );
+ SdrTextObj* pText = DynCastSdrTextObj( pSdrObj );
if ( pText )
{
if ( !ApplyTextObj( pTextObj, pText, pPage, nullptr, nullptr ) )
@@ -2256,11 +2240,10 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
bool bUndoEnabled = rOutliner.IsUndoEnabled();
rOutliner.EnableUndo(false);
- if ( ( pText->GetObjInventor() == SdrInventor::Default ) && ( pText->GetObjIdentifier() == OBJ_TITLETEXT ) ) // Outliner-Style for Title-Text object?!? (->of DL)
+ if ( ( pText->GetObjInventor() == SdrInventor::Default ) && ( pText->GetObjIdentifier() == SdrObjKind::TitleText ) ) // Outliner-Style for Title-Text object?!? (->of DL)
rOutliner.Init( OutlinerMode::TitleObject ); // Outliner reset
- bool bOldUpdateMode = rOutliner.GetUpdateMode();
- rOutliner.SetUpdateMode( false );
+ bool bOldUpdateMode = rOutliner.SetUpdateLayout( false );
if ( pSheet )
{
if ( rOutliner.GetStyleSheet( 0 ) != pSheet )
@@ -2287,7 +2270,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
sal_uInt32 nFont;
pPortion->GetAttrib( PPT_CharAttr_Font, nFont, pTextObj->GetInstance() );
- PptFontEntityAtom* pFontEnityAtom = GetFontEnityAtom( nFont );
+ const PptFontEntityAtom* pFontEnityAtom = GetFontEnityAtom( nFont );
if ( pFontEnityAtom && ( pFontEnityAtom->eCharSet == RTL_TEXTENCODING_SYMBOL ) )
{
sal_Unicode nUnicode;
@@ -2359,6 +2342,8 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
pPara->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet2, nDestinationInstance );
if ( !nIsBullet2 )
aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, false ) );
+ else
+ aParagraphAttribs.Put( SfxInt16Item(EE_PARA_OUTLLEVEL, pPara->mxParaSet->mnDepth));
if ( !aSelection.nStartPos ) // in PPT empty paragraphs never gets a bullet
{
@@ -2368,9 +2353,9 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
rOutliner.QuickSetAttribs( aParagraphAttribs, aSelection );
}
}
- std::unique_ptr<OutlinerParaObject> pNewText = rOutliner.CreateParaObject();
+ std::optional<OutlinerParaObject> pNewText = rOutliner.CreateParaObject();
rOutliner.Clear();
- rOutliner.SetUpdateMode( bOldUpdateMode );
+ rOutliner.SetUpdateLayout( bOldUpdateMode );
rOutliner.EnableUndo(bUndoEnabled);
pText->SetOutlinerParaObject( std::move(pNewText) );
}
@@ -2380,7 +2365,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
bool SdrPowerPointImport::SeekToDocument( DffRecordHeader* pRecHd ) const
{
bool bRet;
- sal_uLong nOldFPos = rStCtrl.Tell(); // remember FilePos for restoring it should the situation arise
+ sal_uInt64 nOldFPos = rStCtrl.Tell(); // remember FilePos for restoring it, if the situation should happen
rStCtrl.Seek( m_nDocStreamPos );
DffRecordHeader aDocHd;
ReadDffRecordHeader( rStCtrl, aDocHd );
@@ -2401,7 +2386,7 @@ bool SdrPowerPointImport::SeekToContentOfProgTag( sal_Int32 nVersion, SvStream&
const DffRecordHeader& rSourceHd, DffRecordHeader& rContentHd )
{
bool bRetValue = false;
- sal_uInt32 nOldPos = rSt.Tell();
+ sal_uInt64 nOldPos = rSt.Tell();
DffRecordHeader aProgTagsHd, aProgTagBinaryDataHd;
rSourceHd.SeekToContent( rSt );
@@ -2517,7 +2502,7 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind )
pMasterPersist = &(*pPageList)[ nMasterIndex ];
}
m_pPPTStyleSheet = pMasterPersist->xStyleSheet.get();
- }
+ }
}
if ( !m_pPPTStyleSheet )
m_pPPTStyleSheet = m_pDefaultSheet;
@@ -2637,7 +2622,7 @@ bool SdrPowerPointImport::SeekToShape( SvStream& rSt, SvxMSDffClientData* pClien
nCurrent = pCList->nCurrent;
if ( const_cast<SdrPowerPointImport*>(this)->maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
{
- sal_uInt32 nStreamPos = rSt.Tell();
+ sal_uInt64 nStreamPos = rSt.Tell();
PPTTextObj aTextObj( rSt, const_cast<SdrPowerPointImport&>(*this), rPersistEntry, nullptr );
if ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() )
{
@@ -2678,9 +2663,9 @@ bool SdrPowerPointImport::SeekToShape( SvStream& rSt, SvxMSDffClientData* pClien
return bRet;
}
-SdrPage* SdrPowerPointImport::MakeBlancPage( bool bMaster ) const
+rtl::Reference<SdrPage> SdrPowerPointImport::MakeBlankPage( bool bMaster ) const
{
- SdrPage* pRet = pSdrModel->AllocPage( bMaster );
+ rtl::Reference<SdrPage> pRet = pSdrModel->AllocPage( bMaster );
pRet->SetSize( GetPageSize() );
return pRet;
@@ -2764,7 +2749,7 @@ static void ImportComment10( SvxMSDffManager const & rMan, SvStream& rStCtrl, Sd
// be sure not to import masterpages with this method
void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry* pMasterPersist )
{
- sal_uInt32 nOldPos = rStCtrl.Tell();
+ sal_uInt64 nOldPos = rStCtrl.Tell();
PptSlidePersistList* pList = GetPageList( m_eCurrentPageKind );
if ( ( !pList ) || ( pList->size() <= m_nCurrentPageNum ) )
return;
@@ -2811,7 +2796,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
DffRecordHeader aPPDrawHd;
if ( SeekToRec( rStCtrl, DFF_msofbtDgContainer, aHd.GetRecEndFilePos(), &aPPDrawHd ) )
{
- sal_uInt32 nPPDrawOfs = rStCtrl.Tell();
+ sal_uInt64 nPPDrawOfs = rStCtrl.Tell();
// importing the background object before importing the page
auto nPPEndRecPos = SanitizeEndPos(rStCtrl, aPPDrawHd.GetRecEndFilePos());
@@ -2848,7 +2833,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
if ( pE->nBackgroundOffset )
{
// do not follow master colorscheme?
- sal_uInt32 nPos = rStCtrl.Tell();
+ sal_uInt64 nPos = rStCtrl.Tell();
rStCtrl.Seek( pE->nBackgroundOffset );
rSlidePersist.pBObj = ImportObj( rStCtrl, aProcessData, aPageSize, aPageSize, /*nCalledByGroup*/0, /*pShapeId*/nullptr );
rStCtrl.Seek( nPos );
@@ -2863,7 +2848,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
{
sal_uInt32 nSpFlags;
rStCtrl.ReadUInt32( nSpFlags ).ReadUInt32( nSpFlags );
- if ( ShapeFlag(nSpFlags) & ShapeFlag::Background )
+ if (rStCtrl.good() && ShapeFlag(nSpFlags) & ShapeFlag::Background)
{
aEscherObjListHd.SeekToBegOfRecord( rStCtrl );
rSlidePersist.pBObj = ImportObj( rStCtrl, aProcessData, aPageSize, aPageSize, /*nCalledByGroup*/0, /*pShapeId*/nullptr );
@@ -2907,16 +2892,16 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
aShapeHd.SeekToBegOfRecord( rStCtrl );
sal_Int32 nShapeId;
aProcessData.pTableRowProperties.reset();
- SdrObject* pObj = ImportObj( rStCtrl, aProcessData, aEmpty, aEmpty, 0, &nShapeId );
+ rtl::Reference<SdrObject> pObj = ImportObj( rStCtrl, aProcessData, aEmpty, aEmpty, 0, &nShapeId );
if ( pObj )
{
if ( aProcessData.pTableRowProperties )
- pObj = CreateTable(pObj, aProcessData.pTableRowProperties.get(), aProcessData.rPersistEntry.xSolverContainer.get());
+ pObj = CreateTable(pObj.get(), aProcessData.pTableRowProperties.get(), aProcessData.rPersistEntry.xSolverContainer.get());
- pRet->NbcInsertObject( pObj );
+ pRet->NbcInsertObject( pObj.get() );
if( nShapeId )
- insertShapeId( nShapeId, pObj );
+ insertShapeId( nShapeId, pObj.get() );
}
}
bool bSuccess = aShapeHd.SeekToEndOfRecord(rStCtrl);
@@ -2933,27 +2918,6 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
break;
}
- // Handle shapes where the fill matches the background
- // fill (mso_fillBackground).
- if (rSlidePersist.ePageKind == PPT_SLIDEPAGE)
- {
- if (!aProcessData.aBackgroundColoredObjects.empty())
- {
- if (!rSlidePersist.pBObj)
- {
- for (auto pObject : aProcessData.aBackgroundColoredObjects)
- {
- // The shape wants a background, but the slide doesn't have
- // one: default to white.
- SfxItemSet aNewSet(*pObject->GetMergedItemSet().GetPool());
- aNewSet.Put(XFillStyleItem(css::drawing::FillStyle_SOLID));
- aNewSet.Put(XFillColorItem(OUString(), COL_WHITE));
- pObject->SetMergedItemSet(aNewSet);
- }
- }
- }
- }
-
if ( rSlidePersist.pBObj )
{
// #i99386# transfer the attributes from the temporary BackgroundObject
@@ -2965,15 +2929,15 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
for (auto & pPtr : rSlidePersist.xSolverContainer->aCList)
{
// check connections to the group object
- if (pPtr->pAObj == rSlidePersist.pBObj)
+ if (pPtr->pAObj == rSlidePersist.pBObj.get())
pPtr->pAObj = nullptr;
- if (pPtr->pBObj == rSlidePersist.pBObj)
+ if (pPtr->pBObj == rSlidePersist.pBObj.get())
pPtr->pBObj = nullptr;
- if (pPtr->pCObj == rSlidePersist.pBObj)
+ if (pPtr->pCObj == rSlidePersist.pBObj.get())
pPtr->pCObj = nullptr;
}
}
- SdrObject::Free(rSlidePersist.pBObj);
+ rSlidePersist.pBObj.clear();
}
}
}
@@ -3047,11 +3011,11 @@ sal_uInt16 SdrPowerPointImport::GetMasterPageIndex( sal_uInt16 nPageNum, PptPage
return nIdx;
}
-SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage, sal_uInt32& nBgFileOffset )
+rtl::Reference<SdrObject> SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage, sal_uInt32& nBgFileOffset )
{
- SdrObject* pRet = nullptr;
- std::unique_ptr<SfxItemSet> pSet;
- sal_uLong nOldFPos = rStCtrl.Tell(); // remember FilePos for restoring it later
+ rtl::Reference<SdrObject> pRet;
+ std::optional<SfxItemSet> pSet;
+ sal_uInt64 nOldFPos = rStCtrl.Tell(); // remember FilePos for restoring it later
DffRecordHeader aPageHd;
if ( SeekToCurrentPage( &aPageHd ) )
{ // and now search for the background attributes of the Page
@@ -3075,7 +3039,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage
ReadDffPropSet( rStCtrl, static_cast<DffPropertyReader&>(*this) );
mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) );
sal_uInt32 nColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff );
- pSet.reset(new SfxItemSet( pSdrModel->GetItemPool() ));
+ pSet.emplace( pSdrModel->GetItemPool() );
DffObjData aObjData( aEscherObjectHd, tools::Rectangle( 0, 0, 28000, 21000 ), 0 );
ApplyAttributes( rStCtrl, *pSet, aObjData );
Color aColor( MSO_CLR_ToColor( nColor ) );
@@ -3088,7 +3052,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage
rStCtrl.Seek( nOldFPos ); // restore FilePos
if ( !pSet )
{
- pSet.reset(new SfxItemSet( pSdrModel->GetItemPool() ));
+ pSet.emplace( pSdrModel->GetItemPool() );
pSet->Put( XFillStyleItem( drawing::FillStyle_NONE ) );
}
pSet->Put( XLineStyleItem( drawing::LineStyle_NONE ) );
@@ -3189,9 +3153,9 @@ void SdrEscherImport::ImportHeaderFooterContainer( DffRecordHeader const & rHd,
}
}
-PPTBuGraEntry::PPTBuGraEntry( Graphic const & rGraphic, sal_uInt32 nInst ) :
+PPTBuGraEntry::PPTBuGraEntry( Graphic aGraphic, sal_uInt32 nInst ) :
nInstance ( nInst ),
- aBuGra ( rGraphic ) {}
+ aBuGra (std::move( aGraphic )) {}
PPTExtParaLevel::PPTExtParaLevel()
: mnExtParagraphMask( 0 )
@@ -3252,7 +3216,7 @@ bool PPTExtParaProv::GetGraphic( sal_uInt32 nInstance, Graphic& rGraph ) const
PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const DffRecordHeader* pHd ) :
bStyles ( false )
{
- sal_uInt32 nOldPos = rSt.Tell();
+ sal_uInt64 nOldPos = rSt.Tell();
// here we have to get the graphical bullets...
@@ -3285,7 +3249,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
if ( SvxMSDffManager::GetBLIPDirect( rSt, aGraphic ) )
{
sal_uInt32 nInstance = aBuGraAtomHd.nRecInstance;
- PPTBuGraEntry* pBuGra = new PPTBuGraEntry( aGraphic, nInstance );
+ PPTBuGraEntry* pBuGra = new PPTBuGraEntry( std::move(aGraphic), nInstance );
size_t n = 0;
size_t nBuGraCount = aBuGraList.size();
if ( nBuGraCount )
@@ -3493,83 +3457,79 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const &
case 0 :
{
rNumberFormat.SetNumberingType( SVX_NUM_CHARS_LOWER_LETTER );
- rNumberFormat.SetSuffix( "." );
+ rNumberFormat.SetListFormat("", ".", nLevel);
}
break;
case 1 :
{
rNumberFormat.SetNumberingType( SVX_NUM_CHARS_UPPER_LETTER );
- rNumberFormat.SetSuffix( "." );
+ rNumberFormat.SetListFormat("", ".", nLevel);
}
break;
case 2 :
{
rNumberFormat.SetNumberingType( SVX_NUM_ARABIC );
- rNumberFormat.SetSuffix( ")" );
+ rNumberFormat.SetListFormat("", ")", nLevel);
}
break;
case 3 :
{
rNumberFormat.SetNumberingType( SVX_NUM_ARABIC );
- rNumberFormat.SetSuffix( "." );
+ rNumberFormat.SetListFormat("", ".", nLevel);
}
break;
case 4 :
{
rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_LOWER );
- rNumberFormat.SetSuffix( ")" );
- rNumberFormat.SetPrefix( "(" );
+ rNumberFormat.SetListFormat("(", ")", nLevel);
}
break;
case 5 :
{
rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_LOWER );
- rNumberFormat.SetSuffix( ")" );
+ rNumberFormat.SetListFormat("", ")", nLevel);
}
break;
case 6 :
{
rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_LOWER );
- rNumberFormat.SetSuffix( "." );
+ rNumberFormat.SetListFormat("", ".", nLevel);
}
break;
case 7 :
{
rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_UPPER );
- rNumberFormat.SetSuffix( "." );
+ rNumberFormat.SetListFormat("", ".", nLevel);
}
break;
case 8 :
{
rNumberFormat.SetNumberingType( SVX_NUM_CHARS_LOWER_LETTER );
- rNumberFormat.SetSuffix( ")" );
- rNumberFormat.SetPrefix( "(" );
+ rNumberFormat.SetListFormat("(", ")", nLevel);
}
break;
case 9 :
{
rNumberFormat.SetNumberingType( SVX_NUM_CHARS_LOWER_LETTER );
- rNumberFormat.SetSuffix( ")" );
+ rNumberFormat.SetListFormat("", ")", nLevel);
}
break;
case 10 :
{
rNumberFormat.SetNumberingType( SVX_NUM_CHARS_UPPER_LETTER );
- rNumberFormat.SetSuffix( ")" );
- rNumberFormat.SetPrefix( "(" );
+ rNumberFormat.SetListFormat("(", ")", nLevel);
}
break;
case 11 :
{
rNumberFormat.SetNumberingType( SVX_NUM_CHARS_UPPER_LETTER );
- rNumberFormat.SetSuffix( ")" );
+ rNumberFormat.SetListFormat("", ")", nLevel);
}
break;
case 12 :
{
rNumberFormat.SetNumberingType( SVX_NUM_ARABIC );
- rNumberFormat.SetSuffix( ")" );
- rNumberFormat.SetPrefix( "(" );
+ rNumberFormat.SetListFormat("(", ")", nLevel);
}
break;
case 13 :
@@ -3580,14 +3540,13 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const &
case 14 :
{
rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_UPPER );
- rNumberFormat.SetSuffix( ")" );
- rNumberFormat.SetPrefix( "(" );
+ rNumberFormat.SetListFormat("(", ")", nLevel);
}
break;
case 15 :
{
rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_UPPER );
- rNumberFormat.SetSuffix( ")" );
+ rNumberFormat.SetListFormat("", ")", nLevel);
}
break;
case 16: // Simplified Chinese.
@@ -3598,7 +3557,7 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const &
case 17: // Simplified Chinese with single-byte period.
{
rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_UPPER_ZH );
- rNumberFormat.SetSuffix( "." );
+ rNumberFormat.SetListFormat("", ".", nLevel);
}
break;
case 18: // Double byte circle numbers.
@@ -3616,13 +3575,13 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const &
case 22: // Traditional Chinese with single-byte period.
{
rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_UPPER_ZH_TW );
- rNumberFormat.SetSuffix( "." );
+ rNumberFormat.SetListFormat("", ".", nLevel);
}
break;
case 25: // Bidi Hebrew 2 with ANSI minus symbol.
{
rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_HEBREW );
- rNumberFormat.SetSuffix( "-" );
+ rNumberFormat.SetListFormat("", "-", nLevel);
}
break;
case 26: // Japanese/Korean.
@@ -3633,7 +3592,7 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const &
case 27: // Japanese/Korean with single-byte period.
{
rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_LOWER_ZH );
- rNumberFormat.SetSuffix( "." );
+ rNumberFormat.SetListFormat("", ".", nLevel);
}
break;
case 28: // Double-byte Arabic numbers.
@@ -3644,13 +3603,13 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const &
case 29: // Double-byte Arabic numbers with double-byte period.
{
rNumberFormat.SetNumberingType( SVX_NUM_FULL_WIDTH_ARABIC );
- rNumberFormat.SetSuffix( OUString( u'\xff0e' ) );
+ rNumberFormat.SetListFormat("", OUString(u'\xff0e'), nLevel);
}
break;
case 38: // Japanese with double-byte period.
{
rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_LOWER_ZH ); // No such type. Instead with Lower Chinese Number
- rNumberFormat.SetSuffix( OUString( u'\xff0e' ) );
+ rNumberFormat.SetListFormat("", OUString(u'\xff0e'), nLevel);
}
break;
}
@@ -3698,7 +3657,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport const & rManag
case SVX_NUM_CHARS_LOWER_LETTER_N :
{
sal_uInt32 nFont = rCharLevel.mnFont;
- PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nFont );
+ const PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nFont );
if ( pFontEnityAtom )
{
vcl::Font aFont;
@@ -3756,7 +3715,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport const & rManag
{
sal_uInt32 nFont;
pPtr->GetAttrib( PPT_CharAttr_Font, nFont, nDestinationInstance );
- PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nFont );
+ const PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nFont );
if ( pFontEnityAtom )
{
vcl::Font aFont;
@@ -3778,7 +3737,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport const & rManag
void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport const & rManager, SvxNumberFormat& rNumberFormat )
{
vcl::Font aFont;
- PptFontEntityAtom* pAtom = rManager.GetFontEnityAtom( nBulletFont );
+ const PptFontEntityAtom* pAtom = rManager.GetFontEnityAtom( nBulletFont );
if ( pAtom )
{
rtl_TextEncoding eCharSet( pAtom->eCharSet );
@@ -3800,8 +3759,8 @@ void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport const & rM
rNumberFormat.SetBulletChar( nBuChar );
rNumberFormat.SetBulletRelSize( static_cast<sal_uInt16>(nBulletHeight) );
rNumberFormat.SetBulletColor( aCol );
- sal_uInt32 nAbsLSpace = ( nTextOfs * 2540 ) / 576;
- sal_uInt32 nFirstLineOffset = nAbsLSpace - ( nBulletOfs * 2540 ) / 576;
+ sal_uInt32 nAbsLSpace = convertMasterUnitToMm100(nTextOfs);
+ sal_uInt32 nFirstLineOffset = nAbsLSpace - convertMasterUnitToMm100(nBulletOfs);
rNumberFormat.SetAbsLSpace( nAbsLSpace );
rNumberFormat.SetFirstLineOffset( -static_cast<sal_Int32>(nFirstLineOffset) );
}
@@ -3849,13 +3808,13 @@ PPTCharSheet::PPTCharSheet( TSS_Type nInstance )
void PPTCharSheet::Read( SvStream& rIn, sal_uInt32 nLevel)
{
// character attributes
- sal_uInt32 nCMask;
+ sal_uInt32 nCMask(0);
sal_uInt16 nVal16;
- rIn.ReadUInt32( nCMask );
+ rIn.ReadUInt32(nCMask);
if ( nCMask & 0x0000FFFF )
{
- sal_uInt16 nBitAttr;
+ sal_uInt16 nBitAttr(0);
maCharLevel[ nLevel ].mnFlags &= ~static_cast<sal_uInt16>(nCMask);
rIn.ReadUInt16( nBitAttr ); // Bit attributes (bold, underlined, ...)
maCharLevel[ nLevel ].mnFlags |= nBitAttr;
@@ -3946,13 +3905,13 @@ void PPTParaSheet::Read( SdrPowerPointImport const &
, sal_uInt32 nLevel, bool bFirst )
{
// paragraph attributes
- sal_uInt16 nVal16, i, nMask16;
- sal_uInt32 nVal32, nPMask;
- rIn.ReadUInt32( nPMask );
+ sal_uInt32 nPMask(0);
+ rIn.ReadUInt32(nPMask);
- nMask16 = static_cast<sal_uInt16>(nPMask) & 0xf;
+ sal_uInt16 nMask16 = static_cast<sal_uInt16>(nPMask) & 0xf;
if ( nMask16 )
{
+ sal_uInt16 nVal16(0);
rIn.ReadUInt16( nVal16 );
maParaLevel[ nLevel ].mnBuFlags &=~ nMask16;
nVal16 &= nMask16;
@@ -3964,18 +3923,22 @@ void PPTParaSheet::Read( SdrPowerPointImport const &
rIn.ReadUInt16( maParaLevel[ nLevel ].mnBulletFont );
if ( nPMask & 0x0040 )
{
+ sal_uInt16 nVal16(0);
rIn.ReadUInt16( nVal16 );
maParaLevel[ nLevel ].mnBulletHeight = nVal16;
}
if ( nPMask & 0x0020 )
{
- rIn.ReadUInt32( nVal32 );
+ sal_uInt32 nVal32(0);
+ rIn.ReadUInt32(nVal32);
maParaLevel[ nLevel ].mnBulletColor = nVal32;
}
if ( bFirst )
{
if ( nPMask & 0xF00 )
- { // AbsJust!
+ {
+ // AbsJust!
+ sal_uInt16 nVal16(0);
rIn.ReadUInt16( nVal16 );
maParaLevel[ nLevel ].mnAdjust = nVal16 & 3;
}
@@ -3993,15 +3956,20 @@ void PPTParaSheet::Read( SdrPowerPointImport const &
rIn.ReadUInt16( maParaLevel[ nLevel ].mnDefaultTab );
if ( nPMask & 0x200000 )
{
+ sal_uInt16 nVal16;
+ sal_uInt32 nVal32;
// number of tabulators
rIn.ReadUInt16( nVal16 );
- if (rIn.remainingSize() / sizeof(nVal32) < nVal16)
+ if (!rIn.good() || rIn.remainingSize() / sizeof(nVal32) < nVal16)
return;
- for ( i = 0; i < nVal16; i++ )
+ for (sal_uInt16 i = 0; i < nVal16; ++i)
rIn.ReadUInt32( nVal32 ); // reading the tabulators
}
if ( nPMask & 0x40000 )
+ {
+ sal_uInt16 nVal16;
rIn.ReadUInt16( nVal16 );
+ }
if ( nPMask & 0x80000 )
rIn.ReadUInt16( maParaLevel[ nLevel ].mnAsianLineBreak );
if ( nPMask & 0x100000 )
@@ -4011,6 +3979,7 @@ void PPTParaSheet::Read( SdrPowerPointImport const &
{
if ( nPMask & 0x800 )
{
+ sal_uInt16 nVal16(0);
rIn.ReadUInt16( nVal16 );
maParaLevel[ nLevel ].mnAdjust = nVal16 & 3;
}
@@ -4021,18 +3990,28 @@ void PPTParaSheet::Read( SdrPowerPointImport const &
if ( nPMask & 0x4000 )
rIn.ReadUInt16( maParaLevel[ nLevel ].mnLowerDist );
if ( nPMask & 0x8000 )
+ {
+ sal_uInt16 nVal16;
rIn.ReadUInt16( nVal16 );
+ }
if ( nPMask & 0x100 )
rIn.ReadUInt16( maParaLevel[ nLevel ].mnTextOfs );
if ( nPMask & 0x200 )
+ {
+ sal_uInt16 nVal16;
rIn.ReadUInt16( nVal16 );
+ }
if ( nPMask & 0x400 )
rIn.ReadUInt16( maParaLevel[ nLevel ].mnBulletOfs );
if ( nPMask & 0x10000 )
+ {
+ sal_uInt16 nVal16;
rIn.ReadUInt16( nVal16 );
+ }
if ( nPMask & 0xe0000 )
{
sal_uInt16 nFlagsToModifyMask = static_cast<sal_uInt16>( ( nPMask >> 17 ) & 7 );
+ sal_uInt16 nVal16(0);
rIn.ReadUInt16( nVal16 );
// bits that are not involved to zero
nVal16 &= nFlagsToModifyMask;
@@ -4043,9 +4022,13 @@ void PPTParaSheet::Read( SdrPowerPointImport const &
}
if ( nPMask & 0x100000 )
{
+ sal_uInt16 nVal16;
+ sal_uInt32 nVal32;
// number of tabulators
rIn.ReadUInt16( nVal16 );
- for ( i = 0; i < nVal16; i++ )
+ if (!rIn.good() || rIn.remainingSize() / sizeof(nVal32) < nVal16)
+ return;
+ for (sal_uInt16 i = 0; i < nVal16; ++i)
rIn.ReadUInt32( nVal32 ); // reading the tabulators
}
if ( nPMask & 0x200000 )
@@ -4063,6 +4046,7 @@ void PPTParaSheet::Read( SdrPowerPointImport const &
OSL_FAIL( "PPTParaSheet::Read - unknown attribute, send me this document (SJ)" );
}
#endif
+ sal_uInt16 nVal16;
rIn.ReadUInt16( nVal16 );
}
nPMask >>= 1;
@@ -4088,7 +4072,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
PPTNumberFormatCreator ( std::make_unique<PPTExtParaProv>( rManager, rIn, &rSlideHd ) ),
maTxSI ( rTextSpecInfo )
{
- sal_uInt32 nOldFilePos = rIn.Tell();
+ sal_uInt64 nOldFilePos = rIn.Tell();
// default stylesheets
mpCharSheet[ TSS_Type::PageTitle ] = std::make_unique<PPTCharSheet>( TSS_Type::PageTitle );
@@ -4412,7 +4396,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
aRule.SetLevel( nDepth, aNumberFormat );
}
}
- mpNumBulletItem[ i ] = std::make_unique<SvxNumBulletItem>( aRule, EE_PARA_NUMBULLET );
+ mpNumBulletItem[ i ] = std::make_unique<SvxNumBulletItem>( std::move(aRule), EE_PARA_NUMBULLET );
}
}
@@ -4456,7 +4440,6 @@ PPTParaPropSet& PPTParaPropSet::operator=( const PPTParaPropSet& rParaPropSet )
PPTCharPropSet::PPTCharPropSet(sal_uInt32 nParagraph)
: mnOriginalTextPos(0)
, mnParagraph(nParagraph)
- , mpImplPPTCharPropSet()
{
mnHylinkOrigColor = 0;
mbIsHyperlink = false;
@@ -4560,7 +4543,7 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, DffRecord
if ( nFileOfs == 0xffffffff )
return;
- sal_uInt32 nOldPos = rIn.Tell();
+ sal_uInt64 nOldPos = rIn.Tell();
DffRecordHeader rHd;
if ( nFileOfs )
{
@@ -4657,7 +4640,7 @@ bool PPTTextRulerInterpreter::GetBulletOfs( sal_uInt32 nLevel, sal_uInt16& nValu
return true;
}
-PPTTextRulerInterpreter& PPTTextRulerInterpreter::operator=( PPTTextRulerInterpreter& rRuler )
+PPTTextRulerInterpreter& PPTTextRulerInterpreter::operator=( const PPTTextRulerInterpreter& rRuler )
{
if ( this != &rRuler )
{
@@ -4741,11 +4724,6 @@ bool PPTTextParagraphStyleAtomInterpreter::Read( SvStream& rIn, const DffRecordH
return bValid;
}
-PPTTextParagraphStyleAtomInterpreter::~PPTTextParagraphStyleAtomInterpreter()
-{
-
-}
-
PPTTextSpecInfo::PPTTextSpecInfo( sal_uInt32 _nCharIdx ) :
nCharIdx ( _nCharIdx ),
nDontKnow ( 1 )
@@ -5110,22 +5088,21 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, const DffRecordHeader
}
}
-void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aCharPropSet, const OUString& aString,
+void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aCharPropSet, std::u16string_view aString,
sal_uInt32& nCharCount, sal_uInt32 nCharReadCnt,
bool& bTextPropAtom, sal_uInt32 nExtParaPos,
const std::vector< StyleTextProp9 >& aStyleTextProp9,
sal_uInt32& nExtParaFlags, sal_uInt16& nBuBlip,
sal_uInt16& nHasAnm, sal_uInt32& nAnmScheme )
{
- sal_uInt32 nMask = 0; //TODO: nMask initialized here to suppress warning for now, see corresponding TODO below
- sal_uInt16 nDummy16;
- sal_Int32 nCharsToRead;
- sal_uInt16 nStringLen = aString.getLength();
+ sal_uInt16 nStringLen = aString.size();
+ sal_uInt16 nDummy16;
rIn.ReadUInt16( nDummy16 );
nCharCount = (rIn.good()) ? nDummy16 : 0;
rIn.ReadUInt16( nDummy16 );
- nCharsToRead = nStringLen - ( nCharReadCnt + nCharCount );
+
+ sal_Int32 nCharsToRead = nStringLen - ( nCharReadCnt + nCharCount );
if ( nCharsToRead < 0 )
{
nCharCount = nStringLen - nCharReadCnt;
@@ -5138,6 +5115,7 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aChar
ImplPPTCharPropSet& aSet = *aCharPropSet.mpImplPPTCharPropSet;
// character attributes
+ sal_uInt32 nMask(0);
rIn.ReadUInt32( nMask );
if ( static_cast<sal_uInt16>(nMask) )
{
@@ -5171,7 +5149,7 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aChar
}
if ( nMask & 0x40000 ) // cfColor
{
- sal_uInt32 nVal;
+ sal_uInt32 nVal(0);
rIn.ReadUInt32( nVal );
if ( !( nVal & 0xff000000 ) )
nVal = PPT_COLSCHEME_HINTERGRUND;
@@ -5201,7 +5179,7 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aChar
void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHeader,
PPTTextRulerInterpreter const & rRuler, const DffRecordHeader& rExtParaHd, TSS_Type nInstance )
{
- sal_uInt32 nOldPos = rIn.Tell();
+ sal_uInt64 nOldPos = rIn.Tell();
sal_uInt32 nExtParaPos = ( rExtParaHd.nRecType == PPT_PST_ExtendedParagraphAtom ) ? rExtParaHd.nFilePos + 8 : 0;
std::vector< StyleTextProp9 > aStyleTextProp9;
@@ -5227,13 +5205,17 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe
if( aTextHd.nRecType == PPT_PST_TextCharsAtom )
{
- sal_uInt32 i;
- sal_Unicode nChar;
- std::unique_ptr<sal_Unicode[]> pBuf(new sal_Unicode[ ( nMaxLen >> 1 ) + 1 ]);
- rIn.ReadBytes(pBuf.get(), nMaxLen);
+ std::vector<sal_Unicode> aBuf(( nMaxLen >> 1 ) + 1);
+ void* pDest = aBuf.data();
+ auto nRead = rIn.ReadBytes(pDest, nMaxLen);
+ if (nRead != nMaxLen)
+ memset(static_cast<char*>(pDest) + nRead, 0, nMaxLen - nRead);
nMaxLen >>= 1;
- pBuf[ nMaxLen ] = 0;
- sal_Unicode* pPtr = pBuf.get();
+ aBuf[nMaxLen] = 0;
+
+ sal_uInt32 i;
+ sal_Unicode* pPtr = aBuf.data();
+
#ifdef OSL_BIGENDIAN
sal_Unicode nTemp;
for ( i = 0; i < nMaxLen; i++ )
@@ -5241,12 +5223,12 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe
nTemp = *pPtr;
*pPtr++ = ( nTemp << 8 ) | ( nTemp >> 8 );
}
- pPtr = pBuf.get();
+ pPtr = aBuf.data();
#endif
for ( i = 0; i < nMaxLen; pPtr++, i++ )
{
- nChar = *pPtr;
+ sal_Unicode nChar = *pPtr;
if ( !nChar )
break;
if ( ( nChar & 0xff00 ) == 0xf000 ) // in this special case we got a symbol
@@ -5260,13 +5242,13 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe
}
}
if ( i )
- aString = OUString(pBuf.get(), i);
+ aString = OUString(aBuf.data(), i);
}
else if( aTextHd.nRecType == PPT_PST_TextBytesAtom )
{
std::unique_ptr<char[]> pBuf(new char[ nMaxLen + 1 ]);
+ nMaxLen = rIn.ReadBytes(pBuf.get(), nMaxLen);
pBuf[ nMaxLen ] = 0;
- rIn.ReadBytes(pBuf.get(), nMaxLen);
char* pPtr = pBuf.get();
for (;;)
{
@@ -5601,7 +5583,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T
{
if ( nAsianFontId != 0xffff )
{
- PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nAsianFontId );
+ const PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nAsianFontId );
if ( pFontEnityAtom )
{
rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName,
@@ -5613,7 +5595,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T
}
if ( GetAttrib( PPT_CharAttr_Font, nVal, nDestinationInstance ) )
{
- PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nVal );
+ const PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nVal );
if ( pFontEnityAtom )
{
rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName, OUString(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO ) );
@@ -5672,7 +5654,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T
if ( aSize.Height() > 64 )
aSize.setHeight( 64 );
- Bitmap::ScopedReadAccess pAcc(aBmp);
+ BitmapScopedReadAccess pAcc(aBmp);
if( pAcc )
{
sal_uLong nRt = 0, nGn = 0, nBl = 0;
@@ -5721,27 +5703,24 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T
const SfxItemSet* pItemSet = pTextObj->GetBackground();
if ( pItemSet )
{
- const SfxPoolItem* pFillStyleItem = nullptr;
- pItemSet->GetItemState( XATTR_FILLSTYLE, false, &pFillStyleItem );
+ const XFillStyleItem* pFillStyleItem = pItemSet->GetItemIfSet( XATTR_FILLSTYLE, false );
if ( pFillStyleItem )
{
- drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem*>(pFillStyleItem)->GetValue();
+ drawing::FillStyle eFillStyle = pFillStyleItem->GetValue();
switch( eFillStyle )
{
case drawing::FillStyle_SOLID :
{
- const SfxPoolItem* pFillColorItem = nullptr;
- pItemSet->GetItemState( XATTR_FILLCOLOR, false, &pFillColorItem );
+ const XColorItem* pFillColorItem = pItemSet->GetItemIfSet( XATTR_FILLCOLOR, false );
if ( pFillColorItem )
- aDefColor = static_cast<const XColorItem*>(pFillColorItem)->GetColorValue();
+ aDefColor = pFillColorItem->GetColorValue();
}
break;
case drawing::FillStyle_GRADIENT :
{
- const SfxPoolItem* pGradientItem = nullptr;
- pItemSet->GetItemState( XATTR_FILLGRADIENT, false, &pGradientItem );
+ const XFillGradientItem* pGradientItem = pItemSet->GetItemIfSet( XATTR_FILLGRADIENT, false );
if ( pGradientItem )
- aDefColor = static_cast<const XFillGradientItem*>(pGradientItem)->GetGradientValue().GetStartColor();
+ aDefColor = Color(pGradientItem->GetGradientValue().GetColorStops().front().getStopColor());
}
break;
case drawing::FillStyle_HATCH :
@@ -6176,30 +6155,27 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, std::optional< sal_Int16 >& rS
aNumberFormat.SetIndentAt( 0 );
}
SvxNumBulletItem aNewNumBulletItem( *pNumBulletItem );
- SvxNumRule* pRule = aNewNumBulletItem.GetNumRule();
- if ( pRule )
+ SvxNumRule& rRule = aNewNumBulletItem.GetNumRule();
+ rRule.SetLevel( mxParaSet->mnDepth, aNumberFormat );
+ for (sal_uInt16 i = 0; i < rRule.GetLevelCount(); ++i)
{
- pRule->SetLevel( mxParaSet->mnDepth, aNumberFormat );
- for (sal_uInt16 i = 0; i < pRule->GetLevelCount(); ++i)
+ if ( i != mxParaSet->mnDepth )
{
- if ( i != mxParaSet->mnDepth )
- {
- sal_uInt16 n = sanitizeForMaxPPTLevels(i);
-
- SvxNumberFormat aNumberFormat2( pRule->GetLevel( i ) );
- const PPTParaLevel& rParaLevel = mrStyleSheet.mpParaSheet[ nInstance ]->maParaLevel[ n ];
- const PPTCharLevel& rCharLevel = mrStyleSheet.mpCharSheet[ nInstance ]->maCharLevel[ n ];
- sal_uInt32 nColor;
- if ( rParaLevel.mnBuFlags & ( 1 << PPT_ParaAttr_BuHardColor ) )
- nColor = rParaLevel.mnBulletColor;
- else
- nColor = rCharLevel.mnFontColor;
- aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) );
- pRule->SetLevel( i, aNumberFormat2 );
- }
+ sal_uInt16 n = sanitizeForMaxPPTLevels(i);
+
+ SvxNumberFormat aNumberFormat2( rRule.GetLevel( i ) );
+ const PPTParaLevel& rParaLevel = mrStyleSheet.mpParaSheet[ nInstance ]->maParaLevel[ n ];
+ const PPTCharLevel& rCharLevel = mrStyleSheet.mpCharSheet[ nInstance ]->maCharLevel[ n ];
+ sal_uInt32 nColor;
+ if ( rParaLevel.mnBuFlags & ( 1 << PPT_ParaAttr_BuHardColor ) )
+ nColor = rParaLevel.mnBulletColor;
+ else
+ nColor = rCharLevel.mnFontColor;
+ aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) );
+ rRule.SetLevel( i, aNumberFormat2 );
}
- rSet.Put( aNewNumBulletItem );
}
+ rSet.Put( aNewNumBulletItem );
}
}
}
@@ -6208,22 +6184,16 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, std::optional< sal_Int16 >& rS
GetAttrib(PPT_ParaAttr_BulletOn, nIsBullet2, nDestinationInstance);
GetAttrib(PPT_ParaAttr_TextOfs, _nTextOfs, nDestinationInstance);
GetAttrib(PPT_ParaAttr_BulletOfs, _nBulletOfs, nDestinationInstance);
+ SvxLRSpaceItem aLRSpaceItem( EE_PARA_LRSPACE );
if ( !nIsBullet2 )
{
- SvxLRSpaceItem aLRSpaceItem( EE_PARA_LRSPACE );
- sal_uInt16 nAbsLSpace = static_cast<sal_uInt16>( ( _nTextOfs * 2540 ) / 576 );
- auto const nFirstLineOffset = nAbsLSpace - static_cast<sal_uInt16>( ( _nBulletOfs * 2540 ) / 576 );
- aLRSpaceItem.SetLeft( nAbsLSpace );
+ auto const nAbsLSpace = convertMasterUnitToMm100(_nTextOfs);
+ auto const nFirstLineOffset = nAbsLSpace - convertMasterUnitToMm100(_nBulletOfs);
aLRSpaceItem.SetTextFirstLineOffsetValue( -nFirstLineOffset );
- rSet.Put( aLRSpaceItem );
- }
- else
- {
- SvxLRSpaceItem aLRSpaceItem( EE_PARA_LRSPACE );
- aLRSpaceItem.SetLeft( 0 );
- aLRSpaceItem.SetTextFirstLineOffsetValue( 0 );
- rSet.Put( aLRSpaceItem );
+ aLRSpaceItem.SetTextLeft( nAbsLSpace );
}
+ rSet.Put( aLRSpaceItem );
+
if ( GetAttrib( PPT_ParaAttr_Adjust, nVal, nDestinationInstance ) )
{
if ( nVal <= 3 )
@@ -6290,7 +6260,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, std::optional< sal_Int16 >& rS
SvxULSpaceItem aULSpaceItem( EE_PARA_ULSPACE );
nVal2 = static_cast<sal_Int16>(nUpperDist);
if ( nVal2 <= 0 )
- aULSpaceItem.SetUpper( static_cast<sal_uInt16>((static_cast<sal_uInt32>(- nVal2) * 2540 ) / ( 72 * 8 ) ) );
+ aULSpaceItem.SetUpper(static_cast<sal_uInt16>(convertMasterUnitToMm100(-nVal2)));
else
{
aULSpaceItem.SetUpperValue( 0 );
@@ -6298,7 +6268,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, std::optional< sal_Int16 >& rS
}
nVal2 = static_cast<sal_Int16>(nLowerDist);
if ( nVal2 <= 0 )
- aULSpaceItem.SetLower( static_cast<sal_uInt16>((static_cast<sal_uInt32>(- nVal2) * 2540 ) / ( 72 * 8 ) ) );
+ aULSpaceItem.SetLower(static_cast<sal_uInt16>(convertMasterUnitToMm100(-nVal2)));
else
{
aULSpaceItem.SetLowerValue( 0 );
@@ -6473,13 +6443,13 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
// ClientData
if ( rSdrPowerPointImport.maShapeRecords.SeekToContent( rIn, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
{
- sal_uInt32 nOldPos = rIn.Tell();
+ sal_uInt64 nOldPos = rIn.Tell();
DffRecordHeader& aClientDataContainerHd = *rSdrPowerPointImport.maShapeRecords.Current();
DffRecordHeader aPlaceHolderAtomHd;
if ( SvxMSDffManager::SeekToRec( rIn, PPT_PST_OEPlaceholderAtom, aClientDataContainerHd.GetRecEndFilePos(), &aPlaceHolderAtomHd ) )
{
- mxImplTextObj->mpPlaceHolderAtom.reset( new PptOEPlaceholderAtom );
- ReadPptOEPlaceholderAtom( rIn, *( mxImplTextObj->mpPlaceHolderAtom ) );
+ mxImplTextObj->moPlaceHolderAtom.emplace();
+ ReadPptOEPlaceholderAtom( rIn, *( mxImplTextObj->moPlaceHolderAtom ) );
}
rIn.Seek( nOldPos );
DffRecordHeader aProgTagHd;
@@ -6516,15 +6486,10 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
else
nTextRulerAtomOfs = 0xffffffff;
- sal_uInt32 nInstance = 0;
switch( rSdrPowerPointImport.m_eCurrentPageKind )
{
case PPT_NOTEPAGE :
- nInstance++;
- [[fallthrough]];
case PPT_MASTERPAGE :
- nInstance++;
- break;
case PPT_SLIDEPAGE :
break;
default :
@@ -6539,7 +6504,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
{
if ( !aExtParaHd.nRecType )
{
- sal_uInt32 nOldPos = rIn.Tell();
+ sal_uInt64 nOldPos = rIn.Tell();
// try to locate the referenced ExtendedParaHd
DffRecordHeader* pHd = pExtParaProv->
aExtendedPresRules.GetRecordHeader( PPT_PST_ExtendedParagraphHeaderAtom,
@@ -6547,10 +6512,10 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
DffRecordHeader aPresRuleHd;
DffRecordHeader* pFirst = pHd;
- sal_uInt32 nTmpSlideId, nTmpRef;
while ( pHd )
{
pHd->SeekToContent( rIn );
+ sal_uInt32 nTmpSlideId(0), nTmpRef;
rIn.ReadUInt32( nTmpSlideId )
.ReadUInt32( nTmpRef ); // this seems to be the instance
@@ -6636,15 +6601,15 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
return;
// TextHeaderAtom is always the first Atom
- sal_uInt16 nTmp;
- rIn.ReadUInt16( nTmp ); // this number tells us the TxMasterStyleAtom Instance
- if ( nTmp > 8 )
+ sal_uInt16 nTmp(0);
+ rIn.ReadUInt16(nTmp); // this number tells us the TxMasterStyleAtom Instance
+ if (nTmp > 8)
nTmp = 4;
TSS_Type nInstance = static_cast<TSS_Type>(nTmp);
aTextHd.SeekToEndOfRecord( rIn );
mxImplTextObj->mnInstance = nInstance;
- sal_uInt32 nFilePos = rIn.Tell();
+ sal_uInt64 nFilePos = rIn.Tell();
if ( !(rSdrPowerPointImport.SeekToRec2( PPT_PST_TextBytesAtom,
PPT_PST_TextCharsAtom,
aClientTextBoxHd.GetRecEndFilePos() )
@@ -6661,7 +6626,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( !nParagraphs )
return;
- // the language settings will be merged into the list of PPTCharPropSet
+ // the languages and locales will be merged into the list of PPTCharPropSet
DffRecordHeader aTextSpecInfoHd;
PPTTextSpecInfoAtomInterpreter aTextSpecInfoAtomInterpreter;
if ( SvxMSDffManager::SeekToRec( rIn, PPT_PST_TextSpecInfoAtom,
@@ -7114,7 +7079,7 @@ const SfxItemSet* PPTTextObj::GetBackground() const
return nullptr;
}
-PPTTextObj& PPTTextObj::operator=( PPTTextObj& rTextObj )
+PPTTextObj& PPTTextObj::operator=( const PPTTextObj& rTextObj )
{
if ( this != &rTextObj )
{
@@ -7391,25 +7356,25 @@ static void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const
{
eFS = css::drawing::FillStyle_SOLID;
Color aFillColor( pObj->GetMergedItem( XATTR_FILLCOLOR ).GetColorValue() );
- xPropSet->setPropertyValue( "FillColor", makeAny( aFillColor ) );
+ xPropSet->setPropertyValue( "FillColor", Any( aFillColor ) );
}
break;
case drawing::FillStyle_GRADIENT :
{
eFS = css::drawing::FillStyle_GRADIENT;
- XGradient aXGradient(pObj->GetMergedItem(XATTR_FILLGRADIENT).GetGradientValue());
+ basegfx::BGradient aBGradient(pObj->GetMergedItem(XATTR_FILLGRADIENT).GetGradientValue());
css::awt::Gradient aGradient;
- aGradient.Style = aXGradient.GetGradientStyle();
- aGradient.StartColor = static_cast<sal_Int32>(aXGradient.GetStartColor());
- aGradient.EndColor = static_cast<sal_Int32>(aXGradient.GetEndColor());
- aGradient.Angle = static_cast<short>(aXGradient.GetAngle());
- aGradient.Border = aXGradient.GetBorder();
- aGradient.XOffset = aXGradient.GetXOffset();
- aGradient.YOffset = aXGradient.GetYOffset();
- aGradient.StartIntensity = aXGradient.GetStartIntens();
- aGradient.EndIntensity = aXGradient.GetEndIntens();
- aGradient.StepCount = aXGradient.GetSteps();
+ aGradient.Style = aBGradient.GetGradientStyle();
+ aGradient.StartColor = static_cast<sal_Int32>(Color(aBGradient.GetColorStops().front().getStopColor()));
+ aGradient.EndColor = static_cast<sal_Int32>(Color(aBGradient.GetColorStops().back().getStopColor()));
+ aGradient.Angle = static_cast<short>(aBGradient.GetAngle());
+ aGradient.Border = aBGradient.GetBorder();
+ aGradient.XOffset = aBGradient.GetXOffset();
+ aGradient.YOffset = aBGradient.GetYOffset();
+ aGradient.StartIntensity = aBGradient.GetStartIntens();
+ aGradient.EndIntensity = aBGradient.GetEndIntens();
+ aGradient.StepCount = aBGradient.GetSteps();
xPropSet->setPropertyValue( "FillGradient", Any( aGradient ) );
}
@@ -7421,19 +7386,19 @@ static void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const
{
eFS = css::drawing::FillStyle_BITMAP;
- const XFillBitmapItem aXFillBitmapItem(pObj->GetMergedItem( XATTR_FILLBITMAP ));
- uno::Reference<graphic::XGraphic> xGraphic = aXFillBitmapItem.GetGraphicObject().GetGraphic().GetXGraphic();
+ const XFillBitmapItem & rXFillBitmapItem(pObj->GetMergedItem( XATTR_FILLBITMAP ));
+ uno::Reference<graphic::XGraphic> xGraphic = rXFillBitmapItem.GetGraphicObject().GetGraphic().GetXGraphic();
uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY);
- xPropSet->setPropertyValue("FillBitmap", uno::makeAny(xBitmap));
-
- const XFillBmpStretchItem aStretchItem(pObj->GetMergedItem( XATTR_FILLBMP_STRETCH ));
- const XFillBmpTileItem aTileItem(pObj->GetMergedItem( XATTR_FILLBMP_TILE ));
- if( aTileItem.GetValue() )
- xPropSet->setPropertyValue("FillBitmapMode", uno::makeAny(drawing::BitmapMode_REPEAT));
- else if( aStretchItem.GetValue() )
- xPropSet->setPropertyValue("FillBitmapMode", uno::makeAny(drawing::BitmapMode_STRETCH));
+ xPropSet->setPropertyValue("FillBitmap", uno::Any(xBitmap));
+
+ const XFillBmpStretchItem & rStretchItem(pObj->GetMergedItem( XATTR_FILLBMP_STRETCH ));
+ const XFillBmpTileItem & rTileItem(pObj->GetMergedItem( XATTR_FILLBMP_TILE ));
+ if( rTileItem.GetValue() )
+ xPropSet->setPropertyValue("FillBitmapMode", uno::Any(drawing::BitmapMode_REPEAT));
+ else if( rStretchItem.GetValue() )
+ xPropSet->setPropertyValue("FillBitmapMode", uno::Any(drawing::BitmapMode_STRETCH));
else
- xPropSet->setPropertyValue("FillBitmapMode", uno::makeAny(drawing::BitmapMode_NO_REPEAT));
+ xPropSet->setPropertyValue("FillBitmapMode", uno::Any(drawing::BitmapMode_NO_REPEAT));
}
break;
default:
@@ -7509,9 +7474,11 @@ static void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >
}
}
-SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, const sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer )
+rtl::Reference<SdrObject> SdrPowerPointImport::CreateTable(
+ SdrObject* pGroup, const sal_uInt32* pTableArry,
+ SvxMSDffSolverContainer* pSolverContainer)
{
- SdrObject* pRet = pGroup;
+ rtl::Reference<SdrObject> pRet = pGroup;
sal_uInt32 nRows = pTableArry[ 1 ];
if (!nRows)
@@ -7543,7 +7510,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, const sal_uInt32
if (aRows.empty())
return pRet;
- sdr::table::SdrTableObj* pTable = new sdr::table::SdrTableObj(*pSdrModel);
+ rtl::Reference<sdr::table::SdrTableObj> pTable = new sdr::table::SdrTableObj(*pSdrModel);
pTable->uno_lock();
Reference< XTable > xTable( pTable->getTable() );
@@ -7592,7 +7559,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, const sal_uInt32
{
SdrText* pSdrText = pTable->getText( nTableIndex );
if ( pSdrText )
- pSdrText->SetOutlinerParaObject(std::make_unique<OutlinerParaObject>(*pParaObject) );
+ pSdrText->SetOutlinerParaObject(*pParaObject);
}
}
}
@@ -7648,9 +7615,9 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, const sal_uInt32
//table when export by us. We should process this
//situation when importing.
if ( pPtr->pAObj == pGroup )
- pPtr->pAObj = pTable;
+ pPtr->pAObj = pTable.get();
if ( pPtr->pBObj == pGroup )
- pPtr->pBObj = pTable;
+ pPtr->pBObj = pTable.get();
}
}
pTable->uno_unlock();
@@ -7662,16 +7629,13 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, const sal_uInt32
while( aIter.IsMore() )
{
SdrObject* pPartObj = aIter.Next();
- removeShapeId( pPartObj );
+ removeShapeId(pPartObj);
}
-
- SdrObject::Free( pGroup );
}
catch( const Exception& )
{
pTable->uno_unlock();
- SdrObject* pObj = pTable;
- SdrObject::Free( pObj );
+ pTable = nullptr;
}
return pRet;
diff --git a/filter/source/msfilter/svxmsbas2.cxx b/filter/source/msfilter/svxmsbas2.cxx
index 8a4ce43f1914..71ac50fd3928 100644
--- a/filter/source/msfilter/svxmsbas2.cxx
+++ b/filter/source/msfilter/svxmsbas2.cxx
@@ -33,7 +33,7 @@ ErrCode SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto,
ErrCode nRet = ERRCODE_NONE;
uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
OUString aDstStgName( GetMSBasicStorageName() );
- tools::SvRef<SotStorage> xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName,
+ rtl::Reference<SotStorage> xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName,
StreamMode::READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL ) );
if( xVBAStg.is() && !xVBAStg->GetError() )
{
@@ -45,8 +45,8 @@ ErrCode SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto,
if( pBasicMan && pBasicMan->IsBasicModified() )
nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE;
#endif
- tools::SvRef<SotStorage> xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, StreamMode::STD_READ );
- tools::SvRef<SotStorage> xDst = xRoot->OpenSotStorage( rStorageName, StreamMode::READWRITE | StreamMode::TRUNC );
+ rtl::Reference<SotStorage> xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, StreamMode::STD_READ );
+ rtl::Reference<SotStorage> xDst = xRoot->OpenSotStorage( rStorageName, StreamMode::READWRITE | StreamMode::TRUNC );
xSrc->CopyTo( xDst.get() );
xDst->Commit();
ErrCode nError = xDst->GetError();
@@ -65,7 +65,7 @@ ErrCode SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto,
ErrCode SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocSh)
{
uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
- tools::SvRef<SotStorage> xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(),
+ rtl::Reference<SotStorage> xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(),
StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL ));
return ( xVBAStg.is() && !xVBAStg->GetError() )
? ERRCODE_SVX_VBASIC_STORAGE_EXIST
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index d821b8f2e6c7..2ac3536af9b1 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -10,11 +10,15 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <rtl/ustring.hxx>
+#include <rtl/character.hxx>
+#include <comphelper/string.hxx>
#include <unotools/fontcvt.hxx>
#include <unotools/fontdefs.hxx>
+#include <utility>
#include <vcl/BitmapPalette.hxx>
#include <filter/msfilter/escherex.hxx>
#include <filter/msfilter/util.hxx>
+#include <o3tl/string_view.hxx>
#include <memory>
#include <unordered_map>
@@ -125,23 +129,42 @@ sal_Unicode bestFitOpenSymbolToMSFont(sal_Unicode cChar,
OString ConvertColor( const Color &rColor )
{
- OString color( "auto" );
+ static constexpr OStringLiteral AUTO( "auto" );
- if ( rColor != COL_AUTO )
- {
- const char pHexDigits[] = "0123456789ABCDEF";
- char pBuffer[] = "000000";
+ if ( rColor == COL_AUTO )
+ return AUTO;
- pBuffer[0] = pHexDigits[ ( rColor.GetRed() >> 4 ) & 0x0F ];
- pBuffer[1] = pHexDigits[ rColor.GetRed() & 0x0F ];
- pBuffer[2] = pHexDigits[ ( rColor.GetGreen() >> 4 ) & 0x0F ];
- pBuffer[3] = pHexDigits[ rColor.GetGreen() & 0x0F ];
- pBuffer[4] = pHexDigits[ ( rColor.GetBlue() >> 4 ) & 0x0F ];
- pBuffer[5] = pHexDigits[ rColor.GetBlue() & 0x0F ];
+ const char pHexDigits[] = "0123456789ABCDEF";
+ char pBuffer[] = "000000";
- color = OString( pBuffer );
- }
- return color;
+ pBuffer[0] = pHexDigits[ ( rColor.GetRed() >> 4 ) & 0x0F ];
+ pBuffer[1] = pHexDigits[ rColor.GetRed() & 0x0F ];
+ pBuffer[2] = pHexDigits[ ( rColor.GetGreen() >> 4 ) & 0x0F ];
+ pBuffer[3] = pHexDigits[ rColor.GetGreen() & 0x0F ];
+ pBuffer[4] = pHexDigits[ ( rColor.GetBlue() >> 4 ) & 0x0F ];
+ pBuffer[5] = pHexDigits[ rColor.GetBlue() & 0x0F ];
+
+ return OString( pBuffer );
+}
+
+OUString ConvertColorOU( const Color &rColor )
+{
+ static constexpr OUStringLiteral AUTO( u"auto" );
+
+ if ( rColor == COL_AUTO )
+ return AUTO;
+
+ const char pHexDigits[] = "0123456789ABCDEF";
+ sal_Unicode pBuffer[] = u"000000";
+
+ pBuffer[0] = pHexDigits[ ( rColor.GetRed() >> 4 ) & 0x0F ];
+ pBuffer[1] = pHexDigits[ rColor.GetRed() & 0x0F ];
+ pBuffer[2] = pHexDigits[ ( rColor.GetGreen() >> 4 ) & 0x0F ];
+ pBuffer[3] = pHexDigits[ rColor.GetGreen() & 0x0F ];
+ pBuffer[4] = pHexDigits[ ( rColor.GetBlue() >> 4 ) & 0x0F ];
+ pBuffer[5] = pHexDigits[ rColor.GetBlue() & 0x0F ];
+
+ return OUString( pBuffer );
}
#define IN2MM100( v ) static_cast< sal_Int32 >( (v) * 2540.0 + 0.5 )
@@ -256,7 +279,7 @@ sal_Int32 PaperSizeConv::getMSPaperSizeIndex( const css::awt::Size& rSize )
sal_Int32 nPaperSizeIndex = 0; // Undefined
const ApiPaperSize* pItem = spPaperSizeTable;
- const ApiPaperSize* pEnd = spPaperSizeTable + SAL_N_ELEMENTS( spPaperSizeTable );
+ const ApiPaperSize* pEnd = spPaperSizeTable + std::size( spPaperSizeTable );
for ( ; pItem != pEnd; ++pItem )
{
sal_Int32 nCurDeltaHeight = std::abs( pItem->mnHeight - rSize.Height );
@@ -284,32 +307,49 @@ sal_Int32 PaperSizeConv::getMSPaperSizeIndex( const css::awt::Size& rSize )
const ApiPaperSize& PaperSizeConv::getApiSizeForMSPaperSizeIndex( sal_Int32 nMSOPaperIndex )
{
- if ( nMSOPaperIndex < 0 || nMSOPaperIndex > sal_Int32(SAL_N_ELEMENTS( spPaperSizeTable )) - 1 )
+ if ( nMSOPaperIndex < 0 || nMSOPaperIndex > std::ssize( spPaperSizeTable ) - 1 )
return spPaperSizeTable[ 0 ];
return spPaperSizeTable[ nMSOPaperIndex ];
}
-OUString findQuotedText( const OUString& rCommand,
- const char* cStartQuote, const sal_Unicode uEndQuote )
+OUString CreateDOCXStyleId(std::u16string_view const aName)
{
- OUString sRet;
- OUString sStartQuote( OUString::createFromAscii(cStartQuote) );
- sal_Int32 nStartIndex = rCommand.indexOf( sStartQuote );
- if( nStartIndex >= 0 )
+ OUStringBuffer aStyleIdBuf(aName.size());
+ for (size_t i = 0; i < aName.size(); ++i)
{
- sal_Int32 nStartLength = sStartQuote.getLength();
- sal_Int32 nEndIndex = rCommand.indexOf( uEndQuote, nStartIndex + nStartLength);
- if( nEndIndex > nStartIndex )
+ sal_Unicode nChar = aName[i];
+ if (rtl::isAsciiAlphanumeric(nChar) || nChar == '-')
{
- sRet = rCommand.copy( nStartIndex + nStartLength, nEndIndex - nStartIndex - nStartLength);
+ // first letter should be uppercase
+ if (aStyleIdBuf.isEmpty())
+ aStyleIdBuf.append(char(rtl::toAsciiUpperCase(nChar)));
+ else
+ aStyleIdBuf.append(char(nChar));
+ }
+ }
+ return aStyleIdBuf.makeStringAndClear();
+}
+
+std::u16string_view findQuotedText( std::u16string_view rCommand,
+ std::u16string_view sStartQuote, const sal_Unicode uEndQuote )
+{
+ std::u16string_view sRet;
+ size_t nStartIndex = rCommand.find( sStartQuote );
+ if( nStartIndex != std::u16string_view::npos )
+ {
+ sal_Int32 nStartLength = sStartQuote.size();
+ size_t nEndIndex = rCommand.find( uEndQuote, nStartIndex + nStartLength);
+ if( nEndIndex != std::u16string_view::npos && nEndIndex > nStartIndex )
+ {
+ sRet = rCommand.substr( nStartIndex + nStartLength, nEndIndex - nStartIndex - nStartLength);
}
}
return sRet;
}
-WW8ReadFieldParams::WW8ReadFieldParams( const OUString& _rData )
- : aData( _rData )
+WW8ReadFieldParams::WW8ReadFieldParams( OUString _aData )
+ : aData(std::move( _aData ))
, nFnd( 0 )
, nNext( 0 )
, nSavPtr( 0 )
@@ -465,11 +505,11 @@ bool WW8ReadFieldParams::GetTokenSttFromTo(sal_Int32* pFrom, sal_Int32* pTo, sal
const OUString sParams( GetResult() );
sal_Int32 nIndex = 0;
- const OUString sStart( sParams.getToken(0, '-', nIndex) );
+ const std::u16string_view sStart = o3tl::getToken(sParams, 0, '-', nIndex);
if (nIndex>=0)
{
- nStart = sStart.toInt32();
- nEnd = sParams.copy(nIndex).toInt32();
+ nStart = o3tl::toInt32(sStart);
+ nEnd = o3tl::toInt32(sParams.subView(nIndex));
}
}
if( pFrom ) *pFrom = nStart;
@@ -582,650 +622,616 @@ EquationResult ParseCombinedChars(const OUString& rStr)
return aResult;
}
-namespace {
-
-struct CustomShapeTypeTranslationTable
-{
- const char* sOOo;
- const char* sMSO;
-};
-
-}
-
-const CustomShapeTypeTranslationTable pCustomShapeTypeTranslationTable[] =
-{
- // { "non-primitive", mso_sptMin },
- { "frame", "frame" },
- { "rectangle", "rect" },
- { "round-rectangle", "roundRect" },
- { "ellipse", "ellipse" },
- { "diamond", "diamond" },
- { "isosceles-triangle", "triangle" },
- { "right-triangle", "rtTriangle" },
- { "parallelogram", "parallelogram" },
- { "trapezoid", "trapezoid" },
- { "hexagon", "hexagon" },
- { "octagon", "octagon" },
- { "cross", "plus" },
- { "star5", "star5" },
- { "right-arrow", "rightArrow" },
- // { "mso-spt14", mso_sptThickArrow },
- { "pentagon-right", "homePlate" },
- { "cube", "cube" },
- // { "mso-spt17", mso_sptBalloon },
- // { "mso-spt18", mso_sptSeal },
- { "mso-spt19", "arc" },
- { "mso-spt20", "line" },
- { "mso-spt21", "plaque" },
- { "can", "can" },
- { "ring", "donut" },
- { "mso-spt24", "textPlain" },
- { "mso-spt25", "textStop" },
- { "mso-spt26", "textTriangle" },
- { "mso-spt27", "textCanDown" },
- { "mso-spt28", "textWave1" },
- { "mso-spt29", "textArchUpPour" },
- { "mso-spt30", "textCanDown" },
- { "mso-spt31", "textArchUp" },
- { "mso-spt32", "straightConnector1" },
- { "mso-spt33", "bentConnector2" },
- { "mso-spt34", "bentConnector3" },
- { "mso-spt35", "bentConnector4" },
- { "mso-spt36", "bentConnector5" },
- { "mso-spt37", "curvedConnector2" },
- { "mso-spt38", "curvedConnector3" },
- { "mso-spt39", "curvedConnector4" },
- { "mso-spt40", "curvedConnector5" },
- { "mso-spt41", "callout1" },
- { "mso-spt42", "callout2" },
- { "mso-spt43", "callout3" },
- { "mso-spt44", "accentCallout1" },
- { "mso-spt45", "accentCallout2" },
- { "mso-spt46", "accentCallout3" },
- { "line-callout-1", "borderCallout1" },
- { "line-callout-2", "borderCallout2" },
- { "line-callout-3", "borderCallout3" },
- { "mso-spt49", "borderCallout3" },
- { "mso-spt50", "accentBorderCallout1" },
- { "mso-spt51", "accentBorderCallout2" },
- { "mso-spt52", "accentBorderCallout3" },
- { "mso-spt53", "ribbon" },
- { "mso-spt54", "ribbon2" },
- { "chevron", "chevron" },
- { "pentagon", "pentagon" },
- { "forbidden", "noSmoking" },
- { "star8", "star8" },
- { "mso-spt59", "star16" },
- { "mso-spt60", "star32" },
- { "rectangular-callout", "wedgeRectCallout" },
- { "round-rectangular-callout", "wedgeRoundRectCallout" },
- { "round-callout", "wedgeEllipseCallout" },
- { "mso-spt64", "wave" },
- { "paper", "foldedCorner" },
- { "left-arrow", "leftArrow" },
- { "down-arrow", "downArrow" },
- { "up-arrow", "upArrow" },
- { "left-right-arrow", "leftRightArrow" },
- { "up-down-arrow", "upDownArrow" },
- { "mso-spt71", "irregularSeal1" },
- { "bang", "irregularSeal2" },
- { "lightning", "lightningBolt" },
- { "heart", "heart" },
- { "quad-arrow", "quadArrow" },
- { "left-arrow-callout", "leftArrowCallout" },
- { "right-arrow-callout", "rightArrowCallout" },
- { "up-arrow-callout", "upArrowCallout" },
- { "down-arrow-callout", "downArrowCallout" },
- { "left-right-arrow-callout", "leftRightArrowCallout" },
- { "up-down-arrow-callout", "upDownArrowCallout" },
- { "quad-arrow-callout", "quadArrowCallout" },
- { "quad-bevel", "bevel" },
- { "left-bracket", "leftBracket" },
- { "right-bracket", "rightBracket" },
- { "left-brace", "leftBrace" },
- { "right-brace", "rightBrace" },
- { "mso-spt89", "leftUpArrow" },
- { "mso-spt90", "bentUpArrow" },
- { "mso-spt91", "bentArrow" },
- { "star24", "star24" },
- { "striped-right-arrow", "stripedRightArrow" },
- { "notched-right-arrow", "notchedRightArrow" },
- { "block-arc", "blockArc" },
- { "smiley", "smileyFace" },
- { "vertical-scroll", "verticalScroll" },
- { "horizontal-scroll", "horizontalScroll" },
- { "circular-arrow", "circularArrow" },
- { "mso-spt100", "pie" }, // looks like MSO_SPT is wrong here
- { "mso-spt101", "uturnArrow" },
- { "mso-spt102", "curvedRightArrow" },
- { "mso-spt103", "curvedLeftArrow" },
- { "mso-spt104", "curvedUpArrow" },
- { "mso-spt105", "curvedDownArrow" },
- { "cloud-callout", "cloudCallout" },
- { "mso-spt107", "ellipseRibbon" },
- { "mso-spt108", "ellipseRibbon2" },
- { "flowchart-process", "flowChartProcess" },
- { "flowchart-decision", "flowChartDecision" },
- { "flowchart-data", "flowChartInputOutput" },
- { "flowchart-predefined-process", "flowChartPredefinedProcess" },
- { "flowchart-internal-storage", "flowChartInternalStorage" },
- { "flowchart-document", "flowChartDocument" },
- { "flowchart-multidocument", "flowChartMultidocument" },
- { "flowchart-terminator", "flowChartTerminator" },
- { "flowchart-preparation", "flowChartPreparation" },
- { "flowchart-manual-input", "flowChartManualInput" },
- { "flowchart-manual-operation", "flowChartManualOperation" },
- { "flowchart-connector", "flowChartConnector" },
- { "flowchart-card", "flowChartPunchedCard" },
- { "flowchart-punched-tape", "flowChartPunchedTape" },
- { "flowchart-summing-junction", "flowChartSummingJunction" },
- { "flowchart-or", "flowChartOr" },
- { "flowchart-collate", "flowChartCollate" },
- { "flowchart-sort", "flowChartSort" },
- { "flowchart-extract", "flowChartExtract" },
- { "flowchart-merge", "flowChartMerge" },
- { "mso-spt129", "flowChartOfflineStorage" },
- { "flowchart-stored-data", "flowChartOnlineStorage" },
- { "flowchart-sequential-access", "flowChartMagneticTape" },
- { "flowchart-magnetic-disk", "flowChartMagneticDisk" },
- { "flowchart-direct-access-storage", "flowChartMagneticDrum" },
- { "flowchart-display", "flowChartDisplay" },
- { "flowchart-delay", "flowChartDelay" },
- // { "fontwork-plain-text", "textPlainText" },
- // { "fontwork-stop", "textStop" },
- // { "fontwork-triangle-up", "textTriangle" },
- // { "fontwork-triangle-down", "textTriangleInverted" },
- // { "fontwork-chevron-up", "textChevron" },
- // { "fontwork-chevron-down", "textChevronInverted" },
- // { "mso-spt142", "textRingInside" },
- // { "mso-spt143", "textRingOutside" },
- // { "fontwork-arch-up-curve", "textArchUpCurve" },
- // { "fontwork-arch-down-curve", "textArchDownCurve" },
- // { "fontwork-circle-curve", "textCircleCurve" },
- // { "fontwork-open-circle-curve", "textButtonCurve" },
- // { "fontwork-arch-up-pour", "textArchUpPour" },
- // { "fontwork-arch-down-pour", "textArchDownPour" },
- // { "fontwork-circle-pour", "textCirclePour" },
- // { "fontwork-open-circle-pour", "textButtonPour" },
- // { "fontwork-curve-up", "textCurveUp" },
- // { "fontwork-curve-down", "textCurveDown" },
- // { "fontwork-fade-up-and-right", "textCascadeUp" },
- // { "fontwork-fade-up-and-left", "textCascadeDown" },
- // { "fontwork-wave", "textWave1" },
- // { "mso-spt157", "textWave2" },
- // { "mso-spt158", "textWave3" },
- // { "mso-spt159", "textWave4" },
- // { "fontwork-inflate", "textInflate" },
- // { "mso-spt161", "textDeflate" },
- // { "mso-spt162", "textInflateBottom" },
- // { "mso-spt163", "textDeflateBottom" },
- // { "mso-spt164", "textInflateTop" },
- // { "mso-spt165", "textDeflateTop" },
- // { "mso-spt166", "textDeflateInflate" },
- // { "mso-spt167", "textDeflateInflateDeflate" },
- // { "fontwork-fade-right", "textFadeRight" },
- // { "fontwork-fade-left", "textFadeLeft" },
- // { "fontwork-fade-up", "textFadeUp" },
- // { "fontwork-fade-down", "textFadeDown" },
- // { "fontwork-slant-up", "textSlantUp" },
- // { "fontwork-slant-down", "textSlantDown" },
- // { "mso-spt174", "textCanUp" },
- // { "mso-spt175", "textCanDown" },
- { "flowchart-alternate-process", "flowChartAlternateProcess" },
- { "flowchart-off-page-connector", "flowChartOffpageConnector" },
- { "mso-spt178", "callout1" },
- { "mso-spt179", "accentCallout1" },
- { "mso-spt180", "borderCallout1" },
- { "mso-spt182", "leftRightUpArrow" },
- { "sun", "sun" },
- { "moon", "moon" },
- { "bracket-pair", "bracketPair" },
- { "brace-pair", "bracePair" },
- { "star4", "star4" },
- { "mso-spt188", "doubleWave" },
- { "mso-spt189", "actionButtonBlank" },
- { "mso-spt190", "actionButtonHome" },
- { "mso-spt191", "actionButtonHelp" },
- { "mso-spt192", "actionButtonInformation" },
- { "mso-spt193", "actionButtonForwardNext" },
- { "mso-spt194", "actionButtonBackPrevious" },
- { "mso-spt195", "actionButtonEnd" },
- { "mso-spt196", "actionButtonBeginning" },
- { "mso-spt197", "actionButtonReturn" },
- { "mso-spt198", "actionButtonDocument" },
- { "mso-spt199", "actionButtonSound" },
- { "mso-spt200", "actionButtonMovie" },
- // { "mso-spt201", "hostControl" },
- { "mso-spt202", "rect" },
- { "ooxml-actionButtonSound", "actionButtonSound" },
- { "ooxml-borderCallout1", "borderCallout1" },
- { "ooxml-plaqueTabs", "plaqueTabs" },
- { "ooxml-curvedLeftArrow", "curvedLeftArrow" },
- { "ooxml-octagon", "octagon" },
- { "ooxml-leftRightRibbon", "leftRightRibbon" },
- { "ooxml-actionButtonInformation", "actionButtonInformation" },
- { "ooxml-bentConnector5", "bentConnector5" },
- { "ooxml-circularArrow", "circularArrow" },
- { "ooxml-downArrowCallout", "downArrowCallout" },
- { "ooxml-mathMinus", "mathMinus" },
- { "ooxml-gear9", "gear9" },
- { "ooxml-round1Rect", "round1Rect" },
- { "ooxml-sun", "sun" },
- { "ooxml-plaque", "plaque" },
- { "ooxml-chevron", "chevron" },
- { "ooxml-flowChartPreparation", "flowChartPreparation" },
- { "ooxml-diagStripe", "diagStripe" },
- { "ooxml-pentagon", "pentagon" },
- { "ooxml-funnel", "funnel" },
- { "ooxml-chartStar", "chartStar" },
- { "ooxml-accentBorderCallout1", "accentBorderCallout1" },
- { "ooxml-notchedRightArrow", "notchedRightArrow" },
- { "ooxml-rightBracket", "rightBracket" },
- { "ooxml-flowChartOffpageConnector", "flowChartOffpageConnector" },
- { "ooxml-leftRightArrow", "leftRightArrow" },
- { "ooxml-decagon", "decagon" },
- { "ooxml-actionButtonHelp", "actionButtonHelp" },
- { "ooxml-star24", "star24" },
- { "ooxml-mathDivide", "mathDivide" },
- { "ooxml-curvedConnector4", "curvedConnector4" },
- { "ooxml-flowChartOr", "flowChartOr" },
- { "ooxml-borderCallout3", "borderCallout3" },
- { "ooxml-upDownArrowCallout", "upDownArrowCallout" },
- { "ooxml-flowChartDecision", "flowChartDecision" },
- { "ooxml-leftRightArrowCallout", "leftRightArrowCallout" },
- { "ooxml-flowChartManualOperation", "flowChartManualOperation" },
- { "ooxml-snipRoundRect", "snipRoundRect" },
- { "ooxml-mathPlus", "mathPlus" },
- { "ooxml-actionButtonForwardNext", "actionButtonForwardNext" },
- { "ooxml-can", "can" },
- { "ooxml-foldedCorner", "foldedCorner" },
- { "ooxml-star32", "star32" },
- { "ooxml-flowChartInternalStorage", "flowChartInternalStorage" },
- { "ooxml-upDownArrow", "upDownArrow" },
- { "ooxml-irregularSeal2", "irregularSeal2" },
- { "ooxml-mathEqual", "mathEqual" },
- { "ooxml-star12", "star12" },
- { "ooxml-uturnArrow", "uturnArrow" },
- { "ooxml-squareTabs", "squareTabs" },
- { "ooxml-leftRightUpArrow", "leftRightUpArrow" },
- { "ooxml-homePlate", "homePlate" },
- { "ooxml-dodecagon", "dodecagon" },
- { "ooxml-leftArrowCallout", "leftArrowCallout" },
- { "ooxml-chord", "chord" },
- { "ooxml-quadArrowCallout", "quadArrowCallout" },
- { "ooxml-actionButtonBeginning", "actionButtonBeginning" },
- { "ooxml-ellipse", "ellipse" },
- { "ooxml-actionButtonEnd", "actionButtonEnd" },
- { "ooxml-arc", "arc" },
- { "ooxml-star16", "star16" },
- { "ooxml-parallelogram", "parallelogram" },
- { "ooxml-bevel", "bevel" },
- { "ooxml-roundRect", "roundRect" },
- { "ooxml-accentCallout1", "accentCallout1" },
- { "ooxml-flowChartSort", "flowChartSort" },
- { "ooxml-star8", "star8" },
- { "ooxml-flowChartAlternateProcess", "flowChartAlternateProcess" },
- { "ooxml-moon", "moon" },
- { "ooxml-star6", "star6" },
- { "ooxml-round2SameRect", "round2SameRect" },
- { "ooxml-nonIsoscelesTrapezoid", "nonIsoscelesTrapezoid" },
- { "ooxml-diamond", "diamond" },
- { "ooxml-ellipseRibbon", "ellipseRibbon" },
- { "ooxml-callout2", "callout2" },
- { "ooxml-pie", "pie" },
- { "ooxml-star4", "star4" },
- { "ooxml-flowChartPredefinedProcess", "flowChartPredefinedProcess" },
- { "ooxml-flowChartPunchedTape", "flowChartPunchedTape" },
- { "ooxml-curvedConnector2", "curvedConnector2" },
- { "ooxml-bentConnector3", "bentConnector3" },
- { "ooxml-cornerTabs", "cornerTabs" },
- { "ooxml-hexagon", "hexagon" },
- { "ooxml-flowChartConnector", "flowChartConnector" },
- { "ooxml-flowChartMagneticDisk", "flowChartMagneticDisk" },
- { "ooxml-heart", "heart" },
- { "ooxml-ribbon2", "ribbon2" },
- { "ooxml-bracePair", "bracePair" },
- { "ooxml-flowChartExtract", "flowChartExtract" },
- { "ooxml-actionButtonHome", "actionButtonHome" },
- { "ooxml-accentBorderCallout3", "accentBorderCallout3" },
- { "ooxml-flowChartOfflineStorage", "flowChartOfflineStorage" },
- { "ooxml-irregularSeal1", "irregularSeal1" },
- { "ooxml-quadArrow", "quadArrow" },
- { "ooxml-leftBrace", "leftBrace" },
- { "ooxml-leftBracket", "leftBracket" },
- { "ooxml-blockArc", "blockArc" },
- { "ooxml-curvedConnector3", "curvedConnector3" },
- { "ooxml-wedgeRoundRectCallout", "wedgeRoundRectCallout" },
- { "ooxml-actionButtonMovie", "actionButtonMovie" },
- { "ooxml-flowChartOnlineStorage", "flowChartOnlineStorage" },
- { "ooxml-gear6", "gear6" },
- { "ooxml-halfFrame", "halfFrame" },
- { "ooxml-snip2SameRect", "snip2SameRect" },
- { "ooxml-triangle", "triangle" },
- { "ooxml-teardrop", "teardrop" },
- { "ooxml-flowChartDocument", "flowChartDocument" },
- { "ooxml-rightArrowCallout", "rightArrowCallout" },
- { "ooxml-rightBrace", "rightBrace" },
- { "ooxml-chartPlus", "chartPlus" },
- { "ooxml-flowChartManualInput", "flowChartManualInput" },
- { "ooxml-flowChartMerge", "flowChartMerge" },
- { "ooxml-line", "line" },
- { "ooxml-downArrow", "downArrow" },
- { "ooxml-upArrow", "upArrow" },
- { "ooxml-curvedDownArrow", "curvedDownArrow" },
- { "ooxml-actionButtonReturn", "actionButtonReturn" },
- { "ooxml-flowChartInputOutput", "flowChartInputOutput" },
- { "ooxml-bracketPair", "bracketPair" },
- { "ooxml-smileyFace", "smileyFace" },
- { "ooxml-actionButtonBlank", "actionButtonBlank" },
- { "ooxml-wave", "wave" },
- { "ooxml-swooshArrow", "swooshArrow" },
- { "ooxml-flowChartSummingJunction", "flowChartSummingJunction" },
- { "ooxml-lightningBolt", "lightningBolt" },
- { "ooxml-flowChartDisplay", "flowChartDisplay" },
- { "ooxml-actionButtonBackPrevious", "actionButtonBackPrevious" },
- { "ooxml-frame", "frame" },
- { "ooxml-rtTriangle", "rtTriangle" },
- { "ooxml-flowChartMagneticTape", "flowChartMagneticTape" },
- { "ooxml-curvedRightArrow", "curvedRightArrow" },
- { "ooxml-leftUpArrow", "leftUpArrow" },
- { "ooxml-wedgeEllipseCallout", "wedgeEllipseCallout" },
- { "ooxml-doubleWave", "doubleWave" },
- { "ooxml-bentArrow", "bentArrow" },
- { "ooxml-star10", "star10" },
- { "ooxml-leftArrow", "leftArrow" },
- { "ooxml-curvedUpArrow", "curvedUpArrow" },
- { "ooxml-snip1Rect", "snip1Rect" },
- { "ooxml-ellipseRibbon2", "ellipseRibbon2" },
- { "ooxml-plus", "plus" },
- { "ooxml-accentCallout3", "accentCallout3" },
- { "ooxml-leftCircularArrow", "leftCircularArrow" },
- { "ooxml-rightArrow", "rightArrow" },
- { "ooxml-flowChartPunchedCard", "flowChartPunchedCard" },
- { "ooxml-snip2DiagRect", "snip2DiagRect" },
- { "ooxml-verticalScroll", "verticalScroll" },
- { "ooxml-star7", "star7" },
- { "ooxml-chartX", "chartX" },
- { "ooxml-cloud", "cloud" },
- { "ooxml-cube", "cube" },
- { "ooxml-round2DiagRect", "round2DiagRect" },
- { "ooxml-flowChartMultidocument", "flowChartMultidocument" },
- { "ooxml-actionButtonDocument", "actionButtonDocument" },
- { "ooxml-flowChartTerminator", "flowChartTerminator" },
- { "ooxml-flowChartDelay", "flowChartDelay" },
- { "ooxml-curvedConnector5", "curvedConnector5" },
- { "ooxml-horizontalScroll", "horizontalScroll" },
- { "ooxml-bentConnector4", "bentConnector4" },
- { "ooxml-leftRightCircularArrow", "leftRightCircularArrow" },
- { "ooxml-wedgeRectCallout", "wedgeRectCallout" },
- { "ooxml-accentCallout2", "accentCallout2" },
- { "ooxml-flowChartMagneticDrum", "flowChartMagneticDrum" },
- { "ooxml-corner", "corner" },
- { "ooxml-borderCallout2", "borderCallout2" },
- { "ooxml-donut", "donut" },
- { "ooxml-flowChartCollate", "flowChartCollate" },
- { "ooxml-mathNotEqual", "mathNotEqual" },
- { "ooxml-bentConnector2", "bentConnector2" },
- { "ooxml-mathMultiply", "mathMultiply" },
- { "ooxml-heptagon", "heptagon" },
- { "ooxml-rect", "rect" },
- { "ooxml-accentBorderCallout2", "accentBorderCallout2" },
- { "ooxml-pieWedge", "pieWedge" },
- { "ooxml-upArrowCallout", "upArrowCallout" },
- { "ooxml-flowChartProcess", "flowChartProcess" },
- { "ooxml-star5", "star5" },
- { "ooxml-lineInv", "lineInv" },
- { "ooxml-straightConnector1", "straightConnector1" },
- { "ooxml-stripedRightArrow", "stripedRightArrow" },
- { "ooxml-callout3", "callout3" },
- { "ooxml-bentUpArrow", "bentUpArrow" },
- { "ooxml-noSmoking", "noSmoking" },
- { "ooxml-trapezoid", "trapezoid" },
- { "ooxml-cloudCallout", "cloudCallout" },
- { "ooxml-callout1", "callout1" },
- { "ooxml-ribbon", "ribbon" },
- { "ooxml-rect", "rect" },
-};
-
-struct {
- const char* sDML;
- MSO_SPT nVML;
-} const pDMLToVMLTable[] = {
- {"notPrimitive", mso_sptNotPrimitive},
- {"rectangle", mso_sptRectangle},
- {"roundRectangle", mso_sptRoundRectangle},
- {"ellipse", mso_sptEllipse},
- {"diamond", mso_sptDiamond},
- {"triangle", mso_sptIsocelesTriangle},
- {"rtTriangle", mso_sptRightTriangle},
- {"parallelogram", mso_sptParallelogram},
- {"trapezoid", mso_sptTrapezoid},
- {"hexagon", mso_sptHexagon},
- {"octagon", mso_sptOctagon},
- {"plus", mso_sptPlus},
- {"star5", mso_sptStar},
- {"rightArrow", mso_sptArrow},
- {"thickArrow", mso_sptThickArrow},
- {"homePlate", mso_sptHomePlate},
- {"cube", mso_sptCube},
- {"wedgeRoundRectCallout", mso_sptBalloon},
- {"star16", mso_sptSeal},
- {"arc", mso_sptArc},
- {"line", mso_sptLine},
- {"plaque", mso_sptPlaque},
- {"can", mso_sptCan},
- {"donut", mso_sptDonut},
- {"textPlain", mso_sptTextSimple},
- {"textStop", mso_sptTextOctagon},
- {"textTriangle", mso_sptTextHexagon},
- {"textCanDown", mso_sptTextCurve},
- {"textWave1", mso_sptTextWave},
- {"textArchUpPour", mso_sptTextRing},
- {"textCanDown", mso_sptTextOnCurve},
- {"textArchUp", mso_sptTextOnRing},
- {"straightConnector1", mso_sptStraightConnector1},
- {"bentConnector2", mso_sptBentConnector2},
- {"bentConnector3", mso_sptBentConnector3},
- {"bentConnector4", mso_sptBentConnector4},
- {"bentConnector5", mso_sptBentConnector5},
- {"curvedConnector2", mso_sptCurvedConnector2},
- {"curvedConnector3", mso_sptCurvedConnector3},
- {"curvedConnector4", mso_sptCurvedConnector4},
- {"curvedConnector5", mso_sptCurvedConnector5},
- {"callout1", mso_sptCallout1},
- {"callout2", mso_sptCallout2},
- {"callout3", mso_sptCallout3},
- {"accentCallout1", mso_sptAccentCallout1},
- {"accentCallout2", mso_sptAccentCallout2},
- {"accentCallout3", mso_sptAccentCallout3},
- {"borderCallout1", mso_sptBorderCallout1},
- {"borderCallout2", mso_sptBorderCallout2},
- {"borderCallout3", mso_sptBorderCallout3},
- {"accentBorderCallout1", mso_sptAccentBorderCallout1},
- {"accentBorderCallout2", mso_sptAccentBorderCallout2},
- {"accentBorderCallout3", mso_sptAccentBorderCallout3},
- {"ribbon", mso_sptRibbon},
- {"ribbon2", mso_sptRibbon2},
- {"chevron", mso_sptChevron},
- {"pentagon", mso_sptPentagon},
- {"noSmoking", mso_sptNoSmoking},
- {"star8", mso_sptSeal8},
- {"star16", mso_sptSeal16},
- {"star32", mso_sptSeal32},
- {"wedgeRectCallout", mso_sptWedgeRectCallout},
- {"wedgeRoundRectCallout", mso_sptWedgeRRectCallout},
- {"wedgeEllipseCallout", mso_sptWedgeEllipseCallout},
- {"wave", mso_sptWave},
- {"foldedCorner", mso_sptFoldedCorner},
- {"leftArrow", mso_sptLeftArrow},
- {"downArrow", mso_sptDownArrow},
- {"upArrow", mso_sptUpArrow},
- {"leftRightArrow", mso_sptLeftRightArrow},
- {"upDownArrow", mso_sptUpDownArrow},
- {"irregularSeal1", mso_sptIrregularSeal1},
- {"irregularSeal2", mso_sptIrregularSeal2},
- {"lightningBolt", mso_sptLightningBolt},
- {"heart", mso_sptHeart},
- {"pictureFrame", mso_sptPictureFrame},
- {"quadArrow", mso_sptQuadArrow},
- {"leftArrowCallout", mso_sptLeftArrowCallout},
- {"rightArrowCallout", mso_sptRightArrowCallout},
- {"upArrowCallout", mso_sptUpArrowCallout},
- {"downArrowCallout", mso_sptDownArrowCallout},
- {"leftRightArrowCallout", mso_sptLeftRightArrowCallout},
- {"upDownArrowCallout", mso_sptUpDownArrowCallout},
- {"quadArrowCallout", mso_sptQuadArrowCallout},
- {"bevel", mso_sptBevel},
- {"leftBracket", mso_sptLeftBracket},
- {"rightBracket", mso_sptRightBracket},
- {"leftBrace", mso_sptLeftBrace},
- {"rightBrace", mso_sptRightBrace},
- {"leftUpArrow", mso_sptLeftUpArrow},
- {"bentUpArrow", mso_sptBentUpArrow},
- {"bentArrow", mso_sptBentArrow},
- {"star24", mso_sptSeal24},
- {"stripedRightArrow", mso_sptStripedRightArrow},
- {"notchedRightArrow", mso_sptNotchedRightArrow},
- {"blockArc", mso_sptBlockArc},
- {"smileyFace", mso_sptSmileyFace},
- {"verticalScroll", mso_sptVerticalScroll},
- {"horizontalScroll", mso_sptHorizontalScroll},
- {"circularArrow", mso_sptCircularArrow},
- {"notchedCircularArrow", mso_sptNotchedCircularArrow},
- {"uturnArrow", mso_sptUturnArrow},
- {"curvedRightArrow", mso_sptCurvedRightArrow},
- {"curvedLeftArrow", mso_sptCurvedLeftArrow},
- {"curvedUpArrow", mso_sptCurvedUpArrow},
- {"curvedDownArrow", mso_sptCurvedDownArrow},
- {"cloudCallout", mso_sptCloudCallout},
- {"ellipseRibbon", mso_sptEllipseRibbon},
- {"ellipseRibbon2", mso_sptEllipseRibbon2},
- {"flowChartProcess", mso_sptFlowChartProcess},
- {"flowChartDecision", mso_sptFlowChartDecision},
- {"flowChartInputOutput", mso_sptFlowChartInputOutput},
- {"flowChartPredefinedProcess", mso_sptFlowChartPredefinedProcess},
- {"flowChartInternalStorage", mso_sptFlowChartInternalStorage},
- {"flowChartDocument", mso_sptFlowChartDocument},
- {"flowChartMultidocument", mso_sptFlowChartMultidocument},
- {"flowChartTerminator", mso_sptFlowChartTerminator},
- {"flowChartPreparation", mso_sptFlowChartPreparation},
- {"flowChartManualInput", mso_sptFlowChartManualInput},
- {"flowChartManualOperation", mso_sptFlowChartManualOperation},
- {"flowChartConnector", mso_sptFlowChartConnector},
- {"flowChartPunchedCard", mso_sptFlowChartPunchedCard},
- {"flowChartPunchedTape", mso_sptFlowChartPunchedTape},
- {"flowChartSummingJunction", mso_sptFlowChartSummingJunction},
- {"flowChartOr", mso_sptFlowChartOr},
- {"flowChartCollate", mso_sptFlowChartCollate},
- {"flowChartSort", mso_sptFlowChartSort},
- {"flowChartExtract", mso_sptFlowChartExtract},
- {"flowChartMerge", mso_sptFlowChartMerge},
- {"flowChartOfflineStorage", mso_sptFlowChartOfflineStorage},
- {"flowChartOnlineStorage", mso_sptFlowChartOnlineStorage},
- {"flowChartMagneticTape", mso_sptFlowChartMagneticTape},
- {"flowChartMagneticDisk", mso_sptFlowChartMagneticDisk},
- {"flowChartMagneticDrum", mso_sptFlowChartMagneticDrum},
- {"flowChartDisplay", mso_sptFlowChartDisplay},
- {"flowChartDelay", mso_sptFlowChartDelay},
- {"textPlain", mso_sptTextPlainText},
- {"textStop", mso_sptTextStop},
- {"textTriangle", mso_sptTextTriangle},
- {"textTriangleInverted", mso_sptTextTriangleInverted},
- {"textChevron", mso_sptTextChevron},
- {"textChevronInverted", mso_sptTextChevronInverted},
- {"textRingInside", mso_sptTextRingInside},
- {"textRingOutside", mso_sptTextRingOutside},
- {"textArchUp", mso_sptTextArchUpCurve},
- {"textArchDown", mso_sptTextArchDownCurve},
- {"textCircle", mso_sptTextCircleCurve},
- {"textButton", mso_sptTextButtonCurve},
- {"textArchUpPour", mso_sptTextArchUpPour},
- {"textArchDownPour", mso_sptTextArchDownPour},
- {"textCirclePour", mso_sptTextCirclePour},
- {"textButtonPour", mso_sptTextButtonPour},
- {"textCurveUp", mso_sptTextCurveUp},
- {"textCurveDown", mso_sptTextCurveDown},
- {"textCascadeUp", mso_sptTextCascadeUp},
- {"textCascadeDown", mso_sptTextCascadeDown},
- {"textWave1", mso_sptTextWave1},
- {"textWave2", mso_sptTextWave2},
- {"textWave3", mso_sptTextWave3},
- {"textWave4", mso_sptTextWave4},
- {"textInflate", mso_sptTextInflate},
- {"textDeflate", mso_sptTextDeflate},
- {"textInflateBottom", mso_sptTextInflateBottom},
- {"textDeflateBottom", mso_sptTextDeflateBottom},
- {"textInflateTop", mso_sptTextInflateTop},
- {"textDeflateTop", mso_sptTextDeflateTop},
- {"textDeflateInflate", mso_sptTextDeflateInflate},
- {"textDeflateInflateDeflate", mso_sptTextDeflateInflateDeflate},
- {"textFadeRight", mso_sptTextFadeRight},
- {"textFadeLeft", mso_sptTextFadeLeft},
- {"textFadeUp", mso_sptTextFadeUp},
- {"textFadeDown", mso_sptTextFadeDown},
- {"textSlantUp", mso_sptTextSlantUp},
- {"textSlantDown", mso_sptTextSlantDown},
- {"textCanUp", mso_sptTextCanUp},
- {"textCanDown", mso_sptTextCanDown},
- {"flowChartAlternateProcess", mso_sptFlowChartAlternateProcess},
- {"flowChartOffpageConnector", mso_sptFlowChartOffpageConnector},
- {"callout1", mso_sptCallout90},
- {"accentCallout1", mso_sptAccentCallout90},
- {"borderCallout1", mso_sptBorderCallout90},
- {"accentBorderCallout1", mso_sptAccentBorderCallout90},
- {"leftRightUpArrow", mso_sptLeftRightUpArrow},
- {"sun", mso_sptSun},
- {"moon", mso_sptMoon},
- {"bracketPair", mso_sptBracketPair},
- {"bracePair", mso_sptBracePair},
- {"star4", mso_sptSeal4},
- {"doubleWave", mso_sptDoubleWave},
- {"actionButtonBlank", mso_sptActionButtonBlank},
- {"actionButtonHome", mso_sptActionButtonHome},
- {"actionButtonHelp", mso_sptActionButtonHelp},
- {"actionButtonInformation", mso_sptActionButtonInformation},
- {"actionButtonForwardNext", mso_sptActionButtonForwardNext},
- {"actionButtonBackPrevious", mso_sptActionButtonBackPrevious},
- {"actionButtonEnd", mso_sptActionButtonEnd},
- {"actionButtonBeginning", mso_sptActionButtonBeginning},
- {"actionButtonReturn", mso_sptActionButtonReturn},
- {"actionButtonDocument", mso_sptActionButtonDocument},
- {"actionButtonSound", mso_sptActionButtonSound},
- {"actionButtonMovie", mso_sptActionButtonMovie},
- {"hostControl", mso_sptHostControl},
- {"textBox", mso_sptTextBox},
-};
-
-const char* GetOOXMLPresetGeometry( const char* sShapeType )
+OString GetOOXMLPresetGeometry( std::u16string_view rShapeType )
{
- typedef std::unordered_map< const char*, const char*, rtl::CStringHash, rtl::CStringEqual> CustomShapeTypeTranslationHashMap;
- static CustomShapeTypeTranslationHashMap aCustomShapeTypeTranslationHashMap = [&]()
- {
- CustomShapeTypeTranslationHashMap tmp;
- for(const msfilter::util::CustomShapeTypeTranslationTable& i : pCustomShapeTypeTranslationTable)
- {
- tmp[ i.sOOo ] = i.sMSO;
- }
- return tmp;
- }();
- CustomShapeTypeTranslationHashMap::iterator i(
- aCustomShapeTypeTranslationHashMap.find(sShapeType));
- return i == aCustomShapeTypeTranslationHashMap.end() ? "rect" : i->second;
+ typedef std::unordered_map<std::u16string_view, OString> CustomShapeTypeTranslationHashMap;
+ static const CustomShapeTypeTranslationHashMap aCustomShapeTypeTranslationHashMap{
+ // { "non-primitive", mso_sptMin },
+ { u"frame", "frame" },
+ { u"rectangle", "rect" },
+ { u"round-rectangle", "roundRect" },
+ { u"ellipse", "ellipse" },
+ { u"diamond", "diamond" },
+ { u"isosceles-triangle", "triangle" },
+ { u"right-triangle", "rtTriangle" },
+ { u"parallelogram", "parallelogram" },
+ { u"trapezoid", "trapezoid" },
+ { u"hexagon", "hexagon" },
+ { u"octagon", "octagon" },
+ { u"cross", "plus" },
+ { u"star5", "star5" },
+ { u"right-arrow", "rightArrow" },
+ // { u"mso-spt14", mso_sptThickArrow },
+ { u"pentagon-right", "homePlate" },
+ { u"cube", "cube" },
+ // { u"mso-spt17", mso_sptBalloon },
+ // { u"mso-spt18", mso_sptSeal },
+ { u"mso-spt19", "arc" },
+ { u"mso-spt20", "line" },
+ { u"mso-spt21", "plaque" },
+ { u"can", "can" },
+ { u"ring", "donut" },
+ { u"mso-spt24", "textPlain" },
+ { u"mso-spt25", "textStop" },
+ { u"mso-spt26", "textTriangle" },
+ { u"mso-spt27", "textCanDown" },
+ { u"mso-spt28", "textWave1" },
+ { u"mso-spt29", "textArchUpPour" },
+ { u"mso-spt30", "textCanDown" },
+ { u"mso-spt31", "textArchUp" },
+ { u"mso-spt32", "straightConnector1" },
+ { u"mso-spt33", "bentConnector2" },
+ { u"mso-spt34", "bentConnector3" },
+ { u"mso-spt35", "bentConnector4" },
+ { u"mso-spt36", "bentConnector5" },
+ { u"mso-spt37", "curvedConnector2" },
+ { u"mso-spt38", "curvedConnector3" },
+ { u"mso-spt39", "curvedConnector4" },
+ { u"mso-spt40", "curvedConnector5" },
+ { u"mso-spt41", "callout1" },
+ { u"mso-spt42", "callout2" },
+ { u"mso-spt43", "callout3" },
+ { u"mso-spt44", "accentCallout1" },
+ { u"mso-spt45", "accentCallout2" },
+ { u"mso-spt46", "accentCallout3" },
+ { u"line-callout-1", "borderCallout1" },
+ { u"line-callout-2", "borderCallout2" },
+ { u"line-callout-3", "borderCallout3" },
+ { u"mso-spt49", "borderCallout3" },
+ { u"mso-spt50", "accentBorderCallout1" },
+ { u"mso-spt51", "accentBorderCallout2" },
+ { u"mso-spt52", "accentBorderCallout3" },
+ { u"mso-spt53", "ribbon" },
+ { u"mso-spt54", "ribbon2" },
+ { u"chevron", "chevron" },
+ { u"pentagon", "pentagon" },
+ { u"forbidden", "noSmoking" },
+ { u"star8", "star8" },
+ { u"mso-spt59", "star16" },
+ { u"mso-spt60", "star32" },
+ { u"rectangular-callout", "wedgeRectCallout" },
+ { u"round-rectangular-callout", "wedgeRoundRectCallout" },
+ { u"round-callout", "wedgeEllipseCallout" },
+ { u"mso-spt64", "wave" },
+ { u"paper", "foldedCorner" },
+ { u"left-arrow", "leftArrow" },
+ { u"down-arrow", "downArrow" },
+ { u"up-arrow", "upArrow" },
+ { u"left-right-arrow", "leftRightArrow" },
+ { u"up-down-arrow", "upDownArrow" },
+ { u"mso-spt71", "irregularSeal1" },
+ { u"bang", "irregularSeal2" },
+ { u"lightning", "lightningBolt" },
+ { u"heart", "heart" },
+ { u"quad-arrow", "quadArrow" },
+ { u"left-arrow-callout", "leftArrowCallout" },
+ { u"right-arrow-callout", "rightArrowCallout" },
+ { u"up-arrow-callout", "upArrowCallout" },
+ { u"down-arrow-callout", "downArrowCallout" },
+ { u"left-right-arrow-callout", "leftRightArrowCallout" },
+ { u"up-down-arrow-callout", "upDownArrowCallout" },
+ { u"quad-arrow-callout", "quadArrowCallout" },
+ { u"quad-bevel", "bevel" },
+ { u"left-bracket", "leftBracket" },
+ { u"right-bracket", "rightBracket" },
+ { u"left-brace", "leftBrace" },
+ { u"right-brace", "rightBrace" },
+ { u"mso-spt89", "leftUpArrow" },
+ { u"mso-spt90", "bentUpArrow" },
+ { u"mso-spt91", "bentArrow" },
+ { u"star24", "star24" },
+ { u"striped-right-arrow", "stripedRightArrow" },
+ { u"notched-right-arrow", "notchedRightArrow" },
+ { u"block-arc", "blockArc" },
+ { u"smiley", "smileyFace" },
+ { u"vertical-scroll", "verticalScroll" },
+ { u"horizontal-scroll", "horizontalScroll" },
+ { u"circular-arrow", "circularArrow" },
+ { u"mso-spt100", "pie" }, // looks like MSO_SPT is wrong here
+ { u"mso-spt101", "uturnArrow" },
+ { u"mso-spt102", "curvedRightArrow" },
+ { u"mso-spt103", "curvedLeftArrow" },
+ { u"mso-spt104", "curvedUpArrow" },
+ { u"mso-spt105", "curvedDownArrow" },
+ { u"cloud-callout", "cloudCallout" },
+ { u"mso-spt107", "ellipseRibbon" },
+ { u"mso-spt108", "ellipseRibbon2" },
+ { u"flowchart-process", "flowChartProcess" },
+ { u"flowchart-decision", "flowChartDecision" },
+ { u"flowchart-data", "flowChartInputOutput" },
+ { u"flowchart-predefined-process", "flowChartPredefinedProcess" },
+ { u"flowchart-internal-storage", "flowChartInternalStorage" },
+ { u"flowchart-document", "flowChartDocument" },
+ { u"flowchart-multidocument", "flowChartMultidocument" },
+ { u"flowchart-terminator", "flowChartTerminator" },
+ { u"flowchart-preparation", "flowChartPreparation" },
+ { u"flowchart-manual-input", "flowChartManualInput" },
+ { u"flowchart-manual-operation", "flowChartManualOperation" },
+ { u"flowchart-connector", "flowChartConnector" },
+ { u"flowchart-card", "flowChartPunchedCard" },
+ { u"flowchart-punched-tape", "flowChartPunchedTape" },
+ { u"flowchart-summing-junction", "flowChartSummingJunction" },
+ { u"flowchart-or", "flowChartOr" },
+ { u"flowchart-collate", "flowChartCollate" },
+ { u"flowchart-sort", "flowChartSort" },
+ { u"flowchart-extract", "flowChartExtract" },
+ { u"flowchart-merge", "flowChartMerge" },
+ { u"mso-spt129", "flowChartOfflineStorage" },
+ { u"flowchart-stored-data", "flowChartOnlineStorage" },
+ { u"flowchart-sequential-access", "flowChartMagneticTape" },
+ { u"flowchart-magnetic-disk", "flowChartMagneticDisk" },
+ { u"flowchart-direct-access-storage", "flowChartMagneticDrum" },
+ { u"flowchart-display", "flowChartDisplay" },
+ { u"flowchart-delay", "flowChartDelay" },
+ // { u"fontwork-plain-text", "textPlainText" },
+ // { u"fontwork-stop", "textStop" },
+ // { u"fontwork-triangle-up", "textTriangle" },
+ // { u"fontwork-triangle-down", "textTriangleInverted" },
+ // { u"fontwork-chevron-up", "textChevron" },
+ // { u"fontwork-chevron-down", "textChevronInverted" },
+ // { u"mso-spt142", "textRingInside" },
+ // { u"mso-spt143", "textRingOutside" },
+ // { u"fontwork-arch-up-curve", "textArchUpCurve" },
+ // { u"fontwork-arch-down-curve", "textArchDownCurve" },
+ // { u"fontwork-circle-curve", "textCircleCurve" },
+ // { u"fontwork-open-circle-curve", "textButtonCurve" },
+ // { u"fontwork-arch-up-pour", "textArchUpPour" },
+ // { u"fontwork-arch-down-pour", "textArchDownPour" },
+ // { u"fontwork-circle-pour", "textCirclePour" },
+ // { u"fontwork-open-circle-pour", "textButtonPour" },
+ // { u"fontwork-curve-up", "textCurveUp" },
+ // { u"fontwork-curve-down", "textCurveDown" },
+ // { u"fontwork-fade-up-and-right", "textCascadeUp" },
+ // { u"fontwork-fade-up-and-left", "textCascadeDown" },
+ // { u"fontwork-wave", "textWave1" },
+ // { u"mso-spt157", "textWave2" },
+ // { u"mso-spt158", "textWave3" },
+ // { u"mso-spt159", "textWave4" },
+ // { u"fontwork-inflate", "textInflate" },
+ // { u"mso-spt161", "textDeflate" },
+ // { u"mso-spt162", "textInflateBottom" },
+ // { u"mso-spt163", "textDeflateBottom" },
+ // { u"mso-spt164", "textInflateTop" },
+ // { u"mso-spt165", "textDeflateTop" },
+ // { u"mso-spt166", "textDeflateInflate" },
+ // { u"mso-spt167", "textDeflateInflateDeflate" },
+ // { u"fontwork-fade-right", "textFadeRight" },
+ // { u"fontwork-fade-left", "textFadeLeft" },
+ // { u"fontwork-fade-up", "textFadeUp" },
+ // { u"fontwork-fade-down", "textFadeDown" },
+ // { u"fontwork-slant-up", "textSlantUp" },
+ // { u"fontwork-slant-down", "textSlantDown" },
+ // { u"mso-spt174", "textCanUp" },
+ // { u"mso-spt175", "textCanDown" },
+ { u"flowchart-alternate-process", "flowChartAlternateProcess" },
+ { u"flowchart-off-page-connector", "flowChartOffpageConnector" },
+ { u"mso-spt178", "callout1" },
+ { u"mso-spt179", "accentCallout1" },
+ { u"mso-spt180", "borderCallout1" },
+ { u"mso-spt182", "leftRightUpArrow" },
+ { u"sun", "sun" },
+ { u"moon", "moon" },
+ { u"bracket-pair", "bracketPair" },
+ { u"brace-pair", "bracePair" },
+ { u"star4", "star4" },
+ { u"mso-spt188", "doubleWave" },
+ { u"mso-spt189", "actionButtonBlank" },
+ { u"mso-spt190", "actionButtonHome" },
+ { u"mso-spt191", "actionButtonHelp" },
+ { u"mso-spt192", "actionButtonInformation" },
+ { u"mso-spt193", "actionButtonForwardNext" },
+ { u"mso-spt194", "actionButtonBackPrevious" },
+ { u"mso-spt195", "actionButtonEnd" },
+ { u"mso-spt196", "actionButtonBeginning" },
+ { u"mso-spt197", "actionButtonReturn" },
+ { u"mso-spt198", "actionButtonDocument" },
+ { u"mso-spt199", "actionButtonSound" },
+ { u"mso-spt200", "actionButtonMovie" },
+ // { u"mso-spt201", "hostControl" },
+ { u"mso-spt202", "rect" },
+ { u"ooxml-actionButtonSound", "actionButtonSound" },
+ { u"ooxml-borderCallout1", "borderCallout1" },
+ { u"ooxml-plaqueTabs", "plaqueTabs" },
+ { u"ooxml-curvedLeftArrow", "curvedLeftArrow" },
+ { u"ooxml-octagon", "octagon" },
+ { u"ooxml-leftRightRibbon", "leftRightRibbon" },
+ { u"ooxml-actionButtonInformation", "actionButtonInformation" },
+ { u"ooxml-bentConnector5", "bentConnector5" },
+ { u"ooxml-circularArrow", "circularArrow" },
+ { u"ooxml-downArrowCallout", "downArrowCallout" },
+ { u"ooxml-mathMinus", "mathMinus" },
+ { u"ooxml-gear9", "gear9" },
+ { u"ooxml-round1Rect", "round1Rect" },
+ { u"ooxml-sun", "sun" },
+ { u"ooxml-plaque", "plaque" },
+ { u"ooxml-chevron", "chevron" },
+ { u"ooxml-flowChartPreparation", "flowChartPreparation" },
+ { u"ooxml-diagStripe", "diagStripe" },
+ { u"ooxml-pentagon", "pentagon" },
+ { u"ooxml-funnel", "funnel" },
+ { u"ooxml-chartStar", "chartStar" },
+ { u"ooxml-accentBorderCallout1", "accentBorderCallout1" },
+ { u"ooxml-notchedRightArrow", "notchedRightArrow" },
+ { u"ooxml-rightBracket", "rightBracket" },
+ { u"ooxml-flowChartOffpageConnector", "flowChartOffpageConnector" },
+ { u"ooxml-leftRightArrow", "leftRightArrow" },
+ { u"ooxml-decagon", "decagon" },
+ { u"ooxml-actionButtonHelp", "actionButtonHelp" },
+ { u"ooxml-star24", "star24" },
+ { u"ooxml-mathDivide", "mathDivide" },
+ { u"ooxml-curvedConnector4", "curvedConnector4" },
+ { u"ooxml-flowChartOr", "flowChartOr" },
+ { u"ooxml-borderCallout3", "borderCallout3" },
+ { u"ooxml-upDownArrowCallout", "upDownArrowCallout" },
+ { u"ooxml-flowChartDecision", "flowChartDecision" },
+ { u"ooxml-leftRightArrowCallout", "leftRightArrowCallout" },
+ { u"ooxml-flowChartManualOperation", "flowChartManualOperation" },
+ { u"ooxml-snipRoundRect", "snipRoundRect" },
+ { u"ooxml-mathPlus", "mathPlus" },
+ { u"ooxml-actionButtonForwardNext", "actionButtonForwardNext" },
+ { u"ooxml-can", "can" },
+ { u"ooxml-foldedCorner", "foldedCorner" },
+ { u"ooxml-star32", "star32" },
+ { u"ooxml-flowChartInternalStorage", "flowChartInternalStorage" },
+ { u"ooxml-upDownArrow", "upDownArrow" },
+ { u"ooxml-irregularSeal2", "irregularSeal2" },
+ { u"ooxml-mathEqual", "mathEqual" },
+ { u"ooxml-star12", "star12" },
+ { u"ooxml-uturnArrow", "uturnArrow" },
+ { u"ooxml-squareTabs", "squareTabs" },
+ { u"ooxml-leftRightUpArrow", "leftRightUpArrow" },
+ { u"ooxml-homePlate", "homePlate" },
+ { u"ooxml-dodecagon", "dodecagon" },
+ { u"ooxml-leftArrowCallout", "leftArrowCallout" },
+ { u"ooxml-chord", "chord" },
+ { u"ooxml-quadArrowCallout", "quadArrowCallout" },
+ { u"ooxml-actionButtonBeginning", "actionButtonBeginning" },
+ { u"ooxml-ellipse", "ellipse" },
+ { u"ooxml-actionButtonEnd", "actionButtonEnd" },
+ { u"ooxml-arc", "arc" },
+ { u"ooxml-star16", "star16" },
+ { u"ooxml-parallelogram", "parallelogram" },
+ { u"ooxml-bevel", "bevel" },
+ { u"ooxml-roundRect", "roundRect" },
+ { u"ooxml-accentCallout1", "accentCallout1" },
+ { u"ooxml-flowChartSort", "flowChartSort" },
+ { u"ooxml-star8", "star8" },
+ { u"ooxml-flowChartAlternateProcess", "flowChartAlternateProcess" },
+ { u"ooxml-moon", "moon" },
+ { u"ooxml-star6", "star6" },
+ { u"ooxml-round2SameRect", "round2SameRect" },
+ { u"ooxml-nonIsoscelesTrapezoid", "nonIsoscelesTrapezoid" },
+ { u"ooxml-diamond", "diamond" },
+ { u"ooxml-ellipseRibbon", "ellipseRibbon" },
+ { u"ooxml-callout2", "callout2" },
+ { u"ooxml-pie", "pie" },
+ { u"ooxml-star4", "star4" },
+ { u"ooxml-flowChartPredefinedProcess", "flowChartPredefinedProcess" },
+ { u"ooxml-flowChartPunchedTape", "flowChartPunchedTape" },
+ { u"ooxml-curvedConnector2", "curvedConnector2" },
+ { u"ooxml-bentConnector3", "bentConnector3" },
+ { u"ooxml-cornerTabs", "cornerTabs" },
+ { u"ooxml-hexagon", "hexagon" },
+ { u"ooxml-flowChartConnector", "flowChartConnector" },
+ { u"ooxml-flowChartMagneticDisk", "flowChartMagneticDisk" },
+ { u"ooxml-heart", "heart" },
+ { u"ooxml-ribbon2", "ribbon2" },
+ { u"ooxml-bracePair", "bracePair" },
+ { u"ooxml-flowChartExtract", "flowChartExtract" },
+ { u"ooxml-actionButtonHome", "actionButtonHome" },
+ { u"ooxml-accentBorderCallout3", "accentBorderCallout3" },
+ { u"ooxml-flowChartOfflineStorage", "flowChartOfflineStorage" },
+ { u"ooxml-irregularSeal1", "irregularSeal1" },
+ { u"ooxml-quadArrow", "quadArrow" },
+ { u"ooxml-leftBrace", "leftBrace" },
+ { u"ooxml-leftBracket", "leftBracket" },
+ { u"ooxml-blockArc", "blockArc" },
+ { u"ooxml-curvedConnector3", "curvedConnector3" },
+ { u"ooxml-wedgeRoundRectCallout", "wedgeRoundRectCallout" },
+ { u"ooxml-actionButtonMovie", "actionButtonMovie" },
+ { u"ooxml-flowChartOnlineStorage", "flowChartOnlineStorage" },
+ { u"ooxml-gear6", "gear6" },
+ { u"ooxml-halfFrame", "halfFrame" },
+ { u"ooxml-snip2SameRect", "snip2SameRect" },
+ { u"ooxml-triangle", "triangle" },
+ { u"ooxml-teardrop", "teardrop" },
+ { u"ooxml-flowChartDocument", "flowChartDocument" },
+ { u"ooxml-rightArrowCallout", "rightArrowCallout" },
+ { u"ooxml-rightBrace", "rightBrace" },
+ { u"ooxml-chartPlus", "chartPlus" },
+ { u"ooxml-flowChartManualInput", "flowChartManualInput" },
+ { u"ooxml-flowChartMerge", "flowChartMerge" },
+ { u"ooxml-line", "line" },
+ { u"ooxml-downArrow", "downArrow" },
+ { u"ooxml-upArrow", "upArrow" },
+ { u"ooxml-curvedDownArrow", "curvedDownArrow" },
+ { u"ooxml-actionButtonReturn", "actionButtonReturn" },
+ { u"ooxml-flowChartInputOutput", "flowChartInputOutput" },
+ { u"ooxml-bracketPair", "bracketPair" },
+ { u"ooxml-smileyFace", "smileyFace" },
+ { u"ooxml-actionButtonBlank", "actionButtonBlank" },
+ { u"ooxml-wave", "wave" },
+ { u"ooxml-swooshArrow", "swooshArrow" },
+ { u"ooxml-flowChartSummingJunction", "flowChartSummingJunction" },
+ { u"ooxml-lightningBolt", "lightningBolt" },
+ { u"ooxml-flowChartDisplay", "flowChartDisplay" },
+ { u"ooxml-actionButtonBackPrevious", "actionButtonBackPrevious" },
+ { u"ooxml-frame", "frame" },
+ { u"ooxml-rtTriangle", "rtTriangle" },
+ { u"ooxml-flowChartMagneticTape", "flowChartMagneticTape" },
+ { u"ooxml-curvedRightArrow", "curvedRightArrow" },
+ { u"ooxml-leftUpArrow", "leftUpArrow" },
+ { u"ooxml-wedgeEllipseCallout", "wedgeEllipseCallout" },
+ { u"ooxml-doubleWave", "doubleWave" },
+ { u"ooxml-bentArrow", "bentArrow" },
+ { u"ooxml-star10", "star10" },
+ { u"ooxml-leftArrow", "leftArrow" },
+ { u"ooxml-curvedUpArrow", "curvedUpArrow" },
+ { u"ooxml-snip1Rect", "snip1Rect" },
+ { u"ooxml-ellipseRibbon2", "ellipseRibbon2" },
+ { u"ooxml-plus", "plus" },
+ { u"ooxml-accentCallout3", "accentCallout3" },
+ { u"ooxml-leftCircularArrow", "leftCircularArrow" },
+ { u"ooxml-rightArrow", "rightArrow" },
+ { u"ooxml-flowChartPunchedCard", "flowChartPunchedCard" },
+ { u"ooxml-snip2DiagRect", "snip2DiagRect" },
+ { u"ooxml-verticalScroll", "verticalScroll" },
+ { u"ooxml-star7", "star7" },
+ { u"ooxml-chartX", "chartX" },
+ { u"ooxml-cloud", "cloud" },
+ { u"ooxml-cube", "cube" },
+ { u"ooxml-round2DiagRect", "round2DiagRect" },
+ { u"ooxml-flowChartMultidocument", "flowChartMultidocument" },
+ { u"ooxml-actionButtonDocument", "actionButtonDocument" },
+ { u"ooxml-flowChartTerminator", "flowChartTerminator" },
+ { u"ooxml-flowChartDelay", "flowChartDelay" },
+ { u"ooxml-curvedConnector5", "curvedConnector5" },
+ { u"ooxml-horizontalScroll", "horizontalScroll" },
+ { u"ooxml-bentConnector4", "bentConnector4" },
+ { u"ooxml-leftRightCircularArrow", "leftRightCircularArrow" },
+ { u"ooxml-wedgeRectCallout", "wedgeRectCallout" },
+ { u"ooxml-accentCallout2", "accentCallout2" },
+ { u"ooxml-flowChartMagneticDrum", "flowChartMagneticDrum" },
+ { u"ooxml-corner", "corner" },
+ { u"ooxml-borderCallout2", "borderCallout2" },
+ { u"ooxml-donut", "donut" },
+ { u"ooxml-flowChartCollate", "flowChartCollate" },
+ { u"ooxml-mathNotEqual", "mathNotEqual" },
+ { u"ooxml-bentConnector2", "bentConnector2" },
+ { u"ooxml-mathMultiply", "mathMultiply" },
+ { u"ooxml-heptagon", "heptagon" },
+ { u"ooxml-rect", "rect" },
+ { u"ooxml-accentBorderCallout2", "accentBorderCallout2" },
+ { u"ooxml-pieWedge", "pieWedge" },
+ { u"ooxml-upArrowCallout", "upArrowCallout" },
+ { u"ooxml-flowChartProcess", "flowChartProcess" },
+ { u"ooxml-star5", "star5" },
+ { u"ooxml-lineInv", "lineInv" },
+ { u"ooxml-straightConnector1", "straightConnector1" },
+ { u"ooxml-stripedRightArrow", "stripedRightArrow" },
+ { u"ooxml-callout3", "callout3" },
+ { u"ooxml-bentUpArrow", "bentUpArrow" },
+ { u"ooxml-noSmoking", "noSmoking" },
+ { u"ooxml-trapezoid", "trapezoid" },
+ { u"ooxml-cloudCallout", "cloudCallout" },
+ { u"ooxml-callout1", "callout1" },
+ { u"ooxml-ribbon", "ribbon" },
+ { u"ooxml-rect", "rect" },
+ };
+ auto i(aCustomShapeTypeTranslationHashMap.find(rShapeType));
+ return i == aCustomShapeTypeTranslationHashMap.end() ? "rect"_ostr : i->second;
}
-MSO_SPT GETVMLShapeType(const OString& aType)
+MSO_SPT GETVMLShapeType(std::u16string_view aType)
{
- typedef std::unordered_map< const char*, MSO_SPT, rtl::CStringHash, rtl::CStringEqual> DMLToVMLTranslationHashMap;
- static DMLToVMLTranslationHashMap aDMLToVMLMap = [&]()
- {
- DMLToVMLTranslationHashMap tmp;
- for (auto& i : pDMLToVMLTable)
- tmp[i.sDML] = i.nVML;
- return tmp;
- }();
-
- const char* pDML = GetOOXMLPresetGeometry(aType.getStr());
- DMLToVMLTranslationHashMap::iterator i(aDMLToVMLMap.find(pDML));
+ typedef std::unordered_map<std::string_view, MSO_SPT> DMLToVMLTranslationHashMap;
+ static const DMLToVMLTranslationHashMap aDMLToVMLMap{
+ {"notPrimitive", mso_sptNotPrimitive},
+ {"rectangle", mso_sptRectangle},
+ {"roundRectangle", mso_sptRoundRectangle},
+ {"ellipse", mso_sptEllipse},
+ {"diamond", mso_sptDiamond},
+ {"triangle", mso_sptIsocelesTriangle},
+ {"rtTriangle", mso_sptRightTriangle},
+ {"parallelogram", mso_sptParallelogram},
+ {"trapezoid", mso_sptTrapezoid},
+ {"hexagon", mso_sptHexagon},
+ {"octagon", mso_sptOctagon},
+ {"plus", mso_sptPlus},
+ {"star5", mso_sptStar},
+ {"rightArrow", mso_sptArrow},
+ {"thickArrow", mso_sptThickArrow},
+ {"homePlate", mso_sptHomePlate},
+ {"cube", mso_sptCube},
+ {"wedgeRoundRectCallout", mso_sptBalloon},
+ {"star16", mso_sptSeal},
+ {"arc", mso_sptArc},
+ {"line", mso_sptLine},
+ {"plaque", mso_sptPlaque},
+ {"can", mso_sptCan},
+ {"donut", mso_sptDonut},
+ {"textPlain", mso_sptTextSimple},
+ {"textStop", mso_sptTextOctagon},
+ {"textTriangle", mso_sptTextHexagon},
+ {"textCanDown", mso_sptTextCurve},
+ {"textWave1", mso_sptTextWave},
+ {"textArchUpPour", mso_sptTextRing},
+ {"textCanDown", mso_sptTextOnCurve},
+ {"textArchUp", mso_sptTextOnRing},
+ {"straightConnector1", mso_sptStraightConnector1},
+ {"bentConnector2", mso_sptBentConnector2},
+ {"bentConnector3", mso_sptBentConnector3},
+ {"bentConnector4", mso_sptBentConnector4},
+ {"bentConnector5", mso_sptBentConnector5},
+ {"curvedConnector2", mso_sptCurvedConnector2},
+ {"curvedConnector3", mso_sptCurvedConnector3},
+ {"curvedConnector4", mso_sptCurvedConnector4},
+ {"curvedConnector5", mso_sptCurvedConnector5},
+ {"callout1", mso_sptCallout1},
+ {"callout2", mso_sptCallout2},
+ {"callout3", mso_sptCallout3},
+ {"accentCallout1", mso_sptAccentCallout1},
+ {"accentCallout2", mso_sptAccentCallout2},
+ {"accentCallout3", mso_sptAccentCallout3},
+ {"borderCallout1", mso_sptBorderCallout1},
+ {"borderCallout2", mso_sptBorderCallout2},
+ {"borderCallout3", mso_sptBorderCallout3},
+ {"accentBorderCallout1", mso_sptAccentBorderCallout1},
+ {"accentBorderCallout2", mso_sptAccentBorderCallout2},
+ {"accentBorderCallout3", mso_sptAccentBorderCallout3},
+ {"ribbon", mso_sptRibbon},
+ {"ribbon2", mso_sptRibbon2},
+ {"chevron", mso_sptChevron},
+ {"pentagon", mso_sptPentagon},
+ {"noSmoking", mso_sptNoSmoking},
+ {"star8", mso_sptSeal8},
+ {"star16", mso_sptSeal16},
+ {"star32", mso_sptSeal32},
+ {"wedgeRectCallout", mso_sptWedgeRectCallout},
+ {"wedgeRoundRectCallout", mso_sptWedgeRRectCallout},
+ {"wedgeEllipseCallout", mso_sptWedgeEllipseCallout},
+ {"wave", mso_sptWave},
+ {"foldedCorner", mso_sptFoldedCorner},
+ {"leftArrow", mso_sptLeftArrow},
+ {"downArrow", mso_sptDownArrow},
+ {"upArrow", mso_sptUpArrow},
+ {"leftRightArrow", mso_sptLeftRightArrow},
+ {"upDownArrow", mso_sptUpDownArrow},
+ {"irregularSeal1", mso_sptIrregularSeal1},
+ {"irregularSeal2", mso_sptIrregularSeal2},
+ {"lightningBolt", mso_sptLightningBolt},
+ {"heart", mso_sptHeart},
+ {"pictureFrame", mso_sptPictureFrame},
+ {"quadArrow", mso_sptQuadArrow},
+ {"leftArrowCallout", mso_sptLeftArrowCallout},
+ {"rightArrowCallout", mso_sptRightArrowCallout},
+ {"upArrowCallout", mso_sptUpArrowCallout},
+ {"downArrowCallout", mso_sptDownArrowCallout},
+ {"leftRightArrowCallout", mso_sptLeftRightArrowCallout},
+ {"upDownArrowCallout", mso_sptUpDownArrowCallout},
+ {"quadArrowCallout", mso_sptQuadArrowCallout},
+ {"bevel", mso_sptBevel},
+ {"leftBracket", mso_sptLeftBracket},
+ {"rightBracket", mso_sptRightBracket},
+ {"leftBrace", mso_sptLeftBrace},
+ {"rightBrace", mso_sptRightBrace},
+ {"leftUpArrow", mso_sptLeftUpArrow},
+ {"bentUpArrow", mso_sptBentUpArrow},
+ {"bentArrow", mso_sptBentArrow},
+ {"star24", mso_sptSeal24},
+ {"stripedRightArrow", mso_sptStripedRightArrow},
+ {"notchedRightArrow", mso_sptNotchedRightArrow},
+ {"blockArc", mso_sptBlockArc},
+ {"smileyFace", mso_sptSmileyFace},
+ {"verticalScroll", mso_sptVerticalScroll},
+ {"horizontalScroll", mso_sptHorizontalScroll},
+ {"circularArrow", mso_sptCircularArrow},
+ {"notchedCircularArrow", mso_sptNotchedCircularArrow},
+ {"uturnArrow", mso_sptUturnArrow},
+ {"curvedRightArrow", mso_sptCurvedRightArrow},
+ {"curvedLeftArrow", mso_sptCurvedLeftArrow},
+ {"curvedUpArrow", mso_sptCurvedUpArrow},
+ {"curvedDownArrow", mso_sptCurvedDownArrow},
+ {"cloudCallout", mso_sptCloudCallout},
+ {"ellipseRibbon", mso_sptEllipseRibbon},
+ {"ellipseRibbon2", mso_sptEllipseRibbon2},
+ {"flowChartProcess", mso_sptFlowChartProcess},
+ {"flowChartDecision", mso_sptFlowChartDecision},
+ {"flowChartInputOutput", mso_sptFlowChartInputOutput},
+ {"flowChartPredefinedProcess", mso_sptFlowChartPredefinedProcess},
+ {"flowChartInternalStorage", mso_sptFlowChartInternalStorage},
+ {"flowChartDocument", mso_sptFlowChartDocument},
+ {"flowChartMultidocument", mso_sptFlowChartMultidocument},
+ {"flowChartTerminator", mso_sptFlowChartTerminator},
+ {"flowChartPreparation", mso_sptFlowChartPreparation},
+ {"flowChartManualInput", mso_sptFlowChartManualInput},
+ {"flowChartManualOperation", mso_sptFlowChartManualOperation},
+ {"flowChartConnector", mso_sptFlowChartConnector},
+ {"flowChartPunchedCard", mso_sptFlowChartPunchedCard},
+ {"flowChartPunchedTape", mso_sptFlowChartPunchedTape},
+ {"flowChartSummingJunction", mso_sptFlowChartSummingJunction},
+ {"flowChartOr", mso_sptFlowChartOr},
+ {"flowChartCollate", mso_sptFlowChartCollate},
+ {"flowChartSort", mso_sptFlowChartSort},
+ {"flowChartExtract", mso_sptFlowChartExtract},
+ {"flowChartMerge", mso_sptFlowChartMerge},
+ {"flowChartOfflineStorage", mso_sptFlowChartOfflineStorage},
+ {"flowChartOnlineStorage", mso_sptFlowChartOnlineStorage},
+ {"flowChartMagneticTape", mso_sptFlowChartMagneticTape},
+ {"flowChartMagneticDisk", mso_sptFlowChartMagneticDisk},
+ {"flowChartMagneticDrum", mso_sptFlowChartMagneticDrum},
+ {"flowChartDisplay", mso_sptFlowChartDisplay},
+ {"flowChartDelay", mso_sptFlowChartDelay},
+ {"textPlain", mso_sptTextPlainText},
+ {"textStop", mso_sptTextStop},
+ {"textTriangle", mso_sptTextTriangle},
+ {"textTriangleInverted", mso_sptTextTriangleInverted},
+ {"textChevron", mso_sptTextChevron},
+ {"textChevronInverted", mso_sptTextChevronInverted},
+ {"textRingInside", mso_sptTextRingInside},
+ {"textRingOutside", mso_sptTextRingOutside},
+ {"textArchUp", mso_sptTextArchUpCurve},
+ {"textArchDown", mso_sptTextArchDownCurve},
+ {"textCircle", mso_sptTextCircleCurve},
+ {"textButton", mso_sptTextButtonCurve},
+ {"textArchUpPour", mso_sptTextArchUpPour},
+ {"textArchDownPour", mso_sptTextArchDownPour},
+ {"textCirclePour", mso_sptTextCirclePour},
+ {"textButtonPour", mso_sptTextButtonPour},
+ {"textCurveUp", mso_sptTextCurveUp},
+ {"textCurveDown", mso_sptTextCurveDown},
+ {"textCascadeUp", mso_sptTextCascadeUp},
+ {"textCascadeDown", mso_sptTextCascadeDown},
+ {"textWave1", mso_sptTextWave1},
+ {"textWave2", mso_sptTextWave2},
+ {"textWave3", mso_sptTextWave3},
+ {"textWave4", mso_sptTextWave4},
+ {"textInflate", mso_sptTextInflate},
+ {"textDeflate", mso_sptTextDeflate},
+ {"textInflateBottom", mso_sptTextInflateBottom},
+ {"textDeflateBottom", mso_sptTextDeflateBottom},
+ {"textInflateTop", mso_sptTextInflateTop},
+ {"textDeflateTop", mso_sptTextDeflateTop},
+ {"textDeflateInflate", mso_sptTextDeflateInflate},
+ {"textDeflateInflateDeflate", mso_sptTextDeflateInflateDeflate},
+ {"textFadeRight", mso_sptTextFadeRight},
+ {"textFadeLeft", mso_sptTextFadeLeft},
+ {"textFadeUp", mso_sptTextFadeUp},
+ {"textFadeDown", mso_sptTextFadeDown},
+ {"textSlantUp", mso_sptTextSlantUp},
+ {"textSlantDown", mso_sptTextSlantDown},
+ {"textCanUp", mso_sptTextCanUp},
+ {"textCanDown", mso_sptTextCanDown},
+ {"flowChartAlternateProcess", mso_sptFlowChartAlternateProcess},
+ {"flowChartOffpageConnector", mso_sptFlowChartOffpageConnector},
+ {"callout1", mso_sptCallout90},
+ {"accentCallout1", mso_sptAccentCallout90},
+ {"borderCallout1", mso_sptBorderCallout90},
+ {"accentBorderCallout1", mso_sptAccentBorderCallout90},
+ {"leftRightUpArrow", mso_sptLeftRightUpArrow},
+ {"sun", mso_sptSun},
+ {"moon", mso_sptMoon},
+ {"bracketPair", mso_sptBracketPair},
+ {"bracePair", mso_sptBracePair},
+ {"star4", mso_sptSeal4},
+ {"doubleWave", mso_sptDoubleWave},
+ {"actionButtonBlank", mso_sptActionButtonBlank},
+ {"actionButtonHome", mso_sptActionButtonHome},
+ {"actionButtonHelp", mso_sptActionButtonHelp},
+ {"actionButtonInformation", mso_sptActionButtonInformation},
+ {"actionButtonForwardNext", mso_sptActionButtonForwardNext},
+ {"actionButtonBackPrevious", mso_sptActionButtonBackPrevious},
+ {"actionButtonEnd", mso_sptActionButtonEnd},
+ {"actionButtonBeginning", mso_sptActionButtonBeginning},
+ {"actionButtonReturn", mso_sptActionButtonReturn},
+ {"actionButtonDocument", mso_sptActionButtonDocument},
+ {"actionButtonSound", mso_sptActionButtonSound},
+ {"actionButtonMovie", mso_sptActionButtonMovie},
+ {"hostControl", mso_sptHostControl},
+ {"textBox", mso_sptTextBox},
+ };
+
+ auto i(aDMLToVMLMap.find(GetOOXMLPresetGeometry(aType)));
return i == aDMLToVMLMap.end() ? mso_sptNil : i->second;
}
@@ -1334,15 +1340,12 @@ sal_uInt8 TransColToIco( const Color& rCol )
case sal_uInt32(COL_AUTO): nCol = 0; break;
default:
- static const Color aColArr[ 16 ] = {
+ static const BitmapPalette aBmpPal {
COL_BLACK, COL_LIGHTBLUE, COL_LIGHTCYAN, COL_LIGHTGREEN,
COL_LIGHTMAGENTA,COL_LIGHTRED, COL_YELLOW, COL_WHITE,
COL_BLUE, COL_CYAN, COL_GREEN, COL_MAGENTA,
COL_RED, COL_BROWN, COL_GRAY, COL_LIGHTGRAY
};
- BitmapPalette aBmpPal(16);
- for( sal_uInt16 i = 0; i < 16; ++i )
- aBmpPal[i] = aColArr[ i ];
nCol = static_cast< sal_uInt8 >(GetBestIndex(aBmpPal, rCol) + 1);
break;
diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx
index e669423ebfc9..524510583190 100644
--- a/filter/source/msfilter/viscache.hxx
+++ b/filter/source/msfilter/viscache.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_MSFILTER_VISCACHE_HXX
-#define INCLUDED_FILTER_SOURCE_MSFILTER_VISCACHE_HXX
+#pragma once
#include <memory>
#include <sfx2/objsh.hxx>
@@ -45,11 +44,9 @@ public:
pMtf.reset( new GDIMetaFile( rMtf ) );
}
void SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; }
- void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; }
+ void SetAdviseFlags( sal_uInt32 nAdv ) { nAdvFlags = nAdv; }
void SetSize( const Size & rSize ) { aSize = rSize; }
void Write( SvStream & rStm );
};
-#endif // INCLUDED_FILTER_SOURCE_MSFILTER_VISCACHE_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index 082f701d125e..755f14ec6be2 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -35,16 +35,14 @@
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/XSeekable.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::cppu;
-using namespace ::osl;
using namespace ::sax;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::xml;
using namespace ::com::sun::star::xml::sax;
@@ -120,13 +118,13 @@ OdfFlatXml::importer(
sal_Int32 paramCount = sourceData.getLength();
for (sal_Int32 paramIdx = 0; paramIdx < paramCount; paramIdx++)
- {
- paramName = sourceData[paramIdx].Name;
- if ( paramName == "InputStream" )
- sourceData[paramIdx].Value >>= inputStream;
- else if ( paramName == "URL" )
- sourceData[paramIdx].Value >>= url;
- }
+ {
+ paramName = sourceData[paramIdx].Name;
+ if ( paramName == "InputStream" )
+ sourceData[paramIdx].Value >>= inputStream;
+ else if ( paramName == "URL" )
+ sourceData[paramIdx].Value >>= url;
+ }
OSL_ASSERT(inputStream.is());
if (!inputStream.is())
@@ -179,13 +177,13 @@ OdfFlatXml::importer(
sal_Int32 paramCount = sourceData.getLength();
for (sal_Int32 paramIdx = 0; paramIdx < paramCount; paramIdx++)
- {
- paramName = sourceData[paramIdx].Name;
- if ( paramName == "InputStream" )
- sourceData[paramIdx].Value >>= inputStream;
- else if ( paramName == "URL" )
- sourceData[paramIdx].Value >>= url;
- }
+ {
+ paramName = sourceData[paramIdx].Name;
+ if ( paramName == "InputStream" )
+ sourceData[paramIdx].Value >>= inputStream;
+ else if ( paramName == "URL" )
+ sourceData[paramIdx].Value >>= url;
+ }
OSL_ASSERT(inputStream.is());
if (!inputStream.is())
@@ -226,17 +224,17 @@ OdfFlatXml::exporter(const Sequence< PropertyValue >& sourceData,
// Read output stream and target URL from the parameters given in sourceData.
sal_Int32 paramCount = sourceData.getLength();
for (sal_Int32 paramIdx = 0; paramIdx < paramCount; paramIdx++)
- {
- paramName = sourceData[paramIdx].Name;
- if ( paramName == "OutputStream" )
- sourceData[paramIdx].Value >>= outputStream;
- }
+ {
+ paramName = sourceData[paramIdx].Name;
+ if ( paramName == "OutputStream" )
+ sourceData[paramIdx].Value >>= outputStream;
+ }
if (!getDelegate().is())
- {
- Reference< XDocumentHandler > saxWriter = Writer::create(m_xContext);
- setDelegate(saxWriter);
- }
+ {
+ Reference< XDocumentHandler > saxWriter = Writer::create(m_xContext);
+ setDelegate(saxWriter);
+ }
// get data source interface ...
Reference<XActiveDataSource> dataSource(getDelegate(), UNO_QUERY);
OSL_ASSERT(dataSource.is());
@@ -254,7 +252,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
filter_OdfFlatXml_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new OdfFlatXml(context)));
+ return cppu::acquire(new OdfFlatXml(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 050c1aa4d5cc..c4e133297e95 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -24,11 +24,13 @@
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <sfx2/passwd.hxx>
-#include <unotools/resmgr.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sfx2/objsh.hxx>
-#include <svx/AccessibilityCheckDialog.hxx>
+#include <svl/stritem.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <comphelper/lok.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/storagehelper.hxx>
@@ -42,11 +44,6 @@
#include <com/sun/star/beans/XMaterialHolder.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-static OUString PDFFilterResId(const char* pId)
-{
- return Translate::get(pId, Translate::Create("flt"));
-}
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -54,11 +51,10 @@ using namespace ::com::sun::star::uno;
Please note: the default used here are the same as per specification,
They should be the same in PDFFilter::implExport and in PDFExport::PDFExport
*/
-ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue >& rFilterData,
+ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, const Sequence< PropertyValue >& rFilterData,
const Reference< XComponent >& rxDoc)
: SfxTabDialogController(pParent, "filter/ui/pdfoptionsdialog.ui", "PdfOptionsDialog"),
mrDoc(rxDoc),
- mpParent(pParent),
maConfigItem( u"Office.Common/Filter/PDF/Export/", &rFilterData ),
maConfigI18N( u"Office.Common/I18N/CTL/" ),
mbIsPresentation( false ),
@@ -74,6 +70,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
mbUseTaggedPDF( false ),
mbUseTaggedPDFUserSelection( false ),
mbExportNotes( true ),
+ mbExportNotesInMargin( false ),
mbViewPDF( false ),
mbUseReferenceXObject( false ),
mbExportNotesPages( false ),
@@ -98,7 +95,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
mbOpenInFullScreenMode( false ),
mbDisplayPDFDocumentTitle( false ),
mnMagnification( 0 ),
- mnInitialView( 0 ),
+ mnInitialView( 1 ),
mnZoom( 0 ),
mnInitialPage( 1 ),
mnPageLayout( 0 ),
@@ -111,8 +108,10 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
mbCanCopyOrExtract( false ),
mbCanExtractForAccessibility( true ),
- mbIsRangeChecked( false ),
+ mbIsPageRangeChecked( false ),
msPageRange( ' ' ),
+ mbIsSheetRangeChecked( false ),
+ msSheetRange( ' ' ),
mbSelectionIsChecked( false ),
mbExportRelativeFsysLinks( false ),
@@ -198,9 +197,12 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
mbExportOnlyNotesPages = maConfigItem.ReadBool( "ExportOnlyNotesPages", false );
}
mbExportNotes = maConfigItem.ReadBool( "ExportNotes", false );
+ if (mbIsWriter)
+ mbExportNotesInMargin = maConfigItem.ReadBool( "ExportNotesInMargin", false );
mbViewPDF = maConfigItem.ReadBool( "ViewPDFAfterExport", false );
mbExportBookmarks = maConfigItem.ReadBool( "ExportBookmarks", true );
+ mbExportBookmarksUserSelection = mbExportBookmarks;
if ( mbIsPresentation )
mbExportHiddenSlides = maConfigItem.ReadBool( "ExportHiddenSlides", false );
if ( mbIsSpreadsheet )
@@ -227,6 +229,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
mbDisplayPDFDocumentTitle = maConfigItem.ReadBool( "DisplayPDFDocumentTitle", true );
mnInitialView = maConfigItem.ReadInt32( "InitialView", 0 );
+ mnInitialViewUserSelection = mnInitialView;
mnMagnification = maConfigItem.ReadInt32( "Magnification", 0 );
mnZoom = maConfigItem.ReadInt32( "Zoom", 100 );
mnPageLayout = maConfigItem.ReadInt32( "PageLayout", 0 );
@@ -254,7 +257,10 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
// queue the tab pages for later creation (created when first shown)
AddTabPage("general", ImpPDFTabGeneralPage::Create, nullptr );
- AddTabPage("digitalsignatures", ImpPDFTabSigningPage::Create, nullptr);
+ if (comphelper::LibreOfficeKit::isActive())
+ m_xTabCtrl->remove_page("digitalsignatures");
+ else
+ AddTabPage("digitalsignatures", ImpPDFTabSigningPage::Create, nullptr);
AddTabPage("security", ImpPDFTabSecurityPage::Create, nullptr);
AddTabPage("links", ImpPDFTabLinksPage::Create, nullptr);
AddTabPage("userinterface", ImpPDFTabViewerPage::Create, nullptr);
@@ -271,6 +277,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
GetOKButton().set_label(sOkButtonText);
GetCancelButton().connect_clicked(LINK(this, ImpPDFTabDialog, CancelHdl));
+ GetOKButton().connect_clicked(LINK(this, ImpPDFTabDialog, OkHdl));
// remove the reset button, not needed in this tabbed dialog
RemoveResetButton();
@@ -278,7 +285,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
ImpPDFTabSecurityPage* ImpPDFTabDialog::getSecurityPage() const
{
- SfxTabPage* pSecurityPage = GetTabPage("security");
+ SfxTabPage* pSecurityPage = GetTabPage(u"security");
if (pSecurityPage)
{
return static_cast<ImpPDFTabSecurityPage*>(pSecurityPage);
@@ -286,10 +293,19 @@ ImpPDFTabSecurityPage* ImpPDFTabDialog::getSecurityPage() const
return nullptr;
}
+ImpPDFTabOpnFtrPage * ImpPDFTabDialog::getOpenPage() const
+{
+ SfxTabPage* pOpenPage = GetTabPage(u"initialview");
+ if (pOpenPage)
+ {
+ return static_cast<ImpPDFTabOpnFtrPage*>(pOpenPage);
+ }
+ return nullptr;
+}
ImpPDFTabLinksPage* ImpPDFTabDialog::getLinksPage() const
{
- SfxTabPage* pLinksPage = GetTabPage("links");
+ SfxTabPage* pLinksPage = GetTabPage(u"links");
if (pLinksPage)
{
return static_cast<ImpPDFTabLinksPage*>(pLinksPage);
@@ -300,7 +316,7 @@ ImpPDFTabLinksPage* ImpPDFTabDialog::getLinksPage() const
ImpPDFTabGeneralPage* ImpPDFTabDialog::getGeneralPage() const
{
- SfxTabPage* pGeneralPage = GetTabPage("general");
+ SfxTabPage* pGeneralPage = GetTabPage(u"general");
if (pGeneralPage)
{
return static_cast<ImpPDFTabGeneralPage*>(pGeneralPage);
@@ -313,13 +329,67 @@ IMPL_LINK_NOARG(ImpPDFTabDialog, CancelHdl, weld::Button&, void)
m_xDialog->response(RET_CANCEL);
}
+IMPL_LINK_NOARG(ImpPDFTabDialog, OkHdl, weld::Button&, void)
+{
+ if (getGeneralPage()->IsPdfUaSelected())
+ {
+ SfxObjectShell* pShell = SfxObjectShell::GetShellFromComponent(mrDoc);
+ if (pShell)
+ {
+ sfx::AccessibilityIssueCollection aCollection = pShell->runAccessibilityCheck();
+ auto aIssues = aCollection.getIssues();
+ int nIssueCount(aIssues.size());
+ if (!aIssues.empty())
+ {
+ OUString aMessage(FilterResId(STR_WARN_PDFUA_ISSUES, nIssueCount));
+ aMessage = aMessage.replaceFirst("%1", OUString::number(nIssueCount));
+
+ std::unique_ptr<weld::MessageDialog> xPDFUADialog(Application::CreateMessageDialog(
+ getGeneralPage()->GetFrameWeld(), VclMessageType::Warning,
+ VclButtonsType::Cancel, aMessage));
+ xPDFUADialog->add_button(FilterResId(STR_PDFUA_INVESTIGATE, nIssueCount), RET_NO);
+ xPDFUADialog->add_button(FilterResId(STR_PDFUA_IGNORE), RET_YES);
+ xPDFUADialog->set_default_response(RET_YES);
+
+ int ret = xPDFUADialog->run();
+ if (ret == RET_YES)
+ m_xDialog->response(RET_OK);
+ else if (ret == RET_NO)
+ {
+ m_xDialog->response(RET_CANCEL);
+ // Show accessibility check Sidebar deck
+ SfxDispatcher* pDispatcher = pShell->GetDispatcher();
+ if (pDispatcher)
+ {
+ const SfxStringItem sDeckName(SID_SIDEBAR_DECK, "A11yCheckDeck");
+ pDispatcher->ExecuteList(SID_SIDEBAR_DECK, SfxCallMode::RECORD,
+ { &sDeckName });
+ }
+ }
+ }
+ else
+ {
+ m_xDialog->response(RET_OK);
+ }
+ }
+ else
+ {
+ m_xDialog->response(RET_OK);
+ }
+ }
+ else
+ {
+ m_xDialog->response(RET_OK);
+ }
+}
+
ImpPDFTabDialog::~ImpPDFTabDialog()
{
maConfigItem.WriteModifiedConfig();
maConfigI18N.WriteModifiedConfig();
}
-void ImpPDFTabDialog::PageCreated(const OString& rId, SfxTabPage& rPage)
+void ImpPDFTabDialog::PageCreated(const OUString& rId, SfxTabPage& rPage)
{
if (rId == "general")
static_cast<ImpPDFTabGeneralPage&>(rPage).SetFilterConfigItem(this);
@@ -345,41 +415,20 @@ void ImpPDFTabDialog::PageCreated(const OString& rId, SfxTabPage& rPage)
}
}
-short ImpPDFTabDialog::Ok( )
-{
- // here the whole mechanism of the base class is not used
- // when Ok is hit, the user means 'convert to PDF', so simply close with ok
-
- if (getGeneralPage()->IsPdfUaSelected())
- {
- SfxObjectShell* pShell = SfxObjectShell::GetShellFromComponent(mrDoc);
- if (pShell)
- {
- sfx::AccessibilityIssueCollection aCollection = pShell->runAccessibilityCheck();
- if (!aCollection.getIssues().empty())
- {
- svx::AccessibilityCheckDialog aDialog(mpParent, aCollection);
- return aDialog.run();
- }
- }
- }
- return RET_OK;
-}
-
Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
{
// updating the FilterData sequence and storing FilterData to configuration
- if (ImpPDFTabGeneralPage* pPage = static_cast<ImpPDFTabGeneralPage*>(GetTabPage("general")))
+ if (ImpPDFTabGeneralPage* pPage = static_cast<ImpPDFTabGeneralPage*>(GetTabPage(u"general")))
pPage->GetFilterConfigItem(this);
- if (ImpPDFTabViewerPage* pPage = static_cast<ImpPDFTabViewerPage*>(GetTabPage("userinterface")))
+ if (ImpPDFTabViewerPage* pPage = static_cast<ImpPDFTabViewerPage*>(GetTabPage(u"userinterface")))
pPage->GetFilterConfigItem(this);
- if (ImpPDFTabOpnFtrPage* pPage = static_cast<ImpPDFTabOpnFtrPage*>(GetTabPage("initialview")))
+ if (ImpPDFTabOpnFtrPage* pPage = static_cast<ImpPDFTabOpnFtrPage*>(GetTabPage(u"initialview")))
pPage->GetFilterConfigItem(this);
- if (ImpPDFTabLinksPage* pPage = static_cast<ImpPDFTabLinksPage*>(GetTabPage("links")))
+ if (ImpPDFTabLinksPage* pPage = static_cast<ImpPDFTabLinksPage*>(GetTabPage(u"links")))
pPage->GetFilterConfigItem(this);
- if (ImpPDFTabSecurityPage* pPage = static_cast<ImpPDFTabSecurityPage*>( GetTabPage("security")))
+ if (ImpPDFTabSecurityPage* pPage = static_cast<ImpPDFTabSecurityPage*>( GetTabPage(u"security")))
pPage->GetFilterConfigItem(this);
- if (ImpPDFTabSigningPage* pPage = static_cast<ImpPDFTabSigningPage*>(GetTabPage("digitalsignatures")))
+ if (ImpPDFTabSigningPage* pPage = static_cast<ImpPDFTabSigningPage*>(GetTabPage(u"digitalsignatures")))
pPage->GetFilterConfigItem(this);
// prepare the items to be returned
@@ -402,6 +451,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
maConfigItem.WriteBool( "ExportOnlyNotesPages", mbExportOnlyNotesPages );
}
maConfigItem.WriteBool( "ExportNotes", mbExportNotes );
+ if (mbIsWriter)
+ maConfigItem.WriteBool( "ExportNotesInMargin", mbExportNotesInMargin );
maConfigItem.WriteBool( "ViewPDFAfterExport", mbViewPDF );
maConfigItem.WriteBool( "ExportBookmarks", mbExportBookmarks );
@@ -449,15 +500,18 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
maConfigItem.WriteBool( "EnableCopyingOfContent", mbCanCopyOrExtract );
maConfigItem.WriteBool( "EnableTextAccessForAccessibilityTools", mbCanExtractForAccessibility );
- std::vector<beans::PropertyValue> aRet;
-
- aRet.push_back(comphelper::makePropertyValue("Watermark", maWatermarkText));
- aRet.push_back(comphelper::makePropertyValue("EncryptFile", mbEncrypt));
- aRet.push_back(comphelper::makePropertyValue("PreparedPasswords", mxPreparedPasswords));
- aRet.push_back(comphelper::makePropertyValue("RestrictPermissions", mbRestrictPermissions));
- aRet.push_back(comphelper::makePropertyValue("PreparedPermissionPassword", maPreparedOwnerPassword));
- if( mbIsRangeChecked )
+ std::vector<beans::PropertyValue> aRet
+ {
+ comphelper::makePropertyValue("Watermark", maWatermarkText),
+ comphelper::makePropertyValue("EncryptFile", mbEncrypt),
+ comphelper::makePropertyValue("PreparedPasswords", mxPreparedPasswords),
+ comphelper::makePropertyValue("RestrictPermissions", mbRestrictPermissions),
+ comphelper::makePropertyValue("PreparedPermissionPassword", maPreparedOwnerPassword)
+ };
+ if( mbIsPageRangeChecked )
aRet.push_back(comphelper::makePropertyValue("PageRange", msPageRange));
+ if( mbIsSheetRangeChecked )
+ aRet.push_back(comphelper::makePropertyValue("SheetRange", msSheetRange));
else if( mbSelectionIsChecked )
aRet.push_back(comphelper::makePropertyValue("Selection", maSelection));
@@ -481,10 +535,11 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(weld::Container* pPage, weld::DialogC
, mbIsWriter(false)
, mpParent(nullptr)
, mxRbAll(m_xBuilder->weld_radio_button("all"))
- , mxRbRange(m_xBuilder->weld_radio_button("range"))
+ , mxRbPageRange(m_xBuilder->weld_radio_button("pagerange"))
+ , mxRbSheetRange(m_xBuilder->weld_radio_button("sheetrange"))
, mxRbSelection(m_xBuilder->weld_radio_button("selection"))
, mxEdPages(m_xBuilder->weld_entry("pages"))
- , mxSelectedSheets(m_xBuilder->weld_label("selectedsheets"))
+ , mxEdSheets(m_xBuilder->weld_entry("sheets"))
, mxRbLosslessCompression(m_xBuilder->weld_radio_button("losslesscompress"))
, mxRbJPEGCompression(m_xBuilder->weld_radio_button("jpegcompress"))
, mxQualityFrame(m_xBuilder->weld_widget("qualityframe"))
@@ -503,6 +558,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(weld::Container* pPage, weld::DialogC
, mxCbExportHiddenSlides(m_xBuilder->weld_check_button("hiddenpages"))
, mxCbSinglePageSheets(m_xBuilder->weld_check_button("singlepagesheets"))
, mxCbExportNotes(m_xBuilder->weld_check_button("comments"))
+ , mxCbExportNotesInMargin(m_xBuilder->weld_check_button("commentsinmargin"))
, mxCbViewPDF(m_xBuilder->weld_check_button("viewpdf"))
, mxCbUseReferenceXObject(m_xBuilder->weld_check_button("usereferencexobject"))
, mxCbExportNotesPages(m_xBuilder->weld_check_button("notes"))
@@ -514,12 +570,14 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(weld::Container* pPage, weld::DialogC
, mxFtWatermark(m_xBuilder->weld_label("watermarklabel"))
, mxEdWatermark(m_xBuilder->weld_entry("watermarkentry"))
, mxSlidesFt(m_xBuilder->weld_label("slides"))
- , mxSheetsFt(m_xBuilder->weld_label("selectedsheets"))
+ , mxSheetsSelectionFt(m_xBuilder->weld_label("selectedsheets"))
{
}
ImpPDFTabGeneralPage::~ImpPDFTabGeneralPage()
{
+ if (mxPasswordUnusedWarnDialog)
+ mxPasswordUnusedWarnDialog->response(RET_CANCEL);
}
void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
@@ -527,39 +585,45 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
mpParent = pParent;
// init this class data
- mxRbRange->connect_toggled( LINK( this, ImpPDFTabGeneralPage, TogglePagesHdl ) );
+ mxRbPageRange->connect_toggled( LINK( this, ImpPDFTabGeneralPage, TogglePagesHdl ) );
+ mxRbSheetRange->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleSheetsHdl ) );
mxRbAll->set_active(true);
mxRbAll->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleAllHdl ) );
TogglePagesHdl();
+ ToggleSheetsHdl();
- const bool bSelectionPresent = pParent->mbSelectionPresent;
- mxRbSelection->set_sensitive( bSelectionPresent );
- if ( bSelectionPresent )
+ mxRbSelection->set_sensitive( pParent->mbSelectionPresent );
+ if ( pParent->mbSelectionPresent )
mxRbSelection->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleSelectionHdl ) );
mbIsPresentation = pParent->mbIsPresentation;
mbIsWriter = pParent->mbIsWriter;
mbIsSpreadsheet = pParent->mbIsSpreadsheet;
- mxCbExportEmptyPages->set_sensitive( mbIsWriter );
- mxCbExportPlaceholders->set_sensitive( mbIsWriter );
-
mxRbLosslessCompression->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleCompressionHdl ) );
const bool bUseLosslessCompression = pParent->mbUseLosslessCompression;
if ( bUseLosslessCompression )
mxRbLosslessCompression->set_active(true);
else
mxRbJPEGCompression->set_active(true);
+ const bool bReadOnlyCompression = !pParent->maConfigItem.IsReadOnly("UseLosslessCompression");
+ mxRbLosslessCompression->set_sensitive(bReadOnlyCompression);
+ mxRbJPEGCompression->set_sensitive(bReadOnlyCompression);
mxNfQuality->set_value( pParent->mnQuality, FieldUnit::PERCENT );
- mxQualityFrame->set_sensitive(!bUseLosslessCompression);
+ mxQualityFrame->set_sensitive(
+ !bUseLosslessCompression && !pParent->maConfigItem.IsReadOnly("Quality"));
mxCbReduceImageResolution->connect_toggled(LINK(this, ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl));
const bool bReduceImageResolution = pParent->mbReduceImageResolution;
mxCbReduceImageResolution->set_active( bReduceImageResolution );
+ mxCbReduceImageResolution->set_sensitive(
+ !pParent->maConfigItem.IsReadOnly("ReduceImageResolution"));
OUString aStrRes = OUString::number( pParent->mnMaxImageResolution ) + " DPI";
mxCoReduceImageResolution->set_entry_text(aStrRes);
- mxCoReduceImageResolution->set_sensitive( bReduceImageResolution );
+ mxCoReduceImageResolution->set_sensitive(
+ bReduceImageResolution && !pParent->maConfigItem.IsReadOnly("MaxImageResolution"));
+
mxCbWatermark->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleWatermarkHdl ) );
mxFtWatermark->set_sensitive(false );
mxEdWatermark->set_sensitive( false );
@@ -584,6 +648,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
const bool bIsPDFUA = pParent->mbPDFUACompliance;
mxCbPDFUA->set_active(bIsPDFUA);
mxCbPDFUA->connect_toggled(LINK(this, ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHandle));
+ mxCbPDFUA->set_sensitive(!pParent->maConfigItem.IsReadOnly("PDFUACompliance"));
// the TogglePDFVersionOrUniversalAccessibilityHandle handler will read or write the *UserSelection based
// on the mxCbPDFA (= bIsPDFA) state, so we have to prepare the correct input state.
@@ -591,32 +656,59 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
mxCbTaggedPDF->set_active(pParent->mbUseTaggedPDFUserSelection);
else
mbUseTaggedPDFUserSelection = pParent->mbUseTaggedPDFUserSelection;
+
+ mxCbExportBookmarks->set_active(pParent->mbExportBookmarksUserSelection);
TogglePDFVersionOrUniversalAccessibilityHandle(*mxCbPDFA);
mxCbExportFormFields->set_active(pParent->mbExportFormFields);
mxCbExportFormFields->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl ) );
+ mxCbExportFormFields->set_sensitive(!pParent->maConfigItem.IsReadOnly("ExportFormFields"));
mxLbFormsFormat->set_active(static_cast<sal_uInt16>(pParent->mnFormsType));
mxCbAllowDuplicateFieldNames->set_active( pParent->mbAllowDuplicateFieldNames );
+ // FormsFrame contains (and thus sets_sensitive) FormsFormat and AllowDuplicateFieldNames
mxFormsFrame->set_sensitive(pParent->mbExportFormFields);
+ if (pParent->mbExportFormFields)
+ {
+ if (pParent->maConfigItem.IsReadOnly("FormsType"))
+ mxLbFormsFormat->set_sensitive(false);
+ if (pParent->maConfigItem.IsReadOnly("AllowDuplicateFieldNames"))
+ mxCbAllowDuplicateFieldNames->set_sensitive(false);
+ }
- mxCbExportBookmarks->set_active( pParent->mbExportBookmarks );
mxCbExportNotes->set_active( pParent->mbExportNotes );
- mxCbViewPDF->set_active( pParent->mbViewPDF);
+ mxCbExportNotesInMargin->set_active(mbIsWriter && pParent->mbExportNotesInMargin);
+ mxCbExportNotesInMargin->set_sensitive(
+ mbIsWriter && !pParent->maConfigItem.IsReadOnly("ExportNotesInMargin"));
+
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ mxCbViewPDF->hide();
+ mxCbViewPDF->set_active(false);
+ }
+ else
+ {
+ mxCbViewPDF->set_active(pParent->mbViewPDF);
+ mxCbViewPDF->set_sensitive(!pParent->maConfigItem.IsReadOnly("ViewPDFAfterExport"));
+ }
if ( mbIsPresentation )
{
- mxRbRange->set_label(mxSlidesFt->get_label());
+ mxRbPageRange->set_label(mxSlidesFt->get_label());
mxCbExportNotesPages->show();
mxCbExportNotesPages->set_active(pParent->mbExportNotesPages);
mxCbExportNotesPages->connect_toggled( LINK(this, ImpPDFTabGeneralPage, ToggleExportNotesPagesHdl ) );
+ mxCbExportNotesPages->set_sensitive(!pParent->maConfigItem.IsReadOnly("ExportNotesPages"));
mxCbExportOnlyNotesPages->show();
mxCbExportOnlyNotesPages->set_active(pParent->mbExportOnlyNotesPages);
// tdf#116473 Initially enable Export only note pages option depending on the checked state of Export notes pages option
- mxCbExportOnlyNotesPages->set_sensitive(mxCbExportNotesPages->get_active());
+ mxCbExportOnlyNotesPages->set_sensitive(
+ mxCbExportNotesPages->get_active() && !pParent->maConfigItem.IsReadOnly("ExportOnlyNotesPages"));
mxCbExportHiddenSlides->show();
mxCbExportHiddenSlides->set_active(pParent->mbExportHiddenSlides);
+ mxCbExportHiddenSlides->set_sensitive(
+ !pParent->maConfigItem.IsReadOnly("ExportHiddenSlides"));
}
else
{
@@ -630,34 +722,38 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
if( mbIsSpreadsheet )
{
- mxRbSelection->set_label(mxSheetsFt->get_label());
+ mxRbSelection->set_label(mxSheetsSelectionFt->get_label());
// tdf#105965 Make Selection/Selected sheets the default PDF export range setting for spreadsheets
mxRbSelection->set_active(true);
+ mxRbSheetRange->show();
+ mxEdSheets->show();
+
mxCbSinglePageSheets->show();
mxCbSinglePageSheets->set_active(pParent->mbSinglePageSheets);
+ mxCbSinglePageSheets->set_sensitive(!pParent->maConfigItem.IsReadOnly("SinglePageSheets"));
}
else
{
mxCbSinglePageSheets->hide();
mxCbSinglePageSheets->set_active(false);
+ mxRbSheetRange->hide();
+ mxRbSheetRange->set_active(false);
+ mxEdSheets->hide();
}
- mxCbExportPlaceholders->set_visible(mbIsWriter);
- if( mbIsWriter )
- {
- // tdf#54908 Make selection active if there is a selection in Writer's version
- mxRbSelection->set_active( bSelectionPresent );
- }
- else
- {
- mxCbExportPlaceholders->set_active(false);
- }
mxCbExportEmptyPages->set_active(!pParent->mbIsSkipEmptyPages);
+ mxCbExportEmptyPages->set_sensitive(
+ mbIsWriter && !pParent->maConfigItem.IsReadOnly("IsSkipEmptyPages"));
+
+ mxCbExportPlaceholders->set_visible(mbIsWriter);
mxCbExportPlaceholders->set_active(pParent->mbIsExportPlaceholders);
+ mxCbExportPlaceholders->set_sensitive(
+ mbIsWriter && !pParent->maConfigItem.IsReadOnly("ExportPlaceholders"));
mxCbAddStream->show();
mxCbAddStream->set_active(pParent->mbAddStream);
+ mxCbAddStream->set_sensitive(!pParent->maConfigItem.IsReadOnly("IsAddStream"));
mxCbAddStream->connect_toggled(LINK(this, ImpPDFTabGeneralPage, ToggleAddStreamHdl));
ToggleAddStreamHdl(*mxCbAddStream); // init addstream dependencies
@@ -671,6 +767,8 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* pParent )
pParent->mbReduceImageResolution = mxCbReduceImageResolution->get_active();
pParent->mnMaxImageResolution = mxCoReduceImageResolution->get_active_text().toInt32();
pParent->mbExportNotes = mxCbExportNotes->get_active();
+ if (mbIsWriter)
+ pParent->mbExportNotesInMargin = mxCbExportNotesInMargin->get_active();
pParent->mbViewPDF = mxCbViewPDF->get_active();
pParent->mbUseReferenceXObject = mxCbUseReferenceXObject->get_active();
if ( mbIsPresentation )
@@ -689,12 +787,17 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* pParent )
pParent->mbIsExportPlaceholders = mxCbExportPlaceholders->get_active();
pParent->mbAddStream = mxCbAddStream->get_visible() && mxCbAddStream->get_active();
- pParent->mbIsRangeChecked = false;
- if( mxRbRange->get_active() )
+ pParent->mbIsPageRangeChecked = false;
+ if( mxRbPageRange->get_active() )
{
- pParent->mbIsRangeChecked = true;
+ pParent->mbIsPageRangeChecked = true;
pParent->msPageRange = mxEdPages->get_text(); //FIXME all right on other languages ?
}
+ else if ( mxRbSheetRange->get_active() )
+ {
+ pParent->mbIsSheetRangeChecked = true;
+ pParent->msSheetRange = mxEdSheets->get_text();
+ }
else if( mxRbSelection->get_active() )
{
pParent->mbSelectionIsChecked = mxRbSelection->get_active();
@@ -720,6 +823,11 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* pParent )
if (!bIsPDFA && !bIsPDFUA)
mbUseTaggedPDFUserSelection = pParent->mbUseTaggedPDF;
+ if (!bIsPDFUA)
+ {
+ pParent->mbExportBookmarksUserSelection = pParent->mbExportBookmarks;
+ pParent->mbUseReferenceXObjectUserSelection = pParent->mbUseReferenceXObject;
+ }
pParent->mbUseTaggedPDFUserSelection = mbUseTaggedPDFUserSelection;
pParent->mbExportFormFields = mxCbExportFormFields->get_active();
@@ -741,59 +849,89 @@ std::unique_ptr<SfxTabPage> ImpPDFTabGeneralPage::Create( weld::Container* pPage
return std::make_unique<ImpPDFTabGeneralPage>(pPage, pController, *rAttrSet);
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAllHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAllHdl, weld::Toggleable&, void)
{
EnableExportNotesPages();
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePagesHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePagesHdl, weld::Toggleable&, void)
{
TogglePagesHdl();
EnableExportNotesPages();
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleSelectionHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleSheetsHdl, weld::Toggleable&, void)
+{
+ ToggleSheetsHdl();
+ EnableExportNotesPages();
+}
+
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleSelectionHdl, weld::Toggleable&, void)
{
EnableExportNotesPages();
}
void ImpPDFTabGeneralPage::TogglePagesHdl()
{
- mxEdPages->set_sensitive( mxRbRange->get_active() );
- if (mxRbRange->get_active())
+ mxEdPages->set_sensitive( mxRbPageRange->get_active() );
+ if (mxRbPageRange->get_active())
mxEdPages->grab_focus();
}
+void ImpPDFTabGeneralPage::ToggleSheetsHdl()
+{
+ mxEdSheets->set_sensitive( mxRbSheetRange->get_active() );
+ if (mxRbSheetRange->get_active())
+ mxEdSheets->grab_focus();
+}
+
void ImpPDFTabGeneralPage::EnableExportNotesPages()
{
if ( mbIsPresentation )
{
- mxCbExportNotesPages->set_sensitive( !mxRbSelection->get_active() );
- mxCbExportOnlyNotesPages->set_sensitive( !mxRbSelection->get_active() && mxCbExportNotesPages->get_active() );
+ mxCbExportNotesPages->set_sensitive(
+ !mxRbSelection->get_active() && !IsReadOnlyProperty("ExportNotesPages"));
+ mxCbExportOnlyNotesPages->set_sensitive(
+ !mxRbSelection->get_active() && mxCbExportNotesPages->get_active()
+ && !IsReadOnlyProperty("ExportOnlyNotesPages"));
}
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl, weld::Toggleable&, void)
{
- mxFormsFrame->set_sensitive(mxCbExportFormFields->get_active());
+ const bool bExportFormFields = mxCbExportFormFields->get_active();
+ // FormsFrame contains (and thus sets_sensitive) FormsFormat and AllowDuplicateFieldNames
+ mxFormsFrame->set_sensitive(bExportFormFields);
+ if (bExportFormFields)
+ {
+ if (IsReadOnlyProperty("FormsType"))
+ mxLbFormsFormat->set_sensitive(false);
+ if (IsReadOnlyProperty("AllowDuplicateFieldNames"))
+ mxCbAllowDuplicateFieldNames->set_sensitive(false);
+ }
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportNotesPagesHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportNotesPagesHdl, weld::Toggleable&, void)
{
- mxCbExportOnlyNotesPages->set_sensitive(mxCbExportNotesPages->get_active());
+ mxCbExportOnlyNotesPages->set_sensitive(
+ mxCbExportNotesPages->get_active()
+ && !IsReadOnlyProperty("ExportOnlyNotesPages"));
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleCompressionHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleCompressionHdl, weld::Toggleable&, void)
{
- mxQualityFrame->set_sensitive(mxRbJPEGCompression->get_active());
+ mxQualityFrame->set_sensitive(
+ mxRbJPEGCompression->get_active() && !IsReadOnlyProperty("Quality"));
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl, weld::Toggleable&, void)
{
- mxCoReduceImageResolution->set_sensitive(mxCbReduceImageResolution->get_active());
+ mxCoReduceImageResolution->set_sensitive(
+ mxCbReduceImageResolution->get_active()
+ && !IsReadOnlyProperty("MaxImageResolution"));
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleWatermarkHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleWatermarkHdl, weld::Toggleable&, void)
{
mxEdWatermark->set_sensitive(mxCbWatermark->get_active());
mxFtWatermark->set_sensitive(mxCbWatermark->get_active());
@@ -801,7 +939,7 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleWatermarkHdl, weld::ToggleButton&, v
mxEdWatermark->grab_focus();
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAddStreamHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAddStreamHdl, weld::Toggleable&, void)
{
if (!mxCbAddStream->get_visible())
return;
@@ -809,7 +947,8 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAddStreamHdl, weld::ToggleButton&, v
if( mxCbAddStream->get_active() )
{
mxRbAll->set_active(true);
- mxRbRange->set_sensitive( false );
+ mxRbPageRange->set_sensitive( false );
+ mxRbSheetRange->set_sensitive( false );
mxRbSelection->set_sensitive( false );
mxEdPages->set_sensitive( false );
mxRbAll->set_sensitive( false );
@@ -817,12 +956,13 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAddStreamHdl, weld::ToggleButton&, v
else
{
mxRbAll->set_sensitive(true);
- mxRbRange->set_sensitive(true);
+ mxRbPageRange->set_sensitive(true);
+ mxRbSheetRange->set_sensitive(true);
mxRbSelection->set_sensitive(true);
}
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHandle, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHandle, weld::Toggleable&, void)
{
const bool bIsPDFA = mxCbPDFA->get_active();
const bool bIsPDFUA = mxCbPDFUA->get_active();
@@ -830,10 +970,12 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHa
// set the security page status (and its controls as well)
ImpPDFTabSecurityPage* pSecPage = mpParent ? mpParent->getSecurityPage() : nullptr;
if (pSecPage)
- pSecPage->ImplPDFASecurityControl(!bIsPDFA);
+ pSecPage->ImplPDFASecurityControl();
- mxCbTaggedPDF->set_sensitive(!bIsPDFA && !bIsPDFUA);
- mxRbPDFAVersion->set_sensitive(bIsPDFA);
+ mxCbTaggedPDF->set_sensitive(
+ !bIsPDFA && !bIsPDFUA && !IsReadOnlyProperty("UseTaggedPDF"));
+ mxRbPDFAVersion->set_sensitive(
+ bIsPDFA && !IsReadOnlyProperty("SelectPdfVersion"));
if (bIsPDFA || bIsPDFUA)
{
@@ -842,12 +984,13 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHa
mxCbTaggedPDF->set_active(true);
// if a password was set, inform the user that this will not be used
- if (pSecPage && pSecPage->hasPassword())
+ if (bIsPDFA && pSecPage && pSecPage->hasPassword())
{
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_xContainer.get(),
+ mxPasswordUnusedWarnDialog =
+ std::shared_ptr<weld::MessageDialog>(Application::CreateMessageDialog(m_xContainer.get(),
VclMessageType::Warning, VclButtonsType::Ok,
- PDFFilterResId(STR_WARN_PASSWORD_PDFA)));
- xBox->run();
+ FilterResId(STR_WARN_PASSWORD_PDFA)));
+ mxPasswordUnusedWarnDialog->runAsync(mxPasswordUnusedWarnDialog, [] (sal_uInt32){ });
}
}
else
@@ -856,6 +999,40 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHa
mxCbTaggedPDF->set_active(mbUseTaggedPDFUserSelection);
}
+ if (bIsPDFUA)
+ {
+ if (mxCbExportBookmarks->get_sensitive())
+ {
+ if (mpParent)
+ {
+ mpParent->mbExportBookmarksUserSelection = mxCbExportBookmarks->get_active();
+ }
+ mxCbExportBookmarks->set_active(true);
+ }
+ if (mxCbUseReferenceXObject->get_sensitive())
+ {
+ if (mpParent)
+ {
+ mpParent->mbUseReferenceXObjectUserSelection = mxCbUseReferenceXObject->get_active();
+ }
+ mxCbUseReferenceXObject->set_active(false);
+ }
+ }
+ else if (mpParent)
+ {
+ mxCbExportBookmarks->set_active(mpParent->mbExportBookmarksUserSelection);
+ mxCbUseReferenceXObject->set_active(mpParent->mbUseReferenceXObjectUserSelection);
+ }
+ mxCbExportBookmarks->set_sensitive(
+ !bIsPDFUA && !IsReadOnlyProperty("ExportBookmarks"));
+ mxCbUseReferenceXObject->set_sensitive(!bIsPDFUA);
+
+ ImpPDFTabOpnFtrPage *const pOpenPage(mpParent ? mpParent->getOpenPage() : nullptr);
+ if (pOpenPage)
+ {
+ pOpenPage->ToggleInitialView(*mpParent);
+ }
+
// PDF/A doesn't allow launch action, so enable/disable the selection on the Link page
ImpPDFTabLinksPage* pLinksPage = mpParent ? mpParent->getLinksPage() : nullptr;
if (pLinksPage)
@@ -905,6 +1082,10 @@ void ImpPDFTabOpnFtrPage::GetFilterConfigItem( ImpPDFTabDialog* pParent )
pParent->mnInitialView = 1;
else if( mxRbOpnThumbs->get_active() )
pParent->mnInitialView = 2;
+ if (!pParent->mbPDFUACompliance)
+ {
+ pParent->mnInitialViewUserSelection = pParent->mnInitialView;
+ }
pParent->mnMagnification = 0;
if( mxRbMagnFitWin->get_active() )
@@ -932,7 +1113,7 @@ void ImpPDFTabOpnFtrPage::GetFilterConfigItem( ImpPDFTabDialog* pParent )
pParent->mbFirstPageLeft = mbUseCTLFont && mxCbPgLyFirstOnLeft->get_active();
}
-void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const ImpPDFTabDialog* pParent )
+void ImpPDFTabOpnFtrPage::SetFilterConfigItem(ImpPDFTabDialog *const pParent)
{
mbUseCTLFont = pParent->mbUseCTLFont;
switch( pParent->mnPageLayout )
@@ -1002,9 +1183,55 @@ void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const ImpPDFTabDialog* pParent )
mxCbPgLyFirstOnLeft->set_active(pParent->mbFirstPageLeft);
ToggleRbPgLyContinueFacingHdl();
}
+
+ // The call from ImpPDFTabGeneralPage::SetFilterConfigItem() did not init
+ // the radio buttons correctly because ImpPDFTabOpnFtrPage did not yet exist.
+ ToggleInitialView(*pParent);
}
-IMPL_LINK_NOARG(ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, weld::ToggleButton&, void)
+void ImpPDFTabOpnFtrPage::ToggleInitialView(ImpPDFTabDialog & rParent)
+{
+ bool const bIsPDFUA(rParent.getGeneralPage()->IsPdfUaSelected());
+ if (bIsPDFUA)
+ { // only allow Outline for PDF/UA
+ if (mxRbOpnOutline->get_sensitive())
+ {
+ if (mxRbOpnPageOnly->get_active())
+ {
+ rParent.mnInitialViewUserSelection = 0;
+ }
+ else if (mxRbOpnOutline->get_active())
+ {
+ rParent.mnInitialViewUserSelection = 1;
+ }
+ else if (mxRbOpnThumbs->get_active())
+ {
+ rParent.mnInitialViewUserSelection = 2;
+ }
+ mxRbOpnOutline->set_active(true);
+ }
+ }
+ else
+ {
+ switch (rParent.mnInitialViewUserSelection)
+ {
+ case 0:
+ mxRbOpnPageOnly->set_active(true);
+ break;
+ case 1:
+ mxRbOpnOutline->set_active(true);
+ break;
+ case 2:
+ mxRbOpnThumbs->set_active(true);
+ break;
+ }
+ }
+ mxRbOpnPageOnly->set_sensitive(!bIsPDFUA);
+ mxRbOpnThumbs->set_sensitive(!bIsPDFUA);
+ mxRbOpnOutline->set_sensitive(!bIsPDFUA);
+}
+
+IMPL_LINK_NOARG(ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, weld::Toggleable&, void)
{
ToggleRbPgLyContinueFacingHdl();
}
@@ -1014,7 +1241,7 @@ void ImpPDFTabOpnFtrPage::ToggleRbPgLyContinueFacingHdl()
mxCbPgLyFirstOnLeft->set_sensitive(mxRbPgLyContinueFacing->get_active());
}
-IMPL_LINK_NOARG( ImpPDFTabOpnFtrPage, ToggleRbMagnHdl, weld::ToggleButton&, void )
+IMPL_LINK_NOARG( ImpPDFTabOpnFtrPage, ToggleRbMagnHdl, weld::Toggleable&, void )
{
mxNumZoom->set_sensitive(mxRbMagnZoom->get_active());
}
@@ -1043,7 +1270,7 @@ ImpPDFTabViewerPage::~ImpPDFTabViewerPage()
{
}
-IMPL_LINK_NOARG( ImpPDFTabViewerPage, ToggleRbBookmarksHdl, weld::ToggleButton&, void )
+IMPL_LINK_NOARG( ImpPDFTabViewerPage, ToggleRbBookmarksHdl, weld::Toggleable&, void )
{
m_xNumBookmarkLevels->set_sensitive(m_xRbVisibleBookmarkLevels->get_active());
}
@@ -1097,10 +1324,10 @@ void ImpPDFTabViewerPage::SetFilterConfigItem( const ImpPDFTabDialog* pParent )
/// The Security preferences tab page
ImpPDFTabSecurityPage::ImpPDFTabSecurityPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& i_rCoreSet)
: SfxTabPage(pPage, pController, "filter/ui/pdfsecuritypage.ui", "PdfSecurityPage", &i_rCoreSet)
- , msUserPwdTitle( PDFFilterResId( STR_PDF_EXPORT_UDPWD ) )
+ , msUserPwdTitle( FilterResId( STR_PDF_EXPORT_UDPWD ) )
, mbHaveOwnerPassword( false )
, mbHaveUserPassword( false )
- , msOwnerPwdTitle( PDFFilterResId( STR_PDF_EXPORT_ODPWD ) )
+ , msOwnerPwdTitle( FilterResId( STR_PDF_EXPORT_ODPWD ) )
, mxPbSetPwd(m_xBuilder->weld_button("setpassword"))
, mxUserPwdSet(m_xBuilder->weld_widget("userpwdset"))
, mxUserPwdUnset(m_xBuilder->weld_widget("userpwdunset"))
@@ -1122,6 +1349,7 @@ ImpPDFTabSecurityPage::ImpPDFTabSecurityPage(weld::Container* pPage, weld::Dialo
, mxCbEnableCopy(m_xBuilder->weld_check_button("enablecopy"))
, mxCbEnableAccessibility(m_xBuilder->weld_check_button("enablea11y"))
, mxPasswordTitle(m_xBuilder->weld_label("setpasswordstitle"))
+ , mxPermissionTitle(m_xBuilder->weld_label("label2"))
{
msStrSetPwd = mxPasswordTitle->get_label();
mxPbSetPwd->connect_clicked(LINK(this, ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl));
@@ -1129,6 +1357,10 @@ ImpPDFTabSecurityPage::ImpPDFTabSecurityPage(weld::Container* pPage, weld::Dialo
ImpPDFTabSecurityPage::~ImpPDFTabSecurityPage()
{
+ if (mpPasswordDialog)
+ mpPasswordDialog->response(RET_CANCEL);
+ if (mpUnsupportedMsgDialog)
+ mpUnsupportedMsgDialog->response(RET_CANCEL);
}
std::unique_ptr<SfxTabPage> ImpPDFTabSecurityPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet)
@@ -1214,56 +1446,77 @@ void ImpPDFTabSecurityPage::SetFilterConfigItem( const ImpPDFTabDialog* pParent
ImpPDFTabGeneralPage* pGeneralPage = pParent->getGeneralPage();
if (pGeneralPage)
- ImplPDFASecurityControl(!pGeneralPage->IsPdfaSelected());
+ ImplPDFASecurityControl();
}
IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl, weld::Button&, void)
{
- SfxPasswordDialog aPwdDialog(m_xContainer.get(), &msUserPwdTitle);
- aPwdDialog.SetMinLen(0);
- aPwdDialog.ShowMinLengthText(false);
- aPwdDialog.ShowExtras( SfxShowExtras::CONFIRM | SfxShowExtras::PASSWORD2 | SfxShowExtras::CONFIRM2 );
- aPwdDialog.set_title(msStrSetPwd);
- aPwdDialog.SetGroup2Text(msOwnerPwdTitle);
- aPwdDialog.AllowAsciiOnly();
- if (aPwdDialog.run() == RET_OK) // OK issued get password and set it
- {
- OUString aUserPW(aPwdDialog.GetPassword());
- OUString aOwnerPW(aPwdDialog.GetPassword2());
-
- mbHaveUserPassword = !aUserPW.isEmpty();
- mbHaveOwnerPassword = !aOwnerPW.isEmpty();
-
- mxPreparedPasswords = vcl::PDFWriter::InitEncryption( aOwnerPW, aUserPW );
- if (!mxPreparedPasswords.is()) {
- OUString msg;
- ErrorHandler::GetErrorString(ERRCODE_IO_NOTSUPPORTED, msg); //TODO: handle failure
- std::unique_ptr<weld::MessageDialog>(
- Application::CreateMessageDialog(
- GetFrameWeld(), VclMessageType::Error, VclButtonsType::Ok, msg))
- ->run();
- return;
- }
+ if(mpPasswordDialog)
+ mpPasswordDialog->response(RET_CANCEL);
+
+ mpPasswordDialog = std::make_shared<SfxPasswordDialog>(m_xContainer.get(), &msUserPwdTitle);
+
+ mpPasswordDialog->SetMinLen(0);
+ mpPasswordDialog->ShowMinLengthText(false);
+ mpPasswordDialog->ShowExtras( SfxShowExtras::CONFIRM | SfxShowExtras::PASSWORD2 | SfxShowExtras::CONFIRM2 );
+ mpPasswordDialog->set_title(msStrSetPwd);
+ mpPasswordDialog->SetGroup2Text(msOwnerPwdTitle);
+ mpPasswordDialog->AllowAsciiOnly();
+
+ mpPasswordDialog->PreRun();
- if( mbHaveOwnerPassword )
+ weld::DialogController::runAsync(mpPasswordDialog, [this](sal_Int32 response){
+ if (response == RET_OK)
{
- maPreparedOwnerPassword = comphelper::OStorageHelper::CreatePackageEncryptionData( aOwnerPW );
+ OUString aUserPW(mpPasswordDialog->GetPassword());
+ OUString aOwnerPW(mpPasswordDialog->GetPassword2());
+
+ mbHaveUserPassword = !aUserPW.isEmpty();
+ mbHaveOwnerPassword = !aOwnerPW.isEmpty();
+
+ mxPreparedPasswords = vcl::PDFWriter::InitEncryption( aOwnerPW, aUserPW );
+ if (!mxPreparedPasswords.is())
+ {
+ OUString msg;
+ ErrorHandler::GetErrorString(ERRCODE_IO_NOTSUPPORTED, msg); //TODO: handle failure
+ mpUnsupportedMsgDialog = std::shared_ptr<weld::MessageDialog>(
+ Application::CreateMessageDialog(
+ GetFrameWeld(), VclMessageType::Error, VclButtonsType::Ok, msg));
+
+ mpUnsupportedMsgDialog->runAsync(mpUnsupportedMsgDialog, [](sal_Int32){ });
+ return;
+ }
+
+ if( mbHaveOwnerPassword )
+ maPreparedOwnerPassword = comphelper::OStorageHelper::CreatePackageEncryptionData( aOwnerPW );
+ else
+ maPreparedOwnerPassword = Sequence< NamedValue >();
}
- else
- maPreparedOwnerPassword = Sequence< NamedValue >();
- }
- enablePermissionControls();
+ if (response != RET_CANCEL)
+ enablePermissionControls();
+ mpPasswordDialog.reset();
+ });
}
void ImpPDFTabSecurityPage::enablePermissionControls()
{
bool bIsPDFASel = false;
+ bool bIsPDFUASel = false;
ImpPDFTabDialog* pParent = static_cast<ImpPDFTabDialog*>(GetDialogController());
ImpPDFTabGeneralPage* pGeneralPage = pParent ? pParent->getGeneralPage() : nullptr;
if (pGeneralPage)
{
bIsPDFASel = pGeneralPage->IsPdfaSelected();
+ bIsPDFUASel = pGeneralPage->IsPdfUaSelected();
+ }
+ // ISO 14289-1:2014, Clause: 7.16
+ if (bIsPDFUASel)
+ {
+ mxCbEnableAccessibility->set_active(true);
}
+ mxPermissionTitle->set_sensitive(!bIsPDFASel);
+ mxPbSetPwd->set_sensitive(!bIsPDFASel);
+ mxCbEnableAccessibility->set_sensitive(!bIsPDFUASel);
if (bIsPDFASel)
{
mxUserPwdPdfa->show();
@@ -1316,9 +1569,8 @@ void ImpPDFTabSecurityPage::enablePermissionControls()
// This tab page is under control of the PDF/A-1a checkbox:
// TODO: implement a method to do it.
-void ImpPDFTabSecurityPage::ImplPDFASecurityControl( bool bEnableSecurity )
+void ImpPDFTabSecurityPage::ImplPDFASecurityControl()
{
- m_xContainer->set_sensitive(bEnableSecurity);
// after enable, check the status of control as if the dialog was initialized
enablePermissionControls();
}
@@ -1438,7 +1690,7 @@ void ImpPDFTabLinksPage::ImplPDFALinkControl( bool bEnableLaunch )
}
/// Reset the memory of Launch action present when PDF/A-1 was requested
-IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl, weld::Toggleable&, void)
{
mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active();
@@ -1446,7 +1698,7 @@ IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl, weld::ToggleButton
}
/// Reset the memory of a launch action present when PDF/A-1 was requested
-IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl, weld::Toggleable&, void)
{
mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active();
@@ -1468,19 +1720,19 @@ ImplErrorDialog::ImplErrorDialog(weld::Window* pParent, const std::set<vcl::PDFW
switch(error)
{
case vcl::PDFWriter::Warning_Transparency_Omitted_PDFA:
- m_xErrors->append(PDFFilterResId(STR_WARN_TRANSP_PDFA), PDFFilterResId(STR_WARN_TRANSP_PDFA_SHORT), "dialog-warning");
+ m_xErrors->append(FilterResId(STR_WARN_TRANSP_PDFA), FilterResId(STR_WARN_TRANSP_PDFA_SHORT), "dialog-warning");
break;
case vcl::PDFWriter::Warning_Transparency_Omitted_PDF13:
- m_xErrors->append(PDFFilterResId(STR_WARN_TRANSP_VERSION), PDFFilterResId(STR_WARN_TRANSP_VERSION_SHORT), "dialog-warning");
+ m_xErrors->append(FilterResId(STR_WARN_TRANSP_VERSION), FilterResId(STR_WARN_TRANSP_VERSION_SHORT), "dialog-warning");
break;
case vcl::PDFWriter::Warning_FormAction_Omitted_PDFA:
- m_xErrors->append(PDFFilterResId(STR_WARN_FORMACTION_PDFA), PDFFilterResId(STR_WARN_FORMACTION_PDFA_SHORT), "dialog-warning");
+ m_xErrors->append(FilterResId(STR_WARN_FORMACTION_PDFA), FilterResId(STR_WARN_FORMACTION_PDFA_SHORT), "dialog-warning");
break;
case vcl::PDFWriter::Warning_Transparency_Converted:
- m_xErrors->append(PDFFilterResId(STR_WARN_TRANSP_CONVERTED), PDFFilterResId(STR_WARN_TRANSP_CONVERTED_SHORT), "dialog-warning");
+ m_xErrors->append(FilterResId(STR_WARN_TRANSP_CONVERTED), FilterResId(STR_WARN_TRANSP_CONVERTED_SHORT), "dialog-warning");
break;
case vcl::PDFWriter::Error_Signature_Failed:
- m_xErrors->append(PDFFilterResId(STR_ERR_PDF_EXPORT_ABORTED), PDFFilterResId(STR_ERR_SIGNATURE_FAILED), "dialog-error");
+ m_xErrors->append(FilterResId(STR_ERR_PDF_EXPORT_ABORTED), FilterResId(STR_ERR_SIGNATURE_FAILED), "dialog-error");
break;
default:
break;
@@ -1505,7 +1757,6 @@ IMPL_LINK_NOARG(ImplErrorDialog, SelectHdl, weld::TreeView&, void)
/// The digital signatures tab page
ImpPDFTabSigningPage::ImpPDFTabSigningPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet)
: SfxTabPage(pPage, pController, "filter/ui/pdfsignpage.ui", "PdfSignPage", &rCoreSet)
- , maSignCertificate()
, mxEdSignCert(m_xBuilder->weld_entry("cert"))
, mxPbSignCertSelect(m_xBuilder->weld_button("select"))
, mxPbSignCertClear(m_xBuilder->weld_button("clear"))
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 17fb57890655..95d25f99d705 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -17,10 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_PDF_IMPDIALOG_HXX
-#define INCLUDED_FILTER_SOURCE_PDF_IMPDIALOG_HXX
+#pragma once
#include <sfx2/tabdlg.hxx>
+#include <sfx2/passwd.hxx>
#include <vcl/pdfwriter.hxx>
#include <vcl/FilterConfigItem.hxx>
@@ -59,7 +59,6 @@ class ImpPDFTabLinksPage;
class ImpPDFTabDialog final : public SfxTabDialogController
{
css::uno::Reference<css::lang::XComponent> mrDoc;
- weld::Window* mpParent;
FilterConfigItem maConfigItem;
FilterConfigItem maConfigI18N;
@@ -67,6 +66,7 @@ class ImpPDFTabDialog final : public SfxTabDialogController
Any maSelection;
DECL_LINK(CancelHdl, weld::Button&, void);
+ DECL_LINK(OkHdl, weld::Button&, void);
// the following data are the configuration used throughout the dialog and pages
bool mbIsPresentation;
@@ -83,8 +83,10 @@ class ImpPDFTabDialog final : public SfxTabDialogController
sal_Int32 mnPDFTypeSelection;
bool mbPDFUACompliance;
bool mbExportNotes;
+ bool mbExportNotesInMargin;
bool mbViewPDF;
bool mbUseReferenceXObject;
+ bool mbUseReferenceXObjectUserSelection = false;
bool mbExportNotesPages;
bool mbExportOnlyNotesPages;
bool mbUseTransitionEffects;
@@ -95,6 +97,7 @@ class ImpPDFTabDialog final : public SfxTabDialogController
bool mbExportFormFields;
bool mbAllowDuplicateFieldNames;
bool mbExportBookmarks;
+ bool mbExportBookmarksUserSelection = true;
bool mbExportHiddenSlides;
bool mbSinglePageSheets;
sal_Int32 mnOpenBookmarkLevels;
@@ -108,6 +111,7 @@ class ImpPDFTabDialog final : public SfxTabDialogController
bool mbDisplayPDFDocumentTitle;
sal_Int32 mnMagnification;
sal_Int32 mnInitialView;
+ sal_Int32 mnInitialViewUserSelection;
sal_Int32 mnZoom;
sal_Int32 mnInitialPage;
@@ -124,8 +128,10 @@ class ImpPDFTabDialog final : public SfxTabDialogController
bool mbCanExtractForAccessibility;
css::uno::Reference< css::beans::XMaterialHolder > mxPreparedPasswords;
- bool mbIsRangeChecked;
+ bool mbIsPageRangeChecked;
OUString msPageRange;
+ bool mbIsSheetRangeChecked;
+ OUString msSheetRange;
bool mbSelectionIsChecked;
bool mbExportRelativeFsysLinks;
@@ -152,19 +158,19 @@ public:
friend class ImpPDFTabLinksPage;
friend class ImpPDFTabSigningPage;
- ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue >& rFilterData,
+ ImpPDFTabDialog(weld::Window* pParent, const Sequence< PropertyValue >& rFilterData,
const css::uno::Reference< XComponent >& rDoc);
virtual ~ImpPDFTabDialog() override;
Sequence< PropertyValue > GetFilterData();
+ ImpPDFTabOpnFtrPage* getOpenPage() const;
ImpPDFTabSecurityPage* getSecurityPage() const;
ImpPDFTabLinksPage* getLinksPage() const;
ImpPDFTabGeneralPage* getGeneralPage() const;
private:
- virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
- virtual short Ok() override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override;
};
@@ -180,10 +186,11 @@ class ImpPDFTabGeneralPage : public SfxTabPage
ImpPDFTabDialog* mpParent;
std::unique_ptr<weld::RadioButton> mxRbAll;
- std::unique_ptr<weld::RadioButton> mxRbRange;
+ std::unique_ptr<weld::RadioButton> mxRbPageRange;
+ std::unique_ptr<weld::RadioButton> mxRbSheetRange;
std::unique_ptr<weld::RadioButton> mxRbSelection;
std::unique_ptr<weld::Entry> mxEdPages;
- std::unique_ptr<weld::Label> mxSelectedSheets;
+ std::unique_ptr<weld::Entry> mxEdSheets;
std::unique_ptr<weld::RadioButton> mxRbLosslessCompression;
std::unique_ptr<weld::RadioButton> mxRbJPEGCompression;
std::unique_ptr<weld::Widget> mxQualityFrame;
@@ -202,6 +209,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage
std::unique_ptr<weld::CheckButton> mxCbExportHiddenSlides;
std::unique_ptr<weld::CheckButton> mxCbSinglePageSheets;
std::unique_ptr<weld::CheckButton> mxCbExportNotes;
+ std::unique_ptr<weld::CheckButton> mxCbExportNotesInMargin;
std::unique_ptr<weld::CheckButton> mxCbViewPDF;
std::unique_ptr<weld::CheckButton> mxCbUseReferenceXObject;
std::unique_ptr<weld::CheckButton> mxCbExportNotesPages;
@@ -213,22 +221,31 @@ class ImpPDFTabGeneralPage : public SfxTabPage
std::unique_ptr<weld::Label> mxFtWatermark;
std::unique_ptr<weld::Entry> mxEdWatermark;
std::unique_ptr<weld::Label> mxSlidesFt;
- std::unique_ptr<weld::Label> mxSheetsFt;
-
- DECL_LINK(ToggleAllHdl, weld::ToggleButton&, void);
- DECL_LINK(TogglePagesHdl, weld::ToggleButton&, void);
- DECL_LINK(ToggleSelectionHdl, weld::ToggleButton&, void);
- DECL_LINK(ToggleCompressionHdl, weld::ToggleButton&, void);
- DECL_LINK(ToggleReduceImageResolutionHdl, weld::ToggleButton&, void);
- DECL_LINK(ToggleWatermarkHdl, weld::ToggleButton&, void);
- DECL_LINK(ToggleAddStreamHdl, weld::ToggleButton&, void);
- DECL_LINK(ToggleExportFormFieldsHdl, weld::ToggleButton&, void);
- DECL_LINK(ToggleExportNotesPagesHdl, weld::ToggleButton&, void);
+ std::unique_ptr<weld::Label> mxSheetsSelectionFt;
+
+ DECL_LINK(ToggleAllHdl, weld::Toggleable&, void);
+ DECL_LINK(TogglePagesHdl, weld::Toggleable&, void);
+ DECL_LINK(ToggleSheetsHdl, weld::Toggleable&, void);
+ DECL_LINK(ToggleSelectionHdl, weld::Toggleable&, void);
+ DECL_LINK(ToggleCompressionHdl, weld::Toggleable&, void);
+ DECL_LINK(ToggleReduceImageResolutionHdl, weld::Toggleable&, void);
+ DECL_LINK(ToggleWatermarkHdl, weld::Toggleable&, void);
+ DECL_LINK(ToggleAddStreamHdl, weld::Toggleable&, void);
+ DECL_LINK(ToggleExportFormFieldsHdl, weld::Toggleable&, void);
+ DECL_LINK(ToggleExportNotesPagesHdl, weld::Toggleable&, void);
void TogglePagesHdl();
+ void ToggleSheetsHdl();
void EnableExportNotesPages();
- DECL_LINK(TogglePDFVersionOrUniversalAccessibilityHandle, weld::ToggleButton&, void);
+ DECL_LINK(TogglePDFVersionOrUniversalAccessibilityHandle, weld::Toggleable&, void);
+
+ std::shared_ptr<weld::MessageDialog> mxPasswordUnusedWarnDialog;
+
+ bool IsReadOnlyProperty(const OUString& rPropertyName) const
+ {
+ return mpParent && mpParent->maConfigItem.IsReadOnly(rPropertyName);
+ }
public:
@@ -246,6 +263,8 @@ public:
/// Class tab page viewer
class ImpPDFTabOpnFtrPage : public SfxTabPage
{
+ friend class ImpPDFTabGeneralPage;
+
bool mbUseCTLFont;
std::unique_ptr<weld::RadioButton> mxRbOpnPageOnly;
@@ -264,10 +283,11 @@ class ImpPDFTabOpnFtrPage : public SfxTabPage
std::unique_ptr<weld::RadioButton> mxRbPgLyContinueFacing;
std::unique_ptr<weld::CheckButton> mxCbPgLyFirstOnLeft;
- DECL_LINK(ToggleRbPgLyContinueFacingHdl, weld::ToggleButton&, void);
- DECL_LINK(ToggleRbMagnHdl, weld::ToggleButton&, void);
+ DECL_LINK(ToggleRbPgLyContinueFacingHdl, weld::Toggleable&, void);
+ DECL_LINK(ToggleRbMagnHdl, weld::Toggleable&, void);
void ToggleRbPgLyContinueFacingHdl();
+ void ToggleInitialView(ImpPDFTabDialog & rParent);
public:
ImpPDFTabOpnFtrPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
@@ -276,7 +296,7 @@ public:
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
void GetFilterConfigItem( ImpPDFTabDialog* paParent);
- void SetFilterConfigItem( const ImpPDFTabDialog* paParent );
+ void SetFilterConfigItem(ImpPDFTabDialog* pParent);
};
/// Class tab page viewer
@@ -296,7 +316,7 @@ class ImpPDFTabViewerPage : public SfxTabPage
std::unique_ptr<weld::RadioButton> m_xRbVisibleBookmarkLevels;
std::unique_ptr<weld::SpinButton>m_xNumBookmarkLevels;
- DECL_LINK(ToggleRbBookmarksHdl, weld::ToggleButton&, void);
+ DECL_LINK(ToggleRbBookmarksHdl, weld::Toggleable&, void);
public:
ImpPDFTabViewerPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
@@ -341,6 +361,10 @@ class ImpPDFTabSecurityPage : public SfxTabPage
std::unique_ptr<weld::CheckButton> mxCbEnableCopy;
std::unique_ptr<weld::CheckButton> mxCbEnableAccessibility;
std::unique_ptr<weld::Label> mxPasswordTitle;
+ std::unique_ptr<weld::Label> mxPermissionTitle;
+
+ std::shared_ptr< SfxPasswordDialog > mpPasswordDialog;
+ std::shared_ptr< weld::MessageDialog > mpUnsupportedMsgDialog;
DECL_LINK(ClickmaPbSetPwdHdl, weld::Button&, void);
@@ -354,7 +378,7 @@ public:
void GetFilterConfigItem( ImpPDFTabDialog* paParent);
void SetFilterConfigItem( const ImpPDFTabDialog* paParent );
- void ImplPDFASecurityControl( bool bEnableSecurity );
+ void ImplPDFASecurityControl();
bool hasPassword() const { return mbHaveOwnerPassword || mbHaveUserPassword; }
};
@@ -372,8 +396,8 @@ class ImpPDFTabLinksPage : public SfxTabPage
std::unique_ptr<weld::RadioButton> m_xRbOpnLnksLaunch;
std::unique_ptr<weld::RadioButton> m_xRbOpnLnksBrowser;
- DECL_LINK(ClickRbOpnLnksDefaultHdl, weld::ToggleButton&, void);
- DECL_LINK(ClickRbOpnLnksBrowserHdl, weld::ToggleButton&, void);
+ DECL_LINK(ClickRbOpnLnksDefaultHdl, weld::Toggleable&, void);
+ DECL_LINK(ClickRbOpnLnksBrowserHdl, weld::Toggleable&, void);
public:
ImpPDFTabLinksPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
@@ -414,6 +438,4 @@ public:
void SetFilterConfigItem( const ImpPDFTabDialog* paParent );
};
-#endif // INCLUDED_FILTER_SOURCE_PDF_IMPDIALOG_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/pdf/pdfdecomposer.cxx b/filter/source/pdf/pdfdecomposer.cxx
index f4572f93742a..998f73dc1160 100644
--- a/filter/source/pdf/pdfdecomposer.cxx
+++ b/filter/source/pdf/pdfdecomposer.cxx
@@ -10,9 +10,10 @@
#include <vector>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/pdfread.hxx>
#include <vcl/svapp.hxx>
@@ -31,8 +32,7 @@ using namespace css;
namespace
{
/// Class to convert the PDF data into a XPrimitive2D (containing only a bitmap).
-class XPdfDecomposer
- : public ::cppu::WeakAggImplHelper2<graphic::XPdfDecomposer, lang::XServiceInfo>
+class XPdfDecomposer : public ::cppu::WeakImplHelper<graphic::XPdfDecomposer, lang::XServiceInfo>
{
public:
explicit XPdfDecomposer(uno::Reference<uno::XComponentContext> const& context);
@@ -81,19 +81,18 @@ XPdfDecomposer::getDecomposition(const uno::Reference<util::XBinaryDataContainer
BitmapEx aReplacement(aBitmaps[0]);
// short form for scale and translate transformation
- const Size aDPI(
- Application::GetDefaultDevice()->LogicToPixel(Size(1, 1), MapMode(MapUnit::MapInch)));
const Size aBitmapSize(aReplacement.GetSizePixel());
+ // ImpGraphic::getPrefMapMode() requires mm100 for bitmaps rendered from vector graphic data.
+ const Size aMM100(
+ Application::GetDefaultDevice()->PixelToLogic(aBitmapSize, MapMode(MapUnit::Map100thMM)));
const basegfx::B2DHomMatrix aBitmapTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(
- aBitmapSize.getWidth() * aDPI.getWidth(), aBitmapSize.getHeight() * aDPI.getHeight(), 0,
- 0));
+ aMM100.getWidth(), aMM100.getHeight(), 0, 0));
// create primitive
- uno::Sequence<uno::Reference<graphic::XPrimitive2D>> aSequence(1);
- aSequence[0] = new drawinglayer::primitive2d::BitmapPrimitive2D(
- VCLUnoHelper::CreateVCLXBitmap(aReplacement), aBitmapTransform);
-
- return aSequence;
+ return drawinglayer::primitive2d::Primitive2DContainer{
+ new drawinglayer::primitive2d::BitmapPrimitive2D(aReplacement, aBitmapTransform)
+ }
+ .toSequence();
}
OUString SAL_CALL XPdfDecomposer::getImplementationName()
diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx
index 44953c242fb3..a5c9e8aaa007 100644
--- a/filter/source/pdf/pdfdialog.cxx
+++ b/filter/source/pdf/pdfdialog.cxx
@@ -62,6 +62,13 @@ std::unique_ptr<weld::DialogController> PDFDialog::createDialog(const css::uno::
return nullptr;
}
+std::shared_ptr<SfxTabDialogController> PDFDialog::createAsyncDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
+{
+ if( mxSrcDoc.is() )
+ return std::make_shared<ImpPDFTabDialog>(Application::GetFrameWeld(rParent), maFilterData, mxSrcDoc);
+ return nullptr;
+}
+
void PDFDialog::executedDialog( sal_Int16 nExecutionResult )
{
if (nExecutionResult && m_xDialog)
@@ -69,6 +76,24 @@ void PDFDialog::executedDialog( sal_Int16 nExecutionResult )
destroyDialog();
}
+void PDFDialog::runAsync(const css::uno::Reference< css::ui::dialogs::XDialogClosedListener >& xListener)
+{
+ SfxTabDialogController::runAsync(m_xAsyncDialog, [this, xListener](sal_Int32 nResponse) {
+ rtl::Reference<PDFDialog> xThis(this); // keep alive for scope, dialogClosed can cause owner to drop this
+ executedAsyncDialog( m_xAsyncDialog, nResponse );
+ css::ui::dialogs::DialogClosedEvent aEvent;
+ aEvent.DialogResult = nResponse;
+ xListener->dialogClosed( aEvent );
+ destroyAsyncDialog();
+ });
+}
+
+void PDFDialog::executedAsyncDialog( std::shared_ptr<SfxTabDialogController> xAsyncDialog, sal_Int32 nExecutionResult )
+{
+ if (nExecutionResult && xAsyncDialog)
+ maFilterData = static_cast<ImpPDFTabDialog*>(xAsyncDialog.get())->GetFilterData();
+}
+
Reference< XPropertySetInfo > SAL_CALL PDFDialog::getPropertySetInfo()
{
Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
@@ -100,9 +125,10 @@ Sequence< PropertyValue > SAL_CALL PDFDialog::getPropertyValues()
if( i == nCount )
maMediaDescriptor.realloc( ++nCount );
+ auto pMediaDescriptor = maMediaDescriptor.getArray();
- maMediaDescriptor[ i ].Name = "FilterData";
- maMediaDescriptor[ i ].Value <<= maFilterData;
+ pMediaDescriptor[ i ].Name = "FilterData";
+ pMediaDescriptor[ i ].Value <<= maFilterData;
return maMediaDescriptor;
}
@@ -112,7 +138,7 @@ void SAL_CALL PDFDialog::setPropertyValues( const Sequence< PropertyValue >& rPr
{
maMediaDescriptor = rProps;
- for( const PropertyValue& rProp : std::as_const(maMediaDescriptor) )
+ for (const PropertyValue& rProp : maMediaDescriptor)
{
if ( rProp.Name == "FilterData" )
{
diff --git a/filter/source/pdf/pdfdialog.hxx b/filter/source/pdf/pdfdialog.hxx
index 463307a857f2..2410192a2617 100644
--- a/filter/source/pdf/pdfdialog.hxx
+++ b/filter/source/pdf/pdfdialog.hxx
@@ -17,10 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_PDF_PDFDIALOG_HXX
-#define INCLUDED_FILTER_SOURCE_PDF_PDFDIALOG_HXX
-
-#include <svtools/genericunodialog.hxx>
+#pragma once
#include <comphelper/proparrhlp.hxx>
#include <cppuhelper/implbase.hxx>
@@ -29,14 +26,16 @@
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-namespace vcl { class Window; }
+#include <sfx2/tabdlg.hxx>
+#include <svtools/genericasyncunodialog.hxx>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::document;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
-typedef ::cppu::ImplInheritanceHelper < ::svt::OGenericUnoDialog, XPropertyAccess, XExporter > PDFDialog_Base;
+typedef ::cppu::ImplInheritanceHelper < ::svt::OGenericUnoAsyncDialog<SfxTabDialogController>,
+ XPropertyAccess, XExporter > PDFDialog_Base;
class PDFDialog final:
public PDFDialog_Base,
@@ -57,6 +56,11 @@ private:
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
+ // OGenericUnoAsyncDialog
+ virtual std::shared_ptr<SfxTabDialogController> createAsyncDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
+ virtual void runAsync(const css::uno::Reference< css::ui::dialogs::XDialogClosedListener >& xListener) override;
+ virtual void executedAsyncDialog(std::shared_ptr<SfxTabDialogController> xAsyncDialog, sal_Int32 nExecutionResult) override;
+
// XPropertyAccess
using OPropertySetHelper::getPropertyValues;
virtual Sequence< PropertyValue > SAL_CALL getPropertyValues( ) override;
@@ -72,6 +76,4 @@ public:
virtual ~PDFDialog() override;
};
-#endif // INCLUDED_FILTER_SOURCE_PDF_PDFDIALOG_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index dc5a0c6bb7da..03ecbf576c56 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -22,11 +22,13 @@
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <tools/poly.hxx>
-#include <tools/diagnose_ex.h>
-#include <unotools/resmgr.hxx>
+#include <comphelper/diagnose_ex.hxx>
+#include <utility>
#include <vcl/canvastools.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/gdimtf.hxx>
+#include <rtl/ustring.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/string.hxx>
#include <comphelper/storagehelper.hxx>
@@ -35,8 +37,8 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <toolkit/awt/vclxdevice.hxx>
#include <unotools/configmgr.hxx>
-#include <cppuhelper/compbase.hxx>
-#include <cppuhelper/basemutex.hxx>
+#include <comphelper/compbase.hxx>
+#include <officecfg/Office/Common.hxx>
#include "pdfexport.hxx"
#include <strings.hrc>
@@ -47,7 +49,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/document/XDocumentProperties2.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
@@ -57,18 +59,22 @@
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/sheet/XSheetRange.hpp>
#include <com/sun/star/security/XCertificate.hpp>
#include <com/sun/star/beans/XMaterialHolder.hpp>
+#include <com/sun/star/xml/crypto/SEInitializer.hpp>
#include <memory>
+#include <rtl/bootstrap.hxx>
+#include <config_features.h>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::view;
-using namespace ::com::sun::star::graphic;
PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc,
@@ -79,59 +85,17 @@ PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc,
mxContext ( xContext ),
mxStatusIndicator ( rxStatusIndicator ),
mxIH ( rxIH ),
- mbUseTaggedPDF ( false ),
- mnPDFTypeSelection ( 0 ),
- mbPDFUACompliance ( false),
- mbExportNotes ( true ),
- mbExportPlaceholders ( false ),
- mbUseReferenceXObject ( false ),
- mbExportNotesPages ( false ),
- mbExportOnlyNotesPages ( false ),
- mbUseTransitionEffects ( true ),
- mbExportBookmarks ( true ),
- mbExportHiddenSlides ( false ),
- mbSinglePageSheets ( false ),
- mnOpenBookmarkLevels ( -1 ),
mbUseLosslessCompression ( false ),
mbReduceImageResolution ( true ),
mbSkipEmptyPages ( true ),
- mbAddStream ( false ),
mnMaxImageResolution ( 300 ),
mnQuality ( 80 ),
- mnFormsFormat ( 0 ),
- mbExportFormFields ( true ),
- mbAllowDuplicateFieldNames ( false ),
mnProgressValue ( 0 ),
mbRemoveTransparencies ( false ),
mbIsRedactMode ( false ),
-
- mbHideViewerToolbar ( false ),
- mbHideViewerMenubar ( false ),
- mbHideViewerWindowControls ( false ),
- mbFitWindow ( false ),
- mbCenterWindow ( false ),
- mbOpenInFullScreenMode ( false ),
- mbDisplayPDFDocumentTitle ( true ),
- mnPDFDocumentMode ( 0 ),
- mnPDFDocumentAction ( 0 ),
- mnZoom ( 100 ),
- mnInitialPage ( 1 ),
- mnPDFPageLayout ( 0 ),
-
- mbEncrypt ( false ),
- mbRestrictPermissions ( false ),
- mnPrintAllowed ( 2 ),
- mnChangesAllowed ( 4 ),
- mbCanCopyOrExtract ( true ),
- mbCanExtractForAccessibility( true ),
-
- // #i56629
- mbExportRelativeFsysLinks ( false ),
- mnDefaultLinkAction ( 0 ),
- mbConvertOOoTargetToPDFTarget( false ),
- mbExportBmkToDest ( false ),
- mbSignPDF ( false )
+ maWatermarkColor ( COL_LIGHTGREEN ),
+ maWatermarkFontName ( "Helvetica" )
{
}
@@ -156,14 +120,15 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
bool bExportNotesPages = false;
+ auto rRenderOptionsRange = asNonConstRange(rRenderOptions);
for( sal_Int32 nData = 0, nDataCount = rRenderOptions.getLength(); nData < nDataCount; ++nData )
{
if ( rRenderOptions[ nData ].Name == "IsFirstPage" )
- pFirstPage = &rRenderOptions[ nData ].Value;
+ pFirstPage = &rRenderOptionsRange[ nData ].Value;
else if ( rRenderOptions[ nData ].Name == "IsLastPage" )
- pLastPage = &rRenderOptions[ nData ].Value;
+ pLastPage = &rRenderOptionsRange[ nData ].Value;
else if ( rRenderOptions[ nData ].Name == "ExportNotesPages" )
- rRenderOptions[ nData ].Value >>= bExportNotesPages;
+ rRenderOptionsRange[ nData ].Value >>= bExportNotesPages;
}
OutputDevice* pOut = rPDFWriter.GetReferenceDevice();
@@ -218,6 +183,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
aMtf.Stop();
aMtf.WindStart();
+ bool bEmptyPage = false;
if( aMtf.GetActionSize() &&
( !mbSkipEmptyPages || aPageSize.Width || aPageSize.Height ) )
{
@@ -242,6 +208,10 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
ImplExportPage(rPDFWriter, rPDFExtOutDevData, aMtf);
bRet = true;
}
+ else
+ {
+ bEmptyPage = true;
+ }
pOut->Pop();
@@ -251,7 +221,12 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
*pFirstPage <<= false;
++mnProgressValue;
- ++nCurrentPage;
+ if (!bEmptyPage)
+ {
+ // Calculate the page number in the PDF output, which may be smaller than the page number in
+ // case of hidden slides or a partial export.
+ ++nCurrentPage;
+ }
}
}
else
@@ -295,19 +270,16 @@ void PDFExportStreamDoc::write( const Reference< XOutputStream >& xStream )
if( !xStore.is() )
return;
- Sequence< beans::PropertyValue > aArgs( 2 + (m_aPreparedPassword.hasElements() ? 1 : 0) );
- aArgs.getArray()[0].Name = "FilterName";
- aArgs.getArray()[1].Name = "OutputStream";
- aArgs.getArray()[1].Value <<= xStream;
- if( m_aPreparedPassword.hasElements() )
- {
- aArgs.getArray()[2].Name = "EncryptionData";
- aArgs.getArray()[2].Value <<= m_aPreparedPassword;
- }
+ std::vector<beans::PropertyValue> aArgs {
+ comphelper::makePropertyValue("FilterName", OUString()),
+ comphelper::makePropertyValue("OutputStream", xStream),
+ };
+ if (m_aPreparedPassword.hasElements())
+ aArgs.push_back(comphelper::makePropertyValue("EncryptionData", m_aPreparedPassword));
try
{
- xStore->storeToURL( "private:stream", aArgs );
+ xStore->storeToURL("private:stream", comphelper::containerToSequence(aArgs));
}
catch( const IOException& )
{
@@ -316,7 +288,7 @@ void PDFExportStreamDoc::write( const Reference< XOutputStream >& xStream )
static OUString getMimetypeForDocument( const Reference< XComponentContext >& xContext,
- const Reference< XComponent >& xDoc ) throw()
+ const Reference< XComponent >& xDoc ) noexcept
{
OUString aDocMimetype;
try
@@ -332,11 +304,10 @@ static OUString getMimetypeForDocument( const Reference< XComponentContext >& xC
// get the actual filter name
Reference< lang::XMultiServiceFactory > xConfigProvider =
configuration::theDefaultProvider::get( xContext );
- uno::Sequence< uno::Any > aArgs( 1 );
beans::NamedValue aPathProp;
aPathProp.Name = "nodepath";
aPathProp.Value <<= OUString( "/org.openoffice.Setup/Office/Factories/" );
- aArgs[0] <<= aPathProp;
+ uno::Sequence< uno::Any > aArgs{ uno::Any(aPathProp) };
Reference< container::XNameAccess > xSOFConfig(
xConfigProvider->createInstanceWithArguments(
@@ -359,7 +330,7 @@ static OUString getMimetypeForDocument( const Reference< XComponentContext >& xC
Sequence< beans::PropertyValue > aFilterData;
xFilterFactory->getByName( aFilterName ) >>= aFilterData;
- for ( const beans::PropertyValue& rProp : std::as_const(aFilterData) )
+ for (const beans::PropertyValue& rProp : aFilterData)
if ( rProp.Name == "Type" )
rProp.Value >>= aTypeName;
@@ -372,7 +343,7 @@ static OUString getMimetypeForDocument( const Reference< XComponentContext >& xC
Sequence< beans::PropertyValue > aTypeData;
xTypeDetection->getByName( aTypeName ) >>= aTypeData;
- for ( const beans::PropertyValue& rProp : std::as_const(aTypeData) )
+ for (const beans::PropertyValue& rProp : aTypeData)
if ( rProp.Name == "MediaType" )
rProp.Value >>= aDocMimetype;
}
@@ -387,6 +358,25 @@ static OUString getMimetypeForDocument( const Reference< XComponentContext >& xC
return aDocMimetype;
}
+uno::Reference<security::XCertificate>
+PDFExport::GetCertificateFromSubjectName(const std::u16string_view& rSubjectName) const
+{
+ uno::Reference<xml::crypto::XSEInitializer> xSEInitializer
+ = xml::crypto::SEInitializer::create(mxContext);
+ uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext
+ = xSEInitializer->createSecurityContext(OUString());
+ uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment
+ = xSecurityContext->getSecurityEnvironment();
+ for (const auto& xCertificate : xSecurityEnvironment->getPersonalCertificates())
+ {
+ if (xCertificate->getSubjectName() == rSubjectName)
+ {
+ return xCertificate;
+ }
+ }
+
+ return {};
+}
bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& rFilterData )
{
@@ -409,6 +399,53 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
if( xRenderable.is() )
{
+ // The defaults
+ bool bUseTaggedPDF = false;
+ sal_Int32 nPDFTypeSelection = 0;
+ bool bPDFUACompliance = false;
+ bool bExportNotes = true;
+ bool bExportNotesInMargin = false;
+ bool bExportNotesPages = false;
+ bool bExportOnlyNotesPages = false;
+ bool bUseTransitionEffects = true;
+ bool bExportFormFields = true;
+ sal_Int32 nFormsFormat = 0;
+ bool bAllowDuplicateFieldNames = false;
+ bool bHideViewerToolbar = false;
+ bool bHideViewerMenubar = false;
+ bool bHideViewerWindowControls = false;
+ bool bFitWindow = false;
+ bool bCenterWindow = false;
+ bool bOpenInFullScreenMode = false;
+ bool bDisplayPDFDocumentTitle = true;
+ sal_Int32 nPDFDocumentMode = 0;
+ sal_Int32 nPDFDocumentAction = 0;
+ sal_Int32 nZoom = 100;
+ sal_Int32 nInitialPage = 1;
+ sal_Int32 nPDFPageLayout = 0;
+ bool bAddStream = false;
+ bool bEncrypt = false;
+ bool bRestrictPermissions = false;
+ sal_Int32 nPrintAllowed = 2;
+ sal_Int32 nChangesAllowed = 4;
+ bool bCanCopyOrExtract = true;
+ bool bCanExtractForAccessibility = true;
+ // #i56629
+ bool bExportRelativeFsysLinks = false;
+ sal_Int32 nDefaultLinkAction = 0;
+ bool bConvertOOoTargetToPDFTarget = false;
+ bool bExportBmkToDest = false;
+ bool bExportBookmarks = true;
+ bool bExportHiddenSlides = false;
+ bool bSinglePageSheets = false;
+ sal_Int32 nOpenBookmarkLevels = -1;
+ bool bSignPDF = false;
+ OUString sSignLocation, sSignReason, sSignContact, sSignPassword;
+ css::uno::Reference<css::security::XCertificate> aSignCertificate;
+ OUString sSignTSA;
+ bool bExportPlaceholders = false;
+ bool bUseReferenceXObject = false;
+
rtl::Reference<VCLXDevice> xDevice(new VCLXDevice);
OUString aPageRange;
Any aSelection;
@@ -416,7 +453,11 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
OUString aOpenPassword, aPermissionPassword;
Reference< beans::XMaterialHolder > xEnc;
Sequence< beans::NamedValue > aPreparedPermissionPassword;
-
+ std::optional<PropertyValue> oMathTitleRow;
+ std::optional<PropertyValue> oMathFormulaText;
+ std::optional<PropertyValue> oMathBorder;
+ std::optional<PropertyValue> oMathPrintFormat;
+ std::optional<PropertyValue> oMathPrintScale;
// getting the string for the creator
OUString aCreator;
@@ -424,40 +465,74 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
if ( xInfo.is() )
{
if ( xInfo->supportsService( "com.sun.star.presentation.PresentationDocument" ) )
- aCreator += "Impress";
+ aCreator = u"Impress"_ustr;
else if ( xInfo->supportsService( "com.sun.star.drawing.DrawingDocument" ) )
- aCreator += "Draw";
+ aCreator = u"Draw"_ustr;
else if ( xInfo->supportsService( "com.sun.star.text.TextDocument" ) )
- aCreator += "Writer";
+ aCreator = u"Writer"_ustr;
else if ( xInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
- aCreator += "Calc";
+ aCreator = u"Calc"_ustr;
else if ( xInfo->supportsService( "com.sun.star.formula.FormulaProperties" ) )
- aCreator += "Math";
+ aCreator = u"Math"_ustr;
}
Reference< document::XDocumentPropertiesSupplier > xDocumentPropsSupplier( mxSrcDoc, UNO_QUERY );
if ( xDocumentPropsSupplier.is() )
{
- Reference< document::XDocumentProperties > xDocumentProps( xDocumentPropsSupplier->getDocumentProperties() );
+ Reference< document::XDocumentProperties2 > xDocumentProps( xDocumentPropsSupplier->getDocumentProperties(), UNO_QUERY );
if ( xDocumentProps.is() )
{
aContext.DocumentInfo.Title = xDocumentProps->getTitle();
aContext.DocumentInfo.Author = xDocumentProps->getAuthor();
aContext.DocumentInfo.Subject = xDocumentProps->getSubject();
aContext.DocumentInfo.Keywords = ::comphelper::string::convertCommaSeparated(xDocumentProps->getKeywords());
+ aContext.DocumentInfo.ModificationDate
+ = xDocumentProps->getEditingCycles() < 1
+ ? xDocumentProps->getCreationDate()
+ : xDocumentProps->getModificationDate();
+ aContext.DocumentInfo.Contributor = xDocumentProps->getContributor();
+ aContext.DocumentInfo.Coverage = xDocumentProps->getCoverage();
+ aContext.DocumentInfo.Identifier = xDocumentProps->getIdentifier();
+ aContext.DocumentInfo.Publisher = xDocumentProps->getPublisher();
+ aContext.DocumentInfo.Relation = xDocumentProps->getRelation();
+ aContext.DocumentInfo.Rights = xDocumentProps->getRights();
+ aContext.DocumentInfo.Source = xDocumentProps->getSource();
+ aContext.DocumentInfo.Type = xDocumentProps->getType();
}
}
- // getting the string for the producer
- aContext.DocumentInfo.Producer =
- utl::ConfigManager::getProductName() +
- " " +
- utl::ConfigManager::getProductVersion();
+
+ if (!comphelper::IsFuzzing())
+ {
+ OUString arch;
+ auto const ok = rtl::Bootstrap::get("_ARCH", arch);
+ assert(ok); (void) ok;
+ // getting the string for the producer
+ OUString aProducerOverride = officecfg::Office::Common::Save::Document::GeneratorOverride::get();
+ if (!aProducerOverride.isEmpty())
+ aContext.DocumentInfo.Producer = aProducerOverride;
+ else
+ aContext.DocumentInfo.Producer =
+ utl::ConfigManager::getProductName() +
+ " " +
+ utl::ConfigManager::getAboutBoxProductVersion() +
+ " (" + arch + ") / LibreOffice Community";
+ }
+
aContext.DocumentInfo.Creator = aCreator;
+ OUString aSignCertificateSubjectName;
for ( const beans::PropertyValue& rProp : rFilterData )
{
if ( rProp.Name == "PageRange" )
rProp.Value >>= aPageRange;
+ else if ( rProp.Name == "SheetRange" )
+ {
+ Reference< frame::XController > xController( Reference< frame::XModel >( mxSrcDoc, UNO_QUERY_THROW )->getCurrentController() );
+ Reference< sheet::XSheetRange > xView( xController, UNO_QUERY);
+ OUString aSheetRange;
+ rProp.Value >>= aSheetRange;
+ aSelection = xView->getSelectionFromString(aSheetRange);
+ }
else if ( rProp.Name == "Selection" )
aSelection = rProp.Value;
else if ( rProp.Name == "UseLosslessCompression" )
@@ -471,65 +546,99 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
else if ( rProp.Name == "MaxImageResolution" )
rProp.Value >>= mnMaxImageResolution;
else if ( rProp.Name == "UseTaggedPDF" )
- rProp.Value >>= mbUseTaggedPDF;
+ rProp.Value >>= bUseTaggedPDF;
else if ( rProp.Name == "SelectPdfVersion" )
- rProp.Value >>= mnPDFTypeSelection;
+ rProp.Value >>= nPDFTypeSelection;
else if ( rProp.Name == "PDFUACompliance" )
- rProp.Value >>= mbPDFUACompliance;
+ rProp.Value >>= bPDFUACompliance;
else if ( rProp.Name == "ExportNotes" )
- rProp.Value >>= mbExportNotes;
+ rProp.Value >>= bExportNotes;
+ else if ( rProp.Name == "ExportNotesInMargin" )
+ rProp.Value >>= bExportNotesInMargin;
else if ( rProp.Name == "ExportNotesPages" )
- rProp.Value >>= mbExportNotesPages;
+ rProp.Value >>= bExportNotesPages;
else if ( rProp.Name == "ExportOnlyNotesPages" )
- rProp.Value >>= mbExportOnlyNotesPages;
+ rProp.Value >>= bExportOnlyNotesPages;
else if ( rProp.Name == "UseTransitionEffects" )
- rProp.Value >>= mbUseTransitionEffects;
+ rProp.Value >>= bUseTransitionEffects;
else if ( rProp.Name == "ExportFormFields" )
- rProp.Value >>= mbExportFormFields;
+ rProp.Value >>= bExportFormFields;
else if ( rProp.Name == "FormsType" )
- rProp.Value >>= mnFormsFormat;
+ rProp.Value >>= nFormsFormat;
else if ( rProp.Name == "AllowDuplicateFieldNames" )
- rProp.Value >>= mbAllowDuplicateFieldNames;
+ rProp.Value >>= bAllowDuplicateFieldNames;
// viewer properties
else if ( rProp.Name == "HideViewerToolbar" )
- rProp.Value >>= mbHideViewerToolbar;
+ rProp.Value >>= bHideViewerToolbar;
else if ( rProp.Name == "HideViewerMenubar" )
- rProp.Value >>= mbHideViewerMenubar;
+ rProp.Value >>= bHideViewerMenubar;
else if ( rProp.Name == "HideViewerWindowControls" )
- rProp.Value >>= mbHideViewerWindowControls;
+ rProp.Value >>= bHideViewerWindowControls;
else if ( rProp.Name == "ResizeWindowToInitialPage" )
- rProp.Value >>= mbFitWindow;
+ rProp.Value >>= bFitWindow;
else if ( rProp.Name == "CenterWindow" )
- rProp.Value >>= mbCenterWindow;
+ rProp.Value >>= bCenterWindow;
else if ( rProp.Name == "OpenInFullScreenMode" )
- rProp.Value >>= mbOpenInFullScreenMode;
+ rProp.Value >>= bOpenInFullScreenMode;
else if ( rProp.Name == "DisplayPDFDocumentTitle" )
- rProp.Value >>= mbDisplayPDFDocumentTitle;
+ rProp.Value >>= bDisplayPDFDocumentTitle;
else if ( rProp.Name == "InitialView" )
- rProp.Value >>= mnPDFDocumentMode;
+ rProp.Value >>= nPDFDocumentMode;
else if ( rProp.Name == "Magnification" )
- rProp.Value >>= mnPDFDocumentAction;
+ rProp.Value >>= nPDFDocumentAction;
else if ( rProp.Name == "Zoom" )
- rProp.Value >>= mnZoom;
+ rProp.Value >>= nZoom;
else if ( rProp.Name == "InitialPage" )
- rProp.Value >>= mnInitialPage;
+ rProp.Value >>= nInitialPage;
else if ( rProp.Name == "PageLayout" )
- rProp.Value >>= mnPDFPageLayout;
+ rProp.Value >>= nPDFPageLayout;
else if ( rProp.Name == "FirstPageOnLeft" )
rProp.Value >>= aContext.FirstPageLeft;
else if ( rProp.Name == "IsAddStream" )
- rProp.Value >>= mbAddStream;
+ rProp.Value >>= bAddStream;
else if ( rProp.Name == "Watermark" )
rProp.Value >>= msWatermark;
+ else if ( rProp.Name == "WatermarkColor" )
+ {
+ sal_Int32 nColor{};
+ if (rProp.Value >>= nColor)
+ {
+ maWatermarkColor = Color(ColorTransparency, nColor);
+ }
+ }
+ else if (rProp.Name == "WatermarkFontHeight")
+ {
+ sal_Int32 nFontHeight{};
+ if (rProp.Value >>= nFontHeight)
+ {
+ moWatermarkFontHeight = nFontHeight;
+ }
+ }
+ else if (rProp.Name == "WatermarkRotateAngle")
+ {
+ sal_Int32 nRotateAngle{};
+ if (rProp.Value >>= nRotateAngle)
+ {
+ moWatermarkRotateAngle = Degree10(nRotateAngle);
+ }
+ }
+ else if (rProp.Name == "WatermarkFontName")
+ {
+ OUString aFontName{};
+ if (rProp.Value >>= aFontName)
+ {
+ maWatermarkFontName = aFontName;
+ }
+ }
else if ( rProp.Name == "TiledWatermark" )
rProp.Value >>= msTiledWatermark;
// now all the security related properties...
else if ( rProp.Name == "EncryptFile" )
- rProp.Value >>= mbEncrypt;
+ rProp.Value >>= bEncrypt;
else if ( rProp.Name == "DocumentOpenPassword" )
rProp.Value >>= aOpenPassword;
else if ( rProp.Name == "RestrictPermissions" )
- rProp.Value >>= mbRestrictPermissions;
+ rProp.Value >>= bRestrictPermissions;
else if ( rProp.Name == "PermissionPassword" )
rProp.Value >>= aPermissionPassword;
else if ( rProp.Name == "PreparedPasswords" )
@@ -537,81 +646,99 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
else if ( rProp.Name == "PreparedPermissionPassword" )
rProp.Value >>= aPreparedPermissionPassword;
else if ( rProp.Name == "Printing" )
- rProp.Value >>= mnPrintAllowed;
+ rProp.Value >>= nPrintAllowed;
else if ( rProp.Name == "Changes" )
- rProp.Value >>= mnChangesAllowed;
+ rProp.Value >>= nChangesAllowed;
else if ( rProp.Name == "EnableCopyingOfContent" )
- rProp.Value >>= mbCanCopyOrExtract;
+ rProp.Value >>= bCanCopyOrExtract;
else if ( rProp.Name == "EnableTextAccessForAccessibilityTools" )
- rProp.Value >>= mbCanExtractForAccessibility;
+ rProp.Value >>= bCanExtractForAccessibility;
// i56629 links extra (relative links and other related stuff)
else if ( rProp.Name == "ExportLinksRelativeFsys" )
- rProp.Value >>= mbExportRelativeFsysLinks;
+ rProp.Value >>= bExportRelativeFsysLinks;
else if ( rProp.Name == "PDFViewSelection" )
- rProp.Value >>= mnDefaultLinkAction;
+ rProp.Value >>= nDefaultLinkAction;
else if ( rProp.Name == "ConvertOOoTargetToPDFTarget" )
- rProp.Value >>= mbConvertOOoTargetToPDFTarget;
+ rProp.Value >>= bConvertOOoTargetToPDFTarget;
else if ( rProp.Name == "ExportBookmarksToPDFDestination" )
- rProp.Value >>= mbExportBmkToDest;
+ rProp.Value >>= bExportBmkToDest;
else if ( rProp.Name == "ExportBookmarks" )
- rProp.Value >>= mbExportBookmarks;
+ rProp.Value >>= bExportBookmarks;
else if ( rProp.Name == "ExportHiddenSlides" )
- rProp.Value >>= mbExportHiddenSlides;
+ rProp.Value >>= bExportHiddenSlides;
else if ( rProp.Name == "SinglePageSheets" )
- rProp.Value >>= mbSinglePageSheets;
+ rProp.Value >>= bSinglePageSheets;
else if ( rProp.Name == "OpenBookmarkLevels" )
- rProp.Value >>= mnOpenBookmarkLevels;
+ rProp.Value >>= nOpenBookmarkLevels;
else if ( rProp.Name == "SignPDF" )
- rProp.Value >>= mbSignPDF;
+ rProp.Value >>= bSignPDF;
else if ( rProp.Name == "SignatureLocation" )
- rProp.Value >>= msSignLocation;
+ rProp.Value >>= sSignLocation;
else if ( rProp.Name == "SignatureReason" )
- rProp.Value >>= msSignReason;
+ rProp.Value >>= sSignReason;
else if ( rProp.Name == "SignatureContactInfo" )
- rProp.Value >>= msSignContact;
+ rProp.Value >>= sSignContact;
else if ( rProp.Name == "SignaturePassword" )
- rProp.Value >>= msSignPassword;
+ rProp.Value >>= sSignPassword;
else if ( rProp.Name == "SignatureCertificate" )
- rProp.Value >>= maSignCertificate;
+ rProp.Value >>= aSignCertificate;
+ else if (rProp.Name == "SignCertificateSubjectName")
+ rProp.Value >>= aSignCertificateSubjectName;
else if ( rProp.Name == "SignatureTSA" )
- rProp.Value >>= msSignTSA;
+ rProp.Value >>= sSignTSA;
else if ( rProp.Name == "ExportPlaceholders" )
- rProp.Value >>= mbExportPlaceholders;
+ rProp.Value >>= bExportPlaceholders;
else if ( rProp.Name == "UseReferenceXObject" )
- rProp.Value >>= mbUseReferenceXObject;
+ rProp.Value >>= bUseReferenceXObject;
// Redaction & bitmap related stuff
else if ( rProp.Name == "IsRedactMode" )
rProp.Value >>= mbIsRedactMode;
+ // Math-specific render options
+ else if (rProp.Name == "TitleRow")
+ oMathTitleRow = rProp;
+ else if (rProp.Name == "FormulaText")
+ oMathFormulaText = rProp;
+ else if (rProp.Name == "Border")
+ oMathBorder = rProp;
+ else if (rProp.Name == "PrintFormat")
+ oMathPrintFormat = rProp;
+ else if (rProp.Name == "PrintScale")
+ oMathPrintScale = rProp;
+ }
+
+ if (!aSignCertificate.is() && !aSignCertificateSubjectName.isEmpty())
+ {
+ aSignCertificate = GetCertificateFromSubjectName(aSignCertificateSubjectName);
}
aContext.URL = aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
// set the correct version, depending on user request
- switch( mnPDFTypeSelection )
+ switch( nPDFTypeSelection )
{
default:
case 0:
- aContext.Version = vcl::PDFWriter::PDFVersion::PDF_1_6;
+ aContext.Version = vcl::PDFWriter::PDFVersion::PDF_1_7;
break;
case 1:
aContext.Version = vcl::PDFWriter::PDFVersion::PDF_A_1;
- mbUseTaggedPDF = true; // force the tagged PDF as well
+ bUseTaggedPDF = true; // force the tagged PDF as well
mbRemoveTransparencies = true; // does not allow transparencies
- mbEncrypt = false; // no encryption
+ bEncrypt = false; // no encryption
xEnc.clear();
break;
case 2:
aContext.Version = vcl::PDFWriter::PDFVersion::PDF_A_2;
- mbUseTaggedPDF = true; // force the tagged PDF as well
+ bUseTaggedPDF = true; // force the tagged PDF as well
mbRemoveTransparencies = false; // does allow transparencies
- mbEncrypt = false; // no encryption
+ bEncrypt = false; // no encryption
xEnc.clear();
break;
case 3:
aContext.Version = vcl::PDFWriter::PDFVersion::PDF_A_3;
- mbUseTaggedPDF = true; // force the tagged PDF as well
+ bUseTaggedPDF = true; // force the tagged PDF as well
mbRemoveTransparencies = false; // does allow transparencies
- mbEncrypt = false; // no encryption
+ bEncrypt = false; // no encryption
xEnc.clear();
break;
case 15:
@@ -620,30 +747,38 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
case 16:
aContext.Version = vcl::PDFWriter::PDFVersion::PDF_1_6;
break;
+ case 17:
+ aContext.Version = vcl::PDFWriter::PDFVersion::PDF_1_7;
+ break;
}
// PDF/UA support
- aContext.UniversalAccessibilityCompliance = mbPDFUACompliance;
- if (mbPDFUACompliance)
+ aContext.UniversalAccessibilityCompliance = bPDFUACompliance;
+ if (bPDFUACompliance)
{
- mbUseTaggedPDF = true;
+ // ISO 14289-1:2014, Clause: 7.1
+ bUseTaggedPDF = true;
+ // ISO 14289-1:2014, Clause: 7.16
+ bCanExtractForAccessibility = true;
+ // ISO 14289-1:2014, Clause: 7.20
+ bUseReferenceXObject = false;
}
// copy in context the values default in the constructor or set by the FilterData sequence of properties
- aContext.Tagged = mbUseTaggedPDF;
+ aContext.Tagged = bUseTaggedPDF;
// values used in viewer
- aContext.HideViewerToolbar = mbHideViewerToolbar;
- aContext.HideViewerMenubar = mbHideViewerMenubar;
- aContext.HideViewerWindowControls = mbHideViewerWindowControls;
- aContext.FitWindow = mbFitWindow;
- aContext.CenterWindow = mbCenterWindow;
- aContext.OpenInFullScreenMode = mbOpenInFullScreenMode;
- aContext.DisplayPDFDocumentTitle = mbDisplayPDFDocumentTitle;
- aContext.InitialPage = mnInitialPage-1;
- aContext.OpenBookmarkLevels = mnOpenBookmarkLevels;
-
- switch( mnPDFDocumentMode )
+ aContext.HideViewerToolbar = bHideViewerToolbar;
+ aContext.HideViewerMenubar = bHideViewerMenubar;
+ aContext.HideViewerWindowControls = bHideViewerWindowControls;
+ aContext.FitWindow = bFitWindow;
+ aContext.CenterWindow = bCenterWindow;
+ aContext.OpenInFullScreenMode = bOpenInFullScreenMode;
+ aContext.DisplayPDFDocumentTitle = bDisplayPDFDocumentTitle;
+ aContext.InitialPage = nInitialPage-1;
+ aContext.OpenBookmarkLevels = nOpenBookmarkLevels;
+
+ switch( nPDFDocumentMode )
{
default:
case 0:
@@ -656,7 +791,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
aContext.PDFDocumentMode = vcl::PDFWriter::UseThumbs;
break;
}
- switch( mnPDFDocumentAction )
+ switch( nPDFDocumentAction )
{
default:
case 0:
@@ -673,11 +808,11 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
break;
case 4:
aContext.PDFDocumentAction = vcl::PDFWriter::ActionZoom;
- aContext.Zoom = mnZoom;
+ aContext.Zoom = nZoom;
break;
}
- switch( mnPDFPageLayout )
+ switch( nPDFPageLayout )
{
default:
case 0:
@@ -701,20 +836,20 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
{
// set check for permission change password
// if not enabled and no permission password, force permissions to default as if PDF where without encryption
- if( mbRestrictPermissions && (xEnc.is() || !aPermissionPassword.isEmpty()) )
+ if( bRestrictPermissions && (xEnc.is() || !aPermissionPassword.isEmpty()) )
{
- mbEncrypt = true; // permission set as desired, done after
+ bEncrypt = true; // permission set as desired, done after
}
else
{
// force permission to default
- mnPrintAllowed = 2 ;
- mnChangesAllowed = 4 ;
- mbCanCopyOrExtract = true;
- mbCanExtractForAccessibility = true ;
+ nPrintAllowed = 2 ;
+ nChangesAllowed = 4 ;
+ bCanCopyOrExtract = true;
+ bCanExtractForAccessibility = true ;
}
- switch( mnPrintAllowed )
+ switch( nPrintAllowed )
{
case 0: // initialized when aContext is build, means no printing
break;
@@ -727,7 +862,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
break;
}
- switch( mnChangesAllowed )
+ switch( nChangesAllowed )
{
case 0: // already in struct PDFSecPermissions CTOR
break;
@@ -749,11 +884,11 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
break;
}
- aContext.Encryption.CanCopyOrExtract = mbCanCopyOrExtract;
- aContext.Encryption.CanExtractForAccessibility = mbCanExtractForAccessibility;
- if( mbEncrypt && ! xEnc.is() )
+ aContext.Encryption.CanCopyOrExtract = bCanCopyOrExtract;
+ aContext.Encryption.CanExtractForAccessibility = bCanExtractForAccessibility;
+ if( bEncrypt && ! xEnc.is() )
xEnc = vcl::PDFWriter::InitEncryption( aPermissionPassword, aOpenPassword );
- if( mbEncrypt && !aPermissionPassword.isEmpty() && ! aPreparedPermissionPassword.hasElements() )
+ if( bEncrypt && !aPermissionPassword.isEmpty() && ! aPreparedPermissionPassword.hasElements() )
aPreparedPermissionPassword = comphelper::OStorageHelper::CreatePackageEncryptionData( aPermissionPassword );
}
// after this point we don't need the legacy clear passwords anymore
@@ -766,7 +901,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
* FIXME: the entries are only implicitly defined by the resource file. Should there
* ever be an additional form submit format this could get invalid.
*/
- switch( mnFormsFormat )
+ switch( nFormsFormat )
{
case 1:
aContext.SubmitFormat = vcl::PDFWriter::PDF;
@@ -782,7 +917,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
aContext.SubmitFormat = vcl::PDFWriter::FDF;
break;
}
- aContext.AllowDuplicateFieldNames = mbAllowDuplicateFieldNames;
+ aContext.AllowDuplicateFieldNames = bAllowDuplicateFieldNames;
// get model
Reference< frame::XModel > xModel( mxSrcDoc, UNO_QUERY );
@@ -791,9 +926,9 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
// set the base URL of the file: then base URL
aContext.BaseURL = xModel->getURL();
// relative link option is private to PDF Export filter and limited to local filesystem only
- aContext.RelFsys = mbExportRelativeFsysLinks;
- // determine the default acton for PDF links
- switch( mnDefaultLinkAction )
+ aContext.RelFsys = bExportRelativeFsysLinks;
+ // determine the default action for PDF links
+ switch( nDefaultLinkAction )
{
default:
// default: URI, without fragment conversion (the bookmark in PDF may not work)
@@ -810,7 +945,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
aContext.DefaultLinkAction = vcl::PDFWriter::URIActionDestination;
break;
}
- aContext.ConvertOOoTargetToPDFTarget = mbConvertOOoTargetToPDFTarget;
+ aContext.ConvertOOoTargetToPDFTarget = bConvertOOoTargetToPDFTarget;
// check for Link Launch action, not allowed on PDF/A-1
// this code chunk checks when the filter is called from scripting
@@ -824,78 +959,91 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
}
}
- aContext.SignPDF = mbSignPDF;
- aContext.SignLocation = msSignLocation;
- aContext.SignContact = msSignContact;
- aContext.SignReason = msSignReason;
- aContext.SignPassword = msSignPassword;
- aContext.SignCertificate = maSignCertificate;
- aContext.SignTSA = msSignTSA;
- aContext.UseReferenceXObject = mbUseReferenceXObject;
+ aContext.SignPDF = bSignPDF;
+ aContext.SignLocation = sSignLocation;
+ aContext.SignContact = sSignContact;
+ aContext.SignReason = sSignReason;
+ aContext.SignPassword = sSignPassword;
+ aContext.SignCertificate = aSignCertificate;
+ aContext.SignTSA = sSignTSA;
+ aContext.UseReferenceXObject = bUseReferenceXObject;
// all context data set, time to create the printing device
- std::unique_ptr<vcl::PDFWriter> pPDFWriter(new vcl::PDFWriter( aContext, xEnc ));
- OutputDevice* pOut = pPDFWriter->GetReferenceDevice();
+ vcl::PDFWriter aPDFWriter( aContext, xEnc );
+ OutputDevice* pOut = aPDFWriter.GetReferenceDevice();
DBG_ASSERT( pOut, "PDFExport::Export: no reference device" );
xDevice->SetOutputDevice(pOut);
- if( mbAddStream )
+ if( bAddStream )
{
// export stream
// get mimetype
OUString aSrcMimetype = getMimetypeForDocument( mxContext, mxSrcDoc );
- pPDFWriter->AddStream( aSrcMimetype,
- new PDFExportStreamDoc( mxSrcDoc, aPreparedPermissionPassword )
- );
+ OUString aExt;
+ if (aSrcMimetype == "application/vnd.oasis.opendocument.text")
+ aExt = ".odt";
+ else if (aSrcMimetype == "application/vnd.oasis.opendocument.presentation")
+ aExt = ".odp";
+ else if (aSrcMimetype == "application/vnd.oasis.opendocument.spreadsheet")
+ aExt = ".ods";
+ else if (aSrcMimetype == "application/vnd.oasis.opendocument.graphics")
+ aExt = ".odg";
+ std::unique_ptr<vcl::PDFOutputStream> pStream(new PDFExportStreamDoc(mxSrcDoc, aPreparedPermissionPassword));
+ aPDFWriter.AddAttachedFile("Original" + aExt, aSrcMimetype, u"Embedded original document of this PDF file"_ustr, std::move(pStream));
}
if ( pOut )
{
DBG_ASSERT( pOut->GetExtOutDevData() == nullptr, "PDFExport: ExtOutDevData already set!!!" );
- std::unique_ptr<vcl::PDFExtOutDevData> pPDFExtOutDevData(new vcl::PDFExtOutDevData( *pOut ));
- pOut->SetExtOutDevData( pPDFExtOutDevData.get() );
- pPDFExtOutDevData->SetIsExportNotes( mbExportNotes );
- pPDFExtOutDevData->SetIsExportTaggedPDF( mbUseTaggedPDF );
- pPDFExtOutDevData->SetIsExportTransitionEffects( mbUseTransitionEffects );
- pPDFExtOutDevData->SetIsExportFormFields( mbExportFormFields );
- pPDFExtOutDevData->SetIsExportBookmarks( mbExportBookmarks );
- pPDFExtOutDevData->SetIsExportHiddenSlides( mbExportHiddenSlides );
- pPDFExtOutDevData->SetIsSinglePageSheets( mbSinglePageSheets );
- pPDFExtOutDevData->SetIsLosslessCompression( mbUseLosslessCompression );
- pPDFExtOutDevData->SetCompressionQuality( mnQuality );
- pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution );
- pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest );
-
- Sequence< PropertyValue > aRenderOptions( 8 );
- aRenderOptions[ 0 ].Name = "RenderDevice";
- aRenderOptions[ 0 ].Value <<= uno::Reference<awt::XDevice>(xDevice.get());
- aRenderOptions[ 1 ].Name = "ExportNotesPages";
- aRenderOptions[ 1 ].Value <<= false;
- Any& rExportNotesValue = aRenderOptions[ 1 ].Value;
- aRenderOptions[ 2 ].Name = "IsFirstPage";
- aRenderOptions[ 2 ].Value <<= true;
- aRenderOptions[ 3 ].Name = "IsLastPage";
- aRenderOptions[ 3 ].Value <<= false;
- aRenderOptions[ 4 ].Name = "IsSkipEmptyPages";
- aRenderOptions[ 4 ].Value <<= mbSkipEmptyPages;
- aRenderOptions[ 5 ].Name = "PageRange";
- aRenderOptions[ 5 ].Value <<= aPageRange;
- aRenderOptions[ 6 ].Name = "ExportPlaceholders";
- aRenderOptions[ 6 ].Value <<= mbExportPlaceholders;
- aRenderOptions[ 7 ].Name = "SinglePageSheets";
- aRenderOptions[ 7 ].Value <<= mbSinglePageSheets;
+ vcl::PDFExtOutDevData aPDFExtOutDevData( *pOut );
+ pOut->SetExtOutDevData( &aPDFExtOutDevData );
+ aPDFExtOutDevData.SetIsExportNotes( bExportNotes );
+ aPDFExtOutDevData.SetIsExportNotesInMargin( bExportNotesInMargin );
+ aPDFExtOutDevData.SetIsExportTaggedPDF( bUseTaggedPDF );
+ aPDFExtOutDevData.SetIsExportTransitionEffects( bUseTransitionEffects );
+ aPDFExtOutDevData.SetIsExportFormFields( bExportFormFields );
+ aPDFExtOutDevData.SetIsExportBookmarks( bExportBookmarks );
+ aPDFExtOutDevData.SetIsExportHiddenSlides( bExportHiddenSlides );
+ aPDFExtOutDevData.SetIsSinglePageSheets( bSinglePageSheets );
+ aPDFExtOutDevData.SetIsLosslessCompression( mbUseLosslessCompression );
+ aPDFExtOutDevData.SetCompressionQuality( mnQuality );
+ aPDFExtOutDevData.SetIsReduceImageResolution( mbReduceImageResolution );
+ aPDFExtOutDevData.SetIsExportNamedDestinations( bExportBmkToDest );
+
+ std::vector<PropertyValue> aRenderOptionsVector{
+ comphelper::makePropertyValue("RenderDevice", uno::Reference<awt::XDevice>(xDevice)),
+ comphelper::makePropertyValue("ExportNotesPages", false),
+ comphelper::makePropertyValue("IsFirstPage", true),
+ comphelper::makePropertyValue("IsLastPage", false),
+ comphelper::makePropertyValue("IsSkipEmptyPages", mbSkipEmptyPages),
+ comphelper::makePropertyValue("PageRange", aPageRange),
+ comphelper::makePropertyValue("ExportPlaceholders", bExportPlaceholders),
+ comphelper::makePropertyValue("SinglePageSheets", bSinglePageSheets),
+ comphelper::makePropertyValue("ExportNotesInMargin", bExportNotesInMargin)
+ };
+ if (oMathTitleRow)
+ aRenderOptionsVector.push_back(*oMathTitleRow);
+ if (oMathFormulaText)
+ aRenderOptionsVector.push_back(*oMathFormulaText);
+ if (oMathBorder)
+ aRenderOptionsVector.push_back(*oMathBorder);
+ if (oMathPrintFormat)
+ aRenderOptionsVector.push_back(*oMathPrintFormat);
+ if (oMathPrintScale)
+ aRenderOptionsVector.push_back(*oMathPrintScale);
+ Sequence aRenderOptions = comphelper::containerToSequence(aRenderOptionsVector);
+ Any& rExportNotesValue = aRenderOptions.getArray()[ 1 ].Value;
if( !aPageRange.isEmpty() || !aSelection.hasValue() )
{
aSelection = Any();
aSelection <<= mxSrcDoc;
}
- bool bExportNotesPages = false;
bool bReChangeToNormalView = false;
- const OUString sShowOnlineLayout( "ShowOnlineLayout" );
+ static constexpr OUString sShowOnlineLayout( u"ShowOnlineLayout"_ustr );
bool bReHideWhitespace = false;
- const OUString sHideWhitespace("HideWhitespace");
+ static constexpr OUString sHideWhitespace(u"HideWhitespace"_ustr);
uno::Reference< beans::XPropertySet > xViewProperties;
if ( aCreator == "Writer" )
@@ -908,14 +1056,14 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
xViewProperties->getPropertyValue( sShowOnlineLayout ) >>= bReChangeToNormalView;
if( bReChangeToNormalView )
{
- xViewProperties->setPropertyValue( sShowOnlineLayout, uno::makeAny( false ) );
+ xViewProperties->setPropertyValue( sShowOnlineLayout, uno::Any( false ) );
}
// Also, disable hide-whitespace during export.
xViewProperties->getPropertyValue(sHideWhitespace) >>= bReHideWhitespace;
if (bReHideWhitespace)
{
- xViewProperties->setPropertyValue(sHideWhitespace, uno::makeAny(false));
+ xViewProperties->setPropertyValue(sHideWhitespace, uno::Any(false));
}
}
catch( const uno::Exception& )
@@ -926,15 +1074,17 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
const sal_Int32 nPageCount = xRenderable->getRendererCount( aSelection, aRenderOptions );
- if ( mbExportNotesPages && aCreator == "Impress" )
+ if ( bExportNotesPages && aCreator == "Impress" )
{
uno::Reference< drawing::XShapes > xShapes; // do not allow to export notes when exporting a selection
- if ( ! ( aSelection >>= xShapes ) )
- bExportNotesPages = true;
+ if ( aSelection >>= xShapes )
+ bExportNotesPages = false;
}
- const bool bExportPages = !bExportNotesPages || !mbExportOnlyNotesPages;
+ else
+ bExportNotesPages = false;
+ const bool bExportPages = !bExportNotesPages || !bExportOnlyNotesPages;
- if( aPageRange.isEmpty() || mbSinglePageSheets)
+ if( aPageRange.isEmpty() || bSinglePageSheets)
{
aPageRange = OUString::number( 1 ) + "-" + OUString::number(nPageCount );
}
@@ -942,43 +1092,42 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
if ( mxStatusIndicator.is() )
{
- std::locale loc(Translate::Create("flt"));
sal_Int32 nTotalPageCount = aRangeEnum.size();
if ( bExportPages && bExportNotesPages )
nTotalPageCount *= 2;
- mxStatusIndicator->start(Translate::get(PDF_PROGRESS_BAR, loc), nTotalPageCount);
+ mxStatusIndicator->start(FilterResId(PDF_PROGRESS_BAR), nTotalPageCount);
}
bRet = nPageCount > 0;
if ( bRet && bExportPages )
- bRet = ExportSelection( *pPDFWriter, xRenderable, aSelection, aRangeEnum, aRenderOptions, nPageCount );
+ bRet = ExportSelection( aPDFWriter, xRenderable, aSelection, aRangeEnum, aRenderOptions, nPageCount );
if ( bRet && bExportNotesPages )
{
rExportNotesValue <<= true;
- bRet = ExportSelection( *pPDFWriter, xRenderable, aSelection, aRangeEnum, aRenderOptions, nPageCount );
+ bRet = ExportSelection( aPDFWriter, xRenderable, aSelection, aRangeEnum, aRenderOptions, nPageCount );
}
if ( mxStatusIndicator.is() )
mxStatusIndicator->end();
// if during the export the doc locale was set copy it to PDF writer
- const css::lang::Locale& rLoc( pPDFExtOutDevData->GetDocumentLocale() );
+ const css::lang::Locale& rLoc( aPDFExtOutDevData.GetDocumentLocale() );
if( !rLoc.Language.isEmpty() )
- pPDFWriter->SetDocumentLocale( rLoc );
+ aPDFWriter.SetDocumentLocale( rLoc );
if( bRet )
{
- pPDFExtOutDevData->PlayGlobalActions( *pPDFWriter );
- bRet = pPDFWriter->Emit();
- aErrors = pPDFWriter->GetErrors();
+ aPDFExtOutDevData.PlayGlobalActions( aPDFWriter );
+ bRet = aPDFWriter.Emit();
+ aErrors = aPDFWriter.GetErrors();
}
pOut->SetExtOutDevData( nullptr );
if( bReChangeToNormalView )
{
try
{
- xViewProperties->setPropertyValue( sShowOnlineLayout, uno::makeAny( true ) );
+ xViewProperties->setPropertyValue( sShowOnlineLayout, uno::Any( true ) );
}
catch( const uno::Exception& )
{
@@ -988,7 +1137,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
{
try
{
- xViewProperties->setPropertyValue( sHideWhitespace, uno::makeAny( true ) );
+ xViewProperties->setPropertyValue( sHideWhitespace, uno::Any( true ) );
}
catch( const uno::Exception& )
{
@@ -1008,14 +1157,13 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
namespace
{
-typedef cppu::WeakComponentImplHelper< task::XInteractionRequest > PDFErrorRequestBase;
+typedef comphelper::WeakComponentImplHelper< task::XInteractionRequest > PDFErrorRequestBase;
-class PDFErrorRequest : private cppu::BaseMutex,
- public PDFErrorRequestBase
+class PDFErrorRequest : public PDFErrorRequestBase
{
task::PDFExportException maExc;
public:
- explicit PDFErrorRequest( const task::PDFExportException& i_rExc );
+ explicit PDFErrorRequest( task::PDFExportException aExc );
// XInteractionRequest
virtual uno::Any SAL_CALL getRequest() override;
@@ -1023,16 +1171,15 @@ public:
};
-PDFErrorRequest::PDFErrorRequest( const task::PDFExportException& i_rExc ) :
- PDFErrorRequestBase( m_aMutex ),
- maExc( i_rExc )
+PDFErrorRequest::PDFErrorRequest( task::PDFExportException aExc ) :
+ maExc(std::move( aExc ))
{
}
uno::Any SAL_CALL PDFErrorRequest::getRequest()
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock guard( m_aMutex );
uno::Any aRet;
aRet <<= maExc;
@@ -1054,7 +1201,7 @@ void PDFExport::showErrors( const std::set< vcl::PDFWriter::ErrorCode >& rErrors
{
task::PDFExportException aExc;
aExc.ErrorCodes = comphelper::containerToSequence<sal_Int32>( rErrors );
- Reference< task::XInteractionRequest > xReq( new PDFErrorRequest( aExc ) );
+ Reference< task::XInteractionRequest > xReq( new PDFErrorRequest( std::move(aExc) ) );
mxIH->handle( xReq );
}
}
@@ -1078,6 +1225,12 @@ void PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData&
aCtx.m_bTransparenciesWereRemoved = rWriter.GetReferenceDevice()->
RemoveTransparenciesFromMetaFile( rMtf, aMtf, mnMaxImageResolution, mnMaxImageResolution,
false, true, mbReduceImageResolution );
+ // tdf#134736 if the metafile was replaced then rPDFExtOutDevData's PageSyncData mActions
+ // all still point to MetaAction indexes in the original metafile that are now invalid.
+ // Throw them all away in the absence of a way to reposition them to new positions of
+ // their replacements.
+ if (aCtx.m_bTransparenciesWereRemoved)
+ rPDFExtOutDevData.ResetSyncData(&rWriter);
}
else
{
@@ -1093,7 +1246,7 @@ void PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData&
rWriter.PlayMetafile( aMtf, aCtx, &rPDFExtOutDevData );
- rPDFExtOutDevData.ResetSyncData();
+ rPDFExtOutDevData.ResetSyncData(nullptr);
if (!msWatermark.isEmpty())
{
@@ -1108,7 +1261,7 @@ void PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData&
void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSize )
{
- vcl::Font aFont( "Helvetica", Size( 0, 3*rPageSize.Height()/4 ) );
+ vcl::Font aFont( maWatermarkFontName, Size( 0, moWatermarkFontHeight ? *moWatermarkFontHeight : 3*rPageSize.Height()/4 ) );
aFont.SetItalic( ITALIC_NONE );
aFont.SetWidthType( WIDTH_NORMAL );
aFont.SetWeight( WEIGHT_NORMAL );
@@ -1120,25 +1273,43 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
aFont.SetOrientation( 2700_deg10 );
}
+ if (moWatermarkRotateAngle)
+ {
+ aFont.SetOrientation(*moWatermarkRotateAngle);
+ if (rPageSize.Width() < rPageSize.Height())
+ {
+ // Set text width based on the shorter side, so rotation can't push text outside the
+ // page boundaries.
+ nTextWidth = rPageSize.Width();
+ }
+ }
+
// adjust font height for text to fit
OutputDevice* pDev = rWriter.GetReferenceDevice();
pDev->Push();
pDev->SetFont( aFont );
pDev->SetMapMode( MapMode( MapUnit::MapPoint ) );
int w = 0;
- while( ( w = pDev->GetTextWidth( msWatermark ) ) > nTextWidth )
+ if (moWatermarkFontHeight)
{
- if (w == 0)
- break;
- tools::Long nNewHeight = aFont.GetFontHeight() * nTextWidth / w;
- if( nNewHeight == aFont.GetFontHeight() )
+ w = pDev->GetTextWidth(msWatermark);
+ }
+ else
+ {
+ while( ( w = pDev->GetTextWidth( msWatermark ) ) > nTextWidth )
{
- nNewHeight--;
- if( nNewHeight <= 0 )
+ if (w == 0)
break;
+ tools::Long nNewHeight = aFont.GetFontHeight() * nTextWidth / w;
+ if( nNewHeight == aFont.GetFontHeight() )
+ {
+ nNewHeight--;
+ if( nNewHeight <= 0 )
+ break;
+ }
+ aFont.SetFontHeight( nNewHeight );
+ pDev->SetFont( aFont );
}
- aFont.SetFontHeight( nNewHeight );
- pDev->SetFont( aFont );
}
tools::Long nTextHeight = pDev->GetTextHeight();
// leave some maneuvering room for rounding issues, also
@@ -1147,9 +1318,18 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
pDev->Pop();
rWriter.Push();
+ // tdf#152235 tag around the reference to the XObject on the page
+ sal_Int32 const id = rWriter.EnsureStructureElement();
+ rWriter.InitStructureElement(id, vcl::PDFWriter::NonStructElement, ::std::u16string_view());
+ rWriter.BeginStructureElement(id);
+ rWriter.SetStructureAttribute(vcl::PDFWriter::Type, vcl::PDFWriter::Pagination);
+ rWriter.SetStructureAttribute(vcl::PDFWriter::Subtype, vcl::PDFWriter::Watermark);
+ // HACK: this should produce *nothing* itself but is necessary to output
+ // the Artifact tag here, not inside the XObject
+ rWriter.DrawPolyLine({});
rWriter.SetMapMode( MapMode( MapUnit::MapPoint ) );
rWriter.SetFont( aFont );
- rWriter.SetTextColor( COL_LIGHTGREEN );
+ rWriter.SetTextColor(maWatermarkColor);
Point aTextPoint;
tools::Rectangle aTextRect;
if( rPageSize.Width() > rPageSize.Height() )
@@ -1166,10 +1346,30 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
(rPageSize.Height()-w)/2 );
aTextRect = tools::Rectangle( aTextPoint, Size( nTextHeight, w ) );
}
+
+ if (moWatermarkRotateAngle)
+ {
+ // First set the text's starting point to the center of the page.
+ tools::Rectangle aPageRectangle(Point(0, 0), rPageSize);
+ aTextPoint = aPageRectangle.Center();
+ // Then adjust it so that the text remains centered, based on the rotation angle.
+ basegfx::B2DPolygon aTextPolygon
+ = basegfx::utils::createPolygonFromRect(basegfx::B2DRectangle(0, -nTextHeight, w, 0));
+ basegfx::B2DHomMatrix aMatrix;
+ aMatrix.rotate(-1 * toRadians(*moWatermarkRotateAngle));
+ aTextPolygon.transform(aMatrix);
+ basegfx::B2DPoint aPolygonCenter = aTextPolygon.getB2DRange().getCenter();
+ aTextPoint.AdjustX(-aPolygonCenter.getX());
+ aTextPoint.AdjustY(-aPolygonCenter.getY());
+
+ aTextRect = aPageRectangle;
+ }
+
rWriter.SetClipRegion();
rWriter.BeginTransparencyGroup();
rWriter.DrawText( aTextPoint, msWatermark );
rWriter.EndTransparencyGroup( aTextRect, 50 );
+ rWriter.EndStructureElement();
rWriter.Pop();
}
@@ -1216,6 +1416,15 @@ void PDFExport::ImplWriteTiledWatermark( vcl::PDFWriter& rWriter, const Size& rP
pDev->Pop();
rWriter.Push();
+ // tdf#152235 tag around the reference to the XObject on the page
+ sal_Int32 const id = rWriter.EnsureStructureElement();
+ rWriter.InitStructureElement(id, vcl::PDFWriter::NonStructElement, ::std::u16string_view());
+ rWriter.BeginStructureElement(id);
+ rWriter.SetStructureAttribute(vcl::PDFWriter::Type, vcl::PDFWriter::Pagination);
+ rWriter.SetStructureAttribute(vcl::PDFWriter::Subtype, vcl::PDFWriter::Watermark);
+ // HACK: this should produce *nothing* itself but is necessary to output
+ // the Artifact tag here, not inside the XObject
+ rWriter.DrawPolyLine({});
rWriter.SetMapMode( MapMode( MapUnit::MapPoint ) );
rWriter.SetFont(aFont);
rWriter.SetTextColor( Color(19,20,22) );
@@ -1251,6 +1460,7 @@ void PDFExport::ImplWriteTiledWatermark( vcl::PDFWriter& rWriter, const Size& rP
aTextPoint.Move( nTextWidth*1.5, 0 );
}
+ rWriter.EndStructureElement();
rWriter.Pop();
}
diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx
index 54784cce1abb..8bfd1c363038 100644
--- a/filter/source/pdf/pdfexport.hxx
+++ b/filter/source/pdf/pdfexport.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_PDF_PDFEXPORT_HXX
-#define INCLUDED_FILTER_SOURCE_PDF_PDFEXPORT_HXX
+#pragma once
#include <tools/multisel.hxx>
#include <vcl/pdfwriter.hxx>
@@ -36,113 +35,58 @@ class Size;
namespace vcl { class PDFWriter; }
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-
class PDFExport
{
private:
- Reference< XComponent > mxSrcDoc;
- Reference< uno::XComponentContext > mxContext;
- Reference< task::XStatusIndicator > mxStatusIndicator;
- Reference< task::XInteractionHandler > mxIH;
-
- bool mbUseTaggedPDF;
- sal_Int32 mnPDFTypeSelection;
- bool mbPDFUACompliance;
- bool mbExportNotes;
- bool mbExportPlaceholders;
- bool mbUseReferenceXObject;
- bool mbExportNotesPages;
- bool mbExportOnlyNotesPages;
- bool mbUseTransitionEffects;
- bool mbExportBookmarks;
- bool mbExportHiddenSlides;
- bool mbSinglePageSheets;
- sal_Int32 mnOpenBookmarkLevels;
+ css::uno::Reference< css::lang::XComponent > mxSrcDoc;
+ css::uno::Reference< css::uno::XComponentContext > mxContext;
+ css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator;
+ css::uno::Reference< css::task::XInteractionHandler > mxIH;
bool mbUseLosslessCompression;
bool mbReduceImageResolution;
bool mbSkipEmptyPages;
- bool mbAddStream;
sal_Int32 mnMaxImageResolution;
sal_Int32 mnQuality;
- sal_Int32 mnFormsFormat;
- bool mbExportFormFields;
- bool mbAllowDuplicateFieldNames;
sal_Int32 mnProgressValue;
bool mbRemoveTransparencies;
bool mbIsRedactMode;
OUString msWatermark;
+ Color maWatermarkColor;
+ std::optional<sal_Int32> moWatermarkFontHeight;
+ OUString maWatermarkFontName;
+ std::optional<Degree10> moWatermarkRotateAngle;
OUString msTiledWatermark;
- // these variable are here only to have a location in filter/pdf to set the default
- // to be used by the macro (when the FilterData are set by the macro itself)
- bool mbHideViewerToolbar;
- bool mbHideViewerMenubar;
- bool mbHideViewerWindowControls;
- bool mbFitWindow;
- bool mbCenterWindow;
- bool mbOpenInFullScreenMode;
- bool mbDisplayPDFDocumentTitle;
- sal_Int32 mnPDFDocumentMode;
- sal_Int32 mnPDFDocumentAction;
- sal_Int32 mnZoom;
- sal_Int32 mnInitialPage;
- sal_Int32 mnPDFPageLayout;
-
- bool mbEncrypt;
- bool mbRestrictPermissions;
- sal_Int32 mnPrintAllowed;
- sal_Int32 mnChangesAllowed;
- bool mbCanCopyOrExtract;
- bool mbCanExtractForAccessibility;
-
- // #i56629
- bool mbExportRelativeFsysLinks;
- sal_Int32 mnDefaultLinkAction;
- bool mbConvertOOoTargetToPDFTarget;
- bool mbExportBmkToDest;
void ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& rPDFExtOutDevData,
const GDIMetaFile& rMtf );
- bool mbSignPDF;
- OUString msSignLocation;
- OUString msSignContact;
- OUString msSignReason;
- OUString msSignPassword;
- Reference< security::XCertificate > maSignCertificate;
- OUString msSignTSA;
-
void ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSize );
void ImplWriteTiledWatermark( vcl::PDFWriter& rWriter, const Size& rPageSize );
+ css::uno::Reference<css::security::XCertificate> GetCertificateFromSubjectName(const std::u16string_view& rSubjectName) const;
public:
- PDFExport( const Reference< XComponent >& rxSrcDoc,
- const Reference< task::XStatusIndicator >& xStatusIndicator,
- const Reference< task::XInteractionHandler >& xIH,
- const Reference< uno::XComponentContext >& xFact );
+ PDFExport( const css::uno::Reference< css::lang::XComponent >& rxSrcDoc,
+ const css::uno::Reference< css::task::XStatusIndicator >& xStatusIndicator,
+ const css::uno::Reference< css::task::XInteractionHandler >& xIH,
+ const css::uno::Reference< css::uno::XComponentContext >& xFact );
~PDFExport();
bool ExportSelection( vcl::PDFWriter& rPDFWriter,
- Reference< css::view::XRenderable > const & rRenderable,
- const Any& rSelection,
+ css::uno::Reference< css::view::XRenderable > const & rRenderable,
+ const css::uno::Any& rSelection,
const StringRangeEnumerator& rRangeEnum,
- Sequence< PropertyValue >& rRenderOptions,
+ css::uno::Sequence< css::beans::PropertyValue >& rRenderOptions,
sal_Int32 nPageCount );
- bool Export( const OUString& rFile, const Sequence< PropertyValue >& rFilterData );
+ bool Export( const OUString& rFile, const css::uno::Sequence< css::beans::PropertyValue >& rFilterData );
void showErrors( const std::set<vcl::PDFWriter::ErrorCode>& );
};
-#endif // INCLUDED_FILTER_SOURCE_PDF_PDFEXPORT_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index 4d8580420670..dcfc918bbdd0 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -26,10 +26,16 @@
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/tempfile.hxx>
#include <vcl/FilterConfigItem.hxx>
+#include <vcl/glyphitemcache.hxx>
#include <memory>
#include <com/sun/star/io/XOutputStream.hpp>
+#include <comphelper/propertysequence.hxx>
+#include <comphelper/sequence.hxx>
+
+#include <boost/property_tree/json_parser/error.hpp>
+
using namespace ::com::sun::star::io;
PDFFilter::PDFFilter( const Reference< XComponentContext > &rxContext ) :
@@ -47,29 +53,42 @@ bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
{
Reference< XOutputStream > xOStm;
Sequence< PropertyValue > aFilterData;
- sal_Int32 nLength = rDescriptor.getLength();
- const PropertyValue* pValue = rDescriptor.getConstArray();
+ OUString aFilterOptions;
bool bIsRedactMode = false;
bool bRet = false;
Reference< task::XStatusIndicator > xStatusIndicator;
Reference< task::XInteractionHandler > xIH;
- for (sal_Int32 i = 0; i < nLength; ++i)
+ for (const auto& rValue : rDescriptor)
{
- if ( pValue[ i ].Name == "OutputStream" )
- pValue[ i ].Value >>= xOStm;
- else if ( pValue[ i ].Name == "FilterData" )
- pValue[ i ].Value >>= aFilterData;
- else if ( pValue[ i ].Name == "StatusIndicator" )
- pValue[ i ].Value >>= xStatusIndicator;
- else if ( pValue[i].Name == "InteractionHandler" )
- pValue[i].Value >>= xIH;
+ if (rValue.Name == "OutputStream")
+ rValue.Value >>= xOStm;
+ else if (rValue.Name == "FilterData")
+ rValue.Value >>= aFilterData;
+ else if (rValue.Name == "FilterOptions")
+ rValue.Value >>= aFilterOptions;
+ else if (rValue.Name == "StatusIndicator")
+ rValue.Value >>= xStatusIndicator;
+ else if (rValue.Name == "InteractionHandler")
+ rValue.Value >>= xIH;
+ else if (rValue.Name == "IsRedactMode")
+ rValue.Value >>= bIsRedactMode;
}
- for (sal_Int32 i = 0 ; i < nLength; ++i)
+ if (!aFilterData.hasElements() && aFilterOptions.startsWith("{"))
{
- if ( pValue[i].Name == "IsRedactMode")
- pValue[i].Value >>= bIsRedactMode;
+ try
+ {
+ // Allow setting filter data keys from the cmdline.
+ std::vector<PropertyValue> aData
+ = comphelper::JsonToPropertyValues(aFilterOptions.toUtf8());
+ aFilterData = comphelper::containerToSequence(aData);
+ }
+ catch (const boost::property_tree::json_parser::json_parser_error& e)
+ {
+ // This wasn't a valid json; maybe came from import filter (tdf#150846)
+ SAL_WARN("filter.pdf", "error parsing FilterOptions: " << e.message());
+ }
}
/* we don't get FilterData if we are exporting directly
@@ -85,6 +104,7 @@ bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
aCfgItem.ReadInt32( "SelectPdfVersion", 0 );
aCfgItem.ReadBool("PDFUACompliance", false);
aCfgItem.ReadBool( "ExportNotes", false );
+ aCfgItem.ReadBool( "ExportNotesInMargin", false );
aCfgItem.ReadBool( "ExportPlaceholders", false );
aCfgItem.ReadBool( "ExportNotesPages", false );
aCfgItem.ReadBool( "ExportOnlyNotesPages", false );
@@ -132,7 +152,7 @@ bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
{
bool bFound = false;
- for (PropertyValue& rProp : aFilterData)
+ for (PropertyValue& rProp : asNonConstRange(aFilterData))
{
if (rProp.Name == "IsRedactMode")
{
@@ -146,15 +166,16 @@ bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
{
sal_Int32 nNewSize = aFilterData.getLength() + 1;
aFilterData.realloc( nNewSize );
- aFilterData[nNewSize - 1].Name = "IsRedactMode";
- aFilterData[nNewSize - 1].Value <<= bIsRedactMode;
+ auto pFilterData = aFilterData.getArray();
+ pFilterData[nNewSize - 1].Name = "IsRedactMode";
+ pFilterData[nNewSize - 1].Value <<= bIsRedactMode;
}
}
if( mxSrcDoc.is() && xOStm.is() )
{
PDFExport aExport( mxSrcDoc, xStatusIndicator, xIH, mxContext );
- ::utl::TempFile aTempFile;
+ ::utl::TempFileNamed aTempFile;
aTempFile.EnableKillingFile();
bRet = aExport.Export( aTempFile.GetURL(), aFilterData );
@@ -220,8 +241,12 @@ sal_Bool SAL_CALL PDFFilter::filter( const Sequence< PropertyValue >& rDescripto
{
FocusWindowWaitCursor aCur;
+ SalLayoutGlyphsCache::self()->SetCacheGlyphsWhenDoingFallbackFonts(true);
+
const bool bRet = implExport( rDescriptor );
+ SalLayoutGlyphsCache::self()->SetCacheGlyphsWhenDoingFallbackFonts(false);
+
return bRet;
}
diff --git a/filter/source/pdf/pdffilter.hxx b/filter/source/pdf/pdffilter.hxx
index afd2b6d571be..28869272c1e8 100644
--- a/filter/source/pdf/pdffilter.hxx
+++ b/filter/source/pdf/pdffilter.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_PDF_PDFFILTER_HXX
-#define INCLUDED_FILTER_SOURCE_PDF_PDFFILTER_HXX
+#pragma once
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XExporter.hpp>
@@ -67,7 +66,5 @@ public:
virtual ~PDFFilter() override;
};
-#endif // INCLUDED_FILTER_SOURCE_PDF_PDFFILTER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/pdf/pdfinteract.hxx b/filter/source/pdf/pdfinteract.hxx
index 9ad7405a3f56..0af5c260b9ea 100644
--- a/filter/source/pdf/pdfinteract.hxx
+++ b/filter/source/pdf/pdfinteract.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_PDF_PDFINTERACT_HXX
-#define INCLUDED_FILTER_SOURCE_PDF_PDFINTERACT_HXX
+#pragma once
#include <cppuhelper/implbase.hxx>
@@ -59,6 +58,4 @@ public:
virtual ~PDFInteractionHandler() override;
};
-#endif // INCLUDED_FILTER_SOURCE_PDF_PDFINTERACT_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/storagefilterdetect/filterdetect.cxx b/filter/source/storagefilterdetect/filterdetect.cxx
index f4d3e47abf28..1d0d7557d273 100644
--- a/filter/source/storagefilterdetect/filterdetect.cxx
+++ b/filter/source/storagefilterdetect/filterdetect.cxx
@@ -31,6 +31,9 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <utility>
+
+#include <comphelper/lok.hxx>
using namespace ::com::sun::star;
using utl::MediaDescriptor;
@@ -40,34 +43,34 @@ namespace {
OUString getInternalFromMediaType(std::u16string_view aMediaType)
{
// OpenDocument types
- if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII ) return "writer8";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII ) return "writer8_template";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII ) return "writerweb8_writer_template";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII ) return "writerglobal8";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII ) return "writerglobal8_template";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII ) return "draw8";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII ) return "draw8_template";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII ) return "impress8";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII ) return "impress8_template";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII ) return "calc8";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII ) return "calc8_template";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII ) return "chart8";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII ) return "math8";
- else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII ) return "StarBaseReportChart";
+ if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII ) return "writer8";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII ) return "writer8_template";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII ) return "writerweb8_writer_template";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII ) return "writerglobal8";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII ) return "writerglobal8_template";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII ) return "draw8";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII ) return "draw8_template";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII ) return "impress8";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII ) return "impress8_template";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII ) return "calc8";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII ) return "calc8_template";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII ) return "chart8";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII ) return "math8";
+ else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII ) return "StarBaseReportChart";
// OOo legacy types
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_WRITER_ASCII ) return "writer_StarOffice_XML_Writer";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_WRITER_TEMPLATE_ASCII ) return "writer_StarOffice_XML_Writer_Template";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII ) return "writer_web_StarOffice_XML_Writer_Web_Template";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII ) return "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_DRAW_ASCII ) return "draw_StarOffice_XML_Draw";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_DRAW_TEMPLATE_ASCII ) return "draw_StarOffice_XML_Draw_Template";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_IMPRESS_ASCII ) return "impress_StarOffice_XML_Impress";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_IMPRESS_TEMPLATE_ASCII ) return "impress_StarOffice_XML_Impress_Template";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_CALC_ASCII ) return "calc_StarOffice_XML_Calc";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_CALC_TEMPLATE_ASCII ) return "calc_StarOffice_XML_Calc_Template";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_CHART_ASCII ) return "chart_StarOffice_XML_Chart";
- else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_MATH_ASCII ) return "math_StarOffice_XML_Math";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_WRITER_ASCII ) return "writer_StarOffice_XML_Writer";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_WRITER_TEMPLATE_ASCII ) return "writer_StarOffice_XML_Writer_Template";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII ) return "writer_web_StarOffice_XML_Writer_Web_Template";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII ) return "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_DRAW_ASCII ) return "draw_StarOffice_XML_Draw";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_DRAW_TEMPLATE_ASCII ) return "draw_StarOffice_XML_Draw_Template";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_IMPRESS_ASCII ) return "impress_StarOffice_XML_Impress";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_IMPRESS_TEMPLATE_ASCII ) return "impress_StarOffice_XML_Impress_Template";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_CALC_ASCII ) return "calc_StarOffice_XML_Calc";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_CALC_TEMPLATE_ASCII ) return "calc_StarOffice_XML_Calc_Template";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_CHART_ASCII ) return "chart_StarOffice_XML_Chart";
+ else if ( aMediaType == MIMETYPE_VND_SUN_XML_MATH_ASCII ) return "math_StarOffice_XML_Math";
// Unknown type
return OUString();
@@ -75,8 +78,8 @@ OUString getInternalFromMediaType(std::u16string_view aMediaType)
}
-StorageFilterDetect::StorageFilterDetect(const uno::Reference<uno::XComponentContext>& xCxt) :
- mxCxt(xCxt) {}
+StorageFilterDetect::StorageFilterDetect(uno::Reference<uno::XComponentContext> xCxt) :
+ mxCxt(std::move(xCxt)) {}
StorageFilterDetect::~StorageFilterDetect() {}
@@ -87,7 +90,7 @@ OUString SAL_CALL StorageFilterDetect::detect(uno::Sequence<beans::PropertyValue
try
{
- uno::Reference< io::XInputStream > xInStream( aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM()], uno::UNO_QUERY );
+ uno::Reference< io::XInputStream > xInStream( aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM], uno::UNO_QUERY );
if ( !xInStream.is() )
return OUString();
@@ -102,6 +105,11 @@ OUString SAL_CALL StorageFilterDetect::detect(uno::Sequence<beans::PropertyValue
OUString aMediaType;
xStorageProperties->getPropertyValue( "MediaType" ) >>= aMediaType;
aTypeName = getInternalFromMediaType( aMediaType );
+ if (comphelper::LibreOfficeKit::isActive() && aTypeName == "draw8_template")
+ {
+ // save it as draw8 instead of template format
+ aTypeName = "draw8";
+ }
}
catch( const lang::WrappedTargetException& aWrap )
@@ -109,46 +117,48 @@ OUString SAL_CALL StorageFilterDetect::detect(uno::Sequence<beans::PropertyValue
packages::zip::ZipIOException aZipException;
// We don't do any type detection on broken packages (f.e. because it might be impossible),
// so for repairing we'll use the requested type, which was detected by the flat detection.
- OUString aRequestedTypeName = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_TYPENAME(), OUString() );
+ OUString aRequestedTypeName = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_TYPENAME, OUString() );
if ( ( aWrap.TargetException >>= aZipException ) && !aRequestedTypeName.isEmpty() )
{
// The package is a broken one.
- uno::Reference< task::XInteractionHandler > xInteraction =
- aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_INTERACTIONHANDLER(), uno::Reference< task::XInteractionHandler >() );
-
- if ( xInteraction.is() )
+ INetURLObject aParser(
+ aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_URL, OUString()));
+ OUString aDocumentTitle = aParser.getName(INetURLObject::LAST_SEGMENT, true,
+ INetURLObject::DecodeMechanism::WithCharset);
+ bool bRepairPackage = aMediaDesc.getUnpackedValueOrDefault("RepairPackage", false);
+ // fdo#46310 Don't ask to repair if the user rejected it once.
+ if (!bRepairPackage && aMediaDesc.getUnpackedValueOrDefault("RepairAllowed", true))
{
- INetURLObject aParser( aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL(), OUString() ) );
- OUString aDocumentTitle = aParser.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
- bool bRepairPackage = aMediaDesc.getUnpackedValueOrDefault( "RepairPackage", false );
- // fdo#46310 Don't try to repair if the user rejected it once.
- bool bRepairAllowed = aMediaDesc.getUnpackedValueOrDefault( "RepairAllowed", true );
+ uno::Reference< task::XInteractionHandler > xInteraction =
+ aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_INTERACTIONHANDLER, uno::Reference< task::XInteractionHandler >() );
- if ( !bRepairPackage && bRepairAllowed )
+ if ( xInteraction.is() )
{
// Ask the user whether he wants to try to repair.
- RequestPackageReparation aRequest( aDocumentTitle );
- xInteraction->handle( aRequest.GetRequest() );
-
- if ( aRequest.isApproved() )
- {
- aTypeName = aRequestedTypeName;
- aMediaDesc[MediaDescriptor::PROP_DOCUMENTTITLE()] <<= aDocumentTitle;
- aMediaDesc[MediaDescriptor::PROP_ASTEMPLATE()] <<= true;
- aMediaDesc["RepairPackage"] <<= true;
- }
- else
+ RequestPackageReparation aRequest(aDocumentTitle);
+ xInteraction->handle(aRequest.GetRequest());
+ bRepairPackage = aRequest.isApproved();
+ if (!bRepairPackage)
{
// Repair either not allowed or not successful.
NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
xInteraction->handle( aNotifyRequest.GetRequest() );
aMediaDesc["RepairAllowed"] <<= false;
}
-
- // Write the changes back.
- aMediaDesc >> rDescriptor;
}
}
+ if (bRepairPackage)
+ {
+ aTypeName = aRequestedTypeName;
+ // lok: we want to overwrite file in jail, so don't use template flag
+ const bool bIsLOK = comphelper::LibreOfficeKit::isActive();
+ aMediaDesc[MediaDescriptor::PROP_DOCUMENTTITLE] <<= aDocumentTitle;
+ aMediaDesc[MediaDescriptor::PROP_ASTEMPLATE] <<= !bIsLOK;
+ aMediaDesc["RepairPackage"] <<= true;
+ }
+
+ // Write the changes back.
+ aMediaDesc >> rDescriptor;
}
}
catch( uno::RuntimeException& )
diff --git a/filter/source/storagefilterdetect/filterdetect.hxx b/filter/source/storagefilterdetect/filterdetect.hxx
index 27556f376297..052e2c2ffd80 100644
--- a/filter/source/storagefilterdetect/filterdetect.hxx
+++ b/filter/source/storagefilterdetect/filterdetect.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_STORAGEFILTERDETECT_FILTERDETECT_HXX
-#define INCLUDED_FILTER_SOURCE_STORAGEFILTERDETECT_FILTERDETECT_HXX
+#pragma once
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -36,7 +35,7 @@ class StorageFilterDetect : public cppu::WeakImplHelper<
public:
- explicit StorageFilterDetect (const css::uno::Reference<css::uno::XComponentContext>& xCxt);
+ explicit StorageFilterDetect (css::uno::Reference<css::uno::XComponentContext> xCxt);
virtual ~StorageFilterDetect() override;
// XExtendedFilterDetection
@@ -54,6 +53,4 @@ public:
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/gentoken.py b/filter/source/svg/gentoken.py
index c78d066d7c97..2ef75fe5dd80 100644
--- a/filter/source/svg/gentoken.py
+++ b/filter/source/svg/gentoken.py
@@ -37,7 +37,7 @@ with open(tokenfile_name) as tokenfile:
tokens[arr[0]] = arr[1].upper()
hxx = open(hxx_name, 'w')
-gperf = open(gperf_name, 'w')
+gperf = open(gperf_name, 'w', newline='\n')
gperf.write(gperf_header)
diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js
index 9bd2936a019d..fa42b89b2f8e 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -32,6 +32,15 @@ var abs = Math.abs;
var now = Date.now;
/**
+ * polyfill for IE11
+ */
+if (!Math.trunc) {
+ Math.trunc = function (v) {
+ return v < 0 ? Math.ceil(v) : Math.floor(v);
+ };
+}
+
+/**
* set a timeout with a given scope
* @param {Function} fn
* @param {Number} timeout
@@ -359,7 +368,7 @@ function uniqueArray(src, key, sort) {
* @returns {String|Undefined} prefixed
*/
function prefixed(obj, property) {
- // tml: Have to check for obj being undefined
+ // tml: Have to check for obj being undefined
if (obj === undefined) {
return undefined;
}
@@ -754,7 +763,7 @@ function getDistance(p1, p2, props) {
var x = p2[props[0]] - p1[props[0]],
y = p2[props[1]] - p1[props[1]];
- return Math.sqrt((x * x) + (y * y));
+ return Math.hypot(x, y);
}
/**
@@ -2747,6 +2756,56 @@ function getElementsByProperty( node, name )
return elements;
}
+// User can hide / show the presentation content.
+// For that purpose, we change the background color of root node to either black or white.
+// To set it back to its original color (for showing the content back), we should have the initial background color saved somewhere to read back.
+// There may be no initial color at all, so the initial value of the saved initial is undefined.
+var rootNodeInitialBackgroundColor = undefined;
+
+function changeRootNodeBackgroundTo(color) {
+ if (rootNodeInitialBackgroundColor === undefined)
+ rootNodeInitialBackgroundColor = ROOT_NODE.style.backgroundColor;
+
+ if (color === 'initial')
+ ROOT_NODE.style.backgroundColor = rootNodeInitialBackgroundColor;
+ else
+ ROOT_NODE.style.backgroundColor = color;
+}
+
+var isContentHidden = false;
+var contentInitialVisibilityValues = null;
+
+function getInitialVisibilityValues() {
+ var list = ROOT_NODE.querySelectorAll('g');
+ contentInitialVisibilityValues = [];
+ for (var i = 0; i < list.length; i++) {
+ var temp = {};
+ temp.object = list[i];
+ temp.visibility = list[i].style.visibility;
+ contentInitialVisibilityValues.push(temp);
+ }
+}
+
+function hideShowContent(color) {
+ if (contentInitialVisibilityValues === null)
+ getInitialVisibilityValues();
+
+ if (isContentHidden) {
+ for (var i = 0; i < contentInitialVisibilityValues.length; i++)
+ contentInitialVisibilityValues[i].object.style.visibility = contentInitialVisibilityValues[i].visibility;
+
+ changeRootNodeBackgroundTo('initial');
+ isContentHidden = false;
+ }
+ else {
+ for (var i = 0; i < contentInitialVisibilityValues.length; i++)
+ contentInitialVisibilityValues[i].object.style.visibility = 'hidden';
+
+ changeRootNodeBackgroundTo(color);
+ isContentHidden = true;
+ }
+}
+
/** Event handler for key press.
*
* @param aEvt the event
@@ -2756,7 +2815,7 @@ function onKeyDown( aEvt )
if ( !aEvt )
aEvt = window.event;
- var code = aEvt.keyCode || aEvt.charCode;
+ var code = aEvt.keyCode || aEvt.charCode || aEvt.code;
// console.log('===> onKeyDown: ' + code);
@@ -2779,6 +2838,20 @@ function onKeyDown( aEvt )
// console.log(' now: ' + code);
}
+ else if (code === P_KEY) {
+ aEvt.preventDefault();
+ if (ROOT_NODE.style.cursor === 'pointer')
+ ROOT_NODE.style.cursor = 'default';
+ else
+ ROOT_NODE.style.cursor = 'pointer';
+ }
+ else if (code === W_KEY) {
+ hideShowContent('white');
+ }
+ else if (code === B_KEY) {
+ hideShowContent('black');
+ }
+
if( !processingEffect && keyCodeDictionary[currentMode] && keyCodeDictionary[currentMode][code] )
{
@@ -4434,8 +4507,10 @@ var aOOOAttrUsePositionedChars = 'use-positioned-chars';
var aOOOAttrSlide = 'slide';
var aOOOAttrMaster = 'master';
+var aOOOAttrDisplayName = 'display-name';
var aOOOAttrSlideDuration = 'slide-duration';
var aOOOAttrHasTransition = 'has-transition';
+var aOOOAttrHasCustomBackground = 'has-custom-background';
var aOOOAttrBackgroundVisibility = 'background-visibility';
var aOOOAttrMasterObjectsVisibility = 'master-objects-visibility';
var aOOOAttrPageNumberVisibility = 'page-number-visibility';
@@ -4453,10 +4528,13 @@ var aOOOAttrTextAdjust = 'text-adjust';
// element class names
var aClipPathGroupClassName = 'ClipPathGroup';
var aPageClassName = 'Page';
-var aSlideNumberClassName = 'Slide_Number';
-var aDateTimeClassName = 'Date/Time';
+var aSlideNumberClassName = 'PageNumber';
+var aDateTimeClassName = 'DateTime';
var aFooterClassName = 'Footer';
var aHeaderClassName = 'Header';
+var aDateClassName = 'Date';
+var aTimeClassName = 'Time';
+var aSlideNameClassName='PageName';
// Creating a namespace dictionary.
var NSS = {};
@@ -4491,7 +4569,10 @@ var END_KEY = 35; // end keycode
var ENTER_KEY = 13;
var SPACE_KEY = 32;
var ESCAPE_KEY = 27;
+var B_KEY = 66;
+var P_KEY = 80;
var Q_KEY = 81;
+var W_KEY = 87;
// Visibility Values
var HIDDEN = 0;
@@ -4771,15 +4852,6 @@ function getRandomInt( nMax )
return Math.floor( Math.random() * nMax );
}
-function isTextFieldElement( aElement ) // eslint-disable-line no-unused-vars
-{
- var sClassName = aElement.getAttribute( 'class' );
- return ( sClassName === aSlideNumberClassName ) ||
- ( sClassName === aFooterClassName ) ||
- ( sClassName === aHeaderClassName ) ||
- ( sClassName === aDateTimeClassName );
-}
-
/*********************
** Debug Utilities **
@@ -4908,6 +4980,8 @@ function MetaDocument()
this.aTextFieldHandlerSet = {};
this.aTextFieldContentProviderSet = [];
this.aSlideNumberProvider = new SlideNumberProvider( this.nStartSlideNumber + 1, this.sPageNumberingType );
+ this.aCurrentDateProvider = new CurrentDateTimeProvider( null, '<date>' );
+ this.aCurrentTimeProvider = new CurrentDateTimeProvider( null, '<time>' );
// We create a map with key an id and value the svg element containing
// the animations performed on the slide with such an id.
@@ -5025,6 +5099,8 @@ function MetaSlide( sMetaSlideId, aMetaDoc )
else
this.nSlideNumber= -1;
+ this.slideName = this.element.getAttributeNS( NSS['ooo'], aOOOAttrDisplayName );
+
// Each slide element is double wrapped by <g> elements.
// The outer <g> element is responsible for
// the slide element visibility. In fact the visibility attribute has
@@ -5056,10 +5132,23 @@ function MetaSlide( sMetaSlideId, aMetaDoc )
assert( this.pageElement,
'MetaSlide: page element <' + this.slideId + '> not found.' );
+ // The slide custom background element and its id attribute.
+ this.backgroundElement = getElementByClassName( this.pageElement, 'Background' );
+ if( this.backgroundElement )
+ {
+ this.backgroundId = this.backgroundElement.getAttribute( 'id' );
+ }
+
+ // We initialize text fields
+ this.initPlaceholderElements();
+
// We initialize the MasterPage object that provides direct access to
// the target master page element.
this.masterPage = this.initMasterPage();
+ // We check if the slide has a custom background which overrides the one of the targeted master page
+ this.bHasCustomBackground = this.initHasCustomBackground();
+
// We initialize visibility properties of the target master page elements.
this.nAreMasterObjectsVisible = this.initVisibilityProperty( aOOOAttrMasterObjectsVisibility, VISIBLE );
this.nIsBackgroundVisible = this.initVisibilityProperty( aOOOAttrBackgroundVisibility, VISIBLE );
@@ -5079,6 +5168,9 @@ function MetaSlide( sMetaSlideId, aMetaDoc )
this.aTextFieldContentProviderSet[aDateTimeClassName] = this.initDateTimeFieldContentProvider( aOOOAttrDateTimeField );
this.aTextFieldContentProviderSet[aFooterClassName] = this.initFixedTextFieldContentProvider( aOOOAttrFooterField );
this.aTextFieldContentProviderSet[aHeaderClassName] = this.initFixedTextFieldContentProvider( aOOOAttrHeaderField );
+ this.aTextFieldContentProviderSet[aDateClassName] = this.theMetaDoc.aCurrentDateProvider;
+ this.aTextFieldContentProviderSet[aTimeClassName] = this.theMetaDoc.aCurrentTimeProvider;
+ this.aTextFieldContentProviderSet[aSlideNameClassName] = new FixedTextProvider( this.slideName );
// We init the slide duration when automatic slide transition is enabled
this.fDuration = this.initSlideDuration();
@@ -5149,6 +5241,24 @@ updateMasterPageView : function()
},
/*** private methods ***/
+
+// It handles a text field inserted on a slide, not on a master page.
+initPlaceholderElements : function()
+{
+ var aPlaceholderList = getElementsByClassName(this.pageElement , 'PlaceholderText' );
+ var i = 0;
+ for( ; i < aPlaceholderList.length; ++i )
+ {
+ var aPlaceholderElem = aPlaceholderList[i];
+ var sClass = aPlaceholderElem.getAttribute('class');
+ var sFieldType = sClass.split(' ')[1];
+ if( sFieldType === aDateClassName)
+ aPlaceholderElem.textContent = new Date().toLocaleDateString();
+ else if( sFieldType === aTimeClassName )
+ aPlaceholderElem.textContent = new Date().toLocaleTimeString();
+ }
+},
+
initMasterPage : function()
{
var sMasterPageId = this.element.getAttributeNS( NSS['ooo'], aOOOAttrMaster );
@@ -5181,6 +5291,12 @@ initHasTransition : function()
return ( sHasTransition === 'true' );
},
+initHasCustomBackground : function()
+{
+ var sHasCustomBackground = this.element.getAttributeNS( NSS['ooo'], aOOOAttrHasCustomBackground );
+ return ( sHasCustomBackground === 'true' );
+},
+
initVisibilityProperty : function( aVisibilityAttribute, nDefaultValue )
{
var nVisibility = nDefaultValue;
@@ -5211,7 +5327,7 @@ initDateTimeFieldContentProvider : function( aOOOAttrDateTimeField )
var sClassName = getClassAttribute( aTextFieldElem );
if( sClassName == 'FixedDateTimeField' )
{
- aTextField = new FixedTextProvider( aTextFieldElem );
+ aTextField = new FixedTextByElementProvider( aTextFieldElem );
this.bIsDateTimeVariable = false;
}
else if( sClassName == 'VariableDateTimeField' )
@@ -5241,7 +5357,7 @@ initFixedTextFieldContentProvider : function( aOOOAttribute )
{
var aTextFieldElem = document.getElementById( sTextFieldId );
this.theMetaDoc.aTextFieldContentProviderSet[ nIndex ]
- = new FixedTextProvider( aTextFieldElem );
+ = new FixedTextByElementProvider( aTextFieldElem );
}
return this.theMetaDoc.aTextFieldContentProviderSet[ nIndex ];
},
@@ -5319,6 +5435,56 @@ getSlideAnimationsRoot : function()
}; // end MetaSlide prototype
+function removeRedundantParagraphFromTextFieldShape( aObject )
+{
+ var aTextElem = getElementByClassName( aObject, 'SVGTextShape' );
+ if( aTextElem )
+ {
+ var aPlaceholderElement = getElementsByClassName(aTextElem, 'PlaceholderText');
+ if( aPlaceholderElement )
+ {
+ var aTextParagraphSet = getElementsByClassName(aTextElem, 'TextParagraph');
+ // When the text field width is too small, the placeholder text spans several lines.
+ // We remove all text lines but the first one which is used as a placeholder.
+ // This is a workaround but it should work in the majority of cases.
+ // A complete solution needs to support svg text wrapping.
+ if( aTextParagraphSet.length > 1 )
+ {
+ var i = aTextParagraphSet.length;
+ while( i > 1 )
+ {
+ aTextElem.removeChild(aTextParagraphSet[i - 1]);
+ --i;
+ }
+ }
+ }
+ }
+}
+
+function getTextFieldType ( elem ) {
+ var sFieldType = null;
+ var sClass = elem.getAttribute('class');
+ if( sClass === 'TextShape' )
+ {
+ var aPlaceholderElement = getElementByClassName(elem, 'PlaceholderText');
+ if( aPlaceholderElement )
+ {
+ var sClassAttr = aPlaceholderElement.getAttribute('class');
+ var classes = sClassAttr.split(' ');
+ sFieldType = classes[1];
+ }
+ }
+ return sFieldType;
+}
+
+function isTextFieldByClassName ( sClassName )
+{
+ return sClassName.indexOf( aDateTimeClassName ) == 0 || sClassName.indexOf( aFooterClassName ) == 0
+ || sClassName.indexOf( aHeaderClassName ) == 0 || sClassName.indexOf( aSlideNumberClassName ) == 0
+ || sClassName.indexOf( aDateClassName ) == 0 || sClassName.indexOf( aTimeClassName ) == 0
+ || sClassName.indexOf( aSlideNameClassName ) == 0;
+}
+
/** Class MasterPage
* This class gives direct access to a master page element and to the following
* elements included in the master page:
@@ -5333,7 +5499,7 @@ getSlideAnimationsRoot : function()
* background image
* </g>
* <g class='BackgroundObjects'>
- * <g class='Date/Time'>
+ * <g class='DateTime'>
* date/time placeholder
* </g>
* <g class='Header'>
@@ -5342,7 +5508,7 @@ getSlideAnimationsRoot : function()
* <g class='Footer'>
* footer placeholder
* </g>
- * <g class='Slide_Number'>
+ * <g class='PageNumber'>
* slide number placeholder
* </g>
* shapes
@@ -5381,6 +5547,7 @@ function MasterPage( sMasterPageId, aMetaSlide )
// The background objects group element that contains every element presents
// on the master page except the background element.
this.backgroundObjects = getElementByClassName( this.element, 'BackgroundObjects' );
+ this.aBackgroundObjectSubGroupIdList = [];
if( this.backgroundObjects )
{
this.backgroundObjectsId = this.backgroundObjects.getAttribute( 'id' );
@@ -5394,13 +5561,33 @@ function MasterPage( sMasterPageId, aMetaSlide )
var nSubGroupId = 1;
var sClass;
var sId = '';
- this.aBackgroundObjectSubGroupIdList = [];
var i = 0;
for( ; i < aBackgroundObjectList.length; ++i )
{
- sClass = aBackgroundObjectList[i].getAttribute( 'class' );
- if( !sClass || ( ( sClass !== aDateTimeClassName ) && ( sClass !== aFooterClassName )
- && ( sClass !== aHeaderClassName ) && ( sClass !== aSlideNumberClassName ) ) )
+ var aObject = aBackgroundObjectList[i];
+ removeRedundantParagraphFromTextFieldShape( aObject );
+ sClass = null;
+ var sFieldType = getTextFieldType( aObject );
+ if( sFieldType && aObject.firstElementChild )
+ {
+ var sObjId = aObject.firstElementChild.getAttribute( 'id' );
+ if( sObjId )
+ {
+ sClass = sFieldType + '.' + sObjId;
+ aObject.setAttribute('class', sClass);
+ }
+ }
+ if( !sClass )
+ {
+ sClass = aBackgroundObjectList[i].getAttribute('class');
+ if( sClass === aDateTimeClassName || sClass === aFooterClassName
+ || sClass === aHeaderClassName || sClass === aSlideNumberClassName)
+ {
+ sClass += '.Default';
+ aObject.setAttribute('class', sClass);
+ }
+ }
+ if( !sClass || !isTextFieldByClassName( sClass ) )
{
if( nCount === 0 )
{
@@ -5444,10 +5631,14 @@ MasterPage.prototype =
initPlaceholderShapes : function()
{
- this.aPlaceholderShapeSet[ aSlideNumberClassName ] = new PlaceholderShape( this, aSlideNumberClassName );
- this.aPlaceholderShapeSet[ aDateTimeClassName ] = new PlaceholderShape( this, aDateTimeClassName );
- this.aPlaceholderShapeSet[ aFooterClassName ] = new PlaceholderShape( this, aFooterClassName );
- this.aPlaceholderShapeSet[ aHeaderClassName ] = new PlaceholderShape( this, aHeaderClassName );
+ var sClassName;
+ var i = 0;
+ for( ; i < this.aBackgroundObjectSubGroupIdList.length; ++i )
+ {
+ sClassName = this.aBackgroundObjectSubGroupIdList[i];
+ if( isTextFieldByClassName( sClassName ) )
+ this.aPlaceholderShapeSet[ sClassName ] = new PlaceholderShape( this, sClassName );
+ }
}
}; // end MasterPage prototype
@@ -5492,70 +5683,101 @@ PlaceholderShape.prototype.isValid = function()
*/
PlaceholderShape.prototype.init = function()
{
-
var aTextFieldElement = getElementByClassName( this.masterPage.backgroundObjects, this.className );
if( aTextFieldElement )
{
- var aPlaceholderElement = getElementByClassName( aTextFieldElement, 'PlaceholderText' );
- if( aPlaceholderElement )
+ var aTextElem = getElementByClassName( aTextFieldElement, 'SVGTextShape' );
+ if( aTextElem )
{
- // Each text field element has an invisible rectangle that can be
- // regarded as the text field bounding box.
- // We exploit such a feature and the exported text adjust attribute
- // value in order to set up correctly the position and text
- // adjustment for the placeholder element.
- var aSVGRectElem = getElementByClassName( aTextFieldElement, 'BoundingBox' );
- if( aSVGRectElem )
+ var aPlaceholderElement = getElementByClassName(aTextElem, 'PlaceholderText');
+ if( aPlaceholderElement )
{
- var aRect = new Rectangle( aSVGRectElem );
- var sTextAdjust = getOOOAttribute( aTextFieldElement, aOOOAttrTextAdjust ) || 'left';
- var sTextAnchor, sX;
- if( sTextAdjust == 'left' )
- {
- sTextAnchor = 'start';
- sX = String( aRect.left );
- }
- else if( sTextAdjust == 'right' )
- {
- sTextAnchor = 'end';
- sX = String( aRect.right );
- }
- else if( sTextAdjust == 'center' )
+ // SVG 1.1 does not support text wrapping wrt a rectangle.
+ // When a text shape contains a placeholder, setting up the position
+ // of each text line doesn't work since the position is computed
+ // before replacing the placeholder text.
+ // Anyway each text shape has an invisible rectangle that can be
+ // regarded as the text shape bounding box.
+ // We exploit such a feature and the exported text adjust attribute
+ // value in order to set up correctly the position and text
+ // adjustment for the text shape content.
+ // We assume that once the real value has been substituted to
+ // the placeholder the resulting content is no more than a single line.
+ // So we remove from <tspan> elements used for setting up the
+ // position of text lines (class TextPosition) the 'x' and 'y' attribute.
+ // In the general case we would need to implement a function
+ // which is able to compute at which words the text shape content has
+ // to be wrapped.
+ var aSVGRectElem = getElementByClassName( aTextFieldElement, 'BoundingBox' );
+ if( aSVGRectElem )
{
- sTextAnchor = 'middle';
- var nMiddle = ( aRect.left + aRect.right ) / 2;
- sX = String( parseInt( String( nMiddle ) ) );
+ var aRect = new Rectangle( aSVGRectElem );
+ var sTextAdjust = getOOOAttribute( aTextFieldElement, aOOOAttrTextAdjust );
+ // the bbox of the text shape is indeed a bit larger, there is a bit of internal padding
+ var nMargin = 250; // 1000th mm
+ var sTextAnchor, sX;
+ if( sTextAdjust == 'left' )
+ {
+ sTextAnchor = 'start';
+ sX = String( Math.trunc( aRect.left + nMargin ) );
+ }
+ else if( sTextAdjust == 'right' )
+ {
+ sTextAnchor = 'end';
+ sX = String( Math.trunc( aRect.right - nMargin ) );
+ }
+ else if( sTextAdjust == 'center' )
+ {
+ sTextAnchor = 'middle';
+ var nMiddle = ( aRect.left + aRect.right ) / 2;
+ sX = String( parseInt( String( nMiddle ) ) );
+ }
+ if( sTextAnchor )
+ {
+ aTextElem.setAttribute( 'text-anchor', sTextAnchor );
+ if( sX )
+ aTextElem.setAttribute( 'x', sX );
+
+ var aTSpanElements = getElementsByClassName( aTextElem, 'TextPosition' );
+ if( aTSpanElements )
+ {
+ var i = 0;
+ for( ; i < aTSpanElements.length; ++i )
+ {
+ var aTSpanElem = aTSpanElements[i];
+ aTSpanElem.removeAttribute( 'x' );
+ if( i !== 0 )
+ aTSpanElem.removeAttribute( 'y' );
+ }
+ }
+ }
}
- if( sTextAnchor )
- aPlaceholderElement.setAttribute( 'text-anchor', sTextAnchor );
- if( sX )
- aPlaceholderElement.setAttribute( 'x', sX );
- }
- // date/time fields were not exported correctly when positioned chars are used
- if( this.masterPage.metaSlide.theMetaDoc.bIsUsePositionedChars )
- {
- // We remove all text lines but the first one used as placeholder.
- var aTextLineGroupElem = aPlaceholderElement.parentNode.parentNode;
- if( aTextLineGroupElem )
+ // date/time fields were not exported correctly when positioned chars are used
+ if( this.masterPage.metaSlide.theMetaDoc.bIsUsePositionedChars )
{
- // Just to be sure it is the element we are looking for.
- var sFontFamilyAttr = aTextLineGroupElem.getAttribute( 'font-family' );
- if( sFontFamilyAttr )
+ // We remove all text lines but the first one used as placeholder.
+ var aTextLineGroupElem = aPlaceholderElement.parentNode.parentNode;
+ if( aTextLineGroupElem )
{
- var aChildSet = getElementChildren( aTextLineGroupElem );
- if( aChildSet.length > 1 )
- var i = 1;
- for( ; i < aChildSet.length; ++i )
+ // Just to be sure it is the element we are looking for.
+ var sFontFamilyAttr = aTextLineGroupElem.getAttribute( 'font-family' );
+ if( sFontFamilyAttr )
{
- aTextLineGroupElem.removeChild( aChildSet[i] );
+ var aChildSet = getElementChildren( aTextLineGroupElem );
+ if( aChildSet.length > 1 )
+ var i = 1;
+ for( ; i < aChildSet.length; ++i )
+ {
+ aTextLineGroupElem.removeChild( aChildSet[i] );
+ }
}
}
}
+ this.textElement = aPlaceholderElement;
}
- this.element = aTextFieldElement;
- this.textElement = aPlaceholderElement;
}
+ this.element = aTextFieldElement;
}
};
@@ -5570,10 +5792,10 @@ PlaceholderShape.prototype.init = function()
* <use class='Background'> // reference to master page background element
* <g class='BackgroundObjects'>
* <use class='BackgroundObjectSubGroup'> // reference to the group of shapes on the master page that are below text fields
- * <g class='Slide_Number'> // a cloned element
+ * <g class='PageNumber'> // a cloned element
* ...
* </g>
- * <use class='Date/Time'> // reference to a clone
+ * <use class='DateTime'> // reference to a clone
* <use class='Footer'>
* <use class='Header'>
* <use class='BackgroundObjectSubGroup'> // reference to the group of shapes on the master page that are above text fields
@@ -5660,10 +5882,11 @@ MasterPageView.prototype.createElement = function()
// init the Background element
if( this.aMetaSlide.nIsBackgroundVisible )
{
+ var nBackgroundId = this.aMetaSlide.bHasCustomBackground ? this.aMetaSlide.backgroundId : this.aMasterPage.backgroundId;
this.aBackgroundElement = theDocument.createElementNS( NSS['svg'], 'use' );
this.aBackgroundElement.setAttribute( 'class', 'Background' );
setNSAttribute( 'xlink', this.aBackgroundElement,
- 'href', '#' + this.aMasterPage.backgroundId );
+ 'href', '#' + nBackgroundId );
// node linking
aMasterPageViewElement.appendChild( this.aBackgroundElement );
@@ -5690,57 +5913,71 @@ MasterPageView.prototype.createElement = function()
for( ; i < aBackgroundObjectSubGroupIdList.length; ++i )
{
sId = aBackgroundObjectSubGroupIdList[i];
- if( sId === aSlideNumberClassName )
+ if( sId.indexOf( aSlideNumberClassName ) == 0 )
{
// Slide Number Field
// The cloned element is appended directly to the field group element
// since there is no slide number field content shared between two slide
// (because the slide number of two slide is always different).
- if( aPlaceholderShapeSet[aSlideNumberClassName] &&
- aPlaceholderShapeSet[aSlideNumberClassName].isValid() &&
- this.aMetaSlide.nIsPageNumberVisible &&
+ var nIsPageNumberVisible = sId === (aSlideNumberClassName + '.Default') ? this.aMetaSlide.nIsPageNumberVisible : true;
+ if( aPlaceholderShapeSet[sId] &&
+ aPlaceholderShapeSet[sId].isValid() &&
+ nIsPageNumberVisible &&
aTextFieldContentProviderSet[aSlideNumberClassName] )
{
- this.aSlideNumberFieldHandler =
- new SlideNumberFieldHandler( aPlaceholderShapeSet[aSlideNumberClassName],
- aTextFieldContentProviderSet[aSlideNumberClassName] );
- this.aSlideNumberFieldHandler.update( this.aMetaSlide.nSlideNumber );
- this.aSlideNumberFieldHandler.appendTo( this.aBackgroundObjectsElement );
+ var aSlideNumberFieldHandler =
+ new SlideNumberFieldHandler( aPlaceholderShapeSet[sId],
+ aTextFieldContentProviderSet[aSlideNumberClassName] );
+ aSlideNumberFieldHandler.update( this.aMetaSlide.nSlideNumber );
+ aSlideNumberFieldHandler.appendTo( this.aBackgroundObjectsElement );
+ if ( sId === aSlideNumberClassName + '.Default' )
+ this.aSlideNumberFieldHandler = aSlideNumberFieldHandler;
}
}
- else if( sId === aDateTimeClassName )
+ else if( sId === aDateTimeClassName + '.Default' )
{
- // Date/Time field
+ // DateTime field
if( this.aMetaSlide.nIsDateTimeVisible )
{
this.aDateTimeFieldHandler =
- this.initTextFieldHandler( aDateTimeClassName, aPlaceholderShapeSet,
+ this.initTextFieldHandler( sId, aPlaceholderShapeSet,
aTextFieldContentProviderSet, aDefsElement,
aTextFieldHandlerSet, sMasterSlideId );
}
}
- else if( sId === aFooterClassName )
+ else if( sId === aFooterClassName + '.Default' )
{
// Footer Field
if( this.aMetaSlide.nIsFooterVisible )
{
this.aFooterFieldHandler =
- this.initTextFieldHandler( aFooterClassName, aPlaceholderShapeSet,
+ this.initTextFieldHandler( sId, aPlaceholderShapeSet,
aTextFieldContentProviderSet, aDefsElement,
aTextFieldHandlerSet, sMasterSlideId );
}
}
- else if( sId === aHeaderClassName )
+ else if( sId === aHeaderClassName + '.Default' )
{
// Header Field
if( this.aMetaSlide.nIsHeaderVisible )
{
this.aHeaderFieldHandler =
- this.initTextFieldHandler( aHeaderClassName, aPlaceholderShapeSet,
+ this.initTextFieldHandler( sId, aPlaceholderShapeSet,
aTextFieldContentProviderSet, aDefsElement,
aTextFieldHandlerSet, sMasterSlideId );
}
}
+ else if( sId.indexOf( aDateTimeClassName ) == 0
+ || sId.indexOf( aFooterClassName ) == 0
+ || sId.indexOf( aHeaderClassName ) == 0
+ || sId.indexOf( aDateClassName ) == 0
+ || sId.indexOf( aTimeClassName ) == 0
+ || sId.indexOf( aSlideNameClassName ) == 0 )
+ {
+ this.initTextFieldHandler( sId, aPlaceholderShapeSet,
+ aTextFieldContentProviderSet, aDefsElement,
+ aTextFieldHandlerSet, sMasterSlideId );
+ }
else
{
// init BackgroundObjectSubGroup elements
@@ -5762,37 +5999,49 @@ MasterPageView.prototype.createElement = function()
};
MasterPageView.prototype.initTextFieldHandler =
- function( sClassName, aPlaceholderShapeSet, aTextFieldContentProviderSet,
+ function( sId, aPlaceholderShapeSet, aTextFieldContentProviderSet,
aDefsElement, aTextFieldHandlerSet, sMasterSlideId )
{
+ var sRefId = null;
var aTextFieldHandler = null;
- if( aPlaceholderShapeSet[sClassName] &&
- aPlaceholderShapeSet[sClassName].isValid()
- && aTextFieldContentProviderSet[sClassName] )
+ var sClassName = sId.split('.')[0];
+ var aPlaceholderShape = aPlaceholderShapeSet[sId];
+ var aTextFieldContentProvider = aTextFieldContentProviderSet[sClassName];
+ if( aPlaceholderShape && aPlaceholderShape.isValid()
+ && aTextFieldContentProvider )
{
- var sTextFieldContentProviderId = aTextFieldContentProviderSet[sClassName].sId;
+ var sTextFiedHandlerKey = aTextFieldContentProvider.sId + '.' + sId;
// We create only one single TextFieldHandler object (and so one only
// text field clone) per master slide and text content.
- if ( !aTextFieldHandlerSet[ sMasterSlideId ][ sTextFieldContentProviderId ] )
+ if ( !aTextFieldHandlerSet[ sMasterSlideId ][ sTextFiedHandlerKey ] )
{
- aTextFieldHandlerSet[ sMasterSlideId ][ sTextFieldContentProviderId ] =
- new TextFieldHandler( aPlaceholderShapeSet[sClassName],
- aTextFieldContentProviderSet[sClassName] );
- aTextFieldHandler = aTextFieldHandlerSet[ sMasterSlideId ][ sTextFieldContentProviderId ];
+ aTextFieldHandlerSet[ sMasterSlideId ][ sTextFiedHandlerKey ] =
+ new TextFieldHandler( aPlaceholderShape,
+ aTextFieldContentProvider );
+ aTextFieldHandler = aTextFieldHandlerSet[ sMasterSlideId ][ sTextFiedHandlerKey ];
aTextFieldHandler.update();
aTextFieldHandler.appendTo( aDefsElement );
}
else
{
- aTextFieldHandler = aTextFieldHandlerSet[ sMasterSlideId ][ sTextFieldContentProviderId ];
+ aTextFieldHandler = aTextFieldHandlerSet[ sMasterSlideId ][ sTextFiedHandlerKey ];
}
+ sRefId = aTextFieldHandler.sId;
+ }
+ else if( aPlaceholderShape && aPlaceholderShape.element && aPlaceholderShape.element.firstElementChild
+ && !aPlaceholderShape.textElement && !aTextFieldContentProvider )
+ {
+ sRefId = aPlaceholderShape.element.firstElementChild.getAttribute('id');
+ }
+ if( sRefId )
+ {
// We create a <use> element referring to the cloned text field and
// append it to the field group element.
- var aTextFieldElement = document.createElementNS( NSS['svg'], 'use' );
- aTextFieldElement.setAttribute( 'class', sClassName );
- setNSAttribute( 'xlink', aTextFieldElement,
- 'href', '#' + aTextFieldHandler.sId );
+ var aTextFieldElement = document.createElementNS(NSS['svg'], 'use');
+ aTextFieldElement.setAttribute('class', sClassName);
+ setNSAttribute('xlink', aTextFieldElement,
+ 'href', '#' + sRefId);
// node linking
this.aBackgroundObjectsElement.appendChild( aTextFieldElement );
}
@@ -5955,25 +6204,32 @@ SlideNumberFieldHandler.prototype.update = function( nPageNumber )
* The svg element that contains the text content for one or more
* master slide text field.
*/
-function TextFieldContentProvider( aTextFieldContentElement )
+function TextFieldContentProvider()
{
- // This id is used as key for the theMetaDoc.aTextFieldHandlerSet object.
- if( aTextFieldContentElement )
- this.sId = aTextFieldContentElement.getAttribute( 'id' );
+ this.sId = TextFieldContentProvider.getUniqueId();
}
+/*** private methods ***/
+
+TextFieldContentProvider.CURR_UNIQUE_ID = 0;
+
+TextFieldContentProvider.getUniqueId = function()
+{
+ ++TextFieldContentProvider.CURR_UNIQUE_ID;
+ return TextFieldContentProvider.CURR_UNIQUE_ID;
+};
+
/** Class FixedTextProvider
* This class handles text field with a fixed text.
* The text content is provided by the 'text' property.
*
- * @param aTextFieldContentElement
- * The svg element that contains the text content for one or more
- * master slide text field.
+ * @param aText
+ * a string containing the text to be substituted.
*/
-function FixedTextProvider( aTextFieldContentElement )
+function FixedTextProvider( aText )
{
- FixedTextProvider.superclass.constructor.call( this, aTextFieldContentElement );
- this.text = aTextFieldContentElement.textContent;
+ FixedTextProvider.superclass.constructor.call( this );
+ this.text = aText;
}
extend( FixedTextProvider, TextFieldContentProvider );
@@ -5991,6 +6247,20 @@ FixedTextProvider.prototype.update = function( aFixedTextField )
aFixedTextField.setTextContent( this.text );
};
+/** Class FixedTextByElementProvider
+ * This class handles text field with a fixed text.
+ * The text content is provided by the 'text' property.
+ *
+ * @param aTextFieldContentElement
+ * The svg element that contains the text content for one or more
+ * master slide text field.
+ */
+function FixedTextByElementProvider( aTextFieldContentElement )
+{
+ FixedTextByElementProvider.superclass.constructor.call( this, aTextFieldContentElement.textContent );
+}
+extend( FixedTextByElementProvider, FixedTextProvider );
+
/** Class CurrentDateTimeProvider
* Provide the text content to a date/time field by generating the current
* date/time in the format specified by the 'dateTimeFormat' property.
@@ -5999,10 +6269,15 @@ FixedTextProvider.prototype.update = function( aFixedTextField )
* The svg element that contains the date/time format for one or more
* master slide date/time field.
*/
-function CurrentDateTimeProvider( aTextFieldContentElement )
+function CurrentDateTimeProvider( aTextFieldContentElement, sDateTimeFormat )
{
CurrentDateTimeProvider.superclass.constructor.call( this, aTextFieldContentElement );
- this.dateTimeFormat = getOOOAttribute( aTextFieldContentElement, aOOOAttrDateTimeFormat );
+ if( aTextFieldContentElement )
+ this.dateTimeFormat = getOOOAttribute( aTextFieldContentElement, aOOOAttrDateTimeFormat );
+ else
+ {
+ this.dateTimeFormat = sDateTimeFormat;
+ }
}
extend( CurrentDateTimeProvider, TextFieldContentProvider );
@@ -6017,17 +6292,22 @@ extend( CurrentDateTimeProvider, TextFieldContentProvider );
*/
CurrentDateTimeProvider.prototype.update = function( aDateTimeField )
{
- var sText = this.createDateTimeText( this.dateTimeFormat );
+ var sText = this.createDateTimeText();
aDateTimeField.setTextContent( sText );
};
/*** private methods ***/
-CurrentDateTimeProvider.prototype.createDateTimeText = function( /*sDateTimeFormat*/ )
+CurrentDateTimeProvider.prototype.createDateTimeText = function()
{
// TODO handle date/time format
- var aDate = new Date();
- var sDate = aDate.toLocaleString();
+ var sDate;
+ if( this.dateTimeFormat === '<date>' )
+ sDate = new Date().toLocaleDateString();
+ else if( this.dateTimeFormat === '<time>' )
+ sDate = new Date().toLocaleTimeString();
+ else
+ sDate = new Date().toLocaleDateString();
return sDate;
};
@@ -6037,7 +6317,7 @@ CurrentDateTimeProvider.prototype.createDateTimeText = function( /*sDateTimeForm
*/
function SlideNumberProvider( nInitialSlideNumber, sPageNumberingType )
{
- SlideNumberProvider.superclass.constructor.call( this, null );
+ SlideNumberProvider.superclass.constructor.call( this );
this.nInitialSlideNumber = nInitialSlideNumber;
this.pageNumberingType = sPageNumberingType;
@@ -6841,6 +7121,8 @@ function matrixToString( aSVGMatrix )
// eslint-disable-next-line no-unused-vars
function numberParser( sValue )
{
+ if( typeof sValue !== 'string' )
+ return undefined;
if( sValue === '.' )
return undefined;
var reFloatNumber = /^[+-]?[0-9]*[.]?[0-9]*$/;
@@ -6853,6 +7135,9 @@ function numberParser( sValue )
function booleanParser( sValue )
{
+ if( typeof sValue !== 'string' )
+ return undefined;
+
sValue = sValue.toLowerCase();
if( sValue === 'true' )
return true;
@@ -6864,6 +7149,9 @@ function booleanParser( sValue )
function colorParser( sValue )
{
+ if( typeof sValue !== 'string' )
+ return undefined;
+
// The following 3 color functions are used in evaluating sValue string
// so don't remove them.
@@ -7797,6 +8085,7 @@ var ENUM_PROPERTY = 2;
var COLOR_PROPERTY = 3;
var STRING_PROPERTY = 4;
var BOOL_PROPERTY = 5;
+var TUPLE_NUMBER_PROPERTY = 6;
var aValueTypeOutMap = [ 'unknown', 'number', 'enum', 'color', 'string', 'boolean' ];
@@ -7814,6 +8103,14 @@ var aAttributeMap =
'get': 'getOpacity',
'set': 'setOpacity' },
+ 'scale': { 'type': TUPLE_NUMBER_PROPERTY,
+ 'get': 'getSize',
+ 'set': 'setSize' },
+
+ 'translate': { 'type': TUPLE_NUMBER_PROPERTY,
+ 'get': 'getPos',
+ 'set': 'setPos' },
+
'rotate': { 'type': NUMBER_PROPERTY,
'get': 'getRotationAngle',
'set': 'setRotationAngle' },
@@ -11382,6 +11679,70 @@ PropertyAnimationNode.prototype.createActivity = function()
+function isValidTransformation( sType )
+{
+ return ( sType === 'translate' || sType === 'scale' || sType === 'rotate'
+ || sType === 'skewX' || sType === 'skewY' );
+}
+
+function AnimationTransformNode( aAnimElem, aParentNode, aNodeContext )
+{
+ AnimationTransformNode.superclass.constructor.call( this, aAnimElem, aParentNode, aNodeContext );
+
+ this.sClassName = 'AnimationTransformNode';
+}
+extend( AnimationTransformNode, AnimationBaseNode3 );
+
+
+AnimationTransformNode.prototype.parseElement = function()
+{
+ var bRet = AnimationTransformNode.superclass.parseElement.call(this);
+
+ var aAnimElem = this.aElement;
+
+ // transformation type
+ var sTransformType = aAnimElem.getAttribute( 'svg:type' );
+ if( !isValidTransformation( sTransformType ) )
+ {
+ this.eCurrentState = INVALID_NODE;
+ log( 'AnimationTransformNode.parseElement: transformation type not found: ' + sTransformType );
+ }
+ else
+ {
+ this.sAttributeName = sTransformType;
+ }
+
+ return bRet;
+}
+
+AnimationTransformNode.prototype.createActivity = function()
+{
+ var aActivityParamSet = this.fillActivityParams();
+ var aAnimation;
+
+ if( this.getAttributeName() === 'scale' || this.getAttributeName() === 'translate' )
+ {
+ aAnimation = createPairPropertyAnimation( this.getAttributeName(),
+ this.getAnimatedElement(),
+ this.aNodeContext.aSlideWidth,
+ this.aNodeContext.aSlideHeight );
+
+ }
+ else
+ {
+ aAnimation = createPropertyAnimation( this.getAttributeName(),
+ this.getAnimatedElement(),
+ this.aNodeContext.aSlideWidth,
+ this.aNodeContext.aSlideHeight );
+ }
+
+ var aInterpolator = null; // createActivity will compute it;
+ return createActivity( aActivityParamSet, this, aAnimation, aInterpolator );
+};
+
+
+
+
function AnimationSetNode( aAnimElem, aParentNode, aNodeContext )
{
AnimationSetNode.superclass.constructor.call( this, aAnimElem, aParentNode, aNodeContext );
@@ -11680,10 +12041,8 @@ function createAnimationNode( aElement, aParentNode, aNodeContext )
aCreatedNode = new AnimationColorNode( aElement, aParentNode, aNodeContext );
break;
case ANIMATION_NODE_ANIMATETRANSFORM:
- //aCreatedNode = new AnimationTransformNode( aElement, aParentNode, aNodeContext );
- //break;
- log( 'createAnimationNode: ANIMATETRANSFORM not implemented' );
- return null;
+ aCreatedNode = new AnimationTransformNode( aElement, aParentNode, aNodeContext );
+ break;
case ANIMATION_NODE_TRANSITIONFILTER:
aCreatedNode = new AnimationTransitionFilterNode( aElement, aParentNode, aNodeContext );
break;
@@ -11806,6 +12165,41 @@ function createPropertyAnimation( sAttrName, aAnimatedElement, nWidth, nHeight )
+function createPairPropertyAnimation( sTransformType, aAnimatedElement, nWidth, nHeight )
+{
+ var aFunctorSet = aAttributeMap[ sTransformType ];
+ var sGetValueMethod = aFunctorSet.get;
+ var sSetValueMethod = aFunctorSet.set;
+
+ var aDefaultValue = [];
+ var aSizeReference = [];
+ if( sTransformType === 'scale' )
+ {
+ aDefaultValue[0] = aSizeReference[0] = aAnimatedElement.getBaseBBox().width;
+ aDefaultValue[1] = aSizeReference[1] = aAnimatedElement.getBaseBBox().height;
+ }
+ else if( sTransformType === 'translate' )
+ {
+ aDefaultValue[0] = aAnimatedElement.getBaseCenterX();
+ aDefaultValue[1] = aAnimatedElement.getBaseCenterY();
+ aSizeReference[0] = nWidth;
+ aSizeReference[1] = nHeight;
+ }
+ else
+ {
+ log( 'createPairPropertyAnimation: transform type is not handled' );
+ return null;
+ }
+
+ return new TupleAnimation( bind( aAnimatedElement, aAnimatedElement[ sGetValueMethod ] ),
+ bind( aAnimatedElement, aAnimatedElement[ sSetValueMethod ] ),
+ aDefaultValue,
+ aSizeReference );
+}
+
+
+
+
/** createShapeTransition
*
* @param aActivityParamSet
@@ -12005,6 +12399,45 @@ GenericAnimation.prototype.getUnderlyingValue = function()
+function TupleAnimation( aGetValueFunc, aSetValueFunc, aDefaultValue, aReferenceSize )
+{
+ TupleAnimation.superclass.constructor.call( this, aGetValueFunc, aSetValueFunc );
+ assert( aDefaultValue && aReferenceSize,
+ 'TupleAnimation constructor: default value functor and/or reference size are not valid' );
+
+ this.aDefaultValue = aDefaultValue;
+ this.aReferenceSize = aReferenceSize;
+}
+extend( TupleAnimation, GenericAnimation );
+
+TupleAnimation.prototype.perform = function( aNormValue )
+{
+ assert(aNormValue.length === this.aReferenceSize.length);
+
+ var aValue = [];
+ for( var i = 0; i < aNormValue.length; ++i )
+ {
+ aValue.push( aNormValue[i] * this.aReferenceSize[i] );
+ }
+
+ this.aSetValueFunc( aValue );
+};
+
+TupleAnimation.prototype.getUnderlyingValue = function()
+{
+ var aValue = this.aGetValueFunc();
+ assert(aValue.length === this.aReferenceSize.length);
+
+ var aNormValue = [];
+ for( var i = 0; i < aValue.length; ++i )
+ {
+ aNormValue.push( aValue[i] / this.aReferenceSize[i] );
+ }
+
+ return aNormValue;
+};
+
+
function HSLAnimationWrapper( aColorAnimation )
{
@@ -14322,6 +14755,11 @@ AnimatedElement.prototype.getY = function()
return this.nCenterY;
};
+AnimatedElement.prototype.getPos = function()
+{
+ return [this.getX(), this.getY()];
+};
+
AnimatedElement.prototype.getWidth = function()
{
return this.nScaleFactorX * this.getBaseBBox().width;
@@ -14332,6 +14770,11 @@ AnimatedElement.prototype.getHeight = function()
return this.nScaleFactorY * this.getBaseBBox().height;
};
+AnimatedElement.prototype.getSize = function()
+{
+ return [this.getWidth(), this.getHeight()];
+};
+
AnimatedElement.prototype.updateTransformAttribute = function()
{
this.aTransformAttrList = this.aActiveElement.transform.baseVal;
@@ -14361,12 +14804,27 @@ AnimatedElement.prototype.setY = function( nNewCenterY )
this.nCenterY = nNewCenterY;
};
+AnimatedElement.prototype.setPos = function( aNewPos )
+{
+ var nNewCenterX = aNewPos[0];
+ var nNewCenterY = aNewPos[1];
+
+ if( nNewCenterX === this.nCenterX && nNewCenterY === this.nCenterY ) return;
+
+ this.aTransformAttrList = this.aActiveElement.transform.baseVal;
+ this.aTransformAttr = this.aTransformAttrList.getItem( 0 );
+ this.aTMatrix = this.aTransformAttr.matrix.translate( nNewCenterX - this.nCenterX, nNewCenterY - this.nCenterY );
+ this.aTransformAttr.setMatrix( this.aTMatrix );
+ this.nCenterX = nNewCenterX;
+ this.nCenterY = nNewCenterY;
+};
+
AnimatedElement.prototype.setWidth = function( nNewWidth )
{
ANIMDBG.print( 'AnimatedElement.setWidth: nNewWidth = ' + nNewWidth );
if( nNewWidth < 0 )
{
- log('AnimatedElement(' + this.getId() + ').setWidth: negative height!');
+ log('AnimatedElement(' + this.getId() + ').setWidth: negative width!');
nNewWidth = 0;
}
@@ -14411,6 +14869,43 @@ AnimatedElement.prototype.setHeight = function( nNewHeight )
this.nScaleFactorY = nScaleFactorY;
};
+AnimatedElement.prototype.setSize= function( aNewSize )
+{
+ var nNewWidth = aNewSize[0];
+ var nNewHeight = aNewSize[1];
+ ANIMDBG.print( 'AnimatedElement.setSize: = [' + nNewWidth + ',' + nNewHeight + ']');
+ if( nNewWidth < 0 )
+ {
+ log('AnimatedElement(' + this.getId() + ').setSize: negative width!');
+ nNewWidth = 0;
+ }
+ if( nNewHeight < 0 )
+ {
+ log('AnimatedElement(' + this.getId() + ').setSize: negative height!');
+ nNewHeight = 0;
+ }
+
+ var nBaseWidth = this.getBaseBBox().width;
+ var nScaleFactorX = nNewWidth / nBaseWidth;
+ if( nScaleFactorX < 1e-5 ) nScaleFactorX = 1e-5;
+
+ var nBaseHeight = this.getBaseBBox().height;
+ var nScaleFactorY = nNewHeight / nBaseHeight;
+ if( nScaleFactorY < 1e-5 ) nScaleFactorY = 1e-5;
+
+ if( nScaleFactorX == this.nScaleFactorX && nScaleFactorY == this.nScaleFactorY ) return;
+
+ this.aTMatrix = document.documentElement.createSVGMatrix()
+ .translate( this.nCenterX, this.nCenterY )
+ .rotate(this.nRotationAngle)
+ .scaleNonUniform( nScaleFactorX, nScaleFactorY )
+ .translate( -this.nBaseCenterX, -this.nBaseCenterY );
+ this.updateTransformAttribute();
+
+ this.nScaleFactorX = nScaleFactorX;
+ this.nScaleFactorY = nScaleFactorY;
+};
+
AnimatedElement.prototype.getOpacity = function()
{
return this.aActiveElement.getAttribute( 'opacity' );
@@ -14573,7 +15068,7 @@ function AnimatedTextElement( aElement, aEventMultiplexer )
}
var aTextShapeElement = aElement.parentNode;
sTextType = aTextShapeElement.getAttribute( 'class' );
- if( sTextType !== 'TextShape' )
+ if( sTextType !== 'SVGTextShape' )
{
log( 'AnimatedTextElement: element parent is not a text shape.' );
return;
@@ -14615,7 +15110,7 @@ function AnimatedTextElement( aElement, aEventMultiplexer )
if( aBulletPlaceholderElem )
{
var sId = aBulletPlaceholderElem.getAttribute( 'id' );
- sId = 'bullet-char(' + sId + ')';
+ sId = 'bullet-char-' + sId;
aBulletCharElem = theDocument.getElementById( sId );
if( aBulletCharElem )
{
@@ -16144,6 +16639,17 @@ aInterpolatorHandler.aLerpFunctorMap[ CALC_MODE_LINEAR ][ COLOR_PROPERTY ][ COLO
};
};
+aInterpolatorHandler.aLerpFunctorMap[ CALC_MODE_LINEAR ][ TUPLE_NUMBER_PROPERTY ] =
+ function ( aFrom, aTo, nT )
+ {
+ var aRes = [];
+ for( var i = 0; i < aFrom.length; ++i )
+ {
+ aRes.push( ( 1.0 - nT )* aFrom[i] + nT * aTo[i] );
+ }
+ return aRes;
+ };
+
@@ -16311,6 +16817,36 @@ aOperatorSetMap[ STRING_PROPERTY ] = aOperatorSetMap[ ENUM_PROPERTY ];
// bool operators
aOperatorSetMap[ BOOL_PROPERTY ] = aOperatorSetMap[ ENUM_PROPERTY ];
+// tuple number operators
+aOperatorSetMap[ TUPLE_NUMBER_PROPERTY ] = {};
+
+aOperatorSetMap[ TUPLE_NUMBER_PROPERTY ].equal = function( a, b )
+{
+ assert( a.length === b.length, 'Tuples length mismatch.' );
+ return ( a.toString() === b.toString() );
+};
+
+aOperatorSetMap[ TUPLE_NUMBER_PROPERTY ].add = function( a, b )
+{
+ assert( a.length === b.length, 'Tuples length mismatch.' );
+ var r = [];
+ for( var i = 0; i < a.length; ++i )
+ {
+ r.push(a[i] + b[i]);
+ }
+ return r;
+};
+
+aOperatorSetMap[ TUPLE_NUMBER_PROPERTY ].scale = function( k, v )
+{
+ var r = [];
+ for( var i = 0; i < v.length; ++i )
+ {
+ r.push(k * v[i]);
+ }
+ return r;
+};
+
@@ -17720,6 +18256,22 @@ function extractAttributeValues( eValueType, aValueList, aValueSet, aBBox, nSlid
aValueList.push( aValue );
}
break;
+ case TUPLE_NUMBER_PROPERTY :
+ for( i = 0; i < aValueSet.length; ++i )
+ {
+ if( typeof aValueSet[i] === 'string' )
+ {
+ var aTuple = aValueSet[i].split(',');
+ aValue = [];
+ evalValuesAttribute(aValue, aTuple, aBBox, nSlideWidth, nSlideHeight);
+ aValueList.push(aValue);
+ }
+ else
+ {
+ aValueList.push( undefined );
+ }
+ }
+ break;
default:
log( 'createValueListActivity: unexpected value type: ' + eValueType );
}
@@ -17742,9 +18294,12 @@ function evalValuesAttribute( aValueList, aValueSet, aBBox, nSlideWidth, nSlideH
for( var i = 0; i < aValueSet.length; ++i )
{
var sValue = aValueSet[i];
- sValue = sValue.replace(reMath, 'Math.$&');
- sValue = sValue.replace(/pi(?!\w)/g, 'Math.PI');
- sValue = sValue.replace(/e(?!\w)/g, 'Math.E');
+ if(sValue)
+ {
+ sValue = sValue.replace(reMath, 'Math.$&');
+ sValue = sValue.replace(/pi(?!\w)/g, 'Math.PI');
+ sValue = sValue.replace(/e(?!\w)/g, 'Math.E');
+ }
var aValue = eval( sValue );
aValueList.push( aValue );
}
@@ -18430,8 +18985,8 @@ SlideShow.prototype.exitSlideShowInApp = function()
{
if (window.webkit !== undefined &&
window.webkit.messageHandlers !== undefined &&
- window.webkit.messageHandlers.lool !== undefined)
- window.webkit.messageHandlers.lool.postMessage('EXITSLIDESHOW', '*');
+ window.webkit.messageHandlers.lok !== undefined)
+ window.webkit.messageHandlers.lok.postMessage('EXITSLIDESHOW', '*');
}
SlideShow.prototype.displaySlide = function( nNewSlide, bSkipSlideTransition )
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index eb5da674e6c3..c6325f282a2e 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <strings.hrc>
#include "svgwriter.hxx"
#include "svgfontexport.hxx"
#include "svgfilter.hxx"
@@ -43,14 +44,17 @@
#include <editeng/outliner.hxx>
#include <editeng/flditem.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/scopeguard.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <i18nlangtag/lang.h>
-#include <svl/zforlist.hxx>
+#include <svl/numformat.hxx>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/filter/SvmReader.hxx>
#include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
#include <xmloff/namespacemap.hxx>
#include <xmloff/xmlnamespace.hxx>
@@ -60,7 +64,9 @@
#include <svx/svdmodel.hxx>
#include <svx/svdxcgv.hxx>
#include <sal/log.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <tools/zcodec.hxx>
+#include <rtl/crc.h>
#include <memory>
#include <string_view>
@@ -68,39 +74,41 @@
using namespace css::animations;
using namespace css::presentation;
using namespace ::com::sun::star::graphic;
-using namespace ::com::sun::star::geometry;
+using namespace ::com::sun::star::style;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
// - ooo elements and attributes -
-#define NSPREFIX "ooo:"
+#define NSPREFIX u"ooo:"
-#define SVG_PROP_TINYPROFILE "TinyMode"
-#define SVG_PROP_DTDSTRING "DTDString"
-#define SVG_PROP_EMBEDFONTS "EmbedFonts"
-#define SVG_PROP_NATIVEDECORATION "UseNativeTextDecoration"
-#define SVG_PROP_OPACITY "Opacity"
-#define SVG_PROP_POSITIONED_CHARACTERS "UsePositionedCharacters"
+constexpr OUStringLiteral SVG_PROP_TINYPROFILE = u"TinyMode";
+constexpr OUStringLiteral SVG_PROP_DTDSTRING = u"DTDString";
+constexpr OUStringLiteral SVG_PROP_EMBEDFONTS = u"EmbedFonts";
+constexpr OUStringLiteral SVG_PROP_NATIVEDECORATION = u"UseNativeTextDecoration";
+constexpr OUStringLiteral SVG_PROP_OPACITY = u"Opacity";
+constexpr OUStringLiteral SVG_PROP_POSITIONED_CHARACTERS = u"UsePositionedCharacters";
// ooo xml elements
-constexpr OUStringLiteral aOOOElemTextField = u"" NSPREFIX "text_field";
+constexpr OUString aOOOElemTextField = NSPREFIX "text_field"_ustr;
// ooo xml attributes for meta_slide
-const char aOOOAttrSlide[] = NSPREFIX "slide";
-const char aOOOAttrMaster[] = NSPREFIX "master";
-const char aOOOAttrBackgroundVisibility[] = NSPREFIX "background-visibility";
-const char aOOOAttrMasterObjectsVisibility[] = NSPREFIX "master-objects-visibility";
-const char aOOOAttrSlideDuration[] = NSPREFIX "slide-duration";
-const OUString aOOOAttrDateTimeField = NSPREFIX "date-time-field";
-constexpr OUStringLiteral aOOOAttrFooterField = u"" NSPREFIX "footer-field";
-const char aOOOAttrHasTransition[] = NSPREFIX "has-transition";
+constexpr OUString aOOOAttrSlide = NSPREFIX "slide"_ustr;
+constexpr OUString aOOOAttrMaster = NSPREFIX "master"_ustr;
+constexpr OUStringLiteral aOOOAttrHasCustomBackground = NSPREFIX "has-custom-background";
+constexpr OUStringLiteral aOOOAttrDisplayName = NSPREFIX "display-name";
+constexpr OUString aOOOAttrBackgroundVisibility = NSPREFIX "background-visibility"_ustr;
+constexpr OUString aOOOAttrMasterObjectsVisibility = NSPREFIX "master-objects-visibility"_ustr;
+constexpr OUStringLiteral aOOOAttrSlideDuration = NSPREFIX "slide-duration";
+constexpr OUString aOOOAttrDateTimeField = NSPREFIX "date-time-field"_ustr;
+constexpr OUString aOOOAttrFooterField = NSPREFIX "footer-field"_ustr;
+constexpr OUString aOOOAttrHasTransition = NSPREFIX "has-transition"_ustr;
// ooo xml attributes for pages and shapes
-const char aOOOAttrName[] = NSPREFIX "name";
+constexpr OUString aOOOAttrName = NSPREFIX "name"_ustr;
-constexpr OUStringLiteral constSvgNamespace = u"http://www.w3.org/2000/svg";
+constexpr OUString constSvgNamespace = u"http://www.w3.org/2000/svg"_ustr;
/** Text Field Class Hierarchy
@@ -203,7 +211,7 @@ public:
}
virtual void growCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets ) const override
{
- static const OUString sFieldId = aOOOAttrFooterField;
+ static constexpr OUString sFieldId = aOOOAttrFooterField;
implGrowCharSet( aTextFieldCharSets, text, sFieldId );
}
};
@@ -300,7 +308,7 @@ public:
OUString sDateTimeFormat = sDateFormat + " " + sTimeFormat;
- pSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-format", sDateTimeFormat );
+ pSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-format"_ustr, sDateTimeFormat );
SvXMLElementExport aExp( *pSVGExport, XML_NAMESPACE_NONE, "g", true, true );
}
virtual void growCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets ) const override
@@ -368,6 +376,11 @@ SVGExport::SVGExport(
// add namespaces
GetNamespaceMap_().Add(
+ GetXMLToken(XML_NP_SVG),
+ GetXMLToken(XML_N_SVG_COMPAT),
+ XML_NAMESPACE_SVG);
+
+ GetNamespaceMap_().Add(
GetXMLToken(XML_NP_PRESENTATION),
GetXMLToken(XML_N_PRESENTATION),
XML_NAMESPACE_PRESENTATION);
@@ -423,6 +436,12 @@ namespace
BitmapChecksum GetBitmapChecksum( const MetaAction* pAction )
{
+ if( !pAction )
+ {
+ OSL_FAIL( "GetBitmapChecksum: passed MetaAction pointer is null." );
+ return 0;
+ }
+
BitmapChecksum nChecksum = 0;
const MetaActionType nType = pAction->GetType();
@@ -431,19 +450,16 @@ BitmapChecksum GetBitmapChecksum( const MetaAction* pAction )
case MetaActionType::BMPSCALE:
{
const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
- if( pA )
- nChecksum = pA->GetBitmap().GetChecksum();
- else
- OSL_FAIL( "GetBitmapChecksum: MetaBmpScaleAction pointer is null." );
+ // The conversion to BitmapEx is needed since a Bitmap object is
+ // converted to BitmapEx before passing it to SVGActionWriter::ImplWriteBmp
+ // where the checksum is checked for matching.
+ nChecksum = BitmapEx( pA->GetBitmap() ).GetChecksum();
}
break;
case MetaActionType::BMPEXSCALE:
{
const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
- if( pA )
- nChecksum = pA->GetBitmapEx().GetChecksum();
- else
- OSL_FAIL( "GetBitmapChecksum: MetaBmpExScaleAction pointer is null." );
+ nChecksum = pA->GetBitmapEx().GetChecksum();
}
break;
default: break;
@@ -451,37 +467,131 @@ BitmapChecksum GetBitmapChecksum( const MetaAction* pAction )
return nChecksum;
}
-} // end anonymous namespace
+MetaAction* CreateMetaBitmapAction( const MetaAction* pAction, const Point& rPt, const Size& rSz )
+{
+ if( !pAction )
+ {
+ OSL_FAIL( "CreateMetaBitmapAction: passed MetaAction pointer is null." );
+ return nullptr;
+ }
+ MetaAction* pResAction = nullptr;
+ const MetaActionType nType = pAction->GetType();
+ switch( nType )
+ {
+ case MetaActionType::BMPSCALE:
+ {
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
+ pResAction = new MetaBmpScaleAction( rPt, rSz, pA->GetBitmap() );
+ }
+ break;
+ case MetaActionType::BMPEXSCALE:
+ {
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
+ pResAction = new MetaBmpExScaleAction( rPt, rSz, pA->GetBitmapEx() );
+ }
+ break;
+ default: break;
+ }
+ return pResAction;
+}
-static void MetaBitmapActionGetPoint( const MetaAction* pAction, Point& rPt )
+void MetaBitmapActionGetPoint( const MetaAction* pAction, Point& rPt )
{
+ if( !pAction )
+ {
+ OSL_FAIL( "MetaBitmapActionGetPoint: passed MetaAction pointer is null." );
+ return;
+ }
const MetaActionType nType = pAction->GetType();
switch( nType )
{
case MetaActionType::BMPSCALE:
{
const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
- if( pA )
- rPt = pA->GetPoint();
- else
- OSL_FAIL( "MetaBitmapActionGetPoint: MetaBmpScaleAction pointer is null." );
+ rPt = pA->GetPoint();
}
break;
case MetaActionType::BMPEXSCALE:
{
const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
- if( pA )
- rPt = pA->GetPoint();
- else
- OSL_FAIL( "MetaBitmapActionGetPoint: MetaBmpExScaleAction pointer is null." );
+ rPt = pA->GetPoint();
+ }
+ break;
+ default: break;
+ }
+}
+
+void MetaBitmapActionGetSize( const MetaAction* pAction, Size& rSz )
+{
+ if( !pAction )
+ {
+ OSL_FAIL( "MetaBitmapActionGetSize: passed MetaAction pointer is null." );
+ return;
+ }
+ const MetaActionType nType = pAction->GetType();
+ switch( nType )
+ {
+ case MetaActionType::BMPSCALE:
+ {
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
+ rSz = pA->GetSize();
+ }
+ break;
+ case MetaActionType::BMPEXSCALE:
+ {
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
+ rSz = pA->GetSize();
+ }
+ break;
+ default: break;
+ }
+}
+
+void MetaBitmapActionGetOrigSize( const MetaAction* pAction, Size& rSz )
+{
+ if( !pAction )
+ {
+ OSL_FAIL( "MetaBitmapActionGetOrigSize: passed MetaAction pointer is null." );
+ return;
+ }
+
+ const MetaActionType nType = pAction->GetType();
+ MapMode aSourceMode( MapUnit::MapPixel );
+ MapMode aTargetMode( MapUnit::Map100thMM );
+
+ switch( nType )
+ {
+ case MetaActionType::BMPSCALE:
+ {
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
+ const Bitmap& rBitmap = pA->GetBitmap();
+ rSz = rBitmap.GetSizePixel();
+ }
+ break;
+ case MetaActionType::BMPEXSCALE:
+ {
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
+ const BitmapEx& rBitmap = pA->GetBitmapEx();
+ rSz = rBitmap.GetSizePixel();
}
break;
default: break;
}
+ rSz = OutputDevice::LogicToLogic( rSz, aSourceMode, aTargetMode );
+}
+OUString getPatternIdForTiledBackground( std::u16string_view sSlideId, BitmapChecksum nChecksum )
+{
+ return OUString::Concat("bg-pattern.") + sSlideId + "." + OUString::number( nChecksum );
}
+OUString getIdForTiledBackground( std::u16string_view sSlideId, BitmapChecksum nChecksum )
+{
+ return OUString::Concat("bg-") + sSlideId + "." + OUString::number( nChecksum );
+}
+
+} // end anonymous namespace
size_t HashBitmap::operator()( const ObjectRepresentation& rObjRep ) const
{
@@ -544,6 +654,8 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
{
pValue[ i ].Value >>= maFilterData;
}
+ else if (pValue[i].Name == "StatusIndicator")
+ pValue[i].Value >>= mxStatusIndicator;
}
if(mbWriterFilter || mbCalcFilter)
@@ -556,12 +668,16 @@ bool SVGFilter::implExportImpressOrDraw( const Reference< XOutputStream >& rxOSt
{
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ) ;
bool bRet = false;
+ // Instead of writing to rxOStm directly, we write here in case we need
+ // to compress the output later
+ SvMemoryStream aTempStm;
if( rxOStm.is() )
{
- if( !mSelectedPages.empty() && !mMasterPageTargets.empty() )
+ if (!mSelectedPages.empty())
{
- Reference< XDocumentHandler > xDocHandler = implCreateExportDocumentHandler( rxOStm );
+ ::rtl::Reference< ::utl::OStreamWrapper > aTempStmWrapper = new ::utl::OStreamWrapper( aTempStm );
+ Reference< XDocumentHandler > xDocHandler = implCreateExportDocumentHandler( aTempStmWrapper );
if( xDocHandler.is() )
{
@@ -571,10 +687,6 @@ bool SVGFilter::implExportImpressOrDraw( const Reference< XOutputStream >& rxOSt
// mpSVGExport = new SVGExport( xDocHandler );
mpSVGExport = new SVGExport( xContext, xDocHandler, maFilterData );
- // xKeepAlive is set up only to manage the life-time of the object pointed by mpSVGExport,
- // and in order to prevent that it is destroyed when passed to AnimationExporter.
- Reference< XInterface > xKeepAlive = static_cast< css::document::XFilter* >( mpSVGExport );
-
// create an id for each draw page
for( const auto& rPage : mSelectedPages )
implRegisterInterface( rPage );
@@ -591,7 +703,7 @@ bool SVGFilter::implExportImpressOrDraw( const Reference< XOutputStream >& rxOSt
if( mxDefaultPage.is() )
{
- SvxDrawPage* pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( mxDefaultPage );
+ SvxDrawPage* pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( mxDefaultPage );
if( pSvxDrawPage )
{
@@ -640,6 +752,38 @@ bool SVGFilter::implExportImpressOrDraw( const Reference< XOutputStream >& rxOSt
}
}
}
+ if ( bRet )
+ {
+ const sal_Int8* aDataPtr = static_cast< const sal_Int8* >( aTempStm.GetData() );
+ sal_uInt32 aDataSize = aTempStm.GetSize();
+ SvMemoryStream aCompressedStm;
+ if ( mbShouldCompress )
+ {
+ sal_uInt32 nUncompressedCRC32
+ = rtl_crc32( 0, aTempStm.GetData(), aTempStm.GetSize() );
+ ZCodec aCodec;
+ aTempStm.Seek( 0 );
+ aCodec.BeginCompression( ZCODEC_DEFAULT_COMPRESSION, /*gzLib*/true );
+ // the inner modify time/filename doesn't really matter in this context because
+ // compressed graphic formats are meant to be opened as is - not to be extracted
+ aCodec.SetCompressionMetadata( "inner"_ostr, 0, nUncompressedCRC32 );
+ aCodec.Compress( aTempStm, aCompressedStm );
+ sal_uInt32 nTotalIn = static_cast< sal_uInt32 >( aCodec.EndCompression() );
+ if ( aCompressedStm.GetError() || nTotalIn != aDataSize )
+ {
+ bRet = false;
+ return bRet;
+ }
+ else
+ {
+ aDataPtr = static_cast< const sal_Int8* >( aCompressedStm.GetData() );
+ aDataSize = aCompressedStm.GetSize();
+ }
+ }
+
+ Sequence< sal_Int8 > aTempSeq( aDataPtr, aDataSize );
+ rxOStm->writeBytes( aTempSeq );
+ }
return bRet;
}
@@ -660,10 +804,6 @@ bool SVGFilter::implExportWriterOrCalc( const Reference< XOutputStream >& rxOStm
// mpSVGExport = new SVGExport( xDocHandler );
mpSVGExport = new SVGExport( xContext, xDocHandler, maFilterData );
- // xKeepAlive is set up only to manage the life-time of the object pointed by mpSVGExport,
- // and in order to prevent that it is destroyed when passed to AnimationExporter.
- Reference< XInterface > xKeepAlive = static_cast< css::document::XFilter* >( mpSVGExport );
-
try
{
mxDefaultPage = mSelectedPages[0];
@@ -693,42 +833,54 @@ bool SVGFilter::implExportWriterTextGraphic( const Reference< view::XSelectionSu
Any selection = xSelectionSupplier->getSelection();
uno::Reference<lang::XServiceInfo> xSelection;
selection >>= xSelection;
- if (xSelection.is() && xSelection->supportsService("com.sun.star.text.TextGraphicObject"))
- {
- uno::Reference<beans::XPropertySet> xPropertySet(xSelection, uno::UNO_QUERY);
+ if (!xSelection || !xSelection->supportsService("com.sun.star.text.TextGraphicObject"))
+ return true;
- uno::Reference<graphic::XGraphic> xOriginalGraphic;
- xPropertySet->getPropertyValue("Graphic") >>= xOriginalGraphic;
- const Graphic aOriginalGraphic(xOriginalGraphic);
+ uno::Reference<beans::XPropertySet> xPropertySet(xSelection, uno::UNO_QUERY);
- uno::Reference<graphic::XGraphic> xTransformedGraphic;
- xPropertySet->getPropertyValue("TransformedGraphic") >>= xTransformedGraphic;
+ uno::Reference<graphic::XGraphic> xOriginalGraphic;
+ xPropertySet->getPropertyValue("Graphic") >>= xOriginalGraphic;
+ const Graphic aOriginalGraphic(xOriginalGraphic);
- if (!xTransformedGraphic.is())
- return false;
- const Graphic aTransformedGraphic(xTransformedGraphic);
- bool bSameGraphic = aTransformedGraphic == aOriginalGraphic ||
- aOriginalGraphic.GetChecksum() == aTransformedGraphic.GetChecksum();
- const Graphic aGraphic = bSameGraphic ? aOriginalGraphic : aTransformedGraphic;
- uno::Reference<graphic::XGraphic> xGraphic = bSameGraphic ? xOriginalGraphic : xTransformedGraphic;
+ uno::Reference<graphic::XGraphic> xTransformedGraphic;
+ xPropertySet->getPropertyValue(
+ mbIsPreview ? OUString("GraphicPreview") : OUString("TransformedGraphic"))
+ >>= xTransformedGraphic;
- // Calculate size from Graphic
- Point aPos( OutputDevice::LogicToLogic(aGraphic.GetPrefMapMode().GetOrigin(), aGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)) );
- Size aSize( OutputDevice::LogicToLogic(aGraphic.GetPrefSize(), aGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)) );
+ if (!xTransformedGraphic.is())
+ return false;
+ const Graphic aTransformedGraphic(xTransformedGraphic);
+ bool bSameGraphic = aTransformedGraphic == aOriginalGraphic ||
+ aOriginalGraphic.GetChecksum() == aTransformedGraphic.GetChecksum();
+ const Graphic aGraphic = bSameGraphic ? aOriginalGraphic : aTransformedGraphic;
+ uno::Reference<graphic::XGraphic> xGraphic = bSameGraphic ? xOriginalGraphic : xTransformedGraphic;
+
+ // Calculate size from Graphic
+ Point aPos( OutputDevice::LogicToLogic(aGraphic.GetPrefMapMode().GetOrigin(), aGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)) );
+ Size aSize( OutputDevice::LogicToLogic(aGraphic.GetPrefSize(), aGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)) );
+
+ assert(mSelectedPages.size() == 1);
+ SvxDrawPage* pSvxDrawPage(comphelper::getFromUnoTunnel<SvxDrawPage>(mSelectedPages[0]));
+ if(pSvxDrawPage == nullptr || pSvxDrawPage->GetSdrPage() == nullptr)
+ return false;
- assert(mSelectedPages.size() == 1);
- SvxDrawPage* pSvxDrawPage(comphelper::getUnoTunnelImplementation<SvxDrawPage>(mSelectedPages[0]));
- if(pSvxDrawPage == nullptr || pSvxDrawPage->GetSdrPage() == nullptr)
- return false;
+ SdrModel& rModel = pSvxDrawPage->GetSdrPage()->getSdrModelFromSdrPage();
+ const bool bUndoEnable = rModel.IsUndoEnabled();
+ if (bUndoEnable)
+ rModel.EnableUndo(false);
+ comphelper::ScopeGuard guard([bUndoEnable, &rModel]() {
+ // restore when leaving
+ if (bUndoEnable)
+ rModel.EnableUndo(false);
+ });
- SdrGrafObj* pGraphicObj = new SdrGrafObj(pSvxDrawPage->GetSdrPage()->getSdrModelFromSdrPage(), aGraphic, tools::Rectangle( aPos, aSize ));
- uno::Reference< drawing::XShape > xShape = GetXShapeForSdrObject(pGraphicObj);
- uno::Reference< XPropertySet > xShapePropSet(xShape, uno::UNO_QUERY);
- xShapePropSet->setPropertyValue("Graphic", uno::Any(xGraphic));
+ rtl::Reference<SdrGrafObj> pGraphicObj = new SdrGrafObj(rModel, aGraphic, tools::Rectangle( aPos, aSize ));
+ uno::Reference< drawing::XShape > xShape = GetXShapeForSdrObject(pGraphicObj.get());
+ uno::Reference< XPropertySet > xShapePropSet(xShape, uno::UNO_QUERY);
+ xShapePropSet->setPropertyValue("Graphic", uno::Any(xGraphic));
- maShapeSelection = drawing::ShapeCollection::create(comphelper::getProcessComponentContext());
- maShapeSelection->add(xShape);
- }
+ maShapeSelection = drawing::ShapeCollection::create(comphelper::getProcessComponentContext());
+ maShapeSelection->add(xShape);
return true;
}
@@ -797,10 +949,14 @@ bool SVGFilter::implExportDocument()
// #i124608#
mbExportShapeSelection = mbSinglePage && maShapeSelection.is() && maShapeSelection->getCount();
- if(xDefaultPagePropertySet.is())
+ if (xDefaultPagePropertySet.is())
{
- xDefaultPagePropertySet->getPropertyValue( "Width" ) >>= nDocWidth;
- xDefaultPagePropertySet->getPropertyValue( "Height" ) >>= nDocHeight;
+ sal_Int32 nWidth = 0;
+ sal_Int32 nHeight = 0;
+ if (xDefaultPagePropertySet->getPropertyValue("Width") >>= nWidth)
+ nDocWidth = nWidth;
+ if (xDefaultPagePropertySet->getPropertyValue("Height") >>= nHeight)
+ nDocHeight = nHeight;
}
if(mbExportShapeSelection)
@@ -862,7 +1018,7 @@ bool SVGFilter::implExportDocument()
aObjects[ nPos++ ] = elem.second;
}
- mpSVGFontExport = new SVGFontExport( *mpSVGExport, aObjects );
+ mpSVGFontExport = new SVGFontExport( *mpSVGExport, std::move(aObjects) );
mpSVGWriter = new SVGActionWriter( *mpSVGExport, *mpSVGFontExport );
if( mpSVGExport->IsEmbedFonts() )
@@ -874,10 +1030,15 @@ bool SVGFilter::implExportDocument()
implExportTextShapeIndex();
implEmbedBulletGlyphs();
implExportTextEmbeddedBitmaps();
+ implExportBackgroundBitmaps();
+ mpSVGWriter->SetEmbeddedBitmapRefs( &maBitmapActionMap );
+ implExportTiledBackground();
}
+ if( mbIsPreview )
+ mpSVGWriter->SetPreviewMode();
// #i124608# export a given object selection, so no MasterPage export at all
- if (!mbExportShapeSelection)
+ if (!mbExportShapeSelection && !mMasterPageTargets.empty())
implExportMasterPages( mMasterPageTargets, 0, mMasterPageTargets.size() - 1 );
implExportDrawPages( mSelectedPages, 0, nLastPage );
@@ -947,6 +1108,7 @@ void SVGFilter::implExportDocumentHeaderImpressOrDraw(sal_Int32 nDocX, sal_Int32
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:presentation", "http://sun.com/xmlns/staroffice/presentation" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:smil", "http://www.w3.org/2001/SMIL20/" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:anim", "urn:oasis:names:tc:opendocument:xmlns:animation:1.0" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xml:space", "preserve" );
mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, "svg", true, true );
@@ -1058,20 +1220,20 @@ void SVGFilter::implGenerateMetaData()
// we wrap all meta presentation info into a svg:defs element
SvXMLElementExport aDefsElem( *mpSVGExport, XML_NAMESPACE_NONE, "defs", true, true );
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", NSPREFIX "meta_slides" );
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "number-of-slides", OUString::number( nCount ) );
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "start-slide-number", OUString::number( mnVisiblePage ) );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", NSPREFIX "meta_slides"_ustr );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "number-of-slides"_ustr, OUString::number( nCount ) );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "start-slide-number"_ustr, OUString::number( mnVisiblePage ) );
if( mpSVGExport->IsUsePositionedCharacters() )
{
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "use-positioned-chars", "true" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "use-positioned-chars"_ustr, "true" );
}
// Add a (global) Page Numbering Type attribute for the document
// NOTE: at present pSdrModel->GetPageNumType() returns always css::style::NumberingType::ARABIC
// so the following code fragment is pretty useless
sal_Int32 nPageNumberingType = css::style::NumberingType::ARABIC;
- SvxDrawPage* pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( mSelectedPages[0] );
+ SvxDrawPage* pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( mSelectedPages[0] );
if( pSvxDrawPage )
{
SdrPage* pSdrPage = pSvxDrawPage->GetSdrPage();
@@ -1105,20 +1267,20 @@ void SVGFilter::implGenerateMetaData()
break;
}
if( !sNumberingType.isEmpty() )
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-numbering-type", sNumberingType );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-numbering-type"_ustr, sNumberingType );
}
{
SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
- const OUString aId( NSPREFIX "meta_slide" );
+ const OUString aId( NSPREFIX "meta_slide"_ustr );
const OUString aElemTextFieldId( aOOOElemTextField );
std::vector< std::unique_ptr<TextField> > aFieldSet;
// dummy slide - used as leaving slide for transition on the first slide
if( mbPresentation )
{
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", NSPREFIX "meta_dummy_slide" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", NSPREFIX "meta_dummy_slide"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, "dummy-slide" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrMaster, "dummy-master-page" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrBackgroundVisibility, "hidden" );
@@ -1131,6 +1293,8 @@ void SVGFilter::implGenerateMetaData()
{
const Reference< css::drawing::XDrawPage > & xDrawPage = mSelectedPages[i];
Reference< css::drawing::XMasterPageTarget > xMasterPageTarget( xDrawPage, UNO_QUERY );
+ if (!xMasterPageTarget.is())
+ continue;
Reference< css::drawing::XDrawPage > xMasterPage = xMasterPageTarget->getMasterPage();
OUString aSlideId(aId + "_" + OUString::number( i ));
@@ -1145,6 +1309,12 @@ void SVGFilter::implGenerateMetaData()
if( xPropSet.is() )
{
+ OUString sDisplayName;
+ if (xPropSet->getPropertyValue("LinkDisplayName") >>= sDisplayName)
+ {
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrDisplayName, sDisplayName);
+ }
+
bool bBackgroundVisibility = true; // default: visible
bool bBackgroundObjectsVisibility = true; // default: visible
@@ -1152,12 +1322,24 @@ void SVGFilter::implGenerateMetaData()
VariableDateTimeField aVariableDateTimeField;
FooterField aFooterField;
+ // check if the slide has a custom background which overlaps the master page background
+ Reference< XPropertySet > xBackground;
+ xPropSet->getPropertyValue( "Background" ) >>= xBackground;
+ if( xBackground.is() )
+ {
+ drawing::FillStyle aFillStyle;
+ bool assigned = ( xBackground->getPropertyValue( "FillStyle" ) >>= aFillStyle );
+ // has a custom background ?
+ if( assigned && aFillStyle != drawing::FillStyle_NONE )
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrHasCustomBackground, "true" );
+ }
+
xPropSet->getPropertyValue( "IsBackgroundVisible" ) >>= bBackgroundVisibility;
// in case the attribute is set to its default value it is not appended to the meta-slide element
if( !bBackgroundVisibility ) // visibility default value: 'visible'
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrBackgroundVisibility, "hidden" );
- // Page Number, Date/Time, Footer and Header Fields are regarded as background objects.
+ // Page Number, DateTime, Footer and Header Fields are regarded as background objects.
// So bBackgroundObjectsVisibility overrides visibility of master page text fields.
xPropSet->getPropertyValue( "IsBackgroundObjectsVisible" ) >>= bBackgroundObjectsVisibility;
if( bBackgroundObjectsVisibility ) // visibility default value: 'visible'
@@ -1171,50 +1353,44 @@ void SVGFilter::implGenerateMetaData()
bPageNumberVisibility = bPageNumberVisibility && ( nPageNumberingType != css::style::NumberingType::NUMBER_NONE );
if( bPageNumberVisibility ) // visibility default value: 'hidden'
{
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-number-visibility", "visible" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-number-visibility"_ustr, "visible" );
}
- // Date/Time Field
- xPropSet->getPropertyValue( "IsDateTimeVisible" ) >>= bDateTimeVisibility;
- if( bDateTimeVisibility ) // visibility default value: 'visible'
+ // DateTime Field
+ bool bDateTimeFixed = true; // default: fixed
+ xPropSet->getPropertyValue( "IsDateTimeFixed" ) >>= bDateTimeFixed;
+ if( bDateTimeFixed ) // we are interested only in the field text not in the date/time format
{
- bool bDateTimeFixed = true; // default: fixed
- xPropSet->getPropertyValue( "IsDateTimeFixed" ) >>= bDateTimeFixed;
- if( bDateTimeFixed ) // we are interested only in the field text not in the date/time format
+ xPropSet->getPropertyValue( "DateTimeText" ) >>= aFixedDateTimeField.text;
+ if( !aFixedDateTimeField.text.isEmpty() )
{
- xPropSet->getPropertyValue( "DateTimeText" ) >>= aFixedDateTimeField.text;
- if( !aFixedDateTimeField.text.isEmpty() )
- {
- OUString sFieldId = implGenerateFieldId( aFieldSet, aFixedDateTimeField, aElemTextFieldId, xMasterPage );
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrDateTimeField, sFieldId );
- }
- }
- else // the inverse applies: we are interested only in the date/time format not in the field text
- {
- xPropSet->getPropertyValue( "DateTimeFormat" ) >>= aVariableDateTimeField.format;
- OUString sFieldId = implGenerateFieldId( aFieldSet, aVariableDateTimeField, aElemTextFieldId, xMasterPage );
+ OUString sFieldId = implGenerateFieldId( aFieldSet, aFixedDateTimeField, aElemTextFieldId, xMasterPage );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrDateTimeField, sFieldId );
}
}
- else
+ else // the inverse applies: we are interested only in the date/time format not in the field text
{
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-visibility", "hidden" );
+ xPropSet->getPropertyValue( "DateTimeFormat" ) >>= aVariableDateTimeField.format;
+ OUString sFieldId = implGenerateFieldId( aFieldSet, aVariableDateTimeField, aElemTextFieldId, xMasterPage );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrDateTimeField, sFieldId );
+ }
+ xPropSet->getPropertyValue( "IsDateTimeVisible" ) >>= bDateTimeVisibility;
+ if( !bDateTimeVisibility ) // visibility default value: 'visible'
+ {
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-visibility"_ustr, "hidden" );
}
// Footer Field
- xPropSet->getPropertyValue( "IsFooterVisible" ) >>= bFooterVisibility;
- if( bFooterVisibility ) // visibility default value: 'visible'
+ xPropSet->getPropertyValue( "FooterText" ) >>= aFooterField.text;
+ if( !aFooterField.text.isEmpty() )
{
- xPropSet->getPropertyValue( "FooterText" ) >>= aFooterField.text;
- if( !aFooterField.text.isEmpty() )
- {
- OUString sFieldId = implGenerateFieldId( aFieldSet, aFooterField, aElemTextFieldId, xMasterPage );
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrFooterField, sFieldId );
- }
+ OUString sFieldId = implGenerateFieldId( aFieldSet, aFooterField, aElemTextFieldId, xMasterPage );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrFooterField, sFieldId );
}
- else
+ xPropSet->getPropertyValue( "IsFooterVisible" ) >>= bFooterVisibility;
+ if( !bFooterVisibility ) // visibility default value: 'visible'
{
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "footer-visibility", "hidden" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "footer-visibility"_ustr, "hidden" );
}
}
else
@@ -1260,9 +1436,9 @@ void SVGFilter::implGenerateMetaData()
{
for( sal_Int32 i = 0, nSize = aFieldSet.size(); i < nSize; ++i )
{
- OUString sElemId = OUStringLiteral(aOOOElemTextField) + "_" + OUString::number( i );
+ OUString sElemId = OUString::Concat(aOOOElemTextField) + "_" + OUString::number( i );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sElemId );
- aFieldSet[i]->elementExport( mpSVGExport );
+ aFieldSet[i]->elementExport( mpSVGExport.get() );
}
if( mpSVGExport->IsEmbedFonts() && mpSVGExport->IsUsePositionedCharacters() )
{
@@ -1350,7 +1526,7 @@ void SVGFilter::implExportTextShapeIndex()
for( sal_Int32 i = 0; i < nCount; ++i )
{
const Reference< css::drawing::XDrawPage > & xDrawPage = mSelectedPages[i];
- if( mTextShapeIdListMap.find( xDrawPage ) != mTextShapeIdListMap.end() )
+ if( mTextShapeIdListMap.contains(xDrawPage) )
{
OUString sTextShapeIdList = mTextShapeIdListMap[xDrawPage].trim();
@@ -1358,7 +1534,7 @@ void SVGFilter::implExportTextShapeIndex()
if( !rPageId.isEmpty() && !sTextShapeIdList.isEmpty() )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, rPageId );
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "id-list", sTextShapeIdList );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "id-list"_ustr, sTextShapeIdList );
SvXMLElementExport aGElem( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
}
}
@@ -1408,8 +1584,105 @@ void SVGFilter::implEmbedBulletGlyph( sal_Unicode cBullet, const OUString & sPat
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "d", sPathData );
SvXMLElementExport aPathElem( *mpSVGExport, XML_NAMESPACE_NONE, "path", true, true );
+ mpSVGExport->SetEmbeddedBulletGlyph(cBullet);
+}
+
+void SVGFilter::implExportBackgroundBitmaps()
+{
+ if (maBitmapActionMap.empty())
+ return;
+
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "BackgroundBitmaps" );
+ SvXMLElementExport aDefsContainerElem( *mpSVGExport, XML_NAMESPACE_NONE, "defs", true, true );
+
+ OUString sId;
+ for( const auto& rItem : maBitmapActionMap )
+ {
+ BitmapChecksum nChecksum = rItem.first;
+ const GDIMetaFile& aEmbeddedBitmapMtf = *(rItem.second);
+ MetaAction* pBitmapAction = aEmbeddedBitmapMtf.GetAction( 0 );
+ if( pBitmapAction )
+ {
+ sId = "bitmap(" + OUString::number( nChecksum ) + ")";
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sId );
+
+ const Point aPos; // (0, 0)
+ const Size aSize = aEmbeddedBitmapMtf.GetPrefSize();
+ mpSVGWriter->WriteMetaFile( aPos, aSize, aEmbeddedBitmapMtf, 0xffffffff );
+ }
+ }
}
+void SVGFilter::implExportTiledBackground()
+{
+ if( maPatterProps.empty() )
+ return;
+
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "BackgroundPatterns" );
+ SvXMLElementExport aDefsContainerElem( *mpSVGExport, XML_NAMESPACE_NONE, "defs", true, true );
+
+ for( const auto& [ rSlideId, rData ] : maPatterProps )
+ {
+ auto aBitmapActionIt = maBitmapActionMap.find( rData.aBitmapChecksum );
+ if( aBitmapActionIt != maBitmapActionMap.end() )
+ {
+ // pattern element attributes
+ const OUString sPatternId = getPatternIdForTiledBackground( rSlideId, rData.aBitmapChecksum );
+ // <pattern> <use>
+ {
+ // pattern element attributes
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sPatternId );
+
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "x", OUString::number( rData.aPos.X() ) );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "y", OUString::number( rData.aPos.Y() ) );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "width", OUString::number( rData.aSize.Width() ) );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "height", OUString::number( rData.aSize.Height() ) );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "patternUnits", "userSpaceOnUse" );
+
+ SvXMLElementExport aPatternElem( *mpSVGExport, XML_NAMESPACE_NONE, "pattern", true, true );
+
+ // use element attributes
+ const Size& aOrigSize = aBitmapActionIt->second->GetPrefSize();
+ OUString sTransform;
+ Fraction aFractionX( rData.aSize.Width(), aOrigSize.Width() );
+ Fraction aFractionY( rData.aSize.Height(), aOrigSize.Height() );
+ double scaleX = rtl_math_round( double(aFractionX), 3, rtl_math_RoundingMode::rtl_math_RoundingMode_Corrected );
+ double scaleY = rtl_math_round( double(aFractionY), 3, rtl_math_RoundingMode::rtl_math_RoundingMode_Corrected );
+ if( !rtl_math_approxEqual( scaleX, 1.0 ) || !rtl_math_approxEqual( scaleY, 1.0 ) )
+ sTransform += " scale(" + OUString::number( double(aFractionX) ) + ", " + OUString::number( double(aFractionY) ) + ")";
+
+ if( !sTransform.isEmpty() )
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "transform", sTransform );
+
+ // referenced bitmap
+ OUString sRefId = "#bitmap(" + OUString::number( rData.aBitmapChecksum ) + ")";
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xlink:href", sRefId );
+
+ SvXMLElementExport aUseElem( *mpSVGExport, XML_NAMESPACE_NONE, "use", true, true );
+ } // </use> </pattern>
+
+ // <g> <rect>
+ {
+ // group
+ const OUString sBgId = getIdForTiledBackground( rSlideId, rData.aBitmapChecksum );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sBgId );
+
+ SvXMLElementExport aGroupElem( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
+
+ // rectangle
+ const OUString sUrl = "url(#" + sPatternId + ")";
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "x", "0" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "y", "0" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "width", OUString::number( rData.aSlideSize.Width() ) );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "height", OUString::number( rData.aSlideSize.Height() ) );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "stroke", "none" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "fill", sUrl );
+
+ SvXMLElementExport aRectElem( *mpSVGExport, XML_NAMESPACE_NONE, "rect", true, true );
+ } // </g> </rect>
+ }
+ }
+}
/** SVGFilter::implExportTextEmbeddedBitmaps
We export bitmaps embedded into text shapes, such as those used by list
@@ -1549,7 +1822,7 @@ void SVGFilter::implGetPagePropSet( const Reference< css::drawing::XDrawPage > &
if( mVisiblePagePropSet.bIsPageNumberFieldVisible )
{
- SvxDrawPage* pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( rxPage );
+ SvxDrawPage* pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( rxPage );
if( pSvxDrawPage )
{
SdrPage* pSdrPage = pSvxDrawPage->GetSdrPage();
@@ -1636,25 +1909,21 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing:
}
}
- if(!mbExportShapeSelection)
+ if (!mbExportShapeSelection)
{
// We wrap all slide in a group element with class name "SlideGroup".
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "SlideGroup" );
SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
+ if (mxStatusIndicator)
+ mxStatusIndicator->start(FilterResId(STR_FILTER_DOC_SAVING), nLastPage - nFirstPage + 1);
+
for( sal_Int32 i = nFirstPage; i <= nLastPage; ++i )
{
- Reference< css::drawing::XShapes > xShapes;
+ if (mxStatusIndicator.is())
+ mxStatusIndicator->setValue(i - nFirstPage);
- if (mbExportShapeSelection)
- {
- // #i124608# export a given object selection
- xShapes = maShapeSelection;
- }
- else
- {
- xShapes = rxPages[i];
- }
+ Reference<css::drawing::XShapes> xShapes = rxPages[i];
if( xShapes.is() )
{
@@ -1697,6 +1966,9 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing:
} // append the </g> closing tag related to inserted elements
} // append the </g> closing tag related to the svg element handling the slide visibility
}
+
+ if (mxStatusIndicator)
+ mxStatusIndicator->end();
}
else
{
@@ -1746,34 +2018,47 @@ bool SVGFilter::implExportPage( std::u16string_view sPageId,
const GDIMetaFile& rMtf = (*mpObjects)[ rxPage ].GetRepresentation();
if( rMtf.GetActionSize() )
{
- // background id = "bg-" + page id
- OUString sBackgroundId = OUString::Concat("bg-") + sPageId;
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sBackgroundId );
-
- // At present (LibreOffice 3.4.0) the 'IsBackgroundVisible' property is not handled
- // by Impress; anyway we handle this property as referring only to the visibility
- // of the master page background. So if a slide has its own background object,
- // the visibility of such a background object is always inherited from the visibility
- // of the parent slide regardless of the value of the 'IsBackgroundVisible' property.
- // This means that we need to set up the visibility attribute only for the background
- // element of a master page.
- if( !mbPresentation && bMaster )
+ // If this is not a master page wrap the slide custom background
+ // by a <defs> element.
+ // Slide custom background, if any, is referenced at a different position
+ // in order to not overlap background objects.
+ std::unique_ptr<SvXMLElementExport> xDefsExp;
+ if (!bMaster) // insert the <defs> open tag related to the slide background
+ {
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "SlideBackground" );
+ xDefsExp.reset( new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, "defs", true, true ) );
+ }
{
- if( !mVisiblePagePropSet.bIsBackgroundVisible )
+ // background id = "bg-" + page id
+ OUString sBackgroundId = OUString::Concat("bg-") + sPageId;
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sBackgroundId );
+
+ // At present (LibreOffice 3.4.0) the 'IsBackgroundVisible' property is not handled
+ // by Impress; anyway we handle this property as referring only to the visibility
+ // of the master page background. So if a slide has its own background object,
+ // the visibility of such a background object is always inherited from the visibility
+ // of the parent slide regardless of the value of the 'IsBackgroundVisible' property.
+ // This means that we need to set up the visibility attribute only for the background
+ // element of a master page.
+ if( !mbPresentation && bMaster )
{
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "visibility", "hidden" );
+ if( !mVisiblePagePropSet.bIsBackgroundVisible )
+ {
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "visibility", "hidden" );
+ }
}
- }
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "Background" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "Background" );
- // insert the <g> open tag related to the Background
- SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
+ // insert the <g> open tag related to the Background
+ SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
+
+ // append all elements that make up the Background
+ const Point aNullPt;
+ mpSVGWriter->WriteMetaFile( aNullPt, rMtf.GetPrefSize(), rMtf, SVGWRITER_WRITE_FILL );
+ } // insert the </g> closing tag related to the Background
- // append all elements that make up the Background
- const Point aNullPt;
- mpSVGWriter->WriteMetaFile( aNullPt, rMtf.GetPrefSize(), rMtf, SVGWRITER_WRITE_FILL );
- } // insert the </g> closing tag related to the Background
+ } // insert the </defs> closing tag related to the slide background
}
// In case we are dealing with a master page we need to group all its shapes
@@ -1881,20 +2166,25 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
if( rMtf.GetActionSize() )
{ // for text field shapes we set up text-adjust attributes
// and set visibility to hidden
- const OUString* pElementId = nullptr;
+ OUString aElementId;
+
if( mbPresentation )
{
- bool bIsPageNumber = ( aShapeClass == "Slide_Number" );
+ bool bIsPageNumber = ( aShapeClass == "PageNumber" );
bool bIsFooter = ( aShapeClass == "Footer" );
- bool bIsDateTime = ( aShapeClass == "Date/Time" );
- if( bIsPageNumber || bIsDateTime || bIsFooter )
+ bool bIsDateTime = ( aShapeClass == "DateTime" );
+ bool bTextField = bIsPageNumber || bIsFooter || bIsDateTime;
+ if( bTextField )
{
// to notify to the SVGActionWriter::ImplWriteActions method
// that we are dealing with a placeholder shape
- pElementId = &sPlaceholderTag;
+ aElementId = sPlaceholderTag;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "visibility", "hidden" );
+ }
+ if( bTextField || ( aShapeClass == "TextShape" ) )
+ {
sal_uInt16 nTextAdjust = sal_uInt16(ParagraphAdjust_LEFT);
OUString sTextAdjust;
xShapePropSet->getPropertyValue( "ParaAdjust" ) >>= nTextAdjust;
@@ -1913,7 +2203,7 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
default:
break;
}
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "text-adjust", sTextAdjust );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "text-adjust"_ustr, sTextAdjust );
}
}
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", aShapeClass );
@@ -1982,7 +2272,7 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
SvXMLElementExport alinkA( *mpSVGExport, XML_NAMESPACE_NONE, "a", true, true );
mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
0xffffffff,
- pElementId,
+ aElementId,
&rxShape,
pEmbeddedBitmapsMtf );
}
@@ -1991,7 +2281,7 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
{
mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
0xffffffff,
- pElementId,
+ aElementId,
&rxShape,
pEmbeddedBitmapsMtf );
}
@@ -2046,21 +2336,19 @@ bool SVGFilter::implCreateObjects()
// implementation status:
// - hatch stroke color is set to 'none' so the hatch is not visible, why?
// - gradient look is not really awesome, too few colors are used;
- // - stretched bitmap, gradient and hatch are not exported only once
+ // - gradient and hatch are not exported only once
// and then referenced in case more than one slide uses them.
- // - tiled bitmap: an image element is exported for each tile,
- // this is really too expensive!
Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
if( xPropSet.is() )
{
Reference< XPropertySet > xBackground;
- xPropSet->getPropertyValue( "Background" ) >>= xBackground;
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName("Background"))
+ xPropSet->getPropertyValue( "Background" ) >>= xBackground;
if( xBackground.is() )
{
drawing::FillStyle aFillStyle;
bool assigned = ( xBackground->getPropertyValue( "FillStyle" ) >>= aFillStyle );
- if( assigned && aFillStyle != drawing::FillStyle_NONE
- && aFillStyle != drawing::FillStyle_BITMAP )
+ if( assigned && aFillStyle != drawing::FillStyle_NONE )
{
implCreateObjectsFromBackground( xDrawPage );
}
@@ -2102,11 +2390,12 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< css::drawing::XDraw
}
else
{
- SdrObject* pObj = GetSdrObjectFromXShape( rxShape );
+ SdrObject* pObj = SdrObject::getSdrObjectFromXShape(rxShape);
if( pObj )
{
- Graphic aGraphic(SdrExchangeView::GetObjGraphic(*pObj));
+ // tdf#155479 need to signal SVG export
+ Graphic aGraphic(SdrExchangeView::GetObjGraphic(*pObj, true));
// Writer graphic shapes are handled differently
if( mbWriterFilter && aGraphic.GetType() == GraphicType::NONE )
@@ -2175,8 +2464,8 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< css::drawing::XDraw
MetaAction* pAction;
bool bIsTextShapeStarted = false;
const GDIMetaFile& rMtf = aGraphic.GetGDIMetaFile();
- sal_uLong nCount = rMtf.GetActionSize();
- for( sal_uLong nCurAction = 0; nCurAction < nCount; ++nCurAction )
+ size_t nCount = rMtf.GetActionSize();
+ for( size_t nCurAction = 0; nCurAction < nCount; ++nCurAction )
{
pAction = rMtf.GetAction( nCurAction );
const MetaActionType nType = pAction->GetType();
@@ -2227,24 +2516,122 @@ void SVGFilter::implCreateObjectsFromBackground( const Reference< css::drawing::
GDIMetaFile aMtf;
- utl::TempFile aFile;
- aFile.EnableKillingFile();
+ utl::TempFileFast aFile;
+ SvStream* pStream = aFile.GetStream(StreamMode::READWRITE);
- Sequence< PropertyValue > aDescriptor( 3 );
- aDescriptor[0].Name = "FilterName";
- aDescriptor[0].Value <<= OUString( "SVM" );
- aDescriptor[1].Name = "URL";
- aDescriptor[1].Value <<= aFile.GetURL();
- aDescriptor[2].Name = "ExportOnlyBackground";
- aDescriptor[2].Value <<= true;
+ Sequence< PropertyValue > aDescriptor{
+ comphelper::makePropertyValue("FilterName", OUString( "SVM" )),
+ comphelper::makePropertyValue("OutputStream", uno::Reference<XOutputStream>(new utl::OOutputStreamWrapper(*pStream))),
+ comphelper::makePropertyValue("ExportOnlyBackground", true)
+ };
xExporter->setSourceDocument( Reference< XComponent >( rxDrawPage, UNO_QUERY ) );
xExporter->filter( aDescriptor );
- aMtf.Read( *aFile.GetStream( StreamMode::READ ) );
+ pStream->Seek(0);
+ SvmReader aReader( *pStream );
+ aReader.Read( aMtf );
- (*mpObjects)[ rxDrawPage ] = ObjectRepresentation( rxDrawPage, aMtf );
-}
+ bool bIsBitmap = false;
+ bool bIsTiled = false;
+
+ // look for background type
+ Reference< XPropertySet > xPropSet( rxDrawPage, UNO_QUERY );
+ if( xPropSet.is() )
+ {
+ Reference< XPropertySet > xBackground;
+ xPropSet->getPropertyValue( "Background" ) >>= xBackground;
+ if( xBackground.is() )
+ {
+ drawing::FillStyle aFillStyle;
+ if( xBackground->getPropertyValue( "FillStyle" ) >>= aFillStyle )
+ {
+ if( aFillStyle == drawing::FillStyle::FillStyle_BITMAP )
+ {
+ bIsBitmap = true;
+ xBackground->getPropertyValue( "FillBitmapTile" ) >>= bIsTiled;
+
+ // we do not handle tiled background with a row or column offset
+ sal_Int32 nFillBitmapOffsetX = 0, nFillBitmapOffsetY = 0;
+ xBackground->getPropertyValue( "FillBitmapOffsetX" ) >>= nFillBitmapOffsetX;
+ xBackground->getPropertyValue( "FillBitmapOffsetY" ) >>= nFillBitmapOffsetY;
+ bIsTiled = bIsTiled && ( nFillBitmapOffsetX == 0 && nFillBitmapOffsetY == 0 );
+ }
+ }
+ }
+ }
+
+ if( !bIsBitmap )
+ {
+ (*mpObjects)[ rxDrawPage ] = ObjectRepresentation( rxDrawPage, aMtf );
+ return;
+ }
+
+ GDIMetaFile aTiledMtf;
+ bool bBitmapFound = false;
+ MetaAction* pAction;
+ size_t nCount = aMtf.GetActionSize();
+ for( size_t nCurAction = 0; nCurAction < nCount; ++nCurAction )
+ {
+ pAction = aMtf.GetAction( nCurAction );
+ const MetaActionType nType = pAction->GetType();
+ // collect bitmap
+ if( nType == MetaActionType::BMPSCALE || nType == MetaActionType::BMPEXSCALE )
+ {
+ if( bBitmapFound )
+ continue;
+ bBitmapFound = true; // the subsequent bitmaps are still the same just translated
+
+ BitmapChecksum nChecksum = GetBitmapChecksum( pAction );
+ if( maBitmapActionMap.find( nChecksum ) == maBitmapActionMap.end() )
+ {
+ Point aPos; // (0, 0)
+ Size aSize;
+ MetaBitmapActionGetOrigSize( pAction, aSize );
+ MetaAction* pBitmapAction = CreateMetaBitmapAction( pAction, aPos, aSize );
+ if( pBitmapAction )
+ {
+ GDIMetaFile* pEmbeddedBitmapMtf = new GDIMetaFile();
+ pEmbeddedBitmapMtf->AddAction( pBitmapAction );
+ pEmbeddedBitmapMtf->SetPrefSize( aSize );
+ pEmbeddedBitmapMtf->SetPrefMapMode( MapMode(MapUnit::Map100thMM) );
+
+ maBitmapActionMap[ nChecksum ].reset( pEmbeddedBitmapMtf );
+ }
+ }
+
+ if( bIsTiled )
+ {
+ // collect data for <pattern> and <rect>
+ const OUString & sPageId = implGetValidIDFromInterface( rxDrawPage );
+ Point aPos;
+ MetaBitmapActionGetPoint( pAction, aPos );
+ Size aSize;
+ MetaBitmapActionGetSize( pAction, aSize );
+
+ sal_Int32 nSlideWidth = 0, nSlideHeight = 0;
+ xPropSet->getPropertyValue( "Width" ) >>= nSlideWidth;
+ xPropSet->getPropertyValue( "Height" ) >>= nSlideHeight;
+
+ maPatterProps[ sPageId ] = { nChecksum, aPos, aSize, { nSlideWidth, nSlideHeight } };
+
+ // create meta comment action that is used to exporting
+ // a <use> element which points to the group element representing the background
+ const OUString sBgId = getIdForTiledBackground( sPageId, nChecksum );
+ OString sComment = sTiledBackgroundTag + " " + sBgId.toUtf8();
+ MetaCommentAction* pCommentAction = new MetaCommentAction( sComment );
+ if( pCommentAction )
+ aTiledMtf.AddAction( pCommentAction );
+ }
+ }
+ else if( bIsTiled && nType != MetaActionType::CLIPREGION )
+ {
+ aTiledMtf.AddAction( pAction );
+ }
+ }
+
+ (*mpObjects)[ rxDrawPage ] = ObjectRepresentation( rxDrawPage, bIsTiled ? aTiledMtf : aMtf );
+}
OUString SVGFilter::implGetClassFromShape( const Reference< css::drawing::XShape >& rxShape )
{
@@ -2257,14 +2644,16 @@ OUString SVGFilter::implGetClassFromShape( const Reference< css::drawing::XShape
aRet = "Graphic";
else if( aShapeType.lastIndexOf( "drawing.OLE2Shape" ) != -1 )
aRet = "OLE2";
+ else if( aShapeType.lastIndexOf( "drawing.TextShape" ) != -1 )
+ aRet = "TextShape";
else if( aShapeType.lastIndexOf( "presentation.HeaderShape" ) != -1 )
aRet = "Header";
else if( aShapeType.lastIndexOf( "presentation.FooterShape" ) != -1 )
aRet = "Footer";
else if( aShapeType.lastIndexOf( "presentation.DateTimeShape" ) != -1 )
- aRet = "Date/Time";
+ aRet = "DateTime";
else if( aShapeType.lastIndexOf( "presentation.SlideNumberShape" ) != -1 )
- aRet = "Slide_Number";
+ aRet = "PageNumber";
else if( aShapeType.lastIndexOf( "presentation.TitleTextShape" ) != -1 )
aRet = "TitleText";
else if( aShapeType.lastIndexOf( "presentation.OutlinerShape" ) != -1 )
@@ -2311,7 +2700,7 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
{
// to notify to the SVGActionWriter::ImplWriteText method
// that we are dealing with a placeholder shape
- OUStringBuffer aRepresentation = sPlaceholderTag;
+ OUStringBuffer aRepresentation(sPlaceholderTag);
if( !mCreateOjectsCurrentMasterPage.is() )
{
@@ -2320,9 +2709,9 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
}
bool bHasCharSetMap = mTextFieldCharSets.find( mCreateOjectsCurrentMasterPage ) != mTextFieldCharSets.end();
- static const OUString aHeaderId( NSPREFIX "header-field" );
- static const OUString aFooterId( aOOOAttrFooterField );
- static const OUString aDateTimeId( aOOOAttrDateTimeField );
+ static constexpr OUString aHeaderId( NSPREFIX "header-field"_ustr );
+ static constexpr OUString aFooterId( aOOOAttrFooterField );
+ static constexpr OUString aDateTimeId( aOOOAttrDateTimeField );
static const OUString aVariableDateTimeId( aOOOAttrDateTimeField + "-variable" );
const UCharSet * pCharSet = nullptr;
@@ -2429,7 +2818,7 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
// nothing to do here, we always collect the characters needed for these cases.
break;
}
- aRepresentation.append( sDate.makeStringAndClear() );
+ aRepresentation.append( sDate );
}
}
}
@@ -2521,7 +2910,7 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf )
std::vector< ObjectRepresentation > aObjects;
aObjects.emplace_back( Reference< XInterface >(), rMtf );
- SVGFontExport aSVGFontExport( *this, aObjects );
+ SVGFontExport aSVGFontExport( *this, std::move(aObjects) );
Point aPoint100thmm( OutputDevice::LogicToLogic(rMtf.GetPrefMapMode().GetOrigin(), rMtf.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)) );
Size aSize100thmm( OutputDevice::LogicToLogic(rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)) );
@@ -2532,4 +2921,15 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf )
}
}
+void SVGExport::SetEmbeddedBulletGlyph(sal_Unicode cBullet)
+{
+ maEmbeddedBulletGlyphs.insert(cBullet);
+}
+
+bool SVGExport::IsEmbeddedBulletGlyph(sal_Unicode cBullet) const
+{
+ auto it = maEmbeddedBulletGlyphs.find(cBullet);
+ return it != maEmbeddedBulletGlyphs.end();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index e4d61b7de1ee..0d622b4e0fce 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -41,10 +41,11 @@
#include <unotools/mediadescriptor.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/zcodec.hxx>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include "svgfilter.hxx"
@@ -70,24 +71,19 @@ namespace
SVGFilter::SVGFilter( const Reference< XComponentContext >& rxCtx ) :
mxContext( rxCtx ),
mpSVGDoc( nullptr ),
- mpSVGExport( nullptr ),
mpSVGFontExport( nullptr ),
mpSVGWriter( nullptr ),
mbSinglePage( false ),
mnVisiblePage( -1 ),
mpObjects( nullptr ),
- mxSrcDoc(),
- mxDstDoc(),
- maShapeSelection(),
mbExportShapeSelection(false),
- maFilterData(),
- mxDefaultPage(),
+ mbIsPreview(false),
+ mbShouldCompress(false),
mbWriterFilter(false),
mbCalcFilter(false),
mbImpressFilter(false),
mpDefaultSdrPage( nullptr ),
- mbPresentation( false ),
- maOldFieldHdl()
+ mbPresentation( false )
{
}
@@ -105,39 +101,120 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
mbWriterFilter = false;
mbCalcFilter = false;
mbImpressFilter = false;
+ mbShouldCompress = false;
if(mxDstDoc.is()) // Import works for Impress / draw only
return filterImpressOrDraw(rDescriptor);
- if(mxSrcDoc.is())
+ if(!mxSrcDoc)
+ return false;
+
+ for (const PropertyValue& rProp : rDescriptor)
{
- for (const PropertyValue& rProp : rDescriptor)
+ if (rProp.Name == "IsPreview")
{
- if (rProp.Name == "FilterName")
+ rProp.Value >>= mbIsPreview;
+ break;
+ }
+ }
+
+ for (const PropertyValue& rProp : rDescriptor)
+ {
+ if (rProp.Name == "FilterName")
+ {
+ OUString sFilterName;
+ rProp.Value >>= sFilterName;
+ if(sFilterName == "impress_svg_Export")
{
- OUString sFilterName;
- rProp.Value >>= sFilterName;
- if(sFilterName == "impress_svg_Export")
- {
- mbImpressFilter = true;
- return filterImpressOrDraw(rDescriptor);
- }
- else if(sFilterName == "writer_svg_Export")
- {
- mbWriterFilter = true;
- return filterWriterOrCalc(rDescriptor);
- }
- else if(sFilterName == "calc_svg_Export")
+ mbImpressFilter = true;
+ return filterImpressOrDraw(rDescriptor);
+ }
+ else if(sFilterName == "writer_svg_Export")
+ {
+ mbWriterFilter = true;
+ return filterWriterOrCalc(rDescriptor);
+ }
+ else if(sFilterName == "calc_svg_Export")
+ {
+ mbCalcFilter = true;
+ return filterWriterOrCalc(rDescriptor);
+ }
+ else if(sFilterName == "draw_svgz_Export")
+ {
+ mbShouldCompress = true;
+ }
+ break;
+ }
+ }
+ return filterImpressOrDraw(rDescriptor);
+}
+
+css::uno::Reference<css::frame::XController> SVGFilter::fillDrawImpressSelectedPages()
+{
+ uno::Reference<frame::XDesktop2> xDesktop(frame::Desktop::create(mxContext));
+ uno::Reference<frame::XFrame> xFrame = xDesktop->getCurrentFrame(); // Manage headless case
+ if (!xFrame)
+ return {};
+ uno::Reference<frame::XController> xController(xFrame->getController(), uno::UNO_SET_THROW);
+ uno::Reference<drawing::framework::XControllerManager> xManager(xController,
+ uno::UNO_QUERY_THROW);
+ uno::Reference<drawing::framework::XConfigurationController> xConfigController(
+ xManager->getConfigurationController());
+
+ // which view configuration are we in?
+ //
+ // * traverse Impress resources to find slide preview pane, grab selection from there
+ // * otherwise, fallback to current slide
+ //
+ const uno::Sequence<uno::Reference<drawing::framework::XResourceId>> aResIds(
+ xConfigController->getCurrentConfiguration()->getResources(
+ {}, "", drawing::framework::AnchorBindingMode_INDIRECT));
+
+ for (const uno::Reference<drawing::framework::XResourceId>& rResId : aResIds)
+ {
+ // can we somehow obtain the slidesorter from the Impress framework?
+ if (rResId->getResourceURL() == "private:resource/view/SlideSorter")
+ {
+ // got it, grab current selection from there
+ uno::Reference<view::XSelectionSupplier> xSelectionSupplier(
+ xConfigController->getResource(rResId), uno::UNO_QUERY);
+ if (!xSelectionSupplier)
+ continue;
+
+ Sequence<Reference<XInterface>> aSelectedPageSequence;
+ if (xSelectionSupplier->getSelection() >>= aSelectedPageSequence)
+ {
+ for (auto& xInterface : aSelectedPageSequence)
{
- mbCalcFilter = true;
- return filterWriterOrCalc(rDescriptor);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xInterface, uno::UNO_QUERY);
+
+ if (Reference<XPropertySet> xPropSet{ xDrawPage, UNO_QUERY })
+ {
+ Reference<XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo();
+ if (xPropSetInfo && xPropSetInfo->hasPropertyByName("Visible"))
+ {
+ bool bIsSlideVisible = true; // default: true
+ xPropSet->getPropertyValue("Visible") >>= bIsSlideVisible;
+ if (!bIsSlideVisible)
+ continue;
+ }
+ }
+ mSelectedPages.push_back(xDrawPage);
}
+
+ // and stop looping. It is likely not getting better
break;
}
}
- return filterImpressOrDraw(rDescriptor);
}
- return false;
+
+ if (mSelectedPages.empty())
+ {
+ // apparently failed to clean selection - fallback to current page
+ uno::Reference<drawing::XDrawView> xDrawView(xController, uno::UNO_QUERY_THROW);
+ mSelectedPages.push_back(xDrawView->getCurrentPage());
+ }
+ return xController;
}
bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescriptor )
@@ -160,7 +237,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
utl::MediaDescriptor aMediaDescriptor(rDescriptor);
uno::Reference<io::XInputStream> xInputStream;
- xInputStream.set(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()], UNO_QUERY);
+ xInputStream.set(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM], UNO_QUERY);
if(!xInputStream.is())
{
@@ -205,7 +282,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
}
// get that DrawPage's UNO API implementation
- SvxDrawPage* pSvxDrawPage(comphelper::getUnoTunnelImplementation<SvxDrawPage>(xDrawPage));
+ SvxDrawPage* pSvxDrawPage(comphelper::getFromUnoTunnel<SvxDrawPage>(xDrawPage));
if(nullptr == pSvxDrawPage || nullptr == pSvxDrawPage->GetSdrPage())
{
@@ -228,7 +305,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
GraphicFilter aGraphicFilter;
Graphic aGraphic;
const ErrCode nGraphicFilterErrorCode(
- aGraphicFilter.ImportGraphic(aGraphic, OUString(), *aStream));
+ aGraphicFilter.ImportGraphic(aGraphic, u"", *aStream));
if(ERRCODE_NONE != nGraphicFilterErrorCode)
{
@@ -266,17 +343,10 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
for(const auto& rCandidate : aContainer)
{
- if(rCandidate.is())
+ if(rCandidate && PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D != rCandidate->getPrimitive2DID())
{
- // try to cast to BasePrimitive2D implementation
- const drawinglayer::primitive2d::BasePrimitive2D* pBasePrimitive(
- dynamic_cast< const drawinglayer::primitive2d::BasePrimitive2D* >(rCandidate.get()));
-
- if(pBasePrimitive && PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D != pBasePrimitive->getPrimitive2DID())
- {
- bAllAreHiddenGeometry = false;
- break;
- }
+ bAllAreHiddenGeometry = false;
+ break;
}
}
@@ -289,15 +359,15 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
// create a SdrModel-GraphicObject to insert to page
SdrPage* pTargetSdrPage(pSvxDrawPage->GetSdrPage());
- std::unique_ptr< SdrGrafObj, SdrObjectFreeOp > aNewSdrGrafObj;
+ rtl::Reference< SdrGrafObj > aNewSdrGrafObj;
// tdf#118232 only add an SdrGrafObj when we have Geometry
if(!bContainsNoGeometry)
{
- aNewSdrGrafObj.reset(
+ aNewSdrGrafObj =
new SdrGrafObj(
pTargetSdrPage->getSdrModelFromSdrPage(),
- aGraphic));
+ aGraphic);
}
// Evtl. adapt the GraphicPrefSize to target-MapMode of target-Model
@@ -325,7 +395,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
static_cast< double >(pTargetSdrPage->GetRightBorder()) / aPageSize.Width() +
static_cast< double >(pTargetSdrPage->GetUpperBorder()) / aPageSize.Height() +
static_cast< double >(pTargetSdrPage->GetLowerBorder()) / aPageSize.Height()) / 4.0);
- const tools::Long nAllBorder(basegfx::fround((aGraphicSize.Width() + aGraphicSize.Height()) * fBorderRelation * 0.5));
+ const tools::Long nAllBorder(basegfx::fround<tools::Long>((aGraphicSize.Width() + aGraphicSize.Height()) * fBorderRelation * 0.5));
// Adapt PageSize and Border stuff. To get all MasterPages and PresObjs
// correctly adapted, do not just use
@@ -353,7 +423,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
aGraphicSize));
// insert to page (owner change of SdrGrafObj)
- pTargetSdrPage->InsertObject(aNewSdrGrafObj.release());
+ pTargetSdrPage->InsertObject(aNewSdrGrafObj.get());
}
// done - set positive result now
@@ -388,68 +458,9 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
}
}
- uno::Reference<frame::XDesktop2> xDesktop(frame::Desktop::create(mxContext));
uno::Reference<frame::XController > xController;
- if (xDesktop->getCurrentFrame().is() && !bPageProvided) // Manage headless case
- {
- uno::Reference<frame::XFrame> xFrame(xDesktop->getCurrentFrame(), uno::UNO_SET_THROW);
- xController.set(xFrame->getController(), uno::UNO_SET_THROW);
- uno::Reference<drawing::XDrawView> xDrawView(xController, uno::UNO_QUERY_THROW);
- uno::Reference<drawing::framework::XControllerManager> xManager(xController, uno::UNO_QUERY_THROW);
- uno::Reference<drawing::framework::XConfigurationController> xConfigController(xManager->getConfigurationController());
-
- // which view configuration are we in?
- //
- // * traverse Impress resources to find slide preview pane, grab selection from there
- // * otherwise, fallback to current slide
- //
- const uno::Sequence<uno::Reference<drawing::framework::XResourceId> > aResIds(
- xConfigController->getCurrentConfiguration()->getResources(
- uno::Reference<drawing::framework::XResourceId>(),
- "",
- drawing::framework::AnchorBindingMode_INDIRECT));
-
- for( const uno::Reference<drawing::framework::XResourceId>& rResId : aResIds )
- {
- // can we somehow obtain the slidesorter from the Impress framework?
- if( rResId->getResourceURL() == "private:resource/view/SlideSorter" )
- {
- // got it, grab current selection from there
- uno::Reference<drawing::framework::XResource> xRes(
- xConfigController->getResource(rResId));
-
- uno::Reference< view::XSelectionSupplier > xSelectionSupplier(
- xRes,
- uno::UNO_QUERY );
- if( xSelectionSupplier.is() )
- {
- uno::Any aSelection = xSelectionSupplier->getSelection();
- if( aSelection.hasValue() )
- {
- Sequence< Reference< XInterface > > aSelectedPageSequence;
- aSelection >>= aSelectedPageSequence;
- mSelectedPages.resize( aSelectedPageSequence.getLength() );
- for( size_t j=0; j<mSelectedPages.size(); ++j )
- {
- uno::Reference< drawing::XDrawPage > xDrawPage( aSelectedPageSequence[j],
- uno::UNO_QUERY );
- mSelectedPages[j] = xDrawPage;
- }
-
- // and stop looping. It is likely not getting better
- break;
- }
- }
- }
- }
-
- if( mSelectedPages.empty() )
- {
- // apparently failed to clean selection - fallback to current page
- mSelectedPages.resize( 1 );
- mSelectedPages[0] = xDrawView->getCurrentPage();
- }
- }
+ if (!bPageProvided)
+ xController = fillDrawImpressSelectedPages();
/*
* Export all slides, or requested "PagePos"
@@ -468,19 +479,30 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
{
sal_Int32 nDPCount = xDrawPages->getCount();
- mSelectedPages.resize( nPageToExport != -1 ? 1 : nDPCount );
sal_Int32 i;
for( i = 0; i < nDPCount; ++i )
{
if( nPageToExport != -1 && nPageToExport == i )
{
uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), uno::UNO_QUERY );
- mSelectedPages[0] = xDrawPage;
+ mSelectedPages.push_back(xDrawPage);
}
else
{
uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), uno::UNO_QUERY );
- mSelectedPages[i] = xDrawPage;
+ Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
+ bool bIsSlideVisible = true; // default: true
+ if (xPropSet.is())
+ {
+ Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
+ if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("Visible"))
+ {
+ xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible;
+ if (!bIsSlideVisible)
+ continue;
+ }
+ }
+ mSelectedPages.push_back(xDrawPage);
}
}
}
@@ -527,8 +549,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
sal_Int32 i = 0;
for (auto const& masterPageTarget : aMasterPageTargetSet)
{
- uno::Reference< drawing::XDrawPage > xMasterPage( masterPageTarget, uno::UNO_QUERY );
- mMasterPageTargets[i++] = xMasterPage;
+ mMasterPageTargets[i++].set(masterPageTarget, uno::UNO_QUERY);
}
bRet = implExport( rDescriptor );
@@ -561,11 +582,8 @@ bool SVGFilter::filterWriterOrCalc( const Sequence< PropertyValue >& rDescriptor
uno::Reference<frame::XDesktop2> xDesktop(frame::Desktop::create(mxContext));
uno::Reference<frame::XController > xController;
- if (xDesktop->getCurrentFrame().is())
- {
- uno::Reference<frame::XFrame> xFrame(xDesktop->getCurrentFrame(), uno::UNO_SET_THROW);
+ if (uno::Reference<frame::XFrame> xFrame = xDesktop->getCurrentFrame())
xController.set(xFrame->getController(), uno::UNO_SET_THROW);
- }
Reference< view::XSelectionSupplier > xSelection (xController, UNO_QUERY);
if (!xSelection.is())
@@ -574,9 +592,8 @@ bool SVGFilter::filterWriterOrCalc( const Sequence< PropertyValue >& rDescriptor
// Select only one draw page
uno::Reference< drawing::XDrawPagesSupplier > xDrawPagesSupplier( mxSrcDoc, uno::UNO_QUERY );
uno::Reference<drawing::XDrawPages> xDrawPages = xDrawPagesSupplier->getDrawPages();
- uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex(0), uno::UNO_QUERY );
mSelectedPages.resize( 1 );
- mSelectedPages[0] = xDrawPage;
+ mSelectedPages[0].set(xDrawPages->getByIndex(0), uno::UNO_QUERY);
bool bGotSelection = xSelection->getSelection() >>= maShapeSelection;
@@ -669,7 +686,7 @@ private:
return;
}
- const sal_uLong nStreamLen(aStream->remainingSize());
+ const sal_uInt64 nStreamLen(aStream->remainingSize());
if(aStream->GetError())
{
@@ -677,8 +694,8 @@ private:
}
mnFirstRead = aStream->ReadBytes(
- &mnFirstBytes[0],
- std::min(nStreamLen, sal_uLong(mnFirstBytesSize)));
+ &mnFirstBytes.getArray()[0],
+ std::min(nStreamLen, static_cast<sal_uInt64>(mnFirstBytesSize)));
if(aStream->GetError())
{
@@ -704,7 +721,7 @@ private:
if(!mbIsSVG)
{
const sal_Int8 aMagic[] = {'<', 's', 'v', 'g'};
- const sal_Int32 nMagicSize(SAL_N_ELEMENTS(aMagic));
+ const sal_Int32 nMagicSize(std::size(aMagic));
mbIsSVG = impCheckForMagic(aMagic, nMagicSize);
}
@@ -712,7 +729,7 @@ private:
if(!mbIsSVG)
{
const sal_Int8 aMagic[] = {'D', 'O', 'C', 'T', 'Y', 'P', 'E', ' ', 's', 'v', 'g'};
- const sal_Int32 nMagicSize(SAL_N_ELEMENTS(aMagic));
+ const sal_Int32 nMagicSize(std::size(aMagic));
mbIsSVG = impCheckForMagic(aMagic, nMagicSize);
}
@@ -724,7 +741,6 @@ public:
SVGFileInfo(
const uno::Reference<io::XInputStream>& xInput)
: mxInput(xInput),
- mnFirstBytes(),
mnFirstBytesSize(2048),
mnFirstRead(0),
mbProcessed(false),
@@ -757,7 +773,7 @@ public:
{
// xmlns:ooo
const sal_Int8 aMagic[] = {'x', 'm', 'l', 'n', 's', ':', 'o', 'o', 'o'};
- const sal_Int32 nMagicSize(SAL_N_ELEMENTS(aMagic));
+ const sal_Int32 nMagicSize(std::size(aMagic));
return impCheckForMagic(aMagic, nMagicSize);
}
@@ -773,7 +789,7 @@ public:
{
// ooo:meta_slides
const sal_Int8 aMagic[] = {'o', 'o', 'o', ':', 'm', 'e', 't', 'a', '_', 's', 'l', 'i', 'd', 'e', 's'};
- const sal_Int32 nMagicSize(SAL_N_ELEMENTS(aMagic));
+ const sal_Int32 nMagicSize(std::size(aMagic));
return impCheckForMagic(aMagic, nMagicSize);
}
@@ -787,7 +803,7 @@ public:
OUString SAL_CALL SVGFilter::detect(Sequence<PropertyValue>& rDescriptor)
{
utl::MediaDescriptor aMediaDescriptor(rDescriptor);
- uno::Reference<io::XInputStream> xInput(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()], UNO_QUERY);
+ uno::Reference<io::XInputStream> xInput(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM], UNO_QUERY);
OUString aRetval;
if (!xInput.is())
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index 5bce011ba7fb..916bd9d263ad 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_SVG_SVGFILTER_HXX
-#define INCLUDED_FILTER_SOURCE_SVG_SVGFILTER_HXX
+#pragma once
#include <memory>
@@ -29,6 +28,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/xml/sax/XWriter.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
@@ -53,9 +53,12 @@ using namespace ::com::sun::star::xml::sax;
#define SVG_EXPORT_ALLPAGES ((sal_Int32)-1)
+namespace com::sun::star::frame { class XController; }
// Placeholder tag used into the ImplWriteActions method to filter text placeholder fields
-const OUString sPlaceholderTag( "<[:isPlaceholder:]>" );
+inline constexpr OUString sPlaceholderTag = u"<[:isPlaceholder:]>"_ustr;
+// This tag is used for exporting a slide background made of tiled bitmaps
+inline constexpr OString sTiledBackgroundTag = "SLIDE_BACKGROUND"_ostr;
class SVGExport : public SvXMLExport
{
@@ -65,6 +68,7 @@ class SVGExport : public SvXMLExport
bool mbIsUseOpacity;
bool mbIsUseNativeTextDecoration;
bool mbIsUsePositionedCharacters;
+ std::set<sal_Unicode> maEmbeddedBulletGlyphs;
public:
@@ -83,6 +87,9 @@ public:
void writeMtf( const GDIMetaFile& rMtf );
+ void SetEmbeddedBulletGlyph(sal_Unicode cBullet);
+ bool IsEmbeddedBulletGlyph(sal_Unicode cBullet) const;
+
protected:
virtual void ExportStyles_( bool /* bUsed */ ) override {}
@@ -153,6 +160,18 @@ struct EqualityBitmap
const ObjectRepresentation& rObjRep2 ) const;
};
+// This must match the same type definition in svgwriter.hxx
+typedef std::unordered_map< BitmapChecksum, std::unique_ptr< GDIMetaFile > > MetaBitmapActionMap;
+
+struct PatternData
+{
+ BitmapChecksum aBitmapChecksum;
+ Point aPos;
+ Size aSize;
+ Size aSlideSize;
+};
+typedef std::map<OUString, PatternData> PatternPropertySet;
+
class SVGFontExport;
class SVGActionWriter;
class EditFieldInfo;
@@ -178,7 +197,7 @@ private:
Reference< XComponentContext > mxContext;
SvXMLElementExport* mpSVGDoc;
- SVGExport* mpSVGExport;
+ rtl::Reference<SVGExport> mpSVGExport;
SVGFontExport* mpSVGFontExport;
SVGActionWriter* mpSVGWriter;
bool mbSinglePage;
@@ -191,7 +210,10 @@ private:
bool mbExportShapeSelection;
Sequence< PropertyValue > maFilterData;
Reference< css::drawing::XDrawPage > mxDefaultPage;
+ Reference<css::task::XStatusIndicator> mxStatusIndicator;
std::vector< Reference< css::drawing::XDrawPage > > mSelectedPages;
+ bool mbIsPreview;
+ bool mbShouldCompress;
bool mbWriterFilter;
bool mbCalcFilter;
@@ -210,6 +232,8 @@ private:
mTextShapeIdListMap;
MetaBitmapActionSet mEmbeddedBitmapActionSet;
ObjectMap mEmbeddedBitmapActionMap;
+ MetaBitmapActionMap maBitmapActionMap;
+ PatternPropertySet maPatterProps;
std::vector< Reference< css::drawing::XDrawPage > > mMasterPageTargets;
Link<EditFieldInfo*,void> maOldFieldHdl;
@@ -229,6 +253,8 @@ private:
void implEmbedBulletGlyphs();
void implEmbedBulletGlyph( sal_Unicode cBullet, const OUString & sPathData );
void implExportTextEmbeddedBitmaps();
+ void implExportBackgroundBitmaps();
+ void implExportTiledBackground();
void implGenerateScript();
bool implExportDocument();
@@ -270,6 +296,8 @@ private:
bool filterImpressOrDraw( const Sequence< PropertyValue >& rDescriptor );
bool filterWriterOrCalc( const Sequence< PropertyValue >& rDescriptor );
+ css::uno::Reference<css::frame::XController> fillDrawImpressSelectedPages();
+
protected:
// XFilter
@@ -296,6 +324,4 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
};
-#endif // INCLUDED_FILTER_SOURCE_SVG_SVGFILTER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index ab730d3d2774..014975b8d229 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -29,6 +29,7 @@
#include <vcl/settings.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <xmloff/namespacemap.hxx>
+#include <o3tl/string_view.hxx>
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
@@ -36,9 +37,9 @@
const sal_Int32 nFontEM = 2048;
-SVGFontExport::SVGFontExport( SVGExport& rExport, const ::std::vector< ObjectRepresentation >& rObjects ) :
+SVGFontExport::SVGFontExport( SVGExport& rExport, ::std::vector< ObjectRepresentation >&& rObjects ) :
mrExport( rExport ),
- maObjects( rObjects ),
+ maObjects( std::move(rObjects) ),
mnCurFontId( 0 )
{
}
@@ -251,7 +252,6 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
void SVGFontExport::implEmbedGlyph( OutputDevice const & rOut, const OUString& rCellStr )
{
tools::PolyPolygon aPolyPoly;
- const sal_Unicode nSpace = ' ';
if( !rOut.GetTextOutline( aPolyPoly, rCellStr ) )
return;
@@ -260,14 +260,10 @@ void SVGFontExport::implEmbedGlyph( OutputDevice const & rOut, const OUString& r
aPolyPoly.Scale( 1.0, -1.0 );
- if( !rOut.GetTextBoundRect( aBoundRect, rCellStr ) )
+ if (rCellStr == " " || !rOut.GetTextBoundRect(aBoundRect, rCellStr))
aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( rCellStr ), 0 ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "unicode", rCellStr );
-
- if( rCellStr[ 0 ] == nSpace && rCellStr.getLength() == 1 )
- aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( OUString(' ') ), 0 ) );
-
mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", OUString::number( aBoundRect.GetWidth() ) );
const OUString aPathString( SVGActionWriter::GetPathString( aPolyPoly, false ) );
@@ -307,9 +303,9 @@ void SVGFontExport::EmbedFonts()
}
-OUString SVGFontExport::GetMappedFontName( const OUString& rFontName ) const
+OUString SVGFontExport::GetMappedFontName( std::u16string_view rFontName ) const
{
- OUString aRet( rFontName.getToken( 0, ';' ) );
+ OUString aRet( o3tl::getToken(rFontName, 0, ';' ) );
if( mnCurFontId )
aRet += " embedded";
diff --git a/filter/source/svg/svgfontexport.hxx b/filter/source/svg/svgfontexport.hxx
index 8b9f5440fa40..259196f9e031 100644
--- a/filter/source/svg/svgfontexport.hxx
+++ b/filter/source/svg/svgfontexport.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_SVG_SVGFONTEXPORT_HXX
-#define INCLUDED_FILTER_SOURCE_SVG_SVGFONTEXPORT_HXX
+#pragma once
#include <sal/config.h>
@@ -63,13 +62,11 @@ private:
public:
- SVGFontExport( SVGExport& rExport, const ::std::vector< ObjectRepresentation >& rObjects );
+ SVGFontExport( SVGExport& rExport, ::std::vector< ObjectRepresentation >&& rObjects );
~SVGFontExport();
void EmbedFonts();
- OUString GetMappedFontName( const OUString& rFontName ) const;
+ OUString GetMappedFontName( std::u16string_view rFontName ) const;
};
-#endif // INCLUDED_FILTER_SOURCE_SVG_SVGFONTEXPORT_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 9defa7812e67..b7b9d741ebef 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -29,12 +29,18 @@
#include <vcl/metric.hxx>
#include <vcl/outdev.hxx>
#include <vcl/settings.hxx>
+#include <vcl/filter/SvmReader.hxx>
+#include <vcl/filter/SvmWriter.hxx>
#include <tools/fract.hxx>
#include <tools/helpers.hxx>
#include <tools/stream.hxx>
#include <xmloff/namespacemap.hxx>
#include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
#include <i18nlangtag/languagetag.hxx>
+#include <o3tl/string_view.hxx>
+#include <svx/svdomedia.hxx>
+#include <basegfx/utils/bgradient.hxx>
+#include <tools/vcompat.hxx>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
@@ -46,50 +52,51 @@
#include <memory>
-
-const char aPrefixClipPathId[] = "clip_path_";
-
-const char aXMLElemG[] = "g";
-const char aXMLElemDefs[] = "defs";
-const char aXMLElemText[] = "text";
-const char aXMLElemTspan[] = "tspan";
-const char aXMLElemLinearGradient[] = "linearGradient";
-const char aXMLElemStop[] = "stop";
-
-const char aXMLAttrTransform[] = "transform";
-const char aXMLAttrStyle[] = "style";
-const char aXMLAttrId[] = "id";
-const char aXMLAttrX[] = "x";
-const char aXMLAttrY[] = "y";
-const char aXMLAttrX1[] = "x1";
-const char aXMLAttrY1[] = "y1";
-const char aXMLAttrX2[] = "x2";
-const char aXMLAttrY2[] = "y2";
-const char aXMLAttrCX[] = "cx";
-const char aXMLAttrCY[] = "cy";
-const char aXMLAttrRX[] = "rx";
-const char aXMLAttrRY[] = "ry";
-const char aXMLAttrWidth[] = "width";
-const char aXMLAttrHeight[] = "height";
-const char aXMLAttrStrokeWidth[] = "stroke-width";
-const char aXMLAttrFill[] = "fill";
-const char aXMLAttrFontFamily[] = "font-family";
-const char aXMLAttrFontSize[] = "font-size";
-const char aXMLAttrFontStyle[] = "font-style";
-const char aXMLAttrFontWeight[] = "font-weight";
-const char aXMLAttrTextDecoration[] = "text-decoration";
-const char aXMLAttrXLinkHRef[] = "xlink:href";
-const char aXMLAttrGradientUnits[] = "gradientUnits";
-const char aXMLAttrOffset[] = "offset";
-const char aXMLAttrStopColor[] = "stop-color";
-const char aXMLAttrStrokeLinejoin[] = "stroke-linejoin";
-const char aXMLAttrStrokeLinecap[] = "stroke-linecap";
-
-
-PushFlags SVGContextHandler::getPushFlags() const
+using namespace ::com::sun::star::style;
+
+constexpr OUString aPrefixClipPathId = u"clip_path_"_ustr;
+
+constexpr OUString aXMLElemG = u"g"_ustr;
+constexpr OUString aXMLElemDefs = u"defs"_ustr;
+constexpr OUString aXMLElemText = u"text"_ustr;
+constexpr OUString aXMLElemTspan = u"tspan"_ustr;
+constexpr OUString aXMLElemLinearGradient = u"linearGradient"_ustr;
+constexpr OUString aXMLElemStop = u"stop"_ustr;
+
+constexpr OUString aXMLAttrTransform = u"transform"_ustr;
+constexpr OUString aXMLAttrStyle = u"style"_ustr;
+constexpr OUString aXMLAttrId = u"id"_ustr;
+constexpr OUString aXMLAttrX = u"x"_ustr;
+constexpr OUString aXMLAttrY = u"y"_ustr;
+constexpr OUString aXMLAttrX1 = u"x1"_ustr;
+constexpr OUString aXMLAttrY1 = u"y1"_ustr;
+constexpr OUString aXMLAttrX2 = u"x2"_ustr;
+constexpr OUString aXMLAttrY2 = u"y2"_ustr;
+constexpr OUString aXMLAttrCX = u"cx"_ustr;
+constexpr OUString aXMLAttrCY = u"cy"_ustr;
+constexpr OUString aXMLAttrRX = u"rx"_ustr;
+constexpr OUString aXMLAttrRY = u"ry"_ustr;
+constexpr OUString aXMLAttrWidth = u"width"_ustr;
+constexpr OUString aXMLAttrHeight = u"height"_ustr;
+constexpr OUString aXMLAttrStrokeWidth = u"stroke-width"_ustr;
+constexpr OUString aXMLAttrFill = u"fill"_ustr;
+constexpr OUString aXMLAttrFontFamily = u"font-family"_ustr;
+constexpr OUString aXMLAttrFontSize = u"font-size"_ustr;
+constexpr OUString aXMLAttrFontStyle = u"font-style"_ustr;
+constexpr OUString aXMLAttrFontWeight = u"font-weight"_ustr;
+constexpr OUString aXMLAttrTextDecoration = u"text-decoration"_ustr;
+constexpr OUString aXMLAttrXLinkHRef = u"xlink:href"_ustr;
+constexpr OUString aXMLAttrGradientUnits = u"gradientUnits"_ustr;
+constexpr OUString aXMLAttrOffset = u"offset"_ustr;
+constexpr OUString aXMLAttrStopColor = u"stop-color"_ustr;
+constexpr OUString aXMLAttrStrokeLinejoin = u"stroke-linejoin"_ustr;
+constexpr OUString aXMLAttrStrokeLinecap = u"stroke-linecap"_ustr;
+
+
+vcl::PushFlags SVGContextHandler::getPushFlags() const
{
if (maStateStack.empty())
- return PushFlags::NONE;
+ return vcl::PushFlags::NONE;
const PartialState& rPartialState = maStateStack.top();
return rPartialState.meFlags;
@@ -100,17 +107,17 @@ SVGState& SVGContextHandler::getCurrentState()
return maCurrentState;
}
-void SVGContextHandler::pushState( PushFlags eFlags )
+void SVGContextHandler::pushState( vcl::PushFlags eFlags )
{
PartialState aPartialState;
aPartialState.meFlags = eFlags;
- if (eFlags & PushFlags::FONT)
+ if (eFlags & vcl::PushFlags::FONT)
{
aPartialState.setFont( maCurrentState.aFont );
}
- if (eFlags & PushFlags::CLIPREGION)
+ if (eFlags & vcl::PushFlags::CLIPREGION)
{
aPartialState.mnRegionClipPathId = maCurrentState.nRegionClipPathId;
}
@@ -124,14 +131,14 @@ void SVGContextHandler::popState()
return;
const PartialState& rPartialState = maStateStack.top();
- PushFlags eFlags = rPartialState.meFlags;
+ vcl::PushFlags eFlags = rPartialState.meFlags;
- if (eFlags & PushFlags::FONT)
+ if (eFlags & vcl::PushFlags::FONT)
{
maCurrentState.aFont = rPartialState.getFont( vcl::Font() );
}
- if (eFlags & PushFlags::CLIPREGION)
+ if (eFlags & vcl::PushFlags::CLIPREGION)
{
maCurrentState.nRegionClipPathId = rPartialState.mnRegionClipPathId;
}
@@ -170,8 +177,8 @@ void SVGAttributeWriter::ImplGetColorStr( const Color& rColor, OUString& rColorS
}
-void SVGAttributeWriter::AddColorAttr( const char* pColorAttrName,
- const char* pColorOpacityAttrName,
+void SVGAttributeWriter::AddColorAttr( const OUString& pColorAttrName,
+ const OUString& pColorOpacityAttrName,
const Color& rColor )
{
OUString aColor, aColorOpacity;
@@ -215,8 +222,8 @@ void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFi
void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const Gradient& rGradient, OUString& rGradientId )
{
if( rObjRect.GetWidth() && rObjRect.GetHeight() &&
- ( rGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial ||
- rGradient.GetStyle() == GradientStyle::Radial || rGradient.GetStyle() == GradientStyle::Elliptical ) )
+ ( rGradient.GetStyle() == css::awt::GradientStyle_LINEAR || rGradient.GetStyle() == css::awt::GradientStyle_AXIAL ||
+ rGradient.GetStyle() == css::awt::GradientStyle_RADIAL || rGradient.GetStyle() == css::awt::GradientStyle_ELLIPTICAL ) )
{
SvXMLElementExport aDesc( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, true, true );
Color aStartColor( rGradient.GetStartColor() ), aEndColor( rGradient.GetEndColor() );
@@ -244,7 +251,7 @@ void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const
std::unique_ptr< SvXMLElementExport > apGradient;
OUString aColorStr;
- if( rGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial )
+ if( rGradient.GetStyle() == css::awt::GradientStyle_LINEAR || rGradient.GetStyle() == css::awt::GradientStyle_AXIAL )
{
tools::Polygon aLinePoly( 2 );
@@ -263,9 +270,9 @@ void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const
// write stop values
double fBorder = static_cast< double >( rGradient.GetBorder() ) *
- ( ( rGradient.GetStyle() == GradientStyle::Axial ) ? 0.005 : 0.01 );
+ ( ( rGradient.GetStyle() == css::awt::GradientStyle_AXIAL ) ? 0.005 : 0.01 );
- ImplGetColorStr( ( rGradient.GetStyle() == GradientStyle::Axial ) ? aEndColor : aStartColor, aColorStr );
+ ImplGetColorStr( ( rGradient.GetStyle() == css::awt::GradientStyle_AXIAL ) ? aEndColor : aStartColor, aColorStr );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, OUString::number( fBorder ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStopColor, aColorStr );
@@ -273,7 +280,7 @@ void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const
SvXMLElementExport aDesc2( mrExport, XML_NAMESPACE_NONE, aXMLElemStop, true, true );
}
- if( rGradient.GetStyle() == GradientStyle::Axial )
+ if( rGradient.GetStyle() == css::awt::GradientStyle_AXIAL )
{
ImplGetColorStr( aStartColor, aColorStr );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, OUString::number( 0.5 ) );
@@ -284,7 +291,7 @@ void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const
}
}
- if( rGradient.GetStyle() != GradientStyle::Axial )
+ if( rGradient.GetStyle() != css::awt::GradientStyle_AXIAL )
fBorder = 0.0;
ImplGetColorStr( aEndColor, aColorStr );
@@ -299,8 +306,7 @@ void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const
{
const double fCenterX = rObjRect.Left() + rObjRect.GetWidth() * rGradient.GetOfsX() * 0.01;
const double fCenterY = rObjRect.Top() + rObjRect.GetHeight() * rGradient.GetOfsY() * 0.01;
- const double fRadius = sqrt( static_cast< double >( rObjRect.GetWidth() ) * rObjRect.GetWidth() +
- rObjRect.GetHeight() * rObjRect.GetHeight() ) * 0.5;
+ const double fRadius = std::hypot(rObjRect.GetWidth(), rObjRect.GetHeight()) * 0.5;
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrGradientUnits, "userSpaceOnUse" );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCX, OUString::number( ImplRound( fCenterX ) ) );
@@ -461,12 +467,6 @@ SVGTextWriter::SVGTextWriter(SVGExport& rExport, SVGAttributeWriter& rAttributeW
mrActionWriter(rActionWriter),
mpVDev( nullptr ),
mbIsTextShapeStarted( false ),
- mrTextShape(),
- msShapeId(),
- mrParagraphEnumeration(),
- mrCurrentTextParagraph(),
- mrTextPortionEnumeration(),
- mrCurrentTextPortion(),
mpTextEmbeddedBitmapMtf( nullptr ),
mpTargetMapMode( nullptr ),
mnLeftTextPortionLength( 0 ),
@@ -476,14 +476,10 @@ SVGTextWriter::SVGTextWriter(SVGExport& rExport, SVGAttributeWriter& rAttributeW
mbIsNewListItem( false ),
meNumberingType(0),
mcBulletChar(0),
- maBulletListItemMap(),
mbIsListLevelStyleImage( false ),
mbLineBreak( false ),
mbIsURLField( false ),
- msUrl(),
- mbIsPlaceholderShape( false ),
- maCurrentFont(),
- maParentFont()
+ mbIsPlaceholderShape( false )
{
}
@@ -594,18 +590,18 @@ bool SVGTextWriter::implGetTextPositionFromBitmap( const MetaAction* pAction, Po
* 0 if no text found and end of text shape is reached
* 1 if text found!
*/
-sal_Int32 SVGTextWriter::setTextPosition(const GDIMetaFile& rMtf, sal_uLong& nCurAction,
+sal_Int32 SVGTextWriter::setTextPosition(const GDIMetaFile& rMtf, size_t& nCurAction,
sal_uInt32 nWriteFlags)
{
Point aPos;
- sal_uLong nCount = rMtf.GetActionSize();
+ size_t nCount = rMtf.GetActionSize();
bool bEOL = false;
bool bEOP = false;
bool bETS = false;
bool bConfigured = false;
bool bEmpty = true;
- sal_uLong nActionIndex = nCurAction + 1;
+ size_t nActionIndex = nCurAction + 1;
for( ; nActionIndex < nCount; ++nActionIndex )
{
const MetaAction* pAction = rMtf.GetAction( nActionIndex );
@@ -636,13 +632,18 @@ sal_Int32 SVGTextWriter::setTextPosition(const GDIMetaFile& rMtf, sal_uLong& nCu
const MetaFloatTransparentAction* pA
= static_cast<const MetaFloatTransparentAction*>(pAction);
GDIMetaFile aTmpMtf(pA->GetGDIMetaFile());
- sal_uLong nTmpAction = 0;
+ size_t nTmpAction = 0;
if (setTextPosition(aTmpMtf, nTmpAction, nWriteFlags) == 1)
{
// Text is found in the inner metafile.
bConfigured = true;
+
+ // nTextFound == 1 is only possible if the inner setTextPosition() had bEmpty ==
+ // false, adjust our bEmpty accordingly.
+ bEmpty = false;
+
mrActionWriter.StartMask(pA->GetPoint(), pA->GetSize(), pA->GetGradient(),
- nWriteFlags, &maTextOpacity);
+ nWriteFlags, pA->getSVGTransparencyColorStops(), &maTextOpacity);
}
}
break;
@@ -734,12 +735,12 @@ sal_Int32 SVGTextWriter::setTextPosition(const GDIMetaFile& rMtf, sal_uLong& nCu
}
-void SVGTextWriter::setTextProperties( const GDIMetaFile& rMtf, sal_uLong nCurAction )
+void SVGTextWriter::setTextProperties( const GDIMetaFile& rMtf, size_t nCurAction )
{
- sal_uLong nCount = rMtf.GetActionSize();
+ size_t nCount = rMtf.GetActionSize();
bool bEOP = false;
bool bConfigured = false;
- for( sal_uLong nActionIndex = nCurAction + 1; nActionIndex < nCount; ++nActionIndex )
+ for( size_t nActionIndex = nCurAction + 1; nActionIndex < nCount; ++nActionIndex )
{
const MetaAction* pAction = rMtf.GetAction( nActionIndex );
const MetaActionType nType = pAction->GetType();
@@ -969,149 +970,159 @@ bool SVGTextWriter::nextParagraph()
mbIsNewListItem = false;
mbIsListLevelStyleImage = false;
- if( mrParagraphEnumeration.is() && mrParagraphEnumeration->hasMoreElements() )
+ if( !mrParagraphEnumeration || !mrParagraphEnumeration->hasMoreElements() )
+ return false;
+
+ Reference < XTextContent > xTextContent( mrParagraphEnumeration->nextElement(), UNO_QUERY_THROW );
+ if( xTextContent.is() )
{
- Reference < XTextContent > xTextContent( mrParagraphEnumeration->nextElement(), UNO_QUERY_THROW );
- if( xTextContent.is() )
- {
- Reference< XServiceInfo > xServiceInfo( xTextContent, UNO_QUERY_THROW );
+ Reference< XServiceInfo > xServiceInfo( xTextContent, UNO_QUERY_THROW );
#if OSL_DEBUG_LEVEL > 0
- OUString sInfo;
+ OUString sInfo;
#endif
- if( xServiceInfo->supportsService( "com.sun.star.text.Paragraph" ) )
+ if( xServiceInfo->supportsService( "com.sun.star.text.Paragraph" ) )
+ {
+ mrCurrentTextParagraph.set( xTextContent );
+ Reference< XPropertySet > xPropSet( xTextContent, UNO_QUERY_THROW );
+ Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
+ if( xPropSetInfo->hasPropertyByName( "NumberingLevel" ) )
{
- mrCurrentTextParagraph.set( xTextContent );
- Reference< XPropertySet > xPropSet( xTextContent, UNO_QUERY_THROW );
- Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
- if( xPropSetInfo->hasPropertyByName( "NumberingLevel" ) )
+ sal_Int16 nListLevel = 0;
+ if( xPropSet->getPropertyValue( "NumberingLevel" ) >>= nListLevel )
{
- sal_Int16 nListLevel = 0;
- if( xPropSet->getPropertyValue( "NumberingLevel" ) >>= nListLevel )
- {
- mbIsNewListItem = true;
+ mbIsNewListItem = true;
#if OSL_DEBUG_LEVEL > 0
- sInfo = "NumberingLevel: " + OUString::number( nListLevel );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "style", sInfo );
+ sInfo = "NumberingLevel: " + OUString::number( nListLevel );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "style", sInfo );
#endif
- Reference< XIndexReplace > xNumRules;
- if( xPropSetInfo->hasPropertyByName( "NumberingRules" ) )
- {
- xPropSet->getPropertyValue( "NumberingRules" ) >>= xNumRules;
- }
- if( xNumRules.is() && ( nListLevel < xNumRules->getCount() ) )
+ Reference< XIndexReplace > xNumRules;
+ if( xPropSetInfo->hasPropertyByName( "NumberingRules" ) )
+ {
+ xPropSet->getPropertyValue( "NumberingRules" ) >>= xNumRules;
+ }
+ if( xNumRules.is() && ( nListLevel < xNumRules->getCount() ) )
+ {
+ bool bIsNumbered = true;
+ OUString sNumberingIsNumber("NumberingIsNumber");
+ if( xPropSetInfo->hasPropertyByName( sNumberingIsNumber ) )
{
- bool bIsNumbered = true;
- OUString sNumberingIsNumber("NumberingIsNumber");
- if( xPropSetInfo->hasPropertyByName( sNumberingIsNumber ) )
+ if( !(xPropSet->getPropertyValue( sNumberingIsNumber ) >>= bIsNumbered ) )
{
- if( !(xPropSet->getPropertyValue( sNumberingIsNumber ) >>= bIsNumbered ) )
- {
- OSL_FAIL( "numbered paragraph without number info" );
- bIsNumbered = false;
- }
+ OSL_FAIL( "numbered paragraph without number info" );
+ bIsNumbered = false;
+ }
#if OSL_DEBUG_LEVEL > 0
- if( bIsNumbered )
- {
- sInfo = "true";
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "is-numbered", sInfo );
- }
-#endif
+ if( bIsNumbered )
+ {
+ sInfo = "true";
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "is-numbered", sInfo );
}
- mbIsNewListItem = bIsNumbered;
+#endif
+ }
+ mbIsNewListItem = bIsNumbered;
- if( bIsNumbered )
+ if( bIsNumbered )
+ {
+ Sequence<PropertyValue> aProps;
+ if( xNumRules->getByIndex( nListLevel ) >>= aProps )
{
- Sequence<PropertyValue> aProps;
- if( xNumRules->getByIndex( nListLevel ) >>= aProps )
+ sal_Int16 eType = NumberingType::CHAR_SPECIAL;
+ sal_Unicode cBullet = 0xf095;
+ const sal_Int32 nCount = aProps.getLength();
+ const PropertyValue* pPropArray = aProps.getConstArray();
+ for( sal_Int32 i = 0; i < nCount; ++i )
{
- sal_Int16 eType = NumberingType::CHAR_SPECIAL;
- sal_Unicode cBullet = 0xf095;
- const sal_Int32 nCount = aProps.getLength();
- const PropertyValue* pPropArray = aProps.getConstArray();
- for( sal_Int32 i = 0; i < nCount; ++i )
+ const PropertyValue& rProp = pPropArray[i];
+ if( rProp.Name == "NumberingType" )
{
- const PropertyValue& rProp = pPropArray[i];
- if( rProp.Name == "NumberingType" )
- {
- rProp.Value >>= eType;
- }
- else if( rProp.Name == "BulletChar" )
+ rProp.Value >>= eType;
+ }
+ else if( rProp.Name == "BulletChar" )
+ {
+ OUString sValue;
+ rProp.Value >>= sValue;
+ if( !sValue.isEmpty() )
{
- OUString sValue;
- rProp.Value >>= sValue;
- if( !sValue.isEmpty() )
- {
- cBullet = sValue[0];
- }
+ cBullet = sValue[0];
}
}
- meNumberingType = eType;
- mbIsListLevelStyleImage = ( NumberingType::BITMAP == meNumberingType );
- if( NumberingType::CHAR_SPECIAL == meNumberingType )
+ }
+ meNumberingType = eType;
+ mbIsListLevelStyleImage = ( NumberingType::BITMAP == meNumberingType );
+ if( NumberingType::CHAR_SPECIAL == meNumberingType )
+ {
+ if( cBullet )
{
- if( cBullet )
+ if( cBullet < ' ' )
{
- if( cBullet < ' ' )
- {
- cBullet = 0xF000 + 149;
- }
- mcBulletChar = cBullet;
+ cBullet = 0xF000 + 149;
+ }
+ mcBulletChar = cBullet;
#if OSL_DEBUG_LEVEL > 0
- sInfo = OUString::number( static_cast<sal_Int32>(cBullet) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "bullet-char", sInfo );
+ sInfo = OUString::number( static_cast<sal_Int32>(cBullet) );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "bullet-char", sInfo );
#endif
- }
-
}
+
}
}
}
-
}
- }
- Reference< XEnumerationAccess > xEnumerationAccess( xTextContent, UNO_QUERY_THROW );
- Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), UNO_SET_THROW );
- if( xEnumeration.is() && xEnumeration->hasMoreElements() )
- {
- mrTextPortionEnumeration.set( xEnumeration );
}
-#if OSL_DEBUG_LEVEL > 0
- sInfo = "Paragraph";
-#endif
}
- else if( xServiceInfo->supportsService( "com.sun.star.text.Table" ) )
+
+ Reference< XEnumerationAccess > xEnumerationAccess( xTextContent, UNO_QUERY_THROW );
+ Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), UNO_SET_THROW );
+ if( xEnumeration.is() && xEnumeration->hasMoreElements() )
{
- OSL_FAIL( "SVGTextWriter::nextParagraph: text tables are not handled." );
+ mrTextPortionEnumeration.set( xEnumeration );
+ }
#if OSL_DEBUG_LEVEL > 0
- sInfo = "Table";
+ sInfo = "Paragraph";
#endif
- }
- else
- {
- OSL_FAIL( "SVGTextWriter::nextParagraph: Unknown text content." );
- return false;
- }
+ }
+ else if( xServiceInfo->supportsService( "com.sun.star.text.Table" ) )
+ {
+ OSL_FAIL( "SVGTextWriter::nextParagraph: text tables are not handled." );
#if OSL_DEBUG_LEVEL > 0
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", sInfo );
- SvXMLElementExport aParaElem( mrExport, XML_NAMESPACE_NONE, "desc", mbIWS, mbIWS );
+ sInfo = "Table";
#endif
}
else
{
- OSL_FAIL( "SVGTextWriter::nextParagraph: no XServiceInfo interface available for text content." );
+ OSL_FAIL( "SVGTextWriter::nextParagraph: Unknown text content." );
return false;
}
-
- const OUString& rParagraphId = implGetValidIDFromInterface( Reference<XInterface>(xTextContent, UNO_QUERY) );
- if( !rParagraphId.isEmpty() )
- {
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", rParagraphId );
- }
- return true;
+#if OSL_DEBUG_LEVEL > 0
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", sInfo );
+ SvXMLElementExport aParaElem( mrExport, XML_NAMESPACE_NONE, "desc", mbIWS, mbIWS );
+#endif
+ }
+ else
+ {
+ OSL_FAIL( "SVGTextWriter::nextParagraph: no XServiceInfo interface available for text content." );
+ return false;
}
- return false;
+ const OUString& rParagraphId = implGetValidIDFromInterface( Reference<XInterface>(xTextContent, UNO_QUERY) );
+ if( !rParagraphId.isEmpty() )
+ {
+ // if there is id for empty paragraph we need to create a empty text paragraph
+ Reference < XTextRange > xRange( xTextContent, UNO_QUERY_THROW );
+ if ( xRange.is() && xRange->getString().isEmpty() )
+ {
+ endTextParagraph();
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "TextParagraph" );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", rParagraphId );
+ mpTextParagraphElem.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS ));
+ }
+ else
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", rParagraphId );
+ }
+ }
+ return true;
}
@@ -1119,105 +1130,134 @@ bool SVGTextWriter::nextTextPortion()
{
mrCurrentTextPortion.clear();
mbIsURLField = false;
+ if( !mrTextPortionEnumeration || !mrTextPortionEnumeration->hasMoreElements() )
+ return false;
+
mbIsPlaceholderShape = false;
- if( mrTextPortionEnumeration.is() && mrTextPortionEnumeration->hasMoreElements() )
- {
- Reference< XPropertySet > xPortionPropSet( mrTextPortionEnumeration->nextElement(), UNO_QUERY );
- Reference< XPropertySetInfo > xPortionPropInfo( xPortionPropSet->getPropertySetInfo() );
- Reference < XTextRange > xPortionTextRange( xPortionPropSet, UNO_QUERY);
- if( xPortionPropSet.is() && xPortionPropInfo.is()
- && xPortionPropInfo->hasPropertyByName( "TextPortionType" ) )
- {
+ Reference< XPropertySet > xPortionPropSet( mrTextPortionEnumeration->nextElement(), UNO_QUERY );
+ Reference< XPropertySetInfo > xPortionPropInfo( xPortionPropSet->getPropertySetInfo() );
+ Reference < XTextRange > xPortionTextRange( xPortionPropSet, UNO_QUERY);
+ if( !xPortionPropSet || !xPortionPropInfo
+ || !xPortionPropInfo->hasPropertyByName( "TextPortionType" ) )
+ return true;
+
#if OSL_DEBUG_LEVEL > 0
- OUString sInfo;
- OUString sPortionType;
- if( xPortionPropSet->getPropertyValue( "TextPortionType" ) >>= sPortionType )
- {
- sInfo = "type: " + sPortionType + "; ";
- }
+ OUString sInfo;
+ OUString sPortionType;
+ if( xPortionPropSet->getPropertyValue( "TextPortionType" ) >>= sPortionType )
+ {
+ sInfo = "type: " + sPortionType + "; ";
+ }
#endif
- msPageCount = "";
- if( xPortionTextRange.is() )
- {
+ msPageCount = "";
+ msDateTimeType = "";
+ msTextFieldType = "";
+ if( xPortionTextRange.is() )
+ {
#if OSL_DEBUG_LEVEL > 0
- sInfo += "content: " + xPortionTextRange->getString() + "; ";
+ sInfo += "content: " + xPortionTextRange->getString() + "; ";
#endif
- mrCurrentTextPortion.set( xPortionTextRange );
+ mrCurrentTextPortion.set( xPortionTextRange );
- Reference < XPropertySet > xRangePropSet( xPortionTextRange, UNO_QUERY );
- if( xRangePropSet.is() && xRangePropSet->getPropertySetInfo()->hasPropertyByName( "TextField" ) )
- {
- Reference < XTextField > xTextField( xRangePropSet->getPropertyValue( "TextField" ), UNO_QUERY );
- if( xTextField.is() )
- {
- const OUString sServicePrefix("com.sun.star.text.textfield.");
- const OUString sPresentationServicePrefix("com.sun.star.presentation.TextField.");
+ Reference < XPropertySet > xRangePropSet( xPortionTextRange, UNO_QUERY );
+ if( xRangePropSet.is() && xRangePropSet->getPropertySetInfo()->hasPropertyByName( "TextField" ) )
+ {
+ Reference < XTextField > xTextField( xRangePropSet->getPropertyValue( "TextField" ), UNO_QUERY );
+ if( xTextField.is() )
+ {
+ static constexpr OUString sServicePrefix(u"com.sun.star.text.textfield."_ustr);
+ static constexpr OUString sPresentationServicePrefix(u"com.sun.star.presentation.TextField."_ustr);
- Reference< XServiceInfo > xService( xTextField, UNO_QUERY );
- const Sequence< OUString > aServices = xService->getSupportedServiceNames();
+ Reference< XServiceInfo > xService( xTextField, UNO_QUERY );
+ const Sequence< OUString > aServices = xService->getSupportedServiceNames();
- const OUString* pNames = aServices.getConstArray();
- sal_Int32 nCount = aServices.getLength();
+ const OUString* pNames = aServices.getConstArray();
+ sal_Int32 nCount = aServices.getLength();
- OUString sFieldName; // service name postfix of current field
+ OUString sFieldName; // service name postfix of current field
- // search for TextField service name
- while( nCount-- )
- {
- if ( pNames->matchIgnoreAsciiCase( sServicePrefix ) )
- {
- // TextField found => postfix is field type!
- sFieldName = pNames->copy( sServicePrefix.getLength() );
- break;
- }
- else if( pNames->startsWith( sPresentationServicePrefix ) )
- {
- // TextField found => postfix is field type!
- sFieldName = pNames->copy( sPresentationServicePrefix.getLength() );
- break;
- }
+ // search for TextField service name
+ while( nCount-- )
+ {
+ if ( pNames->matchIgnoreAsciiCase( sServicePrefix ) )
+ {
+ // TextField found => postfix is field type!
+ sFieldName = pNames->copy( sServicePrefix.getLength() );
+ break;
+ }
+ else if( pNames->startsWith( sPresentationServicePrefix ) )
+ {
+ // TextField found => postfix is field type!
+ sFieldName = pNames->copy( sPresentationServicePrefix.getLength() );
+ break;
+ }
- ++pNames;
- }
+ ++pNames;
+ }
+ msTextFieldType = sFieldName;
#if OSL_DEBUG_LEVEL > 0
- sInfo += "text field type: " + sFieldName + "; content: " + xTextField->getPresentation( /* show command: */ false ) + "; ";
+ sInfo += "text field type: " + sFieldName + "; content: " + xTextField->getPresentation( /* show command: */ false ) + "; ";
#endif
- if( sFieldName == "DateTime" || sFieldName == "Header"
- || sFieldName == "Footer" || sFieldName == "PageNumber" )
- {
- mbIsPlaceholderShape = true;
- }
- else if (sFieldName == "PageCount")
+ // This case handles Date or Time text field inserted by the user
+ // on both page/master page. It doesn't handle the standard DateTime field.
+ if( sFieldName == "DateTime" )
+ {
+ Reference<XPropertySet> xTextFieldPropSet(xTextField, UNO_QUERY);
+ if( xTextFieldPropSet.is() )
+ {
+ Reference<XPropertySetInfo> xPropSetInfo = xTextFieldPropSet->getPropertySetInfo();
+ if( xPropSetInfo.is() )
{
- msPageCount = xTextField->getPresentation( /* show command: */ false );
+ // The standard DateTime field has no property.
+ // Trying to get a property value on such field would cause a runtime exception.
+ // So the hasPropertyByName check is needed.
+ bool bIsFixed = true;
+ if( xPropSetInfo->hasPropertyByName("IsFixed") && ( ( xTextFieldPropSet->getPropertyValue( "IsFixed" ) ) >>= bIsFixed ) && !bIsFixed )
+ {
+ bool bIsDate = true;
+ if( xPropSetInfo->hasPropertyByName("IsDate") && ( ( xTextFieldPropSet->getPropertyValue( "IsDate" ) ) >>= bIsDate ) )
+ {
+ msDateTimeType = OUString::createFromAscii( bIsDate ? "Date" : "Time" );
+ }
+ }
}
- else
- {
- mbIsURLField = sFieldName == "URL";
+ }
+ }
+ if( sFieldName == "DateTime" || sFieldName == "Header"
+ || sFieldName == "Footer" || sFieldName == "PageNumber"
+ || sFieldName == "PageName" )
+ {
+ mbIsPlaceholderShape = true;
+ }
+ else if (sFieldName == "PageCount")
+ {
+ msPageCount = xTextField->getPresentation( /* show command: */ false );
+ }
+ else
+ {
+ mbIsURLField = sFieldName == "URL";
- if( mbIsURLField )
+ if( mbIsURLField )
+ {
+ Reference<XPropertySet> xTextFieldPropSet(xTextField, UNO_QUERY);
+ if( xTextFieldPropSet.is() )
+ {
+ OUString sURL;
+ if( ( xTextFieldPropSet->getPropertyValue( sFieldName ) ) >>= sURL )
{
- Reference<XPropertySet> xTextFieldPropSet(xTextField, UNO_QUERY);
- if( xTextFieldPropSet.is() )
- {
- OUString sURL;
- if( ( xTextFieldPropSet->getPropertyValue( sFieldName ) ) >>= sURL )
- {
#if OSL_DEBUG_LEVEL > 0
- sInfo += "url: " + mrExport.GetRelativeReference( sURL );
+ sInfo += "url: " + mrExport.GetRelativeReference( sURL );
#endif
- msUrl = mrExport.GetRelativeReference( sURL );
- if( !msUrl.isEmpty() )
- {
- implRegisterInterface( xPortionTextRange );
+ msUrl = mrExport.GetRelativeReference( sURL );
+ if( !msUrl.isEmpty() )
+ {
+ implRegisterInterface( xPortionTextRange );
- const OUString& rTextPortionId = implGetValidIDFromInterface( Reference<XInterface>(xPortionTextRange, UNO_QUERY) );
- if( !rTextPortionId.isEmpty() )
- {
- msHyperlinkIdList += rTextPortionId + " ";
- }
- }
+ const OUString& rTextPortionId = implGetValidIDFromInterface( Reference<XInterface>(xPortionTextRange, UNO_QUERY) );
+ if( !rTextPortionId.isEmpty() )
+ {
+ msHyperlinkIdList += rTextPortionId + " ";
}
}
}
@@ -1225,16 +1265,14 @@ bool SVGTextWriter::nextTextPortion()
}
}
}
-#if OSL_DEBUG_LEVEL > 0
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "TextPortion" );
- SvXMLElementExport aPortionElem( mrExport, XML_NAMESPACE_NONE, "desc", mbIWS, mbIWS );
- mrExport.GetDocHandler()->characters( sInfo );
-#endif
- return true;
}
}
-
- return false;
+#if OSL_DEBUG_LEVEL > 0
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "TextPortion" );
+ SvXMLElementExport aPortionElem( mrExport, XML_NAMESPACE_NONE, "desc", mbIWS, mbIWS );
+ mrExport.GetDocHandler()->characters( sInfo );
+#endif
+ return true;
}
@@ -1248,19 +1286,19 @@ void SVGTextWriter::startTextShape()
{
mbIsTextShapeStarted = true;
maParentFont = vcl::Font();
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "TextShape" );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "SVGTextShape" );
// if text is rotated, set transform matrix at text element
const vcl::Font& rFont = mpVDev->GetFont();
if( rFont.GetOrientation() )
- {
- Point aRot( maTextPos );
- OUString aTransform = "rotate(" +
- OUString::number( rFont.GetOrientation().get() * -0.1 ) + " " +
- OUString::number( aRot.X() ) + " " +
- OUString::number( aRot.Y() ) + ")";
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform );
- }
+ {
+ Point aRot( maTextPos );
+ OUString aTransform = "rotate(" +
+ OUString::number( rFont.GetOrientation().get() * -0.1 ) + " " +
+ OUString::number( aRot.X() ) + " " +
+ OUString::number( aRot.Y() ) + ")";
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform );
+ }
mpTextShapeElem.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemText, true, mbIWS ));
startTextParagraph();
@@ -1312,7 +1350,6 @@ void SVGTextWriter::startTextParagraph()
mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "TextParagraph" );
}
maParentFont = vcl::Font();
- addFontAttributes( /* isTexTContainer: */ true );
mpTextParagraphElem.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS ));
if( !mbIsListLevelStyleImage )
@@ -1399,20 +1436,36 @@ void SVGTextWriter::implWriteBulletChars()
SvXMLElementExport aPositioningElem( mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true );
- // <use transform="scale(font-size)" xlink:ref="/" >
+ if (mrExport.IsEmbeddedBulletGlyph(rInfo.cBulletChar))
{
+ // <use transform="scale(font-size)" xlink:ref="/" >
// Add size attribute through a scaling
- sScaling = "scale(" + OUString::number( rInfo.nFontSize ) +
- "," + OUString::number( rInfo.nFontSize )+ ")";
+ sScaling = "scale(" + OUString::number( rInfo.aFont.GetFontHeight() ) +
+ "," + OUString::number( rInfo.aFont.GetFontHeight() )+ ")";
mrExport.AddAttribute( XML_NAMESPACE_NONE, "transform", sScaling );
// Add ref attribute
sRefId = "#bullet-char-template-" +
- OUString::number( ( rInfo.cBulletChar ) );
+ OUString::number( rInfo.cBulletChar );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, sRefId );
SvXMLElementExport aRefElem( mrExport, XML_NAMESPACE_NONE, "use", true, true );
}
+ else
+ {
+ // <path d="...">
+ tools::PolyPolygon aPolyPolygon;
+ OUString aStr(rInfo.cBulletChar);
+ mpVDev->Push(vcl::PushFlags::FONT);
+ mpVDev->SetFont(rInfo.aFont);
+ if (mpVDev->GetTextOutline(aPolyPolygon, aStr))
+ {
+ OUString aPathString(SVGActionWriter::GetPathString(aPolyPolygon, false));
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "d", aPathString);
+ SvXMLElementExport aPath(mrExport, XML_NAMESPACE_NONE, "path", true, true);
+ }
+ mpVDev->Pop();
+ }
} // close aPositioningElem
}
@@ -1462,8 +1515,8 @@ void SVGTextWriter::implWriteEmbeddedBitmaps()
BitmapChecksum nId, nChecksum = 0;
Point aPt;
Size aSz;
- sal_uLong nCount = rMtf.GetActionSize();
- for( sal_uLong nCurAction = 0; nCurAction < nCount; nCurAction++ )
+ size_t nCount = rMtf.GetActionSize();
+ for( size_t nCurAction = 0; nCurAction < nCount; nCurAction++ )
{
const MetaAction* pAction = rMtf.GetAction( nCurAction );
@@ -1474,7 +1527,12 @@ void SVGTextWriter::implWriteEmbeddedBitmaps()
case MetaActionType::BMPSCALE:
{
const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
- nChecksum = pA->GetBitmap().GetChecksum();
+ // The conversion to BitmapEx is needed since at the point
+ // where the bitmap is actually exported a Bitmap object is
+ // converted to BitmapEx before computing the checksum used
+ // to generate the <image> element id.
+ // (See GetBitmapChecksum in svgexport.cxx)
+ nChecksum = BitmapEx( pA->GetBitmap() ).GetChecksum();
aPt = pA->GetPoint();
aSz = pA->GetSize();
}
@@ -1574,6 +1632,12 @@ void SVGTextWriter::writeTextPortion( const Point& rPos,
continue;
if( sContent == "\n" )
mbLineBreak = true;
+ else if (sContent == "\t")
+ {
+ // Need to emit position for the next text portion after a tab, otherwise the tab
+ // would appear as if it has 0 width.
+ mbPositioningNeeded = true;
+ }
if( sContent.match( rText, nStartPos ) )
bNotSync = false;
}
@@ -1662,7 +1726,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
{
sId += ".bp";
BulletListItemInfo& aBulletListItemInfo = maBulletListItemMap[ sId ];
- aBulletListItemInfo.nFontSize = rFont.GetFontHeight();
+ aBulletListItemInfo.aFont = rFont;
aBulletListItemInfo.aColor = aTextColor;
aBulletListItemInfo.aPos = maTextPos;
aBulletListItemInfo.cBulletChar = mcBulletChar;
@@ -1684,8 +1748,18 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
if( mbIsPlaceholderShape )
{
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "PlaceholderText" );
- mbIsPlaceholderShape = false;
+ OUString sClass = "PlaceholderText";
+ // This case handles Date or Time text field inserted by the user
+ // on both page/master page. It doesn't handle the standard DateTime field.
+ if( !msDateTimeType.isEmpty() )
+ {
+ sClass += " " + msDateTimeType;
+ }
+ else if( !msTextFieldType.isEmpty() )
+ {
+ sClass += " " + msTextFieldType;
+ }
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", sClass );
}
addFontAttributes( /* isTexTContainer: */ false );
@@ -1718,6 +1792,9 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
}
else
{
+ // Without the following attribute Google Chrome does not render leading spaces
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "style", "white-space: pre" );
+
SvXMLElementExport aSVGTspanElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS );
mrExport.GetDocHandler()->characters( rText );
}
@@ -1731,7 +1808,6 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport
mnCurMaskId( 1 ),
mnCurPatternId( 1 ),
mnCurClipPathId( 1 ),
- mpCurrentClipRegionElem(),
mrExport( rExport ),
maContextHandler(),
mrCurrentState( maContextHandler.getCurrentState() ),
@@ -1739,7 +1815,9 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport
maTextWriter(rExport, maAttributeWriter, *this),
mpVDev(VclPtr<VirtualDevice>::Create()),
mbClipAttrChanged( false ),
- mbIsPlaceholderShape( false )
+ mbIsPlaceholderShape( false ),
+ mpEmbeddedBitmapsMap( nullptr ),
+ mbIsPreview( false )
{
mpVDev->EnableOutput( false );
maTargetMapMode = MapMode(MapUnit::Map100thMM);
@@ -1816,8 +1894,8 @@ tools::PolyPolygon& SVGActionWriter::ImplMap( const tools::PolyPolygon& rPolyPol
OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bool bLine )
{
OUStringBuffer aPathData;
- const OUString aBlank( " " );
- const OUString aComma( "," );
+ static constexpr OUString aBlank( u" "_ustr );
+ static constexpr OUString aComma( u","_ustr );
Point aPolyPoint;
for( tools::Long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
@@ -1828,10 +1906,10 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo
if( nSize > 1 )
{
aPolyPoint = rPoly[ 0 ];
- aPathData.append("M ")
- .append(OUString::number( aPolyPoint.X() ))
- .append(aComma)
- .append(OUString::number( aPolyPoint.Y() ));
+ aPathData.append("M " +
+ OUString::number( aPolyPoint.X() ) +
+ aComma +
+ OUString::number( aPolyPoint.Y() ));
char nCurrentMode = 0;
const bool bClose(!bLine || rPoly[0] == rPoly[nSize - 1]);
@@ -1852,9 +1930,9 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo
aPathData.append(aBlank);
aPolyPoint = rPoly[ n++ ];
- aPathData.append(OUString::number( aPolyPoint.X() ))
- .append(aComma)
- .append(OUString::number( aPolyPoint.Y() ));
+ aPathData.append( OUString::number(aPolyPoint.X()) +
+ aComma +
+ OUString::number( aPolyPoint.Y() ) );
}
}
else
@@ -1866,9 +1944,9 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo
}
aPolyPoint = rPoly[ n++ ];
- aPathData.append(OUString::number( aPolyPoint.X() ))
- .append(aComma)
- .append(OUString::number( aPolyPoint.Y() ));
+ aPathData.append( OUString::number(aPolyPoint.X()) +
+ aComma +
+ OUString::number(aPolyPoint.Y()) );
}
}
@@ -1883,15 +1961,21 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo
return aPathData.makeStringAndClear();
}
-
BitmapChecksum SVGActionWriter::GetChecksum( const MetaAction* pAction )
{
GDIMetaFile aMtf;
MetaAction* pA = const_cast<MetaAction*>(pAction);
aMtf.AddAction( pA );
- return aMtf.GetChecksum();
+ return SvmWriter::GetChecksum( aMtf );
}
+void SVGActionWriter::SetEmbeddedBitmapRefs( const MetaBitmapActionMap* pEmbeddedBitmapsMap )
+{
+ if (pEmbeddedBitmapsMap)
+ mpEmbeddedBitmapsMap = pEmbeddedBitmapsMap;
+ else
+ OSL_FAIL( "SVGActionWriter::SetEmbeddedBitmapRefs: passed pointer is null" );
+}
void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2,
const Color* pLineColor )
@@ -2037,10 +2121,11 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape )
ImplMap( rShape.maShapePolyPoly, aPolyPoly );
const bool bLineOnly
- = (rShape.maShapeFillColor == COL_TRANSPARENT) && (!rShape.mapShapeGradient);
+ = (rShape.maShapeFillColor == COL_TRANSPARENT) && (!rShape.moShapeGradient);
tools::Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
- maAttributeWriter.AddPaintAttr( rShape.maShapeLineColor, rShape.maShapeFillColor, &aBoundRect, rShape.mapShapeGradient.get() );
+ maAttributeWriter.AddPaintAttr( rShape.maShapeLineColor, rShape.maShapeFillColor, &aBoundRect,
+ rShape.moShapeGradient ? &*rShape.moShapeGradient : nullptr );
if( !rShape.maId.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, rShape.maId );
@@ -2102,12 +2187,12 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape )
for( size_t k = 0; k < rShape.maDashArray.size(); ++k )
{
- const sal_Int32 nDash = ImplMap( FRound( rShape.maDashArray[ k ] ) );
+ const sal_Int32 nDash = ImplMap(basegfx::fround(rShape.maDashArray[k]));
if( k )
aDashArrayStr.append(",");
- aDashArrayStr.append(OUString::number( nDash ));
+ aDashArrayStr.append( nDash );
}
mrExport.AddAttribute( XML_NAMESPACE_NONE, "stroke-dasharray", aDashArrayStr.makeStringAndClear() );
@@ -2140,7 +2225,7 @@ void SVGActionWriter::ImplStartClipRegion(sal_Int32 nClipPathId)
if (nClipPathId == 0)
return;
- OUString aUrl = OUStringLiteral(u"url(#") + aPrefixClipPathId + OUString::number( nClipPathId ) + ")";
+ OUString aUrl = OUString::Concat("url(#") + aPrefixClipPathId + OUString::number( nClipPathId ) + ")";
mrExport.AddAttribute( XML_NAMESPACE_NONE, "clip-path", aUrl );
mpCurrentClipRegionElem.reset( new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true ) );
}
@@ -2208,10 +2293,16 @@ void SVGActionWriter::ImplWritePattern( const tools::PolyPolygon& rPolyPoly,
GDIMetaFile aTmpMtf;
if( pHatch )
+ {
mpVDev->AddHatchActions( rPolyPoly, *pHatch, aTmpMtf );
+ }
else if ( pGradient )
- mpVDev->AddGradientActions( rPolyPoly.GetBoundRect(), *pGradient, aTmpMtf );
- ImplWriteActions( aTmpMtf, nWriteFlags, nullptr );
+ {
+ Gradient aGradient(*pGradient);
+ aGradient.AddGradientActions( rPolyPoly.GetBoundRect(), aTmpMtf );
+ }
+
+ ImplWriteActions( aTmpMtf, nWriteFlags, "" );
}
}
}
@@ -2224,12 +2315,12 @@ void SVGActionWriter::ImplWritePattern( const tools::PolyPolygon& rPolyPoly,
void SVGActionWriter::ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient,
- sal_uInt32 nWriteFlags)
+ sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops)
{
- if ( rGradient.GetStyle() == GradientStyle::Linear ||
- rGradient.GetStyle() == GradientStyle::Axial )
+ if ( rGradient.GetStyle() == css::awt::GradientStyle_LINEAR ||
+ rGradient.GetStyle() == css::awt::GradientStyle_AXIAL )
{
- ImplWriteGradientLinear( rPolyPoly, rGradient );
+ ImplWriteGradientLinear( rPolyPoly, rGradient, pColorStops );
}
else
{
@@ -2239,7 +2330,7 @@ void SVGActionWriter::ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly,
void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPoly,
- const Gradient& rGradient )
+ const Gradient& rGradient, const basegfx::BColorStops* pColorStops )
{
if( !rPolyPoly.Count() )
return;
@@ -2282,60 +2373,53 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo
{
SvXMLElementExport aElemLinearGradient( mrExport, XML_NAMESPACE_NONE, aXMLElemLinearGradient, true, true );
+ basegfx::BColorStops aColorStops;
- const Color aStartColor = ImplGetColorWithIntensity( rGradient.GetStartColor(), rGradient.GetStartIntensity() );
- const Color aEndColor = ImplGetColorWithIntensity( rGradient.GetEndColor(), rGradient.GetEndIntensity() );
- double fBorderOffset = rGradient.GetBorder() / 100.0;
- const sal_uInt16 nSteps = rGradient.GetSteps();
- if( rGradient.GetStyle() == GradientStyle::Linear )
+ if (nullptr != pColorStops && pColorStops->size() > 1)
{
- // Emulate non-smooth gradient
- if( 0 < nSteps && nSteps < 100 )
- {
- double fOffsetStep = ( 1.0 - fBorderOffset ) / static_cast<double>(nSteps);
- for( sal_uInt16 i = 0; i < nSteps; i++ ) {
- Color aColor = ImplGetGradientColor( aStartColor, aEndColor, i / static_cast<double>(nSteps) );
- ImplWriteGradientStop( aColor, fBorderOffset + ( i + 1 ) * fOffsetStep );
- aColor = ImplGetGradientColor( aStartColor, aEndColor, ( i + 1 ) / static_cast<double>(nSteps) );
- ImplWriteGradientStop( aColor, fBorderOffset + ( i + 1 ) * fOffsetStep );
- }
- }
- else
- {
- ImplWriteGradientStop( aStartColor, fBorderOffset );
- ImplWriteGradientStop( aEndColor, 1.0 );
- }
+ // if we got the real colr stops, use them. That way we are
+ // now capable in the SVG export to export real multi color gradients
+ aColorStops = *pColorStops;
}
else
{
- fBorderOffset /= 2;
- // Emulate non-smooth gradient
- if( 0 < nSteps && nSteps < 100 )
- {
- double fOffsetStep = ( 0.5 - fBorderOffset ) / static_cast<double>(nSteps);
- // Upper half
- for( sal_uInt16 i = 0; i < nSteps; i++ )
- {
- Color aColor = ImplGetGradientColor( aEndColor, aStartColor, i / static_cast<double>(nSteps) );
- ImplWriteGradientStop( aColor, fBorderOffset + i * fOffsetStep );
- aColor = ImplGetGradientColor( aEndColor, aStartColor, (i + 1 ) / static_cast<double>(nSteps) );
- ImplWriteGradientStop( aColor, fBorderOffset + i * fOffsetStep );
- }
- // Lower half
- for( sal_uInt16 i = 0; i < nSteps; i++ )
- {
- Color aColor = ImplGetGradientColor( aStartColor, aEndColor, i / static_cast<double>(nSteps) );
- ImplWriteGradientStop( aColor, 0.5 + (i + 1) * fOffsetStep );
- aColor = ImplGetGradientColor( aStartColor, aEndColor, (i + 1 ) / static_cast<double>(nSteps) );
- ImplWriteGradientStop( aColor, 0.5 + (i + 1) * fOffsetStep );
- }
- }
- else
- {
- ImplWriteGradientStop( aEndColor, fBorderOffset );
- ImplWriteGradientStop( aStartColor, 0.5 );
- ImplWriteGradientStop( aEndColor, 1.0 - fBorderOffset );
- }
+ // else create color stops with 'old' start/endColor
+ aColorStops.emplace_back(0.0, rGradient.GetStartColor().getBColor());
+ aColorStops.emplace_back(1.0, rGradient.GetEndColor().getBColor());
+ }
+
+ // create a basegfx::BGradient with the info to be able to directly
+ // use the tooling it offers
+ basegfx::BGradient aGradient(
+ aColorStops,
+ rGradient.GetStyle(),
+ rGradient.GetAngle(),
+ rGradient.GetOfsX(),
+ rGradient.GetOfsY(),
+ rGradient.GetBorder(),
+ rGradient.GetStartIntensity(),
+ rGradient.GetEndIntensity(),
+ rGradient.GetSteps());
+
+ // apply Start/EndIntensity to the whole color stops - if used
+ aGradient.tryToApplyStartEndIntensity();
+
+ // apply border to color stops - if used
+ aGradient.tryToApplyBorder();
+
+ // convert from 'axial' to linear - if needed and used
+ aGradient.tryToApplyAxial();
+
+ // apply 'Steps' as hard gradient stops - if used
+ aGradient.tryToApplySteps();
+
+ // write prepared gradient stops
+ for (const auto& rCand : aGradient.GetColorStops())
+ {
+ ImplWriteGradientStop(
+ Color(rCand.getStopColor()),
+ rCand.getStopOffset());
+ // aStartColor, fBorderOffset );
}
}
}
@@ -2373,28 +2457,9 @@ Color SVGActionWriter::ImplGetColorWithIntensity( const Color& rColor,
}
-Color SVGActionWriter::ImplGetGradientColor( const Color& rStartColor,
- const Color& rEndColor,
- double fOffset )
-{
- tools::Long nRedStep = rEndColor.GetRed() - rStartColor.GetRed();
- tools::Long nNewRed = rStartColor.GetRed() + static_cast<tools::Long>( nRedStep * fOffset );
- nNewRed = ( nNewRed < 0 ) ? 0 : ( nNewRed > 0xFF) ? 0xFF : nNewRed;
-
- tools::Long nGreenStep = rEndColor.GetGreen() - rStartColor.GetGreen();
- tools::Long nNewGreen = rStartColor.GetGreen() + static_cast<tools::Long>( nGreenStep * fOffset );
- nNewGreen = ( nNewGreen < 0 ) ? 0 : ( nNewGreen > 0xFF) ? 0xFF : nNewGreen;
-
- tools::Long nBlueStep = rEndColor.GetBlue() - rStartColor.GetBlue();
- tools::Long nNewBlue = rStartColor.GetBlue() + static_cast<tools::Long>( nBlueStep * fOffset );
- nNewBlue = ( nNewBlue < 0 ) ? 0 : ( nNewBlue > 0xFF) ? 0xFF : nNewBlue;
-
- return Color( static_cast<sal_uInt8>(nNewRed), static_cast<sal_uInt8>(nNewGreen), static_cast<sal_uInt8>(nNewBlue) );
-}
-
void SVGActionWriter::StartMask(const Point& rDestPt, const Size& rDestSize,
const Gradient& rGradient, sal_uInt32 nWriteFlags,
- OUString* pTextFillOpacity)
+ const basegfx::BColorStops* pColorStops, OUString* pTextFillOpacity)
{
OUString aStyle;
if (rGradient.GetStartColor() == rGradient.GetEndColor())
@@ -2435,7 +2500,19 @@ void SVGActionWriter::StartMask(const Point& rDestPt, const Size& rDestSize,
aGradient.SetEndColor(aTmpColor);
aGradient.SetEndIntensity(nTmpIntensity);
- ImplWriteGradientEx(aPolyPolygon, aGradient, nWriteFlags);
+ // tdf#155479 prep local ColorStops. The code above
+ // implies that the ColorStops need to be reversed,
+ // so do so & use change of local ptr to represent this
+ basegfx::BColorStops aLocalColorStops;
+
+ if (nullptr != pColorStops)
+ {
+ aLocalColorStops = *pColorStops;
+ aLocalColorStops.reverseColorStops();
+ pColorStops = &aLocalColorStops;
+ }
+
+ ImplWriteGradientEx(aPolyPolygon, aGradient, nWriteFlags, pColorStops);
}
}
@@ -2445,7 +2522,7 @@ void SVGActionWriter::StartMask(const Point& rDestPt, const Size& rDestSize,
}
void SVGActionWriter::ImplWriteMask(GDIMetaFile& rMtf, const Point& rDestPt, const Size& rDestSize,
- const Gradient& rGradient, sal_uInt32 nWriteFlags)
+ const Gradient& rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops)
{
Point aSrcPt(rMtf.GetPrefMapMode().GetOrigin());
const Size aSrcSize(rMtf.GetPrefSize());
@@ -2458,8 +2535,8 @@ void SVGActionWriter::ImplWriteMask(GDIMetaFile& rMtf, const Point& rDestPt, con
if (fScaleX != 1.0 || fScaleY != 1.0)
{
rMtf.Scale(fScaleX, fScaleY);
- aSrcPt.setX(FRound(aSrcPt.X() * fScaleX));
- aSrcPt.setY(FRound(aSrcPt.Y() * fScaleY));
+ aSrcPt.setX(basegfx::fround<tools::Long>(aSrcPt.X() * fScaleX));
+ aSrcPt.setY(basegfx::fround<tools::Long>(aSrcPt.Y() * fScaleY));
}
nMoveX = rDestPt.X() - aSrcPt.X();
@@ -2472,20 +2549,20 @@ void SVGActionWriter::ImplWriteMask(GDIMetaFile& rMtf, const Point& rDestPt, con
std::unique_ptr<SvXMLElementExport> pElemG;
if (!maTextWriter.hasTextOpacity())
{
- StartMask(rDestPt, rDestSize, rGradient, nWriteFlags);
+ StartMask(rDestPt, rDestSize, rGradient, nWriteFlags, pColorStops);
pElemG.reset(
new SvXMLElementExport(mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true));
}
mpVDev->Push();
- ImplWriteActions( rMtf, nWriteFlags, nullptr );
+ ImplWriteActions( rMtf, nWriteFlags, "" );
mpVDev->Pop();
}
}
void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
- const tools::Long* pDXArray, tools::Long nWidth )
+ KernArraySpan pDXArray, tools::Long nWidth )
{
const FontMetric aMetric( mpVDev->GetFontMetric() );
@@ -2576,7 +2653,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
- const tools::Long* pDXArray, tools::Long nWidth,
+ KernArraySpan pDXArray, tools::Long nWidth,
Color aTextColor )
{
sal_Int32 nLen = rText.getLength();
@@ -2593,18 +2670,17 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
ImplMap( rPos, aPos );
- std::unique_ptr<tools::Long[]> xTmpArray(new tools::Long[nLen]);
+ KernArray aTmpArray;
// get text sizes
- if( pDXArray )
+ if( !pDXArray.empty() )
{
aNormSize = Size( mpVDev->GetTextWidth( rText ), 0 );
- memcpy(xTmpArray.get(), pDXArray, nLen * sizeof(tools::Long));
+ aTmpArray.assign(pDXArray);
}
else
{
- aNormSize = Size( mpVDev->GetTextArray( rText, xTmpArray.get() ), 0 );
+ aNormSize = Size(basegfx::fround<tools::Long>(mpVDev->GetTextArray(rText, &aTmpArray)), 0);
}
- tools::Long* pDX = xTmpArray.get();
// if text is rotated, set transform matrix at new g element
if( rFont.GetOrientation() )
@@ -2652,7 +2728,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
{
if( nLen > 1 )
{
- aNormSize.setWidth( pDX[ nLen - 2 ] + mpVDev->GetTextWidth( OUString(rText[nLen - 1]) ) );
+ aNormSize.setWidth( aTmpArray[ nLen - 2 ] + mpVDev->GetTextWidth( OUString(rText[nLen - 1]) ) );
if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) )
{
@@ -2660,7 +2736,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
const double fFactor = static_cast<double>(nWidth) / aNormSize.Width();
for( i = 0; i < ( nLen - 1 ); i++ )
- pDX[ i ] = FRound( pDX[ i ] * fFactor );
+ aTmpArray.set(i, basegfx::fround(aTmpArray[i] * fFactor));
}
else
{
@@ -2696,7 +2772,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
if( bCont )
{
// #118796# do NOT access pDXArray, it may be zero (!)
- sal_Int32 nDXWidth = pDX[ nCurPos - 1 ];
+ sal_Int32 nDXWidth = aTmpArray[ nCurPos - 1 ];
nDXWidth = ImplMap( nDXWidth );
nX = aPos.X() + nDXWidth;
}
@@ -2724,18 +2800,18 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
return;
tools::Polygon aPoly( 4 );
- const tools::Long nLineHeight = std::max<tools::Long>( FRound( aMetric.GetLineHeight() * 0.05 ), 1 );
+ const tools::Long nLineHeight = std::max<tools::Long>( basegfx::fround<tools::Long>( aMetric.GetLineHeight() * 0.05 ), 1 );
if( rFont.GetStrikeout() )
{
- const tools::Long nYLinePos = aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 );
+ const tools::Long nYLinePos = aBaseLinePos.Y() - basegfx::fround<tools::Long>( aMetric.GetAscent() * 0.26 );
aPoly[ 0 ].setX( aBaseLinePos.X() ); aPoly[ 0 ].setY( nYLinePos - ( nLineHeight >> 1 ) );
aPoly[ 1 ].setX( aBaseLinePos.X() + aNormSize.Width() - 1 ); aPoly[ 1 ].setY( aPoly[ 0 ].Y() );
aPoly[ 2 ].setX( aPoly[ 1 ].X() ); aPoly[ 2 ].setY( aPoly[ 0 ].Y() + nLineHeight - 1 );
aPoly[ 3 ].setX( aPoly[ 0 ].X() ); aPoly[ 3 ].setY( aPoly[ 2 ].Y() );
- ImplWritePolyPolygon( aPoly, false );
+ ImplWritePolyPolygon( tools::PolyPolygon(aPoly), false );
}
if( rFont.GetUnderline() )
@@ -2747,7 +2823,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
aPoly[ 2 ].setX( aPoly[ 1 ].X() ); aPoly[ 2 ].setY( aPoly[ 0 ].Y() + nLineHeight - 1 );
aPoly[ 3 ].setX( aPoly[ 0 ].X() ); aPoly[ 3 ].setY( aPoly[ 2 ].Y() );
- ImplWritePolyPolygon( aPoly, false );
+ ImplWritePolyPolygon( tools::PolyPolygon(aPoly), false );
}
}
@@ -2780,8 +2856,44 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
const Point& rSrcPt, const Size& rSrcSz,
const css::uno::Reference<css::drawing::XShape>* pShape )
{
- if( !rBmpEx )
+ if( rBmpEx.IsEmpty() )
return;
+ if( mpEmbeddedBitmapsMap && !mpEmbeddedBitmapsMap->empty())
+ {
+ BitmapChecksum nChecksum = rBmpEx.GetChecksum();
+ if( mpEmbeddedBitmapsMap->find( nChecksum ) != mpEmbeddedBitmapsMap->end() )
+ {
+ // <use transform="translate(?) scale(?)" xlink:ref="?" >
+ OUString sTransform;
+
+ Point aPoint;
+ ImplMap( rPt, aPoint );
+ if( aPoint.X() != 0 || aPoint.Y() != 0 )
+ sTransform = "translate(" + OUString::number( aPoint.X() ) + ", " + OUString::number( aPoint.Y() ) + ")";
+
+ Size aSize;
+ ImplMap( rSz, aSize );
+
+ MapMode aSourceMode( MapUnit::MapPixel );
+ Size aPrefSize = OutputDevice::LogicToLogic( rSrcSz, aSourceMode, maTargetMapMode );
+ Fraction aFractionX( aSize.Width(), aPrefSize.Width() );
+ Fraction aFractionY( aSize.Height(), aPrefSize.Height() );
+ double scaleX = rtl_math_round( double(aFractionX), 3, rtl_math_RoundingMode::rtl_math_RoundingMode_Corrected );
+ double scaleY = rtl_math_round( double(aFractionY), 3, rtl_math_RoundingMode::rtl_math_RoundingMode_Corrected );
+ if( !rtl_math_approxEqual( scaleX, 1.0 ) || !rtl_math_approxEqual( scaleY, 1.0 ) )
+ sTransform += " scale(" + OUString::number( double(aFractionX) ) + ", " + OUString::number( double(aFractionY) ) + ")";
+
+ if( !sTransform.isEmpty() )
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, sTransform );
+
+ // referenced bitmap template
+ OUString sRefId = "#bitmap(" + OUString::number( nChecksum ) + ")";
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, sRefId );
+
+ SvXMLElementExport aRefElem( mrExport, XML_NAMESPACE_NONE, "use", true, true );
+ return;
+ }
+ }
BitmapEx aBmpEx( rBmpEx );
const tools::Rectangle aBmpRect( Point(), rBmpEx.GetSizePixel() );
@@ -2790,7 +2902,7 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
if( aSrcRect != aBmpRect )
aBmpEx.Crop( aSrcRect );
- if( !aBmpEx )
+ if( aBmpEx.IsEmpty() )
return;
SvMemoryStream aOStm( 65535, 65535 );
@@ -2804,7 +2916,7 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
if (aGraphic.GetType() == GraphicType::Bitmap)
{
const BitmapEx& rGraphicBitmap = aGraphic.GetBitmapExRef();
- if (rGraphicBitmap.GetChecksum() == rBmpEx.GetChecksum())
+ if (rGraphicBitmap == rBmpEx)
{
bool bPNG = false;
GfxLink aGfxLink = aGraphic.GetGfxLink();
@@ -2825,7 +2937,27 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
}
}
- if( !(bCached || GraphicConverter::Export( aOStm, rBmpEx, ConvertDataFormat::PNG ) == ERRCODE_NONE) )
+ const BitmapEx* pBitmap = &rBmpEx;
+ std::unique_ptr<BitmapEx> pNewBitmap;
+
+ // for preview we generate downscaled images (1280x720 max)
+ if (mbIsPreview)
+ {
+ Size aSize = rBmpEx.GetSizePixel();
+ double fX = static_cast<double>(aSize.getWidth()) / 1280;
+ double fY = static_cast<double>(aSize.getHeight()) / 720;
+ double fFactor = fX > fY ? fX : fY;
+ if (fFactor > 1.0)
+ {
+ aSize.setWidth(aSize.getWidth() / fFactor);
+ aSize.setHeight(aSize.getHeight() / fFactor);
+ pNewBitmap = std::make_unique<BitmapEx>(rBmpEx);
+ pNewBitmap->Scale(aSize);
+ pBitmap = pNewBitmap.get();
+ }
+ }
+
+ if( !(bCached || GraphicConverter::Export( aOStm, *pBitmap, ConvertDataFormat::PNG ) == ERRCODE_NONE) )
return;
Point aPt;
@@ -2850,19 +2982,56 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, OUString::number( aSz.Width() ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, OUString::number( aSz.Height() ) );
- // the image must be scaled to aSz in a non-uniform way
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "preserveAspectRatio", "none" );
+ // If we have a media object (a video), export the video.
+ // Also, use the image generated above as the video poster (thumbnail).
+ SdrMediaObj* pMediaObj
+ = pShape ? dynamic_cast<SdrMediaObj*>(SdrObject::getSdrObjectFromXShape(*pShape)) : nullptr;
+ const bool embedVideo = (pMediaObj && !pMediaObj->getTempURL().isEmpty());
+
+ if (!embedVideo)
+ {
+ // the image must be scaled to aSz in a non-uniform way
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "preserveAspectRatio", "none");
+
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, aBuffer.makeStringAndClear());
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, aBuffer.makeStringAndClear() );
+ SvXMLElementExport aElem(mrExport, XML_NAMESPACE_NONE, "image", true, true);
+ }
+ else
{
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, "image", true, true );
+ // <foreignObject xmlns="http://www.w3.org/2000/svg" overflow="visible" width="499.6" height="374.33333333333337" x="705" y="333">
+ // <body xmlns="http://www.w3.org/1999/xhtml">
+ // <video controls="controls" width="499.6" height="374.33333333333337">
+ // <source src="file:///tmp/abcdef.mp4" type="video/mp4">
+ // </video>
+ // </body>
+ // </foreignObject>
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "xmlns", "http://www.w3.org/2000/svg");
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "overflow", "visible");
+ SvXMLElementExport aForeignObject(mrExport, XML_NAMESPACE_NONE, "foreignObject", true,
+ true);
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "xmlns", "http://www.w3.org/1999/xhtml");
+ SvXMLElementExport aBody(mrExport, XML_NAMESPACE_NONE, "body", true, true);
+
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrWidth, OUString::number(aSz.Width()));
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrHeight, OUString::number(aSz.Height()));
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "autoplay", "autoplay");
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "controls", "controls");
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "loop", "loop");
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "preload", "auto");
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "poster", aBuffer.makeStringAndClear());
+ SvXMLElementExport aVideo(mrExport, XML_NAMESPACE_NONE, "video", true, true);
+
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "src", pMediaObj->getTempURL());
+ mrExport.AddAttribute(XML_NAMESPACE_NONE, "type", "video/mp4"); //FIXME: set mime type.
+ SvXMLElementExport aSource(mrExport, XML_NAMESPACE_NONE, "source", true, true);
}
}
void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
sal_uInt32 nWriteFlags,
- const OUString* pElementId,
+ const OUString& aElementId,
const Reference< css::drawing::XShape >* pxShape,
const GDIMetaFile* pTextEmbeddedBitmapMtf )
{
@@ -2870,6 +3039,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
// generation
sal_Int32 nEntryCount(0);
+ bool bUseElementId = !aElementId.isEmpty();
+
#if OSL_DEBUG_LEVEL > 0
bool bIsTextShape = false;
if( !mrExport.IsUsePositionedCharacters() && pxShape
@@ -2879,14 +3050,15 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
#endif
mbIsPlaceholderShape = false;
- if( ( pElementId != nullptr ) && ( *pElementId == sPlaceholderTag ) )
+ if( bUseElementId && ( aElementId == sPlaceholderTag ) )
{
mbIsPlaceholderShape = true;
- // since we utilize pElementId in an improper way we reset it to NULL before to go on
- pElementId = nullptr;
+ // since we utilize aElementId in an improper way we reset the boolean
+ // control variable bUseElementId to false before to go on
+ bUseElementId = false;
}
- for( sal_uLong nCurAction = 0, nCount = rMtf.GetActionSize(); nCurAction < nCount; nCurAction++ )
+ for( size_t nCurAction = 0, nCount = rMtf.GetActionSize(); nCurAction < nCount; nCurAction++ )
{
const MetaAction* pAction = rMtf.GetAction( nCurAction );
const MetaActionType nType = pAction->GetType();
@@ -2917,10 +3089,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
sal_uInt16 sz = static_cast<sal_uInt16>((pA->GetDataSize()) / 2);
if (sz)
{
- sType.append("; ");
- sType.append(
- reinterpret_cast<sal_Unicode const*>(pData),
- sz);
+ sType.append(OUString::Concat("; ")
+ + std::u16string_view(
+ reinterpret_cast<sal_Unicode const*>(pData),
+ sz));
}
}
}
@@ -3053,7 +3225,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( aPoly.GetSize() )
{
maAttributeWriter.AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWritePolyPolygon( aPoly, false );
+ ImplWritePolyPolygon( tools::PolyPolygon(aPoly), false );
}
}
}
@@ -3070,7 +3242,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
maAttributeWriter.AddPaintAttr( mpVDev->GetLineColor(), COL_TRANSPARENT );
ImplAddLineAttr( pA->GetLineInfo() );
- ImplWritePolyPolygon( rPoly, true );
+ ImplWritePolyPolygon( tools::PolyPolygon(rPoly), true );
}
}
}
@@ -3100,7 +3272,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
const tools::Polygon aRectPoly( pA->GetRect() );
const tools::PolyPolygon aRectPolyPoly( aRectPoly );
- ImplWriteGradientEx( aRectPolyPoly, pA->GetGradient(), nWriteFlags );
+ ImplWriteGradientEx( aRectPolyPoly, pA->GetGradient(), nWriteFlags, nullptr );
}
}
break;
@@ -3110,7 +3282,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
const MetaGradientExAction* pA = static_cast<const MetaGradientExAction*>(pAction);
- ImplWriteGradientEx( pA->GetPolyPolygon(), pA->GetGradient(), nWriteFlags );
+ ImplWriteGradientEx( pA->GetPolyPolygon(), pA->GetGradient(), nWriteFlags, nullptr );
}
}
break;
@@ -3136,8 +3308,12 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
Color aNewLineColor( mpVDev->GetLineColor() ), aNewFillColor( mpVDev->GetFillColor() );
- aNewLineColor.SetAlpha( 255 - sal::static_int_cast<sal_uInt8>( FRound( pA->GetTransparence() * 2.55 ) ) );
- aNewFillColor.SetAlpha( 255 - sal::static_int_cast<sal_uInt8>( FRound( pA->GetTransparence() * 2.55 ) ) );
+ // tdf#149800 do not change transparency of fully transparent
+ // i.e. invisible line, because it makes it visible,
+ // resulting an extra line behind the normal shape line
+ if ( aNewLineColor.GetAlpha() > 0 )
+ aNewLineColor.SetAlpha( 255 - basegfx::fround<sal_uInt8>( pA->GetTransparence() * 2.55 ) );
+ aNewFillColor.SetAlpha( 255 - basegfx::fround<sal_uInt8>( pA->GetTransparence() * 2.55 ) );
maAttributeWriter.AddPaintAttr( aNewLineColor, aNewFillColor );
ImplWritePolyPolygon( rPolyPoly, false );
@@ -3153,7 +3329,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pAction);
GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() );
ImplWriteMask( aTmpMtf, pA->GetPoint(), pA->GetSize(),
- pA->GetGradient(), nWriteFlags );
+ pA->GetGradient(), nWriteFlags, pA->getSVGTransparencyColorStops() );
}
}
break;
@@ -3187,7 +3363,62 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
- if( ( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") ) &&
+ if (pA->GetComment().equalsIgnoreAsciiCase("BGRAD_SEQ_BEGIN"))
+ {
+ // detect and use the new BGRAD_SEQ_* metafile comment actions
+ const MetaGradientExAction* pGradAction(nullptr);
+ bool bDone(false);
+
+ while (!bDone && (++nCurAction < nCount))
+ {
+ pAction = rMtf.GetAction(nCurAction);
+
+ if (MetaActionType::GRADIENTEX == pAction->GetType())
+ {
+ // remember the 'paint' data action
+ pGradAction = static_cast<const MetaGradientExAction*>(pAction);
+ }
+ else if (MetaActionType::COMMENT == pAction->GetType()
+ && static_cast<const MetaCommentAction*>(pAction)->GetComment().equalsIgnoreAsciiCase("BGRAD_SEQ_END"))
+ {
+ // end action found
+ bDone = true;
+ }
+ }
+
+ if (nullptr != pGradAction)
+ {
+ // we have a complete actions sequence of BGRAD_SEQ_*, so we can now
+ // read the correct color stops here
+ basegfx::BColorStops aColorStops;
+ SvMemoryStream aMemStm(const_cast<sal_uInt8 *>(pA->GetData()), pA->GetDataSize(), StreamMode::READ);
+ VersionCompatRead aCompat(aMemStm);
+ sal_uInt16 nTmp(0);
+ double fOff, fR, fG, fB;
+ aMemStm.ReadUInt16( nTmp );
+
+ const size_t nMaxPossibleEntries = aMemStm.remainingSize() / 4 * sizeof(double);
+ if (nTmp > nMaxPossibleEntries)
+ {
+ SAL_WARN("filter.svg", "gradient record claims to have: " << nTmp << " entries, but only " << nMaxPossibleEntries << " possible, clamping");
+ nTmp = nMaxPossibleEntries;
+ }
+
+ for (sal_uInt16 a(0); a < nTmp; a++)
+ {
+ aMemStm.ReadDouble(fOff);
+ aMemStm.ReadDouble(fR);
+ aMemStm.ReadDouble(fG);
+ aMemStm.ReadDouble(fB);
+
+ aColorStops.emplace_back(fOff, basegfx::BColor(fR, fG, fB));
+ }
+
+ // export with real Color Stops
+ ImplWriteGradientEx(pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), nWriteFlags, &aColorStops);
+ }
+ }
+ else if( ( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") ) &&
( nWriteFlags & SVGWRITER_WRITE_FILL ) )
{
const MetaGradientExAction* pGradAction = nullptr;
@@ -3208,7 +3439,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
if( pGradAction )
- ImplWriteGradientEx( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), nWriteFlags );
+ ImplWriteGradientEx( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), nWriteFlags, nullptr );
}
else if( ( pA->GetComment().equalsIgnoreAsciiCase("XPATHFILL_SEQ_BEGIN") ) &&
( nWriteFlags & SVGWRITER_WRITE_FILL ) && !( nWriteFlags & SVGWRITER_NO_SHAPE_COMMENTS ) &&
@@ -3241,19 +3472,19 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
mapCurShape.reset( new SVGShapeDescriptor );
- if( pElementId )
+ if( bUseElementId )
{
- mapCurShape->maId = *pElementId + "_" + OUString::number(nEntryCount++);
+ mapCurShape->maId = aElementId + "_" + OUString::number(nEntryCount++);
}
mapCurShape->maShapePolyPoly = aShapePolyPoly;
mapCurShape->maShapeFillColor = aFill.getFillColor();
- mapCurShape->maShapeFillColor.SetAlpha( 255 - static_cast<sal_uInt8>(FRound( 255.0 * aFill.getTransparency() )) );
+ mapCurShape->maShapeFillColor.SetAlpha( 255 - basegfx::fround<sal_uInt8>( 255.0 * aFill.getTransparency() ) );
if( bGradient )
{
// step through following actions until the first Gradient/GradientEx action is found
- while (!mapCurShape->mapShapeGradient && bSkip
+ while (!mapCurShape->moShapeGradient && bSkip
&& (++nCurAction < nCount))
{
pAction = rMtf.GetAction( nCurAction );
@@ -3266,13 +3497,13 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
else if( pAction->GetType() == MetaActionType::GRADIENTEX )
{
- mapCurShape->mapShapeGradient.reset( new Gradient(
- static_cast< const MetaGradientExAction* >( pAction )->GetGradient() ) );
+ mapCurShape->moShapeGradient.emplace(
+ static_cast< const MetaGradientExAction* >( pAction )->GetGradient() );
}
else if( pAction->GetType() == MetaActionType::GRADIENT )
{
- mapCurShape->mapShapeGradient.reset( new Gradient(
- static_cast< const MetaGradientAction* >( pAction )->GetGradient() ) );
+ mapCurShape->moShapeGradient.emplace(
+ static_cast< const MetaGradientAction* >( pAction )->GetGradient() );
}
}
}
@@ -3329,17 +3560,17 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
mapCurShape.reset( new SVGShapeDescriptor );
- if( pElementId )
+ if( bUseElementId )
{
- mapCurShape->maId = *pElementId + "_" + OUString::number(nEntryCount++);
+ mapCurShape->maId = aElementId + "_" + OUString::number(nEntryCount++);
}
- mapCurShape->maShapePolyPoly = aPoly;
+ mapCurShape->maShapePolyPoly = tools::PolyPolygon(aPoly);
}
mapCurShape->maShapeLineColor = mpVDev->GetLineColor();
- mapCurShape->maShapeLineColor.SetAlpha( 255 - static_cast<sal_uInt8>(FRound( aStroke.getTransparency() * 255.0 )) );
- mapCurShape->mnStrokeWidth = FRound( aStroke.getStrokeWidth() );
+ mapCurShape->maShapeLineColor.SetAlpha( 255 - basegfx::fround<sal_uInt8>( aStroke.getTransparency() * 255.0 ) );
+ mapCurShape->mnStrokeWidth = basegfx::fround(aStroke.getStrokeWidth());
aStroke.getDashArray( mapCurShape->maDashArray );
// added support for LineJoin
@@ -3382,7 +3613,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
- if(mapCurShape && mapCurShape->maShapePolyPoly.Count() && (aStartArrow.Count() || aEndArrow.Count()))
+ if (mapCurShape->maShapePolyPoly.Count() && (aStartArrow.Count() || aEndArrow.Count()))
{
ImplWriteShape( *mapCurShape );
@@ -3397,9 +3628,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
mapCurShape->maShapePolyPoly = aStartArrow;
- if( pElementId ) // #i124825# pElementId is optional, may be zero
+ if( bUseElementId ) // #i124825# aElementId is optional, may be zero
{
- mapCurShape->maId = *pElementId + "_" + OUString::number(nEntryCount++);
+ mapCurShape->maId = aElementId + "_" + OUString::number(nEntryCount++);
}
ImplWriteShape( *mapCurShape );
@@ -3409,9 +3640,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
mapCurShape->maShapePolyPoly = aEndArrow;
- if( pElementId ) // #i124825# pElementId is optional, may be zero
+ if( bUseElementId ) // #i124825# aElementId is optional, may be zero
{
- mapCurShape->maId = *pElementId + "_" + OUString::number(nEntryCount++);
+ mapCurShape->maId = aElementId + "_" + OUString::number(nEntryCount++);
}
ImplWriteShape( *mapCurShape );
@@ -3551,6 +3782,18 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
}
+ else if( pA->GetComment().startsWithIgnoreAsciiCase( sTiledBackgroundTag ) )
+ {
+ // In the tile case the background is rendered through a rectangle
+ // filled by exploiting an exported pattern element.
+ // Both the pattern and the rectangle are embedded in a <defs> element.
+ // The comment content has the following format: "SLIDE_BACKGROUND <background-id>"
+ const OString& sComment = pA->GetComment();
+ OUString sRefId = "#" + OUString::fromUtf8( o3tl::getToken(sComment, 1, ' ') );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, sRefId );
+
+ SvXMLElementExport aRefElem( mrExport, XML_NAMESPACE_NONE, "use", true, true );
+ }
}
break;
@@ -3662,7 +3905,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
vcl::Font aFont = ImplSetCorrectFontHeight();
maAttributeWriter.SetFontAttr( aFont );
- ImplWriteText( pA->GetPoint(), aText, nullptr, 0 );
+ ImplWriteText( pA->GetPoint(), aText, {}, 0 );
}
else
{
@@ -3685,7 +3928,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
vcl::Font aFont = ImplSetCorrectFontHeight();
maAttributeWriter.SetFontAttr( aFont );
- ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), nullptr, 0 );
+ ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), {}, 0 );
}
maTextWriter.writeTextPortion( pA->GetRect().TopLeft(), pA->GetText() );
}
@@ -3732,7 +3975,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
vcl::Font aFont = ImplSetCorrectFontHeight();
maAttributeWriter.SetFontAttr( aFont );
- ImplWriteText( pA->GetPoint(), aText, nullptr, pA->GetWidth() );
+ ImplWriteText( pA->GetPoint(), aText, {}, pA->GetWidth() );
}
else
{
@@ -3759,7 +4002,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
case MetaActionType::PUSH:
{
const MetaPushAction* pA = static_cast<const MetaPushAction*>(pAction);
- PushFlags mnFlags = pA->GetFlags();
+ vcl::PushFlags mnFlags = pA->GetFlags();
const_cast<MetaAction*>(pAction)->Execute( mpVDev );
@@ -3771,11 +4014,11 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
const_cast<MetaAction*>(pAction)->Execute( mpVDev );
- PushFlags mnFlags = maContextHandler.getPushFlags();
+ vcl::PushFlags mnFlags = maContextHandler.getPushFlags();
maContextHandler.popState();
- if( mnFlags & PushFlags::CLIPREGION )
+ if( mnFlags & vcl::PushFlags::CLIPREGION )
{
ImplEndClipRegion();
ImplStartClipRegion( mrCurrentState.nRegionClipPathId );
@@ -3835,7 +4078,7 @@ void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm,
const Size& rSize100thmm,
const GDIMetaFile& rMtf,
sal_uInt32 nWriteFlags,
- const OUString* pElementId,
+ const OUString& aElementId,
const Reference< css::drawing::XShape >* pXShape,
const GDIMetaFile* pTextEmbeddedBitmapMtf )
{
@@ -3860,7 +4103,7 @@ void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm,
mapCurShape.reset();
- ImplWriteActions( rMtf, nWriteFlags, pElementId, pXShape, pTextEmbeddedBitmapMtf );
+ ImplWriteActions( rMtf, nWriteFlags, aElementId, pXShape, pTextEmbeddedBitmapMtf );
maTextWriter.endTextParagraph();
ImplEndClipRegion();
@@ -3894,7 +4137,8 @@ void SAL_CALL SVGWriter::write( const Reference<XDocumentHandler>& rxDocHandler,
SvMemoryStream aMemStm( const_cast<sal_Int8 *>(rMtfSeq.getConstArray()), rMtfSeq.getLength(), StreamMode::READ );
GDIMetaFile aMtf;
- ReadGDIMetaFile( aMemStm, aMtf );
+ SvmReader aReader( aMemStm );
+ aReader.Read( aMtf );
rtl::Reference<SVGExport> pWriter(new SVGExport( mxContext, rxDocHandler, maFilterData ));
pWriter->writeMtf( aMtf );
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index c56780158ded..1bcf8a87b4c9 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_SVG_SVGWRITER_HXX
-#define INCLUDED_FILTER_SOURCE_SVG_SVGWRITER_HXX
+#pragma once
#include <cppuhelper/implbase.hxx>
#include <rtl/ustring.hxx>
@@ -42,21 +41,23 @@
#include <stack>
#include <unordered_map>
+namespace basegfx { class BColorStops; }
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::text;
-using namespace ::com::sun::star::style;
using namespace ::com::sun::star::svg;
using namespace ::com::sun::star::xml::sax;
-#define SVG_DTD_STRING "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">"
+inline constexpr OUString SVG_DTD_STRING = u"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">"_ustr;
#define SVGWRITER_WRITE_FILL 0x00000001
#define SVGWRITER_WRITE_TEXT 0x00000002
#define SVGWRITER_NO_SHAPE_COMMENTS 0x01000000
+// This must match the same type definition in svgexport.hxx
+typedef std::unordered_map< BitmapChecksum, std::unique_ptr< GDIMetaFile > > MetaBitmapActionMap;
struct SVGState
{
@@ -76,18 +77,18 @@ struct SVGState
struct PartialState
{
- PushFlags meFlags;
- ::std::unique_ptr<vcl::Font> mupFont;
+ vcl::PushFlags meFlags;
+ ::std::optional<vcl::Font> mupFont;
sal_Int32 mnRegionClipPathId;
const vcl::Font& getFont( const vcl::Font& rDefaultFont ) const
{ return mupFont ? *mupFont : rDefaultFont; }
void setFont( const vcl::Font& rFont )
- { mupFont.reset( new vcl::Font(rFont) ); }
+ { mupFont = rFont; }
PartialState()
- : meFlags( PushFlags::NONE )
+ : meFlags( vcl::PushFlags::NONE )
, mupFont()
, mnRegionClipPathId( 0 )
{}
@@ -97,7 +98,7 @@ struct PartialState
, mupFont( std::move( aPartialState.mupFont ) )
, mnRegionClipPathId( aPartialState.mnRegionClipPathId )
{
- aPartialState.meFlags = PushFlags::NONE;
+ aPartialState.meFlags = vcl::PushFlags::NONE;
aPartialState.mnRegionClipPathId = 0;
}
};
@@ -112,9 +113,9 @@ private:
SVGState maCurrentState;
public:
- PushFlags getPushFlags() const;
+ vcl::PushFlags getPushFlags() const;
SVGState& getCurrentState();
- void pushState( PushFlags eFlags );
+ void pushState( vcl::PushFlags eFlags );
void popState();
};
@@ -143,7 +144,7 @@ public:
SVGAttributeWriter( SVGExport& rExport, SVGFontExport& rFontExport, SVGState& rCurState );
~SVGAttributeWriter();
- void AddColorAttr( const char* pColorAttrName, const char* pColorOpacityAttrName, const Color& rColor );
+ void AddColorAttr( const OUString& pColorAttrName, const OUString& pColorOpacityAttrName, const Color& rColor );
void AddGradientDef( const tools::Rectangle& rObjRect,const Gradient& rGradient, OUString& rGradientId );
void AddPaintAttr( const Color& rLineColor, const Color& rFillColor,
const tools::Rectangle* pObjBoundRect = nullptr, const Gradient* pFillGradient = nullptr );
@@ -163,7 +164,7 @@ struct SVGShapeDescriptor
Color maShapeLineColor;
sal_Int32 mnStrokeWidth;
SvtGraphicStroke::DashArray maDashArray;
- ::std::unique_ptr< Gradient > mapShapeGradient;
+ ::std::optional< Gradient > moShapeGradient;
OUString maId;
basegfx::B2DLineJoin maLineJoin;
css::drawing::LineCap maLineCap;
@@ -187,7 +188,7 @@ class GDIMetaFile;
struct BulletListItemInfo
{
- tools::Long nFontSize;
+ vcl::Font aFont;
Color aColor;
Point aPos;
sal_Unicode cBulletChar;
@@ -228,6 +229,8 @@ class SVGTextWriter final
OUString msUrl;
OUString msHyperlinkIdList;
OUString msPageCount;
+ OUString msDateTimeType;
+ OUString msTextFieldType;
bool mbIsPlaceholderShape;
static const bool mbIWS = false;
vcl::Font maCurrentFont;
@@ -238,9 +241,9 @@ class SVGTextWriter final
SVGActionWriter& mrActionWriter);
~SVGTextWriter();
- sal_Int32 setTextPosition(const GDIMetaFile& rMtf, sal_uLong& nCurAction,
+ sal_Int32 setTextPosition(const GDIMetaFile& rMtf, size_t& nCurAction,
sal_uInt32 nWriteFlags);
- void setTextProperties( const GDIMetaFile& rMtf, sal_uLong nCurAction );
+ void setTextProperties( const GDIMetaFile& rMtf, size_t nCurAction );
void addFontAttributes( bool bIsTextContainer );
void createParagraphEnumeration();
@@ -314,6 +317,8 @@ private:
MapMode maTargetMapMode;
bool mbClipAttrChanged;
bool mbIsPlaceholderShape;
+ const MetaBitmapActionMap* mpEmbeddedBitmapsMap;
+ bool mbIsPreview;
tools::Long ImplMap( sal_Int32 nVal ) const;
@@ -335,19 +340,18 @@ private:
void ImplStartClipRegion(sal_Int32 nClipPathId);
void ImplEndClipRegion();
void ImplWriteClipPath( const tools::PolyPolygon& rPolyPoly );
- void ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, sal_uInt32 nWriteFlags);
- void ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
+ void ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops);
+ void ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, const basegfx::BColorStops* pColorStops );
void ImplWriteGradientStop( const Color& rColor, double fOffset );
static Color ImplGetColorWithIntensity( const Color& rColor, sal_uInt16 nIntensity );
- static Color ImplGetGradientColor( const Color& rStartColor, const Color& rEndColor, double fOffset );
- void ImplWriteMask( GDIMetaFile& rMtf, const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient, sal_uInt32 nWriteFlags );
- void ImplWriteText( const Point& rPos, const OUString& rText, const tools::Long* pDXArray, tools::Long nWidth );
- void ImplWriteText( const Point& rPos, const OUString& rText, const tools::Long* pDXArray, tools::Long nWidth, Color aTextColor );
+ void ImplWriteMask( GDIMetaFile& rMtf, const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops);
+ void ImplWriteText( const Point& rPos, const OUString& rText, KernArraySpan pDXArray, tools::Long nWidth );
+ void ImplWriteText( const Point& rPos, const OUString& rText, KernArraySpan pDXArray, tools::Long nWidth, Color aTextColor );
void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const css::uno::Reference<css::drawing::XShape>* pShape);
void ImplWriteActions( const GDIMetaFile& rMtf,
sal_uInt32 nWriteFlags,
- const OUString* pElementId,
+ const OUString& aElementId,
const Reference< css::drawing::XShape >* pXShape = nullptr,
const GDIMetaFile* pTextEmbeddedBitmapMtf = nullptr );
@@ -366,11 +370,14 @@ public:
const Size& rSize100thmm,
const GDIMetaFile& rMtf,
sal_uInt32 nWriteFlags,
- const OUString* pElementId = nullptr,
+ const OUString& aElementId = "",
const Reference< css::drawing::XShape >* pXShape = nullptr,
const GDIMetaFile* pTextEmbeddedBitmapMtf = nullptr );
+
+ void SetEmbeddedBitmapRefs( const MetaBitmapActionMap* pEmbeddedBitmapsMap );
void StartMask(const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient,
- sal_uInt32 nWriteFlags, OUString* pTextStyle = nullptr);
+ sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops, OUString* pTextStyle = nullptr);
+ void SetPreviewMode(bool bState = true) { mbIsPreview = bState; }
};
@@ -395,6 +402,4 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
};
-#endif // INCLUDED_FILTER_SOURCE_SVG_SVGWRITER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/test/odfserializer.hxx b/filter/source/svg/test/odfserializer.hxx
index 8bce673b40a2..2724c9f0a57d 100644
--- a/filter/source/svg/test/odfserializer.hxx
+++ b/filter/source/svg/test/odfserializer.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_SVG_TEST_ODFSERIALIZER_HXX
-#define INCLUDED_FILTER_SOURCE_SVG_TEST_ODFSERIALIZER_HXX
+#pragma once
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
@@ -31,6 +30,4 @@ css::uno::Reference<css::xml::sax::XDocumentHandler>
createSerializer(const css::uno::Reference<css::io::XOutputStream>&);
}
-#endif // INCLUDED_FILTER_SOURCE_SVG_TEST_ODFSERIALIZER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 6b8841ac1e77..e215b465b925 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -20,8 +20,6 @@
#include "t602filter.hxx"
#include <strings.hrc>
-#include <stdio.h>
-
#include <cppuhelper/factory.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -35,15 +33,13 @@
#include <osl/diagnose.h>
#include <rtl/ref.hxx>
#include <rtl/character.hxx>
-#include <unotools/resmgr.hxx>
#include <unotools/streamwrap.hxx>
+#include <utility>
using namespace ::cppu;
-using namespace ::osl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::awt;
@@ -131,16 +127,14 @@ namespace T602ImportFilter {
static inistruct ini;
-T602ImportFilter::T602ImportFilter(const css::uno::Reference<css::uno::XComponentContext > &r )
- : mxContext(r)
- , mpAttrList(nullptr)
+T602ImportFilter::T602ImportFilter(css::uno::Reference<css::uno::XComponentContext > x )
+ : mxContext(std::move(x))
, node(tnode::START)
{
}
-T602ImportFilter::T602ImportFilter(css::uno::Reference<css::io::XInputStream> const & xInputStream)
- : mxInputStream(xInputStream)
- , mpAttrList(nullptr)
+T602ImportFilter::T602ImportFilter(css::uno::Reference<css::io::XInputStream> xInputStream)
+ : mxInputStream(std::move(xInputStream))
, node(tnode::START)
{
}
@@ -212,10 +206,8 @@ void T602ImportFilter::inschr(unsigned char ch)
inschrdef(' ');
pst.wasfdash = false;
} else {
- char s[20];
- sprintf(s,"%i",pst.wasspace);
if (mpAttrList)
- mpAttrList->AddAttribute("text:c",OUString::createFromAscii(s));
+ mpAttrList->AddAttribute("text:c",OUString::number(pst.wasspace));
Start_("text:s");
End_("text:s");
}
@@ -251,11 +243,10 @@ bool T602ImportFilter::importImpl( const Sequence< css::beans::PropertyValue >&
Reference < XImporter > xImporter(mxHandler, UNO_QUERY);
xImporter->setTargetDocument(mxDoc);
- char fs[32], fs2[32];
- sprintf(fs, "%ipt", inistruct::fontsize);
- sprintf(fs2,"%ipt", 2*inistruct::fontsize);
+ auto const fs = OUString(OUString::number(inistruct::fontsize) + "pt");
+ auto const fs2 = OUString(OUString::number(2*inistruct::fontsize) + "pt");
- mpAttrList = new SvXMLAttributeList;
+ mpAttrList = new comphelper::AttributeList;
Reference < XAttributeList > xAttrList ( mpAttrList );
@@ -295,7 +286,7 @@ bool T602ImportFilter::importImpl( const Sequence< css::beans::PropertyValue >&
mpAttrList->AddAttribute("style:parent-style-name","Standard");
Start_("style:style");
mpAttrList->AddAttribute("style:font-name","Courier New");
- mpAttrList->AddAttribute("fo:font-size",OUString::createFromAscii(fs));
+ mpAttrList->AddAttribute("fo:font-size",fs);
Start_("style:properties");
End_("style:properties");
End_("style:style");
@@ -306,7 +297,7 @@ bool T602ImportFilter::importImpl( const Sequence< css::beans::PropertyValue >&
mpAttrList->AddAttribute("style:parent-style-name","Standard");
Start_("style:style");
mpAttrList->AddAttribute("style:font-name","Courier New");
- mpAttrList->AddAttribute("fo:font-size",OUString::createFromAscii(fs));
+ mpAttrList->AddAttribute("fo:font-size",fs);
mpAttrList->AddAttribute("fo:break-before","page");
Start_("style:properties");
End_("style:properties");
@@ -352,7 +343,7 @@ bool T602ImportFilter::importImpl( const Sequence< css::beans::PropertyValue >&
mpAttrList->AddAttribute("style:name","T5");
mpAttrList->AddAttribute("style:family","text");
Start_("style:style");
- mpAttrList->AddAttribute("fo:font-size",OUString::createFromAscii(fs2));
+ mpAttrList->AddAttribute("fo:font-size",fs2);
mpAttrList->AddAttribute("fo:font-weight","bold");
mpAttrList->AddAttribute("style:text-scale","50%");
Start_("style:properties");
@@ -363,7 +354,7 @@ bool T602ImportFilter::importImpl( const Sequence< css::beans::PropertyValue >&
mpAttrList->AddAttribute("style:name","T6");
mpAttrList->AddAttribute("style:family","text");
Start_("style:style");
- mpAttrList->AddAttribute("fo:font-size",OUString::createFromAscii(fs2));
+ mpAttrList->AddAttribute("fo:font-size",fs2);
mpAttrList->AddAttribute("fo:font-weight","bold");
Start_("style:properties");
End_("style:properties");
@@ -499,7 +490,7 @@ void T602ImportFilter::inschrdef(unsigned char ch)
void T602ImportFilter::wrtfnt()
{
Reference < XAttributeList > xAttrList ( mpAttrList );
- const char *style = "P1";
+ const char *style;
switch(fst.nowfnt) {
case standard : style = fst.uline ? "T7" : "T1"; break;
@@ -859,8 +850,6 @@ Sequence< OUString > SAL_CALL T602ImportFilter::getSupportedServiceNames( )
}
T602ImportFilterDialog::T602ImportFilterDialog()
- : maLocale(SvtSysLocale().GetUILanguageTag())
- , maResLocale(Translate::Create("flt"))
{
}
@@ -868,23 +857,6 @@ T602ImportFilterDialog::~T602ImportFilterDialog()
{
}
-// XLocalizable
-
-void SAL_CALL T602ImportFilterDialog::setLocale(const Locale& rLocale)
-{
- LanguageTag aLocale(rLocale);
- if (maLocale != aLocale)
- {
- maLocale = aLocale;
- maResLocale = Translate::Create("flt", maLocale);
- }
-}
-
-Locale SAL_CALL T602ImportFilterDialog::getLocale()
-{
- return maLocale.getLocale(false);
-}
-
bool T602ImportFilterDialog::OptionsDlg()
{
Any any;
@@ -898,10 +870,10 @@ bool T602ImportFilterDialog::OptionsDlg()
any <<= _val;\
_prop->setPropertyValue(_nam, any);
#define propString_(_prop,_nam,_val) \
- any <<= OUString(_val);\
+ any <<= _val;\
_prop->setPropertyValue(_nam, any);
#define propStringFromResId_(_prop,_nam,_val) \
- any <<= getResStr(_val);\
+ any <<= FilterResId(_val);\
_prop->setPropertyValue(_nam, any);
#define propGet_(_prop,_nam) \
_prop->getPropertyValue(_nam);
@@ -924,13 +896,13 @@ bool T602ImportFilterDialog::OptionsDlg()
propInt_(xPSetDialog,"Height",90);
propStringFromResId_(xPSetDialog,"Title", T602FILTER_STR_IMPORT_DIALOG_TITLE);
-#define T602DLG_OK_BUTTON "ok_button"
-#define T602DLG_CANCEL_BUTTON "cancel_button"
-#define T602DLG_CODE_LB "code_lb"
-#define T602DLG_AZBUKA_CB "azbuka_cb"
-#define T602DLG_COMMENT_CB "comment_cb"
-#define T602DLG_REFORMAT_CB "reformat_cb"
-#define T602DLG_CODE_TXT "code_txt"
+ static constexpr OUString T602DLG_OK_BUTTON = u"ok_button"_ustr;
+ static constexpr OUString T602DLG_CANCEL_BUTTON = u"cancel_button"_ustr;
+ static constexpr OUString T602DLG_CODE_LB = u"code_lb"_ustr;
+ static constexpr OUString T602DLG_AZBUKA_CB = u"azbuka_cb"_ustr;
+ static constexpr OUString T602DLG_COMMENT_CB = u"comment_cb"_ustr;
+ static constexpr OUString T602DLG_REFORMAT_CB = u"reformat_cb"_ustr;
+ static constexpr OUString T602DLG_CODE_TXT = u"code_txt"_ustr;
Reference < XInterface > TextModel = Inst_("com.sun.star.awt.UnoControlFixedTextModel");
Reference < XPropertySet > xPSetText( TextModel, UNO_QUERY );
@@ -952,16 +924,17 @@ bool T602ImportFilterDialog::OptionsDlg()
propBool_(xPSetCodeLB,"Dropdown",true);
propBool_(xPSetCodeLB,"MultiSelection",false);
- Sequence< OUString > ous(4);
- ous[0] = getResStr(T602FILTER_STR_ENCODING_AUTO);
- ous[1] = getResStr(T602FILTER_STR_ENCODING_CP852);
- ous[2] = getResStr(T602FILTER_STR_ENCODING_CP895);
- ous[3] = getResStr(T602FILTER_STR_ENCODING_KOI8CS2);
+ Sequence< OUString > ous
+ {
+ FilterResId(T602FILTER_STR_ENCODING_AUTO),
+ FilterResId(T602FILTER_STR_ENCODING_CP852),
+ FilterResId(T602FILTER_STR_ENCODING_CP895),
+ FilterResId(T602FILTER_STR_ENCODING_KOI8CS2)
+ };
any <<= ous;
xPSetCodeLB->setPropertyValue("StringItemList", any);
- Sequence < sal_Int16 > shr(1);
- shr[0] = ini.forcecode ? static_cast<sal_Int16>(ini.xcode) + 1 : 0;
+ Sequence < sal_Int16 > shr{ static_cast<sal_Int16>(ini.forcecode ? ini.xcode + 1 : 0) };
any <<= shr;
xPSetCodeLB->setPropertyValue("SelectedItems", any);
@@ -1078,11 +1051,6 @@ sal_Int16 SAL_CALL T602ImportFilterDialog::execute()
return css::ui::dialogs::ExecutableDialogResults::CANCEL;
}
-OUString T602ImportFilterDialog::getResStr(const char* resid)
-{
- return Translate::get(resid, maResLocale);
-}
-
uno::Sequence<beans::PropertyValue> SAL_CALL T602ImportFilterDialog::getPropertyValues()
{
return uno::Sequence<beans::PropertyValue>();
diff --git a/filter/source/t602/t602filter.hxx b/filter/source/t602/t602filter.hxx
index a703da411830..93efc45c28ed 100644
--- a/filter/source/t602/t602filter.hxx
+++ b/filter/source/t602/t602filter.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_T602_T602FILTER_HXX
-#define INCLUDED_FILTER_SOURCE_T602_T602FILTER_HXX
+#pragma once
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
@@ -26,14 +25,13 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XLocalizable.hpp>
#include <com/sun/star/beans/XPropertyAccess.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <comphelper/attributelist.hxx>
#include <cppuhelper/implbase.hxx>
-#include <xmloff/attrlist.hxx>
-#include <i18nlangtag/languagetag.hxx>
+#include <rtl/ref.hxx>
namespace T602ImportFilter {
@@ -77,15 +75,11 @@ struct inistruct
class T602ImportFilterDialog : public cppu::WeakImplHelper <
css::ui::dialogs::XExecutableDialog,
- css::lang::XLocalizable,
css::lang::XServiceInfo,
css::beans::XPropertyAccess
>
{
- LanguageTag maLocale;
- std::locale maResLocale;
- bool OptionsDlg();
- OUString getResStr(const char* resid);
+ static bool OptionsDlg();
virtual ~T602ImportFilterDialog() override;
@@ -93,10 +87,6 @@ class T602ImportFilterDialog : public cppu::WeakImplHelper <
virtual void SAL_CALL setTitle( const OUString& aTitle ) override;
virtual sal_Int16 SAL_CALL execute() override;
- // XLocalizable
- virtual void SAL_CALL setLocale( const css::lang::Locale& eLocale ) override;
- virtual css::lang::Locale SAL_CALL getLocale() override;
-
// XServiceInfo
virtual OUString SAL_CALL getImplementationName( ) override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
@@ -128,7 +118,7 @@ private:
css::uno::Reference< css::lang::XComponent > mxDoc;
css::uno::Reference < css::io::XInputStream > mxInputStream;
- SvXMLAttributeList *mpAttrList;
+ rtl::Reference<comphelper::AttributeList> mpAttrList;
tnode node; // START
@@ -223,8 +213,8 @@ private:
bool importImpl( const css::uno::Sequence< css::beans::PropertyValue >& aDescriptor );
public:
- explicit T602ImportFilter(const css::uno::Reference<css::uno::XComponentContext > &r );
- explicit T602ImportFilter(css::uno::Reference<css::io::XInputStream> const & xInputStream);
+ explicit T602ImportFilter(css::uno::Reference<css::uno::XComponentContext > x );
+ explicit T602ImportFilter(css::uno::Reference<css::io::XInputStream> xInputStream);
virtual ~T602ImportFilter() override;
// XFilter
@@ -251,6 +241,4 @@ private:
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 09efe5e595e0..898728af434f 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -20,18 +20,16 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <memory>
-#include <sfx2/fcontnr.hxx>
-#include <sfx2/docfilt.hxx>
-#define WRITER_TEXT_FILTER "Text"
-#define CALC_TEXT_FILTER "Text - txt - csv (StarCalc)"
+constexpr OUString WRITER_TEXT_FILTER = u"Text"_ustr;
+constexpr OUString CALC_TEXT_FILTER = u"Text - txt - csv (StarCalc)"_ustr;
-#define WEB_HTML_FILTER "HTML"
-#define WRITER_HTML_FILTER "HTML (StarWriter)"
-#define CALC_HTML_FILTER "calc_HTML_WebQuery"
+constexpr OUStringLiteral WEB_HTML_FILTER = u"HTML";
+constexpr OUStringLiteral WRITER_HTML_FILTER = u"HTML (StarWriter)";
+constexpr OUStringLiteral CALC_HTML_FILTER = u"calc_HTML_WebQuery";
-#define WRITER_DOCSERVICE "com.sun.star.text.TextDocument"
-#define CALC_DOCSERVICE "com.sun.star.sheet.SpreadsheetDocument"
+constexpr OUString WRITER_DOCSERVICE = u"com.sun.star.text.TextDocument"_ustr;
+constexpr OUString CALC_DOCSERVICE = u"com.sun.star.sheet.SpreadsheetDocument"_ustr;
using namespace ::com::sun::star;
using utl::MediaDescriptor;
@@ -129,35 +127,6 @@ bool IsHTMLStream( const uno::Reference<io::XInputStream>& xInStream )
OString aToken = sHeader.copy( nStartOfTagIndex, i - nStartOfTagIndex );
return GetHTMLToken( OStringToOUString( aToken.toAsciiLowerCase(), RTL_TEXTENCODING_ASCII_US ) ) != HtmlTokenId::NONE;
}
-
-/**
- * Given an (empty) file URL in rMediaDesc and rExt, looks up the best filter type for it and
- * writes the type name to rType, the filter name to rMediaDesc.
- */
-bool HandleEmptyFileUrlByExtension(MediaDescriptor& rMediaDesc, const OUString& rExt,
- OUString& rType)
-{
- OUString aURL = rMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_URL(), OUString());
- if (!tools::isEmptyFileUrl(aURL))
- {
- return false;
- }
-
- if (rExt.isEmpty())
- {
- return false;
- }
-
- std::shared_ptr<const SfxFilter> pFilter(SfxFilterMatcher().GetFilter4Extension(rExt));
- if (!pFilter)
- {
- return false;
- }
-
- rMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= pFilter->GetFilterName();
- rType = pFilter->GetTypeName();
- return true;
-}
}
PlainTextFilterDetect::PlainTextFilterDetect() {}
@@ -168,27 +137,27 @@ OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::PropertyVal
{
MediaDescriptor aMediaDesc(lDescriptor);
- OUString aType = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_TYPENAME(), OUString() );
- OUString aDocService = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_DOCUMENTSERVICE(), OUString() );
+ OUString aType = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_TYPENAME, OUString() );
+ OUString aDocService = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_DOCUMENTSERVICE, OUString() );
if ((aType == "generic_HTML") || (aType == "calc_HTML"))
{
- uno::Reference<io::XInputStream> xInStream(aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM()], uno::UNO_QUERY);
+ uno::Reference<io::XInputStream> xInStream(aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM], uno::UNO_QUERY);
if (!xInStream.is() || !IsHTMLStream(xInStream))
return OUString();
if ((aDocService == CALC_DOCSERVICE) || (aType == "calc_HTML"))
- aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= OUString(CALC_HTML_FILTER);
+ aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= OUString(CALC_HTML_FILTER);
else if (aDocService == WRITER_DOCSERVICE)
- aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= OUString(WRITER_HTML_FILTER);
+ aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= OUString(WRITER_HTML_FILTER);
else
- aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= OUString(WEB_HTML_FILTER);
+ aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= OUString(WEB_HTML_FILTER);
}
else if (aType == "generic_Text")
{
- uno::Reference<io::XStream> xStream(aMediaDesc[MediaDescriptor::PROP_STREAM()], uno::UNO_QUERY);
- uno::Reference<io::XInputStream> xInStream(aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM()], uno::UNO_QUERY);
+ uno::Reference<io::XStream> xStream(aMediaDesc[MediaDescriptor::PROP_STREAM], uno::UNO_QUERY);
+ uno::Reference<io::XInputStream> xInStream(aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM], uno::UNO_QUERY);
if (xStream.is() || xInStream.is())
{
ZCodec aCodecGZ;
@@ -201,30 +170,31 @@ OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::PropertyVal
if (aCodecGZ.AttemptDecompression(*pInStream, *pDecompressedStream))
{
uno::Reference<io::XStream> xStreamDecompressed(new utl::OStreamWrapper(std::move(pDecompressedStream)));
- aMediaDesc[MediaDescriptor::PROP_STREAM()] <<= xStreamDecompressed;
- aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM()] <<= xStreamDecompressed->getInputStream();
- OUString aURL = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_URL(), OUString() );
+ aMediaDesc[MediaDescriptor::PROP_STREAM] <<= xStreamDecompressed;
+ aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM] <<= xStreamDecompressed->getInputStream();
+ OUString aURL = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_URL, OUString() );
sal_Int32 nIdx = aURL.lastIndexOf(".gz");
if (nIdx != -1)
- aMediaDesc[MediaDescriptor::PROP_URL()] <<= aURL.copy(0, nIdx);
+ aMediaDesc[MediaDescriptor::PROP_URL] <<= aURL.copy(0, nIdx);
}
}
// Get the file name extension.
- INetURLObject aParser(aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_URL(), OUString() ) );
+ INetURLObject aParser(aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_URL, OUString() ) );
OUString aExt = aParser.getExtension(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset);
aExt = aExt.toAsciiLowerCase();
OUString aName = aParser.getName().toAsciiLowerCase();
// Decide which filter to use based on the document service first,
// then on extension if that's not available.
+
if (aDocService == CALC_DOCSERVICE)
- aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= OUString(CALC_TEXT_FILTER);
+ aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= CALC_TEXT_FILTER;
else if (aDocService == WRITER_DOCSERVICE)
- aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= OUString(WRITER_TEXT_FILTER);
+ aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= WRITER_TEXT_FILTER;
else if (aExt == "csv" || aExt == "tsv" || aExt == "tab" || aExt == "xls" || aName.endsWith(".csv.gz"))
- aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= OUString(CALC_TEXT_FILTER);
- else if (!HandleEmptyFileUrlByExtension(aMediaDesc, aExt, aType))
- aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= OUString(WRITER_TEXT_FILTER);
+ aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= CALC_TEXT_FILTER;
+ else
+ aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= WRITER_TEXT_FILTER;
}
else
diff --git a/filter/source/textfilterdetect/filterdetect.hxx b/filter/source/textfilterdetect/filterdetect.hxx
index 64a65aa440f1..a981d869faec 100644
--- a/filter/source/textfilterdetect/filterdetect.hxx
+++ b/filter/source/textfilterdetect/filterdetect.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_TEXTFILTERDETECT_FILTERDETECT_HXX
-#define INCLUDED_FILTER_SOURCE_TEXTFILTERDETECT_FILTERDETECT_HXX
+#pragma once
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -57,6 +56,4 @@ OUString PlainTextFilterDetect_getImplementationName();
css::uno::Sequence<OUString> PlainTextFilterDetect_getSupportedServiceNames();
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 4e62aba199e7..1f246433a4ae 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -20,7 +20,7 @@
#include <iostream>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/urlobj.hxx>
#include "XmlFilterAdaptor.hxx"
#include <com/sun/star/io/XActiveDataSource.hpp>
@@ -43,10 +43,11 @@
#include <unotools/pathoptions.hxx>
#include <xmloff/xmlimp.hxx>
+#include <strings.hrc>
+
using namespace comphelper;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-using namespace com::sun::star::io;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
using namespace com::sun::star::document;
@@ -64,13 +65,12 @@ bool XmlFilterAdaptor::importImpl( const Sequence< css::beans::PropertyValue >&
utl::MediaDescriptor aMediaMap(aDescriptor);
Reference< XStatusIndicator > xStatusIndicator(aMediaMap.getUnpackedValueOrDefault(
- utl::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >()));
+ utl::MediaDescriptor::PROP_STATUSINDICATOR, Reference< XStatusIndicator >()));
if (xStatusIndicator.is()){
- xStatusIndicator->start( "Loading :", 4);
+ xStatusIndicator->start(FilterResId(STR_FILTER_DOC_LOADING), 4);
}
- Sequence< Any > aAnys(1);
OUString aBaseURI;
if (aMediaMap.find(OUString( "URL" ))->second >>= aBaseURI)
{
@@ -81,18 +81,17 @@ bool XmlFilterAdaptor::importImpl( const Sequence< css::beans::PropertyValue >&
}
// create an XProperty set to configure the exporter for pretty printing
- PropertyMapEntry aImportInfoMap[] =
+ static const PropertyMapEntry aImportInfoMap[] =
{
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0},
{ OUString("BuildId"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0 },
{ OUString("DefaultDocumentSettings"), 0,
::cppu::UnoType<Sequence<PropertyValue>>::get(), PropertyAttribute::MAYBEVOID, 0 },
- { OUString(), 0, css::uno::Type(), 0, 0 }
};
Reference< XPropertySet > xInfoSet(
GenericPropertySet_CreateInstance( new PropertySetInfo( aImportInfoMap ) ) );
- xInfoSet->setPropertyValue( "BaseURI", makeAny( aBaseURI ));
+ xInfoSet->setPropertyValue( "BaseURI", Any( aBaseURI ));
OUString aFilterName;
auto It = aMediaMap.find(OUString("FilterName"));
@@ -102,9 +101,9 @@ bool XmlFilterAdaptor::importImpl( const Sequence< css::beans::PropertyValue >&
PropertyValue EmptyDbFieldHidesPara("EmptyDbFieldHidesPara", 0, Any(false),
PropertyState::PropertyState_DIRECT_VALUE);
Sequence<PropertyValue> aSettings{ EmptyDbFieldHidesPara };
- xInfoSet->setPropertyValue("DefaultDocumentSettings", makeAny(aSettings));
+ xInfoSet->setPropertyValue("DefaultDocumentSettings", Any(aSettings));
}
- aAnys[0] <<= xInfoSet;
+ Sequence< Any > aAnys{ Any(xInfoSet) };
// the underlying SvXMLImport implements XFastParser, XImporter, XFastDocumentHandler
@@ -191,8 +190,7 @@ bool XmlFilterAdaptor::importImpl( const Sequence< css::beans::PropertyValue >&
}
else if (xConverter1 && xFastParser)
{
- auto pImport = dynamic_cast<SvXMLImport*>(xFastParser.get());
- assert(pImport);
+ auto pImport = static_cast<SvXMLImport*>(xFastParser.get());
Reference<XDocumentHandler> xLegacyDocHandler = new SvXMLLegacyToFastDocHandler(pImport);
if (!xConverter1->importer(aDescriptor,xLegacyDocHandler,msUserData)) {
if (xStatusIndicator.is())
@@ -233,10 +231,10 @@ bool XmlFilterAdaptor::exportImpl( const Sequence< css::beans::PropertyValue >&
sal_Int32 nSteps= 1;
utl::MediaDescriptor aMediaMap(aDescriptor);
Reference< XStatusIndicator > xStatusIndicator(aMediaMap.getUnpackedValueOrDefault(
- utl::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >()));
+ utl::MediaDescriptor::PROP_STATUSINDICATOR, Reference< XStatusIndicator >()));
if (xStatusIndicator.is())
- xStatusIndicator->start( "Saving :", 3);
+ xStatusIndicator->start(FilterResId(STR_FILTER_DOC_SAVING), 3);
// Set up converter bridge.
Reference< css::xml::XExportFilter > xConverter(mxContext->getServiceManager()->createInstanceWithContext( udConvertClass, mxContext ), UNO_QUERY);
@@ -260,9 +258,6 @@ bool XmlFilterAdaptor::exportImpl( const Sequence< css::beans::PropertyValue >&
try{
// create the xml exporter service and supply the converter component
// which implements the document handler
- Sequence < Any > aAnys (2);
- aAnys[0] <<= xConverter;
-
// pretty printing is confusing for some filters so it is disabled by default
bool bPrettyPrint =
@@ -285,22 +280,21 @@ bool XmlFilterAdaptor::exportImpl( const Sequence< css::beans::PropertyValue >&
}
// create an XProperty set to configure the exporter for pretty printing
- PropertyMapEntry aImportInfoMap[] =
+ static const PropertyMapEntry aImportInfoMap[] =
{
{ OUString("UsePrettyPrinting"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0},
{ OUString("ExportTextNumberElement"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0},
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0},
- { OUString(), 0, css::uno::Type(), 0, 0 }
};
Reference< XPropertySet > xInfoSet(
GenericPropertySet_CreateInstance( new PropertySetInfo( aImportInfoMap ) ) );
- xInfoSet->setPropertyValue("UsePrettyPrinting", makeAny( bPrettyPrint ));
+ xInfoSet->setPropertyValue("UsePrettyPrinting", Any( bPrettyPrint ));
xInfoSet->setPropertyValue(
"ExportTextNumberElement",
- makeAny( bExportTextNumberElementForListItems ));
- xInfoSet->setPropertyValue("BaseURI", makeAny( aBaseURI ));
- aAnys[1] <<= xInfoSet;
+ Any( bExportTextNumberElementForListItems ));
+ xInfoSet->setPropertyValue("BaseURI", Any( aBaseURI ));
+ Sequence < Any > aAnys{ Any(xConverter), Any(xInfoSet) };
Reference< XExporter > xExporter( mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
udExport, aAnys, mxContext ), UNO_QUERY_THROW );
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx
index e6b97f041db3..a276d396eda2 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XMLFILTERADAPTOR_XMLFILTERADAPTOR_HXX
-#define INCLUDED_FILTER_SOURCE_XMLFILTERADAPTOR_XMLFILTERADAPTOR_HXX
+#pragma once
#include <com/sun/star/document/XFilter.hpp>
@@ -28,6 +27,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
enum FilterType
@@ -65,8 +65,8 @@ class XmlFilterAdaptor final : public cppu::WeakImplHelper
public:
- explicit XmlFilterAdaptor( const css::uno::Reference< css::uno::XComponentContext > & rxContext)
- : mxContext(rxContext)
+ explicit XmlFilterAdaptor( css::uno::Reference< css::uno::XComponentContext > xContext)
+ : mxContext(std::move(xContext))
, meType(FILTER_IMPORT)
{
}
@@ -103,6 +103,4 @@ public:
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx
index fd179a0e7898..c873db648819 100644
--- a/filter/source/xmlfilterdetect/filterdetect.cxx
+++ b/filter/source/xmlfilterdetect/filterdetect.cxx
@@ -23,11 +23,12 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/beans/PropertyState.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <ucbhelper/content.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <svl/inettype.hxx>
#include <memory>
+#include <o3tl/string_view.hxx>
using namespace com::sun::star::container;
using namespace com::sun::star::uno;
@@ -35,13 +36,13 @@ using namespace com::sun::star::beans;
namespace {
-OUString supportedByType( const OUString& clipBoardFormat, const OUString& resultString, const OUString& checkType)
+OUString supportedByType( std::u16string_view clipBoardFormat, std::u16string_view resultString, const OUString& checkType)
{
OUString sTypeName;
- if ( clipBoardFormat.match("doctype:") )
+ if ( o3tl::starts_with(clipBoardFormat, u"doctype:") )
{
- OUString tryStr = clipBoardFormat.copy(8);
- if (resultString.indexOf(tryStr) >= 0)
+ std::u16string_view tryStr = clipBoardFormat.substr(8);
+ if (resultString.find(tryStr) != std::u16string_view::npos)
{
sTypeName = checkType;
}
@@ -205,9 +206,9 @@ OUString SAL_CALL FilterDetect::detect( css::uno::Sequence< css::beans::Property
if (location == aArguments.getLength())
{
aArguments.realloc(nLength+1);
- aArguments[location].Name = "TypeName";
+ aArguments.getArray()[location].Name = "TypeName";
}
- aArguments[location].Value <<=sTypeName;
+ aArguments.getArray()[location].Value <<=sTypeName;
}
return sTypeName;
diff --git a/filter/source/xmlfilterdetect/filterdetect.hxx b/filter/source/xmlfilterdetect/filterdetect.hxx
index 9ba2121810ed..c84b9f06612e 100644
--- a/filter/source/xmlfilterdetect/filterdetect.hxx
+++ b/filter/source/xmlfilterdetect/filterdetect.hxx
@@ -17,13 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XMLFILTERDETECT_FILTERDETECT_HXX
-#define INCLUDED_FILTER_SOURCE_XMLFILTERDETECT_FILTERDETECT_HXX
+#pragma once
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
namespace com::sun::star::uno {
class XComponentContext;
@@ -39,8 +39,8 @@ class FilterDetect final : public cppu::WeakImplHelper <
css::uno::Reference< css::uno::XComponentContext > mxCtx;
public:
- explicit FilterDetect( const css::uno::Reference< css::uno::XComponentContext > &rxCtx)
- : mxCtx( rxCtx ) {}
+ explicit FilterDetect( css::uno::Reference< css::uno::XComponentContext > xCtx)
+ : mxCtx(std::move( xCtx )) {}
//XExtendedFilterDetection
virtual OUString SAL_CALL detect( css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ) override;
@@ -56,6 +56,4 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl b/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl
index e8bb6fa7999a..32e8ea44b979 100644
--- a/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl
+++ b/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl
@@ -3700,7 +3700,7 @@
<xsl:attribute name="uof:attrList">标识符 å称 类型 别å 基å¼æ ·å¼•ç”¨</xsl:attribute>
<xsl:attribute name="字:标识符"><xsl:value-of select="@style:name"/></xsl:attribute>
<xsl:attribute name="å­—:å称"><xsl:value-of select="@style:name"/></xsl:attribute>
- <xsl:attribute name="字:类型">custum</xsl:attribute>
+ <xsl:attribute name="字:类型">custom</xsl:attribute>
<xsl:attribute name="å­—:基å¼æ ·å¼•ç”¨"><xsl:value-of select="@style:parent-style-name"/></xsl:attribute>
<xsl:call-template name="字:字体"/>
</xsl:element>
diff --git a/filter/source/xslt/export/wordml/ooo2wordml_list.xsl b/filter/source/xslt/export/wordml/ooo2wordml_list.xsl
index 4b30aef6823c..5ebf0e6ac460 100644
--- a/filter/source/xslt/export/wordml/ooo2wordml_list.xsl
+++ b/filter/source/xslt/export/wordml/ooo2wordml_list.xsl
@@ -281,8 +281,10 @@
<w:nfc w:val="21"/>
</xsl:when>
<xsl:when test="$number-format = 'ì¼, ì´, 삼, ...'">
- <!-- 'ì¼, ì´, 삼, ...' also seems: korean-counting -->
- <w:nfc w:val="41"/>
+ <w:nfc w:val="42"/>
+ </xsl:when>
+ <xsl:when test="$number-format = '하나, 둘, 셋, ...'">
+ <w:nfc w:val="43"/>
</xsl:when>
<xsl:when test="$number-format = 'ㄱ, ㄴ, ㄷ, ...' or $number-format = '㉠, ㉡, ㉢, ...'">
<!-- mapping circled to uncircled -->
diff --git a/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl b/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl
index c3ab20eebd4f..2130db508b22 100644
--- a/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl
+++ b/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl
@@ -244,8 +244,10 @@
<w:numFmt w:val="iroha"/>
</xsl:when>
<xsl:when test="$number-format = 'ì¼, ì´, 삼, ...'">
- <!-- 'ì¼, ì´, 삼, ...' also seems: korean-counting -->
- <w:numFmt w:val="korean-digital"/>
+ <w:numFmt w:val="korean-counting"/>
+ </xsl:when>
+ <xsl:when test="$number-format = '하나, 둘, 셋, ...'">
+ <w:numFmt w:val="korean-legal"/>
</xsl:when>
<xsl:when test="$number-format = 'ㄱ, ㄴ, ㄷ, ...' or $number-format = '㉠, ㉡, ㉢, ...'">
<!-- mapping circled to uncircled -->
@@ -297,7 +299,7 @@
</xsl:choose>
</xsl:when>
<!-- unsupported: ordinal, cardinal-text, ordinal-text, hex, chicago, bullet, ideograph-zodiac-traditional,
- chinese-not-impl, korean-legal -->
+ chinese-not-impl -->
<xsl:otherwise>
<w:numFmt w:val="decimal"/>
</xsl:otherwise>
diff --git a/filter/source/xslt/import/uof/uof2odf_spreadsheet.xsl b/filter/source/xslt/import/uof/uof2odf_spreadsheet.xsl
index 95d0d6b9d271..dbd1f5460c57 100644
--- a/filter/source/xslt/import/uof/uof2odf_spreadsheet.xsl
+++ b/filter/source/xslt/import/uof/uof2odf_spreadsheet.xsl
@@ -522,7 +522,7 @@
<draw:stroke-dash draw:name="Fine_20_Dashed_20__28_var_29_" draw:display-name="Fine Dashed (var)" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="197%"/>
<draw:stroke-dash draw:name="Fine_20_Dotted" draw:display-name="Fine Dotted" draw:style="rect" draw:dots1="1" draw:distance="0.457cm"/>
<draw:stroke-dash draw:name="Line_20_with_20_Fine_20_Dots" draw:display-name="Line with Fine Dots" draw:style="rect" draw:dots1="1" draw:dots1-length="2.007cm" draw:dots2="10" draw:distance="0.152cm"/>
- <draw:stroke-dash draw:name="Line_20_Style_20_9" draw:display-name="Line Style 9" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="120%"/>
+ <draw:stroke-dash draw:name="Sparse_20_Dash" draw:display-name="Sparse Dash" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="120%"/>
<draw:stroke-dash draw:name="_33__20_Dashes_20_3_20_Dots_20__28_var_29_" draw:display-name="3 Dashes 3 Dots (var)" draw:style="rect" draw:dots1="3" draw:dots1-length="197%" draw:dots2="3" draw:distance="100%"/>
<draw:stroke-dash draw:name="_32__20_Dots_20_1_20_Dash" draw:display-name="2 Dots 1 Dash" draw:style="rect" draw:dots1="2" draw:dots2="1" draw:dots2-length="0.203cm" draw:distance="0.203cm"/>
<draw:stroke-dash draw:name="Ultrafine_20_Dotted_20__28_var_29_" draw:display-name="Ultrafine Dotted (var)" draw:style="rect" draw:dots1="1" draw:distance="50%"/>
@@ -6779,7 +6779,7 @@
<draw:stroke-dash draw:name="Fine_20_Dashed_20__28_var_29_" draw:display-name="Fine Dashed (var)" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="197%"/>
<draw:stroke-dash draw:name="Fine_20_Dotted" draw:display-name="Fine Dotted" draw:style="rect" draw:dots1="1" draw:distance="0.457cm"/>
<draw:stroke-dash draw:name="Line_20_with_20_Fine_20_Dots" draw:display-name="Line with Fine Dots" draw:style="rect" draw:dots1="1" draw:dots1-length="2.007cm" draw:dots2="10" draw:distance="0.152cm"/>
- <draw:stroke-dash draw:name="Line_20_Style_20_9" draw:display-name="Line Style 9" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="120%"/>
+ <draw:stroke-dash draw:name="Sparse_20_Dash" draw:display-name="Sparse Dash" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="120%"/>
<draw:stroke-dash draw:name="_33__20_Dashes_20_3_20_Dots_20__28_var_29_" draw:display-name="3 Dashes 3 Dots (var)" draw:style="rect" draw:dots1="3" draw:dots1-length="197%" draw:dots2="3" draw:distance="100%"/>
<draw:stroke-dash draw:name="_32__20_Dots_20_1_20_Dash" draw:display-name="2 Dots 1 Dash" draw:style="rect" draw:dots1="2" draw:dots2="1" draw:dots2-length="0.203cm" draw:distance="0.203cm"/>
<draw:stroke-dash draw:name="Ultrafine_20_Dotted_20__28_var_29_" draw:display-name="Ultrafine Dotted (var)" draw:style="rect" draw:dots1="1" draw:distance="50%"/>
diff --git a/filter/source/xslt/odf2xhtml/export/common/body.xsl b/filter/source/xslt/odf2xhtml/export/common/body.xsl
index 9bc022e38d62..8dfb78222186 100644
--- a/filter/source/xslt/odf2xhtml/export/common/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/body.xsl
@@ -81,7 +81,7 @@
<!-- *************** -->
<!-- ID / NAME of text-box -->
- <xsl:template match="@draw:name">
+ <xsl:template match="@draw:name | @text:id | @xml:id">
<xsl:attribute name="id">
<xsl:choose>
<xsl:when test="number(substring(.,1,1))">
@@ -105,7 +105,8 @@
<!-- line breaks in lists need an indent similar to the list label -->
<xsl:if test="$listIndent">
<xsl:element namespace="{$namespace}" name="span">
- <xsl:attribute name="style">margin-left:<xsl:value-of select="$listIndent"/>cm</xsl:attribute>
+ <!-- some locales use , instead of . so replace it -->
+ <xsl:attribute name="style">margin-left:<xsl:value-of select="translate($listIndent, ',', '.')"/>cm</xsl:attribute>
</xsl:element>
</xsl:if>
</xsl:template>
diff --git a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
index d1c8f189be85..bdad6da4bf45 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
@@ -504,6 +504,8 @@
</xsl:template>
+ <!-- Context is <style:style> with all style properties elements containing attributes, accessed by */@prop
+ overwriting the ODF style properties that are being inherited from the 'inheritedStyleProperties' parameter! -->
<xsl:template name="create-inherited-style-properties">
<xsl:param name="inheritedStyleProperties" />
@@ -511,12 +513,70 @@
<!-- Writing all inherited style properties -->
<xsl:for-each select="$inheritedStyleProperties/@*">
<xsl:sort select="name()" />
- <xsl:copy-of select="." />
+
+ <!-- Normalization three ODF attributes to one ODF attribute fo:background color (only temporary not ODF conform but eases mapping to ODF)
+ There are two different background color:
+ 1) fo:background-color
+ 2) draw:fill-color
+ mapped to one in CSS.
+ In addition if there is the attribute @draw:fill="none" the background is 'transparent' -->
+ <xsl:choose>
+ <xsl:when test="name() = 'draw:fill-color' or name() = 'fo:background-color' or name() = 'draw:fill'">
+ <xsl:choose>
+ <xsl:when test="$inheritedStyleProperties/@draw:fill='none'">
+ <xsl:attribute name="fo:background-color">transparent</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="name()!='draw:fill'">
+ <xsl:attribute name="fo:background-color"><xsl:value-of select="."/></xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="fo:background-color">transparent</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="." />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:for-each>
+ <xsl:if test="*/@draw:fill-color or */@fo:background-color or */@draw:fill">
+ <xsl:choose>
+ <xsl:when test="*/@draw:fill='none'">
+ <xsl:attribute name="fo:background-color">transparent</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="*/@draw:fill-color">
+ <xsl:attribute name="fo:background-color"><xsl:value-of select="*/@draw:fill-color"/></xsl:attribute>
+ </xsl:when>
+ <xsl:when test="*/@fo:background-color">
+ <xsl:attribute name="fo:background-color"><xsl:value-of select="*/@fo:background-color"/></xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="fo:background-color">transparent</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+
+ <!-- split border into border parts for better activation-check on style:joint-border feature -->
+ <xsl:if test="*/@fo:border">
+ <xsl:attribute name="fo:border-top"><xsl:value-of select="*/@fo:border"/></xsl:attribute>
+ <xsl:attribute name="fo:border-left"><xsl:value-of select="*/@fo:border"/></xsl:attribute>
+ <xsl:attribute name="fo:border-bottom"><xsl:value-of select="*/@fo:border"/></xsl:attribute>
+ <xsl:attribute name="fo:border-right"><xsl:value-of select="*/@fo:border"/></xsl:attribute>
+ </xsl:if>
+
<!--All current attributes will override already inserted attributes of the same name
XSLT Spec: "Adding an attribute to an element replaces any existing attribute of that element with the same expanded-name." -->
- <xsl:for-each select="*/@*[name() != 'style:font-size-rel']">
+ <xsl:for-each select="*/@*[name() != 'style:font-size-rel'][name() != 'fo:border'][name() != 'draw:fill-color']">
<xsl:copy-of select="." />
</xsl:for-each>
@@ -560,21 +620,20 @@
<xsl:template name="write-collected-styles">
<xsl:param name="globalData" />
- <xsl:message>&lt;all-doc-styles&gt;</xsl:message>
+ <xsl:message>all-doc-styles:start</xsl:message>
<xsl:for-each select="$globalData/all-doc-styles/style">
- <xsl:message>&lt;style</xsl:message>
- <xsl:message>style:family="<xsl:value-of select="current()/@style:family" />"&gt;</xsl:message>
- <xsl:message>style:name="<xsl:value-of select="current()/@style:name" />" </xsl:message>
- <xsl:message> &lt;*</xsl:message>
+ <xsl:message>***style:start</xsl:message>
+ <xsl:message>style:family="<xsl:value-of select="current()/@style:family" />"</xsl:message>
+ <xsl:message>style:name="<xsl:value-of select="current()/@style:name" />"</xsl:message>
+ <xsl:message> with properties:</xsl:message>
<xsl:for-each select="*/@*">
<xsl:message>
<xsl:text></xsl:text>
<xsl:value-of select="name()" />="<xsl:value-of select="." />"</xsl:message>
</xsl:for-each>
- <xsl:message>/&gt;</xsl:message>
- <xsl:message>&lt;/style&gt;</xsl:message>
+ <xsl:message>***style:end</xsl:message>
</xsl:for-each>
- <xsl:message>&lt;/all-doc-styles&gt;</xsl:message>
+ <xsl:message>all-doc-styles:end</xsl:message>
</xsl:template>
<xsl:template name="map-odf-style-properties">
@@ -702,40 +761,28 @@
<xsl:template name="writeUsedStyles2">
<xsl:param name="globalData" />
<xsl:param name="style"/>
+ <!-- activation-check on style:joint-border feature -->
<xsl:choose>
<xsl:when test="
$style/@style:family='paragraph'
and
- (
- (
(
$style/*/@fo:border-top
- or $style/*/@fo:border-bottom
- or ($style/*/@fo:border
- and
- not($style/*/@fo:border='none')
- )
+ or
+ $style/*/@fo:border-bottom
)
- and
- (
- not($style/*/@style:join-border)
- or $style/*/@style:join-border = 'true'
- )
- )
- or
- (
+ and
(
- $style/*/@fo:margin-top
- or $style/*/@fo:margin-bottom
- or $style/*/@fo:margin
- )
- and
- ( $style/*/@fo:background-color
- and
- not($style/*/@fo:background-color='transparent')
+ not($style/*/@fo:border-top='none' and
+ $style/*/@fo:border-left='none' and
+ $style/*/@fo:border-right='none' and
+ $style/*/@fo:border-bottom='none')
)
- )
- )">
+ and
+ (
+ not($style/*/@style:join-border)
+ or $style/*/@style:join-border = 'true'
+ )">
<xsl:element name="style" namespace="">
<xsl:copy-of select="$style/@style:family" />
<xsl:attribute name="style:name"><xsl:value-of select="concat($style/@style:name, '_borderStart')" /></xsl:attribute>
@@ -751,8 +798,7 @@
</xsl:element>
<xsl:element name="style" namespace="">
<xsl:copy-of select="$style/@style:family" />
- <xsl:copy-of select="$style/@style:name" />
- <xsl:attribute name="mergedBorders"><xsl:value-of select="true()" /></xsl:attribute>
+ <xsl:attribute name="style:name"><xsl:value-of select="concat($style/@style:name, '_borderSides')" /></xsl:attribute>
<xsl:element name="final-properties" namespace="">
<xsl:apply-templates select="$style/*/@*[not(name() = 'fo:border-top') and not(name() = 'fo:border-bottom')][not(name() = 'fo:padding-top') and not(name() = 'fo:padding-bottom')][not(name() = 'fo:margin-top') and not(name() = 'fo:margin-bottom')][not(name() = 'fo:margin')]">
<xsl:with-param name="globalData" select="$globalData" />
@@ -776,6 +822,17 @@
<xsl:text> border-top-style:none;</xsl:text>
</xsl:element>
</xsl:element>
+ <xsl:element name="style" namespace="">
+ <xsl:copy-of select="$style/@style:family" />
+ <xsl:copy-of select="$style/@style:name" />
+ <!-- the original name bears the trigger: 'mergedBorder' flag-->
+ <xsl:attribute name="mergedBorders"><xsl:value-of select="true()" /></xsl:attribute>
+ <xsl:element name="final-properties" namespace="">
+ <xsl:apply-templates select="$style/*/@*">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
+ </xsl:element>
+ </xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
diff --git a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
index ec5b680df150..56b17331a0b9 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
@@ -22,11 +22,18 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="chart config dc dom dr3d draw fo form math meta number office ooo oooc ooow script style svg table text xforms xlink xsd xsi">
- <!-- *** Properties with a 'fo:' prefix *** -->
- <xsl:template match="@fo:background-color">
- <xsl:text>background-color:</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>; </xsl:text>
+ <!-- *** Background color handling *** -->
+ <xsl:template match="@fo:background-color | @draw:fill-color | @draw:fill">
+ <xsl:choose>
+ <xsl:when test="@draw:fill='none'">
+ <xsl:text>background-color:transparent; </xsl:text>
+ </xsl:when>
+ <xsl:when test="name()!='draw:fill'">
+ <xsl:text>background-color:</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>; </xsl:text>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<xsl:template match="@fo:border | @fo:border-top | @fo:border-bottom | @fo:border-left | @fo:border-right">
@@ -79,13 +86,21 @@
</xsl:template>
<!-- text-shadow is a CSS2 feature and yet not common used in user-agents -->
- <xsl:template match="@fo:color |@svg:font-family |@fo:font-size |@fo:font-style |@fo:font-weight |@fo:text-indent |@fo:text-shadow |@text:display">
+ <xsl:template match="@fo:color |@fo:font-size |@fo:font-style |@fo:font-weight |@fo:text-indent |@fo:text-shadow |@text:display">
<xsl:value-of select="substring-after(name(), ':')"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="."/>
<xsl:text>; </xsl:text>
</xsl:template>
+ <!-- text-shadow is a CSS2 feature and yet not common used in user-agents -->
+ <xsl:template match="@svg:font-family">
+ <xsl:value-of select="substring-after(name(), ':')"/>
+ <xsl:text>:"</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>"; </xsl:text>
+ </xsl:template>
+
<!-- workaround AOOO#119401 suspicious property fo:margin="100%" in paragraph style -->
<xsl:template match="@fo:margin[string(.) = '100%']"/>
@@ -208,9 +223,8 @@
<xsl:text>font-family:</xsl:text>
<xsl:variable name="content" select="."/>
- <xsl:variable name="quote">'</xsl:variable>
<xsl:variable name="fontName" select="$globalData/office:font-face-decls/style:font-face[@style:name=$content]/@svg:font-family" />
- <xsl:value-of select="translate($fontName, $quote, '')"/>
+ <xsl:value-of select="$fontName"/>
<xsl:text>; </xsl:text>
</xsl:template>
diff --git a/filter/source/xslt/odf2xhtml/export/common/table/table.xsl b/filter/source/xslt/odf2xhtml/export/common/table/table.xsl
index cfc1ebbc525b..1e9baa5703f2 100644
--- a/filter/source/xslt/odf2xhtml/export/common/table/table.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/table/table.xsl
@@ -65,12 +65,14 @@
<xsl:template match="table:table" name="table:table">
<xsl:param name="globalData" />
+ <xsl:text>&#xa;</xsl:text>
<!-- The table will only be created if the table:scenario is active -->
<xsl:if test="not(table:scenario) or table:scenario/@table:is-active">
<xsl:call-template name="create-table">
<xsl:with-param name="globalData" select="$globalData" />
</xsl:call-template>
</xsl:if>
+ <xsl:text>&#xa;</xsl:text>
</xsl:template>
@@ -110,10 +112,12 @@
</xsl:element>
</xsl:when>
<xsl:otherwise>
+ <xsl:text>&#xa;</xsl:text>
<xsl:call-template name="create-table-element">
<xsl:with-param name="globalData" select="$globalData" />
<xsl:with-param name="allVisibleTableRows" select="$allVisibleTableRows" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
diff --git a/filter/source/xslt/odf2xhtml/export/common/table/table_rows.xsl b/filter/source/xslt/odf2xhtml/export/common/table/table_rows.xsl
index 2d6cd7285037..60b47be753ca 100644
--- a/filter/source/xslt/odf2xhtml/export/common/table/table_rows.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/table/table_rows.xsl
@@ -196,7 +196,10 @@
<xsl:param name="node-position" />
<xsl:attribute name="class">
- <xsl:value-of select="translate(@table:style-name, '. %()/\+', '')" />
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="@table:style-name"/>
+ <xsl:with-param name="styleFamily" select="'table-row'"/>
+ </xsl:call-template>
</xsl:attribute>
</xsl:template>
diff --git a/filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl b/filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl
index f26e2cc0a6c9..0f36b36486de 100644
--- a/filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl
@@ -93,7 +93,10 @@
</xsl:attribute>
</xsl:if>
<xsl:attribute name="class">
- <xsl:value-of select="translate(parent::*/@text:style-name, '.,;: %()[]/\+', '_____________')"/>
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="parent::*/@text:style-name"/>
+ <xsl:with-param name="styleFamily" select="'table'"/>
+ </xsl:call-template>
</xsl:attribute>
</xsl:if>
@@ -291,7 +294,7 @@ Scenarios tabstops
-> put the preceding tab stops into a TD (left aligned is default)
4) first style:type would have no right preceding tabStop
- -> works well with first sceanrios 1 and 3
+ -> works well with first scenarios 1 and 3
5) last style:type would be a special case, if it would be left aligned, but this won't happen in our case... :D
@@ -317,7 +320,10 @@ Scenarios unmatched:
<xsl:element namespace="{$namespace}" name="p">
<xsl:if test="$position = 1">
<xsl:attribute name="class">
- <xsl:value-of select="translate(@text:style-name, '.,;: %()[]/\+', '_____________')"/>
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="@text:style-name"/>
+ <xsl:with-param name="styleFamily" select="'paragraph'"/>
+ </xsl:call-template>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates mode="content-table">
@@ -341,7 +347,10 @@ Scenarios unmatched:
<xsl:element namespace="{$namespace}" name="p">
<xsl:if test="$position = 1">
<xsl:attribute name="class">
- <xsl:value-of select="translate(@text:style-name, '.,;: %()[]/\+', '_____________')"/>
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="@text:style-name"/>
+ <xsl:with-param name="styleFamily" select="'paragraph'"/>
+ </xsl:call-template>
</xsl:attribute>
</xsl:if>
<xsl:call-template name="grab-cell-content-before-tab-stop">
@@ -358,7 +367,10 @@ Scenarios unmatched:
<xsl:element namespace="{$namespace}" name="p">
<xsl:if test="$position = 1">
<xsl:attribute name="class">
- <xsl:value-of select="translate(@text:style-name, '.,;: %()[]/\+', '_____________')"/>
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="@text:style-name"/>
+ <xsl:with-param name="styleFamily" select="'paragraph'"/>
+ </xsl:call-template>
</xsl:attribute>
</xsl:if>
<xsl:call-template name="grab-cell-content-before-tab-stop">
@@ -382,7 +394,10 @@ Scenarios unmatched:
<xsl:element namespace="{$namespace}" name="p">
<xsl:if test="$position = 1">
<xsl:attribute name="class">
- <xsl:value-of select="translate(@text:style-name, '.,;: %()[]/\+', '_____________')"/>
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="@text:style-name"/>
+ <xsl:with-param name="styleFamily" select="'paragraph'"/>
+ </xsl:call-template>
</xsl:attribute>
</xsl:if>
<xsl:element namespace="{$namespace}" name="td">
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 8c9cb705d967..a8a4aa0b0347 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?> <!-- -*- fill-column: 130; nxml-child-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- -->
<!--
* This file is part of the LibreOffice project.
*
@@ -19,7 +19,7 @@
<!--
For further documentation and updates visit http://xml.openoffice.org/odf2xhtml
-->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xt="http://www.jclark.com/xt" xmlns:common="http://exslt.org/common" xmlns:xalan="http://xml.apache.org/xalan" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" exclude-result-prefixes="chart config dc dom dr3d draw fo form math meta number office ooo oooc ooow script style svg table text xforms xlink xsd xsi xt common xalan" xmlns="http://www.w3.org/1999/xhtml">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xt="http://www.jclark.com/xt" xmlns:common="http://exslt.org/common" xmlns:xalan="http://xml.apache.org/xalan" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" exclude-result-prefixes="chart config dc dom dr3d draw fo form loext math meta number office ooo oooc ooow presentation script style svg table text xforms xlink xsd xsi xt common xalan" xmlns="http://www.w3.org/1999/xhtml">
<!--+++++ INCLUDED XSL MODULES +++++-->
@@ -50,9 +50,11 @@
<xsl:key name="writingModeStyles" match="/*/office:styles/style:style/style:paragraph-properties/@style:writing-mode | /*/office:automatic-styles/style:style/style:paragraph-properties/@style:writing-mode" use="'test'"/>
<xsl:template name="create-body">
<xsl:param name="globalData"/>
+ <xsl:text>&#xa;</xsl:text>
<xsl:call-template name="create-body.collect-page-properties">
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
</xsl:template>
<xsl:template name="create-body.collect-page-properties">
@@ -139,15 +141,21 @@
</xsl:choose>
<!-- adapt page size -->
<xsl:variable name="pageWidth" select="$pageProperties/style:page-layout-properties/@fo:page-width"/>
+ <xsl:variable name="pageHeight" select="$pageProperties/style:page-layout-properties/@fo:height"/>
<!-- multiple backgroundimages for different page styles (never used in html) -->
<xsl:variable name="backgroundImage" select="$pageProperties/style:page-layout-properties/style:background-image"/>
<!-- page margins & background image -->
- <xsl:if test="$pageWidth or $pageProperties/style:page-layout-properties/@fo:* or $backgroundImage/@xlink:href">
+ <xsl:if test="$pageWidth or $pageHeight or $pageProperties/style:page-layout-properties/@fo:* or $backgroundImage/@xlink:href">
<xsl:attribute name="style">
<xsl:if test="$pageWidth">
<xsl:text>max-width:</xsl:text>
- <xsl:value-of select="$pageWidth"/>
+ <xsl:value-of select="$pageWidth" />
+ <xsl:text>;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$pageHeight">
+ <xsl:text>max-height:</xsl:text>
+ <xsl:value-of select="$pageHeight" />
<xsl:text>;</xsl:text>
</xsl:if>
<xsl:if test="$pageProperties/style:page-layout-properties/@fo:* or $backgroundImage/@xlink:href">
@@ -178,6 +186,7 @@
</xsl:if>
</xsl:attribute>
</xsl:if>
+ <xsl:text>&#xa;</xsl:text>
<!-- processing the content of the OpenDocument content file -->
<xsl:apply-templates select="/*/office:body/*">
<xsl:with-param name="globalData" select="$globalData"/>
@@ -233,6 +242,7 @@
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:apply-templates>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
</xsl:template>
@@ -244,23 +254,25 @@
<xsl:template match="draw:text-box">
<xsl:param name="globalData"/>
+ <xsl:text>&#xa;</xsl:text>
<xsl:comment>Next 'div' was a 'draw:text-box'.</xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
<xsl:element name="div">
<xsl:variable name="dimension">
- <xsl:apply-templates select="@fo:min-width"/>
- <xsl:apply-templates select="@fo:max-width"/>
- <xsl:apply-templates select="@fo:min-height"/>
- <xsl:apply-templates select="@fo:max-height"/>
+ <xsl:apply-templates select="@fo:min-width" />
+ <xsl:apply-templates select="@fo:max-width" />
+ <xsl:apply-templates select="@fo:min-height" />
+ <xsl:apply-templates select="@fo:max-height" />
</xsl:variable>
- <xsl:if test="$dimension">
+ <xsl:if test="normalize-space($dimension)!=''">
<xsl:attribute name="style">
- <xsl:value-of select="$dimension"/>
+ <xsl:value-of select="$dimension" />
</xsl:attribute>
</xsl:if>
- <xsl:apply-templates select="@draw:name">
- <xsl:with-param name="globalData" select="$globalData"/>
- </xsl:apply-templates>
+ <xsl:apply-templates select="@xml:id">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
<xsl:apply-templates select="node()">
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:apply-templates>
@@ -341,7 +353,7 @@
A surrounding 'div' element taking over the image style solves that problem, but the div is invalid as child of a paragraph
Therefore the paragraph has to be exchanged with a HTML div element
-->
- <!-- 2DO page alignment fix - PART1 -->
+ <!-- TODO page alignment fix - PART1 -->
<xsl:variable name="childText"><xsl:apply-templates mode="getAllTextChildren"/></xsl:variable>
<xsl:choose>
<xsl:when test="name() = 'text:p' and not(*) and (normalize-space($childText) = '')">
@@ -359,7 +371,7 @@
</xsl:if>
</xsl:when>
- <xsl:when test="draw:frame and ((normalize-space($childText) != '') or (((count(*) - count(text:soft-page-break)) &gt; 1)))">
+ <xsl:when test="name() = 'draw:frame' and ((normalize-space($childText) != '') or (((count(*) - count(text:soft-page-break)) &gt; 1)))">
<!-- If there is a 'draw:frame' child with text (not being whitespace alone) and more than the draw:frame alone and
not the draw:frame and a soft-page-break alone (which is quite often) -->
@@ -368,10 +380,14 @@
<!-- The paragraph is written as DIV as there might be nested paragraphs (see above choose block) -->
<xsl:choose>
<xsl:when test="name() = 'text:p'">
+ <xsl:text>&#xa;</xsl:text>
<xsl:comment>Next 'div' was a 'text:p'.</xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
</xsl:when>
<xsl:otherwise>
+ <xsl:text>&#xa;</xsl:text>
<xsl:comment>Next 'div' was a 'draw:page'.</xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:element name="div">
@@ -380,12 +396,28 @@
</xsl:apply-templates>
<!-- the footnote symbol is the prefix for a footnote in the footer -->
<xsl:copy-of select="$footnotePrefix"/>
- <!-- start floating of frame (and siblings) -->
- <xsl:apply-templates select="node()[1]" mode="frameFloating">
+ <!-- deal with none draw:frame ahead of the <draw:frame> -->
+ <xsl:if test="name(node()[1]) != 'draw:frame'">
+ <xsl:apply-templates select="node()[1]" mode="frameFloating">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="previousFrameWidths" select="0"/>
+ <xsl:with-param name="previousFrameHeights" select="0"/>
+ <xsl:with-param name="leftPosition" select="0" />
+ <xsl:with-param name="stopAtFirstFrame" select="true()" />
+ <!-- TODO for me (Svante) - Not used, uncertain for now...
+ <xsl:with-param name="pageMarginLeft">
+ <xsl:call-template name="getPageMarginLeft"/>
+ </xsl:with-param>-->
+ </xsl:apply-templates>
+ </xsl:if>
+ <!-- start floating of frames (each take care of its siblings till next draw:frame) -->
+ <xsl:apply-templates select="draw:frame" mode="frameFloating">
<xsl:with-param name="globalData" select="$globalData" />
<xsl:with-param name="previousFrameWidths" select="0"/>
<xsl:with-param name="previousFrameHeights" select="0"/>
- <!-- 2DO for me (Svante) - Not used, uncertain 4now...
+ <xsl:with-param name="leftPosition" select="0"/>
+
+ <!-- TODO for me (Svante) - Not used, uncertain for now...
<xsl:with-param name="pageMarginLeft">
<xsl:call-template name="getPageMarginLeft"/>
</xsl:with-param>-->
@@ -395,7 +427,7 @@
&#160; is an unbreakable whitespace to give content to the element and force a browser not to ignore the element -->
<div style="clear:both; line-height:0; width:0; height:0; margin:0; padding:0;">&#160;</div>
</xsl:when>
- <xsl:when test="text:tab and not(ancestor::text:index-body)">
+ <xsl:when test="text:tab and not(ancestor::text:index-body)">
<!-- If there is a tabulator (ie. text:tab) within a paragraph, a heuristic for ODF tabulators creates a
span for every text:tab embracing the following text nodes aligning them according to the tabulator.
A line break or another text:tab starts a new text:span, line break even the tab counter for the line.
@@ -414,7 +446,7 @@
<xsl:variable name="paragraphName" select="@text:style-name" />
<xsl:variable name="imageParagraphStyle" select="$globalData/all-styles/style[@style:name = $paragraphName]/final-properties"/>
<!-- Only the left margin of the first paragraph of a list item will be added to the margin of the complete list (all levels)-->
-<!-- 2DO: left-margin in order with bidirectional -->
+ <!-- TODO: left-margin in order with bidirectional -->
<xsl:choose>
<xsl:when test="contains($imageParagraphStyle, 'margin-left:')">
<xsl:call-template name="convert2cm">
@@ -456,10 +488,12 @@
</xsl:if>
</xsl:when>
<xsl:otherwise>
+ <xsl:text>&#xa;</xsl:text>
<xsl:call-template name="create-paragraph">
<xsl:with-param name="globalData" select="$globalData" />
<xsl:with-param name="footnotePrefix" select="$footnotePrefix" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
@@ -481,7 +515,7 @@
<xsl:param name="parentMarginLeft" />
<xsl:param name="pageMarginLeft" />
-<!-- 2DO: EXCHANGE FOLLOWING SIBLING BY VARIABLE -->
+<!-- TODO: EXCHANGE FOLLOWING SIBLING BY VARIABLE -->
<xsl:variable name="followingSiblingNode" select="following-sibling::node()[1]"/>
@@ -506,7 +540,7 @@
<xsl:choose>
<xsl:when test="name() = 'text:tab'">
- <!-- every frame sibling have to be incapuslated within a div with left indent -->
+ <!-- every frame sibling have to be encapsulated within a div with left indent -->
<xsl:element name="span">
<xsl:choose>
<xsl:when test="count($tabStops/style:tab-stop) &gt; 0 and count($tabStops/style:tab-stop) &lt; 3">
@@ -531,6 +565,7 @@
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:apply-templates>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
<xsl:apply-templates select="following-sibling::node()[1]" mode="tabHandling">
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="tabStops" select="$tabStops"/>
@@ -542,6 +577,7 @@
<xsl:when test="name() = 'text:line-break'">
<!-- A line-break resets the tabCount to '0' -->
<br/>
+ <xsl:text>&#xa;</xsl:text>
<xsl:apply-templates select="following-sibling::node()[1]" mode="tabHandling">
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="tabStops" select="$tabStops"/>
@@ -549,6 +585,7 @@
<xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
<xsl:with-param name="pageMarginLeft" select="$pageMarginLeft"/>
</xsl:apply-templates>
+ <xsl:text>&#xa;</xsl:text>
</xsl:when>
<xsl:otherwise>
<!-- only before the first tab all content is written out -->
@@ -564,6 +601,7 @@
<xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
<xsl:with-param name="pageMarginLeft" select="$pageMarginLeft"/>
</xsl:apply-templates>
+ <xsl:text>&#xa;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@@ -672,7 +710,10 @@
<xsl:otherwise>p</xsl:otherwise>
</xsl:choose>
</xsl:variable>
-
+ <xsl:if test="name() = 'text:p' and $elementName = 'div'">
+ <xsl:comment>Next 'div' was a 'text:p'.</xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
+ </xsl:if>
<xsl:element name="{$elementName}">
<xsl:choose>
<!-- in ODF borders of paragraphs will be merged by default. Merging means the adjacent paragraphs are building a unit,
@@ -704,13 +745,19 @@
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:otherwise>
+ <!-- inbetween paragraphs with border/margin -->
+ <xsl:when test="$isPrecedingBorderParagraph and $isFollowingBorderParagraph">
<xsl:attribute name="class">
- <xsl:value-of select="translate(@text:style-name, '.,;: %()[]/\+', '_____________')"/>
+ <xsl:value-of select="concat(translate(@text:style-name, '.,;: %()[]/\+', '_____________'), '_borderSides')"/>
</xsl:attribute>
<xsl:apply-templates>
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="write-paragraph">
+ <xsl:with-param name="globalData" select="$globalData"/>
+ </xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
@@ -766,24 +813,19 @@
<xsl:text>;</xsl:text>
</xsl:template>
- <!-- As soon a frame is within a paragraph (text:p) or page:frame, every child element is floating (CSS) and worked out in sequence.
+ <!-- As soon a frame is within a paragraph (text:p) or page:frame, every child element is floating (CSS) and worked out in sequence.
Accumulating prior frame width and adding parent's left margin -->
<!-- Matching all elements and text beyond a paragraph/text:page which are sibling of a draw:frame -->
<xsl:template match="* | text()" mode="frameFloating">
<xsl:param name="globalData"/>
<xsl:param name="previousFrameWidths" select="0"/>
<xsl:param name="previousFrameHeights" select="0" />
- <!-- it becomes true for siblings after a draw:frame -->
- <xsl:param name="createDiv" select="false()"/>
- <xsl:param name="noDivBefore" select="true()"/>
- <xsl:param name="leftPosition" />
+ <xsl:param name="leftPosition" select="0" />
<xsl:param name="parentMarginLeft" />
- <xsl:param name="frameAlignedToParagraphWithSvgY" />
+ <xsl:param name="stopAtFirstFrame" select="false()" />
<xsl:choose>
- <xsl:when test="name() = 'draw:frame'">
- <xsl:copy-of select="$frameAlignedToParagraphWithSvgY"/>
-
+ <xsl:when test="name() = 'draw:frame' and not($stopAtFirstFrame)">
<!-- if the first node is a draw:frame create a div -->
<xsl:call-template name="createDrawFrame">
<xsl:with-param name="globalData" select="$globalData"/>
@@ -796,21 +838,23 @@
<xsl:otherwise>
<xsl:variable name="nextSiblingIsFrame" select="name(following-sibling::node()[1]) = 'draw:frame'"/>
<xsl:choose>
- <xsl:when test="$createDiv and normalize-space(.) != ''">
+ <xsl:when test="normalize-space(.) != ''">
<!-- every following frame sibling till the next draw:frame
- have to be incapuslated within a div with left indent.
+ have to be encapsulated within a div with left indent.
To be moved altogether according the indent (usually right) -->
+ <xsl:text>&#xa;</xsl:text>
<xsl:comment>Next 'div' added for floating.</xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
<xsl:element name="div">
<xsl:attribute name="style">
- <xsl:text>position:relative; left:</xsl:text>
+ <xsl:text>display:inline; position:relative; left:</xsl:text>
<xsl:value-of select="$leftPosition"/>
<xsl:text>cm;</xsl:text>
</xsl:attribute>
<xsl:apply-templates select=".">
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:apply-templates>
- <!-- if it is a frame sibling it will be NOT incapuslated within the div (as already within one) -->
+ <!-- if it is a frame sibling it will be NOT encapsulated within the div (as already within one) -->
<xsl:if test="not($nextSiblingIsFrame)">
<xsl:apply-templates select="following-sibling::node()[1]" mode="frameFloating">
<xsl:with-param name="globalData" select="$globalData"/>
@@ -818,42 +862,38 @@
<xsl:with-param name="previousFrameHeights" select="$previousFrameHeights"/>
<xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
<xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="createDiv" select="false()"/>
- <xsl:with-param name="noDivBefore" select="$noDivBefore"/>
- <xsl:with-param name="frameAlignedToParagraphWithSvgY" select="$frameAlignedToParagraphWithSvgY"/>
+ <xsl:with-param name="stopAtFirstFrame" select="$stopAtFirstFrame" />
</xsl:apply-templates>
</xsl:if>
</xsl:element>
- <xsl:copy-of select="$frameAlignedToParagraphWithSvgY"/>
<!-- Other draw:frame will be created outside of the div element -->
- <xsl:apply-templates select="following-sibling::draw:frame[1]" mode="frameFloating">
- <xsl:with-param name="globalData" select="$globalData"/>
- <xsl:with-param name="previousFrameWidths" select="$previousFrameWidths"/>
- <xsl:with-param name="previousFrameHeights" select="$previousFrameHeights"/>
- <xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
- <xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="frameAlignedToParagraphWithSvgY" select="$frameAlignedToParagraphWithSvgY"/>
- </xsl:apply-templates>
+ <xsl:if test="nextSiblingIsFrame and not(stopAtFirstFrame)">
+ <xsl:apply-templates select="following-sibling::draw:frame[1]" mode="frameFloating">
+ <xsl:with-param name="globalData" select="$globalData"/>
+ <xsl:with-param name="previousFrameWidths" select="$previousFrameWidths"/>
+ <xsl:with-param name="previousFrameHeights" select="$previousFrameHeights"/>
+ <xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
+ <xsl:with-param name="leftPosition" select="$leftPosition"/>
+ <xsl:with-param name="stopAtFirstFrame" select="$stopAtFirstFrame" />
+ </xsl:apply-templates>
+ </xsl:if>
</xsl:when>
- <xsl:when test="not($createDiv)">
+ <xsl:otherwise>
<xsl:apply-templates select=".">
<xsl:with-param name="globalData" select="$globalData"/>
- <xsl:with-param name="frameAlignedToParagraphWithSvgY" select="$frameAlignedToParagraphWithSvgY"/>
</xsl:apply-templates>
- <xsl:if test="not($nextSiblingIsFrame) or $noDivBefore">
+ <xsl:if test="not($nextSiblingIsFrame)">
<xsl:apply-templates select="following-sibling::node()[1]" mode="frameFloating">
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="previousFrameWidths" select="$previousFrameWidths"/>
<xsl:with-param name="previousFrameHeights" select="$previousFrameHeights"/>
<xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
<xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="createDiv" select="false()"/>
- <xsl:with-param name="noDivBefore" select="$noDivBefore"/>
- <xsl:with-param name="frameAlignedToParagraphWithSvgY" select="$frameAlignedToParagraphWithSvgY"/>
+ <xsl:with-param name="stopAtFirstFrame" select="$stopAtFirstFrame" />
</xsl:apply-templates>
</xsl:if>
- </xsl:when>
+ </xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
@@ -864,20 +904,16 @@
<xsl:param name="globalData"/>
<xsl:param name="previousFrameWidths" select="0"/>
<xsl:param name="previousFrameHeights" select="0" />
- <!-- it becomes true for siblings after a draw:frame -->
- <xsl:param name="createDiv" select="false()"/>
- <xsl:param name="noDivBefore" select="true()"/>
<xsl:param name="leftPosition" />
<xsl:param name="parentMarginLeft" />
- <xsl:param name="frameAlignedToParagraphWithSvgY" />
+ <xsl:param name="stopAtFirstFrame" select="false()" />
<xsl:apply-templates select="following-sibling::node()[1]" mode="frameFloating">
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="previousFrameWidths" select="$previousFrameWidths"/>
<xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
<xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="createDiv" select="$createDiv"/>
- <xsl:with-param name="noDivBefore" select="$noDivBefore"/>
+ <xsl:with-param name="stopAtFirstFrame" select="$stopAtFirstFrame" />
</xsl:apply-templates>
</xsl:template>
@@ -935,6 +971,7 @@
<xsl:param name="previousFrameWidths" select="0"/>
<xsl:param name="previousFrameHeights" select="0" />
<xsl:param name="parentMarginLeft"/>
+ <xsl:param name="stopAtFirstFrame" select="false()" />
<xsl:variable name="parentMarginLeftNew">
<xsl:choose>
@@ -953,7 +990,7 @@
</xsl:choose>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$parentMarginLeft"/>
+ <xsl:value-of select="normalize-space($parentMarginLeft)" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
@@ -990,7 +1027,9 @@
</xsl:variable>
<!-- if the frame is anchored on a paragraph -->
<xsl:if test="@text:anchor-type='paragraph'">
+ <xsl:text>&#xa;</xsl:text>
<xsl:comment>Next 'div' is emulating the top height of a draw:frame.</xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
<!-- When the svg:y is set relative to the paragraph content, the best way to emulate a positive height,
is to add an invisible division inbetween with a height.
Often text will flow into this 'gap', which is handled separately!
@@ -1006,37 +1045,6 @@
</xsl:element>
</xsl:if>
</xsl:if>
-
-
- <!--
- <xsl:variable name="followingSibling" select="following-sibling::node()[1]"/>
- <xsl:choose>
- HEURISTIC: if the frame is anchored on a paragraph and the above gab is big enough to hold a text line,
- move it behind the text
- <xsl:when test="@text:anchor-type='paragraph' and
- (
- ($svgY &gt; 0.5) or
- ($svgX &gt; 4)
- ) and normalize-space($followingSibling) != ''">
- <xsl:apply-templates select="$followingSibling" mode="frameFloating">
- <xsl:with-param name="globalData" select="$globalData"/>
- <xsl:with-param name="previousFrameWidths" select="$previousFrameWidths + $svgWidth"/>
- <xsl:with-param name="parentMarginLeft" select="$parentMarginLeftNew"/>
- <xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="createDiv" select="true()"/>
- <xsl:with-param name="noDivBefore" select="false()"/>
- <xsl:with-param name="frameAlignedToParagraphWithSvgY">
- <xsl:call-template name="createDrawFrame2">
- <xsl:with-param name="globalData" select="$globalData"/>
- <xsl:with-param name="previousFrameWidths" select="$previousFrameWidths + $svgWidth"/>
- <xsl:with-param name="parentMarginLeftNew" select="$parentMarginLeftNew"/>
- <xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="svgY" select="$svgY"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>-->
<xsl:call-template name="createDrawFrame2">
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="previousFrameWidths" select="$previousFrameWidths + $svgWidth"/>
@@ -1044,18 +1052,6 @@
<xsl:with-param name="leftPosition" select="$leftPosition"/>
<xsl:with-param name="svgY" select="$svgY"/>
</xsl:call-template>
- <xsl:apply-templates select="following-sibling::node()[1]" mode="frameFloating">
- <xsl:with-param name="globalData" select="$globalData"/>
- <xsl:with-param name="previousFrameWidths" select="$previousFrameWidths + $svgWidth"/>
- <xsl:with-param name="parentMarginLeft" select="$parentMarginLeftNew"/>
- <xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="createDiv" select="true()"/>
- <xsl:with-param name="noDivBefore" select="false()"/>
- </xsl:apply-templates>
- <!--
-
- </xsl:otherwise>
- </xsl:choose> -->
</xsl:template>
<xsl:template name="createDrawFrame2">
@@ -1071,9 +1067,9 @@
<xsl:otherwise>div</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:comment>Next '
- <xsl:value-of select="$elem-name"/>' is a draw:frame.
- </xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
+ <xsl:comment>Next '<xsl:value-of select="$elem-name"/>' is a draw:frame. </xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
<xsl:element name="{$elem-name}">
<xsl:choose>
<xsl:when test="draw:object/math:math">
@@ -1083,30 +1079,39 @@
replacement image and keep only the id attribute.
See fdo#66645 -->
<xsl:apply-templates select="@draw:name"/>
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="draw:object[1]"/>
- <!-- TODO: do not always add a space after the formula,
- for example when it is followed by a comma, period,
- dash etc This will probably require using regexp
- features like xsl:analyze-string -->
- <xsl:text> </xsl:text>
+ <xsl:apply-templates select="draw:object[1]"/><xsl:text> </xsl:text><!-- often trailing whitespace is missing -->
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="style">
<xsl:call-template name="widthAndHeight"/>
<xsl:text> padding:0; </xsl:text>
- <xsl:if test="@text:anchor-type!='as-char'">
- <!-- all images float (CSS float relative) with a left position calculated by svg:x - parentMarginLeft - previousFrameWidths -->
- <xsl:text> float:left; position:relative; left:</xsl:text>
- <xsl:value-of select="$leftPosition"/>
- <xsl:text>cm; </xsl:text>
- <!-- if the frame is anchored on a char -->
- <xsl:if test="@text:anchor-type='char'">
+ <xsl:choose>
+ <xsl:when test="@text:anchor-type='as-char'">
+ <!-- images being used as character are not floating and are not positioned (CSS position:static being the default)-->
+ <!--<xsl:text> position:static;</xsl:text>-->
+ </xsl:when>
+ <xsl:when test="@text:anchor-type!='as-char'">
+ <!-- all images float (CSS float relative) with a left position calculated by svg:x - parentMarginLeft - previousFrameWidths -->
+ <xsl:text> float:left; position:relative; left:</xsl:text>
+ <xsl:value-of select="$leftPosition" />
+ <xsl:text>cm; </xsl:text>
+ <!-- if the frame is anchored on a char -->
+ <xsl:if test="@text:anchor-type='char'">
+ <xsl:text>top:</xsl:text>
+ <xsl:value-of select="$svgY" />
+ <xsl:text>cm; </xsl:text>
+ </xsl:if>
+ </xsl:when>
+ <!-- if there is no attribute @text:anchor-type -->
+ <xsl:otherwise>
+ <xsl:text> position:absolute; left:</xsl:text>
+ <xsl:value-of select="$leftPosition" />
+ <xsl:text>cm; </xsl:text>
<xsl:text>top:</xsl:text>
- <xsl:value-of select="$svgY"/>
+ <xsl:value-of select="$svgY" />
<xsl:text>cm; </xsl:text>
- </xsl:if>
- </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:attribute>
<xsl:apply-templates select="@*">
<xsl:with-param name="globalData" select="$globalData"/>
@@ -1202,7 +1207,10 @@
NOTE: Should be handled as CSS style in style header -->
<xsl:variable name="min-label" select="$globalData/office:styles/text:outline-style/text:outline-level-style[@text:level = current()/@text:outline-level]/*/@text:min-label-width"/>
<xsl:attribute name="class">
- <xsl:value-of select="translate(@text:style-name, '.,;: %()[]/\+', '_____________')"/>
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="@text:style-name"/>
+ <xsl:with-param name="styleFamily" select="'paragraph'"/>
+ </xsl:call-template>
</xsl:attribute>
<xsl:call-template name="create-heading-anchor">
@@ -1214,6 +1222,7 @@
</xsl:apply-templates>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
</xsl:template>
<xsl:template name="create-heading-anchor">
@@ -1610,14 +1619,27 @@
============
The indent of a list label is not only calculated by using the text:space-before of the list level (listLevelStyle), but
- as well taking the left margin of the first paragraph (or heading) of the list into account as loy match="" name="" use=""/>ng it is not negative.
-
- | MARGIN LEFT | LABEL |
-
- | text:space-before (listlevelstyle) | text:min-label-width |
- | + fo:left-margin (firstParagraph) | |
-
- Further details beyond text:list-list...
+ as well taking the left margin of the first paragraph (or heading) of the list into account as long it is not negative.
+
+ | MARGIN LEFT | LABEL | CONTENT-PADDING
+ @text:space-before (1) | @text:min-label-width (1) | @text:min-label-distance (1)
+ | + @fo:left-margin (firstParagraph) | |
+
+
+ (1) all attributes belong to: text:list-style/$listLevelStyle/style:list-level-properties/@*
+ $listLevelStyle might be one of three choices:
+ 1) <text:list-level-style-number>
+ 2) <text:list-level-style-bullet>
+ 3) <text:list-level-style-image>
+
+ For example:
+ <text:list-style style:name="Appendix">
+ <text:list-level-style-number text:level="1" text:style-name="Zeichenformat" style:num-prefix="Appendix " style:num-suffix=". " style:num-format="A" style:num-letter-sync="true">
+ <style:list-level-properties text:min-label-width="0.762cm" text:min-label-distance="0.127cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" text:style-name="Zeichenformat" style:num-suffix="." style:num-format="1" text:display-levels="2">
+ <style:list-level-properties text:min-label-width="1.016cm"/>
+ </text:list-level-style-number>
-->
<xsl:key name="listStyles" match=" /*/office:styles/text:list-style | /*/office:automatic-styles/text:list-style | /*/office:styles/style:graphic-properties/text:list-style | /*/office:automatic-styles/style:graphic-properties/text:list-style | /*/office:styles/text:list-style | /*/office:automatic-styles/text:list-style | /*/office:styles/style:graphic-properties/text:list-style | /*/office:automatic-styles/style:graphic-properties/text:list-style" use="@style:name"/>
@@ -1628,7 +1650,7 @@
<xsl:param name="globalData"/>
<xsl:param name="isListNumberingReset"/>
<xsl:param name="isNextLevelNumberingReset"/>
- <xsl:param name="listLevel" select="1"/>
+ <xsl:param name="listLevel" select="count(ancestor::text:list) + 1"/>
<xsl:param name="listRestart" select="false()"/>
<xsl:param name="itemLabel" select="''"/>
<xsl:param name="listStyle"/>
@@ -1705,6 +1727,8 @@
<!-- $globalData/styles-file/*/office:styles/ -->
<xsl:variable name="listLevelStyle" select="$listStyle/*/*[@text:level = number($listLevel)]"/>
+ <!-- TODO: Access new list styles
+ <xsl:variable name="listLevelLabelAlignment1" select="$listLevelStyle/style:list-level-properties/style:list-level-label-alignment"/>-->
<xsl:variable name="listIndent">
<xsl:call-template name="getListIndent">
<xsl:with-param name="globalData" select="$globalData"/>
@@ -1955,7 +1979,7 @@
<xsl:if test="$listStyle/text:list-style/text:list-level-style-number">
<!--
A numbered label (e.g. 2.C.III) is created for every text:list-item/header.
- Above list levels are listed in the label, if the list-style requires this. Levels are separated by a '.'
+ Above list levels are listed in the label, if the list-style requires this. Levels are separated by @style:num-suffix
Formatation is dependent for every list level depth.
The label is passed from ancestor text:list-item/header and if required truncated.
The prefix/suffix (as well list level dependent) comes before and after the complete label (after truncation)
@@ -1976,6 +2000,7 @@
</xsl:with-param>
<xsl:with-param name="listLevel" select="$listLevel"/>
<xsl:with-param name="listLevelStyle" select="$listLevelStyle"/>
+ <xsl:with-param name="listStyleName" select="$listStyleName"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>
@@ -2003,24 +2028,23 @@
<xsl:otherwise>
<xsl:variable name="listLabelWidth">
<xsl:choose>
- <xsl:when test="$minLabelWidth &gt; $minLabelDist">
+ <xsl:when test="$minLabelWidth &gt; 0">
<xsl:value-of select="$minLabelWidth"/>
</xsl:when>
<xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$minLabelDist &gt; 0">
- <xsl:value-of select="$minLabelDist"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="listLevelLabelAlignment" select="$listLevelStyle/style:list-level-properties/style:list-level-label-alignment"/>
- <xsl:variable name="listLevelTextIndent">
- <xsl:call-template name="convert2cm">
- <xsl:with-param name="value" select="string($listLevelLabelAlignment/@fo:text-indent)"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="-$listLevelTextIndent"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:variable name="listLevelLabelAlignment" select="$listLevelStyle/style:list-level-properties/style:list-level-label-alignment"/>
+ <xsl:variable name="listLevelTextIndent">
+ <xsl:call-template name="convert2cm">
+ <xsl:with-param name="value" select="string($listLevelLabelAlignment/@fo:text-indent)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <!-- TODO: Access new ODF 1.2 list styles
+ <xsl:variable name="listLevelTextIndent">
+ <xsl:call-template name="convert2cm">
+ <xsl:with-param name="value" select="string($listLevelLabelAlignment/@text:list-tab-stop-position)"/>
+ </xsl:call-template>
+ </xsl:variable> -->
+ <xsl:value-of select="-$listLevelTextIndent"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
@@ -2036,14 +2060,22 @@
</xsl:if>
<xsl:attribute name="style">
<xsl:text>display:block;float:</xsl:text>
- <!-- 2DO: Svante - copy this functionality for other used margin:left (in western country 'left') -->
+ <!-- TODO: Svante - copy this functionality for other used margin:left (in western country 'left') -->
<xsl:call-template name="getOppositeWritingDirection">
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="paraStyleName" select="descendant-or-self::*/@text:style-name"/>
</xsl:call-template>
<xsl:text>;min-width:</xsl:text>
- <xsl:value-of select="translate($listLabelWidth,',','.')"/>
+ <xsl:choose>
+ <xsl:when test="$listLabelWidth and not($listLabelWidth='') and not($listLabelWidth='NaN')">
+ <xsl:value-of select="translate($listLabelWidth,',','.')"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
<xsl:text>cm;</xsl:text>
+ <xsl:if test="$minLabelDist &gt; 0">
+ <xsl:text>padding-right:</xsl:text><xsl:value-of select="$minLabelDist"/><xsl:text>cm;</xsl:text>
+ </xsl:if>
</xsl:attribute>
<xsl:variable name="labelContent">
<xsl:choose>
@@ -2051,9 +2083,11 @@
<xsl:apply-templates select="text:number" mode="listnumber"/>
</xsl:when>
<xsl:when test="name($listLevelStyle) = 'text:list-level-style-bullet'">
- <xsl:value-of select="$listLevelStyle/@style:num-prefix"/>
+ <!-- not viewed in LO similar to tdf146264
+ <xsl:value-of select="$listLevelStyle/@style:num-prefix"/>-->
<xsl:value-of select="$listLevelStyle/@text:bullet-char"/>
- <xsl:value-of select="$listLevelStyle/@style:num-suffix"/>
+ <!-- not viewed in LO see tdf146264
+ <xsl:value-of select="$listLevelStyle/@style:num-suffix"/>-->
</xsl:when>
<xsl:when test="name($listLevelStyle) = 'text:list-level-style-number'">
<xsl:value-of select="$listLevelStyle/@style:num-prefix"/>
@@ -2081,16 +2115,6 @@
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="listLabelEmptyElement">
- <xsl:variable name="listLabelWidth">
- <xsl:choose>
- <xsl:when test="$minLabelWidth &gt; $minLabelDist">
- <xsl:value-of select="$minLabelWidth"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$minLabelDist"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
<xsl:element name="span">
<xsl:if test="$listLevelStyle/@text:style-name">
<xsl:attribute name="class">
@@ -2104,8 +2128,16 @@
<xsl:with-param name="paraStyleName" select="descendant-or-self::*/@text:style-name"/>
</xsl:call-template>
<xsl:text>;min-width:</xsl:text>
- <xsl:value-of select="translate($listLabelWidth,',','.')"/>
+ <xsl:choose>
+ <xsl:when test="$minLabelWidth and not($minLabelWidth='') and not($minLabelWidth='NaN')">
+ <xsl:value-of select="translate($minLabelWidth,',','.')"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
<xsl:text>cm</xsl:text>
+ <xsl:if test="$minLabelDist &gt; 0">
+ <xsl:text>padding-right:</xsl:text><xsl:value-of select="$minLabelDist"/><xsl:text>cm;</xsl:text>
+ </xsl:if>
</xsl:attribute>
<xsl:comment>&#160;</xsl:comment>
</xsl:element>
@@ -2181,6 +2213,7 @@
<xsl:param name="listStyle"/>
<xsl:param name="listStyleName"/>
<xsl:param name="minLabelWidth"/>
+ <xsl:param name="minLabelDist"/>
<xsl:apply-templates mode="list-item-children" select="following-sibling::*[1]">
<xsl:with-param name="globalData" select="$globalData"/>
@@ -2196,6 +2229,7 @@
<xsl:with-param name="listStyleName" select="$listStyleName"/>
<xsl:with-param name="listIndent" select="$listIndent"/>
<xsl:with-param name="minLabelWidth" select="$minLabelWidth"/>
+ <xsl:with-param name="minLabelDist" select="$minLabelDist"/>
</xsl:apply-templates>
</xsl:template>
@@ -2277,7 +2311,7 @@
<xsl:choose>
<!-- if it has content the counting is ended -->
<xsl:when test="*[name() = 'text:h' or name() = 'text:p'] or $isListHeader">
- <!-- 2DO: Perhaps the children still have to be processed -->
+ <!-- TODO: Perhaps the children still have to be processed -->
<xsl:value-of select="$itemNumber + $pseudoLevel"/>
</xsl:when>
<xsl:otherwise>
@@ -2475,7 +2509,6 @@
</xsl:when>
<xsl:otherwise>
<xsl:variable name="numberedSymbol">
- <xsl:comment>&#160;</xsl:comment>
<!-- only give out a number when number format is not empty -->
<xsl:if test="$listLevelStyle/@style:num-format != ''">
<xsl:number value="$itemNumber" format="{$listLevelStyle/@style:num-format}"/>
@@ -2483,10 +2516,10 @@
</xsl:variable>
<xsl:choose>
<xsl:when test="$listLevelsToDisplay != 1">
- <xsl:value-of select="concat($itemLabel, '.' , $numberedSymbol)"/>
+ <xsl:value-of select="concat($itemLabel, $listLevelStyle/@style:num-prefix , $numberedSymbol, $listLevelStyle/@style:num-suffix)"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$numberedSymbol"/>
+ <xsl:value-of select="concat($listLevelStyle/@style:num-prefix , $numberedSymbol, $listLevelStyle/@style:num-suffix)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
@@ -2530,9 +2563,10 @@
<xsl:param name="listRestart"/>
<xsl:param name="listStyle"/>
<xsl:param name="listStyleName"/>
+ <xsl:param name="minLabelDist"/>
<xsl:param name="minLabelWidth"/>
- <!-- 2DO page alignment fix - PART1 -->
+ <!-- TODO page alignment fix - PART1 -->
<!-- xhtml:p may only contain inline elements.
If there is one frame beyond, div must be used! -->
@@ -2578,6 +2612,7 @@
<xsl:with-param name="listStyle" select="$listStyle"/>
<xsl:with-param name="listStyleName" select="$listStyleName"/>
<xsl:with-param name="listIndent" select="$listIndent"/>
+ <xsl:with-param name="minLabelDist" select="$minLabelDist"/>
<xsl:with-param name="minLabelWidth" select="$minLabelWidth"/>
</xsl:apply-templates>
</xsl:template>
@@ -2600,7 +2635,8 @@
<xsl:param name="listStyleName"/>
<xsl:param name="minLabelWidth"/>
- <xsl:element name="h">
+ <xsl:variable name="headingName" select="concat('h', $listLevel - 1)"/>
+ <xsl:element name="{$headingName}">
<xsl:call-template name="create-list-style">
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="listIndent" select="$listIndent"/>
@@ -2710,6 +2746,7 @@
<xsl:param name="listLevel"/>
<xsl:param name="listRestart"/>
<xsl:param name="listStyle"/>
+ <xsl:param name="listLevelStyle"/>
<xsl:param name="listStyleName"/>
<xsl:apply-templates select="self::*">
@@ -2776,12 +2813,15 @@
<xsl:param name="globalData"/>
<xsl:if test="not(contains(@text:display, 'none'))">
+ <xsl:text>&#xa;</xsl:text>
<xsl:comment>Next 'div' was a 'text:section'.</xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
<xsl:element name="div">
<xsl:call-template name="apply-styles-and-content">
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:call-template>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
</xsl:if>
</xsl:template>
@@ -2810,15 +2850,330 @@
</xsl:choose>
</xsl:template>
- <xsl:template match="@text:style-name | @draw:style-name | @draw:text-style-name | @table:style-name"><!-- | @presentation:style-name-->
+ <xsl:template match="@text:style-name | @draw:style-name | @draw:text-style-name | @table:style-name | @presentation:style-name">
<xsl:param name="globalData"/>
- <xsl:attribute name="class">
- <xsl:value-of select="translate(., '.,;: %()[]/\+', '_____________')"/>
- </xsl:attribute>
+ <!-- the problem there can be more than one style-name attribute! We need to write class once with all style-name attribute values -->
+ <xsl:variable name="classAttributeValue">
+ <xsl:if test="parent::*/@text:style-name != ''">
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="parent::*/@text:style-name"/>
+ <xsl:with-param name="styleFamily">
+ <xsl:call-template name="get-style-family-name">
+ <xsl:with-param name="parentName" select="name(..)"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:if test="parent::*/@draw:style-name != ''">
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="parent::*/@draw:style-name"/>
+ <xsl:with-param name="styleFamily">
+ <xsl:call-template name="get-style-family-name">
+ <xsl:with-param name="parentName" select="name(..)"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:if test="parent::*/@draw:text-style-name != ''">
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="parent::*/@draw:text-style-name"/>
+ <xsl:with-param name="styleFamily">
+ <xsl:call-template name="get-style-family-name">
+ <xsl:with-param name="parentName" select="name(..)"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:if test="parent::*/@table:style-name != ''">
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="parent::*/@table:style-name"/>
+ <xsl:with-param name="styleFamily">
+ <xsl:call-template name="get-style-family-name">
+ <xsl:with-param name="parentName" select="name(..)"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:if test="parent::*/@presentation:style-name != ''">
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="parent::*/@presentation:style-name"/>
+ <xsl:with-param name="styleFamily">
+ <xsl:call-template name="get-style-family-name">
+ <xsl:with-param name="parentName" select="name(..)"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template><xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:attribute name="class"><xsl:value-of select="normalize-space($classAttributeValue)"/></xsl:attribute>
+ </xsl:template>
+
+
+ <xsl:template name="create-unique-style-id">
+ <xsl:param name="styleName" />
+ <xsl:param name="styleFamily" />
+
+ <xsl:call-template name="abbreviate-style-family-name">
+ <xsl:with-param name="styleFamily" select="$styleFamily"/>
+ </xsl:call-template>
+ <xsl:text>-</xsl:text>
+ <xsl:value-of select="translate($styleName, '.,;: %()[]/\+', '_____________')"/>
</xsl:template>
+ <xsl:template name="abbreviate-style-family-name">
+ <xsl:param name="styleFamily" />
+ <!--<xsl:message>abbreviate-style-family-name: The style family is '<xsl:value-of select="$styleFamily"/>'</xsl:message>-->
+
+ <!--
+ The complete set of family types (aka @style:family) is defined in the ODF specification:
+ https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html#attribute-style_family
+ (realized style family 'section' is missing, see https://docs.oasis-open.org/office/OpenDocument/v1.3/os/schemas/OpenDocument-v1.3-schema-rng.html#12668
+ and wrote an issue to ODF TC: https://github.com/oasis-tcs/odf-tc/issues/49
+ -->
+ <xsl:choose>
+ <!-- chart: family name of styles for charts. -->
+ <xsl:when test="$styleFamily='chart'">
+ <xsl:text>chart</xsl:text>
+ </xsl:when>
+ <!-- drawing-page: family name of styles for drawing pages. -->
+ <xsl:when test="$styleFamily='drawing-page'">
+ <xsl:text>page</xsl:text>
+ </xsl:when>
+ <!-- graphic: family name of styles for graphic elements. -->
+ <xsl:when test="$styleFamily='graphic'">
+ <xsl:text>graphic</xsl:text>
+ </xsl:when>
+ <!-- paragraph: family name of styles for paragraphs. -->
+ <xsl:when test="$styleFamily='paragraph'">
+ <xsl:text>paragraph</xsl:text>
+ </xsl:when>
+ <!-- presentation: family name of styles for presentations. -->
+ <xsl:when test="$styleFamily='presentation'">
+ <xsl:text>presentation</xsl:text>
+ </xsl:when>
+ <!-- ruby: family name of styles for ruby text. -->
+ <xsl:when test="$styleFamily='ruby'">
+ <xsl:text>ruby</xsl:text>
+ </xsl:when>
+ <!-- section: family name of styles for sections. -->
+ <xsl:when test="$styleFamily='section'">
+ <xsl:text>section</xsl:text>
+ </xsl:when>
+ <!-- table: family name of styles for tables. -->
+ <xsl:when test="$styleFamily='table'">
+ <xsl:text>table</xsl:text>
+ </xsl:when>
+ <!-- table-cell: family name of styles for table cells. -->
+ <xsl:when test="$styleFamily='table-cell'">
+ <xsl:text>cell</xsl:text>
+ </xsl:when>
+ <!-- table-column: family name of styles for table columns. -->
+ <xsl:when test="$styleFamily='table-column'">
+ <xsl:text>col</xsl:text>
+ </xsl:when>
+ <!-- table-row: family name of styles for table rows. -->
+ <xsl:when test="$styleFamily='table-row'">
+ <xsl:text>row</xsl:text>
+ </xsl:when>
+ <!-- text: family name of styles for text. -->
+ <xsl:when test="$styleFamily='text'">
+ <xsl:text>text</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>WARNING: No style family found for <xsl:value-of select="$styleFamily"/></xsl:message>
+ <xsl:text>unknown-family</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="get-style-family-name">
+ <xsl:param name="parentName" />
+
+
+ <!--<xsl:message>get-style-family-name: The style parent is '<xsl:value-of select="name(..)"/>'</xsl:message>-->
+ <!--
+ The complete set of family types (aka @style:family) is defined in the ODF specification:
+ https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html#attribute-style_family
+ (realized style family 'section' is missing, see https://docs.oasis-open.org/office/OpenDocument/v1.3/os/schemas/OpenDocument-v1.3-schema-rng.html#12668
+ and wrote an issue to ODF TC: https://github.com/oasis-tcs/odf-tc/issues/49
+
+ in addition the mapping of styleable ODF elements to their @style:family attribute is available in structured form (XML) in the ODF Toolkit generator project:
+ https://github.com/tdf/odftoolkit/blob/master/generator/schema2template/src/test/resources/test-input/odf/generation/odfdom-java/dom/grammar-additions.xml#LL43C52-L43C52r-additions.xml#LL43C52-L43C52
+ -->
+ <xsl:choose>
+ <!-- chart: family name of styles for charts. -->
+ <xsl:when test="
+ $parentName='chart:axis' or
+ $parentName='chart:chart' or
+ $parentName='chart:data-point' or
+ $parentName='chart:error-indicator' or
+ $parentName='chart:floor' or
+ $parentName='chart:footer' or
+ $parentName='chart:grid' or
+ $parentName='chart:legend' or
+ $parentName='chart:mean-value' or
+ $parentName='chart:plot-area' or
+ $parentName='chart:regression-curve' or
+ $parentName='chart:series' or
+ $parentName='chart:stock-gain-marker' or
+ $parentName='chart:stock-loss-marker' or
+ $parentName='chart:stock-range-line' or
+ $parentName='chart:subtitle' or
+ $parentName='chart:title' or
+ $parentName='chart:wall'">
+ <xsl:text>chart</xsl:text>
+ </xsl:when>
+ <!-- drawing-page: family name of styles for drawing pages. -->
+ <xsl:when test="
+ $parentName='draw:page' or
+ $parentName='style:handout-master' or
+ $parentName='style:master-page' or
+ $parentName='presentation:notes'">
+ <xsl:text>drawing-page</xsl:text>
+ </xsl:when>
+ <!-- graphic: family name of styles for graphic elements. -->
+ <xsl:when test="
+ $parentName='dr3d:cube' or
+ $parentName='dr3d:extrude' or
+ $parentName='dr3d:rotate' or
+ $parentName='dr3d:scene' or
+ $parentName='dr3d:sphere' or
+ $parentName='draw:caption' or
+ $parentName='draw:circle' or
+ $parentName='draw:connector' or
+ $parentName='draw:control' or
+ $parentName='draw:custom-shape' or
+ $parentName='draw:ellipse' or
+ $parentName='draw:frame' or
+ $parentName='draw:g' or
+ $parentName='draw:line' or
+ $parentName='draw:measure' or
+ $parentName='draw:page-thumbnail' or
+ $parentName='draw:path' or
+ $parentName='draw:polygon' or
+ $parentName='draw:polyline' or
+ $parentName='draw:rect' or
+ $parentName='draw:regular-polygon' or
+ $parentName='office:annotation'">
+ <xsl:text>graphic</xsl:text>
+ </xsl:when>
+ <!-- paragraph: family name of styles for paragraphs. -->
+ <xsl:when test="
+ $parentName='text:alphabetical-index-entry-template' or
+ $parentName='text:bibliography-entry-template' or
+ $parentName='text:h' or
+ $parentName='text:illustration-index-entry-template' or
+ $parentName='text:index-source-style' or
+ $parentName='text:index-title-template' or
+ $parentName='text:object-index-entry-template' or
+ $parentName='text:p' or
+ $parentName='text:table-index-entry-template' or
+ $parentName='text:table-of-content-entry-template' or
+ $parentName='text:user-index-entry-template'">
+ <xsl:text>paragraph</xsl:text>
+ </xsl:when>
+ <!-- presentation: family name of styles for presentations. -->
+ <xsl:when test="
+ $parentName='dr3d:cube' or
+ $parentName='dr3d:extrude' or
+ $parentName='dr3d:rotate' or
+ $parentName='dr3d:scene' or
+ $parentName='dr3d:sphere' or
+ $parentName='draw:caption' or
+ $parentName='draw:circle' or
+ $parentName='draw:connector' or
+ $parentName='draw:control' or
+ $parentName='draw:custom-shape' or
+ $parentName='draw:ellipse' or
+ $parentName='draw:frame' or
+ $parentName='draw:g' or
+ $parentName='draw:line' or
+ $parentName='draw:measure' or
+ $parentName='draw:page-thumbnail' or
+ $parentName='draw:path' or
+ $parentName='draw:polygon' or
+ $parentName='draw:polyline' or
+ $parentName='draw:rect' or
+ $parentName='draw:regular-polygon' or
+ $parentName='office:annotation'">
+ <xsl:text>presentation</xsl:text>
+ </xsl:when>
+ <!-- ruby: family name of styles for ruby text. -->
+ <xsl:when test="$parentName='text:ruby' or
+ $parentName='text:ruby-text'">
+ <xsl:text>ruby</xsl:text>
+ </xsl:when>
+ <!-- section: family name of styles for sections. -->
+ <xsl:when test="
+ $parentName='text:alphabetical-index' or
+ $parentName='text:bibliography' or
+ $parentName='text:illustration-index' or
+ $parentName='text:index-title' or
+ $parentName='text:object-index' or
+ $parentName='text:page' or
+ $parentName='text:section' or
+ $parentName='text:s' or
+ $parentName='text:table-index' or
+ $parentName='text:table-of-content' or
+ $parentName='text:user-index'">
+ <xsl:text>section</xsl:text>
+ </xsl:when>
+ <!-- table: family name of styles for tables. -->
+ <xsl:when test="$parentName='table:table'">
+ <xsl:text>table</xsl:text>
+ </xsl:when>
+ <!-- table-cell: family name of styles for table cells. -->
+ <xsl:when test="
+ $parentName='table:table-cell' or
+ $parentName='table:body' or
+ $parentName='table:even-columns' or
+ $parentName='table:even-rows' or
+ $parentName='table:first-column' or
+ $parentName='table:first-row' or
+ $parentName='table:last-column' or
+ $parentName='table:last-row' or
+ $parentName='table:odd-columns' or
+ $parentName='table:odd-rows' or
+ $parentName='table:covered-table-cell'">
+ <xsl:text>table-cell</xsl:text>
+ </xsl:when>
+ <!-- table-column: family name of styles for table columns. -->
+ <xsl:when test="$parentName='table:table-column'">
+ <xsl:text>table-column</xsl:text>
+ </xsl:when>
+ <!-- table-row: family name of styles for table rows. -->
+ <xsl:when test="$parentName='table:table-row'">
+ <xsl:text>table-row</xsl:text>
+ </xsl:when>
+ <!-- text: family name of styles for text. -->
+ <xsl:when test="
+ $parentName='text:index-entry-bibliography' or
+ $parentName='text:index-entry-chapter' or
+ $parentName='text:index-entry-link-end' or
+ $parentName='text:index-entry-link-start' or
+ $parentName='text:index-entry-page-number' or
+ $parentName='text:index-entry-span' or
+ $parentName='text:index-entry-tab-stop' or
+ $parentName='text:index-entry-text' or
+ $parentName='text:a' or
+ $parentName='text:span' or
+ $parentName='style:drop-cap' or
+ $parentName='text:line-break' or
+ $parentName='text:tab' or
+ $parentName='text:linenumbering-configuration'">
+ <xsl:text>text</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>WARNING: No style family found for parent element <xsl:value-of select="$parentName"/></xsl:message>
+ <xsl:text>unknown-family-parent</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
<!-- ***************** -->
<!-- *** Footnotes *** -->
<!-- ***************** -->
@@ -3003,6 +3358,11 @@
</xsl:attribute>
</xsl:template>
+ <!-- our mathml should always be inline the text flow -->
+ <xsl:template match="@display" mode="math">
+ <xsl:attribute name="{local-name()}">inline</xsl:attribute>
+ </xsl:template>
+
<!-- Ignore semantic annotations -->
<xsl:template match="math:semantics" mode="math">
<xsl:apply-templates select="*[1]" mode="math"/>
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
index 522ad4823d63..bdd2d05b0925 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
@@ -55,12 +55,14 @@
<xsl:template name="create-header">
<xsl:param name="globalData" />
+ <xsl:text>&#xa;</xsl:text>
<xsl:element name="head">
<xsl:attribute name="profile">http://dublincore.org/documents/dcmi-terms/</xsl:attribute>
<xsl:if test="$debugEnabled"><xsl:message>CSS helper variable will be created...</xsl:message></xsl:if>
<xsl:call-template name='xhtml-header-properties'>
<xsl:with-param name="globalData" select="$globalData" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<xsl:if test="$debugEnabled"><xsl:message>CSS variable ready, header will be created...</xsl:message></xsl:if>
<!-- constructing the css header simulating inheritance of style-families by style order -->
@@ -68,6 +70,7 @@
<xsl:with-param name="globalData" select="$globalData" />
</xsl:call-template>
<xsl:if test="$debugEnabled"><xsl:message>CSS header creation finished!</xsl:message></xsl:if>
+ <xsl:text>&#xa;</xsl:text>
</xsl:element>
</xsl:template>
@@ -77,7 +80,9 @@
<xsl:param name="globalData" />
<xsl:element name="style">
- <xsl:attribute name="type">text/css</xsl:attribute>
+ <!-- https://validator.w3.org/unicorn:
+ The “type†attribute for the “style†element is not needed and should be omitted.
+ <xsl:attribute name="type">text/css</xsl:attribute> -->
<xsl:text>
</xsl:text>
<xsl:call-template name='create-page-layout'>
@@ -103,11 +108,6 @@
</xsl:text>
<xsl:text>li { list-style: none; margin:0; padding:0;}
</xsl:text>
-<xsl:text>/* "li span.odfLiEnd" - IE 7 issue*/</xsl:text>
-<xsl:text>
- </xsl:text>
-<xsl:text>li span. { clear: both; line-height:0; width:0; height:0; margin:0; padding:0; }
- </xsl:text>
<xsl:text>span.footnodeNumber { padding-right:1em; }
</xsl:text>
<xsl:text>span.annotation_style_by_filter { font-size:95%; font-family:Arial; background-color:#fff000; margin:0; border:0; padding:0; }
@@ -129,14 +129,20 @@
<xsl:for-each select="$globalData/all-styles/style">
<xsl:if test="final-properties != ''">
<!-- NOTE: easy process, as only the style family in conjunction with the style name, makes the style unambiguous -->
- <xsl:text>.</xsl:text><!--<xsl:value-of select="@style:family" /><xsl:text>:</xsl:text>--><xsl:value-of select="translate(@style:name, '.,;: %()[]/\+', '_____________')"/><xsl:text> { </xsl:text> <xsl:value-of select="final-properties" /><xsl:text>}
+ <xsl:text>.</xsl:text>
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="@style:name"/>
+ <xsl:with-param name="styleFamily" select="@style:family"/>
+ </xsl:call-template>
+ <xsl:text>{ </xsl:text> <xsl:value-of select="final-properties" /><xsl:text>}
</xsl:text>
</xsl:if>
</xsl:for-each>
<!-- Otherwise all styles have been processed and the empty styles have to be given out -->
- <xsl:text>/* ODF styles with no properties representable as CSS */</xsl:text><xsl:text>
- </xsl:text><xsl:for-each select="$globalData/all-styles/style[final-properties = '']"><xsl:value-of select="concat('.', @style:name, ' ')"/></xsl:for-each> { }
+ <xsl:text>/* ODF styles with no properties representable as CSS:
+ </xsl:text><xsl:for-each select="$globalData/all-styles/style[final-properties = '']"><xsl:value-of select="concat('.', @style:name, ' ')"/></xsl:for-each><xsl:text> { } */
+</xsl:text>
</xsl:template>
<!-- Creating CSS page layout based on first office master style -->
@@ -165,20 +171,23 @@
<!-- Find the according style:page-layout and store the properties in a variable -->
<xsl:variable name="pageProperties" select="key('pageLayoutElements', $pageLayoutName)/style:page-layout-properties"/>
-<xsl:text>@page { </xsl:text>
-
- <xsl:call-template name="page-size">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="pageProperties" select="$pageProperties" />
- </xsl:call-template>
- <xsl:call-template name="page-margin">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="pageProperties" select="$pageProperties" />
- </xsl:call-template>
+ <xsl:variable name="pageSize">
+ <xsl:call-template name="page-size">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="pageProperties" select="$pageProperties" />
+ </xsl:call-template>
+ <xsl:call-template name="page-margin">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="pageProperties" select="$pageProperties" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$pageSize and $pageSize!=''">
+<xsl:text>@page { </xsl:text>
+<xsl:value-of select="$pageSize"/>
<xsl:text> }
</xsl:text>
-
+ </xsl:if>
</xsl:template>
@@ -245,11 +254,13 @@
<xsl:for-each select="$globalData/meta-file/*/office:meta/meta:user-defined">
<xsl:if test="./@meta:name='ODF.base'">
<xsl:value-of select="." />
+ <xsl:text>&#xa;</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="$globalData/meta-file/*/office:meta/meta:user-defined">
<xsl:if test="./@meta:name='ODF.filename'">
<xsl:value-of select="." />
+ <xsl:text>&#xa;</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:variable>
@@ -281,11 +292,13 @@
</xsl:for-each>
</xsl:variable>
+ <xsl:text>&#xa;</xsl:text>
<!-- explicit output content-type for low-tech browser (e.g. IE6) -->
<xsl:element name="meta">
<xsl:attribute name="http-equiv">Content-Type</xsl:attribute>
<xsl:attribute name="content">application/xhtml+xml; charset=utf-8</xsl:attribute>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
<!-- title of document for browser frame title -->
<xsl:element name="title">
@@ -303,6 +316,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
<!-- title, in DC syntax -->
<xsl:element name="meta">
@@ -314,6 +328,7 @@
<xsl:value-of select="$lang" />
</xsl:attribute>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
<!-- the identifier for source (identifier) -->
<xsl:call-template name="add-meta-tag">
@@ -321,6 +336,7 @@
<xsl:with-param name="meta-data" select="translate($netloc, ' ','')" />
<xsl:with-param name="meta-enc" select="'DCTERMS.URI'" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<!-- the language for source (language) -->
<xsl:call-template name="add-meta-tag">
@@ -328,18 +344,21 @@
<xsl:with-param name="meta-data" select="$lang" />
<xsl:with-param name="meta-enc" select="'DCTERMS.RFC4646'" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<!-- a bit commercial (generator) -->
<xsl:element name="meta">
<xsl:attribute name="name">DCTERMS.source</xsl:attribute>
<xsl:attribute name="content">http://xml.openoffice.org/odf2xhtml</xsl:attribute>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
<!-- the author of the input source (author) -->
<xsl:call-template name="add-meta-tag">
<xsl:with-param name="meta-name" select="'DCTERMS.creator'" />
<xsl:with-param name="meta-data" select="$globalData/meta-file/*/office:meta/meta:initial-creator" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<!-- creation-date of the input source (issued) -->
<xsl:call-template name="add-meta-tag">
@@ -347,12 +366,14 @@
<xsl:with-param name="meta-data" select="$globalData/meta-file/*/office:meta/meta:creation-date" />
<xsl:with-param name="meta-enc" select="'DCTERMS.W3CDTF'" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<!-- name of last changing person of the input source (changedby) -->
<xsl:call-template name="add-meta-tag">
<xsl:with-param name="meta-name" select="'DCTERMS.contributor'" />
<xsl:with-param name="meta-data" select="$globalData/meta-file/*/office:meta/dc:creator" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<!-- last changing date of the input source (changed) -->
<xsl:call-template name="add-meta-tag">
@@ -360,6 +381,7 @@
<xsl:with-param name="meta-data" select="$globalData/meta-file/*/office:meta/dc:date" />
<xsl:with-param name="meta-enc" select="'DCTERMS.W3CDTF'" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<!-- Last print, as provenance -->
<xsl:if test="$prov">
@@ -368,14 +390,38 @@
<xsl:with-param name="meta-data" select="$prov" />
<xsl:with-param name="meta-lang" select="$lang" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
</xsl:if>
<!-- keywords about the input source (keywords) -->
- <xsl:call-template name="add-meta-tag">
- <xsl:with-param name="meta-name" select="'DCTERMS.subject'" />
- <xsl:with-param name="meta-data" select="normalize-space(concat($globalData/meta-file/*/office:meta/dc:subject,', ',$keywords))" />
- <xsl:with-param name="meta-lang" select="$lang" />
- </xsl:call-template>
+ <xsl:if test="($globalData/meta-file/*/office:meta/dc:subject != '') or ($keywords != '')">
+ <xsl:choose>
+ <xsl:when test="($globalData/meta-file/*/office:meta/dc:subject != '') and ($keywords != '')">
+ <xsl:call-template name="add-meta-tag">
+ <xsl:with-param name="meta-name" select="'DCTERMS.subject'" />
+ <xsl:with-param name="meta-data" select="normalize-space(concat($globalData/meta-file/*/office:meta/dc:subject,', ',$keywords))" />
+ <xsl:with-param name="meta-lang" select="$lang" />
+ </xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
+ </xsl:when>
+ <xsl:when test="($globalData/meta-file/*/office:meta/dc:subject != '')">
+ <xsl:call-template name="add-meta-tag">
+ <xsl:with-param name="meta-name" select="'DCTERMS.subject'" />
+ <xsl:with-param name="meta-data" select="normalize-space($globalData/meta-file/*/office:meta/dc:subject)" />
+ <xsl:with-param name="meta-lang" select="$lang" />
+ </xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="add-meta-tag">
+ <xsl:with-param name="meta-name" select="'DCTERMS.subject'" />
+ <xsl:with-param name="meta-data" select="normalize-space($keywords)" />
+ <xsl:with-param name="meta-lang" select="$lang" />
+ </xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
<!-- detailed description about the input source (description) -->
<xsl:call-template name="add-meta-tag">
@@ -383,6 +429,7 @@
<xsl:with-param name="meta-data" select="$globalData/meta-file/*/office:meta/dc:description" />
<xsl:with-param name="meta-lang" select="$lang" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<!-- user defined use of DCTERM tags -->
@@ -392,6 +439,7 @@
<xsl:with-param name="meta-data" select="." />
<!-- <xsl:with-param name="meta-lang" select="$lang" /> -->
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
</xsl:for-each>
<!-- user defined use of DC tags (legacy) -->
<xsl:for-each select="$globalData/meta-file/*/office:meta/meta:user-defined[starts-with(@meta:name,'DC.')][not(.='')]">
@@ -400,12 +448,22 @@
<xsl:with-param name="meta-data" select="." />
<!-- <xsl:with-param name="meta-lang" select="$lang" /> -->
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
</xsl:for-each>
+ <xsl:call-template name="add-meta-tag">
+ <xsl:with-param name="meta-name" select="'xsl:vendor'" />
+ <xsl:with-param name="meta-data" select="system-property('xsl:vendor')" />
+ </xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" hreflang="en" />
+ <xsl:text>&#xa;</xsl:text>
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" hreflang="en" />
+ <xsl:text>&#xa;</xsl:text>
<link rel="schema.DCTYPE" href="http://purl.org/dc/dcmitype/" hreflang="en" />
+ <xsl:text>&#xa;</xsl:text>
<link rel="schema.DCAM" href="http://purl.org/dc/dcam/" hreflang="en" />
+ <xsl:text>&#xa;</xsl:text>
<!-- W3C GRDDL Profile -->
<!--
<link rel="transformation" href="http://xml.openoffice.org/odf2xhtml/rdf-extract.xsl" />
@@ -430,7 +488,7 @@
<xsl:param name="meta-enc" />
<xsl:param name="meta-lang" />
- <xsl:if test="$meta-data">
+ <xsl:if test="$meta-data and $meta-data != ''">
<xsl:element name="meta">
<xsl:attribute name="name">
<xsl:value-of select="$meta-name" />
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
index e872d58dbdad..b320f9c22979 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
@@ -132,6 +132,7 @@
<xsl:if test="$debugEnabled">
<xsl:call-template name="debug-check-parameter" />
</xsl:if>
+ <xsl:message>XSL Vendor: '<xsl:value-of select="system-property('xsl:vendor')"/>'</xsl:message>
<!-- gathers style properties and
returns them as globalData parameter to the 'start-main' template -->
<xsl:call-template name="collect-global-odf-properties" />
@@ -144,16 +145,38 @@
<xsl:template name="start-main">
<xsl:param name="globalData" />
+ <!-- disable style collection debug
+ <xsl:call-template name="write-collected-styles">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:call-template> -->
+
+ <xsl:variable name="lang">
+ <xsl:choose>
+ <xsl:when test="$globalData/meta-file/*/office:meta/dc:language">
+ <xsl:value-of select="$globalData/meta-file/*/office:meta/dc:language" />
+ </xsl:when>
+ <xsl:otherwise>en-US</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:text>&#xa;</xsl:text>
<xsl:element name="html">
+
+ <xsl:attribute name="lang"><xsl:value-of select="$lang"/></xsl:attribute>
+ <xsl:text>&#xa;</xsl:text>
<xsl:comment>This file was converted to xhtml by LibreOffice - see https://cgit.freedesktop.org/libreoffice/core/tree/filter/source/xslt for the code.</xsl:comment>
+ <xsl:text>&#xa;</xsl:text>
<xsl:call-template name='create-header'>
<xsl:with-param name="globalData" select="$globalData" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<xsl:call-template name='create-body'>
<xsl:with-param name="globalData" select="$globalData" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
</xsl:template>
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/table.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/table.xsl
index 8448665d20b3..0788b2bf52a9 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/table.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/table.xsl
@@ -206,8 +206,10 @@
<!-- cell style header -->
<xsl:attribute name="class">
- <xsl:value-of select="translate($styleName, '.,;: %()[]/\+', '_____________')"/>
+ <xsl:call-template name="create-unique-style-id">
+ <xsl:with-param name="styleName" select="$styleName"/>
+ <xsl:with-param name="styleFamily" select="'table-cell'"/>
+ </xsl:call-template>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
-
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index 8a8f92c772c8..6912bb407c0b 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -25,12 +25,13 @@
#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <tools/urlobj.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include "typedetectionexport.hxx"
#include "xmlfiltercommon.hxx"
#include <comphelper/attributelist.hxx>
+#include <rtl/ref.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::io;
@@ -78,48 +79,46 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
{
try
{
- const OUString sComponentData ( "oor:component-data" );
- const OUString sNode ( "node" );
- const OUString sName ( "oor:name" );
- const OUString sWhiteSpace ( " " );
- const OUString sUIName ( "UIName" );
- const OUString sComma ( "," );
- const OUString sDelim ( ";" );
- const OUString sData ( "Data" );
- const OUString sDocTypePrefix ( "doctype:" );
- const OUString sFilterAdaptorService( "com.sun.star.comp.Writer.XmlFilterAdaptor" );
- const OUString sXSLTFilterService ( "com.sun.star.documentconversion.XSLTFilter" );
- const OUString sCdataAttribute ( "CDATA" );
+ static constexpr OUString sComponentData ( u"oor:component-data"_ustr );
+ static constexpr OUString sNode ( u"node"_ustr );
+ static constexpr OUString sName ( u"oor:name"_ustr );
+ static constexpr OUString sWhiteSpace ( u" "_ustr );
+ static constexpr OUString sUIName ( u"UIName"_ustr );
+ static constexpr OUString sComma ( u","_ustr );
+ static constexpr OUString sDelim ( u";"_ustr );
+ static constexpr OUString sData ( u"Data"_ustr );
+ static constexpr OUStringLiteral sDocTypePrefix ( u"doctype:" );
+ static constexpr OUStringLiteral sFilterAdaptorService( u"com.sun.star.comp.Writer.XmlFilterAdaptor" );
+ static constexpr OUStringLiteral sXSLTFilterService ( u"com.sun.star.documentconversion.XSLTFilter" );
// set up sax writer and connect to given output stream
Reference< XWriter > xHandler = Writer::create( mxContext );
xHandler->setOutputStream( xOS );
- ::comphelper::AttributeList * pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( "xmlns:oor", sCdataAttribute, "http://openoffice.org/2001/registry" );
- pAttrList->AddAttribute ( "xmlns:xs", sCdataAttribute, "http://www.w3.org/2001/XMLSchema" );
- pAttrList->AddAttribute ( sName, sCdataAttribute, "TypeDetection" );
- pAttrList->AddAttribute ( "oor:package", sCdataAttribute, "org.openoffice.Office" );
- Reference < XAttributeList > xAttrList (pAttrList);
+ rtl::Reference<::comphelper::AttributeList> pAttrList = new ::comphelper::AttributeList;
+ pAttrList->AddAttribute ( "xmlns:oor", "http://openoffice.org/2001/registry" );
+ pAttrList->AddAttribute ( "xmlns:xs", "http://www.w3.org/2001/XMLSchema" );
+ pAttrList->AddAttribute ( sName, "TypeDetection" );
+ pAttrList->AddAttribute ( "oor:package", "org.openoffice.Office" );
xHandler->startDocument();
xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sComponentData, xAttrList );
+ xHandler->startElement( sComponentData, pAttrList );
// export types
{
- xAttrList = pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( sName, sCdataAttribute, "Types" );
+ pAttrList = new ::comphelper::AttributeList;
+ pAttrList->AddAttribute ( sName, "Types" );
xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sNode, xAttrList );
+ xHandler->startElement( sNode, pAttrList );
for (auto const& filter : rFilters)
{
- xAttrList = pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute( sName, sCdataAttribute, filter->maType );
+ pAttrList = new ::comphelper::AttributeList;
+ pAttrList->AddAttribute( sName, filter->maType );
xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sNode, xAttrList );
+ xHandler->startElement( sNode, pAttrList );
OUString sValue = "0" + sComma + sComma;
if( !filter->maDocType.isEmpty() )
{
@@ -140,20 +139,22 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
// export filters
{
- xAttrList = pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( sName, sCdataAttribute, "Filters" );
+ pAttrList = new ::comphelper::AttributeList;
+ pAttrList->AddAttribute ( sName, "Filters" );
xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sNode, xAttrList );
+ xHandler->startElement( sNode, pAttrList );
for (auto const& filter : rFilters)
{
- xAttrList = pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute( sName, sCdataAttribute, filter->maFilterName );
+ pAttrList = new ::comphelper::AttributeList;
+ pAttrList->AddAttribute( sName, filter->maFilterName );
xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sNode, xAttrList );
+ xHandler->startElement( sNode, pAttrList );
addLocaleProperty( xHandler, sUIName, filter->maInterfaceName );
- OUStringBuffer sValue("0" +
+ const application_info_impl* pAppInfo = getApplicationInfo( filter->maExportService );
+ OUString sValue =
+ "0" +
sComma +
filter->maType +
sComma +
@@ -166,26 +167,23 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
sXSLTFilterService +
sDelim +
OUString::boolean( filter->mbNeedsXSLT2 ) +
- sDelim);
-
- const application_info_impl* pAppInfo = getApplicationInfo( filter->maExportService );
- sValue.append(pAppInfo->maXMLImporter +
+ sDelim +
+ pAppInfo->maXMLImporter +
sDelim +
pAppInfo->maXMLExporter +
- sDelim);
-
- sValue.append(createRelativeURL( filter->maFilterName, filter->maImportXSLT ));
- sValue.append(sDelim);
- sValue.append(createRelativeURL( filter->maFilterName, filter->maExportXSLT ));
- sValue.append(sDelim);
- // entry DTD obsolete and removed, but delimiter kept
- sValue.append(sDelim);
- sValue.append(filter->maComment);
- sValue.append(sComma);
- sValue.append("0");
- sValue.append(sComma);
- sValue.append(createRelativeURL( filter->maFilterName, filter->maImportTemplate ));
- addProperty( xHandler, sData, sValue.makeStringAndClear() );
+ sDelim +
+ createRelativeURL( filter->maFilterName, filter->maImportXSLT ) +
+ sDelim +
+ createRelativeURL( filter->maFilterName, filter->maExportXSLT ) +
+ sDelim +
+ // entry DTD obsolete and removed, but delimiter kept
+ sDelim +
+ filter->maComment +
+ sComma +
+ "0" +
+ sComma +
+ createRelativeURL( filter->maFilterName, filter->maImportTemplate );
+ addProperty( xHandler, sData, sValue );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->endElement( sNode );
}
@@ -208,21 +206,18 @@ void TypeDetectionExporter::addProperty( const Reference< XWriter >& xHandler, c
{
try
{
- const OUString sCdataAttribute( "CDATA" );
- const OUString sProp( "prop" );
- const OUString sValue( "value" );
- const OUString sWhiteSpace ( " " );
+ static constexpr OUString sProp( u"prop"_ustr );
+ static constexpr OUString sValue( u"value"_ustr );
+ static constexpr OUString sWhiteSpace ( u" "_ustr );
- ::comphelper::AttributeList * pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( "oor:name", sCdataAttribute, rName );
- pAttrList->AddAttribute ( "oor:type", sCdataAttribute, "xs:string" );
- Reference < XAttributeList > xAttrList (pAttrList);
+ rtl::Reference<::comphelper::AttributeList>pAttrList = new ::comphelper::AttributeList;
+ pAttrList->AddAttribute ( "oor:name", rName );
+ pAttrList->AddAttribute ( "oor:type", "xs:string" );
xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sProp, xAttrList );
- xAttrList = nullptr;
+ xHandler->startElement( sProp, pAttrList );
xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sValue,xAttrList );
+ xHandler->startElement( sValue, pAttrList );
xHandler->characters( rValue );
xHandler->endElement( sValue );
xHandler->ignorableWhitespace ( sWhiteSpace );
@@ -238,22 +233,20 @@ void TypeDetectionExporter::addLocaleProperty( const Reference< XWriter >& xHand
{
try
{
- const OUString sCdataAttribute( "CDATA" );
- const OUString sProp( "prop" );
- const OUString sValue( "value" );
- const OUString sWhiteSpace ( " " );
+ static constexpr OUString sProp( u"prop"_ustr );
+ static constexpr OUString sValue( u"value"_ustr );
+ static constexpr OUString sWhiteSpace ( u" "_ustr );
- ::comphelper::AttributeList * pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( "oor:name", sCdataAttribute, rName );
- pAttrList->AddAttribute ( "oor:type", sCdataAttribute, "xs:string" );
- Reference < XAttributeList > xAttrList (pAttrList);
+ rtl::Reference<::comphelper::AttributeList> pAttrList = new ::comphelper::AttributeList;
+ pAttrList->AddAttribute ( "oor:name", rName );
+ pAttrList->AddAttribute ( "oor:type", "xs:string" );
xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sProp, xAttrList );
- xAttrList = pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( "xml:lang", sCdataAttribute, "en-US" );
+ xHandler->startElement( sProp, pAttrList );
+ pAttrList = new ::comphelper::AttributeList;
+ pAttrList->AddAttribute ( "xml:lang", "en-US" );
xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sValue, xAttrList );
+ xHandler->startElement( sValue, pAttrList );
xHandler->characters( rValue );
xHandler->endElement( sValue );
xHandler->ignorableWhitespace ( sWhiteSpace );
diff --git a/filter/source/xsltdialog/typedetectionexport.hxx b/filter/source/xsltdialog/typedetectionexport.hxx
index b38b3306dca6..a253540bb673 100644
--- a/filter/source/xsltdialog/typedetectionexport.hxx
+++ b/filter/source/xsltdialog/typedetectionexport.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_TYPEDETECTIONEXPORT_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTDIALOG_TYPEDETECTIONEXPORT_HXX
+#pragma once
#include <com/sun/star/xml/sax/XWriter.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
@@ -39,6 +38,4 @@ private:
css::uno::Reference< css::uno::XComponentContext > mxContext;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx
index 4d785ec152a7..d891a4908c62 100644
--- a/filter/source/xsltdialog/typedetectionimport.cxx
+++ b/filter/source/xsltdialog/typedetectionimport.cxx
@@ -20,7 +20,9 @@
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <rtl/ref.hxx>
+#include <o3tl/string_view.hxx>
#include "typedetectionimport.hxx"
#include "xmlfiltercommon.hxx"
@@ -31,7 +33,6 @@ using namespace com::sun::star::io;
using namespace com::sun::star::beans;
using namespace com::sun::star::xml::sax;
using namespace com::sun::star;
-using namespace std;
TypeDetectionImporter::TypeDetectionImporter()
{
@@ -48,9 +49,8 @@ void TypeDetectionImporter::doImport( const Reference< XComponentContext >& rxCo
{
Reference< XParser > xParser = xml::sax::Parser::create( rxContext );
- TypeDetectionImporter* pImporter = new TypeDetectionImporter;
- Reference < XDocumentHandler > xDocHandler( pImporter );
- xParser->setDocumentHandler( xDocHandler );
+ rtl::Reference<TypeDetectionImporter> pImporter = new TypeDetectionImporter;
+ xParser->setDocumentHandler( pImporter );
InputSource source;
source.aInputStream = xIS;
@@ -81,18 +81,18 @@ void TypeDetectionImporter::fillFilterVector( std::vector< std::unique_ptr<filt
maTypeNodes.clear();
}
-static OUString getSubdata( int index, sal_Unicode delimiter, const OUString& rData )
+static std::u16string_view getSubdata( int index, sal_Unicode delimiter, std::u16string_view rData )
{
sal_Int32 nLastIndex = 0;
- sal_Int32 nNextIndex = rData.indexOf( delimiter );
+ size_t nNextIndex = rData.find( delimiter );
- OUString aSubdata;
+ std::u16string_view aSubdata;
while( index )
{
- nLastIndex = nNextIndex + 1;
- nNextIndex = rData.indexOf( delimiter, nLastIndex );
+ nLastIndex = nNextIndex == std::u16string_view::npos ? 0 : nNextIndex + 1;
+ nNextIndex = rData.find( delimiter, nLastIndex );
index--;
@@ -100,13 +100,13 @@ static OUString getSubdata( int index, sal_Unicode delimiter, const OUString& rD
return aSubdata;
}
- if( nNextIndex == -1 )
+ if( nNextIndex == std::u16string_view::npos )
{
- aSubdata = rData.copy( nLastIndex );
+ aSubdata = rData.substr( nLastIndex );
}
else
{
- aSubdata = rData.copy( nLastIndex, nNextIndex - nLastIndex );
+ aSubdata = rData.substr( nLastIndex, nNextIndex - nLastIndex );
}
return aSubdata;
@@ -136,16 +136,16 @@ std::unique_ptr<filter_info_impl> TypeDetectionImporter::createFilterForNode( No
pFilter->maType = getSubdata( 1, aComma, aData );
pFilter->maDocumentService = getSubdata( 2, aComma, aData );
- OUString aFilterService( getSubdata( 3, aComma, aData ) );
- pFilter->maFlags = getSubdata( 4, aComma, aData ).toInt32();
+ std::u16string_view aFilterService( getSubdata( 3, aComma, aData ) );
+ pFilter->maFlags = o3tl::toInt32(getSubdata( 4, aComma, aData ));
// parse filter user data
sal_Unicode aDelim(';');
- OUString aFilterUserData( getSubdata( 5, aComma, aData ) );
+ std::u16string_view aFilterUserData( getSubdata( 5, aComma, aData ) );
- OUString aAdapterService( getSubdata( 0, aDelim, aFilterUserData ) );
+ std::u16string_view aAdapterService( getSubdata( 0, aDelim, aFilterUserData ) );
//Import/ExportService
- pFilter->mbNeedsXSLT2 = getSubdata( 1, aDelim, aFilterUserData ).toBoolean();
+ pFilter->mbNeedsXSLT2 = OUString(getSubdata( 1, aDelim, aFilterUserData )).toBoolean();
pFilter->maImportService = getSubdata( 2, aDelim, aFilterUserData );
pFilter->maExportService = getSubdata( 3, aDelim, aFilterUserData );
pFilter->maImportXSLT = getSubdata( 4, aDelim, aFilterUserData );
@@ -162,7 +162,7 @@ std::unique_ptr<filter_info_impl> TypeDetectionImporter::createFilterForNode( No
pFilter->maDocType = getSubdata( 2, aComma, aTypeUserData );
pFilter->maExtension = getSubdata( 4, aComma, aTypeUserData );
- pFilter->mnDocumentIconID = getSubdata( 5, aComma, aTypeUserData ).toInt32();
+ pFilter->mnDocumentIconID = o3tl::toInt32(getSubdata( 5, aComma, aTypeUserData ));
}
bool bOk = true;
@@ -182,10 +182,10 @@ std::unique_ptr<filter_info_impl> TypeDetectionImporter::createFilterForNode( No
if( pFilter->maFlags == 0 )
bOk = false;
- if( aFilterService != "com.sun.star.comp.Writer.XmlFilterAdaptor" )
+ if( aFilterService != u"com.sun.star.comp.Writer.XmlFilterAdaptor" )
bOk = false;
- if( aAdapterService != "com.sun.star.documentconversion.XSLTFilter" )
+ if( aAdapterService != u"com.sun.star.documentconversion.XSLTFilter" )
bOk = false;
if( pFilter->maExtension.isEmpty() )
diff --git a/filter/source/xsltdialog/typedetectionimport.hxx b/filter/source/xsltdialog/typedetectionimport.hxx
index 1771eef77e5e..3b69ef9afb22 100644
--- a/filter/source/xsltdialog/typedetectionimport.hxx
+++ b/filter/source/xsltdialog/typedetectionimport.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_TYPEDETECTIONIMPORT_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTDIALOG_TYPEDETECTIONIMPORT_HXX
+#pragma once
#include <com/sun/star/io/XInputStream.hpp>
#include <cppuhelper/implbase.hxx>
@@ -89,6 +88,5 @@ private:
OUString maNodeName;
OUString maPropertyName;
};
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/xmlfiltercommon.hxx b/filter/source/xsltdialog/xmlfiltercommon.hxx
index 53f9592b76b0..9482fb0b2b63 100644
--- a/filter/source/xsltdialog/xmlfiltercommon.hxx
+++ b/filter/source/xsltdialog/xmlfiltercommon.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERCOMMON_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERCOMMON_HXX
+#pragma once
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
@@ -30,7 +29,7 @@ extern OUString string_encode( const OUString & rText );
extern OUString string_decode( const OUString & rText );
bool copyStreams( const css::uno::Reference< css::io::XInputStream >& xIS, const css::uno::Reference< css::io::XOutputStream >& xOS );
-bool createDirectory( OUString const & rURL );
+bool createDirectory( std::u16string_view rURL );
class filter_info_impl
@@ -78,8 +77,5 @@ struct application_info_impl
extern std::vector< application_info_impl > const & getApplicationInfos();
extern OUString getApplicationUIName( std::u16string_view rServiceName );
extern const application_info_impl* getApplicationInfo( std::u16string_view rServiceName );
-OUString XsltResId(const char* pId);
-
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index 649c9785ba96..64b02feb2d78 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -17,11 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <osl/mutex.hxx>
-
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/factory.hxx>
-#include <cppuhelper/typeprovider.hxx>
-#include <cppuhelper/component.hxx>
+#include <comphelper/compbase.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
#include <cppuhelper/supportsservice.hxx>
@@ -31,47 +29,30 @@
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <vcl/svapp.hxx>
-#include <rtl/instance.hxx>
#include "xmlfiltersettingsdialog.hxx"
using namespace ::cppu;
-using namespace ::osl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::frame;
namespace {
-class XMLFilterDialogComponentBase
-{
-protected:
- ::osl::Mutex maMutex;
-};
-
-class XMLFilterDialogComponent : public XMLFilterDialogComponentBase,
- public OComponentHelper,
- public css::ui::dialogs::XExecutableDialog,
- public XServiceInfo,
- public XInitialization,
- public XTerminateListener
+class XMLFilterDialogComponent : public comphelper::WeakComponentImplHelper<
+ css::ui::dialogs::XExecutableDialog,
+ XServiceInfo,
+ XInitialization,
+ XTerminateListener>
{
public:
explicit XMLFilterDialogComponent( const Reference< XComponentContext >& rxContext );
- // XInterface
- virtual Any SAL_CALL queryInterface( const Type& aType ) override;
- virtual Any SAL_CALL queryAggregation( Type const & rType ) override;
- virtual void SAL_CALL acquire() throw () override;
- virtual void SAL_CALL release() throw () override;
-
protected:
// XTypeProvider
virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
- virtual Sequence< Type > SAL_CALL getTypes() override;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
@@ -92,7 +73,7 @@ protected:
/** Called in dispose method after the listeners were notified.
*/
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
private:
css::uno::Reference<css::awt::XWindow> mxParent; /// parent window
@@ -104,102 +85,25 @@ private:
}
XMLFilterDialogComponent::XMLFilterDialogComponent(const css::uno::Reference< XComponentContext >& rxContext)
- : OComponentHelper(maMutex)
- , mxContext(rxContext)
+ : mxContext(rxContext)
{
Reference< XDesktop2 > xDesktop = Desktop::create( rxContext );
Reference< XTerminateListener > xListener( this );
xDesktop->addTerminateListener( xListener );
}
-// XInterface
-Any SAL_CALL XMLFilterDialogComponent::queryInterface( const Type& aType )
-{
- return OComponentHelper::queryInterface( aType );
-}
-
-
-Any SAL_CALL XMLFilterDialogComponent::queryAggregation( Type const & rType )
-{
- if (rType == cppu::UnoType<css::ui::dialogs::XExecutableDialog>::get())
- {
- void * p = static_cast< css::ui::dialogs::XExecutableDialog * >( this );
- return Any( &p, rType );
- }
- else if (rType == cppu::UnoType<XServiceInfo>::get())
- {
- void * p = static_cast< XServiceInfo * >( this );
- return Any( &p, rType );
- }
- else if (rType == cppu::UnoType<XInitialization>::get())
- {
- void * p = static_cast< XInitialization * >( this );
- return Any( &p, rType );
- }
- else if (rType == cppu::UnoType<XTerminateListener>::get())
- {
- void * p = static_cast< XTerminateListener * >( this );
- return Any( &p, rType );
- }
- return OComponentHelper::queryAggregation( rType );
-}
-
-
-void SAL_CALL XMLFilterDialogComponent::acquire() throw ()
-{
- OComponentHelper::acquire();
-}
-
-
-void SAL_CALL XMLFilterDialogComponent::release() throw ()
-{
- OComponentHelper::release();
-}
-
-
OUString SAL_CALL XMLFilterDialogComponent::getImplementationName()
{
return "com.sun.star.comp.ui.XSLTFilterDialog";
}
-namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
-
Sequence< sal_Int8 > SAL_CALL XMLFilterDialogComponent::getImplementationId()
{
- return css::uno::Sequence<sal_Int8>();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
-namespace
-{
- class DialogComponentTypes
- {
- private:
- OTypeCollection m_aTypes;
- public:
- DialogComponentTypes() :
- m_aTypes(
- cppu::UnoType<XComponent>::get(),
- cppu::UnoType<XTypeProvider>::get(),
- cppu::UnoType<XAggregation>::get(),
- cppu::UnoType<XWeak>::get(),
- cppu::UnoType<XServiceInfo>::get(),
- cppu::UnoType<XInitialization>::get(),
- cppu::UnoType<XTerminateListener>::get(),
- cppu::UnoType<css::ui::dialogs::XExecutableDialog>::get())
- {
- }
- OTypeCollection& getTypeCollection() { return m_aTypes; }
- };
-
- struct theDialogComponentTypes : rtl::Static<DialogComponentTypes, theDialogComponentTypes> {};
-}
-
-Sequence< Type > XMLFilterDialogComponent::getTypes()
-{
- return theDialogComponentTypes::get().getTypeCollection().getTypes();
-}
-
Sequence< OUString > SAL_CALL XMLFilterDialogComponent::getSupportedServiceNames()
{
return { "com.sun.star.ui.dialogs.XSLTFilterDialog" };
@@ -212,12 +116,16 @@ sal_Bool SAL_CALL XMLFilterDialogComponent::supportsService(const OUString& Serv
/** Called in dispose method after the listeners were notified.
*/
-void SAL_CALL XMLFilterDialogComponent::disposing()
+void XMLFilterDialogComponent::disposing(std::unique_lock<std::mutex>& rGuard)
{
- ::SolarMutexGuard aGuard;
+ rGuard.unlock();
+ {
+ ::SolarMutexGuard aGuard;
- if (mxDialog)
- mxDialog->response(RET_CLOSE);
+ if (mxDialog)
+ mxDialog->response(RET_CLOSE);
+ }
+ rGuard.lock();
}
@@ -298,7 +206,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
filter_XSLTFilterDialog_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new XMLFilterDialogComponent(context)));
+ return cppu::acquire(new XMLFilterDialogComponent(context));
}
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index 3ddaed0df05c..01ec7af8ccd8 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -37,7 +37,7 @@
#include <unotools/streamwrap.hxx>
#include <unotools/tempfile.hxx>
#include <svl/urihelper.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
@@ -60,7 +60,7 @@ using namespace com::sun::star::io;
using ::rtl::Uri;
-constexpr OUStringLiteral sVndSunStarPackage(u"vnd.sun.star.Package:");
+constexpr OUString sVndSunStarPackage(u"vnd.sun.star.Package:"_ustr);
XMLFilterJarHelper::XMLFilterJarHelper( const Reference< XComponentContext >& rxContext )
: mxContext( rxContext ),
@@ -85,8 +85,7 @@ static Reference< XInterface > addFolder( Reference< XInterface > const & xRootF
if ( rName == ".." || rName == "." )
throw lang::IllegalArgumentException();
- Sequence< Any > aArgs(1);
- aArgs[0] <<= true;
+ Sequence< Any > aArgs{ Any(true) };
Reference< XInterface > xFolder( xFactory->createInstanceWithArguments(aArgs) );
Reference< XNamed > xNamed( xFolder, UNO_QUERY );
@@ -110,7 +109,7 @@ static void addFile_( Reference< XInterface > const & xRootFolder, Reference< XS
if( xSink.is() && xTunnel.is())
{
Reference< XNameContainer > xNameContainer(xRootFolder, UNO_QUERY );
- xNameContainer->insertByName(encodeZipUri( aName ), makeAny(xTunnel));
+ xNameContainer->insertByName(encodeZipUri( aName ), Any(xTunnel));
xSink->setInputStream( xInput );
}
}
@@ -147,14 +146,10 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const std::ve
// create the package jar file
- Sequence< Any > aArguments( 2 );
- aArguments[ 0 ] <<= rPackageURL;
-
- // let ZipPackage be used ( no manifest.xml is required )
- beans::NamedValue aArg;
- aArg.Name = "StorageFormat";
- aArg.Value <<= OUString(ZIP_STORAGE_FORMAT_STRING);
- aArguments[ 1 ] <<= aArg;
+ Sequence< Any > aArguments{ Any(rPackageURL),
+ // let ZipPackage be used ( no manifest.xml is required )
+ Any(beans::NamedValue(
+ "StorageFormat", Any(ZIP_STORAGE_FORMAT_STRING))) };
Reference< XHierarchicalNameAccess > xIfc(
mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
@@ -196,20 +191,18 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const std::ve
}
// create TypeDetection.xcu
- utl::TempFile aTempFile;
- aTempFile.EnableKillingFile();
- OUString aTempFileURL( aTempFile.GetURL() );
+ utl::TempFileFast aTempFile;
+ SvStream* pStream = aTempFile.GetStream(StreamMode::READWRITE);
{
- osl::File aOutputFile( aTempFileURL );
- (void)aOutputFile.open(osl_File_OpenFlag_Write);
- Reference< XOutputStream > xOS( new OSLOutputStreamWrapper( aOutputFile ) );
+ Reference< XOutputStream > xOS( new ::utl::OOutputStreamWrapper( *pStream ) );
TypeDetectionExporter aExporter( mxContext );
aExporter.doExport(xOS,rFilters);
}
- Reference< XInputStream > XIS( new utl::OSeekableInputStreamWrapper( new SvFileStream(aTempFileURL, StreamMode::READ ), true ) );
+ pStream->Seek(0);
+ Reference< XInputStream > XIS( new utl::OSeekableInputStreamWrapper( *pStream ) );
addFile_( xRootFolder, xFactory, XIS, "TypeDetection.xcu" );
Reference< XChangesBatch > xBatch( xIfc, UNO_QUERY );
@@ -237,14 +230,11 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL,
{
// create the package jar file
- Sequence< Any > aArguments( 2 );
- aArguments[ 0 ] <<= rPackageURL;
-
// let ZipPackage be used ( no manifest.xml is required )
beans::NamedValue aArg;
aArg.Name = "StorageFormat";
- aArg.Value <<= OUString(ZIP_STORAGE_FORMAT_STRING);
- aArguments[ 1 ] <<= aArg;
+ aArg.Value <<= ZIP_STORAGE_FORMAT_STRING;
+ Sequence< Any > aArguments{ Any(rPackageURL), Any(aArg) };
Reference< XHierarchicalNameAccess > xIfc(
mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
@@ -307,7 +297,7 @@ bool XMLFilterJarHelper::copyFiles( const Reference< XHierarchicalNameAccess >&
return bOk;
}
-bool XMLFilterJarHelper::copyFile( const Reference< XHierarchicalNameAccess >& xIfc, OUString& rURL, const OUString& rTargetURL )
+bool XMLFilterJarHelper::copyFile( const Reference< XHierarchicalNameAccess >& xIfc, OUString& rURL, std::u16string_view rTargetURL )
{
if( !rURL.matchIgnoreAsciiCase( sVndSunStarPackage ) )
return true;
@@ -316,8 +306,8 @@ bool XMLFilterJarHelper::copyFile( const Reference< XHierarchicalNameAccess >& x
{
OUString szPackagePath( encodeZipUri( rURL.copy( sVndSunStarPackage.getLength() ) ) );
- if ( ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, ".." )
- || ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, "." ) )
+ if ( ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, u".." )
+ || ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, u"." ) )
throw lang::IllegalArgumentException();
if( xIfc->hasByHierarchicalName( szPackagePath ) )
diff --git a/filter/source/xsltdialog/xmlfilterjar.hxx b/filter/source/xsltdialog/xmlfilterjar.hxx
index 7e469fb202fb..d634bb6c4d24 100644
--- a/filter/source/xsltdialog/xmlfilterjar.hxx
+++ b/filter/source/xsltdialog/xmlfilterjar.hxx
@@ -16,13 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERJAR_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERJAR_HXX
+#pragma once
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <memory>
#include <vector>
class filter_info_impl;
@@ -39,7 +39,7 @@ private:
/// @throws css::uno::Exception
void addFile( css::uno::Reference< css::uno::XInterface > const & xRootFolder, css::uno::Reference< css::lang::XSingleServiceFactory > const & xFactory, const OUString& rSourceFile );
- static bool copyFile( const css::uno::Reference< css::container::XHierarchicalNameAccess >& xIfc, OUString& rURL, const OUString& rTargetURL );
+ static bool copyFile( const css::uno::Reference< css::container::XHierarchicalNameAccess >& xIfc, OUString& rURL, std::u16string_view rTargetURL );
bool copyFiles( const css::uno::Reference< css::container::XHierarchicalNameAccess >& xIfc, filter_info_impl* pFilter );
css::uno::Reference< css::uno::XComponentContext > mxContext;
@@ -49,6 +49,4 @@ private:
OUString sProgPath;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 3124ee5b9855..ce06b716e20b 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -24,10 +24,12 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <tools/diagnose_ex.h>
+
+#include <comphelper/propertyvalue.hxx>
+#include <o3tl/string_view.hxx>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/urlobj.hxx>
#include <unotools/pathoptions.hxx>
-#include <unotools/resmgr.hxx>
#include <unotools/streamwrap.hxx>
#include <osl/file.hxx>
#include <o3tl/enumrange.hxx>
@@ -58,11 +60,6 @@ using namespace com::sun::star::util;
using ::rtl::Uri;
-OUString XsltResId(const char* pId)
-{
- return Translate::get(pId, Translate::Create("flt"));
-}
-
XMLFilterSettingsDialog::XMLFilterSettingsDialog(weld::Window* pParent,
const css::uno::Reference<css::uno::XComponentContext>& rxContext)
: GenericDialogController(pParent, "filter/ui/xmlfiltersettings.ui", "XMLFilterSettingsDialog")
@@ -85,7 +82,7 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog(weld::Window* pParent,
m_xFilterListBox->connect_changed( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) );
m_xFilterListBox->connect_row_activated( LINK( this, XMLFilterSettingsDialog, DoubleClickHdl_Impl ) );
- m_xFilterListBox->set_accessible_name(XsltResId(STR_XML_FILTER_LISTBOX));
+ m_xFilterListBox->set_accessible_name(FilterResId(STR_XML_FILTER_LISTBOX));
m_xPBNew->connect_clicked(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
m_xPBEdit->connect_clicked(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
@@ -181,7 +178,7 @@ void XMLFilterSettingsDialog::updateStates()
bool bIsDefault = false;
if (bHasSelection)
{
- filter_info_impl* pInfo = reinterpret_cast<filter_info_impl*>(m_xFilterListBox->get_id(aRows[0]).toInt64());
+ filter_info_impl* pInfo = weld::fromId<filter_info_impl*>(m_xFilterListBox->get_id(aRows[0]));
bIsReadonly = pInfo->mbReadonly;
for( auto nFact : o3tl::enumrange<SvtModuleOptions::EFactory>())
@@ -206,13 +203,13 @@ void XMLFilterSettingsDialog::onNew()
filter_info_impl aTempInfo;
// create a unique filter name
- aTempInfo.maFilterName = createUniqueFilterName(XsltResId(STR_DEFAULT_FILTER_NAME));
+ aTempInfo.maFilterName = createUniqueFilterName(FilterResId(STR_DEFAULT_FILTER_NAME));
// init default extension
aTempInfo.maExtension = STR_DEFAULT_EXTENSION;
// set default ui name
- aTempInfo.maInterfaceName = createUniqueInterfaceName(XsltResId(STR_DEFAULT_UI_NAME));
+ aTempInfo.maInterfaceName = createUniqueInterfaceName(FilterResId(STR_DEFAULT_UI_NAME));
// set default application
aTempInfo.maDocumentService = "com.sun.star.text.TextDocument";
@@ -230,7 +227,7 @@ void XMLFilterSettingsDialog::onNew()
void XMLFilterSettingsDialog::onEdit()
{
// get selected filter info
- filter_info_impl* pOldInfo = reinterpret_cast<filter_info_impl*>(m_xFilterListBox->get_selected_id().toInt64());
+ filter_info_impl* pOldInfo = weld::fromId<filter_info_impl*>(m_xFilterListBox->get_selected_id());
if (!pOldInfo)
return;
@@ -272,6 +269,7 @@ static Sequence< OUString > createExtensionsSequence( const OUString& rExtension
}
Sequence< OUString > aExtensions( nExtensions );
+ auto aExtensionsRange = asNonConstRange(aExtensions);
// extract the extensions from the source string and fill the sequence
@@ -285,12 +283,12 @@ static Sequence< OUString > createExtensionsSequence( const OUString& rExtension
if( nLastIndex == -1 )
{
- aExtensions[i] = rExtensions.copy( nCurrentIndex );
+ aExtensionsRange[i] = rExtensions.copy( nCurrentIndex );
break;
}
else
{
- aExtensions[i] = rExtensions.copy( nCurrentIndex, nLastIndex - nCurrentIndex );
+ aExtensionsRange[i] = rExtensions.copy( nCurrentIndex, nLastIndex - nCurrentIndex );
nCurrentIndex = nLastIndex + 1;
nLastIndex = nCurrentIndex;
}
@@ -365,7 +363,7 @@ OUString XMLFilterSettingsDialog::createUniqueInterfaceName( const OUString& rIn
{
// if yes, make sure we generate a unique name with a higher number
// this is dump but fast
- sal_Int32 nNumber = aInterfaceName.copy( rInterfaceName.getLength() ).toInt32();
+ sal_Int32 nNumber = o3tl::toInt32(aInterfaceName.subView( rInterfaceName.getLength() ));
if( nNumber >= nDefaultNumber )
nDefaultNumber = nNumber + 1;
}
@@ -496,36 +494,21 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
Sequence< OUString > aUserData( pFilterEntry->getFilterUserData());
// 3. create property values for filter entry
- Sequence< PropertyValue > aFilterData( 8 );
-
- aFilterData[0].Name = "Type";
- aFilterData[0].Value <<= pFilterEntry->maType;
-
- aFilterData[1].Name = "UIName";
- aFilterData[1].Value <<= pFilterEntry->maInterfaceName;
-
- aFilterData[2].Name = "DocumentService";
- aFilterData[2].Value <<= pFilterEntry->maDocumentService;
-
- aFilterData[3].Name = "FilterService";
- aFilterData[3].Value <<= OUString( "com.sun.star.comp.Writer.XmlFilterAdaptor" );
-
- aFilterData[4].Name = "Flags";
- aFilterData[4].Value <<= pFilterEntry->maFlags;
-
- aFilterData[5].Name = "UserData";
- aFilterData[5].Value <<= aUserData;
-
- aFilterData[6].Name = "FileFormatVersion";
- aFilterData[6].Value <<= pFilterEntry->maFileFormatVersion;
-
- aFilterData[7].Name = "TemplateName";
- aFilterData[7].Value <<= pFilterEntry->maImportTemplate;
+ Sequence< PropertyValue > aFilterData{
+ comphelper::makePropertyValue("Type", pFilterEntry->maType),
+ comphelper::makePropertyValue("UIName", pFilterEntry->maInterfaceName),
+ comphelper::makePropertyValue("DocumentService", pFilterEntry->maDocumentService),
+ comphelper::makePropertyValue("FilterService", OUString( "com.sun.star.comp.Writer.XmlFilterAdaptor" )),
+ comphelper::makePropertyValue("Flags", pFilterEntry->maFlags),
+ comphelper::makePropertyValue("UserData", aUserData),
+ comphelper::makePropertyValue("FileFormatVersion", pFilterEntry->maFileFormatVersion),
+ comphelper::makePropertyValue("TemplateName", pFilterEntry->maImportTemplate)
+ };
// 4. insert new or replace existing filter
try
{
- Any aAny( makeAny( aFilterData ) );
+ Any aAny( aFilterData );
if( mxFilterContainer->hasByName( pFilterEntry->maFilterName ) )
{
mxFilterContainer->replaceByName( pFilterEntry->maFilterName, aAny );
@@ -545,11 +528,6 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
// 5. prepare type information
if( bOk )
{
- Sequence< PropertyValue > aValues(4);
-
- aValues[0].Name = "UIName";
- aValues[0].Value <<= pFilterEntry->maInterfaceName;
- aValues[1].Name = "ClipboardFormat";
OUString aDocType;
if( !pFilterEntry->maDocType.match( m_sDocTypePrefix ) )
{
@@ -560,22 +538,22 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
aDocType = pFilterEntry->maDocType;
}
if (aDocType == m_sDocTypePrefix)
- aValues[1].Value <<= OUString();
- else
- aValues[1].Value <<= aDocType;
+ aDocType.clear();
- aValues[2].Name = "DocumentIconID";
- aValues[2].Value <<= pFilterEntry->mnDocumentIconID;
-
- aValues[3].Name = "Extensions";
- aValues[3].Value <<= createExtensionsSequence( pFilterEntry->maExtension );
+ Sequence< PropertyValue > aValues{
+ comphelper::makePropertyValue("UIName", pFilterEntry->maInterfaceName),
+ comphelper::makePropertyValue("ClipboardFormat", aDocType),
+ comphelper::makePropertyValue("DocumentIconID", pFilterEntry->mnDocumentIconID),
+ comphelper::makePropertyValue("Extensions", createExtensionsSequence( pFilterEntry->maExtension ))
+ };
// the detect service will only be registered, if a doctype/search token was specified
if (aDocType.getLength() > m_sDocTypePrefix.getLength())
{
aValues.realloc(5);
- aValues[4].Name = "DetectService";
- aValues[4].Value <<= OUString( "com.sun.star.comp.filters.XMLFilterDetect" );
+ auto pValues = aValues.getArray();
+ pValues[4].Name = "DetectService";
+ pValues[4].Value <<= OUString( "com.sun.star.comp.filters.XMLFilterDetect" );
}
// 6. insert new or replace existing type information
@@ -583,7 +561,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
{
try
{
- Any aAny( makeAny( aValues ) );
+ Any aAny( aValues );
if( mxTypeDetection->hasByName( pFilterEntry->maType ) )
{
mxTypeDetection->replaceByName( pFilterEntry->maType, aAny );
@@ -668,6 +646,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
Sequence< PropertyValue > aSequence;
if( mxExtendedTypeDetection->getByName( sFilterDetectService ) >>= aSequence )
{
+ auto aSequenceRange = asNonConstRange(aSequence);
sal_Int32 nCount = aSequence.getLength();
sal_Int32 nIndex;
for( nIndex = 0; nIndex < nCount; nIndex++ )
@@ -688,11 +667,11 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
if( nStr == nStrCount )
{
aTypes.realloc( nStrCount + 1 );
- aTypes[nStrCount] = pFilterEntry->maType;
+ aTypes.getArray()[nStrCount] = pFilterEntry->maType;
- aSequence[nIndex].Value <<= aTypes;
+ aSequenceRange[nIndex].Value <<= aTypes;
- mxExtendedTypeDetection->replaceByName( sFilterDetectService, makeAny( aSequence ) );
+ mxExtendedTypeDetection->replaceByName( sFilterDetectService, Any( aSequence ) );
Reference< XFlushable > xFlushable( mxExtendedTypeDetection, UNO_QUERY );
if( xFlushable.is() )
@@ -729,7 +708,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
void XMLFilterSettingsDialog::onTest()
{
// get the first selected filter
- filter_info_impl* pInfo = reinterpret_cast<filter_info_impl*>(m_xFilterListBox->get_selected_id().toInt64());
+ filter_info_impl* pInfo = weld::fromId<filter_info_impl*>(m_xFilterListBox->get_selected_id());
if (pInfo)
{
XMLFilterTestDialog aDlg(m_xDialog.get(), mxContext);
@@ -742,10 +721,10 @@ void XMLFilterSettingsDialog::onDelete()
int nIndex = m_xFilterListBox->get_selected_index();
if (nIndex == -1)
return;
- filter_info_impl* pInfo = reinterpret_cast<filter_info_impl*>(m_xFilterListBox->get_id(nIndex).toInt64());
+ filter_info_impl* pInfo = weld::fromId<filter_info_impl*>(m_xFilterListBox->get_id(nIndex));
if (pInfo)
{
- OUString aMessage(XsltResId(STR_WARN_DELETE));
+ OUString aMessage(FilterResId(STR_WARN_DELETE));
aMessage = aMessage.replaceFirst( "%s", pInfo->maFilterName );
std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(m_xDialog.get(),
@@ -837,7 +816,7 @@ void XMLFilterSettingsDialog::onSave()
int nFilters = 0;
m_xFilterListBox->selected_foreach([&](weld::TreeIter& rEntry){
- filter_info_impl* pInfo = reinterpret_cast<filter_info_impl*>(m_xFilterListBox->get_id(rEntry).toInt64());
+ filter_info_impl* pInfo = weld::fromId<filter_info_impl*>(m_xFilterListBox->get_id(rEntry));
aFilters.push_back(pInfo);
++nFilters;
return false;
@@ -847,9 +826,10 @@ void XMLFilterSettingsDialog::onSave()
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
FileDialogFlags::NONE, m_xDialog.get());
+ aDlg.SetContext(sfx2::FileDialogHelper::XMLFilterSettings);
OUString aExtensions( "*.jar" );
- OUString aFilterName = XsltResId(STR_FILTER_PACKAGE) +
+ OUString aFilterName = FilterResId(STR_FILTER_PACKAGE) +
" (" + aExtensions + ")";
aDlg.AddFilter( aFilterName, aExtensions );
@@ -867,13 +847,13 @@ void XMLFilterSettingsDialog::onSave()
OUString aMsg;
if( nFilters > 0 )
{
- aMsg = XsltResId(STR_FILTERS_HAVE_BEEN_SAVED);
+ aMsg = FilterResId(STR_FILTERS_HAVE_BEEN_SAVED);
aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) );
aMsg = aMsg.replaceFirst(sPlaceholder, aURL.GetLastName());
}
else
{
- aMsg = XsltResId(STR_FILTER_HAS_BEEN_SAVED);
+ aMsg = FilterResId(STR_FILTER_HAS_BEEN_SAVED);
aMsg = aMsg.replaceFirst( sPlaceholder, (*aFilters.begin())->maFilterName );
aMsg = aMsg.replaceFirst(sPlaceholder, aURL.GetLastName());
}
@@ -892,9 +872,10 @@ void XMLFilterSettingsDialog::onOpen()
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
FileDialogFlags::NONE, m_xDialog.get());
+ aDlg.SetContext(sfx2::FileDialogHelper::XMLFilterSettings);
OUString aExtensions( "*.jar" );
- OUString aFilterName = XsltResId(STR_FILTER_PACKAGE) +
+ OUString aFilterName = FilterResId(STR_FILTER_PACKAGE) +
" (" + aExtensions + ")";
aDlg.AddFilter( aFilterName, aExtensions );
@@ -927,18 +908,18 @@ void XMLFilterSettingsDialog::onOpen()
if( nFilters == 0 )
{
INetURLObject aURLObj( aURL );
- aMsg = XsltResId(STR_NO_FILTERS_FOUND);
+ aMsg = FilterResId(STR_NO_FILTERS_FOUND);
aMsg = aMsg.replaceFirst(sPlaceholder, aURLObj.GetLastName());
}
else if( nFilters == 1 )
{
- aMsg = XsltResId(STR_FILTER_INSTALLED);
+ aMsg = FilterResId(STR_FILTER_INSTALLED);
aMsg = aMsg.replaceFirst( sPlaceholder, aFilterName );
}
else
{
- aMsg = XsltResId(STR_FILTERS_INSTALLED);
+ aMsg = FilterResId(STR_FILTERS_INSTALLED);
aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) );
}
@@ -1210,7 +1191,7 @@ OUString getApplicationUIName( std::u16string_view rServiceName )
}
else
{
- OUString aRet = XsltResId(STR_UNKNOWN_APPLICATION);
+ OUString aRet = FilterResId(STR_UNKNOWN_APPLICATION);
if( !rServiceName.empty() )
{
aRet += OUString::Concat(" (") + rServiceName + ")";
@@ -1223,7 +1204,7 @@ OUString getApplicationUIName( std::u16string_view rServiceName )
void XMLFilterSettingsDialog::addFilterEntry( const filter_info_impl* pInfo )
{
int nRow = m_xFilterListBox->n_children();
- OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pInfo)));
+ OUString sId(weld::toId(pInfo));
m_xFilterListBox->append(sId, pInfo->maFilterName);
m_xFilterListBox->set_text(nRow, getEntryString(pInfo), 1);
}
@@ -1233,7 +1214,7 @@ void XMLFilterSettingsDialog::changeEntry( const filter_info_impl* pInfo )
const int nCount = m_xFilterListBox->n_children();
for(int nPos = 0; nPos < nCount; ++nPos)
{
- filter_info_impl* pEntry = reinterpret_cast<filter_info_impl*>(m_xFilterListBox->get_id(nPos).toInt64());
+ filter_info_impl* pEntry = weld::fromId<filter_info_impl*>(m_xFilterListBox->get_id(nPos));
if (pEntry == pInfo)
{
m_xFilterListBox->set_text(nPos, pInfo->maFilterName, 0);
@@ -1256,20 +1237,20 @@ OUString XMLFilterSettingsDialog::getEntryString( const filter_info_impl* pInfo
{
if( pInfo->maFlags & 2 )
{
- aEntryStr += XsltResId(STR_IMPORT_EXPORT);
+ aEntryStr += FilterResId(STR_IMPORT_EXPORT);
}
else
{
- aEntryStr += XsltResId(STR_IMPORT_ONLY);
+ aEntryStr += FilterResId(STR_IMPORT_ONLY);
}
}
else if( pInfo->maFlags & 2 )
{
- aEntryStr += XsltResId(STR_EXPORT_ONLY);
+ aEntryStr += FilterResId(STR_EXPORT_ONLY);
}
else
{
- aEntryStr += XsltResId(STR_UNDEFINED_FILTER);
+ aEntryStr += FilterResId(STR_UNDEFINED_FILTER);
}
return aEntryStr;
@@ -1306,41 +1287,26 @@ bool filter_info_impl::operator==( const filter_info_impl& r ) const
Sequence< OUString > filter_info_impl::getFilterUserData() const
{
- Sequence< OUString > aUserData(8);
-
- aUserData[0] = "com.sun.star.documentconversion.XSLTFilter";
- aUserData[1] = OUString::boolean( mbNeedsXSLT2 );
- aUserData[2] = maImportService;
- aUserData[3] = maExportService;
- aUserData[4] = maImportXSLT;
- aUserData[5] = maExportXSLT;
- aUserData[7] = maComment;
-
- return aUserData;
+ return
+ {
+ "com.sun.star.documentconversion.XSLTFilter",
+ OUString::boolean( mbNeedsXSLT2 ),
+ maImportService,
+ maExportService,
+ maImportXSLT,
+ maExportXSLT,
+ maComment
+ };
}
OUString string_encode( const OUString & rText )
{
- static sal_Bool const uricNoSlash[] = {
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, true, false, false, true, false, true, true, // !"#$%&'
- true, true, true, true, false, true, true, false, // ()*+,-./
- true, true, true, true, true, true, true, true, // 01234567
- true, true, true, false, false, true, false, true, // 89:;<=>?
- true, true, true, true, true, true, true, true, // @ABCDEFG
- true, true, true, true, true, true, true, true, // HIJKLMNO
- true, true, true, true, true, true, true, true, // PQRSTUVW
- true, true, true, false, false, false, false, true, // XYZ[\]^_
- false, true, true, true, true, true, true, true, // `abcdefg
- true, true, true, true, true, true, true, true, // hijklmno
- true, true, true, true, true, true, true, true, // pqrstuvw
- true, true, true, false, false, false, true, false}; // xyz{|}~
-
-
- return Uri::encode( rText, uricNoSlash, rtl_UriEncodeCheckEscapes, RTL_TEXTENCODING_UTF8 );
+ static constexpr auto uricNoSlash = rtl::createUriCharClass(
+ u8"!$&'()*+-.0123456789:=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~");
+
+
+ return
+ Uri::encode( rText, uricNoSlash.data(), rtl_UriEncodeCheckEscapes, RTL_TEXTENCODING_UTF8 );
}
OUString string_decode( const OUString & rText )
@@ -1385,15 +1351,15 @@ bool copyStreams( const Reference< XInputStream >& xIS, const Reference< XOutput
return false;
}
-bool createDirectory( OUString const & rURL )
+bool createDirectory( std::u16string_view rURL )
{
- sal_Int32 nLastIndex = sizeof( "file:///" ) - 2;
- while( nLastIndex != -1 )
+ size_t nLastIndex = sizeof( "file:///" ) - 2;
+ while( nLastIndex != std::u16string_view::npos )
{
- nLastIndex = rURL.indexOf( '/', nLastIndex + 1);
- if( nLastIndex != -1 )
+ nLastIndex = rURL.find( '/', nLastIndex + 1);
+ if( nLastIndex != std::u16string_view::npos )
{
- OUString aDirURL( rURL.copy( 0, nLastIndex ) );
+ OUString aDirURL( rURL.substr( 0, nLastIndex ) );
Directory aDir( aDirURL );
Directory::RC rc = aDir.open();
if( rc == Directory::E_NOENT )
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
index bfef03b29e28..c555e8b16e15 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
@@ -16,13 +16,12 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERSETTINGSDIALOG_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERSETTINGSDIALOG_HXX
+#pragma once
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <vcl/weld.hxx>
-#include <vcl/waitobj.hxx>
+#include <vcl/locktoplevels.hxx>
#include <unotools/moduleoptions.hxx>
#include "xmlfiltercommon.hxx"
@@ -95,6 +94,4 @@ private:
std::unique_ptr<weld::TreeView> m_xFilterListBox;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 306cf0abf23f..0c105fd84126 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <comphelper/fileurl.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <osl/file.hxx>
@@ -68,8 +68,8 @@ bool XMLFilterTabDialog::onOk()
mpXSLTPage->FillInfo( mpNewInfo.get() );
mpBasicPage->FillInfo( mpNewInfo.get() );
- OString sErrorPage;
- const char* pErrorId = nullptr;
+ OUString sErrorPage;
+ TranslateId pErrorId;
weld::Widget* pFocusWindow = nullptr;
OUString aReplace1;
OUString aReplace2;
@@ -128,7 +128,7 @@ bool XMLFilterTabDialog::onOk()
sal_Int32 nFilter;
Sequence< PropertyValue > aValues;
- for( nFilter = 0; (nFilter < nCount) && (pErrorId == nullptr); nFilter++, pFilterName++ )
+ for( nFilter = 0; (nFilter < nCount) && !pErrorId; nFilter++, pFilterName++ )
{
Any aAny( xFilterContainer->getByName( *pFilterName ) );
if( !(aAny >>= aValues) )
@@ -138,7 +138,7 @@ bool XMLFilterTabDialog::onOk()
PropertyValue* pValues = aValues.getArray();
sal_Int32 nValue;
- for( nValue = 0; (nValue < nValueCount) && (pErrorId == nullptr); nValue++, pValues++ )
+ for( nValue = 0; (nValue < nValueCount) && !pErrorId; nValue++, pValues++ )
{
if ( pValues->Name == "UIName" )
{
@@ -224,7 +224,7 @@ bool XMLFilterTabDialog::onOk()
{
m_xTabCtrl->set_current_page(sErrorPage);
- OUString aMessage(XsltResId(pErrorId));
+ OUString aMessage(FilterResId(pErrorId));
if( aReplace2.getLength() )
{
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.hxx b/filter/source/xsltdialog/xmlfiltertabdialog.hxx
index 05d576103924..e764102b01f7 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTABDIALOG_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTABDIALOG_HXX
+#pragma once
#include <com/sun/star/uno/XComponentContext.hpp>
#include <vcl/weld.hxx>
@@ -52,6 +51,4 @@ private:
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx b/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx
index e3b96e51550c..c11a4c69ef04 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTABPAGEBASIC_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTABPAGEBASIC_HXX
+#pragma once
#include <vcl/weld.hxx>
@@ -41,6 +40,4 @@ public:
std::unique_ptr<weld::TextView> m_xEDDescription;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
index 4d758da28f49..4e5618329ce9 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -27,9 +27,6 @@
#include "xmlfiltercommon.hxx"
#include "xmlfiltertabpagexslt.hxx"
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-
XMLFilterTabPageXSLT::XMLFilterTabPageXSLT(weld::Widget* pPage, weld::Dialog* pDialog)
: sInstPath( "$(prog)/" )
, m_pDialog(pDialog)
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
index 142c27a119f2..52538a834fd1 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
@@ -16,13 +16,11 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTABPAGEXSLT_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTABPAGEXSLT_HXX
+#pragma once
#include <vcl/weld.hxx>
#include <svtools/inettbc.hxx>
-namespace vcl { class Window; }
class filter_info_impl;
class XMLFilterTabPageXSLT
@@ -55,6 +53,4 @@ public:
std::unique_ptr<weld::CheckButton> m_xCBNeedsXSLT2;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index c00301bacfc3..e89ecc2d13d3 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -38,11 +38,12 @@
#include <com/sun/star/xml/sax/Writer.hpp>
#include <comphelper/oslfile2streamwrap.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/filedlghelper.hxx>
#include <osl/file.hxx>
#include <unotools/tempfile.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/processfactory.hxx>
@@ -198,7 +199,7 @@ void XMLFilterTestDialog::test( const filter_info_impl& rFilterInfo )
m_xDialog->run();
}
-static OUString getFileNameFromURL( OUString const & rURL )
+static OUString getFileNameFromURL( std::u16string_view rURL )
{
INetURLObject aURL( rURL );
OUString aName( aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset) );
@@ -309,7 +310,7 @@ void XMLFilterTestDialog::onExportBrowse()
int nFound = 0;
- for( const PropertyValue& rValue : std::as_const(aValues) )
+ for (const PropertyValue& rValue : aValues)
{
if ( rValue.Name == "Type" )
{
@@ -347,7 +348,7 @@ void XMLFilterTestDialog::onExportBrowse()
if( aAny >>= aValues2 )
{
OUString aExtension;
- for( const PropertyValue& rProp : std::as_const(aValues2) )
+ for (const PropertyValue& rProp : aValues2)
{
if ( rProp.Name == "Extensions" )
{
@@ -388,9 +389,8 @@ void XMLFilterTestDialog::onExportBrowse()
Reference< XDesktop2 > xLoader = Desktop::create( mxContext );
Reference< XInteractionHandler2 > xInter = InteractionHandler::createWithParent(mxContext, nullptr);
- Sequence< PropertyValue > aArguments(1);
- aArguments[0].Name = "InteractionHandler";
- aArguments[0].Value <<= xInter;
+ Sequence< PropertyValue > aArguments{ comphelper::makePropertyValue("InteractionHandler",
+ xInter) };
Reference< XComponent > xComp( xLoader->loadComponentFromURL( m_sExportRecentFile, "_default", 0, aArguments ) );
if( xComp.is() )
{
@@ -418,34 +418,34 @@ void XMLFilterTestDialog::doExport( const Reference< XComponent >& xComp )
Reference< XStorable > xStorable( xComp, UNO_QUERY );
if( xStorable.is() )
{
- OUString const ext(".xml");
- utl::TempFile aTempFile(OUString(), true, &ext);
+ utl::TempFileNamed aTempFile(u"", true, u".xml");
OUString aTempFileURL( aTempFile.GetURL() );
const application_info_impl* pAppInfo = getApplicationInfo( m_xFilterInfo->maExportService );
if( pAppInfo )
{
File aOutputFile( aTempFileURL );
- /* File::RC rc = */ aOutputFile.open( osl_File_OpenFlag_Write );
+ (void)aOutputFile.open( osl_File_OpenFlag_Write );
// create xslt exporter
Reference< XOutputStream > xIS( new comphelper::OSLOutputStreamWrapper( aOutputFile ) );
int bUseDocType = m_xFilterInfo->maDocType.isEmpty() ? 0 : 1;
Sequence< PropertyValue > aSourceData( 2 + bUseDocType );
+ auto pSourceData = aSourceData.getArray();
int i = 0;
- aSourceData[i ].Name = "OutputStream";
- aSourceData[i++].Value <<= xIS;
+ pSourceData[i ].Name = "OutputStream";
+ pSourceData[i++].Value <<= xIS;
- aSourceData[i].Name = "Indent";
- aSourceData[i++].Value <<= true;
+ pSourceData[i].Name = "Indent";
+ pSourceData[i++].Value <<= true;
if( bUseDocType )
- {
- aSourceData[i ].Name = "DocType_Public";
- aSourceData[i++].Value <<= m_xFilterInfo->maDocType;
- }
+ {
+ pSourceData[i ].Name = "DocType_Public";
+ pSourceData[i++].Value <<= m_xFilterInfo->maDocType;
+ }
Reference< XExportFilter > xExporter( mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.documentconversion.XSLTFilter", mxContext ), UNO_QUERY );
Reference< XDocumentHandler > xHandler( xExporter, UNO_QUERY );
@@ -490,9 +490,8 @@ void XMLFilterTestDialog::doExport( const Reference< XComponent >& xComp )
{
xExporter2->setSourceDocument( xComp );
- Sequence< PropertyValue > aDescriptor( 1 );
- aDescriptor[0].Name = "FileName";
- aDescriptor[0].Value <<= aTempFileURL;
+ Sequence< PropertyValue > aDescriptor{comphelper::makePropertyValue(
+ "FileName", aTempFileURL) };
if( xFilter->filter( aDescriptor ) )
displayXMLFile( aTempFileURL );
@@ -569,44 +568,36 @@ void XMLFilterTestDialog::import( const OUString& rURL )
Reference< XDesktop2 > xLoader = Desktop::create( mxContext );
Reference< XInteractionHandler2 > xInter = InteractionHandler::createWithParent(mxContext, nullptr);
- Sequence< PropertyValue > aArguments(2);
- aArguments[0].Name = "FilterName";
- aArguments[0].Value <<= m_xFilterInfo->maFilterName;
- aArguments[1].Name = "InteractionHandler";
- aArguments[1].Value <<= xInter;
+ Sequence< PropertyValue > aArguments{
+ comphelper::makePropertyValue("FilterName", m_xFilterInfo->maFilterName),
+ comphelper::makePropertyValue("InteractionHandler", xInter)
+ };
xLoader->loadComponentFromURL( rURL, "_default", 0, aArguments );
if( m_xCBXDisplaySource->get_active() )
{
- OUString const ext(".xml");
- TempFile aTempFile(OUString(), true, &ext);
+ TempFileNamed aTempFile(u"", true, u".xml");
OUString aTempFileURL( aTempFile.GetURL() );
Reference< XImportFilter > xImporter( mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.documentconversion.XSLTFilter", mxContext ), UNO_QUERY );
if( xImporter.is() )
{
osl::File aInputFile( rURL );
- aInputFile.open( osl_File_OpenFlag_Read );
+ (void)aInputFile.open( osl_File_OpenFlag_Read );
Reference< XInputStream > xIS( new comphelper::OSLInputStreamWrapper( aInputFile ) );
- Sequence< PropertyValue > aSourceData( 3 );
- int i = 0;
-
- aSourceData[i ].Name = "InputStream";
- aSourceData[i++].Value <<= xIS;
-
- aSourceData[i ].Name = "FileName";
- aSourceData[i++].Value <<= rURL;
-
- aSourceData[i ].Name = "Indent";
- aSourceData[i++].Value <<= true;
+ Sequence< PropertyValue > aSourceData{
+ comphelper::makePropertyValue("InputStream", xIS),
+ comphelper::makePropertyValue("FileName", rURL),
+ comphelper::makePropertyValue("Indent", true)
+ };
Reference< XWriter > xWriter = Writer::create( mxContext );
File aOutputFile( aTempFileURL );
- aOutputFile.open( osl_File_OpenFlag_Write );
+ (void)aOutputFile.open( osl_File_OpenFlag_Write );
Reference< XOutputStream > xOS( new OSLOutputStreamWrapper( aOutputFile ) );
xWriter->setOutputStream( xOS );
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.hxx b/filter/source/xsltdialog/xmlfiltertestdialog.hxx
index 4bf66989346b..bce1e19e1d3e 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTESTDIALOG_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTESTDIALOG_HXX
+#pragma once
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
@@ -79,6 +78,4 @@ private:
std::unique_ptr<weld::Button> m_xPBClose;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 027e338a0677..82f74a695e84 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -11,6 +11,7 @@
#include <algorithm>
#include <cstring>
#include <map>
+#include <optional>
#include <string_view>
#include <utility>
#include <vector>
@@ -37,7 +38,6 @@
#include "LibXSLTTransformer.hxx"
#include "OleHandler.hxx"
-#include <memory>
using namespace ::cppu;
using namespace ::osl;
@@ -216,9 +216,9 @@ namespace XSLT
css::uno::Reference<XInputStream> xis = m_transformer->getInputStream();
n = xis->readBytes(m_readBuf, len);
if (n > 0)
- {
- memcpy(buffer, m_readBuf.getArray(), n);
- }
+ {
+ memcpy(buffer, m_readBuf.getArray(), n);
+ }
return n;
}
@@ -266,7 +266,7 @@ namespace XSLT
OSL_ASSERT(m_transformer != nullptr);
OSL_ASSERT(m_transformer->getInputStream().is());
OSL_ASSERT(m_transformer->getOutputStream().is());
- OSL_ASSERT(!m_transformer->getStyleSheetURL().isEmpty());
+ OSL_ASSERT(!m_transformer->getStyleSheetURL().isEmpty() || !m_transformer->getStyleSheetText().isEmpty());
::std::map<const char*, OString> pmap = m_transformer->getParameters();
::std::vector< const char* > params( pmap.size() * 2 + 1 ); // build parameters
int paramIndex = 0;
@@ -279,8 +279,25 @@ namespace XSLT
xmlDocPtr doc = xmlReadIO(&ParserInputBufferCallback::on_read,
&ParserInputBufferCallback::on_close,
static_cast<void*> (this), nullptr, nullptr, 0);
- xsltStylesheetPtr styleSheet = xsltParseStylesheetFile(
+ xsltStylesheetPtr styleSheet = nullptr;
+ if (m_transformer->getStyleSheetURL().getLength())
+ styleSheet = xsltParseStylesheetFile(
reinterpret_cast<const xmlChar *>(m_transformer->getStyleSheetURL().getStr()));
+ else if (m_transformer->getStyleSheetText().getLength())
+ {
+ xmlDocPtr styleSheetDoc = xmlReadMemory(
+ m_transformer->getStyleSheetText().getStr(),
+ m_transformer->getStyleSheetText().getLength(),
+ "noname.xml", nullptr, 0);
+
+ styleSheet = xsltParseStylesheetDoc(styleSheetDoc);
+ }
+
+ if (!styleSheet)
+ {
+ m_transformer->error("No stylesheet was created");
+ }
+
xmlDocPtr result = nullptr;
exsltRegisterAll();
registerExtensionModule();
@@ -288,7 +305,7 @@ namespace XSLT
xsltSetGenericDebugFunc(stderr, NULL);
xsltDebugDumpExtensions(NULL);
#endif
- std::unique_ptr<OleHandler> oh(new OleHandler(m_transformer->getComponentContext()));
+ std::optional<OleHandler> oh(std::in_place, m_transformer->getComponentContext());
if (styleSheet)
{
xsltTransformContextPtr tcontext = xsltNewTransformContext(
@@ -316,7 +333,7 @@ namespace XSLT
}
else
{
- xmlErrorPtr lastErr = xmlGetLastError();
+ const xmlError* lastErr = xmlGetLastError();
OUString msg;
if (lastErr)
msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
@@ -325,7 +342,6 @@ namespace XSLT
m_transformer->error(msg);
}
- closeOutput();
oh.reset();
xsltFreeStylesheet(styleSheet);
xsltTransformContextPtr tcontext = nullptr;
@@ -370,8 +386,8 @@ namespace XSLT
}
LibXSLTTransformer::LibXSLTTransformer(
- const css::uno::Reference<XComponentContext> & rxContext) :
- m_xContext(rxContext)
+ css::uno::Reference<XComponentContext> xContext) :
+ m_xContext(std::move(xContext))
{
}
@@ -425,7 +441,7 @@ namespace XSLT
LibXSLTTransformer::removeListener(
const css::uno::Reference<XStreamListener>& listener)
{
- m_listeners.erase( std::remove(m_listeners.begin(), m_listeners.end(), listener ), m_listeners.end() );
+ std::erase(m_listeners,listener);
}
void
@@ -487,9 +503,13 @@ namespace XSLT
{ // backward compatibility for old clients using createInstance
params = args;
}
+
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
xmlSubstituteEntitiesDefault(0);
+SAL_WNODEPRECATED_DECLARATIONS_POP
+
m_parameters.clear();
- for (const Any& p : std::as_const(params))
+ for (const Any& p : params)
{
NamedValue nv;
p >>= nv;
@@ -511,6 +531,10 @@ namespace XSLT
{
m_styleSheetURL = valueUTF8;
}
+ if (nameUTF8 == "StylesheetText")
+ {
+ m_styleSheetText = valueUTF8;
+ }
else if (nameUTF8 == "SourceURL")
{
m_parameters.insert(pair<const char*, OString> (
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index ac922a4598f5..8696bda6a34a 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTFILTER_LIBXSLTTRANSFORMER_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTFILTER_LIBXSLTTRANSFORMER_HXX
+#pragma once
#include <deque>
#include <map>
@@ -68,7 +67,7 @@ namespace XSLT
static const sal_Int32 OUTPUT_BUFFER_SIZE;
static const sal_Int32 INPUT_BUFFER_SIZE;
- LibXSLTTransformer* m_transformer;
+ rtl::Reference<LibXSLTTransformer> m_transformer;
Sequence<sal_Int8> m_readBuf;
Sequence<sal_Int8> m_writeBuf;
@@ -114,6 +113,7 @@ namespace XSLT
ListenerList m_listeners;
OString m_styleSheetURL;
+ OString m_styleSheetText;
::std::map<const char *, OString> m_parameters;
@@ -131,7 +131,7 @@ namespace XSLT
public:
// ctor...
- LibXSLTTransformer(const css::uno::Reference<css::uno::XComponentContext> &r);
+ LibXSLTTransformer(css::uno::Reference<css::uno::XComponentContext> x);
// XServiceInfo
virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
@@ -169,6 +169,8 @@ namespace XSLT
const OString&
getStyleSheetURL() const { return m_styleSheetURL; }
+ const OString& getStyleSheetText() const { return m_styleSheetText; }
+
const ::std::map<const char*, OString>&
getParameters() const { return m_parameters; }
@@ -180,5 +182,4 @@ namespace XSLT
};
}
-#endif // INCLUDED_FILTER_SOURCE_XSLTFILTER_LIBXSLTTRANSFORMER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index 49a8991cc9e8..14a21c38d75a 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -26,7 +26,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include "OleHandler.hxx"
-#include <memory>
+#include <optional>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -47,13 +47,11 @@ namespace XSLT
if (m_storage == nullptr || m_rootStream == nullptr)
{
m_rootStream = createTempFile();
- Sequence<Any> args(1);
- args[0] <<= m_rootStream->getInputStream();
+ Sequence<Any> args{ Any(m_rootStream->getInputStream()) };
- Reference<XNameContainer> cont(
+ m_storage.set(
Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW)
->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", args), UNO_QUERY);
- m_storage = cont;
}
}
@@ -71,12 +69,10 @@ namespace XSLT
xSeek->seek(0);
//create a com.sun.star.embed.OLESimpleStorage from the temp stream
- Sequence<Any> args(1);
- args[0] <<= xSeek;
- Reference<XNameContainer> cont(
+ Sequence<Any> args{ Any(xSeek) };
+ m_storage.set(
Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW)
->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", args), UNO_QUERY);
- m_storage = cont;
}
OString
@@ -84,13 +80,13 @@ namespace XSLT
{
if (!m_storage || !m_storage->hasByName(streamName))
{
- return "Not Found:";// + streamName;
+ return "Not Found:"_ostr;// + streamName;
}
Reference<XInputStream> subStream(m_storage->getByName(streamName), UNO_QUERY);
if (!subStream.is())
{
- return "Not Found:";// + streamName;
+ return "Not Found:"_ostr;// + streamName;
}
//The first four byte are the length of the uncompressed data
Sequence<sal_Int8> aLength(4);
@@ -100,7 +96,7 @@ namespace XSLT
int readbytes = subStream->readBytes(aLength, 4);
if (4 != readbytes)
{
- return "Can not read the length.";
+ return "Can not read the length."_ostr;
}
sal_Int32 const oleLength = (static_cast<sal_uInt8>(aLength[0]) << 0U)
| (static_cast<sal_uInt8>(aLength[1]) << 8U)
@@ -108,18 +104,18 @@ namespace XSLT
| (static_cast<sal_uInt8>(aLength[3]) << 24U);
if (oleLength < 0)
{
- return "invalid oleLength";
+ return "invalid oleLength"_ostr;
}
Sequence<sal_Int8> content(oleLength);
//Read all bytes. The compressed length should be less than the uncompressed length
readbytes = subStream->readBytes(content, oleLength);
if (oleLength < readbytes)
{
- return "oleLength";// +oleLength + readBytes;
+ return "oleLength"_ostr;// +oleLength + readBytes;
}
// Decompress the bytes
- std::unique_ptr< ::ZipUtils::Inflater> decompresser(new ::ZipUtils::Inflater(false));
+ std::optional< ::ZipUtils::Inflater> decompresser(std::in_place, false);
decompresser->setInput(content);
Sequence<sal_Int8> result(oleLength);
decompresser->doInflateSegment(result, 0, oleLength);
@@ -128,7 +124,7 @@ namespace XSLT
//return the base64 string of the uncompressed data
OUStringBuffer buf(oleLength);
::comphelper::Base64::encode(buf, result);
- return OUStringToOString(buf.toString(), RTL_TEXTENCODING_UTF8);
+ return OUStringToOString(buf, RTL_TEXTENCODING_ASCII_US);
}
void
@@ -161,7 +157,7 @@ namespace XSLT
//return the base64 encoded string
OUStringBuffer buf(oleLength);
::comphelper::Base64::encode(buf, oledata);
- return OUStringToOString(buf.toString(), RTL_TEXTENCODING_UTF8);
+ return OUStringToOString(buf, RTL_TEXTENCODING_ASCII_US);
}
return encodeSubStorage(streamName);
}
@@ -178,28 +174,26 @@ namespace XSLT
Reference<XInputStream> xInput = subStream->getInputStream();
Reference<XOutputStream> xOutput = subStream->getOutputStream();
//write the length to the temp stream
- Sequence<sal_Int8> header(4);
- header[0] = static_cast<sal_Int8>(oledata.getLength() >> 0) & 0xFF;
- header[1] = static_cast<sal_Int8>(oledata.getLength() >> 8) & 0xFF;
- header[2] = static_cast<sal_Int8>(oledata.getLength() >> 16) & 0xFF;
- header[3] = static_cast<sal_Int8>(oledata.getLength() >> 24) & 0xFF;
+ Sequence<sal_Int8> header{
+ static_cast<sal_Int8>((oledata.getLength() >> 0) & 0xFF),
+ static_cast<sal_Int8>((oledata.getLength() >> 8) & 0xFF),
+ static_cast<sal_Int8>((oledata.getLength() >> 16) & 0xFF),
+ static_cast<sal_Int8>((oledata.getLength() >> 24) & 0xFF)
+ };
xOutput->writeBytes(header);
// Compress the bytes
Sequence<sal_Int8> output(oledata.getLength());
- std::unique_ptr< ::ZipUtils::Deflater> compresser(new ::ZipUtils::Deflater(sal_Int32(3), false));
+ std::optional< ::ZipUtils::Deflater> compresser(std::in_place, sal_Int32(3), false);
compresser->setInputSegment(oledata);
compresser->finish();
int compressedDataLength = compresser->doDeflateSegment(output, oledata.getLength());
compresser.reset();
//realloc the data length
- Sequence<sal_Int8> compressed(compressedDataLength);
- for (int i = 0; i < compressedDataLength; i++) {
- compressed[i] = output[i];
- }
+ output.realloc(compressedDataLength);
//write the compressed data to the temp stream
- xOutput->writeBytes(compressed);
+ xOutput->writeBytes(output);
//seek to 0
Reference<XSeekable> xSeek(xInput, UNO_QUERY);
xSeek->seek(0);
diff --git a/filter/source/xsltfilter/OleHandler.hxx b/filter/source/xsltfilter/OleHandler.hxx
index 1fd00aa39ab7..d59429aacf4d 100644
--- a/filter/source/xsltfilter/OleHandler.hxx
+++ b/filter/source/xsltfilter/OleHandler.hxx
@@ -8,12 +8,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_FILTER_SOURCE_XSLTFILTER_OLEHANDLER_HXX
-#define INCLUDED_FILTER_SOURCE_XSLTFILTER_OLEHANDLER_HXX
+#pragma once
#include <cstdio>
#include <cstring>
#include <map>
#include <string_view>
+#include <utility>
#include <vector>
#include <iostream>
#include <libxml/parser.h>
@@ -57,8 +57,8 @@ namespace XSLT
class OleHandler
{
public:
- OleHandler(const css::uno::Reference<XComponentContext>& rxContext)
- : m_xContext(rxContext)
+ OleHandler(css::uno::Reference<XComponentContext> xContext)
+ : m_xContext(std::move(xContext))
, m_tcontext(nullptr)
{
}
@@ -90,6 +90,4 @@ namespace XSLT
};
}
-#endif // INCLUDED_FILTER_SOURCE_XSLTFILTER_OLEHANDLER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index b48a68befc19..f5fa3132580d 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -28,8 +28,10 @@
#include <osl/time.h>
#include <osl/conditn.hxx>
#include <tools/urlobj.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/uri.hxx>
#include <comphelper/interaction.hxx>
@@ -62,10 +64,9 @@
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <com/sun/star/task/XInteractionRequest.hpp>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
-#include <com/sun/star/xml/xslt/XSLT2Transformer.hpp>
#include <com/sun/star/xml/xslt/XSLTTransformer.hpp>
+#include <utility>
#define TRANSFORMATION_TIMEOUT_SEC 60
@@ -76,7 +77,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::xml;
using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::util;
@@ -86,6 +86,27 @@ namespace XSLT
{
namespace {
+ class XSLTFilter;
+ class XSLTFilterStreamListener : public WeakImplHelper<XStreamListener>
+ {
+ public:
+ XSLTFilterStreamListener(XSLTFilter& rParent) : m_rParent(rParent) {}
+
+ // XStreamListener
+ virtual void SAL_CALL
+ error(const Any& a) override;
+ virtual void SAL_CALL
+ closed() override;
+ virtual void SAL_CALL
+ terminated() override;
+ virtual void SAL_CALL
+ started() override;
+ virtual void SAL_CALL
+ disposing(const EventObject& e) override;
+ private:
+ XSLTFilter& m_rParent;
+ };
+
/*
* XSLTFilter reads flat XML streams from the XML filter framework and passes
* them to an XSLT transformation service. XSLT transformation errors are
@@ -97,8 +118,9 @@ namespace XSLT
* service must support com.sun.star.xml.xslt.XSLT2Transformer.
*/
class XSLTFilter : public WeakImplHelper<XImportFilter, XImportFilter2, XExportFilter,
- XStreamListener, ExtendedDocumentHandlerAdapter, XServiceInfo>
+ ExtendedDocumentHandlerAdapter, XServiceInfo>
{
+ friend class XSLTFilterStreamListener;
private:
// the UNO ServiceFactory
@@ -125,25 +147,13 @@ namespace XSLT
public:
// ctor...
- explicit XSLTFilter(const css::uno::Reference<XComponentContext> &r);
+ explicit XSLTFilter(css::uno::Reference<XComponentContext> x);
// XServiceInfo
virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
virtual OUString SAL_CALL getImplementationName() override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- // XStreamListener
- virtual void SAL_CALL
- error(const Any& a) override;
- virtual void SAL_CALL
- closed() override;
- virtual void SAL_CALL
- terminated() override;
- virtual void SAL_CALL
- started() override;
- virtual void SAL_CALL
- disposing(const EventObject& e) override;
-
// XImportFilter
virtual sal_Bool SAL_CALL
importer(const Sequence<PropertyValue>& aSourceData, const css::uno::Reference<
@@ -170,12 +180,12 @@ namespace XSLT
}
- XSLTFilter::XSLTFilter(const css::uno::Reference<XComponentContext> &r):
- m_xContext(r), m_bTerminated(false), m_bError(false)
+ XSLTFilter::XSLTFilter(css::uno::Reference<XComponentContext> x):
+ m_xContext(std::move(x)), m_bTerminated(false), m_bError(false)
{}
void
- XSLTFilter::disposing(const EventObject&)
+ XSLTFilterStreamListener::disposing(const EventObject&)
{
}
@@ -196,20 +206,16 @@ namespace XSLT
OUString
XSLTFilter::expandUrl(const OUString& sUrl)
{
- OUString sExpandedUrl;
- try
- {
- css::uno::Reference<XMacroExpander>
- xMacroExpander = theMacroExpander::get(m_xContext);
- sExpandedUrl = xMacroExpander->expandMacros(sUrl);
- sal_Int32 nPos = sExpandedUrl.indexOf( "vnd.sun.star.expand:" );
- if (nPos != -1)
- sExpandedUrl = sExpandedUrl.copy(nPos + 20);
- }
- catch (const Exception&)
- {
- }
- return sExpandedUrl;
+ OUString sPreparedURL(sUrl);
+ if (sPreparedURL.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", &sPreparedURL))
+ {
+ sPreparedURL = rtl::Uri::decode(sPreparedURL, rtl_UriDecodeWithCharset,
+ RTL_TEXTENCODING_UTF8);
+ css::uno::Reference<XMacroExpander>
+ xMacroExpander = theMacroExpander::get(m_xContext);
+ sPreparedURL = xMacroExpander->expandMacros(sPreparedURL);
+ }
+ return sPreparedURL;
}
css::uno::Reference<xslt::XXSLTTransformer>
@@ -226,7 +232,10 @@ namespace XSLT
{
try
{
- xTransformer = xslt::XSLT2Transformer::create(m_xContext, rArgs);
+ xTransformer.set(
+ m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+ "com.sun.star.xml.xslt.XSLT2Transformer", rArgs, m_xContext),
+ css::uno::UNO_QUERY_THROW);
}
catch (const Exception&)
{
@@ -236,10 +245,7 @@ namespace XSLT
throw;
}
}
-
- // instantiation of XSLT 2.0 transformer service failed, or the
- // filter does not need it
- if (!xTransformer.is())
+ else
{
xTransformer = xslt::XSLTTransformer::create(m_xContext, rArgs);
}
@@ -248,27 +254,27 @@ namespace XSLT
}
void
- XSLTFilter::started()
+ XSLTFilterStreamListener::started()
{
- m_cTransformed.reset();
+ m_rParent.m_cTransformed.reset();
}
void
- XSLTFilter::error(const Any& a)
+ XSLTFilterStreamListener::error(const Any& a)
{
SAL_WARN("filter.xslt", "XSLTFilter::error was called: " << exceptionToString(a));
- m_bError = true;
- m_cTransformed.set();
+ m_rParent.m_bError = true;
+ m_rParent.m_cTransformed.set();
}
void
- XSLTFilter::closed()
+ XSLTFilterStreamListener::closed()
{
- m_cTransformed.set();
+ m_rParent.m_cTransformed.set();
}
void
- XSLTFilter::terminated()
+ XSLTFilterStreamListener::terminated()
{
- m_bTerminated = true;
- m_cTransformed.set();
+ m_rParent.m_bTerminated = true;
+ m_rParent.m_cTransformed.set();
}
OUString
@@ -300,46 +306,35 @@ namespace XSLT
// the input stream that represents the imported file
// is most important here since we need to supply it to
// the sax parser that drives the supplied document handler
- sal_Int32 nLength = aSourceData.getLength();
OUString aName, aURL;
css::uno::Reference<XInputStream> xInputStream;
css::uno::Reference<XInteractionHandler> xInterActionHandler;
- for (sal_Int32 i = 0; i < nLength; i++)
- {
- aName = aSourceData[i].Name;
- Any value = aSourceData[i].Value;
- if ( aName == "InputStream" )
- value >>= xInputStream;
- else if ( aName == "URL" )
- value >>= aURL;
- else if ( aName == "InteractionHandler" )
- value >>= xInterActionHandler;
- }
+ for (const auto& sourceDataItem : aSourceData)
+ {
+ aName = sourceDataItem.Name;
+ Any value = sourceDataItem.Value;
+ if ( aName == "InputStream" )
+ value >>= xInputStream;
+ else if ( aName == "URL" )
+ value >>= aURL;
+ else if ( aName == "InteractionHandler" )
+ value >>= xInterActionHandler;
+ }
OSL_ASSERT(xInputStream.is());
if (!xInputStream.is())
return false;
// create transformer
- Sequence<Any> args(3);
- NamedValue nv;
-
- nv.Name = "StylesheetURL";
- nv.Value <<= expandUrl(udStyleSheet);
- args[0] <<= nv;
- nv.Name = "SourceURL";
- nv.Value <<= aURL;
- args[1] <<= nv;
- nv.Name = "SourceBaseURL";
- nv.Value <<= INetURLObject(aURL).getBase();
- args[2] <<= nv;
-
+ Sequence<Any> args{ Any(NamedValue("StylesheetURL", Any(expandUrl(udStyleSheet)))),
+ Any(NamedValue("SourceURL", Any(aURL))),
+ Any(NamedValue("SourceBaseURL", Any(INetURLObject(aURL).getBase()))) };
m_tcontrol = impl_createTransformer(msUserData[1], args);
OSL_ASSERT(xHandler.is());
OSL_ASSERT(xInputStream.is());
OSL_ASSERT(m_tcontrol.is());
if (xHandler.is() && xInputStream.is() && m_tcontrol.is())
- {
+ {
try
{
css::uno::Reference<css::io::XSeekable> xSeek(xInputStream, UNO_QUERY);
@@ -347,8 +342,7 @@ namespace XSLT
xSeek->seek(0);
// we want to be notified when the processing is done...
- m_tcontrol->addListener(css::uno::Reference<XStreamListener> (
- this));
+ m_tcontrol->addListener(new XSLTFilterStreamListener(*this));
// connect input to transformer
m_tcontrol->setInputStream(xInputStream);
@@ -356,7 +350,6 @@ namespace XSLT
// create pipe
css::uno::Reference<XOutputStream> pipeout =
Pipe::create(m_xContext);
- css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY);
//connect transformer to pipe
m_tcontrol->setOutputStream(pipeout);
@@ -365,10 +358,10 @@ namespace XSLT
InputSource aInput;
aInput.sSystemId = aURL;
aInput.sPublicId = aURL;
- aInput.aInputStream = pipein;
+ aInput.aInputStream.set(pipeout, UNO_QUERY);
- css::uno::Reference< css::xml::sax::XFastParser > xFastParser = dynamic_cast<
- css::xml::sax::XFastParser* >( xHandler.get() );
+ css::uno::Reference< css::xml::sax::XFastParser > xFastParser(
+ xHandler, css::uno::UNO_QUERY );
// transform
m_tcontrol->start();
@@ -379,19 +372,18 @@ namespace XSLT
Sequence<Any> excArgs(0);
css::ucb::InteractiveAugmentedIOException exc(
"Timeout!",
- static_cast< OWeakObject * >( this ),
+ getXWeak(),
InteractionClassification_ERROR,
css::ucb::IOErrorCode_GENERAL,
excArgs);
Any r;
r <<= exc;
- ::comphelper::OInteractionRequest* pRequest = new ::comphelper::OInteractionRequest(r);
- css::uno::Reference< XInteractionRequest > xRequest(pRequest);
- ::comphelper::OInteractionRetry* pRetry = new ::comphelper::OInteractionRetry;
- ::comphelper::OInteractionAbort* pAbort = new ::comphelper::OInteractionAbort;
+ rtl::Reference<::comphelper::OInteractionRequest> pRequest = new ::comphelper::OInteractionRequest(r);
+ rtl::Reference<::comphelper::OInteractionRetry> pRetry = new ::comphelper::OInteractionRetry;
+ rtl::Reference<::comphelper::OInteractionAbort> pAbort = new ::comphelper::OInteractionAbort;
pRequest->addContinuation(pRetry);
pRequest->addContinuation(pAbort);
- xInterActionHandler->handle(xRequest);
+ xInterActionHandler->handle(pRequest);
if (pAbort->wasSelected()) {
m_bError = true;
m_cTransformed.set();
@@ -421,11 +413,11 @@ namespace XSLT
TOOLS_WARN_EXCEPTION("filter.xslt", "");
return false;
}
- }
+ }
else
- {
- return false;
- }
+ {
+ return false;
+ }
}
sal_Bool
@@ -447,41 +439,31 @@ namespace XSLT
css::uno::Reference<XInputStream> xInputStream;
css::uno::Reference<XInteractionHandler> xInterActionHandler;
for (sal_Int32 i = 0; i < nLength; i++)
- {
- aName = aSourceData[i].Name;
- Any value = aSourceData[i].Value;
- if ( aName == "InputStream" )
- value >>= xInputStream;
- else if ( aName == "URL" )
- value >>= aURL;
- else if ( aName == "InteractionHandler" )
- value >>= xInterActionHandler;
- }
+ {
+ aName = aSourceData[i].Name;
+ Any value = aSourceData[i].Value;
+ if ( aName == "InputStream" )
+ value >>= xInputStream;
+ else if ( aName == "URL" )
+ value >>= aURL;
+ else if ( aName == "InteractionHandler" )
+ value >>= xInterActionHandler;
+ }
OSL_ASSERT(xInputStream.is());
if (!xInputStream.is())
return false;
// create transformer
- Sequence<Any> args(3);
- NamedValue nv;
-
- nv.Name = "StylesheetURL";
- nv.Value <<= expandUrl(udStyleSheet);
- args[0] <<= nv;
- nv.Name = "SourceURL";
- nv.Value <<= aURL;
- args[1] <<= nv;
- nv.Name = "SourceBaseURL";
- nv.Value <<= INetURLObject(aURL).getBase();
- args[2] <<= nv;
-
+ Sequence<Any> args{ Any(NamedValue("StylesheetURL", Any(expandUrl(udStyleSheet)))),
+ Any(NamedValue("SourceURL", Any(aURL))),
+ Any(NamedValue("SourceBaseURL", Any(INetURLObject(aURL).getBase()))) };
m_tcontrol = impl_createTransformer(msUserData[1], args);
assert(xFastParser.is());
OSL_ASSERT(xInputStream.is());
OSL_ASSERT(m_tcontrol.is());
if (xFastParser.is() && xInputStream.is() && m_tcontrol.is())
- {
+ {
try
{
css::uno::Reference<css::io::XSeekable> xSeek(xInputStream, UNO_QUERY);
@@ -489,8 +471,7 @@ namespace XSLT
xSeek->seek(0);
// we want to be notified when the processing is done...
- m_tcontrol->addListener(css::uno::Reference<XStreamListener> (
- this));
+ m_tcontrol->addListener(new XSLTFilterStreamListener(*this));
// connect input to transformer
m_tcontrol->setInputStream(xInputStream);
@@ -498,7 +479,6 @@ namespace XSLT
// create pipe
css::uno::Reference<XOutputStream> pipeout =
Pipe::create(m_xContext);
- css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY);
//connect transformer to pipe
m_tcontrol->setOutputStream(pipeout);
@@ -507,7 +487,7 @@ namespace XSLT
InputSource aInput;
aInput.sSystemId = aURL;
aInput.sPublicId = aURL;
- aInput.aInputStream = pipein;
+ aInput.aInputStream.set(pipeout, UNO_QUERY);
// transform
m_tcontrol->start();
@@ -518,19 +498,18 @@ namespace XSLT
Sequence<Any> excArgs(0);
css::ucb::InteractiveAugmentedIOException exc(
"Timeout!",
- static_cast< OWeakObject * >( this ),
+ getXWeak(),
InteractionClassification_ERROR,
css::ucb::IOErrorCode_GENERAL,
excArgs);
Any r;
r <<= exc;
- ::comphelper::OInteractionRequest* pRequest = new ::comphelper::OInteractionRequest(r);
- css::uno::Reference< XInteractionRequest > xRequest(pRequest);
- ::comphelper::OInteractionRetry* pRetry = new ::comphelper::OInteractionRetry;
- ::comphelper::OInteractionAbort* pAbort = new ::comphelper::OInteractionAbort;
+ rtl::Reference<::comphelper::OInteractionRequest> pRequest = new ::comphelper::OInteractionRequest(r);
+ rtl::Reference<::comphelper::OInteractionRetry> pRetry = new ::comphelper::OInteractionRetry;
+ rtl::Reference<::comphelper::OInteractionAbort> pAbort = new ::comphelper::OInteractionAbort;
pRequest->addContinuation(pRetry);
pRequest->addContinuation(pAbort);
- xInterActionHandler->handle(xRequest);
+ xInterActionHandler->handle(pRequest);
if (pAbort->wasSelected()) {
m_bError = true;
m_cTransformed.set();
@@ -549,11 +528,11 @@ namespace XSLT
TOOLS_WARN_EXCEPTION("filter.xslt", "");
return false;
}
- }
+ }
else
- {
- return false;
- }
+ {
+ return false;
+ }
}
sal_Bool
@@ -575,51 +554,40 @@ namespace XSLT
// css::uno::Reference<XOutputStream> rOutputStream;
sal_Int32 nLength = aSourceData.getLength();
for (sal_Int32 i = 0; i < nLength; i++)
- {
- aName = aSourceData[i].Name;
- if ( aName == "DocType_Public" )
- aSourceData[i].Value >>= aDoctypePublic;
- else if ( aName == "OutputStream" )
- aSourceData[i].Value >>= m_rOutputStream;
- else if ( aName == "URL" )
- aSourceData[i].Value >>= sURL;
- }
+ {
+ aName = aSourceData[i].Name;
+ if ( aName == "DocType_Public" )
+ aSourceData[i].Value >>= aDoctypePublic;
+ else if ( aName == "OutputStream" )
+ aSourceData[i].Value >>= m_rOutputStream;
+ else if ( aName == "URL" )
+ aSourceData[i].Value >>= sURL;
+ }
if (!getDelegate().is())
- {
- // get the document writer
- setDelegate(css::uno::Reference<XExtendedDocumentHandler>(
- Writer::create(m_xContext),
- UNO_QUERY_THROW));
- }
+ {
+ // get the document writer
+ setDelegate(css::uno::Reference<XExtendedDocumentHandler>(
+ Writer::create(m_xContext),
+ UNO_QUERY_THROW));
+ }
// create transformer
- Sequence<Any> args(4);
- NamedValue nv;
- nv.Name = "StylesheetURL";
- nv.Value <<= expandUrl(udStyleSheet);
- args[0] <<= nv;
- nv.Name = "TargetURL";
- nv.Value <<= sURL;
- args[1] <<= nv;
- nv.Name = "DoctypePublic";
- nv.Value <<= aDoctypePublic;
- args[2] <<= nv;
- nv.Name = "TargetBaseURL";
INetURLObject ineturl(sURL);
ineturl.removeSegment();
m_aExportBaseUrl = ineturl.GetMainURL(INetURLObject::DecodeMechanism::NONE);
- nv.Value <<= m_aExportBaseUrl;
- args[3] <<= nv;
-
+ Sequence<Any> args{ Any(NamedValue("StylesheetURL", Any(expandUrl(udStyleSheet)))),
+ Any(NamedValue("TargetURL", Any(sURL))),
+ Any(NamedValue("DoctypePublic", Any(aDoctypePublic))),
+ Any(NamedValue("TargetBaseURL", Any(m_aExportBaseUrl))) };
m_tcontrol = impl_createTransformer(msUserData[1], args);
OSL_ASSERT(m_rOutputStream.is());
OSL_ASSERT(m_tcontrol.is());
if (m_tcontrol.is() && m_rOutputStream.is())
- {
+ {
// we want to be notified when the processing is done...
- m_tcontrol->addListener(css::uno::Reference<XStreamListener> (this));
+ m_tcontrol->addListener(new XSLTFilterStreamListener(*this));
// create pipe
css::uno::Reference<XOutputStream> pipeout =
@@ -641,11 +609,11 @@ namespace XSLT
// we will start the transformation as soon as we receive the startDocument
// event.
return true;
- }
+ }
else
- {
- return false;
- }
+ {
+ return false;
+ }
}
// for the DocumentHandler implementation, we just proxy the
diff --git a/filter/uiconfig/ui/pdfgeneralpage.ui b/filter/uiconfig/ui/pdfgeneralpage.ui
index 1c2ee3ebd0f0..f09113793d07 100644
--- a/filter/uiconfig/ui/pdfgeneralpage.ui
+++ b/filter/uiconfig/ui/pdfgeneralpage.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="flt">
<requires lib="gtk+" version="3.20"/>
<object class="GtkSizeGroup"/>
@@ -7,46 +7,46 @@
<property name="lower">1</property>
<property name="upper">100</property>
<property name="value">90</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="PdfGeneralPage">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="column_spacing">24</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
+ <property name="column-spacing">24</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=5 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkRadioButton" id="all">
<property name="label" translatable="yes" context="pdfgeneralpage|all">_All</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="all-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|all">Exports all defined print ranges. If no print range is defined, exports the entire document.</property>
@@ -54,45 +54,70 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="range">
- <property name="label" translatable="yes" context="pdfgeneralpage|range">_Pages:</property>
+ <object class="GtkRadioButton" id="pagerange">
+ <property name="label" translatable="yes" context="pdfgeneralpage|pagerange">_Pages:</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">all</property>
<accessibility>
<relation type="label-for" target="pages"/>
</accessibility>
<child internal-child="accessible">
- <object class="AtkObject" id="range-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|range">Exports the pages you type in the box.</property>
+ <object class="AtkObject" id="pagerange-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|pagerange">Exports the pages you type in the box.</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="sheetrange">
+ <property name="label" translatable="yes" context="pdfgeneralpage|sheetrange">_Sheets:</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="group">all</property>
+ <accessibility>
+ <relation type="label-for" target="sheets"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="sheetrange-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|sheetrange">Exports the sheets you type in the box.</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="selection">
<property name="label" translatable="yes" context="pdfgeneralpage|selection">_Selection</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">all</property>
<child internal-child="accessible">
<object class="AtkObject" id="selection-atkobject">
@@ -101,21 +126,21 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="pages">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
- <property name="width_chars">5</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
+ <property name="width-chars">5</property>
+ <property name="truncate-multiline">True</property>
<accessibility>
- <relation type="labelled-by" target="range"/>
+ <relation type="labelled-by" target="pagerange"/>
</accessibility>
- <property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="pages-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|pages">Exports the pages you type in the box.</property>
@@ -123,48 +148,74 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="sheets">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
+ <property name="width-chars">5</property>
+ <property name="truncate-multiline">True</property>
+ <accessibility>
+ <relation type="labelled-by" target="sheetrange"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="sheets-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|sheets">Exports the sheets you type in the box.</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="slides">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
<property name="halign">start</property>
- <property name="label" translatable="yes" context="pdfgeneralpage|slides">Slides:</property>
+ <property name="label" translatable="yes" context="pdfgeneralpage|slides">_Slides:</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="viewpdf">
<property name="label" translatable="yes" context="pdfgeneralpage|viewpdf">_View PDF after export</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="viewpdf-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|viewpdf">Open the exported document in the system default PDF viewer.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="selectedsheets">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
<property name="halign">start</property>
<property name="label" translatable="yes" context="pdfgeneralpage|selectedsheets">_Selection/Selected sheet(s)</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
</object>
@@ -172,7 +223,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label1">Range</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -189,28 +240,28 @@
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=3 -->
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkRadioButton" id="losslesscompress">
<property name="label" translatable="yes" context="pdfgeneralpage|losslesscompress">_Lossless compression</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="losslesscompress-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|losslesscompress">Selects a lossless compression of images. All pixels are preserved.</property>
@@ -218,20 +269,20 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="reduceresolution">
- <property name="label" translatable="yes" context="pdfgeneralpage|reduceresolution">Reduce ima_ge resolution</property>
+ <property name="label" translatable="yes" context="pdfgeneralpage|reduceresolution">Reduce ima_ge resolution to:</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<accessibility>
<relation type="label-for" target="resolution"/>
</accessibility>
@@ -242,15 +293,15 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="resolution">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_entry">True</property>
+ <property name="can-focus">False</property>
+ <property name="has-entry">True</property>
<items>
<item translatable="yes" context="pdfgeneralpage|resolution">75 DPI</item>
<item translatable="yes" context="pdfgeneralpage|resolution">150 DPI</item>
@@ -260,10 +311,10 @@
</items>
<child internal-child="entry">
<object class="GtkEntry" id="comboboxtext-entry">
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
- <property name="truncate-multiline">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
<property name="text" translatable="yes" context="pdfgeneralpage|comboboxtext-entry">75 DPI</property>
+ <property name="truncate-multiline">True</property>
</object>
</child>
<accessibility>
@@ -276,23 +327,23 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="qualityframe">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
<object class="GtkSpinButton" id="quality">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
- <property name="activates_default">True</property>
- <property name="adjustment">adjustment1</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustment1</property>
<child internal-child="accessible">
<object class="AtkObject" id="quality-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|quality">Enter the quality level for JPEG compression.</property>
@@ -300,30 +351,30 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">3</property>
<child>
<object class="GtkRadioButton" id="jpegcompress">
<property name="label" translatable="yes" context="pdfgeneralpage|jpegcompress">_JPEG compression</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">losslesscompress</property>
<child internal-child="accessible">
<object class="AtkObject" id="jpegcompress-atkobject">
@@ -340,10 +391,10 @@
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label6">_Quality:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">quality</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">quality</property>
</object>
<packing>
<property name="expand">False</property>
@@ -353,8 +404,8 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
</object>
@@ -362,7 +413,7 @@
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label2">Images</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -379,56 +430,66 @@
<child>
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=2 -->
<object class="GtkGrid" id="grid7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkCheckButton" id="watermark">
<property name="label" translatable="yes" context="pdfgeneralpage|watermark">Sign with _watermark</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="watermark-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|watermark">Add a centered, vertical, light green watermark text to the page background. The watermark is not part of the source document.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="watermarkentry">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
- <property name="activates_default">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="watermarkentry-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|watermarkentry">Insert the text for the watermark signature.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="watermarklabel">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|watermarklabel">Text:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">watermarkentry</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">watermarkentry</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
@@ -439,7 +500,7 @@
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label3">Watermark</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -455,40 +516,41 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="margin-end">6</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=6 -->
<object class="GtkGrid" id="grid10">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">3</property>
<child>
<object class="GtkCheckButton" id="embed">
<property name="label" translatable="yes" context="pdfgeneralpage|embed">Hybrid PDF (em_bed ODF file)</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="pdfgeneralpage|embed|tooltip_text">Creates a PDF that is easily editable in %PRODUCTNAME</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|embed|tooltip_text">Creates a PDF that is easily editable in %PRODUCTNAME</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="embed-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|embed">This setting enables you to export the document as a .pdf file containing two file formats: PDF and ODF.</property>
@@ -496,20 +558,20 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="tagged">
<property name="label" translatable="yes" context="pdfgeneralpage|tagged">_Tagged PDF (add document structure)</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="pdfgeneralpage|tagged|tooltip_text">Includes a document's content structure information in a PDF</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|tagged|tooltip_text">Includes a document's content structure information in a PDF</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="tagged-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|tagged">Select to write PDF tags. This can increase file size by huge amounts.</property>
@@ -517,20 +579,20 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="forms">
<property name="label" translatable="yes" context="pdfgeneralpage|forms">Create PDF for_m</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="pdfgeneralpage|forms|tooltip_text">Creates a PDF with fields that can be filled out</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|forms|tooltip_text">Creates a PDF with fields that can be filled out</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="forms-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|forms">Choose to create a PDF form. This can be filled out and printed by the user of the PDF document.</property>
@@ -538,27 +600,28 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=2 -->
<object class="GtkGrid" id="formsframe">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
<property name="margin-start">18</property>
+ <property name="hexpand">True</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkCheckButton" id="allowdups">
<property name="label" translatable="yes" context="pdfgeneralpage|allowdups">Allow duplicate field _names</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="allowdups-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|allowdups">Allows you to use the same field name for multiple fields in the generated PDF file. If disabled, field names will be exported using generated unique names.</property>
@@ -566,15 +629,16 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="format">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
<items>
<item translatable="yes" context="pdfgeneralpage|format">FDF</item>
<item translatable="yes" context="pdfgeneralpage|format">PDF</item>
@@ -588,62 +652,62 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="submitformatbox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
- <property name="margin_top">1</property>
+ <property name="margin-top">1</property>
<property name="vexpand">True</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label7">Submit _format:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">format</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">format</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">5</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=2 -->
<object class="GtkGrid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkCheckButton" id="pdfa">
- <property name="label" translatable="yes" context="pdfgeneralpage|pdfa">Archive (P_DF/A, ISO 19005)</property>
+ <property name="label" translatable="yes" context="pdfgeneralpage|pdfa">Archival (P_DF/A, ISO 19005)</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="pdfgeneralpage|pdfa|tooltip_text">Creates an ISO 19005-2 compliant PDF file, ideal for long-term document preservation</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|pdfa|tooltip_text">Creates an ISO 19005-2 compliant PDF file, ideal for long-term document preservation</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="pdfa-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|pdfa">Converts to the PDF/A-2b or PDF/A-1b format. This is defined as an electronic document file format for long term preservation. All fonts that were used in the source document will be embedded into the generated PDF file. PDF tags will be written.</property>
@@ -651,21 +715,23 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="pdfagrid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">14</property>
+ <property name="can-focus">False</property>
<property name="margin-start">18</property>
+ <property name="hexpand">True</property>
+ <property name="column-spacing">14</property>
<child>
<object class="GtkComboBoxText" id="pdfaversion">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
<property name="active">3</property>
<items>
<item id="1" context="pdfgeneralpage|pdfaversion">PDF/A-1b</item>
@@ -677,23 +743,24 @@
</accessibility>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="pdfabox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="pdfaversionlabel">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
<property name="valign">baseline</property>
<property name="vexpand">True</property>
<property name="label" translatable="yes" context="pdfgeneralpage|pdfaversion">PDF_/A version:</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<accessibility>
<relation type="label-for" target="pdfaversion"/>
</accessibility>
@@ -706,36 +773,41 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pdfua">
<property name="label" translatable="yes" context="pdfgeneralpage|pdfua">Universal Accessibilit_y (PDF/UA)</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="pdfgeneralpage|pdfua|tooltip_text">Creates a universal accessibility-compliant PDF file that follows the requirements of PDF/UA (ISO 14289) specifications.</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|pdfua|tooltip_text">Creates a universal accessibility-compliant PDF file that follows the requirements of PDF/UA (ISO 14289) specifications.</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="pdfua-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|pdfua">Creates a universal accessibility-complying PDF file that follows the requirements of PDF/UA (ISO 14289) specifications.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
</object>
@@ -743,7 +815,7 @@
<child type="label">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label4">General</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -760,61 +832,67 @@
<child>
<object class="GtkFrame" id="frame7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=10 -->
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">3</property>
<child>
<object class="GtkCheckButton" id="bookmarks">
<property name="label" translatable="yes" context="pdfgeneralpage|bookmarks">Export outl_ines</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|bookmarks|tooltip_text">Export headings along with hyperlinked entries in Table of Contents as PDF bookmarks.</property>
<child internal-child="accessible">
<object class="AtkObject" id="bookmarks-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|bookmarks">Select to export bookmarks of Writer documents as PDF bookmarks. Bookmarks are created for all outline paragraphs (Tools - Chapter Numbering) and for all table of contents entries for which you did assign hyperlinks in the source document.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|bookmarks">PDF bookmarks are created for all paragraphs with outline level 1 or greater and for all “Table of Contents†entries with hyperlinks.</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="exportplaceholders">
<property name="label" translatable="yes" context="pdfgeneralpage|exportplaceholders">Expo_rt placeholders</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="exportplaceholders-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|exportplaceholders">Export the placeholders fields visual markings only. The exported placeholder is ineffective.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="comments">
<property name="label" translatable="yes" context="pdfgeneralpage|comments">Comm_ents as PDF annotations</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="comments-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|comments">Select to export comments of Writer and Calc documents as PDF annotations.</property>
@@ -822,104 +900,149 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="emptypages">
<property name="label" translatable="yes" context="pdfgeneralpage|emptypages">Exp_ort automatically inserted blank pages</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="emptypages-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|emptypages">If switched on, automatically inserted blank pages are exported to the PDF file. This is best if you are printing the pdf file double-sided. Example: In a book a chapter paragraph style is set to always start with an odd numbered page. If the previous chapter ends on an odd page, %PRODUCTNAME inserts an even numbered blank page. This option controls whether to export that even numbered page or not.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|emptypages">If switched on, automatically inserted blank pages are exported to the PDF file. This is best if you are printing the pdf file double-sided. Example: In a book a chapter paragraph style is set to always start with an odd numbered page. If the previous chapter ends on an odd page, then an even numbered blank page is normally automatically inserted. This option controls whether to export that even numbered page or not.</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">7</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="usereferencexobject">
<property name="label" translatable="yes" context="pdfgeneralpage|usereferencexobject">Use reference XObjects</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="usereferencexobject-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|usereferencexobject">When the option is enabled, then the reference XObject markup is used: viewers have to support this markup to show vector images. Otherwise a fallback bitmap is shown in the viewer.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">8</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="hiddenpages">
<property name="label" translatable="yes" context="pdfgeneralpage|hiddenpages">Export _hidden pages</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="hiddenpages-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|hiddenpages">Exports document hidden slides.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="notes">
<property name="label" translatable="yes" context="pdfgeneralpage|notes">Export _notes pages</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="notes-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|notes">Export also the Notes pages view at the end of the exported PDF presentation document.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="onlynotes">
<property name="label" translatable="yes" context="pdfgeneralpage|onlynotes">Export onl_y notes pages</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
<property name="margin-start">18</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="onlynotes-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|onlynotes">Exports only the Notes page views.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="singlepagesheets">
<property name="label" translatable="yes" context="pdfgeneralpage|singlepagesheets">Whole sheet export</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="singlepagesheets-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|singlepagessheets">Ignores each sheet’s paper size, print ranges and shown/hidden status and puts every sheet (even hidden sheets) on exactly one page, which is exactly as small or large as needed to fit the whole contents of the sheet.</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="commentsinmargin">
+ <property name="label" translatable="yes" context="pdfgeneralpage|commentsinmargin">_Comments in margin</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="commentsinmargin-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfgeneralpage|extended_tip|commentsinmargin">Select to export comments of Writer documents in the page margin.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">6</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
</object>
@@ -927,7 +1050,7 @@
<child type="label">
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label9">Structure</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -943,8 +1066,8 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
@@ -963,7 +1086,8 @@
<object class="GtkSizeGroup" id="sizegroupLabel">
<widgets>
<widget name="all"/>
- <widget name="range"/>
+ <widget name="pagerange"/>
+ <widget name="sheetrange"/>
<widget name="selection"/>
<widget name="losslesscompress"/>
<widget name="box3"/>
@@ -974,6 +1098,7 @@
<object class="GtkSizeGroup" id="sizegroupWidget">
<widgets>
<widget name="pages"/>
+ <widget name="sheets"/>
<widget name="qualityframe"/>
<widget name="resolution"/>
<widget name="watermarkentry"/>
diff --git a/filter/uiconfig/ui/pdflinkspage.ui b/filter/uiconfig/ui/pdflinkspage.ui
index eefc5fe21e5a..7e9ce16b77bf 100644
--- a/filter/uiconfig/ui/pdflinkspage.ui
+++ b/filter/uiconfig/ui/pdflinkspage.ui
@@ -1,58 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="flt">
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="PdfLinksPage">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">6</property>
+ <property name="border-width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkCheckButton" id="export">
- <property name="label" translatable="yes" context="pdflinkspage|export">Export outlines as named destinations</property>
+ <property name="label" translatable="yes" context="pdflinkspage|export">Export bookmarks as named destinations</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="image_position">right</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="tooltip_text" translatable="yes" context="pdflinkspage|export|tooltip_text">Enable the checkbox to export bookmarks in your document as named destinations in the PDF document.</property>
<child internal-child="accessible">
<object class="AtkObject" id="export-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="pdflinkspage|extended_tip|export">Exports the current file in PDF format.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdflinkspage|extended_tip|export">Enable the checkbox to export bookmarks in your document as named destinations in the PDF document. The destinations correspond to the location of your bookmarks. Use these destinations to create URL links that point to these locations in the PDF document.</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="convert">
<property name="label" translatable="yes" context="pdflinkspage|convert">_Convert document references to PDF targets</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="image_position">right</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="convert-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdflinkspage|extended_tip|convert">Enable this checkbox to convert the URLs referencing other ODF files to PDF files with the same name. In the referencing URLs the extensions .odt, .odp, .ods, .odg, and .odm are converted to the extension .pdf.</property>
@@ -60,19 +59,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="exporturl">
<property name="label" translatable="yes" context="pdflinkspage|exporturl">Export _URLs relative to file system</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="image_position">right</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="exporturl-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdflinkspage|extended_tip|exporturl">Enable this checkbox to export URLs to other documents as relative URLs in the file system. See "relative hyperlinks" in the Help.</property>
@@ -80,8 +78,8 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
</object>
@@ -89,7 +87,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdflinkspage|label1">General</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -106,26 +104,26 @@
<child>
<object class="GtkFrame" id="frame5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkRadioButton" id="default">
<property name="label" translatable="yes" context="pdflinkspage|default">Default mode</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="default-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdflinkspage|extended_tip|default">Links from your PDF document to other documents will be handled as it is specified in your operating system.</property>
@@ -133,18 +131,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="openpdf">
<property name="label" translatable="yes" context="pdflinkspage|openpdf">Open with PDF reader application</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">default</property>
<child internal-child="accessible">
<object class="AtkObject" id="openpdf-atkobject">
@@ -153,18 +151,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="openinternet">
<property name="label" translatable="yes" context="pdflinkspage|openinternet">Open _with Internet browser</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">default</property>
<child internal-child="accessible">
<object class="AtkObject" id="openinternet-atkobject">
@@ -173,8 +171,8 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
</object>
@@ -182,7 +180,7 @@
<child type="label">
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdflinkspage|label5">Cross-document Links</property>
<attributes>
<attribute name="weight" value="bold"/>
diff --git a/filter/uiconfig/ui/pdfsignpage.ui b/filter/uiconfig/ui/pdfsignpage.ui
index 9d7a8a643ab8..691c264dbc2a 100644
--- a/filter/uiconfig/ui/pdfsignpage.ui
+++ b/filter/uiconfig/ui/pdfsignpage.ui
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="flt">
<requires lib="gtk+" version="3.20"/>
<object class="GtkFrame" id="PdfSignPage">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">6</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="border-width">6</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=2 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=2 -->
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfsignpage|label2">Use this certificate to digitally sign PDF documents:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">cert</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">cert</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="cert">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
- <property name="activates_default">True</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="cert-atkobject">
@@ -55,25 +55,25 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="SelectClear">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton" id="select">
<property name="label" translatable="yes" context="pdfsignpage|select">Select...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="valign">center</property>
<child internal-child="accessible">
<object class="AtkObject" id="select-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="pdfsignpage|extended_tip|select">Opens the Select Certificate dialog.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfsignpage|extended_tip|select">Opens the Select X.509 Certificate dialog.</property>
</object>
</child>
</object>
@@ -87,10 +87,10 @@
<object class="GtkButton" id="clear">
<property name="label" translatable="yes" context="pdfsignpage|clear">_Clear</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="valign">center</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -100,31 +100,31 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=5 -->
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkEntry" id="password">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="visibility">False</property>
- <property name="activates_default">True</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="password-atkobject">
@@ -133,16 +133,16 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="location">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
- <property name="activates_default">True</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="location-atkobject">
@@ -151,16 +151,16 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="contact">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
- <property name="activates_default">True</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="contact-atkobject">
@@ -169,16 +169,16 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="reason">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
- <property name="activates_default">True</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="reason-atkobject">
@@ -187,98 +187,98 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="tsa">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="active">0</property>
<items>
<item translatable="yes" context="pdfsignpage|tsa">None</item>
</items>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfsignpage|label7">Certificate password:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">password</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">password</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfsignpage|label12">Location:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">location</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">location</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfsignpage|label13">Contact information:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">contact</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">contact</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label14">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfsignpage|label14">Reason:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">reason</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">reason</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfsignpage|label15">Time Stamp Authority:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">tsa</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">tsa</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
</object>
@@ -286,7 +286,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfsignpage|label1">Certificate</property>
<attributes>
<attribute name="weight" value="bold"/>
diff --git a/filter/uiconfig/ui/pdfuserinterfacepage.ui b/filter/uiconfig/ui/pdfuserinterfacepage.ui
index 7ec5bb5a6e7f..8a26abc85ac4 100644
--- a/filter/uiconfig/ui/pdfuserinterfacepage.ui
+++ b/filter/uiconfig/ui/pdfuserinterfacepage.ui
@@ -45,7 +45,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="image_position">right</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="center-atkobject">
@@ -65,7 +64,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="image_position">right</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="resize-atkobject">
@@ -85,7 +83,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="image_position">right</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="open-atkobject">
@@ -105,7 +102,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="image_position">right</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="display-atkobject">
@@ -157,7 +153,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="image_position">right</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="toolbar-atkobject">
@@ -177,7 +172,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="image_position">right</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="menubar-atkobject">
@@ -197,7 +191,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="image_position">right</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="window-atkobject">
@@ -248,7 +241,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="image_position">right</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="effects-atkobject">
@@ -321,7 +313,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">allbookmarks</property>
<accessibility>
diff --git a/filter/uiconfig/ui/pdfviewpage.ui b/filter/uiconfig/ui/pdfviewpage.ui
index 33ee039b5441..2e70dbd2ceca 100644
--- a/filter/uiconfig/ui/pdfviewpage.ui
+++ b/filter/uiconfig/ui/pdfviewpage.ui
@@ -1,57 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="flt">
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
<property name="upper">2147483647</property>
<property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="lower">50</property>
<property name="upper">1600</property>
<property name="value">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
<object class="GtkBox" id="PdfViewPage">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">6</property>
+ <property name="border-width">6</property>
<property name="spacing">12</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=4 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkRadioButton" id="pageonly">
<property name="label" translatable="yes" context="pdfviewpage|pageonly">_Page only</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="pageonly-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfviewpage|extended_tip|pageonly">Select to generate a PDF file that shows only the page contents.</property>
@@ -59,18 +59,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="outline">
<property name="label" translatable="yes" context="pdfviewpage|outline">Outl_ine and page</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">pageonly</property>
<child internal-child="accessible">
<object class="AtkObject" id="outline-atkobject">
@@ -79,18 +79,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="thumbs">
<property name="label" translatable="yes" context="pdfviewpage|thumbs">_Thumbnails and page</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">pageonly</property>
<child internal-child="accessible">
<object class="AtkObject" id="thumbs-atkobject">
@@ -99,37 +99,37 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfviewpage|label4">Open on pa_ge:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">page</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">page</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="page">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
- <property name="adjustment">adjustment1</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustment1</property>
<child internal-child="accessible">
<object class="AtkObject" id="page-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfviewpage|extended_tip|page">Select to show the given page when the reader opens the PDF file.</property>
@@ -137,14 +137,14 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
</object>
@@ -152,7 +152,7 @@
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfviewpage|label2">Panes</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -169,26 +169,26 @@
<child>
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=5 -->
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkRadioButton" id="fitdefault">
<property name="label" translatable="yes" context="pdfviewpage|fitdefault">_Default</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="fitdefault-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfviewpage|extended_tip|fitdefault">Select to generate a PDF file that shows the page contents without zooming. If the reader software is configured to use a zoom factor by default, the page shows with that zoom factor.</property>
@@ -196,18 +196,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="fitwin">
<property name="label" translatable="yes" context="pdfviewpage|fitwin">_Fit in window</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">fitdefault</property>
<child internal-child="accessible">
<object class="AtkObject" id="fitwin-atkobject">
@@ -216,18 +216,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="fitwidth">
<property name="label" translatable="yes" context="pdfviewpage|fitwidth">Fit _width</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">fitdefault</property>
<child internal-child="accessible">
<object class="AtkObject" id="fitwidth-atkobject">
@@ -236,44 +236,44 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="fitvis">
<property name="label" translatable="yes" context="pdfviewpage|fitvis">Fit _visible</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">fitdefault</property>
<child internal-child="accessible">
<object class="AtkObject" id="fitvis-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="pdfviewpage|extended_tip|fitvis">Select to generate a PDF file that shows the text and graphics on the page zoomed to fit the width of the reader's window.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfviewpage|extended_tip|fitvis">Select to generate a PDF file that shows the text and graphics on the page zoomed to fit the reader's window.</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkRadioButton" id="fitzoom">
<property name="label" translatable="yes" context="pdfviewpage|fitzoom">_Zoom factor:</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">fitdefault</property>
<accessibility>
<relation type="label-for" target="zoom"/>
@@ -285,20 +285,20 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="zoom">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
+ <property name="truncate-multiline">True</property>
<property name="adjustment">adjustment2</property>
<accessibility>
<relation type="labelled-by" target="fitzoom"/>
</accessibility>
- <property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="zoom-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfviewpage|extended_tip|zoom">Select a given zoom factor when the reader opens the PDF file.</property>
@@ -306,14 +306,14 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
</object>
@@ -321,7 +321,7 @@
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfviewpage|label3">Magnification</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -345,26 +345,26 @@
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=5 -->
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkRadioButton" id="defaultlayout">
<property name="label" translatable="yes" context="pdfviewpage|defaultlayout">D_efault</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="defaultlayout-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="pdfviewpage|extended_tip|defaultlayout">Select to generate a PDF file that shows the pages according to the layout setting of the reader software.</property>
@@ -372,18 +372,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="singlelayout">
<property name="label" translatable="yes" context="pdfviewpage|singlelayout">_Single page</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">defaultlayout</property>
<child internal-child="accessible">
<object class="AtkObject" id="singlelayout-atkobject">
@@ -392,18 +392,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="contlayout">
<property name="label" translatable="yes" context="pdfviewpage|contlayout">C_ontinuous</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">defaultlayout</property>
<child internal-child="accessible">
<object class="AtkObject" id="contlayout-atkobject">
@@ -412,18 +412,18 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="contfacinglayout">
<property name="label" translatable="yes" context="pdfviewpage|contfacinglayout">Co_ntinuous facing</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">defaultlayout</property>
<child internal-child="accessible">
<object class="AtkObject" id="contfacinglayout-atkobject">
@@ -432,28 +432,28 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="firstonleft">
<property name="label" translatable="yes" context="pdfviewpage|firstonleft">First page is _left</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="margin_top">6</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="margin-top">6</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="firstonleft-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="pdfviewpage|extended_tip|firstonleft">Select to generate a PDF file that shows pages side by side in a continuous column. For more than two pages, the first page is displayed on the left. You must enable support for complex text layout on Language settings - Languages in the Options dialog box.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="pdfviewpage|extended_tip|firstonleft">Select to generate a PDF file that shows pages side by side in a continuous column. For more than two pages, the first page is displayed on the left. You must enable support for complex text layout on Languages and Locales - General in the Options dialog box.</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
</object>
@@ -461,7 +461,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfviewpage|label1">Page Layout</property>
<attributes>
<attribute name="weight" value="bold"/>
diff --git a/filter/uiconfig/ui/warnpdfdialog.ui b/filter/uiconfig/ui/warnpdfdialog.ui
index 6ff3a2bc097b..21b455f00e99 100644
--- a/filter/uiconfig/ui/warnpdfdialog.ui
+++ b/filter/uiconfig/ui/warnpdfdialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.2 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="flt">
<requires lib="gtk+" version="3.20"/>
<object class="GtkTreeStore" id="liststore1">
@@ -13,78 +13,77 @@
</columns>
</object>
<object class="GtkMessageDialog" id="WarnPDFDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="type">popup</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="warnpdfdialog|WarnPDFDialog">Problems During PDF Export</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="type_hint">dialog</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="message_type">warning</property>
+ <property name="type-hint">dialog</property>
+ <property name="skip-taskbar-hint">True</property>
+ <property name="message-type">warning</property>
<property name="buttons">ok</property>
<property name="text" translatable="yes" context="warnpdfdialog|WarnPDFDialog">During PDF export the following problems occurred:</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="column_spacing">12</property>
- <property name="column_homogeneous">True</property>
+ <property name="column-spacing">12</property>
+ <property name="column-homogeneous">True</property>
<child>
<object class="GtkLabel" id="message">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="wrap">True</property>
- <property name="width_chars">30</property>
- <property name="max_width_chars">30</property>
+ <property name="width-chars">30</property>
+ <property name="max-width-chars">30</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="errors">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="vexpand">True</property>
<property name="model">liststore1</property>
- <property name="headers_visible">False</property>
- <property name="headers_clickable">False</property>
- <property name="search_column">1</property>
- <property name="show_expanders">False</property>
+ <property name="headers-visible">False</property>
+ <property name="headers-clickable">False</property>
+ <property name="search-column">1</property>
+ <property name="show-expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
@@ -112,8 +111,8 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
@@ -125,8 +124,5 @@
</child>
</object>
</child>
- <child>
- <placeholder/>
- </child>
</object>
</interface>
diff --git a/filter/uiconfig/ui/xmlfiltersettings.ui b/filter/uiconfig/ui/xmlfiltersettings.ui
index bf39cef493b6..f6fa60bc9755 100644
--- a/filter/uiconfig/ui/xmlfiltersettings.ui
+++ b/filter/uiconfig/ui/xmlfiltersettings.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="flt">
<requires lib="gtk+" version="3.20"/>
<object class="GtkTreeStore" id="liststore3">
@@ -13,28 +13,28 @@
</columns>
</object>
<object class="GtkDialog" id="XMLFilterSettingsDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="xmlfiltersettings|XMLFilterSettingsDialog">XML Filter Settings</property>
<property name="resizable">False</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="help-atkobject">
@@ -53,10 +53,10 @@
<object class="GtkButton" id="close">
<property name="label" translatable="yes" context="stock">_Close</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="close-atkobject">
@@ -74,32 +74,32 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="filterlist">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore3</property>
- <property name="search_column">0</property>
- <property name="show_expanders">False</property>
+ <property name="search-column">0</property>
+ <property name="show-expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library List-selection2"/>
</child>
@@ -146,21 +146,21 @@
<child>
<object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="homogeneous">True</property>
- <property name="layout_style">start</property>
+ <property name="layout-style">start</property>
<child>
<object class="GtkButton" id="new">
<property name="label" translatable="yes" context="xmlfiltersettings|new">_New...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="new-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|new">Opens a dialog with the name of a new filter.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|new">Opens a dialog for creating a new filter.</property>
</object>
</child>
</object>
@@ -174,12 +174,12 @@
<object class="GtkButton" id="edit">
<property name="label" translatable="yes" context="xmlfiltersettings|edit">_Edit...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="edit-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|edit">Opens a dialog with the name of the selected file.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|edit">Opens a dialog for editing the selected filter.</property>
</object>
</child>
</object>
@@ -193,12 +193,12 @@
<object class="GtkButton" id="test">
<property name="label" translatable="yes" context="xmlfiltersettings|test">_Test XSLTs...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="test-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|test">Opens a dialog with the name of the selected file.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|test">Opens a dialog for testing the selected filter.</property>
</object>
</child>
</object>
@@ -212,9 +212,9 @@
<object class="GtkButton" id="delete">
<property name="label" translatable="yes" context="xmlfiltersettings|delete">_Delete...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="delete-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|delete">Deletes the selected file after you confirm the dialog that follows.</property>
@@ -231,9 +231,9 @@
<object class="GtkButton" id="save">
<property name="label" translatable="yes" context="xmlfiltersettings|save">_Save as Package...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="save-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|save">Displays a Save as dialog to save the selected file as an XSLT filter package (*.jar).</property>
@@ -250,9 +250,9 @@
<object class="GtkButton" id="open">
<property name="label" translatable="yes" context="xmlfiltersettings|open">_Open Package...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="open-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|open">Displays an Open dialog to open a filter from an XSLT filter package (*.jar).</property>
@@ -285,9 +285,6 @@
<action-widget response="-11">help</action-widget>
<action-widget response="-7">close</action-widget>
</action-widgets>
- <child type="titlebar">
- <placeholder/>
- </child>
<child internal-child="accessible">
<object class="AtkObject" id="XMLFilterSettingsDialog-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltersettings|extended_tip|XMLFilterSettingsDialog">Opens the XML Filter Settings dialog, where you can create, edit, delete, and test filters to import and to export XML files.</property>
diff --git a/filter/uiconfig/ui/xmlfiltertabpagegeneral.ui b/filter/uiconfig/ui/xmlfiltertabpagegeneral.ui
index 6dda773f7daf..9a3e9ff5deb8 100644
--- a/filter/uiconfig/ui/xmlfiltertabpagegeneral.ui
+++ b/filter/uiconfig/ui/xmlfiltertabpagegeneral.ui
@@ -1,99 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="flt">
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="XmlFilterTabPageGeneral">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="spacing">12</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=5 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="xmlfiltertabpagegeneral|label2">_Filter name:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">filtername</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">filtername</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="xmlfiltertabpagegeneral|label3">_Application:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">application</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">application</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="xmlfiltertabpagegeneral|label4">_Name of file type:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">interfacename</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">interfacename</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="xmlfiltertabpagegeneral|label5">File _extension:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">extension</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">extension</property>
<property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="xmlfiltertabpagegeneral|label6">Comment_s:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">description</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">description</property>
<property name="xalign">1</property>
<property name="yalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="filtername">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="halign">start</property>
- <property name="activates_default">True</property>
- <property name="width_chars">38</property>
+ <property name="activates-default">True</property>
+ <property name="width-chars">38</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="filtername-atkobject">
@@ -102,36 +102,36 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="extension">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="halign">start</property>
- <property name="activates_default">True</property>
- <property name="width_chars">6</property>
+ <property name="activates-default">True</property>
+ <property name="width-chars">6</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="extension-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltertabpagegeneral|extended_tip|extension">Enter the file extension to use when you open a file without specifying a filter. %PRODUCTNAME uses the file extension to determine which filter to use.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="xmlfiltertabpagegeneral|extended_tip|extension">Enter the file extension to use when you open a file without specifying a filter. The file extension is used to determine which filter to use.</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="interfacename">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="halign">start</property>
- <property name="activates_default">True</property>
- <property name="width_chars">38</property>
+ <property name="activates-default">True</property>
+ <property name="width-chars">38</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="interfacename-atkobject">
@@ -140,21 +140,21 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="application">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">start</property>
- <property name="has_entry">True</property>
+ <property name="has-entry">True</property>
<child internal-child="entry">
<object class="GtkEntry" id="comboboxtext-entry">
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
- <property name="activates_default">True</property>
</object>
</child>
<child internal-child="accessible">
@@ -164,21 +164,21 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="description">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="accessible">
@@ -190,8 +190,8 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">4</property>
</packing>
</child>
</object>
diff --git a/filter/uiconfig/ui/xsltfilterdialog.ui b/filter/uiconfig/ui/xsltfilterdialog.ui
index d01b402e2920..2da5c670db8a 100644
--- a/filter/uiconfig/ui/xsltfilterdialog.ui
+++ b/filter/uiconfig/ui/xsltfilterdialog.ui
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="flt">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="XSLTFilterDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="xsltfilterdialog|XSLTFilterDialog">XML Filter: %s</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="stock">_OK</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -40,8 +40,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -54,8 +54,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="help-atkobject">
@@ -74,47 +74,23 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="scrollable">True</property>
- <property name="enable_popup">True</property>
+ <property name="enable-popup">True</property>
<child>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
+ <property name="can-focus">False</property>
<child>
<placeholder/>
</child>
@@ -123,42 +99,18 @@
<child type="tab">
<object class="GtkLabel" id="general">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="xsltfilterdialog|general">General</property>
</object>
<packing>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
<child>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
+ <property name="can-focus">False</property>
<child>
<placeholder/>
</child>
@@ -170,12 +122,12 @@
<child type="tab">
<object class="GtkLabel" id="transformation">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="xsltfilterdialog|transformation">Transformation</property>
</object>
<packing>
<property name="position">1</property>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
</object>
@@ -192,12 +144,9 @@
<action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget>
</action-widgets>
- <child type="titlebar">
- <placeholder/>
- </child>
<child internal-child="accessible">
<object class="AtkObject" id="XSLTFilterDialog-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="xsltfilterdialog|extended_tip|XSLTFilterDialog">Opens a dialog with the name of a new filter.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="xsltfilterdialog|extended_tip|XSLTFilterDialog">Opens a dialog for creating a new filter.</property>
</object>
</child>
</object>