diff options
Diffstat (limited to 'sw/source/ui/dbui/dbinsdlg.cxx')
-rw-r--r-- | sw/source/ui/dbui/dbinsdlg.cxx | 210 |
1 files changed, 105 insertions, 105 deletions
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 9e62f7a4de36..64a3e3f455a0 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -136,7 +136,7 @@ struct _DB_Column union { String* pText; SwField* pField; - ULONG nFormat; + sal_uLong nFormat; } DB_ColumnData; const SwInsDBColumn* pColInfo; @@ -154,7 +154,7 @@ struct _DB_Column eColType = DB_FILLTEXT; } - _DB_Column( const SwInsDBColumn& rInfo, ULONG nFormat ) + _DB_Column( const SwInsDBColumn& rInfo, sal_uLong nFormat ) { pColInfo = &rInfo; DB_ColumnData.nFormat = nFormat; @@ -193,15 +193,15 @@ struct _DB_ColumnConfigData { SwInsDBColumns aDBColumns; rtl::OUString sSource, sTable, sEdit, sTblList, sTmplNm, sTAutoFmtNm; - BOOL bIsTable : 1, + sal_Bool bIsTable : 1, bIsField : 1, bIsHeadlineOn : 1, bIsEmptyHeadln : 1; _DB_ColumnConfigData() { - bIsTable = bIsHeadlineOn = TRUE; - bIsField = bIsEmptyHeadln = FALSE; + bIsTable = bIsHeadlineOn = sal_True; + bIsField = bIsEmptyHeadln = sal_False; } ~_DB_ColumnConfigData(); @@ -308,7 +308,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, long nCount = aColNames.getLength(); for (long n = 0; n < nCount; n++) { - SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (USHORT)n ); + SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (sal_uInt16)n ); Any aCol = xCols->getByName(pColNames[n]); Reference <XPropertySet> xCol; aCol >>= xCol; @@ -332,7 +332,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, case DataType::TIME: case DataType::TIMESTAMP: { - pNew->bHasFmt = TRUE; + pNew->bHasFmt = sal_True; Any aFormat = xCol->getPropertyValue(C2U("FormatKey")); if(aFormat.hasValue()) { @@ -397,16 +397,16 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, // steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein if( pView->GetWrtShell().GetTableFmt() ) { - aRbAsTable.Enable( FALSE ); - aRbAsField.Check( TRUE ); - aRbDbFmtFromDb.Check( TRUE ); + aRbAsTable.Enable( sal_False ); + aRbAsField.Check( sal_True ); + aRbDbFmtFromDb.Check( sal_True ); } else { - aRbAsTable.Check( TRUE ); - aRbDbFmtFromDb.Check( TRUE ); - aIbDbcolOneFrom.Enable( FALSE ); - aIbDbcolAllFrom.Enable( FALSE ); + aRbAsTable.Check( sal_True ); + aRbDbFmtFromDb.Check( sal_True ); + aIbDbcolOneFrom.Enable( sal_False ); + aIbDbcolAllFrom.Enable( sal_False ); } aRbAsTable.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl )); @@ -438,7 +438,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, aLbTblDbColumn.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl )); aLbTableCol.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl )); - for( USHORT n = 0; n < aDBColumns.Count(); ++n ) + for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n ) { const String& rS = aDBColumns[ n ]->sColumn; aLbTblDbColumn.InsertEntry( rS, n ); @@ -469,7 +469,7 @@ SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot() ---------------------------------------------------------------------------*/ IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton ) { - BOOL bShowTbl = pButton == &aRbAsTable; + sal_Bool bShowTbl = pButton == &aRbAsTable; String sTxt( pButton->GetText() ); aFlHead.SetText( MnemonicGenerator::EraseAllMnemonicChars( sTxt ) ); @@ -505,7 +505,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton ) ---------------------------------------------------------------------------*/ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) { - USHORT nFndPos; + sal_uInt16 nFndPos; ListBox& rBox = aRbAsTable.IsChecked() ? ( 0 == aLbTableCol.GetEntryData( 0 ) ? aLbTblDbColumn @@ -515,7 +515,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) SwInsDBColumn aSrch( rBox.GetSelectEntry(), 0 ); aDBColumns.Seek_Entry( &aSrch, &nFndPos ); - BOOL bFromDB = &aRbDbFmtFromDb == pButton; + sal_Bool bFromDB = &aRbDbFmtFromDb == pButton; aDBColumns[ nFndPos ]->bIsDBFmt = bFromDB; aLbDbFmtFromUsr.Enable( !bFromDB ); @@ -526,15 +526,15 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) ---------------------------------------------------------------------------*/ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) { - BOOL bChgEnable = TRUE, bEnableTo = TRUE, bEnableFrom = TRUE; - aLbTblDbColumn.SetUpdateMode( FALSE ); - aLbTableCol.SetUpdateMode( FALSE ); + sal_Bool bChgEnable = sal_True, bEnableTo = sal_True, bEnableFrom = sal_True; + aLbTblDbColumn.SetUpdateMode( sal_False ); + aLbTableCol.SetUpdateMode( sal_False ); if( pButton == &aIbDbcolAllTo ) { - bEnableTo = FALSE; + bEnableTo = sal_False; - USHORT n, nInsPos = aLbTableCol.GetSelectEntryPos(), + sal_uInt16 n, nInsPos = aLbTableCol.GetSelectEntryPos(), nCnt = aLbTblDbColumn.GetEntryCount(); if( LISTBOX_APPEND == nInsPos ) for( n = 0; n < nCnt; ++n ) @@ -550,7 +550,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) else if( pButton == &aIbDbcolOneTo && LISTBOX_ENTRY_NOTFOUND != aLbTblDbColumn.GetSelectEntryPos() ) { - USHORT nInsPos = aLbTableCol.GetSelectEntryPos(), + sal_uInt16 nInsPos = aLbTableCol.GetSelectEntryPos(), nDelPos = aLbTblDbColumn.GetSelectEntryPos(), nTopPos = aLbTblDbColumn.GetTopEntry(); aLbTableCol.InsertEntry( aLbTblDbColumn.GetEntry( nDelPos ), nInsPos ); @@ -568,7 +568,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) { if( LISTBOX_ENTRY_NOTFOUND != aLbTableCol.GetSelectEntryPos() ) { - USHORT nFndPos, nInsPos, + sal_uInt16 nFndPos, nInsPos, nDelPos = aLbTableCol.GetSelectEntryPos(), nTopPos = aLbTableCol.GetTopEntry(); @@ -605,24 +605,24 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) } else if( pButton == &aIbDbcolAllFrom ) { - bEnableFrom = FALSE; + bEnableFrom = sal_False; aLbTblDbColumn.Clear(); aLbTableCol.Clear(); - for( USHORT n = 0; n < aDBColumns.Count(); ++n ) + for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n ) aLbTblDbColumn.InsertEntry( aDBColumns[ n ]->sColumn, n ); aLbTblDbColumn.SelectEntryPos( 0 ); } else if( pButton == &aIbDbcolToEdit ) { - bChgEnable = FALSE; + bChgEnable = sal_False; // Daten ins Edit moven: String aFld( aLbTxtDbColumn.GetSelectEntry() ); if( aFld.Len() ) { String aStr( aEdDbText.GetText() ); - USHORT nPos = (USHORT)aEdDbText.GetSelection().Min(); - USHORT nSel = USHORT(aEdDbText.GetSelection().Max()) - nPos; + sal_uInt16 nPos = (sal_uInt16)aEdDbText.GetSelection().Min(); + sal_uInt16 nSel = sal_uInt16(aEdDbText.GetSelection().Max()) - nPos; if( nSel ) // dann loesche erstmal die bestehende Selektion aStr.Erase( nPos, nSel ); @@ -659,14 +659,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) aIbDbcolOneFrom.Enable( bEnableFrom ); aIbDbcolAllFrom.Enable( bEnableFrom ); - aRbDbFmtFromDb.Enable( FALSE ); - aRbDbFmtFromUsr.Enable( FALSE ); - aLbDbFmtFromUsr.Enable( FALSE ); + aRbDbFmtFromDb.Enable( sal_False ); + aRbDbFmtFromUsr.Enable( sal_False ); + aLbDbFmtFromUsr.Enable( sal_False ); aPbTblFormat.Enable( bEnableFrom ); } - aLbTblDbColumn.SetUpdateMode( TRUE ); - aLbTableCol.SetUpdateMode( TRUE ); + aLbTblDbColumn.SetUpdateMode( sal_True ); + aLbTableCol.SetUpdateMode( sal_True ); return 0; } @@ -694,10 +694,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox ) IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) { SwWrtShell& rSh = pView->GetWrtShell(); - BOOL bNewSet = FALSE; + sal_Bool bNewSet = sal_False; if( !pTblSet ) { - bNewSet = TRUE; + bNewSet = sal_True; pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() ); //Ersteinmal die einfachen Attribute besorgen. @@ -714,19 +714,19 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); // Tabellenvariante, wenn mehrere Tabellenzellen selektiert - aBoxInfo.SetTable( TRUE ); + aBoxInfo.SetTable( sal_True ); // Abstandsfeld immer anzeigen - aBoxInfo.SetDist( TRUE); + aBoxInfo.SetDist( sal_True); // Minimalgroesse in Tabellen und Absaetzen setzen - aBoxInfo.SetMinDist( FALSE ); + aBoxInfo.SetMinDist( sal_False ); // Default-Abstand immer setzen aBoxInfo.SetDefDist( MIN_BORDER_DIST ); // Einzelne Linien koennen nur in Tabellen DontCare-Status haben - aBoxInfo.SetValid( VALID_DISABLE, TRUE ); + aBoxInfo.SetValid( VALID_DISABLE, sal_True ); pTblSet->Put( aBoxInfo ); SwGetCurColNumPara aPara; - const USHORT nNum = rSh.GetCurColNum( &aPara ); + const sal_uInt16 nNum = rSh.GetCurColNum( &aPara ); long nWidth; if( nNum ) @@ -739,11 +739,11 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) long nWidth1 = 0, nStart1 = 0, nEnd1 = nWidth; - for( USHORT i = 0; i < nNum; ++i ) + for( sal_uInt16 i = 0; i < nNum; ++i ) { SwColumn* pCol = rCols[i]; nStart1 = pCol->GetLeft() + nWidth1; - nWidth1 += (long)rCol.CalcColWidth( i, (USHORT)nWidth ); + nWidth1 += (long)rCol.CalcColWidth( i, (sal_uInt16)nWidth ); nEnd1 = nWidth1 - pCol->GetRight(); } if(nStart1 || nEnd1 != nWidth) @@ -751,14 +751,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) } else nWidth = rSh.GetAnyCurRect( - FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, TRUE ) + FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, sal_True ) ? RECT_FLY_PRT_EMBEDDED : RECT_PAGE_PRT ).Width(); SwTabCols aTabCols; aTabCols.SetRight( nWidth ); aTabCols.SetRightMax( nWidth ); - pRep = new SwTableRep( aTabCols, FALSE ); + pRep = new SwTableRep( aTabCols, sal_False ); pRep->SetAlign( text::HoriOrientation::NONE ); pRep->SetSpace( nWidth ); pRep->SetWidth( nWidth ); @@ -774,18 +774,18 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) // Anzahl der Spalten hat sich geaendert: dann muessen die // TabCols angepasst werden long nWidth = pRep->GetWidth(); - USHORT nCols = aLbTableCol.GetEntryCount() - 1; + sal_uInt16 nCols = aLbTableCol.GetEntryCount() - 1; SwTabCols aTabCols( nCols ); aTabCols.SetRight( nWidth ); aTabCols.SetRightMax( nWidth ); if( nCols ) - for( USHORT n = 0, nStep = (USHORT)(nWidth / (nCols+1)), nW = nStep; + for( sal_uInt16 n = 0, nStep = (sal_uInt16)(nWidth / (nCols+1)), nW = nStep; n < nCols; ++n, nW = nW + nStep ) { - aTabCols.Insert( nW, FALSE, n ); + aTabCols.Insert( nW, sal_False, n ); } delete pRep; - pRep = new SwTableRep( aTabCols, FALSE ); + pRep = new SwTableRep( aTabCols, sal_False ); pRep->SetAlign( text::HoriOrientation::NONE ); pRep->SetSpace( nWidth ); pRep->SetWidth( nWidth ); @@ -817,7 +817,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton ) SwAbstractDialogFactory* pFact = swui::GetFactory(); DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt); + AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFmtOfIndex( pTAutoFmt ); @@ -837,7 +837,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) : &aLbTxtDbColumn ) : pBox; - USHORT nFndPos; + sal_uInt16 nFndPos; SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 ); aDBColumns.Seek_Entry( &aSrch, &nFndPos ); @@ -856,13 +856,13 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) String sTxt( aFlFormat.GetText().Copy( 0, nGBFmtLen )); if( !aSrch.sColumn.getLength() ) { - aRbDbFmtFromDb.Enable( FALSE ); - aRbDbFmtFromUsr.Enable( FALSE ); - aLbDbFmtFromUsr.Enable( FALSE ); + aRbDbFmtFromDb.Enable( sal_False ); + aRbDbFmtFromUsr.Enable( sal_False ); + aLbDbFmtFromUsr.Enable( sal_False ); } else { - BOOL bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt; + sal_Bool bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt; aRbDbFmtFromDb.Enable( bEnableFmt ); aRbDbFmtFromUsr.Enable( bEnableFmt ); @@ -871,7 +871,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) (( sTxt += C2S(" (" )) += String(aSrch.sColumn) ) += (sal_Unicode)')'; } - BOOL bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt; + sal_Bool bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt; aRbDbFmtFromDb.Check( bIsDBFmt ); aRbDbFmtFromUsr.Check( !bIsDBFmt ); aLbDbFmtFromUsr.Enable( !bIsDBFmt ); @@ -895,7 +895,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton ) { if( pButton == &aCbTableHeadon ) { - BOOL bEnable = aCbTableHeadon.IsChecked(); + sal_Bool bEnable = aCbTableHeadon.IsChecked(); aRbHeadlColnms.Enable( bEnable ); aRbHeadlEmpty.Enable( bEnable ); @@ -908,7 +908,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton ) static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr ) { _DB_Column* pNew; - USHORT nSttPos = 0, nFndPos; + sal_uInt16 nSttPos = 0, nFndPos; while( STRING_NOTFOUND != ( nFndPos = rTxt.Search( '\x0A', nSttPos )) ) { if( 1 < nFndPos ) @@ -929,16 +929,16 @@ static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr ) /* --------------------------------------------------------------------------- ---------------------------------------------------------------------------*/ -BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt, +sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, - BOOL bInsField ) + sal_Bool bInsField ) { // aus dem Text wieder die einzelnen Datenbank - Spalten erzeugen // und dann in einem Array speichern // Die Datenbankspalten stehen in <> und muessen im Array der Spalten // vorhanden sein: String sTxt( rTxt ); - USHORT nFndPos, nEndPos, nSttPos = 0; + sal_uInt16 nFndPos, nEndPos, nSttPos = 0; while( STRING_NOTFOUND != ( nFndPos = sTxt.Search( cDBFldStart, nSttPos ))) { @@ -964,8 +964,8 @@ BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt, sTxt.Erase( 0, (xub_StrLen)(rFndCol.sColumn.getLength() + 2) ); nSttPos = 0; - USHORT nSubType = 0; - ULONG nFormat; + sal_uInt16 nSubType = 0; + sal_uLong nFormat; if( rFndCol.bHasFmt ) { if( rFndCol.bIsDBFmt ) @@ -1016,7 +1016,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, SwWrtShell& rSh = pView->GetWrtShell(); //with the drag and drop interface no result set is initially available - BOOL bDisposeResultSet = FALSE; + sal_Bool bDisposeResultSet = sal_False; // we don't have a cursor, so we have to create our own RowSet if ( !xResultSet.is() ) { @@ -1029,11 +1029,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, return; rSh.StartAllAction(); - BOOL bUndo = rSh.DoesUndo(); + sal_Bool bUndo = rSh.DoesUndo(); if( bUndo ) rSh.StartUndo( UNDO_EMPTY ); - BOOL bAsTable = aRbAsTable.IsChecked(); + sal_Bool bAsTable = aRbAsTable.IsChecked(); SvNumberFormatter& rNumFmtr = *rSh.GetNumberFormatter(); if( rSh.HasSelection() ) @@ -1047,22 +1047,22 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, do{ // middle checked loop!! if( bAsTable ) // Daten als Tabelle einfuegen { - rSh.DoUndo( FALSE ); + rSh.DoUndo( sal_False ); - USHORT n, nRows = 0, nCols = aLbTableCol.GetEntryCount(); + sal_uInt16 n, nRows = 0, nCols = aLbTableCol.GetEntryCount(); if( aCbTableHeadon.IsChecked() ) nRows++; if( pSelection ) - nRows = nRows + (USHORT)rSelection.getLength(); + nRows = nRows + (sal_uInt16)rSelection.getLength(); else ++nRows; // bereite das Array fuer die ausgewaehlten Spalten auf - SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (BYTE)nCols : 255, 5 ); + SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (sal_uInt8)nCols : 255, 5 ); for( n = 0; n < nCols; ++n ) { - USHORT nFndPos; + sal_uInt16 nFndPos; SwInsDBColumn aSrch( aLbTableCol.GetEntry( n ), 0 ); if( aDBColumns.Seek_Entry( &aSrch, &nFndPos ) ) aColFlds.Insert( aDBColumns[ nFndPos ], n ); @@ -1085,7 +1085,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - BOOL bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON); + sal_Bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON); rSh.InsertTable( pModOpt->GetInsTblFlags(bHTML), nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFmt : 0) ); @@ -1096,8 +1096,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, SfxItemSet aTblSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE ); - BOOL bIsAutoUpdateCells = rSh.IsAutoUpdateCells(); - rSh.SetAutoUpdateCells( FALSE ); + sal_Bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells(); + rSh.SetAutoUpdateCells( sal_False ); if( aCbTableHeadon.IsChecked() ) @@ -1116,7 +1116,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, for( sal_Int32 i = 0 ; ; ++i ) { - BOOL bBreak = FALSE; + sal_Bool bBreak = sal_False; try { if(pSelection) @@ -1130,7 +1130,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } catch(const Exception& ) { - bBreak = TRUE; + bBreak = sal_True; } if(bBreak) break; @@ -1227,7 +1227,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, break; if( 10 == i ) - pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE )); + pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True )); } rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() ); @@ -1257,7 +1257,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, rSh.SwCrsrShell::Left(1,CRSR_SKIP_CHARS); } - rSh.DoUndo( FALSE ); + rSh.DoUndo( sal_False ); SwTxtFmtColl* pColl = 0; { @@ -1267,7 +1267,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, pColl = rSh.FindTxtFmtCollByName( sTmplNm ); if( !pColl ) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); if( USHRT_MAX != nId ) pColl = rSh.GetTxtCollFromPool( nId ); else @@ -1311,12 +1311,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, C2S("1"), aEmptyStr, aDBData ); - BOOL bSetCrsr = TRUE; - USHORT n = 0, nCols = aColArr.Count(); + sal_Bool bSetCrsr = sal_True; + sal_uInt16 n = 0, nCols = aColArr.Count(); ::sw::mark::IMark* pMark = NULL; for( sal_Int32 i = 0 ; ; ++i ) { - BOOL bBreak = FALSE; + sal_Bool bBreak = sal_False; try { if(pSelection) @@ -1330,7 +1330,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } catch(Exception&) { - bBreak = TRUE; + bBreak = sal_True; } if(bBreak) @@ -1384,7 +1384,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, if(aStandard != aCompare) nValue += (aStandard - aCompare); } - pFld->ChgValue( nValue, TRUE ); + pFld->ChgValue( nValue, sal_True ); } pFld->SetInitialized(); @@ -1439,13 +1439,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, // rSh.SwCrsrShell::MovePara( fnParaCurr, fnParaEnd ); rSh.SwCrsrShell::MovePara( GetfnParaCurr(), GetfnParaEnd() ); - bSetCrsr = FALSE; + bSetCrsr = sal_False; } } if( !pSelection ) { - BOOL bNext = xResultSet->next(); + sal_Bool bNext = xResultSet->next(); if(!bNext) break; } @@ -1459,7 +1459,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, rSh.SwEditShell::SplitNode(); if( 10 == i ) - pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE )); + pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True )); } if( !bSetCrsr && pMark != NULL) @@ -1473,11 +1473,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } // write configuration Commit(); - }while( FALSE ); // middle checked loop + }while( sal_False ); // middle checked loop if( bUndo ) { - rSh.DoUndo( TRUE ); + rSh.DoUndo( sal_True ); rSh.AppendUndoForInsertFromDB( bAsTable ); rSh.EndUndo( UNDO_EMPTY ); } @@ -1511,15 +1511,15 @@ void SwInsertDBColAutoPilot::SetTabSet() { // die Defaults wieder entfernen, es macht keinen Sinn sie zu setzen SvxBrushItem aBrush( RES_BACKGROUND ); - static USHORT __READONLY_DATA aIds[3] = + static sal_uInt16 __READONLY_DATA aIds[3] = { RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE }; for( int i = 0; i < 3; ++i ) if( SFX_ITEM_SET == pTblSet->GetItemState( aIds[ i ], - FALSE, &pItem ) && *pItem == aBrush ) + sal_False, &pItem ) && *pItem == aBrush ) pTblSet->ClearItem( aIds[ i ] ); } - if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, FALSE, + if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem ) && ((const SfxStringItem*)pItem)->GetValue() == rSh.GetTableFmt()->GetName() ) pTblSet->ClearItem( FN_PARAM_TABLE_NAME ); @@ -1672,7 +1672,7 @@ void SwInsertDBColAutoPilot::Commit() pValues[3].Value <<= rtl::OUString(aEdDbText.GetText()); String sTmp; - for( USHORT n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n ) + for( sal_uInt16 n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n ) ( sTmp += aLbTableCol.GetEntry( n ) ) += '\x0a'; if( sTmp.Len() ) @@ -1706,7 +1706,7 @@ void SwInsertDBColAutoPilot::Commit() rtl::OUString sPrevLang; SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter(); - for(USHORT nCol = 0; nCol < aDBColumns.Count(); nCol++) + for(sal_uInt16 nCol = 0; nCol < aDBColumns.Count(); nCol++) { rtl::OUString sColumnNode = sNewNode; SwInsDBColumn* pColumn = aDBColumns[nCol]; @@ -1817,7 +1817,7 @@ void SwInsertDBColAutoPilot::Load() sal_Bool bFound = sal_False; for(sal_Int32 nRealColumn = 0; nRealColumn < aDBColumns.Count(); nRealColumn++) { - if(aDBColumns[(USHORT)nRealColumn]->sColumn == sColumn) + if(aDBColumns[(sal_uInt16)nRealColumn]->sColumn == sColumn) { bFound = sal_True; break; @@ -1849,7 +1849,7 @@ void SwInsertDBColAutoPilot::Load() pNewData->aDBColumns.Insert(pInsDBColumn); } - USHORT n = 0; + sal_uInt16 n = 0; String sTmp( pNewData->sTblList ); if( sTmp.Len() ) { @@ -1865,11 +1865,11 @@ void SwInsertDBColAutoPilot::Load() if( !aLbTblDbColumn.GetEntryCount() ) { - aIbDbcolAllTo.Enable( FALSE ); - aIbDbcolOneTo.Enable( FALSE ); + aIbDbcolAllTo.Enable( sal_False ); + aIbDbcolOneTo.Enable( sal_False ); } - aIbDbcolOneFrom.Enable( TRUE ); - aIbDbcolAllFrom.Enable( TRUE ); + aIbDbcolOneFrom.Enable( sal_True ); + aIbDbcolAllFrom.Enable( sal_True ); } aEdDbText.SetText( pNewData->sEdit ); @@ -1887,7 +1887,7 @@ void SwInsertDBColAutoPilot::Load() // dann erstmal die AutoFmt-Datei laden und das Autoformat suchen SwTableAutoFmtTbl aAutoFmtTbl; aAutoFmtTbl.Load(); - for( USHORT nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; ) + for( sal_uInt16 nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; ) if( sTmp == aAutoFmtTbl[ --nAutoFmt ]->GetName() ) { pTAutoFmt = new SwTableAutoFmt( *aAutoFmtTbl[ nAutoFmt ] ); @@ -1909,14 +1909,14 @@ void SwInsertDBColAutoPilot::Load() for( n = 0; n < aDBColumns.Count() ; ++n ) { SwInsDBColumn& rSet = *aDBColumns[ n ]; - for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m ) + for( sal_uInt16 m = 0; m < pNewData->aDBColumns.Count() ; ++m ) { SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ]; if(rGet.sColumn == rSet.sColumn) { if( rGet.bHasFmt && !rGet.bIsDBFmt ) { - rSet.bIsDBFmt = FALSE; + rSet.bIsDBFmt = sal_False; rSet.nUsrNumFmt = rNFmtr.GetEntryKey( rGet.sUsrNumFmt, rGet.eUsrNumFmtLng ); if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt ) @@ -1936,7 +1936,7 @@ void SwInsertDBColAutoPilot::Load() // steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein if( !aRbAsTable.IsEnabled() && aRbAsTable.IsChecked() ) - aRbAsField.Check( TRUE ); + aRbAsField.Check( sal_True ); delete pNewData; break; } |