summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-01-28 18:07:45 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-01-29 15:20:59 +0100
commit81a46fc86a530f028a5bd2f5e52fe0372d50ee38 (patch)
treee42c3775afd4dc5c3ae2d4e1f63ab68a76392548 /sw/source/ui/uno
parenteb1ecd8bc2936e28be852722d6cb0c9fb0baeac4 (diff)
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/source/ui/uno')
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx8
1 files changed, 8 insertions, 0 deletions
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