tdf106792 Get rid of SvxShapePolyPolygonBezier

SvxShapePolyPolygonBezier was an implementation for the UNO
Shape group of polygons with bezier parts (filled/unfilled/
closed/open), e.g. com.sun.star.drawing.OpenBezierShape.
It was differing from SvxShapePolyPolygon just by supporting
drawing::PolyPolygonBezierCoords instead of the simple
drawing::PointSequenceSequence and some details.
This leads to problems - the ShapeType *does change* e.g.
when you edit a non-bezier Shape in Draw/Impress and change
parts to curve (also when closing, see ShapeTypes above).
This is why SvxShape::getShapeType() already detects this
identifier by using thze internal ShapePolyType (e.g.
OBJ_PATHLINE).
So there is no reason to have two separate UNO API imple-
mentations for sthe same type of SvxShape at all. Get rid
of the extra one and unify this implementation detail.
Also cleaned up double basegfx tooling for conversions of
UNO API Poly/bezier data and B2DPolygon.
Adapted test for "tdf113946.docx", see comment there.
Adapted test for "tdf90097.rtf", see comment there. Also
needed to use the Linux values, also check comment there.
Adapted test for "tdf105127.docx", see comment there.
Adapted test for "tdf85232.docx", see comment there.
Had to fic a problem with test for "tdf96674.docx"- the
adaption of the RotateAngle for line objects goes havoc
together with the UNO API when scaling is involved. That
old aGeo rotate stuff just kills the existing rotation due
to numerical inprecise stuff. The UNP API - in trying not
just to apply a rptation, but manipulate the existing one
then goes wrong in not re-getting the current rotation
value anymore. ARGH! This is the original reason for the
ols tdf#96674 task - i doubt that the additional code to
make a line not exactly hor/ver is needed.
Checked and it is not needed, thus removed the change from
tdf#96674 in shape.cxx.

Change-Id: I2bb8d4cfe33fee3671f3dad60e5c18609a394f9d
Reviewed-on: https://gerrit.libreoffice.org/56614
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
21 files changed
tree: c4465bf33aa2cda65511a2c094688522e9c9b43a
  1. .git-hooks/
  2. accessibility/
  3. android/
  4. animations/
  5. apple_remote/
  6. avmedia/
  7. basctl/
  8. basegfx/
  9. basic/
  10. bean/
  11. bin/
  12. binaryurp/
  13. bridges/
  14. canvas/
  15. chart2/
  16. cli_ure/
  17. codemaker/
  18. comphelper/
  19. compilerplugins/
  20. config_host/
  21. configmgr/
  22. connectivity/
  23. cppcanvas/
  24. cppu/
  25. cppuhelper/
  26. cpputools/
  27. cui/
  28. dbaccess/
  29. desktop/
  30. distro-configs/
  31. drawinglayer/
  32. dtrans/
  33. editeng/
  34. embeddedobj/
  35. embedserv/
  36. emfio/
  37. eventattacher/
  38. extensions/
  39. external/
  40. extras/
  41. filter/
  42. forms/
  43. formula/
  44. fpicker/
  45. framework/
  46. helpcompiler/
  47. hwpfilter/
  48. i18nlangtag/
  49. i18npool/
  50. i18nutil/
  51. icon-themes/
  52. idl/
  53. idlc/
  54. include/
  55. instsetoo_native/
  56. io/
  57. ios/
  58. javaunohelper/
  59. jurt/
  60. jvmaccess/
  61. jvmfwk/
  62. l10ntools/
  63. librelogo/
  64. libreofficekit/
  65. lingucomponent/
  66. linguistic/
  67. lotuswordpro/
  68. m4/
  69. mysqlc/
  70. nlpsolver/
  71. o3tl/
  72. odk/
  73. offapi/
  74. officecfg/
  75. onlineupdate/
  76. oovbaapi/
  77. oox/
  78. opencl/
  79. osx/
  80. package/
  81. postprocess/
  82. pyuno/
  83. qadevOOo/
  84. readlicense_oo/
  85. registry/
  86. remotebridges/
  87. reportbuilder/
  88. reportdesign/
  89. ridljar/
  90. sal/
  91. salhelper/
  92. sax/
  93. sc/
  94. scaddins/
  95. sccomp/
  96. schema/
  97. scp2/
  98. scripting/
  99. sd/
  100. sdext/
  101. setup_native/
  102. sfx2/
  103. shell/
  104. slideshow/
  105. smoketest/
  106. solenv/
  107. soltools/
  108. sot/
  109. starmath/
  110. stoc/
  111. store/
  112. svgio/
  113. svl/
  114. svtools/
  115. svx/
  116. sw/
  117. swext/
  118. sysui/
  119. test/
  120. testtools/
  121. toolkit/
  122. tools/
  123. ucb/
  124. ucbhelper/
  125. udkapi/
  126. uitest/
  127. UnoControls/
  128. unodevtools/
  129. unoidl/
  130. unoil/
  131. unotest/
  132. unotools/
  133. unoxml/
  134. ure/
  135. uui/
  136. vbahelper/
  137. vcl/
  138. winaccessibility/
  139. wizards/
  140. writerfilter/
  141. writerperfect/
  142. xmerge/
  143. xmlhelp/
  144. xmloff/
  145. xmlreader/
  146. xmlscript/
  147. xmlsecurity/
  148. .buckconfig
  149. .buckversion
  150. .clang-format
  151. .editorconfig
  152. .gitattributes
  153. .gitignore
  154. .gitmodules
  155. .gitreview
  156. autogen.sh
  157. BUCK
  158. config.guess
  159. config.sub
  160. config_host.mk.in
  161. config_host_lang.mk.in
  162. configure.ac
  163. COPYING
  164. COPYING.LGPL
  165. COPYING.MPL
  166. download.lst
  167. g
  168. install-sh
  169. leak-suppress.txt
  170. Library_merged.mk
  171. lo.xcent.in
  172. logerrit
  173. Makefile.fetch
  174. Makefile.gbuild
  175. Makefile.in
  176. README.cross
  177. README.md
  178. README.Solaris
  179. Repository.mk
  180. RepositoryExternal.mk
  181. RepositoryFixes.mk
  182. RepositoryModule_build.mk
  183. RepositoryModule_host.mk
  184. sanitize-ubsan-blacklist
  185. TEMPLATE.SOURCECODE.HEADER
