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

loplugin:constantparam in svtools..unotools

Change-Id: I6e72fbe44dcb65ee5162448e9a72e6437d56b044
Reviewed-on: https://gerrit.libreoffice.org/50948Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 24d0704f
......@@ -52,10 +52,10 @@ private:
void ImpReadCERNLine( const OString& rLine );
static Point ImpReadCERNCoords( const char** ppStr );
static long ImpReadCERNRadius( const char** ppStr );
static OUString ImpReadCERNURL( const char** ppStr, const OUString& rBaseURL );
static OUString ImpReadCERNURL( const char** ppStr );
void ImpReadNCSALine( const OString& rLine );
static OUString ImpReadNCSAURL( const char** ppStr, const OUString& rBaseURL );
static OUString ImpReadNCSAURL( const char** ppStr );
static Point ImpReadNCSACoords( const char** ppStr );
static sal_uLong ImpDetectFormat( SvStream& rIStm );
......
......@@ -36,12 +36,8 @@ public:
static LanguageType GetLanguageTypeAtIndex( sal_uInt32 nIndex );
/** Add a language tag to the table.
@param rString
UI visible description string. If empty, the rLanguageTag Bcp47
string placed in curly brackets is used instead, e.g. "{en-DK}"
*/
static sal_uInt32 AddLanguageTag( const LanguageTag& rLanguageTag, const OUString& rString );
static sal_uInt32 AddLanguageTag( const LanguageTag& rLanguageTag );
};
// Add LRE or RLE embedding characters to the string based on the
......
......@@ -92,7 +92,6 @@ public:
const css::uno::Reference< css::beans::XPropertySet >& _rxField,
const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats,
sal_uInt16 _nControlObjectID,
const OUString& _rFieldPostfix,
SdrInventor _nInventor,
sal_uInt16 _nLabelObjectID,
SdrPage* _pLabelPage,
......
......@@ -118,8 +118,7 @@ public:
static bool InsertURL( sal_uInt32 nThemeId, const OUString& rURL );
static bool GetGraphicObj( const OUString& rThemeName, sal_uInt32 nPos,
Graphic* pGraphic, BitmapEx* pThumb,
bool bProgress = false );
Graphic* pGraphic );
static bool GetGraphicObj( sal_uInt32 nThemeId, sal_uInt32 nPos,
Graphic* pGraphic );
......
......@@ -187,8 +187,8 @@ public:
GalleryHint( GalleryHintType nType, const OUString& rThemeName, void* nData1 = nullptr ) :
mnType( nType ), maThemeName( rThemeName ), mnData1( nData1 ) {}
GalleryHint( GalleryHintType nType, const OUString& rThemeName, const OUString& rStringData, void* nData1 = nullptr ) :
mnType( nType ), maThemeName( rThemeName ), maStringData( rStringData ), mnData1( nData1 ) {}
GalleryHint( GalleryHintType nType, const OUString& rThemeName, const OUString& rStringData ) :
mnType( nType ), maThemeName( rThemeName ), maStringData( rStringData ), mnData1( nullptr ) {}
GalleryHintType GetType() const { return mnType; }
const OUString& GetThemeName() const { return maThemeName; }
......
......@@ -1131,7 +1131,7 @@ private:
bool bKeepVisibleEscapes);
static inline OUString encodeText(
OUString const & rTheText, bool bOctets, Part ePart,
OUString const & rTheText, Part ePart,
EncodeMechanism eMechanism, rtl_TextEncoding eCharset,
bool bKeepVisibleEscapes);
......@@ -1151,13 +1151,13 @@ private:
// static
inline OUString INetURLObject::encodeText(OUString const & rTheText,
bool bOctets, Part ePart,
Part ePart,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset,
bool bKeepVisibleEscapes)
{
return encodeText(rTheText.getStr(),
rTheText.getStr() + rTheText.getLength(), bOctets, ePart,
rTheText.getStr() + rTheText.getLength(), /*bOctets*/false, ePart,
eMechanism, eCharset, bKeepVisibleEscapes);
}
......@@ -1324,7 +1324,7 @@ inline OUString INetURLObject::encode(OUString const & rText, Part ePart,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
return encodeText(rText, false, ePart, eMechanism, eCharset, false);
return encodeText(rText, ePart, eMechanism, eCharset, false);
}
// static
......
......@@ -30,11 +30,10 @@ enum class FontToSubsFontFlags
{
IMPORT = 0x01,
EXPORT = 0x02,
ONLYOLDSOSYMBOLFONTS = 0x04,
};
namespace o3tl
{
template<> struct typed_flags<FontToSubsFontFlags> : is_typed_flags<FontToSubsFontFlags, 0x07> {};
template<> struct typed_flags<FontToSubsFontFlags> : is_typed_flags<FontToSubsFontFlags, 0x03> {};
}
typedef void* FontToSubsFontConverter;
......
......@@ -3135,7 +3135,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
SdrUnoObj* pControl( nullptr );
FmFormView::createControlLabelPair( getDesignView()
,nLeftMargin,0
,nullptr,nullptr,_nObjectId,OUString(),SdrInventor::ReportDesign,OBJ_DLG_FIXEDTEXT,
,nullptr,nullptr,_nObjectId,SdrInventor::ReportDesign,OBJ_DLG_FIXEDTEXT,
nullptr,pSectionWindow->getReportSection().getPage(),m_aReportModel.get(),
pLabel,pControl);
delete pLabel;
......@@ -3430,7 +3430,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
// find this in svx
FmFormView::createControlLabelPair( getDesignView()
,nLeftMargin,0
,xField,xNumberFormats,nOBJID,OUString(),SdrInventor::ReportDesign,OBJ_DLG_FIXEDTEXT,
,xField,xNumberFormats,nOBJID,SdrInventor::ReportDesign,OBJ_DLG_FIXEDTEXT,
pSectionWindow[1]->getReportSection().getPage(),pSectionWindow[0]->getReportSection().getPage(),m_aReportModel.get(),
pControl[0],pControl[1]);
if ( pControl[0] && pControl[1] )
......
......@@ -270,7 +270,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine )
{
const Point aTopLeft( ImpReadCERNCoords( &pStr ) );
const Point aBottomRight( ImpReadCERNCoords( &pStr ) );
const OUString aURL( ImpReadCERNURL( &pStr, "" ) );
const OUString aURL( ImpReadCERNURL( &pStr ) );
const tools::Rectangle aRect( aTopLeft, aBottomRight );
maList.emplace_back( new IMapRectangleObject( aRect, aURL, OUString(), OUString(), OUString(), OUString() ) );
......@@ -279,7 +279,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine )
{
const Point aCenter( ImpReadCERNCoords( &pStr ) );
const long nRadius = ImpReadCERNRadius( &pStr );
const OUString aURL( ImpReadCERNURL( &pStr, "" ) );
const OUString aURL( ImpReadCERNURL( &pStr ) );
maList.emplace_back( new IMapCircleObject( aCenter, nRadius, aURL, OUString(), OUString(), OUString(), OUString() ) );
}
......@@ -292,7 +292,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine )
for ( sal_uInt16 i = 0; i < nCount; i++ )
aPoly[ i ] = ImpReadCERNCoords( &pStr );
aURL = ImpReadCERNURL( &pStr, "" );
aURL = ImpReadCERNURL( &pStr );
maList.emplace_back( new IMapPolygonObject( aPoly, aURL, OUString(), OUString(), OUString(), OUString() ) );
}
......@@ -358,7 +358,7 @@ long ImageMap::ImpReadCERNRadius( const char** ppStr )
return aStr.makeStringAndClear().toInt32();
}
OUString ImageMap::ImpReadCERNURL( const char** ppStr, const OUString& rBaseURL )
OUString ImageMap::ImpReadCERNURL( const char** ppStr )
{
OUString aStr(OUString::createFromAscii(*ppStr));
......@@ -367,7 +367,7 @@ OUString ImageMap::ImpReadCERNURL( const char** ppStr, const OUString& rBaseURL
aStr = comphelper::string::stripEnd(aStr, ' ');
aStr = comphelper::string::stripEnd(aStr, '\t');
return INetURLObject::GetAbsURL( rBaseURL, aStr );
return INetURLObject::GetAbsURL( "", aStr );
}
sal_uLong ImageMap::ImpReadNCSA( SvStream& rIStm )
......@@ -406,7 +406,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine )
if ( aToken == "rect" )
{
const OUString aURL( ImpReadNCSAURL( &pStr, "" ) );
const OUString aURL( ImpReadNCSAURL( &pStr ) );
const Point aTopLeft( ImpReadNCSACoords( &pStr ) );
const Point aBottomRight( ImpReadNCSACoords( &pStr ) );
const tools::Rectangle aRect( aTopLeft, aBottomRight );
......@@ -415,7 +415,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine )
}
else if ( aToken == "circle" )
{
const OUString aURL( ImpReadNCSAURL( &pStr, "" ) );
const OUString aURL( ImpReadNCSAURL( &pStr ) );
const Point aCenter( ImpReadNCSACoords( &pStr ) );
const Point aDX( aCenter - ImpReadNCSACoords( &pStr ) );
long nRadius = static_cast<long>(sqrt( static_cast<double>(aDX.X()) * aDX.X() +
......@@ -427,7 +427,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine )
{
const sal_uInt16 nCount = comphelper::string::getTokenCount(aStr,
',') - 1;
const OUString aURL( ImpReadNCSAURL( &pStr, "" ) );
const OUString aURL( ImpReadNCSAURL( &pStr ) );
tools::Polygon aPoly( nCount );
for ( sal_uInt16 i = 0; i < nCount; i++ )
......@@ -437,7 +437,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine )
}
}
OUString ImageMap::ImpReadNCSAURL( const char** ppStr, const OUString& rBaseURL )
OUString ImageMap::ImpReadNCSAURL( const char** ppStr )
{
OUStringBuffer aStr;
char cChar = *(*ppStr)++;
......@@ -454,7 +454,7 @@ OUString ImageMap::ImpReadNCSAURL( const char** ppStr, const OUString& rBaseURL
}
}
return INetURLObject::GetAbsURL( rBaseURL, aStr.makeStringAndClear() );
return INetURLObject::GetAbsURL( "", aStr.makeStringAndClear() );
}
Point ImageMap::ImpReadNCSACoords( const char** ppStr )
......
......@@ -281,9 +281,9 @@ LanguageType SvtLanguageTable::GetLanguageTypeAtIndex( sal_uInt32 nIndex )
}
sal_uInt32 SvtLanguageTable::AddLanguageTag( const LanguageTag& rLanguageTag, const OUString& rString )
sal_uInt32 SvtLanguageTable::AddLanguageTag( const LanguageTag& rLanguageTag )
{
return theLanguageTable::get().AddItem( (rString.isEmpty() ? lcl_getDescription(rLanguageTag.getBcp47()) : rString),
return theLanguageTable::get().AddItem( lcl_getDescription(rLanguageTag.getBcp47()),
rLanguageTag.getLanguageType());
}
......
......@@ -58,7 +58,7 @@ SvStream& Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen )
// U+1D44E being encoded as UTF-16 surrogate pair "\u-10187?\u-9138?", so
// sal_Unicode actually works fine here.
SvStream& Out_Char(SvStream& rStream, sal_Unicode c,
int *pUCMode, rtl_TextEncoding eDestEnc, bool bWriteHelpFile)
int *pUCMode, rtl_TextEncoding eDestEnc)
{
const sal_Char* pStr = nullptr;
switch (c)
......@@ -84,37 +84,34 @@ SvStream& Out_Char(SvStream& rStream, sal_Unicode c,
pStr = OOO_STRING_SVTOOLS_RTF_TAB;
break;
default:
if(!bWriteHelpFile)
switch(c)
{
switch(c)
{
case 149:
pStr = OOO_STRING_SVTOOLS_RTF_BULLET;
break;
case 150:
pStr = OOO_STRING_SVTOOLS_RTF_ENDASH;
break;
case 151:
pStr = OOO_STRING_SVTOOLS_RTF_EMDASH;
break;
case 145:
pStr = OOO_STRING_SVTOOLS_RTF_LQUOTE;
break;
case 146:
pStr = OOO_STRING_SVTOOLS_RTF_RQUOTE;
break;
case 147:
pStr = OOO_STRING_SVTOOLS_RTF_LDBLQUOTE;
break;
case 148:
pStr = OOO_STRING_SVTOOLS_RTF_RDBLQUOTE;
break;
}
if (pStr)
case 149:
pStr = OOO_STRING_SVTOOLS_RTF_BULLET;
break;
case 150:
pStr = OOO_STRING_SVTOOLS_RTF_ENDASH;
break;
case 151:
pStr = OOO_STRING_SVTOOLS_RTF_EMDASH;
break;
case 145:
pStr = OOO_STRING_SVTOOLS_RTF_LQUOTE;
break;
case 146:
pStr = OOO_STRING_SVTOOLS_RTF_RQUOTE;
break;
case 147:
pStr = OOO_STRING_SVTOOLS_RTF_LDBLQUOTE;
break;
case 148:
pStr = OOO_STRING_SVTOOLS_RTF_RDBLQUOTE;
break;
}
if (pStr)
break;
switch (c)
{
case '\\':
......@@ -186,7 +183,7 @@ SvStream& RTFOutFuncs::Out_String( SvStream& rStream, const OUString& rStr,
{
int nUCMode = 1;
for (sal_Int32 n = 0; n < rStr.getLength(); ++n)
Out_Char(rStream, rStr[n], &nUCMode, eDestEnc, false/*bWriteHelpFile*/);
Out_Char(rStream, rStr[n], &nUCMode, eDestEnc);
if (nUCMode != 1)
rStream.WriteCharPtr( "\\uc1" ).WriteCharPtr( " " ); // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored.;
return rStream;
......
......@@ -46,10 +46,6 @@ namespace sdr
// Range for buffering (in pixel to be independent from mapMode)
basegfx::B2IRange maBufferRememberedRangePixel;
// Flag to decide if PreRendering shall be used for overlay refreshes.
// Default is false.
bool mbRefreshWithPreRendering : 1;
// link for timer
DECL_LINK(ImpBufferTimerHandler, Timer*, void);
......@@ -59,9 +55,7 @@ namespace sdr
void ImpRestoreBackground(const vcl::Region& rRegionPixel) const;
void ImpSaveBackground(const vcl::Region& rRegion, OutputDevice* pPreRenderDevice);
OverlayManagerBuffered(
OutputDevice& rOutputDevice,
bool bRefreshWithPreRendering);
OverlayManagerBuffered(OutputDevice& rOutputDevice);
virtual ~OverlayManagerBuffered() override;
public:
......
......@@ -828,7 +828,7 @@ sal_Int32 SvxLanguageComboBox::SaveEditedAsEntry()
{
// Add to both, SvtLanguageTable and SvxLanguageComboBox.
/* TODO: a descriptive user comment would be a nice to have here. */
SvtLanguageTable::AddLanguageTag( aLanguageTag, OUString());
SvtLanguageTable::AddLanguageTag( aLanguageTag );
}
nPos = InsertLanguage( nLang);
......
......@@ -566,13 +566,13 @@ FmFormObj* FmFormView::getMarkedGrid() const
void FmFormView::createControlLabelPair( OutputDevice const * _pOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
const Reference< XPropertySet >& _rxField, const Reference< XNumberFormats >& _rxNumberFormats,
sal_uInt16 _nControlObjectID, const OUString& _rFieldPostfix, SdrInventor _nInventor, sal_uInt16 _nLabelObjectID,
sal_uInt16 _nControlObjectID, SdrInventor _nInventor, sal_uInt16 _nLabelObjectID,
SdrPage* _pLabelPage, SdrPage* _pControlPage, SdrModel* _pModel, SdrUnoObj*& _rpLabel, SdrUnoObj*& _rpControl )
{
FmXFormView::createControlLabelPair(
*_pOutDev, _nXOffsetMM, _nYOffsetMM,
_rxField, _rxNumberFormats,
_nControlObjectID, _rFieldPostfix, _nInventor, _nLabelObjectID,
_nControlObjectID, "", _nInventor, _nLabelObjectID,
_pLabelPage, _pControlPage, _pModel,
_rpLabel, _rpControl
);
......
......@@ -136,8 +136,7 @@ bool GalleryExplorer::InsertURL( sal_uInt32 nThemeId, const OUString& rURL )
}
bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uInt32 nPos,
Graphic* pGraphic, BitmapEx* pThumb,
bool bProgress )
Graphic* pGraphic )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
bool bRet = false;
......@@ -150,10 +149,7 @@ bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uInt32 nPos
if( pTheme )
{
if( pGraphic )
bRet = bRet || pTheme->GetGraphic( nPos, *pGraphic, bProgress );
if( pThumb )
bRet = bRet || pTheme->GetThumb( nPos, *pThumb );
bRet = bRet || pTheme->GetGraphic( nPos, *pGraphic, /*bProgress*/false );
pGal->ReleaseTheme( pTheme, aListener );
}
......@@ -166,7 +162,7 @@ bool GalleryExplorer::GetGraphicObj( sal_uInt32 nThemeId, sal_uInt32 nPos,
Graphic* pGraphic )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
return pGal && GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, nullptr/*pThumb*/, false/*bProgress*/ );
return pGal && GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic );
}
sal_uInt32 GalleryExplorer::GetSdrObjCount( const OUString& rThemeName )
......
......@@ -193,7 +193,7 @@ protected:
private:
/// @throws css::uno::RuntimeException
SVX_DLLPRIVATE Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject );
SVX_DLLPRIVATE Cell( SdrTableObj& rTableObj );
SVX_DLLPRIVATE virtual ~Cell() throw() override;
Cell(Cell const &) = delete;
......
......@@ -238,7 +238,7 @@ namespace sdr
}
}
if(mbRefreshWithPreRendering)
// refresh with prerendering
{
// #i73602# ensure valid and sized mpOutputBufferDevice
const Size aDestinationSizePixel(mpBufferDevice->GetOutputSizePixel());
......@@ -325,15 +325,6 @@ namespace sdr
getOutputDevice().EnableMapMode(bMapModeWasEnabledDest);
}
}
else
{
// Restore all rectangles for remembered region from buffer
ImpRestoreBackground();
// paint overlay content for remembered region, use
// method from base class directly
OverlayManager::ImpDrawMembers(aBufferRememberedRangeLogic, getOutputDevice());
}
// VCL hack for transparent child windows
// Problem is e.g. a radiobutton form control in life mode. The used window
......@@ -374,13 +365,11 @@ namespace sdr
}
OverlayManagerBuffered::OverlayManagerBuffered(
OutputDevice& rOutputDevice,
bool bRefreshWithPreRendering)
OutputDevice& rOutputDevice)
: OverlayManager(rOutputDevice),
mpBufferDevice(VclPtr<VirtualDevice>::Create()),
mpOutputBufferDevice(VclPtr<VirtualDevice>::Create()),
maBufferIdle("sdr overlay OverlayManagerBuffered Idle"),
mbRefreshWithPreRendering(bRefreshWithPreRendering)
maBufferIdle("sdr overlay OverlayManagerBuffered Idle")
{
// Init timer
maBufferIdle.SetPriority( TaskPriority::POST_PAINT );
......@@ -391,8 +380,7 @@ namespace sdr
rtl::Reference<OverlayManager> OverlayManagerBuffered::create(
OutputDevice& rOutputDevice)
{
return rtl::Reference<OverlayManager>(new OverlayManagerBuffered(rOutputDevice,
true/*bRefreshWithPreRendering*/));
return rtl::Reference<OverlayManager>(new OverlayManagerBuffered(rOutputDevice));
}
OverlayManagerBuffered::~OverlayManagerBuffered()
......
......@@ -382,7 +382,7 @@ namespace sdr { namespace table {
rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj )
{
rtl::Reference< Cell > xCell( new Cell( rTableObj, nullptr ) );
rtl::Reference< Cell > xCell( new Cell( rTableObj ) );
if( xCell->mxTable.is() )
{
Reference< XEventListener > xListener( xCell.get() );
......@@ -392,8 +392,8 @@ rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj )
}
Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject )
: SdrText( rTableObj, pOutlinerParaObject )
Cell::Cell( SdrTableObj& rTableObj )
: SdrText( rTableObj, /*pOutlinerParaObject*/nullptr )
, SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
, mpPropSet( ImplGetSvxCellPropertySet() )
, mpProperties( new sdr::properties::CellProperties( rTableObj, this ) )
......
......@@ -33,7 +33,7 @@ public:
public:
ImplPolygon() : mnPoints(0) {}
ImplPolygon( sal_uInt16 nInitSize, bool bFlags = false );
ImplPolygon( sal_uInt16 nInitSize );
ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const PolyFlags* pInitFlags );
ImplPolygon( const ImplPolygon& rImplPoly );
ImplPolygon( const tools::Rectangle& rRect );
......
......@@ -2054,7 +2054,7 @@ bool INetURLObject::convertIntToExt(OUString const & rTheIntURIRef,
DecodeMechanism eDecodeMechanism,
rtl_TextEncoding eCharset)
{
OUString aSynExtURIRef(encodeText(rTheIntURIRef, false, PART_VISIBLE,
OUString aSynExtURIRef(encodeText(rTheIntURIRef, PART_VISIBLE,
EncodeMechanism::NotCanonical, eCharset, true));
sal_Unicode const * pBegin = aSynExtURIRef.getStr();
sal_Unicode const * pEnd = pBegin + aSynExtURIRef.getLength();
......@@ -2077,7 +2077,7 @@ bool INetURLObject::convertExtToInt(OUString const & rTheExtURIRef,
DecodeMechanism eDecodeMechanism,
rtl_TextEncoding eCharset)
{
OUString aSynIntURIRef(encodeText(rTheExtURIRef, false, PART_VISIBLE,
OUString aSynIntURIRef(encodeText(rTheExtURIRef, PART_VISIBLE,
EncodeMechanism::NotCanonical, eCharset, true));
sal_Unicode const * pBegin = aSynIntURIRef.getStr();
sal_Unicode const * pEnd = pBegin + aSynIntURIRef.getLength();
......@@ -2257,7 +2257,7 @@ bool INetURLObject::setUser(OUString const & rTheUser,
return false;
}
OUString aNewUser(encodeText(rTheUser, false/*bOctets*/, PART_USER_PASSWORD,
OUString aNewUser(encodeText(rTheUser, PART_USER_PASSWORD,
EncodeMechanism::WasEncoded, eCharset, false));
sal_Int32 nDelta;
if (m_aUser.isPresent())
......@@ -2312,7 +2312,7 @@ bool INetURLObject::setPassword(OUString const & rThePassword,
{
if (!getSchemeInfo().m_bPassword)
return false;
OUString aNewAuth(encodeText(rThePassword, false/*bOctets*/, PART_USER_PASSWORD,
OUString aNewAuth(encodeText(rThePassword, PART_USER_PASSWORD,
EncodeMechanism::WasEncoded, eCharset, false));
sal_Int32 nDelta;
if (m_aAuth.isPresent())
......@@ -3296,7 +3296,7 @@ bool INetURLObject::insertName(OUString const & rTheName,
OUStringBuffer aNewPath;
aNewPath.append(pPathBegin, pPrefixEnd - pPathBegin);
aNewPath.append('/');
aNewPath.append(encodeText(rTheName, false/*bOctets*/, PART_PCHAR,
aNewPath.append(encodeText(rTheName, PART_PCHAR,
eMechanism, eCharset, true));
if (bInsertSlash) {
aNewPath.append('/');
......@@ -3326,7 +3326,7 @@ bool INetURLObject::setQuery(OUString const & rTheQuery,
{
if (!getSchemeInfo().m_bQuery)
return false;
OUString aNewQuery(encodeText(rTheQuery, false/*bOctets*/, PART_URIC,
OUString aNewQuery(encodeText(rTheQuery, PART_URIC,
eMechanism, eCharset, true));
sal_Int32 nDelta;
if (m_aQuery.isPresent())
......@@ -3359,7 +3359,7 @@ bool INetURLObject::setFragment(OUString const & rTheFragment,
{
if (HasError())
return false;
OUString aNewFragment(encodeText(rTheFragment, false/*bOctets*/, PART_URIC,
OUString aNewFragment(encodeText(rTheFragment, PART_URIC,
eMechanism, eCharset, true));
if (m_aFragment.isPresent())
m_aFragment.set(m_aAbsURIRef, aNewFragment);
......@@ -3733,7 +3733,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
if (!rTheUser.isEmpty())
{
m_aUser.set(m_aAbsURIRef,
encodeText(rTheUser, false, PART_USER_PASSWORD,
encodeText(rTheUser, PART_USER_PASSWORD,
EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, false),
m_aAbsURIRef.getLength());
bUserInfo = true;
......@@ -3750,7 +3750,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
{
m_aAbsURIRef.append(':');
m_aAuth.set(m_aAbsURIRef,
encodeText(rThePassword, false, PART_USER_PASSWORD,
encodeText(rThePassword, PART_USER_PASSWORD,
EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, false),
m_aAbsURIRef.getLength());
bUserInfo = true;
......@@ -4047,7 +4047,7 @@ bool INetURLObject::setName(OUString const & rTheName)
OUStringBuffer aNewPath;
aNewPath.append(pPathBegin, pSegBegin - pPathBegin);
aNewPath.append(encodeText(rTheName, false, PART_PCHAR,
aNewPath.append(encodeText(rTheName, PART_PCHAR,
EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, true));
aNewPath.append(p, pPathEnd - p);
......@@ -4126,7 +4126,7 @@ bool INetURLObject::setBase(OUString const & rTheBase, sal_Int32 nIndex,
OUStringBuffer aNewPath;
aNewPath.append(pPathBegin, pSegBegin - pPathBegin);
aNewPath.append(encodeText(rTheBase, false, PART_PCHAR,
aNewPath.append(encodeText(rTheBase, PART_PCHAR,
eMechanism, eCharset, true));
aNewPath.append(pExtension, pPathEnd - pExtension);
......@@ -4189,7 +4189,7 @@ bool INetURLObject::setExtension(OUString const & rTheExtension,
OUStringBuffer aNewPath;
aNewPath.append(pPathBegin, pExtension - pPathBegin);
aNewPath.append('.');
aNewPath.append(encodeText(rTheExtension, false, PART_PCHAR,
aNewPath.append(encodeText(rTheExtension, PART_PCHAR,
EncodeMechanism::WasEncoded, eCharset, true));
aNewPath.append(p, pPathEnd - p);
......
......@@ -61,9 +61,9 @@ inline double ImplGetParameter( const Point& rCenter, const Point& rPt, double f
return atan2(fWR*sin(fAngle), fHR*cos(fAngle));
}
ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, bool bFlags )
ImplPolygon::ImplPolygon( sal_uInt16 nInitSize )
{
ImplInitSize(nInitSize, bFlags);
ImplInitSize(nInitSize, false);
}
ImplPolygon::ImplPolygon( const ImplPolygon& rImpPoly )
......
......@@ -1306,7 +1306,7 @@ struct RecodeTable { const char* pOrgName; ConvertChar aCvt;};
static const RecodeTable aStarSymbolRecodeTable[] =
{
// the first two entries must be StarMath and StarBats; do not reorder!
// reason: fgrep for FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS
// reason: see CreateFontToSubsFontConverter method
{"starbats", {aStarBatsTab, "StarSymbol", nullptr}},
{"starmath", {aStarMathTab, "StarSymbol", nullptr}},
......@@ -1388,9 +1388,7 @@ FontToSubsFontConverter CreateFontToSubsFontConverter( const OUString& rOrgName,
if ( nFlags & FontToSubsFontFlags::IMPORT )
{
int nEntries = SAL_N_ELEMENTS(aStarSymbolRecodeTable);
if ( nFlags & FontToSubsFontFlags::ONLYOLDSOSYMBOLFONTS ) // only StarMath+StarBats
nEntries = 2;
int nEntries = 2; // only StarMath+StarBats
for( int i = 0; i < nEntries; ++i )
{
const RecodeTable& r = aStarSymbolRecodeTable[i];
......@@ -1403,7 +1401,7 @@ FontToSubsFontConverter CreateFontToSubsFontConverter( const OUString& rOrgName,
}
else
{
// TODO: FontToSubsFontFlags::ONLYOLDSOSYMBOLFONTS
// TODO: only StarMath+StarBats
if( aName == "starsymbol" )
pCvt = &aImplStarSymbolCvt;
else if( aName == "opensymbol" )
......
......@@ -1841,7 +1841,7 @@ sal_Unicode SvXMLImport::ConvStarBatsCharToStarSymbol( sal_Unicode c )
if( !mpImpl->hBatsFontConv )
{
mpImpl->hBatsFontConv = CreateFontToSubsFontConverter( "StarBats",
FontToSubsFontFlags::IMPORT|FontToSubsFontFlags::ONLYOLDSOSYMBOLFONTS );
FontToSubsFontFlags::IMPORT );
SAL_WARN_IF( !mpImpl->hBatsFontConv, "xmloff.core", "Got no symbol font converter" );
}
if( mpImpl->hBatsFontConv )
......@@ -1858,7 +1858,7 @@ sal_Unicode SvXMLImport::ConvStarMathCharToStarSymbol( sal_Unicode c )
if( !mpImpl->hMathFontConv )
{
mpImpl->hMathFontConv = CreateFontToSubsFontConverter( "StarMath",
FontToSubsFontFlags::IMPORT|FontToSubsFontFlags::ONLYOLDSOSYMBOLFONTS );
FontToSubsFontFlags::IMPORT );
SAL_WARN_IF( !mpImpl->hMathFontConv, "xmloff.core", "Got no symbol font converter" );
}
if( mpImpl->hMathFontConv )
......
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