375639 Commits

Author SHA1 Message Date
Noel Grandin
26b4f5be81 java:use System.arrayCopy to copy arrays
instead of a for loop

Change-Id: I3fbd92c5f96970543c2da3843e54a733bf811e72
2015-06-09 13:10:44 +02:00
Noel Grandin
9a54161189 java:Return statement in a finally block
Change-Id: I57d9a38cbb7672033ff204567bfb2b58093db490
2015-06-09 13:10:44 +02:00
Noel Grandin
441407571e java:Non-synchronized method should not override a synchronized method
Change-Id: I46307828757ee1142747c14d2942515340083605
2015-06-09 13:10:43 +02:00
Noel Grandin
0f2007b11b more exception handling cleanup in Java unit tests
Change-Id: I8a826c1b31f99e8d1592f284094ff921ddac74ad
2015-06-09 13:10:42 +02:00
Noel Grandin
cc190ef25f there is no need to synchronize createTestEnvironment
the only caller of these methods is already synchronized

Change-Id: Icea587d71acba1eca2a97ae0138a69fa98063f50
2015-06-09 13:10:42 +02:00
Bjoern Michaelsen
57189ddd88 alias sw::UnoImplPtr to ::std::unique_ptr ...
- ... with a custom deleter
- and kill homegrown implementation

Change-Id: I9babf556dc75772f388d23fd05b916abb4bed497
2015-06-09 12:55:07 +02:00
Bjoern Michaelsen
a755edf0fb use new UnoCursorPointer in SwXTextPortionEnumeration
Change-Id: If6b64c92d4f6f786767802cc046ccd96bd8367cb
2015-06-09 12:55:06 +02:00
Bjoern Michaelsen
c9a343935f use UnoCursorPointer in SwXTextPortion
Change-Id: I8628fd1fecb3e2cf54704f9844ff921862da46e5
2015-06-09 12:55:04 +02:00
Bjoern Michaelsen
50924ebfd4 use UnoCursorPointer in SwXTextTableCursor
Change-Id: Ia58e286760e52191edbe968504e3db0967ce09d3
2015-06-09 12:55:03 +02:00
Bjoern Michaelsen
43c1b8d3fe add comment on possibly memory leak
Change-Id: I7e1fc471ca5930ceaff4b1c6c6ba351ff0594639
2015-06-09 12:55:02 +02:00
Bjoern Michaelsen
34040b3eef use UnoCursorPointer in SwXCellRange and SwChartDataSequence
Change-Id: I23d75d094c2b2dd8d234b608556a8b2339b7f166
2015-06-09 12:55:01 +02:00
Bjoern Michaelsen
30f3315d52 use UnoCursorPointer in SwXTextCursor
Change-Id: I46d464405d5de6460b10a2965e0c1f011c8142b2
2015-06-09 12:55:00 +02:00
Bjoern Michaelsen
a2c467a58a use UnoCursorPointer in SwNavigationMgr
Change-Id: I7c7431edd79cf4527f97c7dc0695d49174b61e2c
2015-06-09 12:54:59 +02:00
Bjoern Michaelsen
683bac5b96 another RAII
Change-Id: I11bb3ab21e3434574578cd7fbe03b0b75158e355
2015-06-09 12:54:58 +02:00
Bjoern Michaelsen
071c49da0c refactor out frame collection with layout
Change-Id: I977c9915414eedead860622b120f00ad811e18e9
2015-06-09 12:54:57 +02:00
Bjoern Michaelsen
41e43dc3d2 refactor SwXParaFrameEnumerationImpl ctor
Change-Id: I017a4b5ccc28d90e1464e8cbf60cffbc96324963
2015-06-09 12:54:56 +02:00
Bjoern Michaelsen
e4891cefd3 make FillFrames a member
Change-Id: I1582705ce3ae9cc7bbe33789a1626e8d7d3853cf
2015-06-09 12:54:55 +02:00
Bjoern Michaelsen
642088c5eb make CreateNextObject a member
Change-Id: I1bd9668a2567390ceceb1742483a9fdabc025db7
2015-06-09 12:54:54 +02:00
Bjoern Michaelsen
540027c366 simplify and inline trivial boilerplate
Change-Id: Idcf0ef3670209c6b68e4afac8efcd8ab463e4774
2015-06-09 12:54:53 +02:00
Bjoern Michaelsen
82eac6775f use ABC instead of Pimpl for SwXTextRanges
- abstract base class reduces boilerplate
- Pimpl is pointless here, except for SolarMutex, which is handled by
  overriding release

Change-Id: Ia08dc26104f70411a783ade681be3bcebb3b9acb
2015-06-09 12:54:52 +02:00
Bjoern Michaelsen
aa0301e6d9 RAII for ParagraphFrameEnumeration
Change-Id: I23d9beabe38587eca2b0620b5c431835ce70d37b
2015-06-09 12:54:51 +02:00
Bjoern Michaelsen
e132328187 use UnoCursorPointer in ParagraphFrameEnumeration
Change-Id: I5fdf0bdd8609aa07c49b155cc75cade8bdb2c292
2015-06-09 12:54:50 +02:00
Bjoern Michaelsen
4186d57213 inline trivial oneliners
Change-Id: I20b993f1775b2db9865487ed84c60e07fd0a4ced
2015-06-09 12:54:49 +02:00
Bjoern Michaelsen
736d19c404 use ABC instead of Pimpl for SwXTextRanges
- abstract base class reduces boilerplate
- Pimpl is pointless here, except for SolarMutex, which is handled by
  overriding release

Change-Id: I55df9b20c9b0a78412535f2cca37e04ddaccb5cf
2015-06-09 12:54:39 +02:00
Bjoern Michaelsen
f14a3a043d use UnoCursorPointer in SwXTextRanges
Change-Id: Iabcb98f664739aaae0d92b4f2a6b0e50bdcbc09b
2015-06-09 12:54:37 +02:00
Bjoern Michaelsen
fc87cdbd7b use ABC instead of Pimpl for SwXParagraphEnumeration
- abstract base class reduces boilerplate
- Pimpl is pointless here, except for SolarMutex, which is handled by
  overriding release

Change-Id: I191dc0fecd25937f41fd724355e88c04da89db61
2015-06-09 12:54:08 +02:00
Bjoern Michaelsen
e20d0ad2e8 use UnoCursorPointer in SwXParagraphEnumeration
Change-Id: I27813e34936bf9525e2931869ec33311fb5f59e2
2015-06-09 12:53:24 +02:00
Bjoern Michaelsen
3e01e7d572 add smart pointer for managing SwUnoCrsrs
Change-Id: I9db71fb4be78b5d6fda64217287efea6abd7d771
2015-06-09 12:53:24 +02:00
Stephan Bergmann
623359af23 loplugin:unreffun: workaround for visibility-adding redecls
Change-Id: Ic18b44942f4fe02083c0e8167e8c8d4205e66abf
2015-06-09 12:44:31 +02:00
Caolán McNamara
46a76be3a1 restore "crash on layout of novell622972-2.html" temporarily
This reverts commit dfedebd1e1912252bc2b5204a2b5371952b552cd.
2015-06-09 11:42:06 +01:00
Caolán McNamara
dfedebd1e1 Resolves: tdf#91695 partially Revert "crash on layout of novell622972-2.html"
This reverts commit 9857c6390212e16dd9f26b47b4afc5d33b5242ef.

Change-Id: Id47e982eb346c092991f07964c0146daefccb031
(cherry picked from commit 64dc505ce180a168798b725423a308207de42c63)
2015-06-09 11:32:59 +01:00
Stephan Bergmann
e52bae9370 -Werror,-Wignored-attributes ("attribute declaration must precede definition")
Change-Id: Iee0e9ef3a623706c33f84c34c1fbbf5b173f7f5d
2015-06-09 12:10:46 +02:00
Stephan Bergmann
3f0e8bdabe loplugin:unreffun
Change-Id: I2011b491012dfd623ece9fd24a265107ac690cba
2015-06-09 12:10:46 +02:00
Stephan Bergmann
9aa9baa788 loplugin:literaltoboolconversion
Change-Id: I85fa46de5b864369158d047fd3f7c683f10c822f
2015-06-09 12:10:46 +02:00
Stephan Bergmann
3a1a5b9744 -Werror,-Wunused-private-field
Change-Id: I76cf487c66e048b5e9d0877a1b690cd066b73528
2015-06-09 12:10:45 +02:00
Miklos Vajna
9805ae85eb sfx2: silence warning in SfxObjectShell::CopyStoragesOfUnknownMediaType()
I guess the intention is to catch all "own" formats, and Base is just
missing from that list.

Change-Id: I064068c2ab17db9109a9a4681775ba8d18292292
2015-06-09 12:08:19 +02:00
Miklos Vajna
2d7ff7aabc SwDocShell: custom copy for embedded data source definition on save-as
If "EmbeddedDatabase" in test.odt refers test.ods in the same directory,
that will be "../../test.ods". Now if we save test.odt in a different
directory, we need to re-save the embedded data source definition,
otherwise the relative reference will resolve to a non-existing path.

Relative references are normally not supported for embedded objects, so
this is not a problem, but for data sources they are, that's why they
are a special case here.

Change-Id: Id138b9cdc38f2de589d9b80c66f1a61174699770
2015-06-09 12:08:18 +02:00
Miklos Vajna
f01f31201f SwDBManager: extract StoreEmbeddedDataSource() from registration code
Change-Id: Ifc6471f58793cde057f354c4c6a549c073b7d34b
2015-06-09 12:08:18 +02:00
Noel Grandin
2a0dda3dfb remove some unnecessary exception wrapping in the Java tests
Modify createTestEnvironment so that it throws Exception. This
is appropriate for unit testing.
The wrapping adds no value and the calling method already has
a catch(Exception) to handle anything.

Change-Id: I430a414f63d2cbfc3b65ecfde0285509265e5192
2015-06-09 11:34:31 +02:00
Caolán McNamara
60f8dd78fa Resolves: more crash on export of ooo47778-3.sxw to docx
This is more of the horror where the table in the frame has its cells out of
visual sequence, extend the previous fix of this kind to accept cells within
the original unmodified selected range

Change-Id: I6e8220f712fe9de5d4b98fb3cb5ed67e3762e929
2015-06-09 10:34:01 +01:00
Caolán McNamara
fce7587b4d combine duplicate code into shared method
Change-Id: I76d50a135153a7022b481e4025f9b5f948ce7efa
2015-06-09 10:34:00 +01:00
Caolán McNamara
3d47d9d9b9 cppcheck: unreadVariable
Change-Id: Ia16c1ba6052e8cf86762be095930b7e748f4493d
2015-06-09 10:34:00 +01:00
Caolán McNamara
ad62165065 cppcheck: noExplicitConstructor
Change-Id: Ic33ee6936f40bec4f3a82aea39a180ae6e9a0928
2015-06-09 10:34:00 +01:00
Caolán McNamara
cc0e9a37de cppcheck: variableScope
Change-Id: If0c56c89e2722d47a401363f3854331229856490
2015-06-09 10:33:59 +01:00
Stephan Bergmann
0eb52534de Unlock SwCacheObj before potentially deleting it from SwCache
Running e.g. CppunitTest_sw_ooxmlexport under UBSan revealed problems with
SwBorderAttrs instances with dangling pOwner pointers, which caused bad memory
access during exit when ~SwCache calling ~SwBorderAttrs tried to use pOwner.

The problem started with a4dee94afed9ade6ac50237c8d99a6e49d3bebc1 "tdf#91260:
allow textboxes extending beyond the page bottom" (and hadn't changed with
follow-up 2f779fc046c9afec04b4a4500b213e77aee51ae1 "tdf#91260: cleanup -
textboxes extending beyond the page"):  The call to

  pFrameFormat->SetFormatAttr(aSize);

in SwAnchoredObjectPosition::_ImplAdjustVertRelPos ultimately calls
SwCache::DeleteObj on the SwBorderAttrs instance that is locked by the

  SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );

down the call stack in SwFlyFreeFrm::MakeAll.  That means that
SwCache::DeleteObj will return early without doing anything (apart from
triggering the OSL_ENSURE "SwCache::Delete: object is locked."), leading to this
leftover SwBorderAttrs instance causing trouble during ~SwCache.

The scope of aAccess in SwFlyFreeFrm::MakeAll had always extended well past the
uses of rAttrs (= *aAccess.Get()), covering also the

  if ( !mbValidPos )

block (that contains the call to MakeObjPos leading to the call of
SwAnchoredObjectPosition::_ImplAdjustVertRelPos), ever since
84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import."

With cb19042f4395c97d123a27c6960d5e30d666c010 "New feature: vertical alignment
for text frames: Layout part," an additional use of rAttrs (in
MakeContentPos( rAttrs )) had been added after the block calling MakeObjPos.

The hope is that (1) it is OK to release aAccess earlier, after any (original)
uses of rAttrs, but before the call to MakeObjPos; and (2) it is OK to just set
up a second aAccess/rAttrs for the later added use of rAttrs in the call to
MakeContentPos.  (That is, to punch a hole into the aAccess scope, so that
ultimately SwCache::DeleteObj succeeds on a now-unlocked SwBorderAttrs.)

Change-Id: I7cb9919b1c9d7c87464ac3a0fe1edfed5b46e122
2015-06-09 11:18:21 +02:00
Pranav Kant
2afe94dbfc tilebuffer: tileSize as member variable is superfluous
Change-Id: I1eae8c96c12ba4d272341f45fee6c1fd66ab9e28
2015-06-09 10:44:24 +02:00
Pranav Kant
16222190ec tilebuffer: ZoomFactor as member variable is superfluous
Change-Id: I9f533f577f959c9a715e5214be99ca59cb0d206c
2015-06-09 10:44:24 +02:00
Pranav Kant
03655e67cb lokdocview: Make tilebuffer an instance
Change-Id: I06dae2e7a5067160326f4c65f5975c4e5afb05ce
2015-06-09 10:44:24 +02:00
Miklos Vajna
a0ce0dd519 libreofficekit: fix RHEL5 build of tilebuffer
Change-Id: I27da86c774f0450c844e742563c4a8de3f23ad34
2015-06-09 10:44:23 +02:00
Pranav Kant
0e947f3313 lokdocview: mark *_get_type() with const function attribute
Use G_GNUC_CONST that adds const function attribute to
lok_doc_view_get_type() for better performance.

Change-Id: Id79f0395a98c4f98b46303e9b5ee1e103fbe331f
2015-06-09 10:44:23 +02:00