[Libreoffice] Compiled failed in sw

Miklos Vajna vmiklos at frugalware.org
Tue Mar 22 02:14:10 PDT 2011


On Tue, Mar 22, 2011 at 01:57:29AM +0100, Miklos Vajna <vmiklos at frugalware.org> wrote:
> No, I got "sw" to build with gnumake already, though I get the same
> error after the last pull. I just started a full rebuild; if it's there,
> it worths checking what's the problem.

The attached patch fixes the problem here. OK to push?

Thanks.
-------------- next part --------------
From 8ab643a9d618827c4e58072f98ef951f3c0a0d2e Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos at frugalware.org>
Date: Tue, 22 Mar 2011 10:02:11 +0100
Subject: [PATCH] docx: cast sal_uInt16 to sal_Int32 explicitely

To fix the
error: call of overloaded 'valueOf(sal_uInt16)' is ambiguous
problem.
---
 sw/source/filter/ww8/docxattributeoutput.cxx |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index baf9879..040aca4 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2449,10 +2449,10 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
 void DocxAttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo )
 {
     FastAttributeList* pAttr = m_pSerializer->createAttrList();
-    pAttr->add( FSNS( XML_w, XML_countBy ), OString::valueOf( rLnNumInfo.GetCountBy()).getStr());
+    pAttr->add( FSNS( XML_w, XML_countBy ), OString::valueOf( sal_Int32(rLnNumInfo.GetCountBy()) ).getStr());
     pAttr->add( FSNS( XML_w, XML_restart ), rLnNumInfo.IsRestartEachPage() ? "newPage" : "continuous" );
     if( rLnNumInfo.GetPosFromLeft())
-        pAttr->add( FSNS( XML_w, XML_distance ), OString::valueOf( rLnNumInfo.GetPosFromLeft()).getStr());
+        pAttr->add( FSNS( XML_w, XML_distance ), OString::valueOf( sal_Int32(rLnNumInfo.GetPosFromLeft() )).getStr());
     if( nRestartNo )
         pAttr->add( FSNS( XML_w, XML_start ), OString::valueOf( long( nRestartNo )).getStr());
     XFastAttributeListRef xAttrs( pAttr );
-- 
1.7.4.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110322/ff0db154/attachment.pgp>


More information about the LibreOffice mailing list