summaryrefslogtreecommitdiff
path: root/sd/source/ui/func/futext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/func/futext.cxx')
-rw-r--r--sd/source/ui/func/futext.cxx201
1 files changed, 106 insertions, 95 deletions
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 688b93887ffe..05ae15a565a3 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -88,7 +88,7 @@ using namespace ::com::sun::star::linguistic2;
namespace sd {
-static USHORT SidArray[] = {
+static sal_uInt16 SidArray[] = {
SID_STYLE_FAMILY2, // 5542
SID_STYLE_FAMILY5, // 5545
SID_CUT, // 5710
@@ -129,7 +129,7 @@ static USHORT SidArray[] = {
TYPEINIT1( FuText, FuConstruct );
-static BOOL bTestText = 0;
+static sal_Bool bTestText = 0;
/*************************************************************************
|*
@@ -139,7 +139,7 @@ static BOOL bTestText = 0;
FuText::FuText( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
: FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
-, bFirstObjCreated(FALSE)
+, bFirstObjCreated(sal_False)
, rRequest (rReq)
{
}
@@ -160,7 +160,7 @@ void FuText::disposing()
{
if(mpView)
{
- if(mpView->SdrEndTextEdit(FALSE) == SDRENDTEXTEDIT_DELETED)
+ if(mpView->SdrEndTextEdit(sal_False) == SDRENDTEXTEDIT_DELETED)
mxTextObj.reset( 0 );
// die RequestHandler der benutzten Outliner zuruecksetzen auf den
@@ -233,7 +233,7 @@ void FuText::DoExecute( SfxRequest& )
}
}
- BOOL bQuickDrag = TRUE;
+ sal_Bool bQuickDrag = sal_True;
const SfxItemSet* pArgs = rRequest.GetArgs();
@@ -243,10 +243,10 @@ void FuText::DoExecute( SfxRequest& )
&& SID_TEXTEDIT == nSlotId
&& SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT)
- && (UINT16)((SfxUInt16Item&)pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
+ && (sal_uInt16)((SfxUInt16Item&)pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
{
// Selection by doubleclick -> don't allow QuickDrag
- bQuickDrag = FALSE;
+ bQuickDrag = sal_False;
}
SetInEditMode(aMEvt, bQuickDrag);
@@ -258,13 +258,13 @@ void FuText::DoExecute( SfxRequest& )
|*
\************************************************************************/
-BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
- bMBDown = TRUE;
+ bMBDown = sal_True;
- BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
- mpView->SetMarkHdlWhenTextEdit(TRUE);
+ mpView->SetMarkHdlWhenTextEdit(sal_True);
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
@@ -272,7 +272,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
// Text getroffen -> Event von SdrView auswerten lassen
if (mpView->MouseButtonDown(rMEvt, mpWindow))
- return (TRUE);
+ return (sal_True);
}
if (rMEvt.GetClicks() == 1)
@@ -306,16 +306,16 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
if (eHit == SDRHIT_TEXTEDIT)
{
- SetInEditMode(rMEvt, FALSE);
+ SetInEditMode(rMEvt, sal_False);
}
else
{
- BOOL bMacro = FALSE;
+ sal_Bool bMacro = sal_False;
if (bMacro && mpView->PickObj(aMDPos,mpView->getHitTolLog(),pObj,pPV,SDRSEARCH_PICKMACRO))
{
// Makro
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
mpView->BegMacroObj(aMDPos,nHitLog,pObj,pPV,mpWindow);
}
else
@@ -353,7 +353,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
mxTextObj.reset( static_cast<SdrTextObj*>(aVEvt.pObj) );
}
- SetInEditMode(rMEvt, TRUE);
+ SetInEditMode(rMEvt, sal_True);
}
else if (aVEvt.eEvent == SDREVENT_EXECUTEURL && !rMEvt.IsMod2())
{
@@ -363,7 +363,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
mpWindow->ReleaseMouse();
SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL());
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
- SfxBoolItem aBrowseItem( SID_BROWSE, TRUE );
+ SfxBoolItem aBrowseItem( SID_BROWSE, sal_True );
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
mpWindow->ReleaseMouse();
@@ -421,7 +421,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
}
// Drag object
- bFirstMouseMove = TRUE;
+ bFirstMouseMove = sal_True;
aDragTimer.Start();
}
@@ -432,7 +432,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
if( (eHit == SDRHIT_HANDLE) || (eHit == SDRHIT_MARKEDOBJECT) )
{
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog);
}
}
@@ -447,7 +447,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
**********************************************************/
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_CREATE);
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegCreateObj(aMDPos, (OutputDevice*) NULL, nDrgLog);
}
else
@@ -467,7 +467,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
else if ( rMEvt.GetClicks() == 2 && !mpView->IsTextEdit() )
{
MouseEvent aMEvt( mpWindow->GetPointerPosPixel() );
- SetInEditMode( aMEvt, FALSE );
+ SetInEditMode( aMEvt, sal_False );
}
if (!bIsInDragMode)
@@ -485,14 +485,14 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuText::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuDraw::MouseMove(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseMove(rMEvt);
if (aDragTimer.IsActive() )
{
if( bFirstMouseMove )
- bFirstMouseMove = FALSE;
+ bFirstMouseMove = sal_False;
else
aDragTimer.Stop();
}
@@ -528,8 +528,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
// Hoehe bekommt (sonst wird zuviel gepainted)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameHeightItem(0));
- aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
- aSet.Put(SdrTextAutoGrowHeightItem(TRUE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_True));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
aSet.Put(SdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height()));
@@ -539,8 +539,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
{
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameWidthItem(0));
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
// Needs to be set since default is SDRTEXTHORZADJUST_BLOCK
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
@@ -557,8 +557,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
// draw text object, needs to be initialized when vertical text is used
SfxItemSet aSet(mpViewShell->GetPool());
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
// Set defaults for vertical klick-n'drag text object, pool defaults are:
// SdrTextVertAdjustItem: SDRTEXTVERTADJUST_TOP
@@ -578,8 +578,8 @@ void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
SfxItemSet aSet(mpViewShell->GetPool(), SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
- aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
}
@@ -590,8 +590,8 @@ void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj)
SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
- aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
}
@@ -607,8 +607,8 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameHeightItem(0));
aSet.Put(SdrTextMaxFrameHeightItem(0));
- aSet.Put(SdrTextAutoGrowHeightItem(TRUE));
- aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_True));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
pTxtObj->SetMergedItemSet(aSet);
}
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
@@ -616,8 +616,8 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameWidthItem(0));
aSet.Put(SdrTextMaxFrameWidthItem(0));
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
pTxtObj->SetMergedItemSet(aSet);
}
@@ -625,14 +625,14 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj)
}
}
-BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (aDragTimer.IsActive())
{
aDragTimer.Stop();
- bIsInDragMode = FALSE;
+ bIsInDragMode = sal_False;
}
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
@@ -640,9 +640,9 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
if( (mpView && mpView->MouseButtonUp(rMEvt, mpWindow)) || rMEvt.GetClicks() == 2 )
- return (TRUE); // Event von der SdrView ausgewertet
+ return (sal_True); // Event von der SdrView ausgewertet
- BOOL bEmptyTextObj = FALSE;
+ sal_Bool bEmptyTextObj = sal_False;
if (mxTextObj.is())
{
@@ -652,9 +652,9 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
&& ( rMarkList.GetMark(0)->GetMarkedSdrObj() == mxTextObj.get()) )
{
if( mxTextObj.is() && !GetTextObj()->GetOutlinerParaObject() )
- bEmptyTextObj = TRUE;
+ bEmptyTextObj = sal_True;
else
- bFirstObjCreated = TRUE;
+ bFirstObjCreated = sal_True;
}
else
{
@@ -668,17 +668,28 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
* Objekt wurde verschoben
**********************************************************************/
FrameView* pFrameView = mpViewShell->GetFrameView();
- BOOL bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
+ sal_Bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
if (bDragWithCopy)
{
- bDragWithCopy = !mpView->IsPresObjSelected(FALSE, TRUE);
+ bDragWithCopy = !mpView->IsPresObjSelected(sal_False, sal_True);
}
mpView->SetDragWithCopy(bDragWithCopy);
mpView->EndDragObj( mpView->IsDragWithCopy() );
mpView->ForceMarkedToAnotherPage();
mpView->SetCurrentObj(OBJ_TEXT);
+
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+
+ if ( mpView->IsRotateAllowed() && mpViewShell->GetFrameView()->IsClickChangeRotation() && (rMEvt.GetClicks() != 2) &&
+ !rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() && !rMEvt.IsRight() &&
+ Abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
+ Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
+ {
+ // toggle to rotation mode
+ mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_OBJECT_ROTATE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
+ }
}
else if( mpView && mpView->IsCreateObj() && rMEvt.IsLeft())
{
@@ -694,7 +705,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
// vertical when there was a vertical one used last time.
OutlinerParaObject* pOPO = GetTextObj()->GetOutlinerParaObject();
SdrOutliner& rOutl = mxTextObj->GetModel()->GetDrawOutliner(GetTextObj());
- BOOL bVertical((pOPO && pOPO->IsVertical())
+ sal_Bool bVertical((pOPO && pOPO->IsVertical())
|| nSlotId == SID_ATTR_CHAR_VERTICAL
|| nSlotId == SID_TEXT_FITTOSIZE_VERTICAL);
rOutl.SetVertical(bVertical);
@@ -729,13 +740,13 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
{
ImpSetAttributesFitToSize(GetTextObj());
- SetInEditMode(rMEvt, FALSE);
+ SetInEditMode(rMEvt, sal_False);
}
else if ( nSlotId == SID_TEXT_FITTOSIZE_VERTICAL )
{
ImpSetAttributesFitToSizeVertical(GetTextObj());
- SetInEditMode(rMEvt, FALSE);
+ SetInEditMode(rMEvt, sal_False);
}
else
{
@@ -744,7 +755,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
// Damit die Handles und der graue Rahmen stimmen
mpView->AdjustMarkHdl();
mpView->PickHandle(aPnt);
- SetInEditMode(rMEvt, FALSE);
+ SetInEditMode(rMEvt, sal_False);
}
}
else if ( mpView && mpView->IsAction())
@@ -754,7 +765,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
ForcePointer(&rMEvt);
mpWindow->ReleaseMouse();
- USHORT nDrgLog1 = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog1 = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
if ( mpView && !mpView->AreObjectsMarked() &&
Abs(aMDPos.X() - aPnt.X()) < nDrgLog1 &&
@@ -779,13 +790,13 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
**********************************************************************/
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_CREATE);
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegCreateObj(aMDPos, (OutputDevice*) NULL, nDrgLog);
- BOOL bSnapEnabled = mpView->IsSnapEnabled();
+ sal_Bool bSnapEnabled = mpView->IsSnapEnabled();
if (bSnapEnabled)
- mpView->SetSnapEnabled(FALSE);
+ mpView->SetSnapEnabled(sal_False);
aPnt.X() += nDrgLog + nDrgLog;
aPnt.Y() += nDrgLog + nDrgLog;
@@ -795,7 +806,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
if(mxTextObj.is())
{
- GetTextObj()->SetDisableAutoWidthOnDragging(TRUE);
+ GetTextObj()->SetDisableAutoWidthOnDragging(sal_True);
}
if(!mpView->EndCreateObj(SDRCREATE_FORCEEND))
@@ -811,8 +822,8 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameHeightItem(0));
aSet.Put(SdrTextMinFrameWidthItem(0));
- aSet.Put(SdrTextAutoGrowHeightItem(TRUE));
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_True));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
if(nSlotId == SID_ATTR_CHAR_VERTICAL)
{
@@ -880,11 +891,11 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
}
GetTextObj()->SetMergedItemSet(aSet);
- GetTextObj()->SetDisableAutoWidthOnDragging(TRUE);
- SetInEditMode(rMEvt, FALSE);
+ GetTextObj()->SetDisableAutoWidthOnDragging(sal_True);
+ SetInEditMode(rMEvt, sal_False);
}
- bFirstObjCreated = TRUE;
+ bFirstObjCreated = sal_True;
}
else
{
@@ -899,7 +910,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
}
}
- bMBDown = FALSE;
+ bMBDown = sal_False;
FuConstruct::MouseButtonUp(rMEvt);
return (bReturn);
}
@@ -908,18 +919,18 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuText::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuText::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
- mpView->SetMarkHdlWhenTextEdit(TRUE);
+ sal_Bool bReturn = sal_False;
+ mpView->SetMarkHdlWhenTextEdit(sal_True);
KeyCode nCode = rKEvt.GetKeyCode();
- BOOL bShift = nCode.IsShift();
+ sal_Bool bShift = nCode.IsShift();
if(mxTextObj.is())
{
@@ -942,14 +953,14 @@ BOOL FuText::KeyInput(const KeyEvent& rKEvt)
if ( mxTextObj.is() && mxTextObj->GetObjInventor() == SdrInventor && mxTextObj->GetObjIdentifier() == OBJ_TITLETEXT && rKEvt.GetKeyCode().GetCode() == KEY_RETURN )
{
// Titeltext-Objekt: immer "weiche" Umbrueche
- bShift = TRUE;
+ bShift = sal_True;
}
- USHORT nKey = nCode.GetCode();
+ sal_uInt16 nKey = nCode.GetCode();
KeyCode aKeyCode (nKey, bShift, nCode.IsMod1(), nCode.IsMod2(), nCode.IsMod3() );
KeyEvent aKEvt(rKEvt.GetCharCode(), aKeyCode);
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if (mpDocSh->IsReadOnly())
{
@@ -957,12 +968,12 @@ BOOL FuText::KeyInput(const KeyEvent& rKEvt)
}
if( aKeyCode.GetCode() == KEY_PAGEUP || aKeyCode.GetCode() == KEY_PAGEDOWN )
{
- bOK = FALSE; // default handling in base class
+ bOK = sal_False; // default handling in base class
}
if (bOK && mpView->KeyInput(aKEvt, mpWindow) )
{
- bReturn = TRUE;
+ bReturn = sal_True;
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
@@ -1039,7 +1050,7 @@ void FuText::Deactivate()
|*
\************************************************************************/
-void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
+void FuText::SetInEditMode(const MouseEvent& rMEvt, sal_Bool bQuickDrag)
{
SdrPageView* pPV = mpView->GetSdrPageView();
if( mxTextObj.is() && (mxTextObj->GetPage() == pPV->GetPage()) )
@@ -1051,12 +1062,12 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
else
mpView->SetEditMode(SDREDITMODE_EDIT);
- BOOL bEmptyOutliner = FALSE;
+ sal_Bool bEmptyOutliner = sal_False;
if (!GetTextObj()->GetOutlinerParaObject() && mpView->GetTextEditOutliner())
{
::Outliner* pOutl = mpView->GetTextEditOutliner();
- ULONG nParaAnz = pOutl->GetParagraphCount();
+ sal_uLong nParaAnz = pOutl->GetParagraphCount();
Paragraph* p1stPara = pOutl->GetParagraph( 0 );
if (nParaAnz==1 && p1stPara)
@@ -1064,15 +1075,15 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
// Bei nur einem Pararaph
if (pOutl->GetText(p1stPara).Len() == 0)
{
- bEmptyOutliner = TRUE;
+ bEmptyOutliner = sal_True;
}
}
}
if (GetTextObj() != mpView->GetTextEditObject() || bEmptyOutliner)
{
- UINT32 nInv = mxTextObj->GetObjInventor();
- UINT16 nSdrObjKind = mxTextObj->GetObjIdentifier();
+ sal_uInt32 nInv = mxTextObj->GetObjInventor();
+ sal_uInt16 nSdrObjKind = mxTextObj->GetObjIdentifier();
if (nInv == SdrInventor && GetTextObj()->HasTextEdit() &&
(nSdrObjKind == OBJ_TEXT ||
@@ -1090,7 +1101,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
{
OutlinerParaObject* pOPO = pTextObj->GetOutlinerParaObject();
if( ( pOPO && pOPO->IsVertical() ) || (nSlotId == SID_ATTR_CHAR_VERTICAL) || (nSlotId == SID_TEXT_FITTOSIZE_VERTICAL) )
- pOutl->SetVertical( TRUE );
+ pOutl->SetVertical( sal_True );
if( pTextObj->getTextCount() > 1 )
{
@@ -1101,7 +1112,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
if (mpView->SdrBeginTextEdit(pTextObj, pPV, mpWindow, sal_True, pOutl) && mxTextObj->GetObjInventor() == SdrInventor)
{
- bFirstObjCreated = TRUE;
+ bFirstObjCreated = sal_True;
DeleteDefaultText();
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
@@ -1158,9 +1169,9 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
|*
\************************************************************************/
-BOOL FuText::DeleteDefaultText()
+sal_Bool FuText::DeleteDefaultText()
{
- BOOL bDeleted = FALSE;
+ sal_Bool bDeleted = sal_False;
if ( mxTextObj.is() && mxTextObj->IsEmptyPresObj() )
{
@@ -1179,21 +1190,21 @@ BOOL FuText::DeleteDefaultText()
{
::Outliner* pOutliner = mpView->GetTextEditOutliner();
SfxStyleSheet* pSheet = pOutliner->GetStyleSheet( 0 );
- BOOL bIsUndoEnabled = pOutliner->IsUndoEnabled();
+ sal_Bool bIsUndoEnabled = pOutliner->IsUndoEnabled();
if( bIsUndoEnabled )
- pOutliner->EnableUndo(FALSE);
+ pOutliner->EnableUndo(sal_False);
pOutliner->SetText( String(), pOutliner->GetParagraph( 0 ) );
if( bIsUndoEnabled )
- pOutliner->EnableUndo(TRUE);
+ pOutliner->EnableUndo(sal_True);
if (pSheet &&
(ePresObjKind == PRESOBJ_NOTES || ePresObjKind == PRESOBJ_TEXT))
pOutliner->SetStyleSheet(0, pSheet);
- mxTextObj->SetEmptyPresObj(TRUE);
- bDeleted = TRUE;
+ mxTextObj->SetEmptyPresObj(sal_True);
+ bDeleted = sal_True;
}
}
}
@@ -1207,7 +1218,7 @@ BOOL FuText::DeleteDefaultText()
|*
\************************************************************************/
-BOOL FuText::Command(const CommandEvent& rCEvt)
+sal_Bool FuText::Command(const CommandEvent& rCEvt)
{
return( FuPoor::Command(rCEvt) );
}
@@ -1218,9 +1229,9 @@ BOOL FuText::Command(const CommandEvent& rCEvt)
|*
\************************************************************************/
-BOOL FuText::RequestHelp(const HelpEvent& rHEvt)
+sal_Bool FuText::RequestHelp(const HelpEvent& rHEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
@@ -1317,7 +1328,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
}
}
- BOOL bQuickDrag = TRUE;
+ sal_Bool bQuickDrag = sal_True;
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -1327,10 +1338,10 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
&& SID_TEXTEDIT == nSlotId
&& SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT)
- && (UINT16) ((SfxUInt16Item&) pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
+ && (sal_uInt16) ((SfxUInt16Item&) pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
{
// Anwahl per Doppelklick -> kein QuickDrag zulassen
- bQuickDrag = FALSE;
+ bQuickDrag = sal_False;
}
SetInEditMode(aMEvt, bQuickDrag);
@@ -1347,7 +1358,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
IMPL_LINK( FuText, SpellError, void *, nLang )
{
- String aError( SvtLanguageTable::GetLanguageString( (LanguageType)(ULONG)nLang ) );
+ String aError( SvtLanguageTable::GetLanguageString( (LanguageType)(sal_uLong)nLang ) );
ErrorHandler::HandleError(* new StringErrorInfo(
ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aError) );
return 0;