diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-05-27 13:00:10 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-06-08 14:50:55 +0200 |
commit | 95ebd24a629b4c8cd62cc20c0701683512cc8fa0 (patch) | |
tree | 8bdeab41e8b4d0092f639e62fd3e20ae8243f199 /sw/source | |
parent | c4f615b359be56e88e4fbf9aaaf30affb29d57e2 (diff) |
editengine-columns: ODF support [API CHANGE]
This uses existing ODF markup, as used by Writer's text frame:
style::columns child element of style:graphic-properties, its
fo:column-count and fo:column-gap attributes. No ODF extension
is required.
Since currently only columns with same width and spacing are
implemented, without additional settings, style:column child
elements are exported, but ignored on import.
This adds new property to css::drawing::TextProperties service:
TextColumns (of type css::text::XTextColumns).
Change-Id: I7e63293e5814b281ceec8a9632e696322d3629e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116035
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 116 | ||||
-rw-r--r-- | sw/source/core/unocore/unocoll.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/unocore/unomap.cxx | 17 | ||||
-rw-r--r-- | sw/source/core/unocore/unomap1.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/unocore/unosett.cxx | 291 |
5 files changed, 104 insertions, 329 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index fc4865619466..5e7d6100bc0e 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <com/sun/star/text/ColumnSeparatorStyle.hpp> #include <com/sun/star/text/WrapTextMode.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/container/XIndexContainer.hpp> @@ -78,6 +81,7 @@ #include <unomid.h> #include <strings.hrc> #include <svx/svdundo.hxx> +#include <svx/SvxXTextColumns.hxx> #include <sortedobjs.hxx> #include <HandleAnchorNodeChg.hxx> #include <calbck.hxx> @@ -85,6 +89,7 @@ #include <drawdoc.hxx> #include <hints.hxx> #include <frameformats.hxx> +#include <unoprnms.hxx> #include <ndtxt.hxx> @@ -1073,7 +1078,81 @@ bool SwFormatCol::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const } else { - uno::Reference< text::XTextColumns > xCols = new SwXTextColumns(*this); + uno::Reference<text::XTextColumns> xCols(SvxXTextColumns_createInstance(), + css::uno::UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xProps(xCols, css::uno::UNO_QUERY_THROW); + + if (GetNumCols() > 0) + { + xCols->setColumnCount(GetNumCols()); + const sal_uInt16 nItemGutterWidth = GetGutterWidth(); + sal_Int32 nAutoDistance = IsOrtho() ? USHRT_MAX == nItemGutterWidth + ? DEF_GUTTER_WIDTH + : static_cast<sal_Int32>(nItemGutterWidth) + : 0; + nAutoDistance = convertTwipToMm100(nAutoDistance); + xProps->setPropertyValue(UNO_NAME_AUTOMATIC_DISTANCE, uno::Any(nAutoDistance)); + + if (!IsOrtho()) + { + auto aTextColumns = xCols->getColumns(); + text::TextColumn* pColumns = aTextColumns.getArray(); + const SwColumns& rCols = GetColumns(); + for (sal_Int32 i = 0; i < aTextColumns.getLength(); ++i) + { + const SwColumn* pCol = &rCols[i]; + + pColumns[i].Width = pCol->GetWishWidth(); + pColumns[i].LeftMargin = convertTwipToMm100(pCol->GetLeft()); + pColumns[i].RightMargin = convertTwipToMm100(pCol->GetRight()); + } + xCols->setColumns(aTextColumns); // sets "IsAutomatic" property to false + } + } + uno::Any aVal; + aVal <<= o3tl::narrowing<sal_Int32>(GetLineWidth()); + xProps->setPropertyValue(UNO_NAME_SEPARATOR_LINE_WIDTH, aVal); + aVal <<= GetLineColor(); + xProps->setPropertyValue(UNO_NAME_SEPARATOR_LINE_COLOR, aVal); + aVal <<= static_cast<sal_Int32>(GetLineHeight()); + xProps->setPropertyValue(UNO_NAME_SEPARATOR_LINE_RELATIVE_HEIGHT, aVal); + aVal <<= GetLineAdj() != COLADJ_NONE; + xProps->setPropertyValue(UNO_NAME_SEPARATOR_LINE_IS_ON, aVal); + sal_Int16 nStyle; + switch (GetLineStyle()) + { + case SvxBorderLineStyle::SOLID: + nStyle = css::text::ColumnSeparatorStyle::SOLID; + break; + case SvxBorderLineStyle::DOTTED: + nStyle = css::text::ColumnSeparatorStyle::DOTTED; + break; + case SvxBorderLineStyle::DASHED: + nStyle = css::text::ColumnSeparatorStyle::DASHED; + break; + case SvxBorderLineStyle::NONE: + default: + nStyle = css::text::ColumnSeparatorStyle::NONE; + break; + } + aVal <<= nStyle; + xProps->setPropertyValue(UNO_NAME_SEPARATOR_LINE_STYLE, aVal); + style::VerticalAlignment eAlignment; + switch (GetLineAdj()) + { + case COLADJ_TOP: + eAlignment = style::VerticalAlignment_TOP; + break; + case COLADJ_BOTTOM: + eAlignment = style::VerticalAlignment_BOTTOM; + break; + case COLADJ_CENTER: + case COLADJ_NONE: + default: + eAlignment = style::VerticalAlignment_MIDDLE; + } + aVal <<= eAlignment; + xProps->setPropertyValue(UNO_NAME_SEPARATOR_LINE_VERTIVAL_ALIGNMENT, aVal); rVal <<= xCols; } return true; @@ -1117,24 +1196,33 @@ bool SwFormatCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) m_nWidth = nWidthSum; m_bOrtho = false; - auto pSwColums = comphelper::getUnoTunnelImplementation<SwXTextColumns>(xCols); - if(pSwColums) + if (uno::Reference<beans::XPropertySet> xProps{ xCols, css::uno::UNO_QUERY }) { - m_bOrtho = pSwColums->IsAutomaticWidth(); - m_nLineWidth = pSwColums->GetSepLineWidth(); - m_aLineColor = pSwColums->GetSepLineColor(); - m_nLineHeight = pSwColums->GetSepLineHeightRelative(); - switch ( pSwColums->GetSepLineStyle() ) + xProps->getPropertyValue(UNO_NAME_IS_AUTOMATIC) >>= m_bOrtho; + xProps->getPropertyValue(UNO_NAME_SEPARATOR_LINE_WIDTH) >>= m_nLineWidth; + xProps->getPropertyValue(UNO_NAME_SEPARATOR_LINE_COLOR) >>= m_aLineColor; + if (sal_Int32 nHeight; + xProps->getPropertyValue(UNO_NAME_SEPARATOR_LINE_RELATIVE_HEIGHT) >>= nHeight) + m_nLineHeight = nHeight; + switch (xProps->getPropertyValue(UNO_NAME_SEPARATOR_LINE_STYLE).get<sal_Int16>()) { default: - case 0: m_eLineStyle = SvxBorderLineStyle::NONE; break; - case 1: m_eLineStyle = SvxBorderLineStyle::SOLID; break; - case 2: m_eLineStyle = SvxBorderLineStyle::DOTTED; break; - case 3: m_eLineStyle = SvxBorderLineStyle::DASHED; break; + case css::text::ColumnSeparatorStyle::NONE: + m_eLineStyle = SvxBorderLineStyle::NONE; + break; + case css::text::ColumnSeparatorStyle::SOLID: + m_eLineStyle = SvxBorderLineStyle::SOLID; + break; + case css::text::ColumnSeparatorStyle::DOTTED: + m_eLineStyle = SvxBorderLineStyle::DOTTED; + break; + case css::text::ColumnSeparatorStyle::DASHED: + m_eLineStyle = SvxBorderLineStyle::DASHED; + break; } - if(!pSwColums->GetSepLineIsOn()) + if (!xProps->getPropertyValue(UNO_NAME_SEPARATOR_LINE_IS_ON).get<bool>()) m_eAdj = COLADJ_NONE; - else switch(pSwColums->GetSepLineVertAlign()) + else switch (xProps->getPropertyValue(UNO_NAME_SEPARATOR_LINE_VERTIVAL_ALIGNMENT).get<style::VerticalAlignment>()) { case style::VerticalAlignment_TOP: m_eAdj = COLADJ_TOP; break; case style::VerticalAlignment_MIDDLE: m_eAdj = COLADJ_CENTER; break; diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 50f0aa61cf38..e7fe4455eb8f 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -35,6 +35,7 @@ #include <o3tl/safeint.hxx> #include <svtools/unoimap.hxx> #include <svtools/unoevent.hxx> +#include <svx/SvxXTextColumns.hxx> #include <unotbl.hxx> #include <unostyle.hxx> #include <unofield.hxx> @@ -792,7 +793,7 @@ SwXServiceProvider::MakeInstance(SwServiceType nObjectType, SwDoc & rDoc) xRet = static_cast<cppu::OWeakObject*>(new SwXNumberingRules(rDoc)); break; case SwServiceType::TextColumns: - xRet = static_cast<cppu::OWeakObject*>(new SwXTextColumns); + xRet = SvxXTextColumns_createInstance(); break; case SwServiceType::Defaults: xRet = static_cast<cppu::OWeakObject*>(new SwXTextDefaults(&rDoc)); diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 0cb439336ae8..3580a8f416a2 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -681,23 +681,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s m_aMapEntriesArr[nPropertyId] = GetFootnotePropertyMap(); } break; - case PROPERTY_MAP_TEXT_COLUMS : - { - static SfxItemPropertyMapEntry const aTextColumns_Impl[] = - { - {u"" UNO_NAME_IS_AUTOMATIC, WID_TXTCOL_IS_AUTOMATIC, cppu::UnoType<bool>::get(),PropertyAttribute::READONLY, 0}, - {u"" UNO_NAME_AUTOMATIC_DISTANCE, WID_TXTCOL_AUTO_DISTANCE, cppu::UnoType<sal_Int32>::get(),PROPERTY_NONE, 0}, - {u"" UNO_NAME_SEPARATOR_LINE_WIDTH, WID_TXTCOL_LINE_WIDTH, cppu::UnoType<sal_Int32>::get(),PROPERTY_NONE, 0}, - {u"" UNO_NAME_SEPARATOR_LINE_COLOR, WID_TXTCOL_LINE_COLOR, cppu::UnoType<sal_Int32>::get(),PROPERTY_NONE, 0}, - {u"" UNO_NAME_SEPARATOR_LINE_RELATIVE_HEIGHT, WID_TXTCOL_LINE_REL_HGT, cppu::UnoType<sal_Int32>::get(),PROPERTY_NONE, 0}, - {u"" UNO_NAME_SEPARATOR_LINE_VERTIVAL_ALIGNMENT, WID_TXTCOL_LINE_ALIGN, cppu::UnoType<css::style::VerticalAlignment>::get(),PROPERTY_NONE, 0}, - {u"" UNO_NAME_SEPARATOR_LINE_IS_ON, WID_TXTCOL_LINE_IS_ON, cppu::UnoType<bool>::get(),PROPERTY_NONE, 0}, - {u"" UNO_NAME_SEPARATOR_LINE_STYLE, WID_TXTCOL_LINE_STYLE, cppu::UnoType<sal_Int8>::get(),PROPERTY_NONE, 0}, - { u"", 0, css::uno::Type(), 0, 0 } - }; - m_aMapEntriesArr[nPropertyId] = aTextColumns_Impl; - } - break; case PROPERTY_MAP_REDLINE : { m_aMapEntriesArr[nPropertyId] = GetRedlinePropertyMap(); diff --git a/sw/source/core/unocore/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx index 803c93f94b1b..ee7b116d9716 100644 --- a/sw/source/core/unocore/unomap1.cxx +++ b/sw/source/core/unocore/unomap1.cxx @@ -1275,12 +1275,6 @@ const SfxItemPropertySet* SwUnoPropertyMapProvider::GetPropertySet( sal_uInt16 m_aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FOOTNOTE; } break; - case PROPERTY_MAP_TEXT_COLUMS : - { - static SfxItemPropertySet aPROPERTY_MAP_TEXT_COLUMS(pEntries); - m_aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_COLUMS; - } - break; case PROPERTY_MAP_PARAGRAPH : { static SfxItemPropertySet aPROPERTY_MAP_PARAGRAPH(pEntries); diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index eedb0fdbaa2d..186b0e98116e 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -90,11 +90,6 @@ namespace return pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier(); } } -// Constants for the css::text::ColumnSeparatorStyle -#define API_COL_LINE_NONE 0 -#define API_COL_LINE_SOLID 1 -#define API_COL_LINE_DOTTED 2 -#define API_COL_LINE_DASHED 3 #define WID_PREFIX 0 #define WID_SUFFIX 1 @@ -2166,290 +2161,4 @@ SwXChapterNumbering::~SwXChapterNumbering() { } -OUString SwXTextColumns::getImplementationName() -{ - return "SwXTextColumns"; -} - -sal_Bool SwXTextColumns::supportsService(const OUString& rServiceName) -{ - return cppu::supportsService(this, rServiceName); -} - -Sequence< OUString > SwXTextColumns::getSupportedServiceNames() -{ - Sequence<OUString> aRet { "com.sun.star.text.TextColumns" }; - return aRet; -} - -SwXTextColumns::SwXTextColumns() : - m_nReference(0), - m_bIsAutomaticWidth(true), - m_nAutoDistance(0), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS)), - m_nSepLineWidth(0), - m_nSepLineColor(0), //black - m_nSepLineHeightRelative(100),//full height - m_nSepLineVertAlign(style::VerticalAlignment_MIDDLE), - m_bSepLineIsOn(false), - m_nSepLineStyle(API_COL_LINE_NONE) // None -{ -} - -SwXTextColumns::SwXTextColumns(const SwFormatCol& rFormatCol) : - m_nReference(0), - m_aTextColumns(rFormatCol.GetNumCols()), - m_bIsAutomaticWidth(rFormatCol.IsOrtho()), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS)) -{ - const sal_uInt16 nItemGutterWidth = rFormatCol.GetGutterWidth(); - m_nAutoDistance = m_bIsAutomaticWidth ? - USHRT_MAX == nItemGutterWidth ? DEF_GUTTER_WIDTH : static_cast<sal_Int32>(nItemGutterWidth) - : 0; - m_nAutoDistance = convertTwipToMm100(m_nAutoDistance); - - TextColumn* pColumns = m_aTextColumns.getArray(); - const SwColumns& rCols = rFormatCol.GetColumns(); - for(sal_Int32 i = 0; i < m_aTextColumns.getLength(); ++i) - { - const SwColumn* pCol = &rCols[i]; - - pColumns[i].Width = pCol->GetWishWidth(); - m_nReference += pColumns[i].Width; - pColumns[i].LeftMargin = convertTwipToMm100(pCol->GetLeft ()); - pColumns[i].RightMargin = convertTwipToMm100(pCol->GetRight()); - } - if(!m_aTextColumns.hasElements()) - m_nReference = USHRT_MAX; - - m_nSepLineWidth = rFormatCol.GetLineWidth(); - m_nSepLineColor = rFormatCol.GetLineColor(); - m_nSepLineHeightRelative = rFormatCol.GetLineHeight(); - m_bSepLineIsOn = rFormatCol.GetLineAdj() != COLADJ_NONE; - sal_Int8 nStyle = API_COL_LINE_NONE; - switch (rFormatCol.GetLineStyle()) - { - case SvxBorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break; - case SvxBorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break; - case SvxBorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break; - default: break; - } - m_nSepLineStyle = nStyle; - switch(rFormatCol.GetLineAdj()) - { - case COLADJ_TOP: m_nSepLineVertAlign = style::VerticalAlignment_TOP; break; - case COLADJ_BOTTOM: m_nSepLineVertAlign = style::VerticalAlignment_BOTTOM; break; - case COLADJ_CENTER: - case COLADJ_NONE: m_nSepLineVertAlign = style::VerticalAlignment_MIDDLE; - } -} - -SwXTextColumns::~SwXTextColumns() -{ -} - -sal_Int32 SwXTextColumns::getReferenceValue() -{ - SolarMutexGuard aGuard; - return m_nReference; -} - -sal_Int16 SwXTextColumns::getColumnCount() -{ - SolarMutexGuard aGuard; - return static_cast< sal_Int16>( m_aTextColumns.getLength() ); -} - -void SwXTextColumns::setColumnCount(sal_Int16 nColumns) -{ - SolarMutexGuard aGuard; - if(nColumns <= 0) - throw uno::RuntimeException(); - m_bIsAutomaticWidth = true; - m_aTextColumns.realloc(nColumns); - TextColumn* pCols = m_aTextColumns.getArray(); - m_nReference = USHRT_MAX; - sal_Int32 nWidth = m_nReference / nColumns; - sal_Int32 nDiff = m_nReference - nWidth * nColumns; - sal_Int32 nDist = m_nAutoDistance / 2; - for(sal_Int16 i = 0; i < nColumns; i++) - { - pCols[i].Width = nWidth; - pCols[i].LeftMargin = i == 0 ? 0 : nDist; - pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist; - } - pCols[nColumns - 1].Width += nDiff; -} - -uno::Sequence< TextColumn > SwXTextColumns::getColumns() -{ - SolarMutexGuard aGuard; - return m_aTextColumns; -} - -void SwXTextColumns::setColumns(const uno::Sequence< TextColumn >& rColumns) -{ - SolarMutexGuard aGuard; - sal_Int32 nReferenceTemp = std::accumulate(rColumns.begin(), rColumns.end(), sal_Int32(0), - [](const sal_Int32 nSum, const TextColumn& rCol) { return nSum + rCol.Width; }); - m_bIsAutomaticWidth = false; - m_nReference = !nReferenceTemp ? USHRT_MAX : nReferenceTemp; - m_aTextColumns = rColumns; -} - -uno::Reference< XPropertySetInfo > SwXTextColumns::getPropertySetInfo( ) -{ - static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo(); - return aRef; -} - -void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& aValue ) -{ - const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); - if (!pEntry) - throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - - switch(pEntry->nWID) - { - case WID_TXTCOL_LINE_WIDTH: - { - sal_Int32 nTmp = 0; - aValue >>= nTmp; - if(nTmp < 0) - throw IllegalArgumentException(); - m_nSepLineWidth = convertMm100ToTwip(nTmp); - } - break; - case WID_TXTCOL_LINE_COLOR: - aValue >>= m_nSepLineColor; - break; - case WID_TXTCOL_LINE_STYLE: - { - aValue >>= m_nSepLineStyle; - } - break; - case WID_TXTCOL_LINE_REL_HGT: - { - sal_Int8 nTmp = 0; - aValue >>= nTmp; - if(nTmp < 0) - throw IllegalArgumentException(); - m_nSepLineHeightRelative = nTmp; - } - break; - case WID_TXTCOL_LINE_ALIGN: - { - style::VerticalAlignment eAlign; - if(!(aValue >>= eAlign) ) - { - sal_Int8 nTmp = 0; - if (! ( aValue >>= nTmp ) ) - throw IllegalArgumentException(); - m_nSepLineVertAlign = static_cast<style::VerticalAlignment>(nTmp); - } - else - m_nSepLineVertAlign = eAlign; - } - break; - case WID_TXTCOL_LINE_IS_ON: - m_bSepLineIsOn = *o3tl::doAccess<bool>(aValue); - break; - case WID_TXTCOL_AUTO_DISTANCE: - { - sal_Int32 nTmp = 0; - aValue >>= nTmp; - if(nTmp < 0 || nTmp >= m_nReference) - throw IllegalArgumentException(); - m_nAutoDistance = nTmp; - sal_Int32 nColumns = m_aTextColumns.getLength(); - TextColumn* pCols = m_aTextColumns.getArray(); - sal_Int32 nDist = m_nAutoDistance / 2; - for(sal_Int32 i = 0; i < nColumns; i++) - { - pCols[i].LeftMargin = i == 0 ? 0 : nDist; - pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist; - } - } - break; - } -} - -Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName ) -{ - const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); - if (!pEntry) - throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - - Any aRet; - switch(pEntry->nWID) - { - case WID_TXTCOL_LINE_WIDTH: - aRet <<= static_cast < sal_Int32 >(convertTwipToMm100(m_nSepLineWidth)); - break; - case WID_TXTCOL_LINE_COLOR: - aRet <<= m_nSepLineColor; - break; - case WID_TXTCOL_LINE_STYLE: - aRet <<= m_nSepLineStyle; - break; - case WID_TXTCOL_LINE_REL_HGT: - aRet <<= m_nSepLineHeightRelative; - break; - case WID_TXTCOL_LINE_ALIGN: - aRet <<= m_nSepLineVertAlign; - break; - case WID_TXTCOL_LINE_IS_ON: - aRet <<= m_bSepLineIsOn; - break; - case WID_TXTCOL_IS_AUTOMATIC : - aRet <<= m_bIsAutomaticWidth; - break; - case WID_TXTCOL_AUTO_DISTANCE: - aRet <<= m_nAutoDistance; - break; - } - return aRet; -} - -void SwXTextColumns::addPropertyChangeListener( - const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ ) -{ -} - -void SwXTextColumns::removePropertyChangeListener( - const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ ) -{ -} - -void SwXTextColumns::addVetoableChangeListener( - const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ ) -{ -} - -void SwXTextColumns::removeVetoableChangeListener( - const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ ) -{ -} - -namespace -{ -} - -const uno::Sequence< sal_Int8 > & SwXTextColumns::getUnoTunnelId() -{ - static const UnoTunnelIdInit theSwXTextColumnsUnoTunnelId; - return theSwXTextColumnsUnoTunnelId.getSeq(); -} - -sal_Int64 SAL_CALL SwXTextColumns::getSomething( const uno::Sequence< sal_Int8 >& rId ) -{ - if( isUnoTunnelId<SwXTextColumns>(rId) ) - { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); - } - return 0; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |