loplugin:unuseddefaultparams

Change-Id: Ia414f7845425ef73859ed04853378e96cc738795
Reviewed-on: https://gerrit.libreoffice.org/22971
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin 2016-03-07 08:09:35 +02:00 committed by Noel Grandin
parent cc84aaf70a
commit 359e0b47a0
55 changed files with 153 additions and 278 deletions

View File

@ -21,7 +21,7 @@
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unusedmethods' check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unuseddefaultparams' check
$ ./compilerplugins/clang/unuseddefaultparams.py unuseddefaultparams.log
*/

View File

@ -293,9 +293,9 @@ namespace connectivity
}
OUString SQLError::getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1 ) const
OUString SQLError::getErrorMessage( const ErrorCondition _eCondition ) const
{
return m_pImpl->getErrorMessage( _eCondition, _rParamValue1, ParamValue(), ParamValue() );
return m_pImpl->getErrorMessage( _eCondition, ParamValue(), ParamValue(), ParamValue() );
}
@ -311,16 +311,16 @@ namespace connectivity
}
void SQLError::raiseException( const ErrorCondition _eCondition, const ParamValue& _rParamValue1 ) const
void SQLError::raiseException( const ErrorCondition _eCondition ) const
{
m_pImpl->raiseException( _eCondition, _rParamValue1, ParamValue(), ParamValue() );
m_pImpl->raiseException( _eCondition, ParamValue(), ParamValue(), ParamValue() );
}
void SQLError::raiseTypedException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext,
const Type& _rExceptionType, const ParamValue& _rParamValue1 ) const
const Type& _rExceptionType ) const
{
m_pImpl->raiseTypedException( _eCondition, _rxContext, _rExceptionType, _rParamValue1, ParamValue(), ParamValue() );
m_pImpl->raiseTypedException( _eCondition, _rxContext, _rExceptionType, ParamValue(), ParamValue(), ParamValue() );
}

View File

@ -1275,9 +1275,9 @@ Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const Sequence< Any >&
return aRet;
}
template < typename T, SQLINTEGER BufferLength > T OResultSet::getStmtOption (SQLINTEGER fOption, T dflt) const
template < typename T, SQLINTEGER BufferLength > T OResultSet::getStmtOption (SQLINTEGER fOption) const
{
T result (dflt);
T result (0);
OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!");
N3SQLGetStmtAttr(m_aStatementHandle, fOption, &result, BufferLength, nullptr);
return result;

View File

@ -420,9 +420,9 @@ Reference< XResultSet > OStatement_Base::getResultSet(bool checkCount)
// Invoke SQLGetStmtOption with the given option.
template < typename T, SQLINTEGER BufferLength > T OStatement_Base::getStmtOption (SQLINTEGER fOption, T dflt) const
template < typename T, SQLINTEGER BufferLength > T OStatement_Base::getStmtOption (SQLINTEGER fOption) const
{
T result (dflt);
T result (0);
OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!");
N3SQLGetStmtAttr(m_aStatementHandle, fOption, &result, BufferLength, nullptr);
return result;

View File

@ -156,7 +156,7 @@ namespace connectivity
static sal_Int32 getFetchDirection() { return css::sdbc::FetchDirection::FORWARD; }
sal_Int32 getFetchSize() const;
OUString getCursorName() const;
template < typename T, SQLINTEGER BufferLength > T getStmtOption (SQLINTEGER fOption, T dflt = 0) const;
template < typename T, SQLINTEGER BufferLength > T getStmtOption (SQLINTEGER fOption) const;
void setFetchDirection(sal_Int32 _par0);
void setFetchSize(sal_Int32 _par0);

View File

@ -87,7 +87,7 @@ namespace connectivity
OUString getCursorName() const;
bool isUsingBookmarks() const;
bool getEscapeProcessing() const;
template < typename T, SQLINTEGER BufferLength > T getStmtOption (SQLINTEGER fOption, T dflt = 0) const;
template < typename T, SQLINTEGER BufferLength > T getStmtOption (SQLINTEGER fOption) const;
void setQueryTimeOut(sal_Int64 _par0) ;
void setMaxFieldSize(sal_Int64 _par0) ;

View File

@ -277,16 +277,15 @@ SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage(
sal_uInt16 nId,
const OUString& rIconText,
const Image& rChoiceIcon,
CreatePage pCreateFunc /* != 0 */,
GetPageRanges pRangesFunc /* darf 0 sein */
CreatePage pCreateFunc /* != 0 */
)
{
IconChoicePageData* pData = new IconChoicePageData ( nId, pCreateFunc,
pRangesFunc,
nullptr,
false/*bItemsOnDemand*/ );
maPageList.push_back( pData );
pData->fnGetRanges = pRangesFunc;
pData->fnGetRanges = nullptr;
pData->bOnDemand = false;
sal_uInt16 *pId = new sal_uInt16 ( nId );

View File

@ -92,8 +92,7 @@ void SvPasteObjectDialog::Insert( SotClipboardFormatId nFormat, const OUString&
aSupplementMap.insert( ::std::make_pair( nFormat, rFormatName ) );
}
SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper,
const DataFlavorExVector* pFormats )
SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper)
{
//TODO/LATER: why is the Descriptor never used?!
TransferableObjectDescriptor aDesc;
@ -102,8 +101,7 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelpe
(void)const_cast<TransferableDataHelper&>(rHelper).GetTransferableObjectDescriptor(
SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc);
}
if ( !pFormats )
pFormats = &rHelper.GetDataFlavorExVector();
const DataFlavorExVector* pFormats = &rHelper.GetDataFlavorExVector();
// create and fill dialog box
OUString aSourceName, aTypeName;

View File

@ -177,7 +177,7 @@ public:
// interface
SvxIconChoiceCtrlEntry* AddTabPage(
sal_uInt16 nId, const OUString& rIconText, const Image& rChoiceIcon,
CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = nullptr /* NULL allowed*/ );
CreatePage pCreateFunc /* != NULL */ );
void SetCurPageId( sal_uInt16 nId ) { mnCurrentPageId = nId; FocusOnIcon( nId ); }
sal_uInt16 GetCurPageId() const { return mnCurrentPageId; }

View File

@ -60,8 +60,7 @@ public:
void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName );
void SetObjName( const SvGlobalName & rClass, const OUString & rObjName );
SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper,
const DataFlavorExVector* pFormats=nullptr );
SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper);
};
#endif // INCLUDED_CUI_SOURCE_INC_PASTEDLG_HXX

View File

@ -1534,7 +1534,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n
invalidateUndoRedo();
}
OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition)
OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource)
{
OQueryTableWindow* pSourceWin = static_cast<OQueryTableWindow*>(jxdSource.pListBox->GetTabWin());
if (!pSourceWin)
@ -1555,7 +1555,7 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxd
aInfo->SetDataType(pInf->GetDataType());
aInfo->SetVisible();
return InsertField(aInfo, _nColumnPosition);
return InsertField(aInfo);
}
OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate)

View File

@ -82,7 +82,7 @@ namespace dbaui
virtual void dispose() override;
void initialize();
OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID );
OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource );
OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true );
void InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPosition );
void RemoveColumn( sal_uInt16 _nColumnId );

View File

@ -97,17 +97,10 @@ namespace connectivity
error messages thrown by core components of OpenOffice.org Base will contain
a standardized prefix &quot;[OOoBase]&quot; in every message.
@param _rParamValue1
the value which the placeholder $1$ should be replaced with. If this value is
not present (see <code>::boost::optional::operator !</code>), then no replacement
will happen, and <code>_rParamValue2</code> and <code>_rParamValue3</code> will be
ignored.
@see css::sdb::ErrorCondition
*/
OUString getErrorMessage(
const ErrorCondition _eCondition,
const ParamValue& _rParamValue1 = ParamValue()
const ErrorCondition _eCondition
) const;
/** returns the error code associated with a given error condition
@ -182,17 +175,11 @@ namespace connectivity
@param _eCondition
the ErrorCondition which hit you
@param _rParamValue1
a runtime-dependent value which should be filled into the error message
which is associated with <arg>_eCondition</arg>, replacing the first placeholder
in this message.
@see getErrorMessage
@see getErrorCode
*/
void raiseException(
const ErrorCondition _eCondition,
const ParamValue& _rParamValue1 = ParamValue()
const ErrorCondition _eCondition
) const;
/** raises a typed exception, that is, a UNO exception which is derived from
@ -209,11 +196,6 @@ namespace connectivity
the type of the exception to throw. This type <em>must</em> specify
an exception class derived from css::sdbc::SQLException.
@param _rParamValue1
a runtime-dependent value which should be filled into the error message
which is associated with <arg>_eCondition</arg>, replacing the first placeholder
in this message.
@throws ::std::bad_cast
if <arg>_rExceptionType</arg> does not specify an exception class derived from
css::sdbc::SQLException.
@ -224,8 +206,7 @@ namespace connectivity
void raiseTypedException(
const ErrorCondition _eCondition,
const css::uno::Reference< css::uno::XInterface >& _rxContext,
const css::uno::Type& _rExceptionType,
const ParamValue& _rParamValue1 = ParamValue()
const css::uno::Type& _rExceptionType
) const;
/** retrieves an <code>SQLException</code> object which contains information about

View File

@ -76,8 +76,7 @@ struct SAL_DLLPUBLIC_RTTI SfxChildWinInfo
bVisible = false;
nFlags = SfxChildWindowFlags::NONE;
}
bool GetExtraData_Impl( SfxChildAlignment *pAlign,
SfxChildAlignment *pLastAlign = nullptr ) const;
bool GetExtraData_Impl( SfxChildAlignment *pAlign ) const;
};
// ChildWindow factory methods

View File

@ -199,7 +199,7 @@ namespace svl
virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const = 0;
virtual OUString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0;
virtual SfxUndoAction* GetRedoAction( size_t nNo=0 ) const = 0;
virtual SfxUndoAction* GetRedoAction() const = 0;
virtual bool Undo() = 0;
virtual bool Redo() = 0;
@ -317,7 +317,7 @@ public:
virtual SfxUndoAction* GetUndoAction( size_t nNo=0 ) const override;
virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const override;
virtual OUString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const override;
virtual SfxUndoAction* GetRedoAction( size_t nNo=0 ) const override;
virtual SfxUndoAction* GetRedoAction() const override;
virtual bool Undo() override;
virtual bool Redo() override;
virtual void Clear() override;

View File

@ -263,8 +263,7 @@ public:
SvxIconChoiceCtrlEntry* InsertEntry( const OUString& rText,
const Image& rImage,
sal_uLong nPos = CONTAINER_APPEND );
const Image& rImage);
/** creates automatic mnemonics for all icon texts in the control

View File

@ -470,7 +470,7 @@ public:
void RemoveAllByKind(SdrHdlKind eKind);
// Last inserted handles are likely hit (if the handles are above each other)
SdrHdl* IsHdlListHit(const Point& rPnt, bool bBack=false, bool bNext=false, SdrHdl* pHdl0=nullptr) const;
SdrHdl* IsHdlListHit(const Point& rPnt) const;
SdrHdl* GetHdl(SdrHdlKind eKind1) const;
};

View File

@ -327,9 +327,7 @@ public:
inline bool
GetNewAbsURL(OUString const & rTheRelURIRef,
INetURLObject * pTheAbsURIRef,
EncodeMechanism eMechanism = WAS_ENCODED,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
INetURLObject * pTheAbsURIRef)
const;
/** @descr If rTheRelURIRef cannot be converted to an absolute URL
@ -576,20 +574,12 @@ public:
@param rTheName The new name.
@param nIndex The non-negative index of the segment, or LAST_SEGMENT
if addressing the last segment.
@param bIgnoreFinalSlash If true, a final slash at the end of the
hierarchical path does not denote an empty segment, but is ignored.
@return True if the name has successfully been modified (and the
resulting URI is still valid). If the path is not hierarchical, or
the specified segment does not exist, false is returned. If false is
returned, the object is not modified.
*/
bool setName(OUString const & rTheName,
sal_Int32 nIndex = LAST_SEGMENT,
bool bIgnoreFinalSlash = true);
bool setName(OUString const & rTheName);
/** Get the base of the name of a segment.
@ -922,18 +912,12 @@ public:
/** Get the 'extension' of the last segment in the path.
@param eMechanism See the general discussion for get-methods.
@param eCharset See the general discussion for get-methods.
@return For a hierarchical URL, everything after the first unencoded
'.' in the last segment of the path. Note that this 'extension' may
be empty. If the URL is not hierarchical, or if the last segment does
not contain an unencoded '.', an empty string is returned.
*/
OUString GetFileExtension(DecodeMechanism eMechanism = DECODE_TO_IURI,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8) const;
OUString GetFileExtension() const;
inline bool Append(OUString const & rTheSegment,
EncodeMechanism eMechanism = WAS_ENCODED,
@ -1264,15 +1248,13 @@ INetURLObject::smartRel2Abs(OUString const & rTheRelURIRef,
}
inline bool INetURLObject::GetNewAbsURL(OUString const & rTheRelURIRef,
INetURLObject * pTheAbsURIRef,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
INetURLObject * pTheAbsURIRef)
const
{
INetURLObject aTheAbsURIRef;
bool bWasAbsolute;
if (!convertRelToAbs(rTheRelURIRef, false, aTheAbsURIRef, bWasAbsolute,
eMechanism, eCharset, false/*bIgnoreFragment*/, false, false,
WAS_ENCODED, RTL_TEXTENCODING_UTF8, false/*bIgnoreFragment*/, false, false,
FSYS_DETECT))
return false;
if (pTheAbsURIRef)

View File

@ -628,10 +628,10 @@ public:
sal_Int64 getIntValue( const char* i_pPropName, sal_Int64 i_nDefault ) const
{ return getIntValue( OUString::createFromAscii( i_pPropName ), i_nDefault ); }
OUString getStringValue( const OUString& i_rPropertyName, const OUString& i_rDefault = OUString() ) const;
OUString getStringValue( const OUString& i_rPropertyName ) const;
// convenience for fixed strings
OUString getStringValue( const char* i_pPropName, const OUString& i_rDefault = OUString() ) const
{ return getStringValue( OUString::createFromAscii( i_pPropName ), i_rDefault ); }
OUString getStringValue( const char* i_pPropName ) const
{ return getStringValue( OUString::createFromAscii( i_pPropName ) ); }
// helper functions for user to create a single control
struct UIControlOptions

View File

@ -197,12 +197,8 @@ namespace rptui
void collapseSections(const css::uno::Sequence< css::beans::PropertyValue>& _aCollpasedSections);
/** align all marked objects in all sections
*
* \param eHor
* \param eVert
* \param bBoundRects
*/
void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection, bool bBoundRects = false);
void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection);
sal_uInt32 getMarkedObjectCount() const;

View File

@ -242,7 +242,7 @@ namespace rptui
/** align all marked objects in all sections
*/
void alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection, bool bBoundRects = false);
void alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection);
/** creates a default object
*

View File

@ -353,10 +353,10 @@ void OReportWindow::collapseSections(const uno::Sequence< css::beans::PropertyVa
m_aViewsWindow->collapseSections(_aCollpasedSections);
}
void OReportWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection, bool bBoundRects)
void OReportWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection)
{
m_aViewsWindow->alignMarkedObjects(_nControlModification, _bAlignAtSection, bBoundRects);
m_aViewsWindow->alignMarkedObjects(_nControlModification, _bAlignAtSection);
}
void OReportWindow::setGridSnap(bool bOn)

View File

@ -752,7 +752,7 @@ void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles,
}
}
void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection, bool _bBoundRects)
void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection)
{
if ( _nControlModification == ControlModification::NONE )
return;
@ -780,11 +780,11 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli
}
RectangleLess aCompare(eCompareMode,aRefPoint);
TRectangleMap aSortRectangles(aCompare);
collectRectangles(aSortRectangles,_bBoundRects);
collectRectangles(aSortRectangles,false);
Rectangle aBound;
Rectangle aResize;
collectBoundResizeRect(aSortRectangles,_nControlModification,_bAlignAtSection,_bBoundRects,aBound,aResize);
collectBoundResizeRect(aSortRectangles,_nControlModification,_bAlignAtSection,false,aBound,aResize);
bool bMove = true;
@ -847,7 +847,7 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli
if ( pView == aInterSectRectIter->second.second && (dynamic_cast<OUnoObject*>(aInterSectRectIter->second.first) || dynamic_cast<OOle2Obj*>(aInterSectRectIter->second.first)))
{
SdrObject* pPreviousObj = aInterSectRectIter->second.first;
Rectangle aIntersectRect = aTest.GetIntersection(_bBoundRects ? pPreviousObj->GetCurrentBoundRect() : pPreviousObj->GetSnapRect());
Rectangle aIntersectRect = aTest.GetIntersection( pPreviousObj->GetSnapRect());
if ( !aIntersectRect.IsEmpty() && (aIntersectRect.Left() != aIntersectRect.Right() && aIntersectRect.Top() != aIntersectRect.Bottom() ) )
{
*pValue = aRefFun(&aIntersectRect) - aGetFun(&aObjRect);
@ -859,12 +859,12 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli
*pValue = aGetFun(&aBound) - aGetFun(&aObjRect);
}
if ( lcl_getNewRectSize(aObjRect,nXMov,nYMov,pObj,pView,_nControlModification,_bBoundRects) )
if ( lcl_getNewRectSize(aObjRect,nXMov,nYMov,pObj,pView,_nControlModification,false) )
{
const Size aSize(nXMov,nYMov);
pView->AddUndo(pView->GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*pObj,aSize));
pObj->Move(aSize);
aObjRect = (_bBoundRects ? pObj->GetCurrentBoundRect() : pObj->GetSnapRect());
aObjRect = pObj->GetSnapRect();
}
// resizing control
@ -880,7 +880,7 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli
nXMov = aObjRect.getWidth();
else if ( _nControlModification == ControlModification::WIDTH_GREATEST )
nYMov = aObjRect.getHeight();
lcl_getNewRectSize(aObjRect,nXMov,nYMov,pObj,pView,_nControlModification,_bBoundRects);
lcl_getNewRectSize(aObjRect,nXMov,nYMov,pObj,pView,_nControlModification,false);
// run through
case ControlModification::WIDTH_SMALLEST:
case ControlModification::HEIGHT_SMALLEST:

View File

@ -173,7 +173,7 @@ public:
bool IsEmpty() const;
bool GetFirstVisibleAttr( SCROW& rFirstRow ) const;
bool GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData, bool bFullFormattedArea = false ) const;
bool GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const;
bool HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
bool IsVisibleEqual( const ScAttrArray& rOther,
SCROW nStartRow, SCROW nEndRow ) const;

View File

@ -297,7 +297,7 @@ public:
void UndoToColumn(
sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
ScColumn& rColumn, const ScMarkData* pMarkData = nullptr) const;
ScColumn& rColumn) const;
void CopyScenarioFrom( const ScColumn& rSrcCol );
void CopyScenarioTo( ScColumn& rDestCol ) const;

View File

@ -85,7 +85,7 @@ public:
/** Copy rArray.nStart+nSourceDy to this.nStart */
void CopyFrom( const ScCompressedArray& rArray,
A nStart, A nEnd, long nSourceDy = 0 );
A nStart, A nEnd );
// methods public for the coupled array sum methods
/** Obtain index into entries for nPos */
@ -168,8 +168,7 @@ public:
/** Copy values from rArray and bitwise AND them with rValueToAnd. */
void CopyFromAnded(
const ScBitMaskCompressedArray& rArray,
A nStart, A nEnd, const D& rValueToAnd,
long nSourceDy = 0 );
A nStart, A nEnd, const D& rValueToAnd );
/** Return the last row where an entry meets the condition:
((aValue & rBitMask) != 0), start searching at nStart. If no entry

View File

@ -1825,7 +1825,7 @@ bool ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
const SCROW SC_VISATTR_STOP = 84;
bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData, bool bFullFormattedArea ) const
bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
{
OSL_ENSURE( nCount, "nCount == 0" );
@ -1845,18 +1845,10 @@ bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData, bool bFu
SCROW nStartRow = (nPos ? pData[nPos-1].nRow + 1 : 0);
if (nStartRow <= nLastData + 1)
{
if (bFullFormattedArea && pData[nPos].pPattern->IsVisible())
{
rLastRow = pData[nPos].nRow;
return true;
}
else
{
// Ignore here a few rows if data happens to end within
// SC_VISATTR_STOP rows before MAXROW.
rLastRow = nLastData;
return false;
}
// Ignore here a few rows if data happens to end within
// SC_VISATTR_STOP rows before MAXROW.
rLastRow = nLastData;
return false;
}
// Find a run below last data row.
@ -1873,7 +1865,7 @@ bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData, bool bFu
if ( nAttrStartRow <= nLastData )
nAttrStartRow = nLastData + 1;
SCROW nAttrSize = pData[nEndPos].nRow + 1 - nAttrStartRow;
if ( nAttrSize >= SC_VISATTR_STOP && !bFullFormattedArea )
if ( nAttrSize >= SC_VISATTR_STOP )
break; // while, ignore this range and below
else if ( pData[nEndPos].pPattern->IsVisible() )
{

View File

@ -1693,12 +1693,12 @@ void ScColumn::CopyToColumn(
void ScColumn::UndoToColumn(
sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
ScColumn& rColumn, const ScMarkData* pMarkData ) const
ScColumn& rColumn ) const
{
if (nRow1 > 0)
CopyToColumn(rCxt, 0, nRow1-1, InsertDeleteFlags::FORMULA, false, rColumn);
CopyToColumn(rCxt, nRow1, nRow2, nFlags, bMarked, rColumn, pMarkData); //TODO: bMarked ????
CopyToColumn(rCxt, nRow1, nRow2, nFlags, bMarked, rColumn); //TODO: bMarked ????
if (nRow2 < MAXROW)
CopyToColumn(rCxt, nRow2+1, MAXROW, InsertDeleteFlags::FORMULA, false, rColumn);

View File

@ -238,16 +238,15 @@ void ScCompressedArray<A,D>::SetValue( A nStart, A nEnd, const D& rValue )
template< typename A, typename D >
void ScCompressedArray<A,D>::CopyFrom( const ScCompressedArray<A,D>& rArray, A nStart,
A nEnd, long nSourceDy )
A nEnd )
{
size_t nIndex = 0;
A nRegionEnd;
for (A j=nStart; j<=nEnd; ++j)
{
const D& rValue = (j==nStart ?
rArray.GetValue( j+nSourceDy, nIndex, nRegionEnd) :
rArray.GetValue( j, nIndex, nRegionEnd) :
rArray.GetNextValue( nIndex, nRegionEnd));
nRegionEnd -= nSourceDy;
if (nRegionEnd > nEnd)
nRegionEnd = nEnd;
this->SetValue( j, nRegionEnd, rValue);
@ -370,16 +369,15 @@ void ScBitMaskCompressedArray<A,D>::OrValue( A nStart, A nEnd,
template< typename A, typename D >
void ScBitMaskCompressedArray<A,D>::CopyFromAnded(
const ScBitMaskCompressedArray<A,D>& rArray, A nStart, A nEnd,
const D& rValueToAnd, long nSourceDy )
const D& rValueToAnd )
{
size_t nIndex = 0;
A nRegionEnd;
for (A j=nStart; j<=nEnd; ++j)
{
const D& rValue = (j==nStart ?
rArray.GetValue( j+nSourceDy, nIndex, nRegionEnd) :
rArray.GetValue( j, nIndex, nRegionEnd) :
rArray.GetNextValue( nIndex, nRegionEnd));
nRegionEnd -= nSourceDy;
if (nRegionEnd > nEnd)
nRegionEnd = nEnd;
this->SetValue( j, nRegionEnd, rValue & rValueToAnd);

View File

@ -478,8 +478,8 @@ protected:
template< typename Type >
bool pushValueOperandToken( const Type& rValue, sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = nullptr );
template< typename Type >
inline bool pushValueOperandToken( const Type& rValue, const WhiteSpaceVec* pSpaces = nullptr )
{ return pushValueOperandToken( rValue, OPCODE_PUSH, pSpaces ); }
inline bool pushValueOperandToken( const Type& rValue )
{ return pushValueOperandToken( rValue, OPCODE_PUSH, nullptr ); }
bool pushParenthesesOperandToken( const WhiteSpaceVec* pOpeningSpaces = nullptr, const WhiteSpaceVec* pClosingSpaces = nullptr );
bool pushUnaryPreOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = nullptr );
bool pushUnaryPostOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = nullptr );

View File

@ -577,8 +577,7 @@ bool SfxChildWindow::WantsFocus() const
bool SfxChildWinInfo::GetExtraData_Impl
(
SfxChildAlignment *pAlign,
SfxChildAlignment *pLastAlign
SfxChildAlignment *pAlign
) const
{
// invalid?
@ -614,8 +613,6 @@ bool SfxChildWinInfo::GetExtraData_Impl
if ( nPos == -1 )
return false;
aStr = aStr.copy(nPos+1);
if ( pLastAlign )
*pLastAlign = (SfxChildAlignment) (sal_uInt16) aStr.toInt32();
// Then the splitting information
nPos = aStr.indexOf(',');

View File

@ -849,16 +849,16 @@ size_t SfxUndoManager::ImplGetRedoActionCount_Lock( bool const i_currentLevel )
}
SfxUndoAction* SfxUndoManager::GetRedoAction( size_t nNo ) const
SfxUndoAction* SfxUndoManager::GetRedoAction() const
{
UndoManagerGuard aGuard( *m_xData );
const SfxUndoArray* pUndoArray = m_xData->pActUndoArray;
if ( (pUndoArray->nCurUndoAction + nNo) > pUndoArray->aUndoActions.size() )
if ( (pUndoArray->nCurUndoAction) > pUndoArray->aUndoActions.size() )
{
return nullptr;
}
return pUndoArray->aUndoActions[ pUndoArray->nCurUndoAction + nNo ].pAction;
return pUndoArray->aUndoActions[ pUndoArray->nCurUndoAction ].pAction;
}

View File

@ -325,7 +325,7 @@ public:
void Clear( bool bInCtor = false );
void SetStyle( WinBits nWinStyle );
WinBits GetStyle() const { return nWinBits; }
void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos, const Point* pPos=nullptr );
void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos );
void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = nullptr );
void FontModified();
void SelectAll();
@ -359,9 +359,7 @@ public:
void SetEntryPos(
SvxIconChoiceCtrlEntry* pEntry,
const Point& rPos,
bool bAdjustRow = false,
bool bCheckScrollBars = false,
bool bKeepGridMap = false
bool bAdjustRow = false
);
void InvalidateEntry( SvxIconChoiceCtrlEntry* );

View File

@ -260,8 +260,7 @@ void SvxIconChoiceCtrl_Impl::FontModified()
ShowCursor( true );
}
void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t nPos,
const Point* pPos )
void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t nPos)
{
StopEditTimer();
aEntries.insert( nPos, pEntry );
@ -272,32 +271,22 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t
pZOrderList->push_back( pEntry );
pImpCursor->Clear();
if( pPos )
// If the UpdateMode is true, don't set all bounding rectangles to
// 'to be checked', but only the bounding rectangle of the new entry.
// Thus, don't call InvalidateBoundingRect!
pEntry->aRect.Right() = LONG_MAX;
if( bUpdateMode )
{
Size aSize( CalcBoundingSize( pEntry ) );
SetBoundingRect_Impl( pEntry, *pPos, aSize );
SetEntryPos( pEntry, *pPos, false, true, true /*keep grid map*/ );
pEntry->nFlags |= SvxIconViewFlags::POS_MOVED;
SetEntriesMoved( true );
FindBoundingRect( pEntry );
Rectangle aOutputArea( GetOutputRect() );
pGridMap->OccupyGrids( pEntry );
if( !aOutputArea.IsOver( pEntry->aRect ) )
return; // is invisible
pView->Invalidate( pEntry->aRect );
}
else
{
// If the UpdateMode is true, don't set all bounding rectangles to
// 'to be checked', but only the bounding rectangle of the new entry.
// Thus, don't call InvalidateBoundingRect!
pEntry->aRect.Right() = LONG_MAX;
if( bUpdateMode )
{
FindBoundingRect( pEntry );
Rectangle aOutputArea( GetOutputRect() );
pGridMap->OccupyGrids( pEntry );
if( !aOutputArea.IsOver( pEntry->aRect ) )
return; // is invisible
pView->Invalidate( pEntry->aRect );
}
else
InvalidateBoundingRect( pEntry->aRect );
}
InvalidateBoundingRect( pEntry->aRect );
}
void SvxIconChoiceCtrl_Impl::CreateAutoMnemonics( MnemonicGenerator* _pGenerator )
@ -1699,7 +1688,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po
}
void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos,
bool bAdjustAtGrid, bool bCheckScrollBars, bool bKeepGridMap )
bool bAdjustAtGrid )
{
ShowCursor( false );
Rectangle aBoundRect( GetEntryBoundRect( pEntry ));
@ -1713,8 +1702,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
Point aGridOffs(
pEntry->aGridRect.TopLeft() - pEntry->aRect.TopLeft() );
pImpCursor->Clear();
if( !bKeepGridMap )
pGridMap->Clear();
pGridMap->Clear();
aBoundRect.SetPos( rPos );
pEntry->aRect = aBoundRect;
pEntry->aGridRect.SetPos( rPos + aGridOffs );
@ -1744,9 +1732,6 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
if( bAdjustVirtSize )
AdjustVirtSize( pEntry->aRect );
if( bCheckScrollBars && bUpdateMode )
CheckScrollBars();
pView->Invalidate( pEntry->aRect );
pGridMap->OccupyGrids( pEntry );
}

View File

@ -101,11 +101,11 @@ void SvtIconChoiceCtrl::dispose()
Control::dispose();
}
SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const OUString& rText, const Image& rImage, sal_uLong nPos )
SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const OUString& rText, const Image& rImage )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, SvxIconViewFlags::NONE);
_pImp->InsertEntry( pEntry, nPos );
_pImp->InsertEntry( pEntry, CONTAINER_APPEND );
return pEntry;
}

View File

@ -1081,7 +1081,7 @@ Rectangle SvxRectCtlChildAccessibleContext::GetBoundingBox() throw( RuntimeExcep
return *mpBoundingBox;
}
void SvxRectCtlChildAccessibleContext::setStateChecked( bool bChecked, bool bFireFocus )
void SvxRectCtlChildAccessibleContext::setStateChecked( bool bChecked )
{
if( mbIsChecked != bChecked )
{
@ -1093,12 +1093,10 @@ void SvxRectCtlChildAccessibleContext::setStateChecked( bool bChecked, bool bFir
Any aNew;
Any& rMod = bChecked? aNew : aOld;
if( bFireFocus )
{
//Send the STATE_CHANGED(Focused) event to accessible
rMod <<= AccessibleStateType::FOCUSED;
CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
}
//Send the STATE_CHANGED(Focused) event to accessible
rMod <<= AccessibleStateType::FOCUSED;
CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
rMod <<= AccessibleStateType::CHECKED;
CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );

View File

@ -166,7 +166,7 @@ struct ArrayImpl
long GetColWidth( size_t nFirstCol, size_t nLastCol ) const;
long GetRowHeight( size_t nFirstRow, size_t nLastRow ) const;
double GetHorDiagAngle( size_t nCol, size_t nRow, bool bSimple = false ) const;
double GetHorDiagAngle( size_t nCol, size_t nRow ) const;
double GetVerDiagAngle( size_t nCol, size_t nRow ) const;
};
@ -300,12 +300,12 @@ long ArrayImpl::GetRowHeight( size_t nFirstRow, size_t nLastRow ) const
return GetRowPosition( nLastRow + 1 ) - GetRowPosition( nFirstRow );
}
double ArrayImpl::GetHorDiagAngle( size_t nCol, size_t nRow, bool bSimple ) const
double ArrayImpl::GetHorDiagAngle( size_t nCol, size_t nRow ) const
{
double fAngle = 0.0;
if( IsValidPos( nCol, nRow ) )
{
if( bSimple || !GetCell( nCol, nRow ).IsMerged() )
if( !GetCell( nCol, nRow ).IsMerged() )
{
fAngle = frame::GetHorDiagAngle( maWidths[ nCol ] + 1, maHeights[ nRow ] + 1 );
}

View File

@ -421,7 +421,7 @@ public:
// internal
/// Sets the checked status
void setStateChecked(bool bChecked, bool bFireFocus = true);
void setStateChecked(bool bChecked);
void FireFocusEvent();
protected:

View File

@ -2180,28 +2180,17 @@ void SdrHdlList::AddHdl(SdrHdl* pHdl)
}
}
SdrHdl* SdrHdlList::IsHdlListHit(const Point& rPnt, bool bBack, bool bNext, SdrHdl* pHdl0) const
SdrHdl* SdrHdlList::IsHdlListHit(const Point& rPnt) const
{
SdrHdl* pRet=nullptr;
const size_t nCount=GetHdlCount();
size_t nNum=bBack ? 0 : nCount;
while ((bBack ? nNum<nCount : nNum>0) && pRet==nullptr)
size_t nNum=nCount;
while (nNum>0 && pRet==nullptr)
{
if (!bBack)
nNum--;
nNum--;
SdrHdl* pHdl=GetHdl(nNum);
if (bNext)
{
if (pHdl==pHdl0)
bNext=false;
}
else
{
if (pHdl->IsHdlHit(rPnt))
pRet=pHdl;
}
if (bBack)
nNum++;
if (pHdl->IsHdlHit(rPnt))
pRet=pHdl;
}
return pRet;
}

View File

@ -829,7 +829,7 @@ public:
void DelSectionFormat( size_t nFormat);
void UpdateSection( size_t const nSect, SwSectionData &,
SfxItemSet const*const = nullptr);
bool IsAnySectionInDoc( bool bChkReadOnly = false ) const;
bool IsAnySectionInDoc() const;
OUString GetUniqueSectionName( const OUString* pChkStr = nullptr ) const;

View File

@ -81,7 +81,7 @@ public:
virtual bool GetInfo( SfxPoolItem& ) const override;
/// Copy attributes even among documents.
void CopyAttrs( const SwFormat&, bool bReplace=true );
void CopyAttrs( const SwFormat& );
/// Delete all attributes that are not in rFormat.
void DelDiffs( const SfxItemSet& rSet );
@ -97,8 +97,7 @@ public:
//UUUUinline
SfxItemState GetItemState( sal_uInt16 nWhich, bool bSrchInParent = true,
const SfxPoolItem **ppItem = nullptr ) const;
SfxItemState GetBackgroundState(SvxBrushItem &rItem,
bool bSrchInParent = true) const;
SfxItemState GetBackgroundState(SvxBrushItem &rItem) const;
virtual bool SetFormatAttr( const SfxPoolItem& rAttr );
virtual bool SetFormatAttr( const SfxItemSet& rSet );
virtual bool ResetFormatAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );

View File

@ -693,8 +693,7 @@ public:
bool bWithNum = false, bool bWithFootnote = true,
bool bReplaceTabsWithSpaces = false ) const;
OUString GetRedlineText( sal_Int32 nIdx = 0,
sal_Int32 nLen = SAL_MAX_INT32 ) const;
OUString GetRedlineText() const;
/** @return actual count of initial chars for initial-function.
If nWishLen == 0 that of first word. */

View File

@ -175,7 +175,7 @@ void SwFormat::SetName( const OUString& rNewName, bool bBroadcast )
in which <this> is defined. Currently this is important for DropCaps
because that contains data that needs to be copied deeply.
*/
void SwFormat::CopyAttrs( const SwFormat& rFormat, bool bReplace )
void SwFormat::CopyAttrs( const SwFormat& rFormat )
{
// copy only array with attributes delta
if ( IsInCache() )
@ -188,13 +188,6 @@ void SwFormat::CopyAttrs( const SwFormat& rFormat, bool bReplace )
// special treatments for some attributes
SwAttrSet* pChgSet = const_cast<SwAttrSet*>(&rFormat.m_aSet);
if( !bReplace ) // refresh only those that are not set?
{
if( pChgSet == &rFormat.m_aSet )
pChgSet = new SwAttrSet( rFormat.m_aSet );
pChgSet->Differentiate( m_aSet );
}
// copy only array with attributes delta
if( pChgSet->GetPool() != m_aSet.GetPool() )
pChgSet->CopyToModify( *this );
@ -450,7 +443,7 @@ SfxItemState SwFormat::GetItemState( sal_uInt16 nWhich, bool bSrchInParent, cons
return m_aSet.GetItemState( nWhich, bSrchInParent, ppItem );
}
SfxItemState SwFormat::GetBackgroundState(SvxBrushItem &rItem, bool bSrchInParent) const
SfxItemState SwFormat::GetBackgroundState(SvxBrushItem &rItem) const
{
if (supportsFullDrawingLayerFillAttributeSet())
{
@ -463,7 +456,7 @@ SfxItemState SwFormat::GetBackgroundState(SvxBrushItem &rItem, bool bSrchInParen
// if yes, fill the local SvxBrushItem using the new fill attributes
// as good as possible to have an instance for the pointer to point
// to and return as state that it is set
rItem = getSvxBrushItemFromSourceSet(m_aSet, RES_BACKGROUND, bSrchInParent);
rItem = getSvxBrushItemFromSourceSet(m_aSet, RES_BACKGROUND);
return SfxItemState::SET;
}
@ -472,7 +465,7 @@ SfxItemState SwFormat::GetBackgroundState(SvxBrushItem &rItem, bool bSrchInParen
}
const SfxPoolItem* pItem = nullptr;
SfxItemState eRet = m_aSet.GetItemState(RES_BACKGROUND, bSrchInParent, &pItem);
SfxItemState eRet = m_aSet.GetItemState(RES_BACKGROUND, true, &pItem);
if (pItem)
rItem = *static_cast<const SvxBrushItem*>(pItem);
return eRet;

View File

@ -115,7 +115,7 @@ size_t SwEditShell::GetSectionFormatCount() const
return GetDoc()->GetSections().size();
}
bool SwEditShell::IsAnySectionInDoc( bool bChkReadOnly ) const
bool SwEditShell::IsAnySectionInDoc() const
{
const SwSectionFormats& rFormats = GetDoc()->GetSections();
@ -126,9 +126,7 @@ bool SwEditShell::IsAnySectionInDoc( bool bChkReadOnly ) const
( (eTmpType = pFormat->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType ) )
{
const SwSection& rSect = *pFormat->GetSection();
if( !bChkReadOnly || rSect.IsProtectFlag() )
return true;
return true;
}
}
return false;

View File

@ -3211,7 +3211,7 @@ bool SwTextNode::GetExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx,
return true;
}
OUString SwTextNode::GetRedlineText( sal_Int32 nIdx, sal_Int32 nLen ) const
OUString SwTextNode::GetRedlineText() const
{
std::vector<sal_Int32> aRedlArr;
const SwDoc* pDoc = GetDoc();
@ -3256,20 +3256,18 @@ OUString SwTextNode::GetRedlineText( sal_Int32 nIdx, sal_Int32 nLen ) const
}
}
OUStringBuffer aText((nLen > GetText().getLength())
? GetText().copy(nIdx)
: GetText().copy(nIdx, nLen));
OUStringBuffer aText(GetText());
sal_Int32 nTextStt = nIdx;
sal_Int32 nIdxEnd = nIdx + aText.getLength();
sal_Int32 nTextStt = 0;
sal_Int32 nIdxEnd = aText.getLength();
for( size_t n = 0; n < aRedlArr.size(); n += 2 )
{
sal_Int32 nStt = aRedlArr[ n ];
sal_Int32 nEnd = aRedlArr[ n+1 ];
if( ( nIdx <= nStt && nStt <= nIdxEnd ) ||
( nIdx <= nEnd && nEnd <= nIdxEnd ))
if( ( 0 <= nStt && nStt <= nIdxEnd ) ||
( 0 <= nEnd && nEnd <= nIdxEnd ))
{
if( nStt < nIdx ) nStt = nIdx;
if( nStt < 0 ) nStt = 0;
if( nIdxEnd < nEnd ) nEnd = nIdxEnd;
const sal_Int32 nDelCnt = nEnd - nStt;
aText.remove(nStt - nTextStt, nDelCnt);

View File

@ -4010,10 +4010,9 @@ OUString INetURLObject::getName(sal_Int32 nIndex, bool bIgnoreFinalSlash,
return decode(pSegBegin, p, eMechanism, eCharset);
}
bool INetURLObject::setName(OUString const & rTheName, sal_Int32 nIndex,
bool bIgnoreFinalSlash)
bool INetURLObject::setName(OUString const & rTheName)
{
SubString aSegment(getSegment(nIndex, bIgnoreFinalSlash));
SubString aSegment(getSegment(LAST_SEGMENT, true));
if (!aSegment.isPresent())
return false;
@ -4879,10 +4878,9 @@ OUString INetURLObject::GetLastName(DecodeMechanism eMechanism,
return getName(LAST_SEGMENT, true, eMechanism, eCharset);
}
OUString INetURLObject::GetFileExtension(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset) const
OUString INetURLObject::GetFileExtension() const
{
return getExtension(LAST_SEGMENT, false, eMechanism, eCharset);
return getExtension(LAST_SEGMENT, false);
}
void INetURLObject::CutLastName()

View File

@ -394,9 +394,7 @@ public:
size_type size() const;
Val const * map(OUString const & rString,
OUString * pTranslation = nullptr)
const;
Val const * map(OUString const & rString) const;
private:
RegexpMapImpl< Val > * m_pImpl;
@ -545,8 +543,7 @@ typename RegexpMap< Val >::size_type RegexpMap< Val >::size() const
}
template< typename Val >
Val const * RegexpMap< Val >::map(rtl::OUString const & rString,
rtl::OUString * pTranslation) const
Val const * RegexpMap< Val >::map(rtl::OUString const & rString) const
{
for (int n = Regexp::KIND_DOMAIN; n >= Regexp::KIND_PREFIX; --n)
{
@ -555,12 +552,11 @@ Val const * RegexpMap< Val >::map(rtl::OUString const & rString,
typename List< Val >::const_iterator aEnd(rTheList.end());
for (typename List< Val >::const_iterator aIt(rTheList.begin()); aIt != aEnd;
++aIt)
if (aIt->m_aRegexp.matches(rString, pTranslation, nullptr))
if (aIt->m_aRegexp.matches(rString, nullptr, nullptr))
return &aIt->m_aValue;
}
if (m_pImpl->m_pDefault
&& m_pImpl->m_pDefault->m_aRegexp.matches(rString, pTranslation,
nullptr))
&& m_pImpl->m_pDefault->m_aRegexp.matches(rString, nullptr, nullptr))
return &m_pImpl->m_pDefault->m_aValue;
return 0;
}

View File

@ -247,7 +247,7 @@ protected:
virtual void LoseFocus() override;
bool SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bool bShift = false, bool bCtrl = false, bool bSelectPosChange = false );
void ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bErase = false);
void ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos);
void ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect);
void ImplCalcMetrics();
void ImplUpdateEntryMetrics( ImplEntryType& rEntry );

View File

@ -236,8 +236,8 @@ public:
void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const;
void mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const;
void mirror( ImplControlValue&, const OutputDevice* ) const;
basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev, bool bBack = false ) const;
basegfx::B2DPolygon mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const;
basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev ) const;
basegfx::B2DPolygon mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev ) const;
basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *pOutDev ) const;
// non virtual methods; these do possible coordinate mirroring and

View File

@ -1696,7 +1696,7 @@ void ImplListBoxWindow::SelectEntry( vcl::StringEntryIdentifier _entry )
}
}
void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bErase)
void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos)
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
@ -1721,8 +1721,6 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32
if (!IsEnabled())
rRenderContext.SetTextColor(rStyleSettings.GetDisableColor());
rRenderContext.SetTextFillColor();
if (bErase)
rRenderContext.Erase(aRect);
}
if (IsUserDrawEnabled())

View File

@ -1382,7 +1382,7 @@ GEOMETRY lcl_convert( const MapMode& _rSource, const MapMode& _rDest, OutputDevi
}
}
void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rBuffer, bool bNeg ) const
void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rBuffer ) const
{
Point aPoint( lcl_convert( m_pWriter->m_aGraphicsStack.front().m_aMapMode,
m_pWriter->m_aMapMode,
@ -1390,16 +1390,12 @@ void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rB
rPoint ) );
sal_Int32 nValue = aPoint.X();
if( bNeg )
nValue = -nValue;
appendFixedInt( nValue, rBuffer );
rBuffer.append( ' ' );
nValue = pointToPixel(getHeight()) - aPoint.Y();
if( bNeg )
nValue = -nValue;
appendFixedInt( nValue, rBuffer );
}

View File

@ -135,11 +135,9 @@ public:
// converts point from ref device coordinates to
// page coordinates and appends the point to the buffer
// if bNeg is true, the coordinates are inverted AFTER transformation
// to page (useful for transformation matrices
// if pOutPoint is set it will be updated to the emitted point
// (in PDF map mode, that is 10th of point)
void appendPoint( const Point& rPoint, OStringBuffer& rBuffer, bool bNeg = false ) const;
void appendPoint( const Point& rPoint, OStringBuffer& rBuffer ) const;
// appends a B2DPoint without further transformation
void appendPixelPoint( const basegfx::B2DPoint& rPoint, OStringBuffer& rBuffer ) const;
// appends a rectangle

View File

@ -1781,11 +1781,11 @@ sal_Int64 PrinterOptionsHelper::getIntValue( const OUString& i_rPropertyName, sa
return (aVal >>= nRet) ? nRet : i_nDefault;
}
OUString PrinterOptionsHelper::getStringValue( const OUString& i_rPropertyName, const OUString& i_rDefault ) const
OUString PrinterOptionsHelper::getStringValue( const OUString& i_rPropertyName ) const
{
OUString aRet;
css::uno::Any aVal( getValue( i_rPropertyName ) );
return (aVal >>= aRet) ? aRet : i_rDefault;
return (aVal >>= aRet) ? aRet : OUString();
}
bool PrinterOptionsHelper::processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp )

View File

@ -234,7 +234,7 @@ void SalGraphics::mirror( Rectangle& rRect, const OutputDevice *pOutDev, bool bB
rRect.Move( x - x_org, 0 );
}
basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *i_pOutDev, bool i_bBack ) const
basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *i_pOutDev ) const
{
long w;
if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
@ -252,10 +252,7 @@ basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const
OutputDevice *pOutDevRef = const_cast<OutputDevice*>(i_pOutDev);
// mirror this window back
double devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
if( i_bBack )
aRet.setX( i_rPoint.getX() - devX + pOutDevRef->GetOutOffXPixel() );
else
aRet.setX( devX + (i_rPoint.getX() - pOutDevRef->GetOutOffXPixel()) );
aRet.setX( devX + (i_rPoint.getX() - pOutDevRef->GetOutOffXPixel()) );
}
else
aRet.setX( w-1-i_rPoint.getX() );
@ -263,7 +260,7 @@ basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const
return aRet;
}
basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *i_pOutDev, bool i_bBack ) const
basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *i_pOutDev ) const
{
long w;
if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
@ -279,11 +276,11 @@ basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, con
sal_Int32 nPoints = i_rPoly.count();
for( sal_Int32 i = 0; i < nPoints; i++ )
{
aRet.append( mirror( i_rPoly.getB2DPoint( i ), i_pOutDev, i_bBack ) );
aRet.append( mirror( i_rPoly.getB2DPoint( i ), i_pOutDev ) );
if( i_rPoly.isPrevControlPointUsed( i ) )
aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev, i_bBack ) );
aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev ) );
if( i_rPoly.isNextControlPointUsed( i ) )
aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev, i_bBack ) );
aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev ) );
}
aRet.setClosed( i_rPoly.isClosed() );
aRet.flip();

View File

@ -105,21 +105,18 @@ namespace psp
OUString translateValue(
const OUString& i_rKey,
const OUString& i_rOption,
const OUString& i_rValue,
const css::lang::Locale& i_rLocale = css::lang::Locale()
const OUString& i_rValue
) const;
OUString translateOption( const OUString& i_rKey,
const OUString& i_rOption,
const css::lang::Locale& i_rLocale = css::lang::Locale() ) const
const OUString& i_rOption ) const
{
return translateValue( i_rKey, i_rOption, OUString(), i_rLocale );
return translateValue( i_rKey, i_rOption, OUString() );
}
OUString translateKey( const OUString& i_rKey,
const css::lang::Locale& i_rLocale = css::lang::Locale() ) const
OUString translateKey( const OUString& i_rKey ) const
{
return translateValue( i_rKey, OUString(), OUString(), i_rLocale );
return translateValue( i_rKey, OUString(), OUString() );
}
};
@ -192,8 +189,7 @@ namespace psp
OUString PPDTranslator::translateValue(
const OUString& i_rKey,
const OUString& i_rOption,
const OUString& i_rValue,
const css::lang::Locale& i_rLocale
const OUString& i_rValue
) const
{
OUString aResult;
@ -218,7 +214,7 @@ namespace psp
{
const translation_map& rMap( it->second );
css::lang::Locale aLoc( normalizeInputLocale( i_rLocale, true ) );
css::lang::Locale aLoc( normalizeInputLocale( css::lang::Locale(), true ) );
/* FIXME-BCP47: use LanguageTag::getFallbackStrings()? */
for( int nTry = 0; nTry < 4; nTry++ )
{