[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - 275 commits - android/Bootstrap android/experimental android/sdremote animations/inc animations/Library_animcore.mk animations/Module_animations.mk animations/Package_inc.mk animations/source apple_remote/inc apple_remote/Library_AppleRemote.mk apple_remote/Module_apple_remote.mk apple_remote/Package_inc.mk avmedia/inc avmedia/Library_avmedia.mk avmedia/Module_avmedia.mk avmedia/Package_inc.mk avmedia/source basctl/AllLangResTarget_basctl.mk basebmp/CppunitTest_basebmp.mk basebmp/inc basebmp/Library_basebmp.mk basebmp/Module_basebmp.mk basebmp/Package_inc.mk basebmp/StaticLibrary_basebmp.mk basegfx/inc basegfx/Library_basegfx.mk basegfx/Module_basegfx.mk basegfx/Package_inc.mk basic/AllLangResTarget_sb.mk basic/inc basic/Library_sb.mk basic/Module_basic.mk basic/Package_inc.mk basic/source bean/com bean/Library_officebean.mk bean/qa bin/moveglobalheaders.sh bridges/test canvas/inc canvas/Library_cairocanvas.mk canvas/L ibrary_canvasfactory.mk canvas/Library_canvastools.mk canvas/Library_directx9canvas.mk canvas/Library_gdipluscanvas.mk canvas/Library_nullcanvas.mk canvas/Library_simplecanvas.mk canvas/Library_vclcanvas.mk canvas/Module_canvas.mk canvas/Package_inc.mk canvas/StaticLibrary_directxcanvas.mk chart2/AllLangResTarget_chartcontroller.mk chart2/CppunitTest_chart2_importtest.mk chart2/qa chart2/source cli_ure/source codemaker/inc codemaker/Module_codemaker.mk codemaker/Package_inc.mk codemaker/source codemaker/StaticLibrary_codemaker_cpp.mk codemaker/StaticLibrary_codemaker_java.mk codemaker/StaticLibrary_codemaker.mk comphelper/CppunitTest_comphelper_test.mk comphelper/inc comphelper/Library_comphelper.mk comphelper/Module_comphelper.mk comphelper/Package_inc.mk comphelper/source compilerplugins/clang config_host/config_harfbuzz.h.in config_host/config_lgpl.h.in config_host.mk.in configure.ac connectivity/CppunitTest_connectivity_commontools.mk connectivity/inc connectivity/Librar y_dbtools.mk connectivity/Library_file.mk connectivity/Library_jdbc.mk connectivity/Library_kabdrv1.mk connectivity/Library_mork.mk connectivity/Library_odbcbase.mk connectivity/Library_tdeab1.mk connectivity/Library_tdeabdrv1.mk connectivity/Module_connectivity.mk connectivity/Package_inc.mk connectivity/source cosv/inc cosv/Module_cosv.mk cosv/Package_inc.mk cosv/StaticLibrary_cosv.mk cppcanvas/inc cppcanvas/Library_cppcanvas.mk cppcanvas/Module_cppcanvas.mk cppcanvas/Package_inc.mk cppcanvas/source cppu/CppunitTest_cppu_checkapi.mk cppu/CustomTarget_cppu_allheaders.mk cppuhelper/CppunitTest_cppuhelper_checkapi.mk cppuhelper/CustomTarget_cppuhelper_allheaders.mk cppuhelper/inc cppuhelper/Module_cppuhelper.mk cppuhelper/Package_cppuhelper_odk_headers.mk cppuhelper/source cppuhelper/StaticLibrary_findsofficepath.mk cppu/inc cppu/Library_cppu.mk cppu/Module_cppu.mk cppu/Package_cppu_odk_headers.mk cui/AllLangResTarget_cui.mk cui/uiconfig dbaccess/AllLangResTarget_dba.mk dbacc ess/AllLangResTarget_dbmm.mk dbaccess/AllLangResTarget_dbu.mk dbaccess/AllLangResTarget_sdbt.mk dbaccess/inc dbaccess/Library_dba.mk dbaccess/Library_dbu.mk dbaccess/Library_sdbt.mk dbaccess/qa dbaccess/source dbaccess/uiconfig desktop/AllLangResTarget_deploymentgui.mk desktop/AllLangResTarget_dkt.mk desktop/Executable_quickstart.mk desktop/Executable_sbase.mk desktop/Executable_scalc.mk desktop/Executable_sdraw.mk desktop/Executable_simpress.mk desktop/Executable_smath.mk desktop/Executable_soffice_bin.mk desktop/Executable_soffice.mk desktop/Executable_sweb.mk desktop/Executable_swriter.mk desktop/Executable_unopkg.com.mk desktop/Executable_unopkg.mk desktop/Library_libreoffice.mk desktop/StaticLibrary_winextendloaderenv.mk desktop/win32 desktop/WinResTarget_quickstart.mk desktop/WinResTarget_sbase.mk desktop/WinResTarget_scalc.mk desktop/WinResTarget_sdraw.mk desktop/WinResTarget_simpress.mk desktop/WinResTarget_smath.mk desktop/WinResTarget_sofficebin.mk desktop/WinResTa rget_soffice.mk desktop/WinResTarget_sweb.mk desktop/WinResTarget_swriter.mk distro-configs/LibreOfficeiOS.conf download.lst drawinglayer/inc drawinglayer/Library_drawinglayer.mk drawinglayer/Module_drawinglayer.mk drawinglayer/Package_inc.mk dtrans/StaticLibrary_dtobj.mk editeng/AllLangResTarget_editeng.mk editeng/inc editeng/Library_editeng.mk editeng/Module_editeng.mk editeng/Package_inc.mk editeng/source embeddedobj/Library_embobj.mk embedserv/Library_inprocserv.mk embedserv/source extensions/AllLangResTarget_abp.mk extensions/AllLangResTarget_bib.mk extensions/AllLangResTarget_dbp.mk extensions/Executable_nsplugin.mk extensions/Library_bib.mk extensions/Library_log.mk extensions/Library_npsoplugin.mk extensions/Library_so_activex.mk extensions/Library_so_activex_x64.mk extensions/Library_updatecheckui.mk extensions/Library_updchk.mk extensions/qa extensions/source extensions/StaticLibrary_npsoenv.mk extensions/StaticLibrary_plugcon.mk extensions/WinResTarget_activex.mk extensions/WinResTarget_npsoplugin.mk extras/source filter/AllLangResTarget_pdffilter.mk filter/AllLangResTarget_xsltdlg.mk filter/inc filter/Library_msfilter.mk filter/Module_filter.mk filter/Package_inc.mk forms/AllLangResTarget_frm.mk forms/Library_frm.mk forms/qa forms/source formula/AllLangResTarget_for.mk formula/AllLangResTarget_forui.mk formula/inc formula/Library_for.mk formula/Module_formula.mk formula/Package_inc.mk fpicker/AllLangResTarget_fps_office.mk fpicker/Library_fps_aqua.mk fpicker/Library_fps.mk fpicker/source fpicker/WinResTarget_fps.mk framework/AllLangResTarget_fwe.mk framework/inc framework/Library_fwi.mk framework/Module_framework.mk framework/Package_inc.mk framework/qa framework/source harfbuzz/ExternalPackage_harfbuzz.mk harfbuzz/ExternalProject_harfbuzz.mk harfbuzz/harfbuzz.configure.patch.1 harfbuzz/Makefile harfbuzz/Module_harfbuzz.mk harfbuzz/README harfbuzz/UnpackedTarball_harfbuzz.mk helpcontent2 i18nlangtag/CppunitTest_i18nlangtag_test_lang uagetag.mk i18nlangtag/inc i18nlangtag/Library_i18nlangtag.mk i18nlangtag/Module_i18nlangtag.mk i18nlangtag/Package_inc.mk i18nlangtag/source i18npool/Library_i18nsearch.mk i18npool/source i18nutil/inc i18nutil/Library_i18nutil.mk i18nutil/Module_i18nutil.mk i18nutil/Package_inc.mk icon-themes/crystal icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/industrial icon-themes/oxygen idl/source include/animations include/apple_remote include/avmedia include/basebmp include/basegfx include/basic include/canvas include/codemaker include/com include/comphelper include/connectivity include/cosv include/cppcanvas include/cppu include/cppuhelper include/cppunittester include/default.rc include/drawinglayer include/editeng include/filter include/formula include/framework include/i18nlangtag include/i18nutil include/jvmaccess include/jvmfwk include/linguistic include/o3tl include/oox include/osl include/package include/registry include/rsc include/rtl include/sal i nclude/salhelper include/sax include/sfx2 include/shell include/shlinfo.rc include/sot include/store include/svl include/svtools include/svx include/systools include/test include/toolkit include/tools include/touch include/tubes include/typelib include/ucbhelper include/udm include/uno include/unoidl include/unotest include/unotools include/vbahelper include/vcl include/xmloff include/xmlreader include/xmlscript ios/Executable_LibreOffice.mk ios/experimental javaunohelper/com jurt/com jurt/Library_jpipe.mk jvmaccess/inc jvmaccess/Library_jvmaccess.mk jvmaccess/Module_jvmaccess.mk jvmaccess/Package_inc.mk jvmfwk/inc jvmfwk/Library_jvmfwk.mk jvmfwk/Library_sunjavaplugin.mk jvmfwk/Module_jvmfwk.mk jvmfwk/Package_inc.mk l10ntools/inc l10ntools/source l10ntools/StaticLibrary_transex.mk Library_merged.mk lingucomponent/StaticLibrary_ulingu.mk linguistic/inc linguistic/Library_lng.mk linguistic/Module_linguistic.mk linguistic/Package_inc.mk lotuswordpro/Module_lotuswordpro.mk lotus wordpro/source Makefile.fetch Makefile.in mysqlcppconn/Library_mysqlcppconn.mk nlpsolver/ThirdParty np_sdk/StaticLibrary_nputils.mk o3tl/CppunitTest_o3tl_tests.mk o3tl/inc o3tl/Module_o3tl.mk o3tl/Package_inc.mk odk/CppunitTest_checkapi.mk odk/CustomTarget_allheaders.mk odk/CustomTarget_autodoc.mk odk/CustomTarget_check.mk odk/CustomTarget_classes.mk odk/CustomTarget_doxygen.mk odk/CustomTarget_javadoc.mk odk/CustomTarget_odkcommon.mk odk/examples odk/Executable_unoapploader.mk odk/Module_odk.mk odk/Package_autodoc.mk odk/Package_docs.mk odk/Package_javadoc.mk odk/Package_odk_headers_generated.mk odk/Package_odk_headers.mk odk/PackageSet_autodoc.mk odk/PackageSet_odk_headers.mk odk/qa odk/Zip_cppdocs.mk odk/Zip_odkcommon.mk offapi/com offapi/Module_offapi.mk offapi/README offapi/type_reference offapi/UnoApiMerge_types.mk offapi/UnoApi_offapi.mk officecfg/registry oox/inc oox/Library_oox.mk oox/Module_oox.mk oox/Package_inc.mk oox/source package/inc package/Library_package2.m k package/Module_package.mk package/Package_inc.mk padmin/Module_padmin.mk padmin/Package_inc.mk padmin/Package_padmin.mk postprocess/CustomTarget_images.mk postprocess/Rdb_services.mk pyuno/Library_pyuno_wrapper.mk qadevOOo/qa qadevOOo/runner qadevOOo/tests registry/inc registry/Library_reg.mk registry/Module_registry.mk registry/Package_inc.mk registry/StaticLibrary_registry_helper.mk reportbuilder/java reportdesign/AllLangResTarget_rpt.mk reportdesign/AllLangResTarget_rptui.mk reportdesign/Library_rpt.mk reportdesign/Library_rptui.mk reportdesign/Library_rptxml.mk reportdesign/source RepositoryExternal.mk RepositoryFixes.mk Repository.mk RepositoryModule_host.mk ridljar/com rsc/inc rsc/Module_rsc.mk rsc/Package_inc.mk sal/CppunitTest_sal_checkapi.mk sal/CustomTarget_sal_allheaders.mk salhelper/CppunitTest_salhelper_checkapi.mk salhelper/CppunitTest_salhelper_testapi.mk salhelper/CustomTarget_salhelper_allheaders.mk salhelper/inc salhelper/Library_salhelper.mk salhelper/Mo dule_salhelper.mk salhelper/Package_salhelper_odk_headers.mk sal/inc sal/Library_sal.mk sal/Library_uwinapi.mk sal/Module_sal.mk sal/Package_inc.mk sal/Package_sal_generated.mk sal/Package_sal_odk_headers.mk sal/StaticLibrary_salcpprt.mk sal/systools sax/inc sax/Library_sax.mk sax/Module_sax.mk sax/Package_inc.mk sax/StaticLibrary_sax_shared.mk sc/AllLangResTarget_sc.mk sc/inc sc/Library_sc.mk scp2/InstallModule_sdkoo.mk scp2/source sc/qa scripting/java scripting/workben sc/source sc/uiconfig sc/UIConfig_scalc.mk sd/AllLangResTarget_sd.mk sd/CppunitTest_sd_filters_test.mk sd/CppunitTest_sd_regression_test.mk sdext/Executable_xpdfimport.mk sdext/source sdext/StaticLibrary_pdfimport_s.mk sd/inc sd/Library_sd.mk sd/Module_sd.mk sd/Package_inc.mk sd/source sd/uiconfig sd/UIConfig_sdraw.mk sfx2/AllLangResTarget_sfx2.mk sfx2/inc sfx2/Library_qstart_gtk.mk sfx2/Library_sfx.mk sfx2/Module_sfx2.mk sfx2/Package_inc.mk sfx2/source shell/inc shell/Library_kdebe.mk shell/Library_tdebe.mk shell/Module_shell.mk shell/Package_inc.mk slideshow/Library_slideshow.mk smoketest/CppunitTest_smoketest.mk smoketest/Executable_libtest.mk smoketest/losmoketest solenv/bin solenv/gbuild soltools/mkdepend sot/inc sot/Library_sot.mk sot/Module_sot.mk sot/Package_inc.mk starmath/AllLangResTarget_sm.mk starmath/inc starmath/Library_smd.mk starmath/source stoc/util store/inc store/Library_store.mk store/Module_store.mk store/Package_inc.mk svl/AllLangResTarget_svl.mk svl/CppunitTest_svl_lngmisc.mk svl/inc svl/Library_fsstorage.mk svl/Library_passwordcontainer.mk svl/Library_svl.mk svl/Module_svl.mk svl/Package_inc.mk svl/source svtools/AllLangResTarget_svt.mk svtools/Executable_langsupport.mk svtools/inc svtools/Library_svt.mk svtools/Module_svtools.mk svtools/Package_inc.mk svtools/source svx/AllLangResTarget_gal.mk svx/AllLangResTarget_ofa.mk svx/AllLangResTarget_svx.mk svx/AllLangResTarget_textconversiondlgs.mk svx/Executable_gengal.bin.mk svx/inc svx/Library_svxcore.mk svx /Library_textconversiondlgs.mk svx/Module_svx.mk svx/Package_inc.mk svx/source sw/AllLangResTarget_sw.mk sw/CppunitTest_sw_odfexport.mk sw/inc sw/Library_sw.mk sw/qa sw/source sw/uiconfig sw/UIConfig_swriter.mk test/inc test/Library_test.mk test/Module_test.mk test/Package_inc.mk test/source testtools/CustomTarget_bridgetest_climaker.mk testtools/CustomTarget_bridgetest_javamaker.mk testtools/CustomTarget_uno_test.mk testtools/StaticLibrary_bridgetest.mk toolkit/inc toolkit/Library_tk.mk toolkit/Module_toolkit.mk toolkit/Package_inc.mk toolkit/source tools/inc tools/Library_tl.mk tools/Module_tools.mk tools/Package_inc.mk tools/StaticLibrary_ooopathutils.mk touch/CustomTarget_touch_javamaker.mk touch/inc touch/Module_touch.mk touch/Package_inc.mk tubes/Executable_liboapprover.mk tubes/inc tubes/Library_tubes.mk tubes/Module_tubes.mk tubes/Package_inc.mk ucbhelper/inc ucbhelper/Library_ucbhelper.mk ucbhelper/Module_ucbhelper.mk ucbhelper/Package_inc.mk ucb/Library_srtrs1.mk u cb/Library_ucpext.mk ucb/qa ucb/source udkapi/com udkapi/Module_udkapi.mk udkapi/README udkapi/type_reference udkapi/UnoApiMerge_uretypes.mk udkapi/UnoApi_udkapi.mk udm/inc udm/Module_udm.mk udm/Package_inc.mk udm/StaticLibrary_udm.mk unodevtools/source unoidl/inc unoidl/Library_unoidl.mk unoidl/Module_unoidl.mk unoidl/Package_inc.mk unoidl/source unoil/CustomTarget_climaker.mk unotest/inc unotest/Library_unobootstrapprotector.mk unotest/Library_unoexceptionprotector.mk unotest/Library_unotest.mk unotest/Module_unotest.mk unotest/Package_inc.mk unotest/source unotools/inc unotools/Library_utl.mk unotools/Module_unotools.mk unotools/Package_inc.mk ure/source uui/AllLangResTarget_uui.mk vbahelper/inc vbahelper/Library_vbahelper.mk vbahelper/Module_vbahelper.mk vbahelper/Package_inc.mk vcl/AllLangResTarget_vcl.mk vcl/generic vcl/inc vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_kde.mk vcl/Library_vclplug_tde.mk vcl/Module_vcl.mk vcl/Package_inc.mk vcl/source vcl/StaticLibrary_headless.mk vcl/StaticLibrary_vclmain.mk vcl/unx vcl/win vcl/WinResTarget_vcl.mk wizards/com wizards/source writerfilter/source writerperfect/StaticLibrary_writerperfect.mk xmloff/inc xmloff/Library_xo.mk xmloff/Module_xmloff.mk xmloff/Package_inc.mk xmloff/source xmlreader/inc xmlreader/Library_xmlreader.mk xmlreader/Module_xmlreader.mk xmlreader/Package_inc.mk xmlscript/inc xmlscript/Library_xmlscript.mk xmlscript/Module_xmlscript.mk xmlscript/Package_inc.mk xmlsecurity/AllLangResTarget_xsec.mk
Kohei Yoshida
kohei.yoshida at gmail.com
Fri Apr 26 07:21:04 PDT 2013
Rebased ref, commits from common ancestor:
commit cfcb6706b716b57f22061ff718fd9b34212e0729
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Apr 25 15:43:32 2013 -0400
Not yet used, but a hook to retrieve a vector reference value.
Will be used in the next iteration.
Change-Id: Iff875e7e8a48df849d6df4dfb1418a024c9f7c06
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 8e076ee..866fce3 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -93,6 +93,11 @@ struct ColEntry
{
SCROW nRow;
ScBaseCell* pCell;
+
+ struct Less : std::binary_function<ColEntry, ColEntry, bool>
+ {
+ bool operator() (const ColEntry& r1, const ColEntry& r2) const;
+ };
};
struct ColDoubleEntry
@@ -443,6 +448,7 @@ public:
size_t GetFormulaHash( SCROW nRow ) const;
ScFormulaVectorState GetFormulaVectorState( SCROW nRow ) const;
+ bool ResolveVectorReference( SCROW nRow1, SCROW nRow2 );
ScRefCellValue GetRefCellValue( SCROW );
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 71dfb2c..052b81d 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1940,6 +1940,15 @@ public:
ScFormulaVectorState GetFormulaVectorState( const ScAddress& rPos ) const;
+ /**
+ * Check if the range contains any "dirty" formula cells. In the future
+ * we'll use this function to interpret those "dirty" formula cells on
+ * demand.
+ *
+ * @return true if the range is totally clean, false otherwise.
+ */
+ bool ResolveVectorReference( const ScAddress& rPos, SCROW nEndRow );
+
private: // CLOOK-Impl-methods
/**
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 3e68144..e6239e3 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -33,9 +33,9 @@ struct ScSimilarFormulaDelta;
struct SC_DLLPUBLIC ScFormulaCellGroup
{
- sal_Int32 mnRefCount;
- sal_Int32 mnStart; // Start offset of that cell
- sal_Int32 mnLength; // How many of these do we have ?
+ sal_Int32 mnRefCount;
+ SCROW mnStart; // Start offset of that cell
+ SCROW mnLength; // How many of these do we have ?
bool mbInvariant;
ScFormulaCellGroup();
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index d46a447..eb5f756 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -819,6 +819,7 @@ public:
size_t GetFormulaHash( SCCOL nCol, SCROW nRow ) const;
ScFormulaVectorState GetFormulaVectorState( SCCOL nCol, SCROW nRow ) const;
+ bool ResolveVectorReference( SCCOL nCol, SCROW nRow1, SCROW nRow2 );
ScRefCellValue GetRefCellValue( SCCOL nCol, SCROW nRow );
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 8ecb82e..0c3e630 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -45,6 +45,11 @@
using ::editeng::SvxBorderLine;
using namespace formula;
+bool ColEntry::Less::operator() (const ColEntry& r1, const ColEntry& r2) const
+{
+ return r1.nRow < r2.nRow;
+}
+
namespace {
inline bool IsAmbiguousScriptNonZero( sal_uInt8 nScript )
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index d0d53ea..e95dcf9 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1589,6 +1589,33 @@ ScFormulaVectorState ScColumn::GetFormulaVectorState( SCROW nRow ) const
return pCell ? pCell->GetVectorState() : FormulaVectorUnknown;
}
+bool ScColumn::ResolveVectorReference( SCROW nRow1, SCROW nRow2 )
+{
+ std::vector<ColEntry>::iterator itEnd = maItems.end();
+ // Find first cell whose position is equal or greater than nRow1.
+ ColEntry aBound;
+ aBound.nRow = nRow1;
+ std::vector<ColEntry>::iterator it =
+ std::lower_bound(maItems.begin(), itEnd, aBound, ColEntry::Less());
+
+ if (it == itEnd)
+ return false;
+
+ for (; it != itEnd && it->nRow <= nRow2; ++it)
+ {
+ if (it->pCell->GetCellType() != CELLTYPE_FORMULA)
+ // Non-formula cells are fine.
+ continue;
+
+ ScFormulaCell* pFC = static_cast<ScFormulaCell*>(it->pCell);
+ if (pFC->GetDirty())
+ // Dirty formula cells are not supported yet.
+ return false;
+ }
+
+ return true;
+}
+
ScRefCellValue ScColumn::GetRefCellValue( SCROW nRow )
{
ScRefCellValue aCell; // start empty
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 9d86d45..6a00d36 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1574,6 +1574,15 @@ ScFormulaVectorState ScDocument::GetFormulaVectorState( const ScAddress& rPos )
return maTabs[nTab]->GetFormulaVectorState(rPos.Col(), rPos.Row());
}
+bool ScDocument::ResolveVectorReference( const ScAddress& rPos, SCROW nEndRow )
+{
+ SCTAB nTab = rPos.Tab();
+ if (!TableExists(nTab))
+ return false;
+
+ return maTabs[nTab]->ResolveVectorReference(rPos.Col(), rPos.Row(), nEndRow);
+}
+
bool ScDocument::CanFitBlock( const ScRange& rOld, const ScRange& rNew )
{
if ( rOld == rNew )
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 9c52585..7ae3c66 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -2113,6 +2113,17 @@ ScFormulaVectorState ScTable::GetFormulaVectorState( SCCOL nCol, SCROW nRow ) co
return aCol[nCol].GetFormulaVectorState(nRow);
}
+bool ScTable::ResolveVectorReference( SCCOL nCol, SCROW nRow1, SCROW nRow2 )
+{
+ if (!ValidCol(nCol) || !ValidRow(nRow1) || !ValidRow(nRow2))
+ return false;
+
+ if (!aCol[nCol].ResolveVectorReference(nRow1, nRow2))
+ return false;
+
+ return true;
+}
+
ScRefCellValue ScTable::GetRefCellValue( SCCOL nCol, SCROW nRow )
{
if (!ValidColRow(nCol, nRow))
commit ef9990db2193d2231b93bf2833398c6517a1dfcb
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Apr 25 11:23:41 2013 -0400
We can't support all cases until we have real range-based dep tracking.
Note that an absolute reference may indirectly reference one of the cells
in current formula group, and we aren't fully prepare for that use case
yet.
Change-Id: Ibd24a25b80963fe1235c2afb431ff7c7ceb27215
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index fe956f5..e73641d 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2948,9 +2948,24 @@ bool ScFormulaCell::InterpretFormulaGroup()
// import / insert / delete etc. and is integral to the data structures
pDocument->RebuildFormulaGroups();
- if( !xGroup.get() )
+ if (!xGroup || !pCode)
return false;
+ switch (pCode->GetVectorState())
+ {
+ case FormulaVectorEnabled:
+ // Good.
+ break;
+ case FormulaVectorCheckReference:
+ // To support this we would need a real range-based dependency
+ // tracking. We can't support this right now.
+ return false;
+ case FormulaVectorDisabled:
+ case FormulaVectorUnknown:
+ default:
+ return false;
+ }
+
// fprintf( stderr, "Interpret cell %d, %d\n", (int)aPos.Col(), (int)aPos.Row() );
if (xGroup->mbInvariant)
commit 19f1afe23ed380323ec8ab54cea7cab77fabaf6a
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Wed Apr 24 21:43:06 2013 -0400
We really don't need to use similar data unless I missed something.
Change-Id: Iaab6033120c3d50a54fb151916dc2a7b7ba5a98c
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 469495a..3e68144 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -34,14 +34,12 @@ struct ScSimilarFormulaDelta;
struct SC_DLLPUBLIC ScFormulaCellGroup
{
sal_Int32 mnRefCount;
- ScSimilarFormulaDelta *mpDelta; // difference between items in column
sal_Int32 mnStart; // Start offset of that cell
sal_Int32 mnLength; // How many of these do we have ?
+ bool mbInvariant;
ScFormulaCellGroup();
~ScFormulaCellGroup();
-
- bool IsCompatible( ScSimilarFormulaDelta *pDelta );
};
inline void intrusive_ptr_add_ref(ScFormulaCellGroup *p)
{
@@ -100,6 +98,8 @@ private:
public:
+ enum CompareState { NotEqual = 0, EqualInvariant, EqualRelativeRef };
+
#ifdef USE_MEMPOOL
DECL_FIXEDMEMPOOL_NEWDEL( ScFormulaCell )
#endif
@@ -297,8 +297,9 @@ public:
{ return xGroup; }
void SetCellGroup( const ScFormulaCellGroupRef &xRef )
{ xGroup = xRef; }
- ScSimilarFormulaDelta *BuildDeltaTo( ScFormulaCell *pOther );
- void ReleaseDelta( ScSimilarFormulaDelta *pDelta );
+
+ CompareState CompareByTokenArray( ScFormulaCell *pOther ) const;
+
bool InterpretFormulaGroup();
// nOnlyNames may be one or more of SC_LISTENING_NAMES_*
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 3eb4b17..615fbaf 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2118,15 +2118,14 @@ void ScColumn::RebuildFormulaGroups()
if ( rCur.pCell->GetCellType() != CELLTYPE_FORMULA )
continue;
- // see if these formulae are similar
+ // see if these formula tokens are identical.
ScFormulaCell *pCur = static_cast< ScFormulaCell *>( rCur.pCell );
ScFormulaCell *pPrev = static_cast< ScFormulaCell *>( rPrev.pCell );
- ScSimilarFormulaDelta *pDelta = pPrev->BuildDeltaTo( pCur );
-
- if ( !pDelta )
+ ScFormulaCell::CompareState eCompState = pPrev->CompareByTokenArray(pCur);
+ if (eCompState == ScFormulaCell::NotEqual)
{
- // not similar
+ // different formula tokens.
pCur->SetCellGroup( xNone );
continue;
}
@@ -2136,8 +2135,8 @@ void ScColumn::RebuildFormulaGroups()
{
// create a new group ...
xGroup.reset(new ScFormulaCellGroup);
- xGroup->mpDelta = pDelta;
xGroup->mnStart = rPrev.nRow;
+ xGroup->mbInvariant = eCompState == ScFormulaCell::EqualInvariant;
xGroup->mnLength = 2;
maFnGroups.push_back( xGroup );
@@ -2145,27 +2144,11 @@ void ScColumn::RebuildFormulaGroups()
pCur->SetCellGroup( xGroup );
pPrev->SetCellGroup( xGroup );
}
- else if ( xGroup->IsCompatible( pDelta ) )
+ else
{
- // we are a compatible extension - extend the group
+ // existing group. extend its length.
pCur->SetCellGroup( xGroup );
xGroup->mnLength++;
- pCur->ReleaseDelta( pDelta );
- }
- else
- {
-#if OSL_DEBUG_LEVEL > 1
- OUString aFormula;
- pCur->GetFormula( aFormula );
- ScAddress aAddr( nCol, rCur.nRow, nTab );
- OUString aCellAddr;
- aAddr.Format( aCellAddr, 0, pDocument );
-
- fprintf( stderr, "unusual incompatible extension in cell '%s' of formulae '%s'\n" ,
- OUStringToOString( aCellAddr, RTL_TEXTENCODING_UTF8 ).getStr(),
- OUStringToOString( aFormula, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
- pCur->ReleaseDelta( pDelta );
}
}
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index ab70344..fe956f5 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -376,7 +376,7 @@ void adjustDBRange(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOldD
}
ScFormulaCellGroup::ScFormulaCellGroup() :
- mnRefCount(0), mpDelta(NULL), mnStart(0), mnLength(0)
+ mnRefCount(0), mnStart(0), mnLength(0), mbInvariant(false)
{
}
@@ -2857,123 +2857,89 @@ void ScFormulaCell::CompileColRowNameFormula()
}
}
-// we really want to be a lot more descriptive than this
-struct ScSimilarFormulaDelta : std::vector< size_t >
-{
- bool IsCompatible( ScSimilarFormulaDelta *pDelta )
- {
- if ( size() != pDelta->size() )
- return false;
- for ( size_t i = 0; i < size(); i++ )
- {
- if ( (*this)[ i ] != (*pDelta)[ i ] )
- return false;
- }
- return true;
- }
-
- void push_delta( const ScSingleRefData& a, const ScSingleRefData& b )
- {
- push_back( b.nCol - a.nCol );
- push_back( b.nRow - a.nRow );
- push_back( b.nTab - a.nTab );
- }
-
- /// if the vector is zero then nothing changes down the column.
- bool IsInvariant() const
- {
- for ( size_t i = 0; i < size(); i++ )
- {
- if ( (*this)[ i ] != 0 )
- return false;
- }
- return true;
- }
-};
-
-bool ScFormulaCellGroup::IsCompatible( ScSimilarFormulaDelta *pDelta )
-{
- return pDelta && mpDelta && mpDelta->IsCompatible( pDelta );
-}
-
-/// compare formulae tokens and build a series of deltas describing
-/// the difference - ie. the result, when added to this
-/// formulae should produce pOther
-ScSimilarFormulaDelta *ScFormulaCell::BuildDeltaTo( ScFormulaCell *pOtherCell )
+ScFormulaCell::CompareState ScFormulaCell::CompareByTokenArray( ScFormulaCell *pOtherCell ) const
{
// no Matrix formulae yet.
if ( GetMatrixFlag() != MM_NONE )
- return NULL;
+ return NotEqual;
// are these formule at all similar ?
if ( GetHash() != pOtherCell->GetHash() )
- return NULL;
+ return NotEqual;
FormulaToken **pThis = pCode->GetCode();
- sal_uInt16 pThisLen = pCode->GetCodeLen();
+ sal_uInt16 nThisLen = pCode->GetCodeLen();
FormulaToken **pOther = pOtherCell->pCode->GetCode();
- sal_uInt16 pOtherLen = pOtherCell->pCode->GetCodeLen();
+ sal_uInt16 nOtherLen = pOtherCell->pCode->GetCodeLen();
if ( !pThis || !pOther )
{
-// fprintf( stderr, "Error: no compiled code for cells !" );
- return NULL;
+ // Error: no compiled code for cells !"
+ return NotEqual;
}
- if ( pThisLen != pOtherLen )
- return NULL;
+ if ( nThisLen != nOtherLen )
+ return NotEqual;
+
+ bool bInvariant = true;
// check we are basically the same function
- for ( sal_uInt16 i = 0; i < pThisLen; i++ )
+ for ( sal_uInt16 i = 0; i < nThisLen; i++ )
{
- if ( pThis[ i ]->GetType() != pOther[ i ]->GetType() ||
- pThis[ i ]->GetOpCode() != pOther[ i ]->GetOpCode() ||
- pThis[ i ]->GetParamCount() != pOther[ i ]->GetParamCount() )
+ ScToken *pThisTok = static_cast<ScToken*>( pThis[i] );
+ ScToken *pOtherTok = static_cast<ScToken*>( pOther[i] );
+
+ if ( pThisTok->GetType() != pOtherTok->GetType() ||
+ pThisTok->GetOpCode() != pOtherTok->GetOpCode() ||
+ pThisTok->GetParamCount() != pOtherTok->GetParamCount() )
{
-// fprintf( stderr, "Incompatible type, op-code or param counts\n" );
- return NULL;
+ // Incompatible type, op-code or param counts.
+ return NotEqual;
}
- switch( pThis[ i ]->GetType() )
+
+ switch (pThisTok->GetType())
{
- case formula::svMatrix:
- case formula::svExternalSingleRef:
- case formula::svExternalDoubleRef:
-// fprintf( stderr, "Ignoring matrix and external references for now\n" );
- return NULL;
- default:
+ case formula::svMatrix:
+ case formula::svExternalSingleRef:
+ case formula::svExternalDoubleRef:
+ // Ignoring matrix and external references for now.
+ return NotEqual;
+
+ case formula::svSingleRef:
+ {
+ // Single cell reference.
+ const ScSingleRefData& rRef = pThisTok->GetSingleRef();
+ if (rRef != pOtherTok->GetSingleRef())
+ return NotEqual;
+
+ if (rRef.IsColRel() || rRef.IsRowRel())
+ bInvariant = false;
+ }
break;
- }
- }
+ case formula::svDoubleRef:
+ {
+ // Range reference.
+ const ScSingleRefData& rRef1 = pThisTok->GetSingleRef();
+ const ScSingleRefData& rRef2 = pThisTok->GetSingleRef2();
+ if (rRef1 != pOtherTok->GetSingleRef())
+ return NotEqual;
- ScSimilarFormulaDelta *pDelta = new ScSimilarFormulaDelta();
+ if (rRef2 != pOtherTok->GetSingleRef2())
+ return NotEqual;
- for ( sal_uInt16 i = 0; i < pThisLen; i++ )
- {
- ScToken *pThisTok = static_cast< ScToken * >( pThis[ i ] );
- ScToken *pOtherTok = static_cast< ScToken * >( pOther[ i ] );
+ if (rRef1.IsColRel() || rRef1.IsRowRel())
+ bInvariant = false;
- if ( pThis[i]->GetType() == formula::svSingleRef ||
- pThis[i]->GetType() == formula::svDoubleRef )
- {
- const ScSingleRefData& aThisRef = pThisTok->GetSingleRef();
- const ScSingleRefData& aOtherRef = pOtherTok->GetSingleRef();
- pDelta->push_delta( aThisRef, aOtherRef );
- }
- if ( pThis[i]->GetType() == formula::svDoubleRef )
- {
- const ScSingleRefData& aThisRef2 = pThisTok->GetSingleRef2();
- const ScSingleRefData& aOtherRef2 = pOtherTok->GetSingleRef2();
- pDelta->push_delta( aThisRef2, aOtherRef2 );
+ if (rRef2.IsColRel() || rRef2.IsRowRel())
+ bInvariant = false;
+ }
+ break;
+ default:
+ ;
}
}
- return pDelta;
-}
-
-/// To avoid exposing impl. details of ScSimilarFormulaDelta publicly
-void ScFormulaCell::ReleaseDelta( ScSimilarFormulaDelta *pDelta )
-{
- delete pDelta;
+ return bInvariant ? EqualInvariant : EqualRelativeRef;
}
bool ScFormulaCell::InterpretFormulaGroup()
@@ -2987,7 +2953,7 @@ bool ScFormulaCell::InterpretFormulaGroup()
// fprintf( stderr, "Interpret cell %d, %d\n", (int)aPos.Col(), (int)aPos.Row() );
- if ( xGroup->mpDelta->IsInvariant() )
+ if (xGroup->mbInvariant)
{
// fprintf( stderr, "struck gold - completely invariant for %d items !\n",
// (int)xGroup->mnLength );
commit fa109707a20691f7b8f19a474fd39fac9db63a0a
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Wed Apr 24 14:11:37 2013 -0400
Adding comment as I go along...
Change-Id: I3f95b2a1a4b180c23e82bdeec8279707220532d5
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 9ad0061..3eb4b17 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2094,6 +2094,7 @@ void ScColumn::RebuildFormulaGroups()
!rCur.pCell || !rPrev.pCell || // paranoia
rCur.pCell->GetCellType() != rPrev.pCell->GetCellType() ) // same type
{
+ // Non-contiguous cell detected. Break the series.
pLastDouble = NULL;
continue;
}
commit 4f5359e4b5242441271e59a95017e2c1f676594c
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Wed Apr 24 13:08:21 2013 -0400
Let's use std::for_each for this.
Change-Id: I74f59ad697eb5ff28b81cd883db58ba9f19c086c
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index cb82b3c..9ad0061 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2051,6 +2051,23 @@ xub_StrLen ScColumn::GetMaxNumberStringLen(
return nStringLen;
}
+namespace {
+
+struct CellGroupSetter : std::unary_function<ColEntry, void>
+{
+ ScFormulaCellGroupRef mxGroup;
+public:
+ CellGroupSetter(const ScFormulaCellGroupRef& xGroup) : mxGroup(xGroup) {}
+
+ void operator() (ColEntry& rEntry)
+ {
+ if (rEntry.pCell && rEntry.pCell->GetCellType() == CELLTYPE_FORMULA)
+ static_cast<ScFormulaCell*>(rEntry.pCell)->SetCellGroup(mxGroup);
+ }
+};
+
+}
+
// Very[!] slow way to look for and merge contiguous runs
// of similar formulae into a formulagroup
void ScColumn::RebuildFormulaGroups()
@@ -2064,12 +2081,7 @@ void ScColumn::RebuildFormulaGroups()
// clear previous groups
ScFormulaCellGroupRef xNone;
- for (size_t i = 0; i < maItems.size(); i++)
- {
- ColEntry &rCur = maItems[ i ];
- if ( rCur.pCell && rCur.pCell->GetCellType() == CELLTYPE_FORMULA )
- static_cast<ScFormulaCell *>( rCur.pCell )->SetCellGroup( xNone );
- }
+ std::for_each(maItems.begin(), maItems.end(), CellGroupSetter(xNone));
maFnGroups.clear();
// re-build groups
commit fe9fd6cc4662aa2a4959235cd4d61fb858df06c7
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Wed Apr 24 11:13:08 2013 -0400
Wrap inside smart pointer on instantiation, for exception safety.
And boost::intrusive_ptr has a bool operator; no need to call get()
in this case.
Change-Id: I8ca965349c13dd0fedc16dc0d535b8c337fce52c
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index e69a8cc..cb82b3c 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2119,15 +2119,14 @@ void ScColumn::RebuildFormulaGroups()
}
ScFormulaCellGroupRef xGroup = pPrev->GetCellGroup();
- if ( !xGroup.get() )
+ if (!xGroup)
{
// create a new group ...
- ScFormulaCellGroup *pGroup = new ScFormulaCellGroup();
- pGroup->mpDelta = pDelta;
- pGroup->mnStart = rPrev.nRow;
- pGroup->mnLength = 2;
+ xGroup.reset(new ScFormulaCellGroup);
+ xGroup->mpDelta = pDelta;
+ xGroup->mnStart = rPrev.nRow;
+ xGroup->mnLength = 2;
- xGroup.reset( pGroup );
maFnGroups.push_back( xGroup );
pCur->SetCellGroup( xGroup );
commit 7ace86f22dea0d1f0869c45ea26ab53a972f8a0c
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Wed Apr 24 10:57:51 2013 -0400
We have function object for this.
Change-Id: I9021771a6d6be9980ca1c46a0b5034f84fa0d49f
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 60e4b64..e69a8cc 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -48,6 +48,7 @@
#include "globalnames.hxx"
#include "cellvalue.hxx"
#include "tokenarray.hxx"
+#include "stlalgorithm.hxx"
#include <com/sun/star/i18n/LocaleDataItem.hpp>
@@ -2058,9 +2059,7 @@ void ScColumn::RebuildFormulaGroups()
return;
// clear double groups
- for (std::vector< ColDoubleEntry *>::iterator it = maDoubles.begin();
- it != maDoubles.end(); ++it )
- delete *it;
+ std::for_each(maDoubles.begin(), maDoubles.end(), ScDeleteObjectByPtr<ColDoubleEntry>());
maDoubles.clear();
// clear previous groups
@@ -2186,7 +2185,6 @@ void ScColumn::RebuildFormulaGroups()
}
#endif
-
bDirtyGroups = false;
}
commit 127caae6f7ec97ba1387e2e737f499e149d134ab
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Fri Apr 26 15:23:21 2013 +0200
SwModelTestBase: add save(), next to load() and reload()
Change-Id: I15405dd6be64da689257aed50ba847f3741df3a1
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index c367b8f..5419a8c 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -288,6 +288,17 @@ protected:
calcLayout();
}
+ /// Save the loaded document to a tempfile. Can be used to check the resulting docx/odt directly as a ZIP file.
+ void save(OUString aFilter, utl::TempFile& rTempFile)
+ {
+ rTempFile.EnableKillingFile();
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aFilterArgs(1);
+ aFilterArgs[0].Name = "FilterName";
+ aFilterArgs[0].Value <<= aFilter;
+ xStorable->storeToURL(rTempFile.GetURL(), aFilterArgs);
+ }
+
void finish()
{
sal_uInt32 nEndTime = osl_getGlobalTimer();
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 5c4c408..436759a 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -152,14 +152,8 @@ void Test::testFdo58949()
* and replacement image) OLE objects using UNO, so we'll check the zip file directly.
*/
- // Create the zip file.
utl::TempFile aTempFile;
- aTempFile.EnableKillingFile();
- uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
- uno::Sequence<beans::PropertyValue> aFilterArgs(1);
- aFilterArgs[0].Name = "FilterName";
- aFilterArgs[0].Value <<= OUString("writer8");
- xStorable->storeToURL(aTempFile.GetURL(), aFilterArgs);
+ save("writer8", aTempFile);
uno::Sequence<uno::Any> aArgs(1);
aArgs[0] <<= OUString(aTempFile.GetURL());
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 41b335b..0def6ef 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -578,12 +578,7 @@ void Test::testCellBtlr()
// Create the zip file.
utl::TempFile aTempFile;
- aTempFile.EnableKillingFile();
- uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
- uno::Sequence<beans::PropertyValue> aFilterArgs(1);
- aFilterArgs[0].Name = "FilterName";
- aFilterArgs[0].Value <<= OUString("Office Open XML Text");
- xStorable->storeToURL(aTempFile.GetURL(), aFilterArgs);
+ save("Office Open XML Text", aTempFile);
// Read the XML stream we're interested in.
uno::Sequence<uno::Any> aArgs(1);
commit 8bcbc1d51dfaa40961c12324423fbf263be78538
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Apr 26 15:55:55 2013 +0300
This *is* C code
Change-Id: I4461b7a38862ad2c9861861fad8d6bf4bafd01ab
diff --git a/sal/systools/win32/uwinapi/legacy.c b/sal/systools/win32/uwinapi/legacy.c
index 777df2b..b789c07 100644
--- a/sal/systools/win32/uwinapi/legacy.c
+++ b/sal/systools/win32/uwinapi/legacy.c
@@ -14,7 +14,7 @@
#pragma warning(disable:4273) // inconsistent dll linkage
#endif
-extern "C" DWORD WINAPI GetShortPathNameW(LPCWSTR lpszLongPath,LPWSTR lpszShortPath,DWORD cchBuffer)
+DWORD WINAPI GetShortPathNameW(LPCWSTR lpszLongPath,LPWSTR lpszShortPath,DWORD cchBuffer)
{
typedef DWORD (WINAPI * GetShortPathNameW_t) (LPCWSTR,LPWSTR,DWORD);
commit 40ddc26252ef6c4a5cbe457143b13682368adce4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 26 13:51:20 2013 +0100
Updated core
Project: help 8c2dfbc78aabdc65c0fa0adb5d79e9e4095a605e
diff --git a/helpcontent2 b/helpcontent2
index dcb5f0b..8c2dfbc 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit dcb5f0b147f73d5a1995398f474271336ff2b033
+Subproject commit 8c2dfbc78aabdc65c0fa0adb5d79e9e4095a605e
commit add638b725bb9e5c94b33f6802483bc7101e3681
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Apr 26 14:38:52 2013 +0200
test: clean up namespacing
Change-Id: I7df07176bdbd15fdfdf8f9a7cdb26d4bee12997d
diff --git a/include/test/container/xelementaccess.hxx b/include/test/container/xelementaccess.hxx
index 71306d3..a776d33 100644
--- a/include/test/container/xelementaccess.hxx
+++ b/include/test/container/xelementaccess.hxx
@@ -10,24 +10,22 @@
#include <com/sun/star/uno/Type.hxx>
#include <com/sun/star/uno/Reference.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class XElementAccess
{
public:
- XElementAccess(uno::Type& rType): maType(rType) {}
+ XElementAccess(css::uno::Type& rType): maType(rType) {}
void testGetElementType();
void testHasElements();
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
virtual ~XElementAccess() {}
private:
- uno::Type maType;
+ css::uno::Type maType;
};
}
diff --git a/include/test/container/xindexaccess.hxx b/include/test/container/xindexaccess.hxx
index 1962f9f..95401c1 100644
--- a/include/test/container/xindexaccess.hxx
+++ b/include/test/container/xindexaccess.hxx
@@ -9,8 +9,6 @@
#include <com/sun/star/uno/Reference.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class XIndexAccess
@@ -18,7 +16,7 @@ class XIndexAccess
public:
XIndexAccess(sal_Int32 nItems);
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testGetCount();
void testGetByIndex();
// will throw an exception and should fail if not
diff --git a/include/test/container/xnamecontainer.hxx b/include/test/container/xnamecontainer.hxx
index c231dae..7a253df 100644
--- a/include/test/container/xnamecontainer.hxx
+++ b/include/test/container/xnamecontainer.hxx
@@ -11,8 +11,6 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XNameContainer
@@ -23,7 +21,7 @@ public:
// removes given entry
XNameContainer(const OUString& rName);
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testRemoveByName();
diff --git a/include/test/container/xnamed.hxx b/include/test/container/xnamed.hxx
index acb367e..f574576 100644
--- a/include/test/container/xnamed.hxx
+++ b/include/test/container/xnamed.hxx
@@ -11,8 +11,6 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XNamed
@@ -24,7 +22,7 @@ public:
void testGetName();
void testSetName();
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
private:
OUString maName;
diff --git a/include/test/container/xnamereplace.hxx b/include/test/container/xnamereplace.hxx
index 6b616cd..d9b039f 100644
--- a/include/test/container/xnamereplace.hxx
+++ b/include/test/container/xnamereplace.hxx
@@ -12,8 +12,6 @@
#include <test/testdllapi.hxx>
#include <com/sun/star/uno/Any.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XNameReplace
@@ -21,11 +19,11 @@ class OOO_DLLPUBLIC_TEST XNameReplace
public:
XNameReplace(const OUString& rName): maName(rName) {}
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testReplaceByName();
- virtual uno::Any getAnyElementForNameReplace() = 0;
+ virtual css::uno::Any getAnyElementForNameReplace() = 0;
virtual ~XNameReplace() {}
diff --git a/include/test/sheet/cellproperties.hxx b/include/test/sheet/cellproperties.hxx
index 49f9c37..fcbdc5f 100644
--- a/include/test/sheet/cellproperties.hxx
+++ b/include/test/sheet/cellproperties.hxx
@@ -11,14 +11,12 @@
#include <com/sun/star/uno/XInterface.hpp>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST CellProperties
{
public:
- virtual uno::Reference < uno::XInterface > init() = 0;
+ virtual css::uno::Reference < css::uno::XInterface > init() = 0;
void testVertJustify();
void testRotateReference();
diff --git a/include/test/sheet/datapilotfield.hxx b/include/test/sheet/datapilotfield.hxx
index 253bdf4..8fa8cdb 100644
--- a/include/test/sheet/datapilotfield.hxx
+++ b/include/test/sheet/datapilotfield.hxx
@@ -10,14 +10,12 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST DataPilotField
{
public:
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testSortInfo();
void testLayoutInfo();
diff --git a/include/test/sheet/tableautoformatfield.hxx b/include/test/sheet/tableautoformatfield.hxx
index 6b6d79f..a42f5b9 100644
--- a/include/test/sheet/tableautoformatfield.hxx
+++ b/include/test/sheet/tableautoformatfield.hxx
@@ -9,17 +9,15 @@
#include <com/sun/star/beans/XPropertySet.hpp>
-using namespace com::sun::star;
-
namespace apitest {
class TableAutoFormatField
{
public:
//don't use virtual init() here
- uno::Reference< beans::XPropertySet > initTest();
+ css::uno::Reference< beans::XPropertySet > initTest();
- virtual uno::Reference< > getServiceFactory() = 0;
+ virtual css::uno::Reference< > getServiceFactory() = 0;
void testRotateReference();
void testVertJustify();
diff --git a/include/test/sheet/xcellrangedata.hxx b/include/test/sheet/xcellrangedata.hxx
index dd56045..63cc44f 100644
--- a/include/test/sheet/xcellrangedata.hxx
+++ b/include/test/sheet/xcellrangedata.hxx
@@ -10,15 +10,12 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XCellRangeData
{
public:
-
- virtual uno::Reference< uno::XInterface > getXCellRangeData() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > getXCellRangeData() = 0;
void testGetDataArray();
void testSetDataArray();
diff --git a/include/test/sheet/xcellrangereferrer.hxx b/include/test/sheet/xcellrangereferrer.hxx
index 2204430..5af153f 100644
--- a/include/test/sheet/xcellrangereferrer.hxx
+++ b/include/test/sheet/xcellrangereferrer.hxx
@@ -10,17 +10,15 @@
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XCellRangeReferrer
{
public:
- XCellRangeReferrer( table::CellRangeAddress aCellRange ):
+ XCellRangeReferrer( css::table::CellRangeAddress aCellRange ):
maCellRange( aCellRange ) {}
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testGetReferredCells();
@@ -28,7 +26,7 @@ protected:
~XCellRangeReferrer() {}
private:
- table::CellRangeAddress maCellRange;
+ css::table::CellRangeAddress maCellRange;
};
}
diff --git a/include/test/sheet/xcellrangesquery.hxx b/include/test/sheet/xcellrangesquery.hxx
index 3d419b7..e48c5b5 100644
--- a/include/test/sheet/xcellrangesquery.hxx
+++ b/include/test/sheet/xcellrangesquery.hxx
@@ -10,17 +10,12 @@
#include <com/sun/star/uno/XInterface.hpp>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
-
namespace apitest {
-
class OOO_DLLPUBLIC_TEST XCellRangesQuery
{
public:
-
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
//Testcases
void testQueryColumnDifference();
diff --git a/include/test/sheet/xdatabaserange.hxx b/include/test/sheet/xdatabaserange.hxx
index 2be7e4d..aae8ec7 100644
--- a/include/test/sheet/xdatabaserange.hxx
+++ b/include/test/sheet/xdatabaserange.hxx
@@ -7,19 +7,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <rtl/ustring.hxx>
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XDatabaseRange
{
public:
- virtual uno::Reference< uno::XInterface > init(const OUString& rDBName) = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init(const OUString& rDBName) = 0;
void testDataArea();
void testGetSortDescriptor();
diff --git a/include/test/sheet/xdatapilotdescriptor.hxx b/include/test/sheet/xdatapilotdescriptor.hxx
index 55b26a3..9f85f2e 100644
--- a/include/test/sheet/xdatapilotdescriptor.hxx
+++ b/include/test/sheet/xdatapilotdescriptor.hxx
@@ -15,8 +15,6 @@
#include <vector>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XDataPilotDescriptor
@@ -32,16 +30,15 @@ public:
void testGetDataFields();
void testGetHiddenFields();
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
protected:
~XDataPilotDescriptor() {}
private:
+ void testGetDataPilotFields_Impl( css::uno::Reference< css::sheet::XDataPilotDescriptor > xDescr );
- void testGetDataPilotFields_Impl( uno::Reference< sheet::XDataPilotDescriptor > xDescr );
-
- void checkName( uno::Reference< container::XIndexAccess > xIndex, sal_Int32 nIndex );
+ void checkName( css::uno::Reference< css::container::XIndexAccess > xIndex, sal_Int32 nIndex );
static std::vector<OUString> maFieldNames;
};
diff --git a/include/test/sheet/xdatapilotfieldgrouping.hxx b/include/test/sheet/xdatapilotfieldgrouping.hxx
index fd11a45..f741663 100644
--- a/include/test/sheet/xdatapilotfieldgrouping.hxx
+++ b/include/test/sheet/xdatapilotfieldgrouping.hxx
@@ -11,8 +11,6 @@
#include <com/sun/star/uno/XInterface.hpp>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XDataPilotFieldGrouping
@@ -21,7 +19,7 @@ public:
void testCreateNameGroup();
void testCreateDateGroup();
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
protected:
~XDataPilotFieldGrouping() {}
diff --git a/include/test/sheet/xdatapilottable.hxx b/include/test/sheet/xdatapilottable.hxx
index 27c5f2a..d11df25 100644
--- a/include/test/sheet/xdatapilottable.hxx
+++ b/include/test/sheet/xdatapilottable.hxx
@@ -13,22 +13,20 @@
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XDataPilotTable
{
public:
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
virtual ~XDataPilotTable();
void testGetOutputRange();
void testRefresh();
protected:
- uno::Reference< table::XCell > xCellForChange;
- uno::Reference< table::XCell > xCellForCheck;
+ css::uno::Reference< css::table::XCell > xCellForChange;
+ css::uno::Reference< css::table::XCell > xCellForCheck;
};
}
diff --git a/include/test/sheet/xdatapilottable2.hxx b/include/test/sheet/xdatapilottable2.hxx
index b1dc311..002218b 100644
--- a/include/test/sheet/xdatapilottable2.hxx
+++ b/include/test/sheet/xdatapilottable2.hxx
@@ -18,8 +18,6 @@
#include <vector>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XDataPilotTable2
@@ -31,23 +29,23 @@ public:
void testInsertDrillDownSheet();
virtual ~XDataPilotTable2();
- virtual uno::Reference< uno::XInterface > initDP2() = 0;
- virtual uno::Reference< uno::XInterface > getSheets() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > initDP2() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > getSheets() = 0;
protected:
private:
- bool checkDrillDownSheetContent(uno::Reference< sheet::XSpreadsheet >, uno::Sequence< uno::Sequence < uno::Any > > aData);
+ bool checkDrillDownSheetContent(css::uno::Reference< css::sheet::XSpreadsheet >, css::uno::Sequence< css::uno::Sequence < css::uno::Any > > aData);
- void getOutputRanges(uno::Reference< sheet::XDataPilotTable2 >);
- void buildDataFields(uno::Reference< sheet::XDataPilotTable2 >);
- void buildResultCells(uno::Reference< sheet::XDataPilotTable2 >);
+ void getOutputRanges(css::uno::Reference< css::sheet::XDataPilotTable2 >);
+ void buildDataFields(css::uno::Reference< css::sheet::XDataPilotTable2 >);
+ void buildResultCells(css::uno::Reference< css::sheet::XDataPilotTable2 >);
- std::vector< table::CellAddress > maResultCells;
+ std::vector< css::table::CellAddress > maResultCells;
std::vector< sal_Int32 > maDataFieldDims;
- table::CellRangeAddress maRangeWhole;
- table::CellRangeAddress maRangeTable;
- table::CellRangeAddress maRangeResult;
+ css::table::CellRangeAddress maRangeWhole;
+ css::table::CellRangeAddress maRangeTable;
+ css::table::CellRangeAddress maRangeResult;
};
}
diff --git a/include/test/sheet/xgoalseek.hxx b/include/test/sheet/xgoalseek.hxx
index 71fce12..892a6b7 100644
--- a/include/test/sheet/xgoalseek.hxx
+++ b/include/test/sheet/xgoalseek.hxx
@@ -10,15 +10,12 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XGoalSeek
{
public:
-
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testSeekGoal();
diff --git a/include/test/sheet/xnamedrange.hxx b/include/test/sheet/xnamedrange.hxx
index 97a6afd..19465fe 100644
--- a/include/test/sheet/xnamedrange.hxx
+++ b/include/test/sheet/xnamedrange.hxx
@@ -30,14 +30,12 @@
#include <com/sun/star/sheet/XNamedRange.hpp>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XNamedRange
{
public:
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
// XNamedRange
void testGetContent();
@@ -46,11 +44,11 @@ public:
void testSetType();
void testGetReferencePosition();
void testSetReferencePosition();
+
protected:
~XNamedRange() {}
- virtual uno::Reference< sheet::XNamedRange> getNamedRange(const OUString&) = 0;
-
+ virtual css::uno::Reference< css::sheet::XNamedRange> getNamedRange(const OUString&) = 0;
};
}
diff --git a/include/test/sheet/xnamedranges.hxx b/include/test/sheet/xnamedranges.hxx
index d0d2eee..57b0b85 100644
--- a/include/test/sheet/xnamedranges.hxx
+++ b/include/test/sheet/xnamedranges.hxx
@@ -26,13 +26,10 @@
* instead of those above.
*/
-#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XNamedRanges
@@ -45,7 +42,7 @@ public:
virtual ~XNamedRanges();
- virtual uno::Reference< uno::XInterface > init(sal_Int32 nSheets = 0) = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init(sal_Int32 nSheets = 0) = 0;
// XNamedRanges
void testAddNewByName();
@@ -54,7 +51,7 @@ public:
void testOutputList();
protected:
- uno::Reference< sheet::XSpreadsheet > xSheet;
+ css::uno::Reference< css::sheet::XSpreadsheet > xSheet;
private:
OUString maNameToRemove;
diff --git a/include/test/sheet/xprintareas.hxx b/include/test/sheet/xprintareas.hxx
index 08f5348..e1b7e2b 100644
--- a/include/test/sheet/xprintareas.hxx
+++ b/include/test/sheet/xprintareas.hxx
@@ -26,17 +26,15 @@
* instead of those above.
*/
- #include <com/sun/star/sheet/XPrintAreas.hpp>
- #include <test/testdllapi.hxx>
-
-using namespace com::sun::star;
+#include <com/sun/star/sheet/XPrintAreas.hpp>
+#include <test/testdllapi.hxx>
namespace apitest {
class OOO_DLLPUBLIC_TEST XPrintAreas
{
public:
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testSetAndGetPrintTitleColumns(); //getter and setter in one test case
void testSetAndGetPrintTitleRows();
@@ -50,8 +48,6 @@ public:
protected:
~XPrintAreas() {}
-
-
};
}
diff --git a/include/test/sheet/xsheetannotation.hxx b/include/test/sheet/xsheetannotation.hxx
index 9dd552d..03effd3 100644
--- a/include/test/sheet/xsheetannotation.hxx
+++ b/include/test/sheet/xsheetannotation.hxx
@@ -32,14 +32,12 @@
#include <com/sun/star/table/CellAddress.hpp>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XSheetAnnotation
{
public:
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
// XSheetAnnotation
void testGetPosition();
@@ -51,8 +49,7 @@ public:
protected:
~XSheetAnnotation() {}
- virtual uno::Reference< sheet::XSheetAnnotation> getAnnotation(table::CellAddress&) = 0;
-
+ virtual css::uno::Reference< css::sheet::XSheetAnnotation> getAnnotation(css::table::CellAddress&) = 0;
};
}
diff --git a/include/test/sheet/xsheetannotations.hxx b/include/test/sheet/xsheetannotations.hxx
index 9c1c211..314b841 100644
--- a/include/test/sheet/xsheetannotations.hxx
+++ b/include/test/sheet/xsheetannotations.hxx
@@ -26,29 +26,24 @@
* instead of those above.
*/
-#include <rtl/ustring.hxx>
#include <com/sun/star/sheet/XSheetAnnotations.hpp>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XSheetAnnotations
{
public:
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
// XSheetAnnotations
void testInsertNew();
void testRemoveByIndex();
-
protected:
~XSheetAnnotations() {}
- virtual uno::Reference< sheet::XSheetAnnotations> getAnnotations() = 0;
-
+ virtual css::uno::Reference< css::sheet::XSheetAnnotations> getAnnotations() = 0;
};
}
diff --git a/include/test/sheet/xsheetoutline.hxx b/include/test/sheet/xsheetoutline.hxx
index b52ac0ee..54db666 100644
--- a/include/test/sheet/xsheetoutline.hxx
+++ b/include/test/sheet/xsheetoutline.hxx
@@ -30,14 +30,12 @@
#include <com/sun/star/sheet/XSheetOutline.hpp>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XSheetOutline
{
public:
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
// XSheetOutline
void testHideDetail();
diff --git a/include/test/sheet/xspreadsheetdocument.hxx b/include/test/sheet/xspreadsheetdocument.hxx
index edeef9c..51bdf62 100644
--- a/include/test/sheet/xspreadsheetdocument.hxx
+++ b/include/test/sheet/xspreadsheetdocument.hxx
@@ -10,8 +10,6 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class XSpreadsheetDocument
@@ -19,7 +17,7 @@ class XSpreadsheetDocument
public:
XSpreadsheetDocument(sal_Int32 nSheets) : mnSheets(nSheets) {}
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testGetSheets();
diff --git a/include/test/sheet/xspreadsheets2.hxx b/include/test/sheet/xspreadsheets2.hxx
index 83b9edd..3b429e4 100644
--- a/include/test/sheet/xspreadsheets2.hxx
+++ b/include/test/sheet/xspreadsheets2.hxx
@@ -33,10 +33,6 @@
#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-#include <rtl/ustring.hxx>
-
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XSpreadsheets2
@@ -57,23 +53,23 @@ public:
void testImportNewNamedRange();
void testImportCellStyle();
- virtual uno::Reference< lang::XComponent > getComponent() = 0;
- virtual uno::Reference< uno::XInterface > init() = 0;
- virtual uno::Reference< lang::XComponent > loadFromDesktop(const OUString&) = 0;
+ virtual css::uno::Reference< css::lang::XComponent > getComponent() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::lang::XComponent > loadFromDesktop(const OUString&) = 0;
virtual void createFileURL(const OUString&, OUString&) = 0;
protected:
- uno::Reference< sheet::XSpreadsheetDocument> xDocument;
+ css::uno::Reference< css::sheet::XSpreadsheetDocument> xDocument;
private:
- uno::Reference< sheet::XSpreadsheetDocument> getDoc(const OUString&, uno::Reference< lang::XComponent >&);
- uno::Reference< sheet::XNamedRanges> getNamedRanges(uno::Reference< sheet::XSpreadsheetDocument >);
+ css::uno::Reference< css::sheet::XSpreadsheetDocument> getDoc(const OUString&, css::uno::Reference< css::lang::XComponent >&);
+ css::uno::Reference< css::sheet::XNamedRanges> getNamedRanges(css::uno::Reference< css::sheet::XSpreadsheetDocument >);
void importSheetToCopy();
bool isExternalReference(const OUString& aDestContent, const OUString& aSrcContent );
- uno::Reference< sheet::XSpreadsheetDocument> xDestDoc;
- uno::Reference< sheet::XSpreadsheet > xDestSheet;
- uno::Reference< sheet::XSpreadsheet > xSrcSheet;
+ css::uno::Reference< css::sheet::XSpreadsheetDocument> xDestDoc;
+ css::uno::Reference< css::sheet::XSpreadsheet > xDestSheet;
+ css::uno::Reference< css::sheet::XSpreadsheet > xSrcSheet;
OUString aSrcSheetName;
OUString aSrcFileName;
OUString aDestFileBase;
diff --git a/include/test/text/xtext.hxx b/include/test/text/xtext.hxx
index 2afee6c..bad665c 100644
--- a/include/test/text/xtext.hxx
+++ b/include/test/text/xtext.hxx
@@ -17,8 +17,6 @@
#include <com/sun/star/text/XText.hpp>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XText
@@ -26,8 +24,8 @@ class OOO_DLLPUBLIC_TEST XText
public:
virtual ~XText();
- virtual uno::Reference<uno::XInterface> init() = 0;
- virtual uno::Reference<text::XTextContent> getTextContent() = 0;
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+ virtual css::uno::Reference<css::text::XTextContent> getTextContent() = 0;
void testInsertRemoveTextContent();
};
diff --git a/include/test/text/xtextcontent.hxx b/include/test/text/xtextcontent.hxx
index 80549b0..0d5cbb3 100644
--- a/include/test/text/xtextcontent.hxx
+++ b/include/test/text/xtextcontent.hxx
@@ -13,8 +13,6 @@
#include "test/testdllapi.hxx"
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XTextContent
@@ -22,15 +20,13 @@ class OOO_DLLPUBLIC_TEST XTextContent
public:
virtual ~XTextContent() {}
- virtual uno::Reference< uno::XInterface > init() = 0;
- virtual uno::Reference< text::XTextRange > getTextRange() = 0;
- virtual uno::Reference< text::XTextContent > getTextContent() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::text::XTextRange > getTextRange() = 0;
+ virtual css::uno::Reference< css::text::XTextContent > getTextContent() = 0;
virtual bool isAttachSupported() = 0;
void testGetAnchor();
void testAttach();
-
-
};
}
diff --git a/include/test/text/xtextfield.hxx b/include/test/text/xtextfield.hxx
index 508a622..17c60ed 100644
--- a/include/test/text/xtextfield.hxx
+++ b/include/test/text/xtextfield.hxx
@@ -11,8 +11,6 @@
#include "test/testdllapi.hxx"
-using namespace com::sun::star;
-
namespace apitest
{
@@ -21,7 +19,7 @@ class OOO_DLLPUBLIC_TEST XTextField
public:
virtual ~XTextField() {}
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testGetPresentation();
};
diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index 171e47a..ee83689 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -11,12 +11,8 @@
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <com/sun/star/lang/XComponent.hpp>
-#include <rtl/ustrbuf.hxx>
#include <osl/file.hxx>
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-
// basic uno api test class
class OOO_DLLPUBLIC_TEST UnoApiTest : public test::BootstrapFixture, public unotest::MacrosTest
@@ -30,11 +26,11 @@ public:
virtual void tearDown();
protected:
- void closeDocument( uno::Reference< lang::XComponent > xDocument );
+ void closeDocument( css::uno::Reference< css::lang::XComponent > xDocument );
private:
- uno::Reference<uno::XInterface> m_xCalcComponent;
+ css::uno::Reference<css::uno::XInterface> m_xCalcComponent;
OUString m_aBaseString;
};
diff --git a/include/test/util/xreplaceable.hxx b/include/test/util/xreplaceable.hxx
index 34b56b2..0f930b4 100644
--- a/include/test/util/xreplaceable.hxx
+++ b/include/test/util/xreplaceable.hxx
@@ -7,12 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XReplaceable
@@ -20,7 +17,7 @@ class OOO_DLLPUBLIC_TEST XReplaceable
public:
XReplaceable( const OUString& rSearchString, const OUString& rReplaceString):
maSearchString(rSearchString), maReplaceString(rReplaceString) {}
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testCreateReplaceDescriptor();
void testReplaceAll();
diff --git a/include/test/util/xsearchable.hxx b/include/test/util/xsearchable.hxx
index 975ebb2..c7dfc21 100644
--- a/include/test/util/xsearchable.hxx
+++ b/include/test/util/xsearchable.hxx
@@ -7,11 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <rtl/ustring.hxx>
#include <test/testdllapi.hxx>
-using namespace com::sun::star;
-
namespace apitest {
class OOO_DLLPUBLIC_TEST XSearchable
@@ -25,7 +22,7 @@ public:
void testFindNext();
void testFindAll();
- virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual css::uno::Reference< css::uno::XInterface > init() = 0;
private:
OUString maSearchString;
diff --git a/test/source/container/xelementaccess.cxx b/test/source/container/xelementaccess.cxx
index e955d08..c1281fe 100644
--- a/test/source/container/xelementaccess.cxx
+++ b/test/source/container/xelementaccess.cxx
@@ -11,7 +11,8 @@
#include <com/sun/star/container/XElementAccess.hpp>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/container/xindexaccess.cxx b/test/source/container/xindexaccess.cxx
index 47dd19f..773366a 100644
--- a/test/source/container/xindexaccess.cxx
+++ b/test/source/container/xindexaccess.cxx
@@ -11,7 +11,8 @@
#include <com/sun/star/container/XIndexAccess.hpp>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/container/xnamecontainer.cxx b/test/source/container/xnamecontainer.cxx
index 9afa09a..98fdf85 100644
--- a/test/source/container/xnamecontainer.cxx
+++ b/test/source/container/xnamecontainer.cxx
@@ -14,7 +14,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <iostream>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/container/xnamed.cxx b/test/source/container/xnamed.cxx
index 74ebaad..6b28bf4 100644
--- a/test/source/container/xnamed.cxx
+++ b/test/source/container/xnamed.cxx
@@ -11,7 +11,8 @@
#include <test/container/xnamed.hxx>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/container/xnamereplace.cxx b/test/source/container/xnamereplace.cxx
index 505e42b..8af5e7c 100644
--- a/test/source/container/xnamereplace.cxx
+++ b/test/source/container/xnamereplace.cxx
@@ -11,7 +11,8 @@
#include <com/sun/star/container/XNameReplace.hpp>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/cellproperties.cxx b/test/source/sheet/cellproperties.cxx
index 069466f..c5a5236 100644
--- a/test/source/sheet/cellproperties.cxx
+++ b/test/source/sheet/cellproperties.cxx
@@ -15,7 +15,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <iostream>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/datapilotfield.cxx b/test/source/sheet/datapilotfield.cxx
index fe7cb1a..8a3399c 100644
--- a/test/source/sheet/datapilotfield.cxx
+++ b/test/source/sheet/datapilotfield.cxx
@@ -26,7 +26,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <iostream>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xcellrangedata.cxx b/test/source/sheet/xcellrangedata.cxx
index 01be270..f297af5 100644
--- a/test/source/sheet/xcellrangedata.cxx
+++ b/test/source/sheet/xcellrangedata.cxx
@@ -12,7 +12,8 @@
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xcellrangereferrer.cxx b/test/source/sheet/xcellrangereferrer.cxx
index 531d118..6b4f524 100644
--- a/test/source/sheet/xcellrangereferrer.cxx
+++ b/test/source/sheet/xcellrangereferrer.cxx
@@ -13,7 +13,8 @@
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xdatabaserange.cxx b/test/source/sheet/xdatabaserange.cxx
index 6a572c3..21487ef 100644
--- a/test/source/sheet/xdatabaserange.cxx
+++ b/test/source/sheet/xdatabaserange.cxx
@@ -27,7 +27,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <iostream>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xdatapilotdescriptor.cxx b/test/source/sheet/xdatapilotdescriptor.cxx
index 4e316eb..1e2c67a 100644
--- a/test/source/sheet/xdatapilotdescriptor.cxx
+++ b/test/source/sheet/xdatapilotdescriptor.cxx
@@ -18,7 +18,8 @@
#include <rtl/ustring.hxx>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xdatapilotfieldgrouping.cxx b/test/source/sheet/xdatapilotfieldgrouping.cxx
index cdbd080..fdfdfd5 100644
--- a/test/source/sheet/xdatapilotfieldgrouping.cxx
+++ b/test/source/sheet/xdatapilotfieldgrouping.cxx
@@ -14,7 +14,8 @@
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xdatapilottable.cxx b/test/source/sheet/xdatapilottable.cxx
index 72d9734..cef1550 100644
--- a/test/source/sheet/xdatapilottable.cxx
+++ b/test/source/sheet/xdatapilottable.cxx
@@ -20,7 +20,8 @@
#include <rtl/ustring.hxx>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest
{
diff --git a/test/source/sheet/xdatapilottable2.cxx b/test/source/sheet/xdatapilottable2.cxx
index 42a5911..ce78ccc 100644
--- a/test/source/sheet/xdatapilottable2.cxx
+++ b/test/source/sheet/xdatapilottable2.cxx
@@ -23,7 +23,8 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xgoalseek.cxx b/test/source/sheet/xgoalseek.cxx
index 6bdcfbb..745614e 100644
--- a/test/source/sheet/xgoalseek.cxx
+++ b/test/source/sheet/xgoalseek.cxx
@@ -14,7 +14,8 @@
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xnamedrange.cxx b/test/source/sheet/xnamedrange.cxx
index 0f431dd..c0a837f 100644
--- a/test/source/sheet/xnamedrange.cxx
+++ b/test/source/sheet/xnamedrange.cxx
@@ -47,7 +47,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <rtl/ustring.hxx>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xnamedranges.cxx b/test/source/sheet/xnamedranges.cxx
index cf91ef5..015ad5c 100644
--- a/test/source/sheet/xnamedranges.cxx
+++ b/test/source/sheet/xnamedranges.cxx
@@ -49,7 +49,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <iostream>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xprintareas.cxx b/test/source/sheet/xprintareas.cxx
index 6a99309..094e541 100644
--- a/test/source/sheet/xprintareas.cxx
+++ b/test/source/sheet/xprintareas.cxx
@@ -32,7 +32,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <rtl/ustring.hxx>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xsheetannotation.cxx b/test/source/sheet/xsheetannotation.cxx
index 1475798..42f8b53 100644
--- a/test/source/sheet/xsheetannotation.cxx
+++ b/test/source/sheet/xsheetannotation.cxx
@@ -33,7 +33,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <rtl/ustring.hxx>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xsheetannotations.cxx b/test/source/sheet/xsheetannotations.cxx
index 637e888..b41bd06 100644
--- a/test/source/sheet/xsheetannotations.cxx
+++ b/test/source/sheet/xsheetannotations.cxx
@@ -36,7 +36,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <rtl/ustring.hxx>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xsheetoutline.cxx b/test/source/sheet/xsheetoutline.cxx
index c902e65..11d1acc 100644
--- a/test/source/sheet/xsheetoutline.cxx
+++ b/test/source/sheet/xsheetoutline.cxx
@@ -41,7 +41,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <rtl/ustring.hxx>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xspreadsheetdocument.cxx b/test/source/sheet/xspreadsheetdocument.cxx
index f6e0ca6..3147764 100644
--- a/test/source/sheet/xspreadsheetdocument.cxx
+++ b/test/source/sheet/xspreadsheetdocument.cxx
@@ -13,7 +13,8 @@
#include <com/sun/star/container/XIndexAccess.hpp>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx
index b4d7340..13f25bd 100644
--- a/test/source/sheet/xspreadsheets2.cxx
+++ b/test/source/sheet/xspreadsheets2.cxx
@@ -53,7 +53,8 @@
#include <rtl/ustring.hxx>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/text/xtext.cxx b/test/source/text/xtext.cxx
index 4648ecc..1ca6012 100644
--- a/test/source/text/xtext.cxx
+++ b/test/source/text/xtext.cxx
@@ -12,7 +12,8 @@
#include "test/text/xtext.hxx"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/text/xtextcontent.cxx b/test/source/text/xtextcontent.cxx
index 3c8488c..6f6b00f 100644
--- a/test/source/text/xtextcontent.cxx
+++ b/test/source/text/xtextcontent.cxx
@@ -13,7 +13,8 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/text/xtextfield.cxx b/test/source/text/xtextfield.cxx
index c799a62..4261d17 100644
--- a/test/source/text/xtextfield.cxx
+++ b/test/source/text/xtextfield.cxx
@@ -7,12 +7,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-
#include "test/text/xtextfield.hxx"
#include <com/sun/star/text/XTextField.hpp>
#include "cppunit/extensions/HelperMacros.h"
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest
{
diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx
index ac4eab6..caa3552 100644
--- a/test/source/unoapi_test.cxx
+++ b/test/source/unoapi_test.cxx
@@ -13,6 +13,9 @@
#include <com/sun/star/frame/Desktop.hpp>
#include <comphelper/processfactory.hxx>
+using namespace css;
+using namespace css::uno;
+
UnoApiTest::UnoApiTest(const OUString& path)
: m_aBaseString(path)
{
diff --git a/test/source/util/xreplaceable.cxx b/test/source/util/xreplaceable.cxx
index 553d38c..42a3110 100644
--- a/test/source/util/xreplaceable.cxx
+++ b/test/source/util/xreplaceable.cxx
@@ -16,7 +16,8 @@
#include <iostream>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
diff --git a/test/source/util/xsearchable.cxx b/test/source/util/xsearchable.cxx
index 9117e7e..91006e1 100644
--- a/test/source/util/xsearchable.cxx
+++ b/test/source/util/xsearchable.cxx
@@ -14,7 +14,8 @@
#include <test/util/xsearchable.hxx>
-using namespace com::sun::star::uno;
+using namespace css;
+using namespace css::uno;
namespace apitest {
commit f5e003050c65669d53d0d4d2208b2b4d1b699a86
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 26 11:07:08 2013 +0100
convert edit section dialog to .ui
Change-Id: I7467b0d9f32c0a006bedf88f6658ffffcd28db5f
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index aa26a10..2cebd98 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -178,6 +178,10 @@
generic-name="Reference Edit" parent="GtkEntry"
icon-name="widget-gtk-textentry"/>
+ <glade-widget-class title="Condition Edit" name="swuilo-ConditionEdit"
+ generic-name="Condition Edit" parent="GtkEntry"
+ icon-name="widget-gtk-textentry"/>
+
<glade-widget-class title="Cursor Reference Edit" name="sclo-ScCursorRefEdit"
generic-name="Cursor Reference Edit" parent="foruilo-RefEdit"
icon-name="widget-gtk-textentry"/>
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 6af0654..1e58060 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/converttexttable \
sw/uiconfig/swriter/ui/endnotepage \
sw/uiconfig/swriter/ui/editcategories \
+ sw/uiconfig/swriter/ui/editsectiondialog \
sw/uiconfig/swriter/ui/exchangedatabases \
sw/uiconfig/swriter/ui/formattablepage \
sw/uiconfig/swriter/ui/footnotepage \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 01b429b..f12de51 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -78,6 +78,7 @@
#define SW_STR_READONLY (RC_GLOBALS_BEGIN + 46)
#define STR_READONLY_PATH (RC_GLOBALS_BEGIN + 47)
+#define IL_SECTION_BITMAPS (RC_GLOBALS_BEGIN + 48)
// DIALOGS -----------------------------------------------------------
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 85b6d81..a0b69b9 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -298,7 +298,6 @@
#define HID_LINGU_SPELLING_DLG "SW_HID_LINGU_SPELLING_DLG"
#define HID_LINGU_AUTOCORR "SW_HID_LINGU_AUTOCORR"
#define HID_LINGU_REPLACE "SW_HID_LINGU_REPLACE"
-#define HID_REGION_TREE "SW_HID_REGION_TREE"
#define HID_LINGU_WORD_LANGUAGE "SW_HID_LINGU_WORD_LANGUAGE"
#define HID_LINGU_PARA_LANGUAGE "SW_HID_LINGU_PARA_LANGUAGE"
#define HID_MD_GLOS_DEFINE_TEXT "SW_HID_MD_GLOS_DEFINE_TEXT"
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index acc2af9..17ed47c 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -443,8 +443,7 @@ public:
SwWrtShell &rShell,
SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
sal_Bool bGlobal = sal_False) = 0; //add for SwMultiTOXTabDialog
- virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId,
- Window* pParent, SwWrtShell& rWrtSh ) = 0; //add for SwEditRegionDlg
+ virtual AbstractEditRegionDlg* CreateEditRegionDlg(Window* pParent, SwWrtShell& rWrtSh) = 0; //add for SwEditRegionDlg
virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh ) = 0; //add for SwInsertSectionTabDialog
virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg(
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 38727ad..790b5f5 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -223,8 +223,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- AbstractEditRegionDlg* pEditRegionDlg = pFact->CreateEditRegionDlg( MD_EDIT_REGION,
- pParentWin, rWrtShell);
+ AbstractEditRegionDlg* pEditRegionDlg = pFact->CreateEditRegionDlg(pParentWin, rWrtShell);
OSL_ENSURE(pEditRegionDlg, "Dialogdiet fail!");
if(pItem && pItem->ISA(SfxStringItem))
{
diff --git a/sw/source/ui/dialog/regionsw.hrc b/sw/source/ui/dialog/regionsw.hrc
index ed27cca..4f131cb 100644
--- a/sw/source/ui/dialog/regionsw.hrc
+++ b/sw/source/ui/dialog/regionsw.hrc
@@ -80,7 +80,6 @@
#define STR_REG_DUPLICATE (RC_REGIONSW_BEGIN+6)
#define STR_INFO_DUPLICATE (RC_REGIONSW_BEGIN+7)
-#define MD_EDIT_REGION (RC_REGIONSW_BEGIN+9)
#define QB_CONNECT (RC_REGIONSW_BEGIN+10)
#define REG_WRONG_PASSWORD (RC_REGIONSW_BEGIN+11)
#define REG_WRONG_PASSWD_REPEAT (RC_REGIONSW_BEGIN+12)
diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src
index 4ac3eb1..111a3da 100644
--- a/sw/source/ui/dialog/regionsw.src
+++ b/sw/source/ui/dialog/regionsw.src
@@ -72,236 +72,6 @@
#define CB_PASSWD_TEXT\
Text [ en-US ] = "Wit~h password";\
-/*************************************************************************
-
- Dialog "edit region"
-
-*************************************************************************/
-ModalDialog MD_EDIT_REGION
-{
- HelpID = CMD_FN_EDIT_REGION ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 316 , 185 ) ;
- Text [ en-US ] = "Edit Sections" ;
- Moveable = TRUE ;
- FixedLine FL_NAME
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 80 , 8 ) ;
- Text [ en-US ] = "Section" ;
- };
- Edit ED_RANAME
- {
- HelpID = "sw:Edit:MD_EDIT_REGION:ED_RANAME";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 71 , 12 ) ;
- TabStop = TRUE ;
- Disable = TRUE ;
- };
- Control TLB_SECTION
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 29 ) ;
- Size = MAP_APPFONT ( 71 , 150 ) ;
- TabStop = TRUE ;
- };
- FixedLine FL_LINK
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 92 , 3 ) ;
- Size = MAP_APPFONT ( 162 , 8 ) ;
- FL_FILE_TEXT
- };
- TriStateBox CB_FILE
- {
- HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_FILE";
- Pos = MAP_APPFONT ( 98 , 14 ) ;
- Size = MAP_APPFONT ( 59 , 10 ) ;
- TabStop = TRUE ;
- CB_FILE_TEXT
- };
- CheckBox CB_DDE
- {
- HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_DDE";
- Pos = MAP_APPFONT ( 98 , 28 ) ;
- Size = MAP_APPFONT ( 30 , 10 ) ;
- Disable = TRUE ;
- CB_DDE_TEXT
- };
- FixedText FT_DDE
- {
- Pos = MAP_APPFONT ( 104 , 44) ;
- Size = MAP_APPFONT ( 60 , 8 ) ;
- Hide = TRUE ;
- FT_DDE_TEXT
- };
- FixedText FT_FILE
- {
- Pos = MAP_APPFONT ( 104 , 44 ) ;
- Size = MAP_APPFONT ( 60 , 8 ) ;
- Disable = TRUE ;
- FT_FILE_TEXT
- };
- Edit ED_FILE
- {
- HelpID = "sw:Edit:MD_EDIT_REGION:ED_FILE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 165 , 42 ) ;
- Size = MAP_APPFONT ( 68 , 12 ) ;
- Disable = TRUE ;
- TabStop = TRUE ;
- };
- PushButton PB_FILE
- {
- HelpID = "sw:PushButton:MD_EDIT_REGION:PB_FILE";
- Pos = MAP_APPFONT ( 239 , 42 ) ;
- Size = MAP_APPFONT ( 12 , 12 ) ;
- TabStop = TRUE ;
- Disable = TRUE ;
- Text = "...";
- };
- FixedText FT_SUBREG
- {
- Pos = MAP_APPFONT ( 104 , 59 ) ;
- Size = MAP_APPFONT ( 38 , 8 ) ;
- Disable = TRUE ;
- FT_SUBREG_TEXT
- };
- ComboBox LB_SUBREG
- {
- HelpID = "sw:ComboBox:MD_EDIT_REGION:LB_SUBREG";
- Pos = MAP_APPFONT ( 165 , 57 ) ;
- Size = MAP_APPFONT ( 68 , 50 ) ;
- Disable = TRUE ;
- TabStop = TRUE ;
- Sort = TRUE ;
- DropDown = TRUE ;
- };
- FixedLine FL_PROTECT
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 92 , 75 ) ;
- Size = MAP_APPFONT ( 162 , 8 ) ;
- FL_PROTECT_TEXT
- };
- TriStateBox CB_PROTECT
- {
- HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_PROTECT";
- Pos = MAP_APPFONT ( 98 , 86 ) ;
- Size = MAP_APPFONT ( 70 , 10 ) ;
- TabStop = TRUE ;
- Disable = TRUE ;
- TriStateDisable = FALSE ;
- Text [ en-US ] = "~Protected" ;
- };
- CheckBox CB_PASSWD
- {
- HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_PASSWD";
- Pos = MAP_APPFONT ( 107 , 100 ) ;
- Size = MAP_APPFONT ( 100 , 10 ) ;
- TabStop = TRUE ;
- CB_PASSWD_TEXT
- };
- PushButton PB_PASSWD
- {
- HelpID = "sw:PushButton:MD_EDIT_REGION:PB_PASSWD";
- Pos = MAP_APPFONT ( 239 , 98 ) ;
- Size = MAP_APPFONT ( 12 , 12 ) ;
- TabStop = TRUE ;
- Text = "..." ;
- };
- FixedLine FL_HIDE
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 92 , 116 ) ;
- Size = MAP_APPFONT ( 162 , 8 ) ;
- FL_HIDE_TEXT
- };
- TriStateBox CB_HIDE
- {
- HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_HIDE";
- Pos = MAP_APPFONT ( 98 , 127 ) ;
- Size = MAP_APPFONT ( 70 , 10 ) ;
- TabStop = TRUE ;
- TriStateDisable = FALSE ;
- CB_HIDE_TEXT
- };
- FixedText FT_CONDITION
- {
- Pos = MAP_APPFONT ( 104 , 143) ;
- Size = MAP_APPFONT ( 55 , 8 ) ;
- Disable = TRUE ;
- CB_CONDITION_TEXT
- };
- Edit ED_CONDITION
- {
- HelpID = "sw:Edit:MD_EDIT_REGION:ED_CONDITION";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 165 , 141) ;
- Size = MAP_APPFONT ( 86 , 12 ) ;
- TabStop = TRUE ;
- Disable = TRUE ;
- };
-
- FixedLine FL_PROPERTIES
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 92 , 159 ) ;
- Size = MAP_APPFONT ( 162 , 8 ) ;
- FL_PROPERTIES_TEXT
- };
- TriStateBox CB_EDIT_IN_READONLY
- {
- HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_EDIT_IN_READONLY";
- Pos = MAP_APPFONT ( 98 , 170 ) ;
- Size = MAP_APPFONT ( 156 , 10 ) ;
- TabStop = TRUE ;
- TriStateDisable = FALSE ;
- CB_EDIT_IN_READONLY_TEXT
- };
-
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 263 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Disable = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 263 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- PushButton PB_OPTIONS
- {
- HelpID = "sw:PushButton:MD_EDIT_REGION:PB_OPTIONS";
- Pos = MAP_APPFONT ( 263 , 40 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Hide = TRUE ;
- Text [ en-US ] = "~Options...";
- };
- PushButton CB_DISMISS
- {
- HelpID = "sw:PushButton:MD_EDIT_REGION:CB_DISMISS";
- Pos = MAP_APPFONT ( 263 , 57 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Disable = TRUE ;
- TabStop = TRUE ;
- Text [ en-US ] = "Remove" ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 263 , 77 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-
#define DLG_IMAGE_IDLIST \
IdList = \
{ \
@@ -312,13 +82,13 @@ ModalDialog MD_EDIT_REGION
}; \
IdCount = { 4 ; };
- ImageList IL_BITMAPS
- {
- Prefix = "re";
- MaskColor = IMAGE_MASK_COLOR ;
- DLG_IMAGE_IDLIST
- };
+ImageList IL_SECTION_BITMAPS
+{
+ Prefix = "re";
+ MaskColor = IMAGE_MASK_COLOR ;
+ DLG_IMAGE_IDLIST
};
+
String STR_REG_DUPLICATE
{
Text [ en-US ] = "Section name changed:" ;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 851cbb1..3a4e0c8 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1259,21 +1259,10 @@ AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialo
return 0;
}
-AbstractEditRegionDlg * SwAbstractDialogFactory_Impl::CreateEditRegionDlg( int nResId,
- Window* pParent, SwWrtShell& rWrtSh ) //add for SwEditRegionDlg
+AbstractEditRegionDlg * SwAbstractDialogFactory_Impl::CreateEditRegionDlg(Window* pParent, SwWrtShell& rWrtSh) //add for SwEditRegionDlg
{
- SwEditRegionDlg* pDlg=NULL;
- switch ( nResId )
- {
- case MD_EDIT_REGION :
- pDlg = new SwEditRegionDlg( pParent, rWrtSh );
- break;
- default:
- break;
- }
- if ( pDlg )
- return new AbstractEditRegionDlg_Impl( pDlg );
- return 0;
+ SwEditRegionDlg* pDlg = new SwEditRegionDlg( pParent, rWrtSh );
+ return new AbstractEditRegionDlg_Impl( pDlg );
}
AbstractInsertSectionTabDialog * SwAbstractDialogFactory_Impl::CreateInsertSectionTabDialog( int nResId,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 2547151..115e926 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -542,8 +542,7 @@ public:
SwWrtShell &rShell,
SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
sal_Bool bGlobal = sal_False); //add for SwMultiTOXTabDialog
- virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId,
- Window* pParent, SwWrtShell& rWrtSh ); //add for SwEditRegionDlg
+ virtual AbstractEditRegionDlg* CreateEditRegionDlg(Window* pParent, SwWrtShell& rWrtSh); //add for SwEditRegionDlg
virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh); //add for SwInsertSectionTabDialog
virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg(
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index b365921..f04ef1e 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -318,104 +318,88 @@ String SectRepr::GetSubRegion() const
Description: dialog edit regions
----------------------------------------------------------------------------*/
SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
- : SfxModalDialog( pParent, SW_RES(MD_EDIT_REGION) ),
- aNameFL ( this, SW_RES( FL_NAME ) ),
- aCurName ( this, SW_RES( ED_RANAME ) ),
- aTree ( this, SW_RES( TLB_SECTION )),
- aLinkFL ( this, SW_RES( FL_LINK ) ),
- aFileCB ( this, SW_RES( CB_FILE ) ),
- aDDECB ( this, SW_RES( CB_DDE ) ) ,
- aFileNameFT ( this, SW_RES( FT_FILE ) ) ,
- aDDECommandFT ( this, SW_RES( FT_DDE ) ) ,
- aFileNameED ( this, SW_RES( ED_FILE ) ),
- aFilePB ( this, SW_RES( PB_FILE ) ),
- aSubRegionFT ( this, SW_RES( FT_SUBREG ) ) ,
- aSubRegionED ( this, SW_RES( LB_SUBREG ) ) ,
- bSubRegionsFilled( false ),
-
- aProtectFL ( this, SW_RES( FL_PROTECT ) ),
- aProtectCB ( this, SW_RES( CB_PROTECT ) ),
- aPasswdCB ( this, SW_RES( CB_PASSWD ) ),
- aPasswdPB ( this, SW_RES( PB_PASSWD ) ),
-
- aHideFL ( this, SW_RES( FL_HIDE ) ),
- aHideCB ( this, SW_RES( CB_HIDE ) ),
- aConditionFT ( this, SW_RES( FT_CONDITION ) ),
- aConditionED ( this, SW_RES( ED_CONDITION ) ),
-
+ : SfxModalDialog(pParent, "EditSectionDialog",
+ "modules/swriter/ui/editsectiondialog.ui")
+ , m_bSubRegionsFilled(false)
+ , aImageIL(SW_RES(IL_SECTION_BITMAPS))
+ , rSh(rWrtSh)
+ , m_pDocInserter(NULL)
+ , m_pOldDefDlgParent(NULL)
+ , bDontCheckPasswd(true)
+{
+ get(m_pCurName, "curname");
+ get(m_pTree, "tree");
+ m_pTree->set_height_request(m_pTree->GetTextHeight() * 16);
+ get(m_pFileCB, "link");
+ m_pFileCB->SetState(STATE_NOCHECK);
+ get(m_pDDECB, "dde");
+ get(m_pDDEFrame, "ddedepend");
+ get(m_pFileNameFT, "filenameft");
+ get(m_pDDECommandFT, "ddeft");
+ get(m_pFileNameED, "filename");
+ get(m_pFilePB, "file");
+ get(m_pSubRegionFT, "sectionft");
+ get(m_pSubRegionED, "section");
+ m_pSubRegionED->SetStyle(m_pSubRegionED->GetStyle() | WB_SORT);
+ get(m_pProtectCB, "protect");
+ m_pProtectCB->SetState(STATE_NOCHECK);
+ get(m_pPasswdCB, "withpassword");
+ get(m_pPasswdPB, "password");
+ get(m_pHideCB, "hide");
+ m_pHideCB->SetState(STATE_NOCHECK);
+ get(m_pConditionFT, "conditionft");
+ get(m_pConditionED, "condition");
// edit in readonly sections
- aPropertiesFL ( this, SW_RES( FL_PROPERTIES ) ),
- aEditInReadonlyCB ( this, SW_RES( CB_EDIT_IN_READONLY ) ),
-
- aOK ( this, SW_RES( PB_OK ) ),
- aCancel ( this, SW_RES( PB_CANCEL ) ),
- aOptionsPB ( this, SW_RES( PB_OPTIONS ) ),
- aDismiss ( this, SW_RES( CB_DISMISS ) ),
- aHelp ( this, SW_RES( PB_HELP ) ),
-
- aImageIL ( SW_RES(IL_BITMAPS)),
-
- rSh( rWrtSh ),
- m_pDocInserter ( NULL ),
- m_pOldDefDlgParent ( NULL ),
- bDontCheckPasswd ( sal_True)
-{
- FreeResource();
+ get(m_pEditInReadonlyCB, "editinro");
+ m_pEditInReadonlyCB->SetState(STATE_NOCHECK);
+ get(m_pOptionsPB, "options");
+ get(m_pDismiss, "remove");
+ get(m_pOK, "ok");
bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
- aTree.SetSelectHdl ( LINK( this, SwEditRegionDlg, GetFirstEntryHdl));
- aTree.SetDeselectHdl ( LINK( this, SwEditRegionDlg, DeselectHdl));
- aCurName.SetModifyHdl ( LINK( this, SwEditRegionDlg, NameEditHdl));
- aConditionED.SetModifyHdl( LINK( this, SwEditRegionDlg, ConditionEditHdl));
- aOK.SetClickHdl ( LINK( this, SwEditRegionDlg, OkHdl));
- aPasswdCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangePasswdHdl));
- aPasswdPB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangePasswdHdl));
- aHideCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangeHideHdl));
+ m_pTree->SetSelectHdl(LINK(this, SwEditRegionDlg, GetFirstEntryHdl));
+ m_pTree->SetDeselectHdl(LINK(this, SwEditRegionDlg, DeselectHdl));
+ m_pCurName->SetModifyHdl(LINK(this, SwEditRegionDlg, NameEditHdl));
+ m_pConditionED->SetModifyHdl( LINK( this, SwEditRegionDlg, ConditionEditHdl));
+ m_pOK->SetClickHdl ( LINK( this, SwEditRegionDlg, OkHdl));
+ m_pPasswdCB->SetClickHdl(LINK(this, SwEditRegionDlg, ChangePasswdHdl));
+ m_pPasswdPB->SetClickHdl(LINK(this, SwEditRegionDlg, ChangePasswdHdl));
+ m_pHideCB->SetClickHdl(LINK(this, SwEditRegionDlg, ChangeHideHdl));
// edit in readonly sections
- aEditInReadonlyCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangeEditInReadonlyHdl));
-
- aOptionsPB.Show();
- aOptionsPB.SetClickHdl ( LINK( this, SwEditRegionDlg, OptionsHdl));
- aProtectCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangeProtectHdl));
- aDismiss.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangeDismissHdl));
- aFileCB.SetClickHdl ( LINK( this, SwEditRegionDlg, UseFileHdl ));
- aFilePB.SetClickHdl ( LINK( this, SwEditRegionDlg, FileSearchHdl ));
- aFileNameED.SetModifyHdl( LINK( this, SwEditRegionDlg, FileNameHdl ));
- aSubRegionED.SetModifyHdl( LINK( this, SwEditRegionDlg, FileNameHdl ));
- aSubRegionED.AddEventListener( LINK( this, SwEditRegionDlg, SubRegionEventHdl ));
- aSubRegionED.EnableAutocomplete( sal_True, sal_True );
-
- aTree.SetHelpId(HID_REGION_TREE);
- aTree.SetSelectionMode( MULTIPLE_SELECTION );
- aTree.SetStyle(aTree.GetStyle()|WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL);
- aTree.SetSpaceBetweenEntries(0);
+ m_pEditInReadonlyCB->SetClickHdl(LINK(this, SwEditRegionDlg, ChangeEditInReadonlyHdl));
+
+ m_pOptionsPB->SetClickHdl(LINK(this, SwEditRegionDlg, OptionsHdl));
+ m_pProtectCB->SetClickHdl(LINK(this, SwEditRegionDlg, ChangeProtectHdl));
+ m_pDismiss->SetClickHdl ( LINK( this, SwEditRegionDlg, ChangeDismissHdl));
+ m_pFileCB->SetClickHdl(LINK(this, SwEditRegionDlg, UseFileHdl));
+ m_pFilePB->SetClickHdl(LINK(this, SwEditRegionDlg, FileSearchHdl));
+ m_pFileNameED->SetModifyHdl(LINK(this, SwEditRegionDlg, FileNameHdl));
+ m_pSubRegionED->SetModifyHdl(LINK(this, SwEditRegionDlg, FileNameHdl));
+ m_pSubRegionED->AddEventListener(LINK(this, SwEditRegionDlg, SubRegionEventHdl));
+ m_pSubRegionED->EnableAutocomplete(true, true);
+
+ m_pTree->SetSelectionMode( MULTIPLE_SELECTION );
+ m_pTree->SetStyle(m_pTree->GetStyle()|WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL);
+ m_pTree->SetSpaceBetweenEntries(0);
if(bWeb)
{
- aConditionFT .Hide();
- aConditionED .Hide();
- aPasswdCB .Hide();
- aHideCB .Hide();
-
- aDDECB .Hide();
- aDDECommandFT .Hide();
+ m_pDDECB->Hide();
+ get<VclContainer>("hideframe")->Hide();
+ m_pPasswdCB->Hide();
}
- aDDECB.SetClickHdl ( LINK( this, SwEditRegionDlg, DDEHdl ));
+ m_pDDECB->SetClickHdl(LINK(this, SwEditRegionDlg, DDEHdl));
pCurrSect = rSh.GetCurrSection();
RecurseList( 0, 0 );
// if the cursor is not in a region
// the first one will always be selected
- if( !aTree.FirstSelected() && aTree.First() )
- aTree.Select( aTree.First() );
- aTree.Show();
+ if( !m_pTree->FirstSelected() && m_pTree->First() )
+ m_pTree->Select( m_pTree->First() );
+ m_pTree->Show();
bDontCheckPasswd = sal_False;
-
- aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL);
- aPasswdPB.SetAccessibleRelationLabeledBy(&aPasswdCB);
- aSubRegionED.SetAccessibleName(aSubRegionFT.GetText());
}
sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
@@ -423,7 +407,7 @@ sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
if(bDontCheckPasswd)
return sal_True;
sal_Bool bRet = sal_True;
- SvTreeListEntry* pEntry = aTree.FirstSelected();
+ SvTreeListEntry* pEntry = m_pTree->FirstSelected();
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData();
@@ -449,7 +433,7 @@ sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
}
}
}
- pEntry = aTree.NextSelected(pEntry);
+ pEntry = m_pTree->NextSelected(pEntry);
}
if(!bRet && pBox)
{
@@ -485,13 +469,13 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pE
SectRepr* pSectRepr = new SectRepr( n,
*(pSect=pFmt->GetSection()) );
Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden());
- pEntry = aTree.InsertEntry(pSect->GetSectionName(), aImg, aImg);
+ pEntry = m_pTree->InsertEntry(pSect->GetSectionName(), aImg, aImg);
pEntry->SetUserData(pSectRepr);
RecurseList( pFmt, pEntry );
if (pEntry->HasChildren())
- aTree.Expand(pEntry);
+ m_pTree->Expand(pEntry);
if (pCurrSect==pSect)
- aTree.Select(pEntry);
+ m_pTree->Select(pEntry);
}
}
}
@@ -515,12 +499,12 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pE
FindArrPos( pSect->GetFmt() ), *pSect );
Image aImage = BuildBitmap( pSect->IsProtect(),
pSect->IsHidden());
- pNEntry = aTree.InsertEntry(
+ pNEntry = m_pTree->InsertEntry(
pSect->GetSectionName(), aImage, aImage, pEntry);
pNEntry->SetUserData(pSectRepr);
RecurseList( aTmpArr[n]->GetFmt(), pNEntry );
if( pNEntry->HasChildren())
- aTree.Expand(pNEntry);
+ m_pTree->Expand(pNEntry);
if (pCurrSect==pSect)
pSelEntry = pNEntry;
}
@@ -529,8 +513,8 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pE
}
if(0 != pSelEntry)
{
- aTree.MakeVisible(pSelEntry);
- aTree.Select(pSelEntry);
+ m_pTree->MakeVisible(pSelEntry);
+ m_pTree->Select(pSelEntry);
}
}
@@ -547,11 +531,11 @@ sal_uInt16 SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
SwEditRegionDlg::~SwEditRegionDlg( )
{
- SvTreeListEntry* pEntry = aTree.First();
+ SvTreeListEntry* pEntry = m_pTree->First();
while( pEntry )
{
delete (SectRepr*)pEntry->GetUserData();
- pEntry = aTree.Next( pEntry );
+ pEntry = m_pTree->Next( pEntry );
}
delete m_pDocInserter;
@@ -559,19 +543,19 @@ SwEditRegionDlg::~SwEditRegionDlg( )
void SwEditRegionDlg::SelectSection(const String& rSectionName)
{
- SvTreeListEntry* pEntry = aTree.First();
+ SvTreeListEntry* pEntry = m_pTree->First();
while(pEntry)
{
SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData();
if (pRepr->GetSectionData().GetSectionName() == rSectionName)
break;
- pEntry = aTree.Next(pEntry);
+ pEntry = m_pTree->Next(pEntry);
}
if(pEntry)
{
- aTree.SelectAll( sal_False);
- aTree.Select(pEntry);
- aTree.MakeVisible(pEntry);
+ m_pTree->SelectAll(false);
+ m_pTree->Select(pEntry);
+ m_pTree->MakeVisible(pEntry);
}
}
@@ -582,23 +566,23 @@ void SwEditRegionDlg::SelectSection(const String& rSectionName)
---------------------------------------------------------------------*/
IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
- bDontCheckPasswd = sal_True;
+ bDontCheckPasswd = true;
SvTreeListEntry* pEntry=pBox->FirstSelected();
- aHideCB .Enable(sal_True);
+ m_pHideCB->Enable(true);
// edit in readonly sections
- aEditInReadonlyCB.Enable(sal_True);
+ m_pEditInReadonlyCB->Enable(true);
- aProtectCB .Enable(sal_True);
- aFileCB .Enable(sal_True);
+ m_pProtectCB->Enable(true);
+ m_pFileCB->Enable(true);
::com::sun::star::uno::Sequence <sal_Int8> aCurPasswd;
if( 1 < pBox->GetSelectionCount() )
{
- aHideCB.EnableTriState( sal_True );
- aProtectCB.EnableTriState( sal_True );
+ m_pHideCB->EnableTriState(true);
+ m_pProtectCB->EnableTriState(true);
// edit in readonly sections
- aEditInReadonlyCB.EnableTriState ( sal_True );
+ m_pEditInReadonlyCB->EnableTriState(true);
- aFileCB.EnableTriState( sal_True );
+ m_pFileCB->EnableTriState(true);
bool bHiddenValid = true;
bool bProtectValid = true;
@@ -649,37 +633,32 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bFirst = false;
}
- aHideCB.SetState( !bHiddenValid ? STATE_DONTKNOW :
+ m_pHideCB->SetState(!bHiddenValid ? STATE_DONTKNOW :
bHidden ? STATE_CHECK : STATE_NOCHECK);
- aProtectCB.SetState( !bProtectValid ? STATE_DONTKNOW :
+ m_pProtectCB->SetState(!bProtectValid ? STATE_DONTKNOW :
bProtect ? STATE_CHECK : STATE_NOCHECK);
// edit in readonly sections
- aEditInReadonlyCB.SetState( !bEditInReadonlyValid ? STATE_DONTKNOW :
+ m_pEditInReadonlyCB->SetState(!bEditInReadonlyValid ? STATE_DONTKNOW :
bEditInReadonly ? STATE_CHECK : STATE_NOCHECK);
- aFileCB.SetState(!bFileValid ? STATE_DONTKNOW :
+ m_pFileCB->SetState(!bFileValid ? STATE_DONTKNOW :
bFile ? STATE_CHECK : STATE_NOCHECK);
- if(bConditionValid)
- aConditionED.SetText(sCondition);
+ if (bConditionValid)
+ m_pConditionED->SetText(sCondition);
else
{
- aConditionFT.Enable(sal_False);
- aConditionED.Enable(sal_False);
+ m_pConditionFT->Enable(false);
+ m_pConditionED->Enable(false);
}
- aFilePB.Enable(sal_False);
- aFileNameFT .Enable(sal_False);
- aFileNameED .Enable(sal_False);
- aSubRegionFT.Enable(sal_False);
- aSubRegionED.Enable(sal_False);
- aCurName .Enable(sal_False);
- aOptionsPB .Enable(sal_False);
- aDDECB .Enable(sal_False);
- aDDECommandFT .Enable(sal_False);
- sal_Bool bPasswdEnabled = aProtectCB.GetState() == STATE_CHECK;
- aPasswdCB.Enable(bPasswdEnabled);
- aPasswdPB.Enable(bPasswdEnabled);
+ m_pCurName->Enable(false);
+ m_pDDECB->Enable(false);
+ m_pDDEFrame->Enable(false);
+ m_pOptionsPB->Enable(false);
+ bool bPasswdEnabled = m_pProtectCB->GetState() == STATE_CHECK;
+ m_pPasswdCB->Enable(bPasswdEnabled);
+ m_pPasswdPB->Enable(bPasswdEnabled);
if(!bPasswdValid)
{
pEntry = pBox->FirstSelected();
@@ -689,59 +668,59 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
return 0;
}
else
- aPasswdCB.Check(aCurPasswd.getLength() > 0);
+ m_pPasswdCB->Check(aCurPasswd.getLength() > 0);
}
else if (pEntry )
{
- aCurName .Enable(sal_True);
- aOptionsPB .Enable(sal_True);
+ m_pCurName->Enable(sal_True);
+ m_pOptionsPB->Enable(true);
SectRepr* pRepr=(SectRepr*) pEntry->GetUserData();
SwSectionData const& rData( pRepr->GetSectionData() );
- aConditionED.SetText(rData.GetCondition());
- aHideCB.Enable();
- aHideCB.SetState((rData.IsHidden()) ? STATE_CHECK : STATE_NOCHECK);
- sal_Bool bHide = STATE_CHECK == aHideCB.GetState();
- aConditionED.Enable(bHide);
- aConditionFT.Enable(bHide);
- aPasswdCB.Check(rData.GetPassword().getLength() > 0);
-
- aOK.Enable();
- aPasswdCB.Enable();
- aCurName.SetText(pBox->GetEntryText(pEntry));
- aCurName.Enable();
- aDismiss.Enable();
+ m_pConditionED->SetText(rData.GetCondition());
+ m_pHideCB->Enable();
+ m_pHideCB->SetState((rData.IsHidden()) ? STATE_CHECK : STATE_NOCHECK);
+ bool bHide = STATE_CHECK == m_pHideCB->GetState();
+ m_pConditionED->Enable(bHide);
+ m_pConditionFT->Enable(bHide);
+ m_pPasswdCB->Check(rData.GetPassword().getLength() > 0);
+
+ m_pOK->Enable();
+ m_pPasswdCB->Enable();
+ m_pCurName->SetText(pBox->GetEntryText(pEntry));
+ m_pCurName->Enable();
+ m_pDismiss->Enable();
String aFile = pRepr->GetFile();
String sSub = pRepr->GetSubRegion();
- bSubRegionsFilled = false;
- aSubRegionED.Clear();
+ m_bSubRegionsFilled = false;
+ m_pSubRegionED->Clear();
if(aFile.Len()||sSub.Len())
{
- aFileCB.Check(sal_True);
- aFileNameED.SetText(aFile);
- aSubRegionED.SetText(sSub);
- aDDECB.Check(rData.GetType() == DDE_LINK_SECTION);
+ m_pFileCB->Check(true);
+ m_pFileNameED->SetText(aFile);
+ m_pSubRegionED->SetText(sSub);
+ m_pDDECB->Check(rData.GetType() == DDE_LINK_SECTION);
}
else
{
- aFileCB.Check(sal_False);
- aFileNameED.SetText(aFile);
- aDDECB.Enable(sal_False);
- aDDECB.Check(sal_False);
+ m_pFileCB->Check(false);
+ m_pFileNameED->SetText(aFile);
+ m_pDDECB->Enable(false);
+ m_pDDECB->Check(false);
}
- UseFileHdl(&aFileCB);
- DDEHdl( &aDDECB );
- aProtectCB.SetState((rData.IsProtectFlag())
+ UseFileHdl(m_pFileCB);
+ DDEHdl(m_pDDECB);
+ m_pProtectCB->SetState((rData.IsProtectFlag())
? STATE_CHECK : STATE_NOCHECK);
- aProtectCB.Enable();
+ m_pProtectCB->Enable();
// edit in readonly sections
- aEditInReadonlyCB.SetState((rData.IsEditInReadonlyFlag())
+ m_pEditInReadonlyCB->SetState((rData.IsEditInReadonlyFlag())
? STATE_CHECK : STATE_NOCHECK);
- aEditInReadonlyCB.Enable();
+ m_pEditInReadonlyCB->Enable();
- sal_Bool bPasswdEnabled = aProtectCB.IsChecked();
- aPasswdCB.Enable(bPasswdEnabled);
- aPasswdPB.Enable(bPasswdEnabled);
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list