[Libreoffice-commits] core.git: editeng/source include/editeng sc/source svx/source

2022-05-06 Thread Kohei Yoshida (via logerrit)
 editeng/source/editeng/editeng.cxx  |8 +++---
 editeng/source/editeng/editview.cxx |6 ++---
 editeng/source/editeng/edtspell.cxx |4 +--
 editeng/source/editeng/impedit.hxx  |2 -
 editeng/source/editeng/impedit3.cxx |4 +--
 editeng/source/editeng/impedit4.cxx |   43 +---
 editeng/source/editeng/textconv.cxx |2 -
 editeng/source/outliner/outlin2.cxx |2 -
 editeng/source/outliner/outlvw.cxx  |2 -
 editeng/source/uno/unofored.cxx |2 -
 include/editeng/editdata.hxx|   13 ++
 include/editeng/editeng.hxx |4 +--
 sc/source/ui/view/spelleng.cxx  |   29 +++-
 svx/source/dialog/weldeditview.cxx  |2 -
 14 files changed, 86 insertions(+), 37 deletions(-)

New commits:
commit f15e6293cf78d67963a6e512f60a11ae58da72c5
Author: Kohei Yoshida 
AuthorDate: Fri May 6 19:37:14 2022 -0400
Commit: Kohei Yoshida 
CommitDate: Sat May 7 04:52:50 2022 +0200

tdf#107765: Check the updated language and apply it to the cell.

During the normal spell-checking in Calc, the user may change the
language on the string segment with a spelling error, which is supposed
to be applied back to that segment in the cell, but was not. This change
should fix it.

In case the new language is applied to the entire cell string, we will
set the new lanuage to the cell as a cell attribute and keep the string
as a simple string.  Otherwise, the new language gets applied to the
edit engine string.

This commit also changes the return value of EditEngine::GetLanguage()
to include the string span information in addition to the language
value.

Change-Id: I713ec7aefe571f721321cd8ea687f616ab4dd61a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133966
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 4e87300fd006..5869bcdeeeb4 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -478,16 +478,16 @@ SvtScriptType EditEngine::GetScriptType( const 
ESelection& rSelection ) const
 return pImpEditEngine->GetItemScriptType( aSel );
 }
 
-LanguageType EditEngine::GetLanguage(const EditPaM& rPaM) const
+editeng::LanguageSpan EditEngine::GetLanguage(const EditPaM& rPaM) const
 {
 return pImpEditEngine->GetLanguage(rPaM);
 }
 
-LanguageType EditEngine::GetLanguage( sal_Int32 nPara, sal_Int32 nPos ) const
+editeng::LanguageSpan EditEngine::GetLanguage( sal_Int32 nPara, sal_Int32 nPos 
) const
 {
 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
 DBG_ASSERT( pNode, "GetLanguage - nPara is invalid!" );
-return pNode ? pImpEditEngine->GetLanguage( EditPaM( pNode, nPos ) ) : 
LANGUAGE_DONTKNOW;
+return pNode ? pImpEditEngine->GetLanguage( EditPaM( pNode, nPos ) ) : 
editeng::LanguageSpan{};
 }
 
 
@@ -1328,7 +1328,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, 
EditView* pEditView, v
 {
 OUString aComplete;
 
-LanguageType eLang = 
pImpEditEngine->GetLanguage( EditPaM( aStart.GetNode(), aStart.GetIndex()+1));
+LanguageType eLang = 
pImpEditEngine->GetLanguage( EditPaM( aStart.GetNode(), 
aStart.GetIndex()+1)).nLang;
 LanguageTag aLanguageTag( eLang);
 
 if 
(!pImpEditEngine->xLocaleDataWrapper.isInitialized())
diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 8f199b79ea89..320fd52eab8c 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1022,7 +1022,7 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, 
const Link  xSpellAlt =
-xSpeller->spell( aSelected, 
static_cast(pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( 
aPaM2 )), aPropVals );
+xSpeller->spell( aSelected, 
static_cast(pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( 
aPaM2 ).nLang), aPropVals );
 
 Reference< linguistic2::XLanguageGuessing >  xLangGuesser( 
EditDLL::Get().GetGlobalData()->GetLanguageGuesser() );
 
@@ -1102,7 +1102,7 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, 
const LinkgetDictionaries();
 pDic  = aDics.getConstArray();
-LanguageType nCheckedLanguage = 
pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 );
+LanguageType nCheckedLanguage = 
pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 ).nLang;
 sal_uInt16 nDicCount = static_cast(aDics.getLength());
 for (sal_uInt16 i = 0; i < nDicCount; i++)
 {
@@ -1254,7 +1254,7 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, 
const LinkPutText( aSelected, aWord, 
pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 ) );
+ 

