[Libreoffice-commits] core.git: 2 commits - writerfilter/source
Michael Stahl
mstahl at redhat.com
Tue Jul 29 13:37:44 PDT 2014
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 3 --
writerfilter/source/dmapper/PropertyMap.cxx | 6 ++--
writerfilter/source/dmapper/PropertyMap.hxx | 20 +++++++++------
writerfilter/source/dmapper/TablePropertiesHandler.cxx | 5 +++
4 files changed, 19 insertions(+), 15 deletions(-)
New commits:
commit 5893a7536a0bbce57c4a2f89680dcb4cff3d06d7
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jul 29 22:21:53 2014 +0200
fdo#81384: writerfilter: turn the horrible btLr cell text dir hack
... by 5 degrees to starboard, which lets the row in the bugdoc appear,
altough the height is a bit insufficient still. Why that works, is a
nautic mystery to me, i'd say this whole btLr emulation nonsense needs
to be keel-hauled, but after this patch i'll need some rum, arrrr...
(regression from commit 0208ead70a9412ccd554fcef3e9308f8ca17037b
and commit 970160f78ef6cc7abacfa252daa8451e1f0117bb)
Change-Id: Ie0c6ec88b6d6635379b9127f6460647f14776aad
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index d776561..4fce5e6 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -355,10 +355,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
if (!getCellProps() || getCellProps()->find(PROP_VERTICAL_MERGE) == getCellProps()->end())
{
// Though in case there will be a vertical merge, don't do this, it hides text that is supposed to be visible.
- TablePropertyMapPtr pRowPropMap( new TablePropertyMap );
- pRowPropMap->Insert(PROP_SIZE_TYPE, uno::makeAny(text::SizeType::FIX));
m_bRowSizeTypeInserted = true;
- insertRowProps(pRowPropMap);
}
m_bHasBtlrCell = true;
}
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
index 0edbd71..64172a0 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
@@ -98,11 +98,14 @@ namespace dmapper {
DomainMapperTableManager* pManager = dynamic_cast<DomainMapperTableManager*>(m_pTableManager);
// In case any of the cells has the btLr cell direction, then an explicit minimal size will just hide the whole row, don't do that.
- if (pMeasureHandler->GetRowHeightSizeType() != text::SizeType::MIN || !pManager || !pManager->HasBtlrCell())
+ const int MINLAY = 23; // sw/inc/swtypes.hxx, minimal possible size of frames.
+ if (!pManager || !pManager->HasBtlrCell() || pMeasureHandler->getMeasureValue() > ConversionHelper::convertTwipToMM100(MINLAY))
{
// In case a cell already wanted fixed size, we should not overwrite it here.
if (!pManager || !pManager->IsRowSizeTypeInserted())
pPropMap->Insert( PROP_SIZE_TYPE, uno::makeAny( pMeasureHandler->GetRowHeightSizeType() ), false);
+ else
+ pPropMap->Insert( PROP_SIZE_TYPE, uno::makeAny(text::SizeType::FIX), false);
pPropMap->Insert( PROP_HEIGHT, uno::makeAny(pMeasureHandler->getMeasureValue() ));
}
commit bdca067382285f4cadad2e13cfffd9c24e3f4bb5
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jul 29 21:30:27 2014 +0200
writerfilter: whoever started non-reference variable names with "r"
... was evidently not a Hungarian speaker.
Change-Id: I87b0690d839057272c9653b222ed4dc61a75963a
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index f894024..4ded054 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -184,7 +184,7 @@ static void lcl_AnyToTag(const uno::Any & rAny)
}
#endif
-void PropertyMap::Insert( PropertyIds eId, const uno::Any& rAny, bool bOverwrite, GrabBagType rGrabBagType )
+void PropertyMap::Insert( PropertyIds eId, const uno::Any& rAny, bool bOverwrite, GrabBagType i_GrabBagType )
{
#ifdef DEBUG_DOMAINMAPPER
const OUString& rInsert = PropertyNameSupplier::
@@ -200,11 +200,11 @@ void PropertyMap::Insert( PropertyIds eId, const uno::Any& rAny, bool bOverwrite
if (aElement != end())
{
if (bOverwrite)
- aElement->second = PropValue(rAny, rGrabBagType);
+ aElement->second = PropValue(rAny, i_GrabBagType);
return;
}
- _PropertyMap::insert(_PropertyMap::value_type(eId, PropValue(rAny, rGrabBagType)));
+ _PropertyMap::insert(_PropertyMap::value_type(eId, PropValue(rAny, i_GrabBagType)));
Invalidate();
}
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 8ed3b2a..a4c9915 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -74,19 +74,23 @@ enum GrabBagType
class PropValue
{
css::uno::Any m_aValue;
- GrabBagType m_rGrabBagType;
+ GrabBagType m_GrabBagType;
public:
- PropValue(const css::uno::Any& rValue, GrabBagType rGrabBagType = NO_GRAB_BAG) :
- m_aValue(rValue), m_rGrabBagType(rGrabBagType) {}
+ PropValue(const css::uno::Any& rValue, GrabBagType i_GrabBagType = NO_GRAB_BAG) :
+ m_aValue(rValue), m_GrabBagType(i_GrabBagType) {}
- PropValue() : m_aValue(), m_rGrabBagType(NO_GRAB_BAG) {}
+ PropValue() : m_aValue(), m_GrabBagType(NO_GRAB_BAG) {}
- PropValue& operator=(const PropValue& rProp) { m_aValue = rProp.m_aValue; m_rGrabBagType = rProp.m_rGrabBagType; return *this; }
+ PropValue& operator=(const PropValue& rProp) {
+ m_aValue = rProp.m_aValue;
+ m_GrabBagType = rProp.m_GrabBagType;
+ return *this;
+ }
const css::uno::Any& getValue() const { return m_aValue; }
- bool hasGrabBag() const { return m_rGrabBagType != NO_GRAB_BAG; }
- GrabBagType getGrabBagType() const { return m_rGrabBagType; }
+ bool hasGrabBag() const { return m_GrabBagType != NO_GRAB_BAG; }
+ GrabBagType getGrabBagType() const { return m_GrabBagType; }
};
typedef std::map< PropertyIds, PropValue > _PropertyMap;
@@ -116,7 +120,7 @@ public:
bool hasEmptyPropertyValues() const {return !m_aValues.getLength();}
/** Add property, usually overwrites already available attributes. It shouldn't overwrite in case of default attributes
*/
- void Insert( PropertyIds eId, const ::com::sun::star::uno::Any& rAny, bool bOverwrite = true, GrabBagType rGrabBagType = NO_GRAB_BAG );
+ void Insert( PropertyIds eId, const ::com::sun::star::uno::Any& rAny, bool bOverwrite = true, GrabBagType i_GrabBagType = NO_GRAB_BAG );
void Insert( PropertyIds eId, const PropValue& rValue, bool bOverwrite = true );
void InsertProps(const boost::shared_ptr<PropertyMap> pMap);
const ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote>& GetFootnote() const { return m_xFootnote;}
More information about the Libreoffice-commits
mailing list