summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-25 14:49:14 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-25 14:59:07 +0000
commit9bc5d4cdf010091406091875e6c45d975ebc9708 (patch)
tree9c4230d1057242147f5b136de847b1df61cd7117 /sw
parent2a0ad98ba798a280de649e17fb7212f6b4077917 (diff)
re org things a little to quieten coverity warnings
Change-Id: I3bf0840f6428ee8cefd424a486cc2f5fcfda290f
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/accmap.hxx7
-rw-r--r--sw/source/core/access/accdoc.cxx2
-rw-r--r--sw/source/core/access/accmap.cxx4
-rw-r--r--sw/source/uibase/app/swdll.cxx7
-rw-r--r--sw/source/uibase/app/swdllimpl.hxx3
5 files changed, 17 insertions, 6 deletions
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 05240c9169d9..814b210460ed 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -119,7 +119,10 @@ class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder,
//mpSelectedFrameMap contains the old selected objects.
SwAccessibleContextMap_Impl *mpSeletedFrameMap;
- //IvalidateShapeInParaSelection() method is responsible for the updating the selected states of the objects.
+
+ OUString maDocName;
+
+ //InvalidateShapeInParaSelection() method is responsible for the updating the selected states of the objects.
void InvalidateShapeInParaSelection();
void InvalidateRelationSet_( const SwFrame* pFrame, bool bFrom );
@@ -261,6 +264,8 @@ public:
void FireEvents();
+ const OUString& GetDocName() const { return maDocName; }
+
// IAccessibleViewForwarder
virtual Rectangle GetVisibleArea() const override;
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 9e5f0e0eaac3..94131d5eeed5 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -338,7 +338,7 @@ SwAccessibleDocument::SwAccessibleDocument ( SwAccessibleMap* pInitMap ) :
SwAccessibleDocumentBase( pInitMap ),
maSelectionHelper( *this )
{
- SetName( GetResource( STR_ACCESS_DOC_NAME ) );
+ SetName(pInitMap->GetDocName());
vcl::Window *pWin = pInitMap->GetShell()->GetWin();
if( pWin )
{
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 3c484701c717..d47e20d5e470 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -30,6 +30,7 @@
#include <accmap.hxx>
#include <acccontext.hxx>
#include <accdoc.hxx>
+#include <access.hrc>
#include <accpreview.hxx>
#include <accpage.hxx>
#include <accpara.hxx>
@@ -1641,7 +1642,8 @@ SwAccessibleMap::SwAccessibleMap( SwViewShell *pSh ) :
mpVSh( pSh ),
mpPreview( nullptr ),
mbShapeSelected( false ),
- mpSeletedFrameMap(nullptr)
+ mpSeletedFrameMap(nullptr),
+ maDocName(SwAccessibleContext::GetResource(STR_ACCESS_DOC_NAME))
{
pSh->GetLayout()->AddAccessibleShell();
}
diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx
index 609b4add0b77..549df9b99a4e 100644
--- a/sw/source/uibase/app/swdll.cxx
+++ b/sw/source/uibase/app/swdll.cxx
@@ -80,6 +80,7 @@ namespace SwGlobals
}
SwDLL::SwDLL()
+ : m_pAutoCorrCfg(nullptr)
{
if ( SfxApplication::GetModule(SfxToolsModule::Writer) ) // Module already active
return;
@@ -146,16 +147,16 @@ SwDLL::SwDLL()
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
const SvxAutoCorrect* pOld = rACfg.GetAutoCorrect();
rACfg.SetAutoCorrect(new SwAutoCorrect( *pOld ));
+ m_pAutoCorrCfg = &rACfg;
}
}
SwDLL::~SwDLL()
{
- if (!utl::ConfigManager::IsAvoidConfig())
+ if (m_pAutoCorrCfg)
{
// fdo#86494 SwAutoCorrect must be deleted before FinitCore
- SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
- rACfg.SetAutoCorrect(nullptr); // delete SwAutoCorrect before exit handlers
+ m_pAutoCorrCfg->SetAutoCorrect(nullptr); // delete SwAutoCorrect before exit handlers
}
// Pool has to be deleted before statics are
diff --git a/sw/source/uibase/app/swdllimpl.hxx b/sw/source/uibase/app/swdllimpl.hxx
index 57a34bed2c81..8f6707fe7b26 100644
--- a/sw/source/uibase/app/swdllimpl.hxx
+++ b/sw/source/uibase/app/swdllimpl.hxx
@@ -16,6 +16,8 @@
namespace sw { class Filters; }
+class SvxAutoCorrCfg;
+
class SwDLL
{
public:
@@ -33,6 +35,7 @@ private:
SwDLL& operator=(SwDLL const&) = delete;
std::unique_ptr< sw::Filters > filters_;
+ SvxAutoCorrCfg *m_pAutoCorrCfg;
};
#endif