[Libreoffice-commits] .: 3 commits - lotuswordpro/source

David Tardon dtardon at kemper.freedesktop.org
Sun Mar 27 08:04:49 PDT 2011


 lotuswordpro/source/filter/LotusWordProImportFilter.cxx |   10 +++++-----
 lotuswordpro/source/filter/lwpfootnote.cxx              |    2 +-
 lotuswordpro/source/filter/lwpfootnote.hxx              |    2 +-
 lotuswordpro/source/filter/lwpfribptr.cxx               |    6 +++---
 lotuswordpro/source/filter/lwpfribtable.cxx             |    4 ++--
 lotuswordpro/source/filter/lwpfribtable.hxx             |    2 +-
 lotuswordpro/source/filter/lwpnotes.cxx                 |    2 +-
 lotuswordpro/source/filter/lwpnotes.hxx                 |    2 +-
 lotuswordpro/source/filter/lwpoleobject.cxx             |    6 ++----
 lotuswordpro/source/filter/lwppagelayout.hxx            |    2 ++
 lotuswordpro/source/filter/lwprowlayout.cxx             |    3 +--
 lotuswordpro/source/filter/lwptablelayout.cxx           |    6 +++---
 lotuswordpro/source/filter/lwptablelayout.hxx           |    5 +++--
 lotuswordpro/source/filter/xfilter/xfcell.hxx           |    2 ++
 lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx      |    2 ++
 lotuswordpro/source/filter/xfilter/xfframe.hxx          |    2 ++
 16 files changed, 32 insertions(+), 26 deletions(-)

New commits:
commit 6ee4d4a12c21401e67042ecdd102a8be3f2949ac
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Mar 27 17:02:29 2011 +0200

    WaE: overloaded virtual

diff --git a/lotuswordpro/source/filter/lwpfootnote.cxx b/lotuswordpro/source/filter/lwpfootnote.cxx
index 8f9dae4..be3888d 100644
--- a/lotuswordpro/source/filter/lwpfootnote.cxx
+++ b/lotuswordpro/source/filter/lwpfootnote.cxx
@@ -89,7 +89,7 @@ void LwpFribFootnote::Read(LwpObjectStream * pObjStrm, sal_uInt16 /*len*/)
 /**
  * @descr  Register footnote style by calling LwpFootnote::RegisterStyle()
  */
-void LwpFribFootnote::RegisterStyle()
+void LwpFribFootnote::RegisterNewStyle()
 {
     LwpFootnote* pFootnote = GetFootnote();
     if(pFootnote)
diff --git a/lotuswordpro/source/filter/lwpfootnote.hxx b/lotuswordpro/source/filter/lwpfootnote.hxx
index 7455bef..d995d8b 100644
--- a/lotuswordpro/source/filter/lwpfootnote.hxx
+++ b/lotuswordpro/source/filter/lwpfootnote.hxx
@@ -108,7 +108,7 @@ public:
     LwpFribFootnote(LwpPara* pPara );
     ~LwpFribFootnote(){}
     void Read(LwpObjectStream* pObjStrm, sal_uInt16 len);
-    void RegisterStyle();
+    void RegisterNewStyle();
     void XFConvert(XFContentContainer* pCont);
     LwpFootnote* GetFootnote();
 
diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx b/lotuswordpro/source/filter/lwpfribptr.cxx
index b5fa4d9..61e3113 100644
--- a/lotuswordpro/source/filter/lwpfribptr.cxx
+++ b/lotuswordpro/source/filter/lwpfribptr.cxx
@@ -546,19 +546,19 @@ void LwpFribPtr::RegisterStyle()
                 case FRIB_TAG_TABLE:
                 {
                     LwpFribTable* tableFrib = static_cast<LwpFribTable*>(pFrib);
-                    tableFrib->RegisterStyle();
+                    tableFrib->RegisterNewStyle();
                 }
                     break;
         case FRIB_TAG_FOOTNOTE:
         {
             LwpFribFootnote* pFribFootnote = static_cast<LwpFribFootnote*>(pFrib);
-            pFribFootnote->RegisterStyle();
+            pFribFootnote->RegisterNewStyle();
         }
             break;
         case FRIB_TAG_NOTE:
         {
             LwpFribNote* pNoteFrib = static_cast<LwpFribNote*>(pFrib);
-            pNoteFrib->RegisterStyle();
+            pNoteFrib->RegisterNewStyle();
             break;
         }
         case FRIB_TAG_PAGENUMBER:
diff --git a/lotuswordpro/source/filter/lwpfribtable.cxx b/lotuswordpro/source/filter/lwpfribtable.cxx
index 92b8e88..67c320f 100644
--- a/lotuswordpro/source/filter/lwpfribtable.cxx
+++ b/lotuswordpro/source/filter/lwpfribtable.cxx
@@ -76,9 +76,9 @@ LwpSuperTableLayout* LwpFribTable::GetSuperTable()
     return static_cast<LwpSuperTableLayout*>(m_objTable.obj());
 }
 
-void LwpFribTable::RegisterStyle()
+void LwpFribTable::RegisterNewStyle()
 {
-    GetSuperTable()->RegisterStyle();
+    GetSuperTable()->RegisterNewStyle();
     XFParaStyle* pOldStyle = m_pPara->GetXFParaStyle();
     if(HasNextFrib())
     {
diff --git a/lotuswordpro/source/filter/lwpfribtable.hxx b/lotuswordpro/source/filter/lwpfribtable.hxx
index eabbdee..20f3122 100644
--- a/lotuswordpro/source/filter/lwpfribtable.hxx
+++ b/lotuswordpro/source/filter/lwpfribtable.hxx
@@ -66,7 +66,7 @@ public:
     ~LwpFribTable(){}
     void Read(LwpObjectStream* pObjStrm, sal_uInt16 len);
     LwpSuperTableLayout* GetSuperTable();
-    void RegisterStyle();
+    void RegisterNewStyle();
     void Parse(IXFStream* pOutputStream);
     virtual void XFConvert(XFContentContainer* pCont);
 private:
diff --git a/lotuswordpro/source/filter/lwpnotes.cxx b/lotuswordpro/source/filter/lwpnotes.cxx
index 7e0bf3e..fc924b1 100644
--- a/lotuswordpro/source/filter/lwpnotes.cxx
+++ b/lotuswordpro/source/filter/lwpnotes.cxx
@@ -83,7 +83,7 @@ void LwpFribNote::Read(LwpObjectStream *pObjStrm, sal_uInt16 /*len*/)
 /**
  * @descr  Register style
  */
-void LwpFribNote::RegisterStyle()
+void LwpFribNote::RegisterNewStyle()
 {
     LwpObject* pLayout = m_Layout.obj();
     if(pLayout)
diff --git a/lotuswordpro/source/filter/lwpnotes.hxx b/lotuswordpro/source/filter/lwpnotes.hxx
index 5b24cbd..6441435 100644
--- a/lotuswordpro/source/filter/lwpnotes.hxx
+++ b/lotuswordpro/source/filter/lwpnotes.hxx
@@ -77,7 +77,7 @@ public:
     LwpFribNote(LwpPara* pPara );
     ~LwpFribNote(){}
     void Read(LwpObjectStream* pObjStrm, sal_uInt16 len);
-    void RegisterStyle();
+    void RegisterNewStyle();
     void XFConvert(XFContentContainer* pCont);
 private:
     LwpObjectID m_Layout;
diff --git a/lotuswordpro/source/filter/lwppagelayout.hxx b/lotuswordpro/source/filter/lwppagelayout.hxx
index 709d311..1067f6f 100644
--- a/lotuswordpro/source/filter/lwppagelayout.hxx
+++ b/lotuswordpro/source/filter/lwppagelayout.hxx
@@ -121,6 +121,7 @@ public:
     LwpHeaderLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     ~LwpHeaderLayout();
     virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_HEADER_LAYOUT;}
+    using LwpPlacableLayout::RegisterStyle;
     void RegisterStyle( XFPageMaster* pm1 );
     void RegisterStyle( XFMasterPage* mp1 );
 protected:
@@ -146,6 +147,7 @@ public:
     LwpFooterLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     ~LwpFooterLayout();
     virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_FOOTER_LAYOUT;}
+    using LwpPlacableLayout::RegisterStyle;
     void RegisterStyle(XFPageMaster* pm1);
     void RegisterStyle(XFMasterPage* mp1);
 protected:
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index c1fb757..db5e5ab 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -160,7 +160,7 @@ LwpTableHeadingLayout* LwpSuperTableLayout::GetTableHeadingLayout()
 /**
  * @short   Register super table layout style
  */
-void LwpSuperTableLayout::RegisterStyle()
+void LwpSuperTableLayout::RegisterNewStyle()
 {
     // if this layout is style of real table entry
     LwpTableLayout* pTableLayout = GetTableLayout();
@@ -758,7 +758,7 @@ void LwpTableLayout::RegisterStyle()
     RegisterRows();
 
     // Parse table
-    Parse();
+    ParseTable();
 
 
     //Comment:The old code doesn't check if the LwpFoundry pointer is NULL,
@@ -773,7 +773,7 @@ void LwpTableLayout::RegisterStyle()
  * @short   read table layout
  * @param   none
  */
-void LwpTableLayout::Parse()
+void LwpTableLayout::ParseTable()
 {
     // get super table layout
     LwpSuperTableLayout * pSuper = GetSuperTableLayout();
diff --git a/lotuswordpro/source/filter/lwptablelayout.hxx b/lotuswordpro/source/filter/lwptablelayout.hxx
index 8a6366d..a9fc5ce 100644
--- a/lotuswordpro/source/filter/lwptablelayout.hxx
+++ b/lotuswordpro/source/filter/lwptablelayout.hxx
@@ -109,7 +109,7 @@ protected:
     void TraverseTable();
     void RegisterColumns();
     void RegisterRows();
-    void Parse();
+    void ParseTable();
     void PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_uInt16 nColID);
 
     sal_uInt16 m_nRows;
@@ -163,7 +163,7 @@ public:
     LwpSuperTableLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     virtual ~LwpSuperTableLayout();
     virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_SUPERTABLE_LAYOUT;}
-    void RegisterStyle();
+    void RegisterNewStyle();
     // for table style
     // add by , 06/03/2005
     void ApplyPatternFill(XFTableStyle* pTableStyle);
@@ -203,6 +203,7 @@ public:
     virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_COLUMN_LAYOUT;}
     sal_uInt32 GetColumnID(){return ccolid;}
     double GetWidth(){return LwpTools::ConvertFromUnitsToMetric(cwidth);}
+    using LwpVirtualLayout::RegisterStyle;
     void RegisterStyle(double dCalculatedWidth);
     sal_Bool IsJustifiable(){return (( m_nAttributes2 & STYLE2_JUSTIFIABLE) != 0);}
 protected:
diff --git a/lotuswordpro/source/filter/xfilter/xfcell.hxx b/lotuswordpro/source/filter/xfilter/xfcell.hxx
index 9304221..aee49cf 100644
--- a/lotuswordpro/source/filter/xfilter/xfcell.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfcell.hxx
@@ -83,6 +83,8 @@ public:
     virtual ~XFCell();
 
 public:
+    using XFContentContainer::Add;
+
     /**
      * @descr	Add content for table cell.
      */
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx b/lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx
index cbf3595..aad46ab 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx
@@ -74,6 +74,8 @@ public:
     XFDrawGroup(){}
 
 public:
+    using XFDrawObject::Add;
+
     /**
      * @descr	Add a drawing object to the group.
      */
diff --git a/lotuswordpro/source/filter/xfilter/xfframe.hxx b/lotuswordpro/source/filter/xfilter/xfframe.hxx
index c1a6ec8..2170022 100644
--- a/lotuswordpro/source/filter/xfilter/xfframe.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfframe.hxx
@@ -85,6 +85,8 @@ public:
     virtual ~XFFrame();
 
 public:
+    using XFContentContainer::Add;
+
     /**
      * @descr	override the add function to adjust z-index.
      */
commit 56f82039cd89e5c338f328a1fc9ae413b88bef88
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Mar 27 16:58:13 2011 +0200

    WaE: unused variable

diff --git a/lotuswordpro/source/filter/lwpoleobject.cxx b/lotuswordpro/source/filter/lwpoleobject.cxx
index a363846..823d811 100644
--- a/lotuswordpro/source/filter/lwpoleobject.cxx
+++ b/lotuswordpro/source/filter/lwpoleobject.cxx
@@ -214,14 +214,12 @@ void LwpOleObject::Read()
 
     cPersistentFlags = m_pObjStrm->QuickReaduInt16();
 
-    sal_uInt16 nNonVersionedPersistentFlags = 0;
-    sal_uInt16 nNumberOfPages = 0;
     // qCMarker read
     LwpObjectID ID;
 
     if (LwpFileHeader::m_nFileRevision >= 0x0004)
     {
-        nNonVersionedPersistentFlags = m_pObjStrm->QuickReaduInt16();
+        m_pObjStrm->QuickReaduInt16();
 
         OUString sFormat = m_pObjStrm->QuickReadStringPtr();
 
@@ -246,7 +244,7 @@ void LwpOleObject::Read()
 
     if (m_pObjStrm->CheckExtra())
     {
-        nNumberOfPages = m_pObjStrm->QuickReaduInt16();
+        m_pObjStrm->QuickReaduInt16();
         m_pObjStrm->SkipExtra();
     }
 
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index a4690c2..f97e3d9 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -125,10 +125,9 @@ void LwpRowLayout::RegisterStyle()
     m_StyleName = pXFStyleManager->AddStyle(pRowStyle)->GetStyleName();
 
     LwpTableLayout* pTableLayout = GetParentTableLayout();
-    LwpTable * pTable = NULL;
     if (pTableLayout)
     {
-        pTable = pTableLayout->GetTable();
+        pTableLayout->GetTable();
     }
     // register cells' style
     LwpObjectID *pCellID= GetChildHead();
commit 34443c02e2ee2051f8e3fc564f9c01536e8dff2b
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Mar 27 15:34:51 2011 +0200

    WaE: unused variable

diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index e920859..b32888a 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
@@ -317,14 +317,13 @@ OUString SAL_CALL LotusWordProImportFilter::detect( com::sun::star::uno::Sequenc
 
     OUString sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "" ) );
     sal_Int32 nLength = Descriptor.getLength();
-    sal_Int32 location = nLength;
     OUString sURL;
     const PropertyValue * pValue = Descriptor.getConstArray();
     uno::Reference < XInputStream > xInputStream;
     for ( sal_Int32 i = 0 ; i < nLength; i++)
     {
         if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "TypeName" ) ) )
-            location=i;
+            pValue[i].Value >>= sTypeName;
         else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InputStream" ) ) )
             pValue[i].Value >>= xInputStream;
         else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
@@ -350,9 +349,10 @@ OUString SAL_CALL LotusWordProImportFilter::detect( com::sun::star::uno::Sequenc
 
     Sequence< ::sal_Int8 > aData;
     sal_Int32 nLen = SAL_N_ELEMENTS( header );
-    if ( ( nLen == xInputStream->readBytes(  aData, nLen ) ) )
-        if ( memcmp( ( void* )header, (void*) aData.getConstArray(), nLen ) == 0 )
-            sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_LotusWordPro_Document" ) );
+    if ( !( ( nLen == xInputStream->readBytes( aData, nLen ) )
+                && ( memcmp( ( void* )header, (void*) aData.getConstArray(), nLen ) == 0 ) ) )
+        sTypeName = ::rtl::OUString();
+
     return sTypeName;
 }
 


More information about the Libreoffice-commits mailing list