summaryrefslogtreecommitdiff
path: root/unotools
AgeCommit message (Collapse)AuthorFilesLines
2014-02-06Introduce com.sun.star.util.thePathSettings singleton.Matúš Kukan1-2/+2
To replace single-instance com.sun.star.util.PathSettings service, incorrectly converted in 89b0017b22889af6a8afe28b94c06e7095dc8c6f Keeping util::PathSettings::create in sc/source/ui/vba/vbaapplication.cxx because for some reason util::thePathSettings::get does not work in sc_macros_test while testing sc/qa/extras/testdocuments/Ranges.xls. Change-Id: I75b68ae56ac5b58f72416070dba100ab3ab70fe8
2014-02-04startcenter: fdo#72469: Thumbnails also for other file types than ODF.Jan Holesovsky1-51/+27
Change-Id: If905b2f3e51adf7e64df9385ede74368acd11771
2014-02-03Remove needless SAL_DLLPRIVATE annotationsStephan Bergmann1-2/+2
Change-Id: I6b560474e38230a0c8b6ba3be0bbffe9e7dcae48
2014-02-03fdo#54938 Convert to cppu::supportsServiceAlexandre Vicenzi1-4/+5
Change-Id: I512c525029ebd63d261560d27e9f38bbe94f7e10 Reviewed-on: https://gerrit.libreoffice.org/7649 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
2014-01-29coverity#984169 : Uninitialized scalar fieldNorbert Thiebaud1-0/+1
Change-Id: Ie304c66b7a3abb163428fb481c3cca3de2b4379b
2014-01-28bool improvementsStephan Bergmann10-24/+24
Change-Id: I7020537797b181b0fcbf78de3d7b962b96744895
2014-01-28coverity#440774 Logically dead codeCaolán McNamara1-21/+2
Change-Id: Id6f13ba0f51bef17de6b5e200c71dbde06e3ab63
2014-01-23Let C++ inline functions return bool instead of sal_BoolStephan Bergmann1-2/+2
...to improve diagnosing misuses of boolean expressions in client code (cf. compilerplugins/clang/implicitboolconversion.cxx). This change should be transparent to client code. Missing overloads of insert() for bool have been added to OStringBuffer and OUStringBuffer (which required dropping one !VALID_CONVERSION check that would now pick that overload, but would be flagged by compilerplugins/clang/pointertobool.cxx). Change-Id: I2d64cd923b8f47bfaa31e753def6515c29a3f8c9
2014-01-23fdo#63154 Removed unused solar.h referenceAlexandre Vicenzi2-110/+2
Change-Id: I6b2f9e04e2232570c8bb9f36252b23a70c5f7525 Reviewed-on: https://gerrit.libreoffice.org/7604 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-01-22bool improvements (related to mixing bool/sal_Bool in &=, |=, ^=)Stephan Bergmann1-1/+1
Change-Id: I9869d9709f28b68ef7b518527175589d80644668
2014-01-21bool improvementsStephan Bergmann5-5/+5
Change-Id: Ie9951690fa99705d2083e0d1515261f2f99fd97a
2014-01-21bool improvementsStephan Bergmann8-8/+8
Change-Id: I2733b729fe516c0e857490369d493bb7d8fb7c77
2014-01-10Use boolStephan Bergmann1-1/+1
Change-Id: I00d347a395bc81e31e1575c453e9e7d2d6eb60ed
2014-01-07remove unnecessary sal_Unicode casts in OUStringBuffer::append callsNoel Grandin2-7/+7
Convert code like: buf.append( static_cast<sal_Unicode>('!') ); to: buf.append( '!' ); Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2013-12-20typo fixesAndras Timar4-12/+12
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-18resolved fdo#72778 keep setting system locale and LanguageTag in syncEike Rathke1-2/+2
Change-Id: I3547786bf77b8f611bc08d0e52c66ac00e199f13
2013-12-17Adapt all (non-extension, SharedLibrary) .components to environment="..."Stephan Bergmann1-2/+2
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-17Remove unnecessary use of OUString constructor in + expressionsNoel Grandin1-2/+2
Convert code like aFilename = OUString::number(nFilePostfixCount) + OUString(".bmp"); to aFilename = OUString::number(nFilePostfixCount) + ".bmp"; Change-Id: I03f513ad1c8ec8846b2afbdc67ab12525ed07e50
2013-12-10Typos (mainly "propably")Julien Nabet1-2/+2
Change-Id: Ifeecd82f98f9be9f90d293a7b68691f91d7bbc34
2013-12-06Clean up includes of comphelper/stl_types.hxxStephan Bergmann1-1/+0
Change-Id: I00a8e794189d17ad91a90beb9ce6cb89b7bab2aa
2013-12-06Get rid of DECLARE_STL_VECTORStephan Bergmann2-4/+7
Change-Id: If4588034fc09e4663b5217669c71f26c0a3b8c8a
2013-12-03convert xub_StrLen->sal_Int32 in unotoolsNoel Grandin1-2/+2
Change-Id: If00ae920eb74dfe67a8654bb092879997f37ccc1
2013-11-20Elide utl::ConfigItem_ImplStephan Bergmann2-163/+109
...and utl::ConfigItem::IsValidConfigMgr is always true. Change-Id: I37e295729c3d0ae12719f0ae6f5a5628c58d0b9f
2013-11-19remove unnecessary use of OUString constructor when assigningNoel Grandin1-2/+2
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-17bugs.freedesktop.org -> bugs.libreoffice.orgAndras Timar1-2/+2
Change-Id: I56c1190c93333636981acf2dd271515170a8a904
2013-11-14SAL_WARN_UNUSED com::sun::star::uno::AnyStephan Bergmann1-1/+0
Change-Id: I9058044d13f696e07667dce706f6c311af6dbea0
2013-11-14Adapt MediaDescriptor log area codeStephan Bergmann1-6/+7
...post 24cad6a6490b245bd88ec3e3c87195628914f6a2 "Move MediaDescriptor from comphelper to unotools." Change-Id: I71b4f4e1c1b68c3281f77dc15a2df30bfbf7e587
2013-11-14rhbz#887420 Implement "block untrusted referer links" featureStephan Bergmann1-0/+6
For now, this checks for a trusted referer (if the BlockUntrustedRefererLinks configuration prop is set) in utl::MediaDescriptor::impl_openStreamWithURL and SvxBrushItem::GetGraphicObject. Checking in additional places will probably be necessary to block /all/ unwanted communication. Also, some places marked /*TODO?*/ currently pass in an empty referer (which is always considered trusted) and will probably need to be adapted. Ideally, Referer URIs would never be empty (and consistently use something like <private:user> for cases where access is explicitly initiated by the user and should never be blocked), but that's a very daunting task, so start small by identifying the places that potentially need blocking and adding appropriate Referer URIs there. Also, Referer information should always be computed as freshly as possible from the context in which an access attempt is made, but, again, always carrying the information from the context all the way to the relevant functions is a very daunting task, so for now store the information upon object instantiation in some cases (SvxBrushItem, SdrGrafObj, ...). The Referer URI (css.document.MediaDescriptor property; SID_REFERER) was already used to track macro execution, and there is one place in SfxApplication::OpenDocExec_Impl where opening of hyperlinks (explicitly clicked by the user) is done that needs the current document's URI as Referer to check execution of macro URIs but needs an empty (or <private:user>, see above) Referer to not block non-macro URIs. Special code has been added there to handle that. Change-Id: Iafbdc07a9fe925d9ee580d4f5778448f18f2ebd9
2013-11-14Move MediaDescriptor from comphelper to unotoolsStephan Bergmann2-0/+758
...so it will be able to use SvtSecurityOptions internally. Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-14Add "block untrusted referer links" switchStephan Bergmann1-5/+40
Change-Id: Id2f2a3dafc3bb7ec6fada6bfda5843348dfac5a1
2013-11-14remove unnecessary sal_Unicode casts in various placesNoel Grandin5-10/+10
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-11String clean-upStephan Bergmann1-63/+47
Change-Id: Ib97256e3c00db61e53998571114dab5d74ce18be
2013-11-11convert OUString compareToAscii == 0 to equalsAsciiNoel Grandin3-13/+13
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-11-11convert OUString 0==compareToAscii to equalsAsciiNoel Grandin2-3/+3
Convert code like: 0 == aStr.compareToAscii("XXX") to aStr.equalsAscii("XXX") which is both clearer and faster. Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
2013-11-09Converge on SvtSecurityOptions::isTrustedLocationStephan Bergmann1-18/+17
Change-Id: Ibcf4b7d9d11295c7679637a37d41dc2960e04f8f
2013-11-08Clean up IsSecureURLStephan Bergmann1-57/+32
...to not use WildCard (in case a trusted location URI already contains an unescaped "*"), be specific about matching only past a final "/", and rename to isSecureMacroUri for clarification. The check with an INET_PROT_NOT_VALID default INetURLObject in SfxApplication::OpenDocExec_Impl ("we have to check the referer before executing") had efficiently been dead since its inception in 14237ac4bf497decdde8b742acea23780833ba12 "#90880#: security checks corrected," as INET_PROT_NOT_VALID is considered secure regardless of referer anyway. Change-Id: I03bca5e6dac89bb2aac52909aff273ea640228d8
2013-11-07remove unnecessary use of OUString constructor in UNOTOOLS moduleNoel Grandin5-13/+13
Change-Id: Iad166e6b9ce0877200bd58c388b3914b15167196
2013-11-04remove redundant calls to OUString constructor in if expressionNoel Grandin1-3/+3
Convert code like: if( aStr == OUString("xxxx") ) to this: if( aStr == "xxxx" ) Change-Id: I8d201f048477731eff590fb988259ef0935c080c
2013-10-31Convert indexOf->startsWith and lastIndexOf->endsWithNoel Grandin1-1/+1
This is both an optimisation and a cleanup. This converts code like aStr.indexOf("XX") == 0 to aStr.startsWith("XX") and converts code like aStr.lastIndexOf("XXX") == aStr.getLength() - 3 to aStr.endsWith("XXX") Note that in general aStr.lastIndexOf("X") == aStr.getLength() - 1 converts to aStr.isEmpty() || aStr.endsWith("X") so I used the surrounding context to determine if aStr could be empty when modifying the code. Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-28fixincludeguards.sh: unotoolsThomas Arnhold2-5/+5
Change-Id: Idf4bee8c51e3082d2b815d9cf5c3d7374e598622
2013-10-23convert code to use OUString::endsWithNoel Grandin2-9/+8
Convert places that call aStr[aStr.getLength()-1] == 'x' to use the shorter form aStr.endsWith("x") Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist3-4/+4
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-16unotools: add menu option to enable/disable Smart-Art lockJacobo Aragunde Pérez1-3/+20
The point of this menu option is that locked Smart-Art shapes would preserve the original XML files attached so they could be exported back to docx with no loss. The new menu option is located at Options -> Load/Save -> MS Office -> SmartArt to LibreOffice shapes or reverse. Change-Id: I6aafc2eb83404ee2c0b8538b2f6fbbbd4363e7d3 Reviewed-on: https://gerrit.libreoffice.org/6138 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-10-08No longer used header includeStephan Bergmann1-1/+0
Change-Id: I74034503b4d2d1eb438b4213bf135d831a08e9fc
2013-10-02-Werror,-Wunused-variableStephan Bergmann1-1/+0
Change-Id: Ibef564f992f3d62eab7711be66d7d465346222da
2013-10-02-Werror,-Wunused-variableStephan Bergmann1-1/+0
Change-Id: Id1fc880fa713b03fe846cee8e5c5edd733f6bdb5
2013-10-01desktop: stop replacing %PRODUCTNAME %PRODUCTXMLFILEFORMATVERSIONMichael Stahl1-12/+0
... and %PRODUCTXMLFILEFORMATNAME at runtime and hard-code OpenOffice.org 1.0 for these too. Change-Id: Id96390506d2a0f367f932e85d3115362ad483bc3
2013-10-01remove run-time replacement of %WRITERCOMPATIBILITYVERSIONOOO11Michael Stahl1-6/+0
Instead hard-code OpenOffice.org 1.1 as the value, since StarOffice and StarSuite are irrelevant. Change-Id: I9ab3d1cf38cf64cd4e440b3ae43158f748ead7d2
2013-09-26use makeFallback() in MakeRalLocale()/MakeRealUILocale()Eike Rathke1-4/+4
The old MsLangId::convert...() methods did implicitly fall back to a known locale, this behavior is explicitly needed here to select a proper completely known locale. Change-Id: I350989f3af679890ddb0de964c2d107420331160
2013-09-26typo fixes in commentsAndras Timar3-4/+4
Change-Id: Iaadec33715f8e0e0c6595c5e684606905274fdab