Kaydet (Commit) 6561fc32 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:oncevar in svx

Change-Id: I22a3a13e059ac7d3479f12860564fe3eb1b55e44
Reviewed-on: https://gerrit.libreoffice.org/39282Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst f65f34d6
......@@ -52,7 +52,7 @@ void XOutdevTest::testPdfGraphicExport()
// Export it.
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
XOutFlags eFlags = XOutFlags::DontExpandFilename | XOutFlags::DontAddExtension | XOutFlags::UseNativeIfPossible;
XOutFlags const eFlags = XOutFlags::DontExpandFilename | XOutFlags::DontAddExtension | XOutFlags::UseNativeIfPossible;
OUString aTempURL = aTempFile.GetURL();
XOutBitmap::WriteGraphic(aGraphic, aTempURL, "pdf", eFlags);
......
......@@ -1441,8 +1441,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
}
sal_Int32 SAL_CALL AccessibleShape::getHyperLinkIndex( sal_Int32 )
{
sal_Int32 nRet = 0;
return nRet;
return 0;
}
// XAccessibleText
sal_Int32 SAL_CALL AccessibleShape::getCaretPosition( ){return 0;}
......
......@@ -245,8 +245,7 @@ public:
{
EnhancedCustomShapeParameter aRet;
sal_Int32 nDummy = 1;
aRet.Value <<= nDummy;
aRet.Value <<= sal_Int32(1);
switch( meFunct )
{
......
......@@ -311,8 +311,8 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
long nW = aRect.GetWidth();
long nH = aRect.GetHeight();
long nTW = CELL_WIDTH * 3;
long nTH = CELL_HEIGHT * 3;
long const nTW = CELL_WIDTH * 3;
long const nTH = CELL_HEIGHT * 3;
long _nLeft = bHorz ? aRect.Left() + ((nW - nTW) / 2) : aRect.Left();
long _nTop = bVert ? aRect.Top() + ((nH - nTH) / 2) : aRect.Top();
tools::Rectangle aCellRect(Point(_nLeft, _nTop),Size(CELL_WIDTH, CELL_HEIGHT));
......
......@@ -58,7 +58,6 @@ void PageNumberListBox::SetSelection( sal_uInt16 nPos )
{
sal_Int32 nEntryCount = GetEntryCount();
sal_Int32 nSelPos = LISTBOX_ENTRY_NOTFOUND;
sal_Int32 nUserPos = LISTBOX_ENTRY_NOTFOUND;
for (sal_Int32 i = 0; i < nEntryCount; ++i )
{
......@@ -70,7 +69,7 @@ void PageNumberListBox::SetSelection( sal_uInt16 nPos )
break;
}
}
SelectEntryPos( ( nSelPos != LISTBOX_ENTRY_NOTFOUND ) ? nSelPos : nUserPos );
SelectEntryPos( ( nSelPos != LISTBOX_ENTRY_NOTFOUND ) ? nSelPos : LISTBOX_ENTRY_NOTFOUND );
}
Size PageNumberListBox::GetOptimalSize() const
......
......@@ -26,7 +26,6 @@
IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl, Button*, void)
{
bool bOK = true;
short nRet = RET_OK;
if ( m_pNewPasswdED->GetText() != m_pRepeatPasswdED->GetText() )
{
......@@ -46,7 +45,7 @@ IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl, Button*, void)
}
if ( bOK )
EndDialog( nRet );
EndDialog( RET_OK );
}
......
......@@ -519,8 +519,7 @@ void SvxSearchDialog::Construct_Impl()
if(xDirectAccess.is())
{
OUString sTemp;
OUString sProperty( "ComponentSearchGroupLabel");
uno::Any aRet = xDirectAccess->getByName(sProperty);
uno::Any aRet = xDirectAccess->getByName("ComponentSearchGroupLabel");
aRet >>= sTemp;
m_pComponentFrame->get_label_widget()->SetText(sTemp);
aRet = xDirectAccess->getByName("ComponentSearchCommandLabel1");
......
......@@ -3171,8 +3171,7 @@ bool SvxRuler::StartDrag()
{
if( bContentProtected )
return false;
sal_uInt16 nIndent = INDENT_LEFT_MARGIN;
if((nIndent) == GetDragAryPos() + INDENT_GAP) { // Left paragraph indent
if(INDENT_LEFT_MARGIN == GetDragAryPos() + INDENT_GAP) { // Left paragraph indent
mpIndents[0] = mpIndents[INDENT_FIRST_LINE];
EvalModifier();
}
......
......@@ -977,10 +977,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1
}
// Set default rotation
{
double XRotateDefault = 20;
aRotate.rotate(DEG2RAD(XRotateDefault), 0.0, 0.0);
}
aRotate.rotate(DEG2RAD(20.0), 0.0, 0.0);
if(!aRotate.isIdentity())
{
......
......@@ -54,8 +54,7 @@ void E3dView::ConvertMarkedToPolyObj()
auto pScene = dynamic_cast< const E3dScene* >(pObj);
if (pScene)
{
bool bBezier = false;
pNewObj = pScene->ConvertToPolyObj(bBezier, false/*bLineToArea*/);
pNewObj = pScene->ConvertToPolyObj(false/*bBezier*/, false/*bLineToArea*/);
if (pNewObj)
{
BegUndo(SvxResId(RID_SVX_3D_UNDO_EXTRUDE));
......
......@@ -1478,7 +1478,7 @@ bool FmGridControl::isColumnMarked(sal_uInt16 nId) const
long FmGridControl::QueryMinimumRowHeight()
{
long nMinimalLogicHeight = 20; // 0.2 cm
long const nMinimalLogicHeight = 20; // 0.2 cm
long nMinimalPixelHeight = LogicToPixel( Point( 0, nMinimalLogicHeight ), MapUnit::Map10thMM ).Y();
return CalcZoom( nMinimalPixelHeight );
}
......
......@@ -407,8 +407,7 @@ void SAL_CALL FmXGridControl::dispose()
OUString FmXGridControl::GetComponentServiceName()
{
OUString aName("DBGrid");
return aName;
return OUString("DBGrid");
}
......
......@@ -129,7 +129,7 @@ IParseContext::InternationalKeyCode OSystemParseContext::getIntlKeyCode(const OS
InternationalKeyCode::Collect, InternationalKeyCode::Fusion, InternationalKeyCode::Intersection
};
sal_uInt32 nCount = SAL_N_ELEMENTS(Intl_TokenID);
sal_uInt32 const nCount = SAL_N_ELEMENTS(Intl_TokenID);
for (sal_uInt32 i = 0; i < nCount; i++)
{
OString aKey = getIntlKeywordAscii(Intl_TokenID[i]);
......
......@@ -737,11 +737,10 @@ namespace svxform
{
try
{
OUString sDelim( ": " );
OUString sTemp;
pNode->m_xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
sNewName += sTemp;
sNewName += sDelim;
sNewName += ": ";
pNode->m_xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sNewName += sTemp;
}
......@@ -858,11 +857,10 @@ namespace svxform
{
try
{
OUString sDelim( ": " );
OUString sName;
_rEntry->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
sName += sTemp;
sName += sDelim;
sName += ": ";
_rEntry->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sName += sTemp;
pEntry = m_pItemList->InsertEntry(
......@@ -1161,7 +1159,6 @@ namespace svxform
if ( xNum.is() && xNum->hasMoreElements() )
{
Image aImage(BitmapEx(RID_SVXBMP_ELEMENT));
OUString sDelim( ": " );
while ( xNum->hasMoreElements() )
{
Reference< XPropertySet > xPropSet;
......@@ -1172,7 +1169,7 @@ namespace svxform
OUString sTemp;
xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
sEntry += sTemp;
sEntry += sDelim;
sEntry += ": ";
xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sEntry += sTemp;
......@@ -2013,12 +2010,11 @@ namespace svxform
void DataNavigatorWindow::CreateInstancePage( const Sequence< PropertyValue >& _xPropSeq )
{
OUString sInstName;
OUString sID( PN_INSTANCE_ID );
const PropertyValue* pProps = _xPropSeq.getConstArray();
const PropertyValue* pPropsEnd = pProps + _xPropSeq.getLength();
for ( ; pProps != pPropsEnd; ++pProps )
{
if ( sID == pProps->Name )
if ( PN_INSTANCE_ID == pProps->Name )
{
pProps->Value >>= sInstName;
break;
......@@ -3233,7 +3229,6 @@ namespace svxform
Reference < XEnumeration > xNum = xNumAccess->createEnumeration();
if ( xNum.is() && xNum->hasMoreElements() )
{
OUString sDelim( ": " );
while ( xNum->hasMoreElements() )
{
Reference< XPropertySet > xPropSet;
......@@ -3244,7 +3239,7 @@ namespace svxform
OUString sTemp;
xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
sEntry += sTemp;
sEntry += sDelim;
sEntry += ": ";
xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sEntry += sTemp;
m_pBindLB->InsertEntry( sEntry );
......
......@@ -564,8 +564,7 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell )
if ( !m_xBrowserController.is() )
{
OUString sServiceName( "com.sun.star.inspection.ObjectInspector" );
ShowServiceNotAvailableError( GetParent(), sServiceName, true );
ShowServiceNotAvailableError( GetParent(), "com.sun.star.inspection.ObjectInspector", true );
}
else
{
......
......@@ -3119,7 +3119,6 @@ void FmXFormShell::CreateExternalView()
bool bAlreadyExistent = m_xExternalViewController.is();
Reference< css::frame::XFrame> xExternalViewFrame;
OUString sFrameName("_beamer");
sal_Int32 nSearchFlags = css::frame::FrameSearchFlag::CHILDREN | css::frame::FrameSearchFlag::CREATE;
Reference< runtime::XFormController > xCurrentNavController( getNavController());
// the creation of the "partwindow" may cause a deactivate of the document which will result in our nav controller to be set to NULL
......@@ -3161,7 +3160,8 @@ void FmXFormShell::CreateExternalView()
Reference< css::frame::XDispatchProvider> xProv(m_xAttachedFrame, UNO_QUERY);
Reference< css::frame::XDispatch> xDisp;
if (xProv.is())
xDisp = xProv->queryDispatch(aWantToDispatch, sFrameName, nSearchFlags);
xDisp = xProv->queryDispatch(aWantToDispatch, sFrameName,
css::frame::FrameSearchFlag::CHILDREN | css::frame::FrameSearchFlag::CREATE);
if (xDisp.is())
{
xDisp->dispatch(aWantToDispatch, Sequence< PropertyValue>());
......@@ -3423,8 +3423,7 @@ void FmXFormShell::CreateExternalView()
// content type
pListBoxDescription->Name = FM_PROP_LISTSOURCETYPE;
ListSourceType eType = ListSourceType_VALUELIST;
pListBoxDescription->Value <<= eType;
pListBoxDescription->Value <<= ListSourceType_VALUELIST;
++pListBoxDescription;
// list source
......
......@@ -206,7 +206,7 @@ SvxFmTbxCtlRecTotal::~SvxFmTbxCtlRecTotal()
VclPtr<vcl::Window> SvxFmTbxCtlRecTotal::CreateItemWindow( vcl::Window* pParent )
{
pFixedText.reset(VclPtr<FixedText>::Create( pParent ));
OUString aSample("123456");
OUString const aSample("123456");
Size aSize( pFixedText->GetTextWidth( aSample ), pFixedText->GetTextHeight( ) );
aSize.Width() += 12;
pFixedText->SetSizePixel( aSize );
......
......@@ -275,9 +275,8 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO
{
// check readonlyness the very hard way
INetURLObject aTestURL( rBaseURL );
OUString aTestFile( "cdefghij.klm" );
aTestURL.Append( aTestFile );
aTestURL.Append( "cdefghij.klm" );
std::unique_ptr<SvStream> pTestStm(::utl::UcbStreamHelper::CreateStream( aTestURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE ));
if( pTestStm )
......
......@@ -793,11 +793,7 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<OUString>& rL
short nMyCat = SELPOS_NONE;
NfIndexTableOffset eOffsetStart=NF_CURRENCY_START;
NfIndexTableOffset eOffsetEnd=NF_CURRENCY_END;
long nIndex;
for(nIndex=eOffsetStart;nIndex<=eOffsetEnd;nIndex++)
for(long nIndex=NF_CURRENCY_START; nIndex<=NF_CURRENCY_END; nIndex++)
{
nNFEntry=pFormatter->GetFormatIndex((NfIndexTableOffset)nIndex,eCurLanguage);
......
......@@ -135,8 +135,7 @@ void AreaTransparencyGradientPopup::ExecuteValueModify(sal_uInt8 nStartCol, sal_
mrAreaPropertyPanel.SetGradient(aTmpGradient);
bool bEnable = true;
XFillFloatTransparenceItem aGradientItem(aTmpGradient, bEnable );
XFillFloatTransparenceItem aGradientItem(aTmpGradient, true );
mrAreaPropertyPanel.setFillFloatTransparence(aGradientItem);
}
......
......@@ -187,7 +187,6 @@ void NBOTypeMgrBase::ImplLoad(const OUString& filename)
if (nVersion==DEFAULT_NUMBERING_CACHE_FORMAT_VERSION) //first version
{
xIStm->ReadInt32( nNumIndex );
sal_uInt16 nLevel = 0x1;
while (nNumIndex>=0 && nNumIndex<DEFAULT_NUM_VALUSET_COUNT) {
SvxNumRule aNum(*xIStm);
//bullet color in font properties is not stored correctly. Need set tranparency bits manually
......@@ -203,7 +202,7 @@ void NBOTypeMgrBase::ImplLoad(const OUString& filename)
aNum.SetLevel(i, aFmt);
}
}
RelplaceNumRule(aNum,nNumIndex,nLevel);
RelplaceNumRule(aNum,nNumIndex,0x1/*nLevel*/);
xIStm->ReadInt32( nNumIndex );
}
}
......@@ -230,9 +229,8 @@ void NBOTypeMgrBase::ImplStore(const OUString& filename)
SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
10, false,
SvxNumRuleType::NUMBERING, SvxNumberFormat::LABEL_ALIGNMENT);
sal_uInt16 nLevel = 0x1;
xOStm->WriteInt32( nItem );
ApplyNumRule(aDefNumRule,nItem,nLevel,false,true);
ApplyNumRule(aDefNumRule,nItem,0x1/*nLevel*/,false,true);
aDefNumRule.Store(*xOStm);
}
}
......@@ -628,7 +626,7 @@ void OutlineTypeMgr::Init()
sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*mLevel*/,sal_uInt16 nFromIndex)
{
sal_uInt16 nLength = SAL_N_ELEMENTS(pOutlineSettingsArrs);
sal_uInt16 const nLength = SAL_N_ELEMENTS(pOutlineSettingsArrs);
for(sal_uInt16 iDex = nFromIndex; iDex < nLength; iDex++)
{
bool bNotMatch = false;
......@@ -702,7 +700,7 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m
void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel)
{
sal_uInt16 nLength = SAL_N_ELEMENTS(pOutlineSettingsArrs);
sal_uInt16 const nLength = SAL_N_ELEMENTS(pOutlineSettingsArrs);
if ( nIndex >= nLength )
return;
......@@ -878,9 +876,8 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
OUString OutlineTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault)
{
OUString sRet;
sal_uInt16 nLength = SAL_N_ELEMENTS(pOutlineSettingsArrs);
if ( nIndex >= nLength )
if ( nIndex >= SAL_N_ELEMENTS(pOutlineSettingsArrs) )
return sRet;
else
{
......@@ -898,9 +895,7 @@ bool OutlineTypeMgr::IsCustomized(sal_uInt16 nIndex)
{
bool bRet = false;
sal_uInt16 nLength = SAL_N_ELEMENTS(pOutlineSettingsArrs);
if ( nIndex >= nLength )
if ( nIndex >= SAL_N_ELEMENTS(pOutlineSettingsArrs) )
return bRet;
else
{
......
......@@ -126,9 +126,8 @@ void TextCharacterSpacingControl::Initialize()
{
MapUnit eUnit = GetCoreMetric();
MapUnit eOrgUnit = eUnit;
MapUnit ePntUnit(MapUnit::MapPoint);
long nBig = maEditKerning->Normalize(nKerning);
nKerning = LogicToLogic(nBig, eOrgUnit, ePntUnit);
nKerning = LogicToLogic(nBig, eOrgUnit, MapUnit::MapPoint);
maEditKerning->SetValue(nKerning);
}
else if(SfxItemState::DISABLED == eState)
......
......@@ -63,11 +63,10 @@ OUString SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
{
// deliver and set the Metric of the application
FieldUnit eOutUnit = SfxModule::GetModuleFieldUnit( getFrameInterface() );
FieldUnit eInUnit = FUNIT_100TH_MM;
OUString sMetric;
const sal_Unicode cSep = Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep()[0];
sal_Int64 nConvVal = MetricField::ConvertValue( nVal * 100, 0L, 0, eInUnit, eOutUnit );
sal_Int64 nConvVal = MetricField::ConvertValue( nVal * 100, 0L, 0, FUNIT_100TH_MM, eOutUnit );
if ( nConvVal < 0 && ( nConvVal / 100 == 0 ) )
sMetric += "-";
......
......@@ -792,7 +792,6 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr) const
SdrLayerID nLayerId(0);
bool bLayerDC=false;
OUString aObjName;
bool bObjNameDC=false,bObjNameSet=false;
long nSnapPosX=0; bool bSnapPosXDC=false;
long nSnapPosY=0; bool bSnapPosYDC=false;
long nSnapWdt=0; bool bSnapWdtDC=false;
......@@ -848,14 +847,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr) const
if (!bLogicHgtDiff && aSnapRect.GetHeight()!=aLogicRect.GetHeight()) bLogicHgtDiff=true;
}
}
if (!bObjNameDC ) {
if (!bObjNameSet) {
aObjName=pObj->GetName();
} else {
if (!aObjName.equals(pObj->GetName()))
bObjNameDC = true;
}
}
aObjName=pObj->GetName();
}
if (bSnapPosXDC || nAllSnapPosX!=nSnapPosX) rAttr.Put(SdrAllPositionXItem(nAllSnapPosX));
......
......@@ -580,7 +580,6 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
rIndent=0;
if (pSet==nullptr) return false;
const SfxPoolItem* pItem=nullptr;
bool bRet = false;
switch (nWhich) {
case XATTR_LINEDASH :
case XATTR_LINEWIDTH :
......@@ -832,7 +831,7 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
}
} break;
} // switch
return bRet;
return false;
}
sal_uInt16 ImpSortWhich(sal_uInt16 nWhich)
......
......@@ -744,21 +744,18 @@ static void lcl_ShapePropertiesFromDFF( const SvxMSDffHandle* pData, css::beans:
}
if ( nFlags & SvxMSDffHandleFlags::MIRRORED_X )
{
bool bMirroredX = true;
rPropValues[ n ].Name = "MirroredX";
rPropValues[ n++ ].Value <<= bMirroredX;
rPropValues[ n++ ].Value <<= true;
}
if ( nFlags & SvxMSDffHandleFlags::MIRRORED_Y )
{
bool bMirroredY = true;
rPropValues[ n ].Name = "MirroredY";
rPropValues[ n++ ].Value <<= bMirroredY;
rPropValues[ n++ ].Value <<= true;
}
if ( nFlags & SvxMSDffHandleFlags::SWITCHED )
{
bool bSwitched = true;
rPropValues[ n ].Name = "Switched";
rPropValues[ n++ ].Value <<= bSwitched;
rPropValues[ n++ ].Value <<= true;
}
if ( nFlags & SvxMSDffHandleFlags::POLAR )
{
......@@ -2088,8 +2085,8 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat )
std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() );
sal_uInt32 nDefaultObjectSizeWidth = 3000; // default width from SDOptions ?
sal_uInt32 nDefaultObjectSizeHeight= 3000;
sal_uInt32 const nDefaultObjectSizeWidth = 3000; // default width from SDOptions ?
sal_uInt32 const nDefaultObjectSizeHeight= 3000;
if ( ImpVerticalSwitch( *this ) )
{
......
......@@ -289,7 +289,6 @@ XPolygon ImpPathCreateUser::GetFormPoly() const
void ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown)
{
bool bRet = true;
aBezStart=rP1;
aBezCtrl1=rP1+rDir;
aBezCtrl2=rP2;
......@@ -298,7 +297,7 @@ void ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Poi
// Also copy the end point when no end point is set yet
if (!bMouseDown || (0L == aBezEnd.X() && 0L == aBezEnd.Y())) aBezEnd=rP2;
bBezier=bRet;
bBezier=true;
}
XPolygon ImpPathCreateUser::GetBezierPoly() const
......
......@@ -395,20 +395,18 @@ void SAL_CALL AccessibleCell::grabFocus()
sal_Int32 SAL_CALL AccessibleCell::getForeground()
{
ThrowIfDisposed ();
sal_Int32 nColor (0x0ffffffL);
// todo
return nColor;
return sal_Int32(0x0ffffffL);
}
sal_Int32 SAL_CALL AccessibleCell::getBackground()
{
ThrowIfDisposed ();
sal_Int32 nColor (0L);
// todo
return nColor;
return 0;
}
......
......@@ -228,8 +228,8 @@ void SvxLineWidthToolBoxControl::StateChanged(
// Core-Unit handed over to MetricField
// Should not happen in CreateItemWin ()!
MapUnit eUnit = MapUnit::Map100thMM; // CD!!! GetCoreMetric();
pFld->SetCoreUnit( eUnit );
// CD!!! GetCoreMetric();
pFld->SetCoreUnit( MapUnit::Map100thMM );
pFld->Update( static_cast<const XLineWidthItem*>(pState) );
}
......
......@@ -3131,8 +3131,7 @@ void SvxCurrencyToolBoxControl::GetCurrencySymbols( std::vector<OUString>& rList
rCurrencyTable[0].GetLanguage() ) );
rList.push_back( aString );
sal_uInt16 nAuto = ( sal_uInt16 )-1;
rCurrencyList.push_back( nAuto );
rCurrencyList.push_back( sal_uInt16(-1) ); // nAuto
if( bFlag )
{
......
......@@ -274,11 +274,10 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem
if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_DEPTH ) == SfxItemState::SET)
{
double fDepth = rReq.GetArgs()->GetItem<SvxDoubleItem>(SID_EXTRUSION_DEPTH)->GetValue();
double fFraction = 0.0;
EnhancedCustomShapeParameterPair aDepthPropPair;
aDepthPropPair.First.Value <<= fDepth;
aDepthPropPair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
aDepthPropPair.Second.Value <<= fFraction;
aDepthPropPair.Second.Value <<= 0.0; // fraction
aDepthPropPair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
css::beans::PropertyValue aPropValue;
......
......@@ -95,8 +95,7 @@ void SdrUIObject::execute(const OUString& rAction,
throw css::uno::RuntimeException("missing parameter FRAC_Y");
double nFracY = itrFracY->second.toDouble();
Fraction aFracY(nFracY);
bool bRelative = true;
pObj->Resize(aPos, aFracX, aFracY, bRelative);
pObj->Resize(aPos, aFracX, aFracY, true/*bRelative*/);
}
else if (rAction == "CROP")
{
......@@ -156,8 +155,7 @@ void SdrUIObject::execute(const OUString& rAction,
else if (rAction == "SHEAR")
{
Point aPos;
double nAngle = 0;
pObj->Shear(aPos, nAngle, 0, false);
pObj->Shear(aPos, 0.0/*nAngle*/, 0, false);
}
}
......
......@@ -197,7 +197,6 @@ uno::Any SAL_CALL ChineseTranslation_UnoDialog::getPropertyValue( const OUString
uno::Any aRet;
bool bDirectionToSimplified = true;
bool bUseCharacterVariants = false;
bool bTranslateCommonTerms = false;
{
......@@ -213,7 +212,7 @@ uno::Any SAL_CALL ChineseTranslation_UnoDialog::getPropertyValue( const OUString
}
else if( rPropertyName == "IsUseCharacterVariants" )
{
aRet <<= bUseCharacterVariants;
aRet <<= false;
}
else if( rPropertyName == "IsTranslateCommonTerms" )
{
......
......@@ -589,10 +589,9 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto
// putting the StatusIndicator that we got from the MediaDescriptor into our local FilterData copy
if ( rSettings.mxStatusIndicator.is() )
{
OUString sStatusIndicator( "StatusIndicator" );
int i = rSettings.maFilterData.getLength();
rSettings.maFilterData.realloc( i + 1 );
rSettings.maFilterData[ i ].Name = sStatusIndicator;
rSettings.maFilterData[ i ].Name = "StatusIndicator";
rSettings.maFilterData[ i ].Value <<= rSettings.mxStatusIndicator;
}
}
......
......@@ -96,9 +96,9 @@ bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPro
{
try
{
MapUnit aMapUnit( MapUnit::Map100thMM ); // the API handles with MapUnit::Map100thMM map mode
// the API handles with MapUnit::Map100thMM map mode
MapUnit aObjUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( embed::Aspects::MSOLE_CONTENT ) );
aTmp = OutputDevice::LogicToLogic( aTmp, aMapUnit, aObjUnit );
aTmp = OutputDevice::LogicToLogic( aTmp, MapUnit::Map100thMM, aObjUnit );
xObj->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, awt::Size( aTmp.Width(), aTmp.Height() ) );
}
catch( uno::Exception& )
......
......@@ -440,9 +440,8 @@ SvxGraphicHelperStream_Impl SvXMLGraphicHelper::ImplGetGraphicStream( const OUSt
aRet.xStream = aRet.xStorage->openStreamElement( rPictureStreamName, nMode );
if( aRet.xStream.is() && ( SvXMLGraphicHelperMode::Write == meCreateMode ) )
{
OUString aPropName( "UseCommonStoragePasswordEncryption" );
uno::Reference < beans::XPropertySet > xProps( aRet.xStream, uno::UNO_QUERY );
xProps->setPropertyValue( aPropName, uno::makeAny( true) );
xProps->setPropertyValue( "UseCommonStoragePasswordEncryption", uno::makeAny( true) );
}
}
......@@ -478,7 +477,8 @@ OUString SvXMLGraphicHelper::ImplGetGraphicMimeType( const OUString& rFileName )
const OString aExt(OUStringToOString(rFileName.copy(rFileName.getLength() - 3),
RTL_TEXTENCODING_ASCII_US));
for( long i = 0, nCount = SAL_N_ELEMENTS(aMapper); ( i < nCount ) && aMimeType.isEmpty(); ++i )
long const nCount = SAL_N_ELEMENTS(aMapper);
for( long i = 0; ( i < nCount ) && aMimeType.isEmpty(); ++i )
if( aExt == aMapper[ i ].pExt )
aMimeType = OUString( aMapper[ i ].pMimeType, strlen( aMapper[ i ].pMimeType ), RTL_TEXTENCODING_ASCII_US );
}
......@@ -647,9 +647,8 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt
if( aObj.GetType() != GraphicType::NONE )
{
maGrfObjs.push_back( aObj );
OUString aBaseURL( XML_GRAPHICOBJECT_URL_BASE );
rURLPair.second = aBaseURL;
rURLPair.second = XML_GRAPHICOBJECT_URL_BASE;
rURLPair.second += OStringToOUString(aObj.GetUniqueID(),
RTL_TEXTENCODING_ASCII_US);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment