diff options
author | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-08-15 19:09:49 +0200 |
---|---|---|
committer | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-08-19 21:57:06 +0200 |
commit | 15295ab6db7cb46ea5f155d33a08027c62fb0e41 (patch) | |
tree | 89ad8ebaee3f7821299b944c378d60a11aa20d64 /sw/inc | |
parent | 5a05115ee25683b5fc7c79ab418eaeed120bd3b0 (diff) |
Refactored SwDoc::GetEditShell .
Removed its output paramater as GetCurrentViewShell should be
used instead and added a const version.
Change-Id: Iad8b57553b6e93e3472ce8c6905d08e8d49af770
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/doc.hxx | 9 | ||||
-rw-r--r-- | sw/inc/node.hxx | 2 | ||||
-rw-r--r-- | sw/inc/txtinet.hxx | 6 |
3 files changed, 12 insertions, 5 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 4a57c9b30110..1fbb20693e1d 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -441,7 +441,7 @@ private: const SwTxtFmtColl* pSplitColl, int nOutlineLevel = 0 ); // Update charts of given table. - void _UpdateCharts( const SwTable& rTbl, SwViewShell& rVSh ) const; + void _UpdateCharts( const SwTable& rTbl, SwViewShell const & rVSh ) const; bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry, sal_uInt16 nMode ); @@ -1342,8 +1342,9 @@ public: const SwAttrPool& GetAttrPool() const { return *mpAttrPool; } SwAttrPool& GetAttrPool() { return *mpAttrPool; } - // Search an EditShell or, if appropriate, a SwViewShell via layout. - SwEditShell* GetEditShell( SwViewShell** ppSh = 0 ) const; + // Search for an EditShell. + SwEditShell const * GetEditShell() const; + SwEditShell* GetEditShell(); ::sw::IShellCursorSupplier * GetIShellCursorSupplier(); // OLE 2.0-notification. @@ -1410,7 +1411,7 @@ public: // Query if URL was visited. // Query via Doc, if only a Bookmark has been given. // In this case the document name has to be set in front. - bool IsVisitedURL( const OUString& rURL ) const; + bool IsVisitedURL( const OUString& rURL ); // Save current values for automatic registration of exceptions in Autocorrection. void SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew ); diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 03c28dcc1769..f83b80671522 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -257,7 +257,7 @@ public: IDocumentListItems& getIDocumentListItems(); /// Is node in the visible area of the Shell? - bool IsInVisibleArea( SwViewShell* pSh = 0 ) const; + bool IsInVisibleArea( SwViewShell const * pSh = 0 ) const; /// Is node in an protected area? bool IsInProtectSect() const; /** Is node in something that is protected (range, frame, diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx index 341762d4f8b5..8e70df02e96c 100644 --- a/sw/inc/txtinet.hxx +++ b/sw/inc/txtinet.hxx @@ -47,6 +47,7 @@ public: // get and set TxtNode pointer const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; } inline const SwTxtNode& GetTxtNode() const; + inline SwTxtNode& GetTxtNode(); void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; } SwCharFmt* GetCharFmt(); @@ -68,6 +69,11 @@ inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const return *m_pTxtNode; } +inline SwTxtNode& SwTxtINetFmt::GetTxtNode() +{ + return const_cast<SwTxtNode&>( const_cast<SwTxtINetFmt const*>(this)->GetTxtNode() ); +} + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |