[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source

2016-02-02 Thread Caolán McNamara
 editeng/source/editeng/impedit3.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 1b49e14c82af691fe1ec5aa5de8392350bce11a1
Author: Caolán McNamara 
Date:   Tue Feb 2 11:50:51 2016 +

Resolves: tdf#97375 use Invalidate in all modes

makes the crash/hangs go away

(cherry picked from commit ab5c427784fb72d52042b8122ffc5a0fd7108c6b)

(cherry picked from commit c3f09ae629b349c52a4a7954e3017ceb8d7afeaf)

Change-Id: I91a4391190ec7aa0ffa5e41a8c1eb86b4bb9c484
Reviewed-on: https://gerrit.libreoffice.org/22026
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index fb071e0..98e3d51 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -289,12 +289,7 @@ void ImpEditEngine::UpdateViews( EditView* pCurView )
 {
 // convert to window coordinates 
 aClipRect = pView->pImpEditView->GetWindowPos( aClipRect );
-
-// For tiled rendering, we have to always go via Invalidate().
-if ( pView == pCurView && !pView->isTiledRendering())
-Paint( pView->pImpEditView, aClipRect, 0, true );
-else
-pView->GetWindow()->Invalidate( aClipRect );
+pView->GetWindow()->Invalidate( aClipRect );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source

2015-11-09 Thread Stephan Bergmann
 editeng/source/editeng/editundo.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5889d97f4e6ac41db9cd65b55baa14c46a283893
Author: Stephan Bergmann 
Date:   Mon Nov 9 12:11:15 2015 +0100

EditUndoRemoveChars::GetStr must return a reference

...as ImpEditEngine::ImpRemoveChars (editeng/source/editeng/impedit2.cxx) 
calls

  pCurUndo->GetStr() += aStr;

Regression introduced with d5e11f5ffb741aabe7e43be78ef764a1f3cafd8e "convert
editeng/source/editeng/editundo.hxx from String to OUString."

Change-Id: Iab3dd3b861bca715a90e89e3a63a6f298657367d
(cherry picked from commit e31205f3ec1f941ab5a188bfde6329edf2acc55b)
Reviewed-on: https://gerrit.libreoffice.org/19857
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/editeng/source/editeng/editundo.hxx 
b/editeng/source/editeng/editundo.hxx
index a31261a..9d6451a 100644
--- a/editeng/source/editeng/editundo.hxx
+++ b/editeng/source/editeng/editundo.hxx
@@ -126,7 +126,7 @@ public:
 EditUndoRemoveChars(EditEngine* pEE, const EPaM& rEPaM, const OUString& 
rStr);
 
 const EPaM& GetEPaM() { return aEPaM; }
-OUStringGetStr() const { return aText; }
+OUString &  GetStr() { return aText; }
 
 virtual voidUndo() SAL_OVERRIDE;
 virtual voidRedo() SAL_OVERRIDE;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source sw/qa

2015-11-06 Thread Caolán McNamara
 editeng/source/misc/svxacorr.cxx |   34 +-
 sw/qa/extras/inc/swmodeltestbase.hxx |   12 +---
 sw/qa/extras/uiwriter/uiwriter.cxx   |5 +++--
 3 files changed, 33 insertions(+), 18 deletions(-)

New commits:
commit de1cb4039756f71d848297981b757c1cfa4609b1
Author: Caolán McNamara 
Date:   Fri Oct 23 09:11:56 2015 +0100

Resolves: tdf#76964 fall back to primary language via getLanguage

instead of bittwiddling which ends up trying to resolve the
system language

(cherry picked from commit a1ff0745cc4f78777e8dba1e7bb52d18386d7394)

more tdf#76964 fall back to primary language via getLanguage

(cherry picked from commit 97893e56e61a466e56d12ee46d11f6e4c32a737b)

sw: fix SwUiWriterTest pointlessly loading an "empty.odt" ...

... instead of just creating a new document.

(cherry picked from commit 98ddd7a32fd0d5fa080fac368b9dc53a06659285)

Change-Id: I545bd5e39f99003ddedf3c90031e8b818edc1de2
Reviewed-on: https://gerrit.libreoffice.org/19545
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 10426e1..03b0733 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1729,10 +1729,8 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
 }
 
 // If it still could not be found here, then keep on searching
-
 LanguageType eLang = aLanguageTag.getLanguageType();
-LanguageType nTmpKey1 = eLang & 0x7ff, // the main language in many cases 
DE
- nTmpKey2 = eLang & 0x3ff; // otherwise for example EN
+LanguageType nTmpKey1 = eLang & 0x7ff; // the main language in many cases 
DE
 if(nTmpKey1 != eLang && (pLangTable->find(aLanguageTag.reset(nTmpKey1)) != 
pLangTable->end() ||
 CreateLanguageFile(aLanguageTag, false)))
 {
@@ -1746,8 +1744,12 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
 }
 }
 
-if(nTmpKey2 != eLang && (pLangTable->find(aLanguageTag.reset(nTmpKey2)) != 
pLangTable->end() ||
-CreateLanguageFile(aLanguageTag, false)))
+// otherwise for example EN
+aLanguageTag.reset(aLanguageTag.getLanguage());
+LanguageType nTmpKey2 = aLanguageTag.getLanguageType(false);
+if (nTmpKey2 != eLang && nTmpKey2 != LANGUAGE_UNDETERMINED &&
+(pLangTable->find(aLanguageTag) != pLangTable->end() ||
+ CreateLanguageFile(aLanguageTag, false)))
 {
 //the language is available - so bring it on
 SvxAutoCorrectLanguageLists* pList = 
pLangTable->find(aLanguageTag)->second;
@@ -1783,8 +1785,7 @@ bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType 
eLang,
 
 // First search for eLang, then US-English -> English
 // and last in LANGUAGE_UNDETERMINED
-LanguageType nTmpKey1 = eLang & 0x7ff, // the main language in many cases 
DE
- nTmpKey2 = eLang & 0x3ff; // otherwise for example EN
+LanguageType nTmpKey1 = eLang & 0x7ff; // the main language in many cases 
DE
 OUString sTemp(sWord);
 
 if(pLangTable->find(aLanguageTag) != pLangTable->end() || 
CreateLanguageFile(aLanguageTag, false))
@@ -1806,8 +1807,12 @@ bool SvxAutoCorrect::FindInWrdSttExceptList( 
LanguageType eLang,
 return true;
 }
 
-if(nTmpKey2 != eLang && (pLangTable->find(aLanguageTag.reset(nTmpKey2)) != 
pLangTable->end() ||
-CreateLanguageFile(aLanguageTag, false)))
+// otherwise for example EN
+aLanguageTag.reset(aLanguageTag.getLanguage());
+LanguageType nTmpKey2 = aLanguageTag.getLanguageType(false);
+if (nTmpKey2 != eLang && nTmpKey2 != LANGUAGE_UNDETERMINED &&
+(pLangTable->find(aLanguageTag) != pLangTable->end() ||
+ CreateLanguageFile(aLanguageTag, false)))
 {
 //the language is available - so bring it on
 SvxAutoCorrectLanguageLists* pList = 
pLangTable->find(aLanguageTag)->second;
@@ -1869,8 +1874,7 @@ bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType 
eLang,
 
 // First search for eLang, then US-English -> English
 // and last in LANGUAGE_UNDETERMINED
-LanguageType nTmpKey1 = eLang & 0x7ff, // the main language in many cases 
DE
- nTmpKey2 = eLang & 0x3ff; // otherwise for example EN
+LanguageType nTmpKey1 = eLang & 0x7ff; // the main language in many cases 
DE
 OUString sTemp( sWord );
 
 if(pLangTable->find(aLanguageTag) != pLangTable->end() || 
CreateLanguageFile(aLanguageTag, false))
@@ -1890,8 +1894,12 @@ bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType 
eLang,
 return true;
 }
 
-if(nTmpKey2 != eLang && (pLangTable->find(aLanguageTag.reset(nTmpKey2)) != 
pLangTable->end() ||
-CreateLanguageFile(aLanguageTag, false)))
+// otherwise for example 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source svtools/source xmloff/source

2015-11-02 Thread Mark Hung
 editeng/source/rtf/svxrtf.cxx|8 +++-
 svtools/source/svrtf/parrtf.cxx  |   21 +++--
 xmloff/source/style/styleexp.cxx |4 
 3 files changed, 30 insertions(+), 3 deletions(-)

New commits:
commit 52f3eb47aa42bd1a2a61088706cd3c729e274fc0
Author: Mark Hung 
Date:   Sun Aug 30 16:08:20 2015 +0800

Fix tdf#93438 Impress generate abnormal style when copy-pasting

from Writer with Chinese UI. When user configure UI language as
Chinese, style names are also translated. However when Copy-pasting
from Writer to Impress ( select RTF fromat with paste-special),
Chinese (unicode) style names are borken into multiparts, where
some of them are empty string. Neither deleting the abnormal
style nor saving the file can be achieved. The only remedy is to
remove style with emtpy name with macro. With this patch:
1) Catch NoSuchElementException and ignores it, so
   user still has chance saving file.
2) Make sure style has valid number before inserting it.
3) Prevent text breaking into multiple tokens by handling  ucN in
 ScanText().

Change-Id: I417f70b81c23ac63c175cc13c548068873d13a38
Reviewed-on: https://gerrit.libreoffice.org/18148
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 
Reviewed-on: https://gerrit.libreoffice.org/19685

diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 56ef736..ec633c8 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -300,6 +300,7 @@ void SvxRTFParser::ReadStyleTable()
 {
 int nToken, bSaveChkStyleAttr = bChkStyleAttr ? 1 : 0;
 sal_uInt16 nStyleNo = 0;
+bool bHasStyleNo = false;
 int _nOpenBrakets = 1;  // the first was already detected earlier!!
 SvxRTFStyleType* pStyle = new SvxRTFStyleType( *pAttrPool, [0] );
 pStyle->aAttrSet.Put( GetRTFDefaults() );
@@ -340,12 +341,16 @@ void SvxRTFParser::ReadStyleTable()
 case RTF_SNEXT: pStyle->nNext = sal_uInt16(nTokenValue);break;
 case RTF_OUTLINELEVEL:
 case RTF_SOUTLVL:   pStyle->nOutlineNo = sal_uInt8(nTokenValue);
break;
-case RTF_S: nStyleNo = (short)nTokenValue;  break;
+case RTF_S: nStyleNo = (short)nTokenValue;
+bHasStyleNo = true;
+break;
 case RTF_CS:nStyleNo = (short)nTokenValue;
+bHasStyleNo = true;
 pStyle->bIsCharFmt = true;
 break;
 
 case RTF_TEXTTOKEN:
+if (bHasStyleNo)
 {
 pStyle->sName = DelCharAtEnd( aToken, ';' );
 
@@ -358,6 +363,7 @@ void SvxRTFParser::ReadStyleTable()
 pStyle = new SvxRTFStyleType( *pAttrPool, [0] );
 pStyle->aAttrSet.Put( GetRTFDefaults() );
 nStyleNo = 0;
+bHasStyleNo = false;
 }
 break;
 default:
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index fc98b87..e7be520 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -431,6 +431,24 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
 aToken = sSave;
 bRTF_InTextRead = false;
 }
+else if ( 'c' == nNextCh )
+{
+// Prevent text breaking into multiple tokens.
+rInput.SeekRel( 2 );
+nNextCh = GetNextChar();
+if (RTF_ISDIGIT( nNextCh ))
+{
+sal_uInt8 nNewOverread = 0 ;
+do {
+nNewOverread *= 10;
+nNewOverread += nNextCh - '0';
+nNextCh = GetNextChar();
+} while ( RTF_ISDIGIT( nNextCh ) );
+nUCharOverread = nNewOverread;
+aParserStates.top().nUCharOverread = 
nNewOverread;
+}
+bNextCh = 0x20 == nNextCh;
+}
 else
 {
 nNextCh = '\\';
@@ -448,8 +466,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
 }
 break;
 
-case sal_Unicode(EOF):
-eState = SVPAR_ERROR;
+case sal_Unicode(EOF): eState = SVPAR_ERROR;
 // continue
 case '{':
 case '}':
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 0ab12cc..8ca89b6 100644
--- a/xmloff/source/style/styleexp.cxx
+++ 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source

2015-09-25 Thread László Németh
 editeng/source/editeng/edtspell.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 1e15cf04b5e167de1bfc5c19019dcae2042e1414
Author: László Németh 
Date:   Fri Sep 25 11:51:04 2015 +0200

tdf#93141 Calc/Impress: remove last colon of emoji short names

AutoCorrect Emoji replacements were incomplete in Calc cells and
Impress text boxes, keeping the terminating colon:

:omega: -> Ω:

Corrected by this patch:

:omega: -> Ω

Change-Id: I0d1f6f9ec9c31a7b37e0c9afaaad17dcee568dd5
Reviewed-on: https://gerrit.libreoffice.org/18849
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/editeng/source/editeng/edtspell.cxx 
b/editeng/source/editeng/edtspell.cxx
index 8b50d9f..510545d 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -743,9 +743,13 @@ bool EdtAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos,
 pCurNode->GetString(), rSttPos, nEndPos, *this, aLanguageTag);
 if( pFnd && pFnd->IsTextOnly() )
 {
+
+// replace also last colon of keywords surrounded by colons (for 
example, ":name:")
+bool replaceLastChar = pFnd->GetShort()[0] == ':' && 
pFnd->GetShort().endsWith(":");
+
 // then replace
 EditSelection aSel( EditPaM( pCurNode, rSttPos ),
-EditPaM( pCurNode, nEndPos ) );
+EditPaM( pCurNode, nEndPos + (replaceLastChar ? 1 
: 0) ));
 aSel = mpEditEngine->DeleteSelection(aSel);
 SAL_WARN_IF(nCursor < nEndPos, "editeng",
 "Cursor in the heart of the action?!");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source

2015-09-03 Thread Mark Hung
 editeng/source/editeng/impedit4.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9761e8b7eb2f4efedfff67a6574540d4ea2e9c5a
Author: Mark Hung 
Date:   Wed Sep 2 00:33:01 2015 +0800

Fix tdf#93781 Impress copy wrong style name to clipboard when

style name contains Chinese character.

Encode style name in multibyte sring (ex,Chinese) properly with
RTFOutFuncs::Out_String().

Change-Id: Ibdd1010e28c711d7829643b60b32637ebce58bdb
Reviewed-on: https://gerrit.libreoffice.org/18247
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 85c62a36a907bc5ff31627349a80baa51efbd443)
Reviewed-on: https://gerrit.libreoffice.org/18296

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 0c26682..ecc1214 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -515,7 +515,8 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, 
EditSelection aSel )
 rOutput.WriteUInt32AsString( nNumber );
 
 // Name of the template ...
-rOutput.WriteCharPtr( " " ).WriteCharPtr( 
OUStringToOString(pStyle->GetName(), eDestEnc).getStr() );
+rOutput.WriteCharPtr( " " );
+RTFOutFuncs::Out_String( rOutput, pStyle->GetName(), eDestEnc 
);
 rOutput.WriteCharPtr( ";}" );
 nStyle++;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source include/editeng include/tools tools/source

2015-08-28 Thread Caolán McNamara
 editeng/source/editeng/editattr.cxx |6 -
 editeng/source/items/textitem.cxx   |   38 ++--
 include/editeng/colritem.hxx|1 
 include/tools/color.hxx |2 -
 tools/source/generic/color.cxx  |2 -
 5 files changed, 15 insertions(+), 34 deletions(-)

New commits:
commit da80db2298fd3f6b17629c7b20b9884d6307c1d9
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 27 12:21:37 2015 +0100

don't write SvxBackgroundColorItem via inherited SvxColorItem::Store

SvxBackgroundColorItem inherits from SvxColorItem and for backwards
compatibility with the StarOffice 5 binary file format (yes, really)
writes/reads only rgb and not the transparency value, so copying and pasting
text from a sidebar comment in writer to itself or another one results in a
black character background as the default COL_AUTO turns into black

Change-Id: I18b5105dd8e060b9e49dda6026e26d3a0f00d8f5
(cherry picked from commit 3bc69b1d0d8620afd89a993b5f6bc46a2ff5267f)

this farcical staroffice 5.0 related junk can at least be const

Change-Id: I096d98f6e0cb61cacd9cd82a623f832b88ded1e6
(cherry picked from commit 1e8b7cdbbd084a1e75f82bfff605321c8480b78d)
Reviewed-on: https://gerrit.libreoffice.org/18087
Reviewed-by: Michael Meeks michael.me...@collabora.com
Tested-by: Michael Meeks michael.me...@collabora.com

diff --git a/editeng/source/editeng/editattr.cxx 
b/editeng/source/editeng/editattr.cxx
index dcb9fa0..46cc8cf 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -221,7 +221,6 @@ void EditCharAttribColor::SetFont( SvxFont rFont, 
OutputDevice* )
 {
 Color aColor = static_castconst SvxColorItem*(GetItem())-GetValue();
 rFont.SetColor( aColor);
-//fprintf(stderr, Called SetFont with Color %d\n, aColor.GetColor());
 }
 
 // class EditCharAttribBackgroundColor
@@ -238,14 +237,11 @@ 
EditCharAttribBackgroundColor::EditCharAttribBackgroundColor(
 void EditCharAttribBackgroundColor::SetFont( SvxFont rFont, OutputDevice* )
 {
 Color aColor = static_castconst 
SvxBackgroundColorItem*(GetItem())-GetValue();
-rFont.SetFillColor( aColor);
 rFont.SetTransparent(false);
-
+rFont.SetFillColor(aColor);
 }
 
-
 // class EditCharAttribLanguage
-
 EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem rAttr, 
sal_uInt16 _nStart, sal_uInt16 _nEnd )
 : EditCharAttrib( rAttr, _nStart, _nEnd )
 {
diff --git a/editeng/source/items/textitem.cxx 
b/editeng/source/items/textitem.cxx
index 40bf333..4289446 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1850,9 +1850,12 @@ SvxBackgroundColorItem::SvxBackgroundColorItem( const 
Color rCol,
 {
 }
 
-SvxBackgroundColorItem:: SvxBackgroundColorItem( SvStream rStrm, const 
sal_uInt16 Id  ) :
-SvxColorItem( rStrm, Id )
+SvxBackgroundColorItem::SvxBackgroundColorItem(SvStream rStrm, const 
sal_uInt16 nId)
+: SvxColorItem(nId)
 {
+Color aColor;
+aColor.Read(rStrm);
+SetValue(aColor);
 }
 
 SvxBackgroundColorItem::SvxBackgroundColorItem( const SvxBackgroundColorItem 
rCopy ) :
@@ -1862,9 +1865,14 @@ SvxBackgroundColorItem::SvxBackgroundColorItem( const 
SvxBackgroundColorItem rC
 
 SfxPoolItem* SvxBackgroundColorItem::Clone( SfxItemPool * ) const
 {
-return new SvxBackgroundColorItem( *this );
+return new SvxBackgroundColorItem(*this);
 }
 
+SvStream SvxBackgroundColorItem::Store(SvStream rStrm, sal_uInt16) const
+{
+GetValue().Write(rStrm);
+return rStrm;
+}
 
 SfxPoolItem* SvxBackgroundColorItem::Create(SvStream rStrm, sal_uInt16 ) const
 {
@@ -1918,23 +1926,18 @@ bool SvxBackgroundColorItem::PutValue( const uno::Any 
rVal, sal_uInt8 nMemberId
 }
 
 // class SvxColorItem 
-
 SvxColorItem::SvxColorItem( const sal_uInt16 nId ) :
 SfxPoolItem( nId ),
 mColor( COL_BLACK )
 {
 }
 
-
-
 SvxColorItem::SvxColorItem( const Color rCol, const sal_uInt16 nId ) :
 SfxPoolItem( nId ),
 mColor( rCol )
 {
 }
 
-
-
 SvxColorItem::SvxColorItem( SvStream rStrm, const sal_uInt16 nId ) :
 SfxPoolItem( nId )
 {
@@ -1943,21 +1946,16 @@ SvxColorItem::SvxColorItem( SvStream rStrm, const 
sal_uInt16 nId ) :
 mColor = aColor;
 }
 
-
-
 SvxColorItem::SvxColorItem( const SvxColorItem rCopy ) :
 SfxPoolItem( rCopy ),
 mColor( rCopy.mColor )
 {
 }
 
-
-
 SvxColorItem::~SvxColorItem()
 {
 }
 
-
 sal_uInt16 SvxColorItem::GetVersion( sal_uInt16 nFFVer ) const
 {
 DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
@@ -1967,8 +1965,6 @@ sal_uInt16 SvxColorItem::GetVersion( sal_uInt16 nFFVer ) 
const
 return  SOFFICE_FILEFORMAT_50 = nFFVer ? VERSION_USEAUTOCOLOR : 0;
 }
 
-
-
 bool SvxColorItem::operator==( const SfxPoolItem rAttr ) const
 {
 DBG_ASSERT( SfxPoolItem::operator==(rAttr), unequal types );
@@ -1976,16 +1972,12 @@ bool SvxColorItem::operator==( const 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source sw/source

2015-08-13 Thread Miklos Vajna
 editeng/source/editeng/impedit4.cxx |3 +--
 sw/source/core/view/viewsh.cxx  |4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit bc4904aba89bcbe267ca705ff76fc9d8629f73a3
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Wed Aug 12 14:16:11 2015 +0200

tdf#93384 editeng rendercontext: don't paint spellcheck result directly

E.g. in Writer create a new comment, type a word that is not in the
dictionary, then a space to trigger the spelling, and that painted the
spelling error indicator outside Paint().

(cherry picked from commits 71aed9185fb17ee27bdc38b4ac650713c4cabb8b and
89bd30cf426ca54fc9e46295a60551b5bb2d3232)

Change-Id: I8f72486189e04a5596729fb52b6af39772f8e002
Reviewed-on: https://gerrit.libreoffice.org/17690
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 8cd007a..0c26682 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2414,8 +2414,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* 
pThisNodeOnly, bool bSpellAtC
 {
 // convert to window coordinates 
 aClipRect.SetPos( 
pView-pImpEditView-GetWindowPos( aClipRect.TopLeft() ) );
-// If selected, then VDev ...
-Paint( pView-pImpEditView, aClipRect, 0, 
pView-HasSelection() );
+
pView-pImpEditView-GetWindow()-Invalidate(aClipRect);
 }
 }
 }
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index b934e76..9cb6941 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1677,8 +1677,8 @@ public:
 rtl::Referencesdr::overlay::OverlayManager xOldManager = 
pOldPaintWindow-GetOverlayManager();
 if (xOldManager.is())
 {
-SdrPaintWindow* pNewPaintWindow = 
m_pShell-Imp()-GetDrawView()-FindPaintWindow(*m_pRef);
-
xOldManager-completeRedraw(pNewPaintWindow-GetRedrawRegion(), m_pRef);
+if (SdrPaintWindow* pNewPaintWindow = 
m_pShell-Imp()-GetDrawView()-FindPaintWindow(*m_pRef))
+
xOldManager-completeRedraw(pNewPaintWindow-GetRedrawRegion(), m_pRef);
 }
 
 m_pShell-Imp()-GetDrawView()-DeleteWindowFromPaintView(m_pRef);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source sw/source

2015-06-08 Thread László Németh
 editeng/source/misc/svxacorr.cxx |9 +++--
 sw/source/core/edit/acorrect.cxx |5 -
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 15c04e1f567e50aff850a65996c65e6465497710
Author: László Németh laszlo.nem...@collabora.com
Date:   Sun May 31 15:35:03 2015 +0200

AutoCorrect: fix not immediately replacement of Emoji :short_names:

Cherry-picked from 86782d5dfc0163159369677b0ac172ed2125b221
and cd2ba3124602ad9ee8f5927c385936cc5319808d.

[86782d5dfc0163159369677b0ac172ed2125b221:

AutoCorrect: direct replacement of keywords surrounded by colons

Replacing immediately (without pressing space or enter) and
inside words, too. For example, fixing tdf#55292 – complete input
method for n-dash, m-dash – is possible now by  :--: - n-dash,
:---: - m-dash AutoCorrect replacements.]

cd2ba3124602ad9ee8f5927c385936cc5319808d:

unbreak calc again, a fix for the previous commit by Markus Mohrhard]

Change-Id: Id7d9411599bec620fa91c246b531d26150f20c6a
Reviewed-on: https://gerrit.libreoffice.org/16002
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Christian Lohmaier lohmaier+libreoff...@googlemail.com

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 48d12f9..10426e1 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2825,12 +2825,17 @@ const SvxAutocorrWord* 
SvxAutocorrWordList::WordMatches(const SvxAutocorrWord *p
 sal_Int32 right_wildcard = rChk.endsWith( .* ) ? 2 : 0; // word.* 
pattern?
 sal_Int32 nSttWdPos = nEndPos;
 
-if ( nEndPos = rChk.getLength() - left_wildcard - right_wildcard )
+// direct replacement of keywords surrounded by colons (for example, 
:name:)
+bool bColonNameColon = rTxt.getLength()  nEndPos 
+rTxt[nEndPos] == ':'  rChk[0] == ':'  rChk.endsWith(:);
+if ( nEndPos + (bColonNameColon ? 1 : 0) = rChk.getLength() - 
left_wildcard - right_wildcard )
 {
 
 bool bWasWordDelim = false;
 sal_Int32 nCalcStt = nEndPos - rChk.getLength() + left_wildcard;
-if( !right_wildcard  ( !nCalcStt || nCalcStt == rStt || 
left_wildcard ||
+if (bColonNameColon)
+nCalcStt++;
+if( !right_wildcard  ( !nCalcStt || nCalcStt == rStt || 
left_wildcard || bColonNameColon ||
   ( nCalcStt  rStt 
 IsWordDelim( rTxt[ nCalcStt - 1 ] ))) )
 {
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index d3281eb..82255be 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -326,8 +326,11 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32 rSttPos, 
sal_Int32 nEndPos,
 SwDoc* pDoc = rEditSh.GetDoc();
 if( pFnd )
 {
+// replace also last colon of keywords surrounded by colons (for 
example, :name:)
+bool replaceLastChar = pFnd-GetShort()[0] == ':'  
pFnd-GetShort().endsWith(:);
+
 const SwNodeIndex rNd = rCrsr.GetPoint()-nNode;
-SwPaM aPam( rNd, rSttPos, rNd, nEndPos );
+SwPaM aPam( rNd, rSttPos, rNd, nEndPos + (replaceLastChar ? 1 : 0) );
 
 if( pFnd-IsTextOnly() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source icon-themes/breeze icon-themes/crystal icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/industrial icon

2015-06-03 Thread Katarina Behrens
 editeng/source/editeng/editdoc.cxx   |2 
 icon-themes/breeze/links.txt |4 +
 icon-themes/crystal/links.txt|4 +
 icon-themes/galaxy/links.txt |3 
 icon-themes/hicontrast/links.txt |4 +
 icon-themes/human/links.txt  |4 +
 icon-themes/industrial/links.txt |4 +
 icon-themes/oxygen/links.txt |4 +
 icon-themes/sifr/links.txt   |3 
 icon-themes/tango/links.txt  |3 
 icon-themes/tango_testing/links.txt  |4 +
 include/editeng/editids.hrc  |6 +
 include/svx/dialogs.hrc  |1 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 ++
 sd/sdi/_drvwsh.sdi   |5 +
 sd/sdi/drtxtob.sdi   |6 +
 sd/source/ui/app/sddll.cxx   |1 
 sd/uiconfig/sdraw/toolbar/textobjectbar.xml  |1 
 sd/uiconfig/simpress/toolbar/textobjectbar.xml   |1 
 svx/sdi/svx.sdi  |   25 
+++
 svx/sdi/svxitems.sdi |1 
 svx/source/sidebar/text/TextPropertyPanel.cxx|   19 
-
 svx/source/sidebar/text/TextPropertyPanel.hxx|1 
 svx/source/tbxctrls/tbcontrl.cxx |   18 
+
 svx/source/tbxctrls/tbcontrl.src |5 +
 svx/uiconfig/ui/sidebartextpanel.ui  |   33 
--
 26 files changed, 158 insertions(+), 12 deletions(-)

New commits:
commit c0e07bc592b7fe270514ae392eacb6ebde3df879
Author: Katarina Behrens katarina.behr...@cib.de
Date:   Tue Jun 2 11:55:40 2015 +0200

tdf#88276: toolbar|sidebar button for text background colour

Change-Id: I547a562384d30b95b744673feb284ccbcf50a614
Reviewed-on: https://gerrit.libreoffice.org/16030
Reviewed-by: Jan Holesovsky ke...@collabora.com
Tested-by: Yousuf Philips philip...@hotmail.com
Reviewed-by: Philippe Jung phil.j...@free.fr
Reviewed-by: Yousuf Philips philip...@hotmail.com

diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 6f447b9..ca6adb3 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -211,7 +211,7 @@ const SfxItemInfo aItemInfos[EDITITEMCOUNT] = {
 { SID_ATTR_CHAR_OVERLINE, SfxItemPoolFlags::POOLABLE },
 { SID_ATTR_CHAR_CASEMAP, SfxItemPoolFlags::POOLABLE },   // 
EE_CHAR_CASEMAP
 { SID_ATTR_CHAR_GRABBAG, SfxItemPoolFlags::POOLABLE },   // 
EE_CHAR_GRABBAG
-{ 0, SfxItemPoolFlags::POOLABLE },   // 
EE_CHAR_BKGCOLOR
+{ SID_ATTR_CHAR_BACK_COLOR, SfxItemPoolFlags::POOLABLE },// 
EE_CHAR_BKGCOLOR
 { 0, SfxItemPoolFlags::POOLABLE },   // 
EE_FEATURE_TAB
 { 0, SfxItemPoolFlags::POOLABLE },   // 
EE_FEATURE_LINEBR
 { SID_ATTR_CHAR_CHARSETCOLOR, SfxItemPoolFlags::POOLABLE },  // 
EE_FEATURE_NOTCONV
diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index dcc73b8..32d8aac 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -105,3 +105,7 @@ database/linked_text_table.png cmd/sc_dataimport.png
 #cmd/lc_undo.png cmd/he/lc_redo.png
 #cmd/sc_redo.png cmd/he/sc_undo.png
 #cmd/sc_undo.png cmd/he/sc_redo.png
+
+# text background colour Impress/Draw
+cmd/sc_charbackcolor.png cmd/sc_backcolor.png
+cmd/lc_charbackcolor.png cmd/lc_backcolor.png
diff --git a/icon-themes/crystal/links.txt b/icon-themes/crystal/links.txt
index 5c8bad3..3e7c8a7 100644
--- a/icon-themes/crystal/links.txt
+++ b/icon-themes/crystal/links.txt
@@ -4,3 +4,7 @@ cmd/lc_showsinglepage.png cmd/lc_adddirect.png
 # paragraph line spacing
 cmd/lc_linespacing.png cmd/lc_spacepara15.png
 cmd/sc_linespacing.png cmd/sc_spacepara15.png
+
+# text background colour Impress/Draw
+cmd/sc_charbackcolor.png cmd/sc_backcolor.png
+cmd/lc_charbackcolor.png cmd/lc_backcolor.png
diff --git a/icon-themes/galaxy/links.txt b/icon-themes/galaxy/links.txt
index 0a257a3..8825c9f 100644
--- a/icon-themes/galaxy/links.txt
+++ b/icon-themes/galaxy/links.txt
@@ -59,3 +59,6 @@ cmd/sc_formatselection.png 
sfx2/res/symphony/sidebar-property-small.png
 cmd/lc_view3d.png sfx2/res/symphony/sidebar-3d-large.png
 cmd/sc_view3d.png sfx2/res/symphony/sidebar-3d-small.png