README.md

LibreOffice

Coverity Scan Build Status CII Best Practices

LibreOffice is an integrated office suite based on copyleft licenses and compatible with most document formats and standards. Libreoffice is backed by The Document Foundation, which represents a large independent community of enterprises, developers and other volunteers moved by the common goal of bringing to the market the best software for personal productivity. LibreOffice is open source, and free to download, use and distribute.

A quick overview of the LibreOffice code structure.

Overview

You can develop for LibreOffice in one of two ways, one recommended and one much less so. First the somewhat less recommended way: it is possible to use the SDK to develop an extension, for which you can read the API docs here and here. This re-uses the (extremely generic) UNO APIs that are also used by macro scripting in StarBasic.

The best way to add a generally useful feature to LibreOffice is to work on the code base however. Overall this way makes it easier to compile and build your code, it avoids any arbitrary limitations of our scripting APIs, and in general is far more simple and intuitive - if you are a reasonably able C++ programmer.

The build chain and runtime baselines

These are the current minimal operating system and compiler versions to run and compile LibreOffice, also used by the TDF builds:

  • Windows:
    • Runtime: Windows 7
    • Build: Cygwin + Visual Studio 2015 Update 3
  • macOS:
    • Runtime: 10.9
    • Build: 10.12 + Xcode 8
  • Linux:
    • Runtime: RHEL 6 or CentOS 6
    • Build: GCC 4.8.1 or Clang
  • iOS (only for LibreOfficeKit):
    • Runtime: 11.4 (only support for newer i devices == 64 bit)
    • Build: Xcode 9.3 and iPhone SDK 11.4

At least Clang 3.4.2 is known to be too old to pass the configure.ac check "whether $CXX supports C++17, C++14, or C++11" in its current form (due to the #pragma GCC diagnostic ignored "-Wpragmas" that it does not understand).

If you want to use Clang with the LibreOffice compiler plugins, the minimal version of Clang is 3.8. Since Xcode doesn't provide the compiler plugin headers, you have to compile your own Clang to use them on macOS.

You can find the TDF configure switches in the distro-configs/ directory.

To setup your initial build environment on Windows and macOS, we provide the LibreOffice Development Environment (LODE) scripts.

For more information see the build instructions for your platform in the TDF wiki.

The important bits of code

Each module should have a README file inside it which has some degree of documentation for that module; patches are most welcome to improve those. We have those turned into a web page here:

https://docs.libreoffice.org/

However, there are two hundred modules, many of them of only peripheral interest for a specialist audience. So - where is the good stuff, the code that is most useful. Here is a quick overview of the most important ones:

ModuleDescription
sal/this provides a simple System Abstraction Layer
tools/this provides basic internal types: 'Rectangle', 'Color' etc.
vcl/this is the widget toolkit library and one rendering abstraction
frameworkUNO framework, responsible for building toolbars, menus, status bars, and the chrome around the document using widgets from VCL, and XML descriptions from /uiconfig/ files
sfx2/legacy core framework used by Writer/Calc/Draw: document model / load/save / signals for actions etc.
svx/drawing model related helper code, including much of Draw/Impress

Then applications

ModuleDescription
desktop/this is where the 'main' for the application lives, init / bootstrap. the name dates back to an ancient StarOffice that also drew a desktop
sw/Writer
sc/Calc
sd/Draw / Impress

There are several other libraries that are helpful from a graphical perspective:

ModuleDescription
basegfx/algorithms and data-types for graphics as used in the canvas
canvas/new (UNO) canvas rendering model with various backends
cppcanvas/C++ helper classes for using the UNO canvas
drawinglayer/View code to render drawable objects and break them down into primitives we can render more easily.

Rules for #include directives (C/C++)

Use the "..." form if and only if the included file is found next to the including file. Otherwise, use the <...> form. (For further details, see the mail Re: C[++]: Normalizing include syntax ("" vs <>).)

The UNO API include files should consistently use double quotes, for the benefit of external users of this API.

Finding out more

Beyond this, you can read the README files, send us patches, ask on the mailing list libreoffice@lists.freedesktop.org (no subscription required) or poke people on IRC #libreoffice-dev on irc.freenode.net - we're a friendly and generally helpful mob. We know the code can be hard to get into at first, and so there are no silly questions.