[Libreoffice-commits] .: 5 commits - Repository.mk RepositoryExternal.mk connectivity/source extensions/CppunitTest_extensions_test_update.mk svtools/source sw/CppunitTest_sw_macros_test.mk sw/source

Michael Stahl mst at kemper.freedesktop.org
Fri Dec 9 06:19:10 PST 2011


 Repository.mk                                      |    1 
 RepositoryExternal.mk                              |   30 -
 connectivity/source/drivers/dbase/DNoException.cxx |  618 ---------------------
 extensions/CppunitTest_extensions_test_update.mk   |    3 
 svtools/source/misc/imagemgr.src                   |   22 
 sw/CppunitTest_sw_macros_test.mk                   |    4 
 sw/source/core/doc/doc.cxx                         |   20 
 sw/source/core/doc/docbm.cxx                       |    9 
 sw/source/core/doc/doccomp.cxx                     |    2 
 sw/source/core/doc/docfld.cxx                      |   23 
 10 files changed, 74 insertions(+), 658 deletions(-)

New commits:
commit 3cbb44bdb4ad075e4dc26d35a7dfc04cf8a8c46d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Dec 9 15:10:23 2011 +0100

    svtools: imagemgr.src: use %PRODUCTXMLFILEFORMATNAME
    
    Currently on File->Properties we display "LibreOffice 1.0 Text Document"
    etc. for OpenOffice.org XML format documents, which is wrong: these
    should not be re-branded.

diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src
index ca4a075..1ab37cb 100644
--- a/svtools/source/misc/imagemgr.src
+++ b/svtools/source/misc/imagemgr.src
@@ -289,19 +289,19 @@ String STR_DESCRIPTION_FACTORY_DATABASE
 };
 String STR_DESCRIPTION_CALC_TEMPLATE
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Spreadsheet Template" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Spreadsheet Template" ;
 };
 String STR_DESCRIPTION_DRAW_TEMPLATE
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Drawing Template" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Drawing Template" ;
 };
 String STR_DESCRIPTION_IMPRESS_TEMPLATE
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Presentation Template" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Presentation Template" ;
 };
 String STR_DESCRIPTION_WRITER_TEMPLATE
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Text Document Template" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Text Document Template" ;
 };
 String STR_DESCRIPTION_LOCALE_VOLUME
 {
@@ -336,37 +336,37 @@ String STR_DESCRIPTION_POWERPOINT_SHOW
 
 String STR_DESCRIPTION_SXMATH_DOC
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Formula" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Formula" ;
 };
 
 String STR_DESCRIPTION_SXCHART_DOC
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Chart" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Chart" ;
 };
 
 String STR_DESCRIPTION_SXDRAW_DOC
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Drawing" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Drawing" ;
 };
 
 String STR_DESCRIPTION_SXCALC_DOC
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Spreadsheet" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Spreadsheet" ;
 };
 
 String STR_DESCRIPTION_SXIMPRESS_DOC
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Presentation" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Presentation" ;
 };
 
 String STR_DESCRIPTION_SXWRITER_DOC
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Text Document" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Text Document" ;
 };
 
 String STR_DESCRIPTION_SXGLOBAL_DOC
 {
-    Text [ en-US ] = "%PRODUCTNAME %PRODUCTXMLFILEFORMATVERSION Master Document" ;
+    Text [ en-US ] = "%PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION Master Document" ;
 };
 String STR_DESCRIPTION_MATHML_DOC
 {
commit ca4483b55b7ec9d15dfb29def31e2d7ea9038695
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Dec 7 12:57:51 2011 +0100

    CppunitTest_sw_macros_test.mk: depends on vbaswobj
    
    This should fix the spurious segfaults caused by running the test while
    the library is being overwritten in parallel that cannot be reproduced
    by just running the test.

diff --git a/sw/CppunitTest_sw_macros_test.mk b/sw/CppunitTest_sw_macros_test.mk
index 9c2c11f..a640452 100644
--- a/sw/CppunitTest_sw_macros_test.mk
+++ b/sw/CppunitTest_sw_macros_test.mk
@@ -137,6 +137,8 @@ $(eval $(call gb_CppunitTest_set_args,sw_macros_test,\
 # a) explicitly depend on library msword because it is not implied by a link
 #    relation
 # b) explicitly depend on the sw resource files needed at unit-test runtime
-$(call gb_CppunitTest_get_target,sw_macros_test) : $(call gb_Library_get_target,msword)
+$(call gb_CppunitTest_get_target,sw_macros_test) : \
+	$(call gb_Library_get_target,msword) \
+	$(call gb_Library_get_target,vbaswobj) \
 
 # vim: set noet sw=4 ts=4:
commit 1da85eb63bfcbe22677ff54587fcb250fec74cd5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Dec 7 20:40:43 2011 +0100

    connectivity: remove dead DNoException.cxx

diff --git a/connectivity/source/drivers/dbase/DNoException.cxx b/connectivity/source/drivers/dbase/DNoException.cxx
deleted file mode 100644
index 4af295f..0000000
--- a/connectivity/source/drivers/dbase/DNoException.cxx
+++ /dev/null
@@ -1,618 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "dbase/DTable.hxx"
-#include "dbase/DIndex.hxx"
-#include "dbase/dindexnode.hxx"
-#include <tools/debug.hxx>
-#include "diagnose_ex.h"
-
-#include <sal/types.h>
-#include <algorithm>
-#include <rtl/logfile.hxx>
-
-using namespace connectivity;
-using namespace connectivity::dbase;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::sdbc;
-//------------------------------------------------------------------
-sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::seekRow" );
-    // ----------------------------------------------------------
-    // Prepare positioning:
-    OSL_ENSURE(m_pFileStream,"ODbaseTable::seekRow: FileStream is NULL!");
-
-    sal_uInt32  nNumberOfRecords = (sal_uInt32)m_aHeader.db_anz;
-    sal_uInt32 nTempPos = m_nFilePos;
-    m_nFilePos = nCurPos;
-
-    switch(eCursorPosition)
-    {
-        case IResultSetHelper::NEXT:
-            ++m_nFilePos;
-            break;
-        case IResultSetHelper::PRIOR:
-            if (m_nFilePos > 0)
-                --m_nFilePos;
-            break;
-        case IResultSetHelper::FIRST:
-            m_nFilePos = 1;
-            break;
-        case IResultSetHelper::LAST:
-            m_nFilePos = nNumberOfRecords;
-            break;
-        case IResultSetHelper::RELATIVE:
-            m_nFilePos = (((sal_Int32)m_nFilePos) + nOffset < 0) ? 0L
-                            : (sal_uInt32)(((sal_Int32)m_nFilePos) + nOffset);
-            break;
-        case IResultSetHelper::ABSOLUTE:
-        case IResultSetHelper::BOOKMARK:
-            m_nFilePos = (sal_uInt32)nOffset;
-            break;
-    }
-
-    if (m_nFilePos > (sal_Int32)nNumberOfRecords)
-        m_nFilePos = (sal_Int32)nNumberOfRecords + 1;
-
-    if (m_nFilePos == 0 || m_nFilePos == (sal_Int32)nNumberOfRecords + 1)
-        goto Error;
-    else
-    {
-        sal_uInt16 nEntryLen = m_aHeader.db_slng;
-
-        OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
-        sal_Int32 nPos = m_aHeader.db_kopf + (sal_Int32)(m_nFilePos-1) * nEntryLen;
-
-        sal_uIntPtr nLen = m_pFileStream->Seek(nPos);
-        if (m_pFileStream->GetError() != ERRCODE_NONE)
-            goto Error;
-
-        nLen = m_pFileStream->Read((char*)m_pBuffer, nEntryLen);
-        if (m_pFileStream->GetError() != ERRCODE_NONE)
-            goto Error;
-    }
-    goto End;
-
-Error:
-    switch(eCursorPosition)
-    {
-        case IResultSetHelper::PRIOR:
-        case IResultSetHelper::FIRST:
-            m_nFilePos = 0;
-            break;
-        case IResultSetHelper::LAST:
-        case IResultSetHelper::NEXT:
-        case IResultSetHelper::ABSOLUTE:
-        case IResultSetHelper::RELATIVE:
-            if (nOffset > 0)
-                m_nFilePos = nNumberOfRecords + 1;
-            else if (nOffset < 0)
-                m_nFilePos = 0;
-            break;
-        case IResultSetHelper::BOOKMARK:
-            m_nFilePos = nTempPos;   // last position
-    }
-    return sal_False;
-
-End:
-    nCurPos = m_nFilePos;
-    return sal_True;
-}
-// -----------------------------------------------------------------------------
-sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::ReadMemo" );
-
-    m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size);
-    switch (m_aMemoHeader.db_typ)
-    {
-        case MemodBaseIII: // dBase III-Memofeld, ends with Ctrl-Z
-        {
-            const char cEOF = (char) 0x1a;
-            ByteString aBStr;
-            static char aBuf[514];
-            aBuf[512] = 0;          // to prevent a random value
-            bool bReady = false;
-
-            do
-            {
-                m_pMemoStream->Read(&aBuf,512);
-
-                sal_uInt16 i = 0;
-                while (aBuf[i] != cEOF && ++i < 512)
-                    ;
-                bReady = aBuf[i] == cEOF;
-
-                aBuf[i] = 0;
-                aBStr += aBuf;
-
-            } while (!bReady && !m_pMemoStream->IsEof() && aBStr.Len() < STRING_MAXLEN);
-
-            ::rtl::OUString aStr(aBStr.GetBuffer(), aBStr.Len(),getConnection()->getTextEncoding());
-            aVariable = aStr;
-
-        } break;
-        case MemoFoxPro:
-        case MemodBaseIV: // dBase IV-Memofeld with the length specification
-        {
-            char sHeader[4];
-            m_pMemoStream->Read(sHeader,4);
-            // Foxpro stores text and binary data
-            if (m_aMemoHeader.db_typ == MemoFoxPro)
-            {
-                if (((sal_uInt8)sHeader[0]) != 0 || ((sal_uInt8)sHeader[1]) != 0 || ((sal_uInt8)sHeader[2]) != 0)
-                {
-                    return sal_False;
-                }
-            }
-            else if (((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08)
-            {
-                return sal_False;
-            }
-
-            sal_uInt32 nLength;
-            (*m_pMemoStream) >> nLength;
-
-            if (m_aMemoHeader.db_typ == MemodBaseIV)
-                nLength -= 8;
-
-            ::rtl::OUString aStr;
-            while ( nLength > STRING_MAXLEN )
-            {
-                ByteString aBStr;
-                aBStr.Expand(STRING_MAXLEN);
-                m_pMemoStream->Read(aBStr.AllocBuffer(STRING_MAXLEN),STRING_MAXLEN);
-                aStr += ::rtl::OUString(aBStr.GetBuffer(),aBStr.Len(), getConnection()->getTextEncoding());
-                nLength -= STRING_MAXLEN;
-            }
-            if ( nLength > 0 )
-            {
-                ByteString aBStr;
-                aBStr.Expand(static_cast<xub_StrLen>(nLength));
-                m_pMemoStream->Read(aBStr.AllocBuffer(static_cast<xub_StrLen>(nLength)),nLength);
-
-                aStr += ::rtl::OUString(aBStr.GetBuffer(),aBStr.Len(), getConnection()->getTextEncoding());
-
-            }
-            if ( aStr.getLength() )
-                aVariable = aStr;
-        }
-    }
-    return sal_True;
-}
-// -----------------------------------------------------------------------------
-void ODbaseTable::AllocBuffer()
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::AllocBuffer" );
-    sal_uInt16 nSize = m_aHeader.db_slng;
-    OSL_ENSURE(nSize > 0, "Size too small");
-
-    if (m_nBufferSize != nSize)
-    {
-        delete[] m_pBuffer;
-        m_pBuffer = NULL;
-    }
-
-    // If no buffer available: allocate
-    if (m_pBuffer == NULL && nSize > 0)
-    {
-        m_nBufferSize = nSize;
-        m_pBuffer       = new sal_uInt8[m_nBufferSize+1];
-    }
-}
-// -----------------------------------------------------------------------------
-sal_Bool ODbaseTable::WriteBuffer()
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::WriteBuffer" );
-    OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
-
-    // Position on the desired record:
-    long nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
-    m_pFileStream->Seek(nPos);
-    return m_pFileStream->Write((char*) m_pBuffer, m_aHeader.db_slng) > 0;
-}
-// -----------------------------------------------------------------------------
-sal_Int32 ODbaseTable::getCurrentLastPos() const
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::getCurrentLastPos" );
-    return m_aHeader.db_anz;
-}
-// -----------------------------------------------------------------------------
-//==================================================================
-// ONDXNode
-//==================================================================
-
-//------------------------------------------------------------------
-void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXNode::Read" );
-    rStream >> aKey.nRecord; // key
-
-    if (rIndex.getHeader().db_keytype)
-    {
-        double aDbl;
-        rStream >> aDbl;
-        aKey = ONDXKey(aDbl,aKey.nRecord);
-    }
-    else
-    {
-        ByteString aBuf;
-        sal_uInt16 nLen = rIndex.getHeader().db_keylen;
-        char* pStr = aBuf.AllocBuffer(nLen+1);
-
-        rStream.Read(pStr,nLen);
-        pStr[nLen] = 0;
-        aBuf.ReleaseBufferAccess();
-        aBuf.EraseTrailingChars();
-
-        aKey = ONDXKey(::rtl::OUString(aBuf.GetBuffer(),aBuf.Len(),rIndex.m_pTable->getConnection()->getTextEncoding()) ,aKey.nRecord);
-    }
-    rStream >> aChild;
-}
-
-union
-{
-    double aDbl;
-    char   aData[128];
-} aNodeData;
-//------------------------------------------------------------------
-void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXNode::Write" );
-    const ODbaseIndex& rIndex = rPage.GetIndex();
-    if (!rIndex.isUnique() || rPage.IsLeaf())
-        rStream << (sal_uInt32)aKey.nRecord; // key
-    else
-        rStream << (sal_uInt32)0;   // key
-
-    if (rIndex.getHeader().db_keytype) // double
-    {
-        if (aKey.getValue().isNull())
-        {
-            memset(aNodeData.aData,0,rIndex.getHeader().db_keylen);
-            rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen);
-        }
-        else
-            rStream << (double) aKey.getValue();
-    }
-    else
-    {
-        memset(aNodeData.aData,0x20,rIndex.getHeader().db_keylen);
-        if (!aKey.getValue().isNull())
-        {
-            ::rtl::OUString sValue = aKey.getValue();
-            ByteString aText(sValue.getStr(), rIndex.m_pTable->getConnection()->getTextEncoding());
-            strncpy(aNodeData.aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, aText.Len()));
-        }
-        rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen);
-    }
-    rStream << aChild;
-}
-
-
-//------------------------------------------------------------------
-ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXNode::GetChild" );
-    if (!aChild.Is() && pIndex)
-    {
-        aChild = pIndex->CreatePage(aChild.GetPagePos(),pParent,aChild.HasPage());
-    }
-    return aChild;
-}
-
-//==================================================================
-// ONDXKey
-//==================================================================
-//------------------------------------------------------------------
-sal_Bool ONDXKey::IsText(sal_Int32 eType)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXKey::IsText" );
-    return eType == DataType::VARCHAR || eType == DataType::CHAR;
-}
-
-//------------------------------------------------------------------
-StringCompare ONDXKey::Compare(const ONDXKey& rKey) const
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXKey::Compare" );
-    StringCompare eResult;
-
-    if (getValue().isNull())
-    {
-        if (rKey.getValue().isNull() || (rKey.IsText(getDBType()) && !rKey.getValue().getString().getLength()))
-            eResult = COMPARE_EQUAL;
-        else
-            eResult = COMPARE_LESS;
-    }
-    else if (rKey.getValue().isNull())
-    {
-        if (getValue().isNull() || (IsText(getDBType()) && !getValue().getString().getLength()))
-            eResult = COMPARE_EQUAL;
-        else
-            eResult = COMPARE_GREATER;
-    }
-    else if (IsText(getDBType()))
-    {
-        sal_Int32 nRes = getValue().getString().compareTo(rKey.getValue());
-        eResult = (nRes > 0) ? COMPARE_GREATER : (nRes == 0) ? COMPARE_EQUAL : COMPARE_LESS;
-    }
-    else
-    {
-        double m = getValue(),n = rKey.getValue();
-        eResult = (m > n) ? COMPARE_GREATER : (n == m) ? COMPARE_EQUAL : COMPARE_LESS;
-    }
-
-    // Record comparison, if index !Unique
-    if (eResult == COMPARE_EQUAL && nRecord && rKey.nRecord)
-        eResult = (nRecord > rKey.nRecord) ? COMPARE_GREATER :
-                  (nRecord == rKey.nRecord) ? COMPARE_EQUAL : COMPARE_LESS;
-
-    return eResult;
-}
-// -----------------------------------------------------------------------------
-void ONDXKey::setValue(const ORowSetValue& _rVal)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXKey::setValue" );
-    xValue = _rVal;
-}
-// -----------------------------------------------------------------------------
-const ORowSetValue& ONDXKey::getValue() const
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXKey::getValue" );
-    return xValue;
-}
-// -----------------------------------------------------------------------------
-SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPagePtr& rPage)
-{
-    rStream >> rPage.nPagePos;
-    return rStream;
-}
-// -----------------------------------------------------------------------------
-SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPagePtr& rPage)
-{
-    rStream << rPage.nPagePos;
-    return rStream;
-}
-// -----------------------------------------------------------------------------
-//==================================================================
-// ONDXPagePtr
-//==================================================================
-//------------------------------------------------------------------
-ONDXPagePtr::ONDXPagePtr(const ONDXPagePtr& rRef)
-              :ONDXPageRef(rRef)
-              ,nPagePos(rRef.nPagePos)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXPagePtr::ONDXPagePtr" );
-}
-
-//------------------------------------------------------------------
-ONDXPagePtr::ONDXPagePtr(ONDXPage* pRefPage)
-              :ONDXPageRef(pRefPage)
-              ,nPagePos(0)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXPagePtr::ONDXPagePtr" );
-    if (pRefPage)
-        nPagePos = pRefPage->GetPagePos();
-}
-//------------------------------------------------------------------
-ONDXPagePtr& ONDXPagePtr::operator=(const ONDXPagePtr& rRef)
-{
-    ONDXPageRef::operator=(rRef);
-    nPagePos = rRef.nPagePos;
-    return *this;
-}
-
-//------------------------------------------------------------------
-ONDXPagePtr& ONDXPagePtr::operator= (ONDXPage* pRef)
-{
-    ONDXPageRef::operator=(pRef);
-    nPagePos = (pRef) ? pRef->GetPagePos() : 0;
-    return *this;
-}
-// -----------------------------------------------------------------------------
-static sal_uInt32 nValue;
-//------------------------------------------------------------------
-SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
-{
-    rStream.Seek(rPage.GetPagePos() * 512);
-    rStream >> nValue >> rPage.aChild;
-    rPage.nCount = sal_uInt16(nValue);
-
-    for (sal_uInt16 i = 0; i < rPage.nCount; i++)
-        rPage[i].Read(rStream, rPage.GetIndex());
-    return rStream;
-}
-
-//------------------------------------------------------------------
-SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& rPage)
-{
-    // Page does not yet exist
-    sal_uIntPtr nSize = (rPage.GetPagePos() + 1) * 512;
-    if (nSize > rStream.Seek(STREAM_SEEK_TO_END))
-    {
-        rStream.SetStreamSize(nSize);
-        rStream.Seek(rPage.GetPagePos() * 512);
-
-        char aEmptyData[512];
-        memset(aEmptyData,0x00,512);
-        rStream.Write((sal_uInt8*)aEmptyData,512);
-    }
-    sal_uIntPtr nCurrentPos = rStream.Seek(rPage.GetPagePos() * 512);
-    OSL_UNUSED( nCurrentPos );
-
-    nValue = rPage.nCount;
-    rStream << nValue << rPage.aChild;
-
-    sal_uInt16 i = 0;
-    for (; i < rPage.nCount; i++)
-        rPage[i].Write(rStream, rPage);
-
-    // check if we have to fill the stream with '\0'
-    if(i < rPage.rIndex.getHeader().db_maxkeys)
-    {
-        sal_uIntPtr nTell = rStream.Tell() % 512;
-        sal_uInt16 nBufferSize = rStream.GetBufferSize();
-        sal_uIntPtr nSize = nBufferSize - nTell;
-        if ( nSize <= nBufferSize )
-        {
-            char* pEmptyData = new char[nSize];
-            memset(pEmptyData,0x00,nSize);
-            rStream.Write((sal_uInt8*)pEmptyData,nSize);
-            rStream.Seek(nTell);
-            delete [] pEmptyData;
-        }
-    }
-    return rStream;
-}
-// -----------------------------------------------------------------------------
-#if OSL_DEBUG_LEVEL > 1
-//------------------------------------------------------------------
-void ONDXPage::PrintPage()
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXPage::PrintPage" );
-    OSL_TRACE("\nSDB: -----------Page: %d  Parent: %d  Count: %d  Child: %d-----",
-        nPagePos, HasParent() ? aParent->GetPagePos() : 0 ,nCount, aChild.GetPagePos());
-
-    for (sal_uInt16 i = 0; i < nCount; i++)
-    {
-        ONDXNode rNode = (*this)[i];
-        ONDXKey&  rKey = rNode.GetKey();
-        if (!IsLeaf())
-            rNode.GetChild(&rIndex, this);
-
-        if (rKey.getValue().isNull())
-        {
-            OSL_TRACE("SDB: [%d,NULL,%d]",rKey.GetRecord(), rNode.GetChild().GetPagePos());
-        }
-        else if (rIndex.getHeader().db_keytype)
-        {
-            OSL_TRACE("SDB: [%d,%f,%d]",rKey.GetRecord(), rKey.getValue().getDouble(),rNode.GetChild().GetPagePos());
-        }
-        else
-        {
-            OSL_TRACE("SDB: [%d,%s,%d]",rKey.GetRecord(), (const char* )ByteString(rKey.getValue().getString().getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()).GetBuffer(),rNode.GetChild().GetPagePos());
-        }
-    }
-    OSL_TRACE("SDB: -----------------------------------------------");
-    if (!IsLeaf())
-    {
-#if OSL_DEBUG_LEVEL > 1
-        GetChild(&rIndex)->PrintPage();
-        for (sal_uInt16 i = 0; i < nCount; i++)
-        {
-            ONDXNode rNode = (*this)[i];
-            rNode.GetChild(&rIndex,this)->PrintPage();
-        }
-#endif
-    }
-    OSL_TRACE("SDB: ===============================================");
-}
-#endif
-// -----------------------------------------------------------------------------
-sal_Bool ONDXPage::IsFull() const
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXPage::IsFull" );
-    return Count() == rIndex.getHeader().db_maxkeys;
-}
-// -----------------------------------------------------------------------------
-//------------------------------------------------------------------
-sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXPage::Search" );
-    // binary search afterwards
-    sal_uInt16 i = 0xFFFF;
-    while (++i < Count())
-        if ((*this)[i].GetKey() == rSearch)
-            break;
-
-    return (i < Count()) ? i : NODE_NOTFOUND;
-}
-
-//------------------------------------------------------------------
-sal_uInt16 ONDXPage::Search(const ONDXPage* pPage)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXPage::Search" );
-    sal_uInt16 i = 0xFFFF;
-    while (++i < Count())
-        if (((*this)[i]).GetChild() == pPage)
-            break;
-
-    // if not found, then we assume, that the page points to the page (???)
-    return (i < Count()) ? i : NODE_NOTFOUND;
-}
-// -----------------------------------------------------------------------------
-// runs recursively
-void ONDXPage::SearchAndReplace(const ONDXKey& rSearch,
-                                  ONDXKey& rReplace)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXPage::SearchAndReplace" );
-    OSL_ENSURE(rSearch != rReplace,"Invalid here:rSearch == rReplace");
-    if (rSearch != rReplace)
-    {
-        sal_uInt16 nPos = NODE_NOTFOUND;
-        ONDXPage* pPage = this;
-
-        while (pPage && (nPos = pPage->Search(rSearch)) == NODE_NOTFOUND)
-            pPage = pPage->aParent;
-
-        if (pPage)
-        {
-            (*pPage)[nPos].GetKey() = rReplace;
-            pPage->SetModified(sal_True);
-        }
-    }
-}
-// -----------------------------------------------------------------------------
-ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos)
-{
-    DBG_ASSERT(nCount > nPos, "falscher Indexzugriff");
-    return ppNodes[nPos];
-}
-
-//------------------------------------------------------------------
-const ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) const
-{
-    DBG_ASSERT(nCount > nPos, "falscher Indexzugriff");
-    return ppNodes[nPos];
-}
-// -----------------------------------------------------------------------------
-void ONDXPage::Remove(sal_uInt16 nPos)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXPage::Remove" );
-    DBG_ASSERT(nCount > nPos, "falscher Indexzugriff");
-
-    for (sal_uInt16 i = nPos; i < (nCount-1); i++)
-        (*this)[i] = (*this)[i+1];
-
-    nCount--;
-    bModified = sal_True;
-}
-// -----------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit c549ae0b57c3fec2c4bec1c442c3c700297bb60f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Dec 7 13:45:57 2011 +0100

    sw: tweak translations
    
    cb8b7a86 and 869a0f36

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index d07ef90..a461fb9 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -90,7 +90,7 @@
 #include <ndole.hxx>
 #include <ndgrf.hxx>
 #include <rolbck.hxx>           // Undo attr
-#include <doctxm.hxx>           // for the directories
+#include <doctxm.hxx>           // for the index stuff
 #include <grfatr.hxx>
 #include <poolfmt.hxx>          // pool template ids
 #include <mvsave.hxx>           // for server functionality
@@ -141,7 +141,7 @@ using ::rtl::OUString;
 
 // Page descriptors
 SV_IMPL_PTRARR(SwPageDescs,SwPageDescPtr);
-// Directories
+// Table Of ...
 SV_IMPL_PTRARR( SwTOXTypes, SwTOXTypePtr )
 // Field types
 SV_IMPL_PTRARR( SwFldTypes, SwFldTypePtr)
@@ -723,7 +723,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
     if (GetIDocumentUndoRedo().DoesUndo())
     {
         GetIDocumentUndoRedo().ClearRedo();
-        // insert from the Undo object (currently only for TextNode)
+        // insert the Undo object (currently only for TextNode)
         if( pNode->IsTxtNode() )
         {
             pUndo = new SwUndoSplitNode( this, rPos, bChkTableStart );
@@ -756,7 +756,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
                     pNd = 0;
                 else
                 {
-                    // Only if the table has line breaks!
+                    // Only if the table has page breaks!
                     const SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
                     if( SFX_ITEM_SET != pFrmFmt->GetItemState(RES_PAGEDESC, sal_False) &&
                         SFX_ITEM_SET != pFrmFmt->GetItemState( RES_BREAK, sal_False ) )
@@ -774,7 +774,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
                     ((SwPosition&)rPos).nNode = pTblNd->GetIndex()-1;
                     ((SwPosition&)rPos).nContent.Assign( pTxtNd, 0 );
 
-                    // only add page breaks/templates to the body area
+                    // only add page breaks/styles to the body area
                     if( nPrevPos > GetNodes().GetEndOfExtras().GetIndex() )
                     {
                         SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
@@ -1108,9 +1108,11 @@ sal_uInt16 _PostItFld::GetPageNo(
     const std::set< sal_Int32 > &rPossiblePages,
     /* out */ sal_uInt16& rVirtPgNo, /* out */ sal_uInt16& rLineNo )
 {
-    //Problem: If a PostItFld is contained in more than one Node that is represented by more than one layout instance,
+    //Problem: If a PostItFld is contained in a Node that is represented
+    //by more than one layout instance,
     //we have to decide whether it should be printed once or n-times.
-    //Probably only once. For the page number we don't select a random one, but the PostIt's first occurence in the selected area.
+    //Probably only once. For the page number we don't select a random one,
+    //but the PostIt's first occurence in the selected area.
     rVirtPgNo = 0;
     sal_uInt16 nPos = GetCntnt();
     SwIterator<SwTxtFrm,SwTxtNode> aIter( GetFld()->GetTxtNode() );
@@ -1830,7 +1832,7 @@ void SwDoc::ClearSwLayouterEntries()
 void SwDoc::SetModified()
 {
     ClearSwLayouterEntries();
-    // We return the status for the link according to the old and new value of the flags
+    // give the old and new modified state to the link
     //  Bit 0:  -> old state
     //  Bit 1:  -> new state
     long nCall = mbModified ? 3 : 2;
@@ -1849,7 +1851,7 @@ void SwDoc::SetModified()
 
 void SwDoc::ResetModified()
 {
-    // We return the status for the link according to the old and new value of the flags
+    // give the old and new modified state to the link
     //  Bit 0:  -> old state
     //  Bit 1:  -> new state
     long nCall = mbModified ? 1 : 0;
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 4e4aec3..a3ce131 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -904,8 +904,8 @@ namespace
     //  CntntType --
     //          0x8000 = Bookmark Pos1
     //          0x8001 = Bookmark Pos2
-    //          0x2000 = Paragraph bound frame
-    //          0x2001 = Auto paragraph bound frame, which should be attached
+    //          0x2000 = Paragraph anchored frame
+    //          0x2001 = frame anchored at character, which should be moved
     //          0x1000 = Redline Mark
     //          0x1001 = Redline Point
     //          0x0800 = Crsr from the CrsrShell Mark
@@ -1170,7 +1170,8 @@ void _DelBookmarks(
 
     pDoc->getIDocumentMarkAccess()->deleteMarks(rStt, rEnd, pSaveBkmk, pSttIdx, pEndIdx);
 
-    // Copy all red lines which are in the move area into an array, which holds all position information as offset.
+    // Copy all Redlines which are in the move area into an array
+    // which holds all position information as offset.
     // Assignement happens after moving.
     SwRedlineTbl& rTbl = (SwRedlineTbl&)pDoc->GetRedlineTbl();
     for(sal_uInt16 nCnt = 0; nCnt < rTbl.Count(); ++nCnt )
@@ -1311,7 +1312,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
         }
     }
 
-    // 4. Paragraph bound objects
+    // 4. Paragraph anchored objects
     {
         SwCntntNode *pNode = pDoc->GetNodes()[nNode]->GetCntntNode();
         if( pNode )
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 8f4f56d..bd3ee2c 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -255,7 +255,7 @@ sal_uLong CompareData::ShowDiffs( const CompareData& rData )
             while( nStt2 < nLen2 && GetChanged( nStt2 )) ++nStt2;
 
             // rData is the original,
-            // this is what should go to the change
+            // "this" recieves the changes
             if( nSav2 != nStt2 && nSav1 != nStt1 )
                 CheckForChangesInLine( rData, nSav1, nStt1, nSav2, nStt2 );
 
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 019e160..c09d28e 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -327,7 +327,7 @@ SwFieldType* SwDoc::GetFldType( sal_uInt16 nResId, const String& rName,
  */
 void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
 {
-    // Call modify() for every field type,
+    // Call Modify() for every field type,
     // dependent SwTxtFld get notified ...
 
     for( sal_uInt16 i=0; i < pFldTypes->Count(); ++i)
@@ -335,7 +335,7 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
         switch( (*pFldTypes)[i]->Which() )
         {
             // Update table fields second to last
-            // Update references at last
+            // Update references last
         case RES_GETREFFLD:
         case RES_TABLEFLD:
         case RES_DBFLD:
@@ -378,7 +378,7 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
     if( bCloseDB )
         GetNewDBMgr()->CloseAll();
 
-    // Only evaluate on CompleteUpdate
+    // Only evaluate on full update
     SetModified();
 }
 
@@ -524,7 +524,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
                     (pFld = (SwTblField*)pFmtFld->GetFld())->GetSubType() ))
                     continue;
 
-                // needs to be recalculated (and is no textual note)
+                // needs to be recalculated
                 if( !pFld->IsValid() )
                 {
                     // table where this field is located
@@ -543,7 +543,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
                     if( !pCalc )
                         pCalc = new SwCalc( *this );
 
-                    // get the values of all SetExpresion fields, that are valid
+                    // get the values of all SetExpression fields that are valid
                     // until the table
                     SwFrm* pFrm = 0;
                     if( pTblNd->GetIndex() < GetNodes().GetEndOfExtras().GetIndex() )
@@ -608,7 +608,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
                     if( !pCalc )
                         pCalc = new SwCalc( *this );
 
-                    // get the values of all SetExpresion fields, that are valid
+                    // get the values of all SetExpression fields that are valid
                     // until the table
                     SwFrm* pFrm = 0;
                     if( pTblNd->GetIndex() < GetNodes().GetEndOfExtras().GetIndex() )
@@ -921,11 +921,11 @@ sal_Bool _SetGetExpFld::operator<( const _SetGetExpFld& rFld ) const
         }
     }
 
-    // if it is the same section, then the field is in the same Node
+    // same Section: is the field in the same Node?
     if( pFirst != pNext )
         return pFirst->GetIndex() < pNext->GetIndex();
 
-    // same Node in the Section, then Position in the Node
+    // same Node in the Section, check Position in the Node
     return GetCntPosFromCntnt() < rFld.GetCntPosFromCntnt();
 }
 
@@ -2217,8 +2217,8 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
     ///         have to be known in order to insert the hide condition as a new
     ///         expression field into the sorted field list (<pFldSortLst>).
     if ( eGetMode == GETFLD_ALL )
-    // Collect the ranges first. Supply all with frames, which are hidden by condition,
-    // so that the contained fields are not sorted.
+    // Collect the sections first. Supply sections that are hidden by condition
+    // with frames so that the contained fields are sorted properly.
     {
         // In order for the frames to be created the right way, they have to be expanded
         // from top to bottom
@@ -2646,7 +2646,8 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
             pDstFmtFld->ModifyNotification( 0, pMsgHnt );
         }
 
-        // The fields we can calculate here are being triggered for an update here explicitily.
+        // The fields we can calculate here are being triggered for an update
+        // here explicitly.
         if( nFldWhich == RES_USERFLD )
             UpdateUsrFlds();
     }
commit 50471a85d43a3bcdb3f3d33b85cd14bbc56efaf6
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Dec 6 19:17:52 2011 +0100

    add curl to RepositoryExternal.mk

diff --git a/Repository.mk b/Repository.mk
index f5cd0a4..2cc3544 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -259,7 +259,6 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
 	avmediagst \
 	avmediawin \
 	collator_data \
-	curl \
 	deployment \
 	deploymentgui \
 	dict_ja \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 3f407c4..6be5a13 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -804,7 +804,35 @@ endef
 
 endif # !SYSTEM_LIBPNG
 
-# MacOSX-only frameworks
+
+ifeq ($(SYSTEM_CURL),YES)
+
+define gb_LinkTarget__use_curl
+$(call gb_LinkTarget_set_include,$(1),\
+	$$(INCLUDE) \
+	$(CURL_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
+
+endef
+
+else # !SYSTEM_CURL
+
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
+	curl \
+))
+
+define gb_LinkTarget__use_curl
+$(call gb_LinkTarget_add_linked_libs,$(1),\
+	curl \
+)
+
+endef
+
+endif # SYSTEM_CURL
+
+
+# MacOSX-only frameworks ############################################
 # (in alphabetical order)
 
 define gb_LinkTarget__use_carbon
diff --git a/extensions/CppunitTest_extensions_test_update.mk b/extensions/CppunitTest_extensions_test_update.mk
index b864a15..4184fea 100644
--- a/extensions/CppunitTest_extensions_test_update.mk
+++ b/extensions/CppunitTest_extensions_test_update.mk
@@ -40,13 +40,14 @@ $(eval $(call gb_CppunitTest_add_exception_objects,extensions_test_update, \
 $(eval $(call gb_CppunitTest_add_linked_libs,extensions_test_update, \
 	cppu \
 	cppuhelper \
-	curl \
 	sal \
 	test \
 	unotest \
 	$(gb_STDLIBS) \
 ))
 
+$(eval $(call gb_CppunitTest_use_external,extensions_test_update,curl))
+
 $(eval $(call gb_CppunitTest_set_include,extensions_test_update,\
 	$$(INCLUDE) \
 	-I$(realpath $(SRCDIR)/extensions/inc) \


More information about the Libreoffice-commits mailing list