loplugin:oncevar in test..tools
Change-Id: I7b3ccc8f227100ff7fedeaca96a12f135da60bab Reviewed-on: https://gerrit.libreoffice.org/39326 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
1eee0abd45
commit
ef531e85d9
@ -24,7 +24,7 @@ namespace apitest {
|
||||
|
||||
void XCellRangesQuery::testQueryColumnDifference()
|
||||
{
|
||||
OUString aExpected( "Sheet1.B1:C1,Sheet1.B3:C5" );
|
||||
OUString const aExpected( "Sheet1.B1:C1,Sheet1.B3:C5" );
|
||||
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
|
||||
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryColumnDifferences(table::CellAddress(0, 1, 1));
|
||||
OUString aResult = xRanges->getRangeAddressesAsString();
|
||||
@ -34,7 +34,7 @@ void XCellRangesQuery::testQueryColumnDifference()
|
||||
|
||||
void XCellRangesQuery::testQueryContentDifference()
|
||||
{
|
||||
OUString aExpected( "Sheet1.B3,Sheet1.C2" );
|
||||
OUString const aExpected( "Sheet1.B3,Sheet1.C2" );
|
||||
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
|
||||
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryContentCells(sheet::CellFlags::VALUE);
|
||||
OUString aResult = xRanges->getRangeAddressesAsString();
|
||||
@ -54,7 +54,7 @@ void XCellRangesQuery::testQueryEmptyCells()
|
||||
|
||||
void XCellRangesQuery::testQueryFormulaCells()
|
||||
{
|
||||
OUString aExpected( "Sheet1.B2" );
|
||||
OUString const aExpected( "Sheet1.B2" );
|
||||
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
|
||||
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryFormulaCells(sheet::CellFlags::FORMULA);
|
||||
OUString aResult = xRanges->getRangeAddressesAsString();
|
||||
@ -64,7 +64,7 @@ void XCellRangesQuery::testQueryFormulaCells()
|
||||
|
||||
void XCellRangesQuery::testQueryIntersection()
|
||||
{
|
||||
OUString aExpected( "Sheet1.D4:E5" );
|
||||
OUString const aExpected( "Sheet1.D4:E5" );
|
||||
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
|
||||
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryIntersection(table::CellRangeAddress(0,3,3,7,7));
|
||||
OUString aResult = xRanges->getRangeAddressesAsString();
|
||||
@ -74,7 +74,7 @@ void XCellRangesQuery::testQueryIntersection()
|
||||
|
||||
void XCellRangesQuery::testQueryRowDifference()
|
||||
{
|
||||
OUString aExpected( "Sheet1.A2:A4,Sheet1.C2:E4" );
|
||||
OUString const aExpected( "Sheet1.A2:A4,Sheet1.C2:E4" );
|
||||
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
|
||||
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryRowDifferences(table::CellAddress(0,1,1));
|
||||
OUString aResult = xRanges->getRangeAddressesAsString();
|
||||
@ -84,7 +84,7 @@ void XCellRangesQuery::testQueryRowDifference()
|
||||
|
||||
void XCellRangesQuery::testQueryVisibleCells()
|
||||
{
|
||||
OUString aExpected( "Sheet1.A1:E5" );
|
||||
OUString const aExpected( "Sheet1.A1:E5" );
|
||||
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
|
||||
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryVisibleCells();
|
||||
OUString aResult = xRanges->getRangeAddressesAsString();
|
||||
|
@ -35,17 +35,15 @@ namespace apitest {
|
||||
|
||||
void XNamedRange::testGetContent()
|
||||
{
|
||||
OUString aTestedNamedRangeString("initial1");
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange(aTestedNamedRangeString);
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange("initial1");
|
||||
|
||||
OUString aExpectedContent("$Sheet1.$B$1");
|
||||
OUString const aExpectedContent("$Sheet1.$B$1");
|
||||
CPPUNIT_ASSERT_MESSAGE("Wrong expected content for initial1 on GetContent", xNamedRange->getContent().equals(aExpectedContent));
|
||||
}
|
||||
|
||||
void XNamedRange::testSetContent()
|
||||
{
|
||||
OUString aTestedNamedRangeString("initial1");
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange(aTestedNamedRangeString);
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange("initial1");
|
||||
|
||||
OUString aExpectedContent;
|
||||
|
||||
@ -69,15 +67,13 @@ void XNamedRange::testSetContent()
|
||||
|
||||
void XNamedRange::testGetType()
|
||||
{
|
||||
OUString aTestedNamedRangeString("initial1");
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange(aTestedNamedRangeString);
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange("initial1");
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong expected Type", sal_Int32(0), xNamedRange->getType());
|
||||
}
|
||||
|
||||
void XNamedRange::testSetType()
|
||||
{
|
||||
OUString aTestedNamedRangeString("initial1");
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange(aTestedNamedRangeString);
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange("initial1");
|
||||
|
||||
sal_Int32 nType = ::sheet::NamedRangeFlag::ROW_HEADER;
|
||||
xNamedRange->setType(nType);
|
||||
@ -102,8 +98,7 @@ void XNamedRange::testSetType()
|
||||
|
||||
void XNamedRange::testGetReferencePosition()
|
||||
{
|
||||
OUString aTestedNamedRangeString("initial2");
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange(aTestedNamedRangeString);
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange("initial2");
|
||||
|
||||
table::CellAddress aCellAddress = xNamedRange->getReferencePosition();
|
||||
// the expected address is on B1, as it was the active cell when initial2 was created
|
||||
@ -114,8 +109,7 @@ void XNamedRange::testGetReferencePosition()
|
||||
|
||||
void XNamedRange::testSetReferencePosition()
|
||||
{
|
||||
OUString aTestedNamedRangeString("initial1");
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange(aTestedNamedRangeString);
|
||||
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange("initial1");
|
||||
|
||||
table::CellAddress aBaseAddress = table::CellAddress(1,2,3);
|
||||
|
||||
|
@ -59,31 +59,31 @@ void XNamedRanges::testAddNewByName()
|
||||
table::CellAddress aBaseAddress = table::CellAddress(0,0,0);
|
||||
|
||||
sal_Int32 nType = 0;
|
||||
OUString aContent1("D1");
|
||||
OUString const aContent1("D1");
|
||||
OUString aName1("type_0");
|
||||
xNamedRanges->addNewByName(aName1, aContent1, aBaseAddress, nType);
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed to create Namedrange Type 0 - Normal case", xNamedRanges->hasByName(aName1));
|
||||
|
||||
nType = ::sheet::NamedRangeFlag::COLUMN_HEADER;
|
||||
OUString aContent2("D2");
|
||||
OUString const aContent2("D2");
|
||||
OUString aName2("type_COLUMN_HEADER");
|
||||
xNamedRanges->addNewByName(aName2, aContent2, aBaseAddress, nType);
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed to create Namedrange Type COLUMN_HEADER", xNamedRanges->hasByName(aName2));
|
||||
|
||||
nType = ::sheet::NamedRangeFlag::FILTER_CRITERIA;
|
||||
OUString aContent3("D3");
|
||||
OUString const aContent3("D3");
|
||||
OUString aName3("type_FILTER_CRITERIA");
|
||||
xNamedRanges->addNewByName(aName3, aContent3, aBaseAddress, nType);
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed to create Namedrange Type FILTER_CRITERIA", xNamedRanges->hasByName(aName3));
|
||||
|
||||
nType = ::sheet::NamedRangeFlag::PRINT_AREA;
|
||||
OUString aContent4("D4");
|
||||
OUString const aContent4("D4");
|
||||
OUString aName4("type_PRINT_AREA");
|
||||
xNamedRanges->addNewByName(aName4, aContent4, aBaseAddress, nType);
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed to create Namedrange Type PRINT_AREA", xNamedRanges->hasByName(aName4));
|
||||
|
||||
nType = ::sheet::NamedRangeFlag::ROW_HEADER;
|
||||
OUString aContent5("D5");
|
||||
OUString const aContent5("D5");
|
||||
OUString aName5("type_ROW_HEADER");
|
||||
xNamedRanges->addNewByName(aName5, aContent5, aBaseAddress, nType);
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed to create Namedrange Type ROW_HEADER", xNamedRanges->hasByName(aName5));
|
||||
@ -171,8 +171,7 @@ void XNamedRanges::testRemoveByName()
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("NamedRange initial1 not removed", nNewCount, nInitialCount - 1);
|
||||
CPPUNIT_ASSERT_MESSAGE("Wrong NamedRange removed, initial1 still present", !xNamedRanges->hasByName(maNameToRemove));
|
||||
// try to remove non existing
|
||||
OUString aNr2("dummyNonExistingNamedRange");
|
||||
xNamedRanges->removeByName(aNr2);// an exception should be raised here
|
||||
xNamedRanges->removeByName("dummyNonExistingNamedRange");// an exception should be raised here
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,14 +148,12 @@ void XSpreadsheets2::testImportOverExistingNamedRange()
|
||||
*/
|
||||
importSheetToCopy();
|
||||
|
||||
OUString aNamedRangeString("initial1");
|
||||
|
||||
uno::Reference< container::XNameAccess > xDestNamedRangesNameAccess(getNamedRanges(xDestDoc), UNO_QUERY_THROW);
|
||||
uno::Any aNr = xDestNamedRangesNameAccess->getByName(aNamedRangeString);
|
||||
uno::Any aNr = xDestNamedRangesNameAccess->getByName("initial1");
|
||||
uno::Reference< sheet::XNamedRange > xDestNamedRange(aNr, UNO_QUERY_THROW);
|
||||
OUString aNrDestContent = xDestNamedRange->getContent();
|
||||
|
||||
OUString aExpectedContent("$Sheet1.$B$1");
|
||||
OUString const aExpectedContent("$Sheet1.$B$1");
|
||||
|
||||
std::cout << "testImportSheet : initial1 aNrDestContent " << aNrDestContent << std::endl;
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong address for initial1", aNrDestContent, aExpectedContent);
|
||||
@ -203,7 +201,7 @@ void XSpreadsheets2::testImportNamedRangeRedefinedInSource()
|
||||
uno::Any aRedefinedInSheetNr = xDestNamedRangesNameAccess->getByName(aRedefinedInSheetNamedRangeString);
|
||||
uno::Reference< sheet::XNamedRange > xDestRedefinedInSheetNamedRange(aRedefinedInSheetNr, UNO_QUERY_THROW);
|
||||
OUString aRedefinedInSheetNrDestContent = xDestRedefinedInSheetNamedRange->getContent();
|
||||
OUString aRedefinedInSheetExpectedContent("$Sheet1.$B$2");
|
||||
OUString const aRedefinedInSheetExpectedContent("$Sheet1.$B$2");
|
||||
std::cout << "testImportSheet : initial2 content " << aRedefinedInSheetNrDestContent << std::endl;
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong address for Redefined InSheet named range", aRedefinedInSheetNrDestContent, aRedefinedInSheetExpectedContent);
|
||||
}
|
||||
@ -263,17 +261,15 @@ void XSpreadsheets2::testImportCellStyle()
|
||||
|
||||
uno::Reference< style::XStyleFamiliesSupplier > xFamiliesSupplier (xDestDoc, UNO_QUERY_THROW);
|
||||
uno::Reference< container::XNameAccess > xFamiliesNameAccess (xFamiliesSupplier->getStyleFamilies(), UNO_QUERY_THROW);
|
||||
OUString aCellFamilyName("CellStyles");
|
||||
uno::Any aCellStylesFamily = xFamiliesNameAccess->getByName(aCellFamilyName);
|
||||
uno::Any aCellStylesFamily = xFamiliesNameAccess->getByName("CellStyles");
|
||||
uno::Reference< container::XNameContainer > xCellStylesFamilyNameAccess (aCellStylesFamily, UNO_QUERY_THROW);
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("New cell style not present", xCellStylesFamilyNameAccess->hasByName(aDestStyleName));
|
||||
|
||||
uno::Any aCellStyle = xCellStylesFamilyNameAccess->getByName(aDestStyleName);
|
||||
uno::Reference< beans::XPropertySet > xCellStyleProp (aCellStyle, UNO_QUERY_THROW);
|
||||
OUString aProperty("VertJustify");
|
||||
sal_Int32 aVertJustify = 0;
|
||||
CPPUNIT_ASSERT(xCellStyleProp->getPropertyValue(aProperty) >>= aVertJustify);
|
||||
CPPUNIT_ASSERT(xCellStyleProp->getPropertyValue("VertJustify") >>= aVertJustify);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("New style: VertJustify not set", table::CellVertJustify_CENTER, (table::CellVertJustify)aVertJustify);
|
||||
}
|
||||
@ -296,8 +292,7 @@ uno::Reference< sheet::XSpreadsheetDocument> XSpreadsheets2::getDoc(const OUStri
|
||||
uno::Reference< sheet::XNamedRanges> XSpreadsheets2::getNamedRanges(uno::Reference< sheet::XSpreadsheetDocument> const & xDoc)
|
||||
{
|
||||
uno::Reference< beans::XPropertySet > xPropSet (xDoc, UNO_QUERY_THROW);
|
||||
OUString NamedRangesPropertyString("NamedRanges");
|
||||
uno::Reference< sheet::XNamedRanges > xNamedRanges(xPropSet->getPropertyValue(NamedRangesPropertyString), UNO_QUERY_THROW);
|
||||
uno::Reference< sheet::XNamedRanges > xNamedRanges(xPropSet->getPropertyValue("NamedRanges"), UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT(xNamedRanges.is());
|
||||
|
||||
return xNamedRanges;
|
||||
@ -331,9 +326,7 @@ void XSpreadsheets2::importSheetToCopy()
|
||||
|
||||
bool XSpreadsheets2::isExternalReference(const OUString& aDestContent, const OUString& aSrcContent )
|
||||
{
|
||||
OUString aStart("'file://");
|
||||
|
||||
CPPUNIT_ASSERT(aDestContent.startsWith(aStart));
|
||||
CPPUNIT_ASSERT(aDestContent.startsWith("'file://"));
|
||||
|
||||
return (aDestContent.endsWithIgnoreAsciiCase(aSrcContent) // same cell address
|
||||
&& aDestContent.indexOf(aSrcFileName)>0); // contains source file name
|
||||
|
@ -76,8 +76,7 @@ void XStyleLoader::checkStyleProperties( uno::Reference< style::XStyleFamiliesSu
|
||||
uno::Reference< style::XStyle > xMyStyle (xCellStyles->getByName("myStyle"), UNO_QUERY_THROW);
|
||||
uno::Reference< beans::XPropertySet > xPropSet (xMyStyle, UNO_QUERY_THROW);
|
||||
|
||||
OUString aCellStyleName("CellBackColor");
|
||||
uno::Any aBackColor = xPropSet->getPropertyValue(aCellStyleName);
|
||||
uno::Any aBackColor = xPropSet->getPropertyValue("CellBackColor");
|
||||
uno::Any expectedBackColor(sal_Int32(16724787));
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong CellBackColor" , expectedBackColor, aBackColor);
|
||||
|
@ -36,7 +36,6 @@ void XViewPane::testFirstVisibleRow()
|
||||
|
||||
void XViewPane::testVisibleRange()
|
||||
{
|
||||
sal_Int16 nSheet = 0;
|
||||
sal_Int32 nCol = 5;
|
||||
sal_Int32 nRow = 3;
|
||||
uno::Reference < sheet::XViewPane > xViewPane(init(),UNO_QUERY_THROW);
|
||||
@ -44,7 +43,7 @@ void XViewPane::testVisibleRange()
|
||||
xViewPane->setFirstVisibleRow(nRow);
|
||||
|
||||
table::CellRangeAddress aCellRangeAddress = xViewPane->getVisibleRange();
|
||||
CPPUNIT_ASSERT_EQUAL(aCellRangeAddress.Sheet, nSheet);
|
||||
CPPUNIT_ASSERT_EQUAL(aCellRangeAddress.Sheet, short(0));
|
||||
CPPUNIT_ASSERT_EQUAL(aCellRangeAddress.StartRow, nRow);
|
||||
CPPUNIT_ASSERT_EQUAL(aCellRangeAddress.StartColumn, nCol);
|
||||
}
|
||||
|
@ -280,14 +280,13 @@ sal_Bool VCLXPrinter::start( const OUString& /*rJobName*/, sal_Int16 /*nCopies*/
|
||||
{
|
||||
::osl::MutexGuard aGuard( Mutex );
|
||||
|
||||
bool bDone = true;
|
||||
if (mxPrinter.get())
|
||||
{
|
||||
maInitJobSetup = mxPrinter->GetJobSetup();
|
||||
mxListener.reset(new vcl::OldStylePrintAdaptor(mxPrinter));
|
||||
}
|
||||
|
||||
return bDone;
|
||||
return true;
|
||||
}
|
||||
|
||||
void VCLXPrinter::end( )
|
||||
|
@ -1628,21 +1628,16 @@ void ControlContainerBase::ImplModelPropertiesChanged( const Sequence< PropertyC
|
||||
{
|
||||
if( !isDesignMode() && !mbCreatingCompatiblePeer )
|
||||
{
|
||||
OUString s1( "PositionX" );
|
||||
OUString s2( "PositionY" );
|
||||
OUString s3( "Width" );
|
||||
OUString s4( "Height" );
|
||||
|
||||
sal_Int32 nLen = rEvents.getLength();
|
||||
for( sal_Int32 i = 0; i < nLen; i++ )
|
||||
{
|
||||
const PropertyChangeEvent& rEvt = rEvents.getConstArray()[i];
|
||||
Reference< XControlModel > xModel( rEvt.Source, UNO_QUERY );
|
||||
bool bOwnModel = xModel.get() == getModel().get();
|
||||
if ( ( rEvt.PropertyName == s1 ) ||
|
||||
( rEvt.PropertyName == s2 ) ||
|
||||
( rEvt.PropertyName == s3 ) ||
|
||||
( rEvt.PropertyName == s4 ) )
|
||||
if ( ( rEvt.PropertyName == "PositionX" ) ||
|
||||
( rEvt.PropertyName == "PositionY" ) ||
|
||||
( rEvt.PropertyName == "Width" ) ||
|
||||
( rEvt.PropertyName == "Height" ) )
|
||||
{
|
||||
if ( bOwnModel )
|
||||
{
|
||||
@ -1778,10 +1773,9 @@ void ControlContainerBase::ImplStartListingForResourceEvents()
|
||||
|
||||
void ControlContainerBase::ImplUpdateResourceResolver()
|
||||
{
|
||||
OUString aPropName( PROPERTY_RESOURCERESOLVER );
|
||||
Reference< resource::XStringResourceResolver > xStringResourceResolver;
|
||||
|
||||
ImplGetPropertyValue( aPropName ) >>= xStringResourceResolver;
|
||||
ImplGetPropertyValue( PROPERTY_RESOURCERESOLVER ) >>= xStringResourceResolver;
|
||||
if ( !xStringResourceResolver.is() )
|
||||
return;
|
||||
|
||||
|
@ -76,8 +76,7 @@ css::uno::Reference< css:: beans::XPropertySetInfo > SAL_CALL
|
||||
|
||||
OUString SAL_CALL ORoadmapEntry::getImplementationName( )
|
||||
{
|
||||
OUString aStr("com.sun.star.comp.toolkit.RoadmapItem");
|
||||
return aStr;
|
||||
return OUString("com.sun.star.comp.toolkit.RoadmapItem");
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL ORoadmapEntry::supportsService( const OUString& ServiceName )
|
||||
|
@ -74,11 +74,6 @@ void UnoControlBase::ImplSetPropertyValues( const css::uno::Sequence< OUString >
|
||||
if ( !bUpdateThis )
|
||||
ImplLockPropertyChangeNotifications( aPropertyNames, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
int dummy = 0;
|
||||
(void)dummy;
|
||||
}
|
||||
}
|
||||
|
||||
void UnoControlBase::ImplSetPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue, bool bUpdateThis )
|
||||
|
@ -281,10 +281,9 @@ UnoControlHolderList::ControlIdentifier UnoControlHolderList::impl_getFreeIdenti
|
||||
|
||||
OUString UnoControlHolderList::impl_getFreeName_throw()
|
||||
{
|
||||
OUString name( "control_" );
|
||||
for ( ControlIdentifier candidateId = 0; candidateId < ::std::numeric_limits< ControlIdentifier >::max(); ++candidateId )
|
||||
{
|
||||
OUString candidateName( name + OUString::number( candidateId ) );
|
||||
OUString candidateName( "control_" + OUString::number( candidateId ) );
|
||||
ControlMap::const_iterator loop = maControls.begin();
|
||||
for ( ; loop != maControls.end(); ++loop )
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ namespace
|
||||
aAllChars[i-1] = static_cast<sal_Char>(i);
|
||||
|
||||
//Some slots are unused, so don't map to private, just set them to 'X'
|
||||
sal_uInt32 convertFlags = OUSTRING_TO_OSTRING_CVTFLAGS ^ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE;
|
||||
sal_uInt32 const convertFlags = OUSTRING_TO_OSTRING_CVTFLAGS ^ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE;
|
||||
OUString sOrigText(&aAllChars[0], aAllChars.size(), eEncoding, convertFlags);
|
||||
sOrigText = sOrigText.replace( 0xfffd, 'X' );
|
||||
|
||||
|
@ -447,7 +447,6 @@ void B3dCamera::CalcNewViewportValues()
|
||||
bool B3dCamera::CalcFocalLength()
|
||||
{
|
||||
double fWidth = GetDeviceRectangleWidth();
|
||||
bool bRetval = false;
|
||||
|
||||
// Adjust focal length based on given position
|
||||
basegfx::B3DPoint aOldPosition;
|
||||
@ -456,7 +455,7 @@ bool B3dCamera::CalcFocalLength()
|
||||
fFocalLength = aOldPosition.getZ() / fWidth * 35.0;
|
||||
if(fFocalLength < 5.0)
|
||||
fFocalLength = 5.0;
|
||||
return bRetval;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -296,7 +296,6 @@ void Color::ApplyTintOrShade(sal_Int16 n100thPercent)
|
||||
|
||||
SvStream& WriteColor( SvStream& rOStream, const Color& rColor )
|
||||
{
|
||||
sal_uInt16 nColorName = COL_NAME_USER;
|
||||
sal_uInt16 nRed = rColor.GetRed();
|
||||
sal_uInt16 nGreen = rColor.GetGreen();
|
||||
sal_uInt16 nBlue = rColor.GetBlue();
|
||||
@ -304,7 +303,7 @@ SvStream& WriteColor( SvStream& rOStream, const Color& rColor )
|
||||
nGreen = (nGreen<<8) + nGreen;
|
||||
nBlue = (nBlue<<8) + nBlue;
|
||||
|
||||
rOStream.WriteUInt16( nColorName );
|
||||
rOStream.WriteUInt16( COL_NAME_USER );
|
||||
rOStream.WriteUInt16( nRed );
|
||||
rOStream.WriteUInt16( nGreen );
|
||||
rOStream.WriteUInt16( nBlue );
|
||||
|
Loading…
x
Reference in New Issue
Block a user