summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)AuthorFilesLines
2019-11-20warn on load when a document binds an event to a macroCaolán McNamara2-2/+15
a) treat shared/Scripts equivalently to document scripts This doesn't automatically warn/block running those scripts when used in a freshly loaded document on its own however because DocumentMacroMode::checkMacrosOnLoading will see at... if ( m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() ) that the document contains no macros and flip the allow macros flag to true so that potentially new uses of macros added by the user during the edit are allowed to run b) so, add an additional flag to indicate existence of use of macros in a document c) for odf import, set it when a script:event-listener tag is encountered d) for html import when registerScriptEvents or SwFormatINetFormat::SetMacroTable is called e) for doc import when Read_F_Macro or StoreMacroCmds is called as well for good measure f) for xls import when registerScriptEvent or ScMacroInfo::SetMacro is called g) for oox import when VbaProject::attachMacros is called Reviewed-on: https://gerrit.libreoffice.org/77387 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 35fe064a67b54b0680b4845477c9b8751edda160) Change-Id: Ic1203d8ec7dfc217aa217135033ae9db2888e19b
2019-02-06tdf#118879 don't embed base64 image data if we have an origin URLTomaž Vajngerl1-2/+6
If an Graphic has an OriginURL it means it was created from an external source. We want to preserve this so we don't want to add the image base64 data - used in Flat ODF format. Reviewed-on: https://gerrit.libreoffice.org/67338 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 36aa3f4d6f9e9da7289ed760cfb1e87600cb6459) Change-Id: I2782ec53cf8dc78b0c360365d3eed3e5c54bf271 Reviewed-on: https://gerrit.libreoffice.org/67350 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-01-15tdf#112782: data-pilot-source is invalid in odf1.2 strictJulien Nabet1-1/+1
Change-Id: Ie24c416cb9ba8de904bf6e725a60b62ce7787596 Reviewed-on: https://gerrit.libreoffice.org/65742 (cherry picked from commit 18b9f23f13fd503e94d669ab80b5d2354d1817a1) Reviewed-on: https://gerrit.libreoffice.org/65885 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-12-31tdf#122335: sub-view-size can only be used with ODF ver > 1.2Julien Nabet1-0/+5
Change-Id: I7dd767fddd11319017a215c240684dcc17238c4e Reviewed-on: https://gerrit.libreoffice.org/65627 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-12-12address forward incompatibility of InputRequired default changeLionel Elie Mamane3-4/+5
commit fec8c14e960fbcd639a04d6c3354caff2d0bd365 changed the default value of InputRequired as read from the file; that is the value InputRequired has when it is set to neither false nor true in the file This is to mitigate the fact that InputRequired was not property enforced and now suddenly is, but its default value was "true"! So lots of past forms have InputRequired==true everywhere, users did not pay attention to it because it was not enforced, and now it is enforced, which suddenly is a huge PITA for users because they have to update most controls in all forms. Since older versions of LibreOffice omitted the input-required attribute in the file (the XML stream) when it had its then-default value (namely "true"), we changed that to now mean "false". As a side-effect, newer LibreOffice omits the attribute in the XML stream when InputRequired has its new default value, namely "false". So the situation is that any file saved with an older LibreOffice will have all its form controls with InputRequired==false when opened with a newer LibreOffice, and any file saved with a newer LibreOffice will have all its form controls with InputRequired==true when opened with an older LibreOffice. This commit makes LibreOffice always write the XML attribute. So that any file saved with a newer LibreOffice will have the same InputRequired values when opened in an older LibreOffice. This enhances forward compatibility, because InputRequired was enforced in older versions when the underlying database field was marked NOT NULL. So the current situation leads to unwanted enforcement in older LibreOffice versions, with a file that is saved from newer LibreOffice with a control having InputRequired==false and bound to a database field marked NOT NULL. This commit fixes that, by ensuring that any form control with InputRequired==false in newer LibreOffice will also have InputRequired==false in older LibreOffice. Change-Id: I92ef48ad99c4e2ead43e95376282cc861c181ab3 Reviewed-on: https://gerrit.libreoffice.org/64641 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2018-11-09tdf#121188 form controls should have InputRequired false by defaultLionel Elie Mamane1-1/+1
Unless the underlying column is not nullable and has no default value this is only a guess, form designer can change it Change-Id: Ifa403e00b21fdaf86aef383503d54879b25ac62b Reviewed-on: https://gerrit.libreoffice.org/62968 Tested-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Tamás Bunth <btomi96@gmail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-20tdf#118502 Fix loading of eps images with replacement graphicSamuel Mehrbrodt1-0/+4
Change-Id: Iaf9c8e2ed72115e1f82d2541ae2a1d4803795a46 Reviewed-on: https://gerrit.libreoffice.org/60754 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2018-09-14tdf#118500 Impress losing slide transition sound on savingSamuel Mehrbrodt1-28/+31
This reverts commit b223028d65d24ffcd8e27974c29c2744a5df6227. Change-Id: Iac12092a4f6b0edb3b6a5228ed17e7d0c1794357 Reviewed-on: https://gerrit.libreoffice.org/60391 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 61bc0d058dd95961761056a104ecd729ddfa4a82) Reviewed-on: https://gerrit.libreoffice.org/60399 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-09-11tdf#109229: Set "TextBox" prop before filling textbox-related propsMike Kaganski1-5/+9
Otherwise those properties aren't set, and defaults are used Change-Id: Ib6671c019ff652ec5b59d9cbbf02a4e536a17817 Reviewed-on: https://gerrit.libreoffice.org/60267 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit c3422cd205d8da852f5c310b5f08028d6c4c5eb4) Reviewed-on: https://gerrit.libreoffice.org/60299 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-09-10tdf#114400 Import drawoo:fontwork-xyz attributesIlhan Yesil1-0/+15
Either the document has attributes in the old namespace or in the new, both will be imported. But export is still in the old namespace. Change-Id: I9f4d1ca0d8af37c13b513f99cc7d254c68867bb2 Reviewed-on: https://gerrit.libreoffice.org/59405 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 278e66488135c8fa2714520d056573c64ea803cf) Reviewed-on: https://gerrit.libreoffice.org/60206 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-17Resolves: tdf#119013 do not over-aggressively reorder date particlesEike Rathke1-1/+1
In particular not when reading documents as we don't know what the original (default/system) locale was when the date format was created and stored and whether the format's date order actually matched the locale's ordering. Regression from commit 51478cefaa4e265b42e3f67eda0a64767ff3efba CommitDate: Tue Apr 18 17:01:27 2017 +0200 Resolves: tdf#107012 follow date order of the target locale Change-Id: I9d3bdbd512d95ed81ff6459e368a2d7497ec8a2d Reviewed-on: https://gerrit.libreoffice.org/59182 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 5b8007afdb97d416ee7c22bf9226e927d61e9bd3) Reviewed-on: https://gerrit.libreoffice.org/59215 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-07tdf#117261 xmloff: ODF import: convert form:connection-resource URLMichael Stahl1-1/+1
... to absolute on import. (regression from fbb3b60cdb7a22595eec80232bb3ccd83781cf00) Change-Id: I2cd046e44489da86d3d67ff5df6cbad13e8265d0 Reviewed-on: https://gerrit.libreoffice.org/57076 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins (cherry picked from commit 510209df4bcf457cac819e75889d564d620f119d) Reviewed-on: https://gerrit.libreoffice.org/57092 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-28tdf#117904 Don't allow copying signed shapesSamuel Mehrbrodt1-0/+7
Instead just copy the "unsigned" graphic Change-Id: I5183b0b33be0469dceaace142d73aa403cc32ef2 Reviewed-on: https://gerrit.libreoffice.org/56472 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 79e434948d65dd9eba150bc986e968bcb3754631) Reviewed-on: https://gerrit.libreoffice.org/56510 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-11Derive NativeNumberXmlAttributes2 from NativeNumberXmlAttributes, tdf#115007 ↵Eike Rathke1-16/+29
follow-up Also ensure that transliteration-spellout and (transliteration-format,transliteration-style) are mutually exclusive and transliteration-spellout is only written if ODF version is >1.2, namespace 'loext' for 1.2 with extensions and namespace 'number' in anticipation of ODF 1.3 (may need to be adapted). Change-Id: I371dee8883ecb0d4638510c92b4bf59acd09f636 Reviewed-on: https://gerrit.libreoffice.org/55491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 807d4382cb021d2ac3ea99d6757a7b368a32941d) Reviewed-on: https://gerrit.libreoffice.org/55626 Tested-by: Eike Rathke <erack@redhat.com> Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2018-06-11tdf#115007: add import/export to NatNum12 (spell out numbers,László Németh4-18/+53
dates and money amounts, supporting all the XNumberText/libnumbertext formatting codes, for example "ordinal", "ordinal-number", "ordinal-feminine", etc., and ISO 4217 currency codes, also their possible combinations. NatNum12 formatting codes are stored by using the newly introduced (yet, loext:)transliteration-spellout attribute. creator-initials also added to token list Change-Id: I20f93c9d16778f142067a56d53b336d0acbe2d92 Reviewed-on: https://gerrit.libreoffice.org/54673 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 32f1c56d8ff5e6f87dbcf086fd3743d6d36182bc) Reviewed-on: https://gerrit.libreoffice.org/55625 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: László Németh <nemeth@numbertext.org>
2018-05-31Load ODF signature line signed imagesSamuel Mehrbrodt1-0/+65
Change-Id: I7684d4747c4977103fcc3dca62f5d1c28a0836bf Reviewed-on: https://gerrit.libreoffice.org/55056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 4315aea624635af540cdc5a497f5a9b607f52f2b) Reviewed-on: https://gerrit.libreoffice.org/55066 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-05-22vbahelper, xmloff: Ask current datetime only onceTakeshi Abe1-4/+4
Change-Id: I930983fab11d30f0887965fe30b07c5ac6eef8ef Reviewed-on: https://gerrit.libreoffice.org/54651 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-20Fix typosAndrea Gelmini1-6/+6
Change-Id: Ia2c768f519a4131b26f38243a64179a39771eb00 Reviewed-on: https://gerrit.libreoffice.org/54576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-17crashtesting: assert on fdo62508-1.odtCaolán McNamara2-4/+12
document, with meta:generator of "opxml2odf - Version KO 0.1" has a styles.xml xmlns of... xmlns:ofo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" instead of the usual xmlns:fo=... use the importer namespace map to get the importers namespace prefix for the fastparser namespace uri for the token Change-Id: Ib633009f6c2b7dae5a3ceb1c921adfff84e21150 Reviewed-on: https://gerrit.libreoffice.org/52720 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-17New o3tl::temporary to simplify calls of std::modfStephan Bergmann1-3/+2
...that ignore the out-parameter integral part Change-Id: I05f07c1a8909023232f8aecf75ea5541d4eb81ca Reviewed-on: https://gerrit.libreoffice.org/54474 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-17Avoid warning C4101 with some over-eager MSVCStephan Bergmann1-0/+1
<https://ci.libreoffice.org/job/lo_tb_master_win/17664/console>: > C:/cygwin/home/tdf/lode/jenkins/workspace/lo_tb_master_win/xmloff/source/forms/propertyimport.cxx(189): error C2220: warning treated as error - no 'object' file generated > C:/cygwin/home/tdf/lode/jenkins/workspace/lo_tb_master_win/xmloff/source/forms/propertyimport.cxx(189): warning C4101: 'dummy': unreferenced local variable Change-Id: Ic80aee5b9c7af44bf87081492008a6ec30fcfe1c
2018-05-17loplugin:redundantcast improvements for floating-integer conversionsStephan Bergmann1-1/+6
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016 Reviewed-on: https://gerrit.libreoffice.org/54416 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-16loplugin:constantparamNoel Grandin1-9/+8
Change-Id: I0110e0c662004456e4bc8f8082e2e2fea59e0148 Reviewed-on: https://gerrit.libreoffice.org/54385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-11Only write mime-type attribute if ODF version > 1.2Samuel Mehrbrodt1-1/+1
Change-Id: I88ae821e969a2c45161f59eb2e667f645f1afdac Reviewed-on: https://gerrit.libreoffice.org/54075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-10Only write signatureline element if ODF version > 1.2Samuel Mehrbrodt1-1/+2
Change-Id: I28769e8e3f4d5a0daa54fa188a9aec56c31120ca Reviewed-on: https://gerrit.libreoffice.org/54074 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-08OFFICE-3776 xmloff: adapt ODF import to renamed text:sender-initialsMichael Stahl6-6/+15
ODF TC decided to rename the element to meta:creator-initials, so adapt the import so it can read this in addition to the 2 element names produced by current and past LO versions. Also add a test. Unfortunately it turned out that the ODF validator had a bug in checking character data in foreign elements, which is triggered by the test document, see https://issues.apache.org/jira/browse/ODFTOOLKIT-475 ... so update the validator jar as well. Change-Id: I1de1e8772b41f8937f043d9a0d150e169f25ffd4 Reviewed-on: https://gerrit.libreoffice.org/53979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-05-05Fix typosAndrea Gelmini1-1/+1
Change-Id: I92078fdece135754744d85424956dbb071f3899e Reviewed-on: https://gerrit.libreoffice.org/53638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-30loplugin:useuniqueptr in XMLTextParagraphExportNoel Grandin2-8/+7
Change-Id: I753bbfc60172a36e1f3ba08398dc17ee14e0c551 Reviewed-on: https://gerrit.libreoffice.org/53604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-27Fix typosAndrea Gelmini2-2/+2
Change-Id: I32c0966f8489d58f02b32bf205aedbb8303a217d Reviewed-on: https://gerrit.libreoffice.org/53432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-04-26[API CHANGE] deprecate XGraphicObjectResolverTomaž Vajngerl2-51/+35
XGraphicObjectResolver was used to get the GraphicObject URL from an storage (package) URL. This isn't possible anymore in LO 6.1 since creating GraphicObject from uniqueID was removed for its lifecycle issues. XGraphicObjectResolver is now deprecated and when the "resolveGraphicObjectURL" is called, it throws a RuntimeExeption. In places where XGraphicObjectResolver was used, we now use the XGraphicStorageHandler as the alternative. Both share a common implementation so previously we could cast one to the other at any time. Now only XGraphicStorageHandler is used. GraphicObjectResolver was removed and replaced by the alternative GraphicStorageHandler for instance creation - where needed. Change-Id: I5d3f759c6f95b7dbe2d93688d99c8aa4899ffa84 Reviewed-on: https://gerrit.libreoffice.org/53279 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-21cppcheck: identicalInnerConditionJochen Nitschke1-13/+11
renamed temporary list in EnhancedCustomShape2d.cxx to avoid shadow of a local variable Change-Id: I17a2261dafd2067480fcc5314af4f48765d6b690 Reviewed-on: https://gerrit.libreoffice.org/53244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-19tdf#117075 TOC numberings have incorrect right indentNoel Grandin9-3/+27
This reverts parts of commit 867a22fd199e732803c9050fe9f84ad630ec27fb Date: Wed Mar 28 10:00:30 2018 +0200 loplugin:virtualdown in xmloff/xmlsecurity and commit 73e6a7975b3508c5cfccb3df7c35b0303f87d9bb Date: Thu Mar 29 09:35:22 2018 +0200 loplugin:unusedmethods Change-Id: Id4230fafc10bbfe5822f7011a1b1d3d9dff30735 Reviewed-on: https://gerrit.libreoffice.org/53149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-16Make linked graphic register into LinkedManager againTomaž Vajngerl1-12/+4
Change-Id: I16b162f86d6221d120f6355f9a52c1abfcd0ac73 Reviewed-on: https://gerrit.libreoffice.org/52911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-15remove some unused comphelper includesJochen Nitschke9-9/+0
and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-11new loplugin:unusedvariablemoreNoel Grandin1-3/+0
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-10xmloff: fix leak in XMLPropertySetMapperEntry_ImplMichael Stahl1-3/+7
The XMLNamedBoolPropertyHdl should be owned by OControlPropertyHandlerFactory like all the other handlers created in that function. Thanks to Julien Nabet for pointing out the problem. Change-Id: Id474b2fdb84ca74f686d0c888fbedbee623c31bb Reviewed-on: https://gerrit.libreoffice.org/52666 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-04-09use more DBG_UNHANDLED_EXCEPTIONNoel Grandin7-24/+31
so we get nice logs of the exception dynamic type for UNO exceptions. Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb Reviewed-on: https://gerrit.libreoffice.org/52465 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-08tdf#112384 sw: Allow New line as a label followed by chapter numberingNithin Kumar Padavu4-2/+19
reference-language also added to token list Change-Id: I32713508d3611dc2bce10b2c5abb1e1a4167bdaf Reviewed-on: https://gerrit.libreoffice.org/52561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-07SOSAW080: Added first bunch of basic changes to helpersArmin Le Grand1-36/+3
SOSAW080: Make SdrModel& prerequisite to SdrObjects Added need for SdrModel& in constructors of SdrModel, SdrPage, SdrView and SdrObjList. Builds, not finished. SOSAW080: removed and replaced old SdrModel Removed and replaced GetModel()/SetModel() in all using classes (SdrObject, SdrPage, SdrView), added accessors to new referenced SdrModel, adapted all accessing places. Refactored/Extended ::Clone and ::operator== for these classes to allow cloning objects to a target SdrModel. Adapted places where this is done AFAP. Added quite some comments (tagged with 'TTTT') where possible further work is needed. Builds completely, thus checking in. This does not mean that this change is done yet. SOSAW080: Adapted SdrPage/SdrModel relationship Also needed to work on copy-construction of SdrPage and hierarchy, quite some stuff removed, no copy-constructor anymore, no MigrateItemPool stuff. Builds well, test stuck, will need some cleanup/finetunung SOSAW080: Smaller corrections/includes adapted SOSAW080: Smaller corrections/includes adapted SOSAW080: Debugging/Stabilizing/MakeUnitTestWork SOSAW080: Stabilized for UnitTests, cleanups SOSAW080: Adapted GetObjGraphic to just take a const SdrObject& SOSAW080: Removed ChangeModel from classes Classes SvxTextEditSource and SvxDrawPage (including TextEditSource stuff) do not need change of SdrModel anymore. SOSAW080: Adapted some comments to make more readable SOSAW080: Corrected constructor SOSAW080: getSdrModelFromUnoModel added override marks SOSAW080: Added missing includes SOSAW080: Corrected SdrPage constructor SOSAW080: Corrected some SdrObject::Clone scenarios Especially when cloning to another SdrModel and taking the sdr::properties into account. SOSAW080: Added include for Mac-Build SOSAW080: Added Scale to DefaultProperties If a SdrModel change happens in DefaultProperties copy constructor (used from Clone()), potentially a Scale for the SfxItems has to be done. SOSAW080: Added missing include for MacBuild SOSAW080: Corrected CppunitTest_sc_anchor_test An adaption of a SdrPathObj instantiation was missing, added that. Seems as if that test is no tpart of the usual 'make' scenario, but used/executed in gerrit builds SOSAW080: Reworked SvxShape to use SdrObject's SdrModel SOSAW080: Reworked SvxShape to use SdrObject's SdrModel SOSAW080: Free SdrObjects when SdrModel goes down In an UNO API test problem is that SvxShapes reference SdrShapes, but these are not added to a SdrPage and not 'owned' by the SvxShape. Thus these do not get deleted at all (same in master, memory leak). I extended SvxShape::Notify the case for ModelCleared to also Free the SdrObject when not owner and it's not added to a SdrPage (in that case it gets deleted with deleting the SdrModel) SOSAW080: Solve UNO API calls that move SvxShapes to other Model Due to UNO API tests I got a call to insert an xShape to a xDrawPage which was constructed in another Model, this has now to be done by Cloning the SdrObject to the new SdrModel, getting rid of the old one and getting all the UNO implementation stuff right (referemces SdrObject <-> xShape). 1cb7d573d323e98a89761fe662c10c4a654fdec0 24617494a0ef79f6e33dfcb02782a833a81c6434 763f39094b6a48b529a6952d01468f8776c97679 242b9e228a9a042c3a5bdd38b1ea6600144276d5 242b9e228a9a042c3a5bdd38b1ea6600144276d5 33a6f3f306b70c223171aef796dd5ee041ad14df 6878b33f8b05738a44c0910e40a60a0f0d1d58ed 0a636caf3cb36c2f9c6cd11aa22cb9bc435dc8f2 8c4626274a5cc531dad27f27c0c45d4c528fb2fb 446685a49a6d67aedd01cfbbd5e87b07f97a4d7b c1b5ed3c99bc7219a0061e4ece24ea42afd2889a 22de9a1c8af7c25be5c108671ddc548ba323ed47 4caf6b6fbbe6e8130741d793dffb560fd01d4ed5 488b9601735ec1822433f82f633990063951fe08 c366d60299f239e3df856ddffedb19e743e4be0c c5137ba8c597c7b5f90318df50e87b93a39a28dc f9e646242cf89f6fde1315046952252a2c429779 f830fbc5fadd89d04be5edd2a5abf9b0d4bf0410 1694b54903df784385abaa8452e1201e12344238 17bcb44d2e29920c0c74430c2d9c703b36cfa0ad 17bcb44d2e29920c0c74430c2d9c703b36cfa0ad 7b5c241faec7488924e5935ae8b19f785846b5e4 bf097ee7467895823fbd158a2a9543da3b5a5078 Change-Id: Iaf53535de0502a481466be74a1768bbb39f0e78c Reviewed-on: https://gerrit.libreoffice.org/52526 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-04-06Revert "SOSAW080: Added first bunch of basic changes to helpers"Armin Le Grand1-3/+36
This reverts commit 6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91.
2018-04-06SOSAW080: Added first bunch of basic changes to helpersArmin Le Grand1-36/+3
SOSAW080: Make SdrModel& prerequisite to SdrObjects Added need for SdrModel& in constructors of SdrModel, SdrPage, SdrView and SdrObjList. Builds, not finished. SOSAW080: removed and replaced old SdrModel Removed and replaced GetModel()/SetModel() in all using classes (SdrObject, SdrPage, SdrView), added accessors to new referenced SdrModel, adapted all accessing places. Refactored/Extended ::Clone and ::operator== for these classes to allow cloning objects to a target SdrModel. Adapted places where this is done AFAP. Added quite some comments (tagged with 'TTTT') where possible further work is needed. Builds completely, thus checking in. This does not mean that this change is done yet. SOSAW080: Adapted SdrPage/SdrModel relationship Also needed to work on copy-construction of SdrPage and hierarchy, quite some stuff removed, no copy-constructor anymore, no MigrateItemPool stuff. Builds well, test stuck, will need some cleanup/finetunung SOSAW080: Smaller corrections/includes adapted SOSAW080: Smaller corrections/includes adapted SOSAW080: Debugging/Stabilizing/MakeUnitTestWork SOSAW080: Stabilized for UnitTests, cleanups SOSAW080: Adapted GetObjGraphic to just take a const SdrObject& SOSAW080: Removed ChangeModel from classes Classes SvxTextEditSource and SvxDrawPage (including TextEditSource stuff) do not need change of SdrModel anymore. SOSAW080: Adapted some comments to make more readable SOSAW080: Corrected constructor SOSAW080: getSdrModelFromUnoModel added override marks SOSAW080: Added missing includes SOSAW080: Corrected SdrPage constructor SOSAW080: Corrected some SdrObject::Clone scenarios Especially when cloning to another SdrModel and taking the sdr::properties into account. SOSAW080: Added include for Mac-Build SOSAW080: Added Scale to DefaultProperties If a SdrModel change happens in DefaultProperties copy constructor (used from Clone()), potentially a Scale for the SfxItems has to be done. SOSAW080: Added missing include for MacBuild SOSAW080: Corrected CppunitTest_sc_anchor_test An adaption of a SdrPathObj instantiation was missing, added that. Seems as if that test is no tpart of the usual 'make' scenario, but used/executed in gerrit builds SOSAW080: Reworked SvxShape to use SdrObject's SdrModel SOSAW080: Reworked SvxShape to use SdrObject's SdrModel SOSAW080: Free SdrObjects when SdrModel goes down In an UNO API test problem is that SvxShapes reference SdrShapes, but these are not added to a SdrPage and not 'owned' by the SvxShape. Thus these do not get deleted at all (same in master, memory leak). I extended SvxShape::Notify the case for ModelCleared to also Free the SdrObject when not owner and it's not added to a SdrPage (in that case it gets deleted with deleting the SdrModel) SOSAW080: Solve UNO API calls that move SvxShapes to other Model Due to UNO API tests I got a call to insert an xShape to a xDrawPage which was constructed in another Model, this has now to be done by Cloning the SdrObject to the new SdrModel, getting rid of the old one and getting all the UNO implementation stuff right (referemces SdrObject <-> xShape). Change-Id: Iaf53535de0502a481466be74a1768bbb39f0e78c 1cb7d573d323e98a89761fe662c10c4a654fdec0 24617494a0ef79f6e33dfcb02782a833a81c6434 763f39094b6a48b529a6952d01468f8776c97679 242b9e228a9a042c3a5bdd38b1ea6600144276d5 242b9e228a9a042c3a5bdd38b1ea6600144276d5 33a6f3f306b70c223171aef796dd5ee041ad14df 6878b33f8b05738a44c0910e40a60a0f0d1d58ed 0a636caf3cb36c2f9c6cd11aa22cb9bc435dc8f2 8c4626274a5cc531dad27f27c0c45d4c528fb2fb 446685a49a6d67aedd01cfbbd5e87b07f97a4d7b c1b5ed3c99bc7219a0061e4ece24ea42afd2889a 22de9a1c8af7c25be5c108671ddc548ba323ed47 4caf6b6fbbe6e8130741d793dffb560fd01d4ed5 488b9601735ec1822433f82f633990063951fe08 c366d60299f239e3df856ddffedb19e743e4be0c c5137ba8c597c7b5f90318df50e87b93a39a28dc f9e646242cf89f6fde1315046952252a2c429779 f830fbc5fadd89d04be5edd2a5abf9b0d4bf0410 1694b54903df784385abaa8452e1201e12344238 17bcb44d2e29920c0c74430c2d9c703b36cfa0ad 17bcb44d2e29920c0c74430c2d9c703b36cfa0ad 7b5c241faec7488924e5935ae8b19f785846b5e4 bf097ee7467895823fbd158a2a9543da3b5a5078
2018-04-03new loplugin:dbgunhandledexceptionNoel Grandin2-4/+4
enforce that DBG_UNHANDLED_EXCEPTION is called first in a catch block, otherwise it cannot do it's job properly Change-Id: I906436c6861212c44f8f21552ccbceb54f15c6e1 Reviewed-on: https://gerrit.libreoffice.org/52303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03pass area param to DBG_UNHANDLED_EXCEPTIONNoel Grandin10-34/+29
and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-02give DBG_UNHANDLED_EXCEPTION_WHEN an area parameterNoel Grandin2-18/+18
and rename it to DBG_UNHANDLED_EXCEPTION, to make it more like the SAL_WARN-type macros. Use some macro magic to deal with different numbers of arguments. Update the sallogareas plugin to check the area parameter of DBG_UNHANDLED_EXCEPTION. Change-Id: Ie790223244c3484f41acb3679c043fb9b438e7c4 Reviewed-on: https://gerrit.libreoffice.org/52073 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke6-6/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-29loplugin:unusedmethodsNoel Grandin4-16/+0
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3 Reviewed-on: https://gerrit.libreoffice.org/52066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28loplugin:virtualdown in xmloff/xmlsecurityNoel Grandin7-13/+5
Change-Id: I884fe180be98fe29ddb7d2daf4c61f733236e8bd Reviewed-on: https://gerrit.libreoffice.org/51987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28tdf#115005: New option to prevent adding fallback imagesSerge Krot2-1/+6
A new option AddReplacementImages was added to prevent addition of fallback images that could increase the file size of the package in several times. Added unit test. Change-Id: I50eebba51072d3c93bfe6bed59e9f007568810c0 Reviewed-on: https://gerrit.libreoffice.org/51939 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-26forcepoint #35 handle odd number of dimension fragmentsCaolán McNamara1-1/+1
Change-Id: I97e4e1b38d80276077b3427c90ae33023afb5e59 Reviewed-on: https://gerrit.libreoffice.org/51899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-25xmloff: export ruby-position in a more compatible way.Mark Hung2-10/+5
Export both style:ruby-position and loext:ruby-position. The later one only allows "above" and "below", obeying ODF standard while the former one allows "inter-character", which is added lately. Also use ODFVER_012_EXT_COMPAT so that loext:ruby-position isn't exported only in extended mode. Change-Id: I7b9208f289f8253a835b2f7751549206361274e0 Reviewed-on: https://gerrit.libreoffice.org/51007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>