tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I75082c85862b83ed2503900186ce9c70783e54db
Reviewed-on: https://gerrit.libreoffice.org/62817
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx b/canvas/source/directx/dx_bitmapcanvashelper.cxx
index d05534b..b6d08fb 100644
--- a/canvas/source/directx/dx_bitmapcanvashelper.cxx
+++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx
@@ -160,9 +160,6 @@
ENSURE_OR_THROW( mpTarget,
"::dxcanvas::BitmapCanvasHelper::getData(): disposed" );
if( !mpTarget )
return uno::Sequence< sal_Int8 >();
bitmapLayout = getMemoryLayout();
return mpTarget->getData(bitmapLayout,rect);
}
@@ -176,9 +173,6 @@
ENSURE_OR_THROW( mpTarget,
"::dxcanvas::BitmapCanvasHelper::setData(): disposed" );
if( !mpTarget )
return;
mpTarget->setData(data,bitmapLayout,rect);
}
@@ -191,9 +185,6 @@
ENSURE_OR_THROW( mpTarget,
"::dxcanvas::BitmapCanvasHelper::setPixel(): disposed" );
if( !mpTarget )
return;
mpTarget->setPixel(color,bitmapLayout,pos);
}
@@ -205,9 +196,6 @@
ENSURE_OR_THROW( mpTarget,
"::dxcanvas::BitmapCanvasHelper::getPixel(): disposed" );
if( !mpTarget )
return uno::Sequence< sal_Int8 >();
bitmapLayout = getMemoryLayout();
return mpTarget->getPixel(bitmapLayout,pos);
}
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index 7e9b938..d71bc56 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -147,138 +147,84 @@
// SdrEdgeNode1HorzDistItem
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1HORZDIST );
if( pItem )
{
long nValue = static_cast<const SdrEdgeNode1HorzDistItem*>( pItem )->GetValue();
SetMetricValue(*m_xMtrFldHorz1, nValue, eUnit);
}
else
m_xMtrFldHorz1->set_text("");
SetMetricValue(*m_xMtrFldHorz1, static_cast<const SdrEdgeNode1HorzDistItem*>(pItem)->GetValue(),
eUnit);
m_xMtrFldHorz1->save_value();
// SdrEdgeNode2HorzDistItem
pItem = GetItem( *rAttrs, SDRATTR_EDGENODE2HORZDIST );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2HORZDIST );
if( pItem )
{
long nValue = static_cast<const SdrEdgeNode2HorzDistItem*>( pItem )->GetValue();
SetMetricValue(*m_xMtrFldHorz2, nValue, eUnit);
}
else
m_xMtrFldHorz2->set_text("");
SetMetricValue(*m_xMtrFldHorz2, static_cast<const SdrEdgeNode2HorzDistItem*>(pItem)->GetValue(),
eUnit);
m_xMtrFldHorz2->save_value();
// SdrEdgeNode1VertDistItem
pItem = GetItem( *rAttrs, SDRATTR_EDGENODE1VERTDIST );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1VERTDIST );
if( pItem )
{
long nValue = static_cast<const SdrEdgeNode1VertDistItem*>( pItem )->GetValue();
SetMetricValue(*m_xMtrFldVert1, nValue, eUnit);
}
else
m_xMtrFldVert1->set_text("");
SetMetricValue(*m_xMtrFldVert1, static_cast<const SdrEdgeNode1VertDistItem*>(pItem)->GetValue(),
eUnit);
m_xMtrFldVert1->save_value();
// SdrEdgeNode2VertDistItem
pItem = GetItem( *rAttrs, SDRATTR_EDGENODE2VERTDIST );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2VERTDIST );
if( pItem )
{
long nValue = static_cast<const SdrEdgeNode2VertDistItem*>( pItem )->GetValue();
SetMetricValue(*m_xMtrFldVert2, nValue, eUnit);
}
else
m_xMtrFldVert2->set_text("");
SetMetricValue(*m_xMtrFldVert2, static_cast<const SdrEdgeNode2VertDistItem*>(pItem)->GetValue(),
eUnit);
m_xMtrFldVert2->save_value();
// SdrEdgeLine1DeltaItem
pItem = GetItem( *rAttrs, SDRATTR_EDGELINE1DELTA );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE1DELTA );
if( pItem )
{
long nValue = static_cast<const SdrMetricItem*>( pItem )->GetValue();
SetMetricValue(*m_xMtrFldLine1, nValue, eUnit);
}
else
m_xMtrFldLine1->set_text("");
SetMetricValue(*m_xMtrFldLine1, static_cast<const SdrMetricItem*>(pItem)->GetValue(), eUnit);
m_xMtrFldLine1->save_value();
// SdrEdgeLine2DeltaItem
pItem = GetItem( *rAttrs, SDRATTR_EDGELINE2DELTA );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE2DELTA );
if( pItem )
{
long nValue = static_cast<const SdrMetricItem*>( pItem )->GetValue();
SetMetricValue(*m_xMtrFldLine2, nValue, eUnit);
}
else
m_xMtrFldLine2->set_text("");
SetMetricValue(*m_xMtrFldLine2, static_cast<const SdrMetricItem*>(pItem)->GetValue(), eUnit);
m_xMtrFldLine2->save_value();
// SdrEdgeLine3DeltaItem
pItem = GetItem( *rAttrs, SDRATTR_EDGELINE3DELTA );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE3DELTA );
if( pItem )
{
long nValue = static_cast<const SdrMetricItem*>( pItem )->GetValue();
SetMetricValue(*m_xMtrFldLine3, nValue, eUnit);
}
else
m_xMtrFldLine3->set_text("");
SetMetricValue(*m_xMtrFldLine3, static_cast<const SdrMetricItem*>(pItem)->GetValue(), eUnit);
m_xMtrFldLine3->save_value();
// SdrEdgeLineDeltaAnzItem
pItem = GetItem( *rAttrs, SDRATTR_EDGELINEDELTACOUNT );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINEDELTACOUNT );
if( pItem )
switch (static_cast<const SdrEdgeLineDeltaCountItem*>(pItem)->GetValue())
{
sal_uInt16 nValue = static_cast<const SdrEdgeLineDeltaCountItem*>( pItem )->GetValue();
if( nValue <= 2 )
{
m_xFtLine3->set_sensitive(false);
m_xMtrFldLine3->set_sensitive(false);
m_xMtrFldLine3->set_text("");
}
if( nValue <= 1 )
{
m_xFtLine2->set_sensitive(false);
m_xMtrFldLine2->set_sensitive(false);
m_xMtrFldLine2->set_text("");
}
if( nValue == 0 )
{
case 0:
m_xFtLine1->set_sensitive(false);
m_xMtrFldLine1->set_sensitive(false);
m_xMtrFldLine1->set_text("");
}
SAL_FALLTHROUGH;
case 1:
m_xFtLine2->set_sensitive(false);
m_xMtrFldLine2->set_sensitive(false);
m_xMtrFldLine2->set_text("");
SAL_FALLTHROUGH;
case 2:
m_xFtLine3->set_sensitive(false);
m_xMtrFldLine3->set_sensitive(false);
m_xMtrFldLine3->set_text("");
break;
}
// SdrEdgeKindItem
pItem = GetItem( *rAttrs, SDRATTR_EDGEKIND );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
if( pItem )
{
SdrEdgeKind nValue = static_cast<const SdrEdgeKindItem*>( pItem )->GetValue();
m_xLbType->set_active(sal::static_int_cast<sal_uInt16>(nValue));
}
else
m_xLbType->set_active(-1);
m_xLbType->set_active(
sal::static_int_cast<sal_uInt16>(static_cast<const SdrEdgeKindItem*>(pItem)->GetValue()));
m_xLbType->save_value();
}
@@ -465,15 +411,12 @@
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
if( pItem )
const SdrEdgeKindItem* pEdgeKindItem = static_cast<const SdrEdgeKindItem*>(pItem);
const sal_uInt16 nCount = pEdgeKindItem->GetValueCount();
for (sal_uInt16 i = 0; i < nCount; i++)
{
const SdrEdgeKindItem* pEdgeKindItem = static_cast<const SdrEdgeKindItem*>( pItem );
sal_uInt16 nCount = pEdgeKindItem->GetValueCount();
for( sal_uInt16 i = 0; i < nCount; i++ )
{
OUString aStr = pEdgeKindItem->GetValueTextByPos(i);
m_xLbType->append_text(aStr);
}
OUString aStr = pEdgeKindItem->GetValueTextByPos(i);
m_xLbType->append_text(aStr);
}
}
void SvxConnectionPage::PageCreated(const SfxAllItemSet& aSet)
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 2bca0c6..dc11020 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -1969,8 +1969,7 @@
// document has not yet been activated, i.e. has no UI, yet
return true;
bool bCouldSuspend = xController->suspend( true );
if ( !bCouldSuspend )
if (!xController->suspend(true))
// controller vetoed the closing
return false;
@@ -1984,9 +1983,8 @@
}
if ( !save( true ) )
{
if ( bCouldSuspend )
// revert suspension
xController->suspend( false );
// revert suspension
xController->suspend(false);
// saving failed or was cancelled
return false;
}
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 4f22d82..5322308 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1085,9 +1085,7 @@
m_bAdded = true;
}
TOTypeInfoSP pFieldType;
if( pFieldDescr )
pFieldType = pFieldDescr->getTypeInfo();
TOTypeInfoSP pFieldType(pFieldDescr->getTypeInfo());
ActivateAggregate( tpColumnName );
ActivateAggregate( tpType );
@@ -1237,19 +1235,17 @@
}
m_pPreviousType = pFieldType;
}
if(pFieldDescr)
if (pFieldDescr->IsPrimaryKey())
{
if(pFieldDescr->IsPrimaryKey())
{
DeactivateAggregate( tpRequired );
}
else if ( !pAutoIncrement && pFieldType.get() )
{
if ( pFieldType->bNullable )
ActivateAggregate( tpRequired );
else
DeactivateAggregate( tpRequired );
}
DeactivateAggregate(tpRequired);
}
else if (!pAutoIncrement && pFieldType.get())
{
if (pFieldType->bNullable)
ActivateAggregate(tpRequired);
else
DeactivateAggregate(tpRequired);
}
// Initialize Controls
if( pAutoIncrement )
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 9efd610..fd743df 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -340,8 +340,7 @@
if ( m_pCurrentView )
m_aScrollWindow->setMarked(m_pCurrentView,false);
m_pCurrentView = &_rView;
if ( m_pCurrentView )
m_aScrollWindow->setMarked(m_pCurrentView,true);
m_aScrollWindow->setMarked(m_pCurrentView, true);
m_xReportComponent.clear();
DlgEdHint aHint( RPTUI_HINT_SELECTIONCHANGED );
Broadcast( aHint );
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index de4f83c..ed4078f 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -1600,11 +1600,12 @@
// [Parameter{;Parameter}]
if( nLast > nSkipEnd )
{
// nSkipEnd is either 0 or -1 => nLast >= 0
aPool << eParam[ nLast ];
for( nLauf = nLast - 1 ; nLauf > nSkipEnd ; nLauf-- )
{
if( nLauf != -1 ) // skip this parameter
aPool << ocSep << eParam[ nLauf ];
// nLauf > nSkipEnd => nLauf >= 0
aPool << ocSep << eParam[nLauf];
}
}
}
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 8baad38..7ca42e0 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1697,29 +1697,26 @@
typedef std::unordered_map<OUString, sal_uInt16> UserSortMap;
UserSortMap aSubStrs;
sal_uInt16 nSubCount = 0;
if (pUserListId)
ScUserList* pUserList = ScGlobal::GetUserList();
if (!pUserList)
return;
{
ScUserList* pUserList = ScGlobal::GetUserList();
if (!pUserList)
size_t n = pUserList->size();
if (!n || *pUserListId >= static_cast<sal_uInt16>(n))
return;
}
{
size_t n = pUserList->size();
if (!n || *pUserListId >= static_cast<sal_uInt16>(n))
return;
}
const ScUserListData& rData = (*pUserList)[*pUserListId];
sal_uInt16 n = rData.GetSubCount();
for (sal_uInt16 i = 0; i < n; ++i)
{
OUString aSub = rData.GetSubStr(i);
if (!aMemberSet.count(aSub))
// This string doesn't exist in the member name set. Don't add this.
continue;
const ScUserListData& rData = (*pUserList)[*pUserListId];
sal_uInt16 n = rData.GetSubCount();
for (sal_uInt16 i = 0; i < n; ++i)
{
OUString aSub = rData.GetSubStr(i);
if (!aMemberSet.count(aSub))
// This string doesn't exist in the member name set. Don't add this.
continue;
aSubStrs.emplace(aSub, nSubCount++);
}
aSubStrs.emplace(aSub, nSubCount++);
}
// Rank all members.
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index fca227e..672181e 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -568,17 +568,11 @@
bool DrawDocShell::SaveAs( SfxMedium& rMedium )
{
mpDoc->setDocAccTitle(OUString());
SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
if (pFrame1)
if (SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst(this))
{
vcl::Window* pWindow = &pFrame1->GetWindow();
if ( pWindow )
if (vcl::Window* pSysWin = pFrame1->GetWindow().GetSystemWindow())
{
vcl::Window* pSysWin = pWindow->GetSystemWindow();
if ( pSysWin )
{
pSysWin->SetAccessibleName(OUString());
}
pSysWin->SetAccessibleName(OUString());
}
}
mpDoc->StopWorkStartupDelay();
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
index 6ff1bc1..c9e4b80 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
@@ -182,9 +182,8 @@
else
{
SdrPage& rMasterPage (pPage->TRG_GetMasterPage());
SdPage* pMasterPage = static_cast<SdPage*>(&rMasterPage);
if (pMasterPage != nullptr)
aNames.insert (pMasterPage->GetName());
assert(dynamic_cast<SdPage*>(&rMasterPage));
aNames.insert(static_cast<SdPage&>(rMasterPage).GetName());
}
}
}
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index ae5cd6f..80d25dc 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1280,15 +1280,12 @@
{
mbHasOrientationWarningBeenShown = true;
// Show warning that the orientation could not be set.
if (pViewShell)
{
std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pViewShell->GetFrameWeld(),
VclMessageType::Warning, VclButtonsType::OkCancel,
SdResId(STR_WARN_PRINTFORMAT_FAILURE)));
xWarn->set_default_response(RET_CANCEL);
if (xWarn->run() != RET_OK)
return;
}
std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(
pViewShell->GetFrameWeld(), VclMessageType::Warning, VclButtonsType::OkCancel,
SdResId(STR_WARN_PRINTFORMAT_FAILURE)));
xWarn->set_default_response(RET_CANCEL);
if (xWarn->run() != RET_OK)
return;
}
}
diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx
index f199371..fba5504 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -178,25 +178,22 @@
pSeqAny = &aPropSeq[ nIndex ].Value;
}
DBG_ASSERT( pSeqAny, "SdrCustomShapeGeometryItem::SetPropertyValue() - No Value??" );
if( pSeqAny )
if (auto pSecSequence = o3tl::tryAccess<css::uno::Sequence<beans::PropertyValue>>(*pSeqAny))
{
if ( auto rSecSequence = o3tl::tryAccess<css::uno::Sequence<beans::PropertyValue>>(*pSeqAny) )
PropertyPairHashMap::iterator aHashIter(
aPropPairHashMap.find(PropertyPair(rSequenceName, rPropVal.Name)));
auto& rSeq = const_cast<css::uno::Sequence<css::beans::PropertyValue>&>(*pSecSequence);
if (aHashIter != aPropPairHashMap.end())
{
PropertyPairHashMap::iterator aHashIter( aPropPairHashMap.find( PropertyPair( rSequenceName, rPropVal.Name ) ) );
if ( aHashIter != aPropPairHashMap.end() )
{
const_cast<css::uno::Sequence<css::beans::PropertyValue> &>(*rSecSequence)[ (*aHashIter).second ].Value = rPropVal.Value;
}
else
{
sal_Int32 nCount = rSecSequence->getLength();
const_cast<css::uno::Sequence<css::beans::PropertyValue> &>(*rSecSequence).realloc( nCount + 1 );
const_cast<css::uno::Sequence<css::beans::PropertyValue> &>(*rSecSequence)[ nCount ] = rPropVal;
rSeq[(*aHashIter).second].Value = rPropVal.Value;
}
else
{
const sal_Int32 nCount = pSecSequence->getLength();
rSeq.realloc(nCount + 1);
rSeq[nCount] = rPropVal;
aPropPairHashMap[ PropertyPair( rSequenceName, rPropVal.Name ) ] = nCount;
}
aPropPairHashMap[PropertyPair(rSequenceName, rPropVal.Name)] = nCount;
}
}
}
@@ -209,18 +206,15 @@
PropertyHashMap::iterator aHashIter( aPropHashMap.find( rPropName ) );
if ( aHashIter != aPropHashMap.end() )
{
css::uno::Any* pSeqAny = &aPropSeq[ (*aHashIter).second ].Value;
if ( pSeqAny )
css::uno::Any& rSeqAny = aPropSeq[(*aHashIter).second].Value;
if (auto pSecSequence
= o3tl::tryAccess<css::uno::Sequence<beans::PropertyValue>>(rSeqAny))
{
if ( auto rSecSequence = o3tl::tryAccess<css::uno::Sequence<beans::PropertyValue>>(*pSeqAny) )
for (const auto& rPropVal : *pSecSequence)
{
sal_Int32 i;
for ( i = 0; i < rSecSequence->getLength(); i++ )
{
PropertyPairHashMap::iterator _aHashIter( aPropPairHashMap.find( PropertyPair( rPropName, (*rSecSequence)[ i ].Name ) ) );
if ( _aHashIter != aPropPairHashMap.end() )
aPropPairHashMap.erase( _aHashIter ); // removing property from pair hashmap
}
auto _aHashIter(aPropPairHashMap.find(PropertyPair(rPropName, rPropVal.Name)));
if (_aHashIter != aPropPairHashMap.end())
aPropPairHashMap.erase(_aHashIter); // removing property from pair hashmap
}
}
sal_Int32 nLength = aPropSeq.getLength();
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 4e203e5..be9f761 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -729,7 +729,8 @@
bool bSaveInXMLImportFlag = m_rDoc.IsInXMLImport();
m_rDoc.SetInXMLImport( false );
// and then hide/display everything
void (SwRangeRedline::*pFnc)(sal_uInt16, size_t) = nullptr;
void (SwRangeRedline::*pFnc)(sal_uInt16, size_t); // Allow compiler warn if use of
// uninitialized ptr is possible
RedlineFlags eShowMode = RedlineFlags::ShowMask & eMode;
if (eShowMode == (RedlineFlags::ShowInsert | RedlineFlags::ShowDelete))
@@ -747,16 +748,13 @@
CheckAnchoredFlyConsistency(m_rDoc);
CHECK_REDLINE( *this )
if (pFnc)
{
for (sal_uInt16 nLoop = 1; nLoop <= 2; ++nLoop)
for (size_t i = 0; i < mpRedlineTable->size(); ++i)
((*mpRedlineTable)[i]->*pFnc)(nLoop, i);
for (sal_uInt16 nLoop = 1; nLoop <= 2; ++nLoop)
for (size_t i = 0; i < mpRedlineTable->size(); ++i)
((*mpRedlineTable)[i]->*pFnc)(nLoop, i);
//SwRangeRedline::MoveFromSection routinely changes
//the keys that mpRedlineTable is sorted by
mpRedlineTable->Resort();
}
//SwRangeRedline::MoveFromSection routinely changes
//the keys that mpRedlineTable is sorted by
mpRedlineTable->Resort();
CheckAnchoredFlyConsistency(m_rDoc);
CHECK_REDLINE( *this )
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index e97a4a7..9cafe34 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -954,16 +954,9 @@
pTmpRoot->StartAllAction();
pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
// replace marked <SwDrawVirtObj>-objects by its reference objects.
if (SdrPageView* pDrawPageView = m_rImp.GetPageView())
{
SdrPageView* pDrawPageView = m_rImp.GetPageView();
if ( pDrawPageView )
{
SdrMarkView* pMarkView = &(pDrawPageView->GetView());
if ( pMarkView )
{
ReplaceMarkedDrawVirtObjs( *pMarkView );
}
}
ReplaceMarkedDrawVirtObjs(pDrawPageView->GetView());
}
// Check what textboxes have to be deleted afterwards.
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 4702217..b691312 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6178,7 +6178,7 @@
/* break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
*/
const char* pType = nullptr;
const char* pType;
switch ( nBreakCode )
{
case 1: pType = "nextColumn"; break;
@@ -6188,10 +6188,7 @@
default: pType = "continuous"; break;
}
if ( pType )
m_pSerializer->singleElementNS( XML_w, XML_type,
FSNS( XML_w, XML_val ), pType,
FSEND );
m_pSerializer->singleElementNS(XML_w, XML_type, FSNS(XML_w, XML_val), pType, FSEND);
}
void DocxAttributeOutput::TextVerticalAdjustment( const drawing::TextVerticalAdjust nVA )
@@ -6254,7 +6251,7 @@
void DocxAttributeOutput::FontFamilyType( FontFamily eFamily ) const
{
const char *pFamily = nullptr;
const char* pFamily;
switch ( eFamily )
{
case FAMILY_ROMAN: pFamily = "roman"; break;
@@ -6265,15 +6262,12 @@
default: pFamily = "auto"; break; // no font family
}
if ( pFamily )
m_pSerializer->singleElementNS( XML_w, XML_family,
FSNS( XML_w, XML_val ), pFamily,
FSEND );
m_pSerializer->singleElementNS(XML_w, XML_family, FSNS(XML_w, XML_val), pFamily, FSEND);
}
void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
{
const char *pPitch = nullptr;
const char* pPitch;
switch ( ePitch )
{
case PITCH_VARIABLE: pPitch = "variable"; break;
@@ -6281,10 +6275,7 @@
default: pPitch = "default"; break; // no info about the pitch
}
if ( pPitch )
m_pSerializer->singleElementNS( XML_w, XML_pitch,
FSNS( XML_w, XML_val ), pPitch,
FSEND );
m_pSerializer->singleElementNS(XML_w, XML_pitch, FSNS(XML_w, XML_val), pPitch, FSEND);
}
void DocxAttributeOutput::EmbedFont( const OUString& name, FontFamily family, FontPitch pitch )
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index accae76..b6ffa8f 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -917,8 +917,7 @@
// (partially) check the image dimensions to avoid potential large bitmap allocation if the input is damaged
sal_uInt64 nMaxWidth = pIStm->remainingSize();
nMaxWidth *= 256; //assume generous compression ratio
if (aHeader.nHeight != 0)
nMaxWidth /= aHeader.nHeight;
nMaxWidth /= aHeader.nHeight;
if (nMaxWidth < static_cast<sal_uInt64>(aHeader.nWidth))
return false;
break;
@@ -929,8 +928,7 @@
return false;
sal_uInt64 nMaxWidth = pIStm->remainingSize();
nMaxWidth *= 512; //assume generous compression ratio
if (aHeader.nHeight != 0)
nMaxWidth /= aHeader.nHeight;
nMaxWidth /= aHeader.nHeight;
if (nMaxWidth < static_cast<sal_uInt64>(aHeader.nWidth))
return false;
break;
@@ -942,8 +940,7 @@
{
// (partially) check the image dimensions to avoid potential large bitmap allocation if the input is damaged
sal_uInt64 nMaxWidth = pIStm->remainingSize();
if (aHeader.nHeight != 0)
nMaxWidth /= aHeader.nHeight;
nMaxWidth /= aHeader.nHeight;
if (nMaxWidth < nAlignedWidth)
return false;
break;