sal_Bool to bool
Change-Id: I248912310658aec789f89f9dba0821b7ec86163d
This commit is contained in:
@@ -308,8 +308,8 @@ void SwRedlineAcceptDlg::InitAuthors()
|
|||||||
if (pFilterPage->SelectAuthor(sOldAuthor) == LISTBOX_ENTRY_NOTFOUND && !aStrings.empty())
|
if (pFilterPage->SelectAuthor(sOldAuthor) == LISTBOX_ENTRY_NOTFOUND && !aStrings.empty())
|
||||||
pFilterPage->SelectAuthor(aStrings[0]);
|
pFilterPage->SelectAuthor(aStrings[0]);
|
||||||
|
|
||||||
sal_Bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
|
bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
|
||||||
sal_Bool bSel = pTable->FirstSelected() != 0;
|
bool bSel = pTable->FirstSelected() != 0;
|
||||||
|
|
||||||
SvTreeListEntry* pSelEntry = pTable->FirstSelected();
|
SvTreeListEntry* pSelEntry = pTable->FirstSelected();
|
||||||
while (pSelEntry)
|
while (pSelEntry)
|
||||||
@@ -561,7 +561,7 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRe
|
|||||||
String sChild;
|
String sChild;
|
||||||
SwRedlineDataChild *pLastRedlineChild = 0;
|
SwRedlineDataChild *pLastRedlineChild = 0;
|
||||||
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
|
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
|
||||||
sal_Bool bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0;
|
bool bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0;
|
||||||
|
|
||||||
const String *pAction = &GetActionText(rRedln);
|
const String *pAction = &GetActionText(rRedln);
|
||||||
sal_Bool bValidParent = !sFilterAction.Len() || sFilterAction == *pAction;
|
sal_Bool bValidParent = !sFilterAction.Len() || sFilterAction == *pAction;
|
||||||
@@ -650,7 +650,7 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
|
|||||||
// because of Bug of TLB that ALWAYS calls the SelectHandler at Remove:
|
// because of Bug of TLB that ALWAYS calls the SelectHandler at Remove:
|
||||||
pTable->SetSelectHdl(aOldSelectHdl);
|
pTable->SetSelectHdl(aOldSelectHdl);
|
||||||
pTable->SetDeselectHdl(aOldDeselectHdl);
|
pTable->SetDeselectHdl(aOldDeselectHdl);
|
||||||
sal_Bool bChildrenRemoved = sal_False;
|
bool bChildrenRemoved = false;
|
||||||
pTable->SelectAll(sal_False);
|
pTable->SelectAll(sal_False);
|
||||||
|
|
||||||
// set the cursor after the last entry because otherwise performance problem in TLB.
|
// set the cursor after the last entry because otherwise performance problem in TLB.
|
||||||
@@ -685,7 +685,7 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
aRedlineChildren.erase(it, it + nChildren);
|
aRedlineChildren.erase(it, it + nChildren);
|
||||||
bChildrenRemoved = sal_True;
|
bChildrenRemoved = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -955,7 +955,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, GotoHdl)
|
|||||||
aSelectTimer.Stop();
|
aSelectTimer.Stop();
|
||||||
|
|
||||||
sal_Bool bIsNotFormated = sal_False;
|
sal_Bool bIsNotFormated = sal_False;
|
||||||
sal_Bool bSel = sal_False;
|
bool bSel = false;
|
||||||
|
|
||||||
//#98883# don't select redlines while the dialog is not focussed
|
//#98883# don't select redlines while the dialog is not focussed
|
||||||
//#107938# But not only ask pTable if it has the focus. To move
|
//#107938# But not only ask pTable if it has the focus. To move
|
||||||
@@ -986,7 +986,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, GotoHdl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bSel = sal_True;
|
bSel = true;
|
||||||
|
|
||||||
// #98864# find the selected redline (ignore, if the redline is already gone)
|
// #98864# find the selected redline (ignore, if the redline is already gone)
|
||||||
sal_uInt16 nPos = GetRedlinePos(*pActEntry);
|
sal_uInt16 nPos = GetRedlinePos(*pActEntry);
|
||||||
@@ -1010,7 +1010,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, GotoHdl)
|
|||||||
pSh->EndAction();
|
pSh->EndAction();
|
||||||
pSh->SetCareWin(NULL);
|
pSh->SetCareWin(NULL);
|
||||||
}
|
}
|
||||||
sal_Bool bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
|
bool bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
|
||||||
pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ );
|
pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ );
|
||||||
pTPView->EnableReject( bEnable && bSel && bIsNotFormated /*&& !bReadonlySel*/ );
|
pTPView->EnableReject( bEnable && bSel && bIsNotFormated /*&& !bReadonlySel*/ );
|
||||||
pTPView->EnableRejectAll( bEnable && !bOnlyFormatedRedlines && !bHasReadonlySel );
|
pTPView->EnableRejectAll( bEnable && !bOnlyFormatedRedlines && !bHasReadonlySel );
|
||||||
|
@@ -79,11 +79,11 @@ static void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
|
|||||||
/*--------------------------------------------------------------------
|
/*--------------------------------------------------------------------
|
||||||
Description: determine lines and columns for table selection
|
Description: determine lines and columns for table selection
|
||||||
--------------------------------------------------------------------*/
|
--------------------------------------------------------------------*/
|
||||||
static sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
|
static bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
|
||||||
{
|
{
|
||||||
const SwTableNode* pTblNd = rSh.IsCrsrInTbl();
|
const SwTableNode* pTblNd = rSh.IsCrsrInTbl();
|
||||||
if( !pTblNd )
|
if( !pTblNd )
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
_FndBox aFndBox( 0, 0 );
|
_FndBox aFndBox( 0, 0 );
|
||||||
|
|
||||||
@@ -97,10 +97,10 @@ static sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
|
|||||||
}
|
}
|
||||||
rX = aFndBox.GetLines().size();
|
rX = aFndBox.GetLines().size();
|
||||||
if( !rX )
|
if( !rX )
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
rY = aFndBox.GetLines().front().GetBoxes().size();
|
rY = aFndBox.GetLines().front().GetBoxes().size();
|
||||||
return sal_True;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------
|
/*--------------------------------------------------------------------
|
||||||
|
@@ -92,9 +92,9 @@ sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
|
|||||||
if ( pObj )
|
if ( pObj )
|
||||||
{
|
{
|
||||||
SetAttributes( pObj );
|
SetAttributes( pObj );
|
||||||
sal_Bool bForceNoFillStyle = sal_False;
|
bool bForceNoFillStyle = false;
|
||||||
if ( ((SdrObjCustomShape*)pObj)->UseNoFillStyle() )
|
if ( ((SdrObjCustomShape*)pObj)->UseNoFillStyle() )
|
||||||
bForceNoFillStyle = sal_True;
|
bForceNoFillStyle = true;
|
||||||
|
|
||||||
SfxItemSet aAttr( m_pView->GetPool() );
|
SfxItemSet aAttr( m_pView->GetPool() );
|
||||||
if ( bForceNoFillStyle )
|
if ( bForceNoFillStyle )
|
||||||
@@ -138,7 +138,7 @@ void ConstCustomShape::Activate(const sal_uInt16 nSlotId)
|
|||||||
|
|
||||||
void ConstCustomShape::SetAttributes( SdrObject* pObj )
|
void ConstCustomShape::SetAttributes( SdrObject* pObj )
|
||||||
{
|
{
|
||||||
sal_Bool bAttributesAppliedFromGallery = sal_False;
|
bool bAttributesAppliedFromGallery = false;
|
||||||
|
|
||||||
if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) )
|
if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) )
|
||||||
{
|
{
|
||||||
@@ -181,7 +181,7 @@ void ConstCustomShape::SetAttributes( SdrObject* pObj )
|
|||||||
double a = nAngle * F_PI18000;
|
double a = nAngle * F_PI18000;
|
||||||
pObj->NbcRotate( pObj->GetSnapRect().Center(), nAngle, sin( a ), cos( a ) );
|
pObj->NbcRotate( pObj->GetSnapRect().Center(), nAngle, sin( a ), cos( a ) );
|
||||||
}
|
}
|
||||||
bAttributesAppliedFromGallery = sal_True;
|
bAttributesAppliedFromGallery = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -224,7 +224,7 @@ sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
|
|||||||
{
|
{
|
||||||
if (!pSdrView->HasMarkablePoints())
|
if (!pSdrView->HasMarkablePoints())
|
||||||
{
|
{
|
||||||
sal_Bool bUnlockView = !m_pSh->IsViewLocked();
|
bool bUnlockView = !m_pSh->IsViewLocked();
|
||||||
m_pSh->LockView( sal_True ); //lock visible section
|
m_pSh->LockView( sal_True ); //lock visible section
|
||||||
m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // deselect all
|
m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // deselect all
|
||||||
if( bUnlockView )
|
if( bUnlockView )
|
||||||
@@ -288,8 +288,8 @@ sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt)
|
|||||||
sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
|
sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
|
||||||
{
|
{
|
||||||
sal_Bool bReturn = sal_False;
|
sal_Bool bReturn = sal_False;
|
||||||
sal_Bool bCheckShell = sal_False;
|
bool bCheckShell = false;
|
||||||
sal_Bool bAutoCap = sal_False;
|
bool bAutoCap = false;
|
||||||
|
|
||||||
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
|
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
|
||||||
|
|
||||||
@@ -297,7 +297,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
|
|||||||
{
|
{
|
||||||
const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode();
|
const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode();
|
||||||
//objects with multiple point may end at the start position
|
//objects with multiple point may end at the start position
|
||||||
sal_Bool bMultiPoint = OBJ_PLIN == nDrawMode ||
|
bool bMultiPoint = OBJ_PLIN == nDrawMode ||
|
||||||
OBJ_PATHLINE == nDrawMode ||
|
OBJ_PATHLINE == nDrawMode ||
|
||||||
OBJ_FREELINE == nDrawMode;
|
OBJ_FREELINE == nDrawMode;
|
||||||
if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint))
|
if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint))
|
||||||
@@ -329,7 +329,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
|
|||||||
aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize()));
|
aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize()));
|
||||||
aReq.Done();
|
aReq.Done();
|
||||||
}
|
}
|
||||||
bAutoCap = sal_True;
|
bAutoCap = true;
|
||||||
if(m_pWin->GetFrmColCount() > 1)
|
if(m_pWin->GetFrmColCount() > 1)
|
||||||
{
|
{
|
||||||
SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL);
|
SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL);
|
||||||
@@ -386,7 +386,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
|
|||||||
}
|
}
|
||||||
m_pView->NoRotate();
|
m_pView->NoRotate();
|
||||||
|
|
||||||
bCheckShell = sal_True; // ggf BezierShell anwerfen
|
bCheckShell = true; // ggf BezierShell anwerfen
|
||||||
}
|
}
|
||||||
else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
|
else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
|
||||||
{
|
{
|
||||||
@@ -446,7 +446,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
|
|||||||
}
|
}
|
||||||
m_pView->NoRotate();
|
m_pView->NoRotate();
|
||||||
|
|
||||||
bCheckShell = sal_True; // ggf BezierShell anwerfen
|
bCheckShell = true; // ggf BezierShell anwerfen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -569,7 +569,7 @@ void InputEdit::UpdateRange(const String& rBoxes,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sal_Bool bFound = sal_False;
|
bool bFound = false;
|
||||||
sal_Unicode cCh;
|
sal_Unicode cCh;
|
||||||
sal_uInt16 nPos, nEndPos = 0, nStartPos = (sal_uInt16) aSelection.Min();
|
sal_uInt16 nPos, nEndPos = 0, nStartPos = (sal_uInt16) aSelection.Min();
|
||||||
if( nStartPos-- )
|
if( nStartPos-- )
|
||||||
@@ -585,13 +585,13 @@ void InputEdit::UpdateRange(const String& rBoxes,
|
|||||||
}
|
}
|
||||||
if( bFound )
|
if( bFound )
|
||||||
{
|
{
|
||||||
bFound = sal_False;
|
bFound = false;
|
||||||
nEndPos = nStartPos;
|
nEndPos = nStartPos;
|
||||||
while( nEndPos < nLen )
|
while( nEndPos < nLen )
|
||||||
{
|
{
|
||||||
if( cClose == (cCh = aActText.GetChar( nEndPos )))
|
if( cClose == (cCh = aActText.GetChar( nEndPos )))
|
||||||
{
|
{
|
||||||
bFound = sal_True;
|
bFound = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++nEndPos;
|
++nEndPos;
|
||||||
@@ -599,7 +599,7 @@ void InputEdit::UpdateRange(const String& rBoxes,
|
|||||||
// nur wenn akt. Pos im Breich oder direkt dahinter liegt
|
// nur wenn akt. Pos im Breich oder direkt dahinter liegt
|
||||||
if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() &&
|
if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() &&
|
||||||
(sal_uInt16)aSelection.Max() <= nEndPos + 1 ))
|
(sal_uInt16)aSelection.Max() <= nEndPos + 1 ))
|
||||||
bFound = sal_False;
|
bFound = false;
|
||||||
}
|
}
|
||||||
if( bFound )
|
if( bFound )
|
||||||
{
|
{
|
||||||
|
@@ -624,7 +624,7 @@ void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt )
|
|||||||
class SwZoomBox_Impl : public ComboBox
|
class SwZoomBox_Impl : public ComboBox
|
||||||
{
|
{
|
||||||
sal_uInt16 nSlotId;
|
sal_uInt16 nSlotId;
|
||||||
sal_Bool bRelease;
|
bool bRelease;
|
||||||
uno::Reference< frame::XDispatchProvider > m_xDispatchProvider;
|
uno::Reference< frame::XDispatchProvider > m_xDispatchProvider;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -648,7 +648,7 @@ SwZoomBox_Impl::SwZoomBox_Impl(
|
|||||||
const Reference< XDispatchProvider >& rDispatchProvider ):
|
const Reference< XDispatchProvider >& rDispatchProvider ):
|
||||||
ComboBox( pParent, SW_RES(RID_PVIEW_ZOOM_LB)),
|
ComboBox( pParent, SW_RES(RID_PVIEW_ZOOM_LB)),
|
||||||
nSlotId(nSlot),
|
nSlotId(nSlot),
|
||||||
bRelease(sal_True),
|
bRelease(true),
|
||||||
m_xDispatchProvider( rDispatchProvider )
|
m_xDispatchProvider( rDispatchProvider )
|
||||||
{
|
{
|
||||||
EnableAutocomplete( sal_False );
|
EnableAutocomplete( sal_False );
|
||||||
@@ -708,7 +708,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt )
|
|||||||
case KEY_TAB:
|
case KEY_TAB:
|
||||||
{
|
{
|
||||||
if ( KEY_TAB == nCode )
|
if ( KEY_TAB == nCode )
|
||||||
bRelease = sal_False;
|
bRelease = false;
|
||||||
else
|
else
|
||||||
nHandled = 1;
|
nHandled = 1;
|
||||||
Select();
|
Select();
|
||||||
@@ -735,7 +735,7 @@ void SwZoomBox_Impl::ReleaseFocus()
|
|||||||
{
|
{
|
||||||
if ( !bRelease )
|
if ( !bRelease )
|
||||||
{
|
{
|
||||||
bRelease = sal_True;
|
bRelease = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SfxViewShell* pCurSh = SfxViewShell::Current();
|
SfxViewShell* pCurSh = SfxViewShell::Current();
|
||||||
|
@@ -507,7 +507,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
|
|||||||
case SID_ATTR_PARA_LEFT_TO_RIGHT:
|
case SID_ATTR_PARA_LEFT_TO_RIGHT:
|
||||||
case SID_ATTR_PARA_RIGHT_TO_LEFT:
|
case SID_ATTR_PARA_RIGHT_TO_LEFT:
|
||||||
{
|
{
|
||||||
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
|
bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
|
||||||
|
|
||||||
const SfxPoolItem* pPoolItem;
|
const SfxPoolItem* pPoolItem;
|
||||||
if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
|
if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
|
||||||
|
@@ -172,11 +172,11 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh )
|
|||||||
delete pList;
|
delete pList;
|
||||||
}
|
}
|
||||||
|
|
||||||
static sal_Bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
|
static bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
|
||||||
{
|
{
|
||||||
Graphic aGraf( rSh.GetIMapGraphic() );
|
Graphic aGraf( rSh.GetIMapGraphic() );
|
||||||
GraphicType nGrfType = aGraf.GetType();
|
GraphicType nGrfType = aGraf.GetType();
|
||||||
sal_Bool bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
|
bool bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
|
||||||
if( bRet )
|
if( bRet )
|
||||||
{
|
{
|
||||||
String aGrfName;
|
String aGrfName;
|
||||||
@@ -245,7 +245,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
|
|||||||
|
|
||||||
SwWrtShell &rSh = GetShell();
|
SwWrtShell &rSh = GetShell();
|
||||||
sal_uInt16 nId = rReq.GetSlot();
|
sal_uInt16 nId = rReq.GetSlot();
|
||||||
sal_Bool bIgnore = sal_False;
|
bool bIgnore = false;
|
||||||
switch( nId )
|
switch( nId )
|
||||||
{
|
{
|
||||||
case SID_CUT:
|
case SID_CUT:
|
||||||
@@ -312,7 +312,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
|
|||||||
|
|
||||||
//Done() has to be called before the shell has been removed
|
//Done() has to be called before the shell has been removed
|
||||||
rReq.Done();
|
rReq.Done();
|
||||||
bIgnore = sal_True;
|
bIgnore = true;
|
||||||
if( rSh.IsFrmSelected() || rSh.IsObjSelected())
|
if( rSh.IsFrmSelected() || rSh.IsObjSelected())
|
||||||
rSh.EnterSelFrmMode();
|
rSh.EnterSelFrmMode();
|
||||||
pView->AttrChangedNotify( &rSh );
|
pView->AttrChangedNotify( &rSh );
|
||||||
@@ -333,7 +333,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
|
|||||||
// zerstoert sein kann
|
// zerstoert sein kann
|
||||||
SwView* pView = &rView;
|
SwView* pView = &rView;
|
||||||
rReq.Ignore();
|
rReq.Ignore();
|
||||||
bIgnore = sal_True;
|
bIgnore = true;
|
||||||
int nRet = SwTransferable::PasteUnformatted( rSh, aDataHelper );
|
int nRet = SwTransferable::PasteUnformatted( rSh, aDataHelper );
|
||||||
if(nRet)
|
if(nRet)
|
||||||
{
|
{
|
||||||
@@ -369,7 +369,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
|
|||||||
SwView* pView = &rView;
|
SwView* pView = &rView;
|
||||||
sal_uLong nFormatId = 0;
|
sal_uLong nFormatId = 0;
|
||||||
rReq.Ignore();
|
rReq.Ignore();
|
||||||
bIgnore = sal_True;
|
bIgnore = true;
|
||||||
int nRet = SwTransferable::PasteSpecial( rSh, aDataHelper, nFormatId );
|
int nRet = SwTransferable::PasteSpecial( rSh, aDataHelper, nFormatId );
|
||||||
if(nRet)
|
if(nRet)
|
||||||
{
|
{
|
||||||
@@ -576,7 +576,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
|
|||||||
const SfxPoolItem *pItem;
|
const SfxPoolItem *pItem;
|
||||||
SwWrtShell &rSh = GetShell();
|
SwWrtShell &rSh = GetShell();
|
||||||
const SfxItemSet* pArgs = rReq.GetArgs();
|
const SfxItemSet* pArgs = rReq.GetArgs();
|
||||||
sal_Bool bMore = sal_False;
|
bool bMore = false;
|
||||||
|
|
||||||
sal_uInt16 nSlot = rReq.GetSlot();
|
sal_uInt16 nSlot = rReq.GetSlot();
|
||||||
switch(nSlot)
|
switch(nSlot)
|
||||||
@@ -1145,7 +1145,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
bMore = sal_True;
|
bMore = true;
|
||||||
}
|
}
|
||||||
if(bMore && pArgs)
|
if(bMore && pArgs)
|
||||||
{
|
{
|
||||||
@@ -1235,7 +1235,7 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl)
|
|||||||
GRAPHIC_NONE != ( nGrfType = rSh.GetGraphicType() ) &&
|
GRAPHIC_NONE != ( nGrfType = rSh.GetGraphicType() ) &&
|
||||||
!aGrfUpdateSlots.empty() )
|
!aGrfUpdateSlots.empty() )
|
||||||
{
|
{
|
||||||
sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
|
bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
|
||||||
SfxViewFrame* pVFrame = GetView().GetViewFrame();
|
SfxViewFrame* pVFrame = GetView().GetViewFrame();
|
||||||
sal_uInt16 nSlot;
|
sal_uInt16 nSlot;
|
||||||
std::set<sal_uInt16>::iterator it;
|
std::set<sal_uInt16>::iterator it;
|
||||||
@@ -1403,7 +1403,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
|
|||||||
// #i59688#
|
// #i59688#
|
||||||
// improve efficiency:
|
// improve efficiency:
|
||||||
// If selected object is protected, item has to disabled.
|
// If selected object is protected, item has to disabled.
|
||||||
const sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
|
const bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
|
||||||
if ( bProtect )
|
if ( bProtect )
|
||||||
{
|
{
|
||||||
rSet.DisableItem( nWhich );
|
rSet.DisableItem( nWhich );
|
||||||
@@ -1413,7 +1413,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
|
|||||||
const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
|
const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
|
||||||
const sal_Bool bHas = pVFrame->HasChildWindow( nId );
|
const sal_Bool bHas = pVFrame->HasChildWindow( nId );
|
||||||
const sal_Bool bFrmSel = rSh.IsFrmSelected();
|
const sal_Bool bFrmSel = rSh.IsFrmSelected();
|
||||||
const sal_Bool bIsGraphicSelection =
|
const bool bIsGraphicSelection =
|
||||||
rSh.GetSelectionType() == nsSelectionType::SEL_GRF;
|
rSh.GetSelectionType() == nsSelectionType::SEL_GRF;
|
||||||
|
|
||||||
// #i59688#
|
// #i59688#
|
||||||
@@ -1490,9 +1490,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
|
|||||||
int nSel = rSh.GetSelectionType();
|
int nSel = rSh.GetSelectionType();
|
||||||
sal_Bool bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE));
|
sal_Bool bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE));
|
||||||
|
|
||||||
sal_Bool bDisable = sal_False;
|
bool bDisable = false;
|
||||||
if( !bHas && !bOk )
|
if( !bHas && !bOk )
|
||||||
bDisable = sal_True;
|
bDisable = true;
|
||||||
// #i59688#
|
// #i59688#
|
||||||
// avoid unnecessary loading of selected graphic.
|
// avoid unnecessary loading of selected graphic.
|
||||||
// The graphic is only needed, if the dialog is open.
|
// The graphic is only needed, if the dialog is open.
|
||||||
@@ -1505,7 +1505,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
|
|||||||
if( AddGrfUpdateSlot( nWhich ))
|
if( AddGrfUpdateSlot( nWhich ))
|
||||||
rSh.GetGraphic(sal_False); // start the loading
|
rSh.GetGraphic(sal_False); // start the loading
|
||||||
// #i75481#
|
// #i75481#
|
||||||
bDisable = sal_True;
|
bDisable = true;
|
||||||
}
|
}
|
||||||
else if( bHas && bOk )
|
else if( bHas && bOk )
|
||||||
bDisable = !lcl_UpdateContourDlg( rSh, nSel );
|
bDisable = !lcl_UpdateContourDlg( rSh, nSel );
|
||||||
@@ -1775,7 +1775,7 @@ void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
|
|||||||
--------------------------------------------------------------------*/
|
--------------------------------------------------------------------*/
|
||||||
void SwBaseShell::StateStyle( SfxItemSet &rSet )
|
void SwBaseShell::StateStyle( SfxItemSet &rSet )
|
||||||
{
|
{
|
||||||
sal_Bool bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
|
bool bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
|
||||||
ShellModes eMode = GetView().GetShellMode();
|
ShellModes eMode = GetView().GetShellMode();
|
||||||
|
|
||||||
if ( bParentCntProt ||
|
if ( bParentCntProt ||
|
||||||
@@ -1800,7 +1800,7 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet )
|
|||||||
void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
|
void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
|
||||||
{
|
{
|
||||||
SwWrtShell &rSh = GetShell();
|
SwWrtShell &rSh = GetShell();
|
||||||
sal_Bool bObj = 0 != rSh.IsObjSelected();
|
bool bObj = 0 != rSh.IsObjSelected();
|
||||||
if( bObj || rSh.IsFrmSelected())
|
if( bObj || rSh.IsFrmSelected())
|
||||||
{
|
{
|
||||||
SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND);
|
SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND);
|
||||||
@@ -2070,7 +2070,7 @@ void SwBaseShell::GetTxtCtrlState( SfxItemSet& rSet )
|
|||||||
void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
|
void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
|
||||||
{
|
{
|
||||||
SwWrtShell &rSh = GetShell();
|
SwWrtShell &rSh = GetShell();
|
||||||
sal_Bool bFirst = sal_True;
|
bool bFirst = true;
|
||||||
SfxItemSet* pFntCoreSet = 0;
|
SfxItemSet* pFntCoreSet = 0;
|
||||||
sal_uInt16 nScriptType = SCRIPTTYPE_LATIN;
|
sal_uInt16 nScriptType = SCRIPTTYPE_LATIN;
|
||||||
SfxWhichIter aIter( rSet );
|
SfxWhichIter aIter( rSet );
|
||||||
@@ -2139,7 +2139,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
|
|||||||
if( bFirst )
|
if( bFirst )
|
||||||
{
|
{
|
||||||
rSh.GetCurAttr( rSet );
|
rSh.GetCurAttr( rSet );
|
||||||
bFirst = sal_False;
|
bFirst = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nWhich = aIter.NextWhich();
|
nWhich = aIter.NextWhich();
|
||||||
@@ -2162,7 +2162,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
|
|||||||
|
|
||||||
if ( nSelType & nsSelectionType::SEL_FRM )
|
if ( nSelType & nsSelectionType::SEL_FRM )
|
||||||
{
|
{
|
||||||
sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
|
bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
|
||||||
if (bParentCntProt)
|
if (bParentCntProt)
|
||||||
{
|
{
|
||||||
rSet.DisableItem( SID_BACKGROUND_COLOR );
|
rSet.DisableItem( SID_BACKGROUND_COLOR );
|
||||||
@@ -2307,7 +2307,7 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
|
|||||||
{
|
{
|
||||||
SwWrtShell &rSh = GetShell();
|
SwWrtShell &rSh = GetShell();
|
||||||
// Tabellenzelle(n) selektiert?
|
// Tabellenzelle(n) selektiert?
|
||||||
sal_Bool bPrepare = sal_True;
|
bool bPrepare = true;
|
||||||
sal_Bool bTableMode = rSh.IsTableMode();
|
sal_Bool bTableMode = rSh.IsTableMode();
|
||||||
if ( bTableMode )
|
if ( bTableMode )
|
||||||
{
|
{
|
||||||
@@ -2323,7 +2323,7 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
|
|||||||
{
|
{
|
||||||
SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
|
SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
|
||||||
rSet.Put( aMgr.GetAttrSet() );
|
rSet.Put( aMgr.GetAttrSet() );
|
||||||
bPrepare = sal_False;
|
bPrepare = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
// Umrandungsattribute ganz normal ueber Shell holen
|
// Umrandungsattribute ganz normal ueber Shell holen
|
||||||
@@ -2339,7 +2339,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
|
|||||||
SwWrtShell &rSh = GetShell();
|
SwWrtShell &rSh = GetShell();
|
||||||
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
|
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
|
||||||
//Damit aus dem Basic keine Dialoge fuer Hintergrund-Views aufgerufen werden:
|
//Damit aus dem Basic keine Dialoge fuer Hintergrund-Views aufgerufen werden:
|
||||||
sal_Bool bBackground = (&GetView() != GetActiveView());
|
bool bBackground = (&GetView() != GetActiveView());
|
||||||
const SfxPoolItem* pItem = 0;
|
const SfxPoolItem* pItem = 0;
|
||||||
const SfxItemSet* pArgs = rReq.GetArgs();
|
const SfxItemSet* pArgs = rReq.GetArgs();
|
||||||
|
|
||||||
@@ -2538,7 +2538,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
|
|||||||
{
|
{
|
||||||
SwView &rTempView = GetView(); // Da GetView() nach Shellwechsel nicht mehr geht
|
SwView &rTempView = GetView(); // Da GetView() nach Shellwechsel nicht mehr geht
|
||||||
sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
|
sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
|
||||||
sal_Bool bCallEndUndo = sal_False;
|
bool bCallEndUndo = false;
|
||||||
|
|
||||||
if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() &&
|
if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() &&
|
||||||
!rSh.IsTableMode() )
|
!rSh.IsTableMode() )
|
||||||
@@ -2547,7 +2547,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
|
|||||||
SwInsertTableOptions aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode);
|
SwInsertTableOptions aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode);
|
||||||
|
|
||||||
rSh.StartUndo(UNDO_INSTABLE);
|
rSh.StartUndo(UNDO_INSTABLE);
|
||||||
bCallEndUndo = sal_True;
|
bCallEndUndo = true;
|
||||||
|
|
||||||
sal_Bool bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL );
|
sal_Bool bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL );
|
||||||
rSh.EnterStdMode();
|
rSh.EnterStdMode();
|
||||||
@@ -2631,7 +2631,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
|
|||||||
_rRequest.Done();
|
_rRequest.Done();
|
||||||
|
|
||||||
rSh.StartUndo(UNDO_INSTABLE);
|
rSh.StartUndo(UNDO_INSTABLE);
|
||||||
bCallEndUndo = sal_True;
|
bCallEndUndo = true;
|
||||||
|
|
||||||
rSh.StartAllAction();
|
rSh.StartAllAction();
|
||||||
if( rSh.HasSelection() )
|
if( rSh.HasSelection() )
|
||||||
@@ -2684,7 +2684,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
|
|||||||
rLst.push_back( SW_RESSTR( STR_SWBG_PAGE ) );
|
rLst.push_back( SW_RESSTR( STR_SWBG_PAGE ) );
|
||||||
nPagePos = nPos++;
|
nPagePos = nPos++;
|
||||||
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
|
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
|
||||||
sal_Bool bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
|
bool bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
|
||||||
|
|
||||||
if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) &&
|
if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) &&
|
||||||
(nSel & nsSelectionType::SEL_TXT) )
|
(nSel & nsSelectionType::SEL_TXT) )
|
||||||
|
Reference in New Issue
Block a user