summaryrefslogtreecommitdiffstats
path: root/sw/source/ui
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-09-12 09:59:27 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-09-28 15:27:57 +0200
commitaaf350c598158574a653d464fd388e20377418d8 (patch)
tree9e34b04e2ffe4b55ef5b8803c22c1dca071e237d /sw/source/ui
parentn#778148 SwEditWin::MouseButtonDown: prefer url over hell frames on ctrl-click (diff)
downloadcore-aaf350c598158574a653d464fd388e20377418d8.tar.gz
core-aaf350c598158574a653d464fd388e20377418d8.zip
n#778133 sw: add BackgroundParaOverDrawings compat flag
In Word, the layer that contains a background image is behind the layer that contains the paragraph background. In Writer, the paragraph background is painted before the hell layer. Add a compat flag to change the order, so the DOCX importer can trigger that. To reproduce, create an XShape, send it to the background, set some color for a paragraph background, and notice that the background color is missing where the shape is behind the text. (cherry picked from commit 741132e8a60891684d40726a3d34ef784268a21e) Conflicts: sw/inc/IDocumentSettingAccess.hxx sw/inc/doc.hxx sw/source/core/doc/doc.cxx sw/source/core/doc/docnew.cxx sw/source/filter/xml/xmlimp.cxx sw/source/ui/uno/SwXDocumentSettings.cxx writerfilter/source/filter/ImportFilter.cxx Change-Id: I94aa58fcfe47e4a2fd27d411d7e04ccce92824fa
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index dda7834dff93..1b3c2df44857 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -126,7 +126,8 @@ enum SwDocumentSettingsPropertyHandles
HANDLE_SMALL_CAPS_PERCENTAGE_66,
HANDLE_TAB_OVERFLOW,
HANDLE_UNBREAKABLE_NUMBERINGS,
- HANDLE_FLOATTABLE_NOMARGINS
+ HANDLE_FLOATTABLE_NOMARGINS,
+ HANDLE_BACKGROUND_PARA_OVER_DRAWINGS
};
MasterPropertySetInfo * lcl_createSettingsInfo()
@@ -190,6 +191,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo()
{ RTL_CONSTASCII_STRINGPARAM("TabOverflow"), HANDLE_TAB_OVERFLOW, CPPUTYPE_BOOLEAN, 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("UnbreakableNumberings"), HANDLE_UNBREAKABLE_NUMBERINGS, CPPUTYPE_BOOLEAN, 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("FloattableNomargins"), HANDLE_FLOATTABLE_NOMARGINS, CPPUTYPE_BOOLEAN, 0, 0},
+ { RTL_CONSTASCII_STRINGPARAM("BackgroundParaOverDrawings"), HANDLE_BACKGROUND_PARA_OVER_DRAWINGS, CPPUTYPE_BOOLEAN, 0, 0},
/*
* As OS said, we don't have a view when we need to set this, so I have to
* find another solution before adding them to this property set - MTG
@@ -755,6 +757,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
mpDoc->set(IDocumentSettingAccess::FLOATTABLE_NOMARGINS, bTmp);
}
break;
+ case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS:
+ {
+ sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
+ mpDoc->set(IDocumentSettingAccess::BACKGROUND_PARA_OVER_DRAWINGS, bTmp);
+ }
+ break;
default:
throw UnknownPropertyException();
}
@@ -1133,6 +1141,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
rValue.setValue( &bTmp, ::getBooleanCppuType() );
}
break;
+ case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS:
+ {
+ sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::BACKGROUND_PARA_OVER_DRAWINGS );
+ rValue.setValue( &bTmp, ::getBooleanCppuType() );
+ }
+ break;
default:
throw UnknownPropertyException();
}