actualizacion automatica 2024-08-05
This commit is contained in:
commit
33c2ee3f9e
494 changed files with 5058 additions and 3440 deletions
|
@ -138,6 +138,7 @@ gbuild_TARGETS := AllLangHelp \
|
|||
CustomTarget \
|
||||
Dictionary \
|
||||
DotnetLibrary \
|
||||
DotnetTest \
|
||||
Executable \
|
||||
Extension \
|
||||
ExtensionPackage \
|
||||
|
|
|
@ -894,6 +894,11 @@ $(eval $(call gb_Helper_register_packages_for_install,ure,\
|
|||
instsetoo_native_setup_ure \
|
||||
$(call gb_CondExeUno,uno_sh) \
|
||||
ure_install \
|
||||
$(if $(ENABLE_DOTNET),\
|
||||
net_basetypes \
|
||||
net_uretypes \
|
||||
net_oootypes \
|
||||
) \
|
||||
$(if $(ENABLE_JAVA),\
|
||||
jvmfwk_jvmfwk3_ini \
|
||||
jvmfwk_javavendors \
|
||||
|
|
|
@ -685,7 +685,9 @@ void LibPage::InsertLib()
|
|||
if ( aExtension != aLibExtension && aExtension != aContExtension )
|
||||
xLibDlg->EnableReference(false);
|
||||
|
||||
weld::DialogController::runAsync(xLibDlg, [aContExtension, xDlgURLObj, aExtension, aLibExtension, xModURLObj, xLibDlg, xDlgLibContImport, xModLibContImport, this](sal_Int32 nResult)
|
||||
weld::DialogController::runAsync(xLibDlg, [aContExtension, xDlgURLObj=std::move(xDlgURLObj), aExtension,
|
||||
aLibExtension, xModURLObj, xLibDlg,
|
||||
xDlgLibContImport, xModLibContImport, this](sal_Int32 nResult)
|
||||
{
|
||||
if (!nResult )
|
||||
return;
|
||||
|
|
|
@ -790,23 +790,8 @@ namespace basegfx
|
|||
{
|
||||
B2DCubicBezier aRetval;
|
||||
|
||||
if(fTools::more(fStart, 1.0))
|
||||
{
|
||||
fStart = 1.0;
|
||||
}
|
||||
else if(fTools::less(fStart, 0.0))
|
||||
{
|
||||
fStart = 0.0;
|
||||
}
|
||||
|
||||
if(fTools::more(fEnd, 1.0))
|
||||
{
|
||||
fEnd = 1.0;
|
||||
}
|
||||
else if(fTools::less(fEnd, 0.0))
|
||||
{
|
||||
fEnd = 0.0;
|
||||
}
|
||||
fStart = std::clamp(fStart, 0.0, 1.0);
|
||||
fEnd = std::clamp(fEnd, 0.0, 1.0);
|
||||
|
||||
if(fEnd <= fStart)
|
||||
{
|
||||
|
|
|
@ -105,9 +105,7 @@ namespace basegfx
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
const bool bNegative(fTools::less(v, 0.0));
|
||||
|
||||
if(bNegative)
|
||||
if(v < 0.0)
|
||||
{
|
||||
if(fTools::moreOrEqual(v, -fRange))
|
||||
{
|
||||
|
|
|
@ -540,7 +540,7 @@ namespace basegfx::utils
|
|||
fLength = getLength(rCandidate);
|
||||
}
|
||||
|
||||
if(fTools::less(fDistance, 0.0))
|
||||
if (fDistance < 0.0)
|
||||
{
|
||||
// handle fDistance < 0.0
|
||||
if(rCandidate.isClosed())
|
||||
|
@ -681,7 +681,7 @@ namespace basegfx::utils
|
|||
}
|
||||
|
||||
// test and correct fFrom
|
||||
if(fTools::less(fFrom, 0.0))
|
||||
if (fFrom < 0.0)
|
||||
{
|
||||
fFrom = 0.0;
|
||||
}
|
||||
|
@ -1820,7 +1820,7 @@ namespace basegfx::utils
|
|||
|
||||
// truncate fStart, fEnd to a range of [0.0 .. 2PI[ where 2PI
|
||||
// falls back to 0.0 to ensure a unique definition
|
||||
if(fTools::less(fStart, 0.0))
|
||||
if(fStart < 0.0)
|
||||
{
|
||||
fStart = 0.0;
|
||||
}
|
||||
|
@ -1830,7 +1830,7 @@ namespace basegfx::utils
|
|||
fStart = 0.0;
|
||||
}
|
||||
|
||||
if(fTools::less(fEnd, 0.0))
|
||||
if(fEnd < 0.0)
|
||||
{
|
||||
fEnd = 0.0;
|
||||
}
|
||||
|
|
|
@ -42,8 +42,13 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
explicit ImplB2DPolyPolygon(ImplB2DPolyPolygon&& rSource) noexcept
|
||||
: maPolygons(std::move(rSource.maPolygons))
|
||||
{
|
||||
}
|
||||
|
||||
explicit ImplB2DPolyPolygon(const ImplB2DPolyPolygon& rSource)
|
||||
: maPolygons(rSource.maPolygons)
|
||||
: maPolygons(rSource.maPolygons)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -701,7 +701,7 @@ namespace basegfx::utils
|
|||
}
|
||||
}
|
||||
|
||||
if(fTools::more(fParamTestOnCurr, 0.0) && fTools::less(fParamTestOnCurr, 1.0))
|
||||
if(fParamTestOnCurr > 0.0 && fTools::less(fParamTestOnCurr, 1.0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -560,7 +560,7 @@ void BColorStops::removeSpaceAtStart(double fOffset)
|
|||
}
|
||||
}
|
||||
|
||||
*this = aNewStops;
|
||||
*this = std::move(aNewStops);
|
||||
}
|
||||
|
||||
// try to detect if an empty/no-color-change area exists
|
||||
|
@ -730,7 +730,7 @@ void BColorStops::doApplySteps(sal_uInt16 nStepCount)
|
|||
}
|
||||
|
||||
// apply the change to color stops
|
||||
*this = aNewColorStops;
|
||||
*this = std::move(aNewColorStops);
|
||||
}
|
||||
|
||||
void BColorStops::tryToApplyBColorModifierStack(const BColorModifierStack& rBColorModifierStack)
|
||||
|
|
59
basic/qa/basic_coverage/test_If.bas
Normal file
59
basic/qa/basic_coverage/test_If.bas
Normal file
|
@ -0,0 +1,59 @@
|
|||
Option Explicit
|
||||
|
||||
Function doUnitTest() As String
|
||||
TestUtil.TestInit
|
||||
|
||||
TestUtil.AssertEqual(verify_ElseIf, "OK", "verify_ElseIf", "result")
|
||||
TestUtil.AssertEqual(verify_nested_Ifs, "OK", "verify_nested_Ifs", "result")
|
||||
TestUtil.AssertEqual(verify_oneline, "OK", "verify_oneline", "result")
|
||||
|
||||
doUnitTest = TestUtil.GetResult()
|
||||
End Function
|
||||
|
||||
Sub Main : MsgBox doUnitTest : End Sub
|
||||
|
||||
Function verify_ElseIf As String
|
||||
On Error GoTo catch
|
||||
|
||||
If False Then
|
||||
verify_ElseIf = "Fail"
|
||||
ElseIf False Then
|
||||
verify_ElseIf = "Fail"
|
||||
ElseIf False Then
|
||||
verify_ElseIf = "Fail"
|
||||
ElseIf False Then verify_ElseIf = "Fail"
|
||||
Else
|
||||
verify_ElseIf = "OK"
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
catch:
|
||||
TestUtil.ReportErrorHandler("verify_ElseIf", Err, Error$, Erl)
|
||||
End Function
|
||||
|
||||
Function verify_oneline As String
|
||||
If False Then verify_oneline = "Fail" Else verify_oneline = "OK"
|
||||
End Function
|
||||
|
||||
Function verify_nested_Ifs
|
||||
'
|
||||
On Error GoTo catch
|
||||
|
||||
If False Then
|
||||
verify_nested_Ifs = "Fail"
|
||||
ElseIf True Then
|
||||
If True Then
|
||||
verify_nested_Ifs = "OK"
|
||||
End If
|
||||
ElseIf False Then
|
||||
verify_nested_Ifs = "Fail"
|
||||
ElseIf False Then verify_nested_Ifs = "Fail"
|
||||
Else
|
||||
verify_nested_Ifs = "Fail"
|
||||
EndIf
|
||||
Exit Function
|
||||
|
||||
catch:
|
||||
TestUtil.ReportErrorHandler("verify_nested_Ifs", Err, Error$, Erl)
|
||||
|
||||
End Function
|
|
@ -146,7 +146,7 @@ void CodeCompleteDataCache::InsertLocalVar( const OUString& sProcName, const OUS
|
|||
{
|
||||
CodeCompleteVarTypes aTypes = aVarScopes[ sProcName ];
|
||||
aTypes.emplace( sVarName, sVarType );
|
||||
aVarScopes[ sProcName ] = aTypes;
|
||||
aVarScopes[ sProcName ] = std::move(aTypes);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -226,11 +226,11 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
|
|||
StarBASICRef xLibSearchBasic;
|
||||
if( aLocation == "application" )
|
||||
{
|
||||
xLibSearchBasic = xAppStandardBasic;
|
||||
xLibSearchBasic = std::move(xAppStandardBasic);
|
||||
}
|
||||
else if( aLocation == "document" )
|
||||
{
|
||||
xLibSearchBasic = xDocStandardBasic;
|
||||
xLibSearchBasic = std::move(xDocStandardBasic);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -28,112 +28,12 @@ typedef void( *RtlCall ) ( StarBASIC* p, SbxArray& rArgs, bool bWrite );
|
|||
extern void SbRtl_Date(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_Err(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_Erl(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_False(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_Empty(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_Nothing(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_Null(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_True(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_ATTR_NORMAL(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_ATTR_READONLY(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_ATTR_HIDDEN(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_ATTR_SYSTEM(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_ATTR_VOLUME(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_ATTR_DIRECTORY(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_ATTR_ARCHIVE(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_V_EMPTY(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_V_NULL(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_V_INTEGER(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_V_LONG(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_V_SINGLE(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_V_DOUBLE(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_V_CURRENCY(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_V_DATE(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_V_STRING(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_MB_OK(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_OKCANCEL(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_ABORTRETRYIGNORE(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_YESNOCANCEL(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_YESNO(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_RETRYCANCEL(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_ICONSTOP(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_ICONQUESTION(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_ICONEXCLAMATION(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_ICONINFORMATION(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_DEFBUTTON1(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_DEFBUTTON2(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_DEFBUTTON3(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_APPLMODAL(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_MB_SYSTEMMODAL(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_IDOK(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_IDCANCEL(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_IDABORT(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_IDRETRY(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_IDIGNORE(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_IDYES(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_IDNO(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_CF_TEXT(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_CF_BITMAP(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_CF_METAFILEPICT(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_PI(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_SET_OFF(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_SET_ON(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TOGGLE(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_TYP_AUTHORFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_CHAPTERFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_CONDTXTFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_DATEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_DBFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_DBNAMEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_DBNEXTSETFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_DBNUMSETFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_DBSETNUMBERFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_DDEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_DOCINFOFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_DOCSTATFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_EXTUSERFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_FILENAMEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_FIXDATEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_FIXTIMEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_FORMELFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_GETFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_GETREFFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_HIDDENPARAFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_HIDDENTXTFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_INPUTFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_MACROFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_NEXTPAGEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_PAGENUMBERFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_POSTITFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_PREVPAGEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_SEQFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_SETFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_SETINPFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_SETREFFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_TEMPLNAMEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_TIMEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_USERFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_USRINPFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_SETREFPAGEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_GETREFPAGEFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_INTERNETFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_TYP_JUMPEDITFLD(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_FRAMEANCHORPAGE(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_FRAMEANCHORPARA(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_FRAMEANCHORCHAR(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
extern void SbRtl_CLEAR_ALLTABS(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_CLEAR_TAB(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
extern void SbRtl_SET_TAB(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
||||
// Methods
|
||||
|
||||
extern void SbRtl_CreateObject(StarBASIC * pBasic, SbxArray & rPar, bool bWrite);
|
||||
|
|
|
@ -89,16 +89,92 @@ struct SbiForStack { // for/next stack:
|
|||
|
||||
#define MAXRECURSION 500 //to prevent dead-recursions
|
||||
|
||||
enum class SbAttributes {
|
||||
NONE = 0x0000,
|
||||
READONLY = 0x0001,
|
||||
HIDDEN = 0x0002,
|
||||
DIRECTORY = 0x0010
|
||||
};
|
||||
|
||||
namespace o3tl
|
||||
// Related to: Dir, GetAttr, SetAttr
|
||||
namespace SbAttributes
|
||||
{
|
||||
template<> struct typed_flags<SbAttributes> : is_typed_flags<SbAttributes, 0x13> {};
|
||||
constexpr sal_Int16 NORMAL = 0x0000;
|
||||
constexpr sal_Int16 READONLY = 0x0001;
|
||||
constexpr sal_Int16 HIDDEN = 0x0002;
|
||||
constexpr sal_Int16 SYSTEM = 0x0004;
|
||||
constexpr sal_Int16 VOLUME = 0x0008;
|
||||
constexpr sal_Int16 DIRECTORY = 0x0010;
|
||||
constexpr sal_Int16 ARCHIVE = 0x0020;
|
||||
}
|
||||
|
||||
// Related to: MsgBox (Buttons argument)
|
||||
namespace SbMB
|
||||
{
|
||||
constexpr sal_Int16 OK = 0;
|
||||
constexpr sal_Int16 OKCANCEL = 1;
|
||||
constexpr sal_Int16 ABORTRETRYIGNORE = 2;
|
||||
constexpr sal_Int16 YESNOCANCEL = 3;
|
||||
constexpr sal_Int16 YESNO = 4;
|
||||
constexpr sal_Int16 RETRYCANCEL = 5;
|
||||
constexpr sal_Int16 ICONSTOP = 16;
|
||||
constexpr sal_Int16 ICONQUESTION = 32;
|
||||
constexpr sal_Int16 ICONEXCLAMATION = 48;
|
||||
constexpr sal_Int16 ICONINFORMATION = 64;
|
||||
constexpr sal_Int16 DEFBUTTON1 = 0;
|
||||
constexpr sal_Int16 DEFBUTTON2 = 256;
|
||||
constexpr sal_Int16 DEFBUTTON3 = 512;
|
||||
constexpr sal_Int16 APPLMODAL = 0;
|
||||
constexpr sal_Int16 SYSTEMMODAL = 4096;
|
||||
|
||||
// Related to: MsgBox (return value)
|
||||
namespace Response
|
||||
{
|
||||
constexpr sal_Int16 OK = 1;
|
||||
constexpr sal_Int16 CANCEL = 2;
|
||||
constexpr sal_Int16 ABORT = 3;
|
||||
constexpr sal_Int16 RETRY = 4;
|
||||
constexpr sal_Int16 IGNORE = 5;
|
||||
constexpr sal_Int16 YES = 6;
|
||||
constexpr sal_Int16 NO = 7;
|
||||
}
|
||||
}
|
||||
|
||||
// Related to: SwFieldTypesEnum in sw/inc/fldbas.hxx
|
||||
namespace SbTYP
|
||||
{
|
||||
constexpr sal_Int16 DATE = 0;
|
||||
constexpr sal_Int16 TIME = 1;
|
||||
constexpr sal_Int16 FILENAME = 2;
|
||||
constexpr sal_Int16 DATABASENAME = 3;
|
||||
constexpr sal_Int16 CHAPTER = 4;
|
||||
constexpr sal_Int16 PAGENUMBER = 5;
|
||||
constexpr sal_Int16 DOCUMENTSTATISTICS = 6;
|
||||
constexpr sal_Int16 AUTHOR = 7;
|
||||
constexpr sal_Int16 SET = 8;
|
||||
constexpr sal_Int16 GET = 9;
|
||||
constexpr sal_Int16 FORMEL = 10;
|
||||
constexpr sal_Int16 HIDDENTEXT = 11;
|
||||
constexpr sal_Int16 SETREF = 12;
|
||||
constexpr sal_Int16 GETREF = 13;
|
||||
constexpr sal_Int16 DDE = 14;
|
||||
constexpr sal_Int16 MACRO = 15;
|
||||
constexpr sal_Int16 INPUT = 16;
|
||||
constexpr sal_Int16 HIDDENPARAGRAPH = 17;
|
||||
constexpr sal_Int16 DOCUMENTINFO = 18;
|
||||
constexpr sal_Int16 DATABASE = 19;
|
||||
constexpr sal_Int16 USER = 20;
|
||||
constexpr sal_Int16 POSTIT = 21;
|
||||
constexpr sal_Int16 TEMPLATENAME = 22;
|
||||
constexpr sal_Int16 SEQUENCE = 23;
|
||||
constexpr sal_Int16 DATABASENEXTSET = 24;
|
||||
constexpr sal_Int16 DATABASENUMBERSET = 25;
|
||||
constexpr sal_Int16 DATABASESETNUMBER = 26;
|
||||
constexpr sal_Int16 CONDITIONALTEXT = 27;
|
||||
constexpr sal_Int16 NEXTPAGE = 28;
|
||||
constexpr sal_Int16 PREVIOUSPAGE = 29;
|
||||
constexpr sal_Int16 EXTENDEDUSER = 30;
|
||||
constexpr sal_Int16 FIXEDDATE = 31;
|
||||
constexpr sal_Int16 FIXEDTIME = 32;
|
||||
constexpr sal_Int16 SETINPUT = 33;
|
||||
constexpr sal_Int16 USERINPUT = 34;
|
||||
constexpr sal_Int16 SETREFPAGE = 35;
|
||||
constexpr sal_Int16 GETREFPAGE = 36;
|
||||
constexpr sal_Int16 INTERNET = 37;
|
||||
constexpr sal_Int16 JUMPEDIT = 38;
|
||||
}
|
||||
|
||||
class SbiRTLData
|
||||
|
@ -106,7 +182,7 @@ class SbiRTLData
|
|||
public:
|
||||
|
||||
std::unique_ptr<osl::Directory> pDir;
|
||||
SbAttributes nDirFlags;
|
||||
sal_Int16 nDirFlags;
|
||||
short nCurDirPos;
|
||||
|
||||
OUString sFullNameToBeChecked;
|
||||
|
|
|
@ -30,8 +30,6 @@ class SbiStdObject final : public SbxObject
|
|||
std::optional<SbStdFactory> pStdFactory;
|
||||
|
||||
virtual ~SbiStdObject() override;
|
||||
using SbxVariable::GetInfo;
|
||||
static SbxInfo* GetInfo(short);
|
||||
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
|
||||
|
||||
public:
|
||||
|
|
|
@ -2541,15 +2541,14 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
|
|||
rPar.Get(0)->PutString(u""_ustr);
|
||||
}
|
||||
|
||||
SbAttributes nFlags = SbAttributes::NONE;
|
||||
sal_Int16 nFlags = SbAttributes::NORMAL;
|
||||
if ( nParCount > 2 )
|
||||
{
|
||||
rRTLData.nDirFlags = nFlags
|
||||
= static_cast<SbAttributes>(rPar.Get(2)->GetInteger());
|
||||
rRTLData.nDirFlags = nFlags = rPar.Get(2)->GetInteger();
|
||||
}
|
||||
else
|
||||
{
|
||||
rRTLData.nDirFlags = SbAttributes::NONE;
|
||||
rRTLData.nDirFlags = SbAttributes::NORMAL;
|
||||
}
|
||||
// Read directory
|
||||
bool bIncludeFolders = bool(nFlags & SbAttributes::DIRECTORY);
|
||||
|
@ -2657,15 +2656,14 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
|
|||
|
||||
OUString aDirURL = implSetupWildcard(aFileParam, rRTLData);
|
||||
|
||||
SbAttributes nFlags = SbAttributes::NONE;
|
||||
sal_Int16 nFlags = SbAttributes::NORMAL;
|
||||
if ( nParCount > 2 )
|
||||
{
|
||||
rRTLData.nDirFlags = nFlags
|
||||
= static_cast<SbAttributes>(rPar.Get(2)->GetInteger());
|
||||
rRTLData.nDirFlags = nFlags = rPar.Get(2)->GetInteger();
|
||||
}
|
||||
else
|
||||
{
|
||||
rRTLData.nDirFlags = SbAttributes::NONE;
|
||||
rRTLData.nDirFlags = SbAttributes::NORMAL;
|
||||
}
|
||||
|
||||
// Read directory
|
||||
|
@ -2766,7 +2764,7 @@ void SbRtl_GetAttr(StarBASIC *, SbxArray & rPar, bool)
|
|||
{
|
||||
if (rPar.Count() == 2)
|
||||
{
|
||||
sal_Int16 nFlags = 0;
|
||||
sal_Int16 nFlags = SbAttributes::NORMAL;
|
||||
|
||||
// In Windows, we want to use Windows API to get the file attributes
|
||||
// for VBA interoperability.
|
||||
|
@ -2816,15 +2814,15 @@ void SbRtl_GetAttr(StarBASIC *, SbxArray & rPar, bool)
|
|||
bool bDirectory = xSFI->isFolder( aPath );
|
||||
if( bReadOnly )
|
||||
{
|
||||
nFlags |= sal_uInt16(SbAttributes::READONLY);
|
||||
nFlags |= SbAttributes::READONLY;
|
||||
}
|
||||
if( bHidden )
|
||||
{
|
||||
nFlags |= sal_uInt16(SbAttributes::HIDDEN);
|
||||
nFlags |= SbAttributes::HIDDEN;
|
||||
}
|
||||
if( bDirectory )
|
||||
{
|
||||
nFlags |= sal_uInt16(SbAttributes::DIRECTORY);
|
||||
nFlags |= SbAttributes::DIRECTORY;
|
||||
}
|
||||
}
|
||||
catch(const Exception & )
|
||||
|
@ -2846,11 +2844,11 @@ void SbRtl_GetAttr(StarBASIC *, SbxArray & rPar, bool)
|
|||
bool bDirectory = isFolder( aType );
|
||||
if( bReadOnly )
|
||||
{
|
||||
nFlags |= sal_uInt16(SbAttributes::READONLY);
|
||||
nFlags |= SbAttributes::READONLY;
|
||||
}
|
||||
if( bDirectory )
|
||||
{
|
||||
nFlags |= sal_uInt16(SbAttributes::DIRECTORY);
|
||||
nFlags |= SbAttributes::DIRECTORY;
|
||||
}
|
||||
}
|
||||
rPar.Get(0)->PutInteger(nFlags);
|
||||
|
@ -4227,28 +4225,13 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
|
|||
}
|
||||
|
||||
// tdf#151012 - initialize optional parameters with their default values (number of buttons)
|
||||
WinBits nType = static_cast<WinBits>(GetOptionalIntegerParamOrDefault(rPar, 2, 0)); // MB_OK
|
||||
WinBits nStyle = nType;
|
||||
nStyle &= 15; // delete bits 4-16
|
||||
if (nStyle > 5)
|
||||
nStyle = 0;
|
||||
|
||||
enum BasicResponse
|
||||
{
|
||||
Ok = 1,
|
||||
Cancel = 2,
|
||||
Abort = 3,
|
||||
Retry = 4,
|
||||
Ignore = 5,
|
||||
Yes = 6,
|
||||
No = 7
|
||||
};
|
||||
sal_Int16 nType = GetOptionalIntegerParamOrDefault(rPar, 2, SbMB::OK);
|
||||
|
||||
OUString aMsg = rPar.Get(1)->GetOUString();
|
||||
// tdf#151012 - initialize optional parameters with their default values (title of dialog box)
|
||||
OUString aTitle = GetOptionalOUStringParamOrDefault(rPar, 3, Application::GetDisplayName());
|
||||
|
||||
WinBits nDialogType = nType & (16+32+64);
|
||||
sal_Int16 nDialogType = nType & (SbMB::ICONSTOP | SbMB::ICONQUESTION | SbMB::ICONINFORMATION);
|
||||
|
||||
SolarMutexGuard aSolarGuard;
|
||||
weld::Widget* pParent = Application::GetDefDialogParent();
|
||||
|
@ -4257,16 +4240,16 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
|
|||
|
||||
switch (nDialogType)
|
||||
{
|
||||
case 16:
|
||||
case SbMB::ICONSTOP:
|
||||
eType = VclMessageType::Error;
|
||||
break;
|
||||
case 32:
|
||||
case SbMB::ICONQUESTION:
|
||||
eType = VclMessageType::Question;
|
||||
break;
|
||||
case 48:
|
||||
case SbMB::ICONEXCLAMATION:
|
||||
eType = VclMessageType::Warning;
|
||||
break;
|
||||
case 64:
|
||||
case SbMB::ICONINFORMATION:
|
||||
eType = VclMessageType::Info;
|
||||
break;
|
||||
}
|
||||
|
@ -4274,68 +4257,47 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
|
|||
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
|
||||
eType, VclButtonsType::NONE, aMsg, GetpApp()));
|
||||
|
||||
switch (nStyle)
|
||||
std::vector<std::pair<StandardButtonType, sal_Int16>> buttons;
|
||||
switch (nType & 0x0F) // delete bits 4-16
|
||||
{
|
||||
case 0: // MB_OK
|
||||
case SbMB::OK:
|
||||
default:
|
||||
xBox->add_button(GetStandardText(StandardButtonType::OK), BasicResponse::Ok);
|
||||
buttons.emplace_back(StandardButtonType::OK, SbMB::Response::OK);
|
||||
break;
|
||||
case 1: // MB_OKCANCEL
|
||||
xBox->add_button(GetStandardText(StandardButtonType::OK), BasicResponse::Ok);
|
||||
xBox->add_button(GetStandardText(StandardButtonType::Cancel), BasicResponse::Cancel);
|
||||
|
||||
if (nType & 256 || nType & 512)
|
||||
xBox->set_default_response(BasicResponse::Cancel);
|
||||
else
|
||||
xBox->set_default_response(BasicResponse::Ok);
|
||||
|
||||
case SbMB::OKCANCEL:
|
||||
buttons.emplace_back(StandardButtonType::OK, SbMB::Response::OK);
|
||||
buttons.emplace_back(StandardButtonType::Cancel, SbMB::Response::CANCEL);
|
||||
break;
|
||||
case 2: // MB_ABORTRETRYIGNORE
|
||||
xBox->add_button(GetStandardText(StandardButtonType::Abort), BasicResponse::Abort);
|
||||
xBox->add_button(GetStandardText(StandardButtonType::Retry), BasicResponse::Retry);
|
||||
xBox->add_button(GetStandardText(StandardButtonType::Ignore), BasicResponse::Ignore);
|
||||
|
||||
if (nType & 256)
|
||||
xBox->set_default_response(BasicResponse::Retry);
|
||||
else if (nType & 512)
|
||||
xBox->set_default_response(BasicResponse::Ignore);
|
||||
else
|
||||
xBox->set_default_response(BasicResponse::Cancel);
|
||||
|
||||
case SbMB::ABORTRETRYIGNORE:
|
||||
buttons.emplace_back(StandardButtonType::Abort, SbMB::Response::ABORT);
|
||||
buttons.emplace_back(StandardButtonType::Retry, SbMB::Response::RETRY);
|
||||
buttons.emplace_back(StandardButtonType::Ignore, SbMB::Response::IGNORE);
|
||||
break;
|
||||
case 3: // MB_YESNOCANCEL
|
||||
xBox->add_button(GetStandardText(StandardButtonType::Yes), BasicResponse::Yes);
|
||||
xBox->add_button(GetStandardText(StandardButtonType::No), BasicResponse::No);
|
||||
xBox->add_button(GetStandardText(StandardButtonType::Cancel), BasicResponse::Cancel);
|
||||
|
||||
if (nType & 256 || nType & 512)
|
||||
xBox->set_default_response(BasicResponse::Cancel);
|
||||
else
|
||||
xBox->set_default_response(BasicResponse::Yes);
|
||||
|
||||
case SbMB::YESNOCANCEL:
|
||||
buttons.emplace_back(StandardButtonType::Yes, SbMB::Response::YES);
|
||||
buttons.emplace_back(StandardButtonType::No, SbMB::Response::NO);
|
||||
buttons.emplace_back(StandardButtonType::Cancel, SbMB::Response::CANCEL);
|
||||
break;
|
||||
case 4: // MB_YESNO
|
||||
xBox->add_button(GetStandardText(StandardButtonType::Yes), BasicResponse::Yes);
|
||||
xBox->add_button(GetStandardText(StandardButtonType::No), BasicResponse::No);
|
||||
|
||||
if (nType & 256 || nType & 512)
|
||||
xBox->set_default_response(BasicResponse::No);
|
||||
else
|
||||
xBox->set_default_response(BasicResponse::Yes);
|
||||
|
||||
case SbMB::YESNO:
|
||||
buttons.emplace_back(StandardButtonType::Yes, SbMB::Response::YES);
|
||||
buttons.emplace_back(StandardButtonType::No, SbMB::Response::NO);
|
||||
break;
|
||||
case 5: // MB_RETRYCANCEL
|
||||
xBox->add_button(GetStandardText(StandardButtonType::Retry), BasicResponse::Retry);
|
||||
xBox->add_button(GetStandardText(StandardButtonType::Cancel), BasicResponse::Cancel);
|
||||
|
||||
if (nType & 256 || nType & 512)
|
||||
xBox->set_default_response(BasicResponse::Cancel);
|
||||
else
|
||||
xBox->set_default_response(BasicResponse::Retry);
|
||||
|
||||
case SbMB::RETRYCANCEL:
|
||||
buttons.emplace_back(StandardButtonType::Retry, SbMB::Response::RETRY);
|
||||
buttons.emplace_back(StandardButtonType::Cancel, SbMB::Response::CANCEL);
|
||||
break;
|
||||
}
|
||||
|
||||
for (auto [buttonType, buttonResponse] : buttons)
|
||||
xBox->add_button(GetStandardText(buttonType), buttonResponse);
|
||||
|
||||
std::size_t default_button = 0;
|
||||
if (nType & SbMB::DEFBUTTON2)
|
||||
default_button = 1;
|
||||
else if (nType & SbMB::DEFBUTTON3)
|
||||
default_button = 2;
|
||||
xBox->set_default_response(buttons[std::min(default_button, buttons.size() - 1)].second);
|
||||
|
||||
xBox->set_title(aTitle);
|
||||
sal_Int16 nRet = xBox->run();
|
||||
rPar.Get(0)->PutInteger(nRet);
|
||||
|
@ -4347,7 +4309,7 @@ void SbRtl_SetAttr(StarBASIC *, SbxArray & rPar, bool)
|
|||
if (rPar.Count() == 3)
|
||||
{
|
||||
OUString aStr = rPar.Get(1)->GetOUString();
|
||||
SbAttributes nFlags = static_cast<SbAttributes>(rPar.Get(2)->GetInteger());
|
||||
sal_Int16 nFlags = rPar.Get(2)->GetInteger();
|
||||
|
||||
if( hasUno() )
|
||||
{
|
||||
|
@ -4358,7 +4320,7 @@ void SbRtl_SetAttr(StarBASIC *, SbxArray & rPar, bool)
|
|||
{
|
||||
bool bReadOnly = bool(nFlags & SbAttributes::READONLY);
|
||||
xSFI->setReadOnly( aStr, bReadOnly );
|
||||
bool bHidden = bool(nFlags & SbAttributes::HIDDEN);
|
||||
bool bHidden = bool(nFlags & SbAttributes::HIDDEN);
|
||||
xSFI->setHidden( aStr, bHidden );
|
||||
}
|
||||
catch(const Exception & )
|
||||
|
|
|
@ -48,8 +48,6 @@ void SbRtl_Err(StarBASIC *, SbxArray & rPar, bool bWrite)
|
|||
}
|
||||
}
|
||||
|
||||
void SbRtl_False(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutBool(false); }
|
||||
|
||||
void SbRtl_Empty(StarBASIC *, SbxArray &, bool) {}
|
||||
|
||||
void SbRtl_Nothing(StarBASIC *, SbxArray & rPar, bool)
|
||||
|
@ -66,106 +64,4 @@ void SbRtl_Null(StarBASIC *, SbxArray & rPar, bool)
|
|||
|
||||
void SbRtl_PI(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutDouble(M_PI); }
|
||||
|
||||
void SbRtl_True(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutBool(true); }
|
||||
|
||||
void SbRtl_ATTR_NORMAL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
|
||||
void SbRtl_ATTR_READONLY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
|
||||
void SbRtl_ATTR_HIDDEN(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
|
||||
void SbRtl_ATTR_SYSTEM(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
|
||||
void SbRtl_ATTR_VOLUME(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(8); }
|
||||
void SbRtl_ATTR_DIRECTORY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(16); }
|
||||
void SbRtl_ATTR_ARCHIVE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(32); }
|
||||
|
||||
void SbRtl_V_EMPTY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
|
||||
void SbRtl_V_NULL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
|
||||
void SbRtl_V_INTEGER(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
|
||||
void SbRtl_V_LONG(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
|
||||
void SbRtl_V_SINGLE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
|
||||
void SbRtl_V_DOUBLE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(5); }
|
||||
void SbRtl_V_CURRENCY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(6); }
|
||||
void SbRtl_V_DATE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(7); }
|
||||
void SbRtl_V_STRING(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(8); }
|
||||
|
||||
void SbRtl_MB_OK(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
|
||||
void SbRtl_MB_OKCANCEL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
|
||||
void SbRtl_MB_ABORTRETRYIGNORE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
|
||||
void SbRtl_MB_YESNOCANCEL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
|
||||
void SbRtl_MB_YESNO(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
|
||||
void SbRtl_MB_RETRYCANCEL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(5); }
|
||||
void SbRtl_MB_ICONSTOP(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(16); }
|
||||
void SbRtl_MB_ICONQUESTION(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(32); }
|
||||
void SbRtl_MB_ICONEXCLAMATION(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(48); }
|
||||
void SbRtl_MB_ICONINFORMATION(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(64); }
|
||||
void SbRtl_MB_DEFBUTTON1(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
|
||||
void SbRtl_MB_DEFBUTTON2(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(256); }
|
||||
void SbRtl_MB_DEFBUTTON3(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(512); }
|
||||
void SbRtl_MB_APPLMODAL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
|
||||
void SbRtl_MB_SYSTEMMODAL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4096); }
|
||||
|
||||
void SbRtl_IDOK(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
|
||||
void SbRtl_IDCANCEL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
|
||||
void SbRtl_IDABORT(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
|
||||
void SbRtl_IDRETRY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
|
||||
void SbRtl_IDIGNORE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(5); }
|
||||
void SbRtl_IDYES(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(6); }
|
||||
void SbRtl_IDNO(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(7); }
|
||||
|
||||
void SbRtl_CF_TEXT(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
|
||||
void SbRtl_CF_BITMAP(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
|
||||
void SbRtl_CF_METAFILEPICT(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
|
||||
|
||||
void SbRtl_TYP_AUTHORFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(7); }
|
||||
void SbRtl_TYP_CHAPTERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
|
||||
void SbRtl_TYP_CONDTXTFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(27); }
|
||||
void SbRtl_TYP_DATEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
|
||||
void SbRtl_TYP_DBFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(19); }
|
||||
void SbRtl_TYP_DBNAMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
|
||||
void SbRtl_TYP_DBNEXTSETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(24); }
|
||||
void SbRtl_TYP_DBNUMSETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(25); }
|
||||
void SbRtl_TYP_DBSETNUMBERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(26); }
|
||||
void SbRtl_TYP_DDEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(14); }
|
||||
void SbRtl_TYP_DOCINFOFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(18); }
|
||||
void SbRtl_TYP_DOCSTATFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(6); }
|
||||
void SbRtl_TYP_EXTUSERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(30); }
|
||||
void SbRtl_TYP_FILENAMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
|
||||
void SbRtl_TYP_FIXDATEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(31); }
|
||||
void SbRtl_TYP_FIXTIMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(32); }
|
||||
void SbRtl_TYP_FORMELFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(10); }
|
||||
void SbRtl_TYP_GETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(9); }
|
||||
void SbRtl_TYP_GETREFFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(13); }
|
||||
void SbRtl_TYP_HIDDENPARAFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(17); }
|
||||
void SbRtl_TYP_HIDDENTXTFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(11); }
|
||||
void SbRtl_TYP_INPUTFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(16); }
|
||||
void SbRtl_TYP_MACROFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(15); }
|
||||
void SbRtl_TYP_NEXTPAGEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(28); }
|
||||
void SbRtl_TYP_PAGENUMBERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(5); }
|
||||
void SbRtl_TYP_POSTITFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(21); }
|
||||
void SbRtl_TYP_PREVPAGEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(29); }
|
||||
void SbRtl_TYP_SEQFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(23); }
|
||||
void SbRtl_TYP_SETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(8); }
|
||||
void SbRtl_TYP_SETINPFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(33); }
|
||||
void SbRtl_TYP_SETREFFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(12); }
|
||||
void SbRtl_TYP_TEMPLNAMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(22); }
|
||||
void SbRtl_TYP_TIMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
|
||||
void SbRtl_TYP_USERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(20); }
|
||||
void SbRtl_TYP_USRINPFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(34); }
|
||||
void SbRtl_TYP_SETREFPAGEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(35); }
|
||||
void SbRtl_TYP_GETREFPAGEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(36); }
|
||||
void SbRtl_TYP_INTERNETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(37); }
|
||||
|
||||
void SbRtl_SET_ON(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
|
||||
void SbRtl_SET_OFF(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
|
||||
void SbRtl_TOGGLE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
|
||||
|
||||
void SbRtl_FRAMEANCHORPAGE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
|
||||
void SbRtl_FRAMEANCHORPARA(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(14); }
|
||||
void SbRtl_FRAMEANCHORCHAR(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(15); }
|
||||
|
||||
void SbRtl_CLEAR_ALLTABS(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
|
||||
void SbRtl_CLEAR_TAB(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
|
||||
void SbRtl_SET_TAB(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
|
||||
|
||||
void SbRtl_TYP_JUMPEDITFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(38); }
|
||||
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -280,7 +280,7 @@ const SbiRuntime::pStep2 SbiRuntime::aStep2[] = {// all opcodes with two operand
|
|||
// SbiRTLData
|
||||
|
||||
SbiRTLData::SbiRTLData()
|
||||
: nDirFlags(SbAttributes::NONE)
|
||||
: nDirFlags(SbAttributes::NORMAL)
|
||||
, nCurDirPos(0)
|
||||
{
|
||||
}
|
||||
|
@ -1816,7 +1816,7 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b
|
|||
|
||||
if( refObjVal.is() )
|
||||
{
|
||||
refVal = refObjVal;
|
||||
refVal = std::move(refObjVal);
|
||||
}
|
||||
else if( !(eValType & SbxARRAY) )
|
||||
{
|
||||
|
|
|
@ -35,25 +35,31 @@
|
|||
// allow us space for a flag to denylist some functions in vba mode
|
||||
|
||||
#define ARGSMASK_ 0x003F // 63 Arguments
|
||||
#define COMPTMASK_ 0x00C0 // COMPATIBILITY mask
|
||||
|
||||
#define COMPATONLY_ 0x0080 // procedure is visible in vba mode only
|
||||
#define NORMONLY_ 0x0040 // procedure is visible in normal mode only
|
||||
#define COMPTMASK_ (COMPATONLY_ | NORMONLY_) // COMPATIBILITY mask
|
||||
|
||||
#define RWMASK_ 0x0F00 // mask for R/W-bits
|
||||
#define TYPEMASK_ 0xF000 // mask for the entry's type
|
||||
|
||||
#define READ_ 0x0100 // parameter allows read
|
||||
#define WRITE_ 0x0200 // parameter allows write
|
||||
#define OPT_ 0x0400 // parameter is optional
|
||||
#define CONST_ 0x0800 // property is const
|
||||
#define METHOD_ 0x3000
|
||||
#define RWMASK_ (READ_ | WRITE_ | OPT_ | CONST_) // mask for R/W-bits
|
||||
|
||||
#define FUNC_TYPE_ 0x1000 // functional type
|
||||
#define SUB_TYPE_ 0x2000 // sub type
|
||||
#define METHOD_ (FUNC_TYPE_ | SUB_TYPE_)
|
||||
#define PROPERTY_ 0x4000
|
||||
#define OBJECT_ 0x8000
|
||||
#define TYPEMASK_ (METHOD_ | PROPERTY_ | OBJECT_) // mask for the entry's type
|
||||
|
||||
// combination of bits above:
|
||||
#define FUNCTION_ 0x1100
|
||||
#define LFUNCTION_ 0x1300 // mask for function which also works as Lvalue
|
||||
#define SUB_ 0x2100
|
||||
#define ROPROP_ 0x4100 // mask Read Only-Property
|
||||
#define RWPROP_ 0x4300 // mask Read/Write-Property
|
||||
#define CPROP_ 0x4900 // mask for constant
|
||||
#define FUNCTION_ (FUNC_TYPE_ | READ_)
|
||||
#define LFUNCTION_ (FUNC_TYPE_ | READ_ | WRITE_) // mask for function which also works as Lvalue (statement)
|
||||
#define SUB_ (SUB_TYPE_)
|
||||
#define ROPROP_ (PROPERTY_ | READ_) // mask Read Only-Property
|
||||
#define RWPROP_ (PROPERTY_ | READ_ | WRITE_) // mask Read/Write-Property
|
||||
#define CPROP_ (PROPERTY_ | READ_ | CONST_) // mask for constant
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -82,20 +88,9 @@ template <int N> constexpr bool MethodsTableValid(const Method (&rMethods)[N])
|
|||
{
|
||||
int nCurMethArgs = 0;
|
||||
int nArgsChecked = 0;
|
||||
bool bFinished = false;
|
||||
for (const auto& m : rMethods)
|
||||
{
|
||||
assert(!bFinished); // no entries after end-of-table entry
|
||||
if (bFinished)
|
||||
return false;
|
||||
if (m.nArgs == -1) // end-of-table entry
|
||||
{
|
||||
assert(nCurMethArgs == nArgsChecked); // last method had correct # of arguments
|
||||
if (nCurMethArgs != nArgsChecked)
|
||||
return false;
|
||||
bFinished = true;
|
||||
}
|
||||
else if (m.pFunc) // main (function/sub/etc) entry
|
||||
if (m.pFunc) // main (function/sub/etc) entry
|
||||
{
|
||||
assert(nCurMethArgs == nArgsChecked); // previous method had correct # of arguments
|
||||
if (nCurMethArgs != nArgsChecked)
|
||||
|
@ -106,11 +101,12 @@ template <int N> constexpr bool MethodsTableValid(const Method (&rMethods)[N])
|
|||
else // subordinate (argument) entry
|
||||
++nArgsChecked;
|
||||
}
|
||||
assert(bFinished); // its last entry was end-of-table entry
|
||||
return bFinished;
|
||||
assert(nCurMethArgs == nArgsChecked); // last method had correct # of arguments
|
||||
return nCurMethArgs == nArgsChecked;
|
||||
}
|
||||
|
||||
}
|
||||
template <bool N> void ConstBool(StarBASIC*, SbxArray& par, bool) { par.Get(0)->PutBool(N); }
|
||||
template <sal_Int16 N> void ConstInt(StarBASIC*, SbxArray& par, bool) { par.Get(0)->PutInteger(N); }
|
||||
|
||||
constexpr Method aMethods[] = {
|
||||
|
||||
|
@ -127,13 +123,14 @@ constexpr Method aMethods[] = {
|
|||
{ u"Atn", SbxDOUBLE, 1 | FUNCTION_, SbRtl_Atn },
|
||||
arg(u"number", SbxDOUBLE),
|
||||
|
||||
{ u"ATTR_ARCHIVE", SbxINTEGER, CPROP_, SbRtl_ATTR_ARCHIVE },
|
||||
{ u"ATTR_DIRECTORY", SbxINTEGER, CPROP_, SbRtl_ATTR_DIRECTORY },
|
||||
{ u"ATTR_HIDDEN", SbxINTEGER, CPROP_, SbRtl_ATTR_HIDDEN },
|
||||
{ u"ATTR_NORMAL", SbxINTEGER, CPROP_, SbRtl_ATTR_NORMAL },
|
||||
{ u"ATTR_READONLY", SbxINTEGER, CPROP_, SbRtl_ATTR_READONLY },
|
||||
{ u"ATTR_SYSTEM", SbxINTEGER, CPROP_, SbRtl_ATTR_SYSTEM },
|
||||
{ u"ATTR_VOLUME", SbxINTEGER, CPROP_, SbRtl_ATTR_VOLUME },
|
||||
// Related to: Dir, GetAttr, SetAttr
|
||||
{ u"ATTR_ARCHIVE", SbxINTEGER, CPROP_, ConstInt<SbAttributes::ARCHIVE> },
|
||||
{ u"ATTR_DIRECTORY", SbxINTEGER, CPROP_, ConstInt<SbAttributes::DIRECTORY> },
|
||||
{ u"ATTR_HIDDEN", SbxINTEGER, CPROP_, ConstInt<SbAttributes::HIDDEN> },
|
||||
{ u"ATTR_NORMAL", SbxINTEGER, CPROP_, ConstInt<SbAttributes::NORMAL> },
|
||||
{ u"ATTR_READONLY", SbxINTEGER, CPROP_, ConstInt<SbAttributes::READONLY> },
|
||||
{ u"ATTR_SYSTEM", SbxINTEGER, CPROP_, ConstInt<SbAttributes::SYSTEM> },
|
||||
{ u"ATTR_VOLUME", SbxINTEGER, CPROP_, ConstInt<SbAttributes::VOLUME> },
|
||||
|
||||
{ u"Beep", SbxNULL, FUNCTION_, SbRtl_Beep },
|
||||
{ u"Blue", SbxINTEGER, 1 | FUNCTION_ | NORMONLY_, SbRtl_Blue },
|
||||
|
@ -186,9 +183,11 @@ constexpr Method aMethods[] = {
|
|||
{ u"CDbl", SbxDOUBLE, 1 | FUNCTION_, SbRtl_CDbl },
|
||||
arg(u"expression", SbxVARIANT),
|
||||
|
||||
{ u"CF_BITMAP", SbxINTEGER, CPROP_, SbRtl_CF_BITMAP },
|
||||
{ u"CF_METAFILEPICT", SbxINTEGER, CPROP_, SbRtl_CF_METAFILEPICT },
|
||||
{ u"CF_TEXT", SbxINTEGER, CPROP_, SbRtl_CF_TEXT },
|
||||
// FIXME: CF_* are for what??? They duplicate WinAPI clipboard constants, but why?
|
||||
{ u"CF_BITMAP", SbxINTEGER, CPROP_, ConstInt<1> },
|
||||
{ u"CF_METAFILEPICT", SbxINTEGER, CPROP_, ConstInt<2> },
|
||||
{ u"CF_TEXT", SbxINTEGER, CPROP_, ConstInt<3> },
|
||||
|
||||
{ u"ChDir", SbxNULL, 1 | FUNCTION_, SbRtl_ChDir },
|
||||
arg(u"string", SbxSTRING),
|
||||
|
||||
|
@ -208,8 +207,11 @@ constexpr Method aMethods[] = {
|
|||
{ u"CInt", SbxINTEGER, 1 | FUNCTION_, SbRtl_CInt },
|
||||
arg(u"expression", SbxVARIANT),
|
||||
|
||||
{ u"CLEAR_ALLTABS", SbxINTEGER, CPROP_, SbRtl_CLEAR_ALLTABS },
|
||||
{ u"CLEAR_TAB", SbxINTEGER, CPROP_, SbRtl_CLEAR_TAB },
|
||||
// FIXME: what for are these???
|
||||
{ u"SET_TAB", SbxINTEGER, CPROP_, ConstInt<0> },
|
||||
{ u"CLEAR_TAB", SbxINTEGER, CPROP_, ConstInt<1> },
|
||||
{ u"CLEAR_ALLTABS", SbxINTEGER, CPROP_, ConstInt<2> },
|
||||
|
||||
{ u"CLng", SbxLONG, 1 | FUNCTION_, SbRtl_CLng },
|
||||
arg(u"expression", SbxVARIANT),
|
||||
|
||||
|
@ -358,7 +360,9 @@ constexpr Method aMethods[] = {
|
|||
{ u"Exp", SbxDOUBLE, 1 | FUNCTION_, SbRtl_Exp },
|
||||
arg(u"number", SbxDOUBLE),
|
||||
|
||||
{ u"False", SbxBOOL, CPROP_, SbRtl_False },
|
||||
{ u"False", SbxBOOL, CPROP_, ConstBool<false> },
|
||||
{ u"True", SbxBOOL, CPROP_, ConstBool<true> },
|
||||
|
||||
{ u"FileAttr", SbxINTEGER, 2 | FUNCTION_, SbRtl_FileAttr },
|
||||
arg(u"Channel", SbxINTEGER),
|
||||
arg(u"Attributes", SbxINTEGER),
|
||||
|
@ -411,9 +415,11 @@ constexpr Method aMethods[] = {
|
|||
{ u"Frac", SbxDOUBLE, 1 | FUNCTION_, SbRtl_Frac },
|
||||
arg(u"number", SbxDOUBLE),
|
||||
|
||||
{ u"FRAMEANCHORCHAR", SbxINTEGER, CPROP_, SbRtl_FRAMEANCHORCHAR },
|
||||
{ u"FRAMEANCHORPAGE", SbxINTEGER, CPROP_, SbRtl_FRAMEANCHORPAGE },
|
||||
{ u"FRAMEANCHORPARA", SbxINTEGER, CPROP_, SbRtl_FRAMEANCHORPARA },
|
||||
// FIXME: what for are these???
|
||||
{ u"FRAMEANCHORPAGE", SbxINTEGER, CPROP_, ConstInt<1> },
|
||||
{ u"FRAMEANCHORCHAR", SbxINTEGER, CPROP_, ConstInt<15> },
|
||||
{ u"FRAMEANCHORPARA", SbxINTEGER, CPROP_, ConstInt<14> },
|
||||
|
||||
{ u"FreeFile", SbxINTEGER, FUNCTION_, SbRtl_FreeFile },
|
||||
{ u"FreeLibrary", SbxNULL, 1 | FUNCTION_, SbRtl_FreeLibrary },
|
||||
arg(u"Modulename", SbxSTRING),
|
||||
|
@ -456,13 +462,14 @@ constexpr Method aMethods[] = {
|
|||
{ u"Hour", SbxINTEGER, 1 | FUNCTION_, SbRtl_Hour },
|
||||
arg(u"Date", SbxDATE),
|
||||
|
||||
{ u"IDABORT", SbxINTEGER, CPROP_, SbRtl_IDABORT },
|
||||
{ u"IDCANCEL", SbxINTEGER, CPROP_, SbRtl_IDCANCEL },
|
||||
{ u"IDIGNORE", SbxINTEGER, CPROP_, SbRtl_IDIGNORE },
|
||||
{ u"IDNO", SbxINTEGER, CPROP_, SbRtl_IDNO },
|
||||
{ u"IDOK", SbxINTEGER, CPROP_, SbRtl_IDOK },
|
||||
{ u"IDRETRY", SbxINTEGER, CPROP_, SbRtl_IDRETRY },
|
||||
{ u"IDYES", SbxINTEGER, CPROP_, SbRtl_IDYES },
|
||||
// Related to: MsgBox (return value)
|
||||
{ u"IDABORT", SbxINTEGER, CPROP_, ConstInt<SbMB::Response::ABORT> },
|
||||
{ u"IDCANCEL", SbxINTEGER, CPROP_, ConstInt<SbMB::Response::CANCEL> },
|
||||
{ u"IDIGNORE", SbxINTEGER, CPROP_, ConstInt<SbMB::Response::IGNORE> },
|
||||
{ u"IDNO", SbxINTEGER, CPROP_, ConstInt<SbMB::Response::NO> },
|
||||
{ u"IDOK", SbxINTEGER, CPROP_, ConstInt<SbMB::Response::OK> },
|
||||
{ u"IDRETRY", SbxINTEGER, CPROP_, ConstInt<SbMB::Response::RETRY> },
|
||||
{ u"IDYES", SbxINTEGER, CPROP_, ConstInt<SbMB::Response::YES> },
|
||||
|
||||
{ u"Iif", SbxVARIANT, 3 | FUNCTION_, SbRtl_Iif },
|
||||
arg(u"Bool", SbxBOOL),
|
||||
|
@ -575,21 +582,22 @@ constexpr Method aMethods[] = {
|
|||
{ u"LTrim", SbxSTRING, 1 | FUNCTION_, SbRtl_LTrim },
|
||||
arg(u"string", SbxSTRING),
|
||||
|
||||
{ u"MB_ABORTRETRYIGNORE", SbxINTEGER, CPROP_, SbRtl_MB_ABORTRETRYIGNORE },
|
||||
{ u"MB_APPLMODAL", SbxINTEGER, CPROP_, SbRtl_MB_APPLMODAL },
|
||||
{ u"MB_DEFBUTTON1", SbxINTEGER, CPROP_, SbRtl_MB_DEFBUTTON1 },
|
||||
{ u"MB_DEFBUTTON2", SbxINTEGER, CPROP_, SbRtl_MB_DEFBUTTON2 },
|
||||
{ u"MB_DEFBUTTON3", SbxINTEGER, CPROP_, SbRtl_MB_DEFBUTTON3 },
|
||||
{ u"MB_ICONEXCLAMATION", SbxINTEGER, CPROP_, SbRtl_MB_ICONEXCLAMATION },
|
||||
{ u"MB_ICONINFORMATION", SbxINTEGER, CPROP_, SbRtl_MB_ICONINFORMATION },
|
||||
{ u"MB_ICONQUESTION", SbxINTEGER, CPROP_, SbRtl_MB_ICONQUESTION },
|
||||
{ u"MB_ICONSTOP", SbxINTEGER, CPROP_, SbRtl_MB_ICONSTOP },
|
||||
{ u"MB_OK", SbxINTEGER, CPROP_, SbRtl_MB_OK },
|
||||
{ u"MB_OKCANCEL", SbxINTEGER, CPROP_, SbRtl_MB_OKCANCEL },
|
||||
{ u"MB_RETRYCANCEL", SbxINTEGER, CPROP_, SbRtl_MB_RETRYCANCEL },
|
||||
{ u"MB_SYSTEMMODAL", SbxINTEGER, CPROP_, SbRtl_MB_SYSTEMMODAL },
|
||||
{ u"MB_YESNO", SbxINTEGER, CPROP_, SbRtl_MB_YESNO },
|
||||
{ u"MB_YESNOCANCEL", SbxINTEGER, CPROP_, SbRtl_MB_YESNOCANCEL },
|
||||
// Related to: MsgBox (Buttons argument)
|
||||
{ u"MB_ABORTRETRYIGNORE", SbxINTEGER, CPROP_, ConstInt<SbMB::ABORTRETRYIGNORE> },
|
||||
{ u"MB_APPLMODAL", SbxINTEGER, CPROP_, ConstInt<SbMB::APPLMODAL> },
|
||||
{ u"MB_DEFBUTTON1", SbxINTEGER, CPROP_, ConstInt<SbMB::DEFBUTTON1> },
|
||||
{ u"MB_DEFBUTTON2", SbxINTEGER, CPROP_, ConstInt<SbMB::DEFBUTTON2> },
|
||||
{ u"MB_DEFBUTTON3", SbxINTEGER, CPROP_, ConstInt<SbMB::DEFBUTTON3> },
|
||||
{ u"MB_ICONEXCLAMATION", SbxINTEGER, CPROP_, ConstInt<SbMB::ICONEXCLAMATION> },
|
||||
{ u"MB_ICONINFORMATION", SbxINTEGER, CPROP_, ConstInt<SbMB::ICONINFORMATION> },
|
||||
{ u"MB_ICONQUESTION", SbxINTEGER, CPROP_, ConstInt<SbMB::ICONQUESTION> },
|
||||
{ u"MB_ICONSTOP", SbxINTEGER, CPROP_, ConstInt<SbMB::ICONSTOP> },
|
||||
{ u"MB_OK", SbxINTEGER, CPROP_, ConstInt<SbMB::OK> },
|
||||
{ u"MB_OKCANCEL", SbxINTEGER, CPROP_, ConstInt<SbMB::OKCANCEL> },
|
||||
{ u"MB_RETRYCANCEL", SbxINTEGER, CPROP_, ConstInt<SbMB::RETRYCANCEL> },
|
||||
{ u"MB_SYSTEMMODAL", SbxINTEGER, CPROP_, ConstInt<SbMB::SYSTEMMODAL> },
|
||||
{ u"MB_YESNO", SbxINTEGER, CPROP_, ConstInt<SbMB::YESNO> },
|
||||
{ u"MB_YESNOCANCEL", SbxINTEGER, CPROP_, ConstInt<SbMB::YESNOCANCEL> },
|
||||
|
||||
{ u"Me", SbxOBJECT, 0 | FUNCTION_ | COMPATONLY_, SbRtl_Me },
|
||||
{ u"Mid", SbxSTRING, 3 | LFUNCTION_, SbRtl_Mid },
|
||||
|
@ -745,9 +753,11 @@ constexpr Method aMethods[] = {
|
|||
arg(u"PathName", SbxSTRING),
|
||||
arg(u"Attributes", SbxINTEGER),
|
||||
|
||||
{ u"SET_OFF", SbxINTEGER, CPROP_, SbRtl_SET_OFF },
|
||||
{ u"SET_ON", SbxINTEGER, CPROP_, SbRtl_SET_ON },
|
||||
{ u"SET_TAB", SbxINTEGER, CPROP_, SbRtl_SET_TAB },
|
||||
// FIXME: what for are these???
|
||||
{ u"SET_OFF", SbxINTEGER, CPROP_, ConstInt<0> },
|
||||
{ u"SET_ON", SbxINTEGER, CPROP_, ConstInt<1> },
|
||||
{ u"TOGGLE", SbxINTEGER, CPROP_, ConstInt<2> },
|
||||
|
||||
{ u"Sgn", SbxINTEGER, 1 | FUNCTION_, SbRtl_Sgn },
|
||||
arg(u"number", SbxDOUBLE),
|
||||
|
||||
|
@ -823,53 +833,52 @@ constexpr Method aMethods[] = {
|
|||
{ u"TimeValue", SbxDATE, 1 | FUNCTION_, SbRtl_TimeValue },
|
||||
arg(u"String", SbxSTRING),
|
||||
|
||||
{ u"TOGGLE", SbxINTEGER, CPROP_, SbRtl_TOGGLE },
|
||||
{ u"Trim", SbxSTRING, 1 | FUNCTION_, SbRtl_Trim },
|
||||
arg(u"String", SbxSTRING),
|
||||
|
||||
{ u"True", SbxBOOL, CPROP_, SbRtl_True },
|
||||
{ u"TwipsPerPixelX", SbxLONG, FUNCTION_, SbRtl_TwipsPerPixelX },
|
||||
{ u"TwipsPerPixelY", SbxLONG, FUNCTION_, SbRtl_TwipsPerPixelY },
|
||||
|
||||
{ u"TYP_AUTHORFLD", SbxINTEGER, CPROP_, SbRtl_TYP_AUTHORFLD },
|
||||
{ u"TYP_CHAPTERFLD", SbxINTEGER, CPROP_, SbRtl_TYP_CHAPTERFLD },
|
||||
{ u"TYP_CONDTXTFLD", SbxINTEGER, CPROP_, SbRtl_TYP_CONDTXTFLD },
|
||||
{ u"TYP_DATEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_DATEFLD },
|
||||
{ u"TYP_DBFLD", SbxINTEGER, CPROP_, SbRtl_TYP_DBFLD },
|
||||
{ u"TYP_DBNAMEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_DBNAMEFLD },
|
||||
{ u"TYP_DBNEXTSETFLD", SbxINTEGER, CPROP_, SbRtl_TYP_DBNEXTSETFLD },
|
||||
{ u"TYP_DBNUMSETFLD", SbxINTEGER, CPROP_, SbRtl_TYP_DBNUMSETFLD },
|
||||
{ u"TYP_DBSETNUMBERFLD", SbxINTEGER, CPROP_, SbRtl_TYP_DBSETNUMBERFLD },
|
||||
{ u"TYP_DDEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_DDEFLD },
|
||||
{ u"TYP_DOCINFOFLD", SbxINTEGER, CPROP_, SbRtl_TYP_DOCINFOFLD },
|
||||
{ u"TYP_DOCSTATFLD", SbxINTEGER, CPROP_, SbRtl_TYP_DOCSTATFLD },
|
||||
{ u"TYP_EXTUSERFLD", SbxINTEGER, CPROP_, SbRtl_TYP_EXTUSERFLD },
|
||||
{ u"TYP_FILENAMEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_FILENAMEFLD },
|
||||
{ u"TYP_FIXDATEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_FIXDATEFLD },
|
||||
{ u"TYP_FIXTIMEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_FIXTIMEFLD },
|
||||
{ u"TYP_FORMELFLD", SbxINTEGER, CPROP_, SbRtl_TYP_FORMELFLD },
|
||||
{ u"TYP_GETFLD", SbxINTEGER, CPROP_, SbRtl_TYP_GETFLD },
|
||||
{ u"TYP_GETREFFLD", SbxINTEGER, CPROP_, SbRtl_TYP_GETREFFLD },
|
||||
{ u"TYP_GETREFPAGEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_GETREFPAGEFLD },
|
||||
{ u"TYP_HIDDENPARAFLD", SbxINTEGER, CPROP_, SbRtl_TYP_HIDDENPARAFLD },
|
||||
{ u"TYP_HIDDENTXTFLD", SbxINTEGER, CPROP_, SbRtl_TYP_HIDDENTXTFLD },
|
||||
{ u"TYP_INPUTFLD", SbxINTEGER, CPROP_, SbRtl_TYP_INPUTFLD },
|
||||
{ u"TYP_INTERNETFLD", SbxINTEGER, CPROP_, SbRtl_TYP_INTERNETFLD },
|
||||
{ u"TYP_JUMPEDITFLD", SbxINTEGER, CPROP_, SbRtl_TYP_JUMPEDITFLD },
|
||||
{ u"TYP_MACROFLD", SbxINTEGER, CPROP_, SbRtl_TYP_MACROFLD },
|
||||
{ u"TYP_NEXTPAGEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_NEXTPAGEFLD },
|
||||
{ u"TYP_PAGENUMBERFLD", SbxINTEGER, CPROP_, SbRtl_TYP_PAGENUMBERFLD },
|
||||
{ u"TYP_POSTITFLD", SbxINTEGER, CPROP_, SbRtl_TYP_POSTITFLD },
|
||||
{ u"TYP_PREVPAGEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_PREVPAGEFLD },
|
||||
{ u"TYP_SEQFLD", SbxINTEGER, CPROP_, SbRtl_TYP_SEQFLD },
|
||||
{ u"TYP_SETFLD", SbxINTEGER, CPROP_, SbRtl_TYP_SETFLD },
|
||||
{ u"TYP_SETINPFLD", SbxINTEGER, CPROP_, SbRtl_TYP_SETINPFLD },
|
||||
{ u"TYP_SETREFFLD", SbxINTEGER, CPROP_, SbRtl_TYP_SETREFFLD },
|
||||
{ u"TYP_SETREFPAGEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_SETREFPAGEFLD },
|
||||
{ u"TYP_TEMPLNAMEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_TEMPLNAMEFLD },
|
||||
{ u"TYP_TIMEFLD", SbxINTEGER, CPROP_, SbRtl_TYP_TIMEFLD },
|
||||
{ u"TYP_USERFLD", SbxINTEGER, CPROP_, SbRtl_TYP_USERFLD },
|
||||
{ u"TYP_USRINPFLD", SbxINTEGER, CPROP_, SbRtl_TYP_USRINPFLD },
|
||||
// Related to: SwFieldTypesEnum in sw/inc/fldbas.hxx, .uno:InsertField (Type param), .uno:InsertDBField (Type param)
|
||||
{ u"TYP_AUTHORFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::AUTHOR> },
|
||||
{ u"TYP_CHAPTERFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::CHAPTER> },
|
||||
{ u"TYP_CONDTXTFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::CONDITIONALTEXT> },
|
||||
{ u"TYP_DATEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::DATE> },
|
||||
{ u"TYP_DBFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::DATABASE> },
|
||||
{ u"TYP_DBNAMEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::DATABASENAME> },
|
||||
{ u"TYP_DBNEXTSETFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::DATABASENEXTSET> },
|
||||
{ u"TYP_DBNUMSETFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::DATABASENUMBERSET> },
|
||||
{ u"TYP_DBSETNUMBERFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::DATABASESETNUMBER> },
|
||||
{ u"TYP_DDEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::DDE> },
|
||||
{ u"TYP_DOCINFOFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::DOCUMENTINFO> },
|
||||
{ u"TYP_DOCSTATFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::DOCUMENTSTATISTICS> },
|
||||
{ u"TYP_EXTUSERFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::EXTENDEDUSER> },
|
||||
{ u"TYP_FILENAMEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::FILENAME> },
|
||||
{ u"TYP_FIXDATEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::FIXEDDATE> },
|
||||
{ u"TYP_FIXTIMEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::FIXEDTIME> },
|
||||
{ u"TYP_FORMELFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::FORMEL> },
|
||||
{ u"TYP_GETFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::GET> },
|
||||
{ u"TYP_GETREFFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::GETREF> },
|
||||
{ u"TYP_GETREFPAGEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::GETREFPAGE> },
|
||||
{ u"TYP_HIDDENPARAFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::HIDDENPARAGRAPH> },
|
||||
{ u"TYP_HIDDENTXTFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::HIDDENTEXT> },
|
||||
{ u"TYP_INPUTFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::INPUT> },
|
||||
{ u"TYP_INTERNETFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::INTERNET> },
|
||||
{ u"TYP_JUMPEDITFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::JUMPEDIT> },
|
||||
{ u"TYP_MACROFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::MACRO> },
|
||||
{ u"TYP_NEXTPAGEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::NEXTPAGE> },
|
||||
{ u"TYP_PAGENUMBERFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::PAGENUMBER> },
|
||||
{ u"TYP_POSTITFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::POSTIT> },
|
||||
{ u"TYP_PREVPAGEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::PREVIOUSPAGE> },
|
||||
{ u"TYP_SEQFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::SEQUENCE> },
|
||||
{ u"TYP_SETFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::SET> },
|
||||
{ u"TYP_SETINPFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::SETINPUT> },
|
||||
{ u"TYP_SETREFFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::SETREF> },
|
||||
{ u"TYP_SETREFPAGEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::SETREFPAGE> },
|
||||
{ u"TYP_TEMPLNAMEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::TEMPLATENAME> },
|
||||
{ u"TYP_TIMEFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::TIME> },
|
||||
{ u"TYP_USERFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::USER> },
|
||||
{ u"TYP_USRINPFLD", SbxINTEGER, CPROP_, ConstInt<SbTYP::USERINPUT> },
|
||||
|
||||
{ u"TypeLen", SbxINTEGER, 1 | FUNCTION_, SbRtl_TypeLen },
|
||||
arg(u"Var", SbxVARIANT),
|
||||
|
@ -892,15 +901,16 @@ constexpr Method aMethods[] = {
|
|||
{ u"VarType", SbxINTEGER, 1 | FUNCTION_, SbRtl_VarType },
|
||||
arg(u"Varname", SbxVARIANT),
|
||||
|
||||
{ u"V_EMPTY", SbxINTEGER, CPROP_, SbRtl_V_EMPTY },
|
||||
{ u"V_NULL", SbxINTEGER, CPROP_, SbRtl_V_NULL },
|
||||
{ u"V_INTEGER", SbxINTEGER, CPROP_, SbRtl_V_INTEGER },
|
||||
{ u"V_LONG", SbxINTEGER, CPROP_, SbRtl_V_LONG },
|
||||
{ u"V_SINGLE", SbxINTEGER, CPROP_, SbRtl_V_SINGLE },
|
||||
{ u"V_DOUBLE", SbxINTEGER, CPROP_, SbRtl_V_DOUBLE },
|
||||
{ u"V_CURRENCY", SbxINTEGER, CPROP_, SbRtl_V_CURRENCY },
|
||||
{ u"V_DATE", SbxINTEGER, CPROP_, SbRtl_V_DATE },
|
||||
{ u"V_STRING", SbxINTEGER, CPROP_, SbRtl_V_STRING },
|
||||
// Related to: VarType
|
||||
{ u"V_EMPTY", SbxINTEGER, CPROP_, ConstInt<SbxEMPTY> },
|
||||
{ u"V_NULL", SbxINTEGER, CPROP_, ConstInt<SbxNULL> },
|
||||
{ u"V_INTEGER", SbxINTEGER, CPROP_, ConstInt<SbxINTEGER> },
|
||||
{ u"V_LONG", SbxINTEGER, CPROP_, ConstInt<SbxLONG> },
|
||||
{ u"V_SINGLE", SbxINTEGER, CPROP_, ConstInt<SbxSINGLE> },
|
||||
{ u"V_DOUBLE", SbxINTEGER, CPROP_, ConstInt<SbxDOUBLE> },
|
||||
{ u"V_CURRENCY", SbxINTEGER, CPROP_, ConstInt<SbxCURRENCY> },
|
||||
{ u"V_DATE", SbxINTEGER, CPROP_, ConstInt<SbxDATE> },
|
||||
{ u"V_STRING", SbxINTEGER, CPROP_, ConstInt<SbxSTRING> },
|
||||
|
||||
{ u"Wait", SbxNULL, 1 | FUNCTION_, SbRtl_Wait },
|
||||
arg(u"Milliseconds", SbxLONG),
|
||||
|
@ -921,11 +931,33 @@ constexpr Method aMethods[] = {
|
|||
|
||||
{ u"Year", SbxINTEGER, 1 | FUNCTION_, SbRtl_Year },
|
||||
arg(u"Date", SbxDATE),
|
||||
|
||||
{ {}, SbxNULL, -1, nullptr }}; // end of the table
|
||||
}; // end of the table
|
||||
|
||||
static_assert(MethodsTableValid(aMethods));
|
||||
|
||||
// building the info-structure for single elements
|
||||
// if nIdx = 0, don't create anything (Std-Props!)
|
||||
|
||||
SbxInfo* GetMethodInfo(std::size_t nIdx)
|
||||
{
|
||||
if (!nIdx)
|
||||
return nullptr;
|
||||
assert(nIdx <= std::size(aMethods));
|
||||
const Method* p = &aMethods[nIdx - 1];
|
||||
SbxInfo* pInfo_ = new SbxInfo;
|
||||
short nPar = p->nArgs & ARGSMASK_;
|
||||
for (short i = 0; i < nPar; i++)
|
||||
{
|
||||
p++;
|
||||
SbxFlagBits nFlags_ = static_cast<SbxFlagBits>((p->nArgs >> 8) & 0x03);
|
||||
if (p->nArgs & OPT_)
|
||||
nFlags_ |= SbxFlagBits::Optional;
|
||||
pInfo_->AddParam(OUString(p->sName), p->eType, nFlags_);
|
||||
}
|
||||
return pInfo_;
|
||||
}
|
||||
}
|
||||
|
||||
SbiStdObject::SbiStdObject( const OUString& r, StarBASIC* pb ) : SbxObject( r )
|
||||
{
|
||||
// #i92642: Remove default properties
|
||||
|
@ -962,7 +994,7 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
|
|||
{
|
||||
// else search one
|
||||
sal_uInt16 nHash_ = SbxVariable::MakeHashCode( rName );
|
||||
const Method* p = aMethods;
|
||||
auto p = std::begin(aMethods);
|
||||
bool bFound = false;
|
||||
short nIndex = 0;
|
||||
sal_uInt16 nSrchMask = TYPEMASK_;
|
||||
|
@ -973,8 +1005,9 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
|
|||
case SbxClassType::Object: nSrchMask = OBJECT_; break;
|
||||
default: break;
|
||||
}
|
||||
while( p->nArgs != -1 )
|
||||
while (p != std::end(aMethods))
|
||||
{
|
||||
assert(p < std::end(aMethods));
|
||||
if( ( p->nArgs & nSrchMask )
|
||||
&& ( p->nHash == nHash_ )
|
||||
&& (rName.equalsIgnoreAsciiCase(p->sName)))
|
||||
|
@ -1043,14 +1076,15 @@ void SbiStdObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
|||
|
||||
SbxVariable* pVar = pHint->GetVar();
|
||||
SbxArray* pPar_ = pVar->GetParameters();
|
||||
const sal_uInt16 nCallId = static_cast<sal_uInt16>(pVar->GetUserData());
|
||||
const std::size_t nCallId = pVar->GetUserData();
|
||||
if( nCallId )
|
||||
{
|
||||
const SfxHintId t = pHint->GetId();
|
||||
if( t == SfxHintId::BasicInfoWanted )
|
||||
pVar->SetInfo( GetInfo( static_cast<short>(pVar->GetUserData()) ) );
|
||||
pVar->SetInfo(GetMethodInfo(nCallId));
|
||||
else
|
||||
{
|
||||
assert(nCallId <= std::size(aMethods));
|
||||
bool bWrite = false;
|
||||
if( t == SfxHintId::BasicDataChanged )
|
||||
bWrite = true;
|
||||
|
@ -1071,27 +1105,4 @@ void SbiStdObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
|||
SbxObject::Notify( rBC, rHint );
|
||||
}
|
||||
|
||||
// building the info-structure for single elements
|
||||
// if nIdx = 0, don't create anything (Std-Props!)
|
||||
|
||||
SbxInfo* SbiStdObject::GetInfo( short nIdx )
|
||||
{
|
||||
if( !nIdx )
|
||||
return nullptr;
|
||||
const Method* p = &aMethods[ --nIdx ];
|
||||
SbxInfo* pInfo_ = new SbxInfo;
|
||||
short nPar = p->nArgs & ARGSMASK_;
|
||||
for( short i = 0; i < nPar; i++ )
|
||||
{
|
||||
p++;
|
||||
SbxFlagBits nFlags_ = static_cast<SbxFlagBits>(( p->nArgs >> 8 ) & 0x03);
|
||||
if( p->nArgs & OPT_ )
|
||||
{
|
||||
nFlags_ |= SbxFlagBits::Optional;
|
||||
}
|
||||
pInfo_->AddParam(OUString(p->sName), p->eType, nFlags_);
|
||||
}
|
||||
return pInfo_;
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -351,7 +351,7 @@ namespace vclcanvas
|
|||
// aDashArray ) );
|
||||
}
|
||||
|
||||
aPolyPoly = aDashedPolyPoly;
|
||||
aPolyPoly = std::move(aDashedPolyPoly);
|
||||
}
|
||||
|
||||
::basegfx::B2DSize aLinePixelSize(strokeAttributes.StrokeWidth,
|
||||
|
@ -364,7 +364,7 @@ namespace vclcanvas
|
|||
// simple hairline poly-polygon
|
||||
setupOutDevState( viewState, renderState, LINE_COLOR );
|
||||
|
||||
aStrokedPolyPoly = aPolyPoly;
|
||||
aStrokedPolyPoly = std::move(aPolyPoly);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -639,7 +639,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc889755)
|
|||
const basegfx::BColorStops aColorStops = model::gradient::getColorStopsFromUno(aTransparence.ColorStops);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(3), aColorStops.size());
|
||||
CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0));
|
||||
CPPUNIT_ASSERT_EQUAL(0.0, aColorStops[0].getStopOffset());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x404040), Color(aColorStops[0].getStopColor()));
|
||||
CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 0.070000000000000007));
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x404040), Color(aColorStops[1].getStopColor()));
|
||||
|
@ -683,7 +683,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTransparencyGradientValue)
|
|||
|
||||
// MCGR: Use the whole completely imported transparency gradient to check for correctness
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
|
||||
CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0));
|
||||
CPPUNIT_ASSERT_EQUAL(0.0, aColorStops[0].getStopOffset());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x4d4d4d), Color(aColorStops[0].getStopColor()));
|
||||
CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 1.0));
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x333333), Color(aColorStops[1].getStopColor()));
|
||||
|
|
|
@ -26,70 +26,93 @@ void HistogramCalculator::computeBinFrequencyHistogram(const std::vector<double>
|
|||
maBinRanges.clear();
|
||||
maBinFrequencies.clear();
|
||||
|
||||
// Set min, max to the first value
|
||||
// Calculate statistics
|
||||
double fSum = 0.0;
|
||||
double fSquareSum = 0.0;
|
||||
double fMinValue = rDataPoints[0];
|
||||
double fMaxValue = rDataPoints[0];
|
||||
sal_Int32 nValidCount = 0;
|
||||
|
||||
// Compute min and max values, ignoring non-finite values
|
||||
for (auto const& rValue : rDataPoints)
|
||||
for (const auto& rValue : rDataPoints)
|
||||
{
|
||||
if (std::isfinite(rValue))
|
||||
{
|
||||
fSum += rValue;
|
||||
fSquareSum += rValue * rValue;
|
||||
fMinValue = std::min(fMinValue, rValue);
|
||||
fMaxValue = std::max(fMaxValue, rValue);
|
||||
++nValidCount;
|
||||
}
|
||||
}
|
||||
|
||||
// Round min and max to 6 decimal places
|
||||
// Not sure this is needed or desired
|
||||
fMinValue = std::round(fMinValue * 1e6) / 1e6;
|
||||
fMaxValue = std::round(fMaxValue * 1e6) / 1e6;
|
||||
|
||||
// Handle the case where all values are the same
|
||||
if (fMinValue == fMaxValue)
|
||||
if (nValidCount < 2 || fMinValue == fMaxValue) // Need at least two points for variance
|
||||
{
|
||||
maBinRanges = { { fMinValue, fMinValue } };
|
||||
maBinFrequencies = { sal_Int32(rDataPoints.size()) };
|
||||
mnBins = 1;
|
||||
mfBinWidth = 1.0;
|
||||
maBinRanges = { { std::floor(fMinValue), std::ceil(fMinValue + 1.0) } };
|
||||
maBinFrequencies = { nValidCount };
|
||||
return;
|
||||
}
|
||||
|
||||
mnBins = sal_Int32(std::sqrt(rDataPoints.size()));
|
||||
double fMean = fSum / nValidCount;
|
||||
double fVariance = (fSquareSum - fSum * fMean) / (nValidCount - 1);
|
||||
double fStdDev = std::sqrt(fVariance);
|
||||
|
||||
// Calculate bin width, ensuring it's not zero and rounding to 6 decimal places
|
||||
mfBinWidth = std::round((fMaxValue - fMinValue) / mnBins * 1e6) / 1e6;
|
||||
// Apply Scott's rule for bin width
|
||||
mfBinWidth = (3.5 * fStdDev) / std::cbrt(nValidCount);
|
||||
|
||||
if (mfBinWidth <= 0.0)
|
||||
// Calculate number of bins
|
||||
mnBins = static_cast<sal_Int32>(std::ceil((fMaxValue - fMinValue) / mfBinWidth));
|
||||
mnBins = std::max<sal_Int32>(mnBins, 1); // Ensure at least one bin
|
||||
|
||||
// Set up bin ranges
|
||||
maBinRanges.reserve(mnBins);
|
||||
double fBinStart = fMinValue;
|
||||
|
||||
for (sal_Int32 i = 0; i < mnBins; ++i)
|
||||
{
|
||||
mfBinWidth = 0.000001; //minimum bin width of 0.000001
|
||||
mnBins = sal_Int32(std::ceil((fMaxValue - fMinValue) / mfBinWidth));
|
||||
double fBinEnd = fBinStart + mfBinWidth;
|
||||
|
||||
// Correct rounding to avoid discrepancies
|
||||
fBinStart = std::round(fBinStart * 100.0) / 100.0;
|
||||
fBinEnd = std::round(fBinEnd * 100.0) / 100.0;
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
// First bin includes the minimum value, so use closed interval [fMinValue, fBinEnd]
|
||||
maBinRanges.emplace_back(fMinValue, fBinEnd);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Subsequent bins use half-open interval (fBinStart, fBinEnd]
|
||||
maBinRanges.emplace_back(fBinStart, fBinEnd);
|
||||
}
|
||||
fBinStart = fBinEnd;
|
||||
}
|
||||
|
||||
//recalculate maxValue to ensure it's included in the last bin
|
||||
fMaxValue = fMinValue + mfBinWidth * mnBins;
|
||||
|
||||
// Initialize bin ranges and frequencies
|
||||
maBinRanges.resize(mnBins);
|
||||
maBinFrequencies.resize(mnBins, 0);
|
||||
|
||||
// Calculate bin ranges
|
||||
for (sal_Int32 nBin = 0; nBin < mnBins; ++nBin)
|
||||
{
|
||||
double fBinStart = fMinValue + nBin * mfBinWidth;
|
||||
double fBinEnd = (nBin == mnBins - 1) ? fMaxValue : (fBinStart + mfBinWidth);
|
||||
maBinRanges[nBin] = { std::round(fBinStart * 1e6) / 1e6, std::round(fBinEnd * 1e6) / 1e6 };
|
||||
}
|
||||
// Adjust the last bin end to be inclusive
|
||||
maBinRanges.back().second = std::max(maBinRanges.back().second, fMaxValue);
|
||||
|
||||
// Calculate frequencies
|
||||
maBinFrequencies.assign(mnBins, 0);
|
||||
for (double fValue : rDataPoints)
|
||||
{
|
||||
if (std::isfinite(fValue))
|
||||
{
|
||||
// Calculate into which bin the value falls into
|
||||
sal_Int32 nBinIndex = sal_Int32((fValue - fMinValue) / mfBinWidth);
|
||||
// Sanitize
|
||||
nBinIndex = std::clamp(nBinIndex, sal_Int32(0), mnBins - 1);
|
||||
|
||||
maBinFrequencies[nBinIndex]++;
|
||||
for (size_t i = 0; i < maBinRanges.size(); ++i)
|
||||
{
|
||||
if (i == 0 && fValue >= maBinRanges[i].first && fValue <= maBinRanges[i].second)
|
||||
{
|
||||
maBinFrequencies[i]++;
|
||||
break;
|
||||
}
|
||||
else if (i > 0 && fValue > maBinRanges[i].first && fValue <= maBinRanges[i].second)
|
||||
{
|
||||
maBinFrequencies[i]++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,13 +69,23 @@ InterpretedData HistogramDataInterpreter::interpretDataSource(
|
|||
const auto& binFrequencies = aHistogramCalculator.getBinFrequencies();
|
||||
|
||||
// Create labels and values for HistogramDataSequence
|
||||
std::vector<OUString> labels;
|
||||
std::vector<double> values;
|
||||
std::vector<OUString> aLabels;
|
||||
std::vector<double> aValues;
|
||||
for (size_t i = 0; i < binRanges.size(); ++i)
|
||||
{
|
||||
labels.push_back(u"[" + OUString::number(binRanges[i].first) + u"-"
|
||||
+ OUString::number(binRanges[i].second) + u")");
|
||||
values.push_back(static_cast<double>(binFrequencies[i]));
|
||||
OUString aLabel;
|
||||
if (i == 0)
|
||||
{
|
||||
aLabel = u"["_ustr + OUString::number(binRanges[i].first) + u"-"_ustr
|
||||
+ OUString::number(binRanges[i].second) + u"]"_ustr;
|
||||
}
|
||||
else
|
||||
{
|
||||
aLabel = u"("_ustr + OUString::number(binRanges[i].first) + u"-"_ustr
|
||||
+ OUString::number(binRanges[i].second) + u"]"_ustr;
|
||||
}
|
||||
aLabels.push_back(aLabel);
|
||||
aValues.push_back(static_cast<double>(binFrequencies[i]));
|
||||
}
|
||||
|
||||
rtl::Reference<DataSeries> xSeries = new DataSeries;
|
||||
|
@ -83,8 +93,8 @@ InterpretedData HistogramDataInterpreter::interpretDataSource(
|
|||
aNewData.push_back(aData[0]);
|
||||
|
||||
rtl::Reference<HistogramDataSequence> aValuesDataSequence = new HistogramDataSequence();
|
||||
aValuesDataSequence->setValues(comphelper::containerToSequence(values));
|
||||
aValuesDataSequence->setLabels(comphelper::containerToSequence(labels));
|
||||
aValuesDataSequence->setValues(comphelper::containerToSequence(aValues));
|
||||
aValuesDataSequence->setLabels(comphelper::containerToSequence(aLabels));
|
||||
|
||||
uno::Reference<chart2::data::XDataSequence> aDataSequence = aValuesDataSequence;
|
||||
SetRole(aDataSequence, u"values-y"_ustr);
|
||||
|
|
|
@ -328,8 +328,7 @@ void InternalData::insertColumn( sal_Int32 nAfterIndex )
|
|||
m_aData[ std::slice( nCol - 1, m_nRowCount, m_nColumnCount ) ] );
|
||||
|
||||
m_nColumnCount = nNewColumnCount;
|
||||
m_aData.resize( nNewSize );
|
||||
m_aData = aNewData;
|
||||
m_aData = std::move(aNewData);
|
||||
|
||||
// labels
|
||||
if( nAfterIndex < static_cast< sal_Int32 >( m_aColumnLabels.size()))
|
||||
|
@ -386,8 +385,7 @@ void InternalData::insertRow( sal_Int32 nAfterIndex )
|
|||
}
|
||||
|
||||
m_nRowCount = nNewRowCount;
|
||||
m_aData.resize( nNewSize );
|
||||
m_aData = aNewData;
|
||||
m_aData = std::move(aNewData);
|
||||
|
||||
// labels
|
||||
if( nAfterIndex < static_cast< sal_Int32 >( m_aRowLabels.size()))
|
||||
|
|
|
@ -409,7 +409,7 @@ void EquidistantTickFactory::getAllTicksShifted( TickInfoArraysType& rAllTickInf
|
|||
{
|
||||
ExplicitIncrementData aShiftedIncrement( m_rIncrement );
|
||||
aShiftedIncrement.BaseValue = m_rIncrement.BaseValue-m_rIncrement.Distance/2.0;
|
||||
EquidistantTickFactory( m_rScale, aShiftedIncrement ).getAllTicks(rAllTickInfos);
|
||||
EquidistantTickFactory( m_rScale, std::move(aShiftedIncrement) ).getAllTicks(rAllTickInfos);
|
||||
}
|
||||
|
||||
EquidistantTickIter::EquidistantTickIter( const uno::Sequence< uno::Sequence< double > >& rTicks
|
||||
|
|
|
@ -2818,7 +2818,7 @@ void ExceptionType::dumpHdlFile(
|
|||
{
|
||||
if (name_ == "com.sun.star.uno.Exception")
|
||||
{
|
||||
includes.addCustom(u"#if defined(LIBO_INTERNAL_ONLY)"_ustr);
|
||||
includes.addCustom(u"#if defined(LIBO_INTERNAL_ONLY) && !defined(NDEBUG)"_ustr);
|
||||
includes.addCustom(u"#if __has_include(<version>)"_ustr);
|
||||
includes.addCustom(u"#include <version>"_ustr);
|
||||
includes.addCustom(u"#endif"_ustr);
|
||||
|
|
|
@ -137,6 +137,8 @@ export DISABLE_CVE_TESTS=@DISABLE_CVE_TESTS@
|
|||
export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@
|
||||
export DISABLE_PYTHON=@DISABLE_PYTHON@
|
||||
export DOCDIR=@DOCDIR@
|
||||
DOTNET=@DOTNET@
|
||||
DOTNET_ROOT=@DOTNET_ROOT@
|
||||
export DOXYGEN=@DOXYGEN@
|
||||
export DO_FETCH_TARBALLS=@DO_FETCH_TARBALLS@
|
||||
export DRAGONBOX_CFLAGS=@DRAGONBOX_CFLAGS@
|
||||
|
@ -170,7 +172,7 @@ export ENABLE_DBGUTIL=@ENABLE_DBGUTIL@
|
|||
export ENABLE_DBUS=@ENABLE_DBUS@
|
||||
export ENABLE_DCONF=@ENABLE_DCONF@
|
||||
export ENABLE_DEBUG=@ENABLE_DEBUG@
|
||||
export ENABLE_DOTNET=@ENABLE_DOTNET@
|
||||
ENABLE_DOTNET=@ENABLE_DOTNET@
|
||||
SYSTEM_DRAGONBOX=@SYSTEM_DRAGONBOX@
|
||||
SYSTEM_FROZEN=@SYSTEM_FROZEN@
|
||||
export ENABLE_EPOXY=@ENABLE_EPOXY@
|
||||
|
@ -420,6 +422,7 @@ export LIBO_LIB_FOLDER_FOR_BUILD=@LIBO_LIB_FOLDER_FOR_BUILD@
|
|||
export LIBO_LIB_PYUNO_FOLDER=@LIBO_LIB_PYUNO_FOLDER@
|
||||
export LIBO_SHARE_FOLDER=@LIBO_SHARE_FOLDER@
|
||||
export LIBO_SHARE_HELP_FOLDER=@LIBO_SHARE_HELP_FOLDER@
|
||||
LIBO_SHARE_DOTNET_FOLDER=@LIBO_SHARE_DOTNET_FOLDER@
|
||||
export LIBO_SHARE_JAVA_FOLDER=@LIBO_SHARE_JAVA_FOLDER@
|
||||
export LIBO_SHARE_PRESETS_FOLDER=@LIBO_SHARE_PRESETS_FOLDER@
|
||||
export LIBO_SHARE_READMES_FOLDER=@LIBO_SHARE_READMES_FOLDER@
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
/* where help files are */
|
||||
#undef LIBO_SHARE_HELP_FOLDER
|
||||
|
||||
/* where dotnet libraries are */
|
||||
#undef LIBO_SHARE_DOTNET_FOLDER
|
||||
|
||||
/* where java jars are */
|
||||
#undef LIBO_SHARE_JAVA_FOLDER
|
||||
|
||||
|
|
92
configure.ac
92
configure.ac
|
@ -2177,10 +2177,6 @@ AC_ARG_ENABLE(cli,
|
|||
[Disable the generation of old CLI bindings.]),
|
||||
,enable_cli=yes)
|
||||
|
||||
AC_ARG_ENABLE(dotnet,
|
||||
AS_HELP_STRING([--enable-dotnet],
|
||||
[Enables or disables .NET 8.0 support and bindings generation.]))
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Optional Packages (--with/without-)
|
||||
dnl ===================================================================
|
||||
|
@ -2840,6 +2836,12 @@ AC_ARG_WITH(keep-awake,
|
|||
If no command is specified, defaults to using Awake (from Microsoft PowerToys) on Windows
|
||||
and caffeinate on macOS]))
|
||||
|
||||
AC_ARG_WITH(dotnet,
|
||||
AS_HELP_STRING([--with-dotnet=<absolute path to dotnet executable>],
|
||||
[Specify the dotnet executable used to build .NET bindings and components.
|
||||
Requires .NET SDK 8 or higher. To disable building .NET components, use
|
||||
--without-dotnet or --with-dotnet=no.]))
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Branding
|
||||
dnl ===================================================================
|
||||
|
@ -3587,15 +3589,16 @@ COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`
|
|||
dnl ===================================================================
|
||||
dnl .NET support
|
||||
dnl ===================================================================
|
||||
|
||||
AC_MSG_CHECKING([whether to build with .NET support])
|
||||
if test "$enable_dotnet" != "no"; then
|
||||
if test "$with_dotnet" != no; then
|
||||
if test "$DISABLE_SCRIPTING" = TRUE; then
|
||||
AC_MSG_RESULT([no, overridden by --disable-scripting])
|
||||
with_dotnet=no
|
||||
ENABLE_DOTNET=""
|
||||
enable_dotnet=no
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
ENABLE_DOTNET="TRUE"
|
||||
ENABLE_DOTNET=TRUE
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
@ -3603,26 +3606,72 @@ else
|
|||
fi
|
||||
|
||||
if test "$ENABLE_DOTNET" = TRUE; then
|
||||
AC_PATH_PROG(DOTNET, dotnet)
|
||||
if test "$DOTNET" != ""; then
|
||||
AC_MSG_CHECKING([whether .NET SDK is installed])
|
||||
DOTNET_SDK_VERSION=`dotnet --list-sdks`
|
||||
if test "$DOTNET_SDK_VERSION" != ""; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_FEATURE_DOTNET)
|
||||
if test -n "$with_dotnet" && test "$with_dotnet" != yes; then
|
||||
dnl the user explicitly asks for a particular dotnet executable here
|
||||
|
||||
AC_MSG_CHECKING([for dotnet])
|
||||
PathFormat "$with_dotnet"
|
||||
DOTNET="$formatted_path_unix"
|
||||
|
||||
if test -f "$DOTNET"; then
|
||||
dnl the user provided dotnet is valid
|
||||
AC_MSG_RESULT([$formatted_path])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
dnl since the user wants to use a particular dotnet executable,
|
||||
dnl error out and let them correct the path instead of silently disabling.
|
||||
|
||||
AC_MSG_ERROR([$DOTNET is not a valid dotnet executable])
|
||||
ENABLE_DOTNET=""
|
||||
fi
|
||||
else
|
||||
ENABLE_DOTNET=""
|
||||
dnl no specific path to dotnet provided, try looking in $PATH
|
||||
|
||||
AC_PATH_PROGS(DOTNET, [dotnet dotnet.exe])
|
||||
PathFormat "$DOTNET"
|
||||
DOTNET="$formatted_path_unix"
|
||||
|
||||
if test -z "$DOTNET"; then
|
||||
dnl since the user does not specify any particular dotnet
|
||||
dnl silently disable here instead of erroring out, to prevent
|
||||
dnl breaking their build, as --with-dotnet is enabled by default.
|
||||
|
||||
AC_MSG_WARN([dotnet not found, disabling .NET support])
|
||||
ENABLE_DOTNET=""
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$DOTNET"; then
|
||||
dnl the dotnet executable was found, but no guarantees on whether
|
||||
dnl it contains SDK version 8 or higher unless we check.
|
||||
|
||||
AC_MSG_CHECKING([for .NET SDK 8 or higher])
|
||||
dotnet_sdk_ver_major=`"$DOTNET" --version | "$AWK" -F. '{ print $1 }'`
|
||||
if test "$dotnet_sdk_ver_major" -ge 8; then
|
||||
dnl the SDK seems valid, get the root directory
|
||||
|
||||
dotnet_sdk_ver=`"$DOTNET" --version | "$SED" 's/\r//g'`
|
||||
dotnet_sdk_dir=`"$DOTNET" --list-sdks | "$AWK" -F [[]][[]] "/^$dotnet_sdk_ver/"'{ print $2 }' | "$SED" 's/\r//g'`
|
||||
PathFormat "$dotnet_sdk_dir"
|
||||
DOTNET_ROOT=`dirname "$formatted_path_unix"`
|
||||
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
dnl silently disable for same reason as before
|
||||
|
||||
AC_MSG_RESULT([no, disabling .NET support])
|
||||
ENABLE_DOTNET=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_DOTNET)
|
||||
if test "$ENABLE_DOTNET" != TRUE; then
|
||||
DOTNET=""
|
||||
DOTNET_ROOT=""
|
||||
fi
|
||||
|
||||
dnl set ENABLE_DOTNET="TRUE" for build-time and run-time .NET support
|
||||
dnl set ENABLE_DOTNET="" for no .NET support at all
|
||||
AC_SUBST(ENABLE_DOTNET)
|
||||
AC_SUBST(DOTNET)
|
||||
AC_SUBST(DOTNET_ROOT)
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Java support
|
||||
|
@ -3941,6 +3990,7 @@ if test $_os = Darwin; then
|
|||
LIBO_LIB_PYUNO_FOLDER=Resources
|
||||
LIBO_SHARE_FOLDER=Resources
|
||||
LIBO_SHARE_HELP_FOLDER=Resources/help
|
||||
LIBO_SHARE_DOTNET_FOLDER=Resources/dotnet
|
||||
LIBO_SHARE_JAVA_FOLDER=Resources/java
|
||||
LIBO_SHARE_PRESETS_FOLDER=Resources/presets
|
||||
LIBO_SHARE_READMES_FOLDER=Resources/readmes
|
||||
|
@ -3959,6 +4009,7 @@ elif test $_os = WINNT; then
|
|||
LIBO_LIB_PYUNO_FOLDER=program
|
||||
LIBO_SHARE_FOLDER=share
|
||||
LIBO_SHARE_HELP_FOLDER=help
|
||||
LIBO_SHARE_DOTNET_FOLDER=program/dotnet
|
||||
LIBO_SHARE_JAVA_FOLDER=program/classes
|
||||
LIBO_SHARE_PRESETS_FOLDER=presets
|
||||
LIBO_SHARE_READMES_FOLDER=readmes
|
||||
|
@ -3977,6 +4028,7 @@ else
|
|||
LIBO_LIB_PYUNO_FOLDER=program
|
||||
LIBO_SHARE_FOLDER=share
|
||||
LIBO_SHARE_HELP_FOLDER=help
|
||||
LIBO_SHARE_DOTNET_FOLDER=program/dotnet
|
||||
LIBO_SHARE_JAVA_FOLDER=program/classes
|
||||
LIBO_SHARE_PRESETS_FOLDER=presets
|
||||
LIBO_SHARE_READMES_FOLDER=readmes
|
||||
|
@ -3999,6 +4051,7 @@ AC_DEFINE_UNQUOTED(LIBO_LIB_FOLDER,"$LIBO_LIB_FOLDER")
|
|||
AC_DEFINE_UNQUOTED(LIBO_LIB_PYUNO_FOLDER,"$LIBO_LIB_PYUNO_FOLDER")
|
||||
AC_DEFINE_UNQUOTED(LIBO_SHARE_FOLDER,"$LIBO_SHARE_FOLDER")
|
||||
AC_DEFINE_UNQUOTED(LIBO_SHARE_HELP_FOLDER,"$LIBO_SHARE_HELP_FOLDER")
|
||||
AC_DEFINE_UNQUOTED(LIBO_SHARE_DOTNET_FOLDER,"$LIBO_SHARE_DOTNET_FOLDER")
|
||||
AC_DEFINE_UNQUOTED(LIBO_SHARE_JAVA_FOLDER,"$LIBO_SHARE_JAVA_FOLDER")
|
||||
AC_DEFINE_UNQUOTED(LIBO_SHARE_PRESETS_FOLDER,"$LIBO_SHARE_PRESETS_FOLDER")
|
||||
AC_DEFINE_UNQUOTED(LIBO_SHARE_RESOURCE_FOLDER,"$LIBO_SHARE_RESOURCE_FOLDER")
|
||||
|
@ -4016,6 +4069,7 @@ AC_SUBST(LIBO_LIB_FOLDER)
|
|||
AC_SUBST(LIBO_LIB_PYUNO_FOLDER)
|
||||
AC_SUBST(LIBO_SHARE_FOLDER)
|
||||
AC_SUBST(LIBO_SHARE_HELP_FOLDER)
|
||||
AC_SUBST(LIBO_SHARE_DOTNET_FOLDER)
|
||||
AC_SUBST(LIBO_SHARE_JAVA_FOLDER)
|
||||
AC_SUBST(LIBO_SHARE_PRESETS_FOLDER)
|
||||
AC_SUBST(LIBO_SHARE_READMES_FOLDER)
|
||||
|
|
|
@ -151,7 +151,14 @@ void connectivity::mysqlc::Tables::dropObject(sal_Int32 nPosition, const OUStrin
|
|||
OUString sType;
|
||||
xTable->getPropertyValue(u"Type"_ustr) >>= sType;
|
||||
|
||||
m_xMetaData->getConnection()->createStatement()->execute("DROP " + sType + " " + sName);
|
||||
OUString sCatalog, sSchema, sTable;
|
||||
::dbtools::qualifiedNameComponents(m_xMetaData, sName, sCatalog, sSchema, sTable,
|
||||
::dbtools::EComposeRule::InDataManipulation);
|
||||
|
||||
OUString sComposedName(::dbtools::composeTableName(
|
||||
m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::EComposeRule::InDataManipulation));
|
||||
|
||||
m_xMetaData->getConnection()->createStatement()->execute("DROP " + sType + " " + sComposedName);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
|
|
@ -845,6 +845,8 @@ void SAL_CALL OResultSet::updateRow( )
|
|||
|
||||
try
|
||||
{
|
||||
/* tdf#148367 this block is commented out, because SQLBulkOperations fails
|
||||
with Access ODBC 64-bit drivers on Windows
|
||||
bool bPositionByBookmark = functions().has(ODBC3SQLFunctionId::BulkOperations);
|
||||
if ( bPositionByBookmark )
|
||||
{
|
||||
|
@ -866,7 +868,7 @@ void SAL_CALL OResultSet::updateRow( )
|
|||
// (neither the contents of aBookmark FWIW)
|
||||
assert(nRealLen == aBookmark.getLength());
|
||||
}
|
||||
else
|
||||
else */
|
||||
{
|
||||
nRet = functions().SetPos(m_aStatementHandle,1,SQL_UPDATE,SQL_LOCK_NO_CHANGE);
|
||||
fillNeededData(nRet);
|
||||
|
|
|
@ -203,7 +203,7 @@ void OTools::ThrowException(const OConnection* _pConnection,
|
|||
// corresponding for hdbc.
|
||||
if (bUseWChar && _pConnection->functions().has(ODBC3SQLFunctionId::GetDiagRecW))
|
||||
{
|
||||
SQLWCHAR szSqlState[5];
|
||||
SQLWCHAR szSqlState[6];
|
||||
SQLWCHAR szErrorMessage[SQL_MAX_MESSAGE_LENGTH];
|
||||
szErrorMessage[0] = '\0';
|
||||
SQLSMALLINT cchErrorMsg = 0;
|
||||
|
@ -212,12 +212,15 @@ void OTools::ThrowException(const OConnection* _pConnection,
|
|||
szSqlState,
|
||||
&pfNativeError,
|
||||
szErrorMessage, std::size(szErrorMessage) - 1, &cchErrorMsg);
|
||||
errorMessage = toUString(szErrorMessage, cchErrorMsg);
|
||||
sqlState = toUString(szSqlState, std::size(szSqlState));
|
||||
if (SQL_SUCCEEDED(n))
|
||||
{
|
||||
errorMessage = toUString(szErrorMessage, cchErrorMsg);
|
||||
sqlState = toUString(szSqlState, 5);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SQLCHAR szSqlState[5];
|
||||
SQLCHAR szSqlState[6];
|
||||
SQLCHAR szErrorMessage[SQL_MAX_MESSAGE_LENGTH];
|
||||
szErrorMessage[0] = '\0';
|
||||
SQLSMALLINT pcbErrorMsg = 0;
|
||||
|
@ -226,9 +229,12 @@ void OTools::ThrowException(const OConnection* _pConnection,
|
|||
szSqlState,
|
||||
&pfNativeError,
|
||||
szErrorMessage,sizeof szErrorMessage - 1,&pcbErrorMsg);
|
||||
rtl_TextEncoding _nTextEncoding = osl_getThreadTextEncoding();
|
||||
errorMessage = toUString(szErrorMessage, pcbErrorMsg, _nTextEncoding);
|
||||
sqlState = toUString(szSqlState, std::size(szSqlState), _nTextEncoding);
|
||||
if (SQL_SUCCEEDED(n))
|
||||
{
|
||||
rtl_TextEncoding _nTextEncoding = osl_getThreadTextEncoding();
|
||||
errorMessage = toUString(szErrorMessage, pcbErrorMsg, _nTextEncoding);
|
||||
sqlState = toUString(szSqlState, 5, _nTextEncoding);
|
||||
}
|
||||
}
|
||||
OSL_ENSURE(n != SQL_INVALID_HANDLE,"SdbODBC3_SetStatus: SQLError returned SQL_INVALID_HANDLE");
|
||||
OSL_ENSURE(n == SQL_SUCCESS || n == SQL_SUCCESS_WITH_INFO || n == SQL_NO_DATA_FOUND || n == SQL_ERROR,"SdbODBC3_SetStatus: SQLError failed");
|
||||
|
|
|
@ -96,7 +96,7 @@ css::uno::Reference< css::sdbc::XResultSet > Array::getResultSetAtIndex(
|
|||
std::vector< Any > row( 2 );
|
||||
row[0] <<= static_cast<sal_Int32>( i + index );
|
||||
row[1] = m_data[i+index-1];
|
||||
ret[i] = row;
|
||||
ret[i] = std::move(row);
|
||||
}
|
||||
|
||||
return new SequenceResultSet(
|
||||
|
|
|
@ -334,12 +334,12 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, weld::Button&, voi
|
|||
aItem.SetMacroTable( *pMacroTbl );
|
||||
|
||||
// create empty itemset for macro-dlg
|
||||
SfxItemSetFixed<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM> aItemSet( SfxGetpApp()->GetPool() );
|
||||
aItemSet.Put ( aItem );
|
||||
auto xItemSet = std::make_unique<SfxItemSetFixed<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM>>( SfxGetpApp()->GetPool() );
|
||||
xItemSet->Put( aItem );
|
||||
|
||||
DisableClose( true );
|
||||
|
||||
SfxMacroAssignDlg aDlg(mpDialog->getDialog(), mxDocumentFrame, aItemSet);
|
||||
SfxMacroAssignDlg aDlg(mpDialog->getDialog(), mxDocumentFrame, std::move(xItemSet));
|
||||
|
||||
// add events
|
||||
SfxMacroTabPage *pMacroPage = aDlg.GetTabPage();
|
||||
|
|
|
@ -1212,10 +1212,10 @@ VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::
|
|||
}
|
||||
|
||||
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog(weld::Widget* pParent,
|
||||
const SfxItemSet& rAttr,
|
||||
std::unique_ptr<const SfxItemSet> xAttr,
|
||||
const Reference< XFrame >& rDocumentFrame)
|
||||
{
|
||||
return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SfxMacroAssignDlg>(pParent, rDocumentFrame, rAttr));
|
||||
return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SfxMacroAssignDlg>(pParent, rDocumentFrame, std::move(xAttr)));
|
||||
}
|
||||
|
||||
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog(weld::Window* pParent,
|
||||
|
|
|
@ -444,7 +444,7 @@ public:
|
|||
const SfxItemSet& rAttr,
|
||||
const css::uno::Reference< css::frame::XFrame >& rFrame) override;
|
||||
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Widget* pParent,
|
||||
const SfxItemSet& rAttr,
|
||||
std::unique_ptr<const SfxItemSet> xAttr,
|
||||
const css::uno::Reference< css::frame::XFrame >& rFrame) override;
|
||||
virtual VclPtr<VclAbstractDialog> CreateFrameDialog(weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
|
||||
sal_uInt32 nResId, sal_uInt16 nPageId, const OUString& rParameter) override;
|
||||
|
|
|
@ -80,11 +80,13 @@ class SfxMacroAssignDlg : public SfxSingleTabDialogController
|
|||
public:
|
||||
SfxMacroAssignDlg(weld::Widget* pParent,
|
||||
const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
|
||||
const SfxItemSet& rSet);
|
||||
std::unique_ptr<const SfxItemSet> xSet);
|
||||
SfxMacroTabPage* GetTabPage()
|
||||
{
|
||||
return static_cast<SfxMacroTabPage*>(m_xSfxPage.get());
|
||||
}
|
||||
private:
|
||||
std::unique_ptr<const SfxItemSet> mxItemSet;
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -68,10 +68,15 @@ SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(weld::Container*
|
|||
, m_xAccessibilityTool(m_xBuilder->weld_check_button(u"acctool"_ustr))
|
||||
, m_xTextSelectionInReadonly(m_xBuilder->weld_check_button(u"textselinreadonly"_ustr))
|
||||
, m_xTextSelectionInReadonlyImg(m_xBuilder->weld_widget(u"locktextselinreadonly"_ustr))
|
||||
, m_xAnimatedGraphics(m_xBuilder->weld_check_button(u"animatedgraphics"_ustr))
|
||||
, m_xAnimatedGraphicsImg(m_xBuilder->weld_widget(u"lockanimatedgraphics"_ustr))
|
||||
, m_xAnimatedTexts(m_xBuilder->weld_check_button(u"animatedtext"_ustr))
|
||||
, m_xAnimatedGraphics(m_xBuilder->weld_combo_box(u"animatedgraphicenabled"_ustr))
|
||||
, m_xAnimatedGraphicsImg(m_xBuilder->weld_widget(u"lockanimatedgraphic"_ustr))
|
||||
, m_xAnimatedGraphicsLabel(m_xBuilder->weld_label(u"animatedgraphiclabel"_ustr))
|
||||
, m_xAnimatedOthers(m_xBuilder->weld_combo_box(u"animatedothersenabled"_ustr))
|
||||
, m_xAnimatedOthersImg(m_xBuilder->weld_widget(u"lockanimatedothers"_ustr))
|
||||
, m_xAnimatedOthersLabel(m_xBuilder->weld_label(u"animatedotherslabel"_ustr))
|
||||
, m_xAnimatedTexts(m_xBuilder->weld_combo_box(u"animatedtextenabled"_ustr))
|
||||
, m_xAnimatedTextsImg(m_xBuilder->weld_widget(u"lockanimatedtext"_ustr))
|
||||
, m_xAnimatedTextsLabel(m_xBuilder->weld_label(u"animatedtextlabel"_ustr))
|
||||
, m_xHighContrast(m_xBuilder->weld_combo_box(u"highcontrast"_ustr))
|
||||
, m_xHighContrastImg(m_xBuilder->weld_widget(u"lockhighcontrast"_ustr))
|
||||
, m_xHighContrastLabel(m_xBuilder->weld_label(u"label13"_ustr))
|
||||
|
@ -112,7 +117,9 @@ std::unique_ptr<SfxTabPage> SvxAccessibilityOptionsTabPage::Create(weld::Contain
|
|||
OUString SvxAccessibilityOptionsTabPage::GetAllStrings()
|
||||
{
|
||||
OUString sAllStrings;
|
||||
OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label13"_ustr };
|
||||
OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label13"_ustr,
|
||||
u"animationframelabel"_ustr, u"animatedgraphiclabel"_ustr, u"animatedtextlabel"_ustr,
|
||||
u"animatedotherslabel"_ustr, u"label11"_ustr };
|
||||
|
||||
for (const auto& label : labels)
|
||||
{
|
||||
|
@ -120,8 +127,8 @@ OUString SvxAccessibilityOptionsTabPage::GetAllStrings()
|
|||
sAllStrings += pString->get_label() + " ";
|
||||
}
|
||||
|
||||
OUString checkButton[] = { u"acctool"_ustr, u"textselinreadonly"_ustr, u"animatedgraphics"_ustr,
|
||||
u"animatedtext"_ustr, u"autofontcolor"_ustr, u"systempagepreviewcolor"_ustr };
|
||||
OUString checkButton[] = { u"acctool"_ustr, u"textselinreadonly"_ustr,
|
||||
u"autofontcolor"_ustr, u"systempagepreviewcolor"_ustr };
|
||||
|
||||
for (const auto& check : checkButton)
|
||||
{
|
||||
|
@ -137,10 +144,12 @@ bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet* )
|
|||
std::shared_ptr<comphelper::ConfigurationChanges> batch( comphelper::ConfigurationChanges::create() );
|
||||
if ( !officecfg::Office::Common::Accessibility::IsForPagePreviews::isReadOnly() )
|
||||
officecfg::Office::Common::Accessibility::IsForPagePreviews::set(m_xPagePreviews->get_active(), batch);
|
||||
if ( !officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::isReadOnly() )
|
||||
officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::set(m_xAnimatedGraphics->get_active(), batch);
|
||||
if ( !officecfg::Office::Common::Accessibility::IsAllowAnimatedText::isReadOnly() )
|
||||
officecfg::Office::Common::Accessibility::IsAllowAnimatedText::set(m_xAnimatedTexts->get_active(), batch);
|
||||
if ( !officecfg::Office::Common::Accessibility::AllowAnimatedGraphic::isReadOnly() )
|
||||
officecfg::Office::Common::Accessibility::AllowAnimatedGraphic::set(m_xAnimatedGraphics->get_active(), batch);
|
||||
if ( !officecfg::Office::Common::Accessibility::AllowAnimatedOthers::isReadOnly() )
|
||||
officecfg::Office::Common::Accessibility::AllowAnimatedOthers::set(m_xAnimatedOthers->get_active(), batch);
|
||||
if ( !officecfg::Office::Common::Accessibility::AllowAnimatedText::isReadOnly() )
|
||||
officecfg::Office::Common::Accessibility::AllowAnimatedText::set(m_xAnimatedTexts->get_active(), batch);
|
||||
if ( !officecfg::Office::Common::Accessibility::IsAutomaticFontColor::isReadOnly() )
|
||||
officecfg::Office::Common::Accessibility::IsAutomaticFontColor::set(m_xAutomaticFontColor->get_active(), batch);
|
||||
if ( !officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() )
|
||||
|
@ -310,17 +319,27 @@ void SvxAccessibilityOptionsTabPage::Reset( const SfxItemSet* )
|
|||
m_xPagePreviewsImg->set_visible(true);
|
||||
}
|
||||
|
||||
m_xAnimatedGraphics->set_active( officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::get() );
|
||||
if (officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::isReadOnly())
|
||||
m_xAnimatedGraphics->set_active( officecfg::Office::Common::Accessibility::AllowAnimatedGraphic::get() );
|
||||
if (officecfg::Office::Common::Accessibility::AllowAnimatedGraphic::isReadOnly())
|
||||
{
|
||||
m_xAnimatedGraphics->set_sensitive(false);
|
||||
m_xAnimatedGraphicsLabel->set_sensitive(false);
|
||||
m_xAnimatedGraphicsImg->set_visible(true);
|
||||
}
|
||||
|
||||
m_xAnimatedTexts->set_active( officecfg::Office::Common::Accessibility::IsAllowAnimatedText::get() );
|
||||
if (officecfg::Office::Common::Accessibility::IsAllowAnimatedText::isReadOnly())
|
||||
m_xAnimatedOthers->set_active( officecfg::Office::Common::Accessibility::AllowAnimatedOthers::get() );
|
||||
if (officecfg::Office::Common::Accessibility::AllowAnimatedOthers::isReadOnly())
|
||||
{
|
||||
m_xAnimatedOthers->set_sensitive(false);
|
||||
m_xAnimatedOthersLabel->set_sensitive(false);
|
||||
m_xAnimatedOthersImg->set_visible(true);
|
||||
}
|
||||
|
||||
m_xAnimatedTexts->set_active( officecfg::Office::Common::Accessibility::AllowAnimatedText::get() );
|
||||
if (officecfg::Office::Common::Accessibility::AllowAnimatedText::isReadOnly())
|
||||
{
|
||||
m_xAnimatedTexts->set_sensitive(false);
|
||||
m_xAnimatedTextsLabel->set_sensitive(false);
|
||||
m_xAnimatedTextsImg->set_visible(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,10 +27,15 @@ class SvxAccessibilityOptionsTabPage : public SfxTabPage
|
|||
std::unique_ptr<weld::CheckButton> m_xAccessibilityTool;
|
||||
std::unique_ptr<weld::CheckButton> m_xTextSelectionInReadonly;
|
||||
std::unique_ptr<weld::Widget> m_xTextSelectionInReadonlyImg;
|
||||
std::unique_ptr<weld::CheckButton> m_xAnimatedGraphics;
|
||||
std::unique_ptr<weld::ComboBox> m_xAnimatedGraphics;
|
||||
std::unique_ptr<weld::Widget> m_xAnimatedGraphicsImg;
|
||||
std::unique_ptr<weld::CheckButton> m_xAnimatedTexts;
|
||||
std::unique_ptr<weld::Label> m_xAnimatedGraphicsLabel;
|
||||
std::unique_ptr<weld::ComboBox> m_xAnimatedOthers;
|
||||
std::unique_ptr<weld::Widget> m_xAnimatedOthersImg;
|
||||
std::unique_ptr<weld::Label> m_xAnimatedOthersLabel;
|
||||
std::unique_ptr<weld::ComboBox> m_xAnimatedTexts;
|
||||
std::unique_ptr<weld::Widget> m_xAnimatedTextsImg;
|
||||
std::unique_ptr<weld::Label> m_xAnimatedTextsLabel;
|
||||
std::unique_ptr<weld::ComboBox> m_xHighContrast;
|
||||
std::unique_ptr<weld::Widget> m_xHighContrastImg;
|
||||
std::unique_ptr<weld::Label> m_xHighContrastLabel;
|
||||
|
|
|
@ -387,11 +387,13 @@ std::unique_ptr<SfxTabPage> SfxMacroTabPage::Create(weld::Container* pPage, weld
|
|||
}
|
||||
|
||||
SfxMacroAssignDlg::SfxMacroAssignDlg(weld::Widget* pParent,
|
||||
const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet)
|
||||
: SfxSingleTabDialogController(pParent, &rSet,u"cui/ui/eventassigndialog.ui"_ustr,
|
||||
u"EventAssignDialog"_ustr)
|
||||
const Reference< XFrame >& rxDocumentFrame, std::unique_ptr<const SfxItemSet> xSet)
|
||||
: SfxSingleTabDialogController(pParent, nullptr, u"cui/ui/eventassigndialog.ui"_ustr,
|
||||
u"EventAssignDialog"_ustr),
|
||||
mxItemSet(std::move(xSet))
|
||||
{
|
||||
std::unique_ptr<SfxMacroTabPage> xPage = CreateSfxMacroTabPage(get_content_area(), this, rSet);
|
||||
SetInputSet(mxItemSet.get());
|
||||
std::unique_ptr<SfxMacroTabPage> xPage = CreateSfxMacroTabPage(get_content_area(), this, *mxItemSet);
|
||||
xPage->SetFrame(rxDocumentFrame);
|
||||
SetTabPage(std::move(xPage));
|
||||
GetTabPage()->LaunchFillGroup();
|
||||
|
|
|
@ -420,16 +420,9 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
|
|||
}
|
||||
}
|
||||
|
||||
eState = rSet->GetItemState( SID_ATTR_NUMBERFORMAT_SOURCE );
|
||||
|
||||
if ( eState == SfxItemState::SET )
|
||||
if ( const SfxBoolItem* pBoolItem = rSet->GetItemIfSet( SID_ATTR_NUMBERFORMAT_SOURCE ))
|
||||
{
|
||||
const SfxBoolItem* pBoolItem =
|
||||
GetItem( *rSet, SID_ATTR_NUMBERFORMAT_SOURCE );
|
||||
if ( pBoolItem )
|
||||
m_xCbSourceFormat->set_active(pBoolItem->GetValue());
|
||||
else
|
||||
m_xCbSourceFormat->set_active( false );
|
||||
m_xCbSourceFormat->set_active(pBoolItem->GetValue());
|
||||
m_xCbSourceFormat->set_sensitive(true);
|
||||
m_xCbSourceFormat->show();
|
||||
}
|
||||
|
@ -520,9 +513,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
|
|||
{
|
||||
SetCategory(nCatLbSelPos );
|
||||
}
|
||||
eState = rSet->GetItemState( SID_ATTR_NUMBERFORMAT_ADD_AUTO );
|
||||
if(SfxItemState::SET == eState)
|
||||
pAutoEntryAttr = GetItem( *rSet, SID_ATTR_NUMBERFORMAT_ADD_AUTO );
|
||||
pAutoEntryAttr = rSet->GetItemIfSet( SID_ATTR_NUMBERFORMAT_ADD_AUTO );
|
||||
// no_NO is an alias for nb_NO and normally isn't listed, we need it for
|
||||
// backwards compatibility, but only if the format passed is of
|
||||
// LanguageType no_NO.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<!-- Generated with glade 3.40.0 -->
|
||||
<interface domain="cui">
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
|
@ -27,145 +27,234 @@
|
|||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame1">
|
||||
<object class="GtkFrame" id="animationsframe">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label-xalign">0</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=4 -->
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<object class="GtkBox" id="animationsbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="acctool">
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|acctool">Support _assistive technology tools (program restart required)</property>
|
||||
<!-- n-columns=3 n-rows=1 -->
|
||||
<object class="GtkGrid" id="animatedgraphicgrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="acctool-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|acctool">Allows you to use assistive tools, such as external screen readers, Braille devices or speech recognition input devices. The Java Runtime Environment must be installed on your computer before you can enable assistive support.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="textselinreadonly">
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|textselinreadonly">Use te_xt selection cursor in read-only text documents</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="textselinreadonly-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|textselinreadonly">Displays cursor in read-only documents.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="animatedgraphics">
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|animatedgraphics">Allow animated _images</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="animatedgraphics-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|animatedgraphics">Previews animated graphics, such as GIF images.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="animatedtext">
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|animatedtext">Allow animated _text</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="animatedtext-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|animatedtext">Previews animated text, such as blinking and scrolling.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="locktextselinreadonly">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="animatedgraphiclabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|animatedgraphiclabel">Allow animated images: </property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="mnemonic-widget">animatedgraphicenabled</property>
|
||||
<property name="xalign">0</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="animatedgraphiclabel-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|animatedgraphiclabel">Controls if previewing the animation of animated images (e.g. animated GIFs) is enabled. Select from “System”, “No” and “Yes”.
|
||||
“System” previews the animation of animated images according to system settings.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="lockanimatedgraphic">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="animatedgraphicenabled">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="active">0</property>
|
||||
<items>
|
||||
<item translatable="yes" context="optaccessibilitypage|animationsenabled">System</item>
|
||||
<item translatable="yes" context="optaccessibilitypage|animationsenabled">No</item>
|
||||
<item translatable="yes" context="optaccessibilitypage|animationsenabled">Yes</item>
|
||||
</items>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="animatedgraphicenabled-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|animatedgraphicenabled">Controls if previewing the animation of animated images (e.g. animated GIFs) is enabled. Select from “System”, “No” and “Yes”.
|
||||
“System” previews the animation of animated images according to system settings.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="lockanimatedgraphics">
|
||||
<!-- n-columns=3 n-rows=1 -->
|
||||
<object class="GtkGrid" id="animatedtextgrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="lockanimatedtext">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="animatedtextlabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|animatedtextlabel">Allow animated text: </property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="mnemonic-widget">animatedtextenabled</property>
|
||||
<property name="xalign">0</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="animatedtextlabel-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|animatedtextlabel">Controls if previewing the animation of animated text (such as blinking and scrolling) is enabled. Select from “System”, “No” and “Yes”.
|
||||
“System” previews the animation of animated text according to system settings.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="animatedtextenabled">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="active">0</property>
|
||||
<items>
|
||||
<item translatable="yes" context="optaccessibilitypage|animationsenabled">System</item>
|
||||
<item translatable="yes" context="optaccessibilitypage|animationsenabled">No</item>
|
||||
<item translatable="yes" context="optaccessibilitypage|animationsenabled">Yes</item>
|
||||
</items>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="animatedtextenabled-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|animatedtextenabled">Controls if previewing the animation of animated text (such as blinking and scrolling) is enabled. Select from “System”, “No” and “Yes”.
|
||||
“System” previews the animation of animated text according to system settings.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="lockanimatedtext">
|
||||
<!-- n-columns=3 n-rows=1 -->
|
||||
<object class="GtkGrid" id="animatedothersgrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="animatedotherslabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|animatedotherslabel" comments="This option allows e.g. 'running ants' animation in Calc">Allow other animations: </property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="mnemonic-widget">animatedothersenabled</property>
|
||||
<property name="xalign">0</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="animatedotherslabel-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|animatedotherslabel">Controls if certain other animations (e.g. 'marching ants' animation when copying a cell in calc) are enabled. Select from “System”, “No” and “Yes”.
|
||||
“System” allows showing these certain other animations according to system settings.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="lockanimatedothers">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="animatedothersenabled">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="active">0</property>
|
||||
<items>
|
||||
<item translatable="yes" context="optaccessibilitypage|animationsenabled">System</item>
|
||||
<item translatable="yes" context="optaccessibilitypage|animationsenabled">No</item>
|
||||
<item translatable="yes" context="optaccessibilitypage|animationsenabled">Yes</item>
|
||||
</items>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="animatedothersenabled-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|animatedothersenabled">Controls if certain other animations (e.g. 'marching ants' animation when copying a cell in calc) are enabled. Select from “System”, “No” and “Yes”.
|
||||
“System” allows showing these certain other animations according to system settings.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<object class="GtkLabel" id="animationframelabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|label1">Miscellaneous Options</property>
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|animationframelabel">Animations</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
|
@ -207,12 +296,30 @@
|
|||
<property name="use-underline">True</property>
|
||||
<property name="mnemonic-widget">highcontrast</property>
|
||||
<property name="xalign">0</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="label13-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|label13">Controls if high contrast mode is used. Select from “Automatic”, “Disable” and “Enable”. “Automatic” uses high contrast according to system settings.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="lockhighcontrast">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="highcontrast">
|
||||
<property name="visible">True</property>
|
||||
|
@ -235,19 +342,6 @@
|
|||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="lockhighcontrast">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -339,7 +433,7 @@
|
|||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|label2">Options for High Contrast Appearance</property>
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|label2">High Contrast</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
|
@ -352,6 +446,104 @@
|
|||
<property name="position">1</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>
|
||||
<!-- n-columns=2 n-rows=2 -->
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="acctool">
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|acctool">Support _assistive technology tools (program restart required)</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="acctool-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|acctool">Allows you to use assistive tools, such as external screen readers, Braille devices or speech recognition input devices. The Java Runtime Environment must be installed on your computer before you can enable assistive support.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="textselinreadonly">
|
||||
<property name="label" translatable="yes" context="optaccessibilitypage|textselinreadonly">Use te_xt selection cursor in read-only text documents</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="textselinreadonly-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|textselinreadonly">Displays cursor in read-only documents.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="locktextselinreadonly">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="lockacctool">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">res/lock.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</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" context="optaccessibilitypage|label1">Miscellaneous</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">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame3">
|
||||
<property name="visible">True</property>
|
||||
|
@ -462,7 +654,7 @@
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="accessible">
|
||||
|
|
|
@ -583,6 +583,10 @@
|
|||
<object class="GtkComboBoxText" id="comboLayoutFormat">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<style>
|
||||
<!-- tdf#161662 try and shrink this height to min and then use the size-group to bring it back up to that height -->
|
||||
<class name="novertpad"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
|
|
|
@ -363,7 +363,7 @@ const SharedConnection& OApplicationController::ensureConnection( ::dbtools::SQL
|
|||
{
|
||||
if ( _pErrorInfo )
|
||||
{
|
||||
*_pErrorInfo = aError;
|
||||
*_pErrorInfo = std::move(aError);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -667,11 +667,11 @@ void DlgFilterCrit::BuildWherePart()
|
|||
PropertyValue aValue;
|
||||
if ( getCondition(*m_xLB_WHEREFIELD1,*m_xLB_WHERECOMP1,*m_xET_WHEREVALUE1,aValue) )
|
||||
{
|
||||
aHaving = { { aValue } };
|
||||
aHaving = { { std::move(aValue) } };
|
||||
}
|
||||
else
|
||||
{
|
||||
aFilter = { { aValue} };
|
||||
aFilter = { { std::move(aValue) } };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ Reference< XDataSource > getDataSourceByName( const OUString& _rDataSourceName,
|
|||
{
|
||||
if ( _pErrorInfo )
|
||||
{
|
||||
*_pErrorInfo = aSQLError;
|
||||
*_pErrorInfo = std::move(aSQLError);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ $(eval $(call gb_Executable_add_ldflags,soffice_bin, \
|
|||
$(foreach i,$(EMSCRIPTEN_EXTRA_SOFFICE_POST_JS),--post-js $(i)) \
|
||||
))
|
||||
|
||||
ifneq ($(ENABLE_DBGUTIL),)
|
||||
ifeq ($(ENABLE_DBGUTIL)-$(gb_SUPPRESS_TESTS),TRUE-)
|
||||
|
||||
$(call gb_Executable_get_linktarget_target,soffice_bin): \
|
||||
$(SRCDIR)/unotest/source/embindtest/embindtest.js
|
||||
|
|
|
@ -264,7 +264,7 @@ void ExtensionManager::addExtensionsToMap(
|
|||
{
|
||||
std::vector<Reference<css::deployment::XPackage> > vec(3);
|
||||
vec[index] = xExtension;
|
||||
mapExt[id] = vec;
|
||||
mapExt[id] = std::move(vec);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -493,7 +493,7 @@ sal_Int32 MigrationImpl::findPreferredMigrationProcess(const migrations_availabl
|
|||
{
|
||||
install_info aInstallInfo = findInstallation(availableMigration.supported_versions);
|
||||
if (!aInstallInfo.productname.isEmpty() ) {
|
||||
m_aInfo = aInstallInfo;
|
||||
m_aInfo = std::move(aInstallInfo);
|
||||
nIndex = i;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
--enable-qt5
|
||||
--disable-gen
|
||||
--disable-scripting
|
||||
--with-package-format=emscripten
|
||||
|
|
|
@ -83,8 +83,8 @@ CPPUNIT_TARBALL := cppunit-1.15.1.tar.gz
|
|||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
CURL_SHA256SUM := ff09b2791ca56d25fd5c3f3a4927dce7c8a9dc4182200c487ca889fba1fdd412
|
||||
CURL_TARBALL := curl-8.9.0.tar.xz
|
||||
CURL_SHA256SUM := f292f6cc051d5bbabf725ef85d432dfeacc8711dd717ea97612ae590643801e5
|
||||
CURL_TARBALL := curl-8.9.1.tar.xz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
|
@ -515,8 +515,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz
|
|||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
NSS_SHA256SUM := 4ae9db6b117db1cc134bd587a23ff804d8da5bdd63fbb1bf0862b8e3e3aa2439
|
||||
NSS_TARBALL := nss-3.102-with-nspr-4.35.tar.gz
|
||||
NSS_SHA256SUM := ddfdec73fb4b0eedce5fc4de09de9ba14d2ddbfbf67e42372903e1510f2d3d65
|
||||
NSS_TARBALL := nss-3.102.1-with-nspr-4.35.tar.gz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
|
|
|
@ -662,7 +662,7 @@ namespace drawinglayer::primitive2d
|
|||
else
|
||||
{
|
||||
// dependent of transparency used create the needed bitmap primitive
|
||||
if(basegfx::fTools::equal(fTransparency, 0.0))
|
||||
if (basegfx::fTools::equalZero(fTransparency))
|
||||
{
|
||||
rContainer.append(
|
||||
new BitmapPrimitive2D(
|
||||
|
|
|
@ -46,7 +46,7 @@ void implGrowHairline(basegfx::B2DRange& rRange,
|
|||
rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0));
|
||||
const double fDiscreteHalfLineWidth(aDiscreteSize.getLength() * 0.5);
|
||||
|
||||
if (basegfx::fTools::more(fDiscreteHalfLineWidth, 0.0))
|
||||
if (fDiscreteHalfLineWidth > 0.0)
|
||||
{
|
||||
rRange.grow(fDiscreteHalfLineWidth);
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ PolygonMarkerPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewIn
|
|||
rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0));
|
||||
const double fDiscreteHalfLineWidth(aDiscreteSize.getLength() * 0.5);
|
||||
|
||||
if (basegfx::fTools::more(fDiscreteHalfLineWidth, 0.0))
|
||||
if (fDiscreteHalfLineWidth > 0.0)
|
||||
{
|
||||
aRetval.grow(fDiscreteHalfLineWidth);
|
||||
}
|
||||
|
@ -583,7 +583,7 @@ PolygonStrokePrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewIn
|
|||
rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0));
|
||||
const double fDiscreteHalfLineWidth(aDiscreteSize.getLength() * 0.5);
|
||||
|
||||
if (basegfx::fTools::more(fDiscreteHalfLineWidth, 0.0))
|
||||
if (fDiscreteHalfLineWidth > 0.0)
|
||||
{
|
||||
aHairlineRange.grow(fDiscreteHalfLineWidth);
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace drawinglayer::primitive2d
|
|||
const SvgGradientEntry& rSingleEntry(rEntries[nCount - 1]);
|
||||
const double fOpacity(rSingleEntry.getOpacity());
|
||||
|
||||
if (basegfx::fTools::lessOrEqual(fOpacity, 0.0))
|
||||
if (fOpacity <= 0.0 || basegfx::fTools::equalZero(fOpacity))
|
||||
{
|
||||
// completely opaque, done
|
||||
return nullptr;
|
||||
|
|
|
@ -268,7 +268,7 @@ namespace drawinglayer::primitive2d
|
|||
}
|
||||
}
|
||||
|
||||
mxResult = aTempResult;
|
||||
mxResult = std::move(aTempResult);
|
||||
}
|
||||
|
||||
Primitive2DContainer TextBreakupHelper::extractResult(BreakupUnit aBreakupUnit)
|
||||
|
|
|
@ -338,7 +338,17 @@ namespace drawinglayer::primitive2d
|
|||
bool bEmphasisMarkBelow,
|
||||
TextRelief eTextRelief,
|
||||
bool bShadow)
|
||||
: TextSimplePortionPrimitive2D(rNewTransform, rText, nTextPosition, nTextLength, std::move(rDXArray), std::move(rKashidaArray), rFontAttribute, rLocale, rFontColor, false, 0, rFillColor),
|
||||
: TextSimplePortionPrimitive2D(
|
||||
rNewTransform,
|
||||
rText,
|
||||
nTextPosition,
|
||||
nTextLength,
|
||||
std::move(rDXArray),
|
||||
std::move(rKashidaArray),
|
||||
rFontAttribute,
|
||||
rLocale,
|
||||
rFontColor,
|
||||
rFillColor),
|
||||
maOverlineColor(rOverlineColor),
|
||||
maTextlineColor(rTextlineColor),
|
||||
meFontOverline(eFontOverline),
|
||||
|
|
|
@ -203,8 +203,7 @@ TextSimplePortionPrimitive2D::TextSimplePortionPrimitive2D(
|
|||
basegfx::B2DHomMatrix rNewTransform, OUString rText, sal_Int32 nTextPosition,
|
||||
sal_Int32 nTextLength, std::vector<double>&& rDXArray, std::vector<sal_Bool>&& rKashidaArray,
|
||||
attribute::FontAttribute aFontAttribute, css::lang::Locale aLocale,
|
||||
const basegfx::BColor& rFontColor, bool bFilled, tools::Long nWidthToFill,
|
||||
const Color& rTextFillColor)
|
||||
const basegfx::BColor& rFontColor, const Color& rTextFillColor)
|
||||
: maTextTransform(std::move(rNewTransform))
|
||||
, maText(std::move(rText))
|
||||
, mnTextPosition(nTextPosition)
|
||||
|
@ -214,8 +213,6 @@ TextSimplePortionPrimitive2D::TextSimplePortionPrimitive2D(
|
|||
, maFontAttribute(std::move(aFontAttribute))
|
||||
, maLocale(std::move(aLocale))
|
||||
, maFontColor(rFontColor)
|
||||
, mbFilled(bFilled)
|
||||
, mnWidthToFill(nWidthToFill)
|
||||
, maTextFillColor(rTextFillColor)
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -245,8 +242,7 @@ bool TextSimplePortionPrimitive2D::operator==(const BasePrimitive2D& rPrimitive)
|
|||
&& getKashidaArray() == rCompare.getKashidaArray()
|
||||
&& getFontAttribute() == rCompare.getFontAttribute()
|
||||
&& LocalesAreEqual(getLocale(), rCompare.getLocale())
|
||||
&& getFontColor() == rCompare.getFontColor() && mbFilled == rCompare.mbFilled
|
||||
&& mnWidthToFill == rCompare.mnWidthToFill
|
||||
&& getFontColor() == rCompare.getFontColor()
|
||||
&& maTextFillColor == rCompare.maTextFillColor);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace
|
|||
{
|
||||
rOuterPolyPolygon = rPolygon;
|
||||
|
||||
if(!basegfx::fTools::more(fOffset, 0.0))
|
||||
if (fOffset <= 0.0 || basegfx::fTools::equalZero(fOffset))
|
||||
return;
|
||||
|
||||
if(bCharacterMode)
|
||||
|
|
|
@ -2035,7 +2035,7 @@ bool CairoPixelProcessor2D::processFillGradientPrimitive2D_isCompletelyBordered(
|
|||
|
||||
// check if completely 'bordered out'. This can be the case for all
|
||||
// types of gradients
|
||||
if (basegfx::fTools::less(fBorder, 1.0) && basegfx::fTools::moreOrEqual(fBorder, 0.0))
|
||||
if (basegfx::fTools::less(fBorder, 1.0) && fBorder >= 0.0)
|
||||
{
|
||||
// no, we have visible content besides border
|
||||
return false;
|
||||
|
|
|
@ -336,37 +336,6 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
|
|||
mpOutputDevice->SetLayoutMode(nLTRLayoutMode);
|
||||
}
|
||||
|
||||
OUString aText(rTextCandidate.getText());
|
||||
sal_Int32 nPos = rTextCandidate.getTextPosition();
|
||||
sal_Int32 nLen = rTextCandidate.getTextLength();
|
||||
|
||||
// this contraption is used in editeng, with format paragraph used to
|
||||
// set a tab with a tab-fill character
|
||||
if (rTextCandidate.isFilled())
|
||||
{
|
||||
tools::Long nWidthToFill = rTextCandidate.getWidthToFill();
|
||||
|
||||
tools::Long nWidth = basegfx::fround<tools::Long>(
|
||||
mpOutputDevice->GetTextArray(rTextCandidate.getText(), &aDXArray, 0, 1).nWidth);
|
||||
sal_Int32 nChars = 2;
|
||||
if (nWidth)
|
||||
nChars = nWidthToFill / nWidth;
|
||||
|
||||
OUStringBuffer aFilled(nChars);
|
||||
comphelper::string::padToLength(aFilled, nChars, aText[0]);
|
||||
aText = aFilled.makeStringAndClear();
|
||||
nPos = 0;
|
||||
nLen = nChars;
|
||||
|
||||
if (!aDXArray.empty())
|
||||
{
|
||||
sal_Int32 nDX = aDXArray[0];
|
||||
aDXArray.resize(nLen);
|
||||
for (sal_Int32 i = 1; i < nLen; ++i)
|
||||
aDXArray.set(i, aDXArray[i - 1] + nDX);
|
||||
}
|
||||
}
|
||||
|
||||
Point aStartPoint;
|
||||
bool bChangeMapMode(false);
|
||||
if (!bScaleFont)
|
||||
|
@ -428,6 +397,25 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
|
|||
/ (aResultFontSize.Width() ? aResultFontSize.Width()
|
||||
: aResultFontSize.Height());
|
||||
|
||||
#ifdef _WIN32
|
||||
if (aResultFontSize.Width()
|
||||
&& aResultFontSize.Width() != aResultFontSize.Height())
|
||||
{
|
||||
// See getVclFontFromFontAttribute in drawinglayer/source/primitive2d/textlayoutdevice.cxx
|
||||
vcl::Font aUnscaledTest(aFont);
|
||||
aUnscaledTest.SetFontSize({ 0, aResultFontSize.Height() });
|
||||
const FontMetric aUnscaledFontMetric(
|
||||
Application::GetDefaultDevice()->GetFontMetric(aUnscaledTest));
|
||||
if (aUnscaledFontMetric.GetAverageFontWidth() > 0)
|
||||
{
|
||||
double nExistingXScale = static_cast<double>(aResultFontSize.Width())
|
||||
/ aUnscaledFontMetric.GetAverageFontWidth();
|
||||
nFontScalingFixX
|
||||
= aFontScaling.getX() / aFontScaling.getY() / nExistingXScale;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!rtl_math_approxEqual(nFontScalingFixY, 1.0)
|
||||
|| !rtl_math_approxEqual(nFontScalingFixX, 1.0))
|
||||
{
|
||||
|
@ -462,21 +450,21 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
|
|||
mpOutputDevice->SetFont(aFont);
|
||||
mpOutputDevice->SetTextColor(Color(aRGBFontColor));
|
||||
|
||||
if (!aDXArray.empty())
|
||||
{
|
||||
// For D2DWriteTextOutRenderer, we must pass a flag to not use font scaling
|
||||
auto guard = mpOutputDevice->ScopedNoFontScaling();
|
||||
if (!aDXArray.empty())
|
||||
{
|
||||
const SalLayoutGlyphs* pGlyphs = SalLayoutGlyphsCache::self()->GetLayoutGlyphs(
|
||||
mpOutputDevice, aText, nPos, nLen);
|
||||
mpOutputDevice->DrawTextArray(aStartPoint, aText, aDXArray,
|
||||
rTextCandidate.getKashidaArray(), nPos, nLen,
|
||||
SalLayoutFlags::NONE, pGlyphs);
|
||||
}
|
||||
else
|
||||
{
|
||||
mpOutputDevice->DrawText(aStartPoint, aText, nPos, nLen);
|
||||
}
|
||||
const SalLayoutGlyphs* pGlyphs = SalLayoutGlyphsCache::self()->GetLayoutGlyphs(
|
||||
mpOutputDevice, rTextCandidate.getText(), rTextCandidate.getTextPosition(),
|
||||
rTextCandidate.getTextLength());
|
||||
mpOutputDevice->DrawTextArray(
|
||||
aStartPoint, rTextCandidate.getText(), aDXArray,
|
||||
rTextCandidate.getKashidaArray(), rTextCandidate.getTextPosition(),
|
||||
rTextCandidate.getTextLength(), SalLayoutFlags::NONE, pGlyphs);
|
||||
}
|
||||
else
|
||||
{
|
||||
mpOutputDevice->DrawText(aStartPoint, rTextCandidate.getText(),
|
||||
rTextCandidate.getTextPosition(),
|
||||
rTextCandidate.getTextLength());
|
||||
}
|
||||
|
||||
// Restore previous layout mode
|
||||
|
|
|
@ -224,7 +224,7 @@ namespace drawinglayer::processor3d
|
|||
mfLightPlaneScalar = maLightNormal.scalar(maShadowPlaneNormal);
|
||||
|
||||
// use only when scalar is > 0.0, so the light is in front of the object
|
||||
if(!basegfx::fTools::more(mfLightPlaneScalar, 0.0))
|
||||
if(mfLightPlaneScalar <= 0.0 || basegfx::fTools::equalZero(mfLightPlaneScalar))
|
||||
return;
|
||||
|
||||
// prepare buffered WorldToEye and EyeToView
|
||||
|
|
|
@ -119,14 +119,14 @@ private:
|
|||
mrProcessor.getGeoTexSvx()->modifyBColor(aTexCoor, rColor, fOpacity);
|
||||
}
|
||||
|
||||
if(basegfx::fTools::more(fOpacity, 0.0) && mrProcessor.getTransparenceGeoTexSvx())
|
||||
if (fOpacity > 0.0 && !basegfx::fTools::equalZero(fOpacity) && mrProcessor.getTransparenceGeoTexSvx())
|
||||
{
|
||||
// calc opacity. Object has a 2nd texture, a transparence texture
|
||||
mrProcessor.getTransparenceGeoTexSvx()->modifyOpacity(aTexCoor, fOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
if(basegfx::fTools::more(fOpacity, 0.0))
|
||||
if (fOpacity > 0.0 && !basegfx::fTools::equalZero(fOpacity))
|
||||
{
|
||||
if(mrProcessor.getGeoTexSvx())
|
||||
{
|
||||
|
|
|
@ -322,7 +322,7 @@ BitmapEx convertPrimitive2DContainerToBitmapEx(primitive2d::Primitive2DContainer
|
|||
const double fWidth(aRange.getWidth());
|
||||
const double fHeight(aRange.getHeight());
|
||||
|
||||
if (!(basegfx::fTools::more(fWidth, 0.0) && basegfx::fTools::more(fHeight, 0.0)))
|
||||
if (fWidth <= 0.0 || fHeight <= 0.0 || basegfx::fTools::equalZero(fWidth) || basegfx::fTools::equalZero(fHeight))
|
||||
return BitmapEx();
|
||||
|
||||
if (0 == DPI_X)
|
||||
|
|
|
@ -1179,7 +1179,7 @@ namespace wmfemfhelper
|
|||
fTextWidth = rDXArray.back();
|
||||
}
|
||||
|
||||
if(basegfx::fTools::more(fTextWidth, 0.0))
|
||||
if (fTextWidth > 0.0 && !basegfx::fTools::equalZero(fTextWidth))
|
||||
{
|
||||
// build text range
|
||||
const basegfx::B2DRange aTextRange(
|
||||
|
|
|
@ -57,14 +57,6 @@ public:
|
|||
const Color& rOverlineColor,
|
||||
const Color& rTextLineColor) override;
|
||||
|
||||
virtual void DrawingTab(
|
||||
const Point& rStartPos, tools::Long nWidth, const OUString& rChar,
|
||||
const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft,
|
||||
bool bEndOfLine,
|
||||
bool bEndOfParagraph,
|
||||
const Color& rOverlineColor,
|
||||
const Color& rTextLineColor) override;
|
||||
|
||||
virtual void StyleSheetChanged( SfxStyleSheet* pStyle ) override;
|
||||
virtual void ParaAttribsChanged( sal_Int32 nPara ) override;
|
||||
virtual bool SpellNextDocument() override;
|
||||
|
|
|
@ -564,10 +564,7 @@ void ContentNode::SetChar(sal_Int32 nPos, sal_Unicode c)
|
|||
|
||||
void ContentNode::Insert(const OUString& rStr, sal_Int32 nPos)
|
||||
{
|
||||
if (nPos == 0 && maString.getLength() == 0)
|
||||
maString = rStr; // avoid allocation
|
||||
else
|
||||
maString = maString.replaceAt(nPos, 0, rStr);
|
||||
maString = maString.replaceAt(nPos, 0, rStr);
|
||||
}
|
||||
|
||||
void ContentNode::Append(std::u16string_view rStr)
|
||||
|
|
|
@ -1590,14 +1590,6 @@ void EditEngine::DrawingText( const Point&, const OUString&, sal_Int32, sal_Int3
|
|||
{
|
||||
}
|
||||
|
||||
void EditEngine::DrawingTab( const Point& /*rStartPos*/, tools::Long /*nWidth*/,
|
||||
const OUString& /*rChar*/, const SvxFont& /*rFont*/,
|
||||
sal_Int32 /*nPara*/, sal_uInt8 /*nRightToLeft*/, bool /*bEndOfLine*/,
|
||||
bool /*bEndOfParagraph*/, const Color& /*rOverlineColor*/,
|
||||
const Color& /*rTextLineColor*/)
|
||||
{
|
||||
}
|
||||
|
||||
void EditEngine::PaintingFirstLine(sal_Int32, const Point&, const Point&, Degree10, OutputDevice&)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -568,6 +568,8 @@ void EditView::HideCursor(bool bDeactivate)
|
|||
}
|
||||
}
|
||||
|
||||
bool EditView::IsCursorVisible() const { return getImpl().GetCursor()->IsVisible(); }
|
||||
|
||||
Pair EditView::Scroll( tools::Long ndX, tools::Long ndY, ScrollRangeCheck nRangeCheck )
|
||||
{
|
||||
return getImpl().Scroll( ndX, ndY, nRangeCheck );
|
||||
|
|
|
@ -4182,6 +4182,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po
|
|||
{
|
||||
if ( rTextPortion.GetExtraValue() && ( rTextPortion.GetExtraValue() != ' ' ) )
|
||||
{
|
||||
// calculate expanded text
|
||||
SeekCursor(rParaPortion.GetNode(), nIndex+1, aTmpFont, &rOutDev);
|
||||
aTmpFont.SetTransparent( false );
|
||||
aTmpFont.SetEscapement( 0 );
|
||||
|
@ -4196,11 +4197,10 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po
|
|||
else if ( nChars == 2 )
|
||||
nChars = 3; // looks better
|
||||
|
||||
// create expanded text
|
||||
OUStringBuffer aBuf(nChars);
|
||||
comphelper::string::padToLength(aBuf, nChars, rTextPortion.GetExtraValue());
|
||||
OUString aText(aBuf.makeStringAndClear());
|
||||
aTmpFont.QuickDrawText( &rOutDev, aTmpPos, aText, 0, aText.getLength(), {} );
|
||||
rOutDev.DrawStretchText( aTmpPos, rTextPortion.GetSize().Width(), aText );
|
||||
|
||||
if ( bStripOnly )
|
||||
{
|
||||
|
@ -4212,12 +4212,21 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po
|
|||
const Color aTextLineColor(rOutDev.GetTextLineColor());
|
||||
|
||||
// StripPortions() data callback
|
||||
GetEditEnginePtr()->DrawingTab( aTmpPos,
|
||||
rTextPortion.GetSize().Width(),
|
||||
OUString(rTextPortion.GetExtraValue()),
|
||||
aTmpFont, nParaPortion, rTextPortion.GetRightToLeftLevel(),
|
||||
GetEditEnginePtr()->DrawingText(
|
||||
aTmpPos, aText, 0, aText.getLength(), {}, {},
|
||||
aTmpFont, nParaPortion, 0,
|
||||
nullptr,
|
||||
nullptr,
|
||||
bEndOfLine, bEndOfParagraph,
|
||||
aOverlineColor, aTextLineColor);
|
||||
nullptr,
|
||||
aOverlineColor,
|
||||
aTextLineColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
// direct paint needed
|
||||
aTmpFont.QuickDrawText( &rOutDev, aTmpPos, aText, 0, aText.getLength(), {} );
|
||||
rOutDev.DrawStretchText( aTmpPos, rTextPortion.GetSize().Width(), aText );
|
||||
}
|
||||
}
|
||||
else if ( bStripOnly )
|
||||
|
|
|
@ -349,27 +349,28 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl
|
|||
{
|
||||
if ( aCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT )
|
||||
{
|
||||
const SfxPoolItem* pItem = nullptr;
|
||||
if ( nOnlyHardAttrib == EditEngineAttribs::All )
|
||||
{
|
||||
const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich );
|
||||
aCurSet.Put( rItem );
|
||||
}
|
||||
else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SfxItemState::SET )
|
||||
else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich, true, &pItem ) == SfxItemState::SET )
|
||||
{
|
||||
const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItems().Get( nWhich );
|
||||
aCurSet.Put( rItem );
|
||||
aCurSet.Put( *pItem );
|
||||
}
|
||||
}
|
||||
else if ( aCurSet.GetItemState( nWhich ) == SfxItemState::SET )
|
||||
{
|
||||
const SfxPoolItem* pItem = nullptr;
|
||||
const SfxPoolItem* pTmpItem = nullptr;
|
||||
if ( nOnlyHardAttrib == EditEngineAttribs::All )
|
||||
{
|
||||
pItem = &pNode->GetContentAttribs().GetItem( nWhich );
|
||||
}
|
||||
else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SfxItemState::SET )
|
||||
else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich, true, &pTmpItem ) == SfxItemState::SET )
|
||||
{
|
||||
pItem = &pNode->GetContentAttribs().GetItems().Get( nWhich );
|
||||
pItem = pTmpItem;
|
||||
}
|
||||
// pItem can only be NULL when nOnlyHardAttrib...
|
||||
if ( !pItem || ( *pItem != aCurSet.Get( nWhich ) ) )
|
||||
|
|
|
@ -165,15 +165,6 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const OUString& rText
|
|||
pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, false/*bEndOfBullet*/, pLocale, rOverlineColor, rTextLineColor);
|
||||
}
|
||||
|
||||
void OutlinerEditEng::DrawingTab( const Point& rStartPos, tools::Long nWidth, const OUString& rChar,
|
||||
const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft,
|
||||
bool bEndOfLine, bool bEndOfParagraph,
|
||||
const Color& rOverlineColor, const Color& rTextLineColor)
|
||||
{
|
||||
pOwner->DrawingTab(rStartPos, nWidth, rChar, rFont, nPara, nRightToLeft,
|
||||
bEndOfLine, bEndOfParagraph, rOverlineColor, rTextLineColor );
|
||||
}
|
||||
|
||||
OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor, std::optional<FontLineStyle>& rpFldLineStyle )
|
||||
{
|
||||
return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle );
|
||||
|
|
|
@ -1659,20 +1659,8 @@ void Outliner::DrawingText( const Point& rStartPos, const OUString& rText, sal_I
|
|||
if(aDrawPortionHdl.IsSet())
|
||||
{
|
||||
DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, pDXArray, pKashidaArray, pWrongSpellVector,
|
||||
pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, false, 0, bEndOfLine, bEndOfParagraph, bEndOfBullet);
|
||||
|
||||
aDrawPortionHdl.Call( &aInfo );
|
||||
}
|
||||
}
|
||||
|
||||
void Outliner::DrawingTab( const Point& rStartPos, tools::Long nWidth, const OUString& rChar, const SvxFont& rFont,
|
||||
sal_Int32 nPara, sal_uInt8 nRightToLeft, bool bEndOfLine, bool bEndOfParagraph,
|
||||
const Color& rOverlineColor, const Color& rTextLineColor)
|
||||
{
|
||||
if(aDrawPortionHdl.IsSet())
|
||||
{
|
||||
DrawPortionInfo aInfo( rStartPos, rChar, 0, rChar.getLength(), rFont, nPara, {}, {}, nullptr,
|
||||
nullptr, nullptr, rOverlineColor, rTextLineColor, nRightToLeft, true, nWidth, bEndOfLine, bEndOfParagraph, false);
|
||||
pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft,
|
||||
bEndOfLine, bEndOfParagraph, bEndOfBullet);
|
||||
|
||||
aDrawPortionHdl.Call( &aInfo );
|
||||
}
|
||||
|
|
|
@ -1255,6 +1255,8 @@ void OutlinerView::HideCursor(bool bDeactivate)
|
|||
pEditView->HideCursor(bDeactivate);
|
||||
}
|
||||
|
||||
bool OutlinerView::IsCursorVisible() const { return pEditView->IsCursorVisible(); }
|
||||
|
||||
void OutlinerView::SetWindow( vcl::Window* pWin )
|
||||
{
|
||||
pEditView->SetWindow( pWin );
|
||||
|
|
|
@ -625,9 +625,9 @@ uno::Any SvxUnoTextRangeBase::_getPropertyValue(const OUString& PropertyName, sa
|
|||
{
|
||||
std::optional<SfxItemSet> oAttribs;
|
||||
if( nPara != -1 )
|
||||
oAttribs.emplace(pForwarder->GetParaAttribs( nPara ).CloneAsValue());
|
||||
oAttribs.emplace(pForwarder->GetParaAttribs( nPara ));
|
||||
else
|
||||
oAttribs.emplace(pForwarder->GetAttribs( GetSelection() ).CloneAsValue());
|
||||
oAttribs.emplace(pForwarder->GetAttribs( GetSelection() ));
|
||||
|
||||
// Replace Dontcare with Default, so that one always has a mirror
|
||||
oAttribs->ClearInvalidItems();
|
||||
|
@ -646,9 +646,10 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMapEntry* pMap,
|
|||
switch( pMap->nWID )
|
||||
{
|
||||
case EE_FEATURE_FIELD:
|
||||
if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SfxItemState::SET )
|
||||
{
|
||||
const SvxFieldItem* pItem = nullptr;
|
||||
if ( rSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SfxItemState::SET )
|
||||
{
|
||||
const SvxFieldItem* pItem = rSet.GetItem<SvxFieldItem>( EE_FEATURE_FIELD );
|
||||
const SvxFieldData* pData = pItem->GetField();
|
||||
uno::Reference< text::XTextRange > xAnchor( this );
|
||||
|
||||
|
@ -664,7 +665,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMapEntry* pMap,
|
|||
rAny <<= xField;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case WID_PORTIONTYPE:
|
||||
if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SfxItemState::SET )
|
||||
{
|
||||
|
@ -922,9 +923,9 @@ uno::Sequence< uno::Any > SvxUnoTextRangeBase::_getPropertyValues( const uno::Se
|
|||
{
|
||||
std::optional<SfxItemSet> oAttribs;
|
||||
if( nPara != -1 )
|
||||
oAttribs.emplace(pForwarder->GetParaAttribs( nPara ).CloneAsValue());
|
||||
oAttribs.emplace(pForwarder->GetParaAttribs( nPara ));
|
||||
else
|
||||
oAttribs.emplace(pForwarder->GetAttribs( GetSelection() ).CloneAsValue() );
|
||||
oAttribs.emplace(pForwarder->GetAttribs( GetSelection() ));
|
||||
|
||||
oAttribs->ClearInvalidItems();
|
||||
|
||||
|
|
|
@ -1544,7 +1544,7 @@ namespace emfio
|
|||
UpdateLineStyle();
|
||||
|
||||
if (maLatestFillStyle.aType != WinMtfFillStyleType::Pattern)
|
||||
mpGDIMetaFile->AddAction( new MetaPolygonAction( rPolygon ) );
|
||||
mpGDIMetaFile->AddAction( new MetaPolygonAction( std::move(rPolygon) ) );
|
||||
else {
|
||||
SvtGraphicFill aFill( tools::PolyPolygon( rPolygon ),
|
||||
Color(),
|
||||
|
|
|
@ -221,7 +221,17 @@ namespace pcr
|
|||
OFontPropertyExtractor aPropExtractor(_rxModel);
|
||||
|
||||
// some items, which may be in default state, have to be filled with non-void information
|
||||
vcl::Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont();
|
||||
StyleSettings aStyleSettings
|
||||
= Application::GetDefaultDevice()->GetSettings().GetStyleSettings();
|
||||
|
||||
// if PROPERTY_STANDARD_THEME is set, use style settings independent of platform (theme)
|
||||
// KEEP IN SYNC WITH UnoControl::createPeer
|
||||
bool bStandardTheme = false;
|
||||
css::uno::Any aAnyStandardTheme = _rxModel->getPropertyValue(PROPERTY_STANDARD_THEME);
|
||||
if ((aAnyStandardTheme >>= bStandardTheme) && bStandardTheme)
|
||||
aStyleSettings.SetStandardStyles();
|
||||
|
||||
const vcl::Font aDefaultVCLFont = aStyleSettings.GetAppFont();
|
||||
css::awt::FontDescriptor aDefaultFont = VCLUnoHelper::CreateFontDescriptor(aDefaultVCLFont);
|
||||
|
||||
// get the current properties
|
||||
|
|
|
@ -198,6 +198,7 @@ inline constexpr OUString PROPERTY_NOLABEL = u"NoLabel"_ustr;
|
|||
inline constexpr OUString PROPERTY_URL = u"URL"_ustr;
|
||||
|
||||
inline constexpr OUString PROPERTY_SELECTION_TYPE = u"SelectionType"_ustr;
|
||||
inline constexpr OUString PROPERTY_STANDARD_THEME = u"StandardTheme"_ustr;
|
||||
inline constexpr OUString PROPERTY_ROOT_DISPLAYED = u"RootDisplayed"_ustr;
|
||||
inline constexpr OUString PROPERTY_SHOWS_HANDLES = u"ShowsHandles"_ustr;
|
||||
inline constexpr OUString PROPERTY_SHOWS_ROOT_HANDLES = u"ShowsRootHandles"_ustr;
|
||||
|
|
|
@ -295,7 +295,7 @@ void ScannerManager::startScan( const ScannerContext& scanner_context,
|
|||
);
|
||||
pHolder->m_bBusy = true;
|
||||
|
||||
ScannerThread* pThread = new ScannerThread( pHolder, listener, this );
|
||||
ScannerThread* pThread = new ScannerThread( std::move(pHolder), listener, this );
|
||||
pThread->create();
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ $(call gb_ExternalProject_get_state_target,libexttextcat,build):
|
|||
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
|
||||
$(if $(ENABLE_WERROR),--enable-werror,--disable-werror) \
|
||||
$(gb_CONFIGURE_PLATFORMS) \
|
||||
CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_DEBUGINFO_FLAGS) $(call gb_ExternalProject_get_build_flags,libexttextcat) \
|
||||
CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(if $(debug),$(gb_DEBUGINFO_FLAGS)) $(call gb_ExternalProject_get_build_flags,libexttextcat) \
|
||||
$(if $(COM_IS_CLANG),-Qunused-arguments)" \
|
||||
LDFLAGS="$(call gb_ExternalProject_get_link_flags,libexttextcat)" \
|
||||
&& $(MAKE) \
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#define STR_NODOCUMENT NC_("STR_NODOCUMENT", "No Documents")
|
||||
#define STR_CLEAR_RECENT_FILES NC_("STR_CLEAR_RECENT_FILES", "Clear List")
|
||||
#define STR_CLEAR_RECENT_FILES_HELP NC_("STR_CLEAR_RECENT_FILES_HELP", "Clears the list with the most recently opened files. This action can not be undone.")
|
||||
#define STR_TOGGLE_CURRENT_MODULE NC_("STR_TOGGLE_CURRENT_MODULE", "Current Module Only")
|
||||
#define STR_TOGGLE_CURRENT_MODULE_HELP NC_("STR_TOGGLE_CURRENT_MODULE_HELP", "Shows only documents from the current module")
|
||||
#define STR_REMOTE_TITLE NC_("STR_REMOTE_TITLE", " (Remote)")
|
||||
#define STR_EMDASH_SEPARATOR NC_("STR_EMDASH_SEPARATOR", " — ")
|
||||
#define STR_SAFEMODE_TITLE NC_("STR_SAFEMODE_TITLE", " (Safe Mode)")
|
||||
|
|
|
@ -167,7 +167,7 @@ void SAL_CALL GenericToolbarController::execute( sal_Int16 KeyModifier )
|
|||
// Execute dispatch asynchronously
|
||||
ExecuteInfo* pExecuteInfo = new ExecuteInfo;
|
||||
pExecuteInfo->xDispatch = xDispatch;
|
||||
pExecuteInfo->aTargetURL = aTargetURL;
|
||||
pExecuteInfo->aTargetURL = std::move(aTargetURL);
|
||||
// Add key modifier to argument list
|
||||
pExecuteInfo->aArgs = { comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier) };
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ using namespace com::sun::star::util;
|
|||
namespace {
|
||||
|
||||
constexpr OUString CMD_CLEAR_LIST = u".uno:ClearRecentFileList"_ustr;
|
||||
constexpr OUString CMD_TOGGLE_CURRENTMODULE = u".uno:ToggleCurrentModule"_ustr;
|
||||
constexpr OUString CMD_OPEN_AS_TEMPLATE = u".uno:OpenTemplate"_ustr;
|
||||
constexpr OUString CMD_OPEN_REMOTE = u".uno:OpenRemote"_ustr;
|
||||
|
||||
|
@ -295,6 +296,12 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
|
|||
rPopupMenu->setCommand(sal_uInt16(nCount + 1), CMD_CLEAR_LIST);
|
||||
rPopupMenu->setHelpText(sal_uInt16(nCount + 1), FwkResId(STR_CLEAR_RECENT_FILES_HELP));
|
||||
|
||||
// Toggle current module only
|
||||
rPopupMenu->insertItem(sal_uInt16(nCount + 2), FwkResId(STR_TOGGLE_CURRENT_MODULE), 0, -1);
|
||||
rPopupMenu->checkItem(sal_uInt16(nCount + 2), bShowCurrentModuleOnly);
|
||||
rPopupMenu->setCommand(sal_uInt16(nCount + 2), CMD_TOGGLE_CURRENTMODULE);
|
||||
rPopupMenu->setHelpText(sal_uInt16(nCount + 2), FwkResId(STR_TOGGLE_CURRENT_MODULE_HELP));
|
||||
|
||||
// Open remote menu entry
|
||||
if ( m_bShowToolbarEntries )
|
||||
{
|
||||
|
@ -388,6 +395,13 @@ void SAL_CALL RecentFilesMenuController::itemSelected( const css::awt::MenuEvent
|
|||
u"vnd.org.libreoffice.recentdocs:ClearRecentFileList"_ustr,
|
||||
css::uno::Sequence< css::beans::PropertyValue >() );
|
||||
}
|
||||
if ( aCommand == CMD_TOGGLE_CURRENTMODULE )
|
||||
{
|
||||
bool bIsExclusive = officecfg::Office::Common::History::ShowCurrentModuleOnly::get();
|
||||
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
|
||||
officecfg::Office::Common::History::ShowCurrentModuleOnly::set(!bIsExclusive, batch);
|
||||
batch->commit();
|
||||
}
|
||||
else if ( aCommand == CMD_OPEN_REMOTE )
|
||||
{
|
||||
Sequence< PropertyValue > aArgsList( 0 );
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 482dc7100c9eeecc6bee79db2a1232d1e01378e5
|
||||
Subproject commit b457ef1b8cf5a62891e5aa747a2ebd3959c2f206
|
|
@ -76,7 +76,7 @@ bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase,
|
|||
{
|
||||
tools::SvRef<SvMetaType> xT(new SvMetaType() );
|
||||
xT->SetRef( GetType() );
|
||||
aType = xT;
|
||||
aType = std::move(xT);
|
||||
bOk = aType->ReadMethodArgs( rBase, rInStm );
|
||||
}
|
||||
if( bOk )
|
||||
|
|
|
@ -122,12 +122,6 @@ private:
|
|||
/// font color
|
||||
basegfx::BColor maFontColor;
|
||||
|
||||
// Whether to fill a given width with the text
|
||||
bool mbFilled;
|
||||
|
||||
// the width to fill
|
||||
tools::Long mnWidthToFill;
|
||||
|
||||
/// The fill color of the text
|
||||
Color maTextFillColor;
|
||||
|
||||
|
@ -146,8 +140,7 @@ public:
|
|||
std::vector<double>&& rDXArray,
|
||||
std::vector<sal_Bool>&& rKashidaArray,
|
||||
attribute::FontAttribute aFontAttribute, css::lang::Locale aLocale,
|
||||
const basegfx::BColor& rFontColor, bool bFilled = false,
|
||||
tools::Long nWidthToFill = 0,
|
||||
const basegfx::BColor& rFontColor,
|
||||
const Color& rTextFillColor = COL_TRANSPARENT);
|
||||
|
||||
/** get text outlines as polygons and their according ObjectTransformation. Handles all
|
||||
|
@ -167,8 +160,6 @@ public:
|
|||
const css::lang::Locale& getLocale() const { return maLocale; }
|
||||
const basegfx::BColor& getFontColor() const { return maFontColor; }
|
||||
const Color& getTextFillColor() const { return maTextFillColor; }
|
||||
bool isFilled() const { return mbFilled; }
|
||||
tools::Long getWidthToFill() const { return mnWidthToFill; }
|
||||
|
||||
/// compare operator
|
||||
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
|
||||
|
|
|
@ -510,12 +510,6 @@ public:
|
|||
const Color& rOverlineColor,
|
||||
const Color& rTextLineColor);
|
||||
|
||||
virtual void DrawingTab( const Point& rStartPos, tools::Long nWidth, const OUString& rChar,
|
||||
const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft,
|
||||
bool bEndOfLine,
|
||||
bool bEndOfParagraph,
|
||||
const Color& rOverlineColor,
|
||||
const Color& rTextLineColor);
|
||||
virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const;
|
||||
virtual bool SpellNextDocument();
|
||||
/** @return true, when click was consumed. false otherwise. */
|
||||
|
|
|
@ -205,6 +205,7 @@ public:
|
|||
tools::Rectangle GetEditCursor() const;
|
||||
void ShowCursor( bool bGotoCursor = true, bool bForceVisCursor = true, bool bActivate = false );
|
||||
void HideCursor( bool bDeactivate = false );
|
||||
bool IsCursorVisible() const;
|
||||
|
||||
void SetSelectionMode( EESelectionMode eMode );
|
||||
|
||||
|
|
|
@ -221,6 +221,7 @@ public:
|
|||
|
||||
void ShowCursor( bool bGotoCursor = true, bool bActivate = false );
|
||||
void HideCursor( bool bDeactivate = false );
|
||||
bool IsCursorVisible() const;
|
||||
|
||||
Outliner* GetOutliner() const { return pOwner; }
|
||||
|
||||
|
@ -417,9 +418,6 @@ public:
|
|||
|
||||
sal_uInt8 mnBiDiLevel;
|
||||
|
||||
bool mbFilled;
|
||||
tools::Long mnWidthToFill;
|
||||
|
||||
bool mbEndOfLine : 1;
|
||||
bool mbEndOfParagraph : 1;
|
||||
bool mbEndOfBullet : 1;
|
||||
|
@ -441,8 +439,6 @@ public:
|
|||
const Color& rOverlineColor,
|
||||
const Color& rTextLineColor,
|
||||
sal_uInt8 nBiDiLevel,
|
||||
bool bFilled,
|
||||
tools::Long nWidthToFill,
|
||||
bool bEndOfLine,
|
||||
bool bEndOfParagraph,
|
||||
bool bEndOfBullet)
|
||||
|
@ -460,8 +456,6 @@ public:
|
|||
maOverlineColor(rOverlineColor),
|
||||
maTextLineColor(rTextLineColor),
|
||||
mnBiDiLevel(nBiDiLevel),
|
||||
mbFilled( bFilled ),
|
||||
mnWidthToFill( nWidthToFill ),
|
||||
mbEndOfLine(bEndOfLine),
|
||||
mbEndOfParagraph(bEndOfParagraph),
|
||||
mbEndOfBullet(bEndOfBullet)
|
||||
|
@ -843,13 +837,6 @@ public:
|
|||
const Color& rOverlineColor,
|
||||
const Color& rTextLineColor);
|
||||
|
||||
SAL_DLLPRIVATE void DrawingTab( const Point& rStartPos, tools::Long nWidth, const OUString& rChar,
|
||||
const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft,
|
||||
bool bEndOfLine,
|
||||
bool bEndOfParagraph,
|
||||
const Color& rOverlineColor,
|
||||
const Color& rTextLineColor);
|
||||
|
||||
Size CalcTextSize();
|
||||
|
||||
void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
|
||||
|
|
|
@ -2631,8 +2631,6 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
// hide this from internal code to avoid ambiguous lookup error
|
||||
#ifndef LIBO_INTERNAL_ONLY
|
||||
/**
|
||||
Returns a new string resulting from replacing n = count characters
|
||||
from position index in this string with newStr.
|
||||
|
@ -2652,7 +2650,6 @@ public:
|
|||
rtl_uString_newReplaceStrAt( &pNew, pData, index, count, newStr.pData );
|
||||
return OUString( pNew, SAL_NO_ACQUIRE );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LIBO_INTERNAL_ONLY
|
||||
SAL_WARN_UNUSED_RESULT OUString replaceAt( sal_Int32 index, sal_Int32 count, std::u16string_view newStr ) const
|
||||
|
@ -2661,6 +2658,17 @@ public:
|
|||
rtl_uString_newReplaceStrAtUtf16L( &pNew, pData, index, count, newStr.data(), newStr.size() );
|
||||
return OUString( pNew, SAL_NO_ACQUIRE );
|
||||
}
|
||||
// Disambiguation
|
||||
template <std::size_t N>
|
||||
SAL_WARN_UNUSED_RESULT OUString replaceAt( sal_Int32 index, sal_Int32 count, const sal_Unicode (&newStr)[N] ) const
|
||||
{
|
||||
return replaceAt(index, count, std::u16string_view(newStr, N - 1));
|
||||
}
|
||||
template <class T, std::enable_if_t<std::is_convertible_v<T, std::u16string_view>, int> = 0>
|
||||
SAL_WARN_UNUSED_RESULT OUString replaceAt( sal_Int32 index, sal_Int32 count, const T& newStr ) const
|
||||
{
|
||||
return replaceAt(index, count, std::u16string_view(newStr));
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -486,6 +486,7 @@ enum class SfxItemType : sal_uInt16 {
|
|||
XFillBmpTileOffsetXItemType,
|
||||
XFillBmpTileOffsetYItemType,
|
||||
XFillColorItemType,
|
||||
XFillFloatTransparenceItemType,
|
||||
XFillGradientItemType,
|
||||
XFillHatchItemType,
|
||||
XFillStyleItemType,
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace sdr::properties
|
|||
|
||||
// Internally react on ItemSet changes. The given span contains changed items.
|
||||
// If nDeletedWhich is not 0, it indicates a deleted item.
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it it safe to avoid the cost of doing
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it is safe to avoid the cost of doing
|
||||
// text layout right now.
|
||||
SAL_DLLPRIVATE virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true);
|
||||
|
||||
|
|
|
@ -111,12 +111,12 @@ namespace sdr::properties
|
|||
|
||||
// Sets all items which are on state SfxItemState::SET in rSet at the local ItemSet.
|
||||
// Uses AllowItemChange(), ItemChange(), PostItemChange() and ItemSetChanged() calls.
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it it safe to avoid the cost of doing
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it is safe to avoid the cost of doing
|
||||
// text layout right now.
|
||||
virtual void SetObjectItemSet(const SfxItemSet& rSet, bool bAdjustTextFrameWidthAndHeight = true) = 0;
|
||||
|
||||
// Set merged ItemSet. Normally, this maps to SetObjectItemSet().
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it it safe to avoid the cost of doing
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it is safe to avoid the cost of doing
|
||||
// text layout right now.
|
||||
virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false,
|
||||
bool bAdjustTextFrameWidthAndHeight = true);
|
||||
|
|
|
@ -602,7 +602,7 @@ public:
|
|||
const SfxItemSet& GetMergedItemSet() const;
|
||||
void SetMergedItem(const SfxPoolItem& rItem);
|
||||
void ClearMergedItem(const sal_uInt16 nWhich = 0);
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it it safe to avoid the cost of doing
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it is safe to avoid the cost of doing
|
||||
// text layout right now.
|
||||
void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false, bool bAdjustTextFrameWidthAndHeight = true);
|
||||
const SfxPoolItem& GetMergedItem(const sal_uInt16 nWhich) const;
|
||||
|
@ -950,7 +950,7 @@ protected:
|
|||
|
||||
const SfxItemSet* getBackgroundFillSet() const;
|
||||
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it it safe to avoid the cost of doing
|
||||
// @param bAdjustTextFrameWidthAndHeight pass false if you know it is safe to avoid the cost of doing
|
||||
// text layout right now.
|
||||
virtual void InternalSetStyleSheet(SfxStyleSheet* pNewStyleSheet,
|
||||
bool bDontRemoveHardAttr, bool bBroadcast, bool bAdjustTextFrameWidthAndHeight = true);
|
||||
|
|
|
@ -418,7 +418,7 @@ public:
|
|||
sal_uInt32 nResId )=0;
|
||||
virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr,
|
||||
const css::uno::Reference<css::frame::XFrame>& rFrame) = 0;
|
||||
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Widget* pParent, const SfxItemSet& rAttr,
|
||||
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Widget* pParent, std::unique_ptr<const SfxItemSet> xAttr,
|
||||
const css::uno::Reference< css::frame::XFrame >& rFrame) = 0;
|
||||
virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog(weld::Widget* pParent, const SfxItemSet& rCoreSet, bool bPrevNext = false) = 0;
|
||||
virtual VclPtr<VclAbstractDialog> CreateSvxScriptOrgDialog(weld::Window* pParent, const OUString& rLanguage) override = 0;
|
||||
|
|
|
@ -33,12 +33,22 @@ class SVXCORE_DLLPUBLIC XFillGradientItem : public NameOrIndex
|
|||
basegfx::BGradient m_aGradient;
|
||||
|
||||
public:
|
||||
static SfxPoolItem* CreateDefault();
|
||||
XFillGradientItem() : NameOrIndex(XATTR_FILLGRADIENT, -1, SfxItemType::XFillGradientItemType) {}
|
||||
XFillGradientItem(sal_Int32 nIndex, const basegfx::BGradient& rTheGradient);
|
||||
XFillGradientItem(const OUString& rName, const basegfx::BGradient& rTheGradient, TypedWhichId<XFillGradientItem> nWhich = XATTR_FILLGRADIENT);
|
||||
XFillGradientItem(const basegfx::BGradient& rTheGradient);
|
||||
XFillGradientItem(const XFillGradientItem& rItem);
|
||||
static SfxPoolItem* CreateDefault();
|
||||
XFillGradientItem(TypedWhichId<XFillGradientItem> nWhich = XATTR_FILLGRADIENT,
|
||||
SfxItemType eItemType = SfxItemType::XFillGradientItemType)
|
||||
: NameOrIndex(nWhich, -1, eItemType) {}
|
||||
XFillGradientItem(sal_Int32 nIndex,
|
||||
const basegfx::BGradient& rTheGradient,
|
||||
TypedWhichId<XFillGradientItem> nWhich = XATTR_FILLGRADIENT,
|
||||
SfxItemType eItemType = SfxItemType::XFillGradientItemType);
|
||||
XFillGradientItem(const OUString& rName,
|
||||
const basegfx::BGradient& rTheGradient,
|
||||
TypedWhichId<XFillGradientItem> nWhich = XATTR_FILLGRADIENT,
|
||||
SfxItemType eItemType = SfxItemType::XFillGradientItemType);
|
||||
XFillGradientItem(const basegfx::BGradient& rTheGradient,
|
||||
TypedWhichId<XFillGradientItem> nWhich = XATTR_FILLGRADIENT,
|
||||
SfxItemType eItemType = SfxItemType::XFillGradientItemType);
|
||||
XFillGradientItem(const XFillGradientItem& rItem);
|
||||
|
||||
virtual bool operator==(const SfxPoolItem& rItem) const override;
|
||||
virtual XFillGradientItem* Clone(SfxItemPool* pPool = nullptr) const override;
|
||||
|
|
|
@ -98,8 +98,8 @@ public:
|
|||
|
||||
// note: there is no tearDownX509
|
||||
void setUpX509(const test::Directories& rDirectories, const OUString& rTestName);
|
||||
void setUpGpg(const test::Directories& rDirectories, const OUString& rTestName);
|
||||
void tearDownGpg();
|
||||
static void setUpGpg(const test::Directories& rDirectories, std::u16string_view rTestName);
|
||||
static void tearDownGpg();
|
||||
|
||||
static bool IsValid(const css::uno::Reference<css::security::XCertificate>& cert,
|
||||
const css::uno::Reference<css::xml::crypto::XSecurityEnvironment>& env);
|
||||
|
@ -113,9 +113,6 @@ protected:
|
|||
|
||||
private:
|
||||
std::unique_ptr<BasicDLL> mpDll;
|
||||
#if HAVE_GPGCONF_SOCKETDIR
|
||||
OString m_gpgconfCommandPrefix;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -83,6 +83,12 @@ public:
|
|||
{
|
||||
return m_pDrawingArea->get_accessible_description();
|
||||
}
|
||||
OUString GetAccessibleId() const
|
||||
{
|
||||
if (m_pDrawingArea)
|
||||
return m_pDrawingArea->get_accessible_id();
|
||||
return OUString();
|
||||
}
|
||||
void CaptureMouse() { m_pDrawingArea->grab_add(); }
|
||||
bool IsMouseCaptured() const { return m_pDrawingArea->has_grab(); }
|
||||
Point GetPointerPosPixel() const { return m_pDrawingArea->get_pointer_position(); }
|
||||
|
|
|
@ -72,8 +72,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
private:
|
||||
struct SAL_DLLPRIVATE CachedGlyphsKey
|
||||
struct CachedGlyphsKey
|
||||
{
|
||||
OUString text;
|
||||
sal_Int32 index;
|
||||
|
@ -94,6 +93,8 @@ private:
|
|||
tools::Long w);
|
||||
bool operator==(const CachedGlyphsKey& other) const;
|
||||
};
|
||||
|
||||
private:
|
||||
struct CachedGlyphsHash
|
||||
{
|
||||
size_t operator()(const CachedGlyphsKey& key) const { return key.hashValue; }
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <comphelper/flagguard.hxx>
|
||||
#include <tools/gen.hxx>
|
||||
#include <tools/ref.hxx>
|
||||
#include <tools/solar.h>
|
||||
|
@ -267,8 +266,6 @@ private:
|
|||
mutable bool mbRefPoint : 1;
|
||||
mutable bool mbEnableRTL : 1;
|
||||
|
||||
bool mbNoFontScaling = false; // Used only by D2DWriteTextOutRenderer
|
||||
|
||||
protected:
|
||||
mutable std::shared_ptr<vcl::font::PhysicalFontCollection> mxFontCollection;
|
||||
mutable std::shared_ptr<ImplFontCache> mxFontCache;
|
||||
|
@ -351,8 +348,6 @@ public:
|
|||
/// request XSpriteCanvas render interface
|
||||
css::uno::Reference< css::rendering::XSpriteCanvas > GetSpriteCanvas() const;
|
||||
|
||||
auto ScopedNoFontScaling() { return comphelper::FlagRestorationGuard(mbNoFontScaling, true); }
|
||||
|
||||
protected:
|
||||
|
||||
/** Acquire a graphics device that the output device uses to draw on.
|
||||
|
|
|
@ -679,6 +679,9 @@ public:
|
|||
static int GetAppColorMode();
|
||||
// return true if system preferences are set to use reduced animation
|
||||
static bool GetUseReducedAnimation();
|
||||
static bool IsAnimatedGraphicAllowed();
|
||||
static bool IsAnimatedOthersAllowed();
|
||||
static bool IsAnimatedTextAllowed();
|
||||
bool operator ==( const MiscSettings& rSet ) const;
|
||||
bool operator !=( const MiscSettings& rSet ) const;
|
||||
};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue