summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorJacobo Aragunde PĂ©rez <jaragunde@igalia.com>2013-10-01 10:59:01 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-10-16 10:24:00 +0000
commit2eba5391d3fa3232ba2b0a187c4c51736ab2ec3d (patch)
treecf06fece8abd86dc586cf137ac450e817ff50842 /unotools
parentb3362fc9cb410599ac54fc3badfad75354c98d84 (diff)
unotools: add menu option to enable/disable Smart-Art lock
The point of this menu option is that locked Smart-Art shapes would preserve the original XML files attached so they could be exported back to docx with no loss. The new menu option is located at Options -> Load/Save -> MS Office -> SmartArt to LibreOffice shapes or reverse. Change-Id: I6aafc2eb83404ee2c0b8538b2f6fbbbd4363e7d3 Reviewed-on: https://gerrit.libreoffice.org/6138 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/fltrcfg.cxx23
1 files changed, 20 insertions, 3 deletions
diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx
index 29678a1991b4..09829dbcb911 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -48,6 +48,7 @@ using namespace com::sun::star::uno;
#define FILTERCFG_ENABLE_WORD_PREVIEW 0x80000
#define FILTERCFG_USE_ENHANCED_FIELDS 0x100000
#define FILTERCFG_WORD_WBCTBL 0x200000
+#define FILTERCFG_SMARTART_SHAPE_LOAD 0x400000
class SvtAppFilterOptions_Impl : public utl::ConfigItem
{
@@ -240,7 +241,8 @@ struct SvtFilterOptions_Impl
FILTERCFG_CALC_SAVE |
FILTERCFG_IMPRESS_LOAD |
FILTERCFG_IMPRESS_SAVE |
- FILTERCFG_USE_ENHANCED_FIELDS;
+ FILTERCFG_USE_ENHANCED_FIELDS |
+ FILTERCFG_SMARTART_SHAPE_LOAD;
Load();
}
@@ -314,7 +316,7 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames()
static Sequence<OUString> aNames;
if(!aNames.getLength())
{
- int nCount = 12;
+ int nCount = 13;
aNames.realloc(nCount);
static const char* aPropNames[] =
{
@@ -329,7 +331,8 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames()
"Export/EnablePowerPointPreview", // 8
"Export/EnableExcelPreview", // 9
"Export/EnableWordPreview", // 10
- "Import/ImportWWFieldsAsEnhancedFields" // 11
+ "Import/ImportWWFieldsAsEnhancedFields", // 11
+ "Import/SmartArtToShapes" // 12
};
OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
@@ -355,6 +358,7 @@ static sal_uLong lcl_GetFlag(sal_Int32 nProp)
case 9: nFlag = FILTERCFG_ENABLE_EXCEL_PREVIEW; break;
case 10: nFlag = FILTERCFG_ENABLE_WORD_PREVIEW; break;
case 11: nFlag = FILTERCFG_USE_ENHANCED_FIELDS; break;
+ case 12: nFlag = FILTERCFG_SMARTART_SHAPE_LOAD; break;
default: OSL_FAIL("illegal value");
}
@@ -597,6 +601,19 @@ void SvtFilterOptions::SetImpress2PowerPoint( sal_Bool bFlag )
SetModified();
}
+
+// -----------------------------------------------------------------------
+sal_Bool SvtFilterOptions::IsSmartArt2Shape() const
+{
+ return pImp->IsFlag( FILTERCFG_SMARTART_SHAPE_LOAD );
+}
+
+void SvtFilterOptions::SetSmartArt2Shape( sal_Bool bFlag )
+{
+ pImp->SetFlag( FILTERCFG_SMARTART_SHAPE_LOAD, bFlag );
+ SetModified();
+}
+
namespace
{
class theFilterOptions