[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 4 commits - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Mar 9 11:43:51 PST 2012
sc/source/ui/dbgui/dbnamdlg.cxx | 7 ++++---
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 --
6 files changed, 22 insertions(+), 22 deletions(-)
New commits:
commit a1091d0dbddaf59d8e5dba74e7c7a2bbd9778e06
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
Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>
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 22289e0ac4782af17f80b442b65ffe5710c9479e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Mar 9 02:08:40 2012 +0100
remove one more reference to the anonymous db string
Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index c41f860..9db699b 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -245,7 +245,6 @@ void ScDbNameDlg::Init()
pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, sal_True );
if ( pDBData )
{
- ::rtl::OUString theDbName;
ScAddress& rStart = theCurArea.aStart;
ScAddress& rEnd = theCurArea.aEnd;
SCCOL nCol1;
@@ -260,7 +259,9 @@ void ScDbNameDlg::Init()
&& (rStart.Col() == nCol1) && (rStart.Row() == nRow1)
&& (rEnd.Col() == nCol2) && (rEnd.Row() == nRow2 ) )
{
- aEdName.SetText(pDBData->GetName());
+ rtl::OUString aDBName = pDBData->GetName();
+ if (!aDBName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)))
+ aEdName.SetText(aDBName);
aBtnHeader.Check( pDBData->HasHeader() );
aBtnDoSize.Check( pDBData->IsDoSize() );
commit 2601f6cfaa34b636dbb6995f7be94d6ad4135f46
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Mar 9 02:16:06 2012 +0100
prevent creating new db ranges with the internal anonymous db name
Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index d5bffbe..c41f860 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -468,7 +468,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
if ( aNewName.Len() > 0 && aNewArea.Len() > 0 )
{
- if ( ScRangeData::IsNameValid( aNewName, pDoc ) )
+ if ( ScRangeData::IsNameValid( aNewName, pDoc ) && !aNewName.EqualsAscii(STR_DB_LOCAL_NONAME) )
{
// weil jetzt editiert werden kann, muss erst geparst werden
ScRange aTmpRange;
commit bbdd80a3812afc11d829ae7fa6ecc55f7b29586a
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
Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 2bb76ea..93ad302 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -115,7 +115,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)) ),
@@ -290,7 +289,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 865fc1b..6b918fb 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -126,7 +126,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