summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx12
-rw-r--r--starmath/source/symbol.cxx2
-rw-r--r--svx/source/table/tablecontroller.cxx4
-rw-r--r--sw/source/core/doc/swserv.cxx2
-rw-r--r--sw/source/core/layout/tabfrm.cxx8
-rw-r--r--sw/source/filter/html/swhtml.cxx9
6 files changed, 15 insertions, 22 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 51898df9ff0b..67662eea07c0 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -296,15 +296,9 @@ bool OTableController::doSaveDoc(bool _bSaveAs)
// first we need a name for our query so ask the user
if(bNew)
{
- OUString aDefaultName;
- if (_bSaveAs && !bNew)
- aDefaultName = m_sName;
- else
- {
- OUString aName = DBA_RES(STR_TBL_TITLE);
- aDefaultName = aName.getToken(0,' ');
- aDefaultName = ::dbtools::createUniqueName(xTables,aDefaultName);
- }
+ OUString aName = DBA_RES(STR_TBL_TITLE);
+ OUString aDefaultName = aName.getToken(0,' ');
+ aDefaultName = ::dbtools::createUniqueName(xTables,aDefaultName);
DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::TABLE );
ScopedVclPtrInstance< OSaveAsDlg > aDlg( getView(), CommandType::TABLE, getORB(), getConnection(), aDefaultName, aNameChecker, SADFlags::NONE );
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 86af8f6c528e..404b1de01599 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -147,7 +147,7 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
m_aSymbols[ aSymbolName ] = rSymbol;
bAdded = true;
}
- else if (pFound && !bForceChange && bSymbolConflict)
+ else if (bSymbolConflict)
{
// TODO: to solve this a document owned symbol manager would be required ...
SAL_WARN("starmath", "symbol conflict, different symbol with same name found!");
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 07d4201abe3f..2a6dd212be91 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -307,7 +307,7 @@ bool SvxTableController::onMouseButtonDown(const MouseEvent& rMEvt, vcl::Window*
{
sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
- if( !pWindow || !pTableObj || eHit == TableHitKind::NONE)
+ if (!pTableObj || eHit == TableHitKind::NONE)
{
mbLeftButtonDown = false;
}
@@ -1615,7 +1615,7 @@ SvxTableController::TblAction SvxTableController::getKeyboardAction(const KeyEve
// during text edit, check if we navigate out of the cell
ESelection aOldSelection = pOLV->GetSelection();
pOLV->PostKeyEvent(rKEvt);
- bTextMove = pOLV && (aOldSelection == pOLV->GetSelection());
+ bTextMove = aOldSelection == pOLV->GetSelection();
if( !bTextMove )
{
nAction = TblAction::NONE;
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 2428babd9019..8fd23844c09a 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -226,7 +226,7 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
for( size_t n = rLnks.size(); n; )
{
const ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
- if( pLnk && OBJECT_CLIENT_GRF != pLnk->GetObjType() &&
+ if (OBJECT_CLIENT_GRF != pLnk->GetObjType() &&
dynamic_cast<const SwBaseLink*>( pLnk) != nullptr &&
!static_cast<const SwBaseLink*>(pLnk)->IsNoDataFlag() &&
static_cast<const SwBaseLink*>(pLnk)->IsInRange( nSttNd, nEndNd ))
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 59bdea7c35d3..74188bb66954 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2434,7 +2434,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( bTableRowKeep && !(bAllowSplitOfRow || !bEmulateTableKeepFwdMoveAllowed) ) );
- if( !bTryToSplit && !bSplitError && nUnSplitted > 0 )
+ if (!bTryToSplit && !bSplitError)
{
--nUnSplitted;
}
@@ -5197,7 +5197,7 @@ void SwCellFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
}
- if ( ( bAttrSetChg && pNew &&
+ if ( ( bAttrSetChg &&
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_PROTECT, false ) ) ||
( pNew && RES_PROTECT == pNew->Which()) )
{
@@ -5206,7 +5206,7 @@ void SwCellFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
pSh->Imp()->InvalidateAccessibleEditableState( true, this );
}
- if ( bAttrSetChg && pNew &&
+ if ( bAttrSetChg &&
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, false, &pItem ) )
{
SetDerivedVert( false );
@@ -5214,7 +5214,7 @@ void SwCellFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
// #i29550#
- if ( bAttrSetChg && pNew &&
+ if ( bAttrSetChg &&
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_BOX, false, &pItem ) )
{
SwFrame* pTmpUpper = GetUpper();
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index f401e7ac2451..e0d787fe0ab3 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2473,7 +2473,7 @@ void SwHTMLParser::AddParSpace()
bool bIsCJK = false;
bool bIsCTL = false;
- const size_t nCntAttr = (pTextNode && pTextNode->GetpSwpHints())
+ const size_t nCntAttr = pTextNode->GetpSwpHints()
? pTextNode->GetSwpHints().Count() : 0;
for(size_t i = 0; i < nCntAttr; ++i)
@@ -2893,8 +2893,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
case RES_LR_SPACE:
if( pAttrPam->GetPoint()->nNode.GetIndex() ==
- pAttrPam->GetMark()->nNode.GetIndex() &&
- pCNd )
+ pAttrPam->GetMark()->nNode.GetIndex())
{
// because of numbering set this attribute directly at node
pCNd->SetAttr( *pAttr->m_pItem );
@@ -4912,7 +4911,7 @@ void SwHTMLParser::InsertSpacer()
case HTML_SPTYPE_VERT:
if( nSize > 0 )
{
- if( nSize && Application::GetDefaultDevice() )
+ if (Application::GetDefaultDevice())
{
nSize = Application::GetDefaultDevice()
->PixelToLogic( Size(0,nSize),
@@ -4960,7 +4959,7 @@ void SwHTMLParser::InsertSpacer()
// If the paragraph is still empty, set first line
// indentation, otherwise apply letter spacing over a space.
- if( nSize && Application::GetDefaultDevice() )
+ if (Application::GetDefaultDevice())
{
nSize = Application::GetDefaultDevice()
->PixelToLogic( Size(nSize,0),