diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:33:40 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:33:40 +0100 |
commit | fe91a7add78b429b5a47ede2688b6d0bed68a270 (patch) | |
tree | 8e98336a1296c27f61a23ae2724fb4605ce2b481 /sc/source/ui/dbgui | |
parent | 6c5bd042ce36e796f16787493842b34249043e1e (diff) | |
parent | e7ecb70f3a49e905633995cd49a022f3270a4f09 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
chart2/source/controller/main/UndoManager.cxx
chart2/source/tools/RegressionCurveHelper.cxx
sc/inc/address.hxx
sc/inc/attrib.hxx
sc/inc/bigrange.hxx
sc/inc/callform.hxx
sc/inc/cell.hxx
sc/inc/chartarr.hxx
sc/inc/chartlis.hxx
sc/inc/chgtrack.hxx
sc/inc/collect.hxx
sc/inc/compiler.hxx
sc/inc/detdata.hxx
sc/inc/document.hxx
sc/inc/fillinfo.hxx
sc/inc/olinetab.hxx
sc/inc/prnsave.hxx
sc/inc/queryparam.hxx
sc/inc/sc.hrc
sc/inc/scabstdlg.hxx
sc/inc/table.hxx
sc/inc/validat.hxx
sc/inc/zforauto.hxx
sc/source/core/data/documen2.cxx
sc/source/core/data/document.cxx
sc/source/core/data/table1.cxx
sc/source/core/tool/address.cxx
sc/source/core/tool/token.cxx
sc/source/filter/excel/frmbase.cxx
sc/source/filter/excel/impop.cxx
sc/source/filter/excel/xename.cxx
sc/source/filter/inc/formel.hxx
sc/source/filter/inc/xename.hxx
sc/source/filter/xml/xmlexprt.cxx
sc/source/filter/xml/xmlnexpi.cxx
sc/source/filter/xml/xmlnexpi.hxx
sc/source/ui/dbgui/filtdlg.cxx
sc/source/ui/inc/docfunc.hxx
sc/source/ui/inc/namedlg.hxx
sc/source/ui/namedlg/namedlg.cxx
sc/source/ui/src/namedlg.src
Diffstat (limited to 'sc/source/ui/dbgui')
36 files changed, 890 insertions, 608 deletions
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index c4a256a60..e56147460 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -51,15 +51,15 @@ static const sal_Char pStrMrg[] = "MRG"; // ============================================================================ ScAsciiOptions::ScAsciiOptions() : - bFixedLen ( FALSE ), + bFixedLen ( false ), aFieldSeps ( ';' ), - bMergeFieldSeps ( FALSE ), + bMergeFieldSeps ( false ), bQuotedFieldAsText(false), bDetectSpecialNumber(false), cTextSep ( cDefaultTextSep ), eCharSet ( gsl_getSystemTextEncoding() ), eLang ( LANGUAGE_SYSTEM ), - bCharSetSystem ( FALSE ), + bCharSetSystem ( false ), nStartRow ( 1 ), nInfoCount ( 0 ), pColStart ( NULL ), @@ -84,8 +84,8 @@ ScAsciiOptions::ScAsciiOptions(const ScAsciiOptions& rOpt) : if (nInfoCount) { pColStart = new xub_StrLen[nInfoCount]; - pColFormat = new BYTE[nInfoCount]; - for (USHORT i=0; i<nInfoCount; i++) + pColFormat = new sal_uInt8[nInfoCount]; + for (sal_uInt16 i=0; i<nInfoCount; i++) { pColStart[i] = rOpt.pColStart[i]; pColFormat[i] = rOpt.pColFormat[i]; @@ -106,7 +106,7 @@ ScAsciiOptions::~ScAsciiOptions() } -void ScAsciiOptions::SetColInfo( USHORT nCount, const xub_StrLen* pStart, const BYTE* pFormat ) +void ScAsciiOptions::SetColInfo( sal_uInt16 nCount, const xub_StrLen* pStart, const sal_uInt8* pFormat ) { delete[] pColStart; delete[] pColFormat; @@ -116,8 +116,8 @@ void ScAsciiOptions::SetColInfo( USHORT nCount, const xub_StrLen* pStart, const if (nInfoCount) { pColStart = new xub_StrLen[nInfoCount]; - pColFormat = new BYTE[nInfoCount]; - for (USHORT i=0; i<nInfoCount; i++) + pColFormat = new sal_uInt8[nInfoCount]; + for (sal_uInt16 i=0; i<nInfoCount; i++) { pColStart[i] = pStart[i]; pColFormat[i] = pFormat[i]; @@ -169,7 +169,7 @@ ScAsciiOptions& ScAsciiOptions::operator=( const ScAsciiOptions& rCpy ) } -BOOL ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const +sal_Bool ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const { if ( bFixedLen == rCmp.bFixedLen && aFieldSeps == rCmp.aFieldSeps && @@ -183,14 +183,14 @@ BOOL ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const { DBG_ASSERT( !nInfoCount || (pColStart && pColFormat && rCmp.pColStart && rCmp.pColFormat), "0-Zeiger in ScAsciiOptions" ); - for (USHORT i=0; i<nInfoCount; i++) + for (sal_uInt16 i=0; i<nInfoCount; i++) if ( pColStart[i] != rCmp.pColStart[i] || pColFormat[i] != rCmp.pColFormat[i] ) - return FALSE; + return false; - return TRUE; + return sal_True; } - return FALSE; + return false; } // @@ -212,18 +212,18 @@ void ScAsciiOptions::ReadFromString( const String& rString ) if ( nCount >= 1 ) { - bFixedLen = bMergeFieldSeps = FALSE; + bFixedLen = bMergeFieldSeps = false; aFieldSeps.Erase(); aToken = rString.GetToken(0,','); if ( aToken.EqualsAscii(pStrFix) ) - bFixedLen = TRUE; + bFixedLen = sal_True; nSub = aToken.GetTokenCount('/'); for ( i=0; i<nSub; i++ ) { String aCode = aToken.GetToken( i, '/' ); if ( aCode.EqualsAscii(pStrMrg) ) - bMergeFieldSeps = TRUE; + bMergeFieldSeps = sal_True; else { sal_Int32 nVal = aCode.ToInt32(); @@ -279,11 +279,11 @@ void ScAsciiOptions::ReadFromString( const String& rString ) if (nInfoCount) { pColStart = new xub_StrLen[nInfoCount]; - pColFormat = new BYTE[nInfoCount]; - for (USHORT nInfo=0; nInfo<nInfoCount; nInfo++) + pColFormat = new sal_uInt8[nInfoCount]; + for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++) { pColStart[nInfo] = (xub_StrLen) aToken.GetToken( 2*nInfo, '/' ).ToInt32(); - pColFormat[nInfo] = (BYTE) aToken.GetToken( 2*nInfo+1, '/' ).ToInt32(); + pColFormat[nInfo] = (sal_uInt8) aToken.GetToken( 2*nInfo+1, '/' ).ToInt32(); } } else @@ -313,6 +313,10 @@ void ScAsciiOptions::ReadFromString( const String& rString ) aToken = rString.GetToken(7, ','); bDetectSpecialNumber = aToken.EqualsAscii("true") ? true : false; } + else + bDetectSpecialNumber = sal_True; // default of versions that didn't add the parameter + + // 9th token is used for "Save as shown" in export options } @@ -375,7 +379,7 @@ String ScAsciiOptions::WriteToString() const // DBG_ASSERT( !nInfoCount || (pColStart && pColFormat), "0-Zeiger in ScAsciiOptions" ); - for (USHORT nInfo=0; nInfo<nInfoCount; nInfo++) + for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++) { if (nInfo) aOutStr += '/'; @@ -400,6 +404,8 @@ String ScAsciiOptions::WriteToString() const // Detect special nubmers. aOutStr += String::CreateFromAscii(bDetectSpecialNumber ? "true" : "false"); + // 9th token is used for "Save as shown" in export options + return aOutStr; } diff --git a/sc/source/ui/dbgui/asciiopt.src b/sc/source/ui/dbgui/asciiopt.src index 9396b862d..94008212c 100644 --- a/sc/source/ui/dbgui/asciiopt.src +++ b/sc/source/ui/dbgui/asciiopt.src @@ -29,6 +29,7 @@ ModalDialog RID_SCDLG_ASCII { + HelpID = "sc:ModalDialog:RID_SCDLG_ASCII"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 320 , 305 ) ; @@ -71,6 +72,7 @@ ModalDialog RID_SCDLG_ASCII ListBox LB_CHARSET { + HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_CHARSET"; Pos = MAP_APPFONT ( 76 , 14 ) ; Size = MAP_APPFONT ( 130 , 61 ) ; TabStop = TRUE ; @@ -87,6 +89,7 @@ ModalDialog RID_SCDLG_ASCII ListBox LB_CUSTOMLANG { + HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_CUSTOMLANG"; Pos = MAP_APPFONT ( 76 , 30 ) ; Size = MAP_APPFONT ( 130 , 61 ) ; TabStop = TRUE ; @@ -103,6 +106,7 @@ ModalDialog RID_SCDLG_ASCII NumericField NF_AT_ROW { + HelpID = "sc:NumericField:RID_SCDLG_ASCII:NF_AT_ROW"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 76 , 46 ) ; @@ -121,6 +125,7 @@ ModalDialog RID_SCDLG_ASCII }; RadioButton RB_FIXED { + HelpID = "sc:RadioButton:RID_SCDLG_ASCII:RB_FIXED"; Pos = MAP_APPFONT ( 12 , 75 ) ; Size = MAP_APPFONT ( 243 , 10 ) ; Text [ en-US ] = "~Fixed width" ; @@ -128,6 +133,7 @@ ModalDialog RID_SCDLG_ASCII }; RadioButton RB_SEPARATED { + HelpID = "sc:RadioButton:RID_SCDLG_ASCII:RB_SEPARATED"; Pos = MAP_APPFONT ( 12 , 89 ) ; Size = MAP_APPFONT ( 243 , 10 ) ; Text [ en-US ] = "~Separated by" ; @@ -137,6 +143,7 @@ ModalDialog RID_SCDLG_ASCII CheckBox CKB_TAB { + HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_TAB"; Pos = MAP_APPFONT ( 20 , 102 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; TabStop = TRUE ; @@ -144,6 +151,7 @@ ModalDialog RID_SCDLG_ASCII }; CheckBox CKB_COMMA { + HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_COMMA"; Pos = MAP_APPFONT ( 92 , 102 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; TabStop = TRUE ; @@ -151,6 +159,7 @@ ModalDialog RID_SCDLG_ASCII }; CheckBox CKB_OTHER { + HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_OTHER"; Pos = MAP_APPFONT ( 164 , 102 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -158,6 +167,7 @@ ModalDialog RID_SCDLG_ASCII }; Edit ED_OTHER { + HelpID = "sc:Edit:RID_SCDLG_ASCII:ED_OTHER"; Border = TRUE ; Pos = MAP_APPFONT ( 218 , 100 ) ; Size = MAP_APPFONT ( 37 , 12 ) ; @@ -167,6 +177,7 @@ ModalDialog RID_SCDLG_ASCII CheckBox CKB_SEMICOLON { + HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_SEMICOLON"; Pos = MAP_APPFONT ( 20 , 115 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; TabStop = TRUE ; @@ -174,6 +185,7 @@ ModalDialog RID_SCDLG_ASCII }; CheckBox CKB_SPACE { + HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_SPACE"; Pos = MAP_APPFONT ( 92 , 115 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; TabStop = TRUE ; @@ -182,6 +194,7 @@ ModalDialog RID_SCDLG_ASCII CheckBox CB_ASONCE { + HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_ASONCE"; Pos = MAP_APPFONT ( 20 , 130 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; TabStop = TRUE ; @@ -190,6 +203,7 @@ ModalDialog RID_SCDLG_ASCII ComboBox CB_TEXTSEP { + HelpID = "sc:ComboBox:RID_SCDLG_ASCII:CB_TEXTSEP"; Pos = MAP_APPFONT ( 218 , 128 ) ; Size = MAP_APPFONT ( 37 , 94 ) ; TabStop = TRUE ; @@ -211,6 +225,7 @@ ModalDialog RID_SCDLG_ASCII CheckBox CB_QUOTED_AS_TEXT { + HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_QUOTED_AS_TEXT"; Pos = MAP_APPFONT ( 12 , 158 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; TabStop = TRUE ; @@ -219,6 +234,7 @@ ModalDialog RID_SCDLG_ASCII CheckBox CB_DETECT_SPECIAL_NUMBER { + HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_DETECT_SPECIAL_NUMBER"; Pos = MAP_APPFONT ( 12 , 171 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; TabStop = TRUE ; @@ -239,6 +255,7 @@ ModalDialog RID_SCDLG_ASCII }; ListBox LB_TYPE1 { + HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_TYPE1"; Pos = MAP_APPFONT ( 76 , 198 ) ; Size = MAP_APPFONT ( 60 , 68 ) ; TabStop = TRUE ; diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 3860e846c..f07ed1247 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -65,7 +65,7 @@ public: ScAreaData() {} ~ScAreaData() {} - void Set( const String& rName, const String& rArea, BOOL bDb ) + void Set( const String& rName, const String& rArea, sal_Bool bDb ) { aStrName = rName; aStrArea = rArea; @@ -74,7 +74,7 @@ public: String aStrName; String aStrArea; - BOOL bIsDbArea; + sal_Bool bIsDbArea; }; @@ -156,7 +156,7 @@ void ScConsolidateDlg::Init() DBG_ASSERT( pViewData && pDoc && pRangeUtil, "Error in Ctor" ); String aStr; - USHORT i=0; + sal_uInt16 i=0; aEdDataArea .SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); aEdDestArea .SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); @@ -222,8 +222,8 @@ void ScConsolidateDlg::Init() ScRangeName* pRangeNames = pDoc->GetRangeName(); ScDBCollection* pDbNames = pDoc->GetDBCollection(); - const USHORT nRangeCount = pRangeNames ? pRangeNames->size() : 0; - const USHORT nDbCount = pDbNames ? pDbNames ->GetCount() : 0; + const sal_uInt16 nRangeCount = pRangeNames ? pRangeNames->size() : 0; + const sal_uInt16 nDbCount = pDbNames ? pDbNames ->GetCount() : 0; nAreaDataCount = nRangeCount+nDbCount; pAreaData = NULL; @@ -234,7 +234,7 @@ void ScConsolidateDlg::Init() String aStrName; String aStrArea; - USHORT nAt = 0; + sal_uInt16 nAt = 0; ScRange aRange; ScAreaNameIterator aIter( pDoc ); while ( aIter.Next( aStrName, aRange ) ) @@ -269,7 +269,7 @@ void ScConsolidateDlg::FillAreaLists() { String aString; - for ( USHORT i=0; + for ( sal_uInt16 i=0; (i<nAreaDataCount) && (pAreaData[i].aStrName.Len()>0); i++ ) { @@ -295,7 +295,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) RefInputStart( pRefInputEdit ); String aStr; - USHORT nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch + sal_uInt16 nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch const formula::FormulaGrammar::AddressConvention eConv = pDocP->GetAddressConvention(); if ( rRef.aStart.Tab() != rRef.aEnd.Tab() ) @@ -315,7 +315,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -BOOL ScConsolidateDlg::Close() +sal_Bool ScConsolidateDlg::Close() { return DoClose( ScConsolidateDlgWrapper::GetChildWindowId() ); } @@ -327,7 +327,7 @@ void ScConsolidateDlg::SetActive() { if ( bDlgLostFocus ) { - bDlgLostFocus = FALSE; + bDlgLostFocus = false; if ( pRefInputEdit ) { @@ -346,20 +346,20 @@ void ScConsolidateDlg::SetActive() void ScConsolidateDlg::Deactivate() { - bDlgLostFocus = TRUE; + bDlgLostFocus = sal_True; } //---------------------------------------------------------------------------- -BOOL ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) +sal_Bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) { if ( !pRangeUtil || !pDoc || !pViewData || ((pEd != &aEdDataArea) && (pEd != &aEdDestArea)) ) - return FALSE; + return false; SCTAB nTab = pViewData->GetTabNo(); - BOOL bEditOk = FALSE; + sal_Bool bEditOk = false; String theCompleteStr; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -411,7 +411,7 @@ IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control*, pCtr ) IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG ) { - USHORT nDataAreaCount = aLbConsAreas.GetEntryCount(); + sal_uInt16 nDataAreaCount = aLbConsAreas.GetEntryCount(); if ( nDataAreaCount > 0 ) { @@ -425,7 +425,7 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG ) ScConsolidateParam theOutParam( theConsData ); ScArea** ppDataAreas = new ScArea*[nDataAreaCount]; ScArea* pArea; - USHORT i=0; + sal_uInt16 i=0; for ( i=0; i<nDataAreaCount; i++ ) { @@ -450,7 +450,7 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG ) ScConsolidateItem aOutItem( nWhichCons, &theOutParam ); - SetDispatcherLock( FALSE ); + SetDispatcherLock( false ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( SID_CONSOLIDATE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -481,16 +481,16 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, PushButton*, pBtn ) { String aNewEntry( aEdDataArea.GetText() ); ScArea** ppAreas = NULL; - USHORT nAreaCount = 0; + sal_uInt16 nAreaCount = 0; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); - if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, TRUE, eConv ) ) + if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, sal_True, eConv ) ) { // IsAbsTabArea() legt ein Array von ScArea-Zeigern an, // welche ebenfalls dynamisch erzeugt wurden. // Diese Objekte muessen hier abgeraeumt werden. - for ( USHORT i=0; i<nAreaCount; i++ ) + for ( sal_uInt16 i=0; i<nAreaCount; i++ ) { String aNewArea; @@ -551,7 +551,7 @@ IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb ) else if ( (pLb == &aLbDataArea) || (pLb == &aLbDestArea) ) { Edit* pEd = (pLb == &aLbDataArea) ? &aEdDataArea : &aEdDestArea; - USHORT nSelPos = pLb->GetSelectEntryPos(); + sal_uInt16 nSelPos = pLb->GetSelectEntryPos(); if ( pRangeUtil && (nSelPos > 0) @@ -610,7 +610,7 @@ IMPL_LINK( ScConsolidateDlg, ModifyHdl, formula::RefEdit*, pEd ) // auch noch in tpsubt bzw. ueberall, wo StarCalc-Funktionen // auswaehlbar sind. -ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( USHORT nPos ) +ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( sal_uInt16 nPos ) { switch ( nPos ) { @@ -633,7 +633,7 @@ ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( USHORT nPos ) //---------------------------------------------------------------------------- -USHORT ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc ) +sal_uInt16 ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc ) { switch ( eFunc ) { diff --git a/sc/source/ui/dbgui/consdlg.src b/sc/source/ui/dbgui/consdlg.src index 9716b190c..394dd80ac 100644 --- a/sc/source/ui/dbgui/consdlg.src +++ b/sc/source/ui/dbgui/consdlg.src @@ -28,7 +28,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE { OutputSize = TRUE ; - HelpId = SID_OPENDLG_CONSOLIDATE ; + HelpId = CMD_SID_OPENDLG_CONSOLIDATE ; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 280 , 154 ) ; @@ -37,6 +37,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE Closeable = FALSE ; ListBox LB_FUNC { + HelpID = "sc:ListBox:RID_SCDLG_CONSOLIDATE:LB_FUNC"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 212 , 90 ) ; @@ -59,6 +60,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; Edit ED_DATA_AREA { + HelpID = "sc:Edit:RID_SCDLG_CONSOLIDATE:ED_DATA_AREA"; Border = TRUE ; Pos = MAP_APPFONT ( 100 , 106 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; @@ -66,6 +68,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; Edit ED_DEST_AREA { + HelpID = "sc:Edit:RID_SCDLG_CONSOLIDATE:ED_DEST_AREA"; Border = TRUE ; Pos = MAP_APPFONT ( 100 , 135 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; @@ -73,6 +76,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; ImageButton RB_DATA_AREA { + HelpID = "sc:ImageButton:RID_SCDLG_CONSOLIDATE:RB_DATA_AREA"; Pos = MAP_APPFONT ( 206 , 105 ) ; Size = MAP_APPFONT ( 13 , 15 ) ; TabStop = TRUE ; @@ -80,6 +84,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; ImageButton RB_DEST_AREA { + HelpID = "sc:ImageButton:RID_SCDLG_CONSOLIDATE:RB_DEST_AREA"; Pos = MAP_APPFONT ( 206 , 134 ) ; Size = MAP_APPFONT ( 13 , 15 ) ; TabStop = TRUE ; @@ -87,6 +92,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; ListBox LB_DATA_AREA { + HelpID = "sc:ListBox:RID_SCDLG_CONSOLIDATE:LB_DATA_AREA"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 106 ) ; Size = MAP_APPFONT ( 90 , 90 ) ; @@ -95,6 +101,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; ListBox LB_DEST_AREA { + HelpID = "sc:ListBox:RID_SCDLG_CONSOLIDATE:LB_DEST_AREA"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 135 ) ; Size = MAP_APPFONT ( 90 , 90 ) ; @@ -103,6 +110,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; MultiListBox LB_CONSAREAS { + HelpID = "sc:MultiListBox:RID_SCDLG_CONSOLIDATE:LB_CONSAREAS"; SimpleMode = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 46 ) ; @@ -135,6 +143,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; CheckBox BTN_BYROW { + HelpID = "sc:CheckBox:RID_SCDLG_CONSOLIDATE:BTN_BYROW"; Pos = MAP_APPFONT ( 12 , 165 ) ; Size = MAP_APPFONT ( 94 , 10 ) ; Text [ en-US ] = "~Row labels" ; @@ -142,6 +151,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; CheckBox BTN_BYCOL { + HelpID = "sc:CheckBox:RID_SCDLG_CONSOLIDATE:BTN_BYCOL"; Pos = MAP_APPFONT ( 12 , 179 ) ; Size = MAP_APPFONT ( 94 , 10 ) ; TabStop = TRUE ; @@ -167,6 +177,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; CheckBox BTN_REFS { + HelpID = "sc:CheckBox:RID_SCDLG_CONSOLIDATE:BTN_REFS"; Pos = MAP_APPFONT ( 121 , 165 ) ; Size = MAP_APPFONT ( 94 , 10 ) ; Text [ en-US ] = "~Link to source data" ; @@ -193,6 +204,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; MoreButton BTN_MORE { + HelpID = "sc:MoreButton:RID_SCDLG_CONSOLIDATE:BTN_MORE"; Pos = MAP_APPFONT ( 224 , 134 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -201,6 +213,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; PushButton BTN_REMOVE { + HelpID = "sc:PushButton:RID_SCDLG_CONSOLIDATE:BTN_REMOVE"; Pos = MAP_APPFONT ( 224 , 114 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -208,6 +221,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE }; PushButton BTN_ADD { + HelpID = "sc:PushButton:RID_SCDLG_CONSOLIDATE:BTN_ADD"; Pos = MAP_APPFONT ( 224 , 96 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add" ; diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index f855aae63..b97d49418 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -82,7 +82,7 @@ struct Func_Select ScCsvGrid::ScCsvGrid( ScCsvControl& rParent ) : ScCsvControl( rParent ), mpColorConfig( 0 ), - mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE ) ), + mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), true ) ), maHeaderFont( GetFont() ), maColStates( 1 ), maTypeNames( 1 ), @@ -252,7 +252,7 @@ void ScCsvGrid::InitFonts() aDefSet.Put( aComplexItem ); // set Asian/Complex font size to height of character in Latin font - ULONG nFontHt = static_cast< ULONG >( maMonoFont.GetSize().Height() ); + sal_uLong nFontHt = static_cast< sal_uLong >( maMonoFont.GetSize().Height() ); aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CJK ) ); aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CTL ) ); @@ -903,8 +903,8 @@ void ScCsvGrid::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rKCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = rKCode.GetCode(); - bool bShift = rKCode.IsShift() == TRUE; - bool bMod1 = rKCode.IsMod1() == TRUE; + bool bShift = rKCode.IsShift() == sal_True; + bool bMod1 = rKCode.IsMod1() == sal_True; if( !rKCode.IsMod2() ) { diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index 4cdce977c..a51dee5dd 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -129,7 +129,7 @@ ScCsvRuler::~ScCsvRuler() // common ruler handling ------------------------------------------------------ void ScCsvRuler::SetPosSizePixel( - long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) + long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) { if( nFlags & WINDOW_POSSIZE_HEIGHT ) nHeight = GetTextHeight() + mnSplitSize + 2; diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx index 4edaaee94..fda584a62 100644 --- a/sc/source/ui/dbgui/dapidata.cxx +++ b/sc/source/ui/dbgui/dapidata.cxx @@ -125,7 +125,7 @@ ScDataPilotDatabaseDlg::~ScDataPilotDatabaseDlg() void ScDataPilotDatabaseDlg::GetValues( ScImportSourceDesc& rDesc ) { - USHORT nSelect = aLbType.GetSelectEntryPos(); + sal_uInt16 nSelect = aLbType.GetSelectEntryPos(); rDesc.aDBName = aLbDatabase.GetSelectEntry(); rDesc.aObject = aCbObject.GetText(); @@ -156,7 +156,7 @@ void ScDataPilotDatabaseDlg::FillObjects() if (!aDatabaseName.Len()) return; - USHORT nSelect = aLbType.GetSelectEntryPos(); + sal_uInt16 nSelect = aLbType.GetSelectEntryPos(); if ( nSelect > DP_TYPELIST_QUERY ) return; // only tables and queries diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx index 34a0148b7..cd092fe9f 100644 --- a/sc/source/ui/dbgui/dapitype.cxx +++ b/sc/source/ui/dbgui/dapitype.cxx @@ -45,7 +45,7 @@ using ::rtl::OUString; //------------------------------------------------------------------------- -ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal ) : +ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bEnableExternal ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DAPITYPE ) ), // aFlFrame ( this, ScResId( FL_FRAME ) ), @@ -96,7 +96,7 @@ bool ScDataPilotSourceTypeDlg::IsNamedRange() const OUString ScDataPilotSourceTypeDlg::GetSelectedNamedRange() const { - USHORT nPos = aLbNamedRange.GetSelectEntryPos(); + sal_uInt16 nPos = aLbNamedRange.GetSelectEntryPos(); return aLbNamedRange.GetEntry(nPos); } diff --git a/sc/source/ui/dbgui/dapitype.src b/sc/source/ui/dbgui/dapitype.src index fa49dfbb6..283106c15 100644 --- a/sc/source/ui/dbgui/dapitype.src +++ b/sc/source/ui/dbgui/dapitype.src @@ -140,6 +140,7 @@ ModalDialog RID_SCDLG_DAPISERVICE }; ListBox LB_SERVICE { + HelpID = "sc:ListBox:RID_SCDLG_DAPISERVICE:LB_SERVICE"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 12 ) ; Size = MAP_APPFONT ( 120 , 80 ) ; @@ -154,6 +155,7 @@ ModalDialog RID_SCDLG_DAPISERVICE }; Edit ED_SOURCE { + HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_SOURCE"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 28 ) ; Size = MAP_APPFONT ( 120 , 12 ) ; @@ -167,6 +169,7 @@ ModalDialog RID_SCDLG_DAPISERVICE }; Edit ED_NAME { + HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 44 ) ; Size = MAP_APPFONT ( 120 , 12 ) ; @@ -180,6 +183,7 @@ ModalDialog RID_SCDLG_DAPISERVICE }; Edit ED_USER { + HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_USER"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 60 ) ; Size = MAP_APPFONT ( 120 , 12 ) ; @@ -193,6 +197,7 @@ ModalDialog RID_SCDLG_DAPISERVICE }; Edit ED_PASSWD { + HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_PASSWD"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 76 ) ; Size = MAP_APPFONT ( 120 , 12 ) ; @@ -248,6 +253,7 @@ ModalDialog RID_SCDLG_DAPIDATA }; ListBox LB_DATABASE { + HelpID = "sc:ListBox:RID_SCDLG_DAPIDATA:LB_DATABASE"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 12 ) ; Size = MAP_APPFONT ( 110 , 80 ) ; @@ -263,6 +269,7 @@ ModalDialog RID_SCDLG_DAPIDATA }; ComboBox CB_OBJECT { + HelpID = "sc:ComboBox:RID_SCDLG_DAPIDATA:CB_OBJECT"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 28 ) ; Size = MAP_APPFONT ( 110 , 80 ) ; @@ -278,6 +285,7 @@ ModalDialog RID_SCDLG_DAPIDATA }; ListBox LB_OBJTYPE { + HelpID = "sc:ListBox:RID_SCDLG_DAPIDATA:LB_OBJTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 44 ) ; Size = MAP_APPFONT ( 110 , 80 ) ; diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index f8abca9e4..381d658ad 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -78,7 +78,7 @@ public: : rEdAssign(rEd), rBtnHeader(rHdr), rBtnSize(rSize), rBtnFormat(rFmt), rBtnStrip(rStrip), rCurArea(rArea), - bHeader(FALSE), bSize(FALSE), bFormat(FALSE), bDirty(FALSE) {} + bHeader(false), bSize(false), bFormat(false), bDirty(false) {} void Save(); void Restore(); @@ -91,11 +91,11 @@ private: ScRange& rCurArea; String aStr; ScRange aArea; - BOOL bHeader:1; - BOOL bSize:1; - BOOL bFormat:1; - BOOL bStrip:1; - BOOL bDirty:1; + sal_Bool bHeader:1; + sal_Bool bSize:1; + sal_Bool bFormat:1; + sal_Bool bStrip:1; + sal_Bool bDirty:1; }; @@ -110,7 +110,7 @@ void DBSaveData::Save() bSize = rBtnSize.IsChecked(); bFormat = rBtnFormat.IsChecked(); bStrip = rBtnStrip.IsChecked(); - bDirty = TRUE; + bDirty = sal_True; } @@ -126,7 +126,7 @@ void DBSaveData::Restore() rBtnSize.Check ( bSize ); rBtnFormat.Check ( bFormat ); rBtnStrip.Check ( bStrip ); - bDirty = FALSE; + bDirty = false; } } @@ -170,7 +170,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, // pViewData ( ptrViewData ), pDoc ( ptrViewData->GetDocument() ), - bRefInputMode ( FALSE ), + bRefInputMode ( false ), aAddrDetails ( pDoc->GetAddressConvention(), 0, 0 ), aLocalDbCol ( *(pDoc->GetDBCollection()) ) { @@ -186,6 +186,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, aBtnDoSize, aBtnKeepFmt, aBtnStripData, theCurArea ); Init(); FreeResource(); + aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign); } @@ -209,7 +210,7 @@ ScDbNameDlg::~ScDbNameDlg() void ScDbNameDlg::Init() { - aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen + aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen aBtnMore.AddWindow( &aFlOptions ); aBtnMore.AddWindow( &aBtnHeader ); @@ -252,7 +253,7 @@ void ScDbNameDlg::Init() if ( pDBColl ) { // Feststellen, ob definierter DB-Bereich markiert wurde: - pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, TRUE ); + pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, sal_True ); if ( pDBData ) { String theDbName; @@ -287,7 +288,7 @@ void ScDbNameDlg::Init() aEdAssign.SetText( theAreaStr ); aEdName.GrabFocus(); - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); NameModifyHdl( 0 ); } @@ -335,7 +336,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) aFTSource.Enable(); aFTOperations.Enable(); aBtnAdd.Enable(); - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); } } @@ -343,7 +344,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -BOOL ScDbNameDlg::Close() +sal_Bool ScDbNameDlg::Close() { return DoClose( ScDbNameDlgWrapper::GetChildWindowId() ); } @@ -365,9 +366,9 @@ void ScDbNameDlg::SetActive() void ScDbNameDlg::UpdateNames() { - USHORT nNameCount = aLocalDbCol.GetCount(); + sal_uInt16 nNameCount = aLocalDbCol.GetCount(); - aEdName.SetUpdateMode( FALSE ); + aEdName.SetUpdateMode( false ); //----------------------------------------------------------- aEdName.Clear(); aEdAssign.SetText( EMPTY_STRING ); @@ -377,7 +378,7 @@ void ScDbNameDlg::UpdateNames() ScDBData* pDbData = NULL; String aString; - for ( USHORT i=0; i<nNameCount; i++ ) + for ( sal_uInt16 i=0; i<nNameCount; i++ ) { pDbData = (ScDBData*)(aLocalDbCol.At( i )); if ( pDbData ) @@ -395,7 +396,7 @@ void ScDbNameDlg::UpdateNames() aBtnRemove.Disable(); } //----------------------------------------------------------- - aEdName.SetUpdateMode( TRUE ); + aEdName.SetUpdateMode( sal_True ); aEdName.Invalidate(); } @@ -404,7 +405,7 @@ void ScDbNameDlg::UpdateNames() void ScDbNameDlg::UpdateDBData( const String& rStrName ) { String theArea; - USHORT nAt; + sal_uInt16 nAt; ScDBData* pData; aLocalDbCol.SearchName( rStrName, nAt ); @@ -445,7 +446,7 @@ void ScDbNameDlg::UpdateDBData( const String& rStrName ) //------------------------------------------------------------------------ -BOOL ScDbNameDlg::IsRefInputMode() const +sal_Bool ScDbNameDlg::IsRefInputMode() const { return bRefInputMode; } @@ -502,7 +503,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) ScAddress aEnd = theCurArea.aEnd; ScDBData* pOldEntry = NULL; - USHORT nFoundAt = 0; + sal_uInt16 nFoundAt = 0; if ( aLocalDbCol.SearchName( aNewName, nFoundAt ) ) pOldEntry = aLocalDbCol[nFoundAt]; if (pOldEntry) @@ -511,7 +512,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) pOldEntry->MoveTo( aStart.Tab(), aStart.Col(), aStart.Row(), aEnd.Col(), aEnd.Row() ); - pOldEntry->SetByRow( TRUE ); + pOldEntry->SetByRow( sal_True ); pOldEntry->SetHeader( aBtnHeader.IsChecked() ); pOldEntry->SetDoSize( aBtnDoSize.IsChecked() ); pOldEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() ); @@ -524,7 +525,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) ScDBData* pNewEntry = new ScDBData( aNewName, aStart.Tab(), aStart.Col(), aStart.Row(), aEnd.Col(), aEnd.Row(), - TRUE, aBtnHeader.IsChecked() ); + sal_True, aBtnHeader.IsChecked() ); pNewEntry->SetDoSize( aBtnDoSize.IsChecked() ); pNewEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() ); pNewEntry->SetStripData( aBtnStripData.IsChecked() ); @@ -541,13 +542,13 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) aBtnAdd.Disable(); aBtnRemove.Disable(); aEdAssign.SetText( EMPTY_STRING ); - aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen - aBtnDoSize.Check( FALSE ); - aBtnKeepFmt.Check( FALSE ); - aBtnStripData.Check( FALSE ); + aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen + aBtnDoSize.Check( false ); + aBtnKeepFmt.Check( false ); + aBtnStripData.Check( false ); SetInfoStrings( NULL ); // leer theCurArea = ScRange(); - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); NameModifyHdl( 0 ); } @@ -572,7 +573,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG ) { - USHORT nRemoveAt = 0; + sal_uInt16 nRemoveAt = 0; const String aStrEntry = aEdName.GetText(); if ( aLocalDbCol.SearchName( aStrEntry, nRemoveAt ) ) @@ -608,12 +609,12 @@ IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG ) aBtnRemove.Disable(); aEdAssign.SetText( EMPTY_STRING ); theCurArea = ScRange(); - aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen - aBtnDoSize.Check( FALSE ); - aBtnKeepFmt.Check( FALSE ); - aBtnStripData.Check( FALSE ); + aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen + aBtnDoSize.Check( false ); + aBtnKeepFmt.Check( false ); + aBtnStripData.Check( false ); SetInfoStrings( NULL ); // leer - bSaved=FALSE; + bSaved=false; pSaveObj->Restore(); NameModifyHdl( 0 ); } @@ -626,7 +627,7 @@ IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG ) IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) { String theName = aEdName.GetText(); - BOOL bNameFound = (COMBOBOX_ENTRY_NOTFOUND + sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND != aEdName.GetEntryPos( theName )); if ( theName.Len() == 0 ) @@ -644,11 +645,11 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) aFTOperations.Disable(); aEdAssign .Disable(); aRbAssign .Disable(); - //bSaved=FALSE; + //bSaved=sal_False; //pSaveObj->Restore(); //@BugID 54702 Enablen/Disablen nur noch in Basisklasse - //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg - bRefInputMode = FALSE; + //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg + bRefInputMode = false; } else { @@ -659,7 +660,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) if(!bSaved) { - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); } UpdateDBData( theName ); @@ -669,7 +670,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) if ( aBtnAdd.GetText() != aStrAdd ) aBtnAdd.SetText( aStrAdd ); - bSaved=FALSE; + bSaved=false; pSaveObj->Restore(); if ( aEdAssign.GetText().Len() > 0 ) @@ -701,7 +702,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) //@BugID 54702 Enablen/Disablen nur noch in Basisklasse //SFX_APPWINDOW->Enable(); - bRefInputMode = TRUE; + bRefInputMode = sal_True; } return 0; } diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx index d206783c3..190f34149 100644 --- a/sc/source/ui/dbgui/dpgroupdlg.cxx +++ b/sc/source/ui/dbgui/dpgroupdlg.cxx @@ -197,7 +197,7 @@ ScDPNumGroupInfo ScDPNumGroupDlg::GetGroupInfo() const { ScDPNumGroupInfo aInfo; aInfo.Enable = sal_True; - aInfo.DateValues = sal_False; + aInfo.DateValues = false; aInfo.AutoStart = maStartHelper.IsAuto(); aInfo.AutoEnd = maEndHelper.IsAuto(); @@ -239,21 +239,21 @@ ScDPDateGroupDlg::ScDPDateGroupDlg( Window* pParent, { maLbUnits.SetHelpId( HID_SC_DPDATEGROUP_LB ); ResStringArray aArr( ScResId( STR_UNITS ) ); - for( USHORT nIdx = 0, nCount = sal::static_int_cast<USHORT>(aArr.Count()); nIdx < nCount; ++nIdx ) + for( sal_uInt16 nIdx = 0, nCount = sal::static_int_cast<sal_uInt16>(aArr.Count()); nIdx < nCount; ++nIdx ) maLbUnits.InsertEntry( aArr.GetString( nIdx ) ); FreeResource(); - maEdStart.SetShowDateCentury( TRUE ); - maEdEnd.SetShowDateCentury( TRUE ); + maEdStart.SetShowDateCentury( sal_True ); + maEdEnd.SetShowDateCentury( sal_True ); maStartHelper.SetValue( rInfo.AutoStart, rInfo.Start ); maEndHelper.SetValue( rInfo.AutoEnd, rInfo.End ); if( nDatePart == 0 ) nDatePart = com::sun::star::sheet::DataPilotFieldGroupBy::MONTHS; - for( ULONG nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx ) - maLbUnits.CheckEntryPos( static_cast< USHORT >( nIdx ), (nDatePart & spnDateParts[ nIdx ]) != 0 ); + for( sal_uLong nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx ) + maLbUnits.CheckEntryPos( static_cast< sal_uInt16 >( nIdx ), (nDatePart & spnDateParts[ nIdx ]) != 0 ); if( rInfo.DateValues ) { @@ -317,8 +317,8 @@ sal_Int32 ScDPDateGroupDlg::GetDatePart() const // return listbox contents for "units" mode sal_Int32 nDatePart = 0; - for( ULONG nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx ) - if( maLbUnits.IsChecked( static_cast< USHORT >( nIdx ) ) ) + for( sal_uLong nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx ) + if( maLbUnits.IsChecked( static_cast< sal_uInt16 >( nIdx ) ) ) nDatePart |= spnDateParts[ nIdx ]; return nDatePart; } diff --git a/sc/source/ui/dbgui/dpgroupdlg.src b/sc/source/ui/dbgui/dpgroupdlg.src index 6e6ba170f..4e73cfc18 100644 --- a/sc/source/ui/dbgui/dpgroupdlg.src +++ b/sc/source/ui/dbgui/dpgroupdlg.src @@ -46,6 +46,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP }; RadioButton RB_AUTOSTART { + HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_AUTOSTART"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -53,6 +54,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP }; RadioButton RB_MANSTART { + HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_MANSTART"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -60,6 +62,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP }; Edit ED_START { + HelpID = "sc:Edit:RID_SCDLG_DPNUMGROUP:ED_START"; Pos = MAP_APPFONT ( 94 , 26 ) ; Size = MAP_APPFONT ( 58 , 12 ) ; TabStop = TRUE ; @@ -73,6 +76,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP }; RadioButton RB_AUTOEND { + HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_AUTOEND"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -80,6 +84,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP }; RadioButton RB_MANEND { + HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_MANEND"; Pos = MAP_APPFONT ( 12 , 67 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -87,6 +92,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP }; Edit ED_END { + HelpID = "sc:Edit:RID_SCDLG_DPNUMGROUP:ED_END"; Pos = MAP_APPFONT ( 94 , 65 ) ; Size = MAP_APPFONT ( 58 , 12 ) ; TabStop = TRUE ; @@ -100,6 +106,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP }; Edit ED_BY { + HelpID = "sc:Edit:RID_SCDLG_DPNUMGROUP:ED_BY"; Pos = MAP_APPFONT ( 94 , 92 ) ; Size = MAP_APPFONT ( 58 , 12 ) ; TabStop = TRUE ; @@ -146,6 +153,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP }; RadioButton RB_AUTOSTART { + HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_AUTOSTART"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -153,6 +161,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP }; RadioButton RB_MANSTART { + HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_MANSTART"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -160,6 +169,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP }; DateField ED_START { + HelpID = "sc:DateField:RID_SCDLG_DPDATEGROUP:ED_START"; Pos = MAP_APPFONT ( 94 , 26 ) ; Size = MAP_APPFONT ( 58 , 12 ) ; TabStop = TRUE ; @@ -173,6 +183,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP }; RadioButton RB_AUTOEND { + HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_AUTOEND"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -180,6 +191,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP }; RadioButton RB_MANEND { + HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_MANEND"; Pos = MAP_APPFONT ( 12 , 67 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -187,6 +199,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP }; DateField ED_END { + HelpID = "sc:DateField:RID_SCDLG_DPDATEGROUP:ED_END"; Pos = MAP_APPFONT ( 94 , 65 ) ; Size = MAP_APPFONT ( 58 , 12 ) ; TabStop = TRUE ; @@ -200,6 +213,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP }; RadioButton RB_NUMDAYS { + HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_NUMDAYS"; Pos = MAP_APPFONT ( 12 , 94 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -207,6 +221,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP }; RadioButton RB_UNITS { + HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_UNITS"; Pos = MAP_APPFONT ( 12 , 110 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -214,6 +229,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP }; NumericField ED_NUMDAYS { + HelpID = "sc:NumericField:RID_SCDLG_DPDATEGROUP:ED_NUMDAYS"; Pos = MAP_APPFONT ( 94, 92 ) ; Size = MAP_APPFONT ( 35, 12 ) ; TabStop = TRUE ; diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx index 2a486f03f..474c487a8 100644 --- a/sc/source/ui/dbgui/fieldwnd.cxx +++ b/sc/source/ui/dbgui/fieldwnd.cxx @@ -356,7 +356,7 @@ void ScDPFieldControlBase::MouseMove( const MouseEvent& rMEvt ) void ScDPFieldControlBase::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rKeyCode = rKEvt.GetKeyCode(); - USHORT nCode = rKeyCode.GetCode(); + sal_uInt16 nCode = rKeyCode.GetCode(); bool bKeyEvaluated = false; const FieldNames& rFields = GetFieldNames(); @@ -415,7 +415,7 @@ void ScDPFieldControlBase::GetFocus() ScrollToEnd(); } else // else change focus - mpDlg->NotifyFieldFocus( GetFieldType(), TRUE ); + mpDlg->NotifyFieldFocus( GetFieldType(), true ); AccessibleSetFocus(true); } @@ -424,7 +424,7 @@ void ScDPFieldControlBase::LoseFocus() { Control::LoseFocus(); Redraw(); - mpDlg->NotifyFieldFocus( GetFieldType(), FALSE ); + mpDlg->NotifyFieldFocus( GetFieldType(), false ); AccessibleSetFocus(false); } @@ -779,7 +779,7 @@ void ScDPHorFieldControl::Redraw() Point aPos0; Size aSize( GetSizePixel() ); Font aFont( GetFont() ); // Font vom Window - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( true ); aVirDev.SetFont( aFont ); aVirDev.SetOutputSizePixel( aSize ); diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 56c11b55c..d48758508 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -56,6 +56,9 @@ #undef _FILTDLG_CXX #include <vcl/msgbox.hxx> +using ::rtl::OUString; +using ::rtl::OUStringBuffer; + // DEFINE -------------------------------------------------------------------- #define ERRORBOX(rid) ErrorBox( this, WinBits( WB_OK|WB_DEF_OK), \ @@ -115,14 +118,14 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, pDoc ( NULL ), nSrcTab ( 0 ), nFieldCount ( 0 ), - bRefInputMode ( FALSE ), + bRefInputMode ( false ), pTimer ( NULL ) { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) pEntryLists[i] = NULL; for (SCSIZE i=0;i<MAXQUERY;i++) { - bRefreshExceptQuery[i]=FALSE; + bRefreshExceptQuery[i]=false; } aBtnMore.SetMoreText( String(ScResId( SCSTR_MOREBTN_MOREOPTIONS )) ); aBtnMore.SetLessText( String(ScResId( SCSTR_MOREBTN_FEWEROPTIONS )) ); @@ -133,6 +136,66 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, pTimer = new Timer; pTimer->SetTimeout( 50 ); // Wait 50ms pTimer->SetTimeoutHdl( LINK( this, ScFilterDlg, TimeOutHdl ) ); + + OUStringBuffer aBuf; + + OUString sAccName = ResId::toString(ScResId(RID_FILTER_OPERATOR)); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 1")); + aLbConnect1.SetAccessibleName(aBuf.makeStringAndClear()); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 2")); + aLbConnect2.SetAccessibleName(aBuf.makeStringAndClear()); + + sAccName = ResId::toString(ScResId(RID_FILTER_FIELDNAME)); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 1")); + aLbField1.SetAccessibleName(aBuf.makeStringAndClear()); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 2")); + aLbField2.SetAccessibleName(aBuf.makeStringAndClear()); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 3")); + aLbField3.SetAccessibleName(aBuf.makeStringAndClear()); + + sAccName = ResId::toString(ScResId(RID_FILTER_CONDITION)); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 1")); + aLbCond1.SetAccessibleName(aBuf.makeStringAndClear()); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 2")); + aLbCond2.SetAccessibleName(aBuf.makeStringAndClear()); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 3")); + aLbCond3.SetAccessibleName(aBuf.makeStringAndClear()); + + sAccName = ResId::toString(ScResId(RID_FILTER_VALUE)); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 1")); + aEdVal1.SetAccessibleName(aBuf.makeStringAndClear()); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 2")); + aEdVal2.SetAccessibleName(aBuf.makeStringAndClear()); + aBuf.append(sAccName); + aBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM (" 3")); + aEdVal3.SetAccessibleName(aBuf.makeStringAndClear()); + + aLbCopyArea.SetAccessibleName(ScResId(STR_COPY_AREA_TO)); + aEdCopyArea.SetAccessibleName(ScResId(STR_COPY_AREA_TO)); + aLbCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + aEdCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + + aLbConnect1.SetAccessibleRelationLabeledBy(&aFtConnect); + aLbConnect2.SetAccessibleRelationLabeledBy(&aFtConnect); + aLbField1.SetAccessibleRelationLabeledBy(&aFtField); + aLbField2.SetAccessibleRelationLabeledBy(&aFtField); + aLbField3.SetAccessibleRelationLabeledBy(&aFtField); + aLbCond1.SetAccessibleRelationLabeledBy(&aFtCond); + aLbCond2.SetAccessibleRelationLabeledBy(&aFtCond); + aLbCond3.SetAccessibleRelationLabeledBy(&aFtCond); + aEdVal1.SetAccessibleRelationLabeledBy(&aFtVal); + aEdVal2.SetAccessibleRelationLabeledBy(&aFtVal); + aEdVal3.SetAccessibleRelationLabeledBy(&aFtVal); } @@ -140,7 +203,7 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScFilterDlg::~ScFilterDlg() { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) delete pEntryLists[i]; delete pOptionsMgr; @@ -230,13 +293,13 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) for ( SCSIZE i=0; i<4; i++ ) { String aValStr; - USHORT nCondPos = 0; - USHORT nFieldSelPos = 0; + sal_uInt16 nCondPos = 0; + sal_uInt16 nFieldSelPos = 0; ScQueryEntry& rEntry = theQueryData.GetEntry(i); if ( rEntry.bDoQuery ) { - nCondPos = (USHORT)rEntry.eOp; + nCondPos = (sal_uInt16)rEntry.eOp; nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) ); if ( rEntry.nVal == SC_EMPTYFIELDS && !rEntry.bQueryByString && *rEntry.pStr == EMPTY_STRING ) { @@ -256,16 +319,16 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) nFieldSelPos = GetFieldSelPos( pViewData->GetCurX() ); rEntry.nField = nFieldSelPos ? (theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1) : static_cast<SCCOL>(0); - rEntry.bDoQuery=TRUE; - bRefreshExceptQuery[i]=TRUE; + rEntry.bDoQuery=sal_True; + bRefreshExceptQuery[i]=sal_True; } aFieldLbArr[i]->SelectEntryPos( nFieldSelPos ); aCondLbArr [i]->SelectEntryPos( nCondPos ); aValueEdArr[i]->SetText( aValStr ); - aValueEdArr[i]->EnableAutocomplete( FALSE ); + aValueEdArr[i]->EnableAutocomplete( sal_False ); aValueEdArr[i]->SetModifyHdl( LINK( this, ScFilterDlg, ValModifyHdl ) ); - UpdateValueList( static_cast<USHORT>(i+1) ); + UpdateValueList( static_cast<sal_uInt16>(i+1) ); } aScrollBar.SetEndScrollHdl( LINK( this, ScFilterDlg, ScrollHdl ) ); @@ -278,17 +341,17 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) (aLbField1.GetSelectEntryPos() != 0) && (aLbField2.GetSelectEntryPos() != 0) - ? aLbConnect2.SelectEntryPos( (USHORT)theQueryData.GetEntry(1).eConnect ) + ? aLbConnect2.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(1).eConnect ) : aLbConnect2.SetNoSelection(); (aLbField2.GetSelectEntryPos() != 0) && (aLbField3.GetSelectEntryPos() != 0) - ? aLbConnect3.SelectEntryPos( (USHORT)theQueryData.GetEntry(2).eConnect ) + ? aLbConnect3.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(2).eConnect ) : aLbConnect3.SetNoSelection(); (aLbField3.GetSelectEntryPos() != 0) && (aLbField4.GetSelectEntryPos() != 0) - ? aLbConnect4.SelectEntryPos( (USHORT)theQueryData.GetEntry(3).eConnect ) + ? aLbConnect4.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(3).eConnect ) : aLbConnect4.SetNoSelection(); if ( aLbField1.GetSelectEntryPos() == 0 ) { @@ -334,15 +397,15 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) if(pDoc!=NULL && pDoc->GetChangeTrack()!=NULL) aBtnCopyResult.Disable(); // Switch on modal mode -// SetDispatcherLock( TRUE ); +// SetDispatcherLock( sal_True ); //@BugID 54702 Enable/disable only in Basic class -// SFX_APPWINDOW->Disable(FALSE); //! general method in ScAnyRefDlg +// SFX_APPWINDOW->Disable(sal_False); //! general method in ScAnyRefDlg } //---------------------------------------------------------------------------- -BOOL ScFilterDlg::Close() +sal_Bool ScFilterDlg::Close() { if (pViewData) pViewData->GetDocShell()->CancelAutoDBRange(); @@ -405,7 +468,7 @@ void ScFilterDlg::FillFieldLists() SCROW nFirstRow = theQueryData.nRow1; SCCOL nMaxCol = theQueryData.nCol2; SCCOL col = 0; - USHORT i=1; + sal_uInt16 i=1; for ( col=nFirstCol; col<=nMaxCol; col++ ) { @@ -429,13 +492,13 @@ void ScFilterDlg::FillFieldLists() //---------------------------------------------------------------------------- -void ScFilterDlg::UpdateValueList( USHORT nList ) +void ScFilterDlg::UpdateValueList( sal_uInt16 nList ) { if ( pDoc && nList>0 && nList<=4 ) { ComboBox* pValList = aValueEdArr[nList-1]; - USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); - USHORT nListPos = 0; + sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); + sal_uInt16 nListPos = 0; String aCurValue = pValList->GetText(); pValList->Clear(); @@ -450,7 +513,7 @@ void ScFilterDlg::UpdateValueList( USHORT nList ) SCCOL nColumn = theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1; if (!pEntryLists[nColumn]) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); SCTAB nTab = nSrcTab; SCROW nFirstRow = theQueryData.nRow1; SCROW nLastRow = theQueryData.bUseDynamicRange ? theQueryData.nDynamicEndRow : theQueryData.nRow2; @@ -487,10 +550,10 @@ void ScFilterDlg::UpdateValueList( USHORT nList ) } TypedScStrCollection* pColl = pEntryLists[nColumn]; - USHORT nValueCount = pColl->GetCount(); + sal_uInt16 nValueCount = pColl->GetCount(); if ( nValueCount > 0 ) { - for ( USHORT i=0; i<nValueCount; i++ ) + for ( sal_uInt16 i=0; i<nValueCount; i++ ) { pValList->InsertEntry( (*pColl)[i]->GetString(), nListPos ); nListPos++; @@ -504,30 +567,30 @@ void ScFilterDlg::UpdateValueList( USHORT nList ) UpdateHdrInValueList( nList ); } -void ScFilterDlg::UpdateHdrInValueList( USHORT nList ) +void ScFilterDlg::UpdateHdrInValueList( sal_uInt16 nList ) { //! GetText / SetText ?? if ( pDoc && nList>0 && nList<=4 ) { - USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); + sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); if ( nFieldSelPos ) { SCCOL nColumn = theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1; if ( pEntryLists[nColumn] ) { - USHORT nPos = nHeaderPos[nColumn]; + sal_uInt16 nPos = nHeaderPos[nColumn]; if ( nPos != USHRT_MAX ) { ComboBox* pValList = aValueEdArr[nList-1]; - USHORT nListPos = nPos + 2; // for "empty" and "non-empty" + sal_uInt16 nListPos = nPos + 2; // for "empty" and "non-empty" TypedStrData* pHdrEntry = (*pEntryLists[nColumn])[nPos]; if ( pHdrEntry ) { String aHdrStr = pHdrEntry->GetString(); - BOOL bWasThere = ( pValList->GetEntry(nListPos) == aHdrStr ); - BOOL bInclude = !aBtnHeader.IsChecked(); + sal_Bool bWasThere = ( pValList->GetEntry(nListPos) == aHdrStr ); + sal_Bool bInclude = !aBtnHeader.IsChecked(); if (bInclude) // Include entry { @@ -556,7 +619,7 @@ void ScFilterDlg::UpdateHdrInValueList( USHORT nList ) //---------------------------------------------------------------------------- -void ScFilterDlg::ClearValueList( USHORT nList ) +void ScFilterDlg::ClearValueList( sal_uInt16 nList ) { if ( nList>0 && nList<=4 ) { @@ -571,10 +634,10 @@ void ScFilterDlg::ClearValueList( USHORT nList ) //---------------------------------------------------------------------------- -USHORT ScFilterDlg::GetFieldSelPos( SCCOL nField ) +sal_uInt16 ScFilterDlg::GetFieldSelPos( SCCOL nField ) { if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 ) - return static_cast<USHORT>(nField - theQueryData.nCol1 + 1); + return static_cast<sal_uInt16>(nField - theQueryData.nCol1 + 1); else return 0; } @@ -585,7 +648,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem() { ScAddress theCopyPos; ScQueryParam theParam( theQueryData ); - BOOL bCopyPosOk = FALSE; + sal_Bool bCopyPosOk = false; if ( aBtnCopyResult.IsChecked() ) { @@ -595,27 +658,27 @@ ScQueryItem* ScFilterDlg::GetOutputItem() if ( STRING_NOTFOUND != nColonPos ) theCopyStr.Erase( nColonPos ); - USHORT nResult = theCopyPos.Parse( theCopyStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = theCopyPos.Parse( theCopyStr, pDoc, pDoc->GetAddressConvention() ); bCopyPosOk = ( SCA_VALID == (nResult & SCA_VALID) ); } if ( aBtnCopyResult.IsChecked() && bCopyPosOk ) { - theParam.bInplace = FALSE; + theParam.bInplace = false; theParam.nDestTab = theCopyPos.Tab(); theParam.nDestCol = theCopyPos.Col(); theParam.nDestRow = theCopyPos.Row(); } else { - theParam.bInplace = TRUE; + theParam.bInplace = sal_True; theParam.nDestTab = 0; theParam.nDestCol = 0; theParam.nDestRow = 0; } theParam.bHasHeader = aBtnHeader.IsChecked(); - theParam.bByRow = TRUE; + theParam.bByRow = sal_True; theParam.bDuplicate = !aBtnUnique.IsChecked(); theParam.bCaseSens = aBtnCase.IsChecked(); theParam.bRegExp = aBtnRegExp.IsChecked(); @@ -632,7 +695,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem() //---------------------------------------------------------------------------- -BOOL ScFilterDlg::IsRefInputMode() const +sal_Bool ScFilterDlg::IsRefInputMode() const { return bRefInputMode; } @@ -646,24 +709,24 @@ IMPL_LINK( ScFilterDlg, EndDlgHdl, Button*, pBtn ) { if ( pBtn == &aBtnOk ) { - BOOL bAreaInputOk = TRUE; + sal_Bool bAreaInputOk = sal_True; if ( aBtnCopyResult.IsChecked() ) { if ( !pOptionsMgr->VerifyPosStr( aEdCopyArea.GetText() ) ) { if ( !aBtnMore.GetState() ) - aBtnMore.SetState( TRUE ); + aBtnMore.SetState( sal_True ); ERRORBOX( STR_INVALID_TABREF ); aEdCopyArea.GrabFocus(); - bAreaInputOk = FALSE; + bAreaInputOk = false; } } if ( bAreaInputOk ) { - SetDispatcherLock( FALSE ); + SetDispatcherLock( false ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( FID_FILTER_OK, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -689,7 +752,7 @@ IMPL_LINK( ScFilterDlg, MoreClickHdl, MoreButton*, EMPTYARG ) else { pTimer->Stop(); - bRefInputMode = FALSE; + bRefInputMode = false; //@BugID 54702 Enable/disable only in Basic class //SFX_APPWINDOW->Disable(FALSE); //! general method in ScAnyRefDlg } @@ -720,7 +783,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) /* * Handle enable/disable logic depending on which ListBox was selected */ - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); if ( pLb == &aLbConnect1 ) { @@ -728,10 +791,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond1.Enable(); aEdVal1.Enable(); - USHORT nConnect1 = aLbConnect1.GetSelectEntryPos(); - USHORT nQE = nOffset; + sal_uInt16 nConnect1 = aLbConnect1.GetSelectEntryPos(); + sal_uInt16 nQE = nOffset; theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect1; - bRefreshExceptQuery[nQE]=TRUE; + bRefreshExceptQuery[nQE]=sal_True; } else if ( pLb == &aLbConnect2 ) @@ -740,10 +803,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond2.Enable(); aEdVal2.Enable(); - USHORT nConnect2 = aLbConnect2.GetSelectEntryPos(); - USHORT nQE = 1+nOffset; + sal_uInt16 nConnect2 = aLbConnect2.GetSelectEntryPos(); + sal_uInt16 nQE = 1+nOffset; theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect2; - bRefreshExceptQuery[nQE]=TRUE; + bRefreshExceptQuery[nQE]=sal_True; } else if ( pLb == &aLbConnect3 ) { @@ -751,10 +814,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond3.Enable(); aEdVal3.Enable(); - USHORT nConnect3 = aLbConnect3.GetSelectEntryPos(); - USHORT nQE = 2+nOffset; + sal_uInt16 nConnect3 = aLbConnect3.GetSelectEntryPos(); + sal_uInt16 nQE = 2+nOffset; theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect3; - bRefreshExceptQuery[nQE]=TRUE; + bRefreshExceptQuery[nQE]=sal_True; } else if ( pLb == &aLbConnect4 ) @@ -763,10 +826,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond4.Enable(); aEdVal4.Enable(); - USHORT nConnect4 = aLbConnect4.GetSelectEntryPos(); - USHORT nQE = 3+nOffset; + sal_uInt16 nConnect4 = aLbConnect4.GetSelectEntryPos(); + sal_uInt16 nQE = 3+nOffset; theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect4; - bRefreshExceptQuery[nQE]=TRUE; + bRefreshExceptQuery[nQE]=sal_True; } else if ( pLb == &aLbField1 ) @@ -799,13 +862,13 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aEdVal2.Disable(); aEdVal3.Disable(); aEdVal4.Disable(); - for (USHORT i= nOffset; i< MAXQUERY; i++) + for (sal_uInt16 i= nOffset; i< MAXQUERY; i++) { - theQueryData.GetEntry(i).bDoQuery = FALSE; - bRefreshExceptQuery[i]=FALSE; + theQueryData.GetEntry(i).bDoQuery = false; + bRefreshExceptQuery[i]=false; theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0); } - bRefreshExceptQuery[nOffset] =TRUE; + bRefreshExceptQuery[nOffset] =sal_True; } else { @@ -814,8 +877,8 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) { aLbConnect2.Enable(); } - theQueryData.GetEntry(nOffset).bDoQuery = TRUE; - USHORT nField = pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nOffset).bDoQuery = sal_True; + sal_uInt16 nField = pLb->GetSelectEntryPos(); theQueryData.GetEntry(nOffset).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ; } } @@ -842,14 +905,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aEdVal3.Disable(); aEdVal4.Disable(); - USHORT nTemp=nOffset+1; - for (USHORT i= nTemp; i< MAXQUERY; i++) + sal_uInt16 nTemp=nOffset+1; + for (sal_uInt16 i= nTemp; i< MAXQUERY; i++) { - theQueryData.GetEntry(i).bDoQuery = FALSE; - bRefreshExceptQuery[i]=FALSE; + theQueryData.GetEntry(i).bDoQuery = false; + bRefreshExceptQuery[i]=false; theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0); } - bRefreshExceptQuery[nTemp]=TRUE; + bRefreshExceptQuery[nTemp]=sal_True; } else { @@ -858,9 +921,9 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) { aLbConnect3.Enable(); } - USHORT nField = pLb->GetSelectEntryPos(); - USHORT nQ=1+nOffset; - theQueryData.GetEntry(nQ).bDoQuery = TRUE; + sal_uInt16 nField = pLb->GetSelectEntryPos(); + sal_uInt16 nQ=1+nOffset; + theQueryData.GetEntry(nQ).bDoQuery = sal_True; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ; } } @@ -879,14 +942,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond4.Disable(); aEdVal4.Disable(); - USHORT nTemp=nOffset+2; - for (USHORT i= nTemp; i< MAXQUERY; i++) + sal_uInt16 nTemp=nOffset+2; + for (sal_uInt16 i= nTemp; i< MAXQUERY; i++) { - theQueryData.GetEntry(i).bDoQuery = FALSE; - bRefreshExceptQuery[i]=FALSE; + theQueryData.GetEntry(i).bDoQuery = false; + bRefreshExceptQuery[i]=false; theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0); } - bRefreshExceptQuery[nTemp]=TRUE; + bRefreshExceptQuery[nTemp]=sal_True; } else { @@ -896,9 +959,9 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbConnect4.Enable(); } - USHORT nField = pLb->GetSelectEntryPos(); - USHORT nQ=2+nOffset; - theQueryData.GetEntry(nQ).bDoQuery = TRUE; + sal_uInt16 nField = pLb->GetSelectEntryPos(); + sal_uInt16 nQ=2+nOffset; + theQueryData.GetEntry(nQ).bDoQuery = sal_True; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ; } @@ -908,21 +971,21 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) if ( aLbField4.GetSelectEntryPos() == 0 ) { ClearValueList( 4 ); - USHORT nTemp=nOffset+3; - for (USHORT i= nTemp; i< MAXQUERY; i++) + sal_uInt16 nTemp=nOffset+3; + for (sal_uInt16 i= nTemp; i< MAXQUERY; i++) { - theQueryData.GetEntry(i).bDoQuery = FALSE; - bRefreshExceptQuery[i]=FALSE; + theQueryData.GetEntry(i).bDoQuery = false; + bRefreshExceptQuery[i]=false; theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0); } - bRefreshExceptQuery[nTemp]=TRUE; + bRefreshExceptQuery[nTemp]=sal_True; } else { UpdateValueList( 4 ); - USHORT nField = pLb->GetSelectEntryPos(); - USHORT nQ=3+nOffset; - theQueryData.GetEntry(nQ).bDoQuery = TRUE; + sal_uInt16 nField = pLb->GetSelectEntryPos(); + sal_uInt16 nQ=3+nOffset; + theQueryData.GetEntry(nQ).bDoQuery = sal_True; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ; } @@ -933,17 +996,17 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) } else if ( pLb == &aLbCond2) { - USHORT nQ=1+nOffset; + sal_uInt16 nQ=1+nOffset; theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); } else if ( pLb == &aLbCond3) { - USHORT nQ=2+nOffset; + sal_uInt16 nQ=2+nOffset; theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); } else { - USHORT nQ=3+nOffset; + sal_uInt16 nQ=3+nOffset; theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); } @@ -963,10 +1026,10 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox ) if ( pBox == &aBtnHeader ) // Field list and value list { - USHORT nCurSel1 = aLbField1.GetSelectEntryPos(); - USHORT nCurSel2 = aLbField2.GetSelectEntryPos(); - USHORT nCurSel3 = aLbField3.GetSelectEntryPos(); - USHORT nCurSel4 = aLbField4.GetSelectEntryPos(); + sal_uInt16 nCurSel1 = aLbField1.GetSelectEntryPos(); + sal_uInt16 nCurSel2 = aLbField2.GetSelectEntryPos(); + sal_uInt16 nCurSel3 = aLbField3.GetSelectEntryPos(); + sal_uInt16 nCurSel4 = aLbField4.GetSelectEntryPos(); FillFieldLists(); aLbField1.SelectEntryPos( nCurSel1 ); aLbField2.SelectEntryPos( nCurSel2 ); @@ -981,7 +1044,7 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox ) if ( pBox == &aBtnCase ) // Complete value list { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) DELETEZ( pEntryLists[i] ); UpdateValueList( 1 ); // current text is recorded @@ -998,9 +1061,9 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox ) IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) { - USHORT nOffset = GetSliderPos(); - USHORT i=0; - USHORT nQE =i + nOffset; + sal_uInt16 nOffset = GetSliderPos(); + sal_uInt16 i=0; + sal_uInt16 nQE =i + nOffset; if ( pEd ) { String aStrVal = pEd->GetText(); @@ -1037,7 +1100,7 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) pLbCond->Enable(); ScQueryEntry& rEntry = theQueryData.GetEntry( nQE ); - BOOL bDoThis = (pLbField->GetSelectEntryPos() != 0); + sal_Bool bDoThis = (pLbField->GetSelectEntryPos() != 0); rEntry.bDoQuery = bDoThis; if ( rEntry.bDoQuery || bRefreshExceptQuery[nQE] ) @@ -1046,22 +1109,22 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) { rEntry.pStr->Erase(); rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = false; } else if ( aStrVal == aStrNotEmpty ) { rEntry.pStr->Erase(); rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = false; } else { *rEntry.pStr = aStrVal; rEntry.nVal = 0; - rEntry.bQueryByString = TRUE; + rEntry.bQueryByString = sal_True; } - USHORT nField = pLbField->GetSelectEntryPos(); + sal_uInt16 nField = pLbField->GetSelectEntryPos(); rEntry.nField = nField ? (theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1) : static_cast<SCCOL>(0); @@ -1083,31 +1146,31 @@ IMPL_LINK( ScFilterDlg, ScrollHdl, ScrollBar*, EMPTYARG ) void ScFilterDlg::SliderMoved() { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); RefreshEditRow( nOffset); } -USHORT ScFilterDlg::GetSliderPos() +sal_uInt16 ScFilterDlg::GetSliderPos() { - return (USHORT) aScrollBar.GetThumbPos(); + return (sal_uInt16) aScrollBar.GetThumbPos(); } -void ScFilterDlg::RefreshEditRow( USHORT nOffset ) +void ScFilterDlg::RefreshEditRow( sal_uInt16 nOffset ) { if (nOffset==0) aConnLbArr[0]->Hide(); else aConnLbArr[0]->Show(); - for ( USHORT i=0; i<4; i++ ) + for ( sal_uInt16 i=0; i<4; i++ ) { String aValStr; - USHORT nCondPos = 0; - USHORT nFieldSelPos = 0; - USHORT nQE = i+nOffset; + sal_uInt16 nCondPos = 0; + sal_uInt16 nFieldSelPos = 0; + sal_uInt16 nQE = i+nOffset; ScQueryEntry& rEntry = theQueryData.GetEntry( nQE); if ( rEntry.bDoQuery || bRefreshExceptQuery[nQE] ) { - nCondPos = (USHORT)rEntry.eOp; + nCondPos = (sal_uInt16)rEntry.eOp; if(rEntry.bDoQuery) nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) ); @@ -1137,9 +1200,9 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset ) aConnLbArr[i+1]->Enable(); else aConnLbArr[i+1]->Disable(); - USHORT nQENext = nQE+1; + sal_uInt16 nQENext = nQE+1; if(theQueryData.GetEntry(nQENext).bDoQuery || bRefreshExceptQuery[nQENext]) - aConnLbArr[i+1]->SelectEntryPos( (USHORT) theQueryData.GetEntry(nQENext).eConnect ); + aConnLbArr[i+1]->SelectEntryPos( (sal_uInt16) theQueryData.GetEntry(nQENext).eConnect ); else aConnLbArr[i+1]->SetNoSelection(); } @@ -1152,7 +1215,7 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset ) aConnLbArr[i]->Disable(); if(rEntry.bDoQuery || bRefreshExceptQuery[nQE]) - aConnLbArr[i]->SelectEntryPos( (USHORT) rEntry.eConnect ); + aConnLbArr[i]->SelectEntryPos( (sal_uInt16) rEntry.eConnect ); else aConnLbArr[i]->SetNoSelection(); } @@ -1183,7 +1246,7 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset ) aFieldLbArr[i]->SelectEntryPos( nFieldSelPos ); aCondLbArr [i]->SelectEntryPos( nCondPos ); aValueEdArr[i]->SetText( aValStr ); - UpdateValueList( static_cast<USHORT>(i+1) ); + UpdateValueList( static_cast<sal_uInt16>(i+1) ); } } diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index 894e1ae80..ba56e441d 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -99,8 +99,8 @@ ScFilterOptionsMgr::ScFilterOptionsMgr( ScFilterOptionsMgr::~ScFilterOptionsMgr() { - USHORT nEntries = rLbCopyPos.GetEntryCount(); - USHORT i; + sal_uInt16 nEntries = rLbCopyPos.GetEntryCount(); + sal_uInt16 i; for ( i=2; i<nEntries; i++ ) delete (String*)rLbCopyPos.GetEntryData( i ); @@ -162,13 +162,13 @@ void ScFilterOptionsMgr::Init() String aRefStr; while ( aIter.Next( aName, aRange ) ) { - USHORT nInsert = rLbCopyPos.InsertEntry( aName ); + sal_uInt16 nInsert = rLbCopyPos.InsertEntry( aName ); aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, eConv ); rLbCopyPos.SetEntryData( nInsert, new String( aRefStr ) ); } - rBtnDestPers.Check( TRUE ); // beim Aufruf immer an + rBtnDestPers.Check( sal_True ); // beim Aufruf immer an rLbCopyPos.SelectEntryPos( 0 ); rEdCopyPos.SetText( EMPTY_STRING ); @@ -215,7 +215,7 @@ void ScFilterOptionsMgr::Init() rQueryData.nDestTab ).Format( aString, SCA_ABS_3D, pDoc, eConv ); - rBtnCopyResult.Check( TRUE ); + rBtnCopyResult.Check( sal_True ); rEdCopyPos.SetText( aString ); EdPosModifyHdl( &rEdCopyPos ); rLbCopyPos.Enable(); @@ -225,7 +225,7 @@ void ScFilterOptionsMgr::Init() } else { - rBtnCopyResult.Check( FALSE ); + rBtnCopyResult.Check( false ); rEdCopyPos.SetText( EMPTY_STRING ); rLbCopyPos.Disable(); rEdCopyPos.Disable(); @@ -240,7 +240,7 @@ void ScFilterOptionsMgr::Init() //---------------------------------------------------------------------------- -BOOL ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const +sal_Bool ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const { String aPosStr( rPosStr ); xub_StrLen nColonPos = aPosStr.Search( ':' ); @@ -248,7 +248,7 @@ BOOL ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const if ( STRING_NOTFOUND != nColonPos ) aPosStr.Erase( nColonPos ); - USHORT nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() ); return ( SCA_VALID == (nResult & SCA_VALID) ); } @@ -264,7 +264,7 @@ IMPL_LINK( ScFilterOptionsMgr, LbPosSelHdl, ListBox*, pLb ) if ( pLb == &rLbCopyPos ) { String aString; - USHORT nSelPos = rLbCopyPos.GetSelectEntryPos(); + sal_uInt16 nSelPos = rLbCopyPos.GetSelectEntryPos(); if ( nSelPos > 0 ) aString = *(String*)rLbCopyPos.GetEntryData( nSelPos ); @@ -283,14 +283,14 @@ IMPL_LINK( ScFilterOptionsMgr, EdPosModifyHdl, Edit*, pEd ) if ( pEd == &rEdCopyPos ) { String theCurPosStr = pEd->GetText(); - USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); if ( SCA_VALID == (nResult & SCA_VALID) ) { String* pStr = NULL; - BOOL bFound = FALSE; - USHORT i = 0; - USHORT nCount = rLbCopyPos.GetEntryCount(); + sal_Bool bFound = false; + sal_uInt16 i = 0; + sal_uInt16 nCount = rLbCopyPos.GetEntryCount(); for ( i=2; i<nCount && !bFound; i++ ) { diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx index b7a614e92..7ae3ef004 100644 --- a/sc/source/ui/dbgui/imoptdlg.cxx +++ b/sc/source/ui/dbgui/imoptdlg.cxx @@ -45,19 +45,43 @@ static const sal_Char pStrFix[] = "FIX"; ScImportOptions::ScImportOptions( const String& rStr ) { - bFixedWidth = FALSE; + // Use the same string format as ScAsciiOptions, + // because the import options string is passed here when a CSV file is loaded and saved again. + // The old format is still supported because it might be used in macros. + + bFixedWidth = false; nFieldSepCode = 0; - if ( rStr.GetTokenCount(',') >= 3 ) + nTextSepCode = 0; + eCharSet = RTL_TEXTENCODING_DONTKNOW; + bSaveAsShown = sal_True; // "true" if not in string (after CSV import) + bQuoteAllText = false; + xub_StrLen nTokenCount = rStr.GetTokenCount(','); + if ( nTokenCount >= 3 ) { + // first 3 tokens: common String aToken( rStr.GetToken( 0, ',' ) ); if( aToken.EqualsIgnoreCaseAscii( pStrFix ) ) - bFixedWidth = TRUE; + bFixedWidth = sal_True; else nFieldSepCode = (sal_Unicode) aToken.ToInt32(); nTextSepCode = (sal_Unicode) rStr.GetToken(1,',').ToInt32(); aStrFont = rStr.GetToken(2,','); eCharSet = ScGlobal::GetCharsetValue(aStrFont); - bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? TRUE : FALSE); + + if ( nTokenCount == 4 ) + { + // compatibility with old options string: "Save as shown" as 4th token, numeric + bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? sal_True : false); + bQuoteAllText = sal_True; // use old default then + } + else + { + // look at the same positions as in ScAsciiOptions + if ( nTokenCount >= 7 ) + bQuoteAllText = rStr.GetToken(6, ',').EqualsAscii("true"); + if ( nTokenCount >= 9 ) + bSaveAsShown = rStr.GetToken(8, ',').EqualsAscii("true"); + } } } @@ -75,8 +99,11 @@ String ScImportOptions::BuildString() const aResult += String::CreateFromInt32(nTextSepCode); aResult += ','; aResult += aStrFont; - aResult += ','; - aResult += String::CreateFromInt32( bSaveAsShown ? 1 : 0 ); + // use the same string format as ScAsciiOptions: + aResult.AppendAscii( ",1,,0," ); // first row, no column info, default language + aResult.AppendAscii(bQuoteAllText ? "true" : "false"); // same as "quoted field as text" in ScAsciiOptions + aResult.AppendAscii( ",true," ); // "detect special numbers" + aResult.AppendAscii(bSaveAsShown ? "true" : "false"); // "save as shown": not in ScAsciiOptions return aResult; } diff --git a/sc/source/ui/dbgui/imoptdlg.hrc b/sc/source/ui/dbgui/imoptdlg.hrc index e49426923..54f7474fb 100644 --- a/sc/source/ui/dbgui/imoptdlg.hrc +++ b/sc/source/ui/dbgui/imoptdlg.hrc @@ -39,3 +39,5 @@ #define FL_FIELDOPT 11 #define CB_FIXEDWIDTH 12 #define CB_SAVESHOWN 13 +#define CB_QUOTEALL 14 + diff --git a/sc/source/ui/dbgui/imoptdlg.src b/sc/source/ui/dbgui/imoptdlg.src index b63d83210..8f6839533 100644 --- a/sc/source/ui/dbgui/imoptdlg.src +++ b/sc/source/ui/dbgui/imoptdlg.src @@ -44,6 +44,7 @@ ModalDialog RID_SCDLG_IMPORTOPT }; ComboBox ED_FIELDSEP { + HelpID = "sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_FIELDSEP"; Pos = MAP_APPFONT ( 70 , 30 ) ; Size = MAP_APPFONT ( 121 , 60 ) ; DropDown = TRUE ; @@ -56,6 +57,7 @@ ModalDialog RID_SCDLG_IMPORTOPT }; ComboBox ED_TEXTSEP { + HelpID = "sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_TEXTSEP"; Pos = MAP_APPFONT ( 70 , 46 ) ; Size = MAP_APPFONT ( 121 , 60 ) ; DropDown = TRUE ; @@ -68,6 +70,7 @@ ModalDialog RID_SCDLG_IMPORTOPT }; ListBox DDLB_FONT { + HelpID = "sc:ListBox:RID_SCDLG_IMPORTOPT:DDLB_FONT"; Border = TRUE; Sort = TRUE; DropDown = TRUE ; @@ -76,6 +79,7 @@ ModalDialog RID_SCDLG_IMPORTOPT }; ListBox LB_FONT { + HelpID = "sc:ListBox:RID_SCDLG_IMPORTOPT:LB_FONT"; Border = TRUE; Sort = TRUE; DropDown = FALSE ; @@ -90,7 +94,8 @@ ModalDialog RID_SCDLG_IMPORTOPT }; CheckBox CB_FIXEDWIDTH { - Pos = MAP_APPFONT( 12, 80 ); + HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FIXEDWIDTH"; + Pos = MAP_APPFONT( 12, 92 ); Size = MAP_APPFONT( 172, 10 ); Hide = TRUE; Text [ en-US ] = "Fixed column ~width"; @@ -103,6 +108,14 @@ ModalDialog RID_SCDLG_IMPORTOPT Hide = TRUE; Text [ en-US ] = "Save cell content as ~shown"; }; + CheckBox CB_QUOTEALL + { + HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_QUOTEALL"; + Pos = MAP_APPFONT( 20, 64 ); + Size = MAP_APPFONT( 164, 10 ); + Hide = TRUE; + Text [ en-US ] = "~Quote all text cells"; + }; OKButton BTN_OK { Pos = MAP_APPFONT ( 202 , 6 ) ; diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 6b4507baa..799fa0476 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -106,7 +106,7 @@ ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent, nSrcTab ( nSourceTab ), // ist nicht im QueryParam nFieldCount ( 0 ) { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) pEntryLists[i] = NULL; Init( rArgSet ); @@ -117,7 +117,7 @@ ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent, ScPivotFilterDlg::~ScPivotFilterDlg() { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) delete pEntryLists[i]; if ( pOutItem ) @@ -223,12 +223,12 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) else if (rEntry.nVal == SC_NONEMPTYFIELDS) aValStr = aStrNotEmpty; } - USHORT nCondPos = (USHORT)rEntry.eOp; - USHORT nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) ); + sal_uInt16 nCondPos = (sal_uInt16)rEntry.eOp; + sal_uInt16 nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) ); aFieldLbArr[i]->SelectEntryPos( nFieldSelPos ); aCondLbArr [i]->SelectEntryPos( nCondPos ); - UpdateValueList( static_cast<USHORT>(i+1) ); + UpdateValueList( static_cast<sal_uInt16>(i+1) ); aValueEdArr[i]->SetText( aValStr ); if (aValStr == aStrEmpty || aValStr == aStrNotEmpty) aCondLbArr[i]->Disable(); @@ -237,7 +237,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) { aFieldLbArr[i]->SelectEntryPos( 0 ); // "keiner" selektieren aCondLbArr [i]->SelectEntryPos( 0 ); // "=" selektieren - UpdateValueList( static_cast<USHORT>(i) ); + UpdateValueList( static_cast<sal_uInt16>(i) ); aValueEdArr[i]->SetText( EMPTY_STRING ); } aValueEdArr[i]->SetModifyHdl( LINK( this, ScPivotFilterDlg, ValModifyHdl ) ); @@ -247,12 +247,12 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) (aLbField1.GetSelectEntryPos() != 0) && (aLbField2.GetSelectEntryPos() != 0) - ? aLbConnect1.SelectEntryPos( (USHORT)theQueryData.GetEntry(1).eConnect ) + ? aLbConnect1.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(1).eConnect ) : aLbConnect1.SetNoSelection(); (aLbField2.GetSelectEntryPos() != 0) && (aLbField3.GetSelectEntryPos() != 0) - ? aLbConnect2.SelectEntryPos( (USHORT)theQueryData.GetEntry(2).eConnect ) + ? aLbConnect2.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(2).eConnect ) : aLbConnect2.SetNoSelection(); if ( aLbField1.GetSelectEntryPos() == 0 ) @@ -303,7 +303,7 @@ void ScPivotFilterDlg::FillFieldLists() SCROW nFirstRow = theQueryData.nRow1; SCCOL nMaxCol = theQueryData.nCol2; SCCOL col = 0; - USHORT i=1; + sal_uInt16 i=1; for ( col=nFirstCol; col<=nMaxCol; col++ ) { @@ -325,13 +325,13 @@ void ScPivotFilterDlg::FillFieldLists() //------------------------------------------------------------------------ -void ScPivotFilterDlg::UpdateValueList( USHORT nList ) +void ScPivotFilterDlg::UpdateValueList( sal_uInt16 nList ) { if ( pDoc && nList>0 && nList<=3 ) { ComboBox* pValList = aValueEdArr[nList-1]; - USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); - USHORT nListPos = 0; + sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); + sal_uInt16 nListPos = 0; String aCurValue = pValList->GetText(); pValList->Clear(); @@ -359,10 +359,10 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList ) } TypedScStrCollection* pColl = pEntryLists[nColumn]; - USHORT nValueCount = pColl->GetCount(); + sal_uInt16 nValueCount = pColl->GetCount(); if ( nValueCount > 0 ) { - for ( USHORT i=0; i<nValueCount; i++ ) + for ( sal_uInt16 i=0; i<nValueCount; i++ ) { pValList->InsertEntry( (*pColl)[i]->GetString(), nListPos ); nListPos++; @@ -375,7 +375,7 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList ) //------------------------------------------------------------------------ -void ScPivotFilterDlg::ClearValueList( USHORT nList ) +void ScPivotFilterDlg::ClearValueList( sal_uInt16 nList ) { if ( nList>0 && nList<=3 ) { @@ -389,10 +389,10 @@ void ScPivotFilterDlg::ClearValueList( USHORT nList ) //------------------------------------------------------------------------ -USHORT ScPivotFilterDlg::GetFieldSelPos( SCCOL nField ) +sal_uInt16 ScPivotFilterDlg::GetFieldSelPos( SCCOL nField ) { if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 ) - return static_cast<USHORT>(nField - theQueryData.nCol1 + 1); + return static_cast<sal_uInt16>(nField - theQueryData.nCol1 + 1); else return 0; } @@ -402,15 +402,15 @@ USHORT ScPivotFilterDlg::GetFieldSelPos( SCCOL nField ) const ScQueryItem& ScPivotFilterDlg::GetOutputItem() { ScQueryParam theParam( theQueryData ); - USHORT nConnect1 = aLbConnect1.GetSelectEntryPos(); - USHORT nConnect2 = aLbConnect2.GetSelectEntryPos(); + sal_uInt16 nConnect1 = aLbConnect1.GetSelectEntryPos(); + sal_uInt16 nConnect2 = aLbConnect2.GetSelectEntryPos(); for ( SCSIZE i=0; i<3; i++ ) { - USHORT nField = aFieldLbArr[i]->GetSelectEntryPos(); + sal_uInt16 nField = aFieldLbArr[i]->GetSelectEntryPos(); ScQueryOp eOp = (ScQueryOp)aCondLbArr[i]->GetSelectEntryPos(); - BOOL bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0); + sal_Bool bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0); theParam.GetEntry(i).bDoQuery = bDoThis; if ( bDoThis ) @@ -428,19 +428,19 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() { *rEntry.pStr = EMPTY_STRING; rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = false; } else if ( aStrVal == aStrNotEmpty ) { *rEntry.pStr = EMPTY_STRING; rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = false; } else { *rEntry.pStr = aStrVal; rEntry.nVal = 0; - rEntry.bQueryByString = TRUE; + rEntry.bQueryByString = sal_True; } rEntry.nField = nField ? (theQueryData.nCol1 + @@ -456,7 +456,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() ? (ScQueryConnect)nConnect2 : SC_AND; - theParam.bInplace = FALSE; + theParam.bInplace = false; theParam.nDestTab = 0; // Woher kommen diese Werte? theParam.nDestCol = 0; theParam.nDestRow = 0; @@ -574,7 +574,7 @@ IMPL_LINK( ScPivotFilterDlg, CheckBoxHdl, CheckBox*, pBox ) if ( pBox == &aBtnCase ) // Wertlisten { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) DELETEZ( pEntryLists[i] ); String aCurVal1 = aEdVal1.GetText(); diff --git a/sc/source/ui/dbgui/pivot.hrc b/sc/source/ui/dbgui/pivot.hrc index e4207e886..acc8c1185 100644 --- a/sc/source/ui/dbgui/pivot.hrc +++ b/sc/source/ui/dbgui/pivot.hrc @@ -34,8 +34,12 @@ #define BTN_OPTIONS 6 #define FL_LAYOUT 10 +#define FL_SELECT 90 +#define SCROLL_COL 91 #define WND_COL 11 +#define SCROLL_ROW 92 #define WND_ROW 12 +#define SCROLL_DATA 93 #define WND_DATA 13 #define WND_SELECT 14 #define WND_PAGE 18 diff --git a/sc/source/ui/dbgui/pivot.src b/sc/source/ui/dbgui/pivot.src index 514a37153..b3406b843 100644 --- a/sc/source/ui/dbgui/pivot.src +++ b/sc/source/ui/dbgui/pivot.src @@ -30,7 +30,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT { OutputSize = TRUE ; - HelpId = SID_OPENDLG_PIVOTTABLE ; + HelpId = CMD_SID_OPENDLG_PIVOTTABLE ; Size = MAP_APPFONT ( 350 , 216 ) ; Hide = TRUE ; SVLook = TRUE ; @@ -135,6 +135,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; PushButton BTN_REMOVE { + HelpID = "sc:PushButton:RID_SCDLG_PIVOT_LAYOUT:BTN_REMOVE"; Pos = MAP_APPFONT ( 294 , 63 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -142,6 +143,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; PushButton BTN_OPTIONS { + HelpID = "sc:PushButton:RID_SCDLG_PIVOT_LAYOUT:BTN_OPTIONS"; Pos = MAP_APPFONT ( 294 , 80 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -149,6 +151,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; MoreButton BTN_MORE { + HelpID = "sc:MoreButton:RID_SCDLG_PIVOT_LAYOUT:BTN_MORE"; Pos = MAP_APPFONT ( 294 , 190 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -172,6 +175,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; Edit ED_INAREA { + HelpID = "sc:Edit:RID_SCDLG_PIVOT_LAYOUT:ED_INAREA"; Border = TRUE ; Pos = MAP_APPFONT ( 73 , 227 ) ; Size = MAP_APPFONT ( 100 , 12 ) ; @@ -180,6 +184,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; ImageButton RB_INAREA { + HelpID = "sc:ImageButton:RID_SCDLG_PIVOT_LAYOUT:RB_INAREA"; Pos = MAP_APPFONT ( 177 , 226 ) ; Size = MAP_APPFONT ( 13 , 15 ) ; TabStop = TRUE ; @@ -196,6 +201,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; ListBox LB_OUTAREA { + HelpID = "sc:ListBox:RID_SCDLG_PIVOT_LAYOUT:LB_OUTAREA"; Border = TRUE ; Pos = MAP_APPFONT ( 73 , 245 ) ; Size = MAP_APPFONT ( 75 , 90 ) ; @@ -205,6 +211,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; Edit ED_OUTAREA { + HelpID = "sc:Edit:RID_SCDLG_PIVOT_LAYOUT:ED_OUTAREA"; Border = TRUE ; Pos = MAP_APPFONT ( 152 , 245 ) ; Size = MAP_APPFONT ( 100 , 12 ) ; @@ -213,6 +220,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; ImageButton RB_OUTAREA { + HelpID = "sc:ImageButton:RID_SCDLG_PIVOT_LAYOUT:RB_OUTAREA"; Pos = MAP_APPFONT ( 256 , 244 ) ; Size = MAP_APPFONT ( 13 , 15 ) ; TabStop = TRUE ; @@ -221,6 +229,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; CheckBox BTN_IGNEMPTYROWS { + HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_IGNEMPTYROWS"; Pos = MAP_APPFONT ( 12 , 263 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; TabStop = TRUE ; @@ -229,6 +238,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; CheckBox BTN_DETECTCAT { + HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_DETECTCAT"; Pos = MAP_APPFONT ( 142 , 263 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; TabStop = TRUE ; @@ -237,6 +247,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; CheckBox BTN_TOTALCOL { + HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_TOTALCOL"; Pos = MAP_APPFONT ( 12 , 277 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; TabStop = TRUE ; @@ -245,6 +256,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; CheckBox BTN_TOTALROW { + HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_TOTALROW"; Pos = MAP_APPFONT ( 142 , 277 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; TabStop = TRUE ; @@ -253,6 +265,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; CheckBox BTN_FILTER { + HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_FILTER"; Pos = MAP_APPFONT ( 12 , 291 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; TabStop = TRUE ; @@ -261,6 +274,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT }; CheckBox BTN_DRILLDOWN { + HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_DRILLDOWN"; Pos = MAP_APPFONT ( 142 , 291 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; TabStop = TRUE ; diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index dc5811977..f1b0d86dc 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -70,7 +70,7 @@ namespace { @return true = The passed string list contains an empty string entry. */ template< typename ListBoxType > -bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, USHORT nEmptyPos = LISTBOX_APPEND ) +bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, sal_uInt16 nEmptyPos = LISTBOX_APPEND ) { bool bEmpty = false; const OUString* pStr = rStrings.getConstArray(); @@ -91,7 +91,7 @@ bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, U } template< typename ListBoxType > -bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, USHORT nEmptyPos = LISTBOX_APPEND ) +bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, sal_uInt16 nEmptyPos = LISTBOX_APPEND ) { bool bEmpty = false; vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end(); @@ -110,7 +110,7 @@ bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rM } /** This table represents the order of the strings in the resource string array. */ -static const USHORT spnFunctions[] = +static const sal_uInt16 spnFunctions[] = { PIVOT_FUNC_SUM, PIVOT_FUNC_COUNT, @@ -125,12 +125,12 @@ static const USHORT spnFunctions[] = PIVOT_FUNC_STD_VARP }; -const USHORT SC_BASEITEM_PREV_POS = 0; -const USHORT SC_BASEITEM_NEXT_POS = 1; -const USHORT SC_BASEITEM_USER_POS = 2; +const sal_uInt16 SC_BASEITEM_PREV_POS = 0; +const sal_uInt16 SC_BASEITEM_NEXT_POS = 1; +const sal_uInt16 SC_BASEITEM_USER_POS = 2; -const USHORT SC_SORTNAME_POS = 0; -const USHORT SC_SORTDATA_POS = 1; +const sal_uInt16 SC_SORTNAME_POS = 0; +const sal_uInt16 SC_SORTDATA_POS = 1; const long SC_SHOW_DEFAULT = 10; @@ -173,19 +173,19 @@ ScDPFunctionListBox::ScDPFunctionListBox( Window* pParent, const ResId& rResId ) FillFunctionNames(); } -void ScDPFunctionListBox::SetSelection( USHORT nFuncMask ) +void ScDPFunctionListBox::SetSelection( sal_uInt16 nFuncMask ) { if( (nFuncMask == PIVOT_FUNC_NONE) || (nFuncMask == PIVOT_FUNC_AUTO) ) SetNoSelection(); else - for( USHORT nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry ) + for( sal_uInt16 nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry ) SelectEntryPos( nEntry, (nFuncMask & spnFunctions[ nEntry ]) != 0 ); } -USHORT ScDPFunctionListBox::GetSelection() const +sal_uInt16 ScDPFunctionListBox::GetSelection() const { - USHORT nFuncMask = PIVOT_FUNC_NONE; - for( USHORT nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel ) + sal_uInt16 nFuncMask = PIVOT_FUNC_NONE; + for( sal_uInt16 nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel ) nFuncMask |= spnFunctions[ GetSelectEntryPos( nSel ) ]; return nFuncMask; } @@ -195,14 +195,14 @@ void ScDPFunctionListBox::FillFunctionNames() DBG_ASSERT( !GetEntryCount(), "ScDPFunctionListBox::FillFunctionNames - do not add texts to resource" ); Clear(); ResStringArray aArr( ScResId( SCSTR_DPFUNCLISTBOX ) ); - for( USHORT nIndex = 0, nCount = sal::static_int_cast<USHORT>(aArr.Count()); nIndex < nCount; ++nIndex ) + for( sal_uInt16 nIndex = 0, nCount = sal::static_int_cast<sal_uInt16>(aArr.Count()); nIndex < nCount; ++nIndex ) InsertEntry( aArr.GetString( nIndex ) ); } // ============================================================================ ScDPFunctionDlg::ScDPFunctionDlg( - Window* pParent, const ScDPLabelDataVec& rLabelVec, + Window* pParent, const ScDPLabelDataVector& rLabelVec, const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DPDATAFIELD ) ), maFlFunc ( this, ScResId( FL_FUNC ) ), @@ -228,7 +228,7 @@ ScDPFunctionDlg::ScDPFunctionDlg( Init( rLabelData, rFuncData ); } -USHORT ScDPFunctionDlg::GetFuncMask() const +sal_uInt16 ScDPFunctionDlg::GetFuncMask() const { return maLbFunc.GetSelection(); } @@ -240,7 +240,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const aRef.ReferenceType = maLbTypeWrp.GetControlValue(); aRef.ReferenceField = GetBaseFieldName(maLbBaseField.GetSelectEntry()); - USHORT nBaseItemPos = maLbBaseItem.GetSelectEntryPos(); + sal_uInt16 nBaseItemPos = maLbBaseItem.GetSelectEntryPos(); switch( nBaseItemPos ) { case SC_BASEITEM_PREV_POS: @@ -263,7 +263,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ) { // list box - USHORT nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask; + sal_uInt16 nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask; maLbFunc.SetSelection( nFuncMask ); // field name @@ -325,8 +325,8 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& } else { - USHORT nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS; - USHORT nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos ); + sal_uInt16 nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS; + sal_uInt16 nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos ); if( nPos >= maLbBaseItem.GetEntryCount() ) nPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; maLbBaseItem.SelectEntryPos( nPos ); @@ -347,7 +347,7 @@ const OUString& ScDPFunctionDlg::GetBaseItemName(const OUString& rLayoutName) co return itr == maBaseItemNameMap.end() ? rLayoutName : itr->second; } -sal_uInt16 ScDPFunctionDlg::FindBaseItemPos( const String& rEntry, USHORT nStartPos ) const +sal_uInt16 ScDPFunctionDlg::FindBaseItemPos( const String& rEntry, sal_uInt16 nStartPos ) const { sal_uInt16 nPos = nStartPos; bool bFound = false; @@ -417,7 +417,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox ) } // select base item - USHORT nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; + sal_uInt16 nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; maLbBaseItem.SelectEntryPos( nItemPos ); } return 0; @@ -456,9 +456,9 @@ ScDPSubtotalDlg::ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj, Init( rLabelData, rFuncData ); } -USHORT ScDPSubtotalDlg::GetFuncMask() const +sal_uInt16 ScDPSubtotalDlg::GetFuncMask() const { - USHORT nFuncMask = PIVOT_FUNC_NONE; + sal_uInt16 nFuncMask = PIVOT_FUNC_NONE; if( maRbAuto.IsChecked() ) nFuncMask = PIVOT_FUNC_AUTO; @@ -604,8 +604,8 @@ void ScDPSubtotalOptDlg::FillLabelData( ScDPLabelData& rLabelData ) const // *** HIDDEN ITEMS *** rLabelData.maMembers = maLabelData.maMembers; - ULONG nVisCount = maLbHide.GetEntryCount(); - for( USHORT nPos = 0; nPos < nVisCount; ++nPos ) + sal_uLong nVisCount = maLbHide.GetEntryCount(); + for( sal_uInt16 nPos = 0; nPos < nVisCount; ++nPos ) rLabelData.maMembers[nPos].mbVisible = !maLbHide.IsChecked(nPos); // *** HIERARCHY *** @@ -634,7 +634,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou if( maLbSortBy.GetEntryCount() > SC_SORTDATA_POS ) maLbSortBy.SetSeparatorPos( SC_SORTDATA_POS - 1 ); - USHORT nSortPos = SC_SORTNAME_POS; + sal_uInt16 nSortPos = SC_SORTNAME_POS; if( nSortMode == DataPilotFieldSortMode::DATA ) { nSortPos = FindListBoxEntry( maLbSortBy, maLabelData.maSortInfo.Field, SC_SORTDATA_POS ); @@ -704,7 +704,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou lclFillListBox( maLbHierarchy, maLabelData.maHiers ); sal_Int32 nHier = maLabelData.mnUsedHier; if( (nHier < 0) || (nHier >= maLabelData.maHiers.getLength()) ) nHier = 0; - maLbHierarchy.SelectEntryPos( static_cast< USHORT >( nHier ) ); + maLbHierarchy.SelectEntryPos( static_cast< sal_uInt16 >( nHier ) ); maLbHierarchy.SetSelectHdl( LINK( this, ScDPSubtotalOptDlg, SelectHdl ) ); } else @@ -720,7 +720,7 @@ void ScDPSubtotalOptDlg::InitHideListBox() lclFillListBox( maLbHide, maLabelData.maMembers ); size_t n = maLabelData.maMembers.size(); for (size_t i = 0; i < n; ++i) - maLbHide.CheckEntryPos(static_cast<USHORT>(i), !maLabelData.maMembers[i].mbVisible); + maLbHide.CheckEntryPos(static_cast<sal_uInt16>(i), !maLabelData.maMembers[i].mbVisible); bool bEnable = maLbHide.GetEntryCount() > 0; maFlHide.Enable( bEnable ); maLbHide.Enable( bEnable ); @@ -733,7 +733,7 @@ const OUString& ScDPSubtotalOptDlg::GetFieldName(const OUString& rLayoutName) co } sal_uInt16 ScDPSubtotalOptDlg::FindListBoxEntry( - const ListBox& rLBox, const String& rEntry, USHORT nStartPos ) const + const ListBox& rLBox, const String& rEntry, sal_uInt16 nStartPos ) const { sal_uInt16 nPos = nStartPos; bool bFound = false; @@ -786,7 +786,7 @@ IMPL_LINK( ScDPSubtotalOptDlg, SelectHdl, ListBox*, pLBox ) // ============================================================================ -ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHORT nOrient ) : +ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DPSHOWDETAIL ) ), maFtDims ( this, ScResId( FT_DIMS ) ), maLbDims ( this, ScResId( LB_DIMS ) ), @@ -802,7 +802,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHOR long nDimCount = rDPObj.GetDimCount(); for (long nDim=0; nDim<nDimCount; nDim++) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; sal_Int32 nDimFlags = 0; String aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags ); if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) ) @@ -843,7 +843,7 @@ String ScDPShowDetailDlg::GetDimensionName() const return aSelectedName; long nDim = itr->second; - BOOL bIsDataLayout = false; + sal_Bool bIsDataLayout = false; return mrDPObj.GetDimName(nDim, bIsDataLayout); } diff --git a/sc/source/ui/dbgui/pvfundlg.src b/sc/source/ui/dbgui/pvfundlg.src index ed00f6a65..d5203f2a8 100644 --- a/sc/source/ui/dbgui/pvfundlg.src +++ b/sc/source/ui/dbgui/pvfundlg.src @@ -64,6 +64,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD }; MultiListBox LB_FUNC { + HelpID = "sc:MultiListBox:RID_SCDLG_DPDATAFIELD:LB_FUNC"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 140 , 65 ) ; @@ -96,6 +97,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD }; ListBox LB_TYPE { + HelpID = "sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_TYPE"; Pos = MAP_APPFONT( 75, 110 ); Size = MAP_APPFONT( 77, 120 ); TabStop = TRUE; @@ -122,6 +124,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD }; ListBox LB_BASEFIELD { + HelpID = "sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_BASEFIELD"; Pos = MAP_APPFONT( 75, 126 ); Size = MAP_APPFONT( 77, 120 ); TabStop = TRUE; @@ -136,6 +139,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD }; ListBox LB_BASEITEM { + HelpID = "sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_BASEITEM"; Pos = MAP_APPFONT( 75, 142 ); Size = MAP_APPFONT( 77, 120 ); TabStop = TRUE; @@ -168,6 +172,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD }; MoreButton BTN_MORE { + HelpID = "sc:MoreButton:RID_SCDLG_DPDATAFIELD:BTN_MORE"; Pos = MAP_APPFONT ( 164 , 79 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -191,6 +196,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT Hide = TRUE ; RadioButton RB_NONE { + HelpID = "sc:RadioButton:RID_SCDLG_PIVOTSUBT:RB_NONE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 140 , 10 ) ; Text [ en-US ] = "~None" ; @@ -198,6 +204,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT }; RadioButton RB_AUTO { + HelpID = "sc:RadioButton:RID_SCDLG_PIVOTSUBT:RB_AUTO"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 140 , 10 ) ; Text [ en-US ] = "~Automatic" ; @@ -205,6 +212,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT }; RadioButton RB_USER { + HelpID = "sc:RadioButton:RID_SCDLG_PIVOTSUBT:RB_USER"; Pos = MAP_APPFONT ( 12 , 42 ) ; Size = MAP_APPFONT ( 140 , 10 ) ; Text [ en-US ] = "~User-defined" ; @@ -212,6 +220,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT }; MultiListBox LB_FUNC { + HelpID = "sc:MultiListBox:RID_SCDLG_PIVOTSUBT:LB_FUNC"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 56 ) ; Size = MAP_APPFONT ( 140 , 65 ) ; @@ -227,6 +236,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT }; CheckBox CB_SHOWALL { + HelpID = "sc:CheckBox:RID_SCDLG_PIVOTSUBT:CB_SHOWALL"; Pos = MAP_APPFONT ( 6 , 127 ) ; Size = MAP_APPFONT ( 152 , 10 ) ; Text [ en-US ] = "Show it~ems without data"; @@ -264,6 +274,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT }; PushButton BTN_OPTIONS { + HelpID = "sc:PushButton:RID_SCDLG_PIVOTSUBT:BTN_OPTIONS"; Pos = MAP_APPFONT ( 164 , 135 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -290,6 +301,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; ListBox LB_SORT_BY { + HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_SORT_BY"; Pos = MAP_APPFONT( 12, 26 ); Size = MAP_APPFONT( 96, 120 ); TabStop = TRUE; @@ -298,6 +310,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; RadioButton RB_SORT_ASC { + HelpID = "sc:RadioButton:RID_SCDLG_DPSUBTOTAL_OPT:RB_SORT_ASC"; Pos = MAP_APPFONT( 114, 14 ); Size = MAP_APPFONT( 84, 10 ); TabStop = TRUE; @@ -305,6 +318,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; RadioButton RB_SORT_DESC { + HelpID = "sc:RadioButton:RID_SCDLG_DPSUBTOTAL_OPT:RB_SORT_DESC"; Pos = MAP_APPFONT( 114, 28 ); Size = MAP_APPFONT( 84, 10 ); TabStop = TRUE; @@ -312,6 +326,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; RadioButton RB_SORT_MAN { + HelpID = "sc:RadioButton:RID_SCDLG_DPSUBTOTAL_OPT:RB_SORT_MAN"; Pos = MAP_APPFONT( 114, 42 ); Size = MAP_APPFONT( 84, 10 ); TabStop = TRUE; @@ -331,6 +346,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; ListBox LB_LAYOUT { + HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_LAYOUT"; Pos = MAP_APPFONT( 84, 67 ); Size = MAP_APPFONT( 114, 120 ); TabStop = TRUE; @@ -345,6 +361,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; CheckBox CB_LAYOUT_EMPTY { + HelpID = "sc:CheckBox:RID_SCDLG_DPSUBTOTAL_OPT:CB_LAYOUT_EMPTY"; Pos = MAP_APPFONT( 12, 85 ); Size = MAP_APPFONT( 186, 10 ); TabStop = TRUE; @@ -358,6 +375,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; CheckBox CB_SHOW { + HelpID = "sc:CheckBox:RID_SCDLG_DPSUBTOTAL_OPT:CB_SHOW"; Pos = MAP_APPFONT( 12, 112 ); Size = MAP_APPFONT( 70, 10 ); TabStop = TRUE; @@ -365,6 +383,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; NumericField NF_SHOW { + HelpID = "sc:NumericField:RID_SCDLG_DPSUBTOTAL_OPT:NF_SHOW"; Pos = MAP_APPFONT( 84, 110 ); Size = MAP_APPFONT( 30, 12 ); TabStop = TRUE; @@ -390,6 +409,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; ListBox LB_SHOW_FROM { + HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_SHOW_FROM"; Pos = MAP_APPFONT( 84, 126 ); Size = MAP_APPFONT( 114, 50 ); TabStop = TRUE; @@ -409,6 +429,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; ListBox LB_SHOW_USING { + HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_SHOW_USING"; Pos = MAP_APPFONT( 84, 142 ); Size = MAP_APPFONT( 114, 120 ); TabStop = TRUE; @@ -436,6 +457,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT }; ListBox LB_HIERARCHY { + HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_HIERARCHY"; Pos = MAP_APPFONT( 84, 222 ); Size = MAP_APPFONT( 114, 120 ); TabStop = TRUE; @@ -483,6 +505,7 @@ ModalDialog RID_SCDLG_DPSHOWDETAIL }; ListBox LB_DIMS { + HelpID = "sc:ListBox:RID_SCDLG_DPSHOWDETAIL:LB_DIMS"; Pos = MAP_APPFONT( 6, 30 ); Size = MAP_APPFONT( 132, 80 ); TabStop = TRUE; diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 35d142aaf..a5fc7cda8 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -134,7 +134,7 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ), aStrNewTable ( ScResId( SCSTR_NEWTABLE ) ), - bIsDrag ( FALSE ), + bIsDrag ( false ), pEditActive ( NULL ), @@ -148,8 +148,8 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar GetViewData()->GetDocument() ), bRefInputMode (false) { - xDlgDPObject->SetAlive( TRUE ); // needed to get structure information - xDlgDPObject->FillOldParam( thePivotData, FALSE ); + xDlgDPObject->SetAlive( true ); // needed to get structure information + xDlgDPObject->FillOldParam( thePivotData ); xDlgDPObject->FillLabelData( thePivotData ); Init(bNewOutput); @@ -160,8 +160,8 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar ScDPLayoutDlg::~ScDPLayoutDlg() { - USHORT nEntries = aLbOutPos.GetEntryCount(); - USHORT i; + sal_uInt16 nEntries = aLbOutPos.GetEntryCount(); + sal_uInt16 i; for ( i=2; i<nEntries; i++ ) delete (String*)aLbOutPos.GetEntryData( i ); @@ -178,7 +178,7 @@ void ScDPLayoutDlg::Init(bool bNewOutput) aBtnOptions.SetClickHdl( LINK( this, ScDPLayoutDlg, ClickHdl ) ); aFuncNameArr.reserve( PIVOT_MAXFUNC ); - for ( USHORT i = 0; i < PIVOT_MAXFUNC; ++i ) + for ( sal_uInt16 i = 0; i < PIVOT_MAXFUNC; ++i ) aFuncNameArr.push_back( String( ScResId( i + 1 ) ) ); aBtnMore.AddWindow( &aFlAreas ); @@ -256,7 +256,7 @@ void ScDPLayoutDlg::Init(bool bNewOutput) { if ( !aIter.WasDBName() ) // hier keine DB-Bereiche ! { - USHORT nInsert = aLbOutPos.InsertEntry( aName ); + sal_uInt16 nInsert = aLbOutPos.InsertEntry( aName ); aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, pDoc->GetAddressConvention() ); aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) ); @@ -318,7 +318,7 @@ void ScDPLayoutDlg::Init(bool bNewOutput) //---------------------------------------------------------------------------- -BOOL ScDPLayoutDlg::Close() +sal_Bool ScDPLayoutDlg::Close() { return DoClose( ScPivotLayoutWrapper::GetChildWindowId() ); } @@ -379,7 +379,7 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel for (; itr != itrEnd; ++itr) { SCCOL nCol = itr->nCol; - USHORT nMask = itr->nFuncMask; + sal_uInt16 nMask = itr->nFuncMask; if (nCol == PIVOT_DATA_FIELD) continue; @@ -397,7 +397,7 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel OUString aStr = pData->maLayoutName; if (!aStr.getLength()) { - USHORT nInitMask = pInitArr->back()->mnFuncMask; + sal_uInt16 nInitMask = pInitArr->back()->mnFuncMask; aStr = GetFuncString(nInitMask, pData->mbIsValue); aStr += pData->maName; } @@ -419,7 +419,7 @@ void ScDPLayoutDlg::InitFocus() if( aWndSelect.IsEmpty() ) { aBtnOk.GrabFocus(); - NotifyFieldFocus( TYPE_SELECT, FALSE ); + NotifyFieldFocus( TYPE_SELECT, false ); } else aWndSelect.GrabFocus(); @@ -490,7 +490,7 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po { ScDPLabelData* p = GetLabelData(fData.mnCol); OUString aStr = p->maLayoutName; - USHORT nMask = fData.mnFuncMask; + sal_uInt16 nMask = fData.mnFuncMask; if (!aStr.getLength()) { aStr = GetFuncString(nMask); @@ -562,7 +562,7 @@ void ScDPLayoutDlg::AppendField(size_t nFromIndex, ScDPFieldType eToType) { ScDPLabelData* p = GetLabelData(aFuncData.mnCol); OUString aStr = p->maLayoutName; - USHORT nMask = aFuncData.mnFuncMask; + sal_uInt16 nMask = aFuncData.mnFuncMask; if (!aStr.getLength()) { aStr = GetFuncString(nMask); @@ -649,7 +649,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF { ScDPLabelData* p = GetLabelData(fData.mnCol); OUString aStr = p->maLayoutName; - USHORT nMask = fData.mnFuncMask; + sal_uInt16 nMask = fData.mnFuncMask; if (!aStr.getLength()) { aStr = GetFuncString(nMask); @@ -675,7 +675,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF ScDPFuncDataVec* theArr = GetFieldDataArray(eFromType); size_t nAt = 0; Point aToPos; - BOOL bDataArr = eFromType == TYPE_DATA; + sal_Bool bDataArr = eFromType == TYPE_DATA; ScDPFuncData fData( *((*theArr)[nFromIndex]) ); @@ -705,7 +705,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF { ScDPLabelData* p = GetLabelData(fData.mnCol); OUString aStr = p->maLayoutName; - USHORT nMask = fData.mnFuncMask; + sal_uInt16 nMask = fData.mnFuncMask; if (!aStr.getLength()) { aStr = GetFuncString(nMask); @@ -790,7 +790,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex, { ScDPLabelData* p = GetLabelData(fData.mnCol); OUString aStr = p->maLayoutName; - USHORT nMask = fData.mnFuncMask; + sal_uInt16 nMask = fData.mnFuncMask; if (!aStr.getLength()) { aStr = GetFuncString(nMask); @@ -814,7 +814,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex, ScDPFuncDataVec* theArr = GetFieldDataArray(eFromType); size_t nAt = 0; Point aToPos; - BOOL bDataArr = eFromType == TYPE_DATA; + sal_Bool bDataArr = eFromType == TYPE_DATA; ScDPFuncData fData( *((*theArr)[nFromIndex]) ); @@ -841,7 +841,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex, { ScDPLabelData* p = GetLabelData(fData.mnCol); OUString aStr = p->maLayoutName; - USHORT nMask = fData.mnFuncMask; + sal_uInt16 nMask = fData.mnFuncMask; if (!aStr.getLength()) { aStr = GetFuncString(nMask); @@ -883,7 +883,7 @@ void ScDPLayoutDlg::NotifyMouseButtonUp( const Point& rAt ) { if ( bIsDrag ) { - bIsDrag = FALSE; + bIsDrag = false; ScDPFieldType eDnDToType = TYPE_SELECT; Point aPos = ScreenToOutputPixel( rAt ); @@ -976,7 +976,7 @@ PointerStyle ScDPLayoutDlg::NotifyMouseMove( const Point& rAt ) PointerStyle ScDPLayoutDlg::NotifyMouseButtonDown( ScDPFieldType eType, size_t nFieldIndex ) { - bIsDrag = TRUE; + bIsDrag = true; eDnDFromType = eType; nDnDFromIndex = nFieldIndex; return lclGetPointerForField( eType ); @@ -1024,7 +1024,7 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex ) if (!aLayoutName.getLength()) { // No layout name exists. Use the stock name. - USHORT nMask = (*aIt)->mnFuncMask; + sal_uInt16 nMask = (*aIt)->mnFuncMask; OUString aFuncStr = GetFuncString(nMask); aLayoutName = aFuncStr + pDFData->maName; } @@ -1083,19 +1083,19 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex ) //---------------------------------------------------------------------------- -void ScDPLayoutDlg::NotifyFieldFocus( ScDPFieldType eType, BOOL bGotFocus ) +void ScDPLayoutDlg::NotifyFieldFocus( ScDPFieldType eType, sal_Bool bGotFocus ) { /* Enable Remove/Options buttons on GetFocus in field window. Enable them also, if dialog is deactivated (click into document). The !IsActive() condition handles the case that a LoseFocus event of a field window would follow the Deactivate event of this dialog. */ - BOOL bEnable = (bGotFocus || !IsActive()) && (eType != TYPE_SELECT); + sal_Bool bEnable = (bGotFocus || !IsActive()) && (eType != TYPE_SELECT); // The TestTool may set the focus into an empty field. // Then the Remove/Options buttons must be disabled. ScDPFieldControlBase* pWnd = GetFieldWindow(eType); if ( bEnable && bGotFocus && pWnd && pWnd->IsEmpty() ) - bEnable = FALSE; + bEnable = false; aBtnRemove.Enable( bEnable ); aBtnOptions.Enable( bEnable ); @@ -1114,7 +1114,7 @@ void ScDPLayoutDlg::NotifyMoveFieldToEnd( ScDPFieldType eToType ) MoveFieldToEnd(eLastActiveType, pWnd->GetSelectedField(), eToType); if( pWnd->IsEmpty() ) - NotifyFieldFocus( eToType, TRUE ); + NotifyFieldFocus( eToType, true ); else pWnd->GrabFocus(); if( eLastActiveType == TYPE_SELECT ) @@ -1138,15 +1138,15 @@ void ScDPLayoutDlg::Deactivate() event from field window disables Remove/Options buttons. Re-enable them here by simulating a GetFocus event. Event order of LoseFocus and Deactivate is not important. The last event will enable the buttons in both cases (see NotifyFieldFocus). */ - NotifyFieldFocus( eLastActiveType, TRUE ); + NotifyFieldFocus( eLastActiveType, true ); } //---------------------------------------------------------------------------- -BOOL ScDPLayoutDlg::Contains( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt ) +sal_Bool ScDPLayoutDlg::Contains( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt ) { if (!pArr || pArr->empty()) - return FALSE; + return false; ScDPFuncDataVec::const_iterator itr, itrBeg = pArr->begin(), itrEnd = pArr->end(); for (itr = itrBeg; itr != itrEnd; ++itr) @@ -1230,14 +1230,14 @@ bool ScDPLayoutDlg::IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType ) case TYPE_DATA: eOrient = sheet::DataPilotFieldOrientation_DATA; break; case TYPE_SELECT: eOrient = sheet::DataPilotFieldOrientation_HIDDEN; break; } - bAllowed = ScDPObject::IsOrientationAllowed( (USHORT)eOrient, pData->mnFlags ); + bAllowed = ScDPObject::IsOrientationAllowed( (sal_uInt16)eOrient, pData->mnFlags ); } return bAllowed; } //---------------------------------------------------------------------------- -String ScDPLayoutDlg::GetFuncString( USHORT& rFuncMask, BOOL bIsValue ) +String ScDPLayoutDlg::GetFuncString( sal_uInt16& rFuncMask, sal_Bool bIsValue ) { String aStr; @@ -1385,7 +1385,7 @@ bool ScDPLayoutDlg::GetPivotArrays( void ScDPLayoutDlg::UpdateSrcRange() { String aSrcStr = aEdInPos.GetText(); - USHORT nResult = ScRange().Parse(aSrcStr, pDoc, pDoc->GetAddressConvention()); + sal_uInt16 nResult = ScRange().Parse(aSrcStr, pDoc, pDoc->GetAddressConvention()); DataSrcType eSrcType = SRC_INVALID; ScRange aNewRange; @@ -1450,7 +1450,7 @@ void ScDPLayoutDlg::UpdateSrcRange() } xDlgDPObject->SetSheetDesc(inSheet); - xDlgDPObject->FillOldParam( thePivotData, FALSE ); + xDlgDPObject->FillOldParam( thePivotData ); xDlgDPObject->FillLabelData(thePivotData); aLabelDataArr.clear(); @@ -1641,8 +1641,8 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) { String aOutPosStr( aEdOutPos.GetText() ); ScAddress aAdrDest; - BOOL bToNewTable = (aLbOutPos.GetSelectEntryPos() == 1); - USHORT nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc, pDoc->GetAddressConvention() ) : 0; + sal_Bool bToNewTable = (aLbOutPos.GetSelectEntryPos() == 1); + sal_uInt16 nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc, pDoc->GetAddressConvention() ) : 0; if (!bToNewTable && (aOutPosStr.Len() == 0 || (nResult & SCA_VALID) != SCA_VALID)) { @@ -1762,12 +1762,12 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) } } - USHORT nWhichPivot = SC_MOD()->GetPool().GetWhich( SID_PIVOT_TABLE ); + sal_uInt16 nWhichPivot = SC_MOD()->GetPool().GetWhich( SID_PIVOT_TABLE ); ScPivotItem aOutItem( nWhichPivot, &aSaveData, &aOutRange, bToNewTable ); - bRefInputMode = FALSE; // to allow deselecting when switching sheets + bRefInputMode = false; // to allow deselecting when switching sheets - SetDispatcherLock( FALSE ); + SetDispatcherLock( false ); SwitchToDocument(); ScTabViewShell* pTabViewShell = pViewData->GetViewShell(); @@ -1813,7 +1813,7 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG ) { if ( aBtnMore.GetState() ) { - bRefInputMode = TRUE; + bRefInputMode = true; //@BugID 54702 Enablen/Disablen nur noch in Basisklasse //SFX_APPWINDOW->Enable(); if ( aEdInPos.IsEnabled() ) @@ -1831,9 +1831,9 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG ) } else { - bRefInputMode = FALSE; + bRefInputMode = false; //@BugID 54702 Enablen/Disablen nur noch in Basisklasse - //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg + //SFX_APPWINDOW->Disable(false); //! allgemeine Methode im ScAnyRefDlg } return 0; } @@ -1843,14 +1843,14 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG ) IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, Edit *, EMPTYARG ) { String theCurPosStr = aEdOutPos.GetText(); - USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); if ( SCA_VALID == (nResult & SCA_VALID) ) { String* pStr = NULL; - BOOL bFound = FALSE; - USHORT i = 0; - USHORT nCount = aLbOutPos.GetEntryCount(); + sal_Bool bFound = false; + sal_uInt16 i = 0; + sal_uInt16 nCount = aLbOutPos.GetEntryCount(); for ( i=2; i<nCount && !bFound; i++ ) { @@ -1877,7 +1877,7 @@ IMPL_LINK( ScDPLayoutDlg, EdInModifyHdl, Edit *, EMPTYARG ) IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG ) { String aString; - USHORT nSelPos = aLbOutPos.GetSelectEntryPos(); + sal_uInt16 nSelPos = aLbOutPos.GetSelectEntryPos(); if ( nSelPos > 1 ) { diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 28e2340eb..9290eecf2 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -52,7 +52,7 @@ //======================================================================== -ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL bEdit, BOOL bSheetProtected) +ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit, sal_Bool bSheetProtected) : ModalDialog ( pParent, ScResId( RID_SCDLG_NEWSCENARIO ) ), aFlName ( this, ScResId( FL_NAME )), @@ -86,14 +86,14 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b XColorTable* pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable(); if (pColorTable) { - aLbColor.SetUpdateMode( FALSE ); + aLbColor.SetUpdateMode( false ); long nCount = pColorTable->Count(); for ( long n=0; n<nCount; n++ ) { XColorEntry* pEntry = pColorTable->GetColor(n); aLbColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - aLbColor.SetUpdateMode( TRUE ); + aLbColor.SetUpdateMode( sal_True ); } } } @@ -118,31 +118,36 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b aBtnOk .SetClickHdl( LINK( this, ScNewScenarioDlg, OkHdl ) ); aCbShowFrame.SetClickHdl( LINK( this, ScNewScenarioDlg, EnableHdl ) ); + aLbColor.SetAccessibleName(String(ScResId( STR_COLOR ) )); + FreeResource(); aLbColor.SelectEntry( Color( COL_LIGHTGRAY ) ); - aCbShowFrame.Check(TRUE); - //aCbPrintFrame.Check(TRUE); - aCbTwoWay.Check(TRUE); - //aCbAttrib.Check(FALSE); - //aCbValue.Check(FALSE); - aCbCopyAll.Check(FALSE); - aCbProtect.Check(TRUE); + aCbShowFrame.Check(sal_True); + //aCbPrintFrame.Check(sal_True); + aCbTwoWay.Check(sal_True); + //aCbAttrib.Check(sal_False); + //aCbValue.Check(sal_False); + aCbCopyAll.Check(false); + aCbProtect.Check(sal_True); if (bIsEdit) - aCbCopyAll.Enable(FALSE); + aCbCopyAll.Enable(false); // If the Sheet is protected then we disable the Scenario Protect input // and default it to true above. Note we are in 'Add' mode here as: if // Sheet && scenario protection are true, then we cannot edit this dialog. if (bSheetProtected) - aCbProtect.Enable(FALSE); + aCbProtect.Enable(false); //! die drei funktionieren noch nicht... /* - aCbPrintFrame.Enable(FALSE); - aCbAttrib.Enable(FALSE); - aCbValue.Enable(FALSE); + aCbPrintFrame.Enable(sal_False); + aCbAttrib.Enable(sal_False); + aCbValue.Enable(sal_False); */ + + aEdComment.SetAccessibleRelationMemberOf(&aFlComment); + aLbColor.SetAccessibleRelationLabeledBy(&aCbShowFrame); } //------------------------------------------------------------------------ @@ -154,7 +159,7 @@ ScNewScenarioDlg::~ScNewScenarioDlg() //------------------------------------------------------------------------ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment, - Color& rColor, USHORT& rFlags ) const + Color& rColor, sal_uInt16& rFlags ) const { rComment = aEdComment.GetText(); rName = aEdName.GetText(); @@ -163,7 +168,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment, rName = aDefScenarioName; rColor = aLbColor.GetSelectEntryColor(); - USHORT nBits = 0; + sal_uInt16 nBits = 0; if (aCbShowFrame.IsChecked()) nBits |= SC_SCENARIO_SHOWFRAME; /* @@ -186,7 +191,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment, } void ScNewScenarioDlg::SetScenarioData( const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags ) + const Color& rColor, sal_uInt16 nFlags ) { aEdComment.SetText(rComment); aEdName.SetText(rName); diff --git a/sc/source/ui/dbgui/scendlg.hrc b/sc/source/ui/dbgui/scendlg.hrc index 8fbf9a2d5..44cca9c4b 100644 --- a/sc/source/ui/dbgui/scendlg.hrc +++ b/sc/source/ui/dbgui/scendlg.hrc @@ -55,3 +55,6 @@ #define STR_CREATEDBY 31 #define STR_ON 32 #define STR_EDIT 33 +//IAccessibility2 Implementation 2009----- +#define STR_COLOR 34 +//-----IAccessibility2 Implementation 2009 diff --git a/sc/source/ui/dbgui/scendlg.src b/sc/source/ui/dbgui/scendlg.src index 1ca084b28..17f55fcc2 100644 --- a/sc/source/ui/dbgui/scendlg.src +++ b/sc/source/ui/dbgui/scendlg.src @@ -29,6 +29,7 @@ #include "scendlg.hrc" ModalDialog RID_SCDLG_NEWSCENARIO { + HelpID = "sc:ModalDialog:RID_SCDLG_NEWSCENARIO"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 165 ) ; @@ -55,6 +56,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO }; MultiLineEdit ED_COMMENT { + HelpID = "sc:MultiLineEdit:RID_SCDLG_NEWSCENARIO:ED_COMMENT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 43 ) ; Size = MAP_APPFONT ( 183 , 46 ) ; @@ -65,6 +67,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO }; Edit ED_NAME { + HelpID = "sc:Edit:RID_SCDLG_NEWSCENARIO:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 183 , 12 ) ; @@ -72,12 +75,14 @@ ModalDialog RID_SCDLG_NEWSCENARIO }; CheckBox CB_SHOWFRAME { + HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_SHOWFRAME"; Pos = MAP_APPFONT ( 12 , 107 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "~Display border"; }; ListBox LB_COLOR { + HelpID = "sc:ListBox:RID_SCDLG_NEWSCENARIO:LB_COLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 125 , 105 ) ; Size = MAP_APPFONT ( 70 , 86 ) ; @@ -86,6 +91,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO }; CheckBox CB_PRINTFRAME { + HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_PRINTFRAME"; Hide = TRUE ; Pos = MAP_APPFONT ( 121 , 243 ) ; Size = MAP_APPFONT ( 83 , 10 ) ; @@ -93,12 +99,14 @@ ModalDialog RID_SCDLG_NEWSCENARIO }; CheckBox CB_TWOWAY { + HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_TWOWAY"; Pos = MAP_APPFONT ( 12 , 121 ) ; Size = MAP_APPFONT ( 183 , 10 ) ; Text [ en-US ] = "Copy ~back" ; }; CheckBox CB_ATTRIB { + HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_ATTRIB"; Hide = TRUE ; Pos = MAP_APPFONT ( 20 , 243 ) ; Size = MAP_APPFONT ( 83 , 10 ) ; @@ -106,6 +114,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO }; CheckBox CB_VALUE { + HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_VALUE"; Hide = TRUE ; Pos = MAP_APPFONT ( 230 , 243 ) ; Size = MAP_APPFONT ( 83 , 10 ) ; @@ -113,12 +122,14 @@ ModalDialog RID_SCDLG_NEWSCENARIO }; CheckBox CB_COPYALL { + HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_COPYALL"; Pos = MAP_APPFONT ( 12 , 135 ) ; Size = MAP_APPFONT ( 183 , 10 ) ; Text [ en-US ] = "Copy ~entire sheet" ; }; CheckBox CB_PROTECT { + HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_PROTECT"; Pos = MAP_APPFONT ( 12 , 149 ) ; Size = MAP_APPFONT ( 183 , 10 ) ; Text [ en-US ] = "~Prevent changes" ; @@ -135,6 +146,10 @@ ModalDialog RID_SCDLG_NEWSCENARIO { Text [ en-US ] = "on" ; }; + String STR_COLOR + { + Text [ en-US ] = "Display border in" ; + }; FixedLine FL_NAME { Pos = MAP_APPFONT ( 6 , 3 ) ; diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 705622d2a..cce81777b 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -47,13 +47,8 @@ #include <com/sun/star/uno/Sequence.hxx> #include "miscuno.hxx" - //! TODO make dynamic -#ifdef WIN -const SCSIZE ASCIIDLG_MAXROWS = 10000; -#else const SCSIZE ASCIIDLG_MAXROWS = MAXROWCOUNT; -#endif using namespace com::sun::star::uno; @@ -280,7 +275,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, OUString sTextSeparators(mcTextSep); bool bMergeDelimiters = false; bool bFixedWidth = false; - bool bQuotedFieldAsText = true; + bool bQuotedFieldAsText = false; bool bDetectSpecialNum = false; sal_Int32 nFromRow = 1; sal_Int32 nCharSet = -1; @@ -323,34 +318,45 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, maFieldSeparators = GetSeparators(); // Clipboard is always Unicode, else detect. - bool bPreselectUnicode = !mbFileImport; + rtl_TextEncoding ePreselectUnicode = (mbFileImport ? + RTL_TEXTENCODING_DONTKNOW : RTL_TEXTENCODING_UNICODE); // Sniff for Unicode / not - if( !bPreselectUnicode && mpDatStream ) + if( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW && mpDatStream ) { Seek( 0 ); - mpDatStream->StartReadingUnicodeText(); - ULONG nUniPos = mpDatStream->Tell(); - if ( nUniPos > 0 ) - bPreselectUnicode = TRUE; // read 0xfeff/0xfffe - else + mpDatStream->StartReadingUnicodeText( RTL_TEXTENCODING_DONTKNOW ); + sal_uLong nUniPos = mpDatStream->Tell(); + switch (nUniPos) { - UINT16 n; - *mpDatStream >> n; - // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with - // control characters except CR,LF,TAB - if ( (n & 0xff00) < 0x2000 ) - { - switch ( n & 0xff00 ) + case 2: + ePreselectUnicode = RTL_TEXTENCODING_UNICODE; // UTF-16 + break; + case 3: + ePreselectUnicode = RTL_TEXTENCODING_UTF8; // UTF-8 + break; + case 0: { - case 0x0900 : - case 0x0a00 : - case 0x0d00 : - break; - default: - bPreselectUnicode = TRUE; + sal_uInt16 n; + *mpDatStream >> n; + // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with + // control characters except CR,LF,TAB + if ( (n & 0xff00) < 0x2000 ) + { + switch ( n & 0xff00 ) + { + case 0x0900 : + case 0x0a00 : + case 0x0d00 : + break; + default: + ePreselectUnicode = RTL_TEXTENCODING_UNICODE; // UTF-16 + } + } + mpDatStream->Seek(0); } - } - mpDatStream->Seek(0); + break; + default: + ; // nothing } mnStreamPos = mpDatStream->Tell(); } @@ -376,15 +382,15 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, // *** text encoding ListBox *** // all encodings allowed, including Unicode, but subsets are excluded - aLbCharSet.FillFromTextEncodingTable( TRUE ); + aLbCharSet.FillFromTextEncodingTable( sal_True ); // Insert one "SYSTEM" entry for compatibility in AsciiOptions and system // independent document linkage. aLbCharSet.InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser ); - aLbCharSet.SelectTextEncoding( bPreselectUnicode ? - RTL_TEXTENCODING_UNICODE : gsl_getSystemTextEncoding() ); + aLbCharSet.SelectTextEncoding( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ? + gsl_getSystemTextEncoding() : ePreselectUnicode ); - if( nCharSet >= 0 ) - aLbCharSet.SelectEntryPos( static_cast<USHORT>(nCharSet) ); + if( nCharSet >= 0 && ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ) + aLbCharSet.SelectEntryPos( static_cast<sal_uInt16>(nCharSet) ); SetSelectedCharSet(); aLbCharSet.SetSelectHdl( LINK( this, ScImportAsciiDlg, CharSetHdl ) ); @@ -418,6 +424,9 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, UpdateVertical(); maTableBox.Execute( CSVCMD_NEWCELLTEXTS ); + + aEdOther.SetAccessibleName(aCkbOther.GetText()); + aEdOther.SetAccessibleRelationLabeledBy(&aCkbOther); } @@ -429,7 +438,7 @@ ScImportAsciiDlg::~ScImportAsciiDlg() // ---------------------------------------------------------------------------- -bool ScImportAsciiDlg::GetLine( ULONG nLine, String &rText ) +bool ScImportAsciiDlg::GetLine( sal_uLong nLine, String &rText ) { if (nLine >= ASCIIDLG_MAXROWS || !mpDatStream) return false; @@ -438,15 +447,14 @@ bool ScImportAsciiDlg::GetLine( ULONG nLine, String &rText ) bool bFixed = aRbFixed.IsChecked(); if (!mpRowPosArray) - mpRowPosArray = new ULONG[ASCIIDLG_MAXROWS + 2]; + mpRowPosArray = new sal_uLong[ASCIIDLG_MAXROWS + 2]; if (!mnRowPosCount) // complete re-fresh { memset( mpRowPosArray, 0, sizeof(mpRowPosArray[0]) * (ASCIIDLG_MAXROWS+2)); Seek(0); - if ( mpDatStream->GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ) - mpDatStream->StartReadingUnicodeText(); + mpDatStream->StartReadingUnicodeText( mpDatStream->GetStreamCharSet() ); mnStreamPos = mpDatStream->Tell(); mpRowPosArray[mnRowPosCount] = mnStreamPos; @@ -576,7 +584,7 @@ String ScImportAsciiDlg::GetSeparators() const void ScImportAsciiDlg::SetupSeparatorCtrls() { - BOOL bEnable = aRbSeparated.IsChecked(); + sal_Bool bEnable = aRbSeparated.IsChecked(); aCkbTab.Enable( bEnable ); aCkbSemicolon.Enable( bEnable ); aCkbComma.Enable( bEnable ); @@ -696,7 +704,7 @@ IMPL_LINK( ScImportAsciiDlg, UpdateTextHdl, ScCsvTableBox*, EMPTYARG ) maPreviewLine[i].Erase(); maTableBox.Execute( CSVCMD_SETLINECOUNT, mnRowPosCount); - bool bMergeSep = (aCkbAsOnce.IsChecked() == TRUE); + bool bMergeSep = (aCkbAsOnce.IsChecked() == sal_True); maTableBox.SetUniStrings( maPreviewLine, maFieldSeparators, mcTextSep, bMergeSep); return 0; diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index f3edeaa30..a0c58a4f2 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -51,7 +51,7 @@ public: nIter ( 0 ) {} - USHORT GetCode( const String& rDelimiter ) const; + sal_uInt16 GetCode( const String& rDelimiter ) const; String GetDelimiter( sal_Unicode nCode ) const; String FirstDel() { nIter = 0; return theDelTab.GetToken( nIter, cSep ); } @@ -66,7 +66,7 @@ private: //------------------------------------------------------------------------ -USHORT ScDelimiterTable::GetCode( const String& rDel ) const +sal_uInt16 ScDelimiterTable::GetCode( const String& rDel ) const { sal_Unicode nCode = 0; @@ -118,12 +118,12 @@ String ScDelimiterTable::GetDelimiter( sal_Unicode nCode ) const ScImportOptionsDlg::ScImportOptionsDlg( Window* pParent, - BOOL bAscii, + sal_Bool bAscii, const ScImportOptions* pOptions, const String* pStrTitle, - BOOL bMultiByte, - BOOL bOnlyDbtoolsEncodings, - BOOL bImport ) + sal_Bool bMultiByte, + sal_Bool bOnlyDbtoolsEncodings, + sal_Bool bImport ) : ModalDialog ( pParent, ScResId( RID_SCDLG_IMPORTOPT ) ), aFlFieldOpt ( this, ScResId( FL_FIELDOPT ) ), @@ -133,11 +133,12 @@ ScImportOptionsDlg::ScImportOptionsDlg( aEdFieldSep ( this, ScResId( ED_FIELDSEP ) ), aFtTextSep ( this, ScResId( FT_TEXTSEP ) ), aEdTextSep ( this, ScResId( ED_TEXTSEP ) ), + aCbQuoteAll ( this, ScResId( CB_QUOTEALL ) ), + aCbShown ( this, ScResId( CB_SAVESHOWN ) ), aCbFixed ( this, ScResId( CB_FIXEDWIDTH ) ), aBtnOk ( this, ScResId( BTN_OK ) ), aBtnCancel ( this, ScResId( BTN_CANCEL ) ), - aBtnHelp ( this, ScResId( BTN_HELP ) ), - aCbShown ( this, ScResId( CB_SAVESHOWN ) ) + aBtnHelp ( this, ScResId( BTN_HELP ) ) { // im Ctor-Initializer nicht moeglich (MSC kann das nicht): pFieldSepTab = new ScDelimiterTable( String(ScResId(SCSTR_FIELDSEP)) ); @@ -212,9 +213,11 @@ ScImportOptionsDlg::ScImportOptionsDlg( SetSizePixel( aWinSize ); aCbFixed.Show(); aCbFixed.SetClickHdl( LINK( this, ScImportOptionsDlg, FixedWidthHdl ) ); - aCbFixed.Check( FALSE ); + aCbFixed.Check( false ); aCbShown.Show(); - aCbShown.Check( TRUE ); + aCbShown.Check( sal_True ); + aCbQuoteAll.Show(); + aCbQuoteAll.Check( false ); } else { @@ -226,6 +229,7 @@ ScImportOptionsDlg::ScImportOptionsDlg( aEdTextSep.Hide(); aCbFixed.Hide(); aCbShown.Hide(); + aCbQuoteAll.Hide(); aLbFont.GrabFocus(); aLbFont.SetDoubleClickHdl( LINK( this, ScImportOptionsDlg, DoubleClickHdl ) ); } @@ -260,16 +264,17 @@ void ScImportOptionsDlg::GetImportOptions( ScImportOptions& rOptions ) const rOptions.nTextSepCode = GetCodeFromCombo( aEdTextSep ); rOptions.bFixedWidth = aCbFixed.IsChecked(); rOptions.bSaveAsShown = aCbShown.IsChecked(); + rOptions.bQuoteAllText = aCbQuoteAll.IsChecked(); } } //------------------------------------------------------------------------ -USHORT ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const +sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const { ScDelimiterTable* pTab; String aStr( rEd.GetText() ); - USHORT nCode; + sal_uInt16 nCode; if ( &rEd == &aEdTextSep ) pTab = pTextSepTab; @@ -285,7 +290,7 @@ USHORT ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const nCode = pTab->GetCode( aStr ); if ( nCode == 0 ) - nCode = (USHORT)aStr.GetChar(0); + nCode = (sal_uInt16)aStr.GetChar(0); } return nCode; @@ -297,12 +302,13 @@ IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox ) { if( pCheckBox == &aCbFixed ) { - BOOL bEnable = !aCbFixed.IsChecked(); + sal_Bool bEnable = !aCbFixed.IsChecked(); aFtFieldSep.Enable( bEnable ); aEdFieldSep.Enable( bEnable ); aFtTextSep.Enable( bEnable ); aEdTextSep.Enable( bEnable ); aCbShown.Enable( bEnable ); + aCbQuoteAll.Enable( bEnable ); } return 0; } diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 536785d4c..c704f5904 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -71,8 +71,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi : ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_SPEC_FILTER ), // - aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ), aFtFilterArea ( this, ScResId( FT_CRITERIA_AREA ) ), + aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ), aEdFilterArea ( this, this, ScResId( ED_CRITERIA_AREA ) ), aRbFilterArea ( this, ScResId( RB_CRITERIA_AREA ), &aEdFilterArea, this ), // @@ -91,7 +91,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi pViewData ( NULL ), pDoc ( NULL ), pRefInputEdit ( NULL ), - bRefInputMode ( FALSE ), + bRefInputMode ( false ), pTimer ( NULL ) { Init( rArgSet ); @@ -104,6 +104,11 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi pTimer->SetTimeout( 50 ); // 50ms warten pTimer->SetTimeoutHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) ); pTimer->Start(); + + aLbCopyArea.SetAccessibleName(aBtnCopyResult.GetText()); + aEdCopyArea.SetAccessibleName(aBtnCopyResult.GetText()); + aLbCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + aEdCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult); } @@ -111,8 +116,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi ScSpecialFilterDlg::~ScSpecialFilterDlg() { - USHORT nEntries = aLbFilterArea.GetEntryCount(); - USHORT i; + sal_uInt16 nEntries = aLbFilterArea.GetEntryCount(); + sal_uInt16 i; for ( i=1; i<nEntries; i++ ) delete (String*)aLbFilterArea.GetEntryData( i ); @@ -156,7 +161,7 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) if (!pRangeNames->empty()) { ScRangeName::const_iterator itr = pRangeNames->begin(), itrEnd = pRangeNames->end(); - USHORT nInsert = 0; + sal_uInt16 nInsert = 0; for (; itr != itrEnd; ++itr) { if (!itr->HasType(RT_CRITERIA)) @@ -205,19 +210,19 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) aStrUndefined ); // Spezialfilter braucht immer Spaltenkoepfe - aBtnHeader.Check(TRUE); + aBtnHeader.Check(true); aBtnHeader.Disable(); // Modal-Modus einschalten -// SetDispatcherLock( TRUE ); +// SetDispatcherLock( sal_True ); //@BugID 54702 Enablen/Disablen nur noch in Basisklasse - //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg + //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg } //---------------------------------------------------------------------------- -BOOL ScSpecialFilterDlg::Close() +sal_Bool ScSpecialFilterDlg::Close() { if (pViewData) pViewData->GetDocShell()->CancelAutoDBRange(); @@ -290,7 +295,7 @@ ScQueryItem* ScSpecialFilterDlg::GetOutputItem( const ScQueryParam& rParam, //---------------------------------------------------------------------------- -BOOL ScSpecialFilterDlg::IsRefInputMode() const +sal_Bool ScSpecialFilterDlg::IsRefInputMode() const { return bRefInputMode; } @@ -310,8 +315,8 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) String theAreaStr( aEdFilterArea.GetText() ); ScQueryParam theOutParam( theQueryData ); ScAddress theAdrCopy; - BOOL bEditInputOk = TRUE; - BOOL bQueryOk = FALSE; + sal_Bool bEditInputOk = sal_True; + sal_Bool bQueryOk = false; ScRange theFilterArea; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -322,28 +327,28 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( STRING_NOTFOUND != nColonPos ) theCopyStr.Erase( nColonPos ); - USHORT nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv ); + sal_uInt16 nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv ); if ( SCA_VALID != (nResult & SCA_VALID) ) { if ( !aBtnMore.GetState() ) - aBtnMore.SetState( TRUE ); + aBtnMore.SetState( sal_True ); ERRORBOX( STR_INVALID_TABREF ); aEdCopyArea.GrabFocus(); - bEditInputOk = FALSE; + bEditInputOk = false; } } if ( bEditInputOk ) { - USHORT nResult = ScRange().Parse( theAreaStr, pDoc, eConv ); + sal_uInt16 nResult = ScRange().Parse( theAreaStr, pDoc, eConv ); if ( SCA_VALID != (nResult & SCA_VALID) ) { ERRORBOX( STR_INVALID_TABREF ); aEdFilterArea.GrabFocus(); - bEditInputOk = FALSE; + bEditInputOk = false; } } @@ -355,7 +360,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) * ein ScQueryParam zu erzeugen: */ - USHORT nResult = theFilterArea.Parse( theAreaStr, pDoc, eConv ); + sal_uInt16 nResult = theFilterArea.Parse( theAreaStr, pDoc, eConv ); if ( SCA_VALID == (nResult & SCA_VALID) ) { @@ -364,21 +369,21 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( aBtnCopyResult.IsChecked() ) { - theOutParam.bInplace = FALSE; + theOutParam.bInplace = false; theOutParam.nDestTab = theAdrCopy.Tab(); theOutParam.nDestCol = theAdrCopy.Col(); theOutParam.nDestRow = theAdrCopy.Row(); } else { - theOutParam.bInplace = TRUE; + theOutParam.bInplace = sal_True; theOutParam.nDestTab = 0; theOutParam.nDestCol = 0; theOutParam.nDestRow = 0; } theOutParam.bHasHeader = aBtnHeader.IsChecked(); - theOutParam.bByRow = TRUE; + theOutParam.bByRow = sal_True; theOutParam.bCaseSens = aBtnCase.IsChecked(); theOutParam.bRegExp = aBtnRegExp.IsChecked(); theOutParam.bDuplicate = !aBtnUnique.IsChecked(); @@ -398,7 +403,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( bQueryOk && theOutParam.GetEntryCount() > MAXQUERY && theOutParam.GetEntry(MAXQUERY).bDoQuery ) { - bQueryOk = FALSE; // zu viele + bQueryOk = false; // zu viele //! andere Fehlermeldung ?? } } @@ -406,7 +411,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( bQueryOk ) { - SetDispatcherLock( FALSE ); + SetDispatcherLock( false ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( FID_FILTER_OK, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -438,17 +443,17 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer ) if( aEdCopyArea.HasFocus() || aRbCopyArea.HasFocus() ) { pRefInputEdit = &aEdCopyArea; - bRefInputMode = TRUE; + bRefInputMode = sal_True; } else if( aEdFilterArea.HasFocus() || aRbFilterArea.HasFocus() ) { pRefInputEdit = &aEdFilterArea; - bRefInputMode = TRUE; + bRefInputMode = sal_True; } else if( bRefInputMode ) { pRefInputEdit = NULL; - bRefInputMode = FALSE; + bRefInputMode = false; } } @@ -465,7 +470,7 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb ) if ( pLb == &aLbFilterArea ) { String aString; - USHORT nSelPos = aLbFilterArea.GetSelectEntryPos(); + sal_uInt16 nSelPos = aLbFilterArea.GetSelectEntryPos(); if ( nSelPos > 0 ) aString = *(String*)aLbFilterArea.GetEntryData( nSelPos ); @@ -486,14 +491,14 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd ) if ( pDoc && pViewData ) { String theCurAreaStr = pEd->GetText(); - USHORT nResult = ScRange().Parse( theCurAreaStr, pDoc ); + sal_uInt16 nResult = ScRange().Parse( theCurAreaStr, pDoc ); if ( SCA_VALID == (nResult & SCA_VALID) ) { String* pStr = NULL; - BOOL bFound = FALSE; - USHORT i = 0; - USHORT nCount = aLbFilterArea.GetEntryCount(); + sal_Bool bFound = false; + sal_uInt16 i = 0; + sal_uInt16 nCount = aLbFilterArea.GetEntryCount(); for ( i=1; i<nCount && !bFound; i++ ) { diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx index a5138a5ad..7440c3a11 100644 --- a/sc/source/ui/dbgui/sortdlg.cxx +++ b/sc/source/ui/dbgui/sortdlg.cxx @@ -47,8 +47,8 @@ ScSortDlg::ScSortDlg( Window* pParent, SfxTabDialog( pParent, ScResId( RID_SCDLG_SORT ), pArgSet ), - bIsHeaders ( FALSE ), - bIsByRows ( FALSE ) + bIsHeaders ( false ), + bIsByRows ( false ) { #if LAYOUT_SFX_TABDIALOG_BROKEN @@ -56,9 +56,9 @@ ScSortDlg::ScSortDlg( Window* pParent, AddTabPage( TP_OPTIONS, ScTabPageSortOptions::Create, 0 ); #else String fields = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fields")); - AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, FALSE, TAB_APPEND); + AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, false, TAB_APPEND); String options = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("options")); - AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, FALSE, TAB_APPEND); + AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, false, TAB_APPEND); #endif FreeResource(); } diff --git a/sc/source/ui/dbgui/textimportoptions.src b/sc/source/ui/dbgui/textimportoptions.src index a2d453555..ea0b93902 100644 --- a/sc/source/ui/dbgui/textimportoptions.src +++ b/sc/source/ui/dbgui/textimportoptions.src @@ -29,6 +29,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS { + HelpID = "sc:ModalDialog:RID_SCDLG_TEXT_IMPORT_OPTIONS"; Text [ en-US ] = "Import Options" ; Size = MAP_APPFONT ( 230 , 101 ) ; Moveable = TRUE ; @@ -64,6 +65,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS RadioButton RB_AUTOMATIC { + HelpID = "sc:RadioButton:RID_SCDLG_TEXT_IMPORT_OPTIONS:RB_AUTOMATIC"; Pos = MAP_APPFONT( 12, 20 ) ; Size = MAP_APPFONT( 159, 10 ) ; TabStop = TRUE ; @@ -73,6 +75,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS RadioButton RB_CUSTOM { + HelpID = "sc:RadioButton:RID_SCDLG_TEXT_IMPORT_OPTIONS:RB_CUSTOM"; Pos = MAP_APPFONT( 12, 34 ) ; Size = MAP_APPFONT( 159, 10 ) ; TabStop = TRUE ; @@ -82,6 +85,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS ListBox LB_CUSTOM_LANG { + HelpID = "sc:ListBox:RID_SCDLG_TEXT_IMPORT_OPTIONS:LB_CUSTOM_LANG"; Pos = MAP_APPFONT( 20, 50 ) ; Size = MAP_APPFONT( 140, 120 ) ; TabStop = TRUE ; @@ -98,6 +102,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS CheckBox BTN_CONVERT_DATE { + HelpID = "sc:CheckBox:RID_SCDLG_TEXT_IMPORT_OPTIONS:BTN_CONVERT_DATE"; Pos = MAP_APPFONT( 12, 86 ); Size = MAP_APPFONT( 159, 10 ); TabStop = TRUE ; diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 95c66c14f..364bdbf52 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -61,7 +61,7 @@ using namespace com::sun::star; // STATIC DATA ----------------------------------------------------------- -static USHORT pSortRanges[] = +static sal_uInt16 pSortRanges[] = { SID_SORT, SID_SORT, @@ -81,7 +81,7 @@ static USHORT pSortRanges[] = * * Die Klasse SfxTabPage bietet mittlerweile ein Verfahren an: * - * virtual BOOL HasExchangeSupport() const; -> return TRUE; + * virtual sal_Bool HasExchangeSupport() const; -> return sal_True; * virtual void ActivatePage(const SfxItemSet &); * virtual int DeactivatePage(SfxItemSet * = 0); * @@ -125,8 +125,8 @@ ScTabPageSortFields::ScTabPageSortFields( Window* pParent, rArgSet.Get( nWhichSort )). GetSortData() ), nFieldCount ( 0 ), - bHasHeader ( FALSE ), - bSortByRows ( FALSE ) + bHasHeader ( false ), + bSortByRows ( false ) { Init(); FreeResource(); @@ -177,7 +177,7 @@ void ScTabPageSortFields::Init() //------------------------------------------------------------------------ -USHORT* ScTabPageSortFields::GetRanges() +sal_uInt16* ScTabPageSortFields::GetRanges() { return pSortRanges; } @@ -204,7 +204,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) if ( rSortData.bDoSort[0] ) { - for ( USHORT i=0; i<3; i++ ) + for ( sal_uInt16 i=0; i<3; i++ ) { if ( rSortData.bDoSort[i] ) { @@ -239,7 +239,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) else if( nCol > rSortData.nCol2 ) nCol = rSortData.nCol2; - USHORT nSort1Pos = nCol - rSortData.nCol1+1; + sal_uInt16 nSort1Pos = nCol - rSortData.nCol1+1; aLbSort1.SelectEntryPos( nSort1Pos ); aLbSort2.SelectEntryPos( 0 ); aLbSort3.SelectEntryPos( 0 ); @@ -260,20 +260,20 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) { ScSortParam theSortData = rSortData; if (pDlg) { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSort, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET ) theSortData = ((const ScSortItem*)pItem)->GetSortData(); } - USHORT nSort1Pos = aLbSort1.GetSelectEntryPos(); - USHORT nSort2Pos = aLbSort2.GetSelectEntryPos(); - USHORT nSort3Pos = aLbSort3.GetSelectEntryPos(); + sal_uInt16 nSort1Pos = aLbSort1.GetSelectEntryPos(); + sal_uInt16 nSort2Pos = aLbSort2.GetSelectEntryPos(); + sal_uInt16 nSort3Pos = aLbSort3.GetSelectEntryPos(); DBG_ASSERT( (nSort1Pos <= SC_MAXFIELDS) && (nSort2Pos <= SC_MAXFIELDS) @@ -318,12 +318,12 @@ BOOL ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) { theSortData.bDoSort[0] = theSortData.bDoSort[1] = - theSortData.bDoSort[2] = FALSE; + theSortData.bDoSort[2] = false; } rArgSet.Put( ScSortItem( SCITEM_SORTDATA, NULL, &theSortData ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -337,9 +337,9 @@ void ScTabPageSortFields::ActivatePage() if ( bHasHeader != pDlg->GetHeaders() || bSortByRows != pDlg->GetByRows() ) { - USHORT nCurSel1 = aLbSort1.GetSelectEntryPos(); - USHORT nCurSel2 = aLbSort2.GetSelectEntryPos(); - USHORT nCurSel3 = aLbSort3.GetSelectEntryPos(); + sal_uInt16 nCurSel1 = aLbSort1.GetSelectEntryPos(); + sal_uInt16 nCurSel2 = aLbSort2.GetSelectEntryPos(); + sal_uInt16 nCurSel3 = aLbSort3.GetSelectEntryPos(); bHasHeader = pDlg->GetHeaders(); bSortByRows = pDlg->GetByRows(); @@ -372,7 +372,7 @@ int ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP ) // ----------------------------------------------------------------------- -void ScTabPageSortFields::DisableField( USHORT nField ) +void ScTabPageSortFields::DisableField( sal_uInt16 nField ) { nField--; @@ -387,7 +387,7 @@ void ScTabPageSortFields::DisableField( USHORT nField ) // ----------------------------------------------------------------------- -void ScTabPageSortFields::EnableField( USHORT nField ) +void ScTabPageSortFields::EnableField( sal_uInt16 nField ) { nField--; @@ -420,7 +420,7 @@ void ScTabPageSortFields::FillFieldLists() SCCOL nFirstSortCol = rSortData.nCol1; SCROW nFirstSortRow = rSortData.nRow1; SCTAB nTab = pViewData->GetTabNo(); - USHORT i = 1; + sal_uInt16 i = 1; if ( bSortByRows ) { @@ -473,17 +473,17 @@ void ScTabPageSortFields::FillFieldLists() //------------------------------------------------------------------------ -USHORT ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField ) +sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField ) { - USHORT nFieldPos = 0; - BOOL bFound = FALSE; + sal_uInt16 nFieldPos = 0; + sal_Bool bFound = false; - for ( USHORT n=1; n<nFieldCount && !bFound; n++ ) + for ( sal_uInt16 n=1; n<nFieldCount && !bFound; n++ ) { if ( nFieldArr[n] == nField ) { nFieldPos = n; - bFound = TRUE; + bFound = sal_True; } } @@ -596,15 +596,22 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent, Init(); FreeResource(); SetExchangeSupport(); + + aLbOutPos.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + aLbOutPos.SetAccessibleName(aBtnCopyResult.GetText()); + aEdOutPos.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + aEdOutPos.SetAccessibleName(aBtnCopyResult.GetText()); + aLbSortUser.SetAccessibleRelationLabeledBy(&aBtnSortUser); + aLbSortUser.SetAccessibleName(aBtnSortUser.GetText()); } // ----------------------------------------------------------------------- ScTabPageSortOptions::~ScTabPageSortOptions() { - USHORT nEntries = aLbOutPos.GetEntryCount(); + sal_uInt16 nEntries = aLbOutPos.GetEntryCount(); - for ( USHORT i=1; i<nEntries; i++ ) + for ( sal_uInt16 i=1; i<nEntries; i++ ) delete (String*)aLbOutPos.GetEntryData( i ); delete pColRes; @@ -655,7 +662,7 @@ void ScTabPageSortOptions::Init() String aRefStr; while ( aIter.Next( aName, aRange ) ) { - USHORT nInsert = aLbOutPos.InsertEntry( aName ); + sal_uInt16 nInsert = aLbOutPos.InsertEntry( aName ); aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, eConv ); aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) ); @@ -698,13 +705,13 @@ void ScTabPageSortOptions::Init() // get available languages - aLbLanguage.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE ); + aLbLanguage.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, false ); aLbLanguage.InsertLanguage( LANGUAGE_SYSTEM ); } //------------------------------------------------------------------------ -USHORT* ScTabPageSortOptions::GetRanges() +sal_uInt16* ScTabPageSortOptions::GetRanges() { return pSortRanges; } @@ -727,13 +734,13 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) { if ( rSortData.bUserDef ) { - aBtnSortUser.Check( TRUE ); + aBtnSortUser.Check( sal_True ); aLbSortUser.Enable(); aLbSortUser.SelectEntryPos( rSortData.nUserIndex ); } else { - aBtnSortUser.Check( FALSE ); + aBtnSortUser.Check( false ); aLbSortUser.Disable(); aLbSortUser.SelectEntryPos( 0 ); } @@ -765,7 +772,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) if ( pDoc && !rSortData.bInplace ) { String aStr; - USHORT nFormat = (rSortData.nDestTab != pViewData->GetTabNo()) + sal_uInt16 nFormat = (rSortData.nDestTab != pViewData->GetTabNo()) ? SCR_ABS_3D : SCR_ABS; @@ -784,7 +791,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) } else { - aBtnCopyResult.Check( FALSE ); + aBtnCopyResult.Check( false ); aLbOutPos.Disable(); aEdOutPos.Disable(); aEdOutPos.SetText( EMPTY_STRING ); @@ -793,14 +800,14 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) { ScSortParam theSortData = rSortData; if (pDlg) { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSort, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET ) theSortData = ((const ScSortItem*)pItem)->GetSortData(); } @@ -828,7 +835,7 @@ BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) { uno::Sequence<rtl::OUString> aAlgos = pColWrap->listCollatorAlgorithms( theSortData.aCollatorLocale ); - USHORT nSel = aLbAlgorithm.GetSelectEntryPos(); + sal_uInt16 nSel = aLbAlgorithm.GetSelectEntryPos(); if ( nSel < aAlgos.getLength() ) sAlg = aAlgos[nSel]; } @@ -836,7 +843,7 @@ BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) rArgSet.Put( ScSortItem( SCITEM_SORTDATA, &theSortData ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -867,7 +874,7 @@ void ScTabPageSortOptions::ActivatePage() int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) { - BOOL bPosInputOk = TRUE; + sal_Bool bPosInputOk = sal_True; if ( aBtnCopyResult.IsChecked() ) { @@ -885,7 +892,7 @@ int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) thePos.SetTab( pViewData->GetTabNo() ); } - USHORT nResult = thePos.Parse( thePosStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = thePos.Parse( thePosStr, pDoc, pDoc->GetAddressConvention() ); bPosInputOk = ( SCA_VALID == (nResult & SCA_VALID) ); @@ -928,9 +935,9 @@ void ScTabPageSortOptions::FillUserSortListBox() aLbSortUser.Clear(); if ( pUserLists ) { - USHORT nCount = pUserLists->GetCount(); + sal_uInt16 nCount = pUserLists->GetCount(); if ( nCount > 0 ) - for ( USHORT i=0; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) aLbSortUser.InsertEntry( (*pUserLists)[i]->GetString() ); } } @@ -974,7 +981,7 @@ IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb ) if ( pLb == &aLbOutPos ) { String aString; - USHORT nSelPos = aLbOutPos.GetSelectEntryPos(); + sal_uInt16 nSelPos = aLbOutPos.GetSelectEntryPos(); if ( nSelPos > 0 ) aString = *(String*)aLbOutPos.GetEntryData( nSelPos ); @@ -1006,14 +1013,14 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) if ( pEd == &aEdOutPos ) { String theCurPosStr = aEdOutPos.GetText(); - USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); if ( SCA_VALID == (nResult & SCA_VALID) ) { String* pStr = NULL; - BOOL bFound = FALSE; - USHORT i = 0; - USHORT nCount = aLbOutPos.GetEntryCount(); + sal_Bool bFound = false; + sal_uInt16 i = 0; + sal_uInt16 nCount = aLbOutPos.GetEntryCount(); for ( i=2; i<nCount && !bFound; i++ ) { @@ -1033,7 +1040,7 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG ) { - aLbAlgorithm.SetUpdateMode( FALSE ); + aLbAlgorithm.SetUpdateMode( false ); aLbAlgorithm.Clear(); LanguageType eLang = aLbLanguage.GetSelectLanguage(); @@ -1042,8 +1049,8 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG ) // for LANGUAGE_SYSTEM no algorithm can be selected because // it wouldn't necessarily exist for other languages // -> leave list box empty if LANGUAGE_SYSTEM is selected - aFtAlgorithm.Enable( FALSE ); // nothing to select - aLbAlgorithm.Enable( FALSE ); // nothing to select + aFtAlgorithm.Enable( false ); // nothing to select + aLbAlgorithm.Enable( false ); // nothing to select } else { @@ -1063,7 +1070,7 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG ) aLbAlgorithm.Enable( nCount > 1 ); // enable only if there is a choice } - aLbAlgorithm.SetUpdateMode( TRUE ); + aLbAlgorithm.SetUpdateMode( sal_True ); return 0; } diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index 91a3ff02f..b3f101979 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -46,7 +46,7 @@ // STATIC DATA ----------------------------------------------------------- -static USHORT pSubTotalsRanges[] = +static sal_uInt16 pSubTotalsRanges[] = { SID_SUBTOTALS, SID_SUBTOTALS, @@ -56,7 +56,7 @@ static USHORT pSubTotalsRanges[] = //======================================================================== // Zwischenergebnisgruppen-Tabpage: -ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, USHORT nResId, +ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rArgSet ) : SfxTabPage ( pParent, ScResId( nResId ), @@ -91,15 +91,15 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, USHORT nResId, ScTpSubTotalGroup::~ScTpSubTotalGroup() { - USHORT nCount = (USHORT)aLbColumns.GetEntryCount(); + sal_uInt16 nCount = (sal_uInt16)aLbColumns.GetEntryCount(); if ( nCount > 0 ) { - USHORT* pData = NULL; + sal_uInt16* pData = NULL; - for ( USHORT i=0; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) { - pData = (USHORT*)(aLbColumns.GetEntryData( i )); + pData = (sal_uInt16*)(aLbColumns.GetEntryData( i )); DBG_ASSERT( pData, "EntryData not found" ); delete pData; @@ -130,32 +130,32 @@ void ScTpSubTotalGroup::Init() //------------------------------------------------------------------------ -USHORT* ScTpSubTotalGroup::GetRanges() +sal_uInt16* ScTpSubTotalGroup::GetRanges() { return pSubTotalsRanges; } // ----------------------------------------------------------------------- -BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo, +sal_Bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo, const SfxItemSet& rArgSet ) { - USHORT nGroupIdx = 0; + sal_uInt16 nGroupIdx = 0; DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" ); if ( (nGroupNo > 3) || (nGroupNo == 0) ) - return FALSE; + return false; else nGroupIdx = nGroupNo-1; //---------------------------------------------------------- // first we have to clear the listboxes... - for ( USHORT nLbEntry = 0; nLbEntry < aLbColumns.GetEntryCount(); ++nLbEntry ) + for ( sal_uInt16 nLbEntry = 0; nLbEntry < aLbColumns.GetEntryCount(); ++nLbEntry ) { - aLbColumns.CheckEntryPos( nLbEntry, FALSE ); - *((USHORT*)aLbColumns.GetEntryData( nLbEntry )) = 0; + aLbColumns.CheckEntryPos( nLbEntry, false ); + *((sal_uInt16*)aLbColumns.GetEntryData( nLbEntry )) = 0; } aLbFunctions.SelectEntryPos( 0 ); @@ -172,10 +172,10 @@ BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo, aLbGroup.SelectEntryPos( GetFieldSelPos( nField )+1 ); - for ( USHORT i=0; i<nSubTotals; i++ ) + for ( sal_uInt16 i=0; i<nSubTotals; i++ ) { - USHORT nCheckPos = GetFieldSelPos( pSubTotals[i] ); - USHORT* pFunction = (USHORT*)aLbColumns.GetEntryData( nCheckPos ); + sal_uInt16 nCheckPos = GetFieldSelPos( pSubTotals[i] ); + sal_uInt16* pFunction = (sal_uInt16*)aLbColumns.GetEntryData( nCheckPos ); aLbColumns.CheckEntryPos( nCheckPos ); *pFunction = FuncToLbPos( pFunctions[i] ); @@ -189,15 +189,15 @@ BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo, aLbFunctions.SelectEntryPos( 0 ); } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, +sal_Bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo, SfxItemSet& rArgSet ) { - USHORT nGroupIdx = 0; + sal_uInt16 nGroupIdx = 0; DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" ); DBG_ASSERT( (aLbGroup.GetEntryCount() > 0) @@ -211,7 +211,7 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, || (aLbColumns.GetEntryCount() == 0) || (aLbFunctions.GetEntryCount() == 0) ) - return FALSE; + return false; else nGroupIdx = nGroupNo-1; @@ -223,15 +223,15 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSubTotals, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSubTotals, sal_True, &pItem ) == SFX_ITEM_SET ) theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData(); } ScSubTotalFunc* pFunctions = NULL; SCCOL* pSubTotals = NULL; - USHORT nGroup = aLbGroup.GetSelectEntryPos(); - USHORT nEntryCount = (USHORT)aLbColumns.GetEntryCount(); - USHORT nCheckCount = aLbColumns.GetCheckedEntryCount(); + sal_uInt16 nGroup = aLbGroup.GetSelectEntryPos(); + sal_uInt16 nEntryCount = (sal_uInt16)aLbColumns.GetEntryCount(); + sal_uInt16 nCheckCount = aLbColumns.GetCheckedEntryCount(); theSubTotalData.nCol1 = rSubTotalData.nCol1; theSubTotalData.nRow1 = rSubTotalData.nRow1; @@ -244,18 +244,18 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, if ( nEntryCount>0 && nCheckCount>0 && nGroup!=0 ) { - USHORT nFunction = 0; + sal_uInt16 nFunction = 0; pSubTotals = new SCCOL [nCheckCount]; pFunctions = new ScSubTotalFunc [nCheckCount]; - for ( USHORT i=0, nCheck=0; i<nEntryCount; i++ ) + for ( sal_uInt16 i=0, nCheck=0; i<nEntryCount; i++ ) { if ( aLbColumns.IsChecked( i ) ) { DBG_ASSERT( nCheck <= nCheckCount, "Range error :-(" ); - nFunction = *((USHORT*)aLbColumns.GetEntryData( i )); + nFunction = *((sal_uInt16*)aLbColumns.GetEntryData( i )); pSubTotals[nCheck] = nFieldArr[i]; pFunctions[nCheck] = LbPosToFunc( nFunction ); nCheck++; @@ -273,7 +273,7 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, if ( pSubTotals ) delete [] pSubTotals; if ( pFunctions ) delete [] pFunctions; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -289,7 +289,7 @@ void ScTpSubTotalGroup::FillListBoxes() SCTAB nTab = pViewData->GetTabNo(); SCCOL nMaxCol = rSubTotalData.nCol2; SCCOL col; - USHORT i=0; + sal_uInt16 i=0; String aFieldName; aLbGroup.Clear(); @@ -309,27 +309,27 @@ void ScTpSubTotalGroup::FillListBoxes() nFieldArr[i] = col; aLbGroup.InsertEntry( aFieldName, i+1 ); aLbColumns.InsertEntry( aFieldName, i ); - aLbColumns.SetEntryData( i, new USHORT(0) ); + aLbColumns.SetEntryData( i, new sal_uInt16(0) ); i++; } // Nachtraegliche "Konstanteninitialisierung": - (USHORT&)nFieldCount = i; + (sal_uInt16&)nFieldCount = i; } } // ----------------------------------------------------------------------- -USHORT ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField ) +sal_uInt16 ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField ) { - USHORT nFieldPos = 0; - BOOL bFound = FALSE; + sal_uInt16 nFieldPos = 0; + sal_Bool bFound = false; - for ( USHORT n=0; n<nFieldCount && !bFound; n++ ) + for ( sal_uInt16 n=0; n<nFieldCount && !bFound; n++ ) { if ( nFieldArr[n] == nField ) { nFieldPos = n; - bFound = TRUE; + bFound = sal_True; } } @@ -338,7 +338,7 @@ USHORT ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField ) // ----------------------------------------------------------------------- -ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( USHORT nPos ) +ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( sal_uInt16 nPos ) { switch ( nPos ) { @@ -362,7 +362,7 @@ ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( USHORT nPos ) // ----------------------------------------------------------------------- -USHORT ScTpSubTotalGroup::FuncToLbPos( ScSubTotalFunc eFunc ) +sal_uInt16 ScTpSubTotalGroup::FuncToLbPos( ScSubTotalFunc eFunc ) { switch ( eFunc ) { @@ -393,9 +393,9 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb ) if ( (aLbColumns.GetEntryCount() > 0) && (aLbColumns.GetSelectionCount() > 0) ) { - USHORT nFunction = aLbFunctions.GetSelectEntryPos(); - USHORT nColumn = aLbColumns.GetSelectEntryPos(); - USHORT* pFunction = (USHORT*)aLbColumns.GetEntryData( nColumn ); + sal_uInt16 nFunction = aLbFunctions.GetSelectEntryPos(); + sal_uInt16 nColumn = aLbColumns.GetSelectEntryPos(); + sal_uInt16* pFunction = (sal_uInt16*)aLbColumns.GetEntryData( nColumn ); DBG_ASSERT( pFunction, "EntryData nicht gefunden!" ); if ( !pFunction ) @@ -408,7 +408,7 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb ) else if ( pLb == &aLbFunctions ) { *pFunction = nFunction; - aLbColumns.CheckEntryPos( nColumn, TRUE ); + aLbColumns.CheckEntryPos( nColumn, true ); } } return 0; @@ -424,7 +424,7 @@ IMPL_LINK( ScTpSubTotalGroup, CheckHdl, ListBox *, pLb ) if ( pEntry ) { - aLbColumns.SelectEntryPos( (USHORT)aLbColumns.GetModel()->GetAbsPos( pEntry ) ); + aLbColumns.SelectEntryPos( (sal_uInt16)aLbColumns.GetModel()->GetAbsPos( pEntry ) ); SelectHdl( pLb ); } } @@ -476,9 +476,9 @@ void ScTpSubTotalGroup3::Reset( const SfxItemSet& rArgSet ) { RESET(3); } // ----------------------------------------------------------------------- #define FILLSET(i) (ScTpSubTotalGroup::DoFillItemSet( (i), rArgSet )) -BOOL ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); } -BOOL ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); } -BOOL ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); } +sal_Bool ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); } +sal_Bool ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); } +sal_Bool ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); } #undef FILL //======================================================================== @@ -509,6 +509,9 @@ ScTpSubTotalOptions::ScTpSubTotalOptions( Window* pParent, { Init(); FreeResource(); + + aLbUserDef.SetAccessibleRelationLabeledBy(&aBtnUserDef); + aLbUserDef.SetAccessibleName(aBtnUserDef.GetText()); } // ----------------------------------------------------------------------- @@ -556,13 +559,13 @@ void ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ ) if ( rSubTotalData.bUserDef ) { - aBtnUserDef.Check( TRUE ); + aBtnUserDef.Check( sal_True ); aLbUserDef.Enable(); aLbUserDef.SelectEntryPos( rSubTotalData.nUserIndex ); } else { - aBtnUserDef.Check( FALSE ); + aBtnUserDef.Check( false ); aLbUserDef.Disable(); aLbUserDef.SelectEntryPos( 0 ); } @@ -572,7 +575,7 @@ void ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) { ScSubTotalParam theSubTotalData; // auslesen, wenn schon teilweise gefuellt SfxTabDialog* pDlg = GetTabDialog(); @@ -580,12 +583,12 @@ BOOL ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSubTotals, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSubTotals, sal_True, &pItem ) == SFX_ITEM_SET ) theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData(); } theSubTotalData.bPagebreak = aBtnPagebreak.IsChecked(); - theSubTotalData.bReplace = TRUE; + theSubTotalData.bReplace = sal_True; theSubTotalData.bCaseSens = aBtnCase.IsChecked(); theSubTotalData.bIncludePattern = aBtnFormats.IsChecked(); theSubTotalData.bDoSort = aBtnSort.IsChecked(); @@ -597,7 +600,7 @@ BOOL ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) rArgSet.Put( ScSubTotalItem( nWhichSubTotals, &theSubTotalData ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -609,9 +612,9 @@ void ScTpSubTotalOptions::FillUserSortListBox() aLbUserDef.Clear(); if ( pUserLists ) { - USHORT nCount = pUserLists->GetCount(); + sal_uInt16 nCount = pUserLists->GetCount(); if ( nCount > 0 ) - for ( USHORT i=0; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) aLbUserDef.InsertEntry( (*pUserLists)[i]->GetString() ); } } diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index f10b75468..577391cee 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -60,7 +60,7 @@ // ============================================================================ -static USHORT pValueRanges[] = +static sal_uInt16 pValueRanges[] = { FID_VALID_MODE, FID_VALID_ERRTEXT, FID_VALID_LISTTYPE, FID_VALID_LISTTYPE, @@ -160,7 +160,7 @@ void ScTPValidationValue::RefInputDonePostHdl() } -BOOL ScValidationDlg::Close() +sal_Bool ScValidationDlg::Close() { if( m_bOwnRefHdlr ) if( SfxTabPage* pPage = GetTabPage( TP_VALIDATION_VALUES ) ) @@ -172,7 +172,7 @@ BOOL ScValidationDlg::Close() ScValidationDlg::~ScValidationDlg() { if( m_bOwnRefHdlr ) - RemoveRefDlg( FALSE ); + RemoveRefDlg( false ); } @@ -181,9 +181,9 @@ ScValidationDlg::~ScValidationDlg() namespace { /** Converts the passed ScValidationMode to the position in the list box. */ -USHORT lclGetPosFromValMode( ScValidationMode eValMode ) +sal_uInt16 lclGetPosFromValMode( ScValidationMode eValMode ) { - USHORT nLbPos = SC_VALIDDLG_ALLOW_ANY; + sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY; switch( eValMode ) { case SC_VALID_ANY: nLbPos = SC_VALIDDLG_ALLOW_ANY; break; @@ -200,7 +200,7 @@ USHORT lclGetPosFromValMode( ScValidationMode eValMode ) } /** Converts the passed list box position to an ScValidationMode. */ -ScValidationMode lclGetValModeFromPos( USHORT nLbPos ) +ScValidationMode lclGetValModeFromPos( sal_uInt16 nLbPos ) { ScValidationMode eValMode = SC_VALID_ANY; switch( nLbPos ) @@ -219,9 +219,9 @@ ScValidationMode lclGetValModeFromPos( USHORT nLbPos ) } /** Converts the passed ScConditionMode to the position in the list box. */ -USHORT lclGetPosFromCondMode( ScConditionMode eCondMode ) +sal_uInt16 lclGetPosFromCondMode( ScConditionMode eCondMode ) { - USHORT nLbPos = SC_VALIDDLG_DATA_EQUAL; + sal_uInt16 nLbPos = SC_VALIDDLG_DATA_EQUAL; switch( eCondMode ) { case SC_COND_NONE: // may occur in old XML files after Excel import @@ -239,7 +239,7 @@ USHORT lclGetPosFromCondMode( ScConditionMode eCondMode ) } /** Converts the passed list box position to an ScConditionMode. */ -ScConditionMode lclGetCondModeFromPos( USHORT nLbPos ) +ScConditionMode lclGetCondModeFromPos( sal_uInt16 nLbPos ) { ScConditionMode eCondMode = SC_COND_EQUAL; switch( nLbPos ) @@ -374,7 +374,7 @@ SfxTabPage* ScTPValidationValue::Create( Window* pParent, const SfxItemSet& rArg return( new ScTPValidationValue( pParent, rArgSet ) ); } -USHORT* ScTPValidationValue::GetRanges() +sal_uInt16* ScTPValidationValue::GetRanges() { return pValueRanges; } @@ -383,38 +383,38 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet ) { const SfxPoolItem* pItem; - USHORT nLbPos = SC_VALIDDLG_ALLOW_ANY; - if( rArgSet.GetItemState( FID_VALID_MODE, TRUE, &pItem ) == SFX_ITEM_SET ) + sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY; + if( rArgSet.GetItemState( FID_VALID_MODE, sal_True, &pItem ) == SFX_ITEM_SET ) nLbPos = lclGetPosFromValMode( static_cast< ScValidationMode >( static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) ); maLbAllow.SelectEntryPos( nLbPos ); nLbPos = SC_VALIDDLG_DATA_EQUAL; - if( rArgSet.GetItemState( FID_VALID_CONDMODE, TRUE, &pItem ) == SFX_ITEM_SET ) + if( rArgSet.GetItemState( FID_VALID_CONDMODE, sal_True, &pItem ) == SFX_ITEM_SET ) nLbPos = lclGetPosFromCondMode( static_cast< ScConditionMode >( static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) ); maLbValue.SelectEntryPos( nLbPos ); // *** check boxes *** - BOOL bCheck = TRUE; - if( rArgSet.GetItemState( FID_VALID_BLANK, TRUE, &pItem ) == SFX_ITEM_SET ) + sal_Bool bCheck = sal_True; + if( rArgSet.GetItemState( FID_VALID_BLANK, sal_True, &pItem ) == SFX_ITEM_SET ) bCheck = static_cast< const SfxBoolItem* >( pItem )->GetValue(); maCbAllow.Check( bCheck ); sal_Int32 nListType = ValidListType::UNSORTED; - if( rArgSet.GetItemState( FID_VALID_LISTTYPE, TRUE, &pItem ) == SFX_ITEM_SET ) + if( rArgSet.GetItemState( FID_VALID_LISTTYPE, sal_True, &pItem ) == SFX_ITEM_SET ) nListType = static_cast< const SfxInt16Item* >( pItem )->GetValue(); maCbShow.Check( nListType != ValidListType::INVISIBLE ); maCbSort.Check( nListType == ValidListType::SORTEDASCENDING ); // *** formulas *** String aFmlaStr; - if ( rArgSet.GetItemState( FID_VALID_VALUE1, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_VALUE1, sal_True, &pItem ) == SFX_ITEM_SET ) aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue(); SetFirstFormula( aFmlaStr ); aFmlaStr.Erase(); - if ( rArgSet.GetItemState( FID_VALID_VALUE2, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_VALUE2, sal_True, &pItem ) == SFX_ITEM_SET ) aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue(); SetSecondFormula( aFmlaStr ); @@ -422,21 +422,21 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet ) CheckHdl( NULL ); } -BOOL ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet ) { sal_Int16 nListType = maCbShow.IsChecked() ? (maCbSort.IsChecked() ? ValidListType::SORTEDASCENDING : ValidListType::UNSORTED) : ValidListType::INVISIBLE; - rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<USHORT>( + rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>( lclGetValModeFromPos( maLbAllow.GetSelectEntryPos() ) ) ) ); - rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<USHORT>( + rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>( lclGetCondModeFromPos( maLbValue.GetSelectEntryPos() ) ) ) ); rArgSet.Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) ); rArgSet.Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) ); rArgSet.Put( SfxBoolItem( FID_VALID_BLANK, maCbAllow.IsChecked() ) ); rArgSet.Put( SfxInt16Item( FID_VALID_LISTTYPE, nListType ) ); - return TRUE; + return sal_True; } String ScTPValidationValue::GetFirstFormula() const @@ -582,7 +582,7 @@ void ScTPValidationValue::TidyListBoxes() IMPL_LINK( ScTPValidationValue, EditSetFocusHdl, Edit *, EMPTYARG) { - USHORT nPos=maLbAllow.GetSelectEntryPos(); + sal_uInt16 nPos=maLbAllow.GetSelectEntryPos(); if ( nPos == SC_VALIDDLG_ALLOW_RANGE ) { @@ -609,7 +609,7 @@ IMPL_LINK( ScTPValidationValue, KillFocusHdl, Window *, pWnd ) IMPL_LINK( ScTPValidationValue, SelectHdl, ListBox*, EMPTYARG ) { - USHORT nLbPos = maLbAllow.GetSelectEntryPos(); + sal_uInt16 nLbPos = maLbAllow.GetSelectEntryPos(); bool bEnable = (nLbPos != SC_VALIDDLG_ALLOW_ANY); bool bRange = (nLbPos == SC_VALIDDLG_ALLOW_RANGE); bool bList = (nLbPos == SC_VALIDDLG_ALLOW_LIST); @@ -701,12 +701,12 @@ ScTPValidationHelp::~ScTPValidationHelp() void ScTPValidationHelp::Init() { - aTsbHelp.EnableTriState( FALSE ); + aTsbHelp.EnableTriState( false ); } //------------------------------------------------------------------------ -USHORT* ScTPValidationHelp::GetRanges() +sal_uInt16* ScTPValidationHelp::GetRanges() { return pValueRanges; } @@ -725,17 +725,17 @@ void ScTPValidationHelp::Reset( const SfxItemSet& rArgSet ) { const SfxPoolItem* pItem; - if ( rArgSet.GetItemState( FID_VALID_SHOWHELP, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_SHOWHELP, sal_True, &pItem ) == SFX_ITEM_SET ) aTsbHelp.SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK ); else aTsbHelp.SetState( STATE_NOCHECK ); - if ( rArgSet.GetItemState( FID_VALID_HELPTITLE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_HELPTITLE, sal_True, &pItem ) == SFX_ITEM_SET ) aEdtTitle.SetText( ((const SfxStringItem*)pItem)->GetValue() ); else aEdtTitle.SetText( EMPTY_STRING ); - if ( rArgSet.GetItemState( FID_VALID_HELPTEXT, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_HELPTEXT, sal_True, &pItem ) == SFX_ITEM_SET ) aEdInputHelp.SetText( ((const SfxStringItem*)pItem)->GetValue() ); else aEdInputHelp.SetText( EMPTY_STRING ); @@ -743,13 +743,13 @@ void ScTPValidationHelp::Reset( const SfxItemSet& rArgSet ) // ----------------------------------------------------------------------- -BOOL ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet ) { rArgSet.Put( SfxBoolItem( FID_VALID_SHOWHELP, aTsbHelp.GetState() == STATE_CHECK ) ); rArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, aEdtTitle.GetText() ) ); rArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, aEdInputHelp.GetText() ) ); - return TRUE; + return sal_True; } //======================================================================== @@ -792,14 +792,14 @@ void ScTPValidationError::Init() aBtnSearch.SetClickHdl( LINK( this, ScTPValidationError, ClickSearchHdl ) ); aLbAction.SelectEntryPos( 0 ); - aTsbShow.EnableTriState( FALSE ); + aTsbShow.EnableTriState( false ); SelectActionHdl( NULL ); } //------------------------------------------------------------------------ -USHORT* ScTPValidationError::GetRanges() +sal_uInt16* ScTPValidationError::GetRanges() { return pValueRanges; } @@ -818,22 +818,22 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet ) { const SfxPoolItem* pItem; - if ( rArgSet.GetItemState( FID_VALID_SHOWERR, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_SHOWERR, sal_True, &pItem ) == SFX_ITEM_SET ) aTsbShow.SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK ); else aTsbShow.SetState( STATE_CHECK ); // check by default - if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, sal_True, &pItem ) == SFX_ITEM_SET ) aLbAction.SelectEntryPos( ((const SfxAllEnumItem*)pItem)->GetValue() ); else aLbAction.SelectEntryPos( 0 ); - if ( rArgSet.GetItemState( FID_VALID_ERRTITLE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_ERRTITLE, sal_True, &pItem ) == SFX_ITEM_SET ) aEdtTitle.SetText( ((const SfxStringItem*)pItem)->GetValue() ); else aEdtTitle.SetText( EMPTY_STRING ); - if ( rArgSet.GetItemState( FID_VALID_ERRTEXT, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_ERRTEXT, sal_True, &pItem ) == SFX_ITEM_SET ) aEdError.SetText( ((const SfxStringItem*)pItem)->GetValue() ); else aEdError.SetText( EMPTY_STRING ); @@ -843,14 +843,14 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet ) // ----------------------------------------------------------------------- -BOOL ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) { rArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, aTsbShow.GetState() == STATE_CHECK ) ); rArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, aLbAction.GetSelectEntryPos() ) ); rArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aEdtTitle.GetText() ) ); rArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aEdError.GetText() ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -858,7 +858,7 @@ BOOL ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) IMPL_LINK( ScTPValidationError, SelectActionHdl, ListBox*, EMPTYARG ) { ScValidErrorStyle eStyle = (ScValidErrorStyle) aLbAction.GetSelectEntryPos(); - BOOL bMacro = ( eStyle == SC_VALERR_MACRO ); + sal_Bool bMacro = ( eStyle == SC_VALERR_MACRO ); aBtnSearch.Enable( bMacro ); aFtError.Enable( !bMacro ); @@ -894,13 +894,13 @@ bool ScValidationDlg::EnterRefStatus() if( !pTabViewShell ) return false; - USHORT nId = SLOTID; + sal_uInt16 nId = SLOTID; SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); if ( pWnd && pWnd->GetWindow()!= this ) pWnd = NULL; - SC_MOD()->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + SC_MOD()->SetRefDialog( nId, pWnd ? false : sal_True ); return true; } @@ -911,7 +911,7 @@ bool ScValidationDlg::LeaveRefStatus() if( !pTabViewShell ) return false; - USHORT nId = SLOTID; + sal_uInt16 nId = SLOTID; SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); if ( pViewFrm->GetChildWindow( nId ) ) { @@ -925,14 +925,14 @@ bool ScValidationDlg::SetupRefDlg() if ( m_bOwnRefHdlr ) return false; if( EnterRefMode() ) { - SetModal( FALSE ); + SetModal( false ); return m_bOwnRefHdlr = true && EnterRefStatus(); } return false; } -bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ ) +bool ScValidationDlg::RemoveRefDlg( sal_Bool bRestoreModal /* = sal_True */ ) { bool bVisLock = false; bool bFreeWindowLock = false; @@ -953,7 +953,7 @@ bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ ) m_bOwnRefHdlr = false; if( bRestoreModal ) - SetModal( TRUE ); + SetModal( sal_True ); } if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame()->GetChildWindow( SID_VALIDITY_REFERENCE ) ) @@ -979,14 +979,14 @@ void ScTPValidationValue::OnClick( Button *pBtn ) SetupRefDlg(); } -BOOL ScValidationDlg::IsChildFocus() +sal_Bool ScValidationDlg::IsChildFocus() { if ( const Window *pWin = Application::GetFocusWindow() ) while( NULL != ( pWin = pWin->GetParent() ) ) if( pWin == this ) - return TRUE; + return sal_True; - return FALSE; + return false; } diff --git a/sc/source/ui/dbgui/validate.src b/sc/source/ui/dbgui/validate.src index d65ca290e..cfbd5b757 100644 --- a/sc/source/ui/dbgui/validate.src +++ b/sc/source/ui/dbgui/validate.src @@ -66,6 +66,7 @@ TabDialog TAB_DLG_VALIDATION TabPage TP_VALIDATION_VALUES { + HelpID = "sc:TabPage:TP_VALIDATION_VALUES"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; @@ -78,6 +79,7 @@ TabPage TP_VALIDATION_VALUES }; ListBox LB_ALLOW { + HelpID = "sc:ListBox:TP_VALIDATION_VALUES:LB_ALLOW"; Border = TRUE ; Pos = MAP_APPFONT ( 80 - OFFSET_X , 14 ) ; Size = MAP_APPFONT ( 90 , 80 ) ; @@ -103,6 +105,7 @@ TabPage TP_VALIDATION_VALUES }; ListBox LB_VALUE { + HelpID = "sc:ListBox:TP_VALIDATION_VALUES:LB_VALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 80 - OFFSET_X , 56 ) ; Size = MAP_APPFONT ( 90 , 90 ) ; @@ -129,6 +132,7 @@ TabPage TP_VALIDATION_VALUES }; Edit EDT_MIN { + HelpID = "sc:Edit:TP_VALIDATION_VALUES:EDT_MIN"; Border = TRUE ; Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; @@ -136,6 +140,7 @@ TabPage TP_VALIDATION_VALUES }; MultiLineEdit EDT_LIST { + HelpID = "sc:MultiLineEdit:TP_VALIDATION_VALUES:EDT_LIST"; Border = TRUE ; Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ; Size = MAP_APPFONT ( 174 + OFFSET_X , 105 ) ; @@ -150,6 +155,7 @@ TabPage TP_VALIDATION_VALUES }; Edit EDT_MAX { + HelpID = "sc:Edit:TP_VALIDATION_VALUES:EDT_MAX"; Border = TRUE ; Pos = MAP_APPFONT ( 80 - OFFSET_X , 90 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; @@ -185,6 +191,7 @@ TabPage TP_VALIDATION_VALUES }; ImageButton RB_VALIDITY_REF { + HelpID = "sc:ImageButton:TP_VALIDATION_VALUES:RB_VALIDITY_REF"; Pos = MAP_APPFONT ( 142 , 73 ) ; Size = MAP_APPFONT ( 13 , 14 ) ; TabStop = TRUE ; @@ -194,12 +201,14 @@ TabPage TP_VALIDATION_VALUES TabPage TP_VALIDATION_INPUTHELP { + HelpID = "sc:TabPage:TP_VALIDATION_INPUTHELP"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; Text = "Eingabehilfe" ; TriStateBox TSB_HELP { + HelpID = "sc:TriStateBox:TP_VALIDATION_INPUTHELP:TSB_HELP"; Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 248 , 10 ) ; TabStop = TRUE ; @@ -225,6 +234,7 @@ TabPage TP_VALIDATION_INPUTHELP }; Edit EDT_TITLE { + HelpID = "sc:Edit:TP_VALIDATION_INPUTHELP:EDT_TITLE"; Border = TRUE ; Pos = MAP_APPFONT ( 80 , 33 ) ; Size = MAP_APPFONT ( 171 , 12 ) ; @@ -232,6 +242,7 @@ TabPage TP_VALIDATION_INPUTHELP }; MultiLineEdit EDT_INPUTHELP { + HelpID = "sc:MultiLineEdit:TP_VALIDATION_INPUTHELP:EDT_INPUTHELP"; Border = TRUE ; Pos = MAP_APPFONT ( 80 , 51 ) ; Size = MAP_APPFONT ( 171 , 128 ) ; @@ -243,6 +254,7 @@ TabPage TP_VALIDATION_INPUTHELP TabPage TP_VALIDATION_ERROR { + HelpID = "sc:TabPage:TP_VALIDATION_ERROR"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; @@ -254,6 +266,7 @@ TabPage TP_VALIDATION_ERROR }; TriStateBox TSB_SHOW { + HelpID = "sc:TriStateBox:TP_VALIDATION_ERROR:TSB_SHOW"; Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 248 , 10 ) ; TabStop = TRUE ; @@ -261,6 +274,7 @@ TabPage TP_VALIDATION_ERROR }; MultiLineEdit EDT_ERROR { + HelpID = "sc:MultiLineEdit:TP_VALIDATION_ERROR:EDT_ERROR"; Border = TRUE ; Pos = MAP_APPFONT ( 80 , 69 ) ; Size = MAP_APPFONT ( 171 , 110 ) ; @@ -270,6 +284,7 @@ TabPage TP_VALIDATION_ERROR }; Edit EDT_TITLE { + HelpID = "sc:Edit:TP_VALIDATION_ERROR:EDT_TITLE"; Border = TRUE ; Pos = MAP_APPFONT ( 80 , 51 ) ; Size = MAP_APPFONT ( 171 , 12 ) ; @@ -295,6 +310,7 @@ TabPage TP_VALIDATION_ERROR }; ListBox LB_ACTION { + HelpID = "sc:ListBox:TP_VALIDATION_ERROR:LB_ACTION"; Border = TRUE ; Pos = MAP_APPFONT ( 80 , 33 ) ; Size = MAP_APPFONT ( 107 , 76 ) ; @@ -311,6 +327,7 @@ TabPage TP_VALIDATION_ERROR }; PushButton BTN_SEARCH { + HelpID = "sc:PushButton:TP_VALIDATION_ERROR:BTN_SEARCH"; Pos = MAP_APPFONT ( 191 , 32 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; TabStop = TRUE ; |