diff options
author | Oliver Specht <os@openoffice.org> | 2002-08-14 14:20:41 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2002-08-14 14:20:41 +0000 |
commit | 5eb298345c40b90f422efb21925473de944ee91b (patch) | |
tree | 85c7c98307e00f6caeb321c07098a7bf6b5f3eb1 /extensions | |
parent | 11b436d3ec0296e1d9886a3c1b2048e782181a50 (diff) |
#97180# suppress column assignment warning optionally
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/bibliography/bibconfig.cxx | 16 | ||||
-rw-r--r-- | extensions/source/bibliography/bibconfig.hxx | 9 | ||||
-rw-r--r-- | extensions/source/bibliography/bibview.cxx | 27 |
3 files changed, 40 insertions, 12 deletions
diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index bd063a7b24a7..b75862486457 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -2,9 +2,9 @@ * * $RCSfile: bibconfig.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: fs $ $Date: 2001-06-20 08:33:52 $ + * last change: $Author: os $ $Date: 2002-08-14 15:20:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -109,7 +109,7 @@ Sequence<OUString>& BibConfig::GetPropertyNames() static Sequence<OUString> aNames; if(!aNames.getLength()) { - aNames.realloc(7); + aNames.realloc(8); OUString* pNames = aNames.getArray(); pNames[0] = C2U("CurrentDataSource/DataSourceName"); pNames[1] = C2U("CurrentDataSource/Command"); @@ -118,6 +118,7 @@ Sequence<OUString>& BibConfig::GetPropertyNames() pNames[4] = C2U("ViewHeight"); pNames[5] = C2U("QueryText"); pNames[6] = C2U("QueryField"); + pNames[7] = C2U("ShowColumnAssignmentWarning"); } return aNames; } @@ -128,7 +129,8 @@ BibConfig::BibConfig() : ConfigItem(C2U("Office.DataAccess/Bibliography"), CONFIG_MODE_DELAYED_UPDATE), pMappingsArr(new MappingArray), nBeamerSize(0), - nViewSize(0) + nViewSize(0), + bShowColumnAssignmentWarning(sal_False) { //Names of the default columns aColumnDefaults[0] = C2U("Identifier"); @@ -182,6 +184,9 @@ BibConfig::BibConfig() : case 4: pValues[nProp] >>= nViewSize ; break; case 5: pValues[nProp] >>= sQueryText ; break; case 6: pValues[nProp] >>= sQueryField; break; + case 7: + bShowColumnAssignmentWarning = *(sal_Bool*)pValues[nProp].getValue(); + break; } } } @@ -312,6 +317,9 @@ void BibConfig::Commit() case 4: pValues[nProp] <<= nViewSize; break; case 5: pValues[nProp] <<= sQueryText; break; case 6: pValues[nProp] <<= sQueryField; break; + case 7: + pValues[nProp].setValue(&bShowColumnAssignmentWarning, ::getBooleanCppuType()); + break; } } PutProperties(aNames, aValues); diff --git a/extensions/source/bibliography/bibconfig.hxx b/extensions/source/bibliography/bibconfig.hxx index 7959b96e5469..216d7dc4ff81 100644 --- a/extensions/source/bibliography/bibconfig.hxx +++ b/extensions/source/bibliography/bibconfig.hxx @@ -2,9 +2,9 @@ * * $RCSfile: bibconfig.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: os $ $Date: 2001-03-14 12:28:21 $ + * last change: $Author: os $ $Date: 2002-08-14 15:20:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -136,6 +136,7 @@ class BibConfig : public utl::ConfigItem rtl::OUString sQueryText; long nBeamerSize; long nViewSize; + sal_Bool bShowColumnAssignmentWarning; MappingArray* pMappingsArr; rtl::OUString aColumnDefaults[COLUMN_COUNT]; @@ -168,6 +169,10 @@ public: const rtl::OUString& getQueryText() const {return sQueryText;} void setQueryText(const rtl::OUString& rSet) {SetModified(); sQueryText = rSet;} + sal_Bool IsShowColumnAssignmentWarning() const + { return bShowColumnAssignmentWarning;} + void SetShowColumnAssignmentWarning(sal_Bool bSet) + { bShowColumnAssignmentWarning = bSet;} }; /* -----------------------------20.11.00 11:47-------------------------------- diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index e9d95e5bd392..51f4d14176b0 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -2,9 +2,9 @@ * * $RCSfile: bibview.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: gt $ $Date: 2002-05-17 09:43:10 $ + * last change: $Author: os $ $Date: 2002-08-14 15:20:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,6 +87,9 @@ #include "bibmod.hxx" #endif #include "sections.hrc" +#ifndef _BIBCONFIG_HXX +#include "bibconfig.hxx" +#endif #ifndef _SV_SVAPP_HXX @@ -192,10 +195,22 @@ namespace bib String sErrorString( m_pGeneralPage->GetErrorString() ); if ( sErrorString.Len() ) { - sErrorString += '\n'; - sErrorString += String( BibResId( RID_MAP_QUESTION ) ); - QueryBox aQuery( this, WB_YES_NO, sErrorString ); - if ( RET_YES == aQuery.Execute() ) + sal_Bool bExecute = sal_True; + if(BibModul::GetConfig()->IsShowColumnAssignmentWarning()) + { + sErrorString += '\n'; + sErrorString += String( BibResId( RID_MAP_QUESTION ) ); + QueryBox aQuery( this, WB_YES_NO, sErrorString ); + aQuery.SetDefaultCheckBoxText(); + short nResult = aQuery.Execute(); + BibModul::GetConfig()->SetShowColumnAssignmentWarning( + !aQuery.GetCheckBoxState()); + if( RET_YES != nResult ) + { + bExecute = sal_False; + } + } + if(bExecute) { Application::PostUserEvent( STATIC_LINK( this, BibView, CallMappingHdl ) ); } |