1. mst
  2. ooo340

Commits

Bjoern Michaelsen  committed af417cb

swbookmarkfixes01: fix little buildbreakers from various platforms

  • Participants
  • Parent commits 541dc7b
  • Branches default

Comments (0)

Files changed (9)

File sw/qa/core/bigpointerarray/Test-BigPtrArray.cxx

View file
  • Ignore whitespace
         return true;
     }
 
-    void dumpBigPtrArray(const BigPtrArray& bparr)
-    {
-    #ifdef ENABLE_DEBUG_OUTPUT
-        for (int i = 0; i < bparr.Count(); i++)
-            printf("bparr[%i,%i]: %i\n", i, static_cast<BigPtrEntryMock*>(bparr[i])->Position(), static_cast<BigPtrEntryMock*>(bparr[i])->getCount());
-
-        printf("\n");
-    #endif
-    }
+    void dumpBigPtrArray(const BigPtrArray& /* bparr */)
+    {}
+//    #ifdef ENABLE_DEBUG_OUTPUT
+//        for (int i = 0; i < bparr.Count(); i++)
+//            printf("bparr[%i,%i]: %i\n", i, static_cast<BigPtrEntryMock*>(bparr[i])->Position(), static_cast<BigPtrEntryMock*>(bparr[i])->getCount());
+//
+//        printf("\n");
+//    #endif
+//    }
 
     void fillBigPtrArray(BigPtrArray& bparr, ULONG numEntries)
     {
-        for (int i = 0; i < numEntries; i++)
+        for (unsigned int i = 0; i < numEntries; i++)
             bparr.Insert(new BigPtrEntryMock(i), bparr.Count());
     }
 
-    void printMethodName(const char* name)
-    {
-    #ifdef ENABLE_DEBUG_OUTPUT
-        printf(name);
-    #endif
-    }
+    void printMethodName(const char* /* name */ )
+    {}
+//    #ifdef ENABLE_DEBUG_OUTPUT
+//        printf(name);
+//    #endif
+//    }
 
     bool checkElementPositions(const BigPtrArray& bparr)
     {
-        for (int i = 0; i < bparr.Count(); i++)
+        for (unsigned int i = 0; i < bparr.Count(); i++)
         {
             if (static_cast<BigPtrEntryMock*>(bparr[i])->Position() != i)
                 return false;
 
     void releaseBigPtrArrayContent(BigPtrArray& bparr)
     {
-        for (int i = 0; i < bparr.Count(); i++)
+        for (unsigned int i = 0; i < bparr.Count(); i++)
             delete bparr[i];
     }
 
         fillBigPtrArray(bparr, NUM_ENTRIES);
         dumpBigPtrArray(bparr);
 
-        int oldCount = bparr.Count();
+        unsigned int oldCount = bparr.Count();
 
         for (int i = 0, j = -5; i < 5; i++, j++)
             bparr.Insert(new BigPtrEntryMock(j), i);
             (oldCount + 5 == bparr.Count())
         );
 
-        for (int i = 0, j = -5; i < bparr.Count(); i++, j++)
+        for (unsigned int i = 0, j = -5; i < bparr.Count(); i++, j++)
         {
             CPPUNIT_ASSERT_MESSAGE
             (
                 "test_insert_at_already_used_index failed",
-                static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == j
+                ((unsigned int)static_cast<BigPtrEntryMock*>(bparr[i])->getCount()) == j
             );
         }
 
                 (oldCount - 1 == bparr.Count())
             );
 
-            for (int j = 0, k = i + 1; j < bparr.Count(); j++, k++)
+            for (unsigned int j = 0, k = i + 1; j < bparr.Count(); j++, k++)
             {
                 CPPUNIT_ASSERT_MESSAGE
                 (
                     "test_remove_at_front failed",
-                    static_cast<BigPtrEntryMock*>(bparr[j])->getCount() == k
+                    ((unsigned int)static_cast<BigPtrEntryMock*>(bparr[j])->getCount()) == k
                 );
             }
 
                 (oldCount - 1 == bparr.Count())
             );
 
-            for (int j = 0; j < bparr.Count(); j++)
+            for (unsigned int j = 0; j < bparr.Count(); j++)
             {
                 CPPUNIT_ASSERT_MESSAGE
                 (
                     "test_remove_at_back failed",
-                    static_cast<BigPtrEntryMock*>(bparr[j])->getCount() == j
+                    ((unsigned int)static_cast<BigPtrEntryMock*>(bparr[j])->getCount()) == j
                 );
             }
 
                 (oldCount - 1 == bparr.Count())
             );
 
-            for (int i = 0; i < bparr.Count(); i++)
+            for (unsigned int i = 0; i < bparr.Count(); i++)
             {
                 CPPUNIT_ASSERT_MESSAGE
                 (
             ULONG nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
             ULONG oldCount = bparr.Count();
 
-            for (int i = 0; i < nRemove; i++)
+            for (unsigned int i = 0; i < nRemove; i++)
                 delete bparr[i];
 
             bparr.Remove(0, nRemove);

File sw/qa/core/bigpointerarray/makefile.mk

View file
  • Ignore whitespace
 	$(SLO)$/bparr.obj
 
 SHL1TARGET=$(TARGET)
+SHL1RPATH = NONE
 SHL1STDLIBS=$(SALLIB) $(TOOLSLIB) $(CPPUNITLIB)
 
 SHL1IMPLIB= i$(SHL1TARGET)

File sw/source/core/frmedt/fedesc.cxx

View file
  • Ignore whitespace
 
 void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
 {
-#ifdef DBG_UTIL
-	//Die SS veraendert keinen PageDesc, sondern setzt nur das Attribut.
-	//Der Pagedesc muss im Dokument vorhanden sein!
-	BOOL bFound = FALSE;
-	for ( USHORT nTst = 0; nTst < GetPageDescCnt(); ++nTst )
-		if ( &rDesc == &GetPageDesc( nTst ) )
-			bFound = TRUE;
-	ASSERT( bFound, "ChgCurPageDesc mit ungueltigem Descriptor." );
-#endif
-
+    OSL_ENSURE(&rDesc == GetDoc()->getIDocumentPageDescAccess()->GetPageDescByName(rDesc.GetName()), "<SwFEShell::ChgCurPageDesc(..)>"
+        " - SwPageDesc is not in document.");
 	StartAllAction();
 
 	SwPageFrm *pPage = GetCurrFrm()->FindPageFrm();

File sw/source/core/frmedt/makefile.mk

View file
  • Ignore whitespace
 
 
 SLOFILES =  $(EXCEPTIONSFILES) \
-		$(SLO)$/fedesc.obj \
 		$(SLO)$/feflyole.obj \
 		$(SLO)$/feshview.obj \
 		$(SLO)$/fetab.obj \
         
 EXCEPTIONSFILES=\
 		$(SLO)$/fecopy.obj \
+		$(SLO)$/fedesc.obj \
 		$(SLO)$/fefly1.obj \
 		$(SLO)$/fews.obj
         

File sw/source/core/layout/atrfrm.cxx

View file
  • Ignore whitespace
     return SW_RES(STR_FRAME);
 }
 
-void SwFrmFmt::CopyHeaderFooterFrom(const SwFrmFmt* pSrcFmt, const bool bCpyHeader)
+void SwFrmFmt::CopyHeaderFooterFrom(const SwFrmFmt* pSrcFmt, bool bCpyHeader)
 {
     ::boost::scoped_ptr< ::sw::pagedesc::HeaderFooter> pNewItem;
     {

File sw/source/filter/rtf/makefile.mk

View file
  • Ignore whitespace
 EXCEPTIONSFILES=	\
         $(SLO)$/rtffly.obj \
         $(SLO)$/rtfnum.obj \
+		$(SLO)$/rtftbl.obj \
 		$(SLO)$/swparrtf.obj \
 		$(SLO)$/wrtrtf.obj
 
 SLOFILES =	\
 		$(SLO)$/rtfatr.obj \
 		$(SLO)$/rtffld.obj \
-		$(SLO)$/rtffly.obj \
-		$(SLO)$/rtfnum.obj \
-		$(SLO)$/rtftbl.obj \
-		$(SLO)$/swparrtf.obj \
-		$(SLO)$/wrtrtf.obj
+        $(EXCEPTIONSFILES)
 
 # --- Tagets -------------------------------------------------------
 

File sw/source/filter/rtf/wrtrtf.cxx

View file
  • Ignore whitespace
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
 #include <IDocumentPageDescAccess.hxx>
 #include <IDocumentMarkAccess.hxx>
+#include <algorithm>
 
 
 namespace
             { return m_vPageDescs[nIdx]; }
         container_t::difference_type GetIndex(element_type pPageDesc) const
         {
-            return find(
+            return ::std::find(
                 m_vPageDescs.begin(),
                 m_vPageDescs.end(),
                 pPageDesc) - m_vPageDescs.begin();

File sw/source/filter/writer/makefile.mk

View file
  • Ignore whitespace
         wrt_fn.cxx \
         wrtswtbl.cxx
 
-SLOFILES =  \
+EXCEPTIONSFILES = \
 		$(SLO)$/writer.obj \
         $(SLO)$/wrt_fn.obj \
         $(SLO)$/wrtswtbl.obj
 
+SLOFILES = $(EXCEPTIONSFILES)
+
 # --- Tagets -------------------------------------------------------
 
 .INCLUDE :  target.mk

File sw/source/ui/wrtsh/makefile.mk

View file
  • Ignore whitespace
 		wrtsh.src
 
 SLOFILES =  \
-		$(SLO)$/move.obj \
-		$(SLO)$/select.obj \
-		$(SLO)$/wrtsh1.obj \
-		$(SLO)$/wrtsh2.obj \
-		$(SLO)$/wrtsh3.obj \
-		$(SLO)$/wrtsh4.obj \
-		$(SLO)$/delete.obj \
-		$(SLO)$/wrtundo.obj
+    $(EXCEPTIONSFILES)
 
 EXCEPTIONSFILES = \
+        $(SLO)$/delete.obj \
+        $(SLO)$/move.obj \
+        $(SLO)$/select.obj \
         $(SLO)$/wrtsh1.obj \
-		$(SLO)$/wrtsh2.obj
+        $(SLO)$/wrtsh1.obj \
+        $(SLO)$/wrtsh2.obj \
+        $(SLO)$/wrtsh2.obj \
+        $(SLO)$/wrtsh3.obj \
+        $(SLO)$/wrtsh4.obj \
+        $(SLO)$/wrtundo.obj
 
 # --- Tagets -------------------------------------------------------