[Libreoffice-commits] .: 5 commits - binfilter/bf_sc binfilter/bf_sfx2 binfilter/bf_svx binfilter/bf_sw binfilter/inc

Caolán McNamara caolan at kemper.freedesktop.org
Tue Sep 13 02:16:26 PDT 2011


 binfilter/bf_sc/source/core/data/sc_documen3.cxx |   10 ------
 binfilter/bf_sc/source/core/data/sc_document.cxx |   33 ----------------------
 binfilter/bf_sc/source/core/tool/sc_interpr1.cxx |   34 -----------------------
 binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx |   33 ++--------------------
 binfilter/bf_sc/source/ui/unoobj/sc_cursuno.cxx  |    6 ----
 binfilter/bf_sfx2/source/appl/sfx2_minbox.src    |   19 ------------
 binfilter/bf_svx/source/dialog/svx_impgrf.src    |    2 -
 binfilter/bf_svx/source/dialog/svx_lingu.src     |    3 --
 binfilter/bf_svx/source/dialog/svx_sdstring.src  |    3 --
 binfilter/bf_svx/source/items/svx_svxerr.src     |    3 --
 binfilter/bf_svx/source/items/svx_svxitems.src   |    3 --
 binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx  |   11 ++++---
 binfilter/inc/bf_sc/document.hxx                 |   10 ------
 13 files changed, 15 insertions(+), 155 deletions(-)

New commits:
commit d051ac1cfe0404cf38311e10557774e7ec141542
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 12 23:48:37 2011 +0100

    replace ByteString::Convert

diff --git a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
index 882dc12..281f437 100644
--- a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
+++ b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
@@ -3493,8 +3493,9 @@ size_t Sw6Layout::PutRest(String &rStr,sal_Char *pCtrl)
                 else
                 {
                     ByteString aTmp( &pCtrl[2], pCtrl[1] );
-                    aTmp.Convert( RTL_TEXTENCODING_IBM_850,
-                                    gsl_getSystemTextEncoding() );
+                    aTmp = rtl::OUStringToOString(
+                        rtl::OStringToOUString(aTmp, RTL_TEXTENCODING_IBM_850),
+                        osl_getThreadTextEncoding());
                     aTmp.EraseLeadingChars();
                     aTmp.EraseTrailingChars();
                     aTmp.Insert('}');            // Mache versteckten Text
@@ -3565,8 +3566,10 @@ size_t Sw6Layout::PutRest(String &rStr,sal_Char *pCtrl)
                              (*pCtrl>='a' && *pCtrl<='z') )
                     {
                         ByteString aFld(pCtrl,p-pCtrl);
-                        aFld.Convert( RTL_TEXTENCODING_IBM_850,
-                                        gsl_getSystemTextEncoding() );
+                        aFld = rtl::OUStringToOString(
+                            rtl::OStringToOUString(aFld,
+                                RTL_TEXTENCODING_IBM_850),
+                            osl_getThreadTextEncoding());
                         nRet=(size_t)(p-pCtrl)+2;
                         aFld.Insert((sal_Char)(p-pCtrl),0);
                         aFld.Insert('+',0);
commit 738a24fcc91a8c1227c276f219bba8bd7a787c9d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 12 21:53:21 2011 +0100

    I believe the src charset pragma is archaic and unused

diff --git a/binfilter/bf_sfx2/source/appl/sfx2_minbox.src b/binfilter/bf_sfx2/source/appl/sfx2_minbox.src
index ffb6c24..2411741 100644
--- a/binfilter/bf_sfx2/source/appl/sfx2_minbox.src
+++ b/binfilter/bf_sfx2/source/appl/sfx2_minbox.src
@@ -26,25 +26,6 @@
  ************************************************************************/
 #define NO_LOCALIZE_EXPORT
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- // pragma -------------------------------------------------------------------
-
-
-
  // include ------------------------------------------------------------------
 
 #include "app.hrc"
diff --git a/binfilter/bf_svx/source/dialog/svx_impgrf.src b/binfilter/bf_svx/source/dialog/svx_impgrf.src
index 91d68da..5f3a6c3 100644
--- a/binfilter/bf_svx/source/dialog/svx_impgrf.src
+++ b/binfilter/bf_svx/source/dialog/svx_impgrf.src
@@ -25,9 +25,7 @@
  *
  ************************************************************************/
 #define NO_LOCALIZE_EXPORT
- // pragma -------------------------------------------------------------------
 
- // include ------------------------------------------------------------------
 #include "dialogs.hrc"
 #include "impgrf.hrc"
  // --------------------------------------------------------------------------
diff --git a/binfilter/bf_svx/source/dialog/svx_lingu.src b/binfilter/bf_svx/source/dialog/svx_lingu.src
index 9702843..0d47b83 100644
--- a/binfilter/bf_svx/source/dialog/svx_lingu.src
+++ b/binfilter/bf_svx/source/dialog/svx_lingu.src
@@ -25,9 +25,8 @@
  *
  ************************************************************************/
 #define NO_LOCALIZE_EXPORT
- // include ---------------------------------------------------------------
+
 #include "dialogs.hrc"
- // pragma ----------------------------------------------------------------
 
  // QueryBoxen ---------------------------------------------------------------
 QueryBox RID_SVXQB_THESAURUS
diff --git a/binfilter/bf_svx/source/dialog/svx_sdstring.src b/binfilter/bf_svx/source/dialog/svx_sdstring.src
index 9d2dfc9..b685c6f 100644
--- a/binfilter/bf_svx/source/dialog/svx_sdstring.src
+++ b/binfilter/bf_svx/source/dialog/svx_sdstring.src
@@ -25,9 +25,8 @@
  *
  ************************************************************************/
 #define NO_LOCALIZE_EXPORT
- // include ------------------------------------------------------------------
+
 #include "dialogs.hrc"
- // pragma -------------------------------------------------------------------
 
  // Strings fuer die Draw-Dialoge --------------------------------------------
 
diff --git a/binfilter/bf_svx/source/items/svx_svxerr.src b/binfilter/bf_svx/source/items/svx_svxerr.src
index 3740ff8..5ec4e37 100644
--- a/binfilter/bf_svx/source/items/svx_svxerr.src
+++ b/binfilter/bf_svx/source/items/svx_svxerr.src
@@ -25,7 +25,7 @@
  *
  ************************************************************************/
 #define NO_LOCALIZE_EXPORT
- // include ---------------------------------------------------------------
+
 #define __RSC
 
 #ifndef _ERRCODE_HXX
@@ -34,7 +34,6 @@
 
 #include "svxerr.hxx"
 #include "dialogs.hrc"
- // pragma ----------------------------------------------------------------
 
  // Error-Context ---------------------------------------------------------
 Resource RID_SVXERRCTX
diff --git a/binfilter/bf_svx/source/items/svx_svxitems.src b/binfilter/bf_svx/source/items/svx_svxitems.src
index e58483e..d4c4de1 100644
--- a/binfilter/bf_svx/source/items/svx_svxitems.src
+++ b/binfilter/bf_svx/source/items/svx_svxitems.src
@@ -25,9 +25,8 @@
  *
  ************************************************************************/
 #define NO_LOCALIZE_EXPORT
- // include ------------------------------------------------------------------
+
 #include "svxitems.hrc"
- // pragma -------------------------------------------------------------------
 
  // Value-Strings ------------------------------------------------------------
 String RID_SVXITEMS_TRUE
commit a193c552cb52d68cfb601f9ce0f3cb4b61279f53
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 12 21:21:19 2011 +0100

    ScDocument::GetNextPos doesn't do anything

diff --git a/binfilter/bf_sc/source/core/data/sc_document.cxx b/binfilter/bf_sc/source/core/data/sc_document.cxx
index 89295e9..3950a85 100644
--- a/binfilter/bf_sc/source/core/data/sc_document.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_document.cxx
@@ -2359,22 +2359,6 @@ void ScDocument::SetDirty( const ScRange& )
 /*N*/   return xPoolHelper->GetStylePool();
 /*N*/ }
 
-
-
-
-
-
-void ScDocument::GetNextPos( USHORT&, USHORT&, USHORT, short, short,
-                             BOOL, BOOL, const ScMarkData& )
-{
-    DBG_BF_ASSERT(0, "STRIP");
-}
-
-//
-//  Datei-Operationen
-//
-
-
 /*N*/ void ScDocument::UpdStlShtPtrsFrmNms()
 /*N*/ {
 /*N*/   ScPatternAttr::pDoc = this;
diff --git a/binfilter/bf_sc/source/ui/unoobj/sc_cursuno.cxx b/binfilter/bf_sc/source/ui/unoobj/sc_cursuno.cxx
index 09b7a9d..e5fbd2e 100644
--- a/binfilter/bf_sc/source/ui/unoobj/sc_cursuno.cxx
+++ b/binfilter/bf_sc/source/ui/unoobj/sc_cursuno.cxx
@@ -369,9 +369,6 @@ void SAL_CALL ScCellCursorObj::gotoNext() throw(uno::RuntimeException)
     USHORT nNewX = aCursor.Col();
     USHORT nNewY = aCursor.Row();
     USHORT nTab  = aCursor.Tab();
-    ScDocShell* pDocSh = GetDocShell();
-    if ( pDocSh )
-        pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab,  1,0, FALSE,TRUE, aMark );
     //! sonst Exception oder so
 
     SetNewRange( ScRange( nNewX, nNewY, nTab ) );
@@ -391,9 +388,6 @@ void SAL_CALL ScCellCursorObj::gotoPrevious() throw(uno::RuntimeException)
     USHORT nNewX = aCursor.Col();
     USHORT nNewY = aCursor.Row();
     USHORT nTab  = aCursor.Tab();
-    ScDocShell* pDocSh = GetDocShell();
-    if ( pDocSh )
-        pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, -1,0, FALSE,TRUE, aMark );
     //! sonst Exception oder so
 
     SetNewRange( ScRange( nNewX, nNewY, nTab ) );
diff --git a/binfilter/inc/bf_sc/document.hxx b/binfilter/inc/bf_sc/document.hxx
index 6e5cc35..a3779a8 100644
--- a/binfilter/inc/bf_sc/document.hxx
+++ b/binfilter/inc/bf_sc/document.hxx
@@ -709,9 +709,6 @@ public:
                                     USHORT& rEndCol, USHORT nEndRow );
 
 
-    void            GetNextPos( USHORT& rCol, USHORT& rRow, USHORT nTab, short nMovX, short nMovY,
-                                BOOL bMarked, BOOL bUnprotected, const ScMarkData& rMark );
-
     BOOL            GetNextMarkedCell( USHORT& rCol, USHORT& rRow, USHORT nTab,
                                         const ScMarkData& rMark );
 
commit 269c9b3e356a403ce58b1dbe342c978be8ec350b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 12 21:17:32 2011 +0100

    ApplySelectionFrame doesn't do anything

diff --git a/binfilter/bf_sc/source/core/data/sc_document.cxx b/binfilter/bf_sc/source/core/data/sc_document.cxx
index d583ace..89295e9 100644
--- a/binfilter/bf_sc/source/core/data/sc_document.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_document.cxx
@@ -2312,23 +2312,6 @@ void ScDocument::SetDirty( const ScRange& )
 /*N*/   }
 /*N*/ }
 
-
-
-
-
-
-
-
-void ScDocument::ApplySelectionFrame( const ScMarkData&,
-                                      const SvxBoxItem*,
-                                      const SvxBoxInfoItem* )
-{
-    DBG_BF_ASSERT(0, "STRIP");
-}
-
-
-
-
 /*N*/ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark )
 /*N*/ {
 /*N*/   const SfxItemSet* pSet = &rAttr.GetItemSet();
diff --git a/binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx b/binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx
index ff50d4a..f175981 100644
--- a/binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx
+++ b/binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx
@@ -979,9 +979,8 @@ void ScHelperFunctions::FillTableBorder( table::TableBorder& rBorder,
 //! lcl_ApplyBorder nach docfunc verschieben!
 
 void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& rRanges,
-                        const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner )
+                        const SvxBoxItem&, const SvxBoxInfoItem& )
 {
-    ScDocument* pDoc = pDocShell->GetDocument();
     ULONG nCount = rRanges.Count();
     ULONG i;
     for (i=0; i<nCount; i++)
@@ -992,9 +991,6 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
         ScMarkData aMark;
         aMark.SetMarkArea( aRange );
         aMark.SelectTable( nTab, TRUE );
-
-        pDoc->ApplySelectionFrame( aMark, &rOuter, &rInner );
-        // RowHeight bei Umrandung alleine nicht noetig
     }
 
     for (i=0; i<nCount; i++)
diff --git a/binfilter/inc/bf_sc/document.hxx b/binfilter/inc/bf_sc/document.hxx
index 141201d..6e5cc35 100644
--- a/binfilter/inc/bf_sc/document.hxx
+++ b/binfilter/inc/bf_sc/document.hxx
@@ -811,9 +811,6 @@ public:
     void            GetSelectionFrame( const ScMarkData& rMark,
                                        SvxBoxItem&      rLineOuter,
                                        SvxBoxInfoItem&  rLineInner );
-    void            ApplySelectionFrame( const ScMarkData& rMark,
-                                         const SvxBoxItem* pLineOuter,
-                                         const SvxBoxInfoItem* pLineInner );
 
     ULONG           AddCondFormat( const ScConditionalFormat& rNew );
     void            FindConditionalFormat( ULONG nKey, ScRangeList& rRanges );
commit 67b47958384eb7ed849252d4d22fa1f355f9ef85
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 12 21:12:54 2011 +0100

    CreateQueryParam is always false

diff --git a/binfilter/bf_sc/source/core/data/sc_documen3.cxx b/binfilter/bf_sc/source/core/data/sc_documen3.cxx
index e472926..95d033b 100644
--- a/binfilter/bf_sc/source/core/data/sc_documen3.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_documen3.cxx
@@ -484,16 +484,6 @@ using namespace ::com::sun::star;
 /*N*/   return FALSE;
 /*N*/ }
 
-BOOL ScDocument::CreateQueryParam(USHORT, USHORT, USHORT, USHORT, USHORT nTab, ScQueryParam&)
-{
-    DBG_BF_ASSERT(0, "STRIP");
-    if ( nTab<=MAXTAB && pTab[nTab] )
-        return FALSE;
-
-    OSL_FAIL("missing tab");
-    return FALSE;
-}
-
 //  Funktionen werden als 1 schon vom InputHandler eingefuegt
 #define SC_STRTYPE_NAMES        2
 #define SC_STRTYPE_DBNAMES      3
diff --git a/binfilter/bf_sc/source/core/tool/sc_interpr1.cxx b/binfilter/bf_sc/source/core/tool/sc_interpr1.cxx
index 6b2374a..9e54e2a 100644
--- a/binfilter/bf_sc/source/core/tool/sc_interpr1.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_interpr1.cxx
@@ -4216,7 +4216,7 @@ void ScInterpreter::ScCountEmptyCells()
 #endif
 
 
-BOOL ScInterpreter::GetDBParams(USHORT& rTab, ScQueryParam& rParam,
+BOOL ScInterpreter::GetDBParams(USHORT& /*rTab*/, ScQueryParam& rParam,
         BOOL& rMissingField )
 {
     BOOL bRet = FALSE;
@@ -4301,7 +4301,6 @@ BOOL ScInterpreter::GetDBParams(USHORT& rTab, ScQueryParam& rParam,
 
         if (nGlobalError == 0)
         {
-            USHORT  nField = nDBCol1;
             BOOL    bFound = TRUE;
             if ( rMissingField )
                 ;   // special case
@@ -4309,8 +4308,6 @@ BOOL ScInterpreter::GetDBParams(USHORT& rTab, ScQueryParam& rParam,
             {
                 if ( nVal <= 0 || nVal > (nDBCol2 - nDBCol1 + 1) )
                     bFound = FALSE;
-                else
-                    nField = Min(nDBCol2, (USHORT)(nDBCol1 + (USHORT)nVal - 1));
             }
             else
             {
@@ -4325,7 +4322,6 @@ BOOL ScInterpreter::GetDBParams(USHORT& rTab, ScQueryParam& rParam,
                     if (!bFound)
                         aLook.IncCol();
                 }
-                nField = aLook.Col();
             }
             if (bFound)
             {
@@ -4340,34 +4336,6 @@ BOOL ScInterpreter::GetDBParams(USHORT& rTab, ScQueryParam& rParam,
                 rParam.bCaseSens = FALSE;
                 rParam.bRegExp = FALSE;
                 rParam.bDuplicate = TRUE;
-                if (pDok->CreateQueryParam(nQCol1, nQRow1, nQCol2, nQRow2, nQTab1, rParam))
-                {
-                    // An allowed missing field parameter sets the result field
-                    // to any of the query fields, just to be able to return
-                    // some cell from the iterator.
-                    if ( rMissingField )
-                        nField = rParam.GetEntry(0).nField;
-
-                    rParam.nCol1 = nField;
-                    rParam.nCol2 = nField;
-                    rTab = nDBTab1;
-                    bRet = TRUE;
-                    USHORT nCount = rParam.GetEntryCount();
-                    for ( USHORT i=0; i < nCount; i++ )
-                    {
-                        ScQueryEntry& rEntry = rParam.GetEntry(i);
-                        if ( rEntry.bDoQuery )
-                        {
-                            sal_uInt32 nIndex = 0;
-                            rEntry.bQueryByString = !pFormatter->IsNumberFormat(
-                                *rEntry.pStr, nIndex, rEntry.nVal );
-                            if ( rEntry.bQueryByString && !rParam.bRegExp )
-                                rParam.bRegExp = MayBeRegExp( *rEntry.pStr, pDok );
-                        }
-                        else
-                            break;  // for
-                    }
-                }
             }
         }
     }
diff --git a/binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx b/binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx
index 3f98fc2..ff50d4a 100644
--- a/binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx
+++ b/binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx
@@ -4984,31 +4984,8 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
         aParam.nRow2 = (USHORT)aDataAddress.EndRow;
         aParam.nTab  = aDataAddress.Sheet;
 
-        ScDocument* pDoc = pDocSh->GetDocument();
-        BOOL bOk = pDoc->CreateQueryParam(
-                            aRange.aStart.Col(), aRange.aStart.Row(),
-                            aRange.aEnd.Col(), aRange.aEnd.Row(),
-                            aRange.aStart.Tab(), aParam );
-        if ( bOk )
-        {
-            //  im FilterDescriptor sind die Fields innerhalb des Bereichs gezaehlt
-            USHORT nFieldStart = aParam.bByRow ? (USHORT)aDataAddress.StartColumn : (USHORT)aDataAddress.StartRow;
-            USHORT nCount = aParam.GetEntryCount();
-            for (USHORT i=0; i<nCount; i++)
-            {
-                ScQueryEntry& rEntry = aParam.GetEntry(i);
-                if (rEntry.bDoQuery && rEntry.nField >= nFieldStart)
-                    rEntry.nField -= nFieldStart;
-            }
-
-            pNew->SetParam( aParam );
-            return pNew;
-        }
-        else
-        {
-            delete pNew;
-            return NULL;        // ungueltig -> null
-        }
+        delete pNew;
+        return NULL;        // ungueltig -> null
     }
 
     OSL_FAIL("kein Dokument oder kein Bereich");
diff --git a/binfilter/inc/bf_sc/document.hxx b/binfilter/inc/bf_sc/document.hxx
index 37cea7e..141201d 100644
--- a/binfilter/inc/bf_sc/document.hxx
+++ b/binfilter/inc/bf_sc/document.hxx
@@ -979,10 +979,6 @@ public:
 
     SvNumberFormatter*  GetFormatTable() const;
 
-    BOOL            CreateQueryParam( USHORT nCol1, USHORT nRow1, USHORT nCol2, USHORT nRow2,
-                                        USHORT nTab, ScQueryParam& rQueryParam );
-
-
     SfxPrinter*     GetPrinter();
     void            SetPrinter( SfxPrinter* pNewPrinter );
 


More information about the Libreoffice-commits mailing list