[Libreoffice-commits] core.git: 2 commits - include/svx sal/osl svx/source
Chris Sherlock
chris.sherlock79 at gmail.com
Sun Jun 25 09:50:51 UTC 2017
include/svx/textchaincursor.hxx | 12 ++++++-----
sal/osl/unx/file.cxx | 5 ----
svx/source/svdraw/textchaincursor.cxx | 36 +++++++++++++++++-----------------
3 files changed, 25 insertions(+), 28 deletions(-)
New commits:
commit b376eec5c70b5fced2e2bdc205191381b66948a7
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Sat Jun 24 15:10:09 2017 +1000
osl: remove unneeded comment in unx/file.cxx
Change-Id: If2e4c06a1d083f82ab531a15ae0bd983f7a5586e
Reviewed-on: https://gerrit.libreoffice.org/39199
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index f631a424d353..85ce42135db4 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -60,11 +60,6 @@
#include <android/asset_manager.h>
#endif
-/*******************************************************************
- *
- * FileHandle_Impl interface
- *
- ******************************************************************/
struct FileHandle_Impl
{
pthread_mutex_t m_mutex;
commit 3c5d5ff4e8050b9470a899f618e8c5c2c2481ab5
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Sat Jun 24 22:03:26 2017 +0200
svx: pass struct by const reference ...
and use references instead of pointers for output parameters.
Change-Id: Ib91a821ff84e464639aa6f09a44ba00301f1d783
Reviewed-on: https://gerrit.libreoffice.org/39220
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/svx/textchaincursor.hxx b/include/svx/textchaincursor.hxx
index 61e6939701ac..aa56e9d5b2cb 100644
--- a/include/svx/textchaincursor.hxx
+++ b/include/svx/textchaincursor.hxx
@@ -26,6 +26,8 @@ class SdrObjEditView;
class SdrTextObj;
class KeyEvent;
class SdrOutliner;
+enum class CursorChainingEvent;
+struct ESelection;
class SVX_DLLPUBLIC TextChainCursorManager
@@ -37,11 +39,11 @@ public:
// Used by HandledKeyEvent and basic building block for handling cursor event
void HandleCursorEvent(const CursorChainingEvent aCurEvt,
- const ESelection aNewSel);
+ const ESelection& aNewSel);
// To be used after chaining event to deal with some nuisances
void HandleCursorEventAfterChaining(const CursorChainingEvent aCurEvt,
- const ESelection aNewSel);
+ const ESelection& aNewSel);
private:
SdrObjEditView *mpEditView;
@@ -52,9 +54,9 @@ private:
void impChangeEditingTextObj(SdrTextObj *pTargetTextObj, ESelection aNewSel);
void impDetectEvent(const KeyEvent& rKEvt,
- CursorChainingEvent *pOutCursorEvt,
- ESelection *pOutSel,
- bool *bOutHandled);
+ CursorChainingEvent& rOutCursorEvt,
+ ESelection& rOutSel,
+ bool& rOutHandled);
};
diff --git a/svx/source/svdraw/textchaincursor.cxx b/svx/source/svdraw/textchaincursor.cxx
index 798720563f9a..0560ae087e08 100644
--- a/svx/source/svdraw/textchaincursor.cxx
+++ b/svx/source/svdraw/textchaincursor.cxx
@@ -43,7 +43,7 @@ bool TextChainCursorManager::HandleKeyEvent( const KeyEvent& rKEvt )
// check what the cursor/event situation looks like
bool bCompletelyHandled = false;
- impDetectEvent(rKEvt, &aCursorEvent, &aNewSel, &bCompletelyHandled);
+ impDetectEvent(rKEvt, aCursorEvent, aNewSel, bCompletelyHandled);
if (aCursorEvent == CursorChainingEvent::NULL_EVENT)
return false;
@@ -55,9 +55,9 @@ bool TextChainCursorManager::HandleKeyEvent( const KeyEvent& rKEvt )
}
void TextChainCursorManager::impDetectEvent(const KeyEvent& rKEvt,
- CursorChainingEvent *pOutCursorEvt,
- ESelection *pOutSel,
- bool *bOutHandled)
+ CursorChainingEvent& rOutCursorEvt,
+ ESelection& rOutSel,
+ bool& rOutHandled)
{
SdrOutliner *pOutl = mpEditView->GetTextEditOutliner();
OutlinerView *pOLV = mpEditView->GetTextEditOutlinerView();
@@ -70,7 +70,7 @@ void TextChainCursorManager::impDetectEvent(const KeyEvent& rKEvt,
// We need to have this KeyFuncType
if (eFunc != KeyFuncType::DONTKNOW && eFunc != KeyFuncType::DELETE)
{
- *pOutCursorEvt = CursorChainingEvent::NULL_EVENT;
+ rOutCursorEvt = CursorChainingEvent::NULL_EVENT;
return;
}
@@ -89,18 +89,18 @@ void TextChainCursorManager::impDetectEvent(const KeyEvent& rKEvt,
// Possibility: Are we "pushing" at the end of the object?
if (nCode == KEY_RIGHT && bAtEndOfTextContent && pNextLink)
{
- *pOutCursorEvt = CursorChainingEvent::TO_NEXT_LINK;
+ rOutCursorEvt = CursorChainingEvent::TO_NEXT_LINK;
// Selection unchanged: we are at the beginning of the box
- *bOutHandled = true; // Nothing more to do than move cursor
+ rOutHandled = true; // Nothing more to do than move cursor
return;
}
// Possibility: Are we "pushing" at the end of the object?
if (eFunc == KeyFuncType::DELETE && bAtEndOfTextContent && pNextLink)
{
- *pOutCursorEvt = CursorChainingEvent::TO_NEXT_LINK;
+ rOutCursorEvt = CursorChainingEvent::TO_NEXT_LINK;
// Selection unchanged: we are at the beginning of the box
- *bOutHandled = false; // We still need to delete the characters
+ rOutHandled = false; // We still need to delete the characters
mbHandlingDel = true;
return;
}
@@ -111,29 +111,29 @@ void TextChainCursorManager::impDetectEvent(const KeyEvent& rKEvt,
// Possibility: Are we "pushing" at the start of the object?
if (nCode == KEY_LEFT && bAtStartOfTextContent && pPrevLink)
{
- *pOutCursorEvt = CursorChainingEvent::TO_PREV_LINK;
- *pOutSel = aEndSelPrevBox; // Set at end of selection
- *bOutHandled = true; // Nothing more to do than move cursor
+ rOutCursorEvt = CursorChainingEvent::TO_PREV_LINK;
+ rOutSel = aEndSelPrevBox; // Set at end of selection
+ rOutHandled = true; // Nothing more to do than move cursor
return;
}
// Possibility: Are we "pushing" at the start of the object and deleting left?
if (nCode == KEY_BACKSPACE && bAtStartOfTextContent && pPrevLink)
{
- *pOutCursorEvt = CursorChainingEvent::TO_PREV_LINK;
- *pOutSel = aEndSelPrevBox; // Set at end of selection
- *bOutHandled = false; // We need to delete characters after moving cursor
+ rOutCursorEvt = CursorChainingEvent::TO_PREV_LINK;
+ rOutSel = aEndSelPrevBox; // Set at end of selection
+ rOutHandled = false; // We need to delete characters after moving cursor
return;
}
// If arrived here there is no event detected
- *pOutCursorEvt = CursorChainingEvent::NULL_EVENT;
+ rOutCursorEvt = CursorChainingEvent::NULL_EVENT;
}
void TextChainCursorManager::HandleCursorEventAfterChaining(
const CursorChainingEvent aCurEvt,
- const ESelection aNewSel)
+ const ESelection& aNewSel)
{
// Special case for DELETE handling: we need to get back at the end of the prev box
@@ -155,7 +155,7 @@ void TextChainCursorManager::HandleCursorEventAfterChaining(
void TextChainCursorManager::HandleCursorEvent(
const CursorChainingEvent aCurEvt,
- const ESelection aNewSel)
+ const ESelection& aNewSel)
{
More information about the Libreoffice-commits
mailing list