summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui/dbinsdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/dbui/dbinsdlg.cxx')
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx210
1 files changed, 105 insertions, 105 deletions
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 10080cd67c0b..cc95708888dc 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();
@@ -304,7 +304,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;
@@ -328,7 +328,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())
{
@@ -393,16 +393,16 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
// when the cursor is inside of a table, table must NEVER be selectable
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 ));
@@ -434,7 +434,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 );
@@ -460,7 +460,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 ) );
@@ -494,7 +494,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
@@ -504,7 +504,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 );
@@ -513,15 +513,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 )
@@ -537,7 +537,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 );
@@ -555,7 +555,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();
@@ -592,24 +592,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;
// move data to Edit:
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 )
// first delete the existing selection
aStr.Erase( nPos, nSel );
@@ -646,14 +646,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;
}
@@ -677,10 +677,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() );
// At first acquire the simple attributes
@@ -697,19 +697,19 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
// table variant, when multiple table cells are selected
- aBoxInfo.SetTable( TRUE );
+ aBoxInfo.SetTable( sal_True );
// always show gap field
- aBoxInfo.SetDist( TRUE);
+ aBoxInfo.SetDist( sal_True);
// set minimum size in tables and paragraphs
- aBoxInfo.SetMinDist( FALSE );
+ aBoxInfo.SetMinDist( sal_False );
// always set default-gap
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
// Single lines can have DontCare-status only in tables
- 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 )
@@ -722,11 +722,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)
@@ -734,14 +734,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 );
@@ -756,18 +756,18 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
{
// Number of columns has changed: then the TabCols have to be adjusted
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 );
@@ -797,7 +797,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
OSL_ENSURE(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);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
@@ -815,7 +815,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
: &aLbTxtDbColumn )
: pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 );
aDBColumns.Seek_Entry( &aSrch, &nFndPos );
@@ -834,13 +834,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 );
@@ -849,7 +849,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 );
@@ -871,7 +871,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 );
@@ -882,7 +882,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 )
@@ -901,15 +901,15 @@ 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 )
{
// create each of the database columns from the text again
// and then save in an array
// database columns are in <> and must be present in the columns' array:
String sTxt( rTxt );
- USHORT nFndPos, nEndPos, nSttPos = 0;
+ sal_uInt16 nFndPos, nEndPos, nSttPos = 0;
while( STRING_NOTFOUND != ( nFndPos = sTxt.Search( cDBFldStart, nSttPos )))
{
@@ -935,8 +935,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 )
@@ -985,7 +985,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() )
{
@@ -998,11 +998,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() )
@@ -1016,22 +1016,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;
// prepare the array for the selected columns
- 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 );
@@ -1054,7 +1054,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) );
@@ -1065,8 +1065,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() )
@@ -1085,7 +1085,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)
@@ -1099,7 +1099,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
catch(const Exception& )
{
- bBreak = TRUE;
+ bBreak = sal_True;
}
if(bBreak)
break;
@@ -1198,7 +1198,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() );
@@ -1228,7 +1228,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;
{
@@ -1238,7 +1238,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
@@ -1282,12 +1282,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)
@@ -1301,7 +1301,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
catch(Exception&)
{
- bBreak = TRUE;
+ bBreak = sal_True;
}
if(bBreak)
@@ -1355,7 +1355,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();
@@ -1408,13 +1408,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK );
rSh.SwCrsrShell::MovePara(
GetfnParaCurr(), GetfnParaEnd() );
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
}
}
if( !pSelection )
{
- BOOL bNext = xResultSet->next();
+ sal_Bool bNext = xResultSet->next();
if(!bNext)
break;
}
@@ -1428,7 +1428,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)
@@ -1442,11 +1442,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 );
}
@@ -1481,15 +1481,15 @@ void SwInsertDBColAutoPilot::SetTabSet()
{
// remove the defaults again, it makes no sense to set them
SvxBrushItem aBrush( RES_BACKGROUND );
- static USHORT const aIds[3] =
+ static sal_uInt16 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 );
@@ -1630,7 +1630,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() )
@@ -1664,7 +1664,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];
@@ -1773,7 +1773,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;
@@ -1804,7 +1804,7 @@ void SwInsertDBColAutoPilot::Load()
pNewData->aDBColumns.Insert(pInsDBColumn);
}
- USHORT n = 0;
+ sal_uInt16 n = 0;
String sTmp( pNewData->sTblList );
if( sTmp.Len() )
{
@@ -1820,11 +1820,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 );
@@ -1842,7 +1842,7 @@ void SwInsertDBColAutoPilot::Load()
// then load the AutoFmt file and look for Autoformat first
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 ] );
@@ -1864,14 +1864,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 )
@@ -1891,7 +1891,7 @@ void SwInsertDBColAutoPilot::Load()
// when the cursor is inside of a table, table must NEVER be selectable
if( !aRbAsTable.IsEnabled() && aRbAsTable.IsChecked() )
- aRbAsField.Check( TRUE );
+ aRbAsField.Check( sal_True );
delete pNewData;
break;
}