summaryrefslogtreecommitdiff
path: root/unotools
AgeCommit message (Collapse)AuthorFilesLines
2017-05-31tdf#108056 sw: add UI to disable SubtractFlysAnchoredAtFlys compat optionMiklos Vajna1-7/+17
There is a reason this is off by default, make it a bit more easier for users to not depend this option when they don't actually need it. (cherry picked from commit f85ded43446b17fbfdd868cc057ba39666d3d7cb) Conflicts: include/unotools/compatibility.hxx officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs sw/inc/viewsh.hxx sw/source/ui/config/optcomp.cxx sw/uiconfig/swriter/ui/optcompatpage.ui unotools/source/config/compatibility.cxx Change-Id: I21c5b942c6021fa21840779e1a9f53055fbf279f Reviewed-on: https://gerrit.libreoffice.org/38081 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-29tdf#105843 : restore Application Start and Stop eventsJean-Baptiste Faure1-0/+2
Change-Id: Ifc99fcf84182edb49cac741f7bb10a1b239d5703 Reviewed-on: https://gerrit.libreoffice.org/35779 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 7c0054f1b7c3c475bff7a5adfdea0feaecf20748) Reviewed-on: https://gerrit.libreoffice.org/35812 Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 98399c291239e309769fe9a1099655343b21ccd2)
2016-12-01Allow extensions to provide color palettesStephan Bergmann1-0/+17
Until now, .oxt extensions cannot provide additional color palettes (.soc files, see e.g. Draw's "Format - Area... - Area - Color - Colors - Palette:" drop-down list). There are two ways how this feature could be added: Either add a new file-entry media-type to extensions' META-INF/manifest.xml and add support for that in the code. Or leverage the existing code, which reads the configuration set /org.openoffice.Office.Paths/Paths/Palette/InternalPaths, where each set element denotes a directory, and scans those directories for .soc files. So an extension would include an .xcu file adding such a path (using %origin% to denote a directory within the .oxt file itself) and a directory with one or more .soc files. For simplicity, this commit uses the second way. The only problem with the existing code is that extension configuration data using %origin% is rewritten to vnd.sun.star.expand URIs which the palette-scanning code does not support. So extend SvtPathOptions_Impl::GetPath's PATH_PALETTE case to expand such URIs. (The choice of doing it in SvtPathOptions is somewhat arbitrary; there would be other, more generic places where it might make sense to do such expansion, but which would also carry a higher risk of regressions.) <https://github.com/stbergmann/palette-extension> contains an example of such an extension (with a LibreOffice-minimal-version of "LibreOffice 5.3", assuming this commit will be backported to upcoming LO 5.3). Some drawbacks of going this way are: * No control over where extension palettes appear in the palette drop-down lists. (But those lists appear to be sorted in some random order, anyway?) * Commit on future support of the .soc file format (which, however, is XML) and the /org.openoffice.Office.Paths/Paths/Palette/InternalPaths configuration set in a backward-compatible way. (But any other way of implementing this feature would also need a similar commitment.) * Somewhat odd, indirect approach where an extension specifies a directory filled with .soc files, instead of specifying the .soc files diretly. * With the current palette-management code, live extension addition/removal is not immediately reflected in all places that offer palette drop-down lists. (But this should be fixable, and would be an issue with other approaches, too.) Change-Id: I68b30127d61764d1b5349f1f2af9c712828bee3e (cherry picked from commit e2ea7bb3a6b681822a247e8c277694f921c92273) Reviewed-on: https://gerrit.libreoffice.org/31501 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-18Make this look less wiredKhaled Hosny1-2/+8
Change-Id: I20b6a5e6ecdf48e1ca8df2e7e86248eae666c9f1
2016-11-18Correct minute mapping from Adobe Symbol encodingKhaled Hosny1-1/+1
It should be mapped to U+2032 PRIME not U+0384 GREEK TONOS, based on: http://www.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/symbol.txt Change-Id: I554fe307955ac166d5c4e96813be71c03234eb4f
2016-11-17loplugin:unusedfieldsNoel Grandin1-4/+0
Change-Id: Id2dbbf384637223db3d334d95332251832918003 Reviewed-on: https://gerrit.libreoffice.org/30927 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-12Copycat SvtSysLocale_Impl for SvtSysLocaleOptions_ImplJulien Nabet1-29/+25
and so avoid warn:unotools.config:6728:1:unotools/source/config/configmgr.cxx:167: ConfigManager not empty when exiting LO See http://nabble.documentfoundation.org/OSL-ASSERT-items-empty-because-of-Setup-L10N-td4199284.html Thank you Eike for the hint! Change-Id: I4b374a075ad8f1ef10a71f3a9424986154613aef Reviewed-on: https://gerrit.libreoffice.org/30787 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07loplugin:unnecessaryvirtual in test..vbahelperNoel Grandin1-2/+2
Change-Id: I0e110af6eab798e11f96d0f7d282d59440d91965 Reviewed-on: https://gerrit.libreoffice.org/30649 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-05Replace some OSL_ASSERT (unotools/configmgr)Julien Nabet1-3/+2
Change-Id: Ifacee39c43c1171ce673f16a9069e1f72dffae78 Reviewed-on: https://gerrit.libreoffice.org/30596 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-11-03Add helper for creating zip filesSamuel Mehrbrodt2-0/+200
Change-Id: I8b49b74622bf4d671d640e4cd06dc2da348ee222 Reviewed-on: https://gerrit.libreoffice.org/30478 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-03coverity#1371313 Missing move assignment operatorCaolán McNamara1-7/+39
Change-Id: I07a9d7fe837c18e66b4a2a57186f1f9b0d44daee
2016-10-31loplugin:oncevar in unoxml..toolkitNoel Grandin4-31/+17
Change-Id: I3b97665908be0a44d24192433bdc9c2bd9008736 Reviewed-on: https://gerrit.libreoffice.org/30431 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-25loplugin:expandablemethods in UnoControls..vbahelperNoel Grandin2-14/+3
Change-Id: I7e607df2a1f6d4eb207ee0d3eb30f41fac44a0c6 Reviewed-on: https://gerrit.libreoffice.org/30262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-21loplugin:expandablemethodds in include/tools..unotoolsNoel Grandin2-7/+2
Change-Id: I5607d4a2a81de1a3ae329acd1e90280a21522f06 Reviewed-on: https://gerrit.libreoffice.org/30097 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-20tdf#103274 (11): Add default XCommandEnvironment referenceGiuseppe Castagno1-1/+4
Change-Id: I8145e167ef58d83666c2f18adf869a30c859ee8f Reviewed-on: https://gerrit.libreoffice.org/30036 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-19'>>=' with rhs Any is a copy assignmentJochen Nitschke1-4/+4
replace '>>=' operator with '=' where return value is not checked and simplify. (note: switches lhs with rhs) Change-Id: I0d283e8786ea996ed80d7aa9d8a4ea930a3d52f8 Reviewed-on: https://gerrit.libreoffice.org/30004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-17tdf#103274 (3): Add default XCommandEnvironment referenceGiuseppe Castagno1-1/+1
Change-Id: I0a3d8fbea1143c3f7fee6f9f3cbdfc24399090ed Reviewed-on: https://gerrit.libreoffice.org/29980 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-17tdf#103274: Add default XCommandEnvironment referenceGiuseppe Castagno1-1/+1
Change-Id: I4c9e4945e9fd4bb4fc2fe29e5a2a800cc5f298ae Reviewed-on: https://gerrit.libreoffice.org/29966 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-17tdf#103274: Add helper for a default XCommandEnvironment reference.Giuseppe Castagno1-0/+18
This helper should be used where the empty XCommandEnvironment e.g. something like: css::uno::Reference< css::ucb::XCommandEnvironment >() is currently used. See comment in the committed code (include/unotools/ucbhelper.hxx) for details. A case use is presented in this commit, please see: sfx2/source/doc/docfile.cxx for details. Change-Id: Ieb97c0ed61f31ef8df532c8be0e7ff1035327915 Reviewed-on: https://gerrit.libreoffice.org/29927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-15clang-cl loplugin: unotoolsStephan Bergmann1-12/+16
Change-Id: I1bbdae6b27a04321b232851f5f45ac2248b55835 Reviewed-on: https://gerrit.libreoffice.org/29843 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-11loplugin:constantfunctionNoel Grandin1-6/+0
update the plugin similarly to commit 3ee3b36ae0c064fb5c81268d8d63444309d1b970 Author: Stephan Bergmann <sbergman@redhat.com> Date: Fri Oct 7 12:05:49 2016 +0200 loplugin:staticmethods: Don't be fooled by decls starting with macros Change-Id: I98ac3216d5acf89a49a26feb089ae2fd34e6e510 Reviewed-on: https://gerrit.libreoffice.org/29665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek2-7/+8
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-30loplugin:constantparamNoel Grandin1-2/+2
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-23tdf#94987 Create directories for temp filenamesJan-Marek Glogowski1-5/+37
Per default a temporary file is construted from a path and a leading pattern for the filename. For mail merge the filename can be read from a database column. If the path is not existing, a temporary directory is created. Normally the temp file function would fail, if the filename contains a slash and the sub-directory of the filename doesn't exists as a subdirectory of path. To implement tdf#94987, this adds an option to the temp file class to create the parent directories of the filename pattern. Change-Id: I02bf34294dac85598ee153d8cfcf00bc5d7775af
2016-09-22Remove NumberFormatCodeWrapperMaarten Bosmans3-98/+5
This class only adds a level of indirection, without any useful functionality. Change-Id: I806e1b9241caf025c62c12c93aad3101daac874a Reviewed-on: https://gerrit.libreoffice.org/29134 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl5-12/+12
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann26-30/+30
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13avoid loading all calendars of a localeEike Rathke1-9/+11
Change-Id: I42d572a5dbd4c89351bd1f03aae75b9b7dbe7e30
2016-09-13introduce LocaleDataWrapper::doesSecondaryCalendarUseEC()Eike Rathke1-2/+59
Preparing to replace the number format import hack of 95c91f098e8974c41c8d403a351fe53db6822165 and generalizing for known locales. Change-Id: I0413987e302eaa84ef6a7dde2ecb365144313e81
2016-09-12tdf#101889: add absent brackets to OpenSymbolMike Kaganski1-7/+10
The code points for the glyphs were chosen according to IANA and Unicode: http://www.iana.org/assignments/character-sets/character-sets.xml ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/symbol.txt Adobe Symbol font map has been corrected accordingly. Fixed MT Extra font to always have symbol charset. Change-Id: I45d4f33f2b640cc852175c7c5d5c875cb72a9297 Reviewed-on: https://gerrit.libreoffice.org/28677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-09-10typo fix: oue -> ourAndras Timar4-4/+4
Change-Id: I4c592f467017cc88cd7deb124f9859e0ff515009 Reviewed-on: https://gerrit.libreoffice.org/28775 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2016-09-07loplugin:constantparam in framework..vbahelperNoel Grandin3-14/+9
Change-Id: I592f73012ae8a4df8488ef04dc0956d9400625bc
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (unotools)Stephan Bergmann1-3/+3
Change-Id: Ic87ea0139f0c8624a8af5700d97375075c091f73
2016-08-30Let OUStringLiteral1 take its arg as ctor arg, not template argStephan Bergmann1-2/+2
...which makes it more flexible, can now also be used on non-const arguments. The drawback of the argument no longer being a compile-time constant is remedied by making the ctor constexpr. Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
2016-08-30tdf#99402: fix Metafile Font handlingMike Kaganski2-0/+157
1. For DEFAULT_CHARSET/OEM_CHARSET, use correct encoding based on LibreOffice Default Language for Documents setting (Tools->Options...->Language Settings->Languages). For that, two functions added to tencinfo.h, that map language names to corresponding Windows ANSI/OEM encodings. 2. If charset is DEFAULT_CHARSET/OEM_CHARSET for Symbol font, then always use RTL_TEXTENCODING_SYMBOL. Unit test is included. Change-Id: Ibff63e7a03dec42a9d2a74399936d6bc04f2ff1a Reviewed-on: https://gerrit.libreoffice.org/28322 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-27put StreamMode masks in scope of enum classJochen Nitschke1-1/+1
Change-Id: I77682f7e289a59b986bb84edf014029a20266470 Reviewed-on: https://gerrit.libreoffice.org/28420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-25loplugin:staticaccess: Extend loplugin:staticcall to cover all access...Stephan Bergmann1-2/+3
to static members (data, in addition to function) via class member access syntax. Also covers the (somewhat obscure) access to enumerator members. Change-Id: Iec54b8df2fdb423c0caf21a0dd0f9fe8fdf33897
2016-08-23Update comment now that we use an enum classTor Lillqvist1-1/+1
Change-Id: I2daefa5a0e63d9a571ee90a9b8be5e58fa2315a1
2016-08-19Some clang-tidy misc-move-constructor-initStephan Bergmann1-1/+1
...by turning the relevant ctor parameters into "const &". Change-Id: Ia8d0aba5da10ad6b25f8689e2281e45b3d71c1fc
2016-08-16Remove unnecessary UcbStreamHelper::CreateStream overloadStephan Bergmann1-6/+0
...with an explicit XInteractionHandler, but which was only ever called with a null XInteractionHandler, so could just as well call the overload that doesn't specify one (but internally uses a special SimpleFilaAccessInteraction handler since f60eaab748add19683e66c7e4bc073c9ce7887f7 "Related: tdf#99312, add specialized interaction handler", which is probably also what is wanted for these two calls to UcbStreamHelper::CreateStream in cui and sd). Change-Id: I2bf7bebd32f1c06b7414a4646631a19b689ee52f
2016-08-15ubsan: -1 is not a valid value for type 'css::util::SearchAlgorithms'Caolán McNamara1-1/+1
Change-Id: I59e435c1814da57c318c12f2c1539542960f5b90
2016-08-15loplugin:unusedenumconstants in unotools..xmlhelpNoel Grandin3-22/+10
Change-Id: Id7ddc0fc1f57c5e8e7fb002e31d54fb8e9f8ffab Reviewed-on: https://gerrit.libreoffice.org/28050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-08Related: tdf#99312, add specialized interaction handlerGiuseppe Castagno1-2/+17
Needed to manage https certificates and authentication whenever needed. Change-Id: If20b85a9b349b203a8c46d453afa823629d114cb Reviewed-on: https://gerrit.libreoffice.org/27927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-07-27improve passstuffbyref return analysisNoel Grandin3-3/+3
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-15Improve loplugin:unnecessaryoverrideStephan Bergmann2-7/+0
<sberg> thorsten, remember what that "TODO" in SvxAccessibleTextPropertySet::getSupportedServiceNames was to be about exactly, in a909acb7009acadffa53e74ea05ddb88803490f1 ? <thorsten> sberg: that's a nonsense, prolly copy'n'pasted, or a 'please review me' <sberg> thorsten, OK, thanks (that override will eventually go away with loplugin:unnecessaryoverride, and the TODO comment be lost) Change-Id: Iba964c61768459aac4067bbd4e1f7d4f78f6adac Reviewed-on: https://gerrit.libreoffice.org/27232 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15new loplugin unnecessary overrideNoel Grandin3-18/+2
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb Reviewed-on: https://gerrit.libreoffice.org/27135 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-13tdf#84635 - Slow layout of large tablesNoel Grandin2-6/+12
Based on suggestion from Aron Budea. And do something similar to most other places keeping vectors of weak references where the code looks like it will hold more than a few entries. Measurements: the 26 page file file takes 51s without my path 15s with this patch the 69 page file file takes 5m28 without my path 51s with this patch the 84 page file file takes 8m28 without my path 58s with this patch Change-Id: I8da94c525fc73ebd969e0343c6f074be4f0063b1 Reviewed-on: https://gerrit.libreoffice.org/27093 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-10ditch the application per-language IsAutoMnemonicEnabled settingCaolán McNamara3-251/+0
Change-Id: I9734ada09edb6544a332893a7c5d31730b0d081d
2016-07-10ditch the multiply dialog width * X where X is based on language thingCaolán McNamara1-33/+1
Which should be unnecessary since the vcl layout work and optimal size widgets, and its a small and arbitary set of languages for which its set. Change-Id: Ifa397218510ade251f795cdd9360d6bdccb115b7
2016-07-08Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendarEike Rathke2-5/+15
... implementing signed years with year 0 gap. Date(31,12,-1) last day BCE Date(1,1,1) first day CE New class Date member functions: * AddYears(sal_Int16) to be used instead of aDate.SetYear(aDate.GetYear()+sal_Int16) to handle year 0 gap. * convenience GetNextYear() to be used insted of GetYear()+1 * convenience GetPrevYear() to be used insted of GetYear()-1 * AddMonths(sal_Int32) * operator=(const css::util::Date&) New class DateTime member functions: * operator=(const css::util::DateTime&) Made some conversion ctors explicit, specifically Date(sal_Int32) Adapted hopefully all places that used a sal_uInt16 year to use sal_Int16 where appropriate. Eliminated some quirks in date handling found on the fly. Added era handling to i18npool icu calendar setting interface, which missing was responsible for 0001-01-01 entered in Calc being set as -0001-01-01, hence subtracting one day resulted in -0002-12-31. Change-Id: I77b39fba9599ebd5067d7864f6c9ebe01f6f578f Reviewed-on: https://gerrit.libreoffice.org/27049 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>