[Libreoffice-commits] .: 2 commits - sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Thu Mar 8 17:00:41 PST 2012


 sc/source/ui/dbgui/filtdlg.cxx  |    2 --
 sc/source/ui/dbgui/foptmgr.cxx  |   30 ++++++++++++++++++------------
 sc/source/ui/dbgui/sfiltdlg.cxx |    2 --
 sc/source/ui/inc/filtdlg.hxx    |    1 -
 sc/source/ui/inc/foptmgr.hxx    |    2 --
 5 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit ecdc626d91d723c9861345008d6563b118a92a7a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Mar 9 01:51:54 2012 +0100

    don't show the anonymous db string, it is for internal use only

diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index eec3c88..61bd2ce 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -196,9 +196,17 @@ void ScFilterOptionsMgr::Init()
             }
         }
 
-        theDbArea.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ("));
-        theDbArea.append(theDbName).append(')');
-        rFtDbArea.SetText( theDbArea.makeStringAndClear() );
+        if ( !theDbName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)) )
+        {
+            theDbArea.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ("));
+            theDbArea.append(theDbName).append(')');
+            rFtDbArea.SetText( theDbArea.makeStringAndClear() );
+        }
+        else
+        {
+            rFtDbAreaLabel.SetText( rtl::OUString() );
+            rFtDbArea.SetText( rtl::OUString() );
+        }
 
         //------------------------------------------------------
         // Kopierposition:
commit 259839dcb9ee74c3a24bbec12de4ec92b56ad62e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Mar 9 01:40:03 2012 +0100

    use new anonymous db name in filter dlg, fdo#47105

diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index d3dc905..94776ce 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -114,7 +114,6 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
         aFtDbAreaLabel  ( this, ScResId( FT_DBAREA_LABEL ) ),
         aFtDbArea       ( this, ScResId( FT_DBAREA ) ),
         aStrUndefined   ( ResId::toString(ScResId(SCSTR_UNDEFINED)) ),
-        aStrNoName      ( ScGlobal::GetRscString(STR_DB_NONAME) ),
         aStrNone        ( ResId::toString(ScResId(SCSTR_NONE)) ),
         aStrEmpty       ( ResId::toString(ScResId(SCSTR_EMPTY)) ),
         aStrNotEmpty    ( ResId::toString(ScResId(SCSTR_NOTEMPTY)) ),
@@ -289,7 +288,6 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
                             aFtDbAreaLabel,
                             aFtDbArea,
                             aFlOptions,
-                            aStrNoName,
                             aStrUndefined );
 
     // Read in field lists and select entries
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index a7b2a80..eec3c88 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -42,6 +42,7 @@
 #include "viewdata.hxx"
 #include "document.hxx"
 #include "queryparam.hxx"
+#include "globalnames.hxx"
 
 #define _FOPTMGR_CXX
 #include "foptmgr.hxx"
@@ -66,7 +67,6 @@ ScFilterOptionsMgr::ScFilterOptionsMgr(
                                 FixedText&          refFtDbAreaLabel,
                                 FixedInfo&          refFtDbArea,
                                 FixedLine&          refFlOptions,
-                                const String&       refStrNoName,
                                 const String&       refStrUndefined )
 
     :   pDlg            ( ptrDlg ),
@@ -85,7 +85,6 @@ ScFilterOptionsMgr::ScFilterOptionsMgr(
         rFtDbAreaLabel  ( refFtDbAreaLabel ),
         rFtDbArea       ( refFtDbArea ),
         rFlOptions      ( refFlOptions ),
-        rStrNoName      ( refStrNoName ),
         rStrUndefined   ( refStrUndefined ),
         rQueryData      ( refQueryData )
 {
@@ -136,7 +135,7 @@ void ScFilterOptionsMgr::Init()
 
     if ( pViewData && pDoc )
     {
-        String          theAreaStr;
+        rtl::OUString theAreaStr;
         ScRange         theCurArea ( ScAddress( rQueryData.nCol1,
                                                 rQueryData.nRow1,
                                                 pViewData->GetTabNo() ),
@@ -144,8 +143,8 @@ void ScFilterOptionsMgr::Init()
                                                 rQueryData.nRow2,
                                                 pViewData->GetTabNo() ) );
         ScDBCollection* pDBColl     = pDoc->GetDBCollection();
-        String          theDbArea;
-        String          theDbName   = rStrNoName;
+        rtl::OUStringBuffer theDbArea;
+        rtl::OUString   theDbName(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME));
         const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
 
         theCurArea.Format( theAreaStr, SCR_ABS_3D, pDoc, eConv );
@@ -190,17 +189,16 @@ void ScFilterOptionsMgr::Init()
                 rBtnHeader.Check( pDBData->HasHeader() );
                 theDbName = pDBData->GetName();
 
-                if ( theDbName != rStrNoName )
-                {
+                if ( theDbName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)) )
+                    rBtnHeader.Enable();
+                else
                     rBtnHeader.Disable();
-                }
             }
         }
 
-        theDbArea.AppendAscii(RTL_CONSTASCII_STRINGPARAM(" ("));
-        theDbArea += theDbName;
-        theDbArea += ')';
-        rFtDbArea.SetText( theDbArea );
+        theDbArea.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ("));
+        theDbArea.append(theDbName).append(')');
+        rFtDbArea.SetText( theDbArea.makeStringAndClear() );
 
         //------------------------------------------------------
         // Kopierposition:
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 4cc0ec6..ce4808b 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -87,7 +87,6 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
         aFtDbAreaLabel  ( this, ScResId( FT_DBAREA_LABEL ) ),
         aFtDbArea       ( this, ScResId( FT_DBAREA ) ),
         aStrUndefined   ( ResId::toString(ScResId(SCSTR_UNDEFINED)) ),
-        aStrNoName      ( ScGlobal::GetRscString(STR_DB_NONAME) ),
         aBtnOk          ( this, ScResId( BTN_OK ) ),
         aBtnCancel      ( this, ScResId( BTN_CANCEL ) ),
         aBtnHelp        ( this, ScResId( BTN_HELP ) ),
@@ -216,7 +215,6 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
                             aFtDbAreaLabel,
                             aFtDbArea,
                             aFlOptions,
-                            aStrNoName,
                             aStrUndefined );
 
     //  Spezialfilter braucht immer Spaltenkoepfe
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index 805897c..751fa25 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -127,7 +127,6 @@ private:
     FixedText       aFtDbAreaLabel;
     FixedInfo       aFtDbArea;
     const rtl::OUString aStrUndefined;
-    const rtl::OUString aStrNoName;
     const rtl::OUString aStrNone;
 
     const rtl::OUString aStrEmpty;
diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx
index 5ba7345..1ae971f 100644
--- a/sc/source/ui/inc/foptmgr.hxx
+++ b/sc/source/ui/inc/foptmgr.hxx
@@ -68,7 +68,6 @@ public:
                                 FixedText&          refFtDbAreaLabel,
                                 FixedInfo&          refFtDbArea,
                                 FixedLine&          refFlOptions,
-                                const String&       refStrNoName,
                                 const String&       refStrUndefined );
             ~ScFilterOptionsMgr();
 
@@ -93,7 +92,6 @@ private:
     FixedInfo&      rFtDbArea;
     FixedLine&      rFlOptions;
 
-    const String&   rStrNoName;
     const String&   rStrUndefined;
 
     const ScQueryParam& rQueryData;


More information about the Libreoffice-commits mailing list