summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-01-05 19:42:14 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-01-08 03:35:22 +0100
commit070258271cb3b79cdb7b612c3b0c885aa3a275cb (patch)
treef5f9cb70e72d20368b67c72ea91e93c8dd5e1aa1 /xmloff
parentf9234784f05742a6d4bf3ddb62ce89d3c2a022d1 (diff)
indentation fixes
Change-Id: Ibc652519d7ccc9a1ec483f19d443c9b5303e0f92
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlimp.cxx183
1 files changed, 92 insertions, 91 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 8ade9dc9a626..52b10a96d853 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -166,110 +166,111 @@ getBuildIdsProperty(uno::Reference<beans::XPropertySet> const& xImportInfo)
return OUString();
}
- class DocumentInfo
- {
- private:
- sal_uInt16 mnGeneratorVersion;
+class DocumentInfo
+{
+private:
+ sal_uInt16 mnGeneratorVersion;
- public:
- explicit DocumentInfo( const SvXMLImport& rImport )
- : mnGeneratorVersion( SvXMLImport::ProductVersionUnknown )
+public:
+ explicit DocumentInfo( const SvXMLImport& rImport )
+ : mnGeneratorVersion( SvXMLImport::ProductVersionUnknown )
+ {
+ OUString const buildIds(
+ getBuildIdsProperty(rImport.getImportInfo()));
+ if (!buildIds.isEmpty())
+ {
+ sal_Int32 const ix = buildIds.indexOf(';');
+ if (-1 != ix)
{
- OUString const buildIds(
- getBuildIdsProperty(rImport.getImportInfo()));
- if (!buildIds.isEmpty())
- {
- sal_Int32 const ix = buildIds.indexOf(';');
- if (-1 != ix)
- {
- OUString const loVersion(buildIds.copy(ix + 1));
- if (!loVersion.isEmpty())
- {
- if ('3' == loVersion[0])
- {
- mnGeneratorVersion = SvXMLImport::LO_3x;
- }
- else if ('4' == loVersion[0])
- {
- if (loVersion.getLength() > 1
- && (loVersion[1] == '0' || loVersion[1] == '1'))
- {
- mnGeneratorVersion = SvXMLImport::LO_41x; // 4.0/4.1
- }
- else if (loVersion.getLength() > 1 && '2' == loVersion[1])
- {
- mnGeneratorVersion = SvXMLImport::LO_42x; // 4.2
- }
- else if (loVersion.getLength() > 1 && '3' == loVersion[1])
- {
- mnGeneratorVersion = SvXMLImport::LO_43x; // 4.3
- }
- else if (loVersion.getLength() > 1 && '4' == loVersion[1])
- {
- mnGeneratorVersion = SvXMLImport::LO_44x; // 4.4
- }
- }
- else
- {
- SAL_INFO_IF('5' != loVersion[0], "xmloff.core", "unknown LO version: " << loVersion);
- mnGeneratorVersion = SvXMLImport::LO_5x;
- }
- return; // ignore buildIds
- }
- }
- }
- sal_Int32 nUPD, nBuild;
- if ( rImport.getBuildIds( nUPD, nBuild ) )
+ OUString const loVersion(buildIds.copy(ix + 1));
+ if (!loVersion.isEmpty())
{
- if ( nUPD >= 640 && nUPD <= 645 )
- {
- mnGeneratorVersion = SvXMLImport::OOo_1x;
- }
- else if ( nUPD == 680 )
- {
- mnGeneratorVersion = SvXMLImport::OOo_2x;
- }
- else if ( nUPD == 300 && nBuild <= 9379 )
+ if ('3' == loVersion[0])
{
- mnGeneratorVersion = SvXMLImport::OOo_30x;
+ mnGeneratorVersion = SvXMLImport::LO_3x;
}
- else if ( nUPD == 310 )
+ else if ('4' == loVersion[0])
{
- mnGeneratorVersion = SvXMLImport::OOo_31x;
- }
- else if ( nUPD == 320 )
- {
- mnGeneratorVersion = SvXMLImport::OOo_32x;
- }
- else if ( nUPD == 330 )
- {
- mnGeneratorVersion = SvXMLImport::OOo_33x;
- }
- else if ( nUPD == 340 )
- {
- mnGeneratorVersion = SvXMLImport::OOo_34x;
- }
- else if (nUPD == 400)
- {
- mnGeneratorVersion = SvXMLImport::AOO_40x;
+ if (loVersion.getLength() > 1
+ && (loVersion[1] == '0' || loVersion[1] == '1'))
+ {
+ mnGeneratorVersion = SvXMLImport::LO_41x; // 4.0/4.1
+ }
+ else if (loVersion.getLength() > 1 && '2' == loVersion[1])
+ {
+ mnGeneratorVersion = SvXMLImport::LO_42x; // 4.2
+ }
+ else if (loVersion.getLength() > 1 && '3' == loVersion[1])
+ {
+ mnGeneratorVersion = SvXMLImport::LO_43x; // 4.3
+ }
+ else if (loVersion.getLength() > 1 && '4' == loVersion[1])
+ {
+ mnGeneratorVersion = SvXMLImport::LO_44x; // 4.4
+ }
}
- else if (nUPD >= 410)
+ else
{
- // effectively this means "latest", see use
- // in XMLGraphicsDefaultStyle::SetDefaults()!
- mnGeneratorVersion = SvXMLImport::AOO_4x;
+ SAL_INFO_IF('5' != loVersion[0], "xmloff.core", "unknown LO version: " << loVersion);
+ mnGeneratorVersion = SvXMLImport::LO_5x;
}
+ return; // ignore buildIds
}
}
-
- ~DocumentInfo()
- {}
-
- sal_uInt16 getGeneratorVersion() const
+ }
+ sal_Int32 nUPD, nBuild;
+ if ( rImport.getBuildIds( nUPD, nBuild ) )
+ {
+ if ( nUPD >= 640 && nUPD <= 645 )
+ {
+ mnGeneratorVersion = SvXMLImport::OOo_1x;
+ }
+ else if ( nUPD == 680 )
+ {
+ mnGeneratorVersion = SvXMLImport::OOo_2x;
+ }
+ else if ( nUPD == 300 && nBuild <= 9379 )
+ {
+ mnGeneratorVersion = SvXMLImport::OOo_30x;
+ }
+ else if ( nUPD == 310 )
+ {
+ mnGeneratorVersion = SvXMLImport::OOo_31x;
+ }
+ else if ( nUPD == 320 )
+ {
+ mnGeneratorVersion = SvXMLImport::OOo_32x;
+ }
+ else if ( nUPD == 330 )
+ {
+ mnGeneratorVersion = SvXMLImport::OOo_33x;
+ }
+ else if ( nUPD == 340 )
+ {
+ mnGeneratorVersion = SvXMLImport::OOo_34x;
+ }
+ else if (nUPD == 400)
+ {
+ mnGeneratorVersion = SvXMLImport::AOO_40x;
+ }
+ else if (nUPD >= 410)
{
- return mnGeneratorVersion;
+ // effectively this means "latest", see use
+ // in XMLGraphicsDefaultStyle::SetDefaults()!
+ mnGeneratorVersion = SvXMLImport::AOO_4x;
}
- };
+ }
+ }
+
+ ~DocumentInfo()
+ {}
+
+ sal_uInt16 getGeneratorVersion() const
+ {
+ return mnGeneratorVersion;
+ }
+};
+
}
class SvXMLImport_Impl