Commit Graph

2690 Commits

Author SHA1 Message Date
9991b50ccc Make opengl chart window always active
Fortunately there is a special ole object group with
the MS_EMBED_ACTIVATEWHENVISIBLE flag which define this
behaviour.
Problem is that both Aspect and EmbedMisc are MS specific
enums so we can't use them directly for non-MS objects. But we
can handle opengl charts the same as this ole object group.

Change-Id: I49abeffce319cbb775709a72ba198a1f76b65374
2014-08-29 17:40:27 +02:00
bd9a4e1922 ChartHelper::IsChart is useless
EmbeddedObjectRef has an own IsChart method with the same
behavior.

Change-Id: Ib06699186466bf3da2bd67d7c631a5216463fb14
2014-08-29 17:40:27 +02:00
75028bd82a fdo#75757: remove inheritance to std::vector
Change-Id: I1874b5b4a059ef5fc8818b3b49ff10f2917b20ca
Reviewed-on: https://gerrit.libreoffice.org/11135
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-08-27 05:29:42 -05:00
2f5e266e97 Refactor NumRule handling in CopyImpl
The bug fix for i#86492 added a lot of duplicated code. This moves
the code into their own functions and uses macros to make the
resulting code even more readable.

Change-Id: Ifa0ece26f3152f1f8d8c65173b459e8c14c5b43a
Reviewed-on: https://gerrit.libreoffice.org/10968
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-26 07:43:36 -05:00
8ad8d87832 SwXServiceProvider::MakeInstance() requires a SwDoc
Change-Id: I2522e43100baa691baeb55947bb47ce7ccabb5b4
2014-08-25 21:49:36 +02:00
30ae83c268 fdo#82577: Handle KeyCode
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11
KeyCode typedef.

Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-08-23 22:33:30 +03:00
53ce805b43 Avoid unnecessary invalid downcasts
...to SwFmtFtnAtTxtEnd instead of SwFmtEndAtTxtEnd, both derived from
SwFmtFtnEndAtTxtEnd

Change-Id: I4b909f136268058bedeacd6b47d3f4cd88522ad5
2014-08-22 17:01:51 +02:00
9f01ba1b78 i#107771: sw: burn, UnoCallBack, burn!
Change-Id: Ifdb6d4b2e404bd160e6fcec3229691e750bdf698
2014-08-20 16:40:18 +02:00
e54015d06f i#107771: sw: make SwXFootnote a client of its format poolitem
In other words, stop registering at SwDoc's "UnoCallBack".

Change-Id: Ie73c707b0f43559cc78717c0879d5e9a9335a7ac
2014-08-20 16:40:17 +02:00
00b5f1ef2e i#105557: thread-safe caching of SwXFrame instances
Replace SwXFrames::GetObject() with factory functions that use the
WeakReference SwFrmFmt::m_wXObject to cache the instance in a thread-safe
way.

Change-Id: If56e4d7f95cb4f2e112139f228fb832ae9bf7d76
2014-08-20 16:40:08 +02:00
15295ab6db Refactored SwDoc::GetEditShell .
Removed its output paramater as GetCurrentViewShell should be
used instead and added a const version.

Change-Id: Iad8b57553b6e93e3472ce8c6905d08e8d49af770
2014-08-19 21:57:06 +02:00
d21d5a7261 drop unnecessary shl.hxx includes
Change-Id: Ieb984987c4a4f888a563377e0500444b12f43506
2014-08-18 12:59:49 +01:00
a51c423743 Consistency around SdrMetricItem in svx/sdsxyitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I3734cb14b6ed8f556af85b234968682a55ac8a4c
2014-08-18 10:55:36 +02:00
bdf6acced0 fix build
Change-Id: I9db0befd075089f346b504f91657a67dc01c9808
2014-08-18 04:55:44 +02:00
2579adb131 fdo#81750 MM: correctly convert inline-edit fields
The new inline-editable input fields contain real content in the
node, therefore a single SwPaM::Move isn't sufficient to select
the field or move after the field.
For the input fields we can directly go to the end of the field.

Change-Id: Ic1bce415ce45e49456121b6db003ded0733e195c
Reviewed-on: https://gerrit.libreoffice.org/10834
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-17 16:22:35 -05:00
47e2fd0dc8 Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
2014-08-16 21:52:32 +02:00
384cb5ff7b Consistently use size_t and SAL_MAX_SIZE
Instead of a mix of sal_uIntPtr, sal_uLong, int, and so on.
Also change CONTAINER_ENTRY_NOTFOUND=ULONG_MAX to SAL_MAX_SIZE as
return value in case of failure and in the related tests.

Change-Id: Ie778a849253b4be84fbcdab9557b7c4240233927
2014-08-16 21:52:28 +02:00
c7307c7725 fdo#82191 sw::DocumentLayoutManager: copy textbox content of draw formats
The SwFmtCntnt, i.e. the content of the draw format was already copied,
but that's only a pointer to the real content: instead duplicate the
real contents on copy&paste, that's how we copy fly frames as well.

Change-Id: I42475e356aaa1c54c08fb23a6a395d1726e5f33e
2014-08-15 16:48:58 +02:00
0606ab6a73 SwTextBoxHelper::findTextBoxes: return a set of const pointers
Change-Id: I8e3ea996959bad72e6d15dc9c980ea9d18d31fb3
2014-08-15 16:48:57 +02:00
615d3e319c SwTextBoxHelper::findTextBox: take a const SwFrmFmt
Change-Id: I531a5864f61ab6c9bfcfc44f7fcacef58ad78489
2014-08-15 16:48:57 +02:00
3078f0e3ff sw: initialize SwDoc::mbCopyIsMove
(regression from 5494954b269267f6ee3bdd5ac73e7513fa69978f)

Change-Id: I8bc2e0e079cbf86449ef0ce9c046eedb624127f2
2014-08-14 18:55:18 +02:00
19efa546ab sw: assert that UnlockExpFlds() isn't called when it's not locked
Change-Id: Ibe2394978b776dd4a91a253856040fc45f81c7e9
2014-08-14 14:39:03 +02:00
85fde3735a sw: initialize SwDoc::mbInReading
This was causing intermittent failure at least in sw_python test.
(regression from 5494954b269267f6ee3bdd5ac73e7513fa69978f)

Change-Id: I8452536cfbb7bc5bd07e6405bc255e31a5007185
2014-08-14 14:39:03 +02:00
1f4d9846ae Refactored IDocumentExternalData out of SwDoc.
Into the new class DocumentExternalDataManager.

Change-Id: Ib863daec170044c46143b47a91739d4c0940d963
2014-08-12 23:26:39 +02:00
535971f3a1 Refactored IDocumentStylePoolAccess out of SwDoc.
Added non const SwDoc::GetDfltTxtFmtColl and SwDoc::GetTxtFmtColls
and SwDoc::GetCharFmts.
Had to make the manager friend of SwTxtFmtColl and SwConditionTxtFmtColl
Had to make SwDoc::_MakeCharFmt and SwDoc::_MakeFrmFmt public.

Change-Id: I19a36d91f92b3781a6c4313ec12eb8f7d4dfacc3
2014-08-12 23:26:38 +02:00
5494954b26 Refactored IDocumentLayoutAccess out of SwDoc.
Into the new class DocumentLayoutManager.

Change-Id: I02d0cfcc63633d0bdab380508b2ef563187fd269
2014-08-12 23:26:38 +02:00
64e13a1456 Refactored IDocumentState out of SwDoc.
Into the new class DocumentStateManager.

Change-Id: I91c9097b091ff6118d58fd15fff2a4cefe0171fd
2014-08-12 23:26:38 +02:00
9cc617afcd Refactored IDocumentStatistics our of SwDoc.
Into the new class DocumentStatisticsManager.

Change-Id: I281232dc09dbd79c2faf3c2a78ae49625bbe88ee
2014-08-12 23:26:37 +02:00
69e5f335ab Refactored IDocumentFieldsAccess out of SwDoc.
Into the new class DocumentFieldsManager.
Removed SwDoc::_MakeFldList because it is not defined anywhere.
Also moved a few non interface methods that belong to the manager.

Change-Id: Icefd7ca7adcbb05a18d6fae0529fc54150b862fd
2014-08-12 23:26:36 +02:00
274f1811b9 Refactored IDocumentRedlineAccess out of SwDoc.
Into the new class DocumentRedlineManager.
Added an non const version of GetRedlineTbl to the interface.
Also Moved SetAutoFmtRedlineComment which is not part of interface.

Change-Id: I600d5821d5d5831557f5fc5375fb1203fe67a295
2014-08-12 23:26:36 +02:00
3dafed2ede -Werror,-Wundefined-bool-conversion
Change-Id: Iff8db4c82abeeed0789d7012223a846f1058c353
2014-08-12 12:19:43 +02:00
dbe74ab1b3 coverity#1209529 Dereference after null check
Change-Id: I58fbc34996157e7118983a245d31f471b603361f
2014-08-07 18:00:49 +01:00
2e9840d18c SwDoc::CopyPageDesc(): probably sending Modify for first too cannot hurt
Change-Id: I2056bee7555d3f6723ac374863187d82e4ad9edd
2014-08-05 23:23:56 +02:00
5c1cc92ee0 fdo#69282: sw: fix updating of page styles via SwDocShell::_LoadStyles()
SwDoc::CopyPageDesc() only copies master and left SwFrmFmt attributes,
but not first-master and first-left.  They will contain exactly the same
attributes as master and left but they still need to be copied...

(see also: that FIXME in pagedesc.hxx)

(regression from 75084f6c42c27dc95418df9cefed2fddfb26000e)

Change-Id: I3dcc3627708b5d6a477eb7fef76cf6c42c95c004
2014-08-05 23:23:55 +02:00
02f0102b8b prevent memory leak
Found by Lsan.

Returning this or a heap allocated object asks for trouble. Let the
caller handle it and return null instead of this.

Change-Id: I7586e103bef5a8c2727adfe214b052d6962d4467
Reviewed-on: https://gerrit.libreoffice.org/10716
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-08-04 12:49:59 +00:00
9bac4d413e typo: more then -> more than
Change-Id: I2e477d66f25bde7256938ccb1f95ab26add24922
2014-08-01 23:40:12 +09:00
9a73339851 fdo#81491 FILEOPEN DOCX Assert Fails while Deleting Para (FramePr)
SwXText::convertToTextFrame is called for a Para with FramePr.
convertToTextFrame in turn calls DelFullPara which throws an assert
as a few Bookmarks are still registered to the paragraph.

In  MarkManager::correctMarksAbsolute,  pMark->GetMarkPos().nNode.GetNode()
is checked if it is pOldNode, and then the Mark Position is shifted to aNewPos.
In the following condition pMark->GetOtherMarkPos().nNode.GetNode()
if it is the pOldNode, and still the Mark Position is changed.
However the Other Mark Position must be changed as now the Othe Mark is in pOldNode.

Change-Id: I4507f6b2906d33bc65c922fffe12db2110de651b
Reviewed-on: https://gerrit.libreoffice.org/10536
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-08-01 10:00:00 +00:00
e819362792 use the Redline iterator
Change-Id: Ia15e5a376b2a7503f56f183a555e21d1122fe66f
2014-07-28 12:25:48 +02:00
bc9e82317a coverity#1228874 Uninitialized scalar variable
Change-Id: I784ee8e0de87996e408656ffed5b8326cc0ab74f
2014-07-26 21:25:15 +01:00
93d9abd966 remove unused params
Change-Id: I6e297a5972bf6d50f99e0533c6f8b15d552de970
2014-07-25 09:47:55 +02:00
9cb5358d2f kill SAVEFLY_SPLIT too
Change-Id: Iaeecdb35c0eaebea8e879f36a21237c98a2c7ed0
2014-07-25 09:47:55 +02:00
823447222c SAVEFLY is a noop, just use a bool
Change-Id: I32255ca073d52616d3e5c9e80f32471e0a7df3fa
2014-07-25 09:47:55 +02:00
2af62a7469 move into the loop and constify
Change-Id: I8544755a1b1a32fdf85823e50cf5db6c4909b485
2014-07-25 09:47:54 +02:00
c28c6126dc we can do this before the conditional
Change-Id: Iedd3404931e578c40726d663e5460e9e3af56832
2014-07-25 09:47:54 +02:00
d6aaaf6960 remove unused headers
Change-Id: I6829e0780c051a67fbec7c33f6f45dedaf31d7f1
2014-07-25 09:47:54 +02:00
b6fda1b67c use make_shared here
Change-Id: I0535517f39508abb3e0b454081e4a64d375ecbc4
2014-07-25 09:47:53 +02:00
fec5892741 move CntntIdxStore to own file
Change-Id: Ic8280478b154b9b132f74e260edea46911cb1803
2014-07-25 09:47:53 +02:00
6c1f2ea2aa update comment
Change-Id: Ia1ab167fbfa497bff7e8687995e6df1e9e4bd3b5
2014-07-25 09:47:53 +02:00
f3974d020b simplify ChkPaM some more
Change-Id: I499f76252d145fc3a3afd2e3646ef81e8055e327
2014-07-25 09:47:52 +02:00
bb67dc2752 Update UnoCrsrs by PaM, not by index
Change-Id: Ifcf7dd74e06453b9ac4d6a76ac671fd4c6735970
2014-07-25 09:47:52 +02:00