[Libreoffice-commits] .: 3 commits - binfilter/bf_xmloff binfilter/inc lotuswordpro/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Mar 25 05:47:08 PDT 2011
binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx | 69 ++++++++---------
binfilter/bf_xmloff/source/text/xmloff_txtparae.cxx | 3
binfilter/bf_xmloff/source/text/xmloff_txtstyle.cxx | 2
binfilter/inc/bf_xmloff/XMLShapePropertySetContext.hxx | 1
lotuswordpro/source/filter/lwpfribptr.cxx | 19 ----
5 files changed, 38 insertions(+), 56 deletions(-)
New commits:
commit 447618dfca71795a6fc486f3a9792bfe464b3fd8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 25 11:09:58 2011 +0000
WaE: mirror xmloff change in here too
diff --git a/binfilter/inc/bf_xmloff/XMLShapePropertySetContext.hxx b/binfilter/inc/bf_xmloff/XMLShapePropertySetContext.hxx
index 1b7a060..1441b6c 100644
--- a/binfilter/inc/bf_xmloff/XMLShapePropertySetContext.hxx
+++ b/binfilter/inc/bf_xmloff/XMLShapePropertySetContext.hxx
@@ -52,6 +52,7 @@ public:
virtual void EndElement();
+ using SvXMLPropertySetContext::CreateChildContext;
virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
commit 5164ed2dce7361c8fb8fd53ce0fabb03cd752725
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 24 20:58:43 2011 +0000
WaE: set but unused
diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx b/lotuswordpro/source/filter/lwpfribptr.cxx
index 538d83d..b5fa4d9 100644
--- a/lotuswordpro/source/filter/lwpfribptr.cxx
+++ b/lotuswordpro/source/filter/lwpfribptr.cxx
@@ -109,12 +109,10 @@ void LwpFribPtr::ReadPara(LwpObjectStream* pObjStrm)
sal_uInt8 FribTag=0;
sal_uInt8 FribType;
sal_uInt8 FribEditor;
- sal_Bool ProblemFrib;
LwpFrib* pCurFrib = m_pFribs = NULL;
for(;;)
{
- ProblemFrib = sal_False;
// Get the frib type
pObjStrm->QuickRead(&FribTag, sizeof(FribTag));
@@ -151,26 +149,9 @@ void LwpFribPtr::ReadPara(LwpObjectStream* pObjStrm)
}
pCurFrib = pFrib;
}
- else
- ProblemFrib = sal_True;
}
}
-/*String LwpFribPtr::GetText()
-{
- LwpFrib* pFrib = m_pFribs;
- String content;
- while(pFrib)
- {
- if(pFrib->GetType() == FRIB_TAG_TEXT)
- {
- content+= static_cast<LwpFribText*>(pFrib)->GetText();
- }
- pFrib = pFrib->GetNext();
- }
- return (content);
-}*/
-
#include "lwpdropcapmgr.hxx"
void LwpFribPtr::XFConvert()
{
commit a5db57ea965ed4330dea08596b6569e9aa83f799
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 23 20:35:41 2011 +0000
WaE: throw out some warnings
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx
index f2f9deb..e5d3791 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx
@@ -280,12 +280,12 @@ XMLTextFieldImportContext::XMLTextFieldImportContext(
const sal_Char* pService,
sal_uInt16 nInPrefix, const OUString& rElementName)
: SvXMLImportContext( rInImport, nInPrefix, rElementName ),
+ sServicePrefix(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_textfield_prefix)),
+ sIsFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
sContentBuffer(),
rTextImportHelper(rHlp),
- bValid(sal_False),
- sIsFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
- sServicePrefix(RTL_CONSTASCII_USTRINGPARAM(
- sAPI_textfield_prefix))
+ bValid(sal_False)
{
DBG_ASSERT(NULL != pService, "Need service name!");
sServiceName = OUString::createFromAscii(pService);
@@ -354,14 +354,14 @@ void XMLTextFieldImportContext::EndElement()
rTextImportHelper.InsertString(GetContent());
}
-void XMLTextFieldImportContext::Characters(const OUString& sContent)
+void XMLTextFieldImportContext::Characters(const OUString& rContent)
{
- sContentBuffer.append(sContent);
+ sContentBuffer.append(rContent);
}
sal_Bool XMLTextFieldImportContext::CreateField(
Reference<XPropertySet> & xField,
- const OUString& sServiceName)
+ const OUString& rServiceName)
{
// instantiate new XTextField:
// ask import for model, model is factory, ask factory to create service
@@ -369,7 +369,7 @@ sal_Bool XMLTextFieldImportContext::CreateField(
Reference<XMultiServiceFactory> xFactory(GetImport().GetModel(),UNO_QUERY);
if( xFactory.is() )
{
- Reference<XInterface> xIfc = xFactory->createInstance(sServiceName);
+ Reference<XInterface> xIfc = xFactory->createInstance(rServiceName);
if( xIfc.is() )
{
Reference<XPropertySet> xTmp( xIfc, UNO_QUERY );
@@ -696,12 +696,12 @@ XMLSenderFieldImportContext::XMLSenderFieldImportContext(
sal_uInt16 nToken) :
XMLTextFieldImportContext(rInImport, rHlp, sAPI_extended_user,
nPrfx, sLocalName),
- bFixed(sal_True),
- nElementToken(nToken),
sEmpty(),
- sPropertyFieldSubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_user_data_type)),
sPropertyFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
- sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content))
+ sPropertyFieldSubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_user_data_type)),
+ sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content)),
+ bFixed(sal_True),
+ nElementToken(nToken)
{
}
@@ -825,10 +825,10 @@ XMLAuthorFieldImportContext::XMLAuthorFieldImportContext(
sal_uInt16 nToken) :
XMLSenderFieldImportContext(rInImport, rHlp, nPrfx, sLocalName, nToken),
bAuthorFullName(sal_True),
+ sServiceAuthor(RTL_CONSTASCII_USTRINGPARAM(sAPI_author)),
sPropertyAuthorFullName(RTL_CONSTASCII_USTRINGPARAM(sAPI_full_name)),
- sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content)),
sPropertyFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
- sServiceAuthor(RTL_CONSTASCII_USTRINGPARAM(sAPI_author))
+ sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content))
{
// overwrite service name from XMLSenderFieldImportContext
SetServiceName(sServiceAuthor);
@@ -892,13 +892,13 @@ XMLPageContinuationImportContext::XMLPageContinuationImportContext(
const OUString& sLocalName) :
XMLTextFieldImportContext(rInImport, rHlp, sAPI_page_number,
nPrfx, sLocalName),
- sString(),
- sStringOK(sal_False),
- eSelectPage(PageNumberType_CURRENT),
sPropertySubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type)),
sPropertyUserText(RTL_CONSTASCII_USTRINGPARAM(sAPI_user_text)),
sPropertyNumberingType(RTL_CONSTASCII_USTRINGPARAM(
- sAPI_numbering_type))
+ sAPI_numbering_type)),
+ sString(),
+ eSelectPage(PageNumberType_CURRENT),
+ sStringOK(sal_False)
{
bValid = sal_True;
}
@@ -1126,19 +1126,19 @@ void XMLPlaceholderFieldImportContext::PrepareField(
xPropertySet->setPropertyValue(sPropertyHint, aAny);
// remove <...> around content (if present)
- OUString sContent = GetContent();
+ OUString sLclContent = GetContent();
sal_Int32 nStart = 0;
- sal_Int32 nLength = sContent.getLength();
- if ((nLength > 0) && (sContent.getStr()[0] == '<'))
+ sal_Int32 nLength = sLclContent.getLength();
+ if ((nLength > 0) && (sLclContent.getStr()[0] == '<'))
{
--nLength;
++nStart;
}
- if ((nLength > 0) && (sContent.getStr()[sContent.getLength()-1] == '>'))
+ if ((nLength > 0) && (sLclContent.getStr()[sLclContent.getLength()-1] == '>'))
{
--nLength;
}
- aAny <<= sContent.copy(nStart, nLength);
+ aAny <<= sLclContent.copy(nStart, nLength);
xPropertySet->setPropertyValue(sPropertyPlaceholder, aAny);
aAny <<= nPlaceholderType;
@@ -1157,14 +1157,6 @@ XMLTimeFieldImportContext::XMLTimeFieldImportContext(
sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLTextFieldImportContext(rInImport, rHlp, sAPI_date_time,
nPrfx, sLocalName),
- fTimeValue(0.0),
- nAdjust(0),
- bTimeOK(sal_False),
- bFixed(sal_False),
- nFormatKey(0),
- bFormatOK(sal_False),
- bIsDate(sal_False),
- bIsDefaultLanguage( sal_True ),
sPropertyNumberFormat(RTL_CONSTASCII_USTRINGPARAM(sAPI_number_format)),
sPropertyFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
sPropertyDateTimeValue(RTL_CONSTASCII_USTRINGPARAM(
@@ -1173,7 +1165,16 @@ XMLTimeFieldImportContext::XMLTimeFieldImportContext(
sAPI_date_time)),
sPropertyAdjust(RTL_CONSTASCII_USTRINGPARAM(sAPI_adjust)),
sPropertyIsDate(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_date)),
- sPropertyIsFixedLanguage(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed_language))
+ sPropertyIsFixedLanguage(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed_language)),
+ fTimeValue(0.0),
+ nAdjust(0),
+ nFormatKey(0),
+ bTimeOK(sal_False),
+ bFormatOK(sal_False),
+ bFixed(sal_False),
+ bIsDate(sal_False),
+ bIsDefaultLanguage( sal_True )
+
{
bValid = sal_True; // always valid!
}
@@ -1385,11 +1386,11 @@ XMLDatabaseFieldImportContext::XMLDatabaseFieldImportContext(
sDatabaseName(),
sTableName(),
nCommandType( sdb::CommandType::TABLE ),
- bDatabaseOK(sal_False),
bCommandTypeOK(sal_False),
- bDisplayOK( false ),
bDisplay( sal_True ),
+ bDisplayOK( false ),
bUseDisplay( bUseDisply ),
+ bDatabaseOK(sal_False),
bTableOK(sal_False)
{
}
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtparae.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtparae.cxx
index 0215840..eb422ea 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_txtparae.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_txtparae.cxx
@@ -1587,9 +1587,8 @@ void XMLTextParagraphExport::exportParagraph(
if( bAutoStyles )
{
- sal_Bool bLclPrevCharIsSpace = sal_True;
if( bHasContentEnum )
- bLclPrevCharIsSpace = !exportTextContentEnumeration(
+ exportTextContentEnumeration(
xContentEnum, bAutoStyles, xSection,
bInProgress );
exportTextRangeEnumeration( xTextEnum, bAutoStyles, bInProgress );
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtstyle.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtstyle.cxx
index b3d4466..d9d88f9 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_txtstyle.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_txtstyle.cxx
@@ -57,7 +57,7 @@ void XMLTextParagraphExport::exportStyleAttributes(
if( xPropSetInfo->hasPropertyByName( sCategory ) )
{
aAny = xPropSet->getPropertyValue( sCategory );
- sal_Int16 nCategory;
+ sal_Int16 nCategory(0);
aAny >>= nCategory;
enum XMLTokenEnum eValue = XML_TOKEN_INVALID;
if( -1 != nCategory )
More information about the Libreoffice-commits
mailing list