desktop/source/lib/init.cxx | 10 +++++----- sc/source/ui/view/gridwin.cxx | 12 +++++------- 2 files changed, 10 insertions(+), 12 deletions(-)
New commits: commit 7e5f6bbc0811098db7337c0794acce51a5393a0d Author: Jan Holesovsky <ke...@collabora.com> Date: Thu Nov 12 18:22:06 2015 +0100 lok: Use reference instead of copy constructing in range-based for. Change-Id: Ie5bf5d4ab139f22e67f3654b0bb31e10b8c9f337 (cherry picked from commit addd884799b88213df813fd8501c3ab8306593e1) diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 1ab5dc8..13312e0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1290,10 +1290,10 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand) if (sStyleFam == "ParagraphStyles" && doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT) { - for( OUString aStyle: aWriterStyles ) + for (const OUString& rStyle: aWriterStyles) { uno::Reference< beans::XPropertySet > xStyle; - xStyleFamily->getByName( aStyle ) >>= xStyle; + xStyleFamily->getByName(rStyle) >>= xStyle; OUString sName; xStyle->getPropertyValue("DisplayName") >>= sName; if( !sName.isEmpty() ) @@ -1308,14 +1308,14 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand) } uno::Sequence<OUString> aStyles = xStyleFamily->getElementNames(); - for ( OUString aStyle: aStyles ) + for (const OUString& rStyle: aStyles ) { // Filter out the default styles - they are already at the top // of the list - if (aDefaultStyleNames.find(aStyle) == aDefaultStyleNames.end()) + if (aDefaultStyleNames.find(rStyle) == aDefaultStyleNames.end()) { boost::property_tree::ptree aChild; - aChild.put("", aStyle); + aChild.put("", rStyle); aChildren.push_back(std::make_pair("", aChild)); } } commit 374fdbed82293470cd361a0b21d2ba0adcf2a991 Author: Andrzej Hunt <andr...@ahunt.org> Date: Fri Nov 13 11:17:43 2015 +0100 sc lok: during tiled rendering the cell-cursor is always visible Change-Id: Ia802c19f5bfd2fe2e9909e3c611047c529a64200 (cherry picked from commit e77668eb1e7abe522493235dadfca08ca451ad99) diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 2531bc7..d884af8 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -6023,7 +6023,9 @@ void ScGridWindow::UpdateCursorOverlay() const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab); - if (!maVisibleRange.isInside(nX, nY)) + ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); + + if (!pDrawLayer->isTiledRendering() && !maVisibleRange.isInside(nX, nY)) { if (maVisibleRange.mnCol2 < nX || maVisibleRange.mnRow2 < nY) return; // no further check needed, nothing visible @@ -6042,13 +6044,11 @@ void ScGridWindow::UpdateCursorOverlay() } // don't show the cursor in overlapped cells - const ScMergeFlagAttr& rMergeFlag = static_cast<const ScMergeFlagAttr&>( pPattern->GetItem(ATTR_MERGE_FLAG) ); bool bOverlapped = rMergeFlag.IsOverlapped(); // left or above of the screen? - - bool bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) ); + bool bVis = pDrawLayer->isTiledRendering() || ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) ); if (!bVis) { SCCOL nEndX = nX; @@ -6078,7 +6078,7 @@ void ScGridWindow::UpdateCursorOverlay() } // in the tiled rendering case, don't limit to the screen size - if (bMaybeVisible) + if (bMaybeVisible || pDrawLayer->isTiledRendering()) { long nSizeXPix; long nSizeYPix; @@ -6121,8 +6121,6 @@ void ScGridWindow::UpdateCursorOverlay() } } - ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); - if ( !aPixelRects.empty() ) { if (pDrawLayer->isTiledRendering()) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits