[Libreoffice-commits] core.git: Branch 'feature/gsoc-writer-char-borders' - 1485 commits - accessibility/bridge accessibility/source android/Bootstrap android/experimental avmedia/README avmedia/source basctl/source basegfx/source basic/source bean/qa binaryurp/source bin/distro-install-file-lists bin/distro-install-sdk bin/git-new-module-workdir bin/lo-commit-stat bin/lo-xlate-lang bin/moveglobalheaders.sh bin/striplanguagetags.sh boost/boost_1_44_0-gcc4.8.patch boost/boost.transform_width.patch boost/boost.wdeprecated-register.patch.0 boost/UnpackedTarball_boost.mk bridges/source cairo/cairo cairo/UnpackedTarball_cairo.mk canvas/README canvas/source chart2/AllLangResTarget_chartcontroller.mk chart2/Library_chartcontroller.mk chart2/Library_chartcore.mk chart2/source chart2/uiconfig codemaker/source comphelper/source compilerplugins/clang compilerplugins/Makefile-clang.mk config_host/config_features.h.in config_host/config_gcc.h.in config_host/config_global.h.in config_host.mk.in configm gr/source configure.ac connectivity/Library_postgresql-sdbc-impl.mk connectivity/source connectivity/workben cppcanvas/CppunitTest_cppcanvas_test.mk cppcanvas/Module_cppcanvas.mk cppcanvas/qa cppcanvas/README cppcanvas/source cppuhelper/test cppu/source cpputools/Module_cpputools.mk cpputools/Package_bin.mk cpputools/source cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk dbaccess/inc dbaccess/Library_dbu.mk dbaccess/source dbaccess/util desktop/Executable_officeloader.mk desktop/Module_desktop.mk desktop/Pagein_common.mk desktop/source desktop/unx dictionaries download.lst drawinglayer/Library_drawinglayer.mk drawinglayer/source dtrans/source editeng/CppunitTest_editeng_lookuptree.mk editeng/Library_editeng.mk editeng/qa editeng/source embeddedobj/source embedserv/source extensions/Library_npsoplugin.mk extensions/Library_pl.mk extensions/source external/Module_external.mk external/Package_msvc_dlls_debug.mk external/Package_msvc_dlls.mk extras/Custom Target_autocorr.mk extras/Gallery_arrows.mk extras/Gallery_diagrams.mk extras/Gallery_symbols.mk extras/Gallery_txtshapes.mk extras/Package_autocorr.mk extras/source fileaccess/source filter/inc filter/source filter/uiconfig filter/UIConfig_xsltdlg.mk forms/source formula/source fpicker/source framework/inc framework/Library_fwk.mk framework/Library_fwl.mk framework/source framework/util g helpcompiler/inc helpcompiler/Library_helplinker.mk helpcompiler/source helpcontent2 hsqldb/patches hsqldb/UnpackedTarball_hsqldb.mk hwpfilter/source i18nlangtag/source i18npool/CustomTarget_collator.mk i18npool/inc i18npool/Library_i18npool.mk i18npool/Library_localedata_others.mk i18npool/source i18npool/util icon-themes/crystal icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/oxygen icon-themes/README icon-themes/sifr icu/ExternalPackage_icu.mk icu/ExternalProject_icu.mk icu/icu4c.7601.Indic-ccmp.patch icu/icu4c.8198.revert.icu5431.patch icu/icu4c.9948.mlym-crash. patch icu/icu4c-build.patch icu/UnpackedTarball_icu.mk idlc/source idl/source include/basegfx include/canvas include/comphelper include/connectivity include/drawinglayer include/editeng include/filter include/formula include/framework include/i18nlangtag include/linguistic include/oox include/osl include/rtl include/sal include/sfx2 include/sot include/svl include/svtools include/svx include/test include/toolkit include/tools include/ucbhelper include/unotools include/vbahelper include/vcl include/xmloff instsetoo_native/CustomTarget_install.mk instsetoo_native/util ios/iosremote io/source io/test javaunohelper/com jvmfwk/plugins jvmfwk/source l10ntools/source libcmis/libcmis-0.3.0.patch libexttextcat/android.patch libexttextcat/ExternalProject_exttextcat.mk libexttextcat/UnpackedTarball_exttextcat.mk liblangtag/ExternalProject_langtag.mk liblangtag/liblangtag-0.5.1-mingw.patch libmwaw/libmwaw-0.1.9.patch.1 libmwaw/UnpackedTarball_libmwaw.mk Library_merged.mk librelogo/sourc e libvisio/libvisio-0.0.29-remove_whitespace.patch.1 libvisio/UnpackedTarball_libvisio.mk linguistic/source lotuswordpro/source lpsolve/lp_solve_5.5.patch Makefile.fetch Makefile.in mdds/0001-Avoid-crash-when-_GLIBCXX_DEBUG-is-defined.patch mdds/0001-Combine-these-two-calls.-There-is-no-reason-why-they.patch mdds/0001-Fix-it-here-too.patch mdds/0001-Workaround-for-an-old-gcc-bug.patch mdds/0001-Workaround-for-gcc-bug.patch mdds/mdds_0.7.0_unreachable_warning.patch.1 mdds/UnpackedTarball_mdds.mk mysqlcppconn/binding_config.h mysqlcppconn/config.h mysqlc/source nss/ExternalProject_nss.mk nss/nss-3.13.3-build.patch.3 nss/nss.patch nss/nss.wheader-guard.patch.0 nss/UnpackedTarball_nss.mk odk/config odk/CustomTarget_classes.mk odk/docs odk/examples odk/GeneratedPackage_uno_loader_classes.mk odk/Module_odk.mk odk/Package_examples.mk odk/Package_settings.mk odk/Package_uno_loader_classes.mk odk/settings odk/source offapi/com offapi/type_reference offapi/UnoApi_offapi.mk officecfg/C onfiguration_officecfg.mk officecfg/registry oox/Library_oox.mk oox/README oox/source package/inc package/source padmin/source poppler/ExternalPackage_poppler.mk poppler/ExternalProject_poppler.mk poppler/Makefile poppler/Module_poppler.mk poppler/poppler-notests.patch.1 poppler/poppler-snprintf.patch.1 poppler/README poppler/UnpackedTarball_poppler.mk postprocess/CustomTarget_signing.mk postprocess/signing pyuno/Library_pyuno_wrapper.mk pyuno/source qadevOOo/objdsc qadevOOo/testdocs qadevOOo/tests readlicense_oo/CustomTarget_readme.mk readlicense_oo/docs readlicense_oo/odt registry/source registry/test remotebridges/examples remotebridges/source reportbuilder/Package_reportbuilder-templates.mk reportbuilder/template reportdesign/source RepositoryExternal.mk RepositoryFixes.mk Repository.mk RepositoryModule_host.mk rsc/inc rsc/source sal/osl sal/qa sal/rtl sal/textenc sal/util sal/workben sax/qa sax/source sax/test scaddins/source sc/AllLangResTarget_sc.mk sc/CppunitTest_sc_ filters_test.mk sc/CppunitTest_sc_subsequent_export_test.mk sc/CppunitTest_sc_subsequent_filters_test.mk sc/CppunitTest_sc_ucalc.mk sc/inc sc/Library_sc.mk sc/Library_scqahelper.mk sc/Module_sc.mk scp2/AutoInstall.mk scp2/inc scp2/InstallModule_calc.mk scp2/InstallModule_ooo.mk scp2/source sc/qa scripting/source sc/sdi sc/source sc/uiconfig sc/UIConfig_scalc.mk sc/util sdext/Executable_xpdfimport.mk sdext/source sd/inc sd/qa sd/README sd/sdi sd/source sd/uiconfig setup_native/source sfx2/inc sfx2/Library_sfx.mk sfx2/sdi sfx2/source sfx2/uiconfig shell/Package_scripts.mk shell/source slideshow/README slideshow/source solenv/bin solenv/gbuild solenv/gdb sot/qa sot/source starmath/inc starmath/source starmath/uiconfig starmath/UIConfig_smath.mk stoc/source stoc/test store/source svgio/inc svgio/source svl/Library_svl.mk svl/README svl/source svl/unx svtools/inc svtools/source svx/AllLangResTarget_svx.mk svx/AllLangResTarget_textconversiondlgs.mk svx/Executable_gengal.bin.mk svx /inc svx/Library_svxcore.mk svx/Library_svx.mk svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk svx/util svx/workben sw/AllLangResTarget_sw.mk swext/mediawiki sw/inc sw/Library_swui.mk sw/PythonTest_sw_python.mk sw/qa sw/README sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk sysui/desktop sysui/Package_osxicons.mk test/source testtools/source tomcat/ExternalProject_tomcat.mk tomcat/Package_tomcat.mk tomcat/UnpackedTarball_tomcat.mk toolkit/AllLangResTarget_tk.mk toolkit/Library_tk.mk toolkit/Module_toolkit.mk toolkit/qa toolkit/source toolkit/util tools/inc tools/qa tools/source translations ucbhelper/source ucb/source ucb/workben udkapi/com unodevtools/source unotest/source unotools/source unoxml/source unusedcode.easy uui/source uui/uiconfig vbahelper/source vcl/android vcl/aqua vcl/coretext vcl/CppunitTest_vcl_complextext.mk vcl/CustomTarget_kde4_moc.mk vcl/generic vcl/headless vcl/inc vcl/ios vcl/Library_desktop_detector.mk vcl/Library_vcl.mk vcl/Library_vclplug_g en.mk vcl/Library_vclplug_gtk.mk vcl/Library_vclplug_kde4.mk vcl/Library_vclplug_kde.mk vcl/Library_vclplug_svp.mk vcl/Library_vclplug_tde.mk vcl/Module_vcl.mk vcl/qa vcl/README vcl/source vcl/StaticLibrary_headless.mk vcl/test vcl/unx vcl/win vcl/workben vigra/UnpackedTarball_vigra.mk vigra/vigra1.4.0-enumwarn.patch vigra/vigra1.4.0.patch vigra/vigra1.4.0-unused-parameters.patch vigra/vigra1.6.0.patch vigra/vigra1.6.0-unused-parameters.patch wizards/com writerfilter/CppunitTest_writerfilter_rtftok.mk writerfilter/CustomTarget_source.mk writerfilter/Library_writerfilter.mk writerfilter/Module_writerfilter.mk writerfilter/qa writerfilter/source xmlhelp/Library_ucpchelp1.mk xmlhelp/source xmloff/Library_xo.mk xmloff/source xmlreader/source xmlscript/source xmlsecurity/AllLangResTarget_xsec.mk xmlsecurity/inc xmlsecurity/qa xmlsecurity/source xpdf/ExternalPackage_xpdf.mk xpdf/ExternalProject_xpdf.mk xpdf/Makefile xpdf/Module_xpdf.mk xpdf/README xpdf/UnpackedTarball_xpdf.mk xpdf /xpdf-3.02-gfxColorMaxComps.patch xpdf/xpdf-3.02-ooopwd.patch xpdf/xpdf-3.02.patch xpdf/xpdf-no-writable-literals.patch
Zolnai Tamás
zolnaitamas2000 at gmail.com
Tue Jul 9 03:34:42 PDT 2013
Rebased ref, commits from common ancestor:
commit b5b15319f3497d98e9669d3a0ea3396b272f14fa
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Mon Jul 8 17:16:13 2013 +0200
Use optional member data for borders in SwFont
Change-Id: Ib7e51aea8253128178e534eb8281975959e59810
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index e09a08a..a9c5a98 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -27,6 +27,7 @@
#include <swtypes.hxx>
#include <drawfont.hxx> // SwDrawTextInfo
#include <editeng/borderline.hxx> // SvxBorderLine
+#include <boost/optional.hpp>
class SfxItemSet;
class SwAttrSet;
@@ -130,10 +131,10 @@ class SwFont
Color aOverColor; // color of the overlining
// character borders
- editeng::SvxBorderLine* m_pTopBorder;
- editeng::SvxBorderLine* m_pBottomBorder;
- editeng::SvxBorderLine* m_pRightBorder;
- editeng::SvxBorderLine* m_pLeftBorder;
+ boost::optional<editeng::SvxBorderLine> m_aTopBorder;
+ boost::optional<editeng::SvxBorderLine> m_aBottomBorder;
+ boost::optional<editeng::SvxBorderLine> m_aRightBorder;
+ boost::optional<editeng::SvxBorderLine> m_aLeftBorder;
sal_uInt8 nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
sal_uInt8 nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
@@ -181,10 +182,10 @@ public:
void SetRightBorder( const editeng::SvxBorderLine* pRightBorder );
void SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder );
- const editeng::SvxBorderLine* GetTopBorder() { return m_pTopBorder; }
- const editeng::SvxBorderLine* GetBottomBorder() { return m_pBottomBorder; }
- const editeng::SvxBorderLine* GetRightBorder() { return m_pRightBorder; }
- const editeng::SvxBorderLine* GetLeftBorder() { return m_pLeftBorder; }
+ const boost::optional<editeng::SvxBorderLine>& GetTopBorder() { return m_aTopBorder; }
+ const boost::optional<editeng::SvxBorderLine>& GetBottomBorder() { return m_aBottomBorder; }
+ const boost::optional<editeng::SvxBorderLine>& GetRightBorder() { return m_aRightBorder; }
+ const boost::optional<editeng::SvxBorderLine>& GetLeftBorder() { return m_aLeftBorder; }
inline void ChkMagic( ViewShell *pSh, sal_uInt8 nWhich )
{ if( !aSub[ nWhich ].pMagic ) GoMagic( pSh, nWhich ); }
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 5d40a10..a45aa61 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -79,41 +79,37 @@ void SwFont::SetBackColor( Color* pNewColor )
void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
{
- delete m_pTopBorder;
if( pTopBorder )
- m_pTopBorder = new editeng::SvxBorderLine(*pTopBorder);
+ m_aTopBorder = *pTopBorder;
else
- m_pTopBorder = 0;
+ m_aTopBorder = boost::none;
bFntChg = sal_True;
}
void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
{
- delete m_pBottomBorder;
if( pBottomBorder )
- m_pBottomBorder = new editeng::SvxBorderLine(*pBottomBorder);
+ m_aBottomBorder = *pBottomBorder;
else
- m_pBottomBorder = 0;
+ m_aBottomBorder = boost::none;
bFntChg = sal_True;
}
void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
{
- delete m_pRightBorder;
if( pRightBorder )
- m_pRightBorder = new editeng::SvxBorderLine(*pRightBorder);
+ m_aRightBorder = *pRightBorder;
else
- m_pRightBorder = 0;
+ m_aRightBorder = boost::none;
bFntChg = sal_True;
}
void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
{
- delete m_pLeftBorder;
if( pLeftBorder )
- m_pLeftBorder = new editeng::SvxBorderLine(*pLeftBorder);
+ m_aLeftBorder = *pLeftBorder;
else
- m_pLeftBorder = 0;
+ m_aLeftBorder = boost::none;
bFntChg = sal_True;
}
@@ -245,11 +241,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
delete pBackColor;
pBackColor = NULL;
- delete m_pTopBorder;
- delete m_pBottomBorder;
- delete m_pRightBorder;
- delete m_pLeftBorder;
- m_pTopBorder = m_pBottomBorder = m_pRightBorder = m_pLeftBorder = 0;
+ m_aTopBorder = m_aBottomBorder = m_aRightBorder = m_aLeftBorder = boost::none;
if( pAttrSet )
{
@@ -432,10 +424,10 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
sal_True, &pItem ))
{
- m_pTopBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetTop() );
- m_pBottomBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetBottom() );
- m_pRightBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetRight() );
- m_pLeftBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetLeft() );
+ m_aTopBorder = *((SvxBoxItem*)pItem)->GetTop();
+ m_aBottomBorder = *((SvxBoxItem*)pItem)->GetBottom();
+ m_aRightBorder = *((SvxBoxItem*)pItem)->GetRight();
+ m_aLeftBorder = *((SvxBoxItem*)pItem)->GetLeft();
}
const SfxPoolItem* pTwoLinesItem = 0;
if( SFX_ITEM_SET ==
@@ -460,10 +452,10 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
SwFont::SwFont()
: pBackColor(0)
- , m_pTopBorder(0)
- , m_pBottomBorder(0)
- , m_pRightBorder(0)
- , m_pLeftBorder(0)
+ , m_aTopBorder(boost::none)
+ , m_aBottomBorder(boost::none)
+ , m_aRightBorder(boost::none)
+ , m_aLeftBorder(boost::none)
, nActual(SW_LATIN)
{
}
@@ -475,10 +467,10 @@ SwFont::SwFont( const SwFont &rFont )
aSub[SW_CTL] = rFont.aSub[SW_CTL];
nActual = rFont.nActual;
pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL;
- m_pTopBorder = rFont.m_pTopBorder ? new editeng::SvxBorderLine( *rFont.m_pTopBorder ) : 0;
- m_pBottomBorder = rFont.m_pBottomBorder ? new editeng::SvxBorderLine( *rFont.m_pBottomBorder ) : 0;
- m_pRightBorder = rFont.m_pRightBorder ? new editeng::SvxBorderLine( *rFont.m_pRightBorder ) : 0;
- m_pLeftBorder = rFont.m_pLeftBorder ? new editeng::SvxBorderLine( *rFont.m_pLeftBorder ) : 0;
+ m_aTopBorder = rFont.m_aTopBorder;
+ m_aBottomBorder = rFont.m_aBottomBorder;
+ m_aRightBorder = rFont.m_aRightBorder;
+ m_aLeftBorder = rFont.m_aLeftBorder;
aUnderColor = rFont.GetUnderColor();
aOverColor = rFont.GetOverColor();
nToxCnt = 0;
@@ -605,13 +597,13 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
sal_True, &pItem ))
{
- m_pTopBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetTop() );
- m_pBottomBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetBottom() );
- m_pRightBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetRight() );
- m_pLeftBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetLeft() );
+ m_aTopBorder = *((SvxBoxItem*)pItem)->GetTop();
+ m_aBottomBorder = *((SvxBoxItem*)pItem)->GetBottom();
+ m_aRightBorder = *((SvxBoxItem*)pItem)->GetRight();
+ m_aLeftBorder = *((SvxBoxItem*)pItem)->GetLeft();
}
else
- m_pTopBorder = m_pBottomBorder = m_pRightBorder = m_pLeftBorder = 0;
+ m_aTopBorder = m_aBottomBorder = m_aRightBorder = m_aLeftBorder = boost::none;
const SvxTwoLinesItem& rTwoLinesItem = pAttrSet->Get2Lines();
if ( ! rTwoLinesItem.GetValue() )
@@ -629,10 +621,6 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SwFont::~SwFont()
{
delete pBackColor;
- delete m_pTopBorder;
- delete m_pBottomBorder;
- delete m_pRightBorder;
- delete m_pLeftBorder;
}
SwSubFont& SwSubFont::operator=( const SwSubFont &rFont )
@@ -656,14 +644,10 @@ SwFont& SwFont::operator=( const SwFont &rFont )
nActual = rFont.nActual;
delete pBackColor;
pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL;
- delete m_pTopBorder;
- delete m_pBottomBorder;
- delete m_pRightBorder;
- delete m_pLeftBorder;
- m_pTopBorder = rFont.m_pTopBorder ? new editeng::SvxBorderLine( *rFont.m_pTopBorder ) : 0;
- m_pBottomBorder = rFont.m_pBottomBorder ? new editeng::SvxBorderLine( *rFont.m_pBottomBorder ) : 0;
- m_pRightBorder = rFont.m_pRightBorder ? new editeng::SvxBorderLine( *rFont.m_pRightBorder ) : 0;
- m_pLeftBorder = rFont.m_pLeftBorder ? new editeng::SvxBorderLine( *rFont.m_pLeftBorder ) : 0;
+ m_aTopBorder = rFont.m_aTopBorder;
+ m_aBottomBorder = rFont.m_aBottomBorder;
+ m_aRightBorder = rFont.m_aRightBorder;
+ m_aLeftBorder = rFont.m_aLeftBorder;
aUnderColor = rFont.GetUnderColor();
aOverColor = rFont.GetOverColor();
nToxCnt = 0;
commit c3e43fa518d4833fa6a1195097a5441567eb0745
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sun Jul 7 21:13:55 2013 +0200
Update comment
Change-Id: I26dd6b741b538da1c372534b55870c22ebd3d046
diff --git a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
index d03e749..c0f225e 100644
--- a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
@@ -37,9 +37,9 @@ namespace drawinglayer
/** BorderLinePrimitive2D class
This is the basic primitive to build frames around objects, e.g. tables.
- It defines a single or double line from Start to nd using the LeftWidth,
+ It defines a single or double line from Start to End using the LeftWidth,
Distance and RightWidth definitions.
- The LineStart/End overlap is defined by the Extend(Inner|Outer)(Start|End)
+ The LineStart/End overlap is defined by the Extend(Left|Right)(Start|End)
definitions.
*/
class DRAWINGLAYER_DLLPUBLIC BorderLinePrimitive2D : public BufferedDecompositionPrimitive2D
commit 2b36123ed8c3e7c9decc02b6ae863798b21543aa
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sun Jul 7 20:33:40 2013 +0200
CharBrd 2: new character attribute
- Add new character attribute id
- Update attribute set and attribute stack
- Convert character set item to general item and back
when execute "Borders" tab page.
- Add new SwFont attributes for different borders
(top, bottom, right, left) This will be used for
painting.
Change-Id: I344babc3645931537cfa37d64f1f6c6c02c1cee3
diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx
index 886437a..5ac0b34 100644
--- a/sw/inc/charatr.hxx
+++ b/sw/inc/charatr.hxx
@@ -99,6 +99,8 @@ inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( sal_Bool bInP ) const
{ return (const SvxCharReliefItem&)Get( RES_CHRATR_RELIEF, bInP ); }
inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( sal_Bool bInP ) const
{ return (const SvxCharHiddenItem&)Get( RES_CHRATR_HIDDEN, bInP ); }
+inline const SvxBoxItem &SwAttrSet::GetCharBorder( sal_Bool bInP ) const
+ { return (const SvxBoxItem&)Get( RES_CHRATR_BOX, bInP ); }
// implementation of the character attribute methods of SwFmt
@@ -160,6 +162,8 @@ inline const SvxCharReliefItem &SwFmt::GetCharRelief( sal_Bool bInP ) const
{ return aSet.GetCharRelief(bInP); }
inline const SvxCharHiddenItem &SwFmt::GetCharHidden( sal_Bool bInP ) const
{ return aSet.GetCharHidden(bInP); }
+inline const SvxBoxItem &SwFmt::GetCharBorder( sal_Bool bInP ) const
+ { return aSet.GetCharBorder(bInP); }
#endif
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index bf565f4..09dde27 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -209,6 +209,7 @@ public:
inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const;
inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const;
inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const;
+ inline const SvxBoxItem &GetCharBorder( sal_Bool = sal_True ) const;
/// Frame-attributes - implemented in frmatr.hxx.
inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const;
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 83afbcd..3a26776 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -87,8 +87,8 @@ RES_CHRATR_BEGIN = HINT_BEGIN,
RES_CHRATR_RELIEF, // 36
RES_CHRATR_HIDDEN, // 37
RES_CHRATR_OVERLINE, // 38
- RES_CHRATR_RSID, // 39
- RES_CHRATR_DUMMY1, // 40
+ RES_CHRATR_RSID, // 39
+ RES_CHRATR_BOX, // 40
RES_CHRATR_END
};
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index 51d7afd..492bd11 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -252,6 +252,7 @@ public:
inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const;
inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const;
inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const;
+ inline const SvxBoxItem &GetCharBorder( sal_Bool = sal_True ) const;
// Frame attributes. Implementation in frmatr.hxx.
inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const;
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index e6af8f9..f260c64 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -287,7 +287,7 @@ SfxItemInfo aSlotTab[] =
{ SID_ATTR_CHAR_HIDDEN, SFX_ITEM_POOLABLE }, // RES_CHRATR_HIDDEN
{ SID_ATTR_CHAR_OVERLINE, SFX_ITEM_POOLABLE }, // RES_CHRATR_OVERLINE
{ 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_RSID
- { 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_DUMMY1
+ { 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_BOX
{ 0, 0 }, // RES_TXTATR_REFMARK
{ 0, 0 }, // RES_TXTATR_TOXMARK
@@ -494,9 +494,7 @@ void _InitCore()
aAttrTab[ RES_CHRATR_RELIEF - POOLATTR_BEGIN ] = new SvxCharReliefItem( RELIEF_NONE, RES_CHRATR_RELIEF );
aAttrTab[ RES_CHRATR_HIDDEN - POOLATTR_BEGIN ] = new SvxCharHiddenItem( sal_False, RES_CHRATR_HIDDEN );
aAttrTab[ RES_CHRATR_OVERLINE- POOLATTR_BEGIN ] = new SvxOverlineItem( UNDERLINE_NONE, RES_CHRATR_OVERLINE );
-
-// CharakterAttr - Dummies
- aAttrTab[ RES_CHRATR_DUMMY1 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_CHRATR_DUMMY1 );
+ aAttrTab[ RES_CHRATR_BOX - POOLATTR_BEGIN ] = new SvxBoxItem( RES_CHRATR_BOX );
aAttrTab[ RES_TXTATR_AUTOFMT- POOLATTR_BEGIN ] = new SwFmtAutoFmt;
aAttrTab[ RES_TXTATR_INETFMT - POOLATTR_BEGIN ] = new SwFmtINetFmt( aEmptyStr, aEmptyStr );
@@ -691,7 +689,10 @@ void _InitCore()
SwAttrPool::pVersionMap5[ i-1 ] = i + 6;
// 6. version:
+ // RES_CHARATR_OVERLINE
// new character attribute for overlining plus 2 dummies
+ // 1. dummy -> RES_CHRATR_RSID
+ // 2. dummy -> RES_CHRATR_BOX
SwAttrPool::pVersionMap6 = new sal_uInt16[ 136 ];
for( i = 1; i <= 37; i++ )
SwAttrPool::pVersionMap6[ i-1 ] = i;
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index efd10b7..4dd024a 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -160,6 +160,7 @@ map<sal_uInt16,String,CompareUShort> & GetItemWhichMap()
aItemWhichMap[RES_CHRATR_SCALEW] = String("CHRATR_SCALEW", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_CHRATR_RELIEF] = String("CHRATR_RELIEF", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_CHRATR_HIDDEN] = String("CHRATR_HIDDEN", RTL_TEXTENCODING_ASCII_US);
+ aItemWhichMap[RES_CHRATR_BOX] = String("CHRATR_BOX", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_TXTATR_AUTOFMT] = String("TXTATR_AUTOFMT", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_TXTATR_INETFMT] = String("TXTATR_INETFMT", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_TXTATR_REFMARK] = String("TXTATR_REFMARK", RTL_TEXTENCODING_ASCII_US);
diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx
index e908c84..d790581 100644
--- a/sw/source/core/inc/swfntcch.hxx
+++ b/sw/source/core/inc/swfntcch.hxx
@@ -21,7 +21,7 @@
#include <tools/mempool.hxx>
-#define NUM_DEFAULT_VALUES 36
+#define NUM_DEFAULT_VALUES 37
#include "swcache.hxx"
#include "swfont.hxx"
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index a023dc2..e09a08a 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -26,6 +26,7 @@
#include <editeng/svxfont.hxx>
#include <swtypes.hxx>
#include <drawfont.hxx> // SwDrawTextInfo
+#include <editeng/borderline.hxx> // SvxBorderLine
class SfxItemSet;
class SwAttrSet;
@@ -127,6 +128,13 @@ class SwFont
Color* pBackColor; // background color (i.e. at character styles)
Color aUnderColor; // color of the underlining
Color aOverColor; // color of the overlining
+
+ // character borders
+ editeng::SvxBorderLine* m_pTopBorder;
+ editeng::SvxBorderLine* m_pBottomBorder;
+ editeng::SvxBorderLine* m_pRightBorder;
+ editeng::SvxBorderLine* m_pLeftBorder;
+
sal_uInt8 nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
sal_uInt8 nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
sal_uInt8 m_nMetaCount; // count META/METAFIELD
@@ -144,7 +152,7 @@ class SwFont
sal_Bool bNoColReplace :1; // Replacement without colormanipulation
protected:
- inline SwFont() { pBackColor = NULL; nActual = SW_LATIN; }
+ SwFont();
public:
SwFont( const SwAttrSet* pSet, const IDocumentSettingAccess* pIDocumentSettingAccess );
@@ -153,7 +161,7 @@ public:
inline void ChgFnt( ViewShell *pSh, OutputDevice& rOut )
{ bPaintBlank = aSub[nActual].ChgFnt( pSh, rOut ); }
- ~SwFont(){ delete pBackColor; }
+ ~SwFont();
SwFont& operator=( const SwFont &rFont );
@@ -167,6 +175,17 @@ public:
void SetBackColor( Color* pNewColor );
inline const Color* GetBackColor() const{ return pBackColor; }
+ // set/get borders
+ void SetTopBorder( const editeng::SvxBorderLine* pTopBorder );
+ void SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder );
+ void SetRightBorder( const editeng::SvxBorderLine* pRightBorder );
+ void SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder );
+
+ const editeng::SvxBorderLine* GetTopBorder() { return m_pTopBorder; }
+ const editeng::SvxBorderLine* GetBottomBorder() { return m_pBottomBorder; }
+ const editeng::SvxBorderLine* GetRightBorder() { return m_pRightBorder; }
+ const editeng::SvxBorderLine* GetLeftBorder() { return m_pLeftBorder; }
+
inline void ChkMagic( ViewShell *pSh, sal_uInt8 nWhich )
{ if( !aSub[ nWhich ].pMagic ) GoMagic( pSh, nWhich ); }
// uebernimmt die MagicNumber eines (hoffentlich ident.) Kollegen
diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index a5a2782..24c5f91 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -21,7 +21,7 @@
#define _ATRHNDL_HXX
#define INITIAL_NUM_ATTR 3
-#define NUM_ATTRIBUTE_STACKS 40
+#define NUM_ATTRIBUTE_STACKS 41
#include <txatbase.hxx>
#include <swfntcch.hxx>
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index 2747f26..99fef3d 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -42,6 +42,7 @@
#include <editeng/charscaleitem.hxx>
#include <editeng/twolinesitem.hxx>
#include <editeng/charhiddenitem.hxx>
+#include <editeng/boxitem.hxx>
#include <viewopt.hxx>
#include <charfmt.hxx>
#include <fchrfmt.hxx>
@@ -62,7 +63,7 @@
* stack, the top most attribute on the stack is valid. Because some
* kinds of attributes have to be pushed to the same stacks we map their
* ids to stack ids
- * Attention: The first NUM_DEFAULT_VALUES ( defined in swfntcch.hxx == 35 )
+ * Attention: The first NUM_DEFAULT_VALUES ( defined in swfntcch.hxx )
* are stored in the defaultitem-cache, if you add one, you have to increase
* NUM_DEFAULT_VALUES.
* Also adjust NUM_ATTRIBUTE_STACKS in atrhndl.hxx.
@@ -111,15 +112,15 @@ const sal_uInt8 StackPos[ static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
34, // RES_CHRATR_HIDDEN, // 37
35, // RES_CHRATR_OVERLINE, // 38
0, // RES_CHRATR_RSID, // 39
- 0, // RES_CHRATR_DUMMY1, // 40
- 36, // RES_TXTATR_REFMARK, // 41
- 37, // RES_TXTATR_TOXMARK, // 42
- 38, // RES_TXTATR_META, // 43
- 38, // RES_TXTATR_METAFIELD, // 44
+ 36, // RES_CHRATR_BOX, // 40
+ 37, // RES_TXTATR_REFMARK, // 41
+ 38, // RES_TXTATR_TOXMARK, // 42
+ 39, // RES_TXTATR_META, // 43
+ 39, // RES_TXTATR_METAFIELD, // 44
0, // RES_TXTATR_AUTOFMT, // 45
0, // RES_TXTATR_INETFMT // 46
0, // RES_TXTATR_CHARFMT, // 47
- 39, // RES_TXTATR_CJK_RUBY, // 48
+ 40, // RES_TXTATR_CJK_RUBY, // 48
0, // RES_TXTATR_UNKNOWN_CONTAINER, // 49
0, // RES_TXTATR_DUMMY5 // 50
};
@@ -743,6 +744,12 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
}
break;
}
+ case RES_CHRATR_BOX:
+ rFnt.SetTopBorder( ((SvxBoxItem&)rItem).GetTop() );
+ rFnt.SetBottomBorder( ((SvxBoxItem&)rItem).GetBottom() );
+ rFnt.SetRightBorder( ((SvxBoxItem&)rItem).GetRight() );
+ rFnt.SetLeftBorder( ((SvxBoxItem&)rItem).GetLeft() );
+ break;
case RES_CHRATR_OVERLINE :
rFnt.SetOverline( ((SvxOverlineItem&)rItem).GetLineStyle() );
rFnt.SetOverColor( ((SvxOverlineItem&)rItem).GetColor() );
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 977b6d2..5d40a10 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -48,6 +48,7 @@
#include <editeng/charrotateitem.hxx>
#include <editeng/twolinesitem.hxx>
#include <editeng/charhiddenitem.hxx>
+#include <editeng/boxitem.hxx>
#include <IDocumentSettingAccess.hxx>
#include <vcl/window.hxx>
#include <charatr.hxx>
@@ -76,6 +77,46 @@ void SwFont::SetBackColor( Color* pNewColor )
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
}
+void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
+{
+ delete m_pTopBorder;
+ if( pTopBorder )
+ m_pTopBorder = new editeng::SvxBorderLine(*pTopBorder);
+ else
+ m_pTopBorder = 0;
+ bFntChg = sal_True;
+}
+
+void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
+{
+ delete m_pBottomBorder;
+ if( pBottomBorder )
+ m_pBottomBorder = new editeng::SvxBorderLine(*pBottomBorder);
+ else
+ m_pBottomBorder = 0;
+ bFntChg = sal_True;
+}
+
+void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
+{
+ delete m_pRightBorder;
+ if( pRightBorder )
+ m_pRightBorder = new editeng::SvxBorderLine(*pRightBorder);
+ else
+ m_pRightBorder = 0;
+ bFntChg = sal_True;
+}
+
+void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
+{
+ delete m_pLeftBorder;
+ if( pLeftBorder )
+ m_pLeftBorder = new editeng::SvxBorderLine(*pLeftBorder);
+ else
+ m_pLeftBorder = 0;
+ bFntChg = sal_True;
+}
+
// maps directions for vertical layout
sal_uInt16 MapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat )
{
@@ -204,6 +245,12 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
delete pBackColor;
pBackColor = NULL;
+ delete m_pTopBorder;
+ delete m_pBottomBorder;
+ delete m_pRightBorder;
+ delete m_pLeftBorder;
+ m_pTopBorder = m_pBottomBorder = m_pRightBorder = m_pLeftBorder = 0;
+
if( pAttrSet )
{
const SfxPoolItem* pItem;
@@ -382,8 +429,14 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
sal_True, &pItem ))
pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() );
- else
- pBackColor = NULL;
+ if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
+ sal_True, &pItem ))
+ {
+ m_pTopBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetTop() );
+ m_pBottomBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetBottom() );
+ m_pRightBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetRight() );
+ m_pLeftBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetLeft() );
+ }
const SfxPoolItem* pTwoLinesItem = 0;
if( SFX_ITEM_SET ==
pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, sal_True, &pTwoLinesItem ))
@@ -405,6 +458,16 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
* class SwFont
*************************************************************************/
+SwFont::SwFont()
+ : pBackColor(0)
+ , m_pTopBorder(0)
+ , m_pBottomBorder(0)
+ , m_pRightBorder(0)
+ , m_pLeftBorder(0)
+ , nActual(SW_LATIN)
+{
+}
+
SwFont::SwFont( const SwFont &rFont )
{
aSub[SW_LATIN] = rFont.aSub[SW_LATIN];
@@ -412,6 +475,10 @@ SwFont::SwFont( const SwFont &rFont )
aSub[SW_CTL] = rFont.aSub[SW_CTL];
nActual = rFont.nActual;
pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL;
+ m_pTopBorder = rFont.m_pTopBorder ? new editeng::SvxBorderLine( *rFont.m_pTopBorder ) : 0;
+ m_pBottomBorder = rFont.m_pBottomBorder ? new editeng::SvxBorderLine( *rFont.m_pBottomBorder ) : 0;
+ m_pRightBorder = rFont.m_pRightBorder ? new editeng::SvxBorderLine( *rFont.m_pRightBorder ) : 0;
+ m_pLeftBorder = rFont.m_pLeftBorder ? new editeng::SvxBorderLine( *rFont.m_pLeftBorder ) : 0;
aUnderColor = rFont.GetUnderColor();
aOverColor = rFont.GetOverColor();
nToxCnt = 0;
@@ -534,6 +601,18 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() );
else
pBackColor = NULL;
+
+ if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
+ sal_True, &pItem ))
+ {
+ m_pTopBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetTop() );
+ m_pBottomBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetBottom() );
+ m_pRightBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetRight() );
+ m_pLeftBorder = new editeng::SvxBorderLine(*((SvxBoxItem*)pItem)->GetLeft() );
+ }
+ else
+ m_pTopBorder = m_pBottomBorder = m_pRightBorder = m_pLeftBorder = 0;
+
const SvxTwoLinesItem& rTwoLinesItem = pAttrSet->Get2Lines();
if ( ! rTwoLinesItem.GetValue() )
SetVertical( pAttrSet->GetCharRotate().GetValue() );
@@ -547,6 +626,15 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
}
}
+SwFont::~SwFont()
+{
+ delete pBackColor;
+ delete m_pTopBorder;
+ delete m_pBottomBorder;
+ delete m_pRightBorder;
+ delete m_pLeftBorder;
+}
+
SwSubFont& SwSubFont::operator=( const SwSubFont &rFont )
{
SvxFont::operator=( rFont );
@@ -568,6 +656,14 @@ SwFont& SwFont::operator=( const SwFont &rFont )
nActual = rFont.nActual;
delete pBackColor;
pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL;
+ delete m_pTopBorder;
+ delete m_pBottomBorder;
+ delete m_pRightBorder;
+ delete m_pLeftBorder;
+ m_pTopBorder = rFont.m_pTopBorder ? new editeng::SvxBorderLine( *rFont.m_pTopBorder ) : 0;
+ m_pBottomBorder = rFont.m_pBottomBorder ? new editeng::SvxBorderLine( *rFont.m_pBottomBorder ) : 0;
+ m_pRightBorder = rFont.m_pRightBorder ? new editeng::SvxBorderLine( *rFont.m_pRightBorder ) : 0;
+ m_pLeftBorder = rFont.m_pLeftBorder ? new editeng::SvxBorderLine( *rFont.m_pLeftBorder ) : 0;
aUnderColor = rFont.GetUnderColor();
aOverColor = rFont.GetOverColor();
nToxCnt = 0;
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index db343f0..20ea303 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3717,7 +3717,7 @@ SwAttrFnTab aCSS1AttrFnTab = {
/* RES_CHRATR_HIDDEN */ OutCSS1_SvxHidden,
/* RES_CHRATR_OVERLINE */ OutCSS1_SvxOverline,
/* RES_CHRATR_RSID */ 0,
-/* RES_CHRATR_DUMMY1 */ 0,
+/* RES_CHRATR_BOX */ 0,
/* RES_TXTATR_REFMARK */ 0,
/* RES_TXTATR_TOXMARK */ 0,
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 2ce7beb..7206f96 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -3234,7 +3234,7 @@ SwAttrFnTab aHTMLAttrFnTab = {
/* RES_CHRATR_HIDDEN */ OutHTML_CSS1Attr,
/* RES_CHRATR_OVERLINE */ OutHTML_CSS1Attr,
/* RES_CHRATR_RSID */ 0,
-/* RES_CHRATR_DUMMY1 */ 0,
+/* RES_CHRATR_BOX */ 0,
/* RES_TXTATR_REFMARK */ 0,
/* RES_TXTATR_TOXMARK */ 0,
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 92c06c4..b5145bd 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -35,6 +35,7 @@
#include <sfx2/printer.hxx>
#include <svl/macitem.hxx>
#include <editeng/brushitem.hxx>
+#include <editeng/boxitem.hxx>
#include <svl/stritem.hxx>
#include <svl/languageoptions.hxx>
#include <editeng/eeitem.hxx>
@@ -577,6 +578,15 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl)
aTmpSet.Put( aTmpBrush );
}
aTmpSet.ClearItem( RES_BACKGROUND );
+
+ const SfxPoolItem *pTmpBox;
+ if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BOX, sal_False, &pTmpBox ) )
+ {
+ SvxBoxItem aTmpBox( *((SvxBoxItem*)pTmpBox) );
+ aTmpBox.SetWhich( RES_CHRATR_BOX );
+ aTmpSet.Put( aTmpBox );
+ }
+ aTmpSet.ClearItem( RES_BOX );
}
m_xTmp->SetItemSet( aTmpSet );
@@ -743,6 +753,18 @@ sal_uInt16 SwDocShell::Edit(
aTmpBrush.SetWhich( RES_BACKGROUND );
rSet.Put( aTmpBrush );
}
+ else
+ rSet.ClearItem(RES_BACKGROUND);
+
+ const SfxPoolItem *pTmpBox;
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BOX, sal_True, &pTmpBox ) )
+ {
+ SvxBoxItem aTmpBox( *((SvxBoxItem*)pTmpBox) );
+ aTmpBox.SetWhich( RES_BOX );
+ rSet.Put( aTmpBox );
+ }
+ else
+ rSet.ClearItem(RES_BOX);
}
if (!bBasic)
{
@@ -822,6 +844,15 @@ sal_uInt16 SwDocShell::Edit(
aTmpSet.Put( aTmpBrush );
}
aTmpSet.ClearItem( RES_BACKGROUND );
+
+ const SfxPoolItem *pTmpBox;
+ if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BOX, sal_False, &pTmpBox ) )
+ {
+ SvxBoxItem aTmpBox( *((SvxBoxItem*)pTmpBox) );
+ aTmpBox.SetWhich( RES_CHRATR_BOX );
+ aTmpSet.Put( aTmpBox );
+ }
+ aTmpSet.ClearItem( RES_BOX );
}
xTmp->SetItemSet( aTmpSet );
}
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 5def5e9..4dc1041 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -118,6 +118,7 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , "GetTabPageRangesFunc fail!");
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
+
SAL_WARN_IF(!pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "sw.fmtui", "GetTabPageCreatorFunc fail!");
SAL_WARN_IF(!pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "sw.fmtui", "GetTabPageRangesFunc fail!");
AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 8a4a78f..58e42d9 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -46,6 +46,7 @@
#include <editeng/colritem.hxx>
#include <editeng/tstpitem.hxx>
#include <editeng/brushitem.hxx>
+#include <editeng/boxitem.hxx>
#include <editeng/svxacorr.hxx>
#include <svl/cjkoptions.hxx>
#include <svl/ctloptions.hxx>
@@ -139,6 +140,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_BACKGROUND, RES_BACKGROUND,
+ RES_BOX, RES_BOX,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
FN_PARAM_SELECTION, FN_PARAM_SELECTION,
SID_HTML_MODE, SID_HTML_MODE,
@@ -175,6 +177,20 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
aTmpBrush.SetWhich( RES_BACKGROUND );
aCoreSet.Put( aTmpBrush );
}
+ else
+ aCoreSet.ClearItem(RES_BACKGROUND);
+
+ // The CHRATR_BOX attribute will be converted for the
+ // dialogue in a RES_BOX and back again ...
+ const SfxPoolItem *pTmpBox;
+ if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BOX, sal_True, &pTmpBox ) )
+ {
+ SvxBoxItem aTmpBox( *((SvxBoxItem*)pTmpBox) );
+ aTmpBox.SetWhich( RES_BOX );
+ aCoreSet.Put( aTmpBox );
+ }
+ else
+ aCoreSet.ClearItem(RES_BOX);
// Setting the BoxInfo
::PrepareBoxInfo( aCoreSet, rWrtSh );
@@ -213,9 +229,16 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
aTmpSet.Put( aTmpBrush );
}
-
aTmpSet.ClearItem( RES_BACKGROUND );
+ if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BOX, sal_False, &pTmpBox ) )
+ {
+ SvxBoxItem aTmpBox( *((SvxBoxItem*)pTmpBox) );
+ aTmpBox.SetWhich( RES_CHRATR_BOX );
+ aTmpSet.Put( aTmpBox );
+ }
+ aTmpSet.ClearItem( RES_BOX );
+
const SfxPoolItem* pSelectionItem;
sal_Bool bInsert = sal_False;
xub_StrLen nInsert = 0;
commit 0a30a7a2135a5e0e53e84d6fc7c13476394dd813
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sun Jul 7 20:24:11 2013 +0200
Remove useless private operator==() from SwFont
Change-Id: I7cbc6cc1c55afe0906cacda571c9ed8dd7fd8dd7
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 00a147d..a023dc2 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -62,7 +62,6 @@ class SwSubFont : public SvxFont
inline void CopyMagic( const SwSubFont& rFnt )
{ pMagic = rFnt.pMagic; nFntIndex = rFnt.nFntIndex; }
- sal_Bool operator==( const SwFont &rFnt ) const;
SwSubFont& operator=( const SwSubFont &rFont );
short _CheckKerning( );
@@ -144,8 +143,6 @@ class SwFont
sal_Bool bGreyWave :1; // Fuers extended TextInput: Graue Wellenlinie
sal_Bool bNoColReplace :1; // Replacement without colormanipulation
- sal_Bool operator==( const SwFont &rFnt ) const;
-
protected:
inline SwFont() { pBackColor = NULL; nActual = SW_LATIN; }
commit c5c97e7fa4732acf2891e61d7d4b3b48153ad01b
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Wed Jun 26 18:18:25 2013 +0200
CharBrd 1: Add Borders tab page
- Differentiate character dialog types
(border is available only for simple text)
- Tab page must be added for two dialog(SwCharDlg and SwTemplateDlg)
- SvxBoxInfoItem (SID_ATTR_BORDER_INNER) is initialized
before execute dialog (used as input).
Change-Id: I73723a018b6cf4cd292ba44b1bd7e1af3c6a6deb
diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
index 0b2ea7a..e6523dd 100644
--- a/include/svx/flagsdef.hxx
+++ b/include/svx/flagsdef.hxx
@@ -22,10 +22,12 @@
// defines ---------------------------------------------------------------
// copy from border.hxx
-// Border-Modes for paragraphs, textframes and tables
+// Border-Modes for SvxBorderTabPage
#define SW_BORDER_MODE_PARA 0x01
#define SW_BORDER_MODE_TABLE 0x02
#define SW_BORDER_MODE_FRAME 0x04
+//#define SW_BORDER_MODE_PAGE 0x08
+//#define SW_BORDER_MODE_CHAR 0x10
// flags for SvxBackgroundTabPage
#define SVX_SHOW_SELECTOR 0x01
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index fb00553..88fdea4 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -340,7 +340,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh) = 0; // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) = 0; //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False) = 0; // add for SwCharDlg
+ sal_uInt8 nDialogMode, const String* pFmtStr = 0) = 0; // add for SwCharDlg
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable) = 0; //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId) = 0; //add for SwCaptionDialog
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 016e419..886e3cf 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -1034,15 +1034,7 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR:
- {
- OSL_ENSURE(pCharFmt, "Where's SwCharFmt");
- aCoreSet.Put(pCharFmt->GetAttrSet());
-
- if(pCharFmt->DerivedFrom())
- aCoreSet.SetParent(&pCharFmt->DerivedFrom()->GetAttrSet());
- }
- break;
- case SFX_STYLE_FAMILY_PARA :
+ case SFX_STYLE_FAMILY_PARA:
case SFX_STYLE_FAMILY_FRAME:
{
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
@@ -1052,7 +1044,17 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
aBoxInfo.SetDefDist( MIN_BORDER_DIST );// always set Default-Gap
// Single lines can only have DontCare-Status in tables
aBoxInfo.SetValid( VALID_DISABLE, sal_True );
- if ( nFamily == SFX_STYLE_FAMILY_PARA )
+
+ if( nFamily == SFX_STYLE_FAMILY_CHAR )
+ {
+ SAL_WARN_IF(!pCharFmt, "sw.app.docstyle", "Where's SwCharFmt");
+ aCoreSet.Put(pCharFmt->GetAttrSet());
+ aCoreSet.Put( aBoxInfo );
+
+ if(pCharFmt->DerivedFrom())
+ aCoreSet.SetParent(&pCharFmt->DerivedFrom()->GetAttrSet());
+ }
+ else if ( nFamily == SFX_STYLE_FAMILY_PARA )
{
OSL_ENSURE(pColl, "Where's Collection");
aCoreSet.Put(pColl->GetAttrSet());
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index ac6df95..510cbec 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -41,6 +41,7 @@
#include <globals.hrc>
#include <chrdlg.hrc>
+#include <chrdlgmodes.hxx>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <SwStyleNameMapper.hxx>
@@ -58,11 +59,11 @@ using namespace ::com::sun::star::uno;
using namespace ::sfx2;
SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
- const String* pStr, bool bIsDrwTxtDlg)
+ sal_uInt8 nDialogMode, const String* pStr)
: SfxTabDialog(0, pParent, "CharacterPropertiesDialog",
"modules/swriter/ui/characterproperties.ui", &rCoreSet, pStr != 0)
- , rView(rVw)
- , bIsDrwTxtMode(bIsDrwTxtDlg)
+ , m_rView(rVw)
+ , m_nDialogMode(nDialogMode)
{
if(pStr)
{
@@ -80,9 +81,10 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
m_nCharTwoId = AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 0 );
m_nCharUrlId = AddTabPage("hyperlink", SwCharURLPage::Create, 0);
m_nCharBgdId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
+ m_nCharBrdId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0 );
SvtCJKOptions aCJKOptions;
- if(bIsDrwTxtMode)
+ if(m_nDialogMode == DLG_CHAR_DRAW || m_nDialogMode == DLG_CHAR_ANN)
{
RemoveTabPage(m_nCharUrlId);
RemoveTabPage(m_nCharBgdId);
@@ -90,6 +92,9 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
}
else if(!aCJKOptions.IsDoubleLinesEnabled())
RemoveTabPage(m_nCharTwoId);
+
+ if(m_nDialogMode != DLG_CHAR_STD)
+ RemoveTabPage(m_nCharBrdId);
}
SwCharDlg::~SwCharDlg()
@@ -106,15 +111,15 @@ void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
if (nId == m_nCharStdId)
{
SvxFontListItem aFontListItem( *( (SvxFontListItem*)
- ( rView.GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) ) );
+ ( m_rView.GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) ) );
aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
- if(!bIsDrwTxtMode)
- aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_PREVIEW_CHARACTER));
+ if(m_nDialogMode != DLG_CHAR_DRAW && m_nDialogMode != DLG_CHAR_ANN)
+ aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_PREVIEW_CHARACTER));
rPage.PageCreated(aSet);
}
else if (nId == m_nCharExtId)
{
- if(bIsDrwTxtMode)
+ if(m_nDialogMode == DLG_CHAR_DRAW || m_nDialogMode == DLG_CHAR_ANN)
aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
else
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 3d13fb8..6267d2d 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -706,10 +706,10 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView&
// add for SwCharDlg
SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw,
- const SfxItemSet& rCoreSet, const String* pFmtStr, sal_Bool bIsDrwTxtDlg)
+ const SfxItemSet& rCoreSet, sal_uInt8 nDialogMode, const String* pFmtStr)
{
- SfxTabDialog* pDlg = new SwCharDlg(pParent, pVw, rCoreSet, pFmtStr, bIsDrwTxtDlg);
+ SfxTabDialog* pDlg = new SwCharDlg(pParent, pVw, rCoreSet, nDialogMode, pFmtStr);
return new AbstractTabDialog_Impl(pDlg);
}
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 982fa0d..07aaeb4 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -444,7 +444,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh); // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw); //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False); // add for SwCharDlg
+ sal_uInt8 nDialogMode, const String* pFmtStr = 0); // add for SwCharDlg
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable); //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId); //add for SwCaptionDialog
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 18632d3..c90bd9f 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -35,6 +35,7 @@
#include <drpcps.hxx>
#include <envfmt.hxx>
#include <fmtcol.hxx>
+#include <chrdlgmodes.hxx>
#include <pardlg.hxx>
#include <pattern.hxx>
#include <poolfmt.hxx>
@@ -304,7 +305,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, &pColl->GetName());
+ SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_CHAR_ENV, &pColl->GetName());
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index a6277f9..5def5e9 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -118,6 +118,9 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , "GetTabPageRangesFunc fail!");
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
+ SAL_WARN_IF(!pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "sw.fmtui", "GetTabPageCreatorFunc fail!");
+ SAL_WARN_IF(!pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "sw.fmtui", "GetTabPageRangesFunc fail!");
+ AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
SvtCJKOptions aCJKOptions;
if(nHtmlMode & HTMLMODE_ON || !aCJKOptions.IsDoubleLinesEnabled())
diff --git a/sw/source/ui/fmtui/tmpdlg.src b/sw/source/ui/fmtui/tmpdlg.src
index 7766e97..0a6ae79 100644
--- a/sw/source/ui/fmtui/tmpdlg.src
+++ b/sw/source/ui/fmtui/tmpdlg.src
@@ -62,6 +62,12 @@ TabDialog DLG_TEMPLATE_1
Text [ en-US ] = "Background" ;
PageResID = TP_BACKGROUND ;
};
+ PageItem
+ {
+ Identifier = TP_BORDER ;
+ Text [ en-US ] = "Borders" ;
+ PageResID = TP_BORDER ;
+ };
};
};
};
diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx
index 4eea02d..5962452 100644
--- a/sw/source/ui/inc/chrdlg.hxx
+++ b/sw/source/ui/inc/chrdlg.hxx
@@ -37,8 +37,8 @@ class SvxMacroItem;
class SwCharDlg: public SfxTabDialog
{
- SwView& rView;
- bool bIsDrwTxtMode;
+ SwView& m_rView;
+ sal_uInt8 m_nDialogMode;
sal_uInt16 m_nCharStdId;
sal_uInt16 m_nCharExtId;
@@ -46,10 +46,11 @@ class SwCharDlg: public SfxTabDialog
sal_uInt16 m_nCharTwoId;
sal_uInt16 m_nCharUrlId;
sal_uInt16 m_nCharBgdId;
+ sal_uInt16 m_nCharBrdId;
public:
SwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- const String* pFmtStr = 0, bool bIsDrwTxtDlg = false);
+ sal_uInt8 nDialogMode, const String* pFmtStr = 0);
~SwCharDlg();
diff --git a/sw/source/ui/inc/chrdlgmodes.hxx b/sw/source/ui/inc/chrdlgmodes.hxx
new file mode 100644
index 0000000..4cbf007
--- /dev/null
+++ b/sw/source/ui/inc/chrdlgmodes.hxx
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef SW_CHAR_DLG_MODES_HXX
+#define SW_CHAR_DLG_MODES_HXX
+
+//DialogModes:
+#define DLG_CHAR_STD 0
+#define DLG_CHAR_DRAW 1
+#define DLG_CHAR_ENV 2
+#define DLG_CHAR_ANN 3
+
+#endif // SW_CHAR_DLG_MODES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 6df8108..70df378 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -77,6 +77,7 @@
#include <wrtsh.hxx>
#include <uitool.hxx>
#include <popup.hrc>
+#include <chrdlgmodes.hxx>
#include <pardlg.hxx>
#include <swdtflvr.hxx>
#include <drwtxtsh.hxx>
@@ -478,7 +479,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, 0, sal_True );
+ SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, DLG_CHAR_ANN);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (nSlot == SID_CHAR_DLG_EFFECT)
{
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 11d2626..1e1ba7a 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -84,6 +84,7 @@
#include <hintids.hxx>
#include <initui.hxx> // for SpellPointer
#include <langhelper.hxx>
+#include <chrdlgmodes.hxx>
#include <pardlg.hxx>
#include <shells.hrc>
#include <string.h>
@@ -321,7 +322,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg(pView->GetWindow(), *pView, aDlgAttr, 0, sal_True);
+ SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg(pView->GetWindow(), *pView, aDlgAttr, DLG_CHAR_DRAW);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (nSlot == SID_CHAR_DLG_EFFECT)
{
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 3393e84..8a4a78f 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -73,6 +73,7 @@
#include <docsh.hxx>
#include <mdiexp.hxx>
#include <inputwin.hxx>
+#include <chrdlgmodes.hxx>
#include <pardlg.hxx>
#include <frmatr.hxx>
#include <fmtcol.hxx>
@@ -138,6 +139,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_BACKGROUND, RES_BACKGROUND,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
FN_PARAM_SELECTION, FN_PARAM_SELECTION,
SID_HTML_MODE, SID_HTML_MODE,
SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
@@ -174,6 +176,9 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
aCoreSet.Put( aTmpBrush );
}
+ // Setting the BoxInfo
+ ::PrepareBoxInfo( aCoreSet, rWrtSh );
+
aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(rWrtSh.GetView().GetDocShell())));
SfxAbstractTabDialog* pDlg = NULL;
if ( bUseDialog && GetActiveView() )
@@ -181,7 +186,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- pDlg = pFact->CreateSwCharDlg(rWrtSh.GetView().GetWindow(), rWrtSh.GetView(), aCoreSet);
+ pDlg = pFact->CreateSwCharDlg(rWrtSh.GetView().GetWindow(), rWrtSh.GetView(), aCoreSet, DLG_CHAR_STD);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( FN_INSERT_HYPERLINK == nSlot )
pDlg->SetCurPageId("hyperlink");
diff --git a/sw/uiconfig/swriter/ui/characterproperties.ui b/sw/uiconfig/swriter/ui/characterproperties.ui
index 26be1b8..b0812a2 100644
--- a/sw/uiconfig/swriter/ui/characterproperties.ui
+++ b/sw/uiconfig/swriter/ui/characterproperties.ui
@@ -170,6 +170,20 @@
<property name="tab_fill">False</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="borders">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Borders</property>
+ </object>
+ <packing>
+ <property name="position">6</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
commit ba73bcbdcef08852ede585ed07d78a098f3b4086
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Wed Jun 26 16:00:05 2013 +0200
Fix comment
See also: 2e503780eb856e59e3eeba3ba63b2343bc050c80
Change-Id: I686fd398845f1561ffa47f14b95bf5746ea286a6
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index c2f0196..3393e84 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -932,7 +932,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff );
aCoreSet.Put( aOff );
- // Setting the BoxInfo if based on the current cursor
+ // Setting the BoxInfo
::PrepareBoxInfo( aCoreSet, rWrtSh );
// Current page format
commit 01d48e20e84a133cd677202edf6cd5d6f2e1bc7b
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Wed Jun 26 15:47:58 2013 +0200
Remove useless variable
Change-Id: I78004d9d74647ad9b87975204844cb2bb66a83fa
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index f8c0504..c2f0196 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -887,8 +887,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( !pPaM )
pPaM = rWrtSh.GetCrsr();
- bool bUseCurCrsr = true;
-
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
@@ -935,8 +933,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
aCoreSet.Put( aOff );
// Setting the BoxInfo if based on the current cursor
- if ( bUseCurCrsr )
- ::PrepareBoxInfo( aCoreSet, rWrtSh );
+ ::PrepareBoxInfo( aCoreSet, rWrtSh );
// Current page format
::SwToSfxPageDescAttr( aCoreSet );
commit 13b71d00b5e90f43cbafbc181abc9347a7e57c42
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Fri Jun 21 19:44:51 2013 +0200
Fix include: use just the really needed file
Change-Id: I25590647065d7046b9afa7cbf4b1fdb1b3ca88fc
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 9fd782c..18632d3 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -35,7 +35,7 @@
#include <drpcps.hxx>
#include <envfmt.hxx>
#include <fmtcol.hxx>
-#include "swuipardlg.hxx"
+#include <pardlg.hxx>
#include <pattern.hxx>
#include <poolfmt.hxx>
#include <uitool.hxx>
commit 2e1d6b565fab7e23c5383cf61c713d6d343e7594
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Fri Jun 21 16:01:18 2013 +0200
Fix indentation
Change-Id: I4feae9998647694efaad776396aca2ce8f177152
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 48e0355..f8c0504 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -968,13 +968,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( !bUseDialog )
{
if ( nSlot == SID_ATTR_PARA_LRSPACE)
- {
- SvxLRSpaceItem aParaMargin((const SvxLRSpaceItem&)pArgs->Get(nSlot));
- aParaMargin.SetWhich( RES_LR_SPACE);
- aCoreSet.Put(aParaMargin);
- pSet = &aCoreSet;
+ {
+ SvxLRSpaceItem aParaMargin((const SvxLRSpaceItem&)pArgs->Get(nSlot));
+ aParaMargin.SetWhich( RES_LR_SPACE);
+ aCoreSet.Put(aParaMargin);
+ pSet = &aCoreSet;
- } else
+ } else
pSet = (SfxItemSet*) pArgs;
}
commit b2c14e541ae4f28853cdcc4af54998cb34c0ec6e
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Fri Jun 21 15:38:37 2013 +0200
Use the draw specific paragraph dialog id
The abstarct dialog creation works the same
with the two existent id (DLG_PARA,DLG_DRAWPARA),
that's why it was not bugous just nonconsistent.
Change-Id: Id0f46d58ff957b1451bedb4444127fc2d641bd16
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index ce9f3e7..11d2626 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -421,7 +421,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
+ SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, DLG_DRAWPARA, 0, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
commit 916938fd0a9fc350acb89d04fd921ad144c1a92f
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Fri Jun 21 15:22:49 2013 +0200
Use abstract tab dialog to create paragraph dialog
In general this abstraction is used.
Change-Id: Ibd17f468368fef5300c383b30f82d5d6d0c85e7d
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 462290c..9fd782c 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -352,8 +352,11 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
// set BoxInfo
::PrepareBoxInfo( aTmpSet, *pSh );
- SwParaDlg *pDlg = new SwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &pColl->GetName());
+ SwAbstractDialogFactory* pFact = swui::GetFactory();
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
+ SfxAbstractTabDialog *pDlg = pFact->CreateSwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, DLG_PARA, &pColl->GetName());
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
// maybe relocate defaults
commit 501e953a6510be24e1508d3f8beadad5b34b1b89
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Thu Jun 20 15:38:01 2013 +0200
Remove obsolote border dialog
Change-Id: I57f3db05a21caeff04f280a0c13c3facfe23c3c1
diff --git a/icon-themes/crystal/cmd/lc_borderdialog.png b/icon-themes/crystal/cmd/lc_borderdialog.png
deleted file mode 100644
index c0ca4f6..0000000
Binary files a/icon-themes/crystal/cmd/lc_borderdialog.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/sc_borderdialog.png b/icon-themes/crystal/cmd/sc_borderdialog.png
deleted file mode 100644
index 6b6ab48..0000000
Binary files a/icon-themes/crystal/cmd/sc_borderdialog.png and /dev/null differ
diff --git a/icon-themes/galaxy/cmd/lc_borderdialog.png b/icon-themes/galaxy/cmd/lc_borderdialog.png
deleted file mode 100644
index 0cd8935..0000000
Binary files a/icon-themes/galaxy/cmd/lc_borderdialog.png and /dev/null differ
diff --git a/icon-themes/galaxy/cmd/sc_borderdialog.png b/icon-themes/galaxy/cmd/sc_borderdialog.png
deleted file mode 100644
index c8b915b..0000000
Binary files a/icon-themes/galaxy/cmd/sc_borderdialog.png and /dev/null differ
diff --git a/icon-themes/hicontrast/cmd/lc_borderdialog.png b/icon-themes/hicontrast/cmd/lc_borderdialog.png
deleted file mode 100644
index a61a1a6..0000000
Binary files a/icon-themes/hicontrast/cmd/lc_borderdialog.png and /dev/null differ
diff --git a/icon-themes/hicontrast/cmd/sc_borderdialog.png b/icon-themes/hicontrast/cmd/sc_borderdialog.png
deleted file mode 100644
index 6c65b36..0000000
Binary files a/icon-themes/hicontrast/cmd/sc_borderdialog.png and /dev/null differ
diff --git a/icon-themes/human/cmd/lc_borderdialog.png b/icon-themes/human/cmd/lc_borderdialog.png
deleted file mode 100644
index 323a8df..0000000
Binary files a/icon-themes/human/cmd/lc_borderdialog.png and /dev/null differ
diff --git a/icon-themes/human/cmd/sc_borderdialog.png b/icon-themes/human/cmd/sc_borderdialog.png
deleted file mode 100644
index d71ad45..0000000
Binary files a/icon-themes/human/cmd/sc_borderdialog.png and /dev/null differ
diff --git a/icon-themes/oxygen/cmd/lc_borderdialog.png b/icon-themes/oxygen/cmd/lc_borderdialog.png
deleted file mode 100644
index c0ca4f6..0000000
Binary files a/icon-themes/oxygen/cmd/lc_borderdialog.png and /dev/null differ
diff --git a/icon-themes/oxygen/cmd/sc_borderdialog.png b/icon-themes/oxygen/cmd/sc_borderdialog.png
deleted file mode 100644
index 6b6ab48..0000000
Binary files a/icon-themes/oxygen/cmd/sc_borderdialog.png and /dev/null differ
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index c8dc745..76ff150 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -829,14 +829,6 @@
<value xml:lang="en-US">Name...</value>
</prop>
</node>
- <node oor:name=".uno:BorderDialog" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Borders</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
<node oor:name=".uno:PageColumnDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Page Columns</value>
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index bec90c2..2f1d4bc 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -118,7 +118,6 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
sw/source/ui/frmdlg/frmdlg \
sw/source/ui/frmdlg/frmpage \
sw/source/ui/frmdlg/pattern \
- sw/source/ui/frmdlg/uiborder \
sw/source/ui/frmdlg/wrap \
sw/source/ui/index/cntex \
sw/source/ui/index/cnttab \
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index dee921d..94b8351 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -323,7 +323,6 @@ included in c-context files, so c++ style stuff will cause problems.
#define FN_FORMAT_PAGE_SETTING_DLG (FN_FORMAT + 42) /* */
#define FN_NUM_FORMAT_TABLE_DLG (FN_FORMAT + 45) /* number format in table */
-#define FN_FORMAT_BORDER_DLG (FN_FORMAT + 48) /* */
#define FN_FORMAT_PAGE_COLUMN_DLG (FN_FORMAT + 49) /* columns per page */
#define FN_FORMAT_BACKGROUND_DLG (FN_FORMAT + 50) /* background */
#define FN_FORMAT_PAGE_DLG (FN_FORMAT + 52) /* page */
diff --git a/sw/inc/dialog.hrc b/sw/inc/dialog.hrc
index 802a66f..902404f 100644
--- a/sw/inc/dialog.hrc
+++ b/sw/inc/dialog.hrc
@@ -56,7 +56,6 @@
#define RC_DLG_ADDR (RC_DIALOG_BEGIN + 90)
#define RC_SWDLG_BACKGROUND (RC_DIALOG_BEGIN + 91)
#define RC_DLG_SWNUMFMTDLG (RC_DIALOG_BEGIN + 92)
-#define RC_DLG_SWBORDERDLG (RC_DIALOG_BEGIN + 93)
#define RC_DLG_SWWRAPDLG (RC_DIALOG_BEGIN + 94)
#define RC_DLG_SWFLDEDITDLG (RC_DIALOG_BEGIN + 95)
// Ueberlaufpruefung ********************************************************
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 1515b78..fb00553 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -378,7 +378,6 @@ public:
virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg
sal_Bool bSetAutoFmt = sal_True,
const SwTableAutoFmt* pSelFmt = 0 ) = 0;
- virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, sal_uInt16 nType, int nResId ) = 0;//add for SwBorderDlg
virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ) = 0; //add for SwWrapDlg
virtual VclAbstractDialog * CreateSwTableWidthDlg(Window *pParent, SwTableFUNC &rFnc) = 0; //add for SwTableWidthDlg
diff --git a/sw/sdi/_basesh.sdi b/sw/sdi/_basesh.sdi
index 4b87dab..060ec16 100644
--- a/sw/sdi/_basesh.sdi
+++ b/sw/sdi/_basesh.sdi
@@ -275,11 +275,6 @@ interface BaseTextSelection
StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
- FN_FORMAT_BORDER_DLG // status(final|play)
- [
- ExecMethod = ExecDlg ;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
SID_ATTR_BORDER_INNER // status()
[
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index c5b7326..1949ecc 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -624,31 +624,6 @@ SfxVoidItem SwBackspace FN_BACKSPACE
]
//--------------------------------------------------------------------------
-SfxVoidItem BorderDialog FN_FORMAT_BORDER_DLG
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = TRUE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_FORMAT;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem BulletsAndNumberingDialog FN_NUMBER_BULLETS
()
[
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index db7514d..3d13fb8 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -59,7 +59,6 @@
#include "srtdlg.hxx" //add for SwSortDlg
#include "tautofmt.hxx" //add for SwAutoFormatDlg
#include "tblnumfm.hxx" //add for SwNumFmtDlg
-#include "uiborder.hxx" //add for SwBorderDlg
#include "wrap.hxx" //add for SwWrapDlg
#include "colwd.hxx" //add for SwTableWidthDlg
#include "tabledlg.hxx" //add for SwTableTabDlg
@@ -184,7 +183,7 @@ sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const
return pDlg->GetPara();
}
-//add for SwAddrDlg, SwDropCapsDlg ,SwBackgroundDlg, SwNumFmtDlg SwBorderDlg SwWrapDlg SwFldEditDlg begin
+//add for SwAddrDlg, SwDropCapsDlg ,SwBackgroundDlg, SwNumFmtDlg SwWrapDlg SwFldEditDlg begin
const SfxItemSet* SwAbstractSfxDialog_Impl::GetOutputItemSet() const
{
return pDlg->GetOutputItemSet();
@@ -898,23 +897,6 @@ AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(Wi
return new AbstractSwAutoFormatDlg_Impl(pDlg);
}
-SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId )
-{
- SfxModalDialog* pDlg=NULL;
- switch ( nResId )
- {
- case RC_DLG_SWBORDERDLG :
- pDlg = new SwBorderDlg( pParent, rSet, nType );
- break;
- default:
- break;
- }
-
- if ( pDlg )
- return new SwAbstractSfxDialog_Impl( pDlg );
- return 0;
-}
-
SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId )
{
SfxModalDialog* pDlg=NULL;
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 6aa3be4..982fa0d 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -84,7 +84,7 @@ class AbstractSwInsertAbstractDlg_Impl : public AbstractSwInsertAbstractDlg
//add for SwInsertAbstractDlg end
-// add for SwAddrDlg, SwDropCapsDlg, SwBackgroundDlg SwNumFmtDlg SwWrapDlg SwBorderDlg, SwFldEditDlg begin
+// add for SwAddrDlg, SwDropCapsDlg, SwBackgroundDlg SwNumFmtDlg SwWrapDlg, SwFldEditDlg begin
class SfxNoLayoutSingleTabDialog;
class SwAbstractSfxDialog_Impl :public SfxAbstractDialog
{
@@ -93,7 +93,7 @@ class SwAbstractSfxDialog_Impl :public SfxAbstractDialog
virtual void SetText( const OUString& rStr );
virtual OUString GetText() const;
};
-// add for SwAddrDlg,SwDropCapsDlg , SwBackgroundDlg SwNumFmtDlg SwWrapDlg SwBorderDlg, SwFldEditDlg end
+// add for SwAddrDlg,SwDropCapsDlg , SwBackgroundDlg SwNumFmtDlg SwWrapDlg, SwFldEditDlg end
// add for SwAsciiFilterDlg begin
class AbstractSwAsciiFilterDlg_Impl : public AbstractSwAsciiFilterDlg
@@ -478,7 +478,6 @@ public:
virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg
sal_Bool bSetAutoFmt = sal_True,
const SwTableAutoFmt* pSelFmt = 0 );
- virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId );//add for SwBorderDlg
virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ); //add for SwWrapDlg
virtual VclAbstractDialog * CreateSwTableWidthDlg(Window *pParent, SwTableFUNC &rFnc);
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index b98334f..462290c 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -38,7 +38,6 @@
#include "swuipardlg.hxx"
#include <pattern.hxx>
#include <poolfmt.hxx>
-#include <uiborder.hxx>
#include <uitool.hxx>
#include <envfmt.hrc>
diff --git a/sw/source/ui/frmdlg/frmui.src b/sw/source/ui/frmdlg/frmui.src
index 0cf431b..679fc12 100644
--- a/sw/source/ui/frmdlg/frmui.src
+++ b/sw/source/ui/frmdlg/frmui.src
@@ -102,10 +102,6 @@ String STR_COLL_HEADER
{
Text [ en-US ] = " (Template: " ;
};
-String STR_FRMUI_BORDER
-{
- Text [ en-US ] = "Borders" ;
-};
String STR_FRMUI_PATTERN
{
Text [ en-US ] = "Background" ;
diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx
deleted file mode 100644
index 2f4b1ef..0000000
--- a/sw/source/ui/frmdlg/uiborder.cxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svx/svxdlg.hxx>
-#include <svx/svxids.hrc>
-#include <svx/dialogs.hrc>
-#include <svl/itemset.hxx>
-#include <svx/flagsdef.hxx>
-#include <sfx2/tabdlg.hxx>
-#include <svl/intitem.hxx>
-
-#include "swtypes.hxx"
-#include "uiborder.hxx"
-#include "frmui.hrc"
-
-
-
-
-SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType) :
-
- SfxNoLayoutSingleTabDialog(pParent, rSet, 0)
-
-{
- SetText(SW_RESSTR(STR_FRMUI_BORDER));
-
- // create TabPage
- SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialogdiet fail!");
- ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER );
- if ( fnCreatePage )
- {
- SfxTabPage* pNewPage = (*fnCreatePage)( this, rSet );
- SfxAllItemSet aSet(*(rSet.GetPool()));
- aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,nType));
- if(SW_BORDER_MODE_TABLE == nType)
- aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_HIDESHADOWCTL));
- pNewPage->PageCreated(aSet);
- SetTabPage(pNewPage);
- }
-}
-
-
-
-SwBorderDlg::~SwBorderDlg()
-{
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/frmui.hrc b/sw/source/ui/inc/frmui.hrc
index 612a32b..cc03279 100644
--- a/sw/source/ui/inc/frmui.hrc
+++ b/sw/source/ui/inc/frmui.hrc
@@ -45,7 +45,6 @@
#define STR_TOPPRT (STR_FRMDLG_BEGIN + 1)
-#define STR_BORDER (STR_FRMDLG_BEGIN + 16)
#define STR_COLUMN (STR_FRMDLG_BEGIN + 17)
#define STR_CHAR (STR_FRMDLG_BEGIN + 19)
diff --git a/sw/source/ui/inc/uiborder.hxx b/sw/source/ui/inc/uiborder.hxx
deleted file mode 100644
index 20e5e87..0000000
--- a/sw/source/ui/inc/uiborder.hxx
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _UIBORDER_HXX
-#define _UIBORDER_HXX
-
-
-#include <sfx2/basedlgs.hxx>
-class Window;
-class SfxItemSet;
-
-class SwBorderDlg : public SfxNoLayoutSingleTabDialog
-{
-public:
-
- // nType may be:
- // SW_BORDER_MODE_PARA
- // SW_BORDER_MODE_TABLE
- // SW_BORDER_MODE_FRAME
-
- SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType);
- ~SwBorderDlg();
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index ea1f6a6..67087fb 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -2358,73 +2358,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
}
}
break;
- case FN_FORMAT_BORDER_DLG:
- {
- SfxItemSet aSet( rSh.GetAttrPool(),
- RES_BOX , RES_SHADOW,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- 0 );
- SfxAbstractDialog * pDlg = 0;
- // Table cell(s) selected?
- if ( rSh.IsTableMode() )
- {
- // Set border attributes Get/SetTabBorders()
- ::PrepareBoxInfo( aSet, rSh );
- rSh.GetTabBorders( aSet );
- SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
-
- pDlg = pFact->CreateSwBorderDlg( pMDI, aSet, SW_BORDER_MODE_TABLE, RC_DLG_SWBORDERDLG );
- OSL_ENSURE(pDlg, "Dialogdiet fail!");
- if ( pDlg->Execute() == RET_OK )
- {
- rSh.SetTabBorders( *pDlg->GetOutputItemSet() );
- pOutSet = pDlg->GetOutputItemSet();
- }
- }
- else if ( rSh.IsFrmSelected() )
- {
- // Set border attributes via Frame-Manager
- SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
- aSet.Put( aMgr.GetAttrSet() );
-
- SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
-
- pDlg = pFact->CreateSwBorderDlg( pMDI, aSet, SW_BORDER_MODE_FRAME, RC_DLG_SWBORDERDLG );
- OSL_ENSURE(pDlg, "Dialogdiet fail!");
- if ( pDlg->Execute() == RET_OK )
- {
- aMgr.SetAttrSet( *pDlg->GetOutputItemSet() );
- aMgr.UpdateFlyFrm();
- pOutSet = pDlg->GetOutputItemSet();
- }
- }
- else
- {
- // Set border attributes via Shell quite normal
- rSh.GetCurAttr( aSet );
- ::PrepareBoxInfo( aSet, rSh );
-
- SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
-
- pDlg = pFact->CreateSwBorderDlg( pMDI, aSet, SW_BORDER_MODE_PARA, RC_DLG_SWBORDERDLG );
- OSL_ENSURE(pDlg, "Dialogdiet fail!");
- if ( pDlg->Execute() == RET_OK )
- {
- rSh.SetAttr( *pDlg->GetOutputItemSet() );
- pOutSet = pDlg->GetOutputItemSet();
- }
- }
- if(pOutSet)
- {
- rReq.Done(*pOutSet);
- bDone = true;
- }
- delete pDlg;
- }
- break;
case FN_FORMAT_BACKGROUND_DLG:
{
SfxItemSet aSet( rSh.GetAttrPool(),
commit 5f0f5d502f8294fc0d0a6ec2e97923ba5839cfdd
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Thu Jun 20 11:32:04 2013 +0200
Page border bug: margin edits are enable when no broder
To reproduce
1. Format -> Page
2. Set left and ritght borders only (All margins is editable)
4. Set inner margins bigger (using syncronize check box), for example 2 cm
5. Click OK
Result
Margin appaer just on the right and the left side, so just on those
sides where there is a border.
Expected:
Only the relevant edits must be enable on border tab page
just as in case of paragraph borders.
Note to fix:
Inner margin without border is used only for table, but not
for other objects (paragraph, page, frame)
Change-Id: Ie611eb29432cb7e75131154d94b4a8db1c3f1bb8
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index f43fbae..cf10d12 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -1075,8 +1075,8 @@ IMPL_LINK_NOARG(SvxBorderTabPage, LinesChanged_Impl)
// for tables everything is allowed
sal_uInt16 nValid = VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT;
- // for border and paragraph the edit is disabled, if there's no border set
- if(nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_PARA))
+ // for other objects (paragraph, page, frame) the edit is disabled, if there's no border set
+ if(!(nSWMode & SW_BORDER_MODE_TABLE))
{
if(bLineSet)
{
commit 3e4b2a787813bccfc7eead9e502732062173d124
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Mon Jul 8 20:08:22 2013 -0400
Fix linking problem with subsequent_filters-test.
Change-Id: I5ccf8792ce0d3ffa9a0dffc1bc8976fe029808ab
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 31e00a8..efbd3b9 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -71,7 +71,7 @@ struct FileFormat {
const char* pName; const char* pFilterName; const char* pTypeName; unsigned int nFormatType;
};
-extern FileFormat aFileFormats[];
+SC_DLLPUBLIC extern FileFormat aFileFormats[];
// Why is this here and not in osl, and using the already existing file
// handling APIs? Do we really want to add arbitrary new file handling
commit 100c0f885be5c1b308ad13e60b56060d59bc7100
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Mon Jul 8 18:28:43 2013 -0400
Split ucalc.cxx into multiple source files.
Change-Id: Ic46dcc8cb415fd3ea9062d477260cb6f120fb815
diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk
index 702117f..8ab28b1 100644
--- a/sc/CppunitTest_sc_ucalc.mk
+++ b/sc/CppunitTest_sc_ucalc.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,sc_ucalc))
$(eval $(call gb_CppunitTest_add_exception_objects,sc_ucalc, \
sc/qa/unit/ucalc \
+ sc/qa/unit/ucalc_sharedformula \
))
$(eval $(call gb_CppunitTest_use_library_objects,sc_ucalc,sc))
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index b330f2c..ee806bc 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -14,6 +14,16 @@
#include <fstream>
+FileFormat aFileFormats[] = {
+ { "ods" , "calc8", "", ODS_FORMAT_TYPE },
+ { "xls" , "MS Excel 97", "calc_MS_EXCEL_97", XLS_FORMAT_TYPE },
+ { "xlsx", "Calc MS Excel 2007 XML" , "MS Excel 2007 XML", XLSX_FORMAT_TYPE },
+ { "csv" , "Text - txt - csv (StarCalc)", "generic_Text", CSV_FORMAT_TYPE },
+ { "html" , "calc_HTML_WebQuery", "generic_HTML", HTML_FORMAT_TYPE },
+ { "123" , "Lotus", "calc_Lotus", LOTUS123_FORMAT_TYPE },
+ { "dif", "DIF", "calc_DIF", DIF_FORMAT_TYPE },
+};
+
bool testEqualsWithTolerance( long nVal1, long nVal2, long nTol )
{
return ( labs( nVal1 - nVal2 ) <= nTol );
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index b01a581..31e00a8 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -71,15 +71,7 @@ struct FileFormat {
const char* pName; const char* pFilterName; const char* pTypeName; unsigned int nFormatType;
};
-FileFormat aFileFormats[] = {
- { "ods" , "calc8", "", ODS_FORMAT_TYPE },
- { "xls" , "MS Excel 97", "calc_MS_EXCEL_97", XLS_FORMAT_TYPE },
- { "xlsx", "Calc MS Excel 2007 XML" , "MS Excel 2007 XML", XLSX_FORMAT_TYPE },
- { "csv" , "Text - txt - csv (StarCalc)", "generic_Text", CSV_FORMAT_TYPE },
- { "html" , "calc_HTML_WebQuery", "generic_HTML", HTML_FORMAT_TYPE },
- { "123" , "Lotus", "calc_Lotus", LOTUS123_FORMAT_TYPE },
- { "dif", "DIF", "calc_DIF", DIF_FORMAT_TYPE },
-};
+extern FileFormat aFileFormats[];
// Why is this here and not in osl, and using the already existing file
// handling APIs? Do we really want to add arbitrary new file handling
@@ -94,7 +86,9 @@ SC_DLLPUBLIC void testFile(OUString& aFileName, ScDocument* pDoc, SCTAB nTab, St
//need own handler because conditional formatting strings must be generated
SC_DLLPUBLIC void testCondFile(OUString& aFileName, ScDocument* pDoc, SCTAB nTab);
-std::string print(const ScAddress& rAddr)
+SC_DLLPUBLIC void clearRange(ScDocument* pDoc, const ScRange& rRange);
+
+inline std::string print(const ScAddress& rAddr)
{
std::ostringstream str;
str << "Col: " << rAddr.Col();
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index f05872f..8b2f6da 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -54,7 +54,6 @@
#include "tokenarray.hxx"
#include "scopetools.hxx"
#include "dociter.hxx"
-#include "editutil.hxx"
#include "formula/IFunctionDescription.hxx"
@@ -80,309 +79,7 @@
#include <sstream>
#include <vector>
-#include "helper/qahelper.hxx"
-
-using namespace ::com::sun::star;
-
-using ::std::cout;
-using ::std::cerr;
-using ::std::endl;
-using ::std::vector;
-
-namespace {
-
-class Test : public test::BootstrapFixture {
-public:
- Test();
-
- virtual void setUp();
- virtual void tearDown();
-
- /**
- * Basic performance regression test. Pick some actions that *should* take
- * only a fraction of a second to complete, and make sure they stay that
- * way. We set the threshold to 1 second for each action which should be
- * large enough to accommodate slower machines or machines with high load.
- */
- void testPerf();
- void testCollator();
- void testRangeList();
- void testInput();
- void testFormulaHashAndTag();
- void testFuncSUM();
- void testFuncPRODUCT();
- void testFuncN();
- void testFuncCOUNTIF();
- void testFuncNUMBERVALUE();
- void testFuncVLOOKUP();
- void testFuncMATCH();
- void testFuncCELL();
- void testFuncDATEDIF();
- void testFuncINDIRECT();
- void testFuncIFERROR();
- void testCopyToDocument();
- /**
- * Make sure the SHEETS function gets properly updated during sheet
- * insertion and removal.
- */
- void testSheetsFunc();
- void testVolatileFunc();
-
- void testHorizontalIterator();
-
- /**
- * Basic test for formula dependency tracking.
- */
- void testFormulaDepTracking();
-
- /**
- * Another test for formula dependency tracking, inspired by fdo#56278.
- */
- void testFormulaDepTracking2();
-
- /**
- * More direct test for cell broadcaster management, used to track formula
- * dependencies.
- */
- void testCellBroadcaster();
-
- void testFuncParam();
- void testNamedRange();
- void testCSV();
- void testMatrix();
- void testEnterMixedMatrix();
-
- /**
- * Basic test for pivot tables.
- */
- void testPivotTable();
-
- /**
- * Test against unwanted automatic format detection on field names and
- * field members in pivot tables.
- */
- void testPivotTableLabels();
-
- /**
- * Make sure that we set cells displaying date values numeric cells,
- * rather than text cells. Grouping by date or number functionality
- * depends on this.
- */
- void testPivotTableDateLabels();
-
- /**
- * Test for pivot table's filtering functionality by page fields.
- */
- void testPivotTableFilters();
-
- /**
- * Test for pivot table's named source range.
- */
- void testPivotTableNamedSource();
-
- /**
- * Test for pivot table cache. Each dimension in the pivot cache stores
- * only unique values that are sorted in ascending order.
- */
- void testPivotTableCache();
-
- /**
- * Test for pivot table containing data fields that reference the same
- * source field but different functions.
- */
- void testPivotTableDuplicateDataFields();
-
- void testPivotTableNormalGrouping();
- void testPivotTableNumberGrouping();
- void testPivotTableDateGrouping();
- void testPivotTableEmptyRows();
- void testPivotTableTextNumber();
-
- /**
- * Test for checking that pivot table treats strings in a case insensitive
- * manner.
- */
- void testPivotTableCaseInsensitiveStrings();
-
- /**
- * Test for pivot table's handling of double-precision numbers that are
- * very close together.
- */
- void testPivotTableNumStability();
-
- /**
- * Test for pivot table that include field with various non-default field
- * refrences.
- */
- void testPivotTableFieldReference();
-
- /**
- * Test pivot table functionality performed via ScDBDocFunc.
- */
- void testPivotTableDocFunc();
-
- void testSheetCopy();
- void testSheetMove();
- void testExternalRef();
- void testExternalRefFunctions();
- void testDataArea();
- void testAutofilter();
- void testCopyPaste();
- void testMergedCells();
- void testUpdateReference();
- void testSearchCells();
- void testSharedFormulas();
- void testFormulaPosition();
-
- /**
- * Make sure the sheet streams are invalidated properly.
- */
- void testStreamValid();
-
- /**
- * Test built-in cell functions to make sure their categories and order
- * are correct.
- */
- void testFunctionLists();
-
- void testGraphicsInGroup();
- void testGraphicsOnSheetMove();
-
- void testPostIts();
-
- /**
- * Test toggling relative/absolute flag of cell and cell range references.
- * This corresponds with hitting Shift-F4 while the cursor is on a formula
- * cell.
- */
- void testToggleRefFlag();
-
- /**
- * Test to make sure correct precedent / dependent cells are obtained when
- * preparing to jump to them.
- */
- void testJumpToPrecedentsDependents();
-
- void testSetBackgroundColor();
- void testRenameTable();
-
- void testAutoFill();
- void testCopyPasteFormulas();
- void testCopyPasteFormulasExternalDoc();
-
- void testFindAreaPosVertical();
- void testFindAreaPosColRight();
- void testSort();
- void testSortWithFormulaRefs();
- void testShiftCells();
- void testDeleteRow();
- void testDeleteCol();
- void testAnchoredRotatedShape();
- void testCellTextWidth();
-
- /**
- * Test formula & formula grouping
- */
- void testFormulaGrouping();
- void testCondFormatINSDEL();
-
- CPPUNIT_TEST_SUITE(Test);
-#if CALC_TEST_PERF
- CPPUNIT_TEST(testPerf);
-#endif
- CPPUNIT_TEST(testCollator);
- CPPUNIT_TEST(testRangeList);
- CPPUNIT_TEST(testInput);
- CPPUNIT_TEST(testFormulaHashAndTag);
- CPPUNIT_TEST(testFuncSUM);
- CPPUNIT_TEST(testFuncPRODUCT);
- CPPUNIT_TEST(testFuncN);
- CPPUNIT_TEST(testFuncCOUNTIF);
- CPPUNIT_TEST(testFuncNUMBERVALUE);
- CPPUNIT_TEST(testFuncVLOOKUP);
- CPPUNIT_TEST(testFuncMATCH);
- CPPUNIT_TEST(testFuncCELL);
- CPPUNIT_TEST(testFuncDATEDIF);
- CPPUNIT_TEST(testFuncINDIRECT);
- CPPUNIT_TEST(testFuncIFERROR);
- CPPUNIT_TEST(testCopyToDocument);
- CPPUNIT_TEST(testSheetsFunc);
- CPPUNIT_TEST(testVolatileFunc);
- CPPUNIT_TEST(testHorizontalIterator);
- CPPUNIT_TEST(testFormulaDepTracking);
- CPPUNIT_TEST(testFormulaDepTracking2);
- CPPUNIT_TEST(testCellBroadcaster);
- CPPUNIT_TEST(testFuncParam);
- CPPUNIT_TEST(testNamedRange);
- CPPUNIT_TEST(testCSV);
- CPPUNIT_TEST(testMatrix);
- CPPUNIT_TEST(testEnterMixedMatrix);
- CPPUNIT_TEST(testPivotTable);
- CPPUNIT_TEST(testPivotTableLabels);
- CPPUNIT_TEST(testPivotTableDateLabels);
- CPPUNIT_TEST(testPivotTableFilters);
- CPPUNIT_TEST(testPivotTableNamedSource);
- CPPUNIT_TEST(testPivotTableCache);
- CPPUNIT_TEST(testPivotTableDuplicateDataFields);
- CPPUNIT_TEST(testPivotTableNormalGrouping);
- CPPUNIT_TEST(testPivotTableNumberGrouping);
- CPPUNIT_TEST(testPivotTableDateGrouping);
- CPPUNIT_TEST(testPivotTableEmptyRows);
- CPPUNIT_TEST(testPivotTableTextNumber);
- CPPUNIT_TEST(testPivotTableCaseInsensitiveStrings);
- CPPUNIT_TEST(testPivotTableNumStability);
- CPPUNIT_TEST(testPivotTableFieldReference);
- CPPUNIT_TEST(testPivotTableDocFunc);
- CPPUNIT_TEST(testSheetCopy);
- CPPUNIT_TEST(testSheetMove);
- CPPUNIT_TEST(testExternalRef);
- CPPUNIT_TEST(testExternalRefFunctions);
- CPPUNIT_TEST(testDataArea);
- CPPUNIT_TEST(testGraphicsInGroup);
- CPPUNIT_TEST(testGraphicsOnSheetMove);
- CPPUNIT_TEST(testPostIts);
- CPPUNIT_TEST(testStreamValid);
- CPPUNIT_TEST(testFunctionLists);
- CPPUNIT_TEST(testToggleRefFlag);
- CPPUNIT_TEST(testAutofilter);
- CPPUNIT_TEST(testCopyPaste);
- CPPUNIT_TEST(testMergedCells);
- CPPUNIT_TEST(testUpdateReference);
- CPPUNIT_TEST(testSearchCells);
- CPPUNIT_TEST(testSharedFormulas);
- CPPUNIT_TEST(testFormulaPosition);
- CPPUNIT_TEST(testJumpToPrecedentsDependents);
- CPPUNIT_TEST(testSetBackgroundColor);
- CPPUNIT_TEST(testRenameTable);
- CPPUNIT_TEST(testAutoFill);
- CPPUNIT_TEST(testCopyPasteFormulas);
- CPPUNIT_TEST(testCopyPasteFormulasExternalDoc);
- CPPUNIT_TEST(testFindAreaPosVertical);
- CPPUNIT_TEST(testFindAreaPosColRight);
- CPPUNIT_TEST(testSort);
- CPPUNIT_TEST(testSortWithFormulaRefs);
- CPPUNIT_TEST(testShiftCells);
- CPPUNIT_TEST(testDeleteRow);
- CPPUNIT_TEST(testDeleteCol);
- CPPUNIT_TEST(testAnchoredRotatedShape);
- CPPUNIT_TEST(testCellTextWidth);
- CPPUNIT_TEST(testFormulaGrouping);
- CPPUNIT_TEST(testCondFormatINSDEL);
- CPPUNIT_TEST_SUITE_END();
-
-private:
- ScDocument *m_pDoc;
- ScDocShellRef m_xDocShRef;
-};
-
-void clearRange(ScDocument* pDoc, const ScRange& rRange)
-{
- ScMarkData aMarkData;
- aMarkData.SetMarkArea(rRange);
- pDoc->DeleteArea(
- rRange.aStart.Col(), rRange.aStart.Row(),
- rRange.aEnd.Col(), rRange.aEnd.Row(), aMarkData, IDF_CONTENTS);
-}
+#include "ucalc.hxx"
void printRange(ScDocument* pDoc, const ScRange& rRange, const char* pCaption)
{
@@ -407,7 +104,7 @@ ScRange insertRangeData(ScDocument* pDoc, const ScAddress& rPos, const char* aDa
aRange.aEnd.SetCol(rPos.Col()+_Size-1);
aRange.aEnd.SetRow(rPos.Row()+nRowCount-1);
- clearRange(pDoc, aRange);
+ Test::clearRange(pDoc, aRange);
for (size_t i = 0; i < _Size; ++i)
{
@@ -4969,8 +4666,8 @@ void Test::testExternalRef()
void testExtRefFuncT(ScDocument* pDoc, ScDocument* pExtDoc)
{
- clearRange(pDoc, ScRange(0, 0, 0, 1, 9, 0));
- clearRange(pExtDoc, ScRange(0, 0, 0, 1, 9, 0));
+ Test::clearRange(pDoc, ScRange(0, 0, 0, 1, 9, 0));
+ Test::clearRange(pExtDoc, ScRange(0, 0, 0, 1, 9, 0));
pExtDoc->SetString(0, 0, 0, OUString("'1.2"));
pExtDoc->SetString(0, 1, 0, OUString("Foo"));
@@ -6313,220 +6010,6 @@ void Test::testSearchCells()
m_pDoc->DeleteTab(0);
}
-void Test::testSharedFormulas()
-{
- m_pDoc->InsertTab(0, "Test");
-
- ScAddress aPos(1, 9, 0); // B10
- m_pDoc->SetString(aPos, "=A10*2"); // Insert into B10.
- const ScFormulaCell* pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("Expected to be a non-shared cell.", pFC && !pFC->IsShared());
-
- aPos.SetRow(10); // B11
- m_pDoc->SetString(aPos, "=A11*2");
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula cell.", pFC && pFC->IsShared());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(9), pFC->GetSharedTopRow());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(2), pFC->GetSharedLength());
-
- aPos.SetRow(8); // B9
- m_pDoc->SetString(aPos, "=A9*2");
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula cell.", pFC && pFC->IsShared());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(8), pFC->GetSharedTopRow());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(3), pFC->GetSharedLength());
-
- aPos.SetRow(12); // B13
- m_pDoc->SetString(aPos, "=A13*2");
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This formula cell shouldn't be shared yet.", pFC && !pFC->IsShared());
-
- // Insert a formula to B12, and B9:B13 should be shared.
- aPos.SetRow(11); // B12
- m_pDoc->SetString(aPos, "=A12*2");
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula cell.", pFC && pFC->IsShared());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(8), pFC->GetSharedTopRow());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(5), pFC->GetSharedLength());
-
- // Insert formulas to B15:B16.
- aPos.SetRow(14); // B15
- m_pDoc->SetString(aPos, "=A15*2");
- aPos.SetRow(15); // B16
- m_pDoc->SetString(aPos, "=A16*2");
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula cell.", pFC && pFC->IsShared());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(14), pFC->GetSharedTopRow());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(2), pFC->GetSharedLength());
-
- // Insert a formula to B14, and B9:B16 should be shared.
- aPos.SetRow(13); // B14
- m_pDoc->SetString(aPos, "=A14*2");
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula cell.", pFC && pFC->IsShared());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(8), pFC->GetSharedTopRow());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(8), pFC->GetSharedLength());
-
- // Insert an incompatible formula to B12, to split the shared range to B9:B11 and B13:B16.
- aPos.SetRow(11); // B12
- m_pDoc->SetString(aPos, "=$A$1*4");
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This cell shouldn't be shared.", pFC && !pFC->IsShared());
-
- aPos.SetRow(8); // B9
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula cell.", pFC && pFC->IsShared());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(8), pFC->GetSharedTopRow());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(3), pFC->GetSharedLength());
-
- aPos.SetRow(12); // B13
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula cell.", pFC && pFC->IsShared());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(12), pFC->GetSharedTopRow());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(4), pFC->GetSharedLength());
-
- // Extend B13:B16 to B13:B20.
- aPos.SetRow(16); // B17
- m_pDoc->SetString(aPos, "=A17*2");
- aPos.IncRow();
- m_pDoc->SetString(aPos, "=A18*2");
- aPos.IncRow();
- m_pDoc->SetString(aPos, "=A19*2");
- aPos.IncRow();
- m_pDoc->SetString(aPos, "=A20*2");
- pFC = m_pDoc->GetFormulaCell(aPos);
- CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula cell.", pFC && pFC->IsShared());
- // B13:B20 shuld be shared.
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(12), pFC->GetSharedTopRow());
- CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(8), pFC->GetSharedLength());
-
- // Empty B19. This should split it into B13:B18, and B20 non-shared.
- aPos.SetRow(18);
- m_pDoc->SetEmptyCell(aPos);
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list