[Libreoffice-commits] core.git: 3 commits - svtools/source svx/source sw/sdi
Takeshi Abe
tabe at fixedpoint.jp
Fri Aug 23 17:06:10 PDT 2013
svtools/source/control/ruler.cxx | 60 ++--
svx/source/fmcomp/gridctrl.cxx | 24 -
svx/source/form/fmshimp.cxx | 48 +--
svx/source/form/tbxform.cxx | 2
svx/source/unodialogs/textconversiondlgs/services.cxx | 2
svx/source/unodraw/unoprov.cxx | 12
sw/sdi/swinterf.c | 242 ------------------
7 files changed, 74 insertions(+), 316 deletions(-)
New commits:
commit e926621fb00f31471b0037d7955b6a3d7f908dc0
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Sat Aug 24 08:48:24 2013 +0900
Mark as const
Change-Id: Ib5849c9a652401dbac7e93bb69c18d95d31292af
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index f931c4c..1ac3853 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -107,7 +107,7 @@ public:
ImplRulerData& operator=( const ImplRulerData& rData );
};
-static RulerUnitData aImplRulerUnitTab[RULER_UNIT_COUNT] =
+static const RulerUnitData aImplRulerUnitTab[RULER_UNIT_COUNT] =
{
{ MAP_100TH_MM, 100, 25, 50, 100, 100, 3, " mm" }, // MM
{ MAP_100TH_MM, 1000, 250, 500, 1000, 1000, 3, " cm" }, // CM
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 30fe1c3..1a36a86 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -245,7 +245,7 @@ DisposeListenerGridBridge::~DisposeListenerGridBridge()
//==============================================================================
-static sal_uInt16 ControlMap[] =
+static const sal_uInt16 ControlMap[] =
{
DbGridControl::NavigationBar::RECORD_TEXT,
DbGridControl::NavigationBar::RECORD_ABSOLUTE,
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 0ef26cd..ebf5260 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -103,7 +103,7 @@
#include <vector>
// wird fuer Invalidate verwendet -> mitpflegen
-static sal_uInt16 DatabaseSlotMap[] =
+static const sal_uInt16 DatabaseSlotMap[] =
{
SID_FM_RECORD_FIRST,
SID_FM_RECORD_NEXT,
@@ -131,7 +131,7 @@ static sal_uInt16 DatabaseSlotMap[] =
// wird fuer Invalidate verwendet -> mitpflegen
// aufsteigend sortieren !!!!!!
-static sal_Int16 DlgSlotMap[] = // slots des Controllers
+static const sal_Int16 DlgSlotMap[] = // slots des Controllers
{
SID_FM_CTL_PROPERTIES,
SID_FM_PROPERTIES,
@@ -147,7 +147,7 @@ static sal_Int16 DlgSlotMap[] = // slots des Controllers
0
};
-static sal_Int16 SelObjectSlotMap[] = // vom SelObject abhaengige Slots
+static const sal_Int16 SelObjectSlotMap[] = // vom SelObject abhaengige Slots
{
SID_FM_CONVERTTO_EDIT,
SID_FM_CONVERTTO_BUTTON,
@@ -178,7 +178,7 @@ static sal_Int16 SelObjectSlotMap[] = // vom SelObject abhaengige Slots
// die folgenden Arrays muessen kosistent sein, also einander entsprechende Eintraege an der selben relativen Position
// innerhalb ihres jeweiligen Arrays stehen
-static sal_Int16 nConvertSlots[] =
+static const sal_Int16 nConvertSlots[] =
{
SID_FM_CONVERTTO_EDIT,
SID_FM_CONVERTTO_BUTTON,
@@ -202,7 +202,7 @@ static sal_Int16 nConvertSlots[] =
SID_FM_CONVERTTO_NAVIGATIONBAR
};
-static sal_Int16 nCreateSlots[] =
+static const sal_Int16 nCreateSlots[] =
{
SID_FM_EDIT,
SID_FM_PUSHBUTTON,
@@ -226,7 +226,7 @@ static sal_Int16 nCreateSlots[] =
SID_FM_NAVIGATIONBAR
};
-static sal_Int16 nObjectTypes[] =
+static const sal_Int16 nObjectTypes[] =
{
OBJ_FM_EDIT,
OBJ_FM_BUTTON,
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 8407e8e..c3c1b0b 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -121,7 +121,7 @@ struct MapSlotToCmd
const char* pCommand;
};
-static MapSlotToCmd SlotToCommands[] =
+static const MapSlotToCmd SlotToCommands[] =
{
{ SID_FM_PUSHBUTTON, ".uno:Pushbutton" },
{ SID_FM_RADIOBUTTON, ".uno:RadioButton" },
diff --git a/svx/source/unodialogs/textconversiondlgs/services.cxx b/svx/source/unodialogs/textconversiondlgs/services.cxx
index 1bdd072..9519ad9 100644
--- a/svx/source/unodialogs/textconversiondlgs/services.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/services.cxx
@@ -20,7 +20,7 @@
#include "chinese_translation_unodialog.hxx"
#include <cppuhelper/implementationentry.hxx>
-static struct ::cppu::ImplementationEntry g_entries_unodialogs_chinesetranslation[] =
+static const struct ::cppu::ImplementationEntry g_entries_unodialogs_chinesetranslation[] =
{
{
::textconversiondlgs::ChineseTranslation_UnoDialog::create
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index ac17d01..47bb410 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -834,7 +834,7 @@ namespace {
static UHashMapImpl aImpl(63);
static bool bInited = false;
if (!bInited) {
- struct { const char *name; sal_Int32 length; sal_uInt32 id; } aInit[] = {
+ const struct { const char *name; sal_Int32 length; sal_uInt32 id; } aInit[] = {
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape"), OBJ_UNO },
@@ -1214,7 +1214,7 @@ bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount
// the possibility to define it wrong
// - change the compare to also work when a shorter name is in front of a longer one
-static sal_uInt16 SvxUnoColorNameDefResId[] =
+static const sal_uInt16 SvxUnoColorNameDefResId[] =
{
RID_SVXSTR_COLOR_BLUEGREY_DEF,
RID_SVXSTR_COLOR_BLACK_DEF,
@@ -1258,7 +1258,7 @@ static sal_uInt16 SvxUnoColorNameDefResId[] =
RID_SVXSTR_COLOR_TANGO_ALUMINIUM_DEF
};
-static sal_uInt16 SvxUnoColorNameResId[] =
+static const sal_uInt16 SvxUnoColorNameResId[] =
{
RID_SVXSTR_COLOR_BLUEGREY,
RID_SVXSTR_COLOR_BLACK,
@@ -1304,7 +1304,7 @@ static sal_uInt16 SvxUnoColorNameResId[] =
//////////////////////////////////////////////////////////////////////////////
-bool SvxUnoConvertResourceString( sal_uInt16* pSourceResIds, sal_uInt16* pDestResIds, int nCount, String& rString ) throw()
+bool SvxUnoConvertResourceString( const sal_uInt16* pSourceResIds, const sal_uInt16* pDestResIds, int nCount, String& rString ) throw()
{
//We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
//replace "Red Hat 1" with the translation of Red :-)
@@ -1343,7 +1343,7 @@ OUString SvxUnogetApiNameForItem(const sal_Int16 nWhich, const OUString& rIntern
if( nWhich == XATTR_LINECOLOR )
{
- if( SvxUnoConvertResourceString( (sal_uInt16*)SvxUnoColorNameResId, (sal_uInt16*)SvxUnoColorNameDefResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) )
+ if( SvxUnoConvertResourceString( SvxUnoColorNameResId, SvxUnoColorNameDefResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) )
{
return aNew;
}
@@ -1376,7 +1376,7 @@ OUString SvxUnogetInternalNameForItem(const sal_Int16 nWhich, const OUString& rA
if( nWhich == XATTR_LINECOLOR )
{
- if( SvxUnoConvertResourceString( (sal_uInt16*)SvxUnoColorNameDefResId, (sal_uInt16*)SvxUnoColorNameResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) )
+ if( SvxUnoConvertResourceString( SvxUnoColorNameDefResId, SvxUnoColorNameResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) )
{
return aNew;
}
commit e685f4d74ff9fda607a8bc62fa1947ca54853552
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Sat Aug 24 08:48:09 2013 +0900
sal_Bool to bool
Change-Id: Id6488ba7a72603f2f0eb2972f22797d6025f6031
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 369e7f8..f931c4c 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -98,7 +98,7 @@ private:
sal_uInt16 nTabs;
sal_uInt16 nMargin1Style;
sal_uInt16 nMargin2Style;
- sal_Bool bAutoPageWidth;
+ bool bAutoPageWidth;
sal_Bool bTextRTL;
public:
@@ -130,11 +130,11 @@ struct ImplRulerHitTest
RulerType eType;
sal_uInt16 nAryPos;
sal_uInt16 mnDragSize;
- sal_Bool bSize;
- sal_Bool bSizeBar;
- sal_Bool bExpandTest;
+ bool bSize;
+ bool bSizeBar;
+ bool bExpandTest;
ImplRulerHitTest() :
- bExpandTest( sal_False ) {}
+ bExpandTest( false ) {}
};
// =======================================================================
@@ -144,7 +144,7 @@ ImplRulerData::ImplRulerData()
memset( this, 0, sizeof( ImplRulerData ) );
// PageBreite == EditWinBreite
- bAutoPageWidth = sal_True;
+ bAutoPageWidth = true;
}
// -----------------------------------------------------------------------
@@ -436,7 +436,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
long nTickCount = aImplRulerUnitTab[mnUnitIndex].nTick1;
Size aPixSize = maVirDev.LogicToPixel( Size( nTick3, nTick3 ), maMapMode );
long nTickWidth;
- sal_Bool bNoTicks = sal_False;
+ bool bNoTicks = false;
long nTickUnit = 0;
long nTick2 = 0;
@@ -508,7 +508,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
// koennen
if ( nMulti < nOldMulti )
{
- bNoTicks = sal_True;
+ bNoTicks = true;
break;
}
@@ -770,7 +770,7 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom
static void ImplCenterTabPos( Point& rPos, sal_uInt16 nTabStyle )
{
- sal_Bool bRTL = 0 != (nTabStyle & RULER_TAB_RTL);
+ bool bRTL = 0 != (nTabStyle & RULER_TAB_RTL);
nTabStyle &= RULER_TAB_STYLE;
rPos.Y() += RULER_TAB_HEIGHT/2;
if ( (!bRTL && nTabStyle == RULER_TAB_LEFT) ||( bRTL && nTabStyle == RULER_TAB_RIGHT))
@@ -780,7 +780,7 @@ static void ImplCenterTabPos( Point& rPos, sal_uInt16 nTabStyle )
}
// -----------------------------------------------------------------------
-static void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, sal_Bool bRightAligned)
+static void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, bool bRightAligned)
{
if(!rRect.IsEmpty())
{
@@ -806,7 +806,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice,
return;
sal_uInt16 nTabStyle = nStyle & RULER_TAB_STYLE;
- sal_Bool bRTL = 0 != (nStyle & RULER_TAB_RTL);
+ bool bRTL = 0 != (nStyle & RULER_TAB_RTL);
Rectangle aRect1, aRect2, aRect3;
aRect3.SetEmpty();
if ( nTabStyle == RULER_TAB_DEFAULT )
@@ -864,7 +864,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice,
}
if( 0 == (nWinBits&WB_HORZ) )
{
- sal_Bool bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED);
+ bool bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED);
lcl_RotateRect_Impl(aRect1, rPos.Y(), bRightAligned);
lcl_RotateRect_Impl(aRect2, rPos.Y(), bRightAligned);
lcl_RotateRect_Impl(aRect3, rPos.Y(), bRightAligned);
@@ -1273,7 +1273,7 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aRect = maExtraRect;
- sal_Bool bEraseRect = sal_False;
+ bool bEraseRect = false;
aRect.Left() += 2;
aRect.Top() += 2;
@@ -1283,14 +1283,14 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint )
if ( !bPaint && !(mnExtraStyle & RULER_STYLE_HIGHLIGHT) )
{
SetFillColor( rStyleSettings.GetWorkspaceColor() );
- bEraseRect = sal_True;
+ bEraseRect = true;
}
else
{
if ( mnExtraStyle & RULER_STYLE_HIGHLIGHT )
{
SetFillColor( rStyleSettings.GetCheckedColor() );
- bEraseRect = sal_True;
+ bEraseRect = true;
}
}
@@ -1395,8 +1395,8 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
// #i32608#
pHitTest->nAryPos = 0;
pHitTest->mnDragSize = 0;
- pHitTest->bSize = sal_False;
- pHitTest->bSizeBar = sal_False;
+ pHitTest->bSize = false;
+ pHitTest->bSizeBar = false;
// Damit ueberstehende Tabs und Einzuege mit beruecksichtigt werden
long nXExtraOff;
@@ -1546,7 +1546,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
if ( nStyle & RULER_BORDER_MOVEABLE )
{
- pHitTest->bSizeBar = sal_True;
+ pHitTest->bSizeBar = true;
pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE;
}
}
@@ -1566,19 +1566,19 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( nX <= n1+nMOff )
{
- pHitTest->bSize = sal_True;
+ pHitTest->bSize = true;
pHitTest->mnDragSize = RULER_DRAGSIZE_1;
}
else if ( nX >= n2-nMOff )
{
- pHitTest->bSize = sal_True;
+ pHitTest->bSize = true;
pHitTest->mnDragSize = RULER_DRAGSIZE_2;
}
else
{
if ( nStyle & RULER_BORDER_MOVEABLE )
{
- pHitTest->bSizeBar = sal_True;
+ pHitTest->bSizeBar = true;
pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE;
}
}
@@ -1598,7 +1598,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{
pHitTest->eType = RULER_TYPE_MARGIN1;
- pHitTest->bSize = sal_True;
+ pHitTest->bSize = true;
return sal_True;
}
}
@@ -1608,7 +1608,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{
pHitTest->eType = RULER_TYPE_MARGIN2;
- pHitTest->bSize = sal_True;
+ pHitTest->bSize = true;
return sal_True;
}
}
@@ -2272,7 +2272,7 @@ sal_Bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
sal_uInt16 nMouseModifier = rMEvt.GetModifier();
ImplRulerHitTest aHitTest;
if(eDragType != RULER_TYPE_DONTKNOW)
- aHitTest.bExpandTest = sal_True;
+ aHitTest.bExpandTest = true;
// Gegebenenfalls Lineal updaten (damit mit den richtigen Daten
// gearbeitet wird und die Anzeige auch zur Bearbeitung passt)
@@ -2388,9 +2388,9 @@ void Ruler::SetPagePos( long nNewOff, long nNewWidth )
// Gegebenenfalls werden die Breiten automatisch berechnet
if ( !nNewWidth )
- mpData->bAutoPageWidth = sal_True;
+ mpData->bAutoPageWidth = true;
else
- mpData->bAutoPageWidth = sal_False;
+ mpData->bAutoPageWidth = false;
// Werte setzen (werden in ImplFormat gegebenenfalls mitberechnet)
mpData->nPageOff = nNewOff;
@@ -2576,11 +2576,11 @@ void Ruler::SetLines( sal_uInt16 n, const RulerLine* pLineAry )
}
// New values and new share issue
- sal_Bool bMustUpdate;
+ bool bMustUpdate;
if ( IsReallyVisible() && IsUpdateMode() )
- bMustUpdate = sal_True;
+ bMustUpdate = true;
else
- bMustUpdate = sal_False;
+ bMustUpdate = false;
// Delete old lines
if ( bMustUpdate )
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 38c31f5..30fe1c3 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -130,7 +130,7 @@ class GridFieldValueListener : protected ::comphelper::OPropertyChangeListener
::comphelper::OPropertyChangeMultiplexer* m_pRealListener;
sal_uInt16 m_nId;
sal_Int16 m_nSuspended;
- sal_Bool m_bDisposed : 1;
+ bool m_bDisposed : 1;
public:
GridFieldValueListener(DbGridControl& _rParent, const Reference< XPropertySet >& xField, sal_uInt16 _nId);
@@ -150,7 +150,7 @@ GridFieldValueListener::GridFieldValueListener(DbGridControl& _rParent, const Re
,m_pRealListener(NULL)
,m_nId(_nId)
,m_nSuspended(0)
- ,m_bDisposed(sal_False)
+ ,m_bDisposed(false)
{
DBG_CTOR(GridFieldValueListener, NULL);
if (_rField.is())
@@ -192,7 +192,7 @@ void GridFieldValueListener::dispose()
m_pRealListener = NULL;
}
- m_bDisposed = sal_True;
+ m_bDisposed = true;
m_rParent.FieldListenerDisposing(m_nId);
}
@@ -1312,7 +1312,7 @@ sal_uInt16 DbGridControl::SetOptions(sal_uInt16 nOpt)
// _after_ setting the mode because this results in an ActivateCell
DeactivateCell();
- sal_Bool bInsertChanged = (nOpt & OPT_INSERT) != (m_nOptions & OPT_INSERT);
+ bool bInsertChanged = (nOpt & OPT_INSERT) != (m_nOptions & OPT_INSERT);
m_nOptions = nOpt;
// we need to set this before the code below because it indirectly uses m_nOptions
@@ -1858,7 +1858,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B
}
// ignore any updates implicit made
- sal_Bool bDisablePaint = !bUpdateCursor && IsPaintEnabled();
+ bool bDisablePaint = !bUpdateCursor && IsPaintEnabled();
if (bDisablePaint)
EnablePaint(sal_False);
@@ -1866,7 +1866,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B
Reference< XPropertySet > xSet = m_pSeekCursor->getPropertySet();
sal_Int32 nCacheSize = 0;
xSet->getPropertyValue(FM_PROP_FETCHSIZE) >>= nCacheSize;
- sal_Bool bCacheAligned = sal_False;
+ bool bCacheAligned = false;
// Nach der Initialisierung (m_nSeekPos < 0) keine Cursorbewegung, da bereits auf den ersten
// Satz positioniert
long nDelta = nNewTopRow - GetTopRow();
@@ -1881,7 +1881,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B
xSet->setPropertyValue(FM_PROP_FETCHSIZE, aCacheSize);
// jetzt auf alle Faelle den Cursor anpassen
bUpdateCursor = sal_True;
- bCacheAligned = sal_True;
+ bCacheAligned = true;
nLimit = nLinesOnScreen;
}
@@ -2103,7 +2103,7 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow)
}
else
{
- sal_Bool bNewRowInserted = sal_False;
+ bool bNewRowInserted = false;
// Should we go to the insertrow ?
if (IsInsertionRow(nNewRow))
{
@@ -2116,7 +2116,7 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow)
Reference< XResultSetUpdate > xUpdateCursor((Reference< XInterface >)*m_pDataCursor, UNO_QUERY);
xUpdateCursor->moveToInsertRow();
}
- bNewRowInserted = sal_True;
+ bNewRowInserted = true;
}
else
{
@@ -3261,7 +3261,7 @@ sal_Bool DbGridControl::SaveRow()
BeginCursorAction();
sal_Bool bAppending = m_xCurrentRow->IsNew();
- sal_Bool bSuccess = sal_False;
+ bool bSuccess = false;
try
{
Reference< XResultSetUpdate > xUpdateCursor((Reference< XInterface >)*m_pDataCursor, UNO_QUERY);
@@ -3269,7 +3269,7 @@ sal_Bool DbGridControl::SaveRow()
xUpdateCursor->insertRow();
else
xUpdateCursor->updateRow();
- bSuccess = sal_True;
+ bSuccess = true;
}
catch(SQLException&)
{
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 52c9eff..0ef26cd 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1914,8 +1914,8 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle
xOldForm = getInternalForm(xOldForm);
xNewForm = getInternalForm(xNewForm);
- sal_Bool bDifferentForm = ( xOldForm.get() != xNewForm.get() );
- sal_Bool bNeedSave = bDifferentForm && !_bNoSaveOldContent;
+ bool bDifferentForm = ( xOldForm.get() != xNewForm.get() );
+ bool bNeedSave = bDifferentForm && !_bNoSaveOldContent;
// we save the content of the old form if we move to a new form, and saving old content is allowed
if ( m_xActiveController.is() && bNeedSave )
@@ -2777,23 +2777,23 @@ class FmXFormShell::SuspendPropertyTracking
{
private:
FmXFormShell& m_rShell;
- sal_Bool m_bEnabled;
+ bool m_bEnabled;
public:
SuspendPropertyTracking( FmXFormShell& _rShell )
:m_rShell( _rShell )
- ,m_bEnabled( sal_False )
+ ,m_bEnabled( false )
{
if ( m_rShell.IsTrackPropertiesEnabled() )
{
m_rShell.EnableTrackProperties( sal_False );
- m_bEnabled = sal_True;
+ m_bEnabled = true;
}
}
~SuspendPropertyTracking( )
{
- if ( m_bEnabled ) // note that ( sal_False != m_bEnabled ) implies ( NULL != m_pShell )
+ if ( m_bEnabled ) // note that ( false != m_bEnabled ) implies ( NULL != m_pShell )
m_rShell.EnableTrackProperties( sal_True );
}
};
@@ -3187,7 +3187,7 @@ void FmXFormShell::CreateExternalView()
{
FmXBoundFormFieldIterator aModelIterator(xCurrentNavController->getModel());
Reference< XPropertySet> xCurrentModelSet;
- sal_Bool bHaveUsableControls = sal_False;
+ bool bHaveUsableControls = false;
while ((xCurrentModelSet = Reference< XPropertySet>(aModelIterator.Next(), UNO_QUERY)).is())
{
// the FmXBoundFormFieldIterator only supplies controls with a valid control source
@@ -3199,7 +3199,7 @@ void FmXFormShell::CreateExternalView()
case FormComponentType::CONTROL:
continue;
}
- bHaveUsableControls = sal_True;
+ bHaveUsableControls = true;
break;
}
@@ -3840,38 +3840,38 @@ IMPL_LINK( FmXFormShell, OnLoadForms, FmFormPage*, /*_pPage*/ )
//------------------------------------------------------------------------------
namespace
{
- sal_Bool lcl_isLoadable( const Reference< XInterface >& _rxLoadable )
+ bool lcl_isLoadable( const Reference< XInterface >& _rxLoadable )
{
// determines whether a form should be loaded or not
// if there is no datasource or connection there is no reason to load a form
Reference< XPropertySet > xSet( _rxLoadable, UNO_QUERY );
if ( !xSet.is() )
- return sal_False;
+ return false;
try
{
Reference< XConnection > xConn;
if ( OStaticDataAccessTools().isEmbeddedInDatabase( _rxLoadable.get(), xConn ) )
- return sal_True;
+ return true;
// is there already a active connection
xSet->getPropertyValue(FM_PROP_ACTIVE_CONNECTION) >>= xConn;
if ( xConn.is() )
- return sal_True;
+ return true;
OUString sPropertyValue;
OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DATASOURCE ) >>= sPropertyValue );
if ( !sPropertyValue.isEmpty() )
- return sal_True;
+ return true;
OSL_VERIFY( xSet->getPropertyValue( FM_PROP_URL ) >>= sPropertyValue );
if ( !sPropertyValue.isEmpty() )
- return sal_True;
+ return true;
}
catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
- return sal_False;
+ return false;
}
}
@@ -3908,11 +3908,11 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour /
if ( xForms.is() )
{
Reference< XLoadable > xForm;
- sal_Bool bFormWasLoaded = sal_False;
+ bool bFormWasLoaded = false;
for ( sal_Int32 j = 0, nCount = xForms->getCount(); j < nCount; ++j )
{
xForms->getByIndex( j ) >>= xForm;
- bFormWasLoaded = sal_False;
+ bFormWasLoaded = false;
// a database form must be loaded for
try
{
@@ -3925,7 +3925,7 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour /
{
if ( xForm->isLoaded() )
{
- bFormWasLoaded = sal_True;
+ bFormWasLoaded = true;
xForm->unload();
}
}
commit c0c366bbf4e1d1a9f0fa2df6c24569ec547bfea4
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Fri Aug 23 16:30:10 2013 +0900
Bin never-used swinterf.c
Change-Id: I54471f1b554d20cfaefaac78fb8b145f8a0cf2fe
diff --git a/sw/sdi/swinterf.c b/sw/sdi/swinterf.c
deleted file mode 100644
index 1888f91..0000000
--- a/sw/sdi/swinterf.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <stdio.h>
-
-#include <svinterf.h>
-#include <cmdid.h>
-
-static char pEmpty[] = "";
-
-extern void *pSvClient;
-
-/* WRITER */
-short SwInsertDocument (void *pHandle,
- const char *pFileName,
- const char *pFilter)
-{
- return 0;
-}
-
-/**************************************************************************/
-
-/* WRITER */
-short SwDeleteTableColumns (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_COL | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwDeleteTableRows (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_ROW | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwGotoStartOfTable (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_START_TABLE | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwGotoEndOfTable (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_END_TABLE | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwGotoNextTable (void *pHandle)
-{
- return 0;
-}
-
-/* WRITER */
-short SwGotoPrevTable (void *pHandle)
-{
- return 0;
-}
-
-/* WRITER */
-short SwSelectTableRow (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ROW | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwSelectTableColumn (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_COL | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwTableSelect (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ALL | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwInsertTable (void *pHandle, const char *pName,
- unsigned short nRow, unsigned short nColumn)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_TABLE | 0x10000,
- pHandle,0,"hh",nRow,nColumn);
- return 0;
-
-}
-
-/**************************************************************************/
-
-/* WRITER */
-short SwCharLeft(void *pHandle, unsigned short nCount, unsigned short bSelect)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_CHAR_LEFT | 0x10000,
- pHandle,0,"hb",nCount,bSelect);
- return 0;
-}
-
-/* WRITER */
-short SwCharRight(void *pHandle, unsigned short nCount, unsigned short bSelect)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_CHAR_RIGHT | 0x10000,
- pHandle,0,"hb",nCount,bSelect);
- return 0;
-}
-
-/* WRITER */
-short SwLineUp(void *pHandle, unsigned short nCount, unsigned short bSelect)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_LINE_UP | 0x10000,
- pHandle,0,"hb",nCount,bSelect);
- return 0;
-}
-
-/* WRITER */
-short SwLineDown(void *pHandle, unsigned short nCount, unsigned short bSelect)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_LINE_DOWN | 0x10000,
- pHandle,0,"hb",nCount,bSelect);
- return 0;
-}
-
-/**************************************************************************/
-
-/* WRITER */
-const char *SwGetSelectedText(void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallStringFunction(SvIPCGetClient(),FN_GET_SELECTED_TEXT,
- pHandle,0,pEmpty);
- return NULL;
-}
-
-/* WRITER */
-short SwInsertString(void *pHandle,const char *pString)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_STRING | 0x10000,
- pHandle,0,"s",pString);
- return 0;
-}
-
-/* WRITER */
-extern short SwInsertLineBreak(void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_LINEBREAK | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/**************************************************************************/
-
-/* WRITER */
-short SwDelLeft (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_BACKSPACE | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwDelRight (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwDelLine (void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE_WHOLE_LINE | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/**************************************************************************/
-
-/* WRITER */
-short SwCharDlg(void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_CHAR_DLG | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-/* WRITER */
-short SwParagrDlg(void *pHandle)
-{
- if (SvIPCIsConnected())
- return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_PARA_DLG | 0x10000,
- pHandle,0,pEmpty);
- return 0;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list