Commit Graph

691 Commits

Author SHA1 Message Date
2d66f9dc47 Better variable naming in SwViewImp::NotifySizeChg
Make it obvious, which variable contains the document boundaries and
which the draw / fly object boundaries.

Change-Id: I0bc2bcb5515e317c7a204b3458b92c61482e1a5c
Reviewed-on: https://gerrit.libreoffice.org/10974
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-26 07:29:45 -05:00
d21d5a7261 drop unnecessary shl.hxx includes
Change-Id: Ieb984987c4a4f888a563377e0500444b12f43506
2014-08-18 12:59:49 +01:00
47e2fd0dc8 Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
2014-08-16 21:52:32 +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
e5dd2e8826 We're using the same rectangle for both calls, let's reuse it.
Change-Id: I884832fc92e0fe9c10711d9fdaf103076a05f721
2014-07-26 15:42:04 +02:00
94c720830c Tiled Rendering: ensure rendered area is visible correctly.
Using SetVisArea can cause problems due to various internal
state getting confused, however this gives correct output
without viewport assertion problems or missing content.

Change-Id: I8d206ab201167ea96a0ac853187861e8c3d541e5
2014-07-26 15:42:03 +02:00
7bf98caddd Revert "Tiled Rendering: ensure rendered area is visible."
This reverts commit ff6a38b76df80d0f907f2f92cb851dea43c91d81.
2014-07-26 15:42:03 +02:00
37a4651ceb Use Orientation enum instead of sal_uInt16 + some bool
Change-Id: I8c0cd02cb339111442a99e8051f585bb0599633a
2014-07-26 14:25:27 +02:00
f634ec520f Refactored IDocumentContentOperations out of SwDoc.
Into the new class DocumentContentOperationsManager.

Made SwNodes in sw/inc/ndarr.hxx friend class to
DocumentContentOperationsManager so it can call DelNodes at end of
DocumentContentOperationsManager::DeleteSection .

Added DeleteAutoCorrExceptWord to SwDoc, its needed in the Manager.

Added a non const version of SwDoc::GetDfltGrfFmtColl() to SwDoc
because its needed in the Manager.

Made SwDoc a friend class to DocumentContentOperationsManager so it
can call SwDoc::checkRedlining and SwDocL::_MakeFlySection.

Moved SwDoc::CopyImpl_ , SwDoc::CopyWithFlyInFly and
SwDoc::CopyFlyInFlyImpl into the Manager.

Moved "struct ParaRstFmt" and "lcl_RstTxtAttr" from docfmt.cxx
in DocumentContentOperationsManager.hxx .

Change-Id: Icaab57f4a8c158a85e549ecb4aacc752bc95bbc9
2014-07-15 15:44:04 +02:00
3fed83524d Refactored IDocumentOutlineNodes out of SwDoc.
Into the new class DocumentOutlineNodesManager.

Change-Id: I05581391a1474872113ae91d6429709d181cabfe
2014-07-15 15:44:04 +02:00
c8a8695d4d Refactored IDocumentListItems out of SwDoc.
Into the new class DocumentListItemsManager.

Change-Id: Ic86200280caa1b6e2c940bb12149235223ed0cd2
2014-07-15 15:44:03 +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
378dc6ef20 Related: #i124638# Corrected relationship between DrawModel and...
DocShell in Writer, made SwDrawModel and handling more known

(includes suspicious removal of setting SID_ATTR_LINEEND_WIDTH_DEFAULT)

(cherry picked from commit a7ccadbf3b1ac378ca15d3630d48f48734700e5c)

Conflicts:
	sw/inc/IDocumentDrawModelAccess.hxx
	sw/inc/doc.hxx
	sw/inc/docsh.hxx
	sw/inc/dpage.hxx
	sw/inc/drawdoc.hxx
	sw/source/core/access/accmap.cxx
	sw/source/core/doc/doc.cxx
	sw/source/core/doc/docdesc.cxx
	sw/source/core/doc/docdraw.cxx
	sw/source/core/doc/docfly.cxx
	sw/source/core/doc/doclay.cxx
	sw/source/core/doc/docnew.cxx
	sw/source/core/draw/dcontact.cxx
	sw/source/core/draw/dpage.cxx
	sw/source/core/draw/drawdoc.cxx
	sw/source/core/frmedt/feshview.cxx
	sw/source/core/layout/fly.cxx
	sw/source/core/layout/frmtool.cxx
	sw/source/core/layout/newfrm.cxx
	sw/source/core/layout/paintfrm.cxx
	sw/source/core/undo/docundo.cxx
	sw/source/core/undo/unattr.cxx
	sw/source/core/unocore/unodraw.cxx
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/view/vdraw.cxx
	sw/source/core/view/viewimp.cxx
	sw/source/core/view/viewsh.cxx
	sw/source/filter/html/htmldrawreader.cxx
	sw/source/filter/rtf/rtffly.cxx
	sw/source/filter/rtf/swparrtf.cxx
	sw/source/filter/ww8/docxattributeoutput.cxx
	sw/source/filter/ww8/rtfattributeoutput.cxx
	sw/source/filter/ww8/wrtw8esh.cxx
	sw/source/filter/ww8/wrtww8.cxx
	sw/source/filter/ww8/ww8graf.cxx
	sw/source/filter/xml/swxml.cxx
	sw/source/filter/xml/xmlexp.cxx
	sw/source/filter/xml/xmlimp.cxx
	sw/source/ui/app/docshdrw.cxx
	sw/source/ui/uiview/view.cxx
	sw/source/ui/uno/unodefaults.cxx
	sw/source/uibase/app/docst.cxx
	sw/source/uibase/app/docstyle.cxx
	sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
	sw/source/uibase/lingu/sdrhhcwrap.cxx
	sw/source/uibase/shells/drwbassh.cxx
	sw/source/uibase/shells/frmsh.cxx
	sw/source/uibase/shells/grfsh.cxx
	sw/source/uibase/shells/textsh1.cxx
	sw/source/uibase/uno/unotxdoc.cxx
	sw/source/uibase/utlui/content.cxx

Conflicts:
	sw/source/uibase/app/docshdrw.cxx

Change-Id: Icb99eaa7bfb1eb8922a9fd928b5e4149821130dd
2014-07-01 13:30:10 +02:00
c1be76ec98 pagedesc: Consolidate FindPageDescByName() and FindPageDesc().
Change-Id: I18d570509cd3f3b65a19a12a9df0b1d5db901d04
2014-06-25 20:03:19 +02:00
ff6a38b76d Tiled Rendering: ensure rendered area is visible.
MakeVisible only scrolls the view, so parts of the tile to be rendered
might be outside the SwView's visible area, and therefore not painted.

This however makes the background window (shown for the tilederendering
app) unuseable (but that window is invisible for all practical uses
of tiled rendering, and hence probably not a problem).

Change-Id: I6c3c2846906163b362f7cff6d8c7ba308a58a7ad
2014-06-25 13:04:31 +01:00
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
67820a9037 coverity#705037 Unchecked dynamic_cast
Change-Id: I9f6c8ceafd09b4a5d4e951e01e1a06b2b5265181
2014-06-19 10:26:50 +01:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
86075a3f0f Split out IDocumentDrawModelAccess from SwDoc.
To the new class DocumentDrawModelManager.
All moved methods and members have the same in thew new class.

Change-Id: I89ad0e0c4a42885d5810e834983ea8e8e6c0a2d2
2014-06-03 19:12:05 +02:00
f8455332dc Removed IDocumentDeviceAccess.hxx include in SwDoc.hxx
Because it is not needed there anymore in that class.
I added it as an include in all files that need it.

Change-Id: I3eb2e1da9d153017968b286e1a0250f145ca7cfe
2014-06-03 19:12:03 +02:00
6f77ce5870 Removed DocumentSettingManager methods from SwDoc.
And moved all calls to those methods to GetDocumentSettingManager().

Change-Id: I9b6cc8c3aa9b57bbc0c39f39499dfb4f5f254ad9
2014-06-03 19:12:02 +02:00
dbb2e6befb Made SwDoc::getDocumentDeviceAccess return a reference.
Also overloaded SwDoc::getDocumentDeviceAccess with its const
version.

Change-Id: I3272be3ee067aa2e0174663ede3c98190ecf2b09
2014-06-03 19:12:01 +02:00
cf8a3e700f Cleaning up of IDocumentDeviceAccess methods in SwDoc.
Moved all SwDoc::getReferenceDevice and SwDoc::setReferenceDevice calls to their
appropriate interface methods (SwDoc::getIDocumentDeviceAccess::").

Change-Id: I2a1b488500fa4f0bfbb7ebadccde2c94b70efd85
2014-06-03 19:12:00 +02:00
a0c057f137 Started cleaning up of IDocumentDeviceAccess methods in SwDoc.
Moved all SwDoc::getPrinter and SwDoc::setPrinter calls to their
appropriate interface methods (SwDoc::getIDocumenterDeviceAccess::").

Change-Id: Icbe5369ba03a05d9e2afb1300a9c67b0a0a20c60
2014-06-03 19:11:59 +02:00
35029b2503 sw: move sw/source/core/uibase to sw/source/uibase
It's too confusing to have UI code inside of core; the important part is
that it's separated from the optional UI code in swui library.

Change-Id: I640a52723d5802faf08f3b8eaa03cd937fd93449
2014-05-27 11:13:02 +02:00
0a3fe4c281 Remove ASCII art and useless comments from sw module
Change-Id: I3ba4ac78fd4810e006b1034bbe7c28b1803895d2
Reviewed-on: https://gerrit.libreoffice.org/9494
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-27 01:46:44 -05:00
38b4fe5649 Simplify IsPreviewPosInDocPreviewPage
Change-Id: I6c1a57dc7095125f36ffe5ad0a4fd54ba240287f
2014-05-10 16:08:52 +02:00
655703fce5 Simplify return paths/expressions
Change-Id: I198b3d349934837f7b7e6b49bf4b2a7785736a61
2014-05-10 16:08:52 +02:00
df12e42606 No need of else after a return
Change-Id: I7f7bb520085f0d1855dce8656a54e5f72f2b5ed5
2014-05-10 16:08:51 +02:00
cd881c2b3d Constify sal_uInt16 and sal_Int16 to sal_uInt16
Change-Id: Ie03f3591279f7cedff6f5acf3af46bebf3d2c1b1
2014-05-10 16:08:50 +02:00
11a455f914 Simplify GetRowOfPage and GetColOfPage
Change-Id: Iebe6c17a057999a20a46fb6ea756dc1c0a052dbc
2014-05-10 16:08:50 +02:00
f9072dfd15 Use GetRowOfPage
Change-Id: Ieb6e268223aabea42f5df0d69a8b8d4498eaba77
2014-05-10 16:08:49 +02:00
80016f5f42 OUString: avoid temporaries and constify
Change-Id: I12762daed58e8006e95cc10c3ba0b1d7564a012e
2014-05-10 16:08:49 +02:00
25b116838c sal_uInt16 to sal_uInt32/size_t + constify
Change-Id: I948990f551b4096aa5575090315ab66fc4eb368d
2014-05-10 16:08:49 +02:00
8481a0bb65 No need to use/store those OUStrings
Change-Id: Ied28223690f6672fbd99984fb9a5b44353138594
2014-05-10 16:03:21 +02:00
2ec7049f48 Constify 2 sal_uInt16
Change-Id: I24cdc87e87f3b7d05678eeb86df9a179cba10328
2014-05-10 16:03:20 +02:00
a2e1505cf6 SwViewShell: try to catch errors of calling CalcLayout without action
Change-Id: I0352d543b7ce1ae6cd23d929ad5c9cbaeb1563bf
2014-05-06 22:18:01 +02:00
4f9b21248f simplify ternary conditions "xxx ? yyy : false"
Look for code like:
   xxx ? yyy : false;
Which can be simplified to:
   xxx && yyy

Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
2014-05-05 12:47:48 +02:00
b44ca2f45e Resolves: fdo#78128 go back to using an interim metafile
this time we know that the other varient of "Move" doesn't
handle pixel drawing stuff like the dpi-using one does.

and the move values have to be in 100TH_MM_MAP and
with the true numbers of the write page size

Change-Id: I15fdb78797d8744702bec649024fedbf3e39b342
2014-05-01 17:19:52 +01:00
6aa35db393 sw: sal_Bool->bool
Change-Id: I324a0ffde2ddcca105451c19e7aadcfad15211d8
2014-04-30 08:44:42 +02:00
d87b312bcc Avoid SvxSearchDialogWrapper for non-desktop
Change-Id: Ie602ac05caafba132d9c41333d034a5621664c13
2014-04-28 18:06:15 +03:00
f1f440212b coverity#1130360 Unchecked dynamic_cast
Change-Id: I8bff19837a3dc33fd01983cdb05acfc4f2564008
2014-04-27 21:43:07 +02:00
927617d69a Renamed ImplGetDPI(X|Y) to GetDPI(X|Y)
Change-Id: If76b99589ddd83431593404c1034b8b726bc3f9b
2014-04-25 12:22:29 +10:00
9fd97266ce Related: fdo#36815 center scaled comment page vertically
so comments at the top of the page don't get clipped
off the true printable area

Change-Id: Icb796c901372437b276e7ce4e31c08e0bf2ec250
2014-04-24 14:12:40 +01:00