Commit Graph

2877 Commits

Author SHA1 Message Date
Luboš Luňák
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
Noel Power
4c9a08e78b fix for fdo#62323 bad conversion of Hex strings for certain values
Basic hex literals are basic Integer ( e.g. 4 byte ) types with
-2,147,483,648 through 2,147,483,647 range. Interally the scanner
was using a long to form/scan the literal, this led to bad behaviour
on 64bit linux ( where normally long -> 8 bytes )

Change-Id: I1d0fcc55ed0eda636da1445329737d1684e69f33
2013-08-20 08:59:54 +01:00
Stephan Bergmann
4b2c05d4f7 Simplify iteration over Sequence
Change-Id: I84b79c6cc11a5cd506e22caf294423a3c0b953f0
2013-08-19 14:15:20 +02:00
Tor Lillqvist
c6a7300974 Use subfolder names from <config_folders.h>
Change all instances of hardcoded "program", "share" etc subfolder names to
use those from <config_folders.h> instead. In normal builds, the end result
will not change.

Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
2013-08-18 21:11:16 +03:00
Michael Stahl
91f3d77b98 tweak comment translations
ede5f05c fb3a1bb9 5e04331f fd6089b9 66a1d406

Change-Id: I5077ce5f6182f9193cebaaf63190450d375679dd
2013-08-08 23:25:25 +02:00
Lionel Elie Mamane
a43a18edb0 do *not* silently ignore errors when saving libraries
In case of error, it leads to *data* *loss*.

Change-Id: I80d806ef10a3364174eced3095ebf1ea217d75b4
2013-08-02 23:36:40 +02:00
Lionel Elie Mamane
fc9080a0c6 fdo#67685 open xSourceLibrariesStor only when needed
else it keeps loadLibrary from completing,
because the latter cannot open the storage
because it is already open in read/write mode.

Change-Id: Icd0aabfff6e67af2c38a8f9185f8485b46ab1516
2013-08-02 23:36:40 +02:00
Takeshi Abe
392c5b2a70 Mark as const
Change-Id: Idd1d0641d5b7d8594f354c7d2e2a9093ecc6b2f7
2013-08-01 04:33:23 +09:00
Lionel Elie Mamane
5e505896a5 Basic: make sure a messagebox has solarmutex
Change-Id: Icc5f05456e4031ffbc88d6128689465f08eb5f0d
2013-07-29 15:27:46 +02:00
Stephan Bergmann
a95d1eff07 Remove effectively unused INetURLObject OString overloads
Change-Id: Icbbe27b229d5454d27be646e00e8b362a77359b3
2013-07-29 08:26:29 +02:00
Michael Meeks
03993b47c5 targetted clean of redundant header piece from 62badf3828
Change-Id: Ic1240114d667fb7797afae4847427cc889f3cb48
2013-07-26 14:18:52 +01:00
Takeshi Abe
bddd4d4598 Mark as const
Change-Id: I2746b92b1360c3c181879a81f653c44ef609f351
2013-07-22 21:03:55 +09:00
Caolán McNamara
c6de82163e drop intermediate strings
Change-Id: Ib4a2bf25fcb834bda1bc515152b01c292704893a
2013-07-10 09:50:06 +01:00
Stephan Bergmann
abba78f644 -Werror,-Wdeprecated-register (Clang trunk towards 3.4)
Change-Id: I64e4933f7a0a8026ccc7ce98804bfc497d3f0eed
2013-07-08 17:32:25 +02:00
Lionel Elie Mamane
e436c49188 fixup nanosecond precision
This was broken before...
Time used to take centiseconds, so the nanoseconds should have been *divided* by 10^7 for conversion.
Now Time takes straight nanoseconds, so no conversion necessary.

Change-Id: Ibac3eeca7020c5d8c5ff4be3e7617fac26ee8180
2013-07-05 12:22:03 +02:00
Michael Stahl
3835dee3c7 SvStream: remove the error prone operator<</>>(sal_Int64)
As the recent regression after merging AOO patch adding code serializing
"long" variables has shown, this overload (which was added in
7b2a0e5415) is a bad idea.

In a unxlngx build, nm finds uses of the symbols _ZN8SvStreamrsERl
and _ZN8SvStreamlsEl in these files:

- sbxvalue.cxx: this appears to be a legitimate use with sal_Int64

- dateitem.cxx: this was accidentally changed by commit
  9830fd36db

- atrfrm.cxx: this was added for Table Autoformat enhancement in
  7e8c0bd73e, which is after the
  sal_Int64 operators were added, so the file format is now
  platform dependent

Change-Id: I78352b5429b53612c4831cdb81b587b5de5180a9
2013-07-02 16:30:01 +02:00
Norbert Thiebaud
6a08067902 OUString convertion for unotools
Change-Id: Ifae7f344e3827875e32afa3cda23c771f5735707
Reviewed-on: https://gerrit.libreoffice.org/4659
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-07-02 07:31:30 +00:00
Thomas Arnhold
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
Thomas Arnhold
955ebe83a8 String to OUString and cleanup
Change-Id: Idc18c1a6a64edea3399c8747ec0f096a2f964b68
2013-06-29 16:23:24 +02:00
Thomas Arnhold
318f2b64cc remove some createFromAscii usage
there are a lot more of them:

git grep 'createFromAscii[^)]*"'

Change-Id: Ibc2e9cae208d8b9c91667bb3b177c6bd6d3a9424
2013-06-29 16:23:23 +02:00
Armin Le Grand
e0cce521f1 Resolves: #i121504# Support for alpha channel in clipboard for all systems
(cherry picked from commit ef3931ff410117e1237b3bef7bc090e8b83b9519)

Conflicts:
	automation/source/server/statemnt.cxx
	basic/source/runtime/methods.cxx
	canvas/source/vcl/devicehelper.cxx
	canvas/source/vcl/spritedevicehelper.cxx
	drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
	drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
	drawinglayer/source/tools/converters.cxx
	dtrans/source/win32/dtobj/FmtFilter.cxx
	editeng/source/items/bulitem.cxx
	extensions/source/scanner/sanedlg.cxx
	external/gcc3_specific/makefile.mk
	filter/source/graphicfilter/eos2met/eos2met.cxx
	filter/source/graphicfilter/ios2met/ios2met.cxx
	filter/source/msfilter/msdffimp.cxx
	fpicker/source/office/iodlg.cxx
	framework/source/fwe/classes/addonsoptions.cxx
	framework/source/fwe/helper/actiontriggerhelper.cxx
	sc/source/filter/excel/xiescher.cxx
	sc/source/ui/docshell/docsh.cxx
	sc/source/ui/inc/viewfunc.hxx
	sd/source/ui/app/sdxfer.cxx
	sd/source/ui/unoidl/unopage.cxx
	sd/source/ui/view/sdview3.cxx
	sfx2/source/appl/fileobj.cxx
	sfx2/source/appl/linkmgr2.cxx
	sfx2/source/dialog/filedlghelper.cxx
	sfx2/source/dialog/intro.cxx
	sfx2/source/doc/docinf.cxx
	sot/inc/sot/formats.hxx
	sot/source/base/formats.cxx
	svtools/bmpmaker/bmpcore.cxx
	svtools/bmpmaker/bmpsum.cxx
	svtools/inc/svtools/transfer.hxx
	svtools/source/filter/filter.cxx
	svtools/source/filter/wmf/emfwr.cxx
	svtools/source/filter/wmf/enhwmf.cxx
	svtools/source/filter/wmf/winwmf.cxx
	svtools/source/filter/wmf/wmfwr.cxx
	svtools/source/graphic/graphic.cxx
	svtools/source/graphic/provider.cxx
	svtools/source/misc/transfer.cxx
	svx/inc/svx/xoutbmp.hxx
	svx/source/sdr/overlay/overlaymanagerbuffered.cxx
	svx/source/xoutdev/_xoutbmp.cxx
	sw/source/core/view/viewsh.cxx
	sw/source/filter/ww1/w1filter.cxx
	sw/source/filter/ww8/ww8par.hxx
	sw/source/ui/dochdl/swdtflvr.cxx
	toolkit/source/awt/vclxbitmap.cxx
	toolkit/source/helper/vclunohelper.cxx
	vcl/Library_vcl.mk
	vcl/Package_inc.mk
	vcl/aqua/source/dtrans/DataFlavorMapping.cxx
	vcl/aqua/source/dtrans/OSXTransferable.cxx
	vcl/aqua/source/dtrans/PictToBmpFlt.cxx
	vcl/aqua/source/dtrans/PictToBmpFlt.hxx
	vcl/inc/vcl/alpha.hxx
	vcl/inc/vcl/bitmap.hxx
	vcl/inc/vcl/bitmapex.hxx
	vcl/inc/vcl/pngwrite.hxx
	vcl/inc/vcl/salbtype.hxx
	vcl/inc/vcl/wall.hxx
	vcl/source/gdi/animate.cxx
	vcl/source/gdi/bitmap2.cxx
	vcl/source/gdi/bitmapex.cxx
	vcl/source/gdi/bmpconv.cxx
	vcl/source/gdi/cvtsvm.cxx
	vcl/source/gdi/impgraph.cxx
	vcl/source/gdi/impimagetree.cxx
	vcl/source/gdi/metaact.cxx
	vcl/source/gdi/wall.cxx

Change-Id: I79938bc412c048c3d4e64f430f216e73bec16167
2013-06-13 14:50:46 +01:00
Noel Power
c32dd08cfb blind ( windows ) fix re. uno::Refererence vs rtl::Reference foobar fdo#65545
Change-Id: I81b877e8e1b6945c2f1265947ad915ed1070800a
2013-06-13 11:43:46 +01:00
Fridrich Štrba
a5d26f86e8 Werror: labels ... not handled in switch
Change-Id: Ib73d757ffb313ce365caa3f70c472f662f6d9719
2013-06-10 14:03:34 +02:00
Fridrich Štrba
35a65baefe Slowly, but surely going on compiling for mingw64
Change-Id: I590aa6a854a040281bf73d5be768c05d4906a984
2013-06-06 15:52:05 +02:00
Noel Grandin
95c0d568fd use uno::Reference#clear() method...
...instead of assigning an empty value. Reduces code noise.

Change-Id: Ic95b081a41fb740a738c92b3407a9514ccb8b06e
2013-06-05 08:13:23 +02:00
Noel Grandin
dcbaf7c253 remove unused componentcontext.hxx includes
Change-Id: I598926b72c5540b472f9607e2f3df134a8c50048
2013-06-05 08:13:21 +02:00
Miklos Vajna
3c8d419f4b SfxLibraryContainer::storeLibraries_Impl: make saving basic macros work again
Regression from cbd1a89676, that commit
accidentally not only removed the #if 0 block, but also two other
braces -- because of this, in case bStorage was false, nothing was
saved. The effect of this was that if the user edited some macro in the
basic IDE, then saved the macro, it was shown as saved, but in fact that
didn't happen.

Change-Id: I20f8358dddfb226976be72f95dcad64de88d83c3
2013-06-03 18:01:46 +02:00
Noel Grandin
e6c13f2846 fdo#46808, Convert XMultiServiceFactory to XComponentContext
Change-Id: Ice5ec3a056f7f2f5184523bda1c709ccac876736
2013-06-03 10:00:01 +02:00
Mark Wielaard
287d483edb propacc.cxx include limits.h for USHRT_MAX.
Don't depend on accidental definition depending on the version of boost used.

Change-Id: Ib26afdde895411bdf827e1af21e490b59ef7f2d5
Reviewed-on: https://gerrit.libreoffice.org/4111
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-05-31 07:15:52 +00:00
Stephan Bergmann
69e697deef Improve DialogProvider service ctor
...recently introduced with c75a46fbd0 "fdo#46808,
use DialogProvider service constructor."  The general theme of this additional
ctor appears to be more about "Scripting" than "Listener," and the DialogLib
argument is actually expected to be of XNameContainer type.

Change-Id: Iea7d906d9b2ffc3b3ee5b2cbfaf7c58191037c9b
2013-05-29 17:35:06 +02:00
Caolán McNamara
5405451440 bogus TRUE/FALSE -> sal_False/sal_True
Change-Id: I72e0b6b3261422bd5fc47445d38cc64241d62362
2013-05-29 12:58:47 +01:00
Noel Grandin
1d1825db86 fdo#46808, Convert awt::UnoControlDialog to new style
Change-Id: I9a5256c8dbacda60167403b4e26900588943a9b2
2013-05-28 08:10:22 +02:00
Stephan Bergmann
e36f83d81c Revert "fdo#46808, Convert awt::UnoControlDialogModel to new style"
This reverts commit 6c61b20a8d.  As discussed at
<http://lists.freedesktop.org/archives/libreoffice/2013-May/052449.html> "Re:
fdo#46808, Convert awt::UnoControlDialogModel to new style problem" why the odd
change in 2e2a4827ce "scripting: get
CreateUnoDialog() work again" appears to fix things again:

  The problem is that the implementation of the css.awt.UnoControlDialogModel
  involves UNO aggregation
  (IMPL_CREATE_INSTANCE_WITH_GEOMETRY(UnoControlDialogModel) in
  toolkit/soruce/helper/registerservices.cxx creating a
  OGeometryControlModel<UnoControlDialogModel> instance that aggregates a
  UnoControlDialogModel instance).  That means that queryInterface can return a
  reference to something that is technically a different object, and that's
  what's happening here, and explains why calling setPropertyValue in two
  different ways on what logically appears to be a single object can end up
  calling two different implementations (of two different physical objects).
  (UNO aggregation is known to be broken and should not be used.  Nevertheless,
  there's still code that does---code that is a horrible mess and hard to clean
  up.)

  That all this worked as intended in the past is just sheer luck, but any
  way of substantially touching it is asking for trouble.  I'm going to
  revert 6c61b20a8d again.

I wasn't able to revert without also reverting
be50ad28f5 "fdo#46808, Convert
awt::XUnoControlDialog to new style," as the two were tightly dependant.  Also
reverts all the follow-up fixes cb4b6dde8f
"-Werror,-Wuninitialized" (sans the const-ness fix in
UpdateHandler::insertControlModel), 697a007c61
"Fix exception specifications," 2ce6828bbb "fix
awt::UnoControlModelDialog crash," and 2e2a4827ce
"scripting: get CreateUnoDialog() work again."

Conflicts:
	basctl/source/dlged/dlged.cxx
	filter/source/t602/t602filter.cxx
	xmlscript/test/imexp.cxx

Change-Id: I5d133468062f3ca36300db52fbd699be1ac72998
2013-05-25 11:45:47 +02:00
Noel Grandin
6a043e9c0a Use the new type-checking Reference constructor to reduce code noise
Also create a Clang compiler plugin to detect such cases.

Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752
Reviewed-on: https://gerrit.libreoffice.org/4001
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-05-22 10:44:29 +00:00
Noel Grandin
be50ad28f5 fdo#46808, Convert awt::XUnoControlDialog to new style
Change-Id: I40d2e2ddd92186a2ba22ebfbdda8367391e8d355
2013-05-21 08:23:59 +02:00
Noel Grandin
6c61b20a8d fdo#46808, Convert awt::UnoControlDialogModel to new style
Change-Id: I4b912034ef3f4855b87d6d6f18ff13bd1ecc8f72
2013-05-21 08:23:58 +02:00
Noel Power
1755091764 fix wildcard handling regression( for basic functions like Dir ) fdo#64536
Tweak another fallout from String->OUString

Change-Id: I3932bdb441fe6b08cefa6331870956664ade77bd
2013-05-20 12:19:36 +01:00
Tor Lillqvist
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03:00
Noel Grandin
6f2a33332d fdo#46808, Use service constructors
Change-Id: I34a41cde5d40e14803859116648c8da9f50c4b07
2013-05-15 08:25:37 +02:00
Noel Grandin
c75a46fbd0 fdo#46808, use DialogProvider service constructor
Change-Id: I1652be5cefd00892426cf8559cadc9605ad8d439
2013-05-14 13:39:29 +02:00
Noel Grandin
8bf8a2f349 fdo#46808, Convert script::InvocationAdapterFactory to new style
Change-Id: I2fe24c863f4c43471f46032ed15fcd5b98863fc1
2013-05-14 13:39:29 +02:00
Noel Grandin
4460f213df fdo#46808, use XComponentContext in SfxLibraryContainer
Change-Id: I6f66fc69a40e2cd2ef2372e0413ff95b6202c5c5
2013-05-14 08:08:27 +02:00
Noel Grandin
67042f1f03 fdo#46808, replace XMultiServiceFactory with XComponentContext is SfxLibrary
Change-Id: I150d86b4ae4004e7c39ec6a3ed7fba31029f8ab1
2013-05-14 08:08:26 +02:00
Noel Power
894a0348dc fix VBA mode MkDir when passed folder is not a full path
Change-Id: I7fd804999f1b96e6aab112445edcd9dcf7753c24
2013-05-09 14:11:21 +01:00
Noel Power
cbd1a89676 remove #if 0 block ( from af34774d26 )
I left in that block in the mentioned commit above for mostly because
I preferred a more obvious hack/change to cherry-pick to 4.0
The more I think about this ( despite the still imho problematic setting
of the modify state ) I think always writing from memory to the storage
is the right thing to do

Change-Id: I13c82b9d6b55120482c65fb7a5bfadb2396c347c
2013-05-09 09:54:41 +01:00
Noel Power
af34774d26 hopefully this fixed the strange autorecovery related dataloss fdo#42899
also this is a fix for bnc#817477
Disabling the optimisation of copying the library container storage
to target storage for the moment ( hopefully after some rework
it might make some sense to re-enable this code ) The problem here is
there is a tragic flaw in the api implementation. In the implementation
the library in-memory model state reflects that the library model
has been saved to storage but not the library container storage
as you ( or at least I ) would expect but actually any storage.
So to illustrate the problem, during autorecovery when the
basic library containers are stored to the autorecovery file the
library pImplLib->implIsModified() is set to false, any subsequent save
attempt will think the library is not modified and will attempt
to the librarycontainer storage to the target one. However, in this case the
source (library container) storage has never been updated with the changes
from memory.
Can't we simply only update the 'implIsModified' state only if the library
container's own storage and the storage to store to are the same ?
Sounds like a good idea, unfortunately this is not possible due to the way
that sfx spaghetti code uses temporary storages for even own copies and
also because it sets the new root storage for the library container
after the library copy happens. ( some stuff in dbaccess appears to
depend on this as well )
AFAICT for any document save/saveas etc. operation the librarycontainer's
own storage and the storage we save to are *always* different.
So for the moment it seems best to *always* write the storage from the
in-memory model.

Change-Id: Ia24e7a6119558497d901370dbc0986101bde4de9
2013-05-08 21:10:46 +01:00
Thomas Arnhold
52b71a2b5e fix windows build
Change-Id: Id5d51292c0ee9c6bf62a2ceac6a80cbfd3e09605
2013-04-26 18:45:59 +02:00
Thomas Arnhold
1e83da9aed some more namespace cleanup
Change-Id: Ib1e80d717f199db8f8ac4181d4377a86d88e3244
2013-04-26 18:01:51 +02:00
Tor Lillqvist
d12a3e8b76 Combine fairly pointlessly split source code for SbiRuntime into one file
Insert basic/source/runtime/step[012].cxx into
basic/source/runtime/runtime.cxx.

Follow-up to https://gerrit.libreoffice.org/#/c/3373/ .

In many cases the sources for some class have been split up into several
source files, typically suffixed with a number 0, 1, 2 etc. Presumably this
has been done because some compiler years ago was not capable of compiling all
the source for that class at one time, or some other no longer relevant
reason.

It would be nice to get rid of this convention, so that clever compilers have
a better chance of noticing unused private fields in a class, for
instance. Just combining the source files in question into one source file and
removing the old source files from git leads to a discontinuity in version
control history. But the consensus seems to be that this is not such a big
deal.

I picked these sources just because they happened to be the first ones I came
across when looking for files called *0.cxx.

Change-Id: Ia7e8ece9a4374721bbcce6b0e2aba5721436faae
2013-04-24 11:07:15 +03:00
Michael Meeks
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00