[Libreoffice-commits] core.git: editeng/source include/editeng sc/source svx/source

2022-02-04 Thread Dennis Francis (via logerrit)
 editeng/source/editeng/editview.cxx |   27 ---
 editeng/source/editeng/impedit.cxx  |   16 +---
 editeng/source/editeng/impedit.hxx  |4 
 include/editeng/editview.hxx|4 
 sc/source/ui/view/gridwin4.cxx  |9 +++--
 svx/source/svdraw/svdedxv.cxx   |3 +++
 6 files changed, 55 insertions(+), 8 deletions(-)

New commits:
commit 226847e385d021bf2feacdfa796b3eb7023d6f0f
Author: Dennis Francis 
AuthorDate: Tue Jan 4 12:55:45 2022 +0530
Commit: Dennis Francis 
CommitDate: Fri Feb 4 19:21:53 2022 +0100

lokCalcRTL: fix editing of shape text

Inform editeng that negated document x coordinates are used in this case
and ensure that editeng generated invalidation rectangles always have
positive X coordinates.

Conflicts:
sc/source/ui/view/gridwin4.cxx

Change-Id: I2e450707ce02f7bcd8e4d299f857c37ebbd5e2c6
(cherry picked from commit 0fe02bb99e5dfa8379a49de75683fc350e4c4dbd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129360
Tested-by: Jenkins
Reviewed-by: Dennis Francis 

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 0c2f8f43b2a9..c8d12f0388d3 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -195,20 +195,30 @@ tools::Rectangle EditView::GetInvalidateRect() const
 }
 }
 
+namespace {
+
+tools::Rectangle lcl_negateRectX(const tools::Rectangle& rRect)
+{
+return tools::Rectangle(-rRect.Right(), rRect.Top(), -rRect.Left(), 
rRect.Bottom());
+}
+
+}
+
 void EditView::InvalidateWindow(const tools::Rectangle& rClipRect)
 {
+bool bNegativeX = IsNegativeX();
 if (EditViewCallbacks* pEditViewCallbacks = 
pImpEditView->getEditViewCallbacks())
 {
 // do not invalidate and trigger a global repaint, but forward
 // the need for change to the applied EditViewCallback, can e.g.
 // be used to visualize the active edit text in an OverlayObject
-pEditViewCallbacks->EditViewInvalidate(rClipRect);
+pEditViewCallbacks->EditViewInvalidate(bNegativeX ? 
lcl_negateRectX(rClipRect) : rClipRect);
 }
 else
 {
 // classic mode: invalidate and trigger full repaint
 // of the changed area
-GetWindow()->Invalidate(rClipRect);
+GetWindow()->Invalidate(bNegativeX ? lcl_negateRectX(rClipRect) : 
rClipRect);
 }
 }
 
@@ -216,10 +226,11 @@ void EditView::InvalidateOtherViewWindows( const 
tools::Rectangle& rInvRect )
 {
 if (comphelper::LibreOfficeKit::isActive())
 {
+bool bNegativeX = IsNegativeX();
 for (auto& pWin : pImpEditView->aOutWindowSet)
 {
 if (pWin)
-pWin->Invalidate( rInvRect );
+pWin->Invalidate( bNegativeX ? lcl_negateRectX(rInvRect) : 
rInvRect );
 }
 }
 }
@@ -1678,4 +1689,14 @@ bool EditView::IsSuppressLOKMessages() const
 return pImpEditView->IsSuppressLOKMessages();
 }
 
+void EditView::SetNegativeX(bool bSet)
+{
+pImpEditView->SetNegativeX(bSet);
+}
+
+bool EditView::IsNegativeX() const
+{
+return pImpEditView->IsNegativeX();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index 1175c28661cd..cfd6eb5758dc 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -198,7 +198,8 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* 
pEng, vcl::Window* pWindo
 eAnchorMode(EEAnchorMode::TopLeft),
 mpEditViewCallbacks(nullptr),
 mbBroadcastLOKViewCursor(comphelper::LibreOfficeKit::isActive()),
-mbSuppressLOKMessages(false)
+mbSuppressLOKMessages(false),
+mbNegativeX(false)
 {
 aEditSelection.Min() = pEng->GetEditDoc().GetStartPaM();
 aEditSelection.Max() = pEng->GetEditDoc().GetEndPaM();
@@ -875,6 +876,15 @@ void ImpEditView::SetOutputArea( const tools::Rectangle& 
rRect )
 SetScrollDiffX( static_cast(aOutArea.GetWidth()) * 2 / 10 );
 }
 
+namespace {
+
+tools::Rectangle lcl_negateRectX(const tools::Rectangle& rRect)
+{
+return tools::Rectangle(-rRect.Right(), rRect.Top(), -rRect.Left(), 
rRect.Bottom());
+}
+
+}
+
 void ImpEditView::InvalidateAtWindow(const tools::Rectangle& rRect)
 {
 if (EditViewCallbacks* pCallbacks = getEditViewCallbacks())
@@ -882,13 +892,13 @@ void ImpEditView::InvalidateAtWindow(const 
tools::Rectangle& rRect)
 // do not invalidate and trigger a global repaint, but forward
 // the need for change to the applied EditViewCallback, can e.g.
 // be used to visualize the active edit text in an OverlayObject
-pCallbacks->EditViewInvalidate(rRect);
+pCallbacks->EditViewInvalidate(mbNegativeX ? lcl_negateRectX(rRect) : 
rRect);
 }
 else
 {
 // classic mode: invalidate and trigger full repaint
 // of the changed area
-GetWindo

[Libreoffice-commits] core.git: editeng/source include/editeng sc/source svx/source

2021-07-16 Thread Mike Kaganski (via logerrit)
 editeng/source/rtf/rtfitem.cxx|  334 +++---
 editeng/source/rtf/svxrtf.cxx |  155 ++-
 include/editeng/svxrtf.hxx|   84 
 sc/source/filter/rtf/rtfparse.cxx |8 
 svx/source/table/tablertfimporter.cxx |4 
 5 files changed, 231 insertions(+), 354 deletions(-)

New commits:
commit caac77e62fe44aa8d5ef282b63765ae05148548b
Author: Mike Kaganski 
AuthorDate: Fri Jul 16 12:08:26 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Jul 16 12:55:10 2021 +0200

Use WhichRangesContainer in editeng

Change-Id: Ia6516df33341181990c2b8b8affa859395831007
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119013
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index b6e0a93adee6..c7ea1d3f9ba6 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -81,33 +81,33 @@ void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, 
SfxItemSet& rSet,
 switch( rItem.Which() )
 {
 case SID_ATTR_CHAR_FONT:
-pNormal = &aPlainMap.nFont;
-pCJK = &aPlainMap.nCJKFont;
-pCTL = &aPlainMap.nCTLFont;
+pNormal = &aPlainMap[SID_ATTR_CHAR_FONT];
+pCJK = &aPlainMap[SID_ATTR_CHAR_CJK_FONT];
+pCTL = &aPlainMap[SID_ATTR_CHAR_CTL_FONT];
 break;
 
 case SID_ATTR_CHAR_FONTHEIGHT:
-pNormal = &aPlainMap.nFontHeight;
-pCJK = &aPlainMap.nCJKFontHeight;
-pCTL = &aPlainMap.nCTLFontHeight;
+pNormal = &aPlainMap[SID_ATTR_CHAR_FONTHEIGHT];
+pCJK = &aPlainMap[SID_ATTR_CHAR_CJK_FONTHEIGHT];
+pCTL = &aPlainMap[SID_ATTR_CHAR_CTL_FONTHEIGHT];
 break;
 
 case SID_ATTR_CHAR_POSTURE:
-pNormal = &aPlainMap.nPosture;
-pCJK = &aPlainMap.nCJKPosture;
-pCTL = &aPlainMap.nCTLPosture;
+pNormal = &aPlainMap[SID_ATTR_CHAR_POSTURE];
+pCJK = &aPlainMap[SID_ATTR_CHAR_CJK_POSTURE];
+pCTL = &aPlainMap[SID_ATTR_CHAR_CTL_POSTURE];
 break;
 
 case SID_ATTR_CHAR_WEIGHT:
-pNormal = &aPlainMap.nWeight;
-pCJK = &aPlainMap.nCJKWeight;
-pCTL = &aPlainMap.nCTLWeight;
+pNormal = &aPlainMap[SID_ATTR_CHAR_WEIGHT];
+pCJK = &aPlainMap[SID_ATTR_CHAR_CJK_WEIGHT];
+pCTL = &aPlainMap[SID_ATTR_CHAR_CTL_WEIGHT];
 break;
 
 case SID_ATTR_CHAR_LANGUAGE:
-pNormal = &aPlainMap.nLanguage;
-pCJK = &aPlainMap.nCJKLanguage;
-pCTL = &aPlainMap.nCTLLanguage;
+pNormal = &aPlainMap[SID_ATTR_CHAR_LANGUAGE];
+pCJK = &aPlainMap[SID_ATTR_CHAR_CJK_LANGUAGE];
+pCTL = &aPlainMap[SID_ATTR_CHAR_CTL_LANGUAGE];
 break;
 
 case 0:
@@ -267,57 +267,55 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet 
)
 break;
 
 case RTF_KEEP:
-if( aPardMap.nSplit )
+if (const sal_uInt16 wid = aPardMap[SID_ATTR_PARA_SPLIT])
 {
-pSet->Put( SvxFormatSplitItem( false, aPardMap.nSplit ));
+pSet->Put(SvxFormatSplitItem(false, wid));
 }
 break;
 
 case RTF_KEEPN:
-if( aPardMap.nKeep )
+if (const sal_uInt16 wid = aPardMap[SID_ATTR_PARA_KEEP])
 {
-pSet->Put( SvxFormatKeepItem( true, aPardMap.nKeep ));
+pSet->Put(SvxFormatKeepItem(true, wid));
 }
 break;
 
 case RTF_LEVEL:
-if( aPardMap.nOutlineLvl )
+if (const sal_uInt16 wid = aPardMap[SID_ATTR_PARA_OUTLLEVEL])
 {
-pSet->Put( SfxInt16Item( aPardMap.nOutlineLvl,
-
static_cast(nTokenValue) ));
+pSet->Put(SfxInt16Item(wid, 
static_cast(nTokenValue)));
 }
 break;
 
 case RTF_QL:
-if( aPardMap.nAdjust )
+if (const sal_uInt16 wid = aPardMap[SID_ATTR_PARA_ADJUST])
 {
-pSet->Put( SvxAdjustItem( SvxAdjust::Left, 
aPardMap.nAdjust ));
+pSet->Put(SvxAdjustItem(SvxAdjust::Left, wid));
 }
 break;
 case RTF_QR:
-if( aPardMap.nAdjust )
+if (const sal_uInt16 wid = aPardMap[SID_ATTR_PARA_ADJUST])
 {
-pSet->Put( SvxAdjustItem( SvxAdjust::Right, 
aPardMap.nAdjust ));
+pSet->Put(SvxAdjustItem(SvxAdjust::Right, wid));
 }
 break;
 case RTF_QJ:
-if( aPardMap.nAdjust )
+if (const sal_uInt16 wid = aPardMap[SID_ATTR_PARA_ADJUST])
 {
-pSet->Put( SvxAdjustItem( SvxAdjust::Block, 
aPardMap.nAdjust ));
+  

[Libreoffice-commits] core.git: editeng/source include/editeng sc/source svx/source

2017-03-29 Thread Noel Grandin
 editeng/source/editeng/editeng.cxx|   36 ++--
 editeng/source/editeng/eehtml.cxx |   42 -
 editeng/source/editeng/eertfpar.cxx   |   60 --
 editeng/source/editeng/impedit.hxx|7 -
 include/editeng/editdata.hxx  |   52 
 include/editeng/editeng.hxx   |   13 ++-
 sc/source/filter/html/htmlpars.cxx|  144 --
 sc/source/filter/inc/htmlpars.hxx |  102 
 sc/source/filter/inc/rtfparse.hxx |8 -
 sc/source/filter/rtf/eeimpars.cxx |2 
 sc/source/filter/rtf/rtfparse.cxx |   26 +++---
 svx/source/table/tablertfimporter.cxx |   34 +++-
 12 files changed, 290 insertions(+), 236 deletions(-)

New commits:
commit b6853991fce5b4129d0bedf4a7b74fd9e3898bc2
Author: Noel Grandin 
Date:   Wed Mar 29 13:25:44 2017 +0200

split ImportState enum into RtfImportState and HtmlImportState

and convert to scoped enum

Change-Id: I23e44e78ce96ed5fc19374e3e069e1cdc2166a35
Reviewed-on: https://gerrit.libreoffice.org/35840
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index f5956ddee4cf..caad404b50ab 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1530,14 +1530,24 @@ Link EditEngine::GetStatusEventHdl() 
const
 return pImpEditEngine->GetStatusEventHdl();
 }
 
-void EditEngine::SetImportHdl( const Link& rLink )
+void EditEngine::SetHtmlImportHdl( const Link& rLink )
 {
-pImpEditEngine->aImportHdl = rLink;
+pImpEditEngine->aHtmlImportHdl = rLink;
 }
 
-const Link& EditEngine::GetImportHdl() const
+const Link& EditEngine::GetHtmlImportHdl() const
 {
-return pImpEditEngine->aImportHdl;
+return pImpEditEngine->aHtmlImportHdl;
+}
+
+void EditEngine::SetRtfImportHdl( const Link& rLink )
+{
+pImpEditEngine->aRtfImportHdl = rLink;
+}
+
+const Link& EditEngine::GetRtfImportHdl() const
+{
+return pImpEditEngine->aRtfImportHdl;
 }
 
 void EditEngine::SetBeginMovingParagraphsHdl( const 
Link& rLink )
@@ -2727,9 +2737,14 @@ void EditEngine::SetReplaceLeadingSingleQuotationMark( 
bool bReplace )
 pImpEditEngine->SetReplaceLeadingSingleQuotationMark( bReplace );
 }
 
-bool EditEngine::IsImportHandlerSet() const
+bool EditEngine::IsHtmlImportHandlerSet() const
 {
-return pImpEditEngine->aImportHdl.IsSet();
+return pImpEditEngine->aHtmlImportHdl.IsSet();
+}
+
+bool EditEngine::IsRtfImportHandlerSet() const
+{
+return pImpEditEngine->aRtfImportHdl.IsSet();
 }
 
 bool EditEngine::IsImportRTFStyleSheetsSet() const
@@ -2737,9 +2752,14 @@ bool EditEngine::IsImportRTFStyleSheetsSet() const
 return pImpEditEngine->GetStatus().DoImportRTFStyleSheets();
 }
 
-void EditEngine::CallImportHandler(ImportInfo& rInfo)
+void EditEngine::CallHtmlImportHandler(HtmlImportInfo& rInfo)
+{
+pImpEditEngine->aHtmlImportHdl.Call(rInfo);
+}
+
+void EditEngine::CallRtfImportHandler(RtfImportInfo& rInfo)
 {
-pImpEditEngine->aImportHdl.Call(rInfo);
+pImpEditEngine->aRtfImportHdl.Call(rInfo);
 }
 
 EditPaM EditEngine::InsertParaBreak(const EditSelection& rEditSelection)
diff --git a/editeng/source/editeng/eehtml.cxx 
b/editeng/source/editeng/eehtml.cxx
index 965a18a1902d..1d8c87c59598 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -79,19 +79,19 @@ SvParserState EditHTMLParser::CallParser(EditEngine* pEE, 
const EditPaM& rPaM)
 // Build in wrap mimic in RTF import?
 aCurSel = EditSelection( rPaM, rPaM );
 
-if (mpEditEngine->IsImportHandlerSet())
+if (mpEditEngine->IsHtmlImportHandlerSet())
 {
-ImportInfo aImportInfo(HTMLIMP_START, this, 
mpEditEngine->CreateESelection(aCurSel));
-mpEditEngine->CallImportHandler(aImportInfo);
+HtmlImportInfo aImportInfo(HtmlImportState::Start, this, 
mpEditEngine->CreateESelection(aCurSel));
+mpEditEngine->CallHtmlImportHandler(aImportInfo);
 }
 
 ImpSetStyleSheet( 0 );
 _eState = HTMLParser::CallParser();
 
-if (mpEditEngine->IsImportHandlerSet())
+if (mpEditEngine->IsHtmlImportHandlerSet())
 {
-ImportInfo aImportInfo(HTMLIMP_END, this, 
mpEditEngine->CreateESelection(aCurSel));
-mpEditEngine->CallImportHandler(aImportInfo);
+HtmlImportInfo aImportInfo(HtmlImportState::End, this, 
mpEditEngine->CreateESelection(aCurSel));
+mpEditEngine->CallHtmlImportHandler(aImportInfo);
 }
 
 if ( bFieldsInserted )
@@ -491,26 +491,26 @@ void EditHTMLParser::NextToken( int nToken )
 }
 }   // SWITCH
 
-if (mpEditEngine->IsImportHandlerSet())
+if (mpEditEngine->IsHtmlImportHandlerSet())
 {
-ImportInfo aImportInfo(HTMLIMP_NEXTTOKEN, this, 
mpEditEngine->CreateESelection(aCurSel));
+HtmlImportInfo aImportInfo(HtmlImportState:

[Libreoffice-commits] core.git: editeng/source include/editeng sc/source svx/source sw/inc sw/source

2016-02-18 Thread Miklos Vajna
 editeng/source/editeng/editview.cxx   |4 ++--
 editeng/source/editeng/impedit.cxx|6 +-
 editeng/source/editeng/impedit.hxx|4 +---
 editeng/source/outliner/outlvw.cxx|4 ++--
 include/editeng/editview.hxx  |2 +-
 include/editeng/outliner.hxx  |2 +-
 sc/source/ui/app/inputhdl.cxx |2 +-
 sc/source/ui/view/viewdata.cxx|4 +---
 svx/source/svdraw/svdedxv.cxx |2 +-
 sw/inc/PostItMgr.hxx  |2 +-
 sw/source/core/view/viewsh.cxx|2 +-
 sw/source/uibase/docvw/PostItMgr.cxx  |4 ++--
 sw/source/uibase/docvw/SidebarWin.cxx |5 +
 13 files changed, 16 insertions(+), 27 deletions(-)

New commits:
commit 7073d20627ccfcdd705b53f9d8bc4b58fab9e82a
Author: Miklos Vajna 
Date:   Fri Feb 19 08:42:40 2016 +0100

editeng: remove never read mpLibreOfficeKitCallback

As all callback invocations happen with SdrModel's callback pointer.

Change-Id: I0111040c501b7927332f88cc4797b8ebab2bc57a

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 14c2b24..cfc6a88 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -583,9 +583,9 @@ Color EditView::GetBackgroundColor() const
 return pImpEditView->GetBackgroundColor();
 }
 
-void EditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback 
pCallback, void* pLibreOfficeKitData, OutlinerSearchable *pSearchable)
+void EditView::registerLibreOfficeKitCallback(OutlinerSearchable *pSearchable)
 {
-pImpEditView->registerLibreOfficeKitCallback(pCallback, 
pLibreOfficeKitData, pSearchable);
+pImpEditView->registerLibreOfficeKitCallback(pSearchable);
 }
 
 void EditView::SetControlWord( EVControlBits nWord )
diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index db15166..77c0a72 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -79,8 +79,6 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, 
vcl::Window* pWindo
 pOutWin = pWindow;
 pPointer= nullptr;
 pBackgroundColor= nullptr;
-mpLibreOfficeKitCallback = nullptr;
-mpLibreOfficeKitData = nullptr;
 mpLibreOfficeKitSearchable = nullptr;
 nScrollDiffX= 0;
 nExtraCursorFlags   = 0;
@@ -119,10 +117,8 @@ void ImpEditView::SetBackgroundColor( const Color& rColor )
 pBackgroundColor = new Color( rColor );
 }
 
-void ImpEditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback 
pCallback, void* pData, OutlinerSearchable* pSearchable)
+void ImpEditView::registerLibreOfficeKitCallback(OutlinerSearchable* 
pSearchable)
 {
-mpLibreOfficeKitCallback = pCallback;
-mpLibreOfficeKitData = pData;
 mpLibreOfficeKitSearchable = pSearchable;
 }
 
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 61f50d1..5449e44 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -222,8 +222,6 @@ private:
 EditView*   pEditView;
 vcl::Cursor*pCursor;
 Color*  pBackgroundColor;
-LibreOfficeKitCallback mpLibreOfficeKitCallback;
-void* mpLibreOfficeKitData;
 OutlinerSearchable* mpLibreOfficeKitSearchable;
 EditEngine* pEditEngine;
 VclPtr pOutWin;
@@ -370,7 +368,7 @@ public:
 return ( pBackgroundColor ? *pBackgroundColor : 
pOutWin->GetBackground().GetColor() ); }
 
 /// @see vcl::ITiledRenderable::registerCallback().
-void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, 
void* pLibreOfficeKitData, OutlinerSearchable* pSearchable);
+void registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable);
 /// Invokes the registered callback, if there are any.
 void libreOfficeKitCallback(int nType, const char* pPayload) const;
 
diff --git a/editeng/source/outliner/outlvw.cxx 
b/editeng/source/outliner/outlvw.cxx
index 25740cf..5a6c9f0 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1426,9 +1426,9 @@ void OutlinerView::SetBackgroundColor( const Color& 
rColor )
 pEditView->SetBackgroundColor( rColor );
 }
 
-void OutlinerView::registerLibreOfficeKitCallback(LibreOfficeKitCallback 
pCallback, void* pLibreOfficeKitData, OutlinerSearchable* pSearchable)
+void OutlinerView::registerLibreOfficeKitCallback(OutlinerSearchable* 
pSearchable)
 {
-pEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData, 
pSearchable);
+pEditView->registerLibreOfficeKitCallback(pSearchable);
 }
 
 Color OutlinerView::GetBackgroundColor()
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 9c1c541..71a4b64 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -183,7 +183,7 @@ public:
 Color   GetBackgroundColor() const;
 
 /// @see vcl::ITiledRenderab

[Libreoffice-commits] core.git: editeng/source include/editeng sc/source svx/source sw/source

2016-01-22 Thread Miklos Vajna
 editeng/source/editeng/editview.cxx   |5 -
 editeng/source/editeng/impedit.cxx|6 --
 editeng/source/editeng/impedit.hxx|2 --
 editeng/source/outliner/outlvw.cxx|5 -
 include/editeng/editview.hxx  |1 -
 include/editeng/outliner.hxx  |2 --
 sc/source/ui/app/inputhdl.cxx |9 -
 sc/source/ui/view/viewdata.cxx|1 -
 svx/source/svdraw/svdedxv.cxx |1 -
 sw/source/uibase/docvw/PostItMgr.cxx  |1 -
 sw/source/uibase/docvw/SidebarWin.cxx |1 -
 11 files changed, 34 deletions(-)

New commits:
commit fb7edcd806aad98ad61e60b4165771ca3ae13ef3
Author: Miklos Vajna 
Date:   Fri Jan 22 09:14:25 2016 +0100

editeng: ImpEditView::mbTiledRendering is never read

Change-Id: Ie8e33d075f0cedbb9f7148717c4318f4494ed419

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index f936d4e..14c2b24 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -583,11 +583,6 @@ Color EditView::GetBackgroundColor() const
 return pImpEditView->GetBackgroundColor();
 }
 
-void EditView::setTiledRendering(bool bTiledRendering)
-{
-pImpEditView->setTiledRendering(bTiledRendering);
-}
-
 void EditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback 
pCallback, void* pLibreOfficeKitData, OutlinerSearchable *pSearchable)
 {
 pImpEditView->registerLibreOfficeKitCallback(pCallback, 
pLibreOfficeKitData, pSearchable);
diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index 0fc72ff..36bd526 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -79,7 +79,6 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, 
vcl::Window* pWindo
 pOutWin = pWindow;
 pPointer= nullptr;
 pBackgroundColor= nullptr;
-mbTiledRendering= false;
 mpLibreOfficeKitCallback = nullptr;
 mpLibreOfficeKitData = nullptr;
 mpLibreOfficeKitSearchable = nullptr;
@@ -120,11 +119,6 @@ void ImpEditView::SetBackgroundColor( const Color& rColor )
 pBackgroundColor = new Color( rColor );
 }
 
-void ImpEditView::setTiledRendering(bool bTiledRendering)
-{
-mbTiledRendering = bTiledRendering;
-}
-
 void ImpEditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback 
pCallback, void* pData, OutlinerSearchable* pSearchable)
 {
 mpLibreOfficeKitCallback = pCallback;
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 57e03f7..1962b7e 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -222,7 +222,6 @@ private:
 EditView*   pEditView;
 vcl::Cursor*pCursor;
 Color*  pBackgroundColor;
-boolmbTiledRendering;
 LibreOfficeKitCallback mpLibreOfficeKitCallback;
 void* mpLibreOfficeKitData;
 OutlinerSearchable* mpLibreOfficeKitSearchable;
@@ -370,7 +369,6 @@ public:
 const Color&GetBackgroundColor() const {
 return ( pBackgroundColor ? *pBackgroundColor : 
pOutWin->GetBackground().GetColor() ); }
 
-voidsetTiledRendering(bool bTiledRendering);
 /// @see vcl::ITiledRenderable::registerCallback().
 void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, 
void* pLibreOfficeKitData, OutlinerSearchable* pSearchable);
 /// Invokes the registered callback, if there are any.
diff --git a/editeng/source/outliner/outlvw.cxx 
b/editeng/source/outliner/outlvw.cxx
index d624eb6..6240c0f 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1431,11 +1431,6 @@ void OutlinerView::SetBackgroundColor( const Color& 
rColor )
 pEditView->SetBackgroundColor( rColor );
 }
 
-void OutlinerView::setTiledRendering(bool bTiledRendering)
-{
-pEditView->setTiledRendering(bTiledRendering);
-}
-
 void OutlinerView::registerLibreOfficeKitCallback(LibreOfficeKitCallback 
pCallback, void* pLibreOfficeKitData, OutlinerSearchable* pSearchable)
 {
 pEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData, 
pSearchable);
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 21343f5..9c1c541 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -182,7 +182,6 @@ public:
 voidSetBackgroundColor( const Color& rColor );
 Color   GetBackgroundColor() const;
 
-voidsetTiledRendering(bool bTiledRendering);
 /// @see vcl::ITiledRenderable::registerCallback().
 void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, 
void* pLibreOfficeKitData, OutlinerSearchable *pSearchable);
 
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 6ea221e..8e428f2 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -273,8 +273,6 @@ public:
 v