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

2015-08-26 Thread Caolán McNamara
 svx/source/svdraw/svdoedge.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3d566f50805df54f5cadda8daf1cb78d13d2abdd
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Aug 26 14:44:32 2015 +0100

there might be no model

Change-Id: I9c384587c127ca077803bf8aae63d0e54eda6aaf
(cherry picked from commit be95c7430d2fd9858f41ee8e8882d987a5bbe749)
Reviewed-on: https://gerrit.libreoffice.org/18027
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index d212290..b902010 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2264,7 +2264,7 @@ void SdrEdgeObj::NbcResize(const Point rRefPnt, const 
Fraction aXFact, const F
 ResizeXPoly(*pEdgeTrack,rRefPnt,aXFact,aYFact);
 
 // if resize is not from paste, forget user distances
-if(!GetModel()-IsPasteResize())
+if (!GetModel() || !GetModel()-IsPasteResize())
 {
 aEdgeInfo.aObj1Line2 = Point();
 aEdgeInfo.aObj1Line3 = Point();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-17 Thread Maxim Monastirsky
 svx/source/sidebar/graphic/GraphicPropertyPanel.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit aec11c5204fb0687c0997c597e6b9526246df1a5
Author: Maxim Monastirsky momonas...@gmail.com
Date:   Thu Aug 13 12:55:04 2015 +0300

tdf#78111 Sane preferred width for the color mode combobox

Don't let long strings (in some languages) make it request so much space.

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

diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx 
b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
index dd371df..f490f46 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
@@ -58,6 +58,7 @@ GraphicPropertyPanel::GraphicPropertyPanel(
 get(mpMtrBrightness, setbrightness);
 get(mpMtrContrast, setcontrast);
 get(mpLBColorMode, setcolormode);
+
mpLBColorMode-set_width_request(mpLBColorMode-get_preferred_size().Width());
 get(mpMtrTrans, settransparency);
 get(mpMtrRed, setred);
 get(mpMtrGreen, setgreen);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-07-16 Thread Caolán McNamara
 svx/source/sdr/contact/viewcontactofsdrpathobj.cxx |   71 +++--
 1 file changed, 53 insertions(+), 18 deletions(-)

New commits:
commit f794f6501bcf18e5430d57128699fc579251f900
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Jul 15 10:09:16 2015 +0100

Resolves: tdf#63955 clip 19km long line to some sane limit

Change-Id: If9757a5fa2bb93b56b9cf9f566972f687a4a3a45
Reviewed-on: https://gerrit.libreoffice.org/17036
Reviewed-by: Thorsten Behrens thorsten.behr...@cib.de
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com
(cherry picked from commit d1046e7c3f66e5f3384ee1ef534ef28346702fc6)

refactor ensuring polygon has at least a line in it

just split that out into a standalone function, no logic
change

Change-Id: I061d5d716b3fc2a9fb6385e7fb249ce300752130
(cherry picked from commit 83b3349bb94d4c48db4da8fe5f8fdb9b19e633b9)
Reviewed-on: https://gerrit.libreoffice.org/17074
Reviewed-by: Michael Meeks michael.me...@collabora.com
Tested-by: Michael Meeks michael.me...@collabora.com

diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx 
b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 7004342..c44c6a2 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -20,13 +20,14 @@
 
 #include sdr/contact/viewcontactofsdrpathobj.hxx
 #include svx/svdopath.hxx
+#include svx/svdpage.hxx
 #include svx/sdr/primitive2d/sdrattributecreator.hxx
 #include basegfx/polygon/b2dpolypolygontools.hxx
+#include basegfx/polygon/b2dpolygonclipper.hxx
 #include sdr/primitive2d/sdrpathprimitive2d.hxx
 #include basegfx/matrix/b2dhommatrixtools.hxx
 
 
-
 namespace sdr
 {
 namespace contact
@@ -40,26 +41,14 @@ namespace sdr
 {
 }
 
-drawinglayer::primitive2d::Primitive2DSequence 
ViewContactOfSdrPathObj::createViewIndependentPrimitive2DSequence() const
+static sal_uInt32 ensureGeometry(basegfx::B2DPolyPolygon 
rUnitPolyPolygon)
 {
-const SfxItemSet rItemSet = GetPathObj().GetMergedItemSet();
-const drawinglayer::attribute::SdrLineFillShadowTextAttribute 
aAttribute(
-
drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(
-rItemSet,
-GetPathObj().getText(0),
-false));
-basegfx::B2DPolyPolygon 
aUnitPolyPolygon(GetPathObj().GetPathPoly());
-Point aGridOff = GetPathObj().GetGridOffset();
-// Hack for calc, transform position of object according
-// to current zoom so as objects relative position to grid
-// appears stable
-aUnitPolyPolygon.transform( 
basegfx::tools::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) );
-sal_uInt32 nPolyCount(aUnitPolyPolygon.count());
+sal_uInt32 nPolyCount(rUnitPolyPolygon.count());
 sal_uInt32 nPointCount(0);
 
 for(sal_uInt32 a(0); a  nPolyCount; a++)
 {
-nPointCount += aUnitPolyPolygon.getB2DPolygon(a).count();
+nPointCount += rUnitPolyPolygon.getB2DPolygon(a).count();
 }
 
 if(!nPointCount)
@@ -68,20 +57,66 @@ namespace sdr
 basegfx::B2DPolygon aFallbackLine;
 aFallbackLine.append(basegfx::B2DPoint(0.0, 0.0));
 aFallbackLine.append(basegfx::B2DPoint(1000.0, 1000.0));
-aUnitPolyPolygon = basegfx::B2DPolyPolygon(aFallbackLine);
+rUnitPolyPolygon = basegfx::B2DPolyPolygon(aFallbackLine);
 
 nPolyCount = 1;
 }
 
+return nPolyCount;
+}
+
+drawinglayer::primitive2d::Primitive2DSequence 
ViewContactOfSdrPathObj::createViewIndependentPrimitive2DSequence() const
+{
+const SfxItemSet rItemSet = GetPathObj().GetMergedItemSet();
+const drawinglayer::attribute::SdrLineFillShadowTextAttribute 
aAttribute(
+
drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(
+rItemSet,
+GetPathObj().getText(0),
+false));
+basegfx::B2DPolyPolygon 
aUnitPolyPolygon(GetPathObj().GetPathPoly());
+Point aGridOff = GetPathObj().GetGridOffset();
+// Hack for calc, transform position of object according
+// to current zoom so as objects relative position to grid
+// appears stable
+aUnitPolyPolygon.transform( 
basegfx::tools::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) );
+sal_uInt32 nPolyCount(ensureGeometry(aUnitPolyPolygon));
+
 // prepare object transformation and unit polygon (direct model 
data)
 basegfx::B2DHomMatrix aObjectMatrix;
-const bool bIsLine(
+bool 

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

2015-07-02 Thread Caolán McNamara
 svx/source/sdr/contact/viewobjectcontactofgraphic.cxx |   21 +++---
 1 file changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 9ecdfc2a6d912eb8edcff76e85c999a6d2acae83
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jun 29 11:26:41 2015 +0100

Resolves: tdf#92275 impress grinds to a halt constant swapping images

This reverts commit 6c84442f99de109b585d3ba8964deb8dcf261c0f.
tdf#87820 Images not displayed properly in Calc

and replaces it with an alternative solution

Change-Id: Iecb560d43767f0e41e442a307eefcdcecb7589ef
(cherry picked from commit 2d196d0ee26b3840e56ec6537066a3b4a2f08691)
(cherry picked from commit 72da6ef835982e1927fd7405bb42f403c2fee5f9)
Reviewed-on: https://gerrit.libreoffice.org/16574
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx 
b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index 4a8f469..df3e06e 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -134,22 +134,30 @@ namespace sdr
 rGrafObj.mbInsidePaint = false;
 }
 
-// Invalidate paint areas.
-GetViewContact().ActionChanged();
-
 bRetval = true;
 }
 }
 }
 else
 {
-// it is not swapped out, somehow it was loaded. In that case, 
forget
+// it is not swapped out, somehow[1] it was loaded. In that 
case, forget
 // about an existing triggered event
-if(mpAsynchLoadEvent)
+if (mpAsynchLoadEvent)
 {
 // just delete it, this will remove it from the 
EventHandler and
 // will trigger forgetAsynchGraphicLoadingEvent from the 
destructor
 delete mpAsynchLoadEvent;
+
+// Invalidate paint areas.
+// [1] If a calc document with graphics is loaded then 
OnLoad will
+// be emitted before the graphic are due to be swapped in 
asynchronously
+// In sfx2 we generate a preview on receiving onload, 
which forces
+// the graphics to be swapped in to generate the preview. 
When
+// the timer triggers it find the graphics already swapped 
in. So
+// we should still invalidate the paint area on finding 
the graphic
+// swapped in seeing as we're still waiting in calc to 
draw the
+// graphics on receipt of their contents.
+GetViewContact().ActionChanged();
 }
 }
 
@@ -189,9 +197,6 @@ namespace sdr
 rGrafObj.mbInsidePaint = false;
 }
 
-// Invalidate paint areas.
-GetViewContact().ActionChanged();
-
 bRetval = 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-4' - svx/source

2015-06-09 Thread Miklos Vajna
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9d816d79cae3526c2da5f038b4b285f7cf00b762
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Thu May 21 15:12:10 2015 +0100

tdf#91095 svx: avoid unconditional SdrObject - SdrObjCustomShape 
static_cast

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

diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx 
b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 2d26c30..f10eb61 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -273,7 +273,7 @@ Reference drawing::XShape  SAL_CALL 
EnhancedCustomShapeEngine::render()
 throw ( RuntimeException, std::exception )
 {
 Reference drawing::XShape  xShape;
-SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) );
+SdrObject* pSdrObjCustomShape( PTR_CAST( SdrObjCustomShape, 
GetSdrObjectFromXShape( mxShape ) ) );
 if ( pSdrObjCustomShape )
 {
 // retrieving the TextPath property to check if feature is enabled
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-04-21 Thread Caolán McNamara
 svx/source/tbxctrls/tbcontrl.cxx |  184 +--
 1 file changed, 119 insertions(+), 65 deletions(-)

New commits:
commit 7c66a574ff2532e27b24aec32ac2e590bedffef1
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Apr 21 14:39:57 2015 +0100

Resolves: tdf#76825 styles drop down menu is too narrow

fix indent

Change-Id: I2628ac3fbabe9f33c41c7f3612eae608fb854ae3
(cherry picked from commit 7cf22a0a3202da296c1d1a3dafe6e1e5e1d7405d)

break out text drawing bit as UserDrawEntry

Change-Id: Icb1bcfb5f9f7475f67c9c001efdad2aa7e0d0834
(cherry picked from commit e29e3f47e687689c824d71718ae2ccaa4846ac51)

draw all entries the same way

Change-Id: I9da3c8dca4db4a02197a67e1fbedd9b525dc7768
(cherry picked from commit b28ba9dbd00da1094fcd53f6370c04b7caa99d7d)

split out the code that sets up the device for each entry

Change-Id: Iad426e1cb1eaac24edf1e7bb61307f29d33d8786
(cherry picked from commit e367337e58047c4c69869330b36c1f027f5ca5f0)

refactor for reuse

Change-Id: I46e04464376324c7e48fe0ccf7362c3a4256e3c2
(cherry picked from commit fa4c2d8a744049b7389d2020ce84bbb28d945c51)

Change-Id: I3d1ba1da40990df2427f0d380a85d5e704f37038
(cherry picked from commit 856e9b5fe2293bef9c45219391aca664d4a0dd20)
Reviewed-on: https://gerrit.libreoffice.org/15471
Reviewed-by: Adolfo Jayme Barrientos fit...@ubuntu.com
Tested-by: Adolfo Jayme Barrientos fit...@ubuntu.com

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 8216a9f7..d12b4bb 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -127,7 +127,7 @@ public:
 virtual ~SvxStyleBox_Impl();
 
 voidSetFamily( SfxStyleFamily eNewFamily );
-inline bool IsVisible() { return bVisible; }
+boolIsVisible() const { return bVisible; }
 
 virtual boolPreNotify( NotifyEvent rNEvt ) SAL_OVERRIDE;
 virtual boolNotify( NotifyEvent rNEvt ) SAL_OVERRIDE;
@@ -136,10 +136,12 @@ public:
 
 virtual voidUserDraw( const UserDrawEvent rUDEvt ) SAL_OVERRIDE;
 
-inline void SetVisibilityListener( const Link aVisListener ) { 
aVisibilityListener = aVisListener; }
+voidSetVisibilityListener( const Link aVisListener ) { 
aVisibilityListener = aVisListener; }
 
 voidSetDefaultStyle( const OUString rDefault ) { 
sDefaultStyle = rDefault; }
 
+voidCalcOptimalExtraUserWidth();
+
 protected:
 virtual voidSelect() SAL_OVERRIDE;
 
@@ -162,6 +164,9 @@ private:
 
 voidReleaseFocus();
 Color   TestColorsVisible(const Color FontCol, const Color 
BackCol);
+voidUserDrawEntry(const UserDrawEvent rUDEvt, const OUString 
rStyleName);
+voidSetupEntry(sal_uInt16 nItem, const Rectangle rRect, 
OutputDevice *pDevice, const OUString rStyleName, bool bIsNotSelected);
+boolAdjustFontForItemHeight(OutputDevice* pDevice, Rectangle 
rTextRect, long nHeight);
 DECL_LINK( MenuSelectHdl, Menu * );
 };
 
@@ -299,6 +304,9 @@ class SfxStyleControllerItem_Impl : public SfxStatusListener
 SvxStyleToolBoxControl rControl;
 };
 
+#define BUTTON_WIDTH 20
+#define ITEM_HEIGHT 30
+
 SvxStyleBox_Impl::SvxStyleBox_Impl(vcl::Window* pParent,
const OUString rCommand,
SfxStyleFamily eFamily,
@@ -326,7 +334,7 @@ SvxStyleBox_Impl::SvxStyleBox_Impl(vcl::Window* pParent,
 aLogicalSize = PixelToLogic( GetSizePixel(), MAP_APPFONT );
 EnableAutocomplete( true );
 EnableUserDraw( true );
-SetUserItemSize( Size( 0, 30 ) );
+SetUserItemSize( Size( 0, ITEM_HEIGHT ) );
 }
 
 SvxStyleBox_Impl::~SvxStyleBox_Impl()
@@ -550,18 +558,51 @@ void SvxStyleBox_Impl::StateChanged( StateChangedType 
nStateChange )
 }
 }
 
-void SvxStyleBox_Impl::UserDraw( const UserDrawEvent rUDEvt )
+bool SvxStyleBox_Impl::AdjustFontForItemHeight(OutputDevice* pDevice, 
Rectangle rTextRect, long nHeight)
 {
-sal_uInt16 nItem = rUDEvt.GetItemId();
+if (rTextRect.Bottom()  nHeight)
+{
+// the text does not fit, adjust the font size
+double ratio = static_cast double ( nHeight ) / rTextRect.Bottom();
+vcl::Font aFont(pDevice-GetFont());
+Size aPixelSize(aFont.GetSize());
+aPixelSize.Width() *= ratio;
+aPixelSize.Height() *= ratio;
+aFont.SetSize(aPixelSize);
+pDevice-SetFont(aFont);
+return true;
+}
+return false;
+}
+
+void SvxStyleBox_Impl::UserDrawEntry(const UserDrawEvent rUDEvt, const 
OUString rStyleName)
+{
+OutputDevice *pDevice = rUDEvt.GetDevice();
+
+// IMG_TXT_DISTANCE in ilstbox.hxx is 6, then 1 is added as
+// nBorder, and we are adding 1 in order to look better when
+// italics is present
+const int nLeftDistance = 8;
+
+

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

2015-04-15 Thread Michael Stahl
 svx/source/core/extedit.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 16547edcaf1d7e260bb5e1d9d48b35f58514647c
Author: Michael Stahl mst...@redhat.com
Date:   Tue Apr 14 23:40:06 2015 +0200

tdf#89750: svx: fix ExternalToolEdit on Windows

While adding check that the temp file move succeeds, overlooked that the
file handle is actually leaked, which means the move will fail on WNT
because the file is already open.

(regression from ef490df2119523e1761f99b5fdbb387c2c71608d)

Change-Id: I779ccde79871930fef3bad7e17b633fb62e36a46
(cherry picked from commit 582cdc273ec0e91d27be8a7893994acadf4d7d18)
Reviewed-on: https://gerrit.libreoffice.org/15315
Tested-by: David Tardon dtar...@redhat.com
Reviewed-by: David Tardon dtar...@redhat.com

diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx
index 1511fdf..67bd9f0 100644
--- a/svx/source/core/extedit.cxx
+++ b/svx/source/core/extedit.cxx
@@ -113,9 +113,8 @@ void ExternalToolEdit::Edit(GraphicObject const*const 
pGraphicObject)
 OUString aTempFileBase;
 OUString aTempFileName;
 
-oslFileHandle pHandle;
 osl::FileBase::RC rc =
-osl::FileBase::createTempFile(0, pHandle, aTempFileBase);
+osl::FileBase::createTempFile(nullptr, nullptr, aTempFileBase);
 if (osl::FileBase::E_None != rc)
 {
 SAL_WARN(svx, ExternalToolEdit::Edit: cannot create temp file);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-04-14 Thread Michael Stahl
 svx/source/unodraw/unobrushitemhelper.cxx  |   27 -
 sw/qa/extras/odfimport/data/PageBackground.odt |binary
 sw/qa/extras/odfimport/odfimport.cxx   |6 +
 3 files changed, 20 insertions(+), 13 deletions(-)

New commits:
commit ac8be3d609a219c62713d37d22f8fef0115809f1
Author: Michael Stahl mst...@redhat.com
Date:   Tue Apr 14 16:25:42 2015 +0200

tdf#89478: svx: ODF import: SvxBrushItem Graphics should override Color

The bugdoc has:

style:page-layout-properties fo:background-color=#007f7f 
style:background-image
 xlink:href=Pictures/20392FA355F455EC9F63.svm/
/style:page-layout-properties

In this case it's clearly better to prefer the Graphics.

The old code could actually store both in the model but the UI only
allows setting either Color or Graphic, so this should be good enough.

(regression from 7d9bb549d498d6beed2c4050c402d09643febdfa)

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

diff --git a/svx/source/unodraw/unobrushitemhelper.cxx 
b/svx/source/unodraw/unobrushitemhelper.cxx
index 4a2ec1d..d10aab6 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -50,19 +50,8 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const 
SvxBrushItem rBrush, SfxI
 
 const sal_uInt8 nTransparency(rBrush.GetColor().GetTransparency());
 
-if(0xff != nTransparency)
-{
-// we have a color fill
-const Color aColor(rBrush.GetColor().GetRGBColor());
-
-rToSet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
-rToSet.Put(XFillColorItem(OUString(), aColor));
-
-// #125189# nTransparency is in range [0..254], convert to [0..100] 
which is used in
-// XFillTransparenceItem (caution with the range which is in an 
*item-specific* range)
-rToSet.Put(XFillTransparenceItemsal_Int32)nTransparency * 100) + 
127) / 254));
-}
-else if(GPOS_NONE != rBrush.GetGraphicPos())
+// tdf#89478 check for image first
+if (GPOS_NONE != rBrush.GetGraphicPos())
 {
 // we have a graphic fill, set fill style
 rToSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
@@ -131,6 +120,18 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const 
SvxBrushItem rBrush, SfxI
 rToSet.Put(XFillTransparenceItem(nGraphicTransparency));
 }
 }
+else if (0xff != nTransparency)
+{
+// we have a color fill
+const Color aColor(rBrush.GetColor().GetRGBColor());
+
+rToSet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
+rToSet.Put(XFillColorItem(OUString(), aColor));
+
+// #125189# nTransparency is in range [0..254], convert to [0..100] 
which is used in
+// XFillTransparenceItem (caution with the range which is in an 
*item-specific* range)
+rToSet.Put(XFillTransparenceItemsal_Int32)nTransparency * 100) + 
127) / 254));
+}
 else
 {
 // GPOS_NONE == rBrush.GetGraphicPos()  0xff == 
rBrush.GetColor().GetTransparency(),
diff --git a/sw/qa/extras/odfimport/data/PageBackground.odt 
b/sw/qa/extras/odfimport/data/PageBackground.odt
index dbb1082..3733d5b 100644
Binary files a/sw/qa/extras/odfimport/data/PageBackground.odt and 
b/sw/qa/extras/odfimport/data/PageBackground.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx 
b/sw/qa/extras/odfimport/odfimport.cxx
index a4de654..5db4370 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -315,6 +315,12 @@ DECLARE_ODFIMPORT_TEST(testPageBackground, 
PageBackground.odt)
 CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, 
getPropertydrawing::FillStyle(xPropertySet, FillStyle));
 CPPUNIT_ASSERT_EQUAL(OUString(Sky), getPropertyOUString(xPropertySet, 
FillBitmapName));
 CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_REPEAT, 
getPropertydrawing::BitmapMode(xPropertySet, FillBitmapMode));
+
+uno::Referencebeans::XPropertySet 
xPropertySetOld(getStyles(PageStyles)-getByName(OldStandard), 
uno::UNO_QUERY);
+// The background image was overridden by color
+CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, 
getPropertydrawing::FillStyle(xPropertySetOld, FillStyle));
+CPPUNIT_ASSERT_EQUAL(OUString(Sky), 
getPropertyOUString(xPropertySetOld, FillBitmapName));
+CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_REPEAT, 
getPropertydrawing::BitmapMode(xPropertySetOld, FillBitmapMode));
 }
 
 DECLARE_ODFIMPORT_TEST(testFdo56272, fdo56272.odt)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-04-13 Thread Caolán McNamara
 svx/source/engine3d/scene3d.cxx |9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit fa316c6459d40d97fab52881cdff94d2cbab0c91
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Apr 13 15:51:43 2015 +0100

Resolves: tdf#90583 3D pie-chart missing guide handles

partial revert of

commit db1d2af02861b49e4f53d726d59cd71c20cee9b1
Author: Armin Le Grand a...@apache.org
Date:   Tue Feb 18 21:18:13 2014 +

Resolves: #i123539# some optimizations for 3D chart...

geometry creation using UNO API

(cherry picked from commit bbe35be767d76d08891c4f3d3600d80e0e6805f2)

Change-Id: If35f05fb62230e90cfc43a0beac053e8a87820d4
(cherry picked from commit bca8d8985666d3fd22b91eb280f9baaeb933c2d0)
Reviewed-on: https://gerrit.libreoffice.org/15283
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index 71eda45..5aaa03b 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -380,14 +380,7 @@ void E3dScene::NewObjectInserted(const E3dObject* p3DObj)
 void E3dScene::StructureChanged()
 {
 E3dObject::StructureChanged();
-
-if(!GetModel() || !GetModel()-isLocked())
-{
-// #i123539# optimization for 3D chart object generation: do not reset
-// already calculated scene projection data every time an object gets
-// initialized
-SetRectsDirty();
-}
+SetRectsDirty();
 
 ImpCleanup3DDepthMapper();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-04-12 Thread Caolán McNamara
 svx/source/accessibility/ChildrenManagerImpl.cxx |   20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

New commits:
commit a025af8f1713a826067a4a351d47d29d1342693f
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Mar 26 11:04:52 2015 +

survive 'enable jre' dialog interrupting CreateAccessibilityObjects

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

diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx 
b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 12e4054..869c5dd 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -276,13 +276,23 @@ void ChildrenManagerImpl::Update (bool 
bCreateNewObjectsOnDemand)
 
 // 6. If children have to be created immediately and not on demand then
 // create the missing accessible objects now.
-if ( ! bCreateNewObjectsOnDemand)
-CreateAccessibilityObjects (maVisibleChildren);
+if (!bCreateNewObjectsOnDemand)
+{
+//operate on a copy of the list and restore it afterwards to guard
+//against the pathological case where maVisibleChildren gets modified
+//by other calls to this object while CreateAccessibilityObjects
+//executes which can happen when java is disabled and the enable-java
+//dialog appears during the instantiation of the linguistic components
+//triggered by the creation of shapes belonging to the a11y objects
+//
+//i.e. launch start-center, launch impress with java disabled and
+//a java-using linguistic component installed
+maVisibleChildren.swap(aChildList);
+CreateAccessibilityObjects(aChildList);
+maVisibleChildren.swap(aChildList);
+}
 }
 
-
-
-
 void ChildrenManagerImpl::CreateListOfVisibleShapes (
 ChildDescriptorListType raDescriptorList)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-03-02 Thread Henry Castro
 svx/source/sdr/contact/viewobjectcontactofgraphic.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 8d50a8286b84a5b7b783c91c81248dc71e94340d
Author: Henry Castro hcvcas...@gmail.com
Date:   Mon Feb 16 14:08:16 2015 -0400

tdf#87820  Images not displayed properly in Calc

Fixed. After opening, images were not displayed properly in Calc 4.3 and 4.4

Change-Id: I1f0dd7e9d332889df81be84a6c1e28a09f509733
Reviewed-on: https://gerrit.libreoffice.org/14505
Reviewed-by: Zolnai Tamás zolnaitamas2...@gmail.com
Tested-by: Zolnai Tamás zolnaitamas2...@gmail.com
(cherry picked from commit 6c84442f99de109b585d3ba8964deb8dcf261c0f)
Reviewed-on: https://gerrit.libreoffice.org/14721

diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx 
b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index c95b42d..4a8f469 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -134,6 +134,9 @@ namespace sdr
 rGrafObj.mbInsidePaint = false;
 }
 
+// Invalidate paint areas.
+GetViewContact().ActionChanged();
+
 bRetval = true;
 }
 }
@@ -186,6 +189,9 @@ namespace sdr
 rGrafObj.mbInsidePaint = false;
 }
 
+// Invalidate paint areas.
+GetViewContact().ActionChanged();
+
 bRetval = 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-4' - svx/source

2015-02-26 Thread Caolán McNamara
 svx/source/svdraw/svdedtv1.cxx |   38 ++
 svx/source/table/cell.cxx  |   15 +--
 2 files changed, 35 insertions(+), 18 deletions(-)

New commits:
commit d97c984dc016e14a9f16a3ae0b865e3f2b78fbc8
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 18 15:04:45 2015 +

Resolves: rhbz#1193971 clear hard-coded char props in table cells...

like we do already for shapes. So now when attempting to set replacement 
char
properties on the entire cell, clear any hard-coded sub ranges within the
existing paragraphs.

This extends the effort of
commit a217f3cb2dce71a4322f78ceb45edb6f171b2b65
Author: Matúš Kukan matus.ku...@collabora.com
Date:   Tue Aug 26 10:16:34 2014 +0200

bnc#770711: Make changing table text color in impress always work

to encompass all character properties, not just color

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

diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 1ba5f40..62c4cff 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -953,6 +953,26 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet rAttr, 
bool bOnlyHardAttr) con
 }
 }
 
+std::vectorsal_uInt16 GetAllCharPropIds(const SfxItemSet rSet)
+{
+std::vectorsal_uInt16 aCharWhichIds;
+{
+SfxItemIter aIter(rSet);
+const SfxPoolItem* pItem=aIter.FirstItem();
+while (pItem!=NULL)
+{
+if (!IsInvalidItem(pItem))
+{
+sal_uInt16 nWhich = pItem-Which();
+if (nWhich=EE_CHAR_START  nWhich=EE_CHAR_END)
+aCharWhichIds.push_back( nWhich );
+}
+pItem=aIter.NextItem();
+}
+}
+return aCharWhichIds;
+}
+
 void SdrEditView::SetAttrToMarked(const SfxItemSet rAttr, bool bReplaceAll)
 {
 if (AreObjectsMarked())
@@ -977,25 +997,11 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet 
rAttr, bool bReplaceAll)
 }
 #endif
 
-// #103836# if the user thets character attributes to the complete 
shape,
+// #103836# if the user sets character attributes to the complete 
shape,
 //  we want to remove all hard set character attributes with 
same
 //  which ids from the text. We do that later but here we 
remember
 //  all character attribute which id's that are set.
-std::vectorsal_uInt16 aCharWhichIds;
-{
-SfxItemIter aIter(rAttr);
-const SfxPoolItem* pItem=aIter.FirstItem();
-while( pItem!=NULL )
-{
-if (!IsInvalidItem(pItem))
-{
-sal_uInt16 nWhich = pItem-Which();
-if (nWhich=EE_CHAR_START  nWhich=EE_CHAR_END)
-aCharWhichIds.push_back( nWhich );
-}
-pItem=aIter.NextItem();
-}
-}
+std::vectorsal_uInt16 aCharWhichIds(GetAllCharPropIds(rAttr));
 
 // To make Undo reconstruct text attributes correctly after 
Format.Standard
 bool bHasEEItems=SearchOutlinerItems(rAttr,bReplaceAll);
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index e81370c..3468283 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -139,6 +139,8 @@ SdrText* CellTextProvider::getText(sal_Int32 nIndex) const
 
 }
 
+extern std::vectorsal_uInt16 GetAllCharPropIds(const SfxItemSet rSet);
+
 namespace sdr
 {
 namespace properties
@@ -261,12 +263,21 @@ namespace sdr
 
 sal_Int32 nParaCount(pOutliner-GetParagraphCount());
 
+// if the user sets character attributes to the complete
+// cell we want to remove all hard set character attributes
+// with same which ids from the text
+std::vectorsal_uInt16 
aCharWhichIds(GetAllCharPropIds(rSet));
+
 for(sal_Int32 nPara = 0; nPara  nParaCount; nPara++)
 {
 SfxItemSet aSet(pOutliner-GetParaAttribs(nPara));
 aSet.Put(rSet);
-if (aSet.GetItemState(EE_CHAR_COLOR, false) == 
SfxItemState::SET)
-pOutliner-RemoveCharAttribs( nPara, EE_CHAR_COLOR 
);
+
+for (std::vectorsal_uInt16::const_iterator aI = 
aCharWhichIds.begin(); aI != aCharWhichIds.end(); ++aI)
+{
+pOutliner-RemoveCharAttribs(nPara, *aI);
+}
+
 pOutliner-SetParaAttribs(nPara, aSet);
 }
 

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

2015-02-13 Thread Eike Rathke
 svx/source/dialog/langbox.cxx |   24 
 1 file changed, 16 insertions(+), 8 deletions(-)

New commits:
commit e0f22bb1db655d86923c16e5c2f7d84489d7a63e
Author: Eike Rathke er...@redhat.com
Date:   Thu Feb 12 23:47:21 2015 +0100

Resolves: tdf#81429 select corresponding listbox entry if not current

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

diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index e8a0128..39cff15 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -716,21 +716,29 @@ IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, 
SvxLanguageComboBox*, /*pEd*/ )
 const sal_Int32 nPos = GetEntryPos( aStr);
 if (nPos != COMBOBOX_ENTRY_NOTFOUND)
 {
-// Advance start of full selection by one so the next character
-// will already continue the string instead of having to type the
-// same character again to start a new string. The selection
-// includes formatting characters and is reverse when obtained from
-// the Edit control.
 Selection aSel( GetSelection());
+
+// Select the corresponding listbox entry if not current. This
+// invalidates the Edit Selection thus has to happen between
+// obtaining the Selection and setting the new Selection.
+sal_Int32 nSelPos = ImplGetSelectEntryPos();
+if (nSelPos != nPos)
+ImplSelectEntryPos( nPos, true);
+
+// If typing into the Edit control led us here, advance start of a
+// full selection by one so the next character will already
+// continue the string instead of having to type the same character
+// again to start a new string. The selection includes formatting
+// characters and is reverse when obtained from the Edit control.
 if (aSel.Max() == 1)
 {
 OUString aText( GetText());
 if (aSel.Min() == aText.getLength())
-{
 ++aSel.Max();
-SetSelection( aSel);
-}
 }
+
+SetSelection( aSel);
+
 meEditedAndValid = EDITED_NO;
 }
 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-4' - svx/source

2015-02-13 Thread David Tardon
 svx/source/svdraw/svdobj.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 600d6eda0028a7b4927547970a9d683a1437e4c8
Author: David Tardon dtar...@redhat.com
Date:   Fri Feb 13 09:55:46 2015 +0100

tdf#60910 don't lose fontwork objects

This reverts commit 0685b2e73e48adb84cd01355d45551ab478ebcd5.

(cherry picked from commit ecf0c4ba89e27cbb8cf7c7dd904cdd0b87dd5f52)

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

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 7eb521e..a683ab2 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -508,7 +508,7 @@ void SdrObject::SetPage(SdrPage* pNewPage)
 // 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  pOldModel != pModel)
+if (pOldPage != pPage  !(pOldPage  pPage  pOldModel == pModel))
 {
 SvxShape* const pShape(getSvxShape());
 if (pShape  !pShape-HasSdrObjectOwnership())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-02-06 Thread Julien Nabet
 svx/source/gallery2/galtheme.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7153844e964f1e8895d6ac7b202147729ede997d
Author: Julien Nabet serval2...@yahoo.fr
Date:   Thu Feb 5 20:10:37 2015 +0100

cppcheck: Returning/dereferencing 'pEntry' after it is deallocated / 
released

Cherry-picked from c20a2234c5cb9cb89611de8a8a34e9d1e7c7a972

Change-Id: If96b66d5bbfcf4426bb602909599cd36e1f3c994
Reviewed-on: https://gerrit.libreoffice.org/14350
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com

diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index cf64448..90f734d 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -477,6 +477,7 @@ bool GalleryTheme::RemoveObject( size_t nPos )
 Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), 
reinterpret_cast sal_uIntPtr ( pEntry ) ) );
 Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), 
reinterpret_cast sal_uIntPtr ( pEntry ) ) );
 delete pEntry;
+pEntry = NULL;
 
 ImplSetModified( true );
 ImplBroadcast( nPos );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-27 Thread Katarina Behrens
 svx/source/sidebar/line/LineWidthControl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit dc636d7265fc7591cdc6dbd0ff402fa80106a6f7
Author: Katarina Behrens bu...@bubli.org
Date:   Tue Jan 27 22:31:20 2015 +0100

tdf#82524: Mismatch of ValueSet and metric field values

Regression from commit ab50bc9d4a72193c1fefcbf0652938995094bc41
which adds space separator between value and unit.

As metric fields now output values with separator, LineWidthValueSet
items must be adjusted accordingly, otherwise they'll never match

Change-Id: I55778c9c0cc36d968a061e5e35b6db3f2a159977
(cherry picked from commit 8fd9c25ac66dd238d4c68be3974241a18cb21705)
Signed-off-by: Andras Timar andras.ti...@collabora.com

diff --git a/svx/source/sidebar/line/LineWidthControl.cxx 
b/svx/source/sidebar/line/LineWidthControl.cxx
index 46830444..f7e1106 100644
--- a/svx/source/sidebar/line/LineWidthControl.cxx
+++ b/svx/source/sidebar/line/LineWidthControl.cxx
@@ -150,6 +150,7 @@ void LineWidthControl::Initialize()
 for(int i = 0; i = 7 ; i++)
 {
 rStr[i] = rStr[i].replace('.', cSep);//Modify
+rStr[i] +=  ;
 rStr[i] += mstrPT;
 }
 //end
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-19 Thread Caolán McNamara
 svx/source/dialog/ruler.src|   22 +++---
 vcl/source/control/tabctrl.cxx |2 +-
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 83cb667fe9ad08ccbb3621b982edcb6fa8e4ab38
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jan 19 15:38:56 2015 +

Resolves: fdo#88417 Dropdown for ruler settings should show radio buttons

This reverts commit 9995222d1141b326197a387cc7897b3971ce9e9a
and additionally converts the ruler settings to radio buttons and not
checkboxes

Conflicts:
vcl/source/control/tabctrl.cxx

Change-Id: Ie0eac5f07729447942065b7f415398165fbf067c
(cherry picked from commit 251737f0dd186b0f169f5ba237e1e8c28a320e00)
Reviewed-on: https://gerrit.libreoffice.org/14017
Tested-by: David Tardon dtar...@redhat.com
Reviewed-by: David Tardon dtar...@redhat.com

diff --git a/svx/source/dialog/ruler.src b/svx/source/dialog/ruler.src
index d100a91..b1942de 100644
--- a/svx/source/dialog/ruler.src
+++ b/svx/source/dialog/ruler.src
@@ -26,67 +26,67 @@ Menu RID_SVXMN_RULER
 MenuItem
 {
 Identifier = ID_MM ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text [ en-US ] = Millimeter ;
 };
 MenuItem
 {
 Identifier = ID_CM ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text [ en-US ] = Centimeter ;
 };
 MenuItem
 {
 Identifier = ID_M ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text [ en-US ] = Meter ;
 };
 MenuItem
 {
 Identifier = ID_KM ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text [ en-US ] = Kilometer ;
 };
 MenuItem
 {
 Identifier = ID_INCH ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text [ en-US ] = Inch ;
 };
 MenuItem
 {
 Identifier = ID_FOOT ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text [ en-US ] = Foot ;
 };
 MenuItem
 {
 Identifier = ID_MILE ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text [ en-US ] = Miles ;
 };
 MenuItem
 {
 Identifier = ID_POINT ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text [ en-US ] = Point ;
 };
 MenuItem
 {
 Identifier = ID_PICA ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text [ en-US ] = Pica ;
 };
 MenuItem
 {
 Identifier = ID_CHAR ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text[ en-US ] = Char ;
 };
 MenuItem
 {
 Identifier = ID_LINE ;
-Checkable = TRUE ;
+RadioCheck = TRUE ;
 Text[ en-US ] = Line ;
 };
 };
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 2fb87dc..950377e 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1448,7 +1448,7 @@ void TabControl::Command( const CommandEvent rCEvt )
 for( std::vector ImplTabItem ::iterator it = 
mpTabCtrlData-maItemList.begin();
  it != mpTabCtrlData-maItemList.end(); ++it )
 {
-aMenu.InsertItem( it-mnId, it-maText, 
MenuItemBits::CHECKABLE );
+aMenu.InsertItem( it-mnId, it-maText, 
MenuItemBits::CHECKABLE | MenuItemBits::RADIOCHECK );
 if ( it-mnId == mnCurPageId )
 aMenu.CheckItem( it-mnId );
 aMenu.SetHelpId( it-mnId, it-maHelpId );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-19 Thread Michael Stahl
 svx/source/core/extedit.cxx |   16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit ef490df2119523e1761f99b5fdbb387c2c71608d
Author: Michael Stahl mst...@redhat.com
Date:   Mon Jan 19 12:31:03 2015 +0100

svx: ExternalToolEdit: check that temp file is actually created

(cherry picked from commit c8ae30a720474db8efed3db31348f8ae52c149c3)

Conflicts:
svx/source/core/extedit.cxx

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

diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx
index 14d12b1..e32b163 100644
--- a/svx/source/core/extedit.cxx
+++ b/svx/source/core/extedit.cxx
@@ -106,11 +106,23 @@ void ExternalToolEdit::Edit(GraphicObject const*const 
pGraphicObject)
 OUString aTempFileName;
 
 oslFileHandle pHandle;
-osl::FileBase::createTempFile(0, pHandle, aTempFileBase);
+osl::FileBase::RC rc =
+osl::FileBase::createTempFile(0, pHandle, aTempFileBase);
+if (osl::FileBase::E_None != rc)
+{
+SAL_WARN(svx, ExternalToolEdit::Edit: cannot create temp file);
+return;
+}
 
 // Move it to a file name with image extension properly set
 aTempFileName = aTempFileBase + OUString('.') + OUString(fExtension);
-osl::File::move(aTempFileBase, aTempFileName);
+// FIXME: this is pretty stupid, need a better osl temp file API
+rc = osl::File::move(aTempFileBase, aTempFileName);
+if (osl::FileBase::E_None != rc)
+{
+SAL_WARN(svx, ExternalToolEdit::Edit: cannot move temp file);
+return;
+}
 
 //Write Graphic to the Temp File
 GraphicFilter rGraphicFilter = GraphicFilter::GetGraphicFilter();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-19 Thread Michael Stahl
 svx/source/core/extedit.cxx |   14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit b55ec68268f72eee291cef29731b59c8c83af361
Author: Michael Stahl mst...@redhat.com
Date:   Mon Jan 19 12:36:21 2015 +0100

svx: ExternalToolEdit: don't terminate if SystemShellExecute throws

(cherry picked from commit 5e4dc857252c8eeaaa629af2fb6b392ab02036cf)

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

diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx
index e32b163..1511fdf 100644
--- a/svx/source/core/extedit.cxx
+++ b/svx/source/core/extedit.cxx
@@ -87,9 +87,17 @@ public:
 
 void ExternalToolEditThread::execute()
 {
-ReferenceXSystemShellExecute xSystemShellExecute(
-SystemShellExecute::create( ::comphelper::getProcessComponentContext() 
) );
-xSystemShellExecute-execute(m_aFileName, OUString(), 
SystemShellExecuteFlags::URIS_ONLY);
+try
+{
+ReferenceXSystemShellExecute const xSystemShellExecute(
+SystemShellExecute::create( 
::comphelper::getProcessComponentContext()));
+xSystemShellExecute-execute(m_aFileName, OUString(),
+SystemShellExecuteFlags::URIS_ONLY);
+}
+catch (Exception const e)
+{
+SAL_WARN(svx, ExternalToolEditThread: exception:   e.Message);
+}
 }
 
 void ExternalToolEdit::Edit(GraphicObject const*const pGraphicObject)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-07 Thread Lionel Elie Mamane
 svx/source/fmcomp/gridcell.cxx |   19 ---
 svx/source/inc/gridcell.hxx|1 -
 2 files changed, 4 insertions(+), 16 deletions(-)

New commits:
commit fdf69336eb52905113e1d9e6e453ae4e655e2aba
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Sun Dec 21 18:44:26 2014 +0100

fdo#87555 ComboBox in table should use same formatting as floating ComboBox

Same as fdo#67615 for TexFields, but for ComboBox.
Same problem, same cause, same solution.
ListBox seems not to have this problem :)

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

diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index c7a2184..25aa9f8 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2407,7 +2407,6 @@ bool DbTimeField::commitControl()
 
 DbComboBox::DbComboBox(DbGridColumn _rColumn)
:DbCellControl(_rColumn)
-   ,m_nKeyType(::com::sun::star::util::NumberFormat::UNDEFINED)
 {
 setAlignedController( false );
 
@@ -2479,9 +2478,6 @@ void DbComboBox::Init( vcl::Window rParent, const 
Reference XRowSet  xCursor
 SetList( xModel-getPropertyValue( FM_PROP_STRINGITEMLIST ) );
 implAdjustGenericFieldSetting( xModel );
 
-if (m_rColumn.GetParent().getNumberFormatter().is())
-m_nKeyType  = 
comphelper::getNumberFormatType(m_rColumn.GetParent().getNumberFormatter()-getNumberFormatsSupplier()-getNumberFormats(),
 m_rColumn.GetKey());
-
 DbCellControl::Init( rParent, xCursor );
 }
 
@@ -2494,17 +2490,10 @@ CellControllerRef DbComboBox::CreateController() const
 
 OUString DbComboBox::GetFormatText(const Reference 
::com::sun::star::sdb::XColumn  _rxField, const Reference XNumberFormatter 
 xFormatter, Color** /*ppColor*/)
 {
-OUString aString;
-if (_rxField.is())
-try
-{
-aString = getFormattedValue( _rxField, xFormatter, 
m_rColumn.GetParent().getNullDate(), m_rColumn.GetKey(), m_nKeyType );
-}
-catch( const Exception )
-{
-DBG_UNHANDLED_EXCEPTION();
-}
-return aString;
+const com::sun::star::uno::Referencecom::sun::star::beans::XPropertySet 
xPS(_rxField, UNO_QUERY);
+::dbtools::FormattedColumnValue fmter( xFormatter, xPS );
+
+return fmter.getFormattedValue();
 }
 
 
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 5d23f19..8d1ddf9 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -467,7 +467,6 @@ protected:
 
 class DbComboBox : public DbCellControl
 {
-sal_Int16 m_nKeyType;
 
 public:
 TYPEINFO_OVERRIDE();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-07 Thread Lionel Elie Mamane
 svx/source/svdraw/svdobj.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dc391e9229f3670e1ca53b017914b840be208ada
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 19 23:25:21 2014 +0100

Assume that as long as the model is the same, the shape doesn't change.

Even if it is moved from not a page to a page or vice-versa.
This allows assumptions made in the Base Form wizard to hold,
namely that if one:
1) Creates controls (and their associated shapes)
2) Groups the shapes (in a GroupShape)
Then all the shapes still remember their associated control
and vice-versa.

Change-Id: I31975970e7ea2f7978aea7f753de88ecd8e55234
Reviewed-on: https://gerrit.libreoffice.org/13559
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 a683ab2..7eb521e 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -508,7 +508,7 @@ void SdrObject::SetPage(SdrPage* pNewPage)
 // 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))
+if (pOldPage != pPage  pOldModel != pModel)
 {
 SvxShape* const pShape(getSvxShape());
 if (pShape  !pShape-HasSdrObjectOwnership())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-12-25 Thread Zolnai Tamás
 svx/source/svdraw/svdograf.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ced7bcbf53c302a5fd0203216a1b4fda18059f6f
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Mon Dec 8 03:11:18 2014 +0100

Copying linked graphic between components is broken

IsLinkedGraphic() is better to use here.

Reproducer steps:
-Insert an image to Impress as a link.
-Copy this image (CTRL+C  CTRL+V) to Writer.
Result: Image is not displayed.

Change-Id: Iaf9b686b5c87caf5a0cc15425f8c5988f857bfe6
(cherry picked from commit 3650b66c366177877d30f6aae83a33bf683d3457)
Reviewed-on: https://gerrit.libreoffice.org/13609
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 712a5e1..1a27c4c 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -840,7 +840,7 @@ SdrGrafObj SdrGrafObj::operator=( const SdrGrafObj rObj )
 aFilterName = rObj.aFilterName;
 bMirrored = rObj.bMirrored;
 
-if( rObj.pGraphicLink != NULL)
+if( rObj.IsLinkedGraphic() )
 {
 SetGraphicLink( aFileName, rObj.aReferer, aFilterName );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-12-22 Thread Caolán McNamara
 svx/source/dialog/_contdlg.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 1fa4783084d495eda9b0cfcab18b193ce3183a4a
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Dec 22 10:26:54 2014 +

Resolves: fdo#87422 set autocheck bits

Change-Id: I8db4242f083a10bf8753f078002ff8676264b54c
(cherry picked from commit c47d039fc80c0e42b14b567af843b2523af9e8bf)

diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 9b471b4..3f76398 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -219,18 +219,27 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings 
*_pBindings, SfxChildWindow *
 
 mnApplyId = m_pTbx1-GetItemId(TBI_APPLY);
 mnWorkSpaceId = m_pTbx1-GetItemId(TBI_WORKPLACE);
+m_pTbx1-SetItemBits(mnWorkSpaceId, ToolBoxItemBits::AUTOCHECK);
 mnSelectId = m_pTbx1-GetItemId(TBI_SELECT);
+m_pTbx1-SetItemBits(mnSelectId, ToolBoxItemBits::RADIOCHECK | 
ToolBoxItemBits::AUTOCHECK);
 mnRectId = m_pTbx1-GetItemId(TBI_RECT);
+m_pTbx1-SetItemBits(mnRectId, ToolBoxItemBits::RADIOCHECK | 
ToolBoxItemBits::AUTOCHECK);
 mnCircleId = m_pTbx1-GetItemId(TBI_CIRCLE);
+m_pTbx1-SetItemBits(mnCircleId, ToolBoxItemBits::RADIOCHECK | 
ToolBoxItemBits::AUTOCHECK);
 mnPolyId = m_pTbx1-GetItemId(TBI_POLY);
+m_pTbx1-SetItemBits(mnPolyId, ToolBoxItemBits::RADIOCHECK | 
ToolBoxItemBits::AUTOCHECK);
 mnPolyEditId = m_pTbx1-GetItemId(TBI_POLYEDIT);
+m_pTbx1-SetItemBits(mnPolyEditId, ToolBoxItemBits::AUTOCHECK);
 mnPolyMoveId = m_pTbx1-GetItemId(TBI_POLYMOVE);
+m_pTbx1-SetItemBits(mnPolyMoveId, ToolBoxItemBits::RADIOCHECK | 
ToolBoxItemBits::AUTOCHECK);
 mnPolyInsertId = m_pTbx1-GetItemId(TBI_POLYINSERT);
+m_pTbx1-SetItemBits(mnPolyInsertId, ToolBoxItemBits::RADIOCHECK | 
ToolBoxItemBits::AUTOCHECK);
 mnPolyDeleteId = m_pTbx1-GetItemId(TBI_POLYDELETE);
 mnAutoContourId = m_pTbx1-GetItemId(TBI_AUTOCONTOUR);
 mnUndoId = m_pTbx1-GetItemId(TBI_UNDO);
 mnRedoId = m_pTbx1-GetItemId(TBI_REDO);
 mnPipetteId = m_pTbx1-GetItemId(TBI_PIPETTE);
+m_pTbx1-SetItemBits(mnPipetteId, ToolBoxItemBits::AUTOCHECK);
 
 SvxContourDlg::SetSuperClass( *this );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-12-15 Thread Andras Timar
 svx/source/dialog/linkwarn.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 935bb47c1ac4d8fc0ccda475c531ff7cd9d97e35
Author: Andras Timar andras.ti...@collabora.com
Date:   Mon Dec 15 10:19:14 2014 +0100

fdo#87292 use system dependent path instead of file URL

Change-Id: I3da4cd7af16a8ecfb19ce23e01117e735e9dd8d6
(cherry picked from commit efe3e06dd1b99215d82b6373aa7434a8f25a22f2)

diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx
index 6ecced4..9015d1a 100644
--- a/svx/source/dialog/linkwarn.cxx
+++ b/svx/source/dialog/linkwarn.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include osl/file.hxx
 #include svx/linkwarn.hxx
 #include svtools/miscopt.hxx
 
@@ -27,7 +28,10 @@ SvxLinkWarningDialog::SvxLinkWarningDialog( vcl::Window* 
pParent, const OUString
 
 // replace filename
 OUString sInfoText = get_primary_text();
-sInfoText = sInfoText.replaceAll(%FILENAME, _rFileName);
+OUString aPath;
+if ( osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL( 
_rFileName, aPath ) )
+aPath = _rFileName;
+sInfoText = sInfoText.replaceAll(%FILENAME, aPath);
 set_primary_text( sInfoText );
 
 // load state of warning on checkbox from misc options
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-12-09 Thread David Tardon
 svx/source/unodraw/UnoGraphicExporter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a87db12c78d073dbfea50c833c25360285787054
Author: David Tardon dtar...@redhat.com
Date:   Tue Dec 9 22:12:03 2014 +0100

fdo#37682 paint the right area

Change-Id: Ic3d1f6e47bf068e60dca711c97e3f6b194d14049
(cherry picked from commit a68a7b831a5d1756ea9428e12bb89f69dc30950f)

diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx 
b/svx/source/unodraw/UnoGraphicExporter.cxx
index ad1be54..3155a13 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -763,7 +763,7 @@ bool GraphicExporter::GetGraphic( ExportSettings 
rSettings, Graphic aGraphic,
 // Use new StandardCheckVisisbilityRedirector
 ImplExportCheckVisisbilityRedirector aRedirector( 
mpCurrentPage );
 
-pView-CompleteRedraw(aVDev, vcl::Region(Rectangle(Point(), 
aNewSize)), aRedirector);
+pView-CompleteRedraw(aVDev, vcl::Region(Rectangle(aNewOrg, 
aNewSize)), aRedirector);
 
 aVDev.Pop();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-27 Thread Maxim Monastirsky
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 16bfe15d9175f52030bcb1265f8f48728786f910
Author: Maxim Monastirsky momonas...@gmail.com
Date:   Wed Nov 26 22:26:39 2014 +0200

sidebar: Try to fix initial spacing values

Process SID_ATTR_METRIC status before any other,
and call SetMax methods before SetValue, so indent
values won't be truncated by a wrong max value.

Change-Id: I36d8c0cce9561902aa2c4d531740f56c80207012
(cherry picked from commit 9a410f9cedbce5276aea48479812ff68210712b0)

diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx 
b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 2867a5c..0cfc697 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -568,7 +568,6 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 
/*nSID*/, SfxItemStat
 
 long nVal = OutputDevice::LogicToLogic( maTxtLeft, 
(MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
 nVal = (long)mpLeftIndent-Normalize( (long)nVal );
-mpLeftIndent-SetValue( nVal, FUNIT_100TH_MM );
 
 if ( maContext.GetCombinedContext_DI() != 
CombinedEnumContext(Application_WriterVariants, Context_Text)
   maContext.GetCombinedContext_DI() != 
CombinedEnumContext(Application_WriterVariants, Context_Default)
@@ -579,11 +578,6 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 
/*nSID*/, SfxItemStat
 
 long nrVal = OutputDevice::LogicToLogic( aTxtRight, 
(MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
 nrVal = (long)mpRightIndent-Normalize( (long)nrVal );
-mpRightIndent-SetValue( nrVal, FUNIT_100TH_MM );
-
-long nfVal = OutputDevice::LogicToLogic( aTxtFirstLineOfst, 
(MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
-nfVal = (long)mpFLineIndent-Normalize( (long)nfVal );
-mpFLineIndent-SetValue( nfVal, FUNIT_100TH_MM );
 
 switch (maContext.GetCombinedContext_DI())
 {
@@ -610,6 +604,13 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 
/*nSID*/, SfxItemStat
 }
 }
 
+mpLeftIndent-SetValue( nVal, FUNIT_100TH_MM );
+mpRightIndent-SetValue( nrVal, FUNIT_100TH_MM );
+
+long nfVal = OutputDevice::LogicToLogic( aTxtFirstLineOfst, 
(MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
+nfVal = (long)mpFLineIndent-Normalize( (long)nfVal );
+mpFLineIndent-SetValue( nfVal, FUNIT_100TH_MM );
+
 mpTbxIndent_IncDec-Enable();
 
 const sal_uInt16 nIdIncrIndent  = 
mpTbxIndent_IncDec-GetItemId(UNO_INCREMENTINDENT);
@@ -843,6 +844,7 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent,
 get(mpTbxUL_IncDec, paraspacing);
 
 initial();
+m_aMetricCtl.RequestUpdate();
 }
 
 } } // end of namespace svx::sidebar
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-24 Thread Caolán McNamara
 svx/source/svdraw/svdview.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 89c2ade7b4eebd2a74d050b6c41ba747e3bb44a1
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Nov 24 09:18:09 2014 +

Revert show pointer_move arrow when passing over an object boundary

revert on 4-4 until figured out the extra piece needed to get this
working nicely with table boundaries

This reverts commit 961ed635515a346a4395b4abf29675e121ddd8ab.

diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 3e95552..784d1e8 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1011,7 +1011,6 @@ Pointer SdrView::GetPreferredPointer(const Point 
rMousePos, const OutputDevice*
 case SDREVENT_BEGCREATEOBJ:
 return aAktCreatePointer;
 case SDREVENT_MARKOBJ:
-return Pointer(POINTER_MOVE);
 case SDREVENT_BEGMARK:
 return Pointer(POINTER_ARROW);
 case SDREVENT_MARKPOINT:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-23 Thread Caolán McNamara
 svx/source/table/tablecontroller.cxx |   44 +--
 1 file changed, 32 insertions(+), 12 deletions(-)

New commits:
commit 8479c32f7e31aa6e23ca776323fa8721f6faeed0
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Nov 20 15:53:14 2014 +

Resolves: fdo#86466 Wrong background color shown in format table in impress

regression from

commit 440e2031ce8cffc8dc573e359a330236f9c11dfb
bnc#882627: Allow to edit spacing to contents even with no borders 
visible.

which was an attempt to fix regression from

commit 9e5342509b302ba1f816f21cc3ad1cb7093982e0
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.

Now format color shows the expected color, and loading the sample for
bnc#882627 and selecting cells and changing the border distance (etc) 
doesn't
cause bulleting and paragraph alignment properties to be stripped away

Change-Id: Id414e09faa221d151f393971654b17bbe9f46d81
(cherry picked from commit e91ab2104b62b689dca2c565cd81a8cb40885822)
Reviewed-on: https://gerrit.libreoffice.org/13018
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index f5b4c99..c028a2a 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -856,6 +856,19 @@ void SvxTableController::onSelect( sal_uInt16 nSId )
 }
 }
 
+namespace
+{
+SvxBoxItem mergeDrawinglayerTextDistancesAndSvxBoxItem(const SfxItemSet 
rAttrSet)
+{
+// merge drawing layer text distance items into SvxBoxItem used by the 
dialog
+SvxBoxItem aBoxItem( static_cast const SvxBoxItem ( rAttrSet.Get( 
SDRATTR_TABLE_BORDER ) ) );
+aBoxItem.SetDistance( sal::static_int_cast sal_uInt16 ( 
static_castconst 
SdrMetricItem(rAttrSet.Get(SDRATTR_TEXT_LEFTDIST)).GetValue()), BOX_LINE_LEFT 
);
+aBoxItem.SetDistance( sal::static_int_cast sal_uInt16 ( 
static_castconst 
SdrMetricItem(rAttrSet.Get(SDRATTR_TEXT_RIGHTDIST)).GetValue()), 
BOX_LINE_RIGHT );
+aBoxItem.SetDistance( sal::static_int_cast sal_uInt16 ( 
static_castconst 
SdrMetricItem(rAttrSet.Get(SDRATTR_TEXT_UPPERDIST)).GetValue()), BOX_LINE_TOP 
);
+aBoxItem.SetDistance( sal::static_int_cast sal_uInt16 ( 
static_castconst 
SdrMetricItem(rAttrSet.Get(SDRATTR_TEXT_LOWERDIST)).GetValue()), 
BOX_LINE_BOTTOM );
+return aBoxItem;
+}
+}
 
 void SvxTableController::onFormatTable( SfxRequest rReq )
 {
@@ -870,15 +883,11 @@ void SvxTableController::onFormatTable( SfxRequest rReq )
 SfxItemSet aNewAttr( pTableObj-GetModel()-GetItemPool() );
 
 // merge drawing layer text distance items into SvxBoxItem used by the 
dialog
-SvxBoxItem aBoxItem( static_cast const SvxBoxItem ( aNewAttr.Get( 
SDRATTR_TABLE_BORDER ) ) );
-aBoxItem.SetDistance( sal::static_int_cast sal_uInt16 ( 
static_castconst 
SdrMetricItem(aNewAttr.Get(SDRATTR_TEXT_LEFTDIST)).GetValue()), BOX_LINE_LEFT 
);
-aBoxItem.SetDistance( sal::static_int_cast sal_uInt16 ( 
static_castconst 
SdrMetricItem(aNewAttr.Get(SDRATTR_TEXT_RIGHTDIST)).GetValue()), 
BOX_LINE_RIGHT );
-aBoxItem.SetDistance( sal::static_int_cast sal_uInt16 ( 
static_castconst 
SdrMetricItem(aNewAttr.Get(SDRATTR_TEXT_UPPERDIST)).GetValue()), BOX_LINE_TOP 
);
-aBoxItem.SetDistance( sal::static_int_cast sal_uInt16 ( 
static_castconst 
SdrMetricItem(aNewAttr.Get(SDRATTR_TEXT_LOWERDIST)).GetValue()), 
BOX_LINE_BOTTOM );
+SvxBoxItem 
aBoxItem(mergeDrawinglayerTextDistancesAndSvxBoxItem(aNewAttr));
 
 SvxBoxInfoItem aBoxInfoItem( static_cast const SvxBoxInfoItem ( 
aNewAttr.Get( SDRATTR_TABLE_BORDER_INNER ) ) );
 
-MergeAttrFromSelectedCells(aNewAttr, true);
+MergeAttrFromSelectedCells(aNewAttr, false);
 FillCommonBorderAttrFromSelectedCells( aBoxItem, aBoxInfoItem );
 aNewAttr.Put( aBoxItem );
 aNewAttr.Put( aBoxInfoItem );
@@ -888,8 +897,21 @@ void SvxTableController::onFormatTable( SfxRequest rReq )
 // Even Cancel Button is returning positive(101) value,
 if( pDlg.get()  ( pDlg-Execute() == RET_OK ) )
 {
-SfxItemSet aNewSet( aNewAttr );
-aNewSet.Put( *(pDlg-GetOutputItemSet ()) );
+SfxItemSet aNewSet( *(pDlg-GetOutputItemSet ()) );
+
+//Only properties that were unchanged by the dialog appear in this
+//itemset.  We had constructed these two properties from other
+//ones, so if they were not changed, then forcible set them back to
+//their originals in the new result set so we can decompose that
+//unchanged state back to their input properties

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

2014-11-22 Thread Andras Timar
 svx/source/tbxctrls/layctrl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 55fc739b05dd9b6875d492f9d69796472b8cffce
Author: Andras Timar andras.ti...@collabora.com
Date:   Sun Nov 23 00:01:07 2014 +0100

some localizations (e.g. Slovenian) need more space for translated button 
text

Change-Id: I407d8d92c9669f606e4f8fbb95a37932f8f14956

diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 54213d1..ce72eb0 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -143,8 +143,8 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, const 
OUString rCmd, const OUStri
 
 SetText( rText );
 
-aTableButton.SetPosSizePixel( Point( mnTablePosX + mnTableCellWidth, 
mnTableHeight + 5 ),
-Size( mnTableWidth - mnTablePosX - 2*mnTableCellWidth, 24 ) );
+aTableButton.SetPosSizePixel( Point( mnTablePosX, mnTableHeight + 5 ),
+Size( mnTableWidth - mnTablePosX, 24 ) );
 aTableButton.SetText( SVX_RESSTR( RID_SVXSTR_MORE ) );
 aTableButton.SetClickHdl( LINK( this, TableWindow, SelectHdl ) );
 aTableButton.Show();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits