Kaydet (Commit) 228e3408 authored tarafından Michael Stahl's avatar Michael Stahl

sw: replace boost::ptr_vector with std::vector<std::unique_ptr>

Change-Id: I91f8fa3097c216230e4a9eaf1339157dd85bfdfc
üst 86043a2f
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
#include "swcss1.hxx" #include "swcss1.hxx"
#include <numrule.hxx> #include <numrule.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#define NETSCAPE_DFLT_BORDER 1 #define NETSCAPE_DFLT_BORDER 1
#define NETSCAPE_DFLT_CELLSPACING 2 #define NETSCAPE_DFLT_CELLSPACING 2
......
...@@ -664,18 +664,18 @@ bool SvxCSS1Parser::SelectorParsed( CSS1Selector *pSelector, bool bFirst ) ...@@ -664,18 +664,18 @@ bool SvxCSS1Parser::SelectorParsed( CSS1Selector *pSelector, bool bFirst )
{ {
OSL_ENSURE( pSheetItemSet, "Where is the Item-Set for Style-Sheets?" ); OSL_ENSURE( pSheetItemSet, "Where is the Item-Set for Style-Sheets?" );
for (size_t i = 0; i < aSelectors.size(); ++i) for (size_t i = 0; i < m_Selectors.size(); ++i)
{ {
StyleParsed( &aSelectors[i], *pSheetItemSet, *pSheetPropInfo ); StyleParsed(m_Selectors[i].get(), *pSheetItemSet, *pSheetPropInfo);
} }
pSheetItemSet->ClearItem(); pSheetItemSet->ClearItem();
pSheetPropInfo->Clear(); pSheetPropInfo->Clear();
// und die naechste Rule vorbereiten // und die naechste Rule vorbereiten
aSelectors.clear(); m_Selectors.clear();
} }
aSelectors.push_back(pSelector); m_Selectors.push_back(std::unique_ptr<CSS1Selector>(pSelector));
return false; // den Selektor haben wir gespeichert. Loeschen toedlich! return false; // den Selektor haben wir gespeichert. Loeschen toedlich!
} }
...@@ -828,13 +828,13 @@ bool SvxCSS1Parser::ParseStyleSheet( const OUString& rIn ) ...@@ -828,13 +828,13 @@ bool SvxCSS1Parser::ParseStyleSheet( const OUString& rIn )
bool bSuccess = CSS1Parser::ParseStyleSheet( rIn ); bool bSuccess = CSS1Parser::ParseStyleSheet( rIn );
for (size_t i = 0; i < aSelectors.size(); ++i) for (size_t i = 0; i < m_Selectors.size(); ++i)
{ {
StyleParsed( &aSelectors[i], *pSheetItemSet, *pSheetPropInfo ); StyleParsed(m_Selectors[i].get(), *pSheetItemSet, *pSheetPropInfo);
} }
// und etwas aufrauemen // und etwas aufrauemen
aSelectors.clear(); m_Selectors.clear();
pSheetItemSet->ClearItem(); pSheetItemSet->ClearItem();
pSheetPropInfo->Clear(); pSheetPropInfo->Clear();
......
...@@ -24,9 +24,8 @@ ...@@ -24,9 +24,8 @@
#include <rtl/textenc.h> #include <rtl/textenc.h>
#include "parcss1.hxx" #include "parcss1.hxx"
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory> #include <memory>
#include <vector>
#include <map> #include <map>
class SfxItemPool; class SfxItemPool;
...@@ -178,9 +177,9 @@ public: ...@@ -178,9 +177,9 @@ public:
class SvxCSS1Parser : public CSS1Parser class SvxCSS1Parser : public CSS1Parser
{ {
typedef ::boost::ptr_vector<CSS1Selector> CSS1Selectors; typedef ::std::vector<std::unique_ptr<CSS1Selector>> CSS1Selectors;
typedef ::std::map<OUString, std::unique_ptr<SvxCSS1MapEntry>> CSS1Map; typedef ::std::map<OUString, std::unique_ptr<SvxCSS1MapEntry>> CSS1Map;
CSS1Selectors aSelectors; // Liste der "offenen" Selectoren CSS1Selectors m_Selectors; // List of "open" Selectors
CSS1Map m_Ids; CSS1Map m_Ids;
CSS1Map m_Classes; CSS1Map m_Classes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment