[Libreoffice-commits] core.git: 3 commits - libreofficekit/qa libreofficekit/source sd/source sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Oct 6 03:06:50 PDT 2015
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 1 -
libreofficekit/source/gtk/lokdocview.cxx | 14 +++++++-------
libreofficekit/source/gtk/tilebuffer.cxx | 1 -
sd/source/core/drawdoc.cxx | 4 +++-
sw/inc/viewopt.hxx | 3 +--
sw/source/uibase/config/viewopt.cxx | 8 ++++++++
6 files changed, 19 insertions(+), 12 deletions(-)
New commits:
commit c92ebc850345924619a12327f36cc6ac9c0b09d1
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Oct 6 12:05:14 2015 +0200
Disable spellcheck when LOK is active
It's not useful when viewing, and for editing probably a dedicated
overlay would be better (like the one we have for cursor/selections
already).
Disable for sw/sd explicitly, sc had it disabled implicitly already.
Change-Id: I7134f5d1a1546787c22019e6b1abdc0dd887f888
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 16849ad..3d6ad2f 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -98,6 +98,7 @@
#include <tools/tenccvt.hxx>
#include <vcl/settings.hxx>
+#include <comphelper/lok.hxx>
using namespace ::sd;
using namespace ::com::sun::star;
@@ -232,7 +233,8 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage_CTL,
::com::sun::star::i18n::ScriptType::COMPLEX), EE_CHAR_LANGUAGE_CTL );
- mbOnlineSpell = aOptions.bIsSpellAuto;
+ if (!comphelper::LibreOfficeKit::isActive())
+ mbOnlineSpell = aOptions.bIsSpellAuto;
}
LanguageType eRealLanguage = MsLangId::getRealLanguage( meLanguage );
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 848c7df..703622b 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -319,6 +319,9 @@ bool SwViewOption::IsAutoCompleteWords()
void SwViewOption::SetOnlineSpell(bool b)
{
+ if (comphelper::LibreOfficeKit::isActive())
+ return;
+
b ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL);
}
commit 0cf63ba224cb01377e3e6da68b0e72a3ed7e30af
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Oct 6 11:13:54 2015 +0200
sw: outline SwViewOption::SetOnlineSpell()
Change-Id: Ic81b039e9a1b592ca52ab684ddb45ee44c7714df
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 924d177..5d672f0 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -298,8 +298,7 @@ public:
inline bool IsOnlineSpell() const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) != 0; }
- inline void SetOnlineSpell( bool b )
- { b ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); }
+ void SetOnlineSpell( bool b );
inline bool IsViewMetaChars() const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) != 0; }
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 1056550..848c7df 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -317,6 +317,11 @@ bool SwViewOption::IsAutoCompleteWords()
return rFlags.bAutoCmpltCollectWords;
}
+void SwViewOption::SetOnlineSpell(bool b)
+{
+ b ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL);
+}
+
AuthorCharAttr::AuthorCharAttr() :
nItemId (SID_ATTR_CHAR_UNDERLINE),
nAttr (UNDERLINE_SINGLE),
commit 23ac7f2fb57c338fa608cbc28ac39d140026e3c3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Oct 6 10:47:03 2015 +0200
lokdocview: log paintTile() arguments
Change-Id: I8015c8030c1c7f53ae1de053fe268a33464834ad
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 408dd91..b1a0934 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -372,7 +372,6 @@ static void signalCommand(LOKDocView* pLOKDocView, char* pPayload, gpointer /*pD
{
std::string aKey = aPayload.substr(0, nPosition);
std::string aValue = aPayload.substr(nPosition + 1);
- g_info("signalCommand: '%s' is '%s'", aKey.c_str(), aValue.c_str());
if (rWindow.m_aCommandNameToolItems.find(aKey) != rWindow.m_aCommandNameToolItems.end())
{
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 4ee1e33..1f77c11 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1395,7 +1395,13 @@ paintTileInThread (gpointer data)
aTileRectangle.y = pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) * pLOEvent->m_nPaintTileX;
priv->m_pDocument->pClass->setView(priv->m_pDocument, priv->m_nViewId);
- g_test_timer_start();
+ std::stringstream ss;
+ ss << "lok::Document::paintTile(" << static_cast<void*>(pBuffer) << ", "
+ << nTileSizePixels << ", " << nTileSizePixels << ", "
+ << aTileRectangle.x << ", " << aTileRectangle.y << ", "
+ << pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) << ", "
+ << pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) << ")";
+ g_info(ss.str().c_str());
priv->m_pDocument->pClass->paintTile(priv->m_pDocument,
pBuffer,
nTileSizePixels, nTileSizePixels,
@@ -1403,12 +1409,6 @@ paintTileInThread (gpointer data)
pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom),
pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom));
- double elapsedTime = g_test_timer_elapsed();
- g_info ("Rendered (%d, %d) in %f seconds",
- pLOEvent->m_nPaintTileX,
- pLOEvent->m_nPaintTileY,
- elapsedTime);
-
//create a mapping for it
buffer.m_mTiles[index].setPixbuf(pPixBuf);
buffer.m_mTiles[index].valid = true;
diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx
index 091d33a..e0ca2d2 100644
--- a/libreofficekit/source/gtk/tilebuffer.cxx
+++ b/libreofficekit/source/gtk/tilebuffer.cxx
@@ -58,7 +58,6 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task,
GThreadPool* lokThreadPool)
{
int index = x * m_nWidth + y;
- g_info("Setting tile invalid (%d, %d)", x, y);
if (m_mTiles.find(index) != m_mTiles.end())
{
m_mTiles[index].valid = false;
More information about the Libreoffice-commits
mailing list