[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2014-04-25 Thread Tomofumi Yagi
 svx/source/tbxctrls/tbcontrl.cxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit eb492e0bcf5c05d3ee5b95f4cc7e598845b26db2
Author: Tomofumi Yagi ya...@mknada.sakura.ne.jp
Date:   Sat Apr 19 16:52:44 2014 +0900

fdo#73891 Fix UI color panel does not show the actual color in Writer

1.The Font/Background/Highlight Color panels identify the actual color
 by a small frame.
 (Regression from the commit 35aa48d80b4b800d408d26bd72fbdfd711abbb6f
  See also fdo#32376 - Set default color to the current one in toolbar
  popups)

2.Fix this in the Floating Font/Background/Highlight Color Toolbar,too.

Change-Id: I5c2db8ab8923ab146cbf921dcb90894765f8420c
Reviewed-on: https://gerrit.libreoffice.org/9103
Reviewed-by: Kohei Yoshida libreoff...@kohei.us
Tested-by: Kohei Yoshida libreoff...@kohei.us
(cherry picked from commit 5c31515d2e54a42ceac1b21409cb730cdbb825ed)

Signed-off-by: Kohei Yoshida kohei.yosh...@collabora.com

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 62f2ee2..1d96781 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1128,6 +1128,17 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const 
OUStringrCommand,
 SetOutputSizePixel(Size(aNewSize.Width() + nAdd, aNewSize.Height() + 
nAdd));
 aColorSet.Clear();
 aColorSet.addEntriesForXColorList(*pColorList);
+
+short i = 0;
+long nCount = pColorList-Count();
+XColorEntry* pEntry = NULL;
+
+for ( i = 0; i  nCount; i++ )
+{
+pEntry = pColorList-GetColor(i);
+if( pEntry-GetColor() == mLastColor )
+aColorSet.SelectItem( i+1 );
+}
 }
 
 aColorSet.SetSelectHdl( LINK( this, SvxColorWindow_Impl, SelectHdl ) );
@@ -1200,6 +1211,7 @@ IMPL_LINK_NOARG(SvxColorWindow_Impl, SelectHdl)
 SfxToolBoxControl::Dispatch( Reference XDispatchProvider ( 
GetFrame()-getController(), UNO_QUERY ),
  maCommand,
  aArgs );
+aColorSet.SelectItem( nItemId );
 }
 
 return 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-1' - svx/source

2014-04-03 Thread Stephan Bergmann
 svx/source/smarttags/SmartTagMgr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2e075ecb7111d83b2f7748fd31d1d9ef11e9845e
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Apr 3 12:59:21 2014 +0200

Support SmartTagRecognizers again

The XContentEnumerationAccess is at the service manager, not the component
context.  Regression introduced in LO 4.0 with
4381f3dd5ae9e042840a16f69d07267208160420 fdo#46808, Use BreakIterator 
::create
method.

Change-Id: Idb7d38b9c14beea9a9ad347e6cbc8190d7248b2d
(cherry picked from commit d4c8325ea9cbffeff91de49d5e1f1f026be319de)
Reviewed-on: https://gerrit.libreoffice.org/8826
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/svx/source/smarttags/SmartTagMgr.cxx 
b/svx/source/smarttags/SmartTagMgr.cxx
index ebd6733..3204ef4 100644
--- a/svx/source/smarttags/SmartTagMgr.cxx
+++ b/svx/source/smarttags/SmartTagMgr.cxx
@@ -309,7 +309,7 @@ void SmartTagMgr::changesOccurred( const 
util::ChangesEvent rEvent ) throw( Run
 */
 void SmartTagMgr::LoadLibraries()
 {
-Reference container::XContentEnumerationAccess  rContent( mxContext , 
UNO_QUERY );
+Reference container::XContentEnumerationAccess  rContent( 
mxContext-getServiceManager(), UNO_QUERY );
 if ( !rContent.is() )
 return;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2014-03-12 Thread Muthu Subramanian
 svx/source/xoutdev/xattrbmp.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 910716696fa7bd0b87381121b10668dcb7953661
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 12 16:46:50 2014 +0530

n#821567: Use BitmapURL only if its valid.

Ported from: bf2ff0468e06770f9320c652a2332f7ec137d061

Change-Id: I7464fcba352798a686fc0563dd023feac5234dbf
Reviewed-on: https://gerrit.libreoffice.org/8547
Reviewed-by: Norbert Thiebaud nthieb...@gmail.com
Tested-by: Norbert Thiebaud nthieb...@gmail.com

diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index d2a5566..a24fce6 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -605,7 +605,9 @@ bool XFillBitmapItem::PutValue( const 
::com::sun::star::uno::Any rVal, sal_uInt
 }
 if( bSetURL )
 {
-maGraphicObject  = GraphicObject::CreateGraphicObjectFromURL(aURL);
+GraphicObject aGraphicObject  = 
GraphicObject::CreateGraphicObjectFromURL(aURL);
+if( aGraphicObject.GetType() != GRAPHIC_NONE )
+maGraphicObject = aGraphicObject;
 }
 if( bSetBitmap )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source vcl/source

2014-03-03 Thread Caolán McNamara
 svx/source/svdraw/sdrpaintwindow.cxx |   96 ---
 vcl/source/window/window.cxx |5 +
 2 files changed, 83 insertions(+), 18 deletions(-)

New commits:
commit ff2704d22bab86d9e58df812bc01482cfb4bb262
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Feb 28 16:55:03 2014 +

Resolves: rhbz#1007697 Update on a Window triggering delete on window

Reviewed-on: https://gerrit.libreoffice.org/8396
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com
(cherry picked from commit 1ec2880679d88c89901ce00fe30dd78e584f6960)

Conflicts:
svx/source/svdraw/sdrpaintwindow.cxx
vcl/source/window/window.cxx

Change-Id: Ic6374ce45e3a3ba97217ae77e91f9143f46e277b
Reviewed-on: https://gerrit.libreoffice.org/8400
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/svx/source/svdraw/sdrpaintwindow.cxx 
b/svx/source/svdraw/sdrpaintwindow.cxx
index 6ab2b40..da94126 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -22,35 +22,95 @@
 #include svx/svdpntv.hxx
 #include vcl/gdimtf.hxx
 #include vcl/svapp.hxx
+#include set
+#include vector
+
+//rhbz#1007697 do this in two loops, one to collect the candidates
+//and another to update them because updating a candidate can
+//trigger the candidate to be deleted, so asking for its
+//sibling after that is going to fail hard
+class CandidateMgr
+{
+std::vectorWindow* m_aCandidates;
+std::setWindow* m_aDeletedCandidates;
+DECL_LINK(WindowEventListener, VclSimpleEvent*);
+public:
+void PaintTransparentChildren(Window  rWindow, Rectangle const 
rPixelRect);
+~CandidateMgr();
+};
+
+IMPL_LINK(CandidateMgr, WindowEventListener, VclSimpleEvent*, pEvent)
+{
+VclWindowEvent* pWinEvent = dynamic_cast VclWindowEvent* ( pEvent );
+if (pWinEvent)
+{
+Window* pWindow = pWinEvent-GetWindow();
+if (pWinEvent-GetId() == VCLEVENT_OBJECT_DYING)
+{
+m_aDeletedCandidates.insert(pWindow);
+}
+}
 
+return 0;
+}
+
+CandidateMgr::~CandidateMgr()
+{
+for (std::vectorWindow*::iterator aI = m_aCandidates.begin();
+ aI != m_aCandidates.end(); ++aI)
+{
+Window* pCandidate = *aI;
+if (m_aDeletedCandidates.find(pCandidate) != 
m_aDeletedCandidates.end())
+continue;
+pCandidate-RemoveEventListener(LINK(this, CandidateMgr, 
WindowEventListener));
+}
+}
 
 void PaintTransparentChildren(Window  rWindow, Rectangle const rPixelRect)
 {
-if (rWindow.IsChildTransparentModeEnabled())
+if (!rWindow.IsChildTransparentModeEnabled())
+return;
+
+CandidateMgr aManager;
+aManager.PaintTransparentChildren(rWindow, rPixelRect);
+}
+
+void CandidateMgr::PaintTransparentChildren(Window  rWindow, Rectangle const 
rPixelRect)
+{
+Window * pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD );
+while (pCandidate)
 {
-Window * pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD );
-while (pCandidate)
+if (pCandidate-IsPaintTransparent())
 {
-if (pCandidate-IsPaintTransparent())
+const Rectangle aCandidatePosSizePixel(
+pCandidate-GetPosPixel(),
+pCandidate-GetSizePixel());
+
+if (aCandidatePosSizePixel.IsOver(rPixelRect))
 {
-const Rectangle aCandidatePosSizePixel(
-pCandidate-GetPosPixel(),
-pCandidate-GetSizePixel());
-
-if (aCandidatePosSizePixel.IsOver(rPixelRect))
-{
-pCandidate-Invalidate(
-INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN );
-// important: actually paint the child here!
-pCandidate-Update();
-}
+m_aCandidates.push_back(pCandidate);
+pCandidate-AddEventListener(LINK(this, CandidateMgr, 
WindowEventListener));
 }
-pCandidate = pCandidate-GetWindow( WINDOW_NEXT );
 }
+pCandidate = pCandidate-GetWindow( WINDOW_NEXT );
 }
-}
 
-
+for (std::vectorWindow*::iterator aI = m_aCandidates.begin();
+ aI != m_aCandidates.end(); ++aI)
+{
+pCandidate = *aI;
+if (m_aDeletedCandidates.find(pCandidate) != 
m_aDeletedCandidates.end())
+continue;
+//rhbz#1007697 this can cause the window itself to be
+//deleted. So we are listening to see if that happens
+//and if so, then skip the update
+pCandidate-Invalidate(INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN);
+// important: actually paint the child here!
+if 

[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2014-02-04 Thread Michael Stahl
 svx/source/svdraw/svdpagv.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 5200d19a541b59141d15e3780f5197569b6b135e
Author: Michael Stahl mst...@redhat.com
Date:   Mon Feb 3 11:26:59 2014 +0100

fdo#63433 fdo#74435: SdrPageView::DrawLayer(): avoid spuriously visible 
images

In the TestBook2.odt of fdo#73300 it happens that at some particular
points when scrolling down, the
ViewObjectContactOfPageHierarchy::getPrimitive2DSequenceHierarchy()
will determine that  200 images are visible; most likely this is due to
an empty ObjectContactOfPageView::maViewInformation2D::getViewport().

Loading this many images may need more RAM than is available on 32bit
platforms.

That appears to happen only (but not always) if somehow (not sure
how exactly) the rectangle passed to SdrPageView::DrawLayer() and the
existing GetRedrawRegion() do not overlap at all.

(regression from commit 8af09bf33291df2fb2bfbbd6e42f9bf074fcc4fc)

(cherry picked from commit 66f8b54931f193bdc844c6bca388d9bde98779cd)

Change-Id: Iafc595241df05204bccec1f2336014fc471b6602
Reviewed-on: https://gerrit.libreoffice.org/7813
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index cd13358..bbd94bf 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -350,7 +350,16 @@ void SdrPageView::DrawLayer(SdrLayerID nID, OutputDevice* 
pGivenTarget, sdr::con
 // Copy existing paint region to use the same as prepared 
in BeginDrawLayer
 SdrPaintWindow rExistingPaintWindow = 
pPreparedTarget-GetPaintWindow();
 const Region rExistingRegion = 
rExistingPaintWindow.GetRedrawRegion();
-if ( rRect.IsEmpty() )
+bool bUseRect(false);
+if (!rRect.IsEmpty())
+{
+Region r(rExistingRegion);
+r.Intersect(rRect);
+// fdo#74435: FIXME: visibility check broken if empty
+if (!r.IsEmpty())
+bUseRect = true;
+}
+if (!bUseRect)
 aTemporaryPaintWindow.SetRedrawRegion(rExistingRegion);
 else
 aTemporaryPaintWindow.SetRedrawRegion(Region(rRect));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source sw/source

2014-02-04 Thread Michael Stahl
 svx/source/svdraw/svdograf.cxx   |3 +++
 sw/source/core/graphic/ndgrf.cxx |3 +++
 2 files changed, 6 insertions(+)

New commits:
commit 39892ecb0db10ffa4a9803862264fd6e12d497aa
Author: Michael Stahl mst...@redhat.com
Date:   Fri Jan 31 23:00:24 2014 +0100

fdo#73300: sw: don't swap in all images when loading files

(regression from bd55f05b332c1573bd410fd9e21ea7fcf977e1b0)

(cherry picked from commit 9b9eb2e4f619c63eabdc54b5d749ac55d8eaf333)

Conflicts:
svx/source/svdraw/svdograf.cxx

Change-Id: I55532ac0fe983461e961a61149479343d2b879a1
Reviewed-on: https://gerrit.libreoffice.org/7812
Tested-by: Caolán McNamara caol...@redhat.com
Reviewed-by: Caolán McNamara caol...@redhat.com

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 46b88da..d918eaa 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -277,6 +277,9 @@ sdr::contact::ViewContact* 
SdrGrafObj::CreateObjectSpecificViewContact()
 
 void SdrGrafObj::onGraphicChanged()
 {
+if (!pGraphic || pGraphic-IsSwappedOut()) // don't force swap-in for this
+return;
+
 String aName;
 String aTitle;
 String aDesc;
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 5cedf29..97ff385 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -338,6 +338,9 @@ SwGrfNode::~SwGrfNode()
 /// allow reaction on change of content of GraphicObject
 void SwGrfNode::onGraphicChanged()
 {
+if (GetGrfObj().IsSwappedOut()) // don't force swap-in for this
+return;
+
 // try to access SwFlyFrmFmt; since title/desc/name are set there, there 
is no
 // use to continue if it is not yet set. If not yet set, call 
onGraphicChanged()
 // when it is set.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-12-16 Thread Caolán McNamara
 svx/source/table/svdotable.cxx |   20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

New commits:
commit a3f38bdaaff91abdf2e0f01d0b6370aa958e4a20
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Dec 10 16:54:59 2013 +

correctly dispose to avoid cyclic dependencies

accessibility cruft is still listening to dead tables so crashes in
slidesorting in main panel if moved slide has tables in it after visiting 
slide
sorter once.

(cherry picked from commit 0b8e2e5efe20519e8b5563314bac0cbb84a3b967)

Conflicts:
svx/source/table/svdotable.cxx

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

diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index bed3988..474d42d 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -268,9 +268,9 @@ void SdrTableObjImpl::init( SdrTableObj* pTable, sal_Int32 
nColumns, sal_Int32 n
 mpTableObj = pTable;
 mxTable = new TableModel( pTable );
 mxTable-init( nColumns, nRows );
-mpLayouter = new TableLayouter( mxTable );
 Reference XModifyListener  xListener( static_cast 
::com::sun::star::util::XModifyListener* (this) );
 mxTable-addModifyListener( xListener );
+mpLayouter = new TableLayouter( mxTable );
 UpdateWritingMode();
 LayoutTable( mpTableObj-aRect, true, true );
 mpTableObj-maLogicRect = mpTableObj-aRect;
@@ -282,6 +282,8 @@ SdrTableObjImpl SdrTableObjImpl::operator=( const 
SdrTableObjImpl rSource )
 {
 if (this != rSource)
 {
+disconnectTableStyle();
+
 if( mpLayouter )
 {
 delete mpLayouter;
@@ -307,6 +309,8 @@ SdrTableObjImpl SdrTableObjImpl::operator=( const 
SdrTableObjImpl rSource )
 ApplyCellStyles();
 mpTableObj-aRect = mpTableObj-maLogicRect;
 LayoutTable( mpTableObj-aRect, false, false );
+
+connectTableStyle();
 }
 return *this;
 }
@@ -453,8 +457,22 @@ bool SdrTableObjImpl::ApplyCellStyles()
 
 void SdrTableObjImpl::dispose()
 {
+disconnectTableStyle();
+mxTableStyle.clear();
+
+if( mpLayouter )
+{
+delete mpLayouter;
+mpLayouter = 0;
+}
+
 if( mxTable.is() )
+{
+Reference XModifyListener  xListener( static_cast 
::com::sun::star::util::XModifyListener* (this) );
+mxTable-removeModifyListener( xListener );
 mxTable-dispose();
+mxTable.clear();
+}
 }
 
 // 
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-12-16 Thread Caolán McNamara
 svx/source/table/accessibletableshape.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit fcd101173cd3436f17a57dbe116f2ed35219a1e5
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Dec 11 11:57:34 2013 +

disposed but not dtored

just die when you are supposed to, without this endless amounts of 
accessiblity
cells remain after sorting slides with tables in them

(cherry picked from commit 1c28065d8fe3e9a1394a7ecfc29e95a9639a1012)

Conflicts:
svx/source/table/accessibletableshape.cxx

Change-Id: Ice9a86b8b806e58f9bf871341a38f7729798dda9
(cherry picked from commit a90e08cb15e712e1d15a16de9a2677e57d81fd13)
Reviewed-on: https://gerrit.libreoffice.org/7052
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/svx/source/table/accessibletableshape.cxx 
b/svx/source/table/accessibletableshape.cxx
index a5e910e..8872591 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -113,6 +113,12 @@ void AccessibleTableShapeImpl::dispose()
 {
 if( mxTable.is() )
 {
+//remove all the cell's acc object in table's dispose.
+for( AccessibleCellMap::iterator iter( maChildMap.begin() ); iter != 
maChildMap.end(); iter++ )
+{
+(*iter).second-dispose();
+}
+maChildMap.clear();
 Reference XModifyListener  xListener( this );
 mxTable-removeModifyListener( xListener );
 mxTable.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-11-18 Thread Armin Le Grand
 svx/source/unodraw/UnoGraphicExporter.cxx |   91 ++
 1 file changed, 69 insertions(+), 22 deletions(-)

New commits:
commit 6e3fb2a5c7ad75fe10e0e1b1a8de0863f3b1ac23
Author: Armin Le Grand a...@apache.org
Date:   Mon Sep 2 12:13:37 2013 +

Resolves: #i122820# Corrected graphics creation...

allow bigger limits if directly requested

(cherry picked from commit 50f1445bda91cb44a1a1e8636ab0bcb6a8c4f381)

Signed-off-by: Andras Timar andras.ti...@collabora.com

Conflicts:
svx/source/unodraw/UnoGraphicExporter.cxx

Change-Id: I33576ef9f95b9f8a9fa0ab6f6d83c93ecec8da9f

diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx 
b/svx/source/unodraw/UnoGraphicExporter.cxx
index fb9e790..5480f24 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -210,6 +210,7 @@ namespace svx
 {
 // use new primitive conversion tooling
 basegfx::B2DRange aRange(basegfx::B2DPoint(0.0, 0.0));
+sal_uInt32 nMaximumQuadraticPixels(50);
 
 if(pSize)
 {
@@ -218,6 +219,10 @@ namespace svx
 const Size 
aSize100th(Application::GetDefaultDevice()-PixelToLogic(*pSize, 
MapMode(MAP_100TH_MM)));
 
 aRange.expand(basegfx::B2DPoint(aSize100th.Width(), 
aSize100th.Height()));
+
+// when explicitely pixels are requested from the 
GraphicExporter, use a *very* high limit
+// of 16gb (4096x4096 pixels), else use the default for the 
converters
+nMaximumQuadraticPixels = std::min(sal_uInt32(4096 * 4096), 
sal_uInt32(pSize-Width() * pSize-Height()));
 }
 else
 {
@@ -227,13 +232,42 @@ namespace svx
 aRange.expand(basegfx::B2DPoint(aSize100th.Width(), 
aSize100th.Height()));
 }
 
-aBmpEx = convertMetafileToBitmapEx(rMtf, aRange);
+aBmpEx = convertMetafileToBitmapEx(rMtf, aRange, 
nMaximumQuadraticPixels);
 }
 else
 {
 const SvtOptionsDrawinglayer aDrawinglayerOpt;
+Size aTargetSize(0, 0);
+
+if(pSize)
+{
+// #i122820# If a concrete target size in pixels is given, use 
it
+aTargetSize = *pSize;
+
+// get hairline and full bound rect to evtl. reduce given 
target pixel size when
+// it is known that it will be expanded to get the right and 
bottom hairlines right
+Rectangle aHairlineRect;
+const Rectangle 
aRect(rMtf.GetBoundRect(*Application::GetDefaultDevice(), aHairlineRect));
+
+if(!aRect.IsEmpty()  !aHairlineRect.IsEmpty())
+{
+if(aRect.Right() == aHairlineRect.Right() || 
aRect.Bottom() == aHairlineRect.Bottom())
+{
+if(aTargetSize.Width())
+{
+aTargetSize.Width() -= 1;
+}
+
+if(aTargetSize.Height())
+{
+aTargetSize.Height() -= 1;
+}
+}
+}
+}
+
 const GraphicConversionParameters aParameters(
-pSize ? *pSize : Size(0, 0),
+aTargetSize,
 true, // allow unlimited size
 aDrawinglayerOpt.IsAntiAliasing(),
 aDrawinglayerOpt.IsSnapHorVerLinesToDiscrete());
@@ -414,26 +448,39 @@ VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* 
pPage, sal_uIntPtr nWid
 }
 
 pVDev-SetMapMode( aMM );
-#ifdef DBG_UTIL
-bool bAbort = !
-#endif
-pVDev-SetOutputSize(aPageSize);
-DBG_ASSERT(!bAbort, virt. Device nicht korrekt erzeugt);
-
-SdrView* pView = new SdrView(mpDoc, pVDev);
-pView-SetPageVisible( sal_False );
-pView-SetBordVisible( sal_False );
-pView-SetGridVisible( sal_False );
-pView-SetHlplVisible( sal_False );
-pView-SetGlueVisible( sal_False );
-pView-ShowSdrPage(pPage);
-Region aRegion (Rectangle( aPoint, aPageSize ) );
-
-ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage );
-
-pView-CompleteRedraw(pVDev, aRegion, aRedirector);
-
-delete pView;
+bool bSuccess(false);
+
+// #i122820# If available, use pixel size directly
+if(nWidthPixel  nHeightPixel)
+{
+bSuccess = pVDev-SetOutputSizePixel(Size(nWidthPixel, nHeightPixel));
+}
+else
+{
+bSuccess = pVDev-SetOutputSize(aPageSize);
+}
+
+if(bSuccess)
+{
+SdrView* pView = new SdrView(mpDoc, pVDev);
+pView-SetPageVisible( sal_False );
+pView-SetBordVisible( sal_False );
+pView-SetGridVisible( sal_False );
+pView-SetHlplVisible( sal_False );
+pView-SetGlueVisible( sal_False );
+

[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-09-18 Thread David Tardon
 svx/source/dialog/frmsel.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit de56b626b036d34ac6b36087c31bf988621c4507
Author: David Tardon dtar...@redhat.com
Date:   Mon May 27 13:18:07 2013 +0200

valgrind: init. member variables

Change-Id: I7e0d99f549841d466d5dfb69cde74b424ae98b0b
(cherry picked from commit 38797f7f4129e1e09be9308a36311cf2f1afef79)
(cherry picked from commit 86128f3b24a830df87db4ed2f7176d84ede7230f)
Reviewed-on: https://gerrit.libreoffice.org/5994
Reviewed-by: Eike Rathke er...@redhat.com
Tested-by: Eike Rathke er...@redhat.com

diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index feb4e04..f29a42a 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -223,6 +223,12 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector 
rFrameSel ) :
 maTLBR( FRAMEBORDER_TLBR ),
 maBLTR( FRAMEBORDER_BLTR ),
 mnFlags( FRAMESEL_OUTER ),
+mnCtrlSize( 0 ),
+mnArrowSize( 0 ),
+mnLine1( 0 ),
+mnLine2( 0 ),
+mnLine3( 0 ),
+mnFocusOffs( 0 ),
 mbHor( false ),
 mbVer( false ),
 mbTLBR( false ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-09-17 Thread Ivan Timofeev
 svx/source/tbxctrls/itemwin.cxx |   38 +-
 1 file changed, 37 insertions(+), 1 deletion(-)

New commits:
commit 03a341775507502dd58598edc3fd805a8518550d
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Sep 17 16:49:14 2013 +0400

fdo#64455 Handle unknown color in color line

Change-Id: Ice4205056cc64ae50bd3c8136aeae6f648adbd0b
Signed-off-by: Ivan Timofeev timofeev@gmail.com

diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index dbc2ede..dd44ac7 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -28,6 +28,9 @@
 
 #include svx/dialogs.hrc
 
+#define TMP_STR_BEGIN   '['
+#define TMP_STR_END ']'
+
 #define DELAY_TIMEOUT   100
 
 #include svx/xlnclit.hxx
@@ -295,7 +298,40 @@ SvxColorBox::~SvxColorBox()
 void SvxColorBox::Update( const XLineColorItem* pItem )
 {
 if ( pItem )
-SelectEntry( pItem-GetColorValue() );
+{
+  // fdo#64455
+::Color aColor = pItem-GetColorValue();
+String aString( pItem-GetName() );
+SelectEntry(aString);
+if( GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ||
+GetSelectEntryColor() != aColor )
+{
+SelectEntry( aColor );
+}
+// Check if the entry is not in the list
+if( GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ||
+GetSelectEntryColor() != aColor )
+{
+sal_uInt16 nCount = GetEntryCount();
+String aTmpStr;
+if( nCount  0 )
+{
+// Last entry gets tested against temporary color
+aTmpStr = GetEntry( nCount - 1 );
+if(  aTmpStr.GetChar(0) == TMP_STR_BEGIN 
+ aTmpStr.GetChar(aTmpStr.Len()-1) == TMP_STR_END )
+{
+RemoveEntry( nCount - 1 );
+}
+}
+aTmpStr = TMP_STR_BEGIN;
+aTmpStr += aString;
+aTmpStr += TMP_STR_END;
+
+sal_uInt16 nPos = InsertEntry( aColor, aTmpStr );
+SelectEntryPos( nPos );
+}
+}
 else
 SetNoSelection();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-09-16 Thread Ivan Timofeev
 svx/source/tbxctrls/tbcontrl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 053e4635d816cb18a6098a58f6d275417a244ac0
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Sep 14 09:16:28 2013 +0400

fdo#68874: Highlighter icon doesn't change color if no text is selected

the problem is that bChoiceFromPalette becomes false too early when 
StateChanged
is called with nSID=SID_ATTR_CHAR_COLOR_BACKGROUND_EXT (we don't handle it 
in the
switch) and the following call with nSID=SID_ATTR_CHAR_COLOR_BACKGROUND 
(which
we actually want to handle) is no-op.

Change-Id: I024f6a443535411648bda44576e838c3d863e7de
(cherry picked from commit 1d0e18703523139e5fd6d11b6f3d72bb0b368036)
Reviewed-on: https://gerrit.libreoffice.org/5942
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index e58ddae..62f2ee2 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2545,7 +2545,7 @@ void SvxColorExtToolBoxControl::StateChanged(
 
 {
 const SvxColorItem* pItem = 0;
-if ( bChoiceFromPalette )
+if ( bChoiceFromPalette  nSID == GetSlotId() )
 {
 bChoiceFromPalette = sal_False;
 switch( nSID )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-08-22 Thread Caolán McNamara
 svx/source/dialog/frmsel.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit d422eeed14f34e8595f795135be847fe5b6c5556
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 22 13:33:53 2013 +0100

Related: fdo#68396 FrameSelectorImpl draws before being initialized

Change-Id: Iae13a7484643117a6f0f40c298c95f6b2a2a4467
(cherry picked from commit ecf12c8286fece4e6f86dccbb37bff6794f0867e)
Reviewed-on: https://gerrit.libreoffice.org/5583
Tested-by: Fridrich Strba fridr...@documentfoundation.org
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index f680f43..feb4e04 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -262,6 +262,8 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector 
rFrameSel ) :
 maVer.SetKeyboardNeighbors(FRAMEBORDER_TLBR, FRAMEBORDER_BLTR,  
FRAMEBORDER_TOP,  FRAMEBORDER_BOTTOM );
 maTLBR.SetKeyboardNeighbors(   FRAMEBORDER_LEFT, FRAMEBORDER_VER,   
FRAMEBORDER_TOP,  FRAMEBORDER_HOR );
 maBLTR.SetKeyboardNeighbors(   FRAMEBORDER_VER,  FRAMEBORDER_RIGHT, 
FRAMEBORDER_HOR,  FRAMEBORDER_BOTTOM );
+
+Initialize(mnFlags);
 }
 
 FrameSelectorImpl::~FrameSelectorImpl()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-08-17 Thread Ivan Timofeev
 svx/source/dialog/charmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f5475f4f85bc6cae51cbd4424dcc7a35cc2ef2dc
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Aug 17 00:33:57 2013 +0400

fdo#68186: prevent integer underflow

since commit eb1ecd8bc2936e28be852722d6cb0c9fb0baeac4 the Basic Latin subset
starts at 0, previously it started at 0x20.

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

diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 23494a8..82239d8 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -650,7 +650,7 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, sal_Bool 
bFocus )
 void SvxShowCharSet::SelectCharacter( sal_UCS4 cNew, sal_Bool bFocus )
 {
 // get next available char of current font
-sal_UCS4 cNext = maFontCharMap.GetNextChar( cNew - 1 );
+sal_UCS4 cNext = maFontCharMap.GetNextChar( (cNew  0) ? cNew - 1 : cNew );
 
 int nMapIndex = maFontCharMap.GetIndexFromChar( cNext );
 SelectIndex( nMapIndex, bFocus );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-08-13 Thread Caolán McNamara
 svx/source/dialog/simptabl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 622c7e764241300e678a6f92ac862df08a61
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Aug 12 11:00:50 2013 +0100

Resolves: fdo#67944 set dialogcontrol bit to tab into simpletable

(cherry picked from commit ae035a32737a77be75c9d017f7f5a90a05048e06)

Conflicts:
svtools/source/contnr/simptabl.cxx

Change-Id: I1ea653d5546961096a9368b4d1d9a1dd39a80745
Reviewed-on: https://gerrit.libreoffice.org/5366
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svx/source/dialog/simptabl.cxx b/svx/source/dialog/simptabl.cxx
index 46f308d..ec54618 100644
--- a/svx/source/dialog/simptabl.cxx
+++ b/svx/source/dialog/simptabl.cxx
@@ -44,7 +44,7 @@ SvxSimpleTableContainer::SvxSimpleTableContainer(Window* 
pParent, WinBits nBits)
 extern C SAL_DLLPUBLIC_EXPORT Window* SAL_CALL 
makeSvxSimpleTableContainer(Window *pParent,
 VclBuilder::stringmap )
 {
-return new SvxSimpleTableContainer(pParent);
+return new SvxSimpleTableContainer(pParent, WB_TABSTOP | WB_DIALOGCONTROL 
| WB_BORDER);
 }
 
 void SvxSimpleTableContainer::SetTable(SvxSimpleTable* pTable)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-08-10 Thread Caolán McNamara
 svx/source/items/algitem.cxx |8 
 svx/source/xoutdev/xattr.cxx |6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit a4a938f1ac9eea09e2fc7dd53d5c7e2d7ad1ddc2
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Aug 9 15:14:26 2013 +0100

metric strings loaded from wrong .src

Change-Id: I5261a699a44bc7eb6ecca1842f2390a0778d7b09
(cherry picked from commit e3cf54875031b8740b3ed76d6f530c44d2d8c44e)
Reviewed-on: https://gerrit.libreoffice.org/5335
Reviewed-by: Norbert Thiebaud nthieb...@gmail.com
Tested-by: Norbert Thiebaud nthieb...@gmail.com

diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index e0b0aa0..1451fdb 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -266,19 +266,19 @@ SfxItemPresentation SvxMarginItem::GetPresentation
 {
 rText = SVX_RESSTR(RID_SVXITEMS_MARGIN_LEFT) +
 GetMetricText( (long)nLeftMargin, eCoreUnit, 
ePresUnit, pIntl ) +
-SVX_RESSTR(GetMetricId(ePresUnit)) +
+EE_RESSTR(GetMetricId(ePresUnit)) +
 cpDelimTmp +
 SVX_RESSTR(RID_SVXITEMS_MARGIN_TOP) +
 GetMetricText( (long)nTopMargin, eCoreUnit, ePresUnit, 
pIntl ) +
-SVX_RESSTR(GetMetricId(ePresUnit)) +
+EE_RESSTR(GetMetricId(ePresUnit)) +
 cpDelimTmp +
 SVX_RESSTR(RID_SVXITEMS_MARGIN_RIGHT) +
 GetMetricText( (long)nRightMargin, eCoreUnit, 
ePresUnit, pIntl ) +
-SVX_RESSTR(GetMetricId(ePresUnit)) +
+EE_RESSTR(GetMetricId(ePresUnit)) +
 cpDelimTmp +
 SVX_RESSTR(RID_SVXITEMS_MARGIN_BOTTOM) +
 GetMetricText( (long)nBottomMargin, eCoreUnit, 
ePresUnit, pIntl ) +
-SVX_RESSTR(GetMetricId(ePresUnit));
+EE_RESSTR(GetMetricId(ePresUnit));
 return SFX_ITEM_PRESENTATION_COMPLETE;
 }
 default: ; //prevent warning
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 540941f..b687590 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -1317,7 +1317,7 @@ SfxItemPresentation XLineWidthItem::GetPresentation
 case SFX_ITEM_PRESENTATION_COMPLETE:
 rText = GetMetricText( (long) GetValue(),
 eCoreUnit, ePresUnit, pIntl) +
-SVX_RESSTR( GetMetricId( ePresUnit) );
+EE_RESSTR( GetMetricId( ePresUnit) );
 return ePres;
 default:
 return SFX_ITEM_PRESENTATION_NONE;
@@ -2462,7 +2462,7 @@ SfxItemPresentation XLineStartWidthItem::GetPresentation
 case SFX_ITEM_PRESENTATION_COMPLETE:
 rText = GetMetricText( (long) GetValue(),
 eCoreUnit, ePresUnit, pIntl) +
-SVX_RESSTR( GetMetricId( ePresUnit) );
+EE_RESSTR( GetMetricId( ePresUnit) );
 return ePres;
 default:
 return SFX_ITEM_PRESENTATION_NONE;
@@ -2553,7 +2553,7 @@ SfxItemPresentation XLineEndWidthItem::GetPresentation
 case SFX_ITEM_PRESENTATION_COMPLETE:
 rText = GetMetricText( (long) GetValue(),
 eCoreUnit, ePresUnit, pIntl) +
-SVX_RESSTR( GetMetricId( ePresUnit) );
+EE_RESSTR( GetMetricId( ePresUnit) );
 return ePres;
 default:
 return SFX_ITEM_PRESENTATION_NONE;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-08-08 Thread Ivan Timofeev
 svx/source/svdraw/svdotext.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3d1576aa02dd638c252e5993e52c7de7833f9e10
Author: Ivan Timofeev timofeev@gmail.com
Date:   Thu Aug 8 18:44:57 2013 +0400

fdo#67871: Revert coverity#705731 Resource leak

... and delete pContourPolyPolygon instead. Otherwise there is a null 
pointer
dereference.

This reverts commit e3258713793f03d6cf96c19ff4c5d15a0cd666f1.

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

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 387a561..4c331c6 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -601,6 +601,7 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner 
rOutliner, Rectangle rAncho
 {
 // Take line width into account.
 // When doing the hit test, avoid this. (Performance!)
+pContourPolyPolygon = new basegfx::B2DPolyPolygon();
 
 // test if shadow needs to be avoided for TakeContour()
 const SfxItemSet rSet = GetObjectItemSet();
@@ -636,6 +637,7 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner 
rOutliner, Rectangle rAncho
 }
 
 rOutliner.SetPolygon(aXorPolyPolygon, pContourPolyPolygon);
+delete pContourPolyPolygon;
 }
 
 void SdrTextObj::TakeUnrotatedSnapRect(Rectangle rRect) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-07-30 Thread Lionel Elie Mamane
 svx/source/fmcomp/gridctrl.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 1e1d5847102cc23f33649118637e1723155e4b1a
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jul 30 09:23:52 2013 +0200

fdo#55955 select first column if possible

Change-Id: I131cb0395c481d9cc1de210abc207221dab14bf4
Reviewed-on: https://gerrit.libreoffice.org/5178
Reviewed-by: Petr Mladek pmla...@suse.cz
Tested-by: Petr Mladek pmla...@suse.cz

diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 83358a7..f3d875c 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -1604,6 +1604,12 @@ void DbGridControl::setDataSource(const Reference 
XRowSet  _xCursor, sal_uInt
 if (nCurPos == BROWSER_INVALIDID || nCurPos = ColCount())
 nCurPos = 0;
 
+// Column zero is a valid choice and guaranteed to exist,
+// but invisible to the user; if we have at least one
+// user-visible column, go to that one.
+if (nCurPos == 0  ColCount()  1)
+nCurPos = 1;
+
 // there are rows so go to the selected current column
 if (nRecordCount)
 GoToRowColumnId(0, GetColumnId(nCurPos));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-07-26 Thread Caolán McNamara
 svx/source/sidebar/tools/Popup.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 70f9d122ecfc24aed528881c9ec734f9d3bcbfb3
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Jul 26 14:52:49 2013 +0100

Resolves: fdo#67344 wrong relative menu position

Change-Id: I4a0cc610cc3c6a9c4164a69d40a9b0230aa702a4
(cherry picked from commit b11d022aeba5f981a9a3e4d8322ca5797f16944a)
Reviewed-on: https://gerrit.libreoffice.org/5123
Reviewed-by: Luboš Luňák l.lu...@suse.cz
Tested-by: Luboš Luňák l.lu...@suse.cz

diff --git a/svx/source/sidebar/tools/Popup.cxx 
b/svx/source/sidebar/tools/Popup.cxx
index 8678eb6..36efa1b 100644
--- a/svx/source/sidebar/tools/Popup.cxx
+++ b/svx/source/sidebar/tools/Popup.cxx
@@ -67,7 +67,7 @@ void Popup::Show (ToolBox rToolBox)
 {
 mpContainer-SetSizePixel(mpControl-GetOutputSizePixel());
 
-const Point aPos 
(mpParent-OutputToScreenPixel(rToolBox.GetPosPixel()));
+const Point aPos 
(rToolBox.GetParent()-OutputToScreenPixel(rToolBox.GetPosPixel()));
 const Size aSize (rToolBox.GetSizePixel());
 const Rectangle aRect (aPos, aSize);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-07-15 Thread David Tardon
 svx/source/unodraw/unoshape.cxx |   12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit a5bfa0a75ddae5f5d824d439e99dff6d4329e965
Author: David Tardon dtar...@redhat.com
Date:   Mon Jul 15 12:23:40 2013 +0200

fdo#57631 fix collection of property states

Change-Id: I607518da26c9430916d922b8e36143cc6dd76f25
(cherry picked from commit d3d95afe5856ef06659d61c3572c7682e5a03766)
Signed-off-by: David Tardon dtar...@redhat.com
Reviewed-on: https://gerrit.libreoffice.org/4910
Reviewed-by: Petr Mladek pmla...@suse.cz
Tested-by: Petr Mladek pmla...@suse.cz

diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 5aee667..57270ea 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -3030,16 +3030,8 @@ uno::Sequence beans::PropertyState  SAL_CALL 
SvxShape::getPropertyStates( cons
 uno::Sequence beans::PropertyState  aRet( nCount );
 beans::PropertyState* pState = aRet.getArray();
 
-if( mpImpl-mpMaster )
-{
-for( sal_Int32 nIdx = 0; nIdx  nCount; nIdx++ )
-pState[nIdx] = mpImpl-mpMaster-getPropertyState( pNames[nIdx] );
-}
-else
-{
-for( sal_Int32 nIdx = 0; nIdx  nCount; nIdx++ )
-pState[nIdx] = _getPropertyState( pNames[nIdx] );
-}
+for( sal_Int32 nIdx = 0; nIdx  nCount; nIdx++ )
+pState[nIdx] = getPropertyState( pNames[nIdx] );
 
 return aRet;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-06-28 Thread Noel Power
 svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e497a5620f3865cfcb07446692a6f1e12ff14370
Author: Noel Power noel.po...@suse.com
Date:   Tue Jun 25 14:40:45 2013 +0100

fix text position for custom shapes with zoom != 100% fdo#59862

custom shapes that had text suffered from strange display at zoom
levels != 100%, this was because there was a bug in the code to
correct the textposition

Change-Id: I8d1817cc6be91b3e6379200eb21eb2966d3c2aa9
(cherry picked from commit 443c13e92c6f900a41e6e383684623ead3e088f5)
Reviewed-on: https://gerrit.libreoffice.org/4514
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx 
b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 654ed86..7aa29cb 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -46,9 +46,11 @@ namespace sdr
 
 basegfx::B2DRange 
ViewContactOfSdrObjCustomShape::getCorrectedTextBoundRect() const
 {
-const Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
+Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
+aObjectBound += GetCustomShapeObj().GetGridOffset();
 Rectangle aTextBound(aObjectBound);
 GetCustomShapeObj().GetTextBounds(aTextBound);
+aTextBound += GetCustomShapeObj().GetGridOffset();
 basegfx::B2DRange aTextRange(aTextBound.Left(), aTextBound.Top(), 
aTextBound.Right(), aTextBound.Bottom());
 const basegfx::B2DRange aObjectRange(aObjectBound.Left(), 
aObjectBound.Top(), aObjectBound.Right(), aObjectBound.Bottom());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-06-27 Thread David Tardon
 svx/source/svdraw/svdundo.cxx |   26 ++
 1 file changed, 22 insertions(+), 4 deletions(-)

New commits:
commit 279e329c2d52940c759f40eb59b5f931c4e68b7c
Author: David Tardon dtar...@redhat.com
Date:   Thu Jun 27 12:07:59 2013 +0200

fdo#47646 fix undo of ungrouping

(cherry picked from commit 66480d15a04204b0f60008b9cd8e25a66ca6db6a)

Change-Id: If20e645d8d708ebe17e2d9455c896c94592993bb
Signed-off-by: David Tardon dtar...@redhat.com
Reviewed-on: https://gerrit.libreoffice.org/4573
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index d5ca5e2..e211122 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -715,11 +715,29 @@ void 
SdrUndoObjList::ObjListListener::Notify(SfxBroadcaster, const SfxHint rHi
 const SdrHint* const pSdrHint(dynamic_castconst SdrHint*(rHint));
 if (pSdrHint)
 {
-if ((pSdrHint-GetObject() == m_rObject)  (pSdrHint-GetKind() == 
HINT_OBJCHG))
+if (pSdrHint-GetObject() == m_rObject)
 {
-const sal_uInt32 nNewOrdNum(m_rObject.GetOrdNum());
-if (nNewOrdNum != m_rThat.GetOrdNum())
-m_rThat.SetOrdNum(nNewOrdNum);
+switch (pSdrHint-GetKind())
+{
+case HINT_OBJCHG :
+if (IsListening(*m_pBroadcaster))
+{
+const sal_uInt32 nNewOrdNum(m_rObject.GetOrdNum());
+if (nNewOrdNum != m_rThat.GetOrdNum())
+m_rThat.SetOrdNum(nNewOrdNum);
+}
+break;
+case HINT_OBJREMOVED :
+SAL_WARN_IF(!IsListening(*m_pBroadcaster), svx.sdr, 
Object is not in any list);
+EndListening(*m_pBroadcaster);
+break;
+case HINT_OBJINSERTED :
+SAL_WARN_IF(IsListening(*m_pBroadcaster), svx.sdr, 
Object is already in a list);
+StartListening(*m_pBroadcaster);
+break;
+default :
+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-1' - svx/source

2013-06-25 Thread Michael Stahl
 svx/source/sdr/overlay/overlaymanagerbuffered.cxx |   21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit d7e10cc71cd40ad84294f992f5d7e3c7c915e305
Author: Michael Stahl mst...@redhat.com
Date:   Mon Jun 24 19:05:45 2013 +0200

fdo#60444: Revert fdo#58029 - substantially accelerate re-rendering...

This reverts commit 6c98ad71478cb72b51634b32d6e553ccaec30190.

This breaks selection of transparent form controls (fdo#60444), because
the Update method is not called on the children.

Change-Id: Id0b6a34a15aa1ed7bd5aa0d7b5626e60bee57e30
(cherry picked from commit f022f39638fbe970f1b839c757dcccd3baa69445)
Reviewed-on: https://gerrit.libreoffice.org/4487
Reviewed-by: Thorsten Behrens tbehr...@suse.com
Tested-by: Thorsten Behrens tbehr...@suse.com

diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx 
b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 81b53b2..133accc 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -348,15 +348,28 @@ namespace sdr
 if(bTargetIsWindow)
 {
 Window rWindow = static_cast Window (rmOutputDevice);
-if(rWindow.IsChildTransparentModeEnabled())
+
+if(rWindow.IsChildTransparentModeEnabled()  
rWindow.GetChildCount())
 {
-// Get VCL to invalidate it's children - more 
efficiently. fdo#58029
 const Rectangle aRegionRectanglePixel(
 maBufferRememberedRangePixel.getMinX(), 
maBufferRememberedRangePixel.getMinY(),
 maBufferRememberedRangePixel.getMaxX(), 
maBufferRememberedRangePixel.getMaxY());
 
-rWindow.Invalidate(aRegionRectanglePixel,
-   
INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN|INVALIDATE_UPDATE);
+for(sal_uInt16 a(0); a  rWindow.GetChildCount(); a++)
+{
+Window* pCandidate = rWindow.GetChild(a);
+
+if(pCandidate  pCandidate-IsPaintTransparent())
+{
+const Rectangle 
aCandidatePosSizePixel(pCandidate-GetPosPixel(), pCandidate-GetSizePixel());
+
+
if(aCandidatePosSizePixel.IsOver(aRegionRectanglePixel))
+{
+
pCandidate-Invalidate(INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN);
+pCandidate-Update();
+}
+}
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-06-24 Thread Michael Stahl
 svx/source/fmcomp/fmgridcl.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 748a011c3c1bdcc7b2f45ed64342c3e299ca61a9
Author: Michael Stahl mst...@redhat.com
Date:   Thu Jun 20 15:02:37 2013 +0200

FmGridControl:  handle non-existing properties

Fix crash with unhandled exception requesting Description.

Change-Id: I6b6cb61273fb042532ab63620729f4129239fe81
(cherry picked from commit 32e2c6456fb3bf3bf75f9b11c90193c537b4ef26)
Reviewed-on: https://gerrit.libreoffice.org/4397
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index a864db3..374af64 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1908,7 +1908,14 @@ namespace
 ReferenceXPropertySet xProp;
 xIndex-getByIndex( _nPosition ) = xProp;
 if ( xProp.is() )
-xProp-getPropertyValue( _sPropName ) = sRetText;
+{
+try {
+xProp-getPropertyValue( _sPropName ) = sRetText;
+} catch (UnknownPropertyException const e) {
+SAL_WARN(svx.form,
+exception caught:   e.Message);
+}
+}
 }
 }
 return sRetText;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-06-21 Thread fourier
 svx/source/svdraw/svdotext.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit aaa8271292afd913b9aef20f444ef261928943df
Author: Neil Voss (fourier) vossma...@yahoo.com
Date:   Fri May 24 08:19:03 2013 -0500

fdo#42134 FORMATTING: Autofit does not work properly on long texts

Change-Id: I18e314913122ffbc15659ced9d1b746d10ccc17c
(cherry picked from commit bddf3bba1fa13b57a69f2bd5f7c7f96bb945066d)

Signed-off-by: Thorsten Behrens tbehr...@suse.com

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index efb5227..387a561 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1284,6 +1284,12 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner rOutliner, 
const Size rTextSize,
 fFactor = double(rTextSize.Width())/aCurrTextSize.Width();
 else
 fFactor = double(rTextSize.Height())/aCurrTextSize.Height();
+// fFactor scales in both x and y directions
+// - this is fine for bulleted words
+// - but it scales too much for a long paragraph
+// - taking sqrt scales long paragraphs the best
+// - bulleted words will have to go through more iterations
+fFactor = std::sqrt(fFactor);
 
 sal_uInt16 nCurrStretchX, nCurrStretchY;
 rOutliner.GetGlobalCharStretching(nCurrStretchX, nCurrStretchY);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source sw/source

2013-06-19 Thread Armin Le Grand
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |   57 ++--
 sw/source/core/draw/dcontact.cxx|   20 +--
 2 files changed, 48 insertions(+), 29 deletions(-)

New commits:
commit bc69be88fa43901504126740bc8810f4e31e17a5
Author: Armin Le Grand a...@apache.org
Date:   Tue Jun 18 13:10:42 2013 +

Resolves: #i121917# Corrected access to text object

(cherry picked from commit 2c9c9923fdf042c41cebaf9a15def7caac86032d)

Conflicts:
sw/source/core/draw/dcontact.cxx

Change-Id: Ia214127ca540c4f4036a0006e7c227649fb39134
(cherry picked from commit 6c5c5584eb1adb64fee3aaf76196115ba3812e2c)

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 5854e36..20879f1 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -150,6 +150,34 @@ void PosSizePropertyPanel::ShowMenu (void)
 
 
 
+namespace
+{
+bool hasText(const SdrView rSdrView)
+{
+const SdrMarkList rMarkList = rSdrView.GetMarkedObjectList();
+
+if(1 == rMarkList.GetMarkCount())
+{
+const SdrObject* pObj = rMarkList.GetMark(0)-GetMarkedSdrObj();
+const SdrObjKind eKind((SdrObjKind)pObj-GetObjIdentifier());
+
+if((pObj-GetObjInventor() == SdrInventor)  (OBJ_TEXT == eKind 
|| OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind))
+{
+const SdrTextObj* pSdrTextObj = dynamic_cast const 
SdrTextObj* (pObj);
+
+if(pSdrTextObj  pSdrTextObj-HasText())
+{
+return true;
+}
+}
+}
+
+return false;
+}
+} // end of anonymous namespace
+
+
+
 void PosSizePropertyPanel::Initialize()
 {
 mpFtPosX-SetBackground(Wallpaper());
@@ -222,18 +250,7 @@ void PosSizePropertyPanel::Initialize()
 if ( mpView != NULL )
 {
 maUIScale = mpView-GetModel()-GetUIScale();
-
-const SdrMarkList rMarkList = mpView-GetMarkedObjectList();
-if(1 == rMarkList.GetMarkCount())
-{
-const SdrObject* pObj = rMarkList.GetMark(0)-GetMarkedSdrObj();
-const SdrObjKind eKind((SdrObjKind)pObj-GetObjIdentifier());
-
-if((pObj-GetObjInventor() == SdrInventor)  (OBJ_TEXT == eKind 
|| OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind)  
((SdrTextObj*)pObj)-HasText())
-{
-mbAdjustEnabled = true;
-}
-}
+mbAdjustEnabled = hasText(*mpView);
 }
 
 mePoolUnit = maTransfWidthControl.GetCoreMetric();
@@ -701,20 +718,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
 if ( mpView == NULL )
 return;
 
-const SdrMarkList rMarkList = mpView-GetMarkedObjectList();
-
-if(1 == rMarkList.GetMarkCount())
-{
-const SdrObject* pObj = rMarkList.GetMark(0)-GetMarkedSdrObj();
-const SdrObjKind eKind((SdrObjKind)pObj-GetObjIdentifier());
-
-if((pObj-GetObjInventor() == SdrInventor)  (OBJ_TEXT == eKind || 
OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind)  
((SdrTextObj*)pObj)-HasText())
-mbAdjustEnabled = true;
-else
-mbAdjustEnabled = false;
-}
-else
-mbAdjustEnabled = false;
+mbAdjustEnabled = hasText(*mpView);
 
 // Pool unit and dialog unit may have changed, make sure that we
 // have the current values.
@@ -938,6 +942,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
 }
 
 const sal_Int32 nCombinedContext(maContext.GetCombinedContext_DI());
+const SdrMarkList rMarkList = mpView-GetMarkedObjectList();
 
 switch (rMarkList.GetMarkCount())
 {
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index cc6f1a5..6026513 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2332,8 +2332,16 @@ basegfx::B2DPolyPolygon SwDrawVirtObj::TakeContour() 
const
 SdrHdl* SwDrawVirtObj::GetHdl(sal_uInt32 nHdlNum) const
 {
 SdrHdl* pHdl = rRefObj.GetHdl(nHdlNum);
-Point aP(pHdl-GetPos() + GetOffset());
-pHdl-SetPos(aP);
+
+if(pHdl)
+{
+Point aP(pHdl-GetPos() + GetOffset());
+pHdl-SetPos(aP);
+}
+else
+{
+OSL_ENSURE(false, Got no SdrHdl(!));
+}
 
 return pHdl;
 }
@@ -2342,8 +2350,14 @@ SdrHdl* SwDrawVirtObj::GetPlusHdl(const SdrHdl rHdl, 
sal_uInt16 nPlNum) const
 {
 SdrHdl* pHdl = rRefObj.GetPlusHdl(rHdl, nPlNum);
 
-if (pHdl)
+if(pHdl)
+{
 pHdl-SetPos(pHdl-GetPos() + GetOffset());
+}
+else
+{
+OSL_ENSURE(false, Got no SdrHdl(!));
+}
 
 return pHdl;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-06-19 Thread David Tardon
 svx/source/svdraw/svdedtv1.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a2aa293069220dc75b3d835f691f378bc193ed17
Author: David Tardon dtar...@redhat.com
Date:   Wed Jun 19 14:23:44 2013 +0200

fdo#65870 fix changing shape height via dialog

(cherry picked from commit 8c1d1b66904cdd95e8eec746a81cf1c57ad0e85a)

Change-Id: I7c61be2c3d368dfd3ea66427c77636f797a7e88a
Signed-off-by: David Tardon dtar...@redhat.com
Reviewed-on: https://gerrit.libreoffice.org/4362
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 196779b..85ea67d 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1522,6 +1522,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet 
rAttr)
 if 
(SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,sal_True,pPoolItem))
 {
 nSizY=((const SfxUInt32Item*)pPoolItem)-GetValue();
 bChgSiz=true;
+bChgHgt=true;
 }
 if (bChgSiz) {
 eSizePoint=(RECT_POINT)((const 
SfxAllEnumItem)rAttr.Get(SID_ATTR_TRANSFORM_SIZE_POINT)).GetValue();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-06-13 Thread David Tardon
 svx/source/table/tablecontroller.cxx |   42 +++
 1 file changed, 42 insertions(+)

New commits:
commit 36ecf35102c619b4747fc7ae9af49d4ad052ad8a
Author: David Tardon dtar...@redhat.com
Date:   Thu Jun 13 14:47:50 2013 +0200

fdo#62224 set spacing to content too

Change-Id: Idafcd96ff8b01139dfc22cf3d0d2f5e98759488e
(cherry picked from commit 14c139e3705c537556f493657f9cb01818d1f80d)

Signed-off-by: David Tardon dtar...@redhat.com

diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index b91ea92..937489e 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2596,11 +2596,14 @@ struct LinesState
 LinesState(SvxBoxItem rBoxItem_, SvxBoxInfoItem rBoxInfoItem_)
 : rBoxItem(rBoxItem_)
 , rBoxInfoItem(rBoxInfoItem_)
+, bDistanceIndeterminate(false)
 {
 std::fill_n(aBorderSet, 4, false);
 std::fill_n(aInnerLineSet, 2, false);
 std::fill_n(aBorderIndeterminate, 4, false);
 std::fill_n(aInnerLineIndeterminate, 2, false);
+std::fill_n(aDistanceSet, 4, false);
+std::fill_n(aDistance, 4, 0);
 }
 
 SvxBoxItem rBoxItem;
@@ -2609,6 +2612,9 @@ struct LinesState
 bool aInnerLineSet[2];
 bool aBorderIndeterminate[4];
 bool aInnerLineIndeterminate[2];
+bool aDistanceSet[4];
+sal_uInt16 aDistance[4];
+bool bDistanceIndeterminate;
 };
 
 class BoxItemWrapper
@@ -2694,6 +2700,21 @@ void lcl_MergeBorderOrInnerLine(
 }
 }
 
+void lcl_MergeDistance(
+LinesState rLinesState, const sal_uInt16 nIndex, const sal_uInt16 
nDistance)
+{
+if (rLinesState.aDistanceSet[nIndex])
+{
+if (!rLinesState.bDistanceIndeterminate)
+rLinesState.bDistanceIndeterminate = nDistance != 
rLinesState.aDistance[nIndex];
+}
+else
+{
+rLinesState.aDistance[nIndex] = nDistance;
+rLinesState.aDistanceSet[nIndex] = true;
+}
+}
+
 void lcl_MergeCommonBorderAttr(LinesState rLinesState, const SvxBoxItem 
rCellBoxItem, const sal_Int32 nCellFlags)
 {
 if( (nCellFlags  (CELL_BEFORE|CELL_AFTER|CELL_UPPER|CELL_LOWER)) != 0 )
@@ -2714,6 +2735,9 @@ void lcl_MergeCommonBorderAttr(LinesState rLinesState, 
const SvxBoxItem rCellB
 else if( nCellFlags  CELL_AFTER )
 lcl_MergeBorderLine(rLinesState, rCellBoxItem.GetLeft(), 
BOX_LINE_RIGHT, VALID_RIGHT);
 }
+
+// NOTE: inner distances for cells outside the selected range
+// are not relevant - we ignore them.
 }
 else
 {
@@ -2723,6 +2747,11 @@ void lcl_MergeCommonBorderAttr(LinesState rLinesState, 
const SvxBoxItem rCellB
 lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetBottom(), 
BOX_LINE_BOTTOM, VALID_BOTTOM, nCellFlags  CELL_BOTTOM);
 lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetLeft(), 
BOX_LINE_LEFT, VALID_LEFT, nCellFlags  CELL_LEFT);
 lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetRight(), 
BOX_LINE_RIGHT, VALID_RIGHT, nCellFlags  CELL_RIGHT);
+
+lcl_MergeDistance(rLinesState, BOX_LINE_TOP, 
rCellBoxItem.GetDistance(BOX_LINE_TOP));
+lcl_MergeDistance(rLinesState, BOX_LINE_BOTTOM, 
rCellBoxItem.GetDistance(BOX_LINE_BOTTOM));
+lcl_MergeDistance(rLinesState, BOX_LINE_LEFT, 
rCellBoxItem.GetDistance(BOX_LINE_LEFT));
+lcl_MergeDistance(rLinesState, BOX_LINE_RIGHT, 
rCellBoxItem.GetDistance(BOX_LINE_RIGHT));
 }
 }
 
@@ -2795,6 +2824,19 @@ void 
SvxTableController::FillCommonBorderAttrFromSelectedCells( SvxBoxItem rBox
 aLinesState.rBoxInfoItem.SetValid(VALID_HORI);
 if (!aLinesState.aInnerLineIndeterminate[BOXINFO_LINE_VERT])
 aLinesState.rBoxInfoItem.SetValid(VALID_VERT);
+
+if (!aLinesState.bDistanceIndeterminate)
+{
+if (aLinesState.aDistanceSet[BOX_LINE_TOP])
+
aLinesState.rBoxItem.SetDistance(aLinesState.aDistance[BOX_LINE_TOP], 
BOX_LINE_TOP);
+if (aLinesState.aDistanceSet[BOX_LINE_BOTTOM])
+
aLinesState.rBoxItem.SetDistance(aLinesState.aDistance[BOX_LINE_BOTTOM], 
BOX_LINE_BOTTOM);
+if (aLinesState.aDistanceSet[BOX_LINE_LEFT])
+
aLinesState.rBoxItem.SetDistance(aLinesState.aDistance[BOX_LINE_LEFT], 
BOX_LINE_LEFT);
+if (aLinesState.aDistanceSet[BOX_LINE_RIGHT])
+
aLinesState.rBoxItem.SetDistance(aLinesState.aDistance[BOX_LINE_RIGHT], 
BOX_LINE_RIGHT);
+aLinesState.rBoxInfoItem.SetValid(VALID_DISTANCE);
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-06-10 Thread Caolán McNamara
 svx/source/sidebar/PanelLayout.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 78beb05263129a1acd0fde6c03d828d813fd4a94
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jun 10 14:05:28 2013 +0100

Resolves: fdo#65546 set Panel Layouts as DialogControl widgets

Change-Id: Iaf0e1dccf1af3bcec1057e42934d2931ccebfd32
(cherry picked from commit a4c07d983ab5562c914dad0d06cb24c61a7f3b41)

diff --git a/svx/source/sidebar/PanelLayout.cxx 
b/svx/source/sidebar/PanelLayout.cxx
index 568f151..2c5a5bb 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -13,6 +13,7 @@
 PanelLayout::PanelLayout(Window* pParent, const OString rID, const OUString 
rUIXMLDescription, const 
com::sun::star::uno::Referencecom::sun::star::frame::XFrame rFrame)
 : Control(pParent)
 {
+SetStyle(GetStyle() | WB_DIALOGCONTROL);
 m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, 
rID, rFrame);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-06-10 Thread Armin Le Grand
 svx/source/sidebar/area/AreaPropertyPanel.cxx |7 +++
 svx/source/sidebar/line/LinePropertyPanel.cxx |7 +++
 2 files changed, 14 insertions(+)

New commits:
commit 6de6c7a38728167dc2eed1a4b4f5deeccc3fef91
Author: Armin Le Grand a...@apache.org
Date:   Mon Jun 10 10:39:36 2013 +

Resolves: #i122493# Corrected Enable/Disable for some DropDowns/Texts...

in Line/AreaPropertyPanel

(cherry picked from commit 2890568e3ac8e140d12f05d8ac74f3be50ffa45d)

Change-Id: I6436b165a873e6f79af29690170231af939f
(cherry picked from commit d1a0b4f01b9c3a54dfcbee65e13d6dd4d1a78dfe)

diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx 
b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 6340978..df87602 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -656,6 +656,7 @@ void AreaPropertyPanel::ImpUpdateTransparencies()
 else if(nValue = 100)
 {
 mpLBTransType-Enable();
+mpTrspTextFT-Enable();
 mpLBTransType-SelectEntryPos(1);
 mpBTNGradient-Hide();
 mpMTRTransparent-Show();
@@ -678,6 +679,7 @@ void AreaPropertyPanel::ImpUpdateTransparencies()
 Image* pImage = 0;
 
 mpLBTransType-Enable();
+mpTrspTextFT-Enable();
 mpMTRTransparent-Hide();
 mpBTNGradient-Enable();
 mpBTNGradient-Show();
@@ -735,6 +737,7 @@ void AreaPropertyPanel::ImpUpdateTransparencies()
 if(bZeroValue)
 {
 mpLBTransType-Enable();
+mpTrspTextFT-Enable();
 mpLBTransType-SelectEntryPos(0);
 mpBTNGradient-Hide();
 mpMTRTransparent-Enable();
@@ -746,6 +749,8 @@ void AreaPropertyPanel::ImpUpdateTransparencies()
 {
 // no transparency at all
 mpLBTransType-SetNoSelection();
+mpLBTransType-Disable();
+mpTrspTextFT-Disable();
 mpMTRTransparent-Disable();
 mpMTRTransparent-Show();
 mpBTNGradient-Disable();
@@ -828,6 +833,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
 if(bDisabled)
 {
 mpLbFillType-Disable();
+mpColorTextFT-Disable();
 mpLbFillType-SetNoSelection();
 mpLbFillAttr-Show();
 mpLbFillAttr-Disable();
@@ -845,6 +851,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
 {
 mpStyleItem.reset(dynamic_cast XFillStyleItem* 
(pItem-Clone()));
 mpLbFillType-Enable();
+mpColorTextFT-Enable();
 XFillStyle eXFS = (XFillStyle)mpStyleItem-GetValue();
 meLastXFS = eXFS;
 mpLbFillType-SelectEntryPos(sal::static_int_cast 
sal_uInt16 (eXFS));
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx 
b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 915d48b..1302205 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -577,10 +577,12 @@ void LinePropertyPanel::NotifyItemUpdate(
 if(bDisabled)
 {
 mpLBEdgeStyle-Disable();
+mpFTEdgeStyle-Disable();
 }
 else
 {
 mpLBEdgeStyle-Enable();
+mpFTEdgeStyle-Enable();
 }
 
 if(eState = SFX_ITEM_DEFAULT)
@@ -635,10 +637,12 @@ void LinePropertyPanel::NotifyItemUpdate(
 if(bDisabled)
 {
 mpLBCapStyle-Disable();
+mpFTCapStyle-Disable();
 }
 else
 {
 mpLBCapStyle-Enable();
+mpLBCapStyle-Enable();
 }
 
 if(eState = SFX_ITEM_DEFAULT)
@@ -1052,6 +1056,7 @@ void LinePropertyPanel::SelectLineStyle()
 if( !mpStyleItem.get() || !mpDashItem.get() )
 {
 mpLBStyle-SetNoSelection();
+mpLBStyle-Disable();
 return;
 }
 
@@ -1097,6 +1102,7 @@ void LinePropertyPanel::SelectEndStyle(bool bStart)
 if( !mpStartItem.get() )
 {
 mpLBStart-SetNoSelection();
+mpLBStart-Disable();
 return;
 }
 
@@ -1125,6 +1131,7 @@ void LinePropertyPanel::SelectEndStyle(bool bStart)
 if( !mpEndItem.get() )
 {
 mpLBEnd-SetNoSelection();
+mpLBEnd-Disable();
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-06-03 Thread Tomaž Vajngerl
 svx/source/dialog/dialcontrol.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9dc3b996fabb57469258db9fac7340b2295d00ae
Author: Tomaž Vajngerl qui...@gmail.com
Date:   Tue Jun 4 00:56:55 2013 +0200

fix ambiguous call error

Change-Id: Ib6c95e87d8b8e6dd8bfd1e5a7579067383586e67

diff --git a/svx/source/dialog/dialcontrol.cxx 
b/svx/source/dialog/dialcontrol.cxx
index 4b26222..33cc0de 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -390,7 +390,7 @@ void DialControl::SetRotation( sal_Int32 nAngle )
 
 void DialControl::SetLinkedField( NumericField* pField, sal_Int32 
nDecimalPlaces )
 {
-mpImpl-mnLinkedFieldValueMultiplyer = 100 / pow(10, nDecimalPlaces);
+mpImpl-mnLinkedFieldValueMultiplyer = static_castsal_Int32 (100.0 / 
pow(10.0, nDecimalPlaces));
 
 // remove modify handler from old linked field
 ImplSetFieldLink( Link() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-05-30 Thread Andre Fischer
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 636b7e64bd803f2355bfcc56680d41832ccc4a6b
Author: Andre Fischer a...@apache.org
Date:   Thu May 30 08:59:30 2013 +

Resolves: #i122380# Use quick help text as accessible name...

for some paragraph panel controls

(cherry picked from commit 3f1d43bd6d7a2c5841ad3b0fbcd417393df74329)

Conflicts:
svx/source/sidebar/paragraph/ParaPropertyPanel.cxx

Change-Id: Ic1fdbf1bfa5c04e844c03e6909fef41b76e6c6c5
(cherry picked from commit d7609ad71524207b847f07e7df9bea1c24fb3b70)

diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx 
b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 9bf443b..88d29c9 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -402,6 +402,10 @@ void ParaPropertyPanel::InitToolBoxIndent()
 maRightIndent-SetModifyHdl( aLink );
 maFLineIndent-SetModifyHdl( aLink );
 
+maLeftIndent-SetAccessibleName(maLeftIndent-GetQuickHelpText());
+maRightIndent-SetAccessibleName(maRightIndent-GetQuickHelpText());
+maFLineIndent-SetAccessibleName(maFLineIndent-GetQuickHelpText());
+
 if( Application::GetSettings().GetLayoutRTL())
 {
 maTbxIndent_IncDec-SetItemImage(TOOLBOX_ITEM1, 
maIncIndentControl.GetIcon());
@@ -467,6 +471,9 @@ void ParaPropertyPanel::InitToolBoxSpacing()
 maTopDist-SetModifyHdl(aLink);
 maBottomDist-SetModifyHdl( aLink );
 
+maTopDist-SetAccessibleName(maTopDist-GetQuickHelpText());
+maBottomDist-SetAccessibleName(maBottomDist-GetQuickHelpText());
+
 maTbxUL_IncDec-SetItemImage(TOOLBOX_ITEM1, maParInc);
 maTbxUL_IncDec-SetItemImage(TOOLBOX_ITEM2, maParDec);
 aLink = LINK( this, ParaPropertyPanel, ClickUL_IncDec_Hdl_Impl );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-05-29 Thread Andras Timar
 svx/source/dialog/ucsubset.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 96836c1710e72812366b800b9f53d5181aadcd61
Author: Andras Timar ati...@suse.com
Date:   Wed May 29 13:26:59 2013 +0200

typo: Ssymbols - Symbols

Change-Id: Ifc518e65ccdce4e853fc419b87547b00d0e437a4

diff --git a/svx/source/dialog/ucsubset.src b/svx/source/dialog/ucsubset.src
index 4ce3283..15b283d 100644
--- a/svx/source/dialog/ucsubset.src
+++ b/svx/source/dialog/ucsubset.src
@@ -393,7 +393,7 @@ Resource RID_SUBSETMAP
 };
 String RID_SUBSETSTR_YIJING_HEXAGRAM_SYMBOLS
 {
-Text [ en-US ] = Yijing Hexagram Ssymbols;
+Text [ en-US ] = Yijing Hexagram Symbols;
 };
 String RID_SUBSETSTR_LINEAR_B_SYLLABARY
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-05-28 Thread Caolán McNamara
 svx/source/svdraw/svdundo.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 116eda4dc9723b41de3b6dcf1adaee041bb52f9d
Author: Caolán McNamara caol...@redhat.com
Date:   Tue May 28 13:21:19 2013 +0100

Fix editing text in draw object undo regression

Regression since 6e29f56895cd38aa7dee85112370a7cfc0d24632 and
28d2a0c162b477a013c7c51c19a94fb08b55b276 pText1 can legally be NULL

Change-Id: I0d54f4aeaa18834c32daeabad43776bc4f68088b
(cherry picked from commit 90df8be13d8f72e0d431161a864f108e74549aff)

diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 5026435..8209282 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -1144,10 +1144,10 @@ void SdrUndoObjSetText::Undo()
 AfterSetText();
 
 SdrText* pText = static_cast SdrTextObj*( pObj )-getText(mnText);
-if (pText  pOldText)
+if (pText)
 {
 // copy text for Undo, because the original now belongs to 
SetOutlinerParaObject()
-OutlinerParaObject* pText1 = new OutlinerParaObject(*pOldText);
+OutlinerParaObject* pText1 = pOldText ? new 
OutlinerParaObject(*pOldText) : NULL;
 pText-SetOutlinerParaObject(pText1);
 }
 
@@ -1158,10 +1158,10 @@ void SdrUndoObjSetText::Undo()
 void SdrUndoObjSetText::Redo()
 {
 SdrText* pText = static_cast SdrTextObj*( pObj )-getText(mnText);
-if (pText  pNewText)
+if (pText)
 {
 // copy text for Undo, because the original now belongs to 
SetOutlinerParaObject()
-OutlinerParaObject* pText1 = new OutlinerParaObject(*pNewText);
+OutlinerParaObject* pText1 = pNewText ? new 
OutlinerParaObject(*pNewText) : NULL;
 static_cast SdrTextObj* ( pObj )-NbcSetOutlinerParaObjectForText( 
pText1, pText );
 }
 pObj-ActionChanged();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-05-25 Thread David Tardon
 svx/source/svdraw/svdobj.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit f6d39d7e2c64a6aec8c83943caf827a57f067335
Author: David Tardon dtar...@redhat.com
Date:   Sat May 25 10:30:45 2013 +0200

i did not intend to commit this

Change-Id: I126cb90919155ae2dae30a6ed98ca207f6e81d9f

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 0577860..98e3b9a 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -498,8 +498,6 @@ SdrObject::~SdrObject()
 delete mpViewContact;
 mpViewContact = 0L;
 }
-
-mnLayerID = static_castSdrLayerID(0xdead);
 }
 
 void SdrObject::Free( SdrObject* _rpObject )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2013-05-24 Thread Mark Wielaard
 svx/source/sidebar/nbdtmg.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0699c4ee199e8d18b9e3b98967b3fd4bd1ee301c
Author: Mark Wielaard m...@klomp.org
Date:   Fri May 24 21:24:00 2013 +0200

Robustify and fix leak in NBOTypeMgrBase::ImplLoad().

The operator of SvStream doesn't initialize a variable if the stream
is faulty. So initialize the variables before usage. Also delete the
SvStream even if it was faulty.

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

diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 0976150..a1eb0c1 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -184,8 +184,8 @@ void NBOTypeMgrBase::ImplLoad(String filename)
 aFile.Append( filename);
 SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( 
INetURLObject::NO_DECODE ), STREAM_READ );
 if( pIStm ) {
-sal_uInt32  nVersion;
-sal_Int32   nNumIndex;
+sal_uInt32  nVersion = 0;
+sal_Int32   nNumIndex = 0;
 *pIStm  nVersion;
 if (nVersion==DEFAULT_NUMBERING_CACHE_FORMAT_VERSION) //first version
 {
@@ -209,8 +209,8 @@ void NBOTypeMgrBase::ImplLoad(String filename)
 RelplaceNumRule(aNum,nNumIndex,mLevel);
 *pIStm  nNumIndex;
 }
-delete pIStm;
 }
+delete pIStm;
 }
 eCoreUnit = eOldCoreUnit;
 bIsLoading = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits