[Libreoffice-commits] .: 22 commits - sw/source

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Nov 12 06:59:50 PST 2010


 sw/source/core/doc/doc.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ebe0899789a48050539b211942c4ee837382eb55
Merge: 17186fc... bc8e0eb...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Nov 12 15:52:49 2010 +0100

    Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/writer

commit 17186fc51be875efae503b9092dc65f5cb3d5e49
Merge: c115da6... 25a97e7...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Nov 12 14:38:04 2010 +0100

    Merge remote branch 'origin/libreoffice-3-3'

commit 25a97e7c5cd07558f46132b0f9083e51b2976812
Merge: 2a03a2e... ea2f3cd...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Nov 11 18:25:41 2010 +0100

    Merge commit 'ooo/OOO330_m14' into libreoffice-3-3

commit 2a03a2e816b340d047a07de6ba189ef42b69a119
Author: Petr Mladek <pmladek at suse.cz>
Date:   Thu Nov 11 13:25:14 2010 +0100

    Version 3.2.99.3, tag LIBREOFFICE_3_2_99_3 (3.3-beta3)
commit f7516fcc66864146f3b365a237728a9821d2a827
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 10 16:03:44 2010 +0000

    #i115495# fix type promotion problem
    (cherry picked from commit 9c2b85ef9b9a45526f5e4be2573a704364162cb8)

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index f52a173..95fe188 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2573,7 +2573,10 @@ void WW8TabDesc::CreateSwTable()
             else
             {
                 if (nPreferredWidth)                   
-                    nLeft = pIo->maSectionManager.GetTextAreaWidth() - nPreferredWidth  - nOrgDxaLeft;
+                {
+                    nLeft = pIo->maSectionManager.GetTextAreaWidth();
+                    nLeft = nLeft - nPreferredWidth  - nOrgDxaLeft;
+                }
                 else
                     nLeft = -GetMinLeft();
             }
commit 3aeeadee5a2e3bd12eac9f7e8d123ab004eb9585
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Wed Nov 3 19:13:34 2010 +0100

    RTF: Delete leaky pStream after import (fdo#31362)
    
    Not deleting pStream resulted not removing the lock file either.

diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx
index 0e8b2a2..52b4ae8 100644
--- a/sw/source/filter/ww8/rtfimportfilter.cxx
+++ b/sw/source/filter/ww8/rtfimportfilter.cxx
@@ -97,7 +97,9 @@ sal_Bool RtfImportFilter::filter( const uno::Sequence< beans::PropertyValue >& a
     }
 
     RtfReader aReader;
-    return aReader.Read(pStream, *pDoc, aURL, *pCurPam) == 0;
+    sal_Bool bRet = aReader.Read(pStream, *pDoc, aURL, *pCurPam) == 0;
+    delete pStream;
+    return bRet;
 }
 
 
commit 394aa30e6b6490203095cf7ecdac0f565a1b57f9
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 23:00:23 2010 +0200

    Fix linker error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 405be1b..662f9fb 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -75,7 +75,7 @@ class SwWrongList;
 #define DIR_RIGHT2LEFT 2
 #define DIR_TOP2BOTTOM 3
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
 #define OPTCALM( rInf )  (rInf).IsOptCalm()
 #define OPTLOW( rInf )	 (rInf).IsOptLow()
 #define OPTDBG( rInf )	 (rInf).IsOptDbg()
commit fb034832a0076b60abbcf8d3989bf5c2559b6451
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 22:44:25 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index b79e9c0..55964a2 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -622,7 +622,7 @@ void ViewShell::LayoutIdle()
 
     SET_CURR_SHELL( this );
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
     if( pOpt->IsTest5() )
         return;
 #endif
commit 71186e2021b33093764b4887c537dc2e2eab8075
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 22:25:19 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index f21530f..994d0a4 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -184,7 +184,7 @@ void SwLayVout::Enter(  ViewShell *pShell, SwRect &rRect, BOOL bOn )
 {
     Flush();
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
         if( pShell->GetViewOptions()->IsTest3() )
         {
             ++nCount;
commit 5cc4596e430019b3815ab5cb259e18708b143135
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 22:23:30 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx
index 34b4adf..ec7eb6f 100644
--- a/sw/source/core/text/txtio.cxx
+++ b/sw/source/core/text/txtio.cxx
@@ -287,9 +287,14 @@ SvStream &operator<<( SvStream &rOs, const SwpHints & ) //$ ostream
 
 sal_Bool IsDbg( const SwTxtFrm *pFrm )
 {
+// Hmm, so IsTest4 etc are defined only if OSL_DEBUG_LEVEL > 1,
+// but this file is compiled if DBG_UTIL is defined. So should the IsTest4 etc
+// then instead be conditional on DBG_UTIL? Such crack.
+#if OSL_DEBUG_LEVEL > 1
     if( pFrm && pFrm->GetShell() )
         return pFrm->GetShell()->GetViewOptions()->IsTest4();
     else
+#else
         return sal_False;
 }
 
commit 4dd53a245ed1454f32d3aef86573cb2fba3579c8
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 22:19:54 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 7258e41..51c5975 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1804,7 +1804,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
 
         delete pPolyPolygon;
         // UPPER_LOWER_TEST
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
         const SwRootFrm* pTmpRootFrm = pFmt->getIDocumentLayoutAccess()->GetRootFrm();
         if( pTmpRootFrm->GetCurrShell() )
         {
commit bde03bb9ab2805b21870e83d0adf00d40a6a762a
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 22:11:02 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 7cd7356..c6a1bdf 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -118,7 +118,7 @@ namespace numfunc
 static sal_Bool bDbgLow = sal_False;
 #endif
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
 
 sal_Bool SwTxtSizeInfo::IsOptCalm() const { return !GetOpt().IsTest3(); }
 
commit 06d2aa8941dd38f3d47ca01538b3516e0ccbf5ae
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 22:04:15 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 35d27e6..698ce07 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -112,7 +112,7 @@ struct SwContentAtPos
         SW_CONTENT_CHECK    = 0x0400, // #i43742#
         SW_SMARTTAG         = 0x0800,
         SW_FORMCTRL         = 0x1000
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
         ,SW_CURR_ATTRS      = 0x4000        // only for debugging
         ,SW_TABLEBOXVALUE   = 0x8000        // only for debugging
 #endif
commit fee4f215b7b4552bbcd3881014bdbe30e5e75359
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 21:40:31 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 06f3604..3ccb52e 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -583,7 +583,7 @@ long AbstractMailMergeWizard_Impl::GetResult()
     return pDlg->GetResult();
 }
 
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
 IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, pDialog )
 #else
 IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, EMPTYARG )
commit c37ab708ef7a35ce2926e669647fd672a11324f5
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 18:18:27 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index a089a21..9661ab0 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -763,7 +763,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
         // optimiert das die TextEngine.
         USHORT nLastEnd = 0;
 
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
         USHORT nLine = aPortionList[0].nLine;
 #endif
         for ( USHORT i = 0; i < nCount; i++ )
commit 0ba9005467e8ddb36dd65066b18df5e500f9e093
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 18:10:08 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index fd473ab..78e87c3 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -1219,7 +1219,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
         }
         xTempDocShell->DoClose();
 
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
         sal_Int32 nTarget =
 #endif
                 rConfigItem.MoveResultSet(rInfo.nDBRow);
commit 6dcf448819fc2fb2f42479b3a39dc7d4e3b8622a
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 18:08:11 2010 +0200

    Fix compilation error caused by DBG_UTIL vs. OSL_DEBUG_LEVEL mixup

diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 6656e40..093adfd 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1181,7 +1181,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
                     }
                 }
                 catch(Exception&
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
                             aExcept
 #endif
                 )
commit f2feb0d27a34c58defe5763524ffea50f9a87a62
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sun Nov 7 18:03:22 2010 +0200

    Fix compilation error in DBG_UTIL build
    
    When using a testing flag which is defined inside #if OSL_DEBUG_LEVEL>1,
    use the same preprocessor condition. Not #ifdef DBG_UTIL, which is
    orthogonal (apparently).

diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index eb77970..c5c20a0 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -1186,7 +1186,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode,
 
     const SwHTMLTableLayout *pLayout = rTbl.GetHTMLTableLayout();
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
     ViewShell *pSh;
     rWrt.pDoc->GetEditShell( &pSh );
     if ( pSh && pSh->GetViewOptions()->IsTest1() )
commit ea2f3cd49d7aa095e597cf5ec966dd33b77c2813
Merge: 31f654d... 3ce1e3d...
Author: Kurt Zenker <kz at openoffice.org>
Date:   Sat Nov 6 16:46:04 2010 +0100

    CWS-TOOLING: integrate CWS tl88

commit 185865ab0073d8e06f338a5fd4df00641944fe97
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Thu Nov 4 17:29:36 2010 +0100

    setup xml namespaces also for footers and headers (bnc#581954)

diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index c836cd1..146f123 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -63,6 +63,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <vcl/font.hxx>
 
+using namespace sax_fastparser;
 using namespace ::comphelper;
 using namespace ::com::sun::star;
 
@@ -552,9 +553,7 @@ void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char*
         pFS = m_pFilter->openFragmentStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(),
                     S( "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml" ) );
 
-        pFS->startElementNS( XML_w, XML_hdr,
-                FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
-                FSEND );
+        pFS->startElementNS( XML_w, XML_hdr, MainXmlNamespaces( pFS ));
     }
     else
     {
@@ -567,9 +566,7 @@ void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char*
         pFS = m_pFilter->openFragmentStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(),
                     S( "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml" ) );
 
-        pFS->startElementNS( XML_w, XML_ftr,
-                FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
-                FSEND );
+        pFS->startElementNS( XML_w, XML_ftr, MainXmlNamespaces( pFS ));
     }
 
     // switch the serializer to redirect the output to word/styles.xml
@@ -651,14 +648,7 @@ VMLExport& DocxExport::VMLExporter()
 void DocxExport::WriteMainText()
 {
     // setup the namespaces
-    m_pDocumentFS->startElementNS( XML_w, XML_document,
-            FSNS( XML_xmlns, XML_o ), "urn:schemas-microsoft-com:office:office",
-            FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
-            FSNS( XML_xmlns, XML_v ), "urn:schemas-microsoft-com:vml",
-            FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
-            FSNS( XML_xmlns, XML_w10 ), "urn:schemas-microsoft-com:office:word",
-            FSNS( XML_xmlns, XML_wp ), "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
-            FSEND );
+    m_pDocumentFS->startElementNS( XML_w, XML_document, MainXmlNamespaces( m_pDocumentFS ));
 
     // body
     m_pDocumentFS->startElementNS( XML_w, XML_body, FSEND );
@@ -678,6 +668,18 @@ void DocxExport::WriteMainText()
     m_pDocumentFS->endElementNS( XML_w, XML_document );
 }
 
+XFastAttributeListRef DocxExport::MainXmlNamespaces( FSHelperPtr serializer )
+{
+    FastAttributeList* pAttr = serializer->createAttrList();
+    pAttr->add( FSNS( XML_xmlns, XML_o ), "urn:schemas-microsoft-com:office:office" );
+    pAttr->add( FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships" );
+    pAttr->add( FSNS( XML_xmlns, XML_v ), "urn:schemas-microsoft-com:vml" );
+    pAttr->add( FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main" );
+    pAttr->add( FSNS( XML_xmlns, XML_w10 ), "urn:schemas-microsoft-com:office:word" );
+    pAttr->add( FSNS( XML_xmlns, XML_wp ), "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" );
+    return XFastAttributeListRef( pAttr );
+}
+
 DocxExport::DocxExport( DocxExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam )
     : MSWordExportBase( pDocument, pCurrentPam, pOriginalPam ),
       m_pFilter( pFilter ),
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 81d2a02..2a7fcd0 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -33,6 +33,7 @@
 #include "wrtww8.hxx"
 
 #include <sax/fshelper.hxx>
+#include <sax/fastattribs.hxx>
 #include <rtl/ustring.hxx>
 
 #include <cstdio>
@@ -157,8 +158,6 @@ protected:
 
     virtual void OutputLinkedOLE( const rtl::OUString& );
 
-
-
     virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
 
     virtual void SectionBreaksAndFrames( const SwTxtNode& /*rNode*/ ) {}
@@ -188,6 +187,9 @@ private:
     /// Write docProps/core.xml
     void WriteProperties();
 
+    /// All xml namespaces to be used at the top of any text .xml file (main doc, headers, footers,...)
+    sax_fastparser::XFastAttributeListRef MainXmlNamespaces( sax_fastparser::FSHelperPtr serializer );
+
 public:
     /// FIXME this is temporary, remotely reminding the method of the same
     /// name in WW8Export.
commit 3ce1e3d5c494d5f467d43bdfe52be7b8c91eb684
Author: Thomas Lange [tl] <tl at openoffice.org>
Date:   Wed Nov 3 14:59:06 2010 +0100

    cws tl88: #i115354# crash when opening File/Print dialog fixed

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index a470440..4cd3601 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -631,6 +631,8 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
 
 SwPrintData* SwDoc::getPrintData() const
 {
+    if(!pPrtData)
+        ((SwDoc*)this)->pPrtData = new SwPrintData;
     return pPrtData;
 }
 
commit 9e2d9edb05e0793bd32a84cde0a18dfd6fe0adde
Author: Jonas Finnemann Jensen <jopsen at gmail.com>
Date:   Tue Nov 2 20:13:22 2010 +0100

    Fixed crash when choosing starmath from start screen

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 120e3b5..7874d06 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -207,7 +207,10 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
 
 bool SmGraphicWindow::IsInlineEditEnabled() const
 {
-    return pViewShell->GetEditWindow()->IsInlineEditEnabled();
+    //Avoid crash on startup (happens when starmath is selected from splash screen)
+    if(pViewShell->GetEditWindow())
+        return pViewShell->GetEditWindow()->IsInlineEditEnabled();
+    return false;
 }
 
 void SmGraphicWindow::GetFocus()


More information about the Libreoffice-commits mailing list