Commit Graph

3113 Commits

Author SHA1 Message Date
772323b4a9 Reduce nesting / style in thumbnail creation routines
Change-Id: I733b677f4d4c7dfdf6fef531b43e1de36131f55d
2014-08-28 13:50:46 +02:00
dfe4e902f2 SfxMedium::Transfer_Impl: fix indentation
Change-Id: I05856f88dc1263bac39d9f1e76ef7c4697c345a6
2014-08-28 08:05:55 +02:00
fe7d0ea643 convert sw use of template manager to new manager
this completes the conversion of resource hosted
dialogs and tabpages to .ui gtkbuilder format

Change-Id: Ic1b49d5560bfa47f287e04918c01daeebba28163
2014-08-26 15:36:52 +01:00
702b981d9a QueryBox MSG_QUERY_OPENASTEMPLATE -> MessageDialog + string
Change-Id: I031a145ca62e3bf7e74b9d447ff8bb041974daa6
2014-08-25 12:27:52 +01:00
57a4337e25 set names on a bunch more threads...
Change-Id: I4c2f2f0bcce52839033876ec991529721e06a3c8
2014-08-25 13:21:59 +02:00
b70fb7d704 everything is independent from vos these days...
Change-Id: Iccb94dcc31d6de8c9e4e7a31b3c2e36d4198b295
2014-08-25 13:21:55 +02:00
7e2b9fa213 Remove some useless tools/debug.hxx includes
Also remove the tools/solar.h included from tools/debug.hxx. The include of solar.h
header was necessary in some cases because of a macro or a typedef that was needed.

Change-Id: Ia6e15d5c2571c58c9e9138b0d0a7f08ae88053c9
Reviewed-on: https://gerrit.libreoffice.org/11075
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2014-08-22 16:33:18 -05:00
8a08ddd737 No need to own SfxBasicManagerHolder by pointer in SfxObjectShell_Impl
Change-Id: I55da464ef1d3381fb51949a349f844dbd7da49eb
2014-08-22 08:50:56 +02:00
24c1a1b38b Avoid possible memory leaks in case of exceptions
Change-Id: I95a769fe436a79a1e236c5504d1d5b288b3da71a
2014-08-21 22:56:21 +09:00
a107bdfdfc ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-18 10:57:21 +01:00
3d52e47c73 remove lots of dead boxes
Change-Id: Ia0e5930b9bbf0c81a5d2974d45730b5af75019f0
2014-08-18 02:49:48 +02:00
f739d06293 InfoBox RID_XMLSEC_INFO_WRONGDOCFORMAT to String
Change-Id: Ieb1c90f2f17b2ce12acf2999743ce4d608076223
2014-08-18 02:24:39 +02:00
1eb84514fd MSG_ERROR_RENAME_TEMPLATE resource unused
since

commit b4c18dc0ea32af9f070d43278e547ee0b2e540a4
Author: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Date:   Thu Dec 20 09:51:59 2012 +0100
    Templates Manager: removed the old dialogs and menu entries

Change-Id: Id1007004d5a3522891e66d408c2276c43bbc7f84
2014-08-15 09:09:36 +01:00
0c830d899d reduce num of FilterOptionsRequest includes
Change-Id: I403bb7b96e8bcaa6138cdd9be823657bc47fa7ca
2014-08-14 16:09:33 +01:00
4334d80ee8 git commit no reason to include FutureDocumentVersionProductUpdateRequest.hpp
Change-Id: Icc6757254721ed8c03356a6acc28e6f241c07153
2014-08-14 15:12:22 +01:00
273ed07a57 remove unused resource ids
Change-Id: I3971ecc7dc0c3faf8dd1ed63adc08a6e18dc2964
2014-08-09 18:12:14 +02:00
666f8651b1 simplify "no delete" logic in SvRefBase
by converting the bit munging to use bitfields.
Remove unused return values.
Add asserts to check that AddRef() is not called after the object
is deleted.
Fix the code in SfxObjectShell to not call AddRef() after
SfxObjectShell is deleted.

Change-Id: I3a3565a0bc45fc9d1d086222265ab8b8175818a7
2014-07-29 17:56:51 +02:00
7e018afaf7 simplify return argument of SfxPoolItem::GetPresentation
since all two of the actual call-sites only care about whether
it is a valid presentation or not, not what kind of presentation it is.

Change-Id: I75717c88878d37b2897741b0c833ff283b3fee59
2014-07-29 11:04:01 +02:00
196abcf8f4 do not unescape sequence in original name in GetRecommendedName()
Noted with the fix for fdo#81304 the code unescaped an escaped sequence
in the original file name, for example "foo%20bar" became "foo bar".
This change preserves such sequences, though the final result at the
(GTK) file picker is still unescaped, which happens somewhere else.

However, now for the suggested file name "foo%20bar#baz" an InetURLObj
of "foo%2520bar%23baz" is created and results in a recommended name of
"foo%20bar#baz" again.

Change-Id: I620811e33bdb74323ddcb3d732428179bf7181d4
2014-07-22 20:14:57 +02:00
7515b1a90f fdo#63756 build libxml2 with ICU support
Change-Id: I0523e49e640812be435ba4c97b1881ca253eb2ab
2014-07-20 10:15:25 +02:00
490d302817 rename the Weak stuff in tools/ref.hxx to WeakRef
.. which more accurately reflects it's purpose

Change-Id: Ibb87a47a3d1f3e35ac2820f14c71adf3b227c961
Reviewed-on: https://gerrit.libreoffice.org/10283
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-07-17 11:56:14 +00:00
f3d7734af4 fdo#81304 don't parse file name as part of URL
... because the name is not URL-encoded at this point, so parsing it as
a part of the URL will interpret special characters, e.g. #.

Change-Id: I780baed1753e9674d835dc296d31c088b67d8ba7
2014-07-14 15:11:17 +02:00
dac4ca5f68 new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.

Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
0820f53c0d coverity#735850 Dereference after null check
Change-Id: If164a92ed502502ce1b25ecddaa8852e83eb4f3c
2014-07-01 16:43:07 +01:00
01a882039e fdo#69036 do not try to create a sfxApplication when we are tearing-down
This was triggered by connectivity calc driver, which on shutdown
was trying to 'dispose()' it's connection
which in turn would, if the shutdown of calc was already done
try to re-create an sfxApplication instance, just to delete
illusory inexistant documents...

Change-Id: Ic166367ca399d613743f379ebbfbffb5813701c0
2014-06-27 17:08:04 +02:00
d92aa2f445 remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-27 17:08:04 +02:00
749bd87e90 drop the functional parts
appears to work without it as far as I can see

Change-Id: Ibe19addeeb38f853a515aef36d6bc83d338e1c0b
2014-06-26 16:29:16 +01:00
2f7b92c5bb Resolves: #i124914# reset certain language dependent pool defaults...
before importing a document via <SfxObjectShell::ImportFrom(..)> (used for
OOXML *.docx import)

(cherry picked from commit 920bf1164fe0c3d232dc0f7d476eec1660f4690e)

Conflicts:
	sfx2/inc/sfx2/objsh.hxx
	sw/inc/docsh.hxx
	sw/source/ui/app/docsh.cxx
	sw/source/ui/app/docsh2.cxx
	sw/source/ui/app/docshini.cxx
	sw/source/ui/app/docst.cxx
	sw/source/ui/app/docstyle.cxx

Change-Id: Id32bd6a8ef081dd4af4d832aa42317de7f64184f
2014-06-26 16:29:16 +01:00
a8b32cc97a OSL_ENSURE->assert
Change-Id: Ib8ba49e89d03eaf3b3aae94dbbf121898ba9e8de
2014-06-26 16:29:14 +01:00
112645f758 clang: Use-after-free
Change-Id: I5dd857dbf39c8cd62df8b8cd0323b873a79976ae
2014-06-26 16:29:12 +01:00
17dc7f1153 remove spurious com::sun::util prefix
Change-Id: I002a14fe0cb0cbdb4d5da51db8da6c8208cf604e
2014-06-25 15:04:47 +02:00
12a4b81222 Missing null check
As Kendy found out, "In Writer: Enable the drawing functions [view -> toolbars
-> drawing], choose 'Line Callout 1' among the presets Callouts [to the left
from the stars], and attempt to click and drag in the document to insert it"
triggers assert in SvRef<T>::operator* introduced in
160ae9889e4d16217a7cca7d930f776f5a645ec8 "Catch illegal null pointer
dereferences early."

Given how most places in sfx2/source/doc/sfxbasemodel.cxx already check for null
m_pObjectShell, looks like this had just been missing here, and the
SfxDocInfoListener_Impl's modified has probably never been called, so it went
unnoticed that its m_rShell was a "null reference."

Change-Id: I6b6dad831938d5fa89340895b98797686b60c5cc
2014-06-20 17:22:50 +02:00
1d38cb3655 fdo#71076, fdo#71767: Preserve number formats when charts are copied.
Change-Id: If5ae8852152012483237e7602e56a0c46ea8748a
2014-06-19 14:46:56 -04:00
7113db27f0 GetFileTimeValue can produce a "null" DateTime
Change-Id: I96bf1aa2d889c4d0925d073d1d7b4be47c23b3ac
2014-06-19 14:57:48 +02:00
80f8bf77e5 Prevent null pointer dereference
Change-Id: Ia197152f6ece37dd2dd2ce1b41c1dfd1a985781c
2014-06-19 09:24:35 +02:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
7c2f000085 loplugin:staticcall
Change-Id: Ie5e9e21f4c592c58094afc954f1de54512719fd5
2014-06-13 17:54:32 +02:00
91101dc043 coverity#441139 Explicit null dereferenced
Change-Id: I015125fca5cd3e4c1ac2407c0449fe641991f8f6
2014-06-10 10:48:42 +01:00
fea4482ea8 coverity#706615 Uncaught exception
and hopefully a boat load more

Change-Id: I31cd4e530bd38dda845478a36d8216b7b3f9d7fd
2014-06-10 10:48:41 +01:00
6fa618722e coverity#1219793 Uncaught exception
and hopefully a gadzillion others

Change-Id: I853e997aa6510ed99c1af39eecfd80dba2d5c2a9
2014-06-02 16:59:58 +01:00
c24272c797 the dubious SfxModelSubComponent and friends aren't used outside sfx2
so move out of the globals headers and drop their public visibility
markup

Change-Id: Ie0a852c962a9d05488022397e83152d1c73cfa29
2014-05-29 11:02:45 +01:00
a65b6a4626 valgrind: memleak when sidebar open in writer on close
==3768== 512 bytes in 1 blocks are possibly lost in loss record 25,532 of 28,010
==3768==    at 0x4A06965: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==3768==    by 0xB52FA41: __gnu_cxx::new_allocator<bool>::allocate(unsigned long, void const*) (new_allocator.h:104)
==3768==    by 0xB52EC00: std::__cxx1998::_Deque_base<bool, std::allocator<bool> >::_M_allocate_node() (stl_deque.h:533)
==3768==    by 0xB52DE4E: std::__cxx1998::_Deque_base<bool, std::allocator<bool> >::_M_create_nodes(bool**, bool**) (stl_deque.h:627)
==3768==    by 0xB52C624: std::__cxx1998::_Deque_base<bool, std::allocator<bool> >::_M_initialize_map(unsigned long) (stl_deque.h:601)
==3768==    by 0xB52ACA0: std::__cxx1998::_Deque_base<bool, std::allocator<bool> >::_Deque_base(std::allocator<bool> const&, unsigned long) (stl_deque.h:461)
==3768==    by 0xB5296D3: std::__cxx1998::deque<bool, std::allocator<bool> >::deque(std::allocator<bool> const&) (stl_deque.h:791)
==3768==    by 0xB52840E: std::__debug::deque<bool, std::allocator<bool> >::deque(std::allocator<bool> const&) (deque:73)
==3768==    by 0xB52786B: framework::UndoManagerHelper_Impl::UndoManagerHelper_Impl(framework::IUndoManagerImplementation&) (undomanagerhelper.cxx:221)
==3768==    by 0xB525882: framework::UndoManagerHelper::UndoManagerHelper(framework::IUndoManagerImplementation&) (undomanagerhelper.cxx:879)
==3768==    by 0x6872683: sfx2::DocumentUndoManager_Impl::DocumentUndoManager_Impl(sfx2::DocumentUndoManager&) (docundomanager.cxx:88)
==3768==    by 0x6870FB6: sfx2::DocumentUndoManager::DocumentUndoManager(SfxBaseModel&) (docundomanager.cxx:227)
==3768==    by 0x687A272: SfxBaseModel::getUndoManager() (sfxbasemodel.cxx:1677)
==3768==    by 0x260E562A: (anonymous namespace)::getUndoManager(com::sun::uno::Reference<com::sun::frame::XFrame> const&) (PagePropertyPanel.cxx:74)
==3768==    by 0x260E6C60: sw::sidebar::PagePropertyPanel::PagePropertyPanel(Window*, com::sun::uno::Reference<com::sun::frame::XFrame> const&, SfxBindings*) (PagePropertyPanel.cxx:189)
==3768==    by 0x260E593C: sw::sidebar::PagePropertyPanel::Create(Window*, com::sun::uno::Reference<com::sun::frame::XFrame> const&, SfxBindings*) (PagePropertyPanel.cxx:101)

The SfxBaseModel creates the DocumentUndoManager on demand at
sfx2/source/doc/sfxbasemodel.cxx:1685

m_pDocumentUndoManager is a rtl::Reference but debugging into the
acquire/release I see that the
DocumentUndoManager::acquire/DocumentUndoManager::release forward to those of
SfxModelSubComponent which forward them to its rModel without doing anything
else, so the implementations of
DocumentUndoManager::acquire/DocumentUndoManager::release don't actually do
anything directly to the DocumentUndoManager itself so there is nothing that
will really release it.

Either the rModel needs to explicitly destroy it somehow, given that the
acquire/release delegate responsibility to it, or the whole thing is addled.

I rather feel it's addled, so implement as a normal WeakImplHelper1, but
cowardly in addition also keep acquire/release on the rModel.

Change-Id: Ib52544a9276fd8d9d489ad6b6afda12498cc39fa
2014-05-29 11:02:45 +01:00
0f2824b117 remove more unnecessary use of OUString constructor
Change-Id: Iae14cb3df65295b6894fd9e05411c5698e9c8aba
2014-05-27 08:20:12 +02:00
9af0abebfd remove unnecessary use of Reference constructor in throw
Convert code like this:
  throw IOException("xx",
     Reference< XInterface >(static_cast<OWeakObject*>(this)) );
to this:
  throw IOException("xx",
     static_cast<OWeakObject*>(this) );

Change-Id: Ife9f645f0f1810a8e80219126193015502c43dbb
2014-05-27 08:20:11 +02:00
e576deff6a coverity#705232 Missing break in switch
Change-Id: Ifa6de9e9d1138e4962cd8cf0716fd6e06894c34f
2014-05-26 10:18:24 +01:00
5befa0c5c2 Correct #endif placement (avoid linking error for TiledLibreOffice)
Change-Id: I37577456740b4dd255df22047ce7740bd1e43ace
2014-05-23 18:30:18 +03:00
e7bc3cab01 remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.

Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
43bea0e2f7 Avoid including <config_features.h> in <sfx2/objsh.hxx>
Change-Id: I36969367e47c1ed1368ed46638ff9e7768e8a008
2014-05-23 14:29:59 +03:00
93dd12a160 coverity#1215382 Uncaught exception
and hopefully a gadzillion more, but I've said that before :-(

Change-Id: I2e36485ae2ce831fdf250464b254d42f5bc55fe3
2014-05-23 08:54:37 +01:00
6e87f0bb75 Update also revision and editing time when setting 'modified' properties.
Change-Id: Id756ef6dd62ca8df2e62265b9cc930f07d13f2e3
2014-05-22 13:56:23 +02:00