[Libreoffice-commits] core.git: Branch 'private/kohei/calc-data-stream' - 511 commits - android/abs-lib android/experimental android/.gitignore avmedia/source basctl/inc basctl/source basctl/uiconfig basctl/UIConfig_basicide.mk basegfx/source basic/source bean/com bin/README bridges/source chart2/AllLangResTarget_chartcontroller.mk chart2/qa chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk codemaker/source comphelper/source compilerplugins/README configure.ac connectivity/AllLangResTarget_sdbcl.mk connectivity/Library_odbcbase.mk connectivity/Library_odbc.mk connectivity/Module_connectivity.mk connectivity/qa connectivity/source cppcanvas/source cppuhelper/source cppu/source cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk dbaccess/AllLangResTarget_dbu.mk dbaccess/inc dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk dbaccess/util desktop/AllLangResTarget_deploymentgui.mk desktop/source distro-configs/README drawinglayer/source dtrans/test editeng/sourc e embeddedobj/source embeddedobj/test embedserv/source extensions/AllLangResTarget_pcr.mk extensions/AllLangResTarget_updchk.mk extensions/source extensions/test external/libmariadb filter/source forms/qa forms/source formula/source fpicker/source framework/AllLangResTarget_fwe.mk framework/inc framework/qa framework/source framework/util helpcontent2 hwpfilter/source i18nlangtag/source i18nutil/README icon-themes/hicontrast icon-themes/sifr idl/source include/comphelper include/connectivity include/filter include/formula include/framework include/jvmfwk include/oox include/osl include/registry include/rtl include/sal include/sfx2 include/svl include/svtools include/svx include/toolkit include/tools include/ucbhelper include/unotools include/vcl include/xmloff ios/experimental ios/iosremote ios/lo.xcconfig.in ios/MobileLibreOffice ios/qa ios/README ios/shared jurt/com l10ntools/inc l10ntools/source lingucomponent/source lotuswordpro/source mysqlc/source odk/examples offapi/com offap i/README offapi/UnoApi_offapi.mk officecfg/registry oox/README oox/source postprocess/CppunitTest_services.mk postprocess/qa postprocess/Rdb_services.mk qadevOOo/runner qadevOOo/tests reportbuilder/java reportdesign/source Repository.mk rsc/source sal/osl sal/qa sal/textenc sax/qa sax/source scaddins/AllLangResTarget_analysis.mk sc/AllLangResTarget_sc.mk sc/inc sc/Library_sc.mk sc/Library_scopencl.mk sc/qa scripting/java scripting/README scripting/workben sc/source sc/uiconfig sc/UIConfig_scalc.mk sd/AllLangResTarget_sd.mk sdext/source sd/qa sd/source sd/uiconfig setup_native/scripts setup_native/source sfx2/AllLangResTarget_sfx2.mk sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk shell/inc shell/source slideshow/source solenv/bin solenv/doc solenv/gbuild sot/source starmath/source stoc/source stoc/util svgio/source svl/README svl/source svtools/AllLangResTarget_svt.mk svtools/Library_svt.mk svtools/source svtools/util svx/AllLangResTarget_svx.mk svx/inc svx/README svx/source svx/uico nfig svx/UIConfig_svx.mk sw/AllLangResTarget_sw.mk sw/inc sw/qa sw/source sw/uiconfig test/source toolkit/source tubes/source ucbhelper/source ucb/README ucb/source udkapi/com UnoControls/inc UnoControls/source UnoControls/util unoidl/README unotools/source uui/AllLangResTarget_uui.mk uui/source uui/uiconfig uui/UIConfig_uui.mk vbahelper/source vcl/AllLangResTarget_vcl.mk vcl/generic vcl/inc vcl/osx vcl/quartz vcl/README vcl/source vcl/uiconfig vcl/UIConfig_vcl.mk vcl/win winaccessibility/Module_winaccessibility.mk winaccessibility/README wizards/AllLangResTarget_wzi.mk wizards/com writerfilter/source writerperfect/source xmloff/inc xmloff/qa xmloff/source xmlsecurity/source
Kohei Yoshida
kohei.yoshida at collabora.com
Fri Dec 27 20:25:50 PST 2013
Rebased ref, commits from common ancestor:
commit d662c0b298ba28f084c76653cc5c9f31f9f4597a
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Dec 27 23:22:54 2013 -0500
Disallow direct access to member variables.
Change-Id: I82d6c2a2c2844fbb6c2976327b129e42f6b63053
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 661590c..f2f6138 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -92,12 +92,15 @@ class ReaderThread : public salhelper::Thread
SvStream *mpStream;
bool mbTerminate;
osl::Mutex maMtxTerminate;
-public:
- osl::Condition maProduceResume;
- osl::Condition maConsumeResume;
- osl::Mutex maMtxLines;
+
std::queue<LinesList* > maPendingLines;
std::queue<LinesList* > maUsedLines;
+ osl::Mutex maMtxLines;
+
+ osl::Condition maCondReadStream;
+ osl::Condition maCondConsume;
+
+public:
ReaderThread(SvStream *pData):
Thread("ReaderThread"),
@@ -126,7 +129,41 @@ public:
void endThread()
{
requestTerminate();
- maProduceResume.set();
+ maCondReadStream.set();
+ }
+
+ void waitForNewLines()
+ {
+ maCondConsume.wait();
+ maCondConsume.reset();
+ }
+
+ LinesList* popNewLines()
+ {
+ LinesList* pLines = maPendingLines.front();
+ maPendingLines.pop();
+ return pLines;
+ }
+
+ void resumeReadStream()
+ {
+ if (maPendingLines.size() <= 4)
+ maCondReadStream.set(); // start producer again
+ }
+
+ bool hasNewLines()
+ {
+ return !maPendingLines.empty();
+ }
+
+ void pushUsedLines( LinesList* pLines )
+ {
+ maUsedLines.push(pLines);
+ }
+
+ osl::Mutex& getLinesMutex()
+ {
+ return maMtxLines;
}
private:
@@ -139,6 +176,7 @@ private:
if (!maUsedLines.empty())
{
+ // Re-use lines from previous runs.
pLines = maUsedLines.front();
maUsedLines.pop();
aGuard.clear(); // unlock
@@ -149,6 +187,7 @@ private:
pLines = new LinesList(10);
}
+ // Read & store new lines from stream.
for (size_t i = 0; i < pLines->size(); ++i)
mpStream->ReadLine( pLines->at(i) );
@@ -157,12 +196,12 @@ private:
{
// pause reading for a bit
aGuard.clear(); // unlock
- maProduceResume.wait();
- maProduceResume.reset();
+ maCondReadStream.wait();
+ maCondReadStream.reset();
aGuard.reset(); // lock
}
maPendingLines.push(pLines);
- maConsumeResume.set();
+ maCondConsume.set();
if (!mpStream->good())
requestTerminate();
}
@@ -263,22 +302,19 @@ OString DataStream::ConsumeLine()
if (mxReaderThread->isTerminateRequested())
return OString();
- osl::ResettableMutexGuard aGuard(mxReaderThread->maMtxLines);
+ osl::ResettableMutexGuard aGuard(mxReaderThread->getLinesMutex());
if (mpLines)
- mxReaderThread->maUsedLines.push(mpLines);
+ mxReaderThread->pushUsedLines(mpLines);
- while (mxReaderThread->maPendingLines.empty())
+ while (!mxReaderThread->hasNewLines())
{
aGuard.clear(); // unlock
- mxReaderThread->maConsumeResume.wait();
- mxReaderThread->maConsumeResume.reset();
+ mxReaderThread->waitForNewLines();
aGuard.reset(); // lock
}
- mpLines = mxReaderThread->maPendingLines.front();
- mxReaderThread->maPendingLines.pop();
- if (mxReaderThread->maPendingLines.size() <= 4)
- mxReaderThread->maProduceResume.set(); // start producer again
+ mpLines = mxReaderThread->popNewLines();
+ mxReaderThread->resumeReadStream();
}
return mpLines->at(mnLinesCount++);
}
commit 056b80c8375c73f9c096de684a373e28153743d3
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Dec 27 22:40:14 2013 -0500
Protect access to the terminate flag.
Change-Id: I9c47e8f114f3d4dcdd5e62b1fffd2b65e7bfb00e
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 4631445..661590c 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -90,20 +90,19 @@ void emptyLineQueue( std::queue<LinesList*>& rQueue )
class ReaderThread : public salhelper::Thread
{
SvStream *mpStream;
+ bool mbTerminate;
+ osl::Mutex maMtxTerminate;
public:
- bool mbTerminateReading;
osl::Condition maProduceResume;
osl::Condition maConsumeResume;
- osl::Mutex maLinesProtector;
+ osl::Mutex maMtxLines;
std::queue<LinesList* > maPendingLines;
std::queue<LinesList* > maUsedLines;
ReaderThread(SvStream *pData):
- Thread("ReaderThread")
- ,mpStream(pData)
- ,mbTerminateReading(false)
- {
- }
+ Thread("ReaderThread"),
+ mpStream(pData),
+ mbTerminate(false) {}
virtual ~ReaderThread()
{
@@ -112,19 +111,31 @@ public:
emptyLineQueue(maUsedLines);
}
+ bool isTerminateRequested()
+ {
+ osl::MutexGuard aGuard(maMtxTerminate);
+ return mbTerminate;
+ }
+
+ void requestTerminate()
+ {
+ osl::MutexGuard aGuard(maMtxTerminate);
+ mbTerminate = true;
+ }
+
void endThread()
{
- mbTerminateReading = true;
+ requestTerminate();
maProduceResume.set();
}
private:
virtual void execute() SAL_OVERRIDE
{
- while (!mbTerminateReading)
+ while (!isTerminateRequested())
{
LinesList* pLines = NULL;
- osl::ResettableMutexGuard aGuard(maLinesProtector);
+ osl::ResettableMutexGuard aGuard(maMtxLines);
if (!maUsedLines.empty())
{
@@ -142,7 +153,7 @@ private:
mpStream->ReadLine( pLines->at(i) );
aGuard.reset(); // lock
- while (!mbTerminateReading && maPendingLines.size() >= 8)
+ while (!isTerminateRequested() && maPendingLines.size() >= 8)
{
// pause reading for a bit
aGuard.clear(); // unlock
@@ -153,7 +164,7 @@ private:
maPendingLines.push(pLines);
maConsumeResume.set();
if (!mpStream->good())
- mbTerminateReading = true;
+ requestTerminate();
}
}
};
@@ -249,11 +260,13 @@ OString DataStream::ConsumeLine()
if (!mpLines || mnLinesCount >= mpLines->size())
{
mnLinesCount = 0;
- if (mxReaderThread->mbTerminateReading)
+ if (mxReaderThread->isTerminateRequested())
return OString();
- osl::ResettableMutexGuard aGuard(mxReaderThread->maLinesProtector);
+
+ osl::ResettableMutexGuard aGuard(mxReaderThread->maMtxLines);
if (mpLines)
mxReaderThread->maUsedLines.push(mpLines);
+
while (mxReaderThread->maPendingLines.empty())
{
aGuard.clear(); // unlock
@@ -261,6 +274,7 @@ OString DataStream::ConsumeLine()
mxReaderThread->maConsumeResume.reset();
aGuard.reset(); // lock
}
+
mpLines = mxReaderThread->maPendingLines.front();
mxReaderThread->maPendingLines.pop();
if (mxReaderThread->maPendingLines.size() <= 4)
commit 69a6af047ab959843546bdaed9a9c9156852c17a
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Dec 27 21:57:25 2013 -0500
Misc cleanup.
Change-Id: Ia3d0f2e098804dabdbdd324562097b9f69528d35
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index d43fdeb..4631445 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -78,6 +78,15 @@ private:
}
};
+void emptyLineQueue( std::queue<LinesList*>& rQueue )
+{
+ while (!rQueue.empty())
+ {
+ delete rQueue.front();
+ rQueue.pop();
+ }
+}
+
class ReaderThread : public salhelper::Thread
{
SvStream *mpStream;
@@ -99,23 +108,14 @@ public:
virtual ~ReaderThread()
{
delete mpStream;
- while (!maPendingLines.empty())
- {
- delete maPendingLines.front();
- maPendingLines.pop();
- }
- while (!maUsedLines.empty())
- {
- delete maUsedLines.front();
- maUsedLines.pop();
- }
+ emptyLineQueue(maPendingLines);
+ emptyLineQueue(maUsedLines);
}
void endThread()
{
mbTerminateReading = true;
maProduceResume.set();
- join();
}
private:
@@ -123,8 +123,9 @@ private:
{
while (!mbTerminateReading)
{
- LinesList *pLines = 0;
+ LinesList* pLines = NULL;
osl::ResettableMutexGuard aGuard(maLinesProtector);
+
if (!maUsedLines.empty())
{
pLines = maUsedLines.front();
@@ -136,11 +137,14 @@ private:
aGuard.clear(); // unlock
pLines = new LinesList(10);
}
+
for (size_t i = 0; i < pLines->size(); ++i)
mpStream->ReadLine( pLines->at(i) );
+
aGuard.reset(); // lock
while (!mbTerminateReading && maPendingLines.size() >= 8)
- { // pause reading for a bit
+ {
+ // pause reading for a bit
aGuard.clear(); // unlock
maProduceResume.wait();
maProduceResume.reset();
@@ -233,7 +237,10 @@ DataStream::~DataStream()
mxThread->maStart.set();
mxThread->join();
if (mxReaderThread.is())
+ {
mxReaderThread->endThread();
+ mxReaderThread->join();
+ }
delete mpLines;
}
commit 80c1164beebed6578ab203df4b3c48159fe7916b
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Dec 27 17:33:52 2013 -0500
fdo#72874: Strip const-ness from pointer value when setting it to storage.
Else the pointer type would get demoted to a boolean type which would cause
the boolean version of overloaded function to get picked.
Change-Id: Ided7e8c67ef84b4323c8ad1123e0a2c30ce37e01
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 2f7e52c..17c4123 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4106,6 +4106,47 @@ void Test::testSortWithFormulaRefs()
pDoc->DeleteTab(1);
}
+void Test::testSortWithStrings()
+{
+ m_pDoc->InsertTab(0, "Test");
+
+ ScFieldEditEngine& rEE = m_pDoc->GetEditEngine();
+ rEE.SetText("Val1");
+ m_pDoc->SetString(ScAddress(1,1,0), "Header");
+ m_pDoc->SetString(ScAddress(1,2,0), "Val2");
+ m_pDoc->SetEditText(ScAddress(1,3,0), rEE.CreateTextObject());
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(1,1,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("Val2"), m_pDoc->GetString(ScAddress(1,2,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("Val1"), m_pDoc->GetString(ScAddress(1,3,0)));
+
+ ScSortParam aParam;
+ aParam.nCol1 = 1;
+ aParam.nCol2 = 1;
+ aParam.nRow1 = 1;
+ aParam.nRow2 = 3;
+ aParam.bHasHeader = true;
+ aParam.maKeyState[0].bDoSort = true;
+ aParam.maKeyState[0].bAscending = true;
+ aParam.maKeyState[0].nField = 1;
+
+ m_pDoc->Sort(0, aParam, false, NULL);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(1,1,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("Val1"), m_pDoc->GetString(ScAddress(1,2,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("Val2"), m_pDoc->GetString(ScAddress(1,3,0)));
+
+ aParam.maKeyState[0].bAscending = false;
+
+ m_pDoc->Sort(0, aParam, false, NULL);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(1,1,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("Val2"), m_pDoc->GetString(ScAddress(1,2,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("Val1"), m_pDoc->GetString(ScAddress(1,3,0)));
+
+ m_pDoc->DeleteTab(0);
+}
+
void Test::testSort()
{
OUString aTabName1("test1");
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 2af0e65..771a044 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -275,6 +275,7 @@ public:
void testFindAreaPosColRight();
void testSort();
void testSortWithFormulaRefs();
+ void testSortWithStrings();
void testShiftCells();
void testNoteDeleteRow();
void testNoteDeleteCol();
@@ -385,6 +386,7 @@ public:
CPPUNIT_TEST(testFindAreaPosColRight);
CPPUNIT_TEST(testSort);
CPPUNIT_TEST(testSortWithFormulaRefs);
+ CPPUNIT_TEST(testSortWithStrings);
CPPUNIT_TEST(testShiftCells);
CPPUNIT_TEST(testNoteDeleteRow);
CPPUNIT_TEST(testNoteDeleteCol);
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index a8f4d91..921ff25 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -916,7 +916,8 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
break;
case CELLTYPE_EDIT:
{
- it1 = maCells.set(it1, nRow1, aCell2.mpEditText);
+ it1 = maCells.set(
+ it1, nRow1, const_cast<EditTextObject*>(aCell2.mpEditText));
EditTextObject* p;
maCells.release(it1, nRow2, p);
}
@@ -999,7 +1000,8 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
break;
case CELLTYPE_EDIT:
{
- it1 = maCells.set(it1, nRow1, aCell2.mpEditText);
+ it1 = maCells.set(
+ it1, nRow1, const_cast<EditTextObject*>(aCell2.mpEditText));
EditTextObject* p;
it1 = maCells.release(it1, nRow2, p);
}
@@ -1031,7 +1033,8 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
break;
case CELLTYPE_EDIT:
{
- it1 = maCells.set(it1, nRow1, aCell2.mpEditText);
+ it1 = maCells.set(
+ it1, nRow1, const_cast<EditTextObject*>(aCell2.mpEditText));
EditTextObject* p;
it1 = maCells.release(it1, nRow2, p); // prevent it being overwritten.
}
@@ -1079,7 +1082,7 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
;
}
- maCells.set(it1, nRow2, aCell1.mpEditText);
+ maCells.set(it1, nRow2, const_cast<EditTextObject*>(aCell1.mpEditText));
}
break;
case CELLTYPE_FORMULA:
commit accbda12df38ecd4cf120bf30b38c81db64a2118
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 27 14:19:42 2013 +0000
convert add submission dialog to .ui
and drop the rather lunatic over engineering hackery to make 6 local strings
non local
Change-Id: I619e3d6b5a2205a10407eed98eb3ca83945267e3
diff --git a/include/svx/fmresids.hrc b/include/svx/fmresids.hrc
index c44ae4b..3991dd3 100644
--- a/include/svx/fmresids.hrc
+++ b/include/svx/fmresids.hrc
@@ -180,6 +180,12 @@
#define RID_STR_PROPTITLE_SPINBUTTON (RID_FORMS_START + 100)
#define RID_STR_PROPTITLE_HIDDEN (RID_FORMS_START + 101)
// FREE
+#define RID_STR_METHOD_POST (RID_FORMS_START + 118)
+#define RID_STR_METHOD_PUT (RID_FORMS_START + 119)
+#define RID_STR_METHOD_GET (RID_FORMS_START + 120)
+#define RID_STR_REPLACE_NONE (RID_FORMS_START + 121)
+#define RID_STR_REPLACE_INST (RID_FORMS_START + 122)
+#define RID_STR_REPLACE_DOC (RID_FORMS_START + 123)
#define RID_STR_DATANAVIGATOR (RID_FORMS_START + 124)
#define RID_STR_DATANAV_SUBM_PARENT (RID_FORMS_START + 125)
#define RID_STR_DATANAV_SUBM_ID (RID_FORMS_START + 126)
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 41fb585..f2a8087 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/addinstancedialog \
svx/uiconfig/ui/addmodeldialog \
svx/uiconfig/ui/addnamespacedialog \
+ svx/uiconfig/ui/addsubmissiondialog \
svx/uiconfig/ui/asianphoneticguidedialog \
svx/uiconfig/ui/chineseconversiondialog \
svx/uiconfig/ui/compressgraphicdialog \
diff --git a/svx/inc/fmhelp.hrc b/svx/inc/fmhelp.hrc
index fbe9c7c..953ea76 100644
--- a/svx/inc/fmhelp.hrc
+++ b/svx/inc/fmhelp.hrc
@@ -74,7 +74,6 @@
#define HID_XFORMS_MODELS_LIST "SVX_HID_XFORMS_MODELS_LIST"
#define HID_XFORMS_MODELS_MENUBTN "SVX_HID_XFORMS_MODELS_MENUBTN"
#define HID_XFORMS_INSTANCES_MENUBTN "SVX_HID_XFORMS_INSTANCES_MENUBTN"
-#define HID_XFORMS_ADDSUBMISSION_DLG "SVX_HID_XFORMS_ADDSUBMISSION_DLG"
#define HID_XFORMS_MID_INSERT_CONTROL "SVX_HID_XFORMS_MID_INSERT_CONTROL"
#define HID_XFORMS_TAB_CONTROL "SVX_HID_XFORMS_TAB_CONTROL"
#define HID_FM_DELETEROWS "SVX_HID_FM_DELETEROWS"
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 656f854..e16abb2 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -23,13 +23,11 @@
#include "fmservs.hxx"
#include "datanavi.hrc"
-#include "svx/fmresids.hrc"
#include "fmhelp.hrc"
#include <svx/svxids.hrc>
#include <tools/rcid.h>
#include <tools/diagnose_ex.h>
-#include "svx/xmlexchg.hxx"
-#include <svx/dialmgr.hxx>
+#include <svx/xmlexchg.hxx>
#include <svx/fmshell.hxx>
#include <svtools/miscopt.hxx>
#include <unotools/pathoptions.hxx>
@@ -767,191 +765,6 @@ namespace svxform
return m_aItemList.InsertEntry(
sName, aImage, aImage, pParent, sal_False, LIST_APPEND, _pNewNode );
}
- //------------------------------------------------------------------------
- class lcl_ResourceString
- {
- protected:
- lcl_ResourceString()
- {
- }
-
- lcl_ResourceString( const lcl_ResourceString& );
-
- virtual ~lcl_ResourceString()
- {
- }
-
- // load UI resources from resource file
- void init()
- {
- // create a resource manager, for the svx resource file
- // and the UI locale
- ResMgr* pResMgr = ResMgr::CreateResMgr(
- "svx", Application::GetSettings().GetUILanguageTag() );
-
- // load the resources for the AddSubmission modal dialog.
- // This will create our own resource context.
- ResId aRes( RID_SVXDLG_ADD_SUBMISSION, *pResMgr );
- aRes.SetRT( RSC_MODALDIALOG );
- pResMgr->GetResource( aRes );
-
- // now, we can access the local resources from the dialog's
- // resource context
- _initResources(pResMgr);
-
- // clean up: remove context, and delete the resource manager
- // ( Increment(..) is needed since PopContext() requires that
- // the file pointer is at the end. )
- pResMgr->Increment( pResMgr->GetRemainSize() );
- pResMgr->PopContext();
- delete pResMgr;
- }
-
- // load resources... to be overloaded in sub-classes
- virtual void _initResources( ResMgr* pMgr ) = 0;
- };
-
- class lcl_ReplaceString : public lcl_ResourceString
- {
- OUString m_sDoc_UI;
- OUString m_sInstance_UI;
- OUString m_sNone_UI;
-
- OUString m_sDoc_API;
- OUString m_sInstance_API;
- OUString m_sNone_API;
-
- lcl_ReplaceString() :
- lcl_ResourceString(),
- m_sDoc_API( "all" ),
- m_sInstance_API( "instance" ),
- m_sNone_API( "none" )
- {
- init();
- }
-
- lcl_ReplaceString( const lcl_ReplaceString& );
-
- virtual ~lcl_ReplaceString()
- {
- }
-
- // load UI resources from resource file
- virtual void _initResources( ResMgr * pMgr )
- {
- // now, we can access the local resources from the dialog's
- // resource context
- m_sDoc_UI = ResId( STR_REPLACE_DOC, *pMgr ).toString();
- m_sInstance_UI = ResId( STR_REPLACE_INST, *pMgr ).toString();
- m_sNone_UI = ResId( STR_REPLACE_NONE, *pMgr ).toString();
- }
-
- public:
-
- /** create and obtain the singleton instance */
- static const lcl_ReplaceString& get()
- {
- // keep the singleton instance here
- static lcl_ReplaceString* m_pInstance = NULL;
-
- if( m_pInstance == NULL )
- m_pInstance = new lcl_ReplaceString();
- return *m_pInstance;
- }
-
- /** convert submission replace string from API value to UI value.
- Use 'none' as default. */
- OUString toUI( const OUString& rStr ) const
- {
- if( rStr == m_sDoc_API )
- return m_sDoc_UI;
- else if( rStr == m_sInstance_API )
- return m_sInstance_UI;
- else
- return m_sNone_UI;
- }
-
- /** convert submission replace string from UI to API.
- Use 'none' as default. */
- OUString toAPI( const OUString& rStr ) const
- {
- if( rStr == m_sDoc_UI )
- return m_sDoc_API;
- else if( rStr == m_sInstance_UI )
- return m_sInstance_API;
- else
- return m_sNone_API;
- }
- };
-
- class lcl_MethodString : public lcl_ResourceString
- {
- OUString m_sPost_UI;
- OUString m_sPut_UI;
- OUString m_sGet_UI;
-
- OUString m_sPost_API;
- OUString m_sPut_API;
- OUString m_sGet_API;
-
- lcl_MethodString() :
- lcl_ResourceString(),
- m_sPost_API( "post" ),
- m_sPut_API( "put" ),
- m_sGet_API( "get" )
- {
- init();
- }
-
- lcl_MethodString( const lcl_MethodString& );
-
- virtual ~lcl_MethodString()
- {
- }
-
- // load UI resources from resource file
- virtual void _initResources(ResMgr* pMgr)
- {
- m_sPost_UI = ResId( STR_METHOD_POST, *pMgr ).toString();
- m_sPut_UI = ResId( STR_METHOD_PUT, *pMgr ).toString();
- m_sGet_UI = ResId( STR_METHOD_GET, *pMgr ).toString();
- }
-
- public:
-
- /** create and obtain the singleton instance */
- static const lcl_MethodString& get()
- {
- // keep the singleton instance here
- static lcl_MethodString* m_pInstance = NULL;
-
- if( m_pInstance == NULL )
- m_pInstance = new lcl_MethodString();
- return *m_pInstance;
- }
-
- /** convert from API to UI; put is default. */
- OUString toUI( const OUString& rStr ) const
- {
- if( rStr == m_sGet_API )
- return m_sGet_UI;
- else if( rStr == m_sPost_API )
- return m_sPost_UI;
- else
- return m_sPut_UI;
- }
-
- /** convert from UI to API; put is default */
- OUString toAPI( const OUString& rStr ) const
- {
- if( rStr == m_sGet_UI )
- return m_sGet_API;
- else if( rStr == m_sPost_UI )
- return m_sPost_API;
- else
- return m_sPut_API;
- }
- };
//------------------------------------------------------------------------
SvTreeListEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry )
@@ -978,7 +791,7 @@ namespace svxform
// Method
_rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_METHOD );
- sEntry += lcl_MethodString::get().toUI( sTemp );
+ sEntry += m_aMethodString.toUI( sTemp );
m_aItemList.InsertEntry( sEntry, aImage, aImage, pEntry );
// Ref
_rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
@@ -993,7 +806,7 @@ namespace svxform
// Replace
_rEntry->getPropertyValue( PN_SUBMISSION_REPLACE ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REPLACE );
- sEntry += lcl_ReplaceString::get().toUI( sTemp );
+ sEntry += m_aReplaceString.toUI( sTemp );
m_aItemList.InsertEntry( sEntry, aImage, aImage, pEntry );
}
catch ( Exception& )
@@ -1065,12 +878,12 @@ namespace svxform
m_aItemList.SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_METHOD );
- sEntry += lcl_MethodString::get().toUI( sTemp );
+ sEntry += m_aMethodString.toUI( sTemp );
pChild = m_aItemList.GetEntry( pEntry, nPos++ );
m_aItemList.SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_REPLACE ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REPLACE );
- sEntry += lcl_ReplaceString::get().toUI( sTemp );
+ sEntry += m_aReplaceString.toUI( sTemp );
pChild = m_aItemList.GetEntry( pEntry, nPos++ );
m_aItemList.SetEntryText( pChild, sEntry );
}
@@ -3347,40 +3160,24 @@ namespace svxform
AddSubmissionDialog::AddSubmissionDialog(
Window* pParent, ItemNode* _pNode,
- const Reference< css::xforms::XFormsUIHelper1 >& _rUIHelper ) :
-
- ModalDialog( pParent, SVX_RES( RID_SVXDLG_ADD_SUBMISSION ) ),
-
- m_aSubmissionFL ( this, SVX_RES( FL_SUBMISSION ) ),
- m_aNameFT ( this, SVX_RES( FT_SUBMIT_NAME ) ),
- m_aNameED ( this, SVX_RES( ED_SUBMIT_NAME ) ),
- m_aActionFT ( this, SVX_RES( FT_SUBMIT_ACTION ) ),
- m_aActionED ( this, SVX_RES( ED_SUBMIT_ACTION ) ),
- m_aMethodFT ( this, SVX_RES( FT_SUBMIT_METHOD ) ),
- m_aMethodLB ( this, SVX_RES( LB_SUBMIT_METHOD ) ),
- m_aRefFT ( this, SVX_RES( FT_SUBMIT_REF ) ),
- m_aRefED ( this, SVX_RES( ED_SUBMIT_REF ) ),
- m_aRefBtn ( this, SVX_RES( PB_SUBMIT_REF ) ),
- m_aBindFT ( this, SVX_RES( FT_SUBMIT_BIND ) ),
- m_aBindLB ( this, SVX_RES( LB_SUBMIT_BIND ) ),
- m_aReplaceFT ( this, SVX_RES( FT_SUBMIT_REPLACE ) ),
- m_aReplaceLB ( this, SVX_RES( LB_SUBMIT_REPLACE ) ),
-
- m_aButtonsFL ( this, SVX_RES( FL_DATANAV_BTN ) ),
- m_aOKBtn ( this, SVX_RES( BTN_DATANAV_OK ) ),
- m_aEscBtn ( this, SVX_RES( BTN_DATANAV_ESC ) ),
- m_aHelpBtn ( this, SVX_RES( BTN_DATANAV_HELP ) ),
-
- m_pItemNode ( _pNode ),
- m_xUIHelper ( _rUIHelper )
-
+ const Reference< css::xforms::XFormsUIHelper1 >& _rUIHelper)
+ : ModalDialog(pParent, "AddSubmissionDialog",
+ "svx/ui/addsubmissiondialog.ui")
+ , m_pItemNode(_pNode)
+ , m_xUIHelper(_rUIHelper)
{
- FillAllBoxes(); // we need local resources here, so call before FreeResource!!!
-
- FreeResource();
+ get(m_pNameED, "name");
+ get(m_pActionED, "action");
+ get(m_pMethodLB, "method");
+ get(m_pRefED, "expression");
+ get(m_pRefBtn, "browse");
+ get(m_pBindLB, "binding");
+ get(m_pReplaceLB, "replace");
+ get(m_pOKBtn, "ok");
+ FillAllBoxes();
- m_aRefBtn.SetClickHdl( LINK( this, AddSubmissionDialog, RefHdl ) );
- m_aOKBtn.SetClickHdl( LINK( this, AddSubmissionDialog, OKHdl ) );
+ m_pRefBtn->SetClickHdl( LINK( this, AddSubmissionDialog, RefHdl ) );
+ m_pOKBtn->SetClickHdl( LINK( this, AddSubmissionDialog, OKHdl ) );
}
//------------------------------------------------------------------------
@@ -3395,9 +3192,9 @@ namespace svxform
IMPL_LINK_NOARG(AddSubmissionDialog, RefHdl)
{
AddConditionDialog aDlg( this, PN_BINDING_EXPR, m_xTempBinding );
- aDlg.SetCondition( m_aRefED.GetText() );
+ aDlg.SetCondition( m_pRefED->GetText() );
if ( aDlg.Execute() == RET_OK )
- m_aRefED.SetText( aDlg.GetCondition() );
+ m_pRefED->SetText( aDlg.GetCondition() );
return 0;
}
@@ -3405,7 +3202,7 @@ namespace svxform
//------------------------------------------------------------------------
IMPL_LINK_NOARG(AddSubmissionDialog, OKHdl)
{
- OUString sName(m_aNameED.GetText());
+ OUString sName(m_pNameED->GetText());
if(sName.isEmpty()) {
ErrorBox aErrorBox(this,SVX_RES(RID_ERR_EMPTY_SUBMISSIONNAME));
@@ -3437,23 +3234,23 @@ namespace svxform
if ( m_xSubmission.is() )
{
- OUString sTemp = m_aNameED.GetText();
+ OUString sTemp = m_pNameED->GetText();
try
{
m_xSubmission->setPropertyValue( PN_SUBMISSION_ID, makeAny( sTemp ) );
- sTemp = m_aActionED.GetText();
+ sTemp = m_pActionED->GetText();
m_xSubmission->setPropertyValue( PN_SUBMISSION_ACTION, makeAny( sTemp ) );
- sTemp = lcl_MethodString::get().toAPI( m_aMethodLB.GetSelectEntry() );
+ sTemp = m_aMethodString.toAPI( m_pMethodLB->GetSelectEntry() );
m_xSubmission->setPropertyValue( PN_SUBMISSION_METHOD, makeAny( sTemp ) );
- sTemp = m_aRefED.GetText();
+ sTemp = m_pRefED->GetText();
m_xSubmission->setPropertyValue( PN_SUBMISSION_REF, makeAny( sTemp ) );
- OUString sEntry = m_aBindLB.GetSelectEntry();
+ OUString sEntry = m_pBindLB->GetSelectEntry();
sal_Int32 nColonIdx = sEntry.indexOf(':');
if (nColonIdx != -1)
sEntry = sEntry.copy(0, nColonIdx);
sTemp = sEntry;
m_xSubmission->setPropertyValue( PN_SUBMISSION_BIND, makeAny( sTemp ) );
- sTemp = lcl_ReplaceString::get().toAPI( m_aReplaceLB.GetSelectEntry() );
+ sTemp = m_aReplaceString.toAPI( m_pReplaceLB->GetSelectEntry() );
m_xSubmission->setPropertyValue( PN_SUBMISSION_REPLACE, makeAny( sTemp ) );
}
catch ( Exception& )
@@ -3470,10 +3267,10 @@ namespace svxform
void AddSubmissionDialog::FillAllBoxes()
{
// method box
- m_aMethodLB.InsertEntry( SVX_RESSTR( STR_METHOD_POST ) );
- m_aMethodLB.InsertEntry( SVX_RESSTR( STR_METHOD_PUT ) );
- m_aMethodLB.InsertEntry( SVX_RESSTR( STR_METHOD_GET ) );
- m_aMethodLB.SelectEntryPos(0);
+ m_pMethodLB->InsertEntry( SVX_RESSTR( RID_STR_METHOD_POST ) );
+ m_pMethodLB->InsertEntry( SVX_RESSTR( RID_STR_METHOD_PUT ) );
+ m_pMethodLB->InsertEntry( SVX_RESSTR( RID_STR_METHOD_GET ) );
+ m_pMethodLB->SelectEntryPos(0);
// binding box
Reference< css::xforms::XModel > xModel( m_xUIHelper, UNO_QUERY );
@@ -3501,7 +3298,7 @@ namespace svxform
sEntry += sDelim;
xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sEntry += sTemp;
- m_aBindLB.InsertEntry( sEntry );
+ m_pBindLB->InsertEntry( sEntry );
if ( !m_xTempBinding.is() )
m_xTempBinding = xPropSet;
@@ -3529,9 +3326,9 @@ namespace svxform
}
// replace box
- m_aReplaceLB.InsertEntry( SVX_RESSTR( STR_REPLACE_NONE ) );
- m_aReplaceLB.InsertEntry( SVX_RESSTR( STR_REPLACE_INST ) );
- m_aReplaceLB.InsertEntry( SVX_RESSTR( STR_REPLACE_DOC ) );
+ m_pReplaceLB->InsertEntry( SVX_RESSTR( RID_STR_REPLACE_NONE ) );
+ m_pReplaceLB->InsertEntry( SVX_RESSTR( RID_STR_REPLACE_INST ) );
+ m_pReplaceLB->InsertEntry( SVX_RESSTR( RID_STR_REPLACE_DOC ) );
// init the controls with the values of the submission
@@ -3542,33 +3339,33 @@ namespace svxform
try
{
m_xSubmission->getPropertyValue( PN_SUBMISSION_ID ) >>= sTemp;
- m_aNameED.SetText( sTemp );
+ m_pNameED->SetText( sTemp );
m_xSubmission->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp;
- m_aActionED.SetText( sTemp );
+ m_pActionED->SetText( sTemp );
m_xSubmission->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
- m_aRefED.SetText( sTemp );
+ m_pRefED->SetText( sTemp );
m_xSubmission->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
- sTemp = lcl_MethodString::get().toUI( sTemp );
- sal_uInt16 nPos = m_aMethodLB.GetEntryPos( sTemp );
+ sTemp = m_aMethodString.toUI( sTemp );
+ sal_uInt16 nPos = m_pMethodLB->GetEntryPos( sTemp );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
- nPos = m_aMethodLB.InsertEntry( sTemp );
- m_aMethodLB.SelectEntryPos( nPos );
+ nPos = m_pMethodLB->InsertEntry( sTemp );
+ m_pMethodLB->SelectEntryPos( nPos );
m_xSubmission->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp;
- nPos = m_aBindLB.GetEntryPos( sTemp );
+ nPos = m_pBindLB->GetEntryPos( sTemp );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
- nPos = m_aBindLB.InsertEntry( sTemp );
- m_aBindLB.SelectEntryPos( nPos );
+ nPos = m_pBindLB->InsertEntry( sTemp );
+ m_pBindLB->SelectEntryPos( nPos );
m_xSubmission->getPropertyValue( PN_SUBMISSION_REPLACE ) >>= sTemp;
- sTemp = lcl_ReplaceString::get().toUI( sTemp );
+ sTemp = m_aReplaceString.toUI( sTemp );
if ( sTemp.isEmpty() )
- sTemp = m_aReplaceLB.GetEntry(0); // first entry == "none"
- nPos = m_aReplaceLB.GetEntryPos( sTemp );
+ sTemp = m_pReplaceLB->GetEntry(0); // first entry == "none"
+ nPos = m_pReplaceLB->GetEntryPos( sTemp );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
- nPos = m_aReplaceLB.InsertEntry( sTemp );
- m_aReplaceLB.SelectEntryPos( nPos );
+ nPos = m_pReplaceLB->InsertEntry( sTemp );
+ m_pReplaceLB->SelectEntryPos( nPos );
}
catch ( Exception& )
{
@@ -3576,7 +3373,7 @@ namespace svxform
}
}
- m_aRefBtn.Enable( m_xTempBinding.is() );
+ m_pRefBtn->Enable( m_xTempBinding.is() );
}
//========================================================================
diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src
index 21b4b94..98255db 100644
--- a/svx/source/form/datanavi.src
+++ b/svx/source/form/datanavi.src
@@ -710,7 +710,6 @@ ModalDialog RID_SVXDLG_NAMESPACE_ITEM
ModalDialog RID_SVXDLG_ADD_SUBMISSION
{
- HelpID = HID_XFORMS_ADDSUBMISSION_DLG ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 180 , 136 ) ;
@@ -841,31 +840,36 @@ ModalDialog RID_SVXDLG_ADD_SUBMISSION
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
+};
- String STR_METHOD_POST
- {
- Text [ en-US ] = "Post" ;
- };
- String STR_METHOD_PUT
- {
- Text [ en-US ] = "Put" ;
- };
- String STR_METHOD_GET
- {
- Text [ en-US ] = "Get" ;
- };
- String STR_REPLACE_NONE
- {
- Text [ en-US ] = "None" ;
- };
- String STR_REPLACE_INST
- {
- Text [ en-US ] = "Instance" ;
- };
- String STR_REPLACE_DOC
- {
- Text [ en-US ] = "Document" ;
- };
+String RID_STR_METHOD_POST
+{
+ Text [ en-US ] = "Post" ;
+};
+
+String RID_STR_METHOD_PUT
+{
+ Text [ en-US ] = "Put" ;
+};
+
+String RID_STR_METHOD_GET
+{
+ Text [ en-US ] = "Get" ;
+};
+
+String RID_STR_REPLACE_NONE
+{
+ Text [ en-US ] = "None" ;
+};
+
+String RID_STR_REPLACE_INST
+{
+ Text [ en-US ] = "Instance" ;
+};
+
+String RID_STR_REPLACE_DOC
+{
+ Text [ en-US ] = "Document" ;
};
String RID_STR_DATANAV_SUBM_PARENT
diff --git a/svx/source/inc/datanavi.hrc b/svx/source/inc/datanavi.hrc
index b49e704..f8bd426 100644
--- a/svx/source/inc/datanavi.hrc
+++ b/svx/source/inc/datanavi.hrc
@@ -142,13 +142,6 @@
#define FT_SUBMIT_REPLACE 22
#define LB_SUBMIT_REPLACE 23
-#define STR_METHOD_POST 10
-#define STR_METHOD_PUT 11
-#define STR_METHOD_GET 12
-#define STR_REPLACE_NONE 13
-#define STR_REPLACE_INST 14
-#define STR_REPLACE_DOC 15
-
// class AddModelDialog
#define FL_MODEL 10
#define FT_MODEL_NAME 11
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 517b030..3a99b1d 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -34,6 +34,8 @@
#include <sfx2/dockwin.hxx>
#include <sfx2/childwin.hxx>
#include <sfx2/ctrlitem.hxx>
+#include <svx/dialmgr.hxx>
+#include <svx/fmresids.hrc>
#include <svx/svxdllapi.h>
#include <rtl/ref.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -132,10 +134,108 @@ namespace svxform
void RemoveEntry( SvTreeListEntry* _pEntry );
};
+ class ReplaceString
+ {
+ OUString m_sDoc_UI;
+ OUString m_sInstance_UI;
+ OUString m_sNone_UI;
+
+ OUString m_sDoc_API;
+ OUString m_sInstance_API;
+ OUString m_sNone_API;
+
+ ReplaceString( const ReplaceString& );
+
+ public:
+ ReplaceString() :
+ m_sDoc_API( "all" ),
+ m_sInstance_API( "instance" ),
+ m_sNone_API( "none" )
+ {
+ m_sDoc_UI = SVX_RESSTR(RID_STR_REPLACE_DOC);
+ m_sInstance_UI = SVX_RESSTR(RID_STR_REPLACE_INST);
+ m_sNone_UI = SVX_RESSTR(RID_STR_REPLACE_NONE);
+ }
+
+ /** convert submission replace string from API value to UI value.
+ Use 'none' as default. */
+ OUString toUI( const OUString& rStr ) const
+ {
+ if( rStr == m_sDoc_API )
+ return m_sDoc_UI;
+ else if( rStr == m_sInstance_API )
+ return m_sInstance_UI;
+ else
+ return m_sNone_UI;
+ }
+
+ /** convert submission replace string from UI to API.
+ Use 'none' as default. */
+ OUString toAPI( const OUString& rStr ) const
+ {
+ if( rStr == m_sDoc_UI )
+ return m_sDoc_API;
+ else if( rStr == m_sInstance_UI )
+ return m_sInstance_API;
+ else
+ return m_sNone_API;
+ }
+ };
+
+ class MethodString
+ {
+ OUString m_sPost_UI;
+ OUString m_sPut_UI;
+ OUString m_sGet_UI;
+
+ OUString m_sPost_API;
+ OUString m_sPut_API;
+ OUString m_sGet_API;
+
+ MethodString( const MethodString& );
+
+ public:
+
+ MethodString() :
+ m_sPost_API( "post" ),
+ m_sPut_API( "put" ),
+ m_sGet_API( "get" )
+ {
+ m_sPost_UI = SVX_RESSTR(RID_STR_METHOD_POST);
+ m_sPut_UI = SVX_RESSTR(RID_STR_METHOD_PUT);
+ m_sGet_UI = SVX_RESSTR(RID_STR_METHOD_GET);
+ }
+
+ /** convert from API to UI; put is default. */
+ OUString toUI( const OUString& rStr ) const
+ {
+ if( rStr == m_sGet_API )
+ return m_sGet_UI;
+ else if( rStr == m_sPost_API )
+ return m_sPost_UI;
+ else
+ return m_sPut_UI;
+ }
+
+ /** convert from UI to API; put is default */
+ OUString toAPI( const OUString& rStr ) const
+ {
+ if( rStr == m_sGet_UI )
+ return m_sGet_API;
+ else if( rStr == m_sPost_UI )
+ return m_sPost_API;
+ else
+ return m_sPut_API;
+ }
+ };
+
//========================================================================
class XFormsPage : public TabPage
{
private:
+ MethodString m_aMethodString;
+ ReplaceString m_aReplaceString;
+
ToolBox m_aToolBox;
DataTreeListBox m_aItemList;
@@ -464,25 +564,18 @@ namespace svxform
class AddSubmissionDialog : public ModalDialog
{
private:
- FixedLine m_aSubmissionFL;
- FixedText m_aNameFT;
- Edit m_aNameED;
- FixedText m_aActionFT;
- Edit m_aActionED;
- FixedText m_aMethodFT;
- ListBox m_aMethodLB;
- FixedText m_aRefFT;
- Edit m_aRefED;
- PushButton m_aRefBtn;
- FixedText m_aBindFT;
- ListBox m_aBindLB;
- FixedText m_aReplaceFT;
- ListBox m_aReplaceLB;
+ MethodString m_aMethodString;
+ ReplaceString m_aReplaceString;
- FixedLine m_aButtonsFL;
- OKButton m_aOKBtn;
- CancelButton m_aEscBtn;
- HelpButton m_aHelpBtn;
+ Edit* m_pNameED;
+ Edit* m_pActionED;
+ ListBox* m_pMethodLB;
+ Edit* m_pRefED;
+ PushButton* m_pRefBtn;
+ ListBox* m_pBindLB;
+ ListBox* m_pReplaceLB;
+
+ OKButton* m_pOKBtn;
ItemNode* m_pItemNode;
diff --git a/svx/uiconfig/ui/addsubmissiondialog.ui b/svx/uiconfig/ui/addsubmissiondialog.ui
new file mode 100644
index 0000000..6ec2caf
--- /dev/null
+++ b/svx/uiconfig/ui/addsubmissiondialog.ui
@@ -0,0 +1,323 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="AddSubmissionDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Add Submission</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <property name="row_homogeneous">True</property>
+ <child>
+ <object class="GtkEntry" id="name">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="valign">center</property>
+ <property name="invisible_char">â¢</property>
+ <property name="width_chars">46</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Name</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">name</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="urlft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Binding e_xpression</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">expression</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="browse">
+ <property name="label" translatable="yes">_...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="valign">center</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Action</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">action</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="action">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="valign">center</property>
+ <property name="invisible_char">â¢</property>
+ <property name="width_chars">46</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Method</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">method</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="method">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="expression">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="valign">center</property>
+ <property name="invisible_char">â¢</property>
+ <property name="width_chars">46</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Binding</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">binding</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Replace</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">replace</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="binding">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="replace">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">5</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Submission</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
commit f206aa708c362e7064b442da54726a4e306384bc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 27 14:09:59 2013 +0000
drop SfxNoLayoutSingleTabDialog declarations
Change-Id: I1ceeff76292f9d9884112a69ecdd6052184a657c
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index e025c48..94cc59f 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -22,7 +22,6 @@
#include "swabstdlg.hxx"
class SwInsertAbstractDlg;
-class SfxNoLayoutSingleTabDialog;
class SwAsciiFilterDlg;
class Dialog;
class SwBreakDlg;
@@ -83,7 +82,6 @@ class AbstractSwInsertAbstractDlg_Impl : public AbstractSwInsertAbstractDlg
virtual sal_uInt8 GetPara() const ;
};
-class SfxNoLayoutSingleTabDialog;
class SwAbstractSfxDialog_Impl :public SfxAbstractDialog
{
DECL_ABSTDLG_BASE(SwAbstractSfxDialog_Impl,SfxModalDialog)
commit 366e4d65bedc65a787203d1454fa9fb276c3eaac
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 27 14:57:37 2013 +0000
Updated core
Project: help 2e0d679adbb3f41915a4a70a46ea556fb8afb368
diff --git a/helpcontent2 b/helpcontent2
index 0dc1069..2e0d679 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0dc1069fa953547ac90aebf058b6ff18a83e820f
+Subproject commit 2e0d679adbb3f41915a4a70a46ea556fb8afb368
commit dc836aa46d3436bf631a8f70a5e04d76ff7ad45f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 15:21:43 2013 +0100
cppcheck: remove dups
Change-Id: I59622a66358a688caac36b7da220588dc2da440a
diff --git a/helpcontent2 b/helpcontent2
index 74508d8..0dc1069 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 74508d8b773142bf68780b8550ff70baaa53be89
+Subproject commit 0dc1069fa953547ac90aebf058b6ff18a83e820f
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 3640b46..7cf1b21 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -339,7 +339,6 @@ OUString SfxHelp::GetHelpModuleName_Impl()
|| aFactoryShortName.startsWith("dbapp")
|| aFactoryShortName.startsWith("dbreport")
|| aFactoryShortName.startsWith("swreport")
- || aFactoryShortName.startsWith("dbbrowser")
|| aFactoryShortName.startsWith("swform") )
aFactoryShortName = "sdatabase";
else if ( aFactoryShortName.startsWith("sbibliography")
diff --git a/svx/source/sidebar/tools/ColorControl.cxx b/svx/source/sidebar/tools/ColorControl.cxx
index 75264f1..0ca0f3c 100644
--- a/svx/source/sidebar/tools/ColorControl.cxx
+++ b/svx/source/sidebar/tools/ColorControl.cxx
@@ -123,7 +123,7 @@ void ColorControl::FillColors (void)
return;
const WinBits aWinBits(maVSColor.GetStyle() | WB_TABSTOP | WB_ITEMBORDER | WB_NAMEFIELD |
- WB_NO_DIRECTSELECT | WB_MENUSTYLEVALUESET | WB_NO_DIRECTSELECT);
+ WB_NO_DIRECTSELECT | WB_MENUSTYLEVALUESET);
maVSColor.SetStyle(aWinBits);
commit f23ae024461665eac0bdcc569eabe9caf28a8943
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 15:07:53 2013 +0100
cppcheck: reduce scope
Change-Id: I14956a86b8c83b9432c1eda511371beb026fd680
diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx
index 7182239..8339951 100644
--- a/extensions/source/propctrlr/cellbindinghelper.cxx
+++ b/extensions/source/propctrlr/cellbindinghelper.cxx
@@ -506,9 +506,8 @@ namespace pcr
//------------------------------------------------------------------------
bool CellBindingHelper::doesComponentSupport( const Reference< XInterface >& _rxComponent, const OUString& _rService ) const
{
- bool bDoes = false;
Reference< XServiceInfo > xSI( _rxComponent, UNO_QUERY );
- bDoes = xSI.is() && xSI->supportsService( _rService );
+ bool bDoes = xSI.is() && xSI->supportsService( _rService );
return bDoes;
}
commit a81896a9d2517155f1d8ec7a98767bfc27c1f0c7
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 15:05:23 2013 +0100
cppcheck: reduce scope
Change-Id: If8220e82165d8ab85906584baa3827e3b6f5c2f4
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 3ae0236..9b408647c 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -775,7 +775,6 @@ SotStorage * SotStorage::OpenSotStorage( const OUString & rEleName,
StreamMode nMode,
StorageMode nStorageMode )
{
- SotStorage * pStor = NULL;
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
{
@@ -785,7 +784,7 @@ SotStorage * SotStorage::OpenSotStorage( const OUString & rEleName,
(nStorageMode & STORAGE_TRANSACTED) ? false : true );
if( p )
{
- pStor = new SotStorage( p );
+ SotStorage * pStor = new SotStorage( p );
if( !nE )
m_pOwnStg->ResetError(); // kein Fehler setzen
commit beba4603ee8e603fff2599bee7f157d90872cb99
Author: Muthu Subramanian <sumuthu at collabora.com>
Date: Fri Dec 27 19:59:22 2013 +0530
fdo#72998: Custom shapes have improper size.
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 48ace8b..247e8cf 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -213,7 +213,13 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aPropertyMap[ PROP_Type ] <<= OUString( "ooxml-non-primitive" );
aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY );
+ // Note 1: If Equations are defined - they are processed using internal div by 360 coordinates
+ // while if they are not, standard ooxml coordinates are used.
+ // This size specifically affects scaling.
+ // Note 2: Width and Height are set to 0 to force scaling to 1.
awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height );
+ if( maGuideList.size() )
+ aViewBox = awt::Rectangle( 0, 0, 0, 0 );
aPropertyMap[ PROP_ViewBox ] <<= aViewBox;
Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() );
diff --git a/sd/qa/unit/data/xml/n762695_0.xml b/sd/qa/unit/data/xml/n762695_0.xml
index 5f3080f..d55c979 100644
--- a/sd/qa/unit/data/xml/n762695_0.xml
+++ b/sd/qa/unit/data/xml/n762695_0.xml
@@ -83,7 +83,7 @@
</PropertyValue>
<PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/>
<PropertyValue name="ViewBox">
- <ViewBox x="0" y="0" width="4820911" height="3908235"/>
+ <ViewBox x="0" y="0" width="0" height="0"/>
</PropertyValue>
</CustomShapeGeometry>
</XShape>
diff --git a/sd/qa/unit/data/xml/n762695_1.xml b/sd/qa/unit/data/xml/n762695_1.xml
index d746783..fb24ba08 100644
--- a/sd/qa/unit/data/xml/n762695_1.xml
+++ b/sd/qa/unit/data/xml/n762695_1.xml
@@ -83,7 +83,7 @@
</PropertyValue>
<PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/>
<PropertyValue name="ViewBox">
- <ViewBox x="0" y="0" width="6477000" height="2743200"/>
+ <ViewBox x="0" y="0" width="0" height="0"/>
</PropertyValue>
</CustomShapeGeometry>
</XShape>
@@ -170,7 +170,7 @@
</PropertyValue>
<PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/>
<PropertyValue name="ViewBox">
- <ViewBox x="0" y="0" width="6365875" height="3430587"/>
+ <ViewBox x="0" y="0" width="0" height="0"/>
</PropertyValue>
</CustomShapeGeometry>
</XShape>
commit c6d1938f7559aa6293338b4d756ec7fc0bd79f63
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 27 14:00:28 2013 +0000
it's a SfxSingleTabDialog not SfxNoLayoutSingleTabDialog
Change-Id: I0c86753fab551a18a9f0c62adc03a3d967947dbf
diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx
index eaa2a14..1ab46e0 100644
--- a/cui/source/inc/cuisrchdlg.hxx
+++ b/cui/source/inc/cuisrchdlg.hxx
@@ -44,10 +44,8 @@ class SvxJSearchOptionsDialog : public SfxSingleTabDialog
SvxJSearchOptionsDialog & operator == ( const SvxJSearchOptionsDialog & );
public:
- SvxJSearchOptionsDialog( Window *pParent,
- const SfxItemSet& rOptionsSet,
- sal_Int32 nInitialFlags );
- virtual ~SvxJSearchOptionsDialog();
+ SvxJSearchOptionsDialog(Window *pParent,
+ const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags);
// Window
virtual void Activate();
diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx
index b4b7f2e..02273fa 100644
--- a/cui/source/inc/measure.hxx
+++ b/cui/source/inc/measure.hxx
@@ -81,17 +81,15 @@ public:
};
-/* Derived from SfxNoLayoutSingleTabDialog, in order to be able to be
+/* Derived from SfxSingleTabDialog, in order to be able to be
informed about virtual methods by the control. */
class SvxMeasureDialog : public SfxSingleTabDialog
{
public:
- SvxMeasureDialog( Window* pParent, const SfxItemSet& rAttr,
- const SdrView* pView );
- ~SvxMeasureDialog();
+ SvxMeasureDialog(Window* pParent, const SfxItemSet& rAttr,
+ const SdrView* pView);
};
-
#endif // INCLUDED_CUI_SOURCE_INC_MEASURE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx
index 5511875..08ff0bf 100644
--- a/cui/source/options/cuisrchdlg.cxx
+++ b/cui/source/options/cuisrchdlg.cxx
@@ -52,26 +52,19 @@ SvxJSearchOptionsDialog::SvxJSearchOptionsDialog(Window *pParent,
: SfxSingleTabDialog(pParent, rOptionsSet)
, nInitialTlFlags( nInitialFlags )
{
+ // pPage will be implicitly destroyed by the
+ // SfxSingleTabDialog destructor
pPage = (SvxJSearchOptionsPage *)
SvxJSearchOptionsPage::Create(get_content_area(), rOptionsSet );
setTabPage( pPage ); //! implicitly calls pPage->Reset(...)!
pPage->EnableSaveOptions(false);
}
-
-SvxJSearchOptionsDialog::~SvxJSearchOptionsDialog()
-{
- // pPage will be implicitly destroyed by the
- // SfxNoLayoutSingleTabDialog destructor
-}
-
-
void SvxJSearchOptionsDialog::Activate()
{
pPage->SetTransliterationFlags( nInitialTlFlags );
}
-
sal_Int32 SvxJSearchOptionsDialog::GetTransliterationFlags() const
{
return pPage->GetTransliterationFlags();
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 9f1c1af..245b1f6 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -75,16 +75,6 @@ SvxMeasureDialog::SvxMeasureDialog( Window* pParent, const SfxItemSet& rInAttrs,
/*************************************************************************
|*
-|* Dtor
-|*
-\************************************************************************/
-
-SvxMeasureDialog::~SvxMeasureDialog()
-{
-}
-
-/*************************************************************************
-|*
|* Tabpage for changing measure-attributes
|*
\************************************************************************/
commit aabee4ca0bc5dd9107a8f1a53349bd652c790627
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 14:57:54 2013 +0100
cppcheck: fix consecutive break
Change-Id: I028543f751ed8759f694cc4901d8c89d76867596
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
index 8c57046..c923804 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
@@ -168,7 +168,6 @@ namespace
pCppArgs[nPos] = pUnoArgs[nPos] = pStackedArgs;
pStackedArgs += 2;
break;
- break;
case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE:
pCppArgs[nPos] = pUnoArgs[nPos] = pStackedArgs;
commit 0a17a19949abcb6077a1b4eecb88808c85ae6c11
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 14:56:58 2013 +0100
cppcheck: fix var reassigned
Change-Id: I10bb64672d02626814c162b09b8bdd615f7fcad8
diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx
index 84ffcf6..7ff4c49 100644
--- a/svl/source/config/ctloptions.cxx
+++ b/svl/source/config/ctloptions.cxx
@@ -286,11 +286,9 @@ void SvtCTLOptions_Impl::Load()
if (!m_bCTLFontEnabled)
{
- bool bAutoEnableCTL = false;
-
sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage(LANGUAGE_SYSTEM);
//system locale is CTL
- bAutoEnableCTL = (nScriptType & SCRIPTTYPE_COMPLEX);
+ bool bAutoEnableCTL = (nScriptType & SCRIPTTYPE_COMPLEX);
LanguageType eSystemLanguage = LANGUAGE_SYSTEM;
commit 203fbb160534496a8385a5d4b254050514eaf5f6
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 14:44:59 2013 +0100
cppcheck: fix var reassigned
Change-Id: I9db36a231ea846929f8860d089d77d0126242c26
diff --git a/basctl/source/dlged/dlgedclip.cxx b/basctl/source/dlged/dlgedclip.cxx
index 68fbf4f..99b8684 100644
--- a/basctl/source/dlged/dlgedclip.cxx
+++ b/basctl/source/dlged/dlgedclip.cxx
@@ -53,8 +53,6 @@ DlgEdTransferableImpl::~DlgEdTransferableImpl()
sal_Bool DlgEdTransferableImpl::compareDataFlavors( const DataFlavor& lFlavor, const DataFlavor& rFlavor )
{
- bool bRet = false;
-
// compare mime content types
Reference< uno::XComponentContext > xContext = getProcessComponentContext();
Reference< datatransfer::XMimeContentTypeFactory >
@@ -67,7 +65,7 @@ sal_Bool DlgEdTransferableImpl::compareDataFlavors( const DataFlavor& lFlavor, c
OUString aLFullMediaType = xLType->getFullMediaType();
OUString aRFullMediaType = xRType->getFullMediaType();
- bRet = aLFullMediaType.equalsIgnoreAsciiCase( aRFullMediaType );
+ bool bRet = aLFullMediaType.equalsIgnoreAsciiCase( aRFullMediaType );
return bRet;
}
commit 8b29f1eb3b5614b9fde97f12b38faa16141bfdef
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 14:39:16 2013 +0100
cppcheck: reduce scope
Change-Id: I9a2e2387eb1d436cd64c1ca00276fe9256ef0c04
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 74d77e0..e10ba5b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2891,7 +2891,6 @@ void DomainMapper_Impl::CloseFieldCommand()
{
m_bSetUserFieldContent = false;
FieldConversionMap_t aFieldConversionMap = lcl_GetFieldConversion();
- bool bCreateEnhancedField = false;
try
{
@@ -2905,6 +2904,7 @@ void DomainMapper_Impl::CloseFieldCommand()
FieldConversionMap_t::iterator aIt = aFieldConversionMap.find(sCommand);
if(aIt != aFieldConversionMap.end())
{
+ bool bCreateEnhancedField = false;
uno::Reference< beans::XPropertySet > xFieldProperties;
bool bCreateField = true;
switch (aIt->second.eFieldId)
commit 943e2930e7453857f229efe04ade85cb1dc87faf
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 14:36:44 2013 +0100
cppcheck: reduce scope
Change-Id: Id3715b84a2328ca37fbc05d552fe58617ecfa78a
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index 8009275..640c505 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -233,8 +233,6 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const PolyPolygon& rPo
return;
sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF];
- PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
- sal_uInt8* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
sal_uInt32* pPointAry;
PCONSTSALPOINT* pPointAryAry;
const sal_uInt8** pFlagAryAry;
@@ -248,6 +246,8 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const PolyPolygon& rPo
}
else
{
+ PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
+ sal_uInt8* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
pPointAry = aStackAry1;
pPointAryAry = aStackAry2;
pFlagAryAry = (const sal_uInt8**)aStackAry3;
commit 4b3b7fc35e4d94d9ec30e0b2fc85b7b961fdcb8d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 27 13:54:55 2013 +0000
SfxNoLayoutSingleTabDialog->SfxSingleTabDialog
Change-Id: Ib0d0696b1da5b609473a61aff185282233afb9fd
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 59b7a31..600774b 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -737,18 +737,19 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
aCropDlgAttr.Put( SdrGrafCropItem( aLTSize.Width(), aLTSize.Height(),
aRBSize.Width(), aRBSize.Height() ) );
- SfxNoLayoutSingleTabDialog aCropDialog( SfxViewShell::Current() ? SfxViewShell::Current()->GetWindow() : NULL,
- aCropDlgAttr, 950 );
- const OUString aCropStr = SVX_RESSTR( RID_SVXSTR_GRAFCROP );
+ SfxSingleTabDialog aCropDialog(
+ SfxViewShell::Current() ? SfxViewShell::Current()->GetWindow() : NULL,
+ aCropDlgAttr);
+ const OUString aCropStr(SVX_RESSTR(RID_SVXSTR_GRAFCROP));
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet error!");
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_GRFCROP );
DBG_ASSERT(fnCreatePage, "Dialogdiet error!");
- SfxTabPage* pTabPage = (*fnCreatePage)( &aCropDialog, aCropDlgAttr );
+ SfxTabPage* pTabPage = (*fnCreatePage)( aCropDialog.get_content_area(), aCropDlgAttr );
pTabPage->SetText( aCropStr );
- aCropDialog.SetTabPage( pTabPage );
+ aCropDialog.setTabPage( pTabPage );
if( aCropDialog.Execute() == RET_OK )
{
commit d61a27f278e8442d54d52115981b5235f230ac80
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 27 13:49:52 2013 +0000
use SfxSingleTabDialogBase here now
Change-Id: Ibd5d82f93fb94db3e8d53acc9df05f2459807bb4
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 3eef208..9300385 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -746,7 +746,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl)
{
OUString sFldTypeName = m_pCategoryBox->GetText();
- SfxNoLayoutSingleTabDialog *pDlg = dynamic_cast<SfxNoLayoutSingleTabDialog*>(GetParentDialog());
+ SfxSingleTabDialogBase *pDlg = dynamic_cast<SfxSingleTabDialogBase*>(GetParentDialog());
PushButton *pBtn = pDlg ? pDlg->GetOKButton() : NULL;
if (pBtn)
pBtn->Enable(!sFldTypeName.isEmpty());
commit 2530d2923c3959ac8efa73e37a4b44cdacec7070
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 27 13:40:35 2013 +0000
presumably each entry needs a tab and semicolon
Change-Id: Iedb57186d56c6d1445bcfe2ad37d0569dba32b4e
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 19c380b..14acf19 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -153,20 +153,24 @@ void SvMetaModule::WriteAttributesSvIdl( SvIdlDataBase & rBase,
SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab );
if( !aHelpFileName.getString().isEmpty() || !aSlotIdFile.getString().isEmpty() || !aTypeLibFile.getString().isEmpty() )
{
- WriteTab( rOutStm, nTab );
if( !aHelpFileName.getString().isEmpty() )
{
+ WriteTab( rOutStm, nTab );
aHelpFileName.WriteSvIdl( SvHash_HelpFile(), rOutStm, nTab +1 );
+ rOutStm << ';' << endl;
}
if( !aSlotIdFile.getString().isEmpty() )
{
+ WriteTab( rOutStm, nTab );
aSlotIdFile.WriteSvIdl( SvHash_SlotIdFile(), rOutStm, nTab +1 );
+ rOutStm << ';' << endl;
}
if( !aTypeLibFile.getString().isEmpty() )
{
+ WriteTab( rOutStm, nTab );
aTypeLibFile.WriteSvIdl( SvHash_TypeLibFile(), rOutStm, nTab +1 );
+ rOutStm << ';' << endl;
}
- rOutStm << ';' << endl;
}
}
commit 97599c406ec289c8a876bf9a834bf61a4e80b7ee
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 14:27:54 2013 +0100
cppcheck: fix 2 consecutive breaks
Change-Id: If67b90bc56695a6aaf6d152d4a70dc68126596a6
diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx
index 8a3bee5..8f8aee9 100644
--- a/sc/source/ui/miscdlgs/datastreamdlg.cxx
+++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx
@@ -140,7 +140,6 @@ void DataStreamDlg::Init( const DataStream& rStrm )
case DataStream::MOVE_DOWN:
m_pRBDataDown->Check();
break;
- break;
case DataStream::RANGE_DOWN:
m_pRBRangeDown->Check();
break;
commit c959586c09e6269ac8ff44de917e4a900e895728
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 14:23:23 2013 +0100
cppcheck: fix Same expression on both sides of '||' + simplify a bit
Change-Id: I7903c4af5263f93dc4d311b73cb21e144a63d8d9
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index b78de74..19c380b 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -151,26 +151,22 @@ void SvMetaModule::WriteAttributesSvIdl( SvIdlDataBase & rBase,
sal_uInt16 nTab )
{
SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab );
- if( !aTypeLibFile.getString().isEmpty() || !aSlotIdFile.getString().isEmpty() || !aTypeLibFile.getString().isEmpty() )
+ if( !aHelpFileName.getString().isEmpty() || !aSlotIdFile.getString().isEmpty() || !aTypeLibFile.getString().isEmpty() )
{
+ WriteTab( rOutStm, nTab );
if( !aHelpFileName.getString().isEmpty() )
{
- WriteTab( rOutStm, nTab );
aHelpFileName.WriteSvIdl( SvHash_HelpFile(), rOutStm, nTab +1 );
- rOutStm << ';' << endl;
}
if( !aSlotIdFile.getString().isEmpty() )
{
- WriteTab( rOutStm, nTab );
aSlotIdFile.WriteSvIdl( SvHash_SlotIdFile(), rOutStm, nTab +1 );
- rOutStm << ';' << endl;
}
if( !aTypeLibFile.getString().isEmpty() )
{
- WriteTab( rOutStm, nTab );
aTypeLibFile.WriteSvIdl( SvHash_TypeLibFile(), rOutStm, nTab +1 );
- rOutStm << ';' << endl;
}
+ rOutStm << ';' << endl;
}
}
commit 4148ba7075159c9966b83594e51deb9c9759d722
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 27 14:19:22 2013 +0100
cppcheck: fix reassigned value
Change-Id: Iee162175b692d82679132ce32d026cb3b3bfa77e
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index 28a12df..ef5a8f6 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -503,9 +503,8 @@ void DlgEdFunc::unColorizeOverlappedObj()
// -----------------------------------------------------------------------------
bool DlgEdFunc::isOverlapping(const MouseEvent& rMEvt)
{
- bool bOverlapping = false;
SdrViewEvent aVEvt;
- bOverlapping = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt) != SDRHIT_NONE;
+ bool bOverlapping = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt) != SDRHIT_NONE;
if (bOverlapping && aVEvt.pObj)
{
colorizeOverlappedObject(aVEvt.pObj);
commit 17f1b0f551dbacc24fe5e2c90d5f00e5578ab9e7
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Dec 27 14:00:51 2013 +0200
Using pre-cached type_infos provided by the typeid operator seems to work now
Apparently there was no problem in this after all. The reason it
seemed not to work earlier was because of the unwinding failure due to
the missing .cfi_startproc and .cfi_endproc thingies in helper.s
The hack in ucbhelper is now not needed after all.
Change-Id: If9fec5c502d4c9d0c44709ad9c2729f812e882e2
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
index 22026cc..2f1df7a 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/uno/genfunc.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
+#include <com/sun/star/ucb/NameClashException.hpp>
#include <typelib/typedescription.hxx>
#include <uno/any2.h>
@@ -171,12 +172,21 @@ public:
RTTI::RTTI() SAL_THROW(())
: m_hApp( dlopen( 0, RTLD_LAZY ) )
{
-#if 0
// Insert commonly needed type_infos to avoid dlsym() calls
- // Ideally we should insert all needed ones
+ // Ideally we should insert all needed ones, and we actually must,
+ // for arm64, as the dynamically generated type_infos don't seem
+ // to work correctly. Luckily it seems that quite few types of
+ // exceptions are thrown through the C++/UNO bridge at least in
+ // the TiledLibreOffice test app.
+
+ // (As no Java, Basic or Python is supported in LO code on iOS, we
+ // can know the set of types of exceptions throws a priori, so
+ // keeping this list complete should be possible.)
+
m_rttis.insert( t_rtti_map::value_type( "com.sun.star.ucb.InteractiveAugmentedIOException",
(std::type_info*) &typeid( com::sun::star::ucb::InteractiveAugmentedIOException ) ) );
-#endif
+ m_rttis.insert( t_rtti_map::value_type( "com.sun.star.ucb.NameClashException",
+ (std::type_info*) &typeid( com::sun::star::ucb::NameClashException ) ) );
}
RTTI::~RTTI() SAL_THROW(())
diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx b/ucbhelper/source/provider/cancelcommandexecution.cxx
index 617c96c..2f4e42e 100644
--- a/ucbhelper/source/provider/cancelcommandexecution.cxx
+++ b/ucbhelper/source/provider/cancelcommandexecution.cxx
@@ -74,22 +74,6 @@ void cancelCommandExecution( const uno::Any & rException,
}
}
-#if defined IOS && defined __arm64
- // No Java, Basic, or Python on iOS, so try to throw the exception
- // directly. Much simpler. Especially as I haven't managed yet to
- // get the C++/UNO bridge to work for arm64, and this
- // cppu::throwException thing seems to be the only use for it, at
- // least in the test apps...
-
- ucb::NameClashException aNCE;
- if ( rException >>= aNCE )
- throw aNCE;
-
- lang::IllegalArgumentException aIAE;
- if ( rException >>= aIAE )
- throw aIAE;
-#endif
-
cppu::throwException( rException );
OSL_FAIL( "Return from cppu::throwException call!!!" );
throw uno::RuntimeException();
@@ -127,13 +111,6 @@ void cancelCommandExecution( const ucb::IOErrorCode eError,
}
}
-#if defined IOS && defined __arm64
- // See comment above.
- ucb::InteractiveAugmentedIOException aExc;
- if ( xRequest->getRequest() >>= aExc )
- throw aExc;
-#endif
-
cppu::throwException( xRequest->getRequest() );
OSL_FAIL( "Return from cppu::throwException call!!!" );
commit 8f6a574d4f0fdf9d113aaa073daf948a7ec1df52
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 27 11:43:03 2013 +0000
convert add instance dialog to .ui
Change-Id: I92a82fb25b8b9d9cbedefb6fcebc7a4d167649bf
diff --git a/include/svx/fmresids.hrc b/include/svx/fmresids.hrc
index fdeed41..c44ae4b 100644
--- a/include/svx/fmresids.hrc
+++ b/include/svx/fmresids.hrc
@@ -67,7 +67,6 @@
#define RID_SVXDLG_ADD_SUBMISSION (RID_FORMS_START + 16)
-#define RID_SVXDLG_ADD_INSTANCE (RID_FORMS_START + 18)
#define RID_SVXWIN_DATANAVIGATOR (RID_FORMS_START + 19)
#define RID_SVX_XFORMS_TABPAGES (RID_FORMS_START + 20)
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index b3a0ed7..41fb585 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_UIConfig_UIConfig,svx))
$(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/acceptrejectchangesdialog \
+ svx/uiconfig/ui/addinstancedialog \
svx/uiconfig/ui/addmodeldialog \
svx/uiconfig/ui/addnamespacedialog \
svx/uiconfig/ui/asianphoneticguidedialog \
diff --git a/svx/inc/fmhelp.hrc b/svx/inc/fmhelp.hrc
index 4245769..fbe9c7c 100644
--- a/svx/inc/fmhelp.hrc
+++ b/svx/inc/fmhelp.hrc
@@ -75,7 +75,6 @@
#define HID_XFORMS_MODELS_MENUBTN "SVX_HID_XFORMS_MODELS_MENUBTN"
#define HID_XFORMS_INSTANCES_MENUBTN "SVX_HID_XFORMS_INSTANCES_MENUBTN"
#define HID_XFORMS_ADDSUBMISSION_DLG "SVX_HID_XFORMS_ADDSUBMISSION_DLG"
-#define HID_XFORMS_ADDINSTANCE_DLG "SVX_HID_XFORMS_ADDINSTANCE_DLG"
#define HID_XFORMS_MID_INSERT_CONTROL "SVX_HID_XFORMS_MID_INSERT_CONTROL"
#define HID_XFORMS_TAB_CONTROL "SVX_HID_XFORMS_TAB_CONTROL"
#define HID_FM_DELETEROWS "SVX_HID_FM_DELETEROWS"
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 9820a0b..656f854 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -3597,39 +3597,25 @@ namespace svxform
// class AddInstanceDialog
//========================================================================
- AddInstanceDialog::AddInstanceDialog( Window* pParent, bool _bEdit ) :
-
- ModalDialog( pParent, SVX_RES( RID_SVXDLG_ADD_INSTANCE ) ),
-
- m_aInstanceFL ( this, SVX_RES( FL_INSTANCE ) ),
- m_aNameFT ( this, SVX_RES( FT_INST_NAME ) ),
- m_aNameED ( this, SVX_RES( ED_INST_NAME ) ),
- m_aURLFT ( this, SVX_RES( FT_INST_URL ) ),
- m_aURLED ( this, SVX_RES( ED_INST_URL ) ),
- m_aFilePickerBtn ( this, SVX_RES( PB_FILEPICKER ) ),
- m_aLinkInstanceCB ( this, SVX_RES( CB_INST_LINKINST ) ),
- m_aButtonsFL ( this, SVX_RES( FL_DATANAV_BTN ) ),
- m_aOKBtn ( this, SVX_RES( BTN_DATANAV_OK ) ),
- m_aEscBtn ( this, SVX_RES( BTN_DATANAV_ESC ) ),
- m_aHelpBtn ( this, SVX_RES( BTN_DATANAV_HELP ) )
-
+ AddInstanceDialog::AddInstanceDialog(Window* pParent, bool _bEdit)
+ : ModalDialog(pParent, "AddInstanceDialog" , "svx/ui/addinstancedialog.ui")
{
- if ( _bEdit )
- SetText(SVX_RESSTR(STR_EDIT_TEXT));
+ get(m_pNameED, "name");
+ get(m_pURLFT, "urlft");
+ get(m_pURLED, "url");
+ get(m_pFilePickerBtn, "browse");
+ get(m_pLinkInstanceCB, "link");
- FreeResource();
+ if ( _bEdit )
+ SetText(get<FixedText>("alttitle")->GetText());
- m_aURLED.DisableHistory();
- m_aFilePickerBtn.SetClickHdl( LINK( this, AddInstanceDialog, FilePickerHdl ) );
+ m_pURLED->DisableHistory();
+ m_pFilePickerBtn->SetClickHdl( LINK( this, AddInstanceDialog, FilePickerHdl ) );
// load the filter name from fps_office resource
m_sAllFilterName = ResId(STR_FILTERNAME_ALL, *ResMgr::CreateResMgr("fps_office")).toString();
}
- AddInstanceDialog::~AddInstanceDialog()
- {
- }
-
//------------------------------------------------------------------------
IMPL_LINK_NOARG(AddInstanceDialog, FilePickerHdl)
{
@@ -3644,7 +3630,7 @@ namespace svxform
aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
if( aDlg.Execute() == ERRCODE_NONE )
- m_aURLED.SetText( aDlg.GetPath() );
+ m_pURLED->SetText( aDlg.GetPath() );
return 0;
}
diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src
index 882b93a..21b4b94 100644
--- a/svx/source/form/datanavi.src
+++ b/svx/source/form/datanavi.src
@@ -868,95 +868,6 @@ ModalDialog RID_SVXDLG_ADD_SUBMISSION
};
};
-ModalDialog RID_SVXDLG_ADD_INSTANCE
-{
- HelpID = HID_XFORMS_ADDINSTANCE_DLG ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 210 , 88 ) ;
- Text [ en-US ] = "Add Instance" ;
- Moveable = TRUE ;
- FixedLine FL_INSTANCE
- {
- Pos = MAP_APPFONT ( 4 , 3 ) ;
- Size = MAP_APPFONT ( 202 , 8 ) ;
- Text [ en-US ] = "Instance" ;
- };
- FixedText FT_INST_NAME
- {
- Pos = MAP_APPFONT ( 6 , 15 ) ;
- Size = MAP_APPFONT ( 51 , 8 ) ;
- LeftLabel = TRUE ;
- Text [ en-US ] = "~Name" ;
- };
- Edit ED_INST_NAME
- {
- HelpID = "svx:Edit:RID_SVXDLG_ADD_INSTANCE:ED_INST_NAME";
- Pos = MAP_APPFONT ( 60 , 14 ) ;
- Size = MAP_APPFONT ( 144 , 12 ) ;
- Border = TRUE ;
- };
- FixedText FT_INST_URL
- {
- Pos = MAP_APPFONT ( 6 , 30 ) ;
- Size = MAP_APPFONT ( 51 , 8 ) ;
- LeftLabel = TRUE ;
- Text [ en-US ] = "~URL" ;
- };
- ComboBox ED_INST_URL
- {
- HelpID = "svx:ComboBox:RID_SVXDLG_ADD_INSTANCE:ED_INST_URL";
- Pos = MAP_APPFONT ( 60 , 29 ) ;
- Size = MAP_APPFONT ( 127 , 48 ) ;
- DropDown = TRUE ;
- Border = TRUE ;
- };
- PushButton PB_FILEPICKER
- {
- HelpID = "svx:PushButton:RID_SVXDLG_ADD_INSTANCE:PB_FILEPICKER";
- Pos = MAP_APPFONT ( 190 , 28 ) ;
- Size = MAP_APPFONT ( 14 , 14 ) ;
- TabStop = TRUE ;
- Text = "~..." ;
- };
- CheckBox CB_INST_LINKINST
- {
- HelpID = "svx:CheckBox:RID_SVXDLG_ADD_INSTANCE:CB_INST_LINKINST";
- Pos = MAP_APPFONT ( 6 , 44 ) ;
- Size = MAP_APPFONT ( 198 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Link instance" ;
- };
- FixedLine FL_DATANAV_BTN
- {
- Pos = MAP_APPFONT ( 4 , 57 ) ;
- Size = MAP_APPFONT ( 202 , 8 ) ;
- };
- OKButton BTN_DATANAV_OK
- {
- Pos = MAP_APPFONT ( 45 , 68 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_DATANAV_ESC
- {
- Pos = MAP_APPFONT ( 98 , 68 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_DATANAV_HELP
- {
- Pos = MAP_APPFONT ( 154 , 68 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- String STR_EDIT_TEXT
- {
- Text [ en-US ] = "Edit Instance" ;
- };
-};
-
String RID_STR_DATANAV_SUBM_PARENT
{
Text [ en-US ] = "Submission: " ;
diff --git a/svx/source/inc/datanavi.hrc b/svx/source/inc/datanavi.hrc
index ac19bde..b49e704 100644
--- a/svx/source/inc/datanavi.hrc
+++ b/svx/source/inc/datanavi.hrc
@@ -126,8 +126,6 @@
#define STR_HEADER_PREFIX 10
#define STR_HEADER_URL 11
-#define STR_EDIT_TEXT 10
-
// class AddSubmissionDialog
#define FL_SUBMISSION 10
#define FT_SUBMIT_NAME 11
@@ -156,15 +154,6 @@
#define FT_MODEL_NAME 11
#define ED_MODEL_NAME 12
-// class AddInstanceDialog
-#define FL_INSTANCE 10
-#define FT_INST_NAME 11
-#define ED_INST_NAME 12
-#define FT_INST_URL 13
-#define ED_INST_URL 14
-#define PB_FILEPICKER 15
-#define CB_INST_LINKINST 16
-
// class AddModelDialog
#define CB_MODIFIES_DOCUMENT 1
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 36132cf..517b030 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -526,17 +526,11 @@ namespace svxform
class AddInstanceDialog : public ModalDialog
{
private:
- FixedLine m_aInstanceFL;
- FixedText m_aNameFT;
- Edit m_aNameED;
- FixedText m_aURLFT;
- SvtURLBox m_aURLED;
- PushButton m_aFilePickerBtn;
- CheckBox m_aLinkInstanceCB;
- FixedLine m_aButtonsFL;
- OKButton m_aOKBtn;
- CancelButton m_aEscBtn;
- HelpButton m_aHelpBtn;
+ Edit* m_pNameED;
+ FixedText* m_pURLFT;
+ SvtURLBox* m_pURLED;
+ PushButton* m_pFilePickerBtn;
+ CheckBox* m_pLinkInstanceCB;
OUString m_sAllFilterName;
@@ -544,24 +538,21 @@ namespace svxform
public:
AddInstanceDialog( Window* pParent, bool _bEdit );
- ~AddInstanceDialog();
-
- inline void SetRenameMode();
- inline OUString GetName() const { return m_aNameED.GetText(); }
- inline void SetName( const OUString& _rName ) { m_aNameED.SetText( _rName );}
- inline OUString GetURL() const { return m_aURLED.GetText(); }
- inline void SetURL( const OUString& _rURL ) { m_aURLED.SetText( _rURL );}
- inline bool IsLinkInstance() const { return ( m_aLinkInstanceCB.IsChecked() != sal_False ); }
- inline void SetLinkInstance( bool _bLink ) { m_aLinkInstanceCB.Check( _bLink != false ); }
- };
- inline void AddInstanceDialog::SetRenameMode()
- {
- m_aURLFT.Disable();
- m_aURLED.Disable();
- m_aFilePickerBtn.Disable();
- m_aLinkInstanceCB.Disable();
- }
+ void SetRenameMode()
+ {
+ m_pURLFT->Disable();
+ m_pURLED->Disable();
+ m_pFilePickerBtn->Disable();
+ m_pLinkInstanceCB->Disable();
+ }
+ OUString GetName() const { return m_pNameED->GetText(); }
+ void SetName( const OUString& _rName ) { m_pNameED->SetText( _rName );}
+ OUString GetURL() const { return m_pURLED->GetText(); }
+ void SetURL( const OUString& _rURL ) { m_pURLED->SetText( _rURL );}
+ bool IsLinkInstance() const { return ( m_pLinkInstanceCB->IsChecked() != sal_False ); }
+ void SetLinkInstance( bool _bLink ) { m_pLinkInstanceCB->Check( _bLink != false ); }
+ };
//========================================================================
class LinkedInstanceWarningBox : public MessBox
diff --git a/svx/uiconfig/ui/addinstancedialog.ui b/svx/uiconfig/ui/addinstancedialog.ui
new file mode 100644
index 0000000..d584a2d
--- /dev/null
+++ b/svx/uiconfig/ui/addinstancedialog.ui
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkDialog" id="AddInstanceDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Add Instance</property>
+ <property name="type_hint">dialog</property>
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list