[Libreoffice-commits] core.git: 2 commits - libreofficekit/source sc/source sfx2/sdi sfx2/source
Pranav Kant
pranavk at collabora.com
Wed May 11 16:07:31 UTC 2016
libreofficekit/source/gtk/lokdocview.cxx | 10 +++++++++-
sc/source/ui/view/tabvwsha.cxx | 11 +++++++++--
sfx2/sdi/sfx.sdi | 2 +-
sfx2/source/appl/appuno.cxx | 1 +
4 files changed, 20 insertions(+), 4 deletions(-)
New commits:
commit a5a71cea62ac3041006c5e9815ae2317999639ac
Author: Pranav Kant <pranavk at collabora.com>
Date: Wed May 11 18:32:52 2016 +0530
sc: Add new param, DontTerminateEdit, to .uno:Save
... which determines if current editing mode before save should
be terminated with save or not.
Change-Id: I49318013f1244eb8681a19ed3da50fbecd336a3d
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index e012f71..ef0d1ce 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -715,9 +715,16 @@ void ScTabViewShell::UpdateInputHandlerCellAdjust( SvxCellHorJustify eJust )
void ScTabViewShell::ExecuteSave( SfxRequest& rReq )
{
// only SID_SAVEDOC / SID_SAVEASDOC
+ bool bCommitChanges = true;
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+ const SfxPoolItem* pItem;
+
+ if (pReqArgs && pReqArgs->HasItem(FN_PARAM_1, &pItem))
+ bCommitChanges = !static_cast<const SfxBoolItem*>(pItem)->GetValue();
- // Finish entering in any case, even if a formula is being processed
- SC_MOD()->InputEnterHandler();
+ // Finish entering unless 'DontTerminateEdit' is specified, even if a formula is being processed
+ if (bCommitChanges)
+ SC_MOD()->InputEnterHandler();
if ( GetViewData().GetDocShell()->IsDocShared() )
{
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 97e3523..ee79105 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3579,7 +3579,7 @@ SfxVoidItem SaveSimple SID_SAVESIMPLE
]
SfxBoolItem Save SID_SAVEDOC
-(SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem Author SID_DOCINFO_AUTHOR)
+(SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem Author SID_DOCINFO_AUTHOR,SfxBoolItem DontTerminateEdit FN_PARAM_1)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index fc2ceb4..7c3089b 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -84,6 +84,7 @@ SfxFormalArgument aFormalArgs[] = {
{ reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "SuggestedSaveAsDir", SID_DEFAULTFILEPATH },
{ reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "VersionAuthor", SID_DOCINFO_AUTHOR },
{ reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "VersionComment", SID_DOCINFO_COMMENTS },
+ { reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "DontTerminateEdit", FN_PARAM_1 },
{ reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "VersionMajor", SID_DOCINFO_MAJOR },
{ reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "FilterOptions", SID_FILE_FILTEROPTIONS },
{ reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "FilterName", SID_FILTER_NAME },
commit 0241896fad3fea09f31e4637bc3dcf2baf12a67a
Author: Pranav Kant <pranavk at collabora.com>
Date: Mon May 9 23:09:27 2016 +0530
lokdocview: Add debug info; paintTile rendering time
Change-Id: Icdb14e9a5fedb3dcfbad502e323b333c3dbcc534
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index c14c8b1..38b1a6d 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1914,18 +1914,26 @@ paintTileInThread (gpointer data)
priv->m_pDocument->pClass->setView(priv->m_pDocument, priv->m_nViewId);
std::stringstream ss;
+ GTimer* aTimer = g_timer_new();
+ gulong nElapsedMs;
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("%s", ss.str().c_str());
+
priv->m_pDocument->pClass->paintTile(priv->m_pDocument,
pBuffer,
nTileSizePixels, nTileSizePixels,
aTileRectangle.x, aTileRectangle.y,
pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom),
pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom));
+
+ g_timer_elapsed(aTimer, &nElapsedMs);
+ ss << " rendered in " << (nElapsedMs / 1000.) << " milliseconds";
+ g_info("%s", ss.str().c_str());
+ g_timer_destroy(aTimer);
+
cairo_surface_mark_dirty(pSurface);
// Its likely that while the tilebuffer has changed, one of the paint tile
More information about the Libreoffice-commits
mailing list