diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-11-12 15:50:57 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-11-12 15:50:57 +0100 |
commit | bb53686d60320700e7e93ac96821d1bae4ba2b06 (patch) | |
tree | 691e0419e104a9ae6044ffade5c24088d524f1fe | |
parent | 60822195d314075241c953c02e919ce8c7f6ed03 (diff) | |
parent | be0177fe4f91c2ea8022f931d99c6359f043043f (diff) |
Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/calc
-rw-r--r-- | sc/source/filter/inc/ftools.hxx | 11 | ||||
-rw-r--r-- | sc/source/filter/inc/xehelper.hxx | 16 | ||||
-rw-r--r-- | sc/source/filter/inc/xicontent.hxx | 26 | ||||
-rw-r--r-- | sc/source/filter/inc/xihelper.hxx | 15 | ||||
-rw-r--r-- | sc/source/filter/inc/xltools.hxx | 8 |
5 files changed, 60 insertions, 16 deletions
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx index f38fae15bd09..f287ac98d874 100644 --- a/sc/source/filter/inc/ftools.hxx +++ b/sc/source/filter/inc/ftools.hxx @@ -139,11 +139,6 @@ void insert_value( Type& rnBitField, InsertType nValue, sal_uInt8 nStartBit, sal // ============================================================================ -/** Deriving from this class prevents construction in general. */ -class ScfNoInstance : private boost::noncopyable {}; - -// ============================================================================ - /** Simple shared pointer (NOT thread-save, but faster than boost::shared_ptr). */ template< typename Type > class ScfRef @@ -258,7 +253,7 @@ class SotStorageStreamRef; class SvStream; /** Contains static methods used anywhere in the filters. */ -class ScfTools : ScfNoInstance +class ScfTools : boost::noncopyable { public: @@ -389,6 +384,10 @@ private: static const String& GetHTMLIndexPrefix(); /** Returns the prefix for table names. */ static const String& GetHTMLNamePrefix(); + /** We don't want anybody to instantiate this class, since it is just a + collection of static items. To enforce this, the default constructor + is made private */ + ScfTools(); }; // Containers ================================================================= diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx index 69259e3c50f6..3df5374cb5ce 100644 --- a/sc/source/filter/inc/xehelper.hxx +++ b/sc/source/filter/inc/xehelper.hxx @@ -220,7 +220,7 @@ class ScPatternAttr; /** This class provides methods to create an XclExpString. @descr The string can be created from an edit engine text object or directly from a Calc edit cell. */ -class XclExpStringHelper : ScfNoInstance +class XclExpStringHelper : boost::noncopyable { public: /** Creates a new unformatted string from the passed string. @@ -330,6 +330,12 @@ public: /** Returns the script type first text portion different to WEAK, or the system default script type, if there is only weak script in the passed string. */ static sal_Int16 GetLeadingScriptType( const XclExpRoot& rRoot, const String& rString ); + +private: + /** We don't want anybody to instantiate this class, since it is just a + collection of static methods. To enforce this, the default constructor + is made private */ + XclExpStringHelper(); }; // Header/footer conversion =================================================== @@ -398,7 +404,7 @@ private: /** This class contains static methods to encode a file URL. @descr Excel stores URLs in a format that contains special control characters, i.e. for directory separators or volume names. */ -class XclExpUrlHelper : ScfNoInstance +class XclExpUrlHelper : boost::noncopyable { public: /** Encodes and returns the URL passed in rAbsUrl to an Excel like URL. @@ -406,6 +412,12 @@ public: static String EncodeUrl( const XclExpRoot& rRoot, const String& rAbsUrl, const String* pTableName = 0 ); /** Encodes and returns the passed DDE link to an Excel like DDE link. */ static String EncodeDde( const String& rApplic, const String rTopic ); + +private: + /** We don't want anybody to instantiate this class, since it is just a + collection of static methods. To enforce this, the default constructor + is made private */ + XclExpUrlHelper(); }; // ---------------------------------------------------------------------------- diff --git a/sc/source/filter/inc/xicontent.hxx b/sc/source/filter/inc/xicontent.hxx index 71f5d9b5b815..5002e97faa61 100644 --- a/sc/source/filter/inc/xicontent.hxx +++ b/sc/source/filter/inc/xicontent.hxx @@ -40,7 +40,6 @@ #include <boost/ptr_container/ptr_vector.hpp> #include <boost/noncopyable.hpp> - /* ============================================================================ Classes to import the big Excel document contents (related to several cells or globals for the document). @@ -86,7 +85,7 @@ private: // Hyperlinks ================================================================= /** Provides importing hyperlinks and inserting them into a document. */ -class XclImpHyperlink : ScfNoInstance +class XclImpHyperlink : private boost::noncopyable { public: /** Reads a HLINK record and inserts it into the document. @@ -102,17 +101,29 @@ public: /** Convert the sheet name with invalid character(s) in URL when the URL is to a location within the same document (e.g. #'Sheet&Name'.A1). */ static void ConvertToValidTabName(String& rName); + +private: + /** We don't want anybody to instantiate this class, since it is just a + collection of static methods. To enforce this, the default constructor + is made private */ + XclImpHyperlink(); }; // Label ranges =============================================================== /** Provides importing label ranges and inserting them into a document. */ -class XclImpLabelranges : ScfNoInstance +class XclImpLabelranges : private boost::noncopyable { public: /** Reads a LABELRANGES record and inserts the label ranges into the document. @descr Import stream must be located at start of a LABELRANGES record. */ static void ReadLabelranges( XclImpStream& rStrm ); + +private: + /** We don't want anybody to instantiate this class, since it is just a + collection of static methods. To enforce this, the default constructor + is made private */ + XclImpLabelranges(); }; // Conditional formatting ===================================================== @@ -258,12 +269,18 @@ private: // Decryption ================================================================= /** Provides static functions to import stream decryption settings. */ -class XclImpDecryptHelper : ScfNoInstance +class XclImpDecryptHelper : private boost::noncopyable { public: /** Reads the FILEPASS record, queries a password and sets decryption algorihm. @return Error code that may cause an error message after import. */ static ErrCode ReadFilepass( XclImpStream& rStrm ); + +private: + /** We don't want anybody to instantiate this class, since it is just a + collection of static methods. To enforce this, the default constructor + is made private */ + XclImpDecryptHelper(); }; // ============================================================================ @@ -324,7 +341,6 @@ private: ProtectedSheetMap maProtectedSheets; }; - // ============================================================================ #endif diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx index eeb12e8691c7..f57145f370d9 100644 --- a/sc/source/filter/inc/xihelper.hxx +++ b/sc/source/filter/inc/xihelper.hxx @@ -112,7 +112,7 @@ class EditTextObject; /** This class provides methods to convert an XclImpString. @The string can be converted to an edit engine text object or directly to a Calc edit cell. */ -class XclImpStringHelper : ScfNoInstance +class XclImpStringHelper : boost::noncopyable { public: /** Returns a new edit engine text object. @@ -127,6 +127,11 @@ public: const XclImpRoot& rRoot, const XclImpString& rString, sal_uInt16 nXFIndex = 0 ); +private: + /** We don't want anybody to instantiate this class, since it is just a + collection of static methods. To enforce this, the default constructor + is made private */ + XclImpStringHelper(); }; // Header/footer conversion =================================================== @@ -251,7 +256,7 @@ private: /** This class contains static methods to decode an URL stored in an Excel file. @descr Excel URLs can contain a sheet name, for instance: path\[test.xls]Sheet1 This sheet name will be extracted automatically. */ -class XclImpUrlHelper : ScfNoInstance +class XclImpUrlHelper : boost::noncopyable { public: /** Decodes an encoded external document URL with optional sheet name. @@ -281,6 +286,12 @@ public: For OLE object links: Decodes to class name and document URL. @return true = decoding was successful, returned strings are valid (not empty). */ static bool DecodeLink( String& rApplic, String& rTopic, const String rEncUrl ); + +private: + /** We don't want anybody to instantiate this class, since it is just a + collection of static methods. To enforce this, the default constructor + is made private */ + XclImpUrlHelper(); }; // Cached values ============================================================== diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx index 7ae02d758151..b34cd4c3b8cf 100644 --- a/sc/source/filter/inc/xltools.hxx +++ b/sc/source/filter/inc/xltools.hxx @@ -31,6 +31,7 @@ #include "address.hxx" #include "ftools.hxx" +#include <boost/noncopyable.hpp> class SfxObjectShell; @@ -89,7 +90,7 @@ class SvStream; class ScDocument; /** This class contains static helper methods for the Excel import and export filters. */ -class XclTools : ScfNoInstance +class XclTools : boost::noncopyable { public: // GUID's ----------------------------------------------------------------- @@ -250,6 +251,11 @@ private: static const String maCFStyleNamePrefix2; /// Prefix for cond. formatting style names from OOX filter. static const ::rtl::OUString maSbMacroPrefix; /// Prefix for StarBasic macros. static const ::rtl::OUString maSbMacroSuffix; /// Suffix for StarBasic macros. + + /** We don't want anybody to instantiate this class, since it is just a + collection of static items. To enforce this, the default constructor + is made private */ + XclTools(); }; // read/write colors ---------------------------------------------------------- |