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

loplugin:unusedmethods unused return value in xmlscript/

Change-Id: I076b589686302a9093eae934533e823f12e003b9
üst 139c2e8c
...@@ -290,19 +290,19 @@ public: ...@@ -290,19 +290,19 @@ public:
virtual void SAL_CALL endElement() virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) override; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) override;
bool importTextColorStyle( void importTextColorStyle(
css::uno::Reference< css::beans::XPropertySet > const & xProps ); css::uno::Reference< css::beans::XPropertySet > const & xProps );
bool importTextLineColorStyle( void importTextLineColorStyle(
css::uno::Reference< css::beans::XPropertySet > const & xProps ); css::uno::Reference< css::beans::XPropertySet > const & xProps );
bool importFillColorStyle( void importFillColorStyle(
css::uno::Reference< css::beans::XPropertySet > const & xProps ); css::uno::Reference< css::beans::XPropertySet > const & xProps );
bool importBackgroundColorStyle( void importBackgroundColorStyle(
css::uno::Reference< css::beans::XPropertySet > const & xProps ); css::uno::Reference< css::beans::XPropertySet > const & xProps );
bool importFontStyle( void importFontStyle(
css::uno::Reference< css::beans::XPropertySet > const & xProps ); css::uno::Reference< css::beans::XPropertySet > const & xProps );
bool importBorderStyle( void importBorderStyle(
css::uno::Reference< css::beans::XPropertySet > const & xProps ); css::uno::Reference< css::beans::XPropertySet > const & xProps );
bool importVisualEffectStyle( void importVisualEffectStyle(
css::uno::Reference< css::beans::XPropertySet > const & xProps ); css::uno::Reference< css::beans::XPropertySet > const & xProps );
StyleElement( StyleElement(
......
...@@ -125,7 +125,7 @@ OUString ControlElement::getControlModelName( ...@@ -125,7 +125,7 @@ OUString ControlElement::getControlModelName(
return aModel; return aModel;
} }
bool StyleElement::importTextColorStyle( void StyleElement::importTextColorStyle(
Reference< beans::XPropertySet > const & xProps ) Reference< beans::XPropertySet > const & xProps )
{ {
if ((_inited & 0x2) != 0) if ((_inited & 0x2) != 0)
...@@ -133,9 +133,8 @@ bool StyleElement::importTextColorStyle( ...@@ -133,9 +133,8 @@ bool StyleElement::importTextColorStyle(
if ((_hasValue & 0x2) != 0) if ((_hasValue & 0x2) != 0)
{ {
xProps->setPropertyValue("TextColor", makeAny( _textColor ) ); xProps->setPropertyValue("TextColor", makeAny( _textColor ) );
return true;
} }
return false; return;
} }
_inited |= 0x2; _inited |= 0x2;
...@@ -143,12 +142,11 @@ bool StyleElement::importTextColorStyle( ...@@ -143,12 +142,11 @@ bool StyleElement::importTextColorStyle(
{ {
_hasValue |= 0x2; _hasValue |= 0x2;
xProps->setPropertyValue( "TextColor", makeAny( _textColor ) ); xProps->setPropertyValue( "TextColor", makeAny( _textColor ) );
return true; return;
} }
return false;
} }
bool StyleElement::importTextLineColorStyle( void StyleElement::importTextLineColorStyle(
Reference< beans::XPropertySet > const & xProps ) Reference< beans::XPropertySet > const & xProps )
{ {
if ((_inited & 0x20) != 0) if ((_inited & 0x20) != 0)
...@@ -156,9 +154,8 @@ bool StyleElement::importTextLineColorStyle( ...@@ -156,9 +154,8 @@ bool StyleElement::importTextLineColorStyle(
if ((_hasValue & 0x20) != 0) if ((_hasValue & 0x20) != 0)
{ {
xProps->setPropertyValue( "TextLineColor", makeAny( _textLineColor ) ); xProps->setPropertyValue( "TextLineColor", makeAny( _textLineColor ) );
return true;
} }
return false; return;
} }
_inited |= 0x20; _inited |= 0x20;
...@@ -166,12 +163,10 @@ bool StyleElement::importTextLineColorStyle( ...@@ -166,12 +163,10 @@ bool StyleElement::importTextLineColorStyle(
{ {
_hasValue |= 0x20; _hasValue |= 0x20;
xProps->setPropertyValue( "TextLineColor", makeAny( _textLineColor ) ); xProps->setPropertyValue( "TextLineColor", makeAny( _textLineColor ) );
return true;
} }
return false;
} }
bool StyleElement::importFillColorStyle( void StyleElement::importFillColorStyle(
Reference< beans::XPropertySet > const & xProps ) Reference< beans::XPropertySet > const & xProps )
{ {
if ((_inited & 0x10) != 0) if ((_inited & 0x10) != 0)
...@@ -179,9 +174,8 @@ bool StyleElement::importFillColorStyle( ...@@ -179,9 +174,8 @@ bool StyleElement::importFillColorStyle(
if ((_hasValue & 0x10) != 0) if ((_hasValue & 0x10) != 0)
{ {
xProps->setPropertyValue( "FillColor", makeAny( _fillColor ) ); xProps->setPropertyValue( "FillColor", makeAny( _fillColor ) );
return true;
} }
return false; return;
} }
_inited |= 0x10; _inited |= 0x10;
...@@ -189,12 +183,10 @@ bool StyleElement::importFillColorStyle( ...@@ -189,12 +183,10 @@ bool StyleElement::importFillColorStyle(
{ {
_hasValue |= 0x10; _hasValue |= 0x10;
xProps->setPropertyValue( "FillColor", makeAny( _fillColor ) ); xProps->setPropertyValue( "FillColor", makeAny( _fillColor ) );
return true;
} }
return false;
} }
bool StyleElement::importBackgroundColorStyle( void StyleElement::importBackgroundColorStyle(
Reference< beans::XPropertySet > const & xProps ) Reference< beans::XPropertySet > const & xProps )
{ {
if ((_inited & 0x1) != 0) if ((_inited & 0x1) != 0)
...@@ -202,9 +194,8 @@ bool StyleElement::importBackgroundColorStyle( ...@@ -202,9 +194,8 @@ bool StyleElement::importBackgroundColorStyle(
if ((_hasValue & 0x1) != 0) if ((_hasValue & 0x1) != 0)
{ {
xProps->setPropertyValue( "BackgroundColor", makeAny( _backgroundColor ) ); xProps->setPropertyValue( "BackgroundColor", makeAny( _backgroundColor ) );
return true;
} }
return false; return;
} }
_inited |= 0x1; _inited |= 0x1;
...@@ -212,12 +203,10 @@ bool StyleElement::importBackgroundColorStyle( ...@@ -212,12 +203,10 @@ bool StyleElement::importBackgroundColorStyle(
{ {
_hasValue |= 0x1; _hasValue |= 0x1;
xProps->setPropertyValue( "BackgroundColor", makeAny( _backgroundColor ) ); xProps->setPropertyValue( "BackgroundColor", makeAny( _backgroundColor ) );
return true;
} }
return false;
} }
bool StyleElement::importBorderStyle( void StyleElement::importBorderStyle(
Reference< beans::XPropertySet > const & xProps ) Reference< beans::XPropertySet > const & xProps )
{ {
if ((_inited & 0x4) != 0) if ((_inited & 0x4) != 0)
...@@ -227,9 +216,8 @@ bool StyleElement::importBorderStyle( ...@@ -227,9 +216,8 @@ bool StyleElement::importBorderStyle(
xProps->setPropertyValue( "Border", makeAny( _border == BORDER_SIMPLE_COLOR ? BORDER_SIMPLE : _border ) ); xProps->setPropertyValue( "Border", makeAny( _border == BORDER_SIMPLE_COLOR ? BORDER_SIMPLE : _border ) );
if (_border == BORDER_SIMPLE_COLOR) if (_border == BORDER_SIMPLE_COLOR)
xProps->setPropertyValue( "BorderColor", makeAny(_borderColor) ); xProps->setPropertyValue( "BorderColor", makeAny(_borderColor) );
return true;
} }
return false; return;
} }
_inited |= 0x4; _inited |= 0x4;
...@@ -250,10 +238,9 @@ bool StyleElement::importBorderStyle( ...@@ -250,10 +238,9 @@ bool StyleElement::importBorderStyle(
_hasValue |= 0x4; _hasValue |= 0x4;
importBorderStyle(xProps); // write values importBorderStyle(xProps); // write values
} }
return false;
} }
bool StyleElement::importVisualEffectStyle( void StyleElement::importVisualEffectStyle(
Reference<beans::XPropertySet> const & xProps ) Reference<beans::XPropertySet> const & xProps )
{ {
if ((_inited & 0x40) != 0) if ((_inited & 0x40) != 0)
...@@ -261,9 +248,8 @@ bool StyleElement::importVisualEffectStyle( ...@@ -261,9 +248,8 @@ bool StyleElement::importVisualEffectStyle(
if ((_hasValue & 0x40) != 0) if ((_hasValue & 0x40) != 0)
{ {
xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) ); xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) );
return true;
} }
return false; return;
} }
_inited |= 0x40; _inited |= 0x40;
...@@ -288,7 +274,6 @@ bool StyleElement::importVisualEffectStyle( ...@@ -288,7 +274,6 @@ bool StyleElement::importVisualEffectStyle(
_hasValue |= 0x40; _hasValue |= 0x40;
xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) ); xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) );
} }
return false;
} }
void StyleElement::setFontProperties( void StyleElement::setFontProperties(
...@@ -299,7 +284,7 @@ void StyleElement::setFontProperties( ...@@ -299,7 +284,7 @@ void StyleElement::setFontProperties(
xProps->setPropertyValue("FontRelief", makeAny( _fontRelief ) ); xProps->setPropertyValue("FontRelief", makeAny( _fontRelief ) );
} }
bool StyleElement::importFontStyle( void StyleElement::importFontStyle(
Reference< beans::XPropertySet > const & xProps ) Reference< beans::XPropertySet > const & xProps )
{ {
if ((_inited & 0x8) != 0) if ((_inited & 0x8) != 0)
...@@ -307,9 +292,8 @@ bool StyleElement::importFontStyle( ...@@ -307,9 +292,8 @@ bool StyleElement::importFontStyle(
if ((_hasValue & 0x8) != 0) if ((_hasValue & 0x8) != 0)
{ {
setFontProperties( xProps ); setFontProperties( xProps );
return true;
} }
return false; return;
} }
_inited |= 0x8; _inited |= 0x8;
...@@ -681,8 +665,6 @@ bool StyleElement::importFontStyle( ...@@ -681,8 +665,6 @@ bool StyleElement::importFontStyle(
_hasValue |= 0x8; _hasValue |= 0x8;
setFontProperties( xProps ); setFontProperties( xProps );
} }
return bFontImport;
} }
bool ImportContext::importStringProperty( bool ImportContext::importStringProperty(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment