Commit Graph

752 Commits

Author SHA1 Message Date
f6c0803e99 itemdel.[ch]xx is only used in sfx2
Change-Id: I240f15f87e27ba8a52bab244f8c784d527bff179
2014-08-26 13:34:04 +02:00
702b981d9a QueryBox MSG_QUERY_OPENASTEMPLATE -> MessageDialog + string
Change-Id: I031a145ca62e3bf7e74b9d447ff8bb041974daa6
2014-08-25 12:27:52 +01: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
5e531e121f fdo#75757: remove inheritance to std::vector
Change-Id: I621286f0b64ff464bc29310ba79e416abc5791d8
Reviewed-on: https://gerrit.libreoffice.org/11042
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-20 09:07:42 -05:00
58e6fbe1a8 remove unused WarningBoxes
Change-Id: I07c457a49646703af5d13f83ba033340309ee655
2014-08-18 05:23:52 +02:00
3352a88c8c remove dead ToolBox RID_HELPBAR
Change-Id: Ide31f67c346f9a82bf6aa8282caa7cfcee65d9fd
2014-08-18 05:22:54 +02:00
9fbb4c6cf4 convert WIN_HELPINDEX sport to .ui
Change-Id: I80d1f3f3cb4e062bc19489205e325bc4ff17b3c6
2014-08-15 13:52:57 +01:00
0c830d899d reduce num of FilterOptionsRequest includes
Change-Id: I403bb7b96e8bcaa6138cdd9be823657bc47fa7ca
2014-08-14 16:09:33 +01:00
a247b8257a fdo#75757: remove inheritance to std::vector
... by replacing the following 3 classes with typedefs of std::vector:
 SfxObjectShellArr_Impl / SfxViewFrameArr_Impl / SfxViewShellArr_Impl
and the following 4 with typedefs of boost::ptr_vector:
 SfxChildWinFactArr_Impl / SfxMenuCtrlFactArr_Impl /
 SfxStbCtrlFactArr_Impl / SfxTbxCtrlFactArr_Impl

Change-Id: I1754bd19ec418a3e7ba5c47fb6d8568e8fca9b29
Reviewed-on: https://gerrit.libreoffice.org/10891
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-13 08:53:48 -05:00
3108a3dd38 sfx2: remove another DBG macro that arose from the grave
The callers in dispatch.cxx use methods that were removed by commit
a1ce4fb4f0dbc3c4141f510e5b2b732a24d862c8 - not sure if this warning is
useful or not.

Change-Id: I8bb654de8e26c054318dd2037055a85d013c8bfa
2014-07-24 14:11:40 +02:00
6d2178b8c8 inline tools::SvRefBaseRef typedef
..it is only used in two places

Change-Id: If333936b26592ed44d3525f2eb3c21aafde7dddc
2014-07-14 13:30:55 +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
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
bb761be472 Change SfxTabPage ctor SfxItemSet param from ref to pointer
...and also corresponding param of CreateTabPage function type and corresponding
Craete functions.  There were some call sites that passed undefined "null
pointer references" and SfxTabPage internally uses a pointer member pSet that is
checked for null anyway.

Change-Id: I4eb3636155eac46c9c9d26e6e6e842e85d7e95af
2014-06-11 14:39:04 +02:00
a92e973b6d Change SfxTabPage::Reset param from ref to pointer
...there was a call site that passed undefined "null pointer reference"
(apparently in a case where the passed argument was actually unused)

Change-Id: I663d4264b7a84f44ca69c732f3bc502f614b2b2a
2014-06-11 10:39:03 +02:00
4dbeadb9c1 Change SfxTabPage::FillItemSet param from ref to pointer
...there were a number of call sites that passed undefined "null pointer
references" (apparently in cases where the passed argument was actually unused)

Change-Id: I19799e90f0cd8e98367782441a5ea9df27b59830
2014-06-10 17:25:23 +02:00
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
7a211e834f Resolves: fdo#79360 impress hangs on using sidebar new style
because those styles are "pseudo-styles" and a new one cannot be
added. The possibility is supposed to be disabled, and it is
disabled in the floating stylelist. The old code assumes there
can only be one of these stylelists and when a stylelist
queries if the "new" should be disabled the callback asks
the stylelist what family is selected, but only asks the floating one.

So, floating closed, sidebar open, the new is not disabled.
Implement the ancient TODO now that we have to. Instead of asking
the stylelist what family is selected, query the frame for what
is the current SID_STYLE_FAMILY as set by whatever is the active
stylelist.

What's disturbing is the SID_STYLE_FAMILY values are not SfxStyleFamily, but
indexes that have to be mapped to SfxStyleFamily. I bet there are a pile of
bugs around that, especially with little islands of different conversion
codesites

Change-Id: I85c8032d7c26ae6eea245685748f89b2a860e767
2014-05-30 11:38:04 +01:00
fa551c4224 remove unused virtual method, slim this down initially
Change-Id: Ie4a912cc3c144c47a4bb59551ebb1c68f302569e
2014-05-29 12:01:23 +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
947feaa896 pTemplateCommon is never set, so always NULL
Change-Id: I2311b33034c281cba66d7cce80a6556e27b2b322
2014-05-29 10:30:28 +01:00
56c4dbe523 cid#707147 Uncaught exception
Change-Id: Ie49e70c3fa7704727129e613814aaf559d1a7fb6
2014-05-27 10:50:04 +02:00
838c580fdb fdo#78536: sfx2: template dialog: make the am-i-dead-yet check reentrant
In the fine tradition of our enterprise-grade code base, this lets the
check in SfxCommonTemplateDialog_Impl::Execute_Impl() do an early
return if the "this" instance has signalled its untimely demise even if
there are multiple calls of Execute_Impl() on the stack; extending
the scheme with further epicycles to make it work if the Execute_Impl()
calls happen on 2 different threads is left as an exercise for the
interested reader.

(regression from bcc52fb2ebdf77a1cc089857775fd742085b45b6)

Change-Id: I1d9f0d82bf6d9f5da8f9bd2be57d01937d71fd26
2014-05-19 22:24:07 +02:00
6c29c3d178 remove commented out line
Change-Id: If80632525d88ed889291913b172fa3cb2a3ac956
2014-05-19 20:04:23 +02:00
2bd7767d01 Resolves fdo#70681: fixincludeguards.pl: all that's left
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5
Reviewed-on: https://gerrit.libreoffice.org/9360
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-15 12:50:46 +00:00
248145f99e Find places where uno::Sequence is passed by value.
Implement a clang plugin to find them, and clean up existing code
to pass them by reference.

Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8
Reviewed-on: https://gerrit.libreoffice.org/9351
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-14 08:10:22 +00:00
93f5d5a919 The opaque PostUserEvent IDs are actually pointers
...so declare them as such.  This avoids the recurring mistake of storing such
IDs as sal_uInt32, truncating in 64 bit environments, causing RemoveUserEvent to
potentially not remove the event, it thus firing "too late" and probably causing
a crash.

While at it, consolidate the trivially unnecessary overloads of both
Application::PostUserEvent and Window::PostUserEvent.  And in each of them, it
looks like deleting the mpLink member was missing from the failure branch.

Change-Id: Iab13afbb06e12ac15dec6a6b5b85a7e402a3c654
2014-05-07 11:49:46 +02:00
702f9c5176 huge hrc and src file cleanup
* mostly fallout from ui conversion
* some completely unused defines from src files
* lots of unused HID ids

Change-Id: I976561205798db3d06ee139de6223f638e58f47a
Reviewed-on: https://gerrit.libreoffice.org/9142
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2014-04-23 22:49:57 +00:00
1d25e1de0b Clean up function declarations and some unused functions
Change-Id: I9d6e9df0b686c61597aaa0e194ab321445671a20
2014-04-10 09:31:46 +02:00
bf621a2e28 Remove unused MakeVariable
...unused ever since at least fd069bee7e57ad529c3c0974559fd2d84ec3151a "initial
import."

Change-Id: I6ec792b68ce6b13b1cf074d9719a23daf3356e66
2014-04-09 16:13:32 +02:00
380d4600d7 use TriState instead of sal_Bool as there's three possibilities
Change-Id: If24d4cec9ef4369f20419fe70de7392614a35316
2014-04-08 09:18:33 +01:00
74fdda0cd4 sfx2: sal_Bool->bool
Change-Id: I48ae51781f64e60deb0c03352087100729c8c3cd
2014-04-07 13:53:50 +02:00
5babf1b903 remove unnecessary scope qualifier from sal_Bool uses
i.e. convert "::sal_Bool" to "sal_Bool"

Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-04-03 13:54:02 +02:00
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00
6ef2df7b9b Remove remaining DBG_NAME* uses
...that had been used for DBG_CTOR, DBG_PROF, etc.

Change-Id: I8eac38e24b7110511feb7813aaf5a20ab82bdbe0
2014-03-28 17:26:09 +01:00
567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00
512de6e75d sfx2, sc: remove macros for using Windows NT Call Profiler
Apparently this tool was available for early versions of NT; googling
finds a caplib.zip from 1992 but that is missing the CAP.dll so there's
no way to use this anyway.
http://cd.textfiles.com/cica/cica9308/UNZIPPED/NT/CAPLIB/CAP.TXT

Change-Id: I4718af0e175b78bcdad38bbca0fc9579b3b12111
2014-03-27 14:28:11 +01:00
1e1de35571 sfx2: why is this debug stuff WNT-only?
Change-Id: I8768ebc523b03a469f8b9bb49e015ca7d140fc96
2014-03-27 13:55:40 +01:00
65391bdefa sfx2: s/SAL_LOG/SAL_INFO/ in WNT-only code
Change-Id: I0e7c241e0ee9c7d2ace75d8a935ee068da80fb6d
2014-03-27 13:53:19 +01:00
34002c4e5c sfx2: sal_Bool->bool
Change-Id: I1fd02cc148fd9a54d2092dad1e548f51a0813a14
2014-03-27 13:45:09 +02:00
ffca950230 sfx2/childwin.hxx: sal_Bool->bool
Change-Id: I4fe18964a3178c797ce6e1fe259ec230c2de6eb7
2014-03-27 13:45:09 +02:00
5fb78604c1 Split TYPEINFO into plain and TYPEINFO_OVERRIDE
...where the latter contains SAL_OVERRIDE annotations

Change-Id: Id64794b388d83dfe7026440e8b20a5b5efd412d1
2014-03-26 11:54:55 +01:00
351c4bcf83 Adapt to sal/log.hxx
Change-Id: I1af793393a1aceba7a53c85a4943a9b81362a918
2014-03-25 16:17:08 +01:00
5e9e04c9a8 Adapt to sal/log.hxx
Change-Id: Ifb0f400136365d85170fbc4c33573ffec6a4bfcd
2014-03-25 16:17:08 +01:00
436cd90095 svtools: sal_Bool->bool
Change-Id: Ifd3e643dbc6755839ad4af73ae141fd115ddb4f4
2014-03-25 14:32:56 +02:00
a8f721ff96 sfx2: sal_Bool->bool
Change-Id: I626371bac4fbd9c6a2cdc5a57a3022f8b6ac55b2
2014-03-14 07:50:34 +02:00
5fe7ecc04f sfx2: sal_Bool->bool
Change-Id: I56a50ee4a169c8f82c830ebf498f7ead1335f0b5
2014-03-14 07:50:34 +02:00
8ad74d8866 Related: #i124392# fill in SidebarDockingWindow::DoDispose
(cherry picked from commit 952f581cb77f52e9aaa974496dc8d86b335cb424)

Conflicts:
	sfx2/inc/sfx2/sidebar/SidebarChildWindow.hxx
	sfx2/source/dialog/templdlg.cxx
	sfx2/source/inc/templdgi.hxx

Change-Id: Idf06437dfc45e02d9e2303df84d52ba0837de108
2014-03-13 11:35:13 +00:00