summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)AuthorFilesLines
2016-10-14CppunitTest_desktop_lib: fix loplugin:cppunitassertequals warningsMiklos Vajna1-2/+2
And also address a few new warnings in sal, plus silence such warnings in salhelper till we can't print typeids out of the box. Change-Id: I38049146710b6885f6a874bf74eedbc38b4d4651 Reviewed-on: https://gerrit.libreoffice.org/29809 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-10-13profilesafe: extended to three modesArmin Le Grand1-74/+25
Saving configuration is now extended to three basic modes, from just saving registrymodifiications to adding user-defined config stuff to saving all information in the user profile, additionally configuration information for Extensions is saved. Added configuration entries for this and tested saving/restoring. Change-Id: I79b09c37617803bf656826f76a7e3db79cda49ac Reviewed-on: https://gerrit.libreoffice.org/29770 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-10-12Removed by-error-pushed desktop/source/app/app.cxx.origArmin Le Grand1-2735/+0
Change-Id: I87a25028b82f7f6d107b2b234e20a9af6382d113
2016-10-12profilesafe: Multiple adaptionsArmin Le Grand2-53/+2826
Added own directory in User config to where the saved content is written and taken from, adapted to also handle ExtensionConfiguration, changed point for creating backups of configuration to doShutdown, create no configuration when a restart is triggered (untested configuration) Change-Id: Id7a96195b765842c31cacf81cc08d2965a205281 Reviewed-on: https://gerrit.libreoffice.org/29729 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-10-12safemode: Add flag to indicate safemodeSamuel Mehrbrodt1-1/+2
Change-Id: Ifdbb291715b033eaace159297eac5348530e9f36
2016-10-11tdf#102004 Do not open options for extensions without optionsMuhammet Kara1-1/+13
Also fix similar issue for "Disable/Enable" and "Remove" buttons Change-Id: I383e64a9c6133ff2ebc991747c5c47c033a91174 Reviewed-on: https://gerrit.libreoffice.org/29600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-10-11profilesafe: Add values for SecureUserConfigfeature/profilesafemodeArmin Le Grand1-1/+4
Added default values for SecureUserConfig values to soffice.ini/rc which enable the mechanism, enable by default and set a maximum of three backups file in packed form. Added more handy flag for easy decision to add compressed/uncompressed. Change-Id: I5a624c09fec4e4278314e13fc5f693ac085d5e61
2016-10-11profilesafe: Collect copies in single *.pack fileArmin Le Grand1-4/+6
Enhanced helper classes for BackupFileHelper to allow writing a stack of rescued last valid configuration files to a single file package. Added configuration values for enabling this and defining the number of entries, added max entry limitation. Using FileSize and CRC32 now to dectect if config file did change. To make this work I added sorting to writing the configuration so that with no change the same configuration file is written. Use std::vector for better mem performance for sorting, defined static const for buffer size of manipulation, prepare inflate/deflate usages. Fixes to setPos, warnings Change-Id: Ib286e2a3f25b0085a1e3ae4f50c9ff1ff3a5dcf5
2016-10-11profilesafe: Enhancements to BackupFileHelperArmin Le Grand2-6/+130
Added helper class to allow easy creation/deployment of backups of a file. It works like a 'stack' of backups, supports easy add/remove/delete of last entry (LIFO). Added some work top allow opening dialogs in DeInit under linux. Change-Id: Idacec97ec2f097af9bd22a8a67b410c7677d17f1
2016-10-10Show dialog when starting in safe modeSamuel Mehrbrodt1-0/+21
Change-Id: Ie4b5f5b7309735dfa844bbaba9cb2763a3de3dc1
2016-10-10safemode: Add command line optionSamuel Mehrbrodt3-0/+9
Change-Id: I081cc6b4d61be4541a3bdcf475385b5ce0f59cda
2016-10-07tdf#100302: gbuild: always use $(LFS_CFLAGS)Michael Stahl1-4/+0
Currently LFS_CFLAGS are only used in a handful of libraries but there's no obvious reason why it can't just be set everywhere. Also set it in windows.mk, i have no idea if it's needed for MinGW (certainly not for MSVC). Change-Id: I5f62e3011c2089abbf5539fc54c7ff10e07b1599
2016-10-07loplugin:staticmethods: desktopStephan Bergmann2-3/+3
Change-Id: Ic0c8ff1cd2809527ec4a3c4012af342bcab1308b
2016-10-06drop unused STD_MASKCOLOR definesCaolán McNamara1-3/+0
Change-Id: I9e6d499788467e5215464cf8f5146721b847909c
2016-10-06I can't see any evidence of any remaining magenta mask using image resourcesCaolán McNamara1-18/+9
Change-Id: I12865d743daa3e6479edb60584d5bd01f88e818d
2016-10-05convert MapUnit to scoped enumNoel Grandin4-6/+6
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann13-76/+76
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-03Calc LOK: clear cell background when editing in parallelAshod Nakashian1-1/+2
Change-Id: Id8eccf00ec6555d62c49e06130e3aa3a0eaaddea Reviewed-on: https://gerrit.libreoffice.org/29450 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit b16ba7314ef93b657dea4d6dd676b2dfd265bcaa) Reviewed-on: https://gerrit.libreoffice.org/29486 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-01Fix typosAndrea Gelmini1-1/+1
Change-Id: I6aeda978911b25caa45d4e459e581fc743e93d2c Reviewed-on: https://gerrit.libreoffice.org/29442 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01Fix typosAndrea Gelmini2-3/+3
Change-Id: I8374d6d08f4eb4ae2821e213371c615b92d7e9ab Reviewed-on: https://gerrit.libreoffice.org/29432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-29LOK: conditionally include part number in invalidation payloadMiklos Vajna2-13/+118
Since desktop/ code queues, compresses and only emits callbacks on idle, it's possible that two invalidations are in the queue, and there was a setPart() call between them. In this case it's impossible to tell what part the invalidation was sent for. Fix this by conditionally including the part number in the invalidation payload. It's off by default, a new feature flag is added to request this behavior. gtktiledviewer enables this feature flag by default, though just to show the part number in the debug output. Android doesn't enable it. Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4
2016-09-28sw lok: fix one view inserting a comment, other view jumping there as wellMiklos Vajna1-3/+14
Views are expected to be more or less independent. So when one view inserts a comment, don't emit cursor callbacks in the other views, so that the other views don't jump to the comment position. Change-Id: I5e4eadccef971dce2b7c759f3094f6d348d07645
2016-09-28Resolves: tdf#96748 'Default Language' show current ui lang not new defaultCaolán McNamara1-42/+5
i.e. if you select it, then the General::UILocale is unset and a new default generated based on the L10N::UILocale and what langpacks are installed but what the entry string claims is "Default - Current Language", rather than "Default - The Language That Will Be Used", so split out the language selection code into a reusable bit and use that to get the name of the language which will be selected if this entry is used Change-Id: I13d901c9a47ef213aea86417501114d4231efae5
2016-09-26sw lok: fix cursor position after inserting a commentMiklos Vajna1-1/+47
Make sure SwVisibleCursor::SetPosAndShow() doesn't emit LOK callbacks till a comment window is active. Need to invoke the unit test from desktop/, as the sw tests have the status bar disabled. Change-Id: Iab26024e9bb4da9c939bbd6cf769ec5c4dcb9a19
2016-09-22desktop: guard against nullptr frame in doc_registerCallback()Miklos Vajna1-1/+1
Change-Id: I96956d6631ed574c06df62e9b633d7e1e4d5a5f2
2016-09-21lok::Document::getCommandValues: expose sw redline author colorsMiklos Vajna1-0/+17
These colors are used in the tiles, so it's a good idea if the client can use matching colors for cursors and selections. But to be able to do that, we need an API to expose these colors. Change-Id: Ia688c07e6c300fecdf8dc428d5a3f000d1857387
2016-09-21use #i format for these bug idsCaolán McNamara1-1/+1
Change-Id: I90b6e426718ff11b4dfae00f7ee6b5e1036390f9
2016-09-21#i114963# Enable IPC before OpenClients to allow client connections when ↵Andrea Pescetti1-2/+14
printing. Patch By: aptitude@btconnect.com (cherry picked from commit 602bd18953b23b7aa939cc118d2aa7cb24b172be) Conflicts: desktop/source/app/app.cxx
2016-09-20[API CHANGE] Remove HAVE_GCC_VISIBILITY_FEATURE, always trueStephan Bergmann1-2/+2
* GCC documents -fvisibility at least as far back as the GCC 4.0 online documentation at <https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Code-Gen-Options.html>. * For external code, odk/settings/settings.mk unconditionally set HAVE_GCC_VISIBILITY_FEATURE for all platforms other than Windows. Make this a fatal configure error for now. The check should be removed completely after LO 5.3 branch-off. Change-Id: I1de415b6ed1591e0a7b6640ece861b6f0ef74112 Reviewed-on: https://gerrit.libreoffice.org/29073 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-19sw: emit LOK_CALLBACK_STATE_CHANGED when cursor enters/leaves a redlineMiklos Vajna1-0/+1
For now only care about the start of the cursor, which can be only at a single redline. Add matching testcase + expose it in the gtktiledviewer status bar for interactive manual testing. Change-Id: Ib61757412d6b54bef64361d4a8563795ca0bab6c
2016-09-18make sure the test is not executed before the libs have been builtMarkus Mohrhard1-0/+2
Change-Id: Idf9e638ac559e1135182811c2bc30465efe45d3d
2016-09-16sfx2: add SfxLokHelper::getViewIdsMiklos Vajna2-0/+14
and also expose it in the LOK API. This way clients don't have to keep track of what views they created / destroyed, they can also get an up to date list with this method. Change-Id: Ibaee42c545803e04a31e7c13ab6ec370b99465c4
2016-09-16lok::Document: rename getViews() to getViewsCount()Miklos Vajna2-7/+7
As this only returns the number of views, not the actual views. Since it's a rename, it's just an API (but not an ABI) change. Change-Id: Ib4f0ea56a90e5ae9c80ee1781aa2f29aff4259e7
2016-09-15Revert "LOK: we use callbacks latch for not missing messages sent very early"Marco Cecchetti1-18/+1
This reverts commit bbae556d12e4edf7795b0b5643df77fd8cdbdacd. Change-Id: If1370751b612ff06ef5be13e8a4017af7dc34a7c Reviewed-on: https://gerrit.libreoffice.org/28908 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit c0dd075d52409031876f5bc3923062ba5847fd53) Reviewed-on: https://gerrit.libreoffice.org/28929 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl3-4/+4
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-14desktop lok: avoid unnecessary setPart() in paintPartTile()Miklos Vajna3-0/+98
If possible, switch views, not parts, that way started Impress text edits don't end as a side-effect. Change-Id: I3f18d4dda6bc24235bf1219416f153248a867fa4
2016-09-13tdf#74377 Keyboard shortcuts for context menusMaxim Monastirsky1-0/+1
Configurable through the options dialog. The default behavior depends on the current vclplug (hide for gtk2/3 and OS X, show otherwise). Menus currently affected by this change: - SfxDispatcher based context menus - chart2 context menus - vcl's Edit control context menu - Several MenuBarManager based toolbar dropdowns. Change-Id: Iad9fb99dc90e01c17cba9c07c1a2b262b920e11d Reviewed-on: https://gerrit.libreoffice.org/28849 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-09-13loplugin:dllprivateStephan Bergmann3-21/+21
Change-Id: I1fe70a39c50aba8b84c117653185fc37dbbfeab0
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann40-57/+57
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-11LOK: we use callbacks latch for not missing messages sent very earlyMarco Cecchetti1-1/+18
- lok::Document::setCallbackLatch: used on document load for set/unset the latch - now cell cursors of other views are correctly notified to the new view Change-Id: Ife6dca0e3e329b801d44070f55869afe95a2f313 Reviewed-on: https://gerrit.libreoffice.org/28812 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-10LOK: new callback dropping implementationMarco Cecchetti2-34/+168
Now view callbacks have their own collection of last states where the key is made up by both the view id and the callback type. Callback dropping based on the last state is no more handled on queueing but on flushing, since what really matters is the last performed callback (for each callback type). Anyway in order to not modify the order of callbacks, that could be changed when an already queued callback is superseeded, dropping still occurs on queuing too, just by looking for the last queued callback of the same type. The result is a substantial reduction of redundant callbacks and fix the following problem in loleaflet: when there are more views for a speadsheet and cell cursors for two view are placed on the same cell, a continuos swapping between the two cell cursors can occur. That was due to a sequence of "EMPTY" and coordinates messages or cell cursor and cell view cursor messages which were sent in an alternating way. Change-Id: I79e14d11d4e8590aff715181e3410ad88c4e6175 Reviewed-on: https://gerrit.libreoffice.org/28783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-10LOK: tidy up `CallbackFlushHandler::queue`, improved cell view cursorMarco Cecchetti2-79/+108
Rewritten the switch statement in `CallbackFlushHandler::queue`: - Now, the new callback data is emplaced after removing all states overridden by the new one. - View callbacks are checked not only for the same type but even for the same view id: that allowed to fix the following issue: starting from the 3rd view for a spreadsheet it could occur that only the cell cursor of the previous last view was displayed in the new view. Change-Id: I2b63526deb4dca39e3a1f430443ebc5d0f61938d Reviewed-on: https://gerrit.libreoffice.org/28782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-09loplugin:constantparam in svtoolsNoel Grandin1-1/+1
Change-Id: I04caae0c9ae621c55e16d3bdc014a4729617feb3 Reviewed-on: https://gerrit.libreoffice.org/28757 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-05convert ScrollType to scoped enumNoel Grandin1-1/+1
Change-Id: I6dd02d4f7df028dada6cfd5d767a6ec1b1c1efe1
2016-09-01sfx2: nullptr pViewShell was seen in SfxLokHelper::getView()Miklos Vajna1-4/+15
I'm not sure how to trigger this reliably, but Pranav got this: #0 0x00007fb2f471bbf0 in SfxLokHelper::getView(SfxViewShell*) (pViewShell=0x0) at sfx2/source/view/lokhelper.cxx:82 #1 0x00007fb2f75edf4f in doc_paintPartTile(LibreOfficeKitDocument*, unsigned char*, int, int, int, int, int, int, int) (pThis=0x7fb290253c40, pBuffer=0x281fbd0 "", nPart=0, nCanvasWidth=1024, nCanvasHeight=256, nTilePosX=0, nTilePosY=11520, nTileWidth=15360, nTileHeight=3840) at desktop/source/lib/init.cxx:1338 Given that SfxViewShell::Current() may indeed return nullptr (e.g. during shutdown), change SfxLokHelper::getView() to return -1 in that case, and adapt client code to handle that. Change-Id: Ia191c843c8a993f3d7157de432af57964c0a8f63 Reviewed-on: https://gerrit.libreoffice.org/28583 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-31desktop: fix Android buildMiklos Vajna1-0/+13
to_string() is missing in the std namespace on the broken Android toolchain, work it around. Change-Id: I77fd06f869291e04c265b6b6d38b2e60b0d48caf
2016-08-31LOK: queue-up events while processing client callsAshod Nakashian2-23/+65
To prevent feedback effects and improve performance, we now queue up events fired during the processing of a client call on the LOK API. This has the advantage of giving us a chance to compress redundant events and to combine others (where possible) into fewer ones. Change-Id: I2f6ea12c5d85205e6495cb130f6a6262534b6bb2 Reviewed-on: https://gerrit.libreoffice.org/28311 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-30sc lok: implement getCommandValues(.uno:AcceptTrackedChanges) APIMiklos Vajna2-30/+73
Unlike in Writer, there doesn't seem to be an existing UNO API that can be reused here. Change-Id: I011a2f34d4d09ad604991637322ceadf6b2eb181 Reviewed-on: https://gerrit.libreoffice.org/28498 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (desktop)Stephan Bergmann1-1/+1
Change-Id: Icdfcdb168d5570e37818bf866e2b4296c02824be
2016-08-30No reason why these functions can't be static, tooTor Lillqvist1-14/+14
Change-Id: I95b68e912c87657a6884f8c56bfcc7bc52c2f2e5