diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-26 14:47:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-27 08:42:53 +0200 |
commit | 8dca2d5ac740f262b045f6529bd8e97af0ec9c47 (patch) | |
tree | e984203a66a5fb178b08341e53fab913a7af7d53 | |
parent | 513ac8eb79e45de332d7ddab5b27c70578b904f1 (diff) |
loplugin:oncevar in starmath..svl
Change-Id: I20e3796407c7e429a88d2811673929ac1141a41c
Reviewed-on: https://gerrit.libreoffice.org/39280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | starmath/qa/cppunit/test_cursor.cxx | 8 | ||||
-rw-r--r-- | starmath/qa/cppunit/test_starmath.cxx | 2 | ||||
-rw-r--r-- | starmath/qa/extras/mmlimport-test.cxx | 8 | ||||
-rw-r--r-- | starmath/source/cfgitem.cxx | 3 | ||||
-rw-r--r-- | starmath/source/cursor.cxx | 3 | ||||
-rw-r--r-- | starmath/source/mathmlexport.cxx | 14 | ||||
-rw-r--r-- | starmath/source/mathmlimport.cxx | 3 | ||||
-rw-r--r-- | store/source/stordata.cxx | 12 | ||||
-rw-r--r-- | svgio/source/svgreader/svgcharacternode.cxx | 18 | ||||
-rw-r--r-- | svgio/source/svgreader/svggradientnode.cxx | 5 | ||||
-rw-r--r-- | svgio/source/svgreader/svggradientstopnode.cxx | 4 | ||||
-rw-r--r-- | svgio/source/svgreader/svgsvgnode.cxx | 86 | ||||
-rw-r--r-- | svl/qa/unit/items/test_IndexedStyleSheets.cxx | 25 | ||||
-rw-r--r-- | svl/qa/unit/svl.cxx | 2 | ||||
-rw-r--r-- | svl/source/fsstor/fsstorage.cxx | 9 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 3 |
16 files changed, 83 insertions, 122 deletions
diff --git a/starmath/qa/cppunit/test_cursor.cxx b/starmath/qa/cppunit/test_cursor.cxx index dd6b86f39439..02c7ff433371 100644 --- a/starmath/qa/cppunit/test_cursor.cxx +++ b/starmath/qa/cppunit/test_cursor.cxx @@ -67,7 +67,7 @@ void Test::tearDown() void Test::testCopyPaste() { - OUString sInput("a * b + c"); + OUString const sInput("a * b + c"); std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput)); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef); @@ -90,7 +90,7 @@ void Test::testCopyPaste() void Test::testCopySelectPaste() { - OUString sInput("a * b + c"); + OUString const sInput("a * b + c"); std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput)); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef); @@ -117,7 +117,7 @@ void Test::testCopySelectPaste() void Test::testCutPaste() { - OUString sInput("a * b + c"); + OUString const sInput("a * b + c"); std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput)); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef); @@ -140,7 +140,7 @@ void Test::testCutPaste() void Test::testCutSelectPaste() { - OUString sInput("a * b + c"); + OUString const sInput("a * b + c"); std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput)); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef); diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx index c7cbb284aa2f..9d0bd53ebdf3 100644 --- a/starmath/qa/cppunit/test_starmath.cxx +++ b/starmath/qa/cppunit/test_starmath.cxx @@ -144,7 +144,7 @@ void Test::editMarker() } { - OUString sTargetText("a under b under c"); + OUString const sTargetText("a under b under c"); ESelection aSelection; m_pEditWindow->SelNextMark(); diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx index 26f553bd8d04..927efc7dc05c 100644 --- a/starmath/qa/extras/mmlimport-test.cxx +++ b/starmath/qa/extras/mmlimport-test.cxx @@ -116,21 +116,21 @@ void Test::testColor() void Test::testSimple() { loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/simple.mml")); - OUString sExpected("left ( {a + b} right )^2"); + OUString const sExpected("left ( {a + b} right )^2"); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText()); } void Test::testNsPrefixMath() { loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/ns-prefix-math.mml")); - OUString sExpected("left ( {a + b} right )^2"); + OUString const sExpected("left ( {a + b} right )^2"); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText()); } void Test::testMaction() { loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/maction.mml")); - OUString sExpected("matrix {1 ## 2 ## 3}"); + OUString const sExpected("matrix {1 ## 2 ## 3}"); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText()); } @@ -143,7 +143,7 @@ void Test::testMspace() void Test::testtdf99556() { loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf99556-1.mml")); - OUString sExpected("sqrt { {} }"); + OUString const sExpected("sqrt { {} }"); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText()); } diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index bf266ceecd2b..332d50858687 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -316,11 +316,10 @@ const OUString SmFontFormatList::GetNewFontFormatId() const { // returns first unused FormatId - OUString aPrefix("Id"); sal_Int32 nCnt = GetCount(); for (sal_Int32 i = 1; i <= nCnt + 1; ++i) { - OUString aTmpId = aPrefix + OUString::number(i); + OUString aTmpId = "Id" + OUString::number(i); if (!GetFontFormat(aTmpId)) return aTmpId; } diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 564df363a72d..3960498ab4a8 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -445,8 +445,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList, sal_uInt16 eFontDesc = pText->GetFontDesc(); //If we need make segment 1 if(len1 > 0) { - int start1 = 0; - OUString str = aText.copy(start1, len1); + OUString str = aText.copy(0, len1); pText->ChangeText(str); ++it; } else {//Remove it if not needed diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 7c2109cf6d3a..c7824d81b23b 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -165,9 +165,8 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium) new comphelper::PropertySetInfo( aInfoMap ) ) ); SvtSaveOptions aSaveOpt; - OUString sUsePrettyPrinting("UsePrettyPrinting"); bool bUsePrettyPrinting( bFlat || aSaveOpt.IsPrettyPrinting() ); - xInfoSet->setPropertyValue( sUsePrettyPrinting, Any(bUsePrettyPrinting) ); + xInfoSet->setPropertyValue( "UsePrettyPrinting", Any(bUsePrettyPrinting) ); // Set base URI OUString sPropName( "BaseURI" ); @@ -330,21 +329,16 @@ bool SmXMLExportWrapper::WriteThroughComponent( return false; } - OUString aPropName( "MediaType" ); - OUString aMime( "text/xml" ); - uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY ); - xSet->setPropertyValue( aPropName, Any(aMime) ); + xSet->setPropertyValue( "MediaType", Any(OUString( "text/xml" )) ); // all streams must be encrypted in encrypted document - OUString aTmpPropName( "UseCommonStoragePasswordEncryption" ); - xSet->setPropertyValue( aTmpPropName, Any(true) ); + xSet->setPropertyValue( "UseCommonStoragePasswordEncryption", Any(true) ); // set Base URL if ( rPropSet.is() ) { - OUString sPropName( "StreamName" ); - rPropSet->setPropertyValue( sPropName, makeAny( sStreamName ) ); + rPropSet->setPropertyValue( "StreamName", makeAny( sStreamName ) ); } // write the stuff diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 093e72b3e690..527b97e3aa1a 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -384,8 +384,7 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent( // set Base URL if ( rPropSet.is() ) { - OUString sPropName( "StreamName"); - rPropSet->setPropertyValue( sPropName, makeAny( sStreamName ) ); + rPropSet->setPropertyValue( "StreamName", makeAny( sStreamName ) ); } diff --git a/store/source/stordata.cxx b/store/source/stordata.cxx index 01822cd44e56..a2c992b983d6 100644 --- a/store/source/stordata.cxx +++ b/store/source/stordata.cxx @@ -1015,8 +1015,7 @@ storeError OStoreDirectoryPageObject::truncate ( if (eScope == page::SCOPE_DIRECT) { // Truncate direct data pages. - sal_uInt16 i, n = OStoreDirectoryDataBlock::directCount; - for (i = n; i > nRemain; i--) + for (sal_uInt16 i = OStoreDirectoryDataBlock::directCount; i > nRemain; i--) { // Obtain data page location. sal_uInt32 nAddr = directLink (i - 1); @@ -1038,8 +1037,7 @@ storeError OStoreDirectoryPageObject::truncate ( if (eScope == page::SCOPE_SINGLE) { // Truncate single indirect pages. - sal_uInt16 i, n = OStoreDirectoryDataBlock::singleCount; - for (i = n; i > nRemain; i--) + for (sal_uInt16 i = OStoreDirectoryDataBlock::singleCount; i > nRemain; i--) { // Truncate single indirect page to zero data pages. eErrCode = store_truncate_Impl (singleLink (i - 1), 0, rBIOS); @@ -1057,8 +1055,7 @@ storeError OStoreDirectoryPageObject::truncate ( if (eScope == page::SCOPE_DOUBLE) { // Truncate double indirect pages. - sal_uInt16 i, n = OStoreDirectoryDataBlock::doubleCount; - for (i = n; i > nRemain; i--) + for (sal_uInt16 i = OStoreDirectoryDataBlock::doubleCount; i > nRemain; i--) { // Truncate double indirect page to zero single indirect pages. eErrCode = store_truncate_Impl (doubleLink (i - 1), 0, 0, rBIOS); @@ -1076,8 +1073,7 @@ storeError OStoreDirectoryPageObject::truncate ( if (eScope == page::SCOPE_TRIPLE) { // Truncate triple indirect pages. - sal_uInt16 i, n = OStoreDirectoryDataBlock::tripleCount; - for (i = n; i > nRemain; i--) + for (sal_uInt16 i = OStoreDirectoryDataBlock::tripleCount; i > nRemain; i--) { // Truncate to zero double indirect pages. eErrCode = store_truncate_Impl (tripleLink (i - 1), 0, 0, 0, rBIOS); diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index 3e20bc5ecac6..b707cc26116a 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -251,25 +251,19 @@ namespace svgio } const ::FontWeight nFontWeight(getVclFontWeight(rSvgStyleAttributes.getFontWeight())); - bool bSymbol(false); - bool bVertical(false); bool bItalic(FontStyle_italic == rSvgStyleAttributes.getFontStyle() || FontStyle_oblique == rSvgStyleAttributes.getFontStyle()); - bool bMonospaced(false); - bool bOutline(false); - bool bRTL(false); - bool bBiDiStrong(false); const drawinglayer::attribute::FontAttribute aFontAttribute( aFontFamily, OUString(), nFontWeight, - bSymbol, - bVertical, + false/*bSymbol*/, + false/*bVertical*/, bItalic, - bMonospaced, - bOutline, - bRTL, - bBiDiStrong); + false/*bMonospaced*/, + false/*bOutline*/, + false/*bRTL*/, + false/*bBiDiStrong*/); // prepare FontSizeNumber double fFontWidth(rSvgStyleAttributes.getFontSizeNumber().solve(*this)); diff --git a/svgio/source/svgreader/svggradientnode.cxx b/svgio/source/svgreader/svggradientnode.cxx index 1778e48341bf..675a648393d0 100644 --- a/svgio/source/svgreader/svggradientnode.cxx +++ b/svgio/source/svgreader/svggradientnode.cxx @@ -64,11 +64,8 @@ namespace svgio const SvgStyleAttributes* SvgGradientNode::getSvgStyleAttributes() const { - OUString aClassStrA("linearGradient"); - OUString aClassStrB("radialGradient"); - return checkForCssStyle( - SVGTokenLinearGradient == getType() ? aClassStrA : aClassStrB, + SVGTokenLinearGradient == getType() ? OUString("linearGradient") : OUString("radialGradient"), maSvgStyleAttributes); } diff --git a/svgio/source/svgreader/svggradientstopnode.cxx b/svgio/source/svgreader/svggradientstopnode.cxx index 3a6bfd452dc6..7035be0d2020 100644 --- a/svgio/source/svgreader/svggradientstopnode.cxx +++ b/svgio/source/svgreader/svggradientstopnode.cxx @@ -38,9 +38,7 @@ namespace svgio const SvgStyleAttributes* SvgGradientStopNode::getSvgStyleAttributes() const { - OUString aClassStr("stop"); - - return checkForCssStyle(aClassStr, maSvgStyleAttributes); + return checkForCssStyle("stop", maSvgStyleAttributes); } void SvgGradientStopNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx index 396dc33dcf8a..7e03f75cf812 100644 --- a/svgio/source/svgreader/svgsvgnode.cxx +++ b/svgio/source/svgreader/svgsvgnode.cxx @@ -606,55 +606,51 @@ namespace svgio // initially despite I found various examples of Svg files out there // which have no correct values for this clipping. It's correct // due to the Svg spec. - bool bDoCorrectCanvasClipping(true); - if(bDoCorrectCanvasClipping) - { - // different from Svg we have the possibility with primitives to get - // a correct bounding box for the geometry. Get it for evtl. taking action - const basegfx::B2DRange aContentRange( - aSequence.getB2DRange( - drawinglayer::geometry::ViewInformation2D())); + // different from Svg we have the possibility with primitives to get + // a correct bounding box for the geometry. Get it for evtl. taking action + const basegfx::B2DRange aContentRange( + aSequence.getB2DRange( + drawinglayer::geometry::ViewInformation2D())); - if(aSvgCanvasRange.isInside(aContentRange)) - { - // no clip needed, but an invisible HiddenGeometryPrimitive2D - // to allow getting the full Svg range using the primitive mechanisms. - // This is needed since e.g. an SdrObject using this as graphic will - // create a mapping transformation to exactly map the content to its - // real life size - const drawinglayer::primitive2d::Primitive2DReference xLine( - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( + if(aSvgCanvasRange.isInside(aContentRange)) + { + // no clip needed, but an invisible HiddenGeometryPrimitive2D + // to allow getting the full Svg range using the primitive mechanisms. + // This is needed since e.g. an SdrObject using this as graphic will + // create a mapping transformation to exactly map the content to its + // real life size + const drawinglayer::primitive2d::Primitive2DReference xLine( + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( + basegfx::tools::createPolygonFromRect( + aSvgCanvasRange), + basegfx::BColor(0.0, 0.0, 0.0))); + const drawinglayer::primitive2d::Primitive2DReference xHidden( + new drawinglayer::primitive2d::HiddenGeometryPrimitive2D( + drawinglayer::primitive2d::Primitive2DContainer { xLine })); + + aSequence.push_back(xHidden); + } + else if(aSvgCanvasRange.overlaps(aContentRange)) + { + // Clip is necessary. This will make Svg images evtl. smaller + // than wanted from Svg (the free space which may be around it is + // conform to the Svg spec), but avoids an expensive and unnecessary + // clip. Keep the full Svg range here to get the correct mappings + // to objects using this. Optimizations can be done in the processors + const drawinglayer::primitive2d::Primitive2DReference xMask( + new drawinglayer::primitive2d::MaskPrimitive2D( + basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( - aSvgCanvasRange), - basegfx::BColor(0.0, 0.0, 0.0))); - const drawinglayer::primitive2d::Primitive2DReference xHidden( - new drawinglayer::primitive2d::HiddenGeometryPrimitive2D( - drawinglayer::primitive2d::Primitive2DContainer { xLine })); - - aSequence.push_back(xHidden); - } - else if(aSvgCanvasRange.overlaps(aContentRange)) - { - // Clip is necessary. This will make Svg images evtl. smaller - // than wanted from Svg (the free space which may be around it is - // conform to the Svg spec), but avoids an expensive and unnecessary - // clip. Keep the full Svg range here to get the correct mappings - // to objects using this. Optimizations can be done in the processors - const drawinglayer::primitive2d::Primitive2DReference xMask( - new drawinglayer::primitive2d::MaskPrimitive2D( - basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect( - aSvgCanvasRange)), - aSequence)); + aSvgCanvasRange)), + aSequence)); - aSequence = drawinglayer::primitive2d::Primitive2DContainer { xMask }; - } - else - { - // not inside, no overlap. Empty Svg - aSequence.clear(); - } + aSequence = drawinglayer::primitive2d::Primitive2DContainer { xMask }; + } + else + { + // not inside, no overlap. Empty Svg + aSequence.clear(); } if(!aSequence.empty()) diff --git a/svl/qa/unit/items/test_IndexedStyleSheets.cxx b/svl/qa/unit/items/test_IndexedStyleSheets.cxx index 6560e7de6832..d7cccebaa833 100644 --- a/svl/qa/unit/items/test_IndexedStyleSheets.cxx +++ b/svl/qa/unit/items/test_IndexedStyleSheets.cxx @@ -73,10 +73,8 @@ void IndexedStyleSheetsTest::InstantiationWorks() void IndexedStyleSheetsTest::AddedStylesheetsCanBeFoundAndRetrievedByPosition() { - rtl::OUString name1("name1"); - rtl::OUString name2("name2"); - rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet(name1)); - rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet(name2)); + rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet("name1")); + rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet("name2")); IndexedStyleSheets iss; iss.AddStyleSheet(sheet1); iss.AddStyleSheet(sheet2); @@ -97,10 +95,8 @@ void IndexedStyleSheetsTest::AddingSameStylesheetTwiceHasNoEffect() void IndexedStyleSheetsTest::RemovedStyleSheetIsNotFound() { - rtl::OUString name1("name1"); - rtl::OUString name2("name2"); - rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet(name1)); - rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet(name2)); + rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet("name1")); + rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet("name2")); IndexedStyleSheets iss; iss.AddStyleSheet(sheet1); iss.AddStyleSheet(sheet2); @@ -147,8 +143,8 @@ void IndexedStyleSheetsTest::StyleSheetsCanBeRetrievedByTheirName() void IndexedStyleSheetsTest::KnowsThatItStoresAStyleSheet() { - rtl::OUString name1("name1"); - rtl::OUString name2("name2"); + rtl::OUString const name1("name1"); + rtl::OUString const name2("name2"); rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet(name1)); rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet(name1)); rtl::Reference<SfxStyleSheetBase> sheet3(new MockedStyleSheet(name2)); @@ -169,12 +165,9 @@ void IndexedStyleSheetsTest::KnowsThatItStoresAStyleSheet() void IndexedStyleSheetsTest::PositionCanBeQueriedByFamily() { - rtl::OUString name1("name1"); - rtl::OUString name2("name2"); - rtl::OUString name3("name3"); - rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet(name1, SfxStyleFamily::Char)); - rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet(name2, SfxStyleFamily::Para)); - rtl::Reference<SfxStyleSheetBase> sheet3(new MockedStyleSheet(name3, SfxStyleFamily::Char)); + rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet("name1", SfxStyleFamily::Char)); + rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet("name2", SfxStyleFamily::Para)); + rtl::Reference<SfxStyleSheetBase> sheet3(new MockedStyleSheet("name3", SfxStyleFamily::Char)); IndexedStyleSheets iss; iss.AddStyleSheet(sheet1); diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 10fcbd5672b6..c8b030dc3e00 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -317,7 +317,7 @@ void Test::testSharedStringPool() CPPUNIT_ASSERT_EQUAL(p1.getData(), p2.getData()); // Test case insensitive string ID's. - OUString aAndyLower("andy"), aAndyUpper("ANDY"); + OUString const aAndyLower("andy"), aAndyUpper("ANDY"); p1 = aPool.intern(aAndy); p2 = aPool.intern(aAndyLower); CPPUNIT_ASSERT_MESSAGE("Failed to intern strings.", p1.getData() && p2.getData()); diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 9ca3cd228ffe..01df7112802a 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -189,11 +189,10 @@ void FSStorage::CopyContentToStorage_Impl( ::ucbhelper::Content* pContent, const OUString* pProps = aProps.getArray(); pProps[0] = "TargetURL"; pProps[1] = "IsFolder"; - ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; try { - uno::Reference< sdbc::XResultSet > xResultSet = pContent->createCursor( aProps, eInclude ); + uno::Reference< sdbc::XResultSet > xResultSet = pContent->createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS ); uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY ); if ( xResultSet.is() ) { @@ -918,10 +917,9 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames() throw io::IOException(); // TODO: error handling uno::Sequence<OUString> aProps { "Title" }; - ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; sal_Int32 nSize = 0; - uno::Reference< sdbc::XResultSet > xResultSet = GetContent()->createCursor( aProps, eInclude ); + uno::Reference< sdbc::XResultSet > xResultSet = GetContent()->createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS ); uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY ); if ( xResultSet.is() ) { @@ -1019,9 +1017,8 @@ sal_Bool SAL_CALL FSStorage::hasElements() throw io::IOException(); // TODO: error handling uno::Sequence<OUString> aProps { "TargetURL" }; - ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; - uno::Reference< sdbc::XResultSet > xResultSet = GetContent()->createCursor( aProps, eInclude ); + uno::Reference< sdbc::XResultSet > xResultSet = GetContent()->createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS ); return ( xResultSet.is() && xResultSet->next() ); } catch (const uno::RuntimeException&) diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index eaed9780e490..8347d6a50049 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -1104,8 +1104,7 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference< if ( bCanChangePassword ) { // ask for the new password, but do not set it - PasswordRequestMode aRMode = PasswordRequestMode_PASSWORD_CREATE; - OUString aPass = RequestPasswordFromUser( aRMode, xTmpHandler ); + OUString aPass = RequestPasswordFromUser( PasswordRequestMode_PASSWORD_CREATE, xTmpHandler ); if ( !aPass.isEmpty() ) { |