[Libreoffice-commits] core.git: include/oox include/svx include/toolkit include/tools sc/inc sc/source sd/inc sd/source sw/inc sw/source

2015-04-15 Thread David Tardon
 include/oox/core/fastparser.hxx|4 +++-
 include/oox/vml/vmlshape.hxx   |2 +-
 include/svx/AccessibleControlShape.hxx |2 +-
 include/svx/gridctrl.hxx   |2 +-
 include/svx/srchdlg.hxx|2 +-
 include/toolkit/awt/vclxwindows.hxx|8 
 include/tools/errinf.hxx   |2 +-
 include/tools/inetstrm.hxx |2 +-
 sc/inc/chgtrack.hxx|   10 +-
 sc/inc/dapiuno.hxx |2 +-
 sc/inc/dbdata.hxx  |2 +-
 sc/inc/queryparam.hxx  |4 ++--
 sc/inc/scmod.hxx   |2 +-
 sc/inc/stlpool.hxx |2 +-
 sc/inc/stlsheet.hxx|2 +-
 sc/inc/userdat.hxx |2 +-
 sc/source/ui/inc/condformatdlg.hxx |2 +-
 sc/source/ui/inc/dbfunc.hxx|2 +-
 sc/source/ui/inc/gridwin.hxx   |2 +-
 sc/source/ui/inc/preview.hxx   |2 +-
 sc/source/ui/inc/prevwsh.hxx   |2 +-
 sc/source/ui/inc/tabvwsh.hxx   |2 +-
 sc/source/ui/inc/transobj.hxx  |2 +-
 sd/inc/CustomAnimationEffect.hxx   |2 +-
 sd/inc/sdmod.hxx   |2 +-
 sd/inc/stlpool.hxx |2 +-
 sd/source/ui/inc/View.hxx  |2 +-
 sd/source/ui/inc/ViewShell.hxx |2 +-
 sw/inc/authfld.hxx |2 +-
 sw/inc/dcontact.hxx|2 +-
 sw/inc/docufld.hxx |   20 ++--
 sw/inc/expfld.hxx  |4 ++--
 sw/inc/flddat.hxx  |2 +-
 sw/inc/flddropdown.hxx |2 +-
 sw/inc/fmtautofmt.hxx  |2 +-
 sw/inc/fmtflcnt.hxx|2 +-
 sw/inc/fmtrfmrk.hxx|2 +-
 sw/inc/modcfg.hxx  |   10 +-
 sw/inc/node.hxx|4 ++--
 sw/inc/reffld.hxx  |2 +-
 sw/inc/swatrset.hxx|2 +-
 sw/inc/txatbase.hxx|2 +-
 sw/inc/txtfld.hxx  |2 +-
 sw/inc/txttxmrk.hxx|2 +-
 sw/inc/unocrsr.hxx |2 +-
 sw/inc/unotbl.hxx  |2 +-
 sw/inc/viscrs.hxx  |2 +-
 sw/source/uibase/inc/chldwrap.hxx  |2 +-
 sw/source/uibase/inc/pview.hxx |2 +-
 49 files changed, 74 insertions(+), 72 deletions(-)

New commits:
commit add2ca7b3ab10ed9d18e60d8e50020168d922836
Author: David Tardon 
Date:   Wed Apr 15 13:36:28 2015 +0200

make more classes dllpublic

... to fix asan+ubsan+dbgutil build

Change-Id: I1400774d383879bbff9bf28251a104cd53bafaed

diff --git a/include/oox/core/fastparser.hxx b/include/oox/core/fastparser.hxx
index 8d41dee..d482799 100644
--- a/include/oox/core/fastparser.hxx
+++ b/include/oox/core/fastparser.hxx
@@ -23,6 +23,8 @@
 #include 
 #include 
 
+#include 
+
 namespace oox {
 struct NamespaceMap;
 class StorageBase;
@@ -40,7 +42,7 @@ namespace core {
 /** Wrapper for a fast SAX parser that works on automatically generated OOXML
 token and namespace identifiers.
  */
-class FastParser
+class OOX_DLLPUBLIC FastParser
 {
 public:
 explicitFastParser(
diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx
index 6cc180c..a9d506e 100644
--- a/include/oox/vml/vmlshape.hxx
+++ b/include/oox/vml/vmlshape.hxx
@@ -114,7 +114,7 @@ struct OOX_DLLPUBLIC ShapeTypeModel
 
 /** A shape template contains all formatting properties of shapes and can serve
 as templates for several shapes in a drawing. */
-class ShapeType
+class OOX_DLLPUBLIC ShapeType
 {
 public:
 explicitShapeType( Drawing& rDrawing );
diff --git a/include/svx/AccessibleControlShape.hxx 
b/include/svx/AccessibleControlShape.hxx
index e19cf14..f7543e6 100644
--- a/include/svx/AccessibleControlShape.hxx
+++ b/include/svx/AccessibleControlShape.hxx
@@ -48,7 +48,7 @@ namespace accessibility {
 >   AccessibleControlShape_Base;
 /** @descr
 */
-class AccessibleControlShape
+class SVX_DLLPUBLIC AccessibleControlShape
 :public AccessibleShape
 ,public AccessibleControlShape_Base
 {
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index e50c6e5..ff8f83b 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -61,7 +61,7 @@ enum GridRowStatus
 // DbGridRow, description of rows
 
 
-class DbGridRow : public SvRefBase
+class SVX_DLLPUBLIC DbGridRow : public SvRefBase
 {
 ::com::sun::star::uno::Any  m_aBookmark;// Bookmark of the row, 
can be set
 DbDataColumns   m_aVariants;
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 15d221b..4cc4662 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -111,7 +111,7 @@ public:
 

LibreOffice Gerrit News for core on 2015-04-16

2015-04-15 Thread gerrit
Moin!

* Open changes on master for project core changed in the last 25 hours:

 First time contributors doing great things! 
+ Breeze: point fixes
  in https://gerrit.libreoffice.org/15337 from Andreas Kainz
  about module icon-themes
+ Breeze: modifications and missing icons
  in https://gerrit.libreoffice.org/15338 from Andreas Kainz
  about module icon-themes
+ enhancement : tdf#90225 Cannot open compressed csv files from calc
  in https://gerrit.libreoffice.org/15108 from Dennis Francis
  about module build, config_host, filter, include, sc, tools
+ mediawiki: colored text in paragraphs
  in https://gerrit.libreoffice.org/15328 from Robert Antoni Buj i Gelonch
  about module swext
+ add kde5 build of vcl
  in https://gerrit.libreoffice.org/15327 from Jonathan Riddell
  about module build, vcl
+ tdf#90494-Add new Attribute for exporting gradient angle diagonally
  in https://gerrit.libreoffice.org/15323 from Heena Gupta
  about module cui, drawinglayer, include, offapi, sfx2, svx, xmloff
+ tdf#63416 Do not sort header in autofilter if user has chosen one in dial
  in https://gerrit.libreoffice.org/15277 from Scito
  about module sc
+ tdf#89394. fix hangs because of unavailable Windows UNC path.
  in https://gerrit.libreoffice.org/15311 from Jan K.
  about module unotools
 End of freshness 

+ WIP: make all SwUnoCrsrs ref-counted
  in https://gerrit.libreoffice.org/15336 from Björn Michaelsen
  about module sw
+ tdf#72361 Forced intercept for exponentiial trendline
  in https://gerrit.libreoffice.org/15334 from Laurent BP
  about module chart2
+ Do not clobber configure output with gnutls
  in https://gerrit.libreoffice.org/15333 from Tomáš Chvátal
  about module build
+ fdo#50950 make Calc functions (ISO)WEEKNUM comply with ODFF1.2
  in https://gerrit.libreoffice.org/12089 from Winfried Donkers
  about module formula, include, sc, scaddins


* Merged changes on master for project core changed in the last 25 hours:

+ move unocrsr to unocore
  in https://gerrit.libreoffice.org/15335 from Björn Michaelsen
+ convert LOCKFILE_ constants to scoped enum and cleanup
  in https://gerrit.libreoffice.org/15304 from Noel Grandin
+ convert TXTFORMAT constants to scoped enum
  in https://gerrit.libreoffice.org/15303 from Noel Grandin
+ convert SFX_ITEM constants to scoped enum
  in https://gerrit.libreoffice.org/15302 from Noel Grandin
+ convert SIGNATURESTATE_ constants to scoped enum
  in https://gerrit.libreoffice.org/15301 from Noel Grandin
+ convert SFX_VIEW constants to scoped enum
  in https://gerrit.libreoffice.org/15300 from Noel Grandin
+ remove unnecessary use of void in function declarations
  in https://gerrit.libreoffice.org/15299 from Noel Grandin
+ tdf#90594: MM: Fix for broken translation between Bookmarks and row indiz
  in https://gerrit.libreoffice.org/15289 from Christoph Lutz
+ tdf#71278 Revert both the previous cursor commit and the commit it fixed
  in https://gerrit.libreoffice.org/15316 from Matthew Francis


* Abandoned changes on master for project core changed in the last 25 hours:

+ Add KDE5 plugin for vcl
  in https://gerrit.libreoffice.org/13078 from Jonathan Riddell
+ more breeze icons
  in https://gerrit.libreoffice.org/13058 from Jonathan Riddell


* Open changes needing tweaks, but being untouched for more than a week:

+ Fix typo code Persistant
  in https://gerrit.libreoffice.org/14030 from Andrea Gelmini
+ tdf#90222: replace ScaList in scaddins with a std container
  in https://gerrit.libreoffice.org/15012 from Pieter Adriaensen
+ replace ScaList in scaddins with a std container tdf#90222
  in https://gerrit.libreoffice.org/15177 from Pieter Adriaensen
+ fdo#82335.
  in https://gerrit.libreoffice.org/11555 from Sudarshan Rao
+ tdf#64575 Photo Album: Better Image Layout
  in https://gerrit.libreoffice.org/14912 from Enes Ateş
+ WIP fdo#72987 Use firebird backup format for .odb no need for rebuild ind
  in https://gerrit.libreoffice.org/14968 from Popa Adrian Marius
+ Upgrade firebird to 2.5.3 , a few patches are already applied upstream
  in https://gerrit.libreoffice.org/15026 from Popa Adrian Marius
+ Removed unnecessary variables which occupy space
  in https://gerrit.libreoffice.org/14951 from Karthick Prasad
+ Fixed all  postfix operator++ and operator--
  in https://gerrit.libreoffice.org/14975 from Ahmad Samir
+ tdf#39468 Translate German Comments - sc/source/core/data/
  in https://gerrit.libreoffice.org/14866 from Christian M. Heller
+ tdf#49893: final fix for blank rectangle problem
  in https://gerrit.libreoffice.org/14584 from Vasily Melenchuk
+ xmloff: convert xof.component to use constructor syntax
  in https://gerrit.libreoffice.org/14820 from Chris Sherlock
+ xmloff: use constructor syntax in xo.component
  in https://gerrit.libreoffice.org/14803 from Chris Sherlock
+ sd: use constructor syntax for rest of sd.component
  in https://gerrit.libreoffice.org/14689 from Chris Sherlock
+ embeddedobj: convert emboleobj.*.component to constructor syntax

[Libreoffice-commits] core.git: 2 commits - sc/inc sc/qa sc/source

2015-04-15 Thread Markus Mohrhard
 sc/inc/colorscale.hxx|1 
 sc/qa/unit/data/xlsx/condformat_theme_color.xlsx |binary
 sc/qa/unit/helper/qahelper.cxx   |2 -
 sc/qa/unit/helper/qahelper.hxx   |   10 +++---
 sc/qa/unit/subsequent_filters-test.cxx   |   35 +++
 sc/source/core/data/colorscale.cxx   |8 +
 6 files changed, 50 insertions(+), 6 deletions(-)

New commits:
commit 2a88873e96d5aa916146a74c20b34b2715418350
Author: Markus Mohrhard 
Date:   Thu Apr 16 03:57:32 2015 +0200

add test for tdf#90511

Change-Id: Id4f338d8f19b796be10f035df0bdf28076f6511e

diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 110a27a..593a662 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -282,6 +282,7 @@ public:
 const_iterator end() const;
 
 ScColorScaleEntry* GetEntry(size_t nPos);
+const ScColorScaleEntry* GetEntry(size_t nPos) const;
 
 size_t size() const;
 
diff --git a/sc/qa/unit/data/xlsx/condformat_theme_color.xlsx 
b/sc/qa/unit/data/xlsx/condformat_theme_color.xlsx
new file mode 100644
index 000..8bab237
Binary files /dev/null and b/sc/qa/unit/data/xlsx/condformat_theme_color.xlsx 
differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 07b224f..dbc5ac1 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -131,6 +131,7 @@ public:
 void testColorScaleXLSX();
 void testNewCondFormatODS();
 void testNewCondFormatXLSX();
+void testCondFormatThemeColorXLSX();
 
 void testLiteralInFormulaXLS();
 
@@ -237,6 +238,7 @@ public:
 CPPUNIT_TEST(testColorScaleXLSX);
 CPPUNIT_TEST(testNewCondFormatODS);
 CPPUNIT_TEST(testNewCondFormatXLSX);
+CPPUNIT_TEST(testCondFormatThemeColorXLSX);
 CPPUNIT_TEST(testLiteralInFormulaXLS);
 
 CPPUNIT_TEST(testNumberFormatHTML);
@@ -2342,6 +2344,39 @@ void ScFiltersTest::testNewCondFormatXLSX()
 xDocSh->DoClose();
 }
 
+void ScFiltersTest::testCondFormatThemeColorXLSX()
+{
+ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc( 
"condformat_theme_color.", XLSX );
+
+CPPUNIT_ASSERT_MESSAGE("Failed to load condformat_theme_color.xlsx", 
xDocSh.Is());
+
+ScDocument& rDoc = xDocSh->GetDocument();
+ScConditionalFormat* pFormat = rDoc.GetCondFormat(0, 0, 0);
+const ScFormatEntry* pEntry = pFormat->GetEntry(0);
+CPPUNIT_ASSERT(pEntry);
+CPPUNIT_ASSERT_EQUAL(pEntry->GetType(), condformat::DATABAR);
+const ScDataBarFormat* pDataBar = static_cast(pEntry);
+const ScDataBarFormatData* pDataBarFormatData = pDataBar->GetDataBarData();
+
+CPPUNIT_ASSERT_EQUAL(Color(157, 195, 230), 
pDataBarFormatData->maPositiveColor);
+CPPUNIT_ASSERT(pDataBarFormatData->mpNegativeColor.get());
+CPPUNIT_ASSERT_EQUAL(Color(COL_LIGHTRED), 
*pDataBarFormatData->mpNegativeColor.get());
+
+pFormat = rDoc.GetCondFormat(0, 0, 1);
+pEntry = pFormat->GetEntry(0);
+CPPUNIT_ASSERT(pEntry);
+CPPUNIT_ASSERT_EQUAL(pEntry->GetType(), condformat::COLORSCALE);
+const ScColorScaleFormat* pColorScale = static_cast(pEntry);
+CPPUNIT_ASSERT_EQUAL(size_t(2), pColorScale->size());
+const ScColorScaleEntry* pColorScaleEntry = pColorScale->GetEntry(0);
+CPPUNIT_ASSERT(pColorScaleEntry);
+CPPUNIT_ASSERT_EQUAL(Color(255, 230, 153), pColorScaleEntry->GetColor());
+
+pColorScaleEntry = pColorScale->GetEntry(1);
+CPPUNIT_ASSERT(pColorScaleEntry);
+CPPUNIT_ASSERT_EQUAL(Color(157, 195, 230), pColorScaleEntry->GetColor());
+}
+
 void ScFiltersTest::testLiteralInFormulaXLS()
 {
 ScDocShellRef xDocSh = loadDoc("shared-string/literal-in-formula.", XLS);
diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 15fc616..c41fc68 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -679,6 +679,14 @@ ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t 
nPos)
 return &maColorScales[nPos];
 }
 
+const ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t nPos) const
+{
+if (maColorScales.size() <= nPos)
+return NULL;
+
+return &maColorScales[nPos];
+}
+
 size_t ScColorScaleFormat::size() const
 {
 return maColorScales.size();
commit 514433a819102e8463d90a907fcdb8e429e07917
Author: Markus Mohrhard 
Date:   Thu Apr 16 03:58:07 2015 +0200

export and fix pretty printers for calc unit tests

Change-Id: Ifa5d097e3c09fa0c96339b4eb6fd2be81516856d

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index d45340a..96307e1 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -62,7 +62,7 @@ std::ostream& operator<<(std::ostream& rStrm, const 
ScRangeList& rList)
 
 std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
 {
-rStrm << "Color: R:" << rColor.GetRed() << " G:" << rColor.GetGreen() << " 
B: << rColor.GetBlue()

[Libreoffice-commits] core.git: 2 commits - chart2/qa include/oox oox/source sc/source

2015-04-15 Thread Markus Mohrhard
 chart2/qa/extras/chart2export.cxx |   10 ++
 include/oox/helper/attributelist.hxx  |8 
 include/oox/helper/helper.hxx |1 +
 oox/source/helper/attributelist.cxx   |   17 +
 sc/source/filter/inc/condformatbuffer.hxx |2 +-
 sc/source/filter/oox/condformatbuffer.cxx |8 
 6 files changed, 41 insertions(+), 5 deletions(-)

New commits:
commit 915303a7903bac1e9a940370e69651dd48d08a01
Author: Markus Mohrhard 
Date:   Thu Apr 16 02:55:53 2015 +0200

fix werror problem around sal_uInt32 vs sal_Int32

Change-Id: Ifab0f5ad300882b1a014f6420094e5db503105e3

diff --git a/include/oox/helper/attributelist.hxx 
b/include/oox/helper/attributelist.hxx
index 90059fb..38bdf34 100644
--- a/include/oox/helper/attributelist.hxx
+++ b/include/oox/helper/attributelist.hxx
@@ -59,6 +59,9 @@ public:
 
 /** Returns the 32-bit signed integer value from the passed string 
(hexadecimal). */
 static sal_Int32decodeIntegerHex( const OUString& rValue );
+
+/** Returns the 32-bit unsigned integer value from the passed string 
(hexadecimal). */
+static sal_uInt32decodeUnsignedHex( const OUString& rValue );
 };
 
 
@@ -109,6 +112,9 @@ public:
 /** Returns the 32-bit signed integer value of the specified attribute 
(hexadecimal). */
 OptValue< sal_Int32 > getIntegerHex( sal_Int32 nAttrToken ) const;
 
+/** Returns the 32-bit unsigned integer value of the specified attribute 
(hexadecimal). */
+OptValue< sal_uInt32 > getUnsignedHex( sal_Int32 nAttrToken ) const;
+
 /** Returns the boolean value of the specified attribute. */
 OptValue< bool >getBool( sal_Int32 nAttrToken ) const;
 
@@ -152,6 +158,8 @@ public:
 or the passed default value if the attribute is missing or not 
convertible. */
 sal_Int32   getIntegerHex( sal_Int32 nAttrToken, sal_Int32 
nDefault ) const;
 
+sal_uInt32  getUnsignedHex( sal_Int32 nAttrToken, sal_uInt32 
nDefault ) const;
+
 /** Returns the boolean value of the specified attribute, or the passed
 default value if the attribute is missing or not convertible to bool. 
*/
 boolgetBool( sal_Int32 nAttrToken, bool bDefault ) const;
diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx
index b19337d..9585cc1 100644
--- a/include/oox/helper/helper.hxx
+++ b/include/oox/helper/helper.hxx
@@ -77,6 +77,7 @@ const sal_uInt8 WINDOWS_CHARSET_OEM = 255;
 
 
 const sal_Int32 API_RGB_TRANSPARENT = -1;   ///< Transparent color 
for API calls.
+const sal_uInt32 UNSIGNED_RGB_TRANSPARENT = 
static_cast(-1);   ///< Transparent color for unsigned int32 
places.
 const sal_Int32 API_RGB_BLACK   = 0x00;  ///< Black color for 
API calls.
 const sal_Int32 API_RGB_GRAY= 0x808080;  ///< Gray color for 
API calls.
 const sal_Int32 API_RGB_WHITE   = 0xFF;  ///< White color for 
API calls.
diff --git a/oox/source/helper/attributelist.cxx 
b/oox/source/helper/attributelist.cxx
index 3360c20..da8e2b3 100644
--- a/oox/source/helper/attributelist.cxx
+++ b/oox/source/helper/attributelist.cxx
@@ -105,6 +105,11 @@ sal_Int32 AttributeConversion::decodeIntegerHex( const 
OUString& rValue )
 // cast, but that will have a ripple effect
 }
 
+sal_uInt32 AttributeConversion::decodeUnsignedHex( const OUString& rValue )
+{
+return rValue.toUInt32( 16 );
+}
+
 AttributeList::AttributeList( const Reference< XFastAttributeList >& rxAttribs 
) :
 mxAttribs( rxAttribs ),
 mpAttribList( NULL )
@@ -186,6 +191,13 @@ OptValue< sal_Int32 > AttributeList::getIntegerHex( 
sal_Int32 nAttrToken ) const
 return OptValue< sal_Int32 >( bValid, bValid ? 
AttributeConversion::decodeIntegerHex( aValue ) : 0 );
 }
 
+OptValue< sal_uInt32 > AttributeList::getUnsignedHex( sal_Int32 nAttrToken ) 
const
+{
+OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
+bool bValid = !aValue.isEmpty();
+return OptValue< sal_uInt32 >( bValid, bValid ? 
AttributeConversion::decodeUnsignedHex( aValue ) : 0 );
+}
+
 OptValue< bool > AttributeList::getBool( sal_Int32 nAttrToken ) const
 {
 const char *pAttr;
@@ -296,6 +308,11 @@ sal_Int32 AttributeList::getIntegerHex( sal_Int32 
nAttrToken, sal_Int32 nDefault
 return getIntegerHex( nAttrToken ).get( nDefault );
 }
 
+sal_uInt32 AttributeList::getUnsignedHex( sal_Int32 nAttrToken, sal_uInt32 
nDefault ) const
+{
+return getIntegerHex( nAttrToken ).get( nDefault );
+}
+
 bool AttributeList::getBool( sal_Int32 nAttrToken, bool bDefault ) const
 {
 return getBool( nAttrToken ).get( bDefault );
diff --git a/sc/source/filter/inc/condformatbuffer.hxx 
b/sc/source/filter/inc/condformatbuffer.hxx
index 31ae39a..18523d8 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -219,7 +219,7 @@ private:
 
 struct ExCfRuleModel
 {
-ExCfRuleModel() 

[Libreoffice-commits] core.git: 2 commits - oox/source sc/source

2015-04-15 Thread Markus Mohrhard
 oox/source/export/chartexport.cxx |4 +++
 sc/source/filter/inc/condformatbuffer.hxx |4 +--
 sc/source/filter/oox/condformatbuffer.cxx |   40 --
 3 files changed, 38 insertions(+), 10 deletions(-)

New commits:
commit f9f53c4a8c9e1cd2fa1a9f48576b09f1bfd023ae
Author: Markus Mohrhard 
Date:   Thu Apr 16 02:22:41 2015 +0200

support tint for databar and colorscale colors, related tdf#90511

Change-Id: I59b00ab856583ed08f70c9c90469bbb44cb5782a

diff --git a/sc/source/filter/inc/condformatbuffer.hxx 
b/sc/source/filter/inc/condformatbuffer.hxx
index c3154ea..31ae39a 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -224,9 +224,9 @@ struct ExCfRuleModel
 bool mbGradient;
 OUString maAxisPosition;
 // AxisColor
-sal_Int32 mnAxisColor;
+sal_uInt32 mnAxisColor;
 // NegativeFillColor
-sal_Int32 mnNegativeColor;
+sal_uInt32 mnNegativeColor;
 // Cfvo
 bool mbIsLower;
 OUString maColorScaleType;
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 1992d3c..7e0a0f5 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -161,29 +161,42 @@ void ColorScaleRule::importCfvo( const AttributeList& 
rAttribs )
 
 namespace {
 
-::Color RgbToRgbComponents( sal_Int32& nRgb )
+::Color ARgbToARgbComponents( sal_uInt32& nRgb )
 {
+sal_Int32 ornA = 255 - ((nRgb >> 24) & 0xFF);
 sal_Int32 ornR = (nRgb >> 16) & 0xFF;
 sal_Int32 ornG = (nRgb >> 8) & 0xFF;
 sal_Int32 ornB = nRgb & 0xFF;
 
-return ::Color(ornR, ornG, ornB);
+return ::Color(ornA, ornR, ornG, ornB);
 }
 
 }
 
 void ColorScaleRule::importColor( const AttributeList& rAttribs )
 {
-sal_Int32 nColor = 0;
+sal_uInt32 nColor = 0;
 if( rAttribs.hasAttribute( XML_rgb ) )
 nColor = rAttribs.getIntegerHex( XML_rgb, API_RGB_TRANSPARENT );
 else if( rAttribs.hasAttribute( XML_theme ) )
 {
 sal_uInt32 nThemeIndex = rAttribs.getUnsigned( XML_theme, 0 );
 nColor = getTheme().getColorByIndex( nThemeIndex );
+
 }
 
-::Color aColor = RgbToRgbComponents( nColor );
+::Color aColor;
+double nTint = rAttribs.getDouble(XML_tint, 0.0);
+if (nTint != 0.0)
+{
+oox::drawingml::Color aDMColor;
+aDMColor.setSrgbClr(nColor);
+aDMColor.addExcelTintTransformation(nTint);
+nColor = aDMColor.getColor(getBaseFilter().getGraphicHelper());
+aColor = ::Color(nColor);
+}
+else
+aColor = ARgbToARgbComponents( nColor );
 
 if(mnCol >= maColorScaleRuleEntries.size())
 maColorScaleRuleEntries.push_back(ColorScaleRuleModelEntry());
@@ -239,7 +252,7 @@ DataBarRule::DataBarRule( const CondFormat& rFormat ):
 
 void DataBarRule::importColor( const AttributeList& rAttribs )
 {
-sal_Int32 nColor = 0;
+sal_uInt32 nColor = 0;
 if( rAttribs.hasAttribute( XML_rgb ) )
 nColor = rAttribs.getIntegerHex( XML_rgb, API_RGB_TRANSPARENT );
 else if( rAttribs.hasAttribute( XML_theme ) )
@@ -248,7 +261,18 @@ void DataBarRule::importColor( const AttributeList& 
rAttribs )
 nColor = getTheme().getColorByIndex( nThemeIndex );
 }
 
-::Color aColor = RgbToRgbComponents( nColor );
+::Color aColor;
+double nTint = rAttribs.getDouble(XML_tint, 0.0);
+if (nTint != 0.0)
+{
+oox::drawingml::Color aDMColor;
+aDMColor.setSrgbClr(nColor);
+aDMColor.addExcelTintTransformation(nTint);
+nColor = aDMColor.getColor(getBaseFilter().getGraphicHelper());
+aColor = ::Color(nColor);
+}
+else
+aColor = ARgbToARgbComponents( nColor );
 
 mxFormat->maPositiveColor = aColor;
 }
@@ -1119,13 +1143,13 @@ void ExtCfRule::finalizeImport()
 case AXISCOLOR:
 {
 ScDataBarFormatData* pDataBar = mpTarget;
-pDataBar->maAxisColor = RgbToRgbComponents(maModel.mnAxisColor);
+pDataBar->maAxisColor = ARgbToARgbComponents(maModel.mnAxisColor);
 break;
 }
 case NEGATIVEFILLCOLOR:
 {
 ScDataBarFormatData* pDataBar = mpTarget;
-pDataBar->mpNegativeColor.reset( new ::Color( 
RgbToRgbComponents(maModel.mnNegativeColor) ) );
+pDataBar->mpNegativeColor.reset( new ::Color( 
ARgbToARgbComponents(maModel.mnNegativeColor) ) );
 pDataBar->mbNeg = true;
 break;
 }
commit cb2063832dd64d39ec57d70d0637fe23412c096d
Author: Markus Mohrhard 
Date:   Thu Apr 16 02:04:51 2015 +0200

we don't support roundedCorners, tdf#90533

Change-Id: Ic02c8c265792356fccedb310a44997443e46589a

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index edc1176..63d7765 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -745,6 +745,10 @@ void ChartExport::ex

New Defects reported by Coverity Scan for LibreOffice

2015-04-15 Thread scan-admin

Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

5 new defect(s) introduced to LibreOffice found with Coverity Scan.
3 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 5 of 5 defect(s)


** CID 1294411:(RESOURCE_LEAK)
/include/LibreOfficeKit/LibreOfficeKitInit.h: 199 in lok_init_2(const char *, 
const char *)()
/include/LibreOfficeKit/LibreOfficeKitInit.h: 203 in lok_init_2(const char *, 
const char *)()



*** CID 1294411:(RESOURCE_LEAK)
/include/LibreOfficeKit/LibreOfficeKitInit.h: 199 in lok_init_2(const char *, 
const char *)()
193 fprintf( stderr, "failed to find hook in library '%s'\n", 
imp_lib );
194 _dlclose( dlhandle );
195 free( imp_lib );
196 return NULL;
197 }
198 free( imp_lib );
>>> CID 1294411:(RESOURCE_LEAK)
>>> Variable "dlhandle" going out of scope leaks the storage it points to.
199 return pSym( install_path );
200 }
201 
202 free( imp_lib );
203 return pSym2( install_path, user_profile_path );
204 }
/include/LibreOfficeKit/LibreOfficeKitInit.h: 203 in lok_init_2(const char *, 
const char *)()
197 }
198 free( imp_lib );
199 return pSym( install_path );
200 }
201 
202 free( imp_lib );
>>> CID 1294411:(RESOURCE_LEAK)
>>> Variable "dlhandle" going out of scope leaks the storage it points to.
203 return pSym2( install_path, user_profile_path );
204 }
205 
206 static
207 #ifdef __GNUC__
208 __attribute__((used))

** CID 1294410:  Control flow issues  (MISSING_BREAK)
/libreofficekit/source/gtk/lokdocview.cxx: 944 in 
LOKDocView_Impl::callbackImpl(LOKDocView_Impl::CallbackData *)()



*** CID 1294410:  Control flow issues  (MISSING_BREAK)
/libreofficekit/source/gtk/lokdocview.cxx: 944 in 
LOKDocView_Impl::callbackImpl(LOKDocView_Impl::CallbackData *)()
938 {
939 GError* pError = NULL;
940 #if GTK_CHECK_VERSION(2,14,0)
941 gtk_show_uri(NULL, pCallback->m_aPayload.c_str(), 
GDK_CURRENT_TIME, &pError);
942 #endif
943 }
>>> CID 1294410:  Control flow issues  (MISSING_BREAK)
>>> The above case falls through to this one.
944 case LOK_CALLBACK_STATE_CHANGED:
945 {
946 commandChanged(pCallback->m_aPayload);
947 }
948 break;
949 default:

** CID 1294409:(FORWARD_NULL)
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()



*** CID 1294409:(FORWARD_NULL)
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
240 ScDocument* pDoc = pViewData->GetDocument();
241 
242 // FIXME this shouldn't be necessary once we change the entire Calc 
to
243 // work in the logic coordinates (ideally 100ths of mm - so that it 
is
244 // the same as editeng and drawinglayer), and get rid of all the
245 // SetMapMode's and other unneccessary fun we have with pixels
>>> CID 1294409:(FORWARD_NULL)
>>> Comparing "pDoc" to null implies that "pDoc" might be null.
246 if (pDoc && pDoc->GetDrawLayer() && 
pDoc->GetDrawLayer()->isTiledRendering())
247 {
248 return pViewData->GetLogicMode();
249 }
250 
251 SCTAB nTab = pViewData->GetTabNo();
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
240 ScDocument* pDoc = pViewData->GetDocument();
241 
242 // FIXME this shouldn't be necessary once we change the entire Calc 
to
243 // work in the logic coordinates (ideally 100ths of mm - so that it 
is
244 // the same as editeng and drawinglayer), and get rid of all the
245 // SetMapMode's and other unneccessary fun we have with pixels
>>> CID 1294409:(FORWARD_NULL)
>>> Comparing "pDoc" to null implies that "pDoc" might be null.
246 if (pDoc && pDoc->GetDrawLayer() && 
pDoc->GetDrawLayer()->isTiledRendering())
247 {
248 return pViewData->GetLogicMode();
249 }
250 
251 SCTAB nTab = pViewData->GetTabNo();
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
240 ScDocument* pDoc = pViewData->GetDocument();
241 
242 // FIXME this shouldn't be nece

[Libreoffice-commits] core.git: sw/Library_sw.mk sw/source

2015-04-15 Thread Bjoern Michaelsen
 sw/Library_sw.mk   |2 
 sw/source/core/crsr/unocrsr.cxx|  255 -
 sw/source/core/unocore/unocrsr.cxx |  255 +
 3 files changed, 256 insertions(+), 256 deletions(-)

New commits:
commit 09a1e4f36128f64029d45a38d9b059bf11ea0821
Author: Bjoern Michaelsen 
Date:   Wed Apr 15 21:52:45 2015 +0200

move unocrsr to unocore

Change-Id: I1a3185e89e68b4d85221b8296fe9ffad8b18de5f
Reviewed-on: https://gerrit.libreoffice.org/15335
Tested-by: Björn Michaelsen 
Reviewed-by: Björn Michaelsen 

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index a6f7a3a..24bde65 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -157,7 +157,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/core/crsr/trvlfnfl \
 sw/source/core/crsr/trvlreg \
 sw/source/core/crsr/trvltbl \
-sw/source/core/crsr/unocrsr \
 sw/source/core/crsr/viscrs \
 sw/source/core/crsr/overlayrangesoutline \
 sw/source/core/doc/SwStyleNameMapper \
@@ -459,6 +458,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/core/unocore/unobkm \
 sw/source/core/unocore/unochart \
 sw/source/core/unocore/unocoll \
+sw/source/core/unocore/unocrsr \
 sw/source/core/unocore/unocrsrhelper \
 sw/source/core/unocore/unodraw \
 sw/source/core/unocore/unoevent \
diff --git a/sw/source/core/crsr/unocrsr.cxx 
b/sw/source/core/unocore/unocrsr.cxx
similarity index 100%
rename from sw/source/core/crsr/unocrsr.cxx
rename to sw/source/core/unocore/unocrsr.cxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2015-04-15 Thread Markus Mohrhard
 sc/source/filter/oox/condformatbuffer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 02c14ff310141fea1f716d154c6c851fe3024c74
Author: Markus Mohrhard 
Date:   Wed Apr 15 21:17:58 2015 +0200

same problem for color scales, related tdf#90511

Change-Id: I980f42ff902da4f919a59d74b5a2834f5e601817

diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index cfe4af2..1992d3c 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -180,7 +180,7 @@ void ColorScaleRule::importColor( const AttributeList& 
rAttribs )
 else if( rAttribs.hasAttribute( XML_theme ) )
 {
 sal_uInt32 nThemeIndex = rAttribs.getUnsigned( XML_theme, 0 );
-nColor = getTheme().getColorByToken( nThemeIndex );
+nColor = getTheme().getColorByIndex( nThemeIndex );
 }
 
 ::Color aColor = RgbToRgbComponents( nColor );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


LibreOffice AppArmor profiles

2015-04-15 Thread Bryan Quigley
Hi there,

I've been working on making AppArmor profiles for LibreOffice and have been
wondering about the best way to integrate them upstream.  Originally I was
thinking about having them in AppArmor upstream but it makes more sense to
be in lock step with LibreOffice versions.  That way as bugs get fixed or
LibreOffice is made to require less permissions it shows up at the right
time.

You can see the latest public version here[1*] and that thread starts
here[2].

If they could be integrated somewhere with the build system it would help
solve the other big issue that I've ran into, the changing pathnames from
pre-built debs to different distros doing things differently.   In an ideal
world each different system then could just generate a libreoffice-apparmor
package that would enable the profiles.

If not (or if we want to decide all that later), I would just be happy
knowing where in the LibreOffice code base the profiles make sense to live.

Just to be clear, I don't believe you could turn these on by default right
now.   This just gives organizations who want LibreOffice confined that
option.

Kind regards,
Bryan

Canonical Backline Support Engineer

[1]  https://lists.ubuntu.com/archives/apparmor/2015-April/007713.html
[2]  https://lists.ubuntu.com/archives/apparmor/2015-April/007690.html
* This profile found a few bugs in AppArmor.  I had to do AppArmor restarts
to reload the profiles.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 60924] move libraries to autoinstallation in scp2

2015-04-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=60924

Matúš Kukan  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #69 from Matúš Kukan  ---
I believe this task has been done, so marking as resolved. Thanks all for the
work.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/vclptr' - 2 commits - include/sfx2 sc/source sfx2/source svx/source sw/source

2015-04-15 Thread Michael Meeks
 include/sfx2/ctrlitem.hxx|1 
 include/sfx2/sidebar/ControllerItem.hxx  |3 ++
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx  |8 ++
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx |8 ++
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx   |4 +++
 sfx2/source/control/ctrlitem.cxx |9 +--
 sfx2/source/sidebar/ControllerItem.cxx   |8 ++
 sfx2/source/sidebar/Deck.cxx |   15 
 sfx2/source/sidebar/Deck.hxx |2 -
 sfx2/source/sidebar/SidebarController.cxx|   22 +++
 svx/source/sidebar/area/AreaPropertyPanel.cxx|   12 ++
 svx/source/sidebar/graphic/GraphicPropertyPanel.cxx  |   10 
 svx/source/sidebar/line/LinePropertyPanel.cxx|   12 ++
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx   |9 +++
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx  |   15 
 svx/source/sidebar/text/TextPropertyPanel.cxx|5 
 sw/source/uibase/sidebar/PagePropertyPanel.cxx   |   11 +
 sw/source/uibase/sidebar/WrapPropertyPanel.cxx   |8 ++
 18 files changed, 144 insertions(+), 18 deletions(-)

New commits:
commit d3d2453432a59fbba3a8f8c44260982bf67ec939
Author: Michael Meeks 
Date:   Wed Apr 15 21:56:23 2015 +0100

Unregister sidebar ControllerItems at the right time.

Otherwise they linger post-dispose, wreaking havoc.

Change-Id: I6d0981ee15e82111bc825c75d28b703e5a5d266b

diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx
index aa38dc0..24f64d9 100644
--- a/include/sfx2/ctrlitem.hxx
+++ b/include/sfx2/ctrlitem.hxx
@@ -56,6 +56,7 @@ public:
 SfxControllerItem(); // for arrays
 SfxControllerItem( sal_uInt16 nId, SfxBindings & );
 virtual ~SfxControllerItem();
+virtual voiddispose();
 
 voidBind( sal_uInt16 nNewId, SfxBindings * = 0);// 
Register in SfxBindings
 voidUnBind();
diff --git a/include/sfx2/sidebar/ControllerItem.hxx 
b/include/sfx2/sidebar/ControllerItem.hxx
index f06ae5e..025106e 100644
--- a/include/sfx2/sidebar/ControllerItem.hxx
+++ b/include/sfx2/sidebar/ControllerItem.hxx
@@ -80,6 +80,9 @@ public:
 SfxBindings &rBindings,
 ItemUpdateReceiverInterface& rItemUpdateReceiver);
 
+/// releases our action listener
+virtual void dispose() SAL_OVERRIDE;
+
 virtual ~ControllerItem();
 
 /** Returns  when the slot/command has not been disabled.
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx 
b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 75d054c..c9d7d4af 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -81,6 +81,14 @@ void AlignmentPropertyPanel::dispose()
 mpCtrlDial.clear();
 mpMtrAngle.clear();
 mpCbStacked.clear();
+
+maAlignHorControl.dispose();
+maLeftIndentControl.dispose();
+maMergeCellControl.dispose();
+maWrapTextControl.dispose();
+maAngleControl.dispose();
+maStackControl.dispose();
+
 PanelLayout::dispose();
 }
 
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx 
b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 4410c79..5dae73b 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -151,6 +151,14 @@ void CellAppearancePropertyPanel::dispose()
 mpTBLineStyle.clear();
 mpTBLineColor.clear();
 mpCBXShowGrid.clear();
+
+maLineStyleControl.dispose();
+maBorderOuterControl.dispose();
+maBorderInnerControl.dispose();
+maGridShowControl.dispose();
+maBorderTLBRControl.dispose();
+maBorderBLTRControl.dispose();
+
 PanelLayout::dispose();
 }
 
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx 
b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 6efc79d..035b65b 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -81,6 +81,10 @@ void NumberFormatPropertyPanel::dispose()
 mpEdLeadZeroes.clear();
 mpBtnNegRed.clear();
 mpBtnThousand.clear();
+
+maNumFormatControl.dispose();
+maFormatControl.dispose();
+
 PanelLayout::dispose();
 }
 
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index c1fa162..0be5e36 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -218,16 +218,19 @@ SfxControllerItem::SfxControllerItem( sal_uInt16 nID, 
SfxBindings &rBindings ):
 }
 
 
-// unregisteres the item in the bindings
+// unregisters the item in the bindings
 
 SfxControllerItem::~SfxControllerItem()
 {
+dispose();
+}
+
+void SfxControllerItem::dispose()
+{
 if ( IsBound() )
 pBindi

[Libreoffice-commits] core.git: 2 commits - Repository.mk svx/Library_svxcore.mk sw/Library_sw.mk

2015-04-15 Thread Matúš Kukan
 Repository.mk  |   29 -
 svx/Library_svxcore.mk |1 -
 sw/Library_sw.mk   |1 -
 3 files changed, 4 insertions(+), 27 deletions(-)

New commits:
commit 4daf6600a3f5c1d58ff1c79396f05d3ea5cb7103
Author: Matúš Kukan 
Date:   Wed Apr 15 23:41:45 2015 +0200

Move these together

Change-Id: I0352e3180d553c46c6ca905628d5b46d1af0b8a7

diff --git a/Repository.mk b/Repository.mk
index 0928df6..f9a5208 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -186,26 +186,6 @@ $(eval $(call 
gb_Helper_register_executables_for_install,UREBIN,ure,\
$(if $(filter DESKTOP,$(BUILD_TYPE)),uno) \
 ))
 
-ifneq (,$(filter ANDROID IOS,$(OS)))
-
-# these are in NONE layer because
-# a) scp2 is not used on mobile b) layers don't mean anything on mobile
-$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
-   $(if $(filter $(OS),ANDROID), \
-   lo-bootstrap \
-   ) \
-))
-
-endif
-
-ifeq ($(OS),MACOSX)
-
-$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
-   OOoSpotlightImporter \
-))
-
-endif
-
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,base, \
abp \
dbp \
@@ -519,6 +499,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,writer, \
writerfilter \
 ))
 
+# cli_cppuhelper is NONE even though it is actually in URE because it is 
CliNativeLibrary
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
getuid \
smoketest \
@@ -533,6 +514,9 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
vclbootstrapprotector \
scqahelper \
unowinreg \
+   $(if $(filter MSC,$(COM)),cli_cppuhelper) \
+   $(if $(filter $(OS),ANDROID),lo-bootstrap) \
+   $(if $(filter $(OS),MACOSX),OOoSpotlightImporter) \
 ))
 
 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_URE,ure, \
@@ -576,11 +560,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \
xmlreader \
 ))
 
-# this is NONE even though it is actually in URE because it is CliNativeLibrary
-$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
-   $(if $(filter MSC,$(COM)),cli_cppuhelper) \
-))
-
 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
$(if $(ENABLE_VLC),avmediavlc) \
$(if $(ENABLE_GSTREAMER_1_0),avmediagst) \
commit fa3daee4b694202009f3d98c7b374825ec34605d
Author: Matúš Kukan 
Date:   Wed Apr 15 20:02:25 2015 +0200

DBTOOLS_DLL_NAME not used anymore

Change-Id: Ieb9a373e4d59bfe72a7709bd7822617f9877054a

diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 1c619c6..ce93cc8 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -47,7 +47,6 @@ $(eval $(call 
gb_Library_set_precompiled_header,svxcore,$(SRCDIR)/svx/inc/pch/pr
 $(eval $(call gb_Library_add_defs,svxcore,\
 -DSVX_DLLIMPLEMENTATION \
 -DBOOST_SPIRIT_USE_OLD_NAMESPACE \
--DDBTOOLS_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call 
gb_Library__get_name,dbtools))\" \
 ))
 
 $(eval $(call gb_Library_use_libraries,svxcore,\
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 673585a..a6f7a3a 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -44,7 +44,6 @@ $(eval $(call gb_Library_use_sdk_api,sw))
 $(eval $(call gb_Library_add_defs,sw,\
 -DSW_DLLIMPLEMENTATION \
-DSWUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call 
gb_Library__get_name,swui))\" \
-   -DDBTOOLS_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call 
gb_Library__get_name,dbtools))\" \
 ))
 
 $(eval $(call gb_Library_use_libraries,sw,\
___
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' - toolkit/source

2015-04-15 Thread Caolán McNamara
 toolkit/source/awt/vclxwindow.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ba672e1351b7c170aa91dc0c99ecb80d00fcdb06
Author: Caolán McNamara 
Date:   Tue Mar 31 13:36:37 2015 +0100

Resolves: tdf#90228 1.06 turns into a monster

(cherry picked from commit 2ec9d9dd81f3f4ee6785ba938f9a79395972b71e)

Also happens to fix tdf#89987

Change-Id: I8ebb57fe8b94da2569593ffa7cf374cae64a846a
Signed-off-by: Michael Stahl 

diff --git a/toolkit/source/awt/vclxwindow.cxx 
b/toolkit/source/awt/vclxwindow.cxx
index 6940762..290555f 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2331,8 +2331,9 @@ void VCLXWindow::setZoom( float fZoomX, float /*fZoomY*/ 
) throw(::com::sun::sta
 // The implicit conversion from float to double can result in a 
precision loss, i.e. 1.2 is converted to
 // 1.2047something. To prevent this, we convert explicitly to 
double, and round it.
 double nZoom( fZoomX );
-nZoom = ::rtl::math::round( nZoom, 4 );
-GetWindow()->SetZoom( Fraction( nZoom ) );
+Fraction aZoom(::rtl::math::round(nZoom, 4));
+aZoom.ReduceInaccurate(10); // to avoid runovers and BigInt mapping
+GetWindow()->SetZoom(aZoom);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - sc/inc sc/source

2015-04-15 Thread Eike Rathke
 sc/inc/column.hxx |2 -
 sc/source/core/data/column2.cxx   |   15 --
 sc/source/core/tool/grouparealistener.cxx |   31 +-
 3 files changed, 40 insertions(+), 8 deletions(-)

New commits:
commit cff5ee864b2d87d74079697425d7895dbf1b2ba4
Author: Eike Rathke 
Date:   Wed Apr 15 19:38:59 2015 +0200

tdf#89957 prevent crash, not really fixed

See source code comment.

Change-Id: I3ab7ab6aec1d782de0733064fea031c895f28965

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index d7dee13..8d0db57 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -361,7 +361,7 @@ public:
 voidGetFormula( SCROW nRow, OUString& rFormula ) const;
 const ScFormulaCell* GetFormulaCell( SCROW nRow ) const;
 ScFormulaCell* GetFormulaCell( SCROW nRow );
-ScFormulaCell * const * GetFormulaCellBlockAddress( SCROW nRow ) const;
+ScFormulaCell * const * GetFormulaCellBlockAddress( SCROW nRow, size_t& 
rBlockSize ) const;
 CellTypeGetCellType( SCROW nRow ) const;
 SCSIZE  GetCellCount() const;
 sal_uInt32 GetWeightedCount() const;
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 9376685..ef6c073 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2712,26 +2712,37 @@ void ScColumn::SetNumberFormat( SCROW nRow, sal_uInt32 
nNumberFormat )
 ApplyAttr(nRow, SfxUInt32Item(ATTR_VALUE_FORMAT, nNumberFormat));
 }
 
-ScFormulaCell * const * ScColumn::GetFormulaCellBlockAddress( SCROW nRow ) 
const
+ScFormulaCell * const * ScColumn::GetFormulaCellBlockAddress( SCROW nRow, 
size_t& rBlockSize ) const
 {
 if (!ValidRow(nRow))
+{
+rBlockSize = 0;
 return NULL;
+}
 
 std::pair aPos = 
maCells.position(nRow);
 sc::CellStoreType::const_iterator it = aPos.first;
 if (it == maCells.end())
+{
+rBlockSize = 0;
 return NULL;
+}
 
 if (it->type != sc::element_type_formula)
+{
 // Not a formula cell.
+rBlockSize = 0;
 return NULL;
+}
 
+rBlockSize = it->size;
 return &sc::formula_block::at(*it->data, aPos.second);
 }
 
 const ScFormulaCell* ScColumn::FetchFormulaCell( SCROW nRow ) const
 {
-ScFormulaCell const * const * pp = GetFormulaCellBlockAddress( nRow );
+size_t nBlockSize = 0;
+ScFormulaCell const * const * pp = GetFormulaCellBlockAddress( nRow, 
nBlockSize );
 return pp ? *pp : NULL;
 }
 
diff --git a/sc/source/core/tool/grouparealistener.cxx 
b/sc/source/core/tool/grouparealistener.cxx
index e8126a0..46155f9 100644
--- a/sc/source/core/tool/grouparealistener.cxx
+++ b/sc/source/core/tool/grouparealistener.cxx
@@ -190,13 +190,30 @@ void FormulaGroupAreaListener::collectFormulaCells(
 " mnTopCellRow " << mnTopCellRow << " length " << mnGroupLen <<
 ", col/tab " << mpColumn->GetCol() << "/" << mpColumn->GetTab());
 
-ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( 
mnTopCellRow);
+size_t nBlockSize = 0;
+ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( 
mnTopCellRow, nBlockSize);
 if (!pp)
 {
 SAL_WARN("sc", "GetFormulaCellBlockAddress not found");
 return;
 }
 
+/* FIXME: with tdf#89957 it happened that the actual block size in column
+ * AP (shifted from AO) of sheet 'w' was smaller than the remembered group
+ * length and correct. This is just a very ugly workaround, the real cause
+ * is yet unknown, but at least don't crash in such case. The intermediate
+ * cause is that not all affected group area listeners are destroyed and
+ * newly created, so mpColumn still points to the old column that then has
+ * the content of a shifted column. Effectively this workaround has the
+ * consequence that the group area listener is fouled up and not all
+ * formula cells are notified.. */
+if (nBlockSize < static_cast(mnGroupLen))
+{
+SAL_WARN("sc.core","FormulaGroupAreaListener::collectFormulaCells() 
nBlockSize " <<
+nBlockSize << " < " << mnGroupLen << " mnGroupLen");
+const_cast(this)->mnGroupLen = 
static_cast(nBlockSize);
+}
+
 ScFormulaCell* const * ppEnd = pp + mnGroupLen;
 
 if (mbStartFixed)
@@ -285,7 +302,8 @@ ScAddress FormulaGroupAreaListener::getTopCellPos() const
 
 const ScFormulaCell* FormulaGroupAreaListener::getTopCell() const
 {
-const ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( 
mnTopCellRow);
+size_t nBlockSize = 0;
+const ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( 
mnTopCellRow, nBlockSize);
 SAL_WARN_IF(!pp, "sc", "GetFormulaCellBlockAddress not found");
 return pp ? *pp : NULL;
 }
commit b03563571fb922636635ea72f2dbda18d736ff89
Author: Eike Rathke 
Date:   Tue Apr 14 23:09:46 2015 +0200

more SAL_INFO sc.core.grouparealistener

Change-Id: Ia

Re: Inserting Graphics in a Writer document

2015-04-15 Thread Piet van Oostrum
Niklas Johansson wrote:

 > If I were you I would set the Anchor before I insert the image into the 
 > document. So change the order of these lines:
 > 
 >  xText.insertTextContent(cursor, oGraphic, False)
 >  # Setting the anchor type - must be done first, otherwise the graphic 
 > will be put after the //
 >  oGraphic.AnchorType = AS_CHARACTER

YES!! That solves it. Thans a lot.

 > Once the image is inserted into the document you won't always be able to 
 > change the anchor as you try to do in the code above. For some reason it 
 > works in your first example but as you can see it won't work in your 
 > second example.

I did is as it was done in the Java code.

 > So remember to always change the anchor of the graphic before you insert 
 > it otherwise you'll get more of these nice surprises. If I remember 
 > correctly there are a few more settings that should be done to the 
 > graphic object before it's inserted and some that needs to be set after, 
 > but I don't remember the details at the moment.

I hope that these things are documented somewhere.

 > It seems that what is happening in the second case is that the image 
 > gets inserted before the anchor-change and when the re-anchoring occurs 
 > the image is already in the wrong position.
 > 
-- 
Piet van Oostrum 
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: 2 commits - include/oox oox/source sc/source

2015-04-15 Thread Markus Mohrhard
 include/oox/drawingml/clrscheme.hxx   |8 +++---
 oox/source/drawingml/clrscheme.cxx|   37 +++---
 sc/source/filter/inc/themebuffer.hxx  |2 +
 sc/source/filter/oox/condformatbuffer.cxx |2 -
 sc/source/filter/oox/themebuffer.cxx  |6 
 5 files changed, 42 insertions(+), 13 deletions(-)

New commits:
commit f3121049828596b369e3ea844355d61666e49795
Author: Markus Mohrhard 
Date:   Wed Apr 15 18:19:47 2015 +0200

use index as real index and not token, tdf#90511

At least in calc a theme index is a zero based index into the clrScheme.
A map is unsiutable for that task so let us use a vector and still allow
to get them by their tokens.

Change-Id: I09d56acaf22c3ed16387aae95c36382302c5a17e

diff --git a/include/oox/drawingml/clrscheme.hxx 
b/include/oox/drawingml/clrscheme.hxx
index b4c12cf..00bf149 100644
--- a/include/oox/drawingml/clrscheme.hxx
+++ b/include/oox/drawingml/clrscheme.hxx
@@ -42,12 +42,15 @@ typedef std::shared_ptr< ClrMap > ClrMapPtr;
 
 class OOX_DLLPUBLIC ClrScheme
 {
-std::map < sal_Int32, sal_Int32 > maClrScheme;
+std::vector< std::pair > maClrScheme;
 
 public:
 
 bool getColor( sal_Int32 nSchemeClrToken, sal_Int32& rColor ) const;
 void setColor( sal_Int32 nSchemeClrToken, sal_Int32 nColor );
+
+bool getColorByIndex(size_t nIndex,
+sal_Int32& rColor) const;
 };
 
 typedef std::shared_ptr< ClrScheme > ClrSchemePtr;
diff --git a/oox/source/drawingml/clrscheme.cxx 
b/oox/source/drawingml/clrscheme.cxx
index 52f78aa..9fb8382 100644
--- a/oox/source/drawingml/clrscheme.cxx
+++ b/oox/source/drawingml/clrscheme.cxx
@@ -43,6 +43,21 @@ void ClrMap::setColorMap( sal_Int32 nClrToken, sal_Int32 
nMappedClrToken )
 maClrMap[ nClrToken ] = nMappedClrToken;
 }
 
+struct find_by_token
+{
+find_by_token(sal_Int32 token):
+m_token(token)
+{
+}
+
+bool operator()(const std::pair& r)
+{
+return r.first == m_token;
+}
+
+private:
+sal_Int32 m_token;
+};
 
 bool ClrScheme::getColor( sal_Int32 nSchemeClrToken, sal_Int32& rColor ) const
 {
@@ -54,15 +69,27 @@ bool ClrScheme::getColor( sal_Int32 nSchemeClrToken, 
sal_Int32& rColor ) const
 case XML_tx1 : nSchemeClrToken = XML_dk1; break;
 case XML_tx2 : nSchemeClrToken = XML_dk2; break;
 }
-std::map < sal_Int32, sal_Int32 >::const_iterator aIter( maClrScheme.find( 
nSchemeClrToken ) );
+
+auto aIter = std::find_if(maClrScheme.begin(), maClrScheme.end(), 
find_by_token(nSchemeClrToken) );
+
 if ( aIter != maClrScheme.end() )
-rColor = (*aIter).second;
+rColor = aIter->second;
+
 return aIter != maClrScheme.end();
 }
 
 void ClrScheme::setColor( sal_Int32 nSchemeClrToken, sal_Int32 nColor )
 {
-maClrScheme[ nSchemeClrToken ] = nColor;
+maClrScheme.push_back(std::pair(nSchemeClrToken, 
nColor));
+}
+
+bool ClrScheme::getColorByIndex(size_t nIndex, sal_Int32& rColor) const
+{
+if (nIndex >= maClrScheme.size())
+return false;
+
+rColor = maClrScheme[nIndex].second;
+return true;
 }
 
 } }
diff --git a/sc/source/filter/inc/themebuffer.hxx 
b/sc/source/filter/inc/themebuffer.hxx
index 84ff9ea..21f560a 100644
--- a/sc/source/filter/inc/themebuffer.hxx
+++ b/sc/source/filter/inc/themebuffer.hxx
@@ -37,6 +37,8 @@ public:
 /** Returns the theme color with the specified token identifier. */
 sal_Int32   getColorByToken( sal_Int32 nToken ) const;
 
+sal_Int32   getColorByIndex(size_t nIndex) const;
+
 /** Returns the default font data for the current file type. */
 inline const FontModel& getDefaultFontModel() const { return 
*mxDefFontModel; }
 
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 2c04142..cfe4af2 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -245,7 +245,7 @@ void DataBarRule::importColor( const AttributeList& 
rAttribs )
 else if( rAttribs.hasAttribute( XML_theme ) )
 {
 sal_uInt32 nThemeIndex = rAttribs.getUnsigned( XML_theme, 0 );
-nColor = getTheme().getColorByToken( nThemeIndex );
+nColor = getTheme().getColorByIndex( nThemeIndex );
 }
 
 ::Color aColor = RgbToRgbComponents( nColor );
diff --git a/sc/source/filter/oox/themebuffer.cxx 
b/sc/source/filter/oox/themebuffer.cxx
index 58ed242..a4dfc32 100644
--- a/sc/source/filter/oox/themebuffer.cxx
+++ b/sc/source/filter/oox/themebuffer.cxx
@@ -56,6 +56,12 @@ sal_Int32 ThemeBuffer::getColorByToken( sal_Int32 nToken ) 
const
 return getClrScheme().getColor( nToken, nColor ) ? nColor : 
API_RGB_TRANSPARENT;
 }
 
+sal_Int32 ThemeBuffer::getColorByIndex(size_t nIndex) const
+{
+sal_Int32 nColor = 0;
+return getClrScheme().getColorByIndex(nIndex, nColor) ? nColor : 
API_RGB_TRANSPARENT;
+}
+
 } // namespace xls
 } // namespace oox
 
commit b99a4b81f53aa406a9

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

2015-04-15 Thread Caolán McNamara
 sw/source/core/layout/paintfrm.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6d1699d707a2be510a0021dbce124d27356819ad
Author: Caolán McNamara 
Date:   Wed Apr 15 11:11:03 2015 +0100

fix crash on re-export of fdo39974-1.odt to odt

(cherry picked from commit c2c22d26db03949771d5a0bb4f8abf6d2dc850ea)

sw: DrawFillAttributes: move check for empty rPaintRegion

Tweak c2c22d26db03949771d5a0bb4f8abf6d2dc850ea a bit: if the paint
region is empty, nothing should be painted.

(cherry picked from commit dc6a6475bcc7625a648e840de97ebd7a1ab03270)

Change-Id: Ib4246987a3665f655ad44339ade0350b074c3266
Reviewed-on: https://gerrit.libreoffice.org/15329
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 7ede9572e86a907f7cce8debba732d07b6b45923)
Reviewed-on: https://gerrit.libreoffice.org/15330
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 5557de3..7c395fb 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1858,7 +1858,8 @@ bool DrawFillAttributes(
 rPaintRegion.GetOrigin().Right(),
 rPaintRegion.GetOrigin().Bottom());
 
-if(!aPaintRange.isEmpty() &&
+if (!aPaintRange.isEmpty() &&
+!rPaintRegion.empty() &&
 !basegfx::fTools::equalZero(aPaintRange.getWidth()) &&
 !basegfx::fTools::equalZero(aPaintRange.getHeight()))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: DocumentEventListener problem

2015-04-15 Thread Piet van Oostrum
Stephan Bergmann wrote:

 > On 04/15/2015 02:18 PM, Piet van Oostrum wrote:
 > > Anyway, this makes it almost impossible to use listeners across the UNO 
 > > bridge. When I run my code as a macro inside LO there is no problem.
 > 
 > Why do you need to remove and then re-add the MyEventListener during the 
 > dumentEventOccured call anyway?

My first suspicion was that during the actions in the listener a new event 
would possibly be triggered, causing a recursion in the listener.Just to 
prevent that kind of situation I removed/added the event listener around the 
body. As it appears not to be the case, I have now removed them, but that 
doesn't solve the problem. It is the release() calls that cause the problem 
because they lock the mutex. I have looked in the code and I guess there are 
some destructors that use the lock, probably indirectly. I had the impression 
that OInterfaceContainerhelper had something to do with it.

The documentation somewhere warns about oneway calls because they are 
asynchronous and ru in different threads than synchronous calls. Well, 
release() is oneway. But there's not much you can do about that.
-- 
Piet van Oostrum 
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: include/svx

2015-04-15 Thread Caolán McNamara
 include/svx/dlgctrl.hxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit aaf94fc88cde090ed2e153f2b9e4c2764def7286
Author: Caolán McNamara 
Date:   Wed Apr 15 17:12:11 2015 +0100

add SVX_DLLPUBLIC

Change-Id: I46ef716d572d27ff0a6153afa7453d1a32d6df26

diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 91191d9..9571373 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -285,7 +285,7 @@ private:
 
 //
 
-class SAL_WARN_UNUSED FillAttrLB : public ColorListBox
+class SVX_DLLPUBLIC SAL_WARN_UNUSED FillAttrLB : public ColorListBox
 {
 private:
 BitmapExmaBitmapEx;
@@ -301,7 +301,7 @@ public:
 
 //
 
-class SAL_WARN_UNUSED FillTypeLB : public ListBox
+class SVX_DLLPUBLIC SAL_WARN_UNUSED FillTypeLB : public ListBox
 {
 
 public:
@@ -313,7 +313,7 @@ public:
 
 //
 
-class SAL_WARN_UNUSED LineLB : public ListBox
+class SVX_DLLPUBLIC SAL_WARN_UNUSED LineLB : public ListBox
 {
 private:
 /// bitfield
@@ -336,7 +336,7 @@ public:
 
 //
 
-class SAL_WARN_UNUSED LineEndLB : public ListBox
+class SVX_DLLPUBLIC SAL_WARN_UNUSED LineEndLB : public ListBox
 {
 
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx

2015-04-15 Thread Caolán McNamara
 include/svx/dlgctrl.hxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6276ce0f6cb9a9d4251400fd5fd14ee3f259ab62
Author: Caolán McNamara 
Date:   Wed Apr 15 17:02:48 2015 +0100

fix SAL_WARN_UNUSED placement

Change-Id: If387e8d9371bc752c782533a1bdeb3dc8902dd34

diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index ddf50b5..91191d9 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -285,7 +285,7 @@ private:
 
 //
 
-class FillAttrLB SAL_WARN_UNUSED : public ColorListBox
+class SAL_WARN_UNUSED FillAttrLB : public ColorListBox
 {
 private:
 BitmapExmaBitmapEx;
@@ -301,7 +301,7 @@ public:
 
 //
 
-class FillTypeLB SAL_WARN_UNUSED : public ListBox
+class SAL_WARN_UNUSED FillTypeLB : public ListBox
 {
 
 public:
@@ -313,7 +313,7 @@ public:
 
 //
 
-class SVX_DLLPUBLIC SAL_WARN_UNUSED LineLB : public ListBox
+class SAL_WARN_UNUSED LineLB : public ListBox
 {
 private:
 /// bitfield
@@ -336,7 +336,7 @@ public:
 
 //
 
-class SVX_DLLPUBLIC SAL_WARN_UNUSED LineEndLB : public ListBox
+class SAL_WARN_UNUSED LineEndLB : public ListBox
 {
 
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx

2015-04-15 Thread Caolán McNamara
 include/svx/dataaccessdescriptor.hxx  |2 +-
 include/svx/databaselocationinput.hxx |2 +-
 include/svx/dbaexchange.hxx   |6 +++---
 include/svx/dbaobjectex.hxx   |2 +-
 include/svx/dbcharsethelper.hxx   |2 +-
 include/svx/deflt3d.hxx   |2 +-
 include/svx/dialcontrol.hxx   |   12 +++-
 include/svx/dlgctl3d.hxx  |6 +++---
 include/svx/dlgctrl.hxx   |   32 
 include/svx/drawitem.hxx  |   16 ++--
 10 files changed, 36 insertions(+), 46 deletions(-)

New commits:
commit 5537b135dfc4c499112fd4d1ef6ca6866f65c9bc
Author: Caolán McNamara 
Date:   Wed Apr 15 16:44:06 2015 +0100

add some SAL_WARN_UNUSED

Change-Id: I6b8fb1d9b76f586a9a27d53f90e7686fcdf35077

diff --git a/include/svx/dataaccessdescriptor.hxx 
b/include/svx/dataaccessdescriptor.hxx
index abc813b..2a91fa2 100644
--- a/include/svx/dataaccessdescriptor.hxx
+++ b/include/svx/dataaccessdescriptor.hxx
@@ -61,7 +61,7 @@ namespace svx
 
 /** class encapsulating the com::sun::star::sdb::DataAccessDescriptor 
service.
 */
-class SVX_DLLPUBLIC ODataAccessDescriptor
+class SVX_DLLPUBLIC SAL_WARN_UNUSED ODataAccessDescriptor
 {
 protected:
 ODADescriptorImpl*  m_pImpl;
diff --git a/include/svx/databaselocationinput.hxx 
b/include/svx/databaselocationinput.hxx
index 373305c..69760de 100644
--- a/include/svx/databaselocationinput.hxx
+++ b/include/svx/databaselocationinput.hxx
@@ -45,7 +45,7 @@ namespace svx
 
 This helper class controls such two UI elements.
 */
-class SVX_DLLPUBLIC DatabaseLocationInputController
+class SVX_DLLPUBLIC SAL_WARN_UNUSED DatabaseLocationInputController
 {
 public:
 DatabaseLocationInputController(
diff --git a/include/svx/dbaexchange.hxx b/include/svx/dbaexchange.hxx
index eed5b2c..68bd1eb 100644
--- a/include/svx/dbaexchange.hxx
+++ b/include/svx/dbaexchange.hxx
@@ -40,7 +40,7 @@ namespace svx
 
 //= OColumnTransferable
 
-class SVX_DLLPUBLIC OColumnTransferable : public TransferableHelper
+class SVX_DLLPUBLIC SAL_WARN_UNUSED OColumnTransferable : public 
TransferableHelper
 {
 protected:
 ODataAccessDescriptor   m_aDescriptor;
@@ -166,7 +166,7 @@ namespace svx
 
 /** class for transferring data access objects (tables, queries, 
statements ...)
 */
-class SVX_DLLPUBLIC ODataAccessObjectTransferable : public 
TransferableHelper
+class SVX_DLLPUBLIC SAL_WARN_UNUSED ODataAccessObjectTransferable : public 
TransferableHelper
 {
 ODataAccessDescriptor   m_aDescriptor;
 OUString m_sCompatibleObjectDescription;
@@ -254,7 +254,7 @@ namespace svx
 
 /** class for transferring multiple columns
 */
-class SVX_DLLPUBLIC OMultiColumnTransferable : public TransferableHelper
+class SVX_DLLPUBLIC SAL_WARN_UNUSED OMultiColumnTransferable : public 
TransferableHelper
 {
 ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue >   m_aDescriptors;
 
diff --git a/include/svx/dbaobjectex.hxx b/include/svx/dbaobjectex.hxx
index 2592d63..57f9844 100644
--- a/include/svx/dbaobjectex.hxx
+++ b/include/svx/dbaobjectex.hxx
@@ -36,7 +36,7 @@ namespace svx
 
 //= OComponentTransferable
 
-class SVX_DLLPUBLIC OComponentTransferable : public TransferableHelper
+class SVX_DLLPUBLIC SAL_WARN_UNUSED OComponentTransferable : public 
TransferableHelper
 {
 protected:
 ODataAccessDescriptor   m_aDescriptor;
diff --git a/include/svx/dbcharsethelper.hxx b/include/svx/dbcharsethelper.hxx
index 3676988..ad02bd9 100644
--- a/include/svx/dbcharsethelper.hxx
+++ b/include/svx/dbcharsethelper.hxx
@@ -30,7 +30,7 @@ namespace svxform
 
 //= ODataAccessCharsetHelper
 
-class SVX_DLLPUBLIC ODataAccessCharsetHelper
+class SVX_DLLPUBLIC SAL_WARN_UNUSED ODataAccessCharsetHelper
 {
 protected:
 mutable ::rtl::Reference< ::connectivity::simple::IDataAccessCharSet > 
 m_xCharsetHelper;
diff --git a/include/svx/deflt3d.hxx b/include/svx/deflt3d.hxx
index 0f2d96c..29cba8a 100644
--- a/include/svx/deflt3d.hxx
+++ b/include/svx/deflt3d.hxx
@@ -31,7 +31,7 @@
 |*
 \/
 
-class SVX_DLLPUBLIC E3dDefaultAttributes
+class SVX_DLLPUBLIC SAL_WARN_UNUSED E3dDefaultAttributes
 {
 private:
 // Compound object
diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx
index 38b60e3..36ac077 100644
--- a/include/svx/dialcontrol.hxx
+++ b/include/svx/dialcontrol.hxx
@@ -31,7 +31,7 @@ namespace svx {
 
 
 
-class DialControlBmp : public VirtualDevice
+class SAL_WARN_UNUSED DialControlBmp : public VirtualDevice
 {
 public:
 explicitDialControlBmp( vcl::Window& rParent );
@@ -75,7 +75,7 @@ private:
 -   Shows the value entered/modified in the numeric field.
 -   Enables/disables/shows/hides the f

[Libreoffice-commits] core.git: include/svx svx/source

2015-04-15 Thread Caolán McNamara
 include/svx/contdlg.hxx|   13 -
 svx/source/dialog/_contdlg.cxx |   17 -
 2 files changed, 30 deletions(-)

New commits:
commit 9c6021e115aca5af9d259e5e3f302c472a60bfdd
Author: Caolán McNamara 
Date:   Wed Apr 15 16:38:03 2015 +0100

and SvxContourDlgItem is also unused now

Change-Id: I9696123d8ce9cd69520921cd19cf26e3f60bc61a

diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx
index 11d6c88..94820eb 100644
--- a/include/svx/contdlg.hxx
+++ b/include/svx/contdlg.hxx
@@ -46,19 +46,6 @@ public:
 
 class SvxSuperContourDlg;
 
-class SAL_WARN_UNUSED SvxContourDlgItem : public SfxControllerItem
-{
-SvxSuperContourDlg& rDlg;
-
-protected:
-
-virtual voidStateChanged( sal_uInt16 nSID, SfxItemState eState, 
const SfxPoolItem* pState ) SAL_OVERRIDE;
-
-public:
-
-SvxContourDlgItem( sal_uInt16 nId, SvxSuperContourDlg& 
rDlg, SfxBindings& rBindings );
-};
-
 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxContourDlg : public SfxFloatingWindow
 {
 using Window::Update;
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index f2ccdb8..6888e79 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -46,23 +46,6 @@
 
 SFX_IMPL_FLOATINGWINDOW_WITHID( SvxContourDlgChildWindow, SID_CONTOUR_DLG );
 
-SvxContourDlgItem::SvxContourDlgItem( sal_uInt16 _nId, SvxSuperContourDlg& 
rContourDlg, SfxBindings& rBindings ) :
-SfxControllerItem   ( _nId, rBindings ),
-rDlg( rContourDlg )
-{
-}
-
-void SvxContourDlgItem::StateChanged( sal_uInt16 nSID, SfxItemState 
/*eState*/, const SfxPoolItem* pItem )
-{
-if ( pItem && ( SID_CONTOUR_EXEC == nSID ) )
-{
-const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
-assert(pStateItem); //SfxBoolItem expected
-if (pStateItem)
-rDlg.SetExecState(!pStateItem->GetValue());
-}
-}
-
 SvxContourDlgChildWindow::SvxContourDlgChildWindow( vcl::Window* _pParent, 
sal_uInt16 nId,
 SfxBindings* pBindings, 
SfxChildWinInfo* pInfo ) :
 SfxChildWindow( _pParent, nId )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx svx/source

2015-04-15 Thread Caolán McNamara
 include/svx/bmpmask.hxx|   21 -
 svx/source/dialog/_bmpmask.cxx |   21 -
 2 files changed, 42 deletions(-)

New commits:
commit ec2f7dfe225104515db87645dfeb1e1924a05d6f
Author: Caolán McNamara 
Date:   Wed Apr 15 16:35:59 2015 +0100

and now SvxBmpMaskSelectItem is unused

Change-Id: I76993ffb0dd347afe4f114431e8c12922d5c6882

diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx
index 752b0b4..8e5b3f1 100644
--- a/include/svx/bmpmask.hxx
+++ b/include/svx/bmpmask.hxx
@@ -31,27 +31,6 @@
 
 /*
 |*
-|*  class SvxBmpMaskSelectItem
-|*
-\/
-class SvxBmpMask;
-
-class SAL_WARN_UNUSED SvxBmpMaskSelectItem : public SfxControllerItem
-{
-private:
-SvxBmpMask  &rBmpMask;
-
-protected:
-virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
-   const SfxPoolItem* pState ) SAL_OVERRIDE;
-
-public:
-SvxBmpMaskSelectItem( sal_uInt16 nId, SvxBmpMask& rMask,
-  SfxBindings& rBindings );
-};
-
-/*
-|*
 |* Derivative from SfxChildWindow as 'container' for Float
 |*
 \/
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index c4a2822..f49fd93 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -337,27 +337,6 @@ void ColorWindow::Paint( const Rectangle &/*Rect*/ )
 SetFillColor( rOldFillColor );
 }
 
-SvxBmpMaskSelectItem::SvxBmpMaskSelectItem( sal_uInt16 nId_, SvxBmpMask& rMask,
-SfxBindings& rBindings ) :
-SfxControllerItem   ( nId_, rBindings ),
-rBmpMask( rMask)
-{
-}
-
-
-
-void SvxBmpMaskSelectItem::StateChanged( sal_uInt16 nSID, SfxItemState 
/*eState*/,
- const SfxPoolItem* pItem )
-{
-if ( ( nSID == SID_BMPMASK_EXEC ) && pItem )
-{
-const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
-assert(pStateItem); //SfxBoolItem erwartet
-if (pStateItem)
-rBmpMask.SetExecState( pStateItem->GetValue() );
-}
-}
-
 SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 
nId,
  SfxBindings* pBindings,
  SfxChildWinInfo* pInfo)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2015-04-15 Thread Caolán McNamara
 sc/source/filter/excel/xelink.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 3bf27eaa9f524e3b6ae2a3eec47368f63b3aeeed
Author: Caolán McNamara 
Date:   Wed Apr 15 16:27:18 2015 +0100

don't crash on export of fdo60087-2.xlsx to xls

Change-Id: I28bc88deea16c46895d29f25526bd3c44ce7

diff --git a/sc/source/filter/excel/xelink.cxx 
b/sc/source/filter/excel/xelink.cxx
index 87b7251..df22f98 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -766,14 +766,14 @@ XclExpTabInfo::XclExpTabInfo( const XclExpRoot& rRoot ) :
 bool XclExpTabInfo::IsExportTab( SCTAB nScTab ) const
 {
 /*  Check sheet index before to avoid assertion in GetFlag(). */
-return (nScTab < mnScCnt) && !GetFlag( nScTab, EXC_TABBUF_SKIPMASK );
+return (nScTab < mnScCnt && nScTab >= 0) && !GetFlag( nScTab, 
EXC_TABBUF_SKIPMASK );
 }
 
 bool XclExpTabInfo::IsExternalTab( SCTAB nScTab ) const
 {
 /*  Check sheet index before to avoid assertion (called from formula
 compiler also for deleted references). */
-return (nScTab < mnScCnt) && GetFlag( nScTab, EXC_TABBUF_EXTERN );
+return (nScTab < mnScCnt && nScTab >= 0) && GetFlag( nScTab, 
EXC_TABBUF_EXTERN );
 }
 
 bool XclExpTabInfo::IsVisibleTab( SCTAB nScTab ) const
@@ -788,7 +788,7 @@ bool XclExpTabInfo::IsSelectedTab( SCTAB nScTab ) const
 
 bool XclExpTabInfo::IsDisplayedTab( SCTAB nScTab ) const
 {
-OSL_ENSURE( nScTab < mnScCnt, "XclExpTabInfo::IsActiveTab - sheet out of 
range" );
+OSL_ENSURE( nScTab < mnScCnt && nScTab >= 0, "XclExpTabInfo::IsActiveTab - 
sheet out of range" );
 return GetXclTab( nScTab ) == mnDisplXclTab;
 }
 
@@ -799,31 +799,31 @@ bool XclExpTabInfo::IsMirroredTab( SCTAB nScTab ) const
 
 OUString XclExpTabInfo::GetScTabName( SCTAB nScTab ) const
 {
-OSL_ENSURE( nScTab < mnScCnt, "XclExpTabInfo::IsActiveTab - sheet out of 
range" );
-return (nScTab < mnScCnt) ? maTabInfoVec[ nScTab ].maScName : OUString();
+OSL_ENSURE( nScTab < mnScCnt && nScTab >= 0, "XclExpTabInfo::IsActiveTab - 
sheet out of range" );
+return (nScTab < mnScCnt && nScTab >= 0) ? maTabInfoVec[ nScTab ].maScName 
: OUString();
 }
 
 sal_uInt16 XclExpTabInfo::GetXclTab( SCTAB nScTab ) const
 {
-return (nScTab < mnScCnt) ? maTabInfoVec[ nScTab ].mnXclTab : 
EXC_TAB_DELETED;
+return (nScTab < mnScCnt && nScTab >= 0) ? maTabInfoVec[ nScTab ].mnXclTab 
: EXC_TAB_DELETED;
 }
 
 SCTAB XclExpTabInfo::GetRealScTab( SCTAB nSortedScTab ) const
 {
-OSL_ENSURE( nSortedScTab < mnScCnt, "XclExpTabInfo::GetRealScTab - sheet 
out of range" );
-return (nSortedScTab < mnScCnt) ? maFromSortedVec[ nSortedScTab ] : 
SCTAB_INVALID;
+OSL_ENSURE( nSortedScTab < mnScCnt && nSortedScTab >= 0, 
"XclExpTabInfo::GetRealScTab - sheet out of range" );
+return (nSortedScTab < mnScCnt && nSortedScTab >= 0) ? maFromSortedVec[ 
nSortedScTab ] : SCTAB_INVALID;
 }
 
 bool XclExpTabInfo::GetFlag( SCTAB nScTab, sal_uInt8 nFlags ) const
 {
-OSL_ENSURE( nScTab < mnScCnt, "XclExpTabInfo::GetFlag - sheet out of 
range" );
-return (nScTab < mnScCnt) && ::get_flag( maTabInfoVec[ nScTab ].mnFlags, 
nFlags );
+OSL_ENSURE( nScTab < mnScCnt && nScTab >= 0, "XclExpTabInfo::GetFlag - 
sheet out of range" );
+return (nScTab < mnScCnt && nScTab >= 0) && ::get_flag( maTabInfoVec[ 
nScTab ].mnFlags, nFlags );
 }
 
 void XclExpTabInfo::SetFlag( SCTAB nScTab, sal_uInt8 nFlags, bool bSet )
 {
-OSL_ENSURE( nScTab < mnScCnt, "XclExpTabInfo::SetFlag - sheet out of 
range" );
-if( nScTab < mnScCnt )
+OSL_ENSURE( nScTab < mnScCnt && nScTab >= 0, "XclExpTabInfo::SetFlag - 
sheet out of range" );
+if( nScTab < mnScCnt && nScTab >= 0 )
 ::set_flag( maTabInfoVec[ nScTab ].mnFlags, nFlags, bSet );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: DocumentEventListener problem

2015-04-15 Thread Stephan Bergmann

On 04/15/2015 02:18 PM, Piet van Oostrum wrote:

Anyway, this makes it almost impossible to use listeners across the UNO bridge. 
When I run my code as a macro inside LO there is no problem.


Why do you need to remove and then re-add the MyEventListener during the 
dumentEventOccured call anyway?


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: include/svx svx/source

2015-04-15 Thread Stephan Bergmann
 include/svx/bmpmask.hxx|1 -
 svx/source/dialog/_bmpmask.cxx |1 -
 svx/source/dialog/_contdlg.cxx |1 -
 svx/source/dialog/contimp.hxx  |1 -
 4 files changed, 4 deletions(-)

New commits:
commit 0e08fb803ff5535a60bd9e87c0528702d001148d
Author: Stephan Bergmann 
Date:   Wed Apr 15 17:22:22 2015 +0200

-Werror,-Wunused-private-field

Change-Id: I90cb42aff1d57a92f371d339b0be7c71b1a15ff8

diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx
index cfd31a3..752b0b4 100644
--- a/include/svx/bmpmask.hxx
+++ b/include/svx/bmpmask.hxx
@@ -111,7 +111,6 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxBmpMask : public 
SfxDockingWindow
 
 XColorListRef   pColLst;
 Color   aPipetteColor;
-SvxBmpMaskSelectItem aSelItem;
 
 virtual boolClose() SAL_OVERRIDE;
 
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 984eb16..c4a2822 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -377,7 +377,6 @@ SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, 
SfxChildWindow *pCW, vcl::Window*
"svx/ui/dockingcolorreplace.ui" )
 , pData(new MaskData(this, *pBindinx))
 , aPipetteColor(COL_WHITE)
-, aSelItem(SID_BMPMASK_EXEC, *this, *pBindinx)
 {
 get(m_pTbxPipette, "toolbar");
 m_pTbxPipette->SetItemBits(m_pTbxPipette->GetItemId(0),
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index c94ed56..f2ccdb8 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -203,7 +203,6 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings 
*_pBindings, SfxChildWindow *
 SvxContourDlg   ( _pBindings, pCW, _pParent ),
 pUpdateEditingObject( NULL ),
 pCheckObj   ( NULL ),
-aContourItem( SID_CONTOUR_EXEC, *this, *_pBindings ),
 nGrfChanged ( 0UL ),
 bExecState  ( false ),
 bUpdateGraphicLinked( false ),
diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx
index 7b73b28..45722b2 100644
--- a/svx/source/dialog/contimp.hxx
+++ b/svx/source/dialog/contimp.hxx
@@ -41,7 +41,6 @@ class SvxSuperContourDlg : public SvxContourDlg
 SizeaLastSize;
 void*   pUpdateEditingObject;
 void*   pCheckObj;
-SvxContourDlgItem   aContourItem;
 ToolBox*m_pTbx1;
 MetricField*m_pMtfTolerance;
 ContourWindow*  m_pContourWnd;
___
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' - sw/source

2015-04-15 Thread Caolán McNamara
 sw/source/core/layout/paintfrm.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7ede9572e86a907f7cce8debba732d07b6b45923
Author: Caolán McNamara 
Date:   Wed Apr 15 11:11:03 2015 +0100

fix crash on re-export of fdo39974-1.odt to odt

(cherry picked from commit c2c22d26db03949771d5a0bb4f8abf6d2dc850ea)

sw: DrawFillAttributes: move check for empty rPaintRegion

Tweak c2c22d26db03949771d5a0bb4f8abf6d2dc850ea a bit: if the paint
region is empty, nothing should be painted.

(cherry picked from commit dc6a6475bcc7625a648e840de97ebd7a1ab03270)

Change-Id: Ib4246987a3665f655ad44339ade0350b074c3266
Reviewed-on: https://gerrit.libreoffice.org/15329
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 5557de3..7c395fb 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1858,7 +1858,8 @@ bool DrawFillAttributes(
 rPaintRegion.GetOrigin().Right(),
 rPaintRegion.GetOrigin().Bottom());
 
-if(!aPaintRange.isEmpty() &&
+if (!aPaintRange.isEmpty() &&
+!rPaintRegion.empty() &&
 !basegfx::fTools::equalZero(aPaintRange.getWidth()) &&
 !basegfx::fTools::equalZero(aPaintRange.getHeight()))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-04-15 Thread Caolán McNamara
 sfx2/source/appl/fileobj.cxx |   20 +---
 sfx2/source/appl/fileobj.hxx |2 ++
 2 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit 54e13b65a225dbb0778eb0bb6460dfa849064e0f
Author: Caolán McNamara 
Date:   Wed Apr 15 12:48:47 2015 +0100

fix crash on re-export of fdo50057-2.odt to odt

(cherry picked from commit 66c9aec156d974b939b680dccbb27e18fb153a23)

Conflicts:
sfx2/source/appl/fileobj.hxx

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

diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index e123285..7ae5b6e 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -47,7 +47,9 @@
 #define FILETYPE_OBJECT 3
 
 SvFileObject::SvFileObject()
-: pOldParent(NULL)
+: nPostUserEventId(0)
+, pDelMed(NULL)
+, pOldParent(NULL)
 , nType(FILETYPE_TEXT)
 , bLoadAgain(true)
 , bSynchron(false)
@@ -64,14 +66,16 @@ SvFileObject::SvFileObject()
 
 SvFileObject::~SvFileObject()
 {
-if ( xMed.Is() )
+if (xMed.Is())
 {
 xMed->SetDoneLink( Link() );
 xMed.Clear();
 }
+if (nPostUserEventId)
+Application::RemoveUserEvent(nPostUserEventId);
+delete pDelMed;
 }
 
-
 bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
 const OUString & rMimeType,
 bool bGetSynchron )
@@ -482,10 +486,10 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, 
EMPTYARG )
 if( pThis->xMed.Is() )
 {
 pThis->xMed->SetDoneLink( Link() );
-
-Application::PostUserEvent(
+pThis->pDelMed = new SfxMediumRef(pThis->xMed);
+pThis->nPostUserEventId = Application::PostUserEvent(
 STATIC_LINK( pThis, SvFileObject, DelMedium_Impl ),
-new SfxMediumRef( pThis->xMed ));
+pThis->pDelMed);
 pThis->xMed.Clear();
 }
 }
@@ -495,7 +499,9 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, 
EMPTYARG )
 
 IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
 {
-(void)pThis;
+pThis->nPostUserEventId = 0;
+assert(pThis->pDelMed == pDelMed);
+pThis->pDelMed = NULL;
 delete pDelMed;
 return 0;
 }
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index d43e1eb..5e602b7 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -33,6 +33,8 @@ class SvFileObject : public sfx2::SvLinkSource
 OUStringsReferer;
 LinkaEndEditLink;
 SfxMediumRefxMed;
+ImplSVEvent*nPostUserEventId;
+SfxMediumRef*   pDelMed;
 Window* pOldParent;
 
 sal_uInt8 nType;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 4 commits - sfx2/source solenv/bin starmath/Library_sm.mk starmath/source starmath/util sw/qa writerfilter/source

2015-04-15 Thread Miklos Vajna
 sfx2/source/doc/objcont.cxx |   10 +-
 solenv/bin/create-tags  |3 
 starmath/Library_sm.mk  |1 
 starmath/source/unofilter.cxx   |  131 
 starmath/util/sm.component  |4 
 sw/qa/extras/odfexport/odfexport.cxx|   20 
 sw/qa/extras/ooxmlimport/data/mathtype.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx|9 +
 writerfilter/source/dmapper/OLEHandler.cxx  |   19 +++-
 9 files changed, 190 insertions(+), 7 deletions(-)

New commits:
commit 0c1434196e4ba0ef97c2f33c2335647410ad5ff8
Author: Miklos Vajna 
Date:   Wed Apr 15 16:57:42 2015 +0200

sfx2: silence bogus SfxObjectShell::isTiledRendering() warnings

It's expected that e.g. the basic ide doesn't override these methods.

Change-Id: Ie32002c8416c5c0cd81ddf010fa5156b0698560e

diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 6fdc691..1a5452f 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -643,12 +643,14 @@ bool SfxObjectShell::IsModifyPasswordEntered()
 return pImp->m_bModifyPasswordEntered;
 }
 
-void SfxObjectShell::libreOfficeKitCallback(SAL_UNUSED_PARAMETER int nType, 
SAL_UNUSED_PARAMETER const char* pPayload) const {
-SAL_WARN("tiled-rendering", "LOK callback interface not overridden for 
SfxObjectShell subclass typeId: " << typeid(*this).name());
+void SfxObjectShell::libreOfficeKitCallback(SAL_UNUSED_PARAMETER int nType, 
SAL_UNUSED_PARAMETER const char* pPayload) const
+{
+SAL_INFO("tiled-rendering", "SfxObjectShell::libreOfficeKitCallback 
interface not overridden for SfxObjectShell subclass typeId: " << 
typeid(*this).name());
 }
 
-bool SfxObjectShell::isTiledRendering() const {
-SAL_WARN("tiled-rendering", "LOK callback interface not overridden for 
SfxObjectShell subclass typeId: " << typeid(*this).name());
+bool SfxObjectShell::isTiledRendering() const
+{
+SAL_INFO("tiled-rendering", "SfxObjectShell::isTiledRendering interface 
not overridden for SfxObjectShell subclass typeId: " << typeid(*this).name());
 return false;
 }
 
commit 791d8b4f1f656a8553c25fe9034ca8a350efaaae
Author: Miklos Vajna 
Date:   Wed Apr 15 15:41:11 2015 +0200

DOCX import: convert MathType to Math if MathTypeToMath is enabled

With this, math equations created by Word <= 2003 and embedded to docx
files can be edited finally. Previously the result was read-only and
opened in an unexpected new window.

Change-Id: I4f9dd1cca4a149959f6151cf9af9242b53190ef5

diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 3ab9bc7..848bec8 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -49,6 +49,26 @@ public:
 
 return std::find(aBlacklist.begin(), aBlacklist.end(), filename) == 
aBlacklist.end();
 }
+
+virtual void preTest(const char* pFilename) SAL_OVERRIDE
+{
+if (OString(pFilename) == "fdo58949.docx")
+{
+std::shared_ptr 
pBatch(comphelper::ConfigurationChanges::create());
+
officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(false,
 pBatch);
+pBatch->commit();
+}
+}
+
+virtual void postTest(const char* pFilename) SAL_OVERRIDE
+{
+if (OString(pFilename) == "fdo58949.docx")
+{
+std::shared_ptr 
pBatch(comphelper::ConfigurationChanges::create());
+
officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(true, 
pBatch);
+pBatch->commit();
+}
+}
 };
 
 DECLARE_ODFEXPORT_TEST(testFdo38244, "fdo38244.odt")
diff --git a/sw/qa/extras/ooxmlimport/data/mathtype.docx 
b/sw/qa/extras/ooxmlimport/data/mathtype.docx
new file mode 100644
index 000..bf60f43
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/mathtype.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index bf54c2d..107060f 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2647,6 +2647,15 @@ DECLARE_OOXMLIMPORT_TEST(testFdo87488, "fdo87488.docx")
 }
 }
 
+DECLARE_OOXMLIMPORT_TEST(mathtype, "mathtype.docx")
+{
+uno::Reference 
xTextEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), 
uno::UNO_QUERY);
+// This failed as the Model property was empty.
+auto xModel = getProperty< uno::Reference 
>(xEmbeddedObjects->getByIndex(0), "Model");
+
CPPUNIT_ASSERT(xModel->supportsService("com.sun.star.formula.FormulaProperties"));
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx 
b/writerfilter/source/dmapper/OLEHandler.cxx
index b04c927..328d2d7 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/wr

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

2015-04-15 Thread Caolán McNamara
 sfx2/source/appl/fileobj.cxx |   20 +---
 sfx2/source/appl/fileobj.hxx |4 +++-
 2 files changed, 16 insertions(+), 8 deletions(-)

New commits:
commit 2baea0120f7436e37b6f2564ca88befda5da34a3
Author: Caolán McNamara 
Date:   Wed Apr 15 12:48:47 2015 +0100

fix crash on re-export of fdo50057-2.odt to odt

Change-Id: Ice7a754dd4f42b5cf62ae2038b63d893b8a92fd8
(cherry picked from commit 66c9aec156d974b939b680dccbb27e18fb153a23)
Reviewed-on: https://gerrit.libreoffice.org/15324
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 8876145..88f1e05 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -47,7 +47,9 @@
 #define FILETYPE_OBJECT 3
 
 SvFileObject::SvFileObject()
-: pOldParent(NULL)
+: nPostUserEventId(0)
+, pDelMed(NULL)
+, pOldParent(NULL)
 , nType(FILETYPE_TEXT)
 , bLoadAgain(true)
 , bSynchron(false)
@@ -64,14 +66,16 @@ SvFileObject::SvFileObject()
 
 SvFileObject::~SvFileObject()
 {
-if ( xMed.Is() )
+if (xMed.Is())
 {
 xMed->SetDoneLink( Link() );
 xMed.Clear();
 }
+if (nPostUserEventId)
+Application::RemoveUserEvent(nPostUserEventId);
+delete pDelMed;
 }
 
-
 bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
 const OUString & rMimeType,
 bool bGetSynchron )
@@ -482,10 +486,10 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, 
EMPTYARG )
 if( pThis->xMed.Is() )
 {
 pThis->xMed->SetDoneLink( Link() );
-
-Application::PostUserEvent(
+pThis->pDelMed = new SfxMediumRef(pThis->xMed);
+pThis->nPostUserEventId = Application::PostUserEvent(
 STATIC_LINK( pThis, SvFileObject, DelMedium_Impl ),
-new SfxMediumRef( pThis->xMed ));
+pThis->pDelMed);
 pThis->xMed.Clear();
 }
 }
@@ -495,7 +499,9 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, 
EMPTYARG )
 
 IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
 {
-(void)pThis;
+pThis->nPostUserEventId = 0;
+assert(pThis->pDelMed == pDelMed);
+pThis->pDelMed = NULL;
 delete pDelMed;
 return 0;
 }
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 78aa1fb..85fb53b 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -33,7 +33,9 @@ class SvFileObject : public sfx2::SvLinkSource
 OUStringsReferer;
 LinkaEndEditLink;
 SfxMediumRefxMed;
-vcl::Window* pOldParent;
+ImplSVEvent*nPostUserEventId;
+SfxMediumRef*   pDelMed;
+vcl::Window*pOldParent;
 
 sal_uInt8 nType;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Inserting Graphics in a Writer document

2015-04-15 Thread Niklas Johansson
If I were you I would set the Anchor before I insert the image into the 
document. So change the order of these lines:


xText.insertTextContent(cursor, oGraphic, False)
# Setting the anchor type - must be done first, otherwise the graphic will 
be put after the //
oGraphic.AnchorType = AS_CHARACTER

Once the image is inserted into the document you won't always be able to 
change the anchor as you try to do in the code above. For some reason it 
works in your first example but as you can see it won't work in your 
second example.


So remember to always change the anchor of the graphic before you insert 
it otherwise you'll get more of these nice surprises. If I remember 
correctly there are a few more settings that should be done to the 
graphic object before it's inserted and some that needs to be set after, 
but I don't remember the details at the moment.


It seems that what is happening in the second case is that the image 
gets inserted before the anchor-change and when the re-anchoring occurs 
the image is already in the wrong position.


Regards,
Niklas Johansson

Piet van Oostrum skrev den 2015-04-15 16:00:

Hello,

I am in the process of converting several Java LO programming examples to 
Python. My plan is to do all (or most) of them. Also I try to extend them. 
However I encountered some surprises.

I converted LibreOffice4.4_SDK/examples/java/Text/GraphicsInserter.java which 
inserts a graphic image in a new Writer document. Works without problems.

Then I decided to add some text also, and put the picture in the middle of the 
text.

The code goes like this:

 # Create a new Writer document, which will be automatically displayed
 doc = Desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, 
())

 # Getting the text
 xText = doc.getText()

 # Getting a cursor on the document
 xTextCursor = xText.createTextCursor()

 # Inserting some text
 xText.insertString(xTextCursor, "This is the first paragraph.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "Some text before the graphic. ", False)

 # Insert the graphic
 insertGraphic(doc, xText, xTextCursor, sUrl)

 # Inserting some more text
 xText.insertString(xTextCursor, "Some text after the graphic.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "This is the second paragraph.", False)

def insertGraphic(doc, xText, cursor, sUrl):
 oGraphic = doc.createInstance("com.sun.star.text.TextGraphicObject")
 xText.insertString(cursor, "++", False)
 # Insert graphic between ++ and //
 xText.insertTextContent(cursor, oGraphic, False)
 # Setting the anchor type - must be done first, otherwise the graphic will 
be put after the //
 oGraphic.AnchorType = AS_CHARACTER
 xText.insertString(cursor, "//", False)
 # Setting the graphic url
 oGraphic.GraphicURL = sUrl

 # Setting the width and height
 oGraphic.Width = 2000
 oGraphic.Height = 2000

The image is inserted in the middle of a paragraph and surrounded by ++ and // 
to indicate where it should be. This also works without problems.

Then I decided to change the order. First I insert all text; then I go back to 
the insertion point and insert the image. To my surprise the image ended up a 
couple of words later in the text

The insertion code is then:

 # Inserting some text
 xText.insertString(xTextCursor, "This is the first paragraph.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "Some text before the graphic. ", False)

 # Inserting some more text
 xText.insertString(xTextCursor, "Some text after the graphic.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "This is the second paragraph.", False)

 # Move the cursor
 xTextCursor.gotoPreviousParagraph(False)
 xTextCursor.gotoNextSentence(False)
 
 # Insert the graphic

 insertGraphic(doc, xText, xTextCursor, sUrl)

Now I would expect ++Image// to be found just before "Some text after the graphic." 
However the ++// is indeed inserted there, but the image appears after "Some text after 
the", 4 words later. The image is indeed anchored to this position, as I can see when I 
manually insert some more text before it. So it is not a matter of an offset.

I have also tried to create another cursor with the endpoint of xTextCursor 
between the two sentences, and then use this to insert the graphic but that 
doesn't help.

Does anybody know what is happening here?


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/vclptr' - cui/source

2015-04-15 Thread Noel Grandin
 cui/source/tabpages/autocdlg.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 70198102be405da5a50e3c813fc42a39a4c9a398
Author: Noel Grandin 
Date:   Wed Apr 15 16:42:09 2015 +0200

loplugin:cstylecast

Change-Id: Iba70d0e7fc7cf4829e709efd25e8125353379942

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 3a82df4..7a7373b 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1686,7 +1686,7 @@ void OfaAutocorrExceptPage::Reset( const SfxItemSet* )
 
 IMPL_LINK(OfaAutocorrExceptPage, NewDelHdl, void*, pBtn)
 {
-if((pBtn == m_pNewAbbrevPB || pBtn == (PushButton*)m_pAbbrevED.get() )
+if((pBtn == m_pNewAbbrevPB || pBtn == m_pAbbrevED.get() )
 && !m_pAbbrevED->GetText().isEmpty())
 {
 m_pAbbrevLB->InsertEntry(m_pAbbrevED->GetText());
@@ -1697,7 +1697,7 @@ IMPL_LINK(OfaAutocorrExceptPage, NewDelHdl, void*, pBtn)
 m_pAbbrevLB->RemoveEntry(m_pAbbrevED->GetText());
 ModifyHdl(m_pAbbrevED);
 }
-else if((pBtn == m_pNewDoublePB || pBtn == 
(PushButton*)m_pDoubleCapsED.get() )
+else if((pBtn == m_pNewDoublePB || pBtn == m_pDoubleCapsED.get() )
 && !m_pDoubleCapsED->GetText().isEmpty())
 {
 m_pDoubleCapsLB->InsertEntry(m_pDoubleCapsED->GetText());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source

2015-04-15 Thread Caolán McNamara
 oox/source/export/vmlexport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bdec405ed5017c432ef4f1efeb2e78ccd37fdc7b
Author: Caolán McNamara 
Date:   Wed Apr 15 15:39:40 2015 +0100

don't crash on export of ooo52825-1.doc to .docx

Change-Id: I944f65c9bf1cf7cc39e674bab602dbf2d499317c

diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index d3e8291..570416d 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -523,7 +523,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, 
const Rectangle& rRect
 // See 
EscherPropertyContainer::CreateCustomShapeProperties, by default nSeg is simply 
the number of points.
 // FIXME: we miss out a significant amount 
of complexity from
 // the above method here, and do some 
rather odd things to match.
-int nElems = aVertices.nPropSize / ( 
nPointSize * 2);
+int nElems = !nPointSize ? 0 : 
aVertices.nPropSize / (nPointSize * 2);
 if (nSeg > nElems)
 {
 SAL_WARN("oox", "Busted escher export 
" << nSeg << "vs . " << nElems << " truncating point stream");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Inserting Graphics in a Writer document

2015-04-15 Thread SOS


On 15/04/2015 16:00, Piet van Oostrum wrote:

Hello,

I am in the process of converting several Java LO programming examples to 
Python. My plan is to do all (or most) of them. Also I try to extend them. 
However I encountered some surprises.

I converted LibreOffice4.4_SDK/examples/java/Text/GraphicsInserter.java which 
inserts a graphic image in a new Writer document. Works without problems.

Then I decided to add some text also, and put the picture in the middle of the 
text.

The code goes like this:

 # Create a new Writer document, which will be automatically displayed
 doc = Desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, 
())

 # Getting the text
 xText = doc.getText()

 # Getting a cursor on the document
 xTextCursor = xText.createTextCursor()

 # Inserting some text
 xText.insertString(xTextCursor, "This is the first paragraph.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "Some text before the graphic. ", False)

 # Insert the graphic
 insertGraphic(doc, xText, xTextCursor, sUrl)

 # Inserting some more text
 xText.insertString(xTextCursor, "Some text after the graphic.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "This is the second paragraph.", False)

def insertGraphic(doc, xText, cursor, sUrl):
 oGraphic = doc.createInstance("com.sun.star.text.TextGraphicObject")
 xText.insertString(cursor, "++", False)
 # Insert graphic between ++ and //
 xText.insertTextContent(cursor, oGraphic, False)
 # Setting the anchor type - must be done first, otherwise the graphic will 
be put after the //
 oGraphic.AnchorType = AS_CHARACTER
 xText.insertString(cursor, "//", False)
 # Setting the graphic url
 oGraphic.GraphicURL = sUrl

 # Setting the width and height
 oGraphic.Width = 2000
 oGraphic.Height = 2000

The image is inserted in the middle of a paragraph and surrounded by ++ and // 
to indicate where it should be. This also works without problems.

Then I decided to change the order. First I insert all text; then I go back to 
the insertion point and insert the image. To my surprise the image ended up a 
couple of words later in the text

The insertion code is then:

 # Inserting some text
 xText.insertString(xTextCursor, "This is the first paragraph.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "Some text before the graphic. ", False)

 # Inserting some more text
 xText.insertString(xTextCursor, "Some text after the graphic.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "This is the second paragraph.", False)

 # Move the cursor
 xTextCursor.gotoPreviousParagraph(False)
 xTextCursor.gotoNextSentence(False)
did you sure you are here where you think you are ? and not at the end 
off the wro,g paragraph

trye
# Move the cursor xTextCursor.gotoPreviousParagraph(False)

 xTextCursor.gotoPreviousParagraph(False)
xTextCursor.gotoNextSentence(False)

hope it helps

Fernand

 
 # Insert the graphic

 insertGraphic(doc, xText, xTextCursor, sUrl)

Now I would expect ++Image// to be found just before "Some text after the graphic." 
However the ++// is indeed inserted there, but the image appears after "Some text after 
the", 4 words later. The image is indeed anchored to this position, as I can see when I 
manually insert some more text before it. So it is not a matter of an offset.

I have also tried to create another cursor with the endpoint of xTextCursor 
between the two sentences, and then use this to insert the graphic but that 
doesn't help.

Does anybody know what is happening here?


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Inserting Graphics in a Writer document

2015-04-15 Thread Piet van Oostrum
Hello,

I am in the process of converting several Java LO programming examples to 
Python. My plan is to do all (or most) of them. Also I try to extend them. 
However I encountered some surprises.

I converted LibreOffice4.4_SDK/examples/java/Text/GraphicsInserter.java which 
inserts a graphic image in a new Writer document. Works without problems.

Then I decided to add some text also, and put the picture in the middle of the 
text.

The code goes like this:

# Create a new Writer document, which will be automatically displayed
doc = Desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, 
())

# Getting the text
xText = doc.getText()

# Getting a cursor on the document
xTextCursor = xText.createTextCursor()

# Inserting some text
xText.insertString(xTextCursor, "This is the first paragraph.", False)
xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
xText.insertString(xTextCursor, "Some text before the graphic. ", False)

# Insert the graphic
insertGraphic(doc, xText, xTextCursor, sUrl)

# Inserting some more text
xText.insertString(xTextCursor, "Some text after the graphic.", False)
xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
xText.insertString(xTextCursor, "This is the second paragraph.", False)

def insertGraphic(doc, xText, cursor, sUrl):
oGraphic = doc.createInstance("com.sun.star.text.TextGraphicObject")
xText.insertString(cursor, "++", False)
# Insert graphic between ++ and //
xText.insertTextContent(cursor, oGraphic, False)
# Setting the anchor type - must be done first, otherwise the graphic will 
be put after the //
oGraphic.AnchorType = AS_CHARACTER
xText.insertString(cursor, "//", False)
# Setting the graphic url
oGraphic.GraphicURL = sUrl

# Setting the width and height
oGraphic.Width = 2000
oGraphic.Height = 2000

The image is inserted in the middle of a paragraph and surrounded by ++ and // 
to indicate where it should be. This also works without problems.

Then I decided to change the order. First I insert all text; then I go back to 
the insertion point and insert the image. To my surprise the image ended up a 
couple of words later in the text

The insertion code is then:

# Inserting some text
xText.insertString(xTextCursor, "This is the first paragraph.", False)
xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
xText.insertString(xTextCursor, "Some text before the graphic. ", False)

# Inserting some more text
xText.insertString(xTextCursor, "Some text after the graphic.", False)
xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
xText.insertString(xTextCursor, "This is the second paragraph.", False)

# Move the cursor
xTextCursor.gotoPreviousParagraph(False)
xTextCursor.gotoNextSentence(False)

# Insert the graphic
insertGraphic(doc, xText, xTextCursor, sUrl)

Now I would expect ++Image// to be found just before "Some text after the 
graphic." However the ++// is indeed inserted there, but the image appears 
after "Some text after the", 4 words later. The image is indeed anchored to 
this position, as I can see when I manually insert some more text before it. So 
it is not a matter of an offset.

I have also tried to create another cursor with the endpoint of xTextCursor 
between the two sentences, and then use this to insert the graphic but that 
doesn't help.

Does anybody know what is happening here?
-- 
Piet van Oostrum 
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: 2 commits - sd/source

2015-04-15 Thread Katarina Behrens
 sd/source/ui/func/fuinsfil.cxx |  114 ++---
 1 file changed, 75 insertions(+), 39 deletions(-)

New commits:
commit 24d6c704a6a5fb9d0bfbea4156a8d95c27693544
Author: Katarina Behrens 
Date:   Wed Apr 15 14:50:43 2015 +0200

tdf#62101: Show only file extensions we're able to insert

Change-Id: If8f53ac8af85f15958cd488fb0fd4c37997963c9

diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index ce6d3e7..7b554d2 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -69,6 +69,42 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ui::dialogs;
 using namespace ::com::sun::star;
 
+typedef ::std::pair< OUString, OUString > FilterDesc;
+
+namespace
+{
+
+OUString lcl_GetExtensionsList ( ::std::vector< FilterDesc > const& 
rFilterDescList )
+{
+OUString aExtensions;
+::std::vector< FilterDesc >::const_iterator aIter( rFilterDescList.begin() 
);
+
+while (aIter != rFilterDescList.end())
+{
+OUString sWildcard = (*aIter).second;
+
+if ( aExtensions.indexOf( sWildcard ) == -1 )
+{
+if ( !aExtensions.isEmpty() )
+aExtensions += ";";
+aExtensions += sWildcard;
+}
+
+++aIter;
+}
+
+return aExtensions;
+}
+
+void lcl_AddFilter ( ::std::vector< FilterDesc >& rFilterDescList,
+ const SfxFilter *pFilter )
+{
+if (pFilter)
+rFilterDescList.push_back( ::std::make_pair( pFilter->GetUIName(), 
pFilter->GetDefaultExtension() ) );
+}
+
+}
+
 namespace sd {
 
 TYPEINIT1( FuInsertFile, FuPoor );
@@ -93,10 +129,11 @@ rtl::Reference FuInsertFile::Create( ViewShell* 
pViewSh, ::sd::Window* p
 void FuInsertFile::DoExecute( SfxRequest& rReq )
 {
 SfxFilterMatcher&   rMatcher = SfxGetpApp()->GetFilterMatcher();
-::std::vector< OUString > aFilterVector;
+::std::vector< FilterDesc > aFilterVector;
+::std::vector< OUString > aOtherFilterVector;
 const SfxItemSet*   pArgs = rReq.GetArgs ();
 
-FuInsertFile::GetSupportedFilterVector( aFilterVector );
+FuInsertFile::GetSupportedFilterVector( aOtherFilterVector );
 
 if (!pArgs)
 {
@@ -128,72 +165,73 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
 // Get filter for current format
 try
 {
-OUString aAllSpec( SD_RESSTR( STR_ALL_FILES ) );
-
-xFilterManager->appendFilter( aAllSpec, OUString("*.*") );
-xFilterManager->setCurrentFilter( aAllSpec ); // set 
default-filter ()
-
 // Get main filter
 const SfxFilter* pFilter = 
SfxFilter::GetDefaultFilterFromFactory( aOwnCont );
-if( pFilter )
-xFilterManager->appendFilter( pFilter->GetUIName(), 
pFilter->GetDefaultExtension() );
+lcl_AddFilter( aFilterVector, pFilter );
 
 // get template filter
 if( mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS )
 pFilter = DrawDocShell::Factory().GetTemplateFilter();
 else
 pFilter = GraphicDocShell::Factory().GetTemplateFilter();
-if( pFilter )
-xFilterManager->appendFilter( pFilter->GetUIName(), 
pFilter->GetDefaultExtension() );
+lcl_AddFilter( aFilterVector, pFilter );
 
 // get cross filter
 pFilter = SfxFilter::GetDefaultFilterFromFactory( aOtherCont );
-if( pFilter )
-{
-xFilterManager->appendFilter( pFilter->GetUIName(), 
pFilter->GetDefaultExtension() );
-}
+lcl_AddFilter( aFilterVector, pFilter );
 
 // get Powerpoint filter
 OUString aExt = ".ppt";
 pFilter = aMatch.GetFilter4Extension( aExt );
-if( pFilter )
-xFilterManager->appendFilter( pFilter->GetUIName(), 
pFilter->GetDefaultExtension() );
+lcl_AddFilter( aFilterVector, pFilter );
 
 // Get other draw/impress filters
 pFilter = aMatch.GetFilter4ClipBoardId( 
SotClipboardFormatId::STARIMPRESS_60, SfxFilterFlags::IMPORT, 
SfxFilterFlags::TEMPLATEPATH );
-if( pFilter )
-xFilterManager->appendFilter( pFilter->GetUIName(), 
pFilter->GetDefaultExtension() );
+lcl_AddFilter( aFilterVector, pFilter );
 
 pFilter = aMatch.GetFilter4ClipBoardId( 
SotClipboardFormatId::STARIMPRESS_60, SfxFilterFlags::TEMPLATEPATH );
-if( pFilter )
-xFilterManager->appendFilter( pFilter->GetUIName(), 
pFilter->GetDefaultExtension() );
+lcl_AddFilter( aFilterVector, pFilter );
 
 pFilter = aMatch.GetFilter4ClipBoardId( 
SotClipboardFormatId::STARDRAW_60, SfxFilterFlags::IMPORT, 
SfxFilterFla

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.4' - distro-configs/CPLinux.conf

2015-04-15 Thread Andras Timar
 distro-configs/CPLinux.conf |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 45b17ab4bfcd8b6e4a0fd0fa74c6bdff090302fa
Author: Andras Timar 
Date:   Wed Apr 15 14:50:53 2015 +0200

CPLinux.conf: --disable-gstreamer-1-0

Change-Id: I0993fd783823e3fa8581bc24ef1f1e0809ed367a

diff --git a/distro-configs/CPLinux.conf b/distro-configs/CPLinux.conf
index ff3550d..6abc689 100644
--- a/distro-configs/CPLinux.conf
+++ b/distro-configs/CPLinux.conf
@@ -25,6 +25,7 @@
 --enable-lockdown
 --enable-kde
 --enable-gstreamer-0-10
+--disable-gstreamer-1-0
 --enable-evolution2
 --enable-gnome-vfs
 --enable-scripting-beanshell
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.4' - dictionaries

2015-04-15 Thread Adolfo Jayme Barrientos
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 899efa2a0e6b461bf14a1df283e8e33a2eefe0f5
Author: Adolfo Jayme Barrientos 
Date:   Tue Apr 14 18:41:36 2015 -0500

Updated core
Project: dictionaries  36fb7f9b73893a445f4ed3ed29f50fbafc5148d9

Revert Spanish dictionary’s description to allow for its localization

Thanks to András for noticing.

diff --git a/dictionaries b/dictionaries
index cf7f3f2..36fb7f9 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit cf7f3f2a103609a99ce7204713ae327548ab7bdb
+Subproject commit 36fb7f9b73893a445f4ed3ed29f50fbafc5148d9
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Branch 'distro/collabora/cp-4.4' - 4 commits - cs_CZ/cs_CZ.aff es/description.xml es/dictionaries.xcu es/es_ANY.aff es/es_ANY.dic es/package-description.txt es/

2015-04-15 Thread Adolfo Jayme Barrientos
 cs_CZ/cs_CZ.aff|   23 +--
 es/README_es_ANY.txt   |9 +
 es/README_th_es_ANY.txt|8 -
 es/description.xml |   11 +
 es/dictionaries.xcu|6 -
 es/es_ANY.aff  |   24 +++-
 es/es_ANY.dic  |  267 -
 es/package-description.txt |2 
 pt_PT/description.xml  |2 
 pt_PT/pt_PT.dic|   35 +++--
 10 files changed, 246 insertions(+), 141 deletions(-)

New commits:
commit 36fb7f9b73893a445f4ed3ed29f50fbafc5148d9
Author: Adolfo Jayme Barrientos 
Date:   Tue Apr 14 18:41:36 2015 -0500

Revert Spanish dictionary’s description to allow for its localization

Thanks to András for noticing.

diff --git a/es/description.xml b/es/description.xml
index 77211d4..e7ac452 100644
--- a/es/description.xml
+++ b/es/description.xml
@@ -5,7 +5,7 @@
 
 
 
-Español (España y América Latina): Ortografía, 
separación y sinónimos
+Spanish spelling dictionary, hyphenation rules, and 
thesaurus
 
 
 
commit 213fe416a50440908fec7d80c0404baf21fb65fa
Author: Jacobo Aragunde Pérez 
Date:   Mon Apr 13 14:13:47 2015 +0200

Updated Spanish dictionary pack to 0.8

Versión 0.8:
- Muchos términos nuevos correspondientes al bug 682 en Forja.rediris.es.
- Migrado el proyecto a GitHub (https://github.com/sbosio/rla-es).

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

diff --git a/es/README_es_ANY.txt b/es/README_es_ANY.txt
index dd04d40..83b0611 100644
--- a/es/README_es_ANY.txt
+++ b/es/README_es_ANY.txt
@@ -6,7 +6,7 @@
   **  VERSIÓN GENÉRICA PARA TODAS LAS LOCALIZACIONES
**
   
 
-   Versión 0.7
+   Versión 0.8
 
 SUMARIO
 
@@ -44,6 +44,11 @@ Encontrará copias de las licencias adjuntas en este mismo 
paquete.
 
 3. INSTALACIÓN
 
+   NOTA: en el resto del documento, cada aparición de OpenOffice.org puede
+entenderse referida también a LibreOffice. No obstante, tenga en cuenta que
+la primera versión de LibreOffice es compatible con OpenOffice.org 3.x, por
+lo que las menciones a OpenOffice.org 1.x y 2.x no son aplicables a 
LibreOffice.
+
En OpenOffice.org versión 3.x y superior, utilice el administrador de
 extensiones, seleccionando para instalar directamente el fichero con
 extensión ".oxt".
@@ -58,7 +63,7 @@ a) Copie el fichero de afijos y la lista de palabras en la 
carpeta de
 manera que esté disponible para todos los usuarios, copiando los ficheros al
 directorio de diccionarios de la suite. Este directorio depende de la
 plataforma de instalación. Podrá ubicarlo si ingresa en el ítem Opciones
-del menú Herramientas. Despliegue la primer lista, etiquetada "OpenOffice.org"
+del menú Herramientas. Despliegue la primera lista, etiquetada 
"OpenOffice.org"
 y seleccione el ítem Rutas. La carpeta donde debe copiar los ficheros se
 denomina "ooo", y la encontrará bajo el directorio que figura en la lista de
 rutas con el tipo "Lingüística".
diff --git a/es/README_th_es_ANY.txt b/es/README_th_es_ANY.txt
index e75dc81..797574a 100644
--- a/es/README_th_es_ANY.txt
+++ b/es/README_th_es_ANY.txt
@@ -5,11 +5,11 @@ Homepage: http://openthes-es.berlios.de
 
 Requisitos: ==
 
- OpenOffice.org 3.0 o superior 
+ OpenOffice.org 3.0 o superior
 
 
 Nota: 
-
+
 * Se asume que OOo está bien instalado.
 * El diccionario de sinónimos y separación silábica es el mismo para 
Windows como para Linux.
 
@@ -168,7 +168,7 @@ such a program is covered only if its contents constitute a 
work based
 on the Library (independent of the use of the Library in a tool for
 writing it).  Whether that is true depends on what the Library does
 and what the program that uses the Library does.
-  
+
   1. You may copy and distribute verbatim copies of the Library's
 complete source code as you receive it, in any medium, provided that
 you conspicuously and appropriately publish on each copy an
@@ -521,4 +521,4 @@ necessary.  Here is a sample; alter the names:
   , 1 April 1990
   Ty Coon, President of Vice
 
-That's all there is to it! 
\ No newline at end of file
+That's all there is to it!
diff --git a/es/description.xml b/es/description.xml
index 32d8e7d..77211d4 100644
--- a/es/description.xml
+++ b/es/description.xml
@@ -1,16 +1,21 @@
 
 http://openoffice.org/extensions/description/2006"; 
xmlns:d="http://openoffice.org/extensions/description/2006";  
xmlns:xlink="http://www.w3.org/1999/xlink";>
-
+
+
 
+
 
-Spanish spelling dictionary, hyphenation rules, and 
thesaurus
+Español (Es

[Libreoffice-commits] dictionaries.git: Branch 'distro/collabora/cp-4.3' - 3 commits - cs_CZ/cs_CZ.aff es/description.xml es/dictionaries.xcu es/es_ANY.aff es/es_ANY.dic es/package-description.txt es/

2015-04-15 Thread Adolfo Jayme Barrientos
 cs_CZ/cs_CZ.aff|   23 +--
 es/README_es_ANY.txt   |9 +
 es/README_th_es_ANY.txt|8 -
 es/description.xml |   11 +
 es/dictionaries.xcu|6 -
 es/es_ANY.aff  |   24 +++-
 es/es_ANY.dic  |  267 -
 es/package-description.txt |2 
 8 files changed, 226 insertions(+), 124 deletions(-)

New commits:
commit 54868a28bbde680b79d23f9f30b0229bb8985465
Author: Adolfo Jayme Barrientos 
Date:   Tue Apr 14 18:41:36 2015 -0500

Revert Spanish dictionary’s description to allow for its localization

Thanks to András for noticing.

diff --git a/es/description.xml b/es/description.xml
index 77211d4..e7ac452 100644
--- a/es/description.xml
+++ b/es/description.xml
@@ -5,7 +5,7 @@
 
 
 
-Español (España y América Latina): Ortografía, 
separación y sinónimos
+Spanish spelling dictionary, hyphenation rules, and 
thesaurus
 
 
 
commit 1fde1e83ed1581f170ad153e28aed9fcfbe2417b
Author: Jacobo Aragunde Pérez 
Date:   Mon Apr 13 14:13:47 2015 +0200

Updated Spanish dictionary pack to 0.8

Versión 0.8:
- Muchos términos nuevos correspondientes al bug 682 en Forja.rediris.es.
- Migrado el proyecto a GitHub (https://github.com/sbosio/rla-es).

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

diff --git a/es/README_es_ANY.txt b/es/README_es_ANY.txt
index dd04d40..83b0611 100644
--- a/es/README_es_ANY.txt
+++ b/es/README_es_ANY.txt
@@ -6,7 +6,7 @@
   **  VERSIÓN GENÉRICA PARA TODAS LAS LOCALIZACIONES
**
   
 
-   Versión 0.7
+   Versión 0.8
 
 SUMARIO
 
@@ -44,6 +44,11 @@ Encontrará copias de las licencias adjuntas en este mismo 
paquete.
 
 3. INSTALACIÓN
 
+   NOTA: en el resto del documento, cada aparición de OpenOffice.org puede
+entenderse referida también a LibreOffice. No obstante, tenga en cuenta que
+la primera versión de LibreOffice es compatible con OpenOffice.org 3.x, por
+lo que las menciones a OpenOffice.org 1.x y 2.x no son aplicables a 
LibreOffice.
+
En OpenOffice.org versión 3.x y superior, utilice el administrador de
 extensiones, seleccionando para instalar directamente el fichero con
 extensión ".oxt".
@@ -58,7 +63,7 @@ a) Copie el fichero de afijos y la lista de palabras en la 
carpeta de
 manera que esté disponible para todos los usuarios, copiando los ficheros al
 directorio de diccionarios de la suite. Este directorio depende de la
 plataforma de instalación. Podrá ubicarlo si ingresa en el ítem Opciones
-del menú Herramientas. Despliegue la primer lista, etiquetada "OpenOffice.org"
+del menú Herramientas. Despliegue la primera lista, etiquetada 
"OpenOffice.org"
 y seleccione el ítem Rutas. La carpeta donde debe copiar los ficheros se
 denomina "ooo", y la encontrará bajo el directorio que figura en la lista de
 rutas con el tipo "Lingüística".
diff --git a/es/README_th_es_ANY.txt b/es/README_th_es_ANY.txt
index e75dc81..797574a 100644
--- a/es/README_th_es_ANY.txt
+++ b/es/README_th_es_ANY.txt
@@ -5,11 +5,11 @@ Homepage: http://openthes-es.berlios.de
 
 Requisitos: ==
 
- OpenOffice.org 3.0 o superior 
+ OpenOffice.org 3.0 o superior
 
 
 Nota: 
-
+
 * Se asume que OOo está bien instalado.
 * El diccionario de sinónimos y separación silábica es el mismo para 
Windows como para Linux.
 
@@ -168,7 +168,7 @@ such a program is covered only if its contents constitute a 
work based
 on the Library (independent of the use of the Library in a tool for
 writing it).  Whether that is true depends on what the Library does
 and what the program that uses the Library does.
-  
+
   1. You may copy and distribute verbatim copies of the Library's
 complete source code as you receive it, in any medium, provided that
 you conspicuously and appropriately publish on each copy an
@@ -521,4 +521,4 @@ necessary.  Here is a sample; alter the names:
   , 1 April 1990
   Ty Coon, President of Vice
 
-That's all there is to it! 
\ No newline at end of file
+That's all there is to it!
diff --git a/es/description.xml b/es/description.xml
index 32d8e7d..77211d4 100644
--- a/es/description.xml
+++ b/es/description.xml
@@ -1,16 +1,21 @@
 
 http://openoffice.org/extensions/description/2006"; 
xmlns:d="http://openoffice.org/extensions/description/2006";  
xmlns:xlink="http://www.w3.org/1999/xlink";>
-
+
+
 
+
 
-Spanish spelling dictionary, hyphenation rules, and 
thesaurus
+Español (España y América Latina): Ortografía, 
separación y sinónimos
 
+
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - dictionaries

2015-04-15 Thread Adolfo Jayme Barrientos
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 83f4fb96d63998aed4797e4943bc830888d307c7
Author: Adolfo Jayme Barrientos 
Date:   Tue Apr 14 18:41:36 2015 -0500

Updated core
Project: dictionaries  54868a28bbde680b79d23f9f30b0229bb8985465

Revert Spanish dictionary’s description to allow for its localization

Thanks to András for noticing.

diff --git a/dictionaries b/dictionaries
index 8bfeeb3..54868a2 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 8bfeeb3e2590472b82368740b2031e8f2360badd
+Subproject commit 54868a28bbde680b79d23f9f30b0229bb8985465
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: DocumentEventListener problem

2015-04-15 Thread Piet van Oostrum
Stephan Bergmann wrote:

 > There's nothing special here.  LO's main thread 1 in 
 > SfxBaseModel::postEvent_Impl (frame 19) is illegally issuing 
 > css.document.XDocumentEventListener::documentEventOccured calls with the 
 > solar mutex locked.  The python process, while synchronously executing 
 > that documentEventOccured call, first issues a bunch of asynchronous 
 > release requests and then a synchronous 
 > css.document.XDocumentEventBroadcaster::addDocumentEventListener 
 > request.  One of the asyncronous release requests, executed on LO's 
 > thread 2, blocks waiting on the solar mutex.  And on the LO side, the 
 > incoming synchronous addDocumentEventListener request blocks waiting on 
 > the preceding asynchronous release requests to finish (which is how 
 > synchronous and asynchronous UNO requests work).

Yes, having the solar mutex locked while a listener is called looks like an 
extremely bad idea. The listener take a long time, it may do all kinds of 
things that may also require the mutex, like we see here with the destructors. 
Or it may even spark other listeners. I read somewhere that the solar mutex is 
for protecting the access to VCL, but it seems to me that it is also used for 
other purposes, is that right?

Anyway, this makes it almost impossible to use listeners across the UNO bridge. 
When I run my code as a macro inside LO there is no problem.

When I prevent the releases to happen then the listener also works without 
problem, but of course this is very fragile. I do this by collecting the para's 
in a list so that they will not be deleted. If I do this then the listener runs 
to the end, printing all the paragraphs and then LO hangs. If I make this list 
global and also parenum, so that won't be deleted at the end of the listener, 
then LO stays alive. I can then manually delete these after the listener has 
finished and there is no problem then.

See the modified code:

def showportions(doc):
if doc.supportsService("com.sun.star.text.TextDocument"):
global parenum
parenum = doc.Text.createEnumeration()
global paras
paras = []
while parenum.hasMoreElements():
para = parenum.nextElement()
paras.append(para)
print("get para: {}".format(para.String))


-- 
Piet van Oostrum 
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sfx2/source

2015-04-15 Thread Caolán McNamara
 sfx2/source/appl/fileobj.cxx |   20 +---
 sfx2/source/appl/fileobj.hxx |4 +++-
 2 files changed, 16 insertions(+), 8 deletions(-)

New commits:
commit 66c9aec156d974b939b680dccbb27e18fb153a23
Author: Caolán McNamara 
Date:   Wed Apr 15 12:48:47 2015 +0100

fix crash on re-export of fdo50057-2.odt to odt

Change-Id: Ice7a754dd4f42b5cf62ae2038b63d893b8a92fd8

diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index d80f24c..801a1d6 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -47,7 +47,9 @@
 #define FILETYPE_OBJECT 3
 
 SvFileObject::SvFileObject()
-: pOldParent(NULL)
+: nPostUserEventId(0)
+, pDelMed(NULL)
+, pOldParent(NULL)
 , nType(FILETYPE_TEXT)
 , bLoadAgain(true)
 , bSynchron(false)
@@ -64,14 +66,16 @@ SvFileObject::SvFileObject()
 
 SvFileObject::~SvFileObject()
 {
-if ( xMed.Is() )
+if (xMed.Is())
 {
 xMed->SetDoneLink( Link() );
 xMed.Clear();
 }
+if (nPostUserEventId)
+Application::RemoveUserEvent(nPostUserEventId);
+delete pDelMed;
 }
 
-
 bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
 const OUString & rMimeType,
 bool bGetSynchron )
@@ -482,10 +486,10 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, 
EMPTYARG )
 if( pThis->xMed.Is() )
 {
 pThis->xMed->SetDoneLink( Link() );
-
-Application::PostUserEvent(
+pThis->pDelMed = new SfxMediumRef(pThis->xMed);
+pThis->nPostUserEventId = Application::PostUserEvent(
 STATIC_LINK( pThis, SvFileObject, DelMedium_Impl ),
-new SfxMediumRef( pThis->xMed ));
+pThis->pDelMed);
 pThis->xMed.Clear();
 }
 }
@@ -495,7 +499,9 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, 
EMPTYARG )
 
 IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
 {
-(void)pThis;
+pThis->nPostUserEventId = 0;
+assert(pThis->pDelMed == pDelMed);
+pThis->pDelMed = NULL;
 delete pDelMed;
 return 0;
 }
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 78aa1fb..85fb53b 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -33,7 +33,9 @@ class SvFileObject : public sfx2::SvLinkSource
 OUStringsReferer;
 LinkaEndEditLink;
 SfxMediumRefxMed;
-vcl::Window* pOldParent;
+ImplSVEvent*nPostUserEventId;
+SfxMediumRef*   pDelMed;
+vcl::Window*pOldParent;
 
 sal_uInt8 nType;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2015-04-15 Thread Michael Stahl
 sw/source/core/layout/paintfrm.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit dc6a6475bcc7625a648e840de97ebd7a1ab03270
Author: Michael Stahl 
Date:   Wed Apr 15 13:27:24 2015 +0200

sw: DrawFillAttributes: move check for empty rPaintRegion

Tweak c2c22d26db03949771d5a0bb4f8abf6d2dc850ea a bit: if the paint
region is empty, nothing should be painted.

Change-Id: If88b8153f701b1f21cfd2300f0af532f5c718cdf

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index e8909c1..292730f 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1867,7 +1867,8 @@ bool DrawFillAttributes(
 rPaintRegion.GetOrigin().Right(),
 rPaintRegion.GetOrigin().Bottom());
 
-if(!aPaintRange.isEmpty() &&
+if (!aPaintRange.isEmpty() &&
+!rPaintRegion.empty() &&
 !basegfx::fTools::equalZero(aPaintRange.getWidth()) &&
 !basegfx::fTools::equalZero(aPaintRange.getHeight()))
 {
@@ -1916,7 +1917,7 @@ bool DrawFillAttributes(
 pPrimitives(&rSequence);
 drawinglayer::primitive2d::Primitive2DSequence primitives;
 // tdf#86578 the awful lcl_SubtractFlys hack
-if (rPaintRegion.size() > 1 || (!rPaintRegion.empty() && 
rPaintRegion[0] != rPaintRegion.GetOrigin()))
+if (rPaintRegion.size() > 1 || rPaintRegion[0] != 
rPaintRegion.GetOrigin())
 {
 tools::PolyPolygon tempRegion;
 for (size_t i = 0; i < rPaintRegion.size(); ++i)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - include/sfx2 include/svl sc/source sfx2/source svl/source sw/inc sw/source

2015-04-15 Thread Noel Grandin
 include/sfx2/docfile.hxx  |3 -
 include/svl/documentlockfile.hxx  |4 -
 include/svl/lockfilecommon.hxx|   20 +++---
 include/svl/mailenum.hxx  |   10 ---
 include/svl/sharecontrolfile.hxx  |   20 ++
 sc/source/ui/docshell/docsh.cxx   |   17 ++---
 sc/source/ui/docshell/docsh4.cxx  |   17 ++---
 sc/source/ui/miscdlgs/sharedocdlg.cxx |   19 +++---
 sfx2/source/doc/docfile.cxx   |   38 +---
 svl/source/misc/documentlockfile.cxx  |   28 -
 svl/source/misc/lockfilecommon.cxx|   38 +---
 svl/source/misc/sharecontrolfile.cxx  |  100 ++
 sw/inc/modcfg.hxx |   26 +++-
 sw/source/ui/envelp/mailmrge.cxx  |   16 ++---
 sw/source/uibase/config/modcfg.cxx|6 +-
 15 files changed, 166 insertions(+), 196 deletions(-)

New commits:
commit f0461e8360e13137c29dfcc1d20ba93e7bbd3073
Author: Noel Grandin 
Date:   Tue Apr 14 13:47:01 2015 +0200

convert LOCKFILE_ constants to scoped enum and cleanup

Change-Id: I9a2339cc953a718403b3cd0960d5d8d34abae455
Reviewed-on: https://gerrit.libreoffice.org/15304
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 2964e19..f6f4fb1 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -160,7 +161,7 @@ public:
 boolCommit();
 boolIsStorage();
 
-sal_Int8ShowLockedDocumentDialog( const css::uno::Sequence< 
OUString >& aData, bool bIsLoading, bool bOwnLock );
+sal_Int8ShowLockedDocumentDialog( const LockFileEntry& aData, 
bool bIsLoading, bool bOwnLock );
 voidLockOrigFileOnDemand( bool bLoading, bool bNoUI );
 voidUnlockFile( bool bReleaseLockStream );
 
diff --git a/include/svl/documentlockfile.hxx b/include/svl/documentlockfile.hxx
index e698a0e..9449994 100644
--- a/include/svl/documentlockfile.hxx
+++ b/include/svl/documentlockfile.hxx
@@ -39,14 +39,14 @@ class SVL_DLLPUBLIC DocumentLockFile : public LockFileCommon
 
 ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > 
OpenStream();
 
-void WriteEntryToStream( const ::com::sun::star::uno::Sequence< OUString 
>& aEntry, ::com::sun::star::uno::Reference< 
::com::sun::star::io::XOutputStream > xStream );
+void WriteEntryToStream( const LockFileEntry& aEntry, 
::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xStream 
);
 
 public:
 DocumentLockFile( const OUString& aOrigURL );
 ~DocumentLockFile();
 
 bool CreateOwnLockFile();
-::com::sun::star::uno::Sequence< OUString > GetLockData();
+LockFileEntry GetLockData();
 bool OverwriteOwnLockFile();
 void RemoveFile();
 
diff --git a/include/svl/lockfilecommon.hxx b/include/svl/lockfilecommon.hxx
index 7f32d84..767df06 100644
--- a/include/svl/lockfilecommon.hxx
+++ b/include/svl/lockfilecommon.hxx
@@ -30,13 +30,15 @@
 
 #include 
 #include 
+#include 
+#include 
 
-#define LOCKFILE_OOOUSERNAME_ID   0
-#define LOCKFILE_SYSUSERNAME_ID   1
-#define LOCKFILE_LOCALHOST_ID 2
-#define LOCKFILE_EDITTIME_ID  3
-#define LOCKFILE_USERURL_ID   4
-#define LOCKFILE_ENTRYSIZE5
+enum class LockFileComponent
+{
+OOOUSERNAME, SYSUSERNAME, LOCALHOST, EDITTIME, USERURL, LAST=USERURL
+};
+
+typedef o3tl::enumarray LockFileEntry;
 
 namespace svt {
 
@@ -53,13 +55,13 @@ public:
 LockFileCommon( const OUString& aOrigURL, const OUString& aPrefix );
 ~LockFileCommon();
 
-static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< 
OUString > > ParseList( const ::com::sun::star::uno::Sequence< sal_Int8 >& 
aBuffer );
-static ::com::sun::star::uno::Sequence< OUString > ParseEntry( const 
::com::sun::star::uno::Sequence< sal_Int8 >& aBuffer, sal_Int32& o_nCurPos );
+static void ParseList( const ::com::sun::star::uno::Sequence< sal_Int8 >& 
aBuffer, std::vector< LockFileEntry > &rOutput );
+static LockFileEntry ParseEntry( const ::com::sun::star::uno::Sequence< 
sal_Int8 >& aBuffer, sal_Int32& o_nCurPos );
 static OUString ParseName( const ::com::sun::star::uno::Sequence< sal_Int8 
>& aBuffer, sal_Int32& o_nCurPos );
 static OUString EscapeCharacters( const OUString& aSource );
 static OUString GetOOOUserName();
 static OUString GetCurrentLocalTime();
-static ::com::sun::star::uno::Sequence< OUString > GenerateOwnEntry();
+static LockFileEntry GenerateOwnEntry();
 };
 
 }
diff --git a/include/svl/sharecontrolfile.hxx b/include/svl/sharecontrolfile.hxx
index 04f46d7..26ec507 100644
--- a/include/svl/sharecontrolfile.hxx
+++ b/include/svl/sharecontrolfile.hxx
@@ -29,13 +29,8 @@
 #include 
 
 #include 
-
-#define SHARED_OOOUSERNAME_ID   LOCKFILE_OOOUSERNAME_ID
-#define SHARED_SYSUSERNAME

[Libreoffice-commits] core.git: 2 commits - basctl/source chart2/source dbaccess/source editeng/source extensions/source include/sfx2 include/svl reportdesign/source sc/source sfx2/inc sfx2/source svl

2015-04-15 Thread Noel Grandin
 basctl/source/basicide/basides1.cxx|4 
 basctl/source/basicide/basides2.cxx|2 
 basctl/source/basicide/docsignature.cxx|4 
 basctl/source/inc/docsignature.hxx |4 
 chart2/source/view/main/ChartItemPool.cxx  |2 
 dbaccess/source/core/dataaccess/ModelImpl.cxx  |4 
 dbaccess/source/core/dataaccess/ModelImpl.hxx  |2 
 dbaccess/source/ui/dlg/dbadmin.cxx |  122 +++
 dbaccess/source/ui/misc/UITools.cxx|   10 
 editeng/source/editeng/editdoc.cxx |  110 +++
 extensions/source/propctrlr/fontdialog.cxx |   40 +-
 include/sfx2/docfile.hxx   |5 
 include/sfx2/docmacromode.hxx  |3 
 include/sfx2/objsh.hxx |9 
 include/sfx2/signaturestate.hxx|   25 -
 include/svl/itempool.hxx   |   23 +
 reportdesign/source/ui/misc/UITools.cxx|   74 ++--
 reportdesign/source/ui/report/ReportController.cxx |   60 +--
 sc/source/core/data/docpool.cxx|  186 ++--
 sc/source/ui/app/msgpool.cxx   |   20 -
 sfx2/inc/guisaveas.hxx |2 
 sfx2/source/doc/docfile.cxx|8 
 sfx2/source/doc/docmacromode.cxx   |8 
 sfx2/source/doc/guisaveas.cxx  |   10 
 sfx2/source/doc/objmisc.cxx|   24 -
 sfx2/source/doc/objserv.cxx|   56 +--
 sfx2/source/doc/objstor.cxx|   18 -
 sfx2/source/doc/objxtor.cxx|4 
 sfx2/source/doc/sfxbasemodel.cxx   |4 
 sfx2/source/explorer/nochaos.cxx   |6 
 sfx2/source/inc/objshimp.hxx   |6 
 svl/README |2 
 svl/qa/unit/items/test_itempool.cxx|8 
 svl/source/items/itempool.cxx  |   19 -
 svl/source/items/itemset.cxx   |   10 
 svl/source/items/poolio.cxx|6 
 svl/source/items/stylepool.cxx |4 
 svx/source/stbctrls/xmlsecctrl.cxx |   26 -
 svx/source/svdraw/svdattr.cxx  |2 
 svx/source/xoutdev/xpool.cxx   |2 
 sw/source/core/bastyp/init.cxx |  324 ++---
 41 files changed, 636 insertions(+), 622 deletions(-)

New commits:
commit fe73ed7c79b96eaa5aa84314a07ae11f188575a1
Author: Noel Grandin 
Date:   Mon Apr 13 16:01:31 2015 +0200

convert SFX_ITEM constants to scoped enum

Change-Id: Ief8c30c356ba947727c5ab70092042816a0db99e
Reviewed-on: https://gerrit.libreoffice.org/15302
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/chart2/source/view/main/ChartItemPool.cxx 
b/chart2/source/view/main/ChartItemPool.cxx
index 82e9eca..9ad6981 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -167,7 +167,7 @@ ChartItemPool::ChartItemPool():
 for( sal_uInt16 i = 0; i < nMax; i++ )
 {
 pItemInfos[i]._nSID = 0;
-pItemInfos[i]._nFlags = SFX_ITEM_POOLABLE;
+pItemInfos[i]._nFlags = SfxItemPoolFlags::POOLABLE;
 }
 
 // slot ids differing from which ids
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx 
b/dbaccess/source/ui/dlg/dbadmin.cxx
index 646db7c..7eeedec 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -367,67 +367,67 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& 
_rpSet, SfxItemPool*& _rp
 // create the pool
 static SfxItemInfo const aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID 
+ 1] =
 {
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0},
-{0,0}
+{0,SfxItemPoolFlags::NONE},
+{0,SfxItemPoolFlags::NONE},
+{0,SfxItemPoolFlags::NONE},
+{0,SfxItemPoolFlags::NONE},

[Libreoffice-commits] core.git: basctl/source include/sfx2 sc/source sd/source sfx2/source starmath/source sw/source

2015-04-15 Thread Noel Grandin
 basctl/source/basicide/basidesh.cxx |9 +
 include/sfx2/viewsh.hxx |   21 +
 sc/source/ui/view/prevwsh.cxx   |2 +-
 sc/source/ui/view/tabvwsh4.cxx  |2 +-
 sd/source/ui/view/ViewShellBase.cxx |4 ++--
 sfx2/source/view/viewimp.hxx|2 +-
 sfx2/source/view/viewsh.cxx |   17 -
 starmath/source/view.cxx|2 +-
 sw/source/uibase/uiview/pview.cxx   |2 +-
 sw/source/uibase/uiview/srcview.cxx |3 +--
 sw/source/uibase/uiview/view.cxx|3 +--
 11 files changed, 31 insertions(+), 36 deletions(-)

New commits:
commit 9782438a5887c40246016c1f2b5fe12401d2c68d
Author: Noel Grandin 
Date:   Mon Apr 13 11:28:49 2015 +0200

convert SFX_VIEW constants to scoped enum

Change-Id: I327dc1ec722fa9445f13fc5168ad646e272ba9d4
Reviewed-on: https://gerrit.libreoffice.org/15300
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index 604a6a8..0f234ee 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -143,17 +143,10 @@ void basctl_Shell::InitInterface_Impl()
 GetStaticInterface()->RegisterPopupMenu(IDEResId(RID_POPUP_DLGED));
 }
 
-namespace
-{
-
-unsigned const ShellFlags = SFX_VIEW_CAN_PRINT | SFX_VIEW_NO_NEWWINDOW;
-
-}
-
 unsigned Shell::nShellCount = 0;
 
 Shell::Shell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell */ ) :
-SfxViewShell( pFrame_, ShellFlags ),
+SfxViewShell( pFrame_, SfxViewShellFlags::CAN_PRINT | 
SfxViewShellFlags::NO_NEWWINDOW ),
 m_aCurDocument( ScriptDocument::getApplicationScriptDocument() ),
 aHScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG ) 
),
 aVScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG ) 
),
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 08d3682..5acc75a 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -89,13 +89,18 @@ namespace o3tl
 
 //  @[SfxViewShell-Flags]
 
-#define SFX_VIEW_HAS_PRINTOPTIONS  0x0010 /* Options-Button and Options-
- Dialog in PrintDialog */
-#define SFX_VIEW_CAN_PRINT 0x0020 /* Printing enabled without having
- to create a Printer */
-#define SFX_VIEW_NO_SHOW   0x0040 /* Window of the ViewShell shall
- not be showed automatically */
-#define SFX_VIEW_NO_NEWWINDOW  0x0100 /* Allow N View */
+enum class SfxViewShellFlags
+{
+NONE  = 0x,
+HAS_PRINTOPTIONS  = 0x0010, /* Options-Button and Options-Dialog in 
PrintDialog */
+CAN_PRINT = 0x0020, /* Printing enabled without having to create a 
Printer */
+NO_SHOW   = 0x0040, /* Window of the ViewShell shall not be showed 
automatically */
+NO_NEWWINDOW  = 0x0100, /* Allow N View */
+};
+namespace o3tl
+{
+template<> struct typed_flags : 
is_typed_flags {};
+}
 
 /*  [Description]
 
@@ -174,7 +179,7 @@ private:
 
 public:
 
-SfxViewShell( SfxViewFrame *pFrame, sal_uInt16 
nFlags = 0 );
+SfxViewShell( SfxViewFrame *pFrame, 
SfxViewShellFlags nFlags = SfxViewShellFlags::NONE );
 virtual ~SfxViewShell();
 
 SfxInPlaceClient*   GetIPClient() const;
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 29398d4..9760de2 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -149,7 +149,7 @@ void ScPreviewShell::Construct( vcl::Window* pParent )
 
 ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
 SfxViewShell* pOldSh ) :
-SfxViewShell( pViewFrame, SFX_VIEW_CAN_PRINT | SFX_VIEW_HAS_PRINTOPTIONS ),
+SfxViewShell( pViewFrame, SfxViewShellFlags::CAN_PRINT | 
SfxViewShellFlags::HAS_PRINTOPTIONS ),
 pDocShell( static_cast(pViewFrame->GetObjectShell()) ),
 mpFrameWindow(NULL),
 nSourceDesignMode( SC_FORCEMODE_NONE ),
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index b62648e..360e23b 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1647,7 +1647,7 @@ void ScTabViewShell::Construct( sal_uInt8 
nForceDesignMode )
 
 ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
 SfxViewShell* pOldSh ) :
-SfxViewShell( pViewFrame, SFX_VIEW_CAN_PRINT | SFX_VIEW_HAS_PRINTOPTIONS ),
+SfxViewShell( pViewFrame, SfxViewShellFlags::CAN_PRINT | 
SfxViewShellFlags::HAS_PRINTOPTIONS ),
 ScDBFunc( &pViewFrame->GetWindow(), 
static_cast(*pViewFrame->GetObjectShell()), this ),
 eCurOST(OST_NONE),
 nDrawSfxId(0),
diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 7f55add..480262f 100644
--- a/sd/s

Re: Cancel button in printdialog box not working

2015-04-15 Thread Andy Mendoza
may I ask what's the meaning of this line of code?EndDialog(pButton == 
mpOKButton ? RET_OK : RET_CANCEL);
In my understanding, it means that if mpOKButton is clicked RET_OK is performed 
and if mpCancelButton is clicked RET_CANCEL is performed. Am I right? Could it 
be that the error is within this code? I tried reversing the two(RET_OK and 
RET_CANCEL). the output is still the same. 


 On Wednesday, April 15, 2015 3:12 AM, Michael Stahl  
wrote:
   

 On 15.04.2015 11:13, Andy Mendoza wrote:
> I have a problem with the printdialog box of LibreOffice Developer's
> Build. When I click the Cancel button it still proceeds with the
> printing. I tried tracing the code in printdlg.cxx but I get stuck with
> this line
> 
> mpCancelButton->SetClickHdl( LINK(this, PrintDialog, ClickHdl));
> I don't know where SetClickHdl came from and what does it do?
> How do I fix this problem?

that is the fabulous tools LINK macro, the best technology breakthrough
of 1991 or so.

there should be a IMPL_LINK(PrintDialog, ClickHdl ...) in the same file
that is the callback that is set here.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


   ___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/source

2015-04-15 Thread Caolán McNamara
 sw/source/core/layout/paintfrm.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c2c22d26db03949771d5a0bb4f8abf6d2dc850ea
Author: Caolán McNamara 
Date:   Wed Apr 15 11:11:03 2015 +0100

fix crash on re-export of fdo39974-1.odt to odt

Change-Id: Ib4246987a3665f655ad44339ade0350b074c3266

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index f115e0f..e8909c1 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1916,7 +1916,7 @@ bool DrawFillAttributes(
 pPrimitives(&rSequence);
 drawinglayer::primitive2d::Primitive2DSequence primitives;
 // tdf#86578 the awful lcl_SubtractFlys hack
-if (rPaintRegion.size() > 1 || rPaintRegion[0] != 
rPaintRegion.GetOrigin())
+if (rPaintRegion.size() > 1 || (!rPaintRegion.empty() && 
rPaintRegion[0] != rPaintRegion.GetOrigin()))
 {
 tools::PolyPolygon tempRegion;
 for (size_t i = 0; i < rPaintRegion.size(); ++i)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Cancel button in printdialog box not working

2015-04-15 Thread Michael Stahl
On 15.04.2015 11:13, Andy Mendoza wrote:
> I have a problem with the printdialog box of LibreOffice Developer's
> Build. When I click the Cancel button it still proceeds with the
> printing. I tried tracing the code in printdlg.cxx but I get stuck with
> this line
> 
> mpCancelButton->SetClickHdl( LINK(this, PrintDialog, ClickHdl));
> I don't know where SetClickHdl came from and what does it do?
> How do I fix this problem?

that is the fabulous tools LINK macro, the best technology breakthrough
of 1991 or so.

there should be a IMPL_LINK(PrintDialog, ClickHdl ...) in the same file
that is the callback that is set here.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Some troubles building LO

2015-04-15 Thread Piet van Oostrum
Hamidi Massinissa wrote:

 > 
 > Yes you're totally right, I did not perform make clean when I switched 
 > between these two builds.
 > But now after hours (not like previously), it is still failing. here is the 
 > output.

[/home/hamidi/work/freesoftware/LibreOffice/core/instdir/program/libwpftwriterlo.so]
 > Error 1
 > /usr/bin/ld: final link failed: No space left on device

Your disk is full.
-- 
Piet van Oostrum 
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Some troubles building LO

2015-04-15 Thread Hamidi Massinissa
hi Eike,

> Did you by chance build without --enable-dbgutil, then updated, then
> configured with --enable-debug and --enable-dbgutil and issued make
> again, without make clean?

Yes you're totally right, I did not perform make clean when I switched
between these two builds. But now after hours (not like previously), it is
still failing. here is the output.

[...]
[build CMP] xmloff/util/xo
[build DEP] LNK:CppunitTest/libtest_xmloff_uxmloff.so
[build LNK] CppunitTest/libtest_xmloff_uxmloff.so
[build DEP] LNK:Library/liblnglo.so
[build LNK] Library/liblnglo.so
[build DEP] LNK:Library/libodfflatxmllo.so
[build LNK] Library/libodfflatxmllo.so
[build DEP] LNK:Library/libt602filterlo.so
[build LNK] Library/libt602filterlo.so
[build DEP] LNK:Library/libxsltfilterlo.so
[build LNK] Library/libxsltfilterlo.so
[build DEP] LNK:Library/libxoflo.so
[build LNK] Library/libxoflo.so
[build DEP] LNK:Library/libxsec_xmlsec.so
[build LNK] Library/libxsec_xmlsec.so
[build DEP] LNK:Library/libwriterperfectlo.so
[build LNK] Library/libwriterperfectlo.so
[build CUT] xmloff_uxmloff
[build CMP] linguistic/source/lng
[build CMP] filter/source/odfflatxml/odfflatxml
[build CMP] filter/source/t602/t602filter
[build CMP] filter/source/xsltfilter/xsltfilter
[build CMP] xmloff/source/transform/xof
[build CUT] cppcanvas_test
[build CUT] filter_xslt
[build DEP] LNK:CppunitTest/libtest_writerperfect_stream.so
[build LNK] CppunitTest/libtest_writerperfect_stream.so
[build CHK] xmloff
[build DEP] LNK:Library/libhyphenlo.so
[build LNK] Library/libhyphenlo.so
[build DEP] LNK:Library/liblnthlo.so
[build LNK] Library/liblnthlo.so
[build DEP] LNK:Library/libspelllo.so
[build LNK] Library/libspelllo.so
[build BIN] linguistic
[build CMP] xmlsecurity/util/xsec_xmlsec
[build DEP] LNK:Library/libwpftdrawlo.so
[build LNK] Library/libwpftdrawlo.so
[build DEP] LNK:Library/libwpftimpresslo.so
[build LNK] Library/libwpftimpresslo.so
[build DEP] LNK:Library/libwpftwriterlo.so
[build LNK] Library/libwpftwriterlo.so
[build DEP] LNK:Library/libwpftcalclo.so
[build LNK] Library/libwpftcalclo.so
collect2: error: ld returned 1 exit status
make[1]: ***
[/home/hamidi/work/freesoftware/LibreOffice/core/instdir/program/libwpftimpresslo.so]
Error 1
make[1]: *** Waiting for unfinished jobs
collect2: error: ld returned 1 exit status
make[1]: ***
[/home/hamidi/work/freesoftware/LibreOffice/core/instdir/program/libwpftwriterlo.so]
Error 1
/usr/bin/ld: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make[1]: ***
[/home/hamidi/work/freesoftware/LibreOffice/core/instdir/program/libslideshowlo.so]
Error 1
collect2: error: ld returned 1 exit status
make[1]: ***
[/home/hamidi/work/freesoftware/LibreOffice/core/instdir/program/libwpftdrawlo.so]
Error 1
make: *** [build] Error 2
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - dictionaries

2015-04-15 Thread Andras Timar
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5e3b937d4becc130cca91b9567ebbefa4ef2a73a
Author: Andras Timar 
Date:   Wed Apr 8 12:22:46 2015 +0200

Updated core
Project: dictionaries  8bfeeb3e2590472b82368740b2031e8f2360badd

Update Portuguese dictionary to version 15.4.4.1

Change-Id: Iee435bb01c8111612d0ee773c6ee4863a51db252
(cherry picked from commit 7991db3dd76ae9fe15faadbd25efb9bceed44e63)
Reviewed-on: https://gerrit.libreoffice.org/15202
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/dictionaries b/dictionaries
index 8f2ef41..8bfeeb3 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 8f2ef41f65a6199446b74283c6561e75d7f0faf7
+Subproject commit 8bfeeb3e2590472b82368740b2031e8f2360badd
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Branch 'distro/collabora/cp-4.3' - 2 commits - pt_PT/description.xml pt_PT/pt_PT.dic

2015-04-15 Thread Andras Timar
 pt_PT/description.xml |2 
 pt_PT/pt_PT.dic   |  132 --
 2 files changed, 109 insertions(+), 25 deletions(-)

New commits:
commit 8bfeeb3e2590472b82368740b2031e8f2360badd
Author: Andras Timar 
Date:   Wed Apr 8 12:22:46 2015 +0200

Update Portuguese dictionary to version 15.4.4.1

Change-Id: Iee435bb01c8111612d0ee773c6ee4863a51db252
(cherry picked from commit 7991db3dd76ae9fe15faadbd25efb9bceed44e63)
Reviewed-on: https://gerrit.libreoffice.org/15202
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/pt_PT/description.xml b/pt_PT/description.xml
index 044518a..5e1f486 100644
--- a/pt_PT/description.xml
+++ b/pt_PT/description.xml
@@ -1,6 +1,6 @@
 
 http://openoffice.org/extensions/description/2006"; 
xmlns:d="http://openoffice.org/extensions/description/2006";  
xmlns:xlink="http://www.w3.org/1999/xlink";>
-
+
 
 
 European Portuguese spelling dictionary, 
hyphenation rules, and thesaurus
diff --git a/pt_PT/pt_PT.dic b/pt_PT/pt_PT.dic
index a424b4e..0567bc0 100644
--- a/pt_PT/pt_PT.dic
+++ b/pt_PT/pt_PT.dic
@@ -1,4 +1,4 @@
-   44164
+   44167
 ,  [CAT=punct1a]
 ;  [CAT=punct1b]
 :  [CAT=punct1c]
@@ -2727,7 +2727,8 @@ areado[CAT=adj,N=s,G=m]
 areal/p[CAT=nc,G=m,N=s]
 areamento  [CAT=nc,G=m,N=s]
 área/pu   [CAT=nc,G=f,N=s]
-areeiro[CAT=nc,G=m,N=s]
+areeiro/p  [CAT=nc,G=m,N=s]
+areento/pf [CAT=adj,N=s,G=m]
 areia/p[CAT=nc,G=f,N=s]
 arejador   [CAT=a_nc,G=m,N=s]
 arejar/XYPLMD  [CAT=v,T=inf,TR=t]
@@ -10374,7 +10375,7 @@ dedálica   [CAT=nc,G=f,N=s]
 dedálico/f[CAT=adj,N=s,G=m]
 dedal/p[CAT=nc,G=m,N=s]
 dedão [CAT=nc,G=m,N=s]
-dedicado/fps   [CAT=adj,N=s,G=m]
+dedicado/fpsm  [CAT=adj,N=s,G=m]
 dedicar/XYPLcD [CAT=v,T=inf,TR=t]
 dedicatória/p [CAT=nc,G=f,N=s]
 dedilhar/XYPLc [CAT=v,T=inf,TR=t]
@@ -12894,6 +12895,7 @@ encartar/XYPLScM[CAT=v,T=inf,TR=t]
 encasacar/XYPL [CAT=v,T=inf,TR=t]
 encascar/XYPL  [CAT=v,T=inf,TR=_]
 encastelar/XYPL[CAT=v,T=inf,TR=t]
+encastrar/XYPL [CAT=v,T=inf,TR=t]
 encasular/XYPL [CAT=v,T=inf,TR=t]
 encatrafiar/XYPL   [CAT=v,T=inf,TR=t]
 encavacadela/p [CAT=nc,G=f,N=s]
@@ -16494,7 +16496,7 @@ galopada[CAT=nc,G=f,N=s]
 galopante/p[CAT=adj,N=s,G=_]
 galopar/XYPLDn [CAT=v,T=inf,TR=_]
 galope/p   [CAT=nc,G=m,N=s]
-galvânico [CAT=adj,N=s,G=m]
+galvânico/fp  [CAT=adj,N=s,G=m]
 galvanismo/p   [CAT=nc,G=m,N=s]
 galvanizante/p [CAT=adj,N=s,G=_]
 galvanizar/XYPLcDn [CAT=v,T=inf,TR=t]
@@ -19020,8 +19022,8 @@ inflamatório/fp[CAT=adj,N=s,G=m]
 infletir/YPL   [PREAO90=inflectir,CAT=v,T=inf,TR=t,I=3]
 inflexão/p[CAT=nc,G=f,N=s]
 inflexibilidade/p  [CAT=nc,G=f,N=s]
-inflexível/md [CAT=adj,N=s,G=_]
-inflexivo  [CAT=adj,N=s,G=m]
+inflexível/mdp[CAT=adj,N=s,G=_]
+inflexivo/p[CAT=adj,N=s,G=m]
 infligir/XYPL  [CAT=v,T=inf,TR=t]
 inflorescência/p  [CAT=nc,G=f,N=s]
 influência/p  [CAT=nc,G=f,N=s]
@@ -20337,18 +20339,18 @@ laminagem [CAT=nc,G=f,N=s]
 lâmina/p  [CAT=nc,G=f,N=s]
 laminar/pv [CAT=adj,N=s,G=_]
 laminar/XYPLcD [CAT=v,T=inf,TR=t]
-laminoso   [CAT=adj,N=s,G=m]
+laminoso/fp[CAT=adj,N=s,G=m]
 lamínula  [CAT=nc,G=f,N=s]
 lamiré[CAT=nc,G=m,N=s]
 lâmpada/p [CAT=nc,G=f,N=s]
 lampadeiro [CAT=nc,G=m,N=s]
-lamparina  [CAT=nc,G=f,N=s]
-lampeiro   [CAT=adj,N=s,G=m]
+lamparina/p[CAT=nc,G=f,N=s]
+lampeiro/pf[CAT=adj,N=s,G=m]
 lampejante/p   [CAT=adj,N=s,G=_]
 lampejar/XYLn  [CAT=v,T=inf,TR=i]
 lampejo/p  [CAT=nc,G=m,N=s]
 lampião/p [CAT=nc,G=m,N=s]
-lampreia   [CAT=nc,G=f,N=s]
+lampreia/p [CAT=nc,G=f,N=s]
 lamuriante/p   [CAT=adj,N=s,G=_]
 lamuriar/XYLDn [CAT=v,T=inf,TR=i]
 lamuriento [CAT=adj,N=s,G=m]
@@ -20363,20 +20365,20 @@ lançador [CAT=a_nc,G=m,N=s]
 lançadura [CAT=nc,G=f,N=s]
 lança-foguetes[CAT=nc,G=m,N=s]
 lança-granadas[CAT=nc,G=m,N=s]
-lança [CAT=nc,G=f,N=s]
+lança/p   [CAT=nc,G=f,N=s]
 lançar/XYPLMDvR   [CAT=v,T=inf,TR=t]
 lança-torpedos[CAT=nc,G=m,N=s,N=_]
 lancear/ZYPLD  [CAT=v,T=inf,TR=t]
 lanceiro   [CAT=nc,G=m,N=s]
 lance/p[CAT=nc,G=m,N=s]
 lanceolado/fp  [CAT=adj,N=s,G=m]
-lancetada  [CAT=nc,G=f,N=s]
-lanceta[CAT=nc,G=f,N=s]
+lancetada/p[CAT=nc,G=f,N=s]
+lanceta/p  [CAT=nc,G=f,N=s]
 lancetar/XYPL  [CAT=v,T=inf,TR=t]
 lanchão   [CAT=nc,G=m,N=s]
 lancha/p   [CAT=nc,G=f,N=s]
 lanchar/XYPL   [CAT=v,T=inf,TR=_]
-lancheira  [CAT=nc,G=f,N=s]
+lancheira/p[CAT=nc,G=f,N=s]
 lancheiro/f[CAT=nc,G=m,N=s]
 lanche [CAT=nc,G=m,N=s]
 lancheta   [CAT=nc,G=f,N=s]
@@ -28616,7 +28618,7 @@ recapitular/XYPLc   [CAT=v,T=inf,TR=t]
 recapturar/XYPL[CAT=v,T=inf,TR=t]
 recarga[CAT=nc,G=f,N=s]
 recargar/XYPL  [CAT=v,T=inf,TR=t]
-recarregar/XYPL[CAT=v,T=inf,TR=t]
+recarregar/XYPLv   [CAT=v,T=inf,TR=t]
 rec

[Libreoffice-commits] core.git: oox/source

2015-04-15 Thread Caolán McNamara
 oox/source/export/chartexport.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 135907f2061550624ee1859745d94eee01849070
Author: Caolán McNamara 
Date:   Wed Apr 15 10:30:34 2015 +0100

fix crash on export of fdo60365-2.ods to xlsx

Change-Id: I1a281b096e4d1831bcf67ca03180afff043fbcfd

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 2373c5a..edc1176 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1980,7 +1980,7 @@ void ChartExport::exportSeriesCategory( const Reference< 
chart2::data::XDataSequ
 pFS->startElement( FSNS( XML_c, XML_cat ),
 FSEND );
 
-OUString aCellRange =  xValueSeq->getSourceRangeRepresentation();
+OUString aCellRange = xValueSeq.is() ? 
xValueSeq->getSourceRangeRepresentation() : OUString();
 aCellRange = parseFormula( aCellRange );
 // TODO: need to handle XML_multiLvlStrRef according to aCellRange
 pFS->startElement( FSNS( XML_c, XML_strRef ),
@@ -2023,7 +2023,7 @@ void ChartExport::exportSeriesValues( const Reference< 
chart2::data::XDataSequen
 pFS->startElement( FSNS( XML_c, nValueType ),
 FSEND );
 
-OUString aCellRange =  xValueSeq->getSourceRangeRepresentation();
+OUString aCellRange = xValueSeq.is() ? 
xValueSeq->getSourceRangeRepresentation() : OUString();
 aCellRange = parseFormula( aCellRange );
 // TODO: need to handle XML_multiLvlStrRef according to aCellRange
 pFS->startElement( FSNS( XML_c, XML_numRef ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - sfx2/uiconfig

2015-04-15 Thread Andras Timar
 sfx2/uiconfig/ui/querysavedialog.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9fcedcca3b4f166bec50c27a5b1fc0a6e78f8f75
Author: Andras Timar 
Date:   Wed Apr 15 11:29:17 2015 +0200

tdf#90596 usability: change W hotkey to L

Change-Id: I4d3e411bfddbeabe8ee55b6969955d0904a08585

diff --git a/sfx2/uiconfig/ui/querysavedialog.ui 
b/sfx2/uiconfig/ui/querysavedialog.ui
index 64ca5f3..19ca7c1 100644
--- a/sfx2/uiconfig/ui/querysavedialog.ui
+++ b/sfx2/uiconfig/ui/querysavedialog.ui
@@ -22,7 +22,7 @@
 end
 
   
-Close _without 
saving
+C_lose without 
saving
 True
 True
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - translations

2015-04-15 Thread Andras Timar
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9c68314564f20965a875a5c037a7a4334d7e2978
Author: Andras Timar 
Date:   Wed Apr 15 11:27:07 2015 +0200

Updated core
Project: translations  20fb7ad7869ac2ed8cdf9ba6c5ce12c29b78525c

tdf#90596 usability: change W hotkey to L

Change-Id: Ib64d4527d780981d9c4df282d1b6975f546eb550

diff --git a/translations b/translations
index d5a6431..20fb7ad 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit d5a64312dc569301c2bc332ea1515fdbb5d2d866
+Subproject commit 20fb7ad7869ac2ed8cdf9ba6c5ce12c29b78525c
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Cancel button in printdialog box not working

2015-04-15 Thread Andy Mendoza
Hi.
I have a problem with the printdialog box of LibreOffice Developer's Build. 
When I click the Cancel button it still proceeds with the printing. I tried 
tracing the code in printdlg.cxx but I get stuck with this line
mpCancelButton->SetClickHdl( LINK(this, PrintDialog, ClickHdl));I don't know 
where SetClickHdl came from and what does it do?How do I fix this problem?
I'm still new with developing LibreOffice so I'm not yet familiar with the flow 
of the codes.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: 2 commits - include/svx sc/source

2015-04-15 Thread Caolán McNamara
 include/svx/camera3d.hxx  |2 +-
 include/svx/charmap.hxx   |2 +-
 include/svx/charthelper.hxx   |4 +---
 include/svx/checklbx.hxx  |3 +--
 include/svx/chrtitem.hxx  |   32 
 include/svx/clipboardctl.hxx  |4 +---
 include/svx/clipfmtitem.hxx   |3 +--
 include/svx/colrctrl.hxx  |6 +++---
 include/svx/compressgraphicdialog.hxx |2 +-
 include/svx/connctrl.hxx  |3 +--
 include/svx/contdlg.hxx   |9 -
 include/svx/ctredlin.hxx  |   16 +++-
 include/svx/cube3d.hxx|2 +-
 sc/source/filter/excel/xestyle.cxx|   12 
 14 files changed, 39 insertions(+), 61 deletions(-)

New commits:
commit bf2fca48975c4ecdba2cc6fd2b92aaae166a088b
Author: Caolán McNamara 
Date:   Wed Apr 15 10:06:21 2015 +0100

add some SAL_WARN_UNUSED

Change-Id: I208ce526ab09c118709e82b0930db4502d5c5b76

diff --git a/include/svx/camera3d.hxx b/include/svx/camera3d.hxx
index b758ea0..66133e6 100644
--- a/include/svx/camera3d.hxx
+++ b/include/svx/camera3d.hxx
@@ -29,7 +29,7 @@
 |*
 \/
 
-class SVX_DLLPUBLIC Camera3D : public Viewport3D
+class SVX_DLLPUBLIC SAL_WARN_UNUSED Camera3D : public Viewport3D
 {
  protected:
 basegfx::B3DPoint   aResetPos;
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index d27afb6..7df5d9a 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -39,7 +39,7 @@ namespace svx
 
 // class SvxShowCharSet --
 
-class SVX_DLLPUBLIC SvxShowCharSet : public Control
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxShowCharSet : public Control
 {
 public:
 SvxShowCharSet( vcl::Window* pParent );
diff --git a/include/svx/charthelper.hxx b/include/svx/charthelper.hxx
index 56627cc..960e58c 100644
--- a/include/svx/charthelper.hxx
+++ b/include/svx/charthelper.hxx
@@ -28,7 +28,7 @@
 #include 
 #include 
 
-class SVX_DLLPUBLIC ChartHelper
+class SVX_DLLPUBLIC SAL_WARN_UNUSED ChartHelper
 {
 public:
 /// Check that the XDiagram is a real 3D chart.
@@ -57,8 +57,6 @@ public:
 bool bNoLineStyle = true);
 };
 
-
-
 #endif // INCLUDED_SVX_CHARTHELPER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx
index eb587db..baeac1b 100644
--- a/include/svx/checklbx.hxx
+++ b/include/svx/checklbx.hxx
@@ -26,7 +26,7 @@
 
 // class SvxCheckListBox -
 
-class SVX_DLLPUBLIC SvxCheckListBox : public SvTreeListBox
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxCheckListBox : public SvTreeListBox
 {
 using Window::GetText;
 
@@ -71,7 +71,6 @@ public:
 virtual voidKeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
 };
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/chrtitem.hxx b/include/svx/chrtitem.hxx
index 9a19a18..4d51b03 100644
--- a/include/svx/chrtitem.hxx
+++ b/include/svx/chrtitem.hxx
@@ -22,8 +22,6 @@
 #include 
 #include 
 
-
-
 enum SvxChartStyle
 {
 CHSTYLE_2D_LINE,
@@ -164,8 +162,7 @@ enum SvxChartRegress
 
 #define CHREGRESS_COUNT (CHREGRESS_UNKNOWN + 1)
 
-
-class SVX_DLLPUBLIC SvxChartStyleItem : public SfxEnumItem
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartStyleItem : public SfxEnumItem
 {
 public:
 TYPEINFO_OVERRIDE();
@@ -182,8 +179,7 @@ public:
 };
 
 
-
-class SVX_DLLPUBLIC SvxChartRegressItem : public SfxEnumItem
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartRegressItem : public SfxEnumItem
 {
 public:
 TYPEINFO_OVERRIDE();
@@ -200,9 +196,7 @@ public:
 sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
 };
 
-
-
-class SVX_DLLPUBLIC SvxChartDataDescrItem : public SfxEnumItem
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartDataDescrItem : public SfxEnumItem
 {
 public:
 TYPEINFO_OVERRIDE();
@@ -217,9 +211,7 @@ public:
 { return (SvxChartDataDescr)SfxEnumItem::GetValue(); }
 };
 
-
-
-class SVX_DLLPUBLIC SvxChartTextOrderItem : public SfxEnumItem
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartTextOrderItem : public SfxEnumItem
 {
 public:
 TYPEINFO_OVERRIDE();
@@ -239,9 +231,7 @@ public:
 { return (SvxChartTextOrder)SfxEnumItem::GetValue(); }
 };
 
-
-
-class SVX_DLLPUBLIC SvxChartTextOrientItem : public SfxEnumItem
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartTextOrientItem : public SfxEnumItem
 {
 public:
 TYPEINFO_OVERRIDE();
@@ -256,9 +246,7 @@ public:
 { return (SvxChartTextOrient)SfxEnumItem::GetValue(); }
 };
 
-
-
-class SVX_DLLPUBLIC SvxChartKindErrorItem : public SfxEnumItem
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartKindErrorItem : public SfxEnumItem
 {
 public:
 TYPEINFO_OVERRIDE();
@@ -277,9 +265,7 @@ public:
 sal_uInt16 GetVersion (sal_uInt16 n

[Libreoffice-commits] core.git: sw/source

2015-04-15 Thread László Németh
 sw/source/filter/html/htmlplug.cxx |   31 +++
 1 file changed, 19 insertions(+), 12 deletions(-)

New commits:
commit 8e4f458df490dcce9451b91974bdea52b1fef522
Author: László Németh 
Date:   Tue Apr 14 22:09:13 2015 +0200

Uncaught exception at HTML export of embedded objects

Using SkipImages FilterOptions with HTML export, LibreOffice
tries to export the content of the embedded objects, too, but
it seems, we get only exceptions for a simple test document, too.

Change-Id: I756ca79b183c0ee2f2be712df799a97612f9475b

diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index 96670fb..213b6b0 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1283,18 +1283,25 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const 
SwFrmFmt& rFrmFmt,
 
 if (xStorable.is() && !aFilter.isEmpty())
 {
-SvMemoryStream aStream;
-uno::Reference xOutputStream(new 
utl::OStreamWrapper(aStream));
-utl::MediaDescriptor aMediaDescriptor;
-aMediaDescriptor["FilterName"] <<= aFilter;
-aMediaDescriptor["FilterOptions"] <<= OUString("SkipHeaderFooter");
-aMediaDescriptor["OutputStream"] <<= xOutputStream;
-xStorable->storeToURL("private:stream", 
aMediaDescriptor.getAsConstPropertyValueList());
-OString aData(static_cast(aStream.GetData()), 
aStream.GetSize());
-// Wrap output in a  tag to avoid 'HTML parser error: 
Unexpected end tag: p'
-HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), 
OOO_STRING_SVTOOLS_HTML_span);
-rWrt.Strm().WriteCharPtr(aData.getStr());
-HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), 
OOO_STRING_SVTOOLS_HTML_span, false);
+try
+{
+// FIXME: exception for the simplest test document, too
+SvMemoryStream aStream;
+uno::Reference xOutputStream(new 
utl::OStreamWrapper(aStream));
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= aFilter;
+aMediaDescriptor["FilterOptions"] <<= 
OUString("SkipHeaderFooter");
+aMediaDescriptor["OutputStream"] <<= xOutputStream;
+xStorable->storeToURL("private:stream", 
aMediaDescriptor.getAsConstPropertyValueList());
+OString aData(static_cast(aStream.GetData()), 
aStream.GetSize());
+// Wrap output in a  tag to avoid 'HTML parser error: 
Unexpected end tag: p'
+HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), 
OOO_STRING_SVTOOLS_HTML_span);
+rWrt.Strm().WriteCharPtr(aData.getStr());
+HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), 
OOO_STRING_SVTOOLS_HTML_span, false);
+}
+catch ( uno::Exception& )
+{
+}
 }
 
 return rWrt;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx

2015-04-15 Thread Caolán McNamara
 include/svx/algitem.hxx |8 ++--
 include/svx/bmpmask.hxx |6 +++---
 2 files changed, 5 insertions(+), 9 deletions(-)

New commits:
commit eadbad607a481cc27d841ecfa07e7fd06ef7f741
Author: Caolán McNamara 
Date:   Wed Apr 15 09:46:32 2015 +0100

add some SAL_WARN_UNUSED

Change-Id: Ic924918b1d079bd486bf30175b5b5a17f274bf4a

diff --git a/include/svx/algitem.hxx b/include/svx/algitem.hxx
index bacf8a3..aced5b0 100644
--- a/include/svx/algitem.hxx
+++ b/include/svx/algitem.hxx
@@ -27,9 +27,7 @@
 
 class SvStream;
 
-
-
-class SVX_DLLPUBLIC SvxOrientationItem: public SfxEnumItem
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxOrientationItem: public SfxEnumItem
 {
 public:
 TYPEINFO_OVERRIDE();
@@ -69,9 +67,7 @@ public:
 voidSetFromRotation( sal_Int32 nRotation, bool 
bStacked );
 };
 
-
-
-class SVX_DLLPUBLIC SvxMarginItem: public SfxPoolItem
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxMarginItem: public SfxPoolItem
 {
 sal_Int16   nLeftMargin;
 sal_Int16   nTopMargin;
diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx
index 8ee7e7c..1747e16 100644
--- a/include/svx/bmpmask.hxx
+++ b/include/svx/bmpmask.hxx
@@ -36,7 +36,7 @@
 \/
 class SvxBmpMask;
 
-class SvxBmpMaskSelectItem : public SfxControllerItem
+class SAL_WARN_UNUSED SvxBmpMaskSelectItem : public SfxControllerItem
 {
 private:
 SvxBmpMask  &rBmpMask;
@@ -56,7 +56,7 @@ public:
 |*
 \/
 
-class SVX_DLLPUBLIC SvxBmpMaskChildWindow : public SfxChildWindow
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxBmpMaskChildWindow : public 
SfxChildWindow
 {
  public:
 SvxBmpMaskChildWindow( vcl::Window*,
@@ -76,7 +76,7 @@ class MaskData;
 class MaskSet;
 class ColorWindow;
 
-class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
+class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxBmpMask : public SfxDockingWindow
 {
 friend class MaskData;
 friend class MaskSet;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2015-04-15 Thread Caolán McNamara
 sc/source/filter/excel/xelink.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit cee6eb254fae1012bc6ffe1b2e440fe58fedac1b
Author: Caolán McNamara 
Date:   Wed Apr 15 09:41:10 2015 +0100

fix col limit crash on export of ooo103315-1.ods to xls

Change-Id: Ic68ddc56d9cf9dd410c1f073ba83bfeea8220bf0

diff --git a/sc/source/filter/excel/xelink.cxx 
b/sc/source/filter/excel/xelink.cxx
index 9ea0822..87b7251 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1367,7 +1367,8 @@ bool XclExpXct::BuildCrnList( XclExpCrnList& rCrnRecs )
 for( SCROW nScRow = nScRow1; bValid && (nScRow <= nScRow2); ++nScRow )
 {
 ::std::pair< SCCOL, SCCOL > aColRange = mxCacheTable->getColRange( 
nScRow );
-for( SCCOL nScCol = aColRange.first; bValid && (nScCol < 
aColRange.second); ++nScCol )
+const SCCOL nScEnd = ::std::min( aColRange.second, MAXCOLCOUNT );
+for( SCCOL nScCol = aColRange.first; bValid && (nScCol < nScEnd); 
++nScCol )
 {
 if( maUsedCells.IsCellMarked( nScCol, nScRow, true ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 4 commits - writerfilter/source

2015-04-15 Thread Miklos Vajna
 writerfilter/source/dmapper/BorderHandler.hxx|2 +-
 writerfilter/source/dmapper/DomainMapperTableManager.cxx |4 ++--
 writerfilter/source/dmapper/NumberingManager.cxx |2 +-
 writerfilter/source/dmapper/PropertyMap.cxx  |2 +-
 writerfilter/source/dmapper/StyleSheetTable.cxx  |2 +-
 writerfilter/source/dmapper/TDefTableHandler.cxx |8 +++-
 writerfilter/source/dmapper/TDefTableHandler.hxx |4 +---
 writerfilter/source/dmapper/TablePropertiesHandler.cxx   |9 -
 writerfilter/source/dmapper/TablePropertiesHandler.hxx   |3 +--
 writerfilter/source/dmapper/TblStylePrHandler.cxx|2 +-
 10 files changed, 16 insertions(+), 22 deletions(-)

New commits:
commit 6a09822d28750e23ef6514dfa831e151803c517d
Author: Miklos Vajna 
Date:   Wed Apr 15 09:18:43 2015 +0200

writerfilter: reduce scope in ListsManager

Change-Id: Ibc2fa865614df4403acee4a2c87a3fb19279

diff --git a/writerfilter/source/dmapper/NumberingManager.cxx 
b/writerfilter/source/dmapper/NumberingManager.cxx
index ce5628e..e341ff9 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -829,7 +829,6 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal )
 
 void ListsManager::lcl_sprm( Sprm& rSprm )
 {
-static bool bIsStartVisited = false;
 //fill the attributes of the style sheet
 sal_uInt32 nSprmId = rSprm.getId();
 if( m_pCurrentDefinition.get() ||
@@ -838,6 +837,7 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
 (nSprmId == NS_ooxml::LN_CT_NumPicBullet_pict && 
m_pCurrentNumPicBullet.get()) ||
 nSprmId == NS_ooxml::LN_CT_Numbering_numPicBullet)
 {
+static bool bIsStartVisited = false;
 sal_Int32 nIntValue = rSprm.getValue()->getInt();
 switch( nSprmId )
 {
commit 53cf9748ccce3660ec3a5b0ad8ad402313af6143
Author: Miklos Vajna 
Date:   Wed Apr 15 09:17:19 2015 +0200

writerfilter: TDefTableHandler's bOOXML was always true

Change-Id: I9efcb32f742aa7a0549ceb246a1b75fa3af662be

diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx 
b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index f10718a..a345fdd 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -244,7 +244,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
 writerfilter::Reference::Pointer_t pProperties = 
rSprm.getProps();
 if( pProperties.get())
 {
-TDefTableHandlerPtr pTDefTableHandler( new 
TDefTableHandler(true) );
+TDefTableHandlerPtr pTDefTableHandler( new 
TDefTableHandler() );
 pProperties->resolve( *pTDefTableHandler );
 
 TablePropertyMapPtr pRowPropMap( new TablePropertyMap );
diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx 
b/writerfilter/source/dmapper/TDefTableHandler.cxx
index 658bea6..18746ce 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.cxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.cxx
@@ -34,13 +34,12 @@ using namespace ::com::sun::star;
 
 
 
-TDefTableHandler::TDefTableHandler(bool bOOXML) :
+TDefTableHandler::TDefTableHandler() :
 LoggedProperties(dmapper_logger, "TDefTableHandler"),
 m_nLineWidth(0),
 m_nLineType(0),
 m_nLineColor(0),
-m_nLineDistance(0),
-m_bOOXML( bOOXML )
+m_nLineDistance(0)
 {
 }
 
@@ -330,8 +329,7 @@ void TDefTableHandler::localResolve(Id rName, 
writerfilter::Referenceresolve( *this );
 table::BorderLine2 aBorderLine;
-ConversionHelper::MakeBorderLine( m_nLineWidth,   m_nLineType, 
m_nLineColor,
-
aBorderLine, m_bOOXML );
+ConversionHelper::MakeBorderLine(m_nLineWidth, m_nLineType, 
m_nLineColor, aBorderLine, /*bIsOOXML=*/true);
 const bool rtl = false; // TODO
 switch( rName )
 {
diff --git a/writerfilter/source/dmapper/TDefTableHandler.hxx 
b/writerfilter/source/dmapper/TDefTableHandler.hxx
index eb6b37b..65a6f56 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.hxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.hxx
@@ -59,8 +59,6 @@ private:
 sal_Int32   m_nLineColor;
 sal_Int32   m_nLineDistance;
 
-boolm_bOOXML;
-
 OUString m_aInteropGrabBagName;
 std::vector m_aInteropGrabBag;
 void appendGrabBag(const OUString& aKey, const OUString& aValue);
@@ -72,7 +70,7 @@ private:
 virtual void lcl_sprm(Sprm & sprm) SAL_OVERRIDE;
 
 public:
-TDefTableHandler( bool bOOXML );
+TDefTableHandler();
 virtual ~TDefTableHandler();
 
 size_t  getCellCount() const;
diff --git a/writerfilter/sour

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - include/oox oox/source

2015-04-15 Thread Markus Mohrhard
 include/oox/export/chartexport.hxx |3 ++
 oox/source/export/chartexport.cxx  |   41 +
 2 files changed, 44 insertions(+)

New commits:
commit 84a63e099c97a721715de1710dc396294426bb6c
Author: Markus Mohrhard 
Date:   Wed Apr 15 00:21:21 2015 +0200

export missing value treatment to OOXML

Change-Id: I1a448e9c954a3851fe3590a0fae73ed5b27555f0
(cherry picked from commit e68ceaec43f0c0ff326064642072bb8f904e7e8a)

diff --git a/include/oox/export/chartexport.hxx 
b/include/oox/export/chartexport.hxx
index 524c61d..fb32b0c 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -171,6 +171,9 @@ private:
 void exportView3D();
 sal_Bool isDeep3dChart();
 
+void exportMissingValueTreatment(com::sun::star::uno::Reference<
+com::sun::star::beans::XPropertySet> xPropSet);
+
 public:
 
 ChartExport( sal_Int32 nXmlNamespace, ::sax_fastparser::FSHelperPtr pFS, 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel, 
::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = 
DOCUMENT_PPTX );
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 0b63d3e..be38415 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -845,9 +846,44 @@ void ChartExport::exportChart( Reference< 
::com::sun::star::chart::XChartDocumen
 XML_val, "1",
 FSEND );
 
+exportMissingValueTreatment(Reference(mxDiagram, 
uno::UNO_QUERY));
+
 pFS->endElement( FSNS( XML_c, XML_chart ) );
 }
 
+void 
ChartExport::exportMissingValueTreatment(uno::Reference 
xPropSet)
+{
+if (!xPropSet.is())
+return;
+
+sal_Int32 nVal = 0;
+uno::Any aAny = xPropSet->getPropertyValue("MissingValueTreatment");
+if (!(aAny >>= nVal))
+return;
+
+const char* pVal = NULL;
+switch (nVal)
+{
+case cssc::MissingValueTreatment::LEAVE_GAP:
+pVal = "gap";
+break;
+case cssc::MissingValueTreatment::USE_ZERO:
+pVal = "zero";
+break;
+case cssc::MissingValueTreatment::CONTINUE:
+pVal = "span";
+break;
+default:
+SAL_WARN("oox", "unknown MissingValueTreatment value");
+break;
+}
+
+FSHelperPtr pFS = GetFS();
+pFS->singleElement( FSNS(XML_c, XML_dispBlanksAs),
+XML_val, pVal,
+FSEND);
+}
+
 void ChartExport::exportLegend( Reference< 
::com::sun::star::chart::XChartDocument > rChartDoc )
 {
 FSHelperPtr pFS = GetFS();
commit 063882a18477abc045719353ac9fbd85763de508
Author: Markus Mohrhard 
Date:   Tue Apr 14 23:07:22 2015 +0200

we use the correct OOXML default value now

Change-Id: I1aad3e40ad61a1397b619bdc6e0f578e2c9c141e
(cherry picked from commit ec2c8a602ecb8664b24d77e6ca6af17bf59d211c)

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 6be487f..0b63d3e 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -800,7 +800,12 @@ void ChartExport::exportChart( Reference< 
::com::sun::star::chart::XChartDocumen
 {
 Reference< drawing::XShape > xShape = rChartDoc->getTitle();
 if( xShape.is() )
+{
 exportTitle( xShape );
+pFS->singleElement( FSNS(XML_c, XML_autoTitleDeleted),
+XML_val, "0",
+FSEND);
+}
 }
 InitPlotArea( );
 if( mbIs3DChart )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - 4 commits - include/oox oox/source

2015-04-15 Thread Markus Mohrhard
 include/oox/export/chartexport.hxx|3 +
 oox/source/drawingml/chart/typegroupconverter.cxx |1 
 oox/source/export/chartexport.cxx |   48 +-
 3 files changed, 51 insertions(+), 1 deletion(-)

New commits:
commit 7c4461a3cc5af47803a2197e5986e9fd38e54821
Author: Markus Mohrhard 
Date:   Wed Apr 15 03:25:55 2015 +0200

import marker color from OOXML, related tdf#81407

Change-Id: Ie416d757b73e99836d14b7f24a5cb4b370284d8c
(cherry picked from commit 30936e3f6f8242950526ce9a0d02971a881b7910)

diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx 
b/oox/source/drawingml/chart/typegroupconverter.cxx
index 3ca777f..cc05e7d 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -485,6 +485,7 @@ void TypeGroupConverter::convertMarker( PropertySet& 
rPropSet, sal_Int32 nOoxSym
 {
 Color aFillColor = xShapeProps->getFillProperties().maFillColor;
 aSymbol.FillColor = 
aFillColor.getColor(getFilter().getGraphicHelper());
+rPropSet.setProperty(PROP_Color, aSymbol.FillColor);
 }
 
 // set the property
commit d7bc265531f863ffadea987b0077f6f2f4ad04eb
Author: Markus Mohrhard 
Date:   Wed Apr 15 03:02:01 2015 +0200

export marker color correctly, tdf#81407

Change-Id: Iebc3d87642c93fcdecddd6332fd57b7fdfb2d337
(cherry picked from commit 96c05f82cd4df35505497bc29d96c8a250072db0)

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 39d082a..acb4f1f 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3020,7 +3020,12 @@ void ChartExport::exportMarker(Reference< 
chart2::XDataSeries > xSeries)
 
 pFS->startElement( FSNS( XML_c, XML_spPr ),
 FSEND );
-WriteSolidFill(aSymbol.FillColor);
+
+util::Color aColor = aSymbol.FillColor;
+if (GetProperty(xPropSet, "Color"))
+mAny >>= aColor;
+
+WriteSolidFill(aColor);
 pFS->endElement( FSNS( XML_c, XML_spPr ) );
 
 pFS->endElement( FSNS( XML_c, XML_marker ) );
commit fa125246f444b49073c8039a251048c45bd12c48
Author: Markus Mohrhard 
Date:   Wed Apr 15 00:21:21 2015 +0200

export missing value treatment to OOXML

Change-Id: I1a448e9c954a3851fe3590a0fae73ed5b27555f0
(cherry picked from commit e68ceaec43f0c0ff326064642072bb8f904e7e8a)

diff --git a/include/oox/export/chartexport.hxx 
b/include/oox/export/chartexport.hxx
index 8d570ec..aaa0ea9 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -181,6 +181,9 @@ private:
 void exportView3D();
 bool isDeep3dChart();
 
+void exportMissingValueTreatment(com::sun::star::uno::Reference<
+com::sun::star::beans::XPropertySet> xPropSet);
+
 public:
 
 ChartExport( sal_Int32 nXmlNamespace, ::sax_fastparser::FSHelperPtr pFS, 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel, 
::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = 
DOCUMENT_PPTX );
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index a6b1ad1..39d082a 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -45,6 +45,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -901,9 +902,44 @@ void ChartExport::exportChart( Reference< 
::com::sun::star::chart::XChartDocumen
 XML_val, "1",
 FSEND );
 
+exportMissingValueTreatment(Reference(mxDiagram, 
uno::UNO_QUERY));
+
 pFS->endElement( FSNS( XML_c, XML_chart ) );
 }
 
+void 
ChartExport::exportMissingValueTreatment(uno::Reference 
xPropSet)
+{
+if (!xPropSet.is())
+return;
+
+sal_Int32 nVal = 0;
+uno::Any aAny = xPropSet->getPropertyValue("MissingValueTreatment");
+if (!(aAny >>= nVal))
+return;
+
+const char* pVal = NULL;
+switch (nVal)
+{
+case cssc::MissingValueTreatment::LEAVE_GAP:
+pVal = "gap";
+break;
+case cssc::MissingValueTreatment::USE_ZERO:
+pVal = "zero";
+break;
+case cssc::MissingValueTreatment::CONTINUE:
+pVal = "span";
+break;
+default:
+SAL_WARN("oox", "unknown MissingValueTreatment value");
+break;
+}
+
+FSHelperPtr pFS = GetFS();
+pFS->singleElement( FSNS(XML_c, XML_dispBlanksAs),
+XML_val, pVal,
+FSEND);
+}
+
 void ChartExport::exportLegend( Reference< 
::com::sun::star::chart::XChartDocument > rChartDoc )
 {
 FSHelperPtr pFS = GetFS();
commit d0b06ecdfed2e460cc63a96f70470c52b9b97b69
Author: Markus Mohrhard 
Date:   Tue Apr 14 23:07:22 2015 +0200

we use the correct OOXML default value now

Change-Id: I1aad3e40ad61a1397b619bdc6e0f578e2c9c141e
(cherry picked from commit ec2c8a602ecb8664b24d77e6ca6af17bf59d211c)

diff --git a/oox/so

[Libreoffice-commits] core.git: sw/source

2015-04-15 Thread Christoph Lutz
 sw/source/uibase/uno/unomailmerge.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b092dfa9316212722b56b9e027c54eee91aba963
Author: Christoph Lutz 
Date:   Mon Mar 23 13:50:52 2015 +

tdf#90594: MM: Fix for broken translation between Bookmarks and row indizes

The datasets used in the unomailmerge service can be selected via a
property "Selection". This property expects a sequence of sdbc::Bookmark
elements that need to be translated into row-inizes. This translation
was broken - the loop-pointer pTranslated was never incremented which
caused a wrong "result" selection in which only the first element was
changed.

Change-Id: I319131caa89e327b11406ab7d0c56a833385d433
Reviewed-on: https://gerrit.libreoffice.org/15289
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/source/uibase/uno/unomailmerge.cxx 
b/sw/source/uibase/uno/unomailmerge.cxx
index 31cbc11..65d78e5 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -573,6 +573,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
 *pTranslated <<= xCurResultSet->getRow();
 else
 bEverythingsFine = false;
+++pTranslated;
 }
 if ( bEverythingsFine )
 bValid = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.4' - 4 commits - include/oox oox/source

2015-04-15 Thread Markus Mohrhard
 include/oox/export/chartexport.hxx|3 +
 oox/source/drawingml/chart/typegroupconverter.cxx |1 
 oox/source/export/chartexport.cxx |   48 +-
 3 files changed, 51 insertions(+), 1 deletion(-)

New commits:
commit c5586f5fdbf4670ae41af24837b24df3d54b130a
Author: Markus Mohrhard 
Date:   Wed Apr 15 03:25:55 2015 +0200

import marker color from OOXML, related tdf#81407

Change-Id: Ie416d757b73e99836d14b7f24a5cb4b370284d8c
(cherry picked from commit 30936e3f6f8242950526ce9a0d02971a881b7910)

diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx 
b/oox/source/drawingml/chart/typegroupconverter.cxx
index 7a7b2a6..2a38f5a 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -478,6 +478,7 @@ void TypeGroupConverter::convertMarker( PropertySet& 
rPropSet, sal_Int32 nOoxSym
 {
 Color aFillColor = xShapeProps->getFillProperties().maFillColor;
 aSymbol.FillColor = 
aFillColor.getColor(getFilter().getGraphicHelper());
+rPropSet.setProperty(PROP_Color, aSymbol.FillColor);
 }
 
 // set the property
commit a083dd0bd109f6280641e4556230da66d7f6227a
Author: Markus Mohrhard 
Date:   Wed Apr 15 03:02:01 2015 +0200

export marker color correctly, tdf#81407

Change-Id: Iebc3d87642c93fcdecddd6332fd57b7fdfb2d337
(cherry picked from commit 96c05f82cd4df35505497bc29d96c8a250072db0)

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 9a2bb31..45cfb0f 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3092,7 +3092,12 @@ void ChartExport::exportMarker(Reference< 
chart2::XDataSeries > xSeries)
 
 pFS->startElement( FSNS( XML_c, XML_spPr ),
 FSEND );
-WriteSolidFill(aSymbol.FillColor);
+
+util::Color aColor = aSymbol.FillColor;
+if (GetProperty(xPropSet, "Color"))
+mAny >>= aColor;
+
+WriteSolidFill(aColor);
 pFS->endElement( FSNS( XML_c, XML_spPr ) );
 
 pFS->endElement( FSNS( XML_c, XML_marker ) );
commit f7702d0b65c7acd5c5f78a550534469f8f912f26
Author: Markus Mohrhard 
Date:   Wed Apr 15 00:21:21 2015 +0200

export missing value treatment to OOXML

Change-Id: I1a448e9c954a3851fe3590a0fae73ed5b27555f0
(cherry picked from commit e68ceaec43f0c0ff326064642072bb8f904e7e8a)

diff --git a/include/oox/export/chartexport.hxx 
b/include/oox/export/chartexport.hxx
index 4560bb4..017d3f0 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -182,6 +182,9 @@ private:
 void exportView3D();
 bool isDeep3dChart();
 
+void exportMissingValueTreatment(com::sun::star::uno::Reference<
+com::sun::star::beans::XPropertySet> xPropSet);
+
 public:
 
 ChartExport( sal_Int32 nXmlNamespace, ::sax_fastparser::FSHelperPtr pFS, 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel, 
::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = 
DOCUMENT_PPTX );
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 3fdf45b..9a2bb31 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -45,6 +45,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -905,9 +906,44 @@ void ChartExport::exportChart( Reference< 
::com::sun::star::chart::XChartDocumen
 XML_val, "1",
 FSEND );
 
+exportMissingValueTreatment(Reference(mxDiagram, 
uno::UNO_QUERY));
+
 pFS->endElement( FSNS( XML_c, XML_chart ) );
 }
 
+void 
ChartExport::exportMissingValueTreatment(uno::Reference 
xPropSet)
+{
+if (!xPropSet.is())
+return;
+
+sal_Int32 nVal = 0;
+uno::Any aAny = xPropSet->getPropertyValue("MissingValueTreatment");
+if (!(aAny >>= nVal))
+return;
+
+const char* pVal = NULL;
+switch (nVal)
+{
+case cssc::MissingValueTreatment::LEAVE_GAP:
+pVal = "gap";
+break;
+case cssc::MissingValueTreatment::USE_ZERO:
+pVal = "zero";
+break;
+case cssc::MissingValueTreatment::CONTINUE:
+pVal = "span";
+break;
+default:
+SAL_WARN("oox", "unknown MissingValueTreatment value");
+break;
+}
+
+FSHelperPtr pFS = GetFS();
+pFS->singleElement( FSNS(XML_c, XML_dispBlanksAs),
+XML_val, pVal,
+FSEND);
+}
+
 void ChartExport::exportLegend( Reference< 
::com::sun::star::chart::XChartDocument > rChartDoc )
 {
 FSHelperPtr pFS = GetFS();
commit 8a6d5960d41cf50691f32082831b6406ff03b484
Author: Markus Mohrhard 
Date:   Tue Apr 14 23:07:22 2015 +0200

we use the correct OOXML default value now

Change-Id: I1aad3e40ad61a1397b619bdc6e0f578e2c9c141e
(cherry picked from commit ec2c8a602ecb8664b24d77e6ca6af17bf59d211c)

diff --git a/oox/so

[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 
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 
Reviewed-by: David Tardon 

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