fdo 37341 MAXRECURSION reached in ScFormulaCell::Interpret

2013-07-10 Thread Winfried Donkers
Hi,

Presently I'm looking at bug fdo 37341, which reports calc to hang when Goal 
Seek (sc/source/core/tool/interpr2.cxx, ScInterpreter::ScBackSolver()) is used.
The cause of the problem is not that too many iterations are needed, but that 
MAXRECURSION in sc/source/core/data/formulacell.cxx, ScFormulaCell::Interpret() 
is reached.
Increasing MAXRECURSION 'solves' the problem.

I think increasing MAXRECURSION from its present value (400) to 800 is no 
problem. 10 years ago its value was 500 and in the past 1 years the available 
memory has been more than doubled.
But that does not really solve the problem, it only shifts the point where the 
problem will show.
Shouldn't a global error (or at least warning)  be generated when MAXRECURSION 
is reached? After all, the result of ScFormulaCell::Interpret() is not correct 
in that case.
Unfortunately, I can't quite grasp the recursion/interation process in 
ScFormulaCell::Interpret(), so I can't generate the appropiate error.

Do you have any suggestions about how to properly solve this?
To me just increasing MAXRECURSION to 800 is a dirty hack.



Winfried

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


[Libreoffice-commits] core.git: Branch 'feature/firebird-sdbc' - firebird/ExternalProject_firebird.mk

2013-07-10 Thread Andrzej J . R . Hunt
 firebird/ExternalProject_firebird.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ef45930e5c2bb0129c4af63e2c912db676f18384
Author: Andrzej J.R. Hunt 
Date:   Wed Jul 10 12:30:45 2013 +0100

Modify DYLD_LIBRARY_PATH for firebrid to build on Mac OS.

Change-Id: Iae45d39a9a1ce76b0af74c317c5990b3674a7ca6
Reviewed-on: https://gerrit.libreoffice.org/4806
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/firebird/ExternalProject_firebird.mk 
b/firebird/ExternalProject_firebird.mk
index 8853eca..aa4c597 100644
--- a/firebird/ExternalProject_firebird.mk
+++ b/firebird/ExternalProject_firebird.mk
@@ -43,7 +43,8 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
-L$(OUTDIR)/lib \
-L$(call 
gb_UnpackedTarball_get_dir,boost)/source/lib" \
&& export LD_LIBRARY_PATH="$(OUTDIR)/lib:$(call 
gb_UnpackedTarball_get_dir,boost)/source/lib" \
-   && export PATH="$(PATH):$(shell cygpath $(OUTDIR)/lib):$(shell 
cygpath $(call gb_UnpackedTarball_get_dir,icu)/source/lib)" \
+   && export DYLD_LIBRARY_PATH="$(OUTDIR)/lib:$(call 
gb_UnpackedTarball_get_dir,boost)/source/lib" \
+   $(if $(filter WNT,$(OS)),&& export PATH="$(PATH):$(shell 
cygpath $(OUTDIR)/lib):$(shell cygpath $(call 
gb_UnpackedTarball_get_dir,icu)/source/lib)") \
&& ./configure \
--without-editline \
--disable-superserver \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Jan Holesovsky
 sc/qa/unit/ucalc_sharedformula.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 5d6bfead080f31c421c4b236e3d6f2a9e8118b97
Author: Jan Holesovsky 
Date:   Thu Jul 11 07:36:06 2013 +0200

Fix Windows build.

Change-Id: I943171b14610f8a9e6561a60f4a3297e26e32f14

diff --git a/sc/qa/unit/ucalc_sharedformula.cxx 
b/sc/qa/unit/ucalc_sharedformula.cxx
index 7093985..7934483 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -243,8 +243,8 @@ void Test::testSharedFormulasCopyPaste()
 ScAddress aPos(1, 8, 0); // B9
 ScFormulaCell* pFC = m_pDoc->GetFormulaCell(aPos);
 CPPUNIT_ASSERT_MESSAGE("B9 should be a formula cell.", pFC);
-CPPUNIT_ASSERT_EQUAL(0, pFC->GetSharedTopRow());
-CPPUNIT_ASSERT_EQUAL(10, pFC->GetSharedLength());
+CPPUNIT_ASSERT_EQUAL(static_cast(0), pFC->GetSharedTopRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(10), pFC->GetSharedLength());
 
 // Copy formulas in B6:B9 to the clipboard doc.
 ScRange aSrcRange(1,5,0,1,8,0); // B6:B9
@@ -252,8 +252,8 @@ void Test::testSharedFormulasCopyPaste()
 copyToClip(m_pDoc, aSrcRange, &aClipDoc);
 pFC = aClipDoc.GetFormulaCell(aPos);
 CPPUNIT_ASSERT_MESSAGE("B9 in the clip doc should be a formula cell.", 
pFC);
-CPPUNIT_ASSERT_EQUAL(5, pFC->GetSharedTopRow());
-CPPUNIT_ASSERT_EQUAL(4, pFC->GetSharedLength());
+CPPUNIT_ASSERT_EQUAL(static_cast(5), pFC->GetSharedTopRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(4), pFC->GetSharedLength());
 
 // Paste them to C2:C10.
 ScRange aDestRange(2,1,0,2,9,0);
@@ -264,8 +264,8 @@ void Test::testSharedFormulasCopyPaste()
 aPos.SetRow(1);
 pFC = m_pDoc->GetFormulaCell(aPos);
 CPPUNIT_ASSERT_MESSAGE("C2 should be a formula cell.", pFC);
-CPPUNIT_ASSERT_EQUAL(1, pFC->GetSharedTopRow());
-CPPUNIT_ASSERT_EQUAL(9, pFC->GetSharedLength());
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pFC->GetSharedTopRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(9), pFC->GetSharedLength());
 
 ScRange aRange(1,0,0,1,9,0); // B1:B10
 ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
@@ -280,8 +280,8 @@ void Test::testSharedFormulasCopyPaste()
 aPos.SetRow(i);
 pFC = pUndoDoc->GetFormulaCell(aPos);
 CPPUNIT_ASSERT_MESSAGE("Must be a formula cell.", pFC);
-CPPUNIT_ASSERT_EQUAL(0, pFC->GetSharedTopRow());
-CPPUNIT_ASSERT_EQUAL(10, pFC->GetSharedLength());
+CPPUNIT_ASSERT_EQUAL(static_cast(0), pFC->GetSharedTopRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(10), pFC->GetSharedLength());
 }
 
 // Overwrite B1:B10.
@@ -300,8 +300,8 @@ void Test::testSharedFormulasCopyPaste()
 aPos.SetRow(i);
 pFC = m_pDoc->GetFormulaCell(aPos);
 CPPUNIT_ASSERT_MESSAGE("This should be a formula cell.", pFC);
-CPPUNIT_ASSERT_EQUAL(0, pFC->GetSharedTopRow());
-CPPUNIT_ASSERT_EQUAL(10, pFC->GetSharedLength());
+CPPUNIT_ASSERT_EQUAL(static_cast(0), pFC->GetSharedTopRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(10), pFC->GetSharedLength());
 }
 
 m_pDoc->DeleteTab(0);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/vlc' - avmedia/source

2013-07-10 Thread Minh Ngo
 avmedia/source/vlc/vlcplayer.cxx |   46 ---
 avmedia/source/vlc/vlcwindow.hxx |1 
 2 files changed, 44 insertions(+), 3 deletions(-)

New commits:
commit 8f83e797f65b1b4a38f3866c43d59bfecdd7746b
Author: Minh Ngo 
Date:   Thu Jul 11 08:29:29 2013 +0300

Binding a video frame into a LibreOffice's widget

Change-Id: Iebf5b9f8cc83e7d2a96f105b07b6fe0eaf8b2678

diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index 3c8453b..0a15a72 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -1,3 +1,6 @@
+#include 
+#include 
+
 #include "vlcplayer.hxx"
 #include "vlcwindow.hxx"
 #include "vlcframegrabber.hxx"
@@ -22,7 +25,7 @@ const int MS_IN_SEC = 1000; // Millisec in sec
 
 namespace
 {
-libvlc_media_t* initMedia( const rtl::OUString& url, 
boost::shared_ptr& instance )
+libvlc_media_t* InitMedia( const rtl::OUString& url, 
boost::shared_ptr& instance )
 {
 rtl::OString dest;
 url.convertToString(&dest, RTL_TEXTENCODING_UTF8, 0);
@@ -34,7 +37,7 @@ VLCPlayer::VLCPlayer( const rtl::OUString& url )
 : VLC_Base(m_aMutex)
 , mInstance( libvlc_new( sizeof( VLC_ARGS ) / sizeof( VLC_ARGS[0] ), 
VLC_ARGS ), libvlc_release )
 , mPlayer( libvlc_media_player_new(mInstance.get()), 
libvlc_media_player_release )
-, mMedia( initMedia( url, mInstance), libvlc_media_release )
+, mMedia( InitMedia( url, mInstance), libvlc_media_release )
 {
 libvlc_media_player_set_media( mPlayer.get(), mMedia.get() );
 }
@@ -119,10 +122,47 @@ css::awt::Size SAL_CALL 
VLCPlayer::getPreferredPlayerWindowSize()
 return css::awt::Size( 1, 1 );
 }
 
+namespace
+{
+// TODO: Move this function to the common space for avoiding duplication 
with
+// gstreamer/gstwindow::createPlayerWindow functionality
+int GetWindowID( const uno::Sequence< uno::Any >& arguments )
+{
+if (arguments.getLength() <= 2)
+return -1;
+
+sal_IntPtr pIntPtr = 0;
+
+arguments[ 2 ] >>= pIntPtr;
+
+SystemChildWindow *pParentWindow = reinterpret_cast< 
SystemChildWindow* >( pIntPtr );
+
+const SystemEnvData* pEnvData = pParentWindow ? 
pParentWindow->GetSystemData() : NULL;
+
+if (pEnvData == NULL)
+return -1;
+
+// Explicit converts from long to int
+const int id = static_cast( pEnvData->aWindow );
+
+return id;
+}
+}
+
 uno::Reference< css::media::XPlayerWindow > SAL_CALL 
VLCPlayer::createPlayerWindow( const uno::Sequence< uno::Any >& aArguments )
 {
 ::osl::MutexGuard aGuard(m_aMutex);
-return uno::Reference< css::media::XPlayerWindow >(new VLCWindow( *this ));
+
+VLCWindow * const window = new VLCWindow( *this );
+
+const int winID = GetWindowID( aArguments );
+
+if (winID != -1)
+{
+libvlc_media_player_set_xwindow( mPlayer.get(), winID );
+}
+
+return uno::Reference< css::media::XPlayerWindow >( window );
 }
 
 uno::Reference< css::media::XFrameGrabber > SAL_CALL 
VLCPlayer::createFrameGrabber()
diff --git a/avmedia/source/vlc/vlcwindow.hxx b/avmedia/source/vlc/vlcwindow.hxx
index 3449e2c..268be6f 100644
--- a/avmedia/source/vlc/vlcwindow.hxx
+++ b/avmedia/source/vlc/vlcwindow.hxx
@@ -31,6 +31,7 @@ class VLCWindow : public ::cppu::WeakImplHelper2 < 
::com::sun::star::media::XPla
 VLCPlayer& mPlayer;
 public:
 SAL_CALL VLCWindow(VLCPlayer& player);
+
 void SAL_CALL update();
 ::sal_Bool SAL_CALL setZoomLevel( css::media::ZoomLevel ZoomLevel );
 css::media::ZoomLevel SAL_CALL getZoomLevel();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 60270] LibreOffice 4.1 most annoying bugs

2013-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=60270

Bug 60270 depends on bug 65338, which changed state.

Bug 65338 Summary: FILESAVE doesn't retain font settings of style: after save 
(as) and again opening of presentation, font is changed
https://bugs.freedesktop.org/show_bug.cgi?id=65338

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|FIXED   |---

-- 
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: cppcanvas/source

2013-07-10 Thread Mark Wielaard
 cppcanvas/source/mtfrenderer/emfplus.cxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit cb14b1e56d2aab70d28afca8bf039a27f89671c8
Author: Mark Wielaard 
Date:   Sun Jul 7 22:09:37 2013 +0200

Fix memory leak in EMFPPen.

Delete dashPattern, compoundArray, customStartCap and customEndCap
arrays if they were created in the destructor.

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

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index d3b58aa..a8b08d2 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -604,6 +604,18 @@ namespace cppcanvas
 public:
 EMFPPen () : EMFPBrush ()
 {
+dashPattern = NULL;
+compoundArray = NULL;
+customStartCap = NULL;
+customEndCap = NULL;
+}
+
+~EMFPPen ()
+{
+delete[] dashPattern;
+delete[] compoundArray;
+delete[] customStartCap;
+delete[] customEndCap;
 }
 
 void SetStrokeAttributes (rendering::StrokeAttributes& 
rStrokeAttributes, ImplRenderer& rR, const OutDevState& rState)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1-0' - include/xmloff reportdesign/source sc/source xmloff/source

2013-07-10 Thread Luboš Luňák
 include/xmloff/txtimp.hxx |   11 ++
 include/xmloff/txtimppr.hxx   |6 ---
 reportdesign/source/filter/xml/xmlStyleImport.cxx |4 +-
 sc/source/filter/xml/xmlstyli.cxx |2 -
 xmloff/source/core/xmlimp.cxx |1 
 xmloff/source/style/xmlnumi.cxx   |2 -
 xmloff/source/text/txtimp.cxx |   38 --
 xmloff/source/text/txtimppr.cxx   |   16 ++---
 8 files changed, 21 insertions(+), 59 deletions(-)

New commits:
commit b84347d905a5fb4c04077ace924744c82c76cce3
Author: Luboš Luňák 
Date:   Wed Jul 10 17:33:15 2013 +0200

fix reading fonts from .odp using style::font-name (fdo#65338)

b40bcde076f9fabf24810d2520e878d604d99637 made writing .odp use 
style:font-name
and office:font-face-decls, instead of using fo:font-family . But the 
reading
back was broken, as xFontDecls is not set
in XMLTextImportPropertyMapper::handleSpecialItem(), so the font data was
ignored. And xFontDecls was not set because it's set while reading
office:font-face-decls, which is at the top of the xml document, but even
before the xml is parsed, the call to SdXMLImport::setTargetDocument() calls
GetShapeImport(), which creates XMLShapeImportHelper instance, which calls
XMLTextImportHelper::CreateParaExtPropMapper(), and 
XMLTextImportPropertyMapper
is created with rImport.GetFontDecls() still being NULL at that point.

And it actually doesn't seem to make any sense to just pass around all
the pointers to XMLFontStylesContext, as eventually it's always just the one
from SvXMLImport. So simply dump all that and make the one single place
that actually uses it (i.e. 
XMLTextImportPropertyMapper::handleSpecialItem())
refer directly to SvXMLImport::GetFontDecls().

Change-Id: Ib1b3e4b1bcaf87ca3e4703d1cc1563ad6b3f9ce7
Reviewed-on: https://gerrit.libreoffice.org/4816
Reviewed-by: Michael Meeks 
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 
(cherry picked from commit cc3293b94ab58b196bc2786eb4012d64351e8fa4)
Reviewed-on: https://gerrit.libreoffice.org/4820
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx
index 0fc68b5..c15bd8b 100644
--- a/include/xmloff/txtimp.hxx
+++ b/include/xmloff/txtimp.hxx
@@ -409,9 +409,6 @@ public:
 
 void SetAutoStyles( SvXMLStylesContext *pStyles );
 
-void SetFontDecls( XMLFontStylesContext *pFontDecls );
-const XMLFontStylesContext *GetFontDecls() const;
-
 SvXMLImportContext *CreateTextChildContext(
 SvXMLImport& rImport,
 sal_uInt16 nPrefix, const OUString& rLocalName,
@@ -557,10 +554,10 @@ public:
 GetRubyImportPropertySetMapper() const;
 
 static SvXMLImportPropertyMapper *CreateShapeExtPropMapper(SvXMLImport&);
-static SvXMLImportPropertyMapper *CreateParaExtPropMapper(SvXMLImport&, 
XMLFontStylesContext *pFontDecls = NULL);
-static SvXMLImportPropertyMapper* 
CreateParaDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* pFontDecls = 
NULL);
-static SvXMLImportPropertyMapper* 
CreateTableDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* pFontDecls 
= NULL);
-static SvXMLImportPropertyMapper* 
CreateTableRowDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* 
pFontDecls = NULL);
+static SvXMLImportPropertyMapper *CreateParaExtPropMapper(SvXMLImport&);
+static SvXMLImportPropertyMapper* 
CreateParaDefaultExtPropMapper(SvXMLImport&);
+static SvXMLImportPropertyMapper* 
CreateTableDefaultExtPropMapper(SvXMLImport&);
+static SvXMLImportPropertyMapper* 
CreateTableRowDefaultExtPropMapper(SvXMLImport&);
 
 SvI18NMap& GetRenameMap();
 
diff --git a/include/xmloff/txtimppr.hxx b/include/xmloff/txtimppr.hxx
index ae58bdd..0bae7ed 100644
--- a/include/xmloff/txtimppr.hxx
+++ b/include/xmloff/txtimppr.hxx
@@ -28,7 +28,6 @@ class XMLOFF_DLLPUBLIC XMLTextImportPropertyMapper : public 
SvXMLImportPropertyM
 {
 sal_Int32 nSizeTypeIndex;
 sal_Int32 nWidthTypeIndex;
-SvXMLImportContextRef xFontDecls;
 
 void FontFinished(
 XMLPropertyState *pFontFamilyNameState,
@@ -58,12 +57,9 @@ protected:
 public:
 XMLTextImportPropertyMapper(
 const UniReference< XMLPropertySetMapper >& rMapper,
-SvXMLImport& rImport,
-XMLFontStylesContext *pFontDecls = 0 );
+SvXMLImport& rImport );
 virtual ~XMLTextImportPropertyMapper();
 
-void SetFontDecls( XMLFontStylesContext *pFontDecls );
-
 /** This method is called when all attributes have benn processed. It may 
be used to remove items that are incomplete */
 virtual void finished(
 ::std::vector< XMLPropertyState >& rProperties,
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx 
b/reportdesign/source/filter/xml/xmlSty

[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

2013-07-10 Thread Kohei Yoshida
 sc/source/core/opencl/formulagroupcl.cxx |   77 ++-
 1 file changed, 26 insertions(+), 51 deletions(-)

New commits:
commit b39e0e515c0dd6fbc18e3062e2d3b3878340e56e
Author: Kohei Yoshida 
Date:   Wed Jul 10 22:09:29 2013 -0400

Parse the token array in the RPN order.

Change-Id: I3770269e23980597c16dd613704bd7a9feb0aec9

diff --git a/sc/source/core/opencl/formulagroupcl.cxx 
b/sc/source/core/opencl/formulagroupcl.cxx
index 04a67d2..dee465e 100755
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -295,7 +295,7 @@ public:
const ScFormulaCellGroupRef& xGroup, ScTokenArray& 
rCode);
 };
 
-#define RETURN_IF_FAIL(a,b) do { if (!(a)) { fprintf (stderr,b); return false; 
} } while (0)
+#define RETURN_IF_FAIL(a,b) do { if (!(a)) { fprintf (stderr,b"\n"); return 
false; } } while (0)
 
 #include "compiler.hxx"
 
@@ -313,61 +313,36 @@ bool 
FormulaGroupInterpreterGroundwater::interpret(ScDocument& rDoc, const ScAdd
 const double *pArrayToSubtractOneElementFrom;
 const double *pGroundWaterDataArray;
 
-// Output:
-std::vector aMatrixContent;
+const formula::FormulaToken* p = rCode.FirstRPN();
+RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocPush && p->GetType() == 
formula::svDoubleVectorRef, "double vector ref expected");
 
-const formula::FormulaToken *p;
+// Get the range reference vector.
+const formula::DoubleVectorRefToken* pDvr = static_cast(p);
+const std::vector& rArrays = pDvr->GetArrays();
+RETURN_IF_FAIL(rArrays.size() == 1, "unexpectedly large double ref array");
+RETURN_IF_FAIL(pDvr->GetArrayLength() == (size_t)xGroup->mnLength, "wrong 
double ref length");
+RETURN_IF_FAIL(pDvr->IsStartFixed() && pDvr->IsEndFixed(), "non-fixed 
ranges )");
+pGroundWaterDataArray = rArrays[0];
 
-// special cased formula parser:
+// Function:
+p = rCode.NextRPN();
+RETURN_IF_FAIL(p != NULL, "no operator");
+eOp = p->GetOpCode();
+RETURN_IF_FAIL(eOp == ocAverage || eOp == ocMax || eOp == ocMin, 
"unexpected opcode - expected either average, max, or min");
 
-p = rCode.FirstNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocOpen, "no opening (");
+p = rCode.NextRPN();
+RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocPush && p->GetType() == 
formula::svSingleVectorRef, "single vector ref expected");
 
-{
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL, "no operator");
-
-// Function:
-eOp = p->GetOpCode();
-RETURN_IF_FAIL(eOp == ocAverage || eOp == ocMax || eOp == ocMin, 
"unexpected opcode");
-
-{ // function arguments
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocOpen, "missing 
opening (");
-
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL, "no function argument");
-RETURN_IF_FAIL(p->GetType() == formula::svDoubleVectorRef, "wrong 
type of fn argument");
-const formula::DoubleVectorRefToken* pDvr = static_cast(p);
-const std::vector& rArrays = pDvr->GetArrays();
-RETURN_IF_FAIL(rArrays.size() == 1, "unexpectedly large double ref 
array");
-RETURN_IF_FAIL(pDvr->GetArrayLength() == (size_t)xGroup->mnLength, 
"wrong double ref length");
-RETURN_IF_FAIL(pDvr->IsStartFixed() && pDvr->IsEndFixed(), 
"non-fixed ranges )");
-pGroundWaterDataArray = rArrays[0];
-
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocClose, "missing 
closing )");
-}
+// Get the single reference vector.
+const formula::SingleVectorRefToken* pSvr = static_cast(p);
+pArrayToSubtractOneElementFrom = pSvr->GetArray();
+RETURN_IF_FAIL(pSvr->GetArrayLength() == (size_t)xGroup->mnLength, "wrong 
single ref length");
 
-// Subtract operator
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocSub, "missing subtract 
opcode");
-
-{ // subtract parameter
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL, "no tokens");
-RETURN_IF_FAIL(p->GetType() == formula::svSingleVectorRef, "not a 
single ref");
-const formula::SingleVectorRefToken* pSvr = static_cast(p);
-pArrayToSubtractOneElementFrom = pSvr->GetArray();
-RETURN_IF_FAIL(pSvr->GetArrayLength() == (size_t)xGroup->mnLength, 
"wrong single ref length");
-}
-
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocClose, "missing 
closing )");
-}
+p = rCode.NextRPN();
+RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocSub, "missing subtract 
opcode");
 
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p == NULL, "has 5th");
+p = rCode.NextRPN();
+RETURN_IF_FAIL(p == NULL, "there should be no more token");
 

[Libreoffice-commits] core.git: Branch 'feature/calc-group-interpreter' - sc/source

2013-07-10 Thread Kohei Yoshida
 sc/source/core/opencl/formulagroupcl.cxx |   77 ++-
 1 file changed, 26 insertions(+), 51 deletions(-)

New commits:
commit 448e9995d2c03df9d48de6092360a83892db47b3
Author: Kohei Yoshida 
Date:   Wed Jul 10 22:09:29 2013 -0400

Parse the token array in the RPN order.

Change-Id: I3770269e23980597c16dd613704bd7a9feb0aec9

diff --git a/sc/source/core/opencl/formulagroupcl.cxx 
b/sc/source/core/opencl/formulagroupcl.cxx
index 04a67d2..dee465e 100755
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -295,7 +295,7 @@ public:
const ScFormulaCellGroupRef& xGroup, ScTokenArray& 
rCode);
 };
 
-#define RETURN_IF_FAIL(a,b) do { if (!(a)) { fprintf (stderr,b); return false; 
} } while (0)
+#define RETURN_IF_FAIL(a,b) do { if (!(a)) { fprintf (stderr,b"\n"); return 
false; } } while (0)
 
 #include "compiler.hxx"
 
@@ -313,61 +313,36 @@ bool 
FormulaGroupInterpreterGroundwater::interpret(ScDocument& rDoc, const ScAdd
 const double *pArrayToSubtractOneElementFrom;
 const double *pGroundWaterDataArray;
 
-// Output:
-std::vector aMatrixContent;
+const formula::FormulaToken* p = rCode.FirstRPN();
+RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocPush && p->GetType() == 
formula::svDoubleVectorRef, "double vector ref expected");
 
-const formula::FormulaToken *p;
+// Get the range reference vector.
+const formula::DoubleVectorRefToken* pDvr = static_cast(p);
+const std::vector& rArrays = pDvr->GetArrays();
+RETURN_IF_FAIL(rArrays.size() == 1, "unexpectedly large double ref array");
+RETURN_IF_FAIL(pDvr->GetArrayLength() == (size_t)xGroup->mnLength, "wrong 
double ref length");
+RETURN_IF_FAIL(pDvr->IsStartFixed() && pDvr->IsEndFixed(), "non-fixed 
ranges )");
+pGroundWaterDataArray = rArrays[0];
 
-// special cased formula parser:
+// Function:
+p = rCode.NextRPN();
+RETURN_IF_FAIL(p != NULL, "no operator");
+eOp = p->GetOpCode();
+RETURN_IF_FAIL(eOp == ocAverage || eOp == ocMax || eOp == ocMin, 
"unexpected opcode - expected either average, max, or min");
 
-p = rCode.FirstNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocOpen, "no opening (");
+p = rCode.NextRPN();
+RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocPush && p->GetType() == 
formula::svSingleVectorRef, "single vector ref expected");
 
-{
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL, "no operator");
-
-// Function:
-eOp = p->GetOpCode();
-RETURN_IF_FAIL(eOp == ocAverage || eOp == ocMax || eOp == ocMin, 
"unexpected opcode");
-
-{ // function arguments
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocOpen, "missing 
opening (");
-
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL, "no function argument");
-RETURN_IF_FAIL(p->GetType() == formula::svDoubleVectorRef, "wrong 
type of fn argument");
-const formula::DoubleVectorRefToken* pDvr = static_cast(p);
-const std::vector& rArrays = pDvr->GetArrays();
-RETURN_IF_FAIL(rArrays.size() == 1, "unexpectedly large double ref 
array");
-RETURN_IF_FAIL(pDvr->GetArrayLength() == (size_t)xGroup->mnLength, 
"wrong double ref length");
-RETURN_IF_FAIL(pDvr->IsStartFixed() && pDvr->IsEndFixed(), 
"non-fixed ranges )");
-pGroundWaterDataArray = rArrays[0];
-
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocClose, "missing 
closing )");
-}
+// Get the single reference vector.
+const formula::SingleVectorRefToken* pSvr = static_cast(p);
+pArrayToSubtractOneElementFrom = pSvr->GetArray();
+RETURN_IF_FAIL(pSvr->GetArrayLength() == (size_t)xGroup->mnLength, "wrong 
single ref length");
 
-// Subtract operator
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocSub, "missing subtract 
opcode");
-
-{ // subtract parameter
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL, "no tokens");
-RETURN_IF_FAIL(p->GetType() == formula::svSingleVectorRef, "not a 
single ref");
-const formula::SingleVectorRefToken* pSvr = static_cast(p);
-pArrayToSubtractOneElementFrom = pSvr->GetArray();
-RETURN_IF_FAIL(pSvr->GetArrayLength() == (size_t)xGroup->mnLength, 
"wrong single ref length");
-}
-
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocClose, "missing 
closing )");
-}
+p = rCode.NextRPN();
+RETURN_IF_FAIL(p != NULL && p->GetOpCode() == ocSub, "missing subtract 
opcode");
 
-p = rCode.NextNoSpaces();
-RETURN_IF_FAIL(p == NULL, "has 5th");
+p = rCode.NextRPN();
+RETURN_IF_FAIL(p == NULL, "there should be no more token");
 

[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - 2 commits - sc/inc sc/source

2013-07-10 Thread Kohei Yoshida
 sc/inc/column.hxx |9 --
 sc/inc/sharedformula.hxx  |   34 +++
 sc/source/core/data/column.cxx|   24 ++---
 sc/source/core/data/column3.cxx   |  145 +-
 sc/source/core/tool/sharedformula.cxx |  126 +
 5 files changed, 179 insertions(+), 159 deletions(-)

New commits:
commit 893714a9b88c1019537659098717406a1cb40b71
Author: Kohei Yoshida 
Date:   Wed Jul 10 19:46:46 2013 -0400

Move more methods to SharedFormulaUtil.

Change-Id: Ibd58f5d15292805d50823223d1ebe94e7b51b808

diff --git a/sc/inc/sharedformula.hxx b/sc/inc/sharedformula.hxx
index 6767d4a..fa75e80 100644
--- a/sc/inc/sharedformula.hxx
+++ b/sc/inc/sharedformula.hxx
@@ -66,6 +66,16 @@ public:
 static void splitFormulaCellGroup(const CellStoreType::position_type& 
aPos);
 
 /**
+ * See if two specified adjacent formula cells can be merged, and if they
+ * can, merge them into the same group.
+ *
+ * @param rPos position object of the first cell
+ * @param rCell1 first cell
+ * @param rCell2 second cell located immediately below the first cell.
+ */
+static void joinFormulaCells(
+const CellStoreType::position_type& rPos, ScFormulaCell& rCell1, 
ScFormulaCell& rCell2);
+/**
  * Merge with an existing formula group (if any) located immediately above
  * if the cell at specified position is a formula cell, and its formula
  * tokens are identical to that of the above formula group.
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index de8adde..2136e04 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -306,69 +306,6 @@ sc::CellStoreType::iterator ScColumn::GetPositionToInsert( 
SCROW nRow )
 return GetPositionToInsert(maCells.begin(), nRow);
 }
 
-namespace {
-
-void joinFormulaCells(const sc::CellStoreType::position_type& rPos, 
ScFormulaCell& rCell1, ScFormulaCell& rCell2)
-{
-ScFormulaCell::CompareState eState = rCell1.CompareByTokenArray(rCell2);
-if (eState == ScFormulaCell::NotEqual)
-return;
-
-SCROW nRow = rPos.first->position + rPos.second;
-
-// Formula tokens equal those of the previous formula cell.
-ScFormulaCellGroupRef xGroup1 = rCell1.GetCellGroup();
-ScFormulaCellGroupRef xGroup2 = rCell2.GetCellGroup();
-if (xGroup1)
-{
-if (xGroup2)
-{
-// Both cell 1 and cell 2 are shared. Merge them together.
-if (xGroup1.get() == xGroup2.get())
-// They belong to the same group.
-return;
-
-// Set the group object from cell 1 to all cells in group 2.
-xGroup1->mnLength += xGroup2->mnLength;
-size_t nOffset = rPos.second + 1; // position of cell 2
-for (size_t i = 0, n = xGroup2->mnLength; i < n; ++i)
-{
-ScFormulaCell& rCell = 
*sc::formula_block::at(*rPos.first->data, nOffset+i);
-rCell.SetCellGroup(xGroup1);
-}
-}
-else
-{
-// cell 1 is shared but cell 2 is not.
-rCell2.SetCellGroup(xGroup1);
-++xGroup1->mnLength;
-}
-}
-else
-{
-if (xGroup2)
-{
-// cell 1 is not shared, but cell 2 is already shared.
-rCell1.SetCellGroup(xGroup2);
-xGroup2->mnStart = nRow;
-++xGroup2->mnLength;
-}
-else
-{
-// neither cells are shared.
-xGroup1.reset(new ScFormulaCellGroup);
-xGroup1->mnStart = nRow;
-xGroup1->mbInvariant = (eState == ScFormulaCell::EqualInvariant);
-xGroup1->mnLength = 2;
-
-rCell1.SetCellGroup(xGroup1);
-rCell2.SetCellGroup(xGroup1);
-}
-}
-}
-
-}
-
 void ScColumn::JoinNewFormulaCell(
 const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell ) const
 {
@@ -378,14 +315,14 @@ void ScColumn::JoinNewFormulaCell(
 ScFormulaCell& rPrev = *sc::formula_block::at(*aPos.first->data, 
aPos.second-1);
 sc::CellStoreType::position_type aPosPrev = aPos;
 --aPosPrev.second;
-joinFormulaCells(aPosPrev, rPrev, rCell);
+sc::SharedFormulaUtil::joinFormulaCells(aPosPrev, rPrev, rCell);
 }
 
 // Check the next row position for possible grouping.
 if (aPos.first->type == sc::element_type_formula && aPos.second+1 < 
aPos.first->size)
 {
 ScFormulaCell& rNext = *sc::formula_block::at(*aPos.first->data, 
aPos.second+1);
-joinFormulaCells(aPos, rCell, rNext);
+sc::SharedFormulaUtil::joinFormulaCells(aPos, rCell, rNext);
 }
 }
 
diff --git a/sc/source/core/tool/sharedformula.cxx 
b/sc/source/core/tool/sharedformula.cxx
index c1bc564..5cdfc785 100644
--- a/sc/source/core/tool/sharedformula.cxx
+++ b/sc/source/core/tool/sharedformula.cxx
@@ -62,9 +62,7 

[Libreoffice-commits] core.git: Branch 'feature/calc-group-interpreter' - 2 commits - sc/inc sc/source

2013-07-10 Thread Kohei Yoshida
 sc/inc/column.hxx |9 --
 sc/inc/sharedformula.hxx  |   34 +++
 sc/source/core/data/column.cxx|   24 ++---
 sc/source/core/data/column3.cxx   |  145 +-
 sc/source/core/tool/sharedformula.cxx |  126 +
 5 files changed, 179 insertions(+), 159 deletions(-)

New commits:
commit 2f847d6e09cbd98497a4fe31331f62f7dd08a784
Author: Kohei Yoshida 
Date:   Wed Jul 10 19:46:46 2013 -0400

Move more methods to SharedFormulaUtil.

Change-Id: Ibd58f5d15292805d50823223d1ebe94e7b51b808

diff --git a/sc/inc/sharedformula.hxx b/sc/inc/sharedformula.hxx
index 6767d4a..fa75e80 100644
--- a/sc/inc/sharedformula.hxx
+++ b/sc/inc/sharedformula.hxx
@@ -66,6 +66,16 @@ public:
 static void splitFormulaCellGroup(const CellStoreType::position_type& 
aPos);
 
 /**
+ * See if two specified adjacent formula cells can be merged, and if they
+ * can, merge them into the same group.
+ *
+ * @param rPos position object of the first cell
+ * @param rCell1 first cell
+ * @param rCell2 second cell located immediately below the first cell.
+ */
+static void joinFormulaCells(
+const CellStoreType::position_type& rPos, ScFormulaCell& rCell1, 
ScFormulaCell& rCell2);
+/**
  * Merge with an existing formula group (if any) located immediately above
  * if the cell at specified position is a formula cell, and its formula
  * tokens are identical to that of the above formula group.
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index c3ed6d9..31ba8f9 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -306,69 +306,6 @@ sc::CellStoreType::iterator ScColumn::GetPositionToInsert( 
SCROW nRow )
 return GetPositionToInsert(maCells.begin(), nRow);
 }
 
-namespace {
-
-void joinFormulaCells(const sc::CellStoreType::position_type& rPos, 
ScFormulaCell& rCell1, ScFormulaCell& rCell2)
-{
-ScFormulaCell::CompareState eState = rCell1.CompareByTokenArray(rCell2);
-if (eState == ScFormulaCell::NotEqual)
-return;
-
-SCROW nRow = rPos.first->position + rPos.second;
-
-// Formula tokens equal those of the previous formula cell.
-ScFormulaCellGroupRef xGroup1 = rCell1.GetCellGroup();
-ScFormulaCellGroupRef xGroup2 = rCell2.GetCellGroup();
-if (xGroup1)
-{
-if (xGroup2)
-{
-// Both cell 1 and cell 2 are shared. Merge them together.
-if (xGroup1.get() == xGroup2.get())
-// They belong to the same group.
-return;
-
-// Set the group object from cell 1 to all cells in group 2.
-xGroup1->mnLength += xGroup2->mnLength;
-size_t nOffset = rPos.second + 1; // position of cell 2
-for (size_t i = 0, n = xGroup2->mnLength; i < n; ++i)
-{
-ScFormulaCell& rCell = 
*sc::formula_block::at(*rPos.first->data, nOffset+i);
-rCell.SetCellGroup(xGroup1);
-}
-}
-else
-{
-// cell 1 is shared but cell 2 is not.
-rCell2.SetCellGroup(xGroup1);
-++xGroup1->mnLength;
-}
-}
-else
-{
-if (xGroup2)
-{
-// cell 1 is not shared, but cell 2 is already shared.
-rCell1.SetCellGroup(xGroup2);
-xGroup2->mnStart = nRow;
-++xGroup2->mnLength;
-}
-else
-{
-// neither cells are shared.
-xGroup1.reset(new ScFormulaCellGroup);
-xGroup1->mnStart = nRow;
-xGroup1->mbInvariant = (eState == ScFormulaCell::EqualInvariant);
-xGroup1->mnLength = 2;
-
-rCell1.SetCellGroup(xGroup1);
-rCell2.SetCellGroup(xGroup1);
-}
-}
-}
-
-}
-
 void ScColumn::JoinNewFormulaCell(
 const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell ) const
 {
@@ -378,14 +315,14 @@ void ScColumn::JoinNewFormulaCell(
 ScFormulaCell& rPrev = *sc::formula_block::at(*aPos.first->data, 
aPos.second-1);
 sc::CellStoreType::position_type aPosPrev = aPos;
 --aPosPrev.second;
-joinFormulaCells(aPosPrev, rPrev, rCell);
+sc::SharedFormulaUtil::joinFormulaCells(aPosPrev, rPrev, rCell);
 }
 
 // Check the next row position for possible grouping.
 if (aPos.first->type == sc::element_type_formula && aPos.second+1 < 
aPos.first->size)
 {
 ScFormulaCell& rNext = *sc::formula_block::at(*aPos.first->data, 
aPos.second+1);
-joinFormulaCells(aPos, rCell, rNext);
+sc::SharedFormulaUtil::joinFormulaCells(aPos, rCell, rNext);
 }
 }
 
diff --git a/sc/source/core/tool/sharedformula.cxx 
b/sc/source/core/tool/sharedformula.cxx
index c1bc564..5cdfc785 100644
--- a/sc/source/core/tool/sharedformula.cxx
+++ b/sc/source/core/tool/sharedformula.cxx
@@ -62,9 +62,7 

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

2013-07-10 Thread Ivan Timofeev
 sc/source/ui/unoobj/cellsuno.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a33edacf6b477e661f96c00c9fc03450be31123c
Author: Ivan Timofeev 
Date:   Mon Jul 1 22:10:45 2013 +0400

WaE: pOldRanges may be used uninitialized

Change-Id: I22ff60e30b8c5697f648fcd6b7b22a302c6a2135
(cherry picked from commit 7c7ca0d0028cacad15a4fdc3dc02bc5f038c9f3c)

Signed-off-by: Eike Rathke 

diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 1d0a8e8..3a8f7cd 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -7503,7 +7503,7 @@ void SAL_CALL ScTableSheetObj::setPrintAreas(
 throw(uno::RuntimeException)
 {
 SolarMutexGuard aGuard;
-ScPrintRangeSaver* pOldRanges;
+ScPrintRangeSaver* pOldRanges = NULL;
 ScDocShell* pDocSh = GetDocShell();
 if ( pDocSh )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - cui/source

2013-07-10 Thread Pavel Janík
 cui/source/dialogs/cuifmsearch.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7986627ca418ec7c6fcaaa91367eda7f4b9aadaf
Author: Pavel Janík 
Date:   Wed Jul 10 21:14:12 2013 +

Return zero value from non-void function to prevent compiler warnings.

diff --git a/cui/source/dialogs/cuifmsearch.cxx 
b/cui/source/dialogs/cuifmsearch.cxx
index 9ed5619..6f8ffcb 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -447,6 +447,7 @@ IMPL_LINK(FmSearchDialog, OnSearchTextModified, ComboBox*, 
EMPTYARG)
 IMPL_LINK(FmSearchDialog, OnFocusGrabbed, ComboBox*, EMPTYARG)
 {
 m_cmbSearchText.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
+return 0;
 }
 
 //
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Noel Power
 sc/source/core/tool/interpr4.cxx |   20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

New commits:
commit 6466fdc869116384025c8a84e1591de7c1dbd9ee
Author: Noel Power 
Date:   Tue Jul 9 16:42:01 2013 +0100

fix for fdo#51990 process external refs for macros

(cherry picked from commit f3a0dd8fbc3ead1fe1ec1faec3377cedaacadd93)

and also cherry pick from commit adab0134662562298ff13e7fe564623af4bc33da )
use GetMatrix instead of manually disambiguating External and normal refs
and cherry-pick further tweak from commit 
35f9cd513d6dd796a5bc54c51df3961a674addcb

Change-Id: I4fe1d7240f277b532e11d2fbb5aa18f54f2c4695
4fe1d7240f277b532e11d2fbb5aa18f54f2c4695
Reviewed-on: https://gerrit.libreoffice.org/4800
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 1f789b9..5662baf 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3215,6 +3215,21 @@ void ScInterpreter::ScMacro()
 case svString:
 pPar->PutString( GetString() );
 break;
+case svExternalSingleRef:
+{
+ScExternalRefCache::TokenRef pToken;
+PopExternalSingleRef(pToken);
+if ( pToken->GetType() == svString )
+pPar->PutString( pToken->GetString() );
+else if ( pToken->GetType() == svDouble )
+pPar->PutDouble( pToken->GetDouble() );
+else
+{
+SetError( errIllegalArgument );
+bOk = false;
+}
+}
+break;
 case svSingleRef:
 {
 ScAddress aAdr;
@@ -3275,11 +3290,12 @@ void ScInterpreter::ScMacro()
 }
 }
 break;
+case svExternalDoubleRef:
 case svMatrix:
 {
-ScMatrixRef pMat = PopMatrix();
+ScMatrixRef pMat = GetMatrix();
 SCSIZE nC, nR;
-if (pMat)
+if (pMat && !nGlobalError)
 {
 pMat->GetDimensions(nC, nR);
 SbxDimArrayRef refArray = new SbxDimArray;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/calc-group-interpreter' - sc/inc sc/Library_sc.mk sc/source

2013-07-10 Thread Kohei Yoshida
 sc/Library_sc.mk  |1 
 sc/inc/column.hxx |   15 ---
 sc/inc/sharedformula.hxx  |   58 +++
 sc/source/core/data/column.cxx|   20 ++--
 sc/source/core/data/column2.cxx   |4 
 sc/source/core/data/column3.cxx   |  170 ++
 sc/source/core/tool/sharedformula.cxx |   18 +++
 7 files changed, 185 insertions(+), 101 deletions(-)

New commits:
commit 8594a04b7ff69e1f82b828e9a8daa669a99f2e26
Author: Kohei Yoshida 
Date:   Wed Jul 10 16:32:39 2013 -0400

Group formula cells in ScColumn::MixData().

Change-Id: I38186e2bf82ed56fbe859b17dcc1d31f36471bd8

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index d5b486e3..1b84dd9 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -245,6 +245,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/tool/refupdat \
sc/source/core/tool/scmatrix \
sc/source/core/tool/scopetools \
+   sc/source/core/tool/sharedformula \
sc/source/core/tool/simplerangelist \
sc/source/core/tool/stringutil \
sc/source/core/tool/subtotal \
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 3e66ca9..1aff86f 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -480,17 +480,18 @@ public:
 bool HasBroadcaster() const;
 
 void BroadcastCells( const std::vector& rRows );
-void EndFormulaListening( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, 
SCROW nRow2 );
 
 void InterpretDirtyCells( SCROW nRow1, SCROW nRow2 );
 
 void JoinNewFormulaCell( const sc::CellStoreType::position_type& aPos, 
ScFormulaCell& rCell ) const;
 
 /**
- * Detouch a formula cell that's about to be deleted, or removed from
+ * Detach a formula cell that's about to be deleted, or removed from
  * document storage (if that ever happens).
  */
-void DetouchFormulaCell( const sc::CellStoreType::position_type& aPos, 
ScFormulaCell& rCell ) const;
+void DetachFormulaCell( const sc::CellStoreType::position_type& aPos, 
ScFormulaCell& rCell );
+
+void DetachFormulaCells( const sc::CellStoreType::position_type& aPos, 
size_t nLength );
 
 void UnshareFormulaCell( const sc::CellStoreType::position_type& aPos, 
ScFormulaCell& rCell ) const;
 
@@ -508,14 +509,6 @@ public:
  */
 void RegroupFormulaCells();
 
-/**
- * Regroup existing formula cells when a range of new cells are inserted.
- *
- * @param nRow1 first row of inserted new cell span.
- * @param nRow2 last row of inserted new cell span.
- */
-void RegroupFormulaCells( SCROW nRow1, SCROW nRow2 );
-
 #if DEBUG_COLUMN_STORAGE
 void DumpFormulaGroups() const;
 #endif
diff --git a/sc/inc/sharedformula.hxx b/sc/inc/sharedformula.hxx
new file mode 100644
index 000..fcab6d7
--- /dev/null
+++ b/sc/inc/sharedformula.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef SC_SHAREDFORMULA_HXX
+#define SC_SHAREDFORMULA_HXX
+
+#include "formulacell.hxx"
+
+namespace sc {
+
+class SharedFormulaUtil
+{
+public:
+
+template
+static void groupFormulaCells(const _Iter& itBeg, const _Iter& itEnd)
+{
+_Iter it = itBeg;
+ScFormulaCell* pPrev = *it;
+ScFormulaCell* pCur = NULL;
+for (++it; it != itEnd; ++it, pPrev = pCur)
+{
+pCur = *it;
+ScFormulaCell::CompareState eState = 
pPrev->CompareByTokenArray(*pPrev);
+if (eState == ScFormulaCell::NotEqual)
+continue;
+
+ScFormulaCellGroupRef xGroup = pPrev->GetCellGroup();
+if (xGroup)
+{
+// Extend the group.
+++xGroup->mnLength;
+pCur->SetCellGroup(xGroup);
+continue;
+}
+
+// Create a new group.
+xGroup.reset(new ScFormulaCellGroup);
+xGroup->mnStart = pPrev->aPos.Row();
+xGroup->mnLength = 2;
+xGroup->mbInvariant = (eState == ScFormulaCell::EqualInvariant);
+pPrev->SetCellGroup(xGroup);
+pCur->SetCellGroup(xGroup);
+}
+}
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 70bd46b..50bc855 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -39,6 +39,7 @@
 #include "mtvcellfunc.hxx"
 #include "columnspanset.hxx"
 #include "scopetools.hxx"
+#include "sharedformula.hxx"
 
 #include 
 #include 
@@ -868,8 +869,8 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
 // TODO: Find out a 

[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/Library_sc.mk sc/source

2013-07-10 Thread Kohei Yoshida
 sc/Library_sc.mk  |1 
 sc/inc/column.hxx |   15 ---
 sc/inc/sharedformula.hxx  |   58 +++
 sc/source/core/data/column.cxx|   20 ++--
 sc/source/core/data/column2.cxx   |4 
 sc/source/core/data/column3.cxx   |  170 ++
 sc/source/core/tool/sharedformula.cxx |   18 +++
 7 files changed, 185 insertions(+), 101 deletions(-)

New commits:
commit b29ae8fde69750cb8e6118abb6a1dd032c291d1d
Author: Kohei Yoshida 
Date:   Wed Jul 10 16:32:39 2013 -0400

Group formula cells in ScColumn::MixData().

Change-Id: I38186e2bf82ed56fbe859b17dcc1d31f36471bd8

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 5815fd0..d431c3c 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -251,6 +251,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/tool/refupdat \
sc/source/core/tool/scmatrix \
sc/source/core/tool/scopetools \
+   sc/source/core/tool/sharedformula \
sc/source/core/tool/simplerangelist \
sc/source/core/tool/stringutil \
sc/source/core/tool/stylehelper \
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index d024007..01e9ef7 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -487,17 +487,18 @@ public:
 bool HasBroadcaster() const;
 
 void BroadcastCells( const std::vector& rRows );
-void EndFormulaListening( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, 
SCROW nRow2 );
 
 void InterpretDirtyCells( SCROW nRow1, SCROW nRow2 );
 
 void JoinNewFormulaCell( const sc::CellStoreType::position_type& aPos, 
ScFormulaCell& rCell ) const;
 
 /**
- * Detouch a formula cell that's about to be deleted, or removed from
+ * Detach a formula cell that's about to be deleted, or removed from
  * document storage (if that ever happens).
  */
-void DetouchFormulaCell( const sc::CellStoreType::position_type& aPos, 
ScFormulaCell& rCell ) const;
+void DetachFormulaCell( const sc::CellStoreType::position_type& aPos, 
ScFormulaCell& rCell );
+
+void DetachFormulaCells( const sc::CellStoreType::position_type& aPos, 
size_t nLength );
 
 void UnshareFormulaCell( const sc::CellStoreType::position_type& aPos, 
ScFormulaCell& rCell ) const;
 
@@ -515,14 +516,6 @@ public:
  */
 void RegroupFormulaCells();
 
-/**
- * Regroup existing formula cells when a range of new cells are inserted.
- *
- * @param nRow1 first row of inserted new cell span.
- * @param nRow2 last row of inserted new cell span.
- */
-void RegroupFormulaCells( SCROW nRow1, SCROW nRow2 );
-
 #if DEBUG_COLUMN_STORAGE
 void DumpFormulaGroups() const;
 #endif
diff --git a/sc/inc/sharedformula.hxx b/sc/inc/sharedformula.hxx
new file mode 100644
index 000..fcab6d7
--- /dev/null
+++ b/sc/inc/sharedformula.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef SC_SHAREDFORMULA_HXX
+#define SC_SHAREDFORMULA_HXX
+
+#include "formulacell.hxx"
+
+namespace sc {
+
+class SharedFormulaUtil
+{
+public:
+
+template
+static void groupFormulaCells(const _Iter& itBeg, const _Iter& itEnd)
+{
+_Iter it = itBeg;
+ScFormulaCell* pPrev = *it;
+ScFormulaCell* pCur = NULL;
+for (++it; it != itEnd; ++it, pPrev = pCur)
+{
+pCur = *it;
+ScFormulaCell::CompareState eState = 
pPrev->CompareByTokenArray(*pPrev);
+if (eState == ScFormulaCell::NotEqual)
+continue;
+
+ScFormulaCellGroupRef xGroup = pPrev->GetCellGroup();
+if (xGroup)
+{
+// Extend the group.
+++xGroup->mnLength;
+pCur->SetCellGroup(xGroup);
+continue;
+}
+
+// Create a new group.
+xGroup.reset(new ScFormulaCellGroup);
+xGroup->mnStart = pPrev->aPos.Row();
+xGroup->mnLength = 2;
+xGroup->mbInvariant = (eState == ScFormulaCell::EqualInvariant);
+pPrev->SetCellGroup(xGroup);
+pCur->SetCellGroup(xGroup);
+}
+}
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index ad51473..b777905 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -39,6 +39,7 @@
 #include "mtvcellfunc.hxx"
 #include "columnspanset.hxx"
 #include "scopetools.hxx"
+#include "sharedformula.hxx"
 
 #include 
 #include 
@@ -868,8 +869,8 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
 // TODO: Find out 

[Libreoffice-commits] core.git: 5 commits - cui/source editeng/source librelogo/source scripting/source

2013-07-10 Thread Eike Rathke
 cui/source/options/optgdlg.cxx |   20 ++--
 cui/source/options/optlingu.cxx|3 ++-
 editeng/source/misc/svxacorr.cxx   |5 ++---
 librelogo/source/LibreLogo/LibreLogo.py|3 +++
 scripting/source/stringresource/stringresource.cxx |8 
 5 files changed, 17 insertions(+), 22 deletions(-)

New commits:
commit 3f1a58884eba6a7cee5a208e0f3de768d1377398
Author: Eike Rathke 
Date:   Wed Jul 10 21:47:40 2013 +0200

added FIXME-BCP47 comments

Change-Id: I9e47a22f8a061461bfb0f21e74ae001e719f04b6

diff --git a/scripting/source/stringresource/stringresource.cxx 
b/scripting/source/stringresource/stringresource.cxx
index 8d8bade..c5c8b91 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1691,6 +1691,10 @@ bool checkNamingSceme( const OUString& aName, const 
OUString& aNameBase,
 {
 bSuccess = true;
 
+/* FIXME-BCP47: this uses '_' underscore character as separator and
+ * also appends Variant, which can't be blindly changed as it would
+ * violate the naming scheme in use. */
+
 sal_Int32 iStart = nNameBaseLen + 1;
 sal_Int32 iNext_ = aName.indexOf( '_', iStart );
 if( iNext_ != -1 && iNext_ < nNameLen-1 )
@@ -1821,6 +1825,10 @@ bool StringResourcePersistenceImpl::implLoadLocale( 
LocaleItem* )
 
 OUString implGetNameScemeForLocaleItem( const LocaleItem* pLocaleItem )
 {
+/* FIXME-BCP47: this uses '_' underscore character as separator and
+ * also appends Variant, which can't be blindly changed as it would
+ * violate the naming scheme in use. */
+
 static OUString aUnder("_");
 
 OSL_ENSURE( pLocaleItem,
commit 61436eface0070ad2431bae1cf716d607c8a9a4f
Author: Eike Rathke 
Date:   Wed Jul 10 21:35:09 2013 +0200

added FIXME-BCP47 comment

Change-Id: I8a8ba4ac9e5318935f9b52ca7fdb8e018e76e715

diff --git a/librelogo/source/LibreLogo/LibreLogo.py 
b/librelogo/source/LibreLogo/LibreLogo.py
index bf925c8..c13c705 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -587,6 +587,9 @@ def __setlang__():
 global _
 c = _.doc.CurrentController.getViewCursor()
 locs = [i for i in [c.CharLocale, c.CharLocaleAsian, 
c.CharLocaleComplex] if i.Language != 'zxx'] # not None language
+   # FIXME-BCP47: this needs adaption to language tags, a simple 
split on
+   # '-' and assuming second field would be country would already 
fail if
+   # a script tag was present.
 loc = Locale(__uilocale__.split('-')[0], __uilocale__.split('-')[1], 
'')
 if locs and loc not in locs:
 loc = locs[0]
commit a0f20ee1d5665ad8f6c686b04a16462e4979a29f
Author: Eike Rathke 
Date:   Wed Jul 10 21:20:05 2013 +0200

use LanguageTag

Change-Id: Ibbe84ddde5c9d7fbcb9920ea76896c44c0cdf387

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index b06e69a..d06b9d2 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -621,11 +621,10 @@ sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
 bool bRet = false;
 
 CharClass& rCC = GetCharClass( eLang );
-const lang::Locale rLocale = rCC.getLanguageTag().getLocale( );
 
-if ( rLocale.Language == OUString( "fr" ) )
+if ( rCC.getLanguageTag().getLanguage() == "fr" )
 {
-bool bFrCA = rLocale.Country == OUString( "CA" );
+bool bFrCA = (rCC.getLanguageTag().getCountry() == "CA");
 OUString allChars = OUString( ":;?!%" );
 OUString chars( allChars );
 if ( bFrCA )
commit c60257f4deddf9b82fc462921e9d25f3a3d56e67
Author: Eike Rathke 
Date:   Wed Jul 10 21:13:05 2013 +0200

comparing only language and country is now insufficient

Change-Id: I399a5c5444b7352be7fa541fba3112745ce97033

diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 6fe2d9d..4398ce1 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -656,7 +656,8 @@ static void lcl_MergeLocales(Sequence< Locale >& 
aAllLocales, const Sequence< Lo
 for(sal_Int32 j = 0; j < aAllLocales.getLength() && !bFound; j++)
 {
 bFound = pAdd[i].Language == pAllLocales[j].Language &&
-pAdd[i].Country == pAllLocales[j].Country;
+pAdd[i].Country == pAllLocales[j].Country &&
+pAdd[i].Variant == pAllLocales[j].Variant;
 }
 if(!bFound)
 {
commit f8e34b5c1281b32ad28087e458cd926b15955527
Author: Eike Rathke 
Date:   Wed Jul 10 21:07:01 2013 +0200

use LanguageTag to convert

Change-Id: I2e35ac3d905fc4837dbc68fe6c97ed4891a85400

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index a0f6284..6e0cb47 100644
--- a/cui/source/options/optgdlg.cxx
+++ 

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

2013-07-10 Thread Lionel Elie Mamane
 connectivity/source/parse/sqliterator.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7802990f3155de25d38f894d1261dc975c37762d
Author: Lionel Elie Mamane 
Date:   Wed Jul 10 00:50:11 2013 +0200

fdo#58644 fix handling of subqueries

don't remove parentheses around subqueries
(without the parentheses, it is not valid SQL)

Change-Id: I4e9c55cea0276f10b0f97e31bc329949aba5b989
Reviewed-on: https://gerrit.libreoffice.org/4791
Reviewed-by: David Tardon 
Reviewed-by: Michael Meeks 
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/connectivity/source/parse/sqliterator.cxx 
b/connectivity/source/parse/sqliterator.cxx
index 9e51296..6007eb9 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -966,6 +966,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const 
OSQLParseNode* pSele
 sal_Bool bFkt(sal_False);
 pColumnRef = pColumnRef->getChild(0);
 if (
+pColumnRef->getKnownRuleID() != 
OSQLParseNode::subquery &&
 pColumnRef->count() == 3 &&
 SQL_ISPUNCTUATION(pColumnRef->getChild(0),"(") &&
 SQL_ISPUNCTUATION(pColumnRef->getChild(2),")")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Lionel Elie Mamane
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 2ee2e0b99179a08369125743ec0e72d3b5622957
Author: Lionel Elie Mamane 
Date:   Wed Jul 10 02:58:32 2013 +0200

don't use empty table name

Change-Id: I9c8c3882f659747d53a047481ccabf1785835c99
Reviewed-on: https://gerrit.libreoffice.org/4793
Reviewed-by: David Tardon 
Reviewed-by: Michael Meeks 
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 7bd978d..d7071a2 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -509,10 +509,13 @@ OUString 
OSingleSelectQueryComposer::impl_getColumnName_throw(const Reference< X
 
::dbtools::qualifiedNameComponents(m_xMetaData,sTableName,aCatlog,aSchema,aTable,::dbtools::eInDataManipulation);
 sTableName = ::dbtools::composeTableName( m_xMetaData, 
aCatlog, aSchema, aTable, sal_True, ::dbtools::eInDataManipulation );
 }
-else
+else if (!sTableName.isEmpty())
 sTableName = ::dbtools::quoteName(aQuote,sTableName);
 
-aNewName =  sTableName + "." + 
::dbtools::quoteName(aQuote,sRealName);
+if(sTableName.isEmpty())
+aNewName =  ::dbtools::quoteName(aQuote,sRealName);
+else
+aNewName =  sTableName + "." + 
::dbtools::quoteName(aQuote,sRealName);
 }
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Miklos Vajna
 sw/qa/extras/rtfexport/data/fdo66682.rtf   |   25 +
 sw/qa/extras/rtfexport/rtfexport.cxx   |   21 +
 sw/source/filter/ww8/rtfattributeoutput.cxx|2 +-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |7 +--
 4 files changed, 52 insertions(+), 3 deletions(-)

New commits:
commit 044e55fd7367c09cfff64765fd5d32047d4e5365
Author: Miklos Vajna 
Date:   Wed Jul 10 12:12:55 2013 +0200

fdo#66682 RTF export: fix level text of SVX_NUM_ARABIC

Even if level text is not ASCII, we should just write the placeholder
values (0x00, 0x01, etc.) in a hex encoded form, without Unicode.
Regression from 07d01742c69f1c0335bc7e1b57abd8341ce255e7.

Also, fix the import side, so the previous bad output now looks bad in
Writer as well.

(cherry picked from commit 8422d1f5042de08e8b090a907889b41e133bda40)

Conflicts:
sw/qa/extras/rtfexport/rtfexport.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx

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

diff --git a/sw/qa/extras/rtfexport/data/fdo66682.rtf 
b/sw/qa/extras/rtfexport/data/fdo66682.rtf
new file mode 100644
index 000..76128a2
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/fdo66682.rtf
@@ -0,0 +1,25 @@
+{\rtf1\ansi\deff4\adeflang1025
+{\*\listtable
+{\list\listtemplateid1
+{\listlevel\levelnfc0\leveljc0\levelstartat1\levelfollow0
+{\leveltext \'03 \'00 ;}
+{\levelnumbers\'02;}
+\fi-360\li720}
+\listid1}
+}
+{\listoverridetable
+{\listoverride\listid1\listoverridecount0\ls1}
+}
+\pard\plain \s0\sb0\sa113\nowidctlpar
+\ilvl0\ls1 \li720\ri0\lin720\rin0\fi-360
+{\rtlch \ltrch\loch
+This should be 1}
+\par \pard\plain \s0\sb0\sa113\nowidctlpar
+\ilvl0\ls1 \li720\ri0\lin720\rin0\fi-360
+{\rtlch \ltrch\loch
+and 2}
+\par \pard\plain \s0\sb0\sa113\nowidctlpar
+\ilvl0\ls1 \li720\ri0\lin720\rin0\fi-360\sb0\sa113
+{\rtlch \ltrch\loch
+and 3}
+\par }
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx 
b/sw/qa/extras/rtfexport/rtfexport.cxx
index 0610516..d1092d0 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -73,6 +73,7 @@ public:
 void testFdo52286();
 void testFdo61507();
 void testFdo30983();
+void testFdo66682();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -119,6 +120,7 @@ void Test::run()
 {"fdo52286.odt", &Test::testFdo52286},
 {"fdo61507.rtf", &Test::testFdo61507},
 {"fdo30983.rtf", &Test::testFdo30983},
+{"fdo66682.rtf", &Test::testFdo66682},
 };
 // Don't test the first import of these, for some reason those tests fail
 const char* aBlacklist[] = {
@@ -501,6 +503,25 @@ void Test::testFdo30983()
 CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, 
getProperty(xDraws->getByIndex(0), "VertOrientRelation"));
 }
 
+void Test::testFdo66682()
+{
+uno::Reference 
xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+uno::Reference 
xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+uno::Sequence aProps;
+xLevels->getByIndex(0) >>= aProps; // 1st level
+
+OUString aSuffix;
+for (int i = 0; i < aProps.getLength(); ++i)
+{
+const beans::PropertyValue& rProp = aProps[i];
+
+if (rProp.Name == "Suffix")
+aSuffix = rProp.Value.get();
+}
+// Suffix was '\0' instead of ' '.
+CPPUNIT_ASSERT_EQUAL(OUString(" "), aSuffix);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 33032b1..15ab89a 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1383,7 +1383,7 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
 else
 {
 m_rExport.Strm() << "\\'" << msfilter::rtfutil::OutHex( 
rNumberingString.Len(), 2 ).getStr();
-m_rExport.Strm() << msfilter::rtfutil::OutString( rNumberingString, 
m_rExport.eDefaultEncoding ).getStr();
+m_rExport.Strm() << msfilter::rtfutil::OutString( rNumberingString, 
m_rExport.eDefaultEncoding, /*bUnicode =*/ false ).getStr();
 }
 
 m_rExport.Strm() << ";}";
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 959833c..e4cea73 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1656,7 +1656,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword 
nKeyword)
 int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
 {
 if (nKeyword != RTF_HEXCHAR)
-checkUnicode();
+checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true);
+else
+checkUnicode(/*bUnicode =*/ true, /*

[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/xmloff reportdesign/source sc/source xmloff/source

2013-07-10 Thread Luboš Luňák
 include/xmloff/txtimp.hxx |   11 ++
 include/xmloff/txtimppr.hxx   |6 ---
 reportdesign/source/filter/xml/xmlStyleImport.cxx |4 +-
 sc/source/filter/xml/xmlstyli.cxx |2 -
 xmloff/source/core/xmlimp.cxx |1 
 xmloff/source/style/xmlnumi.cxx   |2 -
 xmloff/source/text/txtimp.cxx |   38 --
 xmloff/source/text/txtimppr.cxx   |   16 ++---
 8 files changed, 21 insertions(+), 59 deletions(-)

New commits:
commit cc3293b94ab58b196bc2786eb4012d64351e8fa4
Author: Luboš Luňák 
Date:   Wed Jul 10 17:33:15 2013 +0200

fix reading fonts from .odp using style::font-name (fdo#65338)

b40bcde076f9fabf24810d2520e878d604d99637 made writing .odp use 
style:font-name
and office:font-face-decls, instead of using fo:font-family . But the 
reading
back was broken, as xFontDecls is not set
in XMLTextImportPropertyMapper::handleSpecialItem(), so the font data was
ignored. And xFontDecls was not set because it's set while reading
office:font-face-decls, which is at the top of the xml document, but even
before the xml is parsed, the call to SdXMLImport::setTargetDocument() calls
GetShapeImport(), which creates XMLShapeImportHelper instance, which calls
XMLTextImportHelper::CreateParaExtPropMapper(), and 
XMLTextImportPropertyMapper
is created with rImport.GetFontDecls() still being NULL at that point.

And it actually doesn't seem to make any sense to just pass around all
the pointers to XMLFontStylesContext, as eventually it's always just the one
from SvXMLImport. So simply dump all that and make the one single place
that actually uses it (i.e. 
XMLTextImportPropertyMapper::handleSpecialItem())
refer directly to SvXMLImport::GetFontDecls().

Change-Id: Ib1b3e4b1bcaf87ca3e4703d1cc1563ad6b3f9ce7
Reviewed-on: https://gerrit.libreoffice.org/4816
Reviewed-by: Michael Meeks 
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx
index 0fc68b5..c15bd8b 100644
--- a/include/xmloff/txtimp.hxx
+++ b/include/xmloff/txtimp.hxx
@@ -409,9 +409,6 @@ public:
 
 void SetAutoStyles( SvXMLStylesContext *pStyles );
 
-void SetFontDecls( XMLFontStylesContext *pFontDecls );
-const XMLFontStylesContext *GetFontDecls() const;
-
 SvXMLImportContext *CreateTextChildContext(
 SvXMLImport& rImport,
 sal_uInt16 nPrefix, const OUString& rLocalName,
@@ -557,10 +554,10 @@ public:
 GetRubyImportPropertySetMapper() const;
 
 static SvXMLImportPropertyMapper *CreateShapeExtPropMapper(SvXMLImport&);
-static SvXMLImportPropertyMapper *CreateParaExtPropMapper(SvXMLImport&, 
XMLFontStylesContext *pFontDecls = NULL);
-static SvXMLImportPropertyMapper* 
CreateParaDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* pFontDecls = 
NULL);
-static SvXMLImportPropertyMapper* 
CreateTableDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* pFontDecls 
= NULL);
-static SvXMLImportPropertyMapper* 
CreateTableRowDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* 
pFontDecls = NULL);
+static SvXMLImportPropertyMapper *CreateParaExtPropMapper(SvXMLImport&);
+static SvXMLImportPropertyMapper* 
CreateParaDefaultExtPropMapper(SvXMLImport&);
+static SvXMLImportPropertyMapper* 
CreateTableDefaultExtPropMapper(SvXMLImport&);
+static SvXMLImportPropertyMapper* 
CreateTableRowDefaultExtPropMapper(SvXMLImport&);
 
 SvI18NMap& GetRenameMap();
 
diff --git a/include/xmloff/txtimppr.hxx b/include/xmloff/txtimppr.hxx
index ae58bdd..0bae7ed 100644
--- a/include/xmloff/txtimppr.hxx
+++ b/include/xmloff/txtimppr.hxx
@@ -28,7 +28,6 @@ class XMLOFF_DLLPUBLIC XMLTextImportPropertyMapper : public 
SvXMLImportPropertyM
 {
 sal_Int32 nSizeTypeIndex;
 sal_Int32 nWidthTypeIndex;
-SvXMLImportContextRef xFontDecls;
 
 void FontFinished(
 XMLPropertyState *pFontFamilyNameState,
@@ -58,12 +57,9 @@ protected:
 public:
 XMLTextImportPropertyMapper(
 const UniReference< XMLPropertySetMapper >& rMapper,
-SvXMLImport& rImport,
-XMLFontStylesContext *pFontDecls = 0 );
+SvXMLImport& rImport );
 virtual ~XMLTextImportPropertyMapper();
 
-void SetFontDecls( XMLFontStylesContext *pFontDecls );
-
 /** This method is called when all attributes have benn processed. It may 
be used to remove items that are incomplete */
 virtual void finished(
 ::std::vector< XMLPropertyState >& rProperties,
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx 
b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 4b80bcf..a79a9c2 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -213,9 +213,9 @@ UniReferenc

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

2013-07-10 Thread Eike Rathke
 include/sfx2/sfxhelp.hxx |2 --
 sfx2/source/appl/sfxhelp.cxx |   22 --
 2 files changed, 24 deletions(-)

New commits:
commit 3bc422573b480476bdfa775bdcf259532f4e09c6
Author: Eike Rathke 
Date:   Wed Jul 10 20:52:25 2013 +0200

removed unused language/country string member variables

Change-Id: I7659dac1a3d17b4099f310fd7b6d17455bdda2eb

diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index 217f802..b92bc9d 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -31,8 +31,6 @@ class SFX2_DLLPUBLIC SfxHelp : public Help
 {
 OUStringaTicket;// for Plugins
 OUStringaUser;
-OUStringaLanguageStr;
-OUStringaCountryStr;
 sal_BoolbIsDebug;
 SfxHelp_Impl*   pImp;
 
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 2cde9ae..6d5244b 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -231,28 +231,6 @@ SfxHelp::SfxHelp() :
 }
 
 pImp = new SfxHelp_Impl();
-
-OUString aLocaleStr = HelpLocaleString();
-
-sal_Int32 nSepPos = aLocaleStr.indexOf( '_' );
-if ( nSepPos != -1 )
-{
-aLanguageStr = aLocaleStr.copy( 0, nSepPos );
-aCountryStr = aLocaleStr.copy( nSepPos+1 );
-}
-else
-{
-nSepPos = aLocaleStr.indexOf( '-' );
-if ( nSepPos != -1 )
-{
-aLanguageStr = aLocaleStr.copy( 0, nSepPos );
-aCountryStr = aLocaleStr.copy( nSepPos+1 );
-}
-else
-{
-aLanguageStr = aLocaleStr;
-}
-}
 }
 
 SfxHelp::~SfxHelp()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 6 commits - connectivity/source dbaccess/source include/connectivity vcl/Library_vcl.mk

2013-07-10 Thread Tor Lillqvist
 connectivity/source/inc/internalnode.hxx   |   51 
 connectivity/source/inc/parse/sqlbison_exports.hxx |   23 -
 connectivity/source/inc/sqlscan.hxx|   83 -
 connectivity/source/parse/internalnode.cxx |4 -
 connectivity/source/parse/sqlbison.y   |   13 ++-
 connectivity/source/parse/sqlflex.l|   10 +-
 connectivity/source/parse/sqlnode.cxx  |8 +-
 dbaccess/source/ui/browser/brwctrlr.cxx|2 
 include/connectivity/internalnode.hxx  |   51 
 include/connectivity/sqlbison_exports.hxx  |   23 +
 include/connectivity/sqlscan.hxx   |   83 +
 vcl/Library_vcl.mk |   13 ---
 12 files changed, 177 insertions(+), 187 deletions(-)

New commits:
commit d3a221df1a513642da16f1301db7734fc003a0c7
Author: Tor Lillqvist 
Date:   Wed Jul 10 20:47:32 2013 +0300

Fix error: reference to 'ErrorCondition' is ambiguous

Either 'connectivity::ErrorCondition' or
'com::sun::star::sdb::ErrorCondition'.

Change-Id: Ifeaa895497c8635b7801b2e79400634b11541373

diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx 
b/dbaccess/source/ui/browser/brwctrlr.cxx
index e208d3e..7411241 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -696,7 +696,7 @@ void SbaXDataBrowserController::onStartLoading( const 
Reference< XLoadable >& _r
 void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const 
SQLExceptionInfo& _rError )
 {
 ::connectivity::SQLError aError( getORB() );
-::connectivity::ErrorCode nErrorCode( aError.getErrorCode( 
ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED ) );
+::connectivity::ErrorCode nErrorCode( aError.getErrorCode( 
sdb::ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED ) );
 if ( ((const SQLException*)_rError)->ErrorCode == nErrorCode )
 {
 m_bCannotSelectUnfiltered = true;
commit a0c50b739c79d41e8166e2dab862dca0d093e7c3
Author: Tor Lillqvist 
Date:   Wed Jul 10 20:44:17 2013 +0300

Further fallout from the connectivity SQL parser changes

A couple of headers now need to be public because they are indirectly
included in other modules.

Change-Id: Id01945197b67183a0a042e854289875ae147a0eb

diff --git a/connectivity/source/parse/internalnode.cxx 
b/connectivity/source/parse/internalnode.cxx
index 57d28b4..19caebb 100644
--- a/connectivity/source/parse/internalnode.cxx
+++ b/connectivity/source/parse/internalnode.cxx
@@ -17,10 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "internalnode.hxx"
-
 #include 
+
 #include 
+#include 
 
 using namespace connectivity;
 
diff --git a/connectivity/source/parse/sqlbison.y 
b/connectivity/source/parse/sqlbison.y
index d5bc6fb..0b661e9 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -21,11 +21,12 @@
 
 #include 
 #include 
-#include "parse/sqlbison_exports.hxx"
 
 #include 
 #include 
-#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -40,7 +41,6 @@
 #include 
 #include 
 
-#include "sqlscan.hxx"
 #include 
 #include "connectivity/dbconversion.hxx"
 #include 
diff --git a/connectivity/source/parse/sqlflex.l 
b/connectivity/source/parse/sqlflex.l
index 47a42ec..e3629d7 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -28,7 +28,7 @@
 
 #include 
 
-#include "internalnode.hxx"
+#include 
 
 #ifndef _CONNECTIVITY_SQLYACC_HXX
 #define _CONNECTIVITY_SQLYACC_HXX
@@ -41,10 +41,10 @@
 #undef SQLyylex
 #undef SQLyyerror
 #endif
-#include "sqlscan.hxx"
 #include 
 #include 
 #include 
+#include 
 
 #if defined __SUNPRO_CC
 #pragma disable_warn
diff --git a/connectivity/source/parse/sqlnode.cxx 
b/connectivity/source/parse/sqlnode.cxx
index 787b1fa..1c748ab 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -17,15 +17,15 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "parse/sqlbison_exports.hxx"
-
 #include 
 #include 
 #include 
-#include 
+#include 
+#include 
 #define YYBISON   1
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -47,7 +47,6 @@
 #include 
 #include 
 #include "TConnection.hxx"
-#include "sqlscan.hxx"
 #include 
 #include 
 #include 
diff --git a/connectivity/source/inc/internalnode.hxx 
b/include/connectivity/internalnode.hxx
similarity index 100%
rename from connectivity/source/inc/internalnode.hxx
rename to include/connectivity/internalnode.hxx
diff --git a/connectivity/source/inc/parse/sqlbison_exports.hxx 
b/include/connectivity/sqlbison_exports.hxx
similarity index 100%
rename from connectivity/source/inc/parse/sqlbison_exports.hxx
rename to include/connectivity/sqlbison_exports.hxx
diff --git a/connectivity/source/inc/sqlscan.hxx 
b/include/co

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

2013-07-10 Thread Eike Rathke
 svl/source/config/asiancfg.cxx |   24 +---
 1 file changed, 5 insertions(+), 19 deletions(-)

New commits:
commit 02a48793c078ca363e38b3846fb68ee3ebd5ce38
Author: Eike Rathke 
Date:   Wed Jul 10 19:24:15 2013 +0200

use LanguageTag to convert

Change-Id: I45fe02ca4cc3c171cc7f230093ca9623d7e69980

diff --git a/svl/source/config/asiancfg.cxx b/svl/source/config/asiancfg.cxx
index 57d903c..99e36eb 100644
--- a/svl/source/config/asiancfg.cxx
+++ b/svl/source/config/asiancfg.cxx
@@ -40,31 +40,17 @@
 #include "rtl/ustring.hxx"
 #include "sal/log.hxx"
 #include "sal/types.h"
+#include "i18nlangtag/languagetag.hxx"
 #include "svl/asiancfg.hxx"
 
 namespace {
 
 OUString toString(css::lang::Locale const & locale) {
-SAL_WARN_IF(
-locale.Language.indexOf('-') != -1, "svl",
-"Locale language \"" << locale.Language << "\" contains \"-\"");
-OUStringBuffer buf(locale.Language);
-SAL_WARN_IF(
-locale.Country.isEmpty() && !locale.Variant.isEmpty(), "svl",
-"Locale has empty country but non-empty variant \"" << locale.Variant
-<< '"');
-if (!locale.Country.isEmpty()) {
-buf.append('-');
-SAL_WARN_IF(
-locale.Country.indexOf('-') != -1, "svl",
+SAL_WARN_IF( locale.Language.indexOf('-') != -1, "svl",
+"Locale language \"" << locale.Language << "\" contains \"-\"");
+SAL_WARN_IF( locale.Country.indexOf('-') != -1, "svl",
 "Locale country \"" << locale.Country << "\" contains \"-\"");
-buf.append(locale.Country);
-if (!locale.Variant.isEmpty()) {
-buf.append('-');
-buf.append(locale.Variant);
-}
-}
-return buf.makeStringAndClear();
+return LanguageTag( locale).getBcp47( false);
 }
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Eike Rathke
 sw/source/ui/dbui/dbinsdlg.cxx |   22 ++
 1 file changed, 10 insertions(+), 12 deletions(-)

New commits:
commit 166c0724acc28ef121ea75d10ee3f7f95942f27f
Author: Eike Rathke 
Date:   Wed Jul 10 18:56:30 2013 +0200

use LanguageTag to convert

Change-Id: Ieb160cf3f9ce1f298a007b42326885e927255433

diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index bcaad87..a237b50 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1670,11 +1670,7 @@ void SwInsertDBColAutoPilot::Commit()
 
 if( eLang != ePrevLang )
 {
-/* FIXME-BCP47: handle language tags! */
-lang::Locale aLocale( LanguageTag( eLang ).getLocale());
-/* umm.. what's this string anyway, "Country-Language" instead of
- * "Language-Country" ??? */
-(( sPrevLang = aLocale.Country ) += OUString( '-' )) += 
aLocale.Language;
+sPrevLang = LanguageTag( eLang ).getBcp47();
 ePrevLang = eLang;
 }
 
@@ -1757,13 +1753,15 @@ void SwInsertDBColAutoPilot::Load()
 OUString sNumberFormatLocale;
 pSubProps[5] >>= sNumberFormatLocale;
 
-/* FIXME-BCP47: handle language tags, and cope with the wrong
- * Country-Language string that
- * SwInsertDBColAutoPilot::Commit() writes so far! */
-lang::Locale aLocale;
-aLocale.Language = sNumberFormatLocale.copy(0, 2);
-aLocale.Country = sNumberFormatLocale.copy(3, 2);
-pInsDBColumn->eUsrNumFmtLng = LanguageTag( aLocale 
).getLanguageType();
+/* XXX Earlier versions wrote a Country-Language string in
+ * SwInsertDBColAutoPilot::Commit() that here was read as
+ * Language-Country with 2 characters copied to language,
+ * 1 character separator and unconditionally 2 characters read
+ * as country. So for 'DE-de' and locales that have similar
+ * case-insensitive equal language/country combos that may have
+ * worked, for all others not. FIXME if you need to read old
+ * data that you were never able to read before. */
+pInsDBColumn->eUsrNumFmtLng = LanguageTag( sNumberFormatLocale 
).getLanguageType();
 
 pInsDBColumn->nUsrNumFmt = rNFmtr.GetEntryKey( 
pInsDBColumn->sUsrNumFmt,
 
pInsDBColumn->eUsrNumFmtLng );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Need Confirmation: since 4.1 MySQL datetime fields are wrangled in LO base tables

2013-07-10 Thread Fernand Vanrie
I connect with the Windows Native MYSQL connector  (compiled against 
4.0) to a MySQL database


since 4.1 all "DateTime" fields are wrangled  when showing  a table in 
LO base, when changing the values using LO then they are also wrangled 
in the original MySQL table

"date" values seems to be OK

can that been confirmed on other than windows machines and maybe other 
connectors ?


Lionel Elie Mamane suggested  that due to some changes in the base code 
the Windows Connector has to been recompiled against 4.1  ?


Greetz

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


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

2013-07-10 Thread Khaled Hosny
 sw/uiconfig/swriter/ui/optfonttabpage.ui |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1967b6374a23ef473b7ebd5bf423181103558592
Author: Khaled Hosny 
Date:   Wed Jul 10 18:26:44 2013 +0200

Fix encoding issue

Change-Id: If3f7a1cc9e888cea24c8b7363a30721ef6179996

diff --git a/sw/uiconfig/swriter/ui/optfonttabpage.ui 
b/sw/uiconfig/swriter/ui/optfonttabpage.ui
index bd9e4cb..7534553 100644
--- a/sw/uiconfig/swriter/ui/optfonttabpage.ui
+++ b/sw/uiconfig/swriter/ui/optfonttabpage.ui
@@ -233,7 +233,7 @@
 
   
 False
-�
+●
   
 
   
@@ -255,7 +255,7 @@
 
   
 False
-�
+●
   
 
   
@@ -277,7 +277,7 @@
 
   
 False
-�
+●
   
 
   
@@ -299,7 +299,7 @@
 
   
 False
-�
+●
   
 
   
@@ -321,7 +321,7 @@
 
   
 False
-�
+●
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Lionel Elie Mamane
 connectivity/source/parse/sqlbison.y |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 86ffbdcd402f965d57092528263673378af0fab8
Author: Lionel Elie Mamane 
Date:   Wed Jul 10 18:15:14 2013 +0200

make aEmptyString const

ensures nobody mistakenly modifies it, and makes other code get
a non-empty string where empty string is expected.

Change-Id: I477edd0e589444da19b68381234eb5e85ecd54cc

diff --git a/connectivity/source/parse/sqlbison.y 
b/connectivity/source/parse/sqlbison.y
index 160852f..b7fac32 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -53,7 +53,7 @@
 #pragma warning(disable:4273 4701 4706)
 #endif
 
-static ::rtl::OUString aEmptyString;
+static const ::rtl::OUString aEmptyString;
 
 static connectivity::OSQLInternalNode* newNode(const sal_Char* pNewValue,
 const 
connectivity::SQLNodeType eNodeType,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source

2013-07-10 Thread Kohei Yoshida
 sc/inc/formulagroup.hxx  |3 +++
 sc/source/core/opencl/formulagroupcl.cxx |8 +---
 sc/source/core/tool/formulagroup.cxx |   13 ++---
 3 files changed, 18 insertions(+), 6 deletions(-)

New commits:
commit 517a3eadb523a904db69802945fc25bfcff9b93c
Author: Kohei Yoshida 
Date:   Wed Jul 10 11:58:49 2013 -0400

Generate Reverse Polish token array (RPN) at the start.

Change-Id: Idcac01820fab536cebebcc437e206b6900511600

diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx
index e645968..9963fc9 100644
--- a/sc/inc/formulagroup.hxx
+++ b/sc/inc/formulagroup.hxx
@@ -39,6 +39,9 @@ class SC_DLLPUBLIC FormulaGroupInterpreter
  protected:
 FormulaGroupInterpreter() {}
 virtual ~FormulaGroupInterpreter() {}
+
+static void generateRPNCode(ScDocument& rDoc, const ScAddress& rPos, 
ScTokenArray& rCode);
+
  public:
 static FormulaGroupInterpreter *getStatic();
 
diff --git a/sc/source/core/opencl/formulagroupcl.cxx 
b/sc/source/core/opencl/formulagroupcl.cxx
index 8bc0224..04a67d2 100755
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -65,6 +65,8 @@ ScMatrixRef 
FormulaGroupInterpreterOpenCL::inverseMatrix(const ScMatrix& /* rMat
 bool FormulaGroupInterpreterOpenCL::interpret(ScDocument& rDoc, const 
ScAddress& rTopPos,
   const ScFormulaCellGroupRef& 
xGroup, ScTokenArray& rCode)
 {
+generateRPNCode(rDoc, rTopPos, rCode);
+
 size_t rowSize = xGroup->mnLength;
 fprintf(stderr,"rowSize at begin is ...%ld.\n",(long)rowSize);
 // The row quantity can be gotten from p2->GetArrayLength()
@@ -193,9 +195,7 @@ bool FormulaGroupInterpreterOpenCL::interpret(ScDocument& 
rDoc, const ScAddress&
 if(!getenv("SC_GPU")||!ocl_calc.GetOpenclState())
 {
 fprintf(stderr,"ccCPU flow...\n\n");
-ScCompiler aComp(&rDoc, aTmpPos, aCode2);
-aComp.SetGrammar(rDoc.GetGrammar());
-aComp.CompileTokenArray(); // Create RPN token array.
+generateRPNCode(rDoc, aTmpPos, aCode2);
 ScInterpreter aInterpreter(pDest, &rDoc, aTmpPos, aCode2);
 aInterpreter.Interpret();
 pDest->SetResultToken(aInterpreter.GetResultToken().get());
@@ -306,6 +306,8 @@ bool 
FormulaGroupInterpreterGroundwater::interpret(ScDocument& rDoc, const ScAdd
const 
ScFormulaCellGroupRef& xGroup,
ScTokenArray& rCode)
 {
+generateRPNCode(rDoc, rTopPos, rCode);
+
 // Inputs: both of length xGroup->mnLength
 OpCode eOp; // type of operation: ocAverage, ocMax, ocMin
 const double *pArrayToSubtractOneElementFrom;
diff --git a/sc/source/core/tool/formulagroup.cxx 
b/sc/source/core/tool/formulagroup.cxx
index 627c5f5..5a23511 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -96,9 +96,7 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& 
rDoc, const ScAddres
 if (!pDest)
 return false;
 
-ScCompiler aComp(&rDoc, aTmpPos, aCode2);
-aComp.SetGrammar(rDoc.GetGrammar());
-aComp.CompileTokenArray(); // Create RPN token array.
+generateRPNCode(rDoc, aTmpPos, aCode2);
 ScInterpreter aInterpreter(pDest, &rDoc, aTmpPos, aCode2);
 aInterpreter.Interpret();
 aResults.push_back(aInterpreter.GetResultToken()->GetDouble());
@@ -190,6 +188,15 @@ FormulaGroupInterpreter 
*FormulaGroupInterpreter::getStatic()
 return msInstance;
 }
 
+void FormulaGroupInterpreter::generateRPNCode(ScDocument& rDoc, const 
ScAddress& rPos, ScTokenArray& rCode)
+{
+// First, generate an RPN (reverse polish notation) token array.
+ScCompiler aComp(&rDoc, rPos, rCode);
+aComp.SetGrammar(rDoc.GetGrammar());
+aComp.CompileTokenArray(); // Create RPN token array.
+// Now, calling FirstRPN() and NextRPN() will return tokens from the RPN 
token array.
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - cui/source default_images/res officecfg/registry

2013-07-10 Thread Herbert Dürr
 cui/source/dialogs/cuifmsearch.cxx  |7 +++
 cui/source/inc/cuifmsearch.hxx  |1 
 default_images/res/mainapp_16.png   |binary
 default_images/res/mainapp_16_8.png |binary
 default_images/res/mainapp_32.png   |binary
 default_images/res/mainapp_32_8.png |binary
 default_images/res/mainapp_48_8.png |binary
 officecfg/registry/data/org/openoffice/Inet.xcu |   44 
 8 files changed, 8 insertions(+), 44 deletions(-)

New commits:
commit 704bca1331d902281c3029aba65d57baa89d3731
Author: Herbert Dürr 
Date:   Wed Jul 10 12:16:11 2013 +

#i122581# reestablish focus of the Record Search dialog to the search 
combobox

Patch by: Tsutomu Uchino 

diff --git a/cui/source/dialogs/cuifmsearch.cxx 
b/cui/source/dialogs/cuifmsearch.cxx
index 5d3..9ed5619 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -252,6 +252,7 @@ void FmSearchDialog::Init(const UniString& 
strVisibleFields, const UniString& sI
 
 m_cmbSearchText.SetModifyHdl(LINK(this, FmSearchDialog, 
OnSearchTextModified));
 m_cmbSearchText.EnableAutocomplete(sal_False);
+m_cmbSearchText.SetGetFocusHdl(LINK(this, FmSearchDialog, OnFocusGrabbed));
 
 m_cbUseFormat.SetToggleHdl(LINK(this, FmSearchDialog, OnCheckBoxToggled));
 m_cbBackwards.SetToggleHdl(LINK(this, FmSearchDialog, OnCheckBoxToggled));
@@ -443,6 +444,12 @@ IMPL_LINK(FmSearchDialog, OnSearchTextModified, ComboBox*, 
EMPTYARG)
 }
 
 //
+IMPL_LINK(FmSearchDialog, OnFocusGrabbed, ComboBox*, EMPTYARG)
+{
+m_cmbSearchText.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
+}
+
+//
 IMPL_LINK(FmSearchDialog, OnPositionSelected, ListBox*, pBox)
 {
 (void) pBox; // avoid warning
diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx
index 1e98197..ef19a56 100644
--- a/cui/source/inc/cuifmsearch.hxx
+++ b/cui/source/inc/cuifmsearch.hxx
@@ -196,6 +196,7 @@ private:
 DECL_LINK( OnPositionSelected, ListBox* );
 DECL_LINK( OnFieldSelected, ListBox* );
 
+DECL_LINK( OnFocusGrabbed, ComboBox* );
 DECL_LINK( OnCheckBoxToggled, CheckBox* );
 
 DECL_LINK( OnContextSelection, ListBox* );
commit 5cda41a1f28f10b630067fa34d74a51ece904f48
Author: Herbert Dürr 
Date:   Wed Jul 10 11:55:23 2013 +

#i122666# the AltaVista search engine was shut down on July 8, 2013

Patch by: Tsutomu Uchino 

diff --git a/officecfg/registry/data/org/openoffice/Inet.xcu 
b/officecfg/registry/data/org/openoffice/Inet.xcu
index 6b69a6a..1489697 100644
--- a/officecfg/registry/data/org/openoffice/Inet.xcu
+++ b/officecfg/registry/data/org/openoffice/Inet.xcu
@@ -179,50 +179,6 @@
 
   
 
-
-  
-
-  
http://www.altavista.com/web/results/?qbmode=&aqa=&aqp=&aqo=
-
-
-  +
-
-
-  &aqn=&kgs=0&kls=1&avkw=aapt
-
-
-  0
-
-  
-  
-
-  http://www.altavista.com/web/results/?qbmode=&aqa=
-
-
-  
&aqp=&aqo=&aqn=&kgs=0&kls=1&avkw=aapt
-
-
-  0
-
-
-  +
-
-  
-  
-
-  http://www.altavista.com/web/results?q=%22
-
-
-  %22&kgs=0&kls=1&avkw=aapt
-
-
-  0
-
-
-  %20
-
-  
-
 
   
 
commit eb8648bbad952a948a50daa4968e86e95580a713
Author: Jürgen Schmidt 
Date:   Wed Jul 10 10:07:58 2013 +

#122620# update mainapp*.png with new orb

diff --git a/default_images/res/mainapp_16.png 
b/default_images/res/mainapp_16.png
index 3aa8f08..b7fe099 100644
Binary files a/default_images/res/mainapp_16.png and 
b/default_images/res/mainapp_16.png differ
diff --git a/default_images/res/mainapp_16_8.png 
b/default_images/res/mainapp_16_8.png
index 3aa8f08..b7fe099 100644
Binary files a/default_images/res/mainapp_16_8.png and 
b/default_images/res/mainapp_16_8.png differ
diff --git a/default_images/res/mainapp_32.png 
b/default_images/res/mainapp_32.png
index 296c6f4..6f13d6e 100644
Binary files a/default_images/res/mainapp_32.png and 
b/default_images/res/mainapp_32.png differ
diff --git a/default_images/res/mainapp_32_8.png 
b/default_images/res/mainapp_32_8.png
index 296c6f4..6f13d6e 100644
Binary files a/default_images/res/mainapp_32_8.png and 
b/default_images/res/mainapp_32_8.png differ
diff --git a/default_images/res/mainapp_48_8.png 
b/default_images/res/mainapp_48_8.png
index 86bcf59..82ae546 100644
Binary files a/default_images/res/mainapp_48_8.png and 
b/default_images/res/mainapp_48_8.png differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedeskt

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

2013-07-10 Thread Lionel Elie Mamane
 connectivity/source/parse/sqlflex.l |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9a34875667292a768975e2c7aba888efd3597a04
Author: Lionel Elie Mamane 
Date:   Wed Jul 10 18:08:08 2013 +0200

compatibility with 2008-era bison (2.3)

Undo problematic pollution by sqlbison.hxx
Since with post-2008 (2.4 and later) bison that "#define SQLyylex"\is not 
active in sqlflex.l, this forces the situationo be the same in all versions 
of bison, and should notreak anything by itself.

Change-Id: Ie65e3f6cc61dc97adc1d530e3781306ecd176b17

diff --git a/connectivity/source/parse/sqlflex.l 
b/connectivity/source/parse/sqlflex.l
index 675c131..803b634 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -38,6 +38,7 @@
 #endif
 
 #include "sqlbison.hxx"
+#undef SQLyylex
 #endif
 #include "sqlscan.hxx"
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/calc-group-interpreter' - sc/inc sc/source

2013-07-10 Thread Kohei Yoshida
 sc/inc/formulagroup.hxx  |3 +++
 sc/source/core/opencl/formulagroupcl.cxx |8 +---
 sc/source/core/tool/formulagroup.cxx |   13 ++---
 3 files changed, 18 insertions(+), 6 deletions(-)

New commits:
commit 2f8d759e615355f6498ad8f95e162367745c3bb9
Author: Kohei Yoshida 
Date:   Wed Jul 10 11:58:49 2013 -0400

Generate Reverse Polish token array (RPN) at the start.

Change-Id: Idcac01820fab536cebebcc437e206b6900511600

diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx
index e645968..9963fc9 100644
--- a/sc/inc/formulagroup.hxx
+++ b/sc/inc/formulagroup.hxx
@@ -39,6 +39,9 @@ class SC_DLLPUBLIC FormulaGroupInterpreter
  protected:
 FormulaGroupInterpreter() {}
 virtual ~FormulaGroupInterpreter() {}
+
+static void generateRPNCode(ScDocument& rDoc, const ScAddress& rPos, 
ScTokenArray& rCode);
+
  public:
 static FormulaGroupInterpreter *getStatic();
 
diff --git a/sc/source/core/opencl/formulagroupcl.cxx 
b/sc/source/core/opencl/formulagroupcl.cxx
index 8bc0224..04a67d2 100755
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -65,6 +65,8 @@ ScMatrixRef 
FormulaGroupInterpreterOpenCL::inverseMatrix(const ScMatrix& /* rMat
 bool FormulaGroupInterpreterOpenCL::interpret(ScDocument& rDoc, const 
ScAddress& rTopPos,
   const ScFormulaCellGroupRef& 
xGroup, ScTokenArray& rCode)
 {
+generateRPNCode(rDoc, rTopPos, rCode);
+
 size_t rowSize = xGroup->mnLength;
 fprintf(stderr,"rowSize at begin is ...%ld.\n",(long)rowSize);
 // The row quantity can be gotten from p2->GetArrayLength()
@@ -193,9 +195,7 @@ bool FormulaGroupInterpreterOpenCL::interpret(ScDocument& 
rDoc, const ScAddress&
 if(!getenv("SC_GPU")||!ocl_calc.GetOpenclState())
 {
 fprintf(stderr,"ccCPU flow...\n\n");
-ScCompiler aComp(&rDoc, aTmpPos, aCode2);
-aComp.SetGrammar(rDoc.GetGrammar());
-aComp.CompileTokenArray(); // Create RPN token array.
+generateRPNCode(rDoc, aTmpPos, aCode2);
 ScInterpreter aInterpreter(pDest, &rDoc, aTmpPos, aCode2);
 aInterpreter.Interpret();
 pDest->SetResultToken(aInterpreter.GetResultToken().get());
@@ -306,6 +306,8 @@ bool 
FormulaGroupInterpreterGroundwater::interpret(ScDocument& rDoc, const ScAdd
const 
ScFormulaCellGroupRef& xGroup,
ScTokenArray& rCode)
 {
+generateRPNCode(rDoc, rTopPos, rCode);
+
 // Inputs: both of length xGroup->mnLength
 OpCode eOp; // type of operation: ocAverage, ocMax, ocMin
 const double *pArrayToSubtractOneElementFrom;
diff --git a/sc/source/core/tool/formulagroup.cxx 
b/sc/source/core/tool/formulagroup.cxx
index 627c5f5..5a23511 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -96,9 +96,7 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& 
rDoc, const ScAddres
 if (!pDest)
 return false;
 
-ScCompiler aComp(&rDoc, aTmpPos, aCode2);
-aComp.SetGrammar(rDoc.GetGrammar());
-aComp.CompileTokenArray(); // Create RPN token array.
+generateRPNCode(rDoc, aTmpPos, aCode2);
 ScInterpreter aInterpreter(pDest, &rDoc, aTmpPos, aCode2);
 aInterpreter.Interpret();
 aResults.push_back(aInterpreter.GetResultToken()->GetDouble());
@@ -190,6 +188,15 @@ FormulaGroupInterpreter 
*FormulaGroupInterpreter::getStatic()
 return msInstance;
 }
 
+void FormulaGroupInterpreter::generateRPNCode(ScDocument& rDoc, const 
ScAddress& rPos, ScTokenArray& rCode)
+{
+// First, generate an RPN (reverse polish notation) token array.
+ScCompiler aComp(&rDoc, rPos, rCode);
+aComp.SetGrammar(rDoc.GetGrammar());
+aComp.CompileTokenArray(); // Create RPN token array.
+// Now, calling FirstRPN() and NextRPN() will return tokens from the RPN 
token array.
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Whats te alternative for com.sun.star.awt.DisplayAccess ?

2013-07-10 Thread Fernand Vanrie

Stephan,

On 07/04/2013 03:13 PM, Fernand Vanrie wrote:

sinds 4.1
com.sun.star.awt.DisplayAccess

is no longer working
 oDisplayAccess = createUnoService("com.sun.star.awt.DisplayAccess")
 oDisplayAccess is empty 
 oDisplayInfo = oDisplayAccess.getByIndex(0)
 aScreenArea = oDisplayInfo.ScreenArea
 iScreenW =aScreenArea.Width
 iScreenH =aScreenArea.Height

This was always "undocumented" i hope there is a documented 
alternative ?


FWIW, it got removed with 
 
"fdo#46808, remove awt::DisplayAccess service."



i know, filled a issue 

but who knows the alternative, its now impossible to find the screen 
size for machine who runs LO ! when using big dialogs its a absolute 
must have !


using the toolkit

otoolkit = createUnoService("com.sun.star.awt.Toolkit")
 aWorkRect = otoolkit.getWorkArea()

is also a deadlock because the workarea is empty (4 x0)

greetz

Fernand



Stephan

___
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


[Bug 60270] LibreOffice 4.1 most annoying bugs

2013-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=60270

Bug 60270 depends on bug 65338, which changed state.

Bug 65338 Summary: FILESAVE doesn't retain font settings of style: after save 
(as) and again opening of presentation, font is changed
https://bugs.freedesktop.org/show_bug.cgi?id=65338

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

-- 
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: include/xmloff reportdesign/source sc/source xmloff/source

2013-07-10 Thread Luboš Luňák
 include/xmloff/txtimp.hxx |   11 ++
 include/xmloff/txtimppr.hxx   |6 ---
 reportdesign/source/filter/xml/xmlStyleImport.cxx |4 +-
 sc/source/filter/xml/xmlstyli.cxx |2 -
 xmloff/source/core/xmlimp.cxx |1 
 xmloff/source/style/xmlnumi.cxx   |2 -
 xmloff/source/text/txtimp.cxx |   38 --
 xmloff/source/text/txtimppr.cxx   |   16 ++---
 8 files changed, 21 insertions(+), 59 deletions(-)

New commits:
commit a1190c9d2e85c4ccb9db106fe9eb4a48219ac126
Author: Luboš Luňák 
Date:   Wed Jul 10 17:33:15 2013 +0200

fix reading fonts from .odp using style::font-name (fdo#65338)

b40bcde076f9fabf24810d2520e878d604d99637 made writing .odp use 
style:font-name
and office:font-face-decls, instead of using fo:font-family . But the 
reading
back was broken, as xFontDecls is not set
in XMLTextImportPropertyMapper::handleSpecialItem(), so the font data was
ignored. And xFontDecls was not set because it's set while reading
office:font-face-decls, which is at the top of the xml document, but even
before the xml is parsed, the call to SdXMLImport::setTargetDocument() calls
GetShapeImport(), which creates XMLShapeImportHelper instance, which calls
XMLTextImportHelper::CreateParaExtPropMapper(), and 
XMLTextImportPropertyMapper
is created with rImport.GetFontDecls() still being NULL at that point.

And it actually doesn't seem to make any sense to just pass around all
the pointers to XMLFontStylesContext, as eventually it's always just the one
from SvXMLImport. So simply dump all that and make the one single place
that actually uses it (i.e. 
XMLTextImportPropertyMapper::handleSpecialItem())
refer directly to SvXMLImport::GetFontDecls().

Change-Id: Ib1b3e4b1bcaf87ca3e4703d1cc1563ad6b3f9ce7

diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx
index 0fc68b5..c15bd8b 100644
--- a/include/xmloff/txtimp.hxx
+++ b/include/xmloff/txtimp.hxx
@@ -409,9 +409,6 @@ public:
 
 void SetAutoStyles( SvXMLStylesContext *pStyles );
 
-void SetFontDecls( XMLFontStylesContext *pFontDecls );
-const XMLFontStylesContext *GetFontDecls() const;
-
 SvXMLImportContext *CreateTextChildContext(
 SvXMLImport& rImport,
 sal_uInt16 nPrefix, const OUString& rLocalName,
@@ -557,10 +554,10 @@ public:
 GetRubyImportPropertySetMapper() const;
 
 static SvXMLImportPropertyMapper *CreateShapeExtPropMapper(SvXMLImport&);
-static SvXMLImportPropertyMapper *CreateParaExtPropMapper(SvXMLImport&, 
XMLFontStylesContext *pFontDecls = NULL);
-static SvXMLImportPropertyMapper* 
CreateParaDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* pFontDecls = 
NULL);
-static SvXMLImportPropertyMapper* 
CreateTableDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* pFontDecls 
= NULL);
-static SvXMLImportPropertyMapper* 
CreateTableRowDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* 
pFontDecls = NULL);
+static SvXMLImportPropertyMapper *CreateParaExtPropMapper(SvXMLImport&);
+static SvXMLImportPropertyMapper* 
CreateParaDefaultExtPropMapper(SvXMLImport&);
+static SvXMLImportPropertyMapper* 
CreateTableDefaultExtPropMapper(SvXMLImport&);
+static SvXMLImportPropertyMapper* 
CreateTableRowDefaultExtPropMapper(SvXMLImport&);
 
 SvI18NMap& GetRenameMap();
 
diff --git a/include/xmloff/txtimppr.hxx b/include/xmloff/txtimppr.hxx
index ae58bdd..0bae7ed 100644
--- a/include/xmloff/txtimppr.hxx
+++ b/include/xmloff/txtimppr.hxx
@@ -28,7 +28,6 @@ class XMLOFF_DLLPUBLIC XMLTextImportPropertyMapper : public 
SvXMLImportPropertyM
 {
 sal_Int32 nSizeTypeIndex;
 sal_Int32 nWidthTypeIndex;
-SvXMLImportContextRef xFontDecls;
 
 void FontFinished(
 XMLPropertyState *pFontFamilyNameState,
@@ -58,12 +57,9 @@ protected:
 public:
 XMLTextImportPropertyMapper(
 const UniReference< XMLPropertySetMapper >& rMapper,
-SvXMLImport& rImport,
-XMLFontStylesContext *pFontDecls = 0 );
+SvXMLImport& rImport );
 virtual ~XMLTextImportPropertyMapper();
 
-void SetFontDecls( XMLFontStylesContext *pFontDecls );
-
 /** This method is called when all attributes have benn processed. It may 
be used to remove items that are incomplete */
 virtual void finished(
 ::std::vector< XMLPropertyState >& rProperties,
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx 
b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 4b80bcf..a79a9c2 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -213,9 +213,9 @@ UniReference < SvXMLImportPropertyMapper >
 if( !m_xCellImpPropMapper.is() )
 {
 m_xCellImpPropMapper =
- 

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

2013-07-10 Thread Eike Rathke
 sw/source/filter/ww8/docxattributeoutput.cxx |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 0cf9b9ab4bec65055e88517e937d18f751818ff6
Author: Eike Rathke 
Date:   Wed Jul 10 17:16:14 2013 +0200

use LanguageTag to convert

Change-Id: Ib998339f9097cee3185bb7c71a3ebb3e7e282943

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 69c3888..bda961a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1199,9 +1199,7 @@ void DocxAttributeOutput::StartRuby( const SwTxtNode& 
rNode, xub_StrLen nPos, co
 // lid
 lang::Locale aLocale( SwBreakIt::Get()->GetLocale(
 rNode.GetLang( nPos ) ) );
-OUString sLang( aLocale.Language );
-if ( !aLocale.Country.isEmpty() )
-sLang += "-" + aLocale.Country;
+OUString sLang( LanguageTag( aLocale).getBcp47() );
 m_pSerializer->singleElementNS( XML_w, XML_lid,
 FSNS( XML_w, XML_val ),
 OUStringToOString( sLang, RTL_TEXTENCODING_UTF8 ).getStr( ), FSEND 
);
@@ -3624,11 +3622,9 @@ void DocxAttributeOutput::CharLanguage( const 
SvxLanguageItem& rLanguage )
 if (!m_pCharLangAttrList)
 m_pCharLangAttrList = m_pSerializer->createAttrList();
 
-::com::sun::star::lang::Locale xLocale= LanguageTag( 
rLanguage.GetLanguage( ) ).getLocale();
-OString sLanguage = OUStringToOString(xLocale.Language, 
RTL_TEXTENCODING_UTF8);
-OString sCountry = OUStringToOString(xLocale.Country, 
RTL_TEXTENCODING_UTF8);
-
-OString aLanguageCode = sLanguage + "-" + sCountry;
+OString aLanguageCode( OUStringToOString(
+LanguageTag( rLanguage.GetLanguage()).getBcp47(),
+RTL_TEXTENCODING_UTF8));
 
 switch ( rLanguage.Which() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - 2 commits - dtrans/source offapi/com offapi/UnoApi_offapi.mk toolkit/source vcl/aqua vcl/source vcl/unx

2013-07-10 Thread Stephan Bergmann
 dtrans/source/win32/clipb/WinClipboard.cxx  |2 
 dtrans/source/win32/clipb/WinClipboard.hxx  |8 -
 offapi/UnoApi_offapi.mk |5 
 offapi/com/sun/star/datatransfer/clipboard/SystemClipboard.idl  |   37 -
 offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl |   63 
--
 toolkit/source/awt/vclxtoolkit.cxx  |   12 +
 vcl/aqua/source/dtrans/aqua_clipboard.cxx   |2 
 vcl/aqua/source/dtrans/aqua_clipboard.hxx   |6 
 vcl/source/components/dtranscomp.cxx|   12 +
 vcl/source/window/window.cxx|   43 --
 vcl/unx/generic/dtrans/X11_clipboard.cxx|8 -
 vcl/unx/generic/dtrans/X11_clipboard.hxx|   12 +
 12 files changed, 91 insertions(+), 119 deletions(-)

New commits:
commit 60455c972b09ca02b18660c6fb3dafc03b30b2b5
Author: Stephan Bergmann 
Date:   Wed Jul 10 16:40:30 2013 +0200

fdo#66718: Revert "fdo#46808, Adapt SystemClipboard UNO service to new 
style"

This reverts commit 2fe852386c9450014f84910b0a282d684f40b56a, see
 for details.  (On 
master
towards LO 4.2, this will be addressed differently, by modifying
2fe852386c9450014f84910b0a282d684f40b56a instead of reverting it, so this
libreoffice-4-1 commit is not a cherry-pick of any master commit.)

Conflicts:
dtrans/source/win32/clipb/WinClipboard.cxx
offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl
offapi/type_reference/types.rdb
vcl/ios/source/dtrans/ios_clipboard.cxx
vcl/ios/source/dtrans/ios_clipboard.hxx
vcl/source/window/window.cxx

Change-Id: Idb804196bc5693e4e8674d805edefd9d1ae7c178

diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx 
b/dtrans/source/win32/clipb/WinClipboard.cxx
index 5a2c1e9..6f58744 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -59,7 +59,7 @@ namespace
 //
 /*XEventListener,*/
 CWinClipboard::CWinClipboard( const Reference< XComponentContext >& rxContext, 
const OUString& aClipboardName ) :
-WeakComponentImplHelper3< XSystemClipboard, XFlushableClipboard, 
XServiceInfo >( m_aCbListenerMutex ),
+WeakComponentImplHelper4< XClipboardEx, XFlushableClipboard, 
XClipboardNotifier, XServiceInfo >( m_aCbListenerMutex ),
 m_xContext( rxContext )
 {
 m_pImpl.reset( new CWinClipbImpl( aClipboardName, this ) );
diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx 
b/dtrans/source/win32/clipb/WinClipboard.hxx
index 608f9e9..3b36ae7 100644
--- a/dtrans/source/win32/clipb/WinClipboard.hxx
+++ b/dtrans/source/win32/clipb/WinClipboard.hxx
@@ -23,13 +23,12 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -63,9 +62,10 @@ protected:
 
 class CWinClipboard :
 public CWinClipboardDummy,
-public cppu::WeakComponentImplHelper3<
-::com::sun::star::datatransfer::clipboard::XSystemClipboard,
+public cppu::WeakComponentImplHelper4<
+::com::sun::star::datatransfer::clipboard::XClipboardEx, \
 ::com::sun::star::datatransfer::clipboard::XFlushableClipboard,
+::com::sun::star::datatransfer::clipboard::XClipboardNotifier,
 ::com::sun::star::lang::XServiceInfo >
 {
 public:
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index db062c4..63ec527 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -105,9 +105,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/datatransf
DataFormatTranslator \
MimeContentTypeFactory \
 ))
-$(eval $(call 
gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/datatransfer/clipboard,\
-   SystemClipboard \
-))
 $(eval $(call 
gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/deployment,\
ExtensionManager \
PackageInformationProvider \
@@ -711,6 +708,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/configu
 $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/datatransfer/clipboard,\
ClipboardManager \
GenericClipboard \
+   SystemClipboard \
 ))
 $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/datatransfer/dnd,\
OleDragSource \
@@ -2118,7 +2116,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/datatransfer/cli
XClipboardNotifier \
XClipboardOwner \
XFlushableClipboard \
-   XSystemClipboard \
 ))
 $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/datatransfer/dnd,\
DNDConstants \
diff --git a/offapi/com/sun

[Libreoffice-commits] core.git: Branch 'feature/gsoc-impresslayout' - sd/source sd/xml test/user-template

2013-07-10 Thread Vishv Brahmbhatt
 sd/source/core/sdpage.cxx  |   75 
--
 sd/xml/layoutlist.xml  |2 
 test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml |2 
 3 files changed, 66 insertions(+), 13 deletions(-)

New commits:
commit 04f7fafadcda40d35b92aa580984e2bc7da03dbb
Author: Vishv Brahmbhatt 
Date:   Wed Jul 10 20:25:43 2013 +0530

Adding new Slide Layouts Samples to "layoutlist.xml".

Have added new "Slide Layouts" samples.So commented out the code related to 
existing slide layouts in "sdpage.cxx" and also added some code
for XML parsing of the new layouts.

Change-Id: I8f5fdcab5f2eb41e37fa522a7801b388cbfefed5

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 96961a0..051cadc 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1417,34 +1417,83 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, 
int nLayout, Rectangle* rRe
 break;
 
 case 5: // title, 2 shapes above shape
-aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
+// aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
+// aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
+// rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
+
+// aTempPnt = aLayoutPos;
+// aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
+// rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
+
+// aLayoutPos.X() = aTempPnt.X();
+// aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 
1.095);
+// aLayoutSize.Width() = long (aLayoutSize.Width() / 0.488);
+// rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
+// break;
+readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_CONTENT_2CONTENT" 
,"PRESOBJ_OUTLINE1" ,propvalue);
+aLayoutPos.X() = propvalue[0];
+aLayoutPos.Y() = propvalue[1];
+aLayoutSize.Height() = propvalue[2];
+aLayoutSize.Width() = propvalue[3];
 rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
 
-aTempPnt = aLayoutPos;
-aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
+readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_CONTENT_2CONTENT" 
,"PRESOBJ_OUTLINE2" ,propvalue);
+aLayoutPos.X() = propvalue[0];
+aLayoutPos.Y() = propvalue[1];
+aLayoutSize.Height() = propvalue[2];
+aLayoutSize.Width() = propvalue[3];
 rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
 
-aLayoutPos.X() = aTempPnt.X();
-aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
-aLayoutSize.Width() = long (aLayoutSize.Width() / 0.488);
+readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_CONTENT_2CONTENT" 
,"PRESOBJ_OUTLINE3" ,propvalue);
+aLayoutPos.X() = propvalue[0];
+aLayoutPos.Y() = propvalue[1];
+aLayoutSize.Height() = propvalue[2];
+aLayoutSize.Width() = propvalue[3];
 rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
 break;
 case 6: // title, 4 shapes
 {
-sal_uLong nX = long (aLayoutPos.X());
+// sal_uLong nX = long (aLayoutPos.X());
 
-aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-aLayoutSize.Width()  = long (aLayoutSize.Width() * 0.488);
+// aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
+// aLayoutSize.Width()  = long (aLayoutSize.Width() * 0.488);
+// rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
+
+// aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
+// rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
+
+// aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 
1.095);
+// rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
+
+// aLayoutPos.X() = nX;
+// rRectangle[4] = Rectangle (aLayoutPos, aLayoutSize);
+// break;
+readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_4SCONTENT" 
,"PRESOBJ_OUTLINE1" ,propvalue);
+aLayoutPos.X() = propvalue[0];
+aLayoutPos.Y() = propvalue[1];
+aLayoutSize.Height() = propvalue[2];
+aLayoutSize.Width() = propvalue[3];
 rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
 
-aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
+readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_4SCONTENT" 
,"PRESOBJ_OUTLINE2" ,propvalue);
+aLayoutPos.X() = propvalue[0];
+aLayoutPos.Y() = propvalue[1];
+aLayoutSize.Height() = propvalue[2];
+aLayoutSize.Width() = propvalue[3];
 rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
 
-aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
+readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_4SCONTENT" 
,"PRESOBJ_OUTLIN

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

2013-07-10 Thread Eike Rathke
 sc/source/filter/oox/numberformatsbuffer.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 6768d2c7f2cf75c507ec2108cbbb5a8a6cf7fae9
Author: Eike Rathke 
Date:   Wed Jul 10 17:01:49 2013 +0200

use LanguageTag to convert to Locale

Change-Id: Ib178b0da9e27a1a6566418fde94a1e04fd15c1e6

diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx 
b/sc/source/filter/oox/numberformatsbuffer.cxx
index 5b3a98c..e6f3815 100644
--- a/sc/source/filter/oox/numberformatsbuffer.cxx
+++ b/sc/source/filter/oox/numberformatsbuffer.cxx
@@ -2023,12 +2023,7 @@ void NumberFormatsBuffer::insertBuiltinFormats()
 aBuiltinMap[ OUString::createFromAscii( pTable->mpcLocale ) ] = pTable;
 
 // convert locale string to locale struct
-Locale aSysLocale;
-sal_Int32 nDashPos = maLocaleStr.indexOf( '-' );
-if( nDashPos < 0 ) nDashPos = maLocaleStr.getLength();
-aSysLocale.Language = maLocaleStr.copy( 0, nDashPos );
-if( nDashPos + 1 < maLocaleStr.getLength() )
-aSysLocale.Country = maLocaleStr.copy( nDashPos + 1 );
+Locale aSysLocale( LanguageTag( maLocaleStr).getLocale());
 
 // build a list of table pointers for the current locale, with all parent 
tables
 typedef ::std::vector< const BuiltinFormatTable* > BuiltinVec;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/Library_vcl.mk

2013-07-10 Thread Tor Lillqvist
 vcl/Library_vcl.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5b82b87878240e5cb1d3464dd9dd92c65df0465e
Author: Tor Lillqvist 
Date:   Wed Jul 10 17:31:43 2013 +0300

Need the CoreGraphics framework

Change-Id: Ia487c0c3f18ec0e554cf81028c50676ec0e309d9

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index ea35ffc..34c5ce0 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -374,6 +374,7 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,vcl,\
 ))
 else
 $(eval $(call gb_Library_use_system_darwin_frameworks,vcl,\
+   CoreGraphics \
CoreText \
 ))
 endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: helpers/help_hid.lst source/text

2013-07-10 Thread Caolán McNamara
 helpers/help_hid.lst |   22 --
 source/text/shared/optionen/mailmerge.xhp|   20 
 source/text/shared/optionen/serverauthentication.xhp |   23 +--
 3 files changed, 22 insertions(+), 43 deletions(-)

New commits:
commit 15a0007e4fef778ef6613e640868be043424ff4c
Author: Caolán McNamara 
Date:   Wed Jul 10 15:53:05 2013 +0100

update help ids for mail merge settings .ui conversion

Change-Id: I19cc7fa1dd9a24b95ba11e94c816e9e289cbb1f6

diff --git a/helpers/help_hid.lst b/helpers/help_hid.lst
index 5c598f0..d53281b 100644
--- a/helpers/help_hid.lst
+++ b/helpers/help_hid.lst
@@ -2483,7 +2483,6 @@ HID_MM_SELECTDBTABLEDDIALOG_LISTBOX,54964,
 HID_MM_SENDMAILS,54983,
 HID_MM_SENDMAILS_STATUSLB,54984,
 HID_MM_SENDWARNING,54992,
-HID_MM_SERVERAUTHENTICATION,54993,
 HID_MM_TESTACCOUNTSETTINGS,54979,
 HID_MM_TESTACCOUNTSETTINGS_HB,54981,
 HID_MM_TESTACCOUNTSETTINGS_TLB,54980,
@@ -3863,7 +3862,6 @@ HID_TPSHADOW_CTRL,33990,
 HID_TPSIZE_CTRL,33993,
 HID_TP_BUSINESS_DATA,53248,
 HID_TP_CUSTOMPROPERTIES,33392,
-HID_TP_MAILCONFIG,54978,
 HID_TP_PRIVATE_DATA,53247,
 HID_TP_TOX_ENTRY,53240,
 HID_TP_TOX_SELECT,53239,
@@ -7802,7 +7800,6 @@ sw_CheckBox_DLG_MM_MERGE_PAGE_CB_BACKWARDS,898286601,
 sw_CheckBox_DLG_MM_MERGE_PAGE_CB_MATCHCASE,898286602,
 sw_CheckBox_DLG_MM_MERGE_PAGE_CB_WHOLEWORDS,898286600,
 sw_CheckBox_DLG_MM_PREPAREMERGE_PAGE_CB_EXCLUDE,898270216,
-sw_CheckBox_DLG_MM_SERVERAUTHENTICATION_CB_AUTHENTICATION,1427145778,
 sw_CheckBox_DLG_ROW_HEIGHT_CB_AUTOHEIGHT,1425245186,
 sw_CheckBox_TP_CONDCOLL_CB_CONDITION,878445569,
 sw_CheckBox_TP_ENV_ENV_BOX_SEND,909640714,
@@ -7842,8 +7839,6 @@ 
sw_CheckBox_TP_LINENUMBERING_CB_COUNT_EMPTYLINES,878887956,
 sw_CheckBox_TP_LINENUMBERING_CB_COUNT_FRAMELINES,878887957,
 sw_CheckBox_TP_LINENUMBERING_CB_NUMBERING_ON,878887937,
 sw_CheckBox_TP_LINENUMBERING_CB_RESTART_PAGE,878887959,
-sw_CheckBox_TP_MAILCONFIG_CB_REPLYTO,879363078,
-sw_CheckBox_TP_MAILCONFIG_CB_SECURE,879363086,
 sw_CheckBox_TP_OPTCAPTION_PAGE_CB_APPLYBORDER,878937117,
 sw_CheckBox_TP_OPTSHDWCRSR_CB_ALLOW_IN_PROT,878806028,
 sw_CheckBox_TP_OPTSHDWCRSR_CB_BREAK,878806027,
@@ -7913,11 +7908,6 @@ sw_Edit_DLG_MM_OUTPUT_PAGE_ED_SUBJECT,898304035,
 sw_Edit_DLG_MM_QUERY_ED_TEXT,1435469884,
 sw_Edit_DLG_MM_SAVEWARNING_ED_FILENAME,1435453444,
 sw_Edit_DLG_MM_SELECTADDRESSBLOCK_ED_COUNTRY,1435322396,
-sw_Edit_DLG_MM_SERVERAUTHENTICATION_ED_INPASSWORD,1427146816,
-sw_Edit_DLG_MM_SERVERAUTHENTICATION_ED_INUSERNAME,1427146812,
-sw_Edit_DLG_MM_SERVERAUTHENTICATION_ED_OUTPASSWORD,1427146809,
-sw_Edit_DLG_MM_SERVERAUTHENTICATION_ED_SERVER,1427146763,
-sw_Edit_DLG_MM_SERVERAUTHENTICATION_ED_USERNAME,1427146807,
 sw_Edit_DLG_SAVE_LABEL_ED_TYPE,1446643717,
 sw_Edit_TP_BUSINESS_DATA_ED_CITY,879233063,
 sw_Edit_TP_BUSINESS_DATA_ED_COMP,879233079,
@@ -7956,10 +7946,6 @@ sw_Edit_TP_GRF_EXT_ED_CONNECT,878233654,
 sw_Edit_TP_INSERT_SECTION_ED_CONDITION,879052813,
 sw_Edit_TP_INSERT_SECTION_ED_FILE,879052816,
 sw_Edit_TP_LINENUMBERING_ED_DIVISOR,87975,
-sw_Edit_TP_MAILCONFIG_ED_ADDRESS,879364101,
-sw_Edit_TP_MAILCONFIG_ED_DISPLAYNAME,879364099,
-sw_Edit_TP_MAILCONFIG_ED_REPLYTO,879364104,
-sw_Edit_TP_MAILCONFIG_ED_SERVER,879364107,
 sw_Edit_TP_OPTCAPTION_PAGE_EDT_TEXT,878938130,
 sw_Edit_TP_OPTCAPTION_PAGE_ED_NUM_SEP,878938147,
 sw_Edit_TP_OPTCAPTION_PAGE_ED_SEPARATOR,878938137,
@@ -8205,7 +8191,6 @@ 
sw_NumericField_DLG_MM_CREATEADDRESSLIST_NF_SETNO,1435244554,
 sw_NumericField_DLG_MM_OUTPUT_PAGE_NF_FROM,898308112,
 sw_NumericField_DLG_MM_OUTPUT_PAGE_NF_TO,898308114,
 sw_NumericField_DLG_MM_PREPAREMERGE_PAGE_ED_RECORD,898275333,
-sw_NumericField_DLG_MM_SERVERAUTHENTICATION_NF_PORT,1427150861,
 sw_NumericField_DLG_PAGEPREVIEW_PRINTOPTIONS_NF_COLS,1411291141,
 sw_NumericField_DLG_PAGEPREVIEW_PRINTOPTIONS_NF_ROWS,1411291139,
 sw_NumericField_TP_FLD_DOK_ED_DOKDATEOFF,878762041,
@@ -8216,7 +8201,6 @@ sw_NumericField_TP_LAB_PRT_FLD_COL,909727749,
 sw_NumericField_TP_LAB_PRT_FLD_ROW,909727751,
 sw_NumericField_TP_LINENUMBERING_NF_DIV_INTERVAL,878893073,
 sw_NumericField_TP_LINENUMBERING_NF_NUM_INVERVAL,878893067,
-sw_NumericField_TP_MAILCONFIG_NF_PORT,879368205,
 sw_NumericField_TP_NUMPARA_NF_NEW_START,878860294,
 sw_NumericField_TP_NUMPARA_NF_RESTART_PARA,878860299,
 sw_NumericField_TP_SECTION_FTNENDNOTES_FLD_END_OFFSET,879253527,
@@ -8302,8 +8286,6 @@ sw_PushButton_TP_INSERT_SECTION_PB_FILE,879055400,
 sw_PushButton_TP_INSERT_SECTION_PB_PASSWD,879055411,
 sw_PushButton_TP_LAB_FMT_PB_SAVE,909709843,
 sw_PushButton_TP_LAB_PRT_BTN_PRTSETUP,909726216,
-sw_PushButton_TP_MAILCONFIG_PB_AUTHENTICATION,879366672,
-sw_PushButton_TP_MAILCONFIG_PB_TEST,879366677,
 sw_PushButton_TP_OPTCOMPATIBILITY_PAGE_PB_DEFAULT,879350288,
 sw_PushButton_TP_OPTCOMPATIBILITY_PAGE_PB_RESET,879350287,
 sw_PushButton_TP_TOX_ENTRY_PB_ALL_LEVELS,879153732,
@@ -8355,10 +8337,6 @@ sw_RadioButton_DLG_MM_OUTPUT_PAGE_RB_SENDMAIL,898302470,
 sw_RadioButton_DLG_MM_SELECTADDRESSBLOC

[Libreoffice-commits] core.git: helpcontent2

2013-07-10 Thread Caolán McNamara
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8e882c2164380a4e4d3855cd2a8df66d1efbd588
Author: Caolán McNamara 
Date:   Wed Jul 10 15:53:05 2013 +0100

Updated core
Project: help  15a0007e4fef778ef6613e640868be043424ff4c

diff --git a/helpcontent2 b/helpcontent2
index eb64788..15a0007 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit eb647886aa6b6d06d40c342d6509dd890409a410
+Subproject commit 15a0007e4fef778ef6613e640868be043424ff4c
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - download.lst libvisio/libvisio-0.0.29-remove_whitespace.patch.1 libvisio/UnpackedTarball_libvisio.mk

2013-07-10 Thread Fridrich Štrba
 download.lst   |4 +-
 libvisio/UnpackedTarball_libvisio.mk   |4 --
 libvisio/libvisio-0.0.29-remove_whitespace.patch.1 |   32 -
 3 files changed, 2 insertions(+), 38 deletions(-)

New commits:
commit 55be2ef39353de434600fac0611747177ab9da30
Author: Fridrich Å trba 
Date:   Wed Jul 10 15:41:17 2013 +0200

Uploading new libvisio 0.0.30

with huge performance/memory consumption improvements
with NURBS and B-Splines

Change-Id: I5f338d6c70f948dd2192ec7147efdc1bdeef1e05
(cherry picked from commit 0f978a88c618af59e77aeba920093c5e67559c88)
Reviewed-on: https://gerrit.libreoffice.org/4811
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/download.lst b/download.lst
index a5a37ca..3bf7104 100644
--- a/download.lst
+++ b/download.lst
@@ -4,8 +4,8 @@ MSPUB_MD5SUM := 1120705cd0f0d9bd5506360bf57b6c2e
 export MSPUB_TARBALL := libmspub-0.0.6.tar.bz2
 MWAW_MD5SUM := 2289bb137bbba9b473ce60168895c036
 export MWAW_TARBALL := libmwaw-0.1.10.tar.bz2
-VISIO_MD5SUM := ca7a83bb2d81467e1f0222980cc08939
-export VISIO_TARBALL := libvisio-0.0.29.tar.bz2
+VISIO_MD5SUM := 9d9eb3ae6bee763c161228b2b12e25f8
+export VISIO_TARBALL := libvisio-0.0.30.tar.bz2
 
 export AFMS_TARBALL := 
1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz
 export APACHE_COMMONS_CODEC_TARBALL := 
2e482c7567908d334785ce7d69ddfff7-commons-codec-1.6-src.tar.gz
diff --git a/libvisio/UnpackedTarball_libvisio.mk 
b/libvisio/UnpackedTarball_libvisio.mk
index 7e9ce61..e4c0561 100644
--- a/libvisio/UnpackedTarball_libvisio.mk
+++ b/libvisio/UnpackedTarball_libvisio.mk
@@ -11,8 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libvisio))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,libvisio,$(VISIO_TARBALL)))
 
-$(eval $(call gb_UnpackedTarball_add_patches,libvisio,\
-   libvisio/libvisio-0.0.29-remove_whitespace.patch.1 \
-))
-
 # vim: set noet sw=4 ts=4:
diff --git a/libvisio/libvisio-0.0.29-remove_whitespace.patch.1 
b/libvisio/libvisio-0.0.29-remove_whitespace.patch.1
deleted file mode 100644
index 61dc118..000
--- a/libvisio/libvisio-0.0.29-remove_whitespace.patch.1
+++ /dev/null
@@ -1,32 +0,0 @@
 a/src/lib/libvisio_utils.cpp
-+++ b/src/lib/libvisio_utils.cpp
-@@ -123,14 +123,15 @@ double libvisio::readDouble(WPXInputStream *input)
-   return tmpUnion.d;
- }
- 
--void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char 
*base64String, size_t base64StringLength)
-+void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char 
*base64Data, size_t base64DataLength)
- {
-+  std::string base64String((const char*)base64Data, base64DataLength);
-   typedef boost::archive::iterators::transform_width<
-   boost::archive::iterators::binary_from_base64<
--  boost::archive::iterators::remove_whitespace< const char * > >, 8, 6 > 
base64_decoder;
-+  boost::archive::iterators::remove_whitespace< std::string::const_iterator > 
>, 8, 6 > base64_decoder;
- 
-   std::vector buffer;
--  std::copy(base64_decoder(base64String), base64_decoder(base64String + 
base64StringLength), std::back_inserter(buffer));
-+  std::copy(base64_decoder(base64String.begin()), 
base64_decoder(base64String.end()), std::back_inserter(buffer));
- 
-   if (!buffer.empty())
- data.append(&buffer[0], buffer.size());
 a/src/lib/libvisio_utils.h
-+++ b/src/lib/libvisio_utils.h
-@@ -98,7 +98,7 @@ uint64_t readU64(WPXInputStream *input);
- 
- double readDouble(WPXInputStream *input);
- 
--void appendFromBase64(WPXBinaryData &data, const unsigned char *base64String, 
size_t base64StringLength);
-+void appendFromBase64(WPXBinaryData &data, const unsigned char *base64Data, 
size_t base64DataLength);
- 
- const ::WPXString getColourString(const Colour &c);
- 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - download.lst libvisio/libvisio-0.0.29-remove_whitespace.patch.1 libvisio/UnpackedTarball_visio.mk

2013-07-10 Thread Fridrich Štrba
 download.lst   |4 +-
 libvisio/UnpackedTarball_visio.mk  |4 --
 libvisio/libvisio-0.0.29-remove_whitespace.patch.1 |   32 -
 3 files changed, 2 insertions(+), 38 deletions(-)

New commits:
commit a2fcb02c4bc90c1fce99a42c96e02605e9870669
Author: Fridrich Å trba 
Date:   Wed Jul 10 15:41:17 2013 +0200

Uploading new libvisio 0.0.30

with huge performance/memory consumption improvements
with NURBS and B-Splines

(cherry picked from commit 0f978a88c618af59e77aeba920093c5e67559c88)

Conflicts:
download.lst
libvisio/UnpackedTarball_libvisio.mk

Change-Id: I5f338d6c70f948dd2192ec7147efdc1bdeef1e05
Reviewed-on: https://gerrit.libreoffice.org/4812
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/download.lst b/download.lst
index 7961366..7c9dbd5 100644
--- a/download.lst
+++ b/download.lst
@@ -2,8 +2,8 @@ CDR_MD5SUM := d88f9b94df880d2c05be943b000ca112
 export CDR_TARBALL := libcdr-0.0.14.tar.bz2
 MSPUB_MD5SUM := 1120705cd0f0d9bd5506360bf57b6c2e
 export MSPUB_TARBALL := libmspub-0.0.6.tar.bz2
-VISIO_MD5SUM := ca7a83bb2d81467e1f0222980cc08939
-export VISIO_TARBALL := libvisio-0.0.29.tar.bz2
+VISIO_MD5SUM := 9d9eb3ae6bee763c161228b2b12e25f8
+export VISIO_TARBALL := libvisio-0.0.30.tar.bz2
 
 export AFMS_TARBALL := 
1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz
 export APACHE_COMMONS_CODEC_TARBALL := 
af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz
diff --git a/libvisio/UnpackedTarball_visio.mk 
b/libvisio/UnpackedTarball_visio.mk
index eacc570..aa9113b 100644
--- a/libvisio/UnpackedTarball_visio.mk
+++ b/libvisio/UnpackedTarball_visio.mk
@@ -11,8 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,visio))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,visio,$(VISIO_TARBALL)))
 
-$(eval $(call gb_UnpackedTarball_add_patches,visio,\
-   libvisio/libvisio-0.0.29-remove_whitespace.patch.1 \
-))
-
 # vim: set noet sw=4 ts=4:
diff --git a/libvisio/libvisio-0.0.29-remove_whitespace.patch.1 
b/libvisio/libvisio-0.0.29-remove_whitespace.patch.1
deleted file mode 100644
index 61dc118..000
--- a/libvisio/libvisio-0.0.29-remove_whitespace.patch.1
+++ /dev/null
@@ -1,32 +0,0 @@
 a/src/lib/libvisio_utils.cpp
-+++ b/src/lib/libvisio_utils.cpp
-@@ -123,14 +123,15 @@ double libvisio::readDouble(WPXInputStream *input)
-   return tmpUnion.d;
- }
- 
--void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char 
*base64String, size_t base64StringLength)
-+void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char 
*base64Data, size_t base64DataLength)
- {
-+  std::string base64String((const char*)base64Data, base64DataLength);
-   typedef boost::archive::iterators::transform_width<
-   boost::archive::iterators::binary_from_base64<
--  boost::archive::iterators::remove_whitespace< const char * > >, 8, 6 > 
base64_decoder;
-+  boost::archive::iterators::remove_whitespace< std::string::const_iterator > 
>, 8, 6 > base64_decoder;
- 
-   std::vector buffer;
--  std::copy(base64_decoder(base64String), base64_decoder(base64String + 
base64StringLength), std::back_inserter(buffer));
-+  std::copy(base64_decoder(base64String.begin()), 
base64_decoder(base64String.end()), std::back_inserter(buffer));
- 
-   if (!buffer.empty())
- data.append(&buffer[0], buffer.size());
 a/src/lib/libvisio_utils.h
-+++ b/src/lib/libvisio_utils.h
-@@ -98,7 +98,7 @@ uint64_t readU64(WPXInputStream *input);
- 
- double readDouble(WPXInputStream *input);
- 
--void appendFromBase64(WPXBinaryData &data, const unsigned char *base64String, 
size_t base64StringLength);
-+void appendFromBase64(WPXBinaryData &data, const unsigned char *base64Data, 
size_t base64DataLength);
- 
- const ::WPXString getColourString(const Colour &c);
- 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Michael Stahl
 writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf |   12 +
 writerfilter/source/rtftok/rtfdocumentimpl.cxx   |   14 +--
 2 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 91c6f2645a31b2e11b3f948d0df0443b28c8b44f
Author: Michael Stahl 
Date:   Wed Jul 10 12:41:57 2013 +0200

rhbz#960019 : RTF import: handle extra groups in listoverride entry

This crashed because for a single listoverride entry 2 SPRMs were sent
to the domain-mapper, and the second one was empty.

Conflicts:
sw/qa/extras/rtfimport/rtfimport.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx

Change-Id: Ic41ffd8bd4edcff065f49ecef3464efedd909d63
(cherry picked from commit b3944f124ab3dc87332796a46387f837ad29e8d5)
Reviewed-on: https://gerrit.libreoffice.org/4801
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf
new file mode 100644
index 000..869aa33
--- /dev/null
+++ b/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf
@@ -0,0 +1,12 @@
+{\rtf1
+{\*\listtable
+{\list\listtemplateid-723955400\listsimple{\listlevel\leveljc\levelfollow0\levelspace0\levelindent0\levelstartat1{\leveltext\'03\'00.
 ;}{\levelnumbers\'01;}\f0 }{\listname ;}\listid-1155484576}
+}
+{\*\listoverridetable
+{\*\listoverride{\listid-1155484576\listoverridecount0\ls1}}
+}
+\pard\plain 
\pvpg\phpg\posx1143\posy4743\absw9615\absh-2922\dfrmtxtx72\dfrmtxty72\nowrap
+Hello\par
+\pard\plain\par
+}
+
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index f9bcdc1..959833c 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -4258,8 +4258,18 @@ int RTFDocumentImpl::popState()
 // list override table
 else if (aState.nDestinationState == DESTINATION_LISTOVERRIDEENTRY)
 {
-RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes, 
aState.aTableSprms));
-m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num, pValue, false);
+if (m_aStates.top().nDestinationState == DESTINATION_LISTOVERRIDEENTRY)
+{   // copy properties upwards so upper popState inserts it
+m_aStates.top().aTableAttributes = aState.aTableAttributes;
+m_aStates.top().aTableSprms = aState.aTableSprms;
+}
+else
+{
+RTFValue::Pointer_t pValue(new RTFValue(
+aState.aTableAttributes, aState.aTableSprms));
+m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num,
+pValue, false);
+}
 }
 else if (aState.nDestinationState == DESTINATION_LEVELTEXT)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Eike Rathke
 sc/source/core/tool/cellkeytranslator.cxx |   27 ++-
 1 file changed, 18 insertions(+), 9 deletions(-)

New commits:
commit 5c721581403637155b1f91fcdfe5c470d40f697b
Author: Eike Rathke 
Date:   Wed Jul 10 16:25:20 2013 +0200

use language tags in lclMatchKeyword() and lclLocaleCompare()

Change-Id: Ib69f6743de01cfaf65d0b22ee0ac881e8a3e9f4b

diff --git a/sc/source/core/tool/cellkeytranslator.cxx 
b/sc/source/core/tool/cellkeytranslator.cxx
index bce3f28..cb1ab07 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -37,25 +37,33 @@ enum LocaleMatch
 {
 LOCALE_MATCH_NONE = 0,
 LOCALE_MATCH_LANG,
-LOCALE_MATCH_LANG_COUNTRY,
+LOCALE_MATCH_LANG_SCRIPT,
+LOCALE_MATCH_LANG_SCRIPT_COUNTRY,
 LOCALE_MATCH_ALL
 };
 
-static LocaleMatch lclLocaleCompare(const Locale& rLocale1, const Locale& 
rLocale2)
+static LocaleMatch lclLocaleCompare(const Locale& rLocale1, const LanguageTag& 
rLanguageTag2)
 {
 LocaleMatch eMatchLevel = LOCALE_MATCH_NONE;
-if ( rLocale1.Language == rLocale2.Language )
+LanguageTag aLanguageTag1( rLocale1);
+
+if ( aLanguageTag1.getLanguage() == rLanguageTag2.getLanguage() )
 eMatchLevel = LOCALE_MATCH_LANG;
 else
 return eMatchLevel;
 
-if ( rLocale1.Country == rLocale2.Country )
-eMatchLevel = LOCALE_MATCH_LANG_COUNTRY;
+if ( aLanguageTag1.getScript() == rLanguageTag2.getScript() )
+eMatchLevel = LOCALE_MATCH_LANG_SCRIPT;
+else
+return eMatchLevel;
+
+if ( aLanguageTag1.getCountry() == rLanguageTag2.getCountry() )
+eMatchLevel = LOCALE_MATCH_LANG_SCRIPT_COUNTRY;
 else
 return eMatchLevel;
 
-if ( rLocale1.Variant == rLocale2.Variant )
-eMatchLevel = LOCALE_MATCH_ALL;
+if (aLanguageTag1 == rLanguageTag2)
+return LOCALE_MATCH_ALL;
 
 return eMatchLevel;
 }
@@ -87,6 +95,7 @@ static void lclMatchKeyword(String& rName, const 
ScCellKeywordHashMap& aMap,
 return;
 }
 
+LanguageTag aLanguageTag( pLocale ? *pLocale : Locale("","",""));
 const sal_Char* aBestMatchName = itr->second.front().mpName;
 LocaleMatch eLocaleMatchLevel = LOCALE_MATCH_NONE;
 bool bOpCodeMatched = false;
@@ -99,7 +108,7 @@ static void lclMatchKeyword(String& rName, const 
ScCellKeywordHashMap& aMap,
 {
 if ( itrList->meOpCode == eOpCode )
 {
-LocaleMatch eLevel = lclLocaleCompare(itrList->mrLocale, 
*pLocale);
+LocaleMatch eLevel = lclLocaleCompare(itrList->mrLocale, 
aLanguageTag);
 if ( eLevel == LOCALE_MATCH_ALL )
 {
 // Name with matching opcode and locale found.
@@ -130,7 +139,7 @@ static void lclMatchKeyword(String& rName, const 
ScCellKeywordHashMap& aMap,
 }
 else if ( !eOpCode && pLocale )
 {
-LocaleMatch eLevel = lclLocaleCompare(itrList->mrLocale, *pLocale);
+LocaleMatch eLevel = lclLocaleCompare(itrList->mrLocale, 
aLanguageTag);
 if ( eLevel == LOCALE_MATCH_ALL )
 {
 // Name with matching locale preferred.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 99/c3dd415f415126759a6332f78732f886f5a35c

2013-07-10 Thread Caolán McNamara
 99/c3dd415f415126759a6332f78732f886f5a35c |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6568c3a6b49bd08e218328e128347533b1e71f41
Author: Caolán McNamara 
Date:   Wed Jul 10 15:34:27 2013 +0100

Notes added by 'git notes add'

diff --git a/99/c3dd415f415126759a6332f78732f886f5a35c 
b/99/c3dd415f415126759a6332f78732f886f5a35c
new file mode 100644
index 000..31b5a11
--- /dev/null
+++ b/99/c3dd415f415126759a6332f78732f886f5a35c
@@ -0,0 +1 @@
+prefer: 980fe99410477f6a4bd0dc935c9e63fa0aad2b0e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - include/svx svx/source sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk

2013-07-10 Thread Caolán McNamara
 include/svx/ctredlin.hxx   |2 
 include/svx/fmmodel.hxx|4 -
 include/svx/fontlb.hxx |6 +-
 include/svx/svdomeas.hxx   |2 
 svx/source/dialog/ctredlin.cxx |9 +--
 svx/source/dialog/fontlb.cxx   |6 +-
 svx/source/form/fmmodel.cxx|   34 +++---
 svx/source/svdraw/svdomeas.cxx |   39 -
 sw/UIConfig_swriter.mk |2 
 sw/inc/helpid.h|2 
 sw/source/ui/config/config.hrc |1 
 sw/source/ui/config/mailconfigpage.cxx |   14 ++
 sw/uiconfig/swriter/ui/authenticationsettingsdialog.ui |   17 +++
 sw/uiconfig/swriter/ui/mailconfigpage.ui   |4 +
 14 files changed, 67 insertions(+), 75 deletions(-)

New commits:
commit 3c6bd79a2c8d778030562e1cce118c6ca2b6c67c
Author: Caolán McNamara 
Date:   Wed Jul 10 15:25:44 2013 +0100

missing dialog title and some minor tweaks

Change-Id: I79a2db0843597f9f1ba2408792d7bc6994e595a0

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 2bc1905..c528f47 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -61,7 +61,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swriter,\
 $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/abstractdialog \
sw/uiconfig/swriter/ui/asciifilterdialog \
-sw/uiconfig/swriter/ui/authenticationsettingsdialog \
+   sw/uiconfig/swriter/ui/authenticationsettingsdialog \
sw/uiconfig/swriter/ui/autoformattable \
sw/uiconfig/swriter/ui/autotext \
sw/uiconfig/swriter/ui/bibliographyentry \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index ad7704f..bcbc0e9 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -461,7 +461,6 @@
 #define HID_MM_COPYTO   
"SW_HID_MM_COPYTO"
 #define HID_MM_ADDRESSLIST_HB   
"SW_HID_MM_ADDRESSLIST_HB"
 #define HID_MM_ADDRESSLIST_TLB  
"SW_HID_MM_ADDRESSLIST_TLB"
-#define HID_TP_MAILCONFIG   
"SW_HID_TP_MAILCONFIG"
 #define HID_MM_TESTACCOUNTSETTINGS  
"SW_HID_MM_TESTACCOUNTSETTINGS"
 #define HID_MM_TESTACCOUNTSETTINGS_TLB  
"SW_HID_MM_TESTACCOUNTSETTINGS_TLB"
 #define HID_MM_TESTACCOUNTSETTINGS_HB   
"SW_HID_MM_TESTACCOUNTSETTINGS_HB"
@@ -475,7 +474,6 @@
 #define HID_MM_SAVEWARNING  
"SW_HID_MM_SAVEWARNING"
 #define HID_MM_QUERY
"SW_HID_MM_QUERY"
 #define HID_MM_SENDWARNING  
"SW_HID_MM_SENDWARNING"
-#define HID_MM_SERVERAUTHENTICATION 
"SW_HID_MM_SERVERAUTHENTICATION"
 
 #define HID_NID_TBL 
"SW_HID_NID_TBL"
 #define HID_NID_FRM 
"SW_HID_NID_FRM"
diff --git a/sw/source/ui/config/config.hrc b/sw/source/ui/config/config.hrc
index 00d3add..5878018 100644
--- a/sw/source/ui/config/config.hrc
+++ b/sw/source/ui/config/config.hrc
@@ -27,7 +27,6 @@
 
 
 #define DLG_MM_TESTACCOUNTSETTINGS (RC_CONFIG_BEGIN + 19)
-#define DLG_MM_SERVERAUTHENTICATION   (RC_CONFIG_BEGIN + 20)
 
 #define STR_ARR_METRIC  (RC_CONFIG_BEGIN + 26)
 #define CONFIG_ACT_END  STR_ARR_METRIC
diff --git a/sw/source/ui/config/mailconfigpage.cxx 
b/sw/source/ui/config/mailconfigpage.cxx
index 95bc42c..c5379dd 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -87,13 +87,13 @@ class SwAuthenticationSettingsDialog : public SfxModalDialog
 RadioButton* m_pSeparateAuthenticationRB;
 RadioButton* m_pSMTPAfterPOPRB;
 
-FixedInfo*   m_pOutgoingServerFT;
+FixedText*   m_pOutgoingServerFT;
 FixedText*   m_pUserNameFT;
 Edit*m_pUserNameED;
 FixedText*   m_pOutPasswordFT;
 Edit*m_pOutPasswordED;
 
-FixedInfo*   m_pIncomingServerFT;
+FixedText*   m_pIncomingServerFT;
 FixedText*   m_pServerFT;
 Edit*m_pServerED;
 FixedText*   m_pPortFT;
@@ -136,7 +136,6 @@ SwMailConfigPage::SwMailConfigPage( Window* pParent, const 
SfxItemSet& rSet ) :
 get(m_pServerAuthenticationPB,"serverauthentication");
 get(m_pTestPB,"test");
 
-//FreeResource();
 m_pReplyToCB->SetClickHdl(LINK(this, SwMailConfigPage, ReplyToHdl));
 m_pServerAuthenticationPB->SetClickHdl(LINK(this, SwMailConfigPage, 
AuthenticationHdl));
 m_pTestPB->SetClickHdl(LINK(this, SwMailConfigPage, TestHdl));
@@ -422,12 +421,9 @@ SwMailConfigDlg::~SwMailConfigDlg()

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

2013-07-10 Thread Stephan Bergmann
 vcl/source/window/window.cxx |   16 
 1 file changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 9579db98d87c13977bd3a907f3560d564d5d9302
Author: Stephan Bergmann 
Date:   Wed Jul 10 16:17:46 2013 +0200

Revert "fix for fdo#66718, access correct clipboard"

This reverts commit 942501b6e49c6c9e19556d9ec132a458e5fef6c3.  As explained 
at
, a better fix is 
coming,
reverting 2fe852386c9450014f84910b0a282d684f40b56a "fdo#46808, Adapt
SystemClipboard UNO service to new style" completely for LO 4.1 again and 
re-
introducing it in simplified form for LO 4.2.

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 42e7af0..9ad12cf 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -8481,19 +8481,11 @@ uno::Reference< XClipboard > Window::GetClipboard()
 try
 {
 uno::Reference< XComponentContext > xContext( 
comphelper::getProcessComponentContext() );
-Reference xSystemClipboard = 
SystemClipboard::createDefault(xContext);
+Reference xSystemClipboard;
 #if defined(UNX) && !defined(MACOSX)  // unix clipboard needs to be 
initialized
-uno::Reference< XInitialization > xInit = uno::Reference< 
XInitialization >( xSystemClipboard, UNO_QUERY );
-
-if( xInit.is() )
-{
-Sequence< Any > aArgumentList( 3 );
-aArgumentList[ 0 ] = makeAny( 
Application::GetDisplayConnection() );
-aArgumentList[ 1 ] = makeAny( OUString("CLIPBOARD") );
-aArgumentList[ 2 ] = makeAny( vcl::createBmpConverter() );
-
-xInit->initialize( aArgumentList );
-}
+xSystemClipboard = SystemClipboard::createUnix( xContext, 
Application::GetDisplayConnection(), "CLIPBOARD", vcl::createBmpConverter() );
+#else
+xSystemClipboard = SystemClipboard::createDefault(xContext);
 #endif
 mpWindowImpl->mpFrameData->mxClipboard.set( xSystemClipboard, 
UNO_QUERY );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Lionel Elie Mamane
 connectivity/source/parse/sqlflex.l |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 412c67a916af39dbad674d02428463463d3e05b4
Author: Lionel Elie Mamane 
Date:   Wed Jul 10 16:11:17 2013 +0200

fix doubly-defined aEmptyStr with Bison 2.3

Change-Id: Ia54673f3e689a49b3e9101ae4cf5b57f1e68f592

diff --git a/connectivity/source/parse/sqlflex.l 
b/connectivity/source/parse/sqlflex.l
index 7f8cf3e..675c131 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -67,7 +67,7 @@ using namespace connectivity;
 // Erzeugung der Blaetter fuer die Token
 // Blaetter werden generell vom Lexer erzeugt
 
-static ::rtl::OUString aEmptyString;
+static const ::rtl::OUString aEmptyStr;
 
 static sal_Int32gatherString(int delim, sal_Int32 nTyp);
 static sal_Int32gatherName(const sal_Char*);
@@ -79,7 +79,7 @@ OSQLScanner* xxx_pGLOBAL_SQLSCAN = NULL;
 SQLyylval.pParseNode = new OSQLInternalNode(text, token);
 
 #define SQL_NEW_KEYWORD(token)  \
-SQLyylval.pParseNode = new OSQLInternalNode(aEmptyString, 
SQL_NODE_KEYWORD, (token));   return token;
+SQLyylval.pParseNode = new OSQLInternalNode(aEmptyStr, 
SQL_NODE_KEYWORD, (token));   return token;
 
 #define SQL_NEW_INTNUM  
SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8),
 SQL_NODE_INTNUM); return SQL_TOKEN_INTNUM;
 #define SQL_NEW_APPROXNUM   
SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8),
 SQL_NODE_APPROXNUM); return SQL_TOKEN_APPROXNUM;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source

2013-07-10 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |5 +++
 sfx2/source/dialog/dinfdlg.cxx |   54 ++---
 2 files changed, 45 insertions(+), 14 deletions(-)

New commits:
commit 0677b349740393c6167a9f10f29c50fab163
Author: Cao Cuong Ngo 
Date:   Wed Jul 10 16:11:04 2013 +0200

Cmis update properties

Change-Id: I13db07386f766019701ad9348988dcede718660c

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index d389170..43b20ad 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -584,6 +584,11 @@ public:
 
 struct CmisPropertyLine
 {
+OUString  m_sId;
+bool  m_bUpdatable;
+bool  m_bRequired;
+bool  m_bMultiValued;
+bool  m_bOpenChoice;
 FixedText m_aName;
 FixedText m_aType;
 CmisPropertiesEditm_aValueEdit;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 2bf7a04..a79f5f0 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -576,21 +576,33 @@ std::vector< CmisProperty* > 
SfxDocumentInfoItem::GetCmisProperties() const
 
 uno::Sequence< document::CmisProperty > 
SfxDocumentInfoItem::GetCmisPropertiesSeq() const
 {
-Sequence< document::CmisProperty > aPropertiesSeq( 
m_aCmisProperties.size() );
+
 sal_Int32 i = 0;
 std::vector< CmisProperty* >::const_iterator pIter;
+sal_Int32 updatableCount = 0, nCount = 0;
+
+for ( pIter = m_aCmisProperties.begin();
+pIter != m_aCmisProperties.end(); ++pIter, ++i )
+{
+if ( ( *pIter )->m_bUpdatable ) updatableCount++;
+}
+Sequence< document::CmisProperty > aPropertiesSeq( updatableCount );
+
 for ( pIter = m_aCmisProperties.begin();
-pIter != m_aCmisProperties.end(); ++pIter, ++i )
+pIter != m_aCmisProperties.end(); ++pIter, ++i )
+if (( *pIter )->m_bUpdatable )
 {
 CmisProperty* aProp = *pIter;
-aPropertiesSeq[i].Id = aProp->m_sId;
-aPropertiesSeq[i].Name = aProp->m_sName;
-aPropertiesSeq[i].Updatable = aProp->m_bUpdatable;
-aPropertiesSeq[i].Required = aProp->m_bRequired;
-aPropertiesSeq[i].MultiValued = aProp->m_bMultiValued;
-aPropertiesSeq[i].OpenChoice = aProp->m_bOpenChoice;
-aPropertiesSeq[i].Choices = aProp->m_aChoices;
-aPropertiesSeq[i].Value = aProp->m_aValue;
+aPropertiesSeq[nCount].Id = aProp->m_sId;
+aPropertiesSeq[nCount].Name = aProp->m_sName;
+aPropertiesSeq[nCount].Updatable = aProp->m_bUpdatable;
+aPropertiesSeq[nCount].Required = aProp->m_bRequired;
+aPropertiesSeq[nCount].MultiValued = aProp->m_bMultiValued;
+aPropertiesSeq[nCount].OpenChoice = aProp->m_bOpenChoice;
+aPropertiesSeq[nCount].Choices = aProp->m_aChoices;
+aPropertiesSeq[nCount].Value = aProp->m_aValue;
+
+nCount++;
 }
 
 return aPropertiesSeq;
@@ -2265,6 +2277,7 @@ void CmisPropertiesYesNoButton::Resize()
 
 // struct CmisPropertyLine -
 CmisPropertyLine::CmisPropertyLine( Window* pParent ) :
+m_sId   ( ),
 m_aName ( pParent, SfxResId( SFX_CMIS_PROPERTY_NAME ) ),
 m_aType ( pParent, SfxResId( SFX_CMIS_PROPERTY_TYPE ) ),
 m_aValueEdit( pParent, SfxResId( SFX_CMIS_ED_PROPERTY_VALUE ), this ),
@@ -2463,12 +2476,19 @@ void CmisPropertiesWindow::updateLineWidth()
 }
 }
 
-void CmisPropertiesWindow::AddLine( const OUString& /*sId*/, const OUString& 
sName,
-const bool bUpdatable, const bool 
/*bRequired*/,
-const bool /*bMultiValued*/, const bool 
/*bOpenChoice*/,
+void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
+const bool bUpdatable, const bool 
bRequired,
+const bool bMultiValued, const bool 
bOpenChoice,
 Any& /*aChoices*/, Any& rAny )
 {
 CmisPropertyLine* pNewLine = new CmisPropertyLine( this );
+
+pNewLine->m_sId = sId;
+pNewLine->m_bUpdatable = bUpdatable;
+pNewLine->m_bRequired = bRequired;
+pNewLine->m_bMultiValued = bMultiValued;
+pNewLine->m_bOpenChoice = bOpenChoice;
+
 pNewLine->m_aValueEdit.SetLoseFocusHdl( LINK( this, CmisPropertiesWindow, 
EditLoseFocusHdl ) );
 
 pNewLine->m_aName.SetAccessibleName(m_aName.GetAccessibleName());
@@ -2631,6 +2651,12 @@ Sequence< document::CmisProperty > 
CmisPropertiesWindow::GetCmisProperties() con
 {
 CmisPropertyLine* pLine = *pIter;
 
+aPropertiesSeq[i].Id = pLine->m_sId;
+aPropertiesSeq[i].Updatable = pLine->m_bUpdatable;
+aPropertiesSeq[i].Required = pLine->m_bRequired;
+aPropertiesSeq[i].OpenChoice = pLine->

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

2013-07-10 Thread Faisal M . Al-Otaibi
 sd/source/ui/view/drtxtob1.cxx |   16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit b41378eae135982acdc910af3ff9987348f00fba
Author: Faisal M. Al-Otaibi 
Date:   Fri Jun 28 10:54:55 2013 +0200

fix crash when use increase font on table in impress

Change-Id: Id6c8cac4543d97657cb66b979f5dc4b5f903473a
Reviewed-on: https://gerrit.libreoffice.org/4797
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 572fbed..6ad4cf1 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -328,15 +328,17 @@ void TextObjectBar::Execute( SfxRequest &rReq )
 if( pFontList )
 {
 FuText::ChangeFontSize( nSlot == SID_GROW_FONT_SIZE, pOLV, 
pFontList, mpView );
+if( pOLV )
+{
+SfxItemSet aSet( pOLV->GetEditView().GetAttribs() );
+SfxItemSet aNewAttrs 
(pOLV->GetEditView().GetEmptyItemSet() );
 
-SfxItemSet aSet( pOLV->GetEditView().GetAttribs() );
-SfxItemSet aNewAttrs (pOLV->GetEditView().GetEmptyItemSet() );
-
-aNewAttrs.Put( aSet.Get( EE_CHAR_FONTHEIGHT ), 
EE_CHAR_FONTHEIGHT );
-aNewAttrs.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CJK ), 
EE_CHAR_FONTHEIGHT_CJK );
-aNewAttrs.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CTL ), 
EE_CHAR_FONTHEIGHT_CTL );
+aNewAttrs.Put( aSet.Get( EE_CHAR_FONTHEIGHT ), 
EE_CHAR_FONTHEIGHT );
+aNewAttrs.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CJK ), 
EE_CHAR_FONTHEIGHT_CJK );
+aNewAttrs.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CTL ), 
EE_CHAR_FONTHEIGHT_CTL );
 
-mpView->SetAttributes( aNewAttrs );
+mpView->SetAttributes( aNewAttrs );
+}
 Invalidate();
 // to refresh preview (in outline mode), slot has to be 
invalidated:
 mpViewShell->GetViewFrame()->GetBindings().Invalidate( 
SID_PREVIEW_STATE, sal_True, sal_False );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Michael Stahl
 sd/source/ui/slidesorter/controller/SlsListener.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit d9b36d3623ce5d88bfaca7a31426fa126a6ce4ac
Author: Michael Stahl 
Date:   Wed Jul 10 15:43:42 2013 +0200

rhbz#965646: sd: unregister slide sorter listener to avoid crashes

sd::slidesorter::controller::Listener::Notify(): when the ~SdDrawDocument
sends a HINT_MODELCLEARED, unregister since the document doesn't exist
any more.  This should hopefully avoids accessing a SfxViewShell
instance that has apparently already been deleted somewhere in one of
the listeners.

Change-Id: I0ba9a58d77741a52b652a6c55c2327db80859011
(cherry picked from commit a9e0c222f504104124485ef4684ce6f79d3dee52)
Reviewed-on: https://gerrit.libreoffice.org/4813
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx 
b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 17a8a14..e85a6c8 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -304,6 +304,13 @@ void Listener::Notify (
 SdrHint& rSdrHint (*PTR_CAST(SdrHint,&rHint));
 switch (rSdrHint.GetKind())
 {
+case HINT_MODELCLEARED:
+if (&rBroadcaster == mrSlideSorter.GetModel().GetDocument())
+{   // rhbz#965646 stop listening to dying document
+EndListening(rBroadcaster);
+return;
+}
+break;
 case HINT_PAGEORDERCHG:
 if (&rBroadcaster == mrSlideSorter.GetModel().GetDocument())
 HandleModelChange(rSdrHint.GetPage());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Miklos Vajna
 sw/qa/extras/rtfexport/data/fdo66682.rtf   |   25 +
 sw/qa/extras/rtfexport/rtfexport.cxx   |   21 +
 sw/source/filter/ww8/rtfattributeoutput.cxx|2 +-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |7 +--
 4 files changed, 52 insertions(+), 3 deletions(-)

New commits:
commit ddf26c41c8af7d8b50784ee01df6f8319f9c0bb5
Author: Miklos Vajna 
Date:   Wed Jul 10 12:12:55 2013 +0200

fdo#66682 RTF export: fix level text of SVX_NUM_ARABIC

Even if level text is not ASCII, we should just write the placeholder
values (0x00, 0x01, etc.) in a hex encoded form, without Unicode.
Regression from 07d01742c69f1c0335bc7e1b57abd8341ce255e7.

Also, fix the import side, so the previous bad output now looks bad in
Writer as well.

(cherry picked from commit 8422d1f5042de08e8b090a907889b41e133bda40)

Conflicts:
sw/qa/extras/rtfexport/rtfexport.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx

Change-Id: I2f93892006c07eec243ec7dfcb23372d243a2db4
Reviewed-on: https://gerrit.libreoffice.org/4809
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/sw/qa/extras/rtfexport/data/fdo66682.rtf 
b/sw/qa/extras/rtfexport/data/fdo66682.rtf
new file mode 100644
index 000..76128a2
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/fdo66682.rtf
@@ -0,0 +1,25 @@
+{\rtf1\ansi\deff4\adeflang1025
+{\*\listtable
+{\list\listtemplateid1
+{\listlevel\levelnfc0\leveljc0\levelstartat1\levelfollow0
+{\leveltext \'03 \'00 ;}
+{\levelnumbers\'02;}
+\fi-360\li720}
+\listid1}
+}
+{\listoverridetable
+{\listoverride\listid1\listoverridecount0\ls1}
+}
+\pard\plain \s0\sb0\sa113\nowidctlpar
+\ilvl0\ls1 \li720\ri0\lin720\rin0\fi-360
+{\rtlch \ltrch\loch
+This should be 1}
+\par \pard\plain \s0\sb0\sa113\nowidctlpar
+\ilvl0\ls1 \li720\ri0\lin720\rin0\fi-360
+{\rtlch \ltrch\loch
+and 2}
+\par \pard\plain \s0\sb0\sa113\nowidctlpar
+\ilvl0\ls1 \li720\ri0\lin720\rin0\fi-360\sb0\sa113
+{\rtlch \ltrch\loch
+and 3}
+\par }
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx 
b/sw/qa/extras/rtfexport/rtfexport.cxx
index 0605b82..fafa4f1 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -64,6 +64,7 @@ public:
 void testHyperlink();
 void testTextFrameBorders();
 void testTextframeGradient();
+void testFdo66682();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -117,6 +118,7 @@ void Test::run()
 {"hyperlink.rtf", &Test::testHyperlink},
 {"textframe-borders.rtf", &Test::testTextFrameBorders},
 {"textframe-gradient.rtf", &Test::testTextframeGradient},
+{"fdo66682.rtf", &Test::testFdo66682},
 };
 // Don't test the first import of these, for some reason those tests fail
 const char* aBlacklist[] = {
@@ -584,6 +586,25 @@ void Test::testTextframeGradient()
 CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_AXIAL, aGradient.Style);
 }
 
+void Test::testFdo66682()
+{
+uno::Reference 
xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+uno::Reference 
xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+uno::Sequence aProps;
+xLevels->getByIndex(0) >>= aProps; // 1st level
+
+OUString aSuffix;
+for (int i = 0; i < aProps.getLength(); ++i)
+{
+const beans::PropertyValue& rProp = aProps[i];
+
+if (rProp.Name == "Suffix")
+aSuffix = rProp.Value.get();
+}
+// Suffix was '\0' instead of ' '.
+CPPUNIT_ASSERT_EQUAL(OUString(" "), aSuffix);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index d726cb5..589f8a9 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1397,7 +1397,7 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
 else
 {
 m_rExport.Strm() << "\\'" << msfilter::rtfutil::OutHex( 
rNumberingString.Len(), 2 ).getStr();
-m_rExport.Strm() << msfilter::rtfutil::OutString( rNumberingString, 
m_rExport.eDefaultEncoding ).getStr();
+m_rExport.Strm() << msfilter::rtfutil::OutString( rNumberingString, 
m_rExport.eDefaultEncoding, /*bUnicode =*/ false ).getStr();
 }
 
 m_rExport.Strm() << ";}";
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 12fb5ec..8bf0e06 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1691,7 +1691,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword 
nKeyword)
 int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
 {
 if (nKeyword != RTF_HEXCHAR)
-checkUnicode();
+checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true);
+else
+checkUnicode(/*bUni

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

2013-07-10 Thread Eike Rathke
 i18nlangtag/source/languagetag/languagetag.cxx |   21 +
 include/i18nlangtag/languagetag.hxx|   12 ++--
 xmloff/source/core/xmlexp.cxx  |8 
 xmloff/source/style/chrlohdl.cxx   |   19 +++
 4 files changed, 34 insertions(+), 26 deletions(-)

New commits:
commit 1e744d5d9de568aeef6794365dc6f2bf84537ddb
Author: Eike Rathke 
Date:   Wed Jul 10 15:57:25 2013 +0200

changed getIsoLanguageCountry() to getIsoLanguageScriptCountry()

And don't write ODF *:script if *:language is not written either.

Change-Id: If6d49cc6fbb8d566cc59edf35ed7991d57d941c0

diff --git a/i18nlangtag/source/languagetag/languagetag.cxx 
b/i18nlangtag/source/languagetag/languagetag.cxx
index 7d47580..13e25f8 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -877,17 +877,22 @@ LanguageType LanguageTag::getLanguageType( bool 
bResolveSystem ) const
 }
 
 
-void LanguageTag::getIsoLanguageCountry( OUString& rLanguage, OUString& 
rCountry ) const
+void LanguageTag::getIsoLanguageScriptCountry( OUString& rLanguage, OUString& 
rScript, OUString& rCountry ) const
 {
-if (!isIsoLocale())
+// Calling isIsoODF() first is a predicate for getLanguage(), getScript()
+// and getCountry() to work correctly in this context.
+if (isIsoODF())
 {
-rLanguage = OUString();
-rCountry = OUString();
-return;
+rLanguage = getLanguage();
+rScript   = getScript();
+rCountry  = getCountry();
+}
+else
+{
+rLanguage = (isIsoLanguage( getLanguage()) ? getLanguage() : 
OUString());
+rScript   = (isIsoScript(   getScript())   ? getScript()   : 
OUString());
+rCountry  = (isIsoCountry(  getCountry())  ? getCountry()  : 
OUString());
 }
-// After isIsoLocale() it's safe to call getLanguage() for ISO code.
-rLanguage = getLanguage();
-rCountry = getCountry();
 }
 
 
diff --git a/include/i18nlangtag/languagetag.hxx 
b/include/i18nlangtag/languagetag.hxx
index 8f23098..d779f9d 100644
--- a/include/i18nlangtag/languagetag.hxx
+++ b/include/i18nlangtag/languagetag.hxx
@@ -128,20 +128,20 @@ public:
  */
 LanguageTypegetLanguageType( bool bResolveSystem = 
true ) const;
 
-/** Obtain ISO strings for language and country.
+/** Obtain ISO strings for language, script and country.
 
-This is a convenience method for places that so far use only language 
and
-country to replace the MsLangId::convert...IsoNames...() calls. Avoid
-use in new code.
+This is a convenience method for ODF export places only. Avoid use in
+other code.
 
 ATTENTION! May return empty strings if the language tag is not
 expressable in valid ISO codes!
 
-@see isIsoLocale()
+@see isIsoODF()
 
 Always resolves an empty tag to the system locale.
  */
-voidgetIsoLanguageCountry( OUString& 
rLanguage, OUString& rCountry ) const;
+voidgetIsoLanguageScriptCountry( OUString& 
rLanguage,
+ OUString& 
rScript, OUString& rCountry ) const;
 
 /** Get ISO 639 language code, or BCP 47 language.
 
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 357999b..3c22c8f 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1113,13 +1113,13 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 
nPrefix, sal_uInt16 nPref
 // for consumers not handling *:rfc-language-tag, ensuring that only
 // valid ISO codes are stored. Here the bWriteEmpty parameter has no
 // meaning.
-OUString aLanguage, aCountry;
-rLanguageTag.getIsoLanguageCountry( aLanguage, aCountry);
+OUString aLanguage, aScript, aCountry;
+rLanguageTag.getIsoLanguageScriptCountry( aLanguage, aScript, 
aCountry);
 if (!aLanguage.isEmpty())
 {
 AddAttribute( nPrefix, eLanguage, aLanguage);
-if (rLanguageTag.hasScript())
-AddAttribute( nPrefix, eScript, rLanguageTag.getScript());
+if (!aScript.isEmpty())
+AddAttribute( nPrefix, eScript, aScript);
 if (!aCountry.isEmpty())
 AddAttribute( nPrefix, eCountry, aCountry);
 }
diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx
index 4a0ee09..d23159d 100644
--- a/xmloff/source/style/chrlohdl.cxx
+++ b/xmloff/source/style/chrlohdl.cxx
@@ -115,8 +115,8 @@ sal_Bool XMLCharLanguageHdl::exportXML( OUString& 
rStrExpValue, const uno::Any&
 else
 {
 LanguageTag aLanguageTag( aLocale);
-OUString aCountry;
-aLanguageTag.getIsoLanguageCountry( rStrExpValue, aCountry);
+OUString aScript, aCountry;
+  

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

2013-07-10 Thread Michael Stahl
 sd/source/ui/slidesorter/controller/SlsListener.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit a9e0c222f504104124485ef4684ce6f79d3dee52
Author: Michael Stahl 
Date:   Wed Jul 10 15:43:42 2013 +0200

rhbz#965646: sd: unregister slide sorter listener to avoid crashes

sd::slidesorter::controller::Listener::Notify(): when the ~SdDrawDocument
sends a HINT_MODELCLEARED, unregister since the document doesn't exist
any more.  This should hopefully avoids accessing a SfxViewShell
instance that has apparently already been deleted somewhere in one of
the listeners.

Change-Id: I0ba9a58d77741a52b652a6c55c2327db80859011

diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx 
b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 17a8a14..e85a6c8 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -304,6 +304,13 @@ void Listener::Notify (
 SdrHint& rSdrHint (*PTR_CAST(SdrHint,&rHint));
 switch (rSdrHint.GetKind())
 {
+case HINT_MODELCLEARED:
+if (&rBroadcaster == mrSlideSorter.GetModel().GetDocument())
+{   // rhbz#965646 stop listening to dying document
+EndListening(rBroadcaster);
+return;
+}
+break;
 case HINT_PAGEORDERCHG:
 if (&rBroadcaster == mrSlideSorter.GetModel().GetDocument())
 HandleModelChange(rSdrHint.GetPage());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libvisio.git: Changes to 'refs/tags/libvisio-0.0.30'

2013-07-10 Thread Fridrich Štrba
Tag 'libvisio-0.0.30' created by Fridrich Å trba  at 
2013-07-10 14:43 -0700

Tagging libvisio 0.0.30 release

Changes since libvisio-0.0.29-14:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: download.lst libvisio/libvisio-0.0.29-remove_whitespace.patch.1 libvisio/UnpackedTarball_libvisio.mk

2013-07-10 Thread Fridrich Štrba
 download.lst   |4 +-
 libvisio/UnpackedTarball_libvisio.mk   |4 --
 libvisio/libvisio-0.0.29-remove_whitespace.patch.1 |   32 -
 3 files changed, 2 insertions(+), 38 deletions(-)

New commits:
commit 0f978a88c618af59e77aeba920093c5e67559c88
Author: Fridrich Å trba 
Date:   Wed Jul 10 15:41:17 2013 +0200

Uploading new libvisio 0.0.30

with huge performance/memory consumption improvements
with NURBS and B-Splines

Change-Id: I5f338d6c70f948dd2192ec7147efdc1bdeef1e05

diff --git a/download.lst b/download.lst
index c035773..976e02b 100644
--- a/download.lst
+++ b/download.lst
@@ -4,8 +4,8 @@ MSPUB_MD5SUM := 1120705cd0f0d9bd5506360bf57b6c2e
 export MSPUB_TARBALL := libmspub-0.0.6.tar.bz2
 MWAW_MD5SUM := 2289bb137bbba9b473ce60168895c036
 export MWAW_TARBALL := libmwaw-0.1.10.tar.bz2
-VISIO_MD5SUM := ca7a83bb2d81467e1f0222980cc08939
-export VISIO_TARBALL := libvisio-0.0.29.tar.bz2
+VISIO_MD5SUM := 9d9eb3ae6bee763c161228b2b12e25f8
+export VISIO_TARBALL := libvisio-0.0.30.tar.bz2
 
 export AFMS_TARBALL := 
1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz
 export APACHE_COMMONS_CODEC_TARBALL := 
2e482c7567908d334785ce7d69ddfff7-commons-codec-1.6-src.tar.gz
diff --git a/libvisio/UnpackedTarball_libvisio.mk 
b/libvisio/UnpackedTarball_libvisio.mk
index 7e9ce61..e4c0561 100644
--- a/libvisio/UnpackedTarball_libvisio.mk
+++ b/libvisio/UnpackedTarball_libvisio.mk
@@ -11,8 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libvisio))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,libvisio,$(VISIO_TARBALL)))
 
-$(eval $(call gb_UnpackedTarball_add_patches,libvisio,\
-   libvisio/libvisio-0.0.29-remove_whitespace.patch.1 \
-))
-
 # vim: set noet sw=4 ts=4:
diff --git a/libvisio/libvisio-0.0.29-remove_whitespace.patch.1 
b/libvisio/libvisio-0.0.29-remove_whitespace.patch.1
deleted file mode 100644
index 61dc118..000
--- a/libvisio/libvisio-0.0.29-remove_whitespace.patch.1
+++ /dev/null
@@ -1,32 +0,0 @@
 a/src/lib/libvisio_utils.cpp
-+++ b/src/lib/libvisio_utils.cpp
-@@ -123,14 +123,15 @@ double libvisio::readDouble(WPXInputStream *input)
-   return tmpUnion.d;
- }
- 
--void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char 
*base64String, size_t base64StringLength)
-+void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char 
*base64Data, size_t base64DataLength)
- {
-+  std::string base64String((const char*)base64Data, base64DataLength);
-   typedef boost::archive::iterators::transform_width<
-   boost::archive::iterators::binary_from_base64<
--  boost::archive::iterators::remove_whitespace< const char * > >, 8, 6 > 
base64_decoder;
-+  boost::archive::iterators::remove_whitespace< std::string::const_iterator > 
>, 8, 6 > base64_decoder;
- 
-   std::vector buffer;
--  std::copy(base64_decoder(base64String), base64_decoder(base64String + 
base64StringLength), std::back_inserter(buffer));
-+  std::copy(base64_decoder(base64String.begin()), 
base64_decoder(base64String.end()), std::back_inserter(buffer));
- 
-   if (!buffer.empty())
- data.append(&buffer[0], buffer.size());
 a/src/lib/libvisio_utils.h
-+++ b/src/lib/libvisio_utils.h
-@@ -98,7 +98,7 @@ uint64_t readU64(WPXInputStream *input);
- 
- double readDouble(WPXInputStream *input);
- 
--void appendFromBase64(WPXBinaryData &data, const unsigned char *base64String, 
size_t base64StringLength);
-+void appendFromBase64(WPXBinaryData &data, const unsigned char *base64Data, 
size_t base64DataLength);
- 
- const ::WPXString getColourString(const Colour &c);
- 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Michael Stahl
 writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf |   12 +
 writerfilter/source/rtftok/rtfdocumentimpl.cxx   |   14 +--
 2 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit f773ba156d9ec25d6d612bb084b914b24858747e
Author: Michael Stahl 
Date:   Wed Jul 10 12:41:57 2013 +0200

rhbz#960019 : RTF import: handle extra groups in listoverride entry

This crashed because for a single listoverride entry 2 SPRMs were sent
to the domain-mapper, and the second one was empty.

(cherry picked from commit b3944f124ab3dc87332796a46387f837ad29e8d5)

Change-Id: Ic41ffd8bd4edcff065f49ecef3464efedd909d63
Reviewed-on: https://gerrit.libreoffice.org/4805
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf
new file mode 100644
index 000..869aa33
--- /dev/null
+++ b/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf
@@ -0,0 +1,12 @@
+{\rtf1
+{\*\listtable
+{\list\listtemplateid-723955400\listsimple{\listlevel\leveljc\levelfollow0\levelspace0\levelindent0\levelstartat1{\leveltext\'03\'00.
 ;}{\levelnumbers\'01;}\f0 }{\listname ;}\listid-1155484576}
+}
+{\*\listoverridetable
+{\*\listoverride{\listid-1155484576\listoverridecount0\ls1}}
+}
+\pard\plain 
\pvpg\phpg\posx1143\posy4743\absw9615\absh-2922\dfrmtxtx72\dfrmtxty72\nowrap
+Hello\par
+\pard\plain\par
+}
+
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 4b64cc1..12fb5ec 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -4518,8 +4518,18 @@ int RTFDocumentImpl::popState()
 // list override table
 case DESTINATION_LISTOVERRIDEENTRY:
 {
-RTFValue::Pointer_t pValue(new 
RTFValue(aState.aTableAttributes, aState.aTableSprms));
-m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num, pValue, 
false);
+if (m_aStates.top().nDestinationState == 
DESTINATION_LISTOVERRIDEENTRY)
+{   // copy properties upwards so upper popState inserts it
+m_aStates.top().aTableAttributes = aState.aTableAttributes;
+m_aStates.top().aTableSprms = aState.aTableSprms;
+}
+else
+{
+RTFValue::Pointer_t pValue(new RTFValue(
+aState.aTableAttributes, aState.aTableSprms));
+m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num,
+pValue, false);
+}
 }
 break;
 case DESTINATION_LEVELTEXT:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Noel Power
 sc/source/core/tool/interpr4.cxx |   13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 35f9cd513d6dd796a5bc54c51df3961a674addcb
Author: Noel Power 
Date:   Wed Jul 10 14:19:05 2013 +0100

additionally handle string types for ScMacro dealing with 
svExternalSingleRef

Change-Id: Ib0e5077f58fa8d3918433e18e8815fd13fdc6391

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 72563fd..8688b12 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3213,15 +3213,14 @@ void ScInterpreter::ScMacro()
 {
 ScExternalRefCache::TokenRef pToken;
 PopExternalSingleRef(pToken);
-if ( nGlobalError )
-{
-SetError( errIllegalArgument);
-bOk = false;
-}
+if ( pToken->GetType() == svString )
+pPar->PutString( pToken->GetString() );
+else if ( pToken->GetType() == svDouble )
+pPar->PutDouble( pToken->GetDouble() );
 else
 {
-pPar->PutDouble( pToken->GetDouble() );
-bOk = true;
+SetError( errIllegalArgument );
+bOk = false;
 }
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'feature/firebird-sdbc2'

2013-07-10 Thread Andrzej J . R . Hunt
New branch 'feature/firebird-sdbc2' available with the following commits:
commit 9d85403853ed7edc52387295f1645aa88ea4ab06
Author: Andrzej J.R. Hunt 
Date:   Mon Jul 8 09:39:55 2013 +0100

Add embedded firebird loading code, set as default db.

Change-Id: I993d7d7bacec710bb57d9e8f91d3cd01b0fbf616

commit be6337750eca5871b0848585d39ec5dc287db252
Author: Andrzej J.R. Hunt 
Date:   Sun Jul 7 10:51:55 2013 +0100

Fix firebird installation (windows) + driver compilation fixes.

Change-Id: I253a2770c951a984bd50c906b0e84feeb8d105d9

commit 5ac592352812f556ac82400459aa5e1370aa13ee
Author: Andrzej J.R. Hunt 
Date:   Fri Jul 5 14:30:45 2013 +0100

Patch Firebird to build on cygwin/msvc.

Change-Id: I56669eb98cdd3c6fab756898664751c349e8988e

commit 52f6819e891243b5f6348f5a41285e39e66751de
Author: Andrzej J.R. Hunt 
Date:   Fri Jun 21 21:23:59 2013 +0100

Patch Firebird to use LO icu.

Previously Firebird built it's bundled icu leading to extra libraries
and path issues.

Change-Id: Ib27e364da3b7e5bc56c7a784c0525426d635bf16

commit e99a271a8cc70aaa56e986c609af8f0daf477484
Author: Andrzej J.R. Hunt 
Date:   Thu Jun 20 15:19:06 2013 +0100

Setup Firebird installation / scp2 details.

Change-Id: I03393b08db5878b099a2e71b9b515b707a386e3f

commit 9fbf2396742e85cf49be2efe80a25f1c067b
Author: Andrzej J.R. Hunt 
Date:   Sun Jun 16 20:44:50 2013 +0100

Fix checks for system libatomic_ops.

Change-Id: Idb31e6be567e8530062517e7842cdfd8b84c7276

commit 1cadc97902d6be765abcc93fa20ced63add4a014
Author: Andrzej J.R. Hunt 
Date:   Fri Jun 14 14:55:22 2013 +0100

Build firebird 2.5 internally. Also adds libatomic_ops.

Change-Id: I44a45e781dfb3624cdebf4530ae44870bf39a82a

commit b815388748f6c088e88eb3278617a04180aa7f75
Author: Andres Gomez 
Date:   Wed Jun 5 18:16:49 2013 +0300

fb-sdbc: Pretty printing table log output

commit 2aeb035039c9ae42b8de2797b865f702eb8c02f5
Author: Javier Fernandez 
Date:   Thu Jun 6 08:27:34 2013 +

Implementing the FStatement::execute() method.

Change-Id: I661b8247a0dfaee970b4742b1114fe085cb8f4dd

commit 8c63237a5491f8e3d1c8e9df767acff3ab45adfb
Author: Javier Fernandez 
Date:   Thu Jun 6 08:25:39 2013 +

Fixed crash at FStatement disposing stage.

Change-Id: I04fb2ded38a12b8501c49ccea81ee72fc7b002d1

commit 295fcfa67797ca60be14cc9b5a3119c7a02f855f
Author: Javier Fernandez 
Date:   Thu Jun 6 08:24:57 2013 +

The VARCHAR tye requires a maximum length.

Change-Id: I410dea61c8fe904bc11c801f370d1df97e116372

commit f95f8800647f74cf8d4dbd5997bb507aa1775435
Author: Javier Fernandez 
Date:   Wed Jun 5 15:07:01 2013 +

GetTables uses now a Statement, instead of a PreparedStatement.

Change-Id: I8dee162d25360114931ed401d6a6c512ad0c3ec6

commit ae457ac6d77056745005b9e006b45693dc0de937
Author: Javier Fernandez 
Date:   Wed Jun 5 15:06:05 2013 +

Refactoring some code on the FStatement class.

Change-Id: Id172dde2f35538ac37b632f738fe5c2a87437832

commit 24fc0da503f170a648437a8e1288a8d60c03bf0b
Author: Javier Fernandez 
Date:   Tue Jun 4 13:54:48 2013 +

Executing again a PreparedStatement.

Change-Id: I10afa596ed0464e14c4fd95d3a7fb687451a10b4

commit 9996aab852f4daa55b987afcdb799de72b65d548
Author: Andres Gomez 
Date:   Tue Jun 4 13:52:11 2013 +0300

fb-sdbc: added extra checks in FDriver

commit 3d97840d1158dc8b98a78b76e194d97ffa45e8b4
Author: Andres Gomez 
Date:   Tue Jun 4 16:41:28 2013 +0300

fb-sdbc: Added temporal debugging in dbaccess

commit fed119ccd408862fe568fb6932aa48d3b9a3680e
Author: Andres Gomez 
Date:   Tue Jun 4 13:09:47 2013 +0300

fb-sdbc: simplifying url comparison

commit 03069f9fbe7d846f28dec824d496368eb44a1ab0
Author: Andres Gomez 
Date:   Tue Jun 4 13:51:40 2013 +0300

fb-sdbc: Added logging support

Remember that in order to enable the logging
output it is needed to properly set the SAL_LOG
environment variable.

For example:

$ SAL_LOG="+INFO.connectivity.firebird" 
solver/unxlngx6/installation/opt/program/soffice.bin

commit b0944d6f1362767bb0d2e8be3f40150a56abf2bf
Author: Andres Gomez 
Date:   Tue Jun 4 13:11:00 2013 +0300

fb-sdbc: test file moved to a generic place

commit 3e1638aae16b448562f78eec2a7ee5542b98671f
Author: Javier Fernandez 
Date:   Mon Jun 3 23:25:45 2013 +

Dealing with parameters in Prepared Statement.

Change-Id: I1f94b7b4795c4a72ef8bf78bb032097094cda589

commit cc228a3fcdbcdd476cdbe8b699d9b7bb3b0445d2
Author: Javier Fernandez 
Date:   Mon May 27 21:06:48 2013 +

Adding debug info for tracking disposes and fixed a memory allocation bug.

Change-Id: Iae8a6dac26fd7d074ece6421ae61ecf7ce047b8f

commit 79cf983d367cbae05d4ce536db4e36f4c056a243
Author: Javier Fernandez 
Date:   Mon May 27 15:00:29 2013 +

Adding disposing bits.

Change-Id: I997c23d0c0765a6929be89087330ac6616ccd28c

c

Re: When will be relased LibreOffice for Android

2013-07-10 Thread Jonathan Aquilina
>From what I have seen the android port is still in its infancy as there is
still lots that needs to be done.


2013/7/10 Abraham Macías Paredes 

> Hi LibreOffice people,
>
> I’d like to know when do you plan to release the Android version of
> LibreOffice.
>
> ** **
>
> My company is looking for a product that could add some exclusivity to
> certain Android tablets. So my boss wants to know when do you plan to
> release the Android version of LibreOffice, and what kind of donation can
> accelerate the process.
>
> ** **
>
> Thank you very much!
>
> ** **
>
> ** **
>
> *Abraham Macías Paredes*
>
> * *
>
> * *
>
> *T: **955 11 11 55*
>
> *F:** 954 37 11 42***
>
> * *
>
> [image: Descripción: cid:image001.jpg@01CD9B47.6F3C52A0]**
>
> Solutia Innovaworld Technologies S.L.
>
> Parque Empresarial Los Llanos
>
> C/ Extremadura, 108 - 41909 - Salteras (Sevilla)
>
> ** **
>
> [image: Descripción: cid:image002.jpg@01CD9B47.6F3C52A0]
>
> Sus datos personales contenidos en esta comunicación han sido recogidos de
> los contactos mantenidos por Vd. o por personas de su entorno, con personal
> de SOLUTIA INNOVAWORLD TECHNOLOGIES, S.L. y han sido incorporados al
> fichero de GESTIÓN COMERCIAL con la finalidad de realizar la gestión,
> seguimiento y mantenimiento de nuestra relación comercial, o a otro fichero
> correspondiente al tipo de relación que mantiene con nosotros, de lo que
> Vd. fue convenientemente informado al recibir bien el documento contractual
> entregado al inicio de los contactos bien en una comunicación
> inmediatamente posterior en que se daba cumplimiento al derecho de
> información y se le solicitaba consentimiento para tratar sus datos
> personales, tratamiento que se efectuará de acuerdo a las finalidades allí
> expresadas.
>
> ** **
>
>  
>
>  
>
> En el caso en que ésta sea la primera comunicación que recibe por nuestra
> parte, le solicitamos su consentimiento para proceder al tratamiento de sus
> datos de acuerdo a las condiciones detalladas al inicio. Entenderemos que
> nos presta su consentimiento si en el plazo de un mes a contar desde la
> recepción de esta comunicación no nos expresa su voluntad en contra. Le
> informamos que puede revocar en cualquier momento su consentimiento
> respondiendo a este mail indicando que no desea recibir más información
> acerca de nuestra empresa, supuesto en el que será automáticamente dado de
> baja de nuestra lista de correo.
>
> ** **
>
> Podrá ejercer sus derechos de acceso, rectificación, cancelación y
> oposición ante el Responsable del fichero, SOLUTIA INNOVAWORLD
> TECHNOLOGIES, S.L. en la dirección: Parque Empresarial Los Llanos – C/
> Extremadura, 108 – Buzón 120 – Módulo 5 – 41909 – Salteras (Sevilla),
> indicando en la comunicación la referencia "LOPD".
>
> ** **
>
>  
>
> ** **
>
> ** **
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
>


-- 
Jonathan Aquilina
<><>___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2013-07-10 Thread Eike Rathke
 xmloff/source/style/chrlohdl.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 8a4307e4bb0eab3dd0a2a82c1fd4b2eab5df9a2e
Author: Eike Rathke 
Date:   Wed Jul 10 14:18:24 2013 +0200

do not write attributes with 'none' for non-ISO language/country

Change-Id: I774a4a8a283828d81fdab93e33fb3b2aa0cf680b

diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx
index 9fd0cfe..4a0ee09 100644
--- a/xmloff/source/style/chrlohdl.cxx
+++ b/xmloff/source/style/chrlohdl.cxx
@@ -117,6 +117,11 @@ sal_Bool XMLCharLanguageHdl::exportXML( OUString& 
rStrExpValue, const uno::Any&
 LanguageTag aLanguageTag( aLocale);
 OUString aCountry;
 aLanguageTag.getIsoLanguageCountry( rStrExpValue, aCountry);
+// Do not write *:language='none' for a non-ISO language with
+// *:rfc-language-tag that is written if Variant is not empty. If there
+// is no match do not write this attribute at all.
+if (rStrExpValue.isEmpty())
+return sal_False;
 }
 
 if( rStrExpValue.isEmpty() )
@@ -298,6 +303,11 @@ sal_Bool XMLCharCountryHdl::exportXML( OUString& 
rStrExpValue, const uno::Any& r
 LanguageTag aLanguageTag( aLocale);
 OUString aLanguage;
 aLanguageTag.getIsoLanguageCountry( aLanguage, rStrExpValue);
+// Do not write *:country='none' for a non-ISO country with
+// *:rfc-language-tag that is written if Variant is not empty. If there
+// is no match do not write this attribute at all.
+if (rStrExpValue.isEmpty())
+return sal_False;
 }
 
 if( rStrExpValue.isEmpty() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Michael Stahl
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 59b6eaa04abd755690c2f9cd3f24bcc0d0215a2e
Author: Michael Stahl 
Date:   Wed Jul 10 12:38:16 2013 +0200

writerfilter: not every field has a Content property

... so don't try to get it unconditionally  (but SetExpression does
have it).

(regression from c7e4264bed4e77daccf2f72063e5e00f1008c3cf)

Change-Id: I14d24bd70f569ba0bc4f1e48d56ebf43c1441783
(cherry picked from commit 1c90902cbccd4e4f5946dfc454da351c33c24f71)
Reviewed-on: https://gerrit.libreoffice.org/4807
Reviewed-by: Bosdonnat Cedric 
Tested-by: Bosdonnat Cedric 

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2625b4f..e2b2ea5 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3366,9 +3366,12 @@ void DomainMapper_Impl::SetFieldResult( OUString& 
rResult )
 bool bIsSetExpression = 
xServiceInfo->supportsService("com.sun.star.text.TextField.SetExpression");
 // If we already have content set, then use the 
current presentation
 rtl::OUString sValue;
-uno::Any aValue = xFieldProperties->getPropertyValue(
-rPropNameSupplier.GetName(PROP_CONTENT));
-aValue >>= sValue;
+if (bIsSetExpression)
+{   // this will throw for field types without Content
+uno::Any aValue(xFieldProperties->getPropertyValue(
+rPropNameSupplier.GetName(PROP_CONTENT)));
+aValue >>= sValue;
+}
 xFieldProperties->setPropertyValue(
 rPropNameSupplier.GetName(bIsSetExpression && 
sValue.isEmpty()? PROP_CONTENT : PROP_CURRENT_PRESENTATION),
  uno::makeAny( rResult ));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Michael Stahl
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit e8be529787b89f5a3f7d71c8885503e08d34a9a3
Author: Michael Stahl 
Date:   Wed Jul 10 12:38:16 2013 +0200

writerfilter: not every field has a Content property

... so don't try to get it unconditionally  (but SetExpression does
have it).

(regression from c7e4264bed4e77daccf2f72063e5e00f1008c3cf)

Change-Id: I14d24bd70f569ba0bc4f1e48d56ebf43c1441783
(cherry picked from commit 1c90902cbccd4e4f5946dfc454da351c33c24f71)
Reviewed-on: https://gerrit.libreoffice.org/4808
Reviewed-by: Bosdonnat Cedric 
Tested-by: Bosdonnat Cedric 

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c4b4697..0be95a2 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3313,9 +3313,12 @@ void DomainMapper_Impl::SetFieldResult( OUString& 
rResult )
 bool bIsSetExpression = 
xServiceInfo->supportsService("com.sun.star.text.TextField.SetExpression");
 // If we already have content set, then use the 
current presentation
 rtl::OUString sValue;
-uno::Any aValue = xFieldProperties->getPropertyValue(
-rPropNameSupplier.GetName(PROP_CONTENT));
-aValue >>= sValue;
+if (bIsSetExpression)
+{   // this will throw for field types without Content
+uno::Any aValue(xFieldProperties->getPropertyValue(
+rPropNameSupplier.GetName(PROP_CONTENT)));
+aValue >>= sValue;
+}
 xFieldProperties->setPropertyValue(
 rPropNameSupplier.GetName(bIsSetExpression && 
sValue.isEmpty()? PROP_CONTENT : PROP_CURRENT_PRESENTATION),
  uno::makeAny( rResult ));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libvisio.git: src/lib

2013-07-10 Thread Fridrich Štrba
 src/lib/VSDXMLParserBase.cpp |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 0c2293c7b1e0793f61a396d5bb3e9161f965b8e3
Author: Fridrich Å trba 
Date:   Wed Jul 10 14:15:12 2013 +0200

Add support of SplineStart and SplineKnot to xml-based formats

diff --git a/src/lib/VSDXMLParserBase.cpp b/src/lib/VSDXMLParserBase.cpp
index da7a22e..0812429 100644
--- a/src/lib/VSDXMLParserBase.cpp
+++ b/src/lib/VSDXMLParserBase.cpp
@@ -168,6 +168,14 @@ void 
libvisio::VSDXMLParserBase::readGeometry(xmlTextReaderPtr reader)
   if (XML_READER_TYPE_ELEMENT == tokenType)
 readRelQuadBezTo(reader);
   break;
+case XML_SPLINESTART:
+  if (XML_READER_TYPE_ELEMENT == tokenType)
+readSplineStart(reader);
+  break;
+case XML_SPLINEKNOT:
+  if (XML_READER_TYPE_ELEMENT == tokenType)
+readSplineKnot(reader);
+  break;
 default:
   break;
 }
@@ -1589,7 +1597,7 @@ void 
libvisio::VSDXMLParserBase::readSplineStart(xmlTextReaderPtr reader)
   break;
 }
   }
-  while (((XML_ELLIPTICALARCTO != tokenId && XML_ROW != tokenId) || 
XML_READER_TYPE_END_ELEMENT != tokenType) && 1 == ret);
+  while (((XML_SPLINESTART != tokenId && XML_ROW != tokenId) || 
XML_READER_TYPE_END_ELEMENT != tokenType) && 1 == ret);
   if (ret == 1)
 m_currentGeometryList->addSplineStart(ix, level, x, y, a, b, c, d);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - writerfilter/source

2013-07-10 Thread Michael Stahl
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit e84e62f2700097bacccd34749fa453d602c5eabd
Author: Michael Stahl 
Date:   Wed Jul 10 12:38:16 2013 +0200

writerfilter: not every field has a Content property

... so don't try to get it unconditionally  (but SetExpression does
have it).

(regression from c7e4264bed4e77daccf2f72063e5e00f1008c3cf)

Change-Id: I14d24bd70f569ba0bc4f1e48d56ebf43c1441783
(cherry picked from commit 1c90902cbccd4e4f5946dfc454da351c33c24f71)

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index cb15550..025ad2e 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3339,9 +3339,12 @@ void DomainMapper_Impl::SetFieldResult( OUString& 
rResult )
 bool bIsSetExpression = 
xServiceInfo->supportsService("com.sun.star.text.TextField.SetExpression");
 // If we already have content set, then use the 
current presentation
 rtl::OUString sValue;
-uno::Any aValue = xFieldProperties->getPropertyValue(
-rPropNameSupplier.GetName(PROP_CONTENT));
-aValue >>= sValue;
+if (bIsSetExpression)
+{   // this will throw for field types without Content
+uno::Any aValue(xFieldProperties->getPropertyValue(
+rPropNameSupplier.GetName(PROP_CONTENT)));
+aValue >>= sValue;
+}
 xFieldProperties->setPropertyValue(
 rPropNameSupplier.GetName(bIsSetExpression && 
sValue.isEmpty()? PROP_CONTENT : PROP_CURRENT_PRESENTATION),
  uno::makeAny( rResult ));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/firebird-sdbc' - 0 commits -

2013-07-10 Thread Andrzej J . R . Hunt
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/firebird-sdbc' - 2 commits - connectivity/source dbaccess/source firebird/ExternalProject_firebird.mk

2013-07-10 Thread Andrzej J . R . Hunt
 connectivity/source/drivers/firebird/FDriver.cxx |5 -
 dbaccess/source/core/misc/dsntypes.cxx   |9 +
 dbaccess/source/inc/dsntypes.hxx |1 +
 dbaccess/source/ui/dlg/generalpage.cxx   |3 ++-
 firebird/ExternalProject_firebird.mk |1 +
 5 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 8265f4523395ec84dfb018ab1ce7929636f95e1d
Author: Andrzej J.R. Hunt 
Date:   Wed Jul 10 12:30:45 2013 +0100

Modify DYLD_LIBRARY_PATH for firebrid to build on Mac OS.

Change-Id: I88cf37f4bb1d953180171e76b6f742cf0f672f89

diff --git a/firebird/ExternalProject_firebird.mk 
b/firebird/ExternalProject_firebird.mk
index 8853eca..a1567ae 100644
--- a/firebird/ExternalProject_firebird.mk
+++ b/firebird/ExternalProject_firebird.mk
@@ -43,6 +43,7 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
-L$(OUTDIR)/lib \
-L$(call 
gb_UnpackedTarball_get_dir,boost)/source/lib" \
&& export LD_LIBRARY_PATH="$(OUTDIR)/lib:$(call 
gb_UnpackedTarball_get_dir,boost)/source/lib" \
+   && export DYLD_LIBRARY_PATH="$(OUTDIR)/lib:$(call 
gb_UnpackedTarball_get_dir,boost)/source/lib" \
&& export PATH="$(PATH):$(shell cygpath $(OUTDIR)/lib):$(shell 
cygpath $(call gb_UnpackedTarball_get_dir,icu)/source/lib)" \
&& ./configure \
--without-editline \
commit 2c3eeb2f63a9e7898da4b145c51d451fcb039961
Author: Andrzej J.R. Hunt 
Date:   Mon Jul 8 09:39:55 2013 +0100

Add embedded firebird loading code, set as default db.

Change-Id: I993d7d7bacec710bb57d9e8f91d3cd01b0fbf616

diff --git a/connectivity/source/drivers/firebird/FDriver.cxx 
b/connectivity/source/drivers/firebird/FDriver.cxx
index e55a1bc..7f7b44a 100644
--- a/connectivity/source/drivers/firebird/FDriver.cxx
+++ b/connectivity/source/drivers/firebird/FDriver.cxx
@@ -147,7 +147,10 @@ sal_Bool SAL_CALL FirebirdDriver::acceptsURL( const 
::rtl::OUString& url )
 {
 // here we have to look if we support this url format
 // change the URL format to your needs, but please aware that the first on 
who accepts the URl wins.
-return url.startsWith("sdbc:firebird:");
+// This could be extended to allow for external dbs using e.g. 
sdbc:firebird:url
+// in addition to embedded dbs.
+// return url.startsWith("sdbc:firebird:");
+return url.equals("sdbc:embedded:firebird");
 }
 // 

 Sequence< DriverPropertyInfo > SAL_CALL FirebirdDriver::getPropertyInfo( const 
::rtl::OUString& url, const Sequence< PropertyValue >& info ) 
throw(SQLException, RuntimeException)
diff --git a/dbaccess/source/core/misc/dsntypes.cxx 
b/dbaccess/source/core/misc/dsntypes.cxx
index 0c02d64..806e117 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -206,6 +206,7 @@ OUString 
ODsnTypeCollection::getDatasourcePrefixFromMediaType(const OUString& _s
 bool ODsnTypeCollection::isShowPropertiesEnabled( const OUString& _sURL ) const
 {
 return !(
_sURL.matchIgnoreAsciiCaseAsciiL("sdbc:embedded:hsqldb",sizeof("sdbc:embedded:hsqldb")-1)
+||  
_sURL.matchIgnoreAsciiCaseAsciiL("sdbc:embedded:firebird",sizeof("sdbc:embedded:firebird")-1)
 ||  
_sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:outlook",sizeof("sdbc:address:outlook")-1)
 ||  
_sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:outlookexp",sizeof("sdbc:address:outlookexp")-1)
 ||  
_sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:mozilla:",sizeof("sdbc:address:mozilla:")-1)
@@ -321,7 +322,11 @@ OUString ODsnTypeCollection::getEmbeddedDatabase() const
 }
 }
 if ( sEmbeddedDatabaseURL.isEmpty() )
+#ifdef ENABLE_FIREBIRD_SDBC
+sEmbeddedDatabaseURL = "sdbc:embedded:firebird";
+#else
 sEmbeddedDatabaseURL = "sdbc:embedded:hsqldb";
+#endif
 return sEmbeddedDatabaseURL;
 }
 //-
@@ -361,6 +366,9 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const 
OUString& _rDsn) const
 if (sDsn.equalsIgnoreAsciiCase("sdbc:embedded:hsqldb"))
 return DST_EMBEDDED_HSQLDB;
 
+if (sDsn.equalsIgnoreAsciiCase("sdbc:embedded:firebird"))
+return DST_EMBEDDED_FIREBIRD;
+
 // find second :
 nSeparator = sDsn.indexOf(static_cast(':'), nSeparator + 1);
 if (-1 == nSeparator)
@@ -489,6 +497,7 @@ void ODsnTypeCollection::fillPageIds(const OUString& 
_sURL,::std::vector 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Noel Power
 sc/source/core/tool/interpr4.cxx |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit adab0134662562298ff13e7fe564623af4bc33da
Author: Noel Power 
Date:   Wed Jul 10 12:30:47 2013 +0100

use GetMatrix instead of manually disambiguating External and normal refs

Change-Id: I00710708691f6020b65fa622987dd37586b247dd

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 62e28c3..72563fd 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3288,11 +3288,7 @@ void ScInterpreter::ScMacro()
 case svExternalDoubleRef:
 case svMatrix:
 {
-ScMatrixRef pMat;
-if (nStackType == svMatrix)
-pMat = PopMatrix();
-else
-PopExternalDoubleRef(pMat);
+ScMatrixRef pMat = GetMatrix();
 SCSIZE nC, nR;
 if (pMat && !nGlobalError)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Miklos Vajna
 sw/qa/extras/rtfexport/data/fdo66682.rtf   |   25 +
 sw/qa/extras/rtfexport/rtfexport.cxx   |   21 +
 sw/source/filter/ww8/rtfattributeoutput.cxx|2 +-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |5 -
 4 files changed, 51 insertions(+), 2 deletions(-)

New commits:
commit 8422d1f5042de08e8b090a907889b41e133bda40
Author: Miklos Vajna 
Date:   Wed Jul 10 12:12:55 2013 +0200

fdo#66682 RTF export: fix level text of SVX_NUM_ARABIC

Even if level text is not ASCII, we should just write the placeholder
values (0x00, 0x01, etc.) in a hex encoded form, without Unicode.
Regression from 07d01742c69f1c0335bc7e1b57abd8341ce255e7.

Also, fix the import side, so the previous bad output now looks bad in
Writer as well.

Change-Id: I2f93892006c07eec243ec7dfcb23372d243a2db4

diff --git a/sw/qa/extras/rtfexport/data/fdo66682.rtf 
b/sw/qa/extras/rtfexport/data/fdo66682.rtf
new file mode 100644
index 000..76128a2
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/fdo66682.rtf
@@ -0,0 +1,25 @@
+{\rtf1\ansi\deff4\adeflang1025
+{\*\listtable
+{\list\listtemplateid1
+{\listlevel\levelnfc0\leveljc0\levelstartat1\levelfollow0
+{\leveltext \'03 \'00 ;}
+{\levelnumbers\'02;}
+\fi-360\li720}
+\listid1}
+}
+{\listoverridetable
+{\listoverride\listid1\listoverridecount0\ls1}
+}
+\pard\plain \s0\sb0\sa113\nowidctlpar
+\ilvl0\ls1 \li720\ri0\lin720\rin0\fi-360
+{\rtlch \ltrch\loch
+This should be 1}
+\par \pard\plain \s0\sb0\sa113\nowidctlpar
+\ilvl0\ls1 \li720\ri0\lin720\rin0\fi-360
+{\rtlch \ltrch\loch
+and 2}
+\par \pard\plain \s0\sb0\sa113\nowidctlpar
+\ilvl0\ls1 \li720\ri0\lin720\rin0\fi-360\sb0\sa113
+{\rtlch \ltrch\loch
+and 3}
+\par }
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx 
b/sw/qa/extras/rtfexport/rtfexport.cxx
index 0249426..48db195 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -66,6 +66,7 @@ public:
 void testTextframeGradient();
 void testRecordChanges();
 void testTextframeTable();
+void testFdo66682();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -121,6 +122,7 @@ void Test::run()
 {"textframe-gradient.rtf", &Test::testTextframeGradient},
 {"record-changes.rtf", &Test::testRecordChanges},
 {"textframe-table.rtf", &Test::testTextframeTable},
+{"fdo66682.rtf", &Test::testFdo66682},
 };
 // Don't test the first import of these, for some reason those tests fail
 const char* aBlacklist[] = {
@@ -607,6 +609,25 @@ void Test::testTextframeTable()
 CPPUNIT_ASSERT_EQUAL(OUString("Last para."), getParagraphOfText(3, 
xText)->getString());
 }
 
+void Test::testFdo66682()
+{
+uno::Reference 
xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+uno::Reference 
xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+uno::Sequence aProps;
+xLevels->getByIndex(0) >>= aProps; // 1st level
+
+OUString aSuffix;
+for (int i = 0; i < aProps.getLength(); ++i)
+{
+const beans::PropertyValue& rProp = aProps[i];
+
+if (rProp.Name == "Suffix")
+aSuffix = rProp.Value.get();
+}
+// Suffix was '\0' instead of ' '.
+CPPUNIT_ASSERT_EQUAL(OUString(" "), aSuffix);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index d93fdd2..9890f0b 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1397,7 +1397,7 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
 else
 {
 m_rExport.Strm() << "\\'" << msfilter::rtfutil::OutHex( 
rNumberingString.Len(), 2 ).getStr();
-m_rExport.Strm() << msfilter::rtfutil::OutString( rNumberingString, 
m_rExport.eDefaultEncoding ).getStr();
+m_rExport.Strm() << msfilter::rtfutil::OutString( rNumberingString, 
m_rExport.eDefaultEncoding, /*bUnicode =*/ false ).getStr();
 }
 
 m_rExport.Strm() << ";}";
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 18b3f96..b3374de 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1713,6 +1713,8 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
 {
 if (nKeyword != RTF_HEXCHAR)
 checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true);
+else
+checkUnicode(/*bUnicode =*/ true, /*bHex =*/ false);
 setNeedSect();
 RTFSkipDestination aSkip(*this);
 
@@ -3111,7 +3113,8 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
 if ((SAL_MIN_INT16 <= nParam) && (nParam <= SAL_MAX_UINT16))
 {
 m_aUnicodeBuffer.append(static_cast(nParam));
-m_aStates.top().nCharsT

Re: tinderboxes please upgrade bison

2013-07-10 Thread Tor Lillqvist
OS X 10.8 has Bison 2.3 and I doubt Apple will be upgrading to anything
newer in the future either. We shouldn't be requiring anything newer,
unless we want to abandon our traditional policy that LibreOffice should be
buildable with a stock Xcode installation and no random collection of
add-on 3rd-party software. (Sure, we already have broken that promise a bit
as we require automake and autoconf, but do we *really* need any newer
features of Bison?)

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


When will be relased LibreOffice for Android

2013-07-10 Thread Abraham Macías Paredes
Hi LibreOffice people,
I'd like to know when do you plan to release the Android version of LibreOffice.

My company is looking for a product that could add some exclusivity to certain 
Android tablets. So my boss wants to know when do you plan to release the 
Android version of LibreOffice, and what kind of donation can accelerate the 
process.

Thank you very much!


Abraham Macías Paredes


T: 955 11 11 55
F: 954 37 11 42

[cid:image001.jpg@01CE7D69.47213600]
Solutia Innovaworld Technologies S.L.
Parque Empresarial Los Llanos
C/ Extremadura, 108 - 41909 - Salteras (Sevilla)

[cid:image002.jpg@01CE7D69.47213600]

Sus datos personales contenidos en esta comunicación han sido recogidos de los 
contactos mantenidos por Vd. o por personas de su entorno, con personal de 
SOLUTIA INNOVAWORLD TECHNOLOGIES, S.L. y han sido incorporados al fichero de 
GESTIÓN COMERCIAL con la finalidad de realizar la gestión, seguimiento y 
mantenimiento de nuestra relación comercial, o a otro fichero correspondiente 
al tipo de relación que mantiene con nosotros, de lo que Vd. fue 
convenientemente informado al recibir bien el documento contractual entregado 
al inicio de los contactos bien en una comunicación inmediatamente posterior en 
que se daba cumplimiento al derecho de información y se le solicitaba 
consentimiento para tratar sus datos personales, tratamiento que se efectuará 
de acuerdo a las finalidades allí expresadas.






En el caso en que ésta sea la primera comunicación que recibe por nuestra 
parte, le solicitamos su consentimiento para proceder al tratamiento de sus 
datos de acuerdo a las condiciones detalladas al inicio. Entenderemos que nos 
presta su consentimiento si en el plazo de un mes a contar desde la recepción 
de esta comunicación no nos expresa su voluntad en contra. Le informamos que 
puede revocar en cualquier momento su consentimiento respondiendo a este mail 
indicando que no desea recibir más información acerca de nuestra empresa, 
supuesto en el que será automáticamente dado de baja de nuestra lista de correo.

Podrá ejercer sus derechos de acceso, rectificación, cancelación y oposición 
ante el Responsable del fichero, SOLUTIA INNOVAWORLD TECHNOLOGIES, S.L. en la 
dirección: Parque Empresarial Los Llanos - C/ Extremadura, 108 - Buzón 120 - 
Módulo 5 - 41909 - Salteras (Sevilla), indicando en la comunicación la 
referencia "LOPD".







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


[Libreoffice-commits] core.git: sw/qa writerfilter/qa

2013-07-10 Thread Michael Stahl
 sw/qa/extras/rtfimport/data/rhbz960019.rtf   |   12 ---
 sw/qa/extras/rtfimport/rtfimport.cxx |7 --
 writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf |   12 +++
 3 files changed, 12 insertions(+), 19 deletions(-)

New commits:
commit 4721fbbccdb582449ac938fe36d01685cd650f1d
Author: Michael Stahl 
Date:   Wed Jul 10 13:08:37 2013 +0200

writerfilter: move the crash test file to "pass" directory

Change-Id: I8a97eac789e3e8234673de87653b78c39dafe14c

diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 4a861d5..bc8c7fc 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -153,7 +153,6 @@ public:
 void testFdo39001();
 void testGroupshape();
 void testFdo66565();
-void testRhbz960019();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -292,7 +291,6 @@ void Test::run()
 {"fdo39001.rtf", &Test::testFdo39001},
 {"groupshape.rtf", &Test::testGroupshape},
 {"fdo66565.rtf", &Test::testFdo66565},
-{"rhbz960019.rtf", &Test::testRhbz960019},
 };
 header();
 for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1421,11 +1419,6 @@ void Test::testFdo66565()
 CPPUNIT_ASSERT_EQUAL(sal_Int16(304), getProperty< 
uno::Sequence >(xTableRows->getByIndex(1), 
"TableColumnSeparators")[0].Position);
 }
 
-void Test::testRhbz960019()
-{
-// used to crash due to extra group in listoverride entry
-}
-
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/rtfimport/data/rhbz960019.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf
similarity index 100%
rename from sw/qa/extras/rtfimport/data/rhbz960019.rtf
rename to writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Michael Stahl
 sw/qa/extras/rtfimport/data/rhbz960019.rtf|   12 
 sw/qa/extras/rtfimport/rtfimport.cxx  |7 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |9 ++---
 writerfilter/source/rtftok/rtfdocumentimpl.cxx|   14 --
 4 files changed, 37 insertions(+), 5 deletions(-)

New commits:
commit b3944f124ab3dc87332796a46387f837ad29e8d5
Author: Michael Stahl 
Date:   Wed Jul 10 12:41:57 2013 +0200

rhbz#960019 : RTF import: handle extra groups in listoverride entry

This crashed because for a single listoverride entry 2 SPRMs were sent
to the domain-mapper, and the second one was empty.

Change-Id: Ic41ffd8bd4edcff065f49ecef3464efedd909d63

diff --git a/sw/qa/extras/rtfimport/data/rhbz960019.rtf 
b/sw/qa/extras/rtfimport/data/rhbz960019.rtf
new file mode 100644
index 000..869aa33
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/rhbz960019.rtf
@@ -0,0 +1,12 @@
+{\rtf1
+{\*\listtable
+{\list\listtemplateid-723955400\listsimple{\listlevel\leveljc\levelfollow0\levelspace0\levelindent0\levelstartat1{\leveltext\'03\'00.
 ;}{\levelnumbers\'01;}\f0 }{\listname ;}\listid-1155484576}
+}
+{\*\listoverridetable
+{\*\listoverride{\listid-1155484576\listoverridecount0\ls1}}
+}
+\pard\plain 
\pvpg\phpg\posx1143\posy4743\absw9615\absh-2922\dfrmtxtx72\dfrmtxty72\nowrap
+Hello\par
+\pard\plain\par
+}
+
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index bc8c7fc..4a861d5 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -153,6 +153,7 @@ public:
 void testFdo39001();
 void testGroupshape();
 void testFdo66565();
+void testRhbz960019();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -291,6 +292,7 @@ void Test::run()
 {"fdo39001.rtf", &Test::testFdo39001},
 {"groupshape.rtf", &Test::testGroupshape},
 {"fdo66565.rtf", &Test::testFdo66565},
+{"rhbz960019.rtf", &Test::testRhbz960019},
 };
 header();
 for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1419,6 +1421,11 @@ void Test::testFdo66565()
 CPPUNIT_ASSERT_EQUAL(sal_Int16(304), getProperty< 
uno::Sequence >(xTableRows->getByIndex(1), 
"TableColumnSeparators")[0].Position);
 }
 
+void Test::testRhbz960019()
+{
+// used to crash due to extra group in listoverride entry
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 38dd6dc..18b3f96 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -4563,8 +4563,18 @@ int RTFDocumentImpl::popState()
 // list override table
 case DESTINATION_LISTOVERRIDEENTRY:
 {
-RTFValue::Pointer_t pValue(new 
RTFValue(aState.aTableAttributes, aState.aTableSprms));
-m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num, pValue, 
false);
+if (m_aStates.top().nDestinationState == 
DESTINATION_LISTOVERRIDEENTRY)
+{   // copy properties upwards so upper popState inserts it
+m_aStates.top().aTableAttributes = aState.aTableAttributes;
+m_aStates.top().aTableSprms = aState.aTableSprms;
+}
+else
+{
+RTFValue::Pointer_t pValue(new RTFValue(
+aState.aTableAttributes, aState.aTableSprms));
+m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num,
+pValue, false);
+}
 }
 break;
 case DESTINATION_LEVELTEXT:
commit 1c90902cbccd4e4f5946dfc454da351c33c24f71
Author: Michael Stahl 
Date:   Wed Jul 10 12:38:16 2013 +0200

writerfilter: not every field has a Content property

... so don't try to get it unconditionally  (but SetExpression does
have it).

(regression from c7e4264bed4e77daccf2f72063e5e00f1008c3cf)

Change-Id: I14d24bd70f569ba0bc4f1e48d56ebf43c1441783

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f3fc0ee..badcb44 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3399,9 +3399,12 @@ void DomainMapper_Impl::SetFieldResult( OUString& 
rResult )
 bool bIsSetExpression = 
xServiceInfo->supportsService("com.sun.star.text.TextField.SetExpression");
 // If we already have content set, then use the 
current presentation
 rtl::OUString sValue;
-uno::Any aValue = xFieldProperties->getPropertyValue(
-rPropNameSupplier.GetName(PROP_CONTENT));
-aValue >>= s

[Libreoffice-commits] core.git: Branch 'feature/cmis' - ucb/source

2013-07-10 Thread Cao Cuong Ngo
 ucb/source/ucp/cmis/cmis_content.cxx |   63 +--
 1 file changed, 61 insertions(+), 2 deletions(-)

New commits:
commit 86d3cebe0711bb1c643fa24b22c4761e237b3c64
Author: Cao Cuong Ngo 
Date:   Wed Jul 10 10:40:48 2013 +0200

CMIS properties dialog

Convert Any to Cmis properties

Change-Id: I307d337363a84bae8585625ee3eeb641fde25792

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 370b402..cbce84b 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -197,6 +197,55 @@ namespace
 }
 return aValue;
 }
+
+libcmis::PropertyPtr lcl_unoToCmisProperty( document::CmisProperty prop )
+{
+libcmis::PropertyTypePtr propertyType( new libcmis::PropertyType( ) );
+
+OUString id = prop.Id;
+OUString name = prop.Name;
+bool bUpdatable = prop.Updatable;
+bool bRequired = prop.Required;
+bool bMultiValued = prop.MultiValued;
+bool bOpenChoice = prop.OpenChoice;
+uno::Any value = prop.Value;
+libcmis::PropertyType::Type type = libcmis::PropertyType::String;
+
+propertyType->setId( OUSTR_TO_STDSTR( id ));
+propertyType->setDisplayName( OUSTR_TO_STDSTR( name ) );
+propertyType->setUpdatable( bUpdatable );
+propertyType->setRequired( bRequired );
+propertyType->setMultiValued( bMultiValued );
+propertyType->setOpenChoice( bOpenChoice );
+propertyType->setType( type );
+
+std::vector< std::string > values;
+
+// convert UNO value to string vector
+if ( bMultiValued )
+{
+uno::Sequence< OUString > aStrings;
+value >>= aStrings;
+sal_Int32 len = aStrings.getLength( );
+for ( sal_Int32 i = 0; i < len; i++ )
+{
+string str = OUSTR_TO_STDSTR( aStrings[i] );
+values.push_back( str );
+}
+}
+else
+{
+OUString val;
+value >>= val;
+std::string str = OUSTR_TO_STDSTR( val );
+values.push_back( str);
+}
+
+libcmis::PropertyPtr property( new libcmis::Property( propertyType, 
values ) );
+
+return property;
+}
+
 }
 
 namespace cmis
@@ -417,11 +466,21 @@ namespace cmis
 }
 
 libcmis::ObjectPtr Content::updateProperties(
- const uno::Any& /*iCmisProps*/,
+ const uno::Any& iCmisProps,
  const uno::Reference< ucb::XCommandEnvironment >& xEnv )
 {
-// TODO convert iCmisProps to aProperties;
+// Convert iCmisProps to Cmis Properties;
+uno::Sequence< document::CmisProperty > aPropsSeq;
+iCmisProps >>= aPropsSeq;
 map< string, libcmis::PropertyPtr > aProperties;
+
+sal_Int32 propsLen = aPropsSeq.getLength( );
+for ( sal_Int32 i = 0; i< propsLen; i++ )
+{
+std::string id = OUSTR_TO_STDSTR( aPropsSeq[i].Id );
+libcmis::PropertyPtr prop = lcl_unoToCmisProperty( aPropsSeq[i] );
+aProperties.insert( std::pair( id, 
prop ) );
+}
 libcmis::ObjectPtr updateObj;
 try
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/unx

2013-07-10 Thread Andre Fischer
 vcl/unx/gtk/window/gtkframe.cxx |   36 
 1 file changed, 24 insertions(+), 12 deletions(-)

New commits:
commit 99c3dd415f415126759a6332f78732f886f5a35c
Author: Andre Fischer 
Date:   Wed Jul 10 08:11:07 2013 +

122709: Set default size of application windows to 80% of the screen size.

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 5ca2a77..977d713 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1244,18 +1244,30 @@ Size GtkSalFrame::calcDefaultSize()
 long w = aScreenSize.Width();
 long h = aScreenSize.Height();
 
-// fill in holy default values brought to us by product management
-if( aScreenSize.Width() >= 800 )
-w = 785;
-if( aScreenSize.Width() >= 1024 )
-w = 920;
-
-if( aScreenSize.Height() >= 600 )
-h = 550;
-if( aScreenSize.Height() >= 768 )
-h = 630;
-if( aScreenSize.Height() >= 1024 )
-h = 875;
+
+if (true || aScreenSize.Width() <= 1024)
+{
+// For small screen use the old default values.  Original comment:
+// fill in holy default values brought to us by product management
+if( aScreenSize.Width() >= 800 )
+w = 785;
+if( aScreenSize.Width() >= 1024 )
+w = 920;
+
+if( aScreenSize.Height() >= 600 )
+h = 550;
+if( aScreenSize.Height() >= 768 )
+h = 630;
+if( aScreenSize.Height() >= 1024 )
+h = 875;
+}
+else
+{
+// Use the same size calculation as on Mac OSX: 80% of width
+// and height.
+w = static_cast(aScreenSize.Width() * 0.8);
+h = static_cast(aScreenSize.Height() * 0.8);
+}
 
 return Size( w, h );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Michael Meeks
 include/vcl/svapp.hxx|2 +-
 vcl/source/app/svapp.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5c2564b8a7fafbc6f1c002d1fd42e1bc7cd1ab10
Author: Michael Meeks 
Date:   Wed Jul 10 10:36:03 2013 +0100

Remove an un-used mode on Application::Yield.

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 67a48ee..20a8b74 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -153,7 +153,7 @@ public:
 static void Execute();
 static void Quit();
 static void Reschedule( bool bAllEvents = false );
-static void Yield( bool bAllEvents = false );
+static void Yield();
 static void EndYield();
 static comphelper::SolarMutex& GetSolarMutex();
 static oslThreadIdentifier  GetMainThreadIdentifier();
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0e4d763..d8d193d 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -446,9 +446,9 @@ void Application::Reschedule( bool i_bAllEvents )
 
 // ---
 
-void Application::Yield( bool i_bAllEvents )
+void Application::Yield()
 {
-ImplYield( true, i_bAllEvents );
+ImplYield( true, false );
 }
 
 // ---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 54157] LibreOffice 4.0 most annoying bugs

2013-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=54157

Bug 54157 depends on bug 63498, which changed state.

Bug 63498 Summary: Personas doesn't work anymore
https://bugs.freedesktop.org/show_bug.cgi?id=63498

   What|Removed |Added

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

-- 
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 'libreoffice-4-1-0' - unoidl/source

2013-07-10 Thread Stephan Bergmann
 unoidl/source/legacyprovider.cxx |   32 
 1 file changed, 20 insertions(+), 12 deletions(-)

New commits:
commit 78056d4186b565e8da6122446bca90f6983dc1a5
Author: Stephan Bergmann 
Date:   Tue Jul 9 19:48:21 2013 +0200

fdo#65589: Treat legacy types.rdb w/o /UCR key as empty

...as they are encountered in the wild.

Change-Id: Iae46d3b4b4aca18a09680caabc0e343f8a534989
(cherry picked from commit 87bad231d6f81c611ba145aea483a568623ca42e)
Reviewed-on: https://gerrit.libreoffice.org/4789
Reviewed-by: Fridrich Strba 
Reviewed-by: David Tardon 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/unoidl/source/legacyprovider.cxx b/unoidl/source/legacyprovider.cxx
index 17b95dc..a60424a 100644
--- a/unoidl/source/legacyprovider.cxx
+++ b/unoidl/source/legacyprovider.cxx
@@ -96,16 +96,18 @@ Cursor::Cursor(
 RegistryKey const & key):
 manager_(manager), ucr_(ucr), key_(key), index_(0)
 {
-prefix_ = key_.getName();
-if (!prefix_.endsWith("/")) {
-prefix_ += "/";
-}
-RegError e = key_.getKeyNames("", names_);
-if (e != REG_NO_ERROR) {
-throw FileFormatException(
-key_.getRegistryName(),
-("legacy format: cannot get sub-key names of " + key_.getName()
- + ": " + OUString::number(e)));
+if (ucr_.isValid()) {
+prefix_ = key_.getName();
+if (!prefix_.endsWith("/")) {
+prefix_ += "/";
+}
+RegError e = key_.getKeyNames("", names_);
+if (e != REG_NO_ERROR) {
+throw FileFormatException(
+key_.getRegistryName(),
+("legacy format: cannot get sub-key names of " + key_.getName()
+ + ": " + OUString::number(e)));
+}
 }
 }
 
@@ -797,7 +799,11 @@ LegacyProvider::LegacyProvider(
 uri, "legacy format: cannot open root key: " + 
OUString::number(e));
 }
 e = root.openKey("UCR", ucr_);
-if (e != REG_NO_ERROR) {
+switch (e) {
+case REG_NO_ERROR:
+case REG_KEY_NOT_EXISTS: // such effectively empty files exist in the wild
+break;
+default:
 throw FileFormatException(
 uri, "legacy format: cannot open UCR key: " + OUString::number(e));
 }
@@ -810,7 +816,9 @@ rtl::Reference< MapCursor > 
LegacyProvider::createRootCursor() const {
 rtl::Reference< Entity > LegacyProvider::findEntity(OUString const & name)
 const
 {
-return readEntity(manager_, ucr_, ucr_, name.replace('.', '/'), true);
+return ucr_.isValid()
+? readEntity(manager_, ucr_, ucr_, name.replace('.', '/'), true)
+: rtl::Reference< Entity >();
 }
 
 LegacyProvider::~LegacyProvider() throw () {}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Michael Stahl
 sw/inc/doc.hxx|4 
 sw/source/core/doc/doclay.cxx |5 -
 sw/source/core/doc/docnew.cxx |1 -
 sw/source/core/view/vnew.cxx  |   11 ---
 4 files changed, 21 deletions(-)

New commits:
commit eacf99268af767dd045754e42b24fe99964e8a52
Author: Michael Stahl 
Date:   Wed Jul 3 15:58:31 2013 +0200

fdo#65932: sw: remove SwDoc::ShareLayout

It is a crude hack that is no longer necessary because the underlying
problems that caused crashes when deleting the layout have been fixed.

Also it appears to cause crashes now.

(cherry picked from commit f8dfa3a81a5382b2f18a705bd512625754167573)
Reviewed-on: https://gerrit.libreoffice.org/4706
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 
(cherry picked from commit 076bc3ce70b9254e00547de34a86dafd76ed1e51)

Change-Id: I601bdb0dc0aff5f4ddb8b8f4ba4c8d1f72c7
Signed-off-by: Michael Stahl 
Reviewed-on: https://gerrit.libreoffice.org/4768
Reviewed-by: Fridrich Strba 
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 13256ea7..0769ae2 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -79,7 +79,6 @@ class SwList;
 #include 
 
 #include 
-#include 
 #include 
 
 namespace editeng { class SvxBorderLine; }
@@ -317,7 +316,6 @@ class SW_DLLPUBLIC SwDoc :
 SwDefTOXBase_Impl * mpDefTOXBases;   ///< defaults of SwTOXBase's
 
 ViewShell   *mpCurrentView;  ///< SwDoc should get a new member 
mpCurrentView//swmod 071225
-boost::shared_ptr mpLayoutPtr;
 SdrModel*mpDrawModel;///< StarView Drawing
 
 SwDocUpdtFld*mpUpdtFlds; ///< Struct for updating fields
@@ -1772,8 +1770,6 @@ public:
 const SwDocShell* GetDocShell() const   { return mpDocShell; }
 void SetDocShell( SwDocShell* pDSh );
 
-void ShareLayout( boost::shared_ptr& rPtr);
-
 /** in case during copying of embedded object a new shell is created,
  it should be set here and cleaned later */
 void SetTmpDocShell( SfxObjectShellLock rLock ){ mxTmpDocShell = 
rLock; }
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index b320e79..926a8c70 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -2303,9 +2303,4 @@ std::set SwDoc::GetAllLayouts()
 return aAllLayouts;
 } //swmod 070825
 
-void SwDoc::ShareLayout(boost::shared_ptr& rPtr)
-{
-mpLayoutPtr = rPtr;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 94ebfea..91aa23b 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -520,7 +520,6 @@ SwDoc::~SwDoc()
 delete mpPgPViewPrtData;
 
 mbDtor = true;
-mpLayoutPtr.reset();
 
 delete mpRedlineTbl;
 delete mpUnoCrsrTbl;
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index a8b293e..2c3053a 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -128,17 +128,6 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
 // switched to two step construction because creating the layout 
in SwRootFrm needs a valid pLayout set
 mpLayout = SwRootFrmPtr(new SwRootFrm( mpDoc->GetDfltFrmFmt(), 
this ));
 mpLayout->Init( mpDoc->GetDfltFrmFmt() );
-
-// mba: the layout refactoring overlooked an important detail
-// prior to that change, the layout always was destroyed in the 
dtor of swdoc
-// it is necessary to suppress notifications in the layout when 
the layout is discarded in its dtor
-// unfortunately this was done by asking whether the doc is in 
dtor - though the correct question should
-// have been if the rootfrm is in dtor (or even better: discard 
the layout before the SwRootFrm is destroyed!)
-// SwDoc::IsInDtor() is used at several places all over the code 
that need to be checked whether
-// "pDoc->IsInDtor()" means what is says or in fact should check 
for "pRootFrm->IsInDtor()". As this will take some time, I decided
-// to postpone that investigations and the changes it will bring 
to the 3.5 release and for 3.4 make sure
-// that the layout still gets destroyed in the doc dtor. This is 
done by sharing "the" layout (that we still have) with the doc.
-GetDoc()->ShareLayout( mpLayout );
 }
 }
 SizeChgNotify();//swmod 071108
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread David Tardon
 reportdesign/source/core/sdr/RptObject.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4015660122e766bf20b6383dce022c6636bc1cca
