[Libreoffice-commits] core.git: 4 commits - writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Apr 15 00:44:06 PDT 2015
writerfilter/source/dmapper/BorderHandler.hxx | 2 +-
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 4 ++--
writerfilter/source/dmapper/NumberingManager.cxx | 2 +-
writerfilter/source/dmapper/PropertyMap.cxx | 2 +-
writerfilter/source/dmapper/StyleSheetTable.cxx | 2 +-
writerfilter/source/dmapper/TDefTableHandler.cxx | 8 +++-----
writerfilter/source/dmapper/TDefTableHandler.hxx | 4 +---
writerfilter/source/dmapper/TablePropertiesHandler.cxx | 9 ++++-----
writerfilter/source/dmapper/TablePropertiesHandler.hxx | 3 +--
writerfilter/source/dmapper/TblStylePrHandler.cxx | 2 +-
10 files changed, 16 insertions(+), 22 deletions(-)
New commits:
commit 6a09822d28750e23ef6514dfa831e151803c517d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Apr 15 09:18:43 2015 +0200
writerfilter: reduce scope in ListsManager
Change-Id: Ibc2fa865614df44088883acee4a2c87a3fb19279
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index ce5628e..e341ff9 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -829,7 +829,6 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal )
void ListsManager::lcl_sprm( Sprm& rSprm )
{
- static bool bIsStartVisited = false;
//fill the attributes of the style sheet
sal_uInt32 nSprmId = rSprm.getId();
if( m_pCurrentDefinition.get() ||
@@ -838,6 +837,7 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
(nSprmId == NS_ooxml::LN_CT_NumPicBullet_pict && m_pCurrentNumPicBullet.get()) ||
nSprmId == NS_ooxml::LN_CT_Numbering_numPicBullet)
{
+ static bool bIsStartVisited = false;
sal_Int32 nIntValue = rSprm.getValue()->getInt();
switch( nSprmId )
{
commit 53cf9748ccce3660ec3a5b0ad8ad402313af6143
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Apr 15 09:17:19 2015 +0200
writerfilter: TDefTableHandler's bOOXML was always true
Change-Id: I9efcb32f742aa7a0549ceb246a1b75fa3af662be
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index f10718a..a345fdd 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -244,7 +244,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
- TDefTableHandlerPtr pTDefTableHandler( new TDefTableHandler(true) );
+ TDefTableHandlerPtr pTDefTableHandler( new TDefTableHandler() );
pProperties->resolve( *pTDefTableHandler );
TablePropertyMapPtr pRowPropMap( new TablePropertyMap );
diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx
index 658bea6..18746ce 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.cxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.cxx
@@ -34,13 +34,12 @@ using namespace ::com::sun::star;
-TDefTableHandler::TDefTableHandler(bool bOOXML) :
+TDefTableHandler::TDefTableHandler() :
LoggedProperties(dmapper_logger, "TDefTableHandler"),
m_nLineWidth(0),
m_nLineType(0),
m_nLineColor(0),
-m_nLineDistance(0),
-m_bOOXML( bOOXML )
+m_nLineDistance(0)
{
}
@@ -330,8 +329,7 @@ void TDefTableHandler::localResolve(Id rName, writerfilter::Reference<Properties
}
pProperties->resolve( *this );
table::BorderLine2 aBorderLine;
- ConversionHelper::MakeBorderLine( m_nLineWidth, m_nLineType, m_nLineColor,
- aBorderLine, m_bOOXML );
+ ConversionHelper::MakeBorderLine(m_nLineWidth, m_nLineType, m_nLineColor, aBorderLine, /*bIsOOXML=*/true);
const bool rtl = false; // TODO
switch( rName )
{
diff --git a/writerfilter/source/dmapper/TDefTableHandler.hxx b/writerfilter/source/dmapper/TDefTableHandler.hxx
index eb6b37b..65a6f56 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.hxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.hxx
@@ -59,8 +59,6 @@ private:
sal_Int32 m_nLineColor;
sal_Int32 m_nLineDistance;
- bool m_bOOXML;
-
OUString m_aInteropGrabBagName;
std::vector<css::beans::PropertyValue> m_aInteropGrabBag;
void appendGrabBag(const OUString& aKey, const OUString& aValue);
@@ -72,7 +70,7 @@ private:
virtual void lcl_sprm(Sprm & sprm) SAL_OVERRIDE;
public:
- TDefTableHandler( bool bOOXML );
+ TDefTableHandler();
virtual ~TDefTableHandler();
size_t getCellCount() const;
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
index 2ff85f2..ac56304 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
@@ -265,7 +265,7 @@ namespace dmapper {
if( pProperties.get())
{
//in OOXML there's one set of borders at each cell (if there is any)
- TDefTableHandlerPtr pTDefTableHandler( new TDefTableHandler(true));
+ TDefTableHandlerPtr pTDefTableHandler( new TDefTableHandler());
if (m_pCurrentInteropGrabBag)
pTDefTableHandler->enableInteropGrabBag("tcBorders");
pProperties->resolve( *pTDefTableHandler );
commit 6000b1599bc2c574b49d8f7d4fae2c3366009101
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Apr 15 09:13:54 2015 +0200
writerfilter: TablePropertiesHandler's bOOXML was always true
Change-Id: I8b1e05c6f685ea32a3c29a4636be4bc4894d7de0
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 8c674fd..f10718a 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -60,7 +60,7 @@ DomainMapperTableManager::DomainMapperTableManager() :
m_bTableSizeTypeInserted(false),
m_nLayoutType(0),
m_nMaxFixedWidth(0),
- m_pTablePropsHandler( new TablePropertiesHandler( true ) )
+ m_pTablePropsHandler(new TablePropertiesHandler())
{
m_pTablePropsHandler->SetTableManager( this );
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 6e8c51b..21bb8f7 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -753,7 +753,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
if (!m_pImpl->m_pCurrentEntry)
break;
- TablePropertiesHandlerPtr pTblHandler( new TablePropertiesHandler( true ) );
+ TablePropertiesHandlerPtr pTblHandler(new TablePropertiesHandler());
pTblHandler->SetProperties( m_pImpl->m_pCurrentEntry->pProperties );
if ( !pTblHandler->sprm( rSprm ) )
{
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
index 202be04..2ff85f2 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
@@ -41,10 +41,9 @@ using namespace oox;
namespace writerfilter {
namespace dmapper {
- TablePropertiesHandler::TablePropertiesHandler( bool bOOXML ) :
+ TablePropertiesHandler::TablePropertiesHandler() :
m_pCurrentInteropGrabBag(nullptr),
- m_pTableManager( nullptr ),
- m_bOOXML( bOOXML )
+ m_pTableManager( nullptr )
{
}
@@ -236,7 +235,7 @@ namespace dmapper {
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
- BorderHandlerPtr pBorderHandler( new BorderHandler(m_bOOXML) );
+ BorderHandlerPtr pBorderHandler(new BorderHandler(true));
if (m_pCurrentInteropGrabBag)
pBorderHandler->enableInteropGrabBag("tblBorders");
pProperties->resolve(*pBorderHandler);
@@ -266,7 +265,7 @@ namespace dmapper {
if( pProperties.get())
{
//in OOXML there's one set of borders at each cell (if there is any)
- TDefTableHandlerPtr pTDefTableHandler( new TDefTableHandler( m_bOOXML ));
+ TDefTableHandlerPtr pTDefTableHandler( new TDefTableHandler(true));
if (m_pCurrentInteropGrabBag)
pTDefTableHandler->enableInteropGrabBag("tcBorders");
pProperties->resolve( *pTDefTableHandler );
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.hxx b/writerfilter/source/dmapper/TablePropertiesHandler.hxx
index cdca8cb..305c757 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.hxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.hxx
@@ -41,10 +41,9 @@ private:
PropertyMapPtr m_pCurrentProperties;
std::vector<css::beans::PropertyValue>* m_pCurrentInteropGrabBag;
TableManager* m_pTableManager;
- bool m_bOOXML;
public:
- TablePropertiesHandler( bool bOOXML );
+ TablePropertiesHandler();
virtual ~TablePropertiesHandler( );
bool sprm(Sprm & sprm);
diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx
index 7b60afc..1bd6a6d 100644
--- a/writerfilter/source/dmapper/TblStylePrHandler.cxx
+++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx
@@ -32,7 +32,7 @@ namespace dmapper {
TblStylePrHandler::TblStylePrHandler( DomainMapper & rDMapper ) :
LoggedProperties(dmapper_logger, "TblStylePrHandler"),
m_rDMapper( rDMapper ),
-m_pTablePropsHandler( new TablePropertiesHandler( true ) ),
+m_pTablePropsHandler(new TablePropertiesHandler()),
m_nType( TBL_STYLE_UNKNOWN ),
m_pProperties( new PropertyMap )
{
commit 94049602fd17d82f203dacd33c21120aa565bc11
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Apr 15 09:05:41 2015 +0200
writerfilter: these ctors can be explicit
Change-Id: I8f974bcc329267dcb707caa3b883fb748276433c
diff --git a/writerfilter/source/dmapper/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx
index 602e2fe..07b5b19 100644
--- a/writerfilter/source/dmapper/BorderHandler.hxx
+++ b/writerfilter/source/dmapper/BorderHandler.hxx
@@ -65,7 +65,7 @@ private:
virtual void lcl_sprm(Sprm & sprm) SAL_OVERRIDE;
public:
- BorderHandler( bool bOOXML );
+ explicit BorderHandler( bool bOOXML );
virtual ~BorderHandler();
::std::shared_ptr<PropertyMap> getProperties();
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 261e5d2..6b3a76d 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1305,7 +1305,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
class NamedPropertyValue {
OUString m_aName;
public:
- NamedPropertyValue(const OUString& i_aStr)
+ explicit NamedPropertyValue(const OUString& i_aStr)
: m_aName(i_aStr) { }
bool operator() (beans::PropertyValue& aVal)
{ return aVal.Name == m_aName; }
More information about the Libreoffice-commits
mailing list