diff options
26 files changed, 155 insertions, 173 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 2fcb303561f4..a8ee608dad0f 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1229,7 +1229,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) OUString aTmpPath = SvtPathOptions().GetTempPath(); INetURLObject aInetObj( aTmpPath ); - aInetObj.insertName( aLibName, true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aLibName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aSourcePath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( xSFA->exists( aSourcePath ) ) xSFA->kill( aSourcePath ); @@ -1261,7 +1261,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) INetURLObject aMetaInfInetObj( aTmpPath ); aMetaInfInetObj.insertName( "META-INF", - true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aMetaInfFolder = aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( xSFA->exists( aMetaInfFolder ) ) xSFA->kill( aMetaInfFolder ); @@ -1288,7 +1288,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) &manifest[ 0 ], manifest.size() ) ); aMetaInfInetObj.insertName( "manifest.xml", - true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); // write buffered pipe data to content: ::ucbhelper::Content manifestContent( aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ), xCmdEnv, comphelper::getProcessComponentContext() ); diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index c0cc7ed3dfc8..5945253be971 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -588,14 +588,14 @@ static void checkAndCopyFileImpl( const INetURLObject& rSourceFolderInetObj, { INetURLObject aTargetFolderInetObj( rTargetFolderInetObj ); aTargetFolderInetObj.insertName( rCheckFileName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); aTargetFolderInetObj.setExtension( rCheckExtension ); OUString aTargetFile = aTargetFolderInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->exists( aTargetFile ) ) { INetURLObject aSourceFolderInetObj( rSourceFolderInetObj ); aSourceFolderInetObj.insertName( rCheckFileName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); aSourceFolderInetObj.setExtension( rCheckExtension ); OUString aSourceFile = aSourceFolderInetObj.GetMainURL( INetURLObject::NO_DECODE ); xSFI->copy( aSourceFile, aTargetFile ); @@ -792,7 +792,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, { pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(1, (sal_Unicode)';') )); } - pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); pLibInfoInetObj->setExtension( "xlc" ); aFileName = pLibInfoInetObj->GetMainURL( INetURLObject::NO_DECODE ); } @@ -811,7 +811,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, if( !xInput.is() && nPass == 0 ) { INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aLibInfoInetObj.setExtension( "xli" ); aFileName = aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -873,7 +873,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, INetURLObject aInetObj( aLibraryPath ); aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( mxSFI->isFolder( aLibDirPath ) ) { @@ -885,7 +885,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, // Check "share" path INetURLObject aShareInetObj( maLibraryPath.getToken(0, (sal_Unicode)';') ); aShareInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aShareLibDirPath = aShareInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( mxSFI->isFolder( aShareLibDirPath ) ) { @@ -1048,10 +1048,10 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, // Check if Standard folder exists and is complete INetURLObject aUserBasicStandardInetObj( aUserBasicInetObj ); aUserBasicStandardInetObj.insertName( aStandardStr, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); INetURLObject aPrevUserBasicStandardInetObj( aPrevUserBasicInetObj ); aPrevUserBasicStandardInetObj.insertName( aStandardStr, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aPrevStandardFolder = aPrevUserBasicStandardInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( mxSFI->isFolder( aPrevStandardFolder ) ) { @@ -1123,7 +1123,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, INetURLObject aPrevUserBasicLibInfoInetObj( aUserBasicInetObj ); aPrevUserBasicLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); aPrevUserBasicLibInfoInetObj.setExtension( "xlc"); OUString aLibInfoFileName = aPrevUserBasicLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ); Sequence<Any> aInitSeq( 1 ); @@ -1329,7 +1329,7 @@ void SfxLibraryContainer::checkStorageURL( const OUString& aSourceURL, { // URL to library folder aStorageURL = aExpandedSourceURL; - aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aInetObj.setExtension( "xlb" ); aLibInfoFileURL = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); } @@ -1382,7 +1382,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder( SfxLibrary* pLib, const OU if( aLibDirPath.isEmpty() ) { INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); checkStorageURL( aInetObj.GetMainURL( INetURLObject::NO_DECODE ), pLib->maLibInfoFileURL, pLib->maStorageURL, pLib->maUnexpandedStorageURL ); aLibDirPath = pLib->maStorageURL; @@ -1492,7 +1492,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, if( bExport ) { INetURLObject aInetObj( aTargetURL ); - aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->isFolder( aLibDirPath ) ) @@ -1513,7 +1513,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -1626,13 +1626,13 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, if( bExport ) { INetURLObject aInetObj( aTargetURL ); - aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->isFolder( aLibDirPath ) ) { xSFI->createFolder( aLibDirPath ); } - aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aInetObj.setExtension( "xlb" ); aLibInfoPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); } @@ -2139,7 +2139,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto { // Create Output stream INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aLibInfoInetObj.setExtension( "xlc" ); OUString aLibInfoPath( aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -2348,7 +2348,7 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name ) // Delete folder if empty INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); aInetObj.insertName( Name, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); try @@ -2497,7 +2497,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name ) OUString aLibDirPath = pImplLib->maStorageURL; INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( maLibElementFileExtension ); aFile = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2617,7 +2617,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU INetURLObject aDestInetObj( maLibraryPath.getToken(1, (sal_Unicode)';')); aDestInetObj.insertName( NewName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aDestDirPath = aDestInetObj.GetMainURL( INetURLObject::NO_DECODE ); // Store new URL @@ -2655,13 +2655,13 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); INetURLObject aElementDestInetObj( aDestDirPath ); aElementDestInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementDestInetObj.setExtension( maLibElementFileExtension ); OUString aDestElementPath( aElementDestInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -3200,7 +3200,7 @@ void SfxLibrary::impl_removeWithoutChecks( const OUString& _rElementName ) { INetURLObject aElementInetObj( maStorageURL ); aElementInetObj.insertName( _rElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aFile = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 09388fcf0e87..87a106ead62d 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -523,7 +523,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); if( bKillUncryptedFiles ) { @@ -720,7 +720,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons if( bExport ) { INetURLObject aInetObj( aTargetURL ); - aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, true, + aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -740,7 +740,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( "pba" ); OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1038,7 +1038,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( "pba" ); OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx index 632565f7e91a..4b6ec600bad0 100644 --- a/filter/source/textfilterdetect/filterdetect.cxx +++ b/filter/source/textfilterdetect/filterdetect.cxx @@ -154,7 +154,7 @@ OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::PropertyVal else pInStream.reset(utl::UcbStreamHelper::CreateStream(xInStream)); std::unique_ptr<SvMemoryStream> pDecompressedStream(new SvMemoryStream()); - if (aCodecGZ.AttemptDecompression(*pInStream, *pDecompressedStream, false, true)) + if (aCodecGZ.AttemptDecompression(*pInStream, *pDecompressedStream)) { uno::Reference<io::XStream> xStreamDecompressed(new utl::OStreamWrapper(*pDecompressedStream)); pDecompressedStream.release(); diff --git a/include/tools/b3dtrans.hxx b/include/tools/b3dtrans.hxx index 2ec9071d239a..bf0f96121d5a 100644 --- a/include/tools/b3dtrans.hxx +++ b/include/tools/b3dtrans.hxx @@ -128,8 +128,7 @@ public: // Parameters of ViewportTransformation void SetDeviceRectangle(double fL=-1.0, double fR=1.0, - double fB=-1.0, double fT=1.0, - bool bBroadCastChange=true); + double fB=-1.0, double fT=1.0); double GetDeviceRectangleWidth() const { return mfRightBound - mfLeftBound; } void SetPerspective(bool bNew); @@ -214,8 +213,7 @@ public: B3dCamera( const basegfx::B3DPoint& rPos = basegfx::B3DPoint(0.0, 0.0, 1.0), const basegfx::B3DVector& rLkAt = basegfx::B3DVector(0.0, 0.0, 0.0), - double fFocLen = 35.0, double fBnkAng = 0.0, - bool bUseFocLen = false); + double fFocLen = 35.0, double fBnkAng = 0.0); virtual ~B3dCamera(); protected: diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx index 9f270eba7504..e8ad7ce38eb9 100644 --- a/include/tools/multisel.hxx +++ b/include/tools/multisel.hxx @@ -95,7 +95,7 @@ class TOOLS_DLLPUBLIC StringRangeEnumerator bool setRange( const OUString& i_rNewRange ); bool insertRange( sal_Int32 nFirst, sal_Int32 nLast, bool bSequence, bool bMayAdjust ); - bool insertJoinedRanges( const std::vector< sal_Int32 >& rNumbers, bool i_bStrict ); + bool insertJoinedRanges( const std::vector< sal_Int32 >& rNumbers ); bool checkValue( sal_Int32, const std::set< sal_Int32 >* i_pPossibleValues = nullptr ) const; public: class TOOLS_DLLPUBLIC Iterator diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index df8366142ec3..79da3e8c7d18 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -91,8 +91,7 @@ public: Polygon( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); Polygon( const Point& rCenter, - long nRadX, long nRadY, - sal_uInt16 nPoints = 0 ); + long nRadX, long nRadY ); Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEnd, PolyStyle ePolyStyle = POLY_ARC, diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx index b948f15b24e8..cb778d2dc60c 100644 --- a/include/tools/pstm.hxx +++ b/include/tools/pstm.hxx @@ -146,13 +146,12 @@ private: protected: void WriteObj( sal_uInt8 nHdr, SvPersistBase * pObj ); - void ReadObj( SvPersistBase * & rpObj, bool bRegister ); + void ReadObj( SvPersistBase * & rpObj ); public: virtual void ResetError() override; - SvPersistStream( SvClassManager &, SvStream * pStream, - Index nStartIdx = 1 ); + SvPersistStream( SvClassManager &, SvStream * pStream ); virtual ~SvPersistStream(); void ClearStream(); diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 4edadde1b37e..a77f09537662 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -690,8 +690,9 @@ public: const void* GetData() { Flush(); return pBuf; } void* SwitchBuffer(); + // the buffer is not owned by this class void SetBuffer( void* pBuf, sal_Size nSize, - bool bOwnsData=true, sal_Size nEOF=0 ); + sal_Size nEOF=0 ); void ObjectOwnsMemory( bool bOwn ) { bOwnsData = bOwn; } void SetResizeOffset( sal_Size nNewResize ) { nResize = nNewResize; } diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index ac18bf13e7db..383a3aa00700 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -422,7 +422,7 @@ public: { return decode(m_aAuth, eMechanism, eCharset); } inline bool SetUser(OUString const & rTheUser) - { return setUser(rTheUser, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } + { return setUser(rTheUser, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } inline bool SetPass(OUString const & rThePassword); @@ -444,7 +444,7 @@ public: sal_uInt32 GetPort() const; inline bool SetHost(OUString const & rTheHost) - { return setHost(rTheHost, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } + { return setHost(rTheHost, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } bool SetPort(sal_uInt32 nThePort); @@ -460,7 +460,7 @@ public: inline bool SetURLPath(OUString const & rThePath, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) - { return setPath(rThePath, false, eMechanism, eCharset); } + { return setPath(rThePath, eMechanism, eCharset); } // Hierarchical Path: @@ -515,6 +515,8 @@ public: bool bIgnoreFinalSlash = true); /** Insert a new segment into the hierarchical path. + A final slash at the end of the + hierarchical path does not denote an empty segment, but is ignored. @param rTheName The name part of the new segment. The new segment will contain no parameters. @@ -528,9 +530,6 @@ public: getSegmentCount() inserts the new segment at the end of the hierarchical path. - @param bIgnoreFinalSlash If true, a final slash at the end of the - hierarchical path does not denote an empty segment, but is ignored. - @param eMechanism See the general discussion for set-methods. @param eCharset See the general discussion for set-methods. @@ -543,7 +542,6 @@ public: inline bool insertName(OUString const & rTheName, bool bAppendFinalSlash = false, sal_Int32 nIndex = LAST_SEGMENT, - bool bIgnoreFinalSlash = true, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); @@ -604,15 +602,14 @@ public: const; /** Set the base of the name of a segment (preserving the extension). + A final slash at the end of the + hierarchical path does not denote an empty segment, but is ignored. @param rTheBase The new base. @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. - @param eMechanism See the general discussion for set-methods. @param eCharset See the general discussion for set-methods. @@ -624,7 +621,6 @@ public: */ bool setBase(OUString const & rTheBase, sal_Int32 nIndex = LAST_SEGMENT, - bool bIgnoreFinalSlash = true, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); @@ -920,7 +916,7 @@ public: inline bool Append(OUString const & rTheSegment, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) - { return appendSegment(rTheSegment, false, eMechanism, eCharset); } + { return appendSegment(rTheSegment, eMechanism, eCharset); } void CutLastName(); @@ -1026,7 +1022,7 @@ private: FSysStyle eStyle) const; bool convertAbsToRel( - OUString const & rTheAbsURIRef, bool bOctets, + OUString const & rTheAbsURIRef, OUString & rTheRelURIRef, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset, FSysStyle eStyle) const; @@ -1064,13 +1060,13 @@ private: // User Info: bool setUser( - OUString const & rTheUser, bool bOctets, + OUString const & rTheUser, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); bool clearPassword(); bool setPassword( - OUString const & rThePassword, bool bOctets, + OUString const & rThePassword, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Host and Port: @@ -1085,7 +1081,7 @@ private: bool bNetBiosName, OUStringBuffer* pCanonic); bool setHost( - OUString const & rTheHost, bool bOctets, + OUString const & rTheHost, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Path: @@ -1099,7 +1095,7 @@ private: OUStringBuffer &rSynPath); bool setPath( - OUString const & rThePath, bool bOctets, + OUString const & rThePath, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Hierarchical Path: @@ -1107,7 +1103,7 @@ private: TOOLS_DLLPRIVATE bool checkHierarchical() const; bool appendSegment( - OUString const & rTheSegment, bool bOctets, + OUString const & rTheSegment, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); TOOLS_DLLPRIVATE SubString getSegment( @@ -1123,7 +1119,7 @@ private: bool clearQuery(); bool setQuery( - OUString const & rTheQuery, bool bOctets, + OUString const & rTheQuery, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Fragment: @@ -1131,7 +1127,7 @@ private: bool clearFragment(); bool setFragment( - OUString const & rTheMark, bool bOctets, + OUString const & rTheMark, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // FILE URLs: @@ -1270,7 +1266,7 @@ inline OUString INetURLObject::GetRelURL(OUString const & rTheBaseURIRef, { OUString aTheRelURIRef; INetURLObject(rTheBaseURIRef, eEncodeMechanism, eCharset). - convertAbsToRel(rTheAbsURIRef, false, aTheRelURIRef, eEncodeMechanism, + convertAbsToRel(rTheAbsURIRef, aTheRelURIRef, eEncodeMechanism, eDecodeMechanism, eCharset, eStyle); return aTheRelURIRef; } @@ -1303,27 +1299,26 @@ inline bool INetURLObject::SetPass(OUString const & rThePassword) { return rThePassword.isEmpty() ? clearPassword() : - setPassword(rThePassword, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8); + setPassword(rThePassword, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } inline bool INetURLObject::SetUserAndPass(OUString const & rTheUser, OUString const & rThePassword) { - return setUser(rTheUser, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8) + return setUser(rTheUser, WAS_ENCODED, RTL_TEXTENCODING_UTF8) && (rThePassword.isEmpty() ? clearPassword() : - setPassword(rThePassword, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8)); + setPassword(rThePassword, WAS_ENCODED, RTL_TEXTENCODING_UTF8)); } inline bool INetURLObject::insertName(OUString const & rTheName, bool bAppendFinalSlash, sal_Int32 nIndex, - bool bIgnoreFinalSlash, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { return insertName(rTheName, false, bAppendFinalSlash, nIndex, - bIgnoreFinalSlash, eMechanism, eCharset); + true/*bIgnoreFinalSlash*/, eMechanism, eCharset); } inline bool INetURLObject::SetParam(OUString const & rTheQuery, @@ -1332,7 +1327,7 @@ inline bool INetURLObject::SetParam(OUString const & rTheQuery, { return rTheQuery.isEmpty() ? clearQuery() : - setQuery(rTheQuery, false, eMechanism, eCharset); + setQuery(rTheQuery, eMechanism, eCharset); } inline bool INetURLObject::SetMark(OUString const & rTheFragment, @@ -1341,7 +1336,7 @@ inline bool INetURLObject::SetMark(OUString const & rTheFragment, { return rTheFragment.isEmpty() ? clearFragment() : - setFragment(rTheFragment, false, eMechanism, eCharset); + setFragment(rTheFragment, eMechanism, eCharset); } inline INetURLObject::INetURLObject(OUString const & rFSysPath, diff --git a/include/tools/zcodec.hxx b/include/tools/zcodec.hxx index d84b66a8cb61..023811557d51 100644 --- a/include/tools/zcodec.hxx +++ b/include/tools/zcodec.hxx @@ -67,7 +67,7 @@ public: void Compress( SvStream& rIStm, SvStream& rOStm ); long Decompress( SvStream& rIStm, SvStream& rOStm ); - bool AttemptDecompression( SvStream& rIStm, SvStream& rOStm, bool updateCrc = false, bool gzLib = false ); + bool AttemptDecompression( SvStream& rIStm, SvStream& rOStm ); void Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize ); long Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize ); diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index bc777e3a4a50..e4a86f38cbee 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -1801,7 +1801,7 @@ OUString StringResourcePersistenceImpl::implGetPathForLocaleItem { OUString aFileName = implGetFileNameForLocaleItem( pLocaleItem, aNameBase ); INetURLObject aInetObj( aLocation ); - aInetObj.insertName( aFileName, true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aFileName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); if( bDefaultFile ) aInetObj.setExtension( "default" ); else diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 5351de95441e..ec2078cd0310 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1578,7 +1578,7 @@ void FileDialogHelper_Impl::verifyPath() return; } url.insertName( - maFileName, false, INetURLObject::LAST_SEGMENT, true, + maFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL); OUString sysPathU; osl::FileBase::RC e = osl::FileBase::getSystemPathFromFileURL( diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 0592e28bd62b..557278cd9029 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -464,11 +464,11 @@ OUString SfxDocumentTemplates::GetTemplateTargetURLFromComponent( const OUString INetURLObject aTemplateObj( pImp->GetRootURL() ); aTemplateObj.insertName( aGroupName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aTemplateObj.insertName( aTitle, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); @@ -848,7 +848,7 @@ bool SfxDocumentTemplates::CopyFrom { INetURLObject aTemplObj( pTargetRgn->GetHierarchyURL() ); aTemplObj.insertName( aTitle, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aTemplURL = aTemplObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1257,7 +1257,7 @@ const OUString& DocTempl_EntryData_Impl::GetHierarchyURL() INetURLObject aTemplateObj( GetParent()->GetHierarchyURL() ); aTemplateObj.insertName( GetTitle(), false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); maOwnURL = aTemplateObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1374,7 +1374,7 @@ void RegionData_Impl::AddEntry( const OUString& rTitle, { INetURLObject aLinkObj( GetHierarchyURL() ); aLinkObj.insertName( rTitle, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1414,7 +1414,7 @@ const OUString& RegionData_Impl::GetHierarchyURL() INetURLObject aRegionObj( GetParent()->GetRootURL() ); aRegionObj.insertName( GetTitle(), false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); maOwnURL = aRegionObj.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 04f9c27150d4..cfe527eab048 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -690,7 +690,7 @@ bool SfxDocTplService_Impl::addEntry( Content& rParentFolder, INetURLObject aLinkObj( rParentFolder.getURL() ); aLinkObj.insertName( rTitle, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -834,7 +834,7 @@ bool SfxDocTplService_Impl::CreateNewUniqueFolderWithPrefix( const OUString& aPa { INetURLObject aObjPath( aDirPath ); aObjPath.insertName( aTryName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); // if there is already an element, retry // if there was another error, do not try any more @@ -900,7 +900,7 @@ OUString SfxDocTplService_Impl::CreateNewUniqueFileWithPrefix( const OUString& a { INetURLObject aObjPath( aPath ); aObjPath.insertName( aTryName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); // if there is already an element, retry // if there was another error, do not try any more @@ -1219,7 +1219,7 @@ uno::Sequence< beans::StringPair > SfxDocTplService_Impl::ReadUINamesForTemplate { INetURLObject aLocObj( aUserPath ); aLocObj.insertName( "groupuinames.xml", false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); Content aLocContent; @@ -1413,7 +1413,7 @@ bool SfxDocTplService_Impl::addGroup( const OUString& rGroupName ) INetURLObject aNewGroupObj( maRootURL ); aNewGroupObj.insertName( rGroupName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aNewGroupURL = aNewGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1498,7 +1498,7 @@ bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName ) // create the group url INetURLObject aGroupObj( maRootURL ); aGroupObj.insertName( rGroupName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); // Get the target url @@ -1602,7 +1602,7 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName, Content aGroup; INetURLObject aGroupObj( maRootURL ); aGroupObj.insertName( rNewName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1613,7 +1613,7 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName, aGroupObj.removeSegment(); aGroupObj.insertName( rOldName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1709,7 +1709,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, OUString sDocServiceName; aGroupObj.insertName( rGroupName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1728,7 +1728,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, // in case the template is installed by office installation of by an add-in // it can not be replaced aGroupObj.insertName( rTemplateName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1893,7 +1893,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName, INetURLObject aGroupObj( maRootURL ); aGroupObj.insertName( rGroupName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1903,7 +1903,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName, // Check, if there's a template with the given name in this group // Return false, if there already is a template aGroupObj.insertName( rTemplateName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1944,7 +1944,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName, INetURLObject aTargetObj( aTargetURL ); aTargetObj.insertName( rTemplateName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aTargetObj.setExtension( aSourceObj.getExtension() ); @@ -2066,7 +2066,7 @@ bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName, INetURLObject aGroupObj( maRootURL ); aGroupObj.insertName( rGroupName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2076,7 +2076,7 @@ bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName, // Check, if there's a template with the given name in this group // Return false, if there is no template aGroupObj.insertName( rTemplateName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2118,7 +2118,7 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName, INetURLObject aGroupObj( maRootURL ); aGroupObj.insertName( rGroupName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2128,7 +2128,7 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName, // Check, if there's a template with the new name in this group // Return false, if there is one aGroupObj.insertName( rNewName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2139,7 +2139,7 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName, // Return false, if there is no template aGroupObj.removeSegment(); aGroupObj.insertName( rOldName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2636,7 +2636,7 @@ void SfxDocTplService_Impl::addToHierarchy( GroupData_Impl *pGroup, INetURLObject aGroupObj( pGroup->getHierarchyURL() ); aGroupObj.insertName( pData->getTitle(), false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2680,7 +2680,7 @@ void SfxDocTplService_Impl::addGroupToHierarchy( GroupData_Impl *pGroup ) INetURLObject aNewGroupObj( maRootURL ); aNewGroupObj.insertName( pGroup->getTitle(), false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aNewGroupURL = aNewGroupObj.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index a0876ec25020..95d12ce6abf2 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1422,7 +1422,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte SvMemoryStream aMemStm; Graphic aGraphic; - aMemStm.SetBuffer( const_cast<css::uno::Sequence<sal_Int8> *>(pSeq)->getArray(), pSeq->getLength(), false, pSeq->getLength() ); + aMemStm.SetBuffer( const_cast<css::uno::Sequence<sal_Int8> *>(pSeq)->getArray(), pSeq->getLength(), pSeq->getLength() ); if( GraphicConverter::Import( aMemStm, aGraphic ) == ERRCODE_NONE ) { diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index e8b026012705..825076282ff3 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -1869,7 +1869,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef, } bool INetURLObject::convertAbsToRel(OUString const & rTheAbsURIRef, - bool bOctets, OUString & rTheRelURIRef, + OUString & rTheRelURIRef, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset, @@ -1886,7 +1886,7 @@ bool INetURLObject::convertAbsToRel(OUString const & rTheAbsURIRef, // ref: INetURLObject aSubject; bool bWasAbsolute; - if (!convertRelToAbs(rTheAbsURIRef, bOctets, aSubject, bWasAbsolute, + if (!convertRelToAbs(rTheAbsURIRef, false/*bOctets*/, aSubject, bWasAbsolute, eEncodeMechanism, eCharset, false, false, false, eStyle)) { @@ -2226,7 +2226,7 @@ INetURLObject::SubString INetURLObject::getAuthority() const } bool INetURLObject::setUser(OUString const & rTheUser, - bool bOctets, EncodeMechanism eMechanism, + EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { if ( @@ -2236,7 +2236,7 @@ bool INetURLObject::setUser(OUString const & rTheUser, return false; } - OUString aNewUser(encodeText(rTheUser, bOctets, PART_USER_PASSWORD, + OUString aNewUser(encodeText(rTheUser, false/*bOctets*/, PART_USER_PASSWORD, eMechanism, eCharset, false)); sal_Int32 nDelta; if (m_aUser.isPresent()) @@ -2287,12 +2287,12 @@ bool INetURLObject::clearPassword() } bool INetURLObject::setPassword(OUString const & rThePassword, - bool bOctets, EncodeMechanism eMechanism, + EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { if (!getSchemeInfo().m_bPassword) return false; - OUString aNewAuth(encodeText(rThePassword, bOctets, PART_USER_PASSWORD, + OUString aNewAuth(encodeText(rThePassword, false/*bOctets*/, PART_USER_PASSWORD, eMechanism, eCharset, false)); sal_Int32 nDelta; if (m_aAuth.isPresent()) @@ -2824,7 +2824,7 @@ bool INetURLObject::parseHostOrNetBiosName( return true; } -bool INetURLObject::setHost(OUString const & rTheHost, bool bOctets, +bool INetURLObject::setHost(OUString const & rTheHost, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -2856,7 +2856,7 @@ bool INetURLObject::setHost(OUString const & rTheHost, bool bOctets, } if (!parseHostOrNetBiosName( aSynHost.getStr(), aSynHost.getStr() + aSynHost.getLength(), - bOctets, eMechanism, eCharset, bNetBiosName, &aSynHost)) + false/*bOctets*/, eMechanism, eCharset, bNetBiosName, &aSynHost)) return false; sal_Int32 nDelta = m_aHost.set(m_aAbsURIRef, aSynHost.makeStringAndClear()); m_aPort += nDelta; @@ -3123,14 +3123,14 @@ bool INetURLObject::parsePath(INetProtocol eScheme, return true; } -bool INetURLObject::setPath(OUString const & rThePath, bool bOctets, +bool INetURLObject::setPath(OUString const & rThePath, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { OUStringBuffer aSynPath; sal_Unicode const * p = rThePath.getStr(); sal_Unicode const * pEnd = p + rThePath.getLength(); - if (!parsePath(m_eScheme, &p, pEnd, bOctets, eMechanism, eCharset, false, + if (!parsePath(m_eScheme, &p, pEnd, false/*bOctets*/, eMechanism, eCharset, false, '/', 0x80000000, 0x80000000, 0x80000000, aSynPath) || p != pEnd) return false; @@ -3151,10 +3151,10 @@ bool INetURLObject::checkHierarchical() const { } bool INetURLObject::appendSegment(OUString const & rTheSegment, - bool bOctets, EncodeMechanism eMechanism, + EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { - return insertName(rTheSegment, bOctets, false, LAST_SEGMENT, true, + return insertName(rTheSegment, false/*bOctets*/, false, LAST_SEGMENT, true, eMechanism, eCharset); } @@ -3287,7 +3287,7 @@ bool INetURLObject::insertName(OUString const & rTheName, bool bOctets, } aNewPath.append(pSuffixBegin, pPathEnd - pSuffixBegin); - return setPath(aNewPath.makeStringAndClear(), false, NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, RTL_TEXTENCODING_UTF8); } @@ -3304,13 +3304,13 @@ bool INetURLObject::clearQuery() return false; } -bool INetURLObject::setQuery(OUString const & rTheQuery, bool bOctets, +bool INetURLObject::setQuery(OUString const & rTheQuery, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { if (!getSchemeInfo().m_bQuery) return false; - OUString aNewQuery(encodeText(rTheQuery, bOctets, PART_URIC, + OUString aNewQuery(encodeText(rTheQuery, false/*bOctets*/, PART_URIC, eMechanism, eCharset, true)); sal_Int32 nDelta; if (m_aQuery.isPresent()) @@ -3338,12 +3338,12 @@ bool INetURLObject::clearFragment() } bool INetURLObject::setFragment(OUString const & rTheFragment, - bool bOctets, EncodeMechanism eMechanism, + EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { if (HasError()) return false; - OUString aNewFragment(encodeText(rTheFragment, bOctets, PART_URIC, + OUString aNewFragment(encodeText(rTheFragment, false/*bOctets*/, PART_URIC, eMechanism, eCharset, true)); if (m_aFragment.isPresent()) m_aFragment.set(m_aAbsURIRef, aNewFragment); @@ -3985,7 +3985,7 @@ bool INetURLObject::removeSegment(sal_Int32 nIndex, bool bIgnoreFinalSlash) aNewPath.append('/'); } - return setPath(aNewPath.makeStringAndClear(), false, NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, RTL_TEXTENCODING_UTF8); } @@ -4035,7 +4035,7 @@ bool INetURLObject::setName(OUString const & rTheName) WAS_ENCODED, RTL_TEXTENCODING_UTF8, true)); aNewPath.append(p, pPathEnd - p); - return setPath(aNewPath.makeStringAndClear(), false, NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, RTL_TEXTENCODING_UTF8); } @@ -4084,11 +4084,10 @@ OUString INetURLObject::getBase(sal_Int32 nIndex, bool bIgnoreFinalSlash, } bool INetURLObject::setBase(OUString const & rTheBase, sal_Int32 nIndex, - bool bIgnoreFinalSlash, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { - SubString aSegment(getSegment(nIndex, bIgnoreFinalSlash)); + SubString aSegment(getSegment(nIndex, true/*bIgnoreFinalSlash*/)); if (!aSegment.isPresent()) return false; @@ -4115,7 +4114,7 @@ bool INetURLObject::setBase(OUString const & rTheBase, sal_Int32 nIndex, eMechanism, eCharset, true)); aNewPath.append(pExtension, pPathEnd - pExtension); - return setPath(aNewPath.makeStringAndClear(), false, NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, RTL_TEXTENCODING_UTF8); } @@ -4179,7 +4178,7 @@ bool INetURLObject::setExtension(OUString const & rTheExtension, eMechanism, eCharset, true)); aNewPath.append(p, pPathEnd - p); - return setPath(aNewPath.makeStringAndClear(), false, NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, RTL_TEXTENCODING_UTF8); } @@ -4210,7 +4209,7 @@ bool INetURLObject::removeExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash) aNewPath.append(pPathBegin, pExtension - pPathBegin); aNewPath.append(p, pPathEnd - p); - return setPath(aNewPath.makeStringAndClear(), false, NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, RTL_TEXTENCODING_UTF8); } @@ -4240,7 +4239,7 @@ bool INetURLObject::setFinalSlash() aNewPath.append(pPathBegin, pPathEnd - pPathBegin); aNewPath.append('/'); - return setPath(aNewPath.makeStringAndClear(), false, NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, RTL_TEXTENCODING_UTF8); } @@ -4260,7 +4259,7 @@ bool INetURLObject::removeFinalSlash() return false; OUString aNewPath(pPathBegin, pPathEnd - pPathBegin); - return setPath(aNewPath, false, NOT_CANONIC, RTL_TEXTENCODING_UTF8); + return setPath(aNewPath, NOT_CANONIC, RTL_TEXTENCODING_UTF8); } bool INetURLObject::setFSysPath(OUString const & rFSysPath, @@ -4924,7 +4923,7 @@ OUString INetURLObject::GetPath() const void INetURLObject::SetBase(OUString const & rTheBase) { - setBase(rTheBase, LAST_SEGMENT, true, ENCODE_ALL); + setBase(rTheBase, LAST_SEGMENT, ENCODE_ALL); } OUString INetURLObject::GetBase() const @@ -4938,7 +4937,7 @@ void INetURLObject::SetName(OUString const & rTheName, { INetURLObject aTemp(*this); if (aTemp.removeSegment() - && aTemp.insertName(rTheName, false, LAST_SEGMENT, true, eMechanism, + && aTemp.insertName(rTheName, false, LAST_SEGMENT, eMechanism, eCharset)) *this = aTemp; } diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx index c735bd0cd8cb..34b205a6312d 100644 --- a/tools/source/generic/b3dtrans.cxx +++ b/tools/source/generic/b3dtrans.cxx @@ -339,8 +339,7 @@ void B3dTransformationSet::SetRatio(double fNew) } } -void B3dTransformationSet::SetDeviceRectangle(double fL, double fR, double fB, double fT, - bool bBroadCastChange) +void B3dTransformationSet::SetDeviceRectangle(double fL, double fR, double fB, double fT) { if(fL != mfLeftBound || fR != mfRightBound || fB != mfBottomBound || fT != mfTopBound) { @@ -354,8 +353,7 @@ void B3dTransformationSet::SetDeviceRectangle(double fL, double fR, double fB, d mbWorldToViewValid = false; // Broadcast changes - if(bBroadCastChange) - DeviceRectangleChange(); + DeviceRectangleChange(); } } @@ -444,14 +442,14 @@ void B3dViewport::CalcOrientation() B3dCamera::B3dCamera( const basegfx::B3DPoint& rPos, const basegfx::B3DVector& rLkAt, - double fFocLen, double fBnkAng, bool bUseFocLen) + double fFocLen, double fBnkAng) : B3dViewport(), aPosition(rPos), aCorrectedPosition(rPos), aLookAt(rLkAt), fFocalLength(fFocLen), fBankAngle(fBnkAng), - bUseFocalLength(bUseFocLen) + bUseFocalLength(false) { CalcNewViewportValues(); } diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 319c11192c48..519c9b45c1da 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -621,21 +621,19 @@ Polygon::Polygon( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVer } } -Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, sal_uInt16 nPoints ) +Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY ) { if( nRadX && nRadY ) { + sal_uInt16 nPoints = 0; // Compute default (depends on size) - if( !nPoints ) - { - nPoints = (sal_uInt16) MinMax( - ( F_PI * ( 1.5 * ( nRadX + nRadY ) - - sqrt( (double) labs( nRadX * nRadY ) ) ) ), - 32, 256 ); + nPoints = (sal_uInt16) MinMax( + ( F_PI * ( 1.5 * ( nRadX + nRadY ) - + sqrt( (double) labs( nRadX * nRadY ) ) ) ), + 32, 256 ); - if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 ) - nPoints >>= 1; - } + if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 ) + nPoints >>= 1; // Ceil number of points until divisible by four mpImplPolygon = new ImplPolygon( nPoints = (nPoints + 3) & ~3 ); diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index 25599212b9a4..d671130bc650 100644 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -607,14 +607,14 @@ bool StringRangeEnumerator::insertRange( sal_Int32 i_nFirst, sal_Int32 i_nLast, } bool StringRangeEnumerator::insertJoinedRanges( - const std::vector< sal_Int32 >& rNumbers, bool i_bStrict ) + const std::vector< sal_Int32 >& rNumbers ) { size_t nCount = rNumbers.size(); if( nCount == 0 ) return true; if( nCount == 1 ) - return insertRange( rNumbers[0], -1, false, ! i_bStrict ); + return insertRange( rNumbers[0], -1, false, true ); for( size_t i = 0; i < nCount - 1; i++ ) { @@ -626,8 +626,7 @@ bool StringRangeEnumerator::insertJoinedRanges( else if( nFirst < nLast ) nFirst++; } - if ( ! insertRange( nFirst, nLast, nFirst != nLast, ! i_bStrict ) && i_bStrict) - return false; + insertRange( nFirst, nLast, nFirst != nLast, true ); } return true; @@ -663,7 +662,7 @@ bool StringRangeEnumerator::setRange( const OUString& i_rNewRange ) { if( bSequence && !aNumbers.empty() ) aNumbers.push_back( mnMax ); - insertJoinedRanges( aNumbers, false/*i_bStrict*/ ); + insertJoinedRanges( aNumbers ); aNumbers.clear(); bSequence = false; @@ -677,7 +676,7 @@ bool StringRangeEnumerator::setRange( const OUString& i_rNewRange ) // insert last entries if( bSequence && !aNumbers.empty() ) aNumbers.push_back( mnMax ); - insertJoinedRanges( aNumbers, false/*i_bStrict*/ ); + insertJoinedRanges( aNumbers ); return true; } diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx index 6c10aaace559..3c15968c0699 100644 --- a/tools/source/ref/pstm.cxx +++ b/tools/source/ref/pstm.cxx @@ -51,11 +51,11 @@ SvCreateInstancePersist SvClassManager::Get( sal_Int32 nClassId ) (cf. <SvPersistStream::SetStream>). @see SvPersistStream::SetStream */ -SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream, Index nStartIdxP ) +SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream ) : rClassMgr( rMgr ) , pStm( pStream ) - , aPUIdx( nStartIdxP ) - , nStartIdx( nStartIdxP ) + , aPUIdx( 1 ) + , nStartIdx( 1 ) , pRefStm( nullptr ) { DBG_ASSERT( nStartIdx != 0, "zero index not allowed" ); @@ -446,8 +446,7 @@ SvPersistStream& SvPersistStream::WritePointer void SvPersistStream::ReadObj ( - SvPersistBase * & rpObj, - bool bRegister + SvPersistBase * & rpObj ) { sal_uInt8 nHdr; @@ -492,15 +491,12 @@ void SvPersistStream::ReadObj // Save reference rpObj->AddFirstRef(); - if( bRegister ) - { - // insert into table - const Index nNewId = aPUIdx.Insert( rpObj ); - // in order to restore state after saving - aPTable[ rpObj ] = nNewId; - DBG_ASSERT( !(nHdr & P_DBGUTIL) || nId == nNewId, - "read write id conflict: not the same" ); - } + // insert into table + const Index nNewId = aPUIdx.Insert( rpObj ); + // in order to restore state after saving + aPTable[ rpObj ] = nNewId; + DBG_ASSERT( !(nHdr & P_DBGUTIL) || nId == nNewId, + "read write id conflict: not the same" ); rpObj->Load( *this ); #ifdef DBG_UTIL if( nObjLen + nObjPos != Tell() ) @@ -529,7 +525,7 @@ SvPersistStream& SvPersistStream::ReadPointer SvPersistBase * & rpObj ) { - ReadObj( rpObj, true ); + ReadObj( rpObj ); return *this; } diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 26b2e2f05a95..deda3732c3ca 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1740,7 +1740,7 @@ sal_uInt64 SvMemoryStream::GetSize() } void SvMemoryStream::SetBuffer( void* pNewBuf, sal_Size nCount, - bool bOwnsDat, sal_Size nEOF ) + sal_Size nEOF ) { SetBufferSize( 0 ); // Buffering in der Basisklasse initialisieren Seek( 0 ); @@ -1754,7 +1754,7 @@ void SvMemoryStream::SetBuffer( void* pNewBuf, sal_Size nCount, nPos = 0; nSize = nCount; nResize = 0; - bOwnsData = bOwnsDat; + bOwnsData = false; if( nEOF > nCount ) nEOF = nCount; diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx index 5198a5b26ada..db86c4ec3190 100644 --- a/tools/source/zcodec/zcodec.cxx +++ b/tools/source/zcodec/zcodec.cxx @@ -393,11 +393,11 @@ void ZCodec::UpdateCRC ( sal_uInt8* pSource, long nDatSize) mnCRC = rtl_crc32( mnCRC, pSource, nDatSize ); } -bool ZCodec::AttemptDecompression(SvStream& rIStm, SvStream& rOStm, bool updateCrc, bool gzLib) +bool ZCodec::AttemptDecompression(SvStream& rIStm, SvStream& rOStm) { assert(meState == STATE_INIT); sal_uLong nStreamPos = rIStm.Tell(); - BeginCompression(ZCODEC_DEFAULT_COMPRESSION, updateCrc, gzLib); + BeginCompression(ZCODEC_DEFAULT_COMPRESSION, false/*updateCrc*/, true/*gzLib*/); InitDecompress(rIStm); EndCompression(); if ( !mbStatus || rIStm.GetError() ) @@ -406,7 +406,7 @@ bool ZCodec::AttemptDecompression(SvStream& rIStm, SvStream& rOStm, bool updateC return false; } rIStm.Seek(nStreamPos); - BeginCompression(ZCODEC_DEFAULT_COMPRESSION, updateCrc, gzLib); + BeginCompression(ZCODEC_DEFAULT_COMPRESSION, false/*updateCrc*/, true/*gzLib*/); Decompress(rIStm, rOStm); EndCompression(); if( !mbStatus || rIStm.GetError() || rOStm.GetError() ) diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 6437f39ca062..dd4e92584bdf 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -155,7 +155,7 @@ bool GIFReader::ReadGlobalHeader() { SvMemoryStream aMemStm; - aMemStm.SetBuffer( pBuf, 7, false, 7 ); + aMemStm.SetBuffer( pBuf, 7, 7 ); aMemStm.ReadUInt16( nGlobalWidth ); aMemStm.ReadUInt16( nGlobalHeight ); aMemStm.ReadUChar( nRF ); @@ -360,7 +360,7 @@ bool GIFReader::ReadLocalHeader() SvMemoryStream aMemStm; BitmapPalette* pPal; - aMemStm.SetBuffer( pBuf, 9, false, 9 ); + aMemStm.SetBuffer( pBuf, 9, 9 ); aMemStm.ReadUInt16( nImagePosX ); aMemStm.ReadUInt16( nImagePosY ); aMemStm.ReadUInt16( nImageWidth ); diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 57a3b879c859..b242ceefc1c5 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -834,7 +834,7 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_u pMemStm.reset( new SvMemoryStream); pIStm = pMemStm.get(); assert(!aData.empty()); - pMemStm->SetBuffer( &aData.front(), nUncodedSize, false, nUncodedSize ); + pMemStm->SetBuffer( &aData.front(), nUncodedSize, nUncodedSize ); nOffset = 0; } else diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index fc2790dbfe4c..dd3b02317a99 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -165,7 +165,7 @@ bool GfxLink::LoadNative( Graphic& rGraphic ) SvMemoryStream aMemStm; ConvertDataFormat nCvtType; - aMemStm.SetBuffer( const_cast<sal_uInt8*>(pData), mnBufSize, false, mnBufSize ); + aMemStm.SetBuffer( const_cast<sal_uInt8*>(pData), mnBufSize, mnBufSize ); switch( meType ) { |