[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2014-09-09 Thread Niklas Johansson
 svtools/source/contnr/svimpbox.cxx |   22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

New commits:
commit f36ca2f32d8f27681b2a1ef9fd7f59db21f67ec6
Author: Niklas Johansson sleeping.pil...@gmail.com
Date:   Sun Aug 17 20:53:47 2014 +0200

Treeview may lose focus when left/right arrow is used

In a treeview, for example the hierarchal view of the
styles and formatting panel, if your not on a node that is
expandable or collapsable when you press the left or right
arrow key, the focus will move away from the tree view in
a very awkward way. This patch makes the control work more
like a native treeview.

At this point I don't feel confident about the surrounding
code to avoid the code duplication that this patch adds.

Reviewed-on: https://gerrit.libreoffice.org/10956
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org
(cherry picked from commit a6f78bf8fd5dc768cc8c37ca717d7bad8fe2dc81)

Change-Id: Ibd04cf5329b4d226aac102d214a45e45811982e7
Reviewed-on: https://gerrit.libreoffice.org/11255
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org
(cherry picked from commit bee7674a602123229b62cad23536f103496a5298)
Reviewed-on: https://gerrit.libreoffice.org/11310
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svtools/source/contnr/svimpbox.cxx 
b/svtools/source/contnr/svimpbox.cxx
index 0099dd2..07ac082 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2223,8 +2223,13 @@ bool SvImpLBox::KeyInput( const KeyEvent rKEvt)
 
 case KEY_RIGHT:
 {
-if( bSubLstOpLR  IsNowExpandable() )
-pView-Expand( pCursor );
+if( bSubLstOpLR )
+{
+// only try to expand if sublist is expandable,
+// otherwise ignore the key press
+if( IsNowExpandable() )
+pView-Expand( pCursor );
+}
 else if ( bIsCellFocusEnabled  pCursor )
 {
 if ( nCurTabPos  ( pView-TabCount() - 1 /*!2*/ ) )
@@ -2290,8 +2295,17 @@ bool SvImpLBox::KeyInput( const KeyEvent rKEvt)
 }
 }
 }
-else if( bSubLstOpLR  IsExpandable() )
-pView-Collapse( pCursor );
+else if( bSubLstOpLR )
+{
+if( IsExpandable()  pView-IsExpanded( pCursor ) )
+pView-Collapse( pCursor );
+else
+{
+pNewCursor = pView-GetParent( pCursor );
+if( pNewCursor )
+SetCursor( pNewCursor );
+}
+}
 else
 bKeyUsed = false;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2014-08-26 Thread Tor Lillqvist
 svtools/source/graphic/transformer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 150d3ae7f9d1d801e0a05e555781eba5a13d9eff
Author: Tor Lillqvist t...@collabora.com
Date:   Tue Aug 26 16:29:46 2014 +0300

bnc#719994: We need the proper alpha mask

Change-Id: Ic16dceaca431929238fcef6be31ee95e068b91e4
(cherry picked from commit e06014e0db64ec36ec41dee542d2453c945fddd3)
Reviewed-on: https://gerrit.libreoffice.org/11128
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svtools/source/graphic/transformer.cxx 
b/svtools/source/graphic/transformer.cxx
index bf63621..68f5fc2 100644
--- a/svtools/source/graphic/transformer.cxx
+++ b/svtools/source/graphic/transformer.cxx
@@ -147,7 +147,7 @@ uno::Reference graphic::XGraphic  SAL_CALL 
GraphicTransformer::applyDuotone(
 ::Graphic aGraphic( *::unographic::Graphic::getImplementation( xIFace ) );
 
 BitmapExaBitmapEx( aGraphic.GetBitmapEx() );
-Bitmap  aMask( aBitmapEx.GetMask() );
+AlphaMask   aMask( aBitmapEx.GetAlpha() );
 Bitmap  aBitmap( aBitmapEx.GetBitmap() );
 BmpFilterParam aFilter( (sal_uLong) nColorOne, (sal_uLong) nColorTwo );
 aBitmap.Filter( BMP_FILTER_DUOTONE, aFilter );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2014-07-02 Thread Caolán McNamara
 svtools/source/svhtml/parhtml.cxx |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 32eddb3f48fcea0a052401a8a5dc075c7847f1c5
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Jul 1 12:50:45 2014 +0100

fix detection of Salesforce html

Change-Id: Ie777c253e221527cba8affaf766e2eddfc78c103
Reviewed-on: https://gerrit.libreoffice.org/10012
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/svtools/source/svhtml/parhtml.cxx 
b/svtools/source/svhtml/parhtml.cxx
index 54c1548..13a56c3 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1925,6 +1925,16 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
 
 sCmp = sCmp.toAsciiLowerCase();
 
+sal_Char c;
+sal_Int32 nPos;
+for (nPos = 0; nPos  sCmp.getLength(); ++nPos)
+{
+c = sCmp[nPos];
+if (c != ' '  c != '\n'  c != '\t'  c != '\r'  c != '\f')
+break;
+}
+sCmp = sCmp.copy(nPos);
+
 // A HTML document must have a '' in the first line
 sal_Int32 nStart = sCmp.indexOf('');
 if (nStart == -1)
@@ -1932,8 +1942,6 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
 nStart++;
 
 // followed by arbitrary characters followed by a blank or ''
-sal_Char c;
-sal_Int32 nPos;
 for( nPos = nStart; nPos  sCmp.getLength(); ++nPos )
 {
 if( ''==(c=sCmp[nPos]) || HTML_ISSPACE(c) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source svtools/uiconfig

2014-06-25 Thread Joren De Cuyper
 svtools/source/filter/exportdialog.cxx |4 +---
 svtools/uiconfig/ui/graphicexport.ui   |2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit ccace9b443e419c59274c8794eb3a9973c20b61f
Author: Joren De Cuyper jore...@libreoffice.org
Date:   Tue Jun 24 21:19:35 2014 +0200

fdo#51763 - make title of dialog localisable

Following the bug report the title is currently not correctly
localisable for Catalan language due format issues.

Change-Id: I09107acb3f4acd7acf5a614216265373c59938b2
Reviewed-on: https://gerrit.libreoffice.org/9883
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com
(cherry picked from commit 6162191b4a258d071382aeaa88aa80852b04ae2a)
(cherry picked from commit c003f0270018d0b4c9d2220d43aa5a8d239d00b4)

diff --git a/svtools/source/filter/exportdialog.cxx 
b/svtools/source/filter/exportdialog.cxx
index fe152ff..fea3559 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -639,9 +639,7 @@ ExportDialog::ExportDialog(FltCallDialogParameter rPara,
 mnMaxFilesizeForRealtimePreview = 
mpOptionsItem-ReadInt32(OUString(MaxFilesizeForRealtimePreview), 0);
 mpFtEstimatedSize-SetText(OUString( \n ));
 
-OUString aTitle(maExt);
-aTitle += GetText();
-SetText(aTitle);
+SetText( GetText().replaceFirst(%1, maExt) ); //Set dialog title
 
 mnFormat = GetFilterFormat( maExt );
 
diff --git a/svtools/uiconfig/ui/graphicexport.ui 
b/svtools/uiconfig/ui/graphicexport.ui
index 780185f..4bb27a8 100644
--- a/svtools/uiconfig/ui/graphicexport.ui
+++ b/svtools/uiconfig/ui/graphicexport.ui
@@ -23,7 +23,7 @@
   object class=GtkDialog id=GraphicExportDialog
 property name=can_focusFalse/property
 property name=border_width6/property
-property name=title translatable=yes Options/property
+property name=title translatable=yes%1 Options/property
 property name=type_hintdialog/property
 child internal-child=vbox
   object class=GtkBox id=dialog-vbox1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2014-05-17 Thread Caolán McNamara
 svtools/source/graphic/grfcache.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4eea91d7a9a90a40839925909c1173b4469e0eb4
Author: Caolán McNamara caol...@redhat.com
Date:   Fri May 16 16:06:10 2014 +0100

fix memory leak on pasting metafiles into writer

copying from mspaint to writer and then deleting the image in a loop will
eventually exhaust all memory.

regression since 004a29b9ac66f68af5ea12a2303a4b2be77d8145

Change-Id: I381285cda3823de7df0c1725a339943caf9536fe
(cherry picked from commit 7d6e159df4c28afde2fff5bd734ec3a8f63cb15a)
Reviewed-on: https://gerrit.libreoffice.org/9383
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com

diff --git a/svtools/source/graphic/grfcache.cxx 
b/svtools/source/graphic/grfcache.cxx
index 966cea8..da793f3 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -366,7 +366,7 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut( const 
GraphicObject /*rObj*
 if( mbSwappedAll )
 {
 delete mpBmpEx, mpBmpEx = NULL;
-mpMtf = NULL; // No need to delete it as it has already been 
dereferenced
+delete mpMtf, mpMtf = NULL;
 delete mpAnimation, mpAnimation = NULL;
 
 // #119176# also reset SvgData
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2014-02-05 Thread Kohei Yoshida
 svtools/source/config/colorcfg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 08c7fb3a8e952ad03f043c445802b0120a452a15
Author: Kohei Yoshida kohei.yosh...@collabora.com
Date:   Tue Feb 4 17:17:45 2014 -0500

fdo#73263: Change the default color for reference border to non-red.

See the referenced bug report for the reason behind it.

Change-Id: I4284807adaf82ae9581208a13ebd5071d36be5c7
(cherry picked from commit 95a7e952552adb834f92d1477f83938e7c8d0204)
Reviewed-on: https://gerrit.libreoffice.org/7862
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/svtools/source/config/colorcfg.cxx 
b/svtools/source/config/colorcfg.cxx
index a8e5ba8..50e7edb 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -444,7 +444,7 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry)
 COL_GRAY, //CALCPAGEBREAKAUTOMATIC
 COL_LIGHTBLUE, // CALCDETECTIVE
 COL_LIGHTRED, // CALCDETECTIVEERROR
-COL_LIGHTRED, // CALCREFERENCE
+0xef0fff, // CALCREFERENCE
 0xc0, // CALCNOTESBACKGROUND
 0xc0c0c0, // DRAWGRID
 COL_GREEN, // BASICIDENTIFIER,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2014-01-16 Thread Lionel Elie Mamane
 svtools/source/brwbox/brwbox1.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 554710d39029b1ddf244d55fc6b464a8a896ea6a
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jan 14 18:44:24 2014 +0100

fdo#51180 reset (Multi)Selection on Clear()

Change-Id: I06dde63093eab4e5e1c692f6363aca70b89de96a
Reviewed-on: https://gerrit.libreoffice.org/7430
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/svtools/source/brwbox/brwbox1.cxx 
b/svtools/source/brwbox/brwbox1.cxx
index 23f418d..d165c00 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -1149,6 +1149,13 @@ void BrowseBox::Clear()
 DoHideCursor( Clear );
 long nOldRowCount = nRowCount;
 nRowCount = 0;
+if(bMultiSelection)
+{
+assert(uRow.pSel);
+*uRow.pSel = MultiSelection();
+}
+else
+uRow.nSel = BROWSER_ENDOFSELECTION;
 nCurRow = BROWSER_ENDOFSELECTION;
 nTopRow = 0;
 nCurColId = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2013-12-12 Thread Jan Holesovsky
 svtools/source/contnr/svlbitm.cxx |   20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 3e6ce9e2102a923bd0dab0b791db3587c6e434f2
Author: Jan Holesovsky ke...@collabora.com
Date:   Thu Dec 12 09:55:35 2013 +0100

fdo#72125: GetTextWidth() can get very expensive.

Let's just count an approximate width using a cached value when we have too
many entries.

Change-Id: I2113887c477bc774dd00df538ec1a01f102f4726

diff --git a/svtools/source/contnr/svlbitm.cxx 
b/svtools/source/contnr/svlbitm.cxx
index ca3b342..e47baaa 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -247,7 +247,25 @@ void SvLBoxString::InitViewData(
 DBG_CHKTHIS(SvLBoxString,0);
 if( !pViewData )
 pViewData = pView-GetViewDataItem( pEntry, this );
-pViewData-maSize = Size(pView-GetTextWidth(maText), 
pView-GetTextHeight());
+
+// fdo#72125: GetTextWidth() can get very expensive; let's just count
+// an approximate width using a cached value when we have many entries
+long nTextWidth;
+if (pView-GetEntryCount()  100)
+{
+static SvTreeListBox *pPreviousView = NULL;
+static float fApproximateCharWidth = 0.0;
+if (pPreviousView != pView)
+{
+pPreviousView = pView;
+fApproximateCharWidth = pView-approximate_char_width();
+}
+nTextWidth = maText.getLength() * fApproximateCharWidth;
+}
+else
+nTextWidth = pView-GetTextWidth(maText);
+
+pViewData-maSize = Size(nTextWidth, pView-GetTextHeight());
 }
 
 // ***
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2013-12-09 Thread Ulrich Kitzinger
 svtools/source/graphic/grfmgr.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit f7b42987c4247244b23f0405fc5af58a92afd945
Author: Ulrich Kitzinger ulk...@hotmail.de
Date:   Sat Nov 30 21:19:31 2013 +0100

fdo#72156: GraphicObject: Added missing delete of stream

Change-Id: I1b84941b0e4b17d5819b1e4af0da9ce3f673710f
Signed-off-by: Ulrich Kitzinger ulk...@hotmail.de
(cherry picked from commit cc36dfc9bf4f327c359d171d8d05f0ede049164e)
Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/svtools/source/graphic/grfmgr.cxx 
b/svtools/source/graphic/grfmgr.cxx
index 89b6ead..f1c5955 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -1160,7 +1160,10 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( 
const OUString rURL )
 {
 SvStream*   pStream = utl::UcbStreamHelper::CreateStream( aURL, 
STREAM_READ );
 if( pStream )
+{
 GraphicConverter::Import( *pStream, aGraphic );
+delete pStream;
+}
 }
 
 return GraphicObject( aGraphic );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2013-12-05 Thread Caolán McNamara
 svtools/source/contnr/treelist.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 2140ea5569588155702580eefef2c168d5c701d8
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Dec 5 16:25:16 2013 +

crash on exit from xml form document with accessibility enabled

(cherry picked from commit 0c3211b1f20383b4fbee8978e88c21e498e35047)

Conflicts:
svtools/source/contnr/treelistbox.cxx

Change-Id: If60075b939569cf339f7ccf7e39e513fbe1f74bf

diff --git a/svtools/source/contnr/treelist.cxx 
b/svtools/source/contnr/treelist.cxx
index 8500425..4cac34b 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1472,7 +1472,8 @@ sal_Bool SvListView::IsSelected( SvTreeListEntry* pEntry 
) const
 {
 DBG_ASSERT(pEntry,IsExpanded:No Entry);
 SvDataTable::const_iterator itr = maDataTable.find(pEntry );
-DBG_ASSERT(itr != maDataTable.end(),Entry not in Table);
+if (itr == maDataTable.end())
+return false;
 return itr-second-IsSelected();
 }
 
@@ -1487,7 +1488,8 @@ void SvListView::SetEntryFocus( SvTreeListEntry* pEntry, 
sal_Bool bFocus )
 const SvViewDataEntry* SvListView::GetViewData( const SvTreeListEntry* pEntry 
) const
 {
 SvDataTable::const_iterator itr = maDataTable.find( 
const_castSvTreeListEntry*(pEntry) );
-DBG_ASSERT(itr != maDataTable.end(),Entry not in model or wrong view);
+if (itr == maDataTable.end())
+return NULL;
 return itr-second;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits