summaryrefslogtreecommitdiff
path: root/linguistic/source/convdic.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
commit091e4aee3386f3bfee081dc8646494e0eb97f88a (patch)
treedd79298b4e8729ca7dc874274d4a33ea88fe107d /linguistic/source/convdic.cxx
parentf0681adbf092e2b455db52535f2df882bc87343a (diff)
parent224bd63b3fa459baa0a6bb5cd03f5dc2ca475d82 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: avmedia/source/framework/mediacontrol.cxx connectivity/source/commontools/DateConversion.cxx desktop/source/deployment/registry/component/dp_component.cxx editeng/inc/editeng/numitem.hxx editeng/inc/editeng/txtrange.hxx editeng/source/editeng/editobj.cxx editeng/source/editeng/editview.cxx editeng/source/editeng/eehtml.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/misc/txtrange.cxx editeng/source/outliner/outlin2.cxx editeng/source/outliner/outlvw.cxx framework/source/layoutmanager/layoutmanager.cxx linguistic/source/lngsvcmgr.hxx sfx2/source/appl/app.cxx sfx2/source/appl/app.src sfx2/source/appl/appbas.cxx sfx2/source/appl/appcfg.cxx sfx2/source/appl/appdde.cxx sfx2/source/appl/appmain.cxx sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/appl/childwin.cxx sfx2/source/appl/fileobj.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/workwin.cxx sfx2/source/control/dispatch.cxx sfx2/source/control/macro.cxx sfx2/source/control/objface.cxx sfx2/source/control/request.cxx sfx2/source/control/shell.cxx sfx2/source/control/statcach.cxx sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/dialog/mailmodel.cxx sfx2/source/dialog/mailmodelapi.cxx sfx2/source/dialog/mgetempl.cxx sfx2/source/dialog/splitwin.cxx sfx2/source/dialog/styledlg.cxx sfx2/source/dialog/tabdlg.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/dialog/tplcitem.cxx sfx2/source/dialog/tplpitem.cxx sfx2/source/doc/doctempl.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/new.cxx sfx2/source/doc/objcont.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/objxtor.cxx sfx2/source/inc/appdata.hxx sfx2/source/inc/helpid.hrc sfx2/source/inc/sfxlocal.hrc sfx2/source/inc/statcach.hxx sfx2/source/inc/templdgi.hxx sfx2/source/inc/virtmenu.hxx sfx2/source/inc/workwin.hxx sfx2/source/menu/mnumgr.cxx sfx2/source/menu/virtmenu.cxx sfx2/source/statbar/stbitem.cxx sfx2/source/view/frame.cxx sfx2/source/view/frame2.cxx sfx2/source/view/orgmgr.cxx sfx2/source/view/printer.cxx sfx2/source/view/prnmon.cxx sfx2/source/view/sfxbasecontroller.cxx sfx2/source/view/viewfrm.cxx sfx2/source/view/viewfrm2.cxx sfx2/source/view/viewprn.cxx sfx2/source/view/viewsh.cxx svx/inc/svx/svditer.hxx svx/source/dialog/sdstring.src svx/source/form/fmpage.cxx svx/source/form/formcontroller.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svditer.cxx svx/source/svdraw/svdview.cxx xmloff/source/forms/elementimport.cxx
Diffstat (limited to 'linguistic/source/convdic.cxx')
-rwxr-xr-x[-rw-r--r--]linguistic/source/convdic.cxx62
1 files changed, 31 insertions, 31 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index bcdf835364c0..1093b363314d 100644..100755
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -67,7 +67,7 @@
#include "convdic.hxx"
#include "convdicxml.hxx"
-#include "misc.hxx"
+#include "linguistic/misc.hxx"
#include "defs.hxx"
using namespace std;
@@ -156,9 +156,9 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
}
}
-BOOL IsConvDic( const String &rFileURL, INT16 &nLang, sal_Int16 &nConvType )
+sal_Bool IsConvDic( const String &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType )
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (rFileURL.Len() == 0)
return bRes;
@@ -199,9 +199,9 @@ BOOL IsConvDic( const String &rFileURL, INT16 &nLang, sal_Int16 &nConvType )
ConvDic::ConvDic(
const String &rName,
- INT16 nLang,
+ sal_Int16 nLang,
sal_Int16 nConvType,
- BOOL bBiDirectional,
+ sal_Bool bBiDirectional,
const String &rMainURL) :
aFlushListeners( GetLinguMutex() )
{
@@ -216,30 +216,30 @@ ConvDic::ConvDic(
pConvPropType = std::auto_ptr< PropTypeMap >( new PropTypeMap );
nMaxLeftCharCount = nMaxRightCharCount = 0;
- bMaxCharCountIsValid = TRUE;
+ bMaxCharCountIsValid = sal_True;
- bNeedEntries = TRUE;
- bIsModified = bIsActive = FALSE;
- bIsReadonly = FALSE;
+ bNeedEntries = sal_True;
+ bIsModified = bIsActive = sal_False;
+ bIsReadonly = sal_False;
if( rMainURL.Len() > 0 )
{
- BOOL bExists = FALSE;
+ sal_Bool bExists = sal_False;
bIsReadonly = IsReadOnly( rMainURL, &bExists );
if( !bExists ) // new empty dictionary
{
- bNeedEntries = FALSE;
+ bNeedEntries = sal_False;
//! create physical representation of an **empty** dictionary
//! that could be found by the dictionary-list implementation
// (Note: empty dictionaries are not just empty files!)
Save();
- bIsReadonly = IsReadOnly( rMainURL ); // will be FALSE if Save was succesfull
+ bIsReadonly = IsReadOnly( rMainURL ); // will be sal_False if Save was succesfull
}
}
else
{
- bNeedEntries = FALSE;
+ bNeedEntries = sal_False;
}
}
@@ -254,12 +254,12 @@ void ConvDic::Load()
DBG_ASSERT( !bIsModified, "dictionary is modified. Really do 'Load'?" );
//!! prevent function from being called recursively via HasEntry, AddEntry
- bNeedEntries = FALSE;
+ bNeedEntries = sal_False;
ConvDicXMLImport *pImport = new ConvDicXMLImport( this, aMainURL );
//!! keep a first reference to ensure the lifetime of the object !!
uno::Reference< XInterface > xRef( (document::XFilter *) pImport, UNO_QUERY );
ReadThroughDic( aMainURL, *pImport ); // will implicitly add the entries
- bIsModified = FALSE;
+ bIsModified = sal_False;
}
@@ -320,7 +320,7 @@ void ConvDic::Save()
sal_Bool bRet = pExport->Export(); // write entries to file
DBG_ASSERT( !pStream->GetError(), "I/O error while writing to stream" );
if (bRet)
- bIsModified = FALSE;
+ bIsModified = sal_False;
}
DBG_ASSERT( !bIsModified, "dictionary still modified after save. Save failed?" );
}
@@ -342,7 +342,7 @@ ConvMap::iterator ConvDic::GetEntry( ConvMap &rMap, const rtl::OUString &rFirstT
}
-BOOL ConvDic::HasEntry( const OUString &rLeftText, const OUString &rRightText )
+sal_Bool ConvDic::HasEntry( const OUString &rLeftText, const OUString &rRightText )
{
if (bNeedEntries)
Load();
@@ -369,7 +369,7 @@ void ConvDic::AddEntry( const OUString &rLeftText, const OUString &rRightText )
nMaxRightCharCount = (sal_Int16) rRightText.getLength();
}
- bIsModified = TRUE;
+ bIsModified = sal_True;
}
@@ -389,8 +389,8 @@ void ConvDic::RemoveEntry( const OUString &rLeftText, const OUString &rRightText
pFromRight->erase( aRightIt );
}
- bIsModified = TRUE;
- bMaxCharCountIsValid = FALSE;
+ bIsModified = sal_True;
+ bMaxCharCountIsValid = sal_False;
}
@@ -441,11 +441,11 @@ void SAL_CALL ConvDic::clear( )
aFromLeft .clear();
if (pFromRight.get())
pFromRight->clear();
- bNeedEntries = FALSE;
- bIsModified = TRUE;
+ bNeedEntries = sal_False;
+ bIsModified = sal_True;
nMaxLeftCharCount = 0;
nMaxRightCharCount = 0;
- bMaxCharCountIsValid = TRUE;
+ bMaxCharCountIsValid = sal_True;
}
@@ -471,14 +471,14 @@ uno::Sequence< OUString > SAL_CALL ConvDic::getConversions(
pair< ConvMap::iterator, ConvMap::iterator > aRange =
rConvMap.equal_range( aLookUpText );
- INT32 nCount = 0;
+ sal_Int32 nCount = 0;
ConvMap::iterator aIt;
for (aIt = aRange.first; aIt != aRange.second; ++aIt)
++nCount;
uno::Sequence< OUString > aRes( nCount );
OUString *pRes = aRes.getArray();
- INT32 i = 0;
+ sal_Int32 i = 0;
for (aIt = aRange.first; aIt != aRange.second; ++aIt)
pRes[i++] = (*aIt).second;
@@ -486,19 +486,19 @@ uno::Sequence< OUString > SAL_CALL ConvDic::getConversions(
}
-static BOOL lcl_SeqHasEntry(
+static sal_Bool lcl_SeqHasEntry(
const OUString *pSeqStart, // first element to check
- INT32 nToCheck, // number of elements to check
+ sal_Int32 nToCheck, // number of elements to check
const OUString &rText)
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (pSeqStart && nToCheck > 0)
{
const OUString *pDone = pSeqStart + nToCheck; // one behind last to check
while (!bRes && pSeqStart != pDone)
{
if (*pSeqStart++ == rText)
- bRes = TRUE;
+ bRes = sal_True;
}
}
return bRes;
@@ -521,7 +521,7 @@ uno::Sequence< OUString > SAL_CALL ConvDic::getConversionEntries(
uno::Sequence< OUString > aRes( rConvMap.size() );
OUString *pRes = aRes.getArray();
ConvMap::iterator aIt = rConvMap.begin();
- INT32 nIdx = 0;
+ sal_Int32 nIdx = 0;
while (aIt != rConvMap.end())
{
OUString aCurEntry( (*aIt).first );
@@ -606,7 +606,7 @@ sal_Int16 SAL_CALL ConvDic::getMaxCharCount( ConversionDirection eDirection )
}
}
- bMaxCharCountIsValid = TRUE;
+ bMaxCharCountIsValid = sal_True;
}
sal_Int16 nRes = eDirection == ConversionDirection_FROM_LEFT ?
nMaxLeftCharCount : nMaxRightCharCount;