summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)Author
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08Revert "lok: Interaction handler for saveAs() too."Michael Stahl
This reverts commit 809154904fe66441ada6985b153b4c1b20f3eb8f. Revert "lok: Take over the identity of the document when performing saveAs()." This reverts commit bcc940956c4689888297c7bbe8d3744becc2fe9e. The CppunitTest_desktop_lib crashes due to a null gImpl and i can't figure out how to call lok_init so it actually works.
2016-02-08vcl: cmdevt.[hc]xx -> commandevent.[hc]xxChris Sherlock
Change-Id: I77b30f28ae5a6fad360d7cada9acfaa9c324408b Reviewed-on: https://gerrit.libreoffice.org/22216 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08lok: Interaction handler for saveAs() too.Jan Holesovsky
Change-Id: I3f0365e05685c21987da194e24a1165c7a3f8b5c
2016-02-08lok: Take over the identity of the document when performing saveAs().Jan Holesovsky
This way we are getting the .uno:ModifiedStatus notification even when performing saveAs(). Change-Id: I370bf483c50161fd4b7f2255ae85fdb76487a9a0
2016-02-08lok: notify the states of undo and redo toolbar itemsHenry Castro
Also included .uno:InsertPage, .uno:DeletePage and .uno:DuplicatePage Change-Id: I91dd2609d6a48be75005a44490614bcf8bcf62e9 Reviewed-on: https://gerrit.libreoffice.org/22195 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Henry Castro <hcastro@collabora.com>
2016-02-07remove reference to old OpenGL stuffMarkus Mohrhard
Change-Id: I3398910136d82a25bba508505db9d9a1b080a0be
2016-02-07fix typoMarkus Mohrhard
Change-Id: Ibcbc66a4e61a6a5476e33392ff5b2a34f96b0c39
2016-02-06vcl: rename EXC_* constants to EXCEPTION_*, EXC is too much like 'execute'Chris Sherlock
Change-Id: I2f79e0419b27391cc9bdc45576e67eecdbc9efa4
2016-02-06vcl: split exception types from input typesChris Sherlock
Having them in the file apptypes.hxx isn't necessary helpful, IMO so I've split the types into inputtypes.hxx and exceptiontypes.hxx Change-Id: I89a1ff168c3ae276b2f5486669d4ec2dda062d57
2016-02-05lok: Notify also about the states of .uno:CharBackgroundExt.Jan Holesovsky
.uno:CharBackgroundExt is supplementary to .uno:BackColor. When .uno:BackColor is set, Writer turns into a 'watercan' mode, where the user directly marks parts of the text with the wanted background color. .uno:CharBackgroundExt then controls this watercan mode - dispatching it toggles the watercan mode on/off, and also the StateChanged events reflect the on/off mode accordingly. Change-Id: I6472eb39129d1b1517fba14bad584cbd125e826a
2016-02-05Fix typosAndrea Gelmini
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3 Reviewed-on: https://gerrit.libreoffice.org/21797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-04lok: fix saveAs for a loaded HTML documentTomaž Vajngerl
a HTML document is reported as "com.sun.star.text.WebDocument" which is a unsupported document type in LOK so report it as a LOK_DOCTYPE_TEXT instead. Change-Id: Iaa77cb8b1f55cf31ebbb4fd4d69c02702e60e251
2016-02-04vcl: take into account the font width is the average font widthChris Sherlock
I'm changing the Font class function names: - SetSize -> SetFontSize - GetSize -> GetFontSize - SetHeight -> SetFontHeight - GetHeight -> GetFontHeight - SetWidth -> SetAverageFontWidth - GetWidth -> GetAverageFontWidth That's because it really makes no sense to say that there is a single constant font width because obviously proportional fonts don't have one - the best we can do is an average font width, which is what folks like Microsoft sort of do already. On a fixed font, the average is still accurate, for obvious reasons :-) I'm also not a fan of GetSize/SetSize as I find it a might too generic. Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70 Reviewed-on: https://gerrit.libreoffice.org/22069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-03desktop: replace boost::bind with lambda or std::bindMichael Stahl
This requires working around MSVC 2013 error C3848, that compiler apparently just doesn't like to call its std::bind() functions if they're "const". Change-Id: Ic2e66cab3cadb36ab29cf2504a4c6107334f2ae1
2016-02-03libreofficekit: CppunitTest_libreofficekit_tiledrendering crashesMichael Stahl
Need to check that a callback was actually set before calling it. Change-Id: Icb2ca19aec0c74f6695d7286f046dadfe609d68c
2016-02-03lok interaction handler: Add handling of io and network errors.Jan Holesovsky
Change-Id: If7c84a7b24f2072439718fb0c473b73243f2ecc1
2016-02-03lok interaction handler: Move password handling to an own method.Jan Holesovsky
Change-Id: I1b3cfdef5f4f81c9138ad5600e43755841df5d75
2016-02-02LOK: add Document::setClientVisibleArea()Miklos Vajna
... and implement it in Writer. Otherwise there is no way we can perform e.g. page down in an expected way. Without this, the core visible area depends on the zoom in the document, and the client visible area can be something entirely different. Change-Id: Iadfb5a225da09a2551ffa41ddf503bb3d22b3eae
2016-02-02boost::hash->std::hashNoel Grandin
Change-Id: If4d1e4071995f07212fad958b0226d5824d168f8 Reviewed-on: https://gerrit.libreoffice.org/21989 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-01lool - now the fill cursor type is mapped correctlyMarco Cecchetti
Change-Id: I6d89df49b9f740b7f81394938222261f25a50dba
2016-02-01libreofficekit: fix inverted conditionMichael Stahl
... that prevented loading the same URL multiple times. Also make this exception-safe while at it. Change-Id: Ic71735fef1ad8f79a210279d4d03f1fd5fa8cf69
2016-01-29sequence->vector in OInteractionRequestNoel Grandin
Change-Id: I995cb96e514e1aaa05a96f29344ef51e4ca83c64
2016-01-29vcl: add text alignment functions to ImplFont and FontAttributesChris Sherlock
ImplFont and FontAttributes now have GetAlignment and SetAlignment, and I have renamed Font::GetAlign to Font::GetAlignment, and Font::SetAlign to Font::SetAlignment. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test text alignment. Change-Id: I6272c84fc9416c90616d957d1897eba9469fe7ba Reviewed-on: https://gerrit.libreoffice.org/21876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-28sw: add AnchorType parameter to .uno:PasteMiklos Vajna
Which allows not hardcoding as-char for LOK. Change-Id: I3b2987abbaf1f259c614b7b2a8709f15048d362d
2016-01-27libreofficekit: password interaction optional and off by defaultMichael Stahl
Add setOptionalFeatures() function that clients must call during initialization, and enum LibreOfficeKitOptionalFeatures. Change-Id: I73035193c87033052921c3aad94fdc057fe81111 Reviewed-on: https://gerrit.libreoffice.org/21809 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-01-26vcl: actually that shared_array was a scamMichael Stahl
The only things passed as buffers there were null pointers and shared_arrays that had the deletion explicitly disabled with a struct NoDelete, so it's sufficient to just pass a pointer. Change-Id: I68d618782aa654242048516d2e910b8136b16e2d
2016-01-26vcl: convert boost::shared_array to std::shared_ptrMichael Stahl
Change-Id: I9d0ad886c4c6e1c8496eb6129b22d327ca0968eb
2016-01-25loplugin:defaultparamsStephan Bergmann
Change-Id: I58f3b5301098b61c3d38afa9371dadc742a4b19b
2016-01-25libreofficekit: ask for password when loading encrypted documentsMichael Stahl
Change-Id: I3b3b0c0e64965280c24842b0cf70a21b8abb4dfb
2016-01-25desktop: use x prefix for uno::ReferenceMichael Stahl
Change-Id: I737f648a638447f3038dcea526db7a3797b63c84
2016-01-21sw tiled editing: default to anchoring new images as-charMiklos Vajna
Change-Id: I6aeb06fe1697b7a30e83a3b1b364f44e5822fe95
2016-01-21desktop: loplugin:defaultparamsMiklos Vajna
Change-Id: I487cfa6415615e6aa0409889e2c7be5e67eea1c4
2016-01-21Clean up lok::Office::freeError()Miklos Vajna
- let it take a non-const pointer, just like free() or g_free() does - remove lok::Document::freeError(), which was declared, but not implemented - move the declaration at the end of the stable API, but before the unstable section Change-Id: I5a8ced61fc87641dc2fa0ea3615a350361fae3a1
2016-01-21sc lok: Implement unit test for .uno:{Insert,Name,Remove} for sheets.Jan Holesovsky
And fix indexing when at that - the inserting is 1-based, so let's be consistent in the .uno:Name and .uno:Remove too. Change-Id: Ib854e81551ae0a39d3ba7c68512e81ea227e9eb1
2016-01-21loplugin: unused return valuesNoel Grandin
Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7 Reviewed-on: https://gerrit.libreoffice.org/21628 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-20loplugin:stringconstantStephan Bergmann
Change-Id: I678c1fb7d5079dfb1d880e856a0d507f1c89b427
2016-01-19loplugin:cstylecastStephan Bergmann
Change-Id: Ib4052fa88cce3b21d20d050fff9c8d32fcde4c20
2016-01-19WaE: unused variableTor Lillqvist
Change-Id: I826a1eb45d0669dbe2495b4dbe4a171fcebb0865
2016-01-19CppunitTest_desktop_lib: add ModifiedStatus callback testcaseMiklos Vajna
Change-Id: Ieb7e808ebc7619c3a4a013cad776eeefd6163e22
2016-01-19LOK: include ModifiedStatus in CALLBACK_STATE_CHANGEDMiklos Vajna
Change-Id: Ic44a9266a67bfad8b0490a8acb4a419af99ea42c
2016-01-19Make LibreOffice kit usable on windowsOliver Specht
Uses Ascii variants of LoadLibrary,Get/SetEnvironmentVariable_A_ and adds a freeError function includes windows.h instead of pre/postwin.h Change-Id: I88b7e3ed3818078efec5688e207da47dc4049b98 Reviewed-on: https://gerrit.libreoffice.org/21600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-01-19CppunitTest_desktop_lib: add jpeg paste testcaseMiklos Vajna
Fails without commit 27c6b8586d5d2cd1fa5425b4969d915a0b739475 (svtools: implement clipboard import of JPEG files, 2016-01-19). Change-Id: Ic4e3b036b3a6a1c294bf15ef0b206cf1e458fc4e
2016-01-19Build the LibreOfficeKit bits also on WindowsOliver Specht
Change-Id: Ibbd5e50ffeeb061a30d6f0f09a393a67ba67421e Reviewed-on: https://gerrit.libreoffice.org/21598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-01-19Make sure desktop under LOK does not see osl_setCommandArgs CommandLineArgsStephan Bergmann
Our sal/cppunittester/cppunittester.cxx uses SAL_IMPLEMENT_MAIN, so forwards the cmd line args to osl_setCommandArgs. CppunitTest_libreofficekit_tiledrendering (run via that cppunittester) starts LOK, which starts SVMain on a lo_startmain thread, which calls deskopt::DispatchWatcher::executeDispatchRequests to process any cmd line arg requests to open documents. It sees the libtest_libreofficekit_tiledrendering.so (or .dylib/.dll) passed to cppunittester, and tries to open it as a LO document. Type detection will typically determine it is plain text that should be opened with Writer, which will succeed. But when the .so is built with GCC 6, it happens to be detected as a MacPaint document, loading which fails, so that executeDispatchRequests (desktop/source/app/dispatchwatcher.cxx) will call xDesktop->terminate(), which unwinds that lo_startmain thread (DeInitVCL etc.). But the main cppunittester thread is still calling into LOK, which is under the assumption that VCL etc. is still functional, and somewhat random crashes will happen. Change-Id: Ie7b00e797a0f3223b3942bb63a31aa9c44370247
2016-01-19-Werror=strict-aliasing (GCC 6)Stephan Bergmann
Change-Id: I080315852db2f6e852f63f3965a2b7bf91529168
2016-01-18basebmp now only used from vcl/headless codeCaolán McNamara
Change-Id: I068d404431d3565f6ad5741edbd3693225824a4d
2016-01-18loplugin: unused return valuesNoel Grandin
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-17vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock
Change-Id: Ie20871a3078bf875c1782b7761d60591a9c9704f Reviewed-on: https://gerrit.libreoffice.org/21529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16revert vcl patch series that brok Mac and WindowsNorbert Thiebaud
revert: 9bc2f3de8672e812f3a67541c6d7069b434a7e42 vcl: add comment about ImplFontMetric::{Get|Set}LineHeight() 26371f105bc44e04469ec03fc5bb12505e651c6b vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic() 2dd0b4317372b8022efe3911b38b4fa02956d8b9 vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual 5ab13bf3ead3539e4ad847656da81e7eb6029652 vcl: tabify font.hxx f99550dae55e40e49bf9c9875053fe2abb4c71ca vcl: change Font::SetName() to Font::SetFamilyName() 2b297116cb6bb1061c43e5714e2609c8ee9f57d2 vcl: rename Font::GetName to Font::GetFamilyName Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62