[Libreoffice-commits] core.git: 2 commits - filter/source sw/source
Caolán McNamara
caolanm at redhat.com
Fri Apr 11 12:27:59 PDT 2014
filter/source/graphicfilter/epgm/epgm.cxx | 6 +++---
sw/source/core/doc/doc.cxx | 21 ++++++++++-----------
2 files changed, 13 insertions(+), 14 deletions(-)
New commits:
commit 36c84fa3fbd03e5f651ba9d81e321566c8fcdbd0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 11 20:21:53 2014 +0100
restore original lock status of SwViewShell in correct order
in e12184393f0591b5c5d9218062cc0a4bced6d4e6 "Resolves: rhbz#1081176: don't jump
to cursor pos" for some reason I collect the old state of the various
SwViewShells and then restore them in the opposite order.
Change-Id: Ibb7bcfb07cf5038dd2e9acbac26b3246ff483a92
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index cd046df..ff9c320 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1657,7 +1657,7 @@ namespace
{
class LockAllViews
{
- std::stack<bool> m_aViewWasLocked;
+ std::vector<SwViewShell*> m_aViewWasUnLocked;
SwViewShell* m_pViewShell;
public:
LockAllViews(SwViewShell *pViewShell)
@@ -1668,22 +1668,21 @@ namespace
SwViewShell *pSh = m_pViewShell;
do
{
- m_aViewWasLocked.push(pSh->IsViewLocked());
- pSh->LockView(true);
+ if (!pSh->IsViewLocked())
+ {
+ m_aViewWasUnLocked.push_back(pSh);
+ pSh->LockView(true);
+ }
pSh = (SwViewShell*)pSh->GetNext();
} while (pSh != m_pViewShell);
}
~LockAllViews()
{
- if (!m_pViewShell)
- return;
- SwViewShell *pSh = m_pViewShell;
- do
+ for (std::vector<SwViewShell*>::iterator aI = m_aViewWasUnLocked.begin(); aI != m_aViewWasUnLocked.end(); ++aI)
{
- pSh->LockView(m_aViewWasLocked.top());
- m_aViewWasLocked.pop();
- pSh = (SwViewShell*)pSh->GetNext();
- } while (pSh != m_pViewShell);
+ SwViewShell *pSh = *aI;
+ pSh->LockView(false);
+ }
}
};
}
commit ffa82c4d148bb01a418d271b3265a35d26df1580
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 11 17:11:53 2014 +0100
coverity#738630 Uninitialized scalar field
Change-Id: Ie6b6347a8cdddfcf6b1aada2aa5c34b94cc73490
diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx
index 47c20d9..65c4145 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -54,16 +54,16 @@ public:
};
//=================== Methoden von PGMWriter ==============================
-
PGMWriter::PGMWriter(SvStream &rStream)
: m_rOStm(rStream)
, mbStatus(sal_True)
+ , mnMode(0)
, mpAcc(NULL)
+ , mnWidth(0)
+ , mnHeight(0)
{
}
-
-
PGMWriter::~PGMWriter()
{
}
More information about the Libreoffice-commits
mailing list