summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2018-04-15 12:33:03 +0300
committerMuhammet Kara <muhammet.kara@pardus.org.tr>2018-04-16 04:58:48 +0200
commit9c4eaa7b81a40d97fe49b85272b40bfeaaf44f86 (patch)
treecb3f70c3a06b3c97b4fea3d9d70e81a1aa0ff9bc /desktop
parentd246aa574571409046619254292698184c2545a3 (diff)
cppcheck: variableScope & unreadVariable
Change-Id: Iaa3adc54d547e243b977a562fa4dbc2b9b9c6592 Reviewed-on: https://gerrit.libreoffice.org/52905 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6e4d1cff8556..07c2226c8717 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2841,7 +2841,6 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand)
// Header & Footer Styles
{
OUString sName;
- bool bIsPhysical;
boost::property_tree::ptree aChild;
boost::property_tree::ptree aChildren;
const OUString sPageStyles("PageStyles");
@@ -2853,6 +2852,7 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand)
uno::Sequence<OUString> aSeqNames = xContainer->getElementNames();
for (sal_Int32 itName = 0; itName < aSeqNames.getLength(); itName++)
{
+ bool bIsPhysical;
sName = aSeqNames[itName];
xProperty.set(xContainer->getByName(sName), uno::UNO_QUERY);
if (xProperty.is() && (xProperty->getPropertyValue("IsPhysical") >>= bIsPhysical) && bIsPhysical)
@@ -2861,8 +2861,6 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand)
aChild.put("", sName.toUtf8());
aChildren.push_back(std::make_pair("", aChild));
}
- else
- bIsPhysical = false;
}
aValues.add_child("HeaderFooter", aChildren);
}