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

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

New commits:
commit 95dfcdcf7710a2b384d3ef8a94443efee86eb701
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/5941
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 112ef1f..94a3ebe 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2500,7 +2500,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-0' - svx/source

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

New commits:
commit c85506265c8d78a103a267489e498aeee9434853
Author: Laurent Balland-Poirier laurent.balland-poir...@laposte.net
Date:   Tue Sep 17 16:53:26 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 7d26fdc..3058ca0 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -30,6 +30,9 @@
 
 #include svx/dialogs.hrc
 
+#define TMP_STR_BEGIN   '['
+#define TMP_STR_END ']'
+
 #define DELAY_TIMEOUT   100
 
 #include svx/xlnclit.hxx
@@ -299,7 +302,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-0' - svx/source

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

New commits:
commit bac2e995debd58957bdca24ba29f4817a752e020
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/5179
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 2663b8f..e77e54c 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -1605,6 +1605,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-0' - svx/source

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

New commits:
commit 5ecbe5df8034895273942fd19a3cd6c9544e1025
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/4912
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 4c9a52e..5e3ef5f 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -3043,16 +3043,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-0' - 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 1754479bd27d73e74f3f87eb82c18414aa280c28
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/4515
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-0' - svx/source

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

New commits:
commit 435be554c5025f2309c016170d5225ac086c727b
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/4490
Reviewed-by: Thorsten Behrens tbehr...@suse.com
Tested-by: Thorsten Behrens tbehr...@suse.com
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx 
b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 6b394be..64ac99d 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-0' - svx/source

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

New commits:
commit e58f2c9ffa627df299cdc5cbddaeaf2f173736c2
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/4399
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 26eacd9..ab8334a 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-0' - svx/source

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

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

fdo#62224 set spacing to content too

(cherry picked from commit 14c139e3705c537556f493657f9cb01818d1f80d)

Change-Id: Idafcd96ff8b01139dfc22cf3d0d2f5e98759488e
Signed-off-by: David Tardon dtar...@redhat.com
Reviewed-on: https://gerrit.libreoffice.org/4358
Reviewed-by: Noel Power noel.po...@suse.com
Tested-by: Noel Power noel.po...@suse.com

diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index b25e5f1..1cdf9e0 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2588,11 +2588,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;
@@ -2601,6 +2604,9 @@ struct LinesState
 bool aInnerLineSet[2];
 bool aBorderIndeterminate[4];
 bool aInnerLineIndeterminate[2];
+bool aDistanceSet[4];
+sal_uInt16 aDistance[4];
+bool bDistanceIndeterminate;
 };
 
 class BoxItemWrapper
@@ -2686,6 +2692,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 )
@@ -2706,6 +2727,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
 {
@@ -2715,6 +2739,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));
 }
 }
 
@@ -2787,6 +2816,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

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

2013-06-03 Thread David Tardon
 svx/source/table/tablecontroller.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9e5342509b302ba1f816f21cc3ad1cb7093982e0
Author: David Tardon dtar...@redhat.com
Date:   Mon Jun 3 14:22:07 2013 +0200

copy values from the original item set

... because SfxAbstractDialog::GetOutputItemSet() only contains the
items that have been _changed_ in the dialog.

Change-Id: Iaf20bb42b65e420fe4e7aff979378eff7b5e5df2
(cherry picked from commit 9cd71f996e3625e8174c46bf85e336c1ee90df7f)

Change-Id: I9100dbe05c418a9dd1b819534a08076c9a4aed1c
Reviewed-on: https://gerrit.libreoffice.org/4145
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index 9368675..16a2c2c 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -726,7 +726,8 @@ void SvxTableController::onFormatTable( SfxRequest rReq )
 std::auto_ptr SfxAbstractTabDialog  pDlg( pFact ? 
pFact-CreateSvxFormatCellsDialog( NULL, aNewAttr, pTableObj-GetModel(), 
pTableObj) : 0 );
 if( pDlg.get()  pDlg-Execute() )
 {
-SfxItemSet aNewSet( *(pDlg-GetOutputItemSet ()) );
+SfxItemSet aNewSet( aNewAttr );
+aNewSet.Put( *(pDlg-GetOutputItemSet ()) );
 
 SvxBoxItem aNewBoxItem( static_cast const SvxBoxItem ( 
aNewSet.Get( SDRATTR_TABLE_BORDER ) ) );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-05-24 Thread Muthu Subramanian
 svx/source/svdraw/svdotxed.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 84093cceb624eab7d956caebdaaf2ac10397900b
Author: Muthu Subramanian sumu...@suse.com
Date:   Thu May 9 16:27:06 2013 +0530

fdo#63311: Unable to delete text from Shape.

This avoids setting null as text to the shape.
[empty_text seems to be the initial value of text for shape
 rather than null - something recent? We also seem to
 export empty text entries because of this]
(cherry picked from commit 19b217505d094577392d8712b9d07f29b3de2081)

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

diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index eea4907..a92b17c 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -231,14 +231,11 @@ void SdrTextObj::EndTextEdit(SdrOutliner rOutl)
 {
 OutlinerParaObject* pNewText = NULL;
 
-if(HasTextImpl( rOutl ) )
-{
-// to make the gray field background vanish again
-rOutl.UpdateFields();
+// to make the gray field background vanish again
+rOutl.UpdateFields();
 
-sal_uInt16 nParaAnz = static_cast sal_uInt16 ( 
rOutl.GetParagraphCount() );
-pNewText = rOutl.CreateParaObject( 0, nParaAnz );
-}
+sal_uInt16 nParaAnz = static_cast sal_uInt16 ( 
rOutl.GetParagraphCount() );
+pNewText = rOutl.CreateParaObject( 0, nParaAnz );
 
 // need to end edit mode early since SetOutlinerParaObject already
 // uses GetCurrentBoundRect() which needs to take the text into account
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-05-17 Thread Michael Stahl
 svx/source/svdraw/svdundo.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9fbc213ac882540b4d267d11d29eda68df297f16
Author: Michael Stahl mst...@redhat.com
Date:   Fri May 17 13:23:34 2013 +0200

fdo#62965: fix crash in Edit Contour dialog

The pObjList is 0, so use pObj's GetModel() which should be the same.
(regression from 115054fef08998c56cba8f14472df1d15007f635)

Change-Id: Ib20e1806518f7b3b33d3fb4472d79d531ea9f1de
(cherry picked from commit 71f990d286c603b3bf220c8d93af69f04a45dd7a)
Reviewed-on: https://gerrit.libreoffice.org/3936
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index c4e3c29..93cf3fc 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -747,7 +747,7 @@ SdrUndoObjList::SdrUndoObjList(SdrObject rNewObj, bool 
bOrdNumDirect)
 nOrdNum=pObj-GetOrdNum();
 }
 
-m_pListener = new ObjListListener(*this, *pObj, *pObjList-GetModel());
+m_pListener = new ObjListListener(*this, *pObj, *pObj-GetModel());
 }
 
 SdrUndoObjList::~SdrUndoObjList()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-05-17 Thread Michael Stahl
 svx/source/dialog/_contdlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 253871bca7d5f8085424bf920eb781596dc0371e
Author: Michael Stahl mst...@redhat.com
Date:   Fri May 17 14:02:25 2013 +0200

fdo#57079: SvxSuperContourDlg: unregister configuration listener

... in destructor.  Otherwise it will access freed memory when
eventually called.  This crashes since OOo 3.2 but no idea why it would
appear to not crash in earlier versions.

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

diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index d6e77a2..94277ec 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -265,6 +265,8 @@ SvxSuperContourDlg::SvxSuperContourDlg( SfxBindings 
*_pBindings, SfxChildWindow
 
 SvxSuperContourDlg::~SvxSuperContourDlg()
 {
+SvtMiscOptions aMiscOptions;
+aMiscOptions.RemoveListenerLink( LINK(this, SvxSuperContourDlg, MiscHdl) );
 }
 
 // Resize methods
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-05-15 Thread Lionel Elie Mamane
 svx/source/form/fmtextcontrolshell.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 66ca50016b8a65e67269026ca5b456fa4f8fa35e
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Sun May 12 00:35:31 2013 +0200

fdo#63695 revert hackish fix to i#51621

Change-Id: I688a659207c4b95cc98ff5dc5c5622d4592b3f89
(cherry picked from commit 7fd1cc18130464a9f09cb7a866e88c4d52e4716d)
Reviewed-on: https://gerrit.libreoffice.org/3864
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svx/source/form/fmtextcontrolshell.cxx 
b/svx/source/form/fmtextcontrolshell.cxx
index a4551af..47e5e7d 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -1271,8 +1271,9 @@ namespace svx
 // shells too much (In theory, nearly every slot could have an own 
shell then).
 //
 // #i51621# / 2005-08-19 / frank.schoenh...@sun.com
-bool bHaveAnyServeableSlots = m_xActiveTextComponent.is() || 
!m_aControlFeatures.empty();
-if ( m_aControlActivationHandler.IsSet()  bHaveAnyServeableSlots )
+// bool bHaveAnyServeableSlots = m_xActiveTextComponent.is() || 
!m_aControlFeatures.empty();
+// LEM: not calling m_aControlActivatonHandler causes fdo#63695, so 
disable this hack for now.
+if ( m_aControlActivationHandler.IsSet() /*  bHaveAnyServeableSlots 
*/ )
 m_aControlActivationHandler.Call( NULL );
 
 m_bNeedClipboardInvalidation = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-05-14 Thread Lionel Elie Mamane
 svx/source/form/fmscriptingenv.cxx |  554 +++--
 1 file changed, 536 insertions(+), 18 deletions(-)

New commits:
commit 73a2e8da11f3785428b97c2bf3fbb52b450fd9f9
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri May 10 23:34:00 2013 +0200

fdo#63398 hardcode former list of oneway method

adapt to disappearance of oneway qualifier for method
by hardcoding list of methods that were oneway.

Autogenerated by the following script:
SKIP=1; git log -p -1   90eac3e69749a9227c4b6902b1f3cef1e338c6d1 | while 
read f0 f1 f2 f3 f4; do if [[ $f0 == --- ]]; then if printf '%s' $f1 | 
egrep -q '^a/(off|udk)api/.*\.idl$'; then LISTENER=$(printf '%s' $f1 | sed  
-re 's@^a/(udk|off)api/@@' -e 's|/|.|g' -e 's@\.idl$@@'); SKIP=0; else SKIP=1; 
fi; elif [[ $SKIP -eq 0 ]]  [[ $f1 == '[oneway]' ]]; then printf 
$'(pairOUString,OUString(%s,%s))
' $LISTENER $(echo -n $f3 | sed -r -e 's@\(.*@@'); fi; done

This is rather atrocious, but ensures the behaviour is exactly the
same as before.

Left to do:

remove methods that are irrelevant here
(that is, impl_allowAsynchronousCall_nothrow will never be called
 with them as argument)

(cherry picked from commit 9dfc3807dbff1a40f487d020446265bb85d0ac16)

Conflicts:
svx/source/form/fmscriptingenv.cxx

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

diff --git a/svx/source/form/fmscriptingenv.cxx 
b/svx/source/form/fmscriptingenv.cxx
index c6bf945..e8cf061 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -40,6 +40,10 @@
 #include basic/basmgr.hxx
 
 #include boost/shared_ptr.hpp
+#include boost/assign/list_of.hpp
+#include utility
+using std::pair;
+#include set
 
 //
 namespace svxform
@@ -195,24 +199,538 @@ namespace svxform
 //
 bool FormScriptListener::impl_allowAsynchronousCall_nothrow( const 
::rtl::OUString _rListenerType, const ::rtl::OUString _rMethodName ) const
 {
-bool bAllowAsynchronousCall = false;
-try
-{
-::comphelper::ComponentContext aContext( 
::comphelper::getProcessServiceFactory() );
-Reference XHierarchicalNameAccess  xTypeDescriptions( 
aContext.getSingleton( com.sun.star.reflection.theTypeDescriptionManager ), 
UNO_QUERY_THROW );
-
-::rtl::OUString sMethodDescription( _rListenerType );
-sMethodDescription += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( 
:: ));
-sMethodDescription += _rMethodName;
-
-Reference XInterfaceMethodTypeDescription  xMethod( 
xTypeDescriptions-getByHierarchicalName( sMethodDescription ), UNO_QUERY_THROW 
);
-bAllowAsynchronousCall = xMethod-isOneway();
-}
-catch( const Exception )
-{
-DBG_UNHANDLED_EXCEPTION();
-}
-return bAllowAsynchronousCall;
+// This used to be implemented as:
+// is (_rListenerType + :: + _rMethodName) a oneway function?
+// since we got rid of the notion of oneway, this is the list
+// of oneway methods, autogenerated by postprocessing of
+// commitdiff 90eac3e69749a9227c4b6902b1f3cef1e338c6d1
+static std::set pair OUString, OUString   delayed_event_listeners =
+boost::assign::list_of
+
(pairOUString,OUString(com.sun.star.accessibility.XAccessibleComponent,grabFocus))
+
(pairOUString,OUString(com.sun.star.accessibility.XAccessibleEventBroadcaster,addAccessibleEventListener))
+
(pairOUString,OUString(com.sun.star.accessibility.XAccessibleEventBroadcaster,removeAccessibleEventListener))
+
(pairOUString,OUString(com.sun.star.accessibility.XAccessibleSelection,clearAccessibleSelection))
+
(pairOUString,OUString(com.sun.star.accessibility.XAccessibleSelection,selectAllAccessibleChildren))
+
(pairOUString,OUString(com.sun.star.awt.XActionListener,actionPerformed))
+
(pairOUString,OUString(com.sun.star.awt.XActivateListener,windowActivated))
+
(pairOUString,OUString(com.sun.star.awt.XActivateListener,windowDeactivated))
+
(pairOUString,OUString(com.sun.star.awt.XAdjustmentListener,adjustmentValueChanged))
+
(pairOUString,OUString(com.sun.star.awt.XButton,addActionListener))
+
(pairOUString,OUString(com.sun.star.awt.XButton,removeActionListener))
+(pairOUString,OUString(com.sun.star.awt.XButton,setLabel))
+
(pairOUString,OUString(com.sun.star.awt.XButton,setActionCommand))
+
(pairOUString,OUString(com.sun.star.awt.XCheckBox,addItemListener))
+

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

2013-05-01 Thread Thorsten Behrens
 svx/source/unodraw/unoshape.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3ac3c8681253b7a05d5736f664929bcd5f15c8aa
Author: Thorsten Behrens tbehr...@suse.com
Date:   Tue Apr 30 21:23:46 2013 +0200

Make uno any types explicit.

This was previously sticking long types into Any - which yields
different sal types on different archs.

Change-Id: Ifc7a60a052b57f8a83739ec11a97ab32aaa2ee7c
Reviewed-on: https://gerrit.libreoffice.org/3703
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index dc41794..4c9a52e 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2770,7 +2770,7 @@ bool SvxShape::getPropertyValueImpl( const 
::rtl::OUString, const SfxItemProper
 case OWN_ATTR_GLUEID_HEAD:
 case OWN_ATTR_GLUEID_TAIL:
 {
-rValue = pEdgeObj-getGluePointIndex( pProperty-nWID == 
OWN_ATTR_GLUEID_HEAD );
+rValue = (sal_Int32)pEdgeObj-getGluePointIndex( 
pProperty-nWID == OWN_ATTR_GLUEID_HEAD );
 break;
 }
 case OWN_ATTR_EDGE_POLYPOLYGONBEZIER:
@@ -2850,11 +2850,11 @@ bool SvxShape::getPropertyValueImpl( const 
::rtl::OUString, const SfxItemProper
 }
 
 case SDRATTR_ROTATEANGLE:
-rValue = mpObj-GetRotateAngle();
+rValue = (sal_Int32)mpObj-GetRotateAngle();
 break;
 
 case SDRATTR_SHEARANGLE:
-rValue = mpObj-GetShearAngle();
+rValue = (sal_Int32)mpObj-GetShearAngle();
 break;
 
 case SDRATTR_OBJMOVEPROTECT:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-04-29 Thread Luke Deller
 svx/source/svdraw/svdobj.cxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 879c36b01d3f806937cfc26b90ebac89e6df87c4
Author: Luke Deller l...@deller.id.au
Date:   Thu Apr 25 00:00:54 2013 +1000

fdo#60910: discard UNO shape object in SdrObject::SetPage

The creation of the UNO shape in SdrObject::getUnoShape is influenced
by pPage, so when the page changes we need to discard the cached UNO
shape so that a new one will be created with the new page.

Change-Id: Id37593fe5578afe06cd967bf0b0b7d56922fe4af
Reviewed-on: https://gerrit.libreoffice.org/3662
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 35b89c0..f7045fe 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -567,12 +567,24 @@ SdrObjList* SdrObject::GetObjList() const
 
 void SdrObject::SetPage(SdrPage* pNewPage)
 {
+SdrModel* pOldModel = pModel;
+SdrPage* pOldPage = pPage;
+
 pPage=pNewPage;
 if (pPage!=NULL) {
 SdrModel* pMod=pPage-GetModel();
 if (pMod!=pModel  pMod!=NULL) {
 SetModel(pMod);
 }}
+
+// The creation of the UNO shape in SdrObject::getUnoShape is influenced
+// by pPage, so when the page changes we need to discard the cached UNO
+// shape so that a new one will be created.
+// If the page is changing to another page with the same model, we
+// assume they create compatible UNO shape objects so we shouldn't have
+// to invalidate.
+if (pOldPage != pPage  !(pOldPage  pPage  pOldModel == pModel))
+setUnoShape(NULL);
 }
 
 SdrPage* SdrObject::GetPage() 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-0' - svx/source

2013-04-15 Thread Lionel Elie Mamane
 svx/source/fmcomp/gridctrl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 93301cf7ca8fff91b594d2ebe7bb24510acfdd3c
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Sun Apr 14 09:37:00 2013 +0200

fdo#52179 on copy kb-shortcut, from *current* row, not last painted row (!)

Change-Id: I39be862abb7c72234adad9c517d4a0570a1d71ae
Reviewed-on: https://gerrit.libreoffice.org/3378
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 9a40816..2663b8f 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3397,7 +3397,7 @@ void DbGridControl::KeyInput( const KeyEvent rEvt )
 {
 size_t Location = GetModelColumnPos( nColId );
 DbGridColumn* pColumn = ( Location  m_aColumns.size() ) ? 
m_aColumns[ Location ] : NULL;
-OStringTransfer::CopyString( GetCurrentRowCellText( 
pColumn,m_xPaintRow ), this );
+OStringTransfer::CopyString( GetCurrentRowCellText( pColumn, 
m_xCurrentRow ), this );
 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-0' - svx/source

2013-03-20 Thread Regina Henschel
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0bebb6b7ee44db2554a74a77ffaffb304a7d9b3b
Author: Regina Henschel reg...@apache.org
Date:   Mon Aug 6 10:35:23 2012 +

i#78247# and i#78029# wrong glue points in iscosceles and in right triangle

(cherry picked from commit 26e91b07a559692b4f8acdd04f5bd28d0daa68b3)

Change-Id: I504ec85fa7b94a4473905b7e2720b2169c53e6cf
(cherry picked from commit e6a7c555cc6919cbe2fdaf794d57ca0819760c92)

Signed-off-by: Eike Rathke er...@redhat.com

diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index 6a8c442..4f069a2 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -227,7 +227,7 @@ static const SvxMSDffTextRectangles 
mso_sptRightTriangleTextRect[] =
 };
 static const SvxMSDffVertPair mso_sptRightTriangleGluePoints[] =
 {
-{ 10800, 0 }, { 5400, 10800 }, { 0, 21600 }, { 10800, 21600 }, { 21600, 
21600 }, { 16200, 10800 }
+{ 0, 0 }, { 0, 10800 }, { 0, 21600 }, { 10800, 21600 }, { 21600, 21600 }, 
{ 10800, 10800 }
 };
 static const mso_CustomShape msoRightTriangle =
 {
@@ -460,7 +460,7 @@ static const SvxMSDffTextRectangles 
mso_sptIsocelesTriangleTextRect[] =
 };
 static const SvxMSDffVertPair mso_sptIsocelesTriangleGluePoints[] =
 {
-{ 10800, 0 }, { 1 MSO_I, 10800 }, { 0, 21600 }, { 10800, 21600 }, { 21600, 
21600 }, { 7 MSO_I, 10800 }
+{ 0 MSO_I, 0 }, { 1 MSO_I, 10800 }, { 0, 21600 }, { 10800, 21600 }, { 
21600, 21600 }, { 7 MSO_I, 10800 }
 };
 static const SvxMSDffHandle mso_sptIsocelesTriangleHandle[] =
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-14 Thread karth
 svx/source/table/viewcontactoftableobj.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit d87160b888fe476d179982cbb297cf0e70632f3a
Author: karth karthike...@kacst.edu.sa
Date:   Thu Jan 24 05:49:50 2013 +0530

Resolves the bug fdo#59117 missing borders of last column

  When writingmode is set to RTL, the table is start drawn from Last column
to first column.  There is no problem with leftright lines, Because these
are not depends on the LTR or RTL writingmode.  But the bottom  top line
depends on writing mode.  As these two lines are drawn from previous cell to
next cell(left to right) the nX value should be nX-1 in RTL writingmode.

Change-Id: I3e21c7dd469ed5ba29e66f79da471b662632182e
Reviewed-on: https://gerrit.libreoffice.org/1834
Reviewed-by: Ahmad Harthi aalhar...@kacst.edu.sa
Tested-by: Ahmad Harthi aalhar...@kacst.edu.sa
(cherry picked from commit 8c200d85cdbece5c65b35211644f1e98491f307a)

Signed-off-by: Lior Kaplan kaplanl...@gmail.com

diff --git a/svx/source/table/viewcontactoftableobj.cxx 
b/svx/source/table/viewcontactoftableobj.cxx
index a74dc60..1f9f7d2 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -357,7 +357,7 @@ namespace drawinglayer
 }
 }
 
-if(!getRightLine().isEmpty()  getRightIsOutside())
+if(!getRightLine().isEmpty())
 {
 // create right line from top to bottom
 const basegfx::B2DPoint aStart(getTransform() * 
basegfx::B2DPoint(1.0, 0.0));
@@ -622,9 +622,11 @@ namespace sdr
 
 // get basic lines
 impGetLine(aLeftLine, rTableLayouter, nX, 
nY, false, nColCount, nRowCount, bIsRTL);
-impGetLine(aBottomLine, rTableLayouter, 
nX, nYBottom, true, nColCount, nRowCount, bIsRTL);
+//To resolve the bug fdo#59117
+//In RTL table as BottomLine  TopLine are 
drawn from Left Side to Right, nX should be nX-1
+impGetLine(aBottomLine, rTableLayouter, 
bIsRTL?nX-1:nX, nYBottom, true, nColCount, nRowCount, bIsRTL);
 impGetLine(aRightLine, rTableLayouter, 
nXRight, nY, false, nColCount, nRowCount, bIsRTL);
-impGetLine(aTopLine, rTableLayouter, nX, 
nY, true, nColCount, nRowCount, bIsRTL);
+impGetLine(aTopLine, rTableLayouter, 
bIsRTL?nX-1:nX, nY, true, nColCount, nRowCount, bIsRTL);
 
 // get the neighbor cells' borders
 impGetLine(aLeftFromTLine, rTableLayouter, 
nX, nY - 1, false, nColCount, nRowCount, bIsRTL);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-04 Thread Joren De Cuyper
 svx/source/tbxctrls/tbcontrl.cxx |   40 +--
 1 file changed, 30 insertions(+), 10 deletions(-)

New commits:
commit c56ae179f83034df407cd609a69c140d24d3ec6d
Author: Joren De Cuyper joren.libreoff...@telenet.be
Date:   Wed Feb 20 15:16:46 2013 +0100

resolve fdo#54335 type an existing style name into Style box changes 
hierarchy

Change-Id: If2fd4eecec4f6f031b264a9a1b0c31e938194878
Reviewed-on: https://gerrit.libreoffice.org/2292
Reviewed-by: Thorsten Behrens tbehr...@suse.com
Tested-by: Thorsten Behrens tbehr...@suse.com
Reviewed-on: https://gerrit.libreoffice.org/2440
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index fab0466..112ef1f 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -371,20 +371,20 @@ void SvxStyleBox_Impl::Select()
 
 if ( !IsTravelSelect() )
 {
-String aSelEntry( GetText() );
+String aSearchEntry( GetText() );
 bool bDoIt = true, bClear = false;
 if( bInSpecialMode )
 {
-if( aSelEntry == aClearFormatKey  GetSelectEntryPos() == 0 )
+if( aSearchEntry == aClearFormatKey  GetSelectEntryPos() == 0 )
 {
-aSelEntry = sDefaultStyle;
+aSearchEntry = sDefaultStyle;
 bClear = true;
 //not only apply default style but also call 'ClearFormatting'
 Sequence PropertyValue  aEmptyVals;
-SfxToolBoxControl::Dispatch( m_xDispatchProvider, 
rtl::OUString(.uno:ResetAttributes),
+SfxToolBoxControl::Dispatch( m_xDispatchProvider, 
OUString(.uno:ResetAttributes),
 aEmptyVals);
 }
-else if( aSelEntry == aMoreKey  GetSelectEntryPos() == ( 
GetEntryCount() - 1 ) )
+else if( aSearchEntry == aMoreKey  GetSelectEntryPos() == ( 
GetEntryCount() - 1 ) )
 {
 SfxViewFrame* pViewFrm = SfxViewFrame::Current();
 DBG_ASSERT( pViewFrm, SvxStyleBox_Impl::Select(): no 
viewframe );
@@ -401,8 +401,28 @@ void SvxStyleBox_Impl::Select()
 }
 }
 
-// #i36723# after ReleaseFocus() the new entry is included into the 
List
-sal_Bool bCreateNew = GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND;
+//Do we need to create a new style?
+SfxObjectShell *pShell = SfxObjectShell::Current();
+SfxStyleSheetBasePool* pPool = pShell-GetStyleSheetPool();
+SfxStyleSheetBase* pStyle = NULL;
+
+bool bCreateNew = 0;
+
+if ( pPool )
+{
+pPool-SetSearchMask( eStyleFamily, SFXSTYLEBIT_ALL );
+
+pStyle = pPool-First();
+while ( pStyle  String( pStyle-GetName() ) != aSearchEntry )
+pStyle = pPool-Next();
+}
+
+if ( !pStyle )
+{
+// cannot find the style for whatever reason
+// therefore create a new style
+bCreateNew = 1;
+}
 
 /*  #i33380# DR 2004-09-03 Moved the following line above the 
Dispatch() call.
 This instance may be deleted in the meantime (i.e. when a dialog 
is opened
@@ -412,17 +432,17 @@ void SvxStyleBox_Impl::Select()
 if( bDoIt )
 {
 if ( bClear )
-SetText( aSelEntry );
+SetText( aSearchEntry );
 SaveValue();
 
 Sequence PropertyValue  aArgs( 2 );
-aArgs[0].Value  = makeAny( OUString( aSelEntry ) );
+aArgs[0].Value  = makeAny( OUString( aSearchEntry ) );
 aArgs[1].Name   = OUString(Family);
 aArgs[1].Value  = makeAny( sal_Int16( eStyleFamily ));
 if( bCreateNew )
 {
 aArgs[0].Name   = OUString(Param);
-SfxToolBoxControl::Dispatch( m_xDispatchProvider, 
rtl::OUString(.uno:StyleNewByExample), aArgs);
+SfxToolBoxControl::Dispatch( m_xDispatchProvider, 
OUString(.uno:StyleNewByExample), aArgs);
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-02-26 Thread Michael Meeks
 svx/source/svdraw/svdhdl.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 9a4cef83c386199f740c85350da2bb53a7b3aa96
Author: Michael Meeks michael.me...@suse.com
Date:   Mon Feb 25 21:48:33 2013 +

fdo#45879 - fix selected gluepoint rendering.

Store the glue-point bitmap at a unique index in maRealMarkers for re-use.

Change-Id: I2cd5b240619502dfc8634eca331f4163e5bd5ca8
(cherry picked from commit 8d34984116c0841748ae47afa667877dc1b5a444)

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

diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 020bb6a..9edebc2 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -87,11 +87,11 @@ public:
 

 #define KIND_COUNT  (14)
 #define INDEX_COUNT (6)
-#define INDIVIDUAL_COUNT(4)
+#define INDIVIDUAL_COUNT(5)
 
 SdrHdlBitmapSet::SdrHdlBitmapSet(sal_uInt16 nResId)
 :   maMarkersBitmap(ResId(nResId, *ImpGetResMgr())),
-// 14 kinds (BitmapMarkerKind) use index [0..5], 4 extra
+// 15 kinds (BitmapMarkerKind) use index [0..5] + 5 extra
 maRealMarkers((KIND_COUNT * INDEX_COUNT) + INDIVIDUAL_COUNT)
 {
 }
@@ -237,20 +237,20 @@ const BitmapEx 
SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal
 
 case Glue_Deselected:
 {
-return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, 
Rectangle(Point(15, 67), Size(9, 9)));
+return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, 
Rectangle(Point(15, 67), Size(9, 9)));
 }
 
 case Anchor: // AnchorTR for SW
 case AnchorTR:
 {
-return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, 
Rectangle(Point(24, 67), Size(24, 24)));
+return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, 
Rectangle(Point(24, 67), Size(24, 24)));
 }
 
 // add AnchorPressed to be able to animate anchor control
 case AnchorPressed:
 case AnchorPressedTR:
 {
-return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, 
Rectangle(Point(48, 67), Size(24, 24)));
+return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 4, 
Rectangle(Point(48, 67), Size(24, 24)));
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits