summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/dbui')
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx8
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx18
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx16
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx210
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx305
-rw-r--r--sw/source/ui/dbui/dbtree.cxx32
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx4
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx8
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx64
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx12
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx20
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx20
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx32
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/dbui/swdbtoolsclient.cxx4
17 files changed, 383 insertions, 376 deletions
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 4ddc467655..96a75cfb38 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -236,7 +236,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
DBG_ASSERT(m_xDBContext.is(), "service 'com.sun.star.sdb.DatabaseContext' not found!");
sal_Bool bEnableEdit = sal_False;
sal_Bool bEnableOK = sal_True;
- m_aListLB.SelectAll( FALSE );
+ m_aListLB.SelectAll( sal_False );
if(m_xDBContext.is())
{
@@ -461,7 +461,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
pUserData->sURL = sURL;
m_pCreatedDataSource->SetUserData(pUserData);
m_aListLB.Select(m_pCreatedDataSource);
- m_aCreateListPB.Enable(FALSE);
+ m_aCreateListPB.Enable(sal_False);
}
catch(Exception& )
@@ -531,7 +531,7 @@ IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*,
pThis->m_aListLB.SetEntryText(pThis->m_sConnecting, pSelect, ITEMID_TABLE - 1);
// allow painting of the new entry
pThis->m_aListLB.Window::Invalidate(INVALIDATE_UPDATE);
- for (USHORT i = 0; i < 10; i++)
+ for (sal_uInt16 i = 0; i < 10; i++)
Application::Reschedule();
}
@@ -689,7 +689,7 @@ IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, OKHdl_Impl, PushButton*, EMPTYARG)
{
- EndDialog(TRUE);
+ EndDialog(sal_True);
return 0;
}
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 2d0c1d0a00..f1f995cfa1 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -223,11 +223,11 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
if(nContentHeight < m_aScrollBar.GetSizePixel().Height())
{
nContentHeight = m_aScrollBar.GetSizePixel().Height();
- m_aScrollBar.Enable(FALSE);
+ m_aScrollBar.Enable(sal_False);
}
else
{
- m_aScrollBar.Enable(TRUE);
+ m_aScrollBar.Enable(sal_True);
m_aScrollBar.SetRange(Range(0, nLines));
m_aScrollBar.SetThumbPos(0);
m_aScrollBar.SetVisibleSize(nVisibleLines);
@@ -366,7 +366,7 @@ long SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == EVENT_COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- USHORT nCmd = pCEvt->GetCommand();
+ sal_uInt16 nCmd = pCEvt->GetCommand();
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
@@ -428,7 +428,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
if(m_sURL.Len())
{
//file exists, has to be loaded here
- SfxMedium aMedium( m_sURL, STREAM_READ, TRUE );
+ SfxMedium aMedium( m_sURL, STREAM_READ, sal_True );
SvStream* pStream = aMedium.GetInStream();
if(pStream)
{
@@ -442,7 +442,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
OUString sMiddle(sTempMiddle);
String sLine;
- BOOL bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
+ sal_Bool bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
if(bRead)
{
@@ -487,7 +487,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
//database has to be created
const ResStringArray& rAddressHeader = rConfig.GetDefaultAddressHeaders();
sal_uInt32 nCount = rAddressHeader.Count();
- for(USHORT nHeader = 0; nHeader < nCount; ++nHeader)
+ for(sal_uInt16 nHeader = 0; nHeader < nCount; ++nHeader)
m_pCSVData->aDBColumnHeaders.push_back( rAddressHeader.GetString(nHeader));
::std::vector<OUString> aNewData;
String sTemp;
@@ -545,7 +545,7 @@ IMPL_LINK(SwCreateAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
// if only one set is available then clear the data
String sTemp;
m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), sTemp);
- m_aDeletePB.Enable(FALSE);
+ m_aDeletePB.Enable(sal_False);
}
m_pAddressControl->SetCurrentDataSet(nCurrent);
m_aSetNoNF.SetMax(m_pCSVData->aDBData.size());
@@ -629,7 +629,7 @@ IMPL_LINK(SwCreateAddressListDialog, OkHdl_Impl, PushButton*, EMPTYARG)
}
if(m_sURL.Len())
{
- SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, TRUE );
+ SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, sal_True );
SvStream* pStream = aMedium.GetOutStream();
pStream->SetLineDelimiter( LINEEND_LF );
pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
@@ -830,6 +830,6 @@ IMPL_LINK(SwFindEntryDialog, FindEnableHdl_Impl, Edit*, EMPTYARG)
-----------------------------------------------------------------------*/
IMPL_LINK(SwFindEntryDialog, CloseHdl_Impl, PushButton*, EMPTYARG)
{
- Show(FALSE);
+ Show(sal_False);
return 0;
}
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index e1787da26d..adc71a69f7 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -107,7 +107,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl, ListBox*, EMPTYAR
IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
{
bool bRename = pButton == &m_aRenamePB;
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
@@ -152,7 +152,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
{
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
m_aFieldsLB.RemoveEntry(m_aFieldsLB.GetSelectEntryPos());
m_aFieldsLB.SelectEntryPos(nPos > m_aFieldsLB.GetEntryCount() - 1 ? nPos - 1 : nPos);
@@ -171,8 +171,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
-----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
{
- USHORT nPos;
- USHORT nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos;
+ sal_uInt16 nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos();
String aTemp = m_aFieldsLB.GetEntry(nPos);
m_aFieldsLB.RemoveEntry( nPos );
if(pButton == &m_aUpPB)
@@ -201,8 +201,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
void SwCustomizeAddressListDialog::UpdateButtons()
{
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
- USHORT nEntries = m_aFieldsLB.GetEntryCount();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nEntries = m_aFieldsLB.GetEntryCount();
m_aUpPB.Enable(nPos > 0 && nEntries > 0);
m_aDownPB.Enable(nPos < nEntries -1);
m_aDeletePB.Enable(nEntries > 0);
@@ -255,7 +255,7 @@ SwAddRenameEntryDialog::~SwAddRenameEntryDialog()
IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
{
::rtl::OUString sEntry = pEdit->GetText();
- BOOL bFound = sEntry.getLength() ? FALSE : TRUE;
+ sal_Bool bFound = sEntry.getLength() ? sal_False : sal_True;
if(!bFound)
{
@@ -265,7 +265,7 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
++aHeaderIter)
if(*aHeaderIter == sEntry)
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 42d4db33f0..a70d8b5226 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;
}
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index c93145a640..7b303d4850 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -277,9 +277,9 @@ void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<XDataSource> xSou
/* -----------------------------17.07.00 17:04--------------------------------
---------------------------------------------------------------------------*/
-BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
+sal_Bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
if(pParam->bScrollable)
@@ -299,7 +299,7 @@ BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
/* -----------------------------17.07.00 17:23--------------------------------
---------------------------------------------------------------------------*/
-BOOL lcl_GetColumnCnt(SwDSParam* pParam,
+sal_Bool lcl_GetColumnCnt(SwDSParam* pParam,
const String& rColumnName, long nLanguage, String& rResult, double* pNumber)
{
uno::Reference< XColumnsSupplier > xColsSupp( pParam->xResultSet, UNO_QUERY );
@@ -312,7 +312,7 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam,
{
}
if(!xCols.is() || !xCols->hasByName(rColumnName))
- return FALSE;
+ return sal_False;
Any aCol = xCols->getByName(rColumnName);
uno::Reference< XPropertySet > xColumnProps;
aCol >>= xColumnProps;
@@ -330,12 +330,12 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam,
MsLangId::convertLanguageToLocale( (LanguageType)nLanguage, aFormatData.aLocale );
rResult = SwNewDBMgr::GetDBField( xColumnProps, aFormatData, pNumber);
- return TRUE;
+ return sal_True;
};
/*--------------------------------------------------------------------
Beschreibung: Daten importieren
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
+sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
{
SetMergeType( rMergeDesc.nMergeType );
@@ -360,11 +360,11 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
if(!aData.sDataSource.getLength() || !aData.sCommand.getLength() || !xResSet.is())
{
- return FALSE;
+ return sal_False;
}
pImpl->pMergeData = new SwDSParam(aData, xResSet, aSelection);
- SwDSParam* pTemp = FindDSData(aData, FALSE);
+ SwDSParam* pTemp = FindDSData(aData, sal_False);
if(pTemp)
*pTemp = *pImpl->pMergeData;
else
@@ -374,7 +374,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
//DSData and set the correct CommandType
SwDBData aTempData(aData);
aData.nCommandType = -1;
- pTemp = FindDSData(aData, FALSE);
+ pTemp = FindDSData(aData, sal_False);
if(pTemp)
*pTemp = *pImpl->pMergeData;
else
@@ -405,7 +405,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
pImpl->pMergeData->bEndOfDB = !pImpl->pMergeData->xResultSet->absolute( nPos );
pImpl->pMergeData->CheckEndOfDB();
if(pImpl->pMergeData->nSelectionIndex >= pImpl->pMergeData->aSelection.getLength())
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
}
else
{
@@ -415,7 +415,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
}
catch(Exception&)
{
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
DBG_ERROR("exception in MergeNew()");
}
@@ -425,7 +425,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
lcl_InitNumberFormatter(*pImpl->pMergeData, xSource);
rMergeDesc.rSh.ChgDBData(aData);
- bInMerge = TRUE;
+ bInMerge = sal_True;
if (IsInitDBFields())
{
@@ -439,10 +439,10 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
sDBName += DB_DELIM;
sDBName += String::CreateFromInt32(aInsertData.nCommandType);
rMergeDesc.rSh.ChangeDBFields( aDBNames, sDBName);
- SetInitDBFields(FALSE);
+ SetInitDBFields(sal_False);
}
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch(rMergeDesc.nMergeType)
{
case DBMGR_MERGE:
@@ -473,16 +473,16 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::Merge(SwWrtShell* pSh)
+sal_Bool SwNewDBMgr::Merge(SwWrtShell* pSh)
{
pSh->StartAllAction();
- pSh->ViewShell::UpdateFlds(TRUE);
+ pSh->ViewShell::UpdateFlds(sal_True);
pSh->SetModified();
pSh->EndAllAction();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -495,8 +495,8 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
{
pSh->StartAllAction();
pSh->StartUndo(UNDO_EMPTY);
- BOOL bGroupUndo(pSh->DoesGroupUndo());
- pSh->DoGroupUndo(FALSE);
+ sal_Bool bGroupUndo(pSh->DoesGroupUndo());
+ pSh->DoGroupUndo(sal_False);
if( pSh->HasSelection() )
pSh->DelRight();
@@ -504,12 +504,12 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
SwWait *pWait = 0;
{
- ULONG i = 0;
+ sal_uLong i = 0;
do {
ImportDBEntry(pSh);
if( 10 == ++i )
- pWait = new SwWait( *pSh->GetView().GetDocShell(), TRUE);
+ pWait = new SwWait( *pSh->GetView().GetDocShell(), sal_True);
} while(ToNextMergeRecord());
}
@@ -525,10 +525,10 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
--------------------------------------------------*/
-String lcl_FindColumn(const String& sFormatStr,USHORT &nUsedPos, BYTE &nSeparator)
+String lcl_FindColumn(const String& sFormatStr,sal_uInt16 &nUsedPos, sal_uInt8 &nSeparator)
{
String sReturn;
- USHORT nLen = sFormatStr.Len();
+ sal_uInt16 nLen = sFormatStr.Len();
nSeparator = 0xff;
while(nUsedPos < nLen && nSeparator == 0xff)
{
@@ -566,13 +566,13 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY );
uno::Reference<XNameAccess> xCols = xColsSupp->getColumns();
String sFormatStr;
- USHORT nFmtLen = sFormatStr.Len();
+ sal_uInt16 nFmtLen = sFormatStr.Len();
if( nFmtLen )
{
const char cSpace = ' ';
const char cTab = '\t';
- USHORT nUsedPos = 0;
- BYTE nSeparator;
+ sal_uInt16 nUsedPos = 0;
+ sal_uInt8 nSeparator;
String sColumn = lcl_FindColumn(sFormatStr, nUsedPos, nSeparator);
while( sColumn.Len() )
{
@@ -631,19 +631,20 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
/*--------------------------------------------------------------------
Beschreibung: Listbox mit Tabellenliste fuellen
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
+sal_Bool SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sOldTableName(pListBox->GetSelectEntry());
pListBox->Clear();
- SwDSParam* pParam = FindDSConnection(rDBName, FALSE);
+ SwDSParam* pParam = FindDSConnection(rDBName, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
xConnection = pParam->xConnection;
else
{
rtl::OUString sDBName(rDBName);
- xConnection = RegisterConnection( sDBName );
+ if ( sDBName.getLength() )
+ xConnection = RegisterConnection( sDBName );
}
if(xConnection.is())
{
@@ -655,7 +656,7 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
const rtl::OUString* pTbls = aTbls.getConstArray();
for(long i = 0; i < aTbls.getLength(); i++)
{
- USHORT nEntry = pListBox->InsertEntry(pTbls[i]);
+ sal_uInt16 nEntry = pListBox->InsertEntry(pTbls[i]);
pListBox->SetEntryData(nEntry, (void*)0);
}
}
@@ -667,13 +668,13 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
const rtl::OUString* pQueries = aQueries.getConstArray();
for(long i = 0; i < aQueries.getLength(); i++)
{
- USHORT nEntry = pListBox->InsertEntry(pQueries[i]);
+ sal_uInt16 nEntry = pListBox->InsertEntry(pQueries[i]);
pListBox->SetEntryData(nEntry, (void*)1);
}
}
if (sOldTableName.Len())
pListBox->SelectEntry(sOldTableName);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -681,8 +682,8 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
/*--------------------------------------------------------------------
Beschreibung: Listbox mit Spaltennamen einer Datenbank fuellen
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
- const String& rDBName, const String& rTableName, BOOL bAppend)
+sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
+ const String& rDBName, const String& rTableName, sal_Bool bAppend)
{
if (!bAppend)
pListBox->Clear();
@@ -690,7 +691,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
xConnection = pParam->xConnection;
@@ -711,14 +712,14 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
::comphelper::disposeComponent( xColsSupp );
}
- return(TRUE);
+ return(sal_True);
}
/* -----------------------------08.06.01 15:11--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
+sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
uno::Reference< XConnection> xConnection,
- const String& rTableName, BOOL bAppend)
+ const String& rTableName, sal_Bool bAppend)
{
if (!bAppend)
pListBox->Clear();
@@ -734,7 +735,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
::comphelper::disposeComponent( xColsSupp );
}
- return(TRUE);
+ return(sal_True);
}
/*--------------------------------------------------------------------
@@ -743,10 +744,10 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
SwNewDBMgr::SwNewDBMgr() :
nMergeType(DBMGR_INSERT),
- bInitDBFields(FALSE),
- bInMerge(FALSE),
- bMergeSilent(FALSE),
- bMergeLock(FALSE),
+ bInitDBFields(sal_False),
+ bInMerge(sal_False),
+ bMergeSilent(sal_False),
+ bMergeLock(sal_False),
pImpl(new SwNewDBMgr_Impl(*this)),
pMergeEvtSrc(NULL)
{
@@ -756,7 +757,7 @@ SwNewDBMgr::SwNewDBMgr() :
---------------------------------------------------------------------------*/
SwNewDBMgr::~SwNewDBMgr()
{
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(pParam->xConnection.is())
@@ -779,7 +780,7 @@ SwNewDBMgr::~SwNewDBMgr()
/*--------------------------------------------------------------------
Beschreibung: Serienbriefe als einzelne Dokumente speichern
--------------------------------------------------------------------*/
-String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, ULONG nDocNo )
+String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, sal_uLong nDocNo )
{
do
{
@@ -792,7 +793,7 @@ String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageD
}
void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
{
- USHORT __FAR_DATA aRangeOfDefaults[] = {
+ sal_uInt16 __FAR_DATA aRangeOfDefaults[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -805,8 +806,8 @@ void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
SfxItemSet aNewDefaults( rTarget.GetAttrPool(), aRangeOfDefaults );
- USHORT nWhich;
- USHORT nRange = 0;
+ sal_uInt16 nWhich;
+ sal_uInt16 nRange = 0;
while( aRangeOfDefaults[nRange] != 0)
{
for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich )
@@ -824,7 +825,7 @@ void lcl_CopyFollowPageDesc(
SwWrtShell& rTargetShell,
const SwPageDesc& rSourcePageDesc,
const SwPageDesc& rTargetPageDesc,
- const ULONG nDocNo )
+ const sal_uLong nDocNo )
{
//now copy the follow page desc, too
const SwPageDesc* pFollowPageDesc = rSourcePageDesc.GetFollow();
@@ -846,8 +847,8 @@ void lcl_CopyFollowPageDesc(
void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell )
{
//reset all links of the sections of synchronized labels
- USHORT nSections = rWorkShell.GetSectionFmtCount();
- for( USHORT nSection = 0; nSection < nSections; ++nSection )
+ sal_uInt16 nSections = rWorkShell.GetSectionFmtCount();
+ for( sal_uInt16 nSection = 0; nSection < nSections; ++nSection )
{
SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() );
if( aSectionData.GetType() == FILE_LINK_SECTION )
@@ -860,13 +861,13 @@ void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell )
rWorkShell.SetLabelDoc( sal_False );
}
-BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
+sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
const SwMergeDescriptor& rMergeDescriptor)
{
//check if the doc is synchronized and contains at least one linked section
- BOOL bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
- BOOL bLoop = TRUE;
- BOOL bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
+ sal_Bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
+ sal_Bool bLoop = sal_True;
+ sal_Bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
const bool bAsSingleFile = rMergeDescriptor.nMergeType == DBMGR_MERGE_SINGLE_FILE;
::rtl::Reference< MailDispatcher > xMailDispatcher;
@@ -891,14 +892,14 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
uno::Reference< XPropertySet > xColumnProp;
{
- BOOL bColumnName = sEMailAddrFld.Len() > 0;
+ sal_Bool bColumnName = sEMailAddrFld.Len() > 0;
if (bColumnName)
{
uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY );
uno::Reference<XNameAccess> xCols = xColsSupp->getColumns();
if(!xCols->hasByName(sEMailAddrFld))
- return FALSE;
+ return sal_False;
Any aCol = xCols->getByName(sEMailAddrFld);
aCol >>= xColumnProp;
}
@@ -934,7 +935,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pStoreToFilterOptions = &rMergeDescriptor.sSaveToFilterOptions;
}
}
- bCancel = FALSE;
+ bCancel = sal_False;
// in case of creating a single resulting file this has to be created here
SwWrtShell* pTargetShell = 0;
@@ -947,7 +948,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
std::auto_ptr< utl::TempFile > aTempFile;
String sModifiedStartingPageDesc;
String sStartingPageDesc;
- USHORT nStartingPageNo = 0;
+ sal_uInt16 nStartingPageNo = 0;
bool bPageStylesWithHeaderFooter = false;
if(bAsSingleFile || rMergeDescriptor.bCreateSingleFile)
{
@@ -971,7 +972,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pTargetView->GetDocShell()->LoadStylesFromFile(
sSourceDocumentURL, aOpt, sal_True );
//determine the page style and number used at the start of the source document
- pSourceShell->SttEndDoc(TRUE);
+ pSourceShell->SttEndDoc(sal_True);
nStartingPageNo = pSourceShell->GetVirtPageNum();
sStartingPageDesc = sModifiedStartingPageDesc = pSourceShell->GetPageDesc(
pSourceShell->GetCurPageDesc()).GetName();
@@ -1001,10 +1002,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
while (pViewFrm)
{
- pViewFrm->GetDispatcher()->Lock(TRUE);
+ pViewFrm->GetDispatcher()->Lock(sal_True);
pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh);
}
- ULONG nDocNo = 1;
+ sal_uLong nDocNo = 1;
long nStartRow, nEndRow;
// collect temporary files
@@ -1050,8 +1051,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
if( !aTempFile->IsValid() )
{
ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED );
- bLoop = FALSE;
- bCancel = TRUE;
+ bLoop = sal_False;
+ bCancel = sal_True;
}
else
{
@@ -1063,13 +1064,13 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aPrtMonDlg.aPrintInfo.SetText(sStat);
// Rechenzeit fuer Save-Monitor:
- for (USHORT i = 0; i < 10; i++)
+ for (sal_uInt16 i = 0; i < 10; i++)
Application::Reschedule();
// Create and save new document
// The SfxObjectShell will be closed explicitly later but it is more safe to use SfxObjectShellLock here
SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
- SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, TRUE );
+ SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, sal_True );
pWorkMed->SetFilter( pSfxFlt );
if (xWorkDocSh->DoLoad(pWorkMed))
@@ -1111,10 +1112,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
}
// insert the document into the target document
- rWorkShell.SttEndDoc(FALSE);
- rWorkShell.SttEndDoc(TRUE);
+ rWorkShell.SttEndDoc(sal_False);
+ rWorkShell.SttEndDoc(sal_True);
rWorkShell.SelAll();
- pTargetShell->SwCrsrShell::SttEndDoc( FALSE );
+ pTargetShell->SwCrsrShell::SttEndDoc( sal_False );
//#i72517# the headers and footers are still those from the source - update in case of fields inside header/footer
if( !nDocNo && bPageStylesWithHeaderFooter )
pTargetShell->GetView().GetDocShell()->_LoadStyles( *rWorkShell.GetView().GetDocShell(), sal_True );
@@ -1168,7 +1169,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
String sFileURL = aTempFileURL.GetMainURL( INetURLObject::NO_DECODE );
SfxMedium* pDstMed = new SfxMedium(
sFileURL,
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pDstMed->SetFilter( pStoreToFilter );
if(pDstMed->GetItemSet())
{
@@ -1188,8 +1189,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
// error message ??
ErrorHandler::HandleError( xWorkDocSh->GetError() );
- bCancel = TRUE;
- bLoop = FALSE;
+ bCancel = sal_True;
+ bLoop = sal_False;
}
if( bEMail )
{
@@ -1226,7 +1227,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
{
//read in the temporary file and use it as mail body
- SfxMedium aMedium( sFileURL, STREAM_READ, TRUE);
+ SfxMedium aMedium( sFileURL, STREAM_READ, sal_True);
SvStream* pInStream = aMedium.GetInStream();
DBG_ASSERT(pInStream, "no output file created?");
if(pInStream)
@@ -1280,7 +1281,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
} while( !bCancel &&
(bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord()));
- aPrtMonDlg.Show( FALSE );
+ aPrtMonDlg.Show( sal_False );
// save the single output document
if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile)
@@ -1291,7 +1292,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL());
SfxMedium* pDstMed = new SfxMedium(
aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pDstMed->SetFilter( pStoreToFilter );
if(pDstMed->GetItemSet())
{
@@ -1307,7 +1308,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
// error message ??
ErrorHandler::HandleError( xTargetDocShell->GetError() );
- bLoop = FALSE;
+ bLoop = sal_False;
}
}
else if( pTargetView ) // must be available!
@@ -1334,7 +1335,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aOptions.realloc( nOpts + 1 );
aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" );
aOptions[ nOpts ].Value <<= sal_True ;
-// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) );
+// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, sal_True) );
// // #i52629# aynchronous printing should only be done in silent mode - otherwise
// // the printer dialog does not come up
// aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDescriptor.bPrintAsync ));
@@ -1376,7 +1377,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
while (pViewFrm)
{
- pViewFrm->GetDispatcher()->Lock(FALSE);
+ pViewFrm->GetDispatcher()->Lock(sal_False);
pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh);
}
@@ -1403,7 +1404,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
IMPL_LINK_INLINE_START( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
{
pButton->GetParent()->Hide();
- bCancel = TRUE;
+ bCancel = sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
@@ -1414,13 +1415,13 @@ IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
den uebergebenen Formatter uebertragen
--------------------------------------------------------------------*/
-ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
+sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName,
const String& rTableName,
const String& rColNm,
SvNumberFormatter* pNFmtr,
long nLanguage )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if(pNFmtr)
{
uno::Reference< XDataSource> xSource;
@@ -1442,7 +1443,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
if(pParam && pParam->xConnection.is())
{
xConnection = pParam->xConnection;
@@ -1496,14 +1497,14 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
/* -----------------------------07.06.01 15:43--------------------------------
---------------------------------------------------------------------------*/
-ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
+sal_uLong SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
uno::Reference< XConnection> xConnection,
uno::Reference< XPropertySet> xColumn,
SvNumberFormatter* pNFmtr,
long nLanguage )
{
//JP 12.01.99: ggfs. das NumberFormat im Doc setzen
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if(!xSource.is())
{
@@ -1590,7 +1591,7 @@ sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
uno::Reference< XConnection> xConnection;
uno::Reference< XColumnsSupplier > xColsSupp;
bool bDispose = false;
@@ -1654,7 +1655,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData
---------------------------------------------------------------------------*/
uno::Reference< sdbcx::XColumnsSupplier> SwNewDBMgr::GetColumnSupplier(uno::Reference<sdbc::XConnection> xConnection,
const String& rTableOrQuery,
- BYTE eTableOrQuery)
+ sal_uInt8 eTableOrQuery)
{
Reference< sdbcx::XColumnsSupplier> xRet;
try
@@ -1750,7 +1751,7 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
try
{
SwDbtoolsClient& aClient = SwNewDBMgr::GetDbtoolsClient();
- sRet = aClient.getValue(
+ sRet = aClient.getFormattedValue(
xColumnProps,
rDBFormatData.xFormatter,
rDBFormatData.aLocale,
@@ -1800,14 +1801,14 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
void SwNewDBMgr::EndMerge()
{
DBG_ASSERT(bInMerge, "merge is not active");
- bInMerge = FALSE;
+ bInMerge = sal_False;
delete pImpl->pMergeData;
pImpl->pMergeData = 0;
}
/* -----------------------------06.07.00 14:28--------------------------------
checks if a desired data source table or query is open
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
+sal_Bool SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
const String& rTableOrQuery, sal_Bool bMergeOnly)
{
if(pImpl->pMergeData)
@@ -1825,7 +1826,7 @@ BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
aData.sDataSource = rDataSource;
aData.sCommand = rTableOrQuery;
aData.nCommandType = -1;
- SwDSParam* pFound = FindDSData(aData, FALSE);
+ SwDSParam* pFound = FindDSData(aData, sal_False);
return (pFound && pFound->xResultSet.is());
}
return sal_False;
@@ -1833,12 +1834,12 @@ BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
/* -----------------------------17.07.00 16:44--------------------------------
read column data a a specified position
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
+sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId,
long nLanguage,
String& rResult, double* pNumber)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwDSParam* pFound = 0;
//check if it's the merge data source
if(pImpl->pMergeData &&
@@ -1853,7 +1854,7 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
aData.sDataSource = rSourceName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- pFound = FindDSData(aData, FALSE);
+ pFound = FindDSData(aData, sal_False);
}
//check validity of supplied record Id
if(pFound->aSelection.getLength())
@@ -1869,7 +1870,7 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
bFound = sal_True;
}
if(!bFound)
- return FALSE;
+ return sal_False;
}
if(pFound && pFound->xResultSet.is() && !pFound->bAfterSelection)
{
@@ -1880,10 +1881,10 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
}
catch(const Exception& )
{
- return FALSE;
+ return sal_False;
}
//position to the desired index
- BOOL bMove = TRUE;
+ sal_Bool bMove = sal_True;
if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) )
bMove = lcl_MoveAbsolute(pFound, nAbsRecordId);
if(bMove)
@@ -1898,22 +1899,22 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
/* -----------------------------06.07.00 16:47--------------------------------
reads the column data at the current position
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
+sal_Bool SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage,
String &rResult, double *pNumber, sal_uInt32 * /*pFormat*/)
{
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is() || pImpl->pMergeData->bAfterSelection )
{
rResult.Erase();
- return FALSE;
+ return sal_False;
}
- BOOL bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber);
+ sal_Bool bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber);
return bRet;
}
/* -----------------------------07.07.00 14:28--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ToNextMergeRecord()
+sal_Bool SwNewDBMgr::ToNextMergeRecord()
{
DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
return ToNextRecord(pImpl->pMergeData);
@@ -1921,7 +1922,7 @@ BOOL SwNewDBMgr::ToNextMergeRecord()
/* -----------------------------10.07.01 14:28--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ToNextRecord(
+sal_Bool SwNewDBMgr::ToNextRecord(
const String& rDataSource, const String& rCommand, sal_Int32 /*nCommandType*/)
{
SwDSParam* pFound = 0;
@@ -1935,22 +1936,22 @@ BOOL SwNewDBMgr::ToNextRecord(
aData.sDataSource = rDataSource;
aData.sCommand = rCommand;
aData.nCommandType = -1;
- pFound = FindDSData(aData, FALSE);
+ pFound = FindDSData(aData, sal_False);
}
return ToNextRecord(pFound);
}
/* -----------------------------10.07.01 14:38--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
+sal_Bool SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if(!pParam || !pParam->xResultSet.is() || pParam->bEndOfDB ||
(pParam->aSelection.getLength() && pParam->aSelection.getLength() <= pParam->nSelectionIndex))
{
if(pParam)
pParam->CheckEndOfDB();
- return FALSE;
+ return sal_False;
}
try
{
@@ -1962,7 +1963,7 @@ BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
pParam->CheckEndOfDB();
bRet = !pParam->bEndOfDB;
if(pParam->nSelectionIndex >= pParam->aSelection.getLength())
- pParam->bEndOfDB = TRUE;
+ pParam->bEndOfDB = sal_True;
}
else
{
@@ -1990,7 +1991,7 @@ BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
to assure that the next page can be created in mail merge
the cursor position must be validated
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ExistsNextRecord() const
+sal_Bool SwNewDBMgr::ExistsNextRecord() const
{
return pImpl->pMergeData && !pImpl->pMergeData->bEndOfDB;
}
@@ -2002,7 +2003,7 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId()
sal_uInt32 nRet = 0;
DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is())
- return FALSE;
+ return sal_False;
try
{
nRet = pImpl->pMergeData->xResultSet->getRow();
@@ -2019,8 +2020,8 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
{
DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is()|| nSet < 0)
- return FALSE;
- sal_Bool bRet = FALSE;
+ return sal_False;
+ sal_Bool bRet = sal_False;
sal_Int32 nAbsPos = nSet;
if(nAbsPos >= 0)
@@ -2035,7 +2036,7 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
/* -----------------------------17.07.00 14:17--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
+sal_Bool SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
sal_Int32 nCommandType, bool bCreate)
{
SwDBData aData;
@@ -2043,11 +2044,11 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
aData.sCommand = rTableOrQuery;
aData.nCommandType = nCommandType;
- SwDSParam* pFound = FindDSData(aData, TRUE);
+ SwDSParam* pFound = FindDSData(aData, sal_True);
uno::Reference< XDataSource> xSource;
if(pFound->xResultSet.is())
- return TRUE;
- SwDSParam* pParam = FindDSConnection(rDataSource, FALSE);
+ return sal_True;
+ SwDSParam* pParam = FindDSConnection(rDataSource, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
pFound->xConnection = pParam->xConnection;
@@ -2069,7 +2070,7 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
catch(Exception&)
{
//#98373# DB driver may not be ODBC 3.0 compliant
- pFound->bScrollable = TRUE;
+ pFound->bScrollable = sal_True;
}
pFound->xStatement = pFound->xConnection->createStatement();
rtl::OUString aQuoteChar = xMetaData->getIdentifierQuoteString();
@@ -2100,7 +2101,7 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
---------------------------------------------------------------------------*/
uno::Reference< XConnection> SwNewDBMgr::RegisterConnection(rtl::OUString& rDataSource)
{
- SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, TRUE);
+ SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, sal_True);
uno::Reference< XDataSource> xSource;
if(!pFound->xConnection.is())
{
@@ -2136,7 +2137,7 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
aData.sDataSource = rDataSource;
aData.sCommand = rTableOrQuery;
aData.nCommandType = nCommandType;
- SwDSParam* pFound = FindDSData(aData, FALSE);
+ SwDSParam* pFound = FindDSData(aData, sal_False);
if(pFound && pFound->xResultSet.is())
{
try
@@ -2161,11 +2162,11 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
/* -----------------------------17.07.00 14:18--------------------------------
close all data sources - after fields were updated
---------------------------------------------------------------------------*/
-void SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
+void SwNewDBMgr::CloseAll(sal_Bool bIncludingMerge)
{
//the only thing done here is to reset the selection index
//all connections stay open
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(bIncludingMerge || pParam != pImpl->pMergeData)
@@ -2186,7 +2187,7 @@ void SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
/* -----------------------------17.07.00 14:54--------------------------------
---------------------------------------------------------------------------*/
-SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
+SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate)
{
//prefer merge data if available
if(pImpl->pMergeData && rData.sDataSource == pImpl->pMergeData->sDataSource &&
@@ -2198,7 +2199,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
}
SwDSParam* pFound = 0;
- for(USHORT nPos = aDataSourceParams.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = aDataSourceParams.Count(); nPos; nPos--)
{
SwDSParam* pParam = aDataSourceParams[nPos - 1];
if(rData.sDataSource == pParam->sDataSource &&
@@ -2238,7 +2239,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
---------------------------------------------------------------------------*/
-SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, BOOL bCreate)
+SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, sal_Bool bCreate)
{
//prefer merge data if available
if(pImpl->pMergeData && rDataSource == pImpl->pMergeData->sDataSource )
@@ -2246,7 +2247,7 @@ SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, BOOL
return pImpl->pMergeData;
}
SwDSParam* pFound = 0;
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(rDataSource == pParam->sDataSource)
@@ -2497,7 +2498,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
---------------------------------------------------------------------------*/
void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
const Sequence<PropertyValue>& rProperties,
- BOOL bWithDataSourceBrowser)
+ sal_Bool bWithDataSourceBrowser)
{
//prevent second call
if(pImpl->pMergeDialog)
@@ -2529,7 +2530,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
if(!xConnection.is())
{
xConnection = SwNewDBMgr::RegisterConnection(sDataSource);
- pFound = FindDSConnection(sDataSource, TRUE);
+ pFound = FindDSConnection(sDataSource, sal_True);
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
@@ -2583,7 +2584,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
// the shell will be explicitly closed, but it is more safe to use SfxObjectShellLock here
// especially for the case that the loading has failed
SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
- SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, TRUE );
+ SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, sal_True );
pWorkMed->SetFilter( pSfxFlt );
if( xWorkDocSh->DoLoad(pWorkMed) )
{
@@ -2628,7 +2629,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
}
if(pFound)
{
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(pParam == pFound)
@@ -2660,7 +2661,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
rtl::OUString sDataSource, sDataTableOrQuery;
uno::Reference<XResultSet> xResSet;
Sequence<Any> aSelection;
- BOOL bHasSelectionProperty = FALSE;
+ sal_Bool bHasSelectionProperty = sal_False;
sal_Int32 nSelectionPos = 0;
sal_Int16 nCmdType = CommandType::TABLE;
const PropertyValue* pValues = rProperties.getConstArray();
@@ -2675,7 +2676,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
pValues[nPos].Value >>= xResSet;
else if(pValues[nPos].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cSelection)))
{
- bHasSelectionProperty = TRUE;
+ bHasSelectionProperty = sal_True;
nSelectionPos = nPos;
pValues[nPos].Value >>= aSelection;
}
@@ -2821,7 +2822,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
uno::Reference< XResultSet> xResultSet = rMMConfig.GetResultSet();
if(!xResultSet.is())
return false;
- bInMerge = TRUE;
+ bInMerge = sal_True;
sal_Int32 nRet = 0;
pImpl->pMergeData = new SwDSParam(
rMMConfig.GetCurrentDBData(), xResultSet, rMMConfig.GetSelection());
@@ -2835,7 +2836,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pImpl->pMergeData->bEndOfDB = !pImpl->pMergeData->xResultSet->absolute( nPos );
pImpl->pMergeData->CheckEndOfDB();
if(pImpl->pMergeData->nSelectionIndex >= pImpl->pMergeData->aSelection.getLength())
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
}
else
{
@@ -2845,13 +2846,13 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
catch(Exception&)
{
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
DBG_ERROR("exception in MergeNew()");
}
//bCancel is set from the PrintMonitor
- bCancel = FALSE;
+ bCancel = sal_False;
CreateMonitor aMonitorDlg(&rSourceView.GetEditWin());
aMonitorDlg.SetCancelHdl(LINK(this, SwNewDBMgr, PrtCancelHdl));
@@ -2861,15 +2862,15 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
aMonitorDlg.Invalidate();
aMonitorDlg.Update();
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
}
SwWrtShell& rSourceShell = rSourceView.GetWrtShell();
- BOOL bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1;
+ sal_Bool bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1;
//save the settings of the first
- rSourceShell.SttEndDoc(TRUE);
- USHORT nStartingPageNo = rSourceShell.GetVirtPageNum();
+ rSourceShell.SttEndDoc(sal_True);
+ sal_uInt16 nStartingPageNo = rSourceShell.GetVirtPageNum();
String sModifiedStartingPageDesc;
String sStartingPageDesc = sModifiedStartingPageDesc = rSourceShell.GetPageDesc(
rSourceShell.GetCurPageDesc()).GetName();
@@ -2906,7 +2907,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
long nStartRow, nEndRow;
- ULONG nDocNo = 1;
+ sal_uLong nDocNo = 1;
sal_Int32 nDocCount = 0;
if( !IsMergeSilent() && lcl_getCountFromResultSet( nDocCount, pImpl->pMergeData->xResultSet ) )
aMonitorDlg.SetTotalCount( nDocCount );
@@ -2920,7 +2921,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
aMonitorDlg.Invalidate();
aMonitorDlg.Update();
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
}
@@ -2948,8 +2949,14 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
SwNewDBMgr* pWorkDBMgr = pWorkDoc->GetNewDBMgr();
pWorkDoc->SetNewDBMgr( this );
pWorkDoc->EmbedAllLinks();
- if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds())
- rWorkShell.Undo();
+ SwUndoId nLastUndoId(UNDO_EMPTY);
+ if (rWorkShell.GetLastUndoInfo(0, & nLastUndoId))
+ {
+ if (UNDO_UI_DELETE_INVISIBLECNTNT == nLastUndoId)
+ {
+ rWorkShell.Undo();
+ }
+ }
// #i69485# lock fields to prevent access to the result set while calculating layout
rWorkShell.LockExpFlds();
// create a layout
@@ -2969,10 +2976,10 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
// insert the document into the target document
- rWorkShell.SttEndDoc(FALSE);
- rWorkShell.SttEndDoc(TRUE);
+ rWorkShell.SttEndDoc(sal_False);
+ rWorkShell.SttEndDoc(sal_True);
rWorkShell.SelAll();
- pTargetShell->SttEndDoc(FALSE);
+ pTargetShell->SttEndDoc(sal_False);
//#i63806# put the styles to the target document
//if the source uses headers or footers each new copy need to copy a new page styles
@@ -3006,7 +3013,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
{
pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
}
- USHORT nPageCountBefore = pTargetShell->GetPageCnt();
+ sal_uInt16 nPageCountBefore = pTargetShell->GetPageCnt();
DBG_ASSERT(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
//#i51359# add a second paragraph in case there's only one
{
@@ -3037,7 +3044,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
++nRet;
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
//restore the ole DBMgr
@@ -3068,7 +3075,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
}
DELETEZ(pImpl->pMergeData);
- bInMerge = FALSE;
+ bInMerge = sal_False;
return nRet;
}
/* -----------------09.12.2002 12:38-----------------
@@ -3090,7 +3097,7 @@ void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
uno::Reference<XConnection> xSource(rSource.Source, UNO_QUERY);
- for(USHORT nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--)
{
SwDSParam* pParam = rDBMgr.aDataSourceParams[nPos - 1];
if(pParam->xConnection.is() &&
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index ba6c6bd225..8e786e460c 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -110,7 +110,7 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
virtual void SAL_CALL elementReplaced( const ContainerEvent& Event ) throw (RuntimeException);
virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException);
- BOOL HasContext();
+ sal_Bool HasContext();
SwWrtShell* GetWrtShell() { return pWrtSh;}
void SetWrtShell(SwWrtShell& rSh) { pWrtSh = &rSh;}
Reference< XNameAccess > GetContext() {return xDBContext;}
@@ -148,7 +148,7 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
vos::OGuard aGuard(Application::GetSolarMutex());
::rtl::OUString sSource;
rEvent.Accessor >>= sSource;
- for(USHORT i = 0; i < aConnections.Count(); i++)
+ for(sal_uInt16 i = 0; i < aConnections.Count(); i++)
{
SwConnectionDataPtr pPtr = aConnections[i];
if(pPtr->sSourceName == sSource)
@@ -179,7 +179,7 @@ void SwDBTreeList_Impl::elementReplaced( const ContainerEvent& rEvent ) throw (R
/* -----------------------------17.07.01 13:24--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDBTreeList_Impl::HasContext()
+sal_Bool SwDBTreeList_Impl::HasContext()
{
if(!xDBContext.is())
{
@@ -203,7 +203,7 @@ BOOL SwDBTreeList_Impl::HasContext()
Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rSourceName)
{
Reference<XConnection> xRet;
- for(USHORT i = 0; i < aConnections.Count(); i++)
+ for(sal_uInt16 i = 0; i < aConnections.Count(); i++)
{
SwConnectionDataPtr pPtr = aConnections[i];
if(pPtr->sSourceName == rSourceName)
@@ -226,13 +226,13 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rS
------------------------------------------------------------------------*/
SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId,
SwWrtShell* pSh,
- const String& rDefDBName, const BOOL bShowCol):
+ const String& rDefDBName, const sal_Bool bShowCol):
SvTreeListBox (pParent, rResId),
aImageList (SW_RES(ILIST_DB_DLG )),
aImageListHC (SW_RES(ILIST_DB_DLG_HC )),
sDefDBName (rDefDBName),
- bInitialized (FALSE),
+ bInitialized (sal_False),
bShowColumns (bShowCol),
pImpl(new SwDBTreeList_Impl(pSh))
{
@@ -281,7 +281,7 @@ void SwDBTreeList::InitTreeList()
for(long i = 0; i < nCount; i++)
{
String sDBName(pDBNames[i]);
- SvLBoxEntry* pEntry = InsertEntry(sDBName, aImg, aImg, NULL, TRUE);
+ SvLBoxEntry* pEntry = InsertEntry(sDBName, aImg, aImg, NULL, sal_True);
SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
}
@@ -291,7 +291,7 @@ void SwDBTreeList::InitTreeList()
Select(sDBName, sTableName, sColumnName);
- bInitialized = TRUE;
+ bInitialized = sal_True;
}
/*-- 27.05.2004 09:19:09---------------------------------------------------
@@ -300,7 +300,7 @@ void SwDBTreeList::AddDataSource(const String& rSource)
{
Image aImg = aImageList.GetImage(IMG_DB);
Image aHCImg = aImageListHC.GetImage(IMG_DB);
- SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, TRUE);
+ SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, sal_True);
SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SvTreeListBox::Select(pEntry);
@@ -309,7 +309,7 @@ void SwDBTreeList::AddDataSource(const String& rSource)
Beschreibung:
------------------------------------------------------------------------*/
-void SwDBTreeList::ShowColumns(BOOL bShowCol)
+void SwDBTreeList::ShowColumns(sal_Bool bShowCol)
{
if (bShowCol != bShowColumns)
{
@@ -317,7 +317,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol)
String sTableName, sColumnName;
String sDBName(GetDBName(sTableName, sColumnName));
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
SvLBoxEntry* pEntry = First();
@@ -337,7 +337,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol)
{
Select(sDBName, sTableName, sColumnName); // force RequestingChilds
}
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
}
}
@@ -360,7 +360,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
if(!pImpl->GetContext()->hasByName(sSourceName))
return;
Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName);
- BOOL bTable = pParent->GetUserData() == 0;
+ sal_Bool bTable = pParent->GetUserData() == 0;
Reference<XColumnsSupplier> xColsSupplier;
if(bTable)
{
@@ -496,7 +496,7 @@ IMPL_LINK( SwDBTreeList, DBCompare, SvSortData*, pData )
Beschreibung:
------------------------------------------------------------------------*/
-String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, BOOL* pbIsTable)
+String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, sal_Bool* pbIsTable)
{
String sDBName;
SvLBoxEntry* pEntry = FirstSelected();
@@ -527,8 +527,8 @@ void SwDBTreeList::Select(const String& rDBName, const String& rTableName, const
{
SvLBoxEntry* pParent;
SvLBoxEntry* pChild;
- USHORT nParent = 0;
- USHORT nChild = 0;
+ sal_uInt16 nParent = 0;
+ sal_uInt16 nChild = 0;
while ((pParent = GetEntry(nParent++)) != NULL)
{
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index 94fd53a80f..6d110e1fe8 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -64,7 +64,7 @@ SFX_IMPL_FLOATINGWINDOW( SwMailMergeChildWindow, FN_MAILMERGE_CHILDWINDOW )
------------------------------------------------------------------------*/
SwMailMergeChildWindow::SwMailMergeChildWindow( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
@@ -781,7 +781,7 @@ void SwSendMailDialog::UpdateTransferStatus()
m_aErrorStatusFT.SetText(sStatus);
if(m_pImpl->aDescriptors.size())
- m_aProgressBar.SetValue((USHORT)(m_nSendCount * 100 / m_pImpl->aDescriptors.size()));
+ m_aProgressBar.SetValue((sal_uInt16)(m_nSendCount * 100 / m_pImpl->aDescriptors.size()));
else
m_aProgressBar.SetValue(0);
}
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index d9a56fa166..cb779e85d2 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -271,7 +271,7 @@ void SwAddressPreview::SetAddress(const ::rtl::OUString& rAddress)
{
pImpl->aAdresses.clear();
pImpl->aAdresses.push_back(rAddress);
- aVScrollBar.Show(FALSE);
+ aVScrollBar.Show(sal_False);
Invalidate();
}
/*-- 27.04.2004 14:01:23---------------------------------------------------
@@ -436,7 +436,7 @@ void SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
-----------------------------------------------------------------------*/
void SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nKey = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
if(pImpl->nRows || pImpl->nColumns)
{
sal_uInt32 nSelectedRow = (pImpl->nSelectedAddress + 1)/ pImpl->nColumns;
@@ -555,7 +555,7 @@ String SwAddressPreview::FillData(
//find the appropriate assignment
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rDefHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -805,7 +805,7 @@ uno::Any SwMailTransferable::getTransferData( const datatransfer::DataFlavor& /*
else
{
Sequence<sal_Int8> aData;
- SfxMedium aMedium( m_aURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMedium( m_aURL, STREAM_STD_READ, sal_False );
SvStream* pStream = aMedium.GetInStream();
if ( aMedium.GetErrorCode() == ERRCODE_NONE && pStream)
{
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 8d32644b12..617ad65ccb 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -321,16 +321,16 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton
}
else
{
- BOOL bNext = pButton == &m_aNextSetIB;
+ sal_Bool bNext = pButton == &m_aNextSetIB;
sal_Int32 nPos = rConfig.GetResultSetPosition();
rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
}
m_pWizard->LeaveWait();
sal_Int32 nPos = rConfig.GetResultSetPosition();
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if(nPos < 1)
{
- bEnable = FALSE;
+ bEnable = sal_False;
nPos = 1;
}
else
@@ -557,12 +557,12 @@ SwRestrictedComboBox::~SwRestrictedComboBox()
---------------------------------------------------------------------------*/
void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
{
- BOOL bCallParent = TRUE;
+ sal_Bool bCallParent = sal_True;
if(rEvt.GetCharCode())
{
String sKey = rEvt.GetCharCode();
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
- bCallParent = FALSE;
+ bCallParent = sal_False;
}
if(bCallParent)
ComboBox::KeyInput(rEvt);
@@ -574,11 +574,11 @@ void SwRestrictedComboBox::Modify()
{
Selection aSel = GetSelection();
String sTemp = GetText();
- for(USHORT i = 0; i < sForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp.EraseAllChars( sForbiddenChars.GetChar(i) );
}
- USHORT nDiff = GetText().Len() - sTemp.Len();
+ sal_uInt16 nDiff = GetText().Len() - sTemp.Len();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
@@ -672,7 +672,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
}
FreeResource();
const ResStringArray& rHeaders = m_rConfigItem.GetDefaultAddressHeaders();
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
const XubString& rHeader = rHeaders.GetString( i );
SvLBoxEntry* pEntry = m_aAddressElementsLB.InsertEntry(rHeader);
@@ -772,7 +772,7 @@ sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl()
sal_Int32 nRet = USER_DATA_NONE;
String sSelected = m_aDragED.GetCurrentItem();
if(sSelected.Len())
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
String sEntry = m_aAddressElementsLB.GetEntryText(pEntry);
@@ -791,7 +791,7 @@ bool SwCustomizeAddressBlockDialog::HasItem_Impl(sal_Int32 nUserData)
{
//get the entry from the ListBox
String sEntry;
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
if((sal_Int32)(sal_IntPtr)pEntry->GetUserData() == nUserData)
@@ -921,7 +921,7 @@ void SwCustomizeAddressBlockDialog::SetAddress(const ::rtl::OUString& rAddress)
//remove placeholders by the actual content
if(m_aFieldFT.IsVisible())
{
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
String sEntry = m_aAddressElementsLB.GetEntryText(pEntry);
@@ -1117,7 +1117,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(
};
//fill the controls
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
const XubString& rHeader = rHeaders.GetString( i );
FixedInfo* pNewText = new FixedInfo(&m_aWindow, ResId( FT_FIELDS, *rResId.GetResMgr()));
@@ -1231,7 +1231,7 @@ long SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == EVENT_COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- USHORT nCmd = pCEvt->GetCommand();
+ sal_uInt16 nCmd = pCEvt->GetCommand();
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
@@ -1267,7 +1267,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
// The first line has to be -(nThumb * m_nYOffset) in the negative
long nMove = m_nFirstYPos - (*m_aMatches.begin())->GetPosPixel().Y() - (nThumb * m_nYOffset);
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
long nIndex;
::std::vector<FixedInfo*>::iterator aFIIter;
for(nIndex = 0, aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter, ++nIndex)
@@ -1277,7 +1277,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
lcl_Move(*aLBIter, nMove);
for(nIndex = 0, aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter, ++nIndex)
lcl_Move(*aFIIter, nMove);
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
return 0;
}
@@ -1458,7 +1458,7 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId)
// SetSpaceBetweenEntries(3);
SetSelectionMode( SINGLE_SELECTION );
SetDragDropMode( SV_DRAGDROP_CTRL_COPY );
- EnableAsyncDrag(TRUE);
+ EnableAsyncDrag(sal_True);
SetHelpId(HID_MM_CUSTOMFIELDS);
// expand selection to the complete width of the ListBox
SetHighlightRange();
@@ -1512,7 +1512,7 @@ AddressMultiLineEdit::AddressMultiLineEdit(SwCustomizeAddressBlockDialog* pParen
GetTextView()->SupportProtectAttribute(sal_True);
StartListening(*GetTextEngine());
//DisableSelectionOnFocus();
- EnableFocusSelectionHide(FALSE);
+ EnableFocusSelectionHide(sal_False);
}
/*-- 26.05.2004 13:14:53---------------------------------------------------
@@ -1570,8 +1570,8 @@ void AddressMultiLineEdit::SetText( const String& rStr )
ExtTextEngine* pTextEngine = GetTextEngine();
TextAttribProtect aProtectAttr;
- ULONG nParaCount = pTextEngine->GetParagraphCount();
- for(ULONG nPara = 0; nPara < nParaCount; ++nPara)
+ sal_uLong nParaCount = pTextEngine->GetParagraphCount();
+ for(sal_uLong nPara = 0; nPara < nParaCount; ++nPara)
{
xub_StrLen nIndex = 0;
String sPara = pTextEngine->GetText( nPara );
@@ -1582,11 +1582,11 @@ void AddressMultiLineEdit::SetText( const String& rStr )
}
while(true)
{
- USHORT nStart = sPara.Search( '<', nIndex );
- USHORT nEnd = sPara.Search( '>', nStart );
+ sal_uInt16 nStart = sPara.Search( '<', nIndex );
+ sal_uInt16 nEnd = sPara.Search( '>', nStart );
nIndex = nEnd;
if(nStart != STRING_NOTFOUND && nEnd != STRING_NOTFOUND)
- pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, FALSE );
+ pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, sal_False );
else
break;
}
@@ -1614,8 +1614,8 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
// insert new entry after current selected one.
ExtTextView* pTextView = GetTextView();
const TextSelection& rSelection = pTextView->GetSelection();
- ULONG nPara = rSelection.GetStart().GetPara();
- USHORT nIndex = rSelection.GetEnd().GetIndex();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
+ sal_uInt16 nIndex = rSelection.GetEnd().GetIndex();
ExtTextEngine *pTextEngine = GetTextEngine();
const TextCharAttrib *pAttrib;
if(0 != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED )))
@@ -1630,7 +1630,7 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
Modify();
}
-void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex )
+void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex )
{
ExtTextEngine* pTextEngine = GetTextEngine();
TextPaM aInsertPos( nPara, nIndex );
@@ -1659,7 +1659,7 @@ void AddressMultiLineEdit::RemoveCurrentEntry()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
pTextEngine->ReplaceText(aEntrySel, String());
//restore the attributes
@@ -1681,8 +1681,8 @@ void AddressMultiLineEdit::MoveCurrentItem(sal_uInt16 nMove)
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
//current item has been found
- ULONG nPara = rSelection.GetStart().GetPara();
- USHORT nIndex = pBeginAttrib->GetStart();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
+ sal_uInt16 nIndex = pBeginAttrib->GetStart();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
String sCurrentItem = pTextEngine->GetText(aEntrySel);
pTextEngine->RemoveAttrib( nPara, *pBeginAttrib );
@@ -1793,7 +1793,7 @@ String AddressMultiLineEdit::GetCurrentItem()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
sRet = pTextEngine->GetText( aEntrySel );
}
@@ -1812,7 +1812,7 @@ void AddressMultiLineEdit::SelectCurrentItem()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
pTextView->SetSelection(aEntrySel);
Invalidate();
@@ -1827,8 +1827,8 @@ String AddressMultiLineEdit::GetAddress()
{
String sRet;
ExtTextEngine* pTextEngine = GetTextEngine();
- ULONG nParaCount = pTextEngine->GetParagraphCount();
- for(ULONG nPara = nParaCount; nPara; --nPara)
+ sal_uLong nParaCount = pTextEngine->GetParagraphCount();
+ for(sal_uLong nPara = nParaCount; nPara; --nPara)
{
String sPara = pTextEngine->GetText( nPara - 1);
sPara.EraseTrailingChars(' ');
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 2436a170d4..085cd67bc5 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -197,7 +197,7 @@ public:
String GetAddress();
void InsertNewEntry( const String& rStr );
- void InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex );
+ void InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex );
void RemoveCurrentEntry();
void MoveCurrentItem(sal_uInt16 nMove);
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index 09c4b01d63..db8db04543 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -426,7 +426,7 @@ void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeaders )
//convert the strings used for UI to numbers used for the configuration
String sBlock(rBlock);
sBlock.SearchAndReplaceAllAscii("\n", String::CreateFromAscii("\\n"));
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
String sHeader = rHeaders.GetString( i );
sHeader.Insert('<', 0);
@@ -1083,7 +1083,7 @@ sal_Int32 SwMailMergeConfigItem::MoveResultSet(sal_Int32 nTarget)
{
if(nTarget > 0)
{
- BOOL bMoved = m_pImpl->xResultSet->absolute(nTarget);
+ sal_Bool bMoved = m_pImpl->xResultSet->absolute(nTarget);
if(!bMoved)
{
if(nTarget > 1)
@@ -1460,7 +1460,7 @@ bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -1521,7 +1521,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -1880,13 +1880,13 @@ sal_uInt32 SwMailMergeConfigItem::GetMergedDocumentCount() const
SwView* lcl_ExistsView(SwView* pView)
{
const TypeId aType(TYPE(SwView));
- SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, FALSE );
+ SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, sal_False );
while(pViewShell)
{
if(pViewShell == pView)
return pView;
- pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, FALSE );
+ pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, sal_False );
}
return 0;
}
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 7427bfc687..db618364f7 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -145,7 +145,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
m_aLoadTemplateRB.Check();
SfxNewFileDialog* pNewFileDlg = new SfxNewFileDialog(this, 0);
//pNewFileDlg->SetTemplateFlags(nFlags);
- USHORT nRet = pNewFileDlg->Execute();
+ sal_uInt16 nRet = pNewFileDlg->Execute();
if(RET_TEMPLATE_LOAD == nRet)
bTemplate = false;
else if(RET_CANCEL != nRet)
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index db0038274a..c17c1ec8ee 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -55,7 +55,7 @@ void lcl_FillGreetingsBox(ListBox& rBox,
const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType);
for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry)
rBox.InsertEntry(rEntries[nEntry]);
- rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType));
+ rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
// -----------------------------------------------------------------------
void lcl_FillGreetingsBox(ComboBox& rBox,
@@ -65,7 +65,7 @@ void lcl_FillGreetingsBox(ComboBox& rBox,
const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType);
for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry)
rBox.InsertEntry(rEntries[nEntry]);
- rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType));
+ rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
// -----------------------------------------------------------------------
void lcl_StoreGreetingsBox(ListBox& rBox,
@@ -74,7 +74,7 @@ void lcl_StoreGreetingsBox(ListBox& rBox,
{
Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount());
::rtl::OUString* pEntries = aEntries.getArray();
- for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -86,7 +86,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox,
{
Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount());
::rtl::OUString* pEntries = aEntries.getArray();
- for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -96,7 +96,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox,
-----------------------------------------------------------------------*/
IMPL_LINK(SwGreetingsHandler, IndividualHdl_Impl, CheckBox*, EMPTYARG)
{
- BOOL bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked();
+ sal_Bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked();
m_pFemaleFT->Enable(bIndividual);
m_pFemaleLB->Enable(bIndividual);
m_pFemalePB->Enable(bIndividual);
@@ -409,10 +409,10 @@ sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPage
lcl_StoreGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
lcl_StoreGreetingsBox(m_aMaleLB, rConfig, SwMailMergeConfigItem::MALE);
- USHORT nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
+ sal_uInt16 nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
if(LISTBOX_ENTRY_NOTFOUND == nCurrentTextPos)
{
- USHORT nCount = m_aNeutralCB.GetEntryCount();
+ sal_uInt16 nCount = m_aNeutralCB.GetEntryCount();
m_aNeutralCB.InsertEntry( m_aNeutralCB.GetText(), nCount );
m_aNeutralCB.SelectEntryPos(nCount);
}
@@ -452,15 +452,15 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton)
}
else
{
- BOOL bNext = pButton == &m_aNextSetIB;
+ sal_Bool bNext = pButton == &m_aNextSetIB;
sal_Int32 nPos = rConfig.GetResultSetPosition();
rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
}
sal_Int32 nPos = rConfig.GetResultSetPosition();
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if(nPos < 1)
{
- bEnable = FALSE;
+ bEnable = sal_False;
nPos = 1;
}
else
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 91312c9914..97d923f495 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -149,8 +149,8 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
m_pExampleFrame = new SwOneExampleFrame( m_aExampleWIN,
EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL );
- m_aExampleWIN.Show( FALSE );
- m_aExampleContainerWIN.Show(TRUE);
+ m_aExampleWIN.Show( sal_False );
+ m_aExampleContainerWIN.Show(sal_True);
m_aLeftMF.SetValue(m_aLeftMF.Normalize(DEFAULT_LEFT_DISTANCE), FUNIT_TWIP);
m_aTopMF.SetValue(m_aTopMF.Normalize(DEFAULT_TOP_DISTANCE), FUNIT_TWIP);
@@ -236,7 +236,7 @@ void SwMailMergeLayoutPage::ActivatePage()
m_pExampleWrtShell->GotoFly( m_pAddressBlockFormat->GetName() );
m_pExampleWrtShell->DelRight();
m_pAddressBlockFormat = 0;
- m_pExampleWrtShell->Pop(FALSE);
+ m_pExampleWrtShell->Pop(sal_False);
}
else
{
@@ -380,7 +380,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -474,7 +474,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
//there's already text at the desired position
//go to start of the doc, directly!
- rShell.SttEndDoc(TRUE);
+ rShell.SttEndDoc(sal_True);
//and go by paragraph until the position is reached
long nYPos = rShell.GetCharRect().Top();
while(nYPos < GREETING_TOP_DISTANCE)
@@ -641,7 +641,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
String sDB(sDBName);
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -682,7 +682,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
rShell.Push();
rShell.SplitNode();
- rShell.Pop(FALSE);
+ rShell.Pop(sal_False);
}
//put the cursor to the start of the paragraph
rShell.SttPara();
@@ -694,8 +694,8 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
-----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
{
- m_aExampleWIN.Show( TRUE );
- m_aExampleContainerWIN.Show(FALSE);
+ m_aExampleWIN.Show( sal_True );
+ m_aExampleContainerWIN.Show(sal_False);
Reference< XModel > & xModel = m_pExampleFrame->GetModel();
//now the ViewOptions should be set properly
@@ -792,7 +792,7 @@ IMPL_LINK(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, MetricField*, EMPTYARG)
IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton)
{
bool bDown = pButton == &m_aDownPB;
- BOOL bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 );
+ sal_Bool bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 );
if (bMoved || bDown)
m_pWizard->GetConfigItem().MoveGreeting(bDown ? 1 : -1 );
if(!bMoved && bDown)
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 4d3cd4d19d..66e8b5496e 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -105,7 +105,7 @@ using namespace ::com::sun::star::uno;
/*-- 01.07.2004 16:47:49---------------------------------------------------
-----------------------------------------------------------------------*/
-String lcl_GetExtensionForDocType(ULONG nDocType)
+String lcl_GetExtensionForDocType(sal_uLong nDocType)
{
String sExtension;
switch( nDocType )
@@ -507,7 +507,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
&m_aSendAllRB, &m_aSendDocumentsPB,
0
};
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
Control** pControl = aControls;
do
{
@@ -603,7 +603,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
String sAttach( m_sDefaultAttachmentST );
sAttach += '.';
sAttach += lcl_GetExtensionForDocType(
- (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()));
+ (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()));
m_aAttachmentED.SetText( sAttach );
}
@@ -649,7 +649,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
}
m_aFromRB.GetClickHdl().Call(m_aFromRB.IsChecked() ? &m_aFromRB : 0);
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
return 0;
}
/*-- 22.08.2005 12:15:10---------------------------------------------------
@@ -714,9 +714,9 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton)
rConfigItem.AddSavedDocument(
aURL.GetMainURL(INetURLObject::DECODE_TO_IURI));
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
m_pWizard->enableButtons(WZB_FINISH, sal_True);
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
}
}
@@ -870,7 +870,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
sTargetTempURL, aOpt, sal_True );
pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(),
- (USHORT)rInfo.nStartPageInTarget, (USHORT)rInfo.nEndPageInTarget );
+ (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget );
pTargetView->GetWrtShell().EndAction();
//then save it
String sOutPath = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
@@ -988,7 +988,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
if(nEnd > rConfigItem.GetMergedDocumentCount())
nEnd = rConfigItem.GetMergedDocumentCount();
}
- rConfigItem.SetPrintRange( (USHORT)nBegin, (USHORT)nEnd );
+ rConfigItem.SetPrintRange( (sal_uInt16)nBegin, (sal_uInt16)nEnd );
SwDocMergeInfo& rStartInfo = rConfigItem.GetDocumentMergeInfo(nBegin);
SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1);
@@ -1041,7 +1041,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterSetupHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox)
{
- ULONG nDocType = (ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos());
+ sal_uLong nDocType = (sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos());
sal_Bool bEnable = MM_DOCTYPE_HTML != nDocType && MM_DOCTYPE_TEXT != nDocType;
m_aSendAsPB.Enable( bEnable );
m_aAttachmentFT.Enable( bEnable );
@@ -1095,7 +1095,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
!SwMailMergeHelper::CheckMailAddress(rConfigItem.GetMailAddress()) )
{
QueryBox aQuery(pButton, WB_YES_NO_CANCEL, m_sConfigureMail);
- USHORT nRet = aQuery.Execute();
+ sal_uInt16 nRet = aQuery.Execute();
if(RET_YES == nRet )
{
SfxAllItemSet aSet(pTargetView->GetPool());
@@ -1127,7 +1127,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding();
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
const SfxFilter *pSfxFlt = 0;
- ULONG nDocType = (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos());
+ sal_uLong nDocType = (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos());
String sExtension = lcl_GetExtensionForDocType(nDocType);
switch( nDocType )
{
@@ -1217,7 +1217,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
++nTokenCount;
}
sAttach.SetToken( nTokenCount - 1, '.', lcl_GetExtensionForDocType(
- (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos())));
+ (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos())));
m_aAttachmentED.SetText(sAttach);
}
else
@@ -1235,8 +1235,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(MM_DOCTYPE_TEXT == nDocType)
{
SwAsciiOptions aOpt;
- USHORT nAppScriptType = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
- USHORT nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
+ sal_uInt16 nAppScriptType = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
+ sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
aOpt.SetLanguage( ((SvxLanguageItem&)pTargetView->GetWrtShell().
GetDefault( nWhich )).GetLanguage());
aOpt.SetParaFlags( LINEEND_CR );
@@ -1288,7 +1288,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
pTempView->GetDocShell()->LoadStylesFromFile(
sTargetTempURL, aOpt, sal_True );
pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(),
- (USHORT)rInfo.nStartPageInTarget, (USHORT)rInfo.nEndPageInTarget );
+ (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget );
pTargetView->GetWrtShell().EndAction();
//then save it
@@ -1335,7 +1335,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
{
{
//read in the temporary file and use it as mail body
- SfxMedium aMedium( aName.GetValue(), STREAM_READ, TRUE);
+ SfxMedium aMedium( aName.GetValue(), STREAM_READ, sal_True);
SvStream* pInStream = aMedium.GetInStream();
if(pInStream)
pInStream->SetStreamCharSet( eEncoding );
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 049b99e611..a4e26be870 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -113,7 +113,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent,
m_aTableLB.SetSpaceBetweenEntries(3);
m_aTableLB.SetSelectionMode( SINGLE_SELECTION );
m_aTableLB.SetDragDropMode( 0 );
- m_aTableLB.EnableAsyncDrag(FALSE);
+ m_aTableLB.EnableAsyncDrag(sal_False);
m_aPreviewPB.SetClickHdl(LINK(this, SwSelectDBTableDialog, PreviewHdl));
diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx
index 786c60be65..e45e2c5ae6 100644
--- a/sw/source/ui/dbui/swdbtoolsclient.cxx
+++ b/sw/source/ui/dbui/swdbtoolsclient.cxx
@@ -230,7 +230,7 @@ sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
/* -----------------------------30.08.2001 12:38------------------------------
---------------------------------------------------------------------------*/
-::rtl::OUString SwDbtoolsClient::getValue(
+::rtl::OUString SwDbtoolsClient::getFormattedValue(
const uno::Reference< beans::XPropertySet>& _rxColumn,
const uno::Reference< util::XNumberFormatter>& _rxFormatter,
const lang::Locale& _rLocale,
@@ -242,7 +242,7 @@ sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
getAccessTypeConversion();
rtl::OUString sRet;
if(xConversion.is())
- sRet = xConversion->getValue(_rxColumn, _rxFormatter, _rLocale, _rNullDate);
+ sRet = xConversion->getFormattedValue(_rxColumn, _rxFormatter, _rLocale, _rNullDate);
return sRet;
}