Author: David Tardon 
Date:   Tue Jul 9 10:40:21 2013 +0200

fdo#66582 avoid crash because of missing model

The SdrObject is still under construction at this point, so it does not
make sense to broadcast changes, because there are not any listeners
anyway.

Change-Id: Ib05e30843b4b0e125d5cae18a481e16fb7e21ba1
(cherry picked from commit 6e2815a0ffdb5811f220978734354b1033801927)
Signed-off-by: David Tardon 
Reviewed-on: https://gerrit.libreoffice.org/4781
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 
Reviewed-on: https://gerrit.libreoffice.org/4786
Reviewed-by: Lionel Elie Mamane 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index ad81cdc..ad3b0c2 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -150,7 +150,7 @@ SdrObject* OObjectBase::createObject(const uno::Reference< 
report::XReportCompon
 {
 sal_Bool bOpaque = sal_False;
 _xComponent->getPropertyValue(PROPERTY_OPAQUE) >>= bOpaque;
-pNewObj->SetLayer(bOpaque ? RPT_LAYER_FRONT : RPT_LAYER_BACK);
+pNewObj->NbcSetLayer(bOpaque ? RPT_LAYER_FRONT : 
RPT_LAYER_BACK);
 }
 catch(const uno::Exception&)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - f0/cc294bb37948f710c6d7fd5f00bd845cc6b1a1

2013-07-10 Thread Caolán McNamara
 f0/cc294bb37948f710c6d7fd5f00bd845cc6b1a1 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 18df6bb13e3b0c961be819d88d079f6550a32146
Author: Caolán McNamara 
Date:   Wed Jul 10 09:53:21 2013 +0100

Notes added by 'git notes add'

diff --git a/f0/cc294bb37948f710c6d7fd5f00bd845cc6b1a1 
b/f0/cc294bb37948f710c6d7fd5f00bd845cc6b1a1
new file mode 100644
index 000..8ebbe55
--- /dev/null
+++ b/f0/cc294bb37948f710c6d7fd5f00bd845cc6b1a1
@@ -0,0 +1 @@
+ignore: obsolete
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - da/d68328d0e6af44243e2b010fbdf7ca00f215f6

2013-07-10 Thread Caolán McNamara
 da/d68328d0e6af44243e2b010fbdf7ca00f215f6 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1e4081267832b088d72bddcc625d6feee2995b99
Author: Caolán McNamara 
Date:   Wed Jul 10 09:50:45 2013 +0100

Notes added by 'git notes add'

diff --git a/da/d68328d0e6af44243e2b010fbdf7ca00f215f6 
b/da/d68328d0e6af44243e2b010fbdf7ca00f215f6
new file mode 100644
index 000..00b55a3
--- /dev/null
+++ b/da/d68328d0e6af44243e2b010fbdf7ca00f215f6
@@ -0,0 +1 @@
+ignore: branding
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 4 commits - basic/source cppcanvas/source sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

2013-07-10 Thread Caolán McNamara
 basic/source/runtime/inputbox.cxx |8 -
 cppcanvas/source/mtfrenderer/implrenderer.cxx |  118 ++-
 sfx2/UIConfig_sfx.mk  |3 
 sfx2/source/dialog/dialog.hrc |2 
 sfx2/source/dialog/versdlg.cxx|   70 +--
 sfx2/source/dialog/versdlg.src|   60 -
 sfx2/source/inc/versdlg.hxx   |   22 +--
 sfx2/uiconfig/ui/versioncommentdialog.ui  |  160 ++
 8 files changed, 225 insertions(+), 218 deletions(-)

New commits:
commit 137e4bd885a913cb201d92dfc7815b2821986d49
Author: Caolán McNamara 
Date:   Tue Jul 9 17:11:15 2013 +0100

convert version comment dialog to .ui format

Change-Id: I7bbcc19062883932bf2e2fd68928f3f5624c4748

diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 2adb858..b865a71 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/checkin \
sfx2/uiconfig/ui/custominfopage \
sfx2/uiconfig/ui/descriptioninfopage \
+   sfx2/uiconfig/ui/documentfontspage \
sfx2/uiconfig/ui/documentinfopage \
sfx2/uiconfig/ui/documentpropertiesdialog \
sfx2/uiconfig/ui/licensedialog \
@@ -23,7 +24,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/querysavedialog \
sfx2/uiconfig/ui/securityinfopage \
sfx2/uiconfig/ui/singletabdialog \
-   sfx2/uiconfig/ui/documentfontspage \
+   sfx2/uiconfig/ui/versioncommentdialog \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index a0158af..51c85a4 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -48,7 +48,7 @@
 #define MN_CONTEXT_TEMPLDLG ( RC_DIALOG_BEGIN + 46)
 
 #define DLG_VERSIONS( RC_DIALOG_BEGIN + 69 )
-#define DLG_COMMENTS( RC_DIALOG_BEGIN + 70 )
+
 #define STR_VIEWVERSIONCOMMENT  ( RC_DIALOG_BEGIN + 71 )
 
 #define MSG_ERROR_WRONG_CONFIRM ( RC_DIALOG_BEGIN + 76 )
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 41ade0f..d4976c4 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -375,7 +375,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, 
pButton )
 {
 SfxVersionInfo aInfo;
 aInfo.aAuthor = SvtUserOptions().GetFullName();
-SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, 
aInfo, sal_True );
+SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl(this, 
aInfo, true);
 short nRet = pDlg->Execute();
 if ( nRet == RET_OK )
 {
@@ -409,7 +409,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, 
pButton )
 else if ( pButton == &aViewButton && pEntry )
 {
 SfxVersionInfo* pInfo = (SfxVersionInfo*) pEntry->GetUserData();
-SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, 
*pInfo, sal_False );
+SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl(this, 
*pInfo, false);
 pDlg->Execute();
 delete pDlg;
 }
@@ -435,54 +435,46 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, 
pButton )
 return 0L;
 }
 
-SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, 
SfxVersionInfo& rInfo, sal_Bool bEdit )
-: SfxModalDialog( pParent, SfxResId( DLG_COMMENTS ) )
-, aDateTimeText( this, SfxResId( FT_DATETIME ) )
-, aSavedByText( this, SfxResId( FT_SAVEDBY ) )
-, aEdit( this, SfxResId( ME_VERSIONS ) )
-, aOKButton( this, SfxResId( PB_OK ) )
-, aCancelButton( this, SfxResId( PB_CANCEL ) )
-, aCloseButton( this, SfxResId( PB_CLOSE ) )
-, aHelpButton( this, SfxResId( PB_HELP ) )
-, pInfo( &rInfo )
+SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(Window *pParent, 
SfxVersionInfo& rInfo, bool bEdit)
+: SfxModalDialog(pParent, "VersionCommentDialog", 
"sfx/ui/versioncommentdialog.ui")
+, m_rInfo(rInfo)
 {
-FreeResource();
+get(m_pDateTimeText, "timestamp");
+get(m_pSavedByText, "author");
+get(m_pEdit, "textview");
+get(m_pOKButton, "ok");
+get(m_pCancelButton, "cancel");
+get(m_pCloseButton, "close");
 
 const LocaleDataWrapper& rLocaleWrapper( 
Application::GetSettings().GetLocaleDataWrapper() );
-aDateTimeText.SetText( aDateTimeText.GetText() + ConvertDateTime_Impl( 
pInfo->aCreationDate, rLocaleWrapper ) );
-aSavedByText.SetText( aSavedByText.GetText() + pInfo->aAuthor );
-aEdit.SetText( rInfo.aComment );
-
-aCloseButton.SetClickHdl ( LINK( this, SfxViewVersionDialog_Impl, 
ButtonHdl ) );
-aOKButton.SetClickHdl ( LINK( this, SfxViewVersionDialog_Impl, ButtonHdl ) 
);
-
-aEdit.GrabFocus();
-if ( !bEdit )
+m_pDateTimeText->SetText(m_pDateTimeText->GetText() + 
ConvertDateTime_Impl(rInf

[Libreoffice-commits] help.git: helpers/help_hid.lst source/text

2013-07-10 Thread Caolán McNamara
 helpers/help_hid.lst   |3 ---
 source/text/shared/01/0119.xhp |4 ++--
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit eb647886aa6b6d06d40c342d6509dd890409a410
Author: Caolán McNamara 
Date:   Wed Jul 10 09:37:17 2013 +0100

update help ids for version comment dialog .ui conversion

Change-Id: I72c7db534019e2ab7cd4e1e4f62fb97049e1dbb4

diff --git a/helpers/help_hid.lst b/helpers/help_hid.lst
index b75f354..5c598f0 100644
--- a/helpers/help_hid.lst
+++ b/helpers/help_hid.lst
@@ -6893,16 +6893,13 @@ sfx2_ListBox_DLG_NEW_FILE_LB_REGION,1107381781,
 sfx2_ListBox_DLG_NEW_FILE_LB_TEMPLATE,1107381812,
 sfx2_ListBox_TP_HELP_BOOKMARKS_LB_BOOKMARKS,547016203,
 sfx2_ListBox_TP_HELP_SEARCH_LB_RESULT,546999824,
-sfx2_ModalDialog_DLG_COMMENTS,1112702976,
 sfx2_ModalDialog_DLG_HELP_ADDBOOKMARK,1083899904,
 sfx2_ModalDialog_DLG_VERSIONS,1112686592,
 sfx2_ModalDialog_MD_DDE_LINKEDIT,1082212352,
 sfx2_ModalDialog_RID_URLOPEN,1112571904,
 sfx2_ModalDialog_RID_WARN_PRINTTRANSPARENCY,1113047040,
 sfx2_MoreButton_DLG_NEW_FILE_BT_MORE,1107391008,
-sfx2_MultiLineEdit_DLG_COMMENTS_ME_VERSIONS,1112705550,
 sfx2_MultiLineEdit_DLG_NEW_FILE_ED_DESC,1107380807,
-sfx2_PushButton_DLG_COMMENTS_PB_CLOSE,1112707592,
 sfx2_PushButton_DLG_NEW_FILE_PB_LOAD_FILE,1107382822,
 sfx2_PushButton_DLG_VERSIONS_PB_COMPARE,1112691217,
 sfx2_PushButton_DLG_VERSIONS_PB_DELETE,1112691205,
diff --git a/source/text/shared/01/0119.xhp 
b/source/text/shared/01/0119.xhp
index e0ecc13..438916b 100644
--- a/source/text/shared/01/0119.xhp
+++ b/source/text/shared/01/0119.xhp
@@ -44,9 +44,9 @@
 
 Save New Version
 Saves the current 
state of the document as a new version. If you want, you can also enter 
comments in the Insert Version Comment dialog before you save the 
new version.
-
+
 Insert Version Comment
-Enter a 
comment here when you are saving a new version. If you clicked Show 
to open this dialog, you cannot edit the comment.
+Enter 
a comment here when you are saving a new version. If you clicked Show 
to open this dialog, you cannot edit the comment.
 
 Always save version when closing
 If you have 
made changes to your document, $[officename] automatically saves a new version 
when you close the document.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2013-07-10 Thread Caolán McNamara
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3729d47fe10bdf2bdd482bc8826a744145a9e6a0
Author: Caolán McNamara 
Date:   Wed Jul 10 09:37:17 2013 +0100

Updated core
Project: help  eb647886aa6b6d06d40c342d6509dd890409a410

diff --git a/helpcontent2 b/helpcontent2
index d4d1cb5..eb64788 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d4d1cb52a2d1e66b0514e3d2ab5e12e6969aa1bc
+Subproject commit eb647886aa6b6d06d40c342d6509dd890409a410
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - ios/iosremote

2013-07-10 Thread siqi
 ios/iosremote/iosremote.xcodeproj/project.pbxproj  
  |   12 
 
ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate
 |binary
 
ios/iosremote/iosremote.xcodeproj/xcuserdata/siqi.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  |   26 
 ios/iosremote/iosremote/Communication/Client.m 
  |   41 
 ios/iosremote/iosremote/Communication/CommandInterpreter.m 
  |   46 
 ios/iosremote/iosremote/Communication/SlideShow.m  
  |9 
 ios/iosremote/iosremote/Communication/pinValidation_vc.h   
  |   14 
 ios/iosremote/iosremote/Communication/pinValidation_vc.m   
  |   14 
 ios/iosremote/iosremote/SWReavealMainController.h  
  |   14 
 ios/iosremote/iosremote/SWReavealMainController.m  
  |   14 
 ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard  
  |  783 --
 ios/iosremote/iosremote/en.lproj/iPhone_autolayout.storyboard  
  |  783 ++
 ios/iosremote/iosremote/iosremote-Info.plist   
  |5 
 ios/iosremote/iosremote/main.m 
  |   14 
 ios/iosremote/iosremote/newServer_vc.h 
  |   12 
 ios/iosremote/iosremote/newServer_vc.m 
  |   77 
 ios/iosremote/iosremote/serverList_vc.m
  |   12 
 ios/iosremote/iosremote/slideShowPreviewTable_vc.h 
  |   14 
 ios/iosremote/iosremote/slideShowPreviewTable_vc.m 
  |   18 
 ios/iosremote/iosremote/slideShowPreview_vc.h  
  |   14 
 ios/iosremote/iosremote/slideShowPreview_vc.m  
  |   16 
 ios/iosremote/iosremote/slideShowSwipeInList.h 
  |   15 
 ios/iosremote/iosremote/slideShowSwipeInList.m 
  |4 
 ios/iosremote/iosremote/slideShow_vc.h 
  |   14 
 ios/iosremote/iosremote/slideShow_vc.m 
  |   22 
 25 files changed, 980 insertions(+), 1013 deletions(-)

New commits:
commit 424bc075d0d03832759e69b4a4eb35ec2eab2174
Author: siqi 
Date:   Wed Jul 10 10:47:34 2013 +0200

continue to interpret command from server if is not ended

Change-Id: Id970a54db5c61a9cada6b1fda0c3cecdebb4ffe7

diff --git a/ios/iosremote/iosremote.xcodeproj/project.pbxproj 
b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
index bd13696..d35a80d 100644
--- a/ios/iosremote/iosremote.xcodeproj/project.pbxproj
+++ b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
@@ -36,7 +36,7 @@
57C6E405175E06E800E8BC5F /* Default.png in Resources */ = {isa 
= PBXBuildFile; fileRef = 57C6E404175E06E800E8BC5F /* Default.png */; };
57C6E407175E06E800E8BC5F /* defa...@2x.png in Resources */ = 
{isa = PBXBuildFile; fileRef = 57C6E406175E06E800E8BC5F /* defa...@2x.png */; };
57C6E409175E06E800E8BC5F /* default-5...@2x.png in Resources */ 
= {isa = PBXBuildFile; fileRef = 57C6E408175E06E800E8BC5F /* 
default-5...@2x.png */; };
-   57C6E40C175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard in 
Resources */ = {isa = PBXBuildFile; fileRef = 57C6E40A175E06E800E8BC5F /* 
MainStoryboard_iPhone.storyboard */; };
+   57C6E40C175E06E800E8BC5F /* iPhone_autolayout.storyboard in 
Resources */ = {isa = PBXBuildFile; fileRef = 57C6E40A175E06E800E8BC5F /* 
iPhone_autolayout.storyboard */; };
57C6E42E175E076900E8BC5F /* Client.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 57C6E427175E076900E8BC5F /* Client.m */; };
57C6E42F175E076900E8BC5F /* CommunicationManager.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 57C6E429175E076900E8BC5F /* 
CommunicationManager.m */; };
57C6E430175E076900E8BC5F /* CommandInterpreter.m in Sources */ 
= {isa = PBXBuildFile; fileRef = 57C6E42B175E076900E8BC5F /* 
Co

[Libreoffice-commits] libvisio.git: 2 commits - src/lib

2013-07-10 Thread Fridrich Štrba
 src/lib/VSDContentCollector.cpp |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 5a38774b5f9bfc2d58e8a7a06effb0bbe7d0debd
Author: Fridrich Å trba 
Date:   Wed Jul 10 10:43:03 2013 +0200

Try not to go out of bonds

diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index 5057370..09fc553 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -1392,24 +1392,23 @@ void 
libvisio::VSDContentCollector::_generateBezierSegmentsFromNURBS(unsigned de
* The NURBS Book, 2nd Edition, 1997
*/
 
-  unsigned m = controlPoints.size() + degree + 1;
   unsigned a = degree;
   unsigned b = degree + 1;
   std::vector< std::pair > points(degree + 1), 
nextPoints(degree + 1);
   unsigned i = 0;
   for (; i <= degree; i++)
 points[i] = controlPoints[i];
-  while (b < m)
+  while (b < knotVector.size() - 1)
   {
 i = b;
-while (b < m && knotVector[b+1] == knotVector[b])
+while (b < knotVector.size() - 1 && knotVector[b+1] == knotVector[b])
   b++;
 unsigned mult = b - i + 1;
 if (mult < degree)
 {
   double numer = (double)(knotVector[b] - knotVector[a]);
   unsigned j = degree;
-  std::map alphas;
+  std::vector alphas(degree - 1, 0.0);
   for (; j >mult; j--)
 alphas[j-mult-1] = numer/double(knotVector[a+j]-knotVector[a]);
   unsigned r = degree - mult;
@@ -1423,7 +1422,7 @@ void 
libvisio::VSDContentCollector::_generateBezierSegmentsFromNURBS(unsigned de
   points[k].first = alpha*points[k].first + 
(1.0-alpha)*points[k-1].first;
   points[k].second = alpha*points[k].second + 
(1.0-alpha)*points[k-1].second;
 }
-if (b < m)
+if (b < knotVector.size() - 1)
 {
   nextPoints[save].first = points[degree].first;
   nextPoints[save].second = points[degree].second;
@@ -1449,7 +1448,7 @@ void 
libvisio::VSDContentCollector::_generateBezierSegmentsFromNURBS(unsigned de
 
 std::swap(points, nextPoints);
 
-if (b < m)
+if (b < knotVector.size() - 1)
 {
   for (i=degree-mult; i <= degree; i++)
   {
commit e7974026dd728d2882962de803c0cfbc29057283
Author: Fridrich Å trba 
Date:   Wed Jul 10 10:09:50 2013 +0200

Fixing back some mistakes paid cash to valgrind

diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index b5bb7d4..5057370 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -989,7 +989,6 @@ void 
libvisio::VSDContentCollector::collectRelCubBezTo(unsigned /* id */, unsign
   transformPoint(x, y);
   m_x = x;
   m_y = y;
-
   WPXPropertyList node;
   node.insert("libwpg:path-action", "C");
   node.insert("svg:x",m_scale*x);
@@ -1272,11 +1271,11 @@ void 
libvisio::VSDContentCollector::collectArcTo(unsigned /* id */, unsigned lev
   transformPoint(x2, y2);
   double angle = 0.0;
   transformAngle(angle);
-  m_x = x2;
-  m_y = y2;
 
   if (bow == 0)
   {
+m_x = x2;
+m_y = y2;
 WPXPropertyList end;
 end.insert("svg:x", m_scale*m_x);
 end.insert("svg:y", m_scale*m_y);
@@ -1295,6 +1294,8 @@ void libvisio::VSDContentCollector::collectArcTo(unsigned 
/* id */, unsigned lev
 bool sweep = (bow < 0);
 transformFlips(sweep, sweep);
 
+m_x = x2;
+m_y = y2;
 arc.insert("svg:rx", m_scale*radius);
 arc.insert("svg:ry", m_scale*radius);
 arc.insert("libwpg:rotate", angle*180/M_PI, WPX_GENERIC);
@@ -2083,9 +2084,9 @@ void libvisio::VSDContentCollector::collectSplineEnd()
 return;
   }
   m_splineKnotVector.push_back(m_splineLastKnot);
-  std::vector weights;
+  std::vector weights(m_splineControlPoints.size()+2);
   for (unsigned i=0; i < m_splineControlPoints.size()+2; i++)
-weights.push_back(1.0);
+weights[i] = 1.0;
   collectNURBSTo(0, m_splineLevel, m_splineX, m_splineY, 1, 1, m_splineDegree, 
m_splineControlPoints, m_splineKnotVector, weights);
   m_splineKnotVector.clear();
   m_splineControlPoints.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libvisio.git: src/lib

2013-07-10 Thread David Tardon
 src/lib/VSDContentCollector.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d8e22ac854217d647753c2f5c4943e167f45b6be
Author: David Tardon 
Date:   Wed Jul 10 10:26:02 2013 +0200

fix condition

diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index d6f55f1..b5bb7d4 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -1527,7 +1527,7 @@ bool libvisio::VSDContentCollector::_isUniform(const 
std::vector weights
   double previousValue = weights[0];
   for (std::vector::size_type i = 0; i < weights.size(); ++i)
   {
-if (fabs(weights[i] - previousValue < LIBVISIO_EPSILON))
+if (fabs(weights[i] - previousValue) < LIBVISIO_EPSILON)
   previousValue = weights[i];
 else
   return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - default_images/framework

2013-07-10 Thread Jürgen Schmidt
 default_images/framework/res/info_26.png |binary
 1 file changed

New commits:
commit dad68328d0e6af44243e2b010fbdf7ca00f215f6
Author: Jürgen Schmidt 
Date:   Wed Jul 10 07:58:18 2013 +

#122620# update small orb used for more info on the start center

diff --git a/default_images/framework/res/info_26.png 
b/default_images/framework/res/info_26.png
index 810f2f5..381d03f 100644
Binary files a/default_images/framework/res/info_26.png and 
b/default_images/framework/res/info_26.png differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Miklos Vajna
 editeng/source/items/frmitems.cxx|4 ++--
 include/editeng/brushitem.hxx|1 +
 sw/source/filter/ww8/docxattributeoutput.cxx |3 +--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 9487b7130609c85ccd9c6ece331bb31e3be68a51
Author: Miklos Vajna 
Date:   Wed Jul 10 09:41:23 2013 +0200

SvxBrushItem::TransparencyToPercent: add this to avoid copypaste

Change-Id: I9b77c0a48b7de39eadae118c24c70ac415898293

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index 8dedafd..987c888 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3567,7 +3567,7 @@ static inline sal_Int8 lcl_PercentToTransparency(long 
nPercent)
 //0xff must not be returned!
 return sal_Int8(nPercent ? (50 + 0xfe * nPercent) / 100 : 0);
 }
-static inline sal_Int8 lcl_TransparencyToPercent(sal_Int32 nTrans)
+sal_Int8 SvxBrushItem::TransparencyToPercent(sal_Int32 nTrans)
 {
 return (sal_Int8)((nTrans * 100 + 127) / 254);
 }
@@ -3584,7 +3584,7 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 rVal <<= (sal_Int32)( aColor.GetRGBColor() );
 break;
 case MID_BACK_COLOR_TRANSPARENCY:
-rVal <<= lcl_TransparencyToPercent(aColor.GetTransparency());
+rVal <<= 
SvxBrushItem::TransparencyToPercent(aColor.GetTransparency());
 break;
 case MID_GRAPHIC_POSITION:
 rVal <<= (style::GraphicLocation)(sal_Int16)eGraphicPos;
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index d18882a..d05ee3b 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -122,6 +122,7 @@ public:
 
 static SvxGraphicPosition   WallpaperStyle2GraphicPos( WallpaperStyle 
eStyle );
 static WallpaperStyle   GraphicPos2WallpaperStyle( SvxGraphicPosition 
ePos );
+static sal_Int8 TransparencyToPercent(sal_Int32 nTrans);
 };
 
 #endif // #ifndef _SVX_BRSHITEM_HXX
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 5a0f8a0..69c3888 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4864,8 +4864,7 @@ void DocxAttributeOutput::FormatBackground( const 
SvxBrushItem& rBrush )
 if (nTransparency)
 {
 // Convert transparency to percent
-// Consider editeng/source/items/frmitems.cxx : 
lcl_TransparencyToPercent() function.
-sal_Int8 nTransparencyPercent = (sal_Int8)((nTransparency * 100 + 
127) / 254);
+sal_Int8 nTransparencyPercent = 
SvxBrushItem::TransparencyToPercent(nTransparency);
 
 // Calculate alpha value
 // Consider oox/source/drawingml/color.cxx : getTransparency() 
function.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libvisio.git: src/lib

2013-07-10 Thread Fridrich Štrba
 src/lib/VSDGeometryList.cpp |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 31b9a3540b83bf0cbceb70ae3acadfc1a800e54e
Author: Fridrich Å trba 
Date:   Wed Jul 10 09:34:19 2013 +0200

SplineStart ends previous spline

diff --git a/src/lib/VSDGeometryList.cpp b/src/lib/VSDGeometryList.cpp
index 8d24fcb..89181b5 100644
--- a/src/lib/VSDGeometryList.cpp
+++ b/src/lib/VSDGeometryList.cpp
@@ -491,6 +491,7 @@ libvisio::VSDGeometryListElement 
*libvisio::VSDPolylineTo3::clone()
 
 void libvisio::VSDSplineStart::handle(VSDCollector *collector) const
 {
+  collector->collectSplineEnd();
   collector->collectSplineStart(m_id, m_level, m_x, m_y, m_secondKnot, 
m_firstKnot, m_lastKnot, m_degree);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Adam Co
 oox/source/token/properties.txt  |1 
 oox/source/vml/vmlshape.cxx  |6 +++
 sw/qa/extras/ooxmlexport/data/fdo66688.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx |   12 ++
 sw/source/filter/ww8/docxattributeoutput.cxx |   50 +++
 5 files changed, 63 insertions(+), 6 deletions(-)

New commits:
commit 728f10576807970b3356eb0d5ad01722b977
Author: Adam Co 
Date:   Tue Jul 9 10:18:05 2013 +0300

fdo#66688: fix for crash on exit and opacity issue

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I32db54e2c49b40bf41005baeba380a4f631d615a
Reviewed-on: https://gerrit.libreoffice.org/4780

diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 0acfe06..d89ae44 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -20,6 +20,7 @@ AutoFilter
 AutoShowInfo
 Autocomplete
 BackColor
+BackColorTransparency
 BackGraphicLocation
 BackGraphicURL
 Background
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index efd5d75..bcf93b6 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -390,6 +390,12 @@ void ShapeBase::convertShapeProperties( const Reference< 
XShape >& rxShape ) con
 aPropMap.setProperty(PROP_BackColor, aPropMap[PROP_FillColor]);
 aPropMap.erase(PROP_FillColor);
 }
+// TextFrames have BackColorTransparency, not FillTransparence
+if (aPropMap.hasProperty(PROP_FillTransparence))
+{
+aPropMap.setProperty(PROP_BackColorTransparency, 
aPropMap[PROP_FillTransparence]);
+aPropMap.erase(PROP_FillTransparence);
+}
 // And no LineColor property; individual borders can have colors and 
widths
 boost::optional oLineWidth;
 if (maTypeModel.maStrokeModel.moWeight.has())
diff --git a/sw/qa/extras/ooxmlexport/data/fdo66688.docx 
b/sw/qa/extras/ooxmlexport/data/fdo66688.docx
new file mode 100644
index 000..300b915
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo66688.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 7230a4c..6b65c90 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -89,6 +89,7 @@ public:
 void testFdo65400();
 void testFdo66543();
 void testN822175();
+void testFdo66688();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -150,6 +151,7 @@ void Test::run()
 {"fdo65400.docx", &Test::testFdo65400},
 {"fdo66543.docx", &Test::testFdo66543},
 {"n822175.odt", &Test::testN822175},
+{"fdo66688.docx", &Test::testFdo66688},
 };
 // Don't test the first import of these, for some reason those tests fail
 const char* aBlacklist[] = {
@@ -902,6 +904,16 @@ void Test::testN822175()
 CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_PARALLEL, 
getProperty(xFrame, "Surround"));
 }
 
+void Test::testFdo66688()
+{
+// The problem was that TextFrame imported and exported the wrong value 
for transparency
+// (was stored as 'FillTransparence' instead of 'BackColorTransparency'
+uno::Reference xFramesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xIndexAccess(xFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+uno::Reference xFrame(xIndexAccess->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL( sal_Int32( 80 ), getProperty< sal_Int32 >( xFrame, 
"BackColorTransparency" ) );
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6bd05a4..5a0f8a0 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -4857,7 +4858,32 @@ void DocxAttributeOutput::FormatBackground( const 
SvxBrushItem& rBrush )
 {
 OString sColor = msfilter::util::ConvertColor( rBrush.GetColor( ) );
 if (m_bTextFrameSyntax)
+{
+// Handle 'Opacity'
+sal_Int32 nTransparency = rBrush.GetColor().GetTransparency();
+if (nTransparency)
+{
+// Convert transparency to percent
+// Consider editeng/source/items/frmitems.cxx : 
lcl_TransparencyToPercent() function.
+sal_Int8 nTransparencyPercent = (sal_Int8)((nTransparency * 100 + 
127) / 254);
+
+// Calculate alpha value
+// Consider oox/source/drawingml/color.cxx : getTransparency() 
function.
+sal_Int32 nAlpha = (::oox::drawingml::MAX_PERCENT - ( 
::oox::drawingml::PER_PERCENT * nTransparencyPercent ) );
+
+// Calculate opacity value
+// Consider oox/source/vml/vmlformatting.cxx : decodeColor() 
function.
+double fOpacity = (do