diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-01-28 18:07:45 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-01-29 15:20:59 +0100 |
commit | 81a46fc86a530f028a5bd2f5e52fe0372d50ee38 (patch) | |
tree | e42c3775afd4dc5c3ae2d4e1f63ab68a76392548 /sw | |
parent | Related: fdo#59922 add new unicode blocks, detect newer in future (diff) | |
download | core-81a46fc86a530f028a5bd2f5e52fe0372d50ee38.tar.gz core-81a46fc86a530f028a5bd2f5e52fe0372d50ee38.zip |
SvXMLExport::_ExportStyles: also try to export text gradients
They are not exported automatically, as SvxUnoNameItemTable needs a
Which ID, and it's different for drawinglayer and Writer gradients.
Change-Id: I5dd7d828b1f0e577e26510e3c5ca74386d000f16
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/unotxdoc.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index b0b6b60fa9f4..d8f3fbaa3867 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -547,6 +547,7 @@ class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable { css::uno::Reference < css::uno::XInterface > xDashTable; css::uno::Reference < css::uno::XInterface > xGradientTable; + css::uno::Reference < css::uno::XInterface > xTextGradientTable; css::uno::Reference < css::uno::XInterface > xHatchTable; css::uno::Reference < css::uno::XInterface > xBitmapTable; css::uno::Reference < css::uno::XInterface > xTransGradientTable; diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 9977d7b05416..8c25145604db 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -153,6 +153,7 @@ using ::osl::FileBase; #define SW_CREATE_TRANSGRADIENT_TABLE 0x05 #define SW_CREATE_MARKER_TABLE 0x06 #define SW_CREATE_DRAW_DEFAULTS 0x07 +#define SW_CREATE_TEXT_GRADIENT_TABLE 0x08 extern bool sw_GetPostIts( IDocumentFieldsAccess* pIDFA, _SetGetExpFlds * pSrtLst ); @@ -1679,6 +1680,8 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic { if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) ); + if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.GradientTable") ) ) + xRet = GetPropertyHelper()->GetDrawTable(SW_CREATE_TEXT_GRADIENT_TABLE); } else if (sCategory == "chart2" ) { @@ -3880,6 +3883,11 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(short nWhich) xDrawDefaults = (cppu::OWeakObject*)new SwSvxUnoDrawPool(m_pDoc); xRet = xDrawDefaults; break; + case SW_CREATE_TEXT_GRADIENT_TABLE : + if(!xTextGradientTable.is()) + xTextGradientTable = SvxUnoTextGradientTable_createInstance( m_pDoc->GetOrCreateDrawModel(), RES_FILL_GRADIENT ); + xRet = xTextGradientTable; + break; #if OSL_DEBUG_LEVEL > 0 default: OSL_FAIL("which table?"); #endif |