Commit Graph

3523 Commits

Author SHA1 Message Date
David Tardon
31ba2cb2fc add convenience functions to handle dirs
Change-Id: I81c94565e09e0d839d95bf4f09b029838bb37ad5
2014-06-04 15:48:39 +02:00
Noel Grandin
6f2edd4514 new loplugin: inlinesimpleaccessmethods
Create a rewriting plugin for finding methods that simply return
object fields, and should therefore be declared in the header,
so that the compiler can reduce method calls into a simple
fixed-offset load instruction.

Change-Id: I7a620fc54250b79681918dc31ed9a8f21118c037
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-06-04 14:49:08 +02:00
Caolán McNamara
3d8eee45c9 coverity#705388 Mixing enum types
Change-Id: If80361ac234c5079c9fcadb0a2f5fa05ea6b407b
2014-06-04 12:34:14 +01:00
Noel Grandin
adc20c3937 compareToAscii -> equalsAscii
convert places using compareToAscii that should be using equalsAscii

Change-Id: I97b4da7f6e867c3967b2f65b70d6886f83b4a4e5
2014-06-04 11:52:31 +02:00
Caolán McNamara
6b44b03c13 coverity#737244 Uncaught exception
Change-Id: I9e34e14d1266310458bb491259e4bf9880e8a19f
2014-06-04 09:38:12 +01:00
Caolán McNamara
ae6b606f57 coverity#737243 Uncaught exception
Change-Id: I4bef14453d076f11066a695bc4a948cea5cfd40b
2014-06-04 09:38:12 +01:00
Caolán McNamara
1d2993df98 coverity#737167 Uncaught exception
Change-Id: I9ac3ffbecf8c9efc0b69ad4606c61dbf8fa5a0e9
2014-06-04 09:38:12 +01:00
Laurent Balland-Poirier
a4440671a9 fdo#79597 Password UI: correct typo for 1 character
Display a different string in case of 1 character for minimum length

Change-Id: Iba2fbbb7d4101718def7c79ce5354debf5d97041
Reviewed-on: https://gerrit.libreoffice.org/9631
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-04 08:29:03 +00:00
Stephan Bergmann
369d95931f DeInitVCL at end of tests
This required some changes to the framework:

* Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but
  once per CppunitTest invocation in a new vclbootstrapprotector (similarly to
  the exisiting unobootstrapprotector).  CppunitTests that need VCL now need to
  declare gb_CppunitTest_use_vcl.

* For things to work properly, the UNO component context needs to be disposed
  from within DeInitVCL (cf. Desktop's Application::DeInit called from
  DeInitVCL).  The easiest solution was to introduce an
  Application::setDeInitHook (where the hook is called from DeInitVCL)
  specifically for vclbootstrapprotector to call.

* PythonTests don't (yet) call DeInitVCL; they still hook into
  BootstrapFixture's original test_init functionality (to call InitVCL), and do
  not make use of the vclbootstrapprotector.

Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
2014-06-04 08:55:12 +02:00
Markus Mohrhard
f634cda2a2 avoid problems with poppler's and vcl's FontInfo during runtime
Change-Id: I1dbd256812cccae1e6ed0ad8bb34ce427e5e5be8
2014-06-04 07:49:15 +02:00
Markus Mohrhard
d0bf70d2a4 remove whitespace
Change-Id: Ia5ed1a0c12ffc95b31cbbd43b6291218935e2296
2014-06-04 07:49:13 +02:00
Markus Mohrhard
c7cfe03812 remove whitespace
Change-Id: I1998ee6528e9d55997029d68a2bdc71a70dd2411
2014-06-04 07:49:13 +02:00
Markus Mohrhard
29b705e580 remove whitespace
Change-Id: I03aa2e78a57bda64119458eb72beade39240ab39
2014-06-04 07:49:13 +02:00
Markus Mohrhard
9e908d3104 remove whitespace
Change-Id: Ifa5d662a3ef723c29b4d6839f16d4b920e1c773d
2014-06-04 07:49:13 +02:00
Tor Lillqvist
5b886c730e Add (debugging) function to get the symbolic name of a MetaAction
Change-Id: I3c1e5c23e7be636cc93c97da0c2db00ebb1050e3
2014-06-04 00:02:15 +03:00
Eike Rathke
cc520b6eb7 unknown log area [loplugin:sallogareas]
Change-Id: Ic749d5e8c22d14c0c1160c30b4813226c3962236
2014-06-03 20:23:14 +02:00
Eike Rathke
85d1b74fd0 eliminate xub_StrLen left-over
Change-Id: I4862481d69ac86bf082e35b28d6326444deafee8
2014-06-03 15:39:45 +02:00
Eike Rathke
fecde4c709 add bDisallowPrivate parameter to LanguageTag::isValidBcp47()
Change-Id: I0924b0fa268c38c238226d082cf26595bba72f0c
2014-06-03 14:48:45 +02:00
Tomaž Vajngerl
1b23e46051 vcl: Refactor scale "super" out of bitmap and make it independent
Introduce BitmapFilter as a general bitmap filtering class, and
make scale "super" algorithem independent as BitmapScaleSuper
which uses BitmapFilter as superclass.

This is an ongoing work to make some bitmap algorithms structured
and more independent from the big bitmap class This will make them
easier to work with, test and optimize.

Change-Id: I37d29709b2af95cab2f6da21129302f5be79318b
2014-06-03 12:03:25 +02:00
Noel Grandin
2537d2dd49 convert some sal_uInt8 fields to bool
Change-Id: Icd5845367157cc0b0c9342c6037b199c49432a76
2014-06-03 08:21:39 +02:00
Eike Rathke
b247e5f77d add LANGUAGE_USER_FRENCH_TOGO 0x8C0C [fr-TG] French (Togo), fdo#79353
Change-Id: Id1e127a3652d4bef280327c2a62d95c17c012656
2014-06-02 20:34:03 +02:00
Eike Rathke
4ffdd43ae4 add LANGUAGE_USER_FRENCH_NIGER 0x880C [fr-NE] French (Niger), fdo#79352
Change-Id: I6d793317bc1caef4a95275bad263a5b2feac12e4
2014-06-02 20:33:57 +02:00
Eike Rathke
3a14b9357f add LANGUAGE_USER_FRENCH_BENIN 0x840C fr-BJ French (Benin), fdo#79351
Change-Id: Idc54b0fae9283d795b79231214cf14aae43adca2
2014-06-02 20:33:50 +02:00
Caolán McNamara
09188ebfc4 coverity#706959 Uncaught exception
Change-Id: I6b18bd2df7ef190b39ceacd625bf2b62a53892fa
2014-06-02 17:00:00 +01:00
Caolán McNamara
630d481210 coverity#1213461 Uncaught exception
Change-Id: I4c0a28ea11e0d38837a3b338928073d32d2b6abe
2014-06-02 16:59:59 +01:00
Caolán McNamara
f630705f09 callcatcher: update unusedcode
Change-Id: I73ff045699113778892db6a534433a70e0e9c8e1
2014-06-02 16:59:56 +01:00
Stephan Bergmann
f87859b88f Fix memory leaks in test code
Change-Id: Ifa756a5da636e0b37654ad83900115872bc40f0e
2014-06-02 15:45:28 +02:00
Jens Carl
8e115c6008 fdo#68849: Add header guards to all include files
added header guards for directories basebmp/, chart2/, cppuhelper/,
include/test/, io/test/, sax/test, shell/, writerfilter/, and xmlhelp/

Change-Id: I0e29a9b75c26d71f58aa98986b52f6d3b46015a6
Reviewed-on: https://gerrit.libreoffice.org/9615
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-02 08:46:30 +00:00
Isamu Mogi
4452ac2322 Fix hungarian prefix for calendars
Change-Id: I78b3c0a8d32610e86e09ab5ad6da6cc4e0395926
Reviewed-on: https://gerrit.libreoffice.org/9566
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-01 16:22:12 +00:00
Stephan Bergmann
909a76c7da New loplugin:inlinevisible to flag inline functions marked DLLEXPORT
...which does not make sense.  On Linux and Mac OS X, they potentially end up
exported from multiple libs (weakly, though), while on Windows the potentially
even end up not emitted at all, which could cause link errors.

Change-Id: I092c9ba39e686c17b6e91581cdd4753f1c4d582f
2014-05-30 14:12:31 +02:00
Zolnai Tamás
53c376d35b bnc#870237: wrong text position in grouped list
In grouped list text area does not cover the whole
shape but just a part of it at the top.
To get the same visual effect modify text distance
attribute.

Change-Id: I32f30d0afbc1975f940c4562ec65f46596e97060
2014-05-30 13:45:36 +02:00
Noel Grandin
b88ab17551 header guard naming consistency
Change-Id: Iebbf5c586f5d2961be98b12638def3adbadef136
2014-05-30 13:05:55 +02:00
Caolán McNamara
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
Tor Lillqvist
340bcdea84 Revert "Add function to catenate n copies of a string"
COMPHELPER_DLLPUBLIC of an inline function is wrong. Nevermind that I just
followed the example of the preceding functions.

And it is too bikeshedding-inducing anyway to use recursion.

This wasn't used anywahere yet anyway in committed code, just locally in a
tree of mine. Will add a local copy there.

This reverts commit ee0d7d4c52.
2014-05-30 12:09:18 +03:00
Jens Carl
9e3cc6b474 fdo#68849: Add header guards to all include files
Added header guard to files in directories i18npool/, include/, and io/

Change-Id: I7ba5b5f0ffdf5dedb8fd40e8efa06936e7c23591
Reviewed-on: https://gerrit.libreoffice.org/9558
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-30 01:45:21 -05:00
Kohei Yoshida
a916b6ff7f Detach all DocBasicItem objects upon process termination.
To prevent rogue DocBasicItem objects (which are global objects) from
attempting to stop listening after the main app is dead.

Change-Id: I68a667137ca4e0eff18278f4d2d5dd67466eaf34
2014-05-29 21:59:48 -04:00
Lionel Elie Mamane
1380ddf85a Allow STYLE_OPTION_MONO to be unset from toolkit-created window
This was keeping form controls (e.g. CheckBox and RadioButton) to
transition from flat style to 3d style, while the 3d-to-flat
transition was allowed, making flat some unescapable pit of doom.

Whatever the goal of that pinning, it will have to be achieved in a
different way.

Change-Id: Icc4dfb9673a7dfe4a7d8726fbfd23f75499f8b41
2014-05-29 17:55:50 +02:00
Tor Lillqvist
ee0d7d4c52 Add function to catenate n copies of a string
Change-Id: Iba203e18fea2a374e0e0b5c988012ee8fd5369e7
2014-05-29 15:16:51 +03:00
Tor Lillqvist
3f0678bfc8 Some spelling corrections
Change-Id: Ie77596a51a6a37e9f59a6ba14bdde7994efd29ad
2014-05-29 14:29:43 +03:00
Caolán McNamara
fa551c4224 remove unused virtual method, slim this down initially
Change-Id: Ie4a912cc3c144c47a4bb59551ebb1c68f302569e
2014-05-29 12:01:23 +01:00
Caolán McNamara
da6df38b41 Related: fdo#79392 std::out_or_range -> terminate
Change-Id: I0aada90e9ea4e9fc92fd9c365aa9c7171cb10a55
2014-05-29 11:02:46 +01:00
Caolán McNamara
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
Caolán McNamara
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
Markus Mohrhard
194c670926 try to fix mouse interaction on windows
Change-Id: I8662b0c20dc719401eec3e3d2d852bb3e139a641
2014-05-28 17:57:15 +02:00
Caolán McNamara
abe5aaa726 coverity#706505 Uncaught exception
Change-Id: Ia00361fb1d86223a7ed65f0be295b291183e3ad6
2014-05-28 13:49:51 +01:00
Stephan Bergmann
480bb72515 Avoid undefined computation of unaligned pointers to multi-byte objects
Change-Id: Iafca1288e044ab4650b004439027c134e159b45f
2014-05-28 14:34:13 +02:00
Caolán McNamara
05e2fd162e Related: fdo#79142 make SetName default to Reindexing
Change-Id: I408042bc7bf1a5a955203d65d2c68ebf9527b9b5
2014-05-28 13:25:12 +01:00
Caolán McNamara
aa8b268935 Resolves: fdo#79142 When Creating Styles - The 2nd One Always Replaces the 1st
regression from 0c17ccc493

I think it might actually make more sense for SetName to always Reindex
and have another SetNameNoReindex for selective use where its known
safe to get away with it

Change-Id: I6bf7e1f45130f741954ab525b838f3ac5ff61a89
2014-05-28 10:44:59 +01:00
Noel Grandin
9116edcfa7 cid#706953 Uncaught exception
Change-Id: I4c46e98a8382ac39786ffb6607bd3ecdb57b3914
2014-05-28 10:00:54 +02:00
Tor Lillqvist
202708afc6 Avoid duplication of two #defines
Split out the META_*_ACTION defines into a separate file.

Change-Id: Ie211b4d8b3720f1158d36347f27e5dfd5ca467b4
2014-05-28 07:41:07 +03:00