Kaydet (Commit) 6023347a authored tarafından Miklos Vajna's avatar Miklos Vajna

resolveSprmProps() is used only in dmapper

Change-Id: I24227d700830a227ed8aa780b3b9e15c57b46f6e
üst 68a5ae93
...@@ -126,7 +126,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\ ...@@ -126,7 +126,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
writerfilter/source/ooxml/OOXMLPropertySetImpl \ writerfilter/source/ooxml/OOXMLPropertySetImpl \
writerfilter/source/ooxml/OOXMLStreamImpl \ writerfilter/source/ooxml/OOXMLStreamImpl \
writerfilter/source/ooxml/qnametostrcore \ writerfilter/source/ooxml/qnametostrcore \
writerfilter/source/resourcemodel/ResourceModelHelper \
)) ))
$(eval $(call gb_Library_add_generated_exception_objects,writerfilter,\ $(eval $(call gb_Library_add_generated_exception_objects,writerfilter,\
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_RESOURCEMODELHELPER_HXX
#define INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_RESOURCEMODELHELPER_HXX
#include <resourcemodel/WW8ResourceModel.hxx>
namespace writerfilter {
namespace resourcemodel {
void resolveSprmProps(Properties & rHandler, Sprm & rSprm);
}}
#endif // INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_RESOURCEMODELHELPER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
#include "PageBordersHandler.hxx" #include "PageBordersHandler.hxx"
#include <resourcemodel/ResourceModelHelper.hxx> #include "util.hxx"
#include <SdtHelper.hxx> #include <SdtHelper.hxx>
#include <TDefTableHandler.hxx> #include <TDefTableHandler.hxx>
#include <DomainMapper_Impl.hxx> #include <DomainMapper_Impl.hxx>
...@@ -77,8 +77,6 @@ using namespace oox; ...@@ -77,8 +77,6 @@ using namespace oox;
namespace writerfilter { namespace writerfilter {
using resourcemodel::resolveSprmProps;
namespace dmapper{ namespace dmapper{
TagLogger::Pointer_t dmapper_logger(TagLogger::getInstance("DOMAINMAPPER")); TagLogger::Pointer_t dmapper_logger(TagLogger::getInstance("DOMAINMAPPER"));
...@@ -2325,12 +2323,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) ...@@ -2325,12 +2323,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_SdtPr_date: case NS_ooxml::LN_CT_SdtPr_date:
{ {
if (!IsInHeaderFooter()) if (!IsInHeaderFooter())
resourcemodel::resolveSprmProps(*this, rSprm); resolveSprmProps(*this, rSprm);
else else
{ {
OUString sName = "ooxml:CT_SdtPr_date"; OUString sName = "ooxml:CT_SdtPr_date";
enableInteropGrabBag(sName); enableInteropGrabBag(sName);
resourcemodel::resolveSprmProps(*this, rSprm); resolveSprmProps(*this, rSprm);
m_pImpl->m_pSdtHelper->appendToInteropGrabBag(getInteropGrabBag()); m_pImpl->m_pSdtHelper->appendToInteropGrabBag(getInteropGrabBag());
m_pImpl->disableInteropGrabBag(); m_pImpl->disableInteropGrabBag();
} }
...@@ -2505,7 +2503,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) ...@@ -2505,7 +2503,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_TrPrBase_cnfStyle: case NS_ooxml::LN_CT_TrPrBase_cnfStyle:
{ {
m_pImpl->enableInteropGrabBag("cnfStyle"); m_pImpl->enableInteropGrabBag("cnfStyle");
resourcemodel::resolveSprmProps(*this, rSprm); resolveSprmProps(*this, rSprm);
TablePropertyMapPtr pPropMap(new TablePropertyMap()); TablePropertyMapPtr pPropMap(new TablePropertyMap());
pPropMap->Insert(PROP_ROW_CNF_STYLE, uno::makeAny(uno::makeAny(m_pImpl->m_aInteropGrabBag.getAsConstList())), true, ROW_GRAB_BAG); pPropMap->Insert(PROP_ROW_CNF_STYLE, uno::makeAny(uno::makeAny(m_pImpl->m_aInteropGrabBag.getAsConstList())), true, ROW_GRAB_BAG);
...@@ -2517,7 +2515,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) ...@@ -2517,7 +2515,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_TcPrBase_cnfStyle: case NS_ooxml::LN_CT_TcPrBase_cnfStyle:
{ {
m_pImpl->enableInteropGrabBag("cnfStyle"); m_pImpl->enableInteropGrabBag("cnfStyle");
resourcemodel::resolveSprmProps(*this, rSprm); resolveSprmProps(*this, rSprm);
TablePropertyMapPtr pPropMap(new TablePropertyMap()); TablePropertyMapPtr pPropMap(new TablePropertyMap());
pPropMap->Insert(PROP_CELL_CNF_STYLE, uno::makeAny(uno::makeAny(m_pImpl->m_aInteropGrabBag.getAsConstList())), true, CELL_GRAB_BAG); pPropMap->Insert(PROP_CELL_CNF_STYLE, uno::makeAny(uno::makeAny(m_pImpl->m_aInteropGrabBag.getAsConstList())), true, CELL_GRAB_BAG);
...@@ -2529,7 +2527,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) ...@@ -2529,7 +2527,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_PPrBase_cnfStyle: case NS_ooxml::LN_CT_PPrBase_cnfStyle:
{ {
m_pImpl->enableInteropGrabBag("cnfStyle"); m_pImpl->enableInteropGrabBag("cnfStyle");
resourcemodel::resolveSprmProps(*this, rSprm); resolveSprmProps(*this, rSprm);
rContext->Insert(PROP_PARA_CNF_STYLE, uno::makeAny(m_pImpl->m_aInteropGrabBag.getAsConstList()), true, PARA_GRAB_BAG); rContext->Insert(PROP_PARA_CNF_STYLE, uno::makeAny(m_pImpl->m_aInteropGrabBag.getAsConstList()), true, PARA_GRAB_BAG);
m_pImpl->disableInteropGrabBag(); m_pImpl->disableInteropGrabBag();
} }
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
#include <DomainMapper.hxx> #include <DomainMapper.hxx>
#include <dmapper/GraphicZOrderHelper.hxx> #include <dmapper/GraphicZOrderHelper.hxx>
#include <ooxml/resourceids.hxx> #include <ooxml/resourceids.hxx>
#include <resourcemodel/ResourceModelHelper.hxx>
#include "ConversionHelper.hxx" #include "ConversionHelper.hxx"
#include "GraphicHelpers.hxx" #include "GraphicHelpers.hxx"
...@@ -63,11 +62,10 @@ ...@@ -63,11 +62,10 @@
#include "PropertyMap.hxx" #include "PropertyMap.hxx"
#include "WrapPolygonHandler.hxx" #include "WrapPolygonHandler.hxx"
#include "dmapperLoggers.hxx" #include "dmapperLoggers.hxx"
#include "util.hxx"
namespace writerfilter { namespace writerfilter {
using resourcemodel::resolveSprmProps;
namespace dmapper namespace dmapper
{ {
using namespace std; using namespace std;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <stdio.h> #include <stdio.h>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <resourcemodel/ResourceModelHelper.hxx>
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/container/XNameContainer.hpp>
...@@ -30,13 +29,12 @@ ...@@ -30,13 +29,12 @@
#include <ConversionHelper.hxx> #include <ConversionHelper.hxx>
#include "dmapperLoggers.hxx" #include "dmapperLoggers.hxx"
#include "util.hxx"
using namespace com::sun::star; using namespace com::sun::star;
namespace writerfilter { namespace writerfilter {
using resourcemodel::resolveSprmProps;
namespace dmapper namespace dmapper
{ {
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
* except in compliance with the License. You may obtain a copy of * except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <resourcemodel/ResourceModelHelper.hxx>
#include <StyleSheetTable.hxx> #include <StyleSheetTable.hxx>
#include "util.hxx"
#include <NumberingManager.hxx> #include <NumberingManager.hxx>
#include <ConversionHelper.hxx> #include <ConversionHelper.hxx>
#include <TblStylePrHandler.hxx> #include <TblStylePrHandler.hxx>
...@@ -682,14 +682,14 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm) ...@@ -682,14 +682,14 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
case NS_ooxml::LN_CT_PPrDefault_pPr: case NS_ooxml::LN_CT_PPrDefault_pPr:
case NS_ooxml::LN_CT_DocDefaults_pPrDefault: case NS_ooxml::LN_CT_DocDefaults_pPrDefault:
m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultParaProps ); m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultParaProps );
resourcemodel::resolveSprmProps( m_pImpl->m_rDMapper, rSprm ); resolveSprmProps( m_pImpl->m_rDMapper, rSprm );
m_pImpl->m_rDMapper.PopStyleSheetProperties(); m_pImpl->m_rDMapper.PopStyleSheetProperties();
applyDefaults( true ); applyDefaults( true );
break; break;
case NS_ooxml::LN_CT_RPrDefault_rPr: case NS_ooxml::LN_CT_RPrDefault_rPr:
case NS_ooxml::LN_CT_DocDefaults_rPrDefault: case NS_ooxml::LN_CT_DocDefaults_rPrDefault:
m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultCharProps ); m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultCharProps );
resourcemodel::resolveSprmProps( m_pImpl->m_rDMapper, rSprm ); resolveSprmProps( m_pImpl->m_rDMapper, rSprm );
m_pImpl->m_rDMapper.PopStyleSheetProperties(); m_pImpl->m_rDMapper.PopStyleSheetProperties();
applyDefaults( false ); applyDefaults( false );
break; break;
......
...@@ -20,15 +20,14 @@ ...@@ -20,15 +20,14 @@
#include <com/sun/star/drawing/PointSequence.hpp> #include <com/sun/star/drawing/PointSequence.hpp>
#include <ooxml/resourceids.hxx> #include <ooxml/resourceids.hxx>
#include <resourcemodel/ResourceModelHelper.hxx>
#include "ConversionHelper.hxx" #include "ConversionHelper.hxx"
#include "WrapPolygonHandler.hxx" #include "WrapPolygonHandler.hxx"
#include "dmapperLoggers.hxx" #include "dmapperLoggers.hxx"
#include "util.hxx"
namespace writerfilter { namespace writerfilter {
using resourcemodel::resolveSprmProps;
using namespace com::sun::star; using namespace com::sun::star;
namespace dmapper { namespace dmapper {
......
...@@ -51,6 +51,13 @@ string XTextRangeToString(uno::Reference< text::XTextRange > textRange) ...@@ -51,6 +51,13 @@ string XTextRangeToString(uno::Reference< text::XTextRange > textRange)
return result; return result;
} }
void resolveSprmProps(Properties & rHandler, Sprm & rSprm)
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
pProperties->resolve(rHandler);
}
} }
} }
......
...@@ -22,12 +22,14 @@ ...@@ -22,12 +22,14 @@
#include <com/sun/star/text/XTextRange.hpp> #include <com/sun/star/text/XTextRange.hpp>
#include <string> #include <string>
#include <resourcemodel/WW8ResourceModel.hxx>
namespace writerfilter namespace writerfilter
{ {
namespace dmapper namespace dmapper
{ {
std::string XTextRangeToString(css::uno::Reference< css::text::XTextRange > textRange); std::string XTextRangeToString(css::uno::Reference< css::text::XTextRange > textRange);
void resolveSprmProps(Properties & rHandler, Sprm & rSprm);
} }
} }
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "resourcemodel/ResourceModelHelper.hxx"
namespace writerfilter {
namespace resourcemodel {
void resolveSprmProps(Properties & rHandler, Sprm & rSprm)
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
pProperties->resolve(rHandler);